diff --git a/.clang-format b/.clang-format index 643199a8a9..90054b3816 100644 --- a/.clang-format +++ b/.clang-format @@ -1,9 +1,716 @@ --- -BasedOnStyle: Google -IndentWidth: 2 -UseTab: Never +Language: Cpp +AlignAfterOpenBracket: true +AccessModifierOffset: -1 +AlignArrayOfStructures: None +AlignConsecutiveAssignments: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: true +AlignConsecutiveBitFields: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveDeclarations: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: true + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveMacros: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveShortCaseStatements: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCaseArrows: false + AlignCaseColons: false +AlignConsecutiveTableGenBreakingDAGArgColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenCondOperatorColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenDefinitionColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignEscapedNewlines: Left +AlignOperands: Align +AlignTrailingComments: + AlignPPAndNotPP: true + Kind: Always + OverEmptyLines: 0 +AllowAllArgumentsOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: true +AllowBreakBeforeNoexceptSpecifier: Never +AllowBreakBeforeQtProperty: false +AllowShortBlocksOnASingleLine: false +AllowShortCaseExpressionOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortCompoundRequirementOnASingleLine: false +AllowShortEnumsOnASingleLine: false +AllowShortFunctionsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: false +AllowShortLambdasOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AllowShortNamespacesOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakBeforeMultilineStrings: true +AttributeMacros: + - __capability + - absl_nonnull + - absl_nullable + - absl_nullability_unknown +BinPackArguments: true +BinPackLongBracedList: true +BinPackParameters: BinPack +BitFieldColonSpacing: Both +BracedInitializerIndentWidth: -1 +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterExternBlock: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakAdjacentStringLiterals: true +BreakAfterAttributes: Leave +BreakAfterJavaFieldAnnotations: false +BreakAfterOpenBracketBracedList: true +BreakAfterOpenBracketFunction: false +BreakAfterOpenBracketIf: false +BreakAfterOpenBracketLoop: false +BreakAfterOpenBracketSwitch: false +BreakAfterReturnType: None +BreakArrays: true +BreakBeforeBinaryOperators: None +BreakBeforeCloseBracketBracedList: true +BreakBeforeCloseBracketFunction: false +BreakBeforeCloseBracketIf: false +BreakBeforeCloseBracketLoop: false +BreakBeforeCloseBracketSwitch: false +BreakBeforeConceptDeclarations: Always +BreakBeforeBraces: Attach +BreakBeforeInlineASMColon: OnlyMultiline +BreakBeforeTemplateCloser: false +BreakBeforeTernaryOperators: true +BreakBinaryOperations: Never +BreakConstructorInitializers: BeforeColon +BreakFunctionDefinitionParameters: false +BreakInheritanceList: BeforeColon +BreakStringLiterals: true +BreakTemplateDeclarations: Yes +ColumnLimit: 100 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: AlignFirstComment +DerivePointerAlignment: false +DisableFormat: false +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: LogicalBlock +EnumTrailingComma: Leave +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IfMacros: + - KJ_IF_MAYBE +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '^<.*\.h>' + Priority: 1 + SortPriority: 0 + CaseSensitive: false + - Regex: '^<.*' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '.*' + Priority: 3 + SortPriority: 0 + CaseSensitive: false +IncludeIsMainRegex: '([-_](test|unittest))?$' +IncludeIsMainSourceRegex: '' +IndentAccessModifiers: false +IndentCaseBlocks: false +IndentCaseLabels: true +IndentExportBlock: true +IndentExternBlock: AfterExternBlock +IndentGotoLabels: true +IndentPPDirectives: None +IndentRequiresClause: true +IndentWidth: 2 +IndentWrappedFunctionNames: false +InsertBraces: false +InsertNewlineAtEOF: false +InsertTrailingCommas: None +IntegerLiteralSeparator: + Binary: 0 + BinaryMinDigitsInsert: 0 + BinaryMaxDigitsRemove: 0 + Decimal: 0 + DecimalMinDigitsInsert: 0 + DecimalMaxDigitsRemove: 0 + Hex: 0 + HexMinDigitsInsert: 0 + HexMaxDigitsRemove: 0 + BinaryMinDigits: 0 + DecimalMinDigits: 0 + HexMinDigits: 0 +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLines: + AtEndOfFile: false + AtStartOfBlock: false + AtStartOfFile: true +KeepFormFeed: false +LambdaBodyIndentation: Signature +LineEnding: DeriveLF +MacroBlockBegin: '' +MacroBlockEnd: '' +MainIncludeChar: Quote +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +NumericLiteralCase: + ExponentLetter: Leave + HexDigit: Leave + Prefix: Leave + Suffix: Leave +ObjCBinPackProtocolList: Never +ObjCBlockIndentWidth: 2 +ObjCBreakBeforeNestedBlockParam: true +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +OneLineFormatOffRegex: '' +PackConstructorInitializers: NextLine +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakBeforeMemberAccess: 150 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakOpenParenthesis: 0 +PenaltyBreakScopeResolution: 500 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1000000 +PenaltyIndentedWhitespace: 0 +PenaltyReturnTypeOnItsOwnLine: 200 PointerAlignment: Right -ColumnLimit: 100 -SortIncludes: Never -AllowShortFunctionsOnASingleLine: Empty +PPIndentWidth: -1 +QualifierAlignment: Leave +RawStringFormats: + - Language: Cpp + Delimiters: + - cc + - CC + - cpp + - Cpp + - CPP + - 'c++' + - 'C++' + CanonicalDelimiter: '' + BasedOnStyle: google + - Language: TextProto + Delimiters: + - pb + - PB + - proto + - PROTO + EnclosingFunctions: + - EqualsProto + - EquivToProto + - PARSE_PARTIAL_TEXT_PROTO + - PARSE_TEST_PROTO + - PARSE_TEXT_PROTO + - ParseTextOrDie + - ParseTextProtoOrDie + - ParseTestProto + - ParsePartialTestProto + CanonicalDelimiter: pb + BasedOnStyle: google +ReferenceAlignment: Pointer +ReflowComments: Always +RemoveBracesLLVM: false +RemoveEmptyLinesInUnwrappedLines: false +RemoveParentheses: Leave +RemoveSemicolon: false +RequiresClausePosition: OwnLine +RequiresExpressionIndentation: OuterScope +SeparateDefinitionBlocks: Leave +ShortNamespaceLines: 1 +SkipMacroDefinitionBody: false +SortIncludes: + Enabled: false + IgnoreCase: false + IgnoreExtension: false +SortJavaStaticImport: Before +SortUsingDeclarations: LexicographicNumeric +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceAfterOperatorKeyword: false +SpaceAfterTemplateKeyword: true +SpaceAroundPointerQualifiers: Default +SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeJsonColon: false +SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDefinitionName: false + AfterFunctionDeclarationName: false + AfterIfMacros: true + AfterNot: false + AfterOverloadedOperator: false + AfterPlacementOperator: true + AfterRequiresInClause: false + AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBraces: Never +SpacesBeforeTrailingComments: 2 +SpacesInAngles: Never +SpacesInContainerLiterals: true +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +SpacesInParens: Never +SpacesInParensOptions: + ExceptDoubleParentheses: false + InCStyleCasts: false + InConditionalStatements: false + InEmptyParentheses: false + Other: false +SpacesInSquareBrackets: false +Standard: Auto +StatementAttributeLikeMacros: + - Q_EMIT +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +TableGenBreakInsideDAGArg: DontBreak +TabWidth: 8 +UseTab: Never +VerilogBreakBetweenInstancePorts: true +WhitespaceSensitiveMacros: + - BOOST_PP_STRINGIZE + - CF_SWIFT_NAME + - NS_SWIFT_NAME + - PP_STRINGIZE + - STRINGIZE +WrapNamespaceBodyWithEmptyLines: Leave +... + --- +Language: Proto +AlignAfterOpenBracket: true +AccessModifierOffset: -1 +AlignArrayOfStructures: None +AlignConsecutiveAssignments: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: true +AlignConsecutiveBitFields: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveDeclarations: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: true + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveMacros: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveShortCaseStatements: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCaseArrows: false + AlignCaseColons: false +AlignConsecutiveTableGenBreakingDAGArgColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenCondOperatorColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenDefinitionColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignEscapedNewlines: Left +AlignOperands: Align +AlignTrailingComments: + AlignPPAndNotPP: true + Kind: Always + OverEmptyLines: 0 +AllowAllArgumentsOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowBreakBeforeNoexceptSpecifier: Never +AllowBreakBeforeQtProperty: false +AllowShortBlocksOnASingleLine: Never +AllowShortCaseExpressionOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: false +AllowShortCompoundRequirementOnASingleLine: true +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: WithoutElse +AllowShortLambdasOnASingleLine: All +AllowShortLoopsOnASingleLine: true +AllowShortNamespacesOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AttributeMacros: + - __capability + - absl_nonnull + - absl_nullable + - absl_nullability_unknown +BinPackArguments: true +BinPackLongBracedList: true +BinPackParameters: BinPack +BitFieldColonSpacing: Both +BracedInitializerIndentWidth: -1 +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterExternBlock: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakAdjacentStringLiterals: true +BreakAfterAttributes: Leave +BreakAfterJavaFieldAnnotations: false +BreakAfterOpenBracketBracedList: false +BreakAfterOpenBracketFunction: false +BreakAfterOpenBracketIf: false +BreakAfterOpenBracketLoop: false +BreakAfterOpenBracketSwitch: false +BreakAfterReturnType: None +BreakArrays: true +BreakBeforeBinaryOperators: None +BreakBeforeCloseBracketBracedList: false +BreakBeforeCloseBracketFunction: false +BreakBeforeCloseBracketIf: false +BreakBeforeCloseBracketLoop: false +BreakBeforeCloseBracketSwitch: false +BreakBeforeConceptDeclarations: Always +BreakBeforeBraces: Attach +BreakBeforeInlineASMColon: OnlyMultiline +BreakBeforeTemplateCloser: false +BreakBeforeTernaryOperators: true +BreakBinaryOperations: Never +BreakConstructorInitializers: BeforeColon +BreakFunctionDefinitionParameters: false +BreakInheritanceList: BeforeColon +BreakStringLiterals: false +BreakTemplateDeclarations: Yes +ColumnLimit: 80 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: Block +DerivePointerAlignment: false +DisableFormat: false +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: LogicalBlock +EnumTrailingComma: Leave +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IfMacros: + - KJ_IF_MAYBE +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '^<.*\.h>' + Priority: 1 + SortPriority: 0 + CaseSensitive: false + - Regex: '^<.*' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '.*' + Priority: 3 + SortPriority: 0 + CaseSensitive: false +IncludeIsMainRegex: '([-_](test|unittest))?$' +IncludeIsMainSourceRegex: '' +IndentAccessModifiers: false +IndentCaseBlocks: false +IndentCaseLabels: true +IndentExportBlock: true +IndentExternBlock: AfterExternBlock +IndentGotoLabels: true +IndentPPDirectives: None +IndentRequiresClause: true +IndentWidth: 2 +IndentWrappedFunctionNames: false +InsertBraces: false +InsertNewlineAtEOF: false +InsertTrailingCommas: None +IntegerLiteralSeparator: + Binary: 0 + BinaryMinDigitsInsert: 0 + BinaryMaxDigitsRemove: 0 + Decimal: 0 + DecimalMinDigitsInsert: 0 + DecimalMaxDigitsRemove: 0 + Hex: 0 + HexMinDigitsInsert: 0 + HexMaxDigitsRemove: 0 + BinaryMinDigits: 0 + DecimalMinDigits: 0 + HexMinDigits: 0 +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLines: + AtEndOfFile: false + AtStartOfBlock: false + AtStartOfFile: true +KeepFormFeed: false +LambdaBodyIndentation: Signature +LineEnding: DeriveLF +MacroBlockBegin: '' +MacroBlockEnd: '' +MainIncludeChar: Quote +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +NumericLiteralCase: + ExponentLetter: Leave + HexDigit: Leave + Prefix: Leave + Suffix: Leave +ObjCBinPackProtocolList: Never +ObjCBlockIndentWidth: 2 +ObjCBreakBeforeNestedBlockParam: true +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +OneLineFormatOffRegex: '' +PackConstructorInitializers: NextLine +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakBeforeMemberAccess: 150 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakOpenParenthesis: 0 +PenaltyBreakScopeResolution: 500 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1000000 +PenaltyIndentedWhitespace: 0 +PenaltyReturnTypeOnItsOwnLine: 200 +PointerAlignment: Left +PPIndentWidth: -1 +QualifierAlignment: Leave +RawStringFormats: + - Language: Cpp + Delimiters: + - cc + - CC + - cpp + - Cpp + - CPP + - 'c++' + - 'C++' + CanonicalDelimiter: '' + BasedOnStyle: google + - Language: TextProto + Delimiters: + - pb + - PB + - proto + - PROTO + EnclosingFunctions: + - EqualsProto + - EquivToProto + - PARSE_PARTIAL_TEXT_PROTO + - PARSE_TEST_PROTO + - PARSE_TEXT_PROTO + - ParseTextOrDie + - ParseTextProtoOrDie + - ParseTestProto + - ParsePartialTestProto + CanonicalDelimiter: pb + BasedOnStyle: google +ReferenceAlignment: Pointer +ReflowComments: Always +RemoveBracesLLVM: false +RemoveEmptyLinesInUnwrappedLines: false +RemoveParentheses: Leave +RemoveSemicolon: false +RequiresClausePosition: OwnLine +RequiresExpressionIndentation: OuterScope +SeparateDefinitionBlocks: Leave +ShortNamespaceLines: 1 +SkipMacroDefinitionBody: false +SortIncludes: + Enabled: true + IgnoreCase: false + IgnoreExtension: false +SortJavaStaticImport: Before +SortUsingDeclarations: LexicographicNumeric +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceAfterOperatorKeyword: false +SpaceAfterTemplateKeyword: true +SpaceAroundPointerQualifiers: Default +SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeJsonColon: false +SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDefinitionName: false + AfterFunctionDeclarationName: false + AfterIfMacros: true + AfterNot: false + AfterOverloadedOperator: false + AfterPlacementOperator: true + AfterRequiresInClause: false + AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBraces: Never +SpacesBeforeTrailingComments: 2 +SpacesInAngles: Never +SpacesInContainerLiterals: false +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +SpacesInParens: Never +SpacesInParensOptions: + ExceptDoubleParentheses: false + InCStyleCasts: false + InConditionalStatements: false + InEmptyParentheses: false + Other: false +SpacesInSquareBrackets: false +Standard: Auto +StatementAttributeLikeMacros: + - Q_EMIT +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +TableGenBreakInsideDAGArg: DontBreak +TabWidth: 8 +UseTab: Never +VerilogBreakBetweenInstancePorts: true +WhitespaceSensitiveMacros: + - BOOST_PP_STRINGIZE + - CF_SWIFT_NAME + - NS_SWIFT_NAME + - PP_STRINGIZE + - STRINGIZE +WrapNamespaceBodyWithEmptyLines: Leave +... + diff --git a/.clang-format-ignore b/.clang-format-ignore new file mode 100644 index 0000000000..0ef35fae6d --- /dev/null +++ b/.clang-format-ignore @@ -0,0 +1,6 @@ +**/*.template.c +**/*.template.h +sdk/defaults/lib/lib.c +sdk/defaults/lib/lib.h +tools/clar/* +tests/** diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml index 872b139e44..4d42c44382 100644 --- a/.github/workflows/compliance.yml +++ b/.github/workflows/compliance.yml @@ -101,3 +101,14 @@ jobs: echo " /* SPDX-License-Identifier: Apache-2.0 */" exit 1 fi + + clang-format: + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Run clang-format + uses: jidicula/clang-format-action@v4.18.0 diff --git a/apps/samples/accelerometer_peek_test/src/accelerometer_peek_test.c b/apps/samples/accelerometer_peek_test/src/accelerometer_peek_test.c index a8bf2a4c4b..d4b3583050 100644 --- a/apps/samples/accelerometer_peek_test/src/accelerometer_peek_test.c +++ b/apps/samples/accelerometer_peek_test/src/accelerometer_peek_test.c @@ -10,12 +10,12 @@ Window *window; TextLayer *text_layer; -AppTimer* s_timer; +AppTimer *s_timer; static AccelData s_last_accel_data; static uint32_t prv_compute_delta_pos(AccelData *cur_pos, AccelData *last_pos) { return (abs(last_pos->x - cur_pos->x) + abs(last_pos->y - cur_pos->y) + - abs(last_pos->z - cur_pos->z)); + abs(last_pos->z - cur_pos->z)); } static void prv_timer_cb(void *data) { @@ -33,11 +33,11 @@ static void prv_timer_cb(void *data) { int32_t delta = prv_compute_delta_pos(&accel_data, &s_last_accel_data); s_last_accel_data = accel_data; - snprintf(accel_text, sizeof(accel_text), "Accel delta: %"PRIu32, delta); + snprintf(accel_text, sizeof(accel_text), "Accel delta: %" PRIu32, delta); APP_LOG(APP_LOG_LEVEL_INFO, accel_text); #else - snprintf(accel_text, sizeof(accel_text), "x:%"PRId16 ", y:%"PRId16 ", z:%"PRId16, - accel_data.x, accel_data.y, accel_data.z); + snprintf(accel_text, sizeof(accel_text), "x:%" PRId16 ", y:%" PRId16 ", z:%" PRId16, accel_data.x, + accel_data.y, accel_data.z); APP_LOG(APP_LOG_LEVEL_INFO, accel_text); #endif text_layer_set_text(text_layer, accel_text); @@ -50,8 +50,8 @@ void handle_init(void) { GRect bounds = layer_get_bounds(window_layer); uint32_t text_width = bounds.size.w; uint32_t text_height = 28; - text_layer = text_layer_create(GRect(0, bounds.size.h/2 - text_height/2, - text_width, text_height)); + text_layer = + text_layer_create(GRect(0, bounds.size.h / 2 - text_height / 2, text_width, text_height)); // Set the text, font, and text alignment text_layer_set_text(text_layer, "No Accelerometer"); diff --git a/apps/samples/app_heap_demo/src/app_heap_demo.c b/apps/samples/app_heap_demo/src/app_heap_demo.c index c4f46bd9b1..da86caea7e 100644 --- a/apps/samples/app_heap_demo/src/app_heap_demo.c +++ b/apps/samples/app_heap_demo/src/app_heap_demo.c @@ -3,7 +3,7 @@ #include -#define ALLOC_SIZE 2048 +#define ALLOC_SIZE 2048 static Window *window; static TextLayer *text_heap_info; diff --git a/apps/samples/app_messages_test/src/app_message_test.c b/apps/samples/app_messages_test/src/app_message_test.c index 9919f04226..5519e495a7 100644 --- a/apps/samples/app_messages_test/src/app_message_test.c +++ b/apps/samples/app_messages_test/src/app_message_test.c @@ -6,7 +6,6 @@ static Window *s_window; static TextLayer *s_text_layer; - enum { DICT_KEY_TEST_0 = 0x0, }; @@ -31,7 +30,7 @@ static int send_app_msg(void) { static void select_click_handler(ClickRecognizerRef recognizer, void *context) { int result; APP_LOG(APP_LOG_LEVEL_DEBUG, "Sending messages"); - for (int i=0; i<10; i++) { + for (int i = 0; i < 10; i++) { APP_LOG(APP_LOG_LEVEL_DEBUG, "app sending outbox"); do { result = send_app_msg(); @@ -42,7 +41,7 @@ static void select_click_handler(ClickRecognizerRef recognizer, void *context) { static void up_click_handler(ClickRecognizerRef recognizer, void *context) { text_layer_set_text(s_text_layer, "Up"); - for (int i=0; i<10; i++) { + for (int i = 0; i < 10; i++) { APP_LOG(APP_LOG_LEVEL_INFO, "sending BT log message"); } } @@ -82,7 +81,7 @@ static void window_load(Window *window) { Layer *window_layer = window_get_root_layer(window); GRect bounds = layer_get_bounds(window_layer); - s_text_layer = text_layer_create((GRect) { .origin = { 0, 72 }, .size = { bounds.size.w, 20 } }); + s_text_layer = text_layer_create((GRect){.origin = {0, 72}, .size = {bounds.size.w, 20}}); text_layer_set_text(s_text_layer, "Press a button"); text_layer_set_text_alignment(s_text_layer, GTextAlignmentCenter); layer_add_child(window_layer, text_layer_get_layer(s_text_layer)); @@ -95,10 +94,10 @@ static void init(void) { s_window = window_create(); app_message_init(); window_set_click_config_provider(s_window, click_config_provider); - window_set_window_handlers(s_window, (WindowHandlers) { - .load = window_load, - .unload = window_unload, - }); + window_set_window_handlers(s_window, (WindowHandlers){ + .load = window_load, + .unload = window_unload, + }); const bool animated = true; window_stack_push(s_window, animated); } diff --git a/apps/samples/bg_task_test/src/fg.c b/apps/samples/bg_task_test/src/fg.c index 74f22f303f..288bb8a66a 100644 --- a/apps/samples/bg_task_test/src/fg.c +++ b/apps/samples/bg_task_test/src/fg.c @@ -4,7 +4,6 @@ #include "pebble.h" #include - Window *window; TextLayer *text_layer; Layer *line_layer; @@ -18,21 +17,22 @@ static uint64_t prv_ms(void) { return ((uint64_t)cur_sec * 1000) + cur_ms; } - static void steps_event_handler(uint16_t type, AppWorkerMessage *data) { - //APP_LOG(APP_LOG_LEVEL_DEBUG, "Received new worker event. type: %d, data: %d, %d, %d", (int)type, (int)data->data0, - // (int)data->data1, (int)data->data2); + // APP_LOG(APP_LOG_LEVEL_DEBUG, "Received new worker event. type: %d, data: %d, %d, %d", + // (int)type, (int)data->data0, + // (int)data->data1, (int)data->data2); if (type == 0) { - snprintf(g_text, sizeof(g_text), "%5d %5d %5d", (int)data->data0, (int)data->data1, (int)data->data2); + snprintf(g_text, sizeof(g_text), "%5d %5d %5d", (int)data->data0, (int)data->data1, + (int)data->data2); text_layer_set_text(text_layer, g_text); } else if (type == 1) { - snprintf(g_text, sizeof(g_text), "BAT: %d, %d, %d", (int)data->data0, (int)data->data1, (int)data->data2); + snprintf(g_text, sizeof(g_text), "BAT: %d, %d, %d", (int)data->data0, (int)data->data1, + (int)data->data2); text_layer_set_text(text_layer, g_text); } } - static void up_click_handler(ClickRecognizerRef recognizer, void *context) { AppWorkerResult result = app_worker_launch(); APP_LOG(APP_LOG_LEVEL_INFO, "launch result: %d", result); @@ -57,11 +57,10 @@ static void click_config_provider(void *context) { static uint32_t s_seconds_count; void handle_second_tick(struct tm *tick_time, TimeUnits units_changed) { - bool running = app_worker_is_running(); if (false) { - const char* status = "not"; + const char *status = "not"; if (running) { status = "is"; } @@ -77,12 +76,11 @@ void handle_second_tick(struct tm *tick_time, TimeUnits units_changed) { } static void health_event_handler(HealthEventType event, void *context) { - APP_LOG(APP_LOG_LEVEL_INFO, "app: Got health event update. event_id: %"PRIu32"", - (uint32_t) event); + APP_LOG(APP_LOG_LEVEL_INFO, "app: Got health event update. event_id: %" PRIu32 "", + (uint32_t)event); if (event == HealthEventMovementUpdate) { HealthValue steps = health_service_sum_today(HealthMetricStepCount); - APP_LOG(APP_LOG_LEVEL_INFO, "app: movement event, steps: %"PRIu32"", - (uint32_t)steps); + APP_LOG(APP_LOG_LEVEL_INFO, "app: movement event, steps: %" PRIu32 "", (uint32_t)steps); // Test getting historical steps time_t day_start = time_start_of_today(); @@ -102,7 +100,6 @@ static void health_event_handler(HealthEventType event, void *context) { steps = health_service_sum(HealthMetricStepCount, day_start - (SECONDS_PER_DAY / 2), day_start); APP_LOG(APP_LOG_LEVEL_INFO, "steps 2nd half of yesterday: %d", (int)steps); - // Test the get_minute_history call const int minute_data_len = 10; @@ -116,20 +113,23 @@ static void health_event_handler(HealthEventType event, void *context) { uint64_t elapsed_ms = prv_ms() - start_ms; int num_records_returned = (utc_end - utc_start) / SECONDS_PER_MINUTE; - APP_LOG(APP_LOG_LEVEL_INFO, "app: Retrieved %d minute records in %"PRIu32" ms:", - num_records_returned, (uint32_t)elapsed_ms); + APP_LOG(APP_LOG_LEVEL_INFO, + "app: Retrieved %d minute records in %" PRIu32 " ms:", num_records_returned, + (uint32_t)elapsed_ms); for (int i = 0; i < num_records_returned; i++) { - APP_LOG(APP_LOG_LEVEL_INFO, " steps: %"PRIu8", orient: 0x%"PRIx8", vmc: %"PRIu16", " - "light: %d, valid: %d", minute_data[i].steps, minute_data[i].orientation, - minute_data[i].vmc, (int)minute_data[i].light, (int)(!minute_data[i].is_invalid)); + APP_LOG(APP_LOG_LEVEL_INFO, + " steps: %" PRIu8 ", orient: 0x%" PRIx8 ", vmc: %" PRIu16 + ", " + "light: %d, valid: %d", + minute_data[i].steps, minute_data[i].orientation, minute_data[i].vmc, + (int)minute_data[i].light, (int)(!minute_data[i].is_invalid)); } - } else if (event == HealthEventSleepUpdate) { HealthValue total_sleep = health_service_sum_today(HealthMetricSleepSeconds); HealthValue restful_sleep = health_service_sum_today(HealthMetricSleepRestfulSeconds); - APP_LOG(APP_LOG_LEVEL_INFO, "app: New sleep event: total: %"PRIu32", restful: %"PRIu32" ", - total_sleep / SECONDS_PER_MINUTE, restful_sleep / SECONDS_PER_MINUTE); + APP_LOG(APP_LOG_LEVEL_INFO, "app: New sleep event: total: %" PRIu32 ", restful: %" PRIu32 " ", + total_sleep / SECONDS_PER_MINUTE, restful_sleep / SECONDS_PER_MINUTE); } } @@ -147,7 +147,7 @@ void handle_init(void) { Layer *window_layer = window_get_root_layer(window); - text_layer = text_layer_create(GRect(7, 40, 144-7, 168-40)); + text_layer = text_layer_create(GRect(7, 40, 144 - 7, 168 - 40)); text_layer_set_text_color(text_layer, GColorWhite); text_layer_set_background_color(text_layer, GColorClear); text_layer_set_font(text_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24)); @@ -170,11 +170,10 @@ void handle_init(void) { health_service_events_subscribe(health_event_handler, NULL); } - int main(void) { handle_init(); app_event_loop(); - + handle_deinit(); } diff --git a/apps/samples/bg_task_test/worker_src/bg.c b/apps/samples/bg_task_test/worker_src/bg.c index 12422f5287..97580912d5 100644 --- a/apps/samples/bg_task_test/worker_src/bg.c +++ b/apps/samples/bg_task_test/worker_src/bg.c @@ -6,11 +6,11 @@ #define BREAKPOINT __asm("bkpt") -#define ACCEL_BATCH_SIZE 10 +#define ACCEL_BATCH_SIZE 10 #define PERSIST_WRITE_PERIOD_MS 1000 // ------------------------------------------------------------------------------------------------- -static void prv_assert(bool condition, const char* msg) { +static void prv_assert(bool condition, const char *msg) { if (!condition) { APP_LOG(APP_LOG_LEVEL_ERROR, msg); @@ -23,58 +23,54 @@ static void prv_assert(bool condition, const char* msg) { // ----------------------------------------------------------------------------------------------- void handle_accel(AccelRawData *accel_data, uint32_t num_samples, uint64_t timestamp) { - // Display data - //for (uint32_t i=0; i 8) { num_characteristics = 8; } @@ -95,12 +81,12 @@ static void service_change_handler(BTDevice device, Uuid characteristic_uuid = ble_characteristic_get_uuid(characteristics[c]); uuid_to_string(&characteristic_uuid, uuid_buffer); - APP_LOG(APP_LOG_LEVEL_INFO, "-- Characteristic: %s (0x%08x)", - uuid_buffer, characteristics[c]); + APP_LOG(APP_LOG_LEVEL_INFO, "-- Characteristic: %s (0x%08x)", uuid_buffer, + characteristics[c]); Uuid device_name_characteristic = bt_uuid_expand_16bit(0x2A00); if (uuid_equal(&device_name_characteristic, &characteristic_uuid)) { - BTErrno err = ble_client_read(characteristics[c]); + BTErrno err = ble_client_read(characteristics[c]); APP_LOG(APP_LOG_LEVEL_INFO, "Reading... %u", err); } @@ -108,7 +94,7 @@ static void service_change_handler(BTDevice device, const Uuid alert_control_point = bt_uuid_expand_16bit(0x2A44); if (uuid_equal(&alert_control_point, &characteristic_uuid)) { const char value[] = "Hello World."; - ble_client_write(characteristics[c], (const uint8_t *) value, strlen(value) + 1); + ble_client_write(characteristics[c], (const uint8_t *)value, strlen(value) + 1); } const Uuid hrm_uuid = bt_uuid_expand_16bit(0x2A37); @@ -116,29 +102,30 @@ static void service_change_handler(BTDevice device, ble_client_subscribe(characteristics[c], BLESubscriptionNotifications); } -// BLEDescriptor descriptors[8]; -// uint8_t num_descriptors = -// ble_characteristic_get_descriptors(characteristics[c], descriptors, 8); -// for (unsigned int d = 0; d < num_descriptors; ++d) { -// const Uuid descriptor_uuid = ble_descriptor_get_uuid(descriptors[d]); -// uuid_to_string(&descriptor_uuid, uuid_buffer); -// APP_LOG(APP_LOG_LEVEL_INFO, "---- Descriptor: %s (0x%08x)", uuid_buffer, descriptors[d]); -// -// // If the characteristic is the Heart Rate Measurement, -// // attempt to subscribe to it by writing to the CCCD: -// const Uuid hrm_uuid = bt_uuid_expand_16bit(0x2A37); -// const Uuid cccd_uuid = bt_uuid_expand_16bit(0x2902); -// if (uuid_equal(&hrm_uuid, &characteristic_uuid) && -// uuid_equal(&cccd_uuid, &descriptor_uuid)) { -// APP_LOG(APP_LOG_LEVEL_INFO, "---- Subscribing to Heart Rate Measurement notifications"); -// const uint16_t enable_notifications = 1; -// ble_client_write_descriptor(descriptors[d], -// (const uint8_t *) &enable_notifications, -// sizeof(enable_notifications)); -// } -// -// ble_client_read_descriptor(descriptors[d]); -// } + // BLEDescriptor descriptors[8]; + // uint8_t num_descriptors = + // ble_characteristic_get_descriptors(characteristics[c], descriptors, 8); + // for (unsigned int d = 0; d < num_descriptors; ++d) { + // const Uuid descriptor_uuid = ble_descriptor_get_uuid(descriptors[d]); + // uuid_to_string(&descriptor_uuid, uuid_buffer); + // APP_LOG(APP_LOG_LEVEL_INFO, "---- Descriptor: %s (0x%08x)", uuid_buffer, + // descriptors[d]); + // + // // If the characteristic is the Heart Rate Measurement, + // // attempt to subscribe to it by writing to the CCCD: + // const Uuid hrm_uuid = bt_uuid_expand_16bit(0x2A37); + // const Uuid cccd_uuid = bt_uuid_expand_16bit(0x2902); + // if (uuid_equal(&hrm_uuid, &characteristic_uuid) && + // uuid_equal(&cccd_uuid, &descriptor_uuid)) { + // APP_LOG(APP_LOG_LEVEL_INFO, "---- Subscribing to Heart Rate Measurement + // notifications"); const uint16_t enable_notifications = 1; + // ble_client_write_descriptor(descriptors[d], + // (const uint8_t *) &enable_notifications, + // sizeof(enable_notifications)); + // } + // + // ble_client_read_descriptor(descriptors[d]); + // } } } } @@ -149,8 +136,8 @@ static void connection_handler(BTDevice device, BTErrno connection_status) { const bool connected = (connection_status == BTErrnoConnected); APP_LOG(APP_LOG_LEVEL_INFO, "%s " BT_DEVICE_ADDRESS_FMT " (status=%d)", - connected ? "Connected" : "Disconnected", - BT_DEVICE_ADDRESS_XPLODE(address), connection_status); + connected ? "Connected" : "Disconnected", BT_DEVICE_ADDRESS_XPLODE(address), + connection_status); ble_client_discover_services_and_characteristics(device); } diff --git a/apps/samples/ble_demo/src/ble_demo_scan.c b/apps/samples/ble_demo/src/ble_demo_scan.c index 4a88c665b1..2f4d173ffc 100644 --- a/apps/samples/ble_demo/src/ble_demo_scan.c +++ b/apps/samples/ble_demo/src/ble_demo_scan.c @@ -133,10 +133,7 @@ static void list_free_all(void) { //------------------------------------------------------------------------------ // BLE Scan API callback -static void ble_scan_handler(BTDevice device, - int8_t rssi, - const BLEAdData *ad_data) { - +static void ble_scan_handler(BTDevice device, int8_t rssi, const BLEAdData *ad_data) { const BTDeviceAddress address = bt_device_get_address(device); APP_LOG(APP_LOG_LEVEL_INFO, "Got Advertisement from: " BT_DEVICE_ADDRESS_FMT, BT_DEVICE_ADDRESS_XPLODE(address)); @@ -151,7 +148,7 @@ static void ble_scan_handler(BTDevice device, list_free_last(); } // Create new ScanResult: - result = (ScanResult *) malloc(sizeof(ScanResult)); + result = (ScanResult *)malloc(sizeof(ScanResult)); if (!result) { APP_LOG(APP_LOG_LEVEL_ERROR, "Out of memory!"); return; @@ -172,8 +169,7 @@ static void ble_scan_handler(BTDevice device, } // Try getting Local Name: - if (ble_ad_copy_local_name(ad_data, result->local_name, - sizeof(result->local_name))) { + if (ble_ad_copy_local_name(ad_data, result->local_name, sizeof(result->local_name))) { APP_LOG(APP_LOG_LEVEL_INFO, "Local Name: %s", result->local_name); } else { // Clear out the local name field: @@ -181,8 +177,7 @@ static void ble_scan_handler(BTDevice device, } // Try to copy the first Service UUID, we'll display this in the list: - const uint8_t num_services = ble_ad_copy_service_uuids(ad_data, - &result->first_service_uuid, 1); + const uint8_t num_services = ble_ad_copy_service_uuids(ad_data, &result->first_service_uuid, 1); if (num_services) { result->has_services = true; @@ -222,12 +217,12 @@ enum { }; static uint16_t menu_get_num_sections_callback(struct MenuLayer *menu_layer, - void *callback_context) { + void *callback_context) { return 2; } -static uint16_t menu_get_num_rows_callback(MenuLayer *menu_layer, - uint16_t section_index, void *data) { +static uint16_t menu_get_num_rows_callback(MenuLayer *menu_layer, uint16_t section_index, + void *data) { switch (section_index) { case SectionControl: return 1; @@ -238,20 +233,19 @@ static uint16_t menu_get_num_rows_callback(MenuLayer *menu_layer, } } -static int16_t menu_get_header_height_callback(MenuLayer *menu_layer, - uint16_t section_index, +static int16_t menu_get_header_height_callback(MenuLayer *menu_layer, uint16_t section_index, void *data) { return MENU_CELL_BASIC_HEADER_HEIGHT; } -static void menu_draw_header_callback(GContext* ctx, const Layer *cell_layer, +static void menu_draw_header_callback(GContext *ctx, const Layer *cell_layer, uint16_t section_index, void *data) { menu_cell_basic_header_draw(ctx, cell_layer, (section_index == SectionData) ? "Results" : "Options"); } -static void draw_data_row(GContext* ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *data) { +static void draw_data_row(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *data) { ScanResult *result = list_get_by_index(cell_index->row); // Build the title string: @@ -263,8 +257,8 @@ static void draw_data_row(GContext* ctx, const Layer *cell_layer, snprintf(title, sizeof(title), "%s %s", result->local_name, hrm_str); } else { const BTDeviceAddress address = bt_device_get_address(result->device); - snprintf(title, sizeof(title), BT_DEVICE_ADDRESS_FMT " %s", - BT_DEVICE_ADDRESS_XPLODE(address), hrm_str); + snprintf(title, sizeof(title), BT_DEVICE_ADDRESS_FMT " %s", BT_DEVICE_ADDRESS_XPLODE(address), + hrm_str); } // Build the subtitle string: @@ -280,13 +274,12 @@ static void draw_data_row(GContext* ctx, const Layer *cell_layer, menu_cell_basic_draw(ctx, cell_layer, title, subtitle, NULL); } -static void menu_draw_row_callback(GContext* ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *data) { +static void menu_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *data) { switch (cell_index->section) { case SectionControl: - menu_cell_basic_draw(ctx, cell_layer, - s_is_scanning ? "Disable Scan" : "Enable Scan", - NULL, NULL); + menu_cell_basic_draw(ctx, cell_layer, s_is_scanning ? "Disable Scan" : "Enable Scan", NULL, + NULL); break; case SectionData: draw_data_row(ctx, cell_layer, cell_index, data); @@ -296,8 +289,7 @@ static void menu_draw_row_callback(GContext* ctx, const Layer *cell_layer, } } -static void menu_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, - void *data) { +static void menu_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *data) { if (cell_index->section == SectionControl) { toggle_scan(); return; @@ -306,16 +298,14 @@ static void menu_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, // Connect ScanResult *result = list_get_by_index(cell_index->row); - BTErrno e = ble_central_connect(result->device, - true /* auto_reconnect */, + BTErrno e = ble_central_connect(result->device, true /* auto_reconnect */, false /* is_pairing_required */); if (e) { APP_LOG(APP_LOG_LEVEL_INFO, "ble_central_connect: %d", e); } } -static void menu_select_long_callback(MenuLayer *menu_layer, MenuIndex *cell_index, - void *data) { +static void menu_select_long_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *data) { if (cell_index->section == SectionControl) { return; } @@ -340,15 +330,16 @@ static void window_load(Window *window) { s_menu_layer = menu_layer_create(bounds); window_set_user_data(window, s_menu_layer); - menu_layer_set_callbacks(s_menu_layer, NULL, (MenuLayerCallbacks){ - .get_num_sections = menu_get_num_sections_callback, - .get_num_rows = menu_get_num_rows_callback, - .get_header_height = menu_get_header_height_callback, - .draw_header = menu_draw_header_callback, - .draw_row = menu_draw_row_callback, - .select_click = menu_select_callback, - .select_long_click = menu_select_long_callback, - }); + menu_layer_set_callbacks(s_menu_layer, NULL, + (MenuLayerCallbacks){ + .get_num_sections = menu_get_num_sections_callback, + .get_num_rows = menu_get_num_rows_callback, + .get_header_height = menu_get_header_height_callback, + .draw_header = menu_draw_header_callback, + .draw_row = menu_draw_row_callback, + .select_click = menu_select_callback, + .select_long_click = menu_select_long_callback, + }); menu_layer_set_click_config_onto_window(s_menu_layer, window); @@ -371,13 +362,13 @@ static void window_unload(Window *window) { //------------------------------------------------------------------------------ -Window * ble_demo_scan_window_create(void) { - Window * window = window_create(); +Window *ble_demo_scan_window_create(void) { + Window *window = window_create(); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - .unload = window_unload, - }); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + .unload = window_unload, + }); return window; } diff --git a/apps/samples/ble_demo/src/ble_demo_scan.h b/apps/samples/ble_demo/src/ble_demo_scan.h index 5865c3e42b..a539e2b05b 100644 --- a/apps/samples/ble_demo/src/ble_demo_scan.h +++ b/apps/samples/ble_demo/src/ble_demo_scan.h @@ -5,4 +5,4 @@ #include "pebble.h" -Window * ble_demo_scan_window_create(void); +Window *ble_demo_scan_window_create(void); diff --git a/apps/samples/complex_animations/src/complex_animations.c b/apps/samples/complex_animations/src/complex_animations.c index f5c5f63091..fb086f23d1 100644 --- a/apps/samples/complex_animations/src/complex_animations.c +++ b/apps/samples/complex_animations/src/complex_animations.c @@ -23,7 +23,6 @@ static void animation_stopped(Animation *animation, bool finished, void *data) { text_layer_set_text(s_text_layer_a, finished ? "Hi, I'm a TextLayer!" : "Just Stopped."); } - // -------------------------------------------------------------------------------------- // setup handler static void prv_setup_handler(Animation *animation) { @@ -45,9 +44,7 @@ static void prv_update_handler(Animation *animation, const uint32_t distance) { // -------------------------------------------------------------------------------------- static const AnimationImplementation s_custom_implementation = { - .setup = prv_setup_handler, - .update = prv_update_handler, - .teardown = prv_teardown_handler + .setup = prv_setup_handler, .update = prv_update_handler, .teardown = prv_teardown_handler }; // -------------------------------------------------------------------------------------- @@ -59,7 +56,6 @@ static Animation *prv_create_custom_animation(void) { return d; } - static void click_handler(ClickRecognizerRef recognizer, Window *window) { // If the animation is still running, fast-forward to 300ms from the end if (animation_is_scheduled(s_animation)) { @@ -84,47 +80,49 @@ static void click_handler(ClickRecognizerRef recognizer, Window *window) { } toggle = !toggle; - animation_destroy(s_animation); s_animation = NULL; PropertyAnimation *a = property_animation_create_layer_frame(layer, &from_rect_a, &to_rect_a); - animation_set_duration((Animation*)a, DURATION); - animation_set_handlers((Animation*) a, (AnimationHandlers) { - .started = (AnimationStartedHandler) animation_started, - .stopped = (AnimationStoppedHandler) animation_stopped, - }, NULL /* callback data */); + animation_set_duration((Animation *)a, DURATION); + animation_set_handlers((Animation *)a, + (AnimationHandlers){ + .started = (AnimationStartedHandler)animation_started, + .stopped = (AnimationStoppedHandler)animation_stopped, + }, + NULL /* callback data */); PropertyAnimation *a_rev = property_animation_clone(a); - animation_set_handlers((Animation*) a_rev, (AnimationHandlers) { - .started = (AnimationStartedHandler) animation_started, - .stopped = (AnimationStoppedHandler) animation_stopped, - }, NULL /* callback data */); - animation_set_delay((Animation*)a_rev, 400); - animation_set_duration((Animation*)a_rev, DURATION); + animation_set_handlers((Animation *)a_rev, + (AnimationHandlers){ + .started = (AnimationStartedHandler)animation_started, + .stopped = (AnimationStoppedHandler)animation_stopped, + }, + NULL /* callback data */); + animation_set_delay((Animation *)a_rev, 400); + animation_set_duration((Animation *)a_rev, DURATION); animation_set_reverse((Animation *)a_rev, true); GRect test_rect; property_animation_get_to_grect(a, &test_rect); APP_LOG(APP_LOG_LEVEL_DEBUG, "rect is %d, %d, %d, %d", test_rect.origin.x, test_rect.origin.y, - test_rect.size.w, test_rect.size.h); - + test_rect.size.w, test_rect.size.h); switch (click_recognizer_get_button_id(recognizer)) { case BUTTON_ID_UP: - animation_set_curve((Animation*) a, AnimationCurveEaseOut); - animation_set_curve((Animation*) a_rev, AnimationCurveEaseOut); + animation_set_curve((Animation *)a, AnimationCurveEaseOut); + animation_set_curve((Animation *)a_rev, AnimationCurveEaseOut); break; case BUTTON_ID_DOWN: - animation_set_curve((Animation*) a, AnimationCurveEaseIn); - animation_set_curve((Animation*) a_rev, AnimationCurveEaseIn); + animation_set_curve((Animation *)a, AnimationCurveEaseIn); + animation_set_curve((Animation *)a_rev, AnimationCurveEaseIn); break; default: case BUTTON_ID_SELECT: - animation_set_curve((Animation*) a, AnimationCurveEaseInOut); - animation_set_curve((Animation*) a_rev, AnimationCurveEaseInOut); + animation_set_curve((Animation *)a, AnimationCurveEaseInOut); + animation_set_curve((Animation *)a_rev, AnimationCurveEaseInOut); break; } @@ -141,12 +139,11 @@ static void click_handler(ClickRecognizerRef recognizer, Window *window) { animation_set_delay(&prop_animation->animation, 1000); */ - Animation *seq = animation_sequence_create((Animation *)a, (Animation *)a_rev, NULL); - PropertyAnimation *c = property_animation_create_layer_frame( - text_layer_get_layer(s_text_layer_b), &from_rect_b, &to_rect_b); - animation_set_duration((Animation*)c, DURATION); + PropertyAnimation *c = property_animation_create_layer_frame(text_layer_get_layer(s_text_layer_b), + &from_rect_b, &to_rect_b); + animation_set_duration((Animation *)c, DURATION); s_animation = animation_spawn_create(seq, (Animation *)c, prv_create_custom_animation()); @@ -154,15 +151,14 @@ static void click_handler(ClickRecognizerRef recognizer, Window *window) { } static void config_provider(Window *window) { - window_single_click_subscribe(BUTTON_ID_UP, (ClickHandler) click_handler); - window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler) click_handler); - window_single_click_subscribe(BUTTON_ID_DOWN, (ClickHandler) click_handler); + window_single_click_subscribe(BUTTON_ID_UP, (ClickHandler)click_handler); + window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler)click_handler); + window_single_click_subscribe(BUTTON_ID_DOWN, (ClickHandler)click_handler); } - static void init(void) { window = window_create(); - window_set_click_config_provider(window, (ClickConfigProvider) config_provider); + window_set_click_config_provider(window, (ClickConfigProvider)config_provider); window_stack_push(window, false); GRect from_rect_a = GRect(0, 0, 60, 60); @@ -179,26 +175,23 @@ static void init(void) { text_layer_set_text(s_text_layer_b, "Spawned"); layer_add_child(window_get_root_layer(window), text_layer_get_layer(s_text_layer_b)); - // Animate text layer a from top-left to bottom right and back - PropertyAnimation *a = property_animation_create_layer_frame( - text_layer_get_layer(s_text_layer_a), &from_rect_a, &to_rect_a); - animation_set_duration((Animation*)a, DURATION); + PropertyAnimation *a = property_animation_create_layer_frame(text_layer_get_layer(s_text_layer_a), + &from_rect_a, &to_rect_a); + animation_set_duration((Animation *)a, DURATION); PropertyAnimation *a_rev = property_animation_clone(a); - animation_set_delay((Animation*) a_rev, 400); - animation_set_duration((Animation*)a_rev, DURATION); - animation_set_reverse((Animation*) a_rev, true); + animation_set_delay((Animation *)a_rev, 400); + animation_set_duration((Animation *)a_rev, DURATION); + animation_set_reverse((Animation *)a_rev, true); Animation *seq = animation_sequence_create((Animation *)a, (Animation *)a_rev, NULL); - // Animate text layer b from top-right to bottom-left - PropertyAnimation *c = property_animation_create_layer_frame( - text_layer_get_layer(s_text_layer_b), &from_rect_b, &to_rect_b); - animation_set_duration((Animation*)c, DURATION); + PropertyAnimation *c = property_animation_create_layer_frame(text_layer_get_layer(s_text_layer_b), + &from_rect_b, &to_rect_b); + animation_set_duration((Animation *)c, DURATION); toggle = !toggle; - s_animation = animation_spawn_create(seq, (Animation *)c, prv_create_custom_animation(), NULL); animation_schedule(s_animation); } diff --git a/apps/samples/crash_demo/src/crash_demo.c b/apps/samples/crash_demo/src/crash_demo.c index aaf29a64dc..6bc109ba4c 100644 --- a/apps/samples/crash_demo/src/crash_demo.c +++ b/apps/samples/crash_demo/src/crash_demo.c @@ -11,20 +11,20 @@ typedef struct MainWindowData { static MainWindowData s_main_window_data; static void execute_gibberish_menu_cb(int index, void *context) { - int32_t gibberish[] = { 0, 0, 0, 0 }; - int8_t* gibberish_ptr = (int8_t*) gibberish; + int32_t gibberish[] = {0, 0, 0, 0}; + int8_t *gibberish_ptr = (int8_t *)gibberish; ((void (*)(void))gibberish_ptr + 1)(); } static void write_to_null_menu_cb(int index, void *context) { - int* null_ptr = NULL; + int *null_ptr = NULL; *null_ptr = 0xdeadbeef; } static void write_to_kernel_menu_cb(int index, void *context) { // The kernel ram is between 0x20000000 to 0x20018000 - int* kernel_ptr = (int*) 0x20010000; + int *kernel_ptr = (int *)0x20010000; *kernel_ptr = 0xdeadbeef; } @@ -51,7 +51,6 @@ static void trigger_loop_log_spam(int index, void *context) { } } - static void accel_data_handler(AccelData *data, uint32_t num_samples) { } @@ -66,19 +65,19 @@ static void trigger_to_app_event_flood(int index, void *context) { } static void trigger_double_free(int index, void *context) { - volatile int* storage = malloc(sizeof(int)); + volatile int *storage = malloc(sizeof(int)); *storage = 1337; - free((void*) storage); - free((void*) storage); + free((void *)storage); + free((void *)storage); } static void trigger_stack_overflow(int index, void *context) { - volatile int counter = (int) context; + volatile int counter = (int)context; if (counter > 300) { return; } ++counter; - trigger_stack_overflow(index, (void*) counter); + trigger_stack_overflow(index, (void *)counter); } static void window_load(Window *window) { @@ -86,46 +85,23 @@ static void window_load(Window *window) { GRect bounds = layer_get_bounds(window_layer); static const SimpleMenuItem menu_items[] = { - { - .title = "Execute gibberish", - .callback = execute_gibberish_menu_cb - }, { - .title = "Write to NULL", - .callback = write_to_null_menu_cb - }, { - .title = "Write to kernel", - .callback = write_to_kernel_menu_cb - }, { - .title = "Trigger applib assert", - .callback = trigger_applib_assert_cb - }, { - .title = "Infinite loop", - .callback = trigger_infinite_loop - }, { - .title = "Loop Log Spam", - .callback = trigger_loop_log_spam - }, { - .title = "To App Event Flood", - .callback = trigger_to_app_event_flood - }, { - .title = "Double Free", - .callback = trigger_double_free - }, { - .title = "Stack Overflow", - .callback = trigger_stack_overflow - }, { - .title = "Persist loop", - .callback = trigger_persist_loop - } + {.title = "Execute gibberish", .callback = execute_gibberish_menu_cb}, + {.title = "Write to NULL", .callback = write_to_null_menu_cb}, + {.title = "Write to kernel", .callback = write_to_kernel_menu_cb}, + {.title = "Trigger applib assert", .callback = trigger_applib_assert_cb}, + {.title = "Infinite loop", .callback = trigger_infinite_loop}, + {.title = "Loop Log Spam", .callback = trigger_loop_log_spam}, + {.title = "To App Event Flood", .callback = trigger_to_app_event_flood}, + {.title = "Double Free", .callback = trigger_double_free}, + {.title = "Stack Overflow", .callback = trigger_stack_overflow}, + {.title = "Persist loop", .callback = trigger_persist_loop} }; static const SimpleMenuSection sections[] = { - { - .items = menu_items, - .num_items = ARRAY_LENGTH(menu_items) - } + {.items = menu_items, .num_items = ARRAY_LENGTH(menu_items)} }; - s_main_window_data.menu_layer = simple_menu_layer_create(bounds, window, sections, ARRAY_LENGTH(sections), NULL); + s_main_window_data.menu_layer = + simple_menu_layer_create(bounds, window, sections, ARRAY_LENGTH(sections), NULL); layer_add_child(window_layer, simple_menu_layer_get_layer(s_main_window_data.menu_layer)); } @@ -137,10 +113,10 @@ static void window_unload(Window *window) { static void init(void) { Window *window = s_main_window_data.window; window = window_create(); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - .unload = window_unload, - }); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + .unload = window_unload, + }); const bool animated = true; window_stack_push(window, animated); } diff --git a/apps/samples/crash_demo_watchface/src/crash_demo_watchface.c b/apps/samples/crash_demo_watchface/src/crash_demo_watchface.c index 4e42fc421b..6381d3e0cf 100644 --- a/apps/samples/crash_demo_watchface/src/crash_demo_watchface.c +++ b/apps/samples/crash_demo_watchface/src/crash_demo_watchface.c @@ -16,8 +16,8 @@ static void prv_update_text(void) { } static void prv_execute_gibberish(void) { - int32_t gibberish[] = { 0, 0, 0, 0 }; - int8_t* gibberish_ptr = (int8_t*) gibberish; + int32_t gibberish[] = {0, 0, 0, 0}; + int8_t *gibberish_ptr = (int8_t *)gibberish; ((void (*)(void))gibberish_ptr + 1)(); } @@ -38,7 +38,7 @@ static void window_load(Window *window) { Layer *window_layer = window_get_root_layer(window); GRect bounds = layer_get_bounds(window_layer); - text_layer = text_layer_create((GRect) { .origin = { 0, 72 }, .size = { bounds.size.w, 20 } }); + text_layer = text_layer_create((GRect){.origin = {0, 72}, .size = {bounds.size.w, 20}}); text_layer_set_text_alignment(text_layer, GTextAlignmentCenter); prv_update_text(); layer_add_child(window_layer, text_layer_get_layer(text_layer)); @@ -50,10 +50,10 @@ static void window_unload(Window *window) { static void init(void) { window = window_create(); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - .unload = window_unload, - }); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + .unload = window_unload, + }); const bool animated = true; window_stack_push(window, animated); diff --git a/apps/samples/data_logging_spam/src/data_logging_spam.c b/apps/samples/data_logging_spam/src/data_logging_spam.c index 9f7ebcb837..d3688134b1 100644 --- a/apps/samples/data_logging_spam/src/data_logging_spam.c +++ b/apps/samples/data_logging_spam/src/data_logging_spam.c @@ -7,7 +7,7 @@ static void log_data(void *data) { DataLoggingSessionRef *session = data_logging_create(0, DATA_LOGGING_BYTE_ARRAY, 4, true); for (int i = 0; i < 32; ++i) { - uint32_t t = ((uint32_t) time(NULL)) + i; + uint32_t t = ((uint32_t)time(NULL)) + i; data_logging_log(session, &t, 1); } @@ -26,4 +26,3 @@ int main(void) { app_event_loop(); } - diff --git a/apps/samples/delayed_worker_crash/src/delayed_worker_crash.c b/apps/samples/delayed_worker_crash/src/delayed_worker_crash.c index 432a03034f..9a728bf12a 100644 --- a/apps/samples/delayed_worker_crash/src/delayed_worker_crash.c +++ b/apps/samples/delayed_worker_crash/src/delayed_worker_crash.c @@ -58,10 +58,10 @@ static void window_unload(Window *window) { static void init(void) { s_data.window = window_create(); window_set_click_config_provider(s_data.window, click_config_provider); - window_set_window_handlers(s_data.window, (WindowHandlers) { - .load = window_load, - .unload = window_unload, - }); + window_set_window_handlers(s_data.window, (WindowHandlers){ + .load = window_load, + .unload = window_unload, + }); const bool animated = true; window_stack_push(s_data.window, animated); } diff --git a/apps/samples/delayed_worker_crash/worker_src/delayed_worker_crash_worker.c b/apps/samples/delayed_worker_crash/worker_src/delayed_worker_crash_worker.c index 4662e9e8a7..a3ff27839d 100644 --- a/apps/samples/delayed_worker_crash/worker_src/delayed_worker_crash_worker.c +++ b/apps/samples/delayed_worker_crash/worker_src/delayed_worker_crash_worker.c @@ -7,7 +7,7 @@ static void worker_timer_callback(void *data) { // Free -1 to crash the worker - free((void *) -1); + free((void *)-1); } static void worker_init(void) { diff --git a/apps/samples/dictation_demo/src/dictation_demo.c b/apps/samples/dictation_demo/src/dictation_demo.c index be94efbd36..c34fcdfd58 100644 --- a/apps/samples/dictation_demo/src/dictation_demo.c +++ b/apps/samples/dictation_demo/src/dictation_demo.c @@ -63,9 +63,9 @@ static void prv_window_load(Window *window) { Layer *window_layer = window_get_root_layer(app_data->window); GRect bounds = layer_get_bounds(window_layer); - app_data->result_text = text_layer_create((GRect) { - .origin = { .x = 10, .y = 10}, - .size = { .w = bounds.size.w - 20, .h = bounds.size.h - 20 } + app_data->result_text = text_layer_create((GRect){ + .origin = {.x = 10, .y = 10}, + .size = {.w = bounds.size.w - 20, .h = bounds.size.h - 20} }); text_layer_set_text(app_data->result_text, "Press SELECT to start"); @@ -89,11 +89,11 @@ static void init(AppData *app_data) { app_data->window = window_create(); window_set_click_config_provider_with_context(app_data->window, prv_click_config_provider, - app_data); - window_set_window_handlers(app_data->window, (WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + app_data); + window_set_window_handlers(app_data->window, (WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); window_set_user_data(app_data->window, app_data); const bool animated = true; diff --git a/apps/samples/draw_lines/src/draw_lines.c b/apps/samples/draw_lines/src/draw_lines.c index e9284db1c4..30e38e8c1b 100644 --- a/apps/samples/draw_lines/src/draw_lines.c +++ b/apps/samples/draw_lines/src/draw_lines.c @@ -62,9 +62,9 @@ static void window_load(Window *window) { static void init(void) { __profiler_init(); window = window_create(); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - }); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + }); window_stack_push(window, true); } diff --git a/apps/samples/draw_text/src/draw_text.c b/apps/samples/draw_text/src/draw_text.c index 5615d35b52..f27b986a22 100644 --- a/apps/samples/draw_text/src/draw_text.c +++ b/apps/samples/draw_text/src/draw_text.c @@ -12,11 +12,12 @@ extern void __profiler_stop(void); #define ITERATIONS 100 static Window *window; -static const char *TEXT = "Lorem ipsum dolor sit amet, consectetur adipiscing "\ - "elit, sed do eiusmod tempor incididunt ut labore "\ - "et dolore magna aliqua. Ut enim ad minim veniam, "\ - "quis nostrud exercitation ullamco laboris nisi ut "\ - "aliquip ex ea commodo consequat."; +static const char *TEXT = + "Lorem ipsum dolor sit amet, consectetur adipiscing " + "elit, sed do eiusmod tempor incididunt ut labore " + "et dolore magna aliqua. Ut enim ad minim veniam, " + "quis nostrud exercitation ullamco laboris nisi ut " + "aliquip ex ea commodo consequat."; static void prv_update_proc(Layer *layer, GContext *ctx) { GRect bounds = layer_get_bounds(layer); @@ -24,9 +25,8 @@ static void prv_update_proc(Layer *layer, GContext *ctx) { __profiler_start(); for (int i = 0; i < ITERATIONS; ++i) { - graphics_draw_text(ctx, TEXT, fonts_get_system_font(FONT_KEY_GOTHIC_14), - bounds, GTextOverflowModeWordWrap, GTextAlignmentLeft, - NULL); + graphics_draw_text(ctx, TEXT, fonts_get_system_font(FONT_KEY_GOTHIC_14), bounds, + GTextOverflowModeWordWrap, GTextAlignmentLeft, NULL); } __profiler_stop(); APP_LOG(APP_LOG_LEVEL_INFO, "Draw Text"); @@ -41,9 +41,9 @@ static void window_load(Window *window) { static void init(void) { __profiler_init(); window = window_create(); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - }); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + }); window_stack_push(window, true); } diff --git a/apps/samples/fill_radial/src/fill_radial.c b/apps/samples/fill_radial/src/fill_radial.c index c79da4b34a..a6d9ccbdc0 100644 --- a/apps/samples/fill_radial/src/fill_radial.c +++ b/apps/samples/fill_radial/src/fill_radial.c @@ -70,9 +70,9 @@ static void window_load(Window *window) { static void init(void) { __profiler_init(); window = window_create(); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - }); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + }); window_stack_push(window, true); } diff --git a/apps/samples/fps_test/src/fps_test.c b/apps/samples/fps_test/src/fps_test.c index e44091d026..805035f153 100644 --- a/apps/samples/fps_test/src/fps_test.c +++ b/apps/samples/fps_test/src/fps_test.c @@ -77,8 +77,8 @@ static void prv_pop_all_windows_cb(void *cb_data) { APP_LOG(APP_LOG_LEVEL_INFO, "## %d frames rendered", (int)data->rendered_frames); if (time_rendered) { - int frame_period = time_rendered/(int64_t)data->rendered_frames; - int fps = (int64_t)data->rendered_frames*1000/time_rendered; + int frame_period = time_rendered / (int64_t)data->rendered_frames; + int fps = (int64_t)data->rendered_frames * 1000 / time_rendered; APP_LOG(APP_LOG_LEVEL_INFO, "## at %d FPS (%d ms/frame)", fps, frame_period); } @@ -86,21 +86,16 @@ static void prv_pop_all_windows_cb(void *cb_data) { } static const char *prv_row_texts[] = { - "Row 1", - "Row 2", - "Row 3", - "Row 4", - "Row 5", - "Row 6", + "Row 1", "Row 2", "Row 3", "Row 4", "Row 5", "Row 6", }; static uint16_t prv_get_num_rows(struct MenuLayer *menu_layer, uint16_t section_index, - void *callback_context) { + void *callback_context) { return ARRAY_LENGTH(prv_row_texts); } -static void prv_draw_row(GContext* ctx, const Layer *cell_layer, char const *title, - int16_t offset) { +static void prv_draw_row(GContext *ctx, const Layer *cell_layer, char const *title, + int16_t offset) { // mostly copied from menu_cell_basic_draw_with_value // (that unfortunately doesn't respect bounds.origin.x) const int16_t title_height = 24; @@ -113,28 +108,28 @@ static void prv_draw_row(GContext* ctx, const Layer *cell_layer, char const *tit const GFont title_font = fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD); if (title) { graphics_context_set_text_color(ctx, GColorWhite); - graphics_draw_text(ctx, title, title_font, box, - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, title, title_font, box, GTextOverflowModeFill, GTextAlignmentLeft, + NULL); } } -void prv_draw_row_1(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, - void *callback_context) { +void prv_draw_row_1(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *callback_context) { const char *title = prv_row_texts[cell_index->row]; GRect frame = layer_get_frame(cell_layer); - prv_draw_row(ctx, cell_layer, title, -frame.origin.y/4); + prv_draw_row(ctx, cell_layer, title, -frame.origin.y / 4); } -static void prv_draw_row_2(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, - void *callback_context) { +static void prv_draw_row_2(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *callback_context) { const char *title = prv_row_texts[cell_index->row]; GRect frame = layer_get_frame(cell_layer); GRect bounds = layer_get_bounds(cell_layer); - prv_draw_row(ctx, cell_layer, title, -frame.origin.y/4 + bounds.size.w); + prv_draw_row(ctx, cell_layer, title, -frame.origin.y / 4 + bounds.size.w); } static int16_t prv_get_separator_height(struct MenuLayer *menu_layer, MenuIndex *cell_index, - void *callback_context) { + void *callback_context) { return 0; } @@ -149,8 +144,8 @@ static void prv_window_update_proc(struct Layer *layer, GContext *ctx) { data->rendered_frames++; } -void prv_syncing_selection_changed(MenuLayer *menu_layer, MenuIndex old_index, - MenuIndex new_index, void *context) { +void prv_syncing_selection_changed(MenuLayer *menu_layer, MenuIndex old_index, MenuIndex new_index, + void *context) { ScrollLayer *scroll_layer = (ScrollLayer *)menu_layer; AppData *data = context; @@ -190,23 +185,25 @@ static void prv_window_load(Window *window) { const GRect menu_layer_rect = GRect(navbar_width, 0, full_rect.size.w - navbar_width, full_rect.size.h); data->action_list1 = menu_layer_create(menu_layer_rect); - menu_layer_set_callbacks(data->action_list1, data, (MenuLayerCallbacks){ - .get_num_rows = prv_get_num_rows, - .draw_row = prv_draw_row_1, - .get_separator_height = prv_get_separator_height, - }); + menu_layer_set_callbacks(data->action_list1, data, + (MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows, + .draw_row = prv_draw_row_1, + .get_separator_height = prv_get_separator_height, + }); // FIXME layer_set_hidden(&data->action_list1.inverter.layer, true); scroll_layer_set_shadow_hidden((ScrollLayer *)data->action_list1, true); layer_add_child(root_layer, menu_layer_get_layer(data->action_list1)); data->action_list2 = menu_layer_create(menu_layer_rect); - menu_layer_set_callbacks(data->action_list2, data, (MenuLayerCallbacks){ - .get_num_rows = prv_get_num_rows, - .draw_row = prv_draw_row_2, - .get_separator_height = prv_get_separator_height, - .selection_changed = prv_syncing_selection_changed, - }); + menu_layer_set_callbacks(data->action_list2, data, + (MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows, + .draw_row = prv_draw_row_2, + .get_separator_height = prv_get_separator_height, + .selection_changed = prv_syncing_selection_changed, + }); scroll_layer_set_shadow_hidden((ScrollLayer *)data->action_list2, true); menu_layer_set_click_config_onto_window(data->action_list2, window); layer_add_child(root_layer, menu_layer_get_layer(data->action_list2)); @@ -237,8 +234,8 @@ int main(void) { Layer *root_layer = window_get_root_layer(window); layer_set_update_proc(root_layer, prv_window_update_proc); window_set_window_handlers(window, (WindowHandlers){ - .load = prv_window_load, - }); + .load = prv_window_load, + }); window_stack_push(window, true); diff --git a/apps/samples/fps_test/src/test_bitmaps.h b/apps/samples/fps_test/src/test_bitmaps.h index 9a16ebe705..710c357e4c 100644 --- a/apps/samples/fps_test/src/test_bitmaps.h +++ b/apps/samples/fps_test/src/test_bitmaps.h @@ -11,1622 +11,3215 @@ // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_fps_background_pixels[] = { - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 0 - 16 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16 - 32 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 32 - 48 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 48 - 64 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 64 - 80 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 80 - 96 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 96 - 112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 112 - 128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 128 - 144 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 144 - 160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 160 - 176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 176 - 192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 192 - 208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 208 - 224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 224 - 240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 240 - 256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 256 - 272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 272 - 288 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 288 - 304 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 304 - 320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 320 - 336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 336 - 352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 352 - 368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 368 - 384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 384 - 400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 400 - 416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 416 - 432 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 432 - 448 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 448 - 464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 464 - 480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 480 - 496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 496 - 512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 512 - 528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 528 - 544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 544 - 560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 560 - 576 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 576 - 592 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 592 - 608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 608 - 624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 624 - 640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 640 - 656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 656 - 672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 672 - 688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 688 - 704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 704 - 720 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 720 - 736 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 736 - 752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 752 - 768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 768 - 784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 784 - 800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 800 - 816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 816 - 832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 832 - 848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 848 - 864 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 864 - 880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 880 - 896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 896 - 912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 912 - 928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 928 - 944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 944 - 960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 960 - 976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 976 - 992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 992 - 1008 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1008 - 1024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1024 - 1040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1040 - 1056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1056 - 1072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1072 - 1088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1088 - 1104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1104 - 1120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1120 - 1136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1136 - 1152 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1152 - 1168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1168 - 1184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1184 - 1200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1200 - 1216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1216 - 1232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1232 - 1248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1248 - 1264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1264 - 1280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1280 - 1296 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1296 - 1312 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1312 - 1328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1328 - 1344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1344 - 1360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1360 - 1376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1376 - 1392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1392 - 1408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1408 - 1424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1424 - 1440 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1440 - 1456 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1456 - 1472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1472 - 1488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1488 - 1504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1504 - 1520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1520 - 1536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1536 - 1552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1552 - 1568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1568 - 1584 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1584 - 1600 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1600 - 1616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1616 - 1632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1632 - 1648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1648 - 1664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1664 - 1680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1680 - 1696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1696 - 1712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1712 - 1728 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1728 - 1744 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1744 - 1760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1760 - 1776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1776 - 1792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1792 - 1808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1808 - 1824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1824 - 1840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1840 - 1856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1856 - 1872 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1872 - 1888 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1888 - 1904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1904 - 1920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1920 - 1936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1936 - 1952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1952 - 1968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1968 - 1984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1984 - 2000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2000 - 2016 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2016 - 2032 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2032 - 2048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2048 - 2064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2064 - 2080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2080 - 2096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2096 - 2112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2112 - 2128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2128 - 2144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2144 - 2160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2160 - 2176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2176 - 2192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2192 - 2208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2208 - 2224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2224 - 2240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2240 - 2256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2256 - 2272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2272 - 2288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2288 - 2304 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2304 - 2320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2320 - 2336 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2336 - 2352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2352 - 2368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2368 - 2384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2384 - 2400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2400 - 2416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2416 - 2432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2432 - 2448 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2448 - 2464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2464 - 2480 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2480 - 2496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2496 - 2512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2512 - 2528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2528 - 2544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2544 - 2560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2560 - 2576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2576 - 2592 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2592 - 2608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2608 - 2624 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2624 - 2640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2640 - 2656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2656 - 2672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2672 - 2688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2688 - 2704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2704 - 2720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2720 - 2736 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2736 - 2752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2752 - 2768 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2768 - 2784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2784 - 2800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2800 - 2816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2816 - 2832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2832 - 2848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2848 - 2864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2864 - 2880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2880 - 2896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2896 - 2912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2912 - 2928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2928 - 2944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2944 - 2960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2960 - 2976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2976 - 2992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2992 - 3008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3008 - 3024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3024 - 3040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3040 - 3056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3056 - 3072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3072 - 3088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3088 - 3104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3104 - 3120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3120 - 3136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3136 - 3152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3152 - 3168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3168 - 3184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3184 - 3200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3200 - 3216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3216 - 3232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3232 - 3248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3248 - 3264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3264 - 3280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3280 - 3296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3296 - 3312 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3312 - 3328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3328 - 3344 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3344 - 3360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3360 - 3376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3376 - 3392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3392 - 3408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3408 - 3424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3424 - 3440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3440 - 3456 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3456 - 3472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3472 - 3488 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3488 - 3504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3504 - 3520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3520 - 3536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3536 - 3552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3552 - 3568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3568 - 3584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3584 - 3600 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3600 - 3616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3616 - 3632 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3632 - 3648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3648 - 3664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3664 - 3680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3680 - 3696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3696 - 3712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3712 - 3728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3728 - 3744 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3744 - 3760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3760 - 3776 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3776 - 3792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3792 - 3808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3808 - 3824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3824 - 3840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3840 - 3856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3856 - 3872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3872 - 3888 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3888 - 3904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3904 - 3920 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3920 - 3936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3936 - 3952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3952 - 3968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3968 - 3984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3984 - 4000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4000 - 4016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4016 - 4032 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4032 - 4048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4048 - 4064 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4064 - 4080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4080 - 4096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4096 - 4112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4112 - 4128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4128 - 4144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4144 - 4160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4160 - 4176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4176 - 4192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4192 - 4208 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4208 - 4224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4224 - 4240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4240 - 4256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4256 - 4272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4272 - 4288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4288 - 4304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4304 - 4320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4320 - 4336 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4336 - 4352 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4352 - 4368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4368 - 4384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4384 - 4400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4400 - 4416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4416 - 4432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4432 - 4448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4448 - 4464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4464 - 4480 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4480 - 4496 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4496 - 4512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4512 - 4528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4528 - 4544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4544 - 4560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4560 - 4576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4576 - 4592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4592 - 4608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4608 - 4624 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4624 - 4640 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4640 - 4656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4656 - 4672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4672 - 4688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4688 - 4704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4704 - 4720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4720 - 4736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4736 - 4752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4752 - 4768 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4768 - 4784 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4784 - 4800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4800 - 4816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4816 - 4832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4832 - 4848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4848 - 4864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4864 - 4880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4880 - 4896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4896 - 4912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4912 - 4928 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4928 - 4944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4944 - 4960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4960 - 4976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4976 - 4992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4992 - 5008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5008 - 5024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5024 - 5040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5040 - 5056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5056 - 5072 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5072 - 5088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5088 - 5104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5104 - 5120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5120 - 5136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5136 - 5152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5152 - 5168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5168 - 5184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5184 - 5200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5200 - 5216 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5216 - 5232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5232 - 5248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5248 - 5264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5264 - 5280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5280 - 5296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5296 - 5312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5312 - 5328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5328 - 5344 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5344 - 5360 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5360 - 5376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5376 - 5392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5392 - 5408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5408 - 5424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5424 - 5440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5440 - 5456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5456 - 5472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5472 - 5488 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5488 - 5504 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5504 - 5520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5520 - 5536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5536 - 5552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5552 - 5568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5568 - 5584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5584 - 5600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5600 - 5616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5616 - 5632 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5632 - 5648 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5648 - 5664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5664 - 5680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5680 - 5696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5696 - 5712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5712 - 5728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5728 - 5744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5744 - 5760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5760 - 5776 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5776 - 5792 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5792 - 5808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5808 - 5824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5824 - 5840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5840 - 5856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5856 - 5872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5872 - 5888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5888 - 5904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5904 - 5920 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5920 - 5936 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5936 - 5952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5952 - 5968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5968 - 5984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5984 - 6000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6000 - 6016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6016 - 6032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6032 - 6048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6048 - 6064 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6064 - 6080 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6080 - 6096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6096 - 6112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6112 - 6128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6128 - 6144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6144 - 6160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6160 - 6176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6176 - 6192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6192 - 6208 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6208 - 6224 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6224 - 6240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6240 - 6256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6256 - 6272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6272 - 6288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6288 - 6304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6304 - 6320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6320 - 6336 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6336 - 6352 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6352 - 6368 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6368 - 6384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6384 - 6400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6400 - 6416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6416 - 6432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6432 - 6448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6448 - 6464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6464 - 6480 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6480 - 6496 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6496 - 6512 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6512 - 6528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6528 - 6544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6544 - 6560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6560 - 6576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6576 - 6592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6592 - 6608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6608 - 6624 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6624 - 6640 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6640 - 6656 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6656 - 6672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6672 - 6688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6688 - 6704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6704 - 6720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6720 - 6736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6736 - 6752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6752 - 6768 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6768 - 6784 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6784 - 6800 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6800 - 6816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6816 - 6832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6832 - 6848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6848 - 6864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6864 - 6880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6880 - 6896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6896 - 6912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6912 - 6928 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6928 - 6944 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6944 - 6960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6960 - 6976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6976 - 6992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6992 - 7008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7008 - 7024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7024 - 7040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7040 - 7056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7056 - 7072 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7072 - 7088 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7088 - 7104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7104 - 7120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7120 - 7136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7136 - 7152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7152 - 7168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7168 - 7184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7184 - 7200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7200 - 7216 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7216 - 7232 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7232 - 7248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7248 - 7264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7264 - 7280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7280 - 7296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7296 - 7312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7312 - 7328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7328 - 7344 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7344 - 7360 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7360 - 7376 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7376 - 7392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7392 - 7408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7408 - 7424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7424 - 7440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7440 - 7456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7456 - 7472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7472 - 7488 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7488 - 7504 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7504 - 7520 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7520 - 7536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7536 - 7552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7552 - 7568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7568 - 7584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7584 - 7600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7600 - 7616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7616 - 7632 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7632 - 7648 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7648 - 7664 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7664 - 7680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7680 - 7696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7696 - 7712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7712 - 7728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7728 - 7744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7744 - 7760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7760 - 7776 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7776 - 7792 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7792 - 7808 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7808 - 7824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7824 - 7840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7840 - 7856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7856 - 7872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7872 - 7888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7888 - 7904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7904 - 7920 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7920 - 7936 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7936 - 7952 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7952 - 7968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7968 - 7984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7984 - 8000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8000 - 8016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8016 - 8032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8032 - 8048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8048 - 8064 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8064 - 8080 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8080 - 8096 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8096 - 8112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8112 - 8128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8128 - 8144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8144 - 8160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8160 - 8176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8176 - 8192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8192 - 8208 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8208 - 8224 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8224 - 8240 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8240 - 8256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8256 - 8272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8272 - 8288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8288 - 8304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8304 - 8320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8320 - 8336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8336 - 8352 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8352 - 8368 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8368 - 8384 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8384 - 8400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8400 - 8416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8416 - 8432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8432 - 8448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8448 - 8464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8464 - 8480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8480 - 8496 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8496 - 8512 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8512 - 8528 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8528 - 8544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8544 - 8560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8560 - 8576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8576 - 8592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8592 - 8608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8608 - 8624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8624 - 8640 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8640 - 8656 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8656 - 8672 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8672 - 8688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8688 - 8704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8704 - 8720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8720 - 8736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8736 - 8752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8752 - 8768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8768 - 8784 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8784 - 8800 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8800 - 8816 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8816 - 8832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8832 - 8848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8848 - 8864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8864 - 8880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8880 - 8896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8896 - 8912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8912 - 8928 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8928 - 8944 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8944 - 8960 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8960 - 8976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8976 - 8992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8992 - 9008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9008 - 9024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9024 - 9040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9040 - 9056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9056 - 9072 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9072 - 9088 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9088 - 9104 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9104 - 9120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9120 - 9136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9136 - 9152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9152 - 9168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9168 - 9184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9184 - 9200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9200 - 9216 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9216 - 9232 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9232 - 9248 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9248 - 9264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9264 - 9280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9280 - 9296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9296 - 9312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9312 - 9328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9328 - 9344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9344 - 9360 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9360 - 9376 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9376 - 9392 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9392 - 9408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9408 - 9424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9424 - 9440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9440 - 9456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9456 - 9472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9472 - 9488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9488 - 9504 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9504 - 9520 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9520 - 9536 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9536 - 9552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9552 - 9568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9568 - 9584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9584 - 9600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9600 - 9616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9616 - 9632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9632 - 9648 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9648 - 9664 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9664 - 9680 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9680 - 9696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9696 - 9712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9712 - 9728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9728 - 9744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9744 - 9760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9760 - 9776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9776 - 9792 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9792 - 9808 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9808 - 9824 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9824 - 9840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9840 - 9856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9856 - 9872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9872 - 9888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9888 - 9904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9904 - 9920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9920 - 9936 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9936 - 9952 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9952 - 9968 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9968 - 9984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9984 - 10000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10000 - 10016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10016 - 10032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10032 - 10048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10048 - 10064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10064 - 10080 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10080 - 10096 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10096 - 10112 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10112 - 10128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10128 - 10144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10144 - 10160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10160 - 10176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10176 - 10192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10192 - 10208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10208 - 10224 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10224 - 10240 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10240 - 10256 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10256 - 10272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10272 - 10288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10288 - 10304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10304 - 10320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10320 - 10336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10336 - 10352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10352 - 10368 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10368 - 10384 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10384 - 10400 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10400 - 10416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10416 - 10432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10432 - 10448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10448 - 10464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10464 - 10480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10480 - 10496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10496 - 10512 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10512 - 10528 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10528 - 10544 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10544 - 10560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10560 - 10576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10576 - 10592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10592 - 10608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10608 - 10624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10624 - 10640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10640 - 10656 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10656 - 10672 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10672 - 10688 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10688 - 10704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10704 - 10720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10720 - 10736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10736 - 10752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10752 - 10768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10768 - 10784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10784 - 10800 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10800 - 10816 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10816 - 10832 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10832 - 10848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10848 - 10864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10864 - 10880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10880 - 10896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10896 - 10912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10912 - 10928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10928 - 10944 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10944 - 10960 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10960 - 10976 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10976 - 10992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10992 - 11008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11008 - 11024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11024 - 11040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11040 - 11056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11056 - 11072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11072 - 11088 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11088 - 11104 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11104 - 11120 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11120 - 11136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11136 - 11152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11152 - 11168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11168 - 11184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11184 - 11200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11200 - 11216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11216 - 11232 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11232 - 11248 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11248 - 11264 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11264 - 11280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11280 - 11296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11296 - 11312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11312 - 11328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11328 - 11344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11344 - 11360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11360 - 11376 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11376 - 11392 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11392 - 11408 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11408 - 11424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11424 - 11440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11440 - 11456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11456 - 11472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11472 - 11488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11488 - 11504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11504 - 11520 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11520 - 11536 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11536 - 11552 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11552 - 11568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11568 - 11584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11584 - 11600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11600 - 11616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11616 - 11632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11632 - 11648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11648 - 11664 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11664 - 11680 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11680 - 11696 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11696 - 11712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11712 - 11728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11728 - 11744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11744 - 11760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11760 - 11776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11776 - 11792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11792 - 11808 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11808 - 11824 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11824 - 11840 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11840 - 11856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11856 - 11872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11872 - 11888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11888 - 11904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11904 - 11920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11920 - 11936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11936 - 11952 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11952 - 11968 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11968 - 11984 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11984 - 12000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12000 - 12016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12016 - 12032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12032 - 12048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12048 - 12064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12064 - 12080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12080 - 12096 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12096 - 12112 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12112 - 12128 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12128 - 12144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12144 - 12160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12160 - 12176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12176 - 12192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12192 - 12208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12208 - 12224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12224 - 12240 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12240 - 12256 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12256 - 12272 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12272 - 12288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12288 - 12304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12304 - 12320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12320 - 12336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12336 - 12352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12352 - 12368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12368 - 12384 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12384 - 12400 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12400 - 12416 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12416 - 12432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12432 - 12448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12448 - 12464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12464 - 12480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12480 - 12496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12496 - 12512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12512 - 12528 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12528 - 12544 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12544 - 12560 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12560 - 12576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12576 - 12592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12592 - 12608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12608 - 12624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12624 - 12640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12640 - 12656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12656 - 12672 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12672 - 12688 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12688 - 12704 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12704 - 12720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12720 - 12736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12736 - 12752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12752 - 12768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12768 - 12784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12784 - 12800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12800 - 12816 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12816 - 12832 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12832 - 12848 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12848 - 12864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12864 - 12880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12880 - 12896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12896 - 12912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12912 - 12928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12928 - 12944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12944 - 12960 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12960 - 12976 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12976 - 12992 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12992 - 13008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13008 - 13024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13024 - 13040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13040 - 13056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13056 - 13072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13072 - 13088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13088 - 13104 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13104 - 13120 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13120 - 13136 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13136 - 13152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13152 - 13168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13168 - 13184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13184 - 13200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13200 - 13216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13216 - 13232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13232 - 13248 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13248 - 13264 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13264 - 13280 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13280 - 13296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13296 - 13312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13312 - 13328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13328 - 13344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13344 - 13360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13360 - 13376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13376 - 13392 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13392 - 13408 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13408 - 13424 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13424 - 13440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13440 - 13456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13456 - 13472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13472 - 13488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13488 - 13504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13504 - 13520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13520 - 13536 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13536 - 13552 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13552 - 13568 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13568 - 13584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13584 - 13600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13600 - 13616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13616 - 13632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13632 - 13648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13648 - 13664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13664 - 13680 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13680 - 13696 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13696 - 13712 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13712 - 13728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13728 - 13744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13744 - 13760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13760 - 13776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13776 - 13792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13792 - 13808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13808 - 13824 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13824 - 13840 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13840 - 13856 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13856 - 13872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13872 - 13888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13888 - 13904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13904 - 13920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13920 - 13936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13936 - 13952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13952 - 13968 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13968 - 13984 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13984 - 14000 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14000 - 14016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14016 - 14032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14032 - 14048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14048 - 14064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14064 - 14080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14080 - 14096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14096 - 14112 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14112 - 14128 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14128 - 14144 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14144 - 14160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14160 - 14176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14176 - 14192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14192 - 14208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14208 - 14224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14224 - 14240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14240 - 14256 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14256 - 14272 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14272 - 14288 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14288 - 14304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14304 - 14320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14320 - 14336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14336 - 14352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14352 - 14368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14368 - 14384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14384 - 14400 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14400 - 14416 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14416 - 14432 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14432 - 14448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14448 - 14464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14464 - 14480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14480 - 14496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14496 - 14512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14512 - 14528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14528 - 14544 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14544 - 14560 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14560 - 14576 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14576 - 14592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14592 - 14608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14608 - 14624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14624 - 14640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14640 - 14656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14656 - 14672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14672 - 14688 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14688 - 14704 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14704 - 14720 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14720 - 14736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14736 - 14752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14752 - 14768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14768 - 14784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14784 - 14800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14800 - 14816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14816 - 14832 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14832 - 14848 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14848 - 14864 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14864 - 14880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14880 - 14896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14896 - 14912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14912 - 14928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14928 - 14944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14944 - 14960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14960 - 14976 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14976 - 14992 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14992 - 15008 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15008 - 15024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15024 - 15040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15040 - 15056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15056 - 15072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15072 - 15088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15088 - 15104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15104 - 15120 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15120 - 15136 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15136 - 15152 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15152 - 15168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15168 - 15184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15184 - 15200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15200 - 15216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15216 - 15232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15232 - 15248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15248 - 15264 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15264 - 15280 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15280 - 15296 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15296 - 15312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15312 - 15328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15328 - 15344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15344 - 15360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15360 - 15376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15376 - 15392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15392 - 15408 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15408 - 15424 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15424 - 15440 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15440 - 15456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15456 - 15472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15472 - 15488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15488 - 15504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15504 - 15520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15520 - 15536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15536 - 15552 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15552 - 15568 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15568 - 15584 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15584 - 15600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15600 - 15616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15616 - 15632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15632 - 15648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15648 - 15664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15664 - 15680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15680 - 15696 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15696 - 15712 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15712 - 15728 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15728 - 15744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15744 - 15760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15760 - 15776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15776 - 15792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15792 - 15808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15808 - 15824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15824 - 15840 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15840 - 15856 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15856 - 15872 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15872 - 15888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15888 - 15904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15904 - 15920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15920 - 15936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15936 - 15952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15952 - 15968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15968 - 15984 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15984 - 16000 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16000 - 16016 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16016 - 16032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16032 - 16048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16048 - 16064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16064 - 16080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16080 - 16096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16096 - 16112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16112 - 16128 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16128 - 16144 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16144 - 16160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16160 - 16176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16176 - 16192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16192 - 16208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16208 - 16224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16224 - 16240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16240 - 16256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16256 - 16272 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16272 - 16288 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16288 - 16304 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16304 - 16320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16320 - 16336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16336 - 16352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16352 - 16368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16368 - 16384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16384 - 16400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16400 - 16416 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16416 - 16432 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16432 - 16448 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16448 - 16464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16464 - 16480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16480 - 16496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16496 - 16512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16512 - 16528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16528 - 16544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16544 - 16560 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16560 - 16576 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16576 - 16592 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16592 - 16608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16608 - 16624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16624 - 16640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16640 - 16656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16656 - 16672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16672 - 16688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16688 - 16704 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16704 - 16720 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16720 - 16736 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16736 - 16752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16752 - 16768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16768 - 16784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16784 - 16800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16800 - 16816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16816 - 16832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16832 - 16848 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16848 - 16864 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16864 - 16880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16880 - 16896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16896 - 16912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16912 - 16928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16928 - 16944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16944 - 16960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16960 - 16976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16976 - 16992 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16992 - 17008 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17008 - 17024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17024 - 17040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17040 - 17056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17056 - 17072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17072 - 17088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17088 - 17104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17104 - 17120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17120 - 17136 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17136 - 17152 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17152 - 17168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17168 - 17184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17184 - 17200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17200 - 17216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17216 - 17232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17232 - 17248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17248 - 17264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17264 - 17280 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17280 - 17296 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17296 - 17312 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17312 - 17328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17328 - 17344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17344 - 17360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17360 - 17376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17376 - 17392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17392 - 17408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17408 - 17424 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17424 - 17440 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17440 - 17456 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17456 - 17472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17472 - 17488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17488 - 17504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17504 - 17520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17520 - 17536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17536 - 17552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17552 - 17568 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17568 - 17584 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17584 - 17600 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17600 - 17616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17616 - 17632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17632 - 17648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17648 - 17664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17664 - 17680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17680 - 17696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17696 - 17712 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17712 - 17728 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17728 - 17744 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17744 - 17760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17760 - 17776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17776 - 17792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17792 - 17808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17808 - 17824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17824 - 17840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17840 - 17856 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17856 - 17872 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17872 - 17888 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17888 - 17904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17904 - 17920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17920 - 17936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17936 - 17952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17952 - 17968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17968 - 17984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17984 - 18000 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18000 - 18016 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18016 - 18032 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18032 - 18048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18048 - 18064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18064 - 18080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18080 - 18096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18096 - 18112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18112 - 18128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18128 - 18144 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18144 - 18160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18160 - 18176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18176 - 18192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18192 - 18208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18208 - 18224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18224 - 18240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18240 - 18256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18256 - 18272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18272 - 18288 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18288 - 18304 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18304 - 18320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18320 - 18336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18336 - 18352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18352 - 18368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18368 - 18384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18384 - 18400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18400 - 18416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18416 - 18432 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18432 - 18448 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18448 - 18464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18464 - 18480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18480 - 18496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18496 - 18512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18512 - 18528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18528 - 18544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18544 - 18560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18560 - 18576 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18576 - 18592 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18592 - 18608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18608 - 18624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18624 - 18640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18640 - 18656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18656 - 18672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18672 - 18688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18688 - 18704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18704 - 18720 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18720 - 18736 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18736 - 18752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18752 - 18768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18768 - 18784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18784 - 18800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18800 - 18816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18816 - 18832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18832 - 18848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18848 - 18864 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18864 - 18880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18880 - 18896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18896 - 18912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18912 - 18928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18928 - 18944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18944 - 18960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18960 - 18976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18976 - 18992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18992 - 19008 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19008 - 19024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19024 - 19040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19040 - 19056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19056 - 19072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19072 - 19088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19088 - 19104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19104 - 19120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19120 - 19136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19136 - 19152 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19152 - 19168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19168 - 19184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19184 - 19200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19200 - 19216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19216 - 19232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19232 - 19248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19248 - 19264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19264 - 19280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19280 - 19296 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19296 - 19312 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19312 - 19328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19328 - 19344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19344 - 19360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19360 - 19376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19376 - 19392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19392 - 19408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19408 - 19424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19424 - 19440 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19440 - 19456 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19456 - 19472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19472 - 19488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19488 - 19504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19504 - 19520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19520 - 19536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19536 - 19552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19552 - 19568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19568 - 19584 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19584 - 19600 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19600 - 19616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19616 - 19632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19632 - 19648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19648 - 19664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19664 - 19680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19680 - 19696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19696 - 19712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19712 - 19728 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19728 - 19744 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19744 - 19760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19760 - 19776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19776 - 19792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19792 - 19808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19808 - 19824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19824 - 19840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19840 - 19856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19856 - 19872 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19872 - 19888 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19888 - 19904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19904 - 19920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19920 - 19936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19936 - 19952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19952 - 19968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19968 - 19984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19984 - 20000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20000 - 20016 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20016 - 20032 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20032 - 20048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20048 - 20064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20064 - 20080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20080 - 20096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20096 - 20112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20112 - 20128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20128 - 20144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20144 - 20160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20160 - 20176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20176 - 20192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20192 - 20208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20208 - 20224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20224 - 20240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20240 - 20256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20256 - 20272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20272 - 20288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20288 - 20304 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20304 - 20320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20320 - 20336 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20336 - 20352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20352 - 20368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20368 - 20384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20384 - 20400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20400 - 20416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20416 - 20432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20432 - 20448 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20448 - 20464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20464 - 20480 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20480 - 20496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20496 - 20512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20512 - 20528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20528 - 20544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20544 - 20560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20560 - 20576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20576 - 20592 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20592 - 20608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20608 - 20624 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20624 - 20640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20640 - 20656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20656 - 20672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20672 - 20688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20688 - 20704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20704 - 20720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20720 - 20736 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20736 - 20752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20752 - 20768 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20768 - 20784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20784 - 20800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20800 - 20816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20816 - 20832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20832 - 20848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20848 - 20864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20864 - 20880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20880 - 20896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20896 - 20912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20912 - 20928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20928 - 20944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20944 - 20960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20960 - 20976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20976 - 20992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20992 - 21008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21008 - 21024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21024 - 21040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21040 - 21056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21056 - 21072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21072 - 21088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21088 - 21104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21104 - 21120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21120 - 21136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21136 - 21152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21152 - 21168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21168 - 21184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21184 - 21200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21200 - 21216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21216 - 21232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21232 - 21248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21248 - 21264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21264 - 21280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21280 - 21296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21296 - 21312 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21312 - 21328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21328 - 21344 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21344 - 21360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21360 - 21376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21376 - 21392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21392 - 21408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21408 - 21424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21424 - 21440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21440 - 21456 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21456 - 21472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21472 - 21488 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21488 - 21504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21504 - 21520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21520 - 21536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21536 - 21552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21552 - 21568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21568 - 21584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21584 - 21600 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21600 - 21616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21616 - 21632 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21632 - 21648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21648 - 21664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21664 - 21680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21680 - 21696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21696 - 21712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21712 - 21728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21728 - 21744 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21744 - 21760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21760 - 21776 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21776 - 21792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21792 - 21808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21808 - 21824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21824 - 21840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21840 - 21856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21856 - 21872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21872 - 21888 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21888 - 21904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21904 - 21920 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21920 - 21936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21936 - 21952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21952 - 21968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21968 - 21984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21984 - 22000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22000 - 22016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22016 - 22032 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22032 - 22048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22048 - 22064 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22064 - 22080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22080 - 22096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22096 - 22112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22112 - 22128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22128 - 22144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22144 - 22160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22160 - 22176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22176 - 22192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22192 - 22208 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22208 - 22224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22224 - 22240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22240 - 22256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22256 - 22272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22272 - 22288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22288 - 22304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22304 - 22320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22320 - 22336 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22336 - 22352 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22352 - 22368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22368 - 22384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22384 - 22400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22400 - 22416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22416 - 22432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22432 - 22448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22448 - 22464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22464 - 22480 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22480 - 22496 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22496 - 22512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22512 - 22528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22528 - 22544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22544 - 22560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22560 - 22576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22576 - 22592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22592 - 22608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22608 - 22624 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22624 - 22640 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22640 - 22656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22656 - 22672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22672 - 22688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22688 - 22704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22704 - 22720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22720 - 22736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22736 - 22752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22752 - 22768 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22768 - 22784 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22784 - 22800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22800 - 22816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22816 - 22832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22832 - 22848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22848 - 22864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22864 - 22880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22880 - 22896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22896 - 22912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22912 - 22928 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22928 - 22944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22944 - 22960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22960 - 22976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22976 - 22992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22992 - 23008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23008 - 23024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23024 - 23040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23040 - 23056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23056 - 23072 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23072 - 23088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23088 - 23104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23104 - 23120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23120 - 23136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23136 - 23152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23152 - 23168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23168 - 23184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23184 - 23200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23200 - 23216 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23216 - 23232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23232 - 23248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23248 - 23264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23264 - 23280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23280 - 23296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23296 - 23312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23312 - 23328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23328 - 23344 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23344 - 23360 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23360 - 23376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23376 - 23392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23392 - 23408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23408 - 23424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23424 - 23440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23440 - 23456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23456 - 23472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23472 - 23488 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23488 - 23504 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23504 - 23520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23520 - 23536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23536 - 23552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23552 - 23568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23568 - 23584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23584 - 23600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23600 - 23616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23616 - 23632 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23632 - 23648 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23648 - 23664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23664 - 23680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23680 - 23696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23696 - 23712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23712 - 23728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23728 - 23744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23744 - 23760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23760 - 23776 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23776 - 23792 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23792 - 23808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23808 - 23824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23824 - 23840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23840 - 23856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23856 - 23872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23872 - 23888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23888 - 23904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23904 - 23920 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23920 - 23936 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23936 - 23952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23952 - 23968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23968 - 23984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23984 - 24000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24000 - 24016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24016 - 24032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24032 - 24048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 24048 - 24064 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 24064 - 24080 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24080 - 24096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24096 - 24112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24112 - 24128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24128 - 24144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24144 - 24160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24160 - 24176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0 + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 0 - 16 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16 - 32 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 32 - 48 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 48 - 64 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 64 - 80 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 80 - 96 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 96 - 112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 112 - 128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 128 - 144 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 144 - 160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 160 - 176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 176 - 192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 192 - 208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 208 - 224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 224 - 240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 240 - 256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 256 - 272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 272 - 288 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 288 - 304 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 304 - 320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 320 - 336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 336 - 352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 352 - 368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 368 - 384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 384 - 400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 400 - 416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 416 - 432 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 432 - 448 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 448 - 464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 464 - 480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 480 - 496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 496 - 512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 512 - 528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 528 - 544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 544 - 560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 560 - 576 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 576 - 592 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 592 - 608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 608 - 624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 624 - 640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 640 - 656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 656 - 672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 672 - 688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 688 - 704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 704 - 720 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 720 - 736 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 736 - 752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 752 - 768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 768 - 784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 784 - 800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 800 - 816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 816 - 832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 832 - 848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 848 - 864 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 864 - 880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 880 - 896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 896 - 912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 912 - 928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 928 - 944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 944 - 960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 960 - 976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 976 - 992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 992 - 1008 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1008 - 1024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1024 - 1040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1040 - 1056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1056 - 1072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1072 - 1088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1088 - 1104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1104 - 1120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1120 - 1136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1136 - 1152 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1152 - 1168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1168 - 1184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1184 - 1200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1200 - 1216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1216 - 1232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1232 - 1248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1248 - 1264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1264 - 1280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1280 - 1296 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1296 - 1312 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1312 - 1328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1328 - 1344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1344 - 1360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1360 - 1376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1376 - 1392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1392 - 1408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1408 - 1424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1424 - 1440 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1440 - 1456 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1456 - 1472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1472 - 1488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1488 - 1504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1504 - 1520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1520 - 1536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1536 - 1552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1552 - 1568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1568 - 1584 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1584 - 1600 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1600 - 1616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1616 - 1632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1632 - 1648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1648 - 1664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1664 - 1680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1680 - 1696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1696 - 1712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1712 - 1728 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1728 - 1744 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1744 - 1760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1760 - 1776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1776 - 1792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1792 - 1808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1808 - 1824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1824 - 1840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1840 - 1856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1856 - 1872 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1872 - 1888 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1888 - 1904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1904 - 1920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1920 - 1936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1936 - 1952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1952 - 1968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1968 - 1984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1984 - 2000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2000 - 2016 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2016 - 2032 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2032 - 2048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2048 - 2064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2064 - 2080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2080 - 2096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2096 - 2112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2112 - 2128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2128 - 2144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2144 - 2160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2160 - 2176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2176 - 2192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2192 - 2208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2208 - 2224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2224 - 2240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2240 - 2256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2256 - 2272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2272 - 2288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2288 - 2304 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2304 - 2320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2320 - 2336 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2336 - 2352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2352 - 2368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2368 - 2384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2384 - 2400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2400 - 2416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2416 - 2432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2432 - 2448 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2448 - 2464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2464 - 2480 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2480 - 2496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2496 - 2512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2512 - 2528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2528 - 2544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2544 - 2560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2560 - 2576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2576 - 2592 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2592 - 2608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2608 - 2624 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2624 - 2640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2640 - 2656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2656 - 2672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2672 - 2688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2688 - 2704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2704 - 2720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2720 - 2736 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2736 - 2752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2752 - 2768 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2768 - 2784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2784 - 2800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2800 - 2816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2816 - 2832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2832 - 2848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2848 - 2864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2864 - 2880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2880 - 2896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2896 - 2912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2912 - 2928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2928 - 2944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2944 - 2960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2960 - 2976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2976 - 2992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2992 - 3008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3008 - 3024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3024 - 3040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3040 - 3056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3056 - 3072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3072 - 3088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3088 - 3104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3104 - 3120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3120 - 3136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3136 - 3152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3152 - 3168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3168 - 3184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3184 - 3200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3200 - 3216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3216 - 3232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3232 - 3248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3248 - 3264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3264 - 3280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3280 - 3296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3296 - 3312 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3312 - 3328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3328 - 3344 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3344 - 3360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3360 - 3376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3376 - 3392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3392 - 3408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3408 - 3424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3424 - 3440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3440 - 3456 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3456 - 3472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3472 - 3488 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3488 - 3504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3504 - 3520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3520 - 3536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3536 - 3552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3552 - 3568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3568 - 3584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3584 - 3600 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3600 - 3616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3616 - 3632 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3632 - 3648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3648 - 3664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3664 - 3680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3680 - 3696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3696 - 3712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3712 - 3728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3728 - 3744 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3744 - 3760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3760 - 3776 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3776 - 3792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3792 - 3808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3808 - 3824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3824 - 3840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3840 - 3856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3856 - 3872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3872 - 3888 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3888 - 3904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3904 - 3920 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3920 - 3936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3936 - 3952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3952 - 3968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3968 - 3984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3984 - 4000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4000 - 4016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4016 - 4032 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4032 - 4048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4048 - 4064 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4064 - 4080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4080 - 4096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4096 - 4112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4112 - 4128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4128 - 4144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4144 - 4160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4160 - 4176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4176 - 4192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4192 - 4208 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4208 - 4224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4224 - 4240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4240 - 4256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4256 - 4272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4272 - 4288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4288 - 4304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4304 - 4320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4320 - 4336 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4336 - 4352 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4352 - 4368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4368 - 4384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4384 - 4400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4400 - 4416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4416 - 4432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4432 - 4448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4448 - 4464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4464 - 4480 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4480 - 4496 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4496 - 4512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4512 - 4528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4528 - 4544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4544 - 4560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4560 - 4576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4576 - 4592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4592 - 4608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4608 - 4624 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4624 - 4640 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4640 - 4656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4656 - 4672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4672 - 4688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4688 - 4704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4704 - 4720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4720 - 4736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4736 - 4752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4752 - 4768 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4768 - 4784 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4784 - 4800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4800 - 4816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4816 - 4832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4832 - 4848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4848 - 4864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4864 - 4880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4880 - 4896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4896 - 4912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4912 - 4928 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4928 - 4944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4944 - 4960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4960 - 4976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4976 - 4992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4992 - 5008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5008 - 5024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5024 - 5040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5040 - 5056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5056 - 5072 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5072 - 5088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5088 - 5104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5104 - 5120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5120 - 5136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5136 - 5152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5152 - 5168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5168 - 5184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5184 - 5200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5200 - 5216 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5216 - 5232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5232 - 5248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5248 - 5264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5264 - 5280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5280 - 5296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5296 - 5312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5312 - 5328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5328 - 5344 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5344 - 5360 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5360 - 5376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5376 - 5392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5392 - 5408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5408 - 5424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5424 - 5440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5440 - 5456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5456 - 5472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5472 - 5488 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5488 - 5504 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5504 - 5520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5520 - 5536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5536 - 5552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5552 - 5568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5568 - 5584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5584 - 5600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5600 - 5616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5616 - 5632 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5632 - 5648 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5648 - 5664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5664 - 5680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5680 - 5696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5696 - 5712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5712 - 5728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5728 - 5744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5744 - 5760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5760 - 5776 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5776 - 5792 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5792 - 5808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5808 - 5824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5824 - 5840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5840 - 5856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5856 - 5872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5872 - 5888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5888 - 5904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5904 - 5920 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5920 - 5936 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5936 - 5952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5952 - 5968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5968 - 5984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5984 - 6000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6000 - 6016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6016 - 6032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6032 - 6048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6048 - 6064 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6064 - 6080 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6080 - 6096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6096 - 6112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6112 - 6128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6128 - 6144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6144 - 6160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6160 - 6176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6176 - 6192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6192 - 6208 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6208 - 6224 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6224 - 6240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6240 - 6256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6256 - 6272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6272 - 6288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6288 - 6304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6304 - 6320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6320 - 6336 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6336 - 6352 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6352 - 6368 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6368 - 6384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6384 - 6400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6400 - 6416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6416 - 6432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6432 - 6448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6448 - 6464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6464 - 6480 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6480 - 6496 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6496 - 6512 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6512 - 6528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6528 - 6544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6544 - 6560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6560 - 6576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6576 - 6592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6592 - 6608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6608 - 6624 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6624 - 6640 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6640 - 6656 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6656 - 6672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6672 - 6688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6688 - 6704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6704 - 6720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6720 - 6736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6736 - 6752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6752 - 6768 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6768 - 6784 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6784 - 6800 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6800 - 6816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6816 - 6832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6832 - 6848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6848 - 6864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6864 - 6880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6880 - 6896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6896 - 6912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6912 - 6928 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6928 - 6944 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6944 - 6960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6960 - 6976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6976 - 6992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6992 - 7008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7008 - 7024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7024 - 7040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7040 - 7056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7056 - 7072 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7072 - 7088 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7088 - 7104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7104 - 7120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7120 - 7136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7136 - 7152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7152 - 7168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7168 - 7184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7184 - 7200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7200 - 7216 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7216 - 7232 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7232 - 7248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7248 - 7264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7264 - 7280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7280 - 7296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7296 - 7312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7312 - 7328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7328 - 7344 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7344 - 7360 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7360 - 7376 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7376 - 7392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7392 - 7408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7408 - 7424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7424 - 7440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7440 - 7456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7456 - 7472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7472 - 7488 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7488 - 7504 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7504 - 7520 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7520 - 7536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7536 - 7552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7552 - 7568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7568 - 7584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7584 - 7600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7600 - 7616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7616 - 7632 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7632 - 7648 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7648 - 7664 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7664 - 7680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7680 - 7696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7696 - 7712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7712 - 7728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7728 - 7744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7744 - 7760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7760 - 7776 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7776 - 7792 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7792 - 7808 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7808 - 7824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7824 - 7840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7840 - 7856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7856 - 7872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7872 - 7888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7888 - 7904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7904 - 7920 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7920 - 7936 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7936 - 7952 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7952 - 7968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7968 - 7984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7984 - 8000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8000 - 8016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8016 - 8032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8032 - 8048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8048 - 8064 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8064 - 8080 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8080 - 8096 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8096 - 8112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8112 - 8128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8128 - 8144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8144 - 8160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8160 - 8176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8176 - 8192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8192 - 8208 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8208 - 8224 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8224 - 8240 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8240 - 8256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8256 - 8272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8272 - 8288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8288 - 8304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8304 - 8320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8320 - 8336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8336 - 8352 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8352 - 8368 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8368 - 8384 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8384 - 8400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8400 - 8416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8416 - 8432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8432 - 8448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8448 - 8464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8464 - 8480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8480 - 8496 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8496 - 8512 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8512 - 8528 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8528 - 8544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8544 - 8560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8560 - 8576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8576 - 8592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8592 - 8608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8608 - 8624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8624 - 8640 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8640 - 8656 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8656 - 8672 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8672 - 8688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8688 - 8704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8704 - 8720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8720 - 8736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8736 - 8752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8752 - 8768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8768 - 8784 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8784 - 8800 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8800 - 8816 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8816 - 8832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8832 - 8848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8848 - 8864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8864 - 8880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8880 - 8896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8896 - 8912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8912 - 8928 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8928 - 8944 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8944 - 8960 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8960 - 8976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8976 - 8992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8992 - 9008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9008 - 9024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9024 - 9040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9040 - 9056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9056 - 9072 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9072 - 9088 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9088 - 9104 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9104 - 9120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9120 - 9136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9136 - 9152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9152 - 9168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9168 - 9184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9184 - 9200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9200 - 9216 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9216 - 9232 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9232 - 9248 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9248 - 9264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9264 - 9280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9280 - 9296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9296 - 9312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9312 - 9328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9328 - 9344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9344 - 9360 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9360 - 9376 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9376 - 9392 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9392 - 9408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9408 - 9424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9424 - 9440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9440 - 9456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9456 - 9472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9472 - 9488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9488 - 9504 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9504 - 9520 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9520 - 9536 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9536 - 9552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9552 - 9568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9568 - 9584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9584 - 9600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9600 - 9616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9616 - 9632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9632 - 9648 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9648 - 9664 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9664 - 9680 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9680 - 9696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9696 - 9712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9712 - 9728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9728 - 9744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9744 - 9760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9760 - 9776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9776 - 9792 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9792 - 9808 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9808 - 9824 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9824 - 9840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9840 - 9856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9856 - 9872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9872 - 9888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9888 - 9904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9904 - 9920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9920 - 9936 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9936 - 9952 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9952 - 9968 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9968 - 9984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9984 - 10000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10000 - 10016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10016 - 10032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10032 - 10048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10048 - 10064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10064 - 10080 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10080 - 10096 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10096 - 10112 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10112 - 10128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10128 - 10144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10144 - 10160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10160 - 10176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10176 - 10192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10192 - 10208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10208 - 10224 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10224 - 10240 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10240 - 10256 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10256 - 10272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10272 - 10288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10288 - 10304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10304 - 10320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10320 - 10336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10336 - 10352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10352 - 10368 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10368 - 10384 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10384 - 10400 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10400 - 10416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10416 - 10432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10432 - 10448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10448 - 10464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10464 - 10480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10480 - 10496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10496 - 10512 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10512 - 10528 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10528 - 10544 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10544 - 10560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10560 - 10576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10576 - 10592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10592 - 10608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10608 - 10624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10624 - 10640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10640 - 10656 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10656 - 10672 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10672 - 10688 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10688 - 10704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10704 - 10720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10720 - 10736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10736 - 10752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10752 - 10768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10768 - 10784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10784 - 10800 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10800 - 10816 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10816 - 10832 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10832 - 10848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10848 - 10864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10864 - 10880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10880 - 10896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10896 - 10912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10912 - 10928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10928 - 10944 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10944 - 10960 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10960 - 10976 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10976 - 10992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10992 - 11008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11008 - 11024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11024 - 11040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11040 - 11056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11056 - 11072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11072 - 11088 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11088 - 11104 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11104 - 11120 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11120 - 11136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11136 - 11152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11152 - 11168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11168 - 11184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11184 - 11200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11200 - 11216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11216 - 11232 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11232 - 11248 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11248 - 11264 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11264 - 11280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11280 - 11296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11296 - 11312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11312 - 11328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11328 - 11344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11344 - 11360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11360 - 11376 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11376 - 11392 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11392 - 11408 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11408 - 11424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11424 - 11440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11440 - 11456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11456 - 11472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11472 - 11488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11488 - 11504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11504 - 11520 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11520 - 11536 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11536 - 11552 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11552 - 11568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11568 - 11584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11584 - 11600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11600 - 11616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11616 - 11632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11632 - 11648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11648 - 11664 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11664 - 11680 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11680 - 11696 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11696 - 11712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11712 - 11728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11728 - 11744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11744 - 11760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11760 - 11776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11776 - 11792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11792 - 11808 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11808 - 11824 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11824 - 11840 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11840 - 11856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11856 - 11872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11872 - 11888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11888 - 11904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11904 - 11920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11920 - 11936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11936 - 11952 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11952 - 11968 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11968 - 11984 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11984 - 12000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12000 - 12016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12016 - 12032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12032 - 12048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12048 - 12064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12064 - 12080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12080 - 12096 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12096 - 12112 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12112 - 12128 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12128 - 12144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12144 - 12160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12160 - 12176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12176 - 12192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12192 - 12208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12208 - 12224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12224 - 12240 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12240 - 12256 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12256 - 12272 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12272 - 12288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12288 - 12304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12304 - 12320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12320 - 12336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12336 - 12352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12352 - 12368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12368 - 12384 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12384 - 12400 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12400 - 12416 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12416 - 12432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12432 - 12448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12448 - 12464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12464 - 12480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12480 - 12496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12496 - 12512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12512 - 12528 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12528 - 12544 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12544 - 12560 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12560 - 12576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12576 - 12592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12592 - 12608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12608 - 12624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12624 - 12640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12640 - 12656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12656 - 12672 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12672 - 12688 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12688 - 12704 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12704 - 12720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12720 - 12736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12736 - 12752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12752 - 12768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12768 - 12784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12784 - 12800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12800 - 12816 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12816 - 12832 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12832 - 12848 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12848 - 12864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12864 - 12880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12880 - 12896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12896 - 12912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12912 - 12928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12928 - 12944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12944 - 12960 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12960 - 12976 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12976 - 12992 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12992 - 13008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13008 - 13024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13024 - 13040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13040 - 13056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13056 - 13072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13072 - 13088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13088 - 13104 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13104 - 13120 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13120 - 13136 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13136 - 13152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13152 - 13168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13168 - 13184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13184 - 13200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13200 - 13216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13216 - 13232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13232 - 13248 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13248 - 13264 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13264 - 13280 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13280 - 13296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13296 - 13312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13312 - 13328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13328 - 13344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13344 - 13360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13360 - 13376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13376 - 13392 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13392 - 13408 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13408 - 13424 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13424 - 13440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13440 - 13456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13456 - 13472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13472 - 13488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13488 - 13504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13504 - 13520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13520 - 13536 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13536 - 13552 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13552 - 13568 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13568 - 13584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13584 - 13600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13600 - 13616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13616 - 13632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13632 - 13648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13648 - 13664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13664 - 13680 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13680 - 13696 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13696 - 13712 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13712 - 13728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13728 - 13744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13744 - 13760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13760 - 13776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13776 - 13792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13792 - 13808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13808 - 13824 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13824 - 13840 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13840 - 13856 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13856 - 13872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13872 - 13888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13888 - 13904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13904 - 13920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13920 - 13936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13936 - 13952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13952 - 13968 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13968 - 13984 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13984 - 14000 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14000 - 14016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14016 - 14032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14032 - 14048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14048 - 14064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14064 - 14080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14080 - 14096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14096 - 14112 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14112 - 14128 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14128 - 14144 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14144 - 14160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14160 - 14176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14176 - 14192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14192 - 14208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14208 - 14224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14224 - 14240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14240 - 14256 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14256 - 14272 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14272 - 14288 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14288 - 14304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14304 - 14320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14320 - 14336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14336 - 14352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14352 - 14368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14368 - 14384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14384 - 14400 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14400 - 14416 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14416 - 14432 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14432 - 14448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14448 - 14464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14464 - 14480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14480 - 14496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14496 - 14512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14512 - 14528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14528 - 14544 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14544 - 14560 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14560 - 14576 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14576 - 14592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14592 - 14608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14608 - 14624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14624 - 14640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14640 - 14656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14656 - 14672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14672 - 14688 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14688 - 14704 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14704 - 14720 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14720 - 14736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14736 - 14752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14752 - 14768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14768 - 14784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14784 - 14800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14800 - 14816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14816 - 14832 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14832 - 14848 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14848 - 14864 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14864 - 14880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14880 - 14896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14896 - 14912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14912 - 14928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14928 - 14944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14944 - 14960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14960 - 14976 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14976 - 14992 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14992 - 15008 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15008 - 15024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15024 - 15040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15040 - 15056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15056 - 15072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15072 - 15088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15088 - 15104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15104 - 15120 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15120 - 15136 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15136 - 15152 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15152 - 15168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15168 - 15184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15184 - 15200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15200 - 15216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15216 - 15232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15232 - 15248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15248 - 15264 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15264 - 15280 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15280 - 15296 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15296 - 15312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15312 - 15328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15328 - 15344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15344 - 15360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15360 - 15376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15376 - 15392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15392 - 15408 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15408 - 15424 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15424 - 15440 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15440 - 15456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15456 - 15472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15472 - 15488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15488 - 15504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15504 - 15520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15520 - 15536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15536 - 15552 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15552 - 15568 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15568 - 15584 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15584 - 15600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15600 - 15616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15616 - 15632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15632 - 15648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15648 - 15664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15664 - 15680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15680 - 15696 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15696 - 15712 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15712 - 15728 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15728 - 15744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15744 - 15760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15760 - 15776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15776 - 15792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15792 - 15808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15808 - 15824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15824 - 15840 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15840 - 15856 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15856 - 15872 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15872 - 15888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15888 - 15904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15904 - 15920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15920 - 15936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15936 - 15952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15952 - 15968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15968 - 15984 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15984 - 16000 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16000 - 16016 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16016 - 16032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16032 - 16048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16048 - 16064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16064 - 16080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16080 - 16096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16096 - 16112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16112 - 16128 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16128 - 16144 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16144 - 16160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16160 - 16176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16176 - 16192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16192 - 16208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16208 - 16224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16224 - 16240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16240 - 16256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16256 - 16272 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16272 - 16288 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16288 - 16304 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16304 - 16320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16320 - 16336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16336 - 16352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16352 - 16368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16368 - 16384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16384 - 16400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16400 - 16416 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16416 - 16432 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16432 - 16448 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16448 - 16464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16464 - 16480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16480 - 16496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16496 - 16512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16512 - 16528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16528 - 16544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16544 - 16560 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16560 - 16576 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16576 - 16592 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16592 - 16608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16608 - 16624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16624 - 16640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16640 - 16656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16656 - 16672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16672 - 16688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16688 - 16704 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16704 - 16720 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16720 - 16736 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16736 - 16752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16752 - 16768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16768 - 16784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16784 - 16800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16800 - 16816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16816 - 16832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16832 - 16848 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16848 - 16864 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16864 - 16880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16880 - 16896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16896 - 16912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16912 - 16928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16928 - 16944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16944 - 16960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16960 - 16976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16976 - 16992 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16992 - 17008 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17008 - 17024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17024 - 17040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17040 - 17056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17056 - 17072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17072 - 17088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17088 - 17104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17104 - 17120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17120 - 17136 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17136 - 17152 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17152 - 17168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17168 - 17184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17184 - 17200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17200 - 17216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17216 - 17232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17232 - 17248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17248 - 17264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17264 - 17280 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17280 - 17296 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17296 - 17312 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17312 - 17328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17328 - 17344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17344 - 17360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17360 - 17376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17376 - 17392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17392 - 17408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17408 - 17424 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17424 - 17440 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17440 - 17456 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17456 - 17472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17472 - 17488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17488 - 17504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17504 - 17520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17520 - 17536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17536 - 17552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17552 - 17568 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17568 - 17584 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17584 - 17600 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17600 - 17616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17616 - 17632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17632 - 17648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17648 - 17664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17664 - 17680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17680 - 17696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17696 - 17712 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17712 - 17728 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17728 - 17744 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17744 - 17760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17760 - 17776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17776 - 17792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17792 - 17808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17808 - 17824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17824 - 17840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17840 - 17856 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17856 - 17872 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17872 - 17888 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17888 - 17904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17904 - 17920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17920 - 17936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17936 - 17952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17952 - 17968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17968 - 17984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17984 - 18000 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18000 - 18016 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18016 - 18032 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18032 - 18048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18048 - 18064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18064 - 18080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18080 - 18096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18096 - 18112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18112 - 18128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18128 - 18144 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18144 - 18160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18160 - 18176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18176 - 18192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18192 - 18208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18208 - 18224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18224 - 18240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18240 - 18256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18256 - 18272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18272 - 18288 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18288 - 18304 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18304 - 18320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18320 - 18336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18336 - 18352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18352 - 18368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18368 - 18384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18384 - 18400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18400 - 18416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18416 - 18432 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18432 - 18448 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18448 - 18464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18464 - 18480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18480 - 18496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18496 - 18512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18512 - 18528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18528 - 18544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18544 - 18560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18560 - 18576 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18576 - 18592 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18592 - 18608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18608 - 18624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18624 - 18640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18640 - 18656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18656 - 18672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18672 - 18688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18688 - 18704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18704 - 18720 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18720 - 18736 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18736 - 18752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18752 - 18768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18768 - 18784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18784 - 18800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18800 - 18816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18816 - 18832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18832 - 18848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18848 - 18864 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18864 - 18880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18880 - 18896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18896 - 18912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18912 - 18928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18928 - 18944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18944 - 18960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18960 - 18976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18976 - 18992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18992 - 19008 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19008 - 19024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19024 - 19040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19040 - 19056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19056 - 19072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19072 - 19088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19088 - 19104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19104 - 19120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19120 - 19136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19136 - 19152 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19152 - 19168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19168 - 19184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19184 - 19200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19200 - 19216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19216 - 19232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19232 - 19248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19248 - 19264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19264 - 19280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19280 - 19296 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19296 - 19312 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19312 - 19328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19328 - 19344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19344 - 19360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19360 - 19376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19376 - 19392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19392 - 19408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19408 - 19424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19424 - 19440 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19440 - 19456 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19456 - 19472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19472 - 19488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19488 - 19504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19504 - 19520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19520 - 19536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19536 - 19552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19552 - 19568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19568 - 19584 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19584 - 19600 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19600 - 19616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19616 - 19632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19632 - 19648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19648 - 19664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19664 - 19680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19680 - 19696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19696 - 19712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19712 - 19728 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19728 - 19744 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19744 - 19760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19760 - 19776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19776 - 19792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19792 - 19808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19808 - 19824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19824 - 19840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19840 - 19856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19856 - 19872 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19872 - 19888 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19888 - 19904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19904 - 19920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19920 - 19936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19936 - 19952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19952 - 19968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19968 - 19984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19984 - 20000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20000 - 20016 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20016 - 20032 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20032 - 20048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20048 - 20064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20064 - 20080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20080 - 20096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20096 - 20112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20112 - 20128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20128 - 20144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20144 - 20160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20160 - 20176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20176 - 20192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20192 - 20208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20208 - 20224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20224 - 20240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20240 - 20256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20256 - 20272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20272 - 20288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20288 - 20304 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20304 - 20320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20320 - 20336 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20336 - 20352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20352 - 20368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20368 - 20384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20384 - 20400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20400 - 20416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20416 - 20432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20432 - 20448 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20448 - 20464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20464 - 20480 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20480 - 20496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20496 - 20512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20512 - 20528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20528 - 20544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20544 - 20560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20560 - 20576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20576 - 20592 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20592 - 20608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20608 - 20624 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20624 - 20640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20640 - 20656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20656 - 20672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20672 - 20688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20688 - 20704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20704 - 20720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20720 - 20736 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20736 - 20752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20752 - 20768 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20768 - 20784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20784 - 20800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20800 - 20816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20816 - 20832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20832 - 20848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20848 - 20864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20864 - 20880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20880 - 20896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20896 - 20912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20912 - 20928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20928 - 20944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20944 - 20960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20960 - 20976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20976 - 20992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20992 - 21008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21008 - 21024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21024 - 21040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21040 - 21056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21056 - 21072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21072 - 21088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21088 - 21104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21104 - 21120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21120 - 21136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21136 - 21152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21152 - 21168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21168 - 21184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21184 - 21200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21200 - 21216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21216 - 21232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21232 - 21248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21248 - 21264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21264 - 21280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21280 - 21296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21296 - 21312 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21312 - 21328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21328 - 21344 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21344 - 21360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21360 - 21376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21376 - 21392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21392 - 21408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21408 - 21424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21424 - 21440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21440 - 21456 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21456 - 21472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21472 - 21488 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21488 - 21504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21504 - 21520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21520 - 21536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21536 - 21552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21552 - 21568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21568 - 21584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21584 - 21600 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21600 - 21616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21616 - 21632 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21632 - 21648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21648 - 21664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21664 - 21680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21680 - 21696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21696 - 21712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21712 - 21728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21728 - 21744 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21744 - 21760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21760 - 21776 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21776 - 21792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21792 - 21808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21808 - 21824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21824 - 21840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21840 - 21856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21856 - 21872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21872 - 21888 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21888 - 21904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21904 - 21920 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21920 - 21936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21936 - 21952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21952 - 21968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21968 - 21984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21984 - 22000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22000 - 22016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22016 - 22032 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22032 - 22048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22048 - 22064 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22064 - 22080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22080 - 22096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22096 - 22112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22112 - 22128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22128 - 22144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22144 - 22160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22160 - 22176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22176 - 22192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22192 - 22208 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22208 - 22224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22224 - 22240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22240 - 22256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22256 - 22272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22272 - 22288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22288 - 22304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22304 - 22320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22320 - 22336 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22336 - 22352 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22352 - 22368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22368 - 22384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22384 - 22400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22400 - 22416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22416 - 22432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22432 - 22448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22448 - 22464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22464 - 22480 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22480 - 22496 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22496 - 22512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22512 - 22528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22528 - 22544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22544 - 22560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22560 - 22576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22576 - 22592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22592 - 22608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22608 - 22624 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22624 - 22640 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22640 - 22656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22656 - 22672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22672 - 22688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22688 - 22704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22704 - 22720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22720 - 22736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22736 - 22752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22752 - 22768 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22768 - 22784 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22784 - 22800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22800 - 22816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22816 - 22832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22832 - 22848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22848 - 22864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22864 - 22880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22880 - 22896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22896 - 22912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22912 - 22928 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22928 - 22944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22944 - 22960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22960 - 22976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22976 - 22992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22992 - 23008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23008 - 23024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23024 - 23040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23040 - 23056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23056 - 23072 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23072 - 23088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23088 - 23104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23104 - 23120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23120 - 23136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23136 - 23152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23152 - 23168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23168 - 23184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23184 - 23200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23200 - 23216 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23216 - 23232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23232 - 23248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23248 - 23264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23264 - 23280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23280 - 23296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23296 - 23312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23312 - 23328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23328 - 23344 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23344 - 23360 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23360 - 23376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23376 - 23392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23392 - 23408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23408 - 23424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23424 - 23440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23440 - 23456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23456 - 23472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23472 - 23488 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23488 - 23504 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23504 - 23520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23520 - 23536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23536 - 23552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23552 - 23568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23568 - 23584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23584 - 23600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23600 - 23616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23616 - 23632 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23632 - 23648 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23648 - 23664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23664 - 23680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23680 - 23696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23696 - 23712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23712 - 23728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23728 - 23744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23744 - 23760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23760 - 23776 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23776 - 23792 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23792 - 23808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23808 - 23824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23824 - 23840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23840 - 23856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23856 - 23872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23872 - 23888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23888 - 23904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23904 - 23920 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23920 - 23936 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23936 - 23952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23952 - 23968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23968 - 23984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23984 - 24000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24000 - 24016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24016 - 24032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24032 - 24048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 24048 - 24064 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 24064 - 24080 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24080 - 24096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24096 - 24112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24112 - 24128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24128 - 24144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24144 - 24160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24160 - 24176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0 }; static const GBitmap s_fps_background_bitmap = { - .addr = (void*) &s_fps_background_pixels, - .row_size_bytes = 144, - .info_flags = 0x1002, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 144, .h = 168 }, - }, + .addr = (void *)&s_fps_background_pixels, + .row_size_bytes = 144, + .info_flags = 0x1002, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 144, .h = 168}, + }, }; // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_fps_topleft_pixels[] = { - 0xa9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 0 - 16 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16 - 32 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 32 - 48 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 48 - 64 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 64 - 80 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 80 - 96 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 96 - 112 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 112 - 128 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 128 - 144 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 144 - 160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 160 - 176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 176 - 192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 192 - 208 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 208 - 224 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 224 - 240 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 240 - 256 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 256 - 272 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 272 - 288 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xd4, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 288 - 304 */ - 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 304 - 320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 320 - 336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 336 - 352 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 352 - 368 */ - 0xc0, 0xc0, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, /* bytes 368 - 384 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 384 - 400 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 400 - 416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 416 - 432 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, /* bytes 432 - 448 */ - 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xf9, 0xf9, /* bytes 448 - 464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, /* bytes 464 - 480 */ - 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 480 - 496 */ - 0xd4, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 496 - 512 */ - 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, /* bytes 512 - 528 */ - 0xda, 0xc0, 0xc0, 0xd0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 528 - 544 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 544 - 560 */ - 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 560 - 576 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, /* bytes 576 - 592 */ - 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 592 - 608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, /* bytes 608 - 624 */ - 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 624 - 640 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 640 - 656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, /* bytes 656 - 672 */ - 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 672 - 688 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 688 - 704 */ - 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 704 - 720 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xe4, 0xc0, /* bytes 720 - 736 */ - 0xc0, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, /* bytes 736 - 752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 752 - 768 */ - 0xf9, 0xf9, 0xd4, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 768 - 784 */ - 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 784 - 800 */ - 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 800 - 816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 816 - 832 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 832 - 848 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 848 - 864 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 864 - 880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 880 - 896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 896 - 912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 912 - 928 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 928 - 944 */ - 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 944 - 960 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 960 - 976 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 976 - 992 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 992 - 1008 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1008 - 1024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1024 - 1040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1040 - 1056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1056 - 1072 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1072 - 1088 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1088 - 1104 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1104 - 1120 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1120 - 1136 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1136 - 1152 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1152 - 1168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1168 - 1184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1184 - 1200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1200 - 1216 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1216 - 1232 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1232 - 1248 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1248 - 1264 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1264 - 1280 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9 + 0xa9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 0 - 16 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16 - 32 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 32 - 48 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 48 - 64 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 64 - 80 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 80 - 96 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 96 - 112 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 112 - 128 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 128 - 144 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 144 - 160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 160 - 176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 176 - 192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 192 - 208 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 208 - 224 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 224 - 240 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 240 - 256 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 256 - 272 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 272 - 288 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xd4, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 288 - 304 */ + 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 304 - 320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 320 - 336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 336 - 352 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 352 - 368 */ + 0xc0, 0xc0, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, + 0xd6, 0xd6, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, /* bytes 368 - 384 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 384 - 400 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, + 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 400 - 416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 416 - 432 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, /* bytes 432 - 448 */ + 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xf9, 0xf9, /* bytes 448 - 464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, /* bytes 464 - 480 */ + 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, + 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 480 - 496 */ + 0xd4, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 496 - 512 */ + 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, + 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, /* bytes 512 - 528 */ + 0xda, 0xc0, 0xc0, 0xd0, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 528 - 544 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, + 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 544 - 560 */ + 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 560 - 576 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, /* bytes 576 - 592 */ + 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xc0, + 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 592 - 608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, /* bytes 608 - 624 */ + 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, + 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 624 - 640 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 640 - 656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, /* bytes 656 - 672 */ + 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 672 - 688 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 688 - 704 */ + 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, + 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 704 - 720 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xe4, 0xc0, /* bytes 720 - 736 */ + 0xc0, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, + 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, /* bytes 736 - 752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 752 - 768 */ + 0xf9, 0xf9, 0xd4, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 768 - 784 */ + 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 784 - 800 */ + 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 800 - 816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 816 - 832 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 832 - 848 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 848 - 864 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 864 - 880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 880 - 896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 896 - 912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 912 - 928 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 928 - 944 */ + 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 944 - 960 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 960 - 976 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 976 - 992 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 992 - 1008 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1008 - 1024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1024 - 1040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1040 - 1056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1056 - 1072 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1072 - 1088 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1088 - 1104 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1104 - 1120 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1120 - 1136 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1136 - 1152 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1152 - 1168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1168 - 1184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1184 - 1200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1200 - 1216 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1216 - 1232 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1232 - 1248 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1248 - 1264 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1264 - 1280 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9 }; static const GBitmap s_fps_topleft_bitmap = { - .addr = (void*) &s_fps_topleft_pixels, - .row_size_bytes = 36, - .info_flags = 0x1002, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 36, .h = 36 }, - }, + .addr = (void *)&s_fps_topleft_pixels, + .row_size_bytes = 36, + .info_flags = 0x1002, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 36, .h = 36}, + }, }; #else // PBL_COLOR, below PBL_BW is assumed @@ -1634,257 +3227,484 @@ static const GBitmap s_fps_topleft_bitmap = { // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_fps_background_pixels[] = { - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 48 - 64 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 64 - 80 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 80 - 96 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 96 - 112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 112 - 128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 128 - 144 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 208 - 224 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 224 - 240 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 240 - 256 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 256 - 272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 272 - 288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 288 - 304 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 304 - 320 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 320 - 336 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 336 - 352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 352 - 368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 368 - 384 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 432 - 448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 448 - 464 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 464 - 480 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 480 - 496 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 496 - 512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 512 - 528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 528 - 544 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 544 - 560 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 560 - 576 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 576 - 592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 608 - 624 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 640 - 656 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 656 - 672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 672 - 688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 688 - 704 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 704 - 720 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 720 - 736 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 736 - 752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 752 - 768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 768 - 784 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 784 - 800 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 848 - 864 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 864 - 880 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 880 - 896 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 896 - 912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 912 - 928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 928 - 944 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 944 - 960 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 960 - 976 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 976 - 992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 992 - 1008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1008 - 1024 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1056 - 1072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1072 - 1088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1088 - 1104 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1104 - 1120 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1120 - 1136 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1136 - 1152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1152 - 1168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1168 - 1184 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1184 - 1200 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1200 - 1216 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1248 - 1264 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1264 - 1280 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1280 - 1296 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1296 - 1312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1312 - 1328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1328 - 1344 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1344 - 1360 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1360 - 1376 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1376 - 1392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1392 - 1408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1408 - 1424 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1472 - 1488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1488 - 1504 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1504 - 1520 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1520 - 1536 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1536 - 1552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1552 - 1568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1568 - 1584 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1584 - 1600 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1600 - 1616 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1616 - 1632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1648 - 1664 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1680 - 1696 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1696 - 1712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1712 - 1728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1728 - 1744 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1744 - 1760 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1760 - 1776 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1776 - 1792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1792 - 1808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1808 - 1824 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1824 - 1840 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1888 - 1904 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1904 - 1920 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1920 - 1936 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1936 - 1952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1952 - 1968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1968 - 1984 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1984 - 2000 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2000 - 2016 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2016 - 2032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2032 - 2048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2048 - 2064 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2096 - 2112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2112 - 2128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2128 - 2144 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2144 - 2160 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2160 - 2176 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2176 - 2192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2192 - 2208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2208 - 2224 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2224 - 2240 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2240 - 2256 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2288 - 2304 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2304 - 2320 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2320 - 2336 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2336 - 2352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2352 - 2368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2368 - 2384 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2384 - 2400 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2400 - 2416 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2416 - 2432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2432 - 2448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2448 - 2464 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2512 - 2528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2528 - 2544 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2544 - 2560 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2560 - 2576 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2576 - 2592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2592 - 2608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2608 - 2624 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2624 - 2640 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2640 - 2656 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2656 - 2672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2688 - 2704 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2720 - 2736 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2736 - 2752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2752 - 2768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2768 - 2784 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2784 - 2800 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2800 - 2816 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2816 - 2832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2832 - 2848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2848 - 2864 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2864 - 2880 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2928 - 2944 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2944 - 2960 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2960 - 2976 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2976 - 2992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2992 - 3008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3008 - 3024 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3024 - 3040 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3040 - 3056 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3056 - 3072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3072 - 3088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3088 - 3104 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3136 - 3152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3152 - 3168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3168 - 3184 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3184 - 3200 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3200 - 3216 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3216 - 3232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3232 - 3248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3248 - 3264 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3264 - 3280 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3280 - 3296 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3328 - 3344 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 48 - 64 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 64 - 80 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 80 - 96 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 96 - 112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 112 - 128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 128 - 144 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 208 - 224 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 224 - 240 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 240 - 256 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 256 - 272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 272 - 288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 288 - 304 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 304 - 320 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 320 - 336 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 336 - 352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 352 - 368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 368 - 384 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 432 - 448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 448 - 464 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 464 - 480 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 480 - 496 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 496 - 512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 512 - 528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 528 - 544 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 544 - 560 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 560 - 576 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 576 - 592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 608 - 624 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 640 - 656 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 656 - 672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 672 - 688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 688 - 704 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 704 - 720 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 720 - 736 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 736 - 752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 752 - 768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 768 - 784 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 784 - 800 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 848 - 864 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 864 - 880 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 880 - 896 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 896 - 912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 912 - 928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 928 - 944 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 944 - 960 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 960 - 976 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 976 - 992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 992 - 1008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1008 - 1024 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1056 - 1072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1072 - 1088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1088 - 1104 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1104 - 1120 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1120 - 1136 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1136 - 1152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1152 - 1168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1168 - 1184 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1184 - 1200 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1200 - 1216 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1248 - 1264 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1264 - 1280 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1280 - 1296 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1296 - 1312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1312 - 1328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1328 - 1344 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1344 - 1360 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1360 - 1376 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1376 - 1392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1392 - 1408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1408 - 1424 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1472 - 1488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1488 - 1504 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1504 - 1520 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1520 - 1536 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1536 - 1552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1552 - 1568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1568 - 1584 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1584 - 1600 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1600 - 1616 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1616 - 1632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1648 - 1664 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1680 - 1696 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1696 - 1712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1712 - 1728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1728 - 1744 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1744 - 1760 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1760 - 1776 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1776 - 1792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1792 - 1808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1808 - 1824 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1824 - 1840 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1888 - 1904 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1904 - 1920 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1920 - 1936 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1936 - 1952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1952 - 1968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1968 - 1984 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1984 - 2000 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2000 - 2016 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2016 - 2032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2032 - 2048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2048 - 2064 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2096 - 2112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2112 - 2128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2128 - 2144 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2144 - 2160 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2160 - 2176 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2176 - 2192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2192 - 2208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2208 - 2224 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2224 - 2240 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2240 - 2256 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2288 - 2304 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2304 - 2320 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2320 - 2336 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2336 - 2352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2352 - 2368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2368 - 2384 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2384 - 2400 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2400 - 2416 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2416 - 2432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2432 - 2448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2448 - 2464 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2512 - 2528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2528 - 2544 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2544 - 2560 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2560 - 2576 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2576 - 2592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2592 - 2608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2608 - 2624 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2624 - 2640 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2640 - 2656 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2656 - 2672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2688 - 2704 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2720 - 2736 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2736 - 2752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2752 - 2768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2768 - 2784 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2784 - 2800 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2800 - 2816 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2816 - 2832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2832 - 2848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2848 - 2864 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2864 - 2880 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2928 - 2944 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2944 - 2960 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2960 - 2976 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2976 - 2992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2992 - 3008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3008 - 3024 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3024 - 3040 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3040 - 3056 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3056 - 3072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3072 - 3088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3088 - 3104 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3136 - 3152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3152 - 3168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3168 - 3184 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3184 - 3200 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3200 - 3216 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3216 - 3232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3232 - 3248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3248 - 3264 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3264 - 3280 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3280 - 3296 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3328 - 3344 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; static const GBitmap s_fps_background_bitmap = { - .addr = (void*) &s_fps_background_pixels, + .addr = (void *)&s_fps_background_pixels, .row_size_bytes = 20, .info_flags = 0x1000, .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 144, .h = 168 }, + .origin = {.x = 0, .y = 0}, + .size = {.w = 144, .h = 168}, }, }; - // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_fps_topleft_pixels[] = { - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 48 - 64 */ - 0xff, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 64 - 80 */ - 0xff, 0xfc, 0xf3, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x03, 0xc0, 0x0f, 0x00, 0x00, 0x00, /* bytes 80 - 96 */ - 0xff, 0xfc, 0x03, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0xf3, 0xe3, 0x0f, 0x00, 0x00, 0x00, /* bytes 96 - 112 */ - 0xff, 0xfc, 0xf3, 0xf1, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0xf3, 0xf8, 0x0f, 0x00, 0x00, 0x00, /* bytes 112 - 128 */ - 0xff, 0xfc, 0x73, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x73, 0xfc, 0x0f, 0x00, 0x00, 0x00, /* bytes 128 - 144 */ - 0xff, 0x00, 0xf0, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf0, 0xf1, 0x0f, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ - 0xff, 0x7c, 0xf8, 0xe3, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ - 0xff, 0x7c, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ - 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ - 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ - 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 224 - 240 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 240 - 256 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 256 - 272 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 48 - 64 */ + 0xff, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 64 - 80 */ + 0xff, 0xfc, 0xf3, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0x03, 0xc0, 0x0f, 0x00, 0x00, 0x00, /* bytes 80 - 96 */ + 0xff, 0xfc, 0x03, 0xc0, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0xf3, 0xe3, 0x0f, 0x00, 0x00, 0x00, /* bytes 96 - 112 */ + 0xff, 0xfc, 0xf3, 0xf1, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0xf3, 0xf8, 0x0f, 0x00, 0x00, 0x00, /* bytes 112 - 128 */ + 0xff, 0xfc, 0x73, 0xfc, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0x73, 0xfc, 0x0f, 0x00, 0x00, 0x00, /* bytes 128 - 144 */ + 0xff, 0x00, 0xf0, 0xf8, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0x00, 0xf0, 0xf1, 0x0f, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ + 0xff, 0x7c, 0xf8, 0xe3, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0x3c, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ + 0xff, 0x7c, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 224 - 240 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 240 - 256 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 256 - 272 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, }; static const GBitmap s_fps_topleft_bitmap = { - .addr = (void*) &s_fps_topleft_pixels, + .addr = (void *)&s_fps_topleft_pixels, .row_size_bytes = 8, .info_flags = 0x1000, .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 36, .h = 36 }, + .origin = {.x = 0, .y = 0}, + .size = {.w = 36, .h = 36}, }, }; diff --git a/apps/samples/health_api_test/src/health_api_test.c b/apps/samples/health_api_test/src/health_api_test.c index 13163340af..92e13a29ae 100644 --- a/apps/samples/health_api_test/src/health_api_test.c +++ b/apps/samples/health_api_test/src/health_api_test.c @@ -4,26 +4,25 @@ #include "pebble.h" #include - // ------------------------------------------------------------------------------- // Defines // Rect: left, top, width, height #define STEPS_HEIGHT 45 -#define STEPS_TOP ((DISP_ROWS - 3 * STEPS_HEIGHT)/2) +#define STEPS_TOP ((DISP_ROWS - 3 * STEPS_HEIGHT) / 2) #if PBL_RECT - #define DISP_COLS 144 - #define DISP_ROWS 168 +#define DISP_COLS 144 +#define DISP_ROWS 168 #elif PBL_ROUND - #define DISP_COLS 180 - #define DISP_ROWS 180 +#define DISP_COLS 180 +#define DISP_ROWS 180 #endif #define CUR_STEP_RECT GRect(0, STEPS_TOP, DISP_COLS, STEPS_HEIGHT) #define TIME_RECT GRect(0, STEPS_TOP + STEPS_HEIGHT, DISP_COLS, STEPS_HEIGHT) #define DELTA_STEP_RECT GRect(0, STEPS_TOP + 2 * STEPS_HEIGHT, 144, STEPS_HEIGHT) -#define TEXT_RECT GRect(0, STEPS_TOP + 3 * STEPS_HEIGHT - 3, \ - DISP_COLS, DISP_ROWS - STEPS_HEIGHT * 3 + 3) +#define TEXT_RECT \ + GRect(0, STEPS_TOP + 3 * STEPS_HEIGHT - 3, DISP_COLS, DISP_ROWS - STEPS_HEIGHT * 3 + 3) #define CURRENT_STEP_AVG 500 #define DAILY_STEP_AVG 1000 @@ -35,7 +34,6 @@ typedef enum { AppPersistKeyLapSteps = 0, } AppPersistKey; - // ------------------------------------------------------------------------------- // Structures @@ -98,10 +96,9 @@ static HealthAPITestAppData *s_data; static void steps_update_text(HealthAPITestAppData *data); static void prv_debug_cmd_sleep_sessions(int index, void *context); -static void results_update_text(HealthAPITestAppData *data, const char* text); +static void results_update_text(HealthAPITestAppData *data, const char *text); static void prv_hr_update_text(HealthAPITestAppData *data); - // ------------------------------------------------------------------------------- // Return current time in ms static uint64_t prv_ms(void) { @@ -110,17 +107,14 @@ static uint64_t prv_ms(void) { return ((uint64_t)cur_sec * 1000) + cur_ms; } - // ------------------------------------------------------------------------------- -static void prv_convert_seconds_to_time(uint32_t secs_after_midnight, char *text, - int text_len) { +static void prv_convert_seconds_to_time(uint32_t secs_after_midnight, char *text, int text_len) { uint32_t minutes_after_midnight = secs_after_midnight / SECONDS_PER_MINUTE; uint32_t hour = minutes_after_midnight / MINUTES_PER_HOUR; uint32_t minute = minutes_after_midnight % MINUTES_PER_HOUR; snprintf(text, text_len, "%d:%02d", (int)hour, (int)minute); } - // ----------------------------------------------------------------------------------------- static void prv_display_alert(const char *text) { APP_LOG(APP_LOG_LEVEL_DEBUG, text); @@ -128,17 +122,15 @@ static void prv_display_alert(const char *text) { results_update_text(s_data, text); } - // ----------------------------------------------------------------------------------------- -static void prv_safe_strcat(char* dst, const char* src, int dst_space) { +static void prv_safe_strcat(char *dst, const char *src, int dst_space) { int remaining = dst_space - strlen(dst); if (dst_space > 0) { strncat(dst, src, remaining); } - dst[dst_space-1] = 0; + dst[dst_space - 1] = 0; } - // ----------------------------------------------------------------------------------------- static void prv_display_scalar_history_alert(HealthAPITestAppData *data, const char *title, HealthMetric metric) { @@ -158,7 +150,6 @@ static void prv_display_scalar_history_alert(HealthAPITestAppData *data, const c prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_display_seconds_history_alert(HealthAPITestAppData *data, const char *title, HealthMetric metric) { @@ -180,12 +171,10 @@ static void prv_display_seconds_history_alert(HealthAPITestAppData *data, const prv_display_alert(data->debug_card.dialog_text); } - // ------------------------------------------------------------------------------- static void sleep_select_click_handler(ClickRecognizerRef recognizer, void *context) { } - // ------------------------------------------------------------------------------- static void sleep_up_click_handler(ClickRecognizerRef recognizer, void *context) { HealthAPITestAppData *data = (HealthAPITestAppData *)context; @@ -193,7 +182,6 @@ static void sleep_up_click_handler(ClickRecognizerRef recognizer, void *context) window_stack_push(data->hr_window, true); } - // ------------------------------------------------------------------------------- static void sleep_down_click_handler(ClickRecognizerRef recognizer, void *context) { HealthAPITestAppData *data = (HealthAPITestAppData *)context; @@ -207,7 +195,6 @@ static void sleep_down_long_click_handler(ClickRecognizerRef recognizer, void *c window_stack_push(data->debug_window, true /* Animated */); } - // ------------------------------------------------------------------------------- static void sleep_click_config_provider(void *context) { const int k_long_press_timeout_ms = 1000; @@ -218,7 +205,6 @@ static void sleep_click_config_provider(void *context) { sleep_down_long_click_handler, NULL); } - // ------------------------------------------------------------------------------- static void sleep_update_text(HealthAPITestAppData *data) { if (!data->sleep_card.text_layer) { @@ -232,12 +218,11 @@ static void sleep_update_text(HealthAPITestAppData *data) { char bed_time_str[8]; struct tm *local_tm = localtime(&s_data->bed_time_utc); - strftime(bed_time_str, sizeof(bed_time_str), "%H:%M", local_tm); + strftime(bed_time_str, sizeof(bed_time_str), "%H:%M", local_tm); char wake_time_str[8]; local_tm = localtime(&s_data->awake_time_utc); - strftime(wake_time_str, sizeof(wake_time_str), "%H:%M", local_tm); - + strftime(wake_time_str, sizeof(wake_time_str), "%H:%M", local_tm); char total_sleep_str[8]; char deep_sleep_str[8]; @@ -245,12 +230,11 @@ static void sleep_update_text(HealthAPITestAppData *data) { prv_convert_seconds_to_time(sleep_deep_sec, deep_sleep_str, sizeof(deep_sleep_str)); snprintf(data->sleep_card.text, sizeof(data->sleep_card.text), - "Zzz..\ntotal: %s\ndeep: %s\nenter: %s\nexit: %s", - total_sleep_str, deep_sleep_str, bed_time_str, wake_time_str); + "Zzz..\ntotal: %s\ndeep: %s\nenter: %s\nexit: %s", total_sleep_str, deep_sleep_str, + bed_time_str, wake_time_str); text_layer_set_text(data->sleep_card.text_layer, data->sleep_card.text); } - // ------------------------------------------------------------------------------- static void sleep_window_load(Window *window) { HealthAPITestAppData *data = window_get_user_data(window); @@ -260,8 +244,7 @@ static void sleep_window_load(Window *window) { data->sleep_card.text_layer = text_layer_create(root_bounds); text_layer_set_text_alignment(data->sleep_card.text_layer, GTextAlignmentCenter); text_layer_set_background_color(data->sleep_card.text_layer, GColorClear); - text_layer_set_font(data->sleep_card.text_layer, - fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD)); + text_layer_set_font(data->sleep_card.text_layer, fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD)); text_layer_set_text_color(data->sleep_card.text_layer, GColorWhite); layer_add_child(window_layer, text_layer_get_layer(data->sleep_card.text_layer)); @@ -269,7 +252,6 @@ static void sleep_window_load(Window *window) { sleep_update_text(data); } - // ------------------------------------------------------------------------------- static void sleep_window_unload(Window *window) { HealthAPITestAppData *data = window_get_user_data(window); @@ -277,7 +259,6 @@ static void sleep_window_unload(Window *window) { data->sleep_card.text_layer = NULL; } - // ------------------------------------------------------------------------------- static void steps_select_click_handler(ClickRecognizerRef recognizer, void *context) { HealthAPITestAppData *data = (HealthAPITestAppData *)context; @@ -301,7 +282,6 @@ static void steps_up_click_handler(ClickRecognizerRef recognizer, void *context) window_stack_push(data->sleep_window, true /* Animated */); } - // ------------------------------------------------------------------------------- static void steps_down_click_handler(ClickRecognizerRef recognizer, void *context) { HealthAPITestAppData *data = (HealthAPITestAppData *)context; @@ -309,14 +289,12 @@ static void steps_down_click_handler(ClickRecognizerRef recognizer, void *contex window_stack_push(data->hr_window, true /* Animated */); } - // ------------------------------------------------------------------------------- static void steps_down_long_click_handler(ClickRecognizerRef recognizer, void *context) { HealthAPITestAppData *data = (HealthAPITestAppData *)context; window_stack_push(data->debug_window, true /* Animated */); } - // ------------------------------------------------------------------------------- static void steps_click_config_provider(void *context) { window_single_click_subscribe(BUTTON_ID_SELECT, steps_select_click_handler); @@ -325,27 +303,24 @@ static void steps_click_config_provider(void *context) { window_long_click_subscribe(BUTTON_ID_DOWN, 1000, steps_down_long_click_handler, NULL); } - // ------------------------------------------------------------------------------- static void steps_update_text(HealthAPITestAppData *data) { // Show total steps if (data->steps_card.cur_step_layer) { - snprintf(data->steps_card.cur_step_text, sizeof(data->steps_card.cur_step_text), - "%d", (int) data->cur_steps); + snprintf(data->steps_card.cur_step_text, sizeof(data->steps_card.cur_step_text), "%d", + (int)data->cur_steps); text_layer_set_text(data->steps_card.cur_step_layer, data->steps_card.cur_step_text); } // Show time if (data->steps_card.time_layer) { time_t now = time(NULL); - APP_LOG(APP_LOG_LEVEL_DEBUG, "new time: %d", (int) now); + APP_LOG(APP_LOG_LEVEL_DEBUG, "new time: %d", (int)now); struct tm *local_tm = localtime(&now); - strftime(data->steps_card.time_text, sizeof(data->steps_card.time_text), - "%I:%M", local_tm); + strftime(data->steps_card.time_text, sizeof(data->steps_card.time_text), "%I:%M", local_tm); text_layer_set_text(data->steps_card.time_layer, data->steps_card.time_text); } - if (data->lap_steps > data->cur_steps) { // We probably encountered a midnight rollover, reset the persistent storage too data->lap_steps = data->cur_steps; @@ -353,25 +328,22 @@ static void steps_update_text(HealthAPITestAppData *data) { } if (data->steps_card.delta_step_layer) { if (data->lap_steps) { - snprintf(data->steps_card.delta_step_text, sizeof(data->steps_card.delta_step_text), - "%d", (int) (data->cur_steps - data->lap_steps)); + snprintf(data->steps_card.delta_step_text, sizeof(data->steps_card.delta_step_text), "%d", + (int)(data->cur_steps - data->lap_steps)); text_layer_set_text(data->steps_card.delta_step_layer, data->steps_card.delta_step_text); } } } - // ------------------------------------------------------------------------------- -static void prv_health_event_handler(HealthEventType event, - void *context) { +static void prv_health_event_handler(HealthEventType event, void *context) { HealthAPITestAppData *data = (HealthAPITestAppData *)context; if (event == HealthEventMovementUpdate) { // Test the peek function int32_t peek_steps = health_service_sum_today(HealthMetricStepCount); - APP_LOG(APP_LOG_LEVEL_DEBUG, "Got steps update event. (peek value: %d)", - (int)peek_steps); + APP_LOG(APP_LOG_LEVEL_DEBUG, "Got steps update event. (peek value: %d)", (int)peek_steps); data->cur_steps = peek_steps + data->steps_offset; steps_update_text(data); @@ -388,16 +360,15 @@ static void prv_health_event_handler(HealthEventType event, } else if (event == HealthEventMetricAlert) { HealthValue now_bpm = health_service_peek_current_value(HealthMetricHeartRateBPM); - APP_LOG(APP_LOG_LEVEL_INFO, "Crossed HR threshold of %d. HR: %"PRIi32" ", + APP_LOG(APP_LOG_LEVEL_INFO, "Crossed HR threshold of %d. HR: %" PRIi32 " ", (int)HEART_RATE_THRESHOLD, now_bpm); data->num_hr_alerts++; prv_hr_update_text(data); } } - // ------------------------------------------------------------------------------- -static void steps_base_layer_update_proc(Layer *layer, GContext* ctx) { +static void steps_base_layer_update_proc(Layer *layer, GContext *ctx) { const GRect bounds = layer_get_bounds(layer); graphics_context_set_fill_color(ctx, GColorBlack); @@ -415,20 +386,17 @@ static void steps_base_layer_update_proc(Layer *layer, GContext* ctx) { graphics_fill_radial(ctx, bounds, GOvalScaleModeFitCircle, 15, 0, TRIG_MAX_ANGLE * percent / 100); } - // ------------------------------------------------------------------------------- static void handle_battery(BatteryChargeState charge_state) { layer_mark_dirty(window_get_root_layer(s_data->steps_window)); } - // ------------------------------------------------------------------------------- -static void handle_minute_tick(struct tm* tick_time, TimeUnits units_changed) { +static void handle_minute_tick(struct tm *tick_time, TimeUnits units_changed) { APP_LOG(APP_LOG_LEVEL_DEBUG, "Got minute update"); steps_update_text(s_data); } - // ------------------------------------------------------------------------------- static void steps_window_load(Window *window) { HealthAPITestAppData *data = window_get_user_data(window); @@ -467,8 +435,7 @@ static void steps_window_load(Window *window) { // "Tracking disabled" message data->steps_card.msg_layer = text_layer_create(root_bounds); text_layer_set_text_alignment(data->steps_card.msg_layer, GTextAlignmentCenter); - text_layer_set_font(data->steps_card.msg_layer, - fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); + text_layer_set_font(data->steps_card.msg_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); text_layer_set_background_color(data->steps_card.msg_layer, GColorClear); text_layer_set_text_color(data->steps_card.msg_layer, GColorWhite); layer_add_child(window_layer, text_layer_get_layer(data->steps_card.msg_layer)); @@ -505,7 +472,6 @@ static void steps_window_load(Window *window) { battery_state_service_subscribe(handle_battery); } - // ------------------------------------------------------------------------------- static void steps_window_unload(Window *window) { HealthAPITestAppData *data = window_get_user_data(window); @@ -519,7 +485,6 @@ static void steps_window_unload(Window *window) { battery_state_service_unsubscribe(); } - // ------------------------------------------------------------------------------- static void steps_window_appear(Window *window) { HealthAPITestAppData *data = window_get_user_data(window); @@ -534,22 +499,19 @@ static void prv_results_back_click_handler(ClickRecognizerRef recognizer, void * window_stack_pop(true); } - // ------------------------------------------------------------------------------- static void results_click_config_provider(void *context) { window_single_click_subscribe(BUTTON_ID_BACK, prv_results_back_click_handler); } - // ------------------------------------------------------------------------------- -static void results_update_text(HealthAPITestAppData *data, const char* text) { +static void results_update_text(HealthAPITestAppData *data, const char *text) { strncpy(data->results_card.text, text, sizeof(data->results_card.text)); data->results_card.text[sizeof(data->results_card.text) - 1] = 0; text_layer_set_text(data->results_card.text_layer, data->results_card.text); layer_mark_dirty(text_layer_get_layer(data->results_card.text_layer)); } - // ------------------------------------------------------------------------------- static void results_window_load(Window *window) { HealthAPITestAppData *data = window_get_user_data(window); @@ -568,20 +530,16 @@ static void results_window_load(Window *window) { results_update_text(data, " "); } - // ------------------------------------------------------------------------------- static void results_window_unload(Window *window) { HealthAPITestAppData *data = window_get_user_data(window); text_layer_destroy(data->results_card.text_layer); } - - // ------------------------------------------------------------------------------- static void prv_hr_select_click_handler(ClickRecognizerRef recognizer, void *context) { } - // ------------------------------------------------------------------------------- static void prv_hr_up_click_handler(ClickRecognizerRef recognizer, void *context) { HealthAPITestAppData *data = (HealthAPITestAppData *)context; @@ -589,7 +547,6 @@ static void prv_hr_up_click_handler(ClickRecognizerRef recognizer, void *context window_stack_push(data->steps_window, true /* Animated */); } - // ------------------------------------------------------------------------------- static void prv_hr_down_click_handler(ClickRecognizerRef recognizer, void *context) { HealthAPITestAppData *data = (HealthAPITestAppData *)context; @@ -603,7 +560,6 @@ static void prv_hr_down_long_click_handler(ClickRecognizerRef recognizer, void * window_stack_push(data->debug_window, true /* Animated */); } - // ------------------------------------------------------------------------------- static void prv_hr_click_config_provider(void *context) { const int k_long_press_timeout_ms = 1000; @@ -614,7 +570,6 @@ static void prv_hr_click_config_provider(void *context) { prv_hr_down_long_click_handler, NULL); } - // ------------------------------------------------------------------------------- static void prv_hr_update_text(HealthAPITestAppData *data) { if (!data->hr_card.text_layer) { @@ -623,20 +578,19 @@ static void prv_hr_update_text(HealthAPITestAppData *data) { // Get the latest heart rate HealthValue now_bpm = health_service_peek_current_value(HealthMetricHeartRateBPM); HealthValue resting_bpm = health_service_peek_current_value(HealthMetricRestingHeartRateBPM); - APP_LOG(APP_LOG_LEVEL_DEBUG, "Got HR data. Now: %"PRIi32", Resting: %"PRIi32"", - now_bpm, resting_bpm); + APP_LOG(APP_LOG_LEVEL_DEBUG, "Got HR data. Now: %" PRIi32 ", Resting: %" PRIi32 "", now_bpm, + resting_bpm); data->cur_hr_bpm = now_bpm; data->resting_hr_bpm = resting_bpm; snprintf(data->hr_card.text, sizeof(data->hr_card.text), - "HR❤️\nNow: %"PRIu32"\nRest: %"PRIu32"\n Alerts: %"PRIu32" ", - data->cur_hr_bpm, data->resting_hr_bpm, data->num_hr_alerts); + "HR❤️\nNow: %" PRIu32 "\nRest: %" PRIu32 "\n Alerts: %" PRIu32 " ", data->cur_hr_bpm, + data->resting_hr_bpm, data->num_hr_alerts); text_layer_set_text(data->hr_card.text_layer, data->hr_card.text); layer_mark_dirty(text_layer_get_layer(data->hr_card.text_layer)); } - // ------------------------------------------------------------------------------- static void prv_hr_window_load(Window *window) { HealthAPITestAppData *data = window_get_user_data(window); @@ -646,8 +600,7 @@ static void prv_hr_window_load(Window *window) { data->hr_card.text_layer = text_layer_create(root_bounds); text_layer_set_text_alignment(data->hr_card.text_layer, GTextAlignmentCenter); text_layer_set_background_color(data->hr_card.text_layer, GColorClear); - text_layer_set_font(data->hr_card.text_layer, - fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD)); + text_layer_set_font(data->hr_card.text_layer, fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD)); text_layer_set_text_color(data->hr_card.text_layer, GColorWhite); layer_add_child(window_layer, text_layer_get_layer(data->hr_card.text_layer)); @@ -658,7 +611,6 @@ static void prv_hr_window_load(Window *window) { health_service_set_heart_rate_sample_period(1 /*interval_s*/); } - // ------------------------------------------------------------------------------- static void prv_hr_window_unload(Window *window) { HealthAPITestAppData *data = window_get_user_data(window); @@ -669,35 +621,30 @@ static void prv_hr_window_unload(Window *window) { health_service_set_heart_rate_sample_period(0 /*interval_s*/); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_step_history(int index, void *context) { HealthAPITestAppData *data = context; prv_display_scalar_history_alert(data, "Steps", HealthMetricStepCount); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_sleep_history(int index, void *context) { HealthAPITestAppData *data = context; prv_display_seconds_history_alert(data, "Sleep total", HealthMetricSleepSeconds); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_active_time_history(int index, void *context) { HealthAPITestAppData *data = context; prv_display_seconds_history_alert(data, "Active Time", HealthMetricActiveSeconds); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_distance_history(int index, void *context) { HealthAPITestAppData *data = context; prv_display_scalar_history_alert(data, "Distance(m)", HealthMetricWalkedDistanceMeters); } - // ----------------------------------------------------------------------------------------- static bool prv_activity_iterate_cb(HealthActivity activity, time_t time_start, time_t time_end, void *context) { @@ -729,11 +676,11 @@ static bool prv_activity_iterate_cb(HealthActivity activity, time_t time_start, char time_start_text[64]; struct tm *local_tm = localtime(&time_start); - strftime(time_start_text, sizeof(time_start_text), "%F %r", local_tm); + strftime(time_start_text, sizeof(time_start_text), "%F %r", local_tm); char time_end_text[64]; local_tm = localtime(&time_end); - strftime(time_end_text, sizeof(time_end_text), "%F %r", local_tm); + strftime(time_end_text, sizeof(time_end_text), "%F %r", local_tm); APP_LOG(APP_LOG_LEVEL_DEBUG, "Got activity: %s %s to %s (%d min)", activity_name, time_start_text, time_end_text, (int)((time_end - time_start) / SECONDS_PER_MINUTE)); @@ -752,14 +699,13 @@ static void prv_debug_cmd_sleep_sessions(int index, void *context) { char time_now_text[64]; struct tm *local_tm = localtime(&now); - strftime(time_now_text, sizeof(time_now_text), "%F %r", local_tm); + strftime(time_now_text, sizeof(time_now_text), "%F %r", local_tm); APP_LOG(APP_LOG_LEVEL_DEBUG, "Current time: %s", time_now_text); - // Check for correct operation of health_service_any_activity_accessible() time_t t_24_hrs_ago = now - SECONDS_PER_DAY; - HealthServiceAccessibilityMask mask = health_service_any_activity_accessible(HealthActivitySleep, - t_24_hrs_ago, now); + HealthServiceAccessibilityMask mask = + health_service_any_activity_accessible(HealthActivitySleep, t_24_hrs_ago, now); if (mask != HealthServiceAccessibilityMaskAvailable) { APP_LOG(APP_LOG_LEVEL_ERROR, "Unexpected accessibility result: %d", (int)mask); } @@ -767,10 +713,9 @@ static void prv_debug_cmd_sleep_sessions(int index, void *context) { health_service_activities_iterate(HealthActivityMaskAll, now - (2 * SECONDS_PER_DAY), now, HealthIterationDirectionFuture, prv_activity_iterate_cb, &num_activities_found); - APP_LOG(APP_LOG_LEVEL_DEBUG, "Found %"PRIu32" activities", num_activities_found); + APP_LOG(APP_LOG_LEVEL_DEBUG, "Found %" PRIu32 " activities", num_activities_found); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_minute_data(int index, void *context) { HealthAPITestAppData *data = context; @@ -778,8 +723,7 @@ static void prv_debug_cmd_minute_data(int index, void *context) { const uint32_t k_size = 1000; HealthMinuteData *minute_data = malloc(k_size * sizeof(HealthMinuteData)); if (!minute_data) { - snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), - "Out of memory"); + snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), "Out of memory"); prv_display_alert(data->debug_card.dialog_text); goto exit; } @@ -787,7 +731,7 @@ static void prv_debug_cmd_minute_data(int index, void *context) { time_t now = time(NULL); char time_now_text[64]; struct tm *local_tm = localtime(&now); - strftime(time_now_text, sizeof(time_now_text), "%F %r", local_tm); + strftime(time_now_text, sizeof(time_now_text), "%F %r", local_tm); APP_LOG(APP_LOG_LEVEL_DEBUG, "Current time: %s", time_now_text); // Start as far back as 30 days ago @@ -809,7 +753,7 @@ static void prv_debug_cmd_minute_data(int index, void *context) { if (num_minutes > 0) { APP_LOG(APP_LOG_LEVEL_DEBUG, "Got %d minutes: %s to %s", num_minutes, time_start_text, - time_end_text); + time_end_text); } else { APP_LOG(APP_LOG_LEVEL_DEBUG, "No more data"); } @@ -824,28 +768,27 @@ static void prv_debug_cmd_minute_data(int index, void *context) { // Print summary APP_LOG(APP_LOG_LEVEL_DEBUG, "Retrieved %d minute data records", (int)num_records); - // Print detail on the last few minutes const int k_print_batch_size = 30; APP_LOG(APP_LOG_LEVEL_DEBUG, "Fetching last %d minutes", k_print_batch_size); utc_start = time(NULL) - (k_print_batch_size * SECONDS_PER_MINUTE); utc_end = time(NULL); uint64_t start_ms = prv_ms(); - num_minutes = health_service_get_minute_history(minute_data, k_print_batch_size, &utc_start, - &utc_end); + num_minutes = + health_service_get_minute_history(minute_data, k_print_batch_size, &utc_start, &utc_end); uint64_t elapsed_ms = prv_ms() - start_ms; char time_start_text[64]; local_tm = localtime(&utc_start); - strftime(time_start_text, sizeof(time_start_text), "%F %r", local_tm); + strftime(time_start_text, sizeof(time_start_text), "%F %r", local_tm); char time_end_text[64]; local_tm = localtime(&utc_end); - strftime(time_end_text, sizeof(time_end_text), "%F %r", local_tm); + strftime(time_end_text, sizeof(time_end_text), "%F %r", local_tm); if (num_minutes > 0) { - APP_LOG(APP_LOG_LEVEL_DEBUG, "Got %d minutes in %"PRIu32" ms: %s to %s", num_minutes, - (uint32_t) elapsed_ms, time_start_text, time_end_text); + APP_LOG(APP_LOG_LEVEL_DEBUG, "Got %d minutes in %" PRIu32 " ms: %s to %s", num_minutes, + (uint32_t)elapsed_ms, time_start_text, time_end_text); } else { APP_LOG(APP_LOG_LEVEL_DEBUG, "No data available in last %d minutes", k_print_batch_size); } @@ -854,8 +797,8 @@ static void prv_debug_cmd_minute_data(int index, void *context) { if (num_minutes >= k_num_last_minutes) { for (int i = num_minutes - k_num_last_minutes; i < num_minutes; i++) { HealthMinuteData *m_data = &minute_data[i]; - APP_LOG(APP_LOG_LEVEL_DEBUG, "%"PRId8", 0x%"PRIx8", %"PRIu16", %"PRId8" ", - m_data->steps, m_data->orientation, m_data->vmc, m_data->light); + APP_LOG(APP_LOG_LEVEL_DEBUG, "%" PRId8 ", 0x%" PRIx8 ", %" PRIu16 ", %" PRId8 " ", + m_data->steps, m_data->orientation, m_data->vmc, m_data->light); } } @@ -863,7 +806,6 @@ static void prv_debug_cmd_minute_data(int index, void *context) { free(minute_data); } - // ----------------------------------------------------------------------------------------- static void prv_daily_metric_avg(HealthAPITestAppData *data, HealthMetric metric, const char *name) { @@ -898,11 +840,9 @@ static void prv_daily_metric_avg(HealthAPITestAppData *data, HealthMetric metric snprintf(temp, sizeof(temp), "\ndaily: %d", (int)avg); prv_safe_strcat(data->debug_card.dialog_text, temp, sizeof(data->debug_card.dialog_text)); - prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_intraday_metric_avg(HealthAPITestAppData *data, HealthMetric metric, const char *name) { @@ -930,35 +870,30 @@ static void prv_intraday_metric_avg(HealthAPITestAppData *data, HealthMetric met prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_daily_step_avg(int index, void *context) { HealthAPITestAppData *data = context; prv_daily_metric_avg(data, HealthMetricStepCount, "Steps:"); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_intraday_step_avg(int index, void *context) { HealthAPITestAppData *data = context; prv_intraday_metric_avg(data, HealthMetricStepCount, "Steps:"); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_daily_active_seconds_avg(int index, void *context) { HealthAPITestAppData *data = context; prv_daily_metric_avg(data, HealthMetricActiveSeconds, "Active seconds:"); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_intraday_active_seconds_avg(int index, void *context) { HealthAPITestAppData *data = context; prv_intraday_metric_avg(data, HealthMetricActiveSeconds, "Active seconds:"); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_heart_rate_api(int index, void *context) { HealthAPITestAppData *data = context; @@ -969,7 +904,7 @@ static void prv_debug_cmd_heart_rate_api(int index, void *context) { value = health_service_aggregate_averaged(HealthMetricRestingKCalories, time_start_of_today(), time(NULL), HealthAggregationSum, HealthServiceTimeScopeOnce); - APP_LOG(APP_LOG_LEVEL_DEBUG, "Result from aggregate_averaged resting cals: %"PRIi32" ", value); + APP_LOG(APP_LOG_LEVEL_DEBUG, "Result from aggregate_averaged resting cals: %" PRIi32 " ", value); if (value == 0) { passed = false; goto exit; @@ -979,17 +914,17 @@ static void prv_debug_cmd_heart_rate_api(int index, void *context) { value = health_service_aggregate_averaged(HealthMetricRestingKCalories, time_start_of_today(), time(NULL), HealthAggregationAvg, HealthServiceTimeScopeOnce); - APP_LOG(APP_LOG_LEVEL_DEBUG, "Result from aggregate_averaged resting cals: %"PRIi32" ", value); + APP_LOG(APP_LOG_LEVEL_DEBUG, "Result from aggregate_averaged resting cals: %" PRIi32 " ", value); if (value != 0) { passed = false; goto exit; } // Getting heart rate using sum should fail - value = health_service_aggregate_averaged(HealthMetricHeartRateBPM, time_start_of_today(), - time(NULL), HealthAggregationSum, - HealthServiceTimeScopeOnce); - APP_LOG(APP_LOG_LEVEL_DEBUG, "Result from aggregate_averaged heart-rate: %"PRIi32" ", value); + value = + health_service_aggregate_averaged(HealthMetricHeartRateBPM, time_start_of_today(), time(NULL), + HealthAggregationSum, HealthServiceTimeScopeOnce); + APP_LOG(APP_LOG_LEVEL_DEBUG, "Result from aggregate_averaged heart-rate: %" PRIi32 " ", value); if (value != 0) { passed = false; goto exit; @@ -1008,11 +943,9 @@ static void prv_debug_cmd_heart_rate_api(int index, void *context) { } // accessibility with heart rate should work - access = health_service_metric_aggregate_averaged_accessible(HealthMetricHeartRateBPM, - time_start_of_today(), - time(NULL), - HealthAggregationAvg, - HealthServiceTimeScopeOnce); + access = health_service_metric_aggregate_averaged_accessible( + HealthMetricHeartRateBPM, time_start_of_today(), time(NULL), HealthAggregationAvg, + HealthServiceTimeScopeOnce); APP_LOG(APP_LOG_LEVEL_DEBUG, "Result from aggregate_averaged_accessible heart rate, sum: 0x%x", access); if (access != HealthServiceAccessibilityMaskAvailable) { @@ -1035,13 +968,12 @@ static void prv_debug_cmd_heart_rate_api(int index, void *context) { goto exit; } - exit: +exit: strncpy(data->debug_card.dialog_text, passed ? "PASS" : "FAIL", sizeof(data->debug_card.dialog_text)); prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_heart_rate_stats(int index, void *context) { HealthAPITestAppData *data = context; @@ -1057,8 +989,8 @@ static void prv_debug_cmd_heart_rate_stats(int index, void *context) { } TimeRange; TimeRange ranges[] = { - {1 * SECONDS_PER_HOUR, "1 hour"}, - {30 * SECONDS_PER_MINUTE, "30 min"}, + {1 * SECONDS_PER_HOUR, "1 hour"}, + {30 * SECONDS_PER_MINUTE, "30 min"}, }; unsigned num_ranges = ARRAY_LENGTH(ranges); @@ -1068,15 +1000,15 @@ static void prv_debug_cmd_heart_rate_stats(int index, void *context) { HealthServiceTimeScopeOnce); HealthValue max = health_service_aggregate_averaged( - HealthMetricHeartRateBPM, end_time - ranges[i].seconds, end_time, HealthAggregationMax, - HealthServiceTimeScopeOnce); + HealthMetricHeartRateBPM, end_time - ranges[i].seconds, end_time, HealthAggregationMax, + HealthServiceTimeScopeOnce); HealthValue avg = health_service_aggregate_averaged( - HealthMetricHeartRateBPM, end_time - ranges[i].seconds, end_time, HealthAggregationAvg, - HealthServiceTimeScopeOnce); + HealthMetricHeartRateBPM, end_time - ranges[i].seconds, end_time, HealthAggregationAvg, + HealthServiceTimeScopeOnce); char temp[64]; - snprintf(temp, sizeof(temp), "%s: min: %"PRIi32", max: %"PRIi32", avg: %"PRIi32" \n", + snprintf(temp, sizeof(temp), "%s: min: %" PRIi32 ", max: %" PRIi32 ", avg: %" PRIi32 " \n", ranges[i].desc, min, max, avg); APP_LOG(APP_LOG_LEVEL_DEBUG, "%s", temp); prv_safe_strcat(data->debug_card.dialog_text, temp, sizeof(data->debug_card.dialog_text)); @@ -1084,7 +1016,6 @@ static void prv_debug_cmd_heart_rate_stats(int index, void *context) { prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void debug_window_load(Window *window) { HealthAPITestAppData *data = window_get_user_data(window); @@ -1092,64 +1023,70 @@ static void debug_window_load(Window *window) { GRect bounds = layer_get_bounds(window_layer); static SimpleMenuItem menu_items[] = { - { - .title = "Step History", - .callback = prv_debug_cmd_step_history, - }, { - .title = "Active Minutes History", - .callback = prv_debug_cmd_active_time_history, - }, { - .title = "Distance(m) History", - .callback = prv_debug_cmd_distance_history, - }, { - .title = "Sleep History", - .callback = prv_debug_cmd_sleep_history, - }, { - .title = "Sleep Sessions", - .callback = prv_debug_cmd_sleep_sessions, - }, { - .title = "Read Minute data", - .callback = prv_debug_cmd_minute_data, - }, { - .title = "Daily step avg", - .callback = prv_debug_cmd_daily_step_avg, - }, { - .title = "Intraday step avg", - .callback = prv_debug_cmd_intraday_step_avg, - }, { - .title = "Daily active sec. avg", - .callback = prv_debug_cmd_daily_active_seconds_avg, - }, { - .title = "Intraday active sec. avg", - .callback = prv_debug_cmd_intraday_active_seconds_avg, - }, { - .title = "Heart Rate Stats", - .callback = prv_debug_cmd_heart_rate_stats, - }, { - .title = "Heart Rate API", - .callback = prv_debug_cmd_heart_rate_api, - } + { + .title = "Step History", + .callback = prv_debug_cmd_step_history, + }, + { + .title = "Active Minutes History", + .callback = prv_debug_cmd_active_time_history, + }, + { + .title = "Distance(m) History", + .callback = prv_debug_cmd_distance_history, + }, + { + .title = "Sleep History", + .callback = prv_debug_cmd_sleep_history, + }, + { + .title = "Sleep Sessions", + .callback = prv_debug_cmd_sleep_sessions, + }, + { + .title = "Read Minute data", + .callback = prv_debug_cmd_minute_data, + }, + { + .title = "Daily step avg", + .callback = prv_debug_cmd_daily_step_avg, + }, + { + .title = "Intraday step avg", + .callback = prv_debug_cmd_intraday_step_avg, + }, + { + .title = "Daily active sec. avg", + .callback = prv_debug_cmd_daily_active_seconds_avg, + }, + { + .title = "Intraday active sec. avg", + .callback = prv_debug_cmd_intraday_active_seconds_avg, + }, + { + .title = "Heart Rate Stats", + .callback = prv_debug_cmd_heart_rate_stats, + }, + { + .title = "Heart Rate API", + .callback = prv_debug_cmd_heart_rate_api, + } }; static const SimpleMenuSection sections[] = { - { - .items = menu_items, - .num_items = ARRAY_LENGTH(menu_items) - } + {.items = menu_items, .num_items = ARRAY_LENGTH(menu_items)} }; data->debug_card.menu_items = menu_items; - data->debug_card.menu_layer = simple_menu_layer_create(bounds, window, sections, - ARRAY_LENGTH(sections), data); + data->debug_card.menu_layer = + simple_menu_layer_create(bounds, window, sections, ARRAY_LENGTH(sections), data); layer_add_child(window_layer, simple_menu_layer_get_layer(data->debug_card.menu_layer)); } - // ------------------------------------------------------------------------------- static void debug_window_unload(Window *window) { simple_menu_layer_destroy(s_data->debug_card.menu_layer); } - // ------------------------------------------------------------------------------- static void deinit(void) { window_destroy(s_data->steps_window); @@ -1157,7 +1094,6 @@ static void deinit(void) { s_data = NULL; } - // ------------------------------------------------------------------------------- static void init(void) { HealthAPITestAppData *data = malloc(sizeof(HealthAPITestAppData)); @@ -1173,11 +1109,11 @@ static void init(void) { window_set_user_data(data->steps_window, data); window_set_click_config_provider_with_context(data->steps_window, steps_click_config_provider, data); - window_set_window_handlers(data->steps_window, (WindowHandlers) { - .load = steps_window_load, - .unload = steps_window_unload, - .appear = steps_window_appear, - }); + window_set_window_handlers(data->steps_window, (WindowHandlers){ + .load = steps_window_load, + .unload = steps_window_unload, + .appear = steps_window_appear, + }); // Sleep window data->sleep_window = window_create(); @@ -1185,18 +1121,18 @@ static void init(void) { window_set_user_data(data->sleep_window, data); window_set_click_config_provider_with_context(data->sleep_window, sleep_click_config_provider, data); - window_set_window_handlers(data->sleep_window, (WindowHandlers) { - .load = sleep_window_load, - .unload = sleep_window_unload, - }); + window_set_window_handlers(data->sleep_window, (WindowHandlers){ + .load = sleep_window_load, + .unload = sleep_window_unload, + }); // Debug window data->debug_window = window_create(); window_set_user_data(data->debug_window, data); - window_set_window_handlers(data->debug_window, (WindowHandlers) { - .load = debug_window_load, - .unload = debug_window_unload, - }); + window_set_window_handlers(data->debug_window, (WindowHandlers){ + .load = debug_window_load, + .unload = debug_window_unload, + }); // Results window data->results_window = window_create(); @@ -1204,10 +1140,10 @@ static void init(void) { window_set_user_data(data->results_window, data); window_set_click_config_provider_with_context(data->results_window, results_click_config_provider, data); - window_set_window_handlers(data->results_window, (WindowHandlers) { - .load = results_window_load, - .unload = results_window_unload, - }); + window_set_window_handlers(data->results_window, (WindowHandlers){ + .load = results_window_load, + .unload = results_window_unload, + }); // Heart rate window data->hr_window = window_create(); @@ -1215,15 +1151,14 @@ static void init(void) { window_set_user_data(data->hr_window, data); window_set_click_config_provider_with_context(data->hr_window, prv_hr_click_config_provider, data); - window_set_window_handlers(data->hr_window, (WindowHandlers) { - .load = prv_hr_window_load, - .unload = prv_hr_window_unload, - }); + window_set_window_handlers(data->hr_window, (WindowHandlers){ + .load = prv_hr_window_load, + .unload = prv_hr_window_unload, + }); window_stack_push(data->steps_window, true /* Animated */); } - // ------------------------------------------------------------------------------- int main(void) { init(); diff --git a/apps/samples/launch_reason_demo/src/launch_reason_demo.c b/apps/samples/launch_reason_demo/src/launch_reason_demo.c index 1e63077de3..38cdd24a72 100644 --- a/apps/samples/launch_reason_demo/src/launch_reason_demo.c +++ b/apps/samples/launch_reason_demo/src/launch_reason_demo.c @@ -13,7 +13,7 @@ static void prv_wakeup_handler(WakeupId id, int32_t reason) { static void select_click_handler(ClickRecognizerRef recognizer, void *context) { wakeup_service_subscribe(prv_wakeup_handler); - wakeup_schedule(time(NULL) + 5 , 1, false); + wakeup_schedule(time(NULL) + 5, 1, false); window_stack_pop(true); } @@ -24,39 +24,55 @@ static void click_config_provider(void *context) { static char *get_launch_reason_str(void) { static char s_buffer[64]; switch (launch_reason()) { - case APP_LAUNCH_SYSTEM: - return "SYSTEM"; - case APP_LAUNCH_USER: - case APP_LAUNCH_QUICK_LAUNCH: { - const char *reason = (launch_reason() == APP_LAUNCH_USER) ? "USER" : "QUICK LAUNCH"; - const char *btn_str = "UNKNOWN"; - switch (launch_button()) { - case BUTTON_ID_BACK: btn_str = "BACK"; break; - case BUTTON_ID_UP: btn_str = "UP"; break; - case BUTTON_ID_SELECT: btn_str = "SELECT"; break; - case BUTTON_ID_DOWN: btn_str = "DOWN"; break; - default: break; - } - const char *action_str = ""; - if (launch_reason() == APP_LAUNCH_QUICK_LAUNCH) { - switch (launch_get_quick_launch_action()) { - case APP_QUICK_LAUNCH_ACTION_HOLD: action_str = " [HOLD]"; break; - case APP_QUICK_LAUNCH_ACTION_TAP: action_str = " [TAP]"; break; - case APP_QUICK_LAUNCH_ACTION_COMBO: action_str = " [COMBO]"; break; - default: break; + case APP_LAUNCH_SYSTEM: + return "SYSTEM"; + case APP_LAUNCH_USER: + case APP_LAUNCH_QUICK_LAUNCH: { + const char *reason = (launch_reason() == APP_LAUNCH_USER) ? "USER" : "QUICK LAUNCH"; + const char *btn_str = "UNKNOWN"; + switch (launch_button()) { + case BUTTON_ID_BACK: + btn_str = "BACK"; + break; + case BUTTON_ID_UP: + btn_str = "UP"; + break; + case BUTTON_ID_SELECT: + btn_str = "SELECT"; + break; + case BUTTON_ID_DOWN: + btn_str = "DOWN"; + break; + default: + break; + } + const char *action_str = ""; + if (launch_reason() == APP_LAUNCH_QUICK_LAUNCH) { + switch (launch_get_quick_launch_action()) { + case APP_QUICK_LAUNCH_ACTION_HOLD: + action_str = " [HOLD]"; + break; + case APP_QUICK_LAUNCH_ACTION_TAP: + action_str = " [TAP]"; + break; + case APP_QUICK_LAUNCH_ACTION_COMBO: + action_str = " [COMBO]"; + break; + default: + break; + } } + snprintf(s_buffer, sizeof(s_buffer), "%s (%s)%s", reason, btn_str, action_str); + return s_buffer; } - snprintf(s_buffer, sizeof(s_buffer), "%s (%s)%s", reason, btn_str, action_str); - return s_buffer; - } - case APP_LAUNCH_PHONE: - return "PHONE"; - case APP_LAUNCH_WAKEUP: - return "WAKEUP"; - case APP_LAUNCH_WORKER: - return "WORKER"; - case APP_LAUNCH_TIMELINE_ACTION: - return "TIMELINE ACTION"; + case APP_LAUNCH_PHONE: + return "PHONE"; + case APP_LAUNCH_WAKEUP: + return "WAKEUP"; + case APP_LAUNCH_WORKER: + return "WORKER"; + case APP_LAUNCH_TIMELINE_ACTION: + return "TIMELINE ACTION"; } return "ERROR"; } @@ -85,10 +101,10 @@ static void window_unload(Window *window) { static void init(void) { window = window_create(); window_set_click_config_provider(window, click_config_provider); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - .unload = window_unload, - }); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + .unload = window_unload, + }); const bool animated = true; window_stack_push(window, animated); } diff --git a/apps/samples/localtime_gmtime_test/src/localtime_gmtime_test.c b/apps/samples/localtime_gmtime_test/src/localtime_gmtime_test.c index f640b52479..df59ee9b5c 100644 --- a/apps/samples/localtime_gmtime_test/src/localtime_gmtime_test.c +++ b/apps/samples/localtime_gmtime_test/src/localtime_gmtime_test.c @@ -8,7 +8,6 @@ static TextLayer *time_layer; static TextLayer *gmtime_layer; static TextLayer *localtime_layer; - static void window_load(Window *window) { Layer *window_layer = window_get_root_layer(window); @@ -16,7 +15,7 @@ static void window_load(Window *window) { // Time layer static char time_buf[32]; - snprintf(time_buf, 32, "time: %u", (unsigned) the_time); + snprintf(time_buf, 32, "time: %u", (unsigned)the_time); time_layer = text_layer_create(GRect(0, 0, 144, 168)); text_layer_set_text(time_layer, time_buf); @@ -26,8 +25,8 @@ static void window_load(Window *window) { // Time layer struct tm *gm_time = gmtime(&the_time); static char gmtime_buf[32]; - snprintf(gmtime_buf, 32, "gmtime: %d:%02d, is_dst: %d", - gm_time->tm_hour, gm_time->tm_min, gm_time->tm_isdst); + snprintf(gmtime_buf, 32, "gmtime: %d:%02d, is_dst: %d", gm_time->tm_hour, gm_time->tm_min, + gm_time->tm_isdst); gmtime_layer = text_layer_create(GRect(0, 40, 144, 168)); text_layer_set_text(gmtime_layer, gmtime_buf); @@ -41,8 +40,8 @@ static void window_load(Window *window) { // Time layer struct tm *lt_time = localtime(&the_time); static char localtime_buf[32]; - snprintf(localtime_buf, 32, "localtime: %d:%02d, is_dst: %d", - lt_time->tm_hour, lt_time->tm_min, lt_time->tm_isdst); + snprintf(localtime_buf, 32, "localtime: %d:%02d, is_dst: %d", lt_time->tm_hour, lt_time->tm_min, + lt_time->tm_isdst); localtime_layer = text_layer_create(GRect(0, 96, 144, 168)); text_layer_set_text(localtime_layer, localtime_buf); @@ -62,10 +61,10 @@ static void window_unload(Window *window) { static void init(void) { window = window_create(); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - .unload = window_unload, - }); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + .unload = window_unload, + }); const bool animated = true; window_stack_push(window, animated); } diff --git a/apps/samples/startup_crash_demo/src/crash_demo.c b/apps/samples/startup_crash_demo/src/crash_demo.c index eb8087f965..380059742d 100644 --- a/apps/samples/startup_crash_demo/src/crash_demo.c +++ b/apps/samples/startup_crash_demo/src/crash_demo.c @@ -9,4 +9,3 @@ int main(void) { app_event_loop(); } - diff --git a/apps/samples/strftime_test/src/strftime_test.c b/apps/samples/strftime_test/src/strftime_test.c index 17a4dfde26..79632f7151 100644 --- a/apps/samples/strftime_test/src/strftime_test.c +++ b/apps/samples/strftime_test/src/strftime_test.c @@ -7,30 +7,29 @@ static Window *window; static TextLayer *result_layer; static struct tm good_data = { - .tm_sec = 49, - .tm_min = 4, - .tm_hour = 11, - .tm_mday = 5, - .tm_mon = 4, - .tm_year = 115, - .tm_wday = 2, - .tm_yday = 124, - .tm_isdst = 1 + .tm_sec = 49, + .tm_min = 4, + .tm_hour = 11, + .tm_mday = 5, + .tm_mon = 4, + .tm_year = 115, + .tm_wday = 2, + .tm_yday = 124, + .tm_isdst = 1 }; static struct tm bad_data = { - .tm_sec = 49756567, - .tm_min = 49756567, - .tm_hour = 49756567, - .tm_mday = 49756567, - .tm_mon = 49756567, - .tm_year = 49756567, - .tm_wday = 49756567, - .tm_yday = 49756567, - .tm_isdst = 49756567 + .tm_sec = 49756567, + .tm_min = 49756567, + .tm_hour = 49756567, + .tm_mday = 49756567, + .tm_mon = 49756567, + .tm_year = 49756567, + .tm_wday = 49756567, + .tm_yday = 49756567, + .tm_isdst = 49756567 }; - static void prv_test_valid_data(void) { const int buf_size = 64; char buf[buf_size]; @@ -280,7 +279,6 @@ static void window_load(Window *window) { prv_test_valid_data(); prv_test_invalid_data(); - Layer *window_layer = window_get_root_layer(window); result_layer = text_layer_create(GRect(0, 0, 144, 168)); text_layer_set_text(result_layer, "strftime() test. Check the app logs for details"); @@ -294,10 +292,10 @@ static void window_unload(Window *window) { static void init(void) { window = window_create(); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - .unload = window_unload, - }); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + .unload = window_unload, + }); const bool animated = true; window_stack_push(window, animated); } diff --git a/apps/samples/timer_starve/src/timer_starve.c b/apps/samples/timer_starve/src/timer_starve.c index 835ae8035c..99dec18ad8 100644 --- a/apps/samples/timer_starve/src/timer_starve.c +++ b/apps/samples/timer_starve/src/timer_starve.c @@ -23,10 +23,12 @@ static void init(void) { GRect window_bounds = layer_get_bounds(window_layer); TextLayer *text_layer = text_layer_create(window_bounds); - text_layer_set_text(text_layer, "Unplug and plug in the charger. You will see that the system cannot keep up with it."); + text_layer_set_text( + text_layer, + "Unplug and plug in the charger. You will see that the system cannot keep up with it."); layer_add_child(window_layer, text_layer_get_layer(text_layer)); - text_layer = text_layer_create((GRect) {{ 0, window_bounds.size.h / 2 }, window_bounds.size} ); + text_layer = text_layer_create((GRect){{0, window_bounds.size.h / 2}, window_bounds.size}); static char buffer[80]; snprintf(buffer, sizeof(buffer), "FPS: %u", FPS); text_layer_set_text(text_layer, buffer); @@ -41,4 +43,3 @@ int main(void) { init(); app_event_loop(); } - diff --git a/apps/samples/watch_info_test/src/watch_info_test.c b/apps/samples/watch_info_test/src/watch_info_test.c index 5a458cd6ba..ef9ab00162 100644 --- a/apps/samples/watch_info_test/src/watch_info_test.c +++ b/apps/samples/watch_info_test/src/watch_info_test.c @@ -16,7 +16,8 @@ static void window_load(Window *window) { WatchInfoColor color = watch_info_get_color(); WatchInfoModel model = watch_info_get_model(); WatchInfoVersion version = watch_info_get_firmware_version(); - snprintf(buffer, 64, "Version: %d.%d.%d\nColor: %d\nModel: %d", version.major, version.minor, version.patch, color, model); + snprintf(buffer, 64, "Version: %d.%d.%d\nColor: %d\nModel: %d", version.major, version.minor, + version.patch, color, model); text_layer_set_text(text_layer, buffer); text_layer_set_text_alignment(text_layer, GTextAlignmentCenter); @@ -29,10 +30,10 @@ static void window_unload(Window *window) { static void init(void) { window = window_create(); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - .unload = window_unload, - }); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + .unload = window_unload, + }); const bool animated = true; window_stack_push(window, animated); } diff --git a/apps/samples/window_transitions/src/window_transitions.c b/apps/samples/window_transitions/src/window_transitions.c index 1c498c122b..f028a8b04f 100644 --- a/apps/samples/window_transitions/src/window_transitions.c +++ b/apps/samples/window_transitions/src/window_transitions.c @@ -22,9 +22,9 @@ static void click_config_provider(void *context) { static void push_window(void) { Window *window = window_create(); window_set_fullscreen(window, s_next_window_fullscreen); - window_set_window_handlers(window, (WindowHandlers) { - .unload = unload_handler, - }); + window_set_window_handlers(window, (WindowHandlers){ + .unload = unload_handler, + }); window_set_click_config_provider(window, click_config_provider); s_next_window_fullscreen = !s_next_window_fullscreen; diff --git a/apps/stored/golf/src/golf.c b/apps/stored/golf/src/golf.c index 456b43a5ca..131a8deb0a 100644 --- a/apps/stored/golf/src/golf.c +++ b/apps/stored/golf/src/golf.c @@ -13,12 +13,12 @@ #define i18n_free_all(data) enum { - GOLF_FRONT_KEY = 0x0, // TUPLE_CSTRING - GOLF_MID_KEY = 0x1, // TUPLE_CSTRING - GOLF_BACK_KEY = 0x2, // TUPLE_CSTRING - GOLF_HOLE_KEY = 0x3, // TUPLE_CSTRING - GOLF_PAR_KEY = 0x4, // TUPLE_CSTRING - GOLF_CMD_KEY = 0x5, // TUPLE_INTEGER + GOLF_FRONT_KEY = 0x0, // TUPLE_CSTRING + GOLF_MID_KEY = 0x1, // TUPLE_CSTRING + GOLF_BACK_KEY = 0x2, // TUPLE_CSTRING + GOLF_HOLE_KEY = 0x3, // TUPLE_CSTRING + GOLF_PAR_KEY = 0x4, // TUPLE_CSTRING + GOLF_CMD_KEY = 0x5, // TUPLE_INTEGER }; enum { @@ -39,11 +39,11 @@ typedef enum { } TextIdx; const int KEY_TO_TEXT_IDX[] = { - [GOLF_FRONT_KEY] = TextFront, - [GOLF_MID_KEY] = TextMid, - [GOLF_BACK_KEY] = TextBack, - [GOLF_HOLE_KEY] = TextHole, - [GOLF_PAR_KEY] = TextPar + [GOLF_FRONT_KEY] = TextFront, + [GOLF_MID_KEY] = TextMid, + [GOLF_BACK_KEY] = TextBack, + [GOLF_HOLE_KEY] = TextHole, + [GOLF_PAR_KEY] = TextPar }; typedef struct { @@ -98,15 +98,15 @@ static void sync_tuple_changed_callback(const uint32_t key, const Tuple *new_tup AppData *data = context; TextLayer **text = &data->text_layers[0]; switch (key) { - case GOLF_BACK_KEY: - case GOLF_MID_KEY: - case GOLF_FRONT_KEY: - case GOLF_HOLE_KEY: - case GOLF_PAR_KEY: - text_layer_set_text(text[KEY_TO_TEXT_IDX[key]], new_tuple->value->cstring); - default: - // Unknown key - return; + case GOLF_BACK_KEY: + case GOLF_MID_KEY: + case GOLF_FRONT_KEY: + case GOLF_HOLE_KEY: + case GOLF_PAR_KEY: + text_layer_set_text(text[KEY_TO_TEXT_IDX[key]], new_tuple->value->cstring); + default: + // Unknown key + return; } } @@ -137,9 +137,9 @@ static void select_click_handler(UNUSED ClickRecognizerRef recognizer, UNUSED Ap } static void config_provider(UNUSED AppData *data) { - window_single_click_subscribe(BUTTON_ID_UP, (ClickHandler) up_click_handler); - window_single_click_subscribe(BUTTON_ID_DOWN, (ClickHandler) down_click_handler); - window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler) select_click_handler); + window_single_click_subscribe(BUTTON_ID_UP, (ClickHandler)up_click_handler); + window_single_click_subscribe(BUTTON_ID_DOWN, (ClickHandler)down_click_handler); + window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler)select_click_handler); } static void window_unload(Window *window) { @@ -171,8 +171,8 @@ static void background_update_proc(Layer *layer, GContext *ctx) { const int16_t horizontal_divider_width = PBL_IF_ROUND_ELSE(51, bounds.size.w - ACTION_BAR_WIDTH); const int16_t vertical_divider_x_offset = PBL_IF_ROUND_ELSE(72, horizontal_divider_width / 2); const int16_t horizontal_divider_x_offset = PBL_IF_ROUND_ELSE(vertical_divider_x_offset, 0); - const int16_t vertical_divider_y_offset = PBL_IF_ROUND_ELSE( - 37, bounds.size.h - vertical_divider_height); + const int16_t vertical_divider_y_offset = + PBL_IF_ROUND_ELSE(37, bounds.size.h - vertical_divider_height); const uint16_t horizontal_divider_y_offset = PBL_IF_ROUND_ELSE( vertical_divider_y_offset + (vertical_divider_height / 2), vertical_divider_y_offset); @@ -222,12 +222,10 @@ static void window_load(Window *window) { action_bar_layer_set_icon(data->action_bar, BUTTON_ID_SELECT, data->click_bitmap); action_bar_layer_set_icon(data->action_bar, BUTTON_ID_DOWN, data->down_bitmap); action_bar_layer_set_click_config_provider(data->action_bar, - (ClickConfigProvider) config_provider); - action_bar_layer_set_icon_press_animation(data->action_bar, - BUTTON_ID_UP, + (ClickConfigProvider)config_provider); + action_bar_layer_set_icon_press_animation(data->action_bar, BUTTON_ID_UP, ActionBarLayerIconPressAnimationMoveUp); - action_bar_layer_set_icon_press_animation(data->action_bar, - BUTTON_ID_DOWN, + action_bar_layer_set_icon_press_animation(data->action_bar, BUTTON_ID_DOWN, ActionBarLayerIconPressAnimationMoveDown); action_bar_layer_add_to_window(data->action_bar, data->window); @@ -242,20 +240,20 @@ static void window_load(Window *window) { layer_add_child(background, status_bar_layer_get_layer(data->status_layer)); // labels - const char * const font_key_label = FONT_KEY_GOTHIC_09; + const char *const font_key_label = FONT_KEY_GOTHIC_09; // back, mid, front numbers - const char * const font_key_small_numbers = PBL_IF_ROUND_ELSE(FONT_KEY_LECO_20_BOLD_NUMBERS, - FONT_KEY_LECO_28_LIGHT_NUMBERS); - const char * const font_key_accent_numbers = PBL_IF_ROUND_ELSE(FONT_KEY_LECO_20_BOLD_NUMBERS, - FONT_KEY_LECO_38_BOLD_NUMBERS); + const char *const font_key_small_numbers = + PBL_IF_ROUND_ELSE(FONT_KEY_LECO_20_BOLD_NUMBERS, FONT_KEY_LECO_28_LIGHT_NUMBERS); + const char *const font_key_accent_numbers = + PBL_IF_ROUND_ELSE(FONT_KEY_LECO_20_BOLD_NUMBERS, FONT_KEY_LECO_38_BOLD_NUMBERS); // hole, par numbers - const char * const font_key_large_numbers = PBL_IF_ROUND_ELSE(FONT_KEY_LECO_32_BOLD_NUMBERS, - FONT_KEY_LECO_38_BOLD_NUMBERS); + const char *const font_key_large_numbers = + PBL_IF_ROUND_ELSE(FONT_KEY_LECO_32_BOLD_NUMBERS, FONT_KEY_LECO_38_BOLD_NUMBERS); // "disconnected" text - const char * const font_key_disconnected = FONT_KEY_GOTHIC_24_BOLD; + const char *const font_key_disconnected = FONT_KEY_GOTHIC_24_BOLD; - static const GTextAlignment distance_text_alignment = PBL_IF_ROUND_ELSE(GTextAlignmentRight, - GTextAlignmentCenter); + static const GTextAlignment distance_text_alignment = + PBL_IF_ROUND_ELSE(GTextAlignmentRight, GTextAlignmentCenter); // text heights only used for setting text box height, not for layout const int16_t label_height = 10; @@ -284,28 +282,28 @@ static void window_load(Window *window) { const int16_t par_value_y_offset = hole_value_y_offset + PBL_IF_ROUND_ELSE(stroke_box_height, 0); // Hole label. - text[TextHoleLabel] = text_layer_create(GRect(hole_box_x_offset, hole_label_y_offset, - stroke_box_width, label_height)); - prv_setup_text_layer(text[TextHoleLabel], font_key_label, - i18n_get("HOLE", data), GTextAlignmentCenter); + text[TextHoleLabel] = text_layer_create( + GRect(hole_box_x_offset, hole_label_y_offset, stroke_box_width, label_height)); + prv_setup_text_layer(text[TextHoleLabel], font_key_label, i18n_get("HOLE", data), + GTextAlignmentCenter); layer_add_child(background, text_layer_get_layer(text[TextHoleLabel])); // Hole value. - text[TextHole] = text_layer_create(GRect(hole_box_x_offset, hole_value_y_offset, - stroke_box_width, large_numbers_height)); + text[TextHole] = text_layer_create( + GRect(hole_box_x_offset, hole_value_y_offset, stroke_box_width, large_numbers_height)); prv_setup_text_layer(text[TextHole], font_key_large_numbers, NULL, GTextAlignmentCenter); layer_add_child(background, text_layer_get_layer(text[TextHole])); // Par label. - text[TextParLabel] = text_layer_create(GRect(par_box_x_offset, par_label_y_offset, - stroke_box_width, label_height)); + text[TextParLabel] = text_layer_create( + GRect(par_box_x_offset, par_label_y_offset, stroke_box_width, label_height)); prv_setup_text_layer(text[TextParLabel], font_key_label, i18n_get("PAR", data), GTextAlignmentCenter); layer_add_child(background, text_layer_get_layer(text[TextParLabel])); // Par value. - text[TextPar] = text_layer_create(GRect(par_box_x_offset, par_value_y_offset, - stroke_box_width, large_numbers_height)); + text[TextPar] = text_layer_create( + GRect(par_box_x_offset, par_value_y_offset, stroke_box_width, large_numbers_height)); prv_setup_text_layer(text[TextPar], font_key_large_numbers, NULL, GTextAlignmentCenter); layer_add_child(background, text_layer_get_layer(text[TextPar])); @@ -328,8 +326,8 @@ static void window_load(Window *window) { layer_add_child(background, text_layer_get_layer(text[TextFront])); // Disconnected text. - data->disconnected_text = text_layer_create(GRect(0, disconnected_text_y_offset, - background_width, disconnected_text_height)); + data->disconnected_text = text_layer_create( + GRect(0, disconnected_text_y_offset, background_width, disconnected_text_height)); prv_setup_text_layer(data->disconnected_text, font_key_disconnected, i18n_get("Disconnected", data), GTextAlignmentCenter); layer_add_child(window_layer, text_layer_get_layer(data->disconnected_text)); @@ -337,11 +335,9 @@ static void window_load(Window *window) { // Sync setup: Tuplet initial_values[] = { - TupletCString(GOLF_PAR_KEY, "0"), - TupletCString(GOLF_HOLE_KEY, "0"), - TupletCString(GOLF_BACK_KEY, "000"), - TupletCString(GOLF_MID_KEY, "000"), - TupletCString(GOLF_FRONT_KEY, "000"), + TupletCString(GOLF_PAR_KEY, "0"), TupletCString(GOLF_HOLE_KEY, "0"), + TupletCString(GOLF_BACK_KEY, "000"), TupletCString(GOLF_MID_KEY, "000"), + TupletCString(GOLF_FRONT_KEY, "000"), }; app_sync_init(&data->sync, data->sync_buffer, sizeof(data->sync_buffer), initial_values, ARRAY_LENGTH(initial_values), sync_tuple_changed_callback, sync_error_callback, @@ -353,12 +349,11 @@ static void push_window(AppData *data) { Window *window = data->window; window_set_user_data(window, data); - window_set_window_handlers(window, (WindowHandlers) { - .load = window_load, - .unload = window_unload, - }); - window_set_click_config_provider_with_context(window, (ClickConfigProvider) config_provider, - data); + window_set_window_handlers(window, (WindowHandlers){ + .load = window_load, + .unload = window_unload, + }); + window_set_click_config_provider_with_context(window, (ClickConfigProvider)config_provider, data); window_set_background_color(window, PBL_IF_COLOR_ELSE(GColorMintGreen, GColorWhite)); window_stack_push(window, true); } @@ -371,8 +366,8 @@ static void handle_init(void) { app_comm_set_sniff_interval(SNIFF_INTERVAL_REDUCED); ConnectionHandlers handlers = { - .pebble_app_connection_handler = NULL, - .pebblekit_connection_handler = bluetooth_status_callback + .pebble_app_connection_handler = NULL, + .pebblekit_connection_handler = bluetooth_status_callback }; connection_service_subscribe(handlers); } diff --git a/apps/stored/golf/src/golf_resources.h b/apps/stored/golf/src/golf_resources.h index 972f80d34b..0327a93af1 100644 --- a/apps/stored/golf/src/golf_resources.h +++ b/apps/stored/golf/src/golf_resources.h @@ -4,38 +4,38 @@ #pragma once static const uint8_t s_golf_api_click_icon_png_data[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x03, 0x00, 0x00, 0x00, 0x62, 0x26, 0xc5, - 0x42, 0x00, 0x00, 0x00, 0x0c, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x38, 0xc0, 0x3b, 0xa8, 0x00, 0x00, 0x00, 0x04, 0x74, 0x52, 0x4e, - 0x53, 0x00, 0xaa, 0xff, 0x55, 0xef, 0x59, 0xe6, 0x25, 0x00, 0x00, 0x00, 0x34, 0x49, 0x44, 0x41, - 0x54, 0x78, 0xda, 0x63, 0x60, 0x88, 0x0a, 0x60, 0x60, 0xe0, 0x5b, 0xb5, 0x9a, 0x81, 0xc1, 0x6a, - 0xd5, 0xaa, 0x03, 0x0c, 0x5a, 0xab, 0x56, 0x35, 0x30, 0x64, 0xad, 0x5a, 0x35, 0x01, 0x42, 0xac, - 0x5a, 0xb5, 0x6a, 0x01, 0x84, 0x40, 0x88, 0x81, 0x95, 0x80, 0x15, 0x83, 0xb5, 0x81, 0x0c, 0x00, - 0x00, 0xb3, 0x7e, 0x1b, 0x27, 0x9c, 0x43, 0x2d, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, - 0x44, 0xae, 0x42, 0x60, 0x82, + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, + 0x52, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x03, 0x00, 0x00, 0x00, 0x62, + 0x26, 0xc5, 0x42, 0x00, 0x00, 0x00, 0x0c, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x38, 0xc0, 0x3b, 0xa8, 0x00, 0x00, 0x00, + 0x04, 0x74, 0x52, 0x4e, 0x53, 0x00, 0xaa, 0xff, 0x55, 0xef, 0x59, 0xe6, 0x25, 0x00, 0x00, + 0x00, 0x34, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x88, 0x0a, 0x60, 0x60, 0xe0, + 0x5b, 0xb5, 0x9a, 0x81, 0xc1, 0x6a, 0xd5, 0xaa, 0x03, 0x0c, 0x5a, 0xab, 0x56, 0x35, 0x30, + 0x64, 0xad, 0x5a, 0x35, 0x01, 0x42, 0xac, 0x5a, 0xb5, 0x6a, 0x01, 0x84, 0x40, 0x88, 0x81, + 0x95, 0x80, 0x15, 0x83, 0xb5, 0x81, 0x0c, 0x00, 0x00, 0xb3, 0x7e, 0x1b, 0x27, 0x9c, 0x43, + 0x2d, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; static const uint8_t s_golf_api_up_icon_png_data[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x07, 0x02, 0x03, 0x00, 0x00, 0x00, 0x41, 0xdc, 0x44, - 0xb7, 0x00, 0x00, 0x00, 0x0c, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x38, 0xc0, 0x3b, 0xa8, 0x00, 0x00, 0x00, 0x04, 0x74, 0x52, 0x4e, - 0x53, 0x00, 0xaa, 0x55, 0xff, 0x8d, 0xb2, 0xf8, 0xb0, 0x00, 0x00, 0x00, 0x25, 0x49, 0x44, 0x41, - 0x54, 0x78, 0xda, 0x63, 0x60, 0x90, 0x60, 0x60, 0x60, 0xd8, 0xc3, 0xc0, 0xc0, 0xf4, 0x9f, 0x81, - 0x81, 0xfb, 0xbf, 0x03, 0x03, 0xff, 0xff, 0x0b, 0x0c, 0xf2, 0xff, 0xbf, 0x30, 0xd4, 0xff, 0xff, - 0x0b, 0x00, 0x58, 0x99, 0x09, 0x8b, 0xcd, 0x9c, 0x7f, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, - 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, + 0x52, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x07, 0x02, 0x03, 0x00, 0x00, 0x00, 0x41, + 0xdc, 0x44, 0xb7, 0x00, 0x00, 0x00, 0x0c, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x38, 0xc0, 0x3b, 0xa8, 0x00, 0x00, 0x00, + 0x04, 0x74, 0x52, 0x4e, 0x53, 0x00, 0xaa, 0x55, 0xff, 0x8d, 0xb2, 0xf8, 0xb0, 0x00, 0x00, + 0x00, 0x25, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x90, 0x60, 0x60, 0x60, 0xd8, + 0xc3, 0xc0, 0xc0, 0xf4, 0x9f, 0x81, 0x81, 0xfb, 0xbf, 0x03, 0x03, 0xff, 0xff, 0x0b, 0x0c, + 0xf2, 0xff, 0xbf, 0x30, 0xd4, 0xff, 0xff, 0x0b, 0x00, 0x58, 0x99, 0x09, 0x8b, 0xcd, 0x9c, + 0x7f, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; static const uint8_t s_golf_api_down_icon_png_data[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x07, 0x02, 0x03, 0x00, 0x00, 0x00, 0x41, 0xdc, 0x44, - 0xb7, 0x00, 0x00, 0x00, 0x0c, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x05, 0x00, 0x64, 0xc2, 0x00, 0x00, 0x00, 0x04, 0x74, 0x52, 0x4e, - 0x53, 0xaa, 0xff, 0x00, 0x55, 0x34, 0xdc, 0x0e, 0x6d, 0x00, 0x00, 0x00, 0x25, 0x49, 0x44, 0x41, - 0x54, 0x78, 0xda, 0x63, 0x10, 0x0d, 0x0d, 0x61, 0x68, 0x0d, 0x0d, 0x62, 0x58, 0x18, 0xea, 0xc5, - 0xb0, 0x22, 0x34, 0x8b, 0x61, 0x95, 0xe8, 0x2b, 0x86, 0x55, 0xed, 0xab, 0x18, 0x56, 0xad, 0x5b, - 0x05, 0x00, 0x77, 0x5b, 0x0a, 0x18, 0x68, 0x2f, 0xcf, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, - 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, + 0x52, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x07, 0x02, 0x03, 0x00, 0x00, 0x00, 0x41, + 0xdc, 0x44, 0xb7, 0x00, 0x00, 0x00, 0x0c, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x05, 0x00, 0x64, 0xc2, 0x00, 0x00, 0x00, + 0x04, 0x74, 0x52, 0x4e, 0x53, 0xaa, 0xff, 0x00, 0x55, 0x34, 0xdc, 0x0e, 0x6d, 0x00, 0x00, + 0x00, 0x25, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x10, 0x0d, 0x0d, 0x61, 0x68, 0x0d, + 0x0d, 0x62, 0x58, 0x18, 0xea, 0xc5, 0xb0, 0x22, 0x34, 0x8b, 0x61, 0x95, 0xe8, 0x2b, 0x86, + 0x55, 0xed, 0xab, 0x18, 0x56, 0xad, 0x5b, 0x05, 0x00, 0x77, 0x5b, 0x0a, 0x18, 0x68, 0x2f, + 0xcf, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; diff --git a/include/bluetooth/bluetooth_types.h b/include/bluetooth/bluetooth_types.h index 1b0352901d..1ea5c14759 100644 --- a/include/bluetooth/bluetooth_types.h +++ b/include/bluetooth/bluetooth_types.h @@ -116,10 +116,10 @@ typedef enum { } BLEGATTError; //! @internal Macro to map Bluetopia errors to BTErrno -#define BTErrnoWithBluetopiaError(e) ((int) BTErrnoInternalErrorBegin - e) +#define BTErrnoWithBluetopiaError(e) ((int)BTErrnoInternalErrorBegin - e) //! @internal Macro to map HCI errors to BTErrno -#define BTErrnoWithHCIError(e) ((int) BTErrnoHCIErrorBegin + e) +#define BTErrnoWithHCIError(e) ((int)BTErrnoHCIErrorBegin + e) //! Property bits of a characteristic //! See the Bluetooth 4.0 Specification, Volume 3, Part G, @@ -154,9 +154,9 @@ typedef uintptr_t BLEDescriptor; _Static_assert(sizeof(BLEDescriptor) == sizeof(uintptr_t), "BLEDescriptor is invalid size"); _Static_assert(sizeof(BLECharacteristic) == sizeof(uintptr_t), "BLECharacteristic is invalid size"); -#define BLE_SERVICE_INVALID ((BLEService) 0) -#define BLE_CHARACTERISTIC_INVALID ((BLECharacteristic) 0) -#define BLE_DESCRIPTOR_INVALID ((BLEDescriptor) 0) +#define BLE_SERVICE_INVALID ((BLEService)0) +#define BLE_CHARACTERISTIC_INVALID ((BLECharacteristic)0) +#define BLE_DESCRIPTOR_INVALID ((BLEDescriptor)0) //! Identifier for a device bonding. //! They stay the same across reboots, so they can be persisted by apps. @@ -178,22 +178,20 @@ typedef struct __attribute__((__packed__)) BTDeviceAddress { //! Print format for printing BTDeviceAddress structs //! @see BT_DEVICE_ADDRESS_XPLODE #define BT_DEVICE_ADDRESS_FMT "%02X:%02X:%02X:%02X:%02X:%02X" -#define BT_DEVICE_ADDRESS_FMT_BUFFER_SIZE (18) +#define BT_DEVICE_ADDRESS_FMT_BUFFER_SIZE (18) #define BD_ADDR_FMT "0x%02X%02X%02X%02X%02X%02X" -#define BT_ADDR_FMT_BUFFER_SIZE_BYTES (15) +#define BT_ADDR_FMT_BUFFER_SIZE_BYTES (15) -#define BT_DEVICE_NAME_BUFFER_SIZE (20) +#define BT_DEVICE_NAME_BUFFER_SIZE (20) //! Macro decompose a BTDeviceAddress struct into its parts, so it can be used //! with the BT_DEVICE_ADDRESS_FMT format macro #define BT_DEVICE_ADDRESS_XPLODE(a) \ - (a).octets[5], (a).octets[4], (a).octets[3], \ - (a).octets[2], (a).octets[1], (a).octets[0] + (a).octets[5], (a).octets[4], (a).octets[3], (a).octets[2], (a).octets[1], (a).octets[0] #define BT_DEVICE_ADDRESS_XPLODE_PTR(a) \ - (a)->octets[5], (a)->octets[4], (a)->octets[3], \ - (a)->octets[2], (a)->octets[1], (a)->octets[0] + (a)->octets[5], (a)->octets[4], (a)->octets[3], (a)->octets[2], (a)->octets[1], (a)->octets[0] //! Data structure that represents a remote Bluetooth device. //! The fields of the structure are opaque. Its contents should not be changed @@ -212,18 +210,18 @@ typedef struct __attribute__((__packed__)) BTDeviceInternal { union { struct __attribute__((__packed__)) { BTDeviceAddress address; - bool is_classic:1; - bool is_random_address:1; + bool is_classic : 1; + bool is_random_address : 1; //! !!! WARNING: If you're adding more flags here, you need to update //! the bt_device_bits field in PebbleBLEGATTClientEvent and PebbleBLEConnectionEvent !!! - uint16_t zero:14; + uint16_t zero : 14; }; BTDevice opaque; }; } BTDeviceInternal; -#define BT_DEVICE_INVALID ((const BTDevice) {}) -#define BT_DEVICE_INTERNAL_INVALID ((const BTDeviceInternal) {}) +#define BT_DEVICE_INVALID ((const BTDevice){}) +#define BT_DEVICE_INTERNAL_INVALID ((const BTDeviceInternal){}) _Static_assert(sizeof(BTDeviceInternal) == sizeof(BTDevice), "BTDeviceInternal should be equal in size to BTDevice"); @@ -238,14 +236,14 @@ struct BLEAdData; //! Flags used in an LE Advertising packet. Listed in //! Supplement to Bluetooth Core Specification | CSSv6, Part A, 1.3.1 -#define GAP_LE_AD_FLAGS_LIM_DISCOVERABLE_MASK (1 << 0) -#define GAP_LE_AD_FLAGS_GEN_DISCOVERABLE_MASK (1 << 1) -#define GAP_LE_AD_FLAGS_BR_EDR_NOT_SUPPORTED_MASK (1 << 2) +#define GAP_LE_AD_FLAGS_LIM_DISCOVERABLE_MASK (1 << 0) +#define GAP_LE_AD_FLAGS_GEN_DISCOVERABLE_MASK (1 << 1) +#define GAP_LE_AD_FLAGS_BR_EDR_NOT_SUPPORTED_MASK (1 << 2) #define GAP_LE_AD_FLAGS_LE_BR_EDR_SIMULT_CONTROLLER_MASK (1 << 3) -#define GAP_LE_AD_FLAGS_LE_BR_EDR_SIMULT_HOST_MASK (1 << 4) +#define GAP_LE_AD_FLAGS_LE_BR_EDR_SIMULT_HOST_MASK (1 << 4) -#define LL_CONN_INTV_MIN_SLOTS (6) // 1.25ms / slot -#define LL_CONN_INTV_MAX_SLOTS (3200) // 1.25ms / slot +#define LL_CONN_INTV_MIN_SLOTS (6) // 1.25ms / slot +#define LL_CONN_INTV_MAX_SLOTS (3200) // 1.25ms / slot #define LL_SUPERVISION_TIMEOUT_MIN_MS (100) //! Advertisement and scan response data @@ -262,11 +260,7 @@ typedef struct BLEAdData { } BLEAdData; //! Macro that does the same as bt_uuid_expand_32bit / bt_uuid_expand_16bit, but at compile-time -#define BT_UUID_EXPAND(u) \ - (0xff & ((uint32_t) u) >> 24), \ - (0xff & ((uint32_t) u) >> 16), \ - (0xff & ((uint32_t) u) >> 8), \ - (0xff & ((uint32_t) u) >> 0), \ - 0x00, 0x00, 0x10, 0x00, \ - 0x80, 0x00, 0x00, 0x80, \ - 0x5F, 0x9B, 0x34, 0xFB +#define BT_UUID_EXPAND(u) \ + (0xff & ((uint32_t)u) >> 24), (0xff & ((uint32_t)u) >> 16), (0xff & ((uint32_t)u) >> 8), \ + (0xff & ((uint32_t)u) >> 0), 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, \ + 0x34, 0xFB diff --git a/include/bluetooth/bonding_sync.h b/include/bluetooth/bonding_sync.h index 48d2164eef..5f5fcf1996 100644 --- a/include/bluetooth/bonding_sync.h +++ b/include/bluetooth/bonding_sync.h @@ -11,16 +11,16 @@ typedef struct PACKED BleBonding { SMPairingInfo pairing_info; //! True if the remote device is capable of talking PPoGATT. - bool is_gateway:1; + bool is_gateway : 1; //! True if the local device address should be pinned. - bool should_pin_address:1; + bool should_pin_address : 1; //! @note bt_persistent_storage_... uses only 5 bits to store this! //! @see BleBondingFlag - uint8_t flags:5; + uint8_t flags : 5; - uint8_t rsvd:1; + uint8_t rsvd : 1; //! Valid iff should_pin_address is true BTDeviceAddress pinned_address; @@ -34,7 +34,7 @@ typedef struct PACKED BleCCCD { //! Flags for the CCCD. uint16_t flags; //! True if the value has changed. - bool value_changed:1; + bool value_changed : 1; } BleCCCD; //! Called by the FW after starting the Bluetooth stack to register existing bondings. diff --git a/include/bluetooth/bt_driver_ppog_reversed.h b/include/bluetooth/bt_driver_ppog_reversed.h index b32aeaa4be..e23760cf4a 100644 --- a/include/bluetooth/bt_driver_ppog_reversed.h +++ b/include/bluetooth/bt_driver_ppog_reversed.h @@ -23,12 +23,11 @@ extern void bt_driver_cb_ppog_reversed_unsubscribed(uint16_t conn_handle); //! Driver -> kernel: the phone wrote a PPoG packet to the data-write //! characteristic. Ownership of @p buf (kernel heap) transfers to the kernel. -extern void bt_driver_cb_ppog_reversed_data_written(uint16_t conn_handle, - uint8_t *buf, uint16_t len); +extern void bt_driver_cb_ppog_reversed_data_written(uint16_t conn_handle, uint8_t *buf, + uint16_t len); //! Kernel -> driver: send a PPoG packet to the phone as a notification. //! @return BTErrnoOK on success, BTErrnoNotEnoughResources if out of buffers //! (transient; the caller must retry after a short delay — the stack has no //! buffers-freed event), or BTErrnoInvalidState if no subscription is active. -BTErrno bt_driver_ppog_reversed_notify(uint16_t conn_handle, - const uint8_t *buf, uint16_t len); +BTErrno bt_driver_ppog_reversed_notify(uint16_t conn_handle, const uint8_t *buf, uint16_t len); diff --git a/include/bluetooth/conn_event_stats.h b/include/bluetooth/conn_event_stats.h index b967ec422a..e91ffbe47f 100644 --- a/include/bluetooth/conn_event_stats.h +++ b/include/bluetooth/conn_event_stats.h @@ -6,11 +6,12 @@ #include typedef struct SlaveConnEventStats { - uint32_t num_conn_events; // BLE Connection Events that have elapsed - uint32_t num_conn_events_skipped; // The number of events the controller never tried to listen for - uint32_t num_sync_errors; // Events where slave did not see a packet from Master + uint32_t num_conn_events; // BLE Connection Events that have elapsed + uint32_t + num_conn_events_skipped; // The number of events the controller never tried to listen for + uint32_t num_sync_errors; // Events where slave did not see a packet from Master uint32_t num_type_errors; uint32_t num_len_errors; - uint32_t num_crc_errors; // Events that ended due to a packet CRC error - uint32_t num_mic_errors; // Events that ended due to a packet MIC error + uint32_t num_crc_errors; // Events that ended due to a packet CRC error + uint32_t num_mic_errors; // Events that ended due to a packet MIC error } SlaveConnEventStats; diff --git a/include/bluetooth/dis.h b/include/bluetooth/dis.h index 9b978b8631..ef483e1c1b 100644 --- a/include/bluetooth/dis.h +++ b/include/bluetooth/dis.h @@ -9,11 +9,11 @@ // is included by the various number of bt_driver implementations. They don't know what "mfg" // is, etc. // NOTE: These sizes are asserted in a .c file to be in sync with the FW -#define MODEL_NUMBER_LEN (10) // MFG_HW_VERSION_SIZE + 1 -#define MANUFACTURER_LEN (18) // sizeof("Pebble Technology") -#define SERIAL_NUMBER_LEN (13) // MFG_SERIAL_NUMBER_SIZE + 1 -#define FW_REVISION_LEN (32) // FW_METADATA_VERSION_TAG_BYTES) -#define SW_REVISION_LEN (8) // Fmt: xx.xxx\0 +#define MODEL_NUMBER_LEN (10) // MFG_HW_VERSION_SIZE + 1 +#define MANUFACTURER_LEN (18) // sizeof("Pebble Technology") +#define SERIAL_NUMBER_LEN (13) // MFG_SERIAL_NUMBER_SIZE + 1 +#define FW_REVISION_LEN (32) // FW_METADATA_VERSION_TAG_BYTES) +#define SW_REVISION_LEN (8) // Fmt: xx.xxx\0 typedef struct PACKED DisInfo { char model_number[MODEL_NUMBER_LEN]; diff --git a/include/bluetooth/gap_le_connect.h b/include/bluetooth/gap_le_connect.h index 000005e11d..90b801788b 100644 --- a/include/bluetooth/gap_le_connect.h +++ b/include/bluetooth/gap_le_connect.h @@ -71,7 +71,7 @@ typedef struct PACKED BleConnectionUpdateCompleteEvent { //! the address type. BTDeviceAddress dev_address; HciStatusCode status; -} BleConnectionUpdateCompleteEvent; // 7.7.65.3 +} BleConnectionUpdateCompleteEvent; // 7.7.65.3 // Note: This will likely change to work with Dialog // "Encryption Change Event" - v4.2 7.7.8 diff --git a/include/bluetooth/gap_le_scan.h b/include/bluetooth/gap_le_scan.h index d132f3f397..825f0fd3e4 100644 --- a/include/bluetooth/gap_le_scan.h +++ b/include/bluetooth/gap_le_scan.h @@ -7,7 +7,7 @@ //! Returns true on success, false on failure bool bt_driver_start_le_scan(bool active_scan, bool use_white_list_filter, bool filter_dups, - uint16_t scan_interval_ms, uint16_t scan_window_ms); + uint16_t scan_interval_ms, uint16_t scan_window_ms); //! Returns true on success, false on failure bool bt_driver_stop_le_scan(void); diff --git a/include/bluetooth/gatt.h b/include/bluetooth/gatt.h index f1c2069552..f80c5441c9 100644 --- a/include/bluetooth/gatt.h +++ b/include/bluetooth/gatt.h @@ -11,9 +11,9 @@ // -- Gatt Device/Server Events -#define GATT_SERVICE_UUID ((uint16_t) 0x1801) -#define GATT_SERVICE_CHANGED_CHARACTERISTIC_UUID ((uint16_t) 0x2A05) -#define GATT_CCCD_UUID ((uint16_t) 0x2902) +#define GATT_SERVICE_UUID ((uint16_t)0x1801) +#define GATT_SERVICE_CHANGED_CHARACTERISTIC_UUID ((uint16_t)0x2A05) +#define GATT_CCCD_UUID ((uint16_t)0x2902) //! Using BTDeviceAddress instead of BTDeviceInternal, with all these events, because Bluetopia's //! events doesn't contain the address type. @@ -99,21 +99,13 @@ void bt_driver_gatt_respond_read_subscription(uint32_t transaction_id, uint16_t void bt_driver_gatt_send_changed_indication(const BTDeviceInternal *device, const ATTHandleRange *data); +BTErrno bt_driver_gatt_write_without_response(GAPLEConnection *connection, const uint8_t *value, + size_t value_length, uint16_t att_handle); -BTErrno bt_driver_gatt_write_without_response(GAPLEConnection *connection, - const uint8_t *value, - size_t value_length, - uint16_t att_handle); +BTErrno bt_driver_gatt_write(GAPLEConnection *connection, const uint8_t *value, size_t value_length, + uint16_t att_handle, void *context); -BTErrno bt_driver_gatt_write(GAPLEConnection *connection, - const uint8_t *value, - size_t value_length, - uint16_t att_handle, - void *context); - -BTErrno bt_driver_gatt_read(GAPLEConnection *connection, - uint16_t att_handle, - void *context); +BTErrno bt_driver_gatt_read(GAPLEConnection *connection, uint16_t att_handle, void *context); //! The following are callbacks that the bt_driver implementation will call when handling events. diff --git a/include/bluetooth/gatt_discovery.h b/include/bluetooth/gatt_discovery.h index 937a1f92be..768ee9a7a2 100644 --- a/include/bluetooth/gatt_discovery.h +++ b/include/bluetooth/gatt_discovery.h @@ -10,8 +10,8 @@ typedef struct GAPLEConnection GAPLEConnection; typedef struct GATTService GATTService; typedef struct GATTServiceNode GATTServiceNode; -BTErrno bt_driver_gatt_start_discovery_range( - const GAPLEConnection *connection, const ATTHandleRange *data); +BTErrno bt_driver_gatt_start_discovery_range(const GAPLEConnection *connection, + const ATTHandleRange *data); BTErrno bt_driver_gatt_stop_discovery(GAPLEConnection *connection); //! It's possible we are disconnected or the stack gets torn down while in the @@ -23,5 +23,6 @@ void bt_driver_gatt_handle_discovery_abandoned(void); //! gatt_service_discovery callbacks //! cb returns true iff the driver completed, false if a discovery retry was initiated extern bool bt_driver_cb_gatt_client_discovery_complete(GAPLEConnection *connection, BTErrno errno); -extern void bt_driver_cb_gatt_client_discovery_handle_indication( - GAPLEConnection *connection, GATTService *service_discovered, BTErrno error); +extern void bt_driver_cb_gatt_client_discovery_handle_indication(GAPLEConnection *connection, + GATTService *service_discovered, + BTErrno error); diff --git a/include/bluetooth/gatt_service_types.h b/include/bluetooth/gatt_service_types.h index 020845fc8c..733e076264 100644 --- a/include/bluetooth/gatt_service_types.h +++ b/include/bluetooth/gatt_service_types.h @@ -97,5 +97,5 @@ typedef struct GATTService { _Static_assert(offsetof(GATTService, uuid) == offsetof(GATTObjectHeader, uuid), ""); #define COMPUTE_GATTSERVICE_SIZE_BYTES(num_chars, num_descs, num_includes) \ - (sizeof(GATTService) + sizeof(GATTCharacteristic) * (num_chars) + \ - sizeof(GATTDescriptor) * (num_descs) + sizeof(uint16_t) * (num_includes)) + (sizeof(GATTService) + sizeof(GATTCharacteristic) * (num_chars) + \ + sizeof(GATTDescriptor) * (num_descs) + sizeof(uint16_t) * (num_includes)) diff --git a/include/bluetooth/id.h b/include/bluetooth/id.h index bc9d6e8a81..f3905cd1c7 100644 --- a/include/bluetooth/id.h +++ b/include/bluetooth/id.h @@ -15,8 +15,7 @@ void bt_driver_id_copy_local_identity_address(BTDeviceAddress *addr_out); //! @param allow_cycling True if the controller is allowed to cycle the address (implies address //! pinning is *not* used!) //! @param pinned_address The address to use, or NULL for "don't care". -void bt_driver_set_local_address(bool allow_cycling, - const BTDeviceAddress *pinned_address); +void bt_driver_set_local_address(bool allow_cycling, const BTDeviceAddress *pinned_address); //! Copies a human-readable string of freeform info that uniquely identifies the Bluetooth chip. //! Used by MFG for part tracking purposes. diff --git a/include/bluetooth/pairing_confirm.h b/include/bluetooth/pairing_confirm.h index 0285ce3c6b..b466b9d429 100644 --- a/include/bluetooth/pairing_confirm.h +++ b/include/bluetooth/pairing_confirm.h @@ -12,8 +12,7 @@ typedef struct PairingUserConfirmationCtx PairingUserConfirmationCtx; //! @param[in] ctx The pairing request context, as previously passed to //! bt_driver_cb_pairing_confirm_handle_request. //! @param[in] is_confirmed Pass true if the user confirmed the pairing. -void bt_driver_pairing_confirm(const PairingUserConfirmationCtx *ctx, - bool is_confirmed); +void bt_driver_pairing_confirm(const PairingUserConfirmationCtx *ctx, bool is_confirmed); //! @param[in] ctx Pointer to opaque BT-driver-implementation specific context. The function can //! use the pointer value this to distinguish one pairing process from another, but the pointer diff --git a/include/bluetooth/pebble_bt.h b/include/bluetooth/pebble_bt.h index f57aed7c15..b50dee6ee1 100644 --- a/include/bluetooth/pebble_bt.h +++ b/include/bluetooth/pebble_bt.h @@ -17,13 +17,13 @@ //! The Service UUID of the "Pebble Protocol over GATT" (PPoGATT) service. //! This UUID needs to be expanded using the Pebble Base UUID (@see pebble_bt_uuid_expand) -#define PEBBLE_BT_PPOGATT_SERVICE_UUID_32BIT (0x10000000) +#define PEBBLE_BT_PPOGATT_SERVICE_UUID_32BIT (0x10000000) #define PEBBLE_BT_PPOGATT_DATA_CHARACTERISTIC_UUID_32BIT (0x10000001) #define PEBBLE_BT_PPOGATT_META_CHARACTERISTIC_UUID_32BIT (0x10000002) //! V1 watch-as-server PPoGATT, as shipped on Pebble 2 (DA1468x). Reserved so //! new allocations don't collide. -#define PEBBLE_BT_PPOGATT_WATCH_SERVER_V1_SERVICE_UUID_32BIT (0x30000003) +#define PEBBLE_BT_PPOGATT_WATCH_SERVER_V1_SERVICE_UUID_32BIT (0x30000003) #define PEBBLE_BT_PPOGATT_WATCH_SERVER_V1_DATA_CHARACTERISTIC_UUID_32BIT (0x30000004) #define PEBBLE_BT_PPOGATT_WATCH_SERVER_V1_META_CHARACTERISTIC_UUID_32BIT (0x30000005) #define PEBBLE_BT_PPOGATT_WATCH_SERVER_V1_DATA_WR_CHARACTERISTIC_UUID_32BIT (0x30000006) @@ -31,14 +31,14 @@ //! V2 "reversed" PPoGATT: the phone is the GATT client and sends the first //! ResetRequest after subscribing. No meta characteristic (0x40000002 is //! reserved in case a future revision wants one). -#define PEBBLE_BT_PPOGATT_WATCH_SERVER_SERVICE_UUID_32BIT (0x40000000) +#define PEBBLE_BT_PPOGATT_WATCH_SERVER_SERVICE_UUID_32BIT (0x40000000) #define PEBBLE_BT_PPOGATT_WATCH_SERVER_DATA_CHARACTERISTIC_UUID_32BIT (0x40000001) #define PEBBLE_BT_PPOGATT_WATCH_SERVER_DATA_WR_CHARACTERISTIC_UUID_32BIT (0x40000003) //! The Service UUID of the "Pebble App Launch" service. //! This UUID needs to be expanded using the Pebble Base UUID (@see pebble_bt_uuid_expand) -#define PEBBLE_BT_APP_LAUNCH_SERVICE_UUID_32BIT (0x20000000) -#define PEBBLE_BT_APP_LAUNCH_CHARACTERISTIC_UUID_32BIT (0x20000001) +#define PEBBLE_BT_APP_LAUNCH_SERVICE_UUID_32BIT (0x20000000) +#define PEBBLE_BT_APP_LAUNCH_CHARACTERISTIC_UUID_32BIT (0x20000001) //! Assigns a 32-bit (or 16-bit) UUID that is based on the Pebble Base UUID, //! XXXXXXXX-328E-0FBB-C642-1AA6699BDADA. @@ -49,11 +49,7 @@ void pebble_bt_uuid_expand(Uuid *uuid, uint32_t value); //! Macro that does the same as pebble_bt_uuid_expand, but then at compile-time -#define PEBBLE_BT_UUID_EXPAND(u) \ - (0xff & ((uint32_t) u) >> 24), \ - (0xff & ((uint32_t) u) >> 16), \ - (0xff & ((uint32_t) u) >> 8), \ - (0xff & ((uint32_t) u) >> 0), \ - 0x32, 0x8E, 0x0F, 0xBB, \ - 0xC6, 0x42, 0x1A, 0xA6, \ - 0x69, 0x9B, 0xDA, 0xDA +#define PEBBLE_BT_UUID_EXPAND(u) \ + (0xff & ((uint32_t)u) >> 24), (0xff & ((uint32_t)u) >> 16), (0xff & ((uint32_t)u) >> 8), \ + (0xff & ((uint32_t)u) >> 0), 0x32, 0x8E, 0x0F, 0xBB, 0xC6, 0x42, 0x1A, 0xA6, 0x69, 0x9B, \ + 0xDA, 0xDA diff --git a/include/bluetooth/pebble_pairing_service.h b/include/bluetooth/pebble_pairing_service.h index 66a639d0bb..3b5020bc9f 100644 --- a/include/bluetooth/pebble_pairing_service.h +++ b/include/bluetooth/pebble_pairing_service.h @@ -14,8 +14,7 @@ #define PEBBLE_BT_PAIRING_SERVICE_CONNECTION_PARAMETERS_UUID PEBBLE_BT_UUID_EXPAND(5) typedef enum { - PebblePairingServiceGATTError_UnknownCommandID = - BLEGATTErrorApplicationSpecificErrorStart, + PebblePairingServiceGATTError_UnknownCommandID = BLEGATTErrorApplicationSpecificErrorStart, PebblePairingServiceGATTError_ConnParamsInvalidRemoteDesiredState, PebblePairingServiceGATTError_ConnParamsMinSlotsTooSmall, PebblePairingServiceGATTError_ConnParamsMinSlotsTooLarge, @@ -29,21 +28,21 @@ typedef struct PACKED { union { struct { //! true if the device that is reading the status is connected (always true) - bool ble_is_connected:1; + bool ble_is_connected : 1; //! true if the device that is reading the status is bonded, false if not - bool ble_is_bonded:1; + bool ble_is_bonded : 1; //! true if the current LE link is encrypted, false if not - bool ble_is_encrypted:1; + bool ble_is_encrypted : 1; //! true if the watch has a bonding to a gateway (LE-based). - bool has_bonded_gateway:1; + bool has_bonded_gateway : 1; //! true if the watch supports writing the "Don't send slave security request" bit. //! See https://pebbletechnology.atlassian.net/wiki/display/DEV/Pebble+GATT+Services - bool supports_pinning_without_security_request:1; + bool supports_pinning_without_security_request : 1; //! true if the reversed ppogatt was enabled at the time of bonding - bool is_reversed_ppogatt_enabled:1; + bool is_reversed_ppogatt_enabled : 1; //! Reserved, leave zero for future use. - uint32_t rsvd:18; + uint32_t rsvd : 18; //! The error of the last pairing process or all zeroes, if no pairing process has completed //! or when there were no errors. Also see BT Spec 4.2, Vol 3, Part H, 3.5.5 Pairing Failed. @@ -56,15 +55,15 @@ typedef struct PACKED { _Static_assert(sizeof(PebblePairingServiceConnectivityStatus) == 4, ""); typedef struct PACKED { - bool should_pin_address:1; + bool should_pin_address : 1; //! @note Not available in Bluetopia/cc2564x implementation //! This flag and should_force_slave_security_request are mutually exclusive! - bool no_slave_security_request:1; + bool no_slave_security_request : 1; //! @note Not available in Bluetopia/cc2564x implementation //! This flag and no_slave_security_request are mutually exclusive! - bool should_force_slave_security_request:1; + bool should_force_slave_security_request : 1; //! @note Not available in Bluetopia/cc2564x implementation //! Flag to indicate that when re-pairing this device, the re-pairing should be accepted @@ -72,7 +71,7 @@ typedef struct PACKED { //! @note This is a work-around for an Android 4.4.x bug. This opens up a security hole :( where //! a phone could pretend to be the "trusted" phone and pair w/o the user even knowing about it. //! @see https://pebbletechnology.atlassian.net/browse/PBL-39369 - bool should_auto_accept_re_pairing:1; + bool should_auto_accept_re_pairing : 1; //! @note Not available in Bluetopia/cc2564x implementation //! Flag to indicate that the PPoGATT server/client roles should be reversed to support the @@ -84,7 +83,7 @@ typedef struct PACKED { //! does support normal PPoGATT from connecting to the "reversed" PPoGATT service. //! @see ppogatt_emulated_server_wa.c //! @see https://pebbletechnology.atlassian.net/browse/PBL-39634 - bool is_reversed_ppogatt_enabled:1; + bool is_reversed_ppogatt_enabled : 1; } PairingTriggerRequestData; typedef struct PACKED { @@ -110,8 +109,8 @@ typedef struct PACKED { //! The connection parameters settings, with respect to connection to the device reading them. typedef struct PACKED PebblePairingServiceConnParamsReadNotif { //! Capability bits. Reserved for future use. - uint8_t packet_length_extension_supported:1; - uint8_t rsvd:7; + uint8_t packet_length_extension_supported : 1; + uint8_t rsvd : 7; //! Current interval / 1.25 msec – valid range: 7.5 msec to 4 seconds uint16_t current_interval_1_25ms; @@ -141,8 +140,8 @@ typedef struct PACKED PebblePairingServiceRemoteParamMgmtSettings { //! If false/zero, Pebble should manage the connection parameters. If true/one, Pebble should //! NOT manage the connection parameters. In this mode, Pebble will never request a //! connection parameter change. - bool is_remote_device_managing_connection_parameters:1; - uint8_t rsvd:7; + bool is_remote_device_managing_connection_parameters : 1; + uint8_t rsvd : 7; //! Optional. Current parameters sets used by Pebble's Connection Parameter manager. PebblePairingServiceConnParamSet connection_parameter_sets[]; } PebblePairingServiceRemoteParamMgmtSettings; @@ -157,23 +156,23 @@ typedef struct PACKED PebblePairingServiceRemoteDesiredState { //! reset it back to ResponseTimeMax after 5 minutes. In case the phone app still wants to //! keep a particular desired ResponseTime, the phone app is responsible for making sure to //! write the value again before the 5 minute timer expires. - uint8_t state:2; + uint8_t state : 2; - uint8_t rsvd:6; + uint8_t rsvd : 6; } PebblePairingServiceRemoteDesiredState; typedef struct PACKED PebblePairingServicePacketLengthExtension { - uint8_t trigger_ll_length_req:1; - uint8_t rsvd:7; + uint8_t trigger_ll_length_req : 1; + uint8_t rsvd : 7; } PebblePairingServicePacketLengthExtension; typedef struct PACKED PebblePairingServiceInhibitBLESleep { - uint8_t rsvd; // for future use + uint8_t rsvd; // for future use } PebblePairingServiceInhibitBLESleep; //! The connection parameters settings, with respect to connection to the device writing them. typedef struct PACKED PebblePairingServiceConnParamsWrite { - PebblePairingServiceConnParamsWriteCmd cmd:8; + PebblePairingServiceConnParamsWriteCmd cmd : 8; union PACKED { //! Valid iff cmd == PebblePairingServiceConnParamsWriteCmd_SetRemoteParamMgmtSettings PebblePairingServiceRemoteParamMgmtSettings remote_param_mgmt_settings; @@ -190,10 +189,10 @@ typedef struct PACKED PebblePairingServiceConnParamsWrite { } PebblePairingServiceConnParamsWrite; #define PEBBLE_PAIRING_SERVICE_REMOTE_PARAM_MGTM_SETTINGS_SIZE_WITH_PARAM_SETS \ - (sizeof(PebblePairingServiceRemoteParamMgmtSettings) + \ + (sizeof(PebblePairingServiceRemoteParamMgmtSettings) + \ (sizeof(PebblePairingServiceConnParamSet) * NumResponseTimeState)) -#define PEBBLE_PAIRING_SERVICE_CONN_PARAMS_WRITE_SIZE_WITH_PARAM_SETS \ +#define PEBBLE_PAIRING_SERVICE_CONN_PARAMS_WRITE_SIZE_WITH_PARAM_SETS \ (offsetof(PebblePairingServiceConnParamsWrite, remote_param_mgmt_settings) + \ PEBBLE_PAIRING_SERVICE_REMOTE_PARAM_MGTM_SETTINGS_SIZE_WITH_PARAM_SETS) @@ -224,6 +223,5 @@ extern void bt_driver_cb_pebble_pairing_service_handle_ios_app_termination_detec //! values. //! @param conn_params_length The length of conn_params in bytes. extern void bt_driver_cb_pebble_pairing_service_handle_connection_parameter_write( - const BTDeviceInternal *device, - const PebblePairingServiceConnParamsWrite *conn_params, + const BTDeviceInternal *device, const PebblePairingServiceConnParamsWrite *conn_params, size_t conn_params_length); diff --git a/include/bluetooth/responsiveness.h b/include/bluetooth/responsiveness.h index da23a3a369..a16bdcd991 100644 --- a/include/bluetooth/responsiveness.h +++ b/include/bluetooth/responsiveness.h @@ -32,15 +32,15 @@ typedef enum { BtConsumerTimelineActionMenu, BtConsumerPRF, BtConsumerPebblePairingServiceRemoteDevice, - BtConsumerUnitTests, // For unit testing + BtConsumerUnitTests, // For unit testing NumBtConsumer, } BtConsumer; typedef enum { ResponseTimeInvalid = -1, - ResponseTimeMax = 0, // lowest throughput, most friendly power profile + ResponseTimeMax = 0, // lowest throughput, most friendly power profile ResponseTimeMiddle, - ResponseTimeMin, // highest throughput, least friendly power profile + ResponseTimeMin, // highest throughput, least friendly power profile NumResponseTimeState, } ResponseTimeState; @@ -48,23 +48,23 @@ typedef enum { typedef void (*ResponsivenessGrantedHandler)(void); // Longest duration we want to be in Min latency for different modules -#define MIN_LATENCY_MODE_TIMEOUT_AUDIO_SECS (10) -#define MIN_LATENCY_MODE_TIMEOUT_APP_FETCH_SECS (5) -#define MIN_LATENCY_MODE_TIMEOUT_APP_MESSAGE_SECS (10) -#define MIN_LATENCY_MODE_TIMEOUT_CD_SECS (10) -#define MIN_LATENCY_MODE_TIMEOUT_PROTOCOL_RECV_SECS (60) -#define MIN_LATENCY_MODE_TIMEOUT_PUT_BYTES_SECS (60) -#define MIN_LATENCY_MODE_TIMEOUT_SCREENSHOT_SECS (5) +#define MIN_LATENCY_MODE_TIMEOUT_AUDIO_SECS (10) +#define MIN_LATENCY_MODE_TIMEOUT_APP_FETCH_SECS (5) +#define MIN_LATENCY_MODE_TIMEOUT_APP_MESSAGE_SECS (10) +#define MIN_LATENCY_MODE_TIMEOUT_CD_SECS (10) +#define MIN_LATENCY_MODE_TIMEOUT_PROTOCOL_RECV_SECS (60) +#define MIN_LATENCY_MODE_TIMEOUT_PUT_BYTES_SECS (60) +#define MIN_LATENCY_MODE_TIMEOUT_SCREENSHOT_SECS (5) #define MIN_LATENCY_MODE_TIMEOUT_TIMELINE_ACTION_MENU_SECS (10) -#define MIN_LATENCY_MODE_TIMEOUT_VOICE_SECS (10) +#define MIN_LATENCY_MODE_TIMEOUT_VOICE_SECS (10) //! Connection Parameters Update Request Packet -typedef struct PACKED { // PACKED since this struct is serialized +typedef struct PACKED { // PACKED since this struct is serialized uint16_t interval_min_1_25ms; uint16_t interval_max_1_25ms; uint16_t slave_latency_events; uint16_t supervision_timeout_10ms; } BleConnectionParamsUpdateReq; -bool bt_driver_le_connection_parameter_update( - const BTDeviceInternal *addr, const BleConnectionParamsUpdateReq *req); +bool bt_driver_le_connection_parameter_update(const BTDeviceInternal *addr, + const BleConnectionParamsUpdateReq *req); diff --git a/include/pbl/btutil/bt_device.h b/include/pbl/btutil/bt_device.h index 41009a7813..b97a5d78e2 100644 --- a/include/pbl/btutil/bt_device.h +++ b/include/pbl/btutil/bt_device.h @@ -22,8 +22,7 @@ BTDeviceAddress bt_device_get_address(BTDevice device); //! Compares two Bluetooth device addresses. //! @return true if the addresses are equal, false if they are not or if one //! or both addresses were NULL. -bool bt_device_address_equal(const BTDeviceAddress *addr1, - const BTDeviceAddress *addr2); +bool bt_device_address_equal(const BTDeviceAddress *addr1, const BTDeviceAddress *addr2); //! Compares the address with an all-zero (invalid) address. //! @return true if the address is NULL or all-zeroes. diff --git a/include/pbl/drivers/accel.h b/include/pbl/drivers/accel.h index 30f90dda72..1010d3e9ba 100644 --- a/include/pbl/drivers/accel.h +++ b/include/pbl/drivers/accel.h @@ -237,7 +237,6 @@ extern void accel_offload_work(AccelOffloadCallback cb); //! Note: Setting this value does not ensure that shake detection is enabled. void accel_set_shake_sensitivity_high(bool sensitivity_high); - //! Update the accelerometer shake sensitivity as a percentage value from 0 to 100. //! Note: Setting this value does not ensure that shake detection is enabled. void accel_set_shake_sensitivity_percent(uint8_t percent); diff --git a/include/pbl/drivers/audio.h b/include/pbl/drivers/audio.h index 48c051d684..4aa7033add 100644 --- a/include/pbl/drivers/audio.h +++ b/include/pbl/drivers/audio.h @@ -16,9 +16,9 @@ typedef struct BoardPowerOps { void (*power_down)(void); } BoardPowerOps; -extern void audio_init(AudioDevice* audio_device); -extern void audio_start(AudioDevice* audio_device, AudioTransCB cb); -extern uint32_t audio_write(AudioDevice* audio_device, void *writeBuf, uint32_t size); -//audio volume from 0~100 -extern void audio_set_volume(AudioDevice* audio_device, int volume); -extern void audio_stop(AudioDevice* audio_device); \ No newline at end of file +extern void audio_init(AudioDevice *audio_device); +extern void audio_start(AudioDevice *audio_device, AudioTransCB cb); +extern uint32_t audio_write(AudioDevice *audio_device, void *writeBuf, uint32_t size); +// audio volume from 0~100 +extern void audio_set_volume(AudioDevice *audio_device, int volume); +extern void audio_stop(AudioDevice *audio_device); \ No newline at end of file diff --git a/include/pbl/drivers/backlight.h b/include/pbl/drivers/backlight.h index 9f5ca5b571..8e113552e2 100644 --- a/include/pbl/drivers/backlight.h +++ b/include/pbl/drivers/backlight.h @@ -6,12 +6,12 @@ #include //! FIXME: These colors are not gamma-corrected -#define BACKLIGHT_COLOR_RED 0xFF0000 -#define BACKLIGHT_COLOR_GREEN 0x00FF00 -#define BACKLIGHT_COLOR_BLUE 0x0000FF -#define BACKLIGHT_COLOR_BLACK 0x000000 -#define BACKLIGHT_COLOR_WHITE 0xFFFFFF -#define BACKLIGHT_COLOR_WARM_WHITE 0xFFBFA2 +#define BACKLIGHT_COLOR_RED 0xFF0000 +#define BACKLIGHT_COLOR_GREEN 0x00FF00 +#define BACKLIGHT_COLOR_BLUE 0x0000FF +#define BACKLIGHT_COLOR_BLACK 0x000000 +#define BACKLIGHT_COLOR_WHITE 0xFFFFFF +#define BACKLIGHT_COLOR_WARM_WHITE 0xFFBFA2 void backlight_init(void); diff --git a/include/pbl/drivers/battery.h b/include/pbl/drivers/battery.h index 5185a92825..443d474fa9 100644 --- a/include/pbl/drivers/battery.h +++ b/include/pbl/drivers/battery.h @@ -93,8 +93,8 @@ ADCVoltageMonitorReading battery_read_voltage_monitor(void); //! @param reading The voltage monitor reading to convert. //! @param numerator The numerator to multiply the result by. //! @param denominator The denominator to divide the result by. -uint32_t battery_convert_reading_to_millivolts(ADCVoltageMonitorReading reading, - uint32_t numerator, uint32_t denominator); +uint32_t battery_convert_reading_to_millivolts(ADCVoltageMonitorReading reading, uint32_t numerator, + uint32_t denominator); //! Get the current battery charge status. //! diff --git a/include/pbl/drivers/debounced_button.h b/include/pbl/drivers/debounced_button.h index 449c2e00de..cf6f0b2241 100644 --- a/include/pbl/drivers/debounced_button.h +++ b/include/pbl/drivers/debounced_button.h @@ -4,4 +4,3 @@ #pragma once void debounced_button_init(void); - diff --git a/include/pbl/drivers/display/display.h b/include/pbl/drivers/display/display.h index eaf2b62adf..022a35e66f 100644 --- a/include/pbl/drivers/display/display.h +++ b/include/pbl/drivers/display/display.h @@ -11,11 +11,11 @@ typedef struct { uint16_t address; - uint8_t* data; + uint8_t *data; } DisplayRow; -typedef bool(*NextRowCallback)(DisplayRow* row); -typedef void(*UpdateCompleteCallback)(void); +typedef bool (*NextRowCallback)(DisplayRow *row); +typedef void (*UpdateCompleteCallback)(void); //! Update the display with a boot animation frame. //! This is a simple interface for the boot animation service to send frames diff --git a/include/pbl/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01.h b/include/pbl/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01.h index 39d2537da0..9f57794c70 100644 --- a/include/pbl/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01.h +++ b/include/pbl/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01.h @@ -8,7 +8,8 @@ #define DISP_LINE_BYTES (DISP_COLS / 8) #define DISP_LINE_WORDS (((DISP_COLS - 1) / 32) + 1) -// Bytes_per_line + 1 byte for the line address + 1 byte for a null trailer + 1 optional byte for a write command +// Bytes_per_line + 1 byte for the line address + 1 byte for a null trailer + 1 optional byte for a +// write command #define DISP_DMA_BUFFER_SIZE_BYTES (DISP_LINE_BYTES + 3) #define DISP_DMA_BUFFER_SIZE_WORDS (DISP_LINE_WORDS + 1) @@ -22,4 +23,3 @@ typedef struct { NextRowCallback get_next_row; UpdateCompleteCallback complete; } DisplayContext; - diff --git a/include/pbl/drivers/flash.h b/include/pbl/drivers/flash.h index 073e09f244..e539d33881 100644 --- a/include/pbl/drivers/flash.h +++ b/include/pbl/drivers/flash.h @@ -43,7 +43,7 @@ uint32_t flash_whoami(void); * @param start_addr The address of the first byte to be read from flash. * @param buffer_size The total number of bytes to be read from flash. */ -void flash_read_bytes(uint8_t* buffer, uint32_t start_addr, uint32_t buffer_size); +void flash_read_bytes(uint8_t *buffer, uint32_t start_addr, uint32_t buffer_size); /** * Write 1 or more bytes from the buffer to flash starting at the @@ -55,7 +55,7 @@ void flash_read_bytes(uint8_t* buffer, uint32_t start_addr, uint32_t buffer_size * @param start_addr The address of the first byte to be written to flash. * @param buffer_size The total number of bytes to be written. */ -void flash_write_bytes(const uint8_t* buffer, uint32_t start_addr, uint32_t buffer_size); +void flash_write_bytes(const uint8_t *buffer, uint32_t start_addr, uint32_t buffer_size); typedef void (*FlashOperationCompleteCb)(void *context, status_t result); @@ -67,8 +67,7 @@ typedef void (*FlashOperationCompleteCb)(void *context, status_t result); * (possibly high-priority) task, so the callback function must return quickly. * The callback may also be called directly from within flash_erase_subsector. */ -void flash_erase_subsector(uint32_t subsector_addr, - FlashOperationCompleteCb on_complete, +void flash_erase_subsector(uint32_t subsector_addr, FlashOperationCompleteCb on_complete, void *context); /** @@ -79,9 +78,7 @@ void flash_erase_subsector(uint32_t subsector_addr, * (possibly high-priority) task, so the callback function must return quickly. * The callback may also be called directly from within flash_erase_sector. */ -void flash_erase_sector(uint32_t sector_addr, - FlashOperationCompleteCb on_complete, - void *context); +void flash_erase_sector(uint32_t sector_addr, FlashOperationCompleteCb on_complete, void *context); /** * Erase the subsector containing the specified address. @@ -121,9 +118,9 @@ void flash_erase_bulk(void); * erased. Both min_start and max_end must be aligned to a subsector address as * that is the smallest unit that can be erased. */ -void flash_erase_optimal_range( - uint32_t min_start, uint32_t max_start, uint32_t min_end, uint32_t max_end, - FlashOperationCompleteCb on_complete, void *context); +void flash_erase_optimal_range(uint32_t min_start, uint32_t max_start, uint32_t min_end, + uint32_t max_end, FlashOperationCompleteCb on_complete, + void *context); /** * Configure the flash driver to enter a deep sleep mode between commands. @@ -158,14 +155,14 @@ void flash_power_up_after_stop_mode(void); typedef enum { FLASH_MODE_ASYNC = 0, FLASH_MODE_SYNC_BURST, - + // Add new modes above this FLASH_MODE_NUM_MODES -}FlashModeType; +} FlashModeType; /** * Manually switches modes between asynchronous/synchronous - * + * */ void flash_switch_mode(FlashModeType mode); @@ -185,8 +182,7 @@ void flash_prf_set_protection(bool do_protect); uint32_t flash_crc32(uint32_t flash_addr, uint32_t length); //! Apply the legacy defective checksum to a region of flash. -uint32_t flash_calculate_legacy_defective_checksum(uint32_t flash_addr, - uint32_t length); +uint32_t flash_calculate_legacy_defective_checksum(uint32_t flash_addr, uint32_t length); //! Call this before any external flash access (including memory-mapped) //! to power on the flash peripheral if it wasn't already, and @@ -254,4 +250,4 @@ const FlashSecurityRegisters *flash_security_registers_info(void); //! @retval S_SUCCESS if the lock was successful //! @retval StatusCode if the lock failed status_t flash_lock_security_register(uint32_t addr); -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW diff --git a/include/pbl/drivers/flash/flash_impl.h b/include/pbl/drivers/flash/flash_impl.h index ad2d0da7df..a0845d338b 100644 --- a/include/pbl/drivers/flash/flash_impl.h +++ b/include/pbl/drivers/flash/flash_impl.h @@ -79,8 +79,7 @@ status_t flash_impl_read_sync(void *buffer, FlashAddress addr, size_t len); //! //! The result is undefined if this function is called while a write or erase is //! in progress. -status_t flash_impl_read_dma_begin(void *buffer, FlashAddress addr, - size_t len); +status_t flash_impl_read_dma_begin(void *buffer, FlashAddress addr, size_t len); //! Called from an interrupt context when the DMA read has completed. It is //! guaranteed that the call is made from an interrupt of low enough priority @@ -98,8 +97,7 @@ void flash_impl_enable_write_protection(void); //! //! The result is undefined if this function is called while a write or erase is //! in progress. -status_t flash_impl_write_protect(FlashAddress start_sector, - FlashAddress end_sector); +status_t flash_impl_write_protect(FlashAddress start_sector, FlashAddress end_sector); //! Remove write protection. //! @@ -144,8 +142,7 @@ status_t flash_impl_unprotect(void); //! The result is undefined if this function is called while a read or erase is //! in progress. It is an error to call this function while a write is //! in progress or suspended. -int flash_impl_write_page_begin(const void *buffer, FlashAddress addr, - size_t len); +int flash_impl_write_page_begin(const void *buffer, FlashAddress addr, size_t len); //! Poll the status of a flash page write. //! @@ -321,4 +318,4 @@ const FlashSecurityRegisters *flash_impl_security_registers_info(void); //! @retval S_SUCCESS if the lock was successful //! @retval StatusCode if the lock failed status_t flash_impl_lock_security_register(uint32_t address); -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW diff --git a/include/pbl/drivers/flash/qspi_flash.h b/include/pbl/drivers/flash/qspi_flash.h index 54d8ba6d77..df3a365994 100644 --- a/include/pbl/drivers/flash/qspi_flash.h +++ b/include/pbl/drivers/flash/qspi_flash.h @@ -91,4 +91,4 @@ const FlashSecurityRegisters *qspi_flash_security_registers_info(QSPIFlash *dev) //! Lock security registers //! @warning This is a one time operation and will permanently lock the security registers. status_t qspi_flash_lock_security_register(QSPIFlash *dev, uint32_t address); -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW diff --git a/include/pbl/drivers/hrm/gh3x2x.h b/include/pbl/drivers/hrm/gh3x2x.h index 557e1c443a..b9f1e6b1f8 100644 --- a/include/pbl/drivers/hrm/gh3x2x.h +++ b/include/pbl/drivers/hrm/gh3x2x.h @@ -10,11 +10,11 @@ #ifdef CONFIG_BOARD_OBELIX // FIXME(OBELIX): Provide proper GPIO layer abstraction -#define GH3X2X_RESET_PIN_CTRLBY_NPM1300 1 +#define GH3X2X_RESET_PIN_CTRLBY_NPM1300 1 #endif -#define HRM_PPG_CH_NUM 6 -#define HRM_PPG_FACTORY_TEST_FIFO_LEN 80 +#define HRM_PPG_CH_NUM 6 +#define HRM_PPG_FACTORY_TEST_FIFO_LEN 80 typedef struct { double result[HRM_PPG_CH_NUM]; uint16_t test_mode; @@ -30,7 +30,7 @@ typedef struct HRMDeviceState { int32_t work_mode; uint16_t timer_period_ms; AppTimer *timer; - GH3x2xFTData* factory; + GH3x2xFTData *factory; bool initialized; } HRMDeviceState; @@ -42,8 +42,7 @@ typedef const struct HRMDevice { OutputConfig reset_gpio; } HRMDevice; - -bool gh3x2x_ble_data_recv(void* context); +bool gh3x2x_ble_data_recv(void *context); void gh3x2x_wear_evt_notify(bool is_wear); void gh3x2x_rawdata_notify(uint32_t *p_rawdata, uint32_t data_count); @@ -61,4 +60,3 @@ void gh3x2x_start_ft_ctr(void); void gh3x2x_start_ft_leakage(void); void gh3x2x_factory_test_disable(); void gh3x2x_set_work_mode(int32_t mode); - diff --git a/include/pbl/drivers/i2c.h b/include/pbl/drivers/i2c.h index d3d9b0ae11..8e05ef93bf 100644 --- a/include/pbl/drivers/i2c.h +++ b/include/pbl/drivers/i2c.h @@ -47,7 +47,7 @@ bool i2c_read_register(I2CSlavePort *slave, uint8_t register_address, uint8_t *r //! @param result_buffer Pointer to destination buffer //! @return true if transfer succeeded, false if error occurred bool i2c_read_register_block(I2CSlavePort *slave, uint8_t register_address_start, - uint32_t read_size, uint8_t* result_buffer); + uint32_t read_size, uint8_t *result_buffer); //! Read a block of data without sending a register address before doing so. //! Must not be called before \ref i2c_use has been called for the slave @@ -55,7 +55,7 @@ bool i2c_read_register_block(I2CSlavePort *slave, uint8_t register_address_start //! @param read_size Number of bytes to read //! @param result_buffer Pointer to destination buffer //! @return true if transfer succeeded, false if error occurred -bool i2c_read_block(I2CSlavePort *slave, uint32_t read_size, uint8_t* result_buffer); +bool i2c_read_block(I2CSlavePort *slave, uint32_t read_size, uint8_t *result_buffer); //! Write to a register //! Must not be called before \ref i2c_use has been called for the slave @@ -73,7 +73,7 @@ bool i2c_write_register(I2CSlavePort *slave, uint8_t register_address, uint8_t v //! @param buffer Pointer to source buffer //! @return true if transfer succeeded, false if error occurred bool i2c_write_register_block(I2CSlavePort *slave, uint8_t register_address_start, - uint32_t write_size, const uint8_t* buffer); + uint32_t write_size, const uint8_t *buffer); //! Write a block of data without sending a register address before doing so. //! Must not be called before \ref i2c_use has been called for the slave @@ -81,18 +81,19 @@ bool i2c_write_register_block(I2CSlavePort *slave, uint8_t register_address_star //! @param write_size Number of bytes to write //! @param buffer Pointer to source buffer //! @return true if transfer succeeded, false if error occurred -bool i2c_write_block(I2CSlavePort *slave, uint32_t write_size, const uint8_t* buffer); +bool i2c_write_block(I2CSlavePort *slave, uint32_t write_size, const uint8_t *buffer); //! Write a block of data then read a block of data in a single atomic transaction. //! This function is thread-safe and holds the bus lock throughout both operations. //! Must not be called before \ref i2c_use has been called for the slave. //! Performs a write followed by read while holding the bus mutex, useful for devices that require -//! sending a command/register address before reading data without allowing other transactions in between. +//! sending a command/register address before reading data without allowing other transactions in +//! between. //! @param slave I2C slave to communicate with //! @param write_size Number of bytes to write //! @param write_buffer Pointer to source buffer for write //! @param read_size Number of bytes to read //! @param read_buffer Pointer to destination buffer for read //! @return true if transfer succeeded, false if error occurred -bool i2c_write_read_block(I2CSlavePort *slave, uint32_t write_size, const uint8_t* write_buffer, - uint32_t read_size, uint8_t* read_buffer); +bool i2c_write_read_block(I2CSlavePort *slave, uint32_t write_size, const uint8_t *write_buffer, + uint32_t read_size, uint8_t *read_buffer); diff --git a/include/pbl/drivers/i2c/nrf5.h b/include/pbl/drivers/i2c/nrf5.h index cec8840858..66c7bbd696 100644 --- a/include/pbl/drivers/i2c/nrf5.h +++ b/include/pbl/drivers/i2c/nrf5.h @@ -10,5 +10,5 @@ typedef struct I2CBusHal { nrfx_twim_t twim; - nrf_twim_frequency_t frequency; ///< Bus clock speed + nrf_twim_frequency_t frequency; ///< Bus clock speed } I2CBusHal; diff --git a/include/pbl/drivers/imu/mmc5603nj/registers.h b/include/pbl/drivers/imu/mmc5603nj/registers.h index a746c9910c..66824bbb55 100644 --- a/include/pbl/drivers/imu/mmc5603nj/registers.h +++ b/include/pbl/drivers/imu/mmc5603nj/registers.h @@ -1,91 +1,103 @@ /* SPDX-FileCopyrightText: 2025 Matthew Wardrop */ /* SPDX-License-Identifier: Apache-2.0 */ -# pragma once +#pragma once // These definitions are drawn from the datasheet provided by MEMSIC: // https://www.memsic.com/Public/Uploads/uploadfile/files/20220119/MMC5603NJDatasheetRev.B.pdf // Note that it is assumed that the architectures we are building for are little endian -static const uint8_t MMC5603NJ_REG_XOUT0 = 0x00; // Xout[19:12] -static const uint8_t MMC5603NJ_REG_XOUT1 = 0x01; // Xout[11:4] -static const uint8_t MMC5603NJ_REG_YOUT0 = 0x02; // Yout[19:12] -static const uint8_t MMC5603NJ_REG_YOUT1 = 0x03; // Yout[11:4] -static const uint8_t MMC5603NJ_REG_ZOUT0 = 0x04; // Zout[19:12] -static const uint8_t MMC5603NJ_REG_ZOUT1 = 0x05; // Zout[11:4] -static const uint8_t MMC5603NJ_REG_XOUT2 = 0x06; // Xout[3:0] -static const uint8_t MMC5603NJ_REG_YOUT2 = 0x07; // Yout[3:0] -static const uint8_t MMC5603NJ_REG_ZOUT2 = 0x08; // Zout[3:0] -static const uint8_t MMC5603NJ_REG_TOUT = 0x09; // Temperature output -static const uint8_t MMC5603NJ_REG_STATUS1 = 0x18; // Device status -static const uint8_t MMC5603NJ_REG_ODR = 0x1A; // Output data rate -static const uint8_t MMC5603NJ_REG_CTRL0 = 0x1B; // Control register 0 -static const uint8_t MMC5603NJ_REG_CTRL1 = 0x1C; // Control register 1 -static const uint8_t MMC5603NJ_REG_CTRL2 = 0x1D; // Control register 2 -static const uint8_t MMC5603NJ_REG_ST_X_TH = 0x1E; // X-axis selftest threshold -static const uint8_t MMC5603NJ_REG_ST_Y_TH = 0x1F; // Y-axis selftest threshold -static const uint8_t MMC5603NJ_REG_ST_Z_TH = 0x20; // Z-axis selftest threshold -static const uint8_t MMC5603NJ_REG_ST_X = 0x27; // X-axis selftest set value -static const uint8_t MMC5603NJ_REG_ST_Y = 0x28; // Y-axis selftest set value -static const uint8_t MMC5603NJ_REG_ST_Z = 0x29; // z-axis selftest set value -static const uint8_t MMC5603NJ_REG_WHO_AM_I = 0x39; // Product ID +static const uint8_t MMC5603NJ_REG_XOUT0 = 0x00; // Xout[19:12] +static const uint8_t MMC5603NJ_REG_XOUT1 = 0x01; // Xout[11:4] +static const uint8_t MMC5603NJ_REG_YOUT0 = 0x02; // Yout[19:12] +static const uint8_t MMC5603NJ_REG_YOUT1 = 0x03; // Yout[11:4] +static const uint8_t MMC5603NJ_REG_ZOUT0 = 0x04; // Zout[19:12] +static const uint8_t MMC5603NJ_REG_ZOUT1 = 0x05; // Zout[11:4] +static const uint8_t MMC5603NJ_REG_XOUT2 = 0x06; // Xout[3:0] +static const uint8_t MMC5603NJ_REG_YOUT2 = 0x07; // Yout[3:0] +static const uint8_t MMC5603NJ_REG_ZOUT2 = 0x08; // Zout[3:0] +static const uint8_t MMC5603NJ_REG_TOUT = 0x09; // Temperature output +static const uint8_t MMC5603NJ_REG_STATUS1 = 0x18; // Device status +static const uint8_t MMC5603NJ_REG_ODR = 0x1A; // Output data rate +static const uint8_t MMC5603NJ_REG_CTRL0 = 0x1B; // Control register 0 +static const uint8_t MMC5603NJ_REG_CTRL1 = 0x1C; // Control register 1 +static const uint8_t MMC5603NJ_REG_CTRL2 = 0x1D; // Control register 2 +static const uint8_t MMC5603NJ_REG_ST_X_TH = 0x1E; // X-axis selftest threshold +static const uint8_t MMC5603NJ_REG_ST_Y_TH = 0x1F; // Y-axis selftest threshold +static const uint8_t MMC5603NJ_REG_ST_Z_TH = 0x20; // Z-axis selftest threshold +static const uint8_t MMC5603NJ_REG_ST_X = 0x27; // X-axis selftest set value +static const uint8_t MMC5603NJ_REG_ST_Y = 0x28; // Y-axis selftest set value +static const uint8_t MMC5603NJ_REG_ST_Z = 0x29; // z-axis selftest set value +static const uint8_t MMC5603NJ_REG_WHO_AM_I = 0x39; // Product ID -static const uint8_t MMC5603NJ_WHO_AM_I_VALUE = 0x10; // Expected value for WHO_AM_I -static const uint8_t MMC5603NJ_SW_RESET_DELAY_MS = 20; // Required 20 ms delay after a software reset -static const uint8_t MMC5603NJ_SET_DELAY_MS = 1; // Required 1 ms delay after a (re)set operation +static const uint8_t MMC5603NJ_WHO_AM_I_VALUE = 0x10; // Expected value for WHO_AM_I +static const uint8_t MMC5603NJ_SW_RESET_DELAY_MS = + 20; // Required 20 ms delay after a software reset +static const uint8_t MMC5603NJ_SET_DELAY_MS = 1; // Required 1 ms delay after a (re)set operation // STATUS 1 masks -static const uint8_t MMC5603NJ_STATUS1_OTP_READ_DONE_MASK = 0x10; // Indicates whether the OTP memory has been read. -static const uint8_t MMC5603NJ_STATUS1_SAT_SENSOR_MASK = 0x20; // Indicates whether the sensor is saturated. -static const uint8_t MMC5603NJ_STATUS1_MEAS_M_DONE_MASK = 0x40; // Indicates whether the magnetic measurement is done. -static const uint8_t MMC5603NJ_STATUS1_MEAS_T_DONE_MASK = 0x80; // Indicates whether the temperature measurement is done. +static const uint8_t MMC5603NJ_STATUS1_OTP_READ_DONE_MASK = + 0x10; // Indicates whether the OTP memory has been read. +static const uint8_t MMC5603NJ_STATUS1_SAT_SENSOR_MASK = + 0x20; // Indicates whether the sensor is saturated. +static const uint8_t MMC5603NJ_STATUS1_MEAS_M_DONE_MASK = + 0x40; // Indicates whether the magnetic measurement is done. +static const uint8_t MMC5603NJ_STATUS1_MEAS_T_DONE_MASK = + 0x80; // Indicates whether the temperature measurement is done. // CONTROL 0 bits -static const uint8_t MMC5603NJ_CTRL0_TAKE_MEAS_M = 0x01; // Take a single measurement of the magnetic field. -static const uint8_t MMC5603NJ_CTRL0_TAKE_MEAS_T = 0x02; // Take a single measurement of the temperature. -static const uint8_t MMC5603NJ_CTRL0_DO_SET = 0x08; // Perform a single set operation. -static const uint8_t MMC5603NJ_CTRL0_DO_RESET = 0x10; // Perform a single reset operation. -static const uint8_t MMC5603NJ_CTRL0_AUTO_SR_EN = 0x20; // Enable automatic set/reset. -static const uint8_t MMC5603NJ_CTRL0_AUTO_ST_EN = 0x40; // Perform a single selftest. -static const uint8_t MMC5603NJ_CTRL0_CMM_FREQ_EN = 0x80; // Start the calculation of the measurement period for ODR. - // Should be set before continuous-mode measurements are started. +static const uint8_t MMC5603NJ_CTRL0_TAKE_MEAS_M = + 0x01; // Take a single measurement of the magnetic field. +static const uint8_t MMC5603NJ_CTRL0_TAKE_MEAS_T = + 0x02; // Take a single measurement of the temperature. +static const uint8_t MMC5603NJ_CTRL0_DO_SET = 0x08; // Perform a single set operation. +static const uint8_t MMC5603NJ_CTRL0_DO_RESET = 0x10; // Perform a single reset operation. +static const uint8_t MMC5603NJ_CTRL0_AUTO_SR_EN = 0x20; // Enable automatic set/reset. +static const uint8_t MMC5603NJ_CTRL0_AUTO_ST_EN = 0x40; // Perform a single selftest. +static const uint8_t MMC5603NJ_CTRL0_CMM_FREQ_EN = + 0x80; // Start the calculation of the measurement period for ODR. + // Should be set before continuous-mode measurements are started. // CONTROL 1 bits // Bandwidth settings control length of measurement (longer measurements have lower noise) -static const uint8_t MMC5603NJ_CTRL1_BANDWIDTH_6ms6 = 0x00; // 6.6ms -static const uint8_t MMC5603NJ_CTRL1_BANDWIDTH_3ms5 = 0x01; // 3.5ms -static const uint8_t MMC5603NJ_CTRL1_BANDWIDTH_2ms = 0x02; // 2.0ms -static const uint8_t MMC5603NJ_CTRL1_BANDWIDTH_1ms2 = 0x03; // 1.2ms -static const uint8_t MMC5603NJ_CTRL1_X_INHIBIT = 0x04; // Disable the X channel (reducing length of measurement) -static const uint8_t MMC5603NJ_CTRL1_Y_INHIBIT = 0x08; // As above, but for Y. -static const uint8_t MMC5603NJ_CTRL1_Z_INHIBIT = 0x10; // As above, but for Z. -static const uint8_t MMC5603NJ_CTRL1_ST_ENP = 0x20; // Bring a DC current through the self-test coil of sensor inducing offset to magnetic field. - // Checks whether the sensor has been saturated. -static const uint8_t MMC5603NJ_CTRL1_ST_ENM = 0x40; // Same as above, but in opposite direction. -static const uint8_t MMC5603NJ_CTRL1_SW_RESET = 0x80; // Reset hardware clearing all registers and rereading OTP. - +static const uint8_t MMC5603NJ_CTRL1_BANDWIDTH_6ms6 = 0x00; // 6.6ms +static const uint8_t MMC5603NJ_CTRL1_BANDWIDTH_3ms5 = 0x01; // 3.5ms +static const uint8_t MMC5603NJ_CTRL1_BANDWIDTH_2ms = 0x02; // 2.0ms +static const uint8_t MMC5603NJ_CTRL1_BANDWIDTH_1ms2 = 0x03; // 1.2ms +static const uint8_t MMC5603NJ_CTRL1_X_INHIBIT = + 0x04; // Disable the X channel (reducing length of measurement) +static const uint8_t MMC5603NJ_CTRL1_Y_INHIBIT = 0x08; // As above, but for Y. +static const uint8_t MMC5603NJ_CTRL1_Z_INHIBIT = 0x10; // As above, but for Z. +static const uint8_t MMC5603NJ_CTRL1_ST_ENP = + 0x20; // Bring a DC current through the self-test coil of sensor inducing offset to magnetic + // field. Checks whether the sensor has been saturated. +static const uint8_t MMC5603NJ_CTRL1_ST_ENM = 0x40; // Same as above, but in opposite direction. +static const uint8_t MMC5603NJ_CTRL1_SW_RESET = + 0x80; // Reset hardware clearing all registers and rereading OTP. // CONTROL 2 bits // AUTOSET_PRD determines how often automatic set/reset operations are performed // i.e. MMC5603NJ_CTRL2_AUTOSET_PRD_ means resets will occur every measurements -static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_1 = 0x00; -static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_25 = 0x01; -static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_75 = 0x02; -static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_100 = 0x03; -static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_250 = 0x04; -static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_500 = 0x05; -static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_1000 = 0x06; -static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_2000 = 0x07; -static const uint8_t MMC5603NJ_CTRL2_PRD_SET_EN = 0x08; // Enable automatic set (recommended). -static const uint8_t MMC5603NJ_CTRL2_CMM_EN = 0x10; // Enable continuous measurement mode (ODR and cmm_freq_en must be set). -static const uint8_t MMC5603NJ_CTRL2_HPOWER = 0x80; // High power mode (allowed for ODR up to 1000Hz). +static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_1 = 0x00; +static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_25 = 0x01; +static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_75 = 0x02; +static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_100 = 0x03; +static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_250 = 0x04; +static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_500 = 0x05; +static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_1000 = 0x06; +static const uint8_t MMC5603NJ_CTRL2_AUTOSET_PRD_2000 = 0x07; +static const uint8_t MMC5603NJ_CTRL2_PRD_SET_EN = 0x08; // Enable automatic set (recommended). +static const uint8_t MMC5603NJ_CTRL2_CMM_EN = + 0x10; // Enable continuous measurement mode (ODR and cmm_freq_en must be set). +static const uint8_t MMC5603NJ_CTRL2_HPOWER = + 0x80; // High power mode (allowed for ODR up to 1000Hz). /* A note on ODRs The ODR can be configured in the range of 1-255, with an increment of 1. -1000Hz can be achieved by setting hpower=1 in CTRL2 and ODR=255; +1000Hz can be achieved by setting hpower=1 in CTRL2 and ODR=255; otherwise it is interpreted as Hz. The target ODR may not be achievable if automatic set/reset is enabled (recommended), diff --git a/include/pbl/drivers/mag.h b/include/pbl/drivers/mag.h index 64b232baed..06fee4b390 100644 --- a/include/pbl/drivers/mag.h +++ b/include/pbl/drivers/mag.h @@ -11,12 +11,12 @@ //! @internal //! Structure containing 3-axis magnetometer data typedef struct PACKED { - //! magnetic field along the x axis - int16_t x; - //! magnetic field along the y axis - int16_t y; - //! magnetic field along the z axis - int16_t z; + //! magnetic field along the x axis + int16_t x; + //! magnetic field along the y axis + int16_t y; + //! magnetic field along the z axis + int16_t z; } MagData; typedef enum { @@ -50,4 +50,3 @@ void mag_release(void); MagReadStatus mag_read_data(MagData *data); bool mag_change_sample_rate(MagSampleRate rate); - diff --git a/include/pbl/drivers/mcu_reboot_reason.h b/include/pbl/drivers/mcu_reboot_reason.h index 4d753e4fe3..656c785e3e 100644 --- a/include/pbl/drivers/mcu_reboot_reason.h +++ b/include/pbl/drivers/mcu_reboot_reason.h @@ -9,14 +9,14 @@ typedef struct McuRebootReason { union { struct { - bool brown_out_reset:1; - bool pin_reset:1; - bool power_on_reset:1; - bool software_reset:1; - bool independent_watchdog_reset:1; - bool window_watchdog_reset:1; - bool low_power_manager_reset:1; - uint8_t reserved:1; + bool brown_out_reset : 1; + bool pin_reset : 1; + bool power_on_reset : 1; + bool software_reset : 1; + bool independent_watchdog_reset : 1; + bool window_watchdog_reset : 1; + bool low_power_manager_reset : 1; + uint8_t reserved : 1; }; uint8_t reset_mask; }; diff --git a/include/pbl/drivers/mic.h b/include/pbl/drivers/mic.h index 349b88a0a7..f47450b497 100644 --- a/include/pbl/drivers/mic.h +++ b/include/pbl/drivers/mic.h @@ -7,8 +7,8 @@ #include #include -#define MIC_SAMPLE_RATE (16000) //!< Microphone audio data sample rate -#define MIC_DEFAULT_VOLUME (-1) +#define MIC_SAMPLE_RATE (16000) //!< Microphone audio data sample rate +#define MIC_DEFAULT_VOLUME (-1) typedef const struct MicDevice MicDevice; @@ -25,8 +25,8 @@ void mic_set_volume(MicDevice *this, uint16_t volume); //! each time it calls the audio data handler callback. audio_buffer_len should be specified as the //! length of the buffer (number of 16-bit samples it can hold) //! @return true if mic was started, false if mic was already running -bool mic_start(MicDevice *this, MicDataHandlerCB data_handler, void *context, - int16_t *audio_buffer, size_t audio_buffer_len); +bool mic_start(MicDevice *this, MicDataHandlerCB data_handler, void *context, int16_t *audio_buffer, + size_t audio_buffer_len); //! Stop the microphone. If buffer is not full, the remaining samples will be abandoned. No more //! callbacks will be executed nor data copied into the buffer after this returns diff --git a/include/pbl/drivers/mic/nrf5/pdm_definitions.h b/include/pbl/drivers/mic/nrf5/pdm_definitions.h index 112d2a4bc9..c8c8487d95 100644 --- a/include/pbl/drivers/mic/nrf5/pdm_definitions.h +++ b/include/pbl/drivers/mic/nrf5/pdm_definitions.h @@ -12,42 +12,42 @@ #include // PDM Configuration -#define PDM_BUFFER_SIZE_SAMPLES (320) -#define PDM_BUFFER_COUNT (2) -#define PDM_GAIN_DEFAULT (NRF_PDM_GAIN_DEFAULT) +#define PDM_BUFFER_SIZE_SAMPLES (320) +#define PDM_BUFFER_COUNT (2) +#define PDM_GAIN_DEFAULT (NRF_PDM_GAIN_DEFAULT) // Circular buffer configuration -#define CIRCULAR_BUF_SIZE_MS (320) -#define CIRCULAR_BUF_SIZE_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_SIZE_MS) / 1000) -#define CIRCULAR_BUF_SIZE_BYTES (CIRCULAR_BUF_SIZE_SAMPLES * sizeof(int16_t)) +#define CIRCULAR_BUF_SIZE_MS (320) +#define CIRCULAR_BUF_SIZE_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_SIZE_MS) / 1000) +#define CIRCULAR_BUF_SIZE_BYTES (CIRCULAR_BUF_SIZE_SAMPLES * sizeof(int16_t)) // Minimum fallback size when the heap is fragmented and the full circular // buffer alloc fails. Below this transcription quality degrades noticeably. -#define CIRCULAR_BUF_MIN_SIZE_MS (128) -#define CIRCULAR_BUF_MIN_SIZE_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_MIN_SIZE_MS) / 1000) -#define CIRCULAR_BUF_MIN_SIZE_BYTES (CIRCULAR_BUF_MIN_SIZE_SAMPLES * sizeof(int16_t)) +#define CIRCULAR_BUF_MIN_SIZE_MS (128) +#define CIRCULAR_BUF_MIN_SIZE_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_MIN_SIZE_MS) / 1000) +#define CIRCULAR_BUF_MIN_SIZE_BYTES (CIRCULAR_BUF_MIN_SIZE_SAMPLES * sizeof(int16_t)) // 32 ms shrink per retry gives ~7 attempts between 320 ms and 128 ms. -#define CIRCULAR_BUF_STEP_MS (32) -#define CIRCULAR_BUF_STEP_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_STEP_MS) / 1000) -#define CIRCULAR_BUF_STEP_BYTES (CIRCULAR_BUF_STEP_SAMPLES * sizeof(int16_t)) +#define CIRCULAR_BUF_STEP_MS (32) +#define CIRCULAR_BUF_STEP_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_STEP_MS) / 1000) +#define CIRCULAR_BUF_STEP_BYTES (CIRCULAR_BUF_STEP_SAMPLES * sizeof(int16_t)) typedef struct { nrfx_pdm_config_t pdm_config; int16_t *pdm_buffers[PDM_BUFFER_COUNT]; uint8_t current_buffer_idx; - + // User interface MicDataHandlerCB data_handler; void *handler_context; int16_t *audio_buffer; size_t audio_buffer_len; - + // Intermediate storage CircularBuffer circ_buffer; uint8_t *circ_buffer_storage; uint16_t circ_buffer_size; - + // State management struct pbl_mutex mutex; bool is_running; @@ -57,7 +57,7 @@ typedef struct { typedef const struct MicDevice { MicDeviceState *state; - + // Hardware configuration const nrfx_pdm_t pdm_instance; uint32_t clk_pin; diff --git a/include/pbl/drivers/mic/sf32lb52/pdm_definitions.h b/include/pbl/drivers/mic/sf32lb52/pdm_definitions.h index 3dae10a074..b0c5b7be7b 100644 --- a/include/pbl/drivers/mic/sf32lb52/pdm_definitions.h +++ b/include/pbl/drivers/mic/sf32lb52/pdm_definitions.h @@ -42,7 +42,7 @@ typedef struct MicState { typedef const struct MicDevice { MicDeviceState *state; - PDM_TypeDef* pdm_instance; + PDM_TypeDef *pdm_instance; IRQn_Type pdm_irq; uint32_t pdm_irq_priority; IRQn_Type pdm_dma_irq; diff --git a/include/pbl/drivers/mpu.h b/include/pbl/drivers/mpu.h index 40bbc7e0f3..7346c7f8e3 100644 --- a/include/pbl/drivers/mpu.h +++ b/include/pbl/drivers/mpu.h @@ -6,7 +6,6 @@ #include #include - typedef enum MpuCachePolicy { MpuCachePolicy_NotCacheable, MpuCachePolicy_WriteThrough, @@ -37,14 +36,14 @@ typedef enum MpuPermissions { // mask required by the hardware; the ARMv8-M backend programs the limit // register directly. Callers never see these implementation details. typedef struct MpuRegion { - uint8_t region_num:4; - bool enabled:1; + uint8_t region_num : 4; + bool enabled : 1; // Allow instruction fetch from this region. Maps to XN=0 in the // hardware encoding (RASR.XN on ARMv7-M, RBAR.XN on ARMv8-M). The // default (false) sets XN=1 -- safer, since most regions hold data // and shouldn't be executable. Flash, App RAM, Worker RAM and any // text section relocated to RAM need to opt in. - bool executable:1; + bool executable : 1; uintptr_t base_address; uint32_t size; MpuCachePolicy cache_policy; @@ -55,14 +54,13 @@ void mpu_enable(void); void mpu_disable(void); -void mpu_set_region(const MpuRegion* region); +void mpu_set_region(const MpuRegion *region); MpuRegion mpu_get_region(int region_num); -void mpu_get_register_settings(const MpuRegion* region, uint32_t *base_address_reg, +void mpu_get_register_settings(const MpuRegion *region, uint32_t *base_address_reg, uint32_t *attributes_reg); - bool mpu_memory_is_cachable(const void *addr); void mpu_init_region_from_region(MpuRegion *copy, const MpuRegion *from, bool allow_user_access); diff --git a/include/pbl/drivers/otp.h b/include/pbl/drivers/otp.h index 5ea95eb8be..b58dc36b0d 100644 --- a/include/pbl/drivers/otp.h +++ b/include/pbl/drivers/otp.h @@ -6,7 +6,9 @@ #include #include -#if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) || defined(CONFIG_BOARD_QEMU_EMERY) || defined(CONFIG_BOARD_QEMU_FLINT) || defined(CONFIG_BOARD_QEMU_GABBRO) +#if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) || \ + defined(CONFIG_BOARD_GETAFIX) || defined(CONFIG_BOARD_QEMU_EMERY) || \ + defined(CONFIG_BOARD_QEMU_FLINT) || defined(CONFIG_BOARD_QEMU_GABBRO) enum { OTP_HWVER = 0, OTP_SERIAL = 1, @@ -23,8 +25,8 @@ typedef enum { OtpWriteFailCorrupt = 2, } OtpWriteResult; -uint8_t * otp_get_lock(const uint8_t index); +uint8_t *otp_get_lock(const uint8_t index); bool otp_is_locked(const uint8_t index); -char * otp_get_slot(const uint8_t index); +char *otp_get_slot(const uint8_t index); OtpWriteResult otp_write_slot(const uint8_t index, const char *value); diff --git a/include/pbl/drivers/pmic.h b/include/pbl/drivers/pmic.h index 3ff6c7dcc9..7796ecfe1c 100644 --- a/include/pbl/drivers/pmic.h +++ b/include/pbl/drivers/pmic.h @@ -49,4 +49,3 @@ void set_4V5_power_state(bool enabled); //! Enables the 6.6V power rail. Used for the display on snowy. void set_6V6_power_state(bool enabled); - diff --git a/include/pbl/drivers/pmic/npm1300.h b/include/pbl/drivers/pmic/npm1300.h index 5c739a5183..01df3d321d 100644 --- a/include/pbl/drivers/pmic/npm1300.h +++ b/include/pbl/drivers/pmic/npm1300.h @@ -27,7 +27,7 @@ typedef enum { Npm1300_Gpio2, Npm1300_Gpio3, Npm1300_Gpio4, -}Npm1300GpioId_t; +} Npm1300GpioId_t; //! Maximum discharge current in mA #define NPM1300_DISCHG_LIMIT_MA_MAX 1000UL @@ -37,6 +37,6 @@ typedef struct { bool (*gpio_set)(Npm1300GpioId_t id, bool is_high); bool (*ldo2_set_enabled)(bool enabled); bool (*dischg_limit_ma_set)(uint32_t ilim_ma); -}Npm1300Ops_t; +} Npm1300Ops_t; extern Npm1300Ops_t NPM1300_OPS; \ No newline at end of file diff --git a/include/pbl/drivers/qemu/qemu_serial.h b/include/pbl/drivers/qemu/qemu_serial.h index 8045b1e888..25d25cdc85 100644 --- a/include/pbl/drivers/qemu/qemu_serial.h +++ b/include/pbl/drivers/qemu/qemu_serial.h @@ -29,7 +29,6 @@ typedef enum { QemuProtocol_HeartRate = 13, } QemuProtocol; - // --------------------------------------------------------------------------------------- // Structure of the data for various protocols @@ -37,63 +36,55 @@ typedef enum { // QemuProtocol_Tap typedef struct PACKED { - uint8_t axis; // 0: x-axis, 1: y-axis, 2: z-axis - int8_t direction; // either +1 or -1 + uint8_t axis; // 0: x-axis, 1: y-axis, 2: z-axis + int8_t direction; // either +1 or -1 } QemuProtocolTapHeader; - // QemuProtocol_BluetoothConnection typedef struct PACKED { - uint8_t connected; // true if connected + uint8_t connected; // true if connected } QemuProtocolBluetoothConnectionHeader; - // QemuProtocol_Compass typedef struct PACKED { - uint32_t magnetic_heading; // 0x10000 represents 360 degrees - CompassStatus calib_status:8; // CompassStatus enum + uint32_t magnetic_heading; // 0x10000 represents 360 degrees + CompassStatus calib_status : 8; // CompassStatus enum } QemuProtocolCompassHeader; - // QemuProtocol_Battery typedef struct PACKED { - uint8_t battery_pct; // from 0 to 100 + uint8_t battery_pct; // from 0 to 100 uint8_t charger_connected; } QemuProtocolBatteryHeader; - // QemuProtocol_Accel request (to Pebble) typedef struct PACKED { - uint8_t num_samples; + uint8_t num_samples; AccelRawData samples[0]; } QemuProtocolAccelHeader; // QemuProtocol_Accel response (back to host) typedef struct PACKED { - uint16_t avail_space; // Number of samples we can accept + uint16_t avail_space; // Number of samples we can accept } QemuProtocolAccelResponseHeader; - // QemuProtocol_Vibration notification (sent from Pebble to host) typedef struct PACKED { - uint8_t on; // non-zero if vibe is on, 0 if off + uint8_t on; // non-zero if vibe is on, 0 if off } QemuProtocolVibrationNotificationHeader; - // QemuProtocol_Button typedef struct PACKED { // New button state. Bit x specifies the state of button x, where x is one of the // ButtonId enum values. - uint8_t button_state; + uint8_t button_state; } QemuProtocolButtonHeader; - // QemuProtocol_TimeFormat typedef struct PACKED { - uint8_t is_24_hour; // non-zero if 24h format, 0 if 12h format + uint8_t is_24_hour; // non-zero if 24h format, 0 if 12h format } QemuProtocolTimeFormatHeader; - // QemuProtocol_TimelinePeek typedef struct PACKED { //! Decides whether the Timeline Peek will show. Timeline Peek will animate only when this state @@ -104,7 +95,6 @@ typedef struct PACKED { bool enabled; } QemuProtocolTimelinePeekHeader; - // QemuProtocol_ContentSize typedef struct PACKED { //! New system content size. @@ -115,7 +105,6 @@ _Static_assert(sizeof(PreferredContentSize) == sizeof(((QemuProtocolContentSizeH "sizeof(PreferredContentSize) grew, need to update QemuContentSize in libpebble2 !"); #endif - // QemuProtocol_HealthMetric // Stable wire identifier for a health metric. Mapped to ActivityMetric on the // firmware side so reordering ActivityMetric can't silently change the protocol. @@ -131,11 +120,10 @@ typedef enum { } QemuHealthMetric; typedef struct PACKED { - uint8_t metric; // QemuHealthMetric - int32_t value; // metric value, big-endian + uint8_t metric; // QemuHealthMetric + int32_t value; // metric value, big-endian } QemuProtocolHealthMetricHeader; - // QemuProtocol_HeartRate typedef struct PACKED { uint8_t bpm; diff --git a/include/pbl/drivers/qemu/qemu_serial_private.h b/include/pbl/drivers/qemu/qemu_serial_private.h index 4cf662bd6d..5cfd0d5740 100644 --- a/include/pbl/drivers/qemu/qemu_serial_private.h +++ b/include/pbl/drivers/qemu/qemu_serial_private.h @@ -13,32 +13,29 @@ #define QEMU_HEADER_SIGNATURE 0xFEED #define QEMU_FOOTER_SIGNATURE 0xBEEF -#define QEMU_MAX_DATA_LEN 2048 - +#define QEMU_MAX_DATA_LEN 2048 // Every message sent over the QEMU comm channel has the following header. All // data is set in network byte order. The maximum data len (not including header or footer) // allowed is QEMU_MAX_DATA_LEN bytes typedef struct PACKED { - uint16_t signature; // QEMU_HEADER_SIGNATURE - uint16_t protocol; // one of QemuProtocol - uint16_t len; // number of bytes that follow (not including this header or footer) + uint16_t signature; // QEMU_HEADER_SIGNATURE + uint16_t protocol; // one of QemuProtocol + uint16_t len; // number of bytes that follow (not including this header or footer) } QemuCommChannelHdr; // Every message sent over the QEMU comm channel has the following footer. typedef struct PACKED { - uint16_t signature; // QEMU_FOOTER_SIGNATURE + uint16_t signature; // QEMU_FOOTER_SIGNATURE } QemuCommChannelFooter; - // Incoming message handlers are defined using this structure -typedef void (*QemuMessageCallback)(const uint8_t* data, uint32_t length); +typedef void (*QemuMessageCallback)(const uint8_t *data, uint32_t length); typedef struct { uint16_t protocol_id; QemuMessageCallback callback; } QemuMessageHandler; - // Which state our incoming message state machine is in typedef enum { QemuRecvState_WaitingHdrSignatureMSB, @@ -48,13 +45,12 @@ typedef enum { QemuRecvState_WaitingFooter, } QemuRecvState; - // Structure of our globals typedef struct { bool initialized; struct pbl_mutex qemu_comm_lock; SharedCircularBuffer isr_buffer; - SharedCircularBufferClient isr_buffer_client; + SharedCircularBufferClient isr_buffer_client; QemuRecvState recv_state; uint8_t prev_byte; @@ -66,24 +62,23 @@ typedef struct { time_t start_recv_packet_time; } QemuSerialGlobals; - // ----------------------------------------------------------------------------------- // Defines and private structures #define UART_SERIAL_BAUD_RATE 115200 #define QEMU_ISR_RECV_HIGH_WATER_DELTA (128) -#define QEMU_ISR_RECV_BUFFER_SIZE (QEMU_MAX_DATA_LEN + QEMU_ISR_RECV_HIGH_WATER_DELTA) -#define QEMU_RECV_PACKET_TIMEOUT_SEC 10 // We have to receive a complete packet within this - // amount of time - -#define QEMU_FOOTER_MSB ((uint8_t)(QEMU_FOOTER_SIGNATURE >> 8)) -#define QEMU_FOOTER_LSB ((uint8_t)(QEMU_FOOTER_SIGNATURE & 0x00FF)) -#define QEMU_HEADER_MSB ((uint8_t)(QEMU_HEADER_SIGNATURE >> 8)) -#define QEMU_HEADER_LSB ((uint8_t)(QEMU_HEADER_SIGNATURE & 0x00FF)) +#define QEMU_ISR_RECV_BUFFER_SIZE (QEMU_MAX_DATA_LEN + QEMU_ISR_RECV_HIGH_WATER_DELTA) +#define QEMU_RECV_PACKET_TIMEOUT_SEC \ + 10 // We have to receive a complete packet within this + // amount of time +#define QEMU_FOOTER_MSB ((uint8_t)(QEMU_FOOTER_SIGNATURE >> 8)) +#define QEMU_FOOTER_LSB ((uint8_t)(QEMU_FOOTER_SIGNATURE & 0x00FF)) +#define QEMU_HEADER_MSB ((uint8_t)(QEMU_HEADER_SIGNATURE >> 8)) +#define QEMU_HEADER_LSB ((uint8_t)(QEMU_HEADER_SIGNATURE & 0x00FF)) // ----------------------------------------------------------------------------------- void qemu_serial_private_init_state(QemuSerialGlobals *state); uint8_t *qemu_serial_private_assemble_message(QemuSerialGlobals *state, uint32_t *msg_bytes, - uint16_t *protocol); + uint16_t *protocol); diff --git a/include/pbl/drivers/qemu/qemu_settings.h b/include/pbl/drivers/qemu/qemu_settings.h index a8596104ea..ae83d129ab 100644 --- a/include/pbl/drivers/qemu/qemu_settings.h +++ b/include/pbl/drivers/qemu/qemu_settings.h @@ -6,13 +6,11 @@ #include typedef enum { - QemuSetting_FirstBootLogicEnable = 1, // Returns a bool - QemuSetting_DefaultConnected = 2, // Returns a bool - QemuSetting_DefaultPluggedIn = 3, // Returns a bool + QemuSetting_FirstBootLogicEnable = 1, // Returns a bool + QemuSetting_DefaultConnected = 2, // Returns a bool + QemuSetting_DefaultPluggedIn = 3, // Returns a bool } QemuSetting; - - // --------------------------------------------------------------------------------------- // API uint32_t qemu_setting_get(QemuSetting); diff --git a/include/pbl/drivers/qspi.h b/include/pbl/drivers/qspi.h index 316b35e360..ea9f8764cc 100644 --- a/include/pbl/drivers/qspi.h +++ b/include/pbl/drivers/qspi.h @@ -9,7 +9,7 @@ #include //! Memory mapped region for the QSPI controller -#define QSPI_MMAP_BASE_ADDRESS ((uintptr_t) 0x90000000) +#define QSPI_MMAP_BASE_ADDRESS ((uintptr_t)0x90000000) //! Timouts for qspi_poll_bit #define QSPI_NO_TIMEOUT (0) diff --git a/include/pbl/drivers/qspi_definitions.h b/include/pbl/drivers/qspi_definitions.h index a9d7020da9..a982753d88 100644 --- a/include/pbl/drivers/qspi_definitions.h +++ b/include/pbl/drivers/qspi_definitions.h @@ -6,7 +6,6 @@ #include "pbl/kernel/sem.h" #include "board/board.h" - #include #include diff --git a/include/pbl/drivers/rtc.h b/include/pbl/drivers/rtc.h index a37435e1d4..40e5e24428 100644 --- a/include/pbl/drivers/rtc.h +++ b/include/pbl/drivers/rtc.h @@ -41,9 +41,9 @@ void rtc_init_timers(void); //! function to adjust a given time into this range by simply clamping the year value back //! into range without adjusting any of the other fields. //! @return True if a change had to be made -bool rtc_sanitize_struct_tm(struct tm* t); +bool rtc_sanitize_struct_tm(struct tm *t); //! Wrapper for rtc_sanitize_struct_tmtime -bool rtc_sanitize_time_t(time_t* t); +bool rtc_sanitize_time_t(time_t *t); //! Updates the current time. //! We only support times with years between 2000 and 2037. Attempting to set times outside of this @@ -52,13 +52,13 @@ void rtc_set_time(time_t time); time_t rtc_get_time(void); // Wrappers for the above functions that take struct tm instead of time_t -void rtc_set_time_tm(struct tm* time_tm); -void rtc_get_time_tm(struct tm* time_tm); +void rtc_set_time_tm(struct tm *time_tm); +void rtc_get_time_tm(struct tm *time_tm); // FIXME: PBL-41066 this should just return a uint64_t //! @param[out] out_seconds The current time in seconds. //! @param[out] out_ms Millisecond portion of the current second. -void rtc_get_time_ms(time_t* out_seconds, uint16_t* out_ms); +void rtc_get_time_ms(time_t *out_seconds, uint16_t *out_ms); //! Saves the timezone_info to RTC registers void rtc_set_timezone(TimezoneInfo *tzinfo); @@ -75,8 +75,7 @@ bool rtc_is_timezone_set(void); #define TIME_STRING_BUFFER_SIZE 26 //! @param buffer Buffer used to write the string into. Must be at least TIME_STRING_BUFFER_SIZE -const char* rtc_get_time_string(char* buffer); - +const char *rtc_get_time_string(char *buffer); // RTC ticks /////////////////////////////////////////////////////////////////////////////// @@ -84,7 +83,6 @@ const char* rtc_get_time_string(char* buffer); //! @return Absolute number of ticks since system start. RtcTicks rtc_get_ticks(void); - // RTC Alarm /////////////////////////////////////////////////////////////////////////////// @@ -104,13 +102,12 @@ RtcTicks rtc_alarm_get_elapsed_ticks(void); //! us from going into stop mode before we're ready to wake up from it. bool rtc_alarm_is_initialized(void); - // Utility Functions /////////////////////////////////////////////////////////////////////////////// //! @param buffer Buffer used to write the string into. Must be at least TIME_STRING_BUFFER_SIZE //! @param t The time to convert. -const char* time_t_to_string(char* buffer, time_t t); +const char *time_t_to_string(char *buffer, time_t t); #ifdef CONFIG_SOC_NRF52 void rtc_irq_handler(void); diff --git a/include/pbl/drivers/speaker/nrf5/da7212_definitions.h b/include/pbl/drivers/speaker/nrf5/da7212_definitions.h index 029793cf17..ff8edd164f 100644 --- a/include/pbl/drivers/speaker/nrf5/da7212_definitions.h +++ b/include/pbl/drivers/speaker/nrf5/da7212_definitions.h @@ -14,12 +14,12 @@ // Number of mono samples per I2S half-buffer. The stereo buffer holds 2x this // many 16-bit samples. With SAMPLE_RATE=16000, 512 mono samples = 32ms. -#define NRF5_AUDIO_I2S_BUF_SAMPLES_MONO 512 -#define NRF5_AUDIO_I2S_BUF_COUNT 2 +#define NRF5_AUDIO_I2S_BUF_SAMPLES_MONO 512 +#define NRF5_AUDIO_I2S_BUF_COUNT 2 // Mono bytes held in the circular buffer (caller <-> DMA). 4096 bytes = 2048 // mono samples = 128ms at 16kHz. -#define NRF5_AUDIO_CIRC_BUF_SIZE_BYTES 4096 +#define NRF5_AUDIO_CIRC_BUF_SIZE_BYTES 4096 // Request a refill from the caller whenever this much mono-data space is free. #define NRF5_AUDIO_REFILL_THRESHOLD_BYTES 1024 diff --git a/include/pbl/drivers/speaker/sf32lb52/audio_definitions.h b/include/pbl/drivers/speaker/sf32lb52/audio_definitions.h index 1cbf62aa76..cc73e3cebb 100644 --- a/include/pbl/drivers/speaker/sf32lb52/audio_definitions.h +++ b/include/pbl/drivers/speaker/sf32lb52/audio_definitions.h @@ -10,18 +10,17 @@ #include #include -#define CFG_AUDIO_PLAYBACK_PIPE_SIZE (1024) +#define CFG_AUDIO_PLAYBACK_PIPE_SIZE (1024) // Circular buffer configuration -#define CIRCULAR_BUF_SIZE_MS (128) -#define CIRCULAR_BUF_SIZE_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_SIZE_MS) / 1000) -#define CIRCULAR_BUF_SIZE_BYTES (CIRCULAR_BUF_SIZE_SAMPLES * sizeof(int16_t)) +#define CIRCULAR_BUF_SIZE_MS (128) +#define CIRCULAR_BUF_SIZE_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_SIZE_MS) / 1000) +#define CIRCULAR_BUF_SIZE_BYTES (CIRCULAR_BUF_SIZE_SAMPLES * sizeof(int16_t)) -typedef enum AUDIO_PLL_STATE_TAG -{ - AUDIO_PLL_CLOSED, - AUDIO_PLL_OPEN, - AUDIO_PLL_ENABLE, +typedef enum AUDIO_PLL_STATE_TAG { + AUDIO_PLL_CLOSED, + AUDIO_PLL_OPEN, + AUDIO_PLL_ENABLE, } AUDIO_PLL_STATE; typedef struct AudioState { @@ -34,7 +33,7 @@ typedef struct AudioState { AUDIO_PLL_STATE pll_state; uint32_t pll_samplerate; uint8_t tx_instanc; - bool tx_rbf_enable; + bool tx_rbf_enable; uint16_t tx_buffer_size; uint8_t *circ_buffer_storage; CircularBuffer circ_buffer; @@ -51,7 +50,7 @@ typedef struct AudioState { typedef const struct AudioDevice { AudioDeviceState *state; - uint32_t irq_priority; + uint32_t irq_priority; DMA_Channel_TypeDef *audprc_dma_channel; uint32_t audprc_dma_request; IRQn_Type audprc_dma_irq; @@ -66,5 +65,5 @@ typedef const struct AudioDevice { uint32_t channels; } AudioDevice; -extern void audprc_dma_iqr_handler(AudioDevice* audio_device); -extern void audec_dac0_dma_irq_handler(AudioDevice* audio_device); +extern void audprc_dma_iqr_handler(AudioDevice *audio_device); +extern void audec_dac0_dma_irq_handler(AudioDevice *audio_device); diff --git a/include/pbl/drivers/speaker/sf32lb52/sf32lb_audio.h b/include/pbl/drivers/speaker/sf32lb52/sf32lb_audio.h index 84710781db..7a78e94247 100644 --- a/include/pbl/drivers/speaker/sf32lb52/sf32lb_audio.h +++ b/include/pbl/drivers/speaker/sf32lb52/sf32lb_audio.h @@ -1,11 +1,10 @@ /* SPDX-FileCopyrightText: 2025 Core Devices LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #pragma once - -extern bool audec_init(AudioDevice* audio_device); -extern void audec_start(AudioDevice* audio_device, AudioTransCB cb); -extern uint32_t audec_write(AudioDevice* audio_device, void *writeBuf, uint32_t size); -extern void audec_set_vol(AudioDevice* audio_device, int volume); -extern void audec_stop(AudioDevice* audio_device); \ No newline at end of file + +extern bool audec_init(AudioDevice *audio_device); +extern void audec_start(AudioDevice *audio_device, AudioTransCB cb); +extern uint32_t audec_write(AudioDevice *audio_device, void *writeBuf, uint32_t size); +extern void audec_set_vol(AudioDevice *audio_device, int volume); +extern void audec_stop(AudioDevice *audio_device); \ No newline at end of file diff --git a/include/pbl/drivers/touch/cst816/touch_sensor_definitions.h b/include/pbl/drivers/touch/cst816/touch_sensor_definitions.h index 598e2ebf0c..a1d51ad65b 100644 --- a/include/pbl/drivers/touch/cst816/touch_sensor_definitions.h +++ b/include/pbl/drivers/touch/cst816/touch_sensor_definitions.h @@ -5,7 +5,7 @@ #include "board/board.h" #ifdef CONFIG_BOARD_OBELIX -#define RESET_PIN_CTRLBY_NPM1300 1 +#define RESET_PIN_CTRLBY_NPM1300 1 #endif typedef struct { diff --git a/include/pbl/drivers/uart.h b/include/pbl/drivers/uart.h index edf8d219e0..9945b5b786 100644 --- a/include/pbl/drivers/uart.h +++ b/include/pbl/drivers/uart.h @@ -13,11 +13,11 @@ typedef const struct UARTDevice UARTDevice; typedef struct UARTRXErrorFlags { union { struct { - uint8_t reserved:4; - bool parity_error:1; - bool overrun_error:1; - bool framing_error:1; - bool noise_detected:1; + uint8_t reserved : 4; + bool parity_error : 1; + bool overrun_error : 1; + bool framing_error : 1; + bool noise_detected : 1; }; uint8_t error_mask; }; diff --git a/include/pbl/drivers/uart/nrf5.h b/include/pbl/drivers/uart/nrf5.h index 6ab3f41032..9af8cbab01 100644 --- a/include/pbl/drivers/uart/nrf5.h +++ b/include/pbl/drivers/uart/nrf5.h @@ -30,7 +30,7 @@ typedef struct UARTState { uint32_t rx_cons_pos; uint32_t tx_cache_buffer[8]; uint32_t rx_cache_buffer[8]; - } UARTDeviceState; +} UARTDeviceState; typedef const struct UARTDevice { UARTDeviceState *state; diff --git a/include/pbl/drivers/voltage_monitor.h b/include/pbl/drivers/voltage_monitor.h index 2144ea5734..8f98590e0c 100644 --- a/include/pbl/drivers/voltage_monitor.h +++ b/include/pbl/drivers/voltage_monitor.h @@ -10,11 +10,11 @@ #define NUM_CONVERSIONS 40 #if defined(CONFIG_SOC_NRF52) -# include +#include typedef const struct VoltageMonitorDevice { - NRF_SAADC_Type *const adc; ///< One of ADCX. For example ADC1. - const uint8_t adc_channel; ///< One of ADC_Channel_* + NRF_SAADC_Type *const adc; ///< One of ADCX. For example ADC1. + const uint8_t adc_channel; ///< One of ADC_Channel_* const nrf_saadc_input_t input; } VoltageMonitorDevice; @@ -26,9 +26,9 @@ typedef const struct VoltageMonitorDevice { #else typedef const struct VoltageMonitorDevice { - ADC_TypeDef *const adc; ///< One of ADCX. For example ADC1. - const uint8_t adc_channel; ///< One of ADC_Channel_* - uint32_t clock_ctrl; ///< Peripheral clock control flag + ADC_TypeDef *const adc; ///< One of ADCX. For example ADC1. + const uint8_t adc_channel; ///< One of ADC_Channel_* + uint32_t clock_ctrl; ///< Peripheral clock control flag const InputConfig input; } VoltageMonitorDevice; diff --git a/include/pbl/kernel/backend.h b/include/pbl/kernel/backend.h index 0d75910be9..925eca9e47 100644 --- a/include/pbl/kernel/backend.h +++ b/include/pbl/kernel/backend.h @@ -57,5 +57,4 @@ struct pbl_poll_group_backend { struct pbl_msgq *cursor; }; -#define PBL_SEM_BACKEND_INITIALIZER(initial) { .count = (initial) } - +#define PBL_SEM_BACKEND_INITIALIZER(initial) {.count = (initial)} diff --git a/include/pbl/kernel/debug.h b/include/pbl/kernel/debug.h index 9233661661..de620fcdc6 100644 --- a/include/pbl/kernel/debug.h +++ b/include/pbl/kernel/debug.h @@ -52,9 +52,9 @@ struct pbl_thread_saved_regs { void pbl_thread_saved_regs(const struct pbl_thread *t, struct pbl_thread_saved_regs *regs); struct pbl_thread_stack_info { - uintptr_t start; // lowest address - size_t size; // bytes - size_t high_water; // bytes never used + uintptr_t start; // lowest address + size_t size; // bytes + size_t high_water; // bytes never used }; void pbl_thread_stack_info(const struct pbl_thread *t, struct pbl_thread_stack_info *info); @@ -69,6 +69,7 @@ struct pbl_thread_stats { }; //! Snapshot of every thread. @return the number of entries written. -size_t pbl_thread_stats_snapshot(struct pbl_thread_stats *out, size_t max, uint32_t *total_run_time); +size_t pbl_thread_stats_snapshot(struct pbl_thread_stats *out, size_t max, + uint32_t *total_run_time); size_t pbl_thread_count(void); diff --git a/include/pbl/kernel/msgq.h b/include/pbl/kernel/msgq.h index d9c0008458..9c25e86830 100644 --- a/include/pbl/kernel/msgq.h +++ b/include/pbl/kernel/msgq.h @@ -18,11 +18,11 @@ struct pbl_msgq { }; #define PBL_MSGQ_INITIALIZER(buffer, size, max) \ - { .buf = (buffer), .msg_size = (size), .max_msgs = (max) } + {.buf = (buffer), .msg_size = (size), .max_msgs = (max)} //! A file-scope compound literal has static storage duration, so the buffer //! needs no name and the definition can be prefixed with static. -#define PBL_MSGQ_STATIC_BUF(size, max) ((uint32_t[((size) * (max) + 3) / 4]){0}) +#define PBL_MSGQ_STATIC_BUF(size, max) ((uint32_t[((size) *(max) + 3) / 4]){0}) #define PBL_MSGQ_DEFINE(name, size, max) \ struct pbl_msgq name = PBL_MSGQ_INITIALIZER(PBL_MSGQ_STATIC_BUF(size, max), size, max) diff --git a/include/pbl/kernel/mutex.h b/include/pbl/kernel/mutex.h index 8158a1a3e6..acaddb8469 100644 --- a/include/pbl/kernel/mutex.h +++ b/include/pbl/kernel/mutex.h @@ -13,7 +13,7 @@ struct pbl_mutex { struct pbl_mutex_backend backend; }; -#define PBL_MUTEX_INITIALIZER { .owner = NULL, .count = 0, .lock_lr = 0 } +#define PBL_MUTEX_INITIALIZER {.owner = NULL, .count = 0, .lock_lr = 0} #define PBL_MUTEX_DEFINE(name) struct pbl_mutex name = PBL_MUTEX_INITIALIZER diff --git a/include/pbl/kernel/poll.h b/include/pbl/kernel/poll.h index b1488a65da..8b2ed0a32e 100644 --- a/include/pbl/kernel/poll.h +++ b/include/pbl/kernel/poll.h @@ -13,7 +13,7 @@ struct pbl_poll_group { struct pbl_poll_group_backend backend; }; -#define PBL_POLL_GROUP_INITIALIZER { .members = NULL, .capacity = 0 } +#define PBL_POLL_GROUP_INITIALIZER {.members = NULL, .capacity = 0} #define PBL_POLL_GROUP_DEFINE(name) struct pbl_poll_group name = PBL_POLL_GROUP_INITIALIZER diff --git a/include/pbl/kernel/sem.h b/include/pbl/kernel/sem.h index 035ffc3b35..9123ebd379 100644 --- a/include/pbl/kernel/sem.h +++ b/include/pbl/kernel/sem.h @@ -13,7 +13,7 @@ struct pbl_sem { }; #define PBL_SEM_INITIALIZER(init, lim) \ - { .initial = (init), .limit = (lim), .backend = PBL_SEM_BACKEND_INITIALIZER(init) } + {.initial = (init), .limit = (lim), .backend = PBL_SEM_BACKEND_INITIALIZER(init)} #define PBL_SEM_DEFINE(name, initial, limit) \ struct pbl_sem name = PBL_SEM_INITIALIZER(initial, limit) diff --git a/include/pbl/kernel/thread.h b/include/pbl/kernel/thread.h index c53e15e14e..341b378bad 100644 --- a/include/pbl/kernel/thread.h +++ b/include/pbl/kernel/thread.h @@ -33,7 +33,7 @@ struct pbl_thread_attr { struct pbl_thread { struct pbl_thread_backend backend; // first: the arch code relies on its offset - uint32_t id; // unique per creation, never 0 + uint32_t id; // unique per creation, never 0 char name[PBL_THREAD_NAME_LEN]; pbl_prio_t prio; bool privileged; @@ -48,7 +48,7 @@ struct pbl_thread { //! Returning from the entry function ends the thread. int pbl_thread_create(struct pbl_thread *t, const struct pbl_thread_attr *attr); -void pbl_thread_abort(struct pbl_thread *t); // NULL = self +void pbl_thread_abort(struct pbl_thread *t); // NULL = self void pbl_thread_suspend(struct pbl_thread *t); // NULL = self void pbl_thread_resume(struct pbl_thread *t); void pbl_thread_yield(void); @@ -62,10 +62,14 @@ void pbl_thread_prio_set(struct pbl_thread *t, pbl_prio_t prio); pbl_prio_t pbl_thread_prio_get(const struct pbl_thread *t); enum pbl_thread_state pbl_thread_state(const struct pbl_thread *t); -static inline const char *pbl_thread_name(const struct pbl_thread *t) { return t->name; } +static inline const char *pbl_thread_name(const struct pbl_thread *t) { + return t->name; +} //! Distinguishes successive threads created in the same struct. -static inline uint32_t pbl_thread_id(const struct pbl_thread *t) { return t->id; } +static inline uint32_t pbl_thread_id(const struct pbl_thread *t) { + return t->id; +} //! Replaces the MPU regions of a thread; used for the idle thread, whose //! regions cannot be passed at creation. diff --git a/include/pbl/kernel/types.h b/include/pbl/kernel/types.h index 6beb6b2ec6..e0c6b39e0e 100644 --- a/include/pbl/kernel/types.h +++ b/include/pbl/kernel/types.h @@ -19,17 +19,21 @@ typedef struct { pbl_tick_t ticks; } pbl_timeout_t; -#define PBL_NO_WAIT ((pbl_timeout_t){ .ticks = 0 }) -#define PBL_FOREVER ((pbl_timeout_t){ .ticks = PBL_TICK_FOREVER }) -#define PBL_TICKS(t) ((pbl_timeout_t){ .ticks = (t) }) -#define PBL_MSEC(ms) ((pbl_timeout_t){ .ticks = pbl_ms_to_ticks(ms) }) +#define PBL_NO_WAIT ((pbl_timeout_t){.ticks = 0}) +#define PBL_FOREVER ((pbl_timeout_t){.ticks = PBL_TICK_FOREVER}) +#define PBL_TICKS(t) ((pbl_timeout_t){.ticks = (t)}) +#define PBL_MSEC(ms) ((pbl_timeout_t){.ticks = pbl_ms_to_ticks(ms)}) #define PBL_SEC(s) PBL_MSEC((s) * 1000U) pbl_tick_t pbl_ms_to_ticks(uint32_t ms); uint32_t pbl_ticks_to_ms(pbl_tick_t ticks); -static inline bool pbl_timeout_is_forever(pbl_timeout_t t) { return t.ticks == PBL_TICK_FOREVER; } -static inline bool pbl_timeout_is_no_wait(pbl_timeout_t t) { return t.ticks == 0; } +static inline bool pbl_timeout_is_forever(pbl_timeout_t t) { + return t.ticks == PBL_TICK_FOREVER; +} +static inline bool pbl_timeout_is_no_wait(pbl_timeout_t t) { + return t.ticks == 0; +} //! Higher value = more urgent. typedef uint8_t pbl_prio_t; @@ -37,4 +41,3 @@ typedef uint8_t pbl_prio_t; #define PBL_PRIO_MAX ((pbl_prio_t)(CONFIG_KERNEL_NUM_PRIORITIES - 1)) struct pbl_thread; - diff --git a/include/pbl/logging/binary_logging.h b/include/pbl/logging/binary_logging.h index 1b0deb431e..ade8c170fa 100644 --- a/include/pbl/logging/binary_logging.h +++ b/include/pbl/logging/binary_logging.h @@ -19,20 +19,20 @@ typedef struct BinLogMessage_Version { union { struct { - uint8_t reserved:4; - uint8_t unhashed_msg:1; - uint8_t parameterized:1; - uint8_t tick_count:1; - uint8_t time_date:1; + uint8_t reserved : 4; + uint8_t unhashed_msg : 1; + uint8_t parameterized : 1; + uint8_t tick_count : 1; + uint8_t time_date : 1; }; uint8_t version; }; } BinLogMessage_Version; -#define BINLOGMSG_VERSION_UNHASHED_MSG (1 << 3) +#define BINLOGMSG_VERSION_UNHASHED_MSG (1 << 3) #define BINLOGMSG_VERSION_PARAMETERIZED (1 << 2) -#define BINLOGMSG_VERSION_TICK_COUNT (1 << 1) -#define BINLOGMSG_VERSION_TIME_DATE (1 << 0) +#define BINLOGMSG_VERSION_TICK_COUNT (1 << 1) +#define BINLOGMSG_VERSION_TIME_DATE (1 << 0) _Static_assert(sizeof(BinLogMessage_Version) == 1, "BinLogMessage_Version size != 1"); @@ -40,11 +40,11 @@ _Static_assert(sizeof(BinLogMessage_Version) == 1, "BinLogMessage_Version size ! // The times are in UTC. All values are 0 based (i.e., hour is [0,23], minute is [0,59], // second is [0,59], millisecond is [0,999]). typedef struct Time_Full { - uint32_t reserved:5; - uint32_t hour:5; - uint32_t minute:6; - uint32_t second:6; - uint32_t millisecond:10; + uint32_t reserved : 5; + uint32_t hour : 5; + uint32_t minute : 6; + uint32_t second : 6; + uint32_t millisecond : 10; } Time_Full; // Time_Tick @@ -61,21 +61,21 @@ typedef struct Time_Tick { // An invalid/unknown date is identified by (year, month, day) = (0, 0, 0). Thus, Date = 0 is an // invalid date, not the start of the epoch, which would be (0, 1, 1). typedef struct Date { - uint16_t year:7; - uint16_t month:4; - uint16_t day:5; + uint16_t year : 7; + uint16_t month : 4; + uint16_t day : 5; } Date; // MessageID typedef struct MessageID { union { struct { - uint32_t msg_number:19; // LSB - uint32_t task_id:4; - uint32_t str_index_1:3; - uint32_t str_index_2:3; - uint32_t reserved:1; - uint32_t core_number:2; // MSB + uint32_t msg_number : 19; // LSB + uint32_t task_id : 4; + uint32_t str_index_1 : 3; + uint32_t str_index_2 : 3; + uint32_t reserved : 1; + uint32_t core_number : 2; // MSB }; uint32_t msg_id; }; @@ -122,12 +122,12 @@ typedef struct BinLogMessage_Header_v3 { typedef struct BinLogMessage_ParamBody { MessageID msgid; - uint32_t payload[0]; + uint32_t payload[0]; } BinLogMessage_ParamBody; typedef struct BinLogMessage_StringParam { uint8_t length; - uint8_t string[0]; // string[length] + uint8_t string[0]; // string[length] // uint8_t padding[((length + sizeof(length) + 3) % 4)] } BinLogMessage_StringParam; @@ -136,16 +136,15 @@ typedef uint32_t BinLogMessage_IntParam; typedef struct BinLogMessage_UnhashedBody { uint16_t line_number; uint8_t filename[16]; - uint8_t reserved:2; - uint8_t core_number:2; - uint8_t task_id:4; + uint8_t reserved : 2; + uint8_t core_number : 2; + uint8_t task_id : 4; uint8_t level; uint8_t length; - uint8_t string[0]; // string[length]; + uint8_t string[0]; // string[length]; // uint8_t padding[]; } BinLogMessage_UnhashedBody; - /* int len = MAX(strlen(log_string), 255 - sizeof(BinLogMessage_Header_vX)) typedef struct BinLogMessage_SimpleBody { @@ -154,7 +153,6 @@ typedef struct BinLogMessage_SimpleBody { } BinLogMessage_SimpleBody; */ - typedef struct BinLogMessage_Param_v0 { BinLogMessage_Header_v0 header; BinLogMessage_ParamBody body; diff --git a/include/pbl/logging/log_hashing.h b/include/pbl/logging/log_hashing.h index d57c57bc2e..00c458c254 100644 --- a/include/pbl/logging/log_hashing.h +++ b/include/pbl/logging/log_hashing.h @@ -81,31 +81,31 @@ #define LOG_STRINGS_SECTION_ADDRESS 0xC0000000 -#define PACKED_CORE_OFFSET 30 // 2 bits - Core number -#define PACKED_CORE_MASK 0x03 +#define PACKED_CORE_OFFSET 30 // 2 bits - Core number +#define PACKED_CORE_MASK 0x03 -#define PACKED_NUM_FMT_OFFSET 29 // 3 bits - Number format conversions +#define PACKED_NUM_FMT_OFFSET 29 // 3 bits - Number format conversions #define PACKED_NUM_FMT_MASK 0x07 -#define PACKED_STR1FMT_OFFSET 26 // 3 bits - indicies of string parameter 1 format conversion +#define PACKED_STR1FMT_OFFSET 26 // 3 bits - indicies of string parameter 1 format conversion #define PACKED_STR1FMT_MASK 0x07 -#define PACKED_STR2FMT_OFFSET 23 // 3 bits - indicies of string parameter 2 format conversion +#define PACKED_STR2FMT_OFFSET 23 // 3 bits - indicies of string parameter 2 format conversion #define PACKED_STR2FMT_MASK 0x07 -#define PACKED_STRFMTS_OFFSET 23 // 6 bits - indicies of string parameters 1 & 2. +#define PACKED_STRFMTS_OFFSET 23 // 6 bits - indicies of string parameters 1 & 2. #define PACKED_STRFMTS_MASK 0x3f -#define PACKED_LEVEL_OFFSET 20 // 3 bits - log level +#define PACKED_LEVEL_OFFSET 20 // 3 bits - log level #define PACKED_LEVEL_MASK 0x07 #define PACKED_HASH_OFFSET 0 -#define PACKED_HASH_MASK 0x7FFFF // 19 bits - string table offset (512 KB) +#define PACKED_HASH_MASK 0x7FFFF // 19 bits - string table offset (512 KB) -#define MSGID_STR_AND_HASH_MASK ((PACKED_STRFMTS_MASK << PACKED_STRFMTS_OFFSET) | \ - (PACKED_HASH_MASK << PACKED_HASH_OFFSET)) -#define MSGID_CORE_AND_HASH_MASK ((PACKED_CORE_MASK << PACKED_CORE_OFFSET) | \ - (PACKED_HASH_MASK << PACKED_HASH_OFFSET)) +#define MSGID_STR_AND_HASH_MASK \ + ((PACKED_STRFMTS_MASK << PACKED_STRFMTS_OFFSET) | (PACKED_HASH_MASK << PACKED_HASH_OFFSET)) +#define MSGID_CORE_AND_HASH_MASK \ + ((PACKED_CORE_MASK << PACKED_CORE_OFFSET) | (PACKED_HASH_MASK << PACKED_HASH_OFFSET)) #ifndef STRINGIFY - #define STRINGIFY_NX(a) #a - #define STRINGIFY(a) STRINGIFY_NX(a) -#endif // STRINGIFY +#define STRINGIFY_NX(a) #a +#define STRINGIFY(a) STRINGIFY_NX(a) +#endif // STRINGIFY /* Printf Format argument checking. * @@ -118,15 +118,17 @@ */ void PBL_LOG_x_printf_arg_check(const char *fmt, ...) FORMAT_PRINTF(1, 2); -#define NEW_LOG_HASH(logfunc, level, color, fmt, ...) \ -{ \ - static const char str[] __attribute__((nocommon, section(".log_strings"))) = \ - __FILE__ ":" STRINGIFY(__LINE__) ":" STRINGIFY(level) ":" color ":" fmt; \ - _Pragma("GCC diagnostic push"); _Pragma("GCC diagnostic ignored \"-Warray-bounds\""); \ - logfunc((uint32_t)&str[LOG_SECTION_OFFSET(level, fmt)], ##__VA_ARGS__); \ - _Pragma("GCC diagnostic pop"); \ - if (0) PBL_LOG_x_printf_arg_check(fmt, ##__VA_ARGS__); \ -} +#define NEW_LOG_HASH(logfunc, level, color, fmt, ...) \ + { \ + static const char str[] __attribute__((nocommon, section(".log_strings"))) = \ + __FILE__ ":" STRINGIFY(__LINE__) ":" STRINGIFY(level) ":" color ":" fmt; \ + _Pragma("GCC diagnostic push"); \ + _Pragma("GCC diagnostic ignored \"-Warray-bounds\""); \ + logfunc((uint32_t)&str[LOG_SECTION_OFFSET(level, fmt)], ##__VA_ARGS__); \ + _Pragma("GCC diagnostic pop"); \ + if (0) \ + PBL_LOG_x_printf_arg_check(fmt, ##__VA_ARGS__); \ + } ALWAYS_INLINE static uint32_t LOG_SECTION_OFFSET(const uint8_t level, const char *fmt) { const char *p1 = NULL, *p2 = NULL, *p3 = NULL, *p4 = NULL; @@ -137,18 +139,25 @@ ALWAYS_INLINE static uint32_t LOG_SECTION_OFFSET(const uint8_t level, const char // Search for % characters in fmt. p1-p8 point to the character immediately succeeding the first // 8 % characters in fmt (or NULL, if there aren't 8 % characters in fmt). p1 = __builtin_strchr(fmt, '%') ? (__builtin_strchr(fmt, '%') + 1) : NULL; - if (p1) p2 = __builtin_strchr(p1, '%') ? (__builtin_strchr(p1, '%') + 1) : NULL; - if (p2) p3 = __builtin_strchr(p2, '%') ? (__builtin_strchr(p2, '%') + 1) : NULL; - if (p3) p4 = __builtin_strchr(p3, '%') ? (__builtin_strchr(p3, '%') + 1) : NULL; - if (p4) p5 = __builtin_strchr(p4, '%') ? (__builtin_strchr(p4, '%') + 1) : NULL; - if (p5) p6 = __builtin_strchr(p5, '%') ? (__builtin_strchr(p5, '%') + 1) : NULL; - if (p6) p7 = __builtin_strchr(p6, '%') ? (__builtin_strchr(p6, '%') + 1) : NULL; - if (p7) p8 = __builtin_strchr(p7, '%') ? (__builtin_strchr(p7, '%') + 1) : NULL; + if (p1) + p2 = __builtin_strchr(p1, '%') ? (__builtin_strchr(p1, '%') + 1) : NULL; + if (p2) + p3 = __builtin_strchr(p2, '%') ? (__builtin_strchr(p2, '%') + 1) : NULL; + if (p3) + p4 = __builtin_strchr(p3, '%') ? (__builtin_strchr(p3, '%') + 1) : NULL; + if (p4) + p5 = __builtin_strchr(p4, '%') ? (__builtin_strchr(p4, '%') + 1) : NULL; + if (p5) + p6 = __builtin_strchr(p5, '%') ? (__builtin_strchr(p5, '%') + 1) : NULL; + if (p6) + p7 = __builtin_strchr(p6, '%') ? (__builtin_strchr(p6, '%') + 1) : NULL; + if (p7) + p8 = __builtin_strchr(p7, '%') ? (__builtin_strchr(p7, '%') + 1) : NULL; // Check that fmt doesn't contain the escaped % symbol, '%%'. It's too hard to handle correctly // in every case. - if ((p1 + 1 == p2) || (p2 + 1 == p3) || (p3 + 1 == p4) || (p4 + 1 == p5) || - (p5 + 1 == p6) || (p6 + 1 == p7) || (p7 + 1 == p8)) { + if ((p1 + 1 == p2) || (p2 + 1 == p3) || (p3 + 1 == p4) || (p4 + 1 == p5) || (p5 + 1 == p6) || + (p6 + 1 == p7) || (p7 + 1 == p8)) { return 0; } @@ -163,13 +172,20 @@ ALWAYS_INLINE static uint32_t LOG_SECTION_OFFSET(const uint8_t level, const char // Search for an 's' character succeeding the % characters in fmt. s1-s7 point to the first 's' // charactres in fmt after the previously found % characters (or NULL if there aren't 7 's' // characters in fmt). - if (p1) s1 = __builtin_strchr(p1, 's'); - if (p2) s2 = __builtin_strchr(p2, 's'); - if (p3) s3 = __builtin_strchr(p3, 's'); - if (p4) s4 = __builtin_strchr(p4, 's'); - if (p5) s5 = __builtin_strchr(p5, 's'); - if (p6) s6 = __builtin_strchr(p6, 's'); - if (p7) s7 = __builtin_strchr(p7, 's'); + if (p1) + s1 = __builtin_strchr(p1, 's'); + if (p2) + s2 = __builtin_strchr(p2, 's'); + if (p3) + s3 = __builtin_strchr(p3, 's'); + if (p4) + s4 = __builtin_strchr(p4, 's'); + if (p5) + s5 = __builtin_strchr(p5, 's'); + if (p6) + s6 = __builtin_strchr(p6, 's'); + if (p7) + s7 = __builtin_strchr(p7, 's'); // See if the 's' characters immediately succeed the '%' characters. If so, set flag psX. const int ps1 = p1 ? (p1 == s1) : 0; @@ -201,7 +217,6 @@ ALWAYS_INLINE static uint32_t LOG_SECTION_OFFSET(const uint8_t level, const char const int a7 = ps7 ? (a6 << 3) + 7 : a6; const int string_indicies = a7; - // Convert level to packed_level int packed_level = LOG_LEVEL_ALWAYS; if (level == LOG_LEVEL_ERROR) { @@ -216,9 +231,9 @@ ALWAYS_INLINE static uint32_t LOG_SECTION_OFFSET(const uint8_t level, const char packed_level = 5; } - const uint32_t offset = (((num_params & PACKED_NUM_FMT_MASK) << PACKED_NUM_FMT_OFFSET) | - ((packed_level & PACKED_LEVEL_MASK) << PACKED_LEVEL_OFFSET) | - ((string_indicies & PACKED_STRFMTS_MASK) << PACKED_STRFMTS_OFFSET)); + const uint32_t offset = (((num_params & PACKED_NUM_FMT_MASK) << PACKED_NUM_FMT_OFFSET) | + ((packed_level & PACKED_LEVEL_MASK) << PACKED_LEVEL_OFFSET) | + ((string_indicies & PACKED_STRFMTS_MASK) << PACKED_STRFMTS_OFFSET)); return (offset - LOG_STRINGS_SECTION_ADDRESS); } diff --git a/include/pbl/logging/logging.h b/include/pbl/logging/logging.h index 260f62836e..c738f3e728 100644 --- a/include/pbl/logging/logging.h +++ b/include/pbl/logging/logging.h @@ -8,7 +8,6 @@ #include "system/reboot_reason.h" #include "system/status_codes.h" - #include #include #include @@ -20,8 +19,8 @@ #define LOG_BUFFER_LENGTH 128 // Minimum amount of stack space required for vsniprintf -#define LOGGING_MIN_STACK_FOR_SPRINTF 240 -#define LOGGING_STACK_FULL_MSG ((const char *)" [STK FULL]") +#define LOGGING_MIN_STACK_FOR_SPRINTF 240 +#define LOGGING_STACK_FULL_MSG ((const char *)" [STK FULL]") void pbl_log_hashed_async(const uint32_t packed_loghash, ...); @@ -37,17 +36,19 @@ void pbl_log_hashed_vargs(const bool async, const uint32_t core_number, void pbl_log_vargs(uint8_t log_level, const char *src_filename, int src_line_number, const char *fmt, va_list args); -void pbl_log(uint8_t log_level, const char* src_filename, int src_line_number, const char* fmt, ...) +void pbl_log(uint8_t log_level, const char *src_filename, int src_line_number, const char *fmt, ...) FORMAT_PRINTF(4, 5); -void pbl_log_sync(uint8_t log_level, const char* src_filename, int src_line_number, const char* fmt, ...) - FORMAT_PRINTF(4, 5); +void pbl_log_sync(uint8_t log_level, const char *src_filename, int src_line_number, const char *fmt, + ...) FORMAT_PRINTF(4, 5); -int pbl_log_binary_format(char* buffer, int buffer_len, const uint8_t log_level, - const char* src_filename_path, int src_line_number, const char* fmt, va_list args); +int pbl_log_binary_format(char *buffer, int buffer_len, const uint8_t log_level, + const char *src_filename_path, int src_line_number, const char *fmt, + va_list args); -int pbl_log_get_bin_format(char* buffer, int buffer_len, const uint8_t log_level, - const char* src_filename_path, int src_line_number, const char* fmt, ...); +int pbl_log_get_bin_format(char *buffer, int buffer_len, const uint8_t log_level, + const char *src_filename_path, int src_line_number, const char *fmt, + ...); #define LOG_LEVEL_ALWAYS 0 #define LOG_LEVEL_ERROR 1 @@ -57,101 +58,101 @@ int pbl_log_get_bin_format(char* buffer, int buffer_len, const uint8_t log_level #define LOG_LEVEL_DEBUG_VERBOSE 255 #if defined(CONFIG_DEFAULT_LOG_LEVEL_ERROR) - #define DEFAULT_LOG_LEVEL LOG_LEVEL_ERROR +#define DEFAULT_LOG_LEVEL LOG_LEVEL_ERROR #elif defined(CONFIG_DEFAULT_LOG_LEVEL_WARNING) - #define DEFAULT_LOG_LEVEL LOG_LEVEL_WARNING +#define DEFAULT_LOG_LEVEL LOG_LEVEL_WARNING #elif defined(CONFIG_DEFAULT_LOG_LEVEL_INFO) - #define DEFAULT_LOG_LEVEL LOG_LEVEL_INFO +#define DEFAULT_LOG_LEVEL LOG_LEVEL_INFO #elif defined(CONFIG_DEFAULT_LOG_LEVEL_DEBUG_VERBOSE) - #define DEFAULT_LOG_LEVEL LOG_LEVEL_DEBUG_VERBOSE +#define DEFAULT_LOG_LEVEL LOG_LEVEL_DEBUG_VERBOSE #else - #define DEFAULT_LOG_LEVEL LOG_LEVEL_DEBUG +#define DEFAULT_LOG_LEVEL LOG_LEVEL_DEBUG #endif #if defined(CONFIG_FLASH_LOG_LEVEL_ERROR) - #define FLASH_LOG_LEVEL LOG_LEVEL_ERROR +#define FLASH_LOG_LEVEL LOG_LEVEL_ERROR #elif defined(CONFIG_FLASH_LOG_LEVEL_WARNING) - #define FLASH_LOG_LEVEL LOG_LEVEL_WARNING +#define FLASH_LOG_LEVEL LOG_LEVEL_WARNING #elif defined(CONFIG_FLASH_LOG_LEVEL_DEBUG) - #define FLASH_LOG_LEVEL LOG_LEVEL_DEBUG +#define FLASH_LOG_LEVEL LOG_LEVEL_DEBUG #elif defined(CONFIG_FLASH_LOG_LEVEL_DEBUG_VERBOSE) - #define FLASH_LOG_LEVEL LOG_LEVEL_DEBUG_VERBOSE +#define FLASH_LOG_LEVEL LOG_LEVEL_DEBUG_VERBOSE #else - #define FLASH_LOG_LEVEL LOG_LEVEL_INFO +#define FLASH_LOG_LEVEL LOG_LEVEL_INFO #endif #ifdef CONFIG_LOG_HASHED - #include +#include #endif -#define LOG_COLOR_BLACK "BLACK" // Not so useful in general -#define LOG_COLOR_RED "RED" -#define LOG_COLOR_GREEN "GREEN" -#define LOG_COLOR_YELLOW "YELLOW" -#define LOG_COLOR_BLUE "BLUE" -#define LOG_COLOR_MAGENTA "MAGENTA" -#define LOG_COLOR_CYAN "CYAN" -#define LOG_COLOR_GREY "GREY" +#define LOG_COLOR_BLACK "BLACK" // Not so useful in general +#define LOG_COLOR_RED "RED" +#define LOG_COLOR_GREEN "GREEN" +#define LOG_COLOR_YELLOW "YELLOW" +#define LOG_COLOR_BLUE "BLUE" +#define LOG_COLOR_MAGENTA "MAGENTA" +#define LOG_COLOR_CYAN "CYAN" +#define LOG_COLOR_GREY "GREY" // Reserved for bold. Use sparingly -#define LOG_COLOR_LIGHT_GREY "LIGHT_GREY" -#define LOG_COLOR_LIGHT_RED "LIGHT_RED" -#define LOG_COLOR_LIGHT_GREEN "LIGHT_GREEN" -#define LOG_COLOR_LIGHT_YELLOW "LIGHT_YELLOW" -#define LOG_COLOR_LIGHT_BLUE "LIGHT_BLUE" -#define LOG_COLOR_LIGHT_MAGENTA "LIGHT_MAGENTA" -#define LOG_COLOR_LIGHT_CYAN "LIGHT_CYAN" -#define LOG_COLOR_WHITE "WHITE" +#define LOG_COLOR_LIGHT_GREY "LIGHT_GREY" +#define LOG_COLOR_LIGHT_RED "LIGHT_RED" +#define LOG_COLOR_LIGHT_GREEN "LIGHT_GREEN" +#define LOG_COLOR_LIGHT_YELLOW "LIGHT_YELLOW" +#define LOG_COLOR_LIGHT_BLUE "LIGHT_BLUE" +#define LOG_COLOR_LIGHT_MAGENTA "LIGHT_MAGENTA" +#define LOG_COLOR_LIGHT_CYAN "LIGHT_CYAN" +#define LOG_COLOR_WHITE "WHITE" // Level-to-color mapping (fixed per level) -#define LOG_COLOR_FOR_ALWAYS LOG_COLOR_BLUE -#define LOG_COLOR_FOR_ERROR LOG_COLOR_RED +#define LOG_COLOR_FOR_ALWAYS LOG_COLOR_BLUE +#define LOG_COLOR_FOR_ERROR LOG_COLOR_RED #define LOG_COLOR_FOR_WARNING LOG_COLOR_YELLOW -#define LOG_COLOR_FOR_INFO LOG_COLOR_GREEN -#define LOG_COLOR_FOR_DEBUG LOG_COLOR_GREY +#define LOG_COLOR_FOR_INFO LOG_COLOR_GREEN +#define LOG_COLOR_FOR_DEBUG LOG_COLOR_GREY #define LOG_COLOR_FOR_VERBOSE LOG_COLOR_GREY -#define LOG_DOMAIN_MISC 1 -#define LOG_DOMAIN_FS 1 -#define LOG_DOMAIN_COMM 1 -#define LOG_DOMAIN_TEXT 0 -#define LOG_DOMAIN_ANIMATION 0 -#define LOG_DOMAIN_ANALYTICS 0 -#define LOG_DOMAIN_ACTIVITY 0 -#define LOG_DOMAIN_ACTIVITY_INSIGHTS 0 -#define LOG_DOMAIN_PROTOBUF 0 +#define LOG_DOMAIN_MISC 1 +#define LOG_DOMAIN_FS 1 +#define LOG_DOMAIN_COMM 1 +#define LOG_DOMAIN_TEXT 0 +#define LOG_DOMAIN_ANIMATION 0 +#define LOG_DOMAIN_ANALYTICS 0 +#define LOG_DOMAIN_ACTIVITY 0 +#define LOG_DOMAIN_ACTIVITY_INSIGHTS 0 +#define LOG_DOMAIN_PROTOBUF 0 -#define LOG_DOMAIN_BLOBDB 0 +#define LOG_DOMAIN_BLOBDB 0 #ifndef LOG_DOMAIN_BT_PAIRING_INFO #ifndef CONFIG_RELEASE - #define LOG_DOMAIN_BT_PAIRING_INFO 1 +#define LOG_DOMAIN_BT_PAIRING_INFO 1 #else - #define LOG_DOMAIN_BT_PAIRING_INFO 0 +#define LOG_DOMAIN_BT_PAIRING_INFO 0 #endif #endif #ifndef LOG_DOMAIN_BT_STACK - #define LOG_DOMAIN_BT_STACK 0 +#define LOG_DOMAIN_BT_STACK 0 #endif #ifndef LOG_DOMAIN_DATA_LOGGING - #define LOG_DOMAIN_DATA_LOGGING 0 +#define LOG_DOMAIN_DATA_LOGGING 0 #endif #ifndef LOG_DOMAIN_I2C - #define LOG_DOMAIN_I2C 0 +#define LOG_DOMAIN_I2C 0 #endif #ifndef STRINGIFY - #define STRINGIFY_NX(a) #a - #define STRINGIFY(a) STRINGIFY_NX(a) -#endif // STRINGIFY +#define STRINGIFY_NX(a) #a +#define STRINGIFY(a) STRINGIFY_NX(a) +#endif // STRINGIFY #define STATUS_STRING(s) STRINGIFY(s) #ifndef DEFAULT_LOG_DOMAIN - #define DEFAULT_LOG_DOMAIN LOG_DOMAIN_MISC -#endif // DEFAULT_LOG_DOMAIN +#define DEFAULT_LOG_DOMAIN LOG_DOMAIN_MISC +#endif // DEFAULT_LOG_DOMAIN // Per-module compile-time log level and name. PBL_LOG_MODULE_DEFINE / // PBL_LOG_MODULE_DECLARE override these tentative definitions, e.g. @@ -163,22 +164,23 @@ __attribute__((unused)) static const char *const _pbl_log_module_name; // Unit tests build with CONFIG_LOG but without the board Kconfig symbols, // so module levels fall back to the default there. #if defined(CONFIG_LOG) && !defined(UNITTEST) - #ifdef CONFIG_LOG_HASHED - // The MODULE map entry gives the loghash dict generator the - // file -> module mapping; the module name costs nothing at runtime. - #define PBL_LOG_MODULE_DEFINE(name, level) \ - __attribute__((unused)) static const uint8_t _pbl_log_module_level = (level); \ - __attribute__((unused)) static const char *const _pbl_log_module_name = #name; \ - __attribute__((used, nocommon, section(".log_strings"))) \ - static const char _pbl_log_module_map[] = "MODULE:" __FILE__ ":" #name - #else - #define PBL_LOG_MODULE_DEFINE(name, level) \ - __attribute__((unused)) static const uint8_t _pbl_log_module_level = (level); \ - __attribute__((unused)) static const char *const _pbl_log_module_name = #name - #endif +#ifdef CONFIG_LOG_HASHED +// The MODULE map entry gives the loghash dict generator the +// file -> module mapping; the module name costs nothing at runtime. +#define PBL_LOG_MODULE_DEFINE(name, level) \ + __attribute__((unused)) static const uint8_t _pbl_log_module_level = (level); \ + __attribute__((unused)) static const char *const _pbl_log_module_name = #name; \ + __attribute__((used, nocommon, \ + section(".log_strings"))) static const char _pbl_log_module_map[] = \ + "MODULE:" __FILE__ ":" #name +#else +#define PBL_LOG_MODULE_DEFINE(name, level) \ + __attribute__((unused)) static const uint8_t _pbl_log_module_level = (level); \ + __attribute__((unused)) static const char *const _pbl_log_module_name = #name +#endif #else - #define PBL_LOG_MODULE_DEFINE(name, level) \ - __attribute__((unused)) static const uint8_t _pbl_log_module_level = 0 +#define PBL_LOG_MODULE_DEFINE(name, level) \ + __attribute__((unused)) static const uint8_t _pbl_log_module_level = 0 #endif #define PBL_LOG_MODULE_DECLARE(name, level) PBL_LOG_MODULE_DEFINE(name, level) @@ -186,133 +188,118 @@ __attribute__((unused)) static const char *const _pbl_log_module_name; #define PBL_SHOULD_LOG(level) \ ((level) <= (_pbl_log_module_level != 0 ? _pbl_log_module_level : DEFAULT_LOG_LEVEL)) - // Internal implementation macros (use level-named macros below instead) #ifdef CONFIG_LOG - #ifdef CONFIG_LOG_HASHED - #define PBL_LOG_COLOR_D(domain, level, color, fmt, ...) \ - do { \ - if (PBL_SHOULD_LOG(level)) { \ - if (domain) { \ - NEW_LOG_HASH(pbl_log_hashed_async, level, color, fmt, ## __VA_ARGS__); \ - } \ - } \ - } while (0) - - #define PBL_LOG_COLOR_D_SYNC(domain, level, color, fmt, ...) \ - do { \ - if (PBL_SHOULD_LOG(level)) { \ - if (domain) { \ - NEW_LOG_HASH(pbl_log_hashed_sync, level, color, fmt, ## __VA_ARGS__); \ - } \ - } \ - } while (0) - #else - #define PBL_LOG_COLOR_D(domain, level, color, fmt, ...) \ - do { \ - if (PBL_SHOULD_LOG(level)) { \ - if (domain) { \ - if (_pbl_log_module_name != NULL) { \ - pbl_log(level, __FILE__, __LINE__, "%s: " fmt, _pbl_log_module_name, \ - ## __VA_ARGS__); \ - } else { \ - pbl_log(level, __FILE__, __LINE__, fmt, ## __VA_ARGS__); \ - } \ - } \ - } \ - } while (0) - - #define PBL_LOG_COLOR_D_SYNC(domain, level, color, fmt, ...) \ - do { \ - if (PBL_SHOULD_LOG(level)) { \ - if (domain) { \ - if (_pbl_log_module_name != NULL) { \ - pbl_log_sync(level, __FILE__, __LINE__, "%s: " fmt, _pbl_log_module_name, \ - ## __VA_ARGS__); \ - } else { \ - pbl_log_sync(level, __FILE__, __LINE__, fmt, ## __VA_ARGS__); \ - } \ - } \ - } \ - } while (0) - #endif -#else // !CONFIG_LOG - #define PBL_LOG_COLOR_D(domain, level, color, fmt, ...) - #define PBL_LOG_COLOR_D_SYNC(domain, level, color, fmt, ...) -#endif // CONFIG_LOG +#ifdef CONFIG_LOG_HASHED +#define PBL_LOG_COLOR_D(domain, level, color, fmt, ...) \ + do { \ + if (PBL_SHOULD_LOG(level)) { \ + if (domain) { \ + NEW_LOG_HASH(pbl_log_hashed_async, level, color, fmt, ##__VA_ARGS__); \ + } \ + } \ + } while (0) + +#define PBL_LOG_COLOR_D_SYNC(domain, level, color, fmt, ...) \ + do { \ + if (PBL_SHOULD_LOG(level)) { \ + if (domain) { \ + NEW_LOG_HASH(pbl_log_hashed_sync, level, color, fmt, ##__VA_ARGS__); \ + } \ + } \ + } while (0) +#else +#define PBL_LOG_COLOR_D(domain, level, color, fmt, ...) \ + do { \ + if (PBL_SHOULD_LOG(level)) { \ + if (domain) { \ + if (_pbl_log_module_name != NULL) { \ + pbl_log(level, __FILE__, __LINE__, "%s: " fmt, _pbl_log_module_name, ##__VA_ARGS__); \ + } else { \ + pbl_log(level, __FILE__, __LINE__, fmt, ##__VA_ARGS__); \ + } \ + } \ + } \ + } while (0) + +#define PBL_LOG_COLOR_D_SYNC(domain, level, color, fmt, ...) \ + do { \ + if (PBL_SHOULD_LOG(level)) { \ + if (domain) { \ + if (_pbl_log_module_name != NULL) { \ + pbl_log_sync(level, __FILE__, __LINE__, "%s: " fmt, _pbl_log_module_name, \ + ##__VA_ARGS__); \ + } else { \ + pbl_log_sync(level, __FILE__, __LINE__, fmt, ##__VA_ARGS__); \ + } \ + } \ + } \ + } while (0) +#endif +#else // !CONFIG_LOG +#define PBL_LOG_COLOR_D(domain, level, color, fmt, ...) +#define PBL_LOG_COLOR_D_SYNC(domain, level, color, fmt, ...) +#endif // CONFIG_LOG // Level-named domain macros (async) #define PBL_LOG_D_ALWAYS(domain, fmt, ...) \ - PBL_LOG_COLOR_D(domain, LOG_LEVEL_ALWAYS, LOG_COLOR_FOR_ALWAYS, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D(domain, LOG_LEVEL_ALWAYS, LOG_COLOR_FOR_ALWAYS, fmt, ##__VA_ARGS__) #define PBL_LOG_D_ERR(domain, fmt, ...) \ - PBL_LOG_COLOR_D(domain, LOG_LEVEL_ERROR, LOG_COLOR_FOR_ERROR, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D(domain, LOG_LEVEL_ERROR, LOG_COLOR_FOR_ERROR, fmt, ##__VA_ARGS__) #define PBL_LOG_D_WRN(domain, fmt, ...) \ - PBL_LOG_COLOR_D(domain, LOG_LEVEL_WARNING, LOG_COLOR_FOR_WARNING, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D(domain, LOG_LEVEL_WARNING, LOG_COLOR_FOR_WARNING, fmt, ##__VA_ARGS__) #define PBL_LOG_D_INFO(domain, fmt, ...) \ - PBL_LOG_COLOR_D(domain, LOG_LEVEL_INFO, LOG_COLOR_FOR_INFO, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D(domain, LOG_LEVEL_INFO, LOG_COLOR_FOR_INFO, fmt, ##__VA_ARGS__) #define PBL_LOG_D_DBG(domain, fmt, ...) \ - PBL_LOG_COLOR_D(domain, LOG_LEVEL_DEBUG, LOG_COLOR_FOR_DEBUG, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D(domain, LOG_LEVEL_DEBUG, LOG_COLOR_FOR_DEBUG, fmt, ##__VA_ARGS__) #define PBL_LOG_D_VERBOSE(domain, fmt, ...) \ - PBL_LOG_COLOR_D(domain, LOG_LEVEL_DEBUG_VERBOSE, LOG_COLOR_FOR_VERBOSE, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D(domain, LOG_LEVEL_DEBUG_VERBOSE, LOG_COLOR_FOR_VERBOSE, fmt, ##__VA_ARGS__) // Level-named macros (default domain, async) -#define PBL_LOG_ALWAYS(fmt, ...) \ - PBL_LOG_D_ALWAYS(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) -#define PBL_LOG_ERR(fmt, ...) \ - PBL_LOG_D_ERR(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) -#define PBL_LOG_WRN(fmt, ...) \ - PBL_LOG_D_WRN(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) -#define PBL_LOG_INFO(fmt, ...) \ - PBL_LOG_D_INFO(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) -#define PBL_LOG_DBG(fmt, ...) \ - PBL_LOG_D_DBG(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) -#define PBL_LOG_VERBOSE(fmt, ...) \ - PBL_LOG_D_VERBOSE(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) +#define PBL_LOG_ALWAYS(fmt, ...) PBL_LOG_D_ALWAYS(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) +#define PBL_LOG_ERR(fmt, ...) PBL_LOG_D_ERR(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) +#define PBL_LOG_WRN(fmt, ...) PBL_LOG_D_WRN(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) +#define PBL_LOG_INFO(fmt, ...) PBL_LOG_D_INFO(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) +#define PBL_LOG_DBG(fmt, ...) PBL_LOG_D_DBG(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) +#define PBL_LOG_VERBOSE(fmt, ...) PBL_LOG_D_VERBOSE(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) // Level-named domain sync macros #define PBL_LOG_D_SYNC_ALWAYS(domain, fmt, ...) \ - PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_ALWAYS, LOG_COLOR_FOR_ALWAYS, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_ALWAYS, LOG_COLOR_FOR_ALWAYS, fmt, ##__VA_ARGS__) #define PBL_LOG_D_SYNC_ERR(domain, fmt, ...) \ - PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_ERROR, LOG_COLOR_FOR_ERROR, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_ERROR, LOG_COLOR_FOR_ERROR, fmt, ##__VA_ARGS__) #define PBL_LOG_D_SYNC_WRN(domain, fmt, ...) \ - PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_WARNING, LOG_COLOR_FOR_WARNING, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_WARNING, LOG_COLOR_FOR_WARNING, fmt, ##__VA_ARGS__) #define PBL_LOG_D_SYNC_INFO(domain, fmt, ...) \ - PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_INFO, LOG_COLOR_FOR_INFO, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_INFO, LOG_COLOR_FOR_INFO, fmt, ##__VA_ARGS__) #define PBL_LOG_D_SYNC_DBG(domain, fmt, ...) \ - PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_DEBUG, LOG_COLOR_FOR_DEBUG, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_DEBUG, LOG_COLOR_FOR_DEBUG, fmt, ##__VA_ARGS__) #define PBL_LOG_D_SYNC_VERBOSE(domain, fmt, ...) \ - PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_DEBUG_VERBOSE, LOG_COLOR_FOR_VERBOSE, fmt, ## __VA_ARGS__) + PBL_LOG_COLOR_D_SYNC(domain, LOG_LEVEL_DEBUG_VERBOSE, LOG_COLOR_FOR_VERBOSE, fmt, ##__VA_ARGS__) // Level-named sync macros (default domain) -#define PBL_LOG_SYNC_ALWAYS(fmt, ...) \ - PBL_LOG_D_SYNC_ALWAYS(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) -#define PBL_LOG_SYNC_ERR(fmt, ...) \ - PBL_LOG_D_SYNC_ERR(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) -#define PBL_LOG_SYNC_WRN(fmt, ...) \ - PBL_LOG_D_SYNC_WRN(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) -#define PBL_LOG_SYNC_INFO(fmt, ...) \ - PBL_LOG_D_SYNC_INFO(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) -#define PBL_LOG_SYNC_DBG(fmt, ...) \ - PBL_LOG_D_SYNC_DBG(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) +#define PBL_LOG_SYNC_ALWAYS(fmt, ...) PBL_LOG_D_SYNC_ALWAYS(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) +#define PBL_LOG_SYNC_ERR(fmt, ...) PBL_LOG_D_SYNC_ERR(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) +#define PBL_LOG_SYNC_WRN(fmt, ...) PBL_LOG_D_SYNC_WRN(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) +#define PBL_LOG_SYNC_INFO(fmt, ...) PBL_LOG_D_SYNC_INFO(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) +#define PBL_LOG_SYNC_DBG(fmt, ...) PBL_LOG_D_SYNC_DBG(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) #define PBL_LOG_SYNC_VERBOSE(fmt, ...) \ - PBL_LOG_D_SYNC_VERBOSE(DEFAULT_LOG_DOMAIN, fmt, ## __VA_ARGS__) + PBL_LOG_D_SYNC_VERBOSE(DEFAULT_LOG_DOMAIN, fmt, ##__VA_ARGS__) #ifdef CONFIG_LOG - #define RETURN_STATUS_D(d, st) \ - do { \ - if (FAILED(st)) { \ - PBL_LOG_D_WRN(d, "%d", (int)(st)); \ - } \ - return st; \ - } while (0) - - #define RETURN_STATUS_UP_D(d, st) \ - return ((st) != E_INVALID_ARGUMENT ? (st) : E_INTERNAL) -#else // CONFIG_LOG - #define RETURN_STATUS_D(d, st) return (st) - #define RETURN_STATUS_UP_D(d, st) \ - return ((st) == E_INVALID_ARGUMENT ? E_INTERNAL : (st)) -#endif // CONFIG_LOG +#define RETURN_STATUS_D(d, st) \ + do { \ + if (FAILED(st)) { \ + PBL_LOG_D_WRN(d, "%d", (int)(st)); \ + } \ + return st; \ + } while (0) + +#define RETURN_STATUS_UP_D(d, st) return ((st) != E_INVALID_ARGUMENT ? (st) : E_INTERNAL) +#else // CONFIG_LOG +#define RETURN_STATUS_D(d, st) return (st) +#define RETURN_STATUS_UP_D(d, st) return ((st) == E_INVALID_ARGUMENT ? E_INTERNAL : (st)) +#endif // CONFIG_LOG #define RETURN_STATUS(s) RETURN_STATUS_D(DEFAULT_LOG_DOMAIN, s) #define RETURN_STATUS_UP(s) RETURN_STATUS_UP_D(DEFAULT_LOG_DOMAIN, s) diff --git a/include/pbl/mcu/interrupts_arm.inl.h b/include/pbl/mcu/interrupts_arm.inl.h index f4527e3a12..7c4a20ad4e 100644 --- a/include/pbl/mcu/interrupts_arm.inl.h +++ b/include/pbl/mcu/interrupts_arm.inl.h @@ -8,7 +8,7 @@ static inline bool mcu_state_is_isr(void) { } static inline uint32_t mcu_state_get_isr_priority(void) { - uint32_t exc_number = __get_IPSR(); + uint32_t exc_number = __get_IPSR(); if (exc_number == 0) { return ~0; } diff --git a/include/pbl/mcu/privilege_arm.inl.h b/include/pbl/mcu/privilege_arm.inl.h index 0ee2bc7bc5..877756b918 100644 --- a/include/pbl/mcu/privilege_arm.inl.h +++ b/include/pbl/mcu/privilege_arm.inl.h @@ -3,7 +3,6 @@ #include - //! @file privilege_arm.inl.h //! Helpful functions for dealing with our micros execution state. //! diff --git a/include/pbl/os/assert.h b/include/pbl/os/assert.h index e55f50b180..c880a57d1c 100644 --- a/include/pbl/os/assert.h +++ b/include/pbl/os/assert.h @@ -11,16 +11,16 @@ NORETURN os_assertion_failed(const char *filename, int line); NORETURN os_assertion_failed_lr(const char *filename, int line, uint32_t lr); -#define OS_ASSERT(expr) \ - do { \ - if (UNLIKELY(!(expr))) { \ +#define OS_ASSERT(expr) \ + do { \ + if (UNLIKELY(!(expr))) { \ os_assertion_failed(__FILE_NAME__, __LINE__); \ - } \ + } \ } while (0) -#define OS_ASSERT_LR(expr, lr) \ - do { \ - if (UNLIKELY(!(expr))) { \ +#define OS_ASSERT_LR(expr, lr) \ + do { \ + if (UNLIKELY(!(expr))) { \ os_assertion_failed_lr(__FILE_NAME__, __LINE__, lr); \ - } \ + } \ } while (0) diff --git a/include/pbl/services/accel_manager.h b/include/pbl/services/accel_manager.h index 0fa94fd43b..35baa3cfaf 100644 --- a/include/pbl/services/accel_manager.h +++ b/include/pbl/services/accel_manager.h @@ -10,7 +10,6 @@ #include #include - typedef void (*AccelDataReadyCallback)(void *context); typedef struct AccelManagerState AccelManagerState; @@ -19,7 +18,6 @@ typedef struct AccelManagerState AccelManagerState; //! the depth of the accelerometer's hardware FIFO. uint32_t sys_accel_manager_get_max_samples_per_update(void); - void accel_manager_init(void); void accel_manager_enable(bool on); @@ -41,9 +39,9 @@ int sys_accel_manager_peek(AccelData *accel_data); //! //! @return An AccelManagerState object that has been allocated on the kernel heap. You must call //! sys_accel_manager_data_unsubscribe to free this object when you're done. -AccelManagerState* sys_accel_manager_data_subscribe( - AccelSamplingRate rate, AccelDataReadyCallback data_cb, void* context, - PebbleTask handler_task); +AccelManagerState *sys_accel_manager_data_subscribe(AccelSamplingRate rate, + AccelDataReadyCallback data_cb, void *context, + PebbleTask handler_task); //! @return true if an unprocessed data event is outstanding bool sys_accel_manager_data_unsubscribe(AccelManagerState *state); diff --git a/include/pbl/services/activity/activity.h b/include/pbl/services/activity/activity.h index 6ec19fbda4..9a259ec5f4 100644 --- a/include/pbl/services/activity/activity.h +++ b/include/pbl/services/activity/activity.h @@ -12,15 +12,15 @@ #include "util/time/time.h" // Max # of days of history we store -#define ACTIVITY_HISTORY_DAYS 30 +#define ACTIVITY_HISTORY_DAYS 30 // The max number of activity sessions we collect and cache at a time. Usually, there will only be // about 4 or 5 sleep sessions (1 container and a handful of restful periods) in a night and // a handful of walk and/or run sessions. Allocating space for 32 to should be more than enough. -#define ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT 32 +#define ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT 32 // Number of calories in a kcalorie -#define ACTIVITY_CALORIES_PER_KCAL 1000 +#define ACTIVITY_CALORIES_PER_KCAL 1000 // Values for ActivitySettingGender typedef enum { @@ -62,46 +62,49 @@ typedef enum { // Activity HRM Settings Struct, for storing to prefs typedef struct PACKED ActivityHRMSettings { bool enabled; - uint8_t measurement_interval; // HRMonitoringInterval value - bool activity_tracking_enabled; // HR tracking during detected activities (walk/run) + uint8_t measurement_interval; // HRMonitoringInterval value + bool activity_tracking_enabled; // HR tracking during detected activities (walk/run) } ActivityHRMSettings; // Default values, taken from http://www.cdc.gov/nchs/fastats/body-measurements.htm -#define ACTIVITY_DEFAULT_HEIGHT_MM 1620 // 5'3.8" +#define ACTIVITY_DEFAULT_HEIGHT_MM 1620 // 5'3.8" // dag - decagram (10 g) -#define ACTIVITY_DEFAULT_WEIGHT_DAG 7539 // 166.2 lbs -#define ACTIVITY_DEFAULT_GENDER ActivityGenderFemale -#define ACTIVITY_DEFAULT_AGE_YEARS 30 - -#define ACTIVITY_DEFAULT_PREFERENCES { \ - .tracking_enabled = false, \ - .activity_insights_enabled = false, \ - .sleep_insights_enabled = false, \ - .age_years = ACTIVITY_DEFAULT_AGE_YEARS, \ - .gender = ACTIVITY_DEFAULT_GENDER, \ - .height_mm = ACTIVITY_DEFAULT_HEIGHT_MM, \ - .weight_dag = ACTIVITY_DEFAULT_WEIGHT_DAG, \ -} - -#define ACTIVITY_HEART_RATE_DEFAULT_PREFERENCES { \ - .resting_hr = 70, \ - .elevated_hr = 100, \ - .max_hr = 220 - ACTIVITY_DEFAULT_AGE_YEARS, \ - .zone1_threshold = 130 /* 50% of HRR */, \ - .zone2_threshold = 154 /* 70% of HRR */, \ - .zone3_threshold = 172 /* 85% of HRR */, \ -} - -#define ACTIVITY_HRM_DEFAULT_PREFERENCES { \ - .enabled = true, \ - .measurement_interval = HRMonitoringInterval_10Min, \ - .activity_tracking_enabled = false, \ -} +#define ACTIVITY_DEFAULT_WEIGHT_DAG 7539 // 166.2 lbs +#define ACTIVITY_DEFAULT_GENDER ActivityGenderFemale +#define ACTIVITY_DEFAULT_AGE_YEARS 30 + +#define ACTIVITY_DEFAULT_PREFERENCES \ + { \ + .tracking_enabled = false, \ + .activity_insights_enabled = false, \ + .sleep_insights_enabled = false, \ + .age_years = ACTIVITY_DEFAULT_AGE_YEARS, \ + .gender = ACTIVITY_DEFAULT_GENDER, \ + .height_mm = ACTIVITY_DEFAULT_HEIGHT_MM, \ + .weight_dag = ACTIVITY_DEFAULT_WEIGHT_DAG, \ + } + +#define ACTIVITY_HEART_RATE_DEFAULT_PREFERENCES \ + { \ + .resting_hr = 70, \ + .elevated_hr = 100, \ + .max_hr = 220 - ACTIVITY_DEFAULT_AGE_YEARS, \ + .zone1_threshold = 130 /* 50% of HRR */, \ + .zone2_threshold = 154 /* 70% of HRR */, \ + .zone3_threshold = 172 /* 85% of HRR */, \ + } + +#define ACTIVITY_HRM_DEFAULT_PREFERENCES \ + { \ + .enabled = true, \ + .measurement_interval = HRMonitoringInterval_10Min, \ + .activity_tracking_enabled = false, \ + } // We consider values outside of this range to be invalid // In the future we could pick these values based on user history -#define ACTIVITY_DEFAULT_MIN_HR 40 -#define ACTIVITY_DEFAULT_MAX_HR 200 +#define ACTIVITY_DEFAULT_MIN_HR 40 +#define ACTIVITY_DEFAULT_MAX_HR 200 // Activity metric enums, accepted by activity_get_metric() typedef enum { @@ -113,20 +116,20 @@ typedef enum { ActivityMetricDistanceMeters, ActivityMetricSleepTotalSeconds, ActivityMetricSleepRestfulSeconds, - ActivityMetricSleepEnterAtSeconds, // What time the user fell asleep. Measured in - // seconds after midnight. - ActivityMetricSleepExitAtSeconds, // What time the user woke up. Measured in - // seconds after midnight - ActivityMetricSleepState, // returns an ActivitySleepState enum value - ActivityMetricSleepStateSeconds, // how many seconds we've been in the - // ActivityMetricSleepState state + ActivityMetricSleepEnterAtSeconds, // What time the user fell asleep. Measured in + // seconds after midnight. + ActivityMetricSleepExitAtSeconds, // What time the user woke up. Measured in + // seconds after midnight + ActivityMetricSleepState, // returns an ActivitySleepState enum value + ActivityMetricSleepStateSeconds, // how many seconds we've been in the + // ActivityMetricSleepState state ActivityMetricLastVMC, - ActivityMetricHeartRateRawBPM, // Most recent heart rate reading - ActivityMetricHeartRateRawQuality, // Heart rate signal quality - ActivityMetricHeartRateRawUpdatedTimeUTC, // UTC of last heart rate update - ActivityMetricHeartRateFilteredBPM, // Most recent "Stable (median)" HR reading - ActivityMetricHeartRateFilteredUpdatedTimeUTC, // UTC of last stable HR reading + ActivityMetricHeartRateRawBPM, // Most recent heart rate reading + ActivityMetricHeartRateRawQuality, // Heart rate signal quality + ActivityMetricHeartRateRawUpdatedTimeUTC, // UTC of last heart rate update + ActivityMetricHeartRateFilteredBPM, // Most recent "Stable (median)" HR reading + ActivityMetricHeartRateFilteredUpdatedTimeUTC, // UTC of last stable HR reading ActivityMetricHeartRateZone1Minutes, ActivityMetricHeartRateZone2Minutes, @@ -137,7 +140,6 @@ typedef enum { ActivityMetricInvalid = ActivityMetricNumMetrics, } ActivityMetric; - // Activity session types, used in ActivitySession struct typedef enum { ActivitySessionType_None = 0, @@ -182,16 +184,15 @@ typedef enum { ActivitySleepStateUnknown, } ActivitySleepState; - // Data included for stepping related activities. // NOTE: modifying this struct requires a bump to the ACTIVITY_SESSION_LOGGING_VERSION and // an update to documentation on this wiki page: // https://pebbletechnology.atlassian.net/wiki/pages/viewpage.action?pageId=46301269 typedef struct PACKED { - uint16_t steps; // number of steps - uint16_t active_kcalories; // number of active kcalories - uint16_t resting_kcalories; // number of resting kcalories - uint16_t distance_meters; // distance covered + uint16_t steps; // number of steps + uint16_t active_kcalories; // number of active kcalories + uint16_t resting_kcalories; // number of resting kcalories + uint16_t distance_meters; // distance covered } ActivitySessionDataStepping; // Data included for sleep related activities @@ -204,14 +205,14 @@ typedef struct { #define ACTIVITY_SESSION_MAX_LENGTH_MIN MINUTES_PER_DAY typedef struct PACKED { - time_t start_utc; // session start time - uint16_t length_min; // length of session in minutes - ActivitySessionType type:8; // type of activity + time_t start_utc; // session start time + uint16_t length_min; // length of session in minutes + ActivitySessionType type : 8; // type of activity union { struct { - uint8_t ongoing:1; // activity still ongoing - uint8_t manual:1; // activity is a manual one - uint8_t reserved:6; + uint8_t ongoing : 1; // activity still ongoing + uint8_t manual : 1; // activity is a manual one + uint8_t reserved : 6; }; uint8_t flags; }; @@ -233,51 +234,51 @@ typedef struct PACKED { // Utilities for the encoded samples collected by raw sample collection. #define ACTIVITY_RAW_SAMPLE_VALUE_BITS (10) -#define ACTIVITY_RAW_SAMPLE_VALUE_MASK (0x03FF) // 10 bits per axis +#define ACTIVITY_RAW_SAMPLE_VALUE_MASK (0x03FF) // 10 bits per axis // We throw away the least significant 3 bits and keep only 10 bits per axix. The + 4 is used // so that we round to nearest instead of rounding down as a result of the shift right #define ACTIVITY_RAW_SAMPLE_SHIFT 3 -#define ACTIVITY_RAW_SAMPLE_VALUE_ENCODE(x) ((((x) + 4) >> ACTIVITY_RAW_SAMPLE_SHIFT) \ - & ACTIVITY_RAW_SAMPLE_VALUE_MASK) +#define ACTIVITY_RAW_SAMPLE_VALUE_ENCODE(x) \ + ((((x) + 4) >> ACTIVITY_RAW_SAMPLE_SHIFT) & ACTIVITY_RAW_SAMPLE_VALUE_MASK) #define ACTIVITY_RAW_SAMPLE_MAX_RUN_SIZE 3 #define ACTIVITY_RAW_SAMPLE_GET_RUN_SIZE(s) ((s) >> (3 * ACTIVITY_RAW_SAMPLE_VALUE_BITS)) #define ACTIVITY_RAW_SAMPLE_SET_RUN_SIZE(s, r) (s |= (r) << (3 * ACTIVITY_RAW_SAMPLE_VALUE_BITS)) #define ACTIVITY_RAW_SAMPLE_SIGN_EXTEND(x) ((x) & 0x1000 ? -1 * (0x2000 - (x)) : (x)) -#define ACTIVITY_RAW_SAMPLE_GET_X(s) \ - ACTIVITY_RAW_SAMPLE_SIGN_EXTEND((((uint32_t)s >> (2 * ACTIVITY_RAW_SAMPLE_VALUE_BITS)) \ - & ACTIVITY_RAW_SAMPLE_VALUE_MASK) << ACTIVITY_RAW_SAMPLE_SHIFT) -#define ACTIVITY_RAW_SAMPLE_GET_Y(s) \ - ACTIVITY_RAW_SAMPLE_SIGN_EXTEND(((s >> ACTIVITY_RAW_SAMPLE_VALUE_BITS) \ - & ACTIVITY_RAW_SAMPLE_VALUE_MASK) << ACTIVITY_RAW_SAMPLE_SHIFT) +#define ACTIVITY_RAW_SAMPLE_GET_X(s) \ + ACTIVITY_RAW_SAMPLE_SIGN_EXTEND( \ + (((uint32_t)s >> (2 * ACTIVITY_RAW_SAMPLE_VALUE_BITS)) & ACTIVITY_RAW_SAMPLE_VALUE_MASK) \ + << ACTIVITY_RAW_SAMPLE_SHIFT) +#define ACTIVITY_RAW_SAMPLE_GET_Y(s) \ + ACTIVITY_RAW_SAMPLE_SIGN_EXTEND( \ + ((s >> ACTIVITY_RAW_SAMPLE_VALUE_BITS) & ACTIVITY_RAW_SAMPLE_VALUE_MASK) \ + << ACTIVITY_RAW_SAMPLE_SHIFT) #define ACTIVITY_RAW_SAMPLE_GET_Z(s) \ - ACTIVITY_RAW_SAMPLE_SIGN_EXTEND((s \ - & ACTIVITY_RAW_SAMPLE_VALUE_MASK) << ACTIVITY_RAW_SAMPLE_SHIFT) + ACTIVITY_RAW_SAMPLE_SIGN_EXTEND((s & ACTIVITY_RAW_SAMPLE_VALUE_MASK) << ACTIVITY_RAW_SAMPLE_SHIFT) -#define ACTIVITY_RAW_SAMPLE_ENCODE(run_size, x, y, z) \ - ((run_size) << (3 * ACTIVITY_RAW_SAMPLE_VALUE_BITS)) \ - | (ACTIVITY_RAW_SAMPLE_VALUE_ENCODE(x) << (2 * ACTIVITY_RAW_SAMPLE_VALUE_BITS)) \ - | (ACTIVITY_RAW_SAMPLE_VALUE_ENCODE(y) << ACTIVITY_RAW_SAMPLE_VALUE_BITS) \ - | ACTIVITY_RAW_SAMPLE_VALUE_ENCODE(z) +#define ACTIVITY_RAW_SAMPLE_ENCODE(run_size, x, y, z) \ + ((run_size) << (3 * ACTIVITY_RAW_SAMPLE_VALUE_BITS)) | \ + (ACTIVITY_RAW_SAMPLE_VALUE_ENCODE(x) << (2 * ACTIVITY_RAW_SAMPLE_VALUE_BITS)) | \ + (ACTIVITY_RAW_SAMPLE_VALUE_ENCODE(y) << ACTIVITY_RAW_SAMPLE_VALUE_BITS) | \ + ACTIVITY_RAW_SAMPLE_VALUE_ENCODE(z) -#define ACTIVITY_RAW_SAMPLE_FLAG_FIRST_RECORD 0x01 // Set for first record of session -#define ACTIVITY_RAW_SAMPLE_FLAG_LAST_RECORD 0x02 // set for last record of session +#define ACTIVITY_RAW_SAMPLE_FLAG_FIRST_RECORD 0x01 // Set for first record of session +#define ACTIVITY_RAW_SAMPLE_FLAG_LAST_RECORD 0x02 // set for last record of session typedef struct __attribute__((__packed__)) { - uint16_t version; // Set to ACTIVITY_RAW_SAMPLE_VERSION - uint16_t session_id; // raw sample session id - uint32_t time_local; // local time - uint8_t flags; // one or more of ACTIVITY_RAW_SAMPLE_FLAG_.* - uint8_t len; // length of this blob, including this entire header - uint8_t num_samples; // number of uncompressed samples that this blob represents - uint8_t num_entries; // number of elements in the entries array below + uint16_t version; // Set to ACTIVITY_RAW_SAMPLE_VERSION + uint16_t session_id; // raw sample session id + uint32_t time_local; // local time + uint8_t flags; // one or more of ACTIVITY_RAW_SAMPLE_FLAG_.* + uint8_t len; // length of this blob, including this entire header + uint8_t num_samples; // number of uncompressed samples that this blob represents + uint8_t num_entries; // number of elements in the entries array below uint32_t entries[ACTIVITY_RAW_SAMPLES_MAX_ENTRIES]; - // array of entries, each entry can represent multiple samples - // if we detect run lengths + // array of entries, each entry can represent multiple samples + // if we detect run lengths } ActivityRawSamplesRecord; - //! Init the activity tracking service. This does not start it up - to start it up call //! activity_start_tracking(); //! @return true if successfully initialized @@ -447,7 +448,6 @@ bool activity_get_metric_typical(ActivityMetric metric, DayInWeek day, int32_t * //! Get the value for a metric over the last 4 weeks bool activity_get_metric_monthly_avg(ActivityMetric metric, int32_t *value_out); - //! Get detailed info about activity sessions. This fills in an array with info on all of the //! activity sessions that ended after 12am (midnight) of the current day. The caller must allocate //! space for the array and tell this method how many entries the array can hold @@ -476,8 +476,8 @@ bool activity_get_minute_history(HealthMinuteData *minute_data, uint32_t *num_re time_t *utc_start); // Metric averages, returned by activity_get_step_averages() -#define ACTIVITY_NUM_METRIC_AVERAGES (4 * 24) //!< one average for each 15 minute interval of a day -#define ACTIVITY_METRIC_AVERAGES_UNKNOWN 0xFFFF //!< indicates the average is unknown +#define ACTIVITY_NUM_METRIC_AVERAGES (4 * 24) //!< one average for each 15 minute interval of a day +#define ACTIVITY_METRIC_AVERAGES_UNKNOWN 0xFFFF //!< indicates the average is unknown typedef struct { uint16_t average[ACTIVITY_NUM_METRIC_AVERAGES]; } ActivityMetricAverages; @@ -508,8 +508,8 @@ bool activity_get_step_averages(DayInWeek day_of_week, ActivityMetricAverages *a //! sampling is currently disabled, this is the number of seconds of data in the most recently //! ended session. //! @return true on success, false on error -bool activity_raw_sample_collection(bool enable, bool disable, bool *enabled, - uint32_t *session_id, uint32_t *num_samples, uint32_t *seconds); +bool activity_raw_sample_collection(bool enable, bool disable, bool *enabled, uint32_t *session_id, + uint32_t *num_samples, uint32_t *seconds); //! Dump the current sleep data using PBL_LOG. We write out base64 encoded data using PBL_LOG //! so that it can be extracted using a support request. diff --git a/include/pbl/services/activity/activity_algorithm.h b/include/pbl/services/activity/activity_algorithm.h index 1d19f8f6aa..6365d24a5e 100644 --- a/include/pbl/services/activity/activity_algorithm.h +++ b/include/pbl/services/activity/activity_algorithm.h @@ -13,7 +13,7 @@ // 5: Added the flags field and the plugged_in bit // 5 (3/1/16): Added the active bit to flags // 6: Added heart rate bpm -#define ALG_MINUTE_FILE_RECORD_VERSION 6 +#define ALG_MINUTE_FILE_RECORD_VERSION 6 // Format of each minute in our minute file. In the minute file, which is stored as a settings file // on the watch, we store a subset of what we send to data logging since we only need the @@ -21,17 +21,17 @@ // the health_service_get_minute_history() API call. typedef struct __attribute__((__packed__)) { // Base fields, present in versions 4 and 5 - uint8_t steps; // # of steps in this minute - uint8_t orientation; // average orientation of the watch - uint16_t vmc; // VMC (Vector Magnitude Counts) for this minute - uint8_t light; // light sensor reading divided by + uint8_t steps; // # of steps in this minute + uint8_t orientation; // average orientation of the watch + uint16_t vmc; // VMC (Vector Magnitude Counts) for this minute + uint8_t light; // light sensor reading divided by // ALG_RAW_LIGHT_SENSOR_DIVIDE_BY // New fields added in version 5 union { struct { - uint8_t plugged_in:1; - uint8_t active:1; // This is an "active" minute - uint8_t reserved:6; + uint8_t plugged_in : 1; + uint8_t active : 1; // This is an "active" minute + uint8_t reserved : 6; }; uint8_t flags; }; @@ -44,7 +44,6 @@ typedef struct __attribute__((__packed__)) { uint8_t heart_rate_bpm; } AlgMinuteFileSample; - // Version of our minute data logging records. // NOTE: AlgDlsMinuteData and the mobile app will continue to assume it can parse the blob, // only appending more properties is allowed. @@ -60,12 +59,11 @@ typedef struct __attribute__((__packed__)) { // 12: Added total heart rate weight // 13: Added heart rate zone // 14: ... (NYI, you decide!) -#define ALG_DLS_MINUTES_RECORD_VERSION 13 +#define ALG_DLS_MINUTES_RECORD_VERSION 13 _Static_assert((ALG_DLS_MINUTES_RECORD_VERSION & (1 << 2)) > 0, "Android 3.10-4.0 requires bit 2 to be set"); -_Static_assert(ALG_DLS_MINUTES_RECORD_VERSION <= 225, - "iOS requires version less that 255"); +_Static_assert(ALG_DLS_MINUTES_RECORD_VERSION <= 225, "iOS requires version less that 255"); // Format of each minute in our data logging minute records. typedef struct __attribute__((__packed__)) { @@ -74,21 +72,20 @@ typedef struct __attribute__((__packed__)) { AlgMinuteFileSampleV5 base; // New fields added in version 6 - uint16_t resting_calories; // number of resting calories burned in this minute - uint16_t active_calories; // number of active calories burned in this minute - uint16_t distance_cm; // distance in centimeters traveled in this minute + uint16_t resting_calories; // number of resting calories burned in this minute + uint16_t active_calories; // number of active calories burned in this minute + uint16_t distance_cm; // distance in centimeters traveled in this minute // New fields added in version 7 - uint8_t heart_rate_bpm; // weighted median hr value in this minute + uint8_t heart_rate_bpm; // weighted median hr value in this minute // New fields added in version 12 - uint16_t heart_rate_total_weight_x100; // total weight of all HR values multiplied by 100 + uint16_t heart_rate_total_weight_x100; // total weight of all HR values multiplied by 100 // New fields added in version 13 - uint8_t heart_rate_zone; // the hr zone for this minute + uint8_t heart_rate_zone; // the hr zone for this minute } AlgMinuteDLSSample; - // We store minute data in this struct into a circular buffer and then transfer from there to // data logging and to the minute file in PFS as we get a batch big enough. typedef struct { @@ -96,35 +93,32 @@ typedef struct { AlgMinuteDLSSample data; } AlgMinuteRecord; - // Record header. The same header is used for minute file records and minute data logging records typedef struct __attribute__((__packed__)) { - uint16_t version; // Set to ALG_DLS_MINUTES_RECORD_VERSION or - // ALG_MINUTE_FILE_RECORD_VERSION - uint32_t time_utc; // UTC time - int8_t time_local_offset_15_min; // add this many 15 minute intervals to UTC to get local time. - uint8_t sample_size; // size in bytes of each sample - uint8_t num_samples; // # of samples included (ALG_MINUTES_PER_RECORD) + uint16_t version; // Set to ALG_DLS_MINUTES_RECORD_VERSION or + // ALG_MINUTE_FILE_RECORD_VERSION + uint32_t time_utc; // UTC time + int8_t time_local_offset_15_min; // add this many 15 minute intervals to UTC to get local time. + uint8_t sample_size; // size in bytes of each sample + uint8_t num_samples; // # of samples included (ALG_MINUTES_PER_RECORD) } AlgMinuteRecordHdr; - // Format of each data logging minute data record -#define ALG_MINUTES_PER_DLS_RECORD 15 +#define ALG_MINUTES_PER_DLS_RECORD 15 typedef struct __attribute__((__packed__)) { AlgMinuteRecordHdr hdr; AlgMinuteDLSSample samples[ALG_MINUTES_PER_DLS_RECORD]; } AlgMinuteDLSRecord; // Format of each minute file record -#define ALG_MINUTES_PER_FILE_RECORD 15 +#define ALG_MINUTES_PER_FILE_RECORD 15 typedef struct __attribute__((__packed__)) { AlgMinuteRecordHdr hdr; AlgMinuteFileSample samples[ALG_MINUTES_PER_FILE_RECORD]; } AlgMinuteFileRecord; - // Size quota for the minute file -#define ALG_MINUTE_DATA_FILE_LEN 0x20000 +#define ALG_MINUTE_DATA_FILE_LEN 0x20000 // Max possible number of entries we can fit in our settings file if there was no overhead to // the settings file at all. The actual number we can fit is less than this. @@ -238,4 +232,3 @@ bool activity_algorithm_test_fill_minute_file(void); //! Send a fake minute logging record to data logging. Useful for mobile app testing //! @return true if success bool activity_algorithm_test_send_fake_minute_data_dls_record(void); - diff --git a/include/pbl/services/activity/activity_calculators.h b/include/pbl/services/activity/activity_calculators.h index 81a3759430..9fa58b92e2 100644 --- a/include/pbl/services/activity/activity_calculators.h +++ b/include/pbl/services/activity/activity_calculators.h @@ -10,7 +10,6 @@ // amount of time. uint32_t activity_private_compute_distance_mm(uint32_t steps, uint32_t ms); - // ------------------------------------------------------------------------------------------------ // Compute active calories (in calories, not kcalories) covered by going the given distance in // the given amount of time. diff --git a/include/pbl/services/activity/activity_insights.h b/include/pbl/services/activity/activity_insights.h index a5d2dd9d07..6205264fb1 100644 --- a/include/pbl/services/activity/activity_insights.h +++ b/include/pbl/services/activity/activity_insights.h @@ -83,8 +83,7 @@ void activity_insights_process_sleep_data(time_t now_utc); void activity_insights_process_minute_data(time_t now_utc); void activity_insights_push_activity_session_notification(time_t notif_time, - ActivitySession *session, - int32_t avg_hr, + ActivitySession *session, int32_t avg_hr, int32_t *hr_zone_time_s); //! Used by test apps: Pushes the 3 variants of each summary pin to the timeline and a notification diff --git a/include/pbl/services/activity/activity_private.h b/include/pbl/services/activity/activity_private.h index c98d29df23..7c700e2aa2 100644 --- a/include/pbl/services/activity/activity_private.h +++ b/include/pbl/services/activity/activity_private.h @@ -20,39 +20,38 @@ #include #include -#define ACTIVITY_LOG_DEBUG(fmt, args...) \ - PBL_LOG_D_DBG(LOG_DOMAIN_ACTIVITY, fmt, ## args) +#define ACTIVITY_LOG_DEBUG(fmt, args...) PBL_LOG_D_DBG(LOG_DOMAIN_ACTIVITY, fmt, ##args) #define ACTIVITY_HEXDUMP(data, length) \ - PBL_HEXDUMP_D(LOG_DOMAIN_DATA_ACTIVITY, LOG_LEVEL_DEBUG, data, length) + PBL_HEXDUMP_D(LOG_DOMAIN_DATA_ACTIVITY, LOG_LEVEL_DEBUG, data, length) // How often we update settings with the current step/sleep stats for today. -#define ACTIVITY_SETTINGS_UPDATE_MIN 15 +#define ACTIVITY_SETTINGS_UPDATE_MIN 15 // How often we recompute the activity sessions (like sleep, walks, runs). This has significant // enough CPU requirements to warrant only recomputing occasionally -#define ACTIVITY_SESSION_UPDATE_MIN 15 +#define ACTIVITY_SESSION_UPDATE_MIN 15 // Every scalar metric and setting is stored in globals and in the settings file using this // typedef. Must be wide enough for daily step counts and distance in meters, which can // legitimately exceed UINT16_MAX (FIRM-3071). typedef uint32_t ActivityScalarStore; -#define ACTIVITY_SCALAR_MAX UINT32_MAX +#define ACTIVITY_SCALAR_MAX UINT32_MAX // Each step average interval covers this many minutes -#define ACTIVITY_STEP_AVERAGES_MINUTES (MINUTES_PER_DAY / ACTIVITY_NUM_METRIC_AVERAGES) +#define ACTIVITY_STEP_AVERAGES_MINUTES (MINUTES_PER_DAY / ACTIVITY_NUM_METRIC_AVERAGES) // flash vs. the most amount of data we could lose if we reset. #define ACTIVITY_STEP_AVERAGES_PER_KEY 4 -#define ACTIVITY_STEP_AVERAGES_KEYS_PER_DAY \ - (ACTIVITY_NUM_METRIC_AVERAGES / ACTIVITY_STEP_AVERAGES_PER_KEY) +#define ACTIVITY_STEP_AVERAGES_KEYS_PER_DAY \ + (ACTIVITY_NUM_METRIC_AVERAGES / ACTIVITY_STEP_AVERAGES_PER_KEY) // If we see at least this many steps in a minute, it was an "active minute" #define ACTIVITY_ACTIVE_MINUTE_MIN_STEPS 40 // We consider any sleep session that ends after this minute of the day (representing 9pm) as // part of the next day's sleep -#define ACTIVITY_LAST_SLEEP_MINUTE_OF_DAY (21 * MINUTES_PER_HOUR) +#define ACTIVITY_LAST_SLEEP_MINUTE_OF_DAY (21 * MINUTES_PER_HOUR) // Default HeartRate sampling ON time #define ACTIVITY_DEFAULT_HR_ON_TIME_SEC (60) @@ -67,7 +66,7 @@ typedef uint32_t ActivityScalarStore; #define ACTIVITY_MIN_NUM_SAMPLES_FOR_HR_ZONE (5) // HRM Subscription values during ON and OFF periods -#define ACTIVITY_HRM_SUBSCRIPTION_ON_PERIOD_SEC (1) +#define ACTIVITY_HRM_SUBSCRIPTION_ON_PERIOD_SEC (1) #define ACTIVITY_HRM_SUBSCRIPTION_OFF_PERIOD_SEC (SECONDS_PER_DAY) // After this many seconds without an HRM event, the cached worn-status is considered stale and @@ -81,93 +80,90 @@ typedef uint32_t ActivityScalarStore; #define ACTIVITY_MAX_HR_SAMPLES (3 * SECONDS_PER_MINUTE) // Conversion factors -#define ACTIVITY_DAG_PER_KG 100 - +#define ACTIVITY_DAG_PER_KG 100 // ----------------------------------------------------------------------------------------- // Settings file info and keys -#define ACTIVITY_SETTINGS_FILE_NAME "activity" -#define ACTIVITY_SETTINGS_FILE_LEN 0x4000 +#define ACTIVITY_SETTINGS_FILE_NAME "activity" +#define ACTIVITY_SETTINGS_FILE_LEN 0x4000 // The version of our settings file // Version 1 - ActivitySettingsKeyVersion didn't exist // Version 2 - Changed file size from 2k to 16k // Version 3 - ActivityScalarStore widened from uint16_t to uint32_t, changing the layout of // ActivitySettingsValueHistory records and of scalar metric records -#define ACTIVITY_SETTINGS_CURRENT_VERSION 3 +#define ACTIVITY_SETTINGS_CURRENT_VERSION 3 typedef struct { - uint32_t utc_sec; // timestamp of first entry in list + uint32_t utc_sec; // timestamp of first entry in list // One entry per day. The most recent day (today) is stored at index 0 ActivityScalarStore values[ACTIVITY_HISTORY_DAYS]; } ActivitySettingsValueHistory; - // Keys of the settings we save in our settings file. typedef enum { - ActivitySettingsKeyInvalid = 0, // Used for error discovery - ActivitySettingsKeyVersion, // uint16_t: ACTIVITY_SETTINGS_CURRENT_VERSION - ActivitySettingsKeyUnused0, // Unused - ActivitySettingsKeyUnused1, // Unused - ActivitySettingsKeyUnused2, // Unused - ActivitySettingsKeyUnused3, // Unused - - ActivitySettingsKeyStepCountHistory, // ActivitySettingsValueHistory - ActivitySettingsKeyStepMinutesHistory, // ActivitySettingsValueHistory - ActivitySettingsKeyUnused4, // Unused - ActivitySettingsKeyDistanceMetersHistory, // ActivitySettingsValueHistory - ActivitySettingsKeySleepTotalMinutesHistory, // ActivitySettingsValueHistory - ActivitySettingsKeySleepDeepMinutesHistory, // ActivitySettingsValueHistory - ActivitySettingsKeySleepEntryMinutesHistory, // ActivitySettingsValueHistory - // How long it took to fall asleep - ActivitySettingsKeySleepEnterAtHistory, // ActivitySettingsValueHistory - // What time the user fell asleep. Measured in - // minutes after midnight. - ActivitySettingsKeySleepExitAtHistory, // ActivitySettingsValueHistory - // What time the user woke up. Measured in - // minutes after midnight - ActivitySettingsKeySleepState, // ActivityScalarStore - ActivitySettingsKeySleepStateMinutes, // ActivityScalarStore - ActivitySettingsKeyStepAveragesWeekdayFirst, // ACTIVITY_STEP_AVERAGES_PER_CHUNK * uint16_t + ActivitySettingsKeyInvalid = 0, // Used for error discovery + ActivitySettingsKeyVersion, // uint16_t: ACTIVITY_SETTINGS_CURRENT_VERSION + ActivitySettingsKeyUnused0, // Unused + ActivitySettingsKeyUnused1, // Unused + ActivitySettingsKeyUnused2, // Unused + ActivitySettingsKeyUnused3, // Unused + + ActivitySettingsKeyStepCountHistory, // ActivitySettingsValueHistory + ActivitySettingsKeyStepMinutesHistory, // ActivitySettingsValueHistory + ActivitySettingsKeyUnused4, // Unused + ActivitySettingsKeyDistanceMetersHistory, // ActivitySettingsValueHistory + ActivitySettingsKeySleepTotalMinutesHistory, // ActivitySettingsValueHistory + ActivitySettingsKeySleepDeepMinutesHistory, // ActivitySettingsValueHistory + ActivitySettingsKeySleepEntryMinutesHistory, // ActivitySettingsValueHistory + // How long it took to fall asleep + ActivitySettingsKeySleepEnterAtHistory, // ActivitySettingsValueHistory + // What time the user fell asleep. Measured in + // minutes after midnight. + ActivitySettingsKeySleepExitAtHistory, // ActivitySettingsValueHistory + // What time the user woke up. Measured in + // minutes after midnight + ActivitySettingsKeySleepState, // ActivityScalarStore + ActivitySettingsKeySleepStateMinutes, // ActivityScalarStore + ActivitySettingsKeyStepAveragesWeekdayFirst, // ACTIVITY_STEP_AVERAGES_PER_CHUNK * uint16_t ActivitySettingsKeyStepAveragesWeekdayLast = - ActivitySettingsKeyStepAveragesWeekdayFirst + ACTIVITY_STEP_AVERAGES_KEYS_PER_DAY - 1, + ActivitySettingsKeyStepAveragesWeekdayFirst + ACTIVITY_STEP_AVERAGES_KEYS_PER_DAY - 1, - ActivitySettingsKeyStepAveragesWeekendFirst, // ACTIVITY_STEP_AVERAGES_PER_CHUNK * uint16_t + ActivitySettingsKeyStepAveragesWeekendFirst, // ACTIVITY_STEP_AVERAGES_PER_CHUNK * uint16_t ActivitySettingsKeyStepAveragesWeekendLast = - ActivitySettingsKeyStepAveragesWeekendFirst + ACTIVITY_STEP_AVERAGES_KEYS_PER_DAY - 1, - ActivitySettingsKeyAgeYears, // uint16_t: age in years - - ActivitySettingsKeyUnused5, // Unused - - ActivitySettingsKeyInsightSleepRewardTime, // time_t: time we last showed the sleep reward - // This will be 0 if we haven't triggered one yet - ActivitySettingsKeyInsightActivityRewardTime, // time_t: time we last showed the activity reward - // This will be 0 if we haven't triggered one yet - ActivitySettingsKeyInsightActivitySummaryState, // SummaryPinLastState: the UUID and last time the - // pin was added - ActivitySettingsKeyInsightSleepSummaryState, // SummaryPinLastState: the UUID and last time the - // pin was added - ActivitySettingsKeyRestingKCaloriesHistory, // ActivitySettingsValueHistory - ActivitySettingsKeyActiveKCaloriesHistory, // ActivitySettingsValueHistory - ActivitySettingsKeyLastSleepActivityUTC, // time_t: UTC timestamp of the last sleep related - // activity we logged to analytics - ActivitySettingsKeyLastRestfulSleepActivityUTC, // time_t: UTC timestamp of the last restful sleep - // related activity we logged to analytics - ActivitySettingsKeyLastStepActivityUTC, // time_t: UTC timestamp of the last step related - // activity we logged to analytics - ActivitySettingsKeyStoredActivities, // ActivitySession[ - // ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT] - ActivitySettingsKeyInsightNapSessionTime, // time_t: time we last showed the nap pin - ActivitySettingsKeyInsightActivitySessionTime, // time_t: time we last showed the activity pin - ActivitySettingsKeyLastVMC, // ActivityScalarStore: the VMC at the last - // processed minute - ActivitySettingsKeyRestingHeartRate, // ActivitySettingsValueHistory + ActivitySettingsKeyStepAveragesWeekendFirst + ACTIVITY_STEP_AVERAGES_KEYS_PER_DAY - 1, + ActivitySettingsKeyAgeYears, // uint16_t: age in years + + ActivitySettingsKeyUnused5, // Unused + + ActivitySettingsKeyInsightSleepRewardTime, // time_t: time we last showed the sleep reward + // This will be 0 if we haven't triggered one yet + ActivitySettingsKeyInsightActivityRewardTime, // time_t: time we last showed the activity reward + // This will be 0 if we haven't triggered one yet + ActivitySettingsKeyInsightActivitySummaryState, // SummaryPinLastState: the UUID and last time + // the pin was added + ActivitySettingsKeyInsightSleepSummaryState, // SummaryPinLastState: the UUID and last time the + // pin was added + ActivitySettingsKeyRestingKCaloriesHistory, // ActivitySettingsValueHistory + ActivitySettingsKeyActiveKCaloriesHistory, // ActivitySettingsValueHistory + ActivitySettingsKeyLastSleepActivityUTC, // time_t: UTC timestamp of the last sleep related + // activity we logged to analytics + ActivitySettingsKeyLastRestfulSleepActivityUTC, // time_t: UTC timestamp of the last restful + // sleep related activity we logged to analytics + ActivitySettingsKeyLastStepActivityUTC, // time_t: UTC timestamp of the last step related + // activity we logged to analytics + ActivitySettingsKeyStoredActivities, // ActivitySession[ + // ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT] + ActivitySettingsKeyInsightNapSessionTime, // time_t: time we last showed the nap pin + ActivitySettingsKeyInsightActivitySessionTime, // time_t: time we last showed the activity pin + ActivitySettingsKeyLastVMC, // ActivityScalarStore: the VMC at the last + // processed minute + ActivitySettingsKeyRestingHeartRate, // ActivitySettingsValueHistory ActivitySettingsKeyHeartRateZone1Minutes, ActivitySettingsKeyHeartRateZone2Minutes, ActivitySettingsKeyHeartRateZone3Minutes, } ActivitySettingsKey; - // ----------------------------------------------------------------------------------------- // Internal structs // IMPORTANT: activity_metrics_prv_get_metric_info() assumes that every element of ActivityStepData @@ -185,9 +181,9 @@ typedef struct { typedef struct { ActivityScalarStore total_minutes; ActivityScalarStore restful_minutes; - ActivityScalarStore enter_at_minute; // minutes after midnight - ActivityScalarStore exit_at_minute; // minutes after midnight - ActivityScalarStore cur_state; // HealthActivity + ActivityScalarStore enter_at_minute; // minutes after midnight + ActivityScalarStore exit_at_minute; // minutes after midnight + ActivityScalarStore cur_state; // HealthActivity ActivityScalarStore cur_state_elapsed_minutes; } ActivitySleepData; @@ -196,11 +192,11 @@ typedef struct { // specially coded as a 32-bit metric and is allowed to be because we don't persist it in // the settings file and it has no history typedef struct { - ActivityScalarStore current_bpm; // Most current reading - uint32_t current_update_time_utc; // Timestamp of the current HR reading + ActivityScalarStore current_bpm; // Most current reading + uint32_t current_update_time_utc; // Timestamp of the current HR reading ActivityScalarStore current_hr_zone; ActivityScalarStore resting_bpm; - ActivityScalarStore current_quality; // HRMQuality + ActivityScalarStore current_quality; // HRMQuality ActivityScalarStore last_stable_bpm; uint32_t last_stable_bpm_update_time_utc; // Timestamp of the last stable BPM ActivityScalarStore previous_median_bpm; // Most recently calculated median HR in a minute @@ -209,7 +205,6 @@ typedef struct { bool is_hr_elevated; } ActivityHeartRateData; - // This callback used to convert a metric from the storage format (as a ActivityScalarStore) into // the return format (uint32_t) returned by activity_get_metric. It might convert minutes to // seconds, etc. @@ -242,10 +237,10 @@ typedef struct { // Data logging record used to send sleep sessions to the phone typedef struct PACKED { - uint16_t version; // set to ACTIVITY_SLEEP_SESSION_LOGGING_VERSION - int32_t utc_to_local; // Add this to UTC to get local time - uint32_t start_utc; // The start time in UTC - uint32_t end_utc; // The end time in UTC + uint16_t version; // set to ACTIVITY_SLEEP_SESSION_LOGGING_VERSION + int32_t utc_to_local; // Add this to UTC to get local time + uint32_t start_utc; // The start time in UTC + uint32_t end_utc; // The end time in UTC uint32_t restful_secs; } ActivityLegacySleepSessionDataLoggingRecord; @@ -261,12 +256,12 @@ typedef struct PACKED { // an update to documentation on this wiki page: // https://pebbletechnology.atlassian.net/wiki/pages/viewpage.action?pageId=46301269 typedef struct PACKED { - uint16_t version; // set to ACTIVITY_SESSION_LOGGING_VERSION - uint16_t size; // size of this structure - uint16_t activity; // ActivitySessionType: the type of activity - int32_t utc_to_local; // Add this to UTC to get local time - uint32_t start_utc; // The start time in UTC - uint32_t elapsed_sec; // Elapsed time in seconds + uint16_t version; // set to ACTIVITY_SESSION_LOGGING_VERSION + uint16_t size; // size of this structure + uint16_t activity; // ActivitySessionType: the type of activity + int32_t utc_to_local; // Add this to UTC to get local time + uint32_t start_utc; // The start time in UTC + uint32_t elapsed_sec; // Elapsed time in seconds // New fields add in version 3 union { @@ -285,8 +280,8 @@ typedef struct { // Most recently encoded accel sample value. Used for detecting and encoding runs of the same // value - uint32_t prev_sample; // See comments in ActivityRawSamplesRecord for encoding - uint8_t run_size; // run size of prev_sample + uint32_t prev_sample; // See comments in ActivityRawSamplesRecord for encoding + uint8_t run_size; // run size of prev_sample // The currently forming record ActivityRawSamplesRecord record; @@ -304,23 +299,23 @@ typedef void *ProtobufLogRef; // Support for heart rate typedef struct { - ActivityHeartRateData metrics; // ActivityMetrics for heart rate + ActivityHeartRateData metrics; // ActivityMetrics for heart rate - HRMSessionRef hrm_session; // The HRM session we use - ProtobufLogRef log_session; // The measurements log we send data to + HRMSessionRef hrm_session; // The HRM session we use + ProtobufLogRef log_session; // The measurements log we send data to - bool currently_sampling; // Are we activity sampling the HR - uint32_t toggled_sampling_at_ts; // When we last toggled our sampling rate - // (from time_get_uptime_seconds) + bool currently_sampling; // Are we activity sampling the HR + uint32_t toggled_sampling_at_ts; // When we last toggled our sampling rate + // (from time_get_uptime_seconds) - uint32_t last_sample_ts; // When we last received a HR sample - // (from time_get_uptime_seconds) + uint32_t last_sample_ts; // When we last received a HR sample + // (from time_get_uptime_seconds) uint16_t num_samples; // number of samples in the past minute uint16_t num_good_quality_samples; // number of samples in the past minute with good quality uint16_t num_excellent_samples; // number of samples in the past minute with excellent quality - uint8_t samples[ACTIVITY_MAX_HR_SAMPLES]; // HR Samples stored - uint8_t weights[ACTIVITY_MAX_HR_SAMPLES]; // HR Sample Weights + uint8_t samples[ACTIVITY_MAX_HR_SAMPLES]; // HR Samples stored + uint8_t weights[ACTIVITY_MAX_HR_SAMPLES]; // HR Sample Weights // Worn status from the most recent HRM BPM event. last_quality_event_utc is 0 if we've never // received one. Used by sleep tracking to suppress detection while the watch is off-wrist. @@ -373,9 +368,9 @@ typedef struct { int8_t update_settings_counter; // Captured activity sessions - uint16_t activity_sessions_count; // how many sessions we have captured + uint16_t activity_sessions_count; // how many sessions we have captured ActivitySession activity_sessions[ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT]; - bool need_activities_saved; // true if activities need to be persisted + bool need_activities_saved; // true if activities need to be persisted // Set to true when a new sleep session is registered bool sleep_sessions_modified; @@ -390,7 +385,7 @@ typedef struct { DataLoggingSession *activity_dls_session; // Variables used for detecting "significant activity" events - time_t activity_event_start_utc; // UTC of first active minute, 0 if none detected + time_t activity_event_start_utc; // UTC of first active minute, 0 if none detected // True if service has been enabled via services_set_runlevel. bool enabled_run_level; @@ -407,11 +402,11 @@ typedef struct { // Support for raw accel sample collection bool sample_collection_enabled; - uint16_t sample_collection_session_id; // raw sample collection session id - time_t sample_collection_seconds; // if enabled is true, the UTC when sample + uint16_t sample_collection_session_id; // raw sample collection session id + time_t sample_collection_seconds; // if enabled is true, the UTC when sample // collection started, else the # of seconds of // of data in recently ended session - uint16_t sample_collection_num_samples; // number of samples collected so far + uint16_t sample_collection_num_samples; // number of samples collected so far ActivitySampleCollectionData *sample_collection_data; // True if activity_start_tracking was called with test_mode = true @@ -485,7 +480,6 @@ void activity_sessions_prv_minute_handler(time_t utc_sec); //! Send an activity session to data logging void activity_sessions_prv_send_activity_session_to_data_logging(ActivitySession *session); - // --------------------------------------------------------------------------- // Activity Metrics diff --git a/include/pbl/services/activity/health_util.h b/include/pbl/services/activity/health_util.h index 9b19f7680c..d516e03809 100644 --- a/include/pbl/services/activity/health_util.h +++ b/include/pbl/services/activity/health_util.h @@ -86,7 +86,7 @@ void health_util_duration_to_hours_and_minutes_text_node(int duration_s, void *i //! @param[out] whole_part the whole part of the decimal representation //! @param[out] decimal_part the decimal part of the decimal representation void health_util_convert_fraction_to_whole_and_decimal_part(int numerator, int denominator, - int* whole_part, int *decimal_part); + int *whole_part, int *decimal_part); //! Formats a fraction into its whole and decimal parts, e.g. "42.3" //! @param[in,out] buffer the string buffer to write to diff --git a/include/pbl/services/activity/insights_settings.h b/include/pbl/services/activity/insights_settings.h index fe4b8d2325..3ef7582794 100644 --- a/include/pbl/services/activity/insights_settings.h +++ b/include/pbl/services/activity/insights_settings.h @@ -15,9 +15,9 @@ typedef struct PACKED ActivityRewardSettings { // Note: these parameters are the number of days in addition to 'today' that we want to look at - uint8_t min_days_data; //!< How many days of the metric's history we require - uint8_t continuous_min_days_data; //!< How many consecutive days of history we require - uint8_t target_qualifying_days; //!< Days that must be above target (on top of 'today') + uint8_t min_days_data; //!< How many days of the metric's history we require + uint8_t continuous_min_days_data; //!< How many consecutive days of history we require + uint8_t target_qualifying_days; //!< Days that must be above target (on top of 'today') uint16_t target_percent_of_median; //!< Percentage of median qualifying days must hit uint32_t notif_min_interval_seconds; //!< How often we allow this insight to be shown @@ -25,61 +25,61 @@ typedef struct PACKED ActivityRewardSettings { // Insight-specific values union { struct PACKED { - uint16_t trigger_after_wakeup_seconds; //!< Time we wait before showing sleep reward + uint16_t trigger_after_wakeup_seconds; //!< Time we wait before showing sleep reward } sleep; struct PACKED { - uint8_t trigger_active_minutes; //!< Time we must be currently active before showing reward - uint8_t trigger_steps_per_minute; //!< Steps per minute required for an 'active' minute + uint8_t trigger_active_minutes; //!< Time we must be currently active before showing reward + uint8_t trigger_steps_per_minute; //!< Steps per minute required for an 'active' minute } activity; }; } ActivityRewardSettings; typedef struct PACKED ActivitySummarySettings { - int8_t above_avg_threshold; //!< Values greater than this are counted as above avg - //!< In relation to 100% (eg 105% would be 5) - int8_t below_avg_threshold; //!< Values less than this are counted as above avg - //!< In relation to 100% (eg 93% would be -7) - int8_t fail_threshold; //!< Values less than this are counted as fail - //!< In relation to 100% (e.g. 55% would be -45) + int8_t above_avg_threshold; //!< Values greater than this are counted as above avg + //!< In relation to 100% (eg 105% would be 5) + int8_t below_avg_threshold; //!< Values less than this are counted as above avg + //!< In relation to 100% (eg 93% would be -7) + int8_t fail_threshold; //!< Values less than this are counted as fail + //!< In relation to 100% (e.g. 55% would be -45) union { struct PACKED { - uint16_t trigger_minute; //!< Minute of the day that we trigger the pin - uint16_t update_threshold_steps; //!< Step delta that will cause the pin to update - uint32_t update_max_interval_seconds; //!< Max time we'll go without updating the pin - bool show_notification; //!< Whether to show a notification - uint16_t max_fail_steps; //!< Don't show negative if walked more than X steps + uint16_t trigger_minute; //!< Minute of the day that we trigger the pin + uint16_t update_threshold_steps; //!< Step delta that will cause the pin to update + uint32_t update_max_interval_seconds; //!< Max time we'll go without updating the pin + bool show_notification; //!< Whether to show a notification + uint16_t max_fail_steps; //!< Don't show negative if walked more than X steps } activity; struct PACKED { - uint16_t max_fail_minutes; //!< Don't show negative if slept more than X minutes - uint16_t trigger_notif_seconds; //!< Time in seconds after wakeup to notify about sleep - uint16_t trigger_notif_activity; //!< Minimum amount of steps per minute to trigger the - //!< Sleep summary notification - uint8_t trigger_notif_active_minutes; //!< Minimum amount of active minutes to trigger the - //!< Sleep summary notification + uint16_t max_fail_minutes; //!< Don't show negative if slept more than X minutes + uint16_t trigger_notif_seconds; //!< Time in seconds after wakeup to notify about sleep + uint16_t trigger_notif_activity; //!< Minimum amount of steps per minute to trigger the + //!< Sleep summary notification + uint8_t trigger_notif_active_minutes; //!< Minimum amount of active minutes to trigger the + //!< Sleep summary notification } sleep; }; } ActivitySummarySettings; typedef struct PACKED ActivitySessionSettings { - bool show_notification; //!< Whether to show a notification + bool show_notification; //!< Whether to show a notification union { struct PACKED { - uint16_t trigger_elapsed_minutes; //!< Minimum length of a walk to be given an insight - uint16_t trigger_cooldown_minutes; //!< Minutes wait after end of session before notifying + uint16_t trigger_elapsed_minutes; //!< Minimum length of a walk to be given an insight + uint16_t trigger_cooldown_minutes; //!< Minutes wait after end of session before notifying } activity; }; } ActivitySessionSettings; typedef struct PACKED ActivityInsightSettings { // Common parameters - uint8_t version; //!< Current version of the struct - must be first + uint8_t version; //!< Current version of the struct - must be first - bool enabled; //!< Insight enabled - uint8_t unused; //!< Unused + bool enabled; //!< Insight enabled + uint8_t unused; //!< Unused union { ActivityRewardSettings reward; @@ -88,7 +88,6 @@ typedef struct PACKED ActivityInsightSettings { }; } ActivityInsightSettings; - //! Read a setting from the insights settings //! @param insight_name the name of the insight for which to get a setting //! @param[out] settings_out an ActivityInsightSettings struct to which the data will be written @@ -101,8 +100,7 @@ bool activity_insights_settings_read(const char *insight_name, //! @param insight_name the name of the insight for which to get a setting //! @param settings an ActivityInsightSettings struct which contains the data to be written //! @returns true if the setting was successfully saved -bool activity_insights_settings_write(const char *insight_name, - ActivityInsightSettings *settings); +bool activity_insights_settings_write(const char *insight_name, ActivityInsightSettings *settings); //! Get the current version of the insights settings //! @return the version number for the current insights settings diff --git a/include/pbl/services/activity/kraepelin/activity_algorithm_kraepelin.h b/include/pbl/services/activity/kraepelin/activity_algorithm_kraepelin.h index 1dcae8d7db..11211d935d 100644 --- a/include/pbl/services/activity/kraepelin/activity_algorithm_kraepelin.h +++ b/include/pbl/services/activity/kraepelin/activity_algorithm_kraepelin.h @@ -11,9 +11,9 @@ // Nap constraints, also used by unit tests // A sleep session in this range is always considered "primary" (not nap) sleep // ... if it ends after this minute in the evening -#define ALG_PRIMARY_EVENING_MINUTE (21 * MINUTES_PER_HOUR) // 9pm +#define ALG_PRIMARY_EVENING_MINUTE (21 * MINUTES_PER_HOUR) // 9pm // ... or starts before this minute in the morning -#define ALG_PRIMARY_MORNING_MINUTE (12 * MINUTES_PER_HOUR) // 12pm +#define ALG_PRIMARY_MORNING_MINUTE (12 * MINUTES_PER_HOUR) // 12pm // A sleep session outside of the primary range is considered a nap if it is less than // this duration, otherwise it is considered a primary sleep session @@ -22,4 +22,4 @@ // Max number of hours of past data we process to figure out sleep for "today". If a sleep // cycle *ends* after midnight today, then we still count it as today's sleep. That means the // start of the sleep cycle could have started more than 24 hours ago. -#define ALG_SLEEP_HISTORY_HOURS_FOR_TODAY 36 +#define ALG_SLEEP_HISTORY_HOURS_FOR_TODAY 36 diff --git a/include/pbl/services/activity/kraepelin/kraepelin_algorithm.h b/include/pbl/services/activity/kraepelin/kraepelin_algorithm.h index 33f3d3df91..1a09c6ef4b 100644 --- a/include/pbl/services/activity/kraepelin/kraepelin_algorithm.h +++ b/include/pbl/services/activity/kraepelin/kraepelin_algorithm.h @@ -3,7 +3,6 @@ #include #include "util/time/time.h" - // --------------------------------------------------------------------------------------------- // Equates // number of samples per second @@ -51,12 +50,12 @@ typedef enum { // Sleep stats, returned by kalg_get_sleep_stats typedef struct { - time_t sleep_start_utc; // start time of a recent sleep session. 0 if no session recently - // detected, where "recent" means within the last - // minimum_sleep_session_length minutes (currently 60). - uint16_t sleep_len_m; // how many minutes of that sleep are *certain*, 0 if none. - time_t uncertain_start_utc; // start time of the uncertain area of the sleep session, which - // always continues until the present time, 0 if none. + time_t sleep_start_utc; // start time of a recent sleep session. 0 if no session recently + // detected, where "recent" means within the last + // minimum_sleep_session_length minutes (currently 60). + uint16_t sleep_len_m; // how many minutes of that sleep are *certain*, 0 if none. + time_t uncertain_start_utc; // start time of the uncertain area of the sleep session, which + // always continues until the present time, 0 if none. } KAlgOngoingSleepStats; // Callback called by kalg_activities_update to register activity sessions. @@ -140,8 +139,8 @@ uint32_t kalg_analyze_finish_epoch(KAlgState *state); // @param[in] context passed to the sessions_cb void kalg_activities_update(KAlgState *state, time_t utc_now, uint16_t steps, uint16_t vmc, uint8_t orientation, bool definitely_not_worn, - uint32_t resting_calories, - uint32_t active_calories, uint32_t distance_mm, bool shutting_down, + uint32_t resting_calories, uint32_t active_calories, + uint32_t distance_mm, bool shutting_down, KAlgActivitySessionCallback sessions_cb, void *context); // Return the timestamp of the last minute that was processed for the given activity type diff --git a/include/pbl/services/alarms/alarm.h b/include/pbl/services/alarms/alarm.h index 8578ba5fe3..519f04363c 100644 --- a/include/pbl/services/alarms/alarm.h +++ b/include/pbl/services/alarms/alarm.h @@ -22,16 +22,16 @@ #define ALARMS_APP_HIGHLIGHT_COLOR PBL_IF_COLOR_ELSE(GColorJaegerGreen, GColorBlack) -typedef int AlarmId; //! A unique ID that can be used to refer to each configured alarm. +typedef int AlarmId; //! A unique ID that can be used to refer to each configured alarm. #define ALARM_INVALID_ID (-1) typedef enum AlarmKind { - ALARM_KIND_EVERYDAY = 0, // Alarms of this type will happen each day - ALARM_KIND_WEEKENDS, // Alarms of this type will happen Monday - Friday - ALARM_KIND_WEEKDAYS, // Alarms of this type happen Saturday and Sunday - ALARM_KIND_JUST_ONCE, // Alarms of this type will happen next time the specified time occurs - ALARM_KIND_CUSTOM, // Alarms of this type happen on specified days + ALARM_KIND_EVERYDAY = 0, // Alarms of this type will happen each day + ALARM_KIND_WEEKENDS, // Alarms of this type will happen Monday - Friday + ALARM_KIND_WEEKDAYS, // Alarms of this type happen Saturday and Sunday + ALARM_KIND_JUST_ONCE, // Alarms of this type will happen next time the specified time occurs + ALARM_KIND_CUSTOM, // Alarms of this type happen on specified days } AlarmKind; typedef enum AlarmType { @@ -49,16 +49,16 @@ typedef enum AlarmTone { } AlarmTone; typedef struct AlarmInfo { - int hour; //= 1) --- int16_t location_utc_offset_min; // location's timezone, minutes EAST of UTC (e.g. Tokyo // +540, New York DST -240); INT16_MIN if unknown. Lets the // watch show the LOCATION's local sunset/hourly times for // saved cities instead of watch-local ones. - WeatherDBDailyMetrics daily_metrics[WEATHER_DB_MAX_FORECAST_DAYS]; // parallel to daily[] + WeatherDBDailyMetrics daily_metrics[WEATHER_DB_MAX_FORECAST_DAYS]; // parallel to daily[] // --- v4 minor 2 additions (appended; present only when minor_version >= 2) --- // Today's raw warning readings for the weather report's alert line. Open-Meteo // sources: daily weather_code; hourly // relative_humidity_2m (daily mean); hourly visibility (daily MINIMUM, meters); // daily precipitation_sum (whole mm). - uint8_t today_wmo_code; // WMO weather code; 0xFF if unknown - uint8_t today_humidity_pct; // relative humidity 0..100 %; 0xFF if unknown - uint16_t today_visibility_m; // minimum visibility, meters (clamp 65534); 0xFFFF if unknown - uint16_t today_precip_sum_mm; // total precipitation, whole mm (clamp 65534); 0xFFFF if unknown + uint8_t today_wmo_code; // WMO weather code; 0xFF if unknown + uint8_t today_humidity_pct; // relative humidity 0..100 %; 0xFF if unknown + uint16_t today_visibility_m; // minimum visibility, meters (clamp 65534); 0xFFFF if unknown + uint16_t today_precip_sum_mm; // total precipitation, whole mm (clamp 65534); 0xFFFF if unknown // Per-day feels-like, parallel to daily[] (Open-Meteo daily apparent_temperature_max); // WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP if unknown. int16_t daily_feels_like[WEATHER_DB_MAX_FORECAST_DAYS]; @@ -161,9 +161,9 @@ typedef struct PACKED { // The clock dial shows the next 12 hours, so from early afternoon it crosses // midnight — these give its post-midnight positions real data. Open-Meteo: // hourly weather_code + temperature_2m for tomorrow's 24 slots. - uint8_t tomorrow_hourly_count; // 0 or WEATHER_DB_HOURLY_COUNT - uint8_t tomorrow_hourly_weather_type[WEATHER_DB_HOURLY_COUNT]; // WeatherType, 255 unknown - int8_t tomorrow_hourly_temp[WEATHER_DB_HOURLY_COUNT]; // temp per hour 0-23 + uint8_t tomorrow_hourly_count; // 0 or WEATHER_DB_HOURLY_COUNT + uint8_t tomorrow_hourly_weather_type[WEATHER_DB_HOURLY_COUNT]; // WeatherType, 255 unknown + int8_t tomorrow_hourly_temp[WEATHER_DB_HOURLY_COUNT]; // temp per hour 0-23 // --- variable-length trailing strings (MUST stay last) --- SerializedArray pstring16s; @@ -192,9 +192,9 @@ typedef enum WeatherDbStringIndex { // Smallest acceptable record is a legacy v3 record (smaller fixed prefix). #define MIN_ENTRY_SIZE (sizeof(WeatherDBEntryV3)) -#define MAX_ENTRY_SIZE (sizeof(WeatherDBEntry) + \ - WEATHER_SERVICE_MAX_WEATHER_LOCATION_BUFFER_SIZE + \ - WEATHER_SERVICE_MAX_SHORT_PHRASE_BUFFER_SIZE) +#define MAX_ENTRY_SIZE \ + (sizeof(WeatherDBEntry) + WEATHER_SERVICE_MAX_WEATHER_LOCATION_BUFFER_SIZE + \ + WEATHER_SERVICE_MAX_SHORT_PHRASE_BUFFER_SIZE) //! @return true if the firmware can parse a record stamped with this major version. static inline bool weather_db_version_is_supported(uint8_t version) { @@ -222,11 +222,16 @@ static inline size_t weather_db_entry_strings_offset(uint8_t version, uint8_t mi if (version < WEATHER_DB_CURRENT_VERSION) { return offsetof(WeatherDBEntryV3, pstring16s); } - if (minor_version >= 5) return offsetof(WeatherDBEntry, pstring16s); - if (minor_version >= 4) return WEATHER_DB_V4_4_FIXED_SIZE; - if (minor_version >= 3) return WEATHER_DB_V4_3_FIXED_SIZE; - if (minor_version >= 2) return WEATHER_DB_V4_2_FIXED_SIZE; - if (minor_version >= 1) return WEATHER_DB_V4_1_FIXED_SIZE; + if (minor_version >= 5) + return offsetof(WeatherDBEntry, pstring16s); + if (minor_version >= 4) + return WEATHER_DB_V4_4_FIXED_SIZE; + if (minor_version >= 3) + return WEATHER_DB_V4_3_FIXED_SIZE; + if (minor_version >= 2) + return WEATHER_DB_V4_2_FIXED_SIZE; + if (minor_version >= 1) + return WEATHER_DB_V4_1_FIXED_SIZE; return WEATHER_DB_V4_0_FIXED_SIZE; } @@ -234,8 +239,7 @@ static inline size_t weather_db_entry_strings_offset(uint8_t version, uint8_t mi //! record's version + minor. Use this instead of &entry->pstring16s so v3 and //! minor-0 records still resolve their strings after fields were appended. static inline SerializedArray *weather_db_entry_get_strings(WeatherDBEntry *entry) { - const uint8_t minor = - (entry->version >= WEATHER_DB_CURRENT_VERSION) ? entry->minor_version : 0; + const uint8_t minor = (entry->version >= WEATHER_DB_CURRENT_VERSION) ? entry->minor_version : 0; return (SerializedArray *)((uint8_t *)entry + weather_db_entry_strings_offset(entry->version, minor)); } diff --git a/include/pbl/services/bluetooth/bluetooth_persistent_storage.h b/include/pbl/services/bluetooth/bluetooth_persistent_storage.h index 4acc96a3c5..2bf2d8d89e 100644 --- a/include/pbl/services/bluetooth/bluetooth_persistent_storage.h +++ b/include/pbl/services/bluetooth/bluetooth_persistent_storage.h @@ -27,13 +27,12 @@ typedef enum { BtPersistBondingNumTypes } BtPersistBondingType; - //! Signature of function that handles changes in the pairing database typedef void (*BtPersistBondingChangeHandler)(BTBondingID affected_bonding, BtPersistBondingOp operation); typedef void (*BtPersistBondingDBEachBLE)(BTDeviceInternal *device, SMIdentityResolvingKey *irk, - const char *name, BTBondingID *id, void *context); + const char *name, BTBondingID *id, void *context); /////////////////////////////////////////////////////////////////////////////////////////////////// //! BLE Pairing Info @@ -46,8 +45,7 @@ bool bt_persistent_storage_get_ble_pinned_address(BTDeviceAddress *address_out); BTBondingID bt_persistent_storage_store_ble_pairing(const SMPairingInfo *pairing_info, bool is_gateway, const char *device_name, - bool requires_address_pinning, - uint8_t flags); + bool requires_address_pinning, uint8_t flags); bool bt_persistent_storage_update_ble_device_name(BTBondingID bonding, const char *device_name); @@ -57,8 +55,7 @@ void bt_persistent_storage_delete_ble_pairing_by_addr(const BTDeviceInternal *de bool bt_persistent_storage_get_ble_pairing_by_id(BTBondingID bonding, SMIdentityResolvingKey *IRK_out, - BTDeviceInternal *device_out, - char *name_out); + BTDeviceInternal *device_out, char *name_out); bool bt_persistent_storage_get_ble_pairing_by_addr(const BTDeviceInternal *device, SMIdentityResolvingKey *IRK_out, @@ -160,5 +157,5 @@ void bt_persistent_storage_delete_all_pairings(void); /////////////////////////////////////////////////////////////////////////////////////////////////// //! Unit testing -int bt_persistent_storage_get_raw_data(const void *key, size_t key_len, - void *data_out, size_t buf_len); +int bt_persistent_storage_get_raw_data(const void *key, size_t key_len, void *data_out, + size_t buf_len); diff --git a/include/pbl/services/bluetooth/bluetooth_persistent_storage_debug.h b/include/pbl/services/bluetooth/bluetooth_persistent_storage_debug.h index 72b24f965c..1793081d42 100644 --- a/include/pbl/services/bluetooth/bluetooth_persistent_storage_debug.h +++ b/include/pbl/services/bluetooth/bluetooth_persistent_storage_debug.h @@ -9,11 +9,13 @@ #define DISPLAY_BUF_LEN 160 -void bluetooth_persistent_storage_debug_dump_ble_pairing_info( - char *display_buf, const SMPairingInfo *info); +void bluetooth_persistent_storage_debug_dump_ble_pairing_info(char *display_buf, + const SMPairingInfo *info); -void bluetooth_persistent_storage_debug_dump_classic_pairing_info( - char *display_buf, BTDeviceAddress *addr, char *device_name, SM128BitKey *link_key, - uint8_t platform_bits); +void bluetooth_persistent_storage_debug_dump_classic_pairing_info(char *display_buf, + BTDeviceAddress *addr, + char *device_name, + SM128BitKey *link_key, + uint8_t platform_bits); void bluetooth_persistent_storage_debug_dump_root_keys(SM128BitKey *irk, SM128BitKey *erk); diff --git a/include/pbl/services/bluetooth/bluetooth_persistent_storage_v2_impl.h b/include/pbl/services/bluetooth/bluetooth_persistent_storage_v2_impl.h index 3c1e635e00..ee70b7c0a6 100644 --- a/include/pbl/services/bluetooth/bluetooth_persistent_storage_v2_impl.h +++ b/include/pbl/services/bluetooth/bluetooth_persistent_storage_v2_impl.h @@ -26,67 +26,71 @@ typedef struct PACKED BtPersistLEPairingInfo { SMConnectionSignatureResolvingKey csrk; //! True if local_encryption_info is valid - bool is_local_encryption_info_valid:1; + bool is_local_encryption_info_valid : 1; //! True if remote_encryption_info is valid - bool is_remote_encryption_info_valid:1; + bool is_remote_encryption_info_valid : 1; //! True if irk and identity are valid - bool is_remote_identity_info_valid:1; + bool is_remote_identity_info_valid : 1; //! True if csrk is valid - bool is_remote_signing_info_valid:1; + bool is_remote_signing_info_valid : 1; //! True if Man-in-the-middle protection was enabled during the pairing process. - bool is_mitm_protection_enabled:1; + bool is_mitm_protection_enabled : 1; - uint8_t rsvd:3; + uint8_t rsvd : 3; } BtPersistLEPairingInfo; static void bt_persistent_storage_assign_persist_pairing_info(BtPersistLEPairingInfo *out, const SMPairingInfo *in) { - *out = (BtPersistLEPairingInfo) { - .local_encryption_info = { - .ltk = in->local_encryption_info.ltk, - .rand = in->local_encryption_info.rand, - .ediv = in->local_encryption_info.ediv, - }, - .remote_encryption_info = { - .ltk = in->remote_encryption_info.ltk, - .rand = in->remote_encryption_info.rand, - .ediv = in->remote_encryption_info.ediv, - }, - .irk = in->irk, - .identity = in->identity, - .csrk = in->csrk, - .is_local_encryption_info_valid = in->is_local_encryption_info_valid, - .is_remote_encryption_info_valid = in->is_remote_encryption_info_valid, - .is_remote_identity_info_valid = in->is_remote_identity_info_valid, - .is_remote_signing_info_valid = in->is_remote_signing_info_valid, - .is_mitm_protection_enabled = in->is_mitm_protection_enabled, + *out = (BtPersistLEPairingInfo){ + .local_encryption_info = + { + .ltk = in->local_encryption_info.ltk, + .rand = in->local_encryption_info.rand, + .ediv = in->local_encryption_info.ediv, + }, + .remote_encryption_info = + { + .ltk = in->remote_encryption_info.ltk, + .rand = in->remote_encryption_info.rand, + .ediv = in->remote_encryption_info.ediv, + }, + .irk = in->irk, + .identity = in->identity, + .csrk = in->csrk, + .is_local_encryption_info_valid = in->is_local_encryption_info_valid, + .is_remote_encryption_info_valid = in->is_remote_encryption_info_valid, + .is_remote_identity_info_valid = in->is_remote_identity_info_valid, + .is_remote_signing_info_valid = in->is_remote_signing_info_valid, + .is_mitm_protection_enabled = in->is_mitm_protection_enabled, }; } static void bt_persistent_storage_assign_sm_pairing_info(SMPairingInfo *out, const BtPersistLEPairingInfo *in) { - *out = (SMPairingInfo) { - .local_encryption_info = { - .ltk = in->local_encryption_info.ltk, - .rand = in->local_encryption_info.rand, - .ediv = in->local_encryption_info.ediv, - }, - .remote_encryption_info = { - .ltk = in->remote_encryption_info.ltk, - .rand = in->remote_encryption_info.rand, - .ediv = in->remote_encryption_info.ediv, - }, - .irk = in->irk, - .identity = in->identity, - .csrk = in->csrk, - .is_local_encryption_info_valid = in->is_local_encryption_info_valid, - .is_remote_encryption_info_valid = in->is_remote_encryption_info_valid, - .is_remote_identity_info_valid = in->is_remote_identity_info_valid, - .is_remote_signing_info_valid = in->is_remote_signing_info_valid, - .is_mitm_protection_enabled = in->is_mitm_protection_enabled, + *out = (SMPairingInfo){ + .local_encryption_info = + { + .ltk = in->local_encryption_info.ltk, + .rand = in->local_encryption_info.rand, + .ediv = in->local_encryption_info.ediv, + }, + .remote_encryption_info = + { + .ltk = in->remote_encryption_info.ltk, + .rand = in->remote_encryption_info.rand, + .ediv = in->remote_encryption_info.ediv, + }, + .irk = in->irk, + .identity = in->identity, + .csrk = in->csrk, + .is_local_encryption_info_valid = in->is_local_encryption_info_valid, + .is_remote_encryption_info_valid = in->is_remote_encryption_info_valid, + .is_remote_identity_info_valid = in->is_remote_identity_info_valid, + .is_remote_signing_info_valid = in->is_remote_signing_info_valid, + .is_mitm_protection_enabled = in->is_mitm_protection_enabled, }; } diff --git a/include/pbl/services/bluetooth/pp_ble_control.h b/include/pbl/services/bluetooth/pp_ble_control.h index 55bb536806..cf2f5fb2ba 100644 --- a/include/pbl/services/bluetooth/pp_ble_control.h +++ b/include/pbl/services/bluetooth/pp_ble_control.h @@ -5,6 +5,5 @@ #include "pbl/services/comm_session/session.h" -void pp_ble_control_protocol_msg_callback(CommSession* session, - const uint8_t *data, +void pp_ble_control_protocol_msg_callback(CommSession *session, const uint8_t *data, unsigned int length); diff --git a/include/pbl/services/clock.h b/include/pbl/services/clock.h index 4b243abe31..01c0f1674b 100644 --- a/include/pbl/services/clock.h +++ b/include/pbl/services/clock.h @@ -51,7 +51,7 @@ void clock_hourly_chime_arm(void); #endif //! @internal -void clock_get_time_tm(struct tm* time_tm); +void clock_get_time_tm(struct tm *time_tm); //! @internal //! @param add_space whether to add a space between the time and AM/PM @@ -61,9 +61,8 @@ size_t clock_format_time(char *buffer, uint8_t size, int16_t hours, int16_t minu //! Same as \ref clock_copy_time_string, but with a supplied timestamp size_t clock_copy_time_string_timestamp(char *buffer, uint8_t size, time_t timestamp); -//! Copies a time string into the buffer, formatted according to the user's time display preferences (such as 12h/24h -//! time). -//! Example results: "7:30" or "15:00". +//! Copies a time string into the buffer, formatted according to the user's time display preferences +//! (such as 12h/24h time). Example results: "7:30" or "15:00". //! @note AM/PM are also outputted with the time if the user's preference is 12h time. //! @param[out] buffer A pointer to the buffer to copy the time string into //! @param size The maximum size of buffer @@ -80,8 +79,8 @@ size_t clock_get_time_word(char *buffer, size_t buffer_size, time_t timestamp); //! Get the relative time string of an event, e.g. "10 min. ago", with "10" and " min ago" //! copied into separate buffers so they can be rendered in different fonts void clock_get_event_relative_time_string(char *number_buffer, int number_buffer_size, - char *word_buffer, int word_buffer_size, time_t timestamp, uint16_t duration, - time_t current_day, bool all_day); + char *word_buffer, int word_buffer_size, time_t timestamp, + uint16_t duration, time_t current_day, bool all_day); //! Gets the user's 12/24h clock style preference. //! @return `true` if the user prefers 24h-style time display or `false` if the @@ -176,8 +175,7 @@ void clock_get_since_time(char *buffer, int buf_size, time_t timestamp); //! @param buf_size size of the buffer //! @param timestamp timestamp to get a friendly time for //! @param max_relative_hrs how many hours for which it should show "IN X HOURS" -void clock_get_until_time(char *buffer, int buf_size, time_t timestamp, - int max_relative_hrs); +void clock_get_until_time(char *buffer, int buf_size, time_t timestamp, int max_relative_hrs); //! Get a friendly "time to" out of a timestamp, without ever writing the real time //! @param buffer buffer to output the friendly time into @@ -185,7 +183,7 @@ void clock_get_until_time(char *buffer, int buf_size, time_t timestamp, //! @param timestamp timestamp to get a friendly time for //! @param max_relative_hrs how many hours for which it should show "IN X HOURS" void clock_get_until_time_without_fulltime(char *buffer, int buf_size, time_t timestamp, - int max_relative_hrs); + int max_relative_hrs); //! Get the date in MM/DD format size_t clock_get_date(char *buffer, int buf_size, time_t timestamp); diff --git a/include/pbl/services/comm_session/session.h b/include/pbl/services/comm_session/session.h index b081d5fc77..d60d9ec217 100644 --- a/include/pbl/services/comm_session/session.h +++ b/include/pbl/services/comm_session/session.h @@ -51,7 +51,7 @@ typedef enum { CommSessionOutOfRange } CommSessionCapability; -#define COMM_SESSION_DEFAULT_TIMEOUT (4000) +#define COMM_SESSION_DEFAULT_TIMEOUT (4000) //! @return whether the specified capability is supported by the session provided bool comm_session_has_capability(CommSession *session, CommSessionCapability capability); @@ -108,15 +108,16 @@ void comm_session_reset(CommSession *session); //! @param endpoint_id Which endpoint to send the pebble protocol message to. //! @param data Pointer to the buffer with data to send //! @param length The length of the data -//! @param timeout_ms The duration for how long the call is allowed to block. If the send buffer does -//! not have enough space available to enqueue the data, this function will block up to timeout_ms. +//! @param timeout_ms The duration for how long the call is allowed to block. If the send buffer +//! does not have enough space available to enqueue the data, this function will block up to +//! timeout_ms. //! @return true if the data was successfully queued up for sending. -bool comm_session_send_data(CommSession *session, uint16_t endpoint_id, - const uint8_t *data, size_t length, uint32_t timeout_ms); +bool comm_session_send_data(CommSession *session, uint16_t endpoint_id, const uint8_t *data, + size_t length, uint32_t timeout_ms); //! See bt_conn_mgr.h for more details on the parameters -void comm_session_set_responsiveness( - CommSession *session, BtConsumer consumer, ResponseTimeState state, uint16_t max_period_secs); +void comm_session_set_responsiveness(CommSession *session, BtConsumer consumer, + ResponseTimeState state, uint16_t max_period_secs); //! See bt_conn_mgr.h for more details on the parameters void comm_session_set_responsiveness_ext(CommSession *session, BtConsumer consumer, diff --git a/include/pbl/services/comm_session/session_receive_router.h b/include/pbl/services/comm_session/session_receive_router.h index 56054d8796..63bdc3d409 100644 --- a/include/pbl/services/comm_session/session_receive_router.h +++ b/include/pbl/services/comm_session/session_receive_router.h @@ -16,7 +16,7 @@ typedef void (*PebbleProtocolEndpointHandler)(CommSession *session, const uint8_ size_t length); typedef enum { - PebbleProtocolAccessPublic = 1 << 0, // reserved for 3rd party phone apps + PebbleProtocolAccessPublic = 1 << 0, // reserved for 3rd party phone apps PebbleProtocolAccessPrivate = 1 << 1, // reserved for Pebble phone app PebbleProtocolAccessAny = ~0, // anyone is allowed PebbleProtocolAccessNone = 0, @@ -42,7 +42,6 @@ typedef struct PebbleProtocolEndpoint { //! @see ReceiverImplementation typedef struct Receiver Receiver; - //! A ReceiverImplementation is responsible for creating a Receiver context (see "prepare"), //! buffering inbound message payload data (see "write") and finally scheduling the execution of //! the endpoint handler (see "finish"). @@ -61,8 +60,8 @@ typedef struct ReceiverImplementation { //! returned to drop/ignore the message. //! @param receiver_opt Optional per-endpoint configuration for the receiver, assigned through //! protocol_endpoints_table.json. - Receiver * (*prepare)(CommSession *session, const PebbleProtocolEndpoint *endpoint, - size_t total_payload_length); + Receiver *(*prepare)(CommSession *session, const PebbleProtocolEndpoint *endpoint, + size_t total_payload_length); //! Writes payload data of the current message to the Receiver context. void (*write)(Receiver *receiver, const uint8_t *data, size_t length); @@ -77,7 +76,6 @@ typedef struct ReceiverImplementation { void (*cleanup)(Receiver *receiver); } ReceiverImplementation; - //! ReceiveRouter contains the state associated with parsing the Pebble Protocol header. //! This module will call the ReceiverImplementation to buffer and process the message payload. typedef struct ReceiveRouter { diff --git a/include/pbl/services/comm_session/session_remote_os.h b/include/pbl/services/comm_session/session_remote_os.h index b35c2d10ee..4bf7f4495b 100644 --- a/include/pbl/services/comm_session/session_remote_os.h +++ b/include/pbl/services/comm_session/session_remote_os.h @@ -4,7 +4,7 @@ #pragma once typedef enum { - RemoteBitmaskOS = 0x7, // bits 0 - 2 + RemoteBitmaskOS = 0x7, // bits 0 - 2 } RemoteBitmask; typedef enum { diff --git a/include/pbl/services/comm_session/session_remote_version.h b/include/pbl/services/comm_session/session_remote_version.h index 388d038406..c26a471193 100644 --- a/include/pbl/services/comm_session/session_remote_version.h +++ b/include/pbl/services/comm_session/session_remote_version.h @@ -15,30 +15,31 @@ typedef struct CommSession CommSession; typedef struct PACKED { union { struct PACKED { - bool run_state_support:1; - bool infinite_log_dumping_support:1; - bool extended_music_service:1; - bool extended_notification_service:1; - bool lang_pack_support:1; - bool app_message_8k_support:1; - bool activity_insights_support:1; - bool voice_api_support:1; - bool send_text_support:1; - bool notification_filtering_support:1; - bool unread_coredump_support:1; - bool weather_app_support:1; - bool reminders_app_support:1; - bool workout_app_support:1; - bool smooth_fw_install_progress_support:1; - bool custom_vibe_pattern_support:1; - uint8_t javascript_bytecode_version_appended: 1; - bool imaging_support:1; // Phone serves images (album art, ...) via the imaging endpoint - bool notification_image_support:1; // Watch renders AttributeIdImageAspectRatio notifications - uint8_t more_padded_bits:2; - bool continue_fw_install_across_disconnect_support: 1; - bool blob_db_version_support: 1; - bool settings_sync_support: 1; // Phone supports Settings BlobDB sync - bool weather_db_v4_support: 1; // Phone writes the v4 weather BlobDB record (rich forecast) + bool run_state_support : 1; + bool infinite_log_dumping_support : 1; + bool extended_music_service : 1; + bool extended_notification_service : 1; + bool lang_pack_support : 1; + bool app_message_8k_support : 1; + bool activity_insights_support : 1; + bool voice_api_support : 1; + bool send_text_support : 1; + bool notification_filtering_support : 1; + bool unread_coredump_support : 1; + bool weather_app_support : 1; + bool reminders_app_support : 1; + bool workout_app_support : 1; + bool smooth_fw_install_progress_support : 1; + bool custom_vibe_pattern_support : 1; + uint8_t javascript_bytecode_version_appended : 1; + bool imaging_support : 1; // Phone serves images (album art, ...) via the imaging endpoint + bool notification_image_support + : 1; // Watch renders AttributeIdImageAspectRatio notifications + uint8_t more_padded_bits : 2; + bool continue_fw_install_across_disconnect_support : 1; + bool blob_db_version_support : 1; + bool settings_sync_support : 1; // Phone supports Settings BlobDB sync + bool weather_db_v4_support : 1; // Phone writes the v4 weather BlobDB record (rich forecast) }; uint64_t flags; }; diff --git a/include/pbl/services/comm_session/session_send_buffer.h b/include/pbl/services/comm_session/session_send_buffer.h index 30cadb7597..2ba3e67ab5 100644 --- a/include/pbl/services/comm_session/session_send_buffer.h +++ b/include/pbl/services/comm_session/session_send_buffer.h @@ -26,9 +26,8 @@ size_t comm_session_send_buffer_get_max_payload_length(const CommSession *sessio //! @param timeout_ms The maximum duration to wait for the send buffer to become available with the //! required number of bytes of free space. //! @return True if the "writer access" was successfully acquired, false otherwise. -SendBuffer * comm_session_send_buffer_begin_write(CommSession *session, uint16_t endpoint_id, - size_t required_free_length, - uint32_t timeout_ms); +SendBuffer *comm_session_send_buffer_begin_write(CommSession *session, uint16_t endpoint_id, + size_t required_free_length, uint32_t timeout_ms); //! Copies data into the send buffer of the session. //! @note The caller must have called comm_session_send_buffer_begin_write() first. diff --git a/include/pbl/services/comm_session/session_send_queue.h b/include/pbl/services/comm_session/session_send_queue.h index b38895c0f4..a21eef84e9 100644 --- a/include/pbl/services/comm_session/session_send_queue.h +++ b/include/pbl/services/comm_session/session_send_queue.h @@ -21,8 +21,8 @@ typedef struct { //! @param[out] data_out Pointer to the buffer into which to copy the data //! @return The number of bytes copied //! @note The caller will ensure there is enough data available. - size_t (*copy)(const SessionSendQueueJob *send_job, int start_offset, - size_t length, uint8_t *data_out); + size_t (*copy)(const SessionSendQueueJob *send_job, int start_offset, size_t length, + uint8_t *data_out); //! Gets a read pointer and the number of bytes that can be read from the read pointer. //! @note The implementation might use a non-contiguous buffer, so it is possible @@ -30,8 +30,7 @@ typedef struct { //! and consume() repeatedly until it returns zero. //! @param data_out Pointer to the pointer to assign the read pointer to. //! @return The number of bytes that can be read starting at the read pointer. - size_t (*get_read_pointer)(const SessionSendQueueJob *send_job, - const uint8_t **data_out); + size_t (*get_read_pointer)(const SessionSendQueueJob *send_job, const uint8_t **data_out); //! Indicates that `length` bytes have been consumed and sent out by the transport. void (*consume)(const SessionSendQueueJob *send_job, size_t length); diff --git a/include/pbl/services/comm_session/session_transport.h b/include/pbl/services/comm_session/session_transport.h index 5b919a3a30..ab7e15fb8f 100644 --- a/include/pbl/services/comm_session/session_transport.h +++ b/include/pbl/services/comm_session/session_transport.h @@ -28,8 +28,7 @@ typedef void (*TransportReset)(Transport *transport); //! Pointer to function which calls the appropriate connection speed API //! exported by bt_conn_mgr -typedef void (*TransportSetConnectionResponsiveness)(Transport *transport, - BtConsumer consumer, +typedef void (*TransportSetConnectionResponsiveness)(Transport *transport, BtConsumer consumer, ResponseTimeState state, uint16_t max_period_secs, ResponsivenessGrantedHandler granted_handler); @@ -93,8 +92,8 @@ typedef enum TransportDestination { //! party app, or both (see \ref TransportDestination). //! @return True if the session was opened successfully, false if not //! bt_lock() is expected to be taken by the caller! -CommSession * comm_session_open(Transport *transport, const TransportImplementation *implementation, - TransportDestination destination); +CommSession *comm_session_open(Transport *transport, const TransportImplementation *implementation, + TransportDestination destination); //! Called by the transport to indicate that the session associated with the given transport needs //! to be closed and cleaned up. @@ -108,8 +107,7 @@ void comm_session_close(CommSession *session, CommSessionCloseReason reason); //! Called by the transport to copy received data from a given buffer into the receive buffer. //! @note bt_lock() is expected to be taken by the caller! -void comm_session_receive_router_write(CommSession *session, - const uint8_t *data, size_t data_size); +void comm_session_receive_router_write(CommSession *session, const uint8_t *data, size_t data_size); // ------------------------------------------------------------------------------------------------- // Sending @@ -128,8 +126,8 @@ size_t comm_session_send_queue_get_length(const CommSession *session); //! @note The caller must ensure there is enough data available, for example by getting the length //! by calling comm_session_send_queue_get_length(). //! @note bt_lock() is expected to be taken by the caller! -size_t comm_session_send_queue_copy(CommSession *session, uint32_t start_offset, - size_t length, uint8_t *data_out); +size_t comm_session_send_queue_copy(CommSession *session, uint32_t start_offset, size_t length, + uint8_t *data_out); //! Gets a read pointer and the number of bytes that can be read from the read pointer. //! @note Internally, a non-contiguous buffer is used, so it is possible that there is more data diff --git a/include/pbl/services/compositor/compositor.h b/include/pbl/services/compositor/compositor.h index a73eead5a5..f48699d513 100644 --- a/include/pbl/services/compositor/compositor.h +++ b/include/pbl/services/compositor/compositor.h @@ -50,7 +50,7 @@ typedef void (*CompositorTransitionInitFunc)(Animation *animation); // TODO: PBL-31460 Change compositor transitions to use AnimationProgress // This would enable time-based bounce back transitions typedef void (*CompositorTransitionUpdateFunc)(GContext *ctx, Animation *animation, - uint32_t distance_normalized); + uint32_t distance_normalized); typedef void (*CompositorTransitionTeardownFunc)(Animation *animation); @@ -98,7 +98,7 @@ void compositor_modal_render_ready(void); //! The app needs to copy its framebuffer to the display. void compositor_app_render_ready(void); -FrameBuffer* compositor_get_framebuffer(void); +FrameBuffer *compositor_get_framebuffer(void); GBitmap compositor_get_framebuffer_as_bitmap(void); @@ -125,10 +125,13 @@ void compositor_unfreeze(void); //! Copy app FB into the given region of the system framebuffer, scaling or centering the app //! framebuffer content in the destination as needed based on user preference. -//! If the update_rect points off the edge of the screen, the region updated will be clipped as needed. -//! If copy_relative_to_origin is false, update_rect will be copied/filled starting from the origin of the -//! app framebuffer. If true, it is relative to the region being updated will be copied/filled. +//! If the update_rect points off the edge of the screen, the region updated will be clipped as +//! needed. If copy_relative_to_origin is false, update_rect will be copied/filled starting from the +//! origin of the app framebuffer. If true, it is relative to the region being updated will be +//! copied/filled. void compositor_scaled_app_fb_copy(const GRect update_rect, bool copy_relative_to_origin); -//! Extended version of compositor_scaled_app_fb_copy which allows an Y offset for the source to be specified. -void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_relative_to_origin, int16_t offset_y); +//! Extended version of compositor_scaled_app_fb_copy which allows an Y offset for the source to be +//! specified. +void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_relative_to_origin, + int16_t offset_y); diff --git a/include/pbl/services/compositor/compositor_private.h b/include/pbl/services/compositor/compositor_private.h index 73daf2be27..e3bebeb6f9 100644 --- a/include/pbl/services/compositor/compositor_private.h +++ b/include/pbl/services/compositor/compositor_private.h @@ -16,7 +16,6 @@ void compositor_render_app(void); void compositor_render_modal(void); //! A GPathDrawFilledCallback that can be used to fill pixels with the app's framebuffer -void compositor_app_framebuffer_fill_callback(GContext *ctx, int16_t y, - Fixed_S16_3 x_range_begin, Fixed_S16_3 x_range_end, - Fixed_S16_3 delta_begin, Fixed_S16_3 delta_end, - void *user_data); +void compositor_app_framebuffer_fill_callback(GContext *ctx, int16_t y, Fixed_S16_3 x_range_begin, + Fixed_S16_3 x_range_end, Fixed_S16_3 delta_begin, + Fixed_S16_3 delta_end, void *user_data); diff --git a/include/pbl/services/compositor/compositor_transitions.h b/include/pbl/services/compositor/compositor_transitions.h index 694e0bcdb9..62db9b76ab 100644 --- a/include/pbl/services/compositor/compositor_transitions.h +++ b/include/pbl/services/compositor/compositor_transitions.h @@ -8,11 +8,11 @@ #include "default/compositor_slide_transitions.h" #include "default/compositor_shutter_transitions.h" #if CONFIG_SCREEN_COLOR_DEPTH_BITS == 1 -# include "legacy/compositor_modal_slide_transitions.h" +#include "legacy/compositor_modal_slide_transitions.h" #else -# include "default/compositor_modal_transitions.h" -# include "default/compositor_port_hole_transitions.h" -# include "default/compositor_round_flip_transitions.h" +#include "default/compositor_modal_transitions.h" +#include "default/compositor_port_hole_transitions.h" +#include "default/compositor_round_flip_transitions.h" #endif #include "default/compositor_peek_transitions.h" @@ -39,10 +39,11 @@ AnimationProgress animation_timing_scaled(AnimationProgress time_normalized, //! (e.g. flip/flop animations need to draw the right color beyond the edges of the app face) //! @param inner If true, draw the app frame buffer inside the ring, otherwise outside //! @param framebuffer_offset Visual offset of the app frame buffer -void compositor_transition_pdcs_animation_update( - GContext *ctx, GDrawCommandSequence *sequence, uint32_t distance_normalized, - GColor chroma_key_color, GColor stroke_color, GColor overdraw_color, bool inner, - const GPoint *framebuffer_offset); +void compositor_transition_pdcs_animation_update(GContext *ctx, GDrawCommandSequence *sequence, + uint32_t distance_normalized, + GColor chroma_key_color, GColor stroke_color, + GColor overdraw_color, bool inner, + const GPoint *framebuffer_offset); //! Draw implementation that can be used to fill lines with the contents of the app framebuffer extern const GDrawRawImplementation g_compositor_transitions_app_fb_draw_implementation; diff --git a/include/pbl/services/compositor/default/compositor_dot_transitions.h b/include/pbl/services/compositor/default/compositor_dot_transitions.h index d1ac4e244a..47cd7661e1 100644 --- a/include/pbl/services/compositor/default/compositor_dot_transitions.h +++ b/include/pbl/services/compositor/default/compositor_dot_transitions.h @@ -14,7 +14,7 @@ void compositor_dot_transitions_collapsing_ring_animation_update(GContext *ctx, GColor outer_ring_color, GColor inner_ring_color); -const CompositorTransition* compositor_dot_transition_timeline_get(bool timeline_is_future, +const CompositorTransition *compositor_dot_transition_timeline_get(bool timeline_is_future, bool timeline_is_destination); -const CompositorTransition* compositor_dot_transition_app_fetch_get(void); +const CompositorTransition *compositor_dot_transition_app_fetch_get(void); diff --git a/include/pbl/services/compositor/default/compositor_modal_transitions.h b/include/pbl/services/compositor/default/compositor_modal_transitions.h index ca2dd3536b..cb4ec8dff0 100644 --- a/include/pbl/services/compositor/default/compositor_modal_transitions.h +++ b/include/pbl/services/compositor/default/compositor_modal_transitions.h @@ -10,4 +10,4 @@ //! @param modal_is_destination Whether the animation should animate to the modal or not //! @return \ref CompositorTransition for the requested modal animation -const CompositorTransition* compositor_modal_transition_to_modal_get(bool modal_is_destination); +const CompositorTransition *compositor_modal_transition_to_modal_get(bool modal_is_destination); diff --git a/include/pbl/services/compositor/default/compositor_port_hole_transitions.h b/include/pbl/services/compositor/default/compositor_port_hole_transitions.h index ce67f9ed6a..22591ebc8c 100644 --- a/include/pbl/services/compositor/default/compositor_port_hole_transitions.h +++ b/include/pbl/services/compositor/default/compositor_port_hole_transitions.h @@ -8,7 +8,7 @@ #define PORT_HOLE_TRANSITION_DURATION_MS (6 * ANIMATION_TARGET_FRAME_INTERVAL_MS) const CompositorTransition *compositor_port_hole_transition_app_get( - CompositorTransitionDirection direction); + CompositorTransitionDirection direction); void compositor_port_hole_transition_draw_outer_ring(GContext *ctx, int16_t pixels, GColor ring_color); diff --git a/include/pbl/services/compositor/default/compositor_shutter_transitions.h b/include/pbl/services/compositor/default/compositor_shutter_transitions.h index 9f56c33d84..daf1fc3e2a 100644 --- a/include/pbl/services/compositor/default/compositor_shutter_transitions.h +++ b/include/pbl/services/compositor/default/compositor_shutter_transitions.h @@ -10,8 +10,8 @@ // The length of second "section" of the animation, where the new app is moved in. #define SHUTTER_TRANSITION_SECOND_DURATION_MS (4 * ANIMATION_TARGET_FRAME_INTERVAL_MS) // Total length of the animation. -#define SHUTTER_TRANSITION_DURATION_MS (SHUTTER_TRANSITION_FIRST_DURATION_MS + \ - SHUTTER_TRANSITION_SECOND_DURATION_MS) +#define SHUTTER_TRANSITION_DURATION_MS \ + (SHUTTER_TRANSITION_FIRST_DURATION_MS + SHUTTER_TRANSITION_SECOND_DURATION_MS) const CompositorTransition *compositor_shutter_transition_get( CompositorTransitionDirection direction, GColor color); diff --git a/include/pbl/services/compositor/legacy/compositor_app_slide_transitions.h b/include/pbl/services/compositor/legacy/compositor_app_slide_transitions.h index 7d31df3eff..9dc4386f11 100644 --- a/include/pbl/services/compositor/legacy/compositor_app_slide_transitions.h +++ b/include/pbl/services/compositor/legacy/compositor_app_slide_transitions.h @@ -5,8 +5,7 @@ #include "pbl/services/compositor/compositor.h" -void compositor_app_slide_transitions_animation_update(GContext *ctx, - uint32_t distance_normalized, +void compositor_app_slide_transitions_animation_update(GContext *ctx, uint32_t distance_normalized, CompositorTransitionDirection dir); const CompositorTransition *compositor_app_slide_transition_get(bool flip_to_the_right); diff --git a/include/pbl/services/compositor/legacy/compositor_modal_slide_transitions.h b/include/pbl/services/compositor/legacy/compositor_modal_slide_transitions.h index ca2dd3536b..cb4ec8dff0 100644 --- a/include/pbl/services/compositor/legacy/compositor_modal_slide_transitions.h +++ b/include/pbl/services/compositor/legacy/compositor_modal_slide_transitions.h @@ -10,4 +10,4 @@ //! @param modal_is_destination Whether the animation should animate to the modal or not //! @return \ref CompositorTransition for the requested modal animation -const CompositorTransition* compositor_modal_transition_to_modal_get(bool modal_is_destination); +const CompositorTransition *compositor_modal_transition_to_modal_get(bool modal_is_destination); diff --git a/include/pbl/services/compositor/screenshot_pp.h b/include/pbl/services/compositor/screenshot_pp.h index 95f56c18c7..2c673875c6 100644 --- a/include/pbl/services/compositor/screenshot_pp.h +++ b/include/pbl/services/compositor/screenshot_pp.h @@ -6,4 +6,5 @@ #include "pbl/services/comm_session/session.h" //! Callback for handling a screenshot request message from the client -void screenshot_protocol_msg_callback(CommSession *session, const uint8_t* data, unsigned int length); +void screenshot_protocol_msg_callback(CommSession *session, const uint8_t *data, + unsigned int length); diff --git a/include/pbl/services/contacts/attributes_address.h b/include/pbl/services/contacts/attributes_address.h index 793b638609..df5564eb04 100644 --- a/include/pbl/services/contacts/attributes_address.h +++ b/include/pbl/services/contacts/attributes_address.h @@ -25,7 +25,6 @@ typedef struct { Address *addresses; } AddressList; - //! Takes serialized data and fills two arrays: string_alloc_size_out and attributes_per_action_out //! The information in these arrays is used in the following steps //! @param num_attributes number of non-address attributes @@ -36,10 +35,8 @@ typedef struct { //! @param attributes_per_address_out an array of counts for the number of attributes per address //! in order corresponding to address order //! @return True if the data was parsed successfully, False if not -bool attributes_address_parse_serial_data(uint8_t num_attributes, - uint8_t num_addresses, - const uint8_t *data, - size_t data_size, +bool attributes_address_parse_serial_data(uint8_t num_attributes, uint8_t num_addresses, + const uint8_t *data, size_t data_size, size_t *string_alloc_size_out, uint8_t *attributes_per_address_out); @@ -50,8 +47,7 @@ bool attributes_address_parse_serial_data(uint8_t num_attributes, //! in order corresponding to address order //! @param required_size_for_strings total size of all attribute strings //! @return The size of the buffer required to store the attributes, address and strings -size_t attributes_address_get_buffer_size(uint8_t num_attributes, - uint8_t num_addresses, +size_t attributes_address_get_buffer_size(uint8_t num_attributes, uint8_t num_addresses, const uint8_t *attributes_per_address, size_t required_size_for_strings); @@ -63,11 +59,8 @@ size_t attributes_address_get_buffer_size(uint8_t num_attributes, //! @param num_addresses number of addresses //! @param attributes_per_address an array of counts for the number of attributes per address //! in order corresponding to address order -void attributes_address_init(AttributeList *attr_list, - AddressList *addr_list, - uint8_t **buffer, - uint8_t num_attributes, - uint8_t num_addresses, +void attributes_address_init(AttributeList *attr_list, AddressList *addr_list, uint8_t **buffer, + uint8_t num_attributes, uint8_t num_addresses, const uint8_t *attributes_per_address); //! Fills an AttributeList and AddressList from serialized data @@ -77,16 +70,12 @@ void attributes_address_init(AttributeList *attr_list, //! @param buf_end A pointer to the end of the buffer //! @param payload Serialized payload buffer //! @param payload_size Size of the payload buffer in bytes -bool attributes_address_deserialize(AttributeList *attr_list, - AddressList *addr_list, - uint8_t *buffer, - uint8_t *buf_end, - const uint8_t *payload, +bool attributes_address_deserialize(AttributeList *attr_list, AddressList *addr_list, + uint8_t *buffer, uint8_t *buf_end, const uint8_t *payload, size_t payload_size); //! Calculate the required size for a buffer to store address & attributes -size_t attributes_address_get_serialized_payload_size(AttributeList *list, - AddressList *addr_list); +size_t attributes_address_get_serialized_payload_size(AttributeList *list, AddressList *addr_list); //! Serializes an attribute list and address list into a buffer //! @param attr_list The AttributeList to serialize @@ -94,7 +83,5 @@ size_t attributes_address_get_serialized_payload_size(AttributeList *list, //! @param buffer a pointer to the buffer to write to //! @param buffer_size the size of the buffer in bytes //! @returns the number of bytes written to buffer -size_t attributes_address_serialize_payload(AttributeList *attr_list, - AddressList *addr_list, - uint8_t *buffer, - size_t buffer_size); +size_t attributes_address_serialize_payload(AttributeList *attr_list, AddressList *addr_list, + uint8_t *buffer, size_t buffer_size); diff --git a/include/pbl/services/contacts/contacts.h b/include/pbl/services/contacts/contacts.h index 49815fa251..ba4ee8d141 100644 --- a/include/pbl/services/contacts/contacts.h +++ b/include/pbl/services/contacts/contacts.h @@ -16,7 +16,7 @@ typedef struct { //! Lookup a contact given its uuid. Will return NULL if no contact is found. //! The contact must be freed with contacts_free_contact(). -Contact* contacts_get_contact_by_uuid(const Uuid *uuid); +Contact *contacts_get_contact_by_uuid(const Uuid *uuid); //! Frees a contact void contacts_free_contact(Contact *contact); diff --git a/include/pbl/services/data_logging/data_logging_service.h b/include/pbl/services/data_logging/data_logging_service.h index 3d50003eb5..2d8364c379 100644 --- a/include/pbl/services/data_logging/data_logging_service.h +++ b/include/pbl/services/data_logging/data_logging_service.h @@ -13,7 +13,6 @@ //! also trigger a flush of all data logging data to the phone // #define DLS_DEBUG_SEND_IMMEDIATELY - struct DataLoggingSession; typedef struct DataLoggingSession DataLoggingSession; @@ -55,15 +54,15 @@ void dls_inactivate_sessions(PebbleTask task); //! least DLS_SESSION_BUFFER_SIZE bytes large. It will be freed by the data logging service when the //! session is closed if this method returns no error. The worker task can optionally pass NULL for //! buffer and the buffer will be allocated in the system heap for it by the data logging service. -DataLoggingSession* dls_create_current_process(uint32_t tag, DataLoggingItemType item_type, - uint16_t item_size, void* buffer, bool resume); +DataLoggingSession *dls_create_current_process(uint32_t tag, DataLoggingItemType item_type, + uint16_t item_size, void *buffer, bool resume); //! Create a new session -DataLoggingSession* dls_create(uint32_t tag, DataLoggingItemType item_type, uint16_t item_size, - bool buffered, bool resume, const Uuid* uuid); +DataLoggingSession *dls_create(uint32_t tag, DataLoggingItemType item_type, uint16_t item_size, + bool buffered, bool resume, const Uuid *uuid); //! Append data to a logging session. Buffered sessions log asynchronously. Non buffered ones block. -DataLoggingResult dls_log(DataLoggingSession *s, const void* data, uint32_t num_items); +DataLoggingResult dls_log(DataLoggingSession *s, const void *data, uint32_t num_items); //! Finish up a session void dls_finish(DataLoggingSession *s); diff --git a/include/pbl/services/data_logging/dls_endpoint.h b/include/pbl/services/data_logging/dls_endpoint.h index 99f7a0919b..59cc9cbeeb 100644 --- a/include/pbl/services/data_logging/dls_endpoint.h +++ b/include/pbl/services/data_logging/dls_endpoint.h @@ -11,7 +11,7 @@ void dls_endpoint_init(void); void dls_endpoint_close_session(uint8_t session_id); -bool dls_endpoint_send_data(DataLoggingSession *logging_session, const uint8_t *data, unsigned int num_bytes); +bool dls_endpoint_send_data(DataLoggingSession *logging_session, const uint8_t *data, + unsigned int num_bytes); bool dls_endpoint_open_session(DataLoggingSession *logging_session); - diff --git a/include/pbl/services/data_logging/dls_list.h b/include/pbl/services/data_logging/dls_list.h index c5e8f21abf..c3974f1e0a 100644 --- a/include/pbl/services/data_logging/dls_list.h +++ b/include/pbl/services/data_logging/dls_list.h @@ -41,7 +41,7 @@ void dls_list_rebuild_from_storage(void); //! Call callback for each session we have. Pass the data param through to the callback each time. //! If the callback returns false, stop iterating immediately and return false. Returns true //! otherwise. -typedef bool (*DlsListCallback)(DataLoggingSession*, void*); +typedef bool (*DlsListCallback)(DataLoggingSession *, void *); bool dls_list_for_each_session(DlsListCallback cb, void *data); void dls_list_init(void); diff --git a/include/pbl/services/data_logging/dls_private.h b/include/pbl/services/data_logging/dls_private.h index dc8e260d8a..3f78766dc4 100644 --- a/include/pbl/services/data_logging/dls_private.h +++ b/include/pbl/services/data_logging/dls_private.h @@ -20,11 +20,10 @@ #include #define DLS_HEXDUMP(data, length) \ - PBL_HEXDUMP_D(LOG_DOMAIN_DATA_LOGGING, LOG_LEVEL_DEBUG, data, length) - + PBL_HEXDUMP_D(LOG_DOMAIN_DATA_LOGGING, LOG_LEVEL_DEBUG, data, length) // File name is formatted as: ("%s%d", DLS_FILE_NAME_PREFIX, session_id) -#define DLS_FILE_NAME_PREFIX "dls_storage_" +#define DLS_FILE_NAME_PREFIX "dls_storage_" static const uint32_t DLS_FILE_NAME_MAX_LEN = 20; static const uint32_t DLS_FILE_INIT_SIZE_BYTES = KiBYTES(4); @@ -42,8 +41,8 @@ static const uint32_t DLS_MAX_NUM_SESSIONS = 20; static const uint32_t DLS_TOTAL_STORAGE_BYTES = KiBYTES(640); // Maximum amount of space allowed for data over and above the minimum allotment per session -#define DLS_MAX_DATA_BYTES (DLS_TOTAL_STORAGE_BYTES \ - - (DLS_MAX_NUM_SESSIONS * DLS_FILE_INIT_SIZE_BYTES)) +#define DLS_MAX_DATA_BYTES \ + (DLS_TOTAL_STORAGE_BYTES - (DLS_MAX_NUM_SESSIONS * DLS_FILE_INIT_SIZE_BYTES)) typedef enum { //! A session is active when it's first created and it's still being logged to. @@ -53,7 +52,6 @@ typedef enum { DataLoggingStatusInactive = 0x02, } DataLoggingStatus; - // Endpoint commands typedef enum { DataLoggingEndpointCmdOpen = 0x01, @@ -74,7 +72,6 @@ typedef enum { //! DataLoggingEndpointCmd for the values of the other 7 bits. static const uint8_t DLS_ENDPOINT_CMD_MASK = 0x7f; - #define DLS_INVALID_FILE (-1) typedef struct DataLoggingSessionStorage { //! Handle to the pfs file we are using. Set to DLS_INVALID_FILE if no storage yet @@ -90,7 +87,6 @@ typedef struct DataLoggingSessionStorage { uint32_t num_bytes; } DataLoggingSessionStorage; - // Our little comm state machine... // // +----------+ Rx Ack +----------+ Tx Data +----------+ @@ -114,7 +110,7 @@ typedef struct { //! watch knows about. uint8_t session_id; - DataLoggingSessionCommState state:8; + DataLoggingSessionCommState state : 8; //! The number of times this session got nacked uint8_t nack_count; @@ -127,37 +123,35 @@ typedef struct { RtcTicks ack_timeout; } DataLoggingSessionComm; - //! Information needed while a session is active (watch app still adding more data). typedef struct { struct pbl_mutex mutex; - SharedCircularBuffer buffer; //! A data buffer + SharedCircularBuffer buffer; //! A data buffer SharedCircularBufferClient buffer_client; - uint8_t *buffer_storage; //! Storage for the buffer + uint8_t *buffer_storage; //! Storage for the buffer //! true if buffer_storage is in kernel heap, else it's in dls_create() caller's heap - bool buffer_in_kernel_heap:1; + bool buffer_in_kernel_heap : 1; //! bool used to rate control how often we ask the system task to write us out to flash. - bool write_request_pending:1; + bool write_request_pending : 1; //! bool used to record the fact that a session should be inactivated once it is unlocked //! (by dls_unlock_session()) - bool inactivate_pending:1; + bool inactivate_pending : 1; //! Incremented/decremented under global list mutex. This structure can only be freed up when //! this reaches 0. uint8_t open_count; } DataLoggingActiveState; - //! Data logging session metadata, struct in memory typedef struct DataLoggingSession { // FIXME use a ListNode instead of this custom list - struct DataLoggingSession *next; //!< The next logging_session in the linked list + struct DataLoggingSession *next; //!< The next logging_session in the linked list Uuid app_uuid; uint32_t tag; PebbleTask task; - DataLoggingItemType item_type:4; - DataLoggingStatus status:4; + DataLoggingItemType item_type : 4; + DataLoggingStatus status : 4; uint16_t item_size; // A timestamp of when this session was first created. @@ -171,7 +165,6 @@ typedef struct DataLoggingSession { DataLoggingActiveState *data; } DataLoggingSession; - bool dls_private_send_session(DataLoggingSession *logging_session, bool empty); //! Must be called on the system task @@ -182,7 +175,6 @@ void dls_private_handle_disconnect(void *data); bool dls_private_get_send_enable(void); void dls_private_set_send_enable(bool setting); - typedef struct PACKED { uint8_t command; uint8_t session_id; @@ -191,20 +183,18 @@ typedef struct PACKED { uint8_t bytes[]; } DataLoggingSendDataMessage; - //! Size of the buffer we create for buffered sessions. This is the largest item size allowed //! for buffered sessions. static const uint32_t DLS_SESSION_MAX_BUFFERED_ITEM_SIZE = 300; //! Size of the buffer we create for buffered sessions. This must be 1 bigger than //! DLS_SESSION_MAX_BUFFERED_ITEM_SIZE because we build a circular buffer out of it -#define DLS_SESSION_MIN_BUFFER_SIZE (DLS_SESSION_MAX_BUFFERED_ITEM_SIZE + 1) +#define DLS_SESSION_MIN_BUFFER_SIZE (DLS_SESSION_MAX_BUFFERED_ITEM_SIZE + 1) //! Max payload we can send when we send logging data to the phone. This is the largest item //! size allowed for non-buffered sessions. -static const uint32_t DLS_ENDPOINT_MAX_PAYLOAD = (COMM_MAX_OUTBOUND_PAYLOAD_SIZE - - sizeof(DataLoggingSendDataMessage)); - +static const uint32_t DLS_ENDPOINT_MAX_PAYLOAD = + (COMM_MAX_OUTBOUND_PAYLOAD_SIZE - sizeof(DataLoggingSendDataMessage)); //! Unit tests only int dls_test_read(DataLoggingSession *logging_session, uint8_t *buffer, int num_bytes); diff --git a/include/pbl/services/ecompass.h b/include/pbl/services/ecompass.h index 762cf1eb1b..275425d9df 100644 --- a/include/pbl/services/ecompass.h +++ b/include/pbl/services/ecompass.h @@ -63,8 +63,8 @@ typedef enum { //! NewSolutionAvail - New solution set available //! NewLockedSolutionAvail - A set of solutions close to one another have //! been found. Result in new_corr is the average of these values -extern MagCalStatus ecomp_corr_add_raw_mag_sample(int16_t *sample, - int16_t *saved_corr, int16_t *new_corr); +extern MagCalStatus ecomp_corr_add_raw_mag_sample(int16_t *sample, int16_t *saved_corr, + int16_t *new_corr); //! Drops any samples which have been collected as part of //! ecomp_corr_add_raw_mag_sample and resets any state tracking diff --git a/include/pbl/services/event_service.h b/include/pbl/services/event_service.h index 2b308a4567..3cfba86ae7 100644 --- a/include/pbl/services/event_service.h +++ b/include/pbl/services/event_service.h @@ -26,7 +26,7 @@ void event_service_clear_process_subscriptions(PebbleTask task); //! Claim a buffer. This means it won't automatically get cleaned up //! If you claim a buffer you must free it with event_service_free_claimed_buffer() -void* event_service_claim_buffer(PebbleEvent *e); +void *event_service_claim_buffer(PebbleEvent *e); //! This function expects the pointer returned by event_service_claim_buffer void event_service_free_claimed_buffer(void *ref); diff --git a/include/pbl/services/evented_timer.h b/include/pbl/services/evented_timer.h index 41a41912b5..43717b32f6 100644 --- a/include/pbl/services/evented_timer.h +++ b/include/pbl/services/evented_timer.h @@ -8,32 +8,31 @@ #include "kernel/pebble_tasks.h" //! @file evented_timer.h -//! A timer service that runs callbacks on the calling tasks event loop. This makes timers easy to use without having -//! to deal with concurrency issues. +//! A timer service that runs callbacks on the calling tasks event loop. This makes timers easy to +//! use without having to deal with concurrency issues. // uintptr_t to avoid casting to pointers in unit tests (previously: uint32_t) typedef uintptr_t EventedTimerID; #define EVENTED_TIMER_INVALID_ID 0 - -typedef void (*EventedTimerCallback)(void* data); +typedef void (*EventedTimerCallback)(void *data); //! Call once at startup to initialize the evented timer service. void evented_timer_init(void); -//! Called by the kernel to clean up any timers that still may be pending for an app. These timers are cancelled -//! without notifying the original client. +//! Called by the kernel to clean up any timers that still may be pending for an app. These timers +//! are cancelled without notifying the original client. void evented_timer_clear_process_timers(PebbleTask task); EventedTimerID evented_timer_register(uint32_t timeout_ms, bool repeating, - EventedTimerCallback callback, void* callback_data); + EventedTimerCallback callback, void *callback_data); bool evented_timer_reschedule(EventedTimerID timer, uint32_t new_timeout_ms); //! Reschedules a given timer if possible or creates new one //! Returns passed timer id or new id if succeeded, EVENTED_TIMER_INVALID_ID in any other case EventedTimerID evented_timer_register_or_reschedule(EventedTimerID timer_id, uint32_t timeout_ms, - EventedTimerCallback callback, void *data); + EventedTimerCallback callback, void *data); //! Cancel a currently running timer. No-op if timer is EVENTED_TIMER_INVALID_ID. void evented_timer_cancel(EventedTimerID timer); diff --git a/include/pbl/services/filesystem/app_file.h b/include/pbl/services/filesystem/app_file.h index 3686993f0a..3e39ca3571 100644 --- a/include/pbl/services/filesystem/app_file.h +++ b/include/pbl/services/filesystem/app_file.h @@ -32,9 +32,8 @@ //! //! @note buffer_len must be > APP_FILE_NAME_PREFIX_LENGTH + suffix_len to fit //! the full file name including NULL-terminator. -void app_file_name_make(char * restrict buffer, size_t buffer_len, - AppInstallId app_id, const char * restrict suffix, - size_t suffix_len); +void app_file_name_make(char *restrict buffer, size_t buffer_len, AppInstallId app_id, + const char *restrict suffix, size_t suffix_len); //! Checks whether the given filename is an app file. bool is_app_file_name(const char *filename); diff --git a/include/pbl/services/filesystem/pfs.h b/include/pbl/services/filesystem/pfs.h index 5d51562505..9c57c34ad6 100644 --- a/include/pbl/services/filesystem/pfs.h +++ b/include/pbl/services/filesystem/pfs.h @@ -27,14 +27,14 @@ //! perspective). Care should be taken not to constantly be deleting/creating //! files -#define OP_FLAG_READ (1 << 0) -#define OP_FLAG_WRITE (1 << 1) -#define OP_FLAG_OVERWRITE (1 << 2) -#define OP_FLAG_SKIP_HDR_CRC_CHECK (1 << 3) -#define OP_FLAG_USE_PAGE_CACHE (1 << 4) +#define OP_FLAG_READ (1 << 0) +#define OP_FLAG_WRITE (1 << 1) +#define OP_FLAG_OVERWRITE (1 << 2) +#define OP_FLAG_SKIP_HDR_CRC_CHECK (1 << 3) +#define OP_FLAG_USE_PAGE_CACHE (1 << 4) -#define FILE_TYPE_STATIC (0xfe) -#define FILE_MAX_NAME_LEN (255) +#define FILE_TYPE_STATIC (0xfe) +#define FILE_MAX_NAME_LEN (255) typedef enum { FSeekSet, @@ -42,9 +42,9 @@ typedef enum { } FSeekType; //! Used by pfs_watch_file to know which events to trigger callbacks on -#define FILE_CHANGED_EVENT_CLOSED (1 << 0) -#define FILE_CHANGED_EVENT_REMOVED (1 << 1) -#define FILE_CHANGED_EVENT_ALL (FILE_CHANGED_EVENT_CLOSED | FILE_CHANGED_EVENT_REMOVED) +#define FILE_CHANGED_EVENT_CLOSED (1 << 0) +#define FILE_CHANGED_EVENT_REMOVED (1 << 1) +#define FILE_CHANGED_EVENT_ALL (FILE_CHANGED_EVENT_CLOSED | FILE_CHANGED_EVENT_REMOVED) //! Types used by pfs_watch_file() typedef void (*PFSFileChangedCallback)(void *data); @@ -59,7 +59,6 @@ typedef struct { char name[]; } PFSFileListEntry; - //! @param name - The name of the file to be opened //! @param op_flags - The operation to be performed on the file //! @@ -99,8 +98,7 @@ typedef struct { //! being created //! @return - status_t error code if the operation failed, //! else a fd handle >= 0 if operation was successful -extern int pfs_open(const char *name, uint8_t op_flags, uint8_t file_type, - size_t start_size); +extern int pfs_open(const char *name, uint8_t op_flags, uint8_t file_type, size_t start_size); //! Writes data to the fd specified. After each write, the internal file offset //! is moved forward @@ -184,8 +182,8 @@ extern uint32_t get_available_pfs_space(void); //! (see FILE_CHANGED_EVENT_ flags defined above) //! @param data - pointer passed to callback when invoked //! @return - cb handle to pass into \ref pfs_unwatch_file -PFSCallbackHandle pfs_watch_file(const char* filename, PFSFileChangedCallback callback, - uint8_t event_flags, void* data); +PFSCallbackHandle pfs_watch_file(const char *filename, PFSFileChangedCallback callback, + uint8_t event_flags, void *data); //! Stop watching a file. void pfs_unwatch_file(PFSCallbackHandle cb_handle); diff --git a/include/pbl/services/firmware_update.h b/include/pbl/services/firmware_update.h index 23847c015b..1ad678ba7a 100644 --- a/include/pbl/services/firmware_update.h +++ b/include/pbl/services/firmware_update.h @@ -11,7 +11,7 @@ void firmware_update_init(void); unsigned int firmware_update_get_percent_progress(void); -void firmware_update_event_handler(PebbleSystemMessageEvent* event); +void firmware_update_event_handler(PebbleSystemMessageEvent *event); void firmware_update_pb_event_handler(PebblePutBytesEvent *event); typedef enum { diff --git a/include/pbl/services/get_bytes/get_bytes_private.h b/include/pbl/services/get_bytes/get_bytes_private.h index 4d97174835..96fa2a1798 100644 --- a/include/pbl/services/get_bytes/get_bytes_private.h +++ b/include/pbl/services/get_bytes/get_bytes_private.h @@ -19,8 +19,8 @@ static const uint16_t GET_BYTES_ENDPOINT_ID = 9000; // A protocol request/response header typedef struct PACKED { - uint8_t cmd_id; // A value from GetBytesCmd - uint8_t transaction_id; + uint8_t cmd_id; // A value from GetBytesCmd + uint8_t transaction_id; } GetBytesHeader; // The GET_BYTES_CMD_GET_COREDUMP request consists of only a GetBytesHeader @@ -28,8 +28,8 @@ typedef struct PACKED { // The GET_BYTES_CMD_GET_FILE request consists of a GetBytesFileHeader typedef struct PACKED { GetBytesHeader hdr; - uint8_t filename_len; - char filename[]; + uint8_t filename_len; + char filename[]; } GetBytesFileHeader; typedef struct PACKED { @@ -59,14 +59,14 @@ typedef enum { // The GET_BYTES_CMD_OBJECT_INFO response has this format typedef struct PACKED { GetBytesHeader hdr; - uint8_t error_code; // 0 = no error and multiple GET_BYTES_CMD_OBJECT_DATA response will follow - uint32_t num_bytes; // total size of core dump image (will be 0 if error_code != 0). + uint8_t error_code; // 0 = no error and multiple GET_BYTES_CMD_OBJECT_DATA response will follow + uint32_t num_bytes; // total size of core dump image (will be 0 if error_code != 0). } GetBytesRspObjectInfo; // The GET_BYTES_CMD_OBJECT_DATA response has this format typedef struct PACKED { GetBytesHeader hdr; - uint32_t byte_offset; // starting byte offset of this data chunk + uint32_t byte_offset; // starting byte offset of this data chunk uint8_t data[]; } GetBytesRspObjectData; diff --git a/include/pbl/services/get_bytes/get_bytes_storage.h b/include/pbl/services/get_bytes/get_bytes_storage.h index a77d02bbb6..66556dbb32 100644 --- a/include/pbl/services/get_bytes/get_bytes_storage.h +++ b/include/pbl/services/get_bytes/get_bytes_storage.h @@ -43,7 +43,7 @@ typedef struct { //! Set up the storage. This may include allocating memory, open a file descriptor, etc. bool gb_storage_setup(GetBytesStorage *storage, GetBytesObjectType object_type, - GetBytesStorageInfo *info); + GetBytesStorageInfo *info); //! Retrieve the size of the object that is to be sent GetBytesInfoErrorCode gb_storage_get_size(GetBytesStorage *storage, uint32_t *size); diff --git a/include/pbl/services/get_bytes/get_bytes_storage_coredump.h b/include/pbl/services/get_bytes/get_bytes_storage_coredump.h index d69bf6f626..92f83977d3 100644 --- a/include/pbl/services/get_bytes/get_bytes_storage_coredump.h +++ b/include/pbl/services/get_bytes/get_bytes_storage_coredump.h @@ -6,7 +6,7 @@ #include "get_bytes_storage.h" bool gb_storage_coredump_setup(GetBytesStorage *storage, GetBytesObjectType object_type, - GetBytesStorageInfo *info); + GetBytesStorageInfo *info); GetBytesInfoErrorCode gb_storage_coredump_get_size(GetBytesStorage *storage, uint32_t *size); diff --git a/include/pbl/services/get_bytes/get_bytes_storage_file.h b/include/pbl/services/get_bytes/get_bytes_storage_file.h index e1f6ebf683..f3a233c563 100644 --- a/include/pbl/services/get_bytes/get_bytes_storage_file.h +++ b/include/pbl/services/get_bytes/get_bytes_storage_file.h @@ -6,7 +6,7 @@ #include "get_bytes_storage.h" bool gb_storage_file_setup(GetBytesStorage *storage, GetBytesObjectType object_type, - GetBytesStorageInfo *info); + GetBytesStorageInfo *info); GetBytesInfoErrorCode gb_storage_file_get_size(GetBytesStorage *storage, uint32_t *size); diff --git a/include/pbl/services/hrm/hrm_manager.h b/include/pbl/services/hrm/hrm_manager.h index 0f7938cbbe..bb90585c6a 100644 --- a/include/pbl/services/hrm/hrm_manager.h +++ b/include/pbl/services/hrm/hrm_manager.h @@ -32,12 +32,12 @@ typedef enum { } HRMFeatureShift; typedef enum { - HRMFeature_BPM = (1 << HRMFeatureShift_BPM), //!< Collect heartrate BPM. - HRMFeature_HRV = (1 << HRMFeatureShift_HRV), //!< Collect heartrate variability. - HRMFeature_SpO2 = (1 << HRMFeatureShift_SpO2), //!< Collect blood oxygen saturation. + HRMFeature_BPM = (1 << HRMFeatureShift_BPM), //!< Collect heartrate BPM. + HRMFeature_HRV = (1 << HRMFeatureShift_HRV), //!< Collect heartrate variability. + HRMFeature_SpO2 = (1 << HRMFeatureShift_SpO2), //!< Collect blood oxygen saturation. #ifdef CONFIG_MFG - HRMFeature_CTR = (1 << HRMFeatureShift_CTR), //!< Collect ppg CTR test data. - HRMFeature_Leakage = (1 << HRMFeatureShift_Leakage), //!< Collect ppg leakage test data. + HRMFeature_CTR = (1 << HRMFeatureShift_CTR), //!< Collect ppg CTR test data. + HRMFeature_Leakage = (1 << HRMFeatureShift_Leakage), //!< Collect ppg leakage test data. #endif HRMFeatureMax } HRMFeature; @@ -47,7 +47,7 @@ typedef enum { #define HRM_MANAGER_MAX_ACCEL_SAMPLES ((2 * HRM_MANAGER_ACCEL_RATE_MILLIHZ) / 1000) // When an app exits, we change its subscription (if any) to expire in this many seconds -#define HRM_MANAGER_APP_EXIT_EXPIRATION_SEC SECONDS_PER_HOUR +#define HRM_MANAGER_APP_EXIT_EXPIRATION_SEC SECONDS_PER_HOUR typedef struct { AccelRawData data[HRM_MANAGER_MAX_ACCEL_SAMPLES]; @@ -56,7 +56,7 @@ typedef struct { //! Grab the buffer containing accel data for the last 1 second period. //! This locks the accel sample buffer that lives in the hrm manager. -HRMAccelData * hrm_manager_get_accel_data(void); +HRMAccelData *hrm_manager_get_accel_data(void); //! Unlock the accel sample buffer. void hrm_manager_release_accel_data(void); @@ -145,7 +145,7 @@ typedef struct { uint16_t hrv_ppi_ms; HRMQuality hrv_quality; - + uint8_t spo2_percent; HRMQuality spo2_quality; diff --git a/include/pbl/services/hrm/hrm_manager_private.h b/include/pbl/services/hrm/hrm_manager_private.h index 3318c4fb13..bed94199ca 100644 --- a/include/pbl/services/hrm/hrm_manager_private.h +++ b/include/pbl/services/hrm/hrm_manager_private.h @@ -35,19 +35,20 @@ typedef struct HRMSubscriberState { HRMSubscriberCallback callback_handler; // only used for KernelBG subscribers void *callback_context; // only used for KernelBG subscribers - uint32_t update_interval_s; // How often to send updates to this subscriber - time_t expire_utc; // This subscription will expire at this time - bool sent_expiration_event; // true after we've sent a HRMEvent_SubscriptionExpiring event - HRMFeature features; // what features the subscriber is interested in + uint32_t update_interval_s; // How often to send updates to this subscriber + time_t expire_utc; // This subscription will expire at this time + bool sent_expiration_event; // true after we've sent a HRMEvent_SubscriptionExpiring event + HRMFeature features; // what features the subscriber is interested in - RtcTicks last_valid_bpm_ticks; // tick count the last time this subscriber received valid HR reading + RtcTicks + last_valid_bpm_ticks; // tick count the last time this subscriber received valid HR reading } HRMSubscriberState; // HRM manager expects to be update at 1Hz. To the system task, we can currently // expect up to 2 events / second. 8 items in the queue allows for up to a 4s stall if subscribed // to both BPM and LEDCurrent. #define NUM_EVENTS_TO_QUEUE (8) -#define EVENT_STORAGE_SIZE (sizeof(PebbleHRMEvent) * NUM_EVENTS_TO_QUEUE) +#define EVENT_STORAGE_SIZE (sizeof(PebbleHRMEvent) * NUM_EVENTS_TO_QUEUE) #define HRM_MANAGER_ACCEL_MANAGER_SAMPLES_PER_UPDATE 4 @@ -69,7 +70,7 @@ struct HRMManagerState { ListNode *subscribers; CircularBuffer system_task_event_buffer; - uint32_t dropped_events; //!< Count of how many events for the system task have been dropped + uint32_t dropped_events; //!< Count of how many events for the system task have been dropped HRMSessionRef next_session_ref; uint8_t system_task_event_storage[EVENT_STORAGE_SIZE]; @@ -83,18 +84,17 @@ struct HRMManagerState { TimerID update_enable_timer_id; // used for re-enabling the HRM sensor - uint8_t check_disable_counter; // increments to HRM_CHECK_SENSOR_DISABLE_COUNT - uint8_t enable_failure_count; // counts consecutive hrm_enable failures, stops retrying after max + uint8_t check_disable_counter; // increments to HRM_CHECK_SENSOR_DISABLE_COUNT + uint8_t enable_failure_count; // counts consecutive hrm_enable failures, stops retrying after max - HRMFeature enabled_features; // feature union the sensor was last enabled with + HRMFeature enabled_features; // feature union the sensor was last enabled with RtcTicks sensor_on_since_ticks; // tick count when the sensor was last turned on; 0 while off bool unserved_timeout_logged; // limits the unserved-timeout warning to once per on-stretch - bool enabled_run_level; // True if the current run_level (LowPower, Stationary, - // Normal, etc.) allows the sensor to be turned on - bool enabled_charging_state; // Ture if we aren't plugged in / charging - + bool enabled_run_level; // True if the current run_level (LowPower, Stationary, + // Normal, etc.) allows the sensor to be turned on + bool enabled_charging_state; // Ture if we aren't plugged in / charging }; //! Subscription for KernelBG or KernelMain clients. diff --git a/include/pbl/services/i18n/i18n.h b/include/pbl/services/i18n/i18n.h index 95089e3ce7..bd9aa27521 100644 --- a/include/pbl/services/i18n/i18n.h +++ b/include/pbl/services/i18n/i18n.h @@ -11,11 +11,11 @@ #define LOCALE_NAME_LENGTH 30 typedef struct { - ListNode node; //!< Linked list node - const void *owner; //!< pointer to owner object - uint32_t original_hash; //!< hashed original string - char *original_string; //!< original string. Stored following translated_string below - char translated_string[]; //!< i18n'ed string. Storage for original string comes after this + ListNode node; //!< Linked list node + const void *owner; //!< pointer to owner object + uint32_t original_hash; //!< hashed original string + char *original_string; //!< original string. Stored following translated_string below + char translated_string[]; //!< i18n'ed string. Storage for original string comes after this } I18nString; //! macro used to tag strings for extractions. Needed when we @@ -40,7 +40,7 @@ const char *i18n_get(const char *string, const void *owner); void i18n_get_with_buffer(const char *string, char *buffer, size_t length); #define i18n_ctx_get_with_buffer(ctx, string, buffer, length) \ - i18n_get_with_buffer(i18n_ctx_noop(ctx, string), buffer, length) + i18n_get_with_buffer(i18n_ctx_noop(ctx, string), buffer, length) //! Look up an i18n'ed string and return the length of it. size_t i18n_get_length(const char *string); diff --git a/include/pbl/services/i18n/mo.h b/include/pbl/services/i18n/mo.h index e40b1cb8c0..e0eba5503d 100644 --- a/include/pbl/services/i18n/mo.h +++ b/include/pbl/services/i18n/mo.h @@ -83,37 +83,36 @@ * */ -#define MO_MAGIC 0x950412de -#define MO_GET_REV_MAJOR(r) (((r) >> 16) & 0xFFFF) -#define MO_GET_REV_MINOR(r) ((r) & 0xFFFF) -#define MO_MAKE_REV(maj, min) (((maj) << 16) | (min)) +#define MO_MAGIC 0x950412de +#define MO_GET_REV_MAJOR(r) (((r) >> 16) & 0xFFFF) +#define MO_GET_REV_MINOR(r) ((r) & 0xFFFF) +#define MO_MAKE_REV(maj, min) (((maj) << 16) | (min)) #define LANG_PROP_NAME "Language: " /* *.mo file format */ typedef struct PACKED { - uint32_t mo_magic; /* determines endian */ - uint32_t mo_revision; /* file format revision: 0 */ + uint32_t mo_magic; /* determines endian */ + uint32_t mo_revision; /* file format revision: 0 */ uint32_t mo_nstring; /* N: number of strings */ - uint32_t mo_otable; /* O: original text table offset */ - uint32_t mo_ttable; /* T: translated text table offset */ - uint32_t mo_hsize; /* S: size of hashing table */ + uint32_t mo_otable; /* O: original text table offset */ + uint32_t mo_ttable; /* T: translated text table offset */ + uint32_t mo_hsize; /* S: size of hashing table */ uint32_t mo_hoffset; /* H: offset of hashing table */ } MoHeader; typedef struct PACKED { - uint32_t len; /* strlen(str), so region will be len + 1 */ - uint32_t off; /* offset of \0-terminated string */ + uint32_t len; /* strlen(str), so region will be len + 1 */ + uint32_t off; /* offset of \0-terminated string */ } MoEntry; typedef struct { MoHeader hdr; char *mo_lang; - uint32_t *mo_htable; /* H: hash table */ + uint32_t *mo_htable; /* H: hash table */ } Mo; typedef struct { size_t len; - Mo mo; /* endian-flipped mo file header */ + Mo mo; /* endian-flipped mo file header */ } MoHandle; - diff --git a/include/pbl/services/imaging_endpoint_types.h b/include/pbl/services/imaging_endpoint_types.h index ed8fb81ad5..6208be0e21 100644 --- a/include/pbl/services/imaging_endpoint_types.h +++ b/include/pbl/services/imaging_endpoint_types.h @@ -31,9 +31,9 @@ typedef enum { //! Pixel encoding the watch is asking for (and that the response is packed in). typedef enum { - ImagingFormat1Bit = 0x00, //!< 1-bpp black & white. - ImagingFormat8BitColor = 0x01, //!< 8-bpp GColor8. - ImagingFormat4BitPalette = 0x02, //!< 4-bpp palettized GColor8 (up to 16 colours). + ImagingFormat1Bit = 0x00, //!< 1-bpp black & white. + ImagingFormat8BitColor = 0x01, //!< 8-bpp GColor8. + ImagingFormat4BitPalette = 0x02, //!< 4-bpp palettized GColor8 (up to 16 colours). } ImagingFormat; //! Watch -> Phone. Fixed head, then type-specific parameters. @@ -54,12 +54,12 @@ typedef struct PACKED { //! Flags byte in an ImageResponse chunk. typedef enum { - ImagingResponseFlagFirst = (1 << 0), //!< First chunk; the image header precedes the pixels. - ImagingResponseFlagLast = (1 << 1), //!< Last chunk of the transfer. - ImagingResponseFlagNoImage = (1 << 2), //!< Phone has no image; no pixels follow. - ImagingResponseFlagUnsupported = (1 << 3), //!< Phone can't serve this image type; no pixels - //!< follow. The watch latches the type off for the - //!< rest of the connection and stops requesting it. + ImagingResponseFlagFirst = (1 << 0), //!< First chunk; the image header precedes the pixels. + ImagingResponseFlagLast = (1 << 1), //!< Last chunk of the transfer. + ImagingResponseFlagNoImage = (1 << 2), //!< Phone has no image; no pixels follow. + ImagingResponseFlagUnsupported = (1 << 3), //!< Phone can't serve this image type; no pixels + //!< follow. The watch latches the type off for the + //!< rest of the connection and stops requesting it. } ImagingResponseFlags; //! Bits 4-7 of a response's `flags` carry the ImagingImageType it answers. Several consumers can diff --git a/include/pbl/services/music.h b/include/pbl/services/music.h index b8d7d58c15..85e664e8da 100644 --- a/include/pbl/services/music.h +++ b/include/pbl/services/music.h @@ -103,14 +103,13 @@ void music_request_reduced_latency(bool reduced_latency); void music_request_low_latency_for_period(uint32_t period_seconds); //! For testing purposes. -const char * music_get_connected_server_debug_name(void); +const char *music_get_connected_server_debug_name(void); //////////////////////////////////////////////////////////////////////////////////////////////////// // Album art struct GBitmap; - //! @return An 8-bit generation token that changes whenever the current track changes (title, artist //! or album). The Music app re-requests art when it changes; servers echo it in album-art transfers //! so the service can discard art that arrived after a track change. @see music_set_album_art @@ -124,8 +123,8 @@ bool music_album_art_is_current(void); //! Borrow the current album art for drawing. Returns NULL if there is no art for the current track. //! The returned bitmap is owned by the music service and remains valid until music_album_art_unlock -//! is called; the caller MUST call music_album_art_unlock when done, and MUST NOT retain the pointer -//! past that point. +//! is called; the caller MUST call music_album_art_unlock when done, and MUST NOT retain the +//! pointer past that point. const struct GBitmap *music_album_art_lock(void); //! Release the album art borrowed with music_album_art_lock. diff --git a/include/pbl/services/music_internal.h b/include/pbl/services/music_internal.h index 65815f3a99..74e75f2de1 100644 --- a/include/pbl/services/music_internal.h +++ b/include/pbl/services/music_internal.h @@ -40,9 +40,8 @@ typedef struct { bool music_set_connected_server(const MusicServerImplementation *implementation, bool connected); //! Update the track that's currently playing. The strings don't need to be null terminated. -void music_update_now_playing(const char *title, size_t title_length, - const char *artist, size_t artist_length, - const char *album, size_t album_length); +void music_update_now_playing(const char *title, size_t title_length, const char *artist, + size_t artist_length, const char *album, size_t album_length); //! Update the name of the player that's currently playing. //! The string doesn't need to be null terminated. diff --git a/include/pbl/services/new_timer/new_timer.h b/include/pbl/services/new_timer/new_timer.h index 0a23f50907..49a03541b4 100644 --- a/include/pbl/services/new_timer/new_timer.h +++ b/include/pbl/services/new_timer/new_timer.h @@ -6,7 +6,6 @@ #include #include - //! new_timer.h //! //! NewTimer is a very high priority thread that's used for executing timers and high-priority @@ -24,26 +23,25 @@ typedef void (*NewTimerCallback)(void *data); typedef uint32_t TimerID; #define TIMER_INVALID_ID 0 -//! Flags for new_timer_start() +//! Flags for new_timer_start() //! TIMER_START_FLAG_REPEATING make this a repeating timer //! //! TIMER_START_FLAG_FAIL_IF_EXECUTING If the timer callback is currently executing, do not //! schedule the timer and return false from new_timer_start. This can be helpful in usage patterns -//! where the timer callback might be blocked on a semaphore owned by the task issuing the start. +//! where the timer callback might be blocked on a semaphore owned by the task issuing the start. //! //! TIMER_START_FLAG_FAIL_IF_SCHEDULED If the timer is already scheduled, do not reschedule it and -//! return false from new_timer_start. -#define TIMER_START_FLAG_REPEATING 0x01 -#define TIMER_START_FLAG_FAIL_IF_EXECUTING 0x02 -#define TIMER_START_FLAG_FAIL_IF_SCHEDULED 0x04 - +//! return false from new_timer_start. +#define TIMER_START_FLAG_REPEATING 0x01 +#define TIMER_START_FLAG_FAIL_IF_EXECUTING 0x02 +#define TIMER_START_FLAG_FAIL_IF_SCHEDULED 0x04 //! Creates a new timer object. This timer will start out in the stopped state. //! @return the non-zero timer id or TIMER_INVALID_ID if OOM TimerID new_timer_create(void); -//! Schedule an existing timer to execute in timeout_ms. If the timer was already started, it will be -//! rescheduled for the new time. +//! Schedule an existing timer to execute in timeout_ms. If the timer was already started, it will +//! be rescheduled for the new time. //! @param[in] timer ID //! @param[in] timeout_ms timeout in milliseconds //! @param[in] cb pointer to the user's callback procedure @@ -51,7 +49,7 @@ TimerID new_timer_create(void); //! @param[in] flags one or more TIMER_START_FLAG_.* flags //! @return True if successful, false if timer was not rescheduled. Note that it will never return //! false if none of the FAIL_IF_* flags are set. -bool new_timer_start(TimerID timer, uint32_t timeout_ms, NewTimerCallback cb, void *cb_data, +bool new_timer_start(TimerID timer, uint32_t timeout_ms, NewTimerCallback cb, void *cb_data, uint32_t flags); //! Stop a timer. For repeating timers, even if this method returns false (callback is currently @@ -62,8 +60,10 @@ bool new_timer_stop(TimerID timer); //! Get scheduled status of a timer //! @param[in] timer ID -//! @param[out] expire_ms_p if not NULL, the number of milliseconds until this timer will fire is returned in -//! *expire_ms_p. If the timer is not scheduled (return value is false), this value should be ignored. +//! @param[out] expire_ms_p if not NULL, the number of milliseconds until this timer will fire is +//! returned in +//! *expire_ms_p. If the timer is not scheduled (return value is false), this value +//! should be ignored. //! @return True if timer is scheduled, false if not bool new_timer_scheduled(TimerID timer, uint32_t *expire_ms_p); @@ -71,10 +71,8 @@ bool new_timer_scheduled(TimerID timer, uint32_t *expire_ms_p); //! @param[in] timer ID void new_timer_delete(TimerID timer); - // Timer watchdog uses this -void* new_timer_debug_get_current_callback(void); - +void *new_timer_debug_get_current_callback(void); typedef void (*NewTimerWorkCallback)(void *data); diff --git a/include/pbl/services/new_timer/new_timer_service.h b/include/pbl/services/new_timer/new_timer_service.h index 56eb92991d..59a0525326 100644 --- a/include/pbl/services/new_timer/new_timer_service.h +++ b/include/pbl/services/new_timer/new_timer_service.h @@ -4,4 +4,3 @@ #pragma once void new_timer_service_init(void); - diff --git a/include/pbl/services/notifications/action_chaining_window.h b/include/pbl/services/notifications/action_chaining_window.h index 5b20ead4e1..5d9663b557 100644 --- a/include/pbl/services/notifications/action_chaining_window.h +++ b/include/pbl/services/notifications/action_chaining_window.h @@ -6,13 +6,11 @@ #include "applib/ui/window_stack.h" #include "pbl/services/timeline/item.h" -typedef void (*ActionChainingMenuSelectCb)(Window *chaining_window, - TimelineItemAction *action, void *context); +typedef void (*ActionChainingMenuSelectCb)(Window *chaining_window, TimelineItemAction *action, + void *context); typedef void (*ActionChainingMenuClosedCb)(void *context); void action_chaining_window_push(WindowStack *window_stack, const char *title, TimelineItemActionGroup *action_group, - ActionChainingMenuSelectCb select_cb, - void *select_cb_context, - ActionChainingMenuClosedCb closed_cb, - void *closed_cb_context); + ActionChainingMenuSelectCb select_cb, void *select_cb_context, + ActionChainingMenuClosedCb closed_cb, void *closed_cb_context); diff --git a/include/pbl/services/notifications/alerts.h b/include/pbl/services/notifications/alerts.h index 90cfa123c3..0a665c6f5b 100644 --- a/include/pbl/services/notifications/alerts.h +++ b/include/pbl/services/notifications/alerts.h @@ -8,11 +8,11 @@ #include "pbl/services/notifications/notification_types.h" typedef enum AlertType { - AlertInvalid = NotificationInvalid, - AlertMobile = NotificationMobile, + AlertInvalid = NotificationInvalid, + AlertMobile = NotificationMobile, AlertPhoneCall = NotificationPhoneCall, - AlertOther = NotificationOther, - AlertReminder = NotificationReminder + AlertOther = NotificationOther, + AlertReminder = NotificationReminder } AlertType; // Service to determine how and if the user gets alerted on a call/notification diff --git a/include/pbl/services/notifications/alerts_preferences.h b/include/pbl/services/notifications/alerts_preferences.h index c978ffba2c..b6c7b5f299 100644 --- a/include/pbl/services/notifications/alerts_preferences.h +++ b/include/pbl/services/notifications/alerts_preferences.h @@ -16,8 +16,8 @@ typedef enum FirstUseSource { } FirstUseSource; typedef enum MuteBitfield { - MuteBitfield_None = 0b00000000, - MuteBitfield_Always = 0b01111111, + MuteBitfield_None = 0b00000000, + MuteBitfield_Always = 0b01111111, MuteBitfield_Weekdays = 0b00111110, MuteBitfield_Weekends = 0b01000001, } MuteBitfield; diff --git a/include/pbl/services/notifications/alerts_preferences_private.h b/include/pbl/services/notifications/alerts_preferences_private.h index 341f6b1970..03f44f327b 100644 --- a/include/pbl/services/notifications/alerts_preferences_private.h +++ b/include/pbl/services/notifications/alerts_preferences_private.h @@ -92,4 +92,3 @@ void alerts_preferences_unlock(void); //! new value that was placed into the backing store. //! @param[in] event pointer to the blob DB event void alerts_preferences_handle_blob_db_event(PebbleBlobDBEvent *event); - diff --git a/include/pbl/services/notifications/alerts_private.h b/include/pbl/services/notifications/alerts_private.h index 2c3e674217..285aff3dd5 100644 --- a/include/pbl/services/notifications/alerts_private.h +++ b/include/pbl/services/notifications/alerts_private.h @@ -6,13 +6,12 @@ #include "pbl/services/notifications/alerts.h" typedef enum AlertMask { - AlertMaskAllOff = 0, - AlertMaskPhoneCalls = NotificationPhoneCall, - AlertMaskOther = NotificationOther, - AlertMaskAllOnLegacy = - NotificationMobile | NotificationPhoneCall | NotificationOther, - AlertMaskAllOn = - NotificationMobile | NotificationPhoneCall | NotificationOther | NotificationReminder + AlertMaskAllOff = 0, + AlertMaskPhoneCalls = NotificationPhoneCall, + AlertMaskOther = NotificationOther, + AlertMaskAllOnLegacy = NotificationMobile | NotificationPhoneCall | NotificationOther, + AlertMaskAllOn = + NotificationMobile | NotificationPhoneCall | NotificationOther | NotificationReminder } AlertMask; bool alerts_get_vibrate(void); diff --git a/include/pbl/services/notifications/ancs/ancs_filtering.h b/include/pbl/services/notifications/ancs/ancs_filtering.h index fc6d59dc00..d7c7c1f3c4 100644 --- a/include/pbl/services/notifications/ancs/ancs_filtering.h +++ b/include/pbl/services/notifications/ancs/ancs_filtering.h @@ -13,10 +13,8 @@ //! @param display_name Display name of the app we're recording //! @param title Title attribute from the notification associated with the app we're recording //! (fallback in the event that we don't have a display name such as in the case of Apple Pay) -void ancs_filtering_record_app(iOSNotifPrefs **app_notif_prefs, - const ANCSAttribute *app_id, - const ANCSAttribute *display_name, - const ANCSAttribute *title); +void ancs_filtering_record_app(iOSNotifPrefs **app_notif_prefs, const ANCSAttribute *app_id, + const ANCSAttribute *display_name, const ANCSAttribute *title); //! Returns true if a given app is muted for the current day //! @param app_notif_prefs Prefs for the given app loaded from the notif pref db @@ -33,7 +31,5 @@ uint8_t ancs_filtering_get_mute_type(const iOSNotifPrefs *app_notif_prefs); //! @param title Notification title //! @param subtitle Notification subtitle, matched as part of the title field //! @param body Notification body/message -bool ancs_filtering_matches_rules(const iOSNotifPrefs *app_notif_prefs, - const ANCSAttribute *title, - const ANCSAttribute *subtitle, - const ANCSAttribute *body); +bool ancs_filtering_matches_rules(const iOSNotifPrefs *app_notif_prefs, const ANCSAttribute *title, + const ANCSAttribute *subtitle, const ANCSAttribute *body); diff --git a/include/pbl/services/notifications/ancs/ancs_item.h b/include/pbl/services/notifications/ancs/ancs_item.h index 2f59e0c1b2..7f1f09a735 100644 --- a/include/pbl/services/notifications/ancs/ancs_item.h +++ b/include/pbl/services/notifications/ancs/ancs_item.h @@ -19,8 +19,7 @@ TimelineItem *ancs_item_create_and_populate(ANCSAttribute *notif_attributes[], ANCSAttribute *app_attributes[], const ANCSAppMetadata *app_metadata, - iOSNotifPrefs *notif_prefs, - time_t timestamp, + iOSNotifPrefs *notif_prefs, time_t timestamp, ANCSProperty properties); //! Replaces the dismiss action of an existing timeline item with the ancs negative action diff --git a/include/pbl/services/notifications/ancs/ancs_known_apps.h b/include/pbl/services/notifications/ancs/ancs_known_apps.h index db758bd33d..8f43b9bcfe 100644 --- a/include/pbl/services/notifications/ancs/ancs_known_apps.h +++ b/include/pbl/services/notifications/ancs/ancs_known_apps.h @@ -5,9 +5,9 @@ // please don't change these values manually, they are derived from the spreadsheet // "Notification Colors" -#define APP(id, icon, color) { id, icon, color } +#define APP(id, icon, color) {id, icon, color} - APP(IOS_CALENDAR_APP_ID, TIMELINE_RESOURCE_TIMELINE_CALENDAR, GColorRedARGB8), +APP(IOS_CALENDAR_APP_ID, TIMELINE_RESOURCE_TIMELINE_CALENDAR, GColorRedARGB8), APP(IOS_FACETIME_APP_ID, TIMELINE_RESOURCE_NOTIFICATION_FACETIME, GColorIslamicGreenARGB8), APP(IOS_MAIL_APP_ID, TIMELINE_RESOURCE_GENERIC_EMAIL, GColorVividCeruleanARGB8), APP(IOS_PHONE_APP_ID, TIMELINE_RESOURCE_DURING_PHONE_CALL, GColorPictonBlueARGB8), @@ -16,13 +16,16 @@ APP("com.atebits.Tweetie2", TIMELINE_RESOURCE_NOTIFICATION_TWITTER, GColorVividCeruleanARGB8), APP("com.burbn.instagram", TIMELINE_RESOURCE_NOTIFICATION_INSTAGRAM, GColorCobaltBlueARGB8), APP("com.facebook.Facebook", TIMELINE_RESOURCE_NOTIFICATION_FACEBOOK, GColorCobaltBlueARGB8), - APP("com.facebook.Messenger", TIMELINE_RESOURCE_NOTIFICATION_FACEBOOK_MESSENGER, GColorBlueMoonARGB8), + APP("com.facebook.Messenger", TIMELINE_RESOURCE_NOTIFICATION_FACEBOOK_MESSENGER, + GColorBlueMoonARGB8), APP("com.getpebble.pebbletime", TIMELINE_RESOURCE_NOTIFICATION_FLAG, GColorOrangeARGB8), APP("com.google.calendar", TIMELINE_RESOURCE_TIMELINE_CALENDAR, GColorVeryLightBlueARGB8), APP("com.google.Gmail", TIMELINE_RESOURCE_NOTIFICATION_GMAIL, GColorRedARGB8), - APP("com.google.hangouts", TIMELINE_RESOURCE_NOTIFICATION_GOOGLE_HANGOUTS, GColorJaegerGreenARGB8), + APP("com.google.hangouts", TIMELINE_RESOURCE_NOTIFICATION_GOOGLE_HANGOUTS, + GColorJaegerGreenARGB8), APP("com.google.inbox", TIMELINE_RESOURCE_NOTIFICATION_GOOGLE_INBOX, GColorBlueMoonARGB8), - APP("com.microsoft.Office.Outlook", TIMELINE_RESOURCE_NOTIFICATION_OUTLOOK, GColorCobaltBlueARGB8), + APP("com.microsoft.Office.Outlook", TIMELINE_RESOURCE_NOTIFICATION_OUTLOOK, + GColorCobaltBlueARGB8), APP("com.orchestra.v2", TIMELINE_RESOURCE_NOTIFICATION_MAILBOX, GColorVividCeruleanARGB8), APP("com.skype.skype", TIMELINE_RESOURCE_NOTIFICATION_SKYPE, GColorVividCeruleanARGB8), APP("com.tapbots.Tweetbot3", TIMELINE_RESOURCE_NOTIFICATION_TWITTER, GColorVividCeruleanARGB8), @@ -31,8 +34,10 @@ APP("jp.naver.line", TIMELINE_RESOURCE_NOTIFICATION_LINE, GColorIslamicGreenARGB8), APP("net.whatsapp.WhatsApp", TIMELINE_RESOURCE_NOTIFICATION_WHATSAPP, GColorIslamicGreenARGB8), APP("ph.telegra.Telegraph", TIMELINE_RESOURCE_NOTIFICATION_TELEGRAM, GColorVividCeruleanARGB8), - APP("com.blackberry.bbm1", TIMELINE_RESOURCE_NOTIFICATION_BLACKBERRY_MESSENGER, GColorDarkGrayARGB8), - APP("com.getpebble.pebbletime.enterprise", TIMELINE_RESOURCE_NOTIFICATION_FLAG, GColorOrangeARGB8), + APP("com.blackberry.bbm1", TIMELINE_RESOURCE_NOTIFICATION_BLACKBERRY_MESSENGER, + GColorDarkGrayARGB8), + APP("com.getpebble.pebbletime.enterprise", TIMELINE_RESOURCE_NOTIFICATION_FLAG, + GColorOrangeARGB8), APP("com.google.GoogleMobile", TIMELINE_RESOURCE_NOTIFICATION_GENERIC, GColorBlueMoonARGB8), APP("com.google.ios.youtube", TIMELINE_RESOURCE_NOTIFICATION_YOUTUBE, GColorRedARGB8), APP("com.hipchat.ios", TIMELINE_RESOURCE_NOTIFICATION_HIPCHAT, GColorCobaltBlueARGB8), @@ -43,7 +48,8 @@ APP("com.amazon.Amazon", TIMELINE_RESOURCE_NOTIFICATION_AMAZON, GColorChromeYellowARGB8), APP("com.google.Maps", TIMELINE_RESOURCE_NOTIFICATION_GOOGLE_MAPS, GColorBlueMoonARGB8), APP("com.google.photos", TIMELINE_RESOURCE_NOTIFICATION_GOOGLE_PHOTOS, GColorBlueMoonARGB8), - APP("com.apple.mobileslideshow", TIMELINE_RESOURCE_NOTIFICATION_IOS_PHOTOS, GColorBlueMoonARGB8), + APP("com.apple.mobileslideshow", TIMELINE_RESOURCE_NOTIFICATION_IOS_PHOTOS, + GColorBlueMoonARGB8), APP("com.linkedin.LinkedIn", TIMELINE_RESOURCE_NOTIFICATION_LINKEDIN, GColorCobaltBlueARGB8), APP("com.tinyspeck.chatlyio", TIMELINE_RESOURCE_NOTIFICATION_SLACK, GColorFollyARGB8), APP("com.automattic.beeper", TIMELINE_RESOURCE_NOTIFICATION_BEEPER, GColorVividVioletARGB8), @@ -54,7 +60,8 @@ APP("io.element.elementx", TIMELINE_RESOURCE_NOTIFICATION_ELEMENT, GColorDarkGreenARGB8), APP("com.google.Dynamite", TIMELINE_RESOURCE_NOTIFICATION_GOOGLE_CHAT, GColorGreenARGB8), APP("com.google.tasks", TIMELINE_RESOURCE_NOTIFICATION_GOOGLE_TASKS, GColorBlueMoonARGB8), - APP("io.robbie.HomeAssistant", TIMELINE_RESOURCE_NOTIFICATION_HOME_ASSISTANT, GColorVividCeruleanARGB8), + APP("io.robbie.HomeAssistant", TIMELINE_RESOURCE_NOTIFICATION_HOME_ASSISTANT, + GColorVividCeruleanARGB8), APP("com.valvesoftware.Steam", TIMELINE_RESOURCE_NOTIFICATION_STEAM, GColorCobaltBlueARGB8), APP("com.microsoft.skype.teams", TIMELINE_RESOURCE_NOTIFICATION_TEAMS, GColorIndigoARGB8), APP("com.burbn.barcelona", TIMELINE_RESOURCE_NOTIFICATION_THREADS, GColorDarkGrayARGB8), diff --git a/include/pbl/services/notifications/ancs/ancs_notifications.h b/include/pbl/services/notifications/ancs/ancs_notifications.h index 547483ea1a..681e417303 100644 --- a/include/pbl/services/notifications/ancs/ancs_notifications.h +++ b/include/pbl/services/notifications/ancs/ancs_notifications.h @@ -8,9 +8,7 @@ #include "comm/ble/kernel_le_client/ancs/ancs_types.h" #include "pbl/services/timeline/item.h" - -void ancs_notifications_handle_message(uint32_t uid, - ANCSProperty properties, +void ancs_notifications_handle_message(uint32_t uid, ANCSProperty properties, ANCSAttribute **notif_attributes, ANCSAttribute **app_attributes); diff --git a/include/pbl/services/notifications/ancs/ancs_notifications_util.h b/include/pbl/services/notifications/ancs/ancs_notifications_util.h index c82a9f2bd7..761ad23bda 100644 --- a/include/pbl/services/notifications/ancs/ancs_notifications_util.h +++ b/include/pbl/services/notifications/ancs/ancs_notifications_util.h @@ -21,11 +21,11 @@ typedef struct PACKED ANCSAppMetadata { #if PBL_COLOR uint8_t app_color; #endif - bool is_blocked:1; // #include - void pp_answer_call(uint32_t cookie); void pp_decline_call(uint32_t cookie); diff --git a/include/pbl/services/poll_remote.h b/include/pbl/services/poll_remote.h index 71f482eaa0..2b8d1c8249 100644 --- a/include/pbl/services/poll_remote.h +++ b/include/pbl/services/poll_remote.h @@ -43,5 +43,5 @@ void poll_remote_stop(void); //! Calls to poll_remote_send_request() will be no-ops if min_interval_minutes has not been reached. //! @param max_interval_minutes The maximum interval between two "poll services" requests. //! The automatic sending of poll requests will only occur when max_interval_minutes is reached. -void poll_remote_set_intervals(PollRemoteService service, - const uint8_t min_interval_minutes, const uint8_t max_interval_minutes); +void poll_remote_set_intervals(PollRemoteService service, const uint8_t min_interval_minutes, + const uint8_t max_interval_minutes); diff --git a/include/pbl/services/process_management/app_storage.h b/include/pbl/services/process_management/app_storage.h index 7431b70cea..e2b0da28bf 100644 --- a/include/pbl/services/process_management/app_storage.h +++ b/include/pbl/services/process_management/app_storage.h @@ -16,9 +16,9 @@ //! @file app_storage.h //! -//! Dumping ground for functions for discovering and managing apps stored in SPI flash in the 8 app banks. This will -//! eventually be replaced by app_file.h when we're ready to get rid of the 8-app limit, so this file shouldn't exist -//! in a few months. +//! Dumping ground for functions for discovering and managing apps stored in SPI flash in the 8 app +//! banks. This will eventually be replaced by app_file.h when we're ready to get rid of the 8-app +//! limit, so this file shouldn't exist in a few months. #define MAX_APP_BANKS 8 #define APP_FILENAME_MAX_LENGTH 32 @@ -40,8 +40,9 @@ typedef enum AppStorageGetAppInfoResult { //! @param app_id The app id for which the app metadata needs to be fetched. //! @param task PebbleTask_App or PebbleTask_Worker //! @return See AppStorageGetAppInfoResult -AppStorageGetAppInfoResult app_storage_get_process_info(PebbleProcessInfo* app_info, - uint8_t *build_id_out, AppInstallId app_id, PebbleTask task); +AppStorageGetAppInfoResult app_storage_get_process_info(PebbleProcessInfo *app_info, + uint8_t *build_id_out, AppInstallId app_id, + PebbleTask task); //! Remove related app files for app bank void app_storage_delete_app(AppInstallId id); @@ -59,6 +60,4 @@ void app_storage_get_file_name(char *name, size_t buf_length, AppInstallId app_i //! @param info pointer to a PebbleProcessInfo struct //! @param[out] load_size_out receives the computed size on success //! @return true if the size can be computed safely -bool app_storage_get_process_load_size(const PebbleProcessInfo *info, - size_t *load_size_out); - +bool app_storage_get_process_load_size(const PebbleProcessInfo *info, size_t *load_size_out); diff --git a/include/pbl/services/protobuf_log/protobuf_log.h b/include/pbl/services/protobuf_log/protobuf_log.h index e5aa4d5f1f..3c5bdb0fb9 100644 --- a/include/pbl/services/protobuf_log/protobuf_log.h +++ b/include/pbl/services/protobuf_log/protobuf_log.h @@ -22,32 +22,34 @@ typedef pebble_pipeline_MeasurementSet_Type ProtobufLogMeasurementType; typedef pebble_pipeline_ActivityType_InternalType ProtobufLogActivityType; -#define ProtobufLogMeasurementType_TimeMS pebble_pipeline_MeasurementSet_Type_TimeMS -#define ProtobufLogMeasurementType_VMC pebble_pipeline_MeasurementSet_Type_VMC -#define ProtobufLogMeasurementType_Steps pebble_pipeline_MeasurementSet_Type_Steps -#define ProtobufLogMeasurementType_DistanceCM pebble_pipeline_MeasurementSet_Type_DistanceCM -#define ProtobufLogMeasurementType_RestingGCalories pebble_pipeline_MeasurementSet_Type_RestingGCalories -#define ProtobufLogMeasurementType_ActiveGCalories pebble_pipeline_MeasurementSet_Type_ActiveGCalories -#define ProtobufLogMeasurementType_BPM pebble_pipeline_MeasurementSet_Type_BPM -#define ProtobufLogMeasurementType_RR pebble_pipeline_MeasurementSet_Type_RR -#define ProtobufLogMeasurementType_Orientation pebble_pipeline_MeasurementSet_Type_Orientation -#define ProtobufLogMeasurementType_Light pebble_pipeline_MeasurementSet_Type_Light -#define ProtobufLogMeasurementType_Temperature pebble_pipeline_MeasurementSet_Type_Temperature -#define ProtobufLogMeasurementType_HRQuality pebble_pipeline_MeasurementSet_Type_HRQuality +#define ProtobufLogMeasurementType_TimeMS pebble_pipeline_MeasurementSet_Type_TimeMS +#define ProtobufLogMeasurementType_VMC pebble_pipeline_MeasurementSet_Type_VMC +#define ProtobufLogMeasurementType_Steps pebble_pipeline_MeasurementSet_Type_Steps +#define ProtobufLogMeasurementType_DistanceCM pebble_pipeline_MeasurementSet_Type_DistanceCM +#define ProtobufLogMeasurementType_RestingGCalories \ + pebble_pipeline_MeasurementSet_Type_RestingGCalories +#define ProtobufLogMeasurementType_ActiveGCalories \ + pebble_pipeline_MeasurementSet_Type_ActiveGCalories +#define ProtobufLogMeasurementType_BPM pebble_pipeline_MeasurementSet_Type_BPM +#define ProtobufLogMeasurementType_RR pebble_pipeline_MeasurementSet_Type_RR +#define ProtobufLogMeasurementType_Orientation pebble_pipeline_MeasurementSet_Type_Orientation +#define ProtobufLogMeasurementType_Light pebble_pipeline_MeasurementSet_Type_Light +#define ProtobufLogMeasurementType_Temperature pebble_pipeline_MeasurementSet_Type_Temperature +#define ProtobufLogMeasurementType_HRQuality pebble_pipeline_MeasurementSet_Type_HRQuality #define ProtobufLogActivityType_UnknownType pebble_pipeline_ActivityType_InternalType_UnknownType -#define ProtobufLogActivityType_Sleep pebble_pipeline_ActivityType_InternalType_Sleep -#define ProtobufLogActivityType_DeepSleep pebble_pipeline_ActivityType_InternalType_DeepSleep -#define ProtobufLogActivityType_Nap pebble_pipeline_ActivityType_InternalType_Nap -#define ProtobufLogActivityType_DeepNap pebble_pipeline_ActivityType_InternalType_DeepNap -#define ProtobufLogActivityType_Walk pebble_pipeline_ActivityType_InternalType_Walk -#define ProtobufLogActivityType_Run pebble_pipeline_ActivityType_InternalType_Run -#define ProtobufLogActivityType_Open pebble_pipeline_ActivityType_InternalType_Open - -#define PLOG_MAX_SENDER_ID_LEN 64 -#define PLOG_MAX_SENDER_TYPE_LEN 64 -#define PLOG_MAX_SENDER_VERSION_PATCH_LEN FW_METADATA_VERSION_TAG_BYTES -#define PLOG_PAYLOAD_SENDER_TYPE "watch" +#define ProtobufLogActivityType_Sleep pebble_pipeline_ActivityType_InternalType_Sleep +#define ProtobufLogActivityType_DeepSleep pebble_pipeline_ActivityType_InternalType_DeepSleep +#define ProtobufLogActivityType_Nap pebble_pipeline_ActivityType_InternalType_Nap +#define ProtobufLogActivityType_DeepNap pebble_pipeline_ActivityType_InternalType_DeepNap +#define ProtobufLogActivityType_Walk pebble_pipeline_ActivityType_InternalType_Walk +#define ProtobufLogActivityType_Run pebble_pipeline_ActivityType_InternalType_Run +#define ProtobufLogActivityType_Open pebble_pipeline_ActivityType_InternalType_Open + +#define PLOG_MAX_SENDER_ID_LEN 64 +#define PLOG_MAX_SENDER_TYPE_LEN 64 +#define PLOG_MAX_SENDER_VERSION_PATCH_LEN FW_METADATA_VERSION_TAG_BYTES +#define PLOG_PAYLOAD_SENDER_TYPE "watch" // Size of the data logging records we use #define PLOG_DLS_RECORD_SIZE DLS_SESSION_MAX_BUFFERED_ITEM_SIZE @@ -80,8 +82,8 @@ typedef struct ProtobufLogConfig { ProtobufLogType type; union { struct { - uint8_t num_types; // number of readings in each measurement - ProtobufLogMeasurementType *types; // Array of measurement types. + uint8_t num_types; // number of readings in each measurement + ProtobufLogMeasurementType *types; // Array of measurement types. } measurements; struct { // empty for now @@ -95,7 +97,6 @@ typedef void *ProtobufLogRef; // Signature of the transport callback that can be optionally provided to protobuf_log_create() typedef bool (*ProtobufLogTransportCB)(uint8_t *buffer, size_t buf_size); - // Init the service // @return true if successful bool protobuf_log_init(void); @@ -108,8 +109,7 @@ bool protobuf_log_init(void); // a default size is used that fills the data logging record as fully as possible. Non-zero // values are mostly used for unit tests. // @return new session pointer, or NULL if error occurred -ProtobufLogRef protobuf_log_create(ProtobufLogConfig *config, - ProtobufLogTransportCB transport, +ProtobufLogRef protobuf_log_create(ProtobufLogConfig *config, ProtobufLogTransportCB transport, size_t max_encoded_msg_size); // Add a new measurement sample to the session. Once the amount of accumulated measurement data diff --git a/include/pbl/services/protobuf_log/protobuf_log_activity_sessions.h b/include/pbl/services/protobuf_log/protobuf_log_activity_sessions.h index 1a723593ae..ed603eb2d6 100644 --- a/include/pbl/services/protobuf_log/protobuf_log_activity_sessions.h +++ b/include/pbl/services/protobuf_log/protobuf_log_activity_sessions.h @@ -12,7 +12,7 @@ ProtobufLogRef protobuf_log_activity_sessions_create(void); bool protobuf_log_activity_sessions_add(ProtobufLogRef ref, time_t sample_utc, - ActivitySession *session); + ActivitySession *session); bool protobuf_log_activity_sessions_decode(pebble_pipeline_Event *event_in, ActivitySession *session_out); diff --git a/include/pbl/services/protobuf_log/protobuf_log_private.h b/include/pbl/services/protobuf_log/protobuf_log_private.h index 4337de01c3..82bc709d0a 100644 --- a/include/pbl/services/protobuf_log/protobuf_log_private.h +++ b/include/pbl/services/protobuf_log/protobuf_log_private.h @@ -23,13 +23,13 @@ typedef struct PLogSession { // TODO Change comments from MeasurementSet to MeasurementSet/Events ProtobufLogConfig config; - uint8_t *msg_buffer; // allocated buffer for the final record: PLogMessageHdr + Payload - uint8_t *data_buffer; // allocated buffer for the encoded data blob. (e.g. MeasurementSet) - // We form the MeasurementSet first, and then after it's complete we - // copy it into msg_buffer inside of a Payload - size_t max_msg_size; // max # of bytes to use in the allocated buffer - size_t max_data_size; // max allowed size of the encoded data blob - pb_ostream_t data_stream; // output stream we are writing the data blob to - time_t start_utc; // UTC time when session was created + uint8_t *msg_buffer; // allocated buffer for the final record: PLogMessageHdr + Payload + uint8_t *data_buffer; // allocated buffer for the encoded data blob. (e.g. MeasurementSet) + // We form the MeasurementSet first, and then after it's complete we + // copy it into msg_buffer inside of a Payload + size_t max_msg_size; // max # of bytes to use in the allocated buffer + size_t max_data_size; // max allowed size of the encoded data blob + pb_ostream_t data_stream; // output stream we are writing the data blob to + time_t start_utc; // UTC time when session was created ProtobufLogTransportCB transport; } PLogSession; diff --git a/include/pbl/services/protobuf_log/protobuf_log_test.h b/include/pbl/services/protobuf_log/protobuf_log_test.h index 0d30b58e01..78afe98953 100644 --- a/include/pbl/services/protobuf_log/protobuf_log_test.h +++ b/include/pbl/services/protobuf_log/protobuf_log_test.h @@ -34,25 +34,15 @@ // num_types * num_measurements values if num_values on entry was large enough // @param[out] // @return true on success, false on failure -bool protobuf_log_private_mset_decode(ProtobufLogType *type, - void *encoded_buf, - uint32_t encoded_buf_size, - char payload_sender_type[PLOG_MAX_SENDER_TYPE_LEN], - char payload_sender_id[PLOG_MAX_SENDER_ID_LEN], - char payload_sender_version_patch[FW_METADATA_VERSION_TAG_BYTES], - uint32_t *payload_send_time, - uint32_t *payload_sender_v_major, - uint32_t *payload_sender_v_minor, - Uuid *uuid, - uint32_t *time_utc, - uint32_t *time_end_utc, - int32_t *utc_to_local, - uint32_t *num_types, - ProtobufLogMeasurementType *types, - uint32_t *num_samples, - uint32_t *offset_sec, - uint32_t *num_values, - uint32_t *values); +bool protobuf_log_private_mset_decode( + ProtobufLogType *type, void *encoded_buf, uint32_t encoded_buf_size, + char payload_sender_type[PLOG_MAX_SENDER_TYPE_LEN], + char payload_sender_id[PLOG_MAX_SENDER_ID_LEN], + char payload_sender_version_patch[FW_METADATA_VERSION_TAG_BYTES], uint32_t *payload_send_time, + uint32_t *payload_sender_v_major, uint32_t *payload_sender_v_minor, Uuid *uuid, + uint32_t *time_utc, uint32_t *time_end_utc, int32_t *utc_to_local, uint32_t *num_types, + ProtobufLogMeasurementType *types, uint32_t *num_samples, uint32_t *offset_sec, + uint32_t *num_values, uint32_t *values); // --------------------------------------------------------------------------------------------- // Decode an encoded payload with events. Used for debugging and unit tests. @@ -75,17 +65,11 @@ bool protobuf_log_private_mset_decode(ProtobufLogType *type, // of type ActivitySession, then it's activity session will be at sessions[2]. // @param[out] // @return true on success, false on failure -bool protobuf_log_private_events_decode(ProtobufLogType *type, - void *encoded_buf, - uint32_t encoded_buf_size, - char payload_sender_type[PLOG_MAX_SENDER_TYPE_LEN], - char payload_sender_id[PLOG_MAX_SENDER_ID_LEN], - char payload_sender_version_patch[FW_METADATA_VERSION_TAG_BYTES], - uint32_t *payload_send_time, - uint32_t *payload_sender_v_major, - uint32_t *payload_sender_v_minor, - uint32_t *num_events, - pebble_pipeline_Event *events, - Uuid *event_uuids, - uint32_t *num_sessions, - ActivitySession *sessions); +bool protobuf_log_private_events_decode( + ProtobufLogType *type, void *encoded_buf, uint32_t encoded_buf_size, + char payload_sender_type[PLOG_MAX_SENDER_TYPE_LEN], + char payload_sender_id[PLOG_MAX_SENDER_ID_LEN], + char payload_sender_version_patch[FW_METADATA_VERSION_TAG_BYTES], uint32_t *payload_send_time, + uint32_t *payload_sender_v_major, uint32_t *payload_sender_v_minor, uint32_t *num_events, + pebble_pipeline_Event *events, Uuid *event_uuids, uint32_t *num_sessions, + ActivitySession *sessions); diff --git a/include/pbl/services/protobuf_log/protobuf_log_util.h b/include/pbl/services/protobuf_log/protobuf_log_util.h index abcc2e5b8f..910cac69d5 100644 --- a/include/pbl/services/protobuf_log/protobuf_log_util.h +++ b/include/pbl/services/protobuf_log/protobuf_log_util.h @@ -20,25 +20,24 @@ typedef struct PLogBufferEncoderArg { // ----------------------------------------------------------------------------------------- // Callback used to stuff in the uuid -bool protobuf_log_util_encode_uuid(pb_ostream_t *stream, const pb_field_t *field, - void * const *arg); +bool protobuf_log_util_encode_uuid(pb_ostream_t *stream, const pb_field_t *field, void *const *arg); // ----------------------------------------------------------------------------------------- // Callback used to stuff in a string bool protobuf_log_util_encode_string(pb_ostream_t *stream, const pb_field_t *field, - void * const *arg); + void *const *arg); // ----------------------------------------------------------------------------------------- // Callback used to stuff in a packed array of varints bool protobuf_log_util_encode_packed_varints(pb_ostream_t *stream, const pb_field_t *field, - void * const *arg); + void *const *arg); // ----------------------------------------------------------------------------------------- // Callback used to stuff in the array of types bool protobuf_log_util_encode_measurement_types(pb_ostream_t *stream, const pb_field_t *field, - void * const *arg); + void *const *arg); // ----------------------------------------------------------------------------------------- // Callback used to stuff in a data buffer. Useful for MeasurementSets or Events bool protobuf_log_util_encode_buffer(pb_ostream_t *stream, const pb_field_t *field, - void * const *arg); + void *const *arg); diff --git a/include/pbl/services/put_bytes/put_bytes_storage.h b/include/pbl/services/put_bytes/put_bytes_storage.h index 69e88b6754..16e6f7986f 100644 --- a/include/pbl/services/put_bytes/put_bytes_storage.h +++ b/include/pbl/services/put_bytes/put_bytes_storage.h @@ -32,8 +32,8 @@ typedef struct { //! @param offset the offset within the storage we'd like to write to //! @param buffer the data to write //! @param length the amount of data to write -void pb_storage_write(PutBytesStorage *storage, uint32_t offset, - const uint8_t *buffer, uint32_t length); +void pb_storage_write(PutBytesStorage *storage, uint32_t offset, const uint8_t *buffer, + uint32_t length); //! Append data to the end of a putbyte storage. Updates storage->bytes_written //! @param storage A pointer to the storage struct representing the underlying storage @@ -42,7 +42,7 @@ void pb_storage_write(PutBytesStorage *storage, uint32_t offset, void pb_storage_append(PutBytesStorage *storage, const uint8_t *buffer, uint32_t length); typedef enum { - PutBytesCrcType_Legacy = 0, // See 'legacy_defective_checksum' calculation + PutBytesCrcType_Legacy = 0, // See 'legacy_defective_checksum' calculation PutBytesCrcType_CRC32, } PutBytesCrcType; @@ -60,8 +60,8 @@ uint32_t pb_storage_calculate_crc(PutBytesStorage *storage, PutBytesCrcType crc_ //! @param append_offset if != 0, this means we are continuing a PB operation that previously failed //! for some reason. The incoming writes will start at this offset //! @param info additional information about the data (see PutBytesStorageInfo). -bool pb_storage_init(PutBytesStorage *storage, PutBytesObjectType object_type, - uint32_t total_size, PutBytesStorageInfo *info, uint32_t append_offset); +bool pb_storage_init(PutBytesStorage *storage, PutBytesObjectType object_type, uint32_t total_size, + PutBytesStorageInfo *info, uint32_t append_offset); //! Deinitialize and free a storage struct after a transaction is over //! @param storage a pointer-to-pointer to where the reference to the storage is currently held diff --git a/include/pbl/services/put_bytes/put_bytes_storage_internal.h b/include/pbl/services/put_bytes/put_bytes_storage_internal.h index 5fb8063ed7..0680cf3c12 100644 --- a/include/pbl/services/put_bytes/put_bytes_storage_internal.h +++ b/include/pbl/services/put_bytes/put_bytes_storage_internal.h @@ -8,8 +8,8 @@ #include typedef struct PutBytesStorageImplementation { - bool (*init)(PutBytesStorage *storage, PutBytesObjectType object_type, - uint32_t total_size, PutBytesStorageInfo *info, uint32_t append_offset); + bool (*init)(PutBytesStorage *storage, PutBytesObjectType object_type, uint32_t total_size, + PutBytesStorageInfo *info, uint32_t append_offset); uint32_t (*get_max_size)(PutBytesObjectType object_type); diff --git a/include/pbl/services/put_bytes/put_bytes_storage_raw.h b/include/pbl/services/put_bytes/put_bytes_storage_raw.h index 6151a4f73f..1b62ea27e2 100644 --- a/include/pbl/services/put_bytes/put_bytes_storage_raw.h +++ b/include/pbl/services/put_bytes/put_bytes_storage_raw.h @@ -17,8 +17,6 @@ void pb_storage_raw_write(PutBytesStorage *storage, uint32_t offset, const uint8 uint32_t pb_storage_raw_calculate_crc(PutBytesStorage *storage, PutBytesCrcType crc_type); - void pb_storage_raw_deinit(PutBytesStorage *storage, bool is_success); - -bool pb_storage_raw_get_status(PutBytesObjectType obj_type, PbInstallStatus *status); +bool pb_storage_raw_get_status(PutBytesObjectType obj_type, PbInstallStatus *status); diff --git a/include/pbl/services/registry_endpoint.h b/include/pbl/services/registry_endpoint.h index 29b8a11e19..34b7dcb3c5 100644 --- a/include/pbl/services/registry_endpoint.h +++ b/include/pbl/services/registry_endpoint.h @@ -8,6 +8,8 @@ typedef enum { RegistryEndpointIdFactory = 5001, } RegistryEndpointId; -void registry_endpoint_callback(CommSession *session, const uint8_t* data, unsigned int length_bytes); +void registry_endpoint_callback(CommSession *session, const uint8_t *data, + unsigned int length_bytes); -void factory_registry_endpoint_callback(CommSession *session, const uint8_t* data, unsigned int length_bytes); +void factory_registry_endpoint_callback(CommSession *session, const uint8_t *data, + unsigned int length_bytes); diff --git a/include/pbl/services/regular_timer.h b/include/pbl/services/regular_timer.h index 32fc7115db..07e647c90d 100644 --- a/include/pbl/services/regular_timer.h +++ b/include/pbl/services/regular_timer.h @@ -5,14 +5,15 @@ #include "pbl/util/list.h" -typedef void (*RegularTimerCallback)(void* data); +typedef void (*RegularTimerCallback)(void *data); typedef struct RegularTimerInfo { ListNode list_node; RegularTimerCallback cb; - void* cb_data; + void *cb_data; - // the following fields are for internal use by the regular timer service and should not be touched + // the following fields are for internal use by the regular timer service and should not be + // touched uint16_t private_reset_count; uint16_t private_count; bool is_executing; @@ -22,23 +23,24 @@ typedef struct RegularTimerInfo { void regular_timer_init(void); //! Add a callback that will be called every second. -void regular_timer_add_seconds_callback(RegularTimerInfo* cb); -//! Add a callback that will be called every n seconds. This can also be called to change the schedule of an existing -//! seconds timer, from inside or outside the callback procedure. -void regular_timer_add_multisecond_callback(RegularTimerInfo* cb, uint16_t seconds); +void regular_timer_add_seconds_callback(RegularTimerInfo *cb); +//! Add a callback that will be called every n seconds. This can also be called to change the +//! schedule of an existing seconds timer, from inside or outside the callback procedure. +void regular_timer_add_multisecond_callback(RegularTimerInfo *cb, uint16_t seconds); //! Add a callback that will be called every minute -void regular_timer_add_minutes_callback(RegularTimerInfo* cb); -//! Add a callback that will be called every n minutes. This can also be called to change the schedule of an existing -//! minute timer, from inside or outside the callback procedure. -void regular_timer_add_multiminute_callback(RegularTimerInfo* cb, uint16_t minutes); +void regular_timer_add_minutes_callback(RegularTimerInfo *cb); +//! Add a callback that will be called every n minutes. This can also be called to change the +//! schedule of an existing minute timer, from inside or outside the callback procedure. +void regular_timer_add_multiminute_callback(RegularTimerInfo *cb, uint16_t minutes); //! Remove a callback already registered for either seconds or minutes. -//! WARNING: If you call this from your callback procedure, you are NOT allowed to free up the memory used for +//! WARNING: If you call this from your callback procedure, you are NOT allowed to free up the +//! memory used for //! the RegularTimerInfo structure until after your callback exits! //! @return true iff the timer was successfully stopped (false may indicate no timer was //! scheduled at all or the cb is currently executing) -bool regular_timer_remove_callback(RegularTimerInfo* cb); +bool regular_timer_remove_callback(RegularTimerInfo *cb); //! Check if a regular timer is currently scheduled //! @param cb pointer to the RegularTimerInfo struct for the timer @@ -53,7 +55,6 @@ bool regular_timer_is_scheduled(RegularTimerInfo *cb); //! @param cb pointer to the RegularTimerInfo struct for the timer bool regular_timer_pending_deletion(RegularTimerInfo *cb); - // ----------------------------------------------------------------------------- // For testing: diff --git a/include/pbl/services/runlevel.h b/include/pbl/services/runlevel.h index 9a9a7f89ed..118fed931f 100644 --- a/include/pbl/services/runlevel.h +++ b/include/pbl/services/runlevel.h @@ -61,4 +61,3 @@ typedef enum RunLevel { } RunLevel; void services_set_runlevel(RunLevel runlevel); - diff --git a/include/pbl/services/runlevel_impl.h b/include/pbl/services/runlevel_impl.h index e0b25a7255..5408fc4bb9 100644 --- a/include/pbl/services/runlevel_impl.h +++ b/include/pbl/services/runlevel_impl.h @@ -20,11 +20,12 @@ // files for which enable-masks are defined, the potential for namespace // pollution is minimized. -#define RUNLEVEL(number, name) _Static_assert( \ - 0 <= number && number <= 31, \ - "The numeric value of runlevel " #name " (" #number ")" \ - " is out of range. Only runlevels in the range 0 <= level <= 31" \ - " are supported."); +#define RUNLEVEL(number, name) \ + _Static_assert(0 <= number && number <= 31, \ + "The numeric value of runlevel " #name " (" #number \ + ")" \ + " is out of range. Only runlevels in the range 0 <= level <= 31" \ + " are supported."); #include "runlevel.def" #undef RUNLEVEL diff --git a/include/pbl/services/settings/settings_file.h b/include/pbl/services/settings/settings_file.h index be383483d8..0169daf7a6 100644 --- a/include/pbl/services/settings/settings_file.h +++ b/include/pbl/services/settings/settings_file.h @@ -71,28 +71,25 @@ typedef struct SettingsFile { int cur_record_pos; } SettingsFile; - //! max_used_space should be >= 5317 for persist files to make sure we can //! always fit all of the records in the worst case (if the programmer stored //! nothing but booleans). //! Note: If the settings file already exists, the max_used_space parameter is //! ignored. We could change this if the need arises. -status_t settings_file_open(SettingsFile *file, const char *name, - int max_used_space); -status_t settings_file_open_growable(SettingsFile *file, const char *name, - int max_used_space, int initial_alloc_size); +status_t settings_file_open(SettingsFile *file, const char *name, int max_used_space); +status_t settings_file_open_growable(SettingsFile *file, const char *name, int max_used_space, + int initial_alloc_size); void settings_file_close(SettingsFile *file); bool settings_file_exists(SettingsFile *file, const void *key, size_t key_len); -status_t settings_file_delete(SettingsFile *file, - const void *key, size_t key_len); +status_t settings_file_delete(SettingsFile *file, const void *key, size_t key_len); int settings_file_get_len(SettingsFile *file, const void *key, size_t key_len); //! val_out_len must exactly match the length of the record on disk. -status_t settings_file_get(SettingsFile *file, const void *key, size_t key_len, - void *val_out, size_t val_out_len); -status_t settings_file_set(SettingsFile *file, const void *key, size_t key_len, - const void *val, size_t val_len); +status_t settings_file_get(SettingsFile *file, const void *key, size_t key_len, void *val_out, + size_t val_out_len); +status_t settings_file_set(SettingsFile *file, const void *key, size_t key_len, const void *val, + size_t val_len); //! Set a record with a specific timestamp instead of the current time. //! This is useful when rewriting files and preserving original timestamps. @@ -132,17 +129,13 @@ void settings_file_set_change_callback(SettingsFileChangeCallback callback); //! set a byte in a setting. This can only be used a byte at a time to guarantee //! atomicity. Do not use to modify several bytes in a row! //! Note that only the reset bits will be applied (it writes flash directly) -status_t settings_file_set_byte( - SettingsFile *file, const void *key, size_t key_len, - size_t offset, uint8_t byte); - - +status_t settings_file_set_byte(SettingsFile *file, const void *key, size_t key_len, size_t offset, + uint8_t byte); - ////////////////// - // Each/rewrite // ////////////////// -typedef void (*SettingsFileGetter)(SettingsFile *file, - void *buf, size_t buf_len); +// Each/rewrite // +////////////////// +typedef void (*SettingsFileGetter)(SettingsFile *file, void *buf, size_t buf_len); typedef struct { uint32_t last_modified; @@ -150,37 +143,29 @@ typedef struct { int key_len; SettingsFileGetter get_val; int val_len; - bool dirty; // has the dirty flag set + bool dirty; // has the dirty flag set } SettingsRecordInfo; //! Callback used for using settings_file_each. //! The bool returned is used to control the iteration. //! - If a callback returns true, the iteration continues //! - If a callback returns false, the iteration stops. -typedef bool (*SettingsFileEachCallback)(SettingsFile *file, - SettingsRecordInfo *info, +typedef bool (*SettingsFileEachCallback)(SettingsFile *file, SettingsRecordInfo *info, void *context); //! Calls cb for each and every entry within the given file. //! Note that you cannot modify the settings file while iterating. If you want //! to do this, try settings_file_rewrite instead. (you can read other entries //! without fault). -status_t settings_file_each(SettingsFile *file, SettingsFileEachCallback cb, - void *context); - +status_t settings_file_each(SettingsFile *file, SettingsFileEachCallback cb, void *context); -typedef void (*SettingsFileRewriteCallback)(SettingsFile *old_file, - SettingsFile *new_file, - SettingsRecordInfo *info, - void *context); +typedef void (*SettingsFileRewriteCallback)(SettingsFile *old_file, SettingsFile *new_file, + SettingsRecordInfo *info, void *context); //! Opens a new SettingsFile with the same name as the original SettingsFile, //! in overwrite mode. This new file is passed into the given //! SettingsFileRewriteCallback, which is called for each entry within the //! original file. If you desire to preserve a key/value pair, you must write //! it to the new file. -status_t settings_file_rewrite(SettingsFile *file, - SettingsFileRewriteCallback cb, - void *context); - +status_t settings_file_rewrite(SettingsFile *file, SettingsFileRewriteCallback cb, void *context); //! Callback used for using settings_file_rewrite_filtered. //! The bool returned is used to control whether or not the record is included in the file diff --git a/include/pbl/services/settings/settings_raw_iter.h b/include/pbl/services/settings/settings_raw_iter.h index 27dd6ade3c..8513142028 100644 --- a/include/pbl/services/settings/settings_raw_iter.h +++ b/include/pbl/services/settings/settings_raw_iter.h @@ -17,23 +17,22 @@ #define SETTINGS_FILE_VERSION 1 typedef struct PACKED { - uint32_t magic; // = "set" + uint32_t magic; // = "set" uint16_t version; uint16_t flags; } SettingsFileHeader; -_Static_assert( - sizeof((SettingsFileHeader) {}.magic) == sizeof(SETTINGS_FILE_MAGIC), - "The magic has been broken!"); +_Static_assert(sizeof((SettingsFileHeader){}.magic) == sizeof(SETTINGS_FILE_MAGIC), + "The magic has been broken!"); -#define SETTINGS_FLAG_WRITE_COMPLETE (1 << 0) -#define SETTINGS_FLAG_OVERWRITE_STARTED (1 << 1) -#define SETTINGS_FLAG_OVERWRITE_COMPLETE (1 << 2) +#define SETTINGS_FLAG_WRITE_COMPLETE (1 << 0) +#define SETTINGS_FLAG_OVERWRITE_STARTED (1 << 1) +#define SETTINGS_FLAG_OVERWRITE_COMPLETE (1 << 2) // Indicate that a record is in sync with the phone -#define SETTINGS_FLAG_SYNCED (1 << 3) +#define SETTINGS_FLAG_SYNCED (1 << 3) #define SETTINGS_KEY_MAX_LEN 127 -#define SETTINGS_VAL_MAX_LEN (SETTINGS_EOF_MARKER - 1) // we reserve the largest value for EOF +#define SETTINGS_VAL_MAX_LEN (SETTINGS_EOF_MARKER - 1) // we reserve the largest value for EOF #define KEY_LEN_BITS 7 #define VAL_LEN_BITS 11 @@ -42,14 +41,14 @@ _Static_assert( #define SETTINGS_EOF_MARKER ((1 << VAL_LEN_BITS) - 1) _Static_assert(KEY_LEN_BITS + VAL_LEN_BITS + FLAGS_BITS == 24, - "The record header bitfields must add up to 24!"); + "The record header bitfields must add up to 24!"); typedef struct PACKED { - uint32_t last_modified; - uint8_t key_hash; - uint8_t flags:FLAGS_BITS; - unsigned int key_len:KEY_LEN_BITS; - unsigned int val_len:VAL_LEN_BITS; + uint32_t last_modified; + uint8_t key_hash; + uint8_t flags : FLAGS_BITS; + unsigned int key_len : KEY_LEN_BITS; + unsigned int val_len : VAL_LEN_BITS; } SettingsRecordHeader; // A SettingsRawIter is just a more convenient interface for the underlying file @@ -62,22 +61,22 @@ typedef struct PACKED { // as a header, reading past the end of a key/value, or other nefarious // things. typedef struct { - const char *file_name; - int fd; - SettingsFileHeader file_hdr; + const char *file_name; + int fd; + SettingsFileHeader file_hdr; // Header for the record we are currently on. SettingsRecordHeader hdr; // - Offset within the file pointing to the beginning of a `SettingsRecordHeader` // - The header it points to is the one where our iterator is. // - Used to make sure we can always skip to the next record properly. - int hdr_pos; + int hdr_pos; // - Offset within the file pointing to the beginning of a `SettingsRecordHeader` // - The header it points to is the one where we began/resumed searching from. // - Only gets changed when calling `settings_raw_iter_(being|resume)` // - Used to allow wrapping from the end to the beginning when searching // for a specific record. - int resumed_pos; + int resumed_pos; } SettingsRawIter; //! Initialize the iterator for use with the given fd. diff --git a/include/pbl/services/shared_prf_storage/shared_prf_storage.h b/include/pbl/services/shared_prf_storage/shared_prf_storage.h index a2182e44bc..107f1ea823 100644 --- a/include/pbl/services/shared_prf_storage/shared_prf_storage.h +++ b/include/pbl/services/shared_prf_storage/shared_prf_storage.h @@ -41,18 +41,15 @@ void shared_prf_storage_set_root_keys(SM128BitKey *keys_in); //! Returns true if there is a valid pairing, otherwise false. //! Out params are only valid if the function returns true //! Pass in NULL for any values that you aren't interested in -bool shared_prf_storage_get_ble_pairing_data(SMPairingInfo *pairing_info_out, - char *name_out, bool *requires_address_pinning_out, - uint8_t *flags); +bool shared_prf_storage_get_ble_pairing_data(SMPairingInfo *pairing_info_out, char *name_out, + bool *requires_address_pinning_out, uint8_t *flags); //! @param pairing_info Data structure containing all the pairing info available. //! @param name Optional device name to store. Pass NULL if not available. //! @param requires_address_pinning Whether the pairing requires address pinning. //! @param flags Pairing flags to store. -void shared_prf_storage_store_ble_pairing_data(const SMPairingInfo *pairing_info, - const char *name, - bool requires_address_pinning, - uint8_t flags); +void shared_prf_storage_store_ble_pairing_data(const SMPairingInfo *pairing_info, const char *name, + bool requires_address_pinning, uint8_t flags); void shared_prf_storage_erase_ble_pairing_data(void); @@ -80,8 +77,7 @@ bool shared_prf_storage_get_bt_classic_pairing_data(BTDeviceAddress *addr_out, void shared_prf_storage_store_bt_classic_pairing_data(BTDeviceAddress *addr, const char *device_name, - SM128BitKey *link_key, - uint8_t platform_bits); + SM128BitKey *link_key, uint8_t platform_bits); void shared_prf_storage_store_platform_bits(uint8_t platform_bits); diff --git a/include/pbl/services/shared_prf_storage/v2_sprf/shared_prf_storage_private.h b/include/pbl/services/shared_prf_storage/v2_sprf/shared_prf_storage_private.h index 85d7f4fd1b..71ba6bed93 100644 --- a/include/pbl/services/shared_prf_storage/v2_sprf/shared_prf_storage_private.h +++ b/include/pbl/services/shared_prf_storage/v2_sprf/shared_prf_storage_private.h @@ -35,17 +35,17 @@ typedef struct PACKED { SM128BitKey csrk; //! True if local_div and local_ediv are valid - bool is_local_encryption_info_valid:1; + bool is_local_encryption_info_valid : 1; //! True if ltk, rand and ediv are valid - bool is_remote_encryption_info_valid:1; + bool is_remote_encryption_info_valid : 1; //! True if irk and identity are valid - bool is_remote_identity_info_valid:1; + bool is_remote_identity_info_valid : 1; //! True if csrk is valid //! @note Since iOS 9, CSRK is no longer exchanged. - bool is_remote_signing_info_valid:1; + bool is_remote_signing_info_valid : 1; } BLEPairingData; typedef struct PACKED { diff --git a/include/pbl/services/shared_prf_storage/v3_sprf/shared_prf_storage_private.h b/include/pbl/services/shared_prf_storage/v3_sprf/shared_prf_storage_private.h index 6ac90dbdcd..584b8aeb1c 100644 --- a/include/pbl/services/shared_prf_storage/v3_sprf/shared_prf_storage_private.h +++ b/include/pbl/services/shared_prf_storage/v3_sprf/shared_prf_storage_private.h @@ -11,17 +11,16 @@ #define SPRF_MAX_NUM_PAGES_MULT(num) ((num) * 3 / 4) typedef enum { - SprfValidFields_LocalEncryptionInfoValid = (1 << 0), + SprfValidFields_LocalEncryptionInfoValid = (1 << 0), SprfValidFields_RemoteEncryptionInfoValid = (1 << 1), - SprfValidFields_RemoteIdentityInfoValid = (1 << 2), - SprfValidFields_RemoteSigningInfoValid = (1 << 3), + SprfValidFields_RemoteIdentityInfoValid = (1 << 2), + SprfValidFields_RemoteSigningInfoValid = (1 << 3), } SprfValidFields; #ifndef __clang__ _Static_assert(sizeof(SprfValidFields) == 1, "SprfValidFields unexpected size"); #endif - typedef enum { SprfMagic_ValidEntry = 0x46525053, SprfMagic_UnpopulatedEntry = 0xFFFFFFFF, @@ -64,10 +63,10 @@ typedef struct PACKED SprfRootKeys { _Static_assert(offsetof(SprfRootKeys, crc) == 0, "crc must be the first field"); typedef struct PACKED SprfBlePairingData { - uint32_t crc; // CRC over the 'pairing_data' struct ('name' through 'fields') + uint32_t crc; // CRC over the 'pairing_data' struct ('name' through 'fields') // local encryption data - SMLongTermKey l_ltk; // 16 byte key + SMLongTermKey l_ltk; // 16 byte key uint64_t l_rand; uint16_t l_ediv; @@ -76,11 +75,11 @@ typedef struct PACKED SprfBlePairingData { SMLongTermKey r_ltk; uint64_t r_rand; - SMIdentityResolvingKey irk; // 16 byte key - SMConnectionSignatureResolvingKey csrk; // 16 byte key + SMIdentityResolvingKey irk; // 16 byte key + SMConnectionSignatureResolvingKey csrk; // 16 byte key BTDeviceInternal identity; - SprfValidFields fields:8; + SprfValidFields fields : 8; bool is_mitm_protection_enabled; bool requires_address_pinning; diff --git a/include/pbl/services/speaker/note_sequence.h b/include/pbl/services/speaker/note_sequence.h index 70460e3cec..8aac1faacd 100644 --- a/include/pbl/services/speaker/note_sequence.h +++ b/include/pbl/services/speaker/note_sequence.h @@ -34,8 +34,8 @@ typedef struct { uint32_t num_notes; uint32_t current_note; uint32_t samples_remaining; - uint32_t phase_acc; // 16.16 fixed-point phase accumulator - uint32_t phase_inc; // per-sample phase increment + uint32_t phase_acc; // 16.16 fixed-point phase accumulator + uint32_t phase_inc; // per-sample phase increment uint8_t current_waveform; uint8_t current_velocity; bool active; diff --git a/include/pbl/services/speaker/speaker_finish_reason.h b/include/pbl/services/speaker/speaker_finish_reason.h index 910e2e590f..e06d420945 100644 --- a/include/pbl/services/speaker/speaker_finish_reason.h +++ b/include/pbl/services/speaker/speaker_finish_reason.h @@ -5,8 +5,8 @@ //! Reason reported when speaker playback ends. typedef enum { - SpeakerFinishReasonDone = 0, //!< Playback completed naturally - SpeakerFinishReasonStopped, //!< Playback was stopped by the app - SpeakerFinishReasonPreempted, //!< Preempted by higher priority source - SpeakerFinishReasonError, //!< An error occurred + SpeakerFinishReasonDone = 0, //!< Playback completed naturally + SpeakerFinishReasonStopped, //!< Playback was stopped by the app + SpeakerFinishReasonPreempted, //!< Preempted by higher priority source + SpeakerFinishReasonError, //!< An error occurred } SpeakerFinishReason; diff --git a/include/pbl/services/speaker/speaker_service.h b/include/pbl/services/speaker/speaker_service.h index 24468812f9..817a431e68 100644 --- a/include/pbl/services/speaker/speaker_service.h +++ b/include/pbl/services/speaker/speaker_service.h @@ -22,7 +22,7 @@ typedef enum { typedef enum { SpeakerStateIdle = 0, SpeakerStatePlaying, - SpeakerStateDraining, // source exhausted, playing remaining queued data + SpeakerStateDraining, // source exhausted, playing remaining queued data } SpeakerState; typedef enum { @@ -53,9 +53,8 @@ bool speaker_service_play_note_seq(const SpeakerNote *notes, uint32_t num_notes, //! @param pri Priority level //! @param vol Volume (0-100) //! @return true if playback started, false if preempted by higher priority -bool speaker_service_play_tone(uint16_t freq_hz, uint16_t duration_ms, - uint8_t waveform, uint8_t velocity, - SpeakerPriority pri, uint8_t vol); +bool speaker_service_play_tone(uint16_t freq_hz, uint16_t duration_ms, uint8_t waveform, + uint8_t velocity, SpeakerPriority pri, uint8_t vol); //! Play a short fixed tone at an absolute output volume, bypassing the user's //! speaker-volume preference, so settings UIs can preview a candidate volume diff --git a/include/pbl/services/system_task.h b/include/pbl/services/system_task.h index 0e5bad2dd7..0879156304 100644 --- a/include/pbl/services/system_task.h +++ b/include/pbl/services/system_task.h @@ -16,17 +16,19 @@ void system_task_init(void); void system_task_timer_init(void); -//! If your callback running on the system task takes awhile to run, call this regularly to show that -//! you're still alive. +//! If your callback running on the system task takes awhile to run, call this regularly to show +//! that you're still alive. void system_task_watchdog_feed(void); typedef void (*SystemTaskEventCallback)(void *data); //! @param cb Callback function that will later be called from the system task //! @param data Context pointer passed to the callback -//! @param should_context_switch A boolean that indicates our ISR should context switch at the end instead of +//! @param should_context_switch A boolean that indicates our ISR should context switch at the end +//! instead of //! resuming the previous task. -bool system_task_add_callback_from_isr(SystemTaskEventCallback cb, void *data, bool* should_context_switch); +bool system_task_add_callback_from_isr(SystemTaskEventCallback cb, void *data, + bool *should_context_switch); //! Same as system_task_add_callback_from_isr(), except a full queue drops the callback and //! returns false instead of resetting the system. Only use this when losing the callback is @@ -45,7 +47,7 @@ void system_task_block_callbacks(bool block); uint32_t system_task_get_available_space(void); //! Debug! Return the callback we're currently executing. -void* system_task_get_current_callback(void); +void *system_task_get_current_callback(void); //! @param is_raised When true, priority of the KernelBG task is raised to a higher priority. When //! false, the priority is set to the normal priority. diff --git a/include/pbl/services/timeline/actions_endpoint.h b/include/pbl/services/timeline/actions_endpoint.h index f789265cbd..6e42c82897 100644 --- a/include/pbl/services/timeline/actions_endpoint.h +++ b/include/pbl/services/timeline/actions_endpoint.h @@ -20,5 +20,5 @@ void timeline_action_endpoint_invoke_action(const Uuid *id, TimelineItemActionTy bool do_async); //! Handles messages from the phone sent to the timeline action endpoint -void timeline_action_endpoint_protocol_msg_callback(CommSession *session, const uint8_t* data, +void timeline_action_endpoint_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length); diff --git a/include/pbl/services/timeline/attribute.h b/include/pbl/services/timeline/attribute.h index 32d37ed610..a08c76ccfd 100644 --- a/include/pbl/services/timeline/attribute.h +++ b/include/pbl/services/timeline/attribute.h @@ -111,7 +111,8 @@ typedef enum { AttributeIdSubtitleTemplateString = 47, //! Generic icon. AttributeIdIcon = 48, - //! (Uint32List) Custom vibration pattern for a notification, used with vibes_enqueue_custom_pattern + //! (Uint32List) Custom vibration pattern for a notification, used with + //! vibes_enqueue_custom_pattern AttributeIdVibrationPattern = 49, //! (uint32_t) Timestamp when the mute should expire. AttributeIdMuteExpiration = 50, @@ -208,8 +209,7 @@ void attribute_list_add_uint32(AttributeList *list, AttributeId id, uint32_t uin //! @param list pointer to the attribute list //! @param id AttributeID of the attribute to add //! @param resource_id value to store as the content of the attribute -void attribute_list_add_resource_id(AttributeList *list, AttributeId id, - uint32_t resource_id); +void attribute_list_add_resource_id(AttributeList *list, AttributeId id, uint32_t resource_id); //! Append an attribute or replace an existing one in an attribute list. //! @param list pointer to the attribute list @@ -263,8 +263,8 @@ Attribute *attribute_find(const AttributeList *attr_list, AttributeId id); //! @param id the attribute id of the desired attribute //! @param default_value the value to return if not found //! @return a pointer to the string, default_value if not found -const char *attribute_get_string(const AttributeList *attr_list, - AttributeId id, char *default_value); +const char *attribute_get_string(const AttributeList *attr_list, AttributeId id, + char *default_value); //! Find a string list attribute in an attribute list by attribute ID //! @param attr_list a pointer to an attribute list @@ -277,16 +277,15 @@ StringList *attribute_get_string_list(const AttributeList *attr_list, AttributeI //! @param id the attribute id of the desired attribute //! @param default_value the value to return if not found //! @return the uint8 attribute value, default_value if not found -uint8_t attribute_get_uint8(const AttributeList *attr_list, - AttributeId id, uint8_t default_value); +uint8_t attribute_get_uint8(const AttributeList *attr_list, AttributeId id, uint8_t default_value); //! Find a uint32 attribute in a list by attribute ID //! @param attr_list a pointer to an attribute list //! @param id the attribute id of the desired attribute //! @param default_value the value to return if not found //! @return the uint32 attribute value, default_value if not found -uint32_t attribute_get_uint32(const AttributeList *attr_list, - AttributeId id, uint32_t default_value); +uint32_t attribute_get_uint32(const AttributeList *attr_list, AttributeId id, + uint32_t default_value); //! Find a Uint32List attribute in a list by attribute id //! @param attr_list a pointer to an attribute list @@ -306,12 +305,13 @@ size_t attribute_list_get_serialized_size(const AttributeList *attr_list); //! Check whether a serialized list is well-formed and output which attributes it contains bool attribute_check_serialized_list(const uint8_t *cursor, const uint8_t *val_end, - uint8_t num_attributes, bool has_attribute[]); + uint8_t num_attributes, bool has_attribute[]); //! number of required bytes for in-memory representation of a list of a serialized attributes int32_t attribute_get_buffer_size_for_serialized_attributes(uint8_t num_attributes, - const uint8_t **cursor, const uint8_t *end); + const uint8_t **cursor, + const uint8_t *end); //! true, if successfully transforms a serialized attribute into in-memory representation -bool attribute_deserialize_list(char **buffer, char *const buf_end, - const uint8_t **cursor, const uint8_t *payload_end, AttributeList attr_list); +bool attribute_deserialize_list(char **buffer, char *const buf_end, const uint8_t **cursor, + const uint8_t *payload_end, AttributeList attr_list); diff --git a/include/pbl/services/timeline/attribute_group.h b/include/pbl/services/timeline/attribute_group.h index ae548afda0..48c2686b6b 100644 --- a/include/pbl/services/timeline/attribute_group.h +++ b/include/pbl/services/timeline/attribute_group.h @@ -20,45 +20,28 @@ typedef enum { AttributeGroupType_Address, } AttributeGroupType; - //! Documentation for these functions and their params can be found in the wrapping files -bool attribute_group_parse_serial_data(AttributeGroupType type, - uint8_t num_attributes, - uint8_t num_group_type_elements, - const uint8_t *data, - size_t size, - size_t *string_alloc_size_out, +bool attribute_group_parse_serial_data(AttributeGroupType type, uint8_t num_attributes, + uint8_t num_group_type_elements, const uint8_t *data, + size_t size, size_t *string_alloc_size_out, uint8_t *attributes_per_group_type_element_out); -size_t attribute_group_get_required_buffer_size(AttributeGroupType type, - uint8_t num_attributes, +size_t attribute_group_get_required_buffer_size(AttributeGroupType type, uint8_t num_attributes, uint8_t num_group_type_elements, const uint8_t *attributes_per_group_type_element, size_t required_size_for_strings); -void attribute_group_init(AttributeGroupType type, - AttributeList *attr_list, - void *group_ptr, - uint8_t **buffer, - uint8_t num_attributes, - uint8_t num_group_type_elements, +void attribute_group_init(AttributeGroupType type, AttributeList *attr_list, void *group_ptr, + uint8_t **buffer, uint8_t num_attributes, uint8_t num_group_type_elements, const uint8_t *attributes_per_group_type_element); -bool attribute_group_deserialize(AttributeGroupType type, - AttributeList *attr_list, - void *group_ptr, - uint8_t *buffer, - uint8_t *buf_end, - const uint8_t *payload, +bool attribute_group_deserialize(AttributeGroupType type, AttributeList *attr_list, void *group_ptr, + uint8_t *buffer, uint8_t *buf_end, const uint8_t *payload, size_t payload_size); size_t attribute_group_get_serialized_payload_size(AttributeGroupType type, - AttributeList *attr_list, - void *group_ptr); + AttributeList *attr_list, void *group_ptr); -size_t attribute_group_serialize_payload(AttributeGroupType type, - AttributeList *attr_list, - void *group_ptr, - uint8_t *buffer, - size_t buffer_size); +size_t attribute_group_serialize_payload(AttributeGroupType type, AttributeList *attr_list, + void *group_ptr, uint8_t *buffer, size_t buffer_size); diff --git a/include/pbl/services/timeline/attributes_actions.h b/include/pbl/services/timeline/attributes_actions.h index 660cb1d71d..7f8844a431 100644 --- a/include/pbl/services/timeline/attributes_actions.h +++ b/include/pbl/services/timeline/attributes_actions.h @@ -18,10 +18,8 @@ //! @param attributes_per_action_out an array of counts for the number of attributes per action //! in order corresponding to action order //! @return True if the data was parsed successfully, False if not -bool attributes_actions_parse_serial_data(uint8_t num_attributes, - uint8_t num_actions, - const uint8_t *data, - size_t data_size, +bool attributes_actions_parse_serial_data(uint8_t num_attributes, uint8_t num_actions, + const uint8_t *data, size_t data_size, size_t *string_alloc_size_out, uint8_t *attributes_per_action_out); @@ -32,12 +30,10 @@ bool attributes_actions_parse_serial_data(uint8_t num_attributes, //! in order corresponding to action order //! @param required_size_for_strings total size of all attribute strings //! @return The size of the buffer required to store the attributes, actions and strings -size_t attributes_actions_get_required_buffer_size(uint8_t num_attributes, - uint8_t num_actions, +size_t attributes_actions_get_required_buffer_size(uint8_t num_attributes, uint8_t num_actions, uint8_t *attributes_per_action, size_t required_size_for_strings); - //! @return The size of the buffer needed to hold the attribute list and action group size_t attributes_actions_get_buffer_size(AttributeList *attr_list, TimelineItemActionGroup *action_group); @@ -50,11 +46,8 @@ size_t attributes_actions_get_buffer_size(AttributeList *attr_list, //! @param num_actions number of actions //! @param attributes_per_action an array of counts for the number of attributes per action //! in order corresponding to action order -void attributes_actions_init(AttributeList *attr_list, - TimelineItemActionGroup *action_group, - uint8_t **buffer, - uint8_t num_attributes, - uint8_t num_actions, +void attributes_actions_init(AttributeList *attr_list, TimelineItemActionGroup *action_group, + uint8_t **buffer, uint8_t num_attributes, uint8_t num_actions, const uint8_t *attributes_per_action); //! Fills an AttributeList and ActionGroup from serialized data @@ -64,11 +57,8 @@ void attributes_actions_init(AttributeList *attr_list, //! @param buf_end A pointer to the end of the buffer //! @param payload Serialized payload buffer //! @param payload_size Size of the payload buffer in bytes -bool attributes_actions_deserialize(AttributeList *attr_list, - TimelineItemActionGroup *action_group, - uint8_t *buffer, - uint8_t *buf_end, - const uint8_t *payload, +bool attributes_actions_deserialize(AttributeList *attr_list, TimelineItemActionGroup *action_group, + uint8_t *buffer, uint8_t *buf_end, const uint8_t *payload, size_t payload_size); //! Calculate the required size for a buffer to store actions & attributes @@ -82,13 +72,11 @@ size_t attributes_actions_get_serialized_payload_size(AttributeList *list, //! @param buffer_size the size of the buffer in bytes //! @returns the number of bytes written to buffer size_t attributes_actions_serialize_payload(AttributeList *attr_list, - TimelineItemActionGroup *action_group, - uint8_t *buffer, + TimelineItemActionGroup *action_group, uint8_t *buffer, size_t buffer_size); //! @return true if successful, false if the buffer isn't large enough -bool attributes_actions_deep_copy(AttributeList *src_attr_list, - AttributeList *dest_attr_list, +bool attributes_actions_deep_copy(AttributeList *src_attr_list, AttributeList *dest_attr_list, TimelineItemActionGroup *src_action_group, - TimelineItemActionGroup *dest_action_group, - uint8_t *buffer, uint8_t *buf_end); + TimelineItemActionGroup *dest_action_group, uint8_t *buffer, + uint8_t *buf_end); diff --git a/include/pbl/services/timeline/calendar.h b/include/pbl/services/timeline/calendar.h index 3f17f92343..31827dc385 100644 --- a/include/pbl/services/timeline/calendar.h +++ b/include/pbl/services/timeline/calendar.h @@ -12,7 +12,6 @@ //! Not every calendar event start / stop produces an event, but every transition is guaranteed //! to put an event. - const TimelineEventImpl *calendar_get_event_service(void); //! Used to determine if there is currently an event going on, used for Smart DND diff --git a/include/pbl/services/timeline/calendar_layout_resources.h b/include/pbl/services/timeline/calendar_layout_resources.h index 83291badfd..226679207e 100644 --- a/include/pbl/services/timeline/calendar_layout_resources.h +++ b/include/pbl/services/timeline/calendar_layout_resources.h @@ -8,7 +8,7 @@ #include "pbl/util/attributes.h" #include "pbl/util/size.h" -#define START_ICON_POINTS { { 0, -2 }, { 9, 4 }, { 0, 10 } } +#define START_ICON_POINTS {{0, -2}, {9, 4}, {0, 10}} typedef struct PACKED { struct { @@ -20,7 +20,7 @@ typedef struct PACKED { extern CalendarStartIcon g_calendar_start_icon; -#define END_ICON_POINTS { { 0, 0 }, { 10, 0 }, { 10, 8 }, { 0, 8 } } +#define END_ICON_POINTS {{0, 0}, {10, 0}, {10, 8}, {0, 8}} typedef struct PACKED { struct { diff --git a/include/pbl/services/timeline/event.h b/include/pbl/services/timeline/event.h index e9a1f3f74b..0df1a664bc 100644 --- a/include/pbl/services/timeline/event.h +++ b/include/pbl/services/timeline/event.h @@ -40,8 +40,7 @@ typedef void (*TimelineEventDidUpdateCallback)(void **context); //! @param context Double pointer to a user context. //! @return < 0 to replace with `new_header`, > 0 to keep old_header, or 0 to use either one. typedef int (*TimelineEventComparator)(SerializedTimelineItemHeader *new_header, - SerializedTimelineItemHeader *old_header, - void **context); + SerializedTimelineItemHeader *old_header, void **context); //! Called with the nearest filtered event if any. If there was no filtered event, the update //! callback will be called with NULL. The update callback can optionally return a timeout until @@ -102,5 +101,5 @@ bool timeline_event_is_ongoing(time_t now, time_t event_start, int event_duratio //! @param delta_end_s The delta seconds to apply to now to obtain the end time that the event //! can be within. Passing in TIMELINE_EVENT_DELTA_INFINITE means any future event. //! @return true if the event is within the specified time range, false otherwise. -bool timeline_event_starts_within(CommonTimelineItemHeader *common, time_t now, - int delta_start_s, int delta_end_s); +bool timeline_event_starts_within(CommonTimelineItemHeader *common, time_t now, int delta_start_s, + int delta_end_s); diff --git a/include/pbl/services/timeline/health_layout.h b/include/pbl/services/timeline/health_layout.h index 51743e381f..fc499fef1e 100644 --- a/include/pbl/services/timeline/health_layout.h +++ b/include/pbl/services/timeline/health_layout.h @@ -22,7 +22,8 @@ typedef enum HealthCardType { typedef struct PACKED HealthLaunchArgs { union { struct { - HealthCardType card_type:8; //!< Tells us if we need to launch into an activity or sleep card + HealthCardType card_type + : 8; //!< Tells us if we need to launch into an activity or sleep card }; uint32_t args; }; diff --git a/include/pbl/services/timeline/item.h b/include/pbl/services/timeline/item.h index f6f9eae72d..2f07985d12 100644 --- a/include/pbl/services/timeline/item.h +++ b/include/pbl/services/timeline/item.h @@ -14,9 +14,9 @@ #include #include -#define MAX_PIN_TITLE_LENGTH (50) +#define MAX_PIN_TITLE_LENGTH (50) -#define TIMELINE_INVALID_ACTION_ID (0xFF) +#define TIMELINE_INVALID_ACTION_ID (0xFF) typedef Uuid TimelineItemId; @@ -45,7 +45,7 @@ typedef enum { //! Enumeration of the different types of actions a TimelineItem can have. typedef enum { TimelineItemActionTypeUnknown = 0x00, - TimelineItemActionTypeAncsNegative = 0x01, // Formerly ANCS Dismiss + TimelineItemActionTypeAncsNegative = 0x01, // Formerly ANCS Dismiss TimelineItemActionTypeGeneric = 0x02, TimelineItemActionTypeResponse = 0x03, TimelineItemActionTypeDismiss = 0x04, @@ -114,7 +114,7 @@ typedef struct PACKED { //! timestamp + duration < current_time, then it is no longer in NOW. uint16_t duration; //! The timeline item type - TimelineItemType type:8; + TimelineItemType type : 8; //! These flags are set by the datasource and/or mobile application and are one-way //! flags indicating how the pin interacts with the user. union { @@ -122,16 +122,16 @@ typedef struct PACKED { //! entirely to revert the value. struct { //! Indicates whether the item is visible or not. - uint8_t visible:1; + uint8_t visible : 1; //! Indicates whether this is a floating timezone item (implementation TBD) - uint8_t is_floating:1; + uint8_t is_floating : 1; //! Indicates whether the item is an all day event. //! All day events should have a timestamp at midnight. - uint8_t all_day:1; + uint8_t all_day : 1; //! Indicates that this item was added by the watch and shouldn't get flushed - uint8_t from_watch:1; + uint8_t from_watch : 1; //! Indicates that this notification was added by ANCS (iOS) - uint8_t ancs_notif:1; + uint8_t ancs_notif : 1; }; uint8_t flags; }; @@ -140,23 +140,23 @@ typedef struct PACKED { //! entirely to revert the value. struct { //! Indicates that the item has been read (only used for Notifications). - uint8_t read:1; + uint8_t read : 1; //! Indicates that the item has been deleted - uint8_t deleted:1; + uint8_t deleted : 1; //! Indicates that the item has been actioned on. - uint8_t actioned:1; + uint8_t actioned : 1; //! Indicates whether the reminder has been reminded. - uint8_t reminded:1; + uint8_t reminded : 1; //! Indicates whether the item has been dismissed - uint8_t dismissed:1; + uint8_t dismissed : 1; //! Indicates whether the item is persistent (only used for Timeline Peek / Quick View) - uint8_t persistent:1; + uint8_t persistent : 1; }; uint8_t status; }; //! Layout for this TimelineItem when rendered in a view. Determines //! how the attributes are rendered. - LayoutId layout:8; + LayoutId layout : 8; } CommonTimelineItemHeader; //! A TimelineItem is one of {Reminder, Notification, Pin}. To determine which @@ -204,7 +204,8 @@ TimelineItem *timeline_item_create_with_attributes(time_t timestamp, uint16_t du //! strings must be appended. The alloc string will set \c *string_buffer //! if \c string_buffer is not NULL) TimelineItem *timeline_item_create(int num_attributes, int num_actions, - uint8_t attributes_per_action[], size_t required_size_for_strings, uint8_t **string_buffer); + uint8_t attributes_per_action[], + size_t required_size_for_strings, uint8_t **string_buffer); //! Deserialize a \ref TimelineItem //! @param item storage for the item @@ -230,7 +231,7 @@ TimelineItem *timeline_item_copy(TimelineItem *src); //! @param payload pointer to the item's payload data //! @return true if the function succeeds, false otherwise bool timeline_item_deserialize_item(TimelineItem *item_out, - const SerializedTimelineItemHeader* header, + const SerializedTimelineItemHeader *header, const uint8_t *payload); //! Serialize some of a timeline item's metadata into a SerializedTimelineItemHeader @@ -255,8 +256,7 @@ time_t timeline_item_get_tz_timestamp(CommonTimelineItemHeader *hdr); //! @param buffer a pointer to the buffer to write to //! @param buffer_size the size of the buffer in bytes //! @returns the number of bytes written to \c buffer -size_t timeline_item_serialize_payload(TimelineItem *item, uint8_t *buffer, - size_t buffer_size); +size_t timeline_item_serialize_payload(TimelineItem *item, uint8_t *buffer, size_t buffer_size); //! Calculate the required size for a buffer to store an item's actions & attributes size_t timeline_item_get_serialized_payload_size(TimelineItem *item); @@ -268,11 +268,12 @@ size_t timeline_item_get_serialized_payload_size(TimelineItem *item); //! @param payload serialized payload buffer //! @param payload_size size of the payload buffer in bytes //! @return true on success -bool timeline_item_deserialize_payload(TimelineItem *item, - char *string_buffer, size_t string_buffer_size, const uint8_t *payload, size_t payload_size); +bool timeline_item_deserialize_payload(TimelineItem *item, char *string_buffer, + size_t string_buffer_size, const uint8_t *payload, + size_t payload_size); //! Clean up a dynamically allocated item. -void timeline_item_destroy(TimelineItem* item); +void timeline_item_destroy(TimelineItem *item); //! Frees allocated buffer and NULLs pointer to it. //! NOTE: Internal pointers to attributes are invalid after calling this function @@ -308,7 +309,6 @@ TimelineItemAction *timeline_item_find_dismiss_action(const TimelineItem *item); //! @return a pointer to the action, NULL if not found TimelineItemAction *timeline_item_find_reply_action(const TimelineItem *item); - //! Find the reply action in an action group (can be either regular response or ANCS response) //! @param action_group the action group to search //! @return a pointer to the action, NULL if not foun diff --git a/include/pbl/services/timeline/layout_layer.h b/include/pbl/services/timeline/layout_layer.h index 4cd1246c24..ad605e5d7a 100644 --- a/include/pbl/services/timeline/layout_layer.h +++ b/include/pbl/services/timeline/layout_layer.h @@ -12,8 +12,8 @@ #include "util/time/time.h" typedef enum { - LayoutLayerAnchorTextDirectionUp, // for scrolling up, past mode - LayoutLayerAnchorTextDirectionDown, // for scrolling down, future mode + LayoutLayerAnchorTextDirectionUp, // for scrolling up, past mode + LayoutLayerAnchorTextDirectionDown, // for scrolling down, future mode } LayoutLayerAnchorTextDirection; //! LayoutLayer is a type of Layer that is used to display templated 3.0 content @@ -34,18 +34,18 @@ typedef enum { //! instantiate a specific sub-type of LayoutLayer. Simply stated, the LayoutLayer sub-type //! informs what kinds of attributes to expect. typedef enum { - LayoutIdUnknown = 0, //!< Useful for catching error - 0 is not used as an id. - LayoutIdGeneric, //!< Generic layout (probably only for testing) - LayoutIdCalendar, //!< Calendar Pins - LayoutIdReminder, //!< Generic Reminders - LayoutIdNotification, //!< Generic Notifications - LayoutIdCommNotification, //!< Communication Notification - LayoutIdWeather, //!< Weather Pins - LayoutIdSports, //!< Sports Pins - LayoutIdAlarm, //!< Alarm Pins - LayoutIdHealth, //!< Health Pins + LayoutIdUnknown = 0, //!< Useful for catching error - 0 is not used as an id. + LayoutIdGeneric, //!< Generic layout (probably only for testing) + LayoutIdCalendar, //!< Calendar Pins + LayoutIdReminder, //!< Generic Reminders + LayoutIdNotification, //!< Generic Notifications + LayoutIdCommNotification, //!< Communication Notification + LayoutIdWeather, //!< Weather Pins + LayoutIdSports, //!< Sports Pins + LayoutIdAlarm, //!< Alarm Pins + LayoutIdHealth, //!< Health Pins NumLayoutIds, - LayoutIdTest, //!< Layout only for unit tests with no attribute requirements + LayoutIdTest, //!< Layout only for unit tests with no attribute requirements } LayoutId; typedef struct { @@ -58,10 +58,10 @@ typedef struct { //! context in which the layout is displayed. typedef enum { LayoutLayerModeNone = 0, - LayoutLayerModePeek, //!< Overlay-style mode shown similar to a partially obstructing HUD - LayoutLayerModePinnedFat, //!< Menu-style mode in the Timeline app (fat, first item) - LayoutLayerModePinnedThin, //!< Menu-style mode in the Timeline app (thin, second item) - LayoutLayerModeCard, //!< Card mode, shows details of a TimelineItem + LayoutLayerModePeek, //!< Overlay-style mode shown similar to a partially obstructing HUD + LayoutLayerModePinnedFat, //!< Menu-style mode in the Timeline app (fat, first item) + LayoutLayerModePinnedThin, //!< Menu-style mode in the Timeline app (thin, second item) + LayoutLayerModeCard, //!< Card mode, shows details of a TimelineItem NumLayoutLayerModes, } LayoutLayerMode; @@ -89,7 +89,7 @@ typedef struct LayoutLayer *(*LayoutLayerConstructor)(const LayoutLayerConfig *c typedef bool (*LayoutVerifier)(bool existing_attributes[]); #pragma push_macro("GSize") -#undef GSize // [FBO] ugly work around for rogue macro +#undef GSize // [FBO] ugly work around for rogue macro //! Get the size of the content of a layout. This is defined by the length of the text and //! the size of the icons contained within the attributes. //! @param ctx a pointer to the GContext in which the layout is rendered @@ -104,7 +104,7 @@ typedef void (*LayerLayerModeSetter)(struct LayoutLayer *layout, LayoutLayerMode typedef const LayoutColors *(*LayoutLayerColorsGetter)(const struct LayoutLayer *layout); #endif -typedef void* (*LayoutLayerContextGetter)(struct LayoutLayer *layout); +typedef void *(*LayoutLayerContextGetter)(struct LayoutLayer *layout); //! methods for the LayoutLayer type. typedef struct { @@ -119,10 +119,10 @@ typedef struct { //! Data structure of a LayoutLayer. typedef struct LayoutLayer { - Layer layer; //!< The Layer underlying the LayoutLayer - LayoutLayerMode mode; //!< The mode the LayoutLayer was created with - AttributeList *attributes; //!< A pointer to the LayoutLayer's Attributes - const LayoutLayerImpl *impl; //!< The implementation (constructor, destructor, methods) + Layer layer; //!< The Layer underlying the LayoutLayer + LayoutLayerMode mode; //!< The mode the LayoutLayer was created with + AttributeList *attributes; //!< A pointer to the LayoutLayer's Attributes + const LayoutLayerImpl *impl; //!< The implementation (constructor, destructor, methods) } LayoutLayer; struct LayoutLayerConfig { diff --git a/include/pbl/services/timeline/layout_node.h b/include/pbl/services/timeline/layout_node.h index 7b732d6af0..b83f85c368 100644 --- a/include/pbl/services/timeline/layout_node.h +++ b/include/pbl/services/timeline/layout_node.h @@ -117,16 +117,16 @@ typedef struct PACKED { typedef struct PACKED { LayoutNodeExtentConfig extent; const char *font_key; - LayoutContentSize style:8; - TextStyleFont style_font:8; - int8_t line_spacing_delta:4; + LayoutContentSize style : 8; + TextStyleFont style_font : 8; + int8_t line_spacing_delta : 4; //! Specifies the fixed height as a function of the font height and number of lines. //! The lines corresponds to the multiplier against the font height to use, which correlates with //! the amount of lines that will render if used with other fixed components on the first page. //! Do not use fixed_lines for text that can appear after the first page fold. Doing so will //! result in text nodes that are not guaranteed to draw. - uint8_t fixed_lines:2; - LayoutTextAlignment alignment:2; + uint8_t fixed_lines : 2; + LayoutTextAlignment alignment : 2; #if PBL_COLOR LayoutColor color; #endif @@ -134,9 +134,9 @@ typedef struct PACKED { typedef struct PACKED { LayoutNodeExtentConfig extent; - LayoutContentSize size:8; - TextStyleFont heading_style_font:8; - TextStyleFont paragraph_style_font:8; + LayoutContentSize size : 8; + TextStyleFont heading_style_font : 8; + TextStyleFont paragraph_style_font : 8; } LayoutNodeHeadingsParagraphsConfig; typedef struct PACKED { @@ -152,9 +152,9 @@ typedef struct PACKED { typedef struct LayoutNodeTextDynamicConfig LayoutNodeTextDynamicConfig; -typedef void (*LayoutNodeTextDynamicUpdate)( - const LayoutLayer *layout, const LayoutNodeTextDynamicConfig *config, char *buffer, - bool render); +typedef void (*LayoutNodeTextDynamicUpdate)(const LayoutLayer *layout, + const LayoutNodeTextDynamicConfig *config, char *buffer, + bool render); struct PACKED LayoutNodeTextDynamicConfig { LayoutNodeTextConfig text; @@ -182,8 +182,8 @@ typedef struct PACKED { typedef struct LayoutNodeConstructorConfig LayoutNodeConstructorConfig; -typedef GTextNode *(*LayoutNodeConstructor)( - const LayoutLayer *layout, const LayoutNodeConstructorConfig *config); +typedef GTextNode *(*LayoutNodeConstructor)(const LayoutLayer *layout, + const LayoutNodeConstructorConfig *config); struct PACKED LayoutNodeConstructorConfig { LayoutNodeExtentConfig extent; diff --git a/include/pbl/services/timeline/notification_jumboji_table.h b/include/pbl/services/timeline/notification_jumboji_table.h index db8b1545af..1819742743 100644 --- a/include/pbl/services/timeline/notification_jumboji_table.h +++ b/include/pbl/services/timeline/notification_jumboji_table.h @@ -16,32 +16,31 @@ typedef struct { } EmojiEntry; #if UNITTEST -#define EMOJI_ENTRY(string, codepoint, resource_id) \ - { codepoint, resource_id, string, #resource_id } +#define EMOJI_ENTRY(string, codepoint, resource_id) {codepoint, resource_id, string, #resource_id} #else -#define EMOJI_ENTRY(string, codepoint, resource_id) \ - { codepoint, resource_id } +#define EMOJI_ENTRY(string, codepoint, resource_id) {codepoint, resource_id} #endif // Codepoint sorted table of supported Jumboji -#define JUMBOJI_TABLE(ENTRY) { \ - ENTRY("♥️", 0x02665, RESOURCE_ID_EMOJI_HEART_LARGE), \ - ENTRY("❤️", 0x02764, RESOURCE_ID_EMOJI_HEART_LARGE), \ - ENTRY("👍", 0x1f44d, RESOURCE_ID_EMOJI_THUMBS_UP_LARGE), \ - ENTRY("💙", 0x1f499, RESOURCE_ID_EMOJI_HEART_LARGE), \ - ENTRY("💚", 0x1f49a, RESOURCE_ID_EMOJI_HEART_LARGE), \ - ENTRY("💛", 0x1f49b, RESOURCE_ID_EMOJI_HEART_LARGE), \ - ENTRY("💜", 0x1f49c, RESOURCE_ID_EMOJI_HEART_LARGE), \ - ENTRY("😀", 0x1f600, RESOURCE_ID_EMOJI_BIG_OPEN_SMILE_LARGE), \ - ENTRY("😁", 0x1f601, RESOURCE_ID_EMOJI_SMILING_WITH_TEETH_LARGE), \ - ENTRY("😂", 0x1f602, RESOURCE_ID_EMOJI_LAUGHING_WITH_TEARS_LARGE), \ - ENTRY("😃", 0x1f603, RESOURCE_ID_EMOJI_BIG_OPEN_SMILE_LARGE), \ - ENTRY("😄", 0x1f604, RESOURCE_ID_EMOJI_BIG_SMILE_LARGE), \ - ENTRY("😉", 0x1f609, RESOURCE_ID_EMOJI_WINK_LARGE), \ - ENTRY("😊", 0x1f60a, RESOURCE_ID_EMOJI_SMILING_BLUSH_LARGE), \ - ENTRY("😍", 0x1f60d, RESOURCE_ID_EMOJI_SMILING_HEARTS_LARGE), \ - ENTRY("😘", 0x1f618, RESOURCE_ID_EMOJI_KISSING_WITH_HEART_LARGE), \ - ENTRY("😜", 0x1f61c, RESOURCE_ID_EMOJI_WINK_TONGUE_LARGE), \ - ENTRY("😞", 0x1f61e, RESOURCE_ID_EMOJI_SAD_LARGE), \ - ENTRY("😟", 0x1f61f, RESOURCE_ID_EMOJI_SAD_LARGE), \ -} +#define JUMBOJI_TABLE(ENTRY) \ + { \ + ENTRY("♥️", 0x02665, RESOURCE_ID_EMOJI_HEART_LARGE), \ + ENTRY("❤️", 0x02764, RESOURCE_ID_EMOJI_HEART_LARGE), \ + ENTRY("👍", 0x1f44d, RESOURCE_ID_EMOJI_THUMBS_UP_LARGE), \ + ENTRY("💙", 0x1f499, RESOURCE_ID_EMOJI_HEART_LARGE), \ + ENTRY("💚", 0x1f49a, RESOURCE_ID_EMOJI_HEART_LARGE), \ + ENTRY("💛", 0x1f49b, RESOURCE_ID_EMOJI_HEART_LARGE), \ + ENTRY("💜", 0x1f49c, RESOURCE_ID_EMOJI_HEART_LARGE), \ + ENTRY("😀", 0x1f600, RESOURCE_ID_EMOJI_BIG_OPEN_SMILE_LARGE), \ + ENTRY("😁", 0x1f601, RESOURCE_ID_EMOJI_SMILING_WITH_TEETH_LARGE), \ + ENTRY("😂", 0x1f602, RESOURCE_ID_EMOJI_LAUGHING_WITH_TEARS_LARGE), \ + ENTRY("😃", 0x1f603, RESOURCE_ID_EMOJI_BIG_OPEN_SMILE_LARGE), \ + ENTRY("😄", 0x1f604, RESOURCE_ID_EMOJI_BIG_SMILE_LARGE), \ + ENTRY("😉", 0x1f609, RESOURCE_ID_EMOJI_WINK_LARGE), \ + ENTRY("😊", 0x1f60a, RESOURCE_ID_EMOJI_SMILING_BLUSH_LARGE), \ + ENTRY("😍", 0x1f60d, RESOURCE_ID_EMOJI_SMILING_HEARTS_LARGE), \ + ENTRY("😘", 0x1f618, RESOURCE_ID_EMOJI_KISSING_WITH_HEART_LARGE), \ + ENTRY("😜", 0x1f61c, RESOURCE_ID_EMOJI_WINK_TONGUE_LARGE), \ + ENTRY("😞", 0x1f61e, RESOURCE_ID_EMOJI_SAD_LARGE), \ + ENTRY("😟", 0x1f61f, RESOURCE_ID_EMOJI_SAD_LARGE), \ + } diff --git a/include/pbl/services/timeline/notification_layout.h b/include/pbl/services/timeline/notification_layout.h index b3208d6faa..c3da9b2688 100644 --- a/include/pbl/services/timeline/notification_layout.h +++ b/include/pbl/services/timeline/notification_layout.h @@ -13,21 +13,17 @@ //! Banner height of notification and reminder layouts (excluding status bar) //! Rectangular banner is the same size on both the top and bottom -#define LAYOUT_BANNER_HEIGHT_RECT \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ 36, \ - /* medium */ 36, \ - /* large */ 29, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* extralarge */ 29 \ - ) +#define LAYOUT_BANNER_HEIGHT_RECT \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ 36, /* medium */ 36, /* large */ \ + 29, /* This is the same as Large until ExtraLarge is designed */ /* extralarge */ 29) //! Round banner is different between the top and bottom #define LAYOUT_TOP_BANNER_HEIGHT_ROUND 60 #define LAYOUT_BOTTOM_BANNER_HEIGHT_ROUND 40 -#define LAYOUT_TOP_BANNER_HEIGHT \ - PBL_IF_RECT_ELSE(LAYOUT_BANNER_HEIGHT_RECT, \ - LAYOUT_TOP_BANNER_HEIGHT_ROUND - STATUS_BAR_LAYER_HEIGHT) +#define LAYOUT_TOP_BANNER_HEIGHT \ + PBL_IF_RECT_ELSE(LAYOUT_BANNER_HEIGHT_RECT, \ + LAYOUT_TOP_BANNER_HEIGHT_ROUND - STATUS_BAR_LAYER_HEIGHT) //! Height of the white arrow layer #define LAYOUT_ARROW_HEIGHT PBL_IF_RECT_ELSE(19, 16) //! Display height of the layout, which removes the arrow_height from the text layout region @@ -38,12 +34,12 @@ //! Radius of the (round) banner #define BANNER_CIRCLE_RADIUS 140 //! The starting y-position of the top banner -#define LAYOUT_TOP_BANNER_ORIGIN_Y (LAYOUT_TOP_BANNER_HEIGHT_ROUND - \ - (BANNER_CIRCLE_RADIUS + STATUS_BAR_LAYER_HEIGHT) - 1) +#define LAYOUT_TOP_BANNER_ORIGIN_Y \ + (LAYOUT_TOP_BANNER_HEIGHT_ROUND - (BANNER_CIRCLE_RADIUS + STATUS_BAR_LAYER_HEIGHT) - 1) #define TEXT_VISIBLE_UPPER_THRESHOLD (STATUS_BAR_LAYER_HEIGHT - INTERPOLATE_MOOOK_BOUNCE_BACK - 1) #define TEXT_VISIBLE_LOWER_THRESHOLD(h) \ - (-(h) + DISP_ROWS - STATUS_BAR_LAYER_HEIGHT - INTERPOLATE_MOOOK_BOUNCE_BACK - 1) + (-(h) + DISP_ROWS - STATUS_BAR_LAYER_HEIGHT - INTERPOLATE_MOOOK_BOUNCE_BACK - 1) //! Offset and margin refer to the GTextNode definition where offset is the internal position delta //! to be applied not affecting neighboring elements and margin is the size delta to be applied not @@ -59,7 +55,7 @@ typedef struct { const char *body_font_key; const char *footer_font_key; int8_t header_padding; - int8_t title_offset_if_body_icon; //!< Conditional title delta offset if body icon exists + int8_t title_offset_if_body_icon; //!< Conditional title delta offset if body icon exists int8_t title_padding; int8_t title_line_delta; int8_t subtitle_upper_padding; @@ -69,7 +65,7 @@ typedef struct { int8_t location_margin; int8_t body_padding; int8_t body_line_delta; - int8_t body_icon_offset; //!< Body icon refers to a large body icon, currently used by Jumboji + int8_t body_icon_offset; //!< Body icon refers to a large body icon, currently used by Jumboji int8_t body_icon_margin; int8_t timestamp_upper_padding; int8_t timestamp_lower_padding; @@ -86,7 +82,7 @@ typedef struct { AppResourceInfo icon_res_info; LayoutColors colors; NotificationLayoutInfo info; - KinoLayer *detail_icon_layer; //!< Not common, so not inline with the layout + KinoLayer *detail_icon_layer; //!< Not common, so not inline with the layout const NotificationStyle *style; GTextNode *view_node; GSize view_size; @@ -105,18 +101,14 @@ static const TimelineResourceId REMINDER_FALLBACK_ICON = TIMELINE_RESOURCE_NOTIF //! Adjusts the vertical position of the tiny resource icon on notifications to account for the //! whitespace inside the status bar but below the status bar text. Note that this depends on the //! font used in the status bar. -#define NOTIFICATION_TINY_RESOURCE_VERTICAL_OFFSET \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ -1, \ - /* medium */ -1, \ - /* large */ -2, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* extralarge */ -2 \ - ) +#define NOTIFICATION_TINY_RESOURCE_VERTICAL_OFFSET \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ -1, /* medium */ -1, /* large */ \ + -2, /* This is the same as Large until ExtraLarge is designed */ /* extralarge */ -2) //! Used to know where the icon is within the layout. -#define CARD_ICON_UPPER_PADDING \ - ((LAYOUT_TOP_BANNER_HEIGHT - NOTIFICATION_TINY_RESOURCE_HEIGHT) / 2) + \ +#define CARD_ICON_UPPER_PADDING \ + ((LAYOUT_TOP_BANNER_HEIGHT - NOTIFICATION_TINY_RESOURCE_HEIGHT) / 2) + \ NOTIFICATION_TINY_RESOURCE_VERTICAL_OFFSET //! Bounds on the aspect a notification image band can reserve; the phone clamps to the same range. diff --git a/include/pbl/services/timeline/swap_layer.h b/include/pbl/services/timeline/swap_layer.h index c9eaab3345..b0e3b7abb9 100644 --- a/include/pbl/services/timeline/swap_layer.h +++ b/include/pbl/services/timeline/swap_layer.h @@ -11,24 +11,24 @@ struct Window; struct SwapLayer; //! Function signature for the `.get_layout_handler` callback. -typedef LayoutLayer* (*SwapLayerGetLayoutHandler)(struct SwapLayer *swap_layer, int8_t rel_position, - void *context); +typedef LayoutLayer *(*SwapLayerGetLayoutHandler)(struct SwapLayer *swap_layer, int8_t rel_position, + void *context); //! Function signature for the `.layout_removed_handler` callback. typedef void (*SwapLayerLayoutRemovedHandler)(struct SwapLayer *swap_layer, LayoutLayer *layer, - void *context); + void *context); //! Function signature for the `.layout_did_appear_handler` callback. typedef void (*SwapLayerLayoutDidAppearHandler)(struct SwapLayer *swap_layer, LayoutLayer *layer, - int8_t rel_change, void *context); + int8_t rel_change, void *context); //! Function signature for the `.layout_will_appear_handler` callback. typedef void (*SwapLayerLayoutWillAppearHandler)(struct SwapLayer *swap_layer, LayoutLayer *layer, - void *context); + void *context); //! Function signature for the `.update_colors_handler` callback. typedef void (*SwapLayerUpdateColorsHandler)(struct SwapLayer *swap_layer, GColor bg_color, - bool status_bar_filled, void *context); + bool status_bar_filled, void *context); //! Function signature for the `.interaction_handler` callback. typedef void (*SwapLayerInteractionHandler)(struct SwapLayer *swap_layer, void *context); @@ -67,9 +67,9 @@ typedef struct SwapLayer { Layer layer; ArrowLayer arrow_layer; Animation *animation; - LayoutLayer *previous; //!< Previous LayoutLayer in the list. - LayoutLayer *current; //!< Current LayoutLayer in the list. - LayoutLayer *next; //!< Next LayoutLayer in the list. + LayoutLayer *previous; //!< Previous LayoutLayer in the list. + LayoutLayer *current; //!< Current LayoutLayer in the list. + LayoutLayer *next; //!< Next LayoutLayer in the list. SwapLayerCallbacks callbacks; uint16_t swap_delay_remaining; bool swap_in_progress; @@ -127,15 +127,16 @@ bool swap_layer_attempt_layer_swap(SwapLayer *swap_layer, ScrollDirection direct //! stays within [0, max_scroll]. A positive \a dy scrolls the content towards the top of the //! notification (offset decreases); a negative \a dy scrolls further into the content (offset //! increases). The \c next layout is pulled right under the current one so its peek tracks the -//! finger. Also refreshes the auto-close interaction timer so a long notification cannot close under -//! the finger mid-read. Used by the Tier-1 touch pan for live 1:1 scrolling. +//! finger. Also refreshes the auto-close interaction timer so a long notification cannot close +//! under the finger mid-read. Used by the Tier-1 touch pan for live 1:1 scrolling. void swap_layer_touch_scroll_by(SwapLayer *swap_layer, int16_t dy); -//! Release this SwapLayer's Tier-1 touch participation while it is covered by a higher modal: remove -//! it from the touch-navigation registry (which detaches the shared recognizer set and clears the -//! gesture target) so touch cannot leak into the now-hidden notification body. In our system-slot -//! bridge architecture registry membership is what routes touch, so deregistering is the release. -//! Idempotent and safe when touch is disabled. Re-registered by the click-config-provider on re-show. +//! Release this SwapLayer's Tier-1 touch participation while it is covered by a higher modal: +//! remove it from the touch-navigation registry (which detaches the shared recognizer set and +//! clears the gesture target) so touch cannot leak into the now-hidden notification body. In our +//! system-slot bridge architecture registry membership is what routes touch, so deregistering is +//! the release. Idempotent and safe when touch is disabled. Re-registered by the +//! click-config-provider on re-show. void swap_layer_touch_release(SwapLayer *swap_layer); //! @internal Test seam: zero the per-task Tier-1 gesture singletons for cross-test isolation. @@ -144,8 +145,9 @@ void swap_layer_touch_nav_reset_all(void); //! @internal Test seam: whether \a swap_layer is the current per-task gesture target. bool swap_layer_touch_is_gesture_target(const SwapLayer *swap_layer); -//! @internal Test seam: register/deregister this SwapLayer as a Tier-1 touch widget. Normally driven -//! by swap_layer_init / the click-config-provider / swap_layer_deinit; exposed for unit tests. +//! @internal Test seam: register/deregister this SwapLayer as a Tier-1 touch widget. Normally +//! driven by swap_layer_init / the click-config-provider / swap_layer_deinit; exposed for unit +//! tests. void swap_layer_touch_register(SwapLayer *swap_layer); void swap_layer_touch_deregister(SwapLayer *swap_layer); diff --git a/include/pbl/services/timeline/timeline.h b/include/pbl/services/timeline/timeline.h index 2938b66b62..b813313c39 100644 --- a/include/pbl/services/timeline/timeline.h +++ b/include/pbl/services/timeline/timeline.h @@ -21,8 +21,8 @@ typedef struct { TimelineIterDirection direction; TimelineItem pin; bool show_all_day_events; - time_t midnight; // midnight at iter_init - time_t current_day; // midnight of the current pin + time_t midnight; // midnight at iter_init + time_t current_day; // midnight of the current pin } TimelineIterState; //! initialize the timeline (builds the list of TimelineNodes) @@ -53,8 +53,8 @@ bool timeline_is_bulk_ancs_action_mode_enabled(void); void timeline_invoke_action(const TimelineItem *item, const TimelineItemAction *action, const AttributeList *attributes); -TimelineIterDirection timeline_direction_for_item(TimelineItem *item, - TimelineNode *timeline, time_t now); +TimelineIterDirection timeline_direction_for_item(TimelineItem *item, TimelineNode *timeline, + time_t now); bool timeline_nodes_equal(TimelineNode *a, TimelineNode *b); @@ -91,11 +91,11 @@ bool timeline_item_should_show(CommonTimelineItemHeader *header, TimelineIterDir /////////////////////////////////// status_t timeline_iter_init(Iterator *iter, TimelineIterState *iter_state, TimelineNode **timeline, - TimelineIterDirection direction, time_t timestamp); + TimelineIterDirection direction, time_t timestamp); // Copy an iterator's contents into another one void timeline_iter_copy_state(TimelineIterState *dst_state, TimelineIterState *src_state, - Iterator *dst_iter, Iterator *src_iter); + Iterator *dst_iter, Iterator *src_iter); void timeline_iter_deinit(Iterator *iter, TimelineIterState *iter_state, TimelineNode **head); @@ -115,45 +115,45 @@ bool timeline_iter_remove_node_with_id(TimelineNode **timeline, Uuid *key); /////////////////////////////////// // ed429c16-f674-4220-95da-454f303f15e2 -#define UUID_NOTIFICATIONS_DATA_SOURCE {0xed, 0x42, 0x9c, 0x16, 0xf6, 0x74, 0x42, 0x20, 0x95, \ - 0xda, 0x45, 0x4f, 0x30, 0x3f, 0x15, 0xe2} +#define UUID_NOTIFICATIONS_DATA_SOURCE \ + {0xed, 0x42, 0x9c, 0x16, 0xf6, 0x74, 0x42, 0x20, 0x95, 0xda, 0x45, 0x4f, 0x30, 0x3f, 0x15, 0xe2} // 6c6c6fc2-1912-4d25-8396-3547d1dfac5b -#define UUID_CALENDAR_DATA_SOURCE {0x6c, 0x6c, 0x6f, 0xc2, 0x19, 0x12, 0x4d, 0x25, 0x83, \ - 0x96, 0x35, 0x47, 0xd1, 0xdf, 0xac, 0x5b} +#define UUID_CALENDAR_DATA_SOURCE \ + {0x6c, 0x6c, 0x6f, 0xc2, 0x19, 0x12, 0x4d, 0x25, 0x83, 0x96, 0x35, 0x47, 0xd1, 0xdf, 0xac, 0x5b} // 61b22bc8-1e29-460d-a236-3fe409a439ff -#define UUID_WEATHER_DATA_SOURCE {0x61, 0xb2, 0x2b, 0xc8, 0x1e, 0x29, 0x46, 0xd, 0xa2, \ - 0x36, 0x3f, 0xe4, 0x9, 0xa4, 0x39, 0xff} +#define UUID_WEATHER_DATA_SOURCE \ + {0x61, 0xb2, 0x2b, 0xc8, 0x1e, 0x29, 0x46, 0xd, 0xa2, 0x36, 0x3f, 0xe4, 0x9, 0xa4, 0x39, 0xff} // 42a07217-5491-4267-904a-d02a156752b6 -#define UUID_REMINDERS_DATA_SOURCE {0x42, 0xa0, 0x72, 0x17, 0x54, 0x91, 0x42, 0x67, \ - 0x90, 0x4a, 0xd0, 0x2a, 0x15, 0x67, 0x52, 0xb6} +#define UUID_REMINDERS_DATA_SOURCE \ + {0x42, 0xa0, 0x72, 0x17, 0x54, 0x91, 0x42, 0x67, 0x90, 0x4a, 0xd0, 0x2a, 0x15, 0x67, 0x52, 0xb6} // UUID: 67a32d95-ef69-46d4-a0b9-854cc62f97f9 -#define UUID_ALARMS_DATA_SOURCE {0x67, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, \ - 0xa0, 0xb9, 0x85, 0x4c, 0xc6, 0x2f, 0x97, 0xf9} +#define UUID_ALARMS_DATA_SOURCE \ + {0x67, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, 0xa0, 0xb9, 0x85, 0x4c, 0xc6, 0x2f, 0x97, 0xf9} // UUID: 36d8c6ed-4c83-4fa1-a9e2-8f12dc941f8c -#define UUID_HEALTH_DATA_SOURCE {0x36, 0xd8, 0xc6, 0xed, 0x4c, 0x83, 0x4f, 0xa1, \ - 0xa9, 0xe2, 0x8f, 0x12, 0xdc, 0x94, 0x1f, 0x8c} +#define UUID_HEALTH_DATA_SOURCE \ + {0x36, 0xd8, 0xc6, 0xed, 0x4c, 0x83, 0x4f, 0xa1, 0xa9, 0xe2, 0x8f, 0x12, 0xdc, 0x94, 0x1f, 0x8c} // UUID: fef82c82-7176-4e22-88de-35a3fc18d43f -#define UUID_WORKOUT_DATA_SOURCE {0xfe, 0xf8, 0x2c, 0x82, 0x71, 0x76, 0x4e, 0x22, \ - 0x88, 0xde, 0x35, 0xa3, 0xfc, 0x18, 0xd4, 0x3f} +#define UUID_WORKOUT_DATA_SOURCE \ + {0xfe, 0xf8, 0x2c, 0x82, 0x71, 0x76, 0x4e, 0x22, 0x88, 0xde, 0x35, 0xa3, 0xfc, 0x18, 0xd4, 0x3f} // UUID: 0863fc6a-66c5-4f62-ab8a-82ed00a98b5d -#define UUID_SEND_TEXT_DATA_SOURCE {0x08, 0x63, 0xfc, 0x6a, 0x66, 0xc5, 0x4f, 0x62, \ - 0xab, 0x8a, 0x82, 0xed, 0x00, 0xa9, 0x8b, 0x5d} +#define UUID_SEND_TEXT_DATA_SOURCE \ + {0x08, 0x63, 0xfc, 0x6a, 0x66, 0xc5, 0x4f, 0x62, 0xab, 0x8a, 0x82, 0xed, 0x00, 0xa9, 0x8b, 0x5d} // UUID: 0f71aaba-5814-4b5c-96e2-c9828c9734cb // Special UUID that allows the watch to send SMS messages to a specific phone number -#define UUID_SEND_SMS {0x0f, 0x71, 0xaa, 0xba, 0x58, 0x14, 0x4b, 0x5c, \ - 0x96, 0xe2, 0xc9, 0x82, 0x8c, 0x97, 0x34, 0xcb} +#define UUID_SEND_SMS \ + {0x0f, 0x71, 0xaa, 0xba, 0x58, 0x14, 0x4b, 0x5c, 0x96, 0xe2, 0xc9, 0x82, 0x8c, 0x97, 0x34, 0xcb} // UUID: 68010669-4b38-4751-ad04-067f1d8d2ab5 -#define UUID_INTERCOM_DATA_SOURCE {0x68, 0x01, 0x06, 0x69, 0x4b, 0x38, 0x47, 0x51, \ - 0xad, 0x04, 0x06, 0x7f, 0x1d, 0x8d, 0x2a, 0xb5} +#define UUID_INTERCOM_DATA_SOURCE \ + {0x68, 0x01, 0x06, 0x69, 0x4b, 0x38, 0x47, 0x51, 0xad, 0x04, 0x06, 0x7f, 0x1d, 0x8d, 0x2a, 0xb5} //! Get the name of a non-app, i.e. "private" datasource like Weather or Calendar //! return NULL if parent_id is not a private data source, otherwise the name of the source diff --git a/include/pbl/services/timeline/timeline_actions.h b/include/pbl/services/timeline/timeline_actions.h index cd4dc3ff0d..3af4e381cc 100644 --- a/include/pbl/services/timeline/timeline_actions.h +++ b/include/pbl/services/timeline/timeline_actions.h @@ -46,10 +46,12 @@ ActionMenu *timeline_actions_push_action_menu(ActionMenuConfig *base_config, //! @param source The window/app that pushed this action menu //! @param standalone_reply Changes the "Voice" text to "Reply with Voice" to provide better //! context when this menu has been pushed without a previous menu -ActionMenu *timeline_actions_push_response_menu( - TimelineItem *item, TimelineItemAction *reply_action, GColor bg_color, - ActionMenuDidCloseCb did_close_cb, WindowStack *window_stack, TimelineItemActionSource source, - bool standalone_reply); +ActionMenu *timeline_actions_push_response_menu(TimelineItem *item, + TimelineItemAction *reply_action, GColor bg_color, + ActionMenuDidCloseCb did_close_cb, + WindowStack *window_stack, + TimelineItemActionSource source, + bool standalone_reply); typedef void (*ActionCompleteCallback)(bool succeeded, void *cb_data); diff --git a/include/pbl/services/timeline/timeline_layout.h b/include/pbl/services/timeline/timeline_layout.h index 076bab4dc6..71a42c8ee7 100644 --- a/include/pbl/services/timeline/timeline_layout.h +++ b/include/pbl/services/timeline/timeline_layout.h @@ -22,24 +22,16 @@ #define TIMELINE_CARD_ARROW_HEIGHT 13 #define TIMELINE_CARD_MARGIN PBL_IF_RECT_ELSE(7, 12) #define TIMELINE_CARD_TRANSITION_MS (interpolate_moook_duration()) -#define TIMELINE_CARD_BODY_HEADER_MARGIN_HEIGHT \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ -2, \ - /* medium */ -2, \ - /* large */ 2, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* extralarge */ 2 \ - ) -#define TIMELINE_CARD_BODY_MARGIN_HEIGHT \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ 17, \ - /* medium */ 17, \ - /* large */ 15, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* extralarge */ 15 \ - ) +#define TIMELINE_CARD_BODY_HEADER_MARGIN_HEIGHT \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ -2, /* medium */ -2, /* large */ \ + 2, /* This is the same as Large until ExtraLarge is designed */ /* extralarge */ 2) +#define TIMELINE_CARD_BODY_MARGIN_HEIGHT \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ 17, /* medium */ 17, /* large */ \ + 15, /* This is the same as Large until ExtraLarge is designed */ /* extralarge */ 15) typedef struct TimelineLayout TimelineLayout; @@ -50,8 +42,8 @@ typedef GTextNode *(*TimelineLayoutViewConstructor)(TimelineLayout *layout); typedef void (*TimelineLayoutViewDeinitializer)(TimelineLayout *layout); typedef enum { - TimelineScrollDirectionUp, //!< Timeline Past - TimelineScrollDirectionDown, //!< Timeline Future + TimelineScrollDirectionUp, //!< Timeline Past + TimelineScrollDirectionDown, //!< Timeline Future } TimelineScrollDirection; typedef struct { @@ -78,24 +70,24 @@ struct TimelineLayout { AppResourceInfo icon_res_info; uint32_t icon_resource_id; int16_t page_break_height; - bool has_page_break; // #include -#define VIBE_DEF(identifier, enum_name, name_str, alert_types_arg, res_id)\ +#define VIBE_DEF(identifier, enum_name, name_str, alert_types_arg, res_id) \ VibeScoreId_##enum_name = identifier, typedef enum VibeScoreId { VibeScoreId_Invalid = 0, - #include "vibes.def" +#include "vibes.def" } VibeScoreId; #undef VIBE_DEF diff --git a/include/pbl/services/voice/transcription.h b/include/pbl/services/voice/transcription.h index d1f20572e1..42dfa3d4dd 100644 --- a/include/pbl/services/voice/transcription.h +++ b/include/pbl/services/voice/transcription.h @@ -21,9 +21,9 @@ typedef enum { //! A word string with associated confidence value and length. The string is not zero terminated typedef struct PACKED { - uint8_t confidence; //!< Word confidence value (1 - 100%) or 0 if confidence value is not valid - uint16_t length; //!< Length of word - utf8_t data[]; //!< UTF-8 encoded text + uint8_t confidence; //!< Word confidence value (1 - 100%) or 0 if confidence value is not valid + uint16_t length; //!< Length of word + utf8_t data[]; //!< UTF-8 encoded text } TranscriptionWord; //! A serialized list of words making up a sentence. @@ -38,7 +38,7 @@ typedef struct PACKED { //! list of words (with their confidence values set to zero) making up a single sentence. //! The list of objects is serialized in memory as it would be received over the endpoint. typedef struct PACKED { - TranscriptionType type:8; + TranscriptionType type : 8; uint8_t sentence_count; TranscriptionSentence sentences[]; } Transcription; @@ -47,8 +47,7 @@ typedef struct PACKED { //! @param sentence Current sentence in iteration //! @param data Context data pointer //! @return true to continue iteration, false to end iteration -typedef bool (*TranscriptionSentenceIterateCb)(const TranscriptionSentence *sentence, - void *data); +typedef bool (*TranscriptionSentenceIterateCb)(const TranscriptionSentence *sentence, void *data); //! Callback for iterating over a list of words //! @param word Current word in iteration @@ -66,7 +65,7 @@ bool transcription_validate(const Transcription *transcription, size_t size); //! @param data Context data pointer - passed into handler callback //! @return a pointer to the end of the serialized list void *transcription_iterate_sentences(const TranscriptionSentence *sentences, size_t count, - TranscriptionSentenceIterateCb handle_sentence, void *data); + TranscriptionSentenceIterateCb handle_sentence, void *data); //! Iterate over list of serialized TranscriptionWord objects //! @param words Beginning of serialized list @@ -75,4 +74,4 @@ void *transcription_iterate_sentences(const TranscriptionSentence *sentences, si //! @param data Context data pointer - passed into handler callback //! @return a pointer to the end of the serialized list void *transcription_iterate_words(const TranscriptionWord *words, size_t count, - TranscriptionWordIterateCb handle_word, void *data); + TranscriptionWordIterateCb handle_word, void *data); diff --git a/include/pbl/services/voice_endpoint.h b/include/pbl/services/voice_endpoint.h index d993df7fca..029910e2f3 100644 --- a/include/pbl/services/voice_endpoint.h +++ b/include/pbl/services/voice_endpoint.h @@ -13,7 +13,7 @@ typedef enum { VoiceEndpointSessionTypeDictation = 0x01, - VoiceEndpointSessionTypeCommand = 0x02, // Not used yet + VoiceEndpointSessionTypeCommand = 0x02, // Not used yet VoiceEndpointSessionTypeNLP = 0x03, VoiceEndpointSessionTypeCount, @@ -40,4 +40,5 @@ typedef struct PACKED { //! Called by the voice service to set up a dictation or command recognition session void voice_endpoint_setup_session(VoiceEndpointSessionType session_type, - AudioEndpointSessionId session_id, AudioTransferInfoSpeex *info, Uuid *app_uuid); + AudioEndpointSessionId session_id, AudioTransferInfoSpeex *info, + Uuid *app_uuid); diff --git a/include/pbl/services/voice_endpoint_private.h b/include/pbl/services/voice_endpoint_private.h index 355853a0d3..f487cb7235 100644 --- a/include/pbl/services/voice_endpoint_private.h +++ b/include/pbl/services/voice_endpoint_private.h @@ -30,30 +30,30 @@ typedef enum { typedef union PACKED { struct { - uint32_t app_initiated:1; + uint32_t app_initiated : 1; }; uint32_t all; } VEFlags; typedef struct PACKED { - MsgId msg_id:8; + MsgId msg_id : 8; VEFlags flags; - VoiceEndpointSessionType session_type:8; + VoiceEndpointSessionType session_type : 8; AudioEndpointSessionId session_id; GenericAttributeList attr_list; } SessionSetupMsg; typedef struct PACKED { - MsgId msg_id:8; + MsgId msg_id : 8; VEFlags flags; - VoiceEndpointSessionType session_type:8; - VoiceEndpointResult result:8; + VoiceEndpointSessionType session_type : 8; + VoiceEndpointResult result : 8; } SessionSetupResultMsg; typedef struct PACKED { - MsgId msg_id:8; + MsgId msg_id : 8; VEFlags flags; AudioEndpointSessionId session_id; - VoiceEndpointResult result:8; + VoiceEndpointResult result : 8; GenericAttributeList attr_list; } VoiceSessionResultMsg; diff --git a/include/pbl/services/wakeup.h b/include/pbl/services/wakeup.h index 3317e377b5..66e3776ae0 100644 --- a/include/pbl/services/wakeup.h +++ b/include/pbl/services/wakeup.h @@ -11,7 +11,7 @@ //! @internal //! Event window is (in seconds) a reserved amount of time each wakeup_event receives //! in which other wakeup events cannot be scheduled -#define WAKEUP_EVENT_WINDOW 60 +#define WAKEUP_EVENT_WINDOW 60 //! @internal //! Number of wakeup events allowed per application (UUID) #define MAX_WAKEUP_EVENTS_PER_APP 8 @@ -31,9 +31,9 @@ typedef struct { } WakeupInfo; //! @internal -//! This function initializes the wakeup service. -//! Triggers a popup notification for any apps that missed a -//! wakeup_event while the Pebble was off and specified +//! This function initializes the wakeup service. +//! Triggers a popup notification for any apps that missed a +//! wakeup_event while the Pebble was off and specified //! notify_if_missed while scheduling the event. //! Deletes all expired wakeup_events from "wakeup" settings_file and //! schedules the next wakeup_event using a new_timer diff --git a/include/pbl/services/weather/weather_types.h b/include/pbl/services/weather/weather_types.h index b20e72db21..c5e0f19058 100644 --- a/include/pbl/services/weather/weather_types.h +++ b/include/pbl/services/weather/weather_types.h @@ -15,8 +15,8 @@ // Do NOT add entries here. See weather_type_tuples.def // TODO (PBL-36438): use proper enum naming typedef enum { -#define WEATHER_TYPE_TUPLE(id, numeric_id, bg_color, text_color, timeline_resource_id)\ - WeatherType_##id = numeric_id, +#define WEATHER_TYPE_TUPLE(id, numeric_id, bg_color, text_color, timeline_resource_id) \ + WeatherType_##id = numeric_id, #include "weather_type_tuples.def" } WeatherType; diff --git a/include/pbl/util/assert.h b/include/pbl/util/assert.h index 199ad347f3..1aab7d1a68 100644 --- a/include/pbl/util/assert.h +++ b/include/pbl/util/assert.h @@ -16,9 +16,9 @@ NORETURN util_assertion_failed(const char *filename, int line); -#define UTIL_ASSERT(expr) \ - do { \ - if (UNLIKELY(!(expr))) { \ +#define UTIL_ASSERT(expr) \ + do { \ + if (UNLIKELY(!(expr))) { \ util_assertion_failed(__FILE_NAME__, __LINE__); \ - } \ + } \ } while (0) diff --git a/include/pbl/util/attributes.h b/include/pbl/util/attributes.h index 9c2561c8ea..5ebd563142 100644 --- a/include/pbl/util/attributes.h +++ b/include/pbl/util/attributes.h @@ -39,23 +39,23 @@ // Unit tests break if variables go in custom sections #if !UNITTEST -# define SECTION(SEC) __attribute__((__section__(SEC))) +#define SECTION(SEC) __attribute__((__section__(SEC))) #else -# define SECTION(SEC) +#define SECTION(SEC) #endif // Use this macro to allow overriding of private functions in order to test them within unit tests. #if !UNITTEST -# define T_STATIC static +#define T_STATIC static #else -# define T_STATIC WEAK +#define T_STATIC WEAK #endif // Use this macro to allow overriding of non-static (i.e. global) functions in order to test them // within unit tests. For lack of a better name, we have named this a MOCKABLE (i.e. can be // mocked or overridden in unit tests but not in normal firmware) #if !UNITTEST -# define MOCKABLE +#define MOCKABLE #else -# define MOCKABLE WEAK +#define MOCKABLE WEAK #endif diff --git a/include/pbl/util/build_id.h b/include/pbl/util/build_id.h index aa2cfca7da..5e5cf3520c 100644 --- a/include/pbl/util/build_id.h +++ b/include/pbl/util/build_id.h @@ -12,17 +12,17 @@ typedef struct PACKED { uint32_t name_length; uint32_t data_length; - uint32_t type; // NT_GNU_BUILD_ID = 3 - uint8_t data[]; // concatenated name ('GNU') + data (build id) + uint32_t type; // NT_GNU_BUILD_ID = 3 + uint8_t data[]; // concatenated name ('GNU') + data (build id) } ElfExternalNote; // the build id is a unique identification for the built files. The default algo uses SHA1 // to produce a 160 bit (20 byte sequence) -#define BUILD_ID_EXPECTED_LEN (20) +#define BUILD_ID_EXPECTED_LEN (20) -#define BUILD_ID_NAME_EXPECTED_LEN (4) +#define BUILD_ID_NAME_EXPECTED_LEN (4) -#define BUILD_ID_TOTAL_EXPECTED_LEN (sizeof(ElfExternalNote) + \ - BUILD_ID_NAME_EXPECTED_LEN + BUILD_ID_EXPECTED_LEN) +#define BUILD_ID_TOTAL_EXPECTED_LEN \ + (sizeof(ElfExternalNote) + BUILD_ID_NAME_EXPECTED_LEN + BUILD_ID_EXPECTED_LEN) bool build_id_contains_gnu_build_id(const ElfExternalNote *note); diff --git a/include/pbl/util/circular_buffer.h b/include/pbl/util/circular_buffer.h index 3406c84f76..6fb1c6896d 100644 --- a/include/pbl/util/circular_buffer.h +++ b/include/pbl/util/circular_buffer.h @@ -7,32 +7,31 @@ #include #include - //! The circular buffer is a contiguous buffer of a fixed length where data is written and consumed //! in a circular fashion. When the write ends up writing past the end of the buffer, it wraps //! around to use the first part of the buffer again, assuming that someone else has consumed some //! data to free it up. typedef struct CircularBuffer { - uint8_t* buffer; + uint8_t *buffer; bool write_in_progress; bool auto_reset; uint16_t buffer_size; - uint16_t read_index; //! What offset in buffer that we should read from next. - uint16_t data_length; //! How many bytes after read_index contain valid data. + uint16_t read_index; //! What offset in buffer that we should read from next. + uint16_t data_length; //! How many bytes after read_index contain valid data. } CircularBuffer; -void circular_buffer_init(CircularBuffer* buffer, uint8_t* storage, uint16_t storage_size); +void circular_buffer_init(CircularBuffer *buffer, uint8_t *storage, uint16_t storage_size); //! Extended _init() -- provides access to auto_reset flag. //! If auto_reset is true (default), on _consume(), read/write pointers will be reset in an attempt //! to reduce buffer wraps. If false, the buffer will always wrap, leaving the previous data //! in the buffer. This is handy for post mortem evaluation of debug logs, etc. -void circular_buffer_init_ex(CircularBuffer* buffer, uint8_t* storage, uint16_t storage_size, +void circular_buffer_init_ex(CircularBuffer *buffer, uint8_t *storage, uint16_t storage_size, bool auto_reset); //! Copies data from a given buffer and length into the circular buffer. //! @return false if there's insufficient space. -bool circular_buffer_write(CircularBuffer* buffer, const void* data, uint16_t length); +bool circular_buffer_write(CircularBuffer *buffer, const void *data, uint16_t length); //! Gets a pointer into the circular buffer where the caller itself can write data to. //! @note After the client is done writing data, it _must_ call circular_buffer_write_finish() @@ -55,22 +54,25 @@ void circular_buffer_write_finish(CircularBuffer *buffer, uint16_t written_lengt //! Read a contiguous chunk of memory from the circular buffer. The data remains on the buffer until //! circular_buffer_consume is called. //! -//! If the circular buffer wraps in the middle of the requested data, this function call will return true but will -//! provide fewer bytes that requested. When this happens, the length_out parameter will be set to a value smaller -//! than length. A second read call can be made with the remaining smaller length to retrieve the rest. +//! If the circular buffer wraps in the middle of the requested data, this function call will return +//! true but will provide fewer bytes that requested. When this happens, the length_out parameter +//! will be set to a value smaller than length. A second read call can be made with the remaining +//! smaller length to retrieve the rest. //! -//! The reason this read doesn't consume is to avoid having to copy out the data. The data_out pointer should be -//! stable until you explicitly ask for it to be consumed with circular_buffer_consume. +//! The reason this read doesn't consume is to avoid having to copy out the data. The data_out +//! pointer should be stable until you explicitly ask for it to be consumed with +//! circular_buffer_consume. //! //! @param buffer The buffer to read from //! @param length How many bytes to read //! @param[out] data_out The bytes that were read. //! @param[out] length_out How many bytes were read. //! @return false if there's less than length bytes in the buffer. -bool circular_buffer_read(const CircularBuffer* buffer, uint16_t length, const uint8_t** data_out, uint16_t* length_out); +bool circular_buffer_read(const CircularBuffer *buffer, uint16_t length, const uint8_t **data_out, + uint16_t *length_out); //! Same as circular_buffer_copy_offset(), but with a starting offset of zero. -uint16_t circular_buffer_copy(const CircularBuffer* buffer, void *data_out, uint16_t length); +uint16_t circular_buffer_copy(const CircularBuffer *buffer, void *data_out, uint16_t length); //! Copy a number of bytes from the circular buffer into another (contiguous) //! buffer. The function takes care of any wrapping of the circular buffer. @@ -81,7 +83,7 @@ uint16_t circular_buffer_copy(const CircularBuffer* buffer, void *data_out, uint //! @param[out] data_out The buffer to copy the data to. //! @param length The number of bytes to copy. //! @return The number of bytes copied. -uint16_t circular_buffer_copy_offset(const CircularBuffer* buffer, uint16_t start_offset, +uint16_t circular_buffer_copy_offset(const CircularBuffer *buffer, uint16_t start_offset, uint8_t *data_out, uint16_t length); //! Gets a pointer to a continuous byte array of the requested length from the circular buffer. @@ -99,15 +101,14 @@ uint16_t circular_buffer_copy_offset(const CircularBuffer* buffer, uint16_t star //! heap-allocated buffer. //! @return false if there's less than length bytes in the buffer or if the copy failed because //! there was not enough memory. -bool circular_buffer_read_or_copy(const CircularBuffer* buffer, uint8_t **data_out, size_t length, +bool circular_buffer_read_or_copy(const CircularBuffer *buffer, uint8_t **data_out, size_t length, void *(*malloc_imp)(size_t), bool *caller_should_free); //! Removes length bytes of the oldest data from the buffer. -bool circular_buffer_consume(CircularBuffer* buffer, uint16_t length); +bool circular_buffer_consume(CircularBuffer *buffer, uint16_t length); //! @return The number of bytes we can write before circular_buffer_write will return false. -uint16_t circular_buffer_get_write_space_remaining(const CircularBuffer* buffer); +uint16_t circular_buffer_get_write_space_remaining(const CircularBuffer *buffer); //! @return The number of bytes we can read before circular_buffer_read will return false. -uint16_t circular_buffer_get_read_space_remaining(const CircularBuffer* buffer); - +uint16_t circular_buffer_get_read_space_remaining(const CircularBuffer *buffer); diff --git a/include/pbl/util/circular_cache.h b/include/pbl/util/circular_cache.h index b99c335ed3..3e59abcbd3 100644 --- a/include/pbl/util/circular_cache.h +++ b/include/pbl/util/circular_cache.h @@ -14,16 +14,16 @@ typedef void (*CircularCacheItemDestructor)(void *item); //! Array-backed circular cache typedef struct { - uint8_t* cache; // -typedef void* IteratorState; +typedef void *IteratorState; typedef bool (*IteratorCallback)(IteratorState state); @@ -17,15 +17,14 @@ typedef struct { IteratorState state; } Iterator; -#define ITERATOR_EMPTY ((Iterator){ 0, 0, 0 }) +#define ITERATOR_EMPTY ((Iterator){0, 0, 0}) -void iter_init(Iterator* iter, IteratorCallback next, IteratorCallback prev, IteratorState state); +void iter_init(Iterator *iter, IteratorCallback next, IteratorCallback prev, IteratorState state); //! @return true if successfully moved to next node -bool iter_next(Iterator* iter); +bool iter_next(Iterator *iter); //! @return true if successfully moved to previous node -bool iter_prev(Iterator* iter); - -IteratorState iter_get_state(Iterator* iter); +bool iter_prev(Iterator *iter); +IteratorState iter_get_state(Iterator *iter); diff --git a/include/pbl/util/keyed_circular_cache.h b/include/pbl/util/keyed_circular_cache.h index b447f1b9c7..312d403e59 100644 --- a/include/pbl/util/keyed_circular_cache.h +++ b/include/pbl/util/keyed_circular_cache.h @@ -14,9 +14,9 @@ typedef uint32_t KeyedCircularCacheKey; //! Array-backed circular cache, optimized for data cache efficiency typedef struct { KeyedCircularCacheKey *cache_keys; - uint8_t *cache_data; // #ifndef MIN -#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif #ifndef MAX -#define MAX(a,b) (((a)>(b))?(a):(b)) +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif #define ABS(a) (((a) > 0) ? (a) : -1 * (a)) -#define CLIP(n, min, max) ((n)<(min)?(min):((n)>(max)?(max):(n))) -#define ROUND(num, denom) (((num) + ((denom) / 2))/(denom)) +#define CLIP(n, min, max) ((n) < (min) ? (min) : ((n) > (max) ? (max) : (n))) +#define ROUND(num, denom) (((num) + ((denom) / 2)) / (denom)) #define WITHIN(n, min, max) ((n) >= (min) && (n) <= (max)) #define RANGE_WITHIN(n_min, n_max, min, max) ((n_min) >= (min) && (n_max) <= (max)) @@ -27,15 +27,13 @@ // Round value up to the next increment of modulus // ex. val = 152 mod = 32 : returns 160 // val = -32 mod = 90 : returns -90 -#define ROUND_TO_MOD_CEIL(val, mod) \ - (((val) >= 0) ? \ - ((((val) + ABS(ABS(mod) - 1)) / ABS(mod)) * ABS(mod)) : \ - -((((-val) + ABS(ABS(mod) - 1)) / ABS(mod)) * ABS(mod))) +#define ROUND_TO_MOD_CEIL(val, mod) \ + (((val) >= 0) ? ((((val) + ABS(ABS(mod) - 1)) / ABS(mod)) * ABS(mod)) \ + : -((((-val) + ABS(ABS(mod) - 1)) / ABS(mod)) * ABS(mod))) // Round unsigned value up to the next increment of modulus // ex. val = 152 mod = 32 : returns 160 -#define ROUND_TO_MOD_CEIL_U(val, mod) \ - ((((val) + ABS(ABS(mod) - 1)) / ABS(mod)) * ABS(mod)) +#define ROUND_TO_MOD_CEIL_U(val, mod) ((((val) + ABS(ABS(mod) - 1)) / ABS(mod)) * ABS(mod)) int32_t sign_extend(uint32_t a, int bits); @@ -63,21 +61,22 @@ int32_t integer_sqrt(int64_t x); //! Determine whether a variable is signed or not. //! @param var The variable to evaluate. //! @return true if the variable is signed. -#define IS_SIGNED(var) (__builtin_choose_expr( \ - __builtin_types_compatible_p(__typeof__(var), unsigned char), false, \ - __builtin_choose_expr( \ - __builtin_types_compatible_p(__typeof__(var), unsigned short), false, \ - __builtin_choose_expr( \ - __builtin_types_compatible_p(__typeof__(var), unsigned int), false, \ - __builtin_choose_expr( \ - __builtin_types_compatible_p(__typeof__(var), unsigned long), false, \ - __builtin_choose_expr( \ - __builtin_types_compatible_p(__typeof__(var), unsigned long long), false, true))))) \ -) +#define IS_SIGNED(var) \ + (__builtin_choose_expr( \ + __builtin_types_compatible_p(__typeof__(var), unsigned char), false, \ + __builtin_choose_expr( \ + __builtin_types_compatible_p(__typeof__(var), unsigned short), false, \ + __builtin_choose_expr( \ + __builtin_types_compatible_p(__typeof__(var), unsigned int), false, \ + __builtin_choose_expr( \ + __builtin_types_compatible_p(__typeof__(var), unsigned long), false, \ + __builtin_choose_expr( \ + __builtin_types_compatible_p(__typeof__(var), unsigned long long), false, \ + true)))))) // http://stackoverflow.com/questions/14997165/fastest-way-to-get-a-positive-modulo-in-c-c static inline int positive_modulo(int i, int n) { - return (i % n + n) % n; + return (i % n + n) % n; } // https://stackoverflow.com/questions/1878907/the-smallest-difference-between-2-angles @@ -90,8 +89,10 @@ static inline int distance_to_mod_boundary(int32_t i, uint16_t n) { /** * Compute the next backoff interval using a bounded binary exponential backoff formula. * - * @param[in,out] attempt The number of retries performed so far. This count will be incremented by the function. - * @param[in] initial_value The inital backoff interval. Subsequent backoff attempts will be this number multiplied by a power of 2. + * @param[in,out] attempt The number of retries performed so far. This count will be incremented by + * the function. + * @param[in] initial_value The inital backoff interval. Subsequent backoff attempts will be this + * number multiplied by a power of 2. * @param[in] max_value The maximum backoff interval that returned by the function. * @return The next backoff interval. */ diff --git a/include/pbl/util/math_fixed.h b/include/pbl/util/math_fixed.h index 62d6a5d39c..d39a323216 100644 --- a/include/pbl/util/math_fixed.h +++ b/include/pbl/util/math_fixed.h @@ -17,24 +17,24 @@ // without any complicated logic. // The same representation for negative numbers applies for all fixed point representations // in this file (i.e. fraction component is a positive addition to the integer). -typedef union __attribute__ ((__packed__)) Fixed_S16_3 { +typedef union __attribute__((__packed__)) Fixed_S16_3 { int16_t raw_value; struct { - uint16_t fraction:3; - int16_t integer:13; + uint16_t fraction : 3; + int16_t integer : 13; }; } Fixed_S16_3; -#define Fixed_S16_3(raw) ((Fixed_S16_3){ .raw_value = (raw) }) +#define Fixed_S16_3(raw) ((Fixed_S16_3){.raw_value = (raw)}) #define FIXED_S16_3_PRECISION 3 #define FIXED_S16_3_FACTOR (1 << FIXED_S16_3_PRECISION) -#define FIXED_S16_3_ZERO ((Fixed_S16_3){ .integer = 0, .fraction = 0 }) -#define FIXED_S16_3_ONE ((Fixed_S16_3){ .integer = 1, .fraction = 0 }) -#define FIXED_S16_3_HALF ((Fixed_S16_3){ .raw_value = FIXED_S16_3_ONE.raw_value / 2 }) +#define FIXED_S16_3_ZERO ((Fixed_S16_3){.integer = 0, .fraction = 0}) +#define FIXED_S16_3_ONE ((Fixed_S16_3){.integer = 1, .fraction = 0}) +#define FIXED_S16_3_HALF ((Fixed_S16_3){.raw_value = FIXED_S16_3_ONE.raw_value / 2}) static __inline__ Fixed_S16_3 Fixed_S16_3_mul(Fixed_S16_3 a, Fixed_S16_3 b) { - return Fixed_S16_3(((int32_t) a.raw_value * b.raw_value) >> FIXED_S16_3_PRECISION); + return Fixed_S16_3(((int32_t)a.raw_value * b.raw_value) >> FIXED_S16_3_PRECISION); } static __inline__ Fixed_S16_3 Fixed_S16_3_add(Fixed_S16_3 a, Fixed_S16_3 b) { @@ -61,11 +61,11 @@ static __inline__ int16_t Fixed_S16_3_rounded_int(Fixed_S16_3 a) { //////////////////////////////////////////////////////////////// /// Fixed_S32_16 = 1 bit sign, 15 bits integer, 16 bits fraction //////////////////////////////////////////////////////////////// -typedef union __attribute__ ((__packed__)) Fixed_S32_16 { +typedef union __attribute__((__packed__)) Fixed_S32_16 { int32_t raw_value; struct { - uint16_t fraction:16; - int16_t integer:16; + uint16_t fraction : 16; + int16_t integer : 16; }; } Fixed_S32_16; @@ -73,17 +73,17 @@ typedef union __attribute__ ((__packed__)) Fixed_S32_16 { //! tripping the pre-processor to use the equally named Fixed_S32_16 define typedef Fixed_S32_16 Fixed_S32_16Return; -#define Fixed_S32_16(raw) ((Fixed_S32_16){ .raw_value = (raw) }) +#define Fixed_S32_16(raw) ((Fixed_S32_16){.raw_value = (raw)}) #define FIXED_S32_16_PRECISION 16 -#define FIXED_S32_16_ONE ((Fixed_S32_16){ .integer = 1, .fraction = 0 }) -#define FIXED_S32_16_ZERO ((Fixed_S32_16){ .integer = 0, .fraction = 0 }) +#define FIXED_S32_16_ONE ((Fixed_S32_16){.integer = 1, .fraction = 0}) +#define FIXED_S32_16_ZERO ((Fixed_S32_16){.integer = 0, .fraction = 0}) static __inline__ Fixed_S32_16 Fixed_S32_16_mul(Fixed_S32_16 a, Fixed_S32_16 b) { Fixed_S32_16 x; - x.raw_value = (int32_t)((((int64_t) a.raw_value * (int64_t) b.raw_value)) >> - FIXED_S32_16_PRECISION); + x.raw_value = + (int32_t)((((int64_t)a.raw_value * (int64_t)b.raw_value)) >> FIXED_S32_16_PRECISION); return x; } @@ -99,33 +99,32 @@ static __inline__ Fixed_S32_16 Fixed_S32_16_sub(Fixed_S32_16 a, Fixed_S32_16 b) return Fixed_S32_16(a.raw_value - b.raw_value); } - //////////////////////////////////////////////////////////////// /// Fixed_S64_32 = 1 bit sign, 31 bits integer, 32 bits fraction //////////////////////////////////////////////////////////////// -typedef union __attribute__ ((__packed__)) Fixed_S64_32 { +typedef union __attribute__((__packed__)) Fixed_S64_32 { int64_t raw_value; struct { - uint32_t fraction:32; - int32_t integer:32; + uint32_t fraction : 32; + int32_t integer : 32; }; } Fixed_S64_32; #define FIXED_S64_32_PRECISION 32 -#define FIXED_S64_32_ONE ((Fixed_S64_32){ .integer = 1, .fraction = 0 }) -#define FIXED_S64_32_ZERO ((Fixed_S64_32){ .integer = 0, .fraction = 0 }) +#define FIXED_S64_32_ONE ((Fixed_S64_32){.integer = 1, .fraction = 0}) +#define FIXED_S64_32_ZERO ((Fixed_S64_32){.integer = 0, .fraction = 0}) -#define FIXED_S64_32_FROM_RAW(raw) ((Fixed_S64_32){ .raw_value = (raw) }) -#define FIXED_S64_32_FROM_INT(x) ((Fixed_S64_32){ .integer = x, .fraction = 0 }) +#define FIXED_S64_32_FROM_RAW(raw) ((Fixed_S64_32){.raw_value = (raw)}) +#define FIXED_S64_32_FROM_INT(x) ((Fixed_S64_32){.integer = x, .fraction = 0}) #define FIXED_S64_32_TO_INT(x) (x.integer) static __inline__ Fixed_S64_32 Fixed_S64_32_mul(Fixed_S64_32 a, Fixed_S64_32 b) { Fixed_S64_32 result; - result.raw_value = (((uint64_t)(a.integer * b.integer)) << 32) - + ((((uint64_t)a.fraction) * ((uint64_t)b.fraction)) >> 32) - + ((a.integer) * ((uint64_t)b.fraction)) - + (((uint64_t)a.fraction) * (b.integer)); + result.raw_value = (((uint64_t)(a.integer * b.integer)) << 32) + + ((((uint64_t)a.fraction) * ((uint64_t)b.fraction)) >> 32) + + ((a.integer) * ((uint64_t)b.fraction)) + + (((uint64_t)a.fraction) * (b.integer)); return result; } @@ -141,16 +140,14 @@ static __inline__ Fixed_S64_32 Fixed_S64_32_sub(Fixed_S64_32 a, Fixed_S64_32 b) return FIXED_S64_32_FROM_RAW(a.raw_value - b.raw_value); } - //////////////////////////////////////////////////////////////// /// Mixed operations //////////////////////////////////////////////////////////////// // This function multiplies a Fixed_S16_3 and Fixed_S32_16 and returns result in Fixed_S16_3 format static __inline__ Fixed_S16_3 Fixed_S16_3_S32_16_mul(Fixed_S16_3 a, Fixed_S32_16 b) { - return Fixed_S16_3( a.raw_value * b.raw_value >> FIXED_S32_16_PRECISION ); + return Fixed_S16_3(a.raw_value * b.raw_value >> FIXED_S32_16_PRECISION); } - //////////////////////////////////////////////////////////////// /// High level math functions and filters //////////////////////////////////////////////////////////////// @@ -169,7 +166,7 @@ static __inline__ Fixed_S16_3 Fixed_S16_3_S32_16_mul(Fixed_S16_3 a, Fixed_S32_16 //! @param[in,out] state_y pointer to array to hold the history of y. Must be an array //! of size num_output_coefficients //! @return the filtered output value, y[n] -Fixed_S64_32 math_fixed_recursive_filter(Fixed_S64_32 x, - int num_input_coefficients, int num_output_coefficients, - const Fixed_S64_32 *cb, const Fixed_S64_32 *ca, - Fixed_S64_32 *state_x, Fixed_S64_32 *state_y); +Fixed_S64_32 math_fixed_recursive_filter(Fixed_S64_32 x, int num_input_coefficients, + int num_output_coefficients, const Fixed_S64_32 *cb, + const Fixed_S64_32 *ca, Fixed_S64_32 *state_x, + Fixed_S64_32 *state_y); diff --git a/include/pbl/util/order.h b/include/pbl/util/order.h index 18bd055982..1fc118aa55 100644 --- a/include/pbl/util/order.h +++ b/include/pbl/util/order.h @@ -6,7 +6,8 @@ #include //! A Comparator returns the Order in which (a, b) occurs -//! @return negative int for a descending value (a > b), positive for an ascending value (b > a), 0 for equal +//! @return negative int for a descending value (a > b), positive for an ascending value (b > a), 0 +//! for equal typedef int (*Comparator)(void *a, void *b); int uint32_comparator(void *a, void *b); diff --git a/include/pbl/util/size.h b/include/pbl/util/size.h index f9cc8f2025..5978d800cd 100644 --- a/include/pbl/util/size.h +++ b/include/pbl/util/size.h @@ -6,13 +6,13 @@ //! Calculate the length of an array, based on the size of the element type. //! @param array The array to be evaluated. //! @return The length of the array. -#define ARRAY_LENGTH(array) (sizeof((array))/sizeof((array)[0])) +#define ARRAY_LENGTH(array) (sizeof((array)) / sizeof((array)[0])) //! Calculate the length of a literal array based on the size of the given type //! This is usable in contexts that require compile time constants //! @param type Type of the elements //! @param array Literal definition of the array //! @return Length of the array in bytes -#define STATIC_ARRAY_LENGTH(type, array) (sizeof((type[]) array) / sizeof(type)) +#define STATIC_ARRAY_LENGTH(type, array) (sizeof((type[])array) / sizeof(type)) #define MEMBER_SIZE(type, member) sizeof(((type *)0)->member) diff --git a/include/pbl/util/slist.h b/include/pbl/util/slist.h index fc70470eb0..6603be4c5d 100644 --- a/include/pbl/util/slist.h +++ b/include/pbl/util/slist.h @@ -16,29 +16,29 @@ typedef bool (*SingleListFilterCallback)(SingleListNode *found_node, void *data) //! - If a callback returns false, the iteration stops. typedef bool (*SingleListForEachCallback)(SingleListNode *node, void *context); -#define SINGLE_LIST_NODE_NULL { .next = NULL } +#define SINGLE_LIST_NODE_NULL {.next = NULL} //! Initializes the node. void slist_init(SingleListNode *node); //! Inserts new_node after node in the list. //! Always returns new_node. -SingleListNode* slist_insert_after(SingleListNode *node, SingleListNode *new_node); +SingleListNode *slist_insert_after(SingleListNode *node, SingleListNode *new_node); //! Prepends new_node to the head of the list. //! @param head The current head of the list, can be NULL. //! @param new_node The node to prepend. //! Always returns the new head of the list. -SingleListNode* slist_prepend(SingleListNode *head, SingleListNode *new_node); +SingleListNode *slist_prepend(SingleListNode *head, SingleListNode *new_node); //! Appends new_node to the tail of the list that head is part of. //! @param head Any node in the list, can be NULL (will result in a list containing only new_node). //! @param new_node The node to append. //! Always returns the tail of the list. -SingleListNode* slist_append(SingleListNode *head, SingleListNode *new_node); +SingleListNode *slist_append(SingleListNode *head, SingleListNode *new_node); //! Removes the head of the list and returns the new head. -SingleListNode* slist_pop_head(SingleListNode *head); +SingleListNode *slist_pop_head(SingleListNode *head); //! Removes the node from the list. //! @param node the SingleListNode to remove. @@ -47,10 +47,10 @@ SingleListNode* slist_pop_head(SingleListNode *head); void slist_remove(SingleListNode *node, SingleListNode **head); //! Gets the next node. -SingleListNode* slist_get_next(SingleListNode *node); +SingleListNode *slist_get_next(SingleListNode *node); //! Gets the last node in the list. -SingleListNode* slist_get_tail(SingleListNode *node); +SingleListNode *slist_get_tail(SingleListNode *node); //! @return true if the passed in node is the tail of a list. bool slist_is_tail(const SingleListNode *node); @@ -67,7 +67,7 @@ bool slist_contains(const SingleListNode *head, const SingleListNode *node); //! @param head The list node from which to start the search. //! @param filter_callback A function returning true if the node matches the filter criteria. //! @param data Optional callback data. -SingleListNode* slist_find(SingleListNode *head, SingleListFilterCallback filter_callback, +SingleListNode *slist_find(SingleListNode *head, SingleListFilterCallback filter_callback, void *data); //! Adds a node to a list ordered by given comparator. @@ -77,14 +77,14 @@ SingleListNode* slist_find(SingleListNode *head, SingleListFilterCallback filter //! @param[in] ascending True to maintain the list ordered ascending from head to tail. //! @returns The (new) head of the list. //! @note This function will not sort existing nodes in the list. -SingleListNode* slist_sorted_add(SingleListNode *head, SingleListNode *new_node, +SingleListNode *slist_sorted_add(SingleListNode *head, SingleListNode *new_node, Comparator comparator, bool ascending); //! Concatenate two lists. //! @param list_a list onto which to concatenate list_b. //! @param list_b list to concatenate onto list_a. //! @return head of the new list. -SingleListNode* slist_concatenate(SingleListNode *list_a, SingleListNode *list_b); +SingleListNode *slist_concatenate(SingleListNode *list_a, SingleListNode *list_b); //! Iterates over each node and passes it into callback given. //! @param[in] head The head of the list that we want to iterate over. diff --git a/include/pbl/util/string.h b/include/pbl/util/string.h index 8c00d1ed5a..f7e603674f 100644 --- a/include/pbl/util/string.h +++ b/include/pbl/util/string.h @@ -11,7 +11,7 @@ // but if you just extern this the libc still has the right symbol. Weirdddd. size_t strnlen(const char *, size_t); -const char *string_strip_leading_whitespace(const char * string); +const char *string_strip_leading_whitespace(const char *string); void string_strip_trailing_whitespace(const char *string, char *string_out); @@ -39,7 +39,8 @@ const char *bool_to_str(bool b); //! @param bd_addr Points to a SS1 BD_ADDR_t as defined in BTBTypes.h //! @param bd_addr_size Size of the bd_addr buffer, in bytes //! @return True on success -bool convert_bt_addr_hex_str_to_bd_addr(const char *hex_str, uint8_t *bd_addr, const unsigned int bd_addr_size); +bool convert_bt_addr_hex_str_to_bd_addr(const char *hex_str, uint8_t *bd_addr, + const unsigned int bd_addr_size); //! Concatenates a simple string and a number. //! NOTE: Buffer must be long enough to fit the largest number value (12 bytes) and the string, plus @@ -50,11 +51,11 @@ void concat_str_int(const char *str, uint32_t num, char *buf, uint8_t buf_len); void toupper_str(char *str); //! Converts a byte stream to a hex string, i.e ({0xaa, 0xbb, 0xcc} -> "aabbcc") -void byte_stream_to_hex_string(char *out_buf, size_t out_buf_len, - const uint8_t *byte_stream, size_t byte_stream_len, bool stream_backward); +void byte_stream_to_hex_string(char *out_buf, size_t out_buf_len, const uint8_t *byte_stream, + size_t byte_stream_len, bool stream_backward); //! Appends the src string to dst, taking the overall size of the dst buffer into account //! @param dst Destination string to append to //! @param src String to append //! @param dst_space Total size of dst buffer -void safe_strcat(char* dst, const char* src, int dst_space); +void safe_strcat(char *dst, const char *src, int dst_space); diff --git a/include/pbl/util/trig.h b/include/pbl/util/trig.h index 256729b6af..e52430e9fe 100644 --- a/include/pbl/util/trig.h +++ b/include/pbl/util/trig.h @@ -39,17 +39,20 @@ //! Look-up the sine of the given angle from a pre-computed table. //! @param angle The angle for which to compute the cosine. -//! The angle value is scaled linearly, such that a value of 0x10000 corresponds to 360 degrees or 2 PI radians. +//! The angle value is scaled linearly, such that a value of 0x10000 corresponds to 360 degrees or 2 +//! PI radians. int32_t sin_lookup(int32_t angle); //! Look-up the cosine of the given angle from a pre-computed table. //! This is equivalent to calling `sin_lookup(angle + TRIG_MAX_ANGLE / 4)`. //! @param angle The angle for which to compute the cosine. -//! The angle value is scaled linearly, such that a value of 0x10000 corresponds to 360 degrees or 2 PI radians. +//! The angle value is scaled linearly, such that a value of 0x10000 corresponds to 360 degrees or 2 +//! PI radians. int32_t cos_lookup(int32_t angle); //! Look-up the arctangent of a given x, y pair -//! The angle value is scaled linearly, such that a value of 0x10000 corresponds to 360 degrees or 2 PI radians. +//! The angle value is scaled linearly, such that a value of 0x10000 corresponds to 360 degrees or 2 +//! PI radians. int32_t atan2_lookup(int16_t y, int16_t x); //! @internal diff --git a/include/pbl/util/uuid.h b/include/pbl/util/uuid.h index 308c67655d..65360d9898 100644 --- a/include/pbl/util/uuid.h +++ b/include/pbl/util/uuid.h @@ -29,27 +29,30 @@ typedef struct __attribute__((__packed__)) { } Uuid; #define UUID_SYSTEM {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define UUID_INVALID_INIT {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} -#define UUID_INVALID ((const Uuid) UUID_INVALID_INIT) +#define UUID_INVALID_INIT \ + {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} +#define UUID_INVALID ((const Uuid)UUID_INVALID_INIT) //! Make a Uuid object from sixteen bytes. //! @return A Uuid structure representing the bytes p0 to p15. -#define UuidMake(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) ((Uuid) {p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15}) +#define UuidMake(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) \ + ((Uuid){p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15}) //! Creates a Uuid from an array of bytes with 16 bytes in Big Endian order. //! @return The created Uuid -#define UuidMakeFromBEBytes(b) ((Uuid) { b[0], b[1], b[2], b[3], \ - b[4], b[5], b[6], b[7], \ - b[8], b[9], b[10], b[11], \ - b[12], b[13], b[14], b[15] }) +#define UuidMakeFromBEBytes(b) \ + ((Uuid){ \ + b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], b[12], b[13], \ + b[14], b[15] \ + }) //! Creates a Uuid from an array of bytes with 16 bytes in Little Endian order. //! @return The created Uuid -#define UuidMakeFromLEBytes(b) ((Uuid) { b[15], b[14], b[13], b[12], \ - b[11], b[10], b[9], b[8], \ - b[7], b[6], b[5], b[4], \ - b[3], b[2], b[1], b[0] }) +#define UuidMakeFromLEBytes(b) \ + ((Uuid){ \ + b[15], b[14], b[13], b[12], b[11], b[10], b[9], b[8], b[7], b[6], b[5], b[4], b[3], b[2], \ + b[1], b[0] \ + }) //! Compares two UUIDs. //! @return True if the two UUIDs are equal, false if they are not. @@ -68,11 +71,11 @@ bool uuid_is_system(const Uuid *uuid); bool uuid_is_invalid(const Uuid *uuid); //! The minimum required length of a string used to hold a uuid (including null). -#define UUID_STRING_BUFFER_LENGTH (32 + 4 + 2 + 1) // numbers + dashes + brackets + trailing null +#define UUID_STRING_BUFFER_LENGTH (32 + 4 + 2 + 1) // numbers + dashes + brackets + trailing null //! Writes UUID in a string form into buffer that looks like the following... //! {12345678-1234-5678-1234-567812345678} or {NULL UUID} if NULL was passed. //! @param uuid The Uuid to write into the buffer as human-readable string -//! @param buffer Memory to write the string to. Must be at least \ref UUID_STRING_BUFFER_LENGTH bytes long. +//! @param buffer Memory to write the string to. Must be at least \ref UUID_STRING_BUFFER_LENGTH +//! bytes long. void uuid_to_string(const Uuid *uuid, char *buffer); - diff --git a/include/pebbleos/core_dump_structs.h b/include/pebbleos/core_dump_structs.h index d46ab07a03..9d6efc84bd 100644 --- a/include/pebbleos/core_dump_structs.h +++ b/include/pebbleos/core_dump_structs.h @@ -17,23 +17,23 @@ #define CORE_DUMP_NUM_REGISTERS 17 // Structure of thread info stored within a CORE_DUMP_CHUNK_KEY_THREAD chunk in the core dump -#define CORE_DUMP_THREAD_NAME_SIZE 16 +#define CORE_DUMP_THREAD_NAME_SIZE 16 typedef struct PACKED { - int8_t name[CORE_DUMP_THREAD_NAME_SIZE]; // Name, includes null termination - uint32_t id; // thread id - uint8_t running; // true if this thread is running - uint32_t registers[CORE_DUMP_NUM_REGISTERS]; // registers [r0-r12, sp, lr, pc, xpsr] + int8_t name[CORE_DUMP_THREAD_NAME_SIZE]; // Name, includes null termination + uint32_t id; // thread id + uint8_t running; // true if this thread is running + uint32_t registers[CORE_DUMP_NUM_REGISTERS]; // registers [r0-r12, sp, lr, pc, xpsr] } CoreDumpThreadInfo; // Structure of extra registers stored within a CORE_DUMP_CHUNK_KEY_EXTRA_REG chunk in the // core dump typedef struct PACKED { - uint32_t msp; - uint32_t psp; - uint8_t primask; - uint8_t basepri; - uint8_t faultmask; - uint8_t control; + uint32_t msp; + uint32_t psp; + uint8_t primask; + uint8_t basepri; + uint8_t faultmask; + uint8_t control; } CoreDumpExtraRegInfo; // We save all the important registers on entry to core_dump_reset() in a structure of this type diff --git a/include/pebbleos/cron.h b/include/pebbleos/cron.h index a5c553e117..dd5d45c3cf 100644 --- a/include/pebbleos/cron.h +++ b/include/pebbleos/cron.h @@ -13,7 +13,7 @@ typedef struct CronJob CronJob; -typedef void (*CronJobCallback)(CronJob *job, void* data); +typedef void (*CronJobCallback)(CronJob *job, void *data); //! Matches any possible value. #define CRON_MINUTE_ANY (-1) @@ -44,7 +44,7 @@ struct CronJob { //! Callback that is called when the job fires. CronJobCallback cb; - void* cb_data; + void *cb_data; //! Occasionally, the system gets a clock change event for various reasons: //! - User changed time-zones or a DST transition happened @@ -62,10 +62,10 @@ struct CronJob { //! This value is specified in seconds. uint32_t clock_change_tolerance; - int8_t minute; //!< 0-59, or CRON_MINUTE_ANY - int8_t hour; //!< 0-23, or CRON_HOUR_ANY - int8_t mday; //!< 0-30, or CRON_MDAY_ANY - int8_t month; //!< 0-11, or CRON_MONTH_ANY + int8_t minute; //!< 0-59, or CRON_MINUTE_ANY + int8_t hour; //!< 0-23, or CRON_HOUR_ANY + int8_t mday; //!< 0-30, or CRON_MDAY_ANY + int8_t month; //!< 0-11, or CRON_MONTH_ANY //! Seconds to offset the cron execution time applied after regular cron job time calculation. //! For example, a cron scheduled for Monday at 0:15 with an offset of negative 30min will fire diff --git a/include/pebbleos/firmware_metadata.h b/include/pebbleos/firmware_metadata.h index bb869e3d35..7b5af84708 100644 --- a/include/pebbleos/firmware_metadata.h +++ b/include/pebbleos/firmware_metadata.h @@ -15,7 +15,6 @@ #include #include - #define FW_METADATA_CURRENT_STRUCT_VERSION 0x1 #define FW_METADATA_VERSION_SHORT_BYTES 8 #define FW_METADATA_VERSION_TAG_BYTES 32 @@ -69,49 +68,49 @@ struct PACKED FirmwareMetadata { uint32_t version_timestamp; char version_tag[FW_METADATA_VERSION_TAG_BYTES]; char version_short[FW_METADATA_VERSION_SHORT_BYTES]; - bool is_recovery_firmware:1; - bool is_ble_firmware:1; - bool is_dual_slot:1; - bool is_slot_0:1; - uint8_t reserved:4; + bool is_recovery_firmware : 1; + bool is_ble_firmware : 1; + bool is_dual_slot : 1; + bool is_slot_0 : 1; + uint8_t reserved : 4; uint8_t hw_platform; //! This should be the last field, since we put the meta data struct at the end of the fw binary. uint8_t metadata_version; }; typedef struct FirmwareMetadata FirmwareMetadata; -_Static_assert(sizeof(struct FirmwareMetadata) == (sizeof(uint32_t) + - FW_METADATA_VERSION_SHORT_BYTES + FW_METADATA_VERSION_TAG_BYTES + sizeof(uint8_t) + - sizeof(uint8_t) + sizeof(uint8_t)), +_Static_assert(sizeof(struct FirmwareMetadata) == + (sizeof(uint32_t) + FW_METADATA_VERSION_SHORT_BYTES + + FW_METADATA_VERSION_TAG_BYTES + sizeof(uint8_t) + sizeof(uint8_t) + + sizeof(uint8_t)), "FirmwareMetadata bitfields not packed correctly"); - // Shared defines. Let's not duplicate this everywhere. #ifdef CONFIG_RECOVERY_FW - #define FIRMWARE_METADATA_IS_RECOVERY_FIRMWARE (true) +#define FIRMWARE_METADATA_IS_RECOVERY_FIRMWARE (true) #else - #define FIRMWARE_METADATA_IS_RECOVERY_FIRMWARE (false) +#define FIRMWARE_METADATA_IS_RECOVERY_FIRMWARE (false) #endif #ifdef CONFIG_BOARD_ASTERIX - #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleAsterix) +#define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleAsterix) #elif defined(CONFIG_BOARD_OBELIX_DVT) - #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleObelixDVT) +#define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleObelixDVT) #elif defined(CONFIG_BOARD_OBELIX_PVT) - #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleObelixPVT) +#define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleObelixPVT) #elif defined(CONFIG_BOARD_OBELIX_BB2) - #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleObelixBigboard2) +#define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleObelixBigboard2) #elif defined(CONFIG_BOARD_GETAFIX_DVT) - #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleGetafixDVT) +#define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleGetafixDVT) #elif defined(CONFIG_BOARD_GETAFIX_DVT2) - #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleGetafixDVT2) +#define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleGetafixDVT2) #elif defined(CONFIG_BOARD_QEMU_EMERY) - #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleEmeryEmu) +#define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleEmeryEmu) #elif defined(CONFIG_BOARD_QEMU_FLINT) - #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleFlintEmu) +#define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleFlintEmu) #elif defined(CONFIG_BOARD_QEMU_GABBRO) - #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleGabbroEmu) +#define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformPebbleGabbroEmu) #else - #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformUnknown) +#define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformUnknown) #endif diff --git a/kernel/arch/arm/arch.c b/kernel/arch/arm/arch.c index cb6be61d85..bec51e4f8b 100644 --- a/kernel/arch/arm/arch.c +++ b/kernel/arch/arm/arch.c @@ -95,18 +95,18 @@ struct pbl_kernel_debug_layout { }; const struct pbl_kernel_debug_layout pbl_kernel_debug_layout __attribute__((used)) = { - .version = 1, - .thread_sp = offsetof(struct pbl_thread, backend.sp), - .thread_all_next = offsetof(struct pbl_thread, backend.all_next), - .thread_state = offsetof(struct pbl_thread, backend.state), - .thread_id = offsetof(struct pbl_thread, id), - .thread_name = offsetof(struct pbl_thread, name), - .thread_name_len = PBL_THREAD_NAME_LEN, - .ctx_control = offsetof(struct saved_context, control), - .ctx_r4 = offsetof(struct saved_context, r4_r11), - .ctx_exc_return = offsetof(struct saved_context, exc_return), - .ctx_hw = offsetof(struct saved_context, r0), - .ctx_fp_extra = NUM_EXTRA_FP_REGS * sizeof(uint32_t), + .version = 1, + .thread_sp = offsetof(struct pbl_thread, backend.sp), + .thread_all_next = offsetof(struct pbl_thread, backend.all_next), + .thread_state = offsetof(struct pbl_thread, backend.state), + .thread_id = offsetof(struct pbl_thread, id), + .thread_name = offsetof(struct pbl_thread, name), + .thread_name_len = PBL_THREAD_NAME_LEN, + .ctx_control = offsetof(struct saved_context, control), + .ctx_r4 = offsetof(struct saved_context, r4_r11), + .ctx_exc_return = offsetof(struct saved_context, exc_return), + .ctx_hw = offsetof(struct saved_context, r0), + .ctx_fp_extra = NUM_EXTRA_FP_REGS * sizeof(uint32_t), }; _Static_assert(offsetof(struct pbl_thread, backend.sp) == 0, "saved SP must be first"); @@ -119,7 +119,9 @@ static inline bool prv_fp_active(uint32_t exc_return) { // ---- threads ---------------------------------------------------------------- -static void prv_thread_return(void) { pbl_thread_abort(NULL); } +static void prv_thread_return(void) { + pbl_thread_abort(NULL); +} void arch_thread_init(struct pbl_thread *t, void (*entry)(void *), void *arg) { uintptr_t top = ((uintptr_t)t->stack + t->stack_size) & ~7u; @@ -164,7 +166,9 @@ void arch_thread_regions_set(struct pbl_thread *t, const MpuRegion *const *regio #endif } -void arch_thread_aborted(struct pbl_thread *t) { (void)t; } +void arch_thread_aborted(struct pbl_thread *t) { + (void)t; +} void arch_thread_exit(void) { // The switch requested by the abort takes over as soon as we get here. @@ -175,7 +179,9 @@ void arch_thread_exit(void) { // ---- interrupts ------------------------------------------------------------- -bool arch_in_isr(void) { return mcu_state_is_isr(); } +bool arch_in_isr(void) { + return mcu_state_is_isr(); +} void arch_irq_disable(void) { __set_BASEPRI(PBL_IRQ_PRIO_MAX_SYSCALL); @@ -183,7 +189,9 @@ void arch_irq_disable(void) { __ISB(); } -void arch_irq_enable(void) { __set_BASEPRI(0); } +void arch_irq_enable(void) { + __set_BASEPRI(0); +} void arch_switch_request(void) { SCB->ICSR = SCB_ICSR_PENDSVSET_Msk; @@ -213,7 +221,7 @@ void arch_switch_request(void) { #endif // r1 -> thread's MPU words; clobbers r2, r4-r11. -#define RESTORE_MPU \ +#define RESTORE_MPU \ " ldr r2, =0xe000ed98 \n" /* MPU_RNR */ \ " mov r4, #" STR(FIRST_MPU_REGION) " \n" \ " str r4, [r2] \n" \ @@ -226,45 +234,38 @@ __attribute__((naked)) void PendSV_Handler(void) { " mrs r0, psp \n" " isb \n" " ldr r3, =pbl_cur \n" - " ldr r2, [r3] \n" - SAVE_FP - SAVE_REGS - " str r0, [r2] \n" /* pbl_cur->backend.sp */ + " ldr r2, [r3] \n" SAVE_FP SAVE_REGS + " str r0, [r2] \n" /* pbl_cur->backend.sp */ " stmdb sp!, {r3, r14} \n" " mov r0, %0 \n" " msr basepri, r0 \n" " dsb \n" " isb \n" - " bl sched_switch_in \n" /* returns the next thread */ + " bl sched_switch_in \n" /* returns the next thread */ " mov r4, r0 \n" " mov r0, #0 \n" " msr basepri, r0 \n" " ldmia sp!, {r3, r14} \n" - " ldr r0, [r4] \n" /* next->backend.sp */ - " add r1, r4, #4 \n" /* next->backend.arch.mpu */ - RESTORE_MPU - RESTORE_REGS - RESTORE_FP + " ldr r0, [r4] \n" /* next->backend.sp */ + " add r1, r4, #4 \n" /* next->backend.arch.mpu */ + RESTORE_MPU RESTORE_REGS RESTORE_FP " msr psp, r0 \n" " isb \n" " bx r14 \n" - " .ltorg \n" - ::"i"(PBL_IRQ_PRIO_MAX_SYSCALL)); + " .ltorg \n" ::"i"(PBL_IRQ_PRIO_MAX_SYSCALL)); } // Loads the first thread's context. MSP is reset to the top of the ISR stack. __attribute__((naked)) static void prv_restore_first_thread(void) { __asm volatile( - " ldr r0, =0xE000ED08 \n" /* VTOR: initial MSP is the first vector */ + " ldr r0, =0xE000ED08 \n" /* VTOR: initial MSP is the first vector */ " ldr r0, [r0] \n" " ldr r0, [r0] \n" " msr msp, r0 \n" " ldr r3, =pbl_cur \n" " ldr r4, [r3] \n" " ldr r0, [r4] \n" - " add r1, r4, #4 \n" - RESTORE_MPU - RESTORE_REGS + " add r1, r4, #4 \n" RESTORE_MPU RESTORE_REGS " msr psp, r0 \n" " mov r0, #0 \n" " msr basepri, r0 \n" @@ -367,7 +368,8 @@ __attribute__((naked)) void SVC_Handler(void) { // ---- start and tick --------------------------------------------------------- -void arch_init(void) {} +void arch_init(void) { +} void arch_start(void) { // PendSV and SysTick at the lowest priority; SVC follows once started. @@ -392,7 +394,9 @@ void arch_start(void) { } #ifndef CONFIG_SOC_SF32LB52 -void SysTick_Handler(void) { pbl_kernel_tick_isr(); } +void SysTick_Handler(void) { + pbl_kernel_tick_isr(); +} #endif void arch_idle(pbl_tick_t max_ticks) { @@ -408,8 +412,8 @@ void arch_thread_saved_regs(const struct pbl_thread *t, struct pbl_thread_saved_ if (t == pbl_cur && arch_in_isr()) { // The running thread's registers are live on its stack, not saved. const uint32_t *frame = (const uint32_t *)__get_PSP(); - *regs = (struct pbl_thread_saved_regs){ - .pc = frame[6], .lr = frame[5], .control = __get_CONTROL() }; + *regs = + (struct pbl_thread_saved_regs){.pc = frame[6], .lr = frame[5], .control = __get_CONTROL()}; return; } const struct saved_context *ctx = t->backend.sp; @@ -417,7 +421,7 @@ void arch_thread_saved_regs(const struct pbl_thread *t, struct pbl_thread_saved_ if (prv_fp_active(ctx->exc_return)) { hw += NUM_EXTRA_FP_REGS; } - *regs = (struct pbl_thread_saved_regs){ .pc = hw[6], .lr = hw[5], .control = ctx->control }; + *regs = (struct pbl_thread_saved_regs){.pc = hw[6], .lr = hw[5], .control = ctx->control}; } void arch_thread_info_regs(const struct pbl_thread *t, uint32_t regs[PBL_THREAD_REG_COUNT]) { diff --git a/kernel/arch/posix/arch.c b/kernel/arch/posix/arch.c index ee8fd6d07f..a1ff050a1e 100644 --- a/kernel/arch/posix/arch.c +++ b/kernel/arch/posix/arch.c @@ -53,7 +53,8 @@ static void *prv_thread_main(void *arg) { return NULL; } -void arch_init(void) {} +void arch_init(void) { +} void arch_thread_init(struct pbl_thread *t, void (*entry)(void *), void *arg) { pthread_cond_init(&t->backend.arch.wake, NULL); @@ -97,7 +98,9 @@ static void prv_switch(void) { } } -void arch_switch_request(void) { s_switch_pending = true; } +void arch_switch_request(void) { + s_switch_pending = true; +} void arch_thread_exit(void) { // pbl_thread_abort() already switched away and ended this pthread. @@ -111,9 +114,12 @@ void arch_thread_aborted(struct pbl_thread *t) { } } -bool arch_in_isr(void) { return s_in_isr; } +bool arch_in_isr(void) { + return s_in_isr; +} -void arch_irq_disable(void) {} +void arch_irq_disable(void) { +} void arch_irq_enable(void) { if (!s_in_isr && s_switch_pending && pbl_kernel_is_started()) { @@ -123,7 +129,7 @@ void arch_irq_enable(void) { void arch_thread_saved_regs(const struct pbl_thread *t, struct pbl_thread_saved_regs *regs) { (void)t; - *regs = (struct pbl_thread_saved_regs){ 0 }; + *regs = (struct pbl_thread_saved_regs){0}; } void arch_thread_info_regs(const struct pbl_thread *t, uint32_t regs[PBL_THREAD_REG_COUNT]) { @@ -207,7 +213,9 @@ void pbl_test_kernel_stop(void) { } } -void pbl_test_isr_enter(void) { s_in_isr = true; } +void pbl_test_isr_enter(void) { + s_in_isr = true; +} void pbl_test_isr_exit(void) { s_in_isr = false; diff --git a/kernel/debug.c b/kernel/debug.c index cbcd50e199..f4a6d68cfb 100644 --- a/kernel/debug.c +++ b/kernel/debug.c @@ -10,10 +10,10 @@ void pbl_thread_foreach(pbl_thread_info_fn fn, void *ctx) { for (struct pbl_thread *t = pbl_all_threads; t != NULL; t = t->backend.all_next) { struct pbl_thread_info info = { - .thread = t, - .name = t->name, - .id = (uintptr_t)t, - .current = (t == pbl_cur), + .thread = t, + .name = t->name, + .id = (uintptr_t)t, + .current = (t == pbl_cur), }; if (!info.current) { arch_thread_info_regs(t, info.regs); @@ -33,9 +33,9 @@ void pbl_thread_stack_info(const struct pbl_thread *t, struct pbl_thread_stack_i untouched++; } *info = (struct pbl_thread_stack_info){ - .start = (uintptr_t)t->stack, - .size = t->stack_size, - .high_water = untouched * sizeof(uint32_t), + .start = (uintptr_t)t->stack, + .size = t->stack_size, + .high_water = untouched * sizeof(uint32_t), }; } @@ -50,12 +50,12 @@ size_t pbl_thread_stats_snapshot(struct pbl_thread_stats *out, size_t max, struct pbl_thread_stack_info stack; pbl_thread_stack_info(t, &stack); out[n++] = (struct pbl_thread_stats){ - .thread = t, - .name = t->name, - .number = t->backend.number, - .run_time = t->backend.run_time, - .stack_high_water = stack.high_water, - .state = (enum pbl_thread_state)t->backend.state, + .thread = t, + .name = t->name, + .number = t->backend.number, + .run_time = t->backend.run_time, + .stack_high_water = stack.high_water, + .state = (enum pbl_thread_state)t->backend.state, }; } pbl_irq_unlock(); diff --git a/kernel/irq.c b/kernel/irq.c index 2d99ed4f31..336810525f 100644 --- a/kernel/irq.c +++ b/kernel/irq.c @@ -17,8 +17,14 @@ void pbl_irq_unlock(void) { } } -void irq_reset(void) { s_nesting = 0; } +void irq_reset(void) { + s_nesting = 0; +} -bool pbl_in_isr(void) { return arch_in_isr(); } +bool pbl_in_isr(void) { + return arch_in_isr(); +} -bool pbl_irq_is_locked(void) { return s_nesting > 0; } +bool pbl_irq_is_locked(void) { + return s_nesting > 0; +} diff --git a/kernel/msgq.c b/kernel/msgq.c index 3f019da979..3312ceccbc 100644 --- a/kernel/msgq.c +++ b/kernel/msgq.c @@ -13,7 +13,9 @@ void pbl_msgq_init(struct pbl_msgq *q, void *buf, size_t msg_size, uint32_t max_ *q = (struct pbl_msgq)PBL_MSGQ_INITIALIZER(buf, msg_size, max_msgs); } -void pbl_msgq_deinit(struct pbl_msgq *q) { KERNEL_ASSERT(q->group == NULL); } +void pbl_msgq_deinit(struct pbl_msgq *q) { + KERNEL_ASSERT(q->group == NULL); +} static uint8_t *prv_slot(struct pbl_msgq *q, uint32_t index) { return (uint8_t *)q->buf + index * q->msg_size; @@ -114,6 +116,10 @@ void pbl_msgq_purge(struct pbl_msgq *q) { pbl_irq_unlock(); } -uint32_t pbl_msgq_num_used(const struct pbl_msgq *q) { return q->backend.count; } +uint32_t pbl_msgq_num_used(const struct pbl_msgq *q) { + return q->backend.count; +} -uint32_t pbl_msgq_num_free(const struct pbl_msgq *q) { return q->max_msgs - q->backend.count; } +uint32_t pbl_msgq_num_free(const struct pbl_msgq *q) { + return q->max_msgs - q->backend.count; +} diff --git a/kernel/mutex.c b/kernel/mutex.c index 690afd35df..988528d02f 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c @@ -5,9 +5,13 @@ #include "kernel.h" -void pbl_mutex_init(struct pbl_mutex *m) { *m = (struct pbl_mutex)PBL_MUTEX_INITIALIZER; } +void pbl_mutex_init(struct pbl_mutex *m) { + *m = (struct pbl_mutex)PBL_MUTEX_INITIALIZER; +} -void pbl_mutex_deinit(struct pbl_mutex *m) { KERNEL_ASSERT(m->count == 0); } +void pbl_mutex_deinit(struct pbl_mutex *m) { + KERNEL_ASSERT(m->count == 0); +} int pbl_mutex_lock_lr(struct pbl_mutex *m, pbl_timeout_t timeout, uintptr_t lr) { KERNEL_ASSERT(!arch_in_isr()); diff --git a/kernel/poll.c b/kernel/poll.c index 3d837fc2f7..bd9bc50d57 100644 --- a/kernel/poll.c +++ b/kernel/poll.c @@ -27,7 +27,8 @@ void pbl_poll_group_add(struct pbl_poll_group *g, struct pbl_msgq *q) { // queue cannot starve the others. static struct pbl_msgq *prv_ready_member(struct pbl_poll_group *g) { struct pbl_msgq *cursor = g->backend.cursor; - for (struct pbl_msgq *m = cursor ? cursor->group_next : g->members; m != NULL; m = m->group_next) { + for (struct pbl_msgq *m = cursor ? cursor->group_next : g->members; m != NULL; + m = m->group_next) { if (m->backend.count > 0) { g->backend.cursor = m; return m; diff --git a/kernel/sched.c b/kernel/sched.c index af79925ac8..6365ee0f2c 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -25,7 +25,9 @@ static uint32_t s_next_number; static struct pbl_thread s_idle_thread; PBL_THREAD_STACK_DEFINE(s_idle_stack, CONFIG_KERNEL_IDLE_STACK_SIZE); -static inline bool prv_before(pbl_tick_t a, pbl_tick_t b) { return (int32_t)(a - b) < 0; } +static inline bool prv_before(pbl_tick_t a, pbl_tick_t b) { + return (int32_t)(a - b) < 0; +} // ---- ready lists ------------------------------------------------------------ @@ -344,7 +346,9 @@ void sched_idle_slept(pbl_tick_t elapsed) { sched_request_switch(); } -struct pbl_thread *sched_idle_thread(void) { return &s_idle_thread; } +struct pbl_thread *sched_idle_thread(void) { + return &s_idle_thread; +} static void prv_idle_entry(void *arg) { (void)arg; @@ -366,12 +370,12 @@ void sched_start_prepare(void) { arch_init(); struct pbl_thread_attr attr = { - .name = "IDLE", - .entry = prv_idle_entry, - .prio = PBL_PRIO_IDLE, - .privileged = true, - .stack = s_idle_stack, - .stack_size = sizeof(s_idle_stack), + .name = "IDLE", + .entry = prv_idle_entry, + .prio = PBL_PRIO_IDLE, + .privileged = true, + .stack = s_idle_stack, + .stack_size = sizeof(s_idle_stack), }; int rc = pbl_thread_create(&s_idle_thread, &attr); KERNEL_ASSERT(rc == 0); @@ -388,9 +392,13 @@ void pbl_kernel_start(void) { arch_start(); } -bool pbl_kernel_is_started(void) { return s_started; } +bool pbl_kernel_is_started(void) { + return s_started; +} -bool pbl_kernel_is_running(void) { return s_started && s_sched_lock == 0; } +bool pbl_kernel_is_running(void) { + return s_started && s_sched_lock == 0; +} void pbl_sched_lock(void) { pbl_irq_lock(); @@ -408,9 +416,13 @@ void pbl_sched_unlock(void) { pbl_irq_unlock(); } -bool pbl_sched_is_locked(void) { return s_sched_lock > 0; } +bool pbl_sched_is_locked(void) { + return s_sched_lock > 0; +} -pbl_tick_t pbl_uptime_ticks(void) { return s_ticks; } +pbl_tick_t pbl_uptime_ticks(void) { + return s_ticks; +} void pbl_thread_yield(void) { pbl_irq_lock(); @@ -430,7 +442,9 @@ void pbl_thread_sleep(pbl_timeout_t timeout) { // ---- idle interface --------------------------------------------------------- -bool pbl_idle_confirm(void) { return sched_idle_confirm(); } +bool pbl_idle_confirm(void) { + return sched_idle_confirm(); +} void pbl_idle_slept(pbl_tick_t elapsed) { pbl_irq_lock(); diff --git a/kernel/sem.c b/kernel/sem.c index e8d370fb0f..c7264f66d1 100644 --- a/kernel/sem.c +++ b/kernel/sem.c @@ -11,7 +11,9 @@ void pbl_sem_init(struct pbl_sem *s, uint32_t initial, uint32_t limit) { s->backend.count = initial; } -void pbl_sem_deinit(struct pbl_sem *s) { (void)s; } +void pbl_sem_deinit(struct pbl_sem *s) { + (void)s; +} int pbl_sem_take(struct pbl_sem *s, pbl_timeout_t timeout) { int rc = 0; @@ -45,4 +47,6 @@ void pbl_sem_reset(struct pbl_sem *s) { pbl_irq_unlock(); } -uint32_t pbl_sem_count(const struct pbl_sem *s) { return s->backend.count; } +uint32_t pbl_sem_count(const struct pbl_sem *s) { + return s->backend.count; +} diff --git a/kernel/thread.c b/kernel/thread.c index 62c0cb0bed..2d121f8840 100644 --- a/kernel/thread.c +++ b/kernel/thread.c @@ -64,9 +64,13 @@ void pbl_thread_resume(struct pbl_thread *t) { pbl_irq_unlock(); } -struct pbl_thread *pbl_thread_current(void) { return pbl_cur; } +struct pbl_thread *pbl_thread_current(void) { + return pbl_cur; +} -struct pbl_thread *pbl_thread_idle(void) { return sched_idle_thread(); } +struct pbl_thread *pbl_thread_idle(void) { + return sched_idle_thread(); +} void pbl_thread_prio_set(struct pbl_thread *t, pbl_prio_t prio) { KERNEL_ASSERT(prio <= PBL_PRIO_MAX); @@ -77,7 +81,9 @@ void pbl_thread_prio_set(struct pbl_thread *t, pbl_prio_t prio) { pbl_irq_unlock(); } -pbl_prio_t pbl_thread_prio_get(const struct pbl_thread *t) { return t->backend.base_prio; } +pbl_prio_t pbl_thread_prio_get(const struct pbl_thread *t) { + return t->backend.base_prio; +} enum pbl_thread_state pbl_thread_state(const struct pbl_thread *t) { return (enum pbl_thread_state)t->backend.state; diff --git a/kernel/tick.c b/kernel/tick.c index cfde1171d0..b6d686f9b7 100644 --- a/kernel/tick.c +++ b/kernel/tick.c @@ -6,6 +6,10 @@ _Static_assert(PBL_TICK_HZ == RTC_TICKS_HZ, "CONFIG_KERNEL_TICK_HZ must match the RTC tick rate"); -pbl_tick_t pbl_ms_to_ticks(uint32_t ms) { return ((uint64_t)ms * PBL_TICK_HZ) / 1000; } +pbl_tick_t pbl_ms_to_ticks(uint32_t ms) { + return ((uint64_t)ms * PBL_TICK_HZ) / 1000; +} -uint32_t pbl_ticks_to_ms(pbl_tick_t ticks) { return ((uint64_t)ticks * 1000) / PBL_TICK_HZ; } +uint32_t pbl_ticks_to_ms(pbl_tick_t ticks) { + return ((uint64_t)ticks * 1000) / PBL_TICK_HZ; +} diff --git a/lib/btutil/bt_device.c b/lib/btutil/bt_device.c index 3ef4e25988..785eb972f7 100644 --- a/lib/btutil/bt_device.c +++ b/lib/btutil/bt_device.c @@ -10,19 +10,18 @@ BTDevice bt_device_init_with_address(BTDeviceAddress address, bool is_random) { BTDeviceInternal device = { - .address = address, - .is_classic = false, - .is_random_address = is_random, + .address = address, + .is_classic = false, + .is_random_address = is_random, }; return device.opaque; } BTDeviceAddress bt_device_get_address(BTDevice device) { - return ((BTDeviceInternal *) &device)->address; + return ((BTDeviceInternal *)&device)->address; } -bool bt_device_address_equal(const BTDeviceAddress *addr1, - const BTDeviceAddress *addr2) { +bool bt_device_address_equal(const BTDeviceAddress *addr1, const BTDeviceAddress *addr2) { if (addr1 == NULL || addr2 == NULL) { return false; } @@ -48,8 +47,8 @@ bool bt_device_internal_equal(const BTDeviceInternal *device1_int, } bool bt_device_equal(const BTDevice *device1, const BTDevice *device2) { - const BTDeviceInternal *device1_int = (const BTDeviceInternal *) device1; - const BTDeviceInternal *device2_int = (const BTDeviceInternal *) device2; + const BTDeviceInternal *device1_int = (const BTDeviceInternal *)device1; + const BTDeviceInternal *device2_int = (const BTDeviceInternal *)device2; return bt_device_internal_equal(device1_int, device2_int); } diff --git a/lib/btutil/bt_uuid.c b/lib/btutil/bt_uuid.c index 9b180bb83e..cd50071f91 100644 --- a/lib/btutil/bt_uuid.c +++ b/lib/btutil/bt_uuid.c @@ -11,5 +11,5 @@ Uuid bt_uuid_expand_16bit(uint16_t uuid16) { } Uuid bt_uuid_expand_32bit(uint32_t uuid32) { - return (const Uuid) { BT_UUID_EXPAND(uuid32) }; + return (const Uuid){BT_UUID_EXPAND(uuid32)}; } diff --git a/lib/btutil/sm_util.c b/lib/btutil/sm_util.c index bc5a7e5692..5a1595720d 100644 --- a/lib/btutil/sm_util.c +++ b/lib/btutil/sm_util.c @@ -13,8 +13,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Waddress-of-packed-member" bool sm_is_pairing_info_equal_identity(const SMPairingInfo *a, const SMPairingInfo *b) { - return (a->is_remote_identity_info_valid && - b->is_remote_identity_info_valid && + return (a->is_remote_identity_info_valid && b->is_remote_identity_info_valid && bt_device_equal(&a->identity.opaque, &b->identity.opaque) && memcmp(&a->irk, &b->irk, sizeof(SMIdentityResolvingKey)) == 0); } @@ -22,10 +21,8 @@ bool sm_is_pairing_info_equal_identity(const SMPairingInfo *a, const SMPairingIn // ------------------------------------------------------------------------------------------------- bool sm_is_pairing_info_empty(const SMPairingInfo *p) { - return (!p->is_local_encryption_info_valid && - !p->is_remote_encryption_info_valid && - !p->is_remote_identity_info_valid && - !p->is_remote_signing_info_valid); + return (!p->is_local_encryption_info_valid && !p->is_remote_encryption_info_valid && + !p->is_remote_identity_info_valid && !p->is_remote_signing_info_valid); } bool sm_is_pairing_info_irk_not_used(const SMIdentityResolvingKey *irk_key) { @@ -33,6 +30,6 @@ bool sm_is_pairing_info_irk_not_used(const SMIdentityResolvingKey *irk_key) { // // "The local or peer’s IRK shall be an all-zero key, if not applicable for the particular // device identity." - const SMIdentityResolvingKey empty_key = { }; + const SMIdentityResolvingKey empty_key = {}; return (memcmp(irk_key, &empty_key, sizeof(empty_key)) == 0); } diff --git a/lib/c/newlib/vsnprintf.c b/lib/c/newlib/vsnprintf.c index a867f7b375..075078be3e 100644 --- a/lib/c/newlib/vsnprintf.c +++ b/lib/c/newlib/vsnprintf.c @@ -121,12 +121,11 @@ #include #include - // Not using 64-bit division for Dialog Bluetooth. This saves *gobs* of memory. #ifdef ARCH_NO_NATIVE_LONG_DIVIDE - #define CONVERT_VALUE_TYPE uint32_t +#define CONVERT_VALUE_TYPE uint32_t #else - #define CONVERT_VALUE_TYPE UINTMAX_T +#define CONVERT_VALUE_TYPE UINTMAX_T #endif #define VA_START(ap, last) va_start(ap, last) @@ -152,55 +151,56 @@ #ifdef MAX_CONVERT_LENGTH #undef MAX_CONVERT_LENGTH #endif -#define MAX_CONVERT_LENGTH 22 +#define MAX_CONVERT_LENGTH 22 /* Format read states. */ -#define PRINT_S_DEFAULT 0 -#define PRINT_S_FLAGS 1 -#define PRINT_S_WIDTH 2 -#define PRINT_S_DOT 3 -#define PRINT_S_PRECISION 4 -#define PRINT_S_MOD 5 -#define PRINT_S_CONV 6 +#define PRINT_S_DEFAULT 0 +#define PRINT_S_FLAGS 1 +#define PRINT_S_WIDTH 2 +#define PRINT_S_DOT 3 +#define PRINT_S_PRECISION 4 +#define PRINT_S_MOD 5 +#define PRINT_S_CONV 6 /* Format flags. */ -#define PRINT_F_MINUS (1 << 0) -#define PRINT_F_PLUS (1 << 1) -#define PRINT_F_SPACE (1 << 2) -#define PRINT_F_NUM (1 << 3) -#define PRINT_F_ZERO (1 << 4) -#define PRINT_F_UP (1 << 6) -#define PRINT_F_UNSIGNED (1 << 7) -#define PRINT_F_TYPE_G (1 << 8) -#define PRINT_F_TYPE_E (1 << 9) +#define PRINT_F_MINUS (1 << 0) +#define PRINT_F_PLUS (1 << 1) +#define PRINT_F_SPACE (1 << 2) +#define PRINT_F_NUM (1 << 3) +#define PRINT_F_ZERO (1 << 4) +#define PRINT_F_UP (1 << 6) +#define PRINT_F_UNSIGNED (1 << 7) +#define PRINT_F_TYPE_G (1 << 8) +#define PRINT_F_TYPE_E (1 << 9) /* Conversion flags. */ -#define PRINT_C_CHAR 1 -#define PRINT_C_SHORT 2 -#define PRINT_C_LONG 3 -#define PRINT_C_LLONG 4 -#define PRINT_C_SIZE 6 -#define PRINT_C_PTRDIFF 7 -#define PRINT_C_INTMAX 8 +#define PRINT_C_CHAR 1 +#define PRINT_C_SHORT 2 +#define PRINT_C_LONG 3 +#define PRINT_C_LLONG 4 +#define PRINT_C_SIZE 6 +#define PRINT_C_PTRDIFF 7 +#define PRINT_C_INTMAX 8 #ifndef MAX -# define MAX(x, y) ((x >= y) ? x : y) +#define MAX(x, y) ((x >= y) ? x : y) #endif #ifndef CHARTOINT -# define CHARTOINT(ch) (ch - '0') +#define CHARTOINT(ch) (ch - '0') #endif #ifndef ISDIGIT -# define ISDIGIT(ch) isdigit(ch) +#define ISDIGIT(ch) isdigit(ch) #endif -#define OUTCHAR(str, len, size, ch) do { \ - if ((len) + 1 < size) { \ - str[len] = ch; \ - } \ - (len)++; \ -} while (0) +#define OUTCHAR(str, len, size, ch) \ + do { \ + if ((len) + 1 < size) { \ + str[len] = ch; \ + } \ + (len)++; \ + } while (0) static int prv_convert(CONVERT_VALUE_TYPE value, char *buf, size_t size, int base, int caps) { const char *digits = caps ? "0123456789ABCDEF" : "0123456789abcdef"; @@ -217,7 +217,7 @@ static int prv_convert(CONVERT_VALUE_TYPE value, char *buf, size_t size, int bas static void fmtstr(char *str, size_t *len, size_t size, const char *value, int width, int precision, int flags) { - int padlen, strln; /* Amount to pad. */ + int padlen, strln; /* Amount to pad. */ int noprecision = (precision == -1); if (value == NULL) { /* We're forgiving. */ @@ -236,7 +236,7 @@ static void fmtstr(char *str, size_t *len, size_t size, const char *value, int w padlen = -padlen; } - while (padlen > 0) { /* Leading spaces. */ + while (padlen > 0) { /* Leading spaces. */ OUTCHAR(str, *len, size, ' '); padlen--; } @@ -244,7 +244,7 @@ static void fmtstr(char *str, size_t *len, size_t size, const char *value, int w OUTCHAR(str, *len, size, *value); value++; } - while (padlen < 0) { /* Trailing spaces. */ + while (padlen < 0) { /* Trailing spaces. */ OUTCHAR(str, *len, size, ' '); padlen++; } @@ -257,8 +257,8 @@ static void fmtint(char *str, size_t *len, size_t size, INTMAX_T value, int base char iconvert[MAX_CONVERT_LENGTH]; char sign = '\0'; char hexprefix = '\0'; - int spadlen = 0; /* Amount to space pad. */ - int zpadlen = 0; /* Amount to zero pad. */ + int spadlen = 0; /* Amount to space pad. */ + int zpadlen = 0; /* Amount to zero pad. */ int pos; bool noprecision = (precision == -1); @@ -309,9 +309,9 @@ static void fmtint(char *str, size_t *len, size_t size, INTMAX_T value, int base } spadlen = width /* Minimum field width. */ - - MAX(precision, pos) /* Number of integer digits. */ - - ((sign != 0) ? 1 : 0) /* Will we print a sign? */ - - ((hexprefix != 0) ? 2 : 0); /* Will we print a prefix? */ + - MAX(precision, pos) /* Number of integer digits. */ + - ((sign != 0) ? 1 : 0) /* Will we print a sign? */ + - ((hexprefix != 0) ? 2 : 0); /* Will we print a prefix? */ if (spadlen < 0) { spadlen = 0; } @@ -475,18 +475,19 @@ int vsnprintf(char *str, size_t size, const char *format, va_list args) { * (7.19.6.1, 5) */ if ((precision = va_arg(args, int)) < 0) { - precision = 0; // amarshall: It actually means as if you did '%.d', not '%d' + precision = 0; // amarshall: It actually means as if you did '%.d', not '%d' } ch = *format++; state = PRINT_S_MOD; - } else if (ch == '-') { // amarshall: added support for negative immediates in precision + } else if (ch == '-') { // amarshall: added support for negative immediates in precision /* * C99 says: "A negative precision argument is * taken as if the precision were omitted." * (7.19.6.1, 5) */ precision = 0; - while (isdigit(ch = *format++)) {} + while (isdigit(ch = *format++)) { + } state = PRINT_S_MOD; } else { state = PRINT_S_MOD; @@ -496,7 +497,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list args) { switch (ch) { case 'h': ch = *format++; - if (ch == 'h') { // hh + if (ch == 'h') { // hh ch = *format++; cflags = PRINT_C_CHAR; } else { @@ -505,7 +506,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list args) { break; case 'l': ch = *format++; - if (ch == 'l') { // ll + if (ch == 'l') { // ll ch = *format++; cflags = PRINT_C_LLONG; } else { @@ -561,8 +562,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list args) { value = (int32_t)va_arg(args, int); break; } - fmtint(str, &len, size, value, 10, width, - precision, flags); + fmtint(str, &len, size, value, 10, width, precision, flags); break; case 'X': flags |= PRINT_F_UP; @@ -607,11 +607,10 @@ int vsnprintf(char *str, size_t size, const char *format, va_list args) { value = (uint32_t)va_arg(args, unsigned int); break; } - fmtint(str, &len, size, value, base, width, - precision, flags); + fmtint(str, &len, size, value, base, width, precision, flags); break; case 'c': - while (width > 1) { // Leading spaces + while (width > 1) { // Leading spaces OUTCHAR(str, len, size, ' '); width--; } @@ -620,8 +619,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list args) { break; case 's': strvalue = va_arg(args, char *); - fmtstr(str, &len, size, strvalue, width, - precision, flags); + fmtstr(str, &len, size, strvalue, width, precision, flags); break; case 'p': /* @@ -634,9 +632,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list args) { // amarshall: Changed this to act like newlib (where it's basically %#x) flags |= PRINT_F_NUM; flags |= PRINT_F_UNSIGNED; - fmtint(str, &len, size, - (UINTPTR_T)strvalue, 16, width, - precision, flags); + fmtint(str, &len, size, (UINTPTR_T)strvalue, 16, width, precision, flags); break; case 'n': /* amarshall: Changed to machine-independent types @@ -645,16 +641,16 @@ int vsnprintf(char *str, size_t size, const char *format, va_list args) { // amarshall: Removed pointer variables to try to improve stack footprint switch (cflags) { case PRINT_C_CHAR: - *(int8_t*)va_arg(args, int8_t*) = len; + *(int8_t *)va_arg(args, int8_t *) = len; break; case PRINT_C_SHORT: - *(int16_t*)va_arg(args, int16_t*) = len; + *(int16_t *)va_arg(args, int16_t *) = len; break; case PRINT_C_LONG: - *(int32_t*)va_arg(args, int32_t*) = len; + *(int32_t *)va_arg(args, int32_t *) = len; break; case PRINT_C_LLONG: - *(LLONG*)va_arg(args, LLONG*) = len; + *(LLONG *)va_arg(args, LLONG *) = len; break; case PRINT_C_SIZE: /* @@ -664,21 +660,21 @@ int vsnprintf(char *str, size_t size, const char *format, va_list args) { * signed integer type corresponding to * size_t argument." (7.19.6.1, 7) */ - *(SSIZE_T*)va_arg(args, SSIZE_T*) = len; + *(SSIZE_T *)va_arg(args, SSIZE_T *) = len; break; case PRINT_C_INTMAX: - *(INTMAX_T*)va_arg(args, INTMAX_T*) = len; + *(INTMAX_T *)va_arg(args, INTMAX_T *) = len; break; case PRINT_C_PTRDIFF: - *(PTRDIFF_T*)va_arg(args, PTRDIFF_T*) = len; + *(PTRDIFF_T *)va_arg(args, PTRDIFF_T *) = len; break; default: - *(int32_t*)va_arg(args, int32_t*) = len; + *(int32_t *)va_arg(args, int32_t *) = len; break; } break; - case '%': // Print a "%" character verbatim. - default: // amarshall: newlib's behavior is to just print the character. + case '%': // Print a "%" character verbatim. + default: // amarshall: newlib's behavior is to just print the character. OUTCHAR(str, len, size, ch); break; } diff --git a/lib/os/mcu/cache_arm.c b/lib/os/mcu/cache_arm.c index c479879553..bdcbd8ecd2 100644 --- a/lib/os/mcu/cache_arm.c +++ b/lib/os/mcu/cache_arm.c @@ -8,17 +8,17 @@ // I-Cache definition doesn't always exist #ifndef __ICACHE_PRESENT -# define __ICACHE_PRESENT 0U +#define __ICACHE_PRESENT 0U #endif // D-Cache definition doesn't always exist #ifndef __DCACHE_PRESENT -# define __DCACHE_PRESENT 0U +#define __DCACHE_PRESENT 0U #endif // Most of these implementations are derived from CMSIS #define CCSIDR_LINESIZE(x) (((x) & SCB_CCSIDR_LINESIZE_Msk) >> SCB_CCSIDR_LINESIZE_Pos) -#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos) +#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos) #define CSSELR_L1_DCACHE 0 #define CSSELR_L1_ICACHE 1 @@ -89,7 +89,7 @@ MOCKABLE void icache_enable(void) { __DSB(); __ISB(); - SCB->CCR |= SCB_CCR_IC_Msk; // enable I-Cache + SCB->CCR |= SCB_CCR_IC_Msk; // enable I-Cache __DSB(); __ISB(); #endif @@ -99,7 +99,7 @@ MOCKABLE void icache_disable(void) { #if __ICACHE_PRESENT __DSB(); __ISB(); - SCB->CCR &= ~SCB_CCR_IC_Msk; // disable I-Cache + SCB->CCR &= ~SCB_CCR_IC_Msk; // disable I-Cache __DSB(); __ISB(); @@ -121,7 +121,6 @@ MOCKABLE uint32_t icache_line_size(void) { return 1; } - MOCKABLE void dcache_enable(void) { #if __DCACHE_PRESENT SCB->CSSELR = CSSELR_L1_DCACHE; @@ -130,7 +129,7 @@ MOCKABLE void dcache_enable(void) { dcache_invalidate_all(); __DSB(); - SCB->CCR |= SCB_CCR_DC_Msk; // enable D-Cache + SCB->CCR |= SCB_CCR_DC_Msk; // enable D-Cache __DSB(); __ISB(); #endif @@ -140,7 +139,7 @@ MOCKABLE void dcache_disable(void) { #if __DCACHE_PRESENT dcache_flush_invalidate_all(); __DSB(); - SCB->CCR &= ~SCB_CCR_DC_Msk; // disable D-Cache + SCB->CCR &= ~SCB_CCR_DC_Msk; // disable D-Cache __DSB(); __ISB(); #endif diff --git a/lib/util/build_id.c b/lib/util/build_id.c index 42e3323971..6ba6ac50a3 100644 --- a/lib/util/build_id.c +++ b/lib/util/build_id.c @@ -11,8 +11,7 @@ bool build_id_contains_gnu_build_id(const ElfExternalNote *note) { const uint32_t NT_GNU_BUILD_ID = 3; const char *expected_name = "GNU"; const uint32_t expected_name_length = strlen(expected_name) + 1; - return note->type == NT_GNU_BUILD_ID && - note->name_length == expected_name_length && + return note->type == NT_GNU_BUILD_ID && note->name_length == expected_name_length && note->data_length == BUILD_ID_EXPECTED_LEN && - (strncmp((const char *) note->data, expected_name, expected_name_length) == 0); + (strncmp((const char *)note->data, expected_name, expected_name_length) == 0); } diff --git a/lib/util/circular_buffer.c b/lib/util/circular_buffer.c index 407be20e77..8026b22216 100644 --- a/lib/util/circular_buffer.c +++ b/lib/util/circular_buffer.c @@ -8,15 +8,15 @@ #include -static uint16_t get_write_length_available(CircularBuffer* buffer) { +static uint16_t get_write_length_available(CircularBuffer *buffer) { return buffer->buffer_size - buffer->data_length; } -static uint16_t get_write_index(CircularBuffer* buffer) { +static uint16_t get_write_index(CircularBuffer *buffer) { return (buffer->read_index + buffer->data_length) % buffer->buffer_size; } -void circular_buffer_init(CircularBuffer* buffer, uint8_t* storage, uint16_t storage_size) { +void circular_buffer_init(CircularBuffer *buffer, uint8_t *storage, uint16_t storage_size) { buffer->buffer = storage; buffer->buffer_size = storage_size; buffer->read_index = 0; @@ -25,13 +25,13 @@ void circular_buffer_init(CircularBuffer* buffer, uint8_t* storage, uint16_t sto buffer->auto_reset = true; } -void circular_buffer_init_ex(CircularBuffer* buffer, uint8_t* storage, uint16_t storage_size, +void circular_buffer_init_ex(CircularBuffer *buffer, uint8_t *storage, uint16_t storage_size, bool auto_reset) { circular_buffer_init(buffer, storage, storage_size); buffer->auto_reset = auto_reset; } -bool circular_buffer_write(CircularBuffer* buffer, const void* data, uint16_t length) { +bool circular_buffer_write(CircularBuffer *buffer, const void *data, uint16_t length) { if (get_write_length_available(buffer) < length) { return false; } @@ -49,7 +49,7 @@ bool circular_buffer_write(CircularBuffer* buffer, const void* data, uint16_t le memcpy(&buffer->buffer[write_index], data, remaining_length); write_index = 0; - data = ((uint8_t*) data) + remaining_length; + data = ((uint8_t *)data) + remaining_length; length -= remaining_length; } @@ -79,7 +79,8 @@ void circular_buffer_write_finish(CircularBuffer *buffer, uint16_t written_lengt buffer->write_in_progress = false; } -bool circular_buffer_read(const CircularBuffer* buffer, uint16_t length, const uint8_t** data_out, uint16_t* length_out) { +bool circular_buffer_read(const CircularBuffer *buffer, uint16_t length, const uint8_t **data_out, + uint16_t *length_out) { if (buffer->data_length < length) { return false; } @@ -92,13 +93,12 @@ bool circular_buffer_read(const CircularBuffer* buffer, uint16_t length, const u return true; } -uint16_t circular_buffer_copy(const CircularBuffer* buffer, - void *data_out, - uint16_t length_to_copy) { +uint16_t circular_buffer_copy(const CircularBuffer *buffer, void *data_out, + uint16_t length_to_copy) { return circular_buffer_copy_offset(buffer, 0, data_out, length_to_copy); } -uint16_t circular_buffer_copy_offset(const CircularBuffer* buffer, uint16_t start_offset, +uint16_t circular_buffer_copy_offset(const CircularBuffer *buffer, uint16_t start_offset, uint8_t *data_out, uint16_t length_to_copy) { if (buffer->data_length <= start_offset) { return 0; @@ -124,7 +124,7 @@ uint16_t circular_buffer_copy_offset(const CircularBuffer* buffer, uint16_t star return length_to_copy; } -bool circular_buffer_read_or_copy(const CircularBuffer* buffer, uint8_t **data_out, size_t length, +bool circular_buffer_read_or_copy(const CircularBuffer *buffer, uint8_t **data_out, size_t length, void *(*malloc_imp)(size_t), bool *caller_should_free) { UTIL_ASSERT(buffer && malloc_imp && data_out && caller_should_free); if (buffer->data_length < length) { @@ -134,7 +134,7 @@ bool circular_buffer_read_or_copy(const CircularBuffer* buffer, uint8_t **data_o const bool should_malloc_and_copy = (length > contiguous_length); *caller_should_free = should_malloc_and_copy; if (should_malloc_and_copy) { - *data_out = (uint8_t *) malloc_imp(length); + *data_out = (uint8_t *)malloc_imp(length); if (*data_out) { circular_buffer_copy(buffer, *data_out, length); } else { @@ -148,7 +148,7 @@ bool circular_buffer_read_or_copy(const CircularBuffer* buffer, uint8_t **data_o return true; } -bool circular_buffer_consume(CircularBuffer* buffer, uint16_t length) { +bool circular_buffer_consume(CircularBuffer *buffer, uint16_t length) { if (buffer->data_length < length) { return false; } @@ -164,10 +164,10 @@ bool circular_buffer_consume(CircularBuffer* buffer, uint16_t length) { return true; } -uint16_t circular_buffer_get_write_space_remaining(const CircularBuffer* buffer) { +uint16_t circular_buffer_get_write_space_remaining(const CircularBuffer *buffer) { return buffer->buffer_size - buffer->data_length; } -uint16_t circular_buffer_get_read_space_remaining(const CircularBuffer* buffer) { +uint16_t circular_buffer_get_read_space_remaining(const CircularBuffer *buffer) { return buffer->data_length; } diff --git a/lib/util/circular_cache.c b/lib/util/circular_cache.c index c5dcd2894c..78cbee45e1 100644 --- a/lib/util/circular_cache.c +++ b/lib/util/circular_cache.c @@ -7,19 +7,19 @@ #include -void circular_cache_init(CircularCache* c, uint8_t* buffer, size_t item_size, - int total_items, Comparator compare_cb) { +void circular_cache_init(CircularCache *c, uint8_t *buffer, size_t item_size, int total_items, + Comparator compare_cb) { UTIL_ASSERT(c); UTIL_ASSERT(buffer); UTIL_ASSERT(item_size); UTIL_ASSERT(compare_cb); - *c = (CircularCache) { - .cache = buffer, - .next_erased_item_idx = 0, - .item_size = item_size, - .total_items = total_items, - .compare_cb = compare_cb + *c = (CircularCache){ + .cache = buffer, + .next_erased_item_idx = 0, + .item_size = item_size, + .total_items = total_items, + .compare_cb = compare_cb }; } @@ -27,17 +27,17 @@ void circular_cache_set_item_destructor(CircularCache *c, CircularCacheItemDestr c->item_destructor = destructor; } -static uint8_t* prv_get_item_at_index(CircularCache* c, int index) { +static uint8_t *prv_get_item_at_index(CircularCache *c, int index) { return c->cache + index * c->item_size; } -bool circular_cache_contains(CircularCache* c, void* theirs) { +bool circular_cache_contains(CircularCache *c, void *theirs) { return (circular_cache_get(c, theirs) != NULL); } -void *circular_cache_get(CircularCache* c, void* theirs) { +void *circular_cache_get(CircularCache *c, void *theirs) { for (int i = 0; i < c->total_items; ++i) { - uint8_t* ours = prv_get_item_at_index(c, i); + uint8_t *ours = prv_get_item_at_index(c, i); if (c->compare_cb(ours, theirs) == 0) { return ours; } @@ -45,8 +45,8 @@ void *circular_cache_get(CircularCache* c, void* theirs) { return NULL; } -void circular_cache_push(CircularCache* c, void* new_item) { - uint8_t* old_item = prv_get_item_at_index(c, c->next_erased_item_idx); +void circular_cache_push(CircularCache *c, void *new_item) { + uint8_t *old_item = prv_get_item_at_index(c, c->next_erased_item_idx); if (c->item_destructor) { c->item_destructor(old_item); } @@ -70,7 +70,7 @@ void circular_cache_flush(CircularCache *c) { // This assumes that the user of this library can differentiate empty entries in the cache from // valid ones. for (int i = 0; i < c->total_items; i++) { - uint8_t* item = prv_get_item_at_index(c, i); + uint8_t *item = prv_get_item_at_index(c, i); if (c->item_destructor) { c->item_destructor(item); } diff --git a/lib/util/crc32.c b/lib/util/crc32.c index 4d83122bae..1b83427747 100644 --- a/lib/util/crc32.c +++ b/lib/util/crc32.c @@ -14,17 +14,15 @@ // The lookup table is generated by the crc32_lut.py static const uint32_t s_lookup_table[] = { - 0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac, - 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c, - 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, - 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c, + 0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c, + 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c, }; -uint32_t crc32(uint32_t crc, const void * restrict data, size_t length) { +uint32_t crc32(uint32_t crc, const void *restrict data, size_t length) { if (data == 0) { return 0; } - const uint8_t * restrict bytes = data; + const uint8_t *restrict bytes = data; crc ^= 0xffffffff; while (length--) { diff --git a/lib/util/heap.c b/lib/util/heap.c index bfecdc3767..d76a3e8194 100644 --- a/lib/util/heap.c +++ b/lib/util/heap.c @@ -17,13 +17,12 @@ typedef unsigned long Alignment_t; /* The following defines the byte boundary size that has been */ /* specified size if the alignment data. */ -#define ALIGNMENT_SIZE sizeof(Alignment_t) +#define ALIGNMENT_SIZE sizeof(Alignment_t) /* The following structure is used to align data fragments on a */ /* specified memory boundary. */ -typedef union _tagAlignmentStruct_t -{ - Alignment_t AlignmentValue; +typedef union _tagAlignmentStruct_t { + Alignment_t AlignmentValue; unsigned char ByteValue; } AlignmentStruct_t; @@ -31,10 +30,10 @@ typedef union _tagAlignmentStruct_t /* considered a large value. Allocations that are equal to and */ /* larger than this value will be allocated from the end of the */ /* buffer. */ -#define LARGE_SIZE (256/ALIGNMENT_SIZE) +#define LARGE_SIZE (256 / ALIGNMENT_SIZE) //! The maximum size of the heap as a number of ALIGNMENT_SIZE -#define SEGMENT_SIZE_MAX (0x7FFF) +#define SEGMENT_SIZE_MAX (0x7FFF) /* The following defines the minimum size (in alignment units) of a */ /* fragment that is considered useful. The value is used when trying*/ @@ -42,23 +41,24 @@ typedef union _tagAlignmentStruct_t /* can be broken into 2 fragments leaving a fragment that is of the */ /* requested size and one that is at least as larger as the */ /* MINIMUM_MEMORY_SIZE. */ -#define MINIMUM_MEMORY_SIZE 1 +#define MINIMUM_MEMORY_SIZE 1 /* The following defines the structure that describes a memory */ /* fragment. */ -typedef struct _tagHeapInfo_t -{ - //! Size of the preceding segment, measured in units of ALIGNMENT_SIZE, including the size of this beginner +typedef struct _tagHeapInfo_t { + //! Size of the preceding segment, measured in units of ALIGNMENT_SIZE, including the size of this + //! beginner uint16_t PrevSize; //! Whether or not this block is currently allocated (vs being free). - bool is_allocated:1; + bool is_allocated : 1; - //! Size of this segment, measured in units of ALIGNMENT_SIZE, including this size of this beginner - uint16_t Size:15; + //! Size of this segment, measured in units of ALIGNMENT_SIZE, including this size of this + //! beginner + uint16_t Size : 15; #ifdef CONFIG_MALLOC_INSTRUMENTATION - uintptr_t pc; //lock_impl.lock_function) { heap->lock_impl.lock_function(heap->lock_impl.lock_context); } } //! Unlock the heap, using whatever behaviour the heap has configured using heap_set_lock_impl -static void heap_unlock(Heap* heap) { +static void heap_unlock(Heap *heap) { if (heap->lock_impl.unlock_function) { heap->lock_impl.unlock_function(heap->lock_impl.lock_context); } @@ -99,45 +101,47 @@ static void heap_unlock(Heap* heap) { } } -static void prv_handle_corruption(Heap * const heap, void *ptr) { +static void prv_handle_corruption(Heap *const heap, void *ptr) { if (heap->corruption_handler) { heap->corrupt_block = ptr; return; } - UTIL_ASSERT(0); // Error: Heap corrupt around + UTIL_ASSERT(0); // Error: Heap corrupt around } -static HeapInfo_t *find_segment(Heap* const heap, unsigned long n_units); -static HeapInfo_t *allocate_block(Heap* const heap, unsigned long n_units, HeapInfo_t* heap_info_ptr); +static HeapInfo_t *find_segment(Heap *const heap, unsigned long n_units); +static HeapInfo_t *allocate_block(Heap *const heap, unsigned long n_units, + HeapInfo_t *heap_info_ptr); //! Advance the block pointer to the next block. -static HeapInfo_t* get_next_block(Heap * const heap, HeapInfo_t* block) { +static HeapInfo_t *get_next_block(Heap *const heap, HeapInfo_t *block) { HEAP_ASSERT_SANE(heap, block->Size != 0, block); return (HeapInfo_t *)(((Alignment_t *)block) + block->Size); } //! Move the block pointer back to the previous block. -static HeapInfo_t* get_previous_block(Heap * const heap, HeapInfo_t* block) { +static HeapInfo_t *get_previous_block(Heap *const heap, HeapInfo_t *block) { HEAP_ASSERT_SANE(heap, block->PrevSize != 0, block); return (HeapInfo_t *)(((Alignment_t *)block) - block->PrevSize); } -static void prv_calc_totals(Heap* const heap, unsigned int *used, unsigned int *free, unsigned int *max_free) { - HeapInfo_t *heap_info_ptr; - uint16_t free_segments; - uint16_t alloc_segments; +static void prv_calc_totals(Heap *const heap, unsigned int *used, unsigned int *free, + unsigned int *max_free) { + HeapInfo_t *heap_info_ptr; + uint16_t free_segments; + uint16_t alloc_segments; /* Initialize the return values. */ - *used = 0; - *free = 0; - *max_free = 0; - free_segments = 0; + *used = 0; + *free = 0; + *max_free = 0; + free_segments = 0; alloc_segments = 0; - heap_info_ptr = heap->begin; + heap_info_ptr = heap->begin; do { /* Check to see if the current fragment is marked as free. */ - if(heap_info_ptr->is_allocated) { + if (heap_info_ptr->is_allocated) { alloc_segments++; *used += heap_info_ptr->Size * ALIGNMENT_SIZE; @@ -149,7 +153,7 @@ static void prv_calc_totals(Heap* const heap, unsigned int *used, unsigned int * /* Check to see if the current fragment is larger that any */ /* we have seen and update the Max Value if it is larger. */ - if(heap_info_ptr->Size > *max_free) { + if (heap_info_ptr->Size > *max_free) { *max_free = heap_info_ptr->Size * ALIGNMENT_SIZE; } } @@ -167,44 +171,37 @@ static void prv_calc_totals(Heap* const heap, unsigned int *used, unsigned int * util_dbgserial_str(format_str); } -void heap_calc_totals(Heap* const heap, unsigned int *used, unsigned int *free, unsigned int *max_free) { +void heap_calc_totals(Heap *const heap, unsigned int *used, unsigned int *free, + unsigned int *max_free) { UTIL_ASSERT(heap); /* Verify that the parameters that were passed in appear valid. */ - if((used) && (free) && (max_free) && (heap->begin)) { + if ((used) && (free) && (max_free) && (heap->begin)) { heap_lock(heap); prv_calc_totals(heap, used, free, max_free); heap_unlock(heap); } } -void heap_init(Heap* const heap, void* start, void* end, bool fuzz_on_free) { +void heap_init(Heap *const heap, void *start, void *end, bool fuzz_on_free) { UTIL_ASSERT(start && end); // Align the pointer by advancing it to the next boundary. - start = (void*)((((uintptr_t) start) + (sizeof(Alignment_t) - 1)) & ~(sizeof(Alignment_t) - 1)); - end = (void*) (((uintptr_t) end) & ~(sizeof(Alignment_t) - 1)); + start = (void *)((((uintptr_t)start) + (sizeof(Alignment_t) - 1)) & ~(sizeof(Alignment_t) - 1)); + end = (void *)(((uintptr_t)end) & ~(sizeof(Alignment_t) - 1)); // Calculate the size of the heap in alignment units. uint32_t heap_size = ((uintptr_t)end - (uintptr_t)start) / ALIGNMENT_SIZE; // If we have more space than we can use, just limit it to the usable space. This limit is caused // by the width of .Size and .PrevSize in HeapInfo_t heap_size = MIN(SEGMENT_SIZE_MAX, heap_size); - end = ((char*) start) + (heap_size * ALIGNMENT_SIZE); + end = ((char *)start) + (heap_size * ALIGNMENT_SIZE); memset(start, 0, heap_size * ALIGNMENT_SIZE); - *heap = (Heap) { - .begin = start, - .end = end, - .fuzz_on_free = fuzz_on_free - }; - - *(heap->begin) = (HeapInfo_t) { - .PrevSize = heap_size, - .is_allocated = false, - .Size = heap_size - }; + *heap = (Heap){.begin = start, .end = end, .fuzz_on_free = fuzz_on_free}; + + *(heap->begin) = (HeapInfo_t){.PrevSize = heap_size, .is_allocated = false, .Size = heap_size}; } void heap_set_lock_impl(Heap *heap, HeapLockImpl lock_impl) { @@ -219,7 +216,7 @@ void heap_set_corruption_handler(Heap *heap, CorruptionHandler corruption_handle heap->corruption_handler = corruption_handler; } -void *heap_malloc(Heap* const heap, unsigned long nbytes, uintptr_t client_pc) { +void *heap_malloc(Heap *const heap, unsigned long nbytes, uintptr_t client_pc) { // Check to make sure the heap we have is initialized. UTIL_ASSERT(heap->begin); @@ -235,11 +232,11 @@ void *heap_malloc(Heap* const heap, unsigned long nbytes, uintptr_t client_pc) { return NULL; } - HeapInfo_t* allocated_block; + HeapInfo_t *allocated_block; heap_lock(heap); { - HeapInfo_t* free_block = find_segment(heap, allocation_size); + HeapInfo_t *free_block = find_segment(heap, allocation_size); allocated_block = allocate_block(heap, allocation_size, free_block); if (allocated_block != NULL) { @@ -263,7 +260,7 @@ void *heap_malloc(Heap* const heap, unsigned long nbytes, uintptr_t client_pc) { return NULL; } -void heap_free(Heap* const heap, void *ptr, uintptr_t client_pc) { +void heap_free(Heap *const heap, void *ptr, uintptr_t client_pc) { UTIL_ASSERT(heap->begin); if (!ptr) { @@ -271,7 +268,7 @@ void heap_free(Heap* const heap, void *ptr, uintptr_t client_pc) { return; } - UTIL_ASSERT(heap_contains_address(heap, ptr)); // not in range (heap->begin, heap->end) + UTIL_ASSERT(heap_contains_address(heap, ptr)); // not in range (heap->begin, heap->end) heap_lock(heap); { @@ -290,7 +287,7 @@ void heap_free(Heap* const heap, void *ptr, uintptr_t client_pc) { return; } - UTIL_ASSERT(0); // heap_free on invalid pointer + UTIL_ASSERT(0); // heap_free on invalid pointer } /* Mask out the allocation bit of the segment to be freed. */ @@ -299,8 +296,7 @@ void heap_free(Heap* const heap, void *ptr, uintptr_t client_pc) { #ifndef CONFIG_RELEASE if (heap->fuzz_on_free) { - memset(ptr, 0xBD, - (heap_info_ptr->Size - HEAP_INFO_BLOCK_SIZE(0)) * ALIGNMENT_SIZE); + memset(ptr, 0xBD, (heap_info_ptr->Size - HEAP_INFO_BLOCK_SIZE(0)) * ALIGNMENT_SIZE); } #endif @@ -314,14 +310,14 @@ void heap_free(Heap* const heap, void *ptr, uintptr_t client_pc) { /* then we do not have to merge or update any sizes of the */ /* previous segment. This will also handle the case where */ /* the entire heap has been allocated to one segment. */ - if(heap_info_ptr != heap->begin) { + if (heap_info_ptr != heap->begin) { /* Calculate the pointer to the previous segment. */ HeapInfo_t *previous_block = get_previous_block(heap, heap_info_ptr); HEAP_ASSERT_SANE(heap, previous_block->Size == heap_info_ptr->PrevSize, heap_info_ptr); /* Check to see if the previous segment can be combined. */ - if(!previous_block->is_allocated) { + if (!previous_block->is_allocated) { /* Add the segment to be freed to the new beginner. */ previous_block->Size += heap_info_ptr->Size; @@ -336,12 +332,11 @@ void heap_free(Heap* const heap, void *ptr, uintptr_t client_pc) { /* If we are pointing at the end of the heap, then use the */ /* begin as the next segment. */ - if(next_block == heap->end) { + if (next_block == heap->end) { /* We can't combine the begin with the end, so just */ /* update the PrevSize field. */ heap->begin->PrevSize = heap_info_ptr->Size; - } - else { + } else { HEAP_ASSERT_SANE(heap, next_block->PrevSize == (HEAP_INFO_FOR_PTR(ptr))->Size, next_block); /* We are not pointing to the end of the heap, so if the */ @@ -360,10 +355,9 @@ void heap_free(Heap* const heap, void *ptr, uintptr_t client_pc) { /* If we are pointing at the end of the heap, then use*/ /* the begin as the next next segment. */ - if(next_next_block == heap->end) { + if (next_next_block == heap->end) { heap->begin->PrevSize = heap_info_ptr->Size; - } - else { + } else { next_next_block->PrevSize = heap_info_ptr->Size; } } @@ -372,7 +366,7 @@ void heap_free(Heap* const heap, void *ptr, uintptr_t client_pc) { heap_unlock(heap); } -bool heap_is_allocated(Heap* const heap, void* ptr) { +bool heap_is_allocated(Heap *const heap, void *ptr) { bool rc = false; if (!heap_contains_address(heap, ptr)) { return rc; @@ -394,26 +388,25 @@ bool heap_is_allocated(Heap* const heap, void* ptr) { return rc; } -bool heap_contains_address(Heap* const heap, void* ptr) { - return (ptr >= (void*) heap->begin && ptr < (void*) heap->end); +bool heap_contains_address(Heap *const heap, void *ptr) { + return (ptr >= (void *)heap->begin && ptr < (void *)heap->end); } size_t heap_size(const Heap *heap) { - return ((char*) heap->end) - ((char*) heap->begin); + return ((char *)heap->end) - ((char *)heap->begin); } -static void prv_sanity_check_block(Heap * const heap, HeapInfo_t *block) { - HeapInfo_t* prev_block = get_previous_block(heap, block); - HEAP_ASSERT_SANE(heap, - prev_block <= heap->begin || prev_block->Size == block->PrevSize, block); - HeapInfo_t* next_block = get_next_block(heap, block); +static void prv_sanity_check_block(Heap *const heap, HeapInfo_t *block) { + HeapInfo_t *prev_block = get_previous_block(heap, block); + HEAP_ASSERT_SANE(heap, prev_block <= heap->begin || prev_block->Size == block->PrevSize, block); + HeapInfo_t *next_block = get_next_block(heap, block); HEAP_ASSERT_SANE(heap, next_block >= heap->end || next_block->PrevSize == block->Size, block); } //! Finds a segment where data of the size n_units will fit. //! @param heap the heap to search. //! @param n_units number of ALIGNMENT_SIZE units this segment requires. -static HeapInfo_t *find_segment(Heap* const heap, unsigned long n_units) { +static HeapInfo_t *find_segment(Heap *const heap, unsigned long n_units) { HeapInfo_t *heap_info_ptr = NULL; /* If we are allocating a large segment, then start at the */ /* end of the heap. Otherwise, start at the beginning of */ @@ -427,7 +420,6 @@ static HeapInfo_t *find_segment(Heap* const heap, unsigned long n_units) { /* Loop until we have walked the entire list. */ while (((n_units < LARGE_SIZE) || (heap_info_ptr > heap->begin)) && (heap_info_ptr < heap->end)) { - prv_sanity_check_block(heap, heap_info_ptr); /* Check to see if the current entry is free and is large*/ @@ -448,8 +440,7 @@ static HeapInfo_t *find_segment(Heap* const heap, unsigned long n_units) { } // make sure the space we found is within the bounds of the heap - UTIL_ASSERT((heap_info_ptr >= heap->begin) && - (heap_info_ptr <= heap->end)); + UTIL_ASSERT((heap_info_ptr >= heap->begin) && (heap_info_ptr <= heap->end)); return heap_info_ptr; } @@ -459,9 +450,10 @@ static HeapInfo_t *find_segment(Heap* const heap, unsigned long n_units) { //! Assumes the block is big enough to be split and is unallocated. //! @param heap the heap the block belongs to. //! @param block the block to split. -//! @param first_part_size the size of the new block, in ALIGNMENT_SIZE units, including the beginner -static HeapInfo_t* split_block(Heap *heap, HeapInfo_t* block, size_t first_part_size) { - HeapInfo_t* second_block = (HeapInfo_t*) (((Alignment_t*) block) + first_part_size); +//! @param first_part_size the size of the new block, in ALIGNMENT_SIZE units, including the +//! beginner +static HeapInfo_t *split_block(Heap *heap, HeapInfo_t *block, size_t first_part_size) { + HeapInfo_t *second_block = (HeapInfo_t *)(((Alignment_t *)block) + first_part_size); second_block->PrevSize = first_part_size; second_block->is_allocated = false; @@ -470,7 +462,7 @@ static HeapInfo_t* split_block(Heap *heap, HeapInfo_t* block, size_t first_part_ block->Size = first_part_size; /* Calculate the pointer to the next segment. */ - HeapInfo_t* next_next_block = get_next_block(heap, second_block); + HeapInfo_t *next_next_block = get_next_block(heap, second_block); /* Check for a wrap condition and update the next */ /* segment's PrevSize field. */ @@ -485,9 +477,11 @@ static HeapInfo_t* split_block(Heap *heap, HeapInfo_t* block, size_t first_part_ //! Allocated the block in the given HeapInfo_t segment. //! @param heap the heap to allocate from. -//! @param n_units number of ALIGNMENT_SIZE units this segment requires (including space for the beginner). +//! @param n_units number of ALIGNMENT_SIZE units this segment requires (including space for the +//! beginner). //! @param heap_info_ptr the segment where the block should be allocated. -static HeapInfo_t *allocate_block(Heap* const heap, unsigned long n_units, HeapInfo_t* heap_info_ptr) { +static HeapInfo_t *allocate_block(Heap *const heap, unsigned long n_units, + HeapInfo_t *heap_info_ptr) { // Make sure we can use all or part of this block for this allocation. if (heap_info_ptr == heap->end || heap_info_ptr->is_allocated || heap_info_ptr->Size < n_units) { return NULL; @@ -519,7 +513,7 @@ static HeapInfo_t *allocate_block(Heap* const heap, unsigned long n_units, HeapI } // A very naive realloc implementation -void* heap_realloc(Heap* const heap, void *ptr, unsigned long nbytes, uintptr_t client_pc) { +void *heap_realloc(Heap *const heap, void *ptr, unsigned long nbytes, uintptr_t client_pc) { #if !defined(CONFIG_MALLOC_INSTRUMENTATION) client_pc = 0; #endif @@ -535,7 +529,7 @@ void* heap_realloc(Heap* const heap, void *ptr, unsigned long nbytes, uintptr_t return new_ptr; } -void* heap_zalloc(Heap* const heap, size_t size, uintptr_t client_pc) { +void *heap_zalloc(Heap *const heap, size_t size, uintptr_t client_pc) { void *ptr = heap_malloc(heap, size, client_pc); if (ptr) { memset(ptr, 0, size); @@ -543,7 +537,7 @@ void* heap_zalloc(Heap* const heap, size_t size, uintptr_t client_pc) { return ptr; } -void* heap_calloc(Heap* const heap, size_t count, size_t size, uintptr_t client_pc) { +void *heap_calloc(Heap *const heap, size_t count, size_t size, uintptr_t client_pc) { return heap_zalloc(heap, count * size, client_pc); } @@ -565,11 +559,11 @@ void heap_dump_malloc_instrumentation_to_dbgserial(Heap *heap) { // The output in this function is parsed by tools/parse_dump_malloc.py, so don't change it // without updating that file as well. - HeapInfo_t* heap_iter = heap->begin; + HeapInfo_t *heap_iter = heap->begin; heap_lock(heap); - void* pc; - char* type; + void *pc; + char *type; while (heap_iter < heap->end) { unsigned long block_size = (long)(heap_iter->Size) * ALIGNMENT_SIZE; @@ -586,8 +580,8 @@ void heap_dump_malloc_instrumentation_to_dbgserial(Heap *heap) { largest_free = MAX(largest_free, block_size); } - snprintf(buffer, sizeof(buffer), "PC:0x%08lX Addr:0x%08lX Bytes:%-8lu %s", - (long)pc, (long)&heap_iter->Data, block_size, type); + snprintf(buffer, sizeof(buffer), "PC:0x%08lX Addr:0x%08lX Bytes:%-8lu %s", (long)pc, + (long)&heap_iter->Data, block_size, type); util_dbgserial_str(buffer); heap_iter = get_next_block(heap, heap_iter); } @@ -619,6 +613,5 @@ void heap_dump_malloc_instrumentation_to_dbgserial(Heap *heap) { util_dbgserial_str(buffer); heap_unlock(heap); - } #endif diff --git a/lib/util/hexdump.c b/lib/util/hexdump.c index f577b08507..a99ab216ff 100644 --- a/lib/util/hexdump.c +++ b/lib/util/hexdump.c @@ -10,8 +10,8 @@ // + mini gap + 8 ascii bytes + null: #define LINE_BUFFER_LENGTH (4 + 2 + (3 * 8) + 2 + (3 * 8) + 2 + 8 + 1 + 8 + 1) -void hexdump(const char *src_filename, int src_line_number, int level, - const uint8_t *data, size_t length, HexdumpLineCallback write_line_cb) { +void hexdump(const char *src_filename, int src_line_number, int level, const uint8_t *data, + size_t length, HexdumpLineCallback write_line_cb) { char line_buffer[LINE_BUFFER_LENGTH]; unsigned int offset = 0; @@ -40,8 +40,7 @@ void hexdump(const char *src_filename, int src_line_number, int level, // If we're printing a partial line, pad out the rest so the // ascii lines up. required_padding += (16 - num_line_bytes) * 3; - if (num_line_bytes <= 8) - { + if (num_line_bytes <= 8) { // Account for the gap between the 8 byte hex blocks. required_padding += 1; } @@ -52,13 +51,12 @@ void hexdump(const char *src_filename, int src_line_number, int level, // Print the ASCII bytes for (unsigned int i = 0; i < num_line_bytes; ++i) { - if (i == 8) - { + if (i == 8) { line_buffer[buffer_offset++] = ' '; } char c = data[offset + i]; - if (c < 32 || c > 126 || c == '`') // ` is used for log hash string delimiting + if (c < 32 || c > 126 || c == '`') // ` is used for log hash string delimiting { c = '.'; } diff --git a/lib/util/iterator.c b/lib/util/iterator.c index 3aca50f615..c414aad181 100644 --- a/lib/util/iterator.c +++ b/lib/util/iterator.c @@ -7,21 +7,16 @@ #include -void iter_init(Iterator* iter, IteratorCallback next, IteratorCallback prev, IteratorState state) { - *iter = (Iterator) { - .next = next, - .prev = prev, - .state = state - }; +void iter_init(Iterator *iter, IteratorCallback next, IteratorCallback prev, IteratorState state) { + *iter = (Iterator){.next = next, .prev = prev, .state = state}; } -bool iter_next(Iterator* iter) { +bool iter_next(Iterator *iter) { UTIL_ASSERT(iter->next); return iter->next(iter->state); } -bool iter_prev(Iterator* iter) { +bool iter_prev(Iterator *iter) { UTIL_ASSERT(iter->prev); return iter->prev(iter->state); } - diff --git a/lib/util/keyed_circular_cache.c b/lib/util/keyed_circular_cache.c index 7b4175d406..08d9220915 100644 --- a/lib/util/keyed_circular_cache.c +++ b/lib/util/keyed_circular_cache.c @@ -14,11 +14,11 @@ void keyed_circular_cache_init(KeyedCircularCache *c, KeyedCircularCacheKey *key UTIL_ASSERT(data_buffer); UTIL_ASSERT(item_size); - *c = (KeyedCircularCache) { - .cache_keys = key_buffer, - .cache_data = (uint8_t *)data_buffer, - .item_size = item_size, - .total_items = total_items, + *c = (KeyedCircularCache){ + .cache_keys = key_buffer, + .cache_data = (uint8_t *)data_buffer, + .item_size = item_size, + .total_items = total_items, }; } diff --git a/lib/util/list.c b/lib/util/list.c index ae8a1bfd74..3bac54878b 100644 --- a/lib/util/list.c +++ b/lib/util/list.c @@ -8,12 +8,12 @@ #include #include -void list_init(ListNode* node) { +void list_init(ListNode *node) { node->next = NULL; node->prev = NULL; } -ListNode* list_insert_after(ListNode* node, ListNode* new_node) { +ListNode *list_insert_after(ListNode *node, ListNode *new_node) { if (node == NULL) { return new_node; } @@ -28,7 +28,7 @@ ListNode* list_insert_after(ListNode* node, ListNode* new_node) { return new_node; } -ListNode* list_insert_before(ListNode* node, ListNode* new_node) { +ListNode *list_insert_before(ListNode *node, ListNode *new_node) { if (node == NULL) { return new_node; } @@ -43,7 +43,7 @@ ListNode* list_insert_before(ListNode* node, ListNode* new_node) { return new_node; } -ListNode* list_pop_head(ListNode *node) { +ListNode *list_pop_head(ListNode *node) { if (node == NULL) { return NULL; } @@ -53,17 +53,17 @@ ListNode* list_pop_head(ListNode *node) { return new_head; } -ListNode* list_pop_tail(ListNode *node) { +ListNode *list_pop_tail(ListNode *node) { if (node == NULL) { return NULL; } - ListNode* tail = list_get_tail(node); - ListNode* new_tail = tail->prev; + ListNode *tail = list_get_tail(node); + ListNode *new_tail = tail->prev; list_remove(tail, NULL, NULL); return new_tail; } -void list_remove(ListNode* node, ListNode **head, ListNode **tail) { +void list_remove(ListNode *node, ListNode **head, ListNode **tail) { if (node == NULL) { return; } @@ -83,29 +83,29 @@ void list_remove(ListNode* node, ListNode **head, ListNode **tail) { node->next = NULL; } -ListNode* list_append(ListNode* node, ListNode* new_node) { +ListNode *list_append(ListNode *node, ListNode *new_node) { return list_insert_after(list_get_tail(node), new_node); } -ListNode* list_prepend(ListNode* node, ListNode* new_node) { +ListNode *list_prepend(ListNode *node, ListNode *new_node) { return list_insert_before(list_get_head(node), new_node); } -ListNode* list_get_next(ListNode* node) { +ListNode *list_get_next(ListNode *node) { if (node == NULL) { return NULL; } return node->next; } -ListNode* list_get_prev(ListNode* node) { +ListNode *list_get_prev(ListNode *node) { if (node == NULL) { return NULL; } return node->prev; } -ListNode* list_get_tail(ListNode* node) { +ListNode *list_get_tail(ListNode *node) { if (node == NULL) { return NULL; } @@ -115,7 +115,7 @@ ListNode* list_get_tail(ListNode* node) { return node; } -ListNode* list_get_head(ListNode* node) { +ListNode *list_get_head(ListNode *node) { if (node == NULL) { return NULL; } @@ -139,7 +139,7 @@ bool list_is_tail(const ListNode *node) { return !node->next; } -uint32_t list_count_to_tail_from(ListNode* node) { +uint32_t list_count_to_tail_from(ListNode *node) { if (node == NULL) { return 0; } @@ -161,11 +161,11 @@ uint32_t list_count_to_head_from(ListNode *node) { return count; } -uint32_t list_count(ListNode* node) { +uint32_t list_count(ListNode *node) { return list_count_to_tail_from(list_get_head(node)); } -ListNode* list_get_at(ListNode *node, int32_t index) { +ListNode *list_get_at(ListNode *node, int32_t index) { while (node != NULL && index != 0) { if (index > 0) { node = node->next; @@ -178,15 +178,16 @@ ListNode* list_get_at(ListNode *node, int32_t index) { return node; } -ListNode* list_sorted_add(ListNode *node, ListNode *new_node, Comparator comparator, bool ascending) { +ListNode *list_sorted_add(ListNode *node, ListNode *new_node, Comparator comparator, + bool ascending) { if (node == NULL) { return new_node; } if (new_node == NULL) { return node; } - ListNode * const head = node; - for(;;) { + ListNode *const head = node; + for (;;) { int order = comparator(node, new_node); if (!ascending) { order = -order; @@ -222,7 +223,7 @@ bool list_contains(const ListNode *node, const ListNode *node_to_search) { return false; } -ListNode* list_find(ListNode *node, ListFilterCallback filter_callback, void *data) { +ListNode *list_find(ListNode *node, ListFilterCallback filter_callback, void *data) { if (node == NULL) { return NULL; } @@ -235,7 +236,8 @@ ListNode* list_find(ListNode *node, ListFilterCallback filter_callback, void *da return NULL; } -ListNode* list_find_next(ListNode *node, ListFilterCallback filter_callback, bool wrap_around, void *data) { +ListNode *list_find_next(ListNode *node, ListFilterCallback filter_callback, bool wrap_around, + void *data) { if (node == NULL) { return NULL; } @@ -263,7 +265,8 @@ ListNode* list_find_next(ListNode *node, ListFilterCallback filter_callback, boo return NULL; } -ListNode* list_find_prev(ListNode *node, ListFilterCallback filter_callback, bool wrap_around, void *data) { +ListNode *list_find_prev(ListNode *node, ListFilterCallback filter_callback, bool wrap_around, + void *data) { if (node == NULL) { return NULL; } @@ -340,4 +343,3 @@ void list_debug_dump(ListNode *head) { iter = iter->next; } } - diff --git a/lib/util/math.c b/lib/util/math.c index 0e294ff574..b6aaf80c14 100644 --- a/lib/util/math.c +++ b/lib/util/math.c @@ -12,7 +12,7 @@ int32_t sign_extend(uint32_t a, int bits) { } // http://graphics.stanford.edu/~seander/bithacks.html#VariableSignExtend - int const m = 1U << (bits - 1); // mask can be pre-computed if b is fixed + int const m = 1U << (bits - 1); // mask can be pre-computed if b is fixed a = a & ((1U << bits) - 1); // (Skip this if bits in x above position b are already zero.) return (a ^ m) - m; @@ -26,19 +26,20 @@ int32_t serial_distance(uint32_t a, uint32_t b, int bits) { // See https://en.wikipedia.org/wiki/Serial_Number_Arithmetic const int64_t a_minus_b = a - b; const int64_t b_minus_a = b - a; - const bool a_is_earlier_than_b = (a < b && b_minus_a < (1 << (bits - 1))) || (a > b && a_minus_b > (1 << (bits - 1))); + const bool a_is_earlier_than_b = + (a < b && b_minus_a < (1 << (bits - 1))) || (a > b && a_minus_b > (1 << (bits - 1))); return sign_extend(a_is_earlier_than_b ? -a_minus_b : b_minus_a, bits); } int ceil_log_two(uint32_t n) { - // clz stands for Count Leading Zeroes. We use it to find the MSB - int msb = 31 - __builtin_clz(n); - // popcount counts the number of set bits in a word (1's) - bool power_of_two = __builtin_popcount(n) == 1; - // if not exact power of two, use the next power of two - // we want to err on the side of caution and want to - // always round up - return ((power_of_two) ? msb : (msb + 1)); + // clz stands for Count Leading Zeroes. We use it to find the MSB + int msb = 31 - __builtin_clz(n); + // popcount counts the number of set bits in a word (1's) + bool power_of_two = __builtin_popcount(n) == 1; + // if not exact power of two, use the next power of two + // we want to err on the side of caution and want to + // always round up + return ((power_of_two) ? msb : (msb + 1)); } //! newton's method for floor(sqrt(x)) -> should always converge @@ -49,7 +50,7 @@ int32_t integer_sqrt(int64_t x) { int64_t last_res = 0x3fff; uint16_t iterations = 0; while ((last_res > 0) && (iterations < 15)) { - last_res = ((x / last_res) + last_res)/2; + last_res = ((x / last_res) + last_res) / 2; iterations++; } return (last_res); diff --git a/lib/util/math_fixed.c b/lib/util/math_fixed.c index ebae08682e..d00c12fb6e 100644 --- a/lib/util/math_fixed.c +++ b/lib/util/math_fixed.c @@ -4,10 +4,10 @@ #include "pbl/util/assert.h" #include "pbl/util/math_fixed.h" -Fixed_S64_32 math_fixed_recursive_filter(Fixed_S64_32 x, - int num_input_coefficients, int num_output_coefficients, - const Fixed_S64_32 *cb, const Fixed_S64_32 *ca, - Fixed_S64_32 *state_x, Fixed_S64_32 *state_y) { +Fixed_S64_32 math_fixed_recursive_filter(Fixed_S64_32 x, int num_input_coefficients, + int num_output_coefficients, const Fixed_S64_32 *cb, + const Fixed_S64_32 *ca, Fixed_S64_32 *state_x, + Fixed_S64_32 *state_y) { UTIL_ASSERT(num_input_coefficients >= 1); // shift the input over by one @@ -29,7 +29,7 @@ Fixed_S64_32 math_fixed_recursive_filter(Fixed_S64_32 x, // shift the y output elements for (int k = num_output_coefficients - 1; k > 0; k--) { - state_y[k] = state_y[k-1]; + state_y[k] = state_y[k - 1]; } state_y[0] = ytmp; diff --git a/lib/util/slist.c b/lib/util/slist.c index fb74faf2f4..a65f0ff9ad 100644 --- a/lib/util/slist.c +++ b/lib/util/slist.c @@ -11,7 +11,7 @@ void slist_init(SingleListNode *node) { node->next = NULL; } -SingleListNode* slist_insert_after(SingleListNode *node, SingleListNode *new_node) { +SingleListNode *slist_insert_after(SingleListNode *node, SingleListNode *new_node) { if (node == NULL) { return new_node; } @@ -21,7 +21,7 @@ SingleListNode* slist_insert_after(SingleListNode *node, SingleListNode *new_nod return new_node; } -SingleListNode* slist_prepend(SingleListNode *head, SingleListNode *new_node) { +SingleListNode *slist_prepend(SingleListNode *head, SingleListNode *new_node) { if (new_node == NULL) { return head; } @@ -29,11 +29,11 @@ SingleListNode* slist_prepend(SingleListNode *head, SingleListNode *new_node) { return new_node; } -SingleListNode* slist_append(SingleListNode *head, SingleListNode *new_node) { +SingleListNode *slist_append(SingleListNode *head, SingleListNode *new_node) { return slist_insert_after(slist_get_tail(head), new_node); } -SingleListNode* slist_pop_head(SingleListNode *head) { +SingleListNode *slist_pop_head(SingleListNode *head) { if (head == NULL) { return NULL; } @@ -64,14 +64,14 @@ void slist_remove(SingleListNode *node, SingleListNode **head) { } } -SingleListNode* slist_get_next(SingleListNode *node) { +SingleListNode *slist_get_next(SingleListNode *node) { if (node == NULL) { return NULL; } return node->next; } -SingleListNode* slist_get_tail(SingleListNode *node) { +SingleListNode *slist_get_tail(SingleListNode *node) { if (node == NULL) { return NULL; } @@ -112,7 +112,7 @@ bool slist_contains(const SingleListNode *head, const SingleListNode *node) { return false; } -SingleListNode* slist_find(SingleListNode *head, SingleListFilterCallback filter_callback, +SingleListNode *slist_find(SingleListNode *head, SingleListFilterCallback filter_callback, void *data) { if (head == NULL) { return NULL; @@ -126,7 +126,7 @@ SingleListNode* slist_find(SingleListNode *head, SingleListFilterCallback filter return NULL; } -SingleListNode* slist_sorted_add(SingleListNode *head, SingleListNode *new_node, +SingleListNode *slist_sorted_add(SingleListNode *head, SingleListNode *new_node, Comparator comparator, bool ascending) { if (head == NULL) { return new_node; @@ -164,7 +164,7 @@ SingleListNode* slist_sorted_add(SingleListNode *head, SingleListNode *new_node, } } -SingleListNode* slist_concatenate(SingleListNode *restrict list_a, +SingleListNode *slist_concatenate(SingleListNode *restrict list_a, SingleListNode *restrict list_b) { if (list_a == NULL) { return list_b; diff --git a/lib/util/string.c b/lib/util/string.c index 70fa024c12..487be43131 100644 --- a/lib/util/string.c +++ b/lib/util/string.c @@ -10,8 +10,7 @@ const char *string_strip_leading_whitespace(const char *string) { const char *result_string = string; while (*result_string != '\0') { - if (*result_string != ' ' && - *result_string != '\n') { + if (*result_string != ' ' && *result_string != '\n') { break; } result_string++; @@ -24,8 +23,7 @@ void string_strip_trailing_whitespace(const char *string, char *string_out) { int string_len = strlen(string); bool trim = true; for (int i = string_len; i >= 0; i--) { - if (trim && - (string[i] == ' ' || string[i] == '\n' || string[i] == '\0')) { + if (trim && (string[i] == ' ' || string[i] == '\n' || string[i] == '\0')) { string_out[i] = '\0'; } else { trim = false; @@ -79,17 +77,17 @@ void string_reverse(char *str) { /* itoa: convert n to characters in s */ void itoa_int(int n, char *str, int base) { bool neg; - if ((neg = (n < 0))) { /* record sign */ - n = -n; /* make n positive */ + if ((neg = (n < 0))) { /* record sign */ + n = -n; /* make n positive */ } int i = 0; - do { /* generate digits in reverse order */ - str[i++] = (n % base) + '0'; /* get next digit */ - } while ((n /= base) > 0); /* delete it */ + do { /* generate digits in reverse order */ + str[i++] = (n % base) + '0'; /* get next digit */ + } while ((n /= base) > 0); /* delete it */ if (neg) { - str[i++] = '-'; /* append sign */ + str[i++] = '-'; /* append sign */ } str[i] = '\0'; @@ -97,9 +95,12 @@ void itoa_int(int n, char *str, int base) { } static int8_t ascii_hex_to_int(const uint8_t c) { - if (isdigit(c)) return c - '0'; - if (isupper(c)) return (c - 'A') + 10; - if (islower(c)) return (c - 'a') + 10; + if (isdigit(c)) + return c - '0'; + if (isupper(c)) + return (c - 'A') + 10; + if (islower(c)) + return (c - 'a') + 10; return -1; } @@ -111,20 +112,21 @@ static uint8_t ascii_hex_to_uint(const uint8_t msb, const uint8_t lsb) { uintptr_t str_to_address(const char *address_str) { char *endptr; uintptr_t address = strtoul(address_str, &endptr, 0); - if (*endptr != '\0') { // A non-address character encountered + if (*endptr != '\0') { // A non-address character encountered return -1; } return address; } -bool convert_bt_addr_hex_str_to_bd_addr(const char *hex_str, uint8_t *bd_addr, const unsigned int bd_addr_size) { +bool convert_bt_addr_hex_str_to_bd_addr(const char *hex_str, uint8_t *bd_addr, + const unsigned int bd_addr_size) { const int len = strlen(hex_str); if (len != 12) { return false; } - uint8_t* src = (uint8_t*) hex_str; - uint8_t* dest = bd_addr + bd_addr_size - 1; + uint8_t *src = (uint8_t *)hex_str; + uint8_t *dest = bd_addr + bd_addr_size - 1; for (unsigned int i = 0; i < bd_addr_size; ++i, src += 2, --dest) { *dest = ascii_hex_to_uint(src[0], src[1]); @@ -146,11 +148,11 @@ void toupper_str(char *str) { } } -void byte_stream_to_hex_string(char *out_buf, size_t out_buf_len, - const uint8_t *byte_stream, size_t byte_stream_len, bool print_backward) { +void byte_stream_to_hex_string(char *out_buf, size_t out_buf_len, const uint8_t *byte_stream, + size_t byte_stream_len, bool print_backward) { size_t bytes_left = byte_stream_len; if (print_backward) { - byte_stream += (byte_stream_len - 1); // addr of the last element + byte_stream += (byte_stream_len - 1); // addr of the last element } while (out_buf_len >= 3 /* 2 hex digits, plus '\0' */ @@ -166,10 +168,10 @@ void byte_stream_to_hex_string(char *out_buf, size_t out_buf_len, } // ------------------------------------------------------------------------------- -void safe_strcat(char* dst, const char* src, int dst_space) { +void safe_strcat(char *dst, const char *src, int dst_space) { int remaining = dst_space - strlen(dst); if (dst_space > 0) { strncat(dst, src, remaining); } - dst[dst_space-1] = 0; + dst[dst_space - 1] = 0; } diff --git a/lib/util/trig.c b/lib/util/trig.c index 419b02953c..11360d7f1f 100644 --- a/lib/util/trig.c +++ b/lib/util/trig.c @@ -5,531 +5,54 @@ #include "pbl/util/math.h" - // lookup points on the first quarter sin wave // generated by tintin/tools/trigTable.py static const uint16_t SIN_LOOKUP[] = { -0, -401, -801, -1202, -1602, -2002, -2403, -2803, -3203, -3603, -4003, -4403, -4802, -5202, -5601, -6000, -6399, -6797, -7195, -7593, -7991, -8389, -8786, -9182, -9579, -9975, -10371, -10766, -11161, -11555, -11949, -12343, -12736, -13129, -13521, -13913, -14304, -14694, -15085, -15474, -15863, -16251, -16639, -17026, -17413, -17798, -18184, -18568, -18952, -19335, -19717, -20099, -20480, -20860, -21239, -21618, -21996, -22372, -22749, -23124, -23498, -23872, -24244, -24616, -24987, -25356, -25725, -26093, -26460, -26826, -27191, -27555, -27918, -28280, -28641, -29000, -29359, -29717, -30073, -30428, -30783, -31136, -31487, -31838, -32188, -32536, -32883, -33229, -33574, -33917, -34259, -34600, -34939, -35278, -35614, -35950, -36284, -36617, -36949, -37279, -37608, -37935, -38261, -38585, -38908, -39230, -39550, -39869, -40186, -40502, -40816, -41128, -41439, -41749, -42057, -42363, -42668, -42971, -43273, -43573, -43871, -44168, -44463, -44757, -45048, -45338, -45627, -45913, -46198, -46482, -46763, -47043, -47321, -47597, -47872, -48144, -48415, -48684, -48951, -49217, -49480, -49742, -50002, -50260, -50516, -50770, -51023, -51273, -51521, -51768, -52013, -52255, -52496, -52735, -52972, -53207, -53440, -53670, -53899, -54126, -54351, -54574, -54794, -55013, -55230, -55444, -55657, -55867, -56076, -56282, -56486, -56688, -56888, -57086, -57281, -57475, -57666, -57856, -58043, -58228, -58410, -58591, -58769, -58945, -59119, -59291, -59461, -59628, -59793, -59956, -60116, -60275, -60431, -60585, -60736, -60886, -61033, -61177, -61320, -61460, -61598, -61734, -61867, -61998, -62126, -62253, -62377, -62498, -62618, -62735, -62850, -62962, -63072, -63179, -63285, -63388, -63488, -63586, -63682, -63775, -63866, -63955, -64041, -64125, -64206, -64286, -64362, -64436, -64508, -64578, -64645, -64709, -64771, -64831, -64889, -64943, -64996, -65046, -65094, -65139, -65182, -65222, -65260, -65295, -65328, -65359, -65387, -65413, -65436, -65457, -65475, -65491, -65504, -65515, -65524, -65530, -65534, -65535 + 0, 401, 801, 1202, 1602, 2002, 2403, 2803, 3203, 3603, 4003, 4403, 4802, + 5202, 5601, 6000, 6399, 6797, 7195, 7593, 7991, 8389, 8786, 9182, 9579, 9975, + 10371, 10766, 11161, 11555, 11949, 12343, 12736, 13129, 13521, 13913, 14304, 14694, 15085, + 15474, 15863, 16251, 16639, 17026, 17413, 17798, 18184, 18568, 18952, 19335, 19717, 20099, + 20480, 20860, 21239, 21618, 21996, 22372, 22749, 23124, 23498, 23872, 24244, 24616, 24987, + 25356, 25725, 26093, 26460, 26826, 27191, 27555, 27918, 28280, 28641, 29000, 29359, 29717, + 30073, 30428, 30783, 31136, 31487, 31838, 32188, 32536, 32883, 33229, 33574, 33917, 34259, + 34600, 34939, 35278, 35614, 35950, 36284, 36617, 36949, 37279, 37608, 37935, 38261, 38585, + 38908, 39230, 39550, 39869, 40186, 40502, 40816, 41128, 41439, 41749, 42057, 42363, 42668, + 42971, 43273, 43573, 43871, 44168, 44463, 44757, 45048, 45338, 45627, 45913, 46198, 46482, + 46763, 47043, 47321, 47597, 47872, 48144, 48415, 48684, 48951, 49217, 49480, 49742, 50002, + 50260, 50516, 50770, 51023, 51273, 51521, 51768, 52013, 52255, 52496, 52735, 52972, 53207, + 53440, 53670, 53899, 54126, 54351, 54574, 54794, 55013, 55230, 55444, 55657, 55867, 56076, + 56282, 56486, 56688, 56888, 57086, 57281, 57475, 57666, 57856, 58043, 58228, 58410, 58591, + 58769, 58945, 59119, 59291, 59461, 59628, 59793, 59956, 60116, 60275, 60431, 60585, 60736, + 60886, 61033, 61177, 61320, 61460, 61598, 61734, 61867, 61998, 62126, 62253, 62377, 62498, + 62618, 62735, 62850, 62962, 63072, 63179, 63285, 63388, 63488, 63586, 63682, 63775, 63866, + 63955, 64041, 64125, 64206, 64286, 64362, 64436, 64508, 64578, 64645, 64709, 64771, 64831, + 64889, 64943, 64996, 65046, 65094, 65139, 65182, 65222, 65260, 65295, 65328, 65359, 65387, + 65413, 65436, 65457, 65475, 65491, 65504, 65515, 65524, 65530, 65534, 65535 }; // lookup points on the first quarter atan wave // generated by tintin/tools/trigTable.py static const uint16_t ATAN_LOOKUP[] = { -0, -328, -648, -976, -1296, -1624, -1944, -2272, -2600, -2920, -3248, -3568, -3896, -4216, -4544, -4864, -5192, -5512, -5832, -6160, -6480, -6800, -7128, -7448, -7768, -8088, -8416, -8736, -9056, -9376, -9696, -10016, -10336, -10656, -10976, -11296, -11616, -11928, -12248, -12568, -12880, -13200, -13520, -13832, -14152, -14464, -14776, -15096, -15408, -15720, -16032, -16344, -16656, -16968, -17280, -17592, -17904, -18216, -18520, -18832, -19136, -19448, -19752, -20056, -20368, -20672, -20976, -21280, -21584, -21888, -22192, -22488, -22792, -23096, -23392, -23696, -23992, -24288, -24584, -24888, -25184, -25480, -25768, -26064, -26360, -26656, -26944, -27240, -27528, -27816, -28104, -28400, -28688, -28976, -29256, -29544, -29832, -30112, -30400, -30680, -30960, -31248, -31528, -31808, -32088, -32368, -32640, -32920, -33192, -33472, -33744, -34024, -34296, -34568, -34840, -35112, -35376, -35648, -35920, -36184, -36448, -36720, -36984, -37248, -37512, -37776, -38040, -38296, -38560, -38816, -39080, -39336, -39592, -39848, -40104, -40360, -40616, -40864, -41120, -41368, -41624, -41872, -42120, -42368, -42616, -42864, -43112, -43352, -43600, -43840, -44088, -44328, -44568, -44808, -45048, -45288, -45520, -45760, -45992, -46232, -46464, -46696, -46928, -47160, -47392, -47624, -47856, -48080, -48312, -48536, -48768, -48992, -49216, -49440, -49664, -49880, -50104, -50328, -50544, -50768, -50984, -51200, -51416, -51632, -51848, -52064, -52272, -52488, -52696, -52912, -53120, -53328, -53536, -53744, -53952, -54160, -54368, -54568, -54776, -54976, -55184, -55384, -55584, -55784, -55984, -56184, -56384, -56576, -56776, -56968, -57168, -57360, -57552, -57744, -57936, -58128, -58320, -58512, -58704, -58888, -59080, -59264, -59448, -59632, -59824, -60008, -60184, -60368, -60552, -60736, -60912, -61096, -61272, -61456, -61632, -61808, -61984, -62160, -62336, -62512, -62680, -62856, -63032, -63200, -63368, -63544, -63712, -63880, -64048, -64216, -64384, -64552, -64720, -64880, -65048, -65208, -65376, -65535, + 0, 328, 648, 976, 1296, 1624, 1944, 2272, 2600, 2920, 3248, 3568, 3896, + 4216, 4544, 4864, 5192, 5512, 5832, 6160, 6480, 6800, 7128, 7448, 7768, 8088, + 8416, 8736, 9056, 9376, 9696, 10016, 10336, 10656, 10976, 11296, 11616, 11928, 12248, + 12568, 12880, 13200, 13520, 13832, 14152, 14464, 14776, 15096, 15408, 15720, 16032, 16344, + 16656, 16968, 17280, 17592, 17904, 18216, 18520, 18832, 19136, 19448, 19752, 20056, 20368, + 20672, 20976, 21280, 21584, 21888, 22192, 22488, 22792, 23096, 23392, 23696, 23992, 24288, + 24584, 24888, 25184, 25480, 25768, 26064, 26360, 26656, 26944, 27240, 27528, 27816, 28104, + 28400, 28688, 28976, 29256, 29544, 29832, 30112, 30400, 30680, 30960, 31248, 31528, 31808, + 32088, 32368, 32640, 32920, 33192, 33472, 33744, 34024, 34296, 34568, 34840, 35112, 35376, + 35648, 35920, 36184, 36448, 36720, 36984, 37248, 37512, 37776, 38040, 38296, 38560, 38816, + 39080, 39336, 39592, 39848, 40104, 40360, 40616, 40864, 41120, 41368, 41624, 41872, 42120, + 42368, 42616, 42864, 43112, 43352, 43600, 43840, 44088, 44328, 44568, 44808, 45048, 45288, + 45520, 45760, 45992, 46232, 46464, 46696, 46928, 47160, 47392, 47624, 47856, 48080, 48312, + 48536, 48768, 48992, 49216, 49440, 49664, 49880, 50104, 50328, 50544, 50768, 50984, 51200, + 51416, 51632, 51848, 52064, 52272, 52488, 52696, 52912, 53120, 53328, 53536, 53744, 53952, + 54160, 54368, 54568, 54776, 54976, 55184, 55384, 55584, 55784, 55984, 56184, 56384, 56576, + 56776, 56968, 57168, 57360, 57552, 57744, 57936, 58128, 58320, 58512, 58704, 58888, 59080, + 59264, 59448, 59632, 59824, 60008, 60184, 60368, 60552, 60736, 60912, 61096, 61272, 61456, + 61632, 61808, 61984, 62160, 62336, 62512, 62680, 62856, 63032, 63200, 63368, 63544, 63712, + 63880, 64048, 64216, 64384, 64552, 64720, 64880, 65048, 65208, 65376, 65535, }; int32_t sin_lookup(int32_t angle) { @@ -552,9 +75,11 @@ int32_t sin_lookup(int32_t angle) { } // if I can interpolate linearly - int32_t lookup_angle = angle * 4 / 0xff; + int32_t lookup_angle = angle * 4 / 0xff; if ((uint32_t)(lookup_angle + 1) < (sizeof(SIN_LOOKUP) / sizeof(SIN_LOOKUP[0]))) { - return mult * (SIN_LOOKUP[lookup_angle] + ((angle * 4) % 0xff) * (SIN_LOOKUP[lookup_angle + 1] - SIN_LOOKUP[lookup_angle]) / 0xff); + return mult * (SIN_LOOKUP[lookup_angle] + + ((angle * 4) % 0xff) * + (SIN_LOOKUP[lookup_angle + 1] - SIN_LOOKUP[lookup_angle]) / 0xff); } return mult * SIN_LOOKUP[lookup_angle]; diff --git a/lib/util/uuid.c b/lib/util/uuid.c index 73dbf62191..28f5b6dfd2 100644 --- a/lib/util/uuid.c +++ b/lib/util/uuid.c @@ -14,7 +14,7 @@ static const Uuid invalid_uuid = UUID_INVALID_INIT; void uuid_generate(Uuid *uuid_out) { uint8_t uuid_bytes[UUID_SIZE]; - uint32_t *uuid_words = (uint32_t*)uuid_bytes; + uint32_t *uuid_words = (uint32_t *)uuid_bytes; for (size_t i = 0; i < UUID_SIZE / sizeof(uint32_t); i++) { uuid_words[i] = rand32(); } @@ -57,7 +57,7 @@ void uuid_to_string(const Uuid *uuid, char *buffer) { *buffer++ = '-'; } - buffer += snprintf(buffer, 3, "%02"PRIx8, ((uint8_t *)uuid)[i]); + buffer += snprintf(buffer, 3, "%02" PRIx8, ((uint8_t *)uuid)[i]); } *buffer++ = '}'; *buffer = '\0'; diff --git a/sdk/defaults/app/main.c b/sdk/defaults/app/main.c index f5d4f9ed54..c99e03830c 100644 --- a/sdk/defaults/app/main.c +++ b/sdk/defaults/app/main.c @@ -41,10 +41,10 @@ static void prv_window_unload(Window *window) { static void prv_init(void) { s_window = window_create(); window_set_click_config_provider(s_window, prv_click_config_provider); - window_set_window_handlers(s_window, (WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(s_window, (WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); const bool animated = true; window_stack_push(s_window, animated); } diff --git a/soc/nrf/nrf52/idle.c b/soc/nrf/nrf52/idle.c index 075a57452b..8def0e7328 100644 --- a/soc/nrf/nrf52/idle.c +++ b/soc/nrf/nrf52/idle.c @@ -94,16 +94,16 @@ void dump_current_runtime_stats(void) { uint32_t running_ticks = total_ticks - full_sleep_ticks - sleep_ticks; char buf[160]; - snprintf(buf, sizeof(buf), "Run: %"PRIu32" ticks (%"PRIu32" %%)", - running_ticks, (running_ticks * 100) / total_ticks); + snprintf(buf, sizeof(buf), "Run: %" PRIu32 " ticks (%" PRIu32 " %%)", running_ticks, + (running_ticks * 100) / total_ticks); prompt_send_response(buf); - snprintf(buf, sizeof(buf), "Sleep 0: %"PRIu32" ticks (%"PRIu32" %%)", - sleep_ticks, (sleep_ticks * 100) / total_ticks); + snprintf(buf, sizeof(buf), "Sleep 0: %" PRIu32 " ticks (%" PRIu32 " %%)", sleep_ticks, + (sleep_ticks * 100) / total_ticks); prompt_send_response(buf); - snprintf(buf, sizeof(buf), "Sleep 1: %"PRIu32" ticks (%"PRIu32" %%)", - full_sleep_ticks, (full_sleep_ticks * 100) / total_ticks); + snprintf(buf, sizeof(buf), "Sleep 1: %" PRIu32 " ticks (%" PRIu32 " %%)", full_sleep_ticks, + (full_sleep_ticks * 100) / total_ticks); prompt_send_response(buf); - snprintf(buf, sizeof(buf), "Total: %"PRIu32" ticks", total_ticks); + snprintf(buf, sizeof(buf), "Total: %" PRIu32 " ticks", total_ticks); prompt_send_response(buf); } diff --git a/soc/nrf/nrf52/init.c b/soc/nrf/nrf52/init.c index d2b66a1dee..1a800b0f6d 100644 --- a/soc/nrf/nrf52/init.c +++ b/soc/nrf/nrf52/init.c @@ -2,5 +2,4 @@ /* SPDX-License-Identifier: Apache-2.0 */ void soc_early_init(void) { - } diff --git a/soc/sf32lb/sf32lb52x/idle.c b/soc/sf32lb/sf32lb52x/idle.c index 262bd5fce4..866143f125 100644 --- a/soc/sf32lb/sf32lb52x/idle.c +++ b/soc/sf32lb/sf32lb52x/idle.c @@ -226,8 +226,7 @@ void pbl_soc_idle(pbl_tick_t max_ticks) { // configure LPTIM to wake us up after expected idle time sleep_ticks = max_ticks - EARLY_WAKEUP_TICKS; - lptim_ticks = MIN(sleep_ticks * rc10k_get_freq_hz() / RTC_TICKS_HZ, - MAX_LPTIM_CNT); + lptim_ticks = MIN(sleep_ticks * rc10k_get_freq_hz() / RTC_TICKS_HZ, MAX_LPTIM_CNT); HAL_LPTIM_Counter_Start_IT(&s_lptim, lptim_ticks); gtimer_start = HAL_GTIMER_READ(); @@ -318,16 +317,15 @@ bool pbl_soc_tick_enable(void) { return true; } -void AON_IRQHandler(void) -{ - uint32_t status; +void AON_IRQHandler(void) { + uint32_t status; - NVIC_DisableIRQ(AON_IRQn); - HAL_HPAON_CLEAR_POWER_MODE(); + NVIC_DisableIRQ(AON_IRQn); + HAL_HPAON_CLEAR_POWER_MODE(); - status = HAL_HPAON_GET_WSR(); - status &= ~HPSYS_AON_WSR_PIN_ALL; - HAL_HPAON_CLEAR_WSR(status); + status = HAL_HPAON_GET_WSR(); + status &= ~HPSYS_AON_WSR_PIN_ALL; + HAL_HPAON_CLEAR_WSR(status); } void SysTick_Handler(void) { @@ -360,19 +358,19 @@ void dump_current_runtime_stats(void) { uint32_t running_ticks = total_ticks - wfi_ticks - deepwfi_ticks - deepsleep_ticks; char buf[160]; - snprintf(buf, sizeof(buf), "Run: %"PRIu32" ticks (%"PRIu32" %%)", - running_ticks, (running_ticks * 100) / total_ticks); + snprintf(buf, sizeof(buf), "Run: %" PRIu32 " ticks (%" PRIu32 " %%)", running_ticks, + (running_ticks * 100) / total_ticks); prompt_send_response(buf); - snprintf(buf, sizeof(buf), "WFI: %"PRIu32" ticks (%"PRIu32" %%)", - wfi_ticks, (wfi_ticks * 100) / total_ticks); + snprintf(buf, sizeof(buf), "WFI: %" PRIu32 " ticks (%" PRIu32 " %%)", wfi_ticks, + (wfi_ticks * 100) / total_ticks); prompt_send_response(buf); - snprintf(buf, sizeof(buf), "Deep WFI: %"PRIu32" ticks (%"PRIu32" %%)", - deepwfi_ticks, (deepwfi_ticks * 100) / total_ticks); + snprintf(buf, sizeof(buf), "Deep WFI: %" PRIu32 " ticks (%" PRIu32 " %%)", deepwfi_ticks, + (deepwfi_ticks * 100) / total_ticks); prompt_send_response(buf); - snprintf(buf, sizeof(buf), "Deepsleep: %"PRIu32" ticks (%"PRIu32" %%)", - deepsleep_ticks, (deepsleep_ticks * 100) / total_ticks); + snprintf(buf, sizeof(buf), "Deepsleep: %" PRIu32 " ticks (%" PRIu32 " %%)", deepsleep_ticks, + (deepsleep_ticks * 100) / total_ticks); prompt_send_response(buf); - snprintf(buf, sizeof(buf), "Tot: %"PRIu32" ticks", total_ticks); + snprintf(buf, sizeof(buf), "Tot: %" PRIu32 " ticks", total_ticks); prompt_send_response(buf); } diff --git a/soc/sf32lb/sf32lb52x/init.c b/soc/sf32lb/sf32lb52x/init.c index e3a361b1fb..d9742e8730 100644 --- a/soc/sf32lb/sf32lb52x/init.c +++ b/soc/sf32lb/sf32lb52x/init.c @@ -79,7 +79,7 @@ void soc_early_init(void) { __HAL_SYSCFG_CLEAR_SECURITY(); HAL_EFUSE_Init(); - //set Sifli chipset pwrkey reset time to 15s, so it always use PMIC cold reboot for long press + // set Sifli chipset pwrkey reset time to 15s, so it always use PMIC cold reboot for long press hwp_pmuc->PWRKEY_CNT = PWRKEY_RESET_CNT; // Disable 1V8 LDO (feeds PSRAM, we use VDD_SiP to power it) diff --git a/src/bluetooth-fw/nimble/advert.c b/src/bluetooth-fw/nimble/advert.c index 0500e32aa1..6888916694 100644 --- a/src/bluetooth-fw/nimble/advert.c +++ b/src/bluetooth-fw/nimble/advert.c @@ -40,8 +40,7 @@ static int prv_device_name_read_event_cb(uint16_t conn_handle, const struct ble_ static int prv_device_name_read_op_start(void *ctx) { const uint16_t conn_handle = *(uint16_t *)ctx; - int rc = ble_gattc_read_by_uuid(conn_handle, 1, UINT16_MAX, - (ble_uuid_t *)&s_device_name_chr_uuid, + int rc = ble_gattc_read_by_uuid(conn_handle, 1, UINT16_MAX, (ble_uuid_t *)&s_device_name_chr_uuid, prv_device_name_read_event_cb, NULL); if (rc != 0) { PBL_LOG_ERR("Pairing device name read failed to start (rc=0x%04x)", (uint16_t)rc); @@ -61,7 +60,9 @@ void bt_driver_advert_advertising_disable(void) { PBL_ASSERT(rc == 0, "Failed to stop advertising (0x%04x)", (uint16_t)rc); } -bool bt_driver_advert_client_get_tx_power(int8_t *tx_power) { return false; } +bool bt_driver_advert_client_get_tx_power(int8_t *tx_power) { + return false; +} bool bt_driver_advert_set_advertising_data(const BLEAdData *ad_data) { int rc; @@ -84,7 +85,8 @@ bool bt_driver_advert_set_advertising_data(const BLEAdData *ad_data) { static void prv_handle_connection_event(struct ble_gap_event *event) { // we only want to notify on a successful connection - if (event->connect.status != 0) return; + if (event->connect.status != 0) + return; struct ble_gap_conn_desc desc; if (ble_gap_conn_find(event->connect.conn_handle, &desc) != 0) { @@ -171,8 +173,7 @@ static void prv_handle_enc_change_event(struct ble_gap_event *event) { } PBL_LOG_INFO("Encryption change: status=0x%04x encrypted=%u bonded=%u", - (uint16_t)event->enc_change.status, desc.sec_state.encrypted, - desc.sec_state.bonded); + (uint16_t)event->enc_change.status, desc.sec_state.encrypted, desc.sec_state.bonded); struct BleEncryptionChange enc_change_event = { .encryption_enabled = desc.sec_state.encrypted, @@ -185,8 +186,7 @@ static void prv_handle_enc_change_event(struct ble_gap_event *event) { static void prv_handle_conn_params_updated_event(struct ble_gap_event *event) { if (event->conn_update.status != 0) { - PBL_LOG_ERR("Connection parameters update failed: 0x%04x", - (uint16_t)event->conn_update.status); + PBL_LOG_ERR("Connection parameters update failed: 0x%04x", (uint16_t)event->conn_update.status); return; } @@ -196,10 +196,11 @@ static void prv_handle_conn_params_updated_event(struct ble_gap_event *event) { return; } - PBL_LOG_INFO("Connection parameters updated: " - "itvl=%u ms, latency=%u, spvn timeout=%u ms", - desc.conn_itvl * BLE_HCI_CONN_ITVL / 1000, desc.conn_latency, - desc.supervision_timeout * BLE_HCI_CONN_SPVN_TMO_UNITS); + PBL_LOG_INFO( + "Connection parameters updated: " + "itvl=%u ms, latency=%u, spvn timeout=%u ms", + desc.conn_itvl * BLE_HCI_CONN_ITVL / 1000, desc.conn_latency, + desc.supervision_timeout * BLE_HCI_CONN_SPVN_TMO_UNITS); struct BleConnectionUpdateCompleteEvent conn_params_update_event = { .status = HciStatusCode_Success, @@ -213,12 +214,13 @@ static void prv_handle_conn_params_updated_event(struct ble_gap_event *event) { static void prv_handle_conn_update_req_event(struct ble_gap_event *event) { *event->conn_update_req.self_params = *event->conn_update_req.peer_params; - PBL_LOG_INFO("Connection update request: " - "itvl=(%u, %u) ms, latency=%u, spvn timeout=%u ms", - event->conn_update_req.self_params->itvl_min * BLE_HCI_CONN_ITVL / 1000, - event->conn_update_req.self_params->itvl_max * BLE_HCI_CONN_ITVL / 1000, - event->conn_update_req.self_params->latency, - event->conn_update_req.self_params->supervision_timeout * BLE_HCI_CONN_SPVN_TMO_UNITS); + PBL_LOG_INFO( + "Connection update request: " + "itvl=(%u, %u) ms, latency=%u, spvn timeout=%u ms", + event->conn_update_req.self_params->itvl_min * BLE_HCI_CONN_ITVL / 1000, + event->conn_update_req.self_params->itvl_max * BLE_HCI_CONN_ITVL / 1000, + event->conn_update_req.self_params->latency, + event->conn_update_req.self_params->supervision_timeout * BLE_HCI_CONN_SPVN_TMO_UNITS); } static void prv_handle_passkey_event(struct ble_gap_event *event) { @@ -283,9 +285,9 @@ extern int pebble_pairing_service_get_connectivity_send_notification(uint16_t co uint16_t attr_handle); static void prv_handle_subscription_event(struct ble_gap_event *event) { PBL_LOG_DBG("prv_handle_subscription_event: connhandle: %d attr:%d notify:%d/%d indicate:%d/%d", - event->subscribe.conn_handle, event->subscribe.attr_handle, - event->subscribe.prev_notify, event->subscribe.cur_notify, - event->subscribe.prev_indicate, event->subscribe.cur_indicate); + event->subscribe.conn_handle, event->subscribe.attr_handle, + event->subscribe.prev_notify, event->subscribe.cur_notify, + event->subscribe.prev_indicate, event->subscribe.cur_indicate); } static void prv_handle_notification_rx_event(struct ble_gap_event *event) { @@ -311,9 +313,7 @@ static void prv_handle_notification_rx_event(struct ble_gap_event *event) { static void prv_handle_notification_tx_event(struct ble_gap_event *event) { PBL_LOG_DBG("notification tx event; status=%d attr_handle=%d indication=%d\n", - event->notify_tx.status, - event->notify_tx.attr_handle, - event->notify_tx.indication); + event->notify_tx.status, event->notify_tx.attr_handle, event->notify_tx.indication); } static int prv_handle_repeat_pairing_event(struct ble_gap_event *event) { @@ -342,13 +342,12 @@ static int prv_handle_repeat_pairing_event(struct ble_gap_event *event) { static void prv_handle_phy_update_event(struct ble_gap_event *event) { if (event->phy_updated.status != 0) { - PBL_LOG_ERR("PHY update failed: 0x%04x", - (uint16_t)event->phy_updated.status); + PBL_LOG_ERR("PHY update failed: 0x%04x", (uint16_t)event->phy_updated.status); return; } PBL_LOG_DBG("PHY update complete; conn_handle=%d, tx_phy=%d, rx_phy=%d", - event->phy_updated.conn_handle, event->phy_updated.tx_phy, event->phy_updated.rx_phy); + event->phy_updated.conn_handle, event->phy_updated.tx_phy, event->phy_updated.rx_phy); } static int prv_handle_gap_event(struct ble_gap_event *event, void *arg) { @@ -358,8 +357,7 @@ static int prv_handle_gap_event(struct ble_gap_event *event, void *arg) { prv_handle_connection_event(event); break; case BLE_GAP_EVENT_DISCONNECT: - PBL_LOG_DBG("BLE_GAP_EVENT_DISCONNECT reason=0x%x", - event->disconnect.reason); + PBL_LOG_DBG("BLE_GAP_EVENT_DISCONNECT reason=0x%x", event->disconnect.reason); prv_handle_disconnection_event(event); break; case BLE_GAP_EVENT_ENC_CHANGE: diff --git a/src/bluetooth-fw/nimble/bt_classic_stubs.c b/src/bluetooth-fw/nimble/bt_classic_stubs.c index 8104bb1dfe..cf333d7ad5 100644 --- a/src/bluetooth-fw/nimble/bt_classic_stubs.c +++ b/src/bluetooth-fw/nimble/bt_classic_stubs.c @@ -3,4 +3,6 @@ #include -uint32_t sys_app_comm_get_sniff_interval(void) { return 0; } +uint32_t sys_app_comm_get_sniff_interval(void) { + return 0; +} diff --git a/src/bluetooth-fw/nimble/comm.c b/src/bluetooth-fw/nimble/comm.c index f2f74c318f..1300a3d1e8 100644 --- a/src/bluetooth-fw/nimble/comm.c +++ b/src/bluetooth-fw/nimble/comm.c @@ -14,4 +14,6 @@ bool bt_driver_comm_schedule_send_next_job(CommSession *session) { return true; // we croak if a task cannot be scheduled on KernelMain } -bool bt_driver_comm_is_current_task_send_next_task(void) { return launcher_task_is_current_task(); } +bool bt_driver_comm_is_current_task_send_next_task(void) { + return launcher_task_is_current_task(); +} diff --git a/src/bluetooth-fw/nimble/gap_le_device_name.c b/src/bluetooth-fw/nimble/gap_le_device_name.c index c84182e74b..3b064b461b 100644 --- a/src/bluetooth-fw/nimble/gap_le_device_name.c +++ b/src/bluetooth-fw/nimble/gap_le_device_name.c @@ -26,8 +26,7 @@ static int prv_device_name_read_event_cb(uint16_t conn_handle, const struct ble_ if (error->status != 0) { if (error->status != BLE_HS_EDONE) { - PBL_LOG_ERR("prv_device_name_read_event_cb error=%d", - error->status); + PBL_LOG_ERR("prv_device_name_read_event_cb error=%d", error->status); } // Frees arg (the op context); must be the last use of it nimble_gattc_op_queue_complete(); @@ -36,8 +35,7 @@ static int prv_device_name_read_event_cb(uint16_t conn_handle, const struct ble_ const uint16_t name_len = OS_MBUF_PKTLEN(attr->om); - PBL_LOG_DBG("Device name read cb: conn=%u handle=%u len=%u", conn_handle, attr->handle, - name_len); + PBL_LOG_DBG("Device name read cb: conn=%u handle=%u len=%u", conn_handle, attr->handle, name_len); char *device_name = kernel_zalloc_check(name_len + 1); if (ble_hs_mbuf_to_flat(attr->om, device_name, name_len, NULL) != 0) { diff --git a/src/bluetooth-fw/nimble/gap_le_scan.c b/src/bluetooth-fw/nimble/gap_le_scan.c index d97d7b78af..f634a2df67 100644 --- a/src/bluetooth-fw/nimble/gap_le_scan.c +++ b/src/bluetooth-fw/nimble/gap_le_scan.c @@ -8,4 +8,6 @@ bool bt_driver_start_le_scan(bool active_scan, bool use_white_list_filter, bool return true; } -bool bt_driver_stop_le_scan(void) { return true; } +bool bt_driver_stop_le_scan(void) { + return true; +} diff --git a/src/bluetooth-fw/nimble/gatt.c b/src/bluetooth-fw/nimble/gatt.c index 6ed73b2c07..a3c4b4a4d8 100644 --- a/src/bluetooth-fw/nimble/gatt.c +++ b/src/bluetooth-fw/nimble/gatt.c @@ -13,7 +13,8 @@ PBL_LOG_MODULE_DECLARE(bt, CONFIG_BT_LOG_LEVEL); -void bt_driver_gatt_respond_read_subscription(uint32_t transaction_id, uint16_t response_code) {} +void bt_driver_gatt_respond_read_subscription(uint32_t transaction_id, uint16_t response_code) { +} void bt_driver_gatt_send_changed_indication(const BTDeviceInternal *device, const ATTHandleRange *data) { diff --git a/src/bluetooth-fw/nimble/gatt_client_discovery.c b/src/bluetooth-fw/nimble/gatt_client_discovery.c index 8141e9f338..dc793e462a 100644 --- a/src/bluetooth-fw/nimble/gatt_client_discovery.c +++ b/src/bluetooth-fw/nimble/gatt_client_discovery.c @@ -156,12 +156,9 @@ static bool prv_find_dsc_by_uuid(ListNode *node, void *data) { return ble_uuid_cmp(&dsc_node->descriptor.uuid.u, dsc_uuid) == 0; } -static bool prv_find_dsc_uuid(GATTServiceDiscoveryContext *context, - const ble_uuid_t *svc_uuid, - const ble_uuid_t *chr_uuid, - const ble_uuid_t *dsc_uuid, - uint16_t *chr_handle, - uint16_t *dsc_handle) { +static bool prv_find_dsc_uuid(GATTServiceDiscoveryContext *context, const ble_uuid_t *svc_uuid, + const ble_uuid_t *chr_uuid, const ble_uuid_t *dsc_uuid, + uint16_t *chr_handle, uint16_t *dsc_handle) { GATTServiceDiscoveryServiceNode *service_node = (GATTServiceDiscoveryServiceNode *)list_find( context->services, prv_find_svc_by_uuid, (void *)svc_uuid); if (service_node == NULL) { @@ -195,12 +192,10 @@ typedef struct { static int prv_on_svc_chgd_subscribe(uint16_t conn_handle, const struct ble_gatt_error *error, struct ble_gatt_attr *attr, void *arg) { if (error->status != 0) { - PBL_LOG_ERR("Failed to subscribe to service changed: 0x%" PRIx16, - error->status); + PBL_LOG_ERR("Failed to subscribe to service changed: 0x%" PRIx16, error->status); } else { GATTServiceDiscoveryDescriptorContext *ctx = arg; - bt_driver_cb_gatt_client_discovery_handle_service_changed(ctx->connection, - ctx->chr_handle); + bt_driver_cb_gatt_client_discovery_handle_service_changed(ctx->connection, ctx->chr_handle); PBL_LOG_DBG("Subscribed to service changed"); } @@ -210,7 +205,8 @@ static int prv_on_svc_chgd_subscribe(uint16_t conn_handle, const struct ble_gatt return 0; } -static void prv_convert_service_and_notify_os(uint16_t conn_handle, GATTServiceDiscoveryContext *context) { +static void prv_convert_service_and_notify_os(uint16_t conn_handle, + GATTServiceDiscoveryContext *context) { list_foreach(context->services, prv_convert_service_and_notify_os_cb, context->connection); bt_driver_cb_gatt_client_discovery_complete(context->connection, BTErrnoOK); @@ -218,21 +214,21 @@ static void prv_convert_service_and_notify_os(uint16_t conn_handle, GATTServiceD uint16_t chr_handle, dsc_handle; if (prv_find_dsc_uuid(context, BLE_UUID16_DECLARE(BLE_GATT_SVC_UUID16), BLE_UUID16_DECLARE(BLE_SVC_GATT_CHR_SERVICE_CHANGED_UUID16), - BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16), - &chr_handle, &dsc_handle)) { + BLE_UUID16_DECLARE(BLE_GATT_DSC_CLT_CFG_UUID16), &chr_handle, + &dsc_handle)) { uint16_t value; int ret; - GATTServiceDiscoveryDescriptorContext *ctx = kernel_zalloc_check( - sizeof(GATTServiceDiscoveryDescriptorContext)); + GATTServiceDiscoveryDescriptorContext *ctx = + kernel_zalloc_check(sizeof(GATTServiceDiscoveryDescriptorContext)); ctx->connection = context->connection; ctx->chr_handle = chr_handle; value = 0x0002; - ret = ble_gattc_write_flat(conn_handle, dsc_handle, - &value, sizeof(value), prv_on_svc_chgd_subscribe, ctx); + ret = ble_gattc_write_flat(conn_handle, dsc_handle, &value, sizeof(value), + prv_on_svc_chgd_subscribe, ctx); if (ret != 0) { - PBL_LOG_ERR("Failed to subscribe to service changed: %d", ret); + PBL_LOG_ERR("Failed to subscribe to service changed: %d", ret); } } @@ -264,8 +260,8 @@ static void prv_discover_next_dscs(uint16_t conn_handle, GATTServiceDiscoveryCon uint16_t end_handle = prv_get_last_dsc_handle(context); int rc = ble_gattc_disc_all_dscs(conn_handle, start_handle, end_handle, prv_find_dsc_cb, context); if (rc != 0) { - PBL_LOG_ERR("ble_gattc_disc_all_dscs rc=0x%04x (0x%04x -> 0x%04x)", - (uint16_t)rc, start_handle, end_handle); + PBL_LOG_ERR("ble_gattc_disc_all_dscs rc=0x%04x (0x%04x -> 0x%04x)", (uint16_t)rc, start_handle, + end_handle); } } @@ -275,8 +271,8 @@ static void prv_discover_next_chrs(uint16_t conn_handle, GATTServiceDiscoveryCon int rc = ble_gattc_disc_all_chrs(conn_handle, service_node->service.start_handle, service_node->service.end_handle, prv_find_chr_cb, context); if (rc != 0) { - PBL_LOG_ERR("ble_gattc_disc_all_chrs rc=0x%04x (0x%04x -> 0x%04x)", - (uint16_t)rc, service_node->service.start_handle, service_node->service.end_handle); + PBL_LOG_ERR("ble_gattc_disc_all_chrs rc=0x%04x (0x%04x -> 0x%04x)", (uint16_t)rc, + service_node->service.start_handle, service_node->service.end_handle); } } @@ -339,8 +335,7 @@ static int prv_find_dsc_cb(uint16_t conn_handle, const struct ble_gatt_error *er case 0: char chr_uuid_str[BLE_UUID_STR_LEN]; ble_uuid_to_str(&dsc->uuid.u, chr_uuid_str); - PBL_LOG_DBG("Found descriptor %s (hdl: 0x%" PRIx16 ")", - chr_uuid_str, dsc->handle); + PBL_LOG_DBG("Found descriptor %s (hdl: 0x%" PRIx16 ")", chr_uuid_str, dsc->handle); GATTServiceDiscoveryDescriptorNode *dsc_node = prv_create_descriptor_node(dsc); GATTServiceDiscoveryCharacteristicNode *chr_node = prv_get_current_chr(context); @@ -384,8 +379,7 @@ static int prv_find_dsc_cb(uint16_t conn_handle, const struct ble_gatt_error *er break; default: - PBL_LOG_ERR("Descriptor discovery error: %d", - error->status); + PBL_LOG_ERR("Descriptor discovery error: %d", error->status); if (error->status == BLE_HS_ETIMEOUT) { errno = BTErrnoServiceDiscoveryTimeout; } else if (error->status == BLE_HS_ENOTCONN) { @@ -420,7 +414,7 @@ static int prv_find_chr_cb(uint16_t conn_handle, const struct ble_gatt_error *er char chr_uuid_str[BLE_UUID_STR_LEN]; ble_uuid_to_str(&chr->uuid.u, chr_uuid_str); PBL_LOG_DBG("Found characteristic %s (val hdl: 0x%" PRIx16 ", def hdl: 0x%" PRIx16 ")", - chr_uuid_str, chr->val_handle, chr->def_handle); + chr_uuid_str, chr->val_handle, chr->def_handle); GATTServiceDiscoveryCharacteristicNode *chr_node = prv_create_chr_node(chr); GATTServiceDiscoveryServiceNode *service_node = prv_get_current_service(context); @@ -456,8 +450,7 @@ static int prv_find_chr_cb(uint16_t conn_handle, const struct ble_gatt_error *er break; default: - PBL_LOG_ERR("Characteristic discovery error: %d", - error->status); + PBL_LOG_ERR("Characteristic discovery error: %d", error->status); if (error->status == BLE_HS_ETIMEOUT) { errno = BTErrnoServiceDiscoveryTimeout; } else if (error->status == BLE_HS_ENOTCONN) { @@ -491,7 +484,7 @@ static int prv_find_inc_svc_cb(uint16_t conn_handle, const struct ble_gatt_error case 0: if (service->start_handle < context->range.start || service->end_handle > context->range.end) { - return 0; // skip this service + return 0; // skip this service } GATTServiceDiscoveryServiceNode *service_node = prv_create_service_node(service); @@ -499,9 +492,8 @@ static int prv_find_inc_svc_cb(uint16_t conn_handle, const struct ble_gatt_error char service_uuid_str[BLE_UUID_STR_LEN]; ble_uuid_to_str(&service->uuid.u, service_uuid_str); - PBL_LOG_DBG("Found service %s, 0x%" PRIx16 "-0x%" PRIx16 " (total %lu)", - service_uuid_str, service->start_handle, service->end_handle, - list_count(context->services)); + PBL_LOG_DBG("Found service %s, 0x%" PRIx16 "-0x%" PRIx16 " (total %lu)", service_uuid_str, + service->start_handle, service->end_handle, list_count(context->services)); break; case BLE_HS_EDONE: @@ -621,4 +613,5 @@ BTErrno bt_driver_gatt_stop_discovery(GAPLEConnection *connection) { return BTErrnoOK; } -void bt_driver_gatt_handle_discovery_abandoned(void) {} +void bt_driver_gatt_handle_discovery_abandoned(void) { +} diff --git a/src/bluetooth-fw/nimble/gatt_client_operations.c b/src/bluetooth-fw/nimble/gatt_client_operations.c index 71bb371827..167b53bf7e 100644 --- a/src/bluetooth-fw/nimble/gatt_client_operations.c +++ b/src/bluetooth-fw/nimble/gatt_client_operations.c @@ -28,8 +28,8 @@ static BLEGATTError prv_gatt_error_code(uint16_t status) { static int prv_gatt_write_event_cb(uint16_t conn_handle, const struct ble_gatt_error *error, struct ble_gatt_attr *attr, void *arg) { if (error->status != 0U) { - PBL_LOG_ERR("GATT write failed (hdl: 0x%" PRIx16 "): 0x%" PRIx16, - error->att_handle, error->status); + PBL_LOG_ERR("GATT write failed (hdl: 0x%" PRIx16 "): 0x%" PRIx16, error->att_handle, + error->status); } GattClientOpWriteResponse resp = { @@ -37,7 +37,8 @@ static int prv_gatt_write_event_cb(uint16_t conn_handle, const struct ble_gatt_e .type = GattClientOpResponseWrite, .error_code = prv_gatt_error_code(error->status), .context = arg, - }}; + } + }; bt_driver_cb_gatt_client_operations_handle_response(&resp.hdr); return 0; } @@ -45,8 +46,8 @@ static int prv_gatt_write_event_cb(uint16_t conn_handle, const struct ble_gatt_e static int prv_gatt_read_event_cb(uint16_t conn_handle, const struct ble_gatt_error *error, struct ble_gatt_attr *attr, void *arg) { if (error->status != 0U) { - PBL_LOG_ERR("GATT read failed (hdl: 0x%" PRIx16 "): 0x%" PRIx16, - error->att_handle, error->status); + PBL_LOG_ERR("GATT read failed (hdl: 0x%" PRIx16 "): 0x%" PRIx16, error->att_handle, + error->status); } GattClientOpReadResponse resp = { @@ -65,8 +66,7 @@ static int prv_gatt_read_event_cb(uint16_t conn_handle, const struct ble_gatt_er BTErrno bt_driver_gatt_write_without_response(GAPLEConnection *connection, const uint8_t *value, size_t value_length, uint16_t att_handle) { - PBL_LOG_VERBOSE("bt_driver_gatt_write_without_response: %d", - att_handle); + PBL_LOG_VERBOSE("bt_driver_gatt_write_without_response: %d", att_handle); uint16_t conn_handle; if (!pebble_device_to_nimble_conn_handle(&connection->device, &conn_handle)) { return BTErrnoInvalidState; diff --git a/src/bluetooth-fw/nimble/gh3x2x_tuning_service.c b/src/bluetooth-fw/nimble/gh3x2x_tuning_service.c index d919ec1ec8..15c991048a 100644 --- a/src/bluetooth-fw/nimble/gh3x2x_tuning_service.c +++ b/src/bluetooth-fw/nimble/gh3x2x_tuning_service.c @@ -12,67 +12,66 @@ #include "console/console.h" #include - uint16_t g_gh3x2x_ble_attr_tx_handle; uint16_t g_gh3x2x_ble_attr_rx_handle; uint16_t g_gh3x2x_ble_conn_handle = 0xffff; /* {0000190e-0000-1000-8000-00805f9b34fb} */ -static const ble_uuid128_t gatt_svr_svc_gh3x2x_ble_uuid = - BLE_UUID128_INIT(0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, - 0x00, 0x10, 0x00, 0x00, 0x0e, 0x19, 0x00, 0x00); +static const ble_uuid128_t gatt_svr_svc_gh3x2x_ble_uuid = BLE_UUID128_INIT( + 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x0e, 0x19, 0x00, 0x00); /* {00000003-0000-1000-8000-00805f9b34fb} */ -static const ble_uuid128_t gatt_svr_chr_gh3x2x_ble_tx_uuid = - BLE_UUID128_INIT(0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, - 0x00, 0x10, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00); +static const ble_uuid128_t gatt_svr_chr_gh3x2x_ble_tx_uuid = BLE_UUID128_INIT( + 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00); /* {00000004-0000-1000-8000-00805f9b34fb} */ -static const ble_uuid128_t gatt_svr_chr_gh3x2x_ble_rx_uuid = - BLE_UUID128_INIT(0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, - 0x00, 0x10, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00); +static const ble_uuid128_t gatt_svr_chr_gh3x2x_ble_rx_uuid = BLE_UUID128_INIT( + 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00); static int gatt_svr_chr_access_gh3x2x_ble_rx(uint16_t conn_handle, uint16_t attr_handle, - struct ble_gatt_access_ctxt *ctxt, void *arg); -void gh3x2x_ble_notify(const uint8_t* p_data, uint32_t data_len); + struct ble_gatt_access_ctxt *ctxt, void *arg); +void gh3x2x_ble_notify(const uint8_t *p_data, uint32_t data_len); static const struct ble_gatt_svc_def gatt_svr_svcs[] = { - { - .type = BLE_GATT_SVC_TYPE_PRIMARY, - .uuid = &gatt_svr_svc_gh3x2x_ble_uuid.u, - .characteristics = (struct ble_gatt_chr_def[]) { - { - // tx - .uuid = &gatt_svr_chr_gh3x2x_ble_tx_uuid.u, - .val_handle = &g_gh3x2x_ble_attr_tx_handle, - .access_cb = gatt_svr_chr_access_gh3x2x_ble_rx, - .flags = BLE_GATT_CHR_F_NOTIFY, - },{ - .uuid = &gatt_svr_chr_gh3x2x_ble_rx_uuid.u, - .access_cb = gatt_svr_chr_access_gh3x2x_ble_rx, - .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_WRITE_NO_RSP, - .val_handle = &g_gh3x2x_ble_attr_rx_handle, - },{ - 0, /* No more characteristics in this service */ - } + { + .type = BLE_GATT_SVC_TYPE_PRIMARY, + .uuid = &gatt_svr_svc_gh3x2x_ble_uuid.u, + .characteristics = + (struct ble_gatt_chr_def[]){ + { + // tx + .uuid = &gatt_svr_chr_gh3x2x_ble_tx_uuid.u, + .val_handle = &g_gh3x2x_ble_attr_tx_handle, + .access_cb = gatt_svr_chr_access_gh3x2x_ble_rx, + .flags = BLE_GATT_CHR_F_NOTIFY, + }, + { + .uuid = &gatt_svr_chr_gh3x2x_ble_rx_uuid.u, + .access_cb = gatt_svr_chr_access_gh3x2x_ble_rx, + .flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_WRITE_NO_RSP, + .val_handle = &g_gh3x2x_ble_attr_rx_handle, + }, + { + 0, /* No more characteristics in this service */ + } + }, + }, + { + 0, /* No more services */ }, - }, - { - 0, /* No more services */ - }, }; -static void ble_gh3x2x_ble_data_recv_handle(struct os_mbuf *om){ +static void ble_gh3x2x_ble_data_recv_handle(struct os_mbuf *om) { uint32_t data_len = 0; struct os_mbuf *first = om; - while(om) { + while (om) { data_len += om->om_len; om = SLIST_NEXT(om, om_next); } om = first; - uint8_t* p_data; - uint8_t* p_start = (uint8_t*)malloc(data_len + sizeof(uint32_t)); + uint8_t *p_data; + uint8_t *p_start = (uint8_t *)malloc(data_len + sizeof(uint32_t)); if (p_start == NULL) { return; } @@ -85,13 +84,13 @@ static void ble_gh3x2x_ble_data_recv_handle(struct os_mbuf *om){ om = SLIST_NEXT(om, om_next); } - if (!gh3x2x_ble_data_recv(p_start)) { + if (!gh3x2x_ble_data_recv(p_start)) { free(p_start); } } static int gatt_svr_chr_access_gh3x2x_ble_rx(uint16_t conn_handle, uint16_t attr_handle, - struct ble_gatt_access_ctxt *ctxt, void *arg) { + struct ble_gatt_access_ctxt *ctxt, void *arg) { g_gh3x2x_ble_conn_handle = conn_handle; struct os_mbuf *om = ctxt->om; switch (ctxt->op) { @@ -105,14 +104,14 @@ static int gatt_svr_chr_access_gh3x2x_ble_rx(uint16_t conn_handle, uint16_t attr } } -void gh3x2x_ble_notify(const uint8_t* p_data, uint32_t data_len) { +void gh3x2x_ble_notify(const uint8_t *p_data, uint32_t data_len) { if (0xffff == g_gh3x2x_ble_conn_handle || data_len == 0 || p_data == NULL) { return; } struct os_mbuf *om = ble_hs_mbuf_from_flat(p_data, data_len); if (!om) { - return; + return; } ble_gatts_notify_custom(g_gh3x2x_ble_conn_handle, g_gh3x2x_ble_attr_tx_handle, om); } @@ -128,4 +127,3 @@ int gh3x2x_tuning_service_init(void) { } return rc; } - diff --git a/src/bluetooth-fw/nimble/gh3x2x_tuning_service.h b/src/bluetooth-fw/nimble/gh3x2x_tuning_service.h index d1aacc3feb..0217000f75 100644 --- a/src/bluetooth-fw/nimble/gh3x2x_tuning_service.h +++ b/src/bluetooth-fw/nimble/gh3x2x_tuning_service.h @@ -6,4 +6,4 @@ #include int gh3x2x_tuning_service_init(void); -void gh3x2x_ble_notify(const uint8_t* p_data, uint32_t data_len); \ No newline at end of file +void gh3x2x_ble_notify(const uint8_t *p_data, uint32_t data_len); \ No newline at end of file diff --git a/src/bluetooth-fw/nimble/hrm_service.c b/src/bluetooth-fw/nimble/hrm_service.c index 67d8abf4c3..3dd64b9661 100644 --- a/src/bluetooth-fw/nimble/hrm_service.c +++ b/src/bluetooth-fw/nimble/hrm_service.c @@ -3,8 +3,11 @@ #include -bool bt_driver_is_hrm_service_supported(void) { return false; } +bool bt_driver_is_hrm_service_supported(void) { + return false; +} void bt_driver_hrm_service_handle_measurement(const BleHrmServiceMeasurement *measurement, const BTDeviceInternal *permitted_devices, - size_t num_permitted_devices) {} + size_t num_permitted_devices) { +} diff --git a/src/bluetooth-fw/nimble/id.c b/src/bluetooth-fw/nimble/id.c index 76f515dbed..35116c263b 100644 --- a/src/bluetooth-fw/nimble/id.c +++ b/src/bluetooth-fw/nimble/id.c @@ -23,7 +23,8 @@ void bt_driver_id_copy_local_identity_address(BTDeviceAddress *addr_out) { PBL_ASSERTN(rc == 0); } -void bt_driver_set_local_address(bool allow_cycling, const BTDeviceAddress *pinned_address) {} +void bt_driver_set_local_address(bool allow_cycling, const BTDeviceAddress *pinned_address) { +} void bt_driver_id_copy_chip_info_string(char *dest, size_t dest_size) { strncpy(dest, "NimBLE", dest_size); diff --git a/src/bluetooth-fw/nimble/init.c b/src/bluetooth-fw/nimble/init.c index a40a1f3c29..63ccbcdc08 100644 --- a/src/bluetooth-fw/nimble/init.c +++ b/src/bluetooth-fw/nimble/init.c @@ -77,7 +77,9 @@ static void prv_host_task_main(void *unused) { nimble_port_run(); } -static void prv_ble_hs_stop_cb(int status, void *arg) { pbl_sem_give(&s_host_stopped); } +static void prv_ble_hs_stop_cb(int status, void *arg) { + pbl_sem_give(&s_host_stopped); +} // ---------------------------------------------------------------------------------------- void bt_driver_init(void) { @@ -126,8 +128,7 @@ bool bt_driver_start(BTDriverConfig *config) { } if (s_driver_state != DriverStateStopped) { - PBL_LOG_ERR("Unexpected driver state %u; refusing to start", - (unsigned)s_driver_state); + PBL_LOG_ERR("Unexpected driver state %u; refusing to start", (unsigned)s_driver_state); return false; } @@ -206,4 +207,5 @@ void bt_driver_stop(void) { nimble_store_unload(); } -void bt_driver_power_down_controller_on_boot(void) {} +void bt_driver_power_down_controller_on_boot(void) { +} diff --git a/src/bluetooth-fw/nimble/logging.c b/src/bluetooth-fw/nimble/logging.c index 9e6f1a8b72..e9059c22de 100644 --- a/src/bluetooth-fw/nimble/logging.c +++ b/src/bluetooth-fw/nimble/logging.c @@ -4,6 +4,9 @@ #include #include -void hc_endpoint_logging_set_level(uint8_t level) {} +void hc_endpoint_logging_set_level(uint8_t level) { +} -bool hc_endpoint_logging_get_level(uint8_t *level) { return false; } +bool hc_endpoint_logging_get_level(uint8_t *level) { + return false; +} diff --git a/src/bluetooth-fw/nimble/nimble_store.c b/src/bluetooth-fw/nimble/nimble_store.c index 22d62c9db8..59eab56f05 100644 --- a/src/bluetooth-fw/nimble/nimble_store.c +++ b/src/bluetooth-fw/nimble/nimble_store.c @@ -64,14 +64,14 @@ static ListNode **prv_find_sec_list_for_obj_type(const int obj_type) { } static BleStoreValueSec *prv_nimble_store_find_sec(const int obj_type, - const struct ble_store_key_sec *key_sec) { + const struct ble_store_key_sec *key_sec) { ListNode *sec_list = *prv_find_sec_list_for_obj_type(obj_type); if (!ble_addr_cmp(&key_sec->peer_addr, BLE_ADDR_ANY)) { return (BleStoreValueSec *)list_get_at(sec_list, key_sec->idx); } else if (key_sec->idx == 0) { return (BleStoreValueSec *)list_find(sec_list, prv_nimble_store_find_sec_cb, - (void *)&key_sec->peer_addr); + (void *)&key_sec->peer_addr); } return NULL; @@ -99,7 +99,7 @@ static int prv_nimble_store_read_sec(const int obj_type, const struct ble_store_ } static BleStoreValueSec *prv_nimble_store_upsert_sec(const int obj_type, - const struct ble_store_value_sec *value_sec) { + const struct ble_store_value_sec *value_sec) { BleStoreValueSec *s; struct ble_store_key_sec key_sec; ble_store_key_from_value_sec(&key_sec, value_sec); @@ -252,9 +252,9 @@ static int prv_nimble_store_write_sec(const int obj_type, prv_nimble_store_upsert_sec(obj_type, value_sec); NimbleStoreSecWrittenContext *ctx = kernel_malloc_check(sizeof(*ctx)); - *ctx = (NimbleStoreSecWrittenContext) { - .obj_type = obj_type, - .value_sec = *value_sec, + *ctx = (NimbleStoreSecWrittenContext){ + .obj_type = obj_type, + .value_sec = *value_sec, }; launcher_task_add_callback(prv_handle_sec_written_cb, ctx); @@ -315,8 +315,8 @@ static bool prv_nimble_store_find_cccd_cb(ListNode *node, void *data) { static BleStoreValueCCCD *prv_nimble_store_find_cccd(const struct ble_store_key_cccd *key_cccd) { BleStoreCCCDFindContext ctx = { - .key = key_cccd, - .skipped = 0U, + .key = key_cccd, + .skipped = 0U, }; return (BleStoreValueCCCD *)list_find((ListNode *)s_cccds, prv_nimble_store_find_cccd_cb, &ctx); @@ -608,7 +608,7 @@ void bt_driver_handle_host_added_cccd(const BleCCCD *cccd) { void bt_driver_handle_host_removed_cccd(const BleCCCD *cccd) { BleStoreValueCCCD *s; struct ble_store_key_cccd key_cccd; - + pebble_device_to_nimble_addr(&cccd->peer, &key_cccd.peer_addr); key_cccd.chr_val_handle = cccd->chr_val_handle; key_cccd.idx = 0; diff --git a/src/bluetooth-fw/nimble/nimble_type_conversions.c b/src/bluetooth-fw/nimble/nimble_type_conversions.c index 76d6b28664..b30b262e75 100644 --- a/src/bluetooth-fw/nimble/nimble_type_conversions.c +++ b/src/bluetooth-fw/nimble/nimble_type_conversions.c @@ -35,7 +35,7 @@ bool pebble_device_to_nimble_conn_handle(const BTDeviceInternal *device, uint16_ int rc = ble_gap_conn_find_by_addr(&addr, &desc); if (rc != 0) { PBL_LOG_ERR("failed to find connection handle for addr" BT_DEVICE_ADDRESS_FMT, - BT_DEVICE_ADDRESS_XPLODE(device->address)); + BT_DEVICE_ADDRESS_XPLODE(device->address)); } else { *handle = desc.conn_handle; } diff --git a/src/bluetooth-fw/nimble/pairability.c b/src/bluetooth-fw/nimble/pairability.c index 0a7681087b..8214c100c7 100644 --- a/src/bluetooth-fw/nimble/pairability.c +++ b/src/bluetooth-fw/nimble/pairability.c @@ -3,4 +3,5 @@ #include -void bt_driver_le_pairability_set_enabled(bool enabled) {} +void bt_driver_le_pairability_set_enabled(bool enabled) { +} diff --git a/src/bluetooth-fw/nimble/pebble_pairing_service.c b/src/bluetooth-fw/nimble/pebble_pairing_service.c index 1c1cdf6ede..bef6acadfd 100644 --- a/src/bluetooth-fw/nimble/pebble_pairing_service.c +++ b/src/bluetooth-fw/nimble/pebble_pairing_service.c @@ -15,7 +15,7 @@ PBL_LOG_MODULE_DECLARE(bt, CONFIG_BT_LOG_LEVEL); -#define TRIGGER_PAIRING_NO_SEC_REQ (1U << 1U) +#define TRIGGER_PAIRING_NO_SEC_REQ (1U << 1U) #define TRIGGER_PAIRING_FORCE_SEC_REQ (1U << 2U) static int pebble_pairing_service_get_connectivity_status( @@ -30,7 +30,7 @@ static int pebble_pairing_service_get_connectivity_status( } struct ble_store_key_sec key_sec = { - .peer_addr = desc.peer_id_addr, + .peer_addr = desc.peer_id_addr, }; struct ble_store_value_sec value_sec; bool is_bonded = (ble_store_read_peer_sec(&key_sec, &value_sec) == 0); @@ -69,7 +69,8 @@ int pebble_pairing_service_get_connectivity_send_notification(uint16_t conn_hand static int prv_access_connection_status(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg) { - if (ctxt->op != BLE_GATT_ACCESS_OP_READ_CHR) return 0; + if (ctxt->op != BLE_GATT_ACCESS_OP_READ_CHR) + return 0; PebblePairingServiceConnectivityStatus status; int rc = pebble_pairing_service_get_connectivity_status(conn_handle, &status); diff --git a/src/bluetooth-fw/nimble/ppog_reversed_service.c b/src/bluetooth-fw/nimble/ppog_reversed_service.c index 6462a7fa9c..b5a25dc553 100644 --- a/src/bluetooth-fw/nimble/ppog_reversed_service.c +++ b/src/bluetooth-fw/nimble/ppog_reversed_service.c @@ -44,7 +44,7 @@ static int prv_access_data_write(uint16_t conn_handle, uint16_t attr_handle, uint16_t out_len = 0; int rc = ble_hs_mbuf_to_flat(ctxt->om, buf, pkt_len, &out_len); if (rc != 0) { - PBL_LOG_ERR("Reversed PPoG write flatten failed: 0x%04x", (uint16_t) rc); + PBL_LOG_ERR("Reversed PPoG write flatten failed: 0x%04x", (uint16_t)rc); kernel_free(buf); return BLE_ATT_ERR_UNLIKELY; } @@ -131,8 +131,7 @@ void ppog_reversed_service_init(void) { PBL_ASSERTN(rc == 0 || rc == BLE_HS_EALREADY); } -BTErrno bt_driver_ppog_reversed_notify(uint16_t conn_handle, - const uint8_t *buf, uint16_t len) { +BTErrno bt_driver_ppog_reversed_notify(uint16_t conn_handle, const uint8_t *buf, uint16_t len) { struct os_mbuf *om = ble_hs_mbuf_from_flat(buf, len); if (!om) { return BTErrnoNotEnoughResources; @@ -147,7 +146,7 @@ BTErrno bt_driver_ppog_reversed_notify(uint16_t conn_handle, case BLE_HS_ENOTCONN: return BTErrnoInvalidState; default: - PBL_LOG_ERR("ble_gatts_notify_custom failed: 0x%04x", (uint16_t) rc); + PBL_LOG_ERR("ble_gatts_notify_custom failed: 0x%04x", (uint16_t)rc); return (BTErrno)(BTErrnoInternalErrorBegin + rc); } } diff --git a/src/bluetooth-fw/nimble/responsiveness.c b/src/bluetooth-fw/nimble/responsiveness.c index 1b8b8968ab..c42a15017d 100644 --- a/src/bluetooth-fw/nimble/responsiveness.c +++ b/src/bluetooth-fw/nimble/responsiveness.c @@ -26,10 +26,11 @@ bool bt_driver_le_connection_parameter_update(const BTDeviceInternal *addr, pebble_conn_update_to_nimble(req, ¶ms); - PBL_LOG_DBG("Request connection parameters: " - "interval=(%u, %u) ms, latency=%u, spvn timeout=%u ms", - params.itvl_min * BLE_HCI_CONN_ITVL / 1000, params.itvl_max * BLE_HCI_CONN_ITVL / 1000, - params.latency, params.supervision_timeout * BLE_HCI_CONN_SPVN_TMO_UNITS); + PBL_LOG_DBG( + "Request connection parameters: " + "interval=(%u, %u) ms, latency=%u, spvn timeout=%u ms", + params.itvl_min * BLE_HCI_CONN_ITVL / 1000, params.itvl_max * BLE_HCI_CONN_ITVL / 1000, + params.latency, params.supervision_timeout * BLE_HCI_CONN_SPVN_TMO_UNITS); rc = ble_gap_update_params(desc.conn_handle, ¶ms); if (rc != 0) { diff --git a/src/bluetooth-fw/qemu/comm.c b/src/bluetooth-fw/qemu/comm.c index 96b4dde827..664a3fd7b9 100644 --- a/src/bluetooth-fw/qemu/comm.c +++ b/src/bluetooth-fw/qemu/comm.c @@ -13,7 +13,7 @@ static void prv_send_job(void *data) { bool bt_driver_comm_schedule_send_next_job(CommSession *session) { launcher_task_add_callback(prv_send_job, session); - return true; // we croak if a task cannot be scheduled on KernelMain + return true; // we croak if a task cannot be scheduled on KernelMain } bool bt_driver_comm_is_current_task_send_next_task(void) { diff --git a/src/bluetooth-fw/qemu/gap_le_device_name.c b/src/bluetooth-fw/qemu/gap_le_device_name.c index 10fe01496c..536c5c028b 100644 --- a/src/bluetooth-fw/qemu/gap_le_device_name.c +++ b/src/bluetooth-fw/qemu/gap_le_device_name.c @@ -8,4 +8,3 @@ void bt_driver_gap_le_device_name_request(const BTDeviceInternal *connection) { void bt_driver_gap_le_device_name_request_all(void) { } - diff --git a/src/bluetooth-fw/qemu/gap_le_scan.c b/src/bluetooth-fw/qemu/gap_le_scan.c index b4e35c7138..c2069b6350 100644 --- a/src/bluetooth-fw/qemu/gap_le_scan.c +++ b/src/bluetooth-fw/qemu/gap_le_scan.c @@ -4,11 +4,10 @@ #include "bluetooth/gap_le_scan.h" bool bt_driver_start_le_scan(bool active_scan, bool use_white_list_filter, bool filter_dups, - uint16_t scan_interval_ms, uint16_t scan_window_ms) { + uint16_t scan_interval_ms, uint16_t scan_window_ms) { return true; } - bool bt_driver_stop_le_scan(void) { return true; } diff --git a/src/bluetooth-fw/qemu/gatt_client_discovery.c b/src/bluetooth-fw/qemu/gatt_client_discovery.c index 919c08db59..27cf23bfd4 100644 --- a/src/bluetooth-fw/qemu/gatt_client_discovery.c +++ b/src/bluetooth-fw/qemu/gatt_client_discovery.c @@ -7,8 +7,8 @@ // ------------------------------------------------------------------------------------------------- // Gatt Client Discovery API calls -BTErrno bt_driver_gatt_start_discovery_range( - const GAPLEConnection *connection, const ATTHandleRange *data) { +BTErrno bt_driver_gatt_start_discovery_range(const GAPLEConnection *connection, + const ATTHandleRange *data) { return 0; } diff --git a/src/bluetooth-fw/qemu/gatt_client_operations.c b/src/bluetooth-fw/qemu/gatt_client_operations.c index bae0fb7602..1c2bee090d 100644 --- a/src/bluetooth-fw/qemu/gatt_client_operations.c +++ b/src/bluetooth-fw/qemu/gatt_client_operations.c @@ -4,24 +4,17 @@ #include #include -BTErrno bt_driver_gatt_write_without_response(GAPLEConnection *connection, - const uint8_t *value, - size_t value_length, - uint16_t att_handle) { +BTErrno bt_driver_gatt_write_without_response(GAPLEConnection *connection, const uint8_t *value, + size_t value_length, uint16_t att_handle) { return 0; } -BTErrno bt_driver_gatt_write(GAPLEConnection *connection, - const uint8_t *value, - size_t value_length, - uint16_t att_handle, - void *context) { +BTErrno bt_driver_gatt_write(GAPLEConnection *connection, const uint8_t *value, size_t value_length, + uint16_t att_handle, void *context) { return 0; } -BTErrno bt_driver_gatt_read(GAPLEConnection *connection, - uint16_t att_handle, - void *context) { +BTErrno bt_driver_gatt_read(GAPLEConnection *connection, uint16_t att_handle, void *context) { return 0; } diff --git a/src/bluetooth-fw/qemu/id.c b/src/bluetooth-fw/qemu/id.c index c591bf0b0b..a1df810c79 100644 --- a/src/bluetooth-fw/qemu/id.c +++ b/src/bluetooth-fw/qemu/id.c @@ -13,8 +13,7 @@ void bt_driver_id_copy_local_identity_address(BTDeviceAddress *addr_out) { memset(addr_out, 0xAA, sizeof(*addr_out)); } -void bt_driver_set_local_address(bool allow_cycling, - const BTDeviceAddress *pinned_address) { +void bt_driver_set_local_address(bool allow_cycling, const BTDeviceAddress *pinned_address) { } void bt_driver_id_copy_chip_info_string(char *dest, size_t dest_size) { @@ -22,6 +21,6 @@ void bt_driver_id_copy_chip_info_string(char *dest, size_t dest_size) { } bool bt_driver_id_generate_private_resolvable_address(BTDeviceAddress *address_out) { - *address_out = (BTDeviceAddress) {}; + *address_out = (BTDeviceAddress){}; return true; } diff --git a/src/bluetooth-fw/qemu/pairing_confirm.c b/src/bluetooth-fw/qemu/pairing_confirm.c index a85b2508b4..7366a8349f 100644 --- a/src/bluetooth-fw/qemu/pairing_confirm.c +++ b/src/bluetooth-fw/qemu/pairing_confirm.c @@ -3,6 +3,5 @@ #include -void bt_driver_pairing_confirm(const PairingUserConfirmationCtx *ctx, - bool is_confirmed) { +void bt_driver_pairing_confirm(const PairingUserConfirmationCtx *ctx, bool is_confirmed) { } diff --git a/src/bluetooth-fw/qemu/qemu_transport.c b/src/bluetooth-fw/qemu/qemu_transport.c index f5fc086aea..02a456039c 100644 --- a/src/bluetooth-fw/qemu/qemu_transport.c +++ b/src/bluetooth-fw/qemu/qemu_transport.c @@ -66,17 +66,17 @@ static void prv_granted_kernel_main_cb(void *ctx) { granted_handler(); } -static void prv_set_connection_responsiveness( - Transport *transport, BtConsumer consumer, ResponseTimeState state, uint16_t max_period_secs, - ResponsivenessGrantedHandler granted_handler) { +static void prv_set_connection_responsiveness(Transport *transport, BtConsumer consumer, + ResponseTimeState state, uint16_t max_period_secs, + ResponsivenessGrantedHandler granted_handler) { // PutBytes calls this every single packet — at INFO it pushes ~76 bytes/packet // into the 1200-byte advanced_logging ring buffer, which fills in ~16 packets // and forces inline flash-logging flushes on KernelMain. That starves // SystemTask's PutBytes callback (it's competing for s_flash_write_mutex) and // wedges the install with no watchdog reboot. CLAUDE.md is explicit that // high-frequency paths must not log at INFO; this is one of them. - PBL_LOG_DBG("Consumer %d: requesting change to %d for %" PRIu16 "seconds", - consumer, state, max_period_secs); + PBL_LOG_DBG("Consumer %d: requesting change to %d for %" PRIu16 "seconds", consumer, state, + max_period_secs); // it's qemu, our request to bump the speed is always granted! if (granted_handler) { @@ -91,17 +91,16 @@ static CommSessionTransportType prv_get_type(struct Transport *transport) { //! Copy of the same function in session.c static void prv_put_comm_session_event(bool is_open, bool is_system) { PebbleEvent event = { - .type = PEBBLE_COMM_SESSION_EVENT, - .bluetooth.comm_session_event.is_open = is_open, - .bluetooth.comm_session_event - .is_system = is_system, + .type = PEBBLE_COMM_SESSION_EVENT, + .bluetooth.comm_session_event.is_open = is_open, + .bluetooth.comm_session_event.is_system = is_system, }; event_put(&event); } //! Defined in session.c -extern void comm_session_set_capabilities( - CommSession *session, CommSessionCapability capability_flags); +extern void comm_session_set_capabilities(CommSession *session, + CommSessionCapability capability_flags); // ----------------------------------------------------------------------------------------- void qemu_transport_set_connected(bool is_connected) { @@ -114,40 +113,38 @@ void qemu_transport_set_connected(bool is_connected) { } static const TransportImplementation s_qemu_transport_implementation = { - .send_next = prv_send_next, - .reset = prv_reset, - .set_connection_responsiveness = prv_set_connection_responsiveness, - .get_type = prv_get_type, + .send_next = prv_send_next, + .reset = prv_reset, + .set_connection_responsiveness = prv_set_connection_responsiveness, + .get_type = prv_get_type, }; bool send_event = true; if (is_connected && !s_transport.session) { PBL_LOG_DBG("Opening new QemuTransport CommSession"); - s_transport.session = comm_session_open((Transport *) &s_transport, - &s_qemu_transport_implementation, - TransportDestinationHybrid); + s_transport.session = comm_session_open( + (Transport *)&s_transport, &s_qemu_transport_implementation, TransportDestinationHybrid); if (!s_transport.session) { PBL_LOG_ERR("CommSession couldn't be opened"); send_event = false; } // Give it the appropriate capabilities - const CommSessionCapability capabilities = CommSessionRunState | - CommSessionInfiniteLogDumping | + const CommSessionCapability capabilities = CommSessionRunState | CommSessionInfiniteLogDumping | CommSessionVoiceApiSupport | CommSessionAppMessage8kSupport; comm_session_set_capabilities(s_transport.session, capabilities); if (send_event) { PebbleEvent e = { - .type = PEBBLE_BT_CONNECTION_EVENT, - .bluetooth = { - .connection = { - .state = (s_transport.session) ? PebbleBluetoothConnectionEventStateConnected - : PebbleBluetoothConnectionEventStateDisconnected + .type = PEBBLE_BT_CONNECTION_EVENT, + .bluetooth = { + .connection = { + .state = (s_transport.session) ? PebbleBluetoothConnectionEventStateConnected + : PebbleBluetoothConnectionEventStateDisconnected + } } - } }; event_put(&e); } @@ -156,7 +153,8 @@ void qemu_transport_set_connected(bool is_connected) { } if (s_emulated_session_connected != is_connected) { - PBL_LOG_DBG("Toggling emulated session connection state --> %s", is_connected ? "connecting" : "disconnecting"); + PBL_LOG_DBG("Toggling emulated session connection state --> %s", + is_connected ? "connecting" : "disconnecting"); // Only send PEBBLE_COMM_SESSION_EVENT without opening or terminating a session // Apps will get notified in both case but the rest of the firmware will still @@ -171,7 +169,8 @@ void qemu_transport_set_connected(bool is_connected) { } void qemu_transport_close_session() { - if (!s_transport.session) return; + if (!s_transport.session) + return; bt_lock(); @@ -179,12 +178,8 @@ void qemu_transport_close_session() { s_transport.session = NULL; PebbleEvent e = { - .type = PEBBLE_BT_CONNECTION_EVENT, - .bluetooth = { - .connection = { - .state = PebbleBluetoothConnectionEventStateDisconnected - } - } + .type = PEBBLE_BT_CONNECTION_EVENT, + .bluetooth = {.connection = {.state = PebbleBluetoothConnectionEventStateDisconnected}} }; event_put(&e); diff --git a/src/bluetooth-fw/qemu/responsiveness.c b/src/bluetooth-fw/qemu/responsiveness.c index dbeeb9042f..cf3b6196a7 100644 --- a/src/bluetooth-fw/qemu/responsiveness.c +++ b/src/bluetooth-fw/qemu/responsiveness.c @@ -3,7 +3,7 @@ #include "bluetooth/responsiveness.h" -bool bt_driver_le_connection_parameter_update( - const BTDeviceInternal *addr, const BleConnectionParamsUpdateReq *req) { +bool bt_driver_le_connection_parameter_update(const BTDeviceInternal *addr, + const BleConnectionParamsUpdateReq *req) { return true; } diff --git a/src/bluetooth-fw/stub/comm.c b/src/bluetooth-fw/stub/comm.c index 96b4dde827..664a3fd7b9 100644 --- a/src/bluetooth-fw/stub/comm.c +++ b/src/bluetooth-fw/stub/comm.c @@ -13,7 +13,7 @@ static void prv_send_job(void *data) { bool bt_driver_comm_schedule_send_next_job(CommSession *session) { launcher_task_add_callback(prv_send_job, session); - return true; // we croak if a task cannot be scheduled on KernelMain + return true; // we croak if a task cannot be scheduled on KernelMain } bool bt_driver_comm_is_current_task_send_next_task(void) { diff --git a/src/bluetooth-fw/stub/gap_le_device_name.c b/src/bluetooth-fw/stub/gap_le_device_name.c index 10fe01496c..536c5c028b 100644 --- a/src/bluetooth-fw/stub/gap_le_device_name.c +++ b/src/bluetooth-fw/stub/gap_le_device_name.c @@ -8,4 +8,3 @@ void bt_driver_gap_le_device_name_request(const BTDeviceInternal *connection) { void bt_driver_gap_le_device_name_request_all(void) { } - diff --git a/src/bluetooth-fw/stub/gap_le_scan.c b/src/bluetooth-fw/stub/gap_le_scan.c index b4e35c7138..c2069b6350 100644 --- a/src/bluetooth-fw/stub/gap_le_scan.c +++ b/src/bluetooth-fw/stub/gap_le_scan.c @@ -4,11 +4,10 @@ #include "bluetooth/gap_le_scan.h" bool bt_driver_start_le_scan(bool active_scan, bool use_white_list_filter, bool filter_dups, - uint16_t scan_interval_ms, uint16_t scan_window_ms) { + uint16_t scan_interval_ms, uint16_t scan_window_ms) { return true; } - bool bt_driver_stop_le_scan(void) { return true; } diff --git a/src/bluetooth-fw/stub/gatt_client_discovery.c b/src/bluetooth-fw/stub/gatt_client_discovery.c index 5b0eb8264b..59fda4e9a2 100644 --- a/src/bluetooth-fw/stub/gatt_client_discovery.c +++ b/src/bluetooth-fw/stub/gatt_client_discovery.c @@ -9,8 +9,8 @@ // ------------------------------------------------------------------------------------------------- // Gatt Client Discovery API calls -BTErrno bt_driver_gatt_start_discovery_range( - const GAPLEConnection *connection, const ATTHandleRange *data) { +BTErrno bt_driver_gatt_start_discovery_range(const GAPLEConnection *connection, + const ATTHandleRange *data) { return 0; } diff --git a/src/bluetooth-fw/stub/gatt_client_operations.c b/src/bluetooth-fw/stub/gatt_client_operations.c index b7294646f0..041a3d293d 100644 --- a/src/bluetooth-fw/stub/gatt_client_operations.c +++ b/src/bluetooth-fw/stub/gatt_client_operations.c @@ -6,24 +6,17 @@ #include -BTErrno bt_driver_gatt_write_without_response(GAPLEConnection *connection, - const uint8_t *value, - size_t value_length, - uint16_t att_handle) { +BTErrno bt_driver_gatt_write_without_response(GAPLEConnection *connection, const uint8_t *value, + size_t value_length, uint16_t att_handle) { return 0; } -BTErrno bt_driver_gatt_write(GAPLEConnection *connection, - const uint8_t *value, - size_t value_length, - uint16_t att_handle, - void *context) { +BTErrno bt_driver_gatt_write(GAPLEConnection *connection, const uint8_t *value, size_t value_length, + uint16_t att_handle, void *context) { return 0; } -BTErrno bt_driver_gatt_read(GAPLEConnection *connection, - uint16_t att_handle, - void *context) { +BTErrno bt_driver_gatt_read(GAPLEConnection *connection, uint16_t att_handle, void *context) { return 0; } diff --git a/src/bluetooth-fw/stub/id.c b/src/bluetooth-fw/stub/id.c index c591bf0b0b..a1df810c79 100644 --- a/src/bluetooth-fw/stub/id.c +++ b/src/bluetooth-fw/stub/id.c @@ -13,8 +13,7 @@ void bt_driver_id_copy_local_identity_address(BTDeviceAddress *addr_out) { memset(addr_out, 0xAA, sizeof(*addr_out)); } -void bt_driver_set_local_address(bool allow_cycling, - const BTDeviceAddress *pinned_address) { +void bt_driver_set_local_address(bool allow_cycling, const BTDeviceAddress *pinned_address) { } void bt_driver_id_copy_chip_info_string(char *dest, size_t dest_size) { @@ -22,6 +21,6 @@ void bt_driver_id_copy_chip_info_string(char *dest, size_t dest_size) { } bool bt_driver_id_generate_private_resolvable_address(BTDeviceAddress *address_out) { - *address_out = (BTDeviceAddress) {}; + *address_out = (BTDeviceAddress){}; return true; } diff --git a/src/bluetooth-fw/stub/pairing_confirm.c b/src/bluetooth-fw/stub/pairing_confirm.c index a85b2508b4..7366a8349f 100644 --- a/src/bluetooth-fw/stub/pairing_confirm.c +++ b/src/bluetooth-fw/stub/pairing_confirm.c @@ -3,6 +3,5 @@ #include -void bt_driver_pairing_confirm(const PairingUserConfirmationCtx *ctx, - bool is_confirmed) { +void bt_driver_pairing_confirm(const PairingUserConfirmationCtx *ctx, bool is_confirmed) { } diff --git a/src/bluetooth-fw/stub/responsiveness.c b/src/bluetooth-fw/stub/responsiveness.c index 7d7c64285f..da44cdd002 100644 --- a/src/bluetooth-fw/stub/responsiveness.c +++ b/src/bluetooth-fw/stub/responsiveness.c @@ -6,7 +6,7 @@ #include -bool bt_driver_le_connection_parameter_update( - const BTDeviceInternal *addr, const BleConnectionParamsUpdateReq *req) { +bool bt_driver_le_connection_parameter_update(const BTDeviceInternal *addr, + const BleConnectionParamsUpdateReq *req) { return true; } diff --git a/src/fw/applib/accel_service.c b/src/fw/applib/accel_service.c index 5c4cda455d..3393ca1ab5 100644 --- a/src/fw/applib/accel_service.c +++ b/src/fw/applib/accel_service.c @@ -28,7 +28,7 @@ static void prv_assert_session_task(void) { // -------------------------------------------------------------------------------------------- // Return the session ref for the given task. This should ONLY be used by 3rd party tasks // (app or worker). -AccelServiceState * accel_service_private_get_session(PebbleTask task) { +AccelServiceState *accel_service_private_get_session(PebbleTask task) { if (task == PebbleTask_Unknown) { task = pebble_task_get_current(); } @@ -85,12 +85,12 @@ static uint32_t prv_do_data_handle_chunk(AccelServiceState *state, uint16_t time (state->prev_timestamp_ms != 0) ? timestamp_ms - state->prev_timestamp_ms : 0; state->prev_timestamp_ms = timestamp_ms; - PBL_LOG_VERBOSE("got %d samples for task %d at %ld (%lu ms delta)", - (int)num_samples, (int)pebble_task_get_current(), (uint32_t)timestamp_ms, - time_since_last_sample); + PBL_LOG_VERBOSE("got %d samples for task %d at %ld (%lu ms delta)", (int)num_samples, + (int)pebble_task_get_current(), (uint32_t)timestamp_ms, time_since_last_sample); - for (unsigned int i=0; i x:%d, y:%d, z:%d", state->raw_data[i].x, state->raw_data[i].y, state->raw_data[i].z); + for (unsigned int i = 0; i < num_samples; i++) { + PBL_LOG_VERBOSE(" => x:%d, y:%d, z:%d", state->raw_data[i].x, state->raw_data[i].y, + state->raw_data[i].z); } if (state->raw_data_handler_deprecated) { @@ -102,12 +102,12 @@ static uint32_t prv_do_data_handle_chunk(AccelServiceState *state, uint16_t time } else { AccelData data[num_samples]; for (uint32_t i = 0; i < num_samples; i++) { - data[i] = (AccelData) { - .x = state->raw_data[i].x, - .y = state->raw_data[i].y, - .z = state->raw_data[i].z, - .timestamp = timestamp_ms, - .did_vibrate = sys_vibe_history_was_vibrating(timestamp_ms) + data[i] = (AccelData){ + .x = state->raw_data[i].x, + .y = state->raw_data[i].y, + .z = state->raw_data[i].z, + .timestamp = timestamp_ms, + .did_vibrate = sys_vibe_history_was_vibrating(timestamp_ms) }; timestamp_ms += time_interval_ms; } @@ -134,8 +134,8 @@ static void prv_do_data_handle(void *context) { return; } - PBL_ASSERTN(state->data_handler != NULL || state->raw_data_handler != NULL - || state->raw_data_handler_deprecated != NULL); + PBL_ASSERTN(state->data_handler != NULL || state->raw_data_handler != NULL || + state->raw_data_handler_deprecated != NULL); uint16_t time_interval_ms = 1000 / state->sampling_rate; @@ -144,45 +144,45 @@ static void prv_do_data_handle(void *context) { do { num_processed = prv_do_data_handle_chunk(state, time_interval_ms); } while (num_processed); - } // ----------------------------------------------------------------------------------------------- int accel_service_set_sampling_rate(AccelSamplingRate rate) { - AccelServiceState * session = accel_service_private_get_session(PebbleTask_Unknown); + AccelServiceState *session = accel_service_private_get_session(PebbleTask_Unknown); return accel_session_set_sampling_rate(session, rate); } // ---------------------------------------------------------------------------------------------- int accel_service_set_samples_per_update(uint32_t samples_per_update) { - AccelServiceState * session = accel_service_private_get_session(PebbleTask_Unknown); + AccelServiceState *session = accel_service_private_get_session(PebbleTask_Unknown); return accel_session_set_samples_per_update(session, samples_per_update); } // ---------------------------------------------------------------------------------------------- static void prv_shared_subscribe(AccelServiceState *state, AccelSamplingRate sampling_rate, uint32_t samples_per_update, PebbleTask handler_task) { - state->manager_state = sys_accel_manager_data_subscribe( - sampling_rate, prv_do_data_handle, state, handler_task); + state->manager_state = + sys_accel_manager_data_subscribe(sampling_rate, prv_do_data_handle, state, handler_task); accel_session_set_samples_per_update((AccelServiceState *)state, samples_per_update); } // ---------------------------------------------------------------------------------------------- void accel_data_service_subscribe(uint32_t samples_per_update, AccelDataHandler handler) { - AccelServiceState * session = accel_service_private_get_session(PebbleTask_Unknown); + AccelServiceState *session = accel_service_private_get_session(PebbleTask_Unknown); accel_session_data_subscribe(session, samples_per_update, handler); } // ---------------------------------------------------------------------------------------------- void accel_raw_data_service_subscribe(uint32_t samples_per_update, AccelRawDataHandler handler) { - AccelServiceState * session = accel_service_private_get_session(PebbleTask_Unknown); + AccelServiceState *session = accel_service_private_get_session(PebbleTask_Unknown); accel_session_raw_data_subscribe(session, ACCEL_SAMPLING_25HZ, samples_per_update, handler); } // ---------------------------------------------------------------------------------------------- -void accel_data_service_subscribe__deprecated(uint32_t samples_per_update, AccelRawDataHandler__deprecated handler) { - AccelServiceState * session = accel_service_private_get_session(PebbleTask_Unknown); +void accel_data_service_subscribe__deprecated(uint32_t samples_per_update, + AccelRawDataHandler__deprecated handler) { + AccelServiceState *session = accel_service_private_get_session(PebbleTask_Unknown); AccelServiceState *state = (AccelServiceState *)session; state->raw_data_handler_deprecated = handler; @@ -194,31 +194,31 @@ void accel_data_service_subscribe__deprecated(uint32_t samples_per_update, Accel // ---------------------------------------------------------------------------------------------- void accel_data_service_unsubscribe(void) { - AccelServiceState * session = accel_service_private_get_session(PebbleTask_Unknown); + AccelServiceState *session = accel_service_private_get_session(PebbleTask_Unknown); accel_session_data_unsubscribe(session); } // ---------------------------------------------------------------------------------------------- void accel_tap_service_subscribe(AccelTapHandler handler) { - AccelServiceState * session = accel_service_private_get_session(PebbleTask_Unknown); + AccelServiceState *session = accel_service_private_get_session(PebbleTask_Unknown); accel_session_shake_subscribe(session, handler); } // ---------------------------------------------------------------------------------------------- void accel_tap_service_unsubscribe(void) { - AccelServiceState * session = accel_service_private_get_session(PebbleTask_Unknown); + AccelServiceState *session = accel_service_private_get_session(PebbleTask_Unknown); accel_session_shake_unsubscribe(session); } // ---------------------------------------------------------------------------------------------- void accel_double_tap_service_subscribe(AccelTapHandler handler) { - AccelServiceState * session = accel_service_private_get_session(PebbleTask_Unknown); + AccelServiceState *session = accel_service_private_get_session(PebbleTask_Unknown); accel_session_double_tap_subscribe(session, handler); } // ---------------------------------------------------------------------------------------------- void accel_double_tap_service_unsubscribe(void) { - AccelServiceState * session = accel_service_private_get_session(PebbleTask_Unknown); + AccelServiceState *session = accel_service_private_get_session(PebbleTask_Unknown); accel_session_double_tap_unsubscribe(session); } @@ -240,16 +240,17 @@ int accel_service_peek(AccelData *accel_data) { // ---------------------------------------------------------------------------------------------- void accel_service_state_init(AccelServiceState *state) { - *state = (AccelServiceState) { - .sampling_rate = ACCEL_DEFAULT_SAMPLING_RATE, - .accel_shake_info = { - .type = PEBBLE_ACCEL_SHAKE_EVENT, - .handler = &prv_do_shake_handle, - }, - .accel_double_tap_info = { - .type = PEBBLE_ACCEL_DOUBLE_TAP_EVENT, - .handler = &prv_do_double_tap_handle, - } + *state = (AccelServiceState){ + .sampling_rate = ACCEL_DEFAULT_SAMPLING_RATE, + .accel_shake_info = + { + .type = PEBBLE_ACCEL_SHAKE_EVENT, + .handler = &prv_do_shake_handle, + }, + .accel_double_tap_info = { + .type = PEBBLE_ACCEL_DOUBLE_TAP_EVENT, + .handler = &prv_do_double_tap_handle, + } }; } @@ -272,28 +273,29 @@ static void prv_session_do_double_tap_handle(PebbleEvent *e, void *context) { } // ----------------------------------------------------------------------------------------------- -AccelServiceState * accel_session_create(void) { +AccelServiceState *accel_session_create(void) { prv_assert_session_task(); AccelServiceState *state = kernel_malloc_check(sizeof(AccelServiceState)); - *state = (AccelServiceState) { - .sampling_rate = ACCEL_DEFAULT_SAMPLING_RATE, - .accel_shake_info = { - .type = PEBBLE_ACCEL_SHAKE_EVENT, - .handler = &prv_session_do_shake_handle, - .context = state, - }, - .accel_double_tap_info = { - .type = PEBBLE_ACCEL_DOUBLE_TAP_EVENT, - .handler = &prv_session_do_double_tap_handle, - .context = state, - }, + *state = (AccelServiceState){ + .sampling_rate = ACCEL_DEFAULT_SAMPLING_RATE, + .accel_shake_info = + { + .type = PEBBLE_ACCEL_SHAKE_EVENT, + .handler = &prv_session_do_shake_handle, + .context = state, + }, + .accel_double_tap_info = { + .type = PEBBLE_ACCEL_DOUBLE_TAP_EVENT, + .handler = &prv_session_do_double_tap_handle, + .context = state, + }, }; return state; } // ----------------------------------------------------------------------------------------------- -void accel_session_delete(AccelServiceState * session) { +void accel_session_delete(AccelServiceState *session) { prv_assert_session_task(); // we better have unsubscribed at this point @@ -307,7 +309,7 @@ void accel_session_delete(AccelServiceState * session) { } // ---------------------------------------------------------------------------------------------- -void accel_session_shake_subscribe(AccelServiceState * session, AccelTapHandler handler) { +void accel_session_shake_subscribe(AccelServiceState *session, AccelTapHandler handler) { AccelServiceState *state = (AccelServiceState *)session; state->shake_handler = handler; event_service_client_subscribe(&state->accel_shake_info); @@ -342,9 +344,8 @@ void accel_session_data_subscribe(AccelServiceState *state, uint32_t samples_per } // ----------------------------------------------------------------------------------------------- -void accel_session_raw_data_subscribe( - AccelServiceState *state, AccelSamplingRate sampling_rate, uint32_t samples_per_update, - AccelRawDataHandler handler) { +void accel_session_raw_data_subscribe(AccelServiceState *state, AccelSamplingRate sampling_rate, + uint32_t samples_per_update, AccelRawDataHandler handler) { state->raw_data_handler = handler; state->raw_data_handler_deprecated = NULL; state->data_handler = NULL; @@ -373,8 +374,8 @@ void accel_session_data_unsubscribe(AccelServiceState *state) { // ----------------------------------------------------------------------------------------------- int accel_session_set_sampling_rate(AccelServiceState *state, AccelSamplingRate rate) { - if (!state->manager_state || (!state->data_handler && !state->raw_data_handler - && !state->raw_data_handler_deprecated)) { + if (!state->manager_state || + (!state->data_handler && !state->raw_data_handler && !state->raw_data_handler_deprecated)) { return -1; } state->sampling_rate = rate; @@ -383,16 +384,14 @@ int accel_session_set_sampling_rate(AccelServiceState *state, AccelSamplingRate // ----------------------------------------------------------------------------------------------- int accel_session_set_samples_per_update(AccelServiceState *state, uint32_t samples_per_update) { - uint32_t max_samples_per_update = sys_accel_manager_get_max_samples_per_update(); if (samples_per_update > max_samples_per_update) { APP_LOG(LOG_LEVEL_WARNING, "%d samples per update requested, max is %d", (int)samples_per_update, (int)max_samples_per_update); samples_per_update = max_samples_per_update; } - if (!state->manager_state - || (samples_per_update > 0 && !state->data_handler && !state->raw_data_handler - && !state->raw_data_handler_deprecated)) { + if (!state->manager_state || (samples_per_update > 0 && !state->data_handler && + !state->raw_data_handler && !state->raw_data_handler_deprecated)) { return -1; } AccelRawData *old_buf = state->raw_data; diff --git a/src/fw/applib/accel_service.h b/src/fw/applib/accel_service.h index c968a4dd2c..3fe4364dcb 100644 --- a/src/fw/applib/accel_service.h +++ b/src/fw/applib/accel_service.h @@ -41,12 +41,9 @@ typedef enum { // Make sure the AccelAxisType enum is compatible with the unified // IMUCoordinateAxis enum. -_Static_assert(ACCEL_AXIS_X == (int)AXIS_X, - "AccelAxisType incompatible with IMUCoordinateAxis"); -_Static_assert(ACCEL_AXIS_Y == (int)AXIS_Y, - "AccelAxisType incompatible with IMUCoordinateAxis"); -_Static_assert(ACCEL_AXIS_Z == (int)AXIS_Z, - "AccelAxisType incompatible with IMUCoordinateAxis"); +_Static_assert(ACCEL_AXIS_X == (int)AXIS_X, "AccelAxisType incompatible with IMUCoordinateAxis"); +_Static_assert(ACCEL_AXIS_Y == (int)AXIS_Y, "AccelAxisType incompatible with IMUCoordinateAxis"); +_Static_assert(ACCEL_AXIS_Z == (int)AXIS_Z, "AccelAxisType incompatible with IMUCoordinateAxis"); #define ACCEL_DEFAULT_SAMPLING_RATE ACCEL_SAMPLING_25HZ #define ACCEL_MINIMUM_SAMPLING_RATE ACCEL_SAMPLING_10HZ @@ -124,11 +121,11 @@ int accel_service_peek(AccelData *data); //! @} // end addtogroup EventService //! @} // end addtogroup Foundation - //! @internal typedef void (*AccelRawDataHandler__deprecated)(AccelRawData *data, uint32_t num_samples); //! @internal //! This is used to stay in the jump table where the old accel_data_service_subscribe was located. //! Allows operation on AccelRawData data, which is the same as the previous version of AccelData. -void accel_data_service_subscribe__deprecated(uint32_t samples_per_update, AccelRawDataHandler__deprecated handler); +void accel_data_service_subscribe__deprecated(uint32_t samples_per_update, + AccelRawDataHandler__deprecated handler); diff --git a/src/fw/applib/accel_service_private.h b/src/fw/applib/accel_service_private.h index d6f8fae918..e0ef75056e 100644 --- a/src/fw/applib/accel_service_private.h +++ b/src/fw/applib/accel_service_private.h @@ -12,9 +12,9 @@ typedef struct AccelServiceState { // Configuration for our data callback subscription to the accel manager AccelManagerState *manager_state; AccelSamplingRate sampling_rate; - bool deferred_free; - uint16_t samples_per_update; - AccelRawData *raw_data; // of size samples_per_update + bool deferred_free; + uint16_t samples_per_update; + AccelRawData *raw_data; // of size samples_per_update // User-provided callbacks for various events AccelDataHandler data_handler; @@ -33,7 +33,7 @@ typedef struct AccelServiceState { //! Initialize an existing state object void accel_service_state_init(AccelServiceState *state); -AccelServiceState* accel_service_private_get_session(PebbleTask task); +AccelServiceState *accel_service_private_get_session(PebbleTask task); void accel_service_cleanup_task_session(PebbleTask task); @@ -44,7 +44,7 @@ void accel_service_cleanup_task_session(PebbleTask task); //! AccelServiceState given the current task_id (app or worker) and then called into the respective //! accel_session_.* call. //! @return A non-zero session upon success, NULL if error -AccelServiceState* accel_session_create(void); +AccelServiceState *accel_session_create(void); //! Delete an accel session created by accel_session_create. Used by kernel clients only. //! @param session An Accel session created by accel_session_create() @@ -87,9 +87,8 @@ void accel_session_data_subscribe(AccelServiceState *session, uint32_t samples_p //! @param samples_per_update the number of samples to buffer, between 0 and 25. //! @param handler A callback to be executed on accelerometer data events. The callback will //! execute on the current task calling this function. -void accel_session_raw_data_subscribe( - AccelServiceState *session, AccelSamplingRate sampling_rate, uint32_t samples_per_update, - AccelRawDataHandler handler); +void accel_session_raw_data_subscribe(AccelServiceState *session, AccelSamplingRate sampling_rate, + uint32_t samples_per_update, AccelRawDataHandler handler); //! Unsubscribe from the accelerometer data event service. Used by kernel clients //! only. diff --git a/src/fw/applib/app.c b/src/fw/applib/app.c index 0a65813b49..de7e9be448 100644 --- a/src/fw/applib/app.c +++ b/src/fw/applib/app.c @@ -31,7 +31,7 @@ static void prv_render_app(void) { *app_state_get_framebuffer_render_pending() = true; PebbleEvent event = { - .type = PEBBLE_RENDER_READY_EVENT, + .type = PEBBLE_RENDER_READY_EVENT, }; sys_send_pebble_event_to_kernel(&event); } @@ -65,20 +65,21 @@ void app_request_render(void) { //! Tasks that have to be done in between each event. static NOINLINE void event_loop_upkeep(void) { - - // Check to see if the most recent event caused us to pop our final window. If that's the case, we need to - // kill ourselves. + // Check to see if the most recent event caused us to pop our final window. If that's the case, we + // need to kill ourselves. if (app_window_stack_count() == 0) { PBL_LOG_DBG("No more windows, killing current app"); - PebbleEvent event = { .type = PEBBLE_PROCESS_KILL_EVENT, .kill = { .gracefully = true, .task=PebbleTask_App } }; + PebbleEvent event = { + .type = PEBBLE_PROCESS_KILL_EVENT, + .kill = {.gracefully = true, .task = PebbleTask_App} + }; sys_send_pebble_event_to_kernel(&event); return; } // Check to see if handling the previous event requires us to rerender ourselves. - if (prv_app_is_render_scheduled() && - !*app_state_get_framebuffer_render_pending()) { + if (prv_app_is_render_scheduled() && !*app_state_get_framebuffer_render_pending()) { prv_render_app(); } } @@ -133,8 +134,7 @@ static void prv_legacy2_status_bar_handler(PebbleEvent *e, void *context) { // only force render if we're not fullscreen if (!window->is_fullscreen) { // a little logic to only force update when the minute changes - ApplibInternalEventsInfo *events_info = - app_state_get_applib_internal_events_info(); + ApplibInternalEventsInfo *events_info = app_state_get_applib_internal_events_info(); struct tm currtime; sys_localtime_r(&e->clock_tick.tick_time, &currtime); const int minute_of_day = (currtime.tm_hour * 60) + currtime.tm_min; @@ -148,16 +148,14 @@ static void prv_legacy2_status_bar_handler(PebbleEvent *e, void *context) { static void prv_legacy2_status_bar_timer_subscribe(void) { // we only need this tick event if we are a legacy2 app if (process_manager_compiled_with_legacy2_sdk()) { - ApplibInternalEventsInfo *events_info = - app_state_get_applib_internal_events_info(); + ApplibInternalEventsInfo *events_info = app_state_get_applib_internal_events_info(); // Initialize the state for the status bar handler. events_info->minute_of_last_legacy2_statusbar_change = -1; - events_info->legacy2_status_bar_change_event = (EventServiceInfo) { - .type = PEBBLE_TICK_EVENT, - .handler = prv_legacy2_status_bar_handler, + events_info->legacy2_status_bar_change_event = (EventServiceInfo){ + .type = PEBBLE_TICK_EVENT, + .handler = prv_legacy2_status_bar_handler, }; - event_service_client_subscribe( - &events_info->legacy2_status_bar_change_event); + event_service_client_subscribe(&events_info->legacy2_status_bar_change_event); } // NOTE: We could be super fancy and register and unregister when the fullscreen // status changes, but it's probably not worth it as we'll be waking up once a @@ -167,10 +165,8 @@ static void prv_legacy2_status_bar_timer_subscribe(void) { static void prv_legacy2_status_bar_timer_unsubscribe(void) { // we should only unsubscribe if we subscribed in the first place if (process_manager_compiled_with_legacy2_sdk()) { - ApplibInternalEventsInfo *events_info = - app_state_get_applib_internal_events_info(); - event_service_client_unsubscribe( - &events_info->legacy2_status_bar_change_event); + ApplibInternalEventsInfo *events_info = app_state_get_applib_internal_events_info(); + event_service_client_unsubscribe(&events_info->legacy2_status_bar_change_event); } } @@ -179,12 +175,11 @@ static void prv_app_callback_handler(PebbleEvent *e) { } static NOINLINE void prv_handle_deinit_event(void) { - ApplibInternalEventsInfo *events_info = - app_state_get_applib_internal_events_info(); + ApplibInternalEventsInfo *events_info = app_state_get_applib_internal_events_info(); event_service_client_unsubscribe(&events_info->will_focus_event); event_service_client_unsubscribe(&events_info->button_down_event); event_service_client_unsubscribe(&events_info->button_up_event); - prv_legacy2_status_bar_timer_unsubscribe(); // a no-op on sdk3+ applications + prv_legacy2_status_bar_timer_unsubscribe(); // a no-op on sdk3+ applications WindowStack *app_window_stack = app_state_get_window_stack(); window_stack_lock_push(app_window_stack); window_stack_pop_all(app_window_stack, false); @@ -213,24 +208,23 @@ void app_event_loop_common(void) { // Register our event handlers before we do anything else. Registering for an event requires // an event being sent to the kernel and therefore should be done before any other events are // generated by us to ensure we don't miss out on anything. - ApplibInternalEventsInfo *events_info = - app_state_get_applib_internal_events_info(); - events_info->will_focus_event = (EventServiceInfo) { - .type = PEBBLE_APP_WILL_CHANGE_FOCUS_EVENT, - .handler = prv_app_will_focus_handler, + ApplibInternalEventsInfo *events_info = app_state_get_applib_internal_events_info(); + events_info->will_focus_event = (EventServiceInfo){ + .type = PEBBLE_APP_WILL_CHANGE_FOCUS_EVENT, + .handler = prv_app_will_focus_handler, }; - events_info->button_down_event = (EventServiceInfo) { - .type = PEBBLE_BUTTON_DOWN_EVENT, - .handler = prv_app_button_down_handler, + events_info->button_down_event = (EventServiceInfo){ + .type = PEBBLE_BUTTON_DOWN_EVENT, + .handler = prv_app_button_down_handler, }; - events_info->button_up_event = (EventServiceInfo) { - .type = PEBBLE_BUTTON_UP_EVENT, - .handler = prv_app_button_up_handler, + events_info->button_up_event = (EventServiceInfo){ + .type = PEBBLE_BUTTON_UP_EVENT, + .handler = prv_app_button_up_handler, }; event_service_client_subscribe(&events_info->will_focus_event); event_service_client_subscribe(&events_info->button_down_event); event_service_client_subscribe(&events_info->button_up_event); - prv_legacy2_status_bar_timer_subscribe(); // a no-op on sdk3+ applications + prv_legacy2_status_bar_timer_subscribe(); // a no-op on sdk3+ applications event_loop_upkeep(); diff --git a/src/fw/applib/app_comm.c b/src/fw/applib/app_comm.c index 2f02fb1441..8d8ed147ae 100644 --- a/src/fw/applib/app_comm.c +++ b/src/fw/applib/app_comm.c @@ -12,4 +12,3 @@ void app_comm_set_sniff_interval(const SniffInterval interval) { SniffInterval app_comm_get_sniff_interval(void) { return sys_app_comm_get_sniff_interval(); } - diff --git a/src/fw/applib/app_exit_reason.h b/src/fw/applib/app_exit_reason.h index b2ec861a05..f33dcb333a 100644 --- a/src/fw/applib/app_exit_reason.h +++ b/src/fw/applib/app_exit_reason.h @@ -21,10 +21,10 @@ //! New exit reasons may be added in the future. As a best practice, it is recommended to only //! handle the cases needed, rather than trying to handle all possible exit reasons. typedef enum AppExitReason { - APP_EXIT_NOT_SPECIFIED = 0, //!< Exit reason not specified - APP_EXIT_ACTION_PERFORMED_SUCCESSFULLY, //!< Application performed an action when it exited + APP_EXIT_NOT_SPECIFIED = 0, //!< Exit reason not specified + APP_EXIT_ACTION_PERFORMED_SUCCESSFULLY, //!< Application performed an action when it exited - NUM_EXIT_REASONS //!< Number of AppExitReason options + NUM_EXIT_REASONS //!< Number of AppExitReason options } AppExitReason; //! Returns the current app exit reason. diff --git a/src/fw/applib/app_focus_service.c b/src/fw/applib/app_focus_service.c index 47a41f2634..7449c17e89 100644 --- a/src/fw/applib/app_focus_service.c +++ b/src/fw/applib/app_focus_service.c @@ -9,11 +9,9 @@ static void prv_focus_event_handler(PebbleEvent *e, void *context) { AppFocusState *state = app_state_get_app_focus_state(); bool in_focus = e->app_focus.in_focus; - if (e->type == PEBBLE_APP_WILL_CHANGE_FOCUS_EVENT && - state->handlers.will_focus) { + if (e->type == PEBBLE_APP_WILL_CHANGE_FOCUS_EVENT && state->handlers.will_focus) { state->handlers.will_focus(in_focus); - } else if (e->type == PEBBLE_APP_DID_CHANGE_FOCUS_EVENT && - state->handlers.did_focus) { + } else if (e->type == PEBBLE_APP_DID_CHANGE_FOCUS_EVENT && state->handlers.did_focus) { state->handlers.did_focus(in_focus); } } @@ -42,7 +40,7 @@ void app_focus_service_subscribe_handlers(AppFocusHandlers handlers) { } void app_focus_service_subscribe(AppFocusHandler handler) { - AppFocusHandlers handlers = (AppFocusHandlers) { .will_focus = handler }; + AppFocusHandlers handlers = (AppFocusHandlers){.will_focus = handler}; app_focus_service_subscribe_handlers(handlers); } @@ -54,5 +52,5 @@ void app_focus_service_unsubscribe(void) { if (state->handlers.did_focus) { event_service_client_unsubscribe(&state->did_focus_info); } - state->handlers = (AppFocusHandlers) {}; + state->handlers = (AppFocusHandlers){}; } diff --git a/src/fw/applib/app_glance.c b/src/fw/applib/app_glance.c index 456c9958b0..d1765967c0 100644 --- a/src/fw/applib/app_glance.c +++ b/src/fw/applib/app_glance.c @@ -38,11 +38,11 @@ AppGlanceResult app_glance_add_slice(AppGlanceReloadSession *session, AppGlanceS if (slice.layout.icon != APP_GLANCE_SLICE_DEFAULT_ICON) { Uuid app_uuid; sys_get_app_uuid(&app_uuid); - const TimelineResourceInfo timeline_resource_info = (TimelineResourceInfo) { - .app_id = &app_uuid, - .res_id = (TimelineResourceId)slice.layout.icon, + const TimelineResourceInfo timeline_resource_info = (TimelineResourceInfo){ + .app_id = &app_uuid, + .res_id = (TimelineResourceId)slice.layout.icon, }; - AppResourceInfo app_resource_info = (AppResourceInfo) {}; + AppResourceInfo app_resource_info = (AppResourceInfo){}; sys_timeline_resources_get_id(&timeline_resource_info, LAUNCHER_APP_GLANCE_GENERIC_ICON_SIZE_TYPE, &app_resource_info); if (app_resource_info.res_id == RESOURCE_ID_INVALID) { @@ -54,16 +54,16 @@ AppGlanceResult app_glance_add_slice(AppGlanceReloadSession *session, AppGlanceS // Plus one for the null terminator, then plus one more to become too long const size_t template_string_too_long_size = ATTRIBUTE_APP_GLANCE_SUBTITLE_MAX_LEN + 1 + 1; if (slice.layout.subtitle_template_string && - strnlen(slice.layout.subtitle_template_string, - template_string_too_long_size) == template_string_too_long_size) { + strnlen(slice.layout.subtitle_template_string, template_string_too_long_size) == + template_string_too_long_size) { result |= APP_GLANCE_RESULT_TEMPLATE_STRING_TOO_LONG; } // Check if the provided subtitle string is a valid template string, if it's present. const time_t current_time = sys_get_time(); if (slice.layout.subtitle_template_string) { - const TemplateStringVars template_string_vars = (TemplateStringVars) { - .current_time = current_time, + const TemplateStringVars template_string_vars = (TemplateStringVars){ + .current_time = current_time, }; TemplateStringError template_string_error = {0}; if (!template_string_evaluate(slice.layout.subtitle_template_string, NULL, 0, NULL, @@ -81,10 +81,10 @@ AppGlanceResult app_glance_add_slice(AppGlanceReloadSession *session, AppGlanceS // If we haven't failed at this point, we're ready to add the slice to the glance! if (result == APP_GLANCE_RESULT_SUCCESS) { AppGlanceSliceInternal *slice_dest = &glance->slices[glance->num_slices]; - *slice_dest = (AppGlanceSliceInternal) { - .expiration_time = slice.expiration_time, - .type = AppGlanceSliceType_IconAndSubtitle, - .icon_and_subtitle.icon_resource_id = slice.layout.icon, + *slice_dest = (AppGlanceSliceInternal){ + .expiration_time = slice.expiration_time, + .type = AppGlanceSliceType_IconAndSubtitle, + .icon_and_subtitle.icon_resource_id = slice.layout.icon, }; // We already checked that the provided template string fits, so use strcpy instead of strncpy if (slice.layout.subtitle_template_string) { @@ -107,8 +107,8 @@ void app_glance_reload(AppGlanceReloadCallback callback, void *context) { if (callback) { // Create a "reload session" on the stack that wraps the glance, and then call the user callback - AppGlanceReloadSession session = (AppGlanceReloadSession) { - .glance = glance, + AppGlanceReloadSession session = (AppGlanceReloadSession){ + .glance = glance, }; callback(&session, APP_GLANCE_DB_MAX_SLICES_PER_GLANCE, context); } diff --git a/src/fw/applib/app_glance.h b/src/fw/applib/app_glance.h index 95f6479838..c6396bdf81 100644 --- a/src/fw/applib/app_glance.h +++ b/src/fw/applib/app_glance.h @@ -18,8 +18,8 @@ //! For example, the app might use it to display a preview of its current state //! such as the currently playing song or the number of pending notifications. //! -//! The glance is loaded with a stack of \ref AppGlanceSlice structs; only the latest slice is shown, -//! and they are set to expire at a certain time to show the next slice in the stack. +//! The glance is loaded with a stack of \ref AppGlanceSlice structs; only the latest slice is +//! shown, and they are set to expire at a certain time to show the next slice in the stack. //! //! To update the glance with a stack of slices, you must define an //! \ref AppGlanceReloadCallback and give it to \ref app_glance_reload. @@ -33,7 +33,8 @@ //! Example code: //! \code{.c} //! #if !PBL_PLATFORM_APLITE -//! static void glance_reload_callback(AppGlanceReloadSession *session, size_t limit, void *context) { +//! static void glance_reload_callback(AppGlanceReloadSession *session, size_t limit, void +//! *context) { //! AppGlanceSlice slice = { //! .expiration_time = APP_GLANCE_SLICE_NO_EXPIRATION, //! .layout.icon = APP_GLANCE_SLICE_DEFAULT_ICON, @@ -67,12 +68,12 @@ typedef uint32_t PublishedId; //! Describes how the slice should be visualized in the app's glance in the launcher. typedef struct AppGlanceSliceLayout { - //! The published resource ID of the bitmap icon to display in the app's glance. Use \ref - //! APP_GLANCE_SLICE_DEFAULT_ICON to use the app's default bitmap icon. - PublishedId icon; - //! A template string to visualize in the app's glance. The string will be copied, so it is safe - //! to destroy after adding the slice to the glance. Use NULL if no string should be displayed. - const char *subtitle_template_string; + //! The published resource ID of the bitmap icon to display in the app's glance. Use \ref + //! APP_GLANCE_SLICE_DEFAULT_ICON to use the app's default bitmap icon. + PublishedId icon; + //! A template string to visualize in the app's glance. The string will be copied, so it is safe + //! to destroy after adding the slice to the glance. Use NULL if no string should be displayed. + const char *subtitle_template_string; } AppGlanceSliceLayout; //! An app's glance can change over time as defined by zero or more app glance slices that each diff --git a/src/fw/applib/app_heap_util.c b/src/fw/applib/app_heap_util.c index d93d6e5910..9616922cf9 100644 --- a/src/fw/applib/app_heap_util.c +++ b/src/fw/applib/app_heap_util.c @@ -8,7 +8,7 @@ #include "system/passert.h" #include "pbl/util/heap.h" -static Heap* get_task_heap(void) { +static Heap *get_task_heap(void) { PebbleTask task = pebble_task_get_current(); Heap *heap = NULL; diff --git a/src/fw/applib/app_inbox.c b/src/fw/applib/app_inbox.c index eb7b986f90..1dcd61f561 100644 --- a/src/fw/applib/app_inbox.c +++ b/src/fw/applib/app_inbox.c @@ -23,15 +23,14 @@ AppInbox *app_inbox_create_and_register(size_t buffer_size, uint32_t min_num_mes buffer_size += (min_num_messages * sizeof(AppInboxMessageHeader)); uint8_t *buffer = applib_zalloc(buffer_size); if (!buffer) { - PBL_LOG_ERR("Not enough memory to allocate App Inbox of size %"PRIu32, - (uint32_t)buffer_size); + PBL_LOG_ERR("Not enough memory to allocate App Inbox of size %" PRIu32, (uint32_t)buffer_size); return NULL; } if (!sys_app_inbox_service_register(buffer, buffer_size, message_handler, dropped_handler)) { applib_free(buffer); return NULL; } - return (AppInbox *) buffer; + return (AppInbox *)buffer; } uint32_t app_inbox_destroy_and_deregister(AppInbox *app_inbox) { diff --git a/src/fw/applib/app_launch_reason.c b/src/fw/applib/app_launch_reason.c index 89c2a39ad5..061fd80b49 100644 --- a/src/fw/applib/app_launch_reason.c +++ b/src/fw/applib/app_launch_reason.c @@ -10,7 +10,6 @@ AppLaunchReason app_launch_reason(void) { return sys_process_get_launch_reason(); } - uint32_t app_launch_get_args(void) { return sys_process_get_launch_args(); } diff --git a/src/fw/applib/app_launch_reason.h b/src/fw/applib/app_launch_reason.h index a385f8d97b..5deb0aa635 100644 --- a/src/fw/applib/app_launch_reason.h +++ b/src/fw/applib/app_launch_reason.h @@ -23,14 +23,14 @@ //! is recommended to only handle the cases that the app needs to know about, //! rather than trying to handle all possible launch reasons. typedef enum { - APP_LAUNCH_SYSTEM = 0, //!< App launched by the system - APP_LAUNCH_USER, //!< App launched by user selection in launcher menu - APP_LAUNCH_PHONE, //!< App launched by mobile or companion app - APP_LAUNCH_WAKEUP, //!< App launched by wakeup event - APP_LAUNCH_WORKER, //!< App launched by worker calling worker_launch_app() - APP_LAUNCH_QUICK_LAUNCH, //!< App launched by user using quick launch + APP_LAUNCH_SYSTEM = 0, //!< App launched by the system + APP_LAUNCH_USER, //!< App launched by user selection in launcher menu + APP_LAUNCH_PHONE, //!< App launched by mobile or companion app + APP_LAUNCH_WAKEUP, //!< App launched by wakeup event + APP_LAUNCH_WORKER, //!< App launched by worker calling worker_launch_app() + APP_LAUNCH_QUICK_LAUNCH, //!< App launched by user using quick launch APP_LAUNCH_TIMELINE_ACTION, //!< App launched by user opening it from a pin - APP_LAUNCH_SMARTSTRAP, //!< App launched by a smartstrap + APP_LAUNCH_SMARTSTRAP, //!< App launched by a smartstrap } AppLaunchReason; //! Provides the method used to launch the current application. @@ -40,10 +40,10 @@ AppLaunchReason app_launch_reason(void); //! Details about how an app was quick launched. //! Returned by \ref app_launch_get_quick_launch_action. typedef enum { - APP_QUICK_LAUNCH_ACTION_NONE = 0, //!< App was not launched via Quick Launch - APP_QUICK_LAUNCH_ACTION_HOLD, //!< User held a single button - APP_QUICK_LAUNCH_ACTION_TAP, //!< User tapped a button (single click) - APP_QUICK_LAUNCH_ACTION_COMBO, //!< User held a button combination + APP_QUICK_LAUNCH_ACTION_NONE = 0, //!< App was not launched via Quick Launch + APP_QUICK_LAUNCH_ACTION_HOLD, //!< User held a single button + APP_QUICK_LAUNCH_ACTION_TAP, //!< User tapped a button (single click) + APP_QUICK_LAUNCH_ACTION_COMBO, //!< User held a button combination } AppQuickLaunchAction; //! Get the argument passed to the app when it was launched. @@ -59,4 +59,3 @@ AppQuickLaunchAction app_launch_get_quick_launch_action(void); //! @} // group Launch_Reason //! @} // group Foundation - diff --git a/src/fw/applib/app_light.h b/src/fw/applib/app_light.h index 17ef58d8fa..0024c35e07 100644 --- a/src/fw/applib/app_light.h +++ b/src/fw/applib/app_light.h @@ -32,9 +32,10 @@ bool app_light_is_on(void); void app_light_enable_interaction(void); //! Turn the watch's backlight on or put it back into automatic control. -//! Developers should take care when calling this function, keeping Pebble's backlight on for long periods of time -//! will rapidly deplete the battery. -//! @param enable Turn the backlight on if `true`, otherwise `false` to put it back into automatic control. +//! Developers should take care when calling this function, keeping Pebble's backlight on for long +//! periods of time will rapidly deplete the battery. +//! @param enable Turn the backlight on if `true`, otherwise `false` to put it back into automatic +//! control. void app_light_enable(bool enable); //! Tint the backlight LED to the given color. The color persists while the diff --git a/src/fw/applib/app_logging.c b/src/fw/applib/app_logging.c index 69a27aa9e5..f4425039d4 100644 --- a/src/fw/applib/app_logging.c +++ b/src/fw/applib/app_logging.c @@ -10,22 +10,25 @@ #include "syscall/syscall.h" #include -void app_log_vargs(uint8_t log_level, const char* src_filename, int src_line_number, const char* fmt, va_list args) { +void app_log_vargs(uint8_t log_level, const char *src_filename, int src_line_number, + const char *fmt, va_list args) { char log_buffer[LOG_BUFFER_LENGTH]; - _Static_assert(sizeof(log_buffer) > sizeof(AppLogBinaryMessage), "log_buffer too small for AppLogBinaryMessage"); + _Static_assert(sizeof(log_buffer) > sizeof(AppLogBinaryMessage), + "log_buffer too small for AppLogBinaryMessage"); - AppLogBinaryMessage* msg = (AppLogBinaryMessage*)log_buffer; + AppLogBinaryMessage *msg = (AppLogBinaryMessage *)log_buffer; sys_get_app_uuid(&msg->uuid); const size_t log_msg_offset = offsetof(AppLogBinaryMessage, log_msg); - int bin_msg_length = pbl_log_binary_format((char*)&msg->log_msg, sizeof(log_buffer) - log_msg_offset, log_level, - src_filename, src_line_number, fmt, args); + int bin_msg_length = + pbl_log_binary_format((char *)&msg->log_msg, sizeof(log_buffer) - log_msg_offset, log_level, + src_filename, src_line_number, fmt, args); sys_app_log(log_msg_offset + bin_msg_length, log_buffer); } -void app_log(uint8_t log_level, const char* src_filename, int src_line_number, const char* fmt, ...) { +void app_log(uint8_t log_level, const char *src_filename, int src_line_number, const char *fmt, + ...) { va_list args; va_start(args, fmt); app_log_vargs(log_level, src_filename, src_line_number, fmt, args); va_end(args); } - diff --git a/src/fw/applib/app_logging.h b/src/fw/applib/app_logging.h index c0945f4214..85e1e63fd3 100644 --- a/src/fw/applib/app_logging.h +++ b/src/fw/applib/app_logging.h @@ -22,11 +22,10 @@ //! //! This module contains the functions necessary to log messages through //! Bluetooth. -//! @note It is no longer necessary to enable app logging output from the "settings->about" menu on the Pebble for -//! them to be transmitted! Instead use the "pebble logs" command included with the SDK to activate logs. The logs -//! will appear right in your console. Logging -//! over Bluetooth is a fairly power hungry operation that non-developers will -//! not need when your apps are distributed. +//! @note It is no longer necessary to enable app logging output from the "settings->about" menu on +//! the Pebble for them to be transmitted! Instead use the "pebble logs" command included with the +//! SDK to activate logs. The logs will appear right in your console. Logging over Bluetooth is a +//! fairly power hungry operation that non-developers will not need when your apps are distributed. //! @{ // @internal @@ -43,19 +42,18 @@ void app_log_vargs(uint8_t log_level, const char *src_filename, int src_line_num //! @param ... The arguments for the formatting string //! \sa snprintf for details about the C formatting string. #if __clang__ -void app_log(uint8_t log_level, const char* src_filename, int src_line_number, const char* fmt, +void app_log(uint8_t log_level, const char *src_filename, int src_line_number, const char *fmt, ...); #else -void app_log(uint8_t log_level, const char* src_filename, int src_line_number, const char* fmt, - ...) __attribute__((format(printf, 4, 5))); +void app_log(uint8_t log_level, const char *src_filename, int src_line_number, const char *fmt, ...) + __attribute__((format(printf, 4, 5))); #endif //! A helper macro that simplifies the use of the app_log function //! @param level The log level to log output as //! @param fmt A C formatting string //! @param args The arguments for the formatting string -#define APP_LOG(level, fmt, args...) \ - app_log(level, __FILE_NAME__, __LINE__, fmt, ## args) +#define APP_LOG(level, fmt, args...) app_log(level, __FILE_NAME__, __LINE__, fmt, ##args) //! Suggested log level values typedef enum { diff --git a/src/fw/applib/app_message/app_message.c b/src/fw/applib/app_message/app_message.c index f4a8e0c8be..5b3d86ea05 100644 --- a/src/fw/applib/app_message/app_message.c +++ b/src/fw/applib/app_message/app_message.c @@ -12,7 +12,7 @@ void app_message_init(void) { AppMessageCtx *app_message_ctx = app_state_get_app_message_ctx(); - *app_message_ctx = (const AppMessageCtx) {}; + *app_message_ctx = (const AppMessageCtx){}; } // -------- Pebble Protocol Handlers ------------------------------------------------------------ // @@ -28,19 +28,17 @@ static bool prv_has_invalid_header_length(size_t length) { //! The new implementation uses up to 72 bytes more stack space than the previous implementation. //! Might need to do some extra work to get a "thinner" stack, if this causes issues. //! Executes on App task. -void app_message_app_protocol_msg_callback(CommSession *session, - const uint8_t* data, size_t length, +void app_message_app_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length, AppInboxConsumerInfo *consumer_info) { if (prv_has_invalid_header_length(length)) { return; } - AppMessageHeader *message = (AppMessageHeader *) data; + AppMessageHeader *message = (AppMessageHeader *)data; switch (message->command) { - case CMD_PUSH: // Incoming message: - app_message_inbox_receive(session, (AppMessagePush *) message, length, consumer_info); + app_message_inbox_receive(session, (AppMessagePush *)message, length, consumer_info); return; case CMD_REQUEST: @@ -63,12 +61,12 @@ void app_message_app_protocol_msg_callback(CommSession *session, //! Executes on KernelBG, sends back NACK on behalf of the app if it is not able to do so. //! Note that app_message_receiver_dropped_handler will also get called on the App task, //! to report the number of missed messages. -void app_message_app_protocol_system_nack_callback(CommSession *session, - const uint8_t* data, size_t length) { +void app_message_app_protocol_system_nack_callback(CommSession *session, const uint8_t *data, + size_t length) { if (prv_has_invalid_header_length(length)) { return; } - AppMessageHeader *message = (AppMessageHeader *) data; + AppMessageHeader *message = (AppMessageHeader *)data; if (message->command != CMD_PUSH) { return; } @@ -132,7 +130,7 @@ static bool prv_supports_8k(void) { return false; } const Version app_sdk_version = sys_get_current_app_sdk_version(); - const Version sdk_version_8k_messages_enabled = (const Version) { 0x05, 0x3f }; + const Version sdk_version_8k_messages_enabled = (const Version){0x05, 0x3f}; return (version_compare(sdk_version_8k_messages_enabled, app_sdk_version) <= 0); } @@ -168,9 +166,8 @@ AppMessageResult app_message_open(const uint32_t size_inbound, const uint32_t si #endif AppMessageCtx *app_message_ctx = app_state_get_app_message_ctx(); - if (app_message_ctx->outbox.phase != OUT_CLOSED || - app_message_ctx->inbox.is_open) { - return APP_MSG_INVALID_STATE; // Already open + if (app_message_ctx->outbox.phase != OUT_CLOSED || app_message_ctx->inbox.is_open) { + return APP_MSG_INVALID_STATE; // Already open } AppMessageResult result = app_message_outbox_open(&app_message_ctx->outbox, size_outbound); diff --git a/src/fw/applib/app_message/app_message.h b/src/fw/applib/app_message/app_message.h index c14d0bdfd0..12fe5846d1 100644 --- a/src/fw/applib/app_message/app_message.h +++ b/src/fw/applib/app_message/app_message.h @@ -18,73 +18,80 @@ //! sets of key/value pairs. The key/value pairs are stored in the form of a Dictionary, the layout //! of which is left for the application developer to define. //! -//! AppMessage implements a push-oriented messaging protocol, enabling your app to call functions and -//! methods to push messages from Pebble to phone and vice versa. The protocol is symmetric: both Pebble -//! and the phone can send messages. All messages are acknowledged. In this context, there is no -//! client-server model, as such. -//! -//! During the sending phase, one side initiates the communication by transferring a dictionary over the air. -//! The other side then receives this message and is given an opportunity to perform actions on that data. -//! As soon as possible, the other side is expected to reply to the message with a simple acknowledgment -//! that the message was received successfully. -//! -//! PebbleKit JavaScript provides you with a set of standard JavaScript APIs that let your app receive messages -//! from the watch, make HTTP requests, and send new messages to the watch. AppMessage APIs are used to send and -//! receive data. A Pebble watchapp can use the resources of the connected phone to fetch information from web services, -//! send information to web APIs, or store login credentials. On the JavaScript side, you communicate -//! with Pebble via a Pebble object exposed in the namespace. +//! AppMessage implements a push-oriented messaging protocol, enabling your app to call functions +//! and methods to push messages from Pebble to phone and vice versa. The protocol is symmetric: +//! both Pebble and the phone can send messages. All messages are acknowledged. In this context, +//! there is no client-server model, as such. +//! +//! During the sending phase, one side initiates the communication by transferring a dictionary over +//! the air. The other side then receives this message and is given an opportunity to perform +//! actions on that data. As soon as possible, the other side is expected to reply to the message +//! with a simple acknowledgment that the message was received successfully. +//! +//! PebbleKit JavaScript provides you with a set of standard JavaScript APIs that let your app +//! receive messages from the watch, make HTTP requests, and send new messages to the watch. +//! AppMessage APIs are used to send and receive data. A Pebble watchapp can use the resources of +//! the connected phone to fetch information from web services, send information to web APIs, or +//! store login credentials. On the JavaScript side, you communicate with Pebble via a Pebble object +//! exposed in the namespace. //! //! Messages always need to get either ACKnowledged or "NACK'ed," that is, not acknowledged. -//! If not, messages will result in a time-out failure. The AppMessage subsystem takes care of this implicitly. -//! In the phone libraries, this step is a bit more explicit. +//! If not, messages will result in a time-out failure. The AppMessage subsystem takes care of this +//! implicitly. In the phone libraries, this step is a bit more explicit. //! //! The Pebble watch interfaces make a distinction between the Inbox and the Outbox calls. The Inbox -//! receives messages from the phone on the watch; the Outbox sends messages from the watch to the phone. -//! These two buffers can be managed separately. +//! receives messages from the phone on the watch; the Outbox sends messages from the watch to the +//! phone. These two buffers can be managed separately. //! //!

Warning

-//! A critical constraint of AppMessage is that messages are limited in size. An ingoing (outgoing) message -//! larger than the inbox (outbox) will not be transmitted and will generate an error. You can choose your -//! inbox and outbox size when you call app_message_open(). +//! A critical constraint of AppMessage is that messages are limited in size. An ingoing (outgoing) +//! message larger than the inbox (outbox) will not be transmitted and will generate an error. You +//! can choose your inbox and outbox size when you call app_message_open(). //! -//! Pebble SDK provides a static minimum guaranteed size (APP_MESSAGE_INBOX_SIZE_MINIMUM and APP_MESSAGE_OUTBOX_SIZE_MINIMUM). -//! Requesting a buffer of the minimum guaranteed size (or smaller) is always guaranteed to succeed on all -//! Pebbles in this SDK version or higher, and with every phone. +//! Pebble SDK provides a static minimum guaranteed size (APP_MESSAGE_INBOX_SIZE_MINIMUM and +//! APP_MESSAGE_OUTBOX_SIZE_MINIMUM). Requesting a buffer of the minimum guaranteed size (or +//! smaller) is always guaranteed to succeed on all Pebbles in this SDK version or higher, and with +//! every phone. //! //! In some context, Pebble might be able to provide your application with larger inbox/outbox. -//! You can call app_message_inbox_size_maximum() and app_message_outbox_size_maximum() in your code to get -//! the largest possible value you can use. +//! You can call app_message_inbox_size_maximum() and app_message_outbox_size_maximum() in your code +//! to get the largest possible value you can use. //! //! To always get the largest buffer available, follow this best practice: //! //! app_message_open(app_message_inbox_size_maximum(), app_message_outbox_size_maximum()) //! -//! AppMessage uses your application heap space. That means that the sizes you pick for the AppMessage -//! inbox and outbox buffers are important in optimizing your app’s performance. The more you use for -//! AppMessage, the less space you’ll have for the rest of your app. +//! AppMessage uses your application heap space. That means that the sizes you pick for the +//! AppMessage inbox and outbox buffers are important in optimizing your app’s performance. The more +//! you use for AppMessage, the less space you’ll have for the rest of your app. //! -//! To register callbacks, you should call app_message_register_inbox_received(), app_message_register_inbox_dropped(), -//! app_message_register_outbox_sent(), app_message_register_outbox_failed(). +//! To register callbacks, you should call app_message_register_inbox_received(), +//! app_message_register_inbox_dropped(), app_message_register_outbox_sent(), +//! app_message_register_outbox_failed(). //! -//! Pebble recommends that you call them before app_message_open() to ensure you do not miss a message -//! arriving between starting AppMessage and registering the callback. You can set a context that will be passed -//! to all the callbacks with app_message_set_context(). +//! Pebble recommends that you call them before app_message_open() to ensure you do not miss a +//! message arriving between starting AppMessage and registering the callback. You can set a context +//! that will be passed to all the callbacks with app_message_set_context(). //! //! In circumstances that may not be ideal, when using AppMessage several types of errors may occur. //! For example: //! //! * The send can’t start because the system state won't allow for a success. Several reasons -//! you're unable to perform a send: A send() is already occurring (only one is possible at a time) or Bluetooth -//! is not enabled or connected. -//! * The send and receive occur, but the receiver can’t accept the message. For instance, there is no app +//! you're unable to perform a send: A send() is already occurring (only one is possible at a time) +//! or Bluetooth is not enabled or connected. +//! * The send and receive occur, but the receiver can’t accept the message. For instance, there is +//! no app //! that receives such a message. -//! * The send occurs, but the receiver either does not actually receive the message or can’t handle it +//! * The send occurs, but the receiver either does not actually receive the message or can’t handle +//! it //! in a timely fashion. -//! * In the case of a dropped message, the phone sends a message to the watchapp, while there is still +//! * In the case of a dropped message, the phone sends a message to the watchapp, while there is +//! still //! an unprocessed message in the Inbox. //! -//! Other errors are possible and described by AppMessageResult. A client of the AppMessage interface -//! should use the result codes to be more robust in the face of communication problems either in the field or while debugging. +//! Other errors are possible and described by AppMessageResult. A client of the AppMessage +//! interface should use the result codes to be more robust in the face of communication problems +//! either in the field or while debugging. //! //! Refer to the \htmlinclude app-phone-communication.html for a conceptual overview and code usage. //! @@ -102,45 +109,52 @@ //! //!

Communication Model

//! -//! AppMessage is a simple send-receive-reply protocol. The protocol is symmetric: both the watch and phone can start -//! sending a message and expect a reply from the other side. +//! AppMessage is a simple send-receive-reply protocol. The protocol is symmetric: both the watch +//! and phone can start sending a message and expect a reply from the other side. //! -//! In the sending phase, one side initiates the communication by transferring a dictionary over the air. The other -//! side then receives this message and is given an opportunity to perform actions on that data. As soon as possible, -//! the other side is expected to reply to the message with a simple acknowledgement that the message was received -//! successfully. +//! In the sending phase, one side initiates the communication by transferring a dictionary over the +//! air. The other side then receives this message and is given an opportunity to perform actions on +//! that data. As soon as possible, the other side is expected to reply to the message with a +//! simple acknowledgement that the message was received successfully. //! //! In non-ideal circumstances, several errors may occur. For example: //! * The send can't start as the system state won't allow for a success. -//! * The send and receive occur, but the receiver cannot accept the message (for example, there is no app that receives such +//! * The send and receive occur, but the receiver cannot accept the message (for example, there is +//! no app that receives such //! a message). -//! * The send occurs, but the receiver either does not actually receive the message or can't handle it in a timely +//! * The send occurs, but the receiver either does not actually receive the message or can't handle +//! it in a timely //! fashion. //! -//! Other errors are possible, described by \ref AppMessageResult. A client of the AppMessage interface -//! can use the result codes to be more robust in the face of communication problems either in the field or while -//! debugging. +//! Other errors are possible, described by \ref AppMessageResult. A client of the AppMessage +//! interface can use the result codes to be more robust in the face of communication problems +//! either in the field or while debugging. //! -//! The watch interfaces make a distinction between the Inbox and the Outbox. The Inbox receives messages from the -//! phone on the watch; the Outbox sends messages from the watch to the phone. These two objects can be managed -//! separately. +//! The watch interfaces make a distinction between the Inbox and the Outbox. The Inbox receives +//! messages from the phone on the watch; the Outbox sends messages from the watch to the phone. +//! These two objects can be managed separately. //! -//! \note Messages are actually addressed by the UUID of the watch and phone apps. This is done automatically by the -//! system for the convenience of the client. However, this does require that both the watch and phone apps -//! share their UUID. AppMessage is not capable of 1:N or M:N communication at this time, and is merely 1:1. +//! \note Messages are actually addressed by the UUID of the watch and phone apps. This is done +//! automatically by the +//! system for the convenience of the client. However, this does require that both the watch +//! and phone apps share their UUID. AppMessage is not capable of 1:N or M:N communication at +//! this time, and is merely 1:1. //! //! \sa AppMessageResult -// -------- Defines, Enumerations, and Structures ------------------------------------------------------------------ // +// -------- Defines, Enumerations, and Structures +// ------------------------------------------------------------------ // -//! As long as the firmware maintains its current major version, inboxes of this size or smaller will be allowed. +//! As long as the firmware maintains its current major version, inboxes of this size or smaller +//! will be allowed. //! //! \sa app_message_inbox_size_maximum() //! \sa APP_MESSAGE_OUTBOX_SIZE_MINIMUM //! #define APP_MESSAGE_INBOX_SIZE_MINIMUM 124 /* bytes */ -//! As long as the firmware maintains its current major version, outboxes of this size or smaller will be allowed. +//! As long as the firmware maintains its current major version, outboxes of this size or smaller +//! will be allowed. //! //! \sa app_message_outbox_size_maximum() //! \sa APP_MESSAGE_INBOX_SIZE_MINIMUM @@ -202,10 +216,11 @@ typedef enum { //! Called after an incoming message is received. //! //! \param[in] iterator -//! The dictionary iterator to the received message. Never NULL. Note that the iterator cannot be modified or -//! saved off. The library may need to re-use the buffered space where this message is supplied. Returning from -//! the callback indicates to the library that the received message contents are no longer needed or have already -//! been externalized outside its buffering space and iterator. +//! The dictionary iterator to the received message. Never NULL. Note that the iterator cannot +//! be modified or saved off. The library may need to re-use the buffered space where this +//! message is supplied. Returning from the callback indicates to the library that the received +//! message contents are no longer needed or have already been externalized outside its buffering +//! space and iterator. //! //! \param[in] context //! Pointer to application data as specified when registering the callback. @@ -222,16 +237,17 @@ typedef void (*AppMessageInboxReceived)(DictionaryIterator *iterator, void *cont //! Pointer to application data as specified when registering the callback. //! //! Note that you can call app_message_outbox_begin() from this handler to prepare a new message. -//! This will invalidate the previous dictionary iterator; do not use it after calling app_message_outbox_begin(). +//! This will invalidate the previous dictionary iterator; do not use it after calling +//! app_message_outbox_begin(). //! typedef void (*AppMessageInboxDropped)(AppMessageResult reason, void *context); //! Called after an outbound message has been sent and the reply has been received. //! //! \param[in] iterator -//! The dictionary iterator to the sent message. The iterator will be in the final state that was sent. Note that -//! the iterator cannot be modified or saved off as the library will re-open the dictionary with dict_begin() after -//! this callback returns. +//! The dictionary iterator to the sent message. The iterator will be in the final state that was +//! sent. Note that the iterator cannot be modified or saved off as the library will re-open the +//! dictionary with dict_begin() after this callback returns. //! //! \param[in] context //! Pointer to application data as specified when registering the callback. @@ -241,25 +257,29 @@ typedef void (*AppMessageOutboxSent)(DictionaryIterator *iterator, void *context //! Called after an outbound message has not been sent successfully. //! //! \param[in] iterator -//! The dictionary iterator to the sent message. The iterator will be in the final state that was sent. Note that -//! the iterator cannot be modified or saved off as the library will re-open the dictionary with dict_begin() after -//! this callback returns. +//! The dictionary iterator to the sent message. The iterator will be in the final state that was +//! sent. Note that the iterator cannot be modified or saved off as the library will re-open the +//! dictionary with dict_begin() after this callback returns. //! //! \param[in] reason -//! The result of the operation. Some possibilities for the value include \ref APP_MSG_SEND_TIMEOUT, -//! \ref APP_MSG_SEND_REJECTED, \ref APP_MSG_NOT_CONNECTED, \ref APP_MSG_APP_NOT_RUNNING, and the combination +//! The result of the operation. Some possibilities for the value include \ref +//! APP_MSG_SEND_TIMEOUT, +//! \ref APP_MSG_SEND_REJECTED, \ref APP_MSG_NOT_CONNECTED, \ref APP_MSG_APP_NOT_RUNNING, and the +//! combination //! `(APP_MSG_NOT_CONNECTED | APP_MSG_APP_NOT_RUNNING)`. //! //! \param context //! Pointer to application data as specified when registering the callback. //! //! Note that you can call app_message_outbox_begin() from this handler to prepare a new message. -//! This will invalidate the previous dictionary iterator; do not use it after calling app_message_outbox_begin(). +//! This will invalidate the previous dictionary iterator; do not use it after calling +//! app_message_outbox_begin(). //! -typedef void (*AppMessageOutboxFailed)(DictionaryIterator *iterator, AppMessageResult reason, void *context); +typedef void (*AppMessageOutboxFailed)(DictionaryIterator *iterator, AppMessageResult reason, + void *context); - -// -------- AppMessage Callbacks ----------------------------------------------------------------------------------- // +// -------- AppMessage Callbacks +// ----------------------------------------------------------------------------------- // //! Gets the context that will be passed to all AppMessage callbacks. //! @@ -277,49 +297,55 @@ void *app_message_set_context(void *context); //! Registers a function that will be called after any Inbox message is received successfully. //! -//! Only one callback may be registered at a time. Each subsequent call to this function will replace the previous -//! callback. The callback is optional; setting it to NULL will deregister the current callback and no function will -//! be called anymore. +//! Only one callback may be registered at a time. Each subsequent call to this function will +//! replace the previous callback. The callback is optional; setting it to NULL will deregister the +//! current callback and no function will be called anymore. //! -//! \param[in] received_callback The callback that will be called going forward; NULL to not have a callback. +//! \param[in] received_callback The callback that will be called going forward; NULL to not have a +//! callback. //! //! \return The previous callback (or NULL) that was on record. //! -AppMessageInboxReceived app_message_register_inbox_received(AppMessageInboxReceived received_callback); +AppMessageInboxReceived app_message_register_inbox_received( + AppMessageInboxReceived received_callback); -//! Registers a function that will be called after any Inbox message is received but dropped by the system. +//! Registers a function that will be called after any Inbox message is received but dropped by the +//! system. //! -//! Only one callback may be registered at a time. Each subsequent call to this function will replace the previous -//! callback. The callback is optional; setting it to NULL will deregister the current callback and no function will -//! be called anymore. +//! Only one callback may be registered at a time. Each subsequent call to this function will +//! replace the previous callback. The callback is optional; setting it to NULL will deregister the +//! current callback and no function will be called anymore. //! -//! \param[in] dropped_callback The callback that will be called going forward; NULL to not have a callback. +//! \param[in] dropped_callback The callback that will be called going forward; NULL to not have a +//! callback. //! //! \return The previous callback (or NULL) that was on record. //! AppMessageInboxDropped app_message_register_inbox_dropped(AppMessageInboxDropped dropped_callback); -//! Registers a function that will be called after any Outbox message is sent and an ACK reply occurs in a timely -//! fashion. +//! Registers a function that will be called after any Outbox message is sent and an ACK reply +//! occurs in a timely fashion. //! -//! Only one callback may be registered at a time. Each subsequent call to this function will replace the previous -//! callback. The callback is optional; setting it to NULL will deregister the current callback and no function will -//! be called anymore. +//! Only one callback may be registered at a time. Each subsequent call to this function will +//! replace the previous callback. The callback is optional; setting it to NULL will deregister the +//! current callback and no function will be called anymore. //! -//! \param[in] sent_callback The callback that will be called going forward; NULL to not have a callback. +//! \param[in] sent_callback The callback that will be called going forward; NULL to not have a +//! callback. //! //! \return The previous callback (or NULL) that was on record. //! AppMessageOutboxSent app_message_register_outbox_sent(AppMessageOutboxSent sent_callback); -//! Registers a function that will be called after any Outbox message is not sent with a timely ACK reply. -//! The call to \ref app_message_outbox_send() must have succeeded. +//! Registers a function that will be called after any Outbox message is not sent with a timely ACK +//! reply. The call to \ref app_message_outbox_send() must have succeeded. //! -//! Only one callback may be registered at a time. Each subsequent call to this function will replace the previous -//! callback. The callback is optional; setting it to NULL will deregister the current callback and no function will -//! be called anymore. +//! Only one callback may be registered at a time. Each subsequent call to this function will +//! replace the previous callback. The callback is optional; setting it to NULL will deregister the +//! current callback and no function will be called anymore. //! -//! \param[in] failed_callback The callback that will be called going forward; NULL to not have a callback. +//! \param[in] failed_callback The callback that will be called going forward; NULL to not have a +//! callback. //! //! \return The previous callback (or NULL) that was on record. //! @@ -329,7 +355,8 @@ AppMessageOutboxFailed app_message_register_outbox_failed(AppMessageOutboxFailed //! void app_message_deregister_callbacks(void); -// -------- AppMessage Lifecycle ----------------------------------------------------------------------------------- // +// -------- AppMessage Lifecycle +// ----------------------------------------------------------------------------------- // //! Programmatically determine the inbox size maximum in the current configuration. //! @@ -351,16 +378,18 @@ uint32_t app_message_outbox_size_maximum(void); //! Open AppMessage to transfers. //! -//! Use \ref dict_calc_buffer_size_from_tuplets() or \ref dict_calc_buffer_size() to estimate the size you need. +//! Use \ref dict_calc_buffer_size_from_tuplets() or \ref dict_calc_buffer_size() to estimate the +//! size you need. //! //! \param[in] size_inbound The required size for the Inbox buffer //! \param[in] size_outbound The required size for the Outbox buffer //! //! \return A result code such as \ref APP_MSG_OK or \ref APP_MSG_OUT_OF_MEMORY. //! -//! \note It is recommended that if the Inbox will be used, that at least the Inbox callbacks should be registered -//! before this call. Otherwise it is possible for an Inbox message to be NACK'ed without being seen by the -//! application. +//! \note It is recommended that if the Inbox will be used, that at least the Inbox callbacks should +//! be registered +//! before this call. Otherwise it is possible for an Inbox message to be NACK'ed without being +//! seen by the application. //! AppMessageResult app_message_open(const uint32_t size_inbound, const uint32_t size_outbound); @@ -368,22 +397,25 @@ AppMessageResult app_message_open(const uint32_t size_inbound, const uint32_t si //! void app_message_close(void); - -// -------- AppMessage Inbox --------------------------------------------------------------------------------------- // +// -------- AppMessage Inbox +// --------------------------------------------------------------------------------------- // // Note: the Inbox has no direct functions, only callbacks. - -// -------- AppMessage Outbox -------------------------------------------------------------------------------------- // +// -------- AppMessage Outbox +// -------------------------------------------------------------------------------------- // //! Begin writing to the Outbox's Dictionary buffer. //! -//! \param[out] iterator Location to write the DictionaryIterator pointer. This will be NULL on failure. +//! \param[out] iterator Location to write the DictionaryIterator pointer. This will be NULL on +//! failure. //! -//! \return A result code, including but not limited to \ref APP_MSG_OK, \ref APP_MSG_INVALID_ARGS or +//! \return A result code, including but not limited to \ref APP_MSG_OK, \ref APP_MSG_INVALID_ARGS +//! or //! \ref APP_MSG_BUSY. //! -//! \note After a successful call, one can add values to the dictionary using functions like \ref dict_write_data() +//! \note After a successful call, one can add values to the dictionary using functions like \ref +//! dict_write_data() //! and friends. //! //! \sa Dictionary @@ -392,9 +424,11 @@ AppMessageResult app_message_outbox_begin(DictionaryIterator **iterator); //! Sends the outbound dictionary. //! -//! \return A result code, including but not limited to \ref APP_MSG_OK or \ref APP_MSG_BUSY. The APP_MSG_OK code does -//! not mean that the message was sent successfully, but only that the start of processing was successful. -//! Since this call is asynchronous, callbacks provide the final result instead. +//! \return A result code, including but not limited to \ref APP_MSG_OK or \ref APP_MSG_BUSY. The +//! APP_MSG_OK code does +//! not mean that the message was sent successfully, but only that the start of processing +//! was successful. Since this call is asynchronous, callbacks provide the final result +//! instead. //! //! \sa AppMessageOutboxSent //! \sa AppMessageOutboxFailed diff --git a/src/fw/applib/app_message/app_message_inbox.c b/src/fw/applib/app_message/app_message_inbox.c index bfebb6d810..18955c6f77 100644 --- a/src/fw/applib/app_message/app_message_inbox.c +++ b/src/fw/applib/app_message/app_message_inbox.c @@ -15,9 +15,8 @@ AppMessageResult app_message_inbox_open(AppMessageCtxInbox *inbox, size_t size_i } else if (size_inbound == size_maximum) { APP_LOG(LOG_LEVEL_INFO, "app_message_open() called with app_message_inbox_size_maximum()."); APP_LOG(LOG_LEVEL_INFO, - "This consumes %"PRIu32" bytes of heap memory, potentially more in the future!", + "This consumes %" PRIu32 " bytes of heap memory, potentially more in the future!", (uint32_t)size_maximum); - } if (size_inbound == 0) { return APP_MSG_OK; @@ -38,18 +37,18 @@ void app_message_inbox_close(AppMessageCtxInbox *inbox) { void app_message_inbox_send_ack_nack_reply(CommSession *session, const uint8_t transaction_id, AppMessageCmd cmd) { - const AppMessageAck nack_message = (const AppMessageAck) { - .header = { - .command = cmd, - .transaction_id = transaction_id, - }, + const AppMessageAck nack_message = (const AppMessageAck){ + .header = { + .command = cmd, + .transaction_id = transaction_id, + }, }; // Just use a syscall to enqueue the message using kernel heap. // We could use app_outbox, but then we'd need to allocate the message on the app heap and I'm // afraid this might break apps, especially if the mobile app is misbehaving and avalanching the // app with messages that need to be (n)ack'd. - sys_app_pp_send_data(session, APP_MESSAGE_ENDPOINT_ID, - (const uint8_t *) &nack_message, sizeof(nack_message)); + sys_app_pp_send_data(session, APP_MESSAGE_ENDPOINT_ID, (const uint8_t *)&nack_message, + sizeof(nack_message)); } void app_message_inbox_handle_dropped_messages(uint32_t num_drops) { @@ -92,7 +91,7 @@ void app_message_inbox_receive(CommSession *session, AppMessagePush *push_messag DictionaryIterator iterator; const uint16_t dict_size = (length - APP_MSG_HDR_OVRHD_SIZE); // TODO PBL-1639: Maybe do some sanity checking on the dict structure? - dict_read_begin_from_buffer(&iterator, (const uint8_t *) &push_message->dictionary, dict_size); + dict_read_begin_from_buffer(&iterator, (const uint8_t *)&push_message->dictionary, dict_size); if (inbox->received_callback) { inbox->received_callback(&iterator, inbox->user_context); diff --git a/src/fw/applib/app_message/app_message_internal.h b/src/fw/applib/app_message/app_message_internal.h index e5379bfc2a..df0475593f 100644 --- a/src/fw/applib/app_message/app_message_internal.h +++ b/src/fw/applib/app_message/app_message_internal.h @@ -11,8 +11,8 @@ typedef struct CommSession CommSession; -#define ACK_NACK_TIME_OUT_MS (10000) -#define APP_MESSAGE_ENDPOINT_ID (0x30) +#define ACK_NACK_TIME_OUT_MS (10000) +#define APP_MESSAGE_ENDPOINT_ID (0x30) typedef enum { CMD_PUSH = 0x01, @@ -22,7 +22,7 @@ typedef enum { } AppMessageCmd; typedef struct PACKED { - AppMessageCmd command:8; + AppMessageCmd command : 8; uint8_t transaction_id; } AppMessageHeader; @@ -30,7 +30,7 @@ typedef struct PACKED { typedef struct PACKED { AppMessageHeader header; Uuid uuid; - Dictionary dictionary; //!< Variable length! + Dictionary dictionary; //!< Variable length! } AppMessagePush; // AppMessageHeader and Uuid size should be opaque to user of API #define APP_MSG_HDR_OVRHD_SIZE (offsetof(AppMessagePush, dictionary)) @@ -85,10 +85,10 @@ typedef struct AppMessageCtxOutbox { AppTimer *ack_nack_timer; struct PACKED { - AppMessagePhaseOut phase:8; + AppMessagePhaseOut phase : 8; uint8_t transaction_id; - uint16_t not_ready_throttle_ms; // used for throttling app task when outbox is not ready - AppMessageResult result:16; + uint16_t not_ready_throttle_ms; // used for throttling app task when outbox is not ready + AppMessageResult result : 16; }; } AppMessageCtxOutbox; @@ -97,8 +97,7 @@ typedef struct AppMessageCtx { AppMessageCtxOutbox outbox; } AppMessageCtx; -_Static_assert(sizeof(AppMessageCtx) <= 112, - "AppMessageCtx must not exceed 112 bytes!"); +_Static_assert(sizeof(AppMessageCtx) <= 112, "AppMessageCtx must not exceed 112 bytes!"); typedef struct { CommSession *session; @@ -135,9 +134,8 @@ void app_message_inbox_send_ack_nack_reply(CommSession *session, const uint8_t t void app_message_inbox_handle_dropped_messages(uint32_t num_drops); -void app_message_app_protocol_msg_callback(CommSession *session, - const uint8_t* data, size_t length, +void app_message_app_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length, AppInboxConsumerInfo *consumer_info); -void app_message_app_protocol_system_nack_callback(CommSession *session, - const uint8_t* data, size_t length); \ No newline at end of file +void app_message_app_protocol_system_nack_callback(CommSession *session, const uint8_t *data, + size_t length); \ No newline at end of file diff --git a/src/fw/applib/app_message/app_message_outbox.c b/src/fw/applib/app_message/app_message_outbox.c index ef27f378cd..44a5f1c750 100644 --- a/src/fw/applib/app_message/app_message_outbox.c +++ b/src/fw/applib/app_message/app_message_outbox.c @@ -29,8 +29,7 @@ static void prv_transition_to_accepting(AppMessageCtxOutbox *outbox) { } } -static void prv_handle_nack_or_ack_timeout(AppMessageCtxOutbox *outbox, - AppMessageResult result) { +static void prv_handle_nack_or_ack_timeout(AppMessageCtxOutbox *outbox, AppMessageResult result) { outbox->result = result; if (outbox->phase == OUT_AWAITING_REPLY) { prv_transition_to_accepting(outbox); @@ -42,7 +41,7 @@ static void prv_handle_nack_or_ack_timeout(AppMessageCtxOutbox *outbox, } static void prv_handle_outbox_error_cb(void *data) { - AppMessageResult result = (AppMessageResult)(uintptr_t) data; + AppMessageResult result = (AppMessageResult)(uintptr_t)data; _Static_assert(sizeof(result) <= sizeof(data), "AppMessageResult expected to fit in void *"); AppMessageCtxOutbox *outbox = &app_state_get_app_message_ctx()->outbox; if (outbox->phase != OUT_AWAITING_REPLY_AND_OUTBOX_CALLBACK) { @@ -69,7 +68,7 @@ AppMessageResult app_message_outbox_open(AppMessageCtxOutbox *outbox, size_t siz } else if (size_outbound == size_maximum) { APP_LOG(LOG_LEVEL_INFO, "app_message_open() called with app_message_outbox_size_maximum()."); APP_LOG(LOG_LEVEL_INFO, - "This consumes %"PRIu32" bytes of heap memory, potentially more in the future!", + "This consumes %" PRIu32 " bytes of heap memory, potentially more in the future!", (uint32_t)size_maximum); } if (size_outbound == 0) { @@ -95,8 +94,7 @@ AppMessageResult app_message_outbox_open(AppMessageCtxOutbox *outbox, size_t siz static void prv_outbox_prepare(AppMessageCtxOutbox *outbox) { AppMessagePush *push = (AppMessagePush *)outbox->app_outbox_message->payload; - dict_write_begin(&outbox->iterator, - (uint8_t *)&push->dictionary, + dict_write_begin(&outbox->iterator, (uint8_t *)&push->dictionary, outbox->transmission_size_limit - APP_MSG_HDR_OVRHD_SIZE); } @@ -134,14 +132,12 @@ static void prv_throttle(AppMessageCtxOutbox *outbox) { } static bool prv_is_message_pending(AppMessagePhaseOut phase) { - return (phase == OUT_AWAITING_REPLY_AND_OUTBOX_CALLBACK || - phase == OUT_AWAITING_REPLY || + return (phase == OUT_AWAITING_REPLY_AND_OUTBOX_CALLBACK || phase == OUT_AWAITING_REPLY || phase == OUT_AWAITING_OUTBOX_CALLBACK); } static bool prv_is_awaiting_ack(AppMessagePhaseOut phase) { - return (phase == OUT_AWAITING_REPLY_AND_OUTBOX_CALLBACK || - phase == OUT_AWAITING_REPLY); + return (phase == OUT_AWAITING_REPLY_AND_OUTBOX_CALLBACK || phase == OUT_AWAITING_REPLY); } AppMessageResult app_message_outbox_begin(DictionaryIterator **iterator) { @@ -162,7 +158,8 @@ AppMessageResult app_message_outbox_begin(DictionaryIterator **iterator) { return APP_MSG_BUSY; } else if (phase == OUT_WRITING) { - PBL_LOG_ERR("Must call app_message_outbox_send() before calling app_message_outbox_begin() again!"); + PBL_LOG_ERR( + "Must call app_message_outbox_send() before calling app_message_outbox_begin() again!"); return APP_MSG_INVALID_STATE; } else if (phase == OUT_CLOSED) { PBL_LOG_ERR("Must call app_message_open() before calling app_message_outbox_begin()!"); @@ -196,7 +193,7 @@ void app_message_outbox_handle_app_outbox_message_sent(AppOutboxStatus status, v AppMessageSenderError e = (AppMessageSenderError)status; if (e != AppMessageSenderErrorSuccess) { if (e != AppMessageSenderErrorDisconnected) { - PBL_LOG_ERR("App message corrupted outbox? %"PRIu8, (uint8_t)e); + PBL_LOG_ERR("App message corrupted outbox? %" PRIu8, (uint8_t)e); } // Sleep a bit to prevent apps that hammer app_message_outbox_begin() when disconnected to @@ -251,8 +248,7 @@ AppMessageResult app_message_outbox_send(void) { app_outbox_message->endpoint_id = APP_MESSAGE_ENDPOINT_ID; PBL_ASSERTN(!outbox->ack_nack_timer); - outbox->ack_nack_timer = app_timer_register(ACK_NACK_TIME_OUT_MS, - ack_nack_timer_callback, NULL); + outbox->ack_nack_timer = app_timer_register(ACK_NACK_TIME_OUT_MS, ack_nack_timer_callback, NULL); app_outbox_send((const uint8_t *)app_outbox_message, sizeof(AppMessageAppOutboxData) + transmission_size, @@ -270,8 +266,8 @@ void app_message_out_handle_ack_nack_received(const AppMessageHeader *header) { } if (outbox->transaction_id != header->transaction_id) { - PBL_LOG_ERR("Tx ID mismatch: %"PRIu8" != %"PRIu8, - outbox->transaction_id, header->transaction_id); + PBL_LOG_ERR("Tx ID mismatch: %" PRIu8 " != %" PRIu8, outbox->transaction_id, + header->transaction_id); return; } @@ -297,4 +293,3 @@ AppTimer *app_message_outbox_get_ack_nack_timer(void) { AppMessageCtxOutbox *outbox = &app_state_get_app_message_ctx()->outbox; return outbox ? outbox->ack_nack_timer : NULL; } - diff --git a/src/fw/applib/app_message/app_message_receiver.c b/src/fw/applib/app_message/app_message_receiver.c index c20853b0f0..c1bae16ce3 100644 --- a/src/fw/applib/app_message/app_message_receiver.c +++ b/src/fw/applib/app_message/app_message_receiver.c @@ -32,7 +32,7 @@ bool app_message_receiver_open(size_t buffer_size) { // Allocate overhead for 1 (N)ACK + 1 Push message: static const uint32_t min_num_messages = 2; size_t final_buffer_size = - (sizeof(AppMessageReceiverHeader) * min_num_messages) + buffer_size + sizeof(AppMessageAck); + (sizeof(AppMessageReceiverHeader) * min_num_messages) + buffer_size + sizeof(AppMessageAck); AppInbox *inbox = app_inbox_create_and_register(final_buffer_size, min_num_messages, app_message_receiver_message_handler, app_message_receiver_dropped_handler); diff --git a/src/fw/applib/app_outbox.c b/src/fw/applib/app_outbox.c index ef90479db0..c6e0724bb2 100644 --- a/src/fw/applib/app_outbox.c +++ b/src/fw/applib/app_outbox.c @@ -11,16 +11,16 @@ static void prv_handle_event(PebbleEvent *e, void *unused) { sent_event->sent_handler(sent_event->status, sent_event->cb_ctx); } -void app_outbox_send(const uint8_t *data, size_t length, - AppOutboxSentHandler sent_handler, void *cb_ctx) { +void app_outbox_send(const uint8_t *data, size_t length, AppOutboxSentHandler sent_handler, + void *cb_ctx) { sys_app_outbox_send(data, length, sent_handler, cb_ctx); } void app_outbox_init(void) { EventServiceInfo *info = app_state_get_app_outbox_subscription_info(); - *info = (EventServiceInfo) { - .type = PEBBLE_APP_OUTBOX_SENT_EVENT, - .handler = prv_handle_event, + *info = (EventServiceInfo){ + .type = PEBBLE_APP_OUTBOX_SENT_EVENT, + .handler = prv_handle_event, }; event_service_client_subscribe(info); } diff --git a/src/fw/applib/app_outbox.h b/src/fw/applib/app_outbox.h index 7b6be9e5a4..3855c566a3 100644 --- a/src/fw/applib/app_outbox.h +++ b/src/fw/applib/app_outbox.h @@ -30,8 +30,8 @@ typedef void (*AppOutboxSentHandler)(AppOutboxStatus status, void *cb_ctx); //! after which the `data` buffer will be no longer in use. Note that the `sent_handler` MUST be //! white-listed in app_outbox_service.c. //! @param cb_ctx Pointer to user data that will be passed into the `sent_handler` -void app_outbox_send(const uint8_t *data, size_t length, - AppOutboxSentHandler sent_handler, void *cb_ctx); +void app_outbox_send(const uint8_t *data, size_t length, AppOutboxSentHandler sent_handler, + void *cb_ctx); //! To be called once per app launch by the system. void app_outbox_init(void); diff --git a/src/fw/applib/app_sync/app_sync.c b/src/fw/applib/app_sync/app_sync.c index 1ae301d8a0..28add9945f 100644 --- a/src/fw/applib/app_sync/app_sync.c +++ b/src/fw/applib/app_sync/app_sync.c @@ -15,8 +15,8 @@ static void delegate_errors(AppSync *s, DictionaryResult dict_result, } } -static void update_key_callback(const uint32_t key, const Tuple *new_tuple, - const Tuple *old_tuple, void *context) { +static void update_key_callback(const uint32_t key, const Tuple *new_tuple, const Tuple *old_tuple, + void *context) { AppSync *s = context; if (s->callback.value_changed) { s->callback.value_changed(key, new_tuple, old_tuple, s->callback.context); @@ -36,10 +36,8 @@ static void update_callback(DictionaryIterator *updated_iter, void *context) { AppSync *s = context; uint32_t size = s->buffer_size; const bool update_existing_keys_only = true; - DictionaryResult result = dict_merge(&s->current_iter, &size, - updated_iter, - update_existing_keys_only, - update_key_callback, s); + DictionaryResult result = dict_merge(&s->current_iter, &size, updated_iter, + update_existing_keys_only, update_key_callback, s); delegate_errors(s, result, APP_MSG_OK); } @@ -55,12 +53,10 @@ static void in_dropped_callback(AppMessageResult reason, void *context) { } // FIXME PBL-1709: this should return an AppMessageResult ... -void app_sync_init(AppSync *s, - uint8_t *buffer, const uint16_t buffer_size, - const Tuplet * const keys_and_initial_values, const uint8_t count, +void app_sync_init(AppSync *s, uint8_t *buffer, const uint16_t buffer_size, + const Tuplet *const keys_and_initial_values, const uint8_t count, AppSyncTupleChangedCallback tuple_changed_callback, - AppSyncErrorCallback error_callback, - void *context) { + AppSyncErrorCallback error_callback, void *context) { PBL_ASSERTN(buffer != NULL); PBL_ASSERTN(buffer_size > 0); s->buffer = buffer; @@ -70,7 +66,7 @@ void app_sync_init(AppSync *s, s->callback.context = context; uint32_t in_out_size = buffer_size; const DictionaryResult dict_result = dict_serialize_tuplets_to_buffer_with_iter( - &s->current_iter, keys_and_initial_values, count, s->buffer, &in_out_size); + &s->current_iter, keys_and_initial_values, count, s->buffer, &in_out_size); app_message_set_context(s); app_message_register_outbox_sent(update_callback); app_message_register_outbox_failed(out_failed_callback); @@ -89,7 +85,7 @@ void app_sync_deinit(AppSync *s) { s->current = NULL; } -AppMessageResult app_sync_set(AppSync *s, const Tuplet * const updated_keys_and_values, +AppMessageResult app_sync_set(AppSync *s, const Tuplet *const updated_keys_and_values, const uint8_t count) { DictionaryIterator *iter; AppMessageResult result = app_message_outbox_begin(&iter); @@ -103,6 +99,6 @@ AppMessageResult app_sync_set(AppSync *s, const Tuplet * const updated_keys_and_ return app_message_outbox_send(); } -const Tuple * app_sync_get(const AppSync *s, const uint32_t key) { +const Tuple *app_sync_get(const AppSync *s, const uint32_t key) { return dict_find(&s->current_iter, key); } diff --git a/src/fw/applib/app_sync/app_sync.h b/src/fw/applib/app_sync/app_sync.h index c1dc89ca89..d4a3eeaba6 100644 --- a/src/fw/applib/app_sync/app_sync.h +++ b/src/fw/applib/app_sync/app_sync.h @@ -98,11 +98,10 @@ typedef void (*AppSyncErrorCallback)(DictionaryResult dict_error, //! accepted by AppSync, updates for other keys that might come in will just be //! ignored. void app_sync_init(struct AppSync *s, uint8_t *buffer, const uint16_t buffer_size, - const Tuplet * const keys_and_initial_values, const uint8_t count, + const Tuplet *const keys_and_initial_values, const uint8_t count, AppSyncTupleChangedCallback tuple_changed_callback, AppSyncErrorCallback error_callback, void *context); - //! Cleans up an AppSync system. //! It frees the buffer allocated by an \ref app_sync_init() call and //! deregisters itself from the \ref AppMessage subsystem. @@ -122,7 +121,7 @@ void app_sync_deinit(struct AppSync *s); //! @param count The number of Tuplets in the `keys_and_values_to_update` array. //! @return The result code from the \ref AppMessage subsystem. //! Can be \ref APP_MSG_OK, \ref APP_MSG_BUSY or \ref APP_MSG_INVALID_ARGS -AppMessageResult app_sync_set(struct AppSync *s, const Tuplet * const keys_and_values_to_update, +AppMessageResult app_sync_set(struct AppSync *s, const Tuplet *const keys_and_values_to_update, const uint8_t count); //! Finds and gets a tuple in the "current" dictionary. @@ -130,8 +129,7 @@ AppMessageResult app_sync_set(struct AppSync *s, const Tuplet * const keys_and_v //! @param key The key for which to find a Tuple //! @return Pointer to a found Tuple, or NULL if there was no Tuple with the //! specified key. -const Tuple * app_sync_get(const struct AppSync *s, const uint32_t key); - +const Tuple *app_sync_get(const struct AppSync *s, const uint32_t key); //! @} // end addtogroup AppSync //! @} // end addtogroup Foundation diff --git a/src/fw/applib/app_timer.c b/src/fw/applib/app_timer.c index 9d5ffdde59..28214d6bb9 100644 --- a/src/fw/applib/app_timer.c +++ b/src/fw/applib/app_timer.c @@ -11,22 +11,17 @@ //! //! Surprise! All this is is a dumb wrapper around evented_timer! -DEFINE_SYSCALL(AppTimer*, app_timer_register, uint32_t timeout_ms, - AppTimerCallback callback, - void* callback_data) { +DEFINE_SYSCALL(AppTimer *, app_timer_register, uint32_t timeout_ms, AppTimerCallback callback, + void *callback_data) { // No need to check callback_data, we only dereference it in userspace anyway. - return (AppTimer*)(uintptr_t)evented_timer_register(timeout_ms, false, callback, callback_data); + return (AppTimer *)(uintptr_t)evented_timer_register(timeout_ms, false, callback, callback_data); } -DEFINE_SYSCALL(AppTimer*, app_timer_register_repeatable, uint32_t timeout_ms, - AppTimerCallback callback, - void* callback_data, - bool repeating) { +DEFINE_SYSCALL(AppTimer *, app_timer_register_repeatable, uint32_t timeout_ms, + AppTimerCallback callback, void *callback_data, bool repeating) { // No need to check callback_data, we only dereference it in userspace anyway. - return (AppTimer*)(uintptr_t)evented_timer_register(timeout_ms, - repeating, - callback, - callback_data); + return (AppTimer *)(uintptr_t)evented_timer_register(timeout_ms, repeating, callback, + callback_data); } DEFINE_SYSCALL(bool, app_timer_reschedule, AppTimer *timer, uint32_t new_timeout_ms) { @@ -36,7 +31,8 @@ DEFINE_SYSCALL(bool, app_timer_reschedule, AppTimer *timer, uint32_t new_timeout return (false); } if (!evented_timer_is_current_task((EventedTimerID)timer)) { - APP_LOG(APP_LOG_LEVEL_ERROR, "Invalid timer %u used in app_timer_reschedule", (unsigned)timer); + APP_LOG(APP_LOG_LEVEL_ERROR, "Invalid timer %u used in app_timer_reschedule", + (unsigned)timer); syscall_failed(); } } @@ -50,7 +46,8 @@ DEFINE_SYSCALL(void, app_timer_cancel, AppTimer *timer) { return; } if (!evented_timer_is_current_task((EventedTimerID)timer)) { - APP_LOG(APP_LOG_LEVEL_ERROR, "Invalid timer %u used in app_timer_reschedule", (unsigned)timer); + APP_LOG(APP_LOG_LEVEL_ERROR, "Invalid timer %u used in app_timer_reschedule", + (unsigned)timer); syscall_failed(); } } @@ -64,7 +61,8 @@ DEFINE_SYSCALL(void *, app_timer_get_data, AppTimer *timer) { return NULL; } if (!evented_timer_is_current_task((EventedTimerID)timer)) { - APP_LOG(APP_LOG_LEVEL_ERROR, "Invalid timer %u used in app_timer_reschedule", (unsigned)timer); + APP_LOG(APP_LOG_LEVEL_ERROR, "Invalid timer %u used in app_timer_reschedule", + (unsigned)timer); syscall_failed(); } } diff --git a/src/fw/applib/app_timer.h b/src/fw/applib/app_timer.h index 8cb69cbc49..dedc833e8e 100644 --- a/src/fw/applib/app_timer.h +++ b/src/fw/applib/app_timer.h @@ -16,16 +16,17 @@ struct AppTimer; typedef struct AppTimer AppTimer; -//! The type of function which can be called when a timer fires. The argument will be the @p callback_data passed to +//! The type of function which can be called when a timer fires. The argument will be the @p +//! callback_data passed to //! @ref app_timer_register(). -typedef void (*AppTimerCallback)(void* data); +typedef void (*AppTimerCallback)(void *data); //! Registers a timer that ends up in callback being called some specified time in the future. //! @param timeout_ms The expiry time in milliseconds from the current time //! @param callback The callback that gets called at expiry time //! @param callback_data The data that will be passed to callback //! @return A pointer to an `AppTimer` that can be used to later reschedule or cancel this timer -AppTimer* app_timer_register(uint32_t timeout_ms, AppTimerCallback callback, void* callback_data); +AppTimer *app_timer_register(uint32_t timeout_ms, AppTimerCallback callback, void *callback_data); //! @internal //! Registers a timer that ends up in callback being called repeatedly at a specified interval @@ -33,10 +34,8 @@ AppTimer* app_timer_register(uint32_t timeout_ms, AppTimerCallback callback, voi //! @param callback The callback that gets called at every interval //! @param callback_data The data that will be passed to callback //! @return A pointer to an `AppTimer` that can be used to later reschedule or cancel this timer -AppTimer* app_timer_register_repeatable(uint32_t timeout_ms, - AppTimerCallback callback, - void* callback_data, - bool repeating); +AppTimer *app_timer_register_repeatable(uint32_t timeout_ms, AppTimerCallback callback, + void *callback_data, bool repeating); //! @internal //! Get the data passed to the app timer @@ -56,4 +55,3 @@ void app_timer_cancel(AppTimer *timer_handle); //! @} // group Timer //! @} // group Foundation - diff --git a/src/fw/applib/app_wakeup.c b/src/fw/applib/app_wakeup.c index 99d8dc212a..b959db865c 100644 --- a/src/fw/applib/app_wakeup.c +++ b/src/fw/applib/app_wakeup.c @@ -48,7 +48,7 @@ void app_wakeup_cancel_all(void) { bool app_wakeup_get_launch_event(WakeupId *wakeup_id, int32_t *cookie) { WakeupInfo wakeup_info; sys_process_get_wakeup_info(&wakeup_info); - //If the id is invalid, return false + // If the id is invalid, return false if (wakeup_info.wakeup_id <= 0) { return false; } diff --git a/src/fw/applib/app_wakeup.h b/src/fw/applib/app_wakeup.h index 896bb7d11e..61ee239122 100644 --- a/src/fw/applib/app_wakeup.h +++ b/src/fw/applib/app_wakeup.h @@ -3,7 +3,6 @@ #pragma once - #include #include @@ -16,25 +15,25 @@ //! \brief Allows applications to schedule to be launched even if they are not running. //! @{ - -//! The type of function which can be called when a wakeup event occurs. -//! The arguments will be the id of the wakeup event that occurred, +//! The type of function which can be called when a wakeup event occurs. +//! The arguments will be the id of the wakeup event that occurred, //! as well as the scheduled cookie provided to @c wakeup_schedule. typedef void (*WakeupHandler)(WakeupId wakeup_id, int32_t cookie); //! Registers a WakeupHandler to be called when wakeup events occur. //! @note The handler is only called for wakeup events which occur while the app is already running; -//! use @c launch_reason() === \ref APP_LAUNCH_WAKEUP to detect when the app was launched by a wakeup event. +//! use @c launch_reason() === \ref APP_LAUNCH_WAKEUP to detect when the app was launched by a +//! wakeup event. //! @param handler The callback that gets called when the wakeup event occurs void app_wakeup_service_subscribe(WakeupHandler handler); //! Registers a wakeup event that triggers a callback at the specified time. //! Applications may only schedule up to 8 wakeup events. -//! Wakeup events are given a 1 minute duration window, in that no application may schedule a +//! Wakeup events are given a 1 minute duration window, in that no application may schedule a //! wakeup event with 1 minute of a currently scheduled wakeup event. //! @param timestamp The requested time (UTC) for the wakeup event to occur //! @param cookie The application specific reason for the wakeup event -//! @param notify_if_missed On powering on Pebble, will alert user when +//! @param notify_if_missed On powering on Pebble, will alert user when //! notifications were missed due to Pebble being off. //! @return negative values indicate errors (StatusCode) //! E_RANGE if the event cannot be scheduled due to another event in that period. @@ -71,4 +70,3 @@ bool app_wakeup_query(WakeupId wakeup_id, time_t *timestamp); //! @} // group Wakeup //! @} // group Foundation - diff --git a/src/fw/applib/app_watch_info.c b/src/fw/applib/app_watch_info.c index 63903258f1..bc3ab322f9 100644 --- a/src/fw/applib/app_watch_info.c +++ b/src/fw/applib/app_watch_info.c @@ -82,9 +82,9 @@ WatchInfoModel watch_info_get_model() { } WatchInfoVersion watch_info_get_firmware_version(void) { - return (WatchInfoVersion) { - .major = GIT_MAJOR_VERSION, - .minor = GIT_MINOR_VERSION, - .patch = GIT_PATCH_VERSION + return (WatchInfoVersion){ + .major = GIT_MAJOR_VERSION, + .minor = GIT_MINOR_VERSION, + .patch = GIT_PATCH_VERSION }; } diff --git a/src/fw/applib/app_watch_info.h b/src/fw/applib/app_watch_info.h index af982bed2f..0ce3c72124 100644 --- a/src/fw/applib/app_watch_info.h +++ b/src/fw/applib/app_watch_info.h @@ -16,19 +16,19 @@ //! The different watch models. typedef enum { - WATCH_INFO_MODEL_UNKNOWN, //!< Unknown model - WATCH_INFO_MODEL_PEBBLE_ORIGINAL, //!< Original Pebble - WATCH_INFO_MODEL_PEBBLE_STEEL, //!< Pebble Steel - WATCH_INFO_MODEL_PEBBLE_TIME, //!< Pebble Time - WATCH_INFO_MODEL_PEBBLE_TIME_STEEL, //!< Pebble Time Steel - WATCH_INFO_MODEL_PEBBLE_TIME_ROUND_14, //!< Pebble Time Round, 14mm lug size - WATCH_INFO_MODEL_PEBBLE_TIME_ROUND_20, //!< Pebble Time Round, 20mm lug size - WATCH_INFO_MODEL_PEBBLE_2_HR, //!< Pebble 2 HR - WATCH_INFO_MODEL_PEBBLE_2_SE, //!< Pebble 2 SE - WATCH_INFO_MODEL_PEBBLE_TIME_2, //!< Pebble Time 2 - WATCH_INFO_MODEL_COREDEVICES_P2D, //!< CoreDevices P2D (Pebble 2 Duo) - WATCH_INFO_MODEL_COREDEVICES_PT2, //!< CoreDevices PT2 (Pebble Time 2) - WATCH_INFO_MODEL_COREDEVICES_PR2, //!< CoreDevices PR2 (Pebble Round 2) + WATCH_INFO_MODEL_UNKNOWN, //!< Unknown model + WATCH_INFO_MODEL_PEBBLE_ORIGINAL, //!< Original Pebble + WATCH_INFO_MODEL_PEBBLE_STEEL, //!< Pebble Steel + WATCH_INFO_MODEL_PEBBLE_TIME, //!< Pebble Time + WATCH_INFO_MODEL_PEBBLE_TIME_STEEL, //!< Pebble Time Steel + WATCH_INFO_MODEL_PEBBLE_TIME_ROUND_14, //!< Pebble Time Round, 14mm lug size + WATCH_INFO_MODEL_PEBBLE_TIME_ROUND_20, //!< Pebble Time Round, 20mm lug size + WATCH_INFO_MODEL_PEBBLE_2_HR, //!< Pebble 2 HR + WATCH_INFO_MODEL_PEBBLE_2_SE, //!< Pebble 2 SE + WATCH_INFO_MODEL_PEBBLE_TIME_2, //!< Pebble Time 2 + WATCH_INFO_MODEL_COREDEVICES_P2D, //!< CoreDevices P2D (Pebble 2 Duo) + WATCH_INFO_MODEL_COREDEVICES_PT2, //!< CoreDevices PT2 (Pebble Time 2) + WATCH_INFO_MODEL_COREDEVICES_PR2, //!< CoreDevices PR2 (Pebble Round 2) WATCH_INFO_MODEL__MAX } WatchInfoModel; @@ -37,70 +37,71 @@ typedef enum { // This color enum is programmed by the factory into the factory registry. Therefore these // numbers must not change. typedef enum { - WATCH_INFO_COLOR_UNKNOWN = 0, //!< Unknown color - WATCH_INFO_COLOR_BLACK = 1, //!< Black - WATCH_INFO_COLOR_WHITE = 2, //!< White - WATCH_INFO_COLOR_RED = 3, //!< Red - WATCH_INFO_COLOR_ORANGE = 4, //!< Orange - WATCH_INFO_COLOR_GRAY = 5, //!< Gray - - WATCH_INFO_COLOR_STAINLESS_STEEL = 6, //!< Stainless Steel - WATCH_INFO_COLOR_MATTE_BLACK = 7, //!< Matte Black - - WATCH_INFO_COLOR_BLUE = 8, //!< Blue - WATCH_INFO_COLOR_GREEN = 9, //!< Green - WATCH_INFO_COLOR_PINK = 10, //!< Pink - - WATCH_INFO_COLOR_TIME_WHITE = 11, //!< Time White - WATCH_INFO_COLOR_TIME_BLACK = 12, //!< Time Black - WATCH_INFO_COLOR_TIME_RED = 13, //!< Time Red - - WATCH_INFO_COLOR_TIME_STEEL_SILVER = 14, //!< Time Steel Silver - WATCH_INFO_COLOR_TIME_STEEL_BLACK = 15, //!< Time Steel Black - WATCH_INFO_COLOR_TIME_STEEL_GOLD = 16, //!< Time Steel Gold - - WATCH_INFO_COLOR_TIME_ROUND_SILVER_14 = 17, //!< Time Round 14mm lug size, Silver - WATCH_INFO_COLOR_TIME_ROUND_BLACK_14 = 18, //!< Time Round 14mm lug size, Black - WATCH_INFO_COLOR_TIME_ROUND_SILVER_20 = 19, //!< Time Round 20mm lug size, Silver - WATCH_INFO_COLOR_TIME_ROUND_BLACK_20 = 20, //!< Time Round 20mm lug size, Black - WATCH_INFO_COLOR_TIME_ROUND_ROSE_GOLD_14 = 21, //!< Time Round 14mm lug size, Rose Gold - - WATCH_INFO_COLOR_PEBBLE_2_HR_BLACK = 25, //!< Pebble 2 HR, Black / Charcoal - WATCH_INFO_COLOR_PEBBLE_2_HR_LIME = 27, //!< Pebble 2 HR, Charcoal / Sorbet Green - WATCH_INFO_COLOR_PEBBLE_2_HR_FLAME = 28, //!< Pebble 2 HR, Charcoal / Red - WATCH_INFO_COLOR_PEBBLE_2_HR_WHITE = 29, //!< Pebble 2 HR, White / Gray - WATCH_INFO_COLOR_PEBBLE_2_HR_AQUA = 30, //!< Pebble 2 HR, White / Turquoise - - WATCH_INFO_COLOR_PEBBLE_2_SE_BLACK = 24, //!< Pebble 2 SE, Black / Charcoal - WATCH_INFO_COLOR_PEBBLE_2_SE_WHITE = 26, //!< Pebble 2 SE, White / Gray - - WATCH_INFO_COLOR_PEBBLE_TIME_2_BLACK = 31, //!< Pebble Time 2, Black - WATCH_INFO_COLOR_PEBBLE_TIME_2_SILVER = 32, //!< Pebble Time 2, Silver - WATCH_INFO_COLOR_PEBBLE_TIME_2_GOLD = 33, //!< Pebble Time 2, Gold - - WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK = 34, //!< CoreDevices P2D, Black - WATCH_INFO_COLOR_COREDEVICES_P2D_WHITE = 35, //!< CoreDevices P2D, White - - WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY = 36, //!< CoreDevices PT2, Black/Grey - WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_RED = 37, //!< CoreDevices PT2, Black/Red - WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_BLUE = 38, //!< CoreDevices PT2, Silver/Blue - WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_GREY = 39, //!< CoreDevices PT2, Silver/Grey - - WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20 = 40, //!< CoreDevices PR2, Black (20mm) - WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20 = 41, //!< CoreDevices PR2, Silver (20mm) - WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14 = 42, //!< CoreDevices PR2, Gold (14mm) - WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14 = 43, //!< CoreDevices PR2, Silver (14mm) + WATCH_INFO_COLOR_UNKNOWN = 0, //!< Unknown color + WATCH_INFO_COLOR_BLACK = 1, //!< Black + WATCH_INFO_COLOR_WHITE = 2, //!< White + WATCH_INFO_COLOR_RED = 3, //!< Red + WATCH_INFO_COLOR_ORANGE = 4, //!< Orange + WATCH_INFO_COLOR_GRAY = 5, //!< Gray + + WATCH_INFO_COLOR_STAINLESS_STEEL = 6, //!< Stainless Steel + WATCH_INFO_COLOR_MATTE_BLACK = 7, //!< Matte Black + + WATCH_INFO_COLOR_BLUE = 8, //!< Blue + WATCH_INFO_COLOR_GREEN = 9, //!< Green + WATCH_INFO_COLOR_PINK = 10, //!< Pink + + WATCH_INFO_COLOR_TIME_WHITE = 11, //!< Time White + WATCH_INFO_COLOR_TIME_BLACK = 12, //!< Time Black + WATCH_INFO_COLOR_TIME_RED = 13, //!< Time Red + + WATCH_INFO_COLOR_TIME_STEEL_SILVER = 14, //!< Time Steel Silver + WATCH_INFO_COLOR_TIME_STEEL_BLACK = 15, //!< Time Steel Black + WATCH_INFO_COLOR_TIME_STEEL_GOLD = 16, //!< Time Steel Gold + + WATCH_INFO_COLOR_TIME_ROUND_SILVER_14 = 17, //!< Time Round 14mm lug size, Silver + WATCH_INFO_COLOR_TIME_ROUND_BLACK_14 = 18, //!< Time Round 14mm lug size, Black + WATCH_INFO_COLOR_TIME_ROUND_SILVER_20 = 19, //!< Time Round 20mm lug size, Silver + WATCH_INFO_COLOR_TIME_ROUND_BLACK_20 = 20, //!< Time Round 20mm lug size, Black + WATCH_INFO_COLOR_TIME_ROUND_ROSE_GOLD_14 = 21, //!< Time Round 14mm lug size, Rose Gold + + WATCH_INFO_COLOR_PEBBLE_2_HR_BLACK = 25, //!< Pebble 2 HR, Black / Charcoal + WATCH_INFO_COLOR_PEBBLE_2_HR_LIME = 27, //!< Pebble 2 HR, Charcoal / Sorbet Green + WATCH_INFO_COLOR_PEBBLE_2_HR_FLAME = 28, //!< Pebble 2 HR, Charcoal / Red + WATCH_INFO_COLOR_PEBBLE_2_HR_WHITE = 29, //!< Pebble 2 HR, White / Gray + WATCH_INFO_COLOR_PEBBLE_2_HR_AQUA = 30, //!< Pebble 2 HR, White / Turquoise + + WATCH_INFO_COLOR_PEBBLE_2_SE_BLACK = 24, //!< Pebble 2 SE, Black / Charcoal + WATCH_INFO_COLOR_PEBBLE_2_SE_WHITE = 26, //!< Pebble 2 SE, White / Gray + + WATCH_INFO_COLOR_PEBBLE_TIME_2_BLACK = 31, //!< Pebble Time 2, Black + WATCH_INFO_COLOR_PEBBLE_TIME_2_SILVER = 32, //!< Pebble Time 2, Silver + WATCH_INFO_COLOR_PEBBLE_TIME_2_GOLD = 33, //!< Pebble Time 2, Gold + + WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK = 34, //!< CoreDevices P2D, Black + WATCH_INFO_COLOR_COREDEVICES_P2D_WHITE = 35, //!< CoreDevices P2D, White + + WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY = 36, //!< CoreDevices PT2, Black/Grey + WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_RED = 37, //!< CoreDevices PT2, Black/Red + WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_BLUE = 38, //!< CoreDevices PT2, Silver/Blue + WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_GREY = 39, //!< CoreDevices PT2, Silver/Grey + + WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20 = 40, //!< CoreDevices PR2, Black (20mm) + WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20 = 41, //!< CoreDevices PR2, Silver (20mm) + WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14 = 42, //!< CoreDevices PR2, Gold (14mm) + WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14 = 43, //!< CoreDevices PR2, Silver (14mm) WATCH_INFO_COLOR__MAX } WatchInfoColor; //! Data structure containing the version of the firmware running on the watch. -//! The version of the firmware has the form X.[X.[X]]. If a version number is not present it will be 0. -//! For example: the version numbers of 2.4.1 are 2, 4, and 1. The version numbers of 2.4 are 2, 4, and 0. +//! The version of the firmware has the form X.[X.[X]]. If a version number is not present it will +//! be 0. For example: the version numbers of 2.4.1 are 2, 4, and 1. The version numbers of 2.4 are +//! 2, 4, and 0. typedef struct { - uint8_t major; //!< Major version number - uint8_t minor; //!< Minor version number - uint8_t patch; //!< Patch version number + uint8_t major; //!< Major version number + uint8_t minor; //!< Minor version number + uint8_t patch; //!< Patch version number } WatchInfoVersion; //! Provides the model of the watch. @@ -116,4 +117,3 @@ WatchInfoColor sys_watch_info_get_color(void); //! @} // end addtogroup WatchInfo //! @} // end addtogroup Foundation - diff --git a/src/fw/applib/app_worker.c b/src/fw/applib/app_worker.c index 6d846110f9..294b256285 100644 --- a/src/fw/applib/app_worker.c +++ b/src/fw/applib/app_worker.c @@ -4,46 +4,39 @@ #include "syscall/syscall.h" #include "app_worker.h" - // --------------------------------------------------------------------------------------------------------------- // Determine if the worker for the current app is running bool app_worker_is_running(void) { return sys_app_worker_is_running(); } - // --------------------------------------------------------------------------------------------------------------- // Launch the worker for the current app AppWorkerResult app_worker_launch(void) { return sys_app_worker_launch(); } - // --------------------------------------------------------------------------------------------------------------- // Kill the worker for the current app AppWorkerResult app_worker_kill(void) { return sys_app_worker_kill(); } - // --------------------------------------------------------------------------------------------------------------- // Subscribe to the app_message service bool app_worker_message_subscribe(AppWorkerMessageHandler handler) { return plugin_service_subscribe(NULL, (PluginServiceHandler)(void *)handler); } - // --------------------------------------------------------------------------------------------------------------- // Unsubscribe from a specific plug-in service by uuid. bool app_worker_message_unsubscribe(void) { return plugin_service_unsubscribe(NULL); } - // --------------------------------------------------------------------------------------------------------------- // Send an event to all registered subscribers of the given plugin service identified by UUID. void app_worker_send_message(uint8_t type, AppWorkerMessage *data) { _Static_assert(sizeof(AppWorkerMessage) == sizeof(PluginEventData), "These must match!"); plugin_service_send_event(NULL, type, (PluginEventData *)data); } - diff --git a/src/fw/applib/app_worker.h b/src/fw/applib/app_worker.h index 5beb0ad437..dab4d7b9be 100644 --- a/src/fw/applib/app_worker.h +++ b/src/fw/applib/app_worker.h @@ -12,11 +12,10 @@ //! \brief Runs in the background, and can communicate with the foreground app. //! @{ - //! Possible error codes from app_worker_launch, app_worker_kill typedef enum { //! Success - APP_WORKER_RESULT_SUCCESS= 0, + APP_WORKER_RESULT_SUCCESS = 0, //! No worker found for the current app APP_WORKER_RESULT_NO_WORKER = 1, //! A worker for a different app is already running @@ -29,7 +28,6 @@ typedef enum { APP_WORKER_RESULT_ASKING_CONFIRMATION = 5, } AppWorkerResult; - //! Generic structure of a worker message that can be sent between an app and its worker typedef struct { uint16_t data0; @@ -37,13 +35,12 @@ typedef struct { uint16_t data2; } AppWorkerMessage; - //! Determine if the worker for the current app is running //! @return true if running bool app_worker_is_running(void); -//! Launch the worker for the current app. Note that this is an asynchronous operation, a result code -//! of APP_WORKER_RESULT_SUCCESS merely means that the request was successfully queued up. +//! Launch the worker for the current app. Note that this is an asynchronous operation, a result +//! code of APP_WORKER_RESULT_SUCCESS merely means that the request was successfully queued up. //! @return result code AppWorkerResult app_worker_launch(void); @@ -52,19 +49,20 @@ AppWorkerResult app_worker_launch(void); //! @return result code AppWorkerResult app_worker_kill(void); - //! Callback type for worker messages. Messages can be sent from worker to app or vice versa. //! @param type An application defined message type -//! @param data pointer to message data. The receiver must know the structure of the data provided by the sender. +//! @param data pointer to message data. The receiver must know the structure of the data provided +//! by the sender. typedef void (*AppWorkerMessageHandler)(uint16_t type, AppWorkerMessage *data); -//! Subscribe to worker messages. Once subscribed, the handler gets called on every message emitted by the other task -//! (either worker or app). +//! Subscribe to worker messages. Once subscribed, the handler gets called on every message emitted +//! by the other task (either worker or app). //! @param handler A callback to be executed when the event is received //! @return true on success bool app_worker_message_subscribe(AppWorkerMessageHandler handler); -//! Unsubscribe from worker messages. Once unsubscribed, the previously registered handler will no longer be called. +//! Unsubscribe from worker messages. Once unsubscribed, the previously registered handler will no +//! longer be called. //! @return true on success bool app_worker_message_unsubscribe(void); @@ -73,12 +71,9 @@ bool app_worker_message_unsubscribe(void); //! @param data the message data structure void app_worker_send_message(uint8_t type, AppWorkerMessage *data); - //! @} // end addtogroup AppWorker //! @} // end addtogroup Foundation //! @internal //! Register the app message service with the event service system void app_worker_message_init(void); - - diff --git a/src/fw/applib/applib_resource.c b/src/fw/applib/applib_resource.c index 637644eeec..09f57fa5c7 100644 --- a/src/fw/applib/applib_resource.c +++ b/src/fw/applib/applib_resource.c @@ -22,24 +22,24 @@ size_t applib_resource_size(ResHandle h) { } size_t applib_resource_load(ResHandle h, uint8_t *buffer, size_t max_length) { - return sys_resource_load_range(sys_get_current_resource_num(), - (uint32_t)h, 0, buffer, max_length); + return sys_resource_load_range(sys_get_current_resource_num(), (uint32_t)h, 0, buffer, + max_length); } -size_t applib_resource_load_byte_range( - ResHandle h, uint32_t start_offset, uint8_t *buffer, size_t num_bytes) { - return sys_resource_load_range(sys_get_current_resource_num(), - (uint32_t)h, start_offset, buffer, num_bytes); +size_t applib_resource_load_byte_range(ResHandle h, uint32_t start_offset, uint8_t *buffer, + size_t num_bytes) { + return sys_resource_load_range(sys_get_current_resource_num(), (uint32_t)h, start_offset, buffer, + num_bytes); } -void *applib_resource_mmap_or_load(ResAppNum app_num, uint32_t resource_id, - size_t offset, size_t num_bytes, bool used_aligned) { +void *applib_resource_mmap_or_load(ResAppNum app_num, uint32_t resource_id, size_t offset, + size_t num_bytes, bool used_aligned) { if (num_bytes == 0) { return NULL; } - const uint8_t *mapped_data = (app_num == SYSTEM_APP) ? - sys_resource_read_only_bytes(SYSTEM_APP, resource_id, NULL) : NULL; + const uint8_t *mapped_data = + (app_num == SYSTEM_APP) ? sys_resource_read_only_bytes(SYSTEM_APP, resource_id, NULL) : NULL; uint8_t *result = NULL; @@ -51,8 +51,8 @@ void *applib_resource_mmap_or_load(ResAppNum app_num, uint32_t resource_id, // we are wasting 7 bytes here so that clients of this API have the chance to // align the data result = applib_malloc(num_bytes + (used_aligned ? 7 : 0)); - if (!result || sys_resource_load_range(app_num, resource_id, offset, - result, num_bytes) != num_bytes) { + if (!result || + sys_resource_load_range(app_num, resource_id, offset, result, num_bytes) != num_bytes) { applib_free(result); return NULL; } @@ -67,7 +67,6 @@ void applib_resource_munmap_or_free(void *bytes) { } } - // Mmapped resources are direct pointers into never-freed flash: nothing to // refcount or release, callers must just not free() them. static bool prv_resource_is_mmapped(const void *bytes) { diff --git a/src/fw/applib/applib_resource.h b/src/fw/applib/applib_resource.h index bca7b53a5b..04f4db298f 100644 --- a/src/fw/applib/applib_resource.h +++ b/src/fw/applib/applib_resource.h @@ -7,7 +7,8 @@ #include //! @file applib_resource.h -//! Wrapper functions for the resource syscalls. These functions give us a nice interface to export to 3rd party apps. +//! Wrapper functions for the resource syscalls. These functions give us a nice interface to export +//! to 3rd party apps. //! @addtogroup Foundation //! @{ @@ -32,7 +33,7 @@ //! Opaque reference to a resource. //! @see @c resource_get_handle() -typedef void * ResHandle; +typedef void *ResHandle; //! Gets the resource handle for a file identifier. //! @param resource_id The resource ID @@ -79,9 +80,8 @@ size_t applib_resource_load(ResHandle h, uint8_t *buffer, size_t max_length); //! @param buffer The buffer to load the resource data into //! @param num_bytes The maximum number of bytes to copy //! @return The number of bytes actually copied -size_t applib_resource_load_byte_range( - ResHandle h, uint32_t start_offset, uint8_t *buffer, size_t num_bytes); +size_t applib_resource_load_byte_range(ResHandle h, uint32_t start_offset, uint8_t *buffer, + size_t num_bytes); //! @} // end addtogroup Resources //! @} // end addtogroup Foundation - diff --git a/src/fw/applib/applib_resource_private.h b/src/fw/applib/applib_resource_private.h index b39e50ac55..8cf4bccb70 100644 --- a/src/fw/applib/applib_resource_private.h +++ b/src/fw/applib/applib_resource_private.h @@ -34,8 +34,8 @@ bool applib_resource_munmap_all(); //! @param length The number of bytes to load //! @param used_aligned True, if you want this function to allocate 7 extra bytes if it cannot mmap //! @return NULL, if the resource couldn't be memory-mapped or allocated -void *applib_resource_mmap_or_load(ResAppNum app_num, uint32_t resource_id, - size_t offset, size_t length, bool used_aligned); +void *applib_resource_mmap_or_load(ResAppNum app_num, uint32_t resource_id, size_t offset, + size_t length, bool used_aligned); //! Updates reference counters if bytes is memory-mapped, //! alternatively it deallocates the data bytes points to. diff --git a/src/fw/applib/backlight_service.c b/src/fw/applib/backlight_service.c index abf3cc4b0c..0b5878da08 100644 --- a/src/fw/applib/backlight_service.c +++ b/src/fw/applib/backlight_service.c @@ -42,10 +42,10 @@ void backlight_service_unsubscribe(void) { } void backlight_service_state_init(BacklightServiceState *state) { - *state = (BacklightServiceState) { - .bls_info = { - .type = PEBBLE_BACKLIGHT_EVENT, - .handler = prv_do_handle, - }, + *state = (BacklightServiceState){ + .bls_info = { + .type = PEBBLE_BACKLIGHT_EVENT, + .handler = prv_do_handle, + }, }; } diff --git a/src/fw/applib/battery_state_service.c b/src/fw/applib/battery_state_service.c index 3a514dc7b0..f8737998ae 100644 --- a/src/fw/applib/battery_state_service.c +++ b/src/fw/applib/battery_state_service.c @@ -12,9 +12,8 @@ #include "process_state/app_state/app_state.h" #include "process_state/worker_state/worker_state.h" - // ---------------------------------------------------------------------------------------------------- -static BatteryStateServiceState* prv_get_state(PebbleTask task) { +static BatteryStateServiceState *prv_get_state(PebbleTask task) { if (task == PebbleTask_Unknown) { task = pebble_task_get_current(); } @@ -28,7 +27,6 @@ static BatteryStateServiceState* prv_get_state(PebbleTask task) { } } - static void do_handle(PebbleEvent *e, void *context) { BatteryStateServiceState *state = prv_get_state(PebbleTask_Unknown); PBL_ASSERTN(state->handler != NULL); @@ -56,10 +54,10 @@ void battery_state_service_unsubscribe(void) { } void battery_state_service_state_init(BatteryStateServiceState *state) { - *state = (BatteryStateServiceState) { - .bss_info = { - .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, - .handler = &do_handle, - }, + *state = (BatteryStateServiceState){ + .bss_info = { + .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, + .handler = &do_handle, + }, }; } diff --git a/src/fw/applib/battery_state_service.h b/src/fw/applib/battery_state_service.h index 82e19c2674..98f033540c 100644 --- a/src/fw/applib/battery_state_service.h +++ b/src/fw/applib/battery_state_service.h @@ -26,7 +26,6 @@ //! @param charge the state of the battery \ref BatteryChargeState typedef void (*BatteryStateHandler)(BatteryChargeState charge); - //! Subscribe to the battery state event service. Once subscribed, the handler gets called //! on every battery state change //! @param handler A callback to be executed on battery state change event @@ -43,5 +42,3 @@ BatteryChargeState battery_state_service_peek(void); //! @} // end addtogroup PEBBLE_BATTERY_STATE_CHANGE_EVENT //! @} // end addtogroup EventService //! @} // end addtogroup Foundation - - diff --git a/src/fw/applib/bluetooth/ble_ad_parse.c b/src/fw/applib/bluetooth/ble_ad_parse.c index 6fd5cb62c5..96da26937d 100644 --- a/src/fw/applib/bluetooth/ble_ad_parse.c +++ b/src/fw/applib/bluetooth/ble_ad_parse.c @@ -20,27 +20,27 @@ //! AD TYPE Values as specified by the Bluetooth 4.0 Spec. //! See "Appendix C (Normative): EIR and AD Formats" in Core_v4.0.pdf typedef enum { - BLEAdTypeFlags = 0x01, - BLEAdTypeService16BitUUIDPartial = 0x02, - BLEAdTypeService16BitUUIDComplete = 0x03, - BLEAdTypeService32BitUUIDPartial = 0x04, - BLEAdTypeService32BitUUIDComplete = 0x05, - BLEAdTypeService128BitUUIDPartial = 0x06, + BLEAdTypeFlags = 0x01, + BLEAdTypeService16BitUUIDPartial = 0x02, + BLEAdTypeService16BitUUIDComplete = 0x03, + BLEAdTypeService32BitUUIDPartial = 0x04, + BLEAdTypeService32BitUUIDComplete = 0x05, + BLEAdTypeService128BitUUIDPartial = 0x06, BLEAdTypeService128BitUUIDComplete = 0x07, - BLEAdTypeLocalNameShortened = 0x08, - BLEAdTypeLocalNameComplete = 0x09, + BLEAdTypeLocalNameShortened = 0x08, + BLEAdTypeLocalNameComplete = 0x09, - BLEAdTypeTxPowerLevel = 0x0a, + BLEAdTypeTxPowerLevel = 0x0a, - BLEAdTypeManufacturerSpecific = 0xff, + BLEAdTypeManufacturerSpecific = 0xff, } BLEAdType; // ----------------------------------------------------------------------------- //! AD DATA element header typedef struct __attribute__((__packed__)) { uint8_t length; - BLEAdType type:8; + BLEAdType type : 8; } BLEAdElementHeader; typedef struct __attribute__((__packed__)) { @@ -58,8 +58,7 @@ typedef struct __attribute__((__packed__)) { //! @param count The number of Service UUIDs the array contains //! @param cb_data Pointer to arbitrary client data as passed to the parse call. //! @return true to continue parsing or false to stop after returning. -typedef bool (*BLEAdParseServicesCallback)(const Uuid uuids[], uint8_t count, - void *cb_data); +typedef bool (*BLEAdParseServicesCallback)(const Uuid uuids[], uint8_t count, void *cb_data); // ----------------------------------------------------------------------------- //! Internal parser callback. Gets called for a parsed Local Name element. @@ -67,16 +66,15 @@ typedef bool (*BLEAdParseServicesCallback)(const Uuid uuids[], uint8_t count, //! @param length The length of local_name_bytes //! @param cb_data Pointer to arbitrary client data as passed to the parse call. //! @return true to continue parsing or false to stop after returning. -typedef bool (*BLEAdParseLocalNameCallback)(const uint8_t *local_name_bytes, - uint8_t length, void *cb_data); +typedef bool (*BLEAdParseLocalNameCallback)(const uint8_t *local_name_bytes, uint8_t length, + void *cb_data); // ----------------------------------------------------------------------------- //! Internal parser callback. Gets called for a parsed TX Power Level element. //! @param tx_power_level The TX Power Level value. //! @param cb_data Pointer to arbitrary client data as passed to the parse call. //! @return true to continue parsing or false to stop after returning. -typedef bool (*BLEAdParseTXPowerLevelCallback)(int8_t tx_power_level, - void *cb_data); +typedef bool (*BLEAdParseTXPowerLevelCallback)(int8_t tx_power_level, void *cb_data); // ----------------------------------------------------------------------------- //! Internal parser callback. Gets called for a Manufacturer Specific data elem. @@ -85,10 +83,8 @@ typedef bool (*BLEAdParseTXPowerLevelCallback)(int8_t tx_power_level, //! @param length The length in bytes of data //! @param cb_data Pointer to arbitrary client data as passed to the parse call. //! @return true to continue parsing or false to stop after returning. -typedef bool (*BLEAdParseManufacturerSpecificCallback)(uint16_t company_id, - const uint8_t *data, - uint8_t length, - void *cb_data); +typedef bool (*BLEAdParseManufacturerSpecificCallback)(uint16_t company_id, const uint8_t *data, + uint8_t length, void *cb_data); typedef struct { BLEAdParseServicesCallback services_cb; @@ -99,17 +95,15 @@ typedef struct { // ----------------------------------------------------------------------------- //! Parser for Services List data elements. -static bool parse_services_list(const BLEAdElement *elem, - const BLEAdParseCallbacks *callbacks, +static bool parse_services_list(const BLEAdElement *elem, const BLEAdParseCallbacks *callbacks, void *cb_data) { const uint8_t uuid_type = elem->header.type / 2; // Most common is probably 128-bit UUID, then 16-bit, then 32-bit: const size_t uuid_width = (uuid_type == 3) ? 16 : ((uuid_type == 1) ? 2 : 4); - const size_t num_uuids = (elem->header.length - 1 /* Type byte */) - / uuid_width; + const size_t num_uuids = (elem->header.length - 1 /* Type byte */) / uuid_width; if (!num_uuids) { - return true; // continue parsing + return true; // continue parsing } Uuid uuids[num_uuids]; @@ -119,19 +113,19 @@ static bool parse_services_list(const BLEAdElement *elem, const uint8_t *uuid_data = elem->data; for (size_t i = 0; i < num_uuids; ++i) { switch (uuid_type) { - case 1: { // 16 bit - uint16_t u16 = *(uint16_t *) uuid_data; + case 1: { // 16 bit + uint16_t u16 = *(uint16_t *)uuid_data; uuids[i] = bt_uuid_expand_16bit(u16); uuid_data += sizeof(uint16_t); break; } - case 2: { // 32 bit - uint32_t u32 = *(uint32_t *) uuid_data; + case 2: { // 32 bit + uint32_t u32 = *(uint32_t *)uuid_data; uuids[i] = bt_uuid_expand_32bit(u32); uuid_data += sizeof(uint32_t); break; } - case 3: // 128-bit + case 3: // 128-bit uuids[i] = UuidMakeFromLEBytes(uuid_data); uuid_data += sizeof(Uuid); break; @@ -144,13 +138,12 @@ static bool parse_services_list(const BLEAdElement *elem, // ----------------------------------------------------------------------------- //! Parser for Local Name data element. -static bool parse_local_name(const BLEAdElement *elem, - const BLEAdParseCallbacks *callbacks, +static bool parse_local_name(const BLEAdElement *elem, const BLEAdParseCallbacks *callbacks, void *cb_data) { // Length of the raw string: const uint8_t raw_length = elem->header.length - 1 /* -1 Type byte */; if (!raw_length) { - return true; // continue parsing + return true; // continue parsing } // Call back to client with parsed data: @@ -159,12 +152,11 @@ static bool parse_local_name(const BLEAdElement *elem, // ----------------------------------------------------------------------------- //! Parser for TX Power Level data element. -static bool parse_power_level(const BLEAdElement *elem, - const BLEAdParseCallbacks *callbacks, +static bool parse_power_level(const BLEAdElement *elem, const BLEAdParseCallbacks *callbacks, void *cb_data) { if (elem->header.length != 2) { // In case the length is not what it should be, do not add data element. - return true; // continue parsing + return true; // continue parsing } const int8_t tx_power_level = *(int8_t *)elem->data; @@ -176,10 +168,8 @@ static bool parse_power_level(const BLEAdElement *elem, // ----------------------------------------------------------------------------- //! Parser for Manufacturer Specific data element. -static bool parse_manufact_spec(const BLEAdElement *elem, - const BLEAdParseCallbacks *callbacks, +static bool parse_manufact_spec(const BLEAdElement *elem, const BLEAdParseCallbacks *callbacks, void *cb_data) { - if (elem->header.length < 3) { // The first 2 octets should be the Company Identifier Code // (+1 for Type byte) @@ -188,18 +178,16 @@ static bool parse_manufact_spec(const BLEAdElement *elem, if (callbacks->manufacturer_cb) { // Little-endian: - const uint16_t *company_id = (uint16_t *) elem->data; + const uint16_t *company_id = (uint16_t *)elem->data; // Call back to client with parsed data: const uint8_t manufacturer_data_size = elem->header.length - sizeof(*company_id) - 1 /* -1 Type Byte */; - return callbacks->manufacturer_cb(ltohs(*company_id), - elem->data + sizeof(*company_id), - manufacturer_data_size, - cb_data); + return callbacks->manufacturer_cb(ltohs(*company_id), elem->data + sizeof(*company_id), + manufacturer_data_size, cb_data); } - return true; // continue parsing + return true; // continue parsing } // ----------------------------------------------------------------------------- @@ -208,26 +196,22 @@ static bool parse_manufact_spec(const BLEAdElement *elem, //! to receive parse callbacks for. You can leave a callback NULL if you are not //! interested in receiving callbacks for that type of data. //! @param cb_data Pointer to client data that is passed into the callback. -static void ble_ad_parse_ad_data(const BLEAdData *ad_data, - const BLEAdParseCallbacks *callbacks, +static void ble_ad_parse_ad_data(const BLEAdData *ad_data, const BLEAdParseCallbacks *callbacks, void *cb_data) { const uint8_t *cursor = ad_data->data; - const uint8_t *end = cursor + ad_data->ad_data_length + - ad_data->scan_resp_data_length; + const uint8_t *end = cursor + ad_data->ad_data_length + ad_data->scan_resp_data_length; while (cursor < end) { - - const BLEAdElement *elem = (const BLEAdElement *) cursor; + const BLEAdElement *elem = (const BLEAdElement *)cursor; if (elem->header.length == 0) { // We've hit a padding zero. We should be done, or this packet is corrupt. return; } if (cursor + elem->header.length + 1 /* +1 length byte */ > end) { - return; // corrupted + return; // corrupted } - bool (*parse_func)(const BLEAdElement *, - const BLEAdParseCallbacks *, void *) = NULL; + bool (*parse_func)(const BLEAdElement *, const BLEAdParseCallbacks *, void *) = NULL; switch (elem->header.type) { case BLEAdTypeService16BitUUIDPartial ... BLEAdTypeService128BitUUIDComplete: @@ -254,10 +238,10 @@ static void ble_ad_parse_ad_data(const BLEAdData *ad_data, } break; - default: // parse_func == NULL + default: // parse_func == NULL break; - } // switch() + } // switch() if (parse_func) { if (!parse_func(elem, callbacks, cb_data)) { @@ -279,26 +263,25 @@ struct IncludesServiceCtx { bool included; }; -static bool includes_service_parse_cb(const Uuid uuids[], uint8_t count, - void *cb_data) { - struct IncludesServiceCtx *ctx = (struct IncludesServiceCtx *) cb_data; +static bool includes_service_parse_cb(const Uuid uuids[], uint8_t count, void *cb_data) { + struct IncludesServiceCtx *ctx = (struct IncludesServiceCtx *)cb_data; for (int i = 0; i < count; ++i) { if (uuid_equal(ctx->service_uuid, &uuids[i])) { // Found! ctx->included = true; - return false; // stop parsing + return false; // stop parsing } } - return true; // continue parsing + return true; // continue parsing } bool ble_ad_includes_service(const BLEAdData *ad, const Uuid *service_uuid) { - struct IncludesServiceCtx ctx = { - .service_uuid = service_uuid, - .included = false, + struct IncludesServiceCtx ctx = { + .service_uuid = service_uuid, + .included = false, }; - const BLEAdParseCallbacks callbacks = (const BLEAdParseCallbacks) { - .services_cb = includes_service_parse_cb, + const BLEAdParseCallbacks callbacks = (const BLEAdParseCallbacks){ + .services_cb = includes_service_parse_cb, }; ble_ad_parse_ad_data(ad, &callbacks, &ctx); return ctx.included; @@ -314,8 +297,7 @@ struct CopyServiceUUIDsCtx { uint8_t total; }; -static bool copy_services_parse_cb(const Uuid uuids[], uint8_t count, - void *cb_data) { +static bool copy_services_parse_cb(const Uuid uuids[], uint8_t count, void *cb_data) { struct CopyServiceUUIDsCtx *ctx = (struct CopyServiceUUIDsCtx *)cb_data; for (int i = 0; i < count; ++i) { if (ctx->copied < ctx->max) { @@ -325,18 +307,16 @@ static bool copy_services_parse_cb(const Uuid uuids[], uint8_t count, } ++ctx->total; } - return false; // stop parsing, only one Services UUID element allowed by spec + return false; // stop parsing, only one Services UUID element allowed by spec } -uint8_t ble_ad_copy_service_uuids(const BLEAdData *ad, - Uuid *uuids_out, - uint8_t num_uuids) { +uint8_t ble_ad_copy_service_uuids(const BLEAdData *ad, Uuid *uuids_out, uint8_t num_uuids) { struct CopyServiceUUIDsCtx ctx = { - .uuids_out = uuids_out, - .max = num_uuids, + .uuids_out = uuids_out, + .max = num_uuids, }; const BLEAdParseCallbacks callbacks = { - .services_cb = copy_services_parse_cb, + .services_cb = copy_services_parse_cb, }; ble_ad_parse_ad_data(ad, &callbacks, &ctx); return ctx.total; @@ -350,22 +330,20 @@ struct TxPowerLevelCtx { bool included; }; -static bool tx_power_level_cb(int8_t tx_power_level, - void *cb_data) { +static bool tx_power_level_cb(int8_t tx_power_level, void *cb_data) { struct TxPowerLevelCtx *ctx = (struct TxPowerLevelCtx *)cb_data; *ctx->tx_power_level_out = tx_power_level; ctx->included = true; - return false; // stop parsing + return false; // stop parsing } -bool ble_ad_get_tx_power_level(const BLEAdData *ad, - int8_t *tx_power_level_out) { +bool ble_ad_get_tx_power_level(const BLEAdData *ad, int8_t *tx_power_level_out) { struct TxPowerLevelCtx ctx = { - .tx_power_level_out = tx_power_level_out, - .included = false, + .tx_power_level_out = tx_power_level_out, + .included = false, }; const BLEAdParseCallbacks callbacks = { - .tx_power_level_cb = tx_power_level_cb, + .tx_power_level_cb = tx_power_level_cb, }; ble_ad_parse_ad_data(ad, &callbacks, &ctx); return ctx.included; @@ -380,26 +358,26 @@ struct LocalNameCtx { size_t copied_size; }; -static bool copy_local_name_parse_cb(const uint8_t *local_name_bytes, - uint8_t length, void *cb_data) { +static bool copy_local_name_parse_cb(const uint8_t *local_name_bytes, uint8_t length, + void *cb_data) { struct LocalNameCtx *ctx = (struct LocalNameCtx *)cb_data; const uint8_t copied_size = MIN(ctx->size, length + 1 /* zero terminator */); memcpy(ctx->buffer, local_name_bytes, copied_size - 1); - ctx->buffer[copied_size - 1] = 0; // zero terminator + ctx->buffer[copied_size - 1] = 0; // zero terminator ctx->copied_size = copied_size; - return false; // stop parsing + return false; // stop parsing } size_t ble_ad_copy_local_name(const BLEAdData *ad, char *buffer, size_t size) { struct LocalNameCtx ctx = { - .buffer = buffer, - .size = MIN(size, 0xff), - .copied_size = 0, + .buffer = buffer, + .size = MIN(size, 0xff), + .copied_size = 0, }; const BLEAdParseCallbacks callbacks = { - .local_name_cb = copy_local_name_parse_cb, + .local_name_cb = copy_local_name_parse_cb, }; ble_ad_parse_ad_data(ad, &callbacks, &ctx); return ctx.copied_size; @@ -434,31 +412,26 @@ struct ManufacturerSpecificCtx { size_t copied_size; }; -static bool copy_manufacturer_specific_parse_cb(uint16_t company_id, - const uint8_t *data, - uint8_t length, - void *cb_data) { - - struct ManufacturerSpecificCtx *ctx = - (struct ManufacturerSpecificCtx *) cb_data; +static bool copy_manufacturer_specific_parse_cb(uint16_t company_id, const uint8_t *data, + uint8_t length, void *cb_data) { + struct ManufacturerSpecificCtx *ctx = (struct ManufacturerSpecificCtx *)cb_data; const uint8_t copied_size = MIN(ctx->size, length); memcpy(ctx->buffer, data, copied_size); ctx->copied_size = copied_size; ctx->company_id = company_id; - return false; // stop parsing + return false; // stop parsing } -size_t ble_ad_copy_manufacturer_specific_data(const BLEAdData *ad, - uint16_t *company_id, +size_t ble_ad_copy_manufacturer_specific_data(const BLEAdData *ad, uint16_t *company_id, uint8_t *buffer, size_t size) { struct ManufacturerSpecificCtx ctx = { - .size = size, - .buffer = buffer, + .size = size, + .buffer = buffer, }; const BLEAdParseCallbacks callbacks = { - .manufacturer_cb = copy_manufacturer_specific_parse_cb, + .manufacturer_cb = copy_manufacturer_specific_parse_cb, }; ble_ad_parse_ad_data(ad, &callbacks, &ctx); if (company_id) { @@ -476,7 +449,7 @@ size_t ble_ad_copy_manufacturer_specific_data(const BLEAdData *ad, //! response payload. The maximum scan_resp_data_length is 31 bytes, so this //! value lies outside of the valid range. This is basically a memory savings //! optimization, saving another "finalized" bool. -#define BLE_AD_DATA_FINALIZED ((uint8_t) 0x80) +#define BLE_AD_DATA_FINALIZED ((uint8_t)0x80) bool prv_ad_is_finalized(const BLEAdData *ad_data) { // Scan response data has already been added / started @@ -498,8 +471,7 @@ void ble_ad_start_scan_response(BLEAdData *ad_data) { //! @param size_to_write The number of bytes to that need to be appended. //! @return Pointer to length if it could still appends size_to_write bytes or //! NULL if not. -static uint8_t *prv_length_ptr_if_fits_or_null(uint8_t *length, - size_t size_to_write) { +static uint8_t *prv_length_ptr_if_fits_or_null(uint8_t *length, size_t size_to_write) { // Unset finalized bit: const uint8_t used = *length & (~BLE_AD_DATA_FINALIZED); const uint8_t left = GAP_LE_AD_REPORT_DATA_MAX_LENGTH - used; @@ -510,34 +482,29 @@ static uint8_t *prv_length_ptr_if_fits_or_null(uint8_t *length, // ----------------------------------------------------------------------------- //! @return Pointer to the length that is incremented when writing size_to_write //! number of bytes, or NULL if there is not enough space left. -static uint8_t* prv_length_to_increase(BLEAdData *ad_data, - size_t size_to_write) { +static uint8_t *prv_length_to_increase(BLEAdData *ad_data, size_t size_to_write) { if (ad_data->scan_resp_data_length) { // The scan response part is already being populated: - return prv_length_ptr_if_fits_or_null(&ad_data->scan_resp_data_length, - size_to_write); + return prv_length_ptr_if_fits_or_null(&ad_data->scan_resp_data_length, size_to_write); } else { // The advertisement is still being populated: - uint8_t *length = prv_length_ptr_if_fits_or_null(&ad_data->ad_data_length, - size_to_write); + uint8_t *length = prv_length_ptr_if_fits_or_null(&ad_data->ad_data_length, size_to_write); if (length) { // Hurray, the size_to_write fits in the advertisement part: return length; } // Last resort, try fitting into scan response part: - return prv_length_ptr_if_fits_or_null(&ad_data->scan_resp_data_length, - size_to_write); + return prv_length_ptr_if_fits_or_null(&ad_data->scan_resp_data_length, size_to_write); } } // ----------------------------------------------------------------------------- -bool prv_write_element_to_ad_data(BLEAdData *ad_data, - const BLEAdElement *element) { +bool prv_write_element_to_ad_data(BLEAdData *ad_data, const BLEAdElement *element) { if (!ad_data || !element) { return false; } const size_t size_to_write = element->header.length + 1 /* Length Byte */; - uint8_t* length = prv_length_to_increase(ad_data, size_to_write); + uint8_t *length = prv_length_to_increase(ad_data, size_to_write); if (!length) { // Not enough space... return false; @@ -549,10 +516,8 @@ bool prv_write_element_to_ad_data(BLEAdData *ad_data, } // Append the element to the end: - uint8_t * const end = ad_data->data + - ad_data->ad_data_length + - ad_data->scan_resp_data_length; - memcpy(end, (const uint8_t *) element, size_to_write); + uint8_t *const end = ad_data->data + ad_data->ad_data_length + ad_data->scan_resp_data_length; + memcpy(end, (const uint8_t *)element, size_to_write); // Length book-keeping: *length += size_to_write; @@ -561,9 +526,8 @@ bool prv_write_element_to_ad_data(BLEAdData *ad_data, } // ----------------------------------------------------------------------------- -BLEAdData * ble_ad_create(void) { - const size_t max_ad_data_size = sizeof(BLEAdData) + - (GAP_LE_AD_REPORT_DATA_MAX_LENGTH * 2); +BLEAdData *ble_ad_create(void) { + const size_t max_ad_data_size = sizeof(BLEAdData) + (GAP_LE_AD_REPORT_DATA_MAX_LENGTH * 2); BLEAdData *ad_data = applib_malloc(max_ad_data_size); if (ad_data) { memset(ad_data, 0, sizeof(BLEAdData)); @@ -584,8 +548,8 @@ static uint8_t prv_smallest_bt_uuid_width_in_bytes(const Uuid *uuid) { // The bytes after the first 4 contain the Bluetooth base. // Check if the uuid is based off of the Bluetooth base UUID: - const bool is_bt_uuid_based = (memcmp(&bt_uuid_base.byte4, &uuid->byte4, - sizeof(Uuid) - offsetof(Uuid, byte4)) == 0); + const bool is_bt_uuid_based = + (memcmp(&bt_uuid_base.byte4, &uuid->byte4, sizeof(Uuid) - offsetof(Uuid, byte4)) == 0); if (!is_bt_uuid_based) { // Not based on the Bluetooth base UUID, so use 128-bits: return sizeof(Uuid); @@ -602,8 +566,7 @@ static uint8_t prv_smallest_bt_uuid_width_in_bytes(const Uuid *uuid) { //! Finds the largest common UUID width. For UUIDs that are based on the //! Bluetooth base UUID, a reduced width will be taken of either 16-bits or //! 32-bits. -static uint8_t prv_largest_common_bt_uuid_width(const Uuid uuids[], - uint8_t num_uuids) { +static uint8_t prv_largest_common_bt_uuid_width(const Uuid uuids[], uint8_t num_uuids) { uint8_t max_width_bytes = sizeof(uint16_t); for (unsigned int i = 0; i < num_uuids; ++i) { const Uuid *uuid = &uuids[i]; @@ -621,7 +584,7 @@ static uint16_t prv_convert_to_16bit_uuid(const Uuid *uuid) { // Use bytes 2-3 of the Uuid: for (int i = 2; i < 4; ++i) { uuid_16bits <<= 8; - uuid_16bits += ((const uint8_t *) uuid)[i]; + uuid_16bits += ((const uint8_t *)uuid)[i]; } return uuid_16bits; } @@ -634,14 +597,13 @@ static uint32_t prv_convert_to_32bit_uuid(const Uuid *uuid) { // Use bytes 0-3 of the Uuid: for (int i = 0; i < 4; ++i) { uuid_32bits <<= 8; - uuid_32bits += ((const uint8_t *) uuid)[i]; + uuid_32bits += ((const uint8_t *)uuid)[i]; } return uuid_32bits; } // ----------------------------------------------------------------------------- -bool ble_ad_set_service_uuids(BLEAdData *ad, - const Uuid uuids[], uint8_t num_uuids) { +bool ble_ad_set_service_uuids(BLEAdData *ad, const Uuid uuids[], uint8_t num_uuids) { struct __attribute__((__packed__)) BLEAdElementService { BLEAdElementHeader header; union { @@ -651,19 +613,23 @@ bool ble_ad_set_service_uuids(BLEAdData *ad, }; }; - const uint8_t max_width_bytes = prv_largest_common_bt_uuid_width(uuids, - num_uuids); + const uint8_t max_width_bytes = prv_largest_common_bt_uuid_width(uuids, num_uuids); // Allocate buffer: - const size_t buffer_size = sizeof(struct BLEAdElementService) + - (max_width_bytes * num_uuids); + const size_t buffer_size = sizeof(struct BLEAdElementService) + (max_width_bytes * num_uuids); uint8_t element_buffer[buffer_size]; - struct BLEAdElementService *element = (struct BLEAdElementService *) element_buffer; + struct BLEAdElementService *element = (struct BLEAdElementService *)element_buffer; // Set header fields (assume Complete): switch (max_width_bytes) { - case 16: element->header.type = BLEAdTypeService128BitUUIDComplete; break; - case 4: element->header.type = BLEAdTypeService32BitUUIDComplete; break; - case 2: element->header.type = BLEAdTypeService16BitUUIDComplete; break; + case 16: + element->header.type = BLEAdTypeService128BitUUIDComplete; + break; + case 4: + element->header.type = BLEAdTypeService32BitUUIDComplete; + break; + case 2: + element->header.type = BLEAdTypeService16BitUUIDComplete; + break; default: WTF; } @@ -673,26 +639,31 @@ bool ble_ad_set_service_uuids(BLEAdData *ad, // Copy UUIDs: for (unsigned int i = 0; i < num_uuids; ++i) { switch (max_width_bytes) { - case 16: element->uuid_128[i] = uuids[i]; break; - case 4: element->uuid_32[i] = prv_convert_to_32bit_uuid(&uuids[i]); break; - case 2: element->uuid_16[i] = prv_convert_to_16bit_uuid(&uuids[i]); break; + case 16: + element->uuid_128[i] = uuids[i]; + break; + case 4: + element->uuid_32[i] = prv_convert_to_32bit_uuid(&uuids[i]); + break; + case 2: + element->uuid_16[i] = prv_convert_to_16bit_uuid(&uuids[i]); + break; default: WTF; } } - return prv_write_element_to_ad_data(ad, (const BLEAdElement *) element); + return prv_write_element_to_ad_data(ad, (const BLEAdElement *)element); } // ----------------------------------------------------------------------------- -bool ble_ad_set_local_name(BLEAdData *ad, - const char *local_name) { +bool ble_ad_set_local_name(BLEAdData *ad, const char *local_name) { if (!local_name) { return false; } const size_t length = strlen(local_name); uint8_t element_buffer[sizeof(BLEAdElement) + length]; - BLEAdElement *element = (BLEAdElement *) &element_buffer; + BLEAdElement *element = (BLEAdElement *)&element_buffer; element->header.length = length + 1 /* +1 Type byte */; element->header.type = BLEAdTypeLocalNameComplete; /* assume Complete */ // Note: *not* zero terminated by design @@ -703,17 +674,17 @@ bool ble_ad_set_local_name(BLEAdData *ad, // ----------------------------------------------------------------------------- bool ble_ad_set_tx_power_level(BLEAdData *ad) { uint8_t element_buffer[sizeof(BLEAdElement) + sizeof(int8_t)]; - BLEAdElement *element = (BLEAdElement *) element_buffer; + BLEAdElement *element = (BLEAdElement *)element_buffer; element->header.length = sizeof(int8_t) + 1 /* +1 Type byte */; element->header.type = BLEAdTypeTxPowerLevel; - *((int8_t *) element->data) = sys_ble_get_advertising_tx_power(); + *((int8_t *)element->data) = sys_ble_get_advertising_tx_power(); return prv_write_element_to_ad_data(ad, element); } // ----------------------------------------------------------------------------- -bool ble_ad_set_manufacturer_specific_data(BLEAdData *ad, uint16_t company_id, - const uint8_t *data, size_t size) { +bool ble_ad_set_manufacturer_specific_data(BLEAdData *ad, uint16_t company_id, const uint8_t *data, + size_t size) { struct __attribute__((__packed__)) BLEAdElementManufacturerSpecific { BLEAdElementHeader header; uint16_t company_id; @@ -722,13 +693,13 @@ bool ble_ad_set_manufacturer_specific_data(BLEAdData *ad, uint16_t company_id, uint8_t element_buffer[sizeof(struct BLEAdElementManufacturerSpecific) + size]; struct BLEAdElementManufacturerSpecific *element = - (struct BLEAdElementManufacturerSpecific *) element_buffer; - element->header.length = sizeof(struct BLEAdElementManufacturerSpecific) - - 1 /* -1 Length byte */ + size; + (struct BLEAdElementManufacturerSpecific *)element_buffer; + element->header.length = + sizeof(struct BLEAdElementManufacturerSpecific) - 1 /* -1 Length byte */ + size; element->header.type = BLEAdTypeManufacturerSpecific; element->company_id = ltohs(company_id); memcpy(element->data, data, size); - return prv_write_element_to_ad_data(ad, (const BLEAdElement *) element); + return prv_write_element_to_ad_data(ad, (const BLEAdElement *)element); } // ----------------------------------------------------------------------------- @@ -737,12 +708,12 @@ bool ble_ad_set_flags(BLEAdData *ad, uint8_t flags) { BLEAdElementHeader header; uint8_t flags; } element = { - .header = { - .length = sizeof(struct BLEAdElementManufacturerSpecific) - - 1 /* -1 Length byte */, - .type = BLEAdTypeFlags, - }, - .flags = flags, + .header = + { + .length = sizeof(struct BLEAdElementManufacturerSpecific) - 1 /* -1 Length byte */, + .type = BLEAdTypeFlags, + }, + .flags = flags, }; - return prv_write_element_to_ad_data(ad, (const BLEAdElement *) &element); + return prv_write_element_to_ad_data(ad, (const BLEAdElement *)&element); } diff --git a/src/fw/applib/bluetooth/ble_ad_parse.h b/src/fw/applib/bluetooth/ble_ad_parse.h index 01064fb982..0747375571 100644 --- a/src/fw/applib/bluetooth/ble_ad_parse.h +++ b/src/fw/applib/bluetooth/ble_ad_parse.h @@ -37,9 +37,7 @@ bool ble_ad_includes_service(const BLEAdData *ad, const Uuid *service_uuid); //! equivalents using the Bluetooth Base UUID using bt_uuid_expand_16bit or //! bt_uuid_expand_32bit. //! @see ble_ad_get_number_of_service_uuids -uint8_t ble_ad_copy_service_uuids(const BLEAdData *ad, - Uuid *uuids_out, - uint8_t num_uuids); +uint8_t ble_ad_copy_service_uuids(const BLEAdData *ad, Uuid *uuids_out, uint8_t num_uuids); //! If present, returns the number of Service UUIDs the advertisement data //! contains. @@ -65,8 +63,7 @@ bool ble_ad_get_tx_power_level(const BLEAdData *ad, int8_t *tx_power_level_out); //! @return The size of the Local Name in bytes, *including* zero terminator. //! Note that this might be more than the size of the provided buffer. //! If the Local Name was not found, the return value will be zero. -size_t ble_ad_copy_local_name(const BLEAdData *ad, - char *buffer, size_t size); +size_t ble_ad_copy_local_name(const BLEAdData *ad, char *buffer, size_t size); //! If the Local Name is present in the advertisement data, returns the number //! of bytes a C-string needs to be to hold the full name. @@ -91,8 +88,7 @@ size_t ble_ad_get_local_name_buffer_size(const BLEAdData *ad); //! can be larger than the size of the provided buffer. If the Manufacturer //! Specific data was not found, the return value will be zero. //! @see ble_ad_get_manufacturer_specific_data_size -size_t ble_ad_copy_manufacturer_specific_data(const BLEAdData *ad, - uint16_t *company_id_out, +size_t ble_ad_copy_manufacturer_specific_data(const BLEAdData *ad, uint16_t *company_id_out, uint8_t *buffer, size_t size); //! Gets the size in bytes of Manufacturer Specific data in the advertisement. @@ -115,7 +111,6 @@ size_t ble_ad_get_raw_data_size(const BLEAdData *ad); //! @return The number of bytes copied. size_t ble_ad_copy_raw_data(const BLEAdData *ad, uint8_t *buffer, size_t size); - // ----------------------------------------------------------------------------- // Creating BLEAdData: // ----------------------------------------------------------------------------- @@ -135,7 +130,7 @@ size_t ble_ad_copy_raw_data(const BLEAdData *ad, uint8_t *buffer, size_t size); //! data written to it will occupy the advertisement payload until there is not //! enough space left, in which case all following data is written into the scan //! response. @see ble_ad_start_scan_response() -BLEAdData* ble_ad_create(void); +BLEAdData *ble_ad_create(void); //! Destroys an advertisement payload that was created earlier with //! ble_ad_create(). @@ -156,16 +151,14 @@ void ble_ad_start_scan_response(BLEAdData *ad_data); //! @see bt_uuid_expand_32bit //! @param num_uuids Number of UUIDs in the uuids array. //! @return true if the data was successfully written or false if not. -bool ble_ad_set_service_uuids(BLEAdData *ad, - const Uuid uuids[], uint8_t num_uuids); +bool ble_ad_set_service_uuids(BLEAdData *ad, const Uuid uuids[], uint8_t num_uuids); //! Writes the Local Name to the advertisement or scan response payload. //! @param ad The advertisement payload as created earlier by ble_ad_create() //! @param local_name Zero terminated, UTF-8 string with the Local Name. The //! name is assumed to be complete and not abbreviated. //! @return true if the data was successfully written or false if not. -bool ble_ad_set_local_name(BLEAdData *ad, - const char *local_name); +bool ble_ad_set_local_name(BLEAdData *ad, const char *local_name); //! Writes the TX Power Level to advertisement or scan response payload. //! The actual transmission power level value is set automatically, based on the @@ -181,9 +174,8 @@ bool ble_ad_set_tx_power_level(BLEAdData *ad); //! @param data The data //! @param size The size of data in bytes //! @return true if the data was successfully written or false if not. -bool ble_ad_set_manufacturer_specific_data(BLEAdData *ad, - uint16_t company_id, - const uint8_t *data, size_t size); +bool ble_ad_set_manufacturer_specific_data(BLEAdData *ad, uint16_t company_id, const uint8_t *data, + size_t size); //! @internal -- Do not export //! Writes the Flags AD Type to the advertisement or scan response payload. diff --git a/src/fw/applib/bluetooth/ble_app_support.c b/src/fw/applib/bluetooth/ble_app_support.c index a88d239e72..4349c758ea 100644 --- a/src/fw/applib/bluetooth/ble_app_support.c +++ b/src/fw/applib/bluetooth/ble_app_support.c @@ -21,24 +21,26 @@ extern void ble_client_handle_event(PebbleEvent *e, void *context); void ble_init_app_state(void) { BLEAppState *ble_app_state = app_state_get_ble_app_state(); - *ble_app_state = (const BLEAppState) { - // ble_scan_...: - .scan_service_info = (const EventServiceInfo) { - .type = PEBBLE_BLE_SCAN_EVENT, - .handler = ble_scan_handle_event, - }, - - // ble_central_...: - .connection_service_info = (const EventServiceInfo) { - .type = PEBBLE_BLE_CONNECTION_EVENT, - .handler = ble_central_handle_event, - }, - - // ble_client_...: - .gatt_client_service_info = (const EventServiceInfo) { - .type = PEBBLE_BLE_GATT_CLIENT_EVENT, - .handler = ble_client_handle_event, - }, + *ble_app_state = (const BLEAppState){ + // ble_scan_...: + .scan_service_info = + (const EventServiceInfo){ + .type = PEBBLE_BLE_SCAN_EVENT, + .handler = ble_scan_handle_event, + }, + + // ble_central_...: + .connection_service_info = + (const EventServiceInfo){ + .type = PEBBLE_BLE_CONNECTION_EVENT, + .handler = ble_central_handle_event, + }, + + // ble_client_...: + .gatt_client_service_info = (const EventServiceInfo){ + .type = PEBBLE_BLE_GATT_CLIENT_EVENT, + .handler = ble_client_handle_event, + }, }; } diff --git a/src/fw/applib/bluetooth/ble_central.c b/src/fw/applib/bluetooth/ble_central.c index ad5613dc4c..41bfcb860e 100644 --- a/src/fw/applib/bluetooth/ble_central.c +++ b/src/fw/applib/bluetooth/ble_central.c @@ -23,8 +23,7 @@ void ble_central_handle_event(PebbleEvent *e) { } const PebbleBLEConnectionEvent *conn_event = &e->bluetooth.le.connection; const BTDeviceInternal device = PebbleEventToBTDeviceInternal(conn_event); - ble_app_state->connection_handler(device.opaque, - prv_bt_errno_for_event(conn_event)); + ble_app_state->connection_handler(device.opaque, prv_bt_errno_for_event(conn_event)); } BTErrno ble_central_set_connection_handler(BLEConnectionHandler handler) { diff --git a/src/fw/applib/bluetooth/ble_central.h b/src/fw/applib/bluetooth/ble_central.h index c86d4c4167..444ef0498f 100644 --- a/src/fw/applib/bluetooth/ble_central.h +++ b/src/fw/applib/bluetooth/ble_central.h @@ -12,8 +12,7 @@ //! BTErrnoRemotelyTerminated, BTErrnoLocallyTerminatedBySystem or //! BTErrnoLocallyTerminatedByApp. //! @note See additional notes with ble_central_set_connection_handler() -typedef void (*BLEConnectionHandler)(BTDevice device, - BTErrno connection_status); +typedef void (*BLEConnectionHandler)(BTDevice device, BTErrno connection_status); //! Registers the connection event handler of the application. //! This event handler will be called when connections and disconnection occur, @@ -60,9 +59,7 @@ BTErrno ble_central_set_connection_handler(BLEConnectionHandler handler); //! application did not require this. //! @return BTErrnoOK if the intent to connect was processed successfully, or //! ... TODO -BTErrno ble_central_connect(BTDevice device, - bool auto_reconnect, - bool is_pairing_required); +BTErrno ble_central_connect(BTDevice device, bool auto_reconnect, bool is_pairing_required); //! Attempts to cancel the connection, as initiated by ble_central_connect(). //! The underlying Bluetooth connection might not be disconnected if the diff --git a/src/fw/applib/bluetooth/ble_characteristic.c b/src/fw/applib/bluetooth/ble_characteristic.c index e6697e1f82..73a212f5d1 100644 --- a/src/fw/applib/bluetooth/ble_characteristic.c +++ b/src/fw/applib/bluetooth/ble_characteristic.c @@ -6,13 +6,11 @@ #include "syscall/syscall.h" bool ble_characteristic_is_readable(BLECharacteristic characteristic) { - return (sys_ble_characteristic_get_properties(characteristic) & - BLEAttributePropertyRead); + return (sys_ble_characteristic_get_properties(characteristic) & BLEAttributePropertyRead); } bool ble_characteristic_is_writable(BLECharacteristic characteristic) { - return (sys_ble_characteristic_get_properties(characteristic) & - BLEAttributePropertyWrite); + return (sys_ble_characteristic_get_properties(characteristic) & BLEAttributePropertyWrite); } bool ble_characteristic_is_writable_without_response(BLECharacteristic characteristic) { @@ -26,11 +24,9 @@ bool ble_characteristic_is_subscribable(BLECharacteristic characteristic) { } bool ble_characteristic_is_notifiable(BLECharacteristic characteristic) { - return (sys_ble_characteristic_get_properties(characteristic) & - BLEAttributePropertyNotify); + return (sys_ble_characteristic_get_properties(characteristic) & BLEAttributePropertyNotify); } bool ble_characteristic_is_indicatable(BLECharacteristic characteristic) { - return (sys_ble_characteristic_get_properties(characteristic) & - BLEAttributePropertyIndicate); + return (sys_ble_characteristic_get_properties(characteristic) & BLEAttributePropertyIndicate); } diff --git a/src/fw/applib/bluetooth/ble_characteristic.h b/src/fw/applib/bluetooth/ble_characteristic.h index 14e821f41b..2d80eb4c9b 100644 --- a/src/fw/applib/bluetooth/ble_characteristic.h +++ b/src/fw/applib/bluetooth/ble_characteristic.h @@ -77,10 +77,9 @@ uint8_t ble_characteristic_get_descriptors(BLECharacteristic characteristic, // (FUTURE / LATER / NOT SCOPED) // Just to see how symmetric the Server APIs would be: -BLECharacteristic ble_characteristic_create(const Uuid *uuid, - BLEAttributeProperty properties); +BLECharacteristic ble_characteristic_create(const Uuid *uuid, BLEAttributeProperty properties); BLECharacteristic ble_characteristic_create_with_descriptors(const Uuid *uuid, - BLEAttributeProperty properties, - BLEDescriptor descriptors[], - uint8_t num_descriptors); + BLEAttributeProperty properties, + BLEDescriptor descriptors[], + uint8_t num_descriptors); diff --git a/src/fw/applib/bluetooth/ble_client.c b/src/fw/applib/bluetooth/ble_client.c index 20042986f1..b9163e6478 100644 --- a/src/fw/applib/bluetooth/ble_client.c +++ b/src/fw/applib/bluetooth/ble_client.c @@ -26,12 +26,12 @@ // - How to identify? iOS SDK does not expose addresses. Use DIS info? Fall // back to device name? -static void prv_handle_services_added( - BLEClientServiceChangeHandler handler, BTDeviceInternal device, BTErrno status) { +static void prv_handle_services_added(BLEClientServiceChangeHandler handler, + BTDeviceInternal device, BTErrno status) { BLEService services[BLE_GATT_MAX_SERVICES_CHANGED]; - uint8_t num_services = sys_ble_client_copy_services(device, services, - BLE_GATT_MAX_SERVICES_CHANGED); + uint8_t num_services = + sys_ble_client_copy_services(device, services, BLE_GATT_MAX_SERVICES_CHANGED); if (num_services != 0) { handler(device.opaque, BLEClientServicesAdded, services, num_services, status); @@ -59,17 +59,16 @@ DEFINE_SYSCALL(void, sys_get_service_discovery_info, const PebbleBLEGATTClientSe } } - *info = (PebbleBLEGATTClientServiceEventInfo) { - .type = e->info->type, - .device = e->info->device, - .status = e->info->status + *info = (PebbleBLEGATTClientServiceEventInfo){ + .type = e->info->type, + .device = e->info->device, + .status = e->info->status }; } static void prv_handle_service_change(const PebbleBLEGATTClientEvent *e) { BLEAppState *ble_app_state = app_state_get_ble_app_state(); - const BLEClientServiceChangeHandler handler = - ble_app_state->gatt_service_change_handler; + const BLEClientServiceChangeHandler handler = ble_app_state->gatt_service_change_handler; if (!handler) { return; } @@ -97,11 +96,8 @@ static void prv_handle_service_change(const PebbleBLEGATTClientEvent *e) { } } -typedef void (*GenericReadHandler)(BLECharacteristic characteristic, - const uint8_t *value, - size_t value_length, - uint16_t value_offset, - BLEGATTError error); +typedef void (*GenericReadHandler)(BLECharacteristic characteristic, const uint8_t *value, + size_t value_length, uint16_t value_offset, BLEGATTError error); static void prv_consume_read_response(const PebbleBLEGATTClientEvent *e, GenericReadHandler handler) { @@ -112,7 +108,7 @@ static void prv_consume_read_response(const PebbleBLEGATTClientEvent *e, // Read Responses / Notifications with 0 length data must not be attempted to be consumed if (value_length) { - value = (uint8_t *) applib_malloc(value_length); + value = (uint8_t *)applib_malloc(value_length); if (!value) { gatt_error = BLEGATTErrorLocalInsufficientResources; value_length = 0; @@ -141,7 +137,7 @@ static void prv_consume_notifications(const PebbleBLEGATTClientEvent *e, if (heap_buffer_size < value_length) { const uint16_t new_heap_buffer_size = MIN(value_length, 64 /* arbitrary min size.. */); applib_free(value); - value = (uint8_t *) applib_malloc(new_heap_buffer_size); + value = (uint8_t *)applib_malloc(new_heap_buffer_size); heap_buffer_size = value ? new_heap_buffer_size : 0; } if (!value) { @@ -153,9 +149,8 @@ static void prv_consume_notifications(const PebbleBLEGATTClientEvent *e, uintptr_t object_ref = 0; // Consume, even if we didn't have enough memory, this will eat the notification and free up // the space in the buffer. - const uint16_t next_value_length = sys_ble_client_consume_notification(&object_ref, - value, &value_length, - &has_more); + const uint16_t next_value_length = + sys_ble_client_consume_notification(&object_ref, value, &value_length, &has_more); if (handler) { handler(object_ref, value, value_length, 0 /* value_offset (future proofing) */, gatt_error); } @@ -205,23 +200,22 @@ static void prv_handle_buffer_empty(const PebbleBLEGATTClientEvent *e) { // TODO } -typedef void(*PrvHandler)(const PebbleBLEGATTClientEvent *); +typedef void (*PrvHandler)(const PebbleBLEGATTClientEvent *); -static PrvHandler prv_handler_for_subtype( - PebbleBLEGATTClientEventType event_subtype) { +static PrvHandler prv_handler_for_subtype(PebbleBLEGATTClientEventType event_subtype) { if (event_subtype >= PebbleBLEGATTClientEventTypeNum) { WTF; } // MT: This is a bit smaller in code size than a switch(): static const PrvHandler handler[] = { - [PebbleBLEGATTClientEventTypeServiceChange] = prv_handle_service_change, - [PebbleBLEGATTClientEventTypeCharacteristicRead] = prv_handle_characteristic_read, - [PebbleBLEGATTClientEventTypeNotification] = prv_handle_notifications, - [PebbleBLEGATTClientEventTypeCharacteristicWrite] = prv_handle_characteristic_write, - [PebbleBLEGATTClientEventTypeCharacteristicSubscribe] = prv_handle_characteristic_subscribe, - [PebbleBLEGATTClientEventTypeDescriptorRead] = prv_handle_descriptor_read, - [PebbleBLEGATTClientEventTypeDescriptorWrite] = prv_handle_descriptor_write, - [PebbleBLEGATTClientEventTypeBufferEmpty] = prv_handle_buffer_empty, + [PebbleBLEGATTClientEventTypeServiceChange] = prv_handle_service_change, + [PebbleBLEGATTClientEventTypeCharacteristicRead] = prv_handle_characteristic_read, + [PebbleBLEGATTClientEventTypeNotification] = prv_handle_notifications, + [PebbleBLEGATTClientEventTypeCharacteristicWrite] = prv_handle_characteristic_write, + [PebbleBLEGATTClientEventTypeCharacteristicSubscribe] = prv_handle_characteristic_subscribe, + [PebbleBLEGATTClientEventTypeDescriptorRead] = prv_handle_descriptor_read, + [PebbleBLEGATTClientEventTypeDescriptorWrite] = prv_handle_descriptor_write, + [PebbleBLEGATTClientEventTypeBufferEmpty] = prv_handle_buffer_empty, }; return handler[event_subtype]; } @@ -236,10 +230,10 @@ static BTErrno prv_set_handler(void *new_handler, off_t struct_offset_bytes) { BLEAppState *ble_app_state = app_state_get_ble_app_state(); typedef void (*BLEGenericHandler)(void); BLEGenericHandler *handler_storage = - (BLEGenericHandler *)(((uint8_t *) ble_app_state) + struct_offset_bytes); + (BLEGenericHandler *)(((uint8_t *)ble_app_state) + struct_offset_bytes); const bool had_previous_handler = (*handler_storage == NULL); - *handler_storage = (BLEGenericHandler) new_handler; + *handler_storage = (BLEGenericHandler)new_handler; if (had_previous_handler) { if (new_handler) { @@ -261,8 +255,7 @@ static BTErrno prv_set_handler(void *new_handler, off_t struct_offset_bytes) { return BTErrnoOK; } -BTErrno ble_client_set_service_filter(const Uuid service_uuids[], - uint8_t num_uuids) { +BTErrno ble_client_set_service_filter(const Uuid service_uuids[], uint8_t num_uuids) { // TODO return 0; } diff --git a/src/fw/applib/bluetooth/ble_client.h b/src/fw/applib/bluetooth/ble_client.h index 5a4cf80dda..3fc73a81de 100644 --- a/src/fw/applib/bluetooth/ble_client.h +++ b/src/fw/applib/bluetooth/ble_client.h @@ -40,8 +40,7 @@ typedef enum { //! The number of services will be zero upon a disconnection. typedef void (*BLEClientServiceChangeHandler)(BTDevice device, BLEClientServiceChangeUpdate update_type, - const BLEService services[], - uint8_t num_services, + const BLEService services[], uint8_t num_services, BTErrno status); //! Registers the callback that handles service changes. After the call to @@ -60,8 +59,7 @@ BTErrno ble_client_set_service_change_handler(BLEClientServiceChangeHandler hand //! when NULL is passed for the service_uuids argument. //! @return BTErrnoOK if the filter was set up successfully, //! or TODO.... -BTErrno ble_client_set_service_filter(const Uuid service_uuids[], - uint8_t num_uuids); +BTErrno ble_client_set_service_filter(const Uuid service_uuids[], uint8_t num_uuids); //! Starts a discovery of services and characteristics on a remote device. //! The discovered services will be delivered to the application through the @@ -99,10 +97,8 @@ typedef enum { //! @param error The error or status as returned by the remote server. If the //! read was successful, this remote server is supposed to send //! BLEGATTErrorSuccess. -typedef void (*BLEClientReadHandler)(BLECharacteristic characteristic, - const uint8_t *value, - size_t value_length, - uint16_t value_offset, +typedef void (*BLEClientReadHandler)(BLECharacteristic characteristic, const uint8_t *value, + size_t value_length, uint16_t value_offset, BLEGATTError error); //! Callback to handle the response to a written characteristic, resulting from @@ -111,8 +107,7 @@ typedef void (*BLEClientReadHandler)(BLECharacteristic characteristic, //! @param error The error or status as returned by the remote server. If the //! write was successful, this remote server is supposed to send //! BLEGATTErrorSuccess. -typedef void (*BLEClientWriteHandler)(BLECharacteristic characteristic, - BLEGATTError error); +typedef void (*BLEClientWriteHandler)(BLECharacteristic characteristic, BLEGATTError error); //! Callback to handle the confirmation of a subscription or unsubscription to //! characteristic value changes (notifications or indications). @@ -124,8 +119,7 @@ typedef void (*BLEClientWriteHandler)(BLECharacteristic characteristic, //! (un)subscription was successful, this remote server is supposed to send //! BLEGATTErrorSuccess. typedef void (*BLEClientSubscribeHandler)(BLECharacteristic characteristic, - BLESubscription subscription_type, - BLEGATTError error); + BLESubscription subscription_type, BLEGATTError error); //! Callback to handle the event that the buffer for outbound data is empty. typedef void (*BLEClientBufferEmptyHandler)(void); @@ -179,8 +173,7 @@ BTErrno ble_client_read(BLECharacteristic characteristic); //! @param value_length Number of bytes to write //! @note Values must not be longer than ble_client_get_maximum_value_length(). //! @return BTErrnoOK if the operation was successfully started, or ... TODO -BTErrno ble_client_write(BLECharacteristic characteristic, - const uint8_t *value, +BTErrno ble_client_write(BLECharacteristic characteristic, const uint8_t *value, size_t value_length); //! Write the value of a characterstic without response. @@ -192,8 +185,7 @@ BTErrno ble_client_write(BLECharacteristic characteristic, //! If the buffer for outbound data was full, BTErrnoNotEnoughResources will //! be returned. When the buffer is emptied, the handler that is registered //! using ble_client_set_buffer_empty_handler() will be called. -BTErrno ble_client_write_without_response(BLECharacteristic characteristic, - const uint8_t *value, +BTErrno ble_client_write_without_response(BLECharacteristic characteristic, const uint8_t *value, size_t value_length); //! Subscribe to be notified or indicated of value changes of a characteristic. @@ -223,9 +215,7 @@ BTErrno ble_client_write_without_response(BLECharacteristic characteristic, //! bit. //! @return BTErrnoOK if the subscription request was sent successfully, or //! TODO... -BTErrno ble_client_subscribe(BLECharacteristic characteristic, - BLESubscription subscription_type); - +BTErrno ble_client_subscribe(BLECharacteristic characteristic, BLESubscription subscription_type); //! Callback to receive the descriptor value, resulting from a call to //! ble_client_read_descriptor(). @@ -237,10 +227,8 @@ BTErrno ble_client_subscribe(BLECharacteristic characteristic, //! @param error The error or status as returned by the remote server. If the //! read was successful, this remote server is supposed to send //! BLEGATTErrorSuccess. -typedef void (*BLEClientReadDescriptorHandler)(BLEDescriptor descriptor, - const uint8_t *value, - size_t value_length, - uint16_t value_offset, +typedef void (*BLEClientReadDescriptorHandler)(BLEDescriptor descriptor, const uint8_t *value, + size_t value_length, uint16_t value_offset, BLEGATTError error); //! Callback to handle the response to a written descriptor, resulting from @@ -249,8 +237,7 @@ typedef void (*BLEClientReadDescriptorHandler)(BLEDescriptor descriptor, //! @param error The error or status as returned by the remote server. If the //! write was successful, this remote server is supposed to send //! BLEGATTErrorSuccess. -typedef void (*BLEClientWriteDescriptorHandler)(BLEDescriptor descriptor, - BLEGATTError error); +typedef void (*BLEClientWriteDescriptorHandler)(BLEDescriptor descriptor, BLEGATTError error); //! Registers the handlers for descriptor value write operations. //! @param write_handler Pointer to the function that will handle callbacks @@ -275,8 +262,7 @@ BTErrno ble_client_set_descriptor_read_handler(BLEClientReadDescriptorHandler re //! @param value_length Number of bytes to write //! @note Values must not be longer than ble_client_get_maximum_value_length(). //! @return BTErrnoOK if the operation was successfully started, or ... TODO -BTErrno ble_client_write_descriptor(BLEDescriptor descriptor, - const uint8_t *value, +BTErrno ble_client_write_descriptor(BLEDescriptor descriptor, const uint8_t *value, size_t value_length); //! Read the value of a descriptor. @@ -291,28 +277,22 @@ BTErrno ble_client_read_descriptor(BLEDescriptor descriptor); // (FUTURE / LATER / NOT SCOPED) // Just to see how symmetric the Server APIs would be: - //! Opaque ATT request context -typedef void * BLERequest; +typedef void *BLERequest; -typedef void (*BLEServerWriteHandler)(BLERequest request, - BLECharacteristic characteristic, - BTDevice remote_device, - const uint8_t *value, - size_t value_length, - uint16_t value_offset); +typedef void (*BLEServerWriteHandler)(BLERequest request, BLECharacteristic characteristic, + BTDevice remote_device, const uint8_t *value, + size_t value_length, uint16_t value_offset); -typedef void (*BLEServerReadHandler)(BLECharacteristic characteristic, - BTDevice remote_device, +typedef void (*BLEServerReadHandler)(BLECharacteristic characteristic, BTDevice remote_device, uint16_t value_offset); -typedef void (*BLEServerSubscribeHandler)(BLECharacteristic characteristic, - BTDevice remote_device, +typedef void (*BLEServerSubscribeHandler)(BLECharacteristic characteristic, BTDevice remote_device, BLESubscription subscription_type); BTErrno ble_server_set_handlers(BLEServerReadHandler read_handler, - BLEServerWriteHandler write_handler, - BLEServerSubscribeHandler subscription_handler); + BLEServerWriteHandler write_handler, + BLEServerSubscribeHandler subscription_handler); BTErrno ble_server_start_service(BLEService service); @@ -320,13 +300,12 @@ BTErrno ble_server_stop_service(BLEService service); BTErrno ble_server_respond_to_write(BLERequest request, BLEGATTError error); -BTErrno ble_server_respond_to_read(BLERequest request, BLEGATTError error, - const uint8_t *value, size_t value_length, - uint16_t value_offset); +BTErrno ble_server_respond_to_read(BLERequest request, BLEGATTError error, const uint8_t *value, + size_t value_length, uint16_t value_offset); -BTErrno ble_server_send_update(BLECharacteristic characteristic, - const uint8_t *value, size_t value_length); +BTErrno ble_server_send_update(BLECharacteristic characteristic, const uint8_t *value, + size_t value_length); -BTErrno ble_server_send_update_selectively(BLECharacteristic characteristic, - const uint8_t *value, size_t value_length, - const BTDevice *devices, uint8_t num_devices); +BTErrno ble_server_send_update_selectively(BLECharacteristic characteristic, const uint8_t *value, + size_t value_length, const BTDevice *devices, + uint8_t num_devices); diff --git a/src/fw/applib/bluetooth/ble_descriptor.h b/src/fw/applib/bluetooth/ble_descriptor.h index 3306c6447c..2838352f21 100644 --- a/src/fw/applib/bluetooth/ble_descriptor.h +++ b/src/fw/applib/bluetooth/ble_descriptor.h @@ -23,8 +23,6 @@ BLECharacteristic ble_descriptor_get_characteristic(BLEDescriptor descriptor); // (FUTURE / LATER / NOT SCOPED) // Just to see how symmetric the Server APIs would be: - -BLEDescriptor ble_descriptor_create(const Uuid *uuid, - BLEAttributeProperty properties); +BLEDescriptor ble_descriptor_create(const Uuid *uuid, BLEAttributeProperty properties); BTErrno ble_descriptor_destroy(BLEDescriptor descriptor); diff --git a/src/fw/applib/bluetooth/ble_device.h b/src/fw/applib/bluetooth/ble_device.h index 9257dd3ff6..42c6f49ae1 100644 --- a/src/fw/applib/bluetooth/ble_device.h +++ b/src/fw/applib/bluetooth/ble_device.h @@ -16,5 +16,4 @@ //! @return The total number of known devices. This might be a larger //! number than num_devices_out will contain, if the passed array was not large //! enough to hold all the connected devices. -uint8_t ble_device_copy_known_devices(BTDevice *devices_out, - uint8_t *num_devices_out); +uint8_t ble_device_copy_known_devices(BTDevice *devices_out, uint8_t *num_devices_out); diff --git a/src/fw/applib/bluetooth/ble_ibeacon.c b/src/fw/applib/bluetooth/ble_ibeacon.c index 441ace58c5..9ed0611a5a 100644 --- a/src/fw/applib/bluetooth/ble_ibeacon.c +++ b/src/fw/applib/bluetooth/ble_ibeacon.c @@ -57,8 +57,7 @@ uint16_t ble_ibeacon_get_distance_cm(const BLEiBeacon *ibeacon) { return ibeacon->distance_cm; } -BLEiBeacon *ble_ibeacon_create_from_ad_data(const BLEAdData *ad, - int8_t rssi) { +BLEiBeacon *ble_ibeacon_create_from_ad_data(const BLEAdData *ad, int8_t rssi) { // Note, not yet exported to 3rd party apps so no padding necessary BLEiBeacon *ibeacon = applib_malloc(sizeof(BLEiBeacon)); if (ibeacon && !ble_ibeacon_parse(ad, rssi, ibeacon)) { @@ -77,35 +76,30 @@ void ble_ibeacon_destroy(BLEiBeacon *ibeacon) { // Below is the iBeacon advertisement parsing code. static uint16_t calculate_distance_cm(int8_t tx_power, int8_t rssi) { - return 0; // TODO + return 0; // TODO } // ----------------------------------------------------------------------------- //! iBeacon Advertisement Data parser -bool ble_ibeacon_parse(const BLEAdData *ad, int8_t rssi, - BLEiBeacon *ibeacon_out) { +bool ble_ibeacon_parse(const BLEAdData *ad, int8_t rssi, BLEiBeacon *ibeacon_out) { uint16_t company_id = 0; AdDataManufacturerSpecificAppleiBeacon raw_ibeacon; - const size_t size_copied = - ble_ad_copy_manufacturer_specific_data(ad, &company_id, - (uint8_t *) &raw_ibeacon, - sizeof(raw_ibeacon)); + const size_t size_copied = ble_ad_copy_manufacturer_specific_data( + ad, &company_id, (uint8_t *)&raw_ibeacon, sizeof(raw_ibeacon)); if (size_copied != sizeof(raw_ibeacon)) { return false; } - if (company_id == COMPANY_ID_APPLE && - raw_ibeacon.type == APPLE_TYPE_IBEACON && + if (company_id == COMPANY_ID_APPLE && raw_ibeacon.type == APPLE_TYPE_IBEACON && raw_ibeacon.length == APPLE_IBEACON_LENGTH) { - const int8_t tx_power = raw_ibeacon.calibrated_tx_power; - *ibeacon_out = (const BLEiBeacon) { - .uuid = UuidMakeFromBEBytes(raw_ibeacon.uuid), - .major = ntohs(raw_ibeacon.major), - .minor = ntohs(raw_ibeacon.minor), - .distance_cm = calculate_distance_cm(tx_power, rssi), - .rssi = rssi, - .calibrated_tx_power = tx_power, + *ibeacon_out = (const BLEiBeacon){ + .uuid = UuidMakeFromBEBytes(raw_ibeacon.uuid), + .major = ntohs(raw_ibeacon.major), + .minor = ntohs(raw_ibeacon.minor), + .distance_cm = calculate_distance_cm(tx_power, rssi), + .rssi = rssi, + .calibrated_tx_power = tx_power, }; return true; } @@ -116,17 +110,16 @@ bool ble_ibeacon_parse(const BLEAdData *ad, int8_t rssi, //! iBeacon Advertisement Data composer bool ble_ibeacon_compose(const BLEiBeacon *ibeacon_in, BLEAdData *ad_out) { AdDataManufacturerSpecificAppleiBeacon raw_ibeacon = { - .type = APPLE_TYPE_IBEACON, - .length = APPLE_IBEACON_LENGTH, - // Major/Minor are part of Apple's iBeacon spec and are Big Endian! - .major = htons(ibeacon_in->major), - .minor = htons(ibeacon_in->minor), - .calibrated_tx_power = ibeacon_in->calibrated_tx_power, + .type = APPLE_TYPE_IBEACON, + .length = APPLE_IBEACON_LENGTH, + // Major/Minor are part of Apple's iBeacon spec and are Big Endian! + .major = htons(ibeacon_in->major), + .minor = htons(ibeacon_in->minor), + .calibrated_tx_power = ibeacon_in->calibrated_tx_power, }; // Uuid is stored Big Endian on Pebble, so just copy over: memcpy(&raw_ibeacon.uuid, &ibeacon_in->uuid, sizeof(Uuid)); - return ble_ad_set_manufacturer_specific_data(ad_out, COMPANY_ID_APPLE, - (uint8_t *) &raw_ibeacon, + return ble_ad_set_manufacturer_specific_data(ad_out, COMPANY_ID_APPLE, (uint8_t *)&raw_ibeacon, sizeof(raw_ibeacon)); } diff --git a/src/fw/applib/bluetooth/ble_ibeacon.h b/src/fw/applib/bluetooth/ble_ibeacon.h index 8fe1a50127..95266dc7da 100644 --- a/src/fw/applib/bluetooth/ble_ibeacon.h +++ b/src/fw/applib/bluetooth/ble_ibeacon.h @@ -63,8 +63,7 @@ uint16_t ble_ibeacon_get_distance_cm(const BLEiBeacon *ibeacon); //! BLEScanHandler callback. //! @return BLEiBeacon object if iBeacon data is found, or NULL if the //! advertisement data did not contain valid iBeacon data. -BLEiBeacon *ble_ibeacon_create_from_ad_data(const BLEAdData *ad, - int8_t rssi); +BLEiBeacon *ble_ibeacon_create_from_ad_data(const BLEAdData *ad, int8_t rssi); //! Destroys an BLEiBeacon object and frees its resources that were allocated //! earlier by ble_ibeacon_create_from_ad_data(). @@ -79,8 +78,7 @@ void ble_ibeacon_destroy(BLEiBeacon *ibeacon); //! returns true. //! @return true if the data element was successfully parsed as iBeacon, //! false if the data element could not be parsed as iBeacon. -bool ble_ibeacon_parse(const BLEAdData *ad, int8_t rssi, - BLEiBeacon *ibeacon_out); +bool ble_ibeacon_parse(const BLEAdData *ad, int8_t rssi, BLEiBeacon *ibeacon_out); // ----------------------------------------------------------------------------- //! Internal iBeacon Advertisement Data serializer diff --git a/src/fw/applib/bluetooth/ble_scan.c b/src/fw/applib/bluetooth/ble_scan.c index 23f95042d3..fc596fcbe1 100644 --- a/src/fw/applib/bluetooth/ble_scan.c +++ b/src/fw/applib/bluetooth/ble_scan.c @@ -13,7 +13,6 @@ #include "syscall/syscall.h" - void ble_scan_handle_event(PebbleEvent *e) { BLEAppState *ble_app_state = app_state_get_ble_app_state(); if (!ble_app_state->scan_handler) { @@ -21,7 +20,7 @@ void ble_scan_handle_event(PebbleEvent *e) { } // Use the same buffer size as the kernel itself: - uint8_t *buffer = (uint8_t *) applib_malloc(GAP_LE_SCAN_REPORTS_BUFFER_SIZE); + uint8_t *buffer = (uint8_t *)applib_malloc(GAP_LE_SCAN_REPORTS_BUFFER_SIZE); if (!buffer) { APP_LOG(LOG_LEVEL_ERROR, "Need %u bytes of heap for ble_scan_start()", GAP_LE_SCAN_REPORTS_BUFFER_SIZE); @@ -39,18 +38,17 @@ void ble_scan_handle_event(PebbleEvent *e) { while (cursor < buffer + size) { const GAPLERawAdReport *report = (GAPLERawAdReport *)cursor; - const BTDeviceInternal device = (const BTDeviceInternal) { - .address = report->address.address, - .is_classic = false, - .is_random_address = report->is_random_address, + const BTDeviceInternal device = (const BTDeviceInternal){ + .address = report->address.address, + .is_classic = false, + .is_random_address = report->is_random_address, }; // Call the scan handler for each report: ble_app_state->scan_handler(device.opaque, report->rssi, &report->payload); - const size_t report_length = sizeof(GAPLERawAdReport) + - report->payload.ad_data_length + - report->payload.scan_resp_data_length; + const size_t report_length = sizeof(GAPLERawAdReport) + report->payload.ad_data_length + + report->payload.scan_resp_data_length; cursor += report_length; } diff --git a/src/fw/applib/bluetooth/ble_scan.h b/src/fw/applib/bluetooth/ble_scan.h index badb51a309..039e10e9bf 100644 --- a/src/fw/applib/bluetooth/ble_scan.h +++ b/src/fw/applib/bluetooth/ble_scan.h @@ -19,9 +19,7 @@ //! immediately after returning from this callback. Do not keep around //! any long-lived references around to the advertisement_data. //! @note Do not use ble_ad_destroy() on the advertisement_data. -typedef void (*BLEScanHandler)(BTDevice device, - int8_t rssi, - const BLEAdData *advertisement_data); +typedef void (*BLEScanHandler)(BTDevice device, int8_t rssi, const BLEAdData *advertisement_data); //! Start scanning for advertisements. Pebble will scan actively, meaning it //! will perform scan requests whenever the advertisement is scannable. diff --git a/src/fw/applib/bluetooth/ble_security.h b/src/fw/applib/bluetooth/ble_security.h index d61afb31c8..19267f5847 100644 --- a/src/fw/applib/bluetooth/ble_security.h +++ b/src/fw/applib/bluetooth/ble_security.h @@ -8,7 +8,6 @@ //------------------------------------------------------------------------------ // Out-Of-Band additions - //! "Out-of-Band" (OOB) is one of the mechanisms to exchange a shared secret //! during a pairing procedure between two devices. "PIN" and "Just Works" are //! the two other exchange mechanisms that the Bluetooth 4.0 Specification @@ -41,7 +40,6 @@ //! JavaScript APIs to fetch the data from the web service and transfer the //! data to the application on the watch using the AppMessage APIs. - //! Pointer to a function that can provide Out-Of-Band keys. //! @see ble_security_set_oob_handler() and ble_security_enable_oob() //! @param device The device for which the OOB key needs to be provided @@ -51,8 +49,7 @@ //! keys of 128-bit (16 byte) size are supported. //! @return true if the OOB key was written or false if no OOB data could be //! provided for the device. -typedef bool (*BLESecurityOOBHandler)(BTDevice device, - uint8_t *oob_key_buffer_out, +typedef bool (*BLESecurityOOBHandler)(BTDevice device, uint8_t *oob_key_buffer_out, size_t oob_key_buffer_size); //! Registers a permanent callback function that is responsible for providing diff --git a/src/fw/applib/bluetooth/ble_service.h b/src/fw/applib/bluetooth/ble_service.h index f5e8e90348..778c6aeabd 100644 --- a/src/fw/applib/bluetooth/ble_service.h +++ b/src/fw/applib/bluetooth/ble_service.h @@ -17,9 +17,8 @@ //! to services, characteristics and descriptors are guaranteed to remain valid //! *until the BLEClientServiceChangeHandler is called again* or until //! application is terminated. -uint8_t ble_service_get_characteristics(BLEService service, - BLECharacteristic characteristics_out[], - uint8_t num_characteristics); +uint8_t ble_service_get_characteristics(BLEService service, BLECharacteristic characteristics_out[], + uint8_t num_characteristics); //! Gets the Service UUID of a service. //! @param service The service for which to get the Service UUID. @@ -52,23 +51,19 @@ BTDevice ble_service_get_device(BLEService service); //! to services, characteristics and descriptors are guaranteed to remain valid //! *until the BLEClientServiceChangeHandler is called again* or until //! application is terminated. -uint8_t ble_service_get_included_services(BLEService service, - BLEService included_services_out[], +uint8_t ble_service_get_included_services(BLEService service, BLEService included_services_out[], uint8_t num_services); - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // (FUTURE / LATER / NOT SCOPED) // Just to see how symmetric the Server APIs could be: // creates + adds to GATT DB (?) // Services aren't supposed to change. Pass everything into the 'create' call: -BLEService ble_service_create(const Uuid *service_uuid, - BLECharacteristic characteristics[], +BLEService ble_service_create(const Uuid *service_uuid, BLECharacteristic characteristics[], uint8_t num_characteristics); -void ble_service_set_included_services(BLEService service, - BLEService included_services[], +void ble_service_set_included_services(BLEService service, BLEService included_services[], uint8_t num_included_services); // removes from GATT DB (?) + destroys diff --git a/src/fw/applib/compass_service.c b/src/fw/applib/compass_service.c index 4b23dfe376..8befd145b8 100644 --- a/src/fw/applib/compass_service.c +++ b/src/fw/applib/compass_service.c @@ -19,7 +19,7 @@ #include "process_state/app_state/app_state.h" #include "process_state/worker_state/worker_state.h" -#define PEEK_TIMEOUT_MS 11 * 1000 +#define PEEK_TIMEOUT_MS 11 * 1000 static CompassServiceConfig **prv_get_config(PebbleTask task) { CompassServiceConfig **config = NULL; @@ -52,10 +52,10 @@ static void prv_do_data_handle(PebbleEvent *e, void *context) { PebbleCompassDataEvent *m = &e->compass_data; CompassHeadingData data = { - .is_declination_valid = false, - .compass_status = m->calib_status, - .magnetic_heading = m->magnetic_heading, - .true_heading = m->magnetic_heading + .is_declination_valid = false, + .compass_status = m->calib_status, + .magnetic_heading = m->magnetic_heading, + .true_heading = m->magnetic_heading }; CompassServiceConfig *config = *prv_get_config(PebbleTask_Unknown); @@ -87,8 +87,7 @@ int compass_service_peek(CompassHeadingData *data) { // 11 second timer to turn off compass, reset timeout every peek if (config->peek_timer == NULL) { - config->peek_timer = app_timer_register(PEEK_TIMEOUT_MS, - prv_peek_timeout_callback, NULL); + config->peek_timer = app_timer_register(PEEK_TIMEOUT_MS, prv_peek_timeout_callback, NULL); } else { app_timer_reschedule(config->peek_timer, PEEK_TIMEOUT_MS); } @@ -109,13 +108,11 @@ int compass_service_set_heading_filter(CompassHeading filter) { void compass_service_subscribe(CompassHeadingHandler handler) { CompassServiceConfig *config = *prv_get_config(PebbleTask_Unknown); - *config = (const CompassServiceConfig){ 0 }; + *config = (const CompassServiceConfig){0}; config->compass_cb = handler; - config->info = (EventServiceInfo) { - .type = PEBBLE_COMPASS_DATA_EVENT, - .handler = &prv_do_data_handle - }; + config->info = + (EventServiceInfo){.type = PEBBLE_COMPASS_DATA_EVENT, .handler = &prv_do_data_handle}; event_service_client_subscribe(&config->info); } diff --git a/src/fw/applib/compass_service_private.h b/src/fw/applib/compass_service_private.h index c11bdfed88..97e5670e0e 100644 --- a/src/fw/applib/compass_service_private.h +++ b/src/fw/applib/compass_service_private.h @@ -7,13 +7,12 @@ #include "applib/app_timer.h" #include "applib/event_service_client.h" - typedef struct __attribute__((__packed__)) { CompassHeading compass_filter; int32_t last_angle; CompassHeading heading_declination; - AppTimer* peek_timer; + AppTimer *peek_timer; CompassHeadingHandler compass_cb; EventServiceInfo info; diff --git a/src/fw/applib/compass_service_stub.c b/src/fw/applib/compass_service_stub.c index 79845af3b2..6518f5ffd6 100644 --- a/src/fw/applib/compass_service_stub.c +++ b/src/fw/applib/compass_service_stub.c @@ -16,8 +16,7 @@ //! @return which status value we should use to indicate we have no compass static CompassStatus prv_get_status(void) { - if (process_manager_compiled_with_legacy2_sdk() || - process_manager_compiled_with_legacy3_sdk()) { + if (process_manager_compiled_with_legacy2_sdk() || process_manager_compiled_with_legacy3_sdk()) { // This value is new in 4.x. Use the old CompassStatusDataInvalid value instead for old apps // that may not know how to handle the previously undefined status. return CompassStatusDataInvalid; @@ -27,9 +26,7 @@ static CompassStatus prv_get_status(void) { } int compass_service_peek(CompassHeadingData *data) { - *data = (CompassHeadingData) { - .compass_status = prv_get_status() - }; + *data = (CompassHeadingData){.compass_status = prv_get_status()}; return 0; } @@ -40,9 +37,7 @@ int compass_service_set_heading_filter(CompassHeading filter) { } void compass_service_subscribe(CompassHeadingHandler handler) { - CompassHeadingData data = { - .compass_status = prv_get_status() - }; + CompassHeadingData data = {.compass_status = prv_get_status()}; // Call the handler once to indicate status handler(data); diff --git a/src/fw/applib/connection_service.c b/src/fw/applib/connection_service.c index 686ff29387..178f0730a7 100644 --- a/src/fw/applib/connection_service.c +++ b/src/fw/applib/connection_service.c @@ -12,7 +12,7 @@ #include "process_state/app_state/app_state.h" #include "process_state/worker_state/worker_state.h" -static ConnectionServiceState* prv_get_state(void) { +static ConnectionServiceState *prv_get_state(void) { PebbleTask task = pebble_task_get_current(); if (task == PebbleTask_App) { @@ -29,9 +29,8 @@ static void prv_do_handle(PebbleEvent *e, void *context) { bool connected = e->bluetooth.comm_session_event.is_open; ConnectionHandler handler = - (e->bluetooth.comm_session_event.is_system ? - state->handlers.pebble_app_connection_handler : - state->handlers.pebblekit_connection_handler); + (e->bluetooth.comm_session_event.is_system ? state->handlers.pebble_app_connection_handler + : state->handlers.pebblekit_connection_handler); if (handler) { handler(connected); @@ -59,11 +58,11 @@ void connection_service_subscribe(ConnectionHandlers conn_handlers) { } void connection_service_state_init(ConnectionServiceState *state) { - *state = (ConnectionServiceState) { - .bcs_info = { - .type = PEBBLE_BT_CONNECTION_DEBOUNCED_EVENT, - .handler = prv_do_handle, - }, + *state = (ConnectionServiceState){ + .bcs_info = { + .type = PEBBLE_BT_CONNECTION_DEBOUNCED_EVENT, + .handler = prv_do_handle, + }, }; } @@ -71,8 +70,8 @@ void connection_service_state_init(ConnectionServiceState *state) { void bluetooth_connection_service_subscribe(ConnectionHandler handler) { ConnectionHandlers conn_handlers = { - .pebble_app_connection_handler = handler, - .pebblekit_connection_handler = NULL + .pebble_app_connection_handler = handler, + .pebblekit_connection_handler = NULL }; connection_service_subscribe(conn_handlers); } diff --git a/src/fw/applib/data_logging.c b/src/fw/applib/data_logging.c index a2fe907190..681807fe5d 100644 --- a/src/fw/applib/data_logging.c +++ b/src/fw/applib/data_logging.c @@ -23,8 +23,8 @@ DataLoggingSessionRef data_logging_create(uint32_t tag, DataLoggingItemType item } // Create the session - DataLoggingSessionRef session = sys_data_logging_create(tag, item_type, item_length, buffer, - resume); + DataLoggingSessionRef session = + sys_data_logging_create(tag, item_type, item_length, buffer, resume); if (session == NULL && buffer != NULL) { applib_free(buffer); } @@ -40,4 +40,3 @@ DataLoggingResult data_logging_log(DataLoggingSessionRef logging_session, const uint32_t num_items) { return sys_data_logging_log(logging_session, data, num_items); } - diff --git a/src/fw/applib/data_logging.h b/src/fw/applib/data_logging.h index 2a32119492..76466879ba 100644 --- a/src/fw/applib/data_logging.h +++ b/src/fw/applib/data_logging.h @@ -66,13 +66,13 @@ typedef enum { //! Enumerated values describing the possible outcomes of data logging operations typedef enum { - DATA_LOGGING_SUCCESS = 0, //!< Successful operation - DATA_LOGGING_BUSY, //!< Someone else is writing to this logging session - DATA_LOGGING_FULL, //!< No more space to save data - DATA_LOGGING_NOT_FOUND, //!< The logging session does not exist - DATA_LOGGING_CLOSED, //!< The logging session was made inactive - DATA_LOGGING_INVALID_PARAMS, //!< An invalid parameter was passed to one of the functions - DATA_LOGGING_INTERNAL_ERR //!< An internal error occurred + DATA_LOGGING_SUCCESS = 0, //!< Successful operation + DATA_LOGGING_BUSY, //!< Someone else is writing to this logging session + DATA_LOGGING_FULL, //!< No more space to save data + DATA_LOGGING_NOT_FOUND, //!< The logging session does not exist + DATA_LOGGING_CLOSED, //!< The logging session was made inactive + DATA_LOGGING_INVALID_PARAMS, //!< An invalid parameter was passed to one of the functions + DATA_LOGGING_INTERNAL_ERR //!< An internal error occurred } DataLoggingResult; typedef void *DataLoggingSessionRef; @@ -124,4 +124,3 @@ DataLoggingResult data_logging_log(DataLoggingSessionRef logging_session, const //! @} // end addtogroup DataLogging //! @} // end addtogroup Foundation - diff --git a/src/fw/applib/event_service_client.c b/src/fw/applib/event_service_client.c index af514e127e..4b5590fb12 100644 --- a/src/fw/applib/event_service_client.c +++ b/src/fw/applib/event_service_client.c @@ -14,7 +14,6 @@ #include #include "system/passert.h" - static EventServiceInfo *prv_get_state(void) { PebbleTask task = pebble_task_get_current(); if (task == PebbleTask_App) { @@ -70,10 +69,10 @@ void event_service_client_handle_event(PebbleEvent *e) { EventServiceInfo *state = prv_get_state(); const uintptr_t type = e->type; // find the first callback - ListNode *handler = list_find(&state->list_node, event_service_filter, (void *) type); + ListNode *handler = list_find(&state->list_node, event_service_filter, (void *)type); while (handler) { // find the next callback before we call the current one, because the CB may alter the list - ListNode *next_handler = list_find_next(handler, event_service_filter, false, (void *) type); + ListNode *next_handler = list_find_next(handler, event_service_filter, false, (void *)type); do_handle((EventServiceInfo *)handler, e); handler = next_handler; } diff --git a/src/fw/applib/event_service_client.h b/src/fw/applib/event_service_client.h index b2e3c9341d..42debe19a9 100644 --- a/src/fw/applib/event_service_client.h +++ b/src/fw/applib/event_service_client.h @@ -14,7 +14,7 @@ typedef struct __attribute__((packed)) { void *context; } EventServiceInfo; -void event_service_client_subscribe(EventServiceInfo * service_info); -void event_service_client_unsubscribe(EventServiceInfo * service_info); +void event_service_client_subscribe(EventServiceInfo *service_info); +void event_service_client_unsubscribe(EventServiceInfo *service_info); void event_service_client_handle_event(PebbleEvent *e); bool event_service_filter(ListNode *node, void *tp); diff --git a/src/fw/applib/fonts/codepoint.c b/src/fw/applib/fonts/codepoint.c index c0c916f263..243805dbaa 100644 --- a/src/fw/applib/fonts/codepoint.c +++ b/src/fw/applib/fonts/codepoint.c @@ -37,64 +37,64 @@ // because that block also holds glyphs the base fonts carry (the lozenge 25CA and the // wildcard box 25AF), which must keep resolving to the base font. static const Codepoint NONSTANDARD_EMOJI_CODEPOINTS[] = { - 0x2192, // rightwards_arrow - 0x25AA, // black_small_square - 0x25AB, // white_small_square - 0x25B6, // black_right_pointing_triangle - 0x25BA, // black_right_pointing_pointer - 0x25C0, // black_left_pointing_triangle - 0x25FB, // white_medium_square - 0x25FC, // black_medium_square - 0x25FD, // white_medium_small_square - 0x25FE, // black_medium_small_square + 0x2192, // rightwards_arrow + 0x25AA, // black_small_square + 0x25AB, // white_small_square + 0x25B6, // black_right_pointing_triangle + 0x25BA, // black_right_pointing_pointer + 0x25C0, // black_left_pointing_triangle + 0x25FB, // white_medium_square + 0x25FC, // black_medium_square + 0x25FD, // white_medium_small_square + 0x25FE, // black_medium_small_square }; // Note: Please keep these sorted // Unicode TR14 line break classes: spaces with class BA (Break After) allow line breaks. // Non-breaking spaces (class GL): U+00A0, U+2007, U+202F are intentionally excluded. static const Codepoint END_OF_WORD_CODEPOINTS[] = { - NULL_CODEPOINT, // 0x0 - NEWLINE_CODEPOINT, // 0xa - SPACE_CODEPOINT, // 0x20 - HYPHEN_CODEPOINT, // 0x2d - EN_QUAD_CODEPOINT, // 0x2000 (BA) - EM_QUAD_CODEPOINT, // 0x2001 (BA) - EN_SPACE_CODEPOINT, // 0x2002 (BA) - EM_SPACE_CODEPOINT, // 0x2003 (BA) - THREE_PER_EM_SPACE_CODEPOINT, // 0x2004 (BA) - FOUR_PER_EM_SPACE_CODEPOINT, // 0x2005 (BA) - SIX_PER_EM_SPACE_CODEPOINT, // 0x2006 (BA) - PUNCTUATION_SPACE_CODEPOINT, // 0x2008 (BA) - THIN_SPACE_CODEPOINT, // 0x2009 (BA) - HAIR_SPACE_CODEPOINT, // 0x200a (BA) - ZERO_WIDTH_SPACE_CODEPOINT, // 0x200b - MEDIUM_MATHEMATICAL_SPACE_CODEPOINT, // 0x205f (BA) - IDEOGRAPHIC_SPACE_CODEPOINT, // 0x3000 (BA) + NULL_CODEPOINT, // 0x0 + NEWLINE_CODEPOINT, // 0xa + SPACE_CODEPOINT, // 0x20 + HYPHEN_CODEPOINT, // 0x2d + EN_QUAD_CODEPOINT, // 0x2000 (BA) + EM_QUAD_CODEPOINT, // 0x2001 (BA) + EN_SPACE_CODEPOINT, // 0x2002 (BA) + EM_SPACE_CODEPOINT, // 0x2003 (BA) + THREE_PER_EM_SPACE_CODEPOINT, // 0x2004 (BA) + FOUR_PER_EM_SPACE_CODEPOINT, // 0x2005 (BA) + SIX_PER_EM_SPACE_CODEPOINT, // 0x2006 (BA) + PUNCTUATION_SPACE_CODEPOINT, // 0x2008 (BA) + THIN_SPACE_CODEPOINT, // 0x2009 (BA) + HAIR_SPACE_CODEPOINT, // 0x200a (BA) + ZERO_WIDTH_SPACE_CODEPOINT, // 0x200b + MEDIUM_MATHEMATICAL_SPACE_CODEPOINT, // 0x205f (BA) + IDEOGRAPHIC_SPACE_CODEPOINT, // 0x3000 (BA) }; // Note: Please keep these sorted static const Codepoint FORMATTING_CODEPOINTS[] = { - 0x7F, // delete - 0x200C, // zero-width non-joiner - 0x200D, // zero-width joiner - 0x200E, // left to right - 0x200F, // right to left - 0x202A, // bidirectional - right to left - 0x202B, // bidirectional - right to left embedding - 0x202C, // bidirectional - pop direction - 0x202D, // left to right override - 0x202E, // right to left override - 0x20E3, // combining enclosing keycap; no font has the ring, keep the base digit - 0xFE0E, // variation selector 1 - 0xFE0F, // variation selector 2 - 0xFEFF, // zero-width-no-break - 0xFFFC, // object replacement character + 0x7F, // delete + 0x200C, // zero-width non-joiner + 0x200D, // zero-width joiner + 0x200E, // left to right + 0x200F, // right to left + 0x202A, // bidirectional - right to left + 0x202B, // bidirectional - right to left embedding + 0x202C, // bidirectional - pop direction + 0x202D, // left to right override + 0x202E, // right to left override + 0x20E3, // combining enclosing keycap; no font has the ring, keep the base digit + 0xFE0E, // variation selector 1 + 0xFE0F, // variation selector 2 + 0xFEFF, // zero-width-no-break + 0xFFFC, // object replacement character }; // Note: Please keep these sorted static const Codepoint ZERO_WIDTH_CODEPOINTS[] = { - ZERO_WIDTH_SPACE_CODEPOINT, - WORD_JOINER_CODEPOINT, + ZERO_WIDTH_SPACE_CODEPOINT, + WORD_JOINER_CODEPOINT, }; static bool codepoint_in_list(const Codepoint codepoint, const Codepoint *codepoints, size_t size) { @@ -146,8 +146,7 @@ bool codepoint_is_ideograph(const Codepoint codepoint) { // see http://www.unicode.org/reports/tr14/ for the whole enchilada bool codepoint_is_end_of_word(const Codepoint codepoint) { - return codepoint_in_list(codepoint, END_OF_WORD_CODEPOINTS, - ARRAY_LENGTH(END_OF_WORD_CODEPOINTS)); + return codepoint_in_list(codepoint, END_OF_WORD_CODEPOINTS, ARRAY_LENGTH(END_OF_WORD_CODEPOINTS)); } // see http://unicode.org/reports/tr51/ section 2.2 "Diversity" @@ -171,28 +170,21 @@ bool codepoint_is_zero_width(const Codepoint codepoint) { bool codepoint_is_latin(const Codepoint codepoint) { return (codepoint <= MAX_LATIN_CODEPOINT || - (codepoint >= MIN_SYMBOLS_CODEPOINT && - codepoint <= MAX_SYMBOLS_CODEPOINT)); + (codepoint >= MIN_SYMBOLS_CODEPOINT && codepoint <= MAX_SYMBOLS_CODEPOINT)); } bool codepoint_is_emoji(const Codepoint codepoint) { // search for the codepoint in the list of nonstandard emoji codepoints first. - const bool found = codepoint_in_list(codepoint, - NONSTANDARD_EMOJI_CODEPOINTS, + const bool found = codepoint_in_list(codepoint, NONSTANDARD_EMOJI_CODEPOINTS, ARRAY_LENGTH(NONSTANDARD_EMOJI_CODEPOINTS)); if (found) { return true; } - return (codepoint >= MIN_UNIFIED_EMOJI_CODEPOINT && - codepoint <= MAX_UNIFIED_EMOJI_CODEPOINT) || - (codepoint >= MIN_MISC_TECHNICAL_CODEPOINT && - codepoint <= MAX_MISC_TECHNICAL_CODEPOINT) || - (codepoint >= MIN_MISC_SYMBOLS_CODEPOINT && - codepoint <= MAX_MISC_SYMBOLS_CODEPOINT) || - (codepoint >= MIN_MISC_ARROWS_CODEPOINT && - codepoint <= MAX_MISC_ARROWS_CODEPOINT) || - (codepoint >= MIN_ENCLOSED_EMOJI_CODEPOINT && - codepoint <= MAX_ENCLOSED_EMOJI_CODEPOINT); + return (codepoint >= MIN_UNIFIED_EMOJI_CODEPOINT && codepoint <= MAX_UNIFIED_EMOJI_CODEPOINT) || + (codepoint >= MIN_MISC_TECHNICAL_CODEPOINT && codepoint <= MAX_MISC_TECHNICAL_CODEPOINT) || + (codepoint >= MIN_MISC_SYMBOLS_CODEPOINT && codepoint <= MAX_MISC_SYMBOLS_CODEPOINT) || + (codepoint >= MIN_MISC_ARROWS_CODEPOINT && codepoint <= MAX_MISC_ARROWS_CODEPOINT) || + (codepoint >= MIN_ENCLOSED_EMOJI_CODEPOINT && codepoint <= MAX_ENCLOSED_EMOJI_CODEPOINT); } bool codepoint_is_regional_indicator(const Codepoint codepoint) { @@ -200,8 +192,7 @@ bool codepoint_is_regional_indicator(const Codepoint codepoint) { codepoint <= MAX_REGIONAL_INDICATOR_CODEPOINT); } -Codepoint emoji_shape_pair(const Codepoint curr_cp, const Codepoint next_cp, - bool *consumed_next) { +Codepoint emoji_shape_pair(const Codepoint curr_cp, const Codepoint next_cp, bool *consumed_next) { *consumed_next = false; // A flag is a pair of regional indicators; the emoji font carries no @@ -215,8 +206,7 @@ Codepoint emoji_shape_pair(const Codepoint curr_cp, const Codepoint next_cp, } bool codepoint_is_special(const Codepoint codepoint) { - return (codepoint >= MIN_SPECIAL_CODEPOINT && - codepoint <= MAX_SPECIAL_CODEPOINT); + return (codepoint >= MIN_SPECIAL_CODEPOINT && codepoint <= MAX_SPECIAL_CODEPOINT); } bool codepoint_is_rtl(const Codepoint codepoint) { diff --git a/src/fw/applib/fonts/codepoint.h b/src/fw/applib/fonts/codepoint.h index 6b6277e144..c4223acbf3 100644 --- a/src/fw/applib/fonts/codepoint.h +++ b/src/fw/applib/fonts/codepoint.h @@ -64,8 +64,7 @@ bool codepoint_is_regional_indicator(const Codepoint codepoint); // for curr_cp and sets *consumed_next when next_cp is folded into it; returns // curr_cp unchanged otherwise. Callers must give a consumed codepoint zero // width and must not draw it. -Codepoint emoji_shape_pair(const Codepoint curr_cp, const Codepoint next_cp, - bool *consumed_next); +Codepoint emoji_shape_pair(const Codepoint curr_cp, const Codepoint next_cp, bool *consumed_next); // This is a least dirty hack to enable special rendering when a special codepoint is hit in the // text being rendered diff --git a/src/fw/applib/fonts/fonts.c b/src/fw/applib/fonts/fonts.c index 2e265c976d..5c6516d4d2 100644 --- a/src/fw/applib/fonts/fonts.c +++ b/src/fw/applib/fonts/fonts.c @@ -25,8 +25,8 @@ GFont fonts_get_fallback_font(void) { GFont fonts_get_system_font(const char *font_key) { static const char bitham_alias[] = "RESOURCE_ID_GOTHAM"; static const char bitham_prefix[] = "RESOURCE_ID_BITHAM"; - static const size_t bitham_alias_len = sizeof(bitham_alias)-1; - static const size_t bitham_prefix_len = sizeof(bitham_prefix)-1; + static const size_t bitham_alias_len = sizeof(bitham_alias) - 1; + static const size_t bitham_prefix_len = sizeof(bitham_prefix) - 1; GFont res = sys_font_get_system_font(font_key); @@ -37,7 +37,7 @@ GFont fonts_get_system_font(const char *font_key) { #pragma GCC diagnostic ignored "-Wstringop-truncation" strncpy(new_font_key, bitham_prefix, bitham_prefix_len); #pragma GCC diagnostic pop - strcpy(new_font_key+bitham_prefix_len, font_key+bitham_alias_len); + strcpy(new_font_key + bitham_prefix_len, font_key + bitham_alias_len); // let's try again res = sys_font_get_system_font(new_font_key); } @@ -72,8 +72,8 @@ GFont fonts_load_custom_font_system(ResAppNum app_num, uint32_t resource_id) { return NULL; } - bool result = text_resources_init_font(app_num, resource_id, - 0 /* extended resource */, font_info); + bool result = + text_resources_init_font(app_num, resource_id, 0 /* extended resource */, font_info); if (!result) { // couldn't init the font @@ -93,7 +93,7 @@ void fonts_unload_custom_font(GFont font) { return; } - FontInfo *font_info = (FontInfo*) font; + FontInfo *font_info = (FontInfo *)font; applib_free(font_info); } @@ -103,10 +103,10 @@ static const struct { uint8_t height; } s_emoji_fonts[] = { // Keep this sorted in descending order: lookup returns the first entry that fits - { FONT_KEY_GOTHIC_28_EMOJI, 28 }, - { FONT_KEY_GOTHIC_24_EMOJI, 24 }, - { FONT_KEY_GOTHIC_18_EMOJI, 18 }, - { FONT_KEY_GOTHIC_14_EMOJI, 14 }, + {FONT_KEY_GOTHIC_28_EMOJI, 28}, + {FONT_KEY_GOTHIC_24_EMOJI, 24}, + {FONT_KEY_GOTHIC_18_EMOJI, 18}, + {FONT_KEY_GOTHIC_14_EMOJI, 14}, }; FontInfo *fonts_get_system_emoji_font_for_size(unsigned int font_height) { @@ -125,7 +125,7 @@ FontInfo *fonts_get_system_emoji_font_for_size(unsigned int font_height) { #endif uint8_t fonts_get_font_height(GFont font) { - FontInfo* fontinfo = (FontInfo*) font; + FontInfo *fontinfo = (FontInfo *)font; return fontinfo->max_height; } diff --git a/src/fw/applib/fonts/fonts.h b/src/fw/applib/fonts/fonts.h index bb195b5c06..db04fa47d3 100644 --- a/src/fw/applib/fonts/fonts.h +++ b/src/fw/applib/fonts/fonts.h @@ -23,7 +23,7 @@ //! @see \ref fonts_load_custom_font() //! @see \ref text_layer_set_font() //! @see \ref graphics_draw_text() -typedef FontInfo* GFont; +typedef FontInfo *GFont; //! @internal //! Gets the fallback system font (14pt Raster Gothic) diff --git a/src/fw/applib/fonts/fonts_private.h b/src/fw/applib/fonts/fonts_private.h index 5653684d5e..dbc3549d44 100644 --- a/src/fw/applib/fonts/fonts_private.h +++ b/src/fw/applib/fonts/fonts_private.h @@ -6,7 +6,7 @@ #include "resource/resource.h" #include "pbl/util/attributes.h" -// +// // Definitions only for font loading and text rendering // @@ -17,16 +17,15 @@ // feature bits: 2 or 4 byte offsets, RLE encoding #define FONT_VERSION_3 3 #define FEATURE_OFFSET_16 (1 << 0) -#define FEATURE_RLE4 (1 << 1) +#define FEATURE_RLE4 (1 << 1) // HACK ALERT: Store the v3 FontMetaDataV3 feature bits in the top two bits of FontMetaData // version field. We need this information at the lowest levels and can't extend FontMetaData // for legacy support reasons. -#define FONT_VERSION(_version) ((_version) & 0x3F) -#define HAS_FEATURE(_version, _feature) ((_version) & (_feature)) -#define VERSION_FIELD_FEATURE_OFFSET_16 (1 << 7) -#define VERSION_FIELD_FEATURE_RLE4 (1 << 6) - +#define FONT_VERSION(_version) ((_version) & 0x3F) +#define HAS_FEATURE(_version, _feature) ((_version) & (_feature)) +#define VERSION_FIELD_FEATURE_OFFSET_16 (1 << 7) +#define VERSION_FIELD_FEATURE_RLE4 (1 << 6) // There are now three versions of the FontMetaData structure: V1 (formerly known as 'legacy'), V2 // (still known as FontMetaData), and V3 (know as V3). We can't change the stack/memory usage @@ -82,4 +81,3 @@ typedef struct PACKED { uint8_t count; uint16_t offset; } FontHashTableEntry; - diff --git a/src/fw/applib/graphics/1_bit/bitblt_private.c b/src/fw/applib/graphics/1_bit/bitblt_private.c index 3261909500..3df1db8ca5 100644 --- a/src/fw/applib/graphics/1_bit/bitblt_private.c +++ b/src/fw/applib/graphics/1_bit/bitblt_private.c @@ -33,11 +33,9 @@ T_STATIC void prv_apply_tint_color(GColor *color, GColor tint_color) { } } -T_STATIC void prv_calc_two_row_look_ups(TwoRowLookUp *look_up, - GCompOp compositing_mode, - const GColor8 *palette, - uint8_t num_entries, - GColor tint_color) { +T_STATIC void prv_calc_two_row_look_ups(TwoRowLookUp *look_up, GCompOp compositing_mode, + const GColor8 *palette, uint8_t num_entries, + GColor tint_color) { for (unsigned int palette_index = 0; palette_index < num_entries; palette_index++) { GColor color = palette[palette_index]; // gcolor_get_grayscale will convert any color with an alpha less than 2 to clear @@ -52,23 +50,22 @@ T_STATIC void prv_calc_two_row_look_ups(TwoRowLookUp *look_up, color = gcolor_get_grayscale(color); for (unsigned int row_number = 0; row_number < ARRAY_LENGTH(*look_up); row_number++) { (*look_up)[row_number].palette_pattern[palette_index] = - graphics_private_get_1bit_grayscale_pattern(color, row_number); + graphics_private_get_1bit_grayscale_pattern(color, row_number); (*look_up)[row_number].transparent_mask[palette_index] = - gcolor_is_transparent(color) ? false : true; + gcolor_is_transparent(color) ? false : true; } } } -void bitblt_bitmap_into_bitmap_tiled_palette_to_1bit(GBitmap* dest_bitmap, - const GBitmap* src_bitmap, GRect dest_rect, +void bitblt_bitmap_into_bitmap_tiled_palette_to_1bit(GBitmap *dest_bitmap, + const GBitmap *src_bitmap, GRect dest_rect, GPoint src_origin_offset, - GCompOp compositing_mode, - GColor tint_color) { + GCompOp compositing_mode, GColor tint_color) { if (!src_bitmap->palette) { return; } const int8_t dest_begin_x = (dest_rect.origin.x / 32); - const uint32_t * const dest_block_x_begin = ((uint32_t *)dest_bitmap->addr) + dest_begin_x; + const uint32_t *const dest_block_x_begin = ((uint32_t *)dest_bitmap->addr) + dest_begin_x; const int dest_row_length_words = (dest_bitmap->row_size_bytes / 4); // The number of bits between the beginning of dest_block and // the beginning of the nearest 32-bit block: @@ -84,8 +81,8 @@ void bitblt_bitmap_into_bitmap_tiled_palette_to_1bit(GBitmap* dest_bitmap, // how many 32-bit blocks do we need to bitblt on this row: const int16_t dest_end_x = grect_get_max_x(&dest_rect); const int16_t dest_y_end = grect_get_max_y(&dest_rect); - const uint8_t num_dest_blocks_per_row = (dest_end_x / 32) + - ((dest_end_x % 32) ? 1 : 0) - dest_begin_x; + const uint8_t num_dest_blocks_per_row = + (dest_end_x / 32) + ((dest_end_x % 32) ? 1 : 0) - dest_begin_x; const GColor *palette = src_bitmap->palette; const uint8_t *src = src_bitmap->addr; @@ -116,7 +113,7 @@ void bitblt_bitmap_into_bitmap_tiled_palette_to_1bit(GBitmap* dest_bitmap, while (dest_block != dest_block_end) { uint8_t dest_x = dest_shift; while (dest_x < 32 && row_bits_left > 0) { - if (src_x >= src_end_x) { // Wrap horizontally + if (src_x >= src_end_x) { // Wrap horizontally src_x = src_begin_x; } uint8_t cindex = raw_image_get_value_for_bitdepth(src, src_x, src_y, @@ -149,7 +146,7 @@ void bitblt_bitmap_into_bitmap_tiled_palette_to_1bit(GBitmap* dest_bitmap, } } -void bitblt_bitmap_into_bitmap_tiled(GBitmap* dest_bitmap, const GBitmap* src_bitmap, +void bitblt_bitmap_into_bitmap_tiled(GBitmap *dest_bitmap, const GBitmap *src_bitmap, GRect dest_rect, GPoint src_origin_offset, GCompOp compositing_mode, GColor8 tint_color) { if (bitblt_compositing_mode_is_noop(compositing_mode, tint_color)) { @@ -169,9 +166,8 @@ void bitblt_bitmap_into_bitmap_tiled(GBitmap* dest_bitmap, const GBitmap* src_bi break; case GBitmapFormat1BitPalette: case GBitmapFormat2BitPalette: - bitblt_bitmap_into_bitmap_tiled_palette_to_1bit(dest_bitmap, src_bitmap, dest_rect, - src_origin_offset, compositing_mode, - tint_color); + bitblt_bitmap_into_bitmap_tiled_palette_to_1bit( + dest_bitmap, src_bitmap, dest_rect, src_origin_offset, compositing_mode, tint_color); break; default: APP_LOG(APP_LOG_LEVEL_DEBUG, "Only 1 and 2 bit palettized images can be displayed."); diff --git a/src/fw/applib/graphics/1_bit/framebuffer.c b/src/fw/applib/graphics/1_bit/framebuffer.c index 3099cd7a49..fd31b7b080 100644 --- a/src/fw/applib/graphics/1_bit/framebuffer.c +++ b/src/fw/applib/graphics/1_bit/framebuffer.c @@ -39,7 +39,7 @@ void framebuffer_mark_dirty_rect(FrameBuffer *f, GRect rect) { f->dirty_rect = grect_union(&f->dirty_rect, &rect); } - const GRect clip_rect = (GRect) { GPointZero, f->size }; + const GRect clip_rect = (GRect){GPointZero, f->size}; grect_clip(&f->dirty_rect, &clip_rect); f->is_dirty = true; diff --git a/src/fw/applib/graphics/1_bit/framebuffer.h b/src/fw/applib/graphics/1_bit/framebuffer.h index 782bdfa5dd..84a586638f 100644 --- a/src/fw/applib/graphics/1_bit/framebuffer.h +++ b/src/fw/applib/graphics/1_bit/framebuffer.h @@ -12,8 +12,8 @@ typedef struct FrameBuffer { uint32_t buffer[FRAMEBUFFER_SIZE_DWORDS]; GSize size; - GRect dirty_rect; //palette) { return; } @@ -74,18 +70,16 @@ void bitblt_bitmap_into_bitmap_tiled_palette_to_8bit(GBitmap* dest_bitmap, // This is the initial position that takes into account destination delta shift const int16_t src_initial_x = src_bitmap->bounds.origin.x + dest_delta_begin_x; const int16_t src_begin_x = MAX(src_row_info.min_x, src_bitmap->bounds.origin.x); - const int16_t src_end_x = MIN(grect_get_max_x(&src_bitmap->bounds), - src_row_info.max_x + 1); + const int16_t src_end_x = MIN(grect_get_max_x(&src_bitmap->bounds), src_row_info.max_x + 1); int16_t src_x = src_initial_x + src_origin_offset.x; for (int16_t dest_x = dest_begin_x; dest_x < dest_end_x; ++dest_x, ++src_x) { if (!WITHIN(src_x, src_begin_x, src_end_x - 1)) { // Check if content should wrap (under and over) for tiling - if (!WITHIN(src_x, src_bitmap->bounds.origin.x, - grect_get_max_x(&src_bitmap->bounds) - 1)) { + if (!WITHIN(src_x, src_bitmap->bounds.origin.x, grect_get_max_x(&src_bitmap->bounds) - 1)) { // keep correct bounds alignment for circular when tiling src_x = src_bitmap->bounds.origin.x + - ((src_x - src_bitmap->bounds.origin.x) % src_bitmap->bounds.size.w); + ((src_x - src_bitmap->bounds.origin.x) % src_bitmap->bounds.size.w); } else { // Increment source but don't draw continue; @@ -95,7 +89,7 @@ void bitblt_bitmap_into_bitmap_tiled_palette_to_8bit(GBitmap* dest_bitmap, // src points to the info for the row, so y and stride are 0 for raw_image_get_value uint8_t cindex = raw_image_get_value_for_bitdepth(src, src_x, 0, 0, src_bpp); GColor src_color = palette[cindex]; - GColor dest_color = (GColor) dest[dest_x]; + GColor dest_color = (GColor)dest[dest_x]; switch (compositing_mode) { case GCompOpAssign: dest[dest_x] = src_color.argb; @@ -111,8 +105,8 @@ void bitblt_bitmap_into_bitmap_tiled_palette_to_8bit(GBitmap* dest_bitmap, } case GCompOpTintLuminance: { const GColor actual_color = - gcolor_perform_lookup_using_color_luminance_and_multiply_alpha( - src_color, tint_luminance_lookup_table); + gcolor_perform_lookup_using_color_luminance_and_multiply_alpha( + src_color, tint_luminance_lookup_table); dest[dest_x] = gcolor_alpha_blend(actual_color, dest_color).argb; break; } @@ -124,12 +118,9 @@ void bitblt_bitmap_into_bitmap_tiled_palette_to_8bit(GBitmap* dest_bitmap, } } -void bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit(GBitmap *dest_bitmap, - const GBitmap *src_bitmap, - GRect dest_rect, - GPoint src_origin_offset, - GCompOp compositing_mode, - GColor8 tint_color) { +void bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit(GBitmap *dest_bitmap, const GBitmap *src_bitmap, + GRect dest_rect, GPoint src_origin_offset, + GCompOp compositing_mode, GColor8 tint_color) { const int16_t dest_begin_y = dest_rect.origin.y; const int16_t dest_end_y = grect_get_max_y(&dest_rect); const int16_t src_begin_y = src_bitmap->bounds.origin.y; @@ -164,8 +155,7 @@ void bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit(GBitmap *dest_bitmap, // This is the initial position that takes into account destination delta shift const int16_t src_initial_x = src_bitmap->bounds.origin.x + dest_delta_begin_x; const int16_t src_begin_x = MAX(src_row_info.min_x, src_bitmap->bounds.origin.x); - const int16_t src_end_x = MIN(grect_get_max_x(&src_bitmap->bounds), - src_row_info.max_x + 1); + const int16_t src_end_x = MIN(grect_get_max_x(&src_bitmap->bounds), src_row_info.max_x + 1); int16_t src_x = src_initial_x + src_origin_offset.x; for (int16_t dest_x = dest_begin_x; dest_x < dest_end_x; ++dest_x, ++src_x) { @@ -175,7 +165,7 @@ void bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit(GBitmap *dest_bitmap, grect_get_max_x(&src_bitmap->bounds) - 1)) { // keep correct bounds alignment for circular when tiling src_x = src_bitmap->bounds.origin.x + - ((src_x - src_bitmap->bounds.origin.x) % src_bitmap->bounds.size.w); + ((src_x - src_bitmap->bounds.origin.x) % src_bitmap->bounds.size.w); } else { // Increment source but don't draw continue; @@ -216,8 +206,7 @@ void bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit(GBitmap *dest_bitmap, // This is the initial position that takes into account destination delta shift const int16_t src_initial_x = src_bitmap->bounds.origin.x + dest_delta_begin_x; const int16_t src_begin_x = MAX(src_row_info.min_x, src_bitmap->bounds.origin.x); - const int16_t src_end_x = MIN(grect_get_max_x(&src_bitmap->bounds), - src_row_info.max_x + 1); + const int16_t src_end_x = MIN(grect_get_max_x(&src_bitmap->bounds), src_row_info.max_x + 1); int16_t src_x = src_initial_x + src_origin_offset.x; for (int16_t dest_x = dest_begin_x; dest_x < dest_end_x; ++dest_x, ++src_x) { @@ -227,13 +216,13 @@ void bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit(GBitmap *dest_bitmap, grect_get_max_x(&src_bitmap->bounds) - 1)) { // keep correct bounds alignment for circular when tiling src_x = src_bitmap->bounds.origin.x + - (((src_x - src_bitmap->bounds.origin.x)) % src_bitmap->bounds.size.w); + (((src_x - src_bitmap->bounds.origin.x)) % src_bitmap->bounds.size.w); } else { // Increment source but don't draw continue; } } - GColor src_color = *(GColor8 *) &src[src_x]; + GColor src_color = *(GColor8 *)&src[src_x]; GColor actual_color = src_color; if (compositing_mode == GCompOpTint) { @@ -251,12 +240,9 @@ void bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit(GBitmap *dest_bitmap, } } -void bitblt_bitmap_into_bitmap_tiled_1bit_to_8bit(GBitmap* dest_bitmap, - const GBitmap* src_bitmap, - GRect dest_rect, - GPoint src_origin_offset, - GCompOp compositing_mode, - GColor8 tint_color) { +void bitblt_bitmap_into_bitmap_tiled_1bit_to_8bit(GBitmap *dest_bitmap, const GBitmap *src_bitmap, + GRect dest_rect, GPoint src_origin_offset, + GCompOp compositing_mode, GColor8 tint_color) { const int16_t dest_begin_y = dest_rect.origin.y; const int16_t dest_end_y = dest_begin_y + dest_rect.size.h; @@ -277,18 +263,17 @@ void bitblt_bitmap_into_bitmap_tiled_1bit_to_8bit(GBitmap* dest_bitmap, } const int16_t corrected_src_x = - src_bitmap->bounds.origin.x + src_origin_offset.x + dest_delta_begin_x; - const uint32_t * const src_block_x_begin = - ((uint32_t *)src_bitmap->addr) + corrected_src_x / 32; + src_bitmap->bounds.origin.x + src_origin_offset.x + dest_delta_begin_x; + const uint32_t *const src_block_x_begin = ((uint32_t *)src_bitmap->addr) + corrected_src_x / 32; const int src_row_length_words = (src_bitmap->row_size_bytes / 4); const uint8_t src_line_start_idx = corrected_src_x % 32; const uint8_t src_line_wrap_idx = (src_bitmap->bounds.origin.x + dest_delta_begin_x) % 32; const uint8_t src_line_start_end_idx = - MIN(32, src_bitmap->bounds.size.w + src_line_start_idx - (src_origin_offset.x % 32)); + MIN(32, src_bitmap->bounds.size.w + src_line_start_idx - (src_origin_offset.x % 32)); const uint8_t src_line_wrap_end_idx = MIN(32, src_bitmap->bounds.size.w + src_line_wrap_idx); int16_t row_bits_left = dest_rect.size.w; - uint32_t * const src_block_begin = + uint32_t *const src_block_begin = (uint32_t *)src_block_x_begin + (src_y * src_row_length_words); uint32_t *src_block = src_block_begin; uint32_t src = *src_block; @@ -396,7 +381,7 @@ void bitblt_bitmap_into_bitmap_tiled_1bit_to_8bit(GBitmap* dest_bitmap, } } -void bitblt_bitmap_into_bitmap_tiled(GBitmap* dest_bitmap, const GBitmap* src_bitmap, +void bitblt_bitmap_into_bitmap_tiled(GBitmap *dest_bitmap, const GBitmap *src_bitmap, GRect dest_rect, GPoint src_origin_offset, GCompOp compositing_mode, GColor tint_color) { if (bitblt_compositing_mode_is_noop(compositing_mode, tint_color)) { @@ -412,15 +397,13 @@ void bitblt_bitmap_into_bitmap_tiled(GBitmap* dest_bitmap, const GBitmap* src_bi if (src_fmt == dest_fmt) { switch (src_fmt) { case GBitmapFormat1Bit: - bitblt_bitmap_into_bitmap_tiled_1bit_to_1bit(dest_bitmap, src_bitmap, dest_rect, - src_origin_offset, compositing_mode, - tint_color); + bitblt_bitmap_into_bitmap_tiled_1bit_to_1bit( + dest_bitmap, src_bitmap, dest_rect, src_origin_offset, compositing_mode, tint_color); break; case GBitmapFormat8Bit: case GBitmapFormat8BitCircular: - bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit(dest_bitmap, src_bitmap, dest_rect, - src_origin_offset, compositing_mode, - tint_color); + bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit( + dest_bitmap, src_bitmap, dest_rect, src_origin_offset, compositing_mode, tint_color); break; default: break; @@ -429,23 +412,20 @@ void bitblt_bitmap_into_bitmap_tiled(GBitmap* dest_bitmap, const GBitmap* src_bi if (dest_fmt == GBitmapFormat8Bit || dest_fmt == GBitmapFormat8BitCircular) { switch (src_fmt) { case GBitmapFormat1Bit: - bitblt_bitmap_into_bitmap_tiled_1bit_to_8bit(dest_bitmap, src_bitmap, dest_rect, - src_origin_offset, compositing_mode, - tint_color); + bitblt_bitmap_into_bitmap_tiled_1bit_to_8bit( + dest_bitmap, src_bitmap, dest_rect, src_origin_offset, compositing_mode, tint_color); break; case GBitmapFormat1BitPalette: case GBitmapFormat2BitPalette: case GBitmapFormat4BitPalette: - bitblt_bitmap_into_bitmap_tiled_palette_to_8bit(dest_bitmap, src_bitmap, dest_rect, - src_origin_offset, compositing_mode, - tint_color); + bitblt_bitmap_into_bitmap_tiled_palette_to_8bit( + dest_bitmap, src_bitmap, dest_rect, src_origin_offset, compositing_mode, tint_color); break; // Circular buffer can take this path case GBitmapFormat8Bit: case GBitmapFormat8BitCircular: - bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit(dest_bitmap, src_bitmap, dest_rect, - src_origin_offset, compositing_mode, - tint_color); + bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit( + dest_bitmap, src_bitmap, dest_rect, src_origin_offset, compositing_mode, tint_color); break; default: break; diff --git a/src/fw/applib/graphics/8_bit/framebuffer.c b/src/fw/applib/graphics/8_bit/framebuffer.c index c56b91e465..3b1e473293 100644 --- a/src/fw/applib/graphics/8_bit/framebuffer.c +++ b/src/fw/applib/graphics/8_bit/framebuffer.c @@ -59,7 +59,7 @@ void framebuffer_mark_dirty_rect(FrameBuffer *f, GRect rect) { f->dirty_rect = grect_union(&f->dirty_rect, &rect); } - const GRect clip_rect = (GRect) { GPointZero, f->size }; + const GRect clip_rect = (GRect){GPointZero, f->size}; grect_clip(&f->dirty_rect, &clip_rect); f->is_dirty = true; diff --git a/src/fw/applib/graphics/8_bit/framebuffer.h b/src/fw/applib/graphics/8_bit/framebuffer.h index 236e3b2049..0a7b2bd86b 100644 --- a/src/fw/applib/graphics/8_bit/framebuffer.h +++ b/src/fw/applib/graphics/8_bit/framebuffer.h @@ -15,19 +15,19 @@ #ifndef UNITTEST typedef struct FrameBuffer { uint8_t buffer[FRAMEBUFFER_SIZE_BYTES]; - GSize size; //= 0x0610 && cp <= 0x061A) || - (cp >= 0x064B && cp <= 0x065F) || - (cp == 0x0670) || - (cp >= 0x06D6 && cp <= 0x06DC) || - (cp >= 0x06DF && cp <= 0x06E4) || - (cp >= 0x06E7 && cp <= 0x06E8) || - (cp >= 0x06EA && cp <= 0x06ED); + return (cp >= 0x0610 && cp <= 0x061A) || (cp >= 0x064B && cp <= 0x065F) || (cp == 0x0670) || + (cp >= 0x06D6 && cp <= 0x06DC) || (cp >= 0x06DF && cp <= 0x06E4) || + (cp >= 0x06E7 && cp <= 0x06E8) || (cp >= 0x06EA && cp <= 0x06ED); } -size_t arabic_shape_text(const utf8_t *src, size_t src_len, - utf8_t *dest, size_t dest_size) { +size_t arabic_shape_text(const utf8_t *src, size_t src_len, utf8_t *dest, size_t dest_size) { if (src == NULL || dest == NULL || src_len == 0 || dest_size == 0) { return 0; } diff --git a/src/fw/applib/graphics/arabic_shaping.h b/src/fw/applib/graphics/arabic_shaping.h index 515cf1e1e4..b1cf63f01f 100644 --- a/src/fw/applib/graphics/arabic_shaping.h +++ b/src/fw/applib/graphics/arabic_shaping.h @@ -12,9 +12,9 @@ //! Arabic letter contextual form types typedef enum { ARABIC_FORM_ISOLATED = 0, //!< Letter stands alone - ARABIC_FORM_FINAL = 1, //!< End of word (connects right only) - ARABIC_FORM_INITIAL = 2, //!< Beginning of word (connects left only) - ARABIC_FORM_MEDIAL = 3 //!< Middle of word (connects both sides) + ARABIC_FORM_FINAL = 1, //!< End of word (connects right only) + ARABIC_FORM_INITIAL = 2, //!< Beginning of word (connects left only) + ARABIC_FORM_MEDIAL = 3 //!< Middle of word (connects both sides) } ArabicForm; //! Check if a codepoint is a shapeable Arabic letter (U+0621-U+064A). @@ -61,5 +61,4 @@ Codepoint arabic_shape_pair(Codepoint prev_cp, Codepoint curr_cp, Codepoint next //! @param dest_size Size of destination buffer in bytes //! @return Number of bytes written to dest (excluding null terminator), //! or 0 on failure -size_t arabic_shape_text(const utf8_t *src, size_t src_len, - utf8_t *dest, size_t dest_size); +size_t arabic_shape_text(const utf8_t *src, size_t src_len, utf8_t *dest, size_t dest_size); diff --git a/src/fw/applib/graphics/assets_temp/pug.h b/src/fw/applib/graphics/assets_temp/pug.h index 36daf058d6..e8fb0e9dd7 100644 --- a/src/fw/applib/graphics/assets_temp/pug.h +++ b/src/fw/applib/graphics/assets_temp/pug.h @@ -4,36 +4,67 @@ // TODO PBL-1744: Load bitmap resource from flash... static const uint8_t pug[] = { - 0x08, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x3e, 0x00, 0xff, 0xff, 0xfd, 0xff, /* bytes 0 - 16 */ - 0xff, 0xff, 0xff, 0x0f, 0x3f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x07, 0x43, 0xc0, 0xff, /* bytes 16 - 32 */ - 0xff, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x61, 0x00, 0xff, /* bytes 32 - 48 */ - 0xff, 0xff, 0xff, 0x0f, 0x61, 0x00, 0x03, 0xfe, 0xff, 0xff, 0xff, 0x0f, 0x01, 0x02, 0x00, 0xfe, /* bytes 48 - 64 */ - 0xff, 0xff, 0xff, 0x0f, 0x11, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x00, 0xff, /* bytes 64 - 80 */ - 0xff, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x00, 0xfe, 0xff, 0x01, 0xff, 0x0f, 0x03, 0x00, 0x00, 0xfe, /* bytes 80 - 96 */ - 0xff, 0x4e, 0xfe, 0x0f, 0x03, 0x00, 0x48, 0xf9, 0x7f, 0x86, 0xfc, 0x0f, 0x03, 0x00, 0x18, 0xf3, /* bytes 96 - 112 */ - 0x7f, 0x03, 0xf9, 0x0f, 0x07, 0x00, 0x10, 0x02, 0x3e, 0x4b, 0xfb, 0x0f, 0x07, 0x00, 0x00, 0x0b, /* bytes 112 - 128 */ - 0x00, 0x78, 0xf8, 0x0f, 0x07, 0x00, 0x60, 0xa6, 0xcb, 0x00, 0xfa, 0x0f, 0x07, 0x00, 0x80, 0x25, /* bytes 128 - 144 */ - 0x36, 0x07, 0xfa, 0x0f, 0x0f, 0x00, 0x20, 0x67, 0x34, 0xf9, 0xf3, 0x0f, 0x1f, 0x00, 0x98, 0x49, /* bytes 144 - 160 */ - 0xcb, 0xb2, 0xf7, 0x0f, 0x1f, 0x00, 0xc0, 0x4e, 0xda, 0xa6, 0xf6, 0x0f, 0xdf, 0x00, 0x61, 0xd3, /* bytes 160 - 176 */ - 0xd4, 0xec, 0xe6, 0x0f, 0xdf, 0x70, 0x36, 0xcf, 0xac, 0x9b, 0xef, 0x0f, 0x5f, 0xc7, 0xd8, 0x4e, /* bytes 176 - 192 */ - 0xae, 0x53, 0xfb, 0x0f, 0x5f, 0x4c, 0xdb, 0xd9, 0xba, 0x4d, 0xdb, 0x0f, 0x9f, 0x79, 0xb5, 0xd7, /* bytes 192 - 208 */ - 0xda, 0x6d, 0xf6, 0x0f, 0xbf, 0x9b, 0xad, 0x76, 0x76, 0xb7, 0xff, 0x0f, 0xbf, 0xe6, 0xfa, 0x6d, /* bytes 208 - 224 */ - 0xb6, 0x93, 0x3c, 0x0f, 0xbf, 0x34, 0x5b, 0xdb, 0xee, 0x6e, 0x77, 0x0f, 0xbf, 0xd5, 0x6d, 0x5b, /* bytes 224 - 240 */ - 0xd9, 0x6d, 0xdb, 0x0f, 0xbf, 0x4d, 0xb7, 0x6d, 0x37, 0x93, 0x6d, 0x0f, 0xbf, 0x79, 0xdb, 0x3d, /* bytes 240 - 256 */ - 0xed, 0xb6, 0xfd, 0x0f, 0x3f, 0xb7, 0x6c, 0x33, 0xdb, 0x6d, 0xb6, 0x0e, 0xbf, 0xed, 0xf7, 0x96, /* bytes 256 - 272 */ - 0x36, 0x21, 0xfb, 0x0e, 0xbf, 0x4e, 0xdb, 0x9e, 0x75, 0xc0, 0xf9, 0x0e, 0xbf, 0x7b, 0xbd, 0xcb, /* bytes 272 - 288 */ - 0x1d, 0x00, 0xef, 0x0e, 0x7f, 0xc7, 0x6c, 0x4a, 0x0a, 0x3e, 0xcb, 0x0d, 0x7f, 0x8d, 0xf3, 0x6d, /* bytes 288 - 304 */ - 0x83, 0x6d, 0xb6, 0x0d, 0x7f, 0x3a, 0xd2, 0xcd, 0x80, 0x6c, 0xb6, 0x0f, 0xff, 0x1a, 0x26, 0x0f, /* bytes 304 - 320 */ - 0x9c, 0x1b, 0x6c, 0x0e, 0xff, 0x66, 0xc8, 0x99, 0x3f, 0xf3, 0xed, 0x0c, 0xff, 0x6c, 0xc2, 0xe5, /* bytes 320 - 336 */ - 0x3f, 0xff, 0xd9, 0x0d, 0xff, 0x4c, 0x4e, 0xef, 0x3f, 0xd9, 0x73, 0x0f, 0xff, 0x5c, 0x9e, 0xf9, /* bytes 336 - 352 */ - 0x7f, 0xd7, 0xb7, 0x0d, 0xff, 0x55, 0x9e, 0xf6, 0x7f, 0xd6, 0xef, 0x0d, 0xff, 0x6d, 0xbe, 0xdb, /* bytes 352 - 368 */ - 0xff, 0xdc, 0x6f, 0x09, 0xff, 0x2d, 0x3f, 0xeb, 0xff, 0xbc, 0x5f, 0x0b, 0xff, 0x5b, 0xbf, 0xec, /* bytes 368 - 384 */ - 0xff, 0xa5, 0xdf, 0x0b, 0xff, 0x59, 0xbf, 0xff, 0xff, 0xd5, 0xbf, 0x0a, 0xff, 0xd9, 0x3f, 0xf9, /* bytes 384 - 400 */ - 0xff, 0xd9, 0xbf, 0x09, 0xff, 0x6b, 0xbf, 0xed, 0xff, 0xdc, 0xbf, 0x09, 0xff, 0x6b, 0xbf, 0xee, /* bytes 400 - 416 */ - 0xff, 0xdc, 0x3f, 0x0b, 0xff, 0xdb, 0xbf, 0xfa, 0xff, 0xec, 0x3f, 0x0b, 0xff, 0x33, 0x3f, 0xeb, /* bytes 416 - 432 */ - 0x7f, 0xea, 0x3f, 0x0b, 0xff, 0x6b, 0xbf, 0xed, 0x3f, 0xc8, 0x3f, 0x03, 0xff, 0x33, 0xbf, 0xfc, /* bytes 432 - 448 */ - 0x3f, 0xe0, 0x3f, 0x09, 0xff, 0x53, 0x3f, 0xf3, 0x7f, 0xe0, 0x9f, 0x03, 0xff, 0x49, 0x3f, 0xf7, /* bytes 448 - 464 */ - 0xff, 0xff, 0x1f, 0x02, 0xff, 0x29, 0x9f, 0xe4, 0xff, 0xff, 0x1f, 0x00, 0xff, 0x01, 0x9f, 0xf4, /* bytes 464 - 480 */ - 0xff, 0xff, 0x3f, 0x08, 0xff, 0x83, 0x1f, 0xe6, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xf0, /* bytes 480 - 496 */ - 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0x0f, + 0x08, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x3e, 0x00, + 0xff, 0xff, 0xfd, 0xff, /* bytes 0 - 16 */ + 0xff, 0xff, 0xff, 0x0f, 0x3f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x07, 0x43, 0xc0, 0xff, /* bytes 16 - 32 */ + 0xff, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x80, 0x61, 0x00, 0xff, /* bytes 32 - 48 */ + 0xff, 0xff, 0xff, 0x0f, 0x61, 0x00, 0x03, 0xfe, 0xff, 0xff, 0xff, 0x0f, + 0x01, 0x02, 0x00, 0xfe, /* bytes 48 - 64 */ + 0xff, 0xff, 0xff, 0x0f, 0x11, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x0f, + 0x01, 0x00, 0x00, 0xff, /* bytes 64 - 80 */ + 0xff, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x00, 0xfe, 0xff, 0x01, 0xff, 0x0f, + 0x03, 0x00, 0x00, 0xfe, /* bytes 80 - 96 */ + 0xff, 0x4e, 0xfe, 0x0f, 0x03, 0x00, 0x48, 0xf9, 0x7f, 0x86, 0xfc, 0x0f, + 0x03, 0x00, 0x18, 0xf3, /* bytes 96 - 112 */ + 0x7f, 0x03, 0xf9, 0x0f, 0x07, 0x00, 0x10, 0x02, 0x3e, 0x4b, 0xfb, 0x0f, + 0x07, 0x00, 0x00, 0x0b, /* bytes 112 - 128 */ + 0x00, 0x78, 0xf8, 0x0f, 0x07, 0x00, 0x60, 0xa6, 0xcb, 0x00, 0xfa, 0x0f, + 0x07, 0x00, 0x80, 0x25, /* bytes 128 - 144 */ + 0x36, 0x07, 0xfa, 0x0f, 0x0f, 0x00, 0x20, 0x67, 0x34, 0xf9, 0xf3, 0x0f, + 0x1f, 0x00, 0x98, 0x49, /* bytes 144 - 160 */ + 0xcb, 0xb2, 0xf7, 0x0f, 0x1f, 0x00, 0xc0, 0x4e, 0xda, 0xa6, 0xf6, 0x0f, + 0xdf, 0x00, 0x61, 0xd3, /* bytes 160 - 176 */ + 0xd4, 0xec, 0xe6, 0x0f, 0xdf, 0x70, 0x36, 0xcf, 0xac, 0x9b, 0xef, 0x0f, + 0x5f, 0xc7, 0xd8, 0x4e, /* bytes 176 - 192 */ + 0xae, 0x53, 0xfb, 0x0f, 0x5f, 0x4c, 0xdb, 0xd9, 0xba, 0x4d, 0xdb, 0x0f, + 0x9f, 0x79, 0xb5, 0xd7, /* bytes 192 - 208 */ + 0xda, 0x6d, 0xf6, 0x0f, 0xbf, 0x9b, 0xad, 0x76, 0x76, 0xb7, 0xff, 0x0f, + 0xbf, 0xe6, 0xfa, 0x6d, /* bytes 208 - 224 */ + 0xb6, 0x93, 0x3c, 0x0f, 0xbf, 0x34, 0x5b, 0xdb, 0xee, 0x6e, 0x77, 0x0f, + 0xbf, 0xd5, 0x6d, 0x5b, /* bytes 224 - 240 */ + 0xd9, 0x6d, 0xdb, 0x0f, 0xbf, 0x4d, 0xb7, 0x6d, 0x37, 0x93, 0x6d, 0x0f, + 0xbf, 0x79, 0xdb, 0x3d, /* bytes 240 - 256 */ + 0xed, 0xb6, 0xfd, 0x0f, 0x3f, 0xb7, 0x6c, 0x33, 0xdb, 0x6d, 0xb6, 0x0e, + 0xbf, 0xed, 0xf7, 0x96, /* bytes 256 - 272 */ + 0x36, 0x21, 0xfb, 0x0e, 0xbf, 0x4e, 0xdb, 0x9e, 0x75, 0xc0, 0xf9, 0x0e, + 0xbf, 0x7b, 0xbd, 0xcb, /* bytes 272 - 288 */ + 0x1d, 0x00, 0xef, 0x0e, 0x7f, 0xc7, 0x6c, 0x4a, 0x0a, 0x3e, 0xcb, 0x0d, + 0x7f, 0x8d, 0xf3, 0x6d, /* bytes 288 - 304 */ + 0x83, 0x6d, 0xb6, 0x0d, 0x7f, 0x3a, 0xd2, 0xcd, 0x80, 0x6c, 0xb6, 0x0f, + 0xff, 0x1a, 0x26, 0x0f, /* bytes 304 - 320 */ + 0x9c, 0x1b, 0x6c, 0x0e, 0xff, 0x66, 0xc8, 0x99, 0x3f, 0xf3, 0xed, 0x0c, + 0xff, 0x6c, 0xc2, 0xe5, /* bytes 320 - 336 */ + 0x3f, 0xff, 0xd9, 0x0d, 0xff, 0x4c, 0x4e, 0xef, 0x3f, 0xd9, 0x73, 0x0f, + 0xff, 0x5c, 0x9e, 0xf9, /* bytes 336 - 352 */ + 0x7f, 0xd7, 0xb7, 0x0d, 0xff, 0x55, 0x9e, 0xf6, 0x7f, 0xd6, 0xef, 0x0d, + 0xff, 0x6d, 0xbe, 0xdb, /* bytes 352 - 368 */ + 0xff, 0xdc, 0x6f, 0x09, 0xff, 0x2d, 0x3f, 0xeb, 0xff, 0xbc, 0x5f, 0x0b, + 0xff, 0x5b, 0xbf, 0xec, /* bytes 368 - 384 */ + 0xff, 0xa5, 0xdf, 0x0b, 0xff, 0x59, 0xbf, 0xff, 0xff, 0xd5, 0xbf, 0x0a, + 0xff, 0xd9, 0x3f, 0xf9, /* bytes 384 - 400 */ + 0xff, 0xd9, 0xbf, 0x09, 0xff, 0x6b, 0xbf, 0xed, 0xff, 0xdc, 0xbf, 0x09, + 0xff, 0x6b, 0xbf, 0xee, /* bytes 400 - 416 */ + 0xff, 0xdc, 0x3f, 0x0b, 0xff, 0xdb, 0xbf, 0xfa, 0xff, 0xec, 0x3f, 0x0b, + 0xff, 0x33, 0x3f, 0xeb, /* bytes 416 - 432 */ + 0x7f, 0xea, 0x3f, 0x0b, 0xff, 0x6b, 0xbf, 0xed, 0x3f, 0xc8, 0x3f, 0x03, + 0xff, 0x33, 0xbf, 0xfc, /* bytes 432 - 448 */ + 0x3f, 0xe0, 0x3f, 0x09, 0xff, 0x53, 0x3f, 0xf3, 0x7f, 0xe0, 0x9f, 0x03, + 0xff, 0x49, 0x3f, 0xf7, /* bytes 448 - 464 */ + 0xff, 0xff, 0x1f, 0x02, 0xff, 0x29, 0x9f, 0xe4, 0xff, 0xff, 0x1f, 0x00, + 0xff, 0x01, 0x9f, 0xf4, /* bytes 464 - 480 */ + 0xff, 0xff, 0x3f, 0x08, 0xff, 0x83, 0x1f, 0xe6, 0xff, 0xff, 0xff, 0x0f, + 0xff, 0xff, 0x0f, 0xf0, /* bytes 480 - 496 */ + 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0x0f, }; diff --git a/src/fw/applib/graphics/bitblt.c b/src/fw/applib/graphics/bitblt.c index efad43e505..a46ad3e1c6 100644 --- a/src/fw/applib/graphics/bitblt.c +++ b/src/fw/applib/graphics/bitblt.c @@ -8,8 +8,7 @@ #include "util/bitset.h" -void bitblt_into_1bit_setup_compositing_mode(GCompOp *compositing_mode, - GColor tint_color) { +void bitblt_into_1bit_setup_compositing_mode(GCompOp *compositing_mode, GColor tint_color) { if ((*compositing_mode == GCompOpTint) || (*compositing_mode == GCompOpTintLuminance)) { // Force our interpretation of the tint color to be black, white, or clear tint_color = gcolor_get_bw(tint_color); @@ -21,31 +20,32 @@ void bitblt_into_1bit_setup_compositing_mode(GCompOp *compositing_mode, } } -void bitblt_bitmap_into_bitmap_tiled_1bit_to_1bit(GBitmap* dest_bitmap, - const GBitmap* src_bitmap, GRect dest_rect, - GPoint src_origin_offset, - GCompOp compositing_mode, - GColor tint_color) { +void bitblt_bitmap_into_bitmap_tiled_1bit_to_1bit(GBitmap *dest_bitmap, const GBitmap *src_bitmap, + GRect dest_rect, GPoint src_origin_offset, + GCompOp compositing_mode, GColor tint_color) { bitblt_into_1bit_setup_compositing_mode(&compositing_mode, tint_color); const int8_t dest_begin_x = (dest_rect.origin.x / 32); - const uint32_t * const dest_block_x_begin = ((uint32_t*)dest_bitmap->addr) + dest_begin_x; + const uint32_t *const dest_block_x_begin = ((uint32_t *)dest_bitmap->addr) + dest_begin_x; const int dest_row_length_words = (dest_bitmap->row_size_bytes / 4); - // The number of bits between the beginning of dest_block and the beginning of the nearest 32-bit block: + // The number of bits between the beginning of dest_block and the beginning of the nearest 32-bit + // block: const uint8_t dest_shift_at_line_begin = (dest_rect.origin.x % 32); - const uint32_t * const src_block_x_begin = - ((uint32_t*)src_bitmap->addr) + + const uint32_t *const src_block_x_begin = + ((uint32_t *)src_bitmap->addr) + ((src_bitmap->bounds.origin.x + (src_origin_offset.x % src_bitmap->bounds.size.w)) / 32); const int src_row_length_words = (src_bitmap->row_size_bytes / 4); - const uint8_t src_shift_at_line_begin = ((src_bitmap->bounds.origin.x + src_origin_offset.x) % 32); - const uint8_t src_bits_left_at_line_begin = MIN(32 - src_shift_at_line_begin, - MIN(dest_rect.size.w + src_origin_offset.x, - src_bitmap->bounds.size.w)); + const uint8_t src_shift_at_line_begin = + ((src_bitmap->bounds.origin.x + src_origin_offset.x) % 32); + const uint8_t src_bits_left_at_line_begin = + MIN(32 - src_shift_at_line_begin, + MIN(dest_rect.size.w + src_origin_offset.x, src_bitmap->bounds.size.w)); // how many 32-bit blocks do we need to bitblt on this row: const int16_t dest_end_x = (dest_rect.origin.x + dest_rect.size.w); - const uint8_t num_dest_blocks_per_row = (dest_end_x / 32) + ((dest_end_x % 32) ? 1 : 0) - dest_begin_x; + const uint8_t num_dest_blocks_per_row = + (dest_end_x / 32) + ((dest_end_x % 32) ? 1 : 0) - dest_begin_x; // The bitblt loops: const int16_t dest_y_end = dest_rect.origin.y + dest_rect.size.h; @@ -60,7 +60,8 @@ void bitblt_bitmap_into_bitmap_tiled_1bit_to_1bit(GBitmap* dest_bitmap, uint8_t dest_shift = dest_shift_at_line_begin; int16_t row_bits_left = dest_rect.size.w; uint32_t *dest_block = (uint32_t *)dest_block_x_begin + (dest_y * dest_row_length_words); - uint32_t * const src_block_begin = (uint32_t *)src_block_x_begin + (src_y * src_row_length_words); + uint32_t *const src_block_begin = + (uint32_t *)src_block_x_begin + (src_y * src_row_length_words); uint32_t *src_block = src_block_begin; uint32_t src = *src_block; rotl32(src, src_dest_shift); @@ -70,7 +71,6 @@ void bitblt_bitmap_into_bitmap_tiled_1bit_to_1bit(GBitmap* dest_bitmap, const uint32_t *src_block_end = src_block + src_row_length_words; while (dest_block != dest_block_end) { - const uint8_t number_of_bits = MIN(32 - dest_shift, MIN(row_bits_left, src_bits_left)); const uint32_t mask_outer_bit = ((number_of_bits < 31) ? (1 << number_of_bits) : 0); const uint32_t mask = ((mask_outer_bit - 1) << dest_shift); @@ -115,7 +115,7 @@ void bitblt_bitmap_into_bitmap_tiled_1bit_to_1bit(GBitmap* dest_bitmap, src_bits_left = src_bits_left_at_line_begin; src_dest_shift = (src_dest_shift + src_bitmap->bounds.size.w) % 32; } else { - src_bits_left = 32; // excessive right edge bits will be masked off eventually + src_bits_left = 32; // excessive right edge bits will be masked off eventually } src = *src_block; rotl32(src, src_dest_shift); @@ -130,19 +130,19 @@ void bitblt_bitmap_into_bitmap_tiled_1bit_to_1bit(GBitmap* dest_bitmap, } } -void bitblt_bitmap_into_bitmap(GBitmap* dest_bitmap, const GBitmap* src_bitmap, - GPoint dest_offset, GCompOp compositing_mode, GColor8 tint_color) { - GRect dest_rect = { dest_offset, src_bitmap->bounds.size }; +void bitblt_bitmap_into_bitmap(GBitmap *dest_bitmap, const GBitmap *src_bitmap, GPoint dest_offset, + GCompOp compositing_mode, GColor8 tint_color) { + GRect dest_rect = {dest_offset, src_bitmap->bounds.size}; grect_clip(&dest_rect, &dest_bitmap->bounds); GBitmap src_clipped_bitmap = *src_bitmap; - src_clipped_bitmap.bounds.origin = (GPoint) { - src_bitmap->bounds.origin.x + (dest_rect.origin.x - dest_offset.x), - src_bitmap->bounds.origin.y + (dest_rect.origin.y - dest_offset.y) + src_clipped_bitmap.bounds.origin = (GPoint){ + src_bitmap->bounds.origin.x + (dest_rect.origin.x - dest_offset.x), + src_bitmap->bounds.origin.y + (dest_rect.origin.y - dest_offset.y) }; - bitblt_bitmap_into_bitmap_tiled(dest_bitmap, &src_clipped_bitmap, dest_rect, - GPointZero, compositing_mode, tint_color); + bitblt_bitmap_into_bitmap_tiled(dest_bitmap, &src_clipped_bitmap, dest_rect, GPointZero, + compositing_mode, tint_color); } bool bitblt_compositing_mode_is_noop(GCompOp compositing_mode, GColor tint_color) { diff --git a/src/fw/applib/graphics/bitblt.h b/src/fw/applib/graphics/bitblt.h index 7066d93f5b..d787203106 100644 --- a/src/fw/applib/graphics/bitblt.h +++ b/src/fw/applib/graphics/bitblt.h @@ -5,11 +5,11 @@ #include "gtypes.h" -void bitblt_bitmap_into_bitmap_tiled(GBitmap* dest_bitmap, const GBitmap* src_bitmap, +void bitblt_bitmap_into_bitmap_tiled(GBitmap *dest_bitmap, const GBitmap *src_bitmap, GRect dest_rect, GPoint src_origin_offset, GCompOp compositing_mode, GColor tint_color); -void bitblt_bitmap_into_bitmap(GBitmap* dest_bitmap, const GBitmap* src_bitmap, GPoint dest_offset, +void bitblt_bitmap_into_bitmap(GBitmap *dest_bitmap, const GBitmap *src_bitmap, GPoint dest_offset, GCompOp compositing_mode, GColor tint_color); bool bitblt_compositing_mode_is_noop(GCompOp compositing_mode, GColor tint_color); diff --git a/src/fw/applib/graphics/bitblt_private.h b/src/fw/applib/graphics/bitblt_private.h index 64064eea4a..2ea2cf024f 100644 --- a/src/fw/applib/graphics/bitblt_private.h +++ b/src/fw/applib/graphics/bitblt_private.h @@ -3,17 +3,17 @@ #include "bitblt.h" -void bitblt_bitmap_into_bitmap_tiled_1bit_to_1bit( - GBitmap* dest_bitmap, const GBitmap* src_bitmap, GRect dest_rect, - GPoint src_origin_offset, GCompOp compositing_mode, GColor tint_color); +void bitblt_bitmap_into_bitmap_tiled_1bit_to_1bit(GBitmap *dest_bitmap, const GBitmap *src_bitmap, + GRect dest_rect, GPoint src_origin_offset, + GCompOp compositing_mode, GColor tint_color); -void bitblt_bitmap_into_bitmap_tiled_1bit_to_8bit( - GBitmap* dest_bitmap, const GBitmap* src_bitmap, GRect dest_rect, - GPoint src_origin_offset, GCompOp compositing_mode, GColor8 tint_color); +void bitblt_bitmap_into_bitmap_tiled_1bit_to_8bit(GBitmap *dest_bitmap, const GBitmap *src_bitmap, + GRect dest_rect, GPoint src_origin_offset, + GCompOp compositing_mode, GColor8 tint_color); -void bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit( - GBitmap* dest_bitmap, const GBitmap* src_bitmap, GRect dest_rect, - GPoint src_origin_offset, GCompOp compositing_mode, GColor8 tint_color); +void bitblt_bitmap_into_bitmap_tiled_8bit_to_8bit(GBitmap *dest_bitmap, const GBitmap *src_bitmap, + GRect dest_rect, GPoint src_origin_offset, + GCompOp compositing_mode, GColor8 tint_color); // Used when source bitmap is 1 bit and the destination is 1 or 8 bit. // Sets up the GCompOp based on the tint_color. diff --git a/src/fw/applib/graphics/framebuffer.c b/src/fw/applib/graphics/framebuffer.c index 786ddbb085..8a8a56e7c4 100644 --- a/src/fw/applib/graphics/framebuffer.c +++ b/src/fw/applib/graphics/framebuffer.c @@ -30,18 +30,18 @@ GBitmap framebuffer_get_as_bitmap(FrameBuffer *fb, const GSize *size) { const GBitmapDataRowInfoInternal *data_row_infos = NULL; #endif - return (GBitmap) { - .addr = fb->buffer, - .row_size_bytes = gbitmap_format_get_row_size_bytes(size->w, GBITMAP_NATIVE_FORMAT), - .info = (BitmapInfo) {.format = GBITMAP_NATIVE_FORMAT, .version = GBITMAP_VERSION_CURRENT}, - .bounds = (GRect) { GPointZero, *size }, - .data_row_infos = data_row_infos, + return (GBitmap){ + .addr = fb->buffer, + .row_size_bytes = gbitmap_format_get_row_size_bytes(size->w, GBITMAP_NATIVE_FORMAT), + .info = (BitmapInfo){.format = GBITMAP_NATIVE_FORMAT, .version = GBITMAP_VERSION_CURRENT}, + .bounds = (GRect){GPointZero, *size}, + .data_row_infos = data_row_infos, }; } void framebuffer_dirty_all(FrameBuffer *fb) { PBL_ASSERTN(!gsize_equal(&fb->size, &GSizeZero)); - fb->dirty_rect = (GRect) { GPointZero, fb->size }; + fb->dirty_rect = (GRect){GPointZero, fb->size}; fb->is_dirty = true; } diff --git a/src/fw/applib/graphics/framebuffer.h b/src/fw/applib/graphics/framebuffer.h index c9362f5a09..3fbff23726 100644 --- a/src/fw/applib/graphics/framebuffer.h +++ b/src/fw/applib/graphics/framebuffer.h @@ -24,19 +24,19 @@ size_t framebuffer_get_size_bytes(FrameBuffer *f); //! Clears the screen buffer. //! Will not be visible on the display until graphics_flush_frame_buffer is called. -void framebuffer_clear(FrameBuffer* f); +void framebuffer_clear(FrameBuffer *f); //! Mark the given rect of pixels as dirty -void framebuffer_mark_dirty_rect(FrameBuffer* f, GRect rect); +void framebuffer_mark_dirty_rect(FrameBuffer *f, GRect rect); //! Mark the entire framebuffer as dirty -void framebuffer_dirty_all(FrameBuffer* f); +void framebuffer_dirty_all(FrameBuffer *f); //! Clear the dirty status for this framebuffer -void framebuffer_reset_dirty(FrameBuffer* f); +void framebuffer_reset_dirty(FrameBuffer *f); //! Query the dirty status for this framebuffer -bool framebuffer_is_dirty(FrameBuffer* f); +bool framebuffer_is_dirty(FrameBuffer *f); //! Creates a GBitmap struct that points to the framebuffer. Useful for using the framebuffer data //! with graphics routines. Note that updating this bitmap won't mark the appropriate lines as diff --git a/src/fw/applib/graphics/gbitmap.c b/src/fw/applib/graphics/gbitmap.c index a5941d688d..0aa23cb0ed 100644 --- a/src/fw/applib/graphics/gbitmap.c +++ b/src/fw/applib/graphics/gbitmap.c @@ -48,22 +48,22 @@ uint8_t gbitmap_get_palette_size(GBitmapFormat format) { uint16_t gbitmap_format_get_row_size_bytes(int16_t width, GBitmapFormat format) { switch (format) { case GBitmapFormat1Bit: - return ((width + 31) / 32 ) * 4; // word aligned bytes + return ((width + 31) / 32) * 4; // word aligned bytes case GBitmapFormat8Bit: return width; case GBitmapFormat1BitPalette: case GBitmapFormat2BitPalette: case GBitmapFormat4BitPalette: - return ((width * gbitmap_get_bits_per_pixel(format) + 7) / 8); // byte aligned + return ((width * gbitmap_get_bits_per_pixel(format) + 7) / 8); // byte aligned case GBitmapFormat8BitCircular: - return 0; // variable width + return 0; // variable width } return 0; } -static GBitmap* prv_allocate_gbitmap(void) { +static GBitmap *prv_allocate_gbitmap(void) { if (process_manager_compiled_with_legacy2_sdk()) { - return (GBitmap *) applib_type_zalloc(GBitmapLegacy2); + return (GBitmap *)applib_type_zalloc(GBitmapLegacy2); } return applib_type_zalloc(GBitmap); } @@ -99,14 +99,14 @@ ALWAYS_INLINE GBitmapDataRowInfo prv_gbitmap_get_data_row_info(const GBitmap *bitmap, uint16_t y) { if (bitmap->info.format == GBitmapFormat8BitCircular) { const GBitmapDataRowInfoInternal *info = &bitmap->data_row_infos[y]; - return (GBitmapDataRowInfo) { + return (GBitmapDataRowInfo){ .data = (uint8_t *)bitmap->addr + info->offset, .min_x = info->min_x, .max_x = info->max_x, }; } else { - return (GBitmapDataRowInfo) { - .data = (uint8_t*)bitmap->addr + y * bitmap->row_size_bytes, + return (GBitmapDataRowInfo){ + .data = (uint8_t *)bitmap->addr + y * bitmap->row_size_bytes, .min_x = 0, // while this is conceptually wrong for .max_x as it should be // (.row_size_bytes / .bytes_per_pixel) - 1 @@ -122,7 +122,7 @@ MOCKABLE GBitmapDataRowInfo gbitmap_get_data_row_info(const GBitmap *bitmap, uin } void gbitmap_init_with_data(GBitmap *bitmap, const uint8_t *data) { - BitmapData* bitmap_data = (BitmapData*) data; + BitmapData *bitmap_data = (BitmapData *)data; memset(bitmap, 0, prv_gbitmap_size()); @@ -137,8 +137,8 @@ void gbitmap_init_with_data(GBitmap *bitmap, const uint8_t *data) { // These origin fields are only used when reusing a byte buffer in a sub bitmap. // This allows us to have a shallow copy of a portion of a parent bitmap. // See gbitmap_init_as_sub_bitmap. - bitmap->bounds.origin.x = 0; //((int16_t*)data)[2]; - bitmap->bounds.origin.y = 0; //((int16_t*)data)[3]; + bitmap->bounds.origin.x = 0; //((int16_t*)data)[2]; + bitmap->bounds.origin.y = 0; //((int16_t*)data)[3]; bitmap->bounds.size.w = bitmap_data->width; bitmap->bounds.size.h = bitmap_data->height; @@ -148,8 +148,8 @@ void gbitmap_init_with_data(GBitmap *bitmap, const uint8_t *data) { if (gbitmap_get_palette_size(gbitmap_get_format(bitmap)) > 0) { PBL_ASSERTN(!process_manager_compiled_with_legacy2_sdk()); // Palette is positioned right after the pixel data - bitmap->palette = (GColor*)(bitmap_data->data + - (bitmap->row_size_bytes * bitmap->bounds.size.h)); + bitmap->palette = + (GColor *)(bitmap_data->data + (bitmap->row_size_bytes * bitmap->bounds.size.h)); // Don't flag this as heap allocated, as it gets freed along with pixel data bitmap->info.is_palette_heap_allocated = false; } @@ -160,8 +160,8 @@ void gbitmap_init_with_data(GBitmap *bitmap, const uint8_t *data) { prv_init_gbitmap_version(bitmap); } -GBitmap* gbitmap_create_with_data(const uint8_t *data) { - GBitmap* bitmap = prv_allocate_gbitmap(); +GBitmap *gbitmap_create_with_data(const uint8_t *data) { + GBitmap *bitmap = prv_allocate_gbitmap(); if (bitmap) { gbitmap_init_with_data(bitmap, data); } @@ -170,8 +170,8 @@ GBitmap* gbitmap_create_with_data(const uint8_t *data) { void gbitmap_init_as_sub_bitmap(GBitmap *sub_bitmap, const GBitmap *base_bitmap, GRect sub_rect) { if (gbitmap_get_version(base_bitmap) == GBITMAP_VERSION_0) { - GBitmapLegacy2 *legacy_bitmap = (GBitmapLegacy2 *) sub_bitmap; - *legacy_bitmap = *(GBitmapLegacy2 *) base_bitmap; + GBitmapLegacy2 *legacy_bitmap = (GBitmapLegacy2 *)sub_bitmap; + *legacy_bitmap = *(GBitmapLegacy2 *)base_bitmap; // it's the responsibility of the parent bitmap to free the underlying data legacy_bitmap->is_heap_allocated = false; } else { @@ -184,7 +184,7 @@ void gbitmap_init_as_sub_bitmap(GBitmap *sub_bitmap, const GBitmap *base_bitmap, sub_bitmap->bounds = sub_rect; } -GBitmap* gbitmap_create_as_sub_bitmap(const GBitmap *base_bitmap, GRect sub_rect) { +GBitmap *gbitmap_create_as_sub_bitmap(const GBitmap *base_bitmap, GRect sub_rect) { GBitmap *bitmap = prv_allocate_gbitmap(); if (bitmap) { gbitmap_init_as_sub_bitmap(bitmap, base_bitmap, sub_rect); @@ -192,7 +192,7 @@ GBitmap* gbitmap_create_as_sub_bitmap(const GBitmap *base_bitmap, GRect sub_rect return bitmap; } -static GColor* prv_allocate_palette(GBitmapFormat format) { +static GColor *prv_allocate_palette(GBitmapFormat format) { PBL_ASSERTN(!process_manager_compiled_with_legacy2_sdk()); GColor *palette = NULL; uint8_t palette_size = gbitmap_get_palette_size(format); @@ -235,7 +235,7 @@ static bool prv_gbitmap_allocate_data_for_size(GBitmap *bitmap, GSize size, GBit return false; } -static GBitmap* prv_gbitmap_create_blank(GSize size, GBitmapFormat format) { +static GBitmap *prv_gbitmap_create_blank(GSize size, GBitmapFormat format) { GBitmap *bitmap = prv_allocate_gbitmap(); if (bitmap) { if (!prv_gbitmap_allocate_data_for_size(bitmap, size, format)) { @@ -288,7 +288,7 @@ static bool prv_is_palettized_format(GBitmapFormat format) { T_STATIC GBitmap *prv_gbitmap_create_blank_internal_no_platform_checks(GSize size, GBitmapFormat format) { - GBitmap* bitmap = prv_gbitmap_create_blank(size, format); + GBitmap *bitmap = prv_gbitmap_create_blank(size, format); // If bitmap allocated and format requires a palette if (bitmap && prv_is_palettized_format(format)) { @@ -304,7 +304,7 @@ T_STATIC GBitmap *prv_gbitmap_create_blank_internal_no_platform_checks(GSize siz return bitmap; } -GBitmap* gbitmap_create_blank(GSize size, GBitmapFormat format) { +GBitmap *gbitmap_create_blank(GSize size, GBitmapFormat format) { if (process_manager_compiled_with_legacy2_sdk() && format != GBitmapFormat1Bit) { return NULL; } @@ -316,12 +316,12 @@ GBitmap* gbitmap_create_blank(GSize size, GBitmapFormat format) { return prv_gbitmap_create_blank_internal_no_platform_checks(size, format); } -GBitmapLegacy2* gbitmap_create_blank_2bit(GSize size) { - return (GBitmapLegacy2 *) gbitmap_create_blank(size, GBitmapFormat1Bit); +GBitmapLegacy2 *gbitmap_create_blank_2bit(GSize size) { + return (GBitmapLegacy2 *)gbitmap_create_blank(size, GBitmapFormat1Bit); } -GBitmap* gbitmap_create_blank_with_palette(GSize size, GBitmapFormat format, - GColor *palette, bool free_on_destroy) { +GBitmap *gbitmap_create_blank_with_palette(GSize size, GBitmapFormat format, GColor *palette, + bool free_on_destroy) { PBL_ASSERTN(!process_manager_compiled_with_legacy2_sdk()); if (!prv_platform_supports_format(size, format)) { @@ -348,7 +348,7 @@ T_STATIC uint8_t prv_byte_reverse(uint8_t b) { return b; } -GBitmap* gbitmap_create_palettized_from_1bit(const GBitmap *src_bitmap) { +GBitmap *gbitmap_create_palettized_from_1bit(const GBitmap *src_bitmap) { PBL_ASSERTN(!process_manager_compiled_with_legacy2_sdk()); GBitmap *bitmap = NULL; if (src_bitmap && gbitmap_get_format(src_bitmap) == GBitmapFormat1Bit) { @@ -356,9 +356,9 @@ GBitmap* gbitmap_create_palettized_from_1bit(const GBitmap *src_bitmap) { // This eliminates edge cases where the bounds may start within a byte, // and not enough space would be allocated. This allows us to do all copying // from { 0, 0 } and simplifies copy. - GSize size = (GSize) { - .w = src_bitmap->bounds.size.w + src_bitmap->bounds.origin.x, - .h = src_bitmap->bounds.size.h + src_bitmap->bounds.origin.y + GSize size = (GSize){ + .w = src_bitmap->bounds.size.w + src_bitmap->bounds.origin.x, + .h = src_bitmap->bounds.size.h + src_bitmap->bounds.origin.y }; bitmap = gbitmap_create_blank(size, GBitmapFormat1BitPalette); if (bitmap) { @@ -380,7 +380,7 @@ GBitmap* gbitmap_create_palettized_from_1bit(const GBitmap *src_bitmap) { return bitmap; } -bool gbitmap_init_with_resource(GBitmap* bitmap, uint32_t resource_id) { +bool gbitmap_init_with_resource(GBitmap *bitmap, uint32_t resource_id) { ResAppNum app_resource_bank = sys_get_current_resource_num(); return gbitmap_init_with_resource_system(bitmap, app_resource_bank, resource_id); } @@ -417,26 +417,22 @@ static bool prv_init_with_pbi_data(GBitmap *bitmap, uint8_t *data, size_t data_s const GBitmapFormat format = gbitmap_get_format(bitmap); const size_t addr_offset = offsetof(BitmapData, data); const uint32_t pixel_data_bytes = bitmap->row_size_bytes * bitmap->bounds.size.h; - const uint32_t required_total_size_bytes = - addr_offset + // header size - pixel_data_bytes + // pixel data - gbitmap_get_palette_size(format); // palette data + const uint32_t required_total_size_bytes = addr_offset + // header size + pixel_data_bytes + // pixel data + gbitmap_get_palette_size(format); // palette data const uint32_t required_row_size_bits = (bitmap->bounds.size.w * gbitmap_get_bits_per_pixel(format)); // Convert from 8 bits in a byte, taking care to round up to the next whole byte. const uint32_t required_row_size_bytes = (required_row_size_bits + 7) / 8; - if (data_size != required_total_size_bytes || - required_row_size_bytes > bitmap->row_size_bytes) { - PBL_LOG_WRN("Bitmap metadata is inconsistent! data_size %u", - (unsigned int) data_size); - PBL_LOG_WRN("format %u row_size_bytes %"PRIu16" width %"PRId16" height %"PRId16, - format, bitmap->row_size_bytes, bitmap->bounds.size.w, bitmap->bounds.size.h); + if (data_size != required_total_size_bytes || required_row_size_bytes > bitmap->row_size_bytes) { + PBL_LOG_WRN("Bitmap metadata is inconsistent! data_size %u", (unsigned int)data_size); + PBL_LOG_WRN("format %u row_size_bytes %" PRIu16 " width %" PRId16 " height %" PRId16, format, + bitmap->row_size_bytes, bitmap->bounds.size.w, bitmap->bounds.size.h); return false; } - // Move the actual pixel data up to the front of the buffer. // This way bitmap->addr points to the start of the buffer and can be directly freed. memmove(data, data + addr_offset, data_size - addr_offset); @@ -445,14 +441,14 @@ static bool prv_init_with_pbi_data(GBitmap *bitmap, uint8_t *data, size_t data_s // Move where the palette now points to, palette is positioned right after the pixel data if (gbitmap_get_palette_size(format) > 0) { - bitmap->palette = (GColor*)((uint8_t*)bitmap->addr + - (bitmap->row_size_bytes * bitmap->bounds.size.h)); + bitmap->palette = + (GColor *)((uint8_t *)bitmap->addr + (bitmap->row_size_bytes * bitmap->bounds.size.h)); } return true; } -bool gbitmap_init_with_resource_system(GBitmap* bitmap, ResAppNum app_num, uint32_t resource_id) { +bool gbitmap_init_with_resource_system(GBitmap *bitmap, ResAppNum app_num, uint32_t resource_id) { if (!bitmap) { return false; } @@ -514,15 +510,15 @@ GBitmapFormat gbitmap_get_format(const GBitmap *bitmap) { return bitmap->info.format; } -uint8_t* gbitmap_get_data(const GBitmap *bitmap) { +uint8_t *gbitmap_get_data(const GBitmap *bitmap) { if (!bitmap) { return NULL; } return bitmap->addr; } -void gbitmap_set_data(GBitmap *bitmap, uint8_t *data, GBitmapFormat format, - uint16_t row_size_bytes, bool free_on_destroy) { +void gbitmap_set_data(GBitmap *bitmap, uint8_t *data, GBitmapFormat format, uint16_t row_size_bytes, + bool free_on_destroy) { if (bitmap) { bitmap->addr = data; bitmap->info.format = format; @@ -531,7 +527,7 @@ void gbitmap_set_data(GBitmap *bitmap, uint8_t *data, GBitmapFormat format, } } -GColor* gbitmap_get_palette(const GBitmap *bitmap) { +GColor *gbitmap_get_palette(const GBitmap *bitmap) { PBL_ASSERTN(!process_manager_compiled_with_legacy2_sdk()); if (!bitmap) { return NULL; @@ -563,7 +559,7 @@ void gbitmap_set_bounds(GBitmap *bitmap, GRect bounds) { } } -void gbitmap_deinit(GBitmap* bitmap) { +void gbitmap_deinit(GBitmap *bitmap) { if (gbitmap_get_info(bitmap).is_bitmap_heap_allocated) { applib_resource_munmap_or_free(bitmap->addr); } @@ -577,7 +573,7 @@ void gbitmap_deinit(GBitmap* bitmap) { } } -void gbitmap_destroy(GBitmap* bitmap) { +void gbitmap_destroy(GBitmap *bitmap) { if (!bitmap) { return; } diff --git a/src/fw/applib/graphics/gbitmap_pbi.h b/src/fw/applib/graphics/gbitmap_pbi.h index 39b471f1ba..adc16920a7 100644 --- a/src/fw/applib/graphics/gbitmap_pbi.h +++ b/src/fw/applib/graphics/gbitmap_pbi.h @@ -45,7 +45,8 @@ //! a GColor.argb value. //! There is no restriction on row_size_bytes / stride. //! -//! - \ref GBitmapFormat1BitPalette, \ref GBitmapFormat2BitPalette, \ref GBitmapFormat4BitPalette "GBitmapFormat4BitPalette": +//! - \ref GBitmapFormat1BitPalette, \ref GBitmapFormat2BitPalette, \ref GBitmapFormat4BitPalette +//! "GBitmapFormat4BitPalette": //! Each pixel in the bitmap is represented by the number of bits the format specifies. Pixels //! must be packed. //! For example, in GBitmapFormat2BitPalette, each pixel uses 2 bits. This means 4 pixels / byte. diff --git a/src/fw/applib/graphics/gbitmap_png.c b/src/fw/applib/graphics/gbitmap_png.c index 0f49a1c843..72f523c848 100644 --- a/src/fw/applib/graphics/gbitmap_png.c +++ b/src/fw/applib/graphics/gbitmap_png.c @@ -14,23 +14,26 @@ #define PNG_LOAD_ERROR "Failed to load PNG" static GBitmapFormat prv_get_format_for_bpp(uint8_t bits_per_pixel) { - if (bits_per_pixel == 1) return GBitmapFormat1BitPalette; - if (bits_per_pixel == 2) return GBitmapFormat2BitPalette; - if (bits_per_pixel == 4) return GBitmapFormat4BitPalette; + if (bits_per_pixel == 1) + return GBitmapFormat1BitPalette; + if (bits_per_pixel == 2) + return GBitmapFormat2BitPalette; + if (bits_per_pixel == 4) + return GBitmapFormat4BitPalette; return GBitmapFormat8Bit; } bool gbitmap_png_data_is_png(const uint8_t *data, size_t data_size) { if (data_size >= sizeof(PNG_SIGNATURE)) { // PNG files start with [137, 'P', 'N', 'G'] - return (ntohl(*(uint32_t*)data) == PNG_SIGNATURE); + return (ntohl(*(uint32_t *)data) == PNG_SIGNATURE); } return false; } // ! Distance from current resource cursor to next IDAT/fdAT chunk including that chunks data -int32_t png_seek_chunk_in_resource(uint32_t resource_id, uint32_t offset, - bool seek_framedata, bool *found_actl) { +int32_t png_seek_chunk_in_resource(uint32_t resource_id, uint32_t offset, bool seek_framedata, + bool *found_actl) { ResAppNum app_num = sys_get_current_resource_num(); return png_seek_chunk_in_resource_system(app_num, resource_id, offset, seek_framedata, found_actl); @@ -52,7 +55,7 @@ int32_t png_seek_chunk_in_resource_system(ResAppNum app_num, uint32_t resource_i while (current_offset + sizeof(marker) < max_size) { if (sizeof(marker) != sys_resource_load_range(app_num, resource_id, current_offset, - (uint8_t*)&marker, sizeof(marker))) { + (uint8_t *)&marker, sizeof(marker))) { return -1; } @@ -83,10 +86,10 @@ int32_t png_seek_chunk_in_resource_system(ResAppNum app_num, uint32_t resource_i } current_offset += CHUNK_META_SIZE + marker.length; } - return -1; // Error + return -1; // Error } -GBitmap* gbitmap_create_from_png_data(const uint8_t *png_data, size_t png_data_size) { +GBitmap *gbitmap_create_from_png_data(const uint8_t *png_data, size_t png_data_size) { GBitmap *bitmap = applib_type_malloc(GBitmap); if (bitmap) { memset(bitmap, 0, sizeof(GBitmap)); @@ -113,7 +116,7 @@ bool gbitmap_init_with_png_data(GBitmap *bitmap, const uint8_t *data, size_t dat // Use UPNG to decode image and get data uint32_t width = upng_get_width(upng); uint32_t height = upng_get_height(upng); - uint8_t *upng_buffer = (uint8_t*)upng_get_buffer(upng); + uint8_t *upng_buffer = (uint8_t *)upng_get_buffer(upng); uint32_t bpp = upng_get_bpp(upng); uint16_t palette_size = 0; @@ -142,8 +145,8 @@ bool gbitmap_init_with_png_data(GBitmap *bitmap, const uint8_t *data, size_t dat } // Set the image or pixel data - gbitmap_set_data(bitmap, upng_buffer, format, - gbitmap_format_get_row_size_bytes(width, format), true); + gbitmap_set_data(bitmap, upng_buffer, format, gbitmap_format_get_row_size_bytes(width, format), + true); gbitmap_set_bounds(bitmap, (GRect){.origin = {0, 0}, .size = {width, height}}); bitmap->info.version = GBITMAP_VERSION_CURRENT; @@ -178,32 +181,32 @@ static uint16_t prv_gbitmap_png_create_palette_for_grayscale(upng_t *upng, GColo // Palette will be size required to hold count of shades of gray palette_entries = 0x1 << bpp; - GColor8 *palette = (GColor8*)applib_malloc(palette_entries * sizeof(GColor8)); + GColor8 *palette = (GColor8 *)applib_malloc(palette_entries * sizeof(GColor8)); if (!palette) { return 0; } memset(palette, 0, palette_entries * sizeof(GColor8)); - for (uint16_t i = 0; i < palette_entries; i ++) { + for (uint16_t i = 0; i < palette_entries; i++) { // If the color value matches transparent_gray, color is transparent if (transparent_gray >= 0 && i == transparent_gray) { palette[i] = GColorClear; } else { // Only have 2 bits per channel, but attempt to make grayscale 4-bit work - // which occurs with black, white, gray1, gray2 and a transparent color - uint8_t luminance = 0; - if (bpp > 2) { - luminance = (i >> (bpp - 2)); - } else if (bpp == 2) { - // For bitdepth 2, use bits directly - luminance = i; - } else if (bpp == 1) { - // For bitdepth 1, need max and minimal values - luminance = i ? 0x3 : 0x0; - } - palette[i] = (GColor8){.a = 0x3, .r = luminance, .g = luminance, .b = luminance}; + // which occurs with black, white, gray1, gray2 and a transparent color + uint8_t luminance = 0; + if (bpp > 2) { + luminance = (i >> (bpp - 2)); + } else if (bpp == 2) { + // For bitdepth 2, use bits directly + luminance = i; + } else if (bpp == 1) { + // For bitdepth 1, need max and minimal values + luminance = i ? 0x3 : 0x0; } + palette[i] = (GColor8){.a = 0x3, .r = luminance, .g = luminance, .b = luminance}; } + } // Return the converted palette and number of entries *palette_out = palette; @@ -224,7 +227,7 @@ static uint16_t prv_gbitmap_png_create_palette_for_color(upng_t *upng, GColor8 * // To make palette entries consistent with PBI, pad to the bitdepth number of colors uint32_t padded_palette_size = (1 << upng_get_bpp(upng)); - GColor8 *palette = (GColor8*)applib_malloc(padded_palette_size * sizeof(GColor8)); + GColor8 *palette = (GColor8 *)applib_malloc(padded_palette_size * sizeof(GColor8)); if (palette == NULL) { return 0; } @@ -233,8 +236,8 @@ static uint16_t prv_gbitmap_png_create_palette_for_color(upng_t *upng, GColor8 * // Convert rgb + alpha palette to GColor8 palette for (int i = 0; i < palette_entries; i++) { (palette)[i] = GColorFromRGBA( - rgb_palette[i].r, rgb_palette[i].g, rgb_palette[i].b, // RGB - (i < alpha_palette_entries) ? alpha_palette[i] : UINT8_MAX); // Conditional A value + rgb_palette[i].r, rgb_palette[i].g, rgb_palette[i].b, // RGB + (i < alpha_palette_entries) ? alpha_palette[i] : UINT8_MAX); // Conditional A value } // Return the converted palette and number of entries @@ -266,14 +269,13 @@ bool gbitmap_png_is_format_supported(upng_t *upng) { return false; } - int32_t gbitmap_png_get_transparent_gray_value(upng_t *upng) { int32_t transparent_gray = -1; // default to invalid value // Handle grayscale transparency value (1 single transparent gray) uint8_t *alpha_palette = NULL; uint16_t alpha_palette_entries = upng_get_alpha_palette(upng, &alpha_palette); if (alpha_palette_entries == 2) { - transparent_gray = ntohs(*(uint16_t*)alpha_palette); + transparent_gray = ntohs(*(uint16_t *)alpha_palette); } return transparent_gray; } diff --git a/src/fw/applib/graphics/gbitmap_png.h b/src/fw/applib/graphics/gbitmap_png.h index 582998971d..2f9abf59b9 100644 --- a/src/fw/applib/graphics/gbitmap_png.h +++ b/src/fw/applib/graphics/gbitmap_png.h @@ -76,7 +76,7 @@ bool gbitmap_png_data_is_png(const uint8_t *data, size_t data_size); //! @param png_data_size PNG image size in bytes. //! @return A pointer to the \ref GBitmap. `NULL` if the \ref GBitmap could not //! be created -GBitmap* gbitmap_create_from_png_data(const uint8_t *png_data, size_t png_data_size); +GBitmap *gbitmap_create_from_png_data(const uint8_t *png_data, size_t png_data_size); bool gbitmap_init_with_png_data(GBitmap *bitmap, const uint8_t *data, size_t data_size); @@ -100,8 +100,8 @@ int32_t gbitmap_png_get_transparent_gray_value(upng_t *upng); bool gbitmap_png_is_format_supported(upng_t *upng); //! @internal -int32_t png_seek_chunk_in_resource(uint32_t resource_id, uint32_t offset, - bool seek_framedata, bool *found_actl); +int32_t png_seek_chunk_in_resource(uint32_t resource_id, uint32_t offset, bool seek_framedata, + bool *found_actl); //! @internal //! This function returns the distance from an offset in a resource, from the specified app number, diff --git a/src/fw/applib/graphics/gbitmap_sequence.c b/src/fw/applib/graphics/gbitmap_sequence.c index 2455cd4280..9ebb6cafee 100644 --- a/src/fw/applib/graphics/gbitmap_sequence.c +++ b/src/fw/applib/graphics/gbitmap_sequence.c @@ -26,8 +26,8 @@ static bool prv_gbitmap_sequence_restart(GBitmapSequence *bitmap_sequence, bool } // can start seeking after SIG + IHDR - int32_t metadata_bytes = png_seek_chunk_in_resource(bitmap_sequence->resource_id, - PNG_HEADER_SIZE, false, NULL); + int32_t metadata_bytes = + png_seek_chunk_in_resource(bitmap_sequence->resource_id, PNG_HEADER_SIZE, false, NULL); if (metadata_bytes <= 0) { return false; @@ -48,10 +48,10 @@ static bool prv_gbitmap_sequence_restart(GBitmapSequence *bitmap_sequence, bool //! dst = src * (alpha_normalized) + dst * (1 - alpha_normalized) static ALWAYS_INLINE void prv_gbitmap_sequence_blend_over(GColor8 src_color, GColor8 *dst) { if (src_color.a == 3) { -// Fast path: 100% opacity + // Fast path: 100% opacity *dst = src_color; } else if (src_color.a == 0) { -// Fast path: 0% opacity, no-op! + // Fast path: 0% opacity, no-op! } else { const GColor8 dest_color = *dst; const uint8_t f_src = src_color.a; @@ -75,7 +75,7 @@ GBitmapSequence *gbitmap_sequence_create_with_resource_system(ResAppNum app_num, uint8_t *frame_data_buffer = NULL; // Allocate gbitmap - GBitmapSequence* bitmap_sequence = applib_type_zalloc(GBitmapSequence); + GBitmapSequence *bitmap_sequence = applib_type_zalloc(GBitmapSequence); if (bitmap_sequence == NULL) { goto cleanup; } @@ -93,8 +93,8 @@ GBitmapSequence *gbitmap_sequence_create_with_resource_system(ResAppNum app_num, goto cleanup; } - const size_t bytes_read = sys_resource_load_range(app_num, resource_id, - 0, frame_data_buffer, frame_bytes); + const size_t bytes_read = + sys_resource_load_range(app_num, resource_id, 0, frame_data_buffer, frame_bytes); if (bytes_read != (size_t)frame_bytes) { goto cleanup; } @@ -166,34 +166,33 @@ void gbitmap_sequence_destroy(GBitmapSequence *bitmap_sequence) { } } -static ALWAYS_INLINE GColor8 *prv_target_pixel_addr(GBitmap *bitmap, apng_fctl *fctl, - uint32_t x, uint32_t y) { +static ALWAYS_INLINE GColor8 *prv_target_pixel_addr(GBitmap *bitmap, apng_fctl *fctl, uint32_t x, + uint32_t y) { uint32_t offset = (fctl->y_offset + y + bitmap->bounds.origin.y) * bitmap->row_size_bytes + - (fctl->x_offset + x + bitmap->bounds.origin.x); + (fctl->x_offset + x + bitmap->bounds.origin.x); GColor8 *pixel_data = bitmap->addr; return &pixel_data[offset]; } -static void prv_set_pixel_in_row(uint8_t *row_data, GBitmapFormat bitmap_format, - uint32_t x, GColor8 color) { +static void prv_set_pixel_in_row(uint8_t *row_data, GBitmapFormat bitmap_format, uint32_t x, + GColor8 color) { if (bitmap_format == GBitmapFormat1Bit) { if (!gcolor_is_invisible(color)) { const bool pixel_is_white = !gcolor_equal(color, GColorBlack); bitset8_update(row_data, x, pixel_is_white); } - } else if ((bitmap_format == GBitmapFormat8Bit) || - (bitmap_format == GBitmapFormat8BitCircular)) { + } else if ((bitmap_format == GBitmapFormat8Bit) || (bitmap_format == GBitmapFormat8BitCircular)) { GColor8 *const destination_pixel = (GColor8 *)(row_data + x); *destination_pixel = color; } else { - WTF; // Unsupported destination type + WTF; // Unsupported destination type } } -bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, - GBitmap *bitmap, uint32_t *delay_ms) { +bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, GBitmap *bitmap, + uint32_t *delay_ms) { bool retval = false; - uint8_t* buffer = NULL; + uint8_t *buffer = NULL; // Disabled if play count is 0 and not the very first frame if (!bitmap_sequence || @@ -205,17 +204,15 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, upng_t *upng = png_decoder_data->upng; // Check bitmap_sequence metadata is loaded, bitmap_sequence size, type & memory constraints - const GBitmapFormat bitmap_format = gbitmap_get_format(bitmap); // call is NULL-safe + const GBitmapFormat bitmap_format = gbitmap_get_format(bitmap); // call is NULL-safe if (!bitmap_sequence->header_loaded || bitmap == NULL || bitmap->addr == NULL || bitmap_sequence->bitmap_size.w > (bitmap->bounds.size.w) || bitmap_sequence->bitmap_size.h > (bitmap->bounds.size.h)) { goto cleanup; } - if (!((bitmap_format == GBitmapFormat1Bit) || - (bitmap_format == GBitmapFormat8Bit) || + if (!((bitmap_format == GBitmapFormat1Bit) || (bitmap_format == GBitmapFormat8Bit) || (bitmap_format == GBitmapFormat8BitCircular))) { - APP_LOG(APP_LOG_LEVEL_ERROR, "Invalid destination bitmap format for APNG"); goto cleanup; } @@ -233,9 +230,8 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, } } - const int32_t metadata_bytes = - png_seek_chunk_in_resource(bitmap_sequence->resource_id, - png_decoder_data->read_cursor, true, NULL); + const int32_t metadata_bytes = png_seek_chunk_in_resource( + bitmap_sequence->resource_id, png_decoder_data->read_cursor, true, NULL); if (metadata_bytes <= 0) { goto cleanup; @@ -248,8 +244,7 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, ResAppNum app_num = sys_get_current_resource_num(); const size_t bytes_read = sys_resource_load_range( - app_num, bitmap_sequence->resource_id, - png_decoder_data->read_cursor, buffer, metadata_bytes); + app_num, bitmap_sequence->resource_id, png_decoder_data->read_cursor, buffer, metadata_bytes); if (bytes_read != (size_t)metadata_bytes) { goto cleanup; @@ -282,8 +277,8 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, const GBitmapDataRowInfo row_info = gbitmap_get_data_row_info(bitmap, y); const uint32_t x_origin = bitmap->bounds.origin.x + png_decoder_data->previous_xoffset; const int16_t min_x = MAX((uint32_t)row_info.min_x, x_origin); - const int16_t max_x = MIN((uint32_t)row_info.max_x, - (x_origin + png_decoder_data->previous_width - 1)); + const int16_t max_x = + MIN((uint32_t)row_info.max_x, (x_origin + png_decoder_data->previous_width - 1)); const int16_t num_bytes = max_x - min_x + 1; if (num_bytes > 0) { @@ -292,7 +287,7 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, } } - apng_fctl fctl = {0}; // Defaults work for IDAT frame without fctl data + apng_fctl fctl = {0}; // Defaults work for IDAT frame without fctl data // If this frame doesn't have fctl, use the full width & height if (!upng_get_apng_fctl(upng, &fctl)) { @@ -320,10 +315,10 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, uint32_t bpp = upng_get_bpp(upng); upng_format png_format = upng_get_format(upng); - uint8_t *upng_buffer = (uint8_t*)upng_get_buffer(upng); + uint8_t *upng_buffer = (uint8_t *)upng_get_buffer(upng); // Byte aligned rows for image at bpp - uint16_t row_stride_bytes = (fctl.width * bpp + 7) / 8; + uint16_t row_stride_bytes = (fctl.width * bpp + 7) / 8; if (png_format >= UPNG_INDEXED1 && png_format <= UPNG_INDEXED8) { const GColor8 *palette = png_decoder_data->palette; @@ -333,11 +328,10 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, const GBitmapDataRowInfo row_info = gbitmap_get_data_row_info(bitmap, corrected_dst_y); int16_t delta_x = fctl.x_offset + bitmap->bounds.origin.x; for (int32_t x = MAX(0, row_info.min_x - delta_x); - x < MIN((int32_t)fctl.width, row_info.max_x - delta_x + 1); - x++) { + x < MIN((int32_t)fctl.width, row_info.max_x - delta_x + 1); x++) { const uint32_t corrected_dst_x = x + delta_x; - const uint8_t palette_index = raw_image_get_value_for_bitdepth(upng_buffer, x, y, - row_stride_bytes, bpp); + const uint8_t palette_index = + raw_image_get_value_for_bitdepth(upng_buffer, x, y, row_stride_bytes, bpp); const GColor8 src = palette[palette_index]; GColor8 *const dst = (GColor8 *)(row_info.data + corrected_dst_x); @@ -360,12 +354,10 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, // for each pixel in this frame, clipping to the bitmap geometry for (int32_t x = MAX(0, row_info.min_x - delta_x); - x < MIN((int32_t)fctl.width, row_info.max_x - delta_x + 1); - x++) { - + x < MIN((int32_t)fctl.width, row_info.max_x - delta_x + 1); x++) { const uint32_t corrected_dst_x = x + delta_x; - uint8_t channel = raw_image_get_value_for_bitdepth(upng_buffer, x, y, - row_stride_bytes, bpp); + uint8_t channel = + raw_image_get_value_for_bitdepth(upng_buffer, x, y, row_stride_bytes, bpp); if (transparent_gray >= 0 && channel == transparent_gray) { // Grayscale only has fully transparent, so only modify pixels // during OP_SOURCE to make the area transparent @@ -395,8 +387,8 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, } // total elapsed from start of animation -bool gbitmap_sequence_update_bitmap_by_elapsed(GBitmapSequence *bitmap_sequence, - GBitmap *bitmap, uint32_t elapsed_ms) { +bool gbitmap_sequence_update_bitmap_by_elapsed(GBitmapSequence *bitmap_sequence, GBitmap *bitmap, + uint32_t elapsed_ms) { if (!bitmap_sequence) { return false; } diff --git a/src/fw/applib/graphics/gbitmap_sequence.h b/src/fw/applib/graphics/gbitmap_sequence.h index be57050a4b..033e0d0ec4 100644 --- a/src/fw/applib/graphics/gbitmap_sequence.h +++ b/src/fw/applib/graphics/gbitmap_sequence.h @@ -12,8 +12,8 @@ typedef struct GBitmapSequencePNGDecoderData { upng_t *upng; - size_t read_cursor; // relative to file start, advanced to the control chunk of the next frame - GColor8 *palette; // required for palettized images (rgba) + size_t read_cursor; // relative to file start, advanced to the control chunk of the next frame + GColor8 *palette; // required for palettized images (rgba) uint8_t palette_entries; apng_dispose_ops last_dispose_op; uint32_t previous_xoffset; @@ -31,14 +31,14 @@ typedef struct { bool data_is_loaded_from_flash : 1; }; }; - GSize bitmap_size; // Width & Height - uint32_t play_count; // Total number of times to play the sequence - uint32_t play_index; // Current number of times sequence was played - uint32_t total_duration_ms; // Duration of the animation in ms - uint32_t total_frames; // Total number of frames for the sequence - uint32_t current_frame; // Current frame in the sequence + GSize bitmap_size; // Width & Height + uint32_t play_count; // Total number of times to play the sequence + uint32_t play_index; // Current number of times sequence was played + uint32_t total_duration_ms; // Duration of the animation in ms + uint32_t total_frames; // Total number of frames for the sequence + uint32_t current_frame; // Current frame in the sequence uint32_t current_frame_delay_ms; // Amount of time to display the current frame - uint32_t elapsed_ms; // Total elapsed time for the sequence + uint32_t elapsed_ms; // Total elapsed time for the sequence // Stores internal decoder data union { @@ -75,8 +75,8 @@ bool gbitmap_sequence_restart(GBitmapSequence *bitmap_sequence); //! (includes out of memory errors). //! @note GBitmap must be large enough to accommodate the bitmap_sequence image //! \ref gbitmap_sequence_get_bitmap_size -bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, - GBitmap *bitmap, uint32_t *delay_ms); +bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, GBitmap *bitmap, + uint32_t *delay_ms); //! Updates the contents of the bitmap sequence to the frame at elapsed in the sequence. //! For looping animations this accounts for the loop, for example an animation of 1 second that @@ -92,8 +92,8 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, //! @note GBitmap must be large enough to accommodate the bitmap_sequence image //! \ref gbitmap_sequence_get_bitmap_size //! @note This function is disabled for play_count 0 -bool gbitmap_sequence_update_bitmap_by_elapsed(GBitmapSequence *bitmap_sequence, - GBitmap *bitmap, uint32_t elapsed_ms); +bool gbitmap_sequence_update_bitmap_by_elapsed(GBitmapSequence *bitmap_sequence, GBitmap *bitmap, + uint32_t elapsed_ms); //! This function gets the current frame number for the bitmap sequence //! @param bitmap_sequence Pointer to loaded bitmap sequence diff --git a/src/fw/applib/graphics/gcolor_definitions.c b/src/fw/applib/graphics/gcolor_definitions.c index a80511155b..59fde9c3a3 100644 --- a/src/fw/applib/graphics/gcolor_definitions.c +++ b/src/fw/applib/graphics/gcolor_definitions.c @@ -11,7 +11,7 @@ GColor8 get_native_color(GColor2 color) { case GColor2White: return GColorWhite; default: - return GColorClear; // GColorClear defined as ~0, so it is everything else we may receive + return GColorClear; // GColorClear defined as ~0, so it is everything else we may receive } } @@ -28,7 +28,7 @@ GColor2 get_closest_gcolor2(GColor8 color) { case GColorClearARGB8: return GColor2Clear; default: - return GColor2White; // TODO: This should pick the closes color rather than just white. + return GColor2White; // TODO: This should pick the closes color rather than just white. } } diff --git a/src/fw/applib/graphics/gcolor_definitions.h b/src/fw/applib/graphics/gcolor_definitions.h index 63a5be06e3..a3dc7258b3 100644 --- a/src/fw/applib/graphics/gcolor_definitions.h +++ b/src/fw/applib/graphics/gcolor_definitions.h @@ -19,11 +19,12 @@ //! @param blue Blue value from 0 - 255 //! @param alpha Alpha value from 0 - 255 //! @return GColor created from the RGBA values -#define GColorFromRGBA(red, green, blue, alpha) ((GColor8){ \ - .b = (uint8_t)(blue) >> 6, \ - .g = (uint8_t)(green) >> 6, \ - .r = (uint8_t)(red) >> 6, \ - .a = (uint8_t)(alpha) >> 6, \ +#define GColorFromRGBA(red, green, blue, alpha) \ + ((GColor8){ \ + .b = (uint8_t)(blue) >> 6, \ + .g = (uint8_t)(green) >> 6, \ + .r = (uint8_t)(red) >> 6, \ + .a = (uint8_t)(alpha) >> 6, \ }) //! Convert RGB to GColor. @@ -31,8 +32,7 @@ //! @param green Green value from 0 - 255 //! @param blue Blue value from 0 - 255 //! @return GColor created from the RGB values -#define GColorFromRGB(red, green, blue) \ - GColorFromRGBA(red, green, blue, 255) +#define GColorFromRGB(red, green, blue) GColorFromRGBA(red, green, blue, 255) //! Convert hex integer to GColor. //! @param v Integer hex value (e.g. 0x64ff46) @@ -40,279 +40,535 @@ #define GColorFromHEX(v) GColorFromRGB(((v) >> 16) & 0xff, ((v) >> 8) & 0xff, ((v) & 0xff)) //! @addtogroup ColorDefinitions Color Definitions -//! A list of all of the named colors available with links to the color map on the Pebble Developer website. +//! A list of all of the named colors available with links to the color map on the Pebble Developer +//! website. //! @{ // 8bit color values of all natively supported colors // AARRGGBB -#define GColorBlackARGB8 ((uint8_t)0b11000000) -#define GColorOxfordBlueARGB8 ((uint8_t)0b11000001) -#define GColorDukeBlueARGB8 ((uint8_t)0b11000010) -#define GColorBlueARGB8 ((uint8_t)0b11000011) -#define GColorDarkGreenARGB8 ((uint8_t)0b11000100) -#define GColorMidnightGreenARGB8 ((uint8_t)0b11000101) -#define GColorCobaltBlueARGB8 ((uint8_t)0b11000110) -#define GColorBlueMoonARGB8 ((uint8_t)0b11000111) -#define GColorIslamicGreenARGB8 ((uint8_t)0b11001000) -#define GColorJaegerGreenARGB8 ((uint8_t)0b11001001) -#define GColorTiffanyBlueARGB8 ((uint8_t)0b11001010) -#define GColorVividCeruleanARGB8 ((uint8_t)0b11001011) -#define GColorGreenARGB8 ((uint8_t)0b11001100) -#define GColorMalachiteARGB8 ((uint8_t)0b11001101) -#define GColorMediumSpringGreenARGB8 ((uint8_t)0b11001110) -#define GColorCyanARGB8 ((uint8_t)0b11001111) -#define GColorBulgarianRoseARGB8 ((uint8_t)0b11010000) -#define GColorImperialPurpleARGB8 ((uint8_t)0b11010001) -#define GColorIndigoARGB8 ((uint8_t)0b11010010) -#define GColorElectricUltramarineARGB8 ((uint8_t)0b11010011) -#define GColorArmyGreenARGB8 ((uint8_t)0b11010100) -#define GColorDarkGrayARGB8 ((uint8_t)0b11010101) -#define GColorLibertyARGB8 ((uint8_t)0b11010110) -#define GColorVeryLightBlueARGB8 ((uint8_t)0b11010111) -#define GColorKellyGreenARGB8 ((uint8_t)0b11011000) -#define GColorMayGreenARGB8 ((uint8_t)0b11011001) -#define GColorCadetBlueARGB8 ((uint8_t)0b11011010) -#define GColorPictonBlueARGB8 ((uint8_t)0b11011011) -#define GColorBrightGreenARGB8 ((uint8_t)0b11011100) -#define GColorScreaminGreenARGB8 ((uint8_t)0b11011101) -#define GColorMediumAquamarineARGB8 ((uint8_t)0b11011110) -#define GColorElectricBlueARGB8 ((uint8_t)0b11011111) -#define GColorDarkCandyAppleRedARGB8 ((uint8_t)0b11100000) -#define GColorJazzberryJamARGB8 ((uint8_t)0b11100001) -#define GColorPurpleARGB8 ((uint8_t)0b11100010) -#define GColorVividVioletARGB8 ((uint8_t)0b11100011) -#define GColorWindsorTanARGB8 ((uint8_t)0b11100100) -#define GColorRoseValeARGB8 ((uint8_t)0b11100101) -#define GColorPurpureusARGB8 ((uint8_t)0b11100110) -#define GColorLavenderIndigoARGB8 ((uint8_t)0b11100111) -#define GColorLimerickARGB8 ((uint8_t)0b11101000) -#define GColorBrassARGB8 ((uint8_t)0b11101001) -#define GColorLightGrayARGB8 ((uint8_t)0b11101010) -#define GColorBabyBlueEyesARGB8 ((uint8_t)0b11101011) -#define GColorSpringBudARGB8 ((uint8_t)0b11101100) -#define GColorInchwormARGB8 ((uint8_t)0b11101101) -#define GColorMintGreenARGB8 ((uint8_t)0b11101110) -#define GColorCelesteARGB8 ((uint8_t)0b11101111) -#define GColorRedARGB8 ((uint8_t)0b11110000) -#define GColorFollyARGB8 ((uint8_t)0b11110001) -#define GColorFashionMagentaARGB8 ((uint8_t)0b11110010) -#define GColorMagentaARGB8 ((uint8_t)0b11110011) -#define GColorOrangeARGB8 ((uint8_t)0b11110100) -#define GColorSunsetOrangeARGB8 ((uint8_t)0b11110101) -#define GColorBrilliantRoseARGB8 ((uint8_t)0b11110110) -#define GColorShockingPinkARGB8 ((uint8_t)0b11110111) -#define GColorChromeYellowARGB8 ((uint8_t)0b11111000) -#define GColorRajahARGB8 ((uint8_t)0b11111001) -#define GColorMelonARGB8 ((uint8_t)0b11111010) +#define GColorBlackARGB8 ((uint8_t)0b11000000) +#define GColorOxfordBlueARGB8 ((uint8_t)0b11000001) +#define GColorDukeBlueARGB8 ((uint8_t)0b11000010) +#define GColorBlueARGB8 ((uint8_t)0b11000011) +#define GColorDarkGreenARGB8 ((uint8_t)0b11000100) +#define GColorMidnightGreenARGB8 ((uint8_t)0b11000101) +#define GColorCobaltBlueARGB8 ((uint8_t)0b11000110) +#define GColorBlueMoonARGB8 ((uint8_t)0b11000111) +#define GColorIslamicGreenARGB8 ((uint8_t)0b11001000) +#define GColorJaegerGreenARGB8 ((uint8_t)0b11001001) +#define GColorTiffanyBlueARGB8 ((uint8_t)0b11001010) +#define GColorVividCeruleanARGB8 ((uint8_t)0b11001011) +#define GColorGreenARGB8 ((uint8_t)0b11001100) +#define GColorMalachiteARGB8 ((uint8_t)0b11001101) +#define GColorMediumSpringGreenARGB8 ((uint8_t)0b11001110) +#define GColorCyanARGB8 ((uint8_t)0b11001111) +#define GColorBulgarianRoseARGB8 ((uint8_t)0b11010000) +#define GColorImperialPurpleARGB8 ((uint8_t)0b11010001) +#define GColorIndigoARGB8 ((uint8_t)0b11010010) +#define GColorElectricUltramarineARGB8 ((uint8_t)0b11010011) +#define GColorArmyGreenARGB8 ((uint8_t)0b11010100) +#define GColorDarkGrayARGB8 ((uint8_t)0b11010101) +#define GColorLibertyARGB8 ((uint8_t)0b11010110) +#define GColorVeryLightBlueARGB8 ((uint8_t)0b11010111) +#define GColorKellyGreenARGB8 ((uint8_t)0b11011000) +#define GColorMayGreenARGB8 ((uint8_t)0b11011001) +#define GColorCadetBlueARGB8 ((uint8_t)0b11011010) +#define GColorPictonBlueARGB8 ((uint8_t)0b11011011) +#define GColorBrightGreenARGB8 ((uint8_t)0b11011100) +#define GColorScreaminGreenARGB8 ((uint8_t)0b11011101) +#define GColorMediumAquamarineARGB8 ((uint8_t)0b11011110) +#define GColorElectricBlueARGB8 ((uint8_t)0b11011111) +#define GColorDarkCandyAppleRedARGB8 ((uint8_t)0b11100000) +#define GColorJazzberryJamARGB8 ((uint8_t)0b11100001) +#define GColorPurpleARGB8 ((uint8_t)0b11100010) +#define GColorVividVioletARGB8 ((uint8_t)0b11100011) +#define GColorWindsorTanARGB8 ((uint8_t)0b11100100) +#define GColorRoseValeARGB8 ((uint8_t)0b11100101) +#define GColorPurpureusARGB8 ((uint8_t)0b11100110) +#define GColorLavenderIndigoARGB8 ((uint8_t)0b11100111) +#define GColorLimerickARGB8 ((uint8_t)0b11101000) +#define GColorBrassARGB8 ((uint8_t)0b11101001) +#define GColorLightGrayARGB8 ((uint8_t)0b11101010) +#define GColorBabyBlueEyesARGB8 ((uint8_t)0b11101011) +#define GColorSpringBudARGB8 ((uint8_t)0b11101100) +#define GColorInchwormARGB8 ((uint8_t)0b11101101) +#define GColorMintGreenARGB8 ((uint8_t)0b11101110) +#define GColorCelesteARGB8 ((uint8_t)0b11101111) +#define GColorRedARGB8 ((uint8_t)0b11110000) +#define GColorFollyARGB8 ((uint8_t)0b11110001) +#define GColorFashionMagentaARGB8 ((uint8_t)0b11110010) +#define GColorMagentaARGB8 ((uint8_t)0b11110011) +#define GColorOrangeARGB8 ((uint8_t)0b11110100) +#define GColorSunsetOrangeARGB8 ((uint8_t)0b11110101) +#define GColorBrilliantRoseARGB8 ((uint8_t)0b11110110) +#define GColorShockingPinkARGB8 ((uint8_t)0b11110111) +#define GColorChromeYellowARGB8 ((uint8_t)0b11111000) +#define GColorRajahARGB8 ((uint8_t)0b11111001) +#define GColorMelonARGB8 ((uint8_t)0b11111010) #define GColorRichBrilliantLavenderARGB8 ((uint8_t)0b11111011) -#define GColorYellowARGB8 ((uint8_t)0b11111100) -#define GColorIcterineARGB8 ((uint8_t)0b11111101) -#define GColorPastelYellowARGB8 ((uint8_t)0b11111110) -#define GColorWhiteARGB8 ((uint8_t)0b11111111) +#define GColorYellowARGB8 ((uint8_t)0b11111100) +#define GColorIcterineARGB8 ((uint8_t)0b11111101) +#define GColorPastelYellowARGB8 ((uint8_t)0b11111110) +#define GColorWhiteARGB8 ((uint8_t)0b11111111) // GColor values of all natively supported colors -//! GColorBlack -#define GColorBlack (GColor8){.argb=GColorBlackARGB8} - -//! GColorOxfordBlue -#define GColorOxfordBlue (GColor8){.argb=GColorOxfordBlueARGB8} - -//! GColorDukeBlue -#define GColorDukeBlue (GColor8){.argb=GColorDukeBlueARGB8} - -//! GColorBlue -#define GColorBlue (GColor8){.argb=GColorBlueARGB8} - -//! GColorDarkGreen -#define GColorDarkGreen (GColor8){.argb=GColorDarkGreenARGB8} - -//! GColorMidnightGreen -#define GColorMidnightGreen (GColor8){.argb=GColorMidnightGreenARGB8} - -//! GColorCobaltBlue -#define GColorCobaltBlue (GColor8){.argb=GColorCobaltBlueARGB8} - -//! GColorBlueMoon -#define GColorBlueMoon (GColor8){.argb=GColorBlueMoonARGB8} - -//! GColorIslamicGreen -#define GColorIslamicGreen (GColor8){.argb=GColorIslamicGreenARGB8} - -//! GColorJaegerGreen -#define GColorJaegerGreen (GColor8){.argb=GColorJaegerGreenARGB8} - -//! GColorTiffanyBlue -#define GColorTiffanyBlue (GColor8){.argb=GColorTiffanyBlueARGB8} - -//! GColorVividCerulean -#define GColorVividCerulean (GColor8){.argb=GColorVividCeruleanARGB8} - -//! GColorGreen -#define GColorGreen (GColor8){.argb=GColorGreenARGB8} - -//! GColorMalachite -#define GColorMalachite (GColor8){.argb=GColorMalachiteARGB8} - -//! GColorMediumSpringGreen -#define GColorMediumSpringGreen (GColor8){.argb=GColorMediumSpringGreenARGB8} - -//! GColorCyan -#define GColorCyan (GColor8){.argb=GColorCyanARGB8} - -//! GColorBulgarianRose -#define GColorBulgarianRose (GColor8){.argb=GColorBulgarianRoseARGB8} - -//! GColorImperialPurple -#define GColorImperialPurple (GColor8){.argb=GColorImperialPurpleARGB8} - -//! GColorIndigo -#define GColorIndigo (GColor8){.argb=GColorIndigoARGB8} - -//! GColorElectricUltramarine -#define GColorElectricUltramarine (GColor8){.argb=GColorElectricUltramarineARGB8} - -//! GColorArmyGreen -#define GColorArmyGreen (GColor8){.argb=GColorArmyGreenARGB8} - -//! GColorDarkGray -#define GColorDarkGray (GColor8){.argb=GColorDarkGrayARGB8} - -//! GColorLiberty -#define GColorLiberty (GColor8){.argb=GColorLibertyARGB8} - -//! GColorVeryLightBlue -#define GColorVeryLightBlue (GColor8){.argb=GColorVeryLightBlueARGB8} - -//! GColorKellyGreen -#define GColorKellyGreen (GColor8){.argb=GColorKellyGreenARGB8} - -//! GColorMayGreen -#define GColorMayGreen (GColor8){.argb=GColorMayGreenARGB8} - -//! GColorCadetBlue -#define GColorCadetBlue (GColor8){.argb=GColorCadetBlueARGB8} - -//! GColorPictonBlue -#define GColorPictonBlue (GColor8){.argb=GColorPictonBlueARGB8} - -//! GColorBrightGreen -#define GColorBrightGreen (GColor8){.argb=GColorBrightGreenARGB8} - -//! GColorScreaminGreen -#define GColorScreaminGreen (GColor8){.argb=GColorScreaminGreenARGB8} - -//! GColorMediumAquamarine -#define GColorMediumAquamarine (GColor8){.argb=GColorMediumAquamarineARGB8} - -//! GColorElectricBlue -#define GColorElectricBlue (GColor8){.argb=GColorElectricBlueARGB8} - -//! GColorDarkCandyAppleRed -#define GColorDarkCandyAppleRed (GColor8){.argb=GColorDarkCandyAppleRedARGB8} - -//! GColorJazzberryJam -#define GColorJazzberryJam (GColor8){.argb=GColorJazzberryJamARGB8} - -//! GColorPurple -#define GColorPurple (GColor8){.argb=GColorPurpleARGB8} - -//! GColorVividViolet -#define GColorVividViolet (GColor8){.argb=GColorVividVioletARGB8} - -//! GColorWindsorTan -#define GColorWindsorTan (GColor8){.argb=GColorWindsorTanARGB8} - -//! GColorRoseVale -#define GColorRoseVale (GColor8){.argb=GColorRoseValeARGB8} - -//! GColorPurpureus -#define GColorPurpureus (GColor8){.argb=GColorPurpureusARGB8} - -//! GColorLavenderIndigo -#define GColorLavenderIndigo (GColor8){.argb=GColorLavenderIndigoARGB8} - -//! GColorLimerick -#define GColorLimerick (GColor8){.argb=GColorLimerickARGB8} - -//! GColorBrass -#define GColorBrass (GColor8){.argb=GColorBrassARGB8} - -//! GColorLightGray -#define GColorLightGray (GColor8){.argb=GColorLightGrayARGB8} - -//! GColorBabyBlueEyes -#define GColorBabyBlueEyes (GColor8){.argb=GColorBabyBlueEyesARGB8} - -//! GColorSpringBud -#define GColorSpringBud (GColor8){.argb=GColorSpringBudARGB8} - -//! GColorInchworm -#define GColorInchworm (GColor8){.argb=GColorInchwormARGB8} - -//! GColorMintGreen -#define GColorMintGreen (GColor8){.argb=GColorMintGreenARGB8} - -//! GColorCeleste -#define GColorCeleste (GColor8){.argb=GColorCelesteARGB8} - -//! GColorRed -#define GColorRed (GColor8){.argb=GColorRedARGB8} - -//! GColorFolly -#define GColorFolly (GColor8){.argb=GColorFollyARGB8} - -//! GColorFashionMagenta -#define GColorFashionMagenta (GColor8){.argb=GColorFashionMagentaARGB8} - -//! GColorMagenta -#define GColorMagenta (GColor8){.argb=GColorMagentaARGB8} - -//! GColorOrange -#define GColorOrange (GColor8){.argb=GColorOrangeARGB8} - -//! GColorSunsetOrange -#define GColorSunsetOrange (GColor8){.argb=GColorSunsetOrangeARGB8} - -//! GColorBrilliantRose -#define GColorBrilliantRose (GColor8){.argb=GColorBrilliantRoseARGB8} - -//! GColorShockingPink -#define GColorShockingPink (GColor8){.argb=GColorShockingPinkARGB8} - -//! GColorChromeYellow -#define GColorChromeYellow (GColor8){.argb=GColorChromeYellowARGB8} - -//! GColorRajah -#define GColorRajah (GColor8){.argb=GColorRajahARGB8} - -//! GColorMelon -#define GColorMelon (GColor8){.argb=GColorMelonARGB8} - -//! GColorRichBrilliantLavender -#define GColorRichBrilliantLavender (GColor8){.argb=GColorRichBrilliantLavenderARGB8} - -//! GColorYellow -#define GColorYellow (GColor8){.argb=GColorYellowARGB8} - -//! GColorIcterine -#define GColorIcterine (GColor8){.argb=GColorIcterineARGB8} - -//! GColorPastelYellow -#define GColorPastelYellow (GColor8){.argb=GColorPastelYellowARGB8} - -//! GColorWhite -#define GColorWhite (GColor8){.argb=GColorWhiteARGB8} +//! GColorBlack +#define GColorBlack \ + (GColor8) { \ + .argb = GColorBlackARGB8 \ + } + +//! GColorOxfordBlue +#define GColorOxfordBlue \ + (GColor8) { \ + .argb = GColorOxfordBlueARGB8 \ + } + +//! GColorDukeBlue +#define GColorDukeBlue \ + (GColor8) { \ + .argb = GColorDukeBlueARGB8 \ + } + +//! GColorBlue +#define GColorBlue \ + (GColor8) { \ + .argb = GColorBlueARGB8 \ + } + +//! GColorDarkGreen +#define GColorDarkGreen \ + (GColor8) { \ + .argb = GColorDarkGreenARGB8 \ + } + +//! GColorMidnightGreen +#define GColorMidnightGreen \ + (GColor8) { \ + .argb = GColorMidnightGreenARGB8 \ + } + +//! GColorCobaltBlue +#define GColorCobaltBlue \ + (GColor8) { \ + .argb = GColorCobaltBlueARGB8 \ + } + +//! GColorBlueMoon +#define GColorBlueMoon \ + (GColor8) { \ + .argb = GColorBlueMoonARGB8 \ + } + +//! GColorIslamicGreen +#define GColorIslamicGreen \ + (GColor8) { \ + .argb = GColorIslamicGreenARGB8 \ + } + +//! GColorJaegerGreen +#define GColorJaegerGreen \ + (GColor8) { \ + .argb = GColorJaegerGreenARGB8 \ + } + +//! GColorTiffanyBlue +#define GColorTiffanyBlue \ + (GColor8) { \ + .argb = GColorTiffanyBlueARGB8 \ + } + +//! GColorVividCerulean +#define GColorVividCerulean \ + (GColor8) { \ + .argb = GColorVividCeruleanARGB8 \ + } + +//! GColorGreen +#define GColorGreen \ + (GColor8) { \ + .argb = GColorGreenARGB8 \ + } + +//! GColorMalachite +#define GColorMalachite \ + (GColor8) { \ + .argb = GColorMalachiteARGB8 \ + } + +//! GColorMediumSpringGreen +#define GColorMediumSpringGreen \ + (GColor8) { \ + .argb = GColorMediumSpringGreenARGB8 \ + } + +//! GColorCyan +#define GColorCyan \ + (GColor8) { \ + .argb = GColorCyanARGB8 \ + } + +//! GColorBulgarianRose +#define GColorBulgarianRose \ + (GColor8) { \ + .argb = GColorBulgarianRoseARGB8 \ + } + +//! GColorImperialPurple +#define GColorImperialPurple \ + (GColor8) { \ + .argb = GColorImperialPurpleARGB8 \ + } + +//! GColorIndigo +#define GColorIndigo \ + (GColor8) { \ + .argb = GColorIndigoARGB8 \ + } + +//! GColorElectricUltramarine +#define GColorElectricUltramarine \ + (GColor8) { \ + .argb = GColorElectricUltramarineARGB8 \ + } + +//! GColorArmyGreen +#define GColorArmyGreen \ + (GColor8) { \ + .argb = GColorArmyGreenARGB8 \ + } + +//! GColorDarkGray +#define GColorDarkGray \ + (GColor8) { \ + .argb = GColorDarkGrayARGB8 \ + } + +//! GColorLiberty +#define GColorLiberty \ + (GColor8) { \ + .argb = GColorLibertyARGB8 \ + } + +//! GColorVeryLightBlue +#define GColorVeryLightBlue \ + (GColor8) { \ + .argb = GColorVeryLightBlueARGB8 \ + } + +//! GColorKellyGreen +#define GColorKellyGreen \ + (GColor8) { \ + .argb = GColorKellyGreenARGB8 \ + } + +//! GColorMayGreen +#define GColorMayGreen \ + (GColor8) { \ + .argb = GColorMayGreenARGB8 \ + } + +//! GColorCadetBlue +#define GColorCadetBlue \ + (GColor8) { \ + .argb = GColorCadetBlueARGB8 \ + } + +//! GColorPictonBlue +#define GColorPictonBlue \ + (GColor8) { \ + .argb = GColorPictonBlueARGB8 \ + } + +//! GColorBrightGreen +#define GColorBrightGreen \ + (GColor8) { \ + .argb = GColorBrightGreenARGB8 \ + } + +//! GColorScreaminGreen +#define GColorScreaminGreen \ + (GColor8) { \ + .argb = GColorScreaminGreenARGB8 \ + } + +//! GColorMediumAquamarine +#define GColorMediumAquamarine \ + (GColor8) { \ + .argb = GColorMediumAquamarineARGB8 \ + } + +//! GColorElectricBlue +#define GColorElectricBlue \ + (GColor8) { \ + .argb = GColorElectricBlueARGB8 \ + } + +//! GColorDarkCandyAppleRed +#define GColorDarkCandyAppleRed \ + (GColor8) { \ + .argb = GColorDarkCandyAppleRedARGB8 \ + } + +//! GColorJazzberryJam +#define GColorJazzberryJam \ + (GColor8) { \ + .argb = GColorJazzberryJamARGB8 \ + } + +//! GColorPurple +#define GColorPurple \ + (GColor8) { \ + .argb = GColorPurpleARGB8 \ + } + +//! GColorVividViolet +#define GColorVividViolet \ + (GColor8) { \ + .argb = GColorVividVioletARGB8 \ + } + +//! GColorWindsorTan +#define GColorWindsorTan \ + (GColor8) { \ + .argb = GColorWindsorTanARGB8 \ + } + +//! GColorRoseVale +#define GColorRoseVale \ + (GColor8) { \ + .argb = GColorRoseValeARGB8 \ + } + +//! GColorPurpureus +#define GColorPurpureus \ + (GColor8) { \ + .argb = GColorPurpureusARGB8 \ + } + +//! GColorLavenderIndigo +#define GColorLavenderIndigo \ + (GColor8) { \ + .argb = GColorLavenderIndigoARGB8 \ + } + +//! GColorLimerick +#define GColorLimerick \ + (GColor8) { \ + .argb = GColorLimerickARGB8 \ + } + +//! GColorBrass +#define GColorBrass \ + (GColor8) { \ + .argb = GColorBrassARGB8 \ + } + +//! GColorLightGray +#define GColorLightGray \ + (GColor8) { \ + .argb = GColorLightGrayARGB8 \ + } + +//! GColorBabyBlueEyes +#define GColorBabyBlueEyes \ + (GColor8) { \ + .argb = GColorBabyBlueEyesARGB8 \ + } + +//! GColorSpringBud +#define GColorSpringBud \ + (GColor8) { \ + .argb = GColorSpringBudARGB8 \ + } + +//! GColorInchworm +#define GColorInchworm \ + (GColor8) { \ + .argb = GColorInchwormARGB8 \ + } + +//! GColorMintGreen +#define GColorMintGreen \ + (GColor8) { \ + .argb = GColorMintGreenARGB8 \ + } + +//! GColorCeleste +#define GColorCeleste \ + (GColor8) { \ + .argb = GColorCelesteARGB8 \ + } + +//! GColorRed +#define GColorRed \ + (GColor8) { \ + .argb = GColorRedARGB8 \ + } + +//! GColorFolly +#define GColorFolly \ + (GColor8) { \ + .argb = GColorFollyARGB8 \ + } + +//! GColorFashionMagenta +#define GColorFashionMagenta \ + (GColor8) { \ + .argb = GColorFashionMagentaARGB8 \ + } + +//! GColorMagenta +#define GColorMagenta \ + (GColor8) { \ + .argb = GColorMagentaARGB8 \ + } + +//! GColorOrange +#define GColorOrange \ + (GColor8) { \ + .argb = GColorOrangeARGB8 \ + } + +//! GColorSunsetOrange +#define GColorSunsetOrange \ + (GColor8) { \ + .argb = GColorSunsetOrangeARGB8 \ + } + +//! GColorBrilliantRose +#define GColorBrilliantRose \ + (GColor8) { \ + .argb = GColorBrilliantRoseARGB8 \ + } + +//! GColorShockingPink +#define GColorShockingPink \ + (GColor8) { \ + .argb = GColorShockingPinkARGB8 \ + } + +//! GColorChromeYellow +#define GColorChromeYellow \ + (GColor8) { \ + .argb = GColorChromeYellowARGB8 \ + } + +//! GColorRajah +#define GColorRajah \ + (GColor8) { \ + .argb = GColorRajahARGB8 \ + } + +//! GColorMelon +#define GColorMelon \ + (GColor8) { \ + .argb = GColorMelonARGB8 \ + } + +//! GColorRichBrilliantLavender +#define GColorRichBrilliantLavender \ + (GColor8) { \ + .argb = GColorRichBrilliantLavenderARGB8 \ + } + +//! GColorYellow +#define GColorYellow \ + (GColor8) { \ + .argb = GColorYellowARGB8 \ + } + +//! GColorIcterine +#define GColorIcterine \ + (GColor8) { \ + .argb = GColorIcterineARGB8 \ + } + +//! GColorPastelYellow +#define GColorPastelYellow \ + (GColor8) { \ + .argb = GColorPastelYellowARGB8 \ + } + +//! GColorWhite +#define GColorWhite \ + (GColor8) { \ + .argb = GColorWhiteARGB8 \ + } // Additional 8bit color values #define GColorClearARGB8 ((uint8_t)0b00000000) // Additional GColor values -#define GColorClear ((GColor8){.argb=GColorClearARGB8}) +#define GColorClear ((GColor8){.argb = GColorClearARGB8}) //! @} // group ColorDefinitions //! @} // group GraphicsTypes //! @} // group Graphics - diff --git a/src/fw/applib/graphics/gcontext.h b/src/fw/applib/graphics/gcontext.h index 1bc8397677..7ab4b1a9c5 100644 --- a/src/fw/applib/graphics/gcontext.h +++ b/src/fw/applib/graphics/gcontext.h @@ -19,7 +19,7 @@ typedef struct GContext { //! Which framebuffer dest_bitmap points into. This may be null if the //! bitmap doesn't point into a framebuffer. - FrameBuffer* parent_framebuffer; + FrameBuffer *parent_framebuffer; //! Number of rows between the top of the dest_bitmap and the top of it's //! parent framebuffer. This value is invalid if parent_framebuffer is null. @@ -106,7 +106,6 @@ typedef struct GDrawMask { //! @see \ref TextDrawing //! @{ - //! @internal void graphics_context_init(GContext *ctx, FrameBuffer *framebuffer, GContextInitializationMode init_mode); @@ -117,33 +116,33 @@ void graphics_context_set_default_drawing_state(GContext *ctx, //! @internal //! Gets the current drawing state (fill/stroke/text colors, compositing mode, ...) -GDrawState graphics_context_get_drawing_state(GContext* ctx); +GDrawState graphics_context_get_drawing_state(GContext *ctx); //! @internal //! Sets the current drawing state (fill/stroke/text colors, compositing mode, ...) -void graphics_context_set_drawing_state(GContext* ctx, GDrawState draw_state); +void graphics_context_set_drawing_state(GContext *ctx, GDrawState draw_state); //! @internal //! Move the drawing box origin by the translation offset specified -void graphics_context_move_draw_box(GContext* ctx, GPoint offset); +void graphics_context_move_draw_box(GContext *ctx, GPoint offset); //! Sets the current stroke color of the graphics context. //! @param ctx The graphics context onto which to set the stroke color //! @param color The new stroke color -void graphics_context_set_stroke_color(GContext* ctx, GColor color); -void graphics_context_set_stroke_color_2bit(GContext* ctx, GColor2 color); +void graphics_context_set_stroke_color(GContext *ctx, GColor color); +void graphics_context_set_stroke_color_2bit(GContext *ctx, GColor2 color); //! Sets the current fill color of the graphics context. //! @param ctx The graphics context onto which to set the fill color //! @param color The new fill color -void graphics_context_set_fill_color(GContext* ctx, GColor color); -void graphics_context_set_fill_color_2bit(GContext* ctx, GColor2 color); +void graphics_context_set_fill_color(GContext *ctx, GColor color); +void graphics_context_set_fill_color_2bit(GContext *ctx, GColor2 color); //! Sets the current text color of the graphics context. //! @param ctx The graphics context onto which to set the text color //! @param color The new text color -void graphics_context_set_text_color(GContext* ctx, GColor color); -void graphics_context_set_text_color_2bit(GContext* ctx, GColor2 color); +void graphics_context_set_text_color(GContext *ctx, GColor color); +void graphics_context_set_text_color_2bit(GContext *ctx, GColor2 color); //! Sets the tint color of the graphics context. This is used when drawing under //! the GCompOpOr compositing mode. @@ -161,13 +160,13 @@ void graphics_context_set_tint_color(GContext *ctx, GColor color); //! -- \ref graphics_draw_bitmap_in_rect(), \ref graphics_draw_rotated_bitmap, and //! anything that uses those APIs --, but it currently does not affect the filling or stroking //! operations. -void graphics_context_set_compositing_mode(GContext* ctx, GCompOp mode); +void graphics_context_set_compositing_mode(GContext *ctx, GCompOp mode); //! Sets whether antialiasing is applied to stroke drawing //! @param ctx The graphics context onto which to set the antialiasing //! @param enable True = antialiasing enabled, False = antialiasing disabled //! @note Default value is true. -void graphics_context_set_antialiased(GContext* ctx, bool enable); +void graphics_context_set_antialiased(GContext *ctx, bool enable); //! @internal //! Gets whether antialiasing is applied to stroke drawing @@ -182,7 +181,7 @@ bool graphics_context_get_antialiased(GContext *ctx); //! stored in GContext. Currently, only odd stroke_width values are supported. If an even value //! is passed in, the value will be stored as is, but the drawing routines will round down to the //! previous integral value when drawing. Default value is 1. -void graphics_context_set_stroke_width(GContext* ctx, uint8_t stroke_width); +void graphics_context_set_stroke_width(GContext *ctx, uint8_t stroke_width); //! Instantiates and initializes a mask. //! @param ctx The graphics context to use to initialize the new mask @@ -220,12 +219,12 @@ GSize graphics_context_get_framebuffer_size(GContext *ctx); //! @internal //! Retrieves the destination bitmap for the graphics context. //! @param ctx The graphics context to retrieve the bitmap for. -GBitmap* graphics_context_get_bitmap(GContext* ctx); +GBitmap *graphics_context_get_bitmap(GContext *ctx); //! @internal //! Updates the parent framebuffers dirty state based on a change to the //! graphic context's bitmap. -void graphics_context_mark_dirty_rect(GContext* ctx, GRect rect); +void graphics_context_mark_dirty_rect(GContext *ctx, GRect rect); //! @} // end addtogroup GraphicsContext //! @} // end addtogroup Graphics diff --git a/src/fw/applib/graphics/gdraw_command.c b/src/fw/applib/graphics/gdraw_command.c index 80a66bcfb9..9c8b953751 100644 --- a/src/fw/applib/graphics/gdraw_command.c +++ b/src/fw/applib/graphics/gdraw_command.c @@ -14,8 +14,8 @@ bool gdraw_command_resource_is_valid(ResAppNum app_num, uint32_t resource_id, uint32_t expected_signature, uint32_t *data_size) { // Load file signature, and check that it matches the expected_signature uint32_t data_signature; - if (!(sys_resource_load_range(app_num, resource_id, 0, (uint8_t*)&data_signature, - sizeof(data_signature)) == sizeof(data_signature) && + if (!(sys_resource_load_range(app_num, resource_id, 0, (uint8_t *)&data_signature, + sizeof(data_signature)) == sizeof(data_signature) && (ntohl(data_signature) == expected_signature))) { return NULL; } @@ -27,7 +27,8 @@ bool gdraw_command_resource_is_valid(ResAppNum app_num, uint32_t resource_id, "code re-use between PDCI/PDCS requires same file format header"); if (sys_resource_load_range(app_num, resource_id, sizeof(expected_signature), - (uint8_t*)&output_data_size, sizeof(output_data_size)) != sizeof(output_data_size)) { + (uint8_t *)&output_data_size, + sizeof(output_data_size)) != sizeof(output_data_size)) { return NULL; } *data_size = output_data_size; @@ -49,10 +50,7 @@ static void prv_draw_path(GContext *ctx, GDrawCommand *command) { if (command->num_points <= 1) { return; } - GPath path = { - .num_points = command->num_points, - .points = command->points - }; + GPath path = {.num_points = command->num_points, .points = command->points}; // draw all values of alpha, except fully transparent if ((command->fill_color.a != 0)) { graphics_context_set_fill_color(ctx, command->fill_color); @@ -91,8 +89,8 @@ static void prv_draw_precise_path(GContext *ctx, GDrawCommand *command) { if ((command->stroke_color.a != 0) && (command->stroke_width > 0)) { graphics_context_set_stroke_color(ctx, command->stroke_color); graphics_context_set_stroke_width(ctx, command->stroke_width); - gpath_draw_outline_precise_internal(ctx, command->precise_points, - command->num_precise_points, command->path_open); + gpath_draw_outline_precise_internal(ctx, command->precise_points, command->num_precise_points, + command->path_open); } } @@ -139,7 +137,7 @@ void gdraw_command_set_fill_color(GDrawCommand *command, GColor fill_color) { GColor gdraw_command_get_fill_color(GDrawCommand *command) { if (!command) { - return (GColor) {0}; + return (GColor){0}; } else { return command->fill_color; } @@ -148,14 +146,14 @@ GColor gdraw_command_get_fill_color(GDrawCommand *command) { void gdraw_command_set_stroke_color(GDrawCommand *command, GColor stroke_color) { if (!command) { return; - } else { + } else { command->stroke_color = stroke_color; } } GColor gdraw_command_get_stroke_color(GDrawCommand *command) { if (!command) { - return (GColor) {0}; + return (GColor){0}; } else { return command->stroke_color; } @@ -213,8 +211,7 @@ uint16_t gdraw_command_get_radius(GDrawCommand *command) { void gdraw_command_set_path_open(GDrawCommand *command, bool path_open) { if (!command || - ((command->type != GDrawCommandTypePath) && - (command->type != GDrawCommandTypePrecisePath))) { + ((command->type != GDrawCommandTypePath) && (command->type != GDrawCommandTypePrecisePath))) { return; } command->path_open = path_open; @@ -222,8 +219,7 @@ void gdraw_command_set_path_open(GDrawCommand *command, bool path_open) { bool gdraw_command_get_path_open(GDrawCommand *command) { if (!command || - ((command->type != GDrawCommandTypePath) && - (command->type != GDrawCommandTypePrecisePath))) { + ((command->type != GDrawCommandTypePath) && (command->type != GDrawCommandTypePrecisePath))) { return false; } return command->path_open; diff --git a/src/fw/applib/graphics/gdraw_command_frame.c b/src/fw/applib/graphics/gdraw_command_frame.c index 37f80ff72f..2cc6fa1ec9 100644 --- a/src/fw/applib/graphics/gdraw_command_frame.c +++ b/src/fw/applib/graphics/gdraw_command_frame.c @@ -10,8 +10,8 @@ bool gdraw_command_frame_validate(GDrawCommandFrame *frame, size_t size) { if (!frame || (size < sizeof(GDrawCommandFrame))) { return false; } - return gdraw_command_list_validate(&frame->command_list, size - (sizeof(GDrawCommandFrame) - - sizeof(GDrawCommandList))); + return gdraw_command_list_validate(&frame->command_list, + size - (sizeof(GDrawCommandFrame) - sizeof(GDrawCommandList))); } void gdraw_command_frame_draw_processed(GContext *ctx, GDrawCommandSequence *sequence, @@ -60,7 +60,7 @@ size_t gdraw_command_frame_get_data_size(GDrawCommandFrame *frame) { } return sizeof(GDrawCommandFrame) - sizeof(GDrawCommandList) + - gdraw_command_list_get_data_size(&frame->command_list); + gdraw_command_list_get_data_size(&frame->command_list); } GDrawCommandList *gdraw_command_frame_get_command_list(GDrawCommandFrame *frame) { diff --git a/src/fw/applib/graphics/gdraw_command_image.c b/src/fw/applib/graphics/gdraw_command_image.c index 3b1b94c286..90294087b5 100644 --- a/src/fw/applib/graphics/gdraw_command_image.c +++ b/src/fw/applib/graphics/gdraw_command_image.c @@ -21,9 +21,8 @@ GDrawCommandImage *gdraw_command_image_create_with_resource_system(ResAppNum app return NULL; } - GDrawCommandImage *draw_command_image = applib_resource_mmap_or_load(app_num, resource_id, - PDCI_DATA_OFFSET, data_size, - false); + GDrawCommandImage *draw_command_image = + applib_resource_mmap_or_load(app_num, resource_id, PDCI_DATA_OFFSET, data_size, false); // Validate the loaded command image if (!gdraw_command_image_validate(draw_command_image, data_size)) { @@ -64,11 +63,9 @@ void gdraw_command_image_destroy(GDrawCommandImage *image) { } bool gdraw_command_image_validate(GDrawCommandImage *image, size_t size) { - if (!image || - (size < sizeof(GDrawCommandImage)) || - (image->version > GDRAW_COMMAND_VERSION) || - !gdraw_command_list_validate(&image->command_list, size - (sizeof(GDrawCommandImage) - - sizeof(GDrawCommandList)))) { + if (!image || (size < sizeof(GDrawCommandImage)) || (image->version > GDRAW_COMMAND_VERSION) || + !gdraw_command_list_validate(&image->command_list, + size - (sizeof(GDrawCommandImage) - sizeof(GDrawCommandList)))) { return false; } uint8_t *end = (uint8_t *)image + size; @@ -100,8 +97,8 @@ size_t gdraw_command_image_get_data_size(GDrawCommandImage *image) { return 0; } - return sizeof(GDrawCommandImage) - sizeof(GDrawCommandList) - + gdraw_command_list_get_data_size(&image->command_list); + return sizeof(GDrawCommandImage) - sizeof(GDrawCommandList) + + gdraw_command_list_get_data_size(&image->command_list); } GSize gdraw_command_image_get_bounds_size(GDrawCommandImage *image) { diff --git a/src/fw/applib/graphics/gdraw_command_image.h b/src/fw/applib/graphics/gdraw_command_image.h index bbe68f95b1..ff963c12e7 100644 --- a/src/fw/applib/graphics/gdraw_command_image.h +++ b/src/fw/applib/graphics/gdraw_command_image.h @@ -15,7 +15,6 @@ //! @addtogroup DrawCommand Draw Commands //! @{ - struct GDrawCommandImage; //! Draw command images contain a list of commands that can be drawn. An image can be loaded from diff --git a/src/fw/applib/graphics/gdraw_command_list.c b/src/fw/applib/graphics/gdraw_command_list.c index 67a12c6285..38e1293525 100644 --- a/src/fw/applib/graphics/gdraw_command_list.c +++ b/src/fw/applib/graphics/gdraw_command_list.c @@ -38,32 +38,29 @@ void gdraw_command_list_destroy(GDrawCommandList *list) { } static GDrawCommand *prv_next_command(GDrawCommand *command) { - return (GDrawCommand *) (command->points + command->num_points); + return (GDrawCommand *)(command->points + command->num_points); } bool gdraw_command_list_validate(GDrawCommandList *command_list, size_t size) { - if (!command_list || - (size < sizeof(GDrawCommandList)) || - (command_list->num_commands == 0)) { + if (!command_list || (size < sizeof(GDrawCommandList)) || (command_list->num_commands == 0)) { return false; } uint8_t *end = (uint8_t *)command_list + size; GDrawCommand *command = command_list->commands; for (uint32_t i = 0; i < command_list->num_commands; i++) { - if ((end <= (uint8_t *) command) || - !gdraw_command_validate(command, end - (uint8_t *) command)) { + if ((end <= (uint8_t *)command) || !gdraw_command_validate(command, end - (uint8_t *)command)) { return false; } command = prv_next_command(command); } - return ((uint8_t *) command <= end); + return ((uint8_t *)command <= end); } void *gdraw_command_list_iterate_private(GDrawCommandList *command_list, - GDrawCommandListIteratorCb handle_command, - void *callback_context) { + GDrawCommandListIteratorCb handle_command, + void *callback_context) { if (!command_list) { return NULL; } @@ -71,7 +68,7 @@ void *gdraw_command_list_iterate_private(GDrawCommandList *command_list, GDrawCommand *command = command_list->commands; for (uint32_t i = 0; i < command_list->num_commands; i++) { if ((handle_command) && (!handle_command(command, i, callback_context))) { - break; + break; } command = prv_next_command(command); } @@ -79,8 +76,7 @@ void *gdraw_command_list_iterate_private(GDrawCommandList *command_list, } void gdraw_command_list_iterate(GDrawCommandList *command_list, - GDrawCommandListIteratorCb handle_command, - void *callback_context) { + GDrawCommandListIteratorCb handle_command, void *callback_context) { gdraw_command_list_iterate_private(command_list, handle_command, callback_context); } @@ -158,11 +154,11 @@ void gdraw_command_list_draw_processed(GContext *ctx, GDrawCommandList *command_ const size_t max_size = prv_get_list_max_command_size(command_list); GDrawCommandDrawProcessedCBData data = { - .ctx = ctx, - .list = command_list, - .processor = processor, - // malloc because we clear the memory within each iteration of `prv_draw_command_processed` - .processed_draw_command = applib_malloc(max_size) + .ctx = ctx, + .list = command_list, + .processor = processor, + // malloc because we clear the memory within each iteration of `prv_draw_command_processed` + .processed_draw_command = applib_malloc(max_size) }; if (data.processed_draw_command) { @@ -221,16 +217,18 @@ typedef struct { } iter; } CollectPointsCBContext; -_Static_assert((sizeof(GPoint) == sizeof(GPointPrecise)), +_Static_assert( + (sizeof(GPoint) == sizeof(GPointPrecise)), "GPointPrecise cannot be convert to GPoint in-place because of its size difference."); -_Static_assert((offsetof(GPoint, y) == offsetof(GPointPrecise, y)), +_Static_assert( + (offsetof(GPoint, y) == offsetof(GPointPrecise, y)), "GPointPrecise cannot be convert to GPoint in-place because of its member size difference."); static bool prv_collect_points(GDrawCommand *command, uint32_t idx, void *ctx) { CollectPointsCBContext *collect = ctx; - const size_t bytes_copied = gdraw_command_copy_points(command, - &collect->values.points[collect->iter.current_index], collect->iter.bytes_left); + const size_t bytes_copied = gdraw_command_copy_points( + command, &collect->values.points[collect->iter.current_index], collect->iter.bytes_left); const uint16_t num_copied = bytes_copied / sizeof(GPoint); // convert to regular GPoint @@ -257,8 +255,7 @@ static bool prv_collect_points(GDrawCommand *command, uint32_t idx, void *ctx) { } GPoint *gdraw_command_list_collect_points(GDrawCommandList *command_list, bool is_precise, - uint16_t *num_points_out) { - + uint16_t *num_points_out) { const uint16_t num_points = gdraw_command_list_get_num_points(command_list); const size_t max_bytes = num_points * sizeof(GPoint); GPoint *points = applib_malloc(num_points * sizeof(GPoint)); @@ -267,11 +264,12 @@ GPoint *gdraw_command_list_collect_points(GDrawCommandList *command_list, bool i } CollectPointsCBContext ctx = { - .values = { - .points = points, - .is_precise = is_precise, - }, - .iter.bytes_left = max_bytes, + .values = + { + .points = points, + .is_precise = is_precise, + }, + .iter.bytes_left = max_bytes, }; gdraw_command_list_iterate(command_list, prv_collect_points, &ctx); diff --git a/src/fw/applib/graphics/gdraw_command_list.h b/src/fw/applib/graphics/gdraw_command_list.h index 2782f56ff5..fc45a1423b 100644 --- a/src/fw/applib/graphics/gdraw_command_list.h +++ b/src/fw/applib/graphics/gdraw_command_list.h @@ -33,7 +33,7 @@ typedef struct GDrawCommandProcessor GDrawCommandProcessor; typedef void (*GDrawCommandProcessCommand)(GDrawCommandProcessor *processor, GDrawCommand *processed_command, size_t processed_command_max_size, - const GDrawCommandList* list, + const GDrawCommandList *list, const GDrawCommand *command); //! @internal @@ -111,7 +111,7 @@ size_t gdraw_command_list_get_data_size(GDrawCommandList *command_list); //! @param is_precise true to convert to GPointPrecise, otherwise points are converted to GPoint //! @param num_points_out Optional pointer to uint16_t to receive the num points GPoint *gdraw_command_list_collect_points(GDrawCommandList *command_list, bool is_precise, - uint16_t *num_points_out); + uint16_t *num_points_out); bool gdraw_command_list_copy(void *buffer, size_t buffer_length, GDrawCommandList *src); diff --git a/src/fw/applib/graphics/gdraw_command_private.h b/src/fw/applib/graphics/gdraw_command_private.h index b2c8af5402..1d62e94109 100644 --- a/src/fw/applib/graphics/gdraw_command_private.h +++ b/src/fw/applib/graphics/gdraw_command_private.h @@ -26,19 +26,19 @@ #define PDCI_DATA_OFFSET (PDCI_SIZE_OFFSET + sizeof(uint32_t)) struct __attribute__((__packed__)) GDrawCommand { - GDrawCommandType type:8; + GDrawCommandType type : 8; struct { - uint8_t hidden:1; - uint8_t reserved:7; + uint8_t hidden : 1; + uint8_t reserved : 7; }; GColor stroke_color; - uint8_t stroke_width; + uint8_t stroke_width; GColor fill_color; union { - struct { // path + struct { // path bool path_open; }; - struct { // circle + struct { // circle uint16_t radius; }; }; diff --git a/src/fw/applib/graphics/gdraw_command_sequence.c b/src/fw/applib/graphics/gdraw_command_sequence.c index 761a77b2f7..30c83247f1 100644 --- a/src/fw/applib/graphics/gdraw_command_sequence.c +++ b/src/fw/applib/graphics/gdraw_command_sequence.c @@ -8,7 +8,7 @@ #include "applib/applib_resource_private.h" #include "syscall/syscall.h" -#define GDRAW_COMMAND_SEQUENCE_PLAY_COUNT_INFINITE_STORED ((uint16_t) ~0) +#define GDRAW_COMMAND_SEQUENCE_PLAY_COUNT_INFINITE_STORED ((uint16_t)~0) static GDrawCommandFrame *prv_next_frame(GDrawCommandFrame *frame) { // Iterate to the end of the command list (next frame starts immediately afterwards) @@ -27,9 +27,8 @@ GDrawCommandSequence *gdraw_command_sequence_create_with_resource_system(ResAppN return NULL; } - GDrawCommandSequence *draw_command_sequence = applib_resource_mmap_or_load(app_num, resource_id, - PDCS_DATA_OFFSET, - data_size, false); + GDrawCommandSequence *draw_command_sequence = + applib_resource_mmap_or_load(app_num, resource_id, PDCS_DATA_OFFSET, data_size, false); // Validate the loaded command sequence if (!gdraw_command_sequence_validate(draw_command_sequence, data_size)) { @@ -60,24 +59,22 @@ void gdraw_command_sequence_destroy(GDrawCommandSequence *sequence) { } bool gdraw_command_sequence_validate(GDrawCommandSequence *sequence, size_t size) { - if (!sequence || - (size < sizeof(GDrawCommandSequence)) || - (sequence->version > GDRAW_COMMAND_VERSION) || - (sequence->num_frames == 0)) { + if (!sequence || (size < sizeof(GDrawCommandSequence)) || + (sequence->version > GDRAW_COMMAND_VERSION) || (sequence->num_frames == 0)) { return false; } uint8_t *end = (uint8_t *)sequence + size; GDrawCommandFrame *frame = sequence->frames; for (uint32_t i = 0; i < sequence->num_frames; i++) { - if (((uint8_t *) frame >= end) || + if (((uint8_t *)frame >= end) || !gdraw_command_frame_validate(frame, (size_t)(end - (uint8_t *)frame))) { return false; } frame = prv_next_frame(frame); } - return (end == (uint8_t *) frame); + return (end == (uint8_t *)frame); } static uint32_t prv_get_single_play_duration(GDrawCommandSequence *sequence) { diff --git a/src/fw/applib/graphics/gdraw_command_transforms.c b/src/fw/applib/graphics/gdraw_command_transforms.c index 3ee950dcff..bac9050cb2 100644 --- a/src/fw/applib/graphics/gdraw_command_transforms.c +++ b/src/fw/applib/graphics/gdraw_command_transforms.c @@ -31,8 +31,8 @@ T_STATIC bool prv_gdraw_command_scale(GDrawCommand *command, uint32_t index, voi void gdraw_command_list_scale(GDrawCommandList *list, GSize from, GSize to) { ScaleCBContext ctx = { - .from = from, - .to = to, + .from = from, + .to = to, }; gdraw_command_list_iterate(list, prv_gdraw_command_scale, &ctx); } @@ -42,24 +42,22 @@ void gdraw_command_image_scale(GDrawCommandImage *image, GSize to) { image->size = to; } - //////////////////// // attract to square static int16_t prv_int_attract_to(int16_t value, int16_t bounds, int32_t normalized) { - const int16_t delta_0 = (int16_t) ((0 + 1) - value); - const int16_t delta_b = (int16_t) ((bounds - 1) - value); + const int16_t delta_0 = (int16_t)((0 + 1) - value); + const int16_t delta_b = (int16_t)((bounds - 1) - value); const int16_t delta = ABS(delta_0) < ABS(delta_b) ? delta_0 : delta_b; - return (int16_t) (value + delta * normalized / ANIMATION_NORMALIZED_MAX); + return (int16_t)(value + delta * normalized / ANIMATION_NORMALIZED_MAX); } GPoint gpoint_attract_to_square(GPoint point, GSize size, int32_t normalized) { // hacky to square - TODO: implement for real point.y += 1; - point = GPoint( - prv_int_attract_to(point.x, size.w, normalized), - prv_int_attract_to(point.y, size.h, normalized)); + point = GPoint(prv_int_attract_to(point.x, size.w, normalized), + prv_int_attract_to(point.y, size.h, normalized)); return point; } @@ -74,19 +72,18 @@ T_STATIC bool prv_gdraw_command_attract_to_square(GDrawCommand *command, uint32_ ToSquareCBContext *to_square = context; const uint16_t num_points = gdraw_command_get_num_points(command); for (uint16_t i = 0; i < num_points; i++) { - const GSize size = (command->type == GDrawCommandTypePrecisePath) - ? to_square->precise_size : to_square->integer_size; - command->points[i] = gpoint_attract_to_square(command->points[i], - size, to_square->normalized); + const GSize size = (command->type == GDrawCommandTypePrecisePath) ? to_square->precise_size + : to_square->integer_size; + command->points[i] = gpoint_attract_to_square(command->points[i], size, to_square->normalized); } return true; } void gdraw_command_list_attract_to_square(GDrawCommandList *list, GSize size, int32_t normalized) { ToSquareCBContext ctx = { - .integer_size = size, - .precise_size = gsize_scalar_lshift(size, GPOINT_PRECISE_PRECISION), - .normalized = normalized, + .integer_size = size, + .precise_size = gsize_scalar_lshift(size, GPOINT_PRECISE_PRECISION), + .normalized = normalized, }; gdraw_command_list_iterate(list, prv_gdraw_command_attract_to_square, &ctx); } @@ -95,7 +92,6 @@ void gdraw_command_image_attract_to_square(GDrawCommandImage *image, int32_t nor gdraw_command_list_attract_to_square(&image->command_list, image->size, normalized); } - //////////////////// // gpoint index lookup creator @@ -134,18 +130,19 @@ T_STATIC bool prv_gdraw_command_create_point_index_lookup(GDrawCommand *command, } GPointIndexLookup *gdraw_command_list_create_index_lookup(GDrawCommandList *list, - GPointComparator comparator, void *context, bool reverse) { + GPointComparator comparator, + void *context, bool reverse) { uint16_t num_points = 0; const bool is_precise = false; - GPoint * const points = gdraw_command_list_collect_points(list, is_precise, &num_points); + GPoint *const points = gdraw_command_list_collect_points(list, is_precise, &num_points); if (!points) { return NULL; } gpoint_sort(points, num_points, comparator, context, reverse); - GPointIndexLookup *lookup = applib_malloc(sizeof(GPointIndexLookup) - + num_points * sizeof(uint16_t)); + GPointIndexLookup *lookup = + applib_malloc(sizeof(GPointIndexLookup) + num_points * sizeof(uint16_t)); if (!lookup) { applib_free(points); return lookup; @@ -155,13 +152,14 @@ GPointIndexLookup *gdraw_command_list_create_index_lookup(GDrawCommandList *list lookup->max_index = num_points - 1; GPointCreateIndexCBContext ctx = { - .values = { - .points = points, - .num_points = num_points, - }, - .iter = { - .lookup = lookup, - }, + .values = + { + .points = points, + .num_points = num_points, + }, + .iter = { + .lookup = lookup, + }, }; gdraw_command_list_iterate(list, prv_gdraw_command_create_point_index_lookup, &ctx); @@ -174,30 +172,30 @@ typedef struct { const int32_t angle; } AngleComparatorContext; -static int prv_angle_comparator(const GPoint * const a, const GPoint * const b, - void *context) { +static int prv_angle_comparator(const GPoint *const a, const GPoint *const b, void *context) { AngleComparatorContext *ctx = context; - const int16_t angle_a = ABS(positive_modulo( - (atan2_lookup(a->y - ctx->origin.y, a->x - ctx->origin.x) + ctx->angle), TRIG_MAX_ANGLE) - - TRIG_MAX_ANGLE / 2); - const int16_t angle_b = ABS(positive_modulo( - (atan2_lookup(b->y - ctx->origin.y, b->x - ctx->origin.x) + ctx->angle), TRIG_MAX_ANGLE) - - TRIG_MAX_ANGLE / 2); + const int16_t angle_a = + ABS(positive_modulo((atan2_lookup(a->y - ctx->origin.y, a->x - ctx->origin.x) + ctx->angle), + TRIG_MAX_ANGLE) - + TRIG_MAX_ANGLE / 2); + const int16_t angle_b = + ABS(positive_modulo((atan2_lookup(b->y - ctx->origin.y, b->x - ctx->origin.x) + ctx->angle), + TRIG_MAX_ANGLE) - + TRIG_MAX_ANGLE / 2); return (angle_a > angle_b ? 1 : -1); } GPointIndexLookup *gdraw_command_list_create_index_lookup_by_angle(GDrawCommandList *list, GPoint origin, int32_t angle) { AngleComparatorContext ctx = { - .origin = origin, - .angle = angle, + .origin = origin, + .angle = angle, }; return gdraw_command_list_create_index_lookup(list, prv_angle_comparator, &ctx, false); } -static int prv_distance_comparator(const GPoint * const a, const GPoint * const b, - void *context) { - const GPoint * const target = context; +static int prv_distance_comparator(const GPoint *const a, const GPoint *const b, void *context) { + const GPoint *const target = context; uint32_t distance_a = gpoint_distance_squared(*a, *target); uint32_t distance_b = gpoint_distance_squared(*b, *target); return (distance_a > distance_b ? 1 : -1); @@ -226,8 +224,8 @@ void gpoint_index_lookup_add_at(GPointIndexLookup *lookup, int delay_index, int void gpoint_index_lookup_set_groups(GPointIndexLookup *lookup, int num_groups, Fixed_S32_16 group_delay) { const int num_points_per_group = lookup->num_points / num_groups; - const int delay_per_group = (num_points_per_group / group_delay.raw_value) / - FIXED_S32_16_ONE.raw_value; + const int delay_per_group = + (num_points_per_group / group_delay.raw_value) / FIXED_S32_16_ONE.raw_value; const int group_delay_amount = num_points_per_group + delay_per_group; for (uint16_t i = num_groups - 1; i >= 1; i--) { gpoint_index_lookup_add_at(lookup, (i * num_points_per_group), group_delay_amount); @@ -237,18 +235,18 @@ void gpoint_index_lookup_set_groups(GPointIndexLookup *lookup, int num_groups, //////////////////// // segmented scale: index based segmentation of scale + transform -static int16_t prv_int_scale_to( - int16_t value, int16_t size, int16_t from_range, int16_t to_range, int32_t normalized, - InterpolateInt64Function interpolate) { - return value + ((int32_t) value * interpolate( - normalized, from_range - size, to_range - size)) / size; +static int16_t prv_int_scale_to(int16_t value, int16_t size, int16_t from_range, int16_t to_range, + int32_t normalized, InterpolateInt64Function interpolate) { + return value + + ((int32_t)value * interpolate(normalized, from_range - size, to_range - size)) / size; } -T_STATIC int16_t prv_int_scale_and_translate_to( - int16_t value, int16_t size, int16_t from_range, int16_t to_range, - int16_t from_min, int16_t to_min, int32_t normalized, InterpolateInt64Function interpolate) { - const int32_t scale = prv_int_scale_to(value, size, from_range, to_range, normalized, - interpolate); +T_STATIC int16_t prv_int_scale_and_translate_to(int16_t value, int16_t size, int16_t from_range, + int16_t to_range, int16_t from_min, int16_t to_min, + int32_t normalized, + InterpolateInt64Function interpolate) { + const int32_t scale = + prv_int_scale_to(value, size, from_range, to_range, normalized, interpolate); const int32_t translate = interpolate(normalized, from_min, to_min); return scale + translate; } @@ -256,10 +254,10 @@ T_STATIC int16_t prv_int_scale_and_translate_to( GPoint gpoint_scale_to(GPoint point, GSize size, GRect from, GRect to, int32_t normalized, InterpolateInt64Function interpolate) { return GPoint( - prv_int_scale_and_translate_to(point.x, size.w, from.size.w, to.size.w, - from.origin.x, to.origin.x, normalized, interpolate), - prv_int_scale_and_translate_to(point.y, size.h, from.size.h, to.size.h, - from.origin.y, to.origin.y, normalized, interpolate)); + prv_int_scale_and_translate_to(point.x, size.w, from.size.w, to.size.w, from.origin.x, + to.origin.x, normalized, interpolate), + prv_int_scale_and_translate_to(point.y, size.h, from.size.h, to.size.h, from.origin.y, + to.origin.y, normalized, interpolate)); } typedef struct { @@ -294,8 +292,9 @@ T_STATIC int64_t prv_default_interpolate(int32_t normalized, int64_t from, int64 T_STATIC bool prv_gdraw_command_scale_segmented(GDrawCommand *command, uint32_t index, void *context) { ScaleToCBContext *scale = context; - const ScaleToGValues * const gvalues = (command->type == GDrawCommandTypePrecisePath) - ? &scale->values.precise : &scale->values.integer; + const ScaleToGValues *const gvalues = (command->type == GDrawCommandTypePrecisePath) + ? &scale->values.precise + : &scale->values.integer; const uint16_t num_points = gdraw_command_get_num_points(command); for (uint16_t i = 0; i < num_points; i++) { @@ -310,11 +309,11 @@ T_STATIC bool prv_gdraw_command_scale_segmented(GDrawCommand *command, uint32_t scale->values.normalized, point_index, scale->values.lookup->max_index + 1, scale->values.duration_fraction); - const InterpolateInt64Function interpolate = scale->values.interpolate ? - scale->values.interpolate : prv_default_interpolate; + const InterpolateInt64Function interpolate = + scale->values.interpolate ? scale->values.interpolate : prv_default_interpolate; - point = gpoint_scale_to(point, gvalues->size, gvalues->from, gvalues->to, normalized, - interpolate); + point = + gpoint_scale_to(point, gvalues->size, gvalues->from, gvalues->to, normalized, interpolate); if (scale->values.is_offset) { gpoint_add_eq(&point, gvalues->offset); @@ -327,10 +326,11 @@ T_STATIC bool prv_gdraw_command_scale_segmented(GDrawCommand *command, uint32_t return true; } -void gdraw_command_list_scale_segmented_to( - GDrawCommandList *list, GSize size, GRect from, GRect to, AnimationProgress normalized, - InterpolateInt64Function interpolate, GPointIndexLookup *lookup, Fixed_S32_16 duration_fraction, - bool is_offset) { +void gdraw_command_list_scale_segmented_to(GDrawCommandList *list, GSize size, GRect from, GRect to, + AnimationProgress normalized, + InterpolateInt64Function interpolate, + GPointIndexLookup *lookup, + Fixed_S32_16 duration_fraction, bool is_offset) { GPoint offset = GPointZero; if (is_offset) { offset = from.origin; @@ -339,40 +339,41 @@ void gdraw_command_list_scale_segmented_to( } ScaleToCBContext ctx = { - .values = { - .integer = { - .from = from, - .to = to, - .size = size, - .offset = offset, + .values = { + .integer = + { + .from = from, + .to = to, + .size = size, + .offset = offset, + }, + .precise = + { + .from = grect_scalar_lshift(from, GPOINT_PRECISE_PRECISION), + .to = grect_scalar_lshift(to, GPOINT_PRECISE_PRECISION), + .size = gsize_scalar_lshift(size, GPOINT_PRECISE_PRECISION), + .offset = gpoint_scalar_lshift(offset, GPOINT_PRECISE_PRECISION), + }, + .duration_fraction = duration_fraction, + .lookup = lookup, + .normalized = normalized, + .interpolate = interpolate, + .is_offset = is_offset, }, - .precise = { - .from = grect_scalar_lshift(from, GPOINT_PRECISE_PRECISION), - .to = grect_scalar_lshift(to, GPOINT_PRECISE_PRECISION), - .size = gsize_scalar_lshift(size, GPOINT_PRECISE_PRECISION), - .offset = gpoint_scalar_lshift(offset, GPOINT_PRECISE_PRECISION), - }, - .duration_fraction = duration_fraction, - .lookup = lookup, - .normalized = normalized, - .interpolate = interpolate, - .is_offset = is_offset, - }, }; gdraw_command_list_iterate(list, prv_gdraw_command_scale_segmented, &ctx); } -void gdraw_command_image_scale_segmented_to( - GDrawCommandImage *image, GRect from, GRect to, AnimationProgress normalized, - InterpolateInt64Function interpolate, GPointIndexLookup *lookup, Fixed_S32_16 duration_fraction, - bool is_offset) { - gdraw_command_list_scale_segmented_to( - &image->command_list, image->size, from, to, normalized, interpolate, lookup, - duration_fraction, is_offset); +void gdraw_command_image_scale_segmented_to(GDrawCommandImage *image, GRect from, GRect to, + AnimationProgress normalized, + InterpolateInt64Function interpolate, + GPointIndexLookup *lookup, + Fixed_S32_16 duration_fraction, bool is_offset) { + gdraw_command_list_scale_segmented_to(&image->command_list, image->size, from, to, normalized, + interpolate, lookup, duration_fraction, is_offset); image->size = to.size; } - //////////////////// // scale stroke width @@ -406,10 +407,9 @@ static bool prv_gdraw_command_scale_stroke_width(GDrawCommand *command, uint32_t const Fixed_S16_3 stroke_width = Fixed_S16_3(gdraw_command_get_stroke_width(command) << FIXED_S16_3_PRECISION); - Fixed_S16_3 from_stroke_width = prv_stroke_width_transform(stroke_width, scale->from, - scale->from_op); - Fixed_S16_3 to_stroke_width = prv_stroke_width_transform(stroke_width, scale->to, - scale->to_op); + Fixed_S16_3 from_stroke_width = + prv_stroke_width_transform(stroke_width, scale->from, scale->from_op); + Fixed_S16_3 to_stroke_width = prv_stroke_width_transform(stroke_width, scale->to, scale->to_op); const uint16_t new_stroke_width = interpolate_int64_linear( scale->progress, from_stroke_width.raw_value, to_stroke_width.raw_value); @@ -423,11 +423,11 @@ void gdraw_command_list_scale_stroke_width(GDrawCommandList *list, Fixed_S16_3 f GStrokeWidthOp from_op, GStrokeWidthOp to_op, AnimationProgress progress) { ScaleStrokeWidthCBContext ctx = { - .from = from, - .to = to, - .from_op = from_op, - .to_op = to_op, - .progress = progress, + .from = from, + .to = to, + .from_op = from_op, + .to_op = to_op, + .progress = progress, }; gdraw_command_list_iterate(list, prv_gdraw_command_scale_stroke_width, &ctx); } @@ -438,7 +438,6 @@ void gdraw_command_image_scale_stroke_width(GDrawCommandImage *image, Fixed_S16_ gdraw_command_list_scale_stroke_width(&image->command_list, from, to, from_op, to_op, progress); } - //////////////////// // replace color diff --git a/src/fw/applib/graphics/gdraw_command_transforms.h b/src/fw/applib/graphics/gdraw_command_transforms.h index e64277b606..96627fda65 100644 --- a/src/fw/applib/graphics/gdraw_command_transforms.h +++ b/src/fw/applib/graphics/gdraw_command_transforms.h @@ -117,10 +117,11 @@ void gpoint_index_lookup_set_groups(GPointIndexLookup *lookup, int num_groups, //! this prevents the transform from scaling the translation already present in the command list //! equivalent to `from.origin`. //! @see GPointIndexLookup -void gdraw_command_list_scale_segmented_to( - GDrawCommandList *list, GSize size, GRect from, GRect to, AnimationProgress normalized, - InterpolateInt64Function interpolate, GPointIndexLookup *lookup, Fixed_S32_16 duration_fraction, - bool is_offset); +void gdraw_command_list_scale_segmented_to(GDrawCommandList *list, GSize size, GRect from, GRect to, + AnimationProgress normalized, + InterpolateInt64Function interpolate, + GPointIndexLookup *lookup, + Fixed_S32_16 duration_fraction, bool is_offset); //! Performs a scaling and translation transform on an image with each point being delayed by delay //! segments assigned based on a GPointIndexLookup. @@ -136,10 +137,11 @@ void gdraw_command_list_scale_segmented_to( //! this prevents the transform from scaling the translation already present in the command list //! equivalent to `from.origin`. //! @see GPointIndexLookup -void gdraw_command_image_scale_segmented_to( - GDrawCommandImage *image, GRect from, GRect to, AnimationProgress normalized, - InterpolateInt64Function interpolate, GPointIndexLookup *lookup, Fixed_S32_16 duration_fraction, - bool is_offset); +void gdraw_command_image_scale_segmented_to(GDrawCommandImage *image, GRect from, GRect to, + AnimationProgress normalized, + InterpolateInt64Function interpolate, + GPointIndexLookup *lookup, + Fixed_S32_16 duration_fraction, bool is_offset); //! Scales and translates a GPoint. //! @param point Point to transform. diff --git a/src/fw/applib/graphics/gpath.c b/src/fw/applib/graphics/gpath.c index e6d87436fb..ee37d6556a 100644 --- a/src/fw/applib/graphics/gpath.c +++ b/src/fw/applib/graphics/gpath.c @@ -31,12 +31,12 @@ void gpath_init(GPath *path, const GPathInfo *init) { path->points = init->points; } -GPath* gpath_create(const GPathInfo *init) { +GPath *gpath_create(const GPathInfo *init) { // Can't pad this out because the definition itself is exported. Even if we did pad it out so - // we can theoretically add members to the end of the struct, we'll still have to add compatibility - // flags throughout here to check which size of struct the app is going to pass us through these - // APIs. - GPath* path = applib_malloc(sizeof(GPath)); + // we can theoretically add members to the end of the struct, we'll still have to add + // compatibility flags throughout here to check which size of struct the app is going to pass us + // through these APIs. + GPath *path = applib_malloc(sizeof(GPath)); if (path) { gpath_init(path, init); } else { @@ -45,7 +45,7 @@ GPath* gpath_create(const GPathInfo *init) { return path; } -void gpath_destroy(GPath* gpath) { +void gpath_destroy(GPath *gpath) { applib_free(gpath); } @@ -53,14 +53,16 @@ static GPoint rotate_offset_point(const GPoint *orig, int32_t rotation, const GP int32_t cosine = cos_lookup(rotation); int32_t sine = sin_lookup(rotation); GPoint result; - result.x = (int32_t)orig->x * cosine / TRIG_MAX_RATIO - (int32_t)orig->y * sine / TRIG_MAX_RATIO + offset->x; - result.y = (int32_t)orig->y * cosine / TRIG_MAX_RATIO + (int32_t)orig->x * sine / TRIG_MAX_RATIO + offset->y; + result.x = (int32_t)orig->x * cosine / TRIG_MAX_RATIO - (int32_t)orig->y * sine / TRIG_MAX_RATIO + + offset->x; + result.y = (int32_t)orig->y * cosine / TRIG_MAX_RATIO + (int32_t)orig->x * sine / TRIG_MAX_RATIO + + offset->y; return result; } static void sort16(int16_t *values, size_t length) { for (unsigned int i = 0; i < length; i++) { - for (unsigned int j = i+1; j < length; j++) { + for (unsigned int j = i + 1; j < length; j++) { if (values[i] > values[j]) { swap16(&values[i], &values[j]); } @@ -77,7 +79,7 @@ static void swapIntersections(Intersection *a, Intersection *b) { static void sortIntersections(Intersection *values, size_t length) { for (unsigned int i = 0; i < length; i++) { - for (unsigned int j = i+1; j < length; j++) { + for (unsigned int j = i + 1; j < length; j++) { if (values[i].x.raw_value > values[j].x.raw_value) { swapIntersections(&values[i], &values[j]); } @@ -90,11 +92,9 @@ static inline bool prv_is_in_range(int16_t min_a, int16_t max_a, int16_t min_b, return (max_a >= min_b) && (min_a <= max_b); } -static void prv_gpath_draw_filled_cb(GContext *ctx, int16_t y, - Fixed_S16_3 x_range_begin, Fixed_S16_3 x_range_end, - Fixed_S16_3 delta_begin, Fixed_S16_3 delta_end, - void *user_data) { - +static void prv_gpath_draw_filled_cb(GContext *ctx, int16_t y, Fixed_S16_3 x_range_begin, + Fixed_S16_3 x_range_end, Fixed_S16_3 delta_begin, + Fixed_S16_3 delta_end, void *user_data) { #if PBL_COLOR // We know that correct delta is always positive, and treat that as an input from // antialiased function, otherwise its treated as non-AA @@ -102,17 +102,18 @@ static void prv_gpath_draw_filled_cb(GContext *ctx, int16_t y, x_range_begin.integer++; x_range_end.integer--; - graphics_private_draw_horizontal_line_delta_aa( - ctx, y, x_range_begin, x_range_end, delta_begin, delta_end); + graphics_private_draw_horizontal_line_delta_aa(ctx, y, x_range_begin, x_range_end, delta_begin, + delta_end); return; } #endif - graphics_fill_rect( - ctx, &(GRect) { { x_range_begin.integer + 1, y }, - { x_range_end.integer - x_range_begin.integer - 1, 1 } }); + graphics_fill_rect(ctx, &(GRect){ + {x_range_begin.integer + 1, y}, + {x_range_end.integer - x_range_begin.integer - 1, 1} + }); } -void gpath_draw_filled(GContext* ctx, GPath* path) { +void gpath_draw_filled(GContext *ctx, GPath *path) { #if PBL_COLOR // This algorithm makes sense only in 8bit mode... if (ctx->draw_state.antialiased) { @@ -124,15 +125,15 @@ void gpath_draw_filled(GContext* ctx, GPath* path) { gpath_draw_filled_with_cb(ctx, path, prv_gpath_draw_filled_cb, NULL); } -void gpath_draw_outline(GContext* ctx, GPath* path) { +void gpath_draw_outline(GContext *ctx, GPath *path) { gpath_draw_stroke(ctx, path, false); } -void gpath_draw_outline_open(GContext* ctx, GPath* path) { +void gpath_draw_outline_open(GContext *ctx, GPath *path) { gpath_draw_stroke(ctx, path, true); } -void gpath_draw_stroke(GContext* ctx, GPath* path, bool open) { +void gpath_draw_stroke(GContext *ctx, GPath *path, bool open) { if (!path || path->num_points < 2) { return; } @@ -219,13 +220,12 @@ void prv_fill_path_with_cb_aa(GContext *ctx, GPath *path, GPathDrawFilledCallbac * + Gradients too close to clipping rect will be properly cut off */ - // Protect against apps calling with no points to draw (Upright watchface) if (!path || path->num_points < 2) { return; } - GPointPrecise* rot_points = applib_malloc(path->num_points * sizeof(GPointPrecise)); + GPointPrecise *rot_points = applib_malloc(path->num_points * sizeof(GPointPrecise)); if (!rot_points) { return; } @@ -237,8 +237,8 @@ void prv_fill_path_with_cb_aa(GContext *ctx, GPath *path, GPathDrawFilledCallbac Intersection *intersections_up = NULL; Intersection *intersections_down = NULL; - rot_points[0] = rot_end = GPointPreciseFromGPoint( - rotate_offset_point(&path->points[0], path->rotation, &path->offset)); + rot_points[0] = rot_end = + GPointPreciseFromGPoint(rotate_offset_point(&path->points[0], path->rotation, &path->offset)); min_x = max_x = rot_points[0].x.integer; min_y = max_y = rot_points[0].y.integer; @@ -247,10 +247,18 @@ void prv_fill_path_with_cb_aa(GContext *ctx, GPath *path, GPathDrawFilledCallbac for (int i = path->num_points - 1; i > 0; --i) { rot_points[i] = rot_start = GPointPreciseFromGPoint( rotate_offset_point(&path->points[i], path->rotation, &path->offset)); - if (min_x > rot_points[i].x.integer) { min_x = rot_points[i].x.integer; } - if (max_x < rot_points[i].x.integer) { max_x = rot_points[i].x.integer; } - if (min_y > rot_points[i].y.integer) { min_y = rot_points[i].y.integer; } - if (max_y < rot_points[i].y.integer) { max_y = rot_points[i].y.integer; } + if (min_x > rot_points[i].x.integer) { + min_x = rot_points[i].x.integer; + } + if (max_x < rot_points[i].x.integer) { + max_x = rot_points[i].x.integer; + } + if (min_y > rot_points[i].y.integer) { + min_y = rot_points[i].y.integer; + } + if (max_y < rot_points[i].y.integer) { + max_y = rot_points[i].y.integer; + } if (found_start_direction) { continue; @@ -265,8 +273,8 @@ void prv_fill_path_with_cb_aa(GContext *ctx, GPath *path, GPathDrawFilledCallbac rot_end = rot_start; } - const int16_t clip_min_x = ctx->draw_state.clip_box.origin.x - - ctx->draw_state.drawing_box.origin.x; + const int16_t clip_min_x = + ctx->draw_state.clip_box.origin.x - ctx->draw_state.drawing_box.origin.x; const int16_t clip_max_x = ctx->draw_state.clip_box.size.w + clip_min_x; if (!prv_is_in_range(min_x, max_x, clip_min_x, clip_max_x)) { goto cleanup; @@ -287,8 +295,8 @@ void prv_fill_path_with_cb_aa(GContext *ctx, GPath *path, GPathDrawFilledCallbac int intersection_down_count; // convert clip coordinates to drawing coordinates - const int16_t clip_min_y = ctx->draw_state.clip_box.origin.y - - ctx->draw_state.drawing_box.origin.y; + const int16_t clip_min_y = + ctx->draw_state.clip_box.origin.y - ctx->draw_state.drawing_box.origin.y; const int16_t clip_max_y = ctx->draw_state.clip_box.size.h + clip_min_y; min_y = MAX(min_y, clip_min_y); max_y = MIN(max_y, clip_max_y); @@ -321,8 +329,9 @@ void prv_fill_path_with_cb_aa(GContext *ctx, GPath *path, GPathDrawFilledCallbac // if the line is on/crosses this height if ((rot_start.y.integer - i) * (rot_end.y.integer - i) <= 0) { - bool is_down = rot_end.y.integer != rot_start.y.integer ? - rot_end.y.integer > rot_start.y.integer : last_is_down; + bool is_down = rot_end.y.integer != rot_start.y.integer + ? rot_end.y.integer > rot_start.y.integer + : last_is_down; // don't count end points in the same direction to avoid double intersections if (!(rot_start.y.integer == i && last_is_down == is_down)) { // linear interpolation of the line intersection @@ -330,18 +339,21 @@ void prv_fill_path_with_cb_aa(GContext *ctx, GPath *path, GPathDrawFilledCallbac int16_t delta_x = rot_end.x.raw_value - rot_start.x.raw_value; int16_t delta_y = rot_end.y.raw_value - rot_start.y.raw_value; - Fixed_S16_3 x = (Fixed_S16_3){.raw_value = rot_start.x.raw_value + delta_x - * (i * FIXED_S16_3_ONE.raw_value - rot_start.y.raw_value) / delta_y}; + Fixed_S16_3 x = (Fixed_S16_3){ + .raw_value = + rot_start.x.raw_value + + delta_x * (i * FIXED_S16_3_ONE.raw_value - rot_start.y.raw_value) / delta_y + }; - Fixed_S16_3 delta = (Fixed_S16_3){.raw_value = ABS(delta_x / delta_y) * - FIXED_S16_3_ONE.raw_value}; + Fixed_S16_3 delta = + (Fixed_S16_3){.raw_value = ABS(delta_x / delta_y) * FIXED_S16_3_ONE.raw_value}; if (delta.integer > 1) { // this is where we try to fix edges diving in and out of paths - int16_t min_x = rot_end.x.raw_value < rot_start.x.raw_value ? - rot_end.x.raw_value : rot_start.x.raw_value; - int16_t max_x = rot_end.x.raw_value > rot_start.x.raw_value ? - rot_end.x.raw_value : rot_start.x.raw_value; + int16_t min_x = rot_end.x.raw_value < rot_start.x.raw_value ? rot_end.x.raw_value + : rot_start.x.raw_value; + int16_t max_x = rot_end.x.raw_value > rot_start.x.raw_value ? rot_end.x.raw_value + : rot_start.x.raw_value; if (x.raw_value - (delta.raw_value / 2) < min_x) { delta.raw_value = (x.raw_value - min_x) * 2; @@ -395,16 +407,16 @@ void prv_fill_path_with_cb_aa(GContext *ctx, GPath *path, GPathDrawFilledCallbac applib_free(intersections_up); applib_free(intersections_down); } -#endif // PBL_COLOR +#endif // PBL_COLOR void gpath_draw_filled_with_cb(GContext *ctx, GPath *path, GPathDrawFilledCallback cb, void *user_data) { - //Protect against apps calling with no points to draw (Upright watchface) + // Protect against apps calling with no points to draw (Upright watchface) if (!path || path->num_points < 2) { return; } - GPoint* rot_points = applib_malloc(path->num_points * sizeof(GPoint)); + GPoint *rot_points = applib_malloc(path->num_points * sizeof(GPoint)); if (!rot_points) { APP_LOG(APP_LOG_LEVEL_ERROR, GPATH_ERROR); return; @@ -424,11 +436,20 @@ void gpath_draw_filled_with_cb(GContext *ctx, GPath *path, GPathDrawFilledCallba // begin finding the last path segment's direction going backwards through the path // we must go backwards because we find intersections going forwards for (int i = path->num_points - 1; i > 0; --i) { - rot_points[i] = rot_start = rotate_offset_point(&path->points[i], path->rotation, &path->offset); - if (min_x > rot_points[i].x) { min_x = rot_points[i].x; } - if (max_x < rot_points[i].x) { max_x = rot_points[i].x; } - if (min_y > rot_points[i].y) { min_y = rot_points[i].y; } - if (max_y < rot_points[i].y) { max_y = rot_points[i].y; } + rot_points[i] = rot_start = + rotate_offset_point(&path->points[i], path->rotation, &path->offset); + if (min_x > rot_points[i].x) { + min_x = rot_points[i].x; + } + if (max_x < rot_points[i].x) { + max_x = rot_points[i].x; + } + if (min_y > rot_points[i].y) { + min_y = rot_points[i].y; + } + if (max_y < rot_points[i].y) { + max_y = rot_points[i].y; + } if (found_start_direction) { continue; @@ -443,9 +464,8 @@ void gpath_draw_filled_with_cb(GContext *ctx, GPath *path, GPathDrawFilledCallba rot_end = rot_start; } - - const int16_t clip_min_x = ctx->draw_state.clip_box.origin.x - - ctx->draw_state.drawing_box.origin.x; + const int16_t clip_min_x = + ctx->draw_state.clip_box.origin.x - ctx->draw_state.drawing_box.origin.x; const int16_t clip_max_x = ctx->draw_state.clip_box.size.w + clip_min_x; if (!prv_is_in_range(min_x, max_x, clip_min_x, clip_max_x)) { goto cleanup; @@ -465,8 +485,8 @@ void gpath_draw_filled_with_cb(GContext *ctx, GPath *path, GPathDrawFilledCallba int intersection_up_count; int intersection_down_count; - const int16_t clip_min_y = ctx->draw_state.clip_box.origin.y - - ctx->draw_state.drawing_box.origin.y; + const int16_t clip_min_y = + ctx->draw_state.clip_box.origin.y - ctx->draw_state.drawing_box.origin.y; const int16_t clip_max_y = ctx->draw_state.clip_box.size.h + clip_min_y; min_y = MAX(min_y, clip_min_y); max_y = MIN(max_y, clip_max_y); @@ -477,8 +497,8 @@ void gpath_draw_filled_with_cb(GContext *ctx, GPath *path, GPathDrawFilledCallba intersection_down_count = 0; intersection_up_count = 0; - // horizontal path segments don't have a direction and depend upon the last path segment's direction - // keep track of the last path direction for horizontal path segments to use + // horizontal path segments don't have a direction and depend upon the last path segment's + // direction keep track of the last path direction for horizontal path segments to use bool last_is_down = start_is_down; rot_end = rot_points[0]; @@ -498,7 +518,8 @@ void gpath_draw_filled_with_cb(GContext *ctx, GPath *path, GPathDrawFilledCallba // don't count end points in the same direction to avoid double intersections if (!(rot_start.y == i && last_is_down == is_down)) { // linear interpolation of the line intersection - int16_t x = rot_start.x + (rot_end.x - rot_start.x) * (i - rot_start.y) / (rot_end.y - rot_start.y); + int16_t x = rot_start.x + + (rot_end.x - rot_start.x) * (i - rot_start.y) / (rot_end.y - rot_start.y); if (is_down) { intersections_down[intersection_down_count] = x; intersection_down_count++; @@ -550,10 +571,7 @@ void gpath_fill_precise_internal(GContext *ctx, GPointPrecise *points, size_t nu for (size_t i = 0; i < num_points; i++) { imprecise_points[i] = GPointFromGPointPrecise(points[i]); } - GPath path = { - .num_points = (uint32_t)num_points, - .points = imprecise_points - }; + GPath path = {.num_points = (uint32_t)num_points, .points = imprecise_points}; gpath_draw_filled(ctx, &path); applib_free(imprecise_points); diff --git a/src/fw/applib/graphics/gpath.h b/src/fw/applib/graphics/gpath.h index 376be6778b..70ccd1abd6 100644 --- a/src/fw/applib/graphics/gpath.h +++ b/src/fw/applib/graphics/gpath.h @@ -79,17 +79,17 @@ void gpath_init(GPath *path, const GPathInfo *init); //! * `offset`: (0, 0) //! @return A pointer to the GPath. `NULL` if the GPath could not //! be created -GPath* gpath_create(const GPathInfo *init); +GPath *gpath_create(const GPathInfo *init); //! Free a dynamically allocated gpath created with \ref gpath_create() -void gpath_destroy(GPath* gpath); +void gpath_destroy(GPath *gpath); //! Draws the fill of a path into a graphics context, using the current fill color, //! relative to the drawing area as set up by the layering system. //! @param ctx The graphics context to draw into //! @param path The path to fill //! @see \ref graphics_context_set_fill_color() -void gpath_draw_filled(GContext* ctx, GPath *path); +void gpath_draw_filled(GContext *ctx, GPath *path); //! Draws the outline of a path into a graphics context, using the current stroke color and //! width, relative to the drawing area as set up by the layering system. The first and last points @@ -98,7 +98,7 @@ void gpath_draw_filled(GContext* ctx, GPath *path); //! @param path The path to draw //! @see \ref graphics_context_set_stroke_color() //! @see \ref gpath_draw_outline_open() -void gpath_draw_outline(GContext* ctx, GPath *path); +void gpath_draw_outline(GContext *ctx, GPath *path); //! Draws an open outline of a path into a graphics context, using the current stroke color and //! width, relative to the drawing area as set up by the layering system. The first and last points @@ -107,7 +107,7 @@ void gpath_draw_outline(GContext* ctx, GPath *path); //! @param path The path to draw //! @see \ref graphics_context_set_stroke_color() //! @see \ref gpath_draw_outline() -void gpath_draw_outline_open(GContext* ctx, GPath* path); +void gpath_draw_outline_open(GContext *ctx, GPath *path); //! @internal //! Draws a stroke following a path into a graphics context, using the current stroke color and @@ -116,7 +116,7 @@ void gpath_draw_outline_open(GContext* ctx, GPath* path); //! @param path The path to draw //! @param open true if path must be left open (not closed between first and last points) //! @see \ref graphics_context_set_stroke_color() -void gpath_draw_stroke(GContext* ctx, GPath *path, bool open); +void gpath_draw_stroke(GContext *ctx, GPath *path, bool open); //! Sets the absolute rotation of the path. //! The current rotation will be replaced by the specified angle. @@ -169,9 +169,9 @@ GRect gpath_outer_rect(GPath *path); //! @param delta_begin Delta of the line crossing x_range_begin - negative if no AA //! @param delta_end Delta of the line crossing x_range_end - negative if no AA //! @param user_data User data for extra data the callback may require -typedef void (*GPathDrawFilledCallback)( - GContext *ctx, int16_t y, Fixed_S16_3 x_range_begin, Fixed_S16_3 x_range_end, - Fixed_S16_3 delta_begin, Fixed_S16_3 delta_end, void *user_data); +typedef void (*GPathDrawFilledCallback)(GContext *ctx, int16_t y, Fixed_S16_3 x_range_begin, + Fixed_S16_3 x_range_end, Fixed_S16_3 delta_begin, + Fixed_S16_3 delta_end, void *user_data); //! @internal //! Allows for customized drawing of a GContext's drawing_box with a GPath defining "inside" and diff --git a/src/fw/applib/graphics/gpath_builder.c b/src/fw/applib/graphics/gpath_builder.c index e843a5c8c4..59a1d38598 100644 --- a/src/fw/applib/graphics/gpath_builder.c +++ b/src/fw/applib/graphics/gpath_builder.c @@ -13,32 +13,30 @@ const int fixedpoint_base = 16; // Angle below which we're not going to process with recursion int32_t max_angle_tolerance = (TRIG_MAX_ANGLE / 360) * 10; -bool recursive_bezier_fixed(GPathBuilder *builder, - int32_t x1, int32_t y1, - int32_t x2, int32_t y2, - int32_t x3, int32_t y3, - int32_t x4, int32_t y4) { +bool recursive_bezier_fixed(GPathBuilder *builder, int32_t x1, int32_t y1, int32_t x2, int32_t y2, + int32_t x3, int32_t y3, int32_t x4, int32_t y4) { // Calculate all the mid-points of the line segments - int32_t x12 = (x1 + x2) / 2; - int32_t y12 = (y1 + y2) / 2; - int32_t x23 = (x2 + x3) / 2; - int32_t y23 = (y2 + y3) / 2; - int32_t x34 = (x3 + x4) / 2; - int32_t y34 = (y3 + y4) / 2; - int32_t x123 = (x12 + x23) / 2; - int32_t y123 = (y12 + y23) / 2; - int32_t x234 = (x23 + x34) / 2; - int32_t y234 = (y23 + y34) / 2; + int32_t x12 = (x1 + x2) / 2; + int32_t y12 = (y1 + y2) / 2; + int32_t x23 = (x2 + x3) / 2; + int32_t y23 = (y2 + y3) / 2; + int32_t x34 = (x3 + x4) / 2; + int32_t y34 = (y3 + y4) / 2; + int32_t x123 = (x12 + x23) / 2; + int32_t y123 = (y12 + y23) / 2; + int32_t x234 = (x23 + x34) / 2; + int32_t y234 = (y23 + y34) / 2; int32_t x1234 = (x123 + x234) / 2; int32_t y1234 = (y123 + y234) / 2; // Angle Condition - int32_t a23 = atan2_lookup((int16_t)((y3 - y2) / fixedpoint_base), - (int16_t)((x3 - x2) / fixedpoint_base)); + int32_t a23 = + atan2_lookup((int16_t)((y3 - y2) / fixedpoint_base), (int16_t)((x3 - x2) / fixedpoint_base)); int32_t da1 = abs(a23 - atan2_lookup((int16_t)((y2 - y1) / fixedpoint_base), (int16_t)((x2 - x1) / fixedpoint_base))); - int32_t da2 = abs(atan2_lookup((int16_t)((y4 - y3) / fixedpoint_base), - (int16_t)((x4 - x3) / fixedpoint_base)) - a23); + int32_t da2 = abs( + atan2_lookup((int16_t)((y4 - y3) / fixedpoint_base), (int16_t)((x4 - x3) / fixedpoint_base)) - + a23); if (da1 >= TRIG_MAX_ANGLE) { da1 = TRIG_MAX_ANGLE - da1; @@ -50,13 +48,13 @@ bool recursive_bezier_fixed(GPathBuilder *builder, if (da1 + da2 < max_angle_tolerance) { // Finally we can stop the recursion - return gpath_builder_line_to_point(builder, GPoint(x1234 / fixedpoint_base, - y1234 / fixedpoint_base)); + return gpath_builder_line_to_point(builder, + GPoint(x1234 / fixedpoint_base, y1234 / fixedpoint_base)); } // Continue subdivision if points are being added successfully - if (recursive_bezier_fixed(builder, x1, y1, x12, y12, x123, y123, x1234, y1234) - && recursive_bezier_fixed(builder, x1234, y1234, x234, y234, x34, y34, x4, y4)) { + if (recursive_bezier_fixed(builder, x1, y1, x12, y12, x123, y123, x1234, y1234) && + recursive_bezier_fixed(builder, x1234, y1234, x234, y234, x34, y34, x4, y4)) { return true; } @@ -107,8 +105,7 @@ GPath *gpath_builder_create_path(GPathBuilder *builder) { uint32_t num_points = builder->num_points; // handle case where last point == first point => remove last point - while (num_points > 1 - && gpoint_equal(&builder->points[0], &builder->points[num_points])) { + while (num_points > 1 && gpoint_equal(&builder->points[0], &builder->points[num_points])) { num_points--; } @@ -125,7 +122,7 @@ GPath *gpath_builder_create_path(GPathBuilder *builder) { result->num_points = num_points; // Set the points pointer within the GPath structure to point just after the GPath structure // since that is where memory has been allocated for the array. - result->points = (GPoint*)(result + 1); + result->points = (GPoint *)(result + 1); memcpy(result->points, builder->points, size_of_points); return result; } @@ -147,8 +144,8 @@ bool gpath_builder_line_to_point(GPathBuilder *builder, GPoint to_point) { return true; } -bool gpath_builder_curve_to_point(GPathBuilder *builder, GPoint to_point, - GPoint control_point_1, GPoint control_point_2) { - GPoint from_point = builder->points[builder->num_points-1]; +bool gpath_builder_curve_to_point(GPathBuilder *builder, GPoint to_point, GPoint control_point_1, + GPoint control_point_2) { + GPoint from_point = builder->points[builder->num_points - 1]; return bezier_fixed(builder, from_point, control_point_1, control_point_2, to_point); } diff --git a/src/fw/applib/graphics/gpath_builder.h b/src/fw/applib/graphics/gpath_builder.h index 82ce5c7c78..f3348a6127 100644 --- a/src/fw/applib/graphics/gpath_builder.h +++ b/src/fw/applib/graphics/gpath_builder.h @@ -83,8 +83,8 @@ bool gpath_builder_line_to_point(GPathBuilder *builder, GPoint to_point); //! @param control_point_1 control point for start of the bezier curve //! @param control_point_2 control point for end of the bezier curve //! @return True if curve was added successfully False if there was no space in GPathBuilder struct -bool gpath_builder_curve_to_point(GPathBuilder *builder, GPoint to_point, - GPoint control_point_1, GPoint control_point_2); +bool gpath_builder_curve_to_point(GPathBuilder *builder, GPoint to_point, GPoint control_point_1, + GPoint control_point_2); //! Creates a new GPath on the heap based on a data from GPathBuilder //! diff --git a/src/fw/applib/graphics/graphics.c b/src/fw/applib/graphics/graphics.c index 6b24ffc643..5dbbf8424d 100644 --- a/src/fw/applib/graphics/graphics.c +++ b/src/fw/applib/graphics/graphics.c @@ -19,10 +19,10 @@ #include #if !defined(__clang__) -#pragma GCC optimize ("O3") +#pragma GCC optimize("O3") #endif -void graphics_draw_pixel(GContext* ctx, GPoint point) { +void graphics_draw_pixel(GContext *ctx, GPoint point) { PBL_ASSERTN(ctx); if (ctx->lock) { return; @@ -35,7 +35,7 @@ void graphics_draw_pixel(GContext* ctx, GPoint point) { } T_STATIC void prv_fill_rect_legacy2(GContext *ctx, GRect rect, uint16_t radius, - GCornerMask corner_mask, GColor fill_color) { + GCornerMask corner_mask, GColor fill_color) { if (gcolor_is_transparent(fill_color)) { fill_color = GColorWhite; } @@ -43,7 +43,7 @@ T_STATIC void prv_fill_rect_legacy2(GContext *ctx, GRect rect, uint16_t radius, // as this function will only be called with radius 0 to or // to support the legacy2 behavior (where the radius is clamped to 8) it's safe to assume 8px here PBL_ASSERTN(radius <= 8); - GBitmap* bitmap = graphics_context_get_bitmap(ctx); + GBitmap *bitmap = graphics_context_get_bitmap(ctx); // translate to absolute bitmap coordinates: rect.origin.x += ctx->draw_state.drawing_box.origin.x; @@ -58,22 +58,25 @@ T_STATIC void prv_fill_rect_legacy2(GContext *ctx, GRect rect, uint16_t radius, return; } - // All the row insets are packed into an uint32, taking 4 bits per inset (hence the 8px radius limit): + // All the row insets are packed into an uint32, taking 4 bits per inset (hence the 8px radius + // limit): static const uint32_t round_top_corner_lookup[] = { - 0x0, 0x01, 0x01, 0x12, 0x113, 0x123, 0x1234, 0x11235, 0x112346, + 0x0, 0x01, 0x01, 0x12, 0x113, 0x123, 0x1234, 0x11235, 0x112346, }; static const uint32_t round_bottom_corner_lookup[] = { - 0x0, 0x01, 0x10, 0x210, 0x3110, 0x32100, 0x432100, 0x5321100, 0x64321100, + 0x0, 0x01, 0x10, 0x210, 0x3110, 0x32100, 0x432100, 0x5321100, 0x64321100, }; // Set up the insets for doing the top corners. - uint32_t corner_insets_left = (corner_mask & GCornerTopLeft) ? round_top_corner_lookup[radius] : 0; - uint32_t corner_insets_right = (corner_mask & GCornerTopRight) ? round_top_corner_lookup[radius] : 0; + uint32_t corner_insets_left = + (corner_mask & GCornerTopLeft) ? round_top_corner_lookup[radius] : 0; + uint32_t corner_insets_right = + (corner_mask & GCornerTopRight) ? round_top_corner_lookup[radius] : 0; const unsigned int top_cropped_rows_count = clipped_rect.origin.y - rect.origin.y; const int32_t left_cropped_columns_count = MAX(0, clipped_rect.origin.x - rect.origin.x); - const int32_t right_cropped_columns_count = MAX(0, rect.size.w - clipped_rect.size.w - - left_cropped_columns_count); + const int32_t right_cropped_columns_count = + MAX(0, rect.size.w - clipped_rect.size.w - left_cropped_columns_count); if (top_cropped_rows_count) { // Skip over rows for each one that's cropped off the top. @@ -87,8 +90,8 @@ T_STATIC void prv_fill_rect_legacy2(GContext *ctx, GRect rect, uint16_t radius, // bit-block fiddling: const int16_t max_y = clipped_rect.origin.y + clipped_rect.size.h; for (; clipped_rect.origin.y < max_y; ++clipped_rect.origin.y) { - - if ((clipped_rect.origin.y == (rect.origin.y + rect.size.h) - radius) && (corner_mask & GCornersBottom)) { + if ((clipped_rect.origin.y == (rect.origin.y + rect.size.h) - radius) && + (corner_mask & GCornersBottom)) { if (corner_mask & GCornerBottomLeft) { corner_insets_left = round_bottom_corner_lookup[radius]; } @@ -152,8 +155,8 @@ void prv_fill_rect_internal(GContext *ctx, const GRect *rect, uint16_t radius, // Fill 3 rectangles and 4 quadrants if (corner_mask & GCornerTopLeft) { - circle_func(ctx, GPoint(rect->origin.x + radius, rect->origin.y + radius), - radius, GCornerTopLeft); + circle_func(ctx, GPoint(rect->origin.x + radius, rect->origin.y + radius), radius, + GCornerTopLeft); top_rect_origin_x += radius; top_rect_size_w -= radius; } @@ -169,31 +172,33 @@ void prv_fill_rect_internal(GContext *ctx, const GRect *rect, uint16_t radius, top_rect_size_w -= radius; } if (corner_mask & GCornerBottomRight) { - circle_func(ctx, GPoint(rect->origin.x + rect->size.w - radius - 1, - rect->origin.y + rect->size.h - radius - 1), + circle_func(ctx, + GPoint(rect->origin.x + rect->size.w - radius - 1, + rect->origin.y + rect->size.h - radius - 1), radius, GCornerBottomRight); bottom_rect_size_w -= radius; } // Top Rect - prv_fill_rect_legacy2(ctx, GRect(top_rect_origin_x, rect->origin.y, top_rect_size_w, radius), - 0, GCornerNone, fill_color); + prv_fill_rect_legacy2(ctx, GRect(top_rect_origin_x, rect->origin.y, top_rect_size_w, radius), 0, + GCornerNone, fill_color); // Middle Rect - prv_fill_rect_legacy2(ctx, GRect(rect->origin.x, rect->origin.y + radius, - rect->size.w, rect->size.h - 2 * radius), - 0, GCornerNone, fill_color); + prv_fill_rect_legacy2( + ctx, + GRect(rect->origin.x, rect->origin.y + radius, rect->size.w, rect->size.h - 2 * radius), 0, + GCornerNone, fill_color); // Bottom Rect - prv_fill_rect_legacy2(ctx, GRect(bottom_rect_origin_x, rect->origin.y + rect->size.h - radius, - bottom_rect_size_w, radius), + prv_fill_rect_legacy2(ctx, + GRect(bottom_rect_origin_x, rect->origin.y + rect->size.h - radius, + bottom_rect_size_w, radius), 0, GCornerNone, fill_color); } } -T_STATIC void prv_fill_rect_non_aa(GContext* ctx, const GRect *rect, uint16_t radius, +T_STATIC void prv_fill_rect_non_aa(GContext *ctx, const GRect *rect, uint16_t radius, GCornerMask corner_mask, GColor fill_color) { - // for radii <= 8 we can safely use the legacy2 behavior const uint16_t alt_radius = 8; FillCircleImplFunc circle_func = graphics_circle_quadrant_fill_non_aa; @@ -201,14 +206,14 @@ T_STATIC void prv_fill_rect_non_aa(GContext* ctx, const GRect *rect, uint16_t ra } #if PBL_COLOR -T_STATIC void prv_fill_rect_aa(GContext* ctx, const GRect *rect, uint16_t radius, +T_STATIC void prv_fill_rect_aa(GContext *ctx, const GRect *rect, uint16_t radius, GCornerMask corner_mask, GColor fill_color) { FillCircleImplFunc circle_func = graphics_internal_circle_quadrant_fill_aa; prv_fill_rect_internal(ctx, rect, radius, corner_mask, fill_color, 0, circle_func); } -#endif // PBL_COLOR +#endif // PBL_COLOR -void graphics_fill_round_rect(GContext* ctx, const GRect *rect, uint16_t radius, +void graphics_fill_round_rect(GContext *ctx, const GRect *rect, uint16_t radius, GCornerMask corner_mask) { PBL_ASSERTN(ctx); if (!rect || ctx->lock) { @@ -225,24 +230,24 @@ void graphics_fill_round_rect(GContext* ctx, const GRect *rect, uint16_t radius, prv_fill_rect_non_aa(ctx, rect, radius, corner_mask, ctx->draw_state.fill_color); } -void graphics_fill_round_rect_by_value(GContext* ctx, GRect rect, uint16_t radius, - GCornerMask corner_mask) { +void graphics_fill_round_rect_by_value(GContext *ctx, GRect rect, uint16_t radius, + GCornerMask corner_mask) { graphics_fill_round_rect(ctx, &rect, radius, corner_mask); } -void graphics_fill_rect(GContext* ctx, const GRect *rect) { +void graphics_fill_rect(GContext *ctx, const GRect *rect) { graphics_fill_round_rect(ctx, rect, 0, GCornerNone); } T_STATIC void prv_draw_rect(GContext *ctx, const GRect *rect) { GColor fill_color = ctx->draw_state.fill_color; ctx->draw_state.fill_color = ctx->draw_state.stroke_color; - graphics_fill_rect(ctx, &GRect(rect->origin.x, rect->origin.y, rect->size.w, 1)); // top - graphics_fill_rect(ctx, &GRect(rect->origin.x, rect->origin.y + rect->size.h - 1, - rect->size.w, 1)); // bottom - graphics_fill_rect(ctx, &GRect(rect->origin.x, rect->origin.y + 1, 1, rect->size.h - 2)); // left - graphics_fill_rect(ctx, &GRect(rect->origin.x + rect->size.w - 1, - rect->origin.y + 1, 1, rect->size.h - 2)); // right + graphics_fill_rect(ctx, &GRect(rect->origin.x, rect->origin.y, rect->size.w, 1)); // top + graphics_fill_rect( + ctx, &GRect(rect->origin.x, rect->origin.y + rect->size.h - 1, rect->size.w, 1)); // bottom + graphics_fill_rect(ctx, &GRect(rect->origin.x, rect->origin.y + 1, 1, rect->size.h - 2)); // left + graphics_fill_rect(ctx, &GRect(rect->origin.x + rect->size.w - 1, rect->origin.y + 1, 1, + rect->size.h - 2)); // right ctx->draw_state.fill_color = fill_color; } @@ -258,7 +263,7 @@ T_STATIC void prv_draw_rect_aa_stroked(GContext *ctx, const GRect *rect, uint8_t graphics_line_draw_stroked_aa(ctx, tr, br, stroke_width); graphics_line_draw_stroked_aa(ctx, bl, br, stroke_width); } -#endif // PBL_COLOR +#endif // PBL_COLOR T_STATIC void prv_draw_rect_stroked(GContext *ctx, const GRect *rect, uint8_t stroke_width) { const GPoint tl = GPoint(rect->origin.x, rect->origin.y); @@ -272,7 +277,7 @@ T_STATIC void prv_draw_rect_stroked(GContext *ctx, const GRect *rect, uint8_t st graphics_line_draw_stroked_non_aa(ctx, bl, br, stroke_width); } -void graphics_draw_rect(GContext* ctx, const GRect *rect) { +void graphics_draw_rect(GContext *ctx, const GRect *rect) { PBL_ASSERTN(ctx); if (!rect || ctx->lock) { return; @@ -295,11 +300,11 @@ void graphics_draw_rect(GContext* ctx, const GRect *rect) { prv_draw_rect_stroked(ctx, rect, ctx->draw_state.stroke_width); } -void graphics_draw_rect_by_value(GContext* ctx, GRect rect) { +void graphics_draw_rect_by_value(GContext *ctx, GRect rect) { graphics_draw_rect(ctx, &rect); } -void graphics_draw_rect_precise(GContext* ctx, const GRectPrecise *rect) { +void graphics_draw_rect_precise(GContext *ctx, const GRectPrecise *rect) { const Fixed_S16_3 right = grect_precise_get_max_x(rect); const Fixed_S16_3 bottom = grect_precise_get_max_y(rect); @@ -316,7 +321,7 @@ void graphics_draw_rect_precise(GContext* ctx, const GRectPrecise *rect) { // This takes care of all routines since it re-uses existing AA and SW functionality in draw line // and draw circle -T_STATIC void prv_draw_round_rect(GContext* ctx, const GRect *rect, uint16_t radius) { +T_STATIC void prv_draw_round_rect(GContext *ctx, const GRect *rect, uint16_t radius) { const GPoint origin = rect->origin; const int16_t width = rect->size.w; const int16_t height = rect->size.h; @@ -340,10 +345,10 @@ T_STATIC void prv_draw_round_rect(GContext* ctx, const GRect *rect, uint16_t rad const GPoint right_b = GPoint(origin.x + width - 1, origin.y + radius + height_actual - 1); // Draw lines between each transformed corner point - graphics_draw_line(ctx, top_l, top_r); // top - graphics_draw_line(ctx, bottom_l, bottom_r); // bottom - graphics_draw_line(ctx, left_t, left_b); // left - graphics_draw_line(ctx, right_t, right_b); // right + graphics_draw_line(ctx, top_l, top_r); // top + graphics_draw_line(ctx, bottom_l, bottom_r); // bottom + graphics_draw_line(ctx, left_t, left_b); // left + graphics_draw_line(ctx, right_t, right_b); // right // Draw quadrants const GPoint tl = GPoint(origin.x + radius, origin.y + radius); @@ -358,19 +363,19 @@ T_STATIC void prv_draw_round_rect(GContext* ctx, const GRect *rect, uint16_t rad } #if PBL_COLOR -T_STATIC void prv_draw_round_rect_aa(GContext* ctx, const GRect *rect, uint16_t radius) { +T_STATIC void prv_draw_round_rect_aa(GContext *ctx, const GRect *rect, uint16_t radius) { // Assumes AA and stroke_width is set appropriately in ctx prv_draw_round_rect(ctx, rect, radius); } -T_STATIC void prv_draw_round_rect_aa_stroked(GContext* ctx, const GRect *rect, - uint16_t radius, uint8_t stroke_width) { +T_STATIC void prv_draw_round_rect_aa_stroked(GContext *ctx, const GRect *rect, uint16_t radius, + uint8_t stroke_width) { // Assumes AA and stroke_width is set appropriately in ctx prv_draw_round_rect(ctx, rect, radius); } -#endif // CONFIG_SCREEN_COLOR_DEPTH_BITS +#endif // CONFIG_SCREEN_COLOR_DEPTH_BITS -T_STATIC void prv_draw_round_rect_stroked(GContext* ctx, const GRect *rect, uint16_t radius, +T_STATIC void prv_draw_round_rect_stroked(GContext *ctx, const GRect *rect, uint16_t radius, uint8_t stroke_width) { // Assumes AA and stroke_width is set appropriately in ctx prv_draw_round_rect(ctx, rect, radius); @@ -378,7 +383,7 @@ T_STATIC void prv_draw_round_rect_stroked(GContext* ctx, const GRect *rect, uint static void prv_graphics_convert_8_bit_to_1_bit(const GBitmap *from, GBitmap *to) { const GRect bounds = from->bounds; - uint8_t *to_buffer = (uint8_t *) to->addr; + uint8_t *to_buffer = (uint8_t *)to->addr; const int y_start = bounds.origin.y; const int y_end = y_start + bounds.size.h; @@ -394,7 +399,7 @@ static void prv_graphics_convert_8_bit_to_1_bit(const GBitmap *from, GBitmap *to } } -void graphics_draw_round_rect(GContext* ctx, const GRect *rect, uint16_t radius) { +void graphics_draw_round_rect(GContext *ctx, const GRect *rect, uint16_t radius) { PBL_ASSERTN(ctx); if (!rect || ctx->lock) { return; @@ -432,7 +437,7 @@ void graphics_draw_round_rect(GContext* ctx, const GRect *rect, uint16_t radius) } } -void graphics_draw_round_rect_by_value(GContext* ctx, GRect rect, uint16_t radius) { +void graphics_draw_round_rect_by_value(GContext *ctx, GRect rect, uint16_t radius) { graphics_draw_round_rect(ctx, &rect, radius); } @@ -441,21 +446,21 @@ void graphics_context_init(GContext *context, FrameBuffer *framebuffer, PBL_ASSERTN(context); PBL_ASSERTN(framebuffer); - *context = (GContext) { - // For apps, this is run before the app has a chance to run, so there's no concern here of the - // app changing its framebuffer size. - .dest_bitmap = framebuffer_get_as_bitmap(framebuffer, &framebuffer->size), - .parent_framebuffer = framebuffer, - .parent_framebuffer_vertical_offset = 0, - .lock = false + *context = (GContext){ + // For apps, this is run before the app has a chance to run, so there's no concern here of the + // app changing its framebuffer size. + .dest_bitmap = framebuffer_get_as_bitmap(framebuffer, &framebuffer->size), + .parent_framebuffer = framebuffer, + .parent_framebuffer_vertical_offset = 0, + .lock = false }; // init the font cache FontCache *font_cache = &context->font_cache; memset(font_cache->cache_keys, 0, sizeof(font_cache->cache_keys)); memset(font_cache->cache_data, 0, sizeof(font_cache->cache_data)); - keyed_circular_cache_init(&font_cache->line_cache, font_cache->cache_keys, - font_cache->cache_data, sizeof(LineCacheData), LINE_CACHE_SIZE); + keyed_circular_cache_init(&font_cache->line_cache, font_cache->cache_keys, font_cache->cache_data, + sizeof(LineCacheData), LINE_CACHE_SIZE); graphics_context_set_default_drawing_state(context, init_mode); } @@ -463,91 +468,91 @@ void graphics_context_init(GContext *context, FrameBuffer *framebuffer, void graphics_context_set_default_drawing_state(GContext *ctx, GContextInitializationMode init_mode) { PBL_ASSERTN(ctx); - GBitmap* bitmap = graphics_context_get_bitmap(ctx); - - ctx->draw_state = (GDrawState) { - .stroke_color = GColorBlack, - .fill_color = GColorBlack, - .text_color = GColorWhite, - .tint_color = GColorWhite, - .compositing_mode = GCompOpAssign, - .clip_box = bitmap->bounds, - .drawing_box = bitmap->bounds, + GBitmap *bitmap = graphics_context_get_bitmap(ctx); + + ctx->draw_state = (GDrawState){ + .stroke_color = GColorBlack, + .fill_color = GColorBlack, + .text_color = GColorWhite, + .tint_color = GColorWhite, + .compositing_mode = GCompOpAssign, + .clip_box = bitmap->bounds, + .drawing_box = bitmap->bounds, #if PBL_COLOR - .antialiased = !process_manager_compiled_with_legacy2_sdk(), + .antialiased = !process_manager_compiled_with_legacy2_sdk(), #endif - .stroke_width = 1, - .draw_implementation = &g_default_draw_implementation, - .avoid_text_orphans = (init_mode == GContextInitializationMode_System), + .stroke_width = 1, + .draw_implementation = &g_default_draw_implementation, + .avoid_text_orphans = (init_mode == GContextInitializationMode_System), }; } -GDrawState graphics_context_get_drawing_state(GContext* ctx) { +GDrawState graphics_context_get_drawing_state(GContext *ctx) { PBL_ASSERTN(ctx); return ctx->draw_state; } -void graphics_context_set_drawing_state(GContext* ctx, GDrawState draw_state) { +void graphics_context_set_drawing_state(GContext *ctx, GDrawState draw_state) { PBL_ASSERTN(ctx); ctx->draw_state = draw_state; } -void graphics_context_move_draw_box(GContext* ctx, GPoint offset) { +void graphics_context_move_draw_box(GContext *ctx, GPoint offset) { PBL_ASSERTN(ctx); ctx->draw_state.drawing_box.origin = gpoint_add(ctx->draw_state.drawing_box.origin, offset); } -void graphics_context_set_stroke_color(GContext* ctx, GColor color) { +void graphics_context_set_stroke_color(GContext *ctx, GColor color) { PBL_ASSERTN(ctx); if (ctx->lock) { return; } - #if PBL_BW - color = gcolor_get_bw(color); - #else - color = gcolor_closest_opaque(color); - #endif +#if PBL_BW + color = gcolor_get_bw(color); +#else + color = gcolor_closest_opaque(color); +#endif ctx->draw_state.stroke_color = color; } -void graphics_context_set_stroke_color_2bit(GContext* ctx, GColor2 color) { +void graphics_context_set_stroke_color_2bit(GContext *ctx, GColor2 color) { graphics_context_set_stroke_color(ctx, get_native_color(color)); } -void graphics_context_set_fill_color(GContext* ctx, GColor color) { +void graphics_context_set_fill_color(GContext *ctx, GColor color) { PBL_ASSERTN(ctx); if (ctx->lock) { return; } - #if PBL_BW - color = gcolor_get_grayscale(color); - #else - color = gcolor_closest_opaque(color); - #endif +#if PBL_BW + color = gcolor_get_grayscale(color); +#else + color = gcolor_closest_opaque(color); +#endif ctx->draw_state.fill_color = color; } -void graphics_context_set_fill_color_2bit(GContext* ctx, GColor2 color) { +void graphics_context_set_fill_color_2bit(GContext *ctx, GColor2 color) { graphics_context_set_fill_color(ctx, get_native_color(color)); } -void graphics_context_set_text_color(GContext* ctx, GColor color) { +void graphics_context_set_text_color(GContext *ctx, GColor color) { PBL_ASSERTN(ctx); if (ctx->lock) { return; } - #if PBL_BW - color = gcolor_get_bw(color); - #else - color = gcolor_closest_opaque(color); - #endif +#if PBL_BW + color = gcolor_get_bw(color); +#else + color = gcolor_closest_opaque(color); +#endif ctx->draw_state.text_color = color; } -void graphics_context_set_text_color_2bit(GContext* ctx, GColor2 color) { +void graphics_context_set_text_color_2bit(GContext *ctx, GColor2 color) { graphics_context_set_text_color(ctx, get_native_color(color)); } @@ -559,7 +564,7 @@ void graphics_context_set_tint_color(GContext *ctx, GColor color) { ctx->draw_state.tint_color = gcolor_closest_opaque(color); } -void graphics_context_set_compositing_mode(GContext* ctx, GCompOp mode) { +void graphics_context_set_compositing_mode(GContext *ctx, GCompOp mode) { PBL_ASSERTN(ctx); if (ctx->lock) { return; @@ -568,7 +573,7 @@ void graphics_context_set_compositing_mode(GContext* ctx, GCompOp mode) { ctx->draw_state.compositing_mode = mode; } -void graphics_context_set_antialiased(GContext* ctx, bool enable) { +void graphics_context_set_antialiased(GContext *ctx, bool enable) { PBL_ASSERTN(ctx); if (ctx->lock) { return; @@ -583,7 +588,7 @@ bool graphics_context_get_antialiased(GContext *ctx) { return PBL_IF_COLOR_ELSE(ctx->draw_state.antialiased, false); } -void graphics_context_set_stroke_width(GContext* ctx, uint8_t stroke_width) { +void graphics_context_set_stroke_width(GContext *ctx, uint8_t stroke_width) { PBL_ASSERTN(ctx); if (ctx->lock) { return; @@ -603,24 +608,24 @@ GSize graphics_context_get_framebuffer_size(GContext *ctx) { } } -GBitmap* graphics_context_get_bitmap(GContext* ctx) { +GBitmap *graphics_context_get_bitmap(GContext *ctx) { PBL_ASSERTN(ctx); return &ctx->dest_bitmap; } -void graphics_context_mark_dirty_rect(GContext* ctx, GRect rect) { +void graphics_context_mark_dirty_rect(GContext *ctx, GRect rect) { PBL_ASSERTN(ctx); if (ctx->parent_framebuffer) { framebuffer_mark_dirty_rect(ctx->parent_framebuffer, rect); } } -bool graphics_frame_buffer_is_captured(GContext* ctx) { +bool graphics_frame_buffer_is_captured(GContext *ctx) { PBL_ASSERTN(ctx); return ctx->lock; } -GBitmap* graphics_capture_frame_buffer_format(GContext *ctx, GBitmapFormat format) { +GBitmap *graphics_capture_frame_buffer_format(GContext *ctx, GBitmapFormat format) { PBL_ASSERTN(ctx); if (ctx->lock) { APP_LOG(APP_LOG_LEVEL_WARNING, @@ -630,7 +635,7 @@ GBitmap* graphics_capture_frame_buffer_format(GContext *ctx, GBitmapFormat forma } ctx->lock = true; - GBitmap *native = graphics_context_get_bitmap(ctx); + GBitmap *native = graphics_context_get_bitmap(ctx); if (format == native->info.format) { return native; @@ -659,7 +664,7 @@ GBitmap* graphics_capture_frame_buffer_format(GContext *ctx, GBitmapFormat forma return result; } -GBitmap* graphics_capture_frame_buffer_2bit(GContext *ctx) { +GBitmap *graphics_capture_frame_buffer_2bit(GContext *ctx) { return graphics_capture_frame_buffer_format(ctx, GBitmapFormat1Bit); } @@ -673,8 +678,7 @@ MOCKABLE bool graphics_release_frame_buffer(GContext *ctx, GBitmap *buffer) { GBitmap *native_framebuffer = graphics_context_get_bitmap(ctx); if (gbitmap_get_format(buffer) != GBITMAP_NATIVE_FORMAT) { ctx->lock = false; - bitblt_bitmap_into_bitmap(native_framebuffer, buffer, GPointZero, - GCompOpAssign, GColorWhite); + bitblt_bitmap_into_bitmap(native_framebuffer, buffer, GPointZero, GCompOpAssign, GColorWhite); framebuffer_dirty_all(ctx->parent_framebuffer); // Don't destroy the bitmap we got from app_state_legacy2_get_2bit_framebuffer() diff --git a/src/fw/applib/graphics/graphics.h b/src/fw/applib/graphics/graphics.h index ae6fa777a4..f5faf961d7 100644 --- a/src/fw/applib/graphics/graphics.h +++ b/src/fw/applib/graphics/graphics.h @@ -39,7 +39,7 @@ typedef struct FrameBuffer FrameBuffer; //! Draws a pixel at given point in the current stroke color //! @param ctx The destination graphics context in which to draw //! @param point The point at which to draw the pixel -void graphics_draw_pixel(GContext* ctx, GPoint point); +void graphics_draw_pixel(GContext *ctx, GPoint point); //! Fills a rectangle with the current fill color //! @param ctx The destination graphics context in which to draw @@ -52,7 +52,7 @@ void graphics_fill_rect(GContext *ctx, const GRect *rect); //! @param rect The rectangle for which to draw the outline void graphics_draw_rect_by_value(GContext *ctx, GRect rect); void graphics_draw_rect(GContext *ctx, const GRect *rect); -void graphics_draw_rect_precise(GContext* ctx, const GRectPrecise *rect); +void graphics_draw_rect_precise(GContext *ctx, const GRectPrecise *rect); //! Fills a rectangle with the current fill color, optionally rounding all or a //! selection of its corners. @@ -66,7 +66,6 @@ void graphics_fill_round_rect_by_value(GContext *ctx, GRect rect, uint16_t corne void graphics_fill_round_rect(GContext *ctx, const GRect *rect, uint16_t corner_radius, GCornerMask corner_mask); - //! Draws the outline of a rounded rectangle in the current stroke color //! @param ctx The destination graphics context in which to draw //! @param rect The rectangle defining the dimensions of the rounded rectangle to draw @@ -79,7 +78,7 @@ void graphics_draw_round_rect(GContext *ctx, const GRect *rect, uint16_t radius) //! {@link graphics_release_frame_buffer}. //! @param ctx The graphics context providing the frame buffer //! @return True if the frame buffer has been captured -bool graphics_frame_buffer_is_captured(GContext* ctx); +bool graphics_frame_buffer_is_captured(GContext *ctx); //! Captures the frame buffer for direct access, using the given format. //! Graphics functions will not affect the frame buffer while it is captured. @@ -107,8 +106,8 @@ GBitmap *graphics_capture_frame_buffer_format(GContext *ctx, GBitmapFormat forma //! A shortcut to capture the framebuffer in the native format of the watch. //! @see graphics_capture_frame_buffer_format -GBitmap* graphics_capture_frame_buffer(GContext* ctx); -GBitmap* graphics_capture_frame_buffer_2bit(GContext* ctx); +GBitmap *graphics_capture_frame_buffer(GContext *ctx); +GBitmap *graphics_capture_frame_buffer_2bit(GContext *ctx); //! Releases the frame buffer. //! Must be called before the end of a layer's `.update_proc` for the layer to be drawn properly. @@ -118,7 +117,7 @@ GBitmap* graphics_capture_frame_buffer_2bit(GContext* ctx); //! @param ctx The graphics context providing the frame buffer //! @param buffer The pointer to frame buffer //! @return True if the frame buffer was released successfully -bool graphics_release_frame_buffer(GContext* ctx, GBitmap* buffer); +bool graphics_release_frame_buffer(GContext *ctx, GBitmap *buffer); //! @} // end addtogroup Drawing //! @} // end addtogroup Graphics diff --git a/src/fw/applib/graphics/graphics_bitmap.c b/src/fw/applib/graphics/graphics_bitmap.c index d04c523f02..a03fcfb88f 100644 --- a/src/fw/applib/graphics/graphics_bitmap.c +++ b/src/fw/applib/graphics/graphics_bitmap.c @@ -100,7 +100,7 @@ static DivResult polar_div(int32_t numer, int32_t denom) { T_STATIC bool get_bitmap_bit(GBitmap *bmp, int x, int y) { int byte_num = y * bmp->row_size_bytes + x / 8; int bit_num = x % 8; - uint8_t byte = ((uint8_t*)(bmp->addr))[byte_num]; + uint8_t byte = ((uint8_t *)(bmp->addr))[byte_num]; return (byte & (1 << bit_num)) ? 1 : 0; } #elif PBL_COLOR @@ -111,12 +111,10 @@ T_STATIC GColor get_bitmap_color(GBitmap *bmp, int x, int y) { const uint8_t src_bpp = gbitmap_get_bits_per_pixel(format); uint8_t cindex = raw_image_get_value_for_bitdepth(src, x, 0, // y = 0 when using data_row - bmp->row_size_bytes, - src_bpp); + bmp->row_size_bytes, src_bpp); // Default color to be the raw color index - update only if palletized GColor src_color = (GColor){.argb = cindex}; - bool palletized = ((format == GBitmapFormat1BitPalette) || - (format == GBitmapFormat2BitPalette) || + bool palletized = ((format == GBitmapFormat1BitPalette) || (format == GBitmapFormat2BitPalette) || (format == GBitmapFormat4BitPalette)); if (palletized) { // Look up color in palette if palletized @@ -127,13 +125,13 @@ T_STATIC GColor get_bitmap_color(GBitmap *bmp, int x, int y) { } #endif -void graphics_draw_rotated_bitmap(GContext* ctx, GBitmap *src, GPoint src_ic, int rotation, +void graphics_draw_rotated_bitmap(GContext *ctx, GBitmap *src, GPoint src_ic, int rotation, GPoint dest_ic) { PBL_ASSERTN(ctx); if (rotation == 0) { graphics_draw_bitmap_in_rect( - ctx, src, &(GRect){ .origin = { dest_ic.x - src_ic.x, dest_ic.y - src_ic.y }, - .size = src->bounds.size }); + ctx, src, + &(GRect){.origin = {dest_ic.x - src_ic.x, dest_ic.y - src_ic.y}, .size = src->bounds.size}); return; } @@ -194,19 +192,19 @@ void graphics_draw_rotated_bitmap(GContext* ctx, GBitmap *src, GPoint src_ic, in // i.e. in case the anchor point is on the edge then it would be twice // Also need to account for the dest_ic offset - const int16_t max_width = MAX(src->bounds.origin.x + src->bounds.size.w - src_ic.x, - src_ic.x - src->bounds.origin.x); - const int16_t max_height = MAX(src->bounds.origin.y + src->bounds.size.h - src_ic.y, - src_ic.y - src->bounds.origin.y); - const int32_t width = 2 * (max_width + 1); // Add one more pixel in case on the edge - const int32_t height = 2 * (max_height + 1); // Add one more pixel in case on the edge + const int16_t max_width = + MAX(src->bounds.origin.x + src->bounds.size.w - src_ic.x, src_ic.x - src->bounds.origin.x); + const int16_t max_height = + MAX(src->bounds.origin.y + src->bounds.size.h - src_ic.y, src_ic.y - src->bounds.origin.y); + const int32_t width = 2 * (max_width + 1); // Add one more pixel in case on the edge + const int32_t height = 2 * (max_height + 1); // Add one more pixel in case on the edge // add two pixels just in case of rounding issues const int32_t max_distance = integer_sqrt((width * width) + (height * height)) + 2; const int32_t min_x = src_ic.x - max_distance; const int32_t min_y = src_ic.y - max_distance; - const int32_t size_x = max_distance*2; + const int32_t size_x = max_distance * 2; const int32_t size_y = size_x; const GRect dest_clip_min = GRect(dest_ic.x + min_x, dest_ic.y + min_y, size_x, size_y); @@ -234,41 +232,40 @@ void graphics_draw_rotated_bitmap(GContext* ctx, GBitmap *src, GPoint src_ic, in // only draw if within the src range const GBitmapDataRowInfo src_info = gbitmap_get_data_row_info(src, src_y); - if (!(WITHIN(src_x, 0, src->bounds.size.w - 1) && - WITHIN(src_y, 0, src->bounds.size.h - 1) && - WITHIN(src_x, src_info.min_x, src_info.max_x))) { + if (!(WITHIN(src_x, 0, src->bounds.size.w - 1) && WITHIN(src_y, 0, src->bounds.size.h - 1) && + WITHIN(src_x, src_info.min_x, src_info.max_x))) { continue; } #if PBL_BW // dividing by 8 to avoid overflows of in the next loop const int32_t horiz_contrib[3] = { - src_vector_x.rem < 0 ? (-src_vector_x.rem) >> 3 : 0, - src_vector_x.rem < 0 ? (TRIG_MAX_RATIO + src_vector_x.rem) >> 3 : - (TRIG_MAX_RATIO - src_vector_x.rem) >> 3, - src_vector_x.rem < 0 ? 0 : (src_vector_x.rem) >> 3 + src_vector_x.rem < 0 ? (-src_vector_x.rem) >> 3 : 0, + src_vector_x.rem < 0 ? (TRIG_MAX_RATIO + src_vector_x.rem) >> 3 + : (TRIG_MAX_RATIO - src_vector_x.rem) >> 3, + src_vector_x.rem < 0 ? 0 : (src_vector_x.rem) >> 3 }; const int32_t vert_contrib[3] = { - src_vector_y.rem < 0 ? (-src_vector_y.rem) >> 3 : 0, - src_vector_y.rem < 0 ? (TRIG_MAX_RATIO + src_vector_y.rem) >> 3 : - (TRIG_MAX_RATIO - src_vector_y.rem) >> 3, - src_vector_y.rem < 0 ? 0 : (src_vector_y.rem) >> 3 + src_vector_y.rem < 0 ? (-src_vector_y.rem) >> 3 : 0, + src_vector_y.rem < 0 ? (TRIG_MAX_RATIO + src_vector_y.rem) >> 3 + : (TRIG_MAX_RATIO - src_vector_y.rem) >> 3, + src_vector_y.rem < 0 ? 0 : (src_vector_y.rem) >> 3 }; int32_t thresh = 0; for (int i = -1; i <= 1; ++i) { for (int j = -1; j <= 1; ++j) { - if (src_x + i >= 0 && src_x + i < src->bounds.size.w - && src_y + j >= 0 && src_y + j < src->bounds.size.h) { + if (src_x + i >= 0 && src_x + i < src->bounds.size.w && src_y + j >= 0 && + src_y + j < src->bounds.size.h) { // I'm within bounds - if (get_bitmap_bit(src, src_x + i , src_y + j)) { + if (get_bitmap_bit(src, src_x + i, src_y + j)) { // more color - thresh += (horiz_contrib[i+1] * vert_contrib[j+1]); + thresh += (horiz_contrib[i + 1] * vert_contrib[j + 1]); } else { // less color - thresh -= (horiz_contrib[i+1] * vert_contrib[j+1]); + thresh -= (horiz_contrib[i + 1] * vert_contrib[j + 1]); } } } @@ -308,7 +305,7 @@ void graphics_draw_rotated_bitmap(GContext* ctx, GBitmap *src, GPoint src_ic, in ctx->draw_state.stroke_color = src_color; break; } - ctx->draw_state.stroke_color.a = 3; // Force to be opaque + ctx->draw_state.stroke_color.a = 3; // Force to be opaque graphics_private_set_pixel(ctx, GPoint(x, y)); #endif diff --git a/src/fw/applib/graphics/graphics_bitmap.h b/src/fw/applib/graphics/graphics_bitmap.h index 8534110977..43ad3c1cbe 100644 --- a/src/fw/applib/graphics/graphics_bitmap.h +++ b/src/fw/applib/graphics/graphics_bitmap.h @@ -20,8 +20,8 @@ //! @see GContext //! @internal //! @see app_get_current_graphics_context -void graphics_draw_bitmap_in_rect_processed(GContext *ctx, const GBitmap *bitmap, - const GRect *rect, GBitmapProcessor *processor); +void graphics_draw_bitmap_in_rect_processed(GContext *ctx, const GBitmap *bitmap, const GRect *rect, + GBitmapProcessor *processor); //! Draws a bitmap into the graphics context, inside the specified rectangle //! @param ctx The destination graphics context in which to draw the bitmap @@ -50,5 +50,5 @@ void graphics_draw_bitmap_in_rect(GContext *ctx, const GBitmap *bitmap, const GR //! and TRIG_MAX_ANGLE (360 degree rotation). Use \ref DEG_TO_TRIGANGLE to easily convert degrees //! to the appropriate value. //! @param dest_ic Where to draw the instance center of the rotated bitmap in the context. -void graphics_draw_rotated_bitmap(GContext* ctx, GBitmap *src, GPoint src_ic, int rotation, +void graphics_draw_rotated_bitmap(GContext *ctx, GBitmap *src, GPoint src_ic, int rotation, GPoint dest_ic); diff --git a/src/fw/applib/graphics/graphics_circle.c b/src/fw/applib/graphics/graphics_circle.c index 1a7b0b9718..9de1b56008 100644 --- a/src/fw/applib/graphics/graphics_circle.c +++ b/src/fw/applib/graphics/graphics_circle.c @@ -25,14 +25,18 @@ static Fixed_S16_3 prv_get_ellipsis_border(Fixed_S16_3 offset, uint32_t offset_r uint32_t opposite_radius_sq) { if (offset_radius_sq == opposite_radius_sq) { // We're dealing with a circle - return (Fixed_S16_3){.raw_value = integer_sqrt((offset_radius_sq << FIXED_S16_3_PRECISION) - - offset.raw_value * offset.raw_value)}; + return (Fixed_S16_3){ + .raw_value = integer_sqrt((offset_radius_sq << FIXED_S16_3_PRECISION) - + offset.raw_value * offset.raw_value) + }; } return (Fixed_S16_3){ - .raw_value = (integer_sqrt((opposite_radius_sq - opposite_radius_sq * - ((offset.raw_value * offset.raw_value) >> FIXED_S16_3_PRECISION) / - offset_radius_sq) << FIXED_S16_3_PRECISION)) + .raw_value = (integer_sqrt( + (opposite_radius_sq - + opposite_radius_sq * ((offset.raw_value * offset.raw_value) >> FIXED_S16_3_PRECISION) / + offset_radius_sq) + << FIXED_S16_3_PRECISION)) }; } @@ -44,8 +48,7 @@ static GPointPrecise prv_get_rotated_precise_point(GPointPrecise center, uint16_ static GPointPrecise prv_get_rotated_precise_point_for_ellipsis(GPointPrecise center, uint16_t radius_x, - uint16_t radius_y, - uint32_t angle) { + uint16_t radius_y, uint32_t angle) { // PBL-25637: goes bonkers for ellipsis and angles around 90° and 270° if (radius_x == radius_y) { // We're dealing with circle here - theres an easier way... @@ -59,13 +62,13 @@ static GPointPrecise prv_get_rotated_precise_point_for_ellipsis(GPointPrecise ce switch (angle / QUADRANT_ANGLE) { case 0: - return GPointPrecise(center.x.raw_value, center.y.raw_value - radius_y); + return GPointPrecise(center.x.raw_value, center.y.raw_value - radius_y); case 1: - return GPointPrecise(center.x.raw_value + radius_x, center.y.raw_value); + return GPointPrecise(center.x.raw_value + radius_x, center.y.raw_value); case 2: - return GPointPrecise(center.x.raw_value, center.y.raw_value + radius_y); + return GPointPrecise(center.x.raw_value, center.y.raw_value + radius_y); default: - return GPointPrecise(center.x.raw_value - radius_x, center.y.raw_value); + return GPointPrecise(center.x.raw_value - radius_x, center.y.raw_value); } } @@ -109,7 +112,7 @@ static GPointPrecise prv_get_rotated_precise_point_for_ellipsis(GPointPrecise ce return GPointPrecise(center.x.raw_value - x, center.y.raw_value - y); } -T_STATIC void graphics_circle_quadrant_draw_1px_non_aa(GContext* ctx, GPoint p, uint16_t radius, +T_STATIC void graphics_circle_quadrant_draw_1px_non_aa(GContext *ctx, GPoint p, uint16_t radius, GCornerMask quadrant) { int f = 1 - radius; int ddF_x = 1; @@ -175,7 +178,7 @@ static void prv_plot4(GBitmap *fb, GRect *clip_box, GPoint center, GPoint offset * xn mirrored points */ - for (unsigned int i=0; i < ARRAY_LENGTH(quadrant_mask_mul); i++) { + for (unsigned int i = 0; i < ARRAY_LENGTH(quadrant_mask_mul); i++) { if (quadrant_mask_mul[i].mask & quadrant) { int16_t x = center.x + (offset.x * quadrant_mask_mul[i].x_mul); int16_t y = center.y + (offset.y * quadrant_mask_mul[i].y_mul); @@ -213,7 +216,7 @@ static void prv_plot8(GBitmap *fb, GRect *clip_box, GPoint center, GPoint offset prv_plot4(fb, clip_box, center, GPoint(offset.y, offset.x), brightness, stroke_color, quadrant); } -T_STATIC void graphics_circle_quadrant_draw_1px_aa(GContext* ctx, GPoint p, uint16_t radius, +T_STATIC void graphics_circle_quadrant_draw_1px_aa(GContext *ctx, GPoint p, uint16_t radius, GCornerMask quadrant) { /* This will draw antialiased circle with width of 1px, can be drawn in quadrants * Based on wu-xiang line drawing, will draw circle in two steps @@ -271,8 +274,9 @@ T_STATIC void graphics_circle_quadrant_draw_1px_aa(GContext* ctx, GPoint p, uint // Step 1 for (progress = 0; progress < stop_progress; progress++) { - Fixed_S16_3 edge = (Fixed_S16_3){.raw_value = radius_fixed - - prv_get_circle_border(progress, radius).raw_value}; + Fixed_S16_3 edge = (Fixed_S16_3){ + .raw_value = radius_fixed - prv_get_circle_border(progress, radius).raw_value + }; if (edge.integer != 0) { weighting = (edge.fraction >> 1); @@ -301,8 +305,9 @@ T_STATIC void graphics_circle_quadrant_draw_1px_aa(GContext* ctx, GPoint p, uint // Step 2 // Special code for filling gap between mirrored parts in a manner that wont overdraw pixels for (; progress < stop_progress + special_case_pixels; progress++) { - Fixed_S16_3 edge = (Fixed_S16_3){.raw_value = radius_fixed - - prv_get_circle_border(progress, radius).raw_value}; + Fixed_S16_3 edge = (Fixed_S16_3){ + .raw_value = radius_fixed - prv_get_circle_border(progress, radius).raw_value + }; if (edge.integer != 0) { weighting = (edge.fraction >> 1); @@ -335,7 +340,7 @@ T_STATIC void graphics_circle_quadrant_draw_1px_aa(GContext* ctx, GPoint p, uint // Releasing framebuffer... graphics_release_frame_buffer(ctx, framebuffer); } -#endif // PBL_COLOR +#endif // PBL_COLOR /* static void prv_circle_arc_draw_1px(GContext* ctx, GPoint center, uint16_t radius, @@ -368,7 +373,7 @@ inline void prv_hline_quadrant(GCornerMask quadrant, GCornerMask desired, GConte } } -static void prv_stroke_circle_quadrant_full(GContext* ctx, GPoint p, uint16_t radius, +static void prv_stroke_circle_quadrant_full(GContext *ctx, GPoint p, uint16_t radius, uint8_t stroke_width, GCornerMask quadrant) { // This algorithm will draw stroked circle with variable width (only odd numbers for now) const uint8_t half_stroke_width = stroke_width / 2; @@ -400,13 +405,13 @@ static void prv_stroke_circle_quadrant_full(GContext* ctx, GPoint p, uint16_t ra ctx->draw_state.fill_color = ctx->draw_state.stroke_color; // For pixel matching we need to decrease inner radius... - prv_fill_oval_quadrant(ctx, p, outer_radius, outer_radius, - inner_radius - 1, inner_radius - 1, quadrant); + prv_fill_oval_quadrant(ctx, p, outer_radius, outer_radius, inner_radius - 1, inner_radius - 1, + quadrant); ctx->draw_state.fill_color = fill_color; } -static void prv_stroke_circle_quadrant_full_override_aa(GContext* ctx, GPoint p, uint16_t radius, +static void prv_stroke_circle_quadrant_full_override_aa(GContext *ctx, GPoint p, uint16_t radius, uint8_t stroke_width, GCornerMask quadrant, bool anti_aliased) { #if PBL_COLOR @@ -427,21 +432,21 @@ static void prv_stroke_circle_quadrant_full_override_aa(GContext* ctx, GPoint p, #if PBL_COLOR //! Draws antialiased stroked quadrant of a circle //! @internal -T_STATIC void graphics_circle_quadrant_draw_stroked_aa(GContext* ctx, GPoint p, uint16_t radius, +T_STATIC void graphics_circle_quadrant_draw_stroked_aa(GContext *ctx, GPoint p, uint16_t radius, uint8_t stroke_width, GCornerMask quadrant) { prv_stroke_circle_quadrant_full_override_aa(ctx, p, radius, stroke_width, quadrant, true); } -#endif // PBL_COLOR +#endif // PBL_COLOR //! Draws aliased stroked quadrant of a circle //! @internal -T_STATIC void graphics_circle_quadrant_draw_stroked_non_aa(GContext* ctx, GPoint p, uint16_t radius, +T_STATIC void graphics_circle_quadrant_draw_stroked_non_aa(GContext *ctx, GPoint p, uint16_t radius, uint8_t stroke_width, GCornerMask quadrant) { prv_stroke_circle_quadrant_full_override_aa(ctx, p, radius, stroke_width, quadrant, false); } -void graphics_circle_quadrant_draw(GContext* ctx, GPoint p, uint16_t radius, GCornerMask quadrant) { +void graphics_circle_quadrant_draw(GContext *ctx, GPoint p, uint16_t radius, GCornerMask quadrant) { uint8_t stroke_width = ctx->draw_state.stroke_width; #if PBL_COLOR if (ctx->draw_state.antialiased) { @@ -465,7 +470,7 @@ void graphics_circle_quadrant_draw(GContext* ctx, GPoint p, uint16_t radius, GCo } } -T_STATIC void graphics_circle_draw_1px_non_aa(GContext* ctx, GPoint p, uint16_t radius) { +T_STATIC void graphics_circle_draw_1px_non_aa(GContext *ctx, GPoint p, uint16_t radius) { graphics_circle_quadrant_draw_1px_non_aa(ctx, p, radius, GCornersAll); p.x += ctx->draw_state.drawing_box.origin.x; @@ -478,29 +483,29 @@ T_STATIC void graphics_circle_draw_1px_non_aa(GContext* ctx, GPoint p, uint16_t } #if PBL_COLOR -T_STATIC void graphics_circle_draw_1px_aa(GContext* ctx, GPoint p, uint16_t radius) { +T_STATIC void graphics_circle_draw_1px_aa(GContext *ctx, GPoint p, uint16_t radius) { graphics_circle_quadrant_draw_1px_aa(ctx, p, radius, GCornersAll); } //! Draws an antialiased circle of stroke width > 1 //! @note This only supports odd numbers for stroke_width - even numbers will be rounded up. //! Minimal supported stroke_width is 3 -T_STATIC void graphics_circle_draw_stroked_aa(GContext* ctx, GPoint p, uint16_t radius, +T_STATIC void graphics_circle_draw_stroked_aa(GContext *ctx, GPoint p, uint16_t radius, uint8_t stroke_width) { graphics_circle_quadrant_draw_stroked_aa(ctx, p, radius, stroke_width, GCornersAll); } -#endif // PBL_COLOR +#endif // PBL_COLOR //! Draws a non-antialiased circle of stroke width > 1 //! @note This only supports odd numbers for stroke_width - even numbers will be rounded up. //! Minimal supported stroke_width is 3 -T_STATIC void graphics_circle_draw_stroked_non_aa(GContext* ctx, GPoint p, uint16_t radius, +T_STATIC void graphics_circle_draw_stroked_non_aa(GContext *ctx, GPoint p, uint16_t radius, uint8_t stroke_width) { graphics_circle_quadrant_draw_stroked_non_aa(ctx, p, radius, stroke_width, GCornersAll); } // Lifted directly from: http://en.wikipedia.org/wiki/Midpoint_circle_algorithm -void graphics_draw_circle(GContext* ctx, GPoint p, uint16_t radius) { +void graphics_draw_circle(GContext *ctx, GPoint p, uint16_t radius) { PBL_ASSERTN(ctx); if (ctx->lock) { return; @@ -541,10 +546,10 @@ void graphics_draw_circle(GContext* ctx, GPoint p, uint16_t radius) { ALWAYS_INLINE static void prv_fill_horizontal_line(GContext *ctx, GPoint p, int16_t width) { - graphics_fill_rect(ctx, &(GRect) { .origin = p, .size = { width, 1 } }); + graphics_fill_rect(ctx, &(GRect){.origin = p, .size = {width, 1}}); } -void graphics_circle_quadrant_fill_non_aa(GContext* ctx, GPoint p, uint16_t radius, +void graphics_circle_quadrant_fill_non_aa(GContext *ctx, GPoint p, uint16_t radius, GCornerMask quadrant) { const int16_t x0 = p.x; const int16_t y0 = p.y; @@ -599,7 +604,7 @@ void graphics_circle_quadrant_fill_non_aa(GContext* ctx, GPoint p, uint16_t radi } } -static void graphics_fill_half_circle(GContext* ctx, int x0, int y0, uint16_t radius, +static void graphics_fill_half_circle(GContext *ctx, int x0, int y0, uint16_t radius, uint8_t section) { int f = 1 - radius; int ddF_x = 1; @@ -632,20 +637,20 @@ static void graphics_fill_half_circle(GContext* ctx, int x0, int y0, uint16_t ra } } -MOCKABLE void graphics_circle_fill_non_aa(GContext* ctx, GPoint p, uint16_t radius) { +MOCKABLE void graphics_circle_fill_non_aa(GContext *ctx, GPoint p, uint16_t radius) { prv_fill_horizontal_line(ctx, GPoint(p.x - radius, p.y), 2 * radius + 1); graphics_fill_half_circle(ctx, p.x, p.y, radius, GCornersAll); } #if PBL_COLOR -MOCKABLE void graphics_internal_circle_quadrant_fill_aa(GContext* ctx, GPoint p, uint16_t radius, +MOCKABLE void graphics_internal_circle_quadrant_fill_aa(GContext *ctx, GPoint p, uint16_t radius, GCornerMask quadrant) { // Radius cannot be smaller than 1 PBL_ASSERTN(radius > 0); prv_fill_oval_quadrant(ctx, p, radius, radius, 0, 0, quadrant); } -#endif // PBL_COLOR +#endif // PBL_COLOR // Returns x for f(x) = g(x) with f(x)=y and a line g(x) that goes through two given points a,b static int16_t prv_intersection_between_horizontal_and_line(Fixed_S16_3 progress, GPointPrecise top, @@ -655,8 +660,8 @@ static int16_t prv_intersection_between_horizontal_and_line(Fixed_S16_3 progress } return top.x.raw_value + (bottom.x.raw_value - top.x.raw_value) * - (progress.raw_value - top.y.raw_value) / - (bottom.y.raw_value - top.y.raw_value); + (progress.raw_value - top.y.raw_value) / + (bottom.y.raw_value - top.y.raw_value); } static void prv_swap_precise_points(GPointPrecise *p0, GPointPrecise *p1) { @@ -665,37 +670,33 @@ static void prv_swap_precise_points(GPointPrecise *p0, GPointPrecise *p1) { *p1 = tmp; } -static void prv_draw_scanline_collision_points(GContext *ctx, int16_t y, - int16_t left, int16_t right, - int16_t starting_edge, int16_t ending_edge, - bool ignore_close_angles) { +static void prv_draw_scanline_collision_points(GContext *ctx, int16_t y, int16_t left, + int16_t right, int16_t starting_edge, + int16_t ending_edge, bool ignore_close_angles) { if (starting_edge > ending_edge || (ignore_close_angles && starting_edge == ending_edge)) { // Two separate drawings... starting_edge = MAX(starting_edge, left); ending_edge = MIN(ending_edge, right); if (left <= ending_edge) { - graphics_private_draw_horizontal_line(ctx, y, - (Fixed_S16_3){.raw_value = left}, - (Fixed_S16_3){.raw_value = ending_edge - - FIXED_S16_3_ONE.raw_value}); + graphics_private_draw_horizontal_line( + ctx, y, (Fixed_S16_3){.raw_value = left}, + (Fixed_S16_3){.raw_value = ending_edge - FIXED_S16_3_ONE.raw_value}); } if (starting_edge <= right) { - graphics_private_draw_horizontal_line(ctx, y, - (Fixed_S16_3){.raw_value = starting_edge}, - (Fixed_S16_3){.raw_value = right - - FIXED_S16_3_ONE.raw_value}); + graphics_private_draw_horizontal_line( + ctx, y, (Fixed_S16_3){.raw_value = starting_edge}, + (Fixed_S16_3){.raw_value = right - FIXED_S16_3_ONE.raw_value}); } } else { starting_edge = (MAX(left, starting_edge)); ending_edge = (MIN(right, ending_edge)); if (starting_edge <= ending_edge) { - graphics_private_draw_horizontal_line(ctx, y, - (Fixed_S16_3){.raw_value = starting_edge}, - (Fixed_S16_3){.raw_value = ending_edge - - FIXED_S16_3_ONE.raw_value}); + graphics_private_draw_horizontal_line( + ctx, y, (Fixed_S16_3){.raw_value = starting_edge}, + (Fixed_S16_3){.raw_value = ending_edge - FIXED_S16_3_ONE.raw_value}); } } } @@ -715,15 +716,15 @@ static GCornerMask prv_get_full_quadrants(int8_t starting_quadrant, int8_t endin } static void prv_get_angles_mask_edge(Fixed_S16_3 y, GPointPrecise center, GCornerMask quadrant, - int16_t *top_edge, int16_t *bottom_edge, - GPointPrecise top, GPointPrecise bottom) { + int16_t *top_edge, int16_t *bottom_edge, GPointPrecise top, + GPointPrecise bottom) { // This function determines where scanline is in position to the angle line and sets // angle masking values accordingly if (quadrant & GCornersTop) { if (center.y.raw_value - y.raw_value <= bottom.y.raw_value) { if (center.y.raw_value - y.raw_value >= top.y.raw_value) { - *top_edge = prv_intersection_between_horizontal_and_line((Fixed_S16_3){.raw_value = - (center.y.raw_value - y.raw_value)}, top, bottom); + *top_edge = prv_intersection_between_horizontal_and_line( + (Fixed_S16_3){.raw_value = (center.y.raw_value - y.raw_value)}, top, bottom); } else { *top_edge = top.x.raw_value; } @@ -733,8 +734,8 @@ static void prv_get_angles_mask_edge(Fixed_S16_3 y, GPointPrecise center, GCorne } else { if (center.y.raw_value + y.raw_value >= top.y.raw_value) { if (center.y.raw_value + y.raw_value <= bottom.y.raw_value) { - *bottom_edge = prv_intersection_between_horizontal_and_line((Fixed_S16_3){.raw_value = - (center.y.raw_value + y.raw_value)}, top, bottom); + *bottom_edge = prv_intersection_between_horizontal_and_line( + (Fixed_S16_3){.raw_value = (center.y.raw_value + y.raw_value)}, top, bottom); } else { *bottom_edge = bottom.x.raw_value; } @@ -747,9 +748,10 @@ static void prv_get_angles_mask_edge(Fixed_S16_3 y, GPointPrecise center, GCorne T_STATIC EllipsisDrawConfig prv_calc_draw_config_ellipsis(int32_t angle_start, int32_t angle_end) { PBL_ASSERTN(angle_start <= angle_end); - EllipsisDrawConfig config = (EllipsisDrawConfig){(EllipsisPartDrawConfig){0, GCornerNone}, - GCornerNone, - (EllipsisPartDrawConfig){0, GCornerNone}}; + EllipsisDrawConfig config = (EllipsisDrawConfig){ + (EllipsisPartDrawConfig){0, GCornerNone}, GCornerNone, + (EllipsisPartDrawConfig){0, GCornerNone} + }; // Nothing to draw case: if (angle_end == angle_start) { return config; @@ -776,8 +778,8 @@ T_STATIC EllipsisDrawConfig prv_calc_draw_config_ellipsis(int32_t angle_start, i if (angle_end - angle_start > QUADRANT_ANGLE) { // Full quadrants: - config.full_quadrants = prv_get_full_quadrants(starting_quadrant_normalized, - ending_quadrant_normalized); + config.full_quadrants = + prv_get_full_quadrants(starting_quadrant_normalized, ending_quadrant_normalized); } } else { // Angles in different quadrants @@ -791,18 +793,17 @@ T_STATIC EllipsisDrawConfig prv_calc_draw_config_ellipsis(int32_t angle_start, i } // Full quadrants - config.full_quadrants = prv_get_full_quadrants(starting_quadrant_normalized, - ending_quadrant_normalized); + config.full_quadrants = + prv_get_full_quadrants(starting_quadrant_normalized, ending_quadrant_normalized); } return config; } -static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, - Fixed_S16_3 radius_outer_x, Fixed_S16_3 radius_outer_y, - Fixed_S16_3 radius_inner_x, Fixed_S16_3 radius_inner_y, - int32_t angle_start, int32_t angle_end) { - +static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, Fixed_S16_3 radius_outer_x, + Fixed_S16_3 radius_outer_y, Fixed_S16_3 radius_inner_x, + Fixed_S16_3 radius_inner_y, int32_t angle_start, + int32_t angle_end) { // Drawing config calculation const EllipsisDrawConfig config = prv_calc_draw_config_ellipsis(angle_start, angle_end); @@ -835,23 +836,21 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, (radius_inner_y.raw_value * radius_inner_y.raw_value) >> FIXED_S16_3_PRECISION; // Intersection points of angles and radiuses - GPointPrecise start_top = - prv_get_rotated_precise_point_for_ellipsis(center, - radius_outer_x.raw_value, radius_outer_y.raw_value, - config.start_quadrant.angle); - GPointPrecise end_top = - prv_get_rotated_precise_point_for_ellipsis(center, - radius_outer_x.raw_value, radius_outer_y.raw_value, - config.end_quadrant.angle); - - GPointPrecise start_bottom = (no_inner_ellipsis) ? center : - prv_get_rotated_precise_point_for_ellipsis(center, - radius_inner_x.raw_value, radius_inner_y.raw_value, - config.start_quadrant.angle); - GPointPrecise end_bottom = (no_inner_ellipsis) ? center : - prv_get_rotated_precise_point_for_ellipsis(center, - radius_inner_x.raw_value, radius_inner_y.raw_value, - config.end_quadrant.angle); + GPointPrecise start_top = prv_get_rotated_precise_point_for_ellipsis( + center, radius_outer_x.raw_value, radius_outer_y.raw_value, config.start_quadrant.angle); + GPointPrecise end_top = prv_get_rotated_precise_point_for_ellipsis( + center, radius_outer_x.raw_value, radius_outer_y.raw_value, config.end_quadrant.angle); + + GPointPrecise start_bottom = (no_inner_ellipsis) + ? center + : prv_get_rotated_precise_point_for_ellipsis( + center, radius_inner_x.raw_value, radius_inner_y.raw_value, + config.start_quadrant.angle); + GPointPrecise end_bottom = (no_inner_ellipsis) + ? center + : prv_get_rotated_precise_point_for_ellipsis( + center, radius_inner_x.raw_value, radius_inner_y.raw_value, + config.end_quadrant.angle); // Swapping top/bottom offset points if necessary if (start_top.y.raw_value > start_bottom.y.raw_value) { @@ -937,19 +936,19 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, // will return same starting/ending point, which might be invalid angle // We might also reject this data if delta of start/end angle is bigger than 180° Fixed_S16_3 y_middle = (Fixed_S16_3){.raw_value = y.raw_value - 4}; - prv_get_angles_mask_edge(y_middle, center, config.start_quadrant.quadrant, - &starting_edge, &ending_edge, start_top, start_bottom); - prv_get_angles_mask_edge(y_middle, center, config.end_quadrant.quadrant, - &ending_edge, &starting_edge, end_top, end_bottom); + prv_get_angles_mask_edge(y_middle, center, config.start_quadrant.quadrant, &starting_edge, + &ending_edge, start_top, start_bottom); + prv_get_angles_mask_edge(y_middle, center, config.end_quadrant.quadrant, &ending_edge, + &starting_edge, end_top, end_bottom); // Now we use only one with valuable data - same starting/ending is rejected if (starting_edge == ending_edge) { y_middle.integer++; - prv_get_angles_mask_edge(y_middle, center, config.start_quadrant.quadrant, - &starting_edge, &ending_edge, start_top, start_bottom); - prv_get_angles_mask_edge(y_middle, center, config.end_quadrant.quadrant, - &ending_edge, &starting_edge, end_top, end_bottom); + prv_get_angles_mask_edge(y_middle, center, config.start_quadrant.quadrant, &starting_edge, + &ending_edge, start_top, start_bottom); + prv_get_angles_mask_edge(y_middle, center, config.end_quadrant.quadrant, &ending_edge, + &starting_edge, end_top, end_bottom); } } @@ -965,13 +964,13 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, int16_t inner_left = center.x.raw_value - inner_edge; int16_t inner_right = center.x.raw_value + inner_edge; - prv_draw_scanline_collision_points(ctx, center.y.integer, left, inner_left, - starting_edge, ending_edge, ignore_close_angles); - prv_draw_scanline_collision_points(ctx, center.y.integer, inner_right, right, - starting_edge, ending_edge, ignore_close_angles); + prv_draw_scanline_collision_points(ctx, center.y.integer, left, inner_left, starting_edge, + ending_edge, ignore_close_angles); + prv_draw_scanline_collision_points(ctx, center.y.integer, inner_right, right, starting_edge, + ending_edge, ignore_close_angles); } else { - prv_draw_scanline_collision_points(ctx, center.y.integer, left, right, - starting_edge, ending_edge, ignore_close_angles); + prv_draw_scanline_collision_points(ctx, center.y.integer, left, right, starting_edge, + ending_edge, ignore_close_angles); } // After drawing the line we move scanline edge calculation offset @@ -984,7 +983,7 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, } // Main drawing loop - for (int i=draw_min; i < draw_max; i++, y.integer++) { + for (int i = draw_min; i < draw_max; i++, y.integer++) { // Separate min/max offsets for angles masking for lines drawn above and below center point int16_t top_starting_edge = center.x.raw_value - radius_outer_x.raw_value; int16_t top_ending_edge = center.x.raw_value + radius_outer_x.raw_value; @@ -993,10 +992,10 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, // If the circle is not full - calculate mask for angles if (!is_full_circle) { - prv_get_angles_mask_edge(y, center, config.start_quadrant.quadrant, - &top_starting_edge, &bottom_ending_edge, start_top, start_bottom); - prv_get_angles_mask_edge(y, center, config.end_quadrant.quadrant, - &top_ending_edge, &bottom_starting_edge, end_top, end_bottom); + prv_get_angles_mask_edge(y, center, config.start_quadrant.quadrant, &top_starting_edge, + &bottom_ending_edge, start_top, start_bottom); + prv_get_angles_mask_edge(y, center, config.end_quadrant.quadrant, &top_ending_edge, + &bottom_starting_edge, end_top, end_bottom); } // Calculate outer radius edges @@ -1054,57 +1053,49 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, void prv_fill_oval_in_rect(GContext *ctx, GRect rect, uint16_t inset_x, uint16_t inset_y, int32_t angle_start, int32_t angle_end) { // Cast to precision point - GPointPrecise center = GPointPrecise(((rect.origin.x << FIXED_S16_3_PRECISION) + - (rect.size.w << FIXED_S16_3_PRECISION) / 2), - ((rect.origin.y << FIXED_S16_3_PRECISION) + - (rect.size.h << FIXED_S16_3_PRECISION) / 2)); - - Fixed_S16_3 radius_outer_x = (Fixed_S16_3){.raw_value = - ((rect.size.w << FIXED_S16_3_PRECISION) / 2)}; - Fixed_S16_3 radius_outer_y = (Fixed_S16_3){.raw_value = - ((rect.size.h << FIXED_S16_3_PRECISION) / 2)}; - Fixed_S16_3 radius_inner_x = (Fixed_S16_3){.raw_value = - (((rect.size.w - inset_x * 2) << FIXED_S16_3_PRECISION) / 2)}; - Fixed_S16_3 radius_inner_y = (Fixed_S16_3){.raw_value = - (((rect.size.h - inset_y * 2) << FIXED_S16_3_PRECISION) / 2)}; - - prv_fill_oval_precise(ctx, center, radius_outer_x, radius_outer_y, - radius_inner_x, radius_inner_y, angle_start, angle_end); + GPointPrecise center = GPointPrecise( + ((rect.origin.x << FIXED_S16_3_PRECISION) + (rect.size.w << FIXED_S16_3_PRECISION) / 2), + ((rect.origin.y << FIXED_S16_3_PRECISION) + (rect.size.h << FIXED_S16_3_PRECISION) / 2)); + + Fixed_S16_3 radius_outer_x = + (Fixed_S16_3){.raw_value = ((rect.size.w << FIXED_S16_3_PRECISION) / 2)}; + Fixed_S16_3 radius_outer_y = + (Fixed_S16_3){.raw_value = ((rect.size.h << FIXED_S16_3_PRECISION) / 2)}; + Fixed_S16_3 radius_inner_x = + (Fixed_S16_3){.raw_value = (((rect.size.w - inset_x * 2) << FIXED_S16_3_PRECISION) / 2)}; + Fixed_S16_3 radius_inner_y = + (Fixed_S16_3){.raw_value = (((rect.size.h - inset_y * 2) << FIXED_S16_3_PRECISION) / 2)}; + + prv_fill_oval_precise(ctx, center, radius_outer_x, radius_outer_y, radius_inner_x, radius_inner_y, + angle_start, angle_end); } void prv_fill_oval(GContext *ctx, GPoint center, uint16_t outer_radius_x, uint16_t outer_radius_y, - uint16_t inner_radius_x, uint16_t inner_radius_y, - int32_t angle_start, int32_t angle_end) { - const GPointPrecise center_precise = (GPointPrecise) { - .x.integer = center.x, .x.fraction = FIXED_S16_3_HALF.raw_value, - .y.integer = center.y, .y.fraction = FIXED_S16_3_HALF.raw_value, - }; - - const Fixed_S16_3 outer_x_precise = (Fixed_S16_3){ - .integer = outer_radius_x, - .fraction = FIXED_S16_3_HALF.raw_value - }; - const Fixed_S16_3 outer_y_precise = (Fixed_S16_3){ - .integer = outer_radius_y, - .fraction = FIXED_S16_3_HALF.raw_value - }; - const Fixed_S16_3 inner_x_precise = (Fixed_S16_3){ - .integer = inner_radius_x, - .fraction = FIXED_S16_3_HALF.raw_value - }; - const Fixed_S16_3 inner_y_precise = (Fixed_S16_3){ - .integer = inner_radius_y, - .fraction = FIXED_S16_3_HALF.raw_value + uint16_t inner_radius_x, uint16_t inner_radius_y, int32_t angle_start, + int32_t angle_end) { + const GPointPrecise center_precise = (GPointPrecise){ + .x.integer = center.x, + .x.fraction = FIXED_S16_3_HALF.raw_value, + .y.integer = center.y, + .y.fraction = FIXED_S16_3_HALF.raw_value, }; - prv_fill_oval_precise(ctx, center_precise, outer_x_precise, outer_y_precise, - inner_x_precise, inner_y_precise, angle_start, angle_end); + const Fixed_S16_3 outer_x_precise = + (Fixed_S16_3){.integer = outer_radius_x, .fraction = FIXED_S16_3_HALF.raw_value}; + const Fixed_S16_3 outer_y_precise = + (Fixed_S16_3){.integer = outer_radius_y, .fraction = FIXED_S16_3_HALF.raw_value}; + const Fixed_S16_3 inner_x_precise = + (Fixed_S16_3){.integer = inner_radius_x, .fraction = FIXED_S16_3_HALF.raw_value}; + const Fixed_S16_3 inner_y_precise = + (Fixed_S16_3){.integer = inner_radius_y, .fraction = FIXED_S16_3_HALF.raw_value}; + + prv_fill_oval_precise(ctx, center_precise, outer_x_precise, outer_y_precise, inner_x_precise, + inner_y_precise, angle_start, angle_end); } -void prv_fill_oval_quadrant_precise(GContext *ctx, GPointPrecise point, - Fixed_S16_3 outer_radius_x, Fixed_S16_3 outer_radius_y, - Fixed_S16_3 inner_radius_x, Fixed_S16_3 inner_radius_y, - GCornerMask quadrant) { +void prv_fill_oval_quadrant_precise(GContext *ctx, GPointPrecise point, Fixed_S16_3 outer_radius_x, + Fixed_S16_3 outer_radius_y, Fixed_S16_3 inner_radius_x, + Fixed_S16_3 inner_radius_y, GCornerMask quadrant) { // Translate quadrants to angles if (quadrant == GCornerNone) { return; @@ -1118,14 +1109,14 @@ void prv_fill_oval_quadrant_precise(GContext *ctx, GPointPrecise point, angle_end = TRIG_MAX_ANGLE; } else { if (quadrant & radius_quadrants[0]) { - for (int i=QUADRANTS_NUM - 1; i >= 0; i--) { + for (int i = QUADRANTS_NUM - 1; i >= 0; i--) { if (!(quadrant & radius_quadrants[i])) { angle_start = ((i + 1) % 4) * (TRIG_MAX_ANGLE / 4); break; } } } else { - for (int i=1; i <= QUADRANTS_NUM; i++) { + for (int i = 1; i <= QUADRANTS_NUM; i++) { if (quadrant & radius_quadrants[i % 4]) { angle_start = i * (TRIG_MAX_ANGLE / 4); break; @@ -1134,14 +1125,14 @@ void prv_fill_oval_quadrant_precise(GContext *ctx, GPointPrecise point, } if (!(quadrant & radius_quadrants[0])) { - for (int i=QUADRANTS_NUM - 1; i >= 0; i--) { + for (int i = QUADRANTS_NUM - 1; i >= 0; i--) { if (quadrant & radius_quadrants[i]) { angle_end = ((i + 1) % 4) * (TRIG_MAX_ANGLE / 4); break; } } } else { - for (int i=1; i <= QUADRANTS_NUM; i++) { + for (int i = 1; i <= QUADRANTS_NUM; i++) { if (!(quadrant & radius_quadrants[i % 4])) { angle_end = i * (TRIG_MAX_ANGLE / 4); break; @@ -1154,44 +1145,37 @@ void prv_fill_oval_quadrant_precise(GContext *ctx, GPointPrecise point, angle_end += TRIG_MAX_ANGLE; } - prv_fill_oval_precise(ctx, point, outer_radius_x, outer_radius_y, - inner_radius_x, inner_radius_y, angle_start, angle_end); + prv_fill_oval_precise(ctx, point, outer_radius_x, outer_radius_y, inner_radius_x, inner_radius_y, + angle_start, angle_end); } -void prv_fill_oval_quadrant(GContext *ctx, GPoint point, - uint16_t outer_radius_x, uint16_t outer_radius_y, - uint16_t inner_radius_x, uint16_t inner_radius_y, - GCornerMask quadrant) { +void prv_fill_oval_quadrant(GContext *ctx, GPoint point, uint16_t outer_radius_x, + uint16_t outer_radius_y, uint16_t inner_radius_x, + uint16_t inner_radius_y, GCornerMask quadrant) { // Cast to precision point - const GPointPrecise center_precise = (GPointPrecise) { - .x.integer = point.x, .x.fraction = FIXED_S16_3_HALF.raw_value, - .y.integer = point.y, .y.fraction = FIXED_S16_3_HALF.raw_value, + const GPointPrecise center_precise = (GPointPrecise){ + .x.integer = point.x, + .x.fraction = FIXED_S16_3_HALF.raw_value, + .y.integer = point.y, + .y.fraction = FIXED_S16_3_HALF.raw_value, }; - const Fixed_S16_3 outer_x_precise = (Fixed_S16_3){ - .integer = outer_radius_x, - .fraction = FIXED_S16_3_HALF.raw_value - }; - const Fixed_S16_3 outer_y_precise = (Fixed_S16_3){ - .integer = outer_radius_y, - .fraction = FIXED_S16_3_HALF.raw_value - }; - const Fixed_S16_3 inner_x_precise = (Fixed_S16_3){ - .integer = inner_radius_x, - .fraction = FIXED_S16_3_HALF.raw_value - }; - const Fixed_S16_3 inner_y_precise = (Fixed_S16_3){ - .integer = inner_radius_y, - .fraction = FIXED_S16_3_HALF.raw_value - }; + const Fixed_S16_3 outer_x_precise = + (Fixed_S16_3){.integer = outer_radius_x, .fraction = FIXED_S16_3_HALF.raw_value}; + const Fixed_S16_3 outer_y_precise = + (Fixed_S16_3){.integer = outer_radius_y, .fraction = FIXED_S16_3_HALF.raw_value}; + const Fixed_S16_3 inner_x_precise = + (Fixed_S16_3){.integer = inner_radius_x, .fraction = FIXED_S16_3_HALF.raw_value}; + const Fixed_S16_3 inner_y_precise = + (Fixed_S16_3){.integer = inner_radius_y, .fraction = FIXED_S16_3_HALF.raw_value}; prv_fill_oval_quadrant_precise(ctx, center_precise, outer_x_precise, outer_y_precise, inner_x_precise, inner_y_precise, quadrant); } MOCKABLE void graphics_draw_arc_precise_internal(GContext *ctx, GPointPrecise center, - Fixed_S16_3 radius, - int32_t angle_start, int32_t angle_end) { + Fixed_S16_3 radius, int32_t angle_start, + int32_t angle_end) { uint16_t stroke_width = ctx->draw_state.stroke_width; // We accept only .0 and .5 precision for now: @@ -1213,12 +1197,12 @@ MOCKABLE void graphics_draw_arc_precise_internal(GContext *ctx, GPointPrecise ce } // TODO: Adapt this to support new precision, for now this is faked by regular fill // This will be done with PBL-24777 -/* - else if (stroke_width == 1) { - prv_circle_arc_draw_1px(ctx, center, radius, angle_start, angle_end); - return; - } -*/ + /* + else if (stroke_width == 1) { + prv_circle_arc_draw_1px(ctx, center, radius, angle_start, angle_end); + return; + } + */ // Color hack to draw using stroke_color instead of fill_color GColor tmp_color = ctx->draw_state.fill_color; ctx->draw_state.fill_color = ctx->draw_state.stroke_color; @@ -1266,8 +1250,8 @@ void graphics_draw_arc_internal(GContext *ctx, GPoint center, uint16_t radius, i graphics_draw_arc_precise_internal(ctx, fixed_center, fixed_radius, angle_start, angle_end); } -void graphics_draw_arc(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, - int32_t angle_start, int32_t angle_end) { +void graphics_draw_arc(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, int32_t angle_start, + int32_t angle_end) { GPointPrecise center; Fixed_S16_3 radius; grect_polar_calc_values(&rect, scale_mode, ¢er, &radius); @@ -1275,8 +1259,8 @@ void graphics_draw_arc(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, } MOCKABLE void graphics_fill_radial_precise_internal(GContext *ctx, GPointPrecise center, - Fixed_S16_3 radius_inner, Fixed_S16_3 - radius_outer, int32_t angle_start, + Fixed_S16_3 radius_inner, + Fixed_S16_3 radius_outer, int32_t angle_start, int32_t angle_end) { // This function is going to be replaced with function that will support drawing of ellipsis // as documented in PBL-23640 @@ -1302,29 +1286,28 @@ MOCKABLE void graphics_fill_radial_precise_internal(GContext *ctx, GPointPrecise // TODO: Adapt this to support new precision, for now this is faked by regular fill // This will be done with PBL-24777 -/* - if (radius_outer.raw_value - radius_inner.raw_value == FIXED_S16_3_ONE.raw_value) { - // Color hack - GColor tmp_color = ctx->draw_state.stroke_color; - ctx->draw_state.stroke_color = ctx->draw_state.fill_color; + /* + if (radius_outer.raw_value - radius_inner.raw_value == FIXED_S16_3_ONE.raw_value) { + // Color hack + GColor tmp_color = ctx->draw_state.stroke_color; + ctx->draw_state.stroke_color = ctx->draw_state.fill_color; - // prv_circle_arc_draw_1px(ctx, center, radius_outer, angle_start, angle_end); + // prv_circle_arc_draw_1px(ctx, center, radius_outer, angle_start, angle_end); - // Restore color - ctx->draw_state.stroke_color = tmp_color; + // Restore color + ctx->draw_state.stroke_color = tmp_color; - // We're done here - return; - } else -*/ + // We're done here + return; + } else + */ if (radius_outer.raw_value - radius_inner.raw_value < FIXED_S16_3_ONE.raw_value) { // Abort, abort! return; } - prv_fill_oval_precise(ctx, center, radius_outer, radius_outer, - radius_inner, radius_inner, angle_start, angle_end); - + prv_fill_oval_precise(ctx, center, radius_outer, radius_outer, radius_inner, radius_inner, + angle_start, angle_end); } void graphics_fill_radial_internal(GContext *ctx, GPoint center, uint16_t radius_inner, @@ -1343,15 +1326,14 @@ void graphics_fill_radial_internal(GContext *ctx, GPoint center, uint16_t radius } void graphics_fill_radial(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, - uint16_t inset_thickness, - int32_t angle_start, int32_t angle_end) { + uint16_t inset_thickness, int32_t angle_start, int32_t angle_end) { GPointPrecise center; Fixed_S16_3 radius_outer; grect_polar_calc_values(&rect, scale_mode, ¢er, &radius_outer); const Fixed_S16_3 radius_inner = - Fixed_S16_3(radius_outer.raw_value - inset_thickness * FIXED_S16_3_ONE.raw_value); - graphics_fill_radial_precise_internal(ctx, center, radius_inner, radius_outer, - angle_start, angle_end); + Fixed_S16_3(radius_outer.raw_value - inset_thickness * FIXED_S16_3_ONE.raw_value); + graphics_fill_radial_precise_internal(ctx, center, radius_inner, radius_outer, angle_start, + angle_end); } void graphics_fill_oval(GContext *ctx, GRect rect, GOvalScaleMode scale_mode) { @@ -1360,7 +1342,7 @@ void graphics_fill_oval(GContext *ctx, GRect rect, GOvalScaleMode scale_mode) { graphics_fill_radial(ctx, rect, scale_mode, inset_thickness, 0, TRIG_MAX_ANGLE); } -void graphics_fill_circle(GContext* ctx, GPoint p, uint16_t radius) { +void graphics_fill_circle(GContext *ctx, GPoint p, uint16_t radius) { PBL_ASSERTN(ctx); if (ctx->lock) { return; @@ -1389,9 +1371,8 @@ void graphics_fill_circle(GContext* ctx, GPoint p, uint16_t radius) { GPointPrecise gpoint_from_polar_precise(const GPointPrecise *precise_center, uint16_t precise_radius, int32_t angle) { const uint32_t normalized_angle = normalize_angle(angle); - const GPointPrecise precise_perimeter_point = prv_get_rotated_precise_point(*precise_center, - precise_radius, - normalized_angle); + const GPointPrecise precise_perimeter_point = + prv_get_rotated_precise_point(*precise_center, precise_radius, normalized_angle); return precise_perimeter_point; } @@ -1402,14 +1383,11 @@ GPoint gpoint_from_polar_internal(const GPoint *center, uint16_t radius, int32_t const GPointPrecise precise_center = GPointPreciseFromGPoint((*center)); const uint16_t precise_radius = (uint16_t)(radius << GPOINT_PRECISE_PRECISION); - const GPointPrecise result = gpoint_from_polar_precise(&precise_center, precise_radius, - angle); + const GPointPrecise result = gpoint_from_polar_precise(&precise_center, precise_radius, angle); return GPointFromGPointPrecise(result); } - -GPointPrecise prv_gpointprecise_from_polar(GRect *rect, GOvalScaleMode scale_mode, - int32_t angle) { +GPointPrecise prv_gpointprecise_from_polar(GRect *rect, GOvalScaleMode scale_mode, int32_t angle) { GPointPrecise center; Fixed_S16_3 radius; grect_polar_calc_values(rect, scale_mode, ¢er, &radius); @@ -1425,11 +1403,13 @@ GRect grect_centered_internal(const GPointPrecise *center, GSize size) { size.w = ABS(size.w); size.h = ABS(size.h); const int16_t FIXED_HALF = FIXED_S16_3_HALF.raw_value; - return (GRect) { - // Adding 0.5 to x and y here will ensure we have rounded up when we throw away the fraction - .origin.x = (center->x.raw_value - (size.w * FIXED_HALF) + FIXED_HALF) >> FIXED_S16_3_PRECISION, - .origin.y = (center->y.raw_value - (size.h * FIXED_HALF) + FIXED_HALF) >> FIXED_S16_3_PRECISION, - .size = size, + return (GRect){ + // Adding 0.5 to x and y here will ensure we have rounded up when we throw away the fraction + .origin.x = + (center->x.raw_value - (size.w * FIXED_HALF) + FIXED_HALF) >> FIXED_S16_3_PRECISION, + .origin.y = + (center->y.raw_value - (size.h * FIXED_HALF) + FIXED_HALF) >> FIXED_S16_3_PRECISION, + .size = size, }; } @@ -1467,10 +1447,12 @@ void grect_polar_calc_values(const GRect *r, GOvalScaleMode scale_mode, GPointPr } if (center) { // origin + (origin + len)/2 - 0.5 == (origin * 2 + len) / 2 - 0.5 - const int16_t x = (rect.size.w <= 0) ? rect.origin.x * FIXED_ONE : - (((2 * rect.origin.x + rect.size.w) * FIXED_ONE) / 2 - FIXED_HALF); - const int16_t y = (rect.size.h <= 0) ? rect.origin.y * FIXED_ONE : - (((2 * rect.origin.y + rect.size.h) * FIXED_ONE) / 2 - FIXED_HALF); - *center = (GPointPrecise) {.x = Fixed_S16_3(x), .y = Fixed_S16_3(y)}; + const int16_t x = (rect.size.w <= 0) + ? rect.origin.x * FIXED_ONE + : (((2 * rect.origin.x + rect.size.w) * FIXED_ONE) / 2 - FIXED_HALF); + const int16_t y = (rect.size.h <= 0) + ? rect.origin.y * FIXED_ONE + : (((2 * rect.origin.y + rect.size.h) * FIXED_ONE) / 2 - FIXED_HALF); + *center = (GPointPrecise){.x = Fixed_S16_3(x), .y = Fixed_S16_3(y)}; } } diff --git a/src/fw/applib/graphics/graphics_circle.h b/src/fw/applib/graphics/graphics_circle.h index 73a4f1aa7e..bdfd004056 100644 --- a/src/fw/applib/graphics/graphics_circle.h +++ b/src/fw/applib/graphics/graphics_circle.h @@ -7,21 +7,21 @@ //! @internal //! Draws a quadrant of a circle based on what is set in the context for stroke width and //! antialiasing. -void graphics_circle_quadrant_draw(GContext* ctx, GPoint p, uint16_t radius, GCornerMask quadrant); +void graphics_circle_quadrant_draw(GContext *ctx, GPoint p, uint16_t radius, GCornerMask quadrant); //! @internal //! Fills an antialiased circle in quadrants -MOCKABLE void graphics_internal_circle_quadrant_fill_aa(GContext* ctx, GPoint p, - uint16_t radius, GCornerMask quadrant); +MOCKABLE void graphics_internal_circle_quadrant_fill_aa(GContext *ctx, GPoint p, uint16_t radius, + GCornerMask quadrant); //! @internal //! Fills a non-antialiased circle in quadrants -void graphics_circle_quadrant_fill_non_aa(GContext* ctx, GPoint p, - uint16_t radius, GCornerMask quadrant); +void graphics_circle_quadrant_fill_non_aa(GContext *ctx, GPoint p, uint16_t radius, + GCornerMask quadrant); //! @internal //! Fills a non-antialiased circle -MOCKABLE void graphics_circle_fill_non_aa(GContext* ctx, GPoint p, uint16_t radius); +MOCKABLE void graphics_circle_fill_non_aa(GContext *ctx, GPoint p, uint16_t radius); //! @internal //! Draws an arc with fixed-point precision @@ -44,13 +44,13 @@ void graphics_fill_radial_precise_internal(GContext *ctx, GPointPrecise center, //! @param ctx The destination graphics context in which to draw //! @param p The center point of the circle //! @param radius The radius in pixels -void graphics_draw_circle(GContext* ctx, GPoint p, uint16_t radius); +void graphics_draw_circle(GContext *ctx, GPoint p, uint16_t radius); //! Fills a circle in the current fill color //! @param ctx The destination graphics context in which to draw //! @param p The center point of the circle //! @param radius The radius in pixels -void graphics_fill_circle(GContext* ctx, GPoint p, uint16_t radius); +void graphics_fill_circle(GContext *ctx, GPoint p, uint16_t radius); //! Values to specify how a given rectangle should be used to derive an oval shape. //! @see \ref graphics_fill_radial_internal @@ -77,8 +77,8 @@ typedef enum { //! @param angle_start Radial starting angle. Use \ref DEG_TO_TRIGANGLE to easily convert degrees //! to the appropriate value. //! @param angle_end Radial finishing angle. If smaller than `angle_start`, nothing will be drawn. -void graphics_draw_arc(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, - int32_t angle_start, int32_t angle_end); +void graphics_draw_arc(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, int32_t angle_start, + int32_t angle_end); //! @internal void graphics_draw_arc_internal(GContext *ctx, GPoint center, uint16_t radius, int32_t angle_start, @@ -101,8 +101,7 @@ void graphics_draw_arc_internal(GContext *ctx, GPoint center, uint16_t radius, i //! to the appropriate value. //! @param angle_end Radial finishing angle. If smaller than `angle_start`, nothing will be drawn. void graphics_fill_radial(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, - uint16_t inset_thickness, - int32_t angle_start, int32_t angle_end); + uint16_t inset_thickness, int32_t angle_start, int32_t angle_end); //! @internal void graphics_fill_radial_internal(GContext *ctx, GPoint center, uint16_t radius_inner, diff --git a/src/fw/applib/graphics/graphics_circle_private.h b/src/fw/applib/graphics/graphics_circle_private.h index b92d7e3b29..5e00f42268 100644 --- a/src/fw/applib/graphics/graphics_circle_private.h +++ b/src/fw/applib/graphics/graphics_circle_private.h @@ -5,11 +5,12 @@ #include "gtypes.h" // For arc/radial fill algorithms -#define QUADRANTS_NUM 4 // Just in case of fluctuation +#define QUADRANTS_NUM 4 // Just in case of fluctuation #define QUADRANT_ANGLE (TRIG_MAX_ANGLE / QUADRANTS_NUM) -static GCornerMask radius_quadrants[QUADRANTS_NUM] = -{ GCornerTopRight, GCornerBottomRight, GCornerBottomLeft, GCornerTopLeft }; +static GCornerMask radius_quadrants[QUADRANTS_NUM] = { + GCornerTopRight, GCornerBottomRight, GCornerBottomLeft, GCornerTopLeft +}; typedef struct { int32_t angle; @@ -30,16 +31,15 @@ typedef struct { #if PBL_COLOR static GCornerMultiplier quadrant_mask_mul[] = { - {GCornerTopRight, 1, -1}, - {GCornerBottomRight, 1, 1}, - {GCornerBottomLeft, -1, 1}, - {GCornerTopLeft, -1, -1} + {GCornerTopRight, 1, -1}, + {GCornerBottomRight, 1, 1}, + {GCornerBottomLeft, -1, 1}, + {GCornerTopLeft, -1, -1} }; #endif T_STATIC EllipsisDrawConfig prv_calc_draw_config_ellipsis(int32_t angle_start, int32_t angle_end); -void prv_fill_oval_quadrant(GContext *ctx, GPoint point, - uint16_t outer_radius_x, uint16_t outer_radius_y, - uint16_t inner_radius_x, uint16_t inner_radius_y, - GCornerMask quadrant); +void prv_fill_oval_quadrant(GContext *ctx, GPoint point, uint16_t outer_radius_x, + uint16_t outer_radius_y, uint16_t inner_radius_x, + uint16_t inner_radius_y, GCornerMask quadrant); diff --git a/src/fw/applib/graphics/graphics_line.c b/src/fw/applib/graphics/graphics_line.c index c498f0519b..9945350cb8 100644 --- a/src/fw/applib/graphics/graphics_line.c +++ b/src/fw/applib/graphics/graphics_line.c @@ -10,7 +10,7 @@ #define MINIMUM_PRECISE_STROKE_WIDTH 2 -MOCKABLE void graphics_line_draw_1px_non_aa(GContext* ctx, GPoint p0, GPoint p1) { +MOCKABLE void graphics_line_draw_1px_non_aa(GContext *ctx, GPoint p0, GPoint p1) { p0.x += ctx->draw_state.drawing_box.origin.x; p1.x += ctx->draw_state.drawing_box.origin.x; p0.y += ctx->draw_state.drawing_box.origin.y; @@ -54,7 +54,7 @@ MOCKABLE void graphics_line_draw_1px_non_aa(GContext* ctx, GPoint p0, GPoint p1) } #if PBL_COLOR -MOCKABLE void graphics_line_draw_1px_aa(GContext* ctx, GPoint p0, GPoint p1) { +MOCKABLE void graphics_line_draw_1px_aa(GContext *ctx, GPoint p0, GPoint p1) { // Implementation of Wu-Xiang fast anti-aliased line drawing algorithm // Points over which we're going to iterate adjusted to drawing_box @@ -79,8 +79,12 @@ MOCKABLE void graphics_line_draw_1px_aa(GContext* ctx, GPoint p0, GPoint p1) { // Make sure the line runs top to bottom if (y1 > y2) { - tmp = y1; y1 = y2; y2 = tmp; - tmp = x1; x1 = x2; x2 = tmp; + tmp = y1; + y1 = y2; + y2 = tmp; + tmp = x1; + x1 = x2; + x2 = tmp; } // Draw the initial pixel @@ -106,8 +110,8 @@ MOCKABLE void graphics_line_draw_1px_aa(GContext* ctx, GPoint p0, GPoint p1) { } graphics_private_draw_horizontal_line_prepared(ctx, framebuffer, &ctx->draw_state.clip_box, y1, - (Fixed_S16_3) {.integer = start}, - (Fixed_S16_3) {.integer = end}, stroke_color); + (Fixed_S16_3){.integer = start}, + (Fixed_S16_3){.integer = end}, stroke_color); } else if (dx == 0) { // Vertical line graphics_private_draw_vertical_line_prepared(ctx, framebuffer, &ctx->draw_state.clip_box, x1, @@ -139,7 +143,7 @@ MOCKABLE void graphics_line_draw_1px_aa(GContext* ctx, GPoint p0, GPoint p1) { // Y-major line; calculate 16-bit fixed-point fractional part of a // pixel that X advances each time Y advances 1 pixel, truncating the // result so that we won't overrun the endpoint along the X axis - error_adj = ((uint32_t)(dx) << 16) / (uint32_t) dy; + error_adj = ((uint32_t)(dx) << 16) / (uint32_t)dy; // Draw all pixels other than the first and last while (--dy) { @@ -164,15 +168,15 @@ MOCKABLE void graphics_line_draw_1px_aa(GContext* ctx, GPoint p0, GPoint p1) { stroke_color); } else { // It's an X-major line - error_adj = ((uint32_t) dy << 16) / (uint32_t) dx; + error_adj = ((uint32_t)dy << 16) / (uint32_t)dx; // Draw all pixels other than the first and last while (--dx) { error_acc_temp = error_acc; error_acc += error_adj; if (error_acc <= error_acc_temp) { - // The error accumulator turned over, so advance the Y coord - y1++; + // The error accumulator turned over, so advance the Y coord + y1++; } x1 += xi; weighting = error_acc >> intensity_shift; @@ -190,7 +194,7 @@ MOCKABLE void graphics_line_draw_1px_aa(GContext* ctx, GPoint p0, GPoint p1) { // Release the framebuffer after we're done graphics_release_frame_buffer(ctx, framebuffer); } -#endif // PBL_COLOR +#endif // PBL_COLOR static Fixed_S16_3 prv_get_circle_border_precise(int16_t y, uint16_t radius) { // This is so we operate in middle of the pixel, not on the edge @@ -200,7 +204,8 @@ static Fixed_S16_3 prv_get_circle_border_precise(int16_t y, uint16_t radius) { } static void prv_calc_cap_prepared(Fixed_S16_3 cap_center, Fixed_S16_3 cap_center_offset, - Fixed_S16_3 cap_radius, Fixed_S16_3 progress, Fixed_S16_3 *min, Fixed_S16_3 *max) { + Fixed_S16_3 cap_radius, Fixed_S16_3 progress, Fixed_S16_3 *min, + Fixed_S16_3 *max) { if (progress.raw_value >= cap_center.raw_value - cap_radius.raw_value && progress.raw_value <= cap_center.raw_value + cap_radius.raw_value) { int16_t circle_min; @@ -211,15 +216,17 @@ static void prv_calc_cap_prepared(Fixed_S16_3 cap_center, Fixed_S16_3 cap_center if (progress.raw_value <= cap_center.raw_value) { // Top part of the circle - Fixed_S16_3 lookup_val = prv_get_circle_border_precise(cap_center.raw_value - - progress.raw_value, cap_radius.raw_value + FIXED_S16_3_ONE.raw_value); + Fixed_S16_3 lookup_val = + prv_get_circle_border_precise(cap_center.raw_value - progress.raw_value, + cap_radius.raw_value + FIXED_S16_3_ONE.raw_value); circle_min = p_offset - r8 + lookup_val.raw_value; circle_max = p_offset + r8 - lookup_val.raw_value; } else { // Bottom part of the circle - Fixed_S16_3 lookup_val = prv_get_circle_border_precise(progress.raw_value - - cap_center.raw_value, cap_radius.raw_value + FIXED_S16_3_ONE.raw_value); + Fixed_S16_3 lookup_val = + prv_get_circle_border_precise(progress.raw_value - cap_center.raw_value, + cap_radius.raw_value + FIXED_S16_3_ONE.raw_value); circle_min = p_offset - r8 + lookup_val.raw_value; circle_max = p_offset + r8 - lookup_val.raw_value; } @@ -229,28 +236,28 @@ static void prv_calc_cap_prepared(Fixed_S16_3 cap_center, Fixed_S16_3 cap_center } } -static void prv_calc_cap_horiz(GPointPrecise *line_end_point, Fixed_S16_3 cap_radius, - int16_t y, Fixed_S16_3 *left_margin, Fixed_S16_3 *right_margin) { +static void prv_calc_cap_horiz(GPointPrecise *line_end_point, Fixed_S16_3 cap_radius, int16_t y, + Fixed_S16_3 *left_margin, Fixed_S16_3 *right_margin) { // This function will calculate edges of the cap for stroked line using horizontal lines Fixed_S16_3 progress = (Fixed_S16_3){.integer = y}; - prv_calc_cap_prepared(line_end_point->y, line_end_point->x, - cap_radius, progress, left_margin, right_margin); + prv_calc_cap_prepared(line_end_point->y, line_end_point->x, cap_radius, progress, left_margin, + right_margin); } -static void prv_calc_cap_vert(GPointPrecise *line_end_point, Fixed_S16_3 cap_radius, - int16_t x, Fixed_S16_3 *top_margin, Fixed_S16_3 *bottom_margin) { +static void prv_calc_cap_vert(GPointPrecise *line_end_point, Fixed_S16_3 cap_radius, int16_t x, + Fixed_S16_3 *top_margin, Fixed_S16_3 *bottom_margin) { // This function will calculate edges of the cap for stroked line using vertical lines Fixed_S16_3 progress = (Fixed_S16_3){.integer = x}; - prv_calc_cap_prepared(line_end_point->x, line_end_point->y, - cap_radius, progress, top_margin, bottom_margin); + prv_calc_cap_prepared(line_end_point->x, line_end_point->y, cap_radius, progress, top_margin, + bottom_margin); } // Finds edge points of the rectangle and returns true if line is vertically dominant static bool prv_calc_far_points(GPointPrecise *p0, GPointPrecise *p1, Fixed_S16_3 radius, - GPointPrecise *far_top, GPointPrecise *far_bottom, - GPointPrecise *far_left, GPointPrecise *far_right) { + GPointPrecise *far_top, GPointPrecise *far_bottom, + GPointPrecise *far_left, GPointPrecise *far_right) { // Increase precision for square root function so we wont lose results when p0 and p1 // are closer to each other than 1px on screen const int64_t fixed_precision = 4; @@ -346,8 +353,8 @@ static bool prv_calc_far_points(GPointPrecise *p0, GPointPrecise *p1, Fixed_S16_ return false; } -void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecise p1, - uint8_t width) { +void prv_draw_stroked_line_precise(GContext *ctx, GPointPrecise p0, GPointPrecise p1, + uint8_t width) { // This function will draw thick line on the screen using following technique: // - calculate offset points of the line // - calculate margin for the round caps at the end of the line @@ -362,8 +369,8 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis Fixed_S16_3 radius = (Fixed_S16_3){.raw_value = ((width - 1) * FIXED_S16_3_ONE.raw_value) / 2}; // Check if the line is in fact point and lies exactly on the pixel - if (p0.x.raw_value == p1.x.raw_value && p0.y.raw_value == p1.y.raw_value && - p0.x.fraction == 0 && p0.y.fraction == 0) { + if (p0.x.raw_value == p1.x.raw_value && p0.y.raw_value == p1.y.raw_value && p0.x.fraction == 0 && + p0.y.fraction == 0) { // Color hack const GColor temp_color = ctx->draw_state.fill_color; @@ -384,9 +391,8 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis GPointPrecise far_left; GPointPrecise far_right; - bool vertical = prv_calc_far_points(&p0, &p1, radius, - &far_top, &far_bottom, - &far_left, &far_right); + bool vertical = + prv_calc_far_points(&p0, &p1, radius, &far_top, &far_bottom, &far_left, &far_right); // To compensate for rounding errors we need to add half of the precision in specific places // - we add on top if line is leaning backward @@ -397,8 +403,8 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis bool delta_y_is_positive = ((p1.y.raw_value - p0.y.raw_value) >= 0); bool add_on_top = (delta_x_is_positive == delta_y_is_positive); - uint8_t add_top = (add_on_top)? (FIXED_S16_3_ONE.raw_value / 2) : 0; - uint8_t add_bottom = (!add_on_top)? (FIXED_S16_3_ONE.raw_value / 2) : 0; + uint8_t add_top = (add_on_top) ? (FIXED_S16_3_ONE.raw_value / 2) : 0; + uint8_t add_bottom = (!add_on_top) ? (FIXED_S16_3_ONE.raw_value / 2) : 0; const int8_t fraction_mask = 0x7; @@ -418,8 +424,8 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis // Drawing loop: Iterates over horizontal lines // As part of optimisation, this algorithm is moving between drawing boundaries, // so drawing box has to be subtracted from its clipping extremes - const int16_t clip_min_y = ctx->draw_state.clip_box.origin.y - - ctx->draw_state.drawing_box.origin.y; + const int16_t clip_min_y = + ctx->draw_state.clip_box.origin.y - ctx->draw_state.drawing_box.origin.y; const int16_t clip_max_y = clip_min_y + ctx->draw_state.clip_box.size.h; const int16_t y_min = CLIP(top_point >> FIXED_S16_3_PRECISION, clip_min_y, clip_max_y); const int16_t y_max = CLIP(bottom_point >> FIXED_S16_3_PRECISION, clip_min_y, clip_max_y); @@ -446,10 +452,11 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis // Find edges for upper cap GPointPrecise top_point_tmp = (p0.y.raw_value < p1.y.raw_value) ? p0 : p1; - Fixed_S16_3 progress_line = (Fixed_S16_3){.raw_value = (y * FIXED_S16_3_ONE.raw_value + - FIXED_S16_3_ONE.raw_value / 2)}; - prv_calc_cap_prepared(top_point_tmp.y, top_point_tmp.x, radius, - progress_line, &left_margin, &right_margin); + Fixed_S16_3 progress_line = (Fixed_S16_3){ + .raw_value = (y * FIXED_S16_3_ONE.raw_value + FIXED_S16_3_ONE.raw_value / 2) + }; + prv_calc_cap_prepared(top_point_tmp.y, top_point_tmp.x, radius, progress_line, &left_margin, + &right_margin); // Finally draw line if (left_margin.raw_value <= right_margin.raw_value) { @@ -481,17 +488,21 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis // TODO: ^^ also possible avoid of following logic to avoid division by zero // Main part of the stroked line if (lm_p1.y.raw_value != lm_p0.y.raw_value) { - left_margin.raw_value = lm_p0.x.raw_value + ((lm_p1.x.raw_value - lm_p0.x.raw_value) - * (y - ((lm_p0.y.raw_value + add_top) / FIXED_S16_3_ONE.raw_value))) - * FIXED_S16_3_ONE.raw_value / (lm_p1.y.raw_value - lm_p0.y.raw_value); + left_margin.raw_value = + lm_p0.x.raw_value + + ((lm_p1.x.raw_value - lm_p0.x.raw_value) * + (y - ((lm_p0.y.raw_value + add_top) / FIXED_S16_3_ONE.raw_value))) * + FIXED_S16_3_ONE.raw_value / (lm_p1.y.raw_value - lm_p0.y.raw_value); } else { left_margin.raw_value = lm_p0.x.raw_value; } if (rm_p1.y.raw_value != rm_p0.y.raw_value) { - right_margin.raw_value = rm_p0.x.raw_value + ((rm_p1.x.raw_value - rm_p0.x.raw_value) - * (y - ((rm_p0.y.raw_value + add_bottom) / FIXED_S16_3_ONE.raw_value))) - * FIXED_S16_3_ONE.raw_value / (rm_p1.y.raw_value - rm_p0.y.raw_value); + right_margin.raw_value = + rm_p0.x.raw_value + + ((rm_p1.x.raw_value - rm_p0.x.raw_value) * + (y - ((rm_p0.y.raw_value + add_bottom) / FIXED_S16_3_ONE.raw_value))) * + FIXED_S16_3_ONE.raw_value / (rm_p1.y.raw_value - rm_p0.y.raw_value); } else { right_margin.raw_value = rm_p0.x.raw_value; } @@ -517,10 +528,11 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis // Find edges for bottom cap GPointPrecise bottom_point_tmp = (p0.y.raw_value > p1.y.raw_value) ? p0 : p1; - Fixed_S16_3 progress_line = (Fixed_S16_3){.raw_value = (y * FIXED_S16_3_ONE.raw_value - - FIXED_S16_3_ONE.raw_value / 2)}; - prv_calc_cap_prepared(bottom_point_tmp.y, bottom_point_tmp.x, radius, - progress_line, &left_margin, &right_margin); + Fixed_S16_3 progress_line = (Fixed_S16_3){ + .raw_value = (y * FIXED_S16_3_ONE.raw_value - FIXED_S16_3_ONE.raw_value / 2) + }; + prv_calc_cap_prepared(bottom_point_tmp.y, bottom_point_tmp.x, radius, progress_line, + &left_margin, &right_margin); // Finally draw line if (left_margin.raw_value <= right_margin.raw_value) { @@ -536,21 +548,23 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis GPointPrecise bm_p0 = far_left; GPointPrecise bm_p1 = far_bottom; - const int8_t fraction_for_left = (MIN(p0.x.raw_value, p1.x.raw_value) - radius.raw_value) - & fraction_mask; - const int8_t fraction_for_right = (MAX(p0.x.raw_value, p1.x.raw_value) + radius.raw_value) - & fraction_mask; + const int8_t fraction_for_left = + (MIN(p0.x.raw_value, p1.x.raw_value) - radius.raw_value) & fraction_mask; + const int8_t fraction_for_right = + (MAX(p0.x.raw_value, p1.x.raw_value) + radius.raw_value) & fraction_mask; // Drawing loop: Iterates over vertical lines from left to right // As part of optimisation, this algorithm is moving between drawing boundaries, // so drawing box has to be subtracted from its clipping extremes - const int16_t clip_min_x = ctx->draw_state.clip_box.origin.x - - ctx->draw_state.drawing_box.origin.x; + const int16_t clip_min_x = + ctx->draw_state.clip_box.origin.x - ctx->draw_state.drawing_box.origin.x; const int16_t clip_max_x = clip_min_x + ctx->draw_state.clip_box.size.w; - const int16_t x_min = CLIP((MIN(p0.x.raw_value, p1.x.raw_value) - radius.raw_value) - >> FIXED_S16_3_PRECISION, clip_min_x, clip_max_x); - const int16_t x_max = CLIP((MAX(p0.x.raw_value, p1.x.raw_value) + radius.raw_value) - >> FIXED_S16_3_PRECISION, clip_min_x, clip_max_x); + const int16_t x_min = + CLIP((MIN(p0.x.raw_value, p1.x.raw_value) - radius.raw_value) >> FIXED_S16_3_PRECISION, + clip_min_x, clip_max_x); + const int16_t x_max = + CLIP((MAX(p0.x.raw_value, p1.x.raw_value) + radius.raw_value) >> FIXED_S16_3_PRECISION, + clip_min_x, clip_max_x); // Blending of first line if (fraction_for_left != 0) { @@ -574,10 +588,11 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis // Find edges for left cap GPointPrecise left_point_tmp = (p0.y.raw_value < p1.y.raw_value) ? p0 : p1; - Fixed_S16_3 progress_line = (Fixed_S16_3){.raw_value = (x * FIXED_S16_3_ONE.raw_value + - FIXED_S16_3_ONE.raw_value / 2)}; - prv_calc_cap_prepared(left_point_tmp.x, left_point_tmp.y, radius, - progress_line, &top_margin, &bottom_margin); + Fixed_S16_3 progress_line = (Fixed_S16_3){ + .raw_value = (x * FIXED_S16_3_ONE.raw_value + FIXED_S16_3_ONE.raw_value / 2) + }; + prv_calc_cap_prepared(left_point_tmp.x, left_point_tmp.y, radius, progress_line, &top_margin, + &bottom_margin); // Finally draw line if (top_margin.raw_value <= bottom_margin.raw_value) { @@ -607,18 +622,21 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis if (x >= far_left.x.integer && x <= far_right.x.integer) { // Main part of the stroked line if (tm_p1.x.raw_value != tm_p0.x.raw_value) { - top_margin.raw_value = tm_p0.y.raw_value + ((tm_p1.y.raw_value - tm_p0.y.raw_value) - * (x - ((tm_p0.x.raw_value + add_top) / FIXED_S16_3_ONE.raw_value))) - * FIXED_S16_3_ONE.raw_value / (tm_p1.x.raw_value - tm_p0.x.raw_value); + top_margin.raw_value = + tm_p0.y.raw_value + + ((tm_p1.y.raw_value - tm_p0.y.raw_value) * + (x - ((tm_p0.x.raw_value + add_top) / FIXED_S16_3_ONE.raw_value))) * + FIXED_S16_3_ONE.raw_value / (tm_p1.x.raw_value - tm_p0.x.raw_value); } else { top_margin.raw_value = tm_p0.y.raw_value; } if (bm_p1.x.raw_value != bm_p0.x.raw_value) { bottom_margin.raw_value = - bm_p0.y.raw_value + ((bm_p1.y.raw_value - bm_p0.y.raw_value) - * (x - ((bm_p0.x.raw_value + add_bottom) / FIXED_S16_3_ONE.raw_value))) - * FIXED_S16_3_ONE.raw_value / (bm_p1.x.raw_value - bm_p0.x.raw_value); + bm_p0.y.raw_value + + ((bm_p1.y.raw_value - bm_p0.y.raw_value) * + (x - ((bm_p0.x.raw_value + add_bottom) / FIXED_S16_3_ONE.raw_value))) * + FIXED_S16_3_ONE.raw_value / (bm_p1.x.raw_value - bm_p0.x.raw_value); } else { bottom_margin.raw_value = bm_p0.y.raw_value; } @@ -644,10 +662,11 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis // Find edges for right cap GPointPrecise right_point_tmp = (p0.x.raw_value > p1.x.raw_value) ? p0 : p1; - Fixed_S16_3 progress_line = (Fixed_S16_3){.raw_value = (x * FIXED_S16_3_ONE.raw_value - - FIXED_S16_3_ONE.raw_value / 2)}; - prv_calc_cap_prepared(right_point_tmp.x, right_point_tmp.y, radius, - progress_line, &top_margin, &bottom_margin); + Fixed_S16_3 progress_line = (Fixed_S16_3){ + .raw_value = (x * FIXED_S16_3_ONE.raw_value - FIXED_S16_3_ONE.raw_value / 2) + }; + prv_calc_cap_prepared(right_point_tmp.x, right_point_tmp.y, radius, progress_line, + &top_margin, &bottom_margin); // Finally draw line if (top_margin.raw_value <= bottom_margin.raw_value) { @@ -666,7 +685,7 @@ static void prv_adjust_stroked_line_width(uint8_t *width) { } } -static void prv_draw_stroked_line_override_aa(GContext* ctx, GPointPrecise p0, GPointPrecise p1, +static void prv_draw_stroked_line_override_aa(GContext *ctx, GPointPrecise p0, GPointPrecise p1, uint8_t width, bool anti_aliased) { #if PBL_COLOR // Force antialiasing setting @@ -684,15 +703,15 @@ static void prv_draw_stroked_line_override_aa(GContext* ctx, GPointPrecise p0, G } #if PBL_COLOR -MOCKABLE void graphics_line_draw_stroked_aa(GContext* ctx, GPoint p0, GPoint p1, +MOCKABLE void graphics_line_draw_stroked_aa(GContext *ctx, GPoint p0, GPoint p1, uint8_t stroke_width) { prv_adjust_stroked_line_width(&stroke_width); prv_draw_stroked_line_override_aa(ctx, GPointPreciseFromGPoint(p0), GPointPreciseFromGPoint(p1), stroke_width, true); } -#endif // PBL_COLOR +#endif // PBL_COLOR -MOCKABLE void graphics_line_draw_stroked_non_aa(GContext* ctx, GPoint p0, GPoint p1, +MOCKABLE void graphics_line_draw_stroked_non_aa(GContext *ctx, GPoint p0, GPoint p1, uint8_t stroke_width) { prv_adjust_stroked_line_width(&stroke_width); prv_draw_stroked_line_override_aa(ctx, GPointPreciseFromGPoint(p0), GPointPreciseFromGPoint(p1), @@ -700,18 +719,18 @@ MOCKABLE void graphics_line_draw_stroked_non_aa(GContext* ctx, GPoint p0, GPoint } #if PBL_COLOR -MOCKABLE void graphics_line_draw_precise_stroked_aa(GContext* ctx, GPointPrecise p0, +MOCKABLE void graphics_line_draw_precise_stroked_aa(GContext *ctx, GPointPrecise p0, GPointPrecise p1, uint8_t stroke_width) { prv_draw_stroked_line_override_aa(ctx, p0, p1, stroke_width, true); } -#endif // PBL_COLOR +#endif // PBL_COLOR -MOCKABLE void graphics_line_draw_precise_stroked_non_aa(GContext* ctx, GPointPrecise p0, +MOCKABLE void graphics_line_draw_precise_stroked_non_aa(GContext *ctx, GPointPrecise p0, GPointPrecise p1, uint8_t stroke_width) { prv_draw_stroked_line_override_aa(ctx, p0, p1, stroke_width, false); } -void graphics_line_draw_precise_stroked(GContext* ctx, GPointPrecise p0, GPointPrecise p1) { +void graphics_line_draw_precise_stroked(GContext *ctx, GPointPrecise p0, GPointPrecise p1) { if (ctx->draw_state.stroke_width >= MINIMUM_PRECISE_STROKE_WIDTH) { prv_draw_stroked_line_precise(ctx, p0, p1, ctx->draw_state.stroke_width); } else { @@ -719,7 +738,7 @@ void graphics_line_draw_precise_stroked(GContext* ctx, GPointPrecise p0, GPointP } } -void graphics_draw_line(GContext* ctx, GPoint p0, GPoint p1) { +void graphics_draw_line(GContext *ctx, GPoint p0, GPoint p1) { PBL_ASSERTN(ctx); if (ctx->lock) { return; @@ -747,7 +766,7 @@ void graphics_draw_line(GContext* ctx, GPoint p0, GPoint p1) { } } -static void prv_draw_dotted_line(GContext* ctx, GPoint p0, uint16_t length, bool vertical) { +static void prv_draw_dotted_line(GContext *ctx, GPoint p0, uint16_t length, bool vertical) { PBL_ASSERTN(ctx); if (ctx->lock || (length == 0)) { return; @@ -779,10 +798,10 @@ static void prv_draw_dotted_line(GContext* ctx, GPoint p0, uint16_t length, bool } } -void graphics_draw_vertical_line_dotted(GContext* ctx, GPoint p0, uint16_t length) { +void graphics_draw_vertical_line_dotted(GContext *ctx, GPoint p0, uint16_t length) { prv_draw_dotted_line(ctx, p0, length, true); } -void graphics_draw_horizontal_line_dotted(GContext* ctx, GPoint p0, uint16_t length) { +void graphics_draw_horizontal_line_dotted(GContext *ctx, GPoint p0, uint16_t length) { prv_draw_dotted_line(ctx, p0, length, false); } diff --git a/src/fw/applib/graphics/graphics_line.h b/src/fw/applib/graphics/graphics_line.h index 08b6a8ef56..d14577a3e7 100644 --- a/src/fw/applib/graphics/graphics_line.h +++ b/src/fw/applib/graphics/graphics_line.h @@ -14,57 +14,57 @@ //! @param ctx The destination graphics context in which to draw //! @param p0 The starting point of the line //! @param p1 The ending point of the line -void graphics_draw_line(GContext* ctx, GPoint p0, GPoint p1); +void graphics_draw_line(GContext *ctx, GPoint p0, GPoint p1); //! @} // end addtogroup Drawing //! @} // end addtogroup Graphics //! @internal //! Draws non-antialiased 1px width line between given points, will adjust to drawing_box -MOCKABLE void graphics_line_draw_1px_non_aa(GContext* ctx, GPoint p0, GPoint p1); +MOCKABLE void graphics_line_draw_1px_non_aa(GContext *ctx, GPoint p0, GPoint p1); //! @internal //! Draws antialiased 1px width line between given points, will adjust to drawing box -MOCKABLE void graphics_line_draw_1px_aa(GContext* ctx, GPoint p0, GPoint p1); +MOCKABLE void graphics_line_draw_1px_aa(GContext *ctx, GPoint p0, GPoint p1); //! @internal //! Draws antialiased stroked line between given points, will adjust for drawing_box //! @note This only supports odd numbers for stroke_width - even numbers will be rounded up. //! Minimal supported stroke_width is 3 -MOCKABLE void graphics_line_draw_stroked_aa(GContext* ctx, GPoint p0, GPoint p1, +MOCKABLE void graphics_line_draw_stroked_aa(GContext *ctx, GPoint p0, GPoint p1, uint8_t stroke_width); //! @internal //! Draws non-antialiased stroked line between given precise points, will adjust for drawing_box //! Minimal supported stroke_width is 2 -MOCKABLE void graphics_line_draw_precise_stroked_non_aa(GContext* ctx, GPointPrecise p0, +MOCKABLE void graphics_line_draw_precise_stroked_non_aa(GContext *ctx, GPointPrecise p0, GPointPrecise p1, uint8_t stroke_width); //! @internal //! Draws antialiased stroked line between given precise points, will adjust for drawing_box //! Minimal supported stroke_width is 2 -MOCKABLE void graphics_line_draw_precise_stroked_aa(GContext* ctx, GPointPrecise p0, +MOCKABLE void graphics_line_draw_precise_stroked_aa(GContext *ctx, GPointPrecise p0, GPointPrecise p1, uint8_t stroke_width); //! @internal //! Draws non-antialiased stroked line between given point, will adjust for drawing_box //! @note This only supports odd numbers for stroke_width - even numbers will be rounded up. //! Minimal supported stroke_width is 3 -MOCKABLE void graphics_line_draw_stroked_non_aa(GContext* ctx, GPoint p0, GPoint p1, +MOCKABLE void graphics_line_draw_stroked_non_aa(GContext *ctx, GPoint p0, GPoint p1, uint8_t stroke_width); //! @internal //! Draws stroked line between given precise points, will adjust for drawing_box, //! current stroke color, current stroke width and AA flag //! Minimal supported stroke_width is 2 -void graphics_line_draw_precise_stroked(GContext* ctx, GPointPrecise p0, GPointPrecise p1); +void graphics_line_draw_precise_stroked(GContext *ctx, GPointPrecise p0, GPointPrecise p1); //! @internal //! Draws a 1 pixel wide non-antialiased vertical dotted line of length pixels starting at p0. //! Will draw the line in the positive y direction. Will adjust for drawing_box. -void graphics_draw_vertical_line_dotted(GContext* ctx, GPoint p0, uint16_t length); +void graphics_draw_vertical_line_dotted(GContext *ctx, GPoint p0, uint16_t length); //! @internal //! Draws a 1 pixel high non-antialiased horizontal dotted line of length pixels starting at p0. //! Will draw the line in the positive x direction. Will adjust for drawing_box. -void graphics_draw_horizontal_line_dotted(GContext* ctx, GPoint p0, uint16_t length); +void graphics_draw_horizontal_line_dotted(GContext *ctx, GPoint p0, uint16_t length); diff --git a/src/fw/applib/graphics/graphics_private.c b/src/fw/applib/graphics/graphics_private.c index ccef88f47b..edc59ffb46 100644 --- a/src/fw/applib/graphics/graphics_private.c +++ b/src/fw/applib/graphics/graphics_private.c @@ -12,7 +12,7 @@ // ## Point setting/blending functions #if PBL_COLOR -T_STATIC inline void set_pixel_raw_8bit(GContext* ctx, GPoint point) { +T_STATIC inline void set_pixel_raw_8bit(GContext *ctx, GPoint point) { if (!grect_contains_point(&ctx->dest_bitmap.bounds, &point)) { return; } @@ -33,7 +33,7 @@ T_STATIC inline void set_pixel_raw_8bit(GContext* ctx, GPoint point) { #endif #if PBL_BW -static inline void set_pixel_raw_2bit(GContext* ctx, GPoint point) { +static inline void set_pixel_raw_2bit(GContext *ctx, GPoint point) { if (!grect_contains_point(&ctx->dest_bitmap.bounds, &point)) { return; } @@ -44,7 +44,7 @@ static inline void set_pixel_raw_2bit(GContext* ctx, GPoint point) { } #endif -void graphics_private_set_pixel(GContext* ctx, GPoint point) { +void graphics_private_set_pixel(GContext *ctx, GPoint point) { if (!grect_contains_point(&ctx->draw_state.clip_box, &point)) { return; } @@ -55,29 +55,22 @@ void graphics_private_set_pixel(GContext* ctx, GPoint point) { set_pixel_raw_8bit(ctx, point); #endif - const GRect dirty_rect = { point, { 1, 1 } }; + const GRect dirty_rect = {point, {1, 1}}; graphics_context_mark_dirty_rect(ctx, dirty_rect); } // ## Private blending wrapper functions for non-aa -static const uint16_t grays[14] = { - 0x0000, 0x0000, - 0x1111, 0x4444, - 0x5555, 0xAAAA, - 0x5555, 0xAAAA, - 0x5555, 0xAAAA, - 0xEEEE, 0xBBBB, - 0xFFFF, 0xFFFF -}; +static const uint16_t grays[14] = {0x0000, 0x0000, 0x1111, 0x4444, 0x5555, 0xAAAA, 0x5555, + 0xAAAA, 0x5555, 0xAAAA, 0xEEEE, 0xBBBB, 0xFFFF, 0xFFFF}; uint32_t graphics_private_get_1bit_grayscale_pattern(GColor color, uint8_t row_number) { - uint16_t luma = ((color.r << 1) + color.r + (color.g << 2) + color.b) >> 1; // 0 to 12 + uint16_t luma = ((color.r << 1) + color.r + (color.g << 2) + color.b) >> 1; // 0 to 12 luma = grays[(luma & ~1) + (row_number & 1)]; return (luma << 16) | luma; } -void prv_assign_line_horizontal_non_aa(GContext* ctx, int16_t y, int16_t x1, int16_t x2) { +void prv_assign_line_horizontal_non_aa(GContext *ctx, int16_t y, int16_t x1, int16_t x2) { y += ctx->draw_state.drawing_box.origin.y; x1 += ctx->draw_state.drawing_box.origin.x; x2 += ctx->draw_state.drawing_box.origin.x; @@ -109,7 +102,7 @@ void prv_assign_line_horizontal_non_aa(GContext* ctx, int16_t y, int16_t x1, int graphics_release_frame_buffer(ctx, framebuffer); } -void prv_assign_line_vertical_non_aa(GContext* ctx, int16_t x, int16_t y1, int16_t y2) { +void prv_assign_line_vertical_non_aa(GContext *ctx, int16_t x, int16_t y1, int16_t y2) { x += ctx->draw_state.drawing_box.origin.x; y1 += ctx->draw_state.drawing_box.origin.y; y2 += ctx->draw_state.drawing_box.origin.y; @@ -124,7 +117,7 @@ void prv_assign_line_vertical_non_aa(GContext* ctx, int16_t x, int16_t y1, int16 const int x_max = grect_get_max_x(&ctx->draw_state.clip_box) - 1; y1 = MAX(y1, y_min); - y2 = MIN(y2, y_max + 1); // Thats because we added one to end of the line + y2 = MIN(y2, y_max + 1); // Thats because we added one to end of the line if (!WITHIN(x, x_min, x_max) || y1 > y2) { // Outside of drawing bounds.. return; @@ -186,8 +179,7 @@ void graphics_private_draw_horizontal_line_integral(GContext *ctx, GBitmap *fram const Fixed_S16_3 x1_fixed = Fixed_S16_3(x1 << FIXED_S16_3_PRECISION); const Fixed_S16_3 x2_fixed = Fixed_S16_3(x2 << FIXED_S16_3_PRECISION); - ctx->draw_state.draw_implementation->assign_horizontal_line(ctx, y, x1_fixed, x2_fixed, - color); + ctx->draw_state.draw_implementation->assign_horizontal_line(ctx, y, x1_fixed, x2_fixed, color); } void graphics_private_draw_vertical_line_prepared(GContext *ctx, GBitmap *framebuffer, @@ -225,7 +217,7 @@ void graphics_private_draw_vertical_line_prepared(GContext *ctx, GBitmap *frameb } void graphics_private_draw_horizontal_line(GContext *ctx, int16_t y, Fixed_S16_3 x1, - Fixed_S16_3 x2) { + Fixed_S16_3 x2) { #if PBL_COLOR if (ctx->draw_state.antialiased) { // apply draw box and clipping @@ -245,11 +237,11 @@ void graphics_private_draw_horizontal_line(GContext *ctx, int16_t y, Fixed_S16_3 graphics_release_frame_buffer(ctx, framebuffer); return; } -#endif // PBL_COLOR +#endif // PBL_COLOR // since x1 is beginning of the line, rounding should work in favor of flooring the value // therefore we substract one from the rounding addition to produce result similar to x2 int16_t x1_rounded = - (x1.raw_value + (FIXED_S16_3_ONE.raw_value / 2 - 1)) / FIXED_S16_3_ONE.raw_value; + (x1.raw_value + (FIXED_S16_3_ONE.raw_value / 2 - 1)) / FIXED_S16_3_ONE.raw_value; int16_t x2_rounded = (x2.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value; if (x1_rounded > x2_rounded) { @@ -280,11 +272,11 @@ void graphics_private_draw_vertical_line(GContext *ctx, int16_t x, Fixed_S16_3 y graphics_release_frame_buffer(ctx, framebuffer); return; } -#endif // PBL_COLOR +#endif // PBL_COLOR // since y1 is beginning of the line, rounding should work in favor of flooring the value // therefore we substract one from the rounding addition to produce result similar to y2 int16_t y1_rounded = - (y1.raw_value + (FIXED_S16_3_ONE.raw_value / 2 - 1)) / FIXED_S16_3_ONE.raw_value; + (y1.raw_value + (FIXED_S16_3_ONE.raw_value / 2 - 1)) / FIXED_S16_3_ONE.raw_value; int16_t y2_rounded = (y2.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value; if (y1_rounded > y2_rounded) { @@ -321,7 +313,7 @@ void graphics_private_plot_pixel(GBitmap *framebuffer, GRect *clip_box, int x, i uint8_t *line = ((uint8_t *)framebuffer->addr) + (framebuffer->row_size_bytes * y); bitset8_update(line, x, !black); } -#endif // PBL_COLOR +#endif // PBL_COLOR } void graphics_private_plot_horizontal_line_prepared(GContext *ctx, GBitmap *framebuffer, @@ -344,7 +336,7 @@ void graphics_private_plot_horizontal_line_prepared(GContext *ctx, GBitmap *fram // We're not plotting anything, bail return; } -#endif // PBL_COLOR +#endif // PBL_COLOR ctx->draw_state.draw_implementation->blend_horizontal_line(ctx, y, x_min, x_max, color); } @@ -370,7 +362,7 @@ void graphics_private_plot_vertical_line_prepared(GContext *ctx, GBitmap *frameb // We're not plotting anything, bail return; } -#endif // PBL_COLOR +#endif // PBL_COLOR ctx->draw_state.draw_implementation->blend_vertical_line(ctx, x, y_min, y_max, color); } @@ -405,13 +397,13 @@ void graphics_private_plot_horizontal_line(GContext *ctx, int16_t y, Fixed_S16_3 graphics_release_frame_buffer(ctx, framebuffer); return; } -#endif // PBL_COLOR +#endif // PBL_COLOR if (opacity <= (MAX_PLOT_BRIGHTNESS / 2)) { - int16_t x1_rounded = (x1.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) - / FIXED_S16_3_ONE.raw_value; - int16_t x2_rounded = (x2.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) - / FIXED_S16_3_ONE.raw_value; + int16_t x1_rounded = + (x1.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value; + int16_t x2_rounded = + (x2.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value; prv_assign_line_horizontal_non_aa(ctx, y, x1_rounded, x2_rounded); } @@ -447,13 +439,13 @@ void graphics_private_plot_vertical_line(GContext *ctx, int16_t x, Fixed_S16_3 y graphics_release_frame_buffer(ctx, framebuffer); return; } -#endif // PBL_COLOR +#endif // PBL_COLOR if (opacity <= (MAX_PLOT_BRIGHTNESS / 2)) { - int16_t y1_rounded = (y1.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) - / FIXED_S16_3_ONE.raw_value; - int16_t y2_rounded = (y2.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) - / FIXED_S16_3_ONE.raw_value; + int16_t y1_rounded = + (y1.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value; + int16_t y2_rounded = + (y2.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value; prv_assign_line_vertical_non_aa(ctx, x, y1_rounded, y2_rounded); } @@ -465,13 +457,16 @@ void graphics_private_draw_horizontal_line_delta_prepared(GContext *ctx, GBitmap Fixed_S16_3 x1, Fixed_S16_3 x2, Fixed_S16_3 delta1, Fixed_S16_3 delta2, GColor color) { - // Extended sides AA calculations - uint8_t left_aa_offset = (delta1.integer > 1) ? - ((delta1.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value) : 1; + uint8_t left_aa_offset = + (delta1.integer > 1) + ? ((delta1.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value) + : 1; - uint8_t right_aa_offset = (delta2.integer > 1) ? - ((delta2.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value) : 1; + uint8_t right_aa_offset = + (delta2.integer > 1) + ? ((delta2.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value) + : 1; x1.integer -= left_aa_offset / 2; x2.integer -= right_aa_offset / 2; @@ -486,10 +481,8 @@ void graphics_private_draw_horizontal_line_delta_prepared(GContext *ctx, GBitmap // x1/x2 clipping and verification happens in raw drawing function to preserve gradients - ctx->draw_state.draw_implementation->assign_horizontal_line_delta(ctx, y, x1, x2, - left_aa_offset, right_aa_offset, - min_valid_x, max_valid_x, - color); + ctx->draw_state.draw_implementation->assign_horizontal_line_delta( + ctx, y, x1, x2, left_aa_offset, right_aa_offset, min_valid_x, max_valid_x, color); } void graphics_private_draw_horizontal_line_delta_aa(GContext *ctx, int16_t y, Fixed_S16_3 x1, @@ -512,11 +505,11 @@ void graphics_private_draw_horizontal_line_delta_aa(GContext *ctx, int16_t y, Fi graphics_release_frame_buffer(ctx, framebuffer); } -#endif // PBL_COLOR +#endif // PBL_COLOR void graphics_private_draw_horizontal_line_delta_non_aa(GContext *ctx, int16_t y, Fixed_S16_3 x1, - Fixed_S16_3 x2, Fixed_S16_3 delta1, - Fixed_S16_3 delta2) { + Fixed_S16_3 x2, Fixed_S16_3 delta1, + Fixed_S16_3 delta2) { int16_t x1_rounded = (x1.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value; int16_t x2_rounded = (x2.raw_value + (FIXED_S16_3_ONE.raw_value / 2)) / FIXED_S16_3_ONE.raw_value; @@ -531,9 +524,9 @@ void graphics_private_draw_horizontal_line_delta_non_aa(GContext *ctx, int16_t y // This function will replicate source column in given area T_STATIC void prv_replicate_column_row_raw(GBitmap *framebuffer, int16_t src_x, int16_t dst_x1, int16_t dst_x2) { - const GRect column_to_replicate = (GRect) { - .origin = GPoint(src_x, framebuffer->bounds.origin.y), - .size = GSize(1, framebuffer->bounds.size.h), + const GRect column_to_replicate = (GRect){ + .origin = GPoint(src_x, framebuffer->bounds.origin.y), + .size = GSize(1, framebuffer->bounds.size.h), }; GBitmap column_to_replicate_sub_bitmap; gbitmap_init_as_sub_bitmap(&column_to_replicate_sub_bitmap, framebuffer, column_to_replicate); @@ -545,7 +538,7 @@ T_STATIC void prv_replicate_column_row_raw(GBitmap *framebuffer, int16_t src_x, void graphics_patch_trace_of_moving_rect(GContext *ctx, int16_t *prev_x, GRect current) { const int16_t new_x = current.origin.x; - int16_t src_x = 0; // just so that GCC accepts that src_x is always initialized + int16_t src_x = 0; // just so that GCC accepts that src_x is always initialized int16_t dst_x1 = INT16_MAX; int16_t dst_x2 = INT16_MIN; if (*prev_x == INT16_MAX) { @@ -637,7 +630,7 @@ void graphics_private_move_pixels_horizontally(GBitmap *bitmap, int16_t delta_x, const int rshift = delta_bits; const int lshift = 8 - rshift; for (int i = 0; i < bytes - 1; i++) { - buf[i] = (buf[i] >> rshift) | (buf[i+1] << lshift); + buf[i] = (buf[i] >> rshift) | (buf[i + 1] << lshift); } if (patch_garbage) { buf[bytes - 1] >>= rshift; @@ -652,7 +645,7 @@ void graphics_private_move_pixels_horizontally(GBitmap *bitmap, int16_t delta_x, const int lshift = delta_bits; const int rshift = 8 - lshift; for (int i = bytes - 1; i >= 1; i--) { - buf[i] = (buf[i] << lshift) | (buf[i-1] >> rshift); + buf[i] = (buf[i] << lshift) | (buf[i - 1] >> rshift); } if (patch_garbage) { buf[0] <<= lshift; @@ -672,8 +665,7 @@ void graphics_private_move_pixels_horizontally(GBitmap *bitmap, int16_t delta_x, if (pixels_to_move <= 0) { // on this row, the delta is wider than the available pixels if (patch_garbage) { - const uint8_t fill_byte = delta_neg ? left_pixel[num_pix_data_row - 1] : - left_pixel[0]; + const uint8_t fill_byte = delta_neg ? left_pixel[num_pix_data_row - 1] : left_pixel[0]; memset(left_pixel, fill_byte, num_pix_data_row); } break; @@ -766,8 +758,8 @@ GColor graphics_private_sample_line_color(const GBitmap *bitmap, GColorSampleEdg const int16_t end_y = grect_get_max_y(&bitmap->bounds); const bool horiz_advance = (edge == GColorSampleEdgeUp) || (edge == GColorSampleEdgeDown); - const bool edge_is_max_position = (edge == GColorSampleEdgeDown) || - (edge == GColorSampleEdgeRight); + const bool edge_is_max_position = + (edge == GColorSampleEdgeDown) || (edge == GColorSampleEdgeRight); const int16_t length = horiz_advance ? (end_x - min_x) : (end_y - min_y); diff --git a/src/fw/applib/graphics/graphics_private.h b/src/fw/applib/graphics/graphics_private.h index 84bac512e4..5c628e57c2 100644 --- a/src/fw/applib/graphics/graphics_private.h +++ b/src/fw/applib/graphics/graphics_private.h @@ -13,7 +13,7 @@ //! @internal //! @param ctx Graphics context for drawing //! @param point Point to set pixel at using draw state's stroke color -void graphics_private_set_pixel(GContext* ctx, GPoint point); +void graphics_private_set_pixel(GContext *ctx, GPoint point); //! Draws horizontal line with antialiased starting and ending pixel //! Will adjust to the drawing_box and clip_box @@ -24,7 +24,7 @@ void graphics_private_set_pixel(GContext* ctx, GPoint point); //! @param x2 Fixedpoint X coordinate for ending point //! @internal void graphics_private_draw_horizontal_line(GContext *ctx, int16_t y, Fixed_S16_3 x1, - Fixed_S16_3 x2); + Fixed_S16_3 x2); //! Draws horizontal line into framebuffer, requires adjustment for drawing_box and clip_box //! @param ctx Graphics context for drawing diff --git a/src/fw/applib/graphics/graphics_private_raw.c b/src/fw/applib/graphics/graphics_private_raw.c index f2511901f9..4f7707b9ab 100644 --- a/src/fw/applib/graphics/graphics_private_raw.c +++ b/src/fw/applib/graphics/graphics_private_raw.c @@ -18,7 +18,7 @@ ALWAYS_INLINE void graphics_private_raw_blend_color_factor(const GContext *ctx, const GColor blended_color = gcolor_alpha_blend(src_color, *dst_color); *dst_color = blended_color; -#endif // (CONFIG_SCREEN_COLOR_DEPTH_BITS == 8) +#endif // (CONFIG_SCREEN_COLOR_DEPTH_BITS == 8) } static ALWAYS_INLINE void prv_set_color(const GContext *ctx, GColor *dst_color, @@ -31,12 +31,12 @@ static ALWAYS_INLINE void prv_set_color(const GContext *ctx, GColor *dst_color, // Plots row at given starting position and width, dithers grayscale colors static void prv_assign_row_with_pattern_1bit(GBitmap *framebuffer, int16_t y, int16_t x, int32_t width, GColor color) { - const uint32_t pattern = graphics_private_get_1bit_grayscale_pattern(color, (uint8_t) y); + const uint32_t pattern = graphics_private_get_1bit_grayscale_pattern(color, (uint8_t)y); uint32_t left_edge_block, right_edge_block, mask; const uint32_t left_edge_bits_count = x % 32; const uint32_t right_edge_bits_count = (x + width) % 32; - uint32_t *block = ((uint32_t*)framebuffer->addr) + (y * (framebuffer->row_size_bytes / 4)) - + (x / 32); + uint32_t *block = + ((uint32_t *)framebuffer->addr) + (y * (framebuffer->row_size_bytes / 4)) + (x / 32); bool both_edges_in_same_block = (left_edge_bits_count + width) < 32; if (both_edges_in_same_block) { @@ -61,7 +61,7 @@ static void prv_assign_row_with_pattern_1bit(GBitmap *framebuffer, int16_t y, in } } } -#endif // !PBL_COLOR +#endif // !PBL_COLOR // ## Line blending functions: @@ -119,8 +119,8 @@ T_STATIC void prv_assign_horizontal_line_raw(GContext *ctx, int16_t y, Fixed_S16 // This function draws vertical line with AA edges, given values have to be adjusted for // screen coordinates and clipped according to the clip box, does not respect transparency // on the drawn line (beside edges) -T_STATIC void prv_assign_vertical_line_raw(GContext *ctx, int16_t x, Fixed_S16_3 y1, - Fixed_S16_3 y2, GColor color) { +T_STATIC void prv_assign_vertical_line_raw(GContext *ctx, int16_t x, Fixed_S16_3 y1, Fixed_S16_3 y2, + GColor color) { PBL_ASSERTN(ctx); GBitmap *framebuffer = &ctx->dest_bitmap; PBL_ASSERTN(framebuffer->bounds.origin.x == 0 && framebuffer->bounds.origin.y == 0); @@ -183,7 +183,7 @@ T_STATIC void prv_blend_horizontal_line_raw(GContext *ctx, int16_t y, int16_t x1 // TODO: as part of PBL-30849 make this a first-class function // also see, prv_assign_horizontal_line_raw prv_assign_row_with_pattern_1bit(framebuffer, y, x1, x2 - x1 + 1, color); -#endif // CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 +#endif // CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 } // This function draws vertical line with blending, given values have to be clipped and adjusted @@ -210,15 +210,14 @@ T_STATIC void prv_blend_vertical_line_raw(GContext *ctx, int16_t x, int16_t y1, uint8_t *line = ((uint8_t *)framebuffer->addr) + (framebuffer->row_size_bytes * i); bitset8_update(line, x, !black); } -#endif // CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 +#endif // CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 } // This function will draw a horizontal line with two gradients on side representing AA edges -T_STATIC void prv_assign_horizontal_line_delta_raw(GContext *ctx, int16_t y, - Fixed_S16_3 x1, Fixed_S16_3 x2, - uint8_t left_aa_offset, uint8_t right_aa_offset, - int16_t clip_box_min_x, int16_t clip_box_max_x, - GColor color) { +T_STATIC void prv_assign_horizontal_line_delta_raw(GContext *ctx, int16_t y, Fixed_S16_3 x1, + Fixed_S16_3 x2, uint8_t left_aa_offset, + uint8_t right_aa_offset, int16_t clip_box_min_x, + int16_t clip_box_max_x, GColor color) { PBL_ASSERTN(ctx); GBitmap *framebuffer = &ctx->dest_bitmap; PBL_ASSERTN(framebuffer->bounds.origin.x == 0 && framebuffer->bounds.origin.y == 0); @@ -267,9 +266,9 @@ T_STATIC void prv_assign_horizontal_line_delta_raw(GContext *ctx, int16_t y, if (x1.integer > clip_box_max_x) { break; } - graphics_private_raw_blend_color_factor(ctx, output, data_row_offset, color, x1.integer, - (uint8_t)(FIXED_S16_3_ONE.raw_value * i / - left_aa_offset)); + graphics_private_raw_blend_color_factor( + ctx, output, data_row_offset, color, x1.integer, + (uint8_t)(FIXED_S16_3_ONE.raw_value * i / left_aa_offset)); output++; x1.integer++; } @@ -295,9 +294,9 @@ T_STATIC void prv_assign_horizontal_line_delta_raw(GContext *ctx, int16_t y, if (x1.integer > clip_box_max_x) { break; } - graphics_private_raw_blend_color_factor(ctx, output, data_row_offset, color, x1.integer, - (uint8_t)(FIXED_S16_3_ONE.raw_value * - (right_aa_offset - i) / right_aa_offset)); + graphics_private_raw_blend_color_factor( + ctx, output, data_row_offset, color, x1.integer, + (uint8_t)(FIXED_S16_3_ONE.raw_value * (right_aa_offset - i) / right_aa_offset)); output++; x1.integer++; } @@ -306,9 +305,9 @@ T_STATIC void prv_assign_horizontal_line_delta_raw(GContext *ctx, int16_t y, // TODO: Platform switches could happen here, too const GDrawRawImplementation g_default_draw_implementation = { - .assign_horizontal_line = prv_assign_horizontal_line_raw, - .assign_vertical_line = prv_assign_vertical_line_raw, - .blend_horizontal_line = prv_blend_horizontal_line_raw, - .blend_vertical_line = prv_blend_vertical_line_raw, - .assign_horizontal_line_delta = prv_assign_horizontal_line_delta_raw, + .assign_horizontal_line = prv_assign_horizontal_line_raw, + .assign_vertical_line = prv_assign_vertical_line_raw, + .blend_horizontal_line = prv_blend_horizontal_line_raw, + .blend_vertical_line = prv_blend_vertical_line_raw, + .assign_horizontal_line_delta = prv_assign_horizontal_line_delta_raw, }; diff --git a/src/fw/applib/graphics/graphics_private_raw.h b/src/fw/applib/graphics/graphics_private_raw.h index 4f94c58967..1dc7c0a727 100644 --- a/src/fw/applib/graphics/graphics_private_raw.h +++ b/src/fw/applib/graphics/graphics_private_raw.h @@ -8,6 +8,5 @@ extern const GDrawRawImplementation g_default_draw_implementation; void graphics_private_raw_blend_color_factor(const GContext *ctx, GColor *dst_color, - unsigned int data_offset, - GColor src_color, int x, + unsigned int data_offset, GColor src_color, int x, uint8_t factor); diff --git a/src/fw/applib/graphics/gtransform.c b/src/fw/applib/graphics/gtransform.c index 3bfb976a84..0f1e90ac78 100644 --- a/src/fw/applib/graphics/gtransform.c +++ b/src/fw/applib/graphics/gtransform.c @@ -20,10 +20,10 @@ GTransform gtransform_init_rotation(int32_t angle) { int32_t sine = sin_lookup(angle); int64_t cosine_val = (cosine * ((int64_t)GTransformNumberOne.raw_value)) / TRIG_MAX_RATIO; int64_t sine_val = (sine * ((int64_t)GTransformNumberOne.raw_value)) / TRIG_MAX_RATIO; - GTransformNumber a = (GTransformNumber) { .raw_value = cosine_val }; - GTransformNumber b = (GTransformNumber) { .raw_value = -sine_val }; - GTransformNumber c = (GTransformNumber) { .raw_value = sine_val }; - GTransformNumber d = (GTransformNumber) { .raw_value = cosine_val }; + GTransformNumber a = (GTransformNumber){.raw_value = cosine_val}; + GTransformNumber b = (GTransformNumber){.raw_value = -sine_val}; + GTransformNumber c = (GTransformNumber){.raw_value = sine_val}; + GTransformNumber d = (GTransformNumber){.raw_value = cosine_val}; return GTransform(a, b, c, d, GTransformNumberZero, GTransformNumberZero); } else { return GTransformIdentity(); @@ -33,7 +33,7 @@ GTransform gtransform_init_rotation(int32_t angle) { ////////////////////////////////////// /// Evaluating Transforms ////////////////////////////////////// -bool gtransform_is_identity(const GTransform * const t) { +bool gtransform_is_identity(const GTransform *const t) { if (!t) { return false; } @@ -47,7 +47,7 @@ bool gtransform_is_identity(const GTransform * const t) { return false; } -bool gtransform_is_only_scale(const GTransform * const t) { +bool gtransform_is_only_scale(const GTransform *const t) { if (!t) { return false; } @@ -62,7 +62,7 @@ bool gtransform_is_only_scale(const GTransform * const t) { return false; } -bool gtransform_is_only_translation(const GTransform * const t) { +bool gtransform_is_only_translation(const GTransform *const t) { if (!t) { return false; } @@ -77,7 +77,7 @@ bool gtransform_is_only_translation(const GTransform * const t) { return false; } -bool gtransform_is_only_scale_or_translation(const GTransform * const t) { +bool gtransform_is_only_scale_or_translation(const GTransform *const t) { if (!t) { return false; } @@ -90,7 +90,7 @@ bool gtransform_is_only_scale_or_translation(const GTransform * const t) { return false; } -bool gtransform_is_equal(const GTransform * const t1, const GTransform * const t2) { +bool gtransform_is_equal(const GTransform *const t1, const GTransform *const t2) { if ((!t1) || (!t2)) { return false; } @@ -103,7 +103,7 @@ bool gtransform_is_equal(const GTransform * const t1, const GTransform * const t ////////////////////////////////////// // Note that t_new can be set to either of t1 or t2 safely to do in place multiplication // Note this operation is not commutative. The operation is as follows t_new = t1 * t2 -void gtransform_concat(GTransform *t_new, const GTransform *t1, const GTransform * t2) { +void gtransform_concat(GTransform *t_new, const GTransform *t1, const GTransform *t2) { if ((!t_new) || (!t1) || (!t2)) { return; } @@ -155,8 +155,8 @@ void gtransform_scale(GTransform *t_new, GTransform *t, GTransformNumber sx, GTr t_new->d = Fixed_S32_16_mul(sy, t->d); } -void gtransform_translate(GTransform *t_new, GTransform *t, - GTransformNumber tx, GTransformNumber ty) { +void gtransform_translate(GTransform *t_new, GTransform *t, GTransformNumber tx, + GTransformNumber ty) { if ((!t_new) || (!t)) { return; } @@ -200,7 +200,7 @@ bool gtransform_invert(GTransform *t_new, GTransform *t) { ////////////////////////////////////// /// Applying Transformations ////////////////////////////////////// -GPointPrecise gpoint_transform(GPoint point, const GTransform * const t) { +GPointPrecise gpoint_transform(GPoint point, const GTransform *const t) { GPointPrecise pointP = GPointPreciseFromGPoint(point); if (!t) { @@ -221,7 +221,7 @@ GPointPrecise gpoint_transform(GPoint point, const GTransform * const t) { return GPointPrecise(sum_x.raw_value, sum_y.raw_value); } -GVectorPrecise gvector_transform(GVector vector, const GTransform * const t) { +GVectorPrecise gvector_transform(GVector vector, const GTransform *const t) { GVectorPrecise vectorP = GVectorPreciseFromGVector(vector); if (!t) { diff --git a/src/fw/applib/graphics/gtransform.h b/src/fw/applib/graphics/gtransform.h index 5f62bf439a..49b00551e8 100644 --- a/src/fw/applib/graphics/gtransform.h +++ b/src/fw/applib/graphics/gtransform.h @@ -17,15 +17,15 @@ /// Creating Transforms ////////////////////////////////////// //! Convenience macro for GTransformNumber equal to 0 -#define GTransformNumberZero ((GTransformNumber){ .integer = 0, .fraction = 0 }) +#define GTransformNumberZero ((GTransformNumber){.integer = 0, .fraction = 0}) //! Convenience macro for GTransformNumber equal to 1 -#define GTransformNumberOne ((GTransformNumber){ .integer = 1, .fraction = 0 }) +#define GTransformNumberOne ((GTransformNumber){.integer = 1, .fraction = 0}) //! Convenience macro to convert from a number (i.e. char, int, float, etc.) to GTransformNumber //! @param x The number to convert #define GTransformNumberFromNumber(x) \ - ((GTransformNumber){ .raw_value = (int32_t)((x)*(GTransformNumberOne.raw_value)) }) + ((GTransformNumber){.raw_value = (int32_t)((x) * (GTransformNumberOne.raw_value))}) //! This macro returns the transformation matrix for the corresponding input coefficients. //! Below is the equivalent resulting matrix: @@ -38,32 +38,31 @@ //! @param d Coefficient corresponding to Y scale (type is GTransformNumber) //! @param tx Coefficient corresponding to X translation (type is GTransformNumber) //! @param ty Coefficient corresponding to Y translation (type is GTransformNumber) -#define GTransform(a, b, c, d, tx, ty) (GTransform) { (a), (b), (c), (d), (tx), (ty) } +#define GTransform(a, b, c, d, tx, ty) \ + (GTransform) { \ + (a), (b), (c), (d), (tx), (ty) \ + } //! @param a Coefficient corresponding to X scale (type is char, int, float, etc) //! @param b Coefficient corresponding to X shear (type is char, int, float, etc) //! @param c Coefficient corresponding to Y shear (type is char, int, float, etc) //! @param d Coefficient corresponding to Y scale (type is char, int, float, etc) //! @param tx Coefficient corresponding to X translation (type is char, int, float, etc) //! @param ty Coefficient corresponding to Y translation (type is char, int, float, etc) -#define GTransformFromNumbers(a, b, c, d, tx, ty) GTransform(GTransformNumberFromNumber(a), \ - GTransformNumberFromNumber(b), \ - GTransformNumberFromNumber(c), \ - GTransformNumberFromNumber(d), \ - GTransformNumberFromNumber(tx), \ - GTransformNumberFromNumber(ty)) +#define GTransformFromNumbers(a, b, c, d, tx, ty) \ + GTransform(GTransformNumberFromNumber(a), GTransformNumberFromNumber(b), \ + GTransformNumberFromNumber(c), GTransformNumberFromNumber(d), \ + GTransformNumberFromNumber(tx), GTransformNumberFromNumber(ty)) //! This macro returns the identity transformation matrix. //! Below is the equivalent resulting matrix: //! t = [ 1 0 0 ] //! [ 0 1 0 ] //! [ 0 0 1 ] -#define GTransformIdentity() \ - (GTransform) { .a = GTransformNumberOne, \ - .b = GTransformNumberZero, \ - .c = GTransformNumberZero, \ - .d = GTransformNumberOne, \ - .tx = GTransformNumberZero, \ - .ty = GTransformNumberZero } +#define GTransformIdentity() \ + (GTransform) { \ + .a = GTransformNumberOne, .b = GTransformNumberZero, .c = GTransformNumberZero, \ + .d = GTransformNumberOne, .tx = GTransformNumberZero, .ty = GTransformNumberZero \ + } //! This macro returns a scaling transformation matrix for the corresponding input coefficients. //! Below is the equivalent resulting matrix: @@ -72,17 +71,15 @@ //! [ 0 0 1 ] //! @param sx X scaling factor (type is GTransformNumber) //! @param sy Y scaling factor (type is GTransformNumber) -#define GTransformScale(sx, sy) \ - (GTransform) { .a = sx, \ - .b = GTransformNumberZero, \ - .c = GTransformNumberZero, \ - .d = sy, \ - .tx = GTransformNumberZero, \ - .ty = GTransformNumberZero } +#define GTransformScale(sx, sy) \ + (GTransform) { \ + .a = sx, .b = GTransformNumberZero, .c = GTransformNumberZero, .d = sy, \ + .tx = GTransformNumberZero, .ty = GTransformNumberZero \ + } //! @param sx X scaling factor (type is char, int, float, etc) //! @param sy Y scaling factor (type is char, int, float, etc) #define GTransformScaleFromNumber(sx, sy) \ - GTransformScale(GTransformNumberFromNumber(sx), GTransformNumberFromNumber(sy)) + GTransformScale(GTransformNumberFromNumber(sx), GTransformNumberFromNumber(sy)) //! This macro returns a translation transformation matrix for the corresponding input coefficients. //! Below is the equivalent resulting matrix: @@ -91,18 +88,15 @@ //! [ tx ty 1 ] //! @param tx_v X translation factor (type is GTransformNumber) //! @param ty_v Y translation factor (type is GTransformNumber) -#define GTransformTranslation(tx_v, ty_v) \ - (GTransform) { .a = GTransformNumberOne, \ - .b = GTransformNumberZero, \ - .c = GTransformNumberZero, \ - .d = GTransformNumberOne, \ - .tx = tx_v, \ - .ty = ty_v } +#define GTransformTranslation(tx_v, ty_v) \ + (GTransform) { \ + .a = GTransformNumberOne, .b = GTransformNumberZero, .c = GTransformNumberZero, \ + .d = GTransformNumberOne, .tx = tx_v, .ty = ty_v \ + } //! @param tx X translation factor (type is char, int, float, etc) //! @param ty Y translation factor (type is char, int, float, etc) -#define GTransformTranslationFromNumber(tx, ty) \ - GTransformTranslation(GTransformNumberFromNumber(tx), GTransformNumberFromNumber(ty)) - +#define GTransformTranslationFromNumber(tx, ty) \ + GTransformTranslation(GTransformNumberFromNumber(tx), GTransformNumberFromNumber(ty)) //! @internal //! Function that returns the rotation matrix as defined below by GTransformRotation @@ -125,32 +119,32 @@ GTransform gtransform_init_rotation(int32_t angle); //! Returns whether the input matrix is an identity matrix or not //! @param t Pointer to transformation matrix to test //! @return True if input matrix is identity; False if NULL or not identity. -bool gtransform_is_identity(const GTransform * const t); +bool gtransform_is_identity(const GTransform *const t); //! Returns whether the input matrix is strictly a scaling matrix //! @param t Pointer to transformation matrix to test //! @return True if input matrix is only scaling X or Y; False if NULL or other coefficients set. -bool gtransform_is_only_scale(const GTransform * const t); +bool gtransform_is_only_scale(const GTransform *const t); //! Returns whether the input matrix is strictly a translation matrix //! @param t Pointer to transformation matrix to test //! @return True if input matrix is only translating X or Y; False if NULL or other //! coefficients set. -bool gtransform_is_only_translation(const GTransform * const t); +bool gtransform_is_only_translation(const GTransform *const t); //! Returns whether the input matrix has coefficients b and c set to 0. //! This does not check whether any other coefficients are set or not. //! @param t Pointer to transformation matrix to test //! @return True if input matrix is only scaling or translating X or Y; False if NULL or other. //! coefficients set. -bool gtransform_is_only_scale_or_translation(const GTransform * const t); +bool gtransform_is_only_scale_or_translation(const GTransform *const t); //! Returns true if the two matrices are equal; false otherwise //! Returns false if either parameter is NULL //! @param t1 Pointer to first transformation matrix //! @param t2 Pointer to second transformation matrix //! @return True if both matrices are equal; False if any are NULL or if not equal. -bool gtransform_is_equal(const GTransform * const t1, const GTransform * const t2); +bool gtransform_is_equal(const GTransform *const t1, const GTransform *const t2); ////////////////////////////////////// /// Modifying Transforms @@ -162,7 +156,7 @@ bool gtransform_is_equal(const GTransform * const t1, const GTransform * const t //! @param t_new Pointer to destination transformation matrix //! @param t1 Pointer to transformation matrix to concatenate with t2 where t_new = t1*t2 //! @param t2 Pointer to transformation matrix to concatenate with t1 where t_new = t1*t2 -void gtransform_concat(GTransform *t_new, const GTransform *t1, const GTransform * t2); +void gtransform_concat(GTransform *t_new, const GTransform *t1, const GTransform *t2); //! Updates the input transformation matrix by applying a translation. //! This results in applying the following matrix below (i.e. t_new = t_scale*t): @@ -182,8 +176,7 @@ void gtransform_scale(GTransform *t_new, GTransform *t, GTransformNumber sx, GTr //! @param sx X scaling factor (type is char, int, float, etc) //! @param sy Y scaling factor (type is char, int, float, etc) #define gtransform_scale_number(t_new, t, sx, sy) \ - gtransform_scale(t_new, t, \ - GTransformNumberFromNumber(sx), GTransformNumberFromNumber(sy)) + gtransform_scale(t_new, t, GTransformNumberFromNumber(sx), GTransformNumberFromNumber(sy)) //! Updates the input transformation matrix by applying a translation. //! This results in applying the following matrix below (i.e. t_new = t_translation*t): @@ -195,8 +188,8 @@ void gtransform_scale(GTransform *t_new, GTransform *t, GTransformNumber sx, GTr //! @param t Pointer to transformation matrix that will be translated //! @param tx X translation factor //! @param ty Y translation factor -void gtransform_translate(GTransform *t_new, GTransform *t, - GTransformNumber tx, GTransformNumber ty); +void gtransform_translate(GTransform *t_new, GTransform *t, GTransformNumber tx, + GTransformNumber ty); //! Similar to gtransform_translate but with native number types (i.e. char, int, float, etc) //! @param t_new Pointer to destination transformation matrix @@ -204,8 +197,7 @@ void gtransform_translate(GTransform *t_new, GTransform *t, //! @param tx X translation factor (type is char, int, float, etc) //! @param ty Y translation factor (type is char, int, float, etc) #define gtransform_translate_number(t_new, t, tx, ty) \ - gtransform_translate(t_new, t, \ - GTransformNumberFromNumber(tx), GTransformNumberFromNumber(ty)) + gtransform_translate(t_new, t, GTransformNumberFromNumber(tx), GTransformNumberFromNumber(ty)) //! Updates the input transformation matrix by applying a rotation of angle degrees. //! This results in applying the following matrix below (i.e. t_new = tr*t): @@ -235,15 +227,14 @@ bool gtransform_invert(GTransform *t_new, GTransform *t); //! @param t Pointer to transformation matrix to apply to the GPoint //! @return GPointPrecise after transforming the GPoint; if t is NULL then just convert the //! GPoint to a GPointPrecise. -GPointPrecise gpoint_transform(GPoint point, const GTransform * const t); +GPointPrecise gpoint_transform(GPoint point, const GTransform *const t); //! Transforms a single GVector (dx,dy) based on the transformation matrix //! @param vector GVector to be transformed //! @param t Pointer to transformation matrix to apply to the GVector //! @return GVectorPrecise after transforming the GVector; if t is NULL then just convert the //! GVector to a GVectorPrecise. -GVectorPrecise gvector_transform(GVector vector, const GTransform * const t); +GVectorPrecise gvector_transform(GVector vector, const GTransform *const t); //! @} // end addtogroup GraphicsTransforms //! @} // end addtogroup Graphics - diff --git a/src/fw/applib/graphics/gtypes.c b/src/fw/applib/graphics/gtypes.c index 31472167e2..0e5dbc97ba 100644 --- a/src/fw/applib/graphics/gtypes.c +++ b/src/fw/applib/graphics/gtypes.c @@ -11,7 +11,7 @@ #include -bool gpoint_equal(const GPoint * const point_a, const GPoint * const point_b) { +bool gpoint_equal(const GPoint *const point_a, const GPoint *const point_b) { return (point_a->x == point_b->x && point_a->y == point_b->y); } @@ -22,7 +22,7 @@ static void prv_swap_gpoint(GPoint *a, GPoint *b) { } void gpoint_sort(GPoint *points, size_t num_points, GPointComparator comparator, void *context, - bool reverse) { + bool reverse) { for (size_t i = 0; i < num_points; i++) { for (size_t j = i + 1; j < num_points; j++) { int cmp = comparator(&points[i], &points[j], context); @@ -33,38 +33,30 @@ void gpoint_sort(GPoint *points, size_t num_points, GPointComparator comparator, } } -bool gpointprecise_equal(const GPointPrecise * const pointP_a, - const GPointPrecise * const pointP_b) { +bool gpointprecise_equal(const GPointPrecise *const pointP_a, const GPointPrecise *const pointP_b) { return ((pointP_a->x.raw_value == pointP_b->x.raw_value) && (pointP_a->y.raw_value == pointP_b->y.raw_value)); } -GPointPrecise gpointprecise_midpoint(const GPointPrecise a, - const GPointPrecise b) { - return GPointPrecise( - (int16_t)(((int32_t)a.x.raw_value + (int32_t)b.x.raw_value) / 2), - (int16_t)(((int32_t)a.y.raw_value + (int32_t)b.y.raw_value) / 2)); +GPointPrecise gpointprecise_midpoint(const GPointPrecise a, const GPointPrecise b) { + return GPointPrecise((int16_t)(((int32_t)a.x.raw_value + (int32_t)b.x.raw_value) / 2), + (int16_t)(((int32_t)a.y.raw_value + (int32_t)b.y.raw_value) / 2)); } -GPointPrecise gpointprecise_add(const GPointPrecise a, - const GPointPrecise b) { - return GPointPrecise(a.x.raw_value + b.x.raw_value, - a.y.raw_value + b.y.raw_value); +GPointPrecise gpointprecise_add(const GPointPrecise a, const GPointPrecise b) { + return GPointPrecise(a.x.raw_value + b.x.raw_value, a.y.raw_value + b.y.raw_value); } -GPointPrecise gpointprecise_sub(const GPointPrecise a, - const GPointPrecise b) { - return GPointPrecise(a.x.raw_value - b.x.raw_value, - a.y.raw_value - b.y.raw_value); +GPointPrecise gpointprecise_sub(const GPointPrecise a, const GPointPrecise b) { + return GPointPrecise(a.x.raw_value - b.x.raw_value, a.y.raw_value - b.y.raw_value); } - -bool gvector_equal(const GVector * const vector_a, const GVector * const vector_b) { +bool gvector_equal(const GVector *const vector_a, const GVector *const vector_b) { return (vector_a->dx == vector_b->dx && vector_a->dy == vector_b->dy); } -bool gvectorprecise_equal(const GVectorPrecise * const vectorP_a, - const GVectorPrecise * const vectorP_b) { +bool gvectorprecise_equal(const GVectorPrecise *const vectorP_a, + const GVectorPrecise *const vectorP_b) { return ((vectorP_a->dx.raw_value == vectorP_b->dx.raw_value) && (vectorP_a->dy.raw_value == vectorP_b->dy.raw_value)); } @@ -73,14 +65,12 @@ bool gsize_equal(const GSize *size_a, const GSize *size_b) { return (size_a->w == size_b->w && size_a->h == size_b->h); } -bool grect_equal(const GRect* const r0, const GRect* const r1) { - return ((r0->origin.x == r1->origin.x) && - (r0->origin.y == r1->origin.y) && - (r0->size.w == r1->size.w) && - (r0->size.h == r1->size.h)); +bool grect_equal(const GRect *const r0, const GRect *const r1) { + return ((r0->origin.x == r1->origin.x) && (r0->origin.y == r1->origin.y) && + (r0->size.w == r1->size.w) && (r0->size.h == r1->size.h)); } -bool grect_is_empty(const GRect* const rect) { +bool grect_is_empty(const GRect *const rect) { return (rect->size.h == 0 || rect->size.w == 0); } @@ -95,7 +85,7 @@ void grect_standardize(GRect *rect) { } } -void grect_clip(GRect *rect_to_clip, const GRect * const rect_clipper) { +void grect_clip(GRect *rect_to_clip, const GRect *const rect_clipper) { int16_t overflow; if (rect_to_clip->origin.x < rect_clipper->origin.x) { overflow = rect_clipper->origin.x - rect_to_clip->origin.x; @@ -109,7 +99,8 @@ void grect_clip(GRect *rect_to_clip, const GRect * const rect_clipper) { rect_to_clip->origin.x = rect_clipper->origin.x + rect_clipper->size.w; rect_to_clip->size.w = 0; } - overflow = rect_to_clip->origin.x + rect_to_clip->size.w - (rect_clipper->origin.x + rect_clipper->size.w); + overflow = rect_to_clip->origin.x + rect_to_clip->size.w - + (rect_clipper->origin.x + rect_clipper->size.w); if (overflow > 0) { rect_to_clip->size.w -= overflow; } @@ -125,7 +116,8 @@ void grect_clip(GRect *rect_to_clip, const GRect * const rect_clipper) { rect_to_clip->origin.y = rect_clipper->origin.y + rect_clipper->size.h; rect_to_clip->size.h = 0; } - overflow = rect_to_clip->origin.y + rect_to_clip->size.h - (rect_clipper->origin.y + rect_clipper->size.h); + overflow = rect_to_clip->origin.y + rect_to_clip->size.h - + (rect_clipper->origin.y + rect_clipper->size.h); if (overflow > 0) { rect_to_clip->size.h -= overflow; } @@ -138,10 +130,8 @@ GRect grect_union(const GRect *r1, const GRect *r2) { grect_standardize(&s_r2); const uint8_t min_x = MIN(s_r2.origin.x, s_r1.origin.x); const uint8_t min_y = MIN(s_r2.origin.y, s_r1.origin.y); - const uint8_t max_x = MAX(s_r2.origin.x + s_r2.size.w, - s_r1.origin.x + s_r1.size.w); - const uint8_t max_y = MAX(s_r2.origin.y + s_r2.size.h, - s_r1.origin.y + s_r1.size.h); + const uint8_t max_x = MAX(s_r2.origin.x + s_r2.size.w, s_r1.origin.x + s_r1.size.w); + const uint8_t max_y = MAX(s_r2.origin.y + s_r2.size.h, s_r1.origin.y + s_r1.size.h); GRect result = GRect(min_x, min_y, max_x - min_x, max_y - min_y); return result; } @@ -167,8 +157,7 @@ bool grect_contains_point(const GRect *rect, const GPoint *point) { max_y = min_y; min_y = temp; } - return (point->x >= min_x && point->x < max_x && - point->y >= min_y && point->y < max_y); + return (point->x >= min_x && point->x < max_x && point->y >= min_y && point->y < max_y); } void grect_align(GRect *rect, const GRect *inside_rect, const GAlign alignment, const bool clip) { @@ -189,17 +178,17 @@ void grect_align(GRect *rect, const GRect *inside_rect, const GAlign alignment, } case GAlignTopLeft: { rect->origin.x = inside_rect->origin.x; - rect->origin.y = + inside_rect->origin.y; + rect->origin.y = +inside_rect->origin.y; return; } case GAlignTopRight: { rect->origin.x = (inside_rect->size.w - rect->size.w) + inside_rect->origin.x; - rect->origin.y = + inside_rect->origin.y; + rect->origin.y = +inside_rect->origin.y; return; } case GAlignTop: { rect->origin.x = ((inside_rect->size.w - rect->size.w) / 2) + inside_rect->origin.x; - rect->origin.y = + inside_rect->origin.y; + rect->origin.y = +inside_rect->origin.y; return; } case GAlignLeft: { @@ -241,8 +230,7 @@ GRect grect_crop(GRect rect, const int32_t crop_size_px) { } GRect grect_inset_internal(GRect rect, int16_t dx, int16_t dy) { - return grect_inset(rect, - (GEdgeInsets) {.top = dy, .right = dx, .bottom = dy, .left = dx}); + return grect_inset(rect, (GEdgeInsets){.top = dy, .right = dx, .bottom = dy, .left = dx}); } GRect grect_inset(GRect r, GEdgeInsets insets) { @@ -265,27 +253,28 @@ GPoint gpoint_to_local_coordinates(const GPoint point, GContext *ctx) { GRect grect_to_global_coordinates(const GRect rect, GContext *ctx) { GRect translated_rect = { - .origin.x = ctx->draw_state.drawing_box.origin.x + rect.origin.x, - .origin.y = ctx->draw_state.drawing_box.origin.y + rect.origin.y, - .size = rect.size, + .origin.x = ctx->draw_state.drawing_box.origin.x + rect.origin.x, + .origin.y = ctx->draw_state.drawing_box.origin.y + rect.origin.y, + .size = rect.size, }; return translated_rect; } GRect grect_to_local_coordinates(const GRect rect, GContext *ctx) { GRect translated_rect = { - .origin.x = -ctx->draw_state.drawing_box.origin.x + rect.origin.x, - .origin.y = -ctx->draw_state.drawing_box.origin.y + rect.origin.y, - .size = rect.size, + .origin.x = -ctx->draw_state.drawing_box.origin.x + rect.origin.x, + .origin.y = -ctx->draw_state.drawing_box.origin.y + rect.origin.y, + .size = rect.size, }; return translated_rect; } bool grect_overlaps_grect(const GRect *r1, const GRect *r2) { - if ((r1->origin.x < (r2->origin.x + r2->size.w)) && // Left edge of r1 not past r2's right edge - ((r1->origin.x + r1->size.w) > r2->origin.x) && // Right edge of r1 is right of r2's left edge - (r1->origin.y < (r2->origin.y + r2->size.h)) && // Top edge r1 not below r2's bottom edge - ((r1->origin.y + r1->size.h) > r2->origin.y)) { // Bottom edge r1 not above r2's top edge + if ((r1->origin.x < (r2->origin.x + r2->size.w)) && // Left edge of r1 not past r2's right edge + ((r1->origin.x + r1->size.w) > + r2->origin.x) && // Right edge of r1 is right of r2's left edge + (r1->origin.y < (r2->origin.y + r2->size.h)) && // Top edge r1 not below r2's bottom edge + ((r1->origin.y + r1->size.h) > r2->origin.y)) { // Bottom edge r1 not above r2's top edge return true; } return false; @@ -332,8 +321,7 @@ GColor8 gcolor_get_bw(GColor8 color) { if (luminance < MAX_LUMINANCE / 2) { return GColorBlack; - } - else { + } else { return GColorWhite; } } @@ -349,14 +337,11 @@ GColor8 gcolor_get_grayscale(GColor8 color) { if (luminance < DARK_GRAY_LUMINANCE) { return GColorBlack; - } - else if (luminance < (LIGHT_GRAY_LUMINANCE + DARK_GRAY_LUMINANCE) / 2) { + } else if (luminance < (LIGHT_GRAY_LUMINANCE + DARK_GRAY_LUMINANCE) / 2) { return GColorDarkGray; - } - else if (luminance <= LIGHT_GRAY_LUMINANCE) { + } else if (luminance <= LIGHT_GRAY_LUMINANCE) { return GColorLightGray; - } - else { + } else { return GColorWhite; } } @@ -381,14 +366,12 @@ GColor8 gcolor_legible_over(GColor8 background_color) { GColor8 gcolor_invert(GColor8 color) { // Invert the RGB components while keeping the alpha channel unchanged - return (GColor8) { - .argb = (color.argb & 0b11000000) | (~color.argb & 0b00111111) - }; + return (GColor8){.argb = (color.argb & 0b11000000) | (~color.argb & 0b00111111)}; } BitmapInfo gbitmap_get_info(const GBitmap *bitmap) { if (!bitmap) { - return (BitmapInfo) { 0 }; + return (BitmapInfo){0}; } // In 2.x, GBitmap was exposed and info_flags was only used for keeping track of heap allocation. @@ -396,10 +379,10 @@ BitmapInfo gbitmap_get_info(const GBitmap *bitmap) { // For a legacy2 app, zero out all info fields except for bitmap heap allocation, and assume // that if the flag is set and the bitmap is allocated on the heap, the flag is valid. if (process_manager_compiled_with_legacy2_sdk()) { - Heap * heap = app_state_get_heap(); - return (BitmapInfo) { - .is_bitmap_heap_allocated = - bitmap->info.is_bitmap_heap_allocated && heap_is_allocated(heap, bitmap->addr), + Heap *heap = app_state_get_heap(); + return (BitmapInfo){ + .is_bitmap_heap_allocated = + bitmap->info.is_bitmap_heap_allocated && heap_is_allocated(heap, bitmap->addr), }; } return bitmap->info; @@ -412,10 +395,8 @@ bool gcolor_is_invisible(GColor8 color) { #define RGB_LOOKUP_TABLE_SIZE (64) const GColor8Component g_color_luminance_lookup[RGB_LOOKUP_TABLE_SIZE] = { - 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, - 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, + 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, }; // Table with blended colors rendered by Photoshop @@ -423,262 +404,262 @@ const GColor8Component g_color_luminance_lookup[RGB_LOOKUP_TABLE_SIZE] = { // Values below were calculated for 33% blending // 66% blending can be achieved by transforming the table around diagonal axis static const uint8_t s_blending_lookup_33_percent[RGB_LOOKUP_TABLE_SIZE * RGB_LOOKUP_TABLE_SIZE] = { - 0xc0, 0xc1, 0xc1, 0xc2, 0xc4, 0xc5, 0xc5, 0xc6, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, - 0xc0, 0xc1, 0xc2, 0xc2, 0xc4, 0xc5, 0xc6, 0xc6, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, - 0xc1, 0xc1, 0xc2, 0xc3, 0xc5, 0xc5, 0xc6, 0xc7, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, - 0xc1, 0xc2, 0xc2, 0xc3, 0xc5, 0xc6, 0xc6, 0xc7, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, - 0xc0, 0xc1, 0xc1, 0xc2, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xc8, 0xc9, 0xc9, 0xca, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, - 0xc0, 0xc1, 0xc2, 0xc2, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xc8, 0xc9, 0xca, 0xca, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, - 0xc1, 0xc1, 0xc2, 0xc3, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xc9, 0xc9, 0xca, 0xcb, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, - 0xc1, 0xc2, 0xc2, 0xc3, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xc9, 0xca, 0xca, 0xcb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, - 0xc4, 0xc5, 0xc5, 0xc6, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xcc, 0xcd, 0xcd, 0xce, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xc4, 0xc5, 0xc6, 0xc6, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xcc, 0xcd, 0xce, 0xce, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xc5, 0xc5, 0xc6, 0xc7, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xcd, 0xcd, 0xce, 0xcf, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xc5, 0xc6, 0xc6, 0xc7, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xcd, 0xce, 0xce, 0xcf, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xc8, 0xc9, 0xc9, 0xca, 0xcc, 0xcd, 0xcd, 0xce, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xc8, 0xc9, 0xca, 0xca, 0xcc, 0xcd, 0xce, 0xce, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xc9, 0xc9, 0xca, 0xcb, 0xcd, 0xcd, 0xce, 0xcf, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xc9, 0xca, 0xca, 0xcb, 0xcd, 0xce, 0xce, 0xcf, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xc0, 0xc1, 0xc1, 0xc2, 0xc4, 0xc5, 0xc5, 0xc6, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, - 0xc0, 0xc1, 0xc2, 0xc2, 0xc4, 0xc5, 0xc6, 0xc6, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, - 0xc1, 0xc1, 0xc2, 0xc3, 0xc5, 0xc5, 0xc6, 0xc7, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, - 0xc1, 0xc2, 0xc2, 0xc3, 0xc5, 0xc6, 0xc6, 0xc7, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, - 0xc0, 0xc1, 0xc1, 0xc2, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xc8, 0xc9, 0xc9, 0xca, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, - 0xc0, 0xc1, 0xc2, 0xc2, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xc8, 0xc9, 0xca, 0xca, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, - 0xc1, 0xc1, 0xc2, 0xc3, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xc9, 0xc9, 0xca, 0xcb, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, - 0xc1, 0xc2, 0xc2, 0xc3, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xc9, 0xca, 0xca, 0xcb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, - 0xc4, 0xc5, 0xc5, 0xc6, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xcc, 0xcd, 0xcd, 0xce, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xc4, 0xc5, 0xc6, 0xc6, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xcc, 0xcd, 0xce, 0xce, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xc5, 0xc5, 0xc6, 0xc7, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xcd, 0xcd, 0xce, 0xcf, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xc5, 0xc6, 0xc6, 0xc7, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xcd, 0xce, 0xce, 0xcf, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xc8, 0xc9, 0xc9, 0xca, 0xcc, 0xcd, 0xcd, 0xce, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xc8, 0xc9, 0xca, 0xca, 0xcc, 0xcd, 0xce, 0xce, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xc9, 0xc9, 0xca, 0xcb, 0xcd, 0xcd, 0xce, 0xcf, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xc9, 0xca, 0xca, 0xcb, 0xcd, 0xce, 0xce, 0xcf, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, - 0xf0, 0xf1, 0xf1, 0xf2, 0xf4, 0xf5, 0xf5, 0xf6, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, - 0xf0, 0xf1, 0xf2, 0xf2, 0xf4, 0xf5, 0xf6, 0xf6, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, - 0xf1, 0xf1, 0xf2, 0xf3, 0xf5, 0xf5, 0xf6, 0xf7, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, - 0xf1, 0xf2, 0xf2, 0xf3, 0xf5, 0xf6, 0xf6, 0xf7, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, - 0xf0, 0xf1, 0xf1, 0xf2, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xf8, 0xf9, 0xf9, 0xfa, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, - 0xf0, 0xf1, 0xf2, 0xf2, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xf8, 0xf9, 0xfa, 0xfa, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, - 0xf1, 0xf1, 0xf2, 0xf3, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xf9, 0xf9, 0xfa, 0xfb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, - 0xf1, 0xf2, 0xf2, 0xf3, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xf9, 0xfa, 0xfa, 0xfb, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xf4, 0xf5, 0xf5, 0xf6, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xfc, 0xfd, 0xfd, 0xfe, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xf4, 0xf5, 0xf6, 0xf6, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xfc, 0xfd, 0xfe, 0xfe, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xf5, 0xf5, 0xf6, 0xf7, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xfd, 0xfd, 0xfe, 0xff, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xf5, 0xf6, 0xf6, 0xf7, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xfd, 0xfe, 0xfe, 0xff, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xf8, 0xf9, 0xf9, 0xfa, 0xfc, 0xfd, 0xfd, 0xfe, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xf8, 0xf9, 0xfa, 0xfa, 0xfc, 0xfd, 0xfe, 0xfe, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xf9, 0xf9, 0xfa, 0xfb, 0xfd, 0xfd, 0xfe, 0xff, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xf9, 0xfa, 0xfa, 0xfb, 0xfd, 0xfe, 0xfe, 0xff, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, - 0xf0, 0xf1, 0xf1, 0xf2, 0xf4, 0xf5, 0xf5, 0xf6, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, - 0xf0, 0xf1, 0xf2, 0xf2, 0xf4, 0xf5, 0xf6, 0xf6, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, - 0xf1, 0xf1, 0xf2, 0xf3, 0xf5, 0xf5, 0xf6, 0xf7, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, - 0xf1, 0xf2, 0xf2, 0xf3, 0xf5, 0xf6, 0xf6, 0xf7, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, - 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, - 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, - 0xf0, 0xf1, 0xf1, 0xf2, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xf8, 0xf9, 0xf9, 0xfa, - 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, - 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, - 0xf0, 0xf1, 0xf2, 0xf2, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xf8, 0xf9, 0xfa, 0xfa, - 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, - 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, - 0xf1, 0xf1, 0xf2, 0xf3, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xf9, 0xf9, 0xfa, 0xfb, - 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, - 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, - 0xf1, 0xf2, 0xf2, 0xf3, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xf9, 0xfa, 0xfa, 0xfb, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xf4, 0xf5, 0xf5, 0xf6, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xfc, 0xfd, 0xfd, 0xfe, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xf4, 0xf5, 0xf6, 0xf6, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xfc, 0xfd, 0xfe, 0xfe, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xf5, 0xf5, 0xf6, 0xf7, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xfd, 0xfd, 0xfe, 0xff, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xf5, 0xf6, 0xf6, 0xf7, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xfd, 0xfe, 0xfe, 0xff, - 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, - 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xf8, 0xf9, 0xf9, 0xfa, 0xfc, 0xfd, 0xfd, 0xfe, - 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, - 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xf8, 0xf9, 0xfa, 0xfa, 0xfc, 0xfd, 0xfe, 0xfe, - 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, - 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xf9, 0xf9, 0xfa, 0xfb, 0xfd, 0xfd, 0xfe, 0xff, - 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, - 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xf9, 0xfa, 0xfa, 0xfb, 0xfd, 0xfe, 0xfe, 0xff, + 0xc0, 0xc1, 0xc1, 0xc2, 0xc4, 0xc5, 0xc5, 0xc6, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, + 0xc0, 0xc1, 0xc2, 0xc2, 0xc4, 0xc5, 0xc6, 0xc6, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, + 0xc1, 0xc1, 0xc2, 0xc3, 0xc5, 0xc5, 0xc6, 0xc7, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, + 0xc1, 0xc2, 0xc2, 0xc3, 0xc5, 0xc6, 0xc6, 0xc7, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, + 0xc0, 0xc1, 0xc1, 0xc2, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xc8, 0xc9, 0xc9, 0xca, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, + 0xc0, 0xc1, 0xc2, 0xc2, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xc8, 0xc9, 0xca, 0xca, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, + 0xc1, 0xc1, 0xc2, 0xc3, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xc9, 0xc9, 0xca, 0xcb, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, + 0xc1, 0xc2, 0xc2, 0xc3, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xc9, 0xca, 0xca, 0xcb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, + 0xc4, 0xc5, 0xc5, 0xc6, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xcc, 0xcd, 0xcd, 0xce, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xc4, 0xc5, 0xc6, 0xc6, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xcc, 0xcd, 0xce, 0xce, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xc5, 0xc5, 0xc6, 0xc7, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xcd, 0xcd, 0xce, 0xcf, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xc5, 0xc6, 0xc6, 0xc7, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xcd, 0xce, 0xce, 0xcf, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xc8, 0xc9, 0xc9, 0xca, 0xcc, 0xcd, 0xcd, 0xce, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xc8, 0xc9, 0xca, 0xca, 0xcc, 0xcd, 0xce, 0xce, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xc9, 0xc9, 0xca, 0xcb, 0xcd, 0xcd, 0xce, 0xcf, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xc9, 0xca, 0xca, 0xcb, 0xcd, 0xce, 0xce, 0xcf, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xc0, 0xc1, 0xc1, 0xc2, 0xc4, 0xc5, 0xc5, 0xc6, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, + 0xc0, 0xc1, 0xc2, 0xc2, 0xc4, 0xc5, 0xc6, 0xc6, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, + 0xc1, 0xc1, 0xc2, 0xc3, 0xc5, 0xc5, 0xc6, 0xc7, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, + 0xc1, 0xc2, 0xc2, 0xc3, 0xc5, 0xc6, 0xc6, 0xc7, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, + 0xc0, 0xc1, 0xc1, 0xc2, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xc8, 0xc9, 0xc9, 0xca, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, + 0xc0, 0xc1, 0xc2, 0xc2, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xc8, 0xc9, 0xca, 0xca, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, + 0xc1, 0xc1, 0xc2, 0xc3, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xc9, 0xc9, 0xca, 0xcb, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, + 0xc1, 0xc2, 0xc2, 0xc3, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xc9, 0xca, 0xca, 0xcb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, + 0xc4, 0xc5, 0xc5, 0xc6, 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xcc, 0xcd, 0xcd, 0xce, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xc4, 0xc5, 0xc6, 0xc6, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xcc, 0xcd, 0xce, 0xce, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xc5, 0xc5, 0xc6, 0xc7, 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xcd, 0xcd, 0xce, 0xcf, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xc5, 0xc6, 0xc6, 0xc7, 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xcd, 0xce, 0xce, 0xcf, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xc4, 0xc5, 0xc5, 0xc6, 0xc8, 0xc9, 0xc9, 0xca, 0xc8, 0xc9, 0xc9, 0xca, 0xcc, 0xcd, 0xcd, 0xce, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xca, 0xc8, 0xc9, 0xca, 0xca, 0xcc, 0xcd, 0xce, 0xce, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xc5, 0xc5, 0xc6, 0xc7, 0xc9, 0xc9, 0xca, 0xcb, 0xc9, 0xc9, 0xca, 0xcb, 0xcd, 0xcd, 0xce, 0xcf, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xc5, 0xc6, 0xc6, 0xc7, 0xc9, 0xca, 0xca, 0xcb, 0xc9, 0xca, 0xca, 0xcb, 0xcd, 0xce, 0xce, 0xcf, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, + 0xf0, 0xf1, 0xf1, 0xf2, 0xf4, 0xf5, 0xf5, 0xf6, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, + 0xf0, 0xf1, 0xf2, 0xf2, 0xf4, 0xf5, 0xf6, 0xf6, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, + 0xf1, 0xf1, 0xf2, 0xf3, 0xf5, 0xf5, 0xf6, 0xf7, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, + 0xf1, 0xf2, 0xf2, 0xf3, 0xf5, 0xf6, 0xf6, 0xf7, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, + 0xf0, 0xf1, 0xf1, 0xf2, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xf8, 0xf9, 0xf9, 0xfa, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, + 0xf0, 0xf1, 0xf2, 0xf2, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xf8, 0xf9, 0xfa, 0xfa, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, + 0xf1, 0xf1, 0xf2, 0xf3, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xf9, 0xf9, 0xfa, 0xfb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, + 0xf1, 0xf2, 0xf2, 0xf3, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xf9, 0xfa, 0xfa, 0xfb, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xf4, 0xf5, 0xf5, 0xf6, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xfc, 0xfd, 0xfd, 0xfe, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xf4, 0xf5, 0xf6, 0xf6, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xfc, 0xfd, 0xfe, 0xfe, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xf5, 0xf5, 0xf6, 0xf7, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xfd, 0xfd, 0xfe, 0xff, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xf5, 0xf6, 0xf6, 0xf7, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xfd, 0xfe, 0xfe, 0xff, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xf8, 0xf9, 0xf9, 0xfa, 0xfc, 0xfd, 0xfd, 0xfe, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xf8, 0xf9, 0xfa, 0xfa, 0xfc, 0xfd, 0xfe, 0xfe, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xf9, 0xf9, 0xfa, 0xfb, 0xfd, 0xfd, 0xfe, 0xff, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xf9, 0xfa, 0xfa, 0xfb, 0xfd, 0xfe, 0xfe, 0xff, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, + 0xf0, 0xf1, 0xf1, 0xf2, 0xf4, 0xf5, 0xf5, 0xf6, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, + 0xf0, 0xf1, 0xf2, 0xf2, 0xf4, 0xf5, 0xf6, 0xf6, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, + 0xf1, 0xf1, 0xf2, 0xf3, 0xf5, 0xf5, 0xf6, 0xf7, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, + 0xf1, 0xf2, 0xf2, 0xf3, 0xf5, 0xf6, 0xf6, 0xf7, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, + 0xd0, 0xd1, 0xd1, 0xd2, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, + 0xe0, 0xe1, 0xe1, 0xe2, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, + 0xf0, 0xf1, 0xf1, 0xf2, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xf8, 0xf9, 0xf9, 0xfa, + 0xd0, 0xd1, 0xd2, 0xd2, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, + 0xe0, 0xe1, 0xe2, 0xe2, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, + 0xf0, 0xf1, 0xf2, 0xf2, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xf8, 0xf9, 0xfa, 0xfa, + 0xd1, 0xd1, 0xd2, 0xd3, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, + 0xe1, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, + 0xf1, 0xf1, 0xf2, 0xf3, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xf9, 0xf9, 0xfa, 0xfb, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, + 0xe1, 0xe2, 0xe2, 0xe3, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, + 0xf1, 0xf2, 0xf2, 0xf3, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xf9, 0xfa, 0xfa, 0xfb, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xf4, 0xf5, 0xf5, 0xf6, 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xfc, 0xfd, 0xfd, 0xfe, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xf4, 0xf5, 0xf6, 0xf6, 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xfc, 0xfd, 0xfe, 0xfe, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xf5, 0xf5, 0xf6, 0xf7, 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xfd, 0xfd, 0xfe, 0xff, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xf5, 0xf6, 0xf6, 0xf7, 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xfd, 0xfe, 0xfe, 0xff, + 0xd4, 0xd5, 0xd5, 0xd6, 0xd8, 0xd9, 0xd9, 0xda, 0xd8, 0xd9, 0xd9, 0xda, 0xdc, 0xdd, 0xdd, 0xde, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xe4, 0xe5, 0xe5, 0xe6, 0xe8, 0xe9, 0xe9, 0xea, 0xe8, 0xe9, 0xe9, 0xea, 0xec, 0xed, 0xed, 0xee, + 0xf4, 0xf5, 0xf5, 0xf6, 0xf8, 0xf9, 0xf9, 0xfa, 0xf8, 0xf9, 0xf9, 0xfa, 0xfc, 0xfd, 0xfd, 0xfe, + 0xd4, 0xd5, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xda, 0xd8, 0xd9, 0xda, 0xda, 0xdc, 0xdd, 0xde, 0xde, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xe4, 0xe5, 0xe6, 0xe6, 0xe8, 0xe9, 0xea, 0xea, 0xe8, 0xe9, 0xea, 0xea, 0xec, 0xed, 0xee, 0xee, + 0xf4, 0xf5, 0xf6, 0xf6, 0xf8, 0xf9, 0xfa, 0xfa, 0xf8, 0xf9, 0xfa, 0xfa, 0xfc, 0xfd, 0xfe, 0xfe, + 0xd5, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xda, 0xdb, 0xd9, 0xd9, 0xda, 0xdb, 0xdd, 0xdd, 0xde, 0xdf, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xe5, 0xe5, 0xe6, 0xe7, 0xe9, 0xe9, 0xea, 0xeb, 0xe9, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef, + 0xf5, 0xf5, 0xf6, 0xf7, 0xf9, 0xf9, 0xfa, 0xfb, 0xf9, 0xf9, 0xfa, 0xfb, 0xfd, 0xfd, 0xfe, 0xff, + 0xd5, 0xd6, 0xd6, 0xd7, 0xd9, 0xda, 0xda, 0xdb, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0xde, 0xde, 0xdf, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xe5, 0xe6, 0xe6, 0xe7, 0xe9, 0xea, 0xea, 0xeb, 0xe9, 0xea, 0xea, 0xeb, 0xed, 0xee, 0xee, 0xef, + 0xf5, 0xf6, 0xf6, 0xf7, 0xf9, 0xfa, 0xfa, 0xfb, 0xf9, 0xfa, 0xfa, 0xfb, 0xfd, 0xfe, 0xfe, 0xff, }; GColor8 gcolor_blend(GColor8 src_color, GColor8 dest_color, uint8_t blending_factor) { @@ -691,15 +672,16 @@ GColor8 gcolor_blend(GColor8 src_color, GColor8 dest_color, uint8_t blending_fac return dest_color; case 1: // Lookup: 33% - return (GColor8) { - .argb = s_blending_lookup_33_percent[(dest_color.argb & MASK_RGB) + - RGB_LOOKUP_TABLE_SIZE * (src_color.argb & MASK_RGB)], + return (GColor8){ + .argb = s_blending_lookup_33_percent[(dest_color.argb & MASK_RGB) + + RGB_LOOKUP_TABLE_SIZE * (src_color.argb & MASK_RGB)], }; case 2: // Lookup: 66% - same as mirrored 33% results - return (GColor8) { - .argb = s_blending_lookup_33_percent[(src_color.argb & MASK_RGB) + - RGB_LOOKUP_TABLE_SIZE * (dest_color.argb & MASK_RGB)], + return (GColor8){ + .argb = + s_blending_lookup_33_percent[(src_color.argb & MASK_RGB) + + RGB_LOOKUP_TABLE_SIZE * (dest_color.argb & MASK_RGB)], }; case 3: // Fast path: 100% @@ -714,13 +696,12 @@ GColor8 gcolor_alpha_blend(GColor8 src_color, GColor8 dest_color) { return gcolor_blend(src_color, dest_color, src_color.a); } -void gcolor_tint_luminance_lookup_table_init( - GColor8 tint_color, GColor8 *lookup_table_out) { +void gcolor_tint_luminance_lookup_table_init(GColor8 tint_color, GColor8 *lookup_table_out) { PBL_ASSERTN(lookup_table_out); // Inverting the tint color this way inverts the alpha channel too, but we set the alpha of all // colors in the lookup table to the original tint color's alpha in the loop below - const GColor8 inverted_tint_color = (GColor8) { .argb = ~tint_color.argb }; + const GColor8 inverted_tint_color = (GColor8){.argb = ~tint_color.argb}; for (GColor8Component luminance_index = 0; luminance_index < GCOLOR8_COMPONENT_NUM_VALUES; luminance_index++) { @@ -749,10 +730,7 @@ GColor8 gcolor_tint_using_luminance_and_multiply_alpha(GColor8 src_color, GColor } static const GColor8Component s_color_component_multiplication_lookup[16] = { - 0, 0, 0, 0, - 0, 0, 1, 1, - 0, 1, 1, 2, - 0, 1, 2, 3, + 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 2, 0, 1, 2, 3, }; GColor8Component gcolor_component_multiply(GColor8Component a, GColor8Component b) { @@ -760,7 +738,7 @@ GColor8Component gcolor_component_multiply(GColor8Component a, GColor8Component return s_color_component_multiplication_lookup[(a << 2) | b]; } -void grange_clip(GRange *range_to_clip, const GRange * const range_clipper) { +void grange_clip(GRange *range_to_clip, const GRange *const range_clipper) { int16_t start = range_to_clip->origin; int16_t end = range_to_clip->origin + range_to_clip->size; start = CLIP(start, range_clipper->origin, range_clipper->origin + range_clipper->size); diff --git a/src/fw/applib/graphics/gtypes.h b/src/fw/applib/graphics/gtypes.h index cc76ea6d9f..79ecc466a5 100644 --- a/src/fw/applib/graphics/gtypes.h +++ b/src/fw/applib/graphics/gtypes.h @@ -6,7 +6,7 @@ #pragma once -#include // FIXME: Need display dimensions +#include // FIXME: Need display dimensions #include "resource/resource.h" #include "pbl/util/attributes.h" #include "pbl/util/math.h" @@ -48,10 +48,10 @@ typedef uint8_t GColor8Component; typedef union GColor8 { uint8_t argb; struct { - uint8_t b:2; //!< Blue - uint8_t g:2; //!< Green - uint8_t r:2; //!< Red - uint8_t a:2; //!< Alpha. 3 = 100% opaque, 2 = 66% opaque, 1 = 33% opaque, 0 = transparent. + uint8_t b : 2; //!< Blue + uint8_t g : 2; //!< Green + uint8_t r : 2; //!< Red + uint8_t a : 2; //!< Alpha. 3 = 100% opaque, 2 = 66% opaque, 1 = 33% opaque, 0 = transparent. }; } GColor8; @@ -86,7 +86,6 @@ GColor8 gcolor_get_grayscale(GColor8 color); //! @return A legible color for the given background color GColor8 gcolor_legible_over(GColor8 background_color); - //! This method inverts a color. //! @param color The color to invert //! @return The inverted color @@ -120,8 +119,7 @@ GColor8 gcolor_alpha_blend(GColor8 src_color, GColor8 dest_color); //! Initialize a lookup table for tinting with luminance based on the provided tint_color. //! @note This function is extracted to optimize performing multiple lookups using the same tint //! color via \ref gcolor_perform_lookup_using_color_luminance_and_multiply_alpha. -void gcolor_tint_luminance_lookup_table_init( - GColor8 tint_color, GColor8 *lookup_table_out); +void gcolor_tint_luminance_lookup_table_init(GColor8 tint_color, GColor8 *lookup_table_out); //! @internal //! Lookup a color in the provided lookup_table using the luminance of the src_color and multiply @@ -245,7 +243,7 @@ typedef GPoint GPointReturn; //! A GPoint Comparator returns the Order in which (a, b) occurs //! @return negative int for a descending value (a > b), positive for an ascending value (b > a), //! 0 for equal -typedef int (*GPointComparator)(const GPoint * const a, const GPoint * const b, void *context); +typedef int (*GPointComparator)(const GPoint *const a, const GPoint *const b, void *context); //! Convenience macro to make a GPoint. #define GPoint(x, y) ((GPoint){(x), (y)}) @@ -319,7 +317,7 @@ static inline uint32_t gpoint_distance_squared(GPoint a, GPoint b) { //! @param point_a Pointer to the first point //! @param point_b Pointer to the second point //! @return `true` if both points are equal, `false` if not. -bool gpoint_equal(const GPoint * const point_a, const GPoint * const point_b); +bool gpoint_equal(const GPoint *const point_a, const GPoint *const point_b); //! Sorts an array of gpoints using a given GPointComparator //! @param points Array of points to sort @@ -328,16 +326,16 @@ bool gpoint_equal(const GPoint * const point_a, const GPoint * const point_b); //! @param context Callback context passed to the comparator //! @param reverse false to maintain order, true to reverse the order void gpoint_sort(GPoint *points, size_t num_points, GPointComparator comparator, void *context, - bool reverse); + bool reverse); -#define GPOINT_PRECISE_MAX 0x2000 // 12 bit resolution -#define GPOINT_PRECISE_PRECISION FIXED_S16_3_PRECISION -#define GPOINT_PRECISE_FACTOR FIXED_S16_3_FACTOR +#define GPOINT_PRECISE_MAX 0x2000 // 12 bit resolution +#define GPOINT_PRECISE_PRECISION FIXED_S16_3_PRECISION +#define GPOINT_PRECISE_FACTOR FIXED_S16_3_FACTOR //! Internal respresentation of a point //! 1 bit for sign, 12 bits represent the coordinate, 3 bits represent the precision //! Supports -4096.000 px to 4095.875 px resolution -typedef struct __attribute__ ((__packed__)) GPointPrecise { +typedef struct __attribute__((__packed__)) GPointPrecise { //! The x-coordinate. Fixed_S16_3 x; //! The y-coordinate. @@ -348,29 +346,25 @@ typedef struct __attribute__ ((__packed__)) GPointPrecise { #define GPointPrecise(x, y) ((GPointPrecise){{(x)}, {(y)}}) //! Convenience macro to convert from GPoint to GPointPrecise. -#define GPointPreciseFromGPoint(point) \ - GPointPrecise((point.x % GPOINT_PRECISE_MAX) * GPOINT_PRECISE_FACTOR, \ - (point.y % GPOINT_PRECISE_MAX) * GPOINT_PRECISE_FACTOR) +#define GPointPreciseFromGPoint(point) \ + GPointPrecise((point.x % GPOINT_PRECISE_MAX) * GPOINT_PRECISE_FACTOR, \ + (point.y % GPOINT_PRECISE_MAX) * GPOINT_PRECISE_FACTOR) //! Convenience macro to convert from GPointPrecise to GPoint. -#define GPointFromGPointPrecise(pointP) \ - GPoint(pointP.x.raw_value >> GPOINT_PRECISE_PRECISION, \ - pointP.y.raw_value >> GPOINT_PRECISE_PRECISION) +#define GPointFromGPointPrecise(pointP) \ + GPoint(pointP.x.raw_value >> GPOINT_PRECISE_PRECISION, \ + pointP.y.raw_value >> GPOINT_PRECISE_PRECISION) //! Tests whether 2 precise points are equal. //! @param pointP_a Pointer to the first precise point //! @param pointP_b Pointer to the second precise point //! @return `true` if both points are equal, `false` if not. -bool gpointprecise_equal(const GPointPrecise * const pointP_a, - const GPointPrecise * const pointP_b); +bool gpointprecise_equal(const GPointPrecise *const pointP_a, const GPointPrecise *const pointP_b); -GPointPrecise gpointprecise_midpoint(const GPointPrecise a, - const GPointPrecise b); +GPointPrecise gpointprecise_midpoint(const GPointPrecise a, const GPointPrecise b); -GPointPrecise gpointprecise_add(const GPointPrecise a, - const GPointPrecise b); -GPointPrecise gpointprecise_sub(const GPointPrecise a, - const GPointPrecise b); +GPointPrecise gpointprecise_add(const GPointPrecise a, const GPointPrecise b); +GPointPrecise gpointprecise_sub(const GPointPrecise a, const GPointPrecise b); //! Represents a vector in a 2-dimensional coordinate system. typedef struct GVector { @@ -382,8 +376,8 @@ typedef struct GVector { #define GVector(dx, dy) ((GVector){(dx), (dy)}) -#define GVECTOR_PRECISE_MAX GPOINT_PRECISE_MAX -#define GVECTOR_PRECISE_PRECISION GPOINT_PRECISE_PRECISION +#define GVECTOR_PRECISE_MAX GPOINT_PRECISE_MAX +#define GVECTOR_PRECISE_PRECISION GPOINT_PRECISE_PRECISION //! Represents a transformed vector in a 2-dimensional coordinate system. typedef struct GVectorPrecise { @@ -397,21 +391,21 @@ typedef struct GVectorPrecise { #define GVectorPrecise(dx, dy) ((GVectorPrecise){{(dx)}, {(dy)}}) //! Convenience macro to convert from GVector to GVectorPrecise. -#define GVectorPreciseFromGVector(vector) \ - GVectorPrecise((vector.dx % GVECTOR_PRECISE_MAX) << GVECTOR_PRECISE_PRECISION, \ - (vector.dy % GVECTOR_PRECISE_MAX) << GVECTOR_PRECISE_PRECISION) +#define GVectorPreciseFromGVector(vector) \ + GVectorPrecise((vector.dx % GVECTOR_PRECISE_MAX) << GVECTOR_PRECISE_PRECISION, \ + (vector.dy % GVECTOR_PRECISE_MAX) << GVECTOR_PRECISE_PRECISION) //! Convenience macro to convert from GVectorPrecise to GVector. -#define GVectorFromGVectorPrecise(vectorP) \ - GVector(vectorP.dx.raw_value >> GVECTOR_PRECISE_PRECISION, \ - vectorP.dy.raw_value >> GVECTOR_PRECISE_PRECISION) +#define GVectorFromGVectorPrecise(vectorP) \ + GVector(vectorP.dx.raw_value >> GVECTOR_PRECISE_PRECISION, \ + vectorP.dy.raw_value >> GVECTOR_PRECISE_PRECISION) //! Tests whether 2 precise vectors are equal. //! @param vectorP_a Pointer to the first precise vector //! @param vectorP_b Pointer to the second precise vector //! @return `true` if both vectors are equal, `false` if not. -bool gvectorprecise_equal(const GVectorPrecise * const vectorP_a, - const GVectorPrecise * const vectorP_b); +bool gvectorprecise_equal(const GVectorPrecise *const vectorP_a, + const GVectorPrecise *const vectorP_b); typedef struct GSizePrecise { Fixed_S16_3 w; @@ -424,11 +418,11 @@ typedef struct GRectPrecise { } GRectPrecise; static inline Fixed_S16_3 grect_precise_get_max_x(const GRectPrecise *rect) { - return (Fixed_S16_3) {.raw_value = rect->origin.x.raw_value + rect->size.w.raw_value}; + return (Fixed_S16_3){.raw_value = rect->origin.x.raw_value + rect->size.w.raw_value}; } static inline Fixed_S16_3 grect_precise_get_max_y(const GRectPrecise *rect) { - return (Fixed_S16_3) {.raw_value = rect->origin.y.raw_value + rect->size.h.raw_value}; + return (Fixed_S16_3){.raw_value = rect->origin.y.raw_value + rect->size.h.raw_value}; } void grect_precise_standardize(GRectPrecise *rect); @@ -511,37 +505,36 @@ typedef GRect GRectReturn; //! Convenience macro to make a GRect of ((0, 0), (0, 0)). #define GRectZero GRect(0, 0, 0, 0) -#define GRECT_PRINTF_FORMAT "{ %"PRId16", %"PRId16" } { %"PRId16", %"PRId16" }" +#define GRECT_PRINTF_FORMAT "{ %" PRId16 ", %" PRId16 " } { %" PRId16 ", %" PRId16 " }" #define GRECT_PRINTF_FORMAT_EXPLODE(r) (r).origin.x, (r).origin.y, (r).size.w, (r).size.h #define DISP_FRAME (GRect(0, 0, DISP_COLS, DISP_ROWS)) //! @internal static inline GRect grect_scalar_lshift(const GRect rect, int8_t s) { - return (GRect) { - .origin.x = rect.origin.x << s, - .origin.y = rect.origin.y << s, - .size.w = rect.size.w << s, - .size.h = rect.size.h << s, + return (GRect){ + .origin.x = rect.origin.x << s, + .origin.y = rect.origin.y << s, + .size.w = rect.size.w << s, + .size.h = rect.size.h << s, }; } //! @internal static inline GRect grect_scalar_rshift(const GRect rect, int8_t s) { - return (GRect) { - .origin.x = rect.origin.x >> s, - .origin.y = rect.origin.y >> s, - .size.w = rect.size.w >> s, - .size.h = rect.size.h >> s, + return (GRect){ + .origin.x = rect.origin.x >> s, + .origin.y = rect.origin.y >> s, + .size.w = rect.size.w >> s, + .size.h = rect.size.h >> s, }; } //! @internal //! Resizes a GPoint from one GSize to another static inline GPoint gpoint_scale_by_gsize(GPoint point, GSize from, GSize to) { - return GPoint( - (from.w != 0) ? (((int32_t) point.x * to.w) / from.w) : 0, - (from.h != 0) ? (((int32_t) point.y * to.h) / from.h) : 0); + return GPoint((from.w != 0) ? (((int32_t)point.x * to.w) / from.w) : 0, + (from.h != 0) ? (((int32_t)point.y * to.h) / from.h) : 0); } //! @internal @@ -554,14 +547,14 @@ static inline GRect grect_scalar_expand(GRect box, int16_t x) { //! @param rect_a Pointer to the first rectangle //! @param rect_b Pointer to the second rectangle //! @return `true` if both rectangles are equal, `false` if not. -bool grect_equal(const GRect* const rect_a, const GRect* const rect_b); +bool grect_equal(const GRect *const rect_a, const GRect *const rect_b); //! Tests whether the size of the rectangle is (0, 0). //! @param rect Pointer to the rectangle //! @return `true` if the rectangle its size is (0, 0), or `false` if not. //! @note If the width and/or height of a rectangle is negative, this //! function will return `true`! -bool grect_is_empty(const GRect* const rect); +bool grect_is_empty(const GRect *const rect); //! Converts a rectangle's values so that the components of its size //! (width and/or height) are both positive. In the width and/or height are negative, @@ -575,7 +568,7 @@ void grect_standardize(GRect *rect); //! @param[in,out] rect_to_clip The rectangle that needs to be clipped (in place). //! @param rect_clipper The rectangle of which the edges will serve as "scissors" //! in order to trim `rect_to_clip`. -void grect_clip(GRect * const rect_to_clip, const GRect * const rect_clipper); +void grect_clip(GRect *const rect_to_clip, const GRect *const rect_clipper); //! Calculate the smallest rectangle that contains both r1 and r2. GRect grect_union(const GRect *r1, const GRect *r2); @@ -594,7 +587,8 @@ GPoint grect_center_point(const GRect *rect); //! Reduce the width and height of a rectangle by insetting each of the edges with //! a fixed inset. The returned rectangle will be centered relative to the input rectangle. -//! @note The function will trip an assertion if the crop yields a rectangle with negative width or height. +//! @note The function will trip an assertion if the crop yields a rectangle with negative width or +//! height. //! @param rect The rectangle that will be inset //! @param crop_size_px The inset by which each of the rectangle will be inset. //! A positive inset value results in a smaller rectangle, while negative inset value results @@ -623,20 +617,16 @@ typedef struct { } GEdgeInsets; //! helper for \ref GEdgeInsets macro -#define GEdgeInsets4(t, r, b, l) \ - ((GEdgeInsets){.top = t, .right = r, .bottom = b, .left = l}) +#define GEdgeInsets4(t, r, b, l) ((GEdgeInsets){.top = t, .right = r, .bottom = b, .left = l}) //! helper for \ref GEdgeInsets macro -#define GEdgeInsets3(t, rl, b) \ - ((GEdgeInsets){.top = t, .right = rl, .bottom = b, .left = rl}) +#define GEdgeInsets3(t, rl, b) ((GEdgeInsets){.top = t, .right = rl, .bottom = b, .left = rl}) //! helper for \ref GEdgeInsets macro -#define GEdgeInsets2(tb, rl) \ - ((GEdgeInsets){.top = tb, .right = rl, .bottom = tb, .left = rl}) +#define GEdgeInsets2(tb, rl) ((GEdgeInsets){.top = tb, .right = rl, .bottom = tb, .left = rl}) //! helper for \ref GEdgeInsets macro -#define GEdgeInsets1(trbl) \ - ((GEdgeInsets){.top = trbl, .right = trbl, .bottom = trbl, .left = trbl}) +#define GEdgeInsets1(trbl) ((GEdgeInsets){.top = trbl, .right = trbl, .bottom = trbl, .left = trbl}) //! helper for \ref GEdgeInsets macro #define GEdgeInsetsN(_1, _2, _3, _4, NAME, ...) NAME @@ -713,7 +703,7 @@ typedef struct GBoxModel { //! The format of a GBitmap can either be 1-bit or 8-bit. typedef enum GBitmapFormat { - GBitmapFormat1Bit = 0, //addr) if the bitmap was created with \ref gbitmap_create_blank() -//! or \ref gbitmap_create_with_resource(). +//! This function will also free the memory of the bitmap data (bitmap->addr) if the bitmap was +//! created with \ref gbitmap_create_blank() or \ref gbitmap_create_with_resource(). //! //! If the GBitmap was created with \ref gbitmap_create_with_data(), you must release the memory //! after calling gbitmap_destroy(). -void gbitmap_destroy(GBitmap* bitmap); +void gbitmap_destroy(GBitmap *bitmap); //! Values to specify how two things should be aligned relative to each other. //! ![](galign.png) @@ -1267,15 +1257,14 @@ typedef void (*GDrawRawAssignHorizontalLineFunc)(GContext *ctx, int16_t y, Fixed typedef void (*GDrawRawAssignVerticalLineFunc)(GContext *ctx, int16_t x, Fixed_S16_3 y1, Fixed_S16_3 y2, GColor color); -typedef void (*GDrawRawBlendHorizontalLineFunc)(GContext *ctx, int16_t y, int16_t x1, - int16_t x2, GColor color); +typedef void (*GDrawRawBlendHorizontalLineFunc)(GContext *ctx, int16_t y, int16_t x1, int16_t x2, + GColor color); -typedef void (*GDrawRawBlendVerticalLineFunc)(GContext *ctx, int16_t x, int16_t y1, - int16_t y2, GColor color); +typedef void (*GDrawRawBlendVerticalLineFunc)(GContext *ctx, int16_t x, int16_t y1, int16_t y2, + GColor color); -typedef void (*GDrawRawAssignHorizontalLineDeltaFunc)(GContext *ctx, int16_t y, - Fixed_S16_3 x1, Fixed_S16_3 x2, - uint8_t left_aa_offset, +typedef void (*GDrawRawAssignHorizontalLineDeltaFunc)(GContext *ctx, int16_t y, Fixed_S16_3 x1, + Fixed_S16_3 x2, uint8_t left_aa_offset, uint8_t right_aa_offset, int16_t clip_box_min_x, int16_t clip_box_max_x, GColor color); @@ -1296,7 +1285,8 @@ typedef struct GDrawMask GDrawMask; typedef struct PACKED { //! The box relative to bitmap's bounds, that graphics functions MUST use to clip what they draw GRect clip_box; - //! The box relative to bitmap's bounds, that graphics functions MUST use as their coordinate space + //! The box relative to bitmap's bounds, that graphics functions MUST use as their coordinate + //! space GRect drawing_box; //! Line drawing functions MUST use this as line color GColor stroke_color; @@ -1309,14 +1299,14 @@ typedef struct PACKED { //! on Basalt with the compositing mode as GCompOpOr. GColor tint_color; //! Bitmap compositing functions MUST use this as the compositing mode - GCompOp compositing_mode:3; + GCompOp compositing_mode : 3; #if PBL_COLOR //! Antialiasing stroke enabled or not; default value is false - bool antialiased:1; + bool antialiased : 1; #endif //! When true, text rendering routines will try to avoid orphans //! This will be enabled for every non-external app in graphics_context_init() - bool avoid_text_orphans:1; + bool avoid_text_orphans : 1; //! Stroke width applied to drawing routines; default value is 1; accepted range 1..255 uint8_t stroke_width; //! Struct of raw drawing function pointers; default value is g_default_draw_implementation @@ -1336,7 +1326,7 @@ typedef Fixed_S32_16 GTransformNumber; //! However, internally we do not need to store the last row since we only support two //! dimensions (x,y). Thus the last row is omitted from the internal storage. //! Data values are in 16.16 fixed point representation -typedef struct __attribute__ ((__packed__)) GTransform { +typedef struct __attribute__((__packed__)) GTransform { GTransformNumber a; GTransformNumber b; GTransformNumber c; @@ -1396,4 +1386,4 @@ typedef struct GRangeVertical { } GRangeVertical; //! @internal -void grange_clip(GRange *range_to_clip, const GRange * const range_clipper); +void grange_clip(GRange *range_to_clip, const GRange *const range_clipper); diff --git a/src/fw/applib/graphics/perimeter.c b/src/fw/applib/graphics/perimeter.c index 53eb1c02c5..20da8e2c63 100644 --- a/src/fw/applib/graphics/perimeter.c +++ b/src/fw/applib/graphics/perimeter.c @@ -13,7 +13,7 @@ static uint16_t prv_triangle_side(uint16_t hypotenuse, uint16_t side) { } T_STATIC GRangeHorizontal perimeter_for_circle(GRangeVertical vertical_range, GPoint center, - int32_t radius) { + int32_t radius) { radius = MAX(0, radius); int32_t height = 0; int32_t width = 0; @@ -25,8 +25,7 @@ T_STATIC GRangeHorizontal perimeter_for_circle(GRangeVertical vertical_range, GP int32_t range_end = vertical_range.origin_y + vertical_range.size_h; // Check if both top and bottom are outside but not surrounding the perimeter - if ((range_start < top && range_end < top) || - (range_start > bottom && range_end > bottom)) { + if ((range_start < top && range_end < top) || (range_start > bottom && range_end > bottom)) { return (GRangeHorizontal){0, 0}; } @@ -50,7 +49,7 @@ T_STATIC GRangeHorizontal perimeter_for_display_round(const GPerimeter *perimete const GSize *ctx_size, GRangeVertical vertical_range, uint16_t inset) { - const GRect frame = (GRect) { GPointZero, *ctx_size }; + const GRect frame = (GRect){GPointZero, *ctx_size}; const GPoint center = grect_center_point(&frame); const int32_t radius = grect_shortest_side(frame) / 2 - inset; return perimeter_for_circle(vertical_range, center, radius); @@ -66,6 +65,6 @@ T_STATIC GRangeHorizontal perimeter_for_display_rect(const GPerimeter *perimeter } #endif -const GPerimeter * const g_perimeter_for_display = &(const GPerimeter) { - .callback = PBL_IF_RECT_ELSE(perimeter_for_display_rect, perimeter_for_display_round), +const GPerimeter *const g_perimeter_for_display = &(const GPerimeter){ + .callback = PBL_IF_RECT_ELSE(perimeter_for_display_rect, perimeter_for_display_round), }; diff --git a/src/fw/applib/graphics/perimeter.h b/src/fw/applib/graphics/perimeter.h index 125f35adff..94608adc80 100644 --- a/src/fw/applib/graphics/perimeter.h +++ b/src/fw/applib/graphics/perimeter.h @@ -17,4 +17,4 @@ typedef struct GPerimeter { } GPerimeter; //! @internal -extern const GPerimeter * const g_perimeter_for_display; +extern const GPerimeter *const g_perimeter_for_display; diff --git a/src/fw/applib/graphics/rtl_support.c b/src/fw/applib/graphics/rtl_support.c index 87c3f96e42..c33d5356e0 100644 --- a/src/fw/applib/graphics/rtl_support.c +++ b/src/fw/applib/graphics/rtl_support.c @@ -64,8 +64,7 @@ bool utf8_contains_arabic(const utf8_t *start, const utf8_t *end) { // these keep their left-to-right order; reversing them with the run would turn // a number such as 2026 into 6202. static bool prv_codepoint_is_digit(Codepoint cp) { - return (cp >= 0x30 && cp <= 0x39) || - (cp >= 0x0660 && cp <= 0x0669) || + return (cp >= 0x30 && cp <= 0x39) || (cp >= 0x0660 && cp <= 0x0669) || (cp >= 0x06F0 && cp <= 0x06F9); } @@ -92,8 +91,7 @@ utf8_t *rtl_segment_content_end(utf8_t *start, utf8_t *end) { return content_end; } -size_t utf8_reverse_for_rtl(const utf8_t *src, size_t src_len, - utf8_t *dest, size_t dest_size) { +size_t utf8_reverse_for_rtl(const utf8_t *src, size_t src_len, utf8_t *dest, size_t dest_size) { if (src == NULL || dest == NULL || src_len == 0 || dest_size == 0) { return 0; } diff --git a/src/fw/applib/graphics/rtl_support.h b/src/fw/applib/graphics/rtl_support.h index 91e83e234a..646c6a1ff3 100644 --- a/src/fw/applib/graphics/rtl_support.h +++ b/src/fw/applib/graphics/rtl_support.h @@ -30,8 +30,7 @@ bool utf8_contains_arabic(const utf8_t *start, const utf8_t *end); //! @param dest Destination buffer for reversed string //! @param dest_size Size of destination buffer in bytes //! @return Number of bytes written to dest (excluding null terminator), or 0 on failure -size_t utf8_reverse_for_rtl(const utf8_t *src, size_t src_len, - utf8_t *dest, size_t dest_size); +size_t utf8_reverse_for_rtl(const utf8_t *src, size_t src_len, utf8_t *dest, size_t dest_size); //! Find the end of a bidi segment's content, i.e. the position just past its //! last non-space codepoint (the start of any trailing spaces), or `start` if diff --git a/src/fw/applib/graphics/text.h b/src/fw/applib/graphics/text.h index 3ad3bd09f6..204f4e34ea 100644 --- a/src/fw/applib/graphics/text.h +++ b/src/fw/applib/graphics/text.h @@ -67,7 +67,7 @@ typedef struct { GTextOverflowMode overflow_mode; GTextAlignment alignment; //! Cached parameters - GSize max_used_size; // #include -static bool prv_char_iter_next_start_of_word(Iterator* char_iter); +static bool prv_char_iter_next_start_of_word(Iterator *char_iter); //! Check if a codepoint is invisible: formatting indicator or should-skip (no direction, no width). static bool prv_codepoint_is_invisible(Codepoint cp) { @@ -78,9 +78,8 @@ static bool prv_utf8_starts_with_rtl(const utf8_t *start, const utf8_t *end) { break; } // Skip whitespace, newlines, punctuation, and invisible codepoints - if (cp == SPACE_CODEPOINT || cp == NEWLINE_CODEPOINT || - codepoint_is_zero_width(cp) || prv_codepoint_is_punctuation(cp) || - prv_codepoint_is_invisible(cp)) { + if (cp == SPACE_CODEPOINT || cp == NEWLINE_CODEPOINT || codepoint_is_zero_width(cp) || + prv_codepoint_is_punctuation(cp) || prv_codepoint_is_invisible(cp)) { ptr = next; continue; } @@ -140,8 +139,7 @@ static int8_t prv_unicode_space_advance(FontCache *font_cache, const GFont font, } // [CTX] processing individual codepoints doesn't work for contextual writing systems. -static int8_t prv_codepoint_get_horizontal_advance(FontCache* const font_cache, - const GFont font, +static int8_t prv_codepoint_get_horizontal_advance(FontCache *const font_cache, const GFont font, const Codepoint codepoint) { PBL_ASSERTN(font_cache); int8_t horiz_advance = 0; @@ -160,15 +158,17 @@ static int8_t prv_codepoint_get_horizontal_advance(FontCache* const font_cache, // Init functions //! @note can be init to a null-termination character -void char_iter_init(Iterator* char_iter, CharIterState* char_iter_state, const TextBoxParams* const text_box_params, utf8_t* start) { - Iterator* utf8_iter = &char_iter_state->utf8_iter; - Utf8IterState* utf8_iter_state = (Utf8IterState*) &char_iter_state->utf8_iter_state; +void char_iter_init(Iterator *char_iter, CharIterState *char_iter_state, + const TextBoxParams *const text_box_params, utf8_t *start) { + Iterator *utf8_iter = &char_iter_state->utf8_iter; + Utf8IterState *utf8_iter_state = (Utf8IterState *)&char_iter_state->utf8_iter_state; utf8_iter_init(utf8_iter, utf8_iter_state, text_box_params->utf8_bounds, start); char_iter_state->text_box_params = text_box_params; - iter_init(char_iter, (IteratorCallback) char_iter_next, char_iter_prev, (IteratorState) char_iter_state); + iter_init(char_iter, (IteratorCallback)char_iter_next, char_iter_prev, + (IteratorState)char_iter_state); } typedef enum { @@ -242,7 +242,8 @@ static Codepoint prv_shape_pair(Codepoint prev_cp, Codepoint curr_cp, Codepoint return arabic_shape_pair(prev_cp, curr_cp, next_cp, consumed_next); } -bool word_init(GContext* ctx, Word* word, const TextBoxParams* const text_box_params, utf8_t* start) { +bool word_init(GContext *ctx, Word *word, const TextBoxParams *const text_box_params, + utf8_t *start) { word->width_px = 0; if (*start == NULL_CODEPOINT) { @@ -255,7 +256,7 @@ bool word_init(GContext* ctx, Word* word, const TextBoxParams* const text_box_pa Iterator char_iter; CharIterState char_iter_state; char_iter_init(&char_iter, &char_iter_state, text_box_params, start); - Utf8IterState* utf8_iter_state = (Utf8IterState*) &char_iter_state.utf8_iter_state; + Utf8IterState *utf8_iter_state = (Utf8IterState *)&char_iter_state.utf8_iter_state; bool success = prv_char_iter_next_start_of_word(&char_iter); if (!success) { @@ -295,15 +296,15 @@ bool word_init(GContext* ctx, Word* word, const TextBoxParams* const text_box_pa skip_ligature_member = false; } else if (arabic_is_transparent(curr_cp)) { // A mark keeps its own width but is not reshaped. - word->width_px += prv_codepoint_get_horizontal_advance(&ctx->font_cache, - text_box_params->font, curr_cp); + word->width_px += + prv_codepoint_get_horizontal_advance(&ctx->font_cache, text_box_params->font, curr_cp); } else { Codepoint shape_next = arabic_is_transparent(next_cp) ? prv_peek_next_letter(curr_pos, bounds_end) : next_cp; bool consumed_next = false; Codepoint width_cp = prv_shape_pair(prev_cp, curr_cp, shape_next, &consumed_next); - word->width_px += prv_codepoint_get_horizontal_advance(&ctx->font_cache, - text_box_params->font, width_cp); + word->width_px += + prv_codepoint_get_horizontal_advance(&ctx->font_cache, text_box_params->font, width_cp); skip_ligature_member = consumed_next; } } @@ -320,29 +321,23 @@ bool word_init(GContext* ctx, Word* word, const TextBoxParams* const text_box_pa return true; } -void word_iter_init(Iterator* word_iter, WordIterState* word_iter_state, GContext* ctx, - const TextBoxParams* const text_box_params, utf8_t* start) { - *word_iter_state = (WordIterState) { - .ctx = ctx, - .text_box_params = text_box_params - }; +void word_iter_init(Iterator *word_iter, WordIterState *word_iter_state, GContext *ctx, + const TextBoxParams *const text_box_params, utf8_t *start) { + *word_iter_state = (WordIterState){.ctx = ctx, .text_box_params = text_box_params}; word_init(ctx, &word_iter_state->current, text_box_params, start); - iter_init(word_iter, (IteratorCallback) word_iter_next, NULL, (IteratorState) word_iter_state); + iter_init(word_iter, (IteratorCallback)word_iter_next, NULL, (IteratorState)word_iter_state); } -void line_iter_init(Iterator* line_iter, LineIterState* line_iter_state, GContext* ctx) { - *line_iter_state = (LineIterState) { - .ctx = ctx, - .current = &ctx->text_draw_state.line - }; +void line_iter_init(Iterator *line_iter, LineIterState *line_iter_state, GContext *ctx) { + *line_iter_state = (LineIterState){.ctx = ctx, .current = &ctx->text_draw_state.line}; - WordIterState* word_iter_state = &line_iter_state->word_iter_state; - word_iter_init(&line_iter_state->word_iter, word_iter_state, ctx, - &ctx->text_draw_state.text_box, ctx->text_draw_state.text_box.utf8_bounds->start); + WordIterState *word_iter_state = &line_iter_state->word_iter_state; + word_iter_init(&line_iter_state->word_iter, word_iter_state, ctx, &ctx->text_draw_state.text_box, + ctx->text_draw_state.text_box.utf8_bounds->start); - iter_init(line_iter, (IteratorCallback) line_iter_next, NULL, (IteratorState) line_iter_state); + iter_init(line_iter, (IteratorCallback)line_iter_next, NULL, (IteratorState)line_iter_state); } //////////////////////////////////////////////////////////// @@ -357,7 +352,7 @@ static int16_t prv_layout_get_line_spacing_delta(GTextLayoutCacheRef layout) { return 0; } - return (layout ? ((TextLayoutExtended *)layout)->line_spacing_delta: 0); + return (layout ? ((TextLayoutExtended *)layout)->line_spacing_delta : 0); } //////////////////////////////////////////////////////////// @@ -366,9 +361,9 @@ static int16_t prv_layout_get_line_spacing_delta(GTextLayoutCacheRef layout) { //! Advance the char iterator to the start of the next word. Used by word_init //! to find the start of the next word. //! @return is_success -static bool prv_char_iter_next_start_of_word(Iterator* char_iter) { - CharIterState* char_iter_state = (CharIterState*) char_iter->state; - Utf8IterState* utf8_iter_state = (Utf8IterState*) &char_iter_state->utf8_iter_state; +static bool prv_char_iter_next_start_of_word(Iterator *char_iter) { + CharIterState *char_iter_state = (CharIterState *)char_iter->state; + Utf8IterState *utf8_iter_state = (Utf8IterState *)&char_iter_state->utf8_iter_state; // the first codepoint could be invalid, iter_next takes care of the others Codepoint codepoint = utf8_iter_state->codepoint; @@ -392,8 +387,8 @@ static bool prv_char_iter_next_start_of_word(Iterator* char_iter) { return true; } -static bool prv_line_iter_is_vertical_overflow(const LineIterState* const line_iter_state, - const TextBoxParams* const text_box_params) { +static bool prv_line_iter_is_vertical_overflow(const LineIterState *const line_iter_state, + const TextBoxParams *const text_box_params) { int16_t next_line_y_extent; // Normally, we lay out the text one line below the regular cutoff so that it may be rendered, // albeit clipped. But, if we're rendering in truncation mode (e.g. GTextOverflowModeFill or @@ -423,8 +418,8 @@ static bool prv_line_iter_is_vertical_overflow(const LineIterState* const line_i //! @return is_advanced bool line_iter_next(IteratorState state) { - LineIterState* line_iter_state = (LineIterState*) state; - const TextBoxParams* const text_box_params = &line_iter_state->ctx->text_draw_state.text_box; + LineIterState *line_iter_state = (LineIterState *)state; + const TextBoxParams *const text_box_params = &line_iter_state->ctx->text_draw_state.text_box; if (prv_line_iter_is_vertical_overflow(line_iter_state, text_box_params)) { return false; @@ -442,11 +437,11 @@ bool line_iter_next(IteratorState state) { //! @return is_advanced bool word_iter_next(IteratorState state) { - WordIterState* word_iter_state = (WordIterState*) state; + WordIterState *word_iter_state = (WordIterState *)state; - Word* current_word = &word_iter_state->current; - const TextBoxParams* const text_box_params = word_iter_state->text_box_params; - GContext* ctx = word_iter_state->ctx; + Word *current_word = &word_iter_state->current; + const TextBoxParams *const text_box_params = word_iter_state->text_box_params; + GContext *ctx = word_iter_state->ctx; if (*current_word->end == NULL_CODEPOINT) { return false; @@ -457,11 +452,11 @@ bool word_iter_next(IteratorState state) { //! @return is_advanced bool char_iter_next(IteratorState state) { - CharIterState* char_iter_state = (CharIterState*) state; + CharIterState *char_iter_state = (CharIterState *)state; Codepoint codepoint; - Iterator* utf8_iter = &char_iter_state->utf8_iter; - Utf8IterState* utf8_iter_state = &char_iter_state->utf8_iter_state; + Iterator *utf8_iter = &char_iter_state->utf8_iter; + Utf8IterState *utf8_iter_state = &char_iter_state->utf8_iter_state; while (true) { if (utf8_iter_state->current >= utf8_iter_state->bounds->end) { @@ -491,11 +486,11 @@ bool char_iter_next(IteratorState state) { } bool char_iter_prev(IteratorState state) { - CharIterState* char_iter_state = (CharIterState*) state; + CharIterState *char_iter_state = (CharIterState *)state; Codepoint codepoint; - Iterator* utf8_iter = &char_iter_state->utf8_iter; - Utf8IterState* utf8_iter_state = &char_iter_state->utf8_iter_state; + Iterator *utf8_iter = &char_iter_state->utf8_iter; + Utf8IterState *utf8_iter_state = &char_iter_state->utf8_iter_state; while (true) { if (utf8_iter_state->current <= utf8_iter_state->bounds->start) { @@ -530,13 +525,13 @@ bool char_iter_prev(IteratorState state) { //! Trim given codepoint from the start of the word //! Used to remove whitespace and newlines //! @return is_trimmed -bool word_trim_preceding_codepoint(GContext* ctx, Word* word, const Codepoint codepoint, - const TextBoxParams* const text_box_params) { +bool word_trim_preceding_codepoint(GContext *ctx, Word *word, const Codepoint codepoint, + const TextBoxParams *const text_box_params) { Iterator char_iter; CharIterState char_iter_state; char_iter_init(&char_iter, &char_iter_state, text_box_params, word->start); - Utf8IterState* utf8_iter_state = &char_iter_state.utf8_iter_state; + Utf8IterState *utf8_iter_state = &char_iter_state.utf8_iter_state; if (utf8_iter_state->codepoint != codepoint) { return false; @@ -552,8 +547,9 @@ bool word_trim_preceding_codepoint(GContext* ctx, Word* word, const Codepoint co if (word->end == char_iter_state.utf8_iter_state.current) { // Word has been completely trimmed; init a new word - bool is_end_of_text = (*word->end == NULL_CODEPOINT || - char_iter_state.utf8_iter_state.current >= text_box_params->utf8_bounds->end); + bool is_end_of_text = + (*word->end == NULL_CODEPOINT || + char_iter_state.utf8_iter_state.current >= text_box_params->utf8_bounds->end); if (!is_end_of_text) { word_init(ctx, word, text_box_params, word->end); @@ -562,9 +558,9 @@ bool word_trim_preceding_codepoint(GContext* ctx, Word* word, const Codepoint co } // Trim - int advance = prv_codepoint_get_horizontal_advance(&ctx->font_cache, - text_box_params->font, codepoint); - PBL_ASSERTN(advance <= word->width_px); // Negative-length word not allowed + int advance = + prv_codepoint_get_horizontal_advance(&ctx->font_cache, text_box_params->font, codepoint); + PBL_ASSERTN(advance <= word->width_px); // Negative-length word not allowed word->width_px -= advance; word->start = utf8_iter_state->current; @@ -572,18 +568,20 @@ bool word_trim_preceding_codepoint(GContext* ctx, Word* word, const Codepoint co } // [INTL] whitespace is more than just the space character. -void word_trim_preceding_whitespace(GContext* ctx, Word* word, const TextBoxParams* const text_box_params) { - while (word_trim_preceding_codepoint(ctx, word, SPACE_CODEPOINT, text_box_params)); +void word_trim_preceding_whitespace(GContext *ctx, Word *word, + const TextBoxParams *const text_box_params) { + while (word_trim_preceding_codepoint(ctx, word, SPACE_CODEPOINT, text_box_params)) + ; } //////////////////////////////////////////////////////////// // Walk Line -typedef void (*CharVisitorCallback)(GContext* ctx, const TextBoxParams* const text_box_params, - Line* line, GRect cursor, const Codepoint codepoint); +typedef void (*CharVisitorCallback)(GContext *ctx, const TextBoxParams *const text_box_params, + Line *line, GRect cursor, const Codepoint codepoint); -void render_chars_char_visitor_cb(GContext* ctx, const TextBoxParams* const text_box_params, - Line* line, GRect cursor, const Codepoint codepoint) { +void render_chars_char_visitor_cb(GContext *ctx, const TextBoxParams *const text_box_params, + Line *line, GRect cursor, const Codepoint codepoint) { if (codepoint_is_zero_width(codepoint) || codepoint_is_unicode_space(codepoint)) { return; } @@ -591,12 +589,12 @@ void render_chars_char_visitor_cb(GContext* ctx, const TextBoxParams* const text render_glyph(ctx, codepoint, text_box_params->font, cursor); } -void update_dimensions_char_visitor_cb(GContext* ctx, const TextBoxParams* const text_box_params, - Line* line, GRect cursor, const Codepoint codepoint) { - (void) ctx; - (void) codepoint; +void update_dimensions_char_visitor_cb(GContext *ctx, const TextBoxParams *const text_box_params, + Line *line, GRect cursor, const Codepoint codepoint) { + (void)ctx; + (void)codepoint; PBL_ASSERT(cursor.origin.x >= line->origin.x, "Text cursor x=<%u> ahead of line origin x=<%u>", - cursor.origin.x, line->origin.x); + cursor.origin.x, line->origin.x); // Use the advance the caller already computed (the cursor width). walk_line // makes it pair-aware -- a folded pair is one glyph -- so recomputing it per @@ -606,8 +604,8 @@ void update_dimensions_char_visitor_cb(GContext* ctx, const TextBoxParams* const line->width_px = (cursor.origin.x + glyph_width_px) - line->origin.x; PBL_ASSERT(line->width_px <= text_box_params->box.size.w, - "Line <%p>: max extent=<%" PRId16 "> exceeds text_box_params width=<%" PRId16 ">", - line, line->width_px + line->origin.x, text_box_params->box.size.w); + "Line <%p>: max extent=<%" PRId16 "> exceeds text_box_params width=<%" PRId16 ">", + line, line->width_px + line->origin.x, text_box_params->box.size.w); } // Peek the next letter after the one at `pos`, skipping transparent Arabic marks @@ -652,7 +650,7 @@ static int prv_shaped_glyph_advance(GContext *ctx, const TextBoxParams *text_box //! Traverse until end of line->width_px if rendering chars, else text_box_params width //! if updating line dimensions //! @return utf8_t* pointer to last visited character -utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box_params, +utf8_t *walk_line(GContext *ctx, Line *line, const TextBoxParams *const text_box_params, CharVisitorCallback char_visitor_cb) { PBL_ASSERTN(char_visitor_cb); @@ -671,14 +669,14 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box } PBL_ASSERT(line->width_px <= text_box_params->box.size.w, - "Line <%p>: max extent=<%" PRId16 "> exceeds text_box_params width=<%" PRId16 ">", line, - line->width_px + line->origin.x, text_box_params->box.size.w); + "Line <%p>: max extent=<%" PRId16 "> exceeds text_box_params width=<%" PRId16 ">", + line, line->width_px + line->origin.x, text_box_params->box.size.w); int suffix_width_px = 0; if (line->suffix_codepoint) { - suffix_width_px = prv_codepoint_get_horizontal_advance(&ctx->font_cache, - text_box_params->font, line->suffix_codepoint); + suffix_width_px = prv_codepoint_get_horizontal_advance(&ctx->font_cache, text_box_params->font, + line->suffix_codepoint); } if (available_horiz_px < suffix_width_px) { @@ -695,10 +693,9 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box text_box_params->utf8_bounds->end != NULL && text_box_params->utf8_bounds->end > line->start && utf8_contains_rtl(line->start, text_box_params->utf8_bounds->end)) { - - // Segment descriptor for BiDi reordering - // Headroom for splitting boundary spaces into their own neutral segments. - #define MAX_BIDI_SEGMENTS 16 +// Segment descriptor for BiDi reordering +// Headroom for splitting boundary spaces into their own neutral segments. +#define MAX_BIDI_SEGMENTS 16 typedef struct { utf8_t *start; utf8_t *end; @@ -716,11 +713,11 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box while (ptr < line_end && *ptr != '\0' && *ptr != '\n' && total_width_px + suffix_width_px <= available_horiz_px && num_segments < MAX_BIDI_SEGMENTS) { - utf8_t *segment_start = ptr; utf8_t *next = NULL; Codepoint first_cp = utf8_peek_codepoint(ptr, &next); - if (first_cp == 0 || next == NULL) break; + if (first_cp == 0 || next == NULL) + break; // Skip leading punctuation/spaces to determine segment type bool segment_is_rtl = false; @@ -728,9 +725,10 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box while (check_ptr < line_end && *check_ptr != '\0' && *check_ptr != '\n') { utf8_t *check_next = NULL; Codepoint check_cp = utf8_peek_codepoint(check_ptr, &check_next); - if (check_cp == 0 || check_next == NULL) break; - if (!prv_codepoint_is_punctuation(check_cp) && - check_cp != SPACE_CODEPOINT && !codepoint_is_zero_width(check_cp)) { + if (check_cp == 0 || check_next == NULL) + break; + if (!prv_codepoint_is_punctuation(check_cp) && check_cp != SPACE_CODEPOINT && + !codepoint_is_zero_width(check_cp)) { segment_is_rtl = codepoint_is_rtl(check_cp); break; } @@ -753,7 +751,8 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box while (segment_end < line_end && *segment_end != '\0' && *segment_end != '\n') { utf8_t *seg_next = NULL; Codepoint seg_cp = utf8_peek_codepoint(segment_end, &seg_next); - if (seg_cp == 0 || seg_next == NULL) break; + if (seg_cp == 0 || seg_next == NULL) + break; // Skip invisible codepoints (ZWJ, variation selectors, skin tone modifiers) if (prv_codepoint_is_invisible(seg_cp)) { @@ -762,8 +761,8 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box } // Check if this character changes the segment type - if (!prv_codepoint_is_punctuation(seg_cp) && - seg_cp != SPACE_CODEPOINT && !codepoint_is_zero_width(seg_cp)) { + if (!prv_codepoint_is_punctuation(seg_cp) && seg_cp != SPACE_CODEPOINT && + !codepoint_is_zero_width(seg_cp)) { bool char_is_rtl = codepoint_is_rtl(seg_cp); if (char_is_rtl != segment_is_rtl) { break; // End of segment @@ -788,8 +787,9 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box skip_ligature_member = consumed_next; } int glyph_width = prv_codepoint_get_horizontal_advance(&ctx->font_cache, - text_box_params->font, width_cp); - if (total_width_px + segment_width_px + glyph_width + suffix_width_px > available_horiz_px) { + text_box_params->font, width_cp); + if (total_width_px + segment_width_px + glyph_width + suffix_width_px > + available_horiz_px) { break; } segment_width_px += glyph_width; @@ -801,7 +801,8 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box segment_end = seg_next; } size_t segment_len = segment_end - segment_start; - if (segment_len == 0) break; + if (segment_len == 0) + break; // Peel trailing spaces into their own neutral segment. A space between // two runs is direction-neutral: if it stays inside a run it is reversed @@ -813,16 +814,22 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box if (content_end > segment_start && content_end < segment_end) { // strong-direction content, then the trailing space(s) as a neutral segments[num_segments++] = (BiDiSegment){ - .start = segment_start, .end = content_end, .is_rtl = segment_is_rtl, + .start = segment_start, + .end = content_end, + .is_rtl = segment_is_rtl, }; if (num_segments < MAX_BIDI_SEGMENTS) { segments[num_segments++] = (BiDiSegment){ - .start = content_end, .end = segment_end, .is_rtl = false, + .start = content_end, + .end = segment_end, + .is_rtl = false, }; } } else { segments[num_segments++] = (BiDiSegment){ - .start = segment_start, .end = segment_end, .is_rtl = segment_is_rtl, + .start = segment_start, + .end = segment_end, + .is_rtl = segment_is_rtl, }; } total_width_px += segment_width_px; @@ -865,20 +872,20 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box if (utf8_contains_arabic(seg->start, seg->end)) { utf8_t *shaped_buffer = applib_malloc(rtl_buffer_size); if (shaped_buffer) { - size_t shaped_len = arabic_shape_text(seg->start, render_len, - shaped_buffer, rtl_buffer_size - 1); + size_t shaped_len = + arabic_shape_text(seg->start, render_len, shaped_buffer, rtl_buffer_size - 1); if (shaped_len > 0) { shaped_buffer[shaped_len] = '\0'; - reversed_len = utf8_reverse_for_rtl(shaped_buffer, shaped_len, - rtl_buffer, rtl_buffer_size - 1); + reversed_len = + utf8_reverse_for_rtl(shaped_buffer, shaped_len, rtl_buffer, rtl_buffer_size - 1); } applib_free(shaped_buffer); } } if (reversed_len == 0) { - reversed_len = utf8_reverse_for_rtl(seg->start, render_len, - rtl_buffer, rtl_buffer_size - 1); + reversed_len = + utf8_reverse_for_rtl(seg->start, render_len, rtl_buffer, rtl_buffer_size - 1); } if (reversed_len > 0) { @@ -888,16 +895,20 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box while (*rptr != '\0') { utf8_t *rnext = NULL; Codepoint rcp = utf8_peek_codepoint(rptr, &rnext); - if (rcp == 0 || rnext == NULL) break; - if (prv_codepoint_is_invisible(rcp)) { rptr = rnext; continue; } + if (rcp == 0 || rnext == NULL) + break; + if (prv_codepoint_is_invisible(rcp)) { + rptr = rnext; + continue; + } - int glyph_width = prv_codepoint_get_horizontal_advance(&ctx->font_cache, - text_box_params->font, rcp); + int glyph_width = + prv_codepoint_get_horizontal_advance(&ctx->font_cache, text_box_params->font, rcp); GRect cursor = { - .origin = line->origin, - .size.w = glyph_width, - .size.h = fonts_get_font_height(text_box_params->font) + .origin = line->origin, + .size.w = glyph_width, + .size.h = fonts_get_font_height(text_box_params->font) }; cursor.origin.x += walked_width_px; @@ -919,8 +930,12 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box while (sptr < seg->end) { utf8_t *snext = NULL; Codepoint scp = utf8_peek_codepoint(sptr, &snext); - if (scp == 0 || snext == NULL) break; - if (prv_codepoint_is_invisible(scp)) { sptr = snext; continue; } + if (scp == 0 || snext == NULL) + break; + if (prv_codepoint_is_invisible(scp)) { + sptr = snext; + continue; + } if (skip_pair_member && !arabic_is_transparent(scp)) { // Folded into the preceding pair: already drawn, adds no width. @@ -938,12 +953,12 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box } int glyph_width = prv_codepoint_get_horizontal_advance(&ctx->font_cache, - text_box_params->font, draw_cp); + text_box_params->font, draw_cp); GRect cursor = { - .origin = line->origin, - .size.w = glyph_width, - .size.h = fonts_get_font_height(text_box_params->font) + .origin = line->origin, + .size.w = glyph_width, + .size.h = fonts_get_font_height(text_box_params->font) }; cursor.origin.x += walked_width_px; @@ -971,9 +986,9 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box // Handle suffix if present if (line->suffix_codepoint) { GRect cursor = { - .origin = line->origin, - .size.w = suffix_width_px, - .size.h = fonts_get_font_height(text_box_params->font) + .origin = line->origin, + .size.w = suffix_width_px, + .size.h = fonts_get_font_height(text_box_params->font) }; cursor.origin.x += walked_width_px; text_resources_get_glyph(&ctx->font_cache, line->suffix_codepoint, text_box_params->font, @@ -988,7 +1003,7 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box Iterator char_iter; CharIterState char_iter_state; char_iter_init(&char_iter, &char_iter_state, text_box_params, line->start); - Utf8IterState* utf8_iter_state = (Utf8IterState*) &char_iter_state.utf8_iter_state; + Utf8IterState *utf8_iter_state = (Utf8IterState *)&char_iter_state.utf8_iter_state; bool is_newline_as_space = text_box_params->overflow_mode == GTextOverflowModeFill; Codepoint current_codepoint = utf8_iter_state->codepoint; @@ -1007,19 +1022,20 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box Codepoint prev_shaped_cp = 0; // previous codepoint, for Arabic joining context bool skip_ligature_member = false; // current codepoint was folded into a preceding pair bool consumed_next = false; - bool current_folded = false; // current codepoint was folded into the preceding pair + bool current_folded = false; // current codepoint was folded into the preceding pair Codepoint current_draw_cp = current_codepoint; // shaped codepoint whose advance was measured Codepoint peek_cp = prv_peek_next_letter(utf8_iter_state->current, text_end); - int next_glyph_width_px = prv_shaped_glyph_advance(ctx, text_box_params, prev_shaped_cp, - current_codepoint, peek_cp, &consumed_next, ¤t_draw_cp); + int next_glyph_width_px = + prv_shaped_glyph_advance(ctx, text_box_params, prev_shaped_cp, current_codepoint, peek_cp, + &consumed_next, ¤t_draw_cp); - utf8_t* last_visited_char = NULL; + utf8_t *last_visited_char = NULL; while (walked_width_px + next_glyph_width_px + suffix_width_px <= available_horiz_px) { GRect cursor = { - .origin = line->origin, - .size.w = next_glyph_width_px, - .size.h = fonts_get_font_height(text_box_params->font) + .origin = line->origin, + .size.w = next_glyph_width_px, + .size.h = fonts_get_font_height(text_box_params->font) }; cursor.origin.x += walked_width_px; @@ -1072,12 +1088,13 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box } else if (arabic_is_transparent(current_codepoint)) { // A mark keeps its own width but is not reshaped. current_draw_cp = current_codepoint; - next_glyph_width_px = prv_codepoint_get_horizontal_advance(&ctx->font_cache, - text_box_params->font, current_codepoint); + next_glyph_width_px = prv_codepoint_get_horizontal_advance( + &ctx->font_cache, text_box_params->font, current_codepoint); } else { peek_cp = prv_peek_next_letter(utf8_iter_state->current, text_end); - next_glyph_width_px = prv_shaped_glyph_advance(ctx, text_box_params, prev_shaped_cp, - current_codepoint, peek_cp, &consumed_next, ¤t_draw_cp); + next_glyph_width_px = + prv_shaped_glyph_advance(ctx, text_box_params, prev_shaped_cp, current_codepoint, peek_cp, + &consumed_next, ¤t_draw_cp); } } @@ -1088,9 +1105,8 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box if (current_codepoint == NEWLINE_CODEPOINT) { next_glyph_width_px = 0; } else { - next_glyph_width_px = prv_codepoint_get_horizontal_advance(&ctx->font_cache, - text_box_params->font, - current_codepoint); + next_glyph_width_px = prv_codepoint_get_horizontal_advance( + &ctx->font_cache, text_box_params->font, current_codepoint); } // Safety check @@ -1108,9 +1124,9 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box if (line->suffix_codepoint) { GRect cursor = { - .origin = line->origin, - .size.w = suffix_width_px, - .size.h = fonts_get_font_height(text_box_params->font) + .origin = line->origin, + .size.w = suffix_width_px, + .size.h = fonts_get_font_height(text_box_params->font) }; cursor.origin.x += walked_width_px; if (char_visitor_cb) { @@ -1125,12 +1141,11 @@ utf8_t* walk_line(GContext* ctx, Line* line, const TextBoxParams* const text_box return last_visited_char; } - //////////////////////////////////////////////////////////// // Walk Lines -void set_ellipsis_on_overflow_last_line_cb(GContext* ctx, Line* line, - const TextBoxParams* const text_box_params, +void set_ellipsis_on_overflow_last_line_cb(GContext *ctx, Line *line, + const TextBoxParams *const text_box_params, const bool is_text_remaining) { // Only set a trailing ellipsis if there is text remaining if (!is_text_remaining) { @@ -1152,12 +1167,13 @@ void set_ellipsis_on_overflow_last_line_cb(GContext* ctx, Line* line, walk_line(ctx, line, text_box_params, update_dimensions_char_visitor_cb); } -void render_all_render_line_cb(GContext* ctx, Line* line, const TextBoxParams* const text_box_params) { - walk_line(ctx, line, text_box_params, (CharVisitorCallback) render_chars_char_visitor_cb); +void render_all_render_line_cb(GContext *ctx, Line *line, + const TextBoxParams *const text_box_params) { + walk_line(ctx, line, text_box_params, (CharVisitorCallback)render_chars_char_visitor_cb); } -void update_all_layout_update_cb(TextLayout* layout, Line* line, - const TextBoxParams* const text_box_params) { +void update_all_layout_update_cb(TextLayout *layout, Line *line, + const TextBoxParams *const text_box_params) { PBL_ASSERTN(line); if (layout) { layout->max_used_size.h = (line->origin.y - layout->box.origin.y) + line->height_px + @@ -1167,24 +1183,24 @@ void update_all_layout_update_cb(TextLayout* layout, Line* line, } //! @return is_overflow -bool is_clip_box_overflow_top_stop_condition_cb(GContext* ctx, Line* line, - const TextBoxParams* const text_box_params) { +bool is_clip_box_overflow_top_stop_condition_cb(GContext *ctx, Line *line, + const TextBoxParams *const text_box_params) { int next_line_max_y = line->origin.y; int clip_box_min_y = ctx->draw_state.clip_box.origin.y; return (next_line_max_y < clip_box_min_y); } //! @return is_overflow -bool is_clip_box_overflow_bottom_stop_condition_cb(GContext* ctx, Line* line, - const TextBoxParams* const text_box_params) { +bool is_clip_box_overflow_bottom_stop_condition_cb(GContext *ctx, Line *line, + const TextBoxParams *const text_box_params) { int next_line_min_y = line->origin.y + line->height_px + text_box_params->line_spacing_delta; int clip_box_max_y = ctx->draw_state.clip_box.origin.y + ctx->draw_state.clip_box.size.h; return (next_line_min_y > clip_box_max_y); } //! @return is_overflow -bool is_clip_box_overflow_stop_condition_cb(GContext* ctx, Line* line, - const TextBoxParams* const text_box_params) { +bool is_clip_box_overflow_stop_condition_cb(GContext *ctx, Line *line, + const TextBoxParams *const text_box_params) { return (is_clip_box_overflow_bottom_stop_condition_cb(ctx, line, text_box_params) || is_clip_box_overflow_top_stop_condition_cb(ctx, line, text_box_params)); } @@ -1200,23 +1216,21 @@ bool is_clip_box_overflow_stop_condition_cb(GContext* ctx, Line* line, #define TEXT_LINE_DESCENDER_LINE(line) DIVIDE_CEIL((line)->height_px, 5) // 1/5th rounded up T_STATIC NOINLINE MOCKABLE void prv_debug_perimeter(GContext *ctx, const GRangeHorizontal *h_range, - const Line *line) { + const Line *line) { // PBL-23045 Eventually remove perimeter debugging // Draw a red horizontal line to show the range of the current lines perimeter if (app_state_get_text_perimeter_debugging_enabled()) { #if !defined(UNITTEST) - const Fixed_S16_3 fixed_x1 = (Fixed_S16_3) { - .integer = h_range->origin_x, + const Fixed_S16_3 fixed_x1 = (Fixed_S16_3){ + .integer = h_range->origin_x, }; - const Fixed_S16_3 fixed_x2 = (Fixed_S16_3) { - .integer = h_range->origin_x + h_range->size_w, + const Fixed_S16_3 fixed_x2 = (Fixed_S16_3){ + .integer = h_range->origin_x + h_range->size_w, }; - graphics_private_draw_horizontal_line_prepared(ctx, &ctx->dest_bitmap, - &ctx->dest_bitmap.bounds, + graphics_private_draw_horizontal_line_prepared(ctx, &ctx->dest_bitmap, &ctx->dest_bitmap.bounds, line->origin.y + TEXT_LINE_CAP_LINE(line), fixed_x1, fixed_x2, GColorRed); - graphics_private_draw_horizontal_line_prepared(ctx, &ctx->dest_bitmap, - &ctx->dest_bitmap.bounds, + graphics_private_draw_horizontal_line_prepared(ctx, &ctx->dest_bitmap, &ctx->dest_bitmap.bounds, line->origin.y + TEXT_LINE_BASE_LINE(line), fixed_x1, fixed_x2, GColorRed); #endif @@ -1228,10 +1242,10 @@ typedef struct { int16_t width_px; } OrphanLineState; -static OrphanLineState prv_capture_orphan_state(Line const* line) { - return (OrphanLineState) { - .origin_x = line->origin.x, - .width_px = line->width_px, +static OrphanLineState prv_capture_orphan_state(Line const *line) { + return (OrphanLineState){ + .origin_x = line->origin.x, + .width_px = line->width_px, }; } @@ -1241,26 +1255,26 @@ static void prv_apply_orphan_state(const OrphanLineState *state, Line *line) { } //! Iterate over lines in the text box -static inline void prv_walk_lines_down(Iterator* const line_iter, TextLayout* const layout, - WalkLinesCallbacks* const callbacks) { - LineIterState* line_iter_state = (LineIterState*) line_iter->state; - GContext* ctx = line_iter_state->ctx; +static inline void prv_walk_lines_down(Iterator *const line_iter, TextLayout *const layout, + WalkLinesCallbacks *const callbacks) { + LineIterState *line_iter_state = (LineIterState *)line_iter->state; + GContext *ctx = line_iter_state->ctx; const GSize ctx_size = graphics_context_get_framebuffer_size(ctx); - const TextBoxParams* const text_box_params = &ctx->text_draw_state.text_box; - Line* line = line_iter_state->current; + const TextBoxParams *const text_box_params = &ctx->text_draw_state.text_box; + Line *line = line_iter_state->current; const TextLayoutFlowData *flow_data = graphics_text_layout_get_flow_data(layout); const bool uses_paging = flow_data->paging.page_on_screen.size_h != 0; const bool uses_perimeter = flow_data->perimeter.impl != NULL; const GPoint perimeter_paging_offset = - uses_paging ? gpoint_sub(flow_data->paging.origin_on_screen, line->origin) : GPointZero; + uses_paging ? gpoint_sub(flow_data->paging.origin_on_screen, line->origin) : GPointZero; Word prev_line_word = WORD_EMPTY; while (!prv_line_iter_is_vertical_overflow(line_iter_state, text_box_params)) { GPoint line_in_perimeter_space = gpoint_add(line->origin, perimeter_paging_offset); if (uses_paging) { - const int16_t page_max_y = flow_data->paging.page_on_screen.origin_y + - flow_data->paging.page_on_screen.size_h; + const int16_t page_max_y = + flow_data->paging.page_on_screen.origin_y + flow_data->paging.page_on_screen.size_h; // TODO: optimize while (line_in_perimeter_space.y < flow_data->paging.page_on_screen.origin_y) { @@ -1281,20 +1295,21 @@ static inline void prv_walk_lines_down(Iterator* const line_iter, TextLayout* co // If we are restricting the perimeter of the draw box, restrict per line region here if (uses_perimeter) { - GRangeHorizontal text_horizontal_range = {.origin_x = line_in_perimeter_space.x, - .size_w = line->max_width_px}; + GRangeHorizontal text_horizontal_range = { + .origin_x = line_in_perimeter_space.x, + .size_w = line->max_width_px + }; const GRangeVertical vertical_range = { - .origin_y = line_in_perimeter_space.y + TEXT_LINE_CAP_LINE(line), - .size_h = TEXT_LINE_BASE_LINE(line) - TEXT_LINE_CAP_LINE(line) + .origin_y = line_in_perimeter_space.y + TEXT_LINE_CAP_LINE(line), + .size_h = TEXT_LINE_BASE_LINE(line) - TEXT_LINE_CAP_LINE(line) }; - GRangeHorizontal perimeter_horizontal_range = - flow_data->perimeter.impl->callback(flow_data->perimeter.impl, &ctx_size, vertical_range, - flow_data->perimeter.inset); + GRangeHorizontal perimeter_horizontal_range = flow_data->perimeter.impl->callback( + flow_data->perimeter.impl, &ctx_size, vertical_range, flow_data->perimeter.inset); prv_debug_perimeter(ctx, &perimeter_horizontal_range, line); // protect against range expanding: clip perimeter to the original text range - grange_clip((GRange*)&perimeter_horizontal_range, (GRange*)&text_horizontal_range); + grange_clip((GRange *)&perimeter_horizontal_range, (GRange *)&text_horizontal_range); text_horizontal_range = perimeter_horizontal_range; // convert range back to screen space @@ -1307,7 +1322,7 @@ static inline void prv_walk_lines_down(Iterator* const line_iter, TextLayout* co // reference into the iterator's current word to easily access this attribute here and // later without the complicated cast - Word *const current_word_ref = &(((WordIterState*)line_iter_state->word_iter.state)->current); + Word *const current_word_ref = &(((WordIterState *)line_iter_state->word_iter.state)->current); // state that needs to be captured so we can restore it in case of an orphan const Word word_before_rendering = *current_word_ref; const OrphanLineState orphan_state = prv_capture_orphan_state(line); @@ -1321,30 +1336,30 @@ static inline void prv_walk_lines_down(Iterator* const line_iter, TextLayout* co // buffer. const int num_safe_lines = 3; const bool page_contains_enough_lines = - (flow_data->paging.page_on_screen.size_h >= num_safe_lines * line->height_px); - bool avoiding_orphans = uses_paging && ctx->draw_state.avoid_text_orphans && - page_contains_enough_lines; + (flow_data->paging.page_on_screen.size_h >= num_safe_lines * line->height_px); + bool avoiding_orphans = + uses_paging && ctx->draw_state.avoid_text_orphans && page_contains_enough_lines; -render_line: {} // this {} is just an empty statement that both C and our linter accepts - const bool is_text_remaining = line_add_words( - line, &line_iter_state->word_iter, callbacks->last_line_cb); + render_line: {} // this {} is just an empty statement that both C and our linter accepts + const bool is_text_remaining = + line_add_words(line, &line_iter_state->word_iter, callbacks->last_line_cb); // NOTE: Account for descender - assume descender is no more than half the line height const int16_t line_spacing_delta = prv_layout_get_line_spacing_delta(layout); - const int32_t line_max_y = line->origin.y + line->height_px + - TEXT_LINE_DESCENDER_LINE(line) + line_spacing_delta; + const int32_t line_max_y = + line->origin.y + line->height_px + TEXT_LINE_DESCENDER_LINE(line) + line_spacing_delta; const int32_t clip_box_min_y = ctx->draw_state.clip_box.origin.y; if (line_max_y > clip_box_min_y) { if (avoiding_orphans) { const bool line_is_first_line_page = - (line_in_perimeter_space.y == flow_data->paging.page_on_screen.origin_y); + (line_in_perimeter_space.y == flow_data->paging.page_on_screen.origin_y); const bool is_orphan = - (line_is_first_line_page && prev_line_word.start && !is_text_remaining); + (line_is_first_line_page && prev_line_word.start && !is_text_remaining); if (is_orphan) { *current_word_ref = prev_line_word; prv_apply_orphan_state(&orphan_state, line); - avoiding_orphans = false; // prevent infinite loops + avoiding_orphans = false; // prevent infinite loops goto render_line; } } @@ -1377,7 +1392,8 @@ render_line: {} // this {} is just an empty statement that both C and our linter // Text layout //! @return is_success -bool line_add_word(GContext* ctx, Line* line, Word* word, const TextBoxParams* const text_box_params) { +bool line_add_word(GContext *ctx, Line *line, Word *word, + const TextBoxParams *const text_box_params) { // Horizontal overflow if (line->width_px > line->max_width_px) { return false; @@ -1397,8 +1413,9 @@ bool line_add_word(GContext* ctx, Line* line, Word* word, const TextBoxParams* c line->height_px = line_height; if (is_newline_first_codepoint) { - // This trims off leading \n's from word. If we reach the end of the text while doing this, it sets - // word->start to NULL. + // This trims off leading \n's from word. If we reach the end of the text while doing this, it + // sets + // word->start to NULL. word_trim_preceding_codepoint(ctx, word, NEWLINE_CODEPOINT, text_box_params); if (text_box_params->overflow_mode != GTextOverflowModeFill) { return false; @@ -1422,13 +1439,13 @@ bool line_add_word(GContext* ctx, Line* line, Word* word, const TextBoxParams* c // [CJK] - when breaking a Katakana word, you probably don't want to add a hyphen. And to // a Japanese user, a hyphen with Katakana looks like a long (chou-on) sound mark. line->suffix_codepoint = HYPHEN_CODEPOINT; - utf8_t* last_visited = walk_line(ctx, line, text_box_params, - (CharVisitorCallback) update_dimensions_char_visitor_cb); + utf8_t *last_visited = walk_line(ctx, line, text_box_params, + (CharVisitorCallback)update_dimensions_char_visitor_cb); last_visited = (last_visited == NULL) ? (word->start) : last_visited; // Trim the word - int suffix_width_px = prv_codepoint_get_horizontal_advance(&ctx->font_cache, - text_box_params->font, HYPHEN_CODEPOINT); + int suffix_width_px = prv_codepoint_get_horizontal_advance( + &ctx->font_cache, text_box_params->font, HYPHEN_CODEPOINT); int truncated_word_length_px = (line->width_px - suffix_width_px); PBL_ASSERTN(word->width_px >= truncated_word_length_px); word->width_px -= truncated_word_length_px; @@ -1449,7 +1466,7 @@ bool line_add_word(GContext* ctx, Line* line, Word* word, const TextBoxParams* c return false; } -static void prv_line_justify(Line* line, const TextBoxParams* const text_box_params) { +static void prv_line_justify(Line *line, const TextBoxParams *const text_box_params) { PBL_ASSERTN(line->max_width_px >= line->width_px); int horiz_px_remaining = (line->max_width_px - line->width_px); @@ -1477,9 +1494,8 @@ static void prv_line_justify(Line* line, const TextBoxParams* const text_box_par } //! @return is_text_remaining -bool line_add_words(Line* line, Iterator* word_iter, LastLineCallback last_line_cb) { - - WordIterState* word_iter_state = (WordIterState*) word_iter->state; +bool line_add_words(Line *line, Iterator *word_iter, LastLineCallback last_line_cb) { + WordIterState *word_iter_state = (WordIterState *)word_iter->state; line->start = word_iter_state->current.start; @@ -1489,8 +1505,8 @@ bool line_add_words(Line* line, Iterator* word_iter, LastLineCallback last_line_ while (is_text_remaining && line->max_width_px > 0) { Word next_word = word_iter_state->current; - bool is_added = line_add_word(word_iter_state->ctx, line, &next_word, - word_iter_state->text_box_params); + bool is_added = + line_add_word(word_iter_state->ctx, line, &next_word, word_iter_state->text_box_params); if (!is_added) { word_iter_state->current = next_word; @@ -1515,7 +1531,7 @@ bool line_add_words(Line* line, Iterator* word_iter, LastLineCallback last_line_ return is_text_remaining; } -static bool prv_text_layout_is_fresh(TextLayout* layout, GFont const font, const GRect box, +static bool prv_text_layout_is_fresh(TextLayout *layout, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, Codepoint text_hash) { PBL_ASSERTN(layout); @@ -1543,9 +1559,8 @@ static bool prv_text_layout_is_fresh(TextLayout* layout, GFont const font, const return true; } -static inline void prv_text_walk_lines(GContext* ctx, TextLayout* const layout, - WalkLinesCallbacks* callbacks) { - +static inline void prv_text_walk_lines(GContext *ctx, TextLayout *const layout, + WalkLinesCallbacks *callbacks) { TextBoxParams *text_box = &ctx->text_draw_state.text_box; // Degenerate boxes draw nothing; negative sizes must not reach line layout @@ -1570,12 +1585,12 @@ static inline void prv_text_walk_lines(GContext* ctx, TextLayout* const layout, callbacks->last_line_cb = NULL; } - ctx->text_draw_state.line = (Line) { - .start = utf8_bounds->start, - // set initial bounding values for line - .origin = text_box->box.origin, //box.size.w, - .height_px = fonts_get_font_height(text_box->font) + ctx->text_draw_state.line = (Line){ + .start = utf8_bounds->start, + // set initial bounding values for line + .origin = text_box->box.origin, //box.size.w, + .height_px = fonts_get_font_height(text_box->font) }; Iterator line_iter; @@ -1584,10 +1599,10 @@ static inline void prv_text_walk_lines(GContext* ctx, TextLayout* const layout, prv_walk_lines_down(&line_iter, layout, callbacks); } -static void prv_graphics_text_layout_update(GContext* ctx, const char* text, GFont const font, +static void prv_graphics_text_layout_update(GContext *ctx, const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, - TextLayout* const layout) { + TextLayout *const layout) { PBL_ASSERTN(layout); bool success = false; @@ -1599,7 +1614,7 @@ static void prv_graphics_text_layout_update(GContext* ctx, const char* text, GFo } int str_len_bytes = (utf8_bounds.end - utf8_bounds.start); - Codepoint text_hash = hash((const uint8_t*) utf8_bounds.start, str_len_bytes); + Codepoint text_hash = hash((const uint8_t *)utf8_bounds.start, str_len_bytes); if (prv_text_layout_is_fresh(layout, font, box, overflow_mode, alignment, text_hash)) { return; @@ -1612,18 +1627,16 @@ static void prv_graphics_text_layout_update(GContext* ctx, const char* text, GFo layout->alignment = alignment; layout->font = font; - WalkLinesCallbacks callbacks = { - .layout_update_cb = update_all_layout_update_cb - }; + WalkLinesCallbacks callbacks = {.layout_update_cb = update_all_layout_update_cb}; int16_t line_spacing_delta = prv_layout_get_line_spacing_delta(layout); - ctx->text_draw_state.text_box = (TextBoxParams) { - .utf8_bounds = &utf8_bounds, - .box = box, - .font = font, - .overflow_mode = overflow_mode, - .alignment = alignment, - .line_spacing_delta = line_spacing_delta, + ctx->text_draw_state.text_box = (TextBoxParams){ + .utf8_bounds = &utf8_bounds, + .box = box, + .font = font, + .overflow_mode = overflow_mode, + .alignment = alignment, + .line_spacing_delta = line_spacing_delta, }; prv_text_walk_lines(ctx, layout, &callbacks); @@ -1632,20 +1645,19 @@ static void prv_graphics_text_layout_update(GContext* ctx, const char* text, GFo // helper macro to avoid source code duplication // we call this instead of a true function to keep the stack as low as possible as this is // on a critical path. -#define APP_TEXT_GET_CONTENT_SIZE(text, font, box, overflow_mode, alignment, text_attributes) \ - do { \ - GContext* ctx = app_state_get_graphics_context(); \ - return graphics_text_layout_get_max_used_size( \ - ctx, text, font, box, overflow_mode, alignment, text_attributes); \ +#define APP_TEXT_GET_CONTENT_SIZE(text, font, box, overflow_mode, alignment, text_attributes) \ + do { \ + GContext *ctx = app_state_get_graphics_context(); \ + return graphics_text_layout_get_max_used_size(ctx, text, font, box, overflow_mode, alignment, \ + text_attributes); \ } while (0) GSize app_graphics_text_layout_get_content_size_with_attributes( - const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, - const GTextAlignment alignment, GTextAttributes *text_attributes) { + const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, + const GTextAlignment alignment, GTextAttributes *text_attributes) { APP_TEXT_GET_CONTENT_SIZE(text, font, box, overflow_mode, alignment, text_attributes); } - GSize app_graphics_text_layout_get_content_size(const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment) { @@ -1658,11 +1670,11 @@ uint16_t graphics_text_layout_get_text_height(GContext *ctx, const char *text, G const GTextAlignment alignment) { const int16_t LAYOUT_HEIGHT_IGNORE = SHRT_MAX; GRect box = { - .origin = (GPoint) { .x = 0, .y = 0 }, - .size = (GSize) { .w = bounds_width, .h = LAYOUT_HEIGHT_IGNORE } - }; - GSize size = graphics_text_layout_get_max_used_size(ctx, text, font, - box, overflow_mode, alignment, NULL); + .origin = (GPoint){.x = 0, .y = 0}, + .size = (GSize){.w = bounds_width, .h = LAYOUT_HEIGHT_IGNORE} + }; + GSize size = + graphics_text_layout_get_max_used_size(ctx, text, font, box, overflow_mode, alignment, NULL); return size.h; } @@ -1670,15 +1682,15 @@ GSize graphics_text_layout_get_max_used_size(GContext *ctx, const char *text, GF const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, GTextLayoutCacheRef const layout) { - TextLayoutExtended stack_layout = { 0 }; // Default use extended layout - TextLayout* text_layout = layout ? (TextLayout*) layout : (TextLayout*) &stack_layout; + TextLayoutExtended stack_layout = {0}; // Default use extended layout + TextLayout *text_layout = layout ? (TextLayout *)layout : (TextLayout *)&stack_layout; prv_graphics_text_layout_update(ctx, text, font, box, overflow_mode, alignment, text_layout); return text_layout->max_used_size; } -void graphics_draw_text(GContext* ctx, const char* text, GFont const font, - GRect box, const GTextOverflowMode overflow_mode, - const GTextAlignment alignment, GTextLayoutCacheRef const layout) { +void graphics_draw_text(GContext *ctx, const char *text, GFont const font, GRect box, + const GTextOverflowMode overflow_mode, const GTextAlignment alignment, + GTextLayoutCacheRef const layout) { if (ctx->lock) { return; } @@ -1699,42 +1711,41 @@ void graphics_draw_text(GContext* ctx, const char* text, GFont const font, return; } - if (layout) { layout->box.origin = global_box.origin; } WalkLinesCallbacks callbacks = { - .render_line_cb = render_all_render_line_cb, - .layout_update_cb = update_all_layout_update_cb, - .stop_condition_cb = is_clip_box_overflow_bottom_stop_condition_cb + .render_line_cb = render_all_render_line_cb, + .layout_update_cb = update_all_layout_update_cb, + .stop_condition_cb = is_clip_box_overflow_bottom_stop_condition_cb }; int16_t line_spacing_delta = prv_layout_get_line_spacing_delta(layout); - ctx->text_draw_state.text_box = (TextBoxParams) { - .utf8_bounds = &utf8_bounds, - .box = global_box, - .font = font, - .overflow_mode = overflow_mode, - .alignment = alignment, - .line_spacing_delta = line_spacing_delta, + ctx->text_draw_state.text_box = (TextBoxParams){ + .utf8_bounds = &utf8_bounds, + .box = global_box, + .font = font, + .overflow_mode = overflow_mode, + .alignment = alignment, + .line_spacing_delta = line_spacing_delta, }; prv_text_walk_lines(ctx, layout, &callbacks); } -void graphics_text_layout_cache_init(GTextLayoutCacheRef* layout) { +void graphics_text_layout_cache_init(GTextLayoutCacheRef *layout) { if (process_manager_compiled_with_legacy2_sdk()) { *layout = applib_type_malloc(TextLayout); - *((TextLayout*) *layout) = (TextLayout) { 0 }; + *((TextLayout *)*layout) = (TextLayout){0}; } else { *layout = applib_type_malloc(TextLayoutExtended); - *((TextLayoutExtended*) *layout) = (TextLayoutExtended) { 0 }; + *((TextLayoutExtended *)*layout) = (TextLayoutExtended){0}; } } -void graphics_text_layout_cache_deinit(GTextLayoutCacheRef* layout) { - TextLayout* text_layout = (TextLayout*) *layout; +void graphics_text_layout_cache_deinit(GTextLayoutCacheRef *layout) { + TextLayout *text_layout = (TextLayout *)*layout; applib_free(text_layout); *layout = NULL; } @@ -1753,9 +1764,8 @@ void graphics_text_attributes_destroy(GTextAttributes *text_attributes) { graphics_text_layout_cache_deinit(&text_attributes); } - -static TextLayoutExtended* prv_get_writable_extended_layout(GTextLayoutCacheRef layout) { - PBL_ASSERTN(!process_manager_compiled_with_legacy2_sdk()); // should not get here if 2.X +static TextLayoutExtended *prv_get_writable_extended_layout(GTextLayoutCacheRef layout) { + PBL_ASSERTN(!process_manager_compiled_with_legacy2_sdk()); // should not get here if 2.X PBL_ASSERTN(layout); // Invalidate the hash to ensure the layout gets updated when prv_graphics_text_layout_update is // called on the layout @@ -1763,14 +1773,13 @@ static TextLayoutExtended* prv_get_writable_extended_layout(GTextLayoutCacheRef return (TextLayoutExtended *)layout; } -static TextLayoutExtended* prv_get_readable_extended_layout(GTextLayoutCacheRef layout) { +static TextLayoutExtended *prv_get_readable_extended_layout(GTextLayoutCacheRef layout) { if (!layout || process_manager_compiled_with_legacy2_sdk()) { return NULL; } - return (TextLayoutExtended*)layout; + return (TextLayoutExtended *)layout; } - void graphics_text_layout_set_line_spacing_delta(GTextLayoutCacheRef layout, int16_t delta) { TextLayoutExtended *extended = prv_get_writable_extended_layout(layout); if (extended) { @@ -1810,9 +1819,9 @@ void graphics_text_attributes_enable_screen_text_flow(GTextLayoutCacheRef layout const GPerimeter *perimeter = NULL; #endif - extended->flow_data.perimeter = (TextLayoutFlowDataPerimeter) { - .impl = perimeter, - .inset = inset, + extended->flow_data.perimeter = (TextLayoutFlowDataPerimeter){ + .impl = perimeter, + .inset = inset, }; } @@ -1824,14 +1833,15 @@ void graphics_text_attributes_restore_default_paging(GTextLayoutCacheRef layout) extended->flow_data.paging.page_on_screen.size_h = 0; } -void graphics_text_attributes_enable_paging( - GTextLayoutCacheRef layout, GPoint content_origin_on_screen, GRect paging_on_screen) { +void graphics_text_attributes_enable_paging(GTextLayoutCacheRef layout, + GPoint content_origin_on_screen, + GRect paging_on_screen) { TextLayoutExtended *extended = prv_get_writable_extended_layout(layout); if (extended) { - extended->flow_data.paging = (TextLayoutFlowDataPaging) { - .origin_on_screen = content_origin_on_screen, - .page_on_screen.origin_y = paging_on_screen.origin.y, - .page_on_screen.size_h = paging_on_screen.size.h, + extended->flow_data.paging = (TextLayoutFlowDataPaging){ + .origin_on_screen = content_origin_on_screen, + .page_on_screen.origin_y = paging_on_screen.origin.y, + .page_on_screen.size_h = paging_on_screen.size.h, }; } } @@ -1842,9 +1852,9 @@ const TextLayoutFlowData *graphics_text_layout_get_flow_data(GTextLayoutCacheRef return &extended_layout->flow_data; } else { static const TextLayoutFlowData s_default_data = { - // yes, this is basically just an empty struct but I want to be explicit here: - .perimeter.impl = NULL, // no perimeter/inset configured - .paging.page_on_screen.size_h = 0, // no paging or origin + // yes, this is basically just an empty struct but I want to be explicit here: + .perimeter.impl = NULL, // no perimeter/inset configured + .paging.page_on_screen.size_h = 0, // no paging or origin }; return &s_default_data; } diff --git a/src/fw/applib/graphics/text_layout_private.h b/src/fw/applib/graphics/text_layout_private.h index 49ca460943..c3030423be 100644 --- a/src/fw/applib/graphics/text_layout_private.h +++ b/src/fw/applib/graphics/text_layout_private.h @@ -14,7 +14,7 @@ #include typedef struct { - const Utf8Bounds* utf8_bounds; //header.width_px, - .size.h = glyph->header.height_px, - .origin.x = glyph->header.left_offset_px, - .origin.y = glyph->header.top_offset_px + .size.w = glyph->header.width_px, + .size.h = glyph->header.height_px, + .origin.x = glyph->header.left_offset_px, + .origin.y = glyph->header.top_offset_px }; return r; @@ -48,20 +48,20 @@ T_STATIC int32_t prv_convert_1bit_addr_to_8bit_x(GBitmap *dest_bitmap, uint32_t #endif // PRO TIP: if you have to modify this function, expect to waste the rest of your day on it -void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const font, +void render_glyph(GContext *const ctx, const uint32_t codepoint, FontInfo *const font, const GRect cursor) { if (codepoint_is_special(codepoint)) { TextRenderState *state = app_state_get_text_render_state(); if (state->special_codepoint_handler_cb) { state->special_codepoint_handler_cb(ctx, codepoint, cursor, - state->special_codepoint_handler_context); + state->special_codepoint_handler_context); } return; } int16_t baseline_adjust = 0; - const GlyphData* glyph = text_resources_get_glyph(&ctx->font_cache, codepoint, font, - &baseline_adjust); + const GlyphData *glyph = + text_resources_get_glyph(&ctx->font_cache, codepoint, font, &baseline_adjust); PBL_ASSERTN(glyph); // Bitfiddle the metrics data: @@ -72,15 +72,14 @@ void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const // Calculate the box that we intend to draw to the screen, in screen coordinates GRect glyph_target = { - .origin = { .x = cursor.origin.x + glyph_metrics.origin.x, - .y = cursor.origin.y + glyph_metrics.origin.y }, - .size = { .w = glyph_metrics.size.w, - .h = glyph_metrics.size.h } + .origin = + {.x = cursor.origin.x + glyph_metrics.origin.x, + .y = cursor.origin.y + glyph_metrics.origin.y}, + .size = {.w = glyph_metrics.size.w, .h = glyph_metrics.size.h} }; - // The destination bitmap's x-coordinate and row advance. Used in the loop below. - GBitmap* dest_bitmap = graphics_context_get_bitmap(ctx); + GBitmap *dest_bitmap = graphics_context_get_bitmap(ctx); const int32_t x = (int32_t)((int16_t)cursor.origin.x + (int16_t)glyph_metrics.origin.x); // Now clip that box against the screen/other UI elements. This rect will be the rect that we @@ -96,14 +95,13 @@ void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const #if CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 // Set base address to 0 for 8-bit as this will be later translated to the destination bitmap // address - so do all calculations so everything is offset from 0 - uint32_t * base_addr = 0; + uint32_t *base_addr = 0; #else - uint32_t * base_addr = ((uint32_t*)dest_bitmap->addr); + uint32_t *base_addr = ((uint32_t *)dest_bitmap->addr); #endif - const uint32_t * const dest_block_x_begin = base_addr + - (left_clip ? - MAX(0, (((x + left_clip + 31)/ 32) - 1)) : (x / 32)); + const uint32_t *const dest_block_x_begin = + base_addr + (left_clip ? MAX(0, (((x + left_clip + 31) / 32) - 1)) : (x / 32)); if (clipped_glyph_target.size.h == 0 || clipped_glyph_target.size.w == 0) { return; @@ -112,11 +110,11 @@ void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const #if CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 // NOTE: Since all calculations are based on 1-bit calculation - use the row size from // the 1-bit frame buffer - const int row_size_bytes = 4 * ((dest_bitmap->bounds.size.w / 32) + - ((dest_bitmap->bounds.size.w % 32) ? 1 : 0)); + const int row_size_bytes = + 4 * ((dest_bitmap->bounds.size.w / 32) + ((dest_bitmap->bounds.size.w % 32) ? 1 : 0)); #else const int row_size_bytes = dest_bitmap->row_size_bytes; -#endif // CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 +#endif // CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 // Number of blocks (i.e. 32-bit chunks) const int dest_row_length = row_size_bytes / 4; @@ -126,14 +124,12 @@ void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const // is the number of bits to the right of the next 32-bit boundary to the left. // For example, if x is -5 we want this shift to be 27, since -32 (the nearest // boundary) + 27 = -5 - const uint8_t dest_shift_at_line_begin = (x >= 0) ? - x % 32 : - (x - ((x / 32) * 32)); + const uint8_t dest_shift_at_line_begin = (x >= 0) ? x % 32 : (x - ((x / 32) * 32)); uint8_t dest_shift = dest_shift_at_line_begin; // The glyph bitmap starts the block after the metrics data: - uint32_t const* glyph_block = glyph->data; + uint32_t const *glyph_block = glyph->data; // Set up the first piece of source glyph bitmap: int8_t glyph_block_bits_left = 32; @@ -144,27 +140,36 @@ void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const // the bits that wrapped around for the next dest_block rotl32(src, dest_shift); int8_t src_rotated = dest_shift; - // how many 32-bit blocks do we need to bitblt on each row. If we're not word aligned we'll need to - // modify an extra partial word, as we'll have an incomplete word on either side of the line segment - // we're modifying. - // For 1-bit, each pixel goes into one bit in dest bitmap - so 32 pixels per block - const uint8_t num_dest_blocks_per_row = (clipped_glyph_target.size.w / 32) + - (((dest_shift + left_clip) % 32) ? 1 : 0); - - // Handle clipping at the top of the character. We need to skip a number of bits in our source data. - const unsigned int bits_to_skip = glyph_metrics.size.w * (clipped_glyph_target.origin.y - glyph_target.origin.y); + // how many 32-bit blocks do we need to bitblt on each row. If we're not word aligned we'll need + // to modify an extra partial word, as we'll have an incomplete word on either side of the line + // segment we're modifying. For 1-bit, each pixel goes into one bit in dest bitmap - so 32 pixels + // per block + const uint8_t num_dest_blocks_per_row = + (clipped_glyph_target.size.w / 32) + (((dest_shift + left_clip) % 32) ? 1 : 0); + + // Handle clipping at the top of the character. We need to skip a number of bits in our source + // data. + const unsigned int bits_to_skip = + glyph_metrics.size.w * (clipped_glyph_target.origin.y - glyph_target.origin.y); if (bits_to_skip) { glyph_block += bits_to_skip / 32; src = *glyph_block; // Simulate the rotate that happens at the bottom of the bitblt loop so our source value is set // up just as if we actually rendered those first few lines. - rotl32(src, (dest_shift_at_line_begin + ((0 - ((uint8_t)glyph_metrics.size.w)) % 32) * (clipped_glyph_target.origin.y - glyph_target.origin.y)) % 32); - src_rotated = (dest_shift_at_line_begin + ((0 - ((uint8_t)glyph_metrics.size.w)) % 32) * (clipped_glyph_target.origin.y - glyph_target.origin.y)) % 32; + rotl32(src, (dest_shift_at_line_begin + + ((0 - ((uint8_t)glyph_metrics.size.w)) % 32) * + (clipped_glyph_target.origin.y - glyph_target.origin.y)) % + 32); + src_rotated = + (dest_shift_at_line_begin + ((0 - ((uint8_t)glyph_metrics.size.w)) % 32) * + (clipped_glyph_target.origin.y - glyph_target.origin.y)) % + 32; glyph_block_bits_left -= bits_to_skip % 32; } - for (int dest_y = clipped_glyph_target.origin.y; dest_y != clipped_glyph_target.origin.y + clipped_glyph_target.size.h; ++dest_y) { + for (int dest_y = clipped_glyph_target.origin.y; + dest_y != clipped_glyph_target.origin.y + clipped_glyph_target.size.h; ++dest_y) { dest_shift = dest_shift_at_line_begin; // Number of bits to render on this line. @@ -195,19 +200,21 @@ void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const while (dest_block != dest_block_end && glyph_line_bits_left) { PBL_ASSERT(dest_block < dest_block_end, "DB=<%p> DBE=<%p>", dest_block, dest_block_end); - PBL_ASSERTN(dest_block >= (uint32_t*) base_addr); - PBL_ASSERTN(dest_block < (uint32_t*) base_addr + row_size_bytes * - (dest_bitmap->bounds.origin.y + dest_bitmap->bounds.size.h)); + PBL_ASSERTN(dest_block >= (uint32_t *)base_addr); + PBL_ASSERTN(dest_block < + (uint32_t *)base_addr + + row_size_bytes * (dest_bitmap->bounds.origin.y + dest_bitmap->bounds.size.h)); // bitblt part of glyph_block: - const uint8_t number_of_bits = MIN(32 - dest_shift, MIN(glyph_line_bits_left, glyph_block_bits_left)); + const uint8_t number_of_bits = + MIN(32 - dest_shift, MIN(glyph_line_bits_left, glyph_block_bits_left)); const uint32_t mask = (((1 << number_of_bits) - 1) << dest_shift); #if CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 // dest_block points to the block if the dest image was a 1-bit buffer // translate this to an x coordinate in the 8-bit buffer - const int32_t block_start_x = prv_convert_1bit_addr_to_8bit_x(dest_bitmap, dest_block, - dest_y); + const int32_t block_start_x = + prv_convert_1bit_addr_to_8bit_x(dest_bitmap, dest_block, dest_y); const GBitmapDataRowInfo data_row = gbitmap_get_data_row_info(dest_bitmap, dest_y); // Only enter the loop if the current block is within the valid data row range if (block_start_x + 31 >= data_row.min_x && block_start_x <= data_row.max_x) { @@ -231,7 +238,7 @@ void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const if (ctx->draw_state.compositing_mode == GCompOpSet) { // Blend (i.e. for transparency) if GCompOpSet dest_color = gcolor_alpha_blend(ctx->draw_state.text_color, - (GColor) {.argb = dest_addr[bitindex]}); + (GColor){.argb = dest_addr[bitindex]}); } else { dest_color = ctx->draw_state.text_color; dest_color.a = 3; @@ -279,7 +286,6 @@ void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const } glyph_block_bits_left -= right_clip; - // Rotate the bits into the right position for the next row: dest_shift = dest_shift_at_line_begin - dest_shift; rotl32(src, dest_shift % 32); @@ -289,7 +295,6 @@ void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const graphics_context_mark_dirty_rect(ctx, clipped_glyph_target); } - void text_render_set_special_codepoint_cb(SpecialCodepointHandlerCb handler, void *context) { TextRenderState *state = app_state_get_text_render_state(); state->special_codepoint_handler_cb = handler; diff --git a/src/fw/applib/graphics/text_render.h b/src/fw/applib/graphics/text_render.h index 58be5a03f3..1d0f5585d6 100644 --- a/src/fw/applib/graphics/text_render.h +++ b/src/fw/applib/graphics/text_render.h @@ -12,9 +12,9 @@ typedef struct GContext GContext; typedef void (*SpecialCodepointHandlerCb)(GContext *ctx, Codepoint codepoint, GRect cursor, - void *context); + void *context); -void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const font, +void render_glyph(GContext *const ctx, const uint32_t codepoint, FontInfo *const font, const GRect cursor); // This function sets a handler callback for handling special codepoints encountered during text diff --git a/src/fw/applib/graphics/text_resources.c b/src/fw/applib/graphics/text_resources.c index 19298672cb..522e61dab5 100644 --- a/src/fw/applib/graphics/text_resources.c +++ b/src/fw/applib/graphics/text_resources.c @@ -21,16 +21,13 @@ #include #define RLE4_UNITS_BIT_WIDTH (4) -#define RLE4_UNITS_PER_BYTE (8 / RLE4_UNITS_BIT_WIDTH) +#define RLE4_UNITS_PER_BYTE (8 / RLE4_UNITS_BIT_WIDTH) static const size_t s_font_md_size[] = { - 0, // There currently is no font version 0. This makes decoding much easier & consistent - sizeof(FontMetaDataV1), - sizeof(FontMetaData), - sizeof(FontMetaDataV3) + 0, // There currently is no font version 0. This makes decoding much easier & consistent + sizeof(FontMetaDataV1), sizeof(FontMetaData), sizeof(FontMetaDataV3) }; - static uint8_t prv_font_hash(Codepoint codepoint, uint8_t table_size) { return (codepoint % table_size); } @@ -39,11 +36,11 @@ static Codepoint prv_offset_table_get_codepoint(FontCache *font_cache, const Fon int index) { const bool offset_16 = HAS_FEATURE(md->version, VERSION_FIELD_FEATURE_OFFSET_16); if (md->codepoint_bytes == 2) { - return offset_16 ? font_cache->offsets_buffer_2_2[index].codepoint : - font_cache->offsets_buffer_2_4[index].codepoint; + return offset_16 ? font_cache->offsets_buffer_2_2[index].codepoint + : font_cache->offsets_buffer_2_4[index].codepoint; } else { - return offset_16 ? font_cache->offsets_buffer_4_2[index].codepoint : - font_cache->offsets_buffer_4_4[index].codepoint; + return offset_16 ? font_cache->offsets_buffer_4_2[index].codepoint + : font_cache->offsets_buffer_4_4[index].codepoint; } } @@ -51,20 +48,20 @@ static uint32_t prv_offset_table_get_offset(FontCache *font_cache, const FontMet int index) { const bool offset_16 = HAS_FEATURE(md->version, VERSION_FIELD_FEATURE_OFFSET_16); if (md->codepoint_bytes == 2) { - return offset_16 ? font_cache->offsets_buffer_2_2[index].offset : - font_cache->offsets_buffer_2_4[index].offset; + return offset_16 ? font_cache->offsets_buffer_2_2[index].offset + : font_cache->offsets_buffer_2_4[index].offset; } else { - return offset_16 ? font_cache->offsets_buffer_4_2[index].offset : - font_cache->offsets_buffer_4_4[index].offset; + return offset_16 ? font_cache->offsets_buffer_4_2[index].offset + : font_cache->offsets_buffer_4_4[index].offset; } } static uint32_t prv_offset_table_entry_size(const FontMetaData *md) { const bool offset_16 = HAS_FEATURE(md->version, VERSION_FIELD_FEATURE_OFFSET_16); if (md->codepoint_bytes == 2) { - return offset_16 ? sizeof(OffsetTableEntry_2_2) : sizeof(OffsetTableEntry_2_4); + return offset_16 ? sizeof(OffsetTableEntry_2_2) : sizeof(OffsetTableEntry_2_4); } else { - return offset_16 ? sizeof(OffsetTableEntry_4_2) : sizeof(OffsetTableEntry_4_4); + return offset_16 ? sizeof(OffsetTableEntry_4_2) : sizeof(OffsetTableEntry_4_4); } } @@ -95,24 +92,23 @@ static int prv_load_offset_table(Codepoint codepoint, FontCache *font_cache, FontHashTableEntry table_entry; Codepoint hash_entry_offset = s_font_md_size[version] + table_id * sizeof(FontHashTableEntry); // find which bucket the codepoint was put into TODO: cache hash table? - PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "HTE read: table_id:%d, cp:%"PRIx32", offset:%"PRIx32, - table_id, codepoint, hash_entry_offset); + PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "HTE read: table_id:%d, cp:%" PRIx32 ", offset:%" PRIx32, + table_id, codepoint, hash_entry_offset); SYS_PROFILER_NODE_START(text_render_flash); sys_resource_load_range(font_res->app_num, font_res->resource_id, hash_entry_offset, - (uint8_t*)&table_entry, sizeof(FontHashTableEntry)); + (uint8_t *)&table_entry, sizeof(FontHashTableEntry)); SYS_PROFILER_NODE_STOP(text_render_flash); - offset = s_font_md_size[version] + - (sizeof(FontHashTableEntry) * font_res->md.hash_table_size) + table_entry.offset; + offset = s_font_md_size[version] + (sizeof(FontHashTableEntry) * font_res->md.hash_table_size) + + table_entry.offset; num_bytes = table_entry.count * prv_offset_table_entry_size(&font_res->md); num_entries = table_entry.count; PBL_ASSERTN(num_bytes <= sizeof(font_cache->offsets_buffer_4_4)); } - PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "HT read: offset: %zx, bytes: %zu", offset, - num_bytes); + PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "HT read: offset: %zx, bytes: %zu", offset, num_bytes); SYS_PROFILER_NODE_START(text_render_flash); sys_resource_load_range(font_res->app_num, font_res->resource_id, offset, (uint8_t *)font_cache->offsets_buffer_4_4, num_bytes); @@ -145,9 +141,7 @@ static uint32_t prv_get_cache_key(const FontResource *font_res, Codepoint codepo const bool is_app = (font_res->app_num != 0); - return (is_app ? 1 << 31 : 0) | - ((font_res->resource_id << 17) | - (codepoint & 0x0001FFFF)); + return (is_app ? 1 << 31 : 0) | ((font_res->resource_id << 17) | (codepoint & 0x0001FFFF)); } static uint32_t prv_get_glyph_table_offset(FontCache *font_cache, Codepoint codepoint, @@ -159,8 +153,8 @@ static uint32_t prv_get_glyph_table_offset(FontCache *font_cache, Codepoint code while (max_idx >= min_idx) { int mid_idx = (max_idx + min_idx) / 2; - Codepoint codepoint_at_mid_idx = prv_offset_table_get_codepoint(font_cache, &font_res->md, - mid_idx); + Codepoint codepoint_at_mid_idx = + prv_offset_table_get_codepoint(font_cache, &font_res->md, mid_idx); if (codepoint_at_mid_idx < codepoint) { min_idx = mid_idx + 1; @@ -195,8 +189,7 @@ static uint32_t prv_get_glyph_data_offset(Codepoint codepoint, FontCache *font_c } else { address = s_font_md_size[version] + (sizeof(FontHashTableEntry) * font_res->md.hash_table_size) + - (prv_offset_table_entry_size(&font_res->md) * font_res->md.number_of_glyphs) + - offset; + (prv_offset_table_entry_size(&font_res->md) * font_res->md.number_of_glyphs) + offset; } return address; @@ -249,7 +242,7 @@ static GlyphData *prv_decompress_glyph_data(GlyphData *g, uint8_t *src) { for (unsigned int i = 0; i < RLE4_UNITS_PER_BYTE; ++i) { if (!num_rle_units) { - break; // Handle a padded, odd number of rle units + break; // Handle a padded, odd number of rle units } // Number of bits in this run @@ -297,8 +290,9 @@ static bool prv_load_glyph_bitmap(Codepoint codepoint, const FontResource *font_ LineCacheData *data) { GlyphData *g = &data->glyph_data; - const size_t bitmap_offset = (FONT_VERSION(font_res->md.version) == FONT_VERSION_1) ? - sizeof(GlyphHeaderDataV1) : sizeof(GlyphHeaderData); + const size_t bitmap_offset = (FONT_VERSION(font_res->md.version) == FONT_VERSION_1) + ? sizeof(GlyphHeaderDataV1) + : sizeof(GlyphHeaderData); const uint32_t bitmap_addr = data->resource_offset + bitmap_offset; size_t glyph_size_bytes; @@ -315,14 +309,17 @@ static bool prv_load_glyph_bitmap(Codepoint codepoint, const FontResource *font_ } PBL_ASSERT(glyph_size_bytes <= CACHE_GLYPH_SIZE, - "text codepoint %"PRIx32" is %zu bytes, overflowing %zu max size", codepoint, + "text codepoint %" PRIx32 " is %zu bytes, overflowing %zu max size", codepoint, glyph_size_bytes, CACHE_GLYPH_SIZE); if (glyph_size_bytes) { uint8_t *target; - PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "GD read: cp: %"PRIx32", res_bank: %"PRIu32", res_id: %"PRIu32", " - "offset: %"PRIx32", bytes: %zu", - codepoint, font_res->app_num, font_res->resource_id, bitmap_addr, glyph_size_bytes); + PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, + "GD read: cp: %" PRIx32 ", res_bank: %" PRIu32 ", res_id: %" PRIu32 + ", " + "offset: %" PRIx32 ", bytes: %zu", + codepoint, font_res->app_num, font_res->resource_id, bitmap_addr, + glyph_size_bytes); if (HAS_FEATURE(font_res->md.version, VERSION_FIELD_FEATURE_RLE4)) { // Load the glyph data at the end of the buffer target = &((uint8_t *)g->data)[CACHE_GLYPH_SIZE - glyph_size_bytes]; @@ -334,8 +331,8 @@ static bool prv_load_glyph_bitmap(Codepoint codepoint, const FontResource *font_ bitmap_addr, target, glyph_size_bytes); SYS_PROFILER_NODE_STOP(text_render_flash); if (glyph_size_bytes && !num_bytes_loaded) { - PBL_LOG_WRN("Failed to load glyph bitmap from resources; cp: %"PRIx32", addr: %"PRIx32, - codepoint, bitmap_addr); + PBL_LOG_WRN("Failed to load glyph bitmap from resources; cp: %" PRIx32 ", addr: %" PRIx32, + codepoint, bitmap_addr); return false; } @@ -363,8 +360,7 @@ static ALWAYS_INLINE const GlyphData *prv_get_glyph_metadata_from_spi(Codepoint if (font_cache->glyph_buffer_key == cache_key) { cached = (LineCacheData *)(font_cache->glyph_buffer); } - PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "looking up cp: %"PRIx32", key:%"PRIx32, - codepoint, cache_key); + PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "looking up cp: %" PRIx32 ", key:%" PRIx32, codepoint, cache_key); // If the glyph_buffer doesn't match this glyph, or we have bitmap caching, check the // keyed_circular_cache for this glyph. @@ -387,8 +383,7 @@ static ALWAYS_INLINE const GlyphData *prv_get_glyph_metadata_from_spi(Codepoint // missing character return NULL; } - if (need_bitmap && - !cached->is_bitmap_loaded && + if (need_bitmap && !cached->is_bitmap_loaded && !prv_load_glyph_bitmap(codepoint, font_res, cached)) { return NULL; } @@ -402,7 +397,7 @@ static ALWAYS_INLINE const GlyphData *prv_get_glyph_metadata_from_spi(Codepoint GlyphData *g = &data->glyph_data; if (data->resource_offset == 0) { - PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "offset for cp: %"PRIx32" is NULL", codepoint); + PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "offset for cp: %" PRIx32 " is NULL", codepoint); // Put the missing character into our cache so we don't waste time looking for it again keyed_circular_cache_push(&font_cache->line_cache, cache_key, data); return NULL; @@ -411,30 +406,30 @@ static ALWAYS_INLINE const GlyphData *prv_get_glyph_metadata_from_spi(Codepoint size_t num_bytes_loaded; if (FONT_VERSION(font_res->md.version) == FONT_VERSION_1) { GlyphHeaderDataV1 header; - PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "LGMD READ: offset: %"PRIx32", bytes: %zu", - data->resource_offset, sizeof(header)); + PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "LGMD READ: offset: %" PRIx32 ", bytes: %zu", + data->resource_offset, sizeof(header)); SYS_PROFILER_NODE_START(text_render_flash); - num_bytes_loaded = sys_resource_load_range(font_res->app_num, font_res->resource_id, - data->resource_offset, (uint8_t *)&header, - sizeof(header)); + num_bytes_loaded = + sys_resource_load_range(font_res->app_num, font_res->resource_id, data->resource_offset, + (uint8_t *)&header, sizeof(header)); SYS_PROFILER_NODE_STOP(text_render_flash); // convert to a GlyphHeaderData struct memcpy(&g->header, &header, sizeof(GlyphHeaderData)); g->header.horiz_advance = header.horiz_advance; } else { - PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "GMD read: cp: %"PRIx32", offset: %"PRId32", bytes: %zu", codepoint, - data->resource_offset, sizeof(GlyphHeaderData)); + PBL_LOG_D_DBG(LOG_DOMAIN_TEXT, "GMD read: cp: %" PRIx32 ", offset: %" PRId32 ", bytes: %zu", + codepoint, data->resource_offset, sizeof(GlyphHeaderData)); SYS_PROFILER_NODE_START(text_render_flash); - num_bytes_loaded = sys_resource_load_range(font_res->app_num, font_res->resource_id, - data->resource_offset, (uint8_t *)&g->header, - sizeof(GlyphHeaderData)); + num_bytes_loaded = + sys_resource_load_range(font_res->app_num, font_res->resource_id, data->resource_offset, + (uint8_t *)&g->header, sizeof(GlyphHeaderData)); SYS_PROFILER_NODE_STOP(text_render_flash); } if (!num_bytes_loaded) { - PBL_LOG_WRN("Failed to load glyph metadata from resources; cp: %"PRIx32", offset: %"PRIx32, - codepoint, data->resource_offset); + PBL_LOG_WRN("Failed to load glyph metadata from resources; cp: %" PRIx32 ", offset: %" PRIx32, + codepoint, data->resource_offset); return NULL; } @@ -447,8 +442,7 @@ static ALWAYS_INLINE const GlyphData *prv_get_glyph_metadata_from_spi(Codepoint LineCacheData *final_data = (LineCacheData *)(font_cache->glyph_buffer); - if (need_bitmap && - !prv_load_glyph_bitmap(codepoint, font_res, final_data)) { + if (need_bitmap && !prv_load_glyph_bitmap(codepoint, font_res, final_data)) { return NULL; } @@ -480,7 +474,7 @@ static bool prv_load_font_res(ResAppNum app_num, uint32_t resource_id, FontResou if (resource_id != RESOURCE_ID_FONT_FALLBACK_INTERNAL && !sys_resource_is_valid(app_num, resource_id)) { if (!is_extended) { - PBL_LOG_WRN("Invalid text resource id %"PRId32, resource_id); + PBL_LOG_WRN("Invalid text resource id %" PRId32, resource_id); } return false; } @@ -493,12 +487,11 @@ static bool prv_load_font_res(ResAppNum app_num, uint32_t resource_id, FontResou FontMetaDataV3 header; SYS_PROFILER_NODE_START(text_render_flash); - uint32_t bytes_read = sys_resource_load_range(app_num, resource_id, 0, - (uint8_t*)&header, sizeof(FontMetaDataV3)); + uint32_t bytes_read = + sys_resource_load_range(app_num, resource_id, 0, (uint8_t *)&header, sizeof(FontMetaDataV3)); SYS_PROFILER_NODE_STOP(text_render_flash); if (bytes_read != sizeof(FontMetaDataV3)) { - PBL_LOG_ERR("Tried to load resource too small to have metadata for res %"PRId32, - resource_id); + PBL_LOG_ERR("Tried to load resource too small to have metadata for res %" PRId32, resource_id); return false; } @@ -527,7 +520,7 @@ static bool prv_load_font_res(ResAppNum app_num, uint32_t resource_id, FontResou } break; default: - PBL_LOG_ERR("Unknown font resource version %"PRIu8, header.version); + PBL_LOG_ERR("Unknown font resource version %" PRIu8, header.version); return false; } @@ -542,14 +535,11 @@ static const FontResource *prv_font_res_for_codepoint(Codepoint codepoint, const FontInfo *owner = font_info; const FontResource *font_res = &font_info->base; - if (!codepoint_is_latin(codepoint) && - !codepoint_is_emoji(codepoint) && - !codepoint_is_special(codepoint) && - font_info->extended) { + if (!codepoint_is_latin(codepoint) && !codepoint_is_emoji(codepoint) && + !codepoint_is_special(codepoint) && font_info->extended) { // Latin & emoji codepoints are in base, others are in extension font_res = &font_info->extension; - } else if (codepoint_is_emoji(codepoint) && - font_info->base.app_num == SYSTEM_APP) { + } else if (codepoint_is_emoji(codepoint) && font_info->base.app_num == SYSTEM_APP) { // Size against the base: that is the baseline emoji glyphs get aligned to when drawn FontInfo *emoji_font = fonts_get_system_emoji_font_for_size(font_info->base.md.max_height); if (emoji_font) { @@ -572,8 +562,8 @@ static void prv_resource_changed_callback(void *data) { /////////////////////////// // Public API -bool text_resources_init_font(ResAppNum app_num, uint32_t font_resource, - uint32_t extended_resource, FontInfo *font_info) { +bool text_resources_init_font(ResAppNum app_num, uint32_t font_resource, uint32_t extended_resource, + FontInfo *font_info) { // load the base of the font or bail if (!font_resource || !prv_load_font_res(app_num, font_resource, &font_info->base, false /* is_extended */)) { @@ -585,8 +575,8 @@ bool text_resources_init_font(ResAppNum app_num, uint32_t font_resource, // and create a syscall for resource_watch PBL_ASSERTN(app_num == SYSTEM_APP); if (font_info->extension_changed_cb == NULL) { - font_info->extension_changed_cb = resource_watch(app_num, extended_resource, - prv_resource_changed_callback, font_info); + font_info->extension_changed_cb = + resource_watch(app_num, extended_resource, prv_resource_changed_callback, font_info); } font_info->extended = prv_load_font_res(app_num, extended_resource, &font_info->extension, true /* is_extended */); @@ -610,14 +600,14 @@ static const GlyphData *prv_get_glyph_in_font(FontCache *font_cache, Codepoint c const FontInfo *owner = font_info; const FontResource *font_res = prv_font_res_for_codepoint(codepoint, font_info, &owner); prv_check_font_cache(font_cache, font_res); - const GlyphData *data = prv_get_glyph_metadata_from_spi(codepoint, font_cache, font_res, - need_bitmap); + const GlyphData *data = + prv_get_glyph_metadata_from_spi(codepoint, font_cache, font_res, need_bitmap); // Routed resource missed: try the font's other own resource. Classification is a lookup-order // hint, not a hard partition. Skipped when the emoji font took over. if (!data && owner == font_info) { const FontResource *other = (font_res == &font_info->base) - ? (font_info->extended ? &font_info->extension : NULL) - : &font_info->base; + ? (font_info->extended ? &font_info->extension : NULL) + : &font_info->base; if (other) { prv_check_font_cache(font_cache, other); data = prv_get_glyph_metadata_from_spi(codepoint, font_cache, other, need_bitmap); @@ -652,8 +642,8 @@ static const GlyphData *prv_get_glyph(FontCache *font_cache, Codepoint codepoint const FontInfo *owner = NULL; // (a) Requested codepoint in the primary font. - const GlyphData *data = prv_get_glyph_in_font(font_cache, codepoint, font_info, need_bitmap, - &owner); + const GlyphData *data = + prv_get_glyph_in_font(font_cache, codepoint, font_info, need_bitmap, &owner); if (data) { if (baseline_adjust_out) { *baseline_adjust_out = prv_baseline_adjust(font_info, owner); @@ -688,7 +678,7 @@ static const GlyphData *prv_get_glyph(FontCache *font_cache, Codepoint codepoint // space. We use the wildcard codepoint from the base font in case the extension pack has // been deleted. The fallback font's own wildcard is deliberately never used: a single // missing-glyph box is the correct indicator. - const Codepoint substitutes[] = { font_info->base.md.wildcard_codepoint, ' ' }; + const Codepoint substitutes[] = {font_info->base.md.wildcard_codepoint, ' '}; for (unsigned int i = 0; i < ARRAY_LENGTH(substitutes); i++) { data = prv_get_glyph_in_font(font_cache, substitutes[i], font_info, need_bitmap, &owner); if (data) { @@ -705,8 +695,8 @@ static const GlyphData *prv_get_glyph(FontCache *font_cache, Codepoint codepoint int8_t text_resources_get_glyph_horiz_advance(FontCache *font_cache, const Codepoint codepoint, FontInfo *font_info) { // Metadata only: measuring must not pay the deep bitmap load; render pre-loads it in walk_line(). - const GlyphData *g = prv_get_glyph(font_cache, codepoint, font_info, false /* need_bitmap */, - NULL); + const GlyphData *g = + prv_get_glyph(font_cache, codepoint, font_info, false /* need_bitmap */, NULL); if (!g) { return 0; } diff --git a/src/fw/applib/graphics/text_resources.h b/src/fw/applib/graphics/text_resources.h index 2bbbb1aad2..ffea7c53bb 100644 --- a/src/fw/applib/graphics/text_resources.h +++ b/src/fw/applib/graphics/text_resources.h @@ -56,7 +56,7 @@ typedef struct __attribute__((__packed__)) { } OffsetTableEntry_4_2; #if !defined(MAX_FONT_GLYPH_SIZE) - #define MAX_FONT_GLYPH_SIZE 256 +#define MAX_FONT_GLYPH_SIZE 256 #endif // Slightly bigger than the biggest glyph we have @@ -129,4 +129,3 @@ int8_t text_resources_get_glyph_horiz_advance(FontCache *font_cache, Codepoint c //! @param font_info a pointer to the fontinfo struct to initialize bool text_resources_init_font(ResAppNum app_num, uint32_t font_resource, uint32_t extension_resource, FontInfo *font_info); - diff --git a/src/fw/applib/graphics/utf8.c b/src/fw/applib/graphics/utf8.c index 7fc09ffdcd..0170e08011 100644 --- a/src/fw/applib/graphics/utf8.c +++ b/src/fw/applib/graphics/utf8.c @@ -13,17 +13,17 @@ //////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2008-2009 Bjoern Hoehrmann -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -35,32 +35,382 @@ static const unsigned int VALID_UTF8 = 0; static const uint8_t utf8d[] = { - // The first part of the table maps bytes to character classes that - // to reduce the size of the transition table and create bitmasks. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, - 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, - - // The second part is a transition table that maps a combination - // of a state of the automaton and a character class to a state. - 0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,12,12, - 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12, - 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12, - 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12, - 12,36,12,12,12,12,12,12,12,12,12,12, + // The first part of the table maps bytes to character classes that + // to reduce the size of the transition table and create bitmasks. + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 8, + 8, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 10, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 3, + 3, + 11, + 6, + 6, + 6, + 5, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + 8, + + // The second part is a transition table that maps a combination + // of a state of the automaton and a character class to a state. + 0, + 12, + 24, + 36, + 60, + 96, + 84, + 12, + 12, + 12, + 48, + 72, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 0, + 12, + 12, + 12, + 12, + 12, + 0, + 12, + 0, + 12, + 12, + 12, + 24, + 12, + 12, + 12, + 12, + 12, + 24, + 12, + 24, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 24, + 12, + 12, + 12, + 12, + 12, + 24, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 24, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 36, + 12, + 36, + 12, + 12, + 12, + 36, + 12, + 12, + 12, + 12, + 12, + 36, + 12, + 36, + 12, + 12, + 12, + 36, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 12, }; static uint32_t utf8_decode(uint8_t *state, uint32_t *codepoint, uint32_t byte) { uint32_t type = utf8d[byte]; - *codepoint = (*state != VALID_UTF8) ? - (byte & 0x3fu) | (*codepoint << 6) : - (0xff >> type) & (byte); + *codepoint = + (*state != VALID_UTF8) ? (byte & 0x3fu) | (*codepoint << 6) : (0xff >> type) & (byte); *state = utf8d[256 + *state + type]; return *state; @@ -74,7 +424,7 @@ void utf8_print_code_points(utf8_t *s) { for (; *s; ++s) { if (!utf8_decode(&state, &codepoint, *s)) { - PBL_LOG_ALWAYS("U+%04"PRIX32, codepoint); + PBL_LOG_ALWAYS("U+%04" PRIX32, codepoint); } } @@ -83,9 +433,6 @@ void utf8_print_code_points(utf8_t *s) { } } - - - //////////////////////////////////////////////////////////// // Private API @@ -153,10 +500,10 @@ utf8_t *utf8_get_previous(utf8_t *start, utf8_t *stream) { //! Return NULL if not successful in decoding text utf8_t *utf8_get_end(const char *text) { if (text == NULL) { - return (utf8_t *) text; + return (utf8_t *)text; } - uint8_t *stream = (uint8_t *) text; + uint8_t *stream = (uint8_t *)text; uint32_t codepoint = 0; uint8_t state = 0; @@ -170,17 +517,16 @@ utf8_t *utf8_get_end(const char *text) { return NULL; } - return (utf8_t *) stream; + return (utf8_t *)stream; } - bool utf8_is_valid_string(const char *char_stream) { return (utf8_get_end(char_stream) != NULL); } -Utf8Bounds utf8_get_bounds(bool *const success, char const *text) { +Utf8Bounds utf8_get_bounds(bool *const success, char const *text) { Utf8Bounds bounds; - bounds.start = (utf8_t *) text; + bounds.start = (utf8_t *)text; bounds.end = bounds.start; utf8_t *end = utf8_get_end(text); @@ -196,7 +542,7 @@ Utf8Bounds utf8_get_bounds(bool *const success, char const *text) { } bool utf8_bounds_init(Utf8Bounds *bounds, const char *text) { - bounds->start = (utf8_t *) text; + bounds->start = (utf8_t *)text; bounds->end = bounds->start; utf8_t *end = utf8_get_end(text); @@ -210,10 +556,10 @@ bool utf8_bounds_init(Utf8Bounds *bounds, const char *text) { } bool utf8_iter_next(IteratorState state) { - Utf8IterState *utf8_iter_state = (Utf8IterState *) state; + Utf8IterState *utf8_iter_state = (Utf8IterState *)state; PBL_ASSERTN(utf8_iter_state); - utf8_iter_state->codepoint = 0; // Invalidate the cached codepoint + utf8_iter_state->codepoint = 0; // Invalidate the cached codepoint if (utf8_iter_state->current >= utf8_iter_state->bounds->end) { return false; @@ -229,12 +575,13 @@ bool utf8_iter_next(IteratorState state) { return false; } - utf8_iter_state->codepoint = utf8_peek_codepoint(utf8_iter_state->current, &utf8_iter_state->next); + utf8_iter_state->codepoint = + utf8_peek_codepoint(utf8_iter_state->current, &utf8_iter_state->next); return true; } bool utf8_iter_prev(IteratorState state) { - Utf8IterState *utf8_iter_state = (Utf8IterState *) state; + Utf8IterState *utf8_iter_state = (Utf8IterState *)state; PBL_ASSERTN(utf8_iter_state); utf8_iter_state->codepoint = 0; @@ -243,14 +590,15 @@ bool utf8_iter_prev(IteratorState state) { return false; } - utf8_iter_state->current = utf8_get_previous(utf8_iter_state->bounds->start, - utf8_iter_state->current); - utf8_iter_state->codepoint = utf8_peek_codepoint(utf8_iter_state->current, &utf8_iter_state->next); + utf8_iter_state->current = + utf8_get_previous(utf8_iter_state->bounds->start, utf8_iter_state->current); + utf8_iter_state->codepoint = + utf8_peek_codepoint(utf8_iter_state->current, &utf8_iter_state->next); return true; - } -void utf8_iter_init(Iterator *utf8_iter, Utf8IterState *utf8_iter_state, Utf8Bounds const *bounds, utf8_t *start) { +void utf8_iter_init(Iterator *utf8_iter, Utf8IterState *utf8_iter_state, Utf8Bounds const *bounds, + utf8_t *start) { PBL_ASSERTN(utf8_iter_state); PBL_ASSERTN(bounds); @@ -260,7 +608,8 @@ void utf8_iter_init(Iterator *utf8_iter, Utf8IterState *utf8_iter_state, Utf8Bou utf8_iter_state->current = start; utf8_iter_state->codepoint = utf8_peek_codepoint(start, &utf8_iter_state->next); - iter_init(utf8_iter, (IteratorCallback) utf8_iter_next, utf8_iter_prev, (IteratorState) utf8_iter_state); + iter_init(utf8_iter, (IteratorCallback)utf8_iter_next, utf8_iter_prev, + (IteratorState)utf8_iter_state); } size_t utf8_encode_codepoint(Codepoint codepoint, utf8_t *dest) { @@ -283,7 +632,7 @@ size_t utf8_encode_codepoint(Codepoint codepoint, utf8_t *dest) { dest[3] = (utf8_t)(0x80 | (codepoint & 0x3F)); return 4; } - return 0; // Invalid codepoint + return 0; // Invalid codepoint } size_t utf8_copy_character(utf8_t *dest, utf8_t *origin, size_t length) { @@ -359,8 +708,8 @@ bool utf8_each_codepoint(const char *str, Utf8EachCodepoint callback, void *cont utf8_iter_init(&utf8_iter, &utf8_iter_state, &utf8_bounds, utf8_bounds.start); int i = 0; - while (utf8_iter_state.codepoint && - callback(i++, utf8_iter_state.codepoint, context) && - iter_next(&utf8_iter)) {} + while (utf8_iter_state.codepoint && callback(i++, utf8_iter_state.codepoint, context) && + iter_next(&utf8_iter)) { + } return true; } diff --git a/src/fw/applib/graphics/utf8.h b/src/fw/applib/graphics/utf8.h index b1b162d2b4..f31b365ce8 100644 --- a/src/fw/applib/graphics/utf8.h +++ b/src/fw/applib/graphics/utf8.h @@ -71,19 +71,20 @@ size_t utf8_truncate_with_ellipsis(const char *in_string, char *out_buffer, size typedef struct { utf8_t *start; - utf8_t *end; //= last_minute) && - (end <= now_utc)); + const bool within_last_minute = ((start <= end) && (start >= last_minute) && (end <= now_utc)); return within_last_minute; } @@ -64,7 +61,7 @@ static HealthAggregation prv_default_aggregation(HealthMetric metric) { } // ---------------------------------------------------------------------------------------------- -static HealthServiceState* prv_get_state(bool ensure_cache_initialized) { +static HealthServiceState *prv_get_state(bool ensure_cache_initialized) { PebbleTask task = pebble_task_get_current(); HealthServiceState *result = NULL; @@ -164,8 +161,7 @@ static bool prv_metric_aggregation_implemented(HealthMetric metric, time_t time_ switch (agg) { case HealthAggregationSum: return false; - case HealthAggregationAvg: - { + case HealthAggregationAvg: { // We used to unconditionally return true here which was a bug // Fixing this bug broke some apps / watchfaces Version legacy_version = {.major = 0x5, .minor = 0x54}; @@ -179,8 +175,8 @@ static bool prv_metric_aggregation_implemented(HealthMetric metric, time_t time_ case HealthAggregationMin: { // Only supported using minute data (short time range, no scope) because // we only store a few hours of HR minute data. - return (scope == HealthServiceTimeScopeOnce) - && ((now_utc - time_start) <= HS_MAX_MINUTE_DATA_SEC); + return (scope == HealthServiceTimeScopeOnce) && + ((now_utc - time_start) <= HS_MAX_MINUTE_DATA_SEC); } } break; @@ -203,8 +199,8 @@ static bool prv_get_metric_daily_history(HealthServiceState *state, HealthMetric } // Read in the metric history - if (!sys_activity_get_metric(prv_get_activity_metric(metric), - ARRAY_LENGTH(daily->totals), daily->totals)) { + if (!sys_activity_get_metric(prv_get_activity_metric(metric), ARRAY_LENGTH(daily->totals), + daily->totals)) { PBL_LOG_ERR("Error fetching metric data"); return false; } @@ -236,9 +232,9 @@ static bool prv_get_metric_stats(HealthServiceState *state, HealthMetric metric, struct tm *local_tm = pbl_override_localtime(&now_utc); // Compute weekly, weekday, and daily stats - *stats = (HealthServiceMetricStats) {}; - const StatsBasicOp op = (StatsBasicOp_Sum | StatsBasicOp_Average | StatsBasicOp_Count - | StatsBasicOp_Min | StatsBasicOp_Max); + *stats = (HealthServiceMetricStats){}; + const StatsBasicOp op = (StatsBasicOp_Sum | StatsBasicOp_Average | StatsBasicOp_Count | + StatsBasicOp_Min | StatsBasicOp_Max); stats_calculate_basic(op, daily_totals.totals, ARRAY_LENGTH(daily_totals.totals), health_service_private_weekday_filter, (void *)(uintptr_t)local_tm->tm_wday, &stats->weekday.sum); @@ -257,24 +253,23 @@ static bool prv_get_metric_stats(HealthServiceState *state, HealthMetric metric, // If the average is 0 (this can happen if we don't have any history), set the averages based // on today's total so far time_t seconds_today = now_utc - sys_time_start_of_today(); - HealthValue per_day_default = (daily_totals.totals[0] * SECONDS_PER_DAY) - / MAX(1, seconds_today); + HealthValue per_day_default = (daily_totals.totals[0] * SECONDS_PER_DAY) / MAX(1, seconds_today); if (stats->weekday.sum == 0) { - stats->weekday = (HealthServiceStats) { - .sum = per_day_default, - .avg = per_day_default, - .min = per_day_default, - .max = per_day_default, - .count = 1, + stats->weekday = (HealthServiceStats){ + .sum = per_day_default, + .avg = per_day_default, + .min = per_day_default, + .max = per_day_default, + .count = 1, }; } if (stats->weekend.sum == 0) { - stats->weekend = (HealthServiceStats) { - .sum = per_day_default, - .avg = per_day_default, - .min = per_day_default, - .max = per_day_default, - .count = 1, + stats->weekend = (HealthServiceStats){ + .sum = per_day_default, + .avg = per_day_default, + .min = per_day_default, + .max = per_day_default, + .count = 1, }; } @@ -291,11 +286,10 @@ static bool prv_get_metric_stats(HealthServiceState *state, HealthMetric metric, // ---------------------------------------------------------------------------------------------- // Return intra-day averages for the given metric static bool prv_get_intraday_averages(HealthServiceState *state, HealthMetric metric, - ActivityMetricAverages *averages, - DayInWeek day_in_week) { + ActivityMetricAverages *averages, DayInWeek day_in_week) { // If the cache is valid, return cached data. - if (state->cache && (metric == HealthMetricStepCount) - && state->cache->step_averages_valid && (day_in_week == state->cache->step_averages_day)) { + if (state->cache && (metric == HealthMetricStepCount) && state->cache->step_averages_valid && + (day_in_week == state->cache->step_averages_day)) { memcpy(averages, &state->cache->step_averages, sizeof(*averages)); return true; } @@ -365,8 +359,8 @@ static HealthValue prv_sum_intraday_averages(ActivityMetricAverages *averages, t // Add up the metric averages for the passed in time range time_t chunk_start_time = time_start; const int k_seconds_per_step_avg = SECONDS_PER_DAY / ACTIVITY_NUM_METRIC_AVERAGES; - unsigned int second_idx = local_tm->tm_hour * SECONDS_PER_HOUR - + local_tm->tm_min * SECONDS_PER_MINUTE + local_tm->tm_sec; + unsigned int second_idx = local_tm->tm_hour * SECONDS_PER_HOUR + + local_tm->tm_min * SECONDS_PER_MINUTE + local_tm->tm_sec; unsigned int chunk_idx = second_idx / k_seconds_per_step_avg; HealthValue result = 0; @@ -420,8 +414,7 @@ T_STATIC bool prv_calculate_time_range(time_t time_start, time_t time_end, // never work with values in the future time_end = MIN(time_end, now); // never work with values older than the supported history of data - time_start = MAX(time_start, - midnight_after_now - (SECONDS_PER_DAY * ACTIVITY_HISTORY_DAYS)); + time_start = MAX(time_start, midnight_after_now - (SECONDS_PER_DAY * ACTIVITY_HISTORY_DAYS)); if (time_end < time_start) { return false; } @@ -430,9 +423,9 @@ T_STATIC bool prv_calculate_time_range(time_t time_start, time_t time_end, const time_t midnight_before_start = prv_get_midnight_of_local_time(time_start); const time_t midnight_before_end = prv_get_midnight_of_local_time(time_end); // we treat time_end as exclusive, if one passes exactly midnight, we don't count that day - const time_t midnight_after_end = (midnight_before_end == time_end) ? - midnight_before_end : - (midnight_before_end + SECONDS_PER_DAY); + const time_t midnight_after_end = (midnight_before_end == time_end) + ? midnight_before_end + : (midnight_before_end + SECONDS_PER_DAY); // no additional range changes (e.g. < 0 or >= ACTIVITY_HISTORY_DAYS needed due to checks above) range->last_day_idx = (midnight_after_now - midnight_after_end) / SECONDS_PER_DAY; @@ -445,14 +438,14 @@ T_STATIC bool prv_calculate_time_range(time_t time_start, time_t time_end, // if there's only one day, we return the number of seconds in the total range for both values const uint32_t seconds_first_day = SECONDS_PER_DAY - (time_start - midnight_before_start); // compensate for cases where time_end is on a day boundary - const uint32_t seconds_last_day = (time_end == midnight_before_end) ? - SECONDS_PER_DAY : (time_end - midnight_before_end); + const uint32_t seconds_last_day = + (time_end == midnight_before_end) ? SECONDS_PER_DAY : (time_end - midnight_before_end); const uint32_t total_seconds = time_end - time_start; range->seconds_first_day = (range->num_days == 1) ? total_seconds : seconds_first_day; range->seconds_last_day = (range->num_days == 1) ? total_seconds : seconds_last_day; range->seconds_total_last_day = - (range->last_day_idx == 0) ? (now - midnight_before_end) : SECONDS_PER_DAY; + (range->last_day_idx == 0) ? (now - midnight_before_end) : SECONDS_PER_DAY; } return true; @@ -462,8 +455,8 @@ T_STATIC bool prv_calculate_time_range(time_t time_start, time_t time_end, // Fill in the time_range and daily_history structures for this metric and time range. // Returns HealthServiceAccessibilityMaskAvailable if this time span and metric are accessible. static HealthServiceAccessibilityMask prv_get_range_and_daily_history( - HealthServiceState *state, HealthMetric metric, time_t time_start, time_t time_end, - HealthServiceTimeRange *time_range, HealthServiceDailyHistory *daily_history) { + HealthServiceState *state, HealthMetric metric, time_t time_start, time_t time_end, + HealthServiceTimeRange *time_range, HealthServiceDailyHistory *daily_history) { PBL_ASSERTN((time_range != NULL) && (daily_history != NULL)); // TODO: PBL-31628 permission system to reply with HealthServiceAccessibilityMaskNoPermission @@ -497,27 +490,27 @@ T_STATIC void prv_adjust_value_boundaries(HealthValue *values, size_t num_values // last day might not be complete, yet (as it can be today) values[0] = - (HealthValue)(((int64_t)values[0] * range->seconds_last_day) / range->seconds_total_last_day); + (HealthValue)(((int64_t)values[0] * range->seconds_last_day) / range->seconds_total_last_day); // only process first day if its in range and does not overlap with the last day if ((range->num_days > 1) && (num_values >= range->num_days)) { const uint32_t oldest_day_idx = range->num_days - 1; values[oldest_day_idx] = - (HealthValue)(((int64_t)values[oldest_day_idx] * range->seconds_first_day) / SECONDS_PER_DAY); + (HealthValue)(((int64_t)values[oldest_day_idx] * range->seconds_first_day) / + SECONDS_PER_DAY); } } - // ---------------------------------------------------------------------------------------------- -static HealthValue prv_compute_aggregate_using_daily_totals( - HealthServiceState *state, HealthMetric metric, time_t time_start, time_t time_end, - HealthAggregation aggregation) { +static HealthValue prv_compute_aggregate_using_daily_totals(HealthServiceState *state, + HealthMetric metric, time_t time_start, + time_t time_end, + HealthAggregation aggregation) { HealthServiceTimeRange time_range = {}; HealthServiceDailyHistory daily_history = {}; - const HealthServiceAccessibilityMask accessible = - prv_get_range_and_daily_history(state, metric, time_start, time_end, &time_range, - &daily_history); + const HealthServiceAccessibilityMask accessible = prv_get_range_and_daily_history( + state, metric, time_start, time_end, &time_range, &daily_history); if (accessible != HealthServiceAccessibilityMaskAvailable) { return 0; } @@ -558,13 +551,12 @@ static HealthValue prv_compute_aggregate_using_daily_totals( return result; } - // ---------------------------------------------------------------------------------------------- // Compute the value of the given metric using aggregation and averaging based on daily history // values. static HealthValue prv_compute_aggregate_averaged_using_daily_totals( - HealthServiceState *state, HealthMetric metric, time_t time_start, time_t time_end, - HealthAggregation aggregation, HealthServiceTimeScope scope) { + HealthServiceState *state, HealthMetric metric, time_t time_start, time_t time_end, + HealthAggregation aggregation, HealthServiceTimeScope scope) { PBL_ASSERTN(scope != HealthServiceTimeScopeOnce); // What day of the week is the scope for? For now, we will use the day of the week that @@ -593,7 +585,7 @@ static HealthValue prv_compute_aggregate_averaged_using_daily_totals( } else if (scope == HealthServiceTimeScopeWeekly) { which_stats = &stats.weekly; } else { - APP_LOG(APP_LOG_LEVEL_ERROR, "Unsupported scope: %d", (int) scope); + APP_LOG(APP_LOG_LEVEL_ERROR, "Unsupported scope: %d", (int)scope); result = 0; } @@ -624,9 +616,10 @@ static HealthValue prv_compute_aggregate_averaged_using_daily_totals( // ---------------------------------------------------------------------------------------------- // Compute the aggregated value of the given metric using values from minute history -static HealthValue prv_compute_aggregate_using_minute_history( - HealthServiceState *state, HealthMetric metric, time_t time_start, time_t time_end, - HealthAggregation aggregation) { +static HealthValue prv_compute_aggregate_using_minute_history(HealthServiceState *state, + HealthMetric metric, + time_t time_start, time_t time_end, + HealthAggregation aggregation) { // Currently only implemented for heart rate BPM PBL_ASSERTN(metric == HealthMetricHeartRateBPM); @@ -640,7 +633,7 @@ static HealthValue prv_compute_aggregate_using_minute_history( uint32_t num_samples = 0; switch (aggregation) { case HealthAggregationSum: - WTF; // Not supported + WTF; // Not supported break; case HealthAggregationAvg: value = 0; @@ -668,15 +661,14 @@ static HealthValue prv_compute_aggregate_using_minute_history( bool more_data = true; while (more_data && (time_start < time_end)) { uint32_t num_records = ARRAY_LENGTH(state->cache->minute_data); - PBL_LOG_DBG("Fetching %"PRIu32" minute records for %d to %d...", num_records, - (int)time_start, (int)time_end); + PBL_LOG_DBG("Fetching %" PRIu32 " minute records for %d to %d...", num_records, (int)time_start, + (int)time_end); bool success = sys_activity_get_minute_history(minute_data, &num_records, &time_start); if (!success) { APP_LOG(APP_LOG_LEVEL_WARNING, "Error fetching minute history"); break; } - PBL_LOG_DBG(" Got %"PRIu32" minute records for %d", num_records, - (int)time_start); + PBL_LOG_DBG(" Got %" PRIu32 " minute records for %d", num_records, (int)time_start); if (num_records == 0) { // No more data available more_data = false; @@ -795,7 +787,7 @@ T_STATIC void prv_health_event_handler(PebbleEvent *e, void *context) { prv_check_and_generate_metric_alert(state, HealthMetricHeartRateBPM, &state->cache->alert_threshold_heart_rate); } -#endif // !defined(CONFIG_RECOVERY_FW) +#endif // !defined(CONFIG_RECOVERY_FW) } // ---------------------------------------------------------------------------------------------- @@ -804,20 +796,22 @@ T_STATIC bool prv_activity_session_matches(const ActivitySession *session, Healt PBL_ASSERTN(session); const bool type_matches = - (session->type == ActivitySessionType_Sleep && ((mask & HealthActivitySleep) > 0)) - || (session->type == ActivitySessionType_Nap && ((mask & HealthActivitySleep) > 0)) - || (session->type == ActivitySessionType_RestfulSleep && ((mask & HealthActivityRestfulSleep) > 0)) - || (session->type == ActivitySessionType_RestfulNap && ((mask & HealthActivityRestfulSleep) > 0)) - || (session->type == ActivitySessionType_Walk && ((mask & HealthActivityWalk) > 0)) - || (session->type == ActivitySessionType_Run && ((mask & HealthActivityRun) > 0)) - || (session->type == ActivitySessionType_Open && ((mask & HealthActivityOpenWorkout) > 0)); + (session->type == ActivitySessionType_Sleep && ((mask & HealthActivitySleep) > 0)) || + (session->type == ActivitySessionType_Nap && ((mask & HealthActivitySleep) > 0)) || + (session->type == ActivitySessionType_RestfulSleep && + ((mask & HealthActivityRestfulSleep) > 0)) || + (session->type == ActivitySessionType_RestfulNap && + ((mask & HealthActivityRestfulSleep) > 0)) || + (session->type == ActivitySessionType_Walk && ((mask & HealthActivityWalk) > 0)) || + (session->type == ActivitySessionType_Run && ((mask & HealthActivityRun) > 0)) || + (session->type == ActivitySessionType_Open && ((mask & HealthActivityOpenWorkout) > 0)); if (!type_matches) { return false; } unsigned int length_sec = session->length_min * SECONDS_PER_MINUTE; - const bool time_matches = session->start_utc < time_end && - (time_t)(session->start_utc + length_sec) > time_start; + const bool time_matches = + session->start_utc < time_end && (time_t)(session->start_utc + length_sec) > time_start; return time_matches; } @@ -829,8 +823,8 @@ T_STATIC int64_t prv_session_compare(const ActivitySession *a, const ActivitySes switch (direction) { case HealthIterationDirectionPast: // sessions that end later come first - return (b->start_utc + (b->length_min * SECONDS_PER_MINUTE)) - - (a->start_utc + (a->length_min * SECONDS_PER_MINUTE)); + return (b->start_utc + (b->length_min * SECONDS_PER_MINUTE)) - + (a->start_utc + (a->length_min * SECONDS_PER_MINUTE)); case HealthIterationDirectionFuture: // sessions that start earlier come first return a->start_utc - b->start_utc; @@ -867,7 +861,6 @@ static MeasurementSystem prv_get_shell_prefs_metric_for_distance(void) { } } - // ---------------------------------------------------------------------------------------------- // Filter callbacks used by stats_calculate_basic() bool health_service_private_non_zero_filter(int index, int32_t value, void *context) { @@ -877,23 +870,21 @@ bool health_service_private_non_zero_filter(int index, int32_t value, void *cont bool health_service_private_weekday_filter(int index, int32_t value, void *tm_weekday_ref) { const int tm_weekday = (int)(uintptr_t)tm_weekday_ref; return (health_service_private_non_zero_filter(index, value, NULL) && - IS_WEEKDAY(positive_modulo(tm_weekday - index, DAYS_PER_WEEK))); + IS_WEEKDAY(positive_modulo(tm_weekday - index, DAYS_PER_WEEK))); } bool health_service_private_weekend_filter(int index, int32_t value, void *tm_weekday_ref) { const int tm_weekday = (int)(uintptr_t)tm_weekday_ref; return (health_service_private_non_zero_filter(index, value, NULL) && - IS_WEEKEND(positive_modulo(tm_weekday - index, DAYS_PER_WEEK))); + IS_WEEKEND(positive_modulo(tm_weekday - index, DAYS_PER_WEEK))); } bool health_service_private_weekly_filter(int index, int32_t value, void *tm_weekday_ref) { const int tm_weekday = (int)(uintptr_t)tm_weekday_ref; return (health_service_private_non_zero_filter(index, value, NULL) && - (positive_modulo(tm_weekday - index, DAYS_PER_WEEK) == 0)); + (positive_modulo(tm_weekday - index, DAYS_PER_WEEK) == 0)); } - - // ---------------------------------------------------------------------------------------------- bool health_service_private_get_metric_history(HealthMetric metric, uint32_t history_len, int32_t *history) { @@ -905,31 +896,30 @@ bool health_service_private_get_metric_history(HealthMetric metric, uint32_t his } // ---------------------------------------------------------------------------------------------- -HealthServiceAccessibilityMask health_service_metric_accessible( - HealthMetric metric, time_t time_start, time_t time_end) { +HealthServiceAccessibilityMask health_service_metric_accessible(HealthMetric metric, + time_t time_start, + time_t time_end) { if (!sys_activity_is_initialized()) { return HealthServiceAccessibilityMaskNotAvailable; } - return health_service_metric_aggregate_averaged_accessible(metric, time_start, time_end, - prv_default_aggregation(metric), - HealthServiceTimeScopeOnce); + return health_service_metric_aggregate_averaged_accessible( + metric, time_start, time_end, prv_default_aggregation(metric), HealthServiceTimeScopeOnce); } // ---------------------------------------------------------------------------------------------- HealthServiceAccessibilityMask health_service_metric_averaged_accessible( - HealthMetric metric, time_t time_start, time_t time_end, HealthServiceTimeScope scope) { + HealthMetric metric, time_t time_start, time_t time_end, HealthServiceTimeScope scope) { if (!sys_activity_is_initialized()) { return HealthServiceAccessibilityMaskNotAvailable; } - return health_service_metric_aggregate_averaged_accessible(metric, time_start, time_end, - prv_default_aggregation(metric), - scope); + return health_service_metric_aggregate_averaged_accessible( + metric, time_start, time_end, prv_default_aggregation(metric), scope); } // ---------------------------------------------------------------------------------------------- HealthServiceAccessibilityMask health_service_metric_aggregate_averaged_accessible( - HealthMetric metric, time_t time_start, time_t time_end, HealthAggregation aggregation, - HealthServiceTimeScope scope) { + HealthMetric metric, time_t time_start, time_t time_end, HealthAggregation aggregation, + HealthServiceTimeScope scope) { if (!sys_activity_is_initialized()) { return HealthServiceAccessibilityMaskNotAvailable; } @@ -947,9 +937,8 @@ HealthServiceAccessibilityMask health_service_metric_aggregate_averaged_accessib HealthServiceTimeRange time_range = {}; HealthServiceDailyHistory daily_history = {}; - const HealthServiceAccessibilityMask accessible = - prv_get_range_and_daily_history(state, metric, time_start, time_end, &time_range, - &daily_history); + const HealthServiceAccessibilityMask accessible = prv_get_range_and_daily_history( + state, metric, time_start, time_end, &time_range, &daily_history); if (accessible != HealthServiceAccessibilityMaskAvailable) { return accessible; } @@ -963,7 +952,6 @@ HealthServiceAccessibilityMask health_service_metric_aggregate_averaged_accessib return HealthServiceAccessibilityMaskNotAvailable; } - // ---------------------------------------------------------------------------------------------- HealthValue health_service_sum_today(HealthMetric metric) { if (!sys_activity_is_initialized()) { @@ -974,7 +962,6 @@ HealthValue health_service_sum_today(HealthMetric metric) { return health_service_sum(metric, today_midnight, tomorrow_midnight); } - // ---------------------------------------------------------------------------------------------- HealthValue health_service_sum(HealthMetric metric, time_t time_start, time_t time_end) { if (!sys_activity_is_initialized()) { @@ -1005,7 +992,6 @@ HealthValue health_service_peek_current_value(HealthMetric metric) { HealthServiceTimeScopeOnce); } - static HealthValue prv_hr_aggregate_averaged(HealthServiceState *state, HealthMetric metric, time_t time_start, time_t time_end, HealthAggregation aggregation) { @@ -1069,8 +1055,8 @@ HealthValue health_service_aggregate_averaged(HealthMetric metric, time_t time_s // -------- // If asked for an averaged sum over less than a day, we can use the intraday averages - if ((scope != HealthServiceTimeScopeOnce) && (aggregation == HealthAggregationSum) - && ((time_end - time_start) < SECONDS_PER_DAY)) { + if ((scope != HealthServiceTimeScopeOnce) && (aggregation == HealthAggregationSum) && + ((time_end - time_start) < SECONDS_PER_DAY)) { // For now, we will use the day of the week that time_start falls on. In the future, we could // be better about blending weekday with weekend if the time range spans both struct tm *local_tm = pbl_override_localtime(&time_start); @@ -1085,8 +1071,8 @@ HealthValue health_service_aggregate_averaged(HealthMetric metric, time_t time_s num_sums++; } - } else if ((scope == HealthServiceTimeScopeDaily) - || (scope == HealthServiceTimeScopeDailyWeekdayOrWeekend)) { + } else if ((scope == HealthServiceTimeScopeDaily) || + (scope == HealthServiceTimeScopeDailyWeekdayOrWeekend)) { for (DayInWeek day = Sunday; day <= Saturday; day++) { if (scope == HealthServiceTimeScopeDailyWeekdayOrWeekend) { if (is_weekend != prv_is_weekend(day)) { @@ -1100,7 +1086,7 @@ HealthValue health_service_aggregate_averaged(HealthMetric metric, time_t time_s } } else { - APP_LOG(APP_LOG_LEVEL_ERROR, "Unsupported scope: %d", (int) scope); + APP_LOG(APP_LOG_LEVEL_ERROR, "Unsupported scope: %d", (int)scope); result = 0; } if (num_sums > 0) { @@ -1118,7 +1104,6 @@ HealthValue health_service_aggregate_averaged(HealthMetric metric, time_t time_s return prv_compute_aggregate_averaged_using_daily_totals(state, metric, time_start, time_end, aggregation, scope); } - } // ---------------------------------------------------------------------------------------------- @@ -1133,13 +1118,13 @@ bool health_service_events_subscribe(HealthEventHandler handler, void *context) // Post a "significant update" event PebbleEvent event = { - .type = PEBBLE_HEALTH_SERVICE_EVENT, - .health_event = { - .type = HealthEventSignificantUpdate, - .data.significant_update = { - .day_id = 0, + .type = PEBBLE_HEALTH_SERVICE_EVENT, + .health_event = { + .type = HealthEventSignificantUpdate, + .data.significant_update = { + .day_id = 0, + }, }, - }, }; sys_send_pebble_event_to_kernel(&event); @@ -1197,7 +1182,7 @@ bool health_service_cancel_metric_alert(HealthMetricAlert *alert) { switch (metric) { case HealthMetricHeartRateBPM: - state->cache->alert_threshold_heart_rate = (HealthServiceMetricAlertInfo) {}; + state->cache->alert_threshold_heart_rate = (HealthServiceMetricAlertInfo){}; return true; default: return false; @@ -1236,8 +1221,8 @@ static bool prv_update_hrm_subscription(HealthServiceState *state) { interval_sec = (hr_sec != 0) ? hr_sec : hrv_sec; } - HRMSessionRef hrm_session = sys_hrm_manager_app_subscribe(app_id, interval_sec, 0 /*expire_sec*/, - features); + HRMSessionRef hrm_session = + sys_hrm_manager_app_subscribe(app_id, interval_sec, 0 /*expire_sec*/, features); if (hrm_session == HRM_INVALID_SESSION_REF) { PBL_LOG_ERR("Error subscribing"); return false; @@ -1295,7 +1280,7 @@ uint16_t health_service_get_heart_rate_sample_period_expiration_sec(void) { } // Get the app id - AppInstallId app_id = app_get_app_id(); + AppInstallId app_id = app_get_app_id(); if (app_id == INSTALL_ID_INVALID) { return 0; } @@ -1330,7 +1315,7 @@ uint32_t health_service_get_minute_history(HealthMinuteData *minute_data, uint32 const time_t lower_bounded_start = (*time_start / SECONDS_PER_MINUTE) * SECONDS_PER_MINUTE; const time_t upper_bounded_end = *time_end + SECONDS_PER_MINUTE - 1; const uint32_t needed_partial_minutes = - (upper_bounded_end - lower_bounded_start) / SECONDS_PER_MINUTE; + (upper_bounded_end - lower_bounded_start) / SECONDS_PER_MINUTE; num_records = MIN(num_records, needed_partial_minutes); } @@ -1345,7 +1330,6 @@ uint32_t health_service_get_minute_history(HealthMinuteData *minute_data, uint32 return num_records; } - // ---------------------------------------------------------------------------------------------- HealthActivityMask health_service_peek_current_activities(void) { if (!sys_activity_is_initialized()) { @@ -1387,9 +1371,8 @@ HealthActivityMask health_service_peek_current_activities(void) { // to miss sessions. #define NUM_EVALUATED_SLEEP_SESSIONS 16 -void health_service_activities_iterate(HealthActivityMask activity_mask, - time_t time_start, time_t time_end, - HealthIterationDirection direction, +void health_service_activities_iterate(HealthActivityMask activity_mask, time_t time_start, + time_t time_end, HealthIterationDirection direction, HealthActivityIteratorCB callback, void *context) { if (!sys_activity_is_initialized()) { return; @@ -1413,8 +1396,7 @@ void health_service_activities_iterate(HealthActivityMask activity_mask, for (uint32_t idx = 0; idx < actual_num_sessions; idx++) { const ActivitySession *const session = &state->cache->sessions[idx]; - if (prv_activity_session_matches(session, activity_mask, - time_start, time_end)) { + if (prv_activity_session_matches(session, activity_mask, time_start, time_end)) { HealthActivity session_activity = HealthActivityNone; switch (session->type) { case ActivitySessionType_Sleep: @@ -1440,8 +1422,7 @@ void health_service_activities_iterate(HealthActivityMask activity_mask, break; } if (!callback(session_activity, session->start_utc, - session->start_utc + (session->length_min * SECONDS_PER_MINUTE), - context)) { + session->start_utc + (session->length_min * SECONDS_PER_MINUTE), context)) { // clients can interrupt the iteration at any time break; } @@ -1452,17 +1433,13 @@ void health_service_activities_iterate(HealthActivityMask activity_mask, // ---------------------------------------------------------------------------------------------- bool health_service_private_get_yesterdays_sleep_activity(HealthValue *enter_sec, HealthValue *exit_sec) { - return - sys_activity_get_metric(ActivityMetricSleepEnterAtSeconds, 1, enter_sec) & - sys_activity_get_metric(ActivityMetricSleepExitAtSeconds, 1, exit_sec); + return sys_activity_get_metric(ActivityMetricSleepEnterAtSeconds, 1, enter_sec) & + sys_activity_get_metric(ActivityMetricSleepExitAtSeconds, 1, exit_sec); } - - // ---------------------------------------------------------------------------------------------- HealthServiceAccessibilityMask health_service_any_activity_accessible( - HealthActivityMask activity_mask, - time_t start_time, time_t end_time) { + HealthActivityMask activity_mask, time_t start_time, time_t end_time) { // TODO: PBL-31628 permission system to reply with HealthServiceAccessibilityMaskNoPermission if (activity_mask == HealthActivityNone) { @@ -1495,11 +1472,11 @@ MeasurementSystem health_service_get_measurement_system_for_display(HealthMetric // ---------------------------------------------------------------------------------------------- void health_service_state_init(HealthServiceState *state) { - *state = (HealthServiceState) { - .health_event_service_info = { - .type = PEBBLE_HEALTH_SERVICE_EVENT, - .handler = &prv_health_event_handler, - }, + *state = (HealthServiceState){ + .health_event_service_info = { + .type = PEBBLE_HEALTH_SERVICE_EVENT, + .handler = &prv_health_event_handler, + }, }; } diff --git a/src/fw/applib/health_service.h b/src/fw/applib/health_service.h index bbd4ab60e6..406f42d127 100644 --- a/src/fw/applib/health_service.h +++ b/src/fw/applib/health_service.h @@ -67,7 +67,6 @@ typedef int32_t HealthValue; struct HealthMetricAlert; typedef struct HealthMetricAlert HealthMetricAlert; - //! Return the sum of a \ref HealthMetric's values over a time range. //! The `time_start` and `time_end` parameters define the range of time you want the sum for. //! @note The value returned will be based on daily totals, weighted for the length of the @@ -138,7 +137,6 @@ typedef enum { HealthValue health_service_sum_averaged(HealthMetric metric, time_t time_start, time_t time_end, HealthServiceTimeScope scope); - //! Used by \ref health_service_aggregate_averaged() to specify what type of aggregation to perform. //! This aggregation is applied to the metric before the average is computed. typedef enum { @@ -157,7 +155,6 @@ typedef enum { HealthAggregationMax } HealthAggregation; - //! Return the value of an aggregated metric over a given time range. This call is more //! flexible than health_service_sum_averaged because it lets you specify which aggregation function //! to perform. @@ -205,7 +202,6 @@ HealthValue health_service_aggregate_averaged(HealthMetric metric, time_t time_s time_t time_end, HealthAggregation aggregation, HealthServiceTimeScope scope); - //! Health-related activities that can be accessed using // \ref health_service_peek_current_activities() and \ref health_service_activities_iterate(). typedef enum { @@ -232,7 +228,7 @@ typedef uint32_t HealthActivityMask; //! Return a \ref HealthActivityMask containing a set of bits, one set for each //! activity that is currently active. //! @return A bitmask with zero or more \ref HealthActivityMask bits set as appropriate. -HealthActivityMask health_service_peek_current_activities(void); +HealthActivityMask health_service_peek_current_activities(void); //! Callback used by \ref health_service_activities_iterate(). //! @param activity Which activity the caller is being informed about. @@ -299,8 +295,8 @@ typedef enum { //! @param time_end Latest UTC time you are interested in. //! @return A \ref HealthServiceAccessibilityMask representing the accessible metrics //! in this time range. -HealthServiceAccessibilityMask health_service_metric_accessible( - HealthMetric metric, time_t time_start, time_t time_end); +HealthServiceAccessibilityMask health_service_metric_accessible(HealthMetric metric, + time_t time_start, time_t time_end); //! Check if a certain combination of metric, time span, and scope is accessible for calculating //! summed, averaged data by returning a value of \ref HealthServiceAccessibilityMask. Developers @@ -315,7 +311,8 @@ HealthServiceAccessibilityMask health_service_metric_accessible( //! @param time_start Earliest UTC time you are interested in. //! @param time_end Latest UTC time you are interested in. //! @param scope \ref HealthServiceTimeScope value describing how the average should be computed. -//! @return A \ref HealthServiceAccessibilityMask value describing whether averaged data is available. +//! @return A \ref HealthServiceAccessibilityMask value describing whether averaged data is +//! available. HealthServiceAccessibilityMask health_service_metric_averaged_accessible( HealthMetric metric, time_t time_start, time_t time_end, HealthServiceTimeScope scope); @@ -329,7 +326,8 @@ HealthServiceAccessibilityMask health_service_metric_averaged_accessible( //! @param time_end Latest UTC time you are interested in. //! @param aggregation The aggregation to perform //! @param scope \ref HealthServiceTimeScope value describing how the average should be computed. -//! @return A \ref HealthServiceAccessibilityMask value describing whether averaged data is available. +//! @return A \ref HealthServiceAccessibilityMask value describing whether averaged data is +//! available. HealthServiceAccessibilityMask health_service_metric_aggregate_averaged_accessible( HealthMetric metric, time_t time_start, time_t time_end, HealthAggregation aggregation, HealthServiceTimeScope scope); @@ -470,15 +468,15 @@ bool health_service_cancel_metric_alert(HealthMetricAlert *alert); //! The `vmc` value is a measure of the total amount of movement seen by the watch. More vigorous //! movement yields higher VMC values. typedef struct { - uint8_t steps; //!< Number of steps taken in this minute. - uint8_t orientation; //!< Quantized average orientation. - uint16_t vmc; //!< Vector Magnitude Counts (vmc). - bool is_invalid: 1; //!< `true` if the item doesn't represents actual data - //!< and should be ignored. - AmbientLightLevel light: 3; //!< Instantaneous light level during this minute. - uint8_t padding: 4; - uint8_t heart_rate_bpm; //!< heart rate in beats per minute - uint8_t reserved[6]; //!< Reserved for future use. + uint8_t steps; //!< Number of steps taken in this minute. + uint8_t orientation; //!< Quantized average orientation. + uint16_t vmc; //!< Vector Magnitude Counts (vmc). + bool is_invalid : 1; //!< `true` if the item doesn't represents actual data + //!< and should be ignored. + AmbientLightLevel light : 3; //!< Instantaneous light level during this minute. + uint8_t padding : 4; + uint8_t heart_rate_bpm; //!< heart rate in beats per minute + uint8_t reserved[6]; //!< Reserved for future use. } HealthMinuteData; //! Return historical minute data records. This fills in the `minute_data` array parameter with @@ -527,36 +525,36 @@ MeasurementSystem health_service_get_measurement_system_for_display(HealthMetric //! @internal // Auxiliary data passed into HealthEventHandler along with the health event type. typedef struct { - uint32_t steps; //!< Total number of steps for today + uint32_t steps; //!< Total number of steps for today } HealthEventMovementUpdateData; //! @internal typedef struct { - uint32_t total_seconds; //!< Total number of seconds of sleep for today - uint32_t total_restful_seconds; //!< Total number of restful seconds + uint32_t total_seconds; //!< Total number of seconds of sleep for today + uint32_t total_restful_seconds; //!< Total number of restful seconds } HealthEventSleepUpdateData; //! @internal typedef struct { - uint16_t day_id; //!< The new day_id for today + uint16_t day_id; //!< The new day_id for today } HealthEventSignificantUpdateData; //! @internal typedef struct { uint8_t current_bpm; uint8_t resting_bpm; - HRMQuality quality:8; + HRMQuality quality : 8; bool is_filtered; } HealthEventHeartRateUpdateData; //! @internal typedef struct { uint16_t ppi_ms; - HRMQuality quality:8; + HRMQuality quality : 8; } HealthEventHRVUpdateData; //! @internal -typedef struct { +typedef struct { union { HealthEventMovementUpdateData movement_update; HealthEventSleepUpdateData sleep_update; diff --git a/src/fw/applib/health_service_private.h b/src/fw/applib/health_service_private.h index 40cd080225..2c702127bc 100644 --- a/src/fw/applib/health_service_private.h +++ b/src/fw/applib/health_service_private.h @@ -20,10 +20,10 @@ typedef struct { } HealthServiceStats; typedef struct { - HealthServiceStats weekday; // weekday stats - HealthServiceStats weekend; // weekend stats - HealthServiceStats weekly; // weekly stats - HealthServiceStats daily; // daily stats + HealthServiceStats weekday; // weekday stats + HealthServiceStats weekend; // weekend stats + HealthServiceStats weekly; // weekly stats + HealthServiceStats daily; // daily stats } HealthServiceMetricStats; // The number of session we choose to store is arbitrary and taken from other examples @@ -32,16 +32,16 @@ typedef struct { // Information required to support health metric alerts typedef struct { - HealthValue threshold; // the threshold - HealthValue prior_reading; // the prior reading + HealthValue threshold; // the threshold + HealthValue prior_reading; // the prior reading } HealthServiceMetricAlertInfo; typedef struct { - uint32_t cur_day_id; // Current day ID, used for cache validation + uint32_t cur_day_id; // Current day ID, used for cache validation // These are intraday step averages - DayInWeek step_averages_day; // which day in the week the step averages are for - ActivityMetricAverages step_averages; // intraday step averages + DayInWeek step_averages_day; // which day in the week the step averages are for + ActivityMetricAverages step_averages; // intraday step averages // We cache the daily step totals since that metric is very likely to be requested by a // client. The other metrics we fetch only on an as-needed basis @@ -58,9 +58,9 @@ typedef struct { union { struct { - uint16_t step_averages_valid:1; - uint16_t step_daily_valid:1; - uint16_t reserved:14; + uint16_t step_averages_valid : 1; + uint16_t step_daily_valid : 1; + uint16_t reserved : 14; }; uint16_t valid_flags; }; @@ -85,14 +85,13 @@ void health_service_state_deinit(HealthServiceState *state); // helper struct for representing utc-based ranges on a per-day granularity including fractions typedef struct { - uint32_t last_day_idx; // last intersected day of this range (0=today, 1=yesterday, ...) - uint32_t num_days; // number of intersected days for this range - uint32_t seconds_first_day; // number of seconds on the oldest intersected day for this range - uint32_t seconds_last_day; // number of seconds on the youngest intersected day for this range - uint32_t seconds_total_last_day; // total number of seconds available on the youngest i. day + uint32_t last_day_idx; // last intersected day of this range (0=today, 1=yesterday, ...) + uint32_t num_days; // number of intersected days for this range + uint32_t seconds_first_day; // number of seconds on the oldest intersected day for this range + uint32_t seconds_last_day; // number of seconds on the youngest intersected day for this range + uint32_t seconds_total_last_day; // total number of seconds available on the youngest i. day } HealthServiceTimeRange; - // since we expect clients to allocate this struct on the stack we make sure its size is limited _Static_assert(sizeof(HealthServiceTimeRange) <= 160, "Helper struct too large for stack"); diff --git a/src/fw/applib/i18n.c b/src/fw/applib/i18n.c index fc24675082..7fb0e9cc8d 100644 --- a/src/fw/applib/i18n.c +++ b/src/fw/applib/i18n.c @@ -26,4 +26,3 @@ void app_i18n_get(const char *locale, const char *string, char *buffer, size_t l sys_i18n_get_with_buffer(string, buffer, length); } } - diff --git a/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.c b/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.c index 26b0c1e93e..b4d2300054 100644 --- a/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.c +++ b/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.c @@ -11,12 +11,12 @@ inline static bool action_bar_legacy2_is_highlighted(ActionBarLayerLegacy2 *action_bar, uint8_t index) { PBL_ASSERTN(index < NUM_ACTION_BAR_LEGACY2_ITEMS); - return (bool) (action_bar->is_highlighted & (1 << index)); + return (bool)(action_bar->is_highlighted & (1 << index)); } inline static void action_bar_legacy2_set_highlighted(ActionBarLayerLegacy2 *action_bar, uint8_t index, bool highlighted) { - PBL_ASSERT(index < NUM_ACTION_BAR_LEGACY2_ITEMS, "Index: %"PRIu8, index); + PBL_ASSERT(index < NUM_ACTION_BAR_LEGACY2_ITEMS, "Index: %" PRIu8, index); const uint8_t bit = (1 << index); if (highlighted) { @@ -26,7 +26,7 @@ inline static void action_bar_legacy2_set_highlighted(ActionBarLayerLegacy2 *act } } -static void action_bar_legacy2_changed_proc(ActionBarLayerLegacy2 *action_bar, GContext* ctx) { +static void action_bar_legacy2_changed_proc(ActionBarLayerLegacy2 *action_bar, GContext *ctx) { if (action_bar->layer.window && action_bar->layer.window->on_screen == false) { // clear first, fixes issue of returning from other page while highlighted for (int i = 0; i < NUM_ACTION_BAR_LEGACY2_ITEMS; i++) { @@ -35,7 +35,7 @@ static void action_bar_legacy2_changed_proc(ActionBarLayerLegacy2 *action_bar, G } } -static void action_bar_legacy2_update_proc(ActionBarLayerLegacy2 *action_bar, GContext* ctx) { +static void action_bar_legacy2_update_proc(ActionBarLayerLegacy2 *action_bar, GContext *ctx) { const GColor bg_color = get_native_color(action_bar->background_color); graphics_context_set_fill_color(ctx, bg_color); const uint8_t radius = 3; @@ -58,9 +58,15 @@ static void action_bar_legacy2_update_proc(ActionBarLayerLegacy2 *action_bar, GC graphics_context_set_fill_color(ctx, highlighted_color); GCornerMask corner; switch (index) { - case 0: corner = GCornerTopLeft; break; - case NUM_ACTION_BAR_LEGACY2_ITEMS - 1: corner = GCornerBottomLeft; break; - default: corner = GCornerNone; break; + case 0: + corner = GCornerTopLeft; + break; + case NUM_ACTION_BAR_LEGACY2_ITEMS - 1: + corner = GCornerBottomLeft; + break; + default: + corner = GCornerNone; + break; } graphics_fill_round_rect(ctx, &rect, radius - margin, corner); } @@ -69,7 +75,7 @@ static void action_bar_legacy2_update_proc(ActionBarLayerLegacy2 *action_bar, GC grect_align(&icon_rect, &rect, GAlignCenter, clip); const GCompOp op = (is_white != is_highlighted) ? GCompOpAssign : GCompOpAssignInverted; graphics_context_set_compositing_mode(ctx, op); - graphics_draw_bitmap_in_rect(ctx, (GBitmap*)icon, &icon_rect); + graphics_draw_bitmap_in_rect(ctx, (GBitmap *)icon, &icon_rect); } rect.origin.y += rect.size.h; } @@ -78,14 +84,14 @@ static void action_bar_legacy2_update_proc(ActionBarLayerLegacy2 *action_bar, GC void action_bar_layer_legacy2_init(ActionBarLayerLegacy2 *action_bar) { *action_bar = (ActionBarLayerLegacy2){}; layer_init(&action_bar->layer, &GRectZero); - action_bar->layer.update_proc = (LayerUpdateProc) action_bar_legacy2_update_proc; + action_bar->layer.update_proc = (LayerUpdateProc)action_bar_legacy2_update_proc; action_bar->layer.property_changed_proc = - (PropertyChangedProc) (void *) action_bar_legacy2_changed_proc; + (PropertyChangedProc)(void *)action_bar_legacy2_changed_proc; action_bar->background_color = GColor2Black; } ActionBarLayerLegacy2 *action_bar_layer_legacy2_create(void) { - ActionBarLayerLegacy2 * layer = task_malloc(sizeof(ActionBarLayerLegacy2)); + ActionBarLayerLegacy2 *layer = task_malloc(sizeof(ActionBarLayerLegacy2)); if (layer) { action_bar_layer_legacy2_init(layer); } @@ -104,11 +110,11 @@ void action_bar_layer_legacy2_destroy(ActionBarLayerLegacy2 *action_bar_layer) { task_free(action_bar_layer); } -Layer* action_bar_layer_legacy2_get_layer(ActionBarLayerLegacy2 *action_bar_layer) { +Layer *action_bar_layer_legacy2_get_layer(ActionBarLayerLegacy2 *action_bar_layer) { return &action_bar_layer->layer; } -inline static void* action_bar_legacy2_get_context(ActionBarLayerLegacy2 *action_bar) { +inline static void *action_bar_legacy2_get_context(ActionBarLayerLegacy2 *action_bar) { return action_bar->context ? action_bar->context : action_bar; } @@ -163,8 +169,7 @@ inline static void action_bar_legacy2_update_click_config_provider( ActionBarLayerLegacy2 *action_bar) { if (action_bar->window) { window_set_click_config_provider_with_context( - action_bar->window, - (ClickConfigProvider) action_bar_legacy2_click_config_provider, + action_bar->window, (ClickConfigProvider)action_bar_legacy2_click_config_provider, action_bar); } } @@ -195,8 +200,7 @@ void action_bar_layer_legacy2_add_to_window(ActionBarLayerLegacy2 *action_bar, struct Window *window) { const uint8_t vertical_margin = 3; const GRect *window_bounds = &window->layer.bounds; - GRect rect = GRect(0, 0, ACTION_BAR_LEGACY2_WIDTH, - window_bounds->size.h - (vertical_margin * 2)); + GRect rect = GRect(0, 0, ACTION_BAR_LEGACY2_WIDTH, window_bounds->size.h - (vertical_margin * 2)); layer_set_bounds(&action_bar->layer, &rect); rect.origin.x = window_bounds->size.w - ACTION_BAR_LEGACY2_WIDTH; rect.origin.y = vertical_margin; @@ -217,7 +221,7 @@ void action_bar_layer_legacy2_remove_from_window(ActionBarLayerLegacy2 *action_b } void action_bar_layer_legacy2_set_background_color_2bit(ActionBarLayerLegacy2 *action_bar, - GColor2 background_color) { + GColor2 background_color) { GColor native_background_color = get_native_color(background_color); if (gcolor_equal(native_background_color, get_native_color(action_bar->background_color))) { return; diff --git a/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.h b/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.h index 9bfc67b0c0..252bdf58e7 100644 --- a/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.h +++ b/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.h @@ -110,8 +110,8 @@ typedef struct ActionBarLayerLegacy2 { struct Window *window; void *context; ClickConfigProvider click_config_provider; - unsigned is_highlighted:NUM_ACTION_BAR_LEGACY2_ITEMS; - GColor2 background_color:2; + unsigned is_highlighted : NUM_ACTION_BAR_LEGACY2_ITEMS; + GColor2 background_color : 2; } ActionBarLayerLegacy2; //! Initializes the action bar and reverts any state back to the default state: @@ -143,7 +143,7 @@ void action_bar_layer_legacy2_destroy(ActionBarLayerLegacy2 *action_bar_layer); //! @return The "root" Layer of the action bar layer. //! @internal //! @note The result is always equal to `(Layer *) action_bar_layer`. -Layer*action_bar_layer_legacy2_get_layer(ActionBarLayerLegacy2 *action_bar_layer); +Layer *action_bar_layer_legacy2_get_layer(ActionBarLayerLegacy2 *action_bar_layer); //! Sets the context parameter, which will be passed in to \ref ClickHandler //! callbacks and the \ref ClickConfigProvider callback of the action bar. diff --git a/src/fw/applib/legacy2/ui/animation_legacy2.c b/src/fw/applib/legacy2/ui/animation_legacy2.c index b1145215bb..9fb672c902 100644 --- a/src/fw/applib/legacy2/ui/animation_legacy2.c +++ b/src/fw/applib/legacy2/ui/animation_legacy2.c @@ -16,7 +16,7 @@ // Base AnimationLegacy2 // -static const uint32_t ANIMATION_TARGET_FRAME_INTERVAL_MS_LEGACY2 = 40; // 25 Hz +static const uint32_t ANIMATION_TARGET_FRAME_INTERVAL_MS_LEGACY2 = 40; // 25 Hz static void animation_legacy2_private_run(AnimationLegacy2Scheduler *animation_legacy2_scheduler); @@ -55,13 +55,12 @@ _Static_assert(sizeof(AnimationLegacy2) <= 40, "Breaking back-compatibility!"); _Static_assert(sizeof(AnimationLegacy2Scheduler) <= 16, "Breaking back-compatibility!"); #endif - // Pack a function pointer into 28 bits. We do this by dropping bits // 1, 26, 30 and 31 and packing the remainder together. static uintptr_t prv_custom_curve_ptr_pack(AnimationCurveFunction ptr) { uintptr_t bits = (uintptr_t)ptr; uint8_t top_byte = bits >> 24; - PBL_ASSERTN((top_byte & 0b11000100) == 0); // Function pointer outside of packable range! + PBL_ASSERTN((top_byte & 0b11000100) == 0); // Function pointer outside of packable range! top_byte = ((top_byte & 0b00111000) >> 1) | (top_byte & 0b11); bits = (top_byte << 24) | (bits & 0xffffff); bits >>= 1; @@ -98,7 +97,7 @@ void animation_legacy2_init(struct AnimationLegacy2 *animation) { *animation = (AnimationLegacy2){}; animation->duration_ms = 250; animation->curve = AnimationCurveEaseInOut; - animation->handlers = (AnimationLegacy2Handlers) { NULL, NULL }; + animation->handlers = (AnimationLegacy2Handlers){NULL, NULL}; animation->context = NULL; animation->is_completed = false; } @@ -109,15 +108,15 @@ static int animation_legacy2_scheduler_comparator(AnimationLegacy2 *animation_le animation_legacy2_b->abs_start_time_ms); } -static AnimationLegacy2Scheduler* animation_legacy2_scheduler_data_for_app_ctx_idx( - AppTaskCtxIdx idx) { +static AnimationLegacy2Scheduler *animation_legacy2_scheduler_data_for_app_ctx_idx( + AppTaskCtxIdx idx) { if (idx == AppTaskCtxIdxApp) { return (AnimationLegacy2Scheduler *)app_state_get_animation_state(); } return (AnimationLegacy2Scheduler *)kernel_applib_get_animation_state(); } -static AnimationLegacy2Scheduler* get_current_scheduler(void) { +static AnimationLegacy2Scheduler *get_current_scheduler(void) { if (pebble_task_get_current() == PebbleTask_App) { return (AnimationLegacy2Scheduler *)app_state_get_animation_state(); } @@ -129,15 +128,14 @@ inline static uint32_t animation_legacy2_get_ms_since_system_start(void) { } static void animation_legacy2_timer_callback( - AnimationLegacy2Scheduler *animation_legacy2_scheduler) { + AnimationLegacy2Scheduler *animation_legacy2_scheduler) { animation_legacy2_scheduler->timer_handle = NULL; animation_legacy2_private_run(animation_legacy2_scheduler); } static void animation_legacy2_reschedule_timer( - AnimationLegacy2Scheduler *animation_legacy2_scheduler, - uint32_t rate_control_delay_ms) { - AnimationLegacy2 *animation = (AnimationLegacy2 *) animation_legacy2_scheduler->head; + AnimationLegacy2Scheduler *animation_legacy2_scheduler, uint32_t rate_control_delay_ms) { + AnimationLegacy2 *animation = (AnimationLegacy2 *)animation_legacy2_scheduler->head; if (animation == NULL) { return; } @@ -152,14 +150,14 @@ static void animation_legacy2_reschedule_timer( // the right time once that gets handled. } else { animation_legacy2_scheduler->timer_handle = - app_timer_register(interval_ms, (AppTimerCallback) animation_legacy2_timer_callback, + app_timer_register(interval_ms, (AppTimerCallback)animation_legacy2_timer_callback, animation_legacy2_scheduler); PBL_ASSERTN(animation_legacy2_scheduler->timer_handle != NULL); } } -static void animation_legacy2_private_schedule(AnimationLegacy2 *animation, - AnimationLegacy2Scheduler* animation_legacy2_scheduler) { +static void animation_legacy2_private_schedule( + AnimationLegacy2 *animation, AnimationLegacy2Scheduler *animation_legacy2_scheduler) { PBL_ASSERTN(animation != NULL); PBL_ASSERTN(animation->implementation->update != NULL); @@ -173,12 +171,14 @@ static void animation_legacy2_private_schedule(AnimationLegacy2 *animation, animation->implementation->setup(animation); } - const bool old_head_is_animating = animation_legacy2_scheduler->head - ? (((AnimationLegacy2 *)animation_legacy2_scheduler->head)->abs_start_time_ms <= now) - : false; + const bool old_head_is_animating = + animation_legacy2_scheduler->head + ? (((AnimationLegacy2 *)animation_legacy2_scheduler->head)->abs_start_time_ms <= now) + : false; const bool ascending = true; - animation_legacy2_scheduler->head = list_sorted_add(animation_legacy2_scheduler->head, - &animation->list_node, (Comparator) animation_legacy2_scheduler_comparator, ascending); + animation_legacy2_scheduler->head = + list_sorted_add(animation_legacy2_scheduler->head, &animation->list_node, + (Comparator)animation_legacy2_scheduler_comparator, ascending); const bool has_new_head = (&animation->list_node == animation_legacy2_scheduler->head); if (has_new_head) { // Only reschedule the timer if the previous head animation wasn't running yet: @@ -189,14 +189,15 @@ static void animation_legacy2_private_schedule(AnimationLegacy2 *animation, } void animation_legacy2_private_unschedule(AnimationLegacy2 *animation, - AnimationLegacy2Scheduler *animation_legacy2_scheduler, const bool finished) { + AnimationLegacy2Scheduler *animation_legacy2_scheduler, + const bool finished) { if (animation == NULL || !animation_legacy2_is_scheduled(animation)) { return; } PBL_ASSERTN(animation->implementation != NULL); - const bool was_old_head = (animation == (AnimationLegacy2 *) animation_legacy2_scheduler->head); + const bool was_old_head = (animation == (AnimationLegacy2 *)animation_legacy2_scheduler->head); list_remove(&animation->list_node, &animation_legacy2_scheduler->head, NULL); // Reschedule the timer if we're removing the head animation: if (was_old_head && animation_legacy2_scheduler->head != NULL) { @@ -216,21 +217,21 @@ void animation_legacy2_private_unschedule(AnimationLegacy2 *animation, void animation_legacy2_private_unschedule_all(AppTaskCtxIdx idx) { AnimationLegacy2Scheduler *animation_legacy2_scheduler = - animation_legacy2_scheduler_data_for_app_ctx_idx(idx); - AnimationLegacy2 *animation = (AnimationLegacy2 *) animation_legacy2_scheduler->head; + animation_legacy2_scheduler_data_for_app_ctx_idx(idx); + AnimationLegacy2 *animation = (AnimationLegacy2 *)animation_legacy2_scheduler->head; while (animation) { - AnimationLegacy2 *next = (AnimationLegacy2 *) list_get_next(&animation->list_node); + AnimationLegacy2 *next = (AnimationLegacy2 *)list_get_next(&animation->list_node); animation_legacy2_private_unschedule(animation, animation_legacy2_scheduler, false); animation = next; } } void animation_legacy2_private_init_scheduler( - AnimationLegacy2Scheduler *animation_legacy2_scheduler) { - *animation_legacy2_scheduler = (AnimationLegacy2Scheduler) { - .timer_handle = NULL, - .last_delay_ms = ANIMATION_TARGET_FRAME_INTERVAL_MS_LEGACY2, - .last_frame_time = animation_legacy2_get_ms_since_system_start() + AnimationLegacy2Scheduler *animation_legacy2_scheduler) { + *animation_legacy2_scheduler = (AnimationLegacy2Scheduler){ + .timer_handle = NULL, + .last_delay_ms = ANIMATION_TARGET_FRAME_INTERVAL_MS_LEGACY2, + .last_frame_time = animation_legacy2_get_ms_since_system_start() }; } @@ -252,7 +253,7 @@ bool animation_legacy2_is_scheduled(AnimationLegacy2 *animation) { } static void animation_legacy2_private_run(AnimationLegacy2Scheduler *animation_legacy2_scheduler) { - AnimationLegacy2 *animation = (AnimationLegacy2 *) animation_legacy2_scheduler->head; + AnimationLegacy2 *animation = (AnimationLegacy2 *)animation_legacy2_scheduler->head; const uint32_t now = animation_legacy2_get_ms_since_system_start(); @@ -267,7 +268,7 @@ static void animation_legacy2_private_run(AnimationLegacy2Scheduler *animation_l } // Get a pointer to next now, because after unscheduling this animation won't have a next. - AnimationLegacy2 *next = (AnimationLegacy2*) list_get_next(&animation->list_node); + AnimationLegacy2 *next = (AnimationLegacy2 *)list_get_next(&animation->list_node); if (animation->is_completed) { // Unschedule + call animation.stopped callback: @@ -280,14 +281,15 @@ static void animation_legacy2_private_run(AnimationLegacy2Scheduler *animation_l animation->handlers.started(animation, animation->context); } - const uint32_t time_normalized_raw = (animation->duration_ms != 0) - ? ((ANIMATION_NORMALIZED_MAX * rel_ms_running) / animation->duration_ms) - : ANIMATION_NORMALIZED_MAX; + const uint32_t time_normalized_raw = + (animation->duration_ms != 0) + ? ((ANIMATION_NORMALIZED_MAX * rel_ms_running) / animation->duration_ms) + : ANIMATION_NORMALIZED_MAX; const uint32_t time_normalized = MIN(time_normalized_raw, ANIMATION_NORMALIZED_MAX); uint32_t distance_normalized; if (animation->curve >= AnimationCurveCustomFunction) { - distance_normalized = prv_custom_curve_ptr_unpack( - animation->custom_curve_function)(time_normalized); + distance_normalized = + prv_custom_curve_ptr_unpack(animation->custom_curve_function)(time_normalized); } else { distance_normalized = animation_timing_curve(time_normalized, animation->curve); } @@ -308,12 +310,12 @@ static void animation_legacy2_private_run(AnimationLegacy2Scheduler *animation_l }; // Frame rate control: - const int32_t frame_interval_ms = serial_distance32( - animation_legacy2_scheduler->last_frame_time, now); + const int32_t frame_interval_ms = + serial_distance32(animation_legacy2_scheduler->last_frame_time, now); const int32_t error_ms = frame_interval_ms - ANIMATION_TARGET_FRAME_INTERVAL_MS_LEGACY2; const int32_t theoretic_delay_ms = animation_legacy2_scheduler->last_delay_ms - error_ms; - const uint32_t delay_ms = CLIP(theoretic_delay_ms, (int32_t) 0, - (int32_t) ANIMATION_TARGET_FRAME_INTERVAL_MS_LEGACY2); + const uint32_t delay_ms = + CLIP(theoretic_delay_ms, (int32_t)0, (int32_t)ANIMATION_TARGET_FRAME_INTERVAL_MS_LEGACY2); animation_legacy2_reschedule_timer(animation_legacy2_scheduler, delay_ms); animation_legacy2_scheduler->last_delay_ms = delay_ms; @@ -322,14 +324,14 @@ static void animation_legacy2_private_run(AnimationLegacy2Scheduler *animation_l void animation_legacy2_set_handlers(AnimationLegacy2 *animation, AnimationLegacy2Handlers handlers, void *context) { - PBL_ASSERTN(animation->abs_start_time_ms == 0); // can't set after animation has been added + PBL_ASSERTN(animation->abs_start_time_ms == 0); // can't set after animation has been added animation->context = context; animation->handlers = handlers; } void animation_legacy2_set_implementation(AnimationLegacy2 *animation, - const AnimationLegacy2Implementation *implementation) { - PBL_ASSERTN(animation->abs_start_time_ms == 0); // can't set after animation has been added + const AnimationLegacy2Implementation *implementation) { + PBL_ASSERTN(animation->abs_start_time_ms == 0); // can't set after animation has been added animation->implementation = implementation; } @@ -338,23 +340,23 @@ void *animation_legacy2_get_context(AnimationLegacy2 *animation) { } void animation_legacy2_set_delay(AnimationLegacy2 *animation, uint32_t delay_ms) { - PBL_ASSERTN(animation->abs_start_time_ms == 0); // can't set after animation has been added + PBL_ASSERTN(animation->abs_start_time_ms == 0); // can't set after animation has been added animation->delay_ms = delay_ms; } void animation_legacy2_set_duration(AnimationLegacy2 *animation, uint32_t duration_ms) { - PBL_ASSERTN(animation->abs_start_time_ms == 0); // can't set after animation has been added + PBL_ASSERTN(animation->abs_start_time_ms == 0); // can't set after animation has been added animation->duration_ms = duration_ms; } void animation_legacy2_set_curve(AnimationLegacy2 *animation, AnimationCurve curve) { - PBL_ASSERTN(animation->abs_start_time_ms == 0); // can't set after animation has been added + PBL_ASSERTN(animation->abs_start_time_ms == 0); // can't set after animation has been added PBL_ASSERTN(curve < AnimationCurveCustomFunction); animation->curve = curve; } void animation_legacy2_set_custom_curve(AnimationLegacy2 *animation, - AnimationCurveFunction curve_function) { + AnimationCurveFunction curve_function) { animation->curve = AnimationCurveCustomFunction; animation->custom_curve_function = prv_custom_curve_ptr_pack(curve_function); } @@ -363,12 +365,14 @@ AnimationCurveFunction animation_legacy2_get_custom_curve(AnimationLegacy2 *anim return prv_custom_curve_ptr_unpack(animation->custom_curve_function); } -static void dump_scheduler(char* buffer, int buffer_size, - AnimationLegacy2Scheduler* animation_legacy2_scheduler) { - AnimationLegacy2 *animation = (AnimationLegacy2 *) animation_legacy2_scheduler->head; +static void dump_scheduler(char *buffer, int buffer_size, + AnimationLegacy2Scheduler *animation_legacy2_scheduler) { + AnimationLegacy2 *animation = (AnimationLegacy2 *)animation_legacy2_scheduler->head; while (animation) { - dbgserial_putstr_fmt(buffer, buffer_size, - "<%p> { abs_start_time_ms = %"PRIu32", delay = %"PRIu32", duration = %"PRIu32", " + dbgserial_putstr_fmt( + buffer, buffer_size, + "<%p> { abs_start_time_ms = %" PRIu32 ", delay = %" PRIu32 ", duration = %" PRIu32 + ", " "curve = %i, run = %p }", animation, animation->abs_start_time_ms, animation->delay_ms, animation->duration_ms, animation->curve, animation->implementation->update); @@ -379,14 +383,14 @@ static void dump_scheduler(char* buffer, int buffer_size, void command_legacy2_animations_info(void) { char buffer[128]; - dbgserial_putstr_fmt(buffer, sizeof(buffer), "Now: %"PRIu32, - animation_legacy2_get_ms_since_system_start()); + dbgserial_putstr_fmt(buffer, sizeof(buffer), "Now: %" PRIu32, + animation_legacy2_get_ms_since_system_start()); dbgserial_putstr_fmt(buffer, sizeof(buffer), "Kernel AnimationLegacy2s:"); dump_scheduler(buffer, sizeof(buffer), - (AnimationLegacy2Scheduler *)kernel_applib_get_animation_state()); + (AnimationLegacy2Scheduler *)kernel_applib_get_animation_state()); dbgserial_putstr_fmt(buffer, sizeof(buffer), "App AnimationLegacy2s:"); dump_scheduler(buffer, sizeof(buffer), - (AnimationLegacy2Scheduler *)app_state_get_animation_state()); + (AnimationLegacy2Scheduler *)app_state_get_animation_state()); } diff --git a/src/fw/applib/legacy2/ui/animation_legacy2.h b/src/fw/applib/legacy2/ui/animation_legacy2.h index 9d9b4b89d5..06818a49e8 100644 --- a/src/fw/applib/legacy2/ui/animation_legacy2.h +++ b/src/fw/applib/legacy2/ui/animation_legacy2.h @@ -19,7 +19,6 @@ //! Using animation_legacy2_set_implementation(), you can implement a custom animation. //! - //! @{ /////////////////// @@ -30,7 +29,6 @@ struct AnimationLegacy2; struct AnimationLegacy2Implementation; struct AnimationLegacy2Handlers; - //! Creates a new AnimationLegacy2 on the heap and initializes it with the default values. //! //! * Duration: 250ms, @@ -74,7 +72,7 @@ void animation_legacy2_set_curve(struct AnimationLegacy2 *animation, AnimationCu //! @param curve_function The custom animation curve function. //! @see AnimationCurveFunction void animation_legacy2_set_custom_curve(struct AnimationLegacy2 *animation, - AnimationCurveFunction curve_function); + AnimationCurveFunction curve_function); //! Gets the custom animation curve function. //! @param animation The animation for which to get the curve. @@ -100,7 +98,7 @@ typedef void (*AnimationLegacy2StartedHandler)(struct AnimationLegacy2 *animatio //! \ref animation_legacy2_set_handlers() //! @see animation_legacy2_set_handlers typedef void (*AnimationLegacy2StoppedHandler)(struct AnimationLegacy2 *animation, bool finished, - void *context); + void *context); //! The handlers that will get called when an animation starts and stops. //! See documentation with the function pointer types for more information. @@ -121,7 +119,7 @@ typedef struct AnimationLegacy2Handlers { //! @param context A pointer to application specific data, that will be passed as an argument by //! the animation subsystem when a callback is called. void animation_legacy2_set_handlers(struct AnimationLegacy2 *animation, - AnimationLegacy2Handlers callbacks, void *context); + AnimationLegacy2Handlers callbacks, void *context); //! Gets the application-specific callback context of the animation. //! This `void` pointer is passed as an argument when the animation system calls AnimationHandlers @@ -174,15 +172,15 @@ typedef struct AnimationLegacy2 { uint32_t abs_start_time_ms; uint32_t delay_ms; uint32_t duration_ms; - AnimationCurve curve:3; - bool is_completed:1; + AnimationCurve curve : 3; + bool is_completed : 1; //! Pointer to a custom curve. Unfortunately, due to backward-compatibility //! constraints, it must fit into 28 bits. //! It is only valid when curve == AnimationCurveCustomFunction. //! The mapping from 28-bit field to pointer is unpublished. Call //! animation_legacy2_set_custom_curve() to ensure your app continues to run //! after future Pebble updates. - uintptr_t custom_curve_function:28; + uintptr_t custom_curve_function : 28; } AnimationLegacy2; /////////////////////////////////////// @@ -221,7 +219,7 @@ typedef void (*AnimationLegacy2SetupImplementation)(struct AnimationLegacy2 *ani //! @internal //! @see animation_legacy2_timing.h typedef void (*AnimationLegacy2UpdateImplementation)(struct AnimationLegacy2 *animation, - const uint32_t distance_normalized); + const uint32_t distance_normalized); //! Pointer to function that (optionally) cleans up the animation. //! This callback is called when the animation is removed from the scheduler. @@ -260,13 +258,14 @@ typedef struct AnimationLegacy2Implementation { } AnimationLegacy2Implementation; //! Sets the implementation of the custom animation. -//! When implementing custom animations, use this function to specify what functions need to be called to -//! for the setup, frame update and teardown of the animation. +//! When implementing custom animations, use this function to specify what functions need to be +//! called to for the setup, frame update and teardown of the animation. //! @param animation The animation for which to set the implementation. -//! @param implementation The structure with function pointers to the implementation of the setup, update and teardown functions. +//! @param implementation The structure with function pointers to the implementation of the setup, +//! update and teardown functions. //! @see AnimationImplementation void animation_legacy2_set_implementation(struct AnimationLegacy2 *animation, - const AnimationLegacy2Implementation *implementation); + const AnimationLegacy2Implementation *implementation); //! @} // group AnimationLegacy2 //! @} // group UI diff --git a/src/fw/applib/legacy2/ui/animation_private_legacy2.h b/src/fw/applib/legacy2/ui/animation_private_legacy2.h index cd3755d3b5..fe5c892a31 100644 --- a/src/fw/applib/legacy2/ui/animation_private_legacy2.h +++ b/src/fw/applib/legacy2/ui/animation_private_legacy2.h @@ -8,16 +8,16 @@ #include "syscall/syscall.h" typedef struct { - ListNode *head; //! Pointer to the Animation struct that is the animation that is scheduled - //! first. - AppTimer* timer_handle; + ListNode *head; //! Pointer to the Animation struct that is the animation that is scheduled + //! first. + AppTimer *timer_handle; //! The delay the animation scheduler uses between finishing a frame and starting a new one. //! Derived from actual rendering/calculation times, using a PID-like control algorithm. uint32_t last_delay_ms; - uint32_t last_frame_time; //! Absolute RTC time of the moment the last animation frame started. + uint32_t last_frame_time; //! Absolute RTC time of the moment the last animation frame started. } AnimationLegacy2Scheduler; -void animation_legacy2_private_init_scheduler(AnimationLegacy2Scheduler* scheduler); +void animation_legacy2_private_init_scheduler(AnimationLegacy2Scheduler *scheduler); void animation_legacy2_private_unschedule_all(AppTaskCtxIdx app_task_ctx_idx); diff --git a/src/fw/applib/legacy2/ui/menu_layer_legacy2.c b/src/fw/applib/legacy2/ui/menu_layer_legacy2.c index c444591f61..fabe00aecd 100644 --- a/src/fw/applib/legacy2/ui/menu_layer_legacy2.c +++ b/src/fw/applib/legacy2/ui/menu_layer_legacy2.c @@ -24,7 +24,7 @@ void menu_layer_legacy2_init(MenuLayer *menu_layer, const GRect *frame) { scroll_layer_add_child(scroll_layer, &inverter->layer); } -MenuLayer* menu_layer_legacy2_create(GRect frame) { +MenuLayer *menu_layer_legacy2_create(GRect frame) { MenuLayer *layer = task_malloc(sizeof(MenuLayer)); if (layer) { menu_layer_legacy2_init(layer, &frame); @@ -32,36 +32,36 @@ MenuLayer* menu_layer_legacy2_create(GRect frame) { return layer; } -void menu_layer_legacy2_set_callbacks(MenuLayer *menu_layer, - void *callback_context, +void menu_layer_legacy2_set_callbacks(MenuLayer *menu_layer, void *callback_context, MenuLayerCallbacksLegacy2 callbacks) { - menu_layer_set_callbacks(menu_layer, callback_context, &(MenuLayerCallbacks) { - .get_num_sections = callbacks.get_num_sections, - .get_num_rows = callbacks.get_num_rows, - .get_cell_height = callbacks.get_cell_height, - .get_header_height = callbacks.get_header_height, - .draw_row = callbacks.draw_row, - .draw_header = callbacks.draw_header, - .select_click = callbacks.select_click, - .select_long_click = callbacks.select_long_click, - .selection_changed = callbacks.selection_changed, - .get_separator_height = callbacks.get_separator_height, - .draw_separator = callbacks.draw_separator, - }); + menu_layer_set_callbacks(menu_layer, callback_context, + &(MenuLayerCallbacks){ + .get_num_sections = callbacks.get_num_sections, + .get_num_rows = callbacks.get_num_rows, + .get_cell_height = callbacks.get_cell_height, + .get_header_height = callbacks.get_header_height, + .draw_row = callbacks.draw_row, + .draw_header = callbacks.draw_header, + .select_click = callbacks.select_click, + .select_long_click = callbacks.select_long_click, + .selection_changed = callbacks.selection_changed, + .get_separator_height = callbacks.get_separator_height, + .draw_separator = callbacks.draw_separator, + }); } -void menu_layer_legacy2_set_callbacks__deprecated(MenuLayer *menu_layer, - void *callback_context, +void menu_layer_legacy2_set_callbacks__deprecated(MenuLayer *menu_layer, void *callback_context, MenuLayerCallbacksLegacy2__deprecated callbacks) { - menu_layer_set_callbacks(menu_layer, callback_context, &(MenuLayerCallbacks) { - .get_num_sections = callbacks.get_num_sections, - .get_num_rows = callbacks.get_num_rows, - .get_cell_height = callbacks.get_cell_height, - .get_header_height = callbacks.get_header_height, - .draw_row = callbacks.draw_row, - .draw_header = callbacks.draw_header, - .select_click = callbacks.select_click, - .select_long_click = callbacks.select_long_click, - .selection_changed = callbacks.selection_changed, - }); + menu_layer_set_callbacks(menu_layer, callback_context, + &(MenuLayerCallbacks){ + .get_num_sections = callbacks.get_num_sections, + .get_num_rows = callbacks.get_num_rows, + .get_cell_height = callbacks.get_cell_height, + .get_header_height = callbacks.get_header_height, + .draw_row = callbacks.draw_row, + .draw_header = callbacks.draw_header, + .select_click = callbacks.select_click, + .select_long_click = callbacks.select_long_click, + .selection_changed = callbacks.selection_changed, + }); } diff --git a/src/fw/applib/legacy2/ui/menu_layer_legacy2.h b/src/fw/applib/legacy2/ui/menu_layer_legacy2.h index 4102528c1b..46653fd3fa 100644 --- a/src/fw/applib/legacy2/ui/menu_layer_legacy2.h +++ b/src/fw/applib/legacy2/ui/menu_layer_legacy2.h @@ -6,7 +6,7 @@ #include "applib/ui/menu_layer.h" #include "applib/graphics/gtypes.h" -#define MENU_CELL_LEGACY2_BASIC_SEPARATOR_HEIGHT ((const int16_t) 1) +#define MENU_CELL_LEGACY2_BASIC_SEPARATOR_HEIGHT ((const int16_t)1) //! Data structure containing all the callbacks of a MenuLayer. typedef struct MenuLayerCallbacksLegacy2 { @@ -135,12 +135,10 @@ typedef struct MenuLayerCallbacksLegacy2__deprecated { void menu_layer_legacy2_init(MenuLayer *menu_layer, const GRect *frame); -MenuLayer* menu_layer_legacy2_create(GRect frame); +MenuLayer *menu_layer_legacy2_create(GRect frame); -void menu_layer_legacy2_set_callbacks(MenuLayer *menu_layer, - void *callback_context, +void menu_layer_legacy2_set_callbacks(MenuLayer *menu_layer, void *callback_context, MenuLayerCallbacksLegacy2 callbacks); -void menu_layer_legacy2_set_callbacks__deprecated(MenuLayer *menu_layer, - void *callback_context, +void menu_layer_legacy2_set_callbacks__deprecated(MenuLayer *menu_layer, void *callback_context, MenuLayerCallbacksLegacy2__deprecated callbacks); diff --git a/src/fw/applib/legacy2/ui/property_animation_legacy2.c b/src/fw/applib/legacy2/ui/property_animation_legacy2.c index cede1ae4ff..9433f50d34 100644 --- a/src/fw/applib/legacy2/ui/property_animation_legacy2.c +++ b/src/fw/applib/legacy2/ui/property_animation_legacy2.c @@ -13,111 +13,99 @@ // Property Animation // -static inline int16_t distance_interpolate(const int32_t normalized, - int16_t from, int16_t to) { +static inline int16_t distance_interpolate(const int32_t normalized, int16_t from, int16_t to) { return from + ((normalized * (to - from)) / ANIMATION_NORMALIZED_MAX); } void property_animation_legacy2_update_int16(PropertyAnimationLegacy2 *property_animation, - const uint32_t distance_normalized) { - int16_t result = distance_interpolate(distance_normalized, - property_animation->values.from.int16, + const uint32_t distance_normalized) { + int16_t result = distance_interpolate(distance_normalized, property_animation->values.from.int16, property_animation->values.to.int16); - ((PropertyAnimationLegacy2Implementation*)property_animation->animation.implementation) - ->accessors.setter.int16(property_animation->subject, result); + ((PropertyAnimationLegacy2Implementation *)property_animation->animation.implementation) + ->accessors.setter.int16(property_animation->subject, result); } void property_animation_legacy2_update_gpoint(PropertyAnimationLegacy2 *property_animation, - const uint32_t distance_normalized) { + const uint32_t distance_normalized) { GPoint result; - result.x = distance_interpolate(distance_normalized, - property_animation->values.from.gpoint.x, + result.x = distance_interpolate(distance_normalized, property_animation->values.from.gpoint.x, property_animation->values.to.gpoint.x); - result.y = distance_interpolate(distance_normalized, - property_animation->values.from.gpoint.y, + result.y = distance_interpolate(distance_normalized, property_animation->values.from.gpoint.y, property_animation->values.to.gpoint.y); - ((PropertyAnimationLegacy2Implementation*) - property_animation->animation.implementation) - ->accessors.setter.gpoint(property_animation->subject, result); + ((PropertyAnimationLegacy2Implementation *)property_animation->animation.implementation) + ->accessors.setter.gpoint(property_animation->subject, result); } void property_animation_legacy2_update_grect(PropertyAnimationLegacy2 *property_animation, - const uint32_t distance_normalized) { + const uint32_t distance_normalized) { GRect result; - result.origin.x = distance_interpolate( - distance_normalized, - property_animation->values.from.grect.origin.x, - property_animation->values.to.grect.origin.x); - result.origin.y = distance_interpolate( - distance_normalized, - property_animation->values.from.grect.origin.y, - property_animation->values.to.grect.origin.y); - result.size.w = distance_interpolate( - distance_normalized, - property_animation->values.from.grect.size.w, - property_animation->values.to.grect.size.w); - result.size.h = distance_interpolate( - distance_normalized, - property_animation->values.from.grect.size.h, - property_animation->values.to.grect.size.h); - ((PropertyAnimationLegacy2Implementation*) - property_animation->animation.implementation) - ->accessors.setter.grect(property_animation->subject, result); + result.origin.x = + distance_interpolate(distance_normalized, property_animation->values.from.grect.origin.x, + property_animation->values.to.grect.origin.x); + result.origin.y = + distance_interpolate(distance_normalized, property_animation->values.from.grect.origin.y, + property_animation->values.to.grect.origin.y); + result.size.w = + distance_interpolate(distance_normalized, property_animation->values.from.grect.size.w, + property_animation->values.to.grect.size.w); + result.size.h = + distance_interpolate(distance_normalized, property_animation->values.from.grect.size.h, + property_animation->values.to.grect.size.h); + ((PropertyAnimationLegacy2Implementation *)property_animation->animation.implementation) + ->accessors.setter.grect(property_animation->subject, result); } -void property_animation_legacy2_init( - PropertyAnimationLegacy2 *property_animation, - const PropertyAnimationLegacy2Implementation *implementation, - void *subject, void *from_value, void *to_value) { +void property_animation_legacy2_init(PropertyAnimationLegacy2 *property_animation, + const PropertyAnimationLegacy2Implementation *implementation, + void *subject, void *from_value, void *to_value) { animation_legacy2_init(&property_animation->animation); memset(&property_animation->values, 0xff, sizeof(property_animation->values)); - property_animation->animation.implementation = - (AnimationLegacy2Implementation*) implementation; + property_animation->animation.implementation = (AnimationLegacy2Implementation *)implementation; property_animation->subject = subject; // NOTE: we are also comparing against the 3.0 animation update handlers so that modules // like scroll_layer and menu_layer can use the legacy 2.0 animation when interfacing with a // 2.x app. - if (property_animation->animation.implementation->update - == (AnimationLegacy2UpdateImplementation) property_animation_legacy2_update_int16 - || property_animation->animation.implementation->update - == (AnimationLegacy2UpdateImplementation) property_animation_update_int16) { - property_animation->values.to.int16 = to_value ? *((int16_t*)to_value) - : implementation->accessors.getter.int16(subject); - property_animation->values.from.int16 = from_value ? *((int16_t*)from_value) - : implementation->accessors.getter.int16(subject); - } else if (property_animation->animation.implementation->update - == (AnimationLegacy2UpdateImplementation) property_animation_legacy2_update_gpoint - || property_animation->animation.implementation->update - == (AnimationLegacy2UpdateImplementation) property_animation_update_gpoint) { - property_animation->values.to.gpoint = to_value ? *((GPoint*)to_value) - : implementation->accessors.getter.gpoint(subject); + if (property_animation->animation.implementation->update == + (AnimationLegacy2UpdateImplementation)property_animation_legacy2_update_int16 || + property_animation->animation.implementation->update == + (AnimationLegacy2UpdateImplementation)property_animation_update_int16) { + property_animation->values.to.int16 = + to_value ? *((int16_t *)to_value) : implementation->accessors.getter.int16(subject); + property_animation->values.from.int16 = + from_value ? *((int16_t *)from_value) : implementation->accessors.getter.int16(subject); + } else if (property_animation->animation.implementation->update == + (AnimationLegacy2UpdateImplementation)property_animation_legacy2_update_gpoint || + property_animation->animation.implementation->update == + (AnimationLegacy2UpdateImplementation)property_animation_update_gpoint) { + property_animation->values.to.gpoint = + to_value ? *((GPoint *)to_value) : implementation->accessors.getter.gpoint(subject); property_animation->values.from.gpoint = - from_value ? *((GPoint*)from_value) : implementation->accessors.getter.gpoint(subject); - } else if (property_animation->animation.implementation->update - == (AnimationLegacy2UpdateImplementation) property_animation_legacy2_update_grect - || property_animation->animation.implementation->update - == (AnimationLegacy2UpdateImplementation) property_animation_update_grect) { - property_animation->values.to.grect = to_value ? *((GRect*)to_value) - : implementation->accessors.getter.grect(subject); - property_animation->values.from.grect = from_value ? *((GRect*)from_value) - : implementation->accessors.getter.grect(subject); + from_value ? *((GPoint *)from_value) : implementation->accessors.getter.gpoint(subject); + } else if (property_animation->animation.implementation->update == + (AnimationLegacy2UpdateImplementation)property_animation_legacy2_update_grect || + property_animation->animation.implementation->update == + (AnimationLegacy2UpdateImplementation)property_animation_update_grect) { + property_animation->values.to.grect = + to_value ? *((GRect *)to_value) : implementation->accessors.getter.grect(subject); + property_animation->values.from.grect = + from_value ? *((GRect *)from_value) : implementation->accessors.getter.grect(subject); } } -struct PropertyAnimationLegacy2* property_animation_legacy2_create( - const struct PropertyAnimationLegacy2Implementation *implementation, - void *subject, void *from_value, void *to_value) { - struct PropertyAnimationLegacy2* property_animation = +struct PropertyAnimationLegacy2 *property_animation_legacy2_create( + const struct PropertyAnimationLegacy2Implementation *implementation, void *subject, + void *from_value, void *to_value) { + struct PropertyAnimationLegacy2 *property_animation = task_malloc(sizeof(struct PropertyAnimationLegacy2)); if (property_animation) { - property_animation_legacy2_init(property_animation, implementation, subject, - from_value, to_value); + property_animation_legacy2_init(property_animation, implementation, subject, from_value, + to_value); } return property_animation; } -void property_animation_legacy2_destroy(struct PropertyAnimationLegacy2* property_animation) { +void property_animation_legacy2_destroy(struct PropertyAnimationLegacy2 *property_animation) { if (property_animation == NULL) { return; } @@ -125,30 +113,35 @@ void property_animation_legacy2_destroy(struct PropertyAnimationLegacy2* propert task_free(property_animation); } -void property_animation_legacy2_init_layer_frame( - PropertyAnimationLegacy2 *property_animation, struct Layer *layer, - GRect *from_frame, GRect *to_frame) { +void property_animation_legacy2_init_layer_frame(PropertyAnimationLegacy2 *property_animation, + struct Layer *layer, GRect *from_frame, + GRect *to_frame) { static const PropertyAnimationLegacy2Implementation implementation = { - .base = { - .update = (AnimationLegacy2UpdateImplementation) property_animation_legacy2_update_grect, - }, - .accessors = { - .setter = { .grect = (const GRectSetter) layer_set_frame_by_value, }, - .getter = { .grect = (const GRectGetter) layer_get_frame_by_value, }, - }, + .base = + { + .update = + (AnimationLegacy2UpdateImplementation)property_animation_legacy2_update_grect, + }, + .accessors = { + .setter = + { + .grect = (const GRectSetter)layer_set_frame_by_value, + }, + .getter = { + .grect = (const GRectGetter)layer_get_frame_by_value, + }, + }, }; - property_animation_legacy2_init(property_animation, &implementation, layer, - from_frame, to_frame); + property_animation_legacy2_init(property_animation, &implementation, layer, from_frame, to_frame); } -struct PropertyAnimationLegacy2* property_animation_legacy2_create_layer_frame( - struct Layer *layer, GRect *from_frame, GRect *to_frame) { - struct PropertyAnimationLegacy2* property_animation = +struct PropertyAnimationLegacy2 *property_animation_legacy2_create_layer_frame(struct Layer *layer, + GRect *from_frame, + GRect *to_frame) { + struct PropertyAnimationLegacy2 *property_animation = task_malloc(sizeof(struct PropertyAnimationLegacy2)); if (property_animation) { - property_animation_legacy2_init_layer_frame(property_animation, layer, from_frame, - to_frame); + property_animation_legacy2_init_layer_frame(property_animation, layer, from_frame, to_frame); } return property_animation; } - diff --git a/src/fw/applib/legacy2/ui/property_animation_legacy2.h b/src/fw/applib/legacy2/ui/property_animation_legacy2.h index 7c21cf5d4a..62e8647246 100644 --- a/src/fw/applib/legacy2/ui/property_animation_legacy2.h +++ b/src/fw/applib/legacy2/ui/property_animation_legacy2.h @@ -101,8 +101,9 @@ void property_animation_legacy2_init_layer_frame( //! the layer. //! @return A pointer to the property animation. `NULL` if animation could not //! be created -struct PropertyAnimationLegacy2* property_animation_legacy2_create_layer_frame(struct Layer *layer, - GRect *from_frame, GRect *to_frame); +struct PropertyAnimationLegacy2 *property_animation_legacy2_create_layer_frame(struct Layer *layer, + GRect *from_frame, + GRect *to_frame); ////////////////////////////////////////// // Implementing custom Property Animations @@ -110,9 +111,10 @@ struct PropertyAnimationLegacy2* property_animation_legacy2_create_layer_frame(s //! @internal //! See \ref property_animation_legacy2_create() for a description of the parameter list -void property_animation_legacy2_init(struct PropertyAnimationLegacy2 *property_animation, - const struct PropertyAnimationLegacy2Implementation *implementation, void *subject, - void *from_value, void *to_value); +void property_animation_legacy2_init( + struct PropertyAnimationLegacy2 *property_animation, + const struct PropertyAnimationLegacy2Implementation *implementation, void *subject, + void *from_value, void *to_value); //! Creates a new PropertyAnimationLegacy2 on the heap and and initializes it with the specified //! values. The same defaults are used as with \ref animation_create(). @@ -132,13 +134,13 @@ void property_animation_legacy2_init(struct PropertyAnimationLegacy2 *property_a //! and to- values, effectively not doing anything. //! @return A pointer to the property animation. `NULL` if animation could not //! be created -struct PropertyAnimationLegacy2* property_animation_legacy2_create( - const struct PropertyAnimationLegacy2Implementation *implementation, void *subject, - void *from_value, void *to_value); +struct PropertyAnimationLegacy2 *property_animation_legacy2_create( + const struct PropertyAnimationLegacy2Implementation *implementation, void *subject, + void *from_value, void *to_value); //! Free a dynamically allocated property animation //! @param property_animation The property animation to be freed. -void property_animation_legacy2_destroy(struct PropertyAnimationLegacy2* property_animation); +void property_animation_legacy2_destroy(struct PropertyAnimationLegacy2 *property_animation); //! Default update callback for a property animations to update a property of type int16_t. //! Assign this function to the `.base.update` callback field of your @@ -153,7 +155,7 @@ void property_animation_legacy2_destroy(struct PropertyAnimationLegacy2* propert //! @note This function is not supposed to be called "manually", but will be called automatically //! when the animation is being run. void property_animation_legacy2_update_int16(struct PropertyAnimationLegacy2 *property_animation, - const uint32_t distance_normalized); + const uint32_t distance_normalized); //! Default update callback for a property animations to update a property of type GPoint. //! Assign this function to the `.base.update` callback field of your @@ -167,7 +169,7 @@ void property_animation_legacy2_update_int16(struct PropertyAnimationLegacy2 *pr //! @note This function is not supposed to be called "manually", but will be called automatically //! when the animation is being run. void property_animation_legacy2_update_gpoint(struct PropertyAnimationLegacy2 *property_animation, - const uint32_t distance_normalized); + const uint32_t distance_normalized); //! Default update callback for a property animations to update a property of type GRect. //! Assign this function to the `.base.update` callback field of your @@ -182,7 +184,7 @@ void property_animation_legacy2_update_gpoint(struct PropertyAnimationLegacy2 *p //! @note This function is not supposed to be called "manually", but will be called automatically //! when the animation is being run. void property_animation_legacy2_update_grect(struct PropertyAnimationLegacy2 *property_animation, - const uint32_t distance_normalized); + const uint32_t distance_normalized); //! Data structure containing a collection of function pointers that form the implementation of the //! property animation. @@ -220,8 +222,8 @@ typedef struct PropertyAnimationLegacy2 { //! Valid when the property being animated is of type int16_t int16_t int16; } from; - } values; //!< See detail table - void *subject; //!< The subject of the animation of which the property should be animated. + } values; //!< See detail table + void *subject; //!< The subject of the animation of which the property should be animated. } PropertyAnimationLegacy2; //! @} // group PropertyAnimationLegacy2 diff --git a/src/fw/applib/legacy2/ui/text_layer_legacy2.c b/src/fw/applib/legacy2/ui/text_layer_legacy2.c index d766a74d85..39dd6c4017 100644 --- a/src/fw/applib/legacy2/ui/text_layer_legacy2.c +++ b/src/fw/applib/legacy2/ui/text_layer_legacy2.c @@ -21,7 +21,7 @@ static GTextLayoutCacheRef prv_text_layer_legacy2_get_cache_handle(TextLayerLega return text_layer->should_cache_layout ? text_layer->layout_cache : NULL; } -void text_layer_legacy2_update_proc(TextLayerLegacy2 *text_layer, GContext* ctx) { +void text_layer_legacy2_update_proc(TextLayerLegacy2 *text_layer, GContext *ctx) { if (text_layer == NULL) { return; } @@ -55,15 +55,15 @@ void text_layer_legacy2_init(TextLayerLegacy2 *text_layer, const GRect *frame) { layer_mark_dirty(&(text_layer->layer)); } -TextLayerLegacy2* text_layer_legacy2_create(GRect frame) { - TextLayerLegacy2* layer = task_malloc(sizeof(TextLayerLegacy2)); +TextLayerLegacy2 *text_layer_legacy2_create(GRect frame) { + TextLayerLegacy2 *layer = task_malloc(sizeof(TextLayerLegacy2)); if (layer) { text_layer_legacy2_init(layer, &frame); } return layer; } -void text_layer_legacy2_destroy(TextLayerLegacy2* text_layer) { +void text_layer_legacy2_destroy(TextLayerLegacy2 *text_layer) { if (!text_layer) { return; } @@ -80,7 +80,7 @@ void text_layer_legacy2_deinit(TextLayerLegacy2 *text_layer) { text_layer->layout_cache = NULL; } -Layer* text_layer_legacy2_get_layer(TextLayerLegacy2 *text_layer) { +Layer *text_layer_legacy2_get_layer(TextLayerLegacy2 *text_layer) { if (text_layer == NULL) { return NULL; } @@ -91,11 +91,11 @@ void text_layer_legacy2_set_size(TextLayerLegacy2 *text_layer, const GSize max_s if (text_layer == NULL) { return; } - layer_set_frame(&text_layer->layer, &(GRect) { text_layer->layer.frame.origin, max_size }); + layer_set_frame(&text_layer->layer, &(GRect){text_layer->layer.frame.origin, max_size}); layer_mark_dirty(&text_layer->layer); } -GSize text_layer_legacy2_get_size(TextLayerLegacy2* text_layer) { +GSize text_layer_legacy2_get_size(TextLayerLegacy2 *text_layer) { if (text_layer == NULL) { return GSizeZero; } @@ -110,7 +110,7 @@ void text_layer_legacy2_set_text(TextLayerLegacy2 *text_layer, const char *text) layer_mark_dirty(&text_layer->layer); } -const char* text_layer_legacy2_get_text(TextLayerLegacy2 *text_layer) { +const char *text_layer_legacy2_get_text(TextLayerLegacy2 *text_layer) { if (text_layer == NULL) { return NULL; } @@ -186,7 +186,7 @@ void text_layer_legacy2_set_should_cache_layout(TextLayerLegacy2 *text_layer, } } -GSize text_layer_legacy2_get_content_size(GContext* ctx, TextLayerLegacy2 *text_layer) { +GSize text_layer_legacy2_get_content_size(GContext *ctx, TextLayerLegacy2 *text_layer) { if (text_layer == NULL) { return GSizeZero; } else if (!text_layer->should_cache_layout) { @@ -195,10 +195,11 @@ GSize text_layer_legacy2_get_content_size(GContext* ctx, TextLayerLegacy2 *text_ GTextLayoutCacheRef layout = prv_text_layer_legacy2_get_cache_handle(text_layer); PBL_ASSERTN(layout); return graphics_text_layout_get_max_used_size(ctx, text_layer->text, text_layer->font, - text_layer->layer.bounds, text_layer->overflow_mode, text_layer->text_alignment, layout); + text_layer->layer.bounds, text_layer->overflow_mode, + text_layer->text_alignment, layout); } GSize app_text_layer_legacy2_get_content_size(TextLayerLegacy2 *text_layer) { - GContext* ctx = app_state_get_graphics_context(); + GContext *ctx = app_state_get_graphics_context(); return text_layer_legacy2_get_content_size(ctx, text_layer); } diff --git a/src/fw/applib/legacy2/ui/text_layer_legacy2.h b/src/fw/applib/legacy2/ui/text_layer_legacy2.h index 6e98066078..f604277d57 100644 --- a/src/fw/applib/legacy2/ui/text_layer_legacy2.h +++ b/src/fw/applib/legacy2/ui/text_layer_legacy2.h @@ -36,14 +36,14 @@ //! \endcode typedef struct TextLayerLegacy2 { Layer layer; - const char* text; + const char *text; GFont font; GTextLayoutCacheRef layout_cache; - GColor2 text_color:2; - GColor2 background_color:2; - GTextOverflowMode overflow_mode:2; - GTextAlignment text_alignment:2; - bool should_cache_layout:1; + GColor2 text_color : 2; + GColor2 background_color : 2; + GTextOverflowMode overflow_mode : 2; + GTextAlignment text_alignment : 2; + bool should_cache_layout : 1; } TextLayerLegacy2; //! Initializes the TextLayerLegacy2 with given frame @@ -75,10 +75,10 @@ void text_layer_legacy2_init(TextLayerLegacy2 *text_layer, const GRect *frame); //! @param frame The frame with which to initialize the TextLayerLegacy2 //! @return A pointer to the TextLayerLegacy2. `NULL` if the TextLayerLegacy2 could not //! be created -TextLayerLegacy2* text_layer_legacy2_create(GRect frame); +TextLayerLegacy2 *text_layer_legacy2_create(GRect frame); //! Destroys a TextLayerLegacy2 previously created by text_layer_legacy2_create. -void text_layer_legacy2_destroy(TextLayerLegacy2* text_layer); +void text_layer_legacy2_destroy(TextLayerLegacy2 *text_layer); //! Deinitializes the TextLayerLegacy2 and frees any caches. //! @param text_layer The TextLayerLegacy2 to deinitialize @@ -93,7 +93,7 @@ void text_layer_legacy2_deinit(TextLayerLegacy2 *text_layer); //! @return The "root" Layer of the text layer. //! @internal //! @note The result is always equal to `(Layer *) text_layer`. -Layer* text_layer_legacy2_get_layer(TextLayerLegacy2 *text_layer); +Layer *text_layer_legacy2_get_layer(TextLayerLegacy2 *text_layer); //! Sets the pointer to the string where the TextLayerLegacy2 is supposed to find the text //! at a later point in time, when it needs to draw itself. @@ -109,7 +109,7 @@ void text_layer_legacy2_set_text(TextLayerLegacy2 *text_layer, const char *text) //! Gets the pointer to the string that the TextLayerLegacy2 is using. //! @param text_layer The TextLayerLegacy2 for which to get the text //! @see text_layer_legacy2_set_text -const char* text_layer_legacy2_get_text(TextLayerLegacy2 *text_layer); +const char *text_layer_legacy2_get_text(TextLayerLegacy2 *text_layer); //! Sets the background color of bounding box that will be drawn behind the text //! @param text_layer The TextLayerLegacy2 of which to set the background color @@ -162,7 +162,7 @@ void text_layer_legacy2_set_should_cache_layout(TextLayerLegacy2 *text_layer, //! context, even though this function does not draw anything. //! @internal //! @see \ref app_get_current_graphics_context() -GSize text_layer_legacy2_get_content_size(GContext* ctx, TextLayerLegacy2 *text_layer); +GSize text_layer_legacy2_get_content_size(GContext *ctx, TextLayerLegacy2 *text_layer); //! Calculates the size occupied by the current text of the TextLayerLegacy2 //! @param text_layer the TextLayerLegacy2 for which to calculate the text's size @@ -175,7 +175,7 @@ GSize app_text_layer_legacy2_get_content_size(TextLayerLegacy2 *text_layer); //! @param max_size The new size for the TextLayerLegacy2 void text_layer_legacy2_set_size(TextLayerLegacy2 *text_layer, const GSize max_size); -GSize text_layer_legacy2_get_size(TextLayerLegacy2* text_layer); +GSize text_layer_legacy2_get_size(TextLayerLegacy2 *text_layer); //! @} // end addtogroup TextLayerLegacy2 //! @} // end addtogroup Layer diff --git a/src/fw/applib/logging.c b/src/fw/applib/logging.c index 7809a263f3..03370aaa31 100644 --- a/src/fw/applib/logging.c +++ b/src/fw/applib/logging.c @@ -30,14 +30,15 @@ _Static_assert((CORE_ID_MAIN_MCU & PACKED_CORE_MASK) == CORE_ID_MAIN_MCU, "Core #ifdef CONFIG_LOG_HASHED // Define the .log_string section format. -static const char prv_NewLogHeader[] __attribute__((nocommon, used, section(".log_string.header"))) - = NEW_LOG_HEADER "=::::,"\ - "CORE_ID=" str(CORE_ID_MAIN_MCU) ",CORE_NAME=Tintin"; +static const char prv_NewLogHeader[] + __attribute__((nocommon, used, section(".log_string.header"))) = NEW_LOG_HEADER + "=::::," + "CORE_ID=" str(CORE_ID_MAIN_MCU) ",CORE_NAME=Tintin"; // Confirm the size calculations. If these fail, update tools/loghashing/check_elf_log_strings.py // We can't currently handle 64 bit values. -_Static_assert(sizeof(long int) <= 4, "long int larger than expected"); -_Static_assert(sizeof(size_t) <= 4, "size_t larger than expected"); +_Static_assert(sizeof(long int) <= 4, "long int larger than expected"); +_Static_assert(sizeof(size_t) <= 4, "size_t larger than expected"); _Static_assert(sizeof(ptrdiff_t) <= 4, "ptrdiff_t larger than expected"); #endif @@ -46,13 +47,12 @@ _Static_assert(sizeof(ptrdiff_t) <= 4, "ptrdiff_t larger than expected"); // If we should use a default log message (because stack space is too limited to use sprintf) // then copy it into 'msg' and return true static bool prv_use_default_log_msg(LogBinaryMessage *msg, const int max_message_length) { - // We want to avoid vnsiprintf if we don't have sufficient stack space, so fill in // a default log message uint32_t stack_space = sys_stack_free_bytes(); if (stack_space < LOGGING_MIN_STACK_FOR_SPRINTF) { strncpy(msg->message, LOGGING_STACK_FULL_MSG, max_message_length); - msg->message[max_message_length-1] = 0; + msg->message[max_message_length - 1] = 0; msg->message_length = strlen(msg->message); return true; } else { @@ -60,29 +60,24 @@ static bool prv_use_default_log_msg(LogBinaryMessage *msg, const int max_message } } - // ------------------------------------------------------------------------------------------- static void prv_sprintf_to_msg(LogBinaryMessage *msg, const uint32_t max_message_len, - const char* fmt, va_list fmt_args) { - + const char *fmt, va_list fmt_args) { int message_length = vsniprintf(msg->message + msg->message_length, - max_message_len - msg->message_length, fmt, fmt_args); + max_message_len - msg->message_length, fmt, fmt_args); msg->message_length += message_length; if (msg->message_length > max_message_len) { msg->message_length = max_message_len; } } - // ------------------------------------------------------------------------------------------- -int pbl_log_binary_format(char* buffer, int buffer_len, - const uint8_t log_level, - const char* src_filename_path, int src_line_number, - const char* fmt, va_list args) { - - PBL_ASSERTN((unsigned int) buffer_len > sizeof(LogBinaryMessage)); +int pbl_log_binary_format(char *buffer, int buffer_len, const uint8_t log_level, + const char *src_filename_path, int src_line_number, const char *fmt, + va_list args) { + PBL_ASSERTN((unsigned int)buffer_len > sizeof(LogBinaryMessage)); - LogBinaryMessage* msg = (LogBinaryMessage*) buffer; + LogBinaryMessage *msg = (LogBinaryMessage *)buffer; time_t time_seconds = sys_get_time(); msg->timestamp = htonl(time_seconds); @@ -92,7 +87,7 @@ int pbl_log_binary_format(char* buffer, int buffer_len, msg->message_length = 0; // Ensure we only send the last 15 characters of a filename - const char* filename = GET_FILE_NAME(src_filename_path); + const char *filename = GET_FILE_NAME(src_filename_path); int filename_length = strlen(filename); if (filename_length > 15) { // If we have to truncate, truncate at the beginning as opposed to the end. @@ -111,23 +106,23 @@ int pbl_log_binary_format(char* buffer, int buffer_len, return sizeof(*msg) + msg->message_length; } -int pbl_log_get_bin_format(char* buffer, int buffer_len, const uint8_t log_level, - const char* src_filename_path, int src_line_number, const char* fmt, ...) { +int pbl_log_get_bin_format(char *buffer, int buffer_len, const uint8_t log_level, + const char *src_filename_path, int src_line_number, const char *fmt, + ...) { va_list args; va_start(args, fmt); - int len = pbl_log_binary_format(buffer, buffer_len, log_level, src_filename_path, - src_line_number, fmt, args); + int len = pbl_log_binary_format(buffer, buffer_len, log_level, src_filename_path, src_line_number, + fmt, args); va_end(args); return (len); } - -// Return a pointer to the LogState to use. The LogState contains the buffers for formatting the log message. -// There are two possible LogState instances: one for the app task and one for all other (privileged) tasks (which -// is guarded by a mutex). -// Returns NULL if a logging operation is already in progress +// Return a pointer to the LogState to use. The LogState contains the buffers for formatting the log +// message. There are two possible LogState instances: one for the app task and one for all other +// (privileged) tasks (which is guarded by a mutex). Returns NULL if a logging operation is already +// in progress static LogState *prv_get_log_state() { - LogState* log_state = NULL; + LogState *log_state = NULL; PebbleTask task = pebble_task_get_current(); if (task == PebbleTask_App) { @@ -157,9 +152,8 @@ static void prv_release_log_state(LogState *state) { } } - -static void prv_log_internal(bool async, uint8_t log_level, const char* src_filename, - int src_line_number, const char* fmt, va_list args) { +static void prv_log_internal(bool async, uint8_t log_level, const char *src_filename, + int src_line_number, const char *fmt, va_list args) { LogState *state = prv_get_log_state(); if (!state) { return; @@ -168,8 +162,9 @@ static void prv_log_internal(bool async, uint8_t log_level, const char* src_file va_list bin_args; va_copy(bin_args, args); - pbl_log_binary_format(state->buffer, sizeof(state->buffer), log_level, src_filename, src_line_number, fmt, bin_args); - sys_pbl_log((LogBinaryMessage*) state->buffer, async); + pbl_log_binary_format(state->buffer, sizeof(state->buffer), log_level, src_filename, + src_line_number, fmt, bin_args); + sys_pbl_log((LogBinaryMessage *)state->buffer, async); va_end(bin_args); prv_release_log_state(state); @@ -186,7 +181,6 @@ void pbl_log_hashed_sync(const uint32_t packed_loghash, ...) { va_end(fmt_args); } - void pbl_log_hashed_async(const uint32_t packed_loghash, ...) { va_list fmt_args; va_start(fmt_args, packed_loghash); @@ -209,7 +203,6 @@ void pbl_log_hashed_core(const uint32_t core_number, const uint32_t packed_logha // Core Number must be shifted to the correct position. void pbl_log_hashed_vargs(const bool async, const uint32_t core_number, const uint32_t packed_loghash, va_list fmt_args) { - LogState *state = prv_get_log_state(); if (!state) { return; @@ -224,10 +217,10 @@ void pbl_log_hashed_vargs(const bool async, const uint32_t core_number, unsigned hash = ((packed_loghash >> PACKED_HASH_OFFSET) & PACKED_HASH_MASK) | core_number; int buffer_len = sizeof(state->buffer); - char* buffer = state->buffer; + char *buffer = state->buffer; // Fill in the log message fields - LogBinaryMessage* msg = (LogBinaryMessage*) buffer; + LogBinaryMessage *msg = (LogBinaryMessage *)buffer; time_t time_seconds = sys_get_time(); msg->timestamp = htonl(time_seconds); @@ -245,9 +238,10 @@ void pbl_log_hashed_vargs(const bool async, const uint32_t core_number, * Duplicate _VERBOSE -- let's have a reasonable entry for every value should something go * wrong on the packing end. */ - const uint8_t level_map[8] = { LOG_LEVEL_ALWAYS, LOG_LEVEL_ERROR, LOG_LEVEL_WARNING, - LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_VERBOSE, - LOG_LEVEL_DEBUG_VERBOSE, LOG_LEVEL_DEBUG_VERBOSE }; + const uint8_t level_map[8] = {LOG_LEVEL_ALWAYS, LOG_LEVEL_ERROR, + LOG_LEVEL_WARNING, LOG_LEVEL_INFO, + LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_VERBOSE, + LOG_LEVEL_DEBUG_VERBOSE, LOG_LEVEL_DEBUG_VERBOSE}; msg->log_level = level_map[level]; /* @@ -260,7 +254,6 @@ void pbl_log_hashed_vargs(const bool async, const uint32_t core_number, // Only use vsniprintf if we have sufficient stack space if (!prv_use_default_log_msg(msg, max_message_length)) { - // add the hashed value for the 'New Log' message sprintf(msg->message, "NL:%x", hash); msg->message_length += strlen(msg->message); @@ -274,7 +267,7 @@ void pbl_log_hashed_vargs(const bool async, const uint32_t core_number, ((str_index_2 != 0) && ((index + 1) == str_index_2))) { strcat(expanded_fmt_buffer, " `%s`"); } else { - strcat(expanded_fmt_buffer, " %x"); // add a space + strcat(expanded_fmt_buffer, " %x"); // add a space } } @@ -282,20 +275,20 @@ void pbl_log_hashed_vargs(const bool async, const uint32_t core_number, } } - sys_pbl_log((LogBinaryMessage*) state->buffer, async); + sys_pbl_log((LogBinaryMessage *)state->buffer, async); prv_release_log_state(state); } #endif /* CONFIG_LOG_HASHED */ -void pbl_log_vargs(uint8_t log_level, const char *src_filename, - int src_line_number, const char *fmt, va_list args) { +void pbl_log_vargs(uint8_t log_level, const char *src_filename, int src_line_number, + const char *fmt, va_list args) { const bool async = true; prv_log_internal(async, log_level, src_filename, src_line_number, fmt, args); } -void pbl_log(uint8_t log_level, const char* src_filename, - int src_line_number, const char* fmt, ...) { +void pbl_log(uint8_t log_level, const char *src_filename, int src_line_number, const char *fmt, + ...) { va_list args; va_start(args, fmt); const bool async = true; @@ -303,8 +296,8 @@ void pbl_log(uint8_t log_level, const char* src_filename, va_end(args); } -void pbl_log_sync(uint8_t log_level, const char* src_filename, - int src_line_number, const char* fmt, ...) { +void pbl_log_sync(uint8_t log_level, const char *src_filename, int src_line_number, const char *fmt, + ...) { va_list args; va_start(args, fmt); diff --git a/src/fw/applib/moddable/moddable.c b/src/fw/applib/moddable/moddable.c index d3130b50b1..05a04809f9 100644 --- a/src/fw/applib/moddable/moddable.c +++ b/src/fw/applib/moddable/moddable.c @@ -23,46 +23,45 @@ #include "shell/normal/watchface.h" static ExpandableDialog *prv_create_fatal_dialog(const char *message) { - ExpandableDialog *dialog = expandable_dialog_create(""); - Dialog *base_dialog = expandable_dialog_get_dialog(dialog); - expandable_dialog_set_header(dialog, "Alloy: Fatal Error"); - dialog_set_text(base_dialog, message); - dialog_set_icon(base_dialog, RESOURCE_ID_GENERIC_WARNING_SMALL); - dialog_set_fullscreen(base_dialog, true); - expandable_dialog_show_action_bar(dialog, false); - return dialog; + ExpandableDialog *dialog = expandable_dialog_create(""); + Dialog *base_dialog = expandable_dialog_get_dialog(dialog); + expandable_dialog_set_header(dialog, "Alloy: Fatal Error"); + dialog_set_text(base_dialog, message); + dialog_set_icon(base_dialog, RESOURCE_ID_GENERIC_WARNING_SMALL); + dialog_set_fullscreen(base_dialog, true); + expandable_dialog_show_action_bar(dialog, false); + return dialog; } static void prv_watchface_fatal_error(void *data) { - ExpandableDialog *dialog = prv_create_fatal_dialog(data); - kernel_free(data); - // Keep the warning above the safe watchface until it is dismissed. - expandable_dialog_push(dialog, modal_manager_get_window_stack(ModalPriorityAlert)); - watchface_set_default_install_id(INSTALL_ID_INVALID); - watchface_launch_default(NULL); + ExpandableDialog *dialog = prv_create_fatal_dialog(data); + kernel_free(data); + // Keep the warning above the safe watchface until it is dismissed. + expandable_dialog_push(dialog, modal_manager_get_window_stack(ModalPriorityAlert)); + watchface_set_default_install_id(INSTALL_ID_INVALID); + watchface_launch_default(NULL); } -void moddable_cleanup(void) -{ - ModdablePebbleAppState state = (ModdablePebbleAppState)app_state_get_js_memory_api_context(); +void moddable_cleanup(void) { + ModdablePebbleAppState state = (ModdablePebbleAppState)app_state_get_js_memory_api_context(); - if (state->the) - xsDeleteMachine(state->the); + if (state->the) + xsDeleteMachine(state->the); - if (state->abortReason) - c_free(state->abortReason); + if (state->abortReason) + c_free(state->abortReason); - extern void modTimerExit(void); - modTimerExit(); + extern void modTimerExit(void); + modTimerExit(); - while (state->debugFragments) { - DebugFragment f = state->debugFragments; - state->debugFragments = f->next; - kernel_free(f); - } + while (state->debugFragments) { + DebugFragment f = state->debugFragments; + state->debugFragments = f->next; + kernel_free(f); + } - app_state_set_js_memory_api_context(NULL); - task_free(state); + app_state_set_js_memory_api_context(NULL); + task_free(state); } // Minimum recordSize for the original struct (without flags field) @@ -75,125 +74,123 @@ void moddable_cleanup(void) // ALWAYS_INLINE: PRIVILEGE_WAS_ELEVATED is only valid inside the syscall body. static ALWAYS_INLINE void prv_assert_userspace_creation_record(ModdableCreationRecord *cr, size_t len) { - if (PRIVILEGE_WAS_ELEVATED) { - syscall_assert_userspace_buffer(cr, len); - } + if (PRIVILEGE_WAS_ELEVATED) { + syscall_assert_userspace_buffer(cr, len); + } } -DEFINE_SYSCALL(void, moddable_createMachine, ModdableCreationRecord *cr) -{ - uint32_t flags = 0; - uint32_t record_size = 0; - - ModdablePebbleAppState state = task_zalloc_check(sizeof(ModdablePebbleAppStateRecord)); - app_state_set_js_memory_api_context((void *)state); - - // Read flags if the record is large enough to include them - if (cr) { - prv_assert_userspace_creation_record(cr, sizeof(cr->recordSize)); - record_size = cr->recordSize; - if (record_size < kModdableCreationRecordMinSize) { - APP_LOG(APP_LOG_LEVEL_ERROR, "invalid recordSize"); - return; - } - - prv_assert_userspace_creation_record(cr, cr->recordSize); - if (record_size >= kModdableCreationRecordFlagsSize) - flags = cr->flags; - } - - // Don't log instrumentation if nobody is listening to APP_LOG over BT - if (!app_log_is_bt_enabled()) - flags &= ~(kModdableCreationFlagLogInstrumentation | kModdableCreationFlagDebug); - - state->creationFlags = flags; - - void *fxBuildFFI = NULL; - xsCreation *defaultCreation; - extern void *xsPreparationAndCreation(xsCreation **creation); - (void)xsPreparationAndCreation(&defaultCreation); - struct xsCreationRecord creation = *defaultCreation; - if (NULL != cr) { - APP_LOG(APP_LOG_LEVEL_ERROR, "evaluating creation record"); - uint32_t stack = (cr->stack + 3) & ~3, slot = (cr->slot + 3) & ~3, chunk = (cr->chunk + 3) & ~3; - if (stack || slot || chunk) { - if (!stack || !slot || !chunk) { - APP_LOG(APP_LOG_LEVEL_ERROR, "invalid ModdableCreationRecord"); - return; - } - - creation.stackCount = stack / sizeof(xsSlot); - creation.initialHeapCount = slot / sizeof(xsSlot); - creation.initialChunkSize = chunk; - if ((stack + slot + chunk) <= (uint32_t)creation.staticSize) - creation.staticSize = stack + slot + chunk; - else { - creation.incrementalChunkSize = 0; - creation.incrementalHeapCount = 0; - creation.staticSize = 0; - } - } - - if (record_size >= kModdableCreationRecordFFISize) { - fxBuildFFI = cr->fxBuildFFI; - - if (fxBuildFFI && creation.staticSize) { - int available = creation.staticSize - (creation.stackCount * sizeof(xsSlot)); - creation.initialHeapCount = (available >> 1) / sizeof(xsSlot); - creation.initialChunkSize = available >> 1; - creation.staticSize = 0; - } - } - } - - xsMachine *the = modCloneMachine(&creation, NULL); - if (NULL == the) { - APP_LOG(APP_LOG_LEVEL_ERROR, "failed to allocate XS machine"); - moddable_cleanup(); - return; - } - - state->the = the; - state->fxBuildFFI = fxBuildFFI; - state->eventedTimer = EVENTED_TIMER_INVALID_ID; - - evented_timer_register(1, false, (EventedTimerCallback)modRunMachineSetup, the); - - xsBeginHostExit(the); - app_event_loop(); - xsEndHostExit(the); - - int exitStatus = the->exitStatus; - char *abortReason = state->abortReason; - state->abortReason = NULL; - moddable_cleanup(); - - if ((xsNormalExit != exitStatus) && (xsDebuggerExit != exitStatus)) { - const char *message = abortReason ? abortReason : fxAbortString(exitStatus); - if (sys_app_is_watchface()) { - char *warning = kernel_strdup_check(message); - if (abortReason) - c_free(abortReason); - launcher_task_add_callback(prv_watchface_fatal_error, warning); - app_event_loop(); - return; - } - - ExpandableDialog *dialog = prv_create_fatal_dialog(message); - if (abortReason) - c_free(abortReason); - - app_expandable_dialog_push(dialog); - - app_event_loop(); - } +DEFINE_SYSCALL(void, moddable_createMachine, ModdableCreationRecord *cr) { + uint32_t flags = 0; + uint32_t record_size = 0; + + ModdablePebbleAppState state = task_zalloc_check(sizeof(ModdablePebbleAppStateRecord)); + app_state_set_js_memory_api_context((void *)state); + + // Read flags if the record is large enough to include them + if (cr) { + prv_assert_userspace_creation_record(cr, sizeof(cr->recordSize)); + record_size = cr->recordSize; + if (record_size < kModdableCreationRecordMinSize) { + APP_LOG(APP_LOG_LEVEL_ERROR, "invalid recordSize"); + return; + } + + prv_assert_userspace_creation_record(cr, cr->recordSize); + if (record_size >= kModdableCreationRecordFlagsSize) + flags = cr->flags; + } + + // Don't log instrumentation if nobody is listening to APP_LOG over BT + if (!app_log_is_bt_enabled()) + flags &= ~(kModdableCreationFlagLogInstrumentation | kModdableCreationFlagDebug); + + state->creationFlags = flags; + + void *fxBuildFFI = NULL; + xsCreation *defaultCreation; + extern void *xsPreparationAndCreation(xsCreation * *creation); + (void)xsPreparationAndCreation(&defaultCreation); + struct xsCreationRecord creation = *defaultCreation; + if (NULL != cr) { + APP_LOG(APP_LOG_LEVEL_ERROR, "evaluating creation record"); + uint32_t stack = (cr->stack + 3) & ~3, slot = (cr->slot + 3) & ~3, chunk = (cr->chunk + 3) & ~3; + if (stack || slot || chunk) { + if (!stack || !slot || !chunk) { + APP_LOG(APP_LOG_LEVEL_ERROR, "invalid ModdableCreationRecord"); + return; + } + + creation.stackCount = stack / sizeof(xsSlot); + creation.initialHeapCount = slot / sizeof(xsSlot); + creation.initialChunkSize = chunk; + if ((stack + slot + chunk) <= (uint32_t)creation.staticSize) + creation.staticSize = stack + slot + chunk; + else { + creation.incrementalChunkSize = 0; + creation.incrementalHeapCount = 0; + creation.staticSize = 0; + } + } + + if (record_size >= kModdableCreationRecordFFISize) { + fxBuildFFI = cr->fxBuildFFI; + + if (fxBuildFFI && creation.staticSize) { + int available = creation.staticSize - (creation.stackCount * sizeof(xsSlot)); + creation.initialHeapCount = (available >> 1) / sizeof(xsSlot); + creation.initialChunkSize = available >> 1; + creation.staticSize = 0; + } + } + } + + xsMachine *the = modCloneMachine(&creation, NULL); + if (NULL == the) { + APP_LOG(APP_LOG_LEVEL_ERROR, "failed to allocate XS machine"); + moddable_cleanup(); + return; + } + + state->the = the; + state->fxBuildFFI = fxBuildFFI; + state->eventedTimer = EVENTED_TIMER_INVALID_ID; + + evented_timer_register(1, false, (EventedTimerCallback)modRunMachineSetup, the); + + xsBeginHostExit(the); + app_event_loop(); + xsEndHostExit(the); + + int exitStatus = the->exitStatus; + char *abortReason = state->abortReason; + state->abortReason = NULL; + moddable_cleanup(); + + if ((xsNormalExit != exitStatus) && (xsDebuggerExit != exitStatus)) { + const char *message = abortReason ? abortReason : fxAbortString(exitStatus); + if (sys_app_is_watchface()) { + char *warning = kernel_strdup_check(message); + if (abortReason) + c_free(abortReason); + launcher_task_add_callback(prv_watchface_fatal_error, warning); + app_event_loop(); + return; + } + + ExpandableDialog *dialog = prv_create_fatal_dialog(message); + if (abortReason) + c_free(abortReason); + + app_expandable_dialog_push(dialog); + + app_event_loop(); + } } #else -DEFINE_SYSCALL(void, moddable_createMachine, ModdableCreationRecord *cr) -{ - APP_LOG(APP_LOG_LEVEL_ERROR, "Moddable XS not supported in this build"); +DEFINE_SYSCALL(void, moddable_createMachine, ModdableCreationRecord *cr) { + APP_LOG(APP_LOG_LEVEL_ERROR, "Moddable XS not supported in this build"); } // Normally provided by the moddable submodule (xsPlatform.c). The xsbug @@ -201,7 +198,6 @@ DEFINE_SYSCALL(void, moddable_createMachine, ModdableCreationRecord *cr) // so stub the callback when building without moddable to satisfy the linker. struct CommSession; -void xsbug_protocol_msg_callback(struct CommSession *session, const uint8_t *msg, size_t length) -{ +void xsbug_protocol_msg_callback(struct CommSession *session, const uint8_t *msg, size_t length) { } #endif diff --git a/src/fw/applib/moddable/moddable.h b/src/fw/applib/moddable/moddable.h index 205e0a92f2..26dbc2995e 100644 --- a/src/fw/applib/moddable/moddable.h +++ b/src/fw/applib/moddable/moddable.h @@ -10,24 +10,24 @@ //! usage, slot/chunk/stack statistics) via app_log. Logging is only active when //! a Bluetooth log listener is connected; otherwise this flag has no effect. //! @see ModdableCreationRecord -#define kModdableCreationFlagLogInstrumentation (1 << 0) +#define kModdableCreationFlagLogInstrumentation (1 << 0) //! Flag to enable XS debugging using xsbug. //! Should be used in combination with pebble build --debug //! @see ModdableCreationRecord -#define kModdableCreationFlagDebug (1 << 1) +#define kModdableCreationFlagDebug (1 << 1) //! Configuration record for creating a Moddable XS virtual machine. //! Used with moddable_createMachine() to customize the JS runtime. //! Set recordSize to sizeof(ModdableCreationRecord) for version compatibility. typedef struct { - uint32_t recordSize; //!< Size of this struct in bytes (for versioning) + uint32_t recordSize; //!< Size of this struct in bytes (for versioning) - uint32_t stack; //!< Stack size in bytes (0 for default) - uint32_t slot; //!< Slot heap size in bytes (0 for default) - uint32_t chunk; //!< Chunk heap size in bytes (0 for default) - uint32_t flags; //!< Combination of kModdableCreationFlag* values - void *fxBuildFFI; //!< Optional pointer to an fxBuildFFI function for custom native bindings + uint32_t stack; //!< Stack size in bytes (0 for default) + uint32_t slot; //!< Slot heap size in bytes (0 for default) + uint32_t chunk; //!< Chunk heap size in bytes (0 for default) + uint32_t flags; //!< Combination of kModdableCreationFlag* values + void *fxBuildFFI; //!< Optional pointer to an fxBuildFFI function for custom native bindings } ModdableCreationRecord; //! Create and start a Moddable XS virtual machine for an Alloy app. diff --git a/src/fw/applib/pbl_std/local.h b/src/fw/applib/pbl_std/local.h index e2972c24f5..526ca28626 100644 --- a/src/fw/applib/pbl_std/local.h +++ b/src/fw/applib/pbl_std/local.h @@ -3,8 +3,8 @@ #include -#define EPOCH_YEAR 1970 -#define EPOCH_WDAY 4 +#define EPOCH_YEAR 1970 +#define EPOCH_WDAY 4 #define EPOCH_YEARS_SINCE_LEAP 2 #define EPOCH_YEARS_SINCE_CENTURY 70 #define EPOCH_YEARS_SINCE_LEAP_CENTURY 370 diff --git a/src/fw/applib/pbl_std/locale.c b/src/fw/applib/pbl_std/locale.c index 8513d085c7..7a4b69825c 100644 --- a/src/fw/applib/pbl_std/locale.c +++ b/src/fw/applib/pbl_std/locale.c @@ -47,15 +47,9 @@ char *pbl_setlocale(int category, const char *locale) { return NULL; } -static const struct lconv pbl_lconv = { - ".", "", "", "", "", "", "", "", "", "", - 255, 255, 255, 255, - 255, 255, 255, 255, - 255, 255, 255, 255, - 255, 255 -}; +static const struct lconv pbl_lconv = {".", "", "", "", "", "", "", "", "", "", 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; struct lconv *pbl_localeconv_r(struct _reent *data) { return (struct lconv *)&pbl_lconv; } - diff --git a/src/fw/applib/pbl_std/locale.h b/src/fw/applib/pbl_std/locale.h index 28e471504a..26bb961e77 100644 --- a/src/fw/applib/pbl_std/locale.h +++ b/src/fw/applib/pbl_std/locale.h @@ -19,4 +19,3 @@ char *pbl_setlocale(int category, const char *locale); struct _reent; struct lconv *pbl_localeconv_r(struct _reent *data); - diff --git a/src/fw/applib/pbl_std/pbl_std.c b/src/fw/applib/pbl_std/pbl_std.c index b2b1a14da3..2b285a84e1 100644 --- a/src/fw/applib/pbl_std/pbl_std.c +++ b/src/fw/applib/pbl_std/pbl_std.c @@ -86,12 +86,9 @@ time_t pbl_override_time_legacy(time_t *tloc) { } static bool prv_tm_matches_local_time(const struct tm *requested, const struct tm *actual) { - return (requested->tm_sec == actual->tm_sec) && - (requested->tm_min == actual->tm_min) && - (requested->tm_hour == actual->tm_hour) && - (requested->tm_mday == actual->tm_mday) && - (requested->tm_mon == actual->tm_mon) && - (requested->tm_year == actual->tm_year); + return (requested->tm_sec == actual->tm_sec) && (requested->tm_min == actual->tm_min) && + (requested->tm_hour == actual->tm_hour) && (requested->tm_mday == actual->tm_mday) && + (requested->tm_mon == actual->tm_mon) && (requested->tm_year == actual->tm_year); } static void prv_fill_localtime_result(time_t t, struct tm *tb) { @@ -162,9 +159,8 @@ uint16_t pbl_override_time_ms_legacy(time_t *tloc, uint16_t *out_ms) { return (t_ms); } -extern size_t localized_strftime(char* s, - size_t maxsize, const char* format, const struct tm* tim_p, const char *locale); - +extern size_t localized_strftime(char *s, size_t maxsize, const char *format, + const struct tm *tim_p, const char *locale); struct tm *pbl_override_gmtime(const time_t *timep) { struct tm *gmtime_tm = NULL; @@ -193,14 +189,13 @@ struct tm *pbl_override_localtime(const time_t *timep) { sys_localtime_r(timep, localtime_tm); // We have to work around localtime_r resetting tm_zone below - sys_copy_timezone_abbr((char*)localtime_zone, *timep); + sys_copy_timezone_abbr((char *)localtime_zone, *timep); strncpy(localtime_tm->tm_zone, localtime_zone, TZ_LEN); return localtime_tm; } - -size_t pbl_strftime(char* s, size_t maxsize, const char* format, const struct tm* tim_p) { +size_t pbl_strftime(char *s, size_t maxsize, const char *format, const struct tm *tim_p) { char *locale = app_state_get_locale_info()->app_locale_time; return sys_strftime(s, maxsize, format, tim_p, locale); } @@ -209,9 +204,8 @@ size_t pbl_strftime(char* s, size_t maxsize, const char* format, const struct tm // — well beyond any reasonable strftime format. #define SYS_STRFTIME_FORMAT_MAX 256 -DEFINE_SYSCALL(size_t, sys_strftime, char* s, size_t maxsize, const char* format, - const struct tm* tim_p, char *locale) { - +DEFINE_SYSCALL(size_t, sys_strftime, char *s, size_t maxsize, const char *format, + const struct tm *tim_p, char *locale) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(s, maxsize); // Verify `format` is a null-terminated string entirely within the caller's @@ -229,7 +223,6 @@ DEFINE_SYSCALL(size_t, sys_strftime, char* s, size_t maxsize, const char* format return localized_strftime(s, maxsize, format, tim_p, locale); } - void *pbl_memcpy(void *destination, const void *source, size_t num) { // In releases prior to FW 2.5 we used GCC 4.7 and newlib as our libc implementation. However, // in 2.5 we switched to GCC 4.8 and nano-newlib. We actually ran into bad apps that would pass @@ -237,7 +230,7 @@ void *pbl_memcpy(void *destination, const void *source, size_t num) { // newlib-nano didn't handle at all and would interpret size_t as a extremely large unsigned // number. Guard against this happening so apps that used to work with the old libc will work // with the new libc. See PBL-7873. - if (((ptrdiff_t) num) <= 0) { + if (((ptrdiff_t)num) <= 0) { return destination; } @@ -258,20 +251,18 @@ void *pbl_memcpy(void *destination, const void *source, size_t num) { // APP_LOG message if we detect an attempt to use floating point. We also // return a "floating point not supported" string in the passed in str // buffer. -int pbl_snprintf(char * str, size_t n, const char * format, ...) { +int pbl_snprintf(char *str, size_t n, const char *format, ...) { int ret; - const char* fp_msg = "floating point not supported in snprintf"; - + const char *fp_msg = "floating point not supported in snprintf"; // Scan string and see if it has any floating point specifiers in it bool has_fp = false; bool end_spec; - bool end_format=false; - const char* fmt = format; + bool end_format = false; + const char *fmt = format; char ch; while (true) { - // Skip to next '%' while (*fmt != 0 && *fmt != '%') fmt++; @@ -295,8 +286,16 @@ int pbl_snprintf(char * str, size_t n, const char * format, ...) { case ' ': case '-': case '#': - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case '.': break; @@ -325,20 +324,22 @@ int pbl_snprintf(char * str, size_t n, const char * format, ...) { default: end_spec = true; break; - } // end of switch statement + } // end of switch statement - } // while (!end_spec); + } // while (!end_spec); if (end_format || has_fp) break; - } // while (true) + } // while (true) // Return error message if we detected floating point if (has_fp) { - APP_LOG(APP_LOG_LEVEL_DEBUG, "Floating point is not supported by snprintf: " - "it was called with format string '%s'", format); - strncpy(str, fp_msg, n-1); - str[n-1] = 0; + APP_LOG(APP_LOG_LEVEL_DEBUG, + "Floating point is not supported by snprintf: " + "it was called with format string '%s'", + format); + strncpy(str, fp_msg, n - 1); + str[n - 1] = 0; return strlen(str); } diff --git a/src/fw/applib/pbl_std/pbl_std.h b/src/fw/applib/pbl_std/pbl_std.h index 3e6ab4d667..03189995bb 100644 --- a/src/fw/applib/pbl_std/pbl_std.h +++ b/src/fw/applib/pbl_std/pbl_std.h @@ -80,11 +80,11 @@ uint16_t pbl_override_time_ms_legacy(time_t *t_loc, uint16_t *out_ms); //! @param tm_p A pointer to a struct tm containing a broken out time value //! @return The number of bytes placed in the array s, not including the null byte, //! 0 if the value does not fit. -size_t pbl_strftime(char* s, size_t maxsize, const char* format, const struct tm* tm_p); +size_t pbl_strftime(char *s, size_t maxsize, const char *format, const struct tm *tm_p); //! @} // end addtogroup StandardTime //! @} // end addtogroup StandardC -int pbl_snprintf(char * str, size_t n, const char * format, ...); +int pbl_snprintf(char *str, size_t n, const char *format, ...); void *pbl_memcpy(void *destination, const void *source, size_t num); diff --git a/src/fw/applib/pbl_std/strftime.c b/src/fw/applib/pbl_std/strftime.c index 9e9c3ac567..bb3faa74e4 100644 --- a/src/fw/applib/pbl_std/strftime.c +++ b/src/fw/applib/pbl_std/strftime.c @@ -25,11 +25,11 @@ #include "pbl/util/math.h" #define INTFMT_PADSPACE (0) -#define INTFMT_PADZERO (1) +#define INTFMT_PADZERO (1) // Used for wrong specifiers that want Monday as first day of the week. static int prv_week_of_year(const struct tm *t, bool monday_is_first_day) { - int wday = t->tm_wday; // Week day in range 0-6 (Sun-Sat) + int wday = t->tm_wday; // Week day in range 0-6 (Sun-Sat) if (monday_is_first_day) { wday = (wday + 6) % 7; } @@ -49,25 +49,24 @@ static int prv_iso8601_base_week(const struct tm *t) { } // Here be dragons -static int prv_year_week_count(int year, const struct tm *t, - int normal_compare, int leap_compare) { -/* -Find first wday of the year. +static int prv_year_week_count(int year, const struct tm *t, int normal_compare, int leap_compare) { + /* + Find first wday of the year. - CurWday -CurYday| 0 | 1 | 2 | 3 | 4 | 5 | 6 | - 0 | Sun | Mon | Tue | Wed | Thu | Fri | Sat | - 1 | Sat | Sun | Mon | Tue | Wed | Thu | Fri | - 2 | Fri | Sat | Sun | Mon | Tue | Wed | Thu | + CurWday + CurYday| 0 | 1 | 2 | 3 | 4 | 5 | 6 | + 0 | Sun | Mon | Tue | Wed | Thu | Fri | Sat | + 1 | Sat | Sun | Mon | Tue | Wed | Thu | Fri | + 2 | Fri | Sat | Sun | Mon | Tue | Wed | Thu | -wday - yday + wday - yday -6 - 0 = 6 = Sat -6 - 2 = 4 = Thu -0 - 2 = -2+7 = 5 = Fri + 6 - 0 = 6 = Sat + 6 - 2 = 4 = Thu + 0 - 2 = -2+7 = 5 = Fri -(wday - yday % 7) -*/ + (wday - yday % 7) + */ // First wday of the year int wday = (((t->tm_wday - t->tm_yday) % 7) + 7) % 7; @@ -112,15 +111,15 @@ static int prv_iso8601_week(const struct tm *t) { } // Sorry I made a mess, it was in the name of size. -size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * restrict fmt, - const struct tm * restrict t, const char *locale) { +size_t localized_strftime(char *restrict dest_str, size_t maxsize, const char *restrict fmt, + const struct tm *restrict t, const char *locale) { const struct lc_time_T *time_locale = time_locale_get(); size_t left = maxsize; const int year = prv_full_year(t->tm_year); const int hour_12h = (t->tm_hour % 12 == 0) ? 12 : (t->tm_hour % 12); // Only use i18n if we're in the kernel, or the app locale is the system locale. - const bool use_i18n = !locale || - (strncmp(locale, app_get_system_locale(), ISO_LOCALE_LENGTH) == 0); + const bool use_i18n = + !locale || (strncmp(locale, app_get_system_locale(), ISO_LOCALE_LENGTH) == 0); while (left) { // Copy up to the next '%' @@ -169,32 +168,37 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * } // Helper macros to make goto stuff look cleaner -#define FMT_STRCOPY(V) do { \ - i18nstr = NULL; \ - cpystr = V; \ - goto _fmt_strcopy; \ -} while (0) -#define FMT_STRCOPY_I18N(V) do { \ - i18nstr = V; \ - goto _fmt_strcopy; \ -} while (0) - -#define FMT_INTCOPY(V, L, F) do { \ - cpyint_val = V; \ - cpyint_len = L; \ - cpyint_flag = F; \ - goto _fmt_intcopy; \ -} while (0) - -#define FMT_RECURSE(FMT) do { \ - i18nstr = NULL; \ - cpystr = FMT; \ - goto _fmt_recurse; \ -} while (0) -#define FMT_RECURSE_I18N(FMT) do { \ - i18nstr = FMT; \ - goto _fmt_recurse; \ -} while (0) +#define FMT_STRCOPY(V) \ + do { \ + i18nstr = NULL; \ + cpystr = V; \ + goto _fmt_strcopy; \ + } while (0) +#define FMT_STRCOPY_I18N(V) \ + do { \ + i18nstr = V; \ + goto _fmt_strcopy; \ + } while (0) + +#define FMT_INTCOPY(V, L, F) \ + do { \ + cpyint_val = V; \ + cpyint_len = L; \ + cpyint_flag = F; \ + goto _fmt_intcopy; \ + } while (0) + +#define FMT_RECURSE(FMT) \ + do { \ + i18nstr = NULL; \ + cpystr = FMT; \ + goto _fmt_recurse; \ + } while (0) +#define FMT_RECURSE_I18N(FMT) \ + do { \ + i18nstr = FMT; \ + goto _fmt_recurse; \ + } while (0) // Terrible local state for goto hell const char *cpystr = NULL; @@ -206,7 +210,7 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * switch (*fmt) { case 'a': FMT_STRCOPY_I18N(time_locale->wday[t->tm_wday % DAYS_PER_WEEK]); -_fmt_strcopy: + _fmt_strcopy: // old strftime doesn't use 'width' for strings if (!use_i18n && i18nstr) { cpystr = i18nstr; @@ -231,7 +235,7 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * case 'A': FMT_STRCOPY_I18N(time_locale->weekday[t->tm_wday % DAYS_PER_WEEK]); break; - case 'h': // SU + case 'h': // SU case 'b': FMT_STRCOPY_I18N(time_locale->mon[t->tm_mon % MONTHS_PER_YEAR]); break; @@ -240,7 +244,7 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * break; case 'c': FMT_RECURSE_I18N(time_locale->c_fmt); -_fmt_recurse: + _fmt_recurse: if (!use_i18n && i18nstr) { cpystr = i18nstr; i18nstr = NULL; @@ -258,42 +262,40 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * dest_str += length; left -= length; break; - case 'C': // SU + case 'C': // SU FMT_INTCOPY(year / 100, 2, INTFMT_PADZERO); -_fmt_intcopy: - { - const char *intfmt; - if (pad != '\0' || cpyint_flag == INTFMT_PADZERO) { - intfmt = "%0*d"; - } else { - intfmt = "%*d"; - } - width = MAX(width, cpyint_len); - length = snprintf(NULL, 0, intfmt, width, cpyint_val); - if (left <= length) { - goto _out_of_size; - } - sprintf(dest_str, intfmt, width, cpyint_val); - dest_str += length; - left -= length; + _fmt_intcopy: { + const char *intfmt; + if (pad != '\0' || cpyint_flag == INTFMT_PADZERO) { + intfmt = "%0*d"; + } else { + intfmt = "%*d"; } - break; + width = MAX(width, cpyint_len); + length = snprintf(NULL, 0, intfmt, width, cpyint_val); + if (left <= length) { + goto _out_of_size; + } + sprintf(dest_str, intfmt, width, cpyint_val); + dest_str += length; + left -= length; + } break; case 'd': FMT_INTCOPY(t->tm_mday, 2, INTFMT_PADZERO); break; - case 'D': // SU + case 'D': // SU FMT_RECURSE("%m/%d/%y"); break; - case 'e': // SU + case 'e': // SU FMT_INTCOPY(t->tm_mday, 2, INTFMT_PADSPACE); break; - case 'F': // C99 + case 'F': // C99 FMT_RECURSE("%Y-%m-%d"); break; - case 'g': // TZ + case 'g': // TZ FMT_INTCOPY(prv_iso8601_year(t) % 100, 2, INTFMT_PADZERO); break; - case 'G': // TZ + case 'G': // TZ FMT_INTCOPY(prv_iso8601_year(t), 4, INTFMT_PADZERO); break; case 'H': @@ -303,12 +305,12 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * FMT_INTCOPY(hour_12h, 2, INTFMT_PADZERO); break; case 'j': - FMT_INTCOPY(t->tm_yday+1, 3, INTFMT_PADZERO); + FMT_INTCOPY(t->tm_yday + 1, 3, INTFMT_PADZERO); break; - case 'k': // TZ + case 'k': // TZ FMT_INTCOPY(t->tm_hour, 2, INTFMT_PADSPACE); break; - case 'l': // TZ + case 'l': // TZ FMT_INTCOPY(hour_12h, 2, INTFMT_PADSPACE); break; case 'm': @@ -317,7 +319,7 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * case 'M': FMT_INTCOPY(t->tm_min, 2, INTFMT_PADZERO); break; - case 'r': // SU + case 'r': // SU FMT_RECURSE_I18N(time_locale->r_fmt); break; case 'p': @@ -327,23 +329,23 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * FMT_STRCOPY_I18N(time_locale->am_pm_upcase[1]); } break; - case 'P': // GNU + case 'P': // GNU if (t->tm_hour < 12) { FMT_STRCOPY_I18N(time_locale->am_pm_downcase[0]); } else { FMT_STRCOPY_I18N(time_locale->am_pm_downcase[1]); } break; - case 'R': // SU + case 'R': // SU FMT_RECURSE("%H:%M"); break; case 'S': FMT_INTCOPY(t->tm_sec, 2, INTFMT_PADZERO); break; - case 'T': // SU + case 'T': // SU FMT_RECURSE("%H:%M:%S"); break; - case 'u': // SU + case 'u': // SU if (t->tm_wday == 0) { FMT_INTCOPY(7, 1, INTFMT_PADZERO); break; @@ -356,7 +358,7 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * // Week starting on Sunday FMT_INTCOPY(prv_week_of_year(t, false), 2, INTFMT_PADZERO); break; - case 'V': // SU + case 'V': // SU FMT_INTCOPY(prv_iso8601_week(t), 2, INTFMT_PADZERO); break; case 'W': @@ -388,21 +390,21 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * FMT_STRCOPY(t->tm_zone); break; - case 'n': // SU + case 'n': // SU *dest_str++ = '\n'; goto _fmt_chcopy; - case 't': // SU + case 't': // SU *dest_str++ = '\t'; goto _fmt_chcopy; // Copy stuff case '%': *dest_str++ = '%'; -_fmt_chcopy: + _fmt_chcopy: left--; break; - case 's': // TZ // Old implementation didn't have it, skip it for code size. - case '+': // TZ // Old implementation didn't have it, skip it for code size. - default: // Old implementation just ignores invalid specifiers + case 's': // TZ // Old implementation didn't have it, skip it for code size. + case '+': // TZ // Old implementation didn't have it, skip it for code size. + default: // Old implementation just ignores invalid specifiers break; } fmt++; @@ -419,7 +421,7 @@ size_t localized_strftime(char * restrict dest_str, size_t maxsize, const char * return 0; } -size_t strftime(char * restrict s, size_t maxsize, const char* format, const struct tm* tim_p) { +size_t strftime(char *restrict s, size_t maxsize, const char *format, const struct tm *tim_p) { // Pass a NULL locale because firmware strftime is always localized return localized_strftime(s, maxsize, format, tim_p, NULL); } diff --git a/src/fw/applib/pbl_std/timelocal.c b/src/fw/applib/pbl_std/timelocal.c index 8964d1de5b..a9856ebaa2 100644 --- a/src/fw/applib/pbl_std/timelocal.c +++ b/src/fw/applib/pbl_std/timelocal.c @@ -34,32 +34,36 @@ #define LCTIME_SIZE (sizeof(struct lc_time_T) / sizeof(char *)) static const struct lc_time_T _C_time_locale = { - .mon = { - i18n_noop("Jan"), i18n_noop("Feb"), i18n_noop("Mar"), i18n_noop("Apr"), i18n_noop("May"), - i18n_noop("Jun"), i18n_noop("Jul"), i18n_noop("Aug"), i18n_noop("Sep"), i18n_noop("Oct"), - i18n_noop("Nov"), i18n_noop("Dec") - }, - .month = { - i18n_noop("January"), i18n_noop("February"), i18n_noop("March"), i18n_noop("April"), - i18n_noop("May"), i18n_noop("June"), i18n_noop("July"), i18n_noop("August"), - i18n_noop("September"), i18n_noop("October"), i18n_noop("November"), i18n_noop("December") - }, - .wday = { - i18n_noop("Sun"), i18n_noop("Mon"), i18n_noop("Tue"), i18n_noop("Wed"), - i18n_noop("Thu"), i18n_noop("Fri"), i18n_noop("Sat") - }, - .weekday = { - i18n_noop("Sunday"), i18n_noop("Monday"), i18n_noop("Tuesday"), i18n_noop("Wednesday"), - i18n_noop("Thursday"), i18n_noop("Friday"), i18n_noop("Saturday") - }, + .mon = + {i18n_noop("Jan"), i18n_noop("Feb"), i18n_noop("Mar"), i18n_noop("Apr"), i18n_noop("May"), + i18n_noop("Jun"), i18n_noop("Jul"), i18n_noop("Aug"), i18n_noop("Sep"), i18n_noop("Oct"), + i18n_noop("Nov"), i18n_noop("Dec")}, + .month = + {i18n_noop("January"), i18n_noop("February"), i18n_noop("March"), i18n_noop("April"), + i18n_noop("May"), i18n_noop("June"), i18n_noop("July"), i18n_noop("August"), + i18n_noop("September"), i18n_noop("October"), i18n_noop("November"), + i18n_noop("December")}, + .wday = + {i18n_noop("Sun"), i18n_noop("Mon"), i18n_noop("Tue"), i18n_noop("Wed"), i18n_noop("Thu"), + i18n_noop("Fri"), i18n_noop("Sat")}, + .weekday = + {i18n_noop("Sunday"), i18n_noop("Monday"), i18n_noop("Tuesday"), i18n_noop("Wednesday"), + i18n_noop("Thursday"), i18n_noop("Friday"), i18n_noop("Saturday")}, - .X_fmt = i18n_noop("%H:%M:%S"), - .x_fmt = i18n_noop("%m/%d/%y"), - .c_fmt = i18n_noop("%a %b %e %H:%M:%S %Y"), - .r_fmt = i18n_noop("%I:%M:%S %p"), + .X_fmt = i18n_noop("%H:%M:%S"), + .x_fmt = i18n_noop("%m/%d/%y"), + .c_fmt = i18n_noop("%a %b %e %H:%M:%S %Y"), + .r_fmt = i18n_noop("%I:%M:%S %p"), - .am_pm_upcase = { i18n_noop("AM"), i18n_noop("PM"), }, - .am_pm_downcase = { i18n_noop("am"), i18n_noop("pm"), }, + .am_pm_upcase = + { + i18n_noop("AM"), + i18n_noop("PM"), + }, + .am_pm_downcase = { + i18n_noop("am"), + i18n_noop("pm"), + }, }; const struct lc_time_T *time_locale_get(void) { diff --git a/src/fw/applib/pebble_warn_unsupported_functions.h b/src/fw/applib/pebble_warn_unsupported_functions.h index 611aa9054a..5589bc21da 100644 --- a/src/fw/applib/pebble_warn_unsupported_functions.h +++ b/src/fw/applib/pebble_warn_unsupported_functions.h @@ -1,47 +1,47 @@ /* SPDX-FileCopyrightText: 2024 Google LLC */ /* SPDX-License-Identifier: Apache-2.0 */ -/* This file provides clear error messages when developer +/* This file provides clear error messages when developer * attempts to use a function call supported by newlib-c but * not provided by the pebble libraries. * * ex. use of fopen("test.txt", "r") will display... * src/main.c:123:3 error: static assertion failed: "fopen() is not supported" -*/ + */ -// Rather than asserting on printf, +// Rather than asserting on printf, // lets map it to app_log for simple cross-compiles #define printf(format, ...) \ app_log(APP_LOG_LEVEL_DEBUG, __FILE_NAME__, __LINE__, format, ##__VA_ARGS__) // List of unsupported file io calls -#define fopen(...) _Static_assert(0, "fopen() is not supported") -#define fclose(...) _Static_assert(0, "fclose() is not supported") -#define fread(...) _Static_assert(0, "fread() is not supported") -#define fwrite(...) _Static_assert(0, "fwrite() is not supported") -#define fseek(...) _Static_assert(0, "fseek() is not supported") -#define ftell(...) _Static_assert(0, "ftell() is not supported") -#define fsetpos(...) _Static_assert(0, "fsetpos() is not supported") -#define fscanf(...) _Static_assert(0, "fscanf() is not supported") -#define fgetc(...) _Static_assert(0, "fgetc() is not supported") -#define fgets(...) _Static_assert(0, "fgets() is not supported") -#define fputc(...) _Static_assert(0, "fputc() is not supported") -#define fputs(...) _Static_assert(0, "fputs() is not supported") +#define fopen(...) _Static_assert(0, "fopen() is not supported") +#define fclose(...) _Static_assert(0, "fclose() is not supported") +#define fread(...) _Static_assert(0, "fread() is not supported") +#define fwrite(...) _Static_assert(0, "fwrite() is not supported") +#define fseek(...) _Static_assert(0, "fseek() is not supported") +#define ftell(...) _Static_assert(0, "ftell() is not supported") +#define fsetpos(...) _Static_assert(0, "fsetpos() is not supported") +#define fscanf(...) _Static_assert(0, "fscanf() is not supported") +#define fgetc(...) _Static_assert(0, "fgetc() is not supported") +#define fgets(...) _Static_assert(0, "fgets() is not supported") +#define fputc(...) _Static_assert(0, "fputc() is not supported") +#define fputs(...) _Static_assert(0, "fputs() is not supported") // List of unsupported print calls -#define fprintf(...) _Static_assert(0, "fprintf() is not supported") -#define sprintf(...) _Static_assert(0, "sprintf() is not supported") -#define vfprintf(...) _Static_assert(0, "vfprintf() is not supported") -#define vsprintf(...) _Static_assert(0, "vsprintf() is not supported") -#define vsnprintf(...) _Static_assert(0, "vsnprintf() is not supported") +#define fprintf(...) _Static_assert(0, "fprintf() is not supported") +#define sprintf(...) _Static_assert(0, "sprintf() is not supported") +#define vfprintf(...) _Static_assert(0, "vfprintf() is not supported") +#define vsprintf(...) _Static_assert(0, "vsprintf() is not supported") +#define vsnprintf(...) _Static_assert(0, "vsnprintf() is not supported") // List of unsupported io calls -#define open(...) _Static_assert(0, "open() is not supported") -#define close(...) _Static_assert(0, "close() is not supported") -#define creat(...) _Static_assert(0, "creat() is not supported") -#define read(...) _Static_assert(0, "read() is not supported") -#define write(...) _Static_assert(0, "write() is not supported") -#define stat(...) _Static_assert(0, "stat() is not supported") +#define open(...) _Static_assert(0, "open() is not supported") +#define close(...) _Static_assert(0, "close() is not supported") +#define creat(...) _Static_assert(0, "creat() is not supported") +#define read(...) _Static_assert(0, "read() is not supported") +#define write(...) _Static_assert(0, "write() is not supported") +#define stat(...) _Static_assert(0, "stat() is not supported") // List of unsupported memory calls @@ -49,8 +49,7 @@ // used in the SDK. #undef is a no-op if there's no such macro. #undef alloca -#define alloca(...) _Static_assert(0, "alloca() is not supported") -#define mmap(...) _Static_assert(0, "mmap() is not supported") -#define brk(...) _Static_assert(0, "brk() is not supported") -#define sbrk(...) _Static_assert(0, "sbrk() is not supported") - +#define alloca(...) _Static_assert(0, "alloca() is not supported") +#define mmap(...) _Static_assert(0, "mmap() is not supported") +#define brk(...) _Static_assert(0, "brk() is not supported") +#define sbrk(...) _Static_assert(0, "sbrk() is not supported") diff --git a/src/fw/applib/persist.c b/src/fw/applib/persist.c index 645d35a9b3..e0904eb5f4 100644 --- a/src/fw/applib/persist.c +++ b/src/fw/applib/persist.c @@ -11,15 +11,12 @@ #include "syscall/syscall_internal.h" #include "pbl/util/math.h" - _Static_assert(PERSIST_DATA_MAX_LENGTH <= SETTINGS_VAL_MAX_LEN, "PERSIST_DATA_MAX_LENGTH is larger than the max length that " "settings_file supports."); - -static SettingsFile * prv_lock_and_get_store(void) { - return persist_service_lock_and_get_store( - &sys_process_manager_get_current_process_md()->uuid); +static SettingsFile *prv_lock_and_get_store(void) { + return persist_service_lock_and_get_store(&sys_process_manager_get_current_process_md()->uuid); } static void prv_unlock(SettingsFile **store) { @@ -27,9 +24,7 @@ static void prv_unlock(SettingsFile **store) { } #define LOCK_AND_GET_STORE(name) \ - SettingsFile *name __attribute__((cleanup(prv_unlock))) \ - = prv_lock_and_get_store() - + SettingsFile *name __attribute__((cleanup(prv_unlock))) = prv_lock_and_get_store() DEFINE_SYSCALL(size_t, persist_get_max_size, void) { return persist_service_get_max_size(); @@ -60,8 +55,7 @@ DEFINE_SYSCALL(int32_t, persist_read_int, const uint32_t key) { return value; } -DEFINE_SYSCALL(int, persist_read_data, const uint32_t key, - void *buffer, const size_t buffer_size) { +DEFINE_SYSCALL(int, persist_read_data, const uint32_t key, void *buffer, const size_t buffer_size) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(buffer, buffer_size); } @@ -75,8 +69,7 @@ DEFINE_SYSCALL(int, persist_read_data, const uint32_t key, } const size_t restricted_size = MIN(buffer_size, (size_t)len); - const status_t read_result = settings_file_get( - store, &key, sizeof(key), buffer, restricted_size); + const status_t read_result = settings_file_get(store, &key, sizeof(key), buffer, restricted_size); if (FAILED(read_result)) { RETURN_STATUS_UP(read_result); } @@ -84,13 +77,11 @@ DEFINE_SYSCALL(int, persist_read_data, const uint32_t key, } // Legacy version to prevent previous app breakage, __deprecated preserves order -int persist_read_data__deprecated(const uint32_t key, - const size_t buffer_size, void *buffer) { +int persist_read_data__deprecated(const uint32_t key, const size_t buffer_size, void *buffer) { return persist_read_data(key, buffer, buffer_size); } -int persist_read_string(const uint32_t key, - char *buffer, const size_t buffer_size) { +int persist_read_string(const uint32_t key, char *buffer, const size_t buffer_size) { const int read_result = persist_read_data(key, buffer, buffer_size); if (PASSED(read_result)) { buffer[read_result - 1] = '\0'; @@ -99,47 +90,43 @@ int persist_read_string(const uint32_t key, } // Legacy version to prevent previous app breakage, __deprecated preserves order -int persist_read_string__deprecated(const uint32_t key, - const size_t buffer_size, char *buffer) { +int persist_read_string__deprecated(const uint32_t key, const size_t buffer_size, char *buffer) { return persist_read_string(key, buffer, buffer_size); } DEFINE_SYSCALL(status_t, persist_write_bool, const uint32_t key, const bool value) { LOCK_AND_GET_STORE(store); - status_t result = settings_file_set(store, &key, sizeof(key), - &value, sizeof(value)); + status_t result = settings_file_set(store, &key, sizeof(key), &value, sizeof(value)); return PASSED(result) ? (status_t)sizeof(value) : result; } DEFINE_SYSCALL(status_t, persist_write_int, const uint32_t key, const int32_t value) { LOCK_AND_GET_STORE(store); - status_t result = settings_file_set(store, &key, sizeof(key), - &value, sizeof(value)); + status_t result = settings_file_set(store, &key, sizeof(key), &value, sizeof(value)); return PASSED(result) ? (status_t)sizeof(value) : result; } // FIXME: PBL-23877 Disallow and document persist write data of length 0 edge case -DEFINE_SYSCALL(int, persist_write_data, const uint32_t key, - const void *buffer, const size_t buffer_size) { +DEFINE_SYSCALL(int, persist_write_data, const uint32_t key, const void *buffer, + const size_t buffer_size) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(buffer, buffer_size); } const size_t restricted_size = MIN(buffer_size, PERSIST_DATA_MAX_LENGTH); LOCK_AND_GET_STORE(store); - int result = settings_file_set(store, &key, sizeof(key), - buffer, restricted_size); + int result = settings_file_set(store, &key, sizeof(key), buffer, restricted_size); return PASSED(result) ? (int)restricted_size : result; } // Legacy version to prevent previous app breakage, __deprecated preserves order -int persist_write_data__deprecated(const uint32_t key, const size_t buffer_size, const void *buffer) { +int persist_write_data__deprecated(const uint32_t key, const size_t buffer_size, + const void *buffer) { return persist_write_data(key, buffer, buffer_size); } DEFINE_SYSCALL(int, persist_write_string, const uint32_t key, const char *cstring) { if (PRIVILEGE_WAS_ELEVATED) { - if (!memory_layout_is_cstring_in_region( - memory_layout_get_app_region(), cstring, -1)) { + if (!memory_layout_is_cstring_in_region(memory_layout_get_app_region(), cstring, -1)) { syscall_failed(); } } diff --git a/src/fw/applib/persist.h b/src/fw/applib/persist.h index 04f81f84c1..9067bafb9d 100644 --- a/src/fw/applib/persist.h +++ b/src/fw/applib/persist.h @@ -22,16 +22,16 @@ //! like saving user settings, caching data from the phone app, or counting high scores for //! Pebble watchapp games. //! -//! In Pebble OS, storage is defined by a collection of fields that you can create, modify or delete. -//! In the API, a field is specified as a key with a corresponding value. +//! In Pebble OS, storage is defined by a collection of fields that you can create, modify or +//! delete. In the API, a field is specified as a key with a corresponding value. //! //! Using the Storage API, every app is able to get its own persistent storage space. Each value //! in that space is associated with a uint32_t key. //! //! Storage supports saving integers, strings and byte arrays. The maximum size of byte arrays and -//! strings is defined by PERSIST_DATA_MAX_LENGTH (currently set to 256 bytes). You call the function -//! persist_exists(key), which returns a boolean indicating if the key exists or not. -//! The Storage API enables your app to save its state, and when compared to using \ref AppMessage to +//! strings is defined by PERSIST_DATA_MAX_LENGTH (currently set to 256 bytes). You call the +//! function persist_exists(key), which returns a boolean indicating if the key exists or not. The +//! Storage API enables your app to save its state, and when compared to using \ref AppMessage to //! retrieve values from the phone, it provides you with a much faster way to restore state. //! In addition, it draws less power from the battery. //! @@ -135,9 +135,9 @@ int persist_write_string(const uint32_t key, const char *cstring); //! Deletes the value of a key from persistent storage. //! @param key The key of the field to delete from. -//! @return S_TRUE if successful, E_DOES_NOT_EXIST if a value was not set, or another error value from \ref StatusCode. +//! @return S_TRUE if successful, E_DOES_NOT_EXIST if a value was not set, or another error value +//! from \ref StatusCode. status_t persist_delete(const uint32_t key); //! @} // end addtogroup Storage //! @} // end addtogroup Foundation - diff --git a/src/fw/applib/platform.h b/src/fw/applib/platform.h index 68fdc27090..237cf8c8d5 100644 --- a/src/fw/applib/platform.h +++ b/src/fw/applib/platform.h @@ -16,46 +16,46 @@ typedef enum PlatformType { // Unit tests and the firmware don't define the SDK platform defines because reasons. // Therefore, we need to switch on the platform for the platform type. #if !defined(SDK) - // Variant boards should go before their base platforms, as they define the base platform too. - #ifdef CONFIG_PLATFORM_EMERY - #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeEmery - #elif defined(CONFIG_PLATFORM_FLINT) - #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeFlint - #elif defined(CONFIG_PLATFORM_GABBRO) - #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeGabbro - #else - #error "PBL_PLATFORM_TYPE_CURRENT couldn't be determined: No PLATFORM_* defined!" - #endif +// Variant boards should go before their base platforms, as they define the base platform too. +#ifdef CONFIG_PLATFORM_EMERY +#define PBL_PLATFORM_TYPE_CURRENT PlatformTypeEmery +#elif defined(CONFIG_PLATFORM_FLINT) +#define PBL_PLATFORM_TYPE_CURRENT PlatformTypeFlint +#elif defined(CONFIG_PLATFORM_GABBRO) +#define PBL_PLATFORM_TYPE_CURRENT PlatformTypeGabbro #else - #if PBL_PLATFORM_APLITE - #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeAplite - #elif PBL_PLATFORM_BASALT - #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeBasalt - #elif PBL_PLATFORM_CHALK - #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeChalk - #elif PBL_PLATFORM_DIORITE - #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeDiorite - #elif PBL_PLATFORM_EMERY - #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeEmery - #elif PBL_PLATFORM_FLINT - #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeFlint - #elif PBL_PLATFORM_GABBRO - #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeGabbro - #else - #error "PBL_PLATFORM_TYPE_CURRENT couldn't be determined: No PBL_PLATFORM_* defined!" - #endif +#error "PBL_PLATFORM_TYPE_CURRENT couldn't be determined: No PLATFORM_* defined!" +#endif +#else +#if PBL_PLATFORM_APLITE +#define PBL_PLATFORM_TYPE_CURRENT PlatformTypeAplite +#elif PBL_PLATFORM_BASALT +#define PBL_PLATFORM_TYPE_CURRENT PlatformTypeBasalt +#elif PBL_PLATFORM_CHALK +#define PBL_PLATFORM_TYPE_CURRENT PlatformTypeChalk +#elif PBL_PLATFORM_DIORITE +#define PBL_PLATFORM_TYPE_CURRENT PlatformTypeDiorite +#elif PBL_PLATFORM_EMERY +#define PBL_PLATFORM_TYPE_CURRENT PlatformTypeEmery +#elif PBL_PLATFORM_FLINT +#define PBL_PLATFORM_TYPE_CURRENT PlatformTypeFlint +#elif PBL_PLATFORM_GABBRO +#define PBL_PLATFORM_TYPE_CURRENT PlatformTypeGabbro +#else +#error "PBL_PLATFORM_TYPE_CURRENT couldn't be determined: No PBL_PLATFORM_* defined!" +#endif #endif -#define PBL_PLATFORM_SWITCH_DEFAULT(PLAT, DEFAULT, APLITE, BASALT, CHALK, DIORITE, EMERY, FLINT, GABBRO) (\ - ((PLAT) == PlatformTypeFlint) ? (FLINT) : \ - ((PLAT) == PlatformTypeEmery) ? (EMERY) : \ - ((PLAT) == PlatformTypeDiorite) ? (DIORITE) : \ - ((PLAT) == PlatformTypeChalk) ? (CHALK) : \ - ((PLAT) == PlatformTypeBasalt) ? (BASALT) : \ - ((PLAT) == PlatformTypeAplite) ? (APLITE) : \ - ((PLAT) == PlatformTypeGabbro) ? (GABBRO) : \ - (DEFAULT) \ -) +#define PBL_PLATFORM_SWITCH_DEFAULT(PLAT, DEFAULT, APLITE, BASALT, CHALK, DIORITE, EMERY, FLINT, \ + GABBRO) \ + (((PLAT) == PlatformTypeFlint) ? (FLINT) \ + : ((PLAT) == PlatformTypeEmery) ? (EMERY) \ + : ((PLAT) == PlatformTypeDiorite) ? (DIORITE) \ + : ((PLAT) == PlatformTypeChalk) ? (CHALK) \ + : ((PLAT) == PlatformTypeBasalt) ? (BASALT) \ + : ((PLAT) == PlatformTypeAplite) ? (APLITE) \ + : ((PLAT) == PlatformTypeGabbro) ? (GABBRO) \ + : (DEFAULT)) // We fall back to Aplite because we need to fall back on _one_ of the given arguments. // This prevents issues with sometimes using this for pointers/strings, and sometimes for ints. @@ -65,14 +65,8 @@ typedef enum PlatformType { #define PBL_PLATFORM_SWITCH(PLAT, APLITE, BASALT, CHALK, DIORITE, EMERY, FLINT, GABBRO) \ PBL_PLATFORM_SWITCH_DEFAULT(PLAT, APLITE, APLITE, BASALT, CHALK, DIORITE, EMERY, FLINT, GABBRO) - // INTERNAL -#define platform_type_get_name(plat) PBL_PLATFORM_SWITCH_DEFAULT(plat, \ - /*default*/ "unknown", \ - /*aplite*/ "aplite", \ - /*basalt*/ "basalt", \ - /*chalk*/ "chalk", \ - /*diorite*/ "diorite", \ - /*emery*/ "emery", \ - /*flint*/ "flint", \ - /*gabbro*/ "gabbro") +#define platform_type_get_name(plat) \ + PBL_PLATFORM_SWITCH_DEFAULT(plat, /*default*/ "unknown", /*aplite*/ "aplite", \ + /*basalt*/ "basalt", /*chalk*/ "chalk", /*diorite*/ "diorite", \ + /*emery*/ "emery", /*flint*/ "flint", /*gabbro*/ "gabbro") diff --git a/src/fw/applib/plugin_service.c b/src/fw/applib/plugin_service.c index 9129bb882e..7b6a5be5db 100644 --- a/src/fw/applib/plugin_service.c +++ b/src/fw/applib/plugin_service.c @@ -14,7 +14,7 @@ // --------------------------------------------------------------------------------------------------------------- // Get our state variables -static PluginServiceState* prv_get_state(PebbleTask task) { +static PluginServiceState *prv_get_state(PebbleTask task) { if (task == PebbleTask_Unknown) { task = pebble_task_get_current(); } @@ -26,15 +26,14 @@ static PluginServiceState* prv_get_state(PebbleTask task) { } } - // --------------------------------------------------------------------------------------------------------------- -// Lookup the plugin service index from the UUID. We store the index in the event structure instead of the UUID +// Lookup the plugin service index from the UUID. We store the index in the event structure instead +// of the UUID // so that we have payload room. static uint16_t prv_get_service_index(Uuid *uuid) { return sys_event_service_get_plugin_service_index(uuid); } - // --------------------------------------------------------------------------------------------------------------- // Used by list_find to locate the handler for a specific service index. static bool prv_service_filter(ListNode *node, void *tp) { @@ -43,18 +42,18 @@ static bool prv_service_filter(ListNode *node, void *tp) { return (info->service_index == service_idx); } - // --------------------------------------------------------------------------------------------------------------- -// Callback provided to the app_event_service. All events of type PEBBLE_PLUGIN_SERVICE_EVENT that get sent to -// this task trigger this callback. From here, we look up which user-supplied callback corresponds to the -// service index stored in the event structure and then pass control to that user-supplied callback. +// Callback provided to the app_event_service. All events of type PEBBLE_PLUGIN_SERVICE_EVENT that +// get sent to this task trigger this callback. From here, we look up which user-supplied callback +// corresponds to the service index stored in the event structure and then pass control to that +// user-supplied callback. static void prv_handle_event_service_event(PebbleEvent *e, void *context) { PluginServiceState *state = prv_get_state(PebbleTask_Unknown); uint16_t service_index = e->plugin_service.service_index; ListNode *found; ListNode *list = &state->subscribed_services; - found = list_find(list, prv_service_filter, (void*)(uintptr_t)service_index); + found = list_find(list, prv_service_filter, (void *)(uintptr_t)service_index); if (!found) { return; } @@ -64,7 +63,6 @@ static void prv_handle_event_service_event(PebbleEvent *e, void *context) { entry->handler(e->plugin_service.type, &e->plugin_service.data); } - // --------------------------------------------------------------------------------------------------------------- // Subscribe to a specific plug-in service by uuid. bool plugin_service_subscribe(Uuid *uuid, PluginServiceHandler handler) { @@ -72,7 +70,7 @@ bool plugin_service_subscribe(Uuid *uuid, PluginServiceHandler handler) { uint16_t service_index = prv_get_service_index(uuid); ListNode *list = &state->subscribed_services; - if (list_find(list, prv_service_filter, (void*)(uintptr_t)service_index)) { + if (list_find(list, prv_service_filter, (void *)(uintptr_t)service_index)) { PBL_LOG_DBG("Plug service handler already subscribed"); return false; } @@ -95,7 +93,6 @@ bool plugin_service_subscribe(Uuid *uuid, PluginServiceHandler handler) { return true; } - // --------------------------------------------------------------------------------------------------------------- // Unsubscribe from a specific plug-in service by uuid. bool plugin_service_unsubscribe(Uuid *uuid) { @@ -104,7 +101,7 @@ bool plugin_service_unsubscribe(Uuid *uuid) { ListNode *found; ListNode *list = &state->subscribed_services; - found = list_find(list, prv_service_filter, (void*)(uintptr_t)service_index); + found = list_find(list, prv_service_filter, (void *)(uintptr_t)service_index); if (!found) { PBL_LOG_DBG("Plug service handler already unsubscribed"); return true; @@ -115,32 +112,25 @@ bool plugin_service_unsubscribe(Uuid *uuid) { return true; } - // --------------------------------------------------------------------------------------------------------------- // Send an event to all registered subscribers of the given plugin service identified by UUID. void plugin_service_send_event(Uuid *uuid, uint8_t type, PluginEventData *data) { uint16_t service_index = prv_get_service_index(uuid); PebbleEvent event = { - .type = PEBBLE_PLUGIN_SERVICE_EVENT, - .plugin_service = { - .service_index = service_index, - .type = type, - .data = *data - }, + .type = PEBBLE_PLUGIN_SERVICE_EVENT, + .plugin_service = {.service_index = service_index, .type = type, .data = *data}, }; sys_send_pebble_event_to_kernel(&event); } - // --------------------------------------------------------------------------------------------------------------- // Init our state variables. void plugin_service_state_init(PluginServiceState *state) { - *state = (PluginServiceState) { - .event_service_info = { - .type = PEBBLE_PLUGIN_SERVICE_EVENT, - .handler = &prv_handle_event_service_event, - }, + *state = (PluginServiceState){ + .event_service_info = { + .type = PEBBLE_PLUGIN_SERVICE_EVENT, + .handler = &prv_handle_event_service_event, + }, }; } - diff --git a/src/fw/applib/plugin_service.h b/src/fw/applib/plugin_service.h index 701b0d7902..fc08205ccf 100644 --- a/src/fw/applib/plugin_service.h +++ b/src/fw/applib/plugin_service.h @@ -14,16 +14,15 @@ //! //! \brief Using the PlugInSErvice //! -//! The PlugInService enables 3rd party apps to publish and subscribe to events for a custom service. For example, -//! a background worker could publish events for a custom service and any foreground app that wants to can subscribe -//! to those events. +//! The PlugInService enables 3rd party apps to publish and subscribe to events for a custom +//! service. For example, a background worker could publish events for a custom service and any +//! foreground app that wants to can subscribe to those events. //! -//! Plug-in services are identified by UUID. The client of a service will get a pointer to an event structure -//! param block whose content is unique to each service. +//! Plug-in services are identified by UUID. The client of a service will get a pointer to an event +//! structure param block whose content is unique to each service. //! //! @{ - //! Generic structure of a plug-in event that will be received by an app typedef struct { uint16_t data0; @@ -33,7 +32,8 @@ typedef struct { //! Callback type for plug-in service events //! @param type the event type -//! @param data pointer to event data. The client must know the structure of the data provided by the plug-in service. +//! @param data pointer to event data. The client must know the structure of the data provided by +//! the plug-in service. typedef void (*PluginServiceHandler)(uint8_t type, PluginEventData *data); //! Subscribe to a specific plugin service. Once subscribed, the handler @@ -48,14 +48,12 @@ bool plugin_service_subscribe(Uuid *uuid, PluginServiceHandler handler); //! @return true on success bool plugin_service_unsubscribe(Uuid *uuid); - //! Send an event for a plug-in service //! @param uuid The UUID of the plug-in service //! @param type the event type //! @param data the event data structure void plugin_service_send_event(Uuid *uuid, uint8_t type, PluginEventData *data); - //! @} // end addtogroup PlugInService //! @} // end addtogroup EventService //! @} // end addtogroup Foundation @@ -63,4 +61,3 @@ void plugin_service_send_event(Uuid *uuid, uint8_t type, PluginEventData *data); //! @internal //! Register the accelerometer service with the event service system void plugin_service_init(void); - diff --git a/src/fw/applib/plugin_service_private.h b/src/fw/applib/plugin_service_private.h index ad6cb5da06..ae58ffd44f 100644 --- a/src/fw/applib/plugin_service_private.h +++ b/src/fw/applib/plugin_service_private.h @@ -7,17 +7,15 @@ // We dynamically allocate one of these for every service we subscribe to typedef struct { - ListNode list_node; - uint16_t service_index; // index of the service - PluginServiceHandler handler; // handler for this service + ListNode list_node; + uint16_t service_index; // index of the service + PluginServiceHandler handler; // handler for this service } PluginServiceEntry; - typedef struct __attribute__((packed)) PluginServiceState { - bool subscribed_to_app_event_service : 1; // Set on first plugin_service_subscribe by this app + bool subscribed_to_app_event_service : 1; // Set on first plugin_service_subscribe by this app EventServiceInfo event_service_info; - ListNode subscribed_services; // Linked list of PluginServiceEntrys + ListNode subscribed_services; // Linked list of PluginServiceEntrys } PluginServiceState; void plugin_service_state_init(PluginServiceState *state); - diff --git a/src/fw/applib/preferred_content_size.h b/src/fw/applib/preferred_content_size.h index 6a1778476d..816c0c1fb5 100644 --- a/src/fw/applib/preferred_content_size.h +++ b/src/fw/applib/preferred_content_size.h @@ -21,7 +21,8 @@ typedef enum PreferredContentSize { } PreferredContentSize; #if !PUBLIC_SDK -//! Use display height to determine default content size: larger displays (>= 200px height) use Large +//! Use display height to determine default content size: larger displays (>= 200px height) use +//! Large #if PBL_DISPLAY_HEIGHT >= 200 #define PreferredContentSizeDefault PreferredContentSizeLarge #else @@ -34,12 +35,10 @@ typedef enum PreferredContentSize { //! @note Optimal use of this does _not_ call a function for the `SIZE` argument! If you do, it //! will be _evaluated on every comparison_, which is unlikely to be what you want! #define PREFERRED_CONTENT_SIZE_SWITCH(SIZE, SMALL, MEDIUM, LARGE, EXTRALARGE) \ - ( \ - (SIZE == PreferredContentSizeMedium) ? (MEDIUM) : \ - (SIZE == PreferredContentSizeLarge) ? (LARGE) : \ - (SIZE == PreferredContentSizeExtraLarge) ? (EXTRALARGE) : \ - (SMALL) \ - ) + ((SIZE == PreferredContentSizeMedium) ? (MEDIUM) \ + : (SIZE == PreferredContentSizeLarge) ? (LARGE) \ + : (SIZE == PreferredContentSizeExtraLarge) ? (EXTRALARGE) \ + : (SMALL)) //! Returns the user's preferred content size representing the scale of all the app's UI components //! should use for display. diff --git a/src/fw/applib/template_string.c b/src/fw/applib/template_string.c index 7c47b826a2..e1298759cc 100644 --- a/src/fw/applib/template_string.c +++ b/src/fw/applib/template_string.c @@ -54,10 +54,22 @@ static void prv_filter_time_since(TemplateStringState *state); static void prv_filter_end(TemplateStringState *state); static const FilterImplementation s_filter_impls[] = { - { "format", prv_filter_format, }, - { "time_until", prv_filter_time_until, }, - { "time_since", prv_filter_time_since, }, - { "end", prv_filter_end, }, + { + "format", + prv_filter_format, + }, + { + "time_until", + prv_filter_time_until, + }, + { + "time_since", + prv_filter_time_since, + }, + { + "end", + prv_filter_end, + }, }; static void prv_handle_escape_character(TemplateStringState *state) { @@ -103,16 +115,28 @@ T_STATIC intmax_t prv_template_predicate_time(TemplateStringState *state) { switch (*state->position) { // NOTE: This number of seconds is a hack! See PBL-39903 #if SUPPORT_YEAR - case 'y': multiplier = 365 * SECONDS_PER_DAY; break; + case 'y': + multiplier = 365 * SECONDS_PER_DAY; + break; #endif - // NOTE: This number of seconds is a hack! See PBL-39903 + // NOTE: This number of seconds is a hack! See PBL-39903 #if SUPPORT_MONTH - case 'm': multiplier = 30 * SECONDS_PER_DAY; break; + case 'm': + multiplier = 30 * SECONDS_PER_DAY; + break; #endif - case 'd': multiplier = SECONDS_PER_DAY; break; - case 'H': multiplier = SECONDS_PER_HOUR; break; - case 'M': multiplier = SECONDS_PER_MINUTE; break; - case 'S': multiplier = 1; break; + case 'd': + multiplier = SECONDS_PER_DAY; + break; + case 'H': + multiplier = SECONDS_PER_HOUR; + break; + case 'M': + multiplier = SECONDS_PER_MINUTE; + break; + case 'S': + multiplier = 1; + break; default: state->error->status = TemplateStringErrorStatus_InvalidTimeUnit; return 0; @@ -128,7 +152,6 @@ T_STATIC intmax_t prv_template_predicate_time(TemplateStringState *state) { return total_value; } - T_STATIC bool prv_template_predicate_match(TemplateStringState *state, PredicateCondition *cond, intmax_t *value) { *cond = PredicateCondition_Invalid; @@ -168,25 +191,43 @@ T_STATIC bool prv_template_predicate_match(TemplateStringState *state, Predicate } } -static const char * const s_Tstrings[3][3] = { - { "H", "M", "S", }, - { "aH", "aM", "aS", }, - { "uH", "uM", "uS", }, +static const char *const s_Tstrings[3][3] = { + { + "H", + "M", + "S", + }, + { + "aH", + "aM", + "aS", + }, + { + "uH", + "uM", + "uS", + }, }; -static const char * const s_splitters[3][2] = { - /// The first separator in `::` - { i18n_ctx_noop("TmplStringSep", ":"), - /// The second separator in `::` - i18n_ctx_noop("TmplStringSep", ":"), }, - /// The first separator in ` hr min sec` - { i18n_ctx_noop("TmplStringSep", " "), - /// The second separator in ` hr min sec` - i18n_ctx_noop("TmplStringSep", " "), }, - /// The first separator in ` hours, minutes, and seconds` - { i18n_ctx_noop("TmplStringSep", ", "), - /// The second separator in ` hours, minutes, and seconds` - i18n_ctx_noop("TmplStringSep", ", and "), }, +static const char *const s_splitters[3][2] = { + /// The first separator in `::` + { + i18n_ctx_noop("TmplStringSep", ":"), + /// The second separator in `::` + i18n_ctx_noop("TmplStringSep", ":"), + }, + /// The first separator in ` hr min sec` + { + i18n_ctx_noop("TmplStringSep", " "), + /// The second separator in ` hr min sec` + i18n_ctx_noop("TmplStringSep", " "), + }, + /// The first separator in ` hours, minutes, and seconds` + { + i18n_ctx_noop("TmplStringSep", ", "), + /// The second separator in ` hours, minutes, and seconds` + i18n_ctx_noop("TmplStringSep", ", and "), + }, }; /* @@ -256,97 +297,79 @@ static void prv_append_char(TemplateStringState *state, char c) { // Suffix columns: [0] singular, [1] plural ("few" for languages like Polish: // 2-4), [2] "many" (Polish: 0 and 5+). prv_plural_index() picks the column; // two-form languages never select [2]. -static const char * const s_second_strings[3][3] = { - /// Suffixes for seconds with no units - { i18n_ctx_noop("TmplStringSing", ""), - i18n_ctx_noop("TmplStringPlur", ""), - i18n_ctx_noop("TmplStringMany", "")}, - /// Suffixes for seconds with abbreviated units - { i18n_ctx_noop("TmplStringSing", " sec"), - i18n_ctx_noop("TmplStringPlur", " sec"), - i18n_ctx_noop("TmplStringMany", " sec")}, - /// Suffixes for seconds with full units - { i18n_ctx_noop("TmplStringSing", " second"), - i18n_ctx_noop("TmplStringPlur", " seconds"), - i18n_ctx_noop("TmplStringMany", " seconds")}, +static const char *const s_second_strings[3][3] = { + /// Suffixes for seconds with no units + {i18n_ctx_noop("TmplStringSing", ""), i18n_ctx_noop("TmplStringPlur", ""), + i18n_ctx_noop("TmplStringMany", "")}, + /// Suffixes for seconds with abbreviated units + {i18n_ctx_noop("TmplStringSing", " sec"), i18n_ctx_noop("TmplStringPlur", " sec"), + i18n_ctx_noop("TmplStringMany", " sec")}, + /// Suffixes for seconds with full units + {i18n_ctx_noop("TmplStringSing", " second"), i18n_ctx_noop("TmplStringPlur", " seconds"), + i18n_ctx_noop("TmplStringMany", " seconds")}, }; -static const char * const s_minute_strings[3][3] = { - /// Suffixes for minutes with no units - { i18n_ctx_noop("TmplStringSing", ""), - i18n_ctx_noop("TmplStringPlur", ""), - i18n_ctx_noop("TmplStringMany", "")}, - /// Suffixes for minutes with abbreviated units - { i18n_ctx_noop("TmplStringSing", " min"), - i18n_ctx_noop("TmplStringPlur", " min"), - i18n_ctx_noop("TmplStringMany", " min")}, - /// Suffixes for minutes with full units - { i18n_ctx_noop("TmplStringSing", " minute"), - i18n_ctx_noop("TmplStringPlur", " minutes"), - i18n_ctx_noop("TmplStringMany", " minutes")}, +static const char *const s_minute_strings[3][3] = { + /// Suffixes for minutes with no units + {i18n_ctx_noop("TmplStringSing", ""), i18n_ctx_noop("TmplStringPlur", ""), + i18n_ctx_noop("TmplStringMany", "")}, + /// Suffixes for minutes with abbreviated units + {i18n_ctx_noop("TmplStringSing", " min"), i18n_ctx_noop("TmplStringPlur", " min"), + i18n_ctx_noop("TmplStringMany", " min")}, + /// Suffixes for minutes with full units + {i18n_ctx_noop("TmplStringSing", " minute"), i18n_ctx_noop("TmplStringPlur", " minutes"), + i18n_ctx_noop("TmplStringMany", " minutes")}, }; -static const char * const s_hour_strings[3][3] = { - /// Suffixes for hours with no units - { i18n_ctx_noop("TmplStringSing", ""), - i18n_ctx_noop("TmplStringPlur", ""), - i18n_ctx_noop("TmplStringMany", "")}, - /// Suffixes for hours with abbreviated units - { i18n_ctx_noop("TmplStringSing", " hr"), - i18n_ctx_noop("TmplStringPlur", " hr"), - i18n_ctx_noop("TmplStringMany", " hr")}, - /// Suffixes for hours with full units - { i18n_ctx_noop("TmplStringSing", " hour"), - i18n_ctx_noop("TmplStringPlur", " hours"), - i18n_ctx_noop("TmplStringMany", " hours")}, +static const char *const s_hour_strings[3][3] = { + /// Suffixes for hours with no units + {i18n_ctx_noop("TmplStringSing", ""), i18n_ctx_noop("TmplStringPlur", ""), + i18n_ctx_noop("TmplStringMany", "")}, + /// Suffixes for hours with abbreviated units + {i18n_ctx_noop("TmplStringSing", " hr"), i18n_ctx_noop("TmplStringPlur", " hr"), + i18n_ctx_noop("TmplStringMany", " hr")}, + /// Suffixes for hours with full units + {i18n_ctx_noop("TmplStringSing", " hour"), i18n_ctx_noop("TmplStringPlur", " hours"), + i18n_ctx_noop("TmplStringMany", " hours")}, }; -static const char * const s_day_strings[3][3] = { - /// Suffixes for days with no units - { i18n_ctx_noop("TmplStringSing", ""), - i18n_ctx_noop("TmplStringPlur", ""), - i18n_ctx_noop("TmplStringMany", "")}, - /// Suffixes for days with abbreviated units - { i18n_ctx_noop("TmplStringSing", " d"), - i18n_ctx_noop("TmplStringPlur", " d"), - i18n_ctx_noop("TmplStringMany", " d")}, - /// Suffixes for days with full units - { i18n_ctx_noop("TmplStringSing", " day"), - i18n_ctx_noop("TmplStringPlur", " days"), - i18n_ctx_noop("TmplStringMany", " days")}, +static const char *const s_day_strings[3][3] = { + /// Suffixes for days with no units + {i18n_ctx_noop("TmplStringSing", ""), i18n_ctx_noop("TmplStringPlur", ""), + i18n_ctx_noop("TmplStringMany", "")}, + /// Suffixes for days with abbreviated units + {i18n_ctx_noop("TmplStringSing", " d"), i18n_ctx_noop("TmplStringPlur", " d"), + i18n_ctx_noop("TmplStringMany", " d")}, + /// Suffixes for days with full units + {i18n_ctx_noop("TmplStringSing", " day"), i18n_ctx_noop("TmplStringPlur", " days"), + i18n_ctx_noop("TmplStringMany", " days")}, }; #if SUPPORT_MONTH -static const char * const s_month_strings[3][3] = { - /// Suffixes for months with no units - { i18n_ctx_noop("TmplStringSing", ""), - i18n_ctx_noop("TmplStringPlur", ""), - i18n_ctx_noop("TmplStringMany", "")}, - /// Suffixes for months with abbreviated units - { i18n_ctx_noop("TmplStringSing", " mo"), - i18n_ctx_noop("TmplStringPlur", " mo"), - i18n_ctx_noop("TmplStringMany", " mo")}, - /// Suffixes for months with full units - { i18n_ctx_noop("TmplStringSing", " month"), - i18n_ctx_noop("TmplStringPlur", " months"), - i18n_ctx_noop("TmplStringMany", " months")}, +static const char *const s_month_strings[3][3] = { + /// Suffixes for months with no units + {i18n_ctx_noop("TmplStringSing", ""), i18n_ctx_noop("TmplStringPlur", ""), + i18n_ctx_noop("TmplStringMany", "")}, + /// Suffixes for months with abbreviated units + {i18n_ctx_noop("TmplStringSing", " mo"), i18n_ctx_noop("TmplStringPlur", " mo"), + i18n_ctx_noop("TmplStringMany", " mo")}, + /// Suffixes for months with full units + {i18n_ctx_noop("TmplStringSing", " month"), i18n_ctx_noop("TmplStringPlur", " months"), + i18n_ctx_noop("TmplStringMany", " months")}, }; #endif #if SUPPORT_YEAR -static const char * const s_year_strings[3][3] = { - /// Suffixes for years with no units - { i18n_ctx_noop("TmplStringSing", ""), - i18n_ctx_noop("TmplStringPlur", ""), - i18n_ctx_noop("TmplStringMany", "")}, - /// Suffixes for years with abbreviated units - { i18n_ctx_noop("TmplStringSing", " yr"), - i18n_ctx_noop("TmplStringPlur", " yr"), - i18n_ctx_noop("TmplStringMany", " yr")}, - /// Suffixes for years with full units - { i18n_ctx_noop("TmplStringSing", " year"), - i18n_ctx_noop("TmplStringPlur", " years"), - i18n_ctx_noop("TmplStringMany", " years")}, +static const char *const s_year_strings[3][3] = { + /// Suffixes for years with no units + {i18n_ctx_noop("TmplStringSing", ""), i18n_ctx_noop("TmplStringPlur", ""), + i18n_ctx_noop("TmplStringMany", "")}, + /// Suffixes for years with abbreviated units + {i18n_ctx_noop("TmplStringSing", " yr"), i18n_ctx_noop("TmplStringPlur", " yr"), + i18n_ctx_noop("TmplStringMany", " yr")}, + /// Suffixes for years with full units + {i18n_ctx_noop("TmplStringSing", " year"), i18n_ctx_noop("TmplStringPlur", " years"), + i18n_ctx_noop("TmplStringMany", " years")}, }; #endif @@ -377,7 +400,7 @@ static int prv_plural_index(intmax_t value) { } static void prv_do_conversion(TemplateStringState *state, intmax_t value, int divide, int mod, - const char * const suffix_strings[3][3], FormatUnits add_units, + const char *const suffix_strings[3][3], FormatUnits add_units, bool zero_pad, bool should_mod) { int remain = (value % divide); if (!state->time_was_until) { @@ -407,7 +430,7 @@ static void prv_do_conversion(TemplateStringState *state, intmax_t value, int di // So when adding stack variables, realize the stack usage may be doubled! T_STATIC const char *prv_template_format_specifier(TemplateStringState *state, const char *input, intmax_t value) { - if (*input == '%') { // Escaped % + if (*input == '%') { // Escaped % prv_append_char(state, *input); input++; return input; @@ -459,46 +482,46 @@ T_STATIC const char *prv_template_format_specifier(TemplateStringState *state, c // conversion specifiers switch (*input) { #if SUPPORT_YEAR - case 'y': // year + case 'y': // year // NOTE: This number of seconds to divide by is a hack! See PBL-39903 - prv_do_conversion(state, value, 365 * SECONDS_PER_DAY, 100, s_year_strings, - add_units, zero_pad, modulus); + prv_do_conversion(state, value, 365 * SECONDS_PER_DAY, 100, s_year_strings, add_units, + zero_pad, modulus); break; #endif #if SUPPORT_MONTH - case 'm': // month + case 'm': // month // NOTE: This number of seconds to divide by is a hack! See PBL-39903 - prv_do_conversion(state, value, 30 * SECONDS_PER_DAY, 12, s_month_strings, - add_units, zero_pad, modulus); + prv_do_conversion(state, value, 30 * SECONDS_PER_DAY, 12, s_month_strings, add_units, + zero_pad, modulus); break; #endif - case 'd': // day - // NOTE: This number of modulus is a hack! See PBL-39903 + case 'd': // day + // NOTE: This number of modulus is a hack! See PBL-39903 #if SUPPORT_MONTH - prv_do_conversion(state, value, SECONDS_PER_DAY, 30, s_day_strings, - add_units, zero_pad, modulus); + prv_do_conversion(state, value, SECONDS_PER_DAY, 30, s_day_strings, add_units, zero_pad, + modulus); #else - prv_do_conversion(state, value, SECONDS_PER_DAY, 0, s_day_strings, - add_units, zero_pad, modulus); + prv_do_conversion(state, value, SECONDS_PER_DAY, 0, s_day_strings, add_units, zero_pad, + modulus); #endif break; - case 'H': // hour - prv_do_conversion(state, value, SECONDS_PER_HOUR, HOURS_PER_DAY, s_hour_strings, - add_units, zero_pad, modulus); + case 'H': // hour + prv_do_conversion(state, value, SECONDS_PER_HOUR, HOURS_PER_DAY, s_hour_strings, add_units, + zero_pad, modulus); break; - case 'M': // minute + case 'M': // minute prv_do_conversion(state, value, SECONDS_PER_MINUTE, MINUTES_PER_HOUR, s_minute_strings, add_units, zero_pad, modulus); break; - case 'S': // second - prv_do_conversion(state, value, 1, SECONDS_PER_MINUTE, s_second_strings, - add_units, zero_pad, modulus); + case 'S': // second + prv_do_conversion(state, value, 1, SECONDS_PER_MINUTE, s_second_strings, add_units, zero_pad, + modulus); break; - case 'R': // H:M + case 'R': // H:M // R is mostly the same as T, just without seconds. macro_end--; // fall-thru - case 'T': { // H:M:S + case 'T': { // H:M:S char macro_spec[16]; // Always show the last unit, even if it's 0. macro_units = MIN(macro_units, macro_end - 1); @@ -565,8 +588,8 @@ static bool prv_format_predicate(TemplateStringState *state, bool previously_mat wait_time = state->filter_state - predicate_value; } - if (!previously_matched && match && ((predicate_cond == cond_to_expire) || - (predicate_cond == cond_to_expire + 1))) { + if (!previously_matched && match && + ((predicate_cond == cond_to_expire) || (predicate_cond == cond_to_expire + 1))) { // This predicate could expire over time. // If the conditional is equal, add 1 to the wait time, because the equals case stays @@ -574,8 +597,8 @@ static bool prv_format_predicate(TemplateStringState *state, bool previously_mat if (predicate_cond == cond_to_expire + 1) { wait_time++; } - } else if (!match && ((predicate_cond == cond_to_valid) || - (predicate_cond == cond_to_valid + 1))) { + } else if (!match && + ((predicate_cond == cond_to_valid) || (predicate_cond == cond_to_valid + 1))) { // This predicate could become valid over time. // If the conditional is not equal, add 1 to the wait time, because only the equals case @@ -603,7 +626,7 @@ static bool prv_format_predicate(TemplateStringState *state, bool previously_mat static void prv_format_process_format_string(TemplateStringState *state, char delimiter) { // Predicate matched (or is default case), so let's parse the string. while ((*state->position != delimiter) && (*state->position != '\0')) { - if (*state->position != '%') { // Not a format character + if (*state->position != '%') { // Not a format character prv_handle_escape_character(state); if (state->error->status != TemplateStringErrorStatus_Success) { return; @@ -613,8 +636,7 @@ static void prv_format_process_format_string(TemplateStringState *state, char de } else { // Skip over the % state->position++; - state->position = prv_template_format_specifier(state, state->position, - state->filter_state); + state->position = prv_template_format_specifier(state, state->position, state->filter_state); if (state->error->status != TemplateStringErrorStatus_Success) { return; } @@ -802,15 +824,15 @@ bool template_string_evaluate(const char *input_template_string, char *output, s TemplateStringEvalConditions *eval_cond, const TemplateStringVars *vars, TemplateStringError *error) { TemplateStringState state = { - .position = input_template_string, - .output = output, - .output_remaining = output_size, - .eval_cond = eval_cond, - .vars = vars, - .error = error, - - .time_was_until = false, - .filter_state = 0, + .position = input_template_string, + .output = output, + .output_remaining = output_size, + .eval_cond = eval_cond, + .vars = vars, + .error = error, + + .time_was_until = false, + .filter_state = 0, }; if (!state.position || !state.vars || !state.error) { @@ -845,7 +867,7 @@ bool template_string_evaluate(const char *input_template_string, char *output, s } prv_append_char(&state, *state.position); state.position++; - } else { // Template + } else { // Template state.position++; prv_template_eval(&state); if (state.error->status != TemplateStringErrorStatus_Success) { diff --git a/src/fw/applib/tick_timer_service.c b/src/fw/applib/tick_timer_service.c index 3349fd0e47..5ef55f9bb8 100644 --- a/src/fw/applib/tick_timer_service.c +++ b/src/fw/applib/tick_timer_service.c @@ -20,7 +20,7 @@ #include "system/passert.h" // ---------------------------------------------------------------------------------------------------- -static TickTimerServiceState* prv_get_state(PebbleTask task) { +static TickTimerServiceState *prv_get_state(PebbleTask task) { if (task == PebbleTask_Unknown) { task = pebble_task_get_current(); } @@ -36,7 +36,6 @@ static TickTimerServiceState* prv_get_state(PebbleTask task) { } } - static void do_handle(PebbleEvent *e, void *context) { TickTimerServiceState *state = prv_get_state(PebbleTask_Unknown); PBL_ASSERTN(state->handler != NULL); @@ -106,12 +105,11 @@ void tick_timer_service_unsubscribe(void) { } } - void tick_timer_service_state_init(TickTimerServiceState *state) { - *state = (TickTimerServiceState) { - .tick_service_info = { - .type = PEBBLE_TICK_EVENT, - .handler = &do_handle, - }, + *state = (TickTimerServiceState){ + .tick_service_info = { + .type = PEBBLE_TICK_EVENT, + .handler = &do_handle, + }, }; } diff --git a/src/fw/applib/tick_timer_service.h b/src/fw/applib/tick_timer_service.h index 374597ffa4..45093822ea 100644 --- a/src/fw/applib/tick_timer_service.h +++ b/src/fw/applib/tick_timer_service.h @@ -5,7 +5,6 @@ #include - //! @addtogroup Foundation //! @{ //! @addtogroup EventService @@ -18,8 +17,8 @@ //! change a tick should occur. Time components are defined by a \ref TimeUnits enum bitmask. //! @{ -//! Time unit flags that can be used to create a bitmask for use in \ref tick_timer_service_subscribe(). -//! This will also be passed to \ref TickHandler. +//! Time unit flags that can be used to create a bitmask for use in \ref +//! tick_timer_service_subscribe(). This will also be passed to \ref TickHandler. typedef enum { //! Flag to represent the "seconds" time unit SECOND_UNIT = 1 << 0, @@ -55,4 +54,3 @@ void tick_timer_service_unsubscribe(void); //! @} // end addtogroup TickTimerService //! @} // end addtogroup EventService //! @} // end addtogroup Foundation - diff --git a/src/fw/applib/touch_service.c b/src/fw/applib/touch_service.c index 2c45b99914..11e8bdc313 100644 --- a/src/fw/applib/touch_service.c +++ b/src/fw/applib/touch_service.c @@ -53,9 +53,9 @@ static void prv_handle_touch_event(PebbleEvent *e, void *context) { static void prv_update_subscription(TouchServiceState *state) { const bool want = (state->system_handler != NULL) || (state->raw_handler != NULL); if (want && !state->subscribed) { - state->event_info = (EventServiceInfo) { - .type = PEBBLE_TOUCH_EVENT, - .handler = prv_handle_touch_event, + state->event_info = (EventServiceInfo){ + .type = PEBBLE_TOUCH_EVENT, + .handler = prv_handle_touch_event, }; event_service_client_subscribe(&state->event_info); state->subscribed = true; @@ -108,5 +108,5 @@ void app_touch_navigation_enable(bool enable) { } void touch_service_state_init(TouchServiceState *state) { - *state = (TouchServiceState){ 0 }; + *state = (TouchServiceState){0}; } diff --git a/src/fw/applib/ui/action_bar_layer.c b/src/fw/applib/ui/action_bar_layer.c index 1e2d678edc..ed41d995a9 100644 --- a/src/fw/applib/ui/action_bar_layer.c +++ b/src/fw/applib/ui/action_bar_layer.c @@ -65,7 +65,7 @@ static int64_t prv_get_precise_time(void) { inline static bool action_bar_is_highlighted(ActionBarLayer *action_bar, uint8_t index) { PBL_ASSERTN(index < NUM_ACTION_BAR_ITEMS); - return (bool) (action_bar->is_highlighted & (1 << index)); + return (bool)(action_bar->is_highlighted & (1 << index)); } static void prv_register_redraw_timer(ActionBarLayer *layer); @@ -77,9 +77,9 @@ static void prv_timed_redraw(void *context) { int64_t now = prv_get_precise_time(); for (int i = 0; i < NUM_ACTION_BAR_ITEMS; ++i) { if ((action_bar->state_change_times[i] != 0 && - (now - action_bar->state_change_times[i]) <= PRESS_ANIMATION_DURATION_MS) || + (now - action_bar->state_change_times[i]) <= PRESS_ANIMATION_DURATION_MS) || (action_bar->icon_change_times[i] != 0 && - (now - action_bar->icon_change_times[i]) <= ICON_CHANGE_ANIMATION_DURATION_MS)) { + (now - action_bar->icon_change_times[i]) <= ICON_CHANGE_ANIMATION_DURATION_MS)) { prv_register_redraw_timer(action_bar); return; } @@ -88,13 +88,14 @@ static void prv_timed_redraw(void *context) { static void prv_register_redraw_timer(ActionBarLayer *action_bar) { if (!action_bar->redraw_timer) { - action_bar->redraw_timer = app_timer_register(MILLISECONDS_PER_FRAME, prv_timed_redraw, - action_bar); + action_bar->redraw_timer = + app_timer_register(MILLISECONDS_PER_FRAME, prv_timed_redraw, action_bar); } } -inline static void action_bar_set_highlighted(ActionBarLayer *action_bar, uint8_t index, bool highlighted) { - PBL_ASSERT(index < NUM_ACTION_BAR_ITEMS, "Index: %"PRIu8, index); +inline static void action_bar_set_highlighted(ActionBarLayer *action_bar, uint8_t index, + bool highlighted) { + PBL_ASSERT(index < NUM_ACTION_BAR_ITEMS, "Index: %" PRIu8, index); const uint8_t bit = (1 << index); if (action_bar_is_highlighted(action_bar, index) == highlighted) { @@ -110,7 +111,7 @@ inline static void action_bar_set_highlighted(ActionBarLayer *action_bar, uint8_ layer_mark_dirty(&action_bar->layer); } -void action_bar_changed_proc(ActionBarLayer *action_bar, GContext* ctx) { +void action_bar_changed_proc(ActionBarLayer *action_bar, GContext *ctx) { if (action_bar->layer.window && action_bar->layer.window->on_screen == false) { // clear first, fixes issue of returning from other page while highlighted for (int i = 0; i < NUM_ACTION_BAR_ITEMS; i++) { @@ -119,8 +120,7 @@ void action_bar_changed_proc(ActionBarLayer *action_bar, GContext* ctx) { } } -static GPoint prv_offset_since_time(int64_t time_ms, int64_t duration_ms, - GPoint max_offset) { +static GPoint prv_offset_since_time(int64_t time_ms, int64_t duration_ms, GPoint max_offset) { if (time_ms == 0) { return GPointZero; } @@ -129,11 +129,11 @@ static GPoint prv_offset_since_time(int64_t time_ms, int64_t duration_ms, return GPointZero; } const uint32_t normalized_time = (delta_ms * ANIMATION_NORMALIZED_MAX) / duration_ms; - const uint32_t normalized_distance = animation_timing_curve(normalized_time, - AnimationCurveEaseOut); - const GPoint real_offset = GPoint( - max_offset.x - ((normalized_distance * max_offset.x) / ANIMATION_NORMALIZED_MAX), - max_offset.y - ((normalized_distance * max_offset.y) / ANIMATION_NORMALIZED_MAX)); + const uint32_t normalized_distance = + animation_timing_curve(normalized_time, AnimationCurveEaseOut); + const GPoint real_offset = + GPoint(max_offset.x - ((normalized_distance * max_offset.x) / ANIMATION_NORMALIZED_MAX), + max_offset.y - ((normalized_distance * max_offset.y) / ANIMATION_NORMALIZED_MAX)); return real_offset; } @@ -157,19 +157,18 @@ static void prv_draw_background_rect(ActionBarLayer *action_bar, GContext *ctx, void prv_draw_background_round(ActionBarLayer *action_bar, GContext *ctx, GColor bg_color) { const uint32_t action_bar_circle_diameter = DISP_ROWS * 19 / 9; - GRect action_bar_circle_frame = (GRect) { - .size = GSize(action_bar_circle_diameter, action_bar_circle_diameter) - }; + GRect action_bar_circle_frame = + (GRect){.size = GSize(action_bar_circle_diameter, action_bar_circle_diameter)}; grect_align(&action_bar_circle_frame, &action_bar->layer.bounds, GAlignLeft, false /* clips */); graphics_fill_oval(ctx, action_bar_circle_frame, GOvalScaleModeFitCircle); } -void action_bar_update_proc(ActionBarLayer *action_bar, GContext* ctx) { +void action_bar_update_proc(ActionBarLayer *action_bar, GContext *ctx) { const GColor bg_color = action_bar->background_color; if (!gcolor_is_transparent(bg_color)) { graphics_context_set_fill_color(ctx, bg_color); - PBL_IF_RECT_ELSE(prv_draw_background_rect, - prv_draw_background_round)(action_bar, ctx, bg_color); + PBL_IF_RECT_ELSE(prv_draw_background_rect, prv_draw_background_round)(action_bar, ctx, + bg_color); } for (unsigned int index = 0; index < NUM_ACTION_BAR_ITEMS; ++index) { @@ -186,8 +185,7 @@ void action_bar_update_proc(ActionBarLayer *action_bar, GContext* ctx) { rect.origin.y = (action_bar->layer.bounds.size.h / 2) - (rect.size.h / 2); break; case BUTTON_ID_DOWN: - rect.origin.y = action_bar->layer.bounds.size.h - vertical_icon_margin - - rect.size.h; + rect.origin.y = action_bar->layer.bounds.size.h - vertical_icon_margin - rect.size.h; break; default: WTF; @@ -206,9 +204,9 @@ void action_bar_update_proc(ActionBarLayer *action_bar, GContext* ctx) { } const int64_t icon_change_time = action_bar->icon_change_times[index]; - offset = gpoint_add(offset, prv_offset_since_time(icon_change_time, - ICON_CHANGE_ANIMATION_DURATION_MS, - GPoint(0, ICON_CHANGE_OFFSET[index]))); + offset = gpoint_add(offset, + prv_offset_since_time(icon_change_time, ICON_CHANGE_ANIMATION_DURATION_MS, + GPoint(0, ICON_CHANGE_OFFSET[index]))); GRect icon_rect = icon->bounds; const bool clip = true; @@ -227,7 +225,7 @@ void action_bar_update_proc(ActionBarLayer *action_bar, GContext* ctx) { } else { graphics_context_set_compositing_mode(ctx, GCompOpSet); } - graphics_draw_bitmap_in_rect(ctx, (GBitmap*)icon, &icon_rect); + graphics_draw_bitmap_in_rect(ctx, (GBitmap *)icon, &icon_rect); } } } @@ -258,17 +256,16 @@ static void prv_publish_touch_nav_snapshot(ActionBarLayer *action_bar) { void action_bar_layer_init(ActionBarLayer *action_bar) { *action_bar = (ActionBarLayer){}; layer_set_clips(&action_bar->layer, true); - action_bar->layer.update_proc = (LayerUpdateProc) action_bar_update_proc; - action_bar->layer.property_changed_proc = - (PropertyChangedProc) (void *) action_bar_changed_proc; + action_bar->layer.update_proc = (LayerUpdateProc)action_bar_update_proc; + action_bar->layer.property_changed_proc = (PropertyChangedProc)(void *)action_bar_changed_proc; action_bar->background_color = GColorBlack; for (unsigned int i = 0; i < NUM_ACTION_BAR_ITEMS; ++i) { action_bar->animation[i] = ActionBarLayerIconPressAnimationMoveLeft; } } -ActionBarLayer* action_bar_layer_create(void) { - ActionBarLayer* layer = applib_type_malloc(ActionBarLayer); +ActionBarLayer *action_bar_layer_create(void) { + ActionBarLayer *layer = applib_type_malloc(ActionBarLayer); if (layer) { action_bar_layer_init(layer); } @@ -295,11 +292,11 @@ void action_bar_layer_destroy(ActionBarLayer *action_bar_layer) { applib_free(action_bar_layer); } -Layer* action_bar_layer_get_layer(ActionBarLayer *action_bar_layer) { +Layer *action_bar_layer_get_layer(ActionBarLayer *action_bar_layer) { return &action_bar_layer->layer; } -inline static void* action_bar_get_context(ActionBarLayer *action_bar) { +inline static void *action_bar_get_context(ActionBarLayer *action_bar) { return action_bar->context ? action_bar->context : action_bar; } @@ -307,7 +304,8 @@ void action_bar_layer_set_context(ActionBarLayer *action_bar, void *context) { action_bar->context = context; } -static void action_bar_raw_up_down_handler(ClickRecognizerRef recognizer, ActionBarLayer *action_bar, bool is_highlighted) { +static void action_bar_raw_up_down_handler(ClickRecognizerRef recognizer, + ActionBarLayer *action_bar, bool is_highlighted) { const ButtonId button_id = click_recognizer_get_button_id(recognizer); const uint8_t index = button_id - 1; @@ -330,7 +328,8 @@ static void action_bar_click_config_provider(void *config_context) { void *context = action_bar_get_context(action_bar); // For UP, SELECT and DOWN, setup the raw handler and assign the user specified context: for (ButtonId button_id = BUTTON_ID_UP; button_id < NUM_BUTTONS; ++button_id) { - window_raw_click_subscribe(button_id, action_bar_raw_down_handler, action_bar_raw_up_handler, action_bar); + window_raw_click_subscribe(button_id, action_bar_raw_down_handler, action_bar_raw_up_handler, + action_bar); window_set_click_context(button_id, context); } // If back button is overridden, set context of BACK click recognizer as well: @@ -345,11 +344,12 @@ static void action_bar_click_config_provider(void *config_context) { inline static void action_bar_update_click_config_provider(ActionBarLayer *action_bar) { if (action_bar->window) { window_set_click_config_provider_with_context(action_bar->window, - action_bar_click_config_provider, action_bar); + action_bar_click_config_provider, action_bar); } } -void action_bar_layer_set_click_config_provider(ActionBarLayer *action_bar, ClickConfigProvider click_config_provider) { +void action_bar_layer_set_click_config_provider(ActionBarLayer *action_bar, + ClickConfigProvider click_config_provider) { action_bar->click_config_provider = click_config_provider; action_bar_update_click_config_provider(action_bar); } diff --git a/src/fw/applib/ui/action_bar_layer.h b/src/fw/applib/ui/action_bar_layer.h index 625c251814..3ab3f74026 100644 --- a/src/fw/applib/ui/action_bar_layer.h +++ b/src/fw/applib/ui/action_bar_layer.h @@ -86,14 +86,9 @@ //! @{ //! The width of the action bar in pixels, for all platforms. -#define _ACTION_BAR_WIDTH(plat) PBL_PLATFORM_SWITCH(plat, \ - /*aplite*/ 30, \ - /*basalt*/ 30, \ - /*chalk*/ 40, \ - /*diorite*/ 30, \ - /*emery*/ 34, \ - /*flint*/ 30, \ - /*gabbro*/ 40) +#define _ACTION_BAR_WIDTH(plat) \ + PBL_PLATFORM_SWITCH(plat, /*aplite*/ 30, /*basalt*/ 30, /*chalk*/ 40, /*diorite*/ 30, \ + /*emery*/ 34, /*flint*/ 30, /*gabbro*/ 40) //! The width of the action bar in pixels. #define ACTION_BAR_WIDTH _ACTION_BAR_WIDTH(PBL_PLATFORM_TYPE_CURRENT) @@ -128,7 +123,7 @@ typedef struct { struct Window *window; void *context; ClickConfigProvider click_config_provider; - unsigned is_highlighted:NUM_ACTION_BAR_ITEMS; + unsigned is_highlighted : NUM_ACTION_BAR_ITEMS; struct AppTimer *redraw_timer; GColor8 background_color; ActionBarLayerIconPressAnimation animation[NUM_ACTION_BAR_ITEMS]; @@ -152,7 +147,7 @@ void action_bar_layer_init(ActionBarLayer *action_bar); //! * Not added to / associated with any window, thus not catching any button input yet. //! @return A pointer to the ActionBarLayer. `NULL` if the ActionBarLayer could not //! be created -ActionBarLayer* action_bar_layer_create(void); +ActionBarLayer *action_bar_layer_create(void); void action_bar_layer_deinit(ActionBarLayer *action_bar_layer); @@ -165,7 +160,7 @@ void action_bar_layer_destroy(ActionBarLayer *action_bar_layer); //! @return The "root" Layer of the action bar layer. //! @internal //! @note The result is always equal to `(Layer *) action_bar_layer`. -Layer* action_bar_layer_get_layer(ActionBarLayer *action_bar_layer); +Layer *action_bar_layer_get_layer(ActionBarLayer *action_bar_layer); //! Sets the context parameter, which will be passed in to \ref ClickHandler //! callbacks and the \ref ClickConfigProvider callback of the action bar. @@ -190,7 +185,8 @@ void action_bar_layer_set_context(ActionBarLayer *action_bar, void *context); //! @param action_bar The action bar for which to assign a new click //! configuration provider //! @param click_config_provider The new click configuration provider -void action_bar_layer_set_click_config_provider(ActionBarLayer *action_bar, ClickConfigProvider click_config_provider); +void action_bar_layer_set_click_config_provider(ActionBarLayer *action_bar, + ClickConfigProvider click_config_provider); //! Sets an action bar icon onto one of the 3 slots as identified by `button_id`. //! Only \ref BUTTON_ID_UP, \ref BUTTON_ID_SELECT and \ref BUTTON_ID_DOWN can be diff --git a/src/fw/applib/ui/action_button.c b/src/fw/applib/ui/action_button.c index 468a641893..9a6858b16b 100644 --- a/src/fw/applib/ui/action_button.c +++ b/src/fw/applib/ui/action_button.c @@ -12,7 +12,7 @@ void action_button_draw(GContext *ctx, Layer *layer, GColor fill_color) { // Glue button to the right side of the window const int radius = PBL_IF_ROUND_ELSE(12, 13); - GRect rect = { .size = { radius * 2, radius * 2 } }; + GRect rect = {.size = {radius * 2, radius * 2}}; grect_align(&rect, &bounds, GAlignRight, false); // Offset the button halfway off-screen @@ -21,13 +21,14 @@ void action_button_draw(GContext *ctx, Layer *layer, GColor fill_color) { // Further offset the button on a per-default-content-size basis // Note that this will need to be updated if we ever want ActionButton to adapt to the user's // preferred content size - rect.origin.x += PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - //! @note this is the same as Medium until Small is designed - /* small */ PBL_IF_ROUND_ELSE(1, 8), - /* medium */ PBL_IF_ROUND_ELSE(1, 8), - /* large */ 4, - //! @note this is the same as Large until ExtraLarge is designed - /* extralarge */ 4); + rect.origin.x += + PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + //! @note this is the same as Medium until Small is designed + /* small */ PBL_IF_ROUND_ELSE(1, 8), + /* medium */ PBL_IF_ROUND_ELSE(1, 8), + /* large */ 4, + //! @note this is the same as Large until ExtraLarge is designed + /* extralarge */ 4); graphics_context_set_fill_color(ctx, fill_color); graphics_fill_oval(ctx, rect, GOvalScaleModeFitCircle); diff --git a/src/fw/applib/ui/action_menu_hierarchy.c b/src/fw/applib/ui/action_menu_hierarchy.c index a85ffc587f..f149adb8ab 100644 --- a/src/fw/applib/ui/action_menu_hierarchy.c +++ b/src/fw/applib/ui/action_menu_hierarchy.c @@ -29,10 +29,11 @@ ActionMenuLevel *action_menu_level_create(uint16_t max_items) { // TODO add applib-malloc padding ActionMenuLevel *level = applib_malloc(applib_type_size(ActionMenuLevel) + max_items * applib_type_size(ActionMenuItem)); - if (!level) return NULL; + if (!level) + return NULL; *level = (ActionMenuLevel){ - .max_items = max_items, - .display_mode = ActionMenuLevelDisplayModeWide, + .max_items = max_items, + .display_mode = ActionMenuLevelDisplayModeWide, }; return level; @@ -40,43 +41,39 @@ ActionMenuLevel *action_menu_level_create(uint16_t max_items) { void action_menu_level_set_display_mode(ActionMenuLevel *level, ActionMenuLevelDisplayMode display_mode) { - if (!level) return; + if (!level) + return; level->display_mode = display_mode; } -ActionMenuItem *action_menu_level_add_action(ActionMenuLevel *level, - const char *label, - ActionMenuPerformActionCb cb, - void *action_data) { - if (!level || !label || !cb || - (level->num_items >= level->max_items)) { +ActionMenuItem *action_menu_level_add_action(ActionMenuLevel *level, const char *label, + ActionMenuPerformActionCb cb, void *action_data) { + if (!level || !label || !cb || (level->num_items >= level->max_items)) { return NULL; } ActionMenuItem *item = &level->items[level->num_items]; - *item = (ActionMenuItem) { - .label = label, - .perform_action = cb, - .action_data = action_data, + *item = (ActionMenuItem){ + .label = label, + .perform_action = cb, + .action_data = action_data, }; ++level->num_items; return item; } -ActionMenuItem *action_menu_level_add_child(ActionMenuLevel *level, - ActionMenuLevel *child, - const char *label) { - if (!level || !child || !label || - (level->num_items >= level->max_items)) { +ActionMenuItem *action_menu_level_add_child(ActionMenuLevel *level, ActionMenuLevel *child, + const char *label) { + if (!level || !child || !label || (level->num_items >= level->max_items)) { return NULL; } child->parent_level = level; ActionMenuItem *item = &level->items[level->num_items]; - *item = (ActionMenuItem) { - .label = label, - .next_level = child, + *item = (ActionMenuItem){ + .label = label, + .next_level = child, }; ++level->num_items; @@ -86,8 +83,7 @@ ActionMenuItem *action_menu_level_add_child(ActionMenuLevel *level, // Hierarchy ///////////////////////////////// -static void prv_cleanup_helper(const ActionMenuLevel *level, - ActionMenuEachItemCb each_cb, +static void prv_cleanup_helper(const ActionMenuLevel *level, ActionMenuEachItemCb each_cb, void *context) { for (int i = 0; i < level->num_items; ++i) { const ActionMenuItem *item = &level->items[i]; @@ -102,8 +98,7 @@ static void prv_cleanup_helper(const ActionMenuLevel *level, applib_free((void *)level); } -void action_menu_hierarchy_destroy(const ActionMenuLevel *root, - ActionMenuEachItemCb each_cb, +void action_menu_hierarchy_destroy(const ActionMenuLevel *root, ActionMenuEachItemCb each_cb, void *context) { if (root) { prv_cleanup_helper(root, each_cb, context); diff --git a/src/fw/applib/ui/action_menu_hierarchy.h b/src/fw/applib/ui/action_menu_hierarchy.h index bc786db924..c68e3ae394 100644 --- a/src/fw/applib/ui/action_menu_hierarchy.h +++ b/src/fw/applib/ui/action_menu_hierarchy.h @@ -18,8 +18,7 @@ //! @param context the context passed to the action menu //! @note the action menu is closed immediately after an action is performed, //! unless it is frozen in the ActionMenuPerformActionCb -typedef void (*ActionMenuPerformActionCb)(ActionMenu *action_menu, - const ActionMenuItem *action, +typedef void (*ActionMenuPerformActionCb)(ActionMenu *action_menu, const ActionMenuItem *action, void *context); //! Callback invoked for each item in an action menu hierarchy. @@ -30,8 +29,8 @@ typedef void (*ActionMenuEachItemCb)(const ActionMenuItem *item, void *context); //! enum value that controls whether menu items are displayed in a grid //! (similarly to the emoji replies) or in a single column (reminiscent of \ref MenuLayer) typedef enum { - ActionMenuLevelDisplayModeWide, //!< Each item gets its own row - ActionMenuLevelDisplayModeThin, //!< Grid view: multiple items per row + ActionMenuLevelDisplayModeWide, //!< Each item gets its own row + ActionMenuLevelDisplayModeThin, //!< Grid view: multiple items per row } ActionMenuLevelDisplayMode; //! Getter for the label of a given \ref ActionMenuItem @@ -65,18 +64,15 @@ void action_menu_level_set_display_mode(ActionMenuLevel *level, //! @param cb the callback that will be triggered when this action is actuated //! @param action_data data to pass to the callback for this action //! @return a reference to the new \ref ActionMenuItem on success, NULL if the level is full -ActionMenuItem *action_menu_level_add_action(ActionMenuLevel *level, - const char *label, - ActionMenuPerformActionCb cb, - void *action_data); +ActionMenuItem *action_menu_level_add_action(ActionMenuLevel *level, const char *label, + ActionMenuPerformActionCb cb, void *action_data); //! Add a child to this ActionMenuLevel //! @param level the parent level //! @param child the child level //! @param label the text to display in the action menu for this level //! @return a reference to the new \ref ActionMenuItem on success, NULL if the level is full -ActionMenuItem *action_menu_level_add_child(ActionMenuLevel *level, - ActionMenuLevel *child, +ActionMenuItem *action_menu_level_add_child(ActionMenuLevel *level, ActionMenuLevel *child, const char *label); //! Destroy a hierarchy of ActionMenuLevels @@ -87,8 +83,7 @@ ActionMenuItem *action_menu_level_add_child(ActionMenuLevel *level, //! associated with each item in the callback //! @note Hierarchy is traversed in post-order. //! In other words, all children items are freed before their parent is freed. -void action_menu_hierarchy_destroy(const ActionMenuLevel *root, - ActionMenuEachItemCb each_cb, +void action_menu_hierarchy_destroy(const ActionMenuLevel *root, ActionMenuEachItemCb each_cb, void *context); //! @} // end addtogroup ActionMenu diff --git a/src/fw/applib/ui/action_menu_layer.c b/src/fw/applib/ui/action_menu_layer.c index 17b4c4a3d4..4dd58f906d 100644 --- a/src/fw/applib/ui/action_menu_layer.c +++ b/src/fw/applib/ui/action_menu_layer.c @@ -46,12 +46,12 @@ static uint16_t prv_get_num_rows(MenuLayer *menu_layer, uint16_t section_index, void *callback_context) { ActionMenuLayer *aml = callback_context; return (uint16_t)(aml->num_items + - (aml->num_short_items + SHORT_COL_COUNT - 1) / SHORT_COL_COUNT); + (aml->num_short_items + SHORT_COL_COUNT - 1) / SHORT_COL_COUNT); } static void prv_cell_column_draw(GContext *ctx, struct Layer const *cell_layer, - ActionMenuLayer *aml, ActionMenuItem *items, - int num_items, int sel_idx) { + ActionMenuLayer *aml, ActionMenuItem *items, int num_items, + int sel_idx) { const GFont font = aml->layout_cache.font; const int16_t font_height = fonts_get_font_height(font); const GRect *layer_bounds = &cell_layer->bounds; @@ -94,12 +94,12 @@ static void prv_cell_column_draw(GContext *ctx, struct Layer const *cell_layer, } graphics_draw_text(ctx, items[i].label, font, r, GTextOverflowModeTrailingEllipsis, - GTextAlignmentCenter, NULL); + GTextAlignmentCenter, NULL); r.origin.x += r.size.w; } } -static const ActionMenuItem *prv_get_item_for_index(ActionMenuLayer *aml, int idx) { +static const ActionMenuItem *prv_get_item_for_index(ActionMenuLayer *aml, int idx) { if (!aml->num_items && !aml->num_short_items) { return NULL; } @@ -133,15 +133,14 @@ static int16_t prv_get_item_line_height(ActionMenuLayer *aml, int idx) { #if PBL_RECT const int nudge = menu_cell_basic_horizontal_inset(); if (!item->is_leaf) { - const GSize indicator_size = graphics_text_layout_get_max_used_size(ctx, INDICATOR, - font, box, - GTextOverflowModeWordWrap, - GTextAlignmentRight, NULL); + const GSize indicator_size = graphics_text_layout_get_max_used_size( + ctx, INDICATOR, font, box, GTextOverflowModeWordWrap, GTextAlignmentRight, NULL); box.size.w -= (indicator_size.w + nudge); } #endif - return graphics_text_layout_get_text_height(ctx, item->label, font, box.size.w, - GTextOverflowModeWordWrap, PBL_IF_ROUND_ELSE(GTextAlignmentCenter, GTextAlignmentLeft)); + return graphics_text_layout_get_text_height( + ctx, item->label, font, box.size.w, GTextOverflowModeWordWrap, + PBL_IF_ROUND_ELSE(GTextAlignmentCenter, GTextAlignmentLeft)); } // Item Scroll Animation @@ -166,13 +165,10 @@ static void prv_cell_animation_stopped_handler(Animation *animation, bool finish } static const PropertyAnimationImplementation s_item_animation_implementation = { - .base = { - .update = (AnimationUpdateImplementation)property_animation_update_int16 - }, - .accessors = { - .setter = { .int16 = prv_set_cell_offset }, - .getter = { .int16 = prv_get_cell_offset } - } + .base = {.update = (AnimationUpdateImplementation)property_animation_update_int16}, + .accessors = { + .setter = {.int16 = prv_set_cell_offset}, .getter = {.int16 = prv_get_cell_offset} + } }; static void prv_unschedule_item_animation(ActionMenuLayer *aml) { @@ -193,8 +189,8 @@ static void prv_animate_cell(ActionMenuLayer *aml, GRect *label_text_frame, bool #endif // On rect displays, calculate the visible item height based on a desired number of visible lines // On round displays, use the height of the provided box since it might be inset for the indicator - const int16_t max_visible_item_height = PBL_IF_RECT_ELSE(MAX_NUM_VISIBLE_LINES * line_height, - label_text_frame->size.h); + const int16_t max_visible_item_height = + PBL_IF_RECT_ELSE(MAX_NUM_VISIBLE_LINES * line_height, label_text_frame->size.h); if (item_height > max_visible_item_height) { // Compute the limit at which we should bounce back to the top of the layer. Since // there are at most MAX_NUM_VISIBLE_LINES shown at a given time, we want to stop @@ -212,34 +208,36 @@ static void prv_animate_cell(ActionMenuLayer *aml, GRect *label_text_frame, bool item_animation->current_offset_y = 0; // Create the animation that will scroll us up in the cell - PropertyAnimation *animation = property_animation_create(&s_item_animation_implementation, - (void *)aml, NULL, &item_animation->top_offset_y); + PropertyAnimation *animation = property_animation_create( + &s_item_animation_implementation, (void *)aml, NULL, &item_animation->top_offset_y); animation_set_duration((Animation *)animation, DELAY_PER_LINE * (item_height / line_height)); animation_set_curve((Animation *)animation, AnimationCurveLinear); animation_set_handlers((Animation *)animation, (AnimationHandlers){0}, aml); // Create the animation that stalls when we have auto-scrolled up completely - PropertyAnimation *s_animation = property_animation_create(&s_item_animation_implementation, - (void *)aml, &item_animation->top_offset_y, &item_animation->top_offset_y); + PropertyAnimation *s_animation = + property_animation_create(&s_item_animation_implementation, (void *)aml, + &item_animation->top_offset_y, &item_animation->top_offset_y); animation_set_duration((Animation *)s_animation, DELAY_PER_LINE /* ms to wait */); animation_set_handlers((Animation *)s_animation, (AnimationHandlers){0}, aml); // Create the reverse animation that takes us from the scrolled up position back down - PropertyAnimation *r_animation = property_animation_create(&s_item_animation_implementation, - (void *)aml, &item_animation->top_offset_y, &item_animation->bottom_offset_y); + PropertyAnimation *r_animation = property_animation_create( + &s_item_animation_implementation, (void *)aml, &item_animation->top_offset_y, + &item_animation->bottom_offset_y); animation_set_duration((Animation *)r_animation, - (DELAY_PER_LINE / 4) * (item_height / line_height)); + (DELAY_PER_LINE / 4) * (item_height / line_height)); animation_set_curve((Animation *)r_animation, AnimationCurveEaseInOut); animation_set_handlers((Animation *)r_animation, (AnimationHandlers){0}, aml); - item_animation->animation = animation_sequence_create((Animation *)animation, - (Animation *)s_animation, (Animation *)r_animation); + item_animation->animation = animation_sequence_create( + (Animation *)animation, (Animation *)s_animation, (Animation *)r_animation); animation_set_handlers(item_animation->animation, - (AnimationHandlers){ .stopped = prv_cell_animation_stopped_handler }, + (AnimationHandlers){.stopped = prv_cell_animation_stopped_handler}, aml); animation_set_play_count(item_animation->animation, PLAY_COUNT_INFINITE); animation_set_delay(item_animation->animation, DELAY_PER_LINE /* ms */); @@ -325,19 +323,18 @@ static void prv_cell_item_content_draw_rect(GContext *ctx, const Layer *cell_lay static void prv_cell_item_content_draw_round(GContext *ctx, const Layer *cell_layer, const ActionMenuLayer *aml, const ActionMenuItem *item, bool selected, GRect *content_box) { - const int16_t horizontal_inset = selected ? MENU_CELL_ROUND_FOCUSED_HORIZONTAL_INSET : - MENU_CELL_ROUND_UNFOCUSED_HORIZONTAL_INSET; + const int16_t horizontal_inset = selected ? MENU_CELL_ROUND_FOCUSED_HORIZONTAL_INSET + : MENU_CELL_ROUND_UNFOCUSED_HORIZONTAL_INSET; *content_box = grect_inset(*content_box, GEdgeInsets(0, horizontal_inset)); // Use a smaller font for the unfocused cells to achieve a fish-eye effect const GFont font = selected ? aml->layout_cache.font : prv_get_unfocused_item_font(); - const GTextOverflowMode overflow_mode = selected ? GTextOverflowModeWordWrap : - GTextOverflowModeTrailingEllipsis; + const GTextOverflowMode overflow_mode = + selected ? GTextOverflowModeWordWrap : GTextOverflowModeTrailingEllipsis; const GTextAlignment text_alignment = GTextAlignmentCenter; - const GSize text_size = graphics_text_layout_get_max_used_size(ctx, item->label, font, - *content_box, overflow_mode, - text_alignment, NULL); - GRect text_box = (GRect) { .size = text_size }; + const GSize text_size = graphics_text_layout_get_max_used_size( + ctx, item->label, font, *content_box, overflow_mode, text_alignment, NULL); + GRect text_box = (GRect){.size = text_size}; const GAlign item_label_text_alignment = GAlignCenter; grect_align(&text_box, content_box, item_label_text_alignment, true /* clip */); text_box.origin.y -= fonts_get_font_cap_offset(font); @@ -357,12 +354,8 @@ static void prv_draw_indicator_round(GContext *ctx, const ActionMenuLayer *aml, const int text_height = aml->layout_cache.item_heights[aml->selected_index]; const int content_height = MIN(label_text_container->size.h, text_height + indicator_height); - GRect content_frame = (GRect) { - .size = GSize(label_text_container->size.w, content_height) - }; - GRect indicator_frame = (GRect) { - .size = GSize(label_text_container->size.w, indicator_height) - }; + GRect content_frame = (GRect){.size = GSize(label_text_container->size.w, content_height)}; + GRect indicator_frame = (GRect){.size = GSize(label_text_container->size.w, indicator_height)}; grect_align(&content_frame, label_text_container, GAlignCenter, true); grect_align(&indicator_frame, &content_frame, GAlignBottom, true); @@ -372,9 +365,8 @@ static void prv_draw_indicator_round(GContext *ctx, const ActionMenuLayer *aml, } #endif -static void prv_cell_item_draw(GContext *ctx, const Layer *cell_layer, - ActionMenuLayer *aml, const ActionMenuItem *item, - bool selected) { +static void prv_cell_item_draw(GContext *ctx, const Layer *cell_layer, ActionMenuLayer *aml, + const ActionMenuItem *item, bool selected) { GRect label_text_container = cell_layer->bounds; // bottom_inset won't be used on black and white, using PBL_UNUSED here quiets the linter PBL_UNUSED int16_t bottom_inset = 0; @@ -421,9 +413,8 @@ static void prv_cell_item_draw(GContext *ctx, const Layer *cell_layer, graphics_context_set_fill_color(ctx, PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite)); } - PBL_IF_RECT_ELSE(prv_cell_item_content_draw_rect, - prv_cell_item_content_draw_round)(ctx, cell_layer, aml, item, selected, - &label_text_frame); + PBL_IF_RECT_ELSE(prv_cell_item_content_draw_rect, prv_cell_item_content_draw_round)( + ctx, cell_layer, aml, item, selected, &label_text_frame); #if !defined(CONFIG_RECOVERY_FW) && CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 const int16_t fade_height = 10; @@ -438,14 +429,14 @@ static void prv_cell_item_draw(GContext *ctx, const Layer *cell_layer, if (draw_bottom_shading) { GRect bottom_bounds = label_text_container; bottom_bounds.size.h = fade_height; - bottom_bounds.origin.y = grect_get_max_y(&label_text_container) - - (fade_height + VERTICAL_PADDING); + bottom_bounds.origin.y = + grect_get_max_y(&label_text_container) - (fade_height + VERTICAL_PADDING); graphics_draw_bitmap_in_rect(ctx, &aml->item_animation.fade_bottom, &bottom_bounds); } #endif } -static void prv_draw_row(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, +static void prv_draw_row(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, void *callback_context) { ActionMenuLayer *aml = callback_context; @@ -540,14 +531,13 @@ static int16_t prv_get_cell_padding(ActionMenuLayer *aml) { return default_sep_height; #else const int16_t line_height = fonts_get_font_height(aml->layout_cache.font); - const int16_t sep_height = MAX(menu_cell_small_cell_height() - line_height, - default_sep_height) + 1; + const int16_t sep_height = + MAX(menu_cell_small_cell_height() - line_height, default_sep_height) + 1; return sep_height; #endif } -static int16_t prv_get_cell_height_cb(struct MenuLayer *menu_layer, - MenuIndex *cell_index, +static int16_t prv_get_cell_height_cb(struct MenuLayer *menu_layer, MenuIndex *cell_index, void *context) { ActionMenuLayer *aml = (ActionMenuLayer *)context; const int16_t line_height = fonts_get_font_height(aml->layout_cache.font); @@ -557,9 +547,9 @@ static int16_t prv_get_cell_height_cb(struct MenuLayer *menu_layer, } #if PBL_ROUND - return menu_layer_is_index_selected(menu_layer, cell_index) ? - MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT : - MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT; + return menu_layer_is_index_selected(menu_layer, cell_index) + ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT + : MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT; #else const int16_t max_visible_height = line_height * MAX_NUM_VISIBLE_LINES; const int16_t actual_height = aml->layout_cache.item_heights[cell_index->row]; @@ -580,22 +570,25 @@ typedef struct ActionMenuSeparatorConfig { } ActionMenuSeparatorConfig; static const ActionMenuSeparatorConfig s_separator_configs[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = { - .separator = {100, 1}, - }, - [PreferredContentSizeMedium] = { - .separator = {100, 1}, - }, - [PreferredContentSizeLarge] = { - .separator = {162, 2}, - }, - [PreferredContentSizeExtraLarge] = { - .separator = {162, 2}, - }, + [PreferredContentSizeSmall] = + { + .separator = {100, 1}, + }, + [PreferredContentSizeMedium] = + { + .separator = {100, 1}, + }, + [PreferredContentSizeLarge] = + { + .separator = {162, 2}, + }, + [PreferredContentSizeExtraLarge] = { + .separator = {162, 2}, + }, }; -static void prv_draw_separator_cb(GContext *ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *callback_context) { +static void prv_draw_separator_cb(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *callback_context) { ActionMenuLayer *aml = callback_context; if (aml->separator_index && cell_index->row == aml->separator_index) { const PreferredContentSize runtime_platform_default_size = @@ -611,8 +604,8 @@ static void prv_draw_separator_cb(GContext *ctx, const Layer *cell_layer, const int16_t offset_x = PBL_IF_RECT_ELSE(menu_cell_basic_horizontal_inset() + 1, (cell_layer->bounds.size.w - separator_width) / 2); const int16_t offset_y = (cell_layer_bounds->size.h / 2) + nudge_down; - GPoint separator_start_point = gpoint_add(cell_layer_bounds->origin, - GPoint(offset_x, offset_y)); + GPoint separator_start_point = + gpoint_add(cell_layer_bounds->origin, GPoint(offset_x, offset_y)); graphics_context_set_stroke_color(ctx, PBL_IF_COLOR_ELSE(GColorDarkGray, GColorWhite)); separator_start_point.y += config->separator.h; @@ -682,10 +675,10 @@ static void prv_changed_proc(Layer *layer) { // clip the menu layer to show exactly SHORT_ITEM_MAX_ROWS_SPALDING lines at a time const int16_t font_height = fonts_get_font_height(aml->layout_cache.font); const int16_t cell_padding = prv_get_cell_padding(aml); - const int num_visible_rows = MIN(prv_get_num_rows(&aml->menu_layer, 0, aml), - SHORT_ITEM_MAX_ROWS_SPALDING); - menu_layer_frame.size.h = (font_height * num_visible_rows) + - (cell_padding * (num_visible_rows - 1)); + const int num_visible_rows = + MIN(prv_get_num_rows(&aml->menu_layer, 0, aml), SHORT_ITEM_MAX_ROWS_SPALDING); + menu_layer_frame.size.h = + (font_height * num_visible_rows) + (cell_padding * (num_visible_rows - 1)); grect_align(&menu_layer_frame, aml_bounds, GAlignCenter, true /* clip */); } #endif @@ -706,7 +699,7 @@ static void prv_update_proc(Layer *layer, GContext *ctx) { const GColor bg_color = GColorBlack; const GColor fg_color = PBL_IF_COLOR_ELSE(GColorDarkGray, GColorWhite); - GRect arrow_rect = (GRect) { .size = GSize(aml_bounds->size.w, arrow_layer_height) }; + GRect arrow_rect = (GRect){.size = GSize(aml_bounds->size.w, arrow_layer_height)}; if (row >= SHORT_ITEM_MAX_ROWS_SPALDING - 1) { grect_align(&arrow_rect, aml_bounds, GAlignTop, true /* clip */); content_indicator_draw_arrow(ctx, &arrow_rect, ContentIndicatorDirectionUp, fg_color, @@ -764,17 +757,15 @@ void action_menu_layer_click_config_provider(ActionMenuLayer *aml) { window_set_click_context(BUTTON_ID_SELECT, aml); } -void action_menu_layer_set_callback(ActionMenuLayer *aml, - ActionMenuLayerCallback cb, +void action_menu_layer_set_callback(ActionMenuLayer *aml, ActionMenuLayerCallback cb, void *context) { - aml->callbacks = (ActionMenuLayerCallbacks) { - .select = cb, + aml->callbacks = (ActionMenuLayerCallbacks){ + .select = cb, }; aml->context = context; } -void action_menu_layer_set_callbacks(ActionMenuLayer *aml, - ActionMenuLayerCallbacks callbacks, +void action_menu_layer_set_callbacks(ActionMenuLayer *aml, ActionMenuLayerCallbacks callbacks, void *context) { aml->callbacks = callbacks; aml->context = context; @@ -790,9 +781,7 @@ void action_menu_layer_init(ActionMenuLayer *aml, const GRect *frame) { // Since menu_layer_set_callbacks() will call the menu functions, we need to initialize // the ActionMenuLayer attributes before setting the callbacks onto the menu. aml->item_animation = (ActionMenuItemAnimation){}; - aml->layout_cache = (ActionMenuLayoutCache){ - .font = prv_get_item_font() - }; + aml->layout_cache = (ActionMenuLayoutCache){.font = prv_get_item_font()}; aml->callbacks = (ActionMenuLayerCallbacks){}; aml->layer.property_changed_proc = prv_changed_proc; aml->layer.update_proc = prv_update_proc; @@ -803,17 +792,18 @@ void action_menu_layer_init(ActionMenuLayer *aml, const GRect *frame) { #if PBL_ROUND menu_layer_pad_bottom_enable(&aml->menu_layer, false); #endif - menu_layer_set_callbacks(&aml->menu_layer, aml, &(MenuLayerCallbacks){ - .get_num_rows = prv_get_num_rows, - .draw_row = prv_draw_row, - .get_cell_height = prv_get_cell_height_cb, - .get_separator_height = prv_get_separator_height_cb, - .draw_separator = prv_draw_separator_cb, - .get_header_height = prv_get_header_height_cb, - .draw_header = prv_draw_header_cb, - .selection_changed = prv_selection_changed_cb, - .select_click = prv_select_click_cb, - }); + menu_layer_set_callbacks(&aml->menu_layer, aml, + &(MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows, + .draw_row = prv_draw_row, + .get_cell_height = prv_get_cell_height_cb, + .get_separator_height = prv_get_separator_height_cb, + .draw_separator = prv_draw_separator_cb, + .get_header_height = prv_get_header_height_cb, + .draw_header = prv_draw_header_cb, + .selection_changed = prv_selection_changed_cb, + .select_click = prv_select_click_cb, + }); #if !defined(CONFIG_RECOVERY_FW) gbitmap_init_with_resource_system(&aml->item_animation.fade_top, SYSTEM_APP, @@ -868,7 +858,7 @@ void action_menu_layer_set_align(ActionMenuLayer *aml, ActionMenuAlign align) { aml->layout_cache.align = align; } -void action_menu_layer_set_items(ActionMenuLayer *aml, const ActionMenuItem* items, int num_items, +void action_menu_layer_set_items(ActionMenuLayer *aml, const ActionMenuItem *items, int num_items, unsigned default_selected_item, unsigned separator_index) { aml->items = items; aml->num_items = num_items; @@ -876,7 +866,7 @@ void action_menu_layer_set_items(ActionMenuLayer *aml, const ActionMenuItem* ite prv_update_aml_cache(aml, default_selected_item); } -void action_menu_layer_set_short_items(ActionMenuLayer *aml, const ActionMenuItem* items, +void action_menu_layer_set_short_items(ActionMenuLayer *aml, const ActionMenuItem *items, int num_items, unsigned default_selected_item) { aml->short_items = items; aml->separator_index = 0; diff --git a/src/fw/applib/ui/action_menu_layer.h b/src/fw/applib/ui/action_menu_layer.h index 6e4e5b6abd..e07efa4fff 100644 --- a/src/fw/applib/ui/action_menu_layer.h +++ b/src/fw/applib/ui/action_menu_layer.h @@ -43,7 +43,7 @@ typedef struct { unsigned separator_index; ActionMenuLayerCallbacks callbacks; - const ActionMenuItem* items; + const ActionMenuItem *items; int num_items; //! @internal @@ -51,40 +51,32 @@ typedef struct { //! @internal ActionMenuItemAnimation item_animation; - const ActionMenuItem* short_items; + const ActionMenuItem *short_items; int num_short_items; void *context; } ActionMenuLayer; ActionMenuLayer *action_menu_layer_create(GRect frame); -void action_menu_layer_set_callback(ActionMenuLayer *aml, - ActionMenuLayerCallback cb, +void action_menu_layer_set_callback(ActionMenuLayer *aml, ActionMenuLayerCallback cb, void *context); -void action_menu_layer_set_callbacks(ActionMenuLayer *aml, - ActionMenuLayerCallbacks callbacks, +void action_menu_layer_set_callbacks(ActionMenuLayer *aml, ActionMenuLayerCallbacks callbacks, void *context); void action_menu_layer_notify_selection_changed(ActionMenuLayer *aml); -void action_menu_layer_set_align(ActionMenuLayer *aml, - ActionMenuAlign align); +void action_menu_layer_set_align(ActionMenuLayer *aml, ActionMenuAlign align); -void action_menu_layer_set_items(ActionMenuLayer *aml, - const ActionMenuItem *items, - int num_items, - unsigned default_selected_item, - unsigned separator_index); +void action_menu_layer_set_items(ActionMenuLayer *aml, const ActionMenuItem *items, int num_items, + unsigned default_selected_item, unsigned separator_index); void action_menu_layer_click_config_provider(ActionMenuLayer *aml); void action_menu_layer_destroy(ActionMenuLayer *aml); -void action_menu_layer_set_short_items(ActionMenuLayer *aml, - const ActionMenuItem *items, - int num_items, - unsigned default_selected_item); +void action_menu_layer_set_short_items(ActionMenuLayer *aml, const ActionMenuItem *items, + int num_items, unsigned default_selected_item); void action_menu_layer_init(ActionMenuLayer *aml, const GRect *frame); diff --git a/src/fw/applib/ui/action_menu_window.c b/src/fw/applib/ui/action_menu_window.c index 8247fa4997..aaf36be74e 100644 --- a/src/fw/applib/ui/action_menu_window.c +++ b/src/fw/applib/ui/action_menu_window.c @@ -17,18 +17,14 @@ static const int IN_OUT_ANIMATION_DURATION = 200; static void prv_invoke_will_close(ActionMenu *action_menu) { ActionMenuData *data = window_get_user_data(&action_menu->window); if (data->config.will_close) { - data->config.will_close(action_menu, - data->performed_item, - data->config.context); + data->config.will_close(action_menu, data->performed_item, data->config.context); } } static void prv_invoke_did_close(ActionMenu *action_menu) { ActionMenuData *data = window_get_user_data(&action_menu->window); if (data->config.did_close) { - data->config.did_close(action_menu, - data->performed_item, - data->config.context); + data->config.did_close(action_menu, data->performed_item, data->config.context); } } @@ -62,10 +58,14 @@ static void prv_invoke_level_selection_changed(ActionMenuData *data, const Actio static void prv_set_action_menu_layer_callbacks(ActionMenuData *data, bool enable_selection_changed) { - action_menu_layer_set_callbacks(&data->action_menu_layer, (ActionMenuLayerCallbacks) { - .select = prv_action_callback, - .selection_changed = enable_selection_changed ? prv_action_menu_layer_selection_changed : NULL, - }, data); + action_menu_layer_set_callbacks( + &data->action_menu_layer, + (ActionMenuLayerCallbacks){ + .select = prv_action_callback, + .selection_changed = + enable_selection_changed ? prv_action_menu_layer_selection_changed : NULL, + }, + data); } static void prv_view_model_did_change(ActionMenuData *data) { @@ -76,14 +76,12 @@ static void prv_view_model_did_change(ActionMenuData *data) { prv_set_action_menu_layer_callbacks(data, false); if (cur_level->display_mode == ActionMenuLevelDisplayModeThin) { action_menu_layer_set_items(&data->action_menu_layer, NULL, 0, 0, 0); - action_menu_layer_set_short_items(&data->action_menu_layer, - cur_level->items, - cur_level->num_items, - cur_level->default_selected_item); + action_menu_layer_set_short_items(&data->action_menu_layer, cur_level->items, + cur_level->num_items, cur_level->default_selected_item); } else { action_menu_layer_set_short_items(&data->action_menu_layer, NULL, 0, 0); action_menu_layer_set_items(&data->action_menu_layer, cur_level->items, cur_level->num_items, - cur_level->default_selected_item, cur_level->separator_index); + cur_level->default_selected_item, cur_level->separator_index); } prv_set_action_menu_layer_callbacks(data, true); action_menu_layer_notify_selection_changed(&data->action_menu_layer); @@ -92,8 +90,8 @@ static void prv_view_model_did_change(ActionMenuData *data) { static void prv_next_level_anim_stopped(Animation *anim, bool finished, void *context) { // update the view model - AnimationContext *anim_ctx = (AnimationContext*) context; - ActionMenuData *data = window_get_user_data((Window*) anim_ctx->window); + AnimationContext *anim_ctx = (AnimationContext *)context; + ActionMenuData *data = window_get_user_data((Window *)anim_ctx->window); if (!data || !finished) { // We could have gotten cleaned up in the middle of an animation, bail applib_free(anim_ctx); @@ -114,16 +112,16 @@ static void prv_next_level_anim_stopped(Animation *anim, bool finished, void *co static GEdgeInsets prv_action_menu_insets(Window *window) { const int crumbs_width = crumbs_layer_width(); - return (GEdgeInsets) { - .top = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT), - .right = PBL_IF_RECT_ELSE(0, crumbs_width), + return (GEdgeInsets){ + .top = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT), + .right = PBL_IF_RECT_ELSE(0, crumbs_width), .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT), - .left = crumbs_width, + .left = crumbs_width, }; } -static Animation* prv_create_content_in_animation(ActionMenuData *data, - const ActionMenuLevel *level) { +static Animation *prv_create_content_in_animation(ActionMenuData *data, + const ActionMenuLevel *level) { // animate the ease in of the new level const GRect window_frame = data->action_menu.window.layer.frame; const GEdgeInsets insets = prv_action_menu_insets(&data->action_menu.window); @@ -131,9 +129,7 @@ static Animation* prv_create_content_in_animation(ActionMenuData *data, GRect start = stop; start.origin.x -= crumbs_layer_width(); PropertyAnimation *prop_anim = - property_animation_create_layer_frame((Layer *)&data->action_menu_layer, - &start, - &stop); + property_animation_create_layer_frame((Layer *)&data->action_menu_layer, &start, &stop); Animation *content_in = property_animation_get_animation(prop_anim); animation_set_duration(content_in, IN_OUT_ANIMATION_DURATION); @@ -145,8 +141,8 @@ static Animation* prv_create_content_in_animation(ActionMenuData *data, return spawn_anim; } -static Animation* prv_create_content_out_animation(ActionMenuData *data, - const ActionMenuLevel *level) { +static Animation *prv_create_content_out_animation(ActionMenuData *data, + const ActionMenuLevel *level) { // animate the ease out of the current level GRect *start = &data->action_menu_layer.layer.frame; GRect stop = *start; @@ -156,14 +152,14 @@ static Animation* prv_create_content_out_animation(ActionMenuData *data, Animation *content_out = property_animation_get_animation(prop_anim); animation_set_duration(content_out, IN_OUT_ANIMATION_DURATION); AnimationHandlers anim_handlers = { - .started = NULL, - .stopped = prv_next_level_anim_stopped, + .started = NULL, + .stopped = prv_next_level_anim_stopped, }; AnimationContext *anim_ctx = applib_type_malloc(AnimationContext); - *anim_ctx = (AnimationContext) { - .window = &data->action_menu.window, - .next_level = level, + *anim_ctx = (AnimationContext){ + .window = &data->action_menu.window, + .next_level = level, }; animation_set_handlers(content_out, anim_handlers, anim_ctx); @@ -249,10 +245,10 @@ static void prv_action_window_load(Window *window) { // Click config window_set_click_config_provider_with_context(window, prv_click_config_provider, data); // Init the view model - data->view_model = (ActionMenuViewModel) { - .cur_level = data->config.root_level, - .menu_insets = prv_action_menu_insets(window), - .num_dots = 1, + data->view_model = (ActionMenuViewModel){ + .cur_level = data->config.root_level, + .menu_insets = prv_action_menu_insets(window), + .num_dots = 1, }; prv_view_model_did_change(data); } @@ -274,7 +270,8 @@ static void prv_dummy_click_config(void *data) { } ActionMenuLevel *action_menu_get_root_level(ActionMenu *action_menu) { - if (!action_menu) return NULL; + if (!action_menu) + return NULL; ActionMenuData *data = window_get_user_data(&action_menu->window); return (ActionMenuLevel *)data->config.root_level; } @@ -292,8 +289,8 @@ void action_menu_freeze(ActionMenu *action_menu) { void action_menu_unfreeze(ActionMenu *action_menu) { ActionMenuData *data = window_get_user_data(&action_menu->window); - window_set_click_config_provider_with_context(&action_menu->window, - prv_click_config_provider, data); + window_set_click_config_provider_with_context(&action_menu->window, prv_click_config_provider, + data); data->frozen = false; } @@ -307,7 +304,8 @@ void action_menu_close(ActionMenu *action_menu, bool animated) { } void action_menu_set_result_window(ActionMenu *action_menu, Window *result_window) { - if (!action_menu) return; + if (!action_menu) + return; // remove existing result window ActionMenuData *data = window_get_user_data(&action_menu->window); @@ -323,7 +321,6 @@ void action_menu_set_result_window(ActionMenu *action_menu, Window *result_windo data->result_window = result_window; } - void action_menu_set_align(ActionMenuConfig *config, ActionMenuAlign align) { if (!config) { return; @@ -352,10 +349,10 @@ ActionMenu *action_menu_open(WindowStack *window_stack, ActionMenuConfig *config window_set_user_data(window, data); window_set_fullscreen(window, true); window_set_background_color(window, GColorBlack); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_action_window_load, - .unload = prv_action_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_action_window_load, + .unload = prv_action_window_unload, + }); prv_action_window_push(window_stack, &data->action_menu, true /* animated */); diff --git a/src/fw/applib/ui/action_menu_window.h b/src/fw/applib/ui/action_menu_window.h index 435d6103ef..078481d15f 100644 --- a/src/fw/applib/ui/action_menu_window.h +++ b/src/fw/applib/ui/action_menu_window.h @@ -15,7 +15,6 @@ //! //! @{ - typedef enum { ActionMenuAlignTop = 0, ActionMenuAlignCenter @@ -38,8 +37,7 @@ typedef struct ActionMenu ActionMenu; //! @param performed_action the ActionMenuItem for the action that was performed, //! NULL if the ActionMenu is closing without an action being selected by the user //! @param context the context passed to the ActionMenu -typedef void (*ActionMenuDidCloseCb)(ActionMenu *menu, - const ActionMenuItem *performed_action, +typedef void (*ActionMenuDidCloseCb)(ActionMenu *menu, const ActionMenuItem *performed_action, void *context); //! Callback executed immediately before the ActionMenu closes. @@ -47,20 +45,19 @@ typedef void (*ActionMenuDidCloseCb)(ActionMenu *menu, //! @param performed_action the ActionMenuItem for the action that was performed, //! NULL if the ActionMenu is closing without an action being selected by the user //! @param context the context passed to the ActionMenu -typedef void (*ActionMenuWillCloseCb)(ActionMenu *menu, - const ActionMenuItem *performed_action, +typedef void (*ActionMenuWillCloseCb)(ActionMenu *menu, const ActionMenuItem *performed_action, void *context); //! Configuration struct for the ActionMenu typedef struct { - const ActionMenuLevel *root_level; //!< the root level of the ActionMenu - void *context; //!< a context pointer which will be accessible when actions are performed + const ActionMenuLevel *root_level; //!< the root level of the ActionMenu + void *context; //!< a context pointer which will be accessible when actions are performed struct { - GColor background; //!< the color of the left column of the ActionMenu - GColor foreground; //!< the color of the individual "crumbs" that indicate menu depth + GColor background; //!< the color of the left column of the ActionMenu + GColor foreground; //!< the color of the individual "crumbs" that indicate menu depth } colors; - ActionMenuDidCloseCb will_close; //!< Called immediately before the ActionMenu closes - ActionMenuDidCloseCb did_close; //!< a callback used to cleanup memory after the menu has closed + ActionMenuDidCloseCb will_close; //!< Called immediately before the ActionMenu closes + ActionMenuDidCloseCb did_close; //!< a callback used to cleanup memory after the menu has closed ActionMenuAlign align; } ActionMenuConfig; diff --git a/src/fw/applib/ui/action_toggle.c b/src/fw/applib/ui/action_toggle.c index 633740f272..0af27cf33a 100644 --- a/src/fw/applib/ui/action_toggle.c +++ b/src/fw/applib/ui/action_toggle.c @@ -69,9 +69,11 @@ static void prv_setup_dialog(Dialog *dialog, const ActionToggleDialogConfig *con dialog_set_text_color(dialog, config->text_color); dialog_set_background_color(dialog, config->background_color); dialog_set_timeout(dialog, config->timeout_ms); - dialog_set_callbacks(dialog, &(DialogCallbacks) { - .unload = prv_action_toggle_dialog_unload, - }, context); + dialog_set_callbacks(dialog, + &(DialogCallbacks){ + .unload = prv_action_toggle_dialog_unload, + }, + context); } static void prv_vibe(const bool enabled) { @@ -88,7 +90,7 @@ static WindowStack *prv_get_window_stack(void) { static void prv_push_result_dialog(ActionToggleContext *ctx) { ActionToggleDialogConfig config = { - .message = ctx->config.impl->result_messages[prv_get_toggled_state_index(ctx)], + .message = ctx->config.impl->result_messages[prv_get_toggled_state_index(ctx)], }; prv_setup_state_config(ctx, &config, ActionToggleDialogType_Result); SimpleDialog *simple_dialog = simple_dialog_create(config.window_name); @@ -145,7 +147,7 @@ static void prv_prompt_click_config_provider(void *context) { static void prv_push_prompt_dialog(ActionToggleContext *ctx) { ActionToggleDialogConfig config = { - .message = ctx->config.impl->prompt_messages[prv_get_toggled_state_index(ctx)], + .message = ctx->config.impl->prompt_messages[prv_get_toggled_state_index(ctx)], }; prv_setup_state_config(ctx, &config, ActionToggleDialogType_Prompt); ActionableDialog *actionable_dialog = actionable_dialog_create(config.window_name); @@ -170,8 +172,8 @@ static bool prv_should_prompt(const ActionToggleConfig *config) { void action_toggle_push(const ActionToggleConfig *config) { ActionToggleContext *context = applib_zalloc(sizeof(ActionToggleContext)); PBL_ASSERTN(context); - *context = (ActionToggleContext) { - .config = *config, + *context = (ActionToggleContext){ + .config = *config, }; prv_call_get_state_callback(context); if (prv_should_prompt(config)) { diff --git a/src/fw/applib/ui/animation.c b/src/fw/applib/ui/animation.c index 7cbd531092..8bbad3aadc 100644 --- a/src/fw/applib/ui/animation.c +++ b/src/fw/applib/ui/animation.c @@ -60,16 +60,15 @@ InterpolateInt64Function animation_private_current_interpolate_override(void) { } // ------------------------------------------------------------------------------------ -static bool prv_handle_list_filter(ListNode* node, void* data) { - AnimationPrivate* animation = (AnimationPrivate *)node; +static bool prv_handle_list_filter(ListNode *node, void *data) { + AnimationPrivate *animation = (AnimationPrivate *)node; return animation->handle == data; } - // ------------------------------------------------------------------------------------ // Find annotation by handle. If quiet is true, don't print out a log error message if we detect // an invalid handle. Quiet mode is used by animation_unschedule and animation_is_scheduled. -static AnimationPrivate* prv_find_animation_by_handle(AnimationState *state, Animation *handle, +static AnimationPrivate *prv_find_animation_by_handle(AnimationState *state, Animation *handle, bool quiet) { if (!handle) { return NULL; @@ -81,9 +80,9 @@ static AnimationPrivate* prv_find_animation_by_handle(AnimationState *state, Ani } // Look for this animation by id. It could either be in the unscheduled or scheduled list - ListNode* node = list_find(state->unscheduled_head, prv_handle_list_filter, (void*)handle); + ListNode *node = list_find(state->unscheduled_head, prv_handle_list_filter, (void *)handle); if (!node) { - node = list_find(state->scheduled_head, prv_handle_list_filter, (void*)handle); + node = list_find(state->scheduled_head, prv_handle_list_filter, (void *)handle); } if (!node) { if (!quiet) { @@ -94,7 +93,6 @@ static AnimationPrivate* prv_find_animation_by_handle(AnimationState *state, Ani return (AnimationPrivate *)node; } - // ------------------------------------------------------------------------------------------- // Find animation by parent and child idx typedef struct { @@ -102,14 +100,15 @@ typedef struct { uint8_t child_idx; } ParentChildInfo; -static bool prv_parent_list_filter(ListNode* node, void* data) { - AnimationPrivate* animation = (AnimationPrivate *)node; +static bool prv_parent_list_filter(ListNode *node, void *data) { + AnimationPrivate *animation = (AnimationPrivate *)node; ParentChildInfo *info = (ParentChildInfo *)data; return animation->parent == info->parent && animation->child_idx == info->child_idx; } -static AnimationPrivate* prv_find_animation_by_parent_child_idx(AnimationState *state, - AnimationPrivate *parent, int child_idx) { +static AnimationPrivate *prv_find_animation_by_parent_child_idx(AnimationState *state, + AnimationPrivate *parent, + int child_idx) { if (!parent) { return NULL; } @@ -120,11 +119,8 @@ static AnimationPrivate* prv_find_animation_by_parent_child_idx(AnimationState * } // Look for this animation by id. It could either be in the unscheduled or scheduled list - ParentChildInfo info = (ParentChildInfo) { - .parent = parent, - .child_idx = child_idx - }; - ListNode* node = list_find(state->unscheduled_head, prv_parent_list_filter, &info); + ParentChildInfo info = (ParentChildInfo){.parent = parent, .child_idx = child_idx}; + ListNode *node = list_find(state->unscheduled_head, prv_parent_list_filter, &info); if (!node) { node = list_find(state->scheduled_head, prv_parent_list_filter, &info); } @@ -155,7 +151,6 @@ static void prv_unlink_and_free(AnimationState *state, AnimationPrivate *animati applib_free(animation); } - // ------------------------------------------------------------------------------------------- static int prv_scheduler_comparator(void *a, void *b) { AnimationPrivate *animation_a = (AnimationPrivate *)a; @@ -163,13 +158,11 @@ static int prv_scheduler_comparator(void *a, void *b) { return serial_distance32(animation_a->abs_start_time_ms, animation_b->abs_start_time_ms); } - // ------------------------------------------------------------------------------------------- inline static uint32_t prv_get_ms_since_system_start(void) { return ((sys_get_ticks() * 1000 + RTC_TICKS_HZ / 2) / RTC_TICKS_HZ); } - // ------------------------------------------------------------------------------------------- // Get the total duration of an animation, optionally considering the delay and play count. // This recurses into children of sequence or spawn animations @@ -197,10 +190,9 @@ static uint32_t prv_get_total_duration(AnimationState *state, AnimationPrivate * duration += child_duration; } - } else if (animation->type == AnimationTypeSpawn) { // For a spawn animation, get the max of each component - uint32_t max_child_duration = 0; + uint32_t max_child_duration = 0; for (child_idx = 0; child_idx < ANIMATION_MAX_CHILDREN; child_idx++) { AnimationPrivate *child = prv_find_animation_by_parent_child_idx(state, animation, child_idx); if (!child) { @@ -231,7 +223,6 @@ static uint32_t prv_get_total_duration(AnimationState *state, AnimationPrivate * return duration; } - // ------------------------------------------------------------------------------------------- // Return true if animation is a descendent of the given parent static bool prv_is_descendent_of(AnimationState *state, AnimationPrivate *animation, @@ -254,7 +245,6 @@ static bool prv_is_descendent_of(AnimationState *state, AnimationPrivate *animat return false; } - // ------------------------------------------------------------------------------------------- static int32_t prv_get_elapsed(AnimationPrivate *animation, uint32_t now) { // Compute the absolute start time of this animation, backing it up by the @@ -264,7 +254,6 @@ static int32_t prv_get_elapsed(AnimationPrivate *animation, uint32_t now) { return serial_distance32(start_ms, now); } - // ------------------------------------------------------------------------------------------- // Adjust the abs_start_time of this animation and all of its children. This is called during // a set_elapsed operation. @@ -275,11 +264,11 @@ static void prv_backup_start_time(AnimationState *state, AnimationPrivate *paren return; } - AnimationPrivate *animation = (AnimationPrivate *) state->scheduled_head; + AnimationPrivate *animation = (AnimationPrivate *)state->scheduled_head; while (animation) { // Since we are reducing the start times, each of the animations we operate on will be // moved earlier in the list. Get the next pointer now before we possibly move it. - next = (AnimationPrivate*) list_get_next(&animation->list_node); + next = (AnimationPrivate *)list_get_next(&animation->list_node); // Note that we have to iterate through all scheduled nodes and see if each is a descendent. // We can't follow the children of parent_h by searching using an incrementing child_idx @@ -296,7 +285,6 @@ static void prv_backup_start_time(AnimationState *state, AnimationPrivate *paren } } - // ------------------------------------------------------------------------------------------- static void prv_reschedule_timer(AnimationState *state, uint32_t rate_control_delay_ms) { AnimationPrivate *animation = (AnimationPrivate *)state->scheduled_head; @@ -311,9 +299,8 @@ static void prv_reschedule_timer(AnimationState *state, uint32_t rate_control_de animation_service_timer_schedule(interval_ms); } - // ------------------------------------------------------------------------------------------- -bool prv_animation_is_scheduled(AnimationState* state, AnimationPrivate *animation) { +bool prv_animation_is_scheduled(AnimationState *state, AnimationPrivate *animation) { return (animation->abs_start_time_ms != 0); } @@ -324,7 +311,6 @@ static bool prv_is_mutable(AnimationState *state, AnimationPrivate *animation) { !prv_animation_is_scheduled(state, animation)); } - // ------------------------------------------------------------------------------------------- // Determine if any of an animation's descendents are scheduled static bool prv_animation_children_scheduled(AnimationState *state, AnimationPrivate *animation) { @@ -339,8 +325,8 @@ static bool prv_animation_children_scheduled(AnimationState *state, AnimationPri if (prv_animation_is_scheduled(state, child)) { return true; } - } else if (prv_animation_is_scheduled(state, child) - || prv_animation_children_scheduled(state, child)) { + } else if (prv_animation_is_scheduled(state, child) || + prv_animation_children_scheduled(state, child)) { return true; } } @@ -353,7 +339,8 @@ static bool prv_animation_children_scheduled(AnimationState *state, AnimationPri // animations. When this method is called on children of an animation, allow_auto_destroy is // false unless the top-level animation has already been unscheduled. void prv_unschedule_animation(AnimationState *state, AnimationPrivate *animation, - const bool finished, bool allow_auto_destroy, bool force_destroy, bool teardown) { + const bool finished, bool allow_auto_destroy, bool force_destroy, + bool teardown) { if (animation->type != AnimationTypePrimitive) { // For a complex animation, unschedule each of the components for (int child_idx = 0; child_idx < ANIMATION_MAX_CHILDREN; child_idx++) { @@ -435,22 +422,21 @@ void prv_unschedule_animation(AnimationState *state, AnimationPrivate *animation #ifdef UNITTEST // Make sure this animation didn't get deleted as a side effect of running the stopped handler - PBL_ASSERTN(list_contains(state->unscheduled_head, &animation->list_node) - || list_contains(state->scheduled_head, &animation->list_node)); + PBL_ASSERTN(list_contains(state->unscheduled_head, &animation->list_node) || + list_contains(state->scheduled_head, &animation->list_node)); #endif - if (force_destroy || animation->defer_delete - || ((allow_auto_destroy && animation->auto_destroy) - && !prv_animation_is_scheduled(state, animation))) { + if (force_destroy || animation->defer_delete || + ((allow_auto_destroy && animation->auto_destroy) && + !prv_animation_is_scheduled(state, animation))) { // It's possible the stopped handler rescheduled, so check before we destroy it prv_unlink_and_free(state, animation); } } - // ------------------------------------------------------------------------------------------- // Low level schedule of an animation, no recursion -static void prv_schedule_low_level_animation(AnimationState* state, const uint32_t now, +static void prv_schedule_low_level_animation(AnimationState *state, const uint32_t now, AnimationPrivate *animation, int32_t add_delay_ms) { animation->abs_start_time_ms = now + animation->delay_ms + add_delay_ms; if (animation->abs_start_time_ms == 0) { @@ -464,16 +450,17 @@ static void prv_schedule_low_level_animation(AnimationState* state, const uint32 animation->did_setup = true; } - const bool old_head_is_animating = state->scheduled_head - ? (((AnimationPrivate *)state->scheduled_head)->abs_start_time_ms <= now) - : false; + const bool old_head_is_animating = + state->scheduled_head + ? (((AnimationPrivate *)state->scheduled_head)->abs_start_time_ms <= now) + : false; // Move from the unscheduled to the scheduled list PBL_ASSERTN(list_contains(state->unscheduled_head, &animation->list_node)); list_remove(&animation->list_node, &state->unscheduled_head /* &head */, NULL /* &tail */); const bool ascending = true; state->scheduled_head = list_sorted_add(state->scheduled_head, &animation->list_node, - prv_scheduler_comparator, ascending); + prv_scheduler_comparator, ascending); const bool has_new_head = (&animation->list_node == state->scheduled_head); if (has_new_head) { @@ -484,14 +471,13 @@ static void prv_schedule_low_level_animation(AnimationState* state, const uint32 } ANIMATION_LOG_DEBUG("scheduled %d (%p) to run at (%d). delay:%d, duration:%d", - (int)animation->handle, animation, (int)animation->abs_start_time_ms, - (int)(animation->delay_ms), (int)(animation->duration_ms)); + (int)animation->handle, animation, (int)animation->abs_start_time_ms, + (int)(animation->delay_ms), (int)(animation->duration_ms)); } - // ------------------------------------------------------------------------------------------- // High level schedule of an animation, recurses into children of sequence or spawn animations -static bool prv_schedule_animation(AnimationState* state, const uint32_t now, +static bool prv_schedule_animation(AnimationState *state, const uint32_t now, AnimationPrivate *animation, int32_t add_delay_ms) { bool success = true; int child_idx; @@ -509,7 +495,8 @@ static bool prv_schedule_animation(AnimationState* state, const uint32_t now, } ANIMATION_LOG_DEBUG("scheduling %d (%p) to run in %d ms (%d)", (int)animation->handle, animation, - (int)(animation->delay_ms + add_delay_ms), (int)(now + animation->delay_ms + add_delay_ms)); + (int)(animation->delay_ms + add_delay_ms), + (int)(now + animation->delay_ms + add_delay_ms)); uint32_t earliest_start_time = now; @@ -518,8 +505,8 @@ static bool prv_schedule_animation(AnimationState* state, const uint32_t now, int32_t delay = animation->delay_ms + add_delay_ms; // Figure out and store our total duration (used by the scheduler to tell when it's done) - animation->duration_ms = prv_get_total_duration(state, animation, false /*delay*/, - false /*play_count*/); + animation->duration_ms = + prv_get_total_duration(state, animation, false /*delay*/, false /*play_count*/); for (child_idx = 0; child_idx < ANIMATION_MAX_CHILDREN; child_idx++) { AnimationPrivate *child = prv_find_animation_by_parent_child_idx(state, animation, child_idx); @@ -560,12 +547,12 @@ static bool prv_schedule_animation(AnimationState* state, const uint32_t now, if (!child) { break; } - uint32_t child_duration = prv_get_total_duration(state, child, true /*delay*/, - true /*play_count*/); + uint32_t child_duration = + prv_get_total_duration(state, child, true /*delay*/, true /*play_count*/); uint32_t child_end_time; if (child->abs_start_time_ms) { // Already scheduled - int32_t child_position_inc_delay = prv_get_elapsed(child, now) + child->delay_ms; + int32_t child_position_inc_delay = prv_get_elapsed(child, now) + child->delay_ms; uint32_t child_start_time = now - child_position_inc_delay; if (serial_distance32(child_start_time, earliest_start_time) > 0) { // computes (earliest_start_time - child->abs_start_time_ms) @@ -611,8 +598,8 @@ static bool prv_schedule_animation(AnimationState* state, const uint32_t now, // Set the duration now, after we've possibly adjusted the children delays to compensate // for already scheduled children. - animation->duration_ms = prv_get_total_duration(state, animation, false /*delay*/, - false /*play_count*/); + animation->duration_ms = + prv_get_total_duration(state, animation, false /*delay*/, false /*play_count*/); } else { PBL_ASSERTN(animation->type == AnimationTypePrimitive); @@ -665,8 +652,8 @@ void animation_private_update(AnimationState *state, AnimationPrivate *animation state = prv_animation_state_get(PebbleTask_Current); } - const AnimationProgress distance_normalized = prv_get_distance_normalized(animation, - progress_raw); + const AnimationProgress distance_normalized = + prv_get_distance_normalized(animation, progress_raw); state->aux->current_animation = animation; animation->implementation->update(animation->handle, distance_normalized); @@ -686,8 +673,8 @@ static uint32_t prv_get_time_normalized_raw(const AnimationPrivate *animation, u time_normalized_raw = ANIMATION_NORMALIZED_MAX; } else { // animation->duration_ms/2 added in for round to nearest - time_normalized_raw = (ANIMATION_NORMALIZED_MAX * rel_ms_running + animation->duration_ms/2) - / animation->duration_ms; + time_normalized_raw = (ANIMATION_NORMALIZED_MAX * rel_ms_running + animation->duration_ms / 2) / + animation->duration_ms; time_normalized_raw = MIN(time_normalized_raw, ANIMATION_NORMALIZED_MAX); } return time_normalized_raw; @@ -707,8 +694,7 @@ bool animation_get_progress(Animation *animation_h, AnimationProgress *progress_ AnimationState *state = prv_animation_state_get(PebbleTask_Current); PBL_ASSERTN(!animation_private_using_legacy_2(state)); - AnimationPrivate *animation = prv_find_animation_by_handle(state, animation_h, - false /* quiet */); + AnimationPrivate *animation = prv_find_animation_by_handle(state, animation_h, false /* quiet */); if (!animation || !prv_animation_is_scheduled(state, animation) || !progress_out) { return false; } @@ -742,7 +728,6 @@ static bool prv_run_animation(AnimationState *state, AnimationPrivate *animation animation_private_update(state, animation, time_normalized_raw); } - // If completed, either reschedule it now if it needs to be repeated or unschedule it (which // results in a call to the stopped handler) if (completed && !animation->is_completed) { @@ -780,7 +765,6 @@ static bool prv_run_animation(AnimationState *state, AnimationPrivate *animation return blocked_on_children_complete; } - // ------------------------------------------------------------------------------------------- // @param state our context // @param now the time we are running to. When called from animation_set_elapsed, this will @@ -796,16 +780,16 @@ static void prv_run(AnimationState *state, uint32_t now, AnimationPrivate *top_l // We run through the animations up to 2 times. If during the first run we detect that some // parents want to unschedule but couldn't because they still have children running, then we // run again so that the parents can check again if their children finished on the first run. - AnimationPrivate *animation = (AnimationPrivate *) state->scheduled_head; + AnimationPrivate *animation = (AnimationPrivate *)state->scheduled_head; while (animation) { - #ifdef UNITTEST +#ifdef UNITTEST // This is to ensure unit test fails in case of bad behaviour - no need to execute in // in normal FW since this case should not exist with defer_delete check AnimationPrivate *animation_p = animation_private_animation_find(animation->handle); PBL_ASSERTN(animation_p != NULL); // Make sure this is an animation in the scheduled list PBL_ASSERTN(list_contains(state->scheduled_head, &animation->list_node)); - #endif +#endif const int32_t rel_ms_running = serial_distance32(animation->abs_start_time_ms, now); if (rel_ms_running < 0) { @@ -821,10 +805,10 @@ static void prv_run(AnimationState *state, uint32_t now, AnimationPrivate *top_l // If only running from a specific top-level animation, see if this animation is the target // one or one of it's children, and if so advance it - if (!top_level_animation || animation == top_level_animation - || prv_is_descendent_of(state, animation, top_level_animation)) { - ANIMATION_LOG_DEBUG("advancing animation %d to %"PRIu32" ms", (int)animation->handle, - now - top_level_start_time); + if (!top_level_animation || animation == top_level_animation || + prv_is_descendent_of(state, animation, top_level_animation)) { + ANIMATION_LOG_DEBUG("advancing animation %d to %" PRIu32 " ms", (int)animation->handle, + now - top_level_start_time); // Run this animation. Record if this is a parent ready to unschedule itself but // still waiting for one of its children. have_blocked_parents |= prv_run_animation(state, animation, now, do_update); @@ -844,13 +828,12 @@ static void prv_run(AnimationState *state, uint32_t now, AnimationPrivate *top_l state->aux->iter_next = NULL; } - // ------------------------------------------------------------------------------------------- -typedef Animation *(*CreateFromArrayFunc)(Animation **animation_array, - uint32_t array_len); +typedef Animation *(*CreateFromArrayFunc)(Animation **animation_array, uint32_t array_len); static Animation *prv_call_using_vargs(CreateFromArrayFunc func, Animation *animation_a, - Animation *animation_b, Animation *animation_c, va_list args) { + Animation *animation_b, Animation *animation_c, + va_list args) { const int max_args = ANIMATION_MAX_CREATE_VARGS; typedef Animation *AnimationPtr; AnimationPtr animation_array[max_args]; @@ -879,13 +862,12 @@ static Animation *prv_call_using_vargs(CreateFromArrayFunc func, Animation *anim return func(animation_array, array_len); } - // ------------------------------------------------------------------------------------------- // Complex animations don't perform any logic in their update callback -static void prv_complex_animation_update(Animation * animation, uint32_t distance) { +static void prv_complex_animation_update(Animation *animation, uint32_t distance) { } static const AnimationImplementation s_complex_implementation = { - .update = (AnimationUpdateImplementation) prv_complex_animation_update, + .update = (AnimationUpdateImplementation)prv_complex_animation_update, }; // ------------------------------------------------------------------------------------------- @@ -909,8 +891,8 @@ static Animation *prv_complex_init(Animation *parent_h, Animation **animation_ar // Set the parent on each of the components uint32_t child_idx = 0; for (uint32_t i = 0; i < array_len; i++) { - AnimationPrivate *component = prv_find_animation_by_handle(state, animation_array[i], - false /*quiet*/); + AnimationPrivate *component = + prv_find_animation_by_handle(state, animation_array[i], false /*quiet*/); if (!component) { // It is OK to pass in already destroyed children. continue; @@ -918,8 +900,8 @@ static Animation *prv_complex_init(Animation *parent_h, Animation **animation_ar // The 2nd and subsequent children of a sequence must NOT be already scheduled. Also fail if // child already has a parent - if (component->parent - || ((type == AnimationTypeSequence) && (i > 0) && (component->abs_start_time_ms))) { + if (component->parent || + ((type == AnimationTypeSequence) && (i > 0) && (component->abs_start_time_ms))) { success = false; break; } @@ -934,8 +916,8 @@ static Animation *prv_complex_init(Animation *parent_h, Animation **animation_ar continue; } // Undo setting of the parent and child_idx on the components we modified. - AnimationPrivate *component = prv_find_animation_by_handle(state, animation_array[i], - false /*quiet*/); + AnimationPrivate *component = + prv_find_animation_by_handle(state, animation_array[i], false /*quiet*/); if (component) { component->parent = NULL; component->child_idx = 0; @@ -948,7 +930,6 @@ static Animation *prv_complex_init(Animation *parent_h, Animation **animation_ar return parent_h; } - // ------------------------------------------------------------------------------------------- static Animation *prv_complex_create(Animation **animation_array, uint32_t array_len, AnimationType type) { @@ -964,8 +945,7 @@ static Animation *prv_complex_create(Animation **animation_array, uint32_t array Animation *parent_h = animation_private_animation_init(parent); parent->implementation = &s_complex_implementation; - return prv_complex_init(parent_h, animation_array, array_len, - type); + return prv_complex_init(parent_h, animation_array, array_len, type); } // ------------------------------------------------------------------------------------------- @@ -1013,8 +993,8 @@ static Animation *prv_animation_clone(AnimationState *state, AnimationPrivate *f } else { if (from->is_property_animation) { - PropertyAnimationPrivate *prop = property_animation_private_clone( - (PropertyAnimationPrivate *)from); + PropertyAnimationPrivate *prop = + property_animation_private_clone((PropertyAnimationPrivate *)from); if (prop) { clone = &prop->animation; clone->is_property_animation = true; @@ -1043,12 +1023,11 @@ static Animation *prv_animation_clone(AnimationState *state, AnimationPrivate *f return clone_h; } - // ------------------------------------------------------------------------------------------- void animation_private_state_init(AnimationState *state) { #ifndef UNITTEST _Static_assert(sizeof(AnimationState) <= sizeof(AnimationLegacy2Scheduler), - "Animation state larger than allowed for 2.0 compatibility"); + "Animation state larger than allowed for 2.0 compatibility"); #endif // If this a legacy 2.0 application, instantiate the 2.0 legacy animation support @@ -1062,29 +1041,28 @@ void animation_private_state_init(AnimationState *state) { // Allocate the auxiliary information AnimationAuxState *aux_state = applib_type_malloc(AnimationAuxState); PBL_ASSERTN(aux_state); - *aux_state = (AnimationAuxState) { - // To aid for debugging, let's start each task off at a different handle offset. Eventually they - // will collide but it is not required that each task have globally unique handles - .next_handle = pebble_task_get_current() * 100000000, - .last_delay_ms = ANIMATION_RENDER_FRAME_INTERVAL_MS, - .last_frame_time_ms = prv_get_ms_since_system_start() + *aux_state = (AnimationAuxState){ + // To aid for debugging, let's start each task off at a different handle offset. Eventually + // they + // will collide but it is not required that each task have globally unique handles + .next_handle = pebble_task_get_current() * 100000000, + .last_delay_ms = ANIMATION_RENDER_FRAME_INTERVAL_MS, + .last_frame_time_ms = prv_get_ms_since_system_start() }; - *state = (AnimationState) { - .signature = ANIMATION_STATE_3_X_SIGNATURE, - .aux = aux_state, + *state = (AnimationState){ + .signature = ANIMATION_STATE_3_X_SIGNATURE, + .aux = aux_state, }; } // ------------------------------------------------------------------------------------------- void animation_private_state_deinit(AnimationState *state) { - if (!process_manager_compiled_with_legacy2_sdk()) { applib_free(state->aux); } } - // ------------------------------------------------------------------------------------------- // Return true if the animation globals were instantiated using the legacy 2.x animation // manager @@ -1095,24 +1073,22 @@ bool animation_private_using_legacy_2(AnimationState *state) { return (state->signature != ANIMATION_STATE_3_X_SIGNATURE); } - // ------------------------------------------------------------------------------------------- // Return the animation pointer for the given handle AnimationPrivate *animation_private_animation_find(Animation *handle) { return prv_find_animation_by_handle(NULL, handle, false /*quiet*/); } - // ------------------------------------------------------------------------------------------- Animation *animation_private_animation_init(AnimationPrivate *animation) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); - *animation = (AnimationPrivate) { - .handle = (Animation *)(uintptr_t)(++state->aux->next_handle), - .duration_ms = ANIMATION_DEFAULT_DURATION_MS, - .play_count = 1, - .curve = AnimationCurveDefault, - .auto_destroy = true + *animation = (AnimationPrivate){ + .handle = (Animation *)(uintptr_t)(++state->aux->next_handle), + .duration_ms = ANIMATION_DEFAULT_DURATION_MS, + .play_count = 1, + .curve = AnimationCurveDefault, + .auto_destroy = true }; PBL_ASSERTN(animation->handle); @@ -1121,7 +1097,6 @@ Animation *animation_private_animation_init(AnimationPrivate *animation) { return (Animation *)(animation->handle); } - // ------------------------------------------------------------------------------------------- void animation_private_timer_callback(void *context) { AnimationState *state = (AnimationState *)context; @@ -1130,24 +1105,24 @@ void animation_private_timer_callback(void *context) { // Tell the timer that we received the event it sent animation_service_timer_event_received(); - if(!s_paused){ + if (!s_paused) { // Run all animations for this time interval - prv_run(state, now, NULL /*top-level animation*/, 0/*top-level start time*/, true/*do_update*/); + prv_run(state, now, NULL /*top-level animation*/, 0 /*top-level start time*/, + true /*do_update*/); } // Frame rate control: const int32_t frame_interval_ms = serial_distance32(state->aux->last_frame_time_ms, now); const int32_t error_ms = frame_interval_ms - ANIMATION_RENDER_FRAME_INTERVAL_MS; const int32_t theoretic_delay_ms = state->aux->last_delay_ms - error_ms; - const uint32_t delay_ms = CLIP(theoretic_delay_ms, (int32_t) 0, - (int32_t) ANIMATION_RENDER_FRAME_INTERVAL_MS); + const uint32_t delay_ms = + CLIP(theoretic_delay_ms, (int32_t)0, (int32_t)ANIMATION_RENDER_FRAME_INTERVAL_MS); prv_reschedule_timer(state, delay_ms); state->aux->last_delay_ms = delay_ms; state->aux->last_frame_time_ms = now; } - // ------------------------------------------------------------------------------------------- Animation *animation_create(void) { if (animation_private_using_legacy_2(NULL)) { @@ -1163,7 +1138,6 @@ Animation *animation_create(void) { return animation_private_animation_init(animation); } - // ------------------------------------------------------------------------------------------- bool animation_destroy(Animation *animation_h) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1198,7 +1172,6 @@ bool animation_destroy(Animation *animation_h) { return true; } - // ------------------------------------------------------------------------------------------- bool animation_set_auto_destroy(Animation *animation_h, bool auto_destroy) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1218,7 +1191,6 @@ bool animation_set_auto_destroy(Animation *animation_h, bool auto_destroy) { return true; } - // ------------------------------------------------------------------------------------------- bool animation_schedule(Animation *animation_h) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1244,12 +1216,11 @@ bool animation_schedule(Animation *animation_h) { } // Schedule it - bool success = prv_schedule_animation(state, prv_get_ms_since_system_start(), animation, - 0 /*add_delay*/); + bool success = + prv_schedule_animation(state, prv_get_ms_since_system_start(), animation, 0 /*add_delay*/); return success; } - // ------------------------------------------------------------------------------------------- bool animation_unschedule(Animation *animation_h) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1270,7 +1241,6 @@ bool animation_unschedule(Animation *animation_h) { return true; } - // ------------------------------------------------------------------------------------------- void animation_unschedule_all(void) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1289,7 +1259,7 @@ void animation_unschedule_all(void) { if (!animation->parent) { break; } - animation = (AnimationPrivate *) list_get_next(&animation->list_node); + animation = (AnimationPrivate *)list_get_next(&animation->list_node); } // There had to be at least 1 top-level animation PBL_ASSERTN(animation); @@ -1298,7 +1268,6 @@ void animation_unschedule_all(void) { } } - // ------------------------------------------------------------------------------------------- bool animation_is_scheduled(Animation *animation_h) { if (!animation_h) { @@ -1320,10 +1289,8 @@ bool animation_is_scheduled(Animation *animation_h) { return prv_animation_is_scheduled(state, animation); } - // ------------------------------------------------------------------------------------------- -bool animation_set_handlers(Animation *animation_h, AnimationHandlers handlers, - void *context) { +bool animation_set_handlers(Animation *animation_h, AnimationHandlers handlers, void *context) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); if (animation_private_using_legacy_2(state)) { // We need to enable other applib modules like scroll_layer, menu_layer, etc. which are @@ -1343,7 +1310,6 @@ bool animation_set_handlers(Animation *animation_h, AnimationHandlers handlers, return true; } - // ------------------------------------------------------------------------------------------- AnimationHandlers animation_get_handlers(Animation *animation_h) { if (animation_private_using_legacy_2(NULL)) { @@ -1354,13 +1320,12 @@ AnimationHandlers animation_get_handlers(Animation *animation_h) { } AnimationPrivate *animation = prv_find_animation_by_handle(NULL, animation_h, false /*quiet*/); if (!animation) { - return (AnimationHandlers) {0}; + return (AnimationHandlers){0}; } return animation->handlers; } - // ------------------------------------------------------------------------------------------- bool animation_set_implementation(Animation *animation_h, const AnimationImplementation *implementation) { @@ -1369,11 +1334,10 @@ bool animation_set_implementation(Animation *animation_h, // We need to enable other applib modules like scroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. animation_legacy2_set_implementation((AnimationLegacy2 *)animation_h, - (const AnimationLegacy2Implementation *)implementation); + (const AnimationLegacy2Implementation *)implementation); return true; } - AnimationPrivate *animation = prv_find_animation_by_handle(state, animation_h, false /*quiet*/); if (!prv_is_mutable(state, animation)) { return false; @@ -1384,11 +1348,11 @@ bool animation_set_implementation(Animation *animation_h, } // ------------------------------------------------------------------------------------------- -const AnimationImplementation* animation_get_implementation(Animation *animation_h) { +const AnimationImplementation *animation_get_implementation(Animation *animation_h) { if (animation_private_using_legacy_2(NULL)) { // We need to enable other applib modules like scroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. - return (const AnimationImplementation*)((AnimationLegacy2 *)animation_h)->implementation; + return (const AnimationImplementation *)((AnimationLegacy2 *)animation_h)->implementation; } AnimationPrivate *animation = prv_find_animation_by_handle(NULL, animation_h, false /*quiet*/); @@ -1432,7 +1396,6 @@ bool animation_set_delay(Animation *animation_h, uint32_t delay_ms) { return true; } - // ------------------------------------------------------------------------------------------- uint32_t animation_get_delay(Animation *animation_h) { if (animation_private_using_legacy_2(NULL)) { @@ -1476,8 +1439,7 @@ bool animation_set_duration(Animation *animation_h, uint32_t duration_ms) { } AnimationPrivate *animation = prv_find_animation_by_handle(state, animation_h, false /*quiet*/); - if (!prv_is_mutable(state, animation) - || animation->type != AnimationTypePrimitive) { + if (!prv_is_mutable(state, animation) || animation->type != AnimationTypePrimitive) { return false; } @@ -1485,7 +1447,6 @@ bool animation_set_duration(Animation *animation_h, uint32_t duration_ms) { return true; } - // ------------------------------------------------------------------------------------------- uint32_t animation_get_duration(Animation *animation_h, bool include_delay, bool include_play_count) { @@ -1504,7 +1465,6 @@ uint32_t animation_get_duration(Animation *animation_h, bool include_delay, return prv_get_total_duration(state, animation, include_delay, include_play_count); } - // ------------------------------------------------------------------------------------------- bool animation_set_curve(Animation *animation_h, AnimationCurve curve) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1572,18 +1532,15 @@ static bool prv_animation_set_custom_function(Animation *animation_h, AnimationC } // ------------------------------------------------------------------------------------------- -bool animation_set_custom_curve(Animation *animation_h, - AnimationCurveFunction curve_function) { - return prv_animation_set_custom_function(animation_h, - AnimationCurveCustomFunction, +bool animation_set_custom_curve(Animation *animation_h, AnimationCurveFunction curve_function) { + return prv_animation_set_custom_function(animation_h, AnimationCurveCustomFunction, curve_function); } // ------------------------------------------------------------------------------------------- bool animation_set_custom_interpolation(Animation *animation_h, InterpolateInt64Function interpolate_function) { - return prv_animation_set_custom_function(animation_h, - AnimationCurveCustomInterpolationFunction, + return prv_animation_set_custom_function(animation_h, AnimationCurveCustomInterpolationFunction, interpolate_function); } @@ -1663,7 +1620,6 @@ bool animation_set_reverse(Animation *animation_h, bool reverse) { return true; } - // ------------------------------------------------------------------------------------------- bool animation_get_reverse(Animation *animation_h) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1696,7 +1652,6 @@ bool animation_set_play_count(Animation *animation_h, uint32_t play_count) { return true; } - // ------------------------------------------------------------------------------------------- uint32_t animation_get_play_count(Animation *animation_h) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1713,7 +1668,6 @@ uint32_t animation_get_play_count(Animation *animation_h) { } } - // ------------------------------------------------------------------------------------------- bool animation_set_elapsed(Animation *parent_h, uint32_t elapsed_ms) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1754,7 +1708,6 @@ bool animation_set_elapsed(Animation *parent_h, uint32_t elapsed_ms) { return true; } - // ------------------------------------------------------------------------------------------- bool animation_get_elapsed(Animation *animation_h, int32_t *elapsed_ms) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1769,7 +1722,6 @@ bool animation_get_elapsed(Animation *animation_h, int32_t *elapsed_ms) { return true; } - // ------------------------------------------------------------------------------------------- Animation *animation_sequence_create_from_array(Animation **animation_array, uint32_t array_len) { PBL_ASSERTN(!animation_private_using_legacy_2(NULL)); @@ -1777,7 +1729,6 @@ Animation *animation_sequence_create_from_array(Animation **animation_array, uin return seq; } - // ------------------------------------------------------------------------------------------- Animation *animation_sequence_init_from_array(Animation *parent, Animation **animation_array, uint32_t array_len) { @@ -1785,7 +1736,6 @@ Animation *animation_sequence_init_from_array(Animation *parent, Animation **ani return prv_complex_init(parent, animation_array, array_len, AnimationTypeSequence); } - // ------------------------------------------------------------------------------------------- Animation *animation_sequence_create(Animation *animation_a, Animation *animation_b, Animation *animation_c, ...) { @@ -1793,12 +1743,11 @@ Animation *animation_sequence_create(Animation *animation_a, Animation *animatio va_list args; va_start(args, animation_c); Animation *animation = prv_call_using_vargs(animation_sequence_create_from_array, animation_a, - animation_b, animation_c, args); + animation_b, animation_c, args); va_end(args); return animation; } - // ------------------------------------------------------------------------------------------- Animation *animation_spawn_create_from_array(Animation **animation_array, uint32_t array_len) { PBL_ASSERTN(!animation_private_using_legacy_2(NULL)); @@ -1806,7 +1755,6 @@ Animation *animation_spawn_create_from_array(Animation **animation_array, uint32 return spawn; } - // ------------------------------------------------------------------------------------------- Animation *animation_spawn_create(Animation *animation_a, Animation *animation_b, Animation *animation_c, ...) { @@ -1814,12 +1762,11 @@ Animation *animation_spawn_create(Animation *animation_a, Animation *animation_b va_list args; va_start(args, animation_c); Animation *animation = prv_call_using_vargs(animation_spawn_create_from_array, animation_a, - animation_b, animation_c, args); + animation_b, animation_c, args); va_end(args); return animation; } - // ------------------------------------------------------------------------------------------- Animation *animation_clone(Animation *animation_h) { AnimationState *state = prv_animation_state_get(PebbleTask_Current); @@ -1838,14 +1785,14 @@ static void prv_dump_animations(ListNode *node, bool is_scheduled, char *buffer, while (node) { AnimationPrivate *animation = (AnimationPrivate *)node; - dbgserial_putstr_fmt(buffer, buffer_size, - "<%p> { sch: %s, handle = %p, abs_start_time_ms = %"PRIu32", delay = %"PRIu32", " - "duration = %"PRIu32", curve = %i, run = %p }", + dbgserial_putstr_fmt( + buffer, buffer_size, + "<%p> { sch: %s, handle = %p, abs_start_time_ms = %" PRIu32 ", delay = %" PRIu32 + ", " + "duration = %" PRIu32 ", curve = %i, run = %p }", animation, is_scheduled ? "yes" : "no", animation->handle, - (uint32_t)animation->abs_start_time_ms, - (uint32_t)animation->delay_ms, (uint32_t)animation->duration_ms, - animation->curve, - animation->implementation->update); + (uint32_t)animation->abs_start_time_ms, (uint32_t)animation->delay_ms, + (uint32_t)animation->duration_ms, animation->curve, animation->implementation->update); node = node->next; } @@ -1856,21 +1803,20 @@ static void prv_dump_legacy_animations(ListNode *head, char *buffer, int buffer_ while (animation) { dbgserial_putstr_fmt(buffer, buffer_size, - "<%p> { sch: yes, start handle = %p, stop handle = %p," - "abs_start_time_ms = %"PRIu32", delay = %"PRIu32", " - "duration = %"PRIu32", curve = %i, run = %p }", - animation, animation->handlers.started, animation->handlers.stopped, - animation->abs_start_time_ms, - animation->delay_ms, animation->duration_ms, - animation->curve, - animation->implementation->update); + "<%p> { sch: yes, start handle = %p, stop handle = %p," + "abs_start_time_ms = %" PRIu32 ", delay = %" PRIu32 + ", " + "duration = %" PRIu32 ", curve = %i, run = %p }", + animation, animation->handlers.started, animation->handlers.stopped, + animation->abs_start_time_ms, animation->delay_ms, animation->duration_ms, + animation->curve, animation->implementation->update); animation = (AnimationLegacy2 *)list_get_next(&animation->list_node); } } // ------------------------------------------------------------------------------------------- -static void prv_dump_scheduler(char* buffer, int buffer_size, AnimationState* state) { +static void prv_dump_scheduler(char *buffer, int buffer_size, AnimationState *state) { pbl_irq_lock(); if (animation_private_using_legacy_2(state)) { AnimationLegacy2Scheduler *legacy_state = (AnimationLegacy2Scheduler *)state; @@ -1882,23 +1828,20 @@ static void prv_dump_scheduler(char* buffer, int buffer_size, AnimationState* st pbl_irq_unlock(); } - // ------------------------------------------------------------------------------------------- void animation_private_pause(void) { s_paused = true; } - // ------------------------------------------------------------------------------------------- void animation_private_resume(void) { s_paused = false; } - // ------------------------------------------------------------------------------------------- void command_animations_info(void) { char buffer[128]; - dbgserial_putstr_fmt(buffer, sizeof(buffer), "Now: %"PRIu32, prv_get_ms_since_system_start()); + dbgserial_putstr_fmt(buffer, sizeof(buffer), "Now: %" PRIu32, prv_get_ms_since_system_start()); dbgserial_putstr_fmt(buffer, sizeof(buffer), "Kernel Animations:"); prv_dump_scheduler(buffer, sizeof(buffer), kernel_applib_get_animation_state()); @@ -1907,13 +1850,11 @@ void command_animations_info(void) { prv_dump_scheduler(buffer, sizeof(buffer), app_state_get_animation_state()); } - // ------------------------------------------------------------------------------------------- void command_pause_animations(void) { animation_private_pause(); } - // ------------------------------------------------------------------------------------------- void command_resume_animations(void) { animation_private_resume(); diff --git a/src/fw/applib/ui/animation.h b/src/fw/applib/ui/animation.h index 0addb05454..90286a6ff1 100644 --- a/src/fw/applib/ui/animation.h +++ b/src/fw/applib/ui/animation.h @@ -22,7 +22,6 @@ //! Refer to the \htmlinclude UiFramework.html (chapter "Animation") for a conceptual overview //! of the animation framework and on how to write custom animations. - //! @{ /////////////////// @@ -89,7 +88,6 @@ typedef struct ImmutableAnimation ImmutableAnimation; #define ANIMATION_RENDER_FRAME_INTERVAL_MS ANIMATION_TARGET_FRAME_INTERVAL_MS #endif - //! The type used to represent how far an animation has progressed. This is passed to the //! animation's update handler typedef int32_t AnimationProgress; @@ -115,7 +113,6 @@ typedef enum { AnimationCurve_Reserved2 = 7, } AnimationCurve; - //! Creates a new Animation on the heap and initializes it with the default values. //! //! * Duration: 250ms, @@ -127,7 +124,7 @@ typedef enum { //! * Scheduled: no //! @return A pointer to the animation. `NULL` if the animation could not //! be created -Animation * animation_create(void); +Animation *animation_create(void); //! Destroys an Animation previously created by animation_create. //! @return true if successful, false on failure @@ -137,7 +134,6 @@ bool animation_destroy(Animation *animation); // sequence or spawn animations. Animation *animation_clone(Animation *from); - //! Create a new sequence animation from a list of 2 or more other animations. The returned //! animation owns the animations that were provided as arguments and no further write operations //! on those handles are allowed. The variable length argument list must be terminated with a NULL @@ -476,7 +472,7 @@ typedef void (*AnimationSetupImplementation)(Animation *animation); //! @internal //! @see animation_timing.h typedef void (*AnimationUpdateImplementation)(Animation *animation, - const AnimationProgress progress); + const AnimationProgress progress); //! Pointer to function that (optionally) cleans up the animation. //! This callback is called when the animation is removed from the scheduler. @@ -518,7 +514,7 @@ typedef struct AnimationImplementation { //! @param animation The animation for which to get the implementation. //! @see AnimationImplementation //! @return NULL if animation implementation has not been setup. -const AnimationImplementation* animation_get_implementation(Animation *animation); +const AnimationImplementation *animation_get_implementation(Animation *animation); //! Sets the implementation of the custom animation. //! When implementing custom animations, use this function to specify what functions need to be diff --git a/src/fw/applib/ui/animation_interpolate.c b/src/fw/applib/ui/animation_interpolate.c index ddbeced4aa..36fa046a2b 100644 --- a/src/fw/applib/ui/animation_interpolate.c +++ b/src/fw/applib/ui/animation_interpolate.c @@ -32,31 +32,30 @@ uint32_t interpolate_uint32(int32_t normalized, uint32_t from, uint32_t to) { Fixed_S32_16 interpolate_fixed32(int32_t normalized, Fixed_S32_16 from, Fixed_S32_16 to) { const int64_t interpolated = interpolate_int64(normalized, from.raw_value, to.raw_value); - const int32_t raw_value = - (int32_t) CLIP(interpolated, INT32_MIN, INT32_MAX); + const int32_t raw_value = (int32_t)CLIP(interpolated, INT32_MIN, INT32_MAX); return Fixed_S32_16(raw_value); } GSize interpolate_gsize(int32_t normalized, GSize from, GSize to) { - return (GSize) { - .w = interpolate_int16(normalized, from.w, to.w), - .h = interpolate_int16(normalized, from.w, to.w), + return (GSize){ + .w = interpolate_int16(normalized, from.w, to.w), + .h = interpolate_int16(normalized, from.w, to.w), }; } GPoint interpolate_gpoint(int32_t normalized, GPoint from, GPoint to) { - return (GPoint) { - .x = interpolate_int16(normalized, from.x, to.x), - .y = interpolate_int16(normalized, from.y, to.y), + return (GPoint){ + .x = interpolate_int16(normalized, from.x, to.x), + .y = interpolate_int16(normalized, from.y, to.y), }; } int16_t scale_int16(int16_t value, int16_t from, int16_t to) { - return (int16_t) ((int32_t) value * to / from); + return (int16_t)((int32_t)value * to / from); } int32_t scale_int32(int32_t value, int32_t from, int32_t to) { - return (int32_t) ((int64_t) value * to / from); + return (int32_t)((int64_t)value * to / from); } // ------------------------------------------------------- @@ -90,9 +89,10 @@ uint32_t interpolate_moook_custom_duration(const MoookConfig *config) { ANIMATION_TARGET_FRAME_INTERVAL_MS); } -static int64_t prv_interpolate_moook( - int32_t normalized, int64_t from, int64_t to, const int32_t *frames_in, int32_t num_frames_in, - const int32_t *frames_out, int32_t num_frames_out, int32_t num_frames_mid, bool bounce_back) { +static int64_t prv_interpolate_moook(int32_t normalized, int64_t from, int64_t to, + const int32_t *frames_in, int32_t num_frames_in, + const int32_t *frames_out, int32_t num_frames_out, + int32_t num_frames_mid, bool bounce_back) { const int32_t direction = ((from == to) ? 0 : ((from < to) ? 1 : -1)); if (direction == 0) { return from; @@ -105,7 +105,6 @@ static int64_t prv_interpolate_moook( ANIMATION_NORMALIZED_MAX); frame_idx = CLIP(frame_idx, 0, (int)num_frames_total - 1); - if (normalized == ANIMATION_NORMALIZED_MAX) { return to; } else if (frame_idx < 0) { @@ -113,16 +112,17 @@ static int64_t prv_interpolate_moook( } else if (frame_idx < num_frames_in) { return from + (frames_in ? (direction * frames_in[frame_idx]) : 0); } else if ((frame_idx < (num_frames_in + num_frames_mid)) && (num_frames_mid > 0)) { - const int64_t shifted_normalized = normalized - - (((int64_t) num_frames_in * ANIMATION_NORMALIZED_MAX) / num_frames_total); - const int32_t mid_normalized = ((int64_t) num_frames_total * shifted_normalized) / - num_frames_mid; + const int64_t shifted_normalized = + normalized - (((int64_t)num_frames_in * ANIMATION_NORMALIZED_MAX) / num_frames_total); + const int32_t mid_normalized = + ((int64_t)num_frames_total * shifted_normalized) / num_frames_mid; return interpolate_int64_linear(mid_normalized, from + (direction * frames_in[num_frames_in - 1]), to + (direction_out * frames_out[0])); } else { - return to + (frames_out ? (direction_out * - frames_out[frame_idx - (num_frames_in + num_frames_mid)]) : 0); + return to + (frames_out + ? (direction_out * frames_out[frame_idx - (num_frames_in + num_frames_mid)]) + : 0); } } @@ -136,31 +136,29 @@ int64_t interpolate_moook_in_only(int32_t normalized, int64_t from, int64_t to) ARRAY_LENGTH(s_delta_moook_in), NULL, 0, 0, true); } -int64_t interpolate_moook_out(int32_t normalized, int64_t from, int64_t to, - int32_t num_frames_from, bool bounce_back) { +int64_t interpolate_moook_out(int32_t normalized, int64_t from, int64_t to, int32_t num_frames_from, + bool bounce_back) { return prv_interpolate_moook(normalized, from, to, NULL, num_frames_from, s_delta_moook_out, ARRAY_LENGTH(s_delta_moook_out), 0, bounce_back); } int64_t interpolate_moook(int32_t normalized, int64_t from, int64_t to) { - return prv_interpolate_moook(normalized, from, to, - s_delta_moook_in, ARRAY_LENGTH(s_delta_moook_in), - s_delta_moook_out, ARRAY_LENGTH(s_delta_moook_out), 0, true); + return prv_interpolate_moook(normalized, from, to, s_delta_moook_in, + ARRAY_LENGTH(s_delta_moook_in), s_delta_moook_out, + ARRAY_LENGTH(s_delta_moook_out), 0, true); } int64_t interpolate_moook_soft(int32_t normalized, int64_t from, int64_t to, int32_t num_frames_mid) { - return prv_interpolate_moook(normalized, from, to, - s_delta_moook_in, ARRAY_LENGTH(s_delta_moook_in), - s_delta_moook_out, ARRAY_LENGTH(s_delta_moook_out), - num_frames_mid, true); + return prv_interpolate_moook(normalized, from, to, s_delta_moook_in, + ARRAY_LENGTH(s_delta_moook_in), s_delta_moook_out, + ARRAY_LENGTH(s_delta_moook_out), num_frames_mid, true); } int64_t interpolate_moook_custom(int32_t normalized, int64_t from, int64_t to, const MoookConfig *config) { PBL_ASSERTN(config); - return prv_interpolate_moook(normalized, from, to, - config->frames_in, config->num_frames_in, - config->frames_out, config->num_frames_out, - config->num_frames_mid, !config->no_bounce_back); + return prv_interpolate_moook(normalized, from, to, config->frames_in, config->num_frames_in, + config->frames_out, config->num_frames_out, config->num_frames_mid, + !config->no_bounce_back); } diff --git a/src/fw/applib/ui/animation_interpolate.h b/src/fw/applib/ui/animation_interpolate.h index fa9de1bebc..b24c33e724 100644 --- a/src/fw/applib/ui/animation_interpolate.h +++ b/src/fw/applib/ui/animation_interpolate.h @@ -12,12 +12,12 @@ //! Routines for interpolating between values and points. Useful for animations. typedef struct MoookConfig { - const int32_t *frames_in; //!< In frame lookup table applied as delta * direction to the `from` - size_t num_frames_in; //!< Number of in frames in the frame lookup table - const int32_t *frames_out; //!< Out frame lookup table applied as delta * direction to the `to` - size_t num_frames_out; //!< Number of out frames in the frame lookup table - size_t num_frames_mid; //!< Number of soft mid frames to insert - bool no_bounce_back; //!< Whether the direction should be reversed for out frames. + const int32_t *frames_in; //!< In frame lookup table applied as delta * direction to the `from` + size_t num_frames_in; //!< Number of in frames in the frame lookup table + const int32_t *frames_out; //!< Out frame lookup table applied as delta * direction to the `to` + size_t num_frames_out; //!< Number of out frames in the frame lookup table + size_t num_frames_mid; //!< Number of soft mid frames to insert + bool no_bounce_back; //!< Whether the direction should be reversed for out frames. } MoookConfig; #define INTERPOLATE_MOOOK_BOUNCE_BACK 4 @@ -84,8 +84,7 @@ uint32_t interpolate_moook_custom_duration(const MoookConfig *config); //! @param to Ending point in space of the animation //! @param num_frames_to Remaining number of frames in the animation that do not consist of the //! Moook ease in curve. -int64_t interpolate_moook_in(int32_t normalized, int64_t from, int64_t to, - int32_t num_frames_to); +int64_t interpolate_moook_in(int32_t normalized, int64_t from, int64_t to, int32_t num_frames_to); //! Only the Moook ease in curve. Used for animations that only consist of the ease in. //! @param normalized Time of the point in the ease curve @@ -101,8 +100,8 @@ int64_t interpolate_moook_in_only(int32_t normalized, int64_t from, int64_t to); //! ease out curve. //! @param bounce_back Whether to lead up to the end point from the opposite direction if we were //! to lead up from the start point, which a normal Moook curve would do. -int64_t interpolate_moook_out(int32_t normalized, int64_t from, int64_t to, - int32_t num_frames_from, bool bounce_back); +int64_t interpolate_moook_out(int32_t normalized, int64_t from, int64_t to, int32_t num_frames_from, + bool bounce_back); //! Moook curve. This is a ease in and ease out curve with a hard cut between the two easings. //! When using this curve, the duration must be set to \ref interpolate_moook_duration() diff --git a/src/fw/applib/ui/animation_private.h b/src/fw/applib/ui/animation_private.h index 76dc6a608d..4537be6dc7 100644 --- a/src/fw/applib/ui/animation_private.h +++ b/src/fw/applib/ui/animation_private.h @@ -5,12 +5,11 @@ #include "animation.h" -#define ANIMATION_LOG_DEBUG(fmt, args...) \ - PBL_LOG_D_DBG(LOG_DOMAIN_ANIMATION, fmt, ## args) +#define ANIMATION_LOG_DEBUG(fmt, args...) PBL_LOG_D_DBG(LOG_DOMAIN_ANIMATION, fmt, ##args) -#define ANIMATION_MAX_CHILDREN 256 +#define ANIMATION_MAX_CHILDREN 256 #define ANIMATION_PLAY_COUNT_INFINITE_STORED ((uint16_t)~0) -#define ANIMATION_MAX_CREATE_VARGS 20 +#define ANIMATION_MAX_CREATE_VARGS 20 typedef enum { AnimationTypePrimitive, @@ -18,7 +17,6 @@ typedef enum { AnimationTypeSpawn } AnimationType; - //! The data structure of an animation. typedef struct AnimationPrivate { //! At any one time, an animation is either in the scheduled list (scheduled_head of @@ -37,21 +35,21 @@ typedef struct AnimationPrivate { uint32_t abs_start_time_ms; uint32_t delay_ms; uint32_t duration_ms; - uint16_t play_count; // Desired play count - uint16_t times_played; // incremented each time we play it - - AnimationCurve curve:3; - bool is_completed:1; - bool auto_destroy:1; - bool being_destroyed:1; - AnimationType type:2; - bool is_property_animation:1; // used for cloning - bool reverse:1; - bool started:1; // set true after we call the started handler - bool calling_end_handlers:1; - bool defer_delete:1; - bool did_setup:1; - bool immutable:1; + uint16_t play_count; // Desired play count + uint16_t times_played; // incremented each time we play it + + AnimationCurve curve : 3; + bool is_completed : 1; + bool auto_destroy : 1; + bool being_destroyed : 1; + AnimationType type : 2; + bool is_property_animation : 1; // used for cloning + bool reverse : 1; + bool started : 1; // set true after we call the started handler + bool calling_end_handlers : 1; + bool defer_delete : 1; + bool did_setup : 1; + bool immutable : 1; union { AnimationCurveFunction custom_curve_function; @@ -61,7 +59,7 @@ typedef struct AnimationPrivate { // If this animation is part of a complex animation, this is the parent struct AnimationPrivate *parent; - uint8_t child_idx; // for children of complex animations, this is the child's idx + uint8_t child_idx; // for children of complex animations, this is the child's idx #ifdef UNITTEST //! Points to the next sibling if this is a child in a complex animation and one exists struct AnimationPrivate *sibling; @@ -72,13 +70,12 @@ typedef struct AnimationPrivate { #endif } AnimationPrivate; - //! In case the 3rd party app was built for 2.0, we can't use more memory in the app state than //! the 2.0 legacy animation does. So, we put additional context required for 3.0 into this //! dynamically allocated block typedef struct { //! Each created animation gets a unique integer handle ID - uint32_t next_handle; + uint32_t next_handle; //! Reference to the animation that we are calling the .update handler for //! Will be reset to NULL once the .update handler finishes @@ -87,19 +84,18 @@ typedef struct { //! The delay the animation scheduler uses between finishing a frame and starting a new one. //! Derived from actual rendering/calculation times, using a PID-like control algorithm. uint32_t last_delay_ms; - uint32_t last_frame_time_ms; //! Absolute time of the moment the last animation frame started. + uint32_t last_frame_time_ms; //! Absolute time of the moment the last animation frame started. //! The next Animation to be iterated, NULL if at end of iteration or not iterating. //! This allows arbitrarily unscheduling any animation at any time. ListNode *iter_next; } AnimationAuxState; - //! The currently running app task and the KernelMain task each have their own instance of //! AnimationState which is stored as part of the app_state structure. In order to support //! legacy 2.0 applications, this structure can be no larger than the AnimationLegacy2State //! structure. -#define ANIMATION_STATE_3_X_SIGNATURE ((uint32_t)(~0)) +#define ANIMATION_STATE_3_X_SIGNATURE ((uint32_t)(~0)) typedef struct { //! Signature used to distinguish these globals from the legacy 2.0 globals. The legacy 2.0 //! globals start with a ListNode pointer. We put a value here (ANIMATION_STATE_3_X_SIGNATURE) diff --git a/src/fw/applib/ui/animation_timing.c b/src/fw/applib/ui/animation_timing.c index f8f01fe46e..5b54b79d99 100644 --- a/src/fw/applib/ui/animation_timing.c +++ b/src/fw/applib/ui/animation_timing.c @@ -9,41 +9,23 @@ //! @file animation_timing.c -static const uint16_t s_ease_in_table[] = { - 0, 64, 256, 576, - 1024, 1600, 2304, 3136, - 4096, 5184, 6400, 7744, - 9216, 10816, 12544, 14400, - 16384, 18496, 20736, 23104, - 25600, 28224, 30976, 33856, - 36864, 40000, 43264, 46656, - 50176, 53824, 57600, 61504, - 65535 -}; - -static const uint16_t s_ease_out_table[] = { - 0, 4031, 7935, 11711, - 15359, 18879, 22271, 25535, - 28671, 31679, 34559, 37311, - 39935, 42431, 44799, 47039, - 49151, 51135, 52991, 54719, - 56319, 57791, 59135, 60351, - 61439, 62399, 63231, 63935, - 64511, 64959, 65279, 65471, - 65535 -}; - -static const uint16_t s_ease_in_out_table[] = { - 0, 128, 512, 1152, - 2048, 3200, 4608, 6272, - 8192, 10368, 12800, 15488, - 18432, 21632, 25088, 28800, - 32770, 36737, 40449, 43905, - 47105, 50049, 52737, 55169, - 57345, 59265, 60929, 62337, - 63488, 64384, 65024, 65408, - 65535 -}; +static const uint16_t s_ease_in_table[] = {0, 64, 256, 576, 1024, 1600, 2304, + 3136, 4096, 5184, 6400, 7744, 9216, 10816, + 12544, 14400, 16384, 18496, 20736, 23104, 25600, + 28224, 30976, 33856, 36864, 40000, 43264, 46656, + 50176, 53824, 57600, 61504, 65535}; + +static const uint16_t s_ease_out_table[] = {0, 4031, 7935, 11711, 15359, 18879, 22271, + 25535, 28671, 31679, 34559, 37311, 39935, 42431, + 44799, 47039, 49151, 51135, 52991, 54719, 56319, + 57791, 59135, 60351, 61439, 62399, 63231, 63935, + 64511, 64959, 65279, 65471, 65535}; + +static const uint16_t s_ease_in_out_table[] = {0, 128, 512, 1152, 2048, 3200, 4608, + 6272, 8192, 10368, 12800, 15488, 18432, 21632, + 25088, 28800, 32770, 36737, 40449, 43905, 47105, + 50049, 52737, 55169, 57345, 59265, 60929, 62337, + 63488, 64384, 65024, 65408, 65535}; typedef struct { const size_t num_entries; @@ -51,13 +33,13 @@ typedef struct { } EasingTable; static const EasingTable s_easing_tables[] = { - [AnimationCurveEaseIn] = { ARRAY_LENGTH(s_ease_in_table), s_ease_in_table }, - [AnimationCurveEaseOut] = { ARRAY_LENGTH(s_ease_out_table), s_ease_out_table }, - [AnimationCurveEaseInOut] = { ARRAY_LENGTH(s_ease_in_out_table), s_ease_in_out_table }, + [AnimationCurveEaseIn] = {ARRAY_LENGTH(s_ease_in_table), s_ease_in_table}, + [AnimationCurveEaseOut] = {ARRAY_LENGTH(s_ease_out_table), s_ease_out_table}, + [AnimationCurveEaseInOut] = {ARRAY_LENGTH(s_ease_in_out_table), s_ease_in_out_table}, }; -int32_t animation_timing_segmented(int32_t time_normalized, int32_t index, - uint32_t num_segments, Fixed_S32_16 duration_fraction) { +int32_t animation_timing_segmented(int32_t time_normalized, int32_t index, uint32_t num_segments, + Fixed_S32_16 duration_fraction) { PBL_ASSERTN(num_segments > 0 && duration_fraction.raw_value > 0); if (index < 0) { return ANIMATION_NORMALIZED_MAX; @@ -66,15 +48,16 @@ int32_t animation_timing_segmented(int32_t time_normalized, int32_t index, return 0; } - const int32_t duration_per_item = ((int64_t) ANIMATION_NORMALIZED_MAX - * duration_fraction.raw_value) / FIXED_S32_16_ONE.raw_value; + const int32_t duration_per_item = + ((int64_t)ANIMATION_NORMALIZED_MAX * duration_fraction.raw_value) / + FIXED_S32_16_ONE.raw_value; const int32_t delay_per_item = (ANIMATION_NORMALIZED_MAX - duration_per_item) / num_segments; const int32_t normalized_offset = time_normalized - index * delay_per_item; if (normalized_offset < 0) { return 0; } - const int32_t relative_progress = ((int64_t) normalized_offset - * FIXED_S32_16_ONE.raw_value) / duration_fraction.raw_value; + const int32_t relative_progress = + ((int64_t)normalized_offset * FIXED_S32_16_ONE.raw_value) / duration_fraction.raw_value; if (relative_progress > ANIMATION_NORMALIZED_MAX) { return ANIMATION_NORMALIZED_MAX; } @@ -84,11 +67,11 @@ int32_t animation_timing_segmented(int32_t time_normalized, int32_t index, typedef int64_t (*ArrayAccessorInt64)(const void *array, size_t index); static int64_t prv_uint16_getter(const void *array, size_t idx) { - return ((uint16_t*)array)[idx]; + return ((uint16_t *)array)[idx]; } static int64_t prv_int32_getter(const void *array, size_t idx) { - return ((int32_t*)array)[idx]; + return ((int32_t *)array)[idx]; } AnimationProgress prv_animation_timing_interpolate(AnimationProgress progress, const void *array, @@ -97,10 +80,10 @@ AnimationProgress prv_animation_timing_interpolate(AnimationProgress progress, c const size_t max_entry = num_entries - 1; if (progress <= ANIMATION_NORMALIZED_MIN) { - return (AnimationProgress) getter(array, 0); + return (AnimationProgress)getter(array, 0); } if (progress >= ANIMATION_NORMALIZED_MAX) { - return (AnimationProgress) getter(array, max_entry); + return (AnimationProgress)getter(array, max_entry); } // Linear interpolate from the easing table. @@ -108,21 +91,20 @@ AnimationProgress prv_animation_timing_interpolate(AnimationProgress progress, c const size_t index = (progress * max_entry) / ANIMATION_NORMALIZED_MAX; const int64_t from = getter(array, index); const int64_t delta = getter(array, index + 1) - from; - return (AnimationProgress) (from + (delta * (progress - index * stride)) / stride); + return (AnimationProgress)(from + (delta * (progress - index * stride)) / stride); } -AnimationProgress animation_timing_interpolate( - AnimationProgress time_normalized, const uint16_t *table, size_t num_entries) { +AnimationProgress animation_timing_interpolate(AnimationProgress time_normalized, + const uint16_t *table, size_t num_entries) { return prv_animation_timing_interpolate(time_normalized, table, prv_uint16_getter, num_entries); } -AnimationProgress animation_timing_interpolate32( - AnimationProgress time_normalized, const int32_t *table, size_t num_entries) { +AnimationProgress animation_timing_interpolate32(AnimationProgress time_normalized, + const int32_t *table, size_t num_entries) { return prv_animation_timing_interpolate(time_normalized, table, prv_int32_getter, num_entries); } -AnimationProgress animation_timing_curve(AnimationProgress time_normalized, - AnimationCurve curve) { +AnimationProgress animation_timing_curve(AnimationProgress time_normalized, AnimationCurve curve) { switch (curve) { case AnimationCurveEaseIn: case AnimationCurveEaseOut: diff --git a/src/fw/applib/ui/animation_timing.h b/src/fw/applib/ui/animation_timing.h index f70f2f7e74..02c5a1a4ad 100644 --- a/src/fw/applib/ui/animation_timing.h +++ b/src/fw/applib/ui/animation_timing.h @@ -27,11 +27,11 @@ AnimationProgress animation_timing_segmented(AnimationProgress time_normalized, //! @param time_normalized the normalized time between 0 and ANIMATION_NORMALIZED_MAX inclusive //! @param table a curve with entries eased from 0 to ANIMATION_NORMALIZED_MAX //! @param num_entries number of entries in the table -AnimationProgress animation_timing_interpolate( - AnimationProgress time_normalized, const uint16_t *table, size_t num_entries); +AnimationProgress animation_timing_interpolate(AnimationProgress time_normalized, + const uint16_t *table, size_t num_entries); -AnimationProgress animation_timing_interpolate32( - AnimationProgress time_normalized, const int32_t *table, size_t num_entries); +AnimationProgress animation_timing_interpolate32(AnimationProgress time_normalized, + const int32_t *table, size_t num_entries); //! Converts normalized time to a timing based on a specified curve //! @param time_normalized the normalized time between 0 and ANIMATION_NORMALIZED_MAX inclusive @@ -40,7 +40,7 @@ AnimationProgress animation_timing_interpolate32( AnimationProgress animation_timing_curve(AnimationProgress time_normalized, AnimationCurve curve); static inline AnimationProgress animation_timing_clip(AnimationProgress time_normalized) { - return CLIP(time_normalized, 0, ANIMATION_NORMALIZED_MAX); + return CLIP(time_normalized, 0, ANIMATION_NORMALIZED_MAX); } //! Rescales a given time as with respect to a given interval diff --git a/src/fw/applib/ui/app_window_click_glue.c b/src/fw/applib/ui/app_window_click_glue.c index ff63391cac..20ae8e7d37 100644 --- a/src/fw/applib/ui/app_window_click_glue.c +++ b/src/fw/applib/ui/app_window_click_glue.c @@ -10,8 +10,8 @@ //////////////////////////////////////////////// // App + Click Recognizer + Window : Glue code // -// [MT] This is a bit ugly, because I decided to to save memory and have all windows in an app share an array of -// click recognizers (which lives in AppContext) instead of each window having its own. +// [MT] This is a bit ugly, because I decided to to save memory and have all windows in an app share +// an array of click recognizers (which lives in AppContext) instead of each window having its own. // See the comment near AppContext.click_recognizer. void app_click_config_setup_with_window(ClickManager *click_manager, struct Window *window) { @@ -32,4 +32,3 @@ void app_click_config_setup_with_window(ClickManager *click_manager, struct Wind window_call_click_config_provider(window, context); } } - diff --git a/src/fw/applib/ui/app_window_click_glue.h b/src/fw/applib/ui/app_window_click_glue.h index a980a44d38..858c5529ba 100644 --- a/src/fw/applib/ui/app_window_click_glue.h +++ b/src/fw/applib/ui/app_window_click_glue.h @@ -9,11 +9,11 @@ //////////////////////////////////////////////// // App + Click Recognizer + Window = Glue code -//! Calls the provider function of the window with the ClickConfig structs of the "app global" click recognizers. -//! The window is set as context to of each of the ClickConfig's .context fields for convenience. -//! In case window has a click_config_context set, it will use that as context instead of the window itself. +//! Calls the provider function of the window with the ClickConfig structs of the "app global" click +//! recognizers. The window is set as context to of each of the ClickConfig's .context fields for +//! convenience. In case window has a click_config_context set, it will use that as context instead +//! of the window itself. //! @see AppContext.click_recognizer[] struct Window; -void app_click_config_setup_with_window(ClickManager* click_manager, struct Window *window); - +void app_click_config_setup_with_window(ClickManager *click_manager, struct Window *window); diff --git a/src/fw/applib/ui/app_window_stack.c b/src/fw/applib/ui/app_window_stack.c index 07a347413d..f3bb8820ae 100644 --- a/src/fw/applib/ui/app_window_stack.c +++ b/src/fw/applib/ui/app_window_stack.c @@ -16,8 +16,7 @@ #include "pbl/kernel/sem.h" void app_window_stack_push(Window *window, bool animated) { - PBL_LOG_DBG("Pushing window %p onto app window stack %p", - window, app_state_get_window_stack()); + PBL_LOG_DBG("Pushing window %p onto app window stack %p", window, app_state_get_window_stack()); window_stack_push(app_state_get_window_stack(), window, animated); } @@ -70,7 +69,7 @@ static void prv_window_stack_info_cb(void *ctx) { } void command_window_stack_info(void) { - struct WindowStackInfoContext info = { 0 }; + struct WindowStackInfoContext info = {0}; pbl_sem_init(&info.interlock, 0, 1); // FIXME: Dumping the app window stack from another task without a // lock exposes us to the possibility of catching the window stack in @@ -87,12 +86,11 @@ void command_window_stack_info(void) { } char buffer[128]; - prompt_send_response_fmt( - buffer, sizeof(buffer), - "Window Stack, top to bottom: (%zu)", info.count); + prompt_send_response_fmt(buffer, sizeof(buffer), "Window Stack, top to bottom: (%zu)", + info.count); for (size_t i = 0; i < info.count; ++i) { - prompt_send_response_fmt(buffer, sizeof(buffer), "window %p <%s>", - info.dump[i].addr, info.dump[i].name); + prompt_send_response_fmt(buffer, sizeof(buffer), "window %p <%s>", info.dump[i].addr, + info.dump[i].name); } cleanup: kernel_free(info.dump); diff --git a/src/fw/applib/ui/app_window_stack.h b/src/fw/applib/ui/app_window_stack.h index d6b6225b30..5ce820de45 100644 --- a/src/fw/applib/ui/app_window_stack.h +++ b/src/fw/applib/ui/app_window_stack.h @@ -16,18 +16,20 @@ //! The navigation model of Pebble centers on the concept of a vertical “stack” of windows, similar //! to mobile app interactions. //! -//! In working with the Window Stack API, the basic operations include push and pop. When an app wants to -//! display a new window, it pushes a new window onto the stack. This appears like a window sliding in -//! from the right. As an app is closed, the window is popped off the stack and disappears. +//! In working with the Window Stack API, the basic operations include push and pop. When an app +//! wants to display a new window, it pushes a new window onto the stack. This appears like a window +//! sliding in from the right. As an app is closed, the window is popped off the stack and +//! disappears. //! -//! For more complicated operations, involving multiple windows, you can determine which windows reside -//! on the stack, using window_stack_contains_window() and remove any specific window, using window_stack_remove(). +//! For more complicated operations, involving multiple windows, you can determine which windows +//! reside on the stack, using window_stack_contains_window() and remove any specific window, using +//! window_stack_remove(). //! //! Refer to the \htmlinclude UiFramework.html (chapter "Window Stack") for a conceptual overview //! of the window stack and relevant code examples. //! -//! Also see the \ref WindowHandlers of a \ref Window for the callbacks that can be added to a window -//! in order to act upon window stack transitions. +//! Also see the \ref WindowHandlers of a \ref Window for the callbacks that can be added to a +//! window in order to act upon window stack transitions. //! //! @{ @@ -48,7 +50,7 @@ void app_window_stack_insert_next(Window *window); //! Pops the topmost window on the navigation stack //! @param animated See \ref window_stack_remove() //! @return The window that is popped, or NULL if there are no windows to pop. -Window* app_window_stack_pop(bool animated); +Window *app_window_stack_pop(bool animated); //! Pops all windows. //! See \ref window_stack_remove() for a description of the `animated` parameter and notes. @@ -71,7 +73,7 @@ bool app_window_stack_remove(Window *window, bool animated); //! Gets the topmost window on the stack that belongs to the app. //! @return The topmost window on the stack that belongs to the app or //! NULL if no app window could be found. -Window* app_window_stack_get_top_window(void); +Window *app_window_stack_get_top_window(void); //! Checks if the window is on the window stack //! @param window The window to look for on the window stack diff --git a/src/fw/applib/ui/bitmap_layer.c b/src/fw/applib/ui/bitmap_layer.c index a85ebe4968..f9b5b3dae9 100644 --- a/src/fw/applib/ui/bitmap_layer.c +++ b/src/fw/applib/ui/bitmap_layer.c @@ -7,7 +7,7 @@ #include "applib/applib_malloc.auto.h" #include "process_management/process_manager.h" -void bitmap_layer_update_proc(BitmapLayer *image, GContext* ctx) { +void bitmap_layer_update_proc(BitmapLayer *image, GContext *ctx) { const GColor bg_color = image->background_color; if (!gcolor_is_transparent(bg_color)) { graphics_context_set_fill_color(ctx, bg_color); @@ -42,8 +42,8 @@ void bitmap_layer_init(BitmapLayer *image, const GRect *frame) { layer_mark_dirty(&(image->layer)); } -BitmapLayer* bitmap_layer_create(GRect frame) { - BitmapLayer* layer = applib_type_malloc(BitmapLayer); +BitmapLayer *bitmap_layer_create(GRect frame) { + BitmapLayer *layer = applib_type_malloc(BitmapLayer); if (layer) { bitmap_layer_init(layer, &frame); } @@ -54,7 +54,7 @@ void bitmap_layer_deinit(BitmapLayer *bitmap_layer) { layer_deinit(&bitmap_layer->layer); } -void bitmap_layer_destroy(BitmapLayer* bitmap_layer) { +void bitmap_layer_destroy(BitmapLayer *bitmap_layer) { if (bitmap_layer == NULL) { return; } @@ -62,11 +62,11 @@ void bitmap_layer_destroy(BitmapLayer* bitmap_layer) { applib_free(bitmap_layer); } -Layer* bitmap_layer_get_layer(const BitmapLayer *bitmap_layer) { +Layer *bitmap_layer_get_layer(const BitmapLayer *bitmap_layer) { return &((BitmapLayer *)bitmap_layer)->layer; } -const GBitmap* bitmap_layer_get_bitmap(BitmapLayer* bitmap_layer) { +const GBitmap *bitmap_layer_get_bitmap(BitmapLayer *bitmap_layer) { return bitmap_layer->bitmap; } diff --git a/src/fw/applib/ui/bitmap_layer.h b/src/fw/applib/ui/bitmap_layer.h index da3815a6a1..ae10d4bfeb 100644 --- a/src/fw/applib/ui/bitmap_layer.h +++ b/src/fw/applib/ui/bitmap_layer.h @@ -17,8 +17,8 @@ //! \brief Layer that displays a bitmap image. //! //! ![](bitmap_layer.png) -//! BitmapLayer is a Layer subtype that draws a GBitmap within its frame. It uses an alignment property -//! to specify how to position the bitmap image within its frame. Optionally, when the +//! BitmapLayer is a Layer subtype that draws a GBitmap within its frame. It uses an alignment +//! property to specify how to position the bitmap image within its frame. Optionally, when the //! background color is not GColorClear, it draws a solid background color behind the //! bitmap image, filling areas of the frame that are not covered by the bitmap image. //! Lastly, using the compositing mode property of the BitmapLayer, determines the way the @@ -49,8 +49,8 @@ typedef struct BitmapLayer { Layer layer; const GBitmap *bitmap; GColor8 background_color; - GAlign alignment:4; - GCompOp compositing_mode:3; + GAlign alignment : 4; + GCompOp compositing_mode : 3; } BitmapLayer; //! Initializes the BitmapLayer @@ -73,7 +73,7 @@ void bitmap_layer_init(BitmapLayer *bitmap_layer, const GRect *frame); //! * Clips: `true` //! @return A pointer to the BitmapLayer. `NULL` if the BitmapLayer could not //! be created -BitmapLayer* bitmap_layer_create(GRect frame); +BitmapLayer *bitmap_layer_create(GRect frame); //! De-initializes the BitmapLayer //! Removes the layer from the parent layer. @@ -81,7 +81,7 @@ BitmapLayer* bitmap_layer_create(GRect frame); void bitmap_layer_deinit(BitmapLayer *bitmap_layer); //! Destroys a window previously created by bitmap_layer_create -void bitmap_layer_destroy(BitmapLayer* bitmap_layer); +void bitmap_layer_destroy(BitmapLayer *bitmap_layer); //! Gets the "root" Layer of the bitmap layer, which is the parent for the sub- //! layers used for its implementation. @@ -89,13 +89,13 @@ void bitmap_layer_destroy(BitmapLayer* bitmap_layer); //! @return The "root" Layer of the bitmap layer. //! @internal //! @note The result is always equal to `(Layer *) bitmap_layer`. -Layer* bitmap_layer_get_layer(const BitmapLayer *bitmap_layer); +Layer *bitmap_layer_get_layer(const BitmapLayer *bitmap_layer); //! Gets the pointer to the bitmap image that the BitmapLayer is using. //! //! @param bitmap_layer The BitmapLayer for which to get the bitmap image //! @return A pointer to the bitmap image that the BitmapLayer is using -const GBitmap* bitmap_layer_get_bitmap(BitmapLayer *bitmap_layer); +const GBitmap *bitmap_layer_get_bitmap(BitmapLayer *bitmap_layer); //! Sets the bitmap onto the BitmapLayer. The bitmap is set by reference (no deep //! copy), thus the caller of this function has to make sure the bitmap is kept diff --git a/src/fw/applib/ui/click.c b/src/fw/applib/ui/click.c index a2256f5195..68dc30392d 100644 --- a/src/fw/applib/ui/click.c +++ b/src/fw/applib/ui/click.c @@ -30,7 +30,7 @@ typedef enum { } ClickHandlerOffset; static ClickHandler prv_get_handler(ClickRecognizer *recognizer, ClickHandlerOffset offset) { - return *((ClickHandler*)(((uint8_t*)&recognizer->config) + offset)); + return *((ClickHandler *)(((uint8_t *)&recognizer->config) + offset)); } static void prv_cancel_timer(AppTimer **timer) { @@ -56,7 +56,8 @@ static bool prv_dispatch_event(ClickRecognizer *recognizer, ClickHandlerOffset h ClickHandler handler = prv_get_handler(recognizer, handler_offset); if (handler) { void *context; - if ((handler_offset == ClickHandlerOffsetRawUp || handler_offset == ClickHandlerOffsetRawDown) && + if ((handler_offset == ClickHandlerOffsetRawUp || + handler_offset == ClickHandlerOffsetRawDown) && recognizer->config.raw.context != NULL) { // The context for raw click events is overridable: context = recognizer->config.raw.context; @@ -86,7 +87,8 @@ inline static bool prv_is_multi_click_enabled(ClickRecognizer *recognizer) { } inline static bool prv_is_long_click_enabled(ClickRecognizer *recognizer) { - return (recognizer->config.long_click.handler != NULL || recognizer->config.long_click.release_handler != NULL); + return (recognizer->config.long_click.handler != NULL || + recognizer->config.long_click.release_handler != NULL); } static void prv_auto_repeat_single_click(ClickRecognizer *recognizer) { @@ -98,8 +100,9 @@ static void prv_auto_repeat_single_click(ClickRecognizer *recognizer) { // Start the repetition timer: // Note: We're not using the timer_register_repeating() here, so we have the possibility // of changing the interval in the handler. - recognizer->hold_timer = app_timer_register(recognizer->config.click.repeat_interval_ms, - (AppTimerCallback)prv_auto_repeat_single_click, recognizer); + recognizer->hold_timer = + app_timer_register(recognizer->config.click.repeat_interval_ms, + (AppTimerCallback)prv_auto_repeat_single_click, recognizer); recognizer->is_repeating = true; // Fire right once: @@ -108,7 +111,7 @@ static void prv_auto_repeat_single_click(ClickRecognizer *recognizer) { } static void prv_repetition_delay_callback(void *data) { - ClickRecognizer *recognizer = (ClickRecognizer *) data; + ClickRecognizer *recognizer = (ClickRecognizer *)data; // User has been holding the button down for more than the repetition delay. prv_auto_repeat_single_click(recognizer); @@ -162,17 +165,17 @@ inline static bool prv_can_more_clicks_follow(ClickRecognizer *recognizer) { } uint8_t click_number_of_clicks_counted(ClickRecognizerRef recognizer_ref) { - ClickRecognizer *recognizer = (ClickRecognizer*)recognizer_ref; + ClickRecognizer *recognizer = (ClickRecognizer *)recognizer_ref; return recognizer->number_of_clicks_counted; } ButtonId click_recognizer_get_button_id(ClickRecognizerRef recognizer_ref) { - ClickRecognizer *recognizer = (ClickRecognizer*)recognizer_ref; + ClickRecognizer *recognizer = (ClickRecognizer *)recognizer_ref; return recognizer->button; } bool click_recognizer_is_repeating(ClickRecognizerRef recognizer_ref) { - ClickRecognizer *recognizer = (ClickRecognizer*)recognizer_ref; + ClickRecognizer *recognizer = (ClickRecognizer *)recognizer_ref; return recognizer->is_repeating; } @@ -181,12 +184,12 @@ bool click_recognizer_is_held_down(ClickRecognizerRef recognizer_ref) { } ClickConfig *click_recognizer_get_config(ClickRecognizerRef recognizer_ref) { - ClickRecognizer *recognizer = (ClickRecognizer*)recognizer_ref; + ClickRecognizer *recognizer = (ClickRecognizer *)recognizer_ref; return &recognizer->config; } static void prv_long_click_callback(void *data) { - ClickRecognizer *recognizer = (ClickRecognizer *) data; + ClickRecognizer *recognizer = (ClickRecognizer *)data; recognizer->hold_timer = NULL; const bool needs_reset = false; @@ -199,7 +202,7 @@ static void prv_click_pattern_done(ClickRecognizer *recognizer) { // a "single click" after the multi-click timeout passed and this callback is called: if (recognizer->number_of_clicks_counted >= 1 && recognizer->is_repeating == false) { int clicks_over = recognizer->number_of_clicks_counted; - for(int i = 0; i < clicks_over; i++) { + for (int i = 0; i < clicks_over; i++) { prv_dispatch_event(recognizer, ClickHandlerOffsetSingle, false); } } @@ -207,7 +210,7 @@ static void prv_click_pattern_done(ClickRecognizer *recognizer) { } static void prv_multi_click_timeout_callback(void *data) { - ClickRecognizer *recognizer = (ClickRecognizer *) data; + ClickRecognizer *recognizer = (ClickRecognizer *)data; recognizer->multi_click_timer = NULL; if (recognizer->config.multi_click.last_click_only && @@ -220,16 +223,16 @@ static void prv_multi_click_timeout_callback(void *data) { } } -void command_put_button_event(const char* button_index, const char* click_type) { +void command_put_button_event(const char *button_index, const char *click_type) { int button = atoi(button_index); const bool needs_reset = false; ClickHandlerOffset offset; - if ((button < 0 || button > NUM_BUTTONS)) { + if ((button < 0 || button > NUM_BUTTONS)) { return; } - switch(*click_type) { + switch (*click_type) { case 's': offset = ClickHandlerOffsetSingle; break; @@ -265,14 +268,14 @@ void click_recognizer_handle_button_down(ClickRecognizer *recognizer) { if (prv_is_long_click_enabled(recognizer)) { const uint32_t long_click_delay = prv_long_click_get_delay(recognizer); - recognizer->hold_timer = app_timer_register( - long_click_delay, prv_long_click_callback, recognizer); + recognizer->hold_timer = + app_timer_register(long_click_delay, prv_long_click_callback, recognizer); } else { const bool local_is_hold_to_repeat_enabled = prv_is_hold_to_repeat_enabled(recognizer); if (local_is_hold_to_repeat_enabled) { // If there's a repeat interval configured, start the repetition delay timer: - recognizer->hold_timer = app_timer_register( - CLICK_REPETITION_DELAY_MS, prv_repetition_delay_callback, recognizer); + recognizer->hold_timer = + app_timer_register(CLICK_REPETITION_DELAY_MS, prv_repetition_delay_callback, recognizer); } if (false == prv_is_multi_click_enabled(recognizer)) { // No long click nor multi click, fire handler immediately on button down: @@ -296,10 +299,9 @@ void click_recognizer_handle_button_up(ClickRecognizer *recognizer) { const bool local_is_long_click_enabled = prv_is_long_click_enabled(recognizer); const bool local_is_multi_click_enabled = prv_is_multi_click_enabled(recognizer); - //const bool local_is_hold_to_repeat_enabled = is_hold_to_repeat_enabled(recognizer); + // const bool local_is_hold_to_repeat_enabled = is_hold_to_repeat_enabled(recognizer); - if (false == local_is_long_click_enabled && - false == local_is_multi_click_enabled) { + if (false == local_is_long_click_enabled && false == local_is_multi_click_enabled) { // Handler already fired in button down. prv_click_reset(recognizer); return; @@ -307,7 +309,8 @@ void click_recognizer_handle_button_up(ClickRecognizer *recognizer) { ++(recognizer->number_of_clicks_counted); - const bool has_long_click_been_fired = (local_is_long_click_enabled && recognizer->hold_timer == NULL); + const bool has_long_click_been_fired = + (local_is_long_click_enabled && recognizer->hold_timer == NULL); if (has_long_click_been_fired) { const bool needs_reset = true; prv_dispatch_event(recognizer, ClickHandlerOffsetLongRelease, needs_reset); @@ -318,7 +321,8 @@ void click_recognizer_handle_button_up(ClickRecognizer *recognizer) { if (local_is_multi_click_enabled && false == recognizer->is_repeating) { const bool local_can_more_clicks_follow = prv_can_more_clicks_follow(recognizer); - bool should_fire_multi_click_handler = ((recognizer->config.multi_click.last_click_only && local_can_more_clicks_follow) == false); + bool should_fire_multi_click_handler = + ((recognizer->config.multi_click.last_click_only && local_can_more_clicks_follow) == false); bool reset_using_event = false; if (should_fire_multi_click_handler) { @@ -331,8 +335,8 @@ void click_recognizer_handle_button_up(ClickRecognizer *recognizer) { if (prv_can_more_clicks_follow(recognizer)) { const uint32_t timeout = prv_multi_click_get_timeout(recognizer); - recognizer->multi_click_timer = app_timer_register( - timeout, prv_multi_click_timeout_callback, recognizer); + recognizer->multi_click_timer = + app_timer_register(timeout, prv_multi_click_timeout_callback, recognizer); return; } else { if (reset_using_event) { @@ -346,26 +350,25 @@ void click_recognizer_handle_button_up(ClickRecognizer *recognizer) { prv_click_pattern_done(recognizer); } -void click_manager_init(ClickManager* click_manager) { - for (unsigned int button_id = 0; - button_id < ARRAY_LENGTH(click_manager->recognizers); ++button_id) { +void click_manager_init(ClickManager *click_manager) { + for (unsigned int button_id = 0; button_id < ARRAY_LENGTH(click_manager->recognizers); + ++button_id) { ClickRecognizer *recognizer = &click_manager->recognizers[button_id]; recognizer->button = button_id; prv_click_reset(recognizer); } } -void click_manager_clear(ClickManager* click_manager) { - for (unsigned int button_id = 0; - button_id < ARRAY_LENGTH(click_manager->recognizers); ++button_id) { +void click_manager_clear(ClickManager *click_manager) { + for (unsigned int button_id = 0; button_id < ARRAY_LENGTH(click_manager->recognizers); + ++button_id) { prv_click_reset(&click_manager->recognizers[button_id]); click_manager->recognizers[button_id].config = (ClickConfig){}; } } static void prv_fire_long_release_if_held(ClickRecognizer *recognizer) { - if (recognizer->is_button_down && - recognizer->hold_timer == NULL && + if (recognizer->is_button_down && recognizer->hold_timer == NULL && recognizer->config.long_click.release_handler != NULL) { prv_dispatch_event(recognizer, ClickHandlerOffsetLongRelease, false /* needs_reset */); } @@ -376,10 +379,9 @@ void click_recognizer_reset(ClickRecognizer *recognizer) { prv_click_reset(recognizer); } -void click_manager_reset(ClickManager* click_manager) { +void click_manager_reset(ClickManager *click_manager) { for (unsigned int button_id = 0; button_id < NUM_BUTTONS; button_id++) { prv_fire_long_release_if_held(&click_manager->recognizers[button_id]); prv_click_reset(&click_manager->recognizers[button_id]); } } - diff --git a/src/fw/applib/ui/click.h b/src/fw/applib/ui/click.h index 1c1bcf68af..33a57babb8 100644 --- a/src/fw/applib/ui/click.h +++ b/src/fw/applib/ui/click.h @@ -19,41 +19,48 @@ //! Each Pebble window handles Pebble's buttons while it is displayed. Raw button down and button //! up events are transformed into click events that can be transferred to your app: //! -//! * Single-click. Detects a single click, that is, a button down event followed by a button up event. -//! It also offers hold-to-repeat functionality (repeated click). +//! * Single-click. Detects a single click, that is, a button down event followed by a button up +//! event. It also offers hold-to-repeat functionality (repeated click). //! * Multi-click. Detects double-clicking, triple-clicking and other arbitrary click counts. //! It can fire its event handler on all of the matched clicks, or just the last. //! * Long-click. Detects long clicks, that is, press-and-hold. -//! * Raw. Simply forwards the raw button events. It is provided as a way to use both the higher level -//! "clicks" processing and the raw button events at the same time. -//! -//! To receive click events when a window is displayed, you must register a \ref ClickConfigProvider for -//! this window with \ref window_set_click_config_provider(). Your \ref ClickConfigProvider will be called every time -//! the window becomes visible with one context argument. By default this context is a pointer to the window but you can -//! change this with \ref window_set_click_config_provider_with_context(). -//! -//! In your \ref ClickConfigProvider you call the \ref window_single_click_subscribe(), \ref window_single_repeating_click_subscribe(), -//! \ref window_multi_click_subscribe(), \ref window_long_click_subscribe() and \ref window_raw_click_subscribe() functions to register -//! a handler for each event you wish to receive. -//! -//! For convenience, click handlers are provided with a \ref ClickRecognizerRef and a user-specified context. -//! -//! The \ref ClickRecognizerRef can be used in combination with \ref click_number_of_clicks_counted(), \ref -//! click_recognizer_get_button_id() and \ref click_recognizer_is_repeating() to get more information about the click. This is -//! useful if you want different buttons or event types to share the same handler. -//! -//! The user-specified context is the context of your \ref ClickConfigProvider (see above). By default it points to the window. -//! You can override it for all handlers with \ref window_set_click_config_provider_with_context() or for a specific button with \ref +//! * Raw. Simply forwards the raw button events. It is provided as a way to use both the higher +//! level "clicks" processing and the raw button events at the same time. +//! +//! To receive click events when a window is displayed, you must register a \ref ClickConfigProvider +//! for this window with \ref window_set_click_config_provider(). Your \ref ClickConfigProvider will +//! be called every time the window becomes visible with one context argument. By default this +//! context is a pointer to the window but you can change this with \ref +//! window_set_click_config_provider_with_context(). +//! +//! In your \ref ClickConfigProvider you call the \ref window_single_click_subscribe(), \ref +//! window_single_repeating_click_subscribe(), +//! \ref window_multi_click_subscribe(), \ref window_long_click_subscribe() and \ref +//! window_raw_click_subscribe() functions to register a handler for each event you wish to receive. +//! +//! For convenience, click handlers are provided with a \ref ClickRecognizerRef and a user-specified +//! context. +//! +//! The \ref ClickRecognizerRef can be used in combination with \ref +//! click_number_of_clicks_counted(), \ref click_recognizer_get_button_id() and \ref +//! click_recognizer_is_repeating() to get more information about the click. This is useful if you +//! want different buttons or event types to share the same handler. +//! +//! The user-specified context is the context of your \ref ClickConfigProvider (see above). By +//! default it points to the window. You can override it for all handlers with \ref +//! window_set_click_config_provider_with_context() or for a specific button with \ref //! window_set_click_context(). //! //!

User interaction in watchfaces

-//! Watchfaces cannot use the buttons to interact with the user. Instead, you can use the \ref AccelerometerService. +//! Watchfaces cannot use the buttons to interact with the user. Instead, you can use the \ref +//! AccelerometerService. //! //!

About the Back button

-//! By default, the Back button will always pop to the previous window on the \ref WindowStack (and leave the app if the current -//! window is the only window). You can override the default back button behavior with \ref window_single_click_subscribe() and -//! \ref window_multi_click_subscribe() but you cannot set a repeating, long or raw click handler on the back button because a long press -//! will always terminate the app and return to the main menu. +//! By default, the Back button will always pop to the previous window on the \ref WindowStack (and +//! leave the app if the current window is the only window). You can override the default back +//! button behavior with \ref window_single_click_subscribe() and +//! \ref window_multi_click_subscribe() but you cannot set a repeating, long or raw click handler on +//! the back button because a long press will always terminate the app and return to the main menu. //! //!

Usage example

//! First associate a click config provider callback with your window: @@ -75,7 +82,8 @@ //! window_multi_click_subscribe(BUTTON_ID_SELECT, 2, 10, 0, true, select_multi_click_handler); //! //! // long click config: -//! window_long_click_subscribe(BUTTON_ID_SELECT, 700, select_long_click_handler, select_long_click_release_handler); +//! window_long_click_subscribe(BUTTON_ID_SELECT, 700, select_long_click_handler, +//! select_long_click_release_handler); //! } //! \endcode //! Now you implement the handlers for each click you've subscribed to and set up: @@ -122,7 +130,8 @@ typedef void *ClickRecognizerRef; //! Function signature of the callback that handles a recognized click pattern //! @param recognizer The click recognizer that detected a "click" pattern -//! @param context Pointer to application specified data (see \ref window_set_click_config_provider_with_context() and +//! @param context Pointer to application specified data (see \ref +//! window_set_click_config_provider_with_context() and //! \ref window_set_click_context()). This defaults to the window. //! @see \ref ClickConfigProvider typedef void (*ClickHandler)(ClickRecognizerRef recognizer, void *context); @@ -133,50 +142,56 @@ typedef void (*ClickHandler)(ClickRecognizerRef recognizer, void *context); //! callback, for the application to configure. //! @see ClickConfigProvider typedef struct ClickConfig { - //! Pointer to developer-supplied data that is also passed to ClickHandler callbacks void *context; /** Single-click */ struct click { //! Fired when a single click is detected and every time "repeat_interval_ms" has been reached. - //! @note When there is a multi_click and/or long_click setup, there will be a delay depending before the single click handler - //! will get fired. On the other hand, when there is no multi_click nor long_click setup, the single click handler will - //! fire directly on button down. + //! @note When there is a multi_click and/or long_click setup, there will be a delay depending + //! before the single click handler will get fired. On the other hand, when there is no + //! multi_click nor long_click setup, the single click handler will fire directly on button + //! down. ClickHandler handler; - //! When holding button down, milliseconds after which "handler" is fired again. The default 0ms means 'no repeat timer'. - //! 30 ms is the minimum allowable value. Values below will be disregarded. - //! In case long_click.handler is configured, `repeat_interval_ms` will not be used. + //! When holding button down, milliseconds after which "handler" is fired again. The default 0ms + //! means 'no repeat timer'. 30 ms is the minimum allowable value. Values below will be + //! disregarded. In case long_click.handler is configured, `repeat_interval_ms` will not be + //! used. uint16_t repeat_interval_ms; - } click; //!< Single-click configuration + } click; //!< Single-click configuration /** Multi-click */ struct multi_click { - uint8_t min; //!< Minimum number of clicks before handler is fired. Defaults to 2. - uint8_t max; //!< Maximum number of clicks after which the click counter is reset. The default 0 means use "min" also as "max". - bool last_click_only; //!< Defaults to false. When true, only the for the last multi-click the handler is called. - ClickHandler handler; //!< Fired for multi-clicks, as "filtered" by the `reset_delay`, `last_click_only`, `min` and `max` parameters. - uint16_t timeout; //!< The delay after which a sequence of clicks is considered finished, and the click counter is reset. The default 0 means 300ms. - } multi_click; //!< Multi-click configuration + uint8_t min; //!< Minimum number of clicks before handler is fired. Defaults to 2. + uint8_t max; //!< Maximum number of clicks after which the click counter is reset. The default + //!< 0 means use "min" also as "max". + bool last_click_only; //!< Defaults to false. When true, only the for the last multi-click the + //!< handler is called. + ClickHandler handler; //!< Fired for multi-clicks, as "filtered" by the `reset_delay`, + //!< `last_click_only`, `min` and `max` parameters. + uint16_t timeout; //!< The delay after which a sequence of clicks is considered finished, and + //!< the click counter is reset. The default 0 means 300ms. + } multi_click; //!< Multi-click configuration /** Long-click */ struct long_click { - uint16_t delay_ms; //!< Milliseconds after which "handler" is fired. Defaults to 500ms. - ClickHandler handler; //!< Fired once, directly as soon as "delay" has been reached. - ClickHandler release_handler; //!< In case a long click has been detected, fired when the button is released. - } long_click; //!< Long-click configuration + uint16_t delay_ms; //!< Milliseconds after which "handler" is fired. Defaults to 500ms. + ClickHandler handler; //!< Fired once, directly as soon as "delay" has been reached. + ClickHandler release_handler; //!< In case a long click has been detected, fired when the + //!< button is released. + } long_click; //!< Long-click configuration /** Raw button up & down */ struct raw { - ClickHandler up_handler; //!< Fired on button up events - ClickHandler down_handler; //!< Fired on button down events - void *context; //!< If this context is not NULL, it will override the general context. - } raw; //!< Raw button event pass-through configuration + ClickHandler up_handler; //!< Fired on button up events + ClickHandler down_handler; //!< Fired on button down events + void *context; //!< If this context is not NULL, it will override the general context. + } raw; //!< Raw button event pass-through configuration } ClickConfig; -//! This callback is called every time the window becomes visible (and when you call \ref window_set_click_config_provider() if -//! the window is already visible). +//! This callback is called every time the window becomes visible (and when you call \ref +//! window_set_click_config_provider() if the window is already visible). //! //! Subscribe to click events using //! \ref window_single_click_subscribe() @@ -185,7 +200,8 @@ typedef struct ClickConfig { //! \ref window_long_click_subscribe() //! \ref window_raw_click_subscribe() //! These subscriptions will get used by the click recognizers of each of the 4 buttons. -//! @param context Pointer to application specific data (see \ref window_set_click_config_provider_with_context()). +//! @param context Pointer to application specific data (see \ref +//! window_set_click_config_provider_with_context()). typedef void (*ClickConfigProvider)(void *context); //! Gets the click count. @@ -201,12 +217,14 @@ ClickConfig *click_recognizer_get_config(ClickRecognizerRef recognizer); //! Gets the button identifier. //! You can use this inside a click handler implementation to get the button id for the click event. -//! @param recognizer The click recognizer for which to get the button id that caused the click event +//! @param recognizer The click recognizer for which to get the button id that caused the click +//! event //! @return the ButtonId of the click recognizer ButtonId click_recognizer_get_button_id(ClickRecognizerRef recognizer); //! Is this a repeating click. -//! You can use this inside a click handler implementation to find out whether this is a repeating click or not. +//! You can use this inside a click handler implementation to find out whether this is a repeating +//! click or not. //! @param recognizer The click recognizer for which to find out whether this is a repeating click. //! @return true if this is a repeating click. bool click_recognizer_is_repeating(ClickRecognizerRef recognizer); diff --git a/src/fw/applib/ui/click_internal.h b/src/fw/applib/ui/click_internal.h index 48521b5887..339a2043f8 100644 --- a/src/fw/applib/ui/click_internal.h +++ b/src/fw/applib/ui/click_internal.h @@ -66,14 +66,14 @@ void click_recognizer_handle_button_down(ClickRecognizer *recognizer); //! Reset the state of a single recognizer, including timers. void click_recognizer_reset(ClickRecognizer *recognizer); -//! Initialize a click manager for use. This only needs to be called once to initialize the structure, and then the -//! same struct can be reconfigured multiple times by using click_manager_clear. -void click_manager_init(ClickManager* click_manager); +//! Initialize a click manager for use. This only needs to be called once to initialize the +//! structure, and then the same struct can be reconfigured multiple times by using +//! click_manager_clear. +void click_manager_init(ClickManager *click_manager); -//! Clear out any state from the click manager, including configuration. This ClickManager can be reconfigured at any -//! time. -void click_manager_clear(ClickManager* click_manager); +//! Clear out any state from the click manager, including configuration. This ClickManager can be +//! reconfigured at any time. +void click_manager_clear(ClickManager *click_manager); //! Reset the state from the click manager, including timers. -void click_manager_reset(ClickManager* click_manager); - +void click_manager_reset(ClickManager *click_manager); diff --git a/src/fw/applib/ui/content_indicator.c b/src/fw/applib/ui/content_indicator.c index 90cbdfefcc..adaafe1b45 100644 --- a/src/fw/applib/ui/content_indicator.c +++ b/src/fw/applib/ui/content_indicator.c @@ -20,8 +20,7 @@ //! @param output_context An output context. //! @return `true` if iteration should continue, `false` otherwise. typedef bool (*ContentIndicatorIteratorCb)(ContentIndicator *content_indicator, - size_t buffer_offset_bytes, - void *input_context, + size_t buffer_offset_bytes, void *input_context, void *output_context); bool prv_content_indicator_init(ContentIndicator *content_indicator) { @@ -34,9 +33,8 @@ bool prv_content_indicator_init(ContentIndicator *content_indicator) { // Add the content indicator to the appropriate buffer ContentIndicatorsBuffer *content_indicators_buffer = content_indicator_get_current_buffer(); Buffer *buffer = &content_indicators_buffer->buffer; - size_t bytes_written = buffer_add(buffer, - (uint8_t *)&content_indicator, - sizeof(ContentIndicator *)); + size_t bytes_written = + buffer_add(buffer, (uint8_t *)&content_indicator, sizeof(ContentIndicator *)); // Return whether or not the content indicator was successfully written to the buffer return (bytes_written == sizeof(ContentIndicator *)); } @@ -48,8 +46,7 @@ void content_indicator_init(ContentIndicator *content_indicator) { //! Returns `true` if `iterator_cb` signaled iteration to end, `false` otherwise. static bool prv_content_indicator_iterate(ContentIndicatorIteratorCb iterator_cb, - void *input_context, - void *output_context) { + void *input_context, void *output_context) { if (!iterator_cb) { return false; } @@ -98,8 +95,7 @@ ContentIndicator *content_indicator_get_for_scroll_layer(ScrollLayer *scroll_lay } ContentIndicator *content_indicator = NULL; - prv_content_indicator_iterate(prv_content_indicator_find_for_scroll_layer_cb, - scroll_layer, + prv_content_indicator_iterate(prv_content_indicator_find_for_scroll_layer_cb, scroll_layer, &content_indicator); return content_indicator; } @@ -160,8 +156,7 @@ void content_indicator_deinit(ContentIndicator *content_indicator) { // Find the offset of the content indicator in the buffer size_t buffer_offset_bytes; if (!prv_content_indicator_iterate(prv_content_indicator_find_buffer_offset_bytes_cb, - content_indicator, - &buffer_offset_bytes)) { + content_indicator, &buffer_offset_bytes)) { return; } @@ -186,8 +181,7 @@ void content_indicator_destroy_for_scroll_layer(ScrollLayer *scroll_layer) { } ContentIndicator *content_indicator; - if (prv_content_indicator_iterate(prv_content_indicator_find_for_scroll_layer_cb, - scroll_layer, + if (prv_content_indicator_iterate(prv_content_indicator_find_for_scroll_layer_cb, scroll_layer, &content_indicator)) { content_indicator_destroy(content_indicator); } @@ -226,9 +220,9 @@ bool content_indicator_configure_direction(ContentIndicator *content_indicator, ContentIndicatorDirectionData *direction_data = &content_indicator->direction_data[direction]; prv_content_indicator_reset_direction(direction_data); *direction_data = (ContentIndicatorDirectionData){ - .direction = direction, - .config = *config, - .original_update_proc = config->layer->update_proc, + .direction = direction, + .config = *config, + .original_update_proc = config->layer->update_proc, }; return true; @@ -249,12 +243,9 @@ static bool prv_content_indicator_find_direction_data_cb(ContentIndicator *conte return true; } -void content_indicator_draw_arrow(GContext *ctx, - const GRect *frame, - ContentIndicatorDirection direction, - GColor fg_color, - GColor bg_color, - GAlign alignment) { +void content_indicator_draw_arrow(GContext *ctx, const GRect *frame, + ContentIndicatorDirection direction, GColor fg_color, + GColor bg_color, GAlign alignment) { // Fill the background color graphics_context_set_fill_color(ctx, bg_color); graphics_fill_rect(ctx, frame); @@ -262,14 +253,17 @@ void content_indicator_draw_arrow(GContext *ctx, // Pick the arrow to draw const int16_t arrow_height = 6; const GPathInfo arrow_up_path_info = { - .num_points = 3, - .points = (GPoint[]) {{0, arrow_height}, {(arrow_height + 1), 0}, - {((arrow_height * 2) + 1), arrow_height}} + .num_points = 3, + .points = (GPoint[]){ + {0, arrow_height}, + {(arrow_height + 1), 0}, + {((arrow_height * 2) + 1), arrow_height} + } }; const GPathInfo arrow_down_path_info = { - .num_points = 3, - .points = (GPoint[]) {{0, 0}, {(arrow_height + 1), arrow_height}, - {((arrow_height * 2) + 1), 0}} + .num_points = 3, + .points = + (GPoint[]){{0, 0}, {(arrow_height + 1), arrow_height}, {((arrow_height * 2) + 1), 0}} }; const GPathInfo *arrow_path_info; switch (direction) { @@ -301,18 +295,14 @@ void content_indicator_draw_arrow(GContext *ctx, T_STATIC void prv_content_indicator_update_proc(Layer *layer, GContext *ctx) { // Find the direction data corresponding to the layer that should be updated ContentIndicatorDirectionData *direction_data; - if (!prv_content_indicator_iterate(prv_content_indicator_find_direction_data_cb, - layer, + if (!prv_content_indicator_iterate(prv_content_indicator_find_direction_data_cb, layer, &direction_data)) { return; } ContentIndicatorConfig *config = &direction_data->config; - content_indicator_draw_arrow(ctx, - &layer->bounds, - direction_data->direction, - config->colors.foreground, - config->colors.background, + content_indicator_draw_arrow(ctx, &layer->bounds, direction_data->direction, + config->colors.foreground, config->colors.background, config->alignment); } @@ -326,10 +316,8 @@ bool content_indicator_get_content_available(ContentIndicator *content_indicator return direction_data->content_available; } - void content_indicator_set_content_available(ContentIndicator *content_indicator, - ContentIndicatorDirection direction, - bool available) { + ContentIndicatorDirection direction, bool available) { if (!content_indicator) { return; } @@ -353,9 +341,8 @@ void content_indicator_set_content_available(ContentIndicator *content_indicator // If the arrow should time out and a timer isn't already scheduled, register a timeout timer if (config->times_out && !direction_data->timeout_timer) { direction_data->timeout_timer = app_timer_register( - CONTENT_INDICATOR_TIMEOUT_MS, - (AppTimerCallback)prv_content_indicator_reset_direction, - direction_data); + CONTENT_INDICATOR_TIMEOUT_MS, (AppTimerCallback)prv_content_indicator_reset_direction, + direction_data); } } } diff --git a/src/fw/applib/ui/content_indicator.h b/src/fw/applib/ui/content_indicator.h index 43243692d9..7a377199a4 100644 --- a/src/fw/applib/ui/content_indicator.h +++ b/src/fw/applib/ui/content_indicator.h @@ -23,20 +23,21 @@ typedef struct ScrollLayer ScrollLayer; //! @see \ref content_indicator_configure_direction //! @see \ref content_indicator_set_content_available typedef enum { - ContentIndicatorDirectionUp = 0, //!< The up direction. - ContentIndicatorDirectionDown, //!< The down direction. - NumContentIndicatorDirections //!< The number of supported directions. + ContentIndicatorDirectionUp = 0, //!< The up direction. + ContentIndicatorDirectionDown, //!< The down direction. + NumContentIndicatorDirections //!< The number of supported directions. } ContentIndicatorDirection; //! Struct used to configure directions for \ref ContentIndicator. //! @see \ref content_indicator_configure_direction typedef struct { - Layer *layer; //!< The layer where the arrow indicator will be rendered when content is available. - bool times_out; //!< Whether the display of the arrow indicator should timeout. - GAlign alignment; //!< The alignment of the arrow within the provided layer. + Layer + *layer; //!< The layer where the arrow indicator will be rendered when content is available. + bool times_out; //!< Whether the display of the arrow indicator should timeout. + GAlign alignment; //!< The alignment of the arrow within the provided layer. struct { - GColor foreground; //!< The color of the arrow. - GColor background; //!< The color of the layer behind the arrow. + GColor foreground; //!< The color of the arrow. + GColor background; //!< The color of the layer behind the arrow. } colors; } ContentIndicatorConfig; @@ -98,8 +99,7 @@ bool content_indicator_get_content_available(ContentIndicator *content_indicator //! @note If times_out is enabled, calling this function resets any previously scheduled timeout //! timer for the ContentIndicator. void content_indicator_set_content_available(ContentIndicator *content_indicator, - ContentIndicatorDirection direction, - bool available); + ContentIndicatorDirection direction, bool available); //! @} // end addtogroup ContentIndicator //! @} // end addtogroup UI diff --git a/src/fw/applib/ui/content_indicator_private.h b/src/fw/applib/ui/content_indicator_private.h index 563c180184..82e9e3dc3c 100644 --- a/src/fw/applib/ui/content_indicator_private.h +++ b/src/fw/applib/ui/content_indicator_private.h @@ -9,8 +9,8 @@ #include "util/buffer.h" typedef struct { - ContentIndicatorDirection direction:2; - bool content_available:1; + ContentIndicatorDirection direction : 2; + bool content_available : 1; AppTimer *timeout_timer; ContentIndicatorConfig config; LayerUpdateProc original_update_proc; @@ -35,8 +35,8 @@ struct ContentIndicator { #define CONTENT_INDICATOR_BUFFER_SIZE 4 //! The maximum size (in Bytes) of the buffer of ContentIndicators. -#define CONTENT_INDICATOR_BUFFER_SIZE_BYTES (CONTENT_INDICATOR_BUFFER_SIZE * \ - sizeof(ContentIndicator *)) +#define CONTENT_INDICATOR_BUFFER_SIZE_BYTES \ + (CONTENT_INDICATOR_BUFFER_SIZE * sizeof(ContentIndicator *)) //! This union allows us to statically allocate the storage for a buffer of content indicators. typedef union { diff --git a/src/fw/applib/ui/crumbs_layer.c b/src/fw/applib/ui/crumbs_layer.c index 8dbf618aa7..d2e767cae5 100644 --- a/src/fw/applib/ui/crumbs_layer.c +++ b/src/fw/applib/ui/crumbs_layer.c @@ -18,32 +18,35 @@ typedef struct CrumbsLayerSizeConfig { } CrumbsLayerSizeConfig; static const CrumbsLayerSizeConfig s_crumb_configs[NumPreferredContentSizes] = { - //! @note this is the same as Medium until Small is designed - [PreferredContentSizeSmall] = { - .layer_width = 14, - .crumb_radius = 2, - .crumb_spacing = 8, - .crumb_space_from_top = 8, - }, - [PreferredContentSizeMedium] = { - .layer_width = 14, - .crumb_radius = 2, - .crumb_spacing = 8, - .crumb_space_from_top = 8, - }, - [PreferredContentSizeLarge] = { - .layer_width = 16, - .crumb_radius = 2, - .crumb_spacing = 10, - .crumb_space_from_top = 10, - }, - //! @note this is the same as Large until ExtraLarge is designed - [PreferredContentSizeExtraLarge] = { - .layer_width = 16, - .crumb_radius = 2, - .crumb_spacing = 10, - .crumb_space_from_top = 10, - }, + //! @note this is the same as Medium until Small is designed + [PreferredContentSizeSmall] = + { + .layer_width = 14, + .crumb_radius = 2, + .crumb_spacing = 8, + .crumb_space_from_top = 8, + }, + [PreferredContentSizeMedium] = + { + .layer_width = 14, + .crumb_radius = 2, + .crumb_spacing = 8, + .crumb_space_from_top = 8, + }, + [PreferredContentSizeLarge] = + { + .layer_width = 16, + .crumb_radius = 2, + .crumb_spacing = 10, + .crumb_space_from_top = 10, + }, + //! @note this is the same as Large until ExtraLarge is designed + [PreferredContentSizeExtraLarge] = { + .layer_width = 16, + .crumb_radius = 2, + .crumb_spacing = 10, + .crumb_space_from_top = 10, + }, }; static const CrumbsLayerSizeConfig *prv_crumb_config(void) { @@ -108,12 +111,10 @@ static void prv_crumbs_layer_update_proc_rect(Layer *layer, GContext *ctx) { static void prv_crumbs_layer_update_proc_round(Layer *layer, GContext *ctx) { CrumbsLayer *cl = (CrumbsLayer *)layer; - graphics_context_set_fill_color(ctx, cl->bg_color); // TODO: remove stroke color again, once it's been fixed in fill_radial graphics_context_set_stroke_color(ctx, cl->bg_color); - // compensate for problems with rounding errors and physical display shape const uint16_t overdraw = 2; graphics_fill_radial(ctx, grect_inset(layer->bounds, GEdgeInsets(-overdraw)), @@ -137,8 +138,8 @@ void crumbs_layer_init(CrumbsLayer *crumbs_layer, const GRect *frame, GColor bg_ crumbs_layer->level = 0; crumbs_layer->fg_color = fg_color; crumbs_layer->bg_color = bg_color; - const LayerUpdateProc update_proc = PBL_IF_RECT_ELSE(prv_crumbs_layer_update_proc_rect, - prv_crumbs_layer_update_proc_round); + const LayerUpdateProc update_proc = + PBL_IF_RECT_ELSE(prv_crumbs_layer_update_proc_rect, prv_crumbs_layer_update_proc_round); layer_set_update_proc(&crumbs_layer->layer, update_proc); } @@ -176,13 +177,14 @@ void prv_x_setter(void *subject, int16_t int16) { } static const PropertyAnimationImplementation s_prop_impl = { - .base = { - .update = (AnimationUpdateImplementation)property_animation_update_int16, - }, - .accessors = { - .getter.int16 = prv_x_getter, - .setter.int16 = prv_x_setter, - }, + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_int16, + }, + .accessors = { + .getter.int16 = prv_x_getter, + .setter.int16 = prv_x_setter, + }, }; Animation *crumbs_layer_get_animation(CrumbsLayer *crumbs_layer) { diff --git a/src/fw/applib/ui/date_selection_window.c b/src/fw/applib/ui/date_selection_window.c index 109b0be0a5..70f06f9ca5 100644 --- a/src/fw/applib/ui/date_selection_window.c +++ b/src/fw/applib/ui/date_selection_window.c @@ -24,28 +24,28 @@ typedef struct { } DateSelectionSizeConfig; static const DateSelectionSizeConfig s_date_selection_config_medium = { - .year_cell_width = 54, - .month_cell_width = 32, - .day_cell_width = 32, - .cell_padding = 4, - .top_offset = 75, - .label_origin_y = PBL_IF_RECT_ELSE(33, 38), + .year_cell_width = 54, + .month_cell_width = 32, + .day_cell_width = 32, + .cell_padding = 4, + .top_offset = 75, + .label_origin_y = PBL_IF_RECT_ELSE(33, 38), }; static const DateSelectionSizeConfig s_date_selection_config_large = { - .year_cell_width = 70, - .month_cell_width = 44, - .day_cell_width = 44, - .cell_padding = 6, - .top_offset = 87, - .label_origin_y = 33, + .year_cell_width = 70, + .month_cell_width = 44, + .day_cell_width = 44, + .cell_padding = 6, + .top_offset = 87, + .label_origin_y = 33, }; static const DateSelectionSizeConfig *s_date_selection_configs[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = &s_date_selection_config_medium, - [PreferredContentSizeMedium] = &s_date_selection_config_medium, - [PreferredContentSizeLarge] = &s_date_selection_config_large, - [PreferredContentSizeExtraLarge] = &s_date_selection_config_large, + [PreferredContentSizeSmall] = &s_date_selection_config_medium, + [PreferredContentSizeMedium] = &s_date_selection_config_medium, + [PreferredContentSizeLarge] = &s_date_selection_config_large, + [PreferredContentSizeExtraLarge] = &s_date_selection_config_large, }; static const DateSelectionSizeConfig *prv_config(void) { @@ -66,12 +66,10 @@ static char *prv_get_cell_text(unsigned index, void *context) { (int)(data->date.year + STDTIME_YEAR_OFFSET)); return data->cell_buf; case DateInputIndexMonth: - snprintf(data->cell_buf, sizeof(data->cell_buf), "%02d", - (int)(data->date.month + 1)); + snprintf(data->cell_buf, sizeof(data->cell_buf), "%02d", (int)(data->date.month + 1)); return data->cell_buf; case DateInputIndexDay: - snprintf(data->cell_buf, sizeof(data->cell_buf), "%02d", - (int)data->date.day); + snprintf(data->cell_buf, sizeof(data->cell_buf), "%02d", (int)data->date.day); return data->cell_buf; default: return ""; @@ -94,17 +92,17 @@ static void prv_handle_inc(unsigned index, void *context) { switch ((DateInputIndex)index) { case DateInputIndexYear: data->date.year = date_time_selection_step_year(data->date.year, 1); - data->date.day = date_time_selection_truncate_date( - data->date.year, data->date.month, data->date.day); + data->date.day = + date_time_selection_truncate_date(data->date.year, data->date.month, data->date.day); break; case DateInputIndexMonth: data->date.month = date_time_selection_step_month(data->date.month, 1); - data->date.day = date_time_selection_truncate_date( - data->date.year, data->date.month, data->date.day); + data->date.day = + date_time_selection_truncate_date(data->date.year, data->date.month, data->date.day); break; case DateInputIndexDay: - data->date.day = date_time_selection_step_day( - data->date.year, data->date.month, data->date.day, 1); + data->date.day = + date_time_selection_step_day(data->date.year, data->date.month, data->date.day, 1); break; default: break; @@ -116,17 +114,17 @@ static void prv_handle_dec(unsigned index, void *context) { switch ((DateInputIndex)index) { case DateInputIndexYear: data->date.year = date_time_selection_step_year(data->date.year, -1); - data->date.day = date_time_selection_truncate_date( - data->date.year, data->date.month, data->date.day); + data->date.day = + date_time_selection_truncate_date(data->date.year, data->date.month, data->date.day); break; case DateInputIndexMonth: data->date.month = date_time_selection_step_month(data->date.month, -1); - data->date.day = date_time_selection_truncate_date( - data->date.year, data->date.month, data->date.day); + data->date.day = + date_time_selection_truncate_date(data->date.year, data->date.month, data->date.day); break; case DateInputIndexDay: - data->date.day = date_time_selection_step_day( - data->date.year, data->date.month, data->date.day, -1); + data->date.day = + date_time_selection_step_day(data->date.year, data->date.month, data->date.day, -1); break; default: break; @@ -157,13 +155,12 @@ void date_selection_window_set_to_current_date(DateSelectionWindowData *window) // the first button press. window->date.year = date_time_selection_step_year(now.tm_year, 0); window->date.month = now.tm_mon; - window->date.day = date_time_selection_truncate_date( - window->date.year, window->date.month, now.tm_mday); + window->date.day = + date_time_selection_truncate_date(window->date.year, window->date.month, now.tm_mday); } -void date_selection_window_init(DateSelectionWindowData *window, const char *label, - GColor color, DateSelectionCompleteCallback complete, - void *context) { +void date_selection_window_init(DateSelectionWindowData *window, const char *label, GColor color, + DateSelectionCompleteCallback complete, void *context) { *window = (DateSelectionWindowData){}; window->complete_callback = complete; @@ -175,7 +172,7 @@ void date_selection_window_init(DateSelectionWindowData *window, const char *lab window_set_user_data(w, window); // Selection layer setup - const DateSelectionSizeConfig * const cfg = prv_config(); + const DateSelectionSizeConfig *const cfg = prv_config(); const int num_cells = 3; // Year, Month, Day SelectionLayer *sel = &window->selection_layer; selection_layer_init(sel, &GRectZero, num_cells); @@ -188,17 +185,17 @@ void date_selection_window_init(DateSelectionWindowData *window, const char *lab selection_layer_set_active_bg_color(sel, color); } - layer_set_frame(&sel->layer, - &GRect(0, cfg->top_offset, w->layer.bounds.size.w, - selection_layer_default_cell_height())); + layer_set_frame(&sel->layer, &GRect(0, cfg->top_offset, w->layer.bounds.size.w, + selection_layer_default_cell_height())); selection_layer_set_click_config_onto_window(sel, w); - selection_layer_set_callbacks(sel, window, (SelectionLayerCallbacks){ - .get_cell_text = prv_get_cell_text, - .complete = prv_handle_complete, - .increment = prv_handle_inc, - .decrement = prv_handle_dec, - }); + selection_layer_set_callbacks(sel, window, + (SelectionLayerCallbacks){ + .get_cell_text = prv_get_cell_text, + .complete = prv_handle_complete, + .increment = prv_handle_inc, + .decrement = prv_handle_dec, + }); layer_add_child(&w->layer, &sel->layer); // Label setup @@ -208,9 +205,8 @@ void date_selection_window_init(DateSelectionWindowData *window, const char *lab if (label) { const int lines = 1; const int line_height = fonts_get_font_height(header_font); - layer_set_frame(&label_layer->layer, - &GRect(0, cfg->label_origin_y, w->layer.bounds.size.w, - (lines + 1) * line_height + line_height / 2)); + layer_set_frame(&label_layer->layer, &GRect(0, cfg->label_origin_y, w->layer.bounds.size.w, + (lines + 1) * line_height + line_height / 2)); #if PBL_ROUND text_layer_enable_screen_text_flow_and_paging(label_layer, 4 /* inset */); #endif @@ -220,12 +216,11 @@ void date_selection_window_init(DateSelectionWindowData *window, const char *lab // Status bar setup status_bar_layer_init(&window->status_layer); - status_bar_layer_set_colors(&window->status_layer, - PBL_IF_COLOR_ELSE(GColorWhite, GColorBlack), + status_bar_layer_set_colors(&window->status_layer, PBL_IF_COLOR_ELSE(GColorWhite, GColorBlack), PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite)); - status_bar_layer_set_separator_mode(&window->status_layer, - PBL_IF_COLOR_ELSE(OPTION_MENU_STATUS_SEPARATOR_MODE, - StatusBarLayerSeparatorModeNone)); + status_bar_layer_set_separator_mode( + &window->status_layer, + PBL_IF_COLOR_ELSE(OPTION_MENU_STATUS_SEPARATOR_MODE, StatusBarLayerSeparatorModeNone)); layer_add_child(&w->layer, &window->status_layer.layer); } diff --git a/src/fw/applib/ui/date_selection_window.h b/src/fw/applib/ui/date_selection_window.h index 2874e87302..144a979c8e 100644 --- a/src/fw/applib/ui/date_selection_window.h +++ b/src/fw/applib/ui/date_selection_window.h @@ -47,9 +47,8 @@ void date_selection_window_set_to_current_date(DateSelectionWindowData *window); //! @param color Highlight colour for the active selection cell. //! @param complete Callback invoked when the user confirms their selection. //! @param context Caller-provided pointer passed to the callback. -void date_selection_window_init(DateSelectionWindowData *window, const char *label, - GColor color, DateSelectionCompleteCallback complete, - void *context); +void date_selection_window_init(DateSelectionWindowData *window, const char *label, GColor color, + DateSelectionCompleteCallback complete, void *context); //! Deinitialize the date selection window. void date_selection_window_deinit(DateSelectionWindowData *window); diff --git a/src/fw/applib/ui/date_time_selection_window_private.c b/src/fw/applib/ui/date_time_selection_window_private.c index 1895545284..bbc839ae01 100644 --- a/src/fw/applib/ui/date_time_selection_window_private.c +++ b/src/fw/applib/ui/date_time_selection_window_private.c @@ -52,7 +52,7 @@ int date_time_selection_truncate_date(int year, int month, int day) { int date_time_selection_step_year(int year, int delta) { year += delta; return CLIP(year, MIN_SELECTABLE_YEAR - STDTIME_YEAR_OFFSET, - MAX_SELECTABLE_YEAR - STDTIME_YEAR_OFFSET); + MAX_SELECTABLE_YEAR - STDTIME_YEAR_OFFSET); } char *date_time_selection_get_text(TimeData *data, TimeInputIndex index, char *buf) { @@ -71,7 +71,7 @@ char *date_time_selection_get_text(TimeData *data, TimeInputIndex index, char *b case TimeInputIndexMinute: snprintf(buf, 3, "%02u", data->minute); return buf; - case TimeInputIndexAMPM: // We should only get this in 12h style + case TimeInputIndexAMPM: // We should only get this in 12h style if (data->hour < 12) { i18n_get_with_buffer("AM", buf, 3); } else { @@ -91,7 +91,7 @@ void date_time_handle_time_change(TimeData *data, TimeInputIndex index, int delt case TimeInputIndexMinute: data->minute = date_time_selection_step_minute(data->minute, delta); break; - case TimeInputIndexAMPM: // We should only get this in 12h style + case TimeInputIndexAMPM: // We should only get this in 12h style data->hour = date_time_selection_step_hour(data->hour, 12 * delta); break; } diff --git a/src/fw/applib/ui/day_picker.c b/src/fw/applib/ui/day_picker.c index e6e2554e07..d27126f46a 100644 --- a/src/fw/applib/ui/day_picker.c +++ b/src/fw/applib/ui/day_picker.c @@ -14,8 +14,8 @@ #include -#define DAY_PICKER_CELL_HEIGHT PBL_IF_RECT_ELSE(menu_cell_small_cell_height(), \ - menu_cell_basic_cell_height()) +#define DAY_PICKER_CELL_HEIGHT \ + PBL_IF_RECT_ELSE(menu_cell_small_cell_height(), menu_cell_basic_cell_height()) typedef struct { Window window; @@ -43,11 +43,9 @@ typedef struct { } CustomDayPickerData; static const char *prv_kind_strings[DayPickerKindNumItems] = { - [DayPickerKindEveryday] = "Every Day", - [DayPickerKindWeekdays] = "Weekdays", - [DayPickerKindWeekends] = "Weekends", - [DayPickerKindCustom] = "Custom", - [DayPickerKindJustOnce] = "Just Once", + [DayPickerKindEveryday] = "Every Day", [DayPickerKindWeekdays] = "Weekdays", + [DayPickerKindWeekends] = "Weekends", [DayPickerKindCustom] = "Custom", + [DayPickerKindJustOnce] = "Just Once", }; const char *day_picker_kind_get_string(DayPickerKind kind) { @@ -91,25 +89,23 @@ static int prv_kind_to_row(bool allow_once, DayPickerKind kind) { //! Day Picker (kind selection) static uint16_t prv_day_picker_get_num_sections(struct MenuLayer *menu_layer, - void *callback_context) { + void *callback_context) { return 1; } -static uint16_t prv_day_picker_get_num_rows(struct MenuLayer *menu_layer, - uint16_t section_index, - void *callback_context) { +static uint16_t prv_day_picker_get_num_rows(struct MenuLayer *menu_layer, uint16_t section_index, + void *callback_context) { DayPickerData *data = (DayPickerData *)callback_context; return (DayPickerKindNumItems - 1) + (data->allow_once ? 1 : 0); } -static int16_t prv_day_picker_get_cell_height(struct MenuLayer *menu_layer, - MenuIndex *cell_index, - void *callback_context) { +static int16_t prv_day_picker_get_cell_height(struct MenuLayer *menu_layer, MenuIndex *cell_index, + void *callback_context) { return DAY_PICKER_CELL_HEIGHT; } -static void prv_day_picker_draw_row(GContext *ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *callback_context) { +static void prv_day_picker_draw_row(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *callback_context) { DayPickerData *data = (DayPickerData *)callback_context; DayPickerKind kind = prv_row_to_kind(data->allow_once, cell_index->row); const char *cell_text = i18n_get(day_picker_kind_get_string(kind), &data->window); @@ -121,7 +117,7 @@ static void prv_day_picker_handle_selection(MenuLayer *menu_layer, MenuIndex *ce DayPickerData *data = (DayPickerData *)callback_context; DayPickerKind kind = prv_row_to_kind(data->allow_once, cell_index->row); DayPickerResult result = { - .kind = kind, + .kind = kind, }; memset(result.custom_days, 0, sizeof(result.custom_days)); @@ -131,7 +127,7 @@ static void prv_day_picker_handle_selection(MenuLayer *menu_layer, MenuIndex *ce memcpy(initial_days, data->initial.custom_days, sizeof(initial_days)); } custom_day_picker_push(initial_days, data->callback, data->callback_context, - data->highlight_color); + data->highlight_color); app_window_stack_remove(&data->window, true); return; } @@ -149,15 +145,14 @@ static void prv_day_picker_window_unload(Window *window) { task_free(data); } -void day_picker_push(DayPickerConfig config, DayPickerCallback callback, - void *context) { +void day_picker_push(DayPickerConfig config, DayPickerCallback callback, void *context) { DayPickerData *data = task_malloc_check(sizeof(DayPickerData)); *data = (DayPickerData){ - .initial = config.initial, - .callback = callback, - .callback_context = context, - .highlight_color = config.highlight_color, - .allow_once = config.allow_once, + .initial = config.initial, + .callback = callback, + .callback_context = context, + .highlight_color = config.highlight_color, + .allow_once = config.allow_once, }; window_init(&data->window, WINDOW_NAME("Day Picker")); @@ -169,26 +164,26 @@ void day_picker_push(DayPickerConfig config, DayPickerCallback callback, bounds = grect_inset_internal(bounds, 0, STATUS_BAR_LAYER_HEIGHT); #endif menu_layer_init(&data->menu_layer, &bounds); - menu_layer_set_callbacks(&data->menu_layer, data, &(MenuLayerCallbacks){ - .get_num_sections = prv_day_picker_get_num_sections, - .get_num_rows = prv_day_picker_get_num_rows, - .get_cell_height = prv_day_picker_get_cell_height, - .draw_row = prv_day_picker_draw_row, - .select_click = prv_day_picker_handle_selection, - }); + menu_layer_set_callbacks(&data->menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_sections = prv_day_picker_get_num_sections, + .get_num_rows = prv_day_picker_get_num_rows, + .get_cell_height = prv_day_picker_get_cell_height, + .draw_row = prv_day_picker_draw_row, + .select_click = prv_day_picker_handle_selection, + }); menu_layer_set_highlight_colors(&data->menu_layer, config.highlight_color, GColorWhite); menu_layer_set_click_config_onto_window(&data->menu_layer, &data->window); menu_layer_set_scroll_wrap_around(&data->menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(&data->menu_layer, - shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(&data->menu_layer, - shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + &data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + &data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&data->window.layer, menu_layer_get_layer(&data->menu_layer)); uint16_t selected_row = (uint16_t)prv_kind_to_row(config.allow_once, config.initial.kind); - menu_layer_set_selected_index(&data->menu_layer, - (MenuIndex){.row = selected_row}, + menu_layer_set_selected_index(&data->menu_layer, (MenuIndex){.row = selected_row}, MenuRowAlignCenter, false); app_window_stack_push(&data->window, true); @@ -207,23 +202,23 @@ static bool prv_is_custom_day_scheduled(CustomDayPickerData *data) { } static uint16_t prv_custom_day_picker_get_num_sections(struct MenuLayer *menu_layer, - void *callback_context) { + void *callback_context) { return 1; } static uint16_t prv_custom_day_picker_get_num_rows(struct MenuLayer *menu_layer, - uint16_t section_index, void *callback_context) { + uint16_t section_index, void *callback_context) { return DAYS_PER_WEEK + 1; } static int16_t prv_custom_day_picker_get_cell_height(struct MenuLayer *menu_layer, - MenuIndex *cell_index, - void *callback_context) { + MenuIndex *cell_index, + void *callback_context) { return DAY_PICKER_CELL_HEIGHT; } static void prv_custom_day_picker_draw_row(GContext *ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *callback_context) { + MenuIndex *cell_index, void *callback_context) { CustomDayPickerData *data = (CustomDayPickerData *)callback_context; GBitmap *ptr_bitmap; @@ -237,8 +232,8 @@ static void prv_custom_day_picker_draw_row(GContext *ctx, const Layer *cell_laye box.size = GSize(cell_layer->bounds.size.w, DAY_PICKER_CELL_HEIGHT); box.origin = GPoint(0, 4); graphics_draw_text(ctx, i18n_get("Check something first.", &data->window), - fonts_get_system_font(FONT_KEY_GOTHIC_18), box, - GTextOverflowModeFill, GTextAlignmentCenter, NULL); + fonts_get_system_font(FONT_KEY_GOTHIC_18), box, GTextOverflowModeFill, + GTextAlignmentCenter, NULL); return; } else { new_resource_id = RESOURCE_ID_CHECKMARK_ICON_DOTTED; @@ -252,8 +247,9 @@ static void prv_custom_day_picker_draw_row(GContext *ctx, const Layer *cell_laye gbitmap_init_with_resource(&data->checkmark_icon, data->current_checkmark_icon_resource_id); } - box.origin = GPoint((((cell_layer->bounds.size.w) / 2) - ((data->checkmark_icon.bounds.size.w) / 2)), - (((cell_layer->bounds.size.h) / 2) - ((data->checkmark_icon.bounds.size.h) / 2))); + box.origin = + GPoint((((cell_layer->bounds.size.w) / 2) - ((data->checkmark_icon.bounds.size.w) / 2)), + (((cell_layer->bounds.size.h) / 2) - ((data->checkmark_icon.bounds.size.h) / 2))); box.size = data->checkmark_icon.bounds.size; graphics_context_set_compositing_mode(ctx, GCompOpTint); graphics_draw_bitmap_in_rect(ctx, &data->checkmark_icon, &box); @@ -274,7 +270,7 @@ static void prv_custom_day_picker_draw_row(GContext *ctx, const Layer *cell_laye } static void prv_custom_day_picker_handle_selection(MenuLayer *menu_layer, MenuIndex *cell_index, - void *callback_context) { + void *callback_context) { CustomDayPickerData *data = (CustomDayPickerData *)callback_context; if (cell_index->row == 0) { @@ -284,7 +280,7 @@ static void prv_custom_day_picker_handle_selection(MenuLayer *menu_layer, MenuIn } else { data->was_completed = true; DayPickerResult result = { - .kind = DayPickerKindCustom, + .kind = DayPickerKindCustom, }; memcpy(result.custom_days, data->scheduled_days, sizeof(result.custom_days)); if (data->callback) { @@ -300,7 +296,7 @@ static void prv_custom_day_picker_handle_selection(MenuLayer *menu_layer, MenuIn } static void prv_custom_day_picker_selection_changed(MenuLayer *menu_layer, MenuIndex new_index, - MenuIndex old_index, void *callback_context) { + MenuIndex old_index, void *callback_context) { CustomDayPickerData *data = (CustomDayPickerData *)callback_context; if (old_index.row == 0) { data->show_check_something_first_text = false; @@ -317,16 +313,15 @@ static void prv_custom_day_picker_window_unload(Window *window) { task_free(data); } -void custom_day_picker_push(bool initial_days[DAYS_PER_WEEK], - DayPickerCallback callback, void *context, - GColor highlight_color) { +void custom_day_picker_push(bool initial_days[DAYS_PER_WEEK], DayPickerCallback callback, + void *context, GColor highlight_color) { CustomDayPickerData *data = task_malloc_check(sizeof(CustomDayPickerData)); *data = (CustomDayPickerData){ - .callback = callback, - .callback_context = context, - .highlight_color = highlight_color, - .was_completed = false, - .show_check_something_first_text = false, + .callback = callback, + .callback_context = context, + .highlight_color = highlight_color, + .was_completed = false, + .show_check_something_first_text = false, }; memcpy(data->scheduled_days, initial_days, sizeof(data->scheduled_days)); @@ -339,22 +334,23 @@ void custom_day_picker_push(bool initial_days[DAYS_PER_WEEK], bounds = grect_inset_internal(bounds, 0, STATUS_BAR_LAYER_HEIGHT); #endif menu_layer_init(&data->menu_layer, &bounds); - menu_layer_set_callbacks(&data->menu_layer, data, &(MenuLayerCallbacks){ - .get_num_sections = prv_custom_day_picker_get_num_sections, - .get_num_rows = prv_custom_day_picker_get_num_rows, - .get_cell_height = prv_custom_day_picker_get_cell_height, - .draw_row = prv_custom_day_picker_draw_row, - .select_click = prv_custom_day_picker_handle_selection, - .selection_changed = prv_custom_day_picker_selection_changed, - }); + menu_layer_set_callbacks(&data->menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_sections = prv_custom_day_picker_get_num_sections, + .get_num_rows = prv_custom_day_picker_get_num_rows, + .get_cell_height = prv_custom_day_picker_get_cell_height, + .draw_row = prv_custom_day_picker_draw_row, + .select_click = prv_custom_day_picker_handle_selection, + .selection_changed = prv_custom_day_picker_selection_changed, + }); menu_layer_set_highlight_colors(&data->menu_layer, highlight_color, GColorWhite); menu_layer_set_click_config_onto_window(&data->menu_layer, &data->window); menu_layer_set_scroll_wrap_around(&data->menu_layer, - shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(&data->menu_layer, - shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(&data->menu_layer, - shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + shell_prefs_get_menu_scroll_wrap_around_enable()); + menu_layer_set_scroll_vibe_on_wrap( + &data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + &data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&data->window.layer, menu_layer_get_layer(&data->menu_layer)); gbitmap_init_with_resource(&data->selected_icon, RESOURCE_ID_CHECKBOX_ICON_CHECKED); diff --git a/src/fw/applib/ui/day_picker.h b/src/fw/applib/ui/day_picker.h index fe435428f7..828c785519 100644 --- a/src/fw/applib/ui/day_picker.h +++ b/src/fw/applib/ui/day_picker.h @@ -29,11 +29,9 @@ typedef struct { typedef void (*DayPickerCallback)(DayPickerResult result, void *context); -void day_picker_push(DayPickerConfig config, DayPickerCallback callback, - void *context); +void day_picker_push(DayPickerConfig config, DayPickerCallback callback, void *context); -void custom_day_picker_push(bool initial_days[DAYS_PER_WEEK], - DayPickerCallback callback, void *context, - GColor highlight_color); +void custom_day_picker_push(bool initial_days[DAYS_PER_WEEK], DayPickerCallback callback, + void *context, GColor highlight_color); const char *day_picker_kind_get_string(DayPickerKind kind); \ No newline at end of file diff --git a/src/fw/applib/ui/dialogs/actionable_dialog.c b/src/fw/applib/ui/dialogs/actionable_dialog.c index 2adbe8ad25..bdc05a24d3 100644 --- a/src/fw/applib/ui/dialogs/actionable_dialog.c +++ b/src/fw/applib/ui/dialogs/actionable_dialog.c @@ -26,8 +26,7 @@ static void prv_actionable_dialog_load(Window *window) { const GRect *bounds = &window_root_layer->bounds; const uint16_t left_margin_px = PBL_IF_RECT_ELSE(5, 0); const uint16_t content_and_action_bar_horizontal_spacing = PBL_IF_RECT_ELSE(5, 7); - const uint16_t right_margin_px = ACTION_BAR_WIDTH + - content_and_action_bar_horizontal_spacing; + const uint16_t right_margin_px = ACTION_BAR_WIDTH + content_and_action_bar_horizontal_spacing; const GFont dialog_text_font = fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD); const int max_text_line_height_px = 2 * fonts_get_font_height(dialog_text_font) + 8; const uint16_t icon_text_spacing_px = 4; @@ -57,19 +56,17 @@ static void prv_actionable_dialog_load(Window *window) { GContext *ctx = graphics_context_get_current_context(); const GTextAlignment text_alignment = PBL_IF_RECT_ELSE(GTextAlignmentCenter, GTextAlignmentRight); const GRect probe_rect = GRect(x, 0, w, max_text_line_height_px); - const uint16_t text_height = graphics_text_layout_get_max_used_size(ctx, - dialog->buffer, - dialog_text_font, - probe_rect, - GTextOverflowModeWordWrap, - text_alignment, - text_attributes).h; + const uint16_t text_height = graphics_text_layout_get_max_used_size( + ctx, dialog->buffer, dialog_text_font, probe_rect, + GTextOverflowModeWordWrap, text_alignment, text_attributes) + .h; const uint16_t status_bar_height = dialog->show_status_layer ? STATUS_BAR_LAYER_HEIGHT : 0; const uint16_t available_height = bounds->size.h - status_bar_height; const uint16_t spacing = icon ? icon_text_spacing_px : 0; const uint16_t content_height = icon_size.h + spacing + text_height; - uint16_t icon_top_margin_px = status_bar_height + + uint16_t icon_top_margin_px = + status_bar_height + (available_height > content_height ? (available_height - content_height) / 2 : 0); uint16_t text_top_margin_px = icon_top_margin_px + icon_size.h + spacing; @@ -78,8 +75,7 @@ static void prv_actionable_dialog_load(Window *window) { // Set up the text. TextLayer *text_layer = &dialog->text_layer; - text_layer_init_with_parameters(text_layer, &GRect(x, y, w, h), - dialog->buffer, dialog_text_font, + text_layer_init_with_parameters(text_layer, &GRect(x, y, w, h), dialog->buffer, dialog_text_font, dialog->text_color, GColorClear, text_alignment, GTextOverflowModeWordWrap); if (text_attributes) { @@ -99,8 +95,8 @@ static void prv_actionable_dialog_load(Window *window) { ActionBarLayer *action_bar = actionable_dialog->action_bar; if (actionable_dialog->action_bar_type == DialogActionBarConfirm) { #if !defined(CONFIG_RECOVERY_FW) - actionable_dialog->select_icon = gbitmap_create_with_resource( - RESOURCE_ID_ACTION_BAR_ICON_CHECK); + actionable_dialog->select_icon = + gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_CHECK); #endif action_bar_layer_set_context(action_bar, window); action_bar_layer_set_icon(action_bar, BUTTON_ID_SELECT, actionable_dialog->select_icon); @@ -130,7 +126,7 @@ static void prv_actionable_dialog_load(Window *window) { // On round displays we right align it with respect to the same imaginary vertical line that the // text is right aligned to x = grect_get_max_x(bounds) - ACTION_BAR_WIDTH - content_and_action_bar_horizontal_spacing - - icon_size.w; + icon_size.w; #endif y = icon_top_margin_px; @@ -159,7 +155,7 @@ static void prv_actionable_dialog_unload(Window *window) { if (actionable_dialog->action_bar_type == DialogActionBarConfirmDecline) { gbitmap_destroy(actionable_dialog->up_icon); gbitmap_destroy(actionable_dialog->down_icon); - } else { // DialogActionBarConfirm || DialogActionBarDecline + } else { // DialogActionBarConfirm || DialogActionBarDecline gbitmap_destroy(actionable_dialog->select_icon); } } @@ -190,11 +186,11 @@ void actionable_dialog_init(ActionableDialog *actionable_dialog, const char *dia dialog_init(&actionable_dialog->dialog, dialog_name); Window *window = &actionable_dialog->dialog.window; - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_actionable_dialog_load, - .unload = prv_actionable_dialog_unload, - .appear = prv_actionable_dialog_appear, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_actionable_dialog_load, + .unload = prv_actionable_dialog_unload, + .appear = prv_actionable_dialog_appear, + }); window_set_user_data(window, actionable_dialog); } @@ -211,7 +207,7 @@ void actionable_dialog_set_action_bar_type(ActionableDialog *actionable_dialog, DialogActionBarType action_bar_type, ActionBarLayer *action_bar) { if (action_bar_type == DialogActionBarCustom) { - PBL_ASSERTN(action_bar); // Action bar must not be NULL if it is a custom type. + PBL_ASSERTN(action_bar); // Action bar must not be NULL if it is a custom type. actionable_dialog->action_bar = action_bar; } else { actionable_dialog->action_bar = NULL; diff --git a/src/fw/applib/ui/dialogs/bt_conn_dialog.c b/src/fw/applib/ui/dialogs/bt_conn_dialog.c index fb61b767dd..bdae05d321 100644 --- a/src/fw/applib/ui/dialogs/bt_conn_dialog.c +++ b/src/fw/applib/ui/dialogs/bt_conn_dialog.c @@ -53,10 +53,10 @@ void bt_conn_dialog_push(BtConnDialog *bt_dialog, BtConnDialogResultHandler hand bt_dialog->connected_handler = handler; bt_dialog->context = context; - bt_dialog->pebble_app_event_sub = (EventServiceInfo) { - .type = PEBBLE_COMM_SESSION_EVENT, - .handler = prv_handle_comm_session_event, - .context = bt_dialog + bt_dialog->pebble_app_event_sub = (EventServiceInfo){ + .type = PEBBLE_COMM_SESSION_EVENT, + .handler = prv_handle_comm_session_event, + .context = bt_dialog }; event_service_client_subscribe(&bt_dialog->pebble_app_event_sub); @@ -97,7 +97,5 @@ void bt_conn_dialog_init(BtConnDialog *bt_dialog, char *text_buffer, size_t buff dialog_set_text(dialog, bt_dialog->text_buffer); dialog_set_icon(dialog, RESOURCE_ID_WATCH_DISCONNECTED_LARGE); dialog_show_status_bar_layer(dialog, true); - dialog_set_callbacks(dialog, &(DialogCallbacks) { - .unload = prv_bt_dialog_unload - }, bt_dialog); + dialog_set_callbacks(dialog, &(DialogCallbacks){.unload = prv_bt_dialog_unload}, bt_dialog); } diff --git a/src/fw/applib/ui/dialogs/dialog.c b/src/fw/applib/ui/dialogs/dialog.c index 7f30039e3e..35bc4d0dcd 100644 --- a/src/fw/applib/ui/dialogs/dialog.c +++ b/src/fw/applib/ui/dialogs/dialog.c @@ -72,7 +72,7 @@ void dialog_set_timeout(Dialog *dialog, uint32_t timeout) { void dialog_set_callbacks(Dialog *dialog, const DialogCallbacks *callbacks, void *callback_context) { if (!callbacks) { - dialog->callbacks = (DialogCallbacks) {}; + dialog->callbacks = (DialogCallbacks){}; return; } diff --git a/src/fw/applib/ui/dialogs/dialog.h b/src/fw/applib/ui/dialogs/dialog.h index f365944bab..7038440364 100644 --- a/src/fw/applib/ui/dialogs/dialog.h +++ b/src/fw/applib/ui/dialogs/dialog.h @@ -125,8 +125,7 @@ void dialog_set_timeout(Dialog *dialog, uint32_t timeout); // dialog. This callback will be called from the dialog's own unload function and can be used // to clean up resources used by the dialog such as icons. If the unload context is NULL, the // parent dialog object will be passed instead. -void dialog_set_callbacks(Dialog *dialog, const DialogCallbacks *callbacks, - void *callback_context); +void dialog_set_callbacks(Dialog *dialog, const DialogCallbacks *callbacks, void *callback_context); // Enable or disable automatically destroying the dialog when it's popped. void dialog_set_destroy_on_pop(Dialog *dialog, bool destroy_on_pop); diff --git a/src/fw/applib/ui/dialogs/dialog_private.c b/src/fw/applib/ui/dialogs/dialog_private.c index 2e7a909c1d..8a156286ff 100644 --- a/src/fw/applib/ui/dialogs/dialog_private.c +++ b/src/fw/applib/ui/dialogs/dialog_private.c @@ -97,16 +97,12 @@ KinoReel *dialog_create_icon(Dialog *dialog) { return kino_reel_create_with_resource_system(SYSTEM_APP, dialog->icon_id); } -bool dialog_init_icon_layer(Dialog *dialog, KinoReel *image, - GPoint icon_origin, bool animated) { +bool dialog_init_icon_layer(Dialog *dialog, KinoReel *image, GPoint icon_origin, bool animated) { if (!image) { return false; } - const GRect icon_rect = (GRect) { - .origin = icon_origin, - .size = kino_reel_get_size(image) - }; + const GRect icon_rect = (GRect){.origin = icon_origin, .size = kino_reel_get_size(image)}; KinoLayer *icon_layer = &dialog->icon_layer; kino_layer_init(icon_layer, &icon_rect); @@ -132,8 +128,8 @@ bool dialog_init_icon_layer(Dialog *dialog, KinoReel *image, kino_reel_transform_set_from_frame(reel, from); kino_reel_transform_set_transform_duration(reel, 300); kino_reel_scale_segmented_set_deflate_effect(reel, 10); - kino_reel_scale_segmented_set_delay_by_distance( - reel, GPoint(ICON_TARGET_PT_X, ICON_TARGET_PT_Y)); + kino_reel_scale_segmented_set_delay_by_distance(reel, + GPoint(ICON_TARGET_PT_X, ICON_TARGET_PT_Y)); } if (!reel) { @@ -145,8 +141,8 @@ bool dialog_init_icon_layer(Dialog *dialog, KinoReel *image, kino_layer_play(icon_layer); uint32_t icon_duration = kino_reel_get_duration(image); - if (dialog->timeout != DIALOG_TIMEOUT_INFINITE && // Don't shorten infinite dialogs - icon_duration != PLAY_DURATION_INFINITE && // Don't extend dialogs with infinite animations + if (dialog->timeout != DIALOG_TIMEOUT_INFINITE && // Don't shorten infinite dialogs + icon_duration != PLAY_DURATION_INFINITE && // Don't extend dialogs with infinite animations icon_duration > dialog->timeout) { // The finite image animation is longer, increase the finite dialog timeout dialog_set_timeout(dialog, icon_duration); diff --git a/src/fw/applib/ui/dialogs/dialog_private.h b/src/fw/applib/ui/dialogs/dialog_private.h index 78e26867ce..c2454e5d29 100644 --- a/src/fw/applib/ui/dialogs/dialog_private.h +++ b/src/fw/applib/ui/dialogs/dialog_private.h @@ -55,5 +55,4 @@ KinoReel *dialog_create_icon(Dialog *dialog); //! @param animated `True` if animated, otherwise `False` //! @return `True` if successfully initialized the dialog's \ref KinoLayer, otherwise //! `False` -bool dialog_init_icon_layer(Dialog *dialog, KinoReel *image, - GPoint icon_origin, bool animated); +bool dialog_init_icon_layer(Dialog *dialog, KinoReel *image, GPoint icon_origin, bool animated); diff --git a/src/fw/applib/ui/dialogs/expandable_dialog.c b/src/fw/applib/ui/dialogs/expandable_dialog.c index 27aabadc36..c8bfd4bd79 100644 --- a/src/fw/applib/ui/dialogs/expandable_dialog.c +++ b/src/fw/applib/ui/dialogs/expandable_dialog.c @@ -21,14 +21,14 @@ static void prv_show_action_bar_icon(ExpandableDialog *expandable_dialog, ButtonId button_id) { ActionBarLayer *action_bar = &expandable_dialog->action_bar; - const GBitmap *icon = (button_id == - BUTTON_ID_UP) ? expandable_dialog->up_icon : expandable_dialog->down_icon; + const GBitmap *icon = + (button_id == BUTTON_ID_UP) ? expandable_dialog->up_icon : expandable_dialog->down_icon; action_bar_layer_set_icon_animated(action_bar, button_id, icon, - expandable_dialog->show_action_icon_animated); + expandable_dialog->show_action_icon_animated); ActionBarLayerIconPressAnimation animation = (button_id == BUTTON_ID_UP) - ? ActionBarLayerIconPressAnimationMoveUp - : ActionBarLayerIconPressAnimationMoveDown; + ? ActionBarLayerIconPressAnimationMoveUp + : ActionBarLayerIconPressAnimationMoveDown; action_bar_layer_set_icon_press_animation(action_bar, button_id, animation); } @@ -130,7 +130,6 @@ static void prv_expandable_dialog_load(Window *window) { const GSize icon_size = icon ? kino_reel_get_size(icon) : GSizeZero; uint16_t icon_offset = (icon ? ICON_TOP_MARGIN_PX - status_layer_offset : 0); - x = 0; y = status_layer_offset; w = frame.size.w; @@ -140,18 +139,16 @@ static void prv_expandable_dialog_load(Window *window) { scroll_layer_init(scroll_layer, &GRect(x, y, w, h)); layer_add_child(&window->layer, &scroll_layer->layer); - // Set up the header if this dialog is set to have one. - GTextAlignment alignment = PBL_IF_RECT_ELSE(GTextAlignmentLeft, - (show_action_bar ? - GTextAlignmentRight : GTextAlignmentCenter)); + GTextAlignment alignment = PBL_IF_RECT_ELSE( + GTextAlignmentLeft, (show_action_bar ? GTextAlignmentRight : GTextAlignmentCenter)); uint16_t right_aligned_box_reduction = PBL_IF_RECT_ELSE(0, show_action_bar ? 10 : 0); if (has_header) { const uint16_t HEADER_OFFSET = 6; #if PBL_RECT x = left_margin_px; - w = frame.size.w - right_margin_px - left_margin_px - action_bar_offset - - right_aligned_box_reduction; + w = frame.size.w - right_margin_px - left_margin_px - action_bar_offset - + right_aligned_box_reduction; #else x = 0; w = frame.size.w - right_margin_px - action_bar_offset - right_aligned_box_reduction; @@ -172,7 +169,7 @@ static void prv_expandable_dialog_load(Window *window) { // We account for a header that may be larger than the available space // by adjusting our height variable that is passed to the body layer GSize header_size = text_layer_get_content_size(ctx, header_layer); - header_size.h += 4; // See PBL-1741 + header_size.h += 4; // See PBL-1741 header_size.w = w; header_content_height = header_size.h; text_layer_set_size(header_layer, header_size); @@ -182,15 +179,15 @@ static void prv_expandable_dialog_load(Window *window) { const uint16_t TEXT_OFFSET = 6; x = left_margin_px; y = (icon ? icon_offset + icon_size.h : -TEXT_OFFSET) + header_content_height; - w = frame.size.w - right_margin_px - left_margin_px - action_bar_offset - - right_aligned_box_reduction; + w = frame.size.w - right_margin_px - left_margin_px - action_bar_offset - + right_aligned_box_reduction; h = INT16_MAX; // height is clamped to content size GFont font = expandable_dialog->body_font; TextLayer *text_layer = &dialog->text_layer; text_layer_init_with_parameters(text_layer, &GRect(x, y, w, h), dialog->buffer, font, - dialog->text_color, GColorClear, - alignment, GTextOverflowModeWordWrap); + dialog->text_color, GColorClear, alignment, + GTextOverflowModeWordWrap); // layer must be added immediately to scroll layer for perimeter and paging scroll_layer_add_child(scroll_layer, &text_layer->layer); @@ -200,17 +197,17 @@ static void prv_expandable_dialog_load(Window *window) { #endif int32_t text_content_height = text_layer_get_content_size(ctx, text_layer).h; - text_content_height += 4; // See PBL-1741 + text_content_height += 4; // See PBL-1741 text_layer_set_size(text_layer, GSize(w, text_content_height)); - uint16_t scroll_height = icon_offset + icon_size.h + - header_content_height + text_content_height + (icon ? BOTTOM_MARGIN_PX : 0); + uint16_t scroll_height = icon_offset + icon_size.h + header_content_height + text_content_height + + (icon ? BOTTOM_MARGIN_PX : 0); scroll_layer_set_content_size(scroll_layer, GSize(frame.size.w, scroll_height)); scroll_layer_set_shadow_hidden(scroll_layer, true); - scroll_layer_set_callbacks(scroll_layer, (ScrollLayerCallbacks) { - .content_offset_changed_handler = prv_offset_changed_handler - }); + scroll_layer_set_callbacks( + scroll_layer, + (ScrollLayerCallbacks){.content_offset_changed_handler = prv_offset_changed_handler}); scroll_layer_set_context(scroll_layer, expandable_dialog); #if PBL_ROUND @@ -220,10 +217,10 @@ static void prv_expandable_dialog_load(Window *window) { if (show_action_bar) { // Icons for up and down on the action bar. #ifndef CONFIG_RECOVERY_FW - expandable_dialog->up_icon = gbitmap_create_with_resource_system(SYSTEM_APP, - RESOURCE_ID_ACTION_BAR_ICON_UP); - expandable_dialog->down_icon = gbitmap_create_with_resource_system(SYSTEM_APP, - RESOURCE_ID_ACTION_BAR_ICON_DOWN); + expandable_dialog->up_icon = + gbitmap_create_with_resource_system(SYSTEM_APP, RESOURCE_ID_ACTION_BAR_ICON_UP); + expandable_dialog->down_icon = + gbitmap_create_with_resource_system(SYSTEM_APP, RESOURCE_ID_ACTION_BAR_ICON_DOWN); PBL_ASSERTN(expandable_dialog->down_icon && expandable_dialog->up_icon); #endif @@ -236,7 +233,8 @@ static void prv_expandable_dialog_load(Window *window) { } if (expandable_dialog->select_icon) { action_bar_layer_set_icon_animated(action_bar, BUTTON_ID_SELECT, - expandable_dialog->select_icon, expandable_dialog->show_action_icon_animated); + expandable_dialog->select_icon, + expandable_dialog->show_action_icon_animated); } action_bar_layer_set_context(action_bar, expandable_dialog); action_bar_layer_set_click_config_provider(action_bar, prv_config_provider); @@ -245,10 +243,11 @@ static void prv_expandable_dialog_load(Window *window) { window_set_click_config_provider_with_context(window, prv_config_provider, expandable_dialog); } - x = PBL_IF_RECT_ELSE(left_margin_px, (show_action_bar) ? - (frame.size.w - right_margin_px - left_margin_px - - action_bar_offset - right_aligned_box_reduction - icon_size.h) : - (90 - icon_size.h / 2)); + x = PBL_IF_RECT_ELSE(left_margin_px, + (show_action_bar) + ? (frame.size.w - right_margin_px - left_margin_px - action_bar_offset - + right_aligned_box_reduction - icon_size.h) + : (90 - icon_size.h / 2)); y = icon_offset + PBL_IF_RECT_ELSE(0, 5); if (dialog_init_icon_layer(dialog, icon, GPoint(x, y), false /* not animated */)) { scroll_layer_add_child(scroll_layer, &dialog->icon_layer.layer); @@ -265,26 +264,26 @@ static void prv_expandable_dialog_load(Window *window) { ContentIndicator *indicator = scroll_layer_get_content_indicator(scroll_layer); content_indicator_configure_direction( indicator, ContentIndicatorDirectionUp, - &(ContentIndicatorConfig) { - .layer = &expandable_dialog->dialog.status_layer.layer, - .times_out = true, - .colors.foreground = dialog->text_color, - .colors.background = dialog->window.background_color, - }); - layer_init(&expandable_dialog->content_down_arrow_layer, &GRect( - 0, frame.size.h - CONTENT_DOWN_ARROW_HEIGHT, - PBL_IF_RECT_ELSE(frame.size.w - action_bar_offset, frame.size.w), - CONTENT_DOWN_ARROW_HEIGHT)); + &(ContentIndicatorConfig){ + .layer = &expandable_dialog->dialog.status_layer.layer, + .times_out = true, + .colors.foreground = dialog->text_color, + .colors.background = dialog->window.background_color, + }); + layer_init(&expandable_dialog->content_down_arrow_layer, + &GRect(0, frame.size.h - CONTENT_DOWN_ARROW_HEIGHT, + PBL_IF_RECT_ELSE(frame.size.w - action_bar_offset, frame.size.w), + CONTENT_DOWN_ARROW_HEIGHT)); layer_add_child(&window->layer, &expandable_dialog->content_down_arrow_layer); content_indicator_configure_direction( indicator, ContentIndicatorDirectionDown, - &(ContentIndicatorConfig) { - .layer = &expandable_dialog->content_down_arrow_layer, - .times_out = false, - .alignment = PBL_IF_RECT_ELSE(GAlignCenter, GAlignTop), - .colors.foreground = dialog->text_color, - .colors.background = dialog->window.background_color, - }); + &(ContentIndicatorConfig){ + .layer = &expandable_dialog->content_down_arrow_layer, + .times_out = false, + .alignment = PBL_IF_RECT_ELSE(GAlignCenter, GAlignTop), + .colors.foreground = dialog->text_color, + .colors.background = dialog->window.background_color, + }); } } @@ -321,18 +320,18 @@ Dialog *expandable_dialog_get_dialog(ExpandableDialog *expandable_dialog) { void expandable_dialog_init(ExpandableDialog *expandable_dialog, const char *dialog_name) { PBL_ASSERTN(expandable_dialog); - *expandable_dialog = (ExpandableDialog) { - .header_font = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD), - .body_font = fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), + *expandable_dialog = (ExpandableDialog){ + .header_font = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD), + .body_font = fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), }; dialog_init(&expandable_dialog->dialog, dialog_name); Window *window = &expandable_dialog->dialog.window; - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_expandable_dialog_load, - .unload = prv_expandable_dialog_unload, - .appear = prv_expandable_dialog_appear, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_expandable_dialog_load, + .unload = prv_expandable_dialog_unload, + .appear = prv_expandable_dialog_appear, + }); expandable_dialog->show_action_bar = true; window_set_user_data(window, expandable_dialog); } @@ -370,8 +369,7 @@ ExpandableDialog *expandable_dialog_create_with_params(const char *dialog_name, return expandable_dialog; } -void expandable_dialog_show_action_bar(ExpandableDialog *expandable_dialog, - bool show_action_bar) { +void expandable_dialog_show_action_bar(ExpandableDialog *expandable_dialog, bool show_action_bar) { expandable_dialog->show_action_bar = show_action_bar; } @@ -402,8 +400,7 @@ void expandable_dialog_set_body_font(ExpandableDialog *expandable_dialog, GFont expandable_dialog->body_font = body_font; } -void expandable_dialog_set_select_action(ExpandableDialog *expandable_dialog, - uint32_t resource_id, +void expandable_dialog_set_select_action(ExpandableDialog *expandable_dialog, uint32_t resource_id, ClickHandler select_click_handler) { if (expandable_dialog->select_icon) { gbitmap_destroy(expandable_dialog->select_icon); diff --git a/src/fw/applib/ui/dialogs/expandable_dialog.h b/src/fw/applib/ui/dialogs/expandable_dialog.h index 4cb6bb0dc7..ccbbfa4680 100644 --- a/src/fw/applib/ui/dialogs/expandable_dialog.h +++ b/src/fw/applib/ui/dialogs/expandable_dialog.h @@ -79,16 +79,14 @@ Dialog *expandable_dialog_get_dialog(ExpandableDialog *expandable_dialog); //! Sets whether or not the expandable dialog should should show its action bar. //! @param expandable_dialog Pointer to the \ref ExpandableDialog to set on //! @param show_action_bar Boolean indicating whether to show the action bar -void expandable_dialog_show_action_bar(ExpandableDialog *expandable_dialog, - bool show_action_bar); +void expandable_dialog_show_action_bar(ExpandableDialog *expandable_dialog, bool show_action_bar); //! Sets whether to animate the action bar items. //! @param expandable_dialog Pointer to the \ref ExpandableDialog to set on //! @param animated Boolean indicating whether or not to animate the icons //! @note Unless \ref expandable_dialog_show_action_bar is called with true, this function //! will not have any noticeable change on the \ref ExpandableDialog -void expandable_dialog_set_action_icon_animated(ExpandableDialog *expandable_dialog, - bool animated); +void expandable_dialog_set_action_icon_animated(ExpandableDialog *expandable_dialog, bool animated); //! Sets the action bar background color //! @param expandable_dialog Pointer to the \ref ExpandableDialog for which to set @@ -121,8 +119,7 @@ void expandable_dialog_set_body_font(ExpandableDialog *expandable_dialog, GFont //! Expandable Dialog's action bar layer. //! @note Passing @c RESOURCE_ID_INVALID as the resource_id to the function will allow you //! to set an action with no icon appearing in the \ref ActionBarLayer -void expandable_dialog_set_select_action(ExpandableDialog *expandable_dialog, - uint32_t resource_id, +void expandable_dialog_set_select_action(ExpandableDialog *expandable_dialog, uint32_t resource_id, ClickHandler select_click_handler); //! Pushes the dialog onto the window stack. diff --git a/src/fw/applib/ui/dialogs/simple_dialog.c b/src/fw/applib/ui/dialogs/simple_dialog.c index b2de166540..0f5f3a3064 100644 --- a/src/fw/applib/ui/dialogs/simple_dialog.c +++ b/src/fw/applib/ui/dialogs/simple_dialog.c @@ -21,11 +21,11 @@ // Layout Defines #define TEXT_ALIGNMENT (GTextAlignmentCenter) -#define TEXT_OVERFLOW (GTextOverflowModeWordWrap) +#define TEXT_OVERFLOW (GTextOverflowModeWordWrap) #if PBL_DISPLAY_HEIGHT >= 200 -#define TEXT_FONT (fonts_get_system_font(FONT_KEY_GOTHIC_28)) +#define TEXT_FONT (fonts_get_system_font(FONT_KEY_GOTHIC_28)) #else -#define TEXT_FONT (fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)) +#define TEXT_FONT (fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)) #endif // On taller round displays, inset the text box so the larger font still wraps @@ -35,25 +35,20 @@ #else #define TEXT_ROUND_MARGIN_PX (0) #endif -#define TEXT_LEFT_MARGIN_PX (PBL_IF_RECT_ELSE(6, TEXT_ROUND_MARGIN_PX)) +#define TEXT_LEFT_MARGIN_PX (PBL_IF_RECT_ELSE(6, TEXT_ROUND_MARGIN_PX)) #define TEXT_RIGHT_MARGIN_PX (PBL_IF_RECT_ELSE(6, TEXT_ROUND_MARGIN_PX)) -#define TEXT_FLOW_INSET_PX (PBL_IF_RECT_ELSE(0, 8)) -#define TEXT_LINE_HEIGHT_PX (fonts_get_font_height(TEXT_FONT)) -#define TEXT_MAX_HEIGHT_PX ((2 * TEXT_LINE_HEIGHT_PX) + 8) // 2 line + some space for descenders - +#define TEXT_FLOW_INSET_PX (PBL_IF_RECT_ELSE(0, 8)) +#define TEXT_LINE_HEIGHT_PX (fonts_get_font_height(TEXT_FONT)) +#define TEXT_MAX_HEIGHT_PX ((2 * TEXT_LINE_HEIGHT_PX) + 8) // 2 line + some space for descenders static int prv_get_rendered_text_height(const char *text, const GRect *text_box) { GContext *ctx = graphics_context_get_current_context(); - TextLayoutExtended layout = { 0 }; - graphics_text_attributes_enable_screen_text_flow((GTextLayoutCacheRef) &layout, + TextLayoutExtended layout = {0}; + graphics_text_attributes_enable_screen_text_flow((GTextLayoutCacheRef)&layout, TEXT_FLOW_INSET_PX); - return graphics_text_layout_get_max_used_size(ctx, - text, - TEXT_FONT, - *text_box, - TEXT_OVERFLOW, - TEXT_ALIGNMENT, - (GTextLayoutCacheRef) &layout).h; + return graphics_text_layout_get_max_used_size(ctx, text, TEXT_FONT, *text_box, TEXT_OVERFLOW, + TEXT_ALIGNMENT, (GTextLayoutCacheRef)&layout) + .h; } static int prv_get_icon_top_margin(bool has_status_bar, int icon_height, int window_height) { @@ -77,8 +72,8 @@ static int prv_get_icon_top_margin(bool has_status_bar, int icon_height, int win return icon_top_default_margin_px; } -static void prv_get_text_box(GSize frame_size, GSize icon_size, - int icon_top_margin_px, GRect *text_box_out) { +static void prv_get_text_box(GSize frame_size, GSize icon_size, int icon_top_margin_px, + GRect *text_box_out) { #if PBL_DISPLAY_HEIGHT >= 200 const uint16_t icon_text_spacing_px = PBL_IF_ROUND_ELSE(8, 16); #else @@ -109,8 +104,8 @@ static void prv_simple_dialog_load(Window *window) { dialog_add_status_bar_layer(dialog, &GRect(0, 0, frame.size.w, STATUS_BAR_LAYER_HEIGHT)); } - uint16_t icon_top_margin_px = prv_get_icon_top_margin(dialog->show_status_layer, - icon_size.h, frame.size.h); + uint16_t icon_top_margin_px = + prv_get_icon_top_margin(dialog->show_status_layer, icon_size.h, frame.size.h); // Text GRect text_box; @@ -137,8 +132,8 @@ static void prv_simple_dialog_load(Window *window) { #endif // Icon - const GPoint icon_origin = GPoint((grect_get_max_x(&frame) - icon_size.w) / 2, - icon_top_margin_px); + const GPoint icon_origin = + GPoint((grect_get_max_x(&frame) - icon_size.w) / 2, icon_top_margin_px); if (dialog_init_icon_layer(dialog, icon, icon_origin, !simple_dialog->icon_static)) { layer_add_child(&dialog->window.layer, &dialog->icon_layer.layer); @@ -189,17 +184,17 @@ void app_simple_dialog_push(SimpleDialog *simple_dialog) { void simple_dialog_init(SimpleDialog *simple_dialog, const char *dialog_name) { PBL_ASSERTN(simple_dialog); - *simple_dialog = (SimpleDialog) { - .icon_static = !SIMPLE_DIALOG_ANIMATED, + *simple_dialog = (SimpleDialog){ + .icon_static = !SIMPLE_DIALOG_ANIMATED, }; dialog_init(&simple_dialog->dialog, dialog_name); Window *window = &simple_dialog->dialog.window; - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_simple_dialog_load, - .unload = prv_simple_dialog_unload, - .appear = prv_simple_dialog_appear, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_simple_dialog_load, + .unload = prv_simple_dialog_unload, + .appear = prv_simple_dialog_appear, + }); window_set_click_config_provider_with_context(window, prv_config_provider, simple_dialog); window_set_user_data(window, simple_dialog); } @@ -222,10 +217,10 @@ void simple_dialog_set_icon_animated(SimpleDialog *simple_dialog, bool animated) simple_dialog->icon_static = !animated; } -bool simple_dialog_does_text_fit(const char *text, GSize window_size, - GSize icon_size, bool has_status_bar) { - const uint16_t icon_top_margin_px = prv_get_icon_top_margin(has_status_bar, icon_size.h, - window_size.h); +bool simple_dialog_does_text_fit(const char *text, GSize window_size, GSize icon_size, + bool has_status_bar) { + const uint16_t icon_top_margin_px = + prv_get_icon_top_margin(has_status_bar, icon_size.h, window_size.h); GRect text_box; prv_get_text_box(window_size, icon_size, icon_top_margin_px, &text_box); return prv_get_rendered_text_height(text, &text_box) <= TEXT_MAX_HEIGHT_PX; diff --git a/src/fw/applib/ui/dialogs/simple_dialog.h b/src/fw/applib/ui/dialogs/simple_dialog.h index 4e03ddbde5..260861fb61 100644 --- a/src/fw/applib/ui/dialogs/simple_dialog.h +++ b/src/fw/applib/ui/dialogs/simple_dialog.h @@ -51,5 +51,5 @@ void simple_dialog_set_buttons_enabled(SimpleDialog *simple_dialog, bool enabled //! @param animated Whether the icon should animate or not void simple_dialog_set_icon_animated(SimpleDialog *simple_dialog, bool animated); -bool simple_dialog_does_text_fit(const char *text, GSize window_size, - GSize icon_size, bool has_status_bar); +bool simple_dialog_does_text_fit(const char *text, GSize window_size, GSize icon_size, + bool has_status_bar); diff --git a/src/fw/applib/ui/inverter_layer.c b/src/fw/applib/ui/inverter_layer.c index 4df8730c06..310e402ee4 100644 --- a/src/fw/applib/ui/inverter_layer.c +++ b/src/fw/applib/ui/inverter_layer.c @@ -16,7 +16,7 @@ inline static void prv_inverter_layer_update_proc_color(GContext *ctx) { for (int16_t y = rect.origin.y; y < rect.origin.y + rect.size.h; y++) { int16_t row_offset = y * ctx->dest_bitmap.row_size_bytes; for (int16_t x = rect.origin.x; x < rect.origin.x + rect.size.w; x++) { - uint8_t *pixel_addr = &(((uint8_t*)ctx->dest_bitmap.addr)[row_offset + x]); + uint8_t *pixel_addr = &(((uint8_t *)ctx->dest_bitmap.addr)[row_offset + x]); // Only invert the RGB and not the alpha *pixel_addr = (~(*pixel_addr) & 0b00111111) | (*pixel_addr & 0b11000000); } @@ -28,7 +28,7 @@ inline static void prv_inverter_layer_update_proc_color(GContext *ctx) { inline static void prv_inverter_layer_update_proc_bw(GContext *ctx) { // For 1Bit, just revert to the 2.x code. GBitmap sub_bitmap; - GBitmap* context_bitmap = graphics_context_get_bitmap(ctx); + GBitmap *context_bitmap = graphics_context_get_bitmap(ctx); // ctx->draw_state.drawing_box is the correct rect when this function gets called through // layer_render_tree(), although it might be nicer to have a function to map a rect to another // coordinate system... @@ -45,7 +45,7 @@ inline static void prv_inverter_layer_update_proc_bw(GContext *ctx) { graphics_draw_bitmap_in_rect(ctx, &sub_bitmap, &rect); } -void inverter_layer_update_proc(InverterLayer *inverter, GContext* ctx) { +void inverter_layer_update_proc(InverterLayer *inverter, GContext *ctx) { #if CONFIG_SCREEN_COLOR_DEPTH_BITS == 1 prv_inverter_layer_update_proc_bw(ctx); #else @@ -66,8 +66,8 @@ void inverter_layer_init(InverterLayer *inverter, const GRect *frame) { layer_mark_dirty(&(inverter->layer)); } -InverterLayer* inverter_layer_create(GRect frame) { - InverterLayer* layer = applib_type_malloc(InverterLayer); +InverterLayer *inverter_layer_create(GRect frame) { + InverterLayer *layer = applib_type_malloc(InverterLayer); if (layer) { inverter_layer_init(layer, &frame); } @@ -89,10 +89,9 @@ void inverter_layer_destroy(InverterLayer *inverter_layer) { applib_free(inverter_layer); } -Layer* inverter_layer_get_layer(InverterLayer *inverter_layer) { +Layer *inverter_layer_get_layer(InverterLayer *inverter_layer) { if (inverter_layer == NULL) { return NULL; } return &inverter_layer->layer; } - diff --git a/src/fw/applib/ui/inverter_layer.h b/src/fw/applib/ui/inverter_layer.h index ecee14047b..edd38789ee 100644 --- a/src/fw/applib/ui/inverter_layer.h +++ b/src/fw/applib/ui/inverter_layer.h @@ -49,12 +49,12 @@ void inverter_layer_init(InverterLayer *inverter, const GRect *frame); //! * Hidden: `false` //! @return A pointer to the InverterLayer. `NULL` if the InverterLayer could not //! be created -InverterLayer* inverter_layer_create(GRect frame); +InverterLayer *inverter_layer_create(GRect frame); void inverter_layer_deinit(InverterLayer *inverter_layer); //! Destroys an InverterLayer previously created by inverter_layer_create -void inverter_layer_destroy(InverterLayer* inverter_layer); +void inverter_layer_destroy(InverterLayer *inverter_layer); //! Gets the "root" Layer of the inverter layer, which is the parent for the sub- //! layers used for its implementation. @@ -62,7 +62,7 @@ void inverter_layer_destroy(InverterLayer* inverter_layer); //! @return The "root" Layer of the inverter layer. //! @internal //! @note The result is always equal to `(Layer *) inverter_layer`. -Layer* inverter_layer_get_layer(InverterLayer *inverter_layer); +Layer *inverter_layer_get_layer(InverterLayer *inverter_layer); //! @} // end addtogroup InverterLayer //! @} // end addtogroup Layer diff --git a/src/fw/applib/ui/kino/kino_layer.c b/src/fw/applib/ui/kino/kino_layer.c index 1ed5c14dba..f5faa11ac6 100644 --- a/src/fw/applib/ui/kino/kino_layer.c +++ b/src/fw/applib/ui/kino/kino_layer.c @@ -10,18 +10,18 @@ static void prv_invert_pdc_colors(GDrawCommandProcessor *processor, GDrawCommand size_t processed_command_max_size, const GDrawCommandList *list, const GDrawCommand *command) { gdraw_command_set_stroke_color( - processed_command, - gcolor_invert(gdraw_command_get_stroke_color((GDrawCommand *)command))); + processed_command, gcolor_invert(gdraw_command_get_stroke_color((GDrawCommand *)command))); gdraw_command_set_fill_color( - processed_command, - gcolor_invert(gdraw_command_get_fill_color((GDrawCommand *)command))); + processed_command, gcolor_invert(gdraw_command_get_fill_color((GDrawCommand *)command))); } GDrawCommandProcessor prv_gdraw_inv_processor = { - .command = prv_invert_pdc_colors, + .command = prv_invert_pdc_colors, }; -KinoReelProcessor PRV_INVERT_COLORS_PROCESSOR = {.draw_command_processor = &prv_gdraw_inv_processor}; +KinoReelProcessor PRV_INVERT_COLORS_PROCESSOR = { + .draw_command_processor = &prv_gdraw_inv_processor +}; static void prv_update_proc(Layer *layer, GContext *ctx) { KinoLayer *kino_layer = (KinoLayer *)layer; @@ -40,7 +40,8 @@ static void prv_update_proc(Layer *layer, GContext *ctx) { const GRect reel_bounds = kino_layer_get_reel_bounds(kino_layer); - KinoReelProcessor processor = kino_layer->invert_colors ? PRV_INVERT_COLORS_PROCESSOR : (KinoReelProcessor){}; + KinoReelProcessor processor = + kino_layer->invert_colors ? PRV_INVERT_COLORS_PROCESSOR : (KinoReelProcessor){}; kino_player_draw_processed(&kino_layer->player, ctx, reel_bounds.origin, &processor); } @@ -72,10 +73,12 @@ void kino_layer_init(KinoLayer *kino_layer, const GRect *frame) { // init kino layer kino_layer->background_color = GColorClear; // init kino player - kino_player_set_callbacks(&kino_layer->player, (KinoPlayerCallbacks){ - .frame_did_change = prv_player_frame_did_change, - .did_stop = prv_player_did_stop, - }, kino_layer); + kino_player_set_callbacks(&kino_layer->player, + (KinoPlayerCallbacks){ + .frame_did_change = prv_player_frame_did_change, + .did_stop = prv_player_did_stop, + }, + kino_layer); } void kino_layer_deinit(KinoLayer *kino_layer) { @@ -158,10 +161,10 @@ ImmutableAnimation *kino_layer_create_play_animation(KinoLayer *kino_layer) { return kino_player_create_play_animation(&kino_layer->player); } -ImmutableAnimation *kino_layer_create_play_section_animation( - KinoLayer *kino_layer, uint32_t from_position, uint32_t to_position) { - return kino_player_create_play_section_animation(&kino_layer->player, from_position, - to_position); +ImmutableAnimation *kino_layer_create_play_section_animation(KinoLayer *kino_layer, + uint32_t from_position, + uint32_t to_position) { + return kino_player_create_play_section_animation(&kino_layer->player, from_position, to_position); } void kino_layer_pause(KinoLayer *kino_layer) { diff --git a/src/fw/applib/ui/kino/kino_layer.h b/src/fw/applib/ui/kino/kino_layer.h index 509fadcb7d..75a7f78bbf 100644 --- a/src/fw/applib/ui/kino/kino_layer.h +++ b/src/fw/applib/ui/kino/kino_layer.h @@ -63,8 +63,9 @@ void kino_layer_play_section(KinoLayer *kino_layer, uint32_t from_position, uint ImmutableAnimation *kino_layer_create_play_animation(KinoLayer *kino_layer); -ImmutableAnimation *kino_layer_create_play_section_animation( - KinoLayer *kino_layer, uint32_t from_position, uint32_t to_position); +ImmutableAnimation *kino_layer_create_play_section_animation(KinoLayer *kino_layer, + uint32_t from_position, + uint32_t to_position); void kino_layer_pause(KinoLayer *kino_layer); diff --git a/src/fw/applib/ui/kino/kino_player.c b/src/fw/applib/ui/kino/kino_player.c index 61ebe4e5a8..d9f05b6d9d 100644 --- a/src/fw/applib/ui/kino/kino_player.c +++ b/src/fw/applib/ui/kino/kino_player.c @@ -35,7 +35,7 @@ T_STATIC void prv_play_animation_update(Animation *animation, const AnimationPro bool is_reel_infinite = (kino_reel_duration == PLAY_DURATION_INFINITE); bool is_animation_reversed = animation_get_reverse(animation); bool is_animation_infinite = - (animation_get_duration(animation, false, false) == PLAY_DURATION_INFINITE); + (animation_get_duration(animation, false, false) == PLAY_DURATION_INFINITE); if (!is_animation_infinite && !is_reel_infinite) { // If neither animation nor reel is infinite @@ -66,11 +66,11 @@ static void prv_play_anim_stopped(Animation *anim, bool finished, void *context) } static const AnimationImplementation s_play_animation_impl = { - .update = prv_play_animation_update, + .update = prv_play_animation_update, }; static const AnimationHandlers s_play_anim_handlers = { - .stopped = prv_play_anim_stopped, + .stopped = prv_play_anim_stopped, }; ////////////////////////////////// @@ -165,8 +165,9 @@ ImmutableAnimation *kino_player_create_play_animation(KinoPlayer *player) { return NULL; } -ImmutableAnimation *kino_player_create_play_section_animation( - KinoPlayer *player, uint32_t from_elapsed_ms, uint32_t to_elapsed_ms) { +ImmutableAnimation *kino_player_create_play_section_animation(KinoPlayer *player, + uint32_t from_elapsed_ms, + uint32_t to_elapsed_ms) { if (player && player->reel) { prv_create_play_animation(player, from_elapsed_ms, to_elapsed_ms); return (ImmutableAnimation *)player->animation; @@ -203,6 +204,6 @@ void kino_player_draw_processed(KinoPlayer *player, GContext *ctx, GPoint offset } void kino_player_deinit(KinoPlayer *player) { - player->callbacks = (KinoPlayerCallbacks) { 0 }; + player->callbacks = (KinoPlayerCallbacks){0}; kino_player_set_reel(player, NULL, false); } diff --git a/src/fw/applib/ui/kino/kino_player.h b/src/fw/applib/ui/kino/kino_player.h index 345e9fe837..17217ca5d1 100644 --- a/src/fw/applib/ui/kino/kino_player.h +++ b/src/fw/applib/ui/kino/kino_player.h @@ -54,8 +54,9 @@ void kino_player_play_section(KinoPlayer *player, uint32_t from_elapsed_ms, uint //! @return a pointer to a ImmutableAnimation object that plays the KinoPlayer when scheduled ImmutableAnimation *kino_player_create_play_animation(KinoPlayer *player); -ImmutableAnimation *kino_player_create_play_section_animation( - KinoPlayer *player, uint32_t from_elapsed_ms, uint32_t to_elapsed_ms); +ImmutableAnimation *kino_player_create_play_section_animation(KinoPlayer *player, + uint32_t from_elapsed_ms, + uint32_t to_elapsed_ms); void kino_player_pause(KinoPlayer *player); diff --git a/src/fw/applib/ui/kino/kino_reel.c b/src/fw/applib/ui/kino/kino_reel.c index 3c5e1efce6..479819a8eb 100644 --- a/src/fw/applib/ui/kino/kino_reel.c +++ b/src/fw/applib/ui/kino/kino_reel.c @@ -27,8 +27,8 @@ KinoReel *kino_reel_create_with_resource_system(ResAppNum app_num, uint32_t reso // The first 4 bytes for media data files contains the type signature (except legacy PBI) uint32_t data_signature; - if (sys_resource_load_range(app_num, resource_id, 0, (uint8_t*)&data_signature, - sizeof(data_signature)) != sizeof(data_signature)) { + if (sys_resource_load_range(app_num, resource_id, 0, (uint8_t *)&data_signature, + sizeof(data_signature)) != sizeof(data_signature)) { return NULL; } @@ -37,17 +37,16 @@ KinoReel *kino_reel_create_with_resource_system(ResAppNum app_num, uint32_t reso return kino_reel_pdcs_create_with_resource_system(app_num, resource_id); case PDCI_SIGNATURE: return kino_reel_pdci_create_with_resource_system(app_num, resource_id); - case PNG_SIGNATURE: - { - bool is_apng = false; - // Check if the PNG is an APNG by seeking for the actl chunk - png_seek_chunk_in_resource_system(app_num, resource_id, PNG_HEADER_SIZE, true, &is_apng); - if (is_apng) { - return kino_reel_gbitmap_sequence_create_with_resource_system(app_num, resource_id); - } else { - return kino_reel_gbitmap_create_with_resource_system(app_num, resource_id); - } + case PNG_SIGNATURE: { + bool is_apng = false; + // Check if the PNG is an APNG by seeking for the actl chunk + png_seek_chunk_in_resource_system(app_num, resource_id, PNG_HEADER_SIZE, true, &is_apng); + if (is_apng) { + return kino_reel_gbitmap_sequence_create_with_resource_system(app_num, resource_id); + } else { + return kino_reel_gbitmap_create_with_resource_system(app_num, resource_id); } + } default: // We don't have any good way to validate that something // is indeed a gbitmap. We use it as our fallback. @@ -146,7 +145,7 @@ GBitmap *kino_reel_get_gbitmap(KinoReel *reel) { return NULL; } -GBitmapSequence* kino_reel_get_gbitmap_sequence(KinoReel *reel) { +GBitmapSequence *kino_reel_get_gbitmap_sequence(KinoReel *reel) { if (reel && reel->impl->get_gbitmap_sequence) { return reel->impl->get_gbitmap_sequence(reel); } diff --git a/src/fw/applib/ui/kino/kino_reel.h b/src/fw/applib/ui/kino/kino_reel.h index b9b0c59bc2..1c90e781ec 100644 --- a/src/fw/applib/ui/kino/kino_reel.h +++ b/src/fw/applib/ui/kino/kino_reel.h @@ -30,15 +30,15 @@ typedef GSize (*KinoReelSizeGetter)(KinoReel *reel); typedef size_t (*KinoReelDataSizeGetter)(const KinoReel *reel); typedef void (*KinoReelDrawProcessedFunc)(KinoReel *reel, GContext *ctx, GPoint offset, KinoReelProcessor *processor); -typedef GDrawCommandImage* (*KinoReelGDrawCommandImageGetter)(KinoReel *reel); -typedef GDrawCommandList* (*KinoReelGDrawCommandListGetter)(KinoReel *reel); -typedef GDrawCommandSequence* (*KinoReelGDrawCommandSequenceGetter)(KinoReel *reel); -typedef GBitmap* (*KinoReelGBitmapGetter)(KinoReel *reel); -typedef GBitmapSequence* (*KinoReelGBitmapSequenceGetter)(KinoReel *reel); +typedef GDrawCommandImage *(*KinoReelGDrawCommandImageGetter)(KinoReel *reel); +typedef GDrawCommandList *(*KinoReelGDrawCommandListGetter)(KinoReel *reel); +typedef GDrawCommandSequence *(*KinoReelGDrawCommandSequenceGetter)(KinoReel *reel); +typedef GBitmap *(*KinoReelGBitmapGetter)(KinoReel *reel); +typedef GBitmapSequence *(*KinoReelGBitmapSequenceGetter)(KinoReel *reel); struct KinoReelProcessor { - GBitmapProcessor * const bitmap_processor; - GDrawCommandProcessor * const draw_command_processor; + GBitmapProcessor *const bitmap_processor; + GDrawCommandProcessor *const draw_command_processor; }; typedef enum { diff --git a/src/fw/applib/ui/kino/kino_reel/morph_square.c b/src/fw/applib/ui/kino/kino_reel/morph_square.c index 935ba1f975..cfd9fec8e2 100644 --- a/src/fw/applib/ui/kino/kino_reel/morph_square.c +++ b/src/fw/applib/ui/kino/kino_reel/morph_square.c @@ -36,8 +36,8 @@ static void prv_apply_transform(GDrawCommandList *list, const GSize size, const } static const TransformImpl MORPH_SQUARE_TRANSFORM_IMPL = { - .destructor = prv_destructor, - .apply = prv_apply_transform, + .destructor = prv_destructor, + .apply = prv_apply_transform, }; KinoReel *kino_reel_morph_square_create(KinoReel *from_reel, bool take_ownership) { @@ -46,7 +46,7 @@ KinoReel *kino_reel_morph_square_create(KinoReel *from_reel, bool take_ownership return NULL; } - GRect frame = { GPointZero, kino_reel_get_size(from_reel) }; + GRect frame = {GPointZero, kino_reel_get_size(from_reel)}; KinoReel *reel = kino_reel_transform_create(&MORPH_SQUARE_TRANSFORM_IMPL, data); if (reel) { diff --git a/src/fw/applib/ui/kino/kino_reel/scale_segmented.c b/src/fw/applib/ui/kino/kino_reel/scale_segmented.c index 4e0a3d8b91..09a2a30125 100644 --- a/src/fw/applib/ui/kino/kino_reel/scale_segmented.c +++ b/src/fw/applib/ui/kino/kino_reel/scale_segmented.c @@ -38,7 +38,6 @@ typedef struct { } lookup; } ScaleSegmentedData; - typedef struct { GPoint target; } DistanceLookupData; @@ -65,8 +64,8 @@ static void prv_apply_transform(GDrawCommandList *list, GSize size, const GRect ScaleSegmentedData *data = context; GDelayCreatorContext delay_ctx = { - .list = list, - .size = size, + .list = list, + .size = size, }; if (!data->lookup.creator) { return; @@ -82,11 +81,11 @@ static void prv_apply_transform(GDrawCommandList *list, GSize size, const GRect intermediate = grect_scalar_expand(*to, data->expand); gpoint_add_eq(&intermediate.origin, data->bounce); - const AnimationProgress first_normalized = animation_timing_segmented( - normalized, 0, 2, data->effect_duration); - gdraw_command_list_scale_segmented_to( - list, size, *from, intermediate, first_normalized, data->interpolate, index_lookup, - data->point_duration, false); + const AnimationProgress first_normalized = + animation_timing_segmented(normalized, 0, 2, data->effect_duration); + gdraw_command_list_scale_segmented_to(list, size, *from, intermediate, first_normalized, + data->interpolate, index_lookup, data->point_duration, + false); size = intermediate.size; second_normalized = animation_timing_segmented(normalized, 1, 2, data->effect_duration); @@ -95,16 +94,16 @@ static void prv_apply_transform(GDrawCommandList *list, GSize size, const GRect second_normalized = normalized; } - gdraw_command_list_scale_segmented_to( - list, size, intermediate, *to, second_normalized, data->interpolate, index_lookup, - data->point_duration, two_stage); + gdraw_command_list_scale_segmented_to(list, size, intermediate, *to, second_normalized, + data->interpolate, index_lookup, data->point_duration, + two_stage); - const AnimationProgress stroke_width_progress = data->stroke_width.curve ? - data->stroke_width.curve(normalized) : - animation_timing_curve(normalized, AnimationCurveEaseInOut); - gdraw_command_list_scale_stroke_width( - list, data->stroke_width.from, data->stroke_width.to, - data->stroke_width.from_op, data->stroke_width.to_op, stroke_width_progress); + const AnimationProgress stroke_width_progress = + data->stroke_width.curve ? data->stroke_width.curve(normalized) + : animation_timing_curve(normalized, AnimationCurveEaseInOut); + gdraw_command_list_scale_stroke_width(list, data->stroke_width.from, data->stroke_width.to, + data->stroke_width.from_op, data->stroke_width.to_op, + stroke_width_progress); if (delay_ctx.owns_lookup) { applib_free(index_lookup); @@ -132,8 +131,8 @@ static GPoint prv_calc_bounce_offset(GRect from, GRect to, int16_t bounce) { } static const TransformImpl SCALE_SEGMENTED_TRANSFORM_IMPL = { - .destructor = prv_destructor, - .apply = prv_apply_transform, + .destructor = prv_destructor, + .apply = prv_apply_transform, }; KinoReel *kino_reel_scale_segmented_create(KinoReel *from_reel, bool take_ownership, @@ -143,15 +142,15 @@ KinoReel *kino_reel_scale_segmented_create(KinoReel *from_reel, bool take_owners return NULL; } - *data = (ScaleSegmentedData) { - .point_duration = SCALE_SEGMENTED_DEFAULT_POINT_DURATION, - .effect_duration = SCALE_SEGMENTED_DEFAULT_EFFECT_DURATION, - .stroke_width = { - .from = FIXED_S16_3_ONE, - .to = FIXED_S16_3_ONE, - .from_op = GStrokeWidthOpMultiply, - .to_op = GStrokeWidthOpMultiply, - }, + *data = (ScaleSegmentedData){ + .point_duration = SCALE_SEGMENTED_DEFAULT_POINT_DURATION, + .effect_duration = SCALE_SEGMENTED_DEFAULT_EFFECT_DURATION, + .stroke_width = { + .from = FIXED_S16_3_ONE, + .to = FIXED_S16_3_ONE, + .from_op = GStrokeWidthOpMultiply, + .to_op = GStrokeWidthOpMultiply, + }, }; KinoReel *reel = kino_reel_transform_create(&SCALE_SEGMENTED_TRANSFORM_IMPL, data); @@ -167,8 +166,9 @@ KinoReel *kino_reel_scale_segmented_create(KinoReel *from_reel, bool take_owners return reel; } -void kino_reel_scale_segmented_set_delay_lookup_creator( - KinoReel *reel, GPointIndexLookupCreator creator, void *userdata, bool take_ownership) { +void kino_reel_scale_segmented_set_delay_lookup_creator(KinoReel *reel, + GPointIndexLookupCreator creator, + void *userdata, bool take_ownership) { ScaleSegmentedData *data = kino_reel_transform_get_context(reel); if (!data) { return; @@ -195,7 +195,7 @@ bool kino_reel_scale_segmented_set_delay_by_distance(KinoReel *reel, GPoint targ if (!lookup_data) { return false; } - *lookup_data = (DistanceLookupData) { .target = target }; + *lookup_data = (DistanceLookupData){.target = target}; const bool take_ownership = true; kino_reel_scale_segmented_set_delay_lookup_creator(reel, prv_create_lookup_by_distance, lookup_data, take_ownership); @@ -267,14 +267,15 @@ void kino_reel_scale_segmented_set_stroke_width_curve(KinoReel *reel, } static AnimationProgress prv_ease_in_out_last_half(AnimationProgress progress) { - return animation_timing_curve(animation_timing_clip(2 * (progress - ANIMATION_NORMALIZED_MAX / 2)) - , AnimationCurveEaseInOut); + return animation_timing_curve( + animation_timing_clip(2 * (progress - ANIMATION_NORMALIZED_MAX / 2)), + AnimationCurveEaseInOut); } void kino_reel_scale_segmented_set_end_as_dot(KinoReel *reel, int16_t radius) { GRect frame = kino_reel_transform_get_to_frame(reel); - kino_reel_transform_set_to_frame( - reel, (GRect) { grect_center_point(&frame), SCALE_SEGMENTED_DOT_SIZE }); + kino_reel_transform_set_to_frame(reel, + (GRect){grect_center_point(&frame), SCALE_SEGMENTED_DOT_SIZE}); const Fixed_S16_3 to = Fixed_S16_3((2 * radius) << FIXED_S16_3_PRECISION); kino_reel_scale_segmented_set_to_stroke_width(reel, to, GStrokeWidthOpSet); diff --git a/src/fw/applib/ui/kino/kino_reel/scale_segmented.h b/src/fw/applib/ui/kino/kino_reel/scale_segmented.h index a5ad153bc2..55ac5b0f47 100644 --- a/src/fw/applib/ui/kino/kino_reel/scale_segmented.h +++ b/src/fw/applib/ui/kino/kino_reel/scale_segmented.h @@ -9,11 +9,9 @@ // These are KinoReels that use the per-point segmented delayed scaling animation. // @see gdraw_command_list_scale_segmented_to. -#define SCALE_SEGMENTED_DEFAULT_POINT_DURATION \ - Fixed_S32_16(2 * FIXED_S32_16_ONE.raw_value / 3) +#define SCALE_SEGMENTED_DEFAULT_POINT_DURATION Fixed_S32_16(2 * FIXED_S32_16_ONE.raw_value / 3) -#define SCALE_SEGMENTED_DEFAULT_EFFECT_DURATION \ - Fixed_S32_16(2 * FIXED_S32_16_ONE.raw_value / 3) +#define SCALE_SEGMENTED_DEFAULT_EFFECT_DURATION Fixed_S32_16(2 * FIXED_S32_16_ONE.raw_value / 3) #define SCALE_SEGMENTED_DOT_SIZE_PX 0 #define SCALE_SEGMENTED_DOT_SIZE GSize(SCALE_SEGMENTED_DOT_SIZE_PX, SCALE_SEGMENTED_DOT_SIZE_PX) @@ -21,7 +19,7 @@ //! A GDelayCreatorContext gives the information needed to build a delay index lookup for a given //! GDrawCommandList. typedef struct { - GDrawCommandList * const list; + GDrawCommandList *const list; const GSize size; //! Whether the transform should free the lookup after use. //! Specifying false allows the creator to reuse buffers or references existing lookups. @@ -51,8 +49,9 @@ KinoReel *kino_reel_scale_segmented_create(KinoReel *from_reel, bool take_owners //! @param creator Creator of a GPointIndexLookup with the assigned delay multiplier for each point //! @param context Context to pass to the creator //! @param take_ownership true if this KinoReel will free `context` when destroyed -void kino_reel_scale_segmented_set_delay_lookup_creator( - KinoReel *reel, GPointIndexLookupCreator creator, void *context, bool take_ownership); +void kino_reel_scale_segmented_set_delay_lookup_creator(KinoReel *reel, + GPointIndexLookupCreator creator, + void *context, bool take_ownership); //! Sets a GPointIndexLookup based on the distance to a target //! @param reel KinoReel to modify @@ -102,8 +101,7 @@ void kino_reel_scale_segmented_set_to_stroke_width(KinoReel *reel, Fixed_S16_3 t GStrokeWidthOp to_op); //! Set the stroke width curve -void kino_reel_scale_segmented_set_stroke_width_curve(KinoReel *reel, - AnimationCurveFunction curve); +void kino_reel_scale_segmented_set_stroke_width_curve(KinoReel *reel, AnimationCurveFunction curve); //! Set the animation to end as a dot. Requires the to frame to be set before use. void kino_reel_scale_segmented_set_end_as_dot(KinoReel *reel, int16_t radius); diff --git a/src/fw/applib/ui/kino/kino_reel/transform.c b/src/fw/applib/ui/kino/kino_reel/transform.c index d7545079eb..133edd0755 100644 --- a/src/fw/applib/ui/kino/kino_reel/transform.c +++ b/src/fw/applib/ui/kino/kino_reel/transform.c @@ -136,8 +136,8 @@ static bool prv_elapsed_setter(KinoReel *reel, uint32_t elapsed) { changed = true; } - const int32_t normalized = animation_timing_clip( - scale_int32(elapsed, data->duration, ANIMATION_NORMALIZED_MAX)); + const int32_t normalized = + animation_timing_clip(scale_int32(elapsed, data->duration, ANIMATION_NORMALIZED_MAX)); if (data->normalized == normalized) { return changed; } @@ -146,8 +146,7 @@ static bool prv_elapsed_setter(KinoReel *reel, uint32_t elapsed) { // No position setter is shorthand for always triggering a transform on any position setting bool transform_changed = true; - if (data->impl->position_setter && - !data->impl->position_setter(normalized, data->context)) { + if (data->impl->position_setter && !data->impl->position_setter(normalized, data->context)) { transform_changed = false; } @@ -171,8 +170,7 @@ static void prv_transform_list(KinoReelTransformData *data) { if (!list) { return; } - if (!gdraw_command_list_copy(list, gdraw_command_list_get_data_size(source_list), - source_list)) { + if (!gdraw_command_list_copy(list, gdraw_command_list_get_data_size(source_list), source_list)) { return; } if (data->impl->apply) { @@ -185,15 +183,14 @@ static void prv_draw_command_list_processed(GContext *ctx, GDrawCommandList *lis KinoReelProcessor *processor) { GPoint draw_box_origin = ctx->draw_state.drawing_box.origin; graphics_context_move_draw_box(ctx, offset); - gdraw_command_list_draw_processed(ctx, list, NULL_SAFE_FIELD_ACCESS(processor, - draw_command_processor, - NULL)); + gdraw_command_list_draw_processed( + ctx, list, NULL_SAFE_FIELD_ACCESS(processor, draw_command_processor, NULL)); ctx->draw_state.drawing_box.origin = draw_box_origin; } -static void prv_draw_reel_or_command_list_processed( - GContext *ctx, KinoReel *reel, GDrawCommandList *list, GPoint offset, - KinoReelProcessor *processor) { +static void prv_draw_reel_or_command_list_processed(GContext *ctx, KinoReel *reel, + GDrawCommandList *list, GPoint offset, + KinoReelProcessor *processor) { if (list) { prv_draw_command_list_processed(ctx, list, offset, processor); } else { @@ -275,13 +272,13 @@ static GDrawCommandList *prv_get_gdraw_command_list(KinoReel *reel) { } static const KinoReelImpl s_kino_reel_impl_transform = { - .destructor = prv_destructor, - .get_elapsed = prv_elapsed_getter, - .set_elapsed = prv_elapsed_setter, - .get_duration = prv_duration_getter, - .get_size = prv_size_getter, - .draw_processed = prv_draw_processed_func, - .get_gdraw_command_list = prv_get_gdraw_command_list, + .destructor = prv_destructor, + .get_elapsed = prv_elapsed_getter, + .set_elapsed = prv_elapsed_setter, + .get_duration = prv_duration_getter, + .get_size = prv_size_getter, + .draw_processed = prv_draw_processed_func, + .get_gdraw_command_list = prv_get_gdraw_command_list, }; KinoReel *kino_reel_transform_create(const TransformImpl *impl, void *context) { @@ -290,10 +287,10 @@ KinoReel *kino_reel_transform_create(const TransformImpl *impl, void *context) { return NULL; } - *data = (KinoReelTransformData) { - .impl = impl, - .context = context, - .duration = ANIMATION_DEFAULT_DURATION_MS, + *data = (KinoReelTransformData){ + .impl = impl, + .context = context, + .duration = ANIMATION_DEFAULT_DURATION_MS, }; KinoReel *reel = kino_reel_custom_create(&s_kino_reel_impl_transform, data); @@ -311,8 +308,7 @@ void *kino_reel_transform_get_context(KinoReel *reel) { return NULL; } -void kino_reel_transform_set_from_reel(KinoReel *reel, KinoReel *from_reel, - bool take_ownership) { +void kino_reel_transform_set_from_reel(KinoReel *reel, KinoReel *from_reel, bool take_ownership) { KinoReelTransformData *data = kino_reel_custom_get_data(reel); if (!data) { return; @@ -333,8 +329,7 @@ KinoReel *kino_reel_transform_get_from_reel(KinoReel *reel) { return NULL; } -void kino_reel_transform_set_to_reel(KinoReel *reel, KinoReel *to_reel, - bool take_ownership) { +void kino_reel_transform_set_to_reel(KinoReel *reel, KinoReel *to_reel, bool take_ownership) { KinoReelTransformData *data = kino_reel_custom_get_data(reel); if (!data) { return; diff --git a/src/fw/applib/ui/kino/kino_reel/transform.h b/src/fw/applib/ui/kino/kino_reel/transform.h index 478db6c4ec..0a131b732c 100644 --- a/src/fw/applib/ui/kino/kino_reel/transform.h +++ b/src/fw/applib/ui/kino/kino_reel/transform.h @@ -29,7 +29,7 @@ typedef bool (*TransformPositionSetter)(int32_t normalized, void *context); //! @param normalized Animation position of the current transform. //! @param context User supplied context for transform specific data. typedef void (*TransformApply)(GDrawCommandList *list, const GSize size, const GRect *from, - const GRect *to, AnimationProgress normalized, void *context); + const GRect *to, AnimationProgress normalized, void *context); //! Transform Implementation Callbacks. typedef struct { @@ -60,15 +60,13 @@ KinoReel *kino_reel_transform_create(const TransformImpl *impl, void *context); //! @param reel Transform Kino Reel to get a context from void *kino_reel_transform_get_context(KinoReel *reel); -void kino_reel_transform_set_from_reel(KinoReel *reel, KinoReel *from_reel, - bool take_ownership); +void kino_reel_transform_set_from_reel(KinoReel *reel, KinoReel *from_reel, bool take_ownership); //! Get the from reel. //! @param reel Transform Kino Reel to get the from reel from KinoReel *kino_reel_transform_get_from_reel(KinoReel *reel); -void kino_reel_transform_set_to_reel(KinoReel *reel, KinoReel *to_reel, - bool take_ownership); +void kino_reel_transform_set_to_reel(KinoReel *reel, KinoReel *to_reel, bool take_ownership); //! Get the to reel. //! @param reel Transform Kino Reel to get the to reel from diff --git a/src/fw/applib/ui/kino/kino_reel/unfold.c b/src/fw/applib/ui/kino/kino_reel/unfold.c index 03ce796ce2..5c522709c3 100644 --- a/src/fw/applib/ui/kino/kino_reel/unfold.c +++ b/src/fw/applib/ui/kino/kino_reel/unfold.c @@ -23,9 +23,9 @@ typedef struct { static GPointIndexLookup *prv_create_lookup_by_angle(GDelayCreatorContext *ctx, void *userdata) { AngleLookupContext *data = userdata; - GPoint origin = { ctx->size.w / 2, ctx->size.h / 2 }; - GPointIndexLookup *lookup = gdraw_command_list_create_index_lookup_by_angle(ctx->list, origin, - data->angle); + GPoint origin = {ctx->size.w / 2, ctx->size.h / 2}; + GPointIndexLookup *lookup = + gdraw_command_list_create_index_lookup_by_angle(ctx->list, origin, data->angle); gpoint_index_lookup_set_groups(lookup, data->num_delay_groups, data->group_delay); ctx->owns_lookup = true; @@ -43,10 +43,10 @@ KinoReel *kino_reel_unfold_create(KinoReel *from_reel, bool take_ownership, GRec if (!ctx) { return NULL; } - *ctx = (AngleLookupContext) { - .angle = angle, - .num_delay_groups = num_delay_groups, - .group_delay = group_delay, + *ctx = (AngleLookupContext){ + .angle = angle, + .num_delay_groups = num_delay_groups, + .group_delay = group_delay, }; if (!ctx->angle) { ctx->angle = rand() % TRIG_MAX_ANGLE; @@ -65,8 +65,7 @@ KinoReel *kino_reel_unfold_create(KinoReel *from_reel, bool take_ownership, GRec void kino_reel_unfold_set_start_as_dot(KinoReel *reel, int16_t radius) { GRect frame = kino_reel_transform_get_from_frame(reel); - kino_reel_transform_set_from_frame( - reel, (GRect) { grect_center_point(&frame), UNFOLD_DOT_SIZE }); + kino_reel_transform_set_from_frame(reel, (GRect){grect_center_point(&frame), UNFOLD_DOT_SIZE}); const Fixed_S16_3 from = Fixed_S16_3((2 * radius) << FIXED_S16_3_PRECISION); kino_reel_scale_segmented_set_from_stroke_width(reel, from, GStrokeWidthOpSet); diff --git a/src/fw/applib/ui/kino/kino_reel/unfold.h b/src/fw/applib/ui/kino/kino_reel/unfold.h index 630d1b1c83..2a75fa225d 100644 --- a/src/fw/applib/ui/kino/kino_reel/unfold.h +++ b/src/fw/applib/ui/kino/kino_reel/unfold.h @@ -7,11 +7,9 @@ #include "applib/ui/kino/kino_reel.h" -#define UNFOLD_DEFAULT_POINT_DURATION \ - Fixed_S32_16(FIXED_S32_16_ONE.raw_value / 6) +#define UNFOLD_DEFAULT_POINT_DURATION Fixed_S32_16(FIXED_S32_16_ONE.raw_value / 6) -#define UNFOLD_DEFAULT_EFFECT_DURATION \ - Fixed_S32_16(3 * FIXED_S32_16_ONE.raw_value / 4) +#define UNFOLD_DEFAULT_EFFECT_DURATION Fixed_S32_16(3 * FIXED_S32_16_ONE.raw_value / 4) #define UNFOLD_DEFAULT_NUM_DELAY_GROUPS 3 #define UNFOLD_DEFAULT_GROUP_DELAY Fixed_S32_16(FIXED_S32_16_ONE.raw_value * 3 / 2) diff --git a/src/fw/applib/ui/kino/kino_reel_custom.c b/src/fw/applib/ui/kino/kino_reel_custom.c index 1f0af2f9c3..38f5cd3a37 100644 --- a/src/fw/applib/ui/kino/kino_reel_custom.c +++ b/src/fw/applib/ui/kino/kino_reel_custom.c @@ -103,7 +103,7 @@ GBitmap *prv_get_gbitmap(KinoReel *reel) { return NULL; } -GBitmapSequence* prv_get_gbitmap_sequence(KinoReel *reel) { +GBitmapSequence *prv_get_gbitmap_sequence(KinoReel *reel) { KinoReelImplCustom *custom_reel = (KinoReelImplCustom *)reel; if (custom_reel->impl->get_gbitmap_sequence) { return custom_reel->impl->get_gbitmap_sequence(reel); @@ -113,18 +113,18 @@ GBitmapSequence* prv_get_gbitmap_sequence(KinoReel *reel) { } static const KinoReelImpl KINO_REEL_IMPL_CUSTOM = { - .reel_type = KinoReelTypeCustom, - .destructor = prv_destructor, - .get_elapsed = prv_elapsed_getter, - .set_elapsed = prv_elapsed_setter, - .get_duration = prv_duration_getter, - .get_size = prv_size_getter, - .draw_processed = prv_draw_processed_func, - .get_gdraw_command_image = prv_get_gdraw_command_image, - .get_gdraw_command_list = prv_get_gdraw_command_list, - .get_gdraw_command_sequence = prv_get_gdraw_command_sequence, - .get_gbitmap = prv_get_gbitmap, - .get_gbitmap_sequence = prv_get_gbitmap_sequence, + .reel_type = KinoReelTypeCustom, + .destructor = prv_destructor, + .get_elapsed = prv_elapsed_getter, + .set_elapsed = prv_elapsed_setter, + .get_duration = prv_duration_getter, + .get_size = prv_size_getter, + .draw_processed = prv_draw_processed_func, + .get_gdraw_command_image = prv_get_gdraw_command_image, + .get_gdraw_command_list = prv_get_gdraw_command_list, + .get_gdraw_command_sequence = prv_get_gdraw_command_sequence, + .get_gbitmap = prv_get_gbitmap, + .get_gbitmap_sequence = prv_get_gbitmap_sequence, }; KinoReel *kino_reel_custom_create(const KinoReelImpl *custom_impl, void *data) { diff --git a/src/fw/applib/ui/kino/kino_reel_gbitmap.c b/src/fw/applib/ui/kino/kino_reel_gbitmap.c index be8604a335..77e76aa65f 100644 --- a/src/fw/applib/ui/kino/kino_reel_gbitmap.c +++ b/src/fw/applib/ui/kino/kino_reel_gbitmap.c @@ -26,9 +26,7 @@ static void prv_draw_processed_func(KinoReel *reel, GContext *ctx, GPoint offset // Save compositing mode GCompOp prev_compositing_mode = ctx->draw_state.compositing_mode; - GCompOp op = (bitmap_reel->bitmap->info.format == GBitmapFormat1Bit) - ? GCompOpAssign - : GCompOpSet; + GCompOp op = (bitmap_reel->bitmap->info.format == GBitmapFormat1Bit) ? GCompOpAssign : GCompOpSet; graphics_context_set_compositing_mode(ctx, op); @@ -71,26 +69,23 @@ static size_t prv_get_data_size(const KinoReel *reel) { static GBitmap *prv_get_gbitmap(KinoReel *reel) { if (reel) { - return ((KinoReelImplGBitmap*)reel)->bitmap; + return ((KinoReelImplGBitmap *)reel)->bitmap; } return NULL; } static const KinoReelImpl KINO_REEL_IMPL_GBITMAP = { - .reel_type = KinoReelTypeGBitmap, - .destructor = prv_destructor, - .get_size = prv_get_size, - .get_data_size = prv_get_data_size, - .draw_processed = prv_draw_processed_func, - .get_gbitmap = prv_get_gbitmap, + .reel_type = KinoReelTypeGBitmap, + .destructor = prv_destructor, + .get_size = prv_get_size, + .get_data_size = prv_get_data_size, + .draw_processed = prv_draw_processed_func, + .get_gbitmap = prv_get_gbitmap, }; void kino_reel_gbitmap_init(KinoReelImplGBitmap *bitmap_reel, GBitmap *bitmap) { if (bitmap_reel) { - *bitmap_reel = (KinoReelImplGBitmap) { - .bitmap = bitmap, - .base.impl = &KINO_REEL_IMPL_GBITMAP - }; + *bitmap_reel = (KinoReelImplGBitmap){.bitmap = bitmap, .base.impl = &KINO_REEL_IMPL_GBITMAP}; } } diff --git a/src/fw/applib/ui/kino/kino_reel_gbitmap_sequence.c b/src/fw/applib/ui/kino/kino_reel_gbitmap_sequence.c index 7ad0b2082d..fb1d537d41 100644 --- a/src/fw/applib/ui/kino/kino_reel_gbitmap_sequence.c +++ b/src/fw/applib/ui/kino/kino_reel_gbitmap_sequence.c @@ -39,9 +39,8 @@ static bool prv_elapsed_setter(KinoReel *reel, uint32_t elapsed_ms) { gbitmap_sequence_restart(sequence_reel->sequence); } - return gbitmap_sequence_update_bitmap_by_elapsed(sequence_reel->sequence, - sequence_reel->render_bitmap, - sequence_reel->elapsed_ms); + return gbitmap_sequence_update_bitmap_by_elapsed( + sequence_reel->sequence, sequence_reel->render_bitmap, sequence_reel->elapsed_ms); } static uint32_t prv_duration_getter(KinoReel *reel) { @@ -77,28 +76,28 @@ static void prv_draw_processed_func(KinoReel *reel, GContext *ctx, GPoint offset static GBitmap *prv_get_gbitmap(KinoReel *reel) { if (reel) { - return ((KinoReelImplGBitmapSequence*)reel)->render_bitmap; + return ((KinoReelImplGBitmapSequence *)reel)->render_bitmap; } return NULL; } static GBitmapSequence *prv_get_gbitmap_sequence(KinoReel *reel) { if (reel) { - return ((KinoReelImplGBitmapSequence*)reel)->sequence; + return ((KinoReelImplGBitmapSequence *)reel)->sequence; } return NULL; } static const KinoReelImpl KINO_REEL_IMPL_GBITMAPSEQUENCE = { - .reel_type = KinoReelTypeGBitmapSequence, - .destructor = prv_destructor, - .get_elapsed = prv_elapsed_getter, - .set_elapsed = prv_elapsed_setter, - .get_duration = prv_duration_getter, - .get_size = prv_size_getter, - .draw_processed = prv_draw_processed_func, - .get_gbitmap = prv_get_gbitmap, - .get_gbitmap_sequence = prv_get_gbitmap_sequence, + .reel_type = KinoReelTypeGBitmapSequence, + .destructor = prv_destructor, + .get_elapsed = prv_elapsed_getter, + .set_elapsed = prv_elapsed_setter, + .get_duration = prv_duration_getter, + .get_size = prv_size_getter, + .draw_processed = prv_draw_processed_func, + .get_gbitmap = prv_get_gbitmap, + .get_gbitmap_sequence = prv_get_gbitmap_sequence, }; KinoReel *kino_reel_gbitmap_sequence_create(GBitmapSequence *sequence, bool take_ownership) { @@ -109,8 +108,8 @@ KinoReel *kino_reel_gbitmap_sequence_create(GBitmapSequence *sequence, bool take reel->elapsed_ms = 0; reel->base.impl = &KINO_REEL_IMPL_GBITMAPSEQUENCE; // init render bitmap - reel->render_bitmap = gbitmap_create_blank(gbitmap_sequence_get_bitmap_size(sequence), - GBitmapFormat8Bit); + reel->render_bitmap = + gbitmap_create_blank(gbitmap_sequence_get_bitmap_size(sequence), GBitmapFormat8Bit); // Render initial frame upon load prv_elapsed_setter((KinoReel *)reel, 0); } diff --git a/src/fw/applib/ui/kino/kino_reel_pdci.c b/src/fw/applib/ui/kino/kino_reel_pdci.c index d3260ff42e..850e86beca 100644 --- a/src/fw/applib/ui/kino/kino_reel_pdci.c +++ b/src/fw/applib/ui/kino/kino_reel_pdci.c @@ -27,7 +27,8 @@ static void prv_draw_processed_func(KinoReel *reel, GContext *ctx, GPoint offset KinoReelImplPDCI *dci_reel = (KinoReelImplPDCI *)reel; gdraw_command_image_draw_processed( - ctx, dci_reel->image, offset, NULL_SAFE_FIELD_ACCESS(processor, draw_command_processor, NULL)); + ctx, dci_reel->image, offset, + NULL_SAFE_FIELD_ACCESS(processor, draw_command_processor, NULL)); } static GSize prv_get_size(KinoReel *reel) { @@ -42,26 +43,26 @@ static size_t prv_get_data_size(const KinoReel *reel) { static GDrawCommandImage *prv_get_gdraw_command_image(KinoReel *reel) { if (reel) { - return ((KinoReelImplPDCI*)reel)->image; + return ((KinoReelImplPDCI *)reel)->image; } return NULL; } static GDrawCommandList *prv_get_gdraw_command_list(KinoReel *reel) { if (reel) { - return gdraw_command_image_get_command_list(((KinoReelImplPDCI*)reel)->image); + return gdraw_command_image_get_command_list(((KinoReelImplPDCI *)reel)->image); } return NULL; } static const KinoReelImpl KINO_REEL_IMPL_PDCI = { - .reel_type = KinoReelTypePDCI, - .destructor = prv_destructor, - .get_size = prv_get_size, - .get_data_size = prv_get_data_size, - .draw_processed = prv_draw_processed_func, - .get_gdraw_command_image = prv_get_gdraw_command_image, - .get_gdraw_command_list = prv_get_gdraw_command_list, + .reel_type = KinoReelTypePDCI, + .destructor = prv_destructor, + .get_size = prv_get_size, + .get_data_size = prv_get_data_size, + .draw_processed = prv_draw_processed_func, + .get_gdraw_command_image = prv_get_gdraw_command_image, + .get_gdraw_command_list = prv_get_gdraw_command_list, }; KinoReel *kino_reel_pdci_create(GDrawCommandImage *image, bool take_ownership) { diff --git a/src/fw/applib/ui/kino/kino_reel_pdcs.c b/src/fw/applib/ui/kino/kino_reel_pdcs.c index 822c760295..5cc07a67eb 100644 --- a/src/fw/applib/ui/kino/kino_reel_pdcs.c +++ b/src/fw/applib/ui/kino/kino_reel_pdcs.c @@ -36,8 +36,8 @@ static uint32_t prv_elapsed_getter(KinoReel *reel) { static bool prv_elapsed_setter(KinoReel *reel, uint32_t elapsed_ms) { KinoReelImplPDCS *dcs_reel = (KinoReelImplPDCS *)reel; dcs_reel->elapsed_ms = elapsed_ms; - GDrawCommandFrame *frame = gdraw_command_sequence_get_frame_by_elapsed(dcs_reel->sequence, - dcs_reel->elapsed_ms); + GDrawCommandFrame *frame = + gdraw_command_sequence_get_frame_by_elapsed(dcs_reel->sequence, dcs_reel->elapsed_ms); bool frame_changed = false; if (frame != dcs_reel->current_frame) { dcs_reel->current_frame = frame; @@ -69,14 +69,14 @@ static void prv_draw_processed_func(KinoReel *reel, GContext *ctx, GPoint offset return; } - gdraw_command_frame_draw_processed(ctx, dcs_reel->sequence, dcs_reel->current_frame, offset, - NULL_SAFE_FIELD_ACCESS(processor, draw_command_processor, - NULL)); + gdraw_command_frame_draw_processed( + ctx, dcs_reel->sequence, dcs_reel->current_frame, offset, + NULL_SAFE_FIELD_ACCESS(processor, draw_command_processor, NULL)); } static GDrawCommandSequence *prv_get_gdraw_command_sequence(KinoReel *reel) { if (reel) { - return ((KinoReelImplPDCS*)reel)->sequence; + return ((KinoReelImplPDCS *)reel)->sequence; } return NULL; } @@ -91,16 +91,16 @@ static GDrawCommandList *prv_get_gdraw_command_list(KinoReel *reel) { } static const KinoReelImpl KINO_REEL_IMPL_PDCS = { - .reel_type = KinoReelTypePDCS, - .destructor = prv_destructor, - .get_elapsed = prv_elapsed_getter, - .set_elapsed = prv_elapsed_setter, - .get_duration = prv_duration_getter, - .get_size = prv_size_getter, - .get_data_size = prv_data_size_getter, - .draw_processed = prv_draw_processed_func, - .get_gdraw_command_sequence = prv_get_gdraw_command_sequence, - .get_gdraw_command_list = prv_get_gdraw_command_list, + .reel_type = KinoReelTypePDCS, + .destructor = prv_destructor, + .get_elapsed = prv_elapsed_getter, + .set_elapsed = prv_elapsed_setter, + .get_duration = prv_duration_getter, + .get_size = prv_size_getter, + .get_data_size = prv_data_size_getter, + .draw_processed = prv_draw_processed_func, + .get_gdraw_command_sequence = prv_get_gdraw_command_sequence, + .get_gdraw_command_list = prv_get_gdraw_command_list, }; KinoReel *kino_reel_pdcs_create(GDrawCommandSequence *sequence, bool take_ownership) { @@ -122,8 +122,8 @@ KinoReel *kino_reel_pdcs_create_with_resource(uint32_t resource_id) { } KinoReel *kino_reel_pdcs_create_with_resource_system(ResAppNum app_num, uint32_t resource_id) { - GDrawCommandSequence *sequence = gdraw_command_sequence_create_with_resource_system(app_num, - resource_id); + GDrawCommandSequence *sequence = + gdraw_command_sequence_create_with_resource_system(app_num, resource_id); if (sequence == NULL) { return NULL; } diff --git a/src/fw/applib/ui/layer.c b/src/fw/applib/ui/layer.c index 58fbec2664..edd0a22fe1 100644 --- a/src/fw/applib/ui/layer.c +++ b/src/fw/applib/ui/layer.c @@ -29,21 +29,21 @@ void layer_init(Layer *layer, const GRect *frame) { layer->clips = true; } -Layer* layer_create(GRect frame) { - Layer* layer = applib_type_malloc(Layer); +Layer *layer_create(GRect frame) { + Layer *layer = applib_type_malloc(Layer); if (layer) { layer_init(layer, &frame); } return layer; } -Layer* layer_create_with_data(GRect frame, size_t data_size) { - Layer* layer = applib_malloc(applib_type_size(Layer) + data_size); +Layer *layer_create_with_data(GRect frame, size_t data_size) { + Layer *layer = applib_malloc(applib_type_size(Layer) + data_size); if (layer) { layer_init(layer, &frame); layer->has_data = true; - DataLayer *data_layer = (DataLayer*) layer; + DataLayer *data_layer = (DataLayer *)layer; memset(data_layer->data, 0, data_size); } return layer; @@ -94,7 +94,7 @@ void layer_deinit(Layer *layer) { #endif } -void layer_destroy(Layer* layer) { +void layer_destroy(Layer *layer) { if (layer == NULL) { return; } @@ -140,14 +140,14 @@ void layer_process_tree(Layer *node, void *ctx, LayerIteratorFunc iterator_func) layer_process_tree_level(node, ctx, iterator_func); } -inline static Layer __attribute__((always_inline)) *prv_layer_tree_traverse_next(Layer *stack[], - int const stack_size, uint8_t *current_depth, - const bool descend) { +inline static Layer __attribute__((always_inline)) * + prv_layer_tree_traverse_next(Layer *stack[], int const stack_size, uint8_t *current_depth, + const bool descend) { const Layer *top_of_stack = stack[*current_depth]; // goto first child if (descend && top_of_stack->first_child) { - if (*current_depth < stack_size-1) { + if (*current_depth < stack_size - 1) { return stack[++(*current_depth)] = top_of_stack->first_child; } else { PBL_LOG_WRN("layer stack exceeded (%d). Will skip rendering.", stack_size); @@ -165,7 +165,7 @@ inline static Layer __attribute__((always_inline)) *prv_layer_tree_traverse_next (*current_depth)--; const Layer *sibling = stack[*current_depth]->next_sibling; if (sibling) { - return stack[*current_depth] = (Layer*)sibling; + return stack[*current_depth] = (Layer *)sibling; } } @@ -173,8 +173,8 @@ inline static Layer __attribute__((always_inline)) *prv_layer_tree_traverse_next return NULL; } -Layer *__layer_tree_traverse_next__test_accessor(Layer *stack[], - int const max_depth, uint8_t *current_depth, const bool descend) { +Layer *__layer_tree_traverse_next__test_accessor(Layer *stack[], int const max_depth, + uint8_t *current_depth, const bool descend) { return prv_layer_tree_traverse_next(stack, max_depth, current_depth, descend); } @@ -207,11 +207,12 @@ void layer_render_tree(Layer *node, GContext *ctx) { const Layer *levels_layer = stack[level]; if (levels_layer->clips) { const GRect levels_layer_frame_in_ctx_space = { - .origin = { - // drawing_box is expected to be setup as the bounds of the parent: - .x = ctx->draw_state.drawing_box.origin.x + levels_layer->frame.origin.x, - .y = ctx->draw_state.drawing_box.origin.y + levels_layer->frame.origin.y, - }, + .origin = + { + // drawing_box is expected to be setup as the bounds of the parent: + .x = ctx->draw_state.drawing_box.origin.x + levels_layer->frame.origin.x, + .y = ctx->draw_state.drawing_box.origin.y + levels_layer->frame.origin.y, + }, .size = levels_layer->frame.size, }; grect_clip(&ctx->draw_state.clip_box, &levels_layer_frame_in_ctx_space); @@ -235,13 +236,13 @@ void layer_render_tree(Layer *node, GContext *ctx) { if (ctx->lock) { graphics_release_frame_buffer(ctx, &ctx->dest_bitmap); APP_LOG(APP_LOG_LEVEL_WARNING, - "Frame buffer was not released. " - "Make sure to call graphics_release_frame_buffer before leaving update_proc."); + "Frame buffer was not released. " + "Make sure to call graphics_release_frame_buffer before leaving update_proc."); } descend = true; } -node_hidden_do_not_descend: + node_hidden_do_not_descend: node = prv_layer_tree_traverse_next(stack, LAYER_TREE_STACK_SIZE, ¤t_depth, descend); ctx->draw_state = root_draw_state; @@ -275,8 +276,7 @@ void layer_set_frame(Layer *layer, const GRect *frame) { // This is not a necessity, but supposedly a handy thing. const int16_t visible_width = layer->bounds.size.w + layer->bounds.origin.x; const int16_t visible_height = layer->bounds.size.h + layer->bounds.origin.y; - if (frame->size.w > visible_width || - frame->size.h > visible_height) { + if (frame->size.w > visible_width || frame->size.h > visible_height) { layer->bounds.size.w += MAX(frame->size.w - visible_width, 0); layer->bounds.size.h += MAX(frame->size.h - visible_height, 0); } @@ -513,7 +513,7 @@ bool layer_get_clips(const Layer *layer) { return layer->clips; } -void* layer_get_data(const Layer *layer) { +void *layer_get_data(const Layer *layer) { if (!layer->has_data) { PBL_LOG_ERR("Layer was not allocated with a data region."); return NULL; @@ -543,15 +543,15 @@ GPoint layer_convert_point_to_screen(const Layer *layer, GPoint point) { GRect layer_convert_rect_to_screen(const Layer *layer, GRect rect) { return (GRect){ - .origin = layer_convert_point_to_screen(layer, rect.origin), - .size = rect.size, + .origin = layer_convert_point_to_screen(layer, rect.origin), + .size = rect.size, }; } void layer_get_global_frame(const Layer *layer, GRect *global_frame_out) { - *global_frame_out = (GRect) { - .origin = layer_convert_point_to_screen(layer, GPointZero), - .size = layer->frame.size, + *global_frame_out = (GRect){ + .origin = layer_convert_point_to_screen(layer, GPointZero), + .size = layer->frame.size, }; } @@ -612,7 +612,7 @@ MOCKABLE Layer *layer_find_layer_containing_point(const Layer *node, const GPoin return NULL; } LayerTouchIteratorCtx iter_ctx = { - .pos = *point, + .pos = *point, }; gpoint_sub(iter_ctx.pos, node->frame.origin); prv_find_layer_containing_point(node, &iter_ctx); diff --git a/src/fw/applib/ui/layer.h b/src/fw/applib/ui/layer.h index bb101e4042..7e12edad04 100644 --- a/src/fw/applib/ui/layer.h +++ b/src/fw/applib/ui/layer.h @@ -25,11 +25,11 @@ struct Animation; //! necessary to draw or redraw the object that it represents and uses graphics routines along with //! this state to draw itself when asked. Layers can be used to display various graphics. //! -//! Layers are the basic building blocks for your application UI. Layers can be nested inside each other. -//! Every window has a root layer which is always the topmost layer. -//! You provide a function that is called to draw the content of the layer when needed; or -//! you can use standard layers that are provided by the system, such as text layer, image layer, -//! menu layer, action bar layer, and so on. +//! Layers are the basic building blocks for your application UI. Layers can be nested inside each +//! other. Every window has a root layer which is always the topmost layer. You provide a function +//! that is called to draw the content of the layer when needed; or you can use standard layers that +//! are provided by the system, such as text layer, image layer, menu layer, action bar layer, and +//! so on. //! //! The Pebble layer hierarchy is the list of things that need to be drawn to the screen. //! Multiple layers can be arranged into a hierarchy. This enables ordering (front to back), @@ -63,7 +63,7 @@ struct Animation; //! @param ctx The destination graphics context to draw into //! @see \ref Graphics //! @see \ref layer_set_update_proc() -typedef void (*LayerUpdateProc)(struct Layer *layer, GContext* ctx); +typedef void (*LayerUpdateProc)(struct Layer *layer, GContext *ctx); typedef void (*PropertyChangedProc)(struct Layer *layer); @@ -97,10 +97,10 @@ typedef struct Layer { union { uint8_t flags; struct { - bool clips:1; - bool hidden:1; - bool has_data:1; - bool is_highlighted:1; //!< Indicates the highlight status of a \ref MenuLayer cell + bool clips : 1; + bool hidden : 1; + bool has_data : 1; + bool is_highlighted : 1; //!< Indicates the highlight status of a \ref MenuLayer cell }; }; @@ -154,7 +154,7 @@ void layer_init(Layer *layer, const GRect *frame); //! @see \ref layer_set_bounds() //! @return A pointer to the layer. `NULL` if the layer could not //! be created -Layer* layer_create(GRect frame); +Layer *layer_create(GRect frame); //! Creates a layer on the heap with extra space for callback data, and set its frame andbounds. //! Default values: @@ -168,12 +168,12 @@ Layer* layer_create(GRect frame); //! @see \ref layer_set_frame() //! @see \ref layer_set_bounds() //! @return A pointer to the layer. `NULL` if the layer could not be created -Layer* layer_create_with_data(GRect frame, size_t data_size); +Layer *layer_create_with_data(GRect frame, size_t data_size); void layer_deinit(Layer *layer); //! Destroys a layer previously created by layer_create -void layer_destroy(Layer* layer); +void layer_destroy(Layer *layer); //! @internal //! Renders a tree of layers to a graphics context @@ -189,7 +189,8 @@ void layer_property_changed_tree(Layer *root); //! * The layer's `.update_proc` will not be called before this function returns, //! but will be called asynchronously, shortly. //! * Internally, a call to this function will schedule a re-render of the window that the -//! layer belongs to. In effect, all layers in that window's layer hierarchy will be asked to redraw. +//! layer belongs to. In effect, all layers in that window's layer hierarchy will be asked to +//! redraw. //! * If an earlier re-render request is still pending, this function is a no-op. //! @param layer The layer to mark dirty void layer_mark_dirty(Layer *layer); @@ -198,9 +199,9 @@ void layer_mark_dirty(Layer *layer); //! The system will call the `update_proc` automatically when the layer needs to redraw itself, see //! also \ref layer_mark_dirty(). //! @param layer Pointer to the layer structure. -//! @param update_proc Pointer to the function that will be called when the layer needs to be rendered. -//! Typically, one performs a series of drawing commands in the implementation of the `update_proc`, -//! see \ref Drawing, \ref PathDrawing and \ref TextDrawing. +//! @param update_proc Pointer to the function that will be called when the layer needs to be +//! rendered. Typically, one performs a series of drawing commands in the implementation of the +//! `update_proc`, see \ref Drawing, \ref PathDrawing and \ref TextDrawing. void layer_set_update_proc(Layer *layer, LayerUpdateProc update_proc); //! Sets the frame of the layer, which is it's bounding box relative to the coordinate @@ -322,7 +323,7 @@ bool layer_get_clips(const Layer *layer); //! Gets the data from a layer that has been created with an extra data region. //! @param layer The layer to get the data region from. //! @return A void pointer to the data region. -void* layer_get_data(const Layer *layer); +void *layer_get_data(const Layer *layer); //! Converts a point from the layer's local coordinate system to screen coordinates. //! @note If the layer isn't part of the view hierarchy the result is undefined. @@ -412,4 +413,3 @@ typedef enum { //! @} // end addtogroup Layer //! @} // end addtogroup UI - diff --git a/src/fw/applib/ui/layer_private.h b/src/fw/applib/ui/layer_private.h index 10dd3935b1..1048824b8a 100644 --- a/src/fw/applib/ui/layer_private.h +++ b/src/fw/applib/ui/layer_private.h @@ -3,8 +3,8 @@ #include "layer.h" -Layer *__layer_tree_traverse_next__test_accessor(Layer *stack[], - int const max_depth, uint8_t *current_depth, const bool descend); +Layer *__layer_tree_traverse_next__test_accessor(Layer *stack[], int const max_depth, + uint8_t *current_depth, const bool descend); typedef bool (*LayerIteratorFunc)(Layer *layer, void *ctx); diff --git a/src/fw/applib/ui/menu_cell_layer.h b/src/fw/applib/ui/menu_cell_layer.h index 2769300f59..0e82567d83 100644 --- a/src/fw/applib/ui/menu_cell_layer.h +++ b/src/fw/applib/ui/menu_cell_layer.h @@ -68,7 +68,7 @@ void menu_cell_layer_draw(GContext *ctx, const Layer *cell_layer, //! @param icon If non-null, draws an icon to the left of the text. If `NULL`, //! the icon will be omitted and the leftover space is used for the title and //! subtitle. -void menu_cell_basic_draw(GContext* ctx, const Layer *cell_layer, const char *title, +void menu_cell_basic_draw(GContext *ctx, const Layer *cell_layer, const char *title, const char *subtitle, GBitmap *icon); //! Cell drawing function similar to \ref menu_cell_basic_draw with the icon drawn on the right @@ -85,7 +85,7 @@ void menu_cell_basic_draw(GContext* ctx, const Layer *cell_layer, const char *ti //! @param icon If non-null, draws an icon to the right of the text. If `NULL`, //! the icon will be omitted and the leftover space is used for the title and //! subtitle. -void menu_cell_basic_draw_icon_right(GContext* ctx, const Layer *cell_layer, const char *title, +void menu_cell_basic_draw_icon_right(GContext *ctx, const Layer *cell_layer, const char *title, const char *subtitle, GBitmap *icon); //! Cell drawing function to draw a basic menu cell layout with title, subtitle @@ -96,12 +96,12 @@ void menu_cell_basic_draw_icon_right(GContext* ctx, const Layer *cell_layer, con //! @param cell_layer The layer of the cell to draw //! @param title If non-null, draws a title in larger text (28 points, bold //! Raster Gothic system font). -void menu_cell_title_draw(GContext* ctx, const Layer *cell_layer, const char *title); +void menu_cell_title_draw(GContext *ctx, const Layer *cell_layer, const char *title); //! @internal //! Cell drawing function similar to \ref menu_cell_basic_draw_with_value and //! \ref menu_cell_basic_draw_icon_right, except with specifiable fonts. -void menu_cell_basic_draw_custom(GContext* ctx, const Layer *cell_layer, GFont const title_font, +void menu_cell_basic_draw_custom(GContext *ctx, const Layer *cell_layer, GFont const title_font, const char *title, GFont const value_font, const char *value, GFont const subtitle_font, const char *subtitle, GBitmap *icon, bool icon_on_right, GTextOverflowMode overflow_mode); @@ -114,7 +114,7 @@ void menu_cell_basic_draw_custom(GContext* ctx, const Layer *cell_layer, GFont c //! @param cell_layer The layer of the cell to draw //! @param title If non-null, draws the title in small text (14 points, bold //! Raster Gothic system font). -void menu_cell_basic_header_draw(GContext* ctx, const Layer *cell_layer, const char *title); +void menu_cell_basic_header_draw(GContext *ctx, const Layer *cell_layer, const char *title); //! Returns whether or not the given cell layer is highlighted. //! Using this for determining highlight behaviour is preferable to using @@ -130,33 +130,33 @@ int16_t menu_cell_basic_cell_height(void); //! Constant value representing \ref MenuLayer short cell height when this item is //! the selected item on a round display. -#define MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT ((const int16_t) 68) +#define MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT ((const int16_t)68) //! Constant value representing \ref MenuLayer short cell height when this item is //! not the selected item on a round display. -#define MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT ((const int16_t) 24) +#define MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT ((const int16_t)24) //! Constant value representing \ref MenuLayer tall cell height when this item is //! the selected item on a round display. -#define MENU_CELL_ROUND_FOCUSED_TALL_CELL_HEIGHT ((const int16_t) 84) +#define MENU_CELL_ROUND_FOCUSED_TALL_CELL_HEIGHT ((const int16_t)84) //! Constant value representing \ref MenuLayer tall cell height when this item is //! not the selected item on a round display. -#define MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT ((const int16_t) 32) +#define MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT ((const int16_t)32) //! "Small" cell height in pixels. int16_t menu_cell_small_cell_height(void); //! Default section header height in pixels -#define MENU_CELL_BASIC_HEADER_HEIGHT ((const int16_t) 16) +#define MENU_CELL_BASIC_HEADER_HEIGHT ((const int16_t)16) //! Default menu separator height in pixels -#define MENU_CELL_BASIC_SEPARATOR_HEIGHT ((const int16_t) 0) +#define MENU_CELL_BASIC_SEPARATOR_HEIGHT ((const int16_t)0) //! Default cell horizontal inset in pixels. int16_t menu_cell_basic_horizontal_inset(void); -#define MENU_CELL_ROUND_FOCUSED_HORIZONTAL_INSET ((const int16_t) 16) -#define MENU_CELL_ROUND_UNFOCUSED_HORIZONTAL_INSET ((const int16_t) 34) +#define MENU_CELL_ROUND_FOCUSED_HORIZONTAL_INSET ((const int16_t)16) +#define MENU_CELL_ROUND_UNFOCUSED_HORIZONTAL_INSET ((const int16_t)34) //! @} // end addtogroup MenuLayer //! @} // end addtogroup Layer diff --git a/src/fw/applib/ui/menu_layer.c b/src/fw/applib/ui/menu_layer.c index 14654408c4..0bc7ca87c2 100644 --- a/src/fw/applib/ui/menu_layer.c +++ b/src/fw/applib/ui/menu_layer.c @@ -50,11 +50,11 @@ static bool prv_cancel_selection_animation(MenuLayer *menu_layer); ////////////////////// // Menu Layer // -// NOTES: The MenuLayer is built on top of ScrollLayer. It uses ScrollLayer's scrolling and clipping features. -// Since it easily becomes to costly in terms of RAM to hold a layer for each row in the menu in memory, -// the MenuLayer does not use layers for its rows and headers. When a row is about to be displayed, -// it will call out to the client using a callback to get that row drawn. -// Inside the MenuLayer's update_proc (Layer drawing callback), it will call out to its client for each row +// NOTES: The MenuLayer is built on top of ScrollLayer. It uses ScrollLayer's scrolling and clipping +// features. Since it easily becomes to costly in terms of RAM to hold a layer for each row in the +// menu in memory, the MenuLayer does not use layers for its rows and headers. When a row is about +// to be displayed, it will call out to the client using a callback to get that row drawn. Inside +// the MenuLayer's update_proc (Layer drawing callback), it will call out to its client for each row // that needs to be drawn, until all visible rows have been drawn. //! How long the scrollbar overlay stays visible after the last touch scroll movement. @@ -93,8 +93,8 @@ static void prv_scrollbar_kick(MenuLayer *menu_layer) { if (!menu_layer->scrollbar_hide_timer || !app_timer_reschedule(menu_layer->scrollbar_hide_timer, MENU_LAYER_SCROLLBAR_HIDE_TIMEOUT_MS)) { - menu_layer->scrollbar_hide_timer = app_timer_register( - MENU_LAYER_SCROLLBAR_HIDE_TIMEOUT_MS, prv_scrollbar_hide_timer_cb, menu_layer); + menu_layer->scrollbar_hide_timer = app_timer_register(MENU_LAYER_SCROLLBAR_HIDE_TIMEOUT_MS, + prv_scrollbar_hide_timer_cb, menu_layer); } } #endif // CONFIG_TOUCH @@ -129,14 +129,14 @@ T_STATIC bool prv_scrollbar_thumb_angles(MenuLayer *menu_layer, int16_t content_ static void prv_scrollbar_fill_capped_arc(GContext *ctx, GPoint center, uint16_t radius_outer, uint16_t thickness, int32_t angle_start, int32_t angle_end) { - graphics_fill_radial_internal(ctx, center, radius_outer - thickness, radius_outer, - angle_start, angle_end); + graphics_fill_radial_internal(ctx, center, radius_outer - thickness, radius_outer, angle_start, + angle_end); const int32_t radius_mid = radius_outer - (thickness / 2); - const int32_t angles[2] = { angle_start, angle_end }; + const int32_t angles[2] = {angle_start, angle_end}; for (size_t i = 0; i < ARRAY_LENGTH(angles); i++) { - const GPoint cap = GPoint( - center.x + (int16_t)((radius_mid * sin_lookup(angles[i])) / TRIG_MAX_RATIO), - center.y - (int16_t)((radius_mid * cos_lookup(angles[i])) / TRIG_MAX_RATIO)); + const GPoint cap = + GPoint(center.x + (int16_t)((radius_mid * sin_lookup(angles[i])) / TRIG_MAX_RATIO), + center.y - (int16_t)((radius_mid * cos_lookup(angles[i])) / TRIG_MAX_RATIO)); graphics_fill_circle(ctx, cap, thickness / 2); } } @@ -167,11 +167,11 @@ static void prv_scrollbar_draw(MenuLayer *menu_layer, GContext *ctx, int16_t con // provides the contrast backing for the thumb, so no halo is needed. const int32_t track_start = DEG_TO_TRIGANGLE(90) - (MENU_LAYER_SCROLLBAR_TRACK_SWEEP / 2); graphics_context_set_fill_color(ctx, prv_scrollbar_track_color(menu_layer)); - prv_scrollbar_fill_capped_arc(ctx, center, radius_outer, MENU_LAYER_SCROLLBAR_WIDTH, - track_start, track_start + MENU_LAYER_SCROLLBAR_TRACK_SWEEP); + prv_scrollbar_fill_capped_arc(ctx, center, radius_outer, MENU_LAYER_SCROLLBAR_WIDTH, track_start, + track_start + MENU_LAYER_SCROLLBAR_TRACK_SWEEP); graphics_context_set_fill_color(ctx, menu_layer->normal_colors[MenuLayerColorForeground]); - prv_scrollbar_fill_capped_arc(ctx, center, radius_outer, MENU_LAYER_SCROLLBAR_WIDTH, - angle_start, angle_end); + prv_scrollbar_fill_capped_arc(ctx, center, radius_outer, MENU_LAYER_SCROLLBAR_WIDTH, angle_start, + angle_end); } #else //! Scrollbar thumb rect in content-space coordinates (the space menu_layer_update_proc draws in). @@ -187,8 +187,8 @@ T_STATIC GRect prv_scrollbar_thumb_rect(MenuLayer *menu_layer, int16_t content_t MENU_LAYER_SCROLLBAR_MIN_THUMB_HEIGHT, track_h); // Center-focused menus over-scroll past the ends (offset clipping disabled); clamp to the track. const int16_t progress_y = CLIP(content_top_y, 0, scrollable_h); - const int16_t thumb_y = MENU_LAYER_SCROLLBAR_MARGIN + - (((int32_t)(track_h - thumb_h) * progress_y) / scrollable_h); + const int16_t thumb_y = + MENU_LAYER_SCROLLBAR_MARGIN + (((int32_t)(track_h - thumb_h) * progress_y) / scrollable_h); return GRect(frame_size.w - MENU_LAYER_SCROLLBAR_MARGIN - MENU_LAYER_SCROLLBAR_WIDTH, content_top_y + thumb_y, MENU_LAYER_SCROLLBAR_WIDTH, thumb_h); } @@ -255,10 +255,10 @@ static void prv_menu_select_click_handler(ClickRecognizerRef recognizer, MenuLay } static void prv_menu_select_long_click_handler(ClickRecognizerRef recognizer, - MenuLayer *menu_layer) { + MenuLayer *menu_layer) { if (menu_layer->callbacks.select_long_click) { menu_layer->callbacks.select_long_click(menu_layer, &menu_layer->selection.index, - menu_layer->callback_context); + menu_layer->callback_context); } } @@ -280,10 +280,10 @@ static bool prv_menu_index_is_last_index(MenuLayer *menu_layer, const MenuIndex } static void prv_vibe_pulse(void) { - uint32_t const segments[] = { 50 }; + uint32_t const segments[] = {50}; VibePattern pat = { - .durations = segments, - .num_segments = ARRAY_LENGTH(segments), + .durations = segments, + .num_segments = ARRAY_LENGTH(segments), }; vibes_enqueue_custom_pattern(pat); } @@ -293,8 +293,10 @@ static void prv_vibe_pulse(void) { //! @param recognizer reference to the ClickRecognizer struct //! @param scrolling_up `true` if scrolling up, `false` if scrolling down //! @return `true` if a wrap around has been applied -static bool prv_menu_scroll_handle_wrap_around(MenuLayer *menu_layer, ClickRecognizerRef recognizer, bool scrolling_up) { - const uint8_t current_scroll_action = scrolling_up ? MenuLayerRepeatScrollingUp : MenuLayerRepeatScrollingDown; +static bool prv_menu_scroll_handle_wrap_around(MenuLayer *menu_layer, ClickRecognizerRef recognizer, + bool scrolling_up) { + const uint8_t current_scroll_action = + scrolling_up ? MenuLayerRepeatScrollingUp : MenuLayerRepeatScrollingDown; const bool is_repeating = click_recognizer_is_repeating(recognizer); if (is_repeating) { @@ -321,8 +323,7 @@ static bool prv_menu_scroll_handle_wrap_around(MenuLayer *menu_layer, ClickRecog // Honor selection_will_change, like normal scrolling does, so the wrap // destination can be redirected away from non-selectable rows. - MenuLayerSelectionWillChangeCallback will_change_cb = - menu_layer->callbacks.selection_will_change; + MenuLayerSelectionWillChangeCallback will_change_cb = menu_layer->callbacks.selection_will_change; if (will_change_cb) { MenuIndex new_index = *wraparound_dest_index; will_change_cb(menu_layer, &new_index, current_index, menu_layer->callback_context); @@ -343,27 +344,29 @@ static bool prv_menu_scroll_handle_wrap_around(MenuLayer *menu_layer, ClickRecog #ifdef CONFIG_TOUCH // After a free pixel scroll (touch), the logical selection can drift off-screen while the visible -// content is elsewhere. Stepping UP/DOWN from that off-screen selection teleports it across the list. -// If the selection is not visible in the viewport, reselect the row nearest the viewport centre first -// (no activation, MenuRowAlignNone leaves a free-scrolled list where it is; center_focused menus keep -// their centre invariant regardless); the caller then steps from there. -// When the selection is already visible, this is a no-op so on-screen menus behave exactly as before. +// content is elsewhere. Stepping UP/DOWN from that off-screen selection teleports it across the +// list. If the selection is not visible in the viewport, reselect the row nearest the viewport +// centre first (no activation, MenuRowAlignNone leaves a free-scrolled list where it is; +// center_focused menus keep their centre invariant regardless); the caller then steps from there. +// When the selection is already visible, this is a no-op so on-screen menus behave exactly as +// before. static void prv_menu_reconcile_selection_before_step(MenuLayer *menu_layer) { - // Only a free pixel scroll (pan) leaves the selection off-screen with a SETTLED offset. A button or - // programmatic step animates the SCROLL offset toward the selection; while that scroll animation is - // in flight the offset legitimately lags the selection, and pulling to centre would fight the - // settling step. Gate on the scroll animation specifically, not the highlight animation: a pan - // leaves the scroll offset settled even while a just-tapped row's highlight animation is still - // running, and that case must still reconcile. animation_is_scheduled() is NULL-safe (false). - Animation *scroll_animation = (Animation *) menu_layer->scroll_layer.animation; + // Only a free pixel scroll (pan) leaves the selection off-screen with a SETTLED offset. A button + // or programmatic step animates the SCROLL offset toward the selection; while that scroll + // animation is in flight the offset legitimately lags the selection, and pulling to centre would + // fight the settling step. Gate on the scroll animation specifically, not the highlight + // animation: a pan leaves the scroll offset settled even while a just-tapped row's highlight + // animation is still running, and that case must still reconcile. animation_is_scheduled() is + // NULL-safe (false). + Animation *scroll_animation = (Animation *)menu_layer->scroll_layer.animation; if (animation_is_scheduled(scroll_animation)) { return; } const int16_t offset_y = scroll_layer_get_content_offset(&menu_layer->scroll_layer).y; const int16_t frame_h = menu_layer->scroll_layer.layer.frame.size.h; - // A content point content_y appears at frame_y = content_y + offset_y; the selected row is visible - // iff its frame-y range overlaps [0, frame_h]. + // A content point content_y appears at frame_y = content_y + offset_y; the selected row is + // visible iff its frame-y range overlaps [0, frame_h]. const bool selection_visible = (menu_layer->selection.y + offset_y + menu_layer->selection.h > 0) && (menu_layer->selection.y + offset_y < frame_h); @@ -382,7 +385,8 @@ static void prv_menu_reconcile_selection_before_step(MenuLayer *menu_layer) { void menu_up_click_handler(ClickRecognizerRef recognizer, MenuLayer *menu_layer) { const bool up = true; - if (menu_layer->scroll_wrap_around && prv_menu_scroll_handle_wrap_around(menu_layer, recognizer, up)) { + if (menu_layer->scroll_wrap_around && + prv_menu_scroll_handle_wrap_around(menu_layer, recognizer, up)) { return; } #ifdef CONFIG_TOUCH @@ -394,15 +398,16 @@ void menu_up_click_handler(ClickRecognizerRef recognizer, MenuLayer *menu_layer) menu_layer_set_selected_next(menu_layer, up, MenuRowAlignCenter, animated); MenuIndex current_index = menu_layer->selection.index; if ((menu_layer->scroll_vibe_on_blocked) && - (menu_index_compare(¤t_index, &prev_index) == 0) && - (prv_menu_index_is_first_index(menu_layer, ¤t_index))) { - prv_vibe_pulse(); + (menu_index_compare(¤t_index, &prev_index) == 0) && + (prv_menu_index_is_first_index(menu_layer, ¤t_index))) { + prv_vibe_pulse(); } } void menu_down_click_handler(ClickRecognizerRef recognizer, MenuLayer *menu_layer) { const bool up = false; - if (menu_layer->scroll_wrap_around && prv_menu_scroll_handle_wrap_around(menu_layer, recognizer, up)) { + if (menu_layer->scroll_wrap_around && + prv_menu_scroll_handle_wrap_around(menu_layer, recognizer, up)) { return; } #ifdef CONFIG_TOUCH @@ -414,9 +419,9 @@ void menu_down_click_handler(ClickRecognizerRef recognizer, MenuLayer *menu_laye menu_layer_set_selected_next(menu_layer, up, MenuRowAlignCenter, animated); MenuIndex current_index = menu_layer->selection.index; if ((menu_layer->scroll_vibe_on_blocked) && - (menu_index_compare(¤t_index, &prev_index) == 0) && - (prv_menu_index_is_last_index(menu_layer, ¤t_index))) { - prv_vibe_pulse(); + (menu_index_compare(¤t_index, &prev_index) == 0) && + (prv_menu_index_is_last_index(menu_layer, ¤t_index))) { + prv_vibe_pulse(); } } @@ -424,23 +429,23 @@ static void prv_menu_click_config_provider(MenuLayer *menu_layer) { // The config that gets passed in, has already the UP and DOWN buttons configured // we're overriding the default behavior here: window_single_repeating_click_subscribe(BUTTON_ID_UP, 100 /*ms*/, - (ClickHandler)menu_up_click_handler); + (ClickHandler)menu_up_click_handler); if (menu_layer->callbacks.select_click) { window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler)prv_menu_select_click_handler); } if (menu_layer->callbacks.select_long_click) { window_long_click_subscribe(BUTTON_ID_SELECT, 0, - (ClickHandler)prv_menu_select_long_click_handler, NULL); + (ClickHandler)prv_menu_select_long_click_handler, NULL); } window_single_repeating_click_subscribe(BUTTON_ID_DOWN, 100 /*ms*/, - (ClickHandler)menu_down_click_handler); + (ClickHandler)menu_down_click_handler); } static inline uint16_t prv_menu_layer_get_num_sections(MenuLayer *menu_layer) { if (menu_layer->callbacks.get_num_sections) { return menu_layer->callbacks.get_num_sections(menu_layer, menu_layer->callback_context); } else { - return 1; // default + return 1; // default } } @@ -451,16 +456,17 @@ static inline uint16_t prv_menu_layer_get_num_rows(MenuLayer *menu_layer, uint16 if (menu_layer->callbacks.get_num_rows) { return menu_layer->callbacks.get_num_rows(menu_layer, section_index, - menu_layer->callback_context); + menu_layer->callback_context); } else { return 1; // default } } static inline int16_t prv_menu_layer_get_separator_height(MenuLayer *menu_layer, - MenuIndex *cell_index) { + MenuIndex *cell_index) { if (menu_layer->callbacks.get_separator_height) { - return menu_layer->callbacks.get_separator_height(menu_layer, cell_index, menu_layer->callback_context); + return menu_layer->callbacks.get_separator_height(menu_layer, cell_index, + menu_layer->callback_context); } else if (process_manager_compiled_with_legacy2_sdk()) { return MENU_CELL_LEGACY2_BASIC_SEPARATOR_HEIGHT; } else { @@ -469,23 +475,24 @@ static inline int16_t prv_menu_layer_get_separator_height(MenuLayer *menu_layer, } static inline int16_t prv_menu_layer_get_header_height(MenuLayer *menu_layer, - uint16_t section_index) { + uint16_t section_index) { if (menu_layer->callbacks.get_header_height) { - return menu_layer->callbacks.get_header_height(menu_layer, section_index, menu_layer->callback_context); + return menu_layer->callbacks.get_header_height(menu_layer, section_index, + menu_layer->callback_context); } else { - return 0; // default + return 0; // default } } -static inline int16_t prv_menu_layer_get_cell_height(MenuLayer *menu_layer, MenuIndex - *cell_index, bool provide_correct_selection_index) { +static inline int16_t prv_menu_layer_get_cell_height(MenuLayer *menu_layer, MenuIndex *cell_index, + bool provide_correct_selection_index) { if (menu_layer->callbacks.get_cell_height) { const MenuIndex prev_selection_index = menu_layer->selection.index; if (!provide_correct_selection_index) { menu_layer->selection.index.section = MENU_INDEX_NOT_FOUND; } - const int16_t result = menu_layer->callbacks.get_cell_height(menu_layer, cell_index, - menu_layer->callback_context); + const int16_t result = + menu_layer->callbacks.get_cell_height(menu_layer, cell_index, menu_layer->callback_context); menu_layer->selection.index = prev_selection_index; return result; @@ -495,7 +502,7 @@ static inline int16_t prv_menu_layer_get_cell_height(MenuLayer *menu_layer, Menu } static inline void prv_menu_layer_draw_separator(MenuLayer *menu_layer, Layer *cell_layer, - MenuCellSpan *cursor, GContext* ctx) { + MenuCellSpan *cursor, GContext *ctx) { const int16_t y = cursor->y - cursor->sep; if (menu_layer->callbacks.draw_separator) { // Save current drawing state: @@ -512,7 +519,8 @@ static inline void prv_menu_layer_draw_separator(MenuLayer *menu_layer, Layer *c layer_set_bounds(cell_layer, &new_bounds); // Call the client, to ask to draw the separator: - menu_layer->callbacks.draw_separator(ctx, cell_layer, &cursor->index, menu_layer->callback_context); + menu_layer->callbacks.draw_separator(ctx, cell_layer, &cursor->index, + menu_layer->callback_context); // Restore current drawing state: graphics_context_set_drawing_state(ctx, prev_state); @@ -520,13 +528,13 @@ static inline void prv_menu_layer_draw_separator(MenuLayer *menu_layer, Layer *c // Restore the layer bounds: layer_set_bounds(cell_layer, &prev_bounds); } else { - graphics_fill_rect( - ctx, &GRect(0, y, menu_layer->scroll_layer.layer.bounds.size.w, cursor->sep)); + graphics_fill_rect(ctx, + &GRect(0, y, menu_layer->scroll_layer.layer.bounds.size.w, cursor->sep)); } } -static void prv_prepare_row(GContext *ctx, MenuLayer *menu_layer, - Layer *cell_layer, bool highlight) { +static void prv_prepare_row(GContext *ctx, MenuLayer *menu_layer, Layer *cell_layer, + bool highlight) { if (!process_manager_compiled_with_legacy2_sdk()) { GColor *colors = (highlight) ? menu_layer->highlight_colors : menu_layer->normal_colors; ctx->draw_state.fill_color = colors[MenuLayerColorBackground]; @@ -539,8 +547,8 @@ static void prv_prepare_row(GContext *ctx, MenuLayer *menu_layer, cell_layer->is_highlighted = highlight; } -static void prv_prepare_and_draw_row(GContext *ctx, MenuLayer *menu_layer, - Layer *cell_layer, MenuCellSpan *cursor, bool highlight) { +static void prv_prepare_and_draw_row(GContext *ctx, MenuLayer *menu_layer, Layer *cell_layer, + MenuCellSpan *cursor, bool highlight) { prv_prepare_row(ctx, menu_layer, cell_layer, highlight); const GRect prev_bounds = cell_layer->bounds; @@ -557,7 +565,7 @@ static void prv_prepare_and_draw_row(GContext *ctx, MenuLayer *menu_layer, } static inline void prv_menu_layer_draw_row(MenuLayer *menu_layer, Layer *cell_layer, - MenuCellSpan *cursor, GContext* ctx) { + MenuCellSpan *cursor, GContext *ctx) { if (cursor->h == 0) { // cell has height 0, no need to draw anything. return; @@ -602,7 +610,7 @@ static inline void prv_menu_layer_draw_row(MenuLayer *menu_layer, Layer *cell_la } static inline void prv_menu_layer_draw_section_header(MenuLayer *menu_layer, Layer *cell_layer, - MenuCellSpan *cursor, GContext* ctx) { + MenuCellSpan *cursor, GContext *ctx) { cell_layer->bounds.size.h = cursor->h; cell_layer->frame.size.h = cursor->h; cell_layer->frame.origin.y = cursor->y; @@ -622,16 +630,18 @@ static inline void prv_menu_layer_draw_section_header(MenuLayer *menu_layer, Lay prv_prepare_row(ctx, menu_layer, cell_layer, false); // Call the client, to ask to draw the section: - menu_layer->callbacks.draw_header(ctx, cell_layer, cursor->index.section, menu_layer->callback_context); + menu_layer->callbacks.draw_header(ctx, cell_layer, cursor->index.section, + menu_layer->callback_context); // Restore current drawing state: graphics_context_set_drawing_state(ctx, prev_state); } static void prv_menu_layer_render_section_from_iterator(MenuIterator *iterator) { - MenuRenderIterator *it = (MenuRenderIterator*)iterator; + MenuRenderIterator *it = (MenuRenderIterator *)iterator; const int16_t top_diff = it->it.cursor.y - it->content_top_y; - const bool is_header_in_frame = (top_diff >= 0 && it->it.cursor.y <= it->content_bottom_y) || + const bool is_header_in_frame = + (top_diff >= 0 && it->it.cursor.y <= it->content_bottom_y) || (it->it.cell_bottom_y >= it->content_top_y && it->it.cell_bottom_y <= it->content_bottom_y); if (is_header_in_frame) { // Draw section header: @@ -644,11 +654,12 @@ static void prv_menu_layer_render_section_from_iterator(MenuIterator *iterator) } static void prv_menu_layer_render_row_from_iterator(MenuIterator *iterator) { - MenuRenderIterator *it = (MenuRenderIterator*)iterator; + MenuRenderIterator *it = (MenuRenderIterator *)iterator; const int16_t iter_y = it->it.cursor.y; const int16_t top_diff = it->it.cursor.y - it->content_top_y; - const bool is_row_in_frame = (top_diff >= 0 && it->it.cursor.y <= it->content_bottom_y) || + const bool is_row_in_frame = + (top_diff >= 0 && it->it.cursor.y <= it->content_bottom_y) || (it->it.cell_bottom_y >= it->content_top_y && it->it.cell_bottom_y <= it->content_bottom_y); if (is_row_in_frame) { it->cursor_in_frame = true; @@ -684,10 +695,10 @@ static void prv_menu_layer_render_row_from_iterator(MenuIterator *iterator) { static void prv_menu_layer_walk_downward_from_iterator(MenuIterator *it) { const uint16_t num_sections = prv_menu_layer_get_num_sections(it->menu_layer); it->should_continue = true; - for (;;) { // sections - const uint16_t num_rows_in_section = prv_menu_layer_get_num_rows(it->menu_layer, - it->cursor.index.section); - for (;;) { // rows + for (;;) { // sections + const uint16_t num_rows_in_section = + prv_menu_layer_get_num_rows(it->menu_layer, it->cursor.index.section); + for (;;) { // rows if (it->cursor.index.row >= num_rows_in_section) { // Reached last row break; @@ -710,16 +721,18 @@ static void prv_menu_layer_walk_downward_from_iterator(MenuIterator *it) { // Next row: it->cursor.sep = prv_menu_layer_get_separator_height(it->menu_layer, &it->cursor.index); - it->cursor.y = it->cell_bottom_y; // Bottom of previous cell is y of the next cell + it->cursor.y = it->cell_bottom_y; // Bottom of previous cell is y of the next cell // Don't leave space for the separator for the (non-existent) row after the last row. - // This doesn't impact cell drawing in this loop (this condition will only trip on the last run). - // But, other parts of the system rely on the cursor being set properly at the end of this iteration. - if (it->cursor.index.row < num_rows_in_section - 1 || it->cursor.index.section < num_sections - 1) { + // This doesn't impact cell drawing in this loop (this condition will only trip on the last + // run). But, other parts of the system rely on the cursor being set properly at the end of + // this iteration. + if (it->cursor.index.row < num_rows_in_section - 1 || + it->cursor.index.section < num_sections - 1) { it->cursor.y += it->cursor.sep; } ++(it->cursor.index.row); - } // for() rows + } // for() rows // Next section: ++(it->cursor.index.section); @@ -742,13 +755,13 @@ static void prv_menu_layer_walk_downward_from_iterator(MenuIterator *it) { return; } - } // for() sections + } // for() sections } static void prv_menu_layer_walk_upward_from_iterator(MenuIterator *it) { it->should_continue = true; - for (;;) { // sections - for (;;) { // rows + for (;;) { // sections + for (;;) { // rows // Previous row if (it->cursor.index.row == 0) { // Reached top-most row in current section @@ -778,7 +791,7 @@ static void prv_menu_layer_walk_upward_from_iterator(MenuIterator *it) { if (it->should_continue == false) { break; } - } // for() rows + } // for() rows if (it->cursor.index.row == 0) { // If top-most row, layout the section header @@ -814,14 +827,14 @@ static void prv_menu_layer_walk_upward_from_iterator(MenuIterator *it) { } --(it->cursor.index.section); // -1 will happen when entering for() rows - it->cursor.index.row = it->menu_layer->callbacks.get_num_rows(it->menu_layer, - it->cursor.index.section, it->menu_layer->callback_context); + it->cursor.index.row = it->menu_layer->callbacks.get_num_rows( + it->menu_layer, it->cursor.index.section, it->menu_layer->callback_context); - } // for() sections + } // for() sections } -static void NOINLINE prv_draw_background(MenuLayer *menu_layer, GContext *ctx, - Layer *bg_layer, bool highlight) { +static void NOINLINE prv_draw_background(MenuLayer *menu_layer, GContext *ctx, Layer *bg_layer, + bool highlight) { GDrawState prev_state = graphics_context_get_drawing_state(ctx); const GRect *bounds = &bg_layer->bounds; @@ -842,9 +855,9 @@ static void NOINLINE prv_draw_background(MenuLayer *menu_layer, GContext *ctx, graphics_context_set_drawing_state(ctx, prev_state); } -void menu_layer_update_proc(Layer *scroll_content_layer, GContext* ctx) { - MenuLayer *menu_layer = (MenuLayer*)(((uint8_t*)scroll_content_layer) - - offsetof(MenuLayer, scroll_layer.content_sublayer)); +void menu_layer_update_proc(Layer *scroll_content_layer, GContext *ctx) { + MenuLayer *menu_layer = (MenuLayer *)(((uint8_t *)scroll_content_layer) - + offsetof(MenuLayer, scroll_layer.content_sublayer)); const GSize frame_size = menu_layer->scroll_layer.layer.frame.size; const int16_t content_top_y = -scroll_layer_get_content_offset(&menu_layer->scroll_layer).y; const int16_t content_bottom_y = content_top_y + frame_size.h; @@ -868,30 +881,33 @@ void menu_layer_update_proc(Layer *scroll_content_layer, GContext* ctx) { menu_layer->cache.cursor = menu_layer->selection; } - *render_iter = (MenuRenderIterator) { - .it = { - .menu_layer = menu_layer, - .cursor = menu_layer->cache.cursor, - .row_callback_after_geometry = prv_menu_layer_render_row_from_iterator, - .section_callback = prv_menu_layer_render_section_from_iterator, - }, - .ctx = ctx, - .content_top_y = content_top_y, - .content_bottom_y = content_bottom_y, - .cache_set = false, - .cursor_in_frame = false, - .cell_layer = { - .bounds = { - .size = { - .w = frame_size.w, - }, + *render_iter = (MenuRenderIterator){ + .it = + { + .menu_layer = menu_layer, + .cursor = menu_layer->cache.cursor, + .row_callback_after_geometry = prv_menu_layer_render_row_from_iterator, + .section_callback = prv_menu_layer_render_section_from_iterator, + }, + .ctx = ctx, + .content_top_y = content_top_y, + .content_bottom_y = content_bottom_y, + .cache_set = false, + .cursor_in_frame = false, + .cell_layer = { + .bounds = + { + .size = + { + .w = frame_size.w, + }, + }, + .frame = { + .size = { + .w = frame_size.w, + }, + }, }, - .frame = { - .size = { - .w = frame_size.w, - }, - }, - }, }; layer_add_child(&menu_layer->scroll_layer.content_sublayer, &render_iter->cell_layer); @@ -926,10 +942,13 @@ void menu_layer_update_proc(Layer *scroll_content_layer, GContext* ctx) { void menu_layer_init_scroll_layer_callbacks(MenuLayer *menu_layer) { ScrollLayer *scroll_layer = &menu_layer->scroll_layer; - scroll_layer_set_callbacks(scroll_layer, (ScrollLayerCallbacks) { - .click_config_provider = (ClickConfigProvider)prv_menu_click_config_provider, - .content_offset_changed_handler = (ScrollLayerCallback)prv_menu_scroll_offset_changed_handler, - }); + scroll_layer_set_callbacks( + scroll_layer, + (ScrollLayerCallbacks){ + .click_config_provider = (ClickConfigProvider)prv_menu_click_config_provider, + .content_offset_changed_handler = + (ScrollLayerCallback)prv_menu_scroll_offset_changed_handler, + }); scroll_layer->content_sublayer.update_proc = (LayerUpdateProc)menu_layer_update_proc; } @@ -939,8 +958,8 @@ static void prv_set_center_focused(MenuLayer *menu_layer, bool center_focused) { } void menu_layer_init(MenuLayer *menu_layer, const GRect *frame) { - *menu_layer = (MenuLayer) { - .pad_bottom = true, + *menu_layer = (MenuLayer){ + .pad_bottom = true, }; ScrollLayer *scroll_layer = &menu_layer->scroll_layer; @@ -974,7 +993,7 @@ void menu_layer_init(MenuLayer *menu_layer, const GRect *frame) { #endif } -MenuLayer* menu_layer_create(GRect frame) { +MenuLayer *menu_layer_create(GRect frame) { MenuLayer *layer = applib_type_malloc(MenuLayer); if (layer) { menu_layer_init(layer, &frame); @@ -998,7 +1017,7 @@ void menu_layer_deinit(MenuLayer *menu_layer) { scroll_layer_deinit(&menu_layer->scroll_layer); } -void menu_layer_destroy(MenuLayer* menu_layer) { +void menu_layer_destroy(MenuLayer *menu_layer) { if (menu_layer == NULL) { return; } @@ -1006,11 +1025,11 @@ void menu_layer_destroy(MenuLayer* menu_layer) { applib_free(menu_layer); } -Layer* menu_layer_get_layer(const MenuLayer *menu_layer) { +Layer *menu_layer_get_layer(const MenuLayer *menu_layer) { return &((MenuLayer *)menu_layer)->scroll_layer.layer; } -ScrollLayer* menu_layer_get_scroll_layer(const MenuLayer *menu_layer) { +ScrollLayer *menu_layer_get_scroll_layer(const MenuLayer *menu_layer) { return &((MenuLayer *)menu_layer)->scroll_layer; } @@ -1024,7 +1043,7 @@ static void prv_menu_layer_iterator_noop_callback(MenuIterator *it) { } static void prv_menu_layer_iterator_prime_cache_callback(MenuIterator *iterator) { - MenuPrimeCacheIterator *it = (MenuPrimeCacheIterator*)iterator; + MenuPrimeCacheIterator *it = (MenuPrimeCacheIterator *)iterator; if (false == it->cache_set) { // Prime the cursor cache: it->it.menu_layer->cache.cursor = it->it.cursor; @@ -1041,18 +1060,20 @@ void menu_layer_update_caches(MenuLayer *menu_layer) { // Save the currently selected cell index. MenuIndex selected_index = menu_layer_get_selected_index(menu_layer); MenuPrimeCacheIterator it = { - .it = { - .menu_layer = menu_layer, - .row_callback_after_geometry = prv_menu_layer_iterator_prime_cache_callback, - .section_callback = prv_menu_layer_iterator_noop_callback, - .should_continue = true, - .cursor = { - // Section header of current section (0) is not part of the walk down, set it "manually" - .y = prv_menu_layer_get_header_height(menu_layer, 0), - .sep = prv_menu_layer_get_separator_height(menu_layer, 0) - }, - }, - .cache_set = false, + .it = + { + .menu_layer = menu_layer, + .row_callback_after_geometry = prv_menu_layer_iterator_prime_cache_callback, + .section_callback = prv_menu_layer_iterator_noop_callback, + .should_continue = true, + .cursor = + {// Section header of current section (0) is not part of the walk down, set it + // "manually" + .y = prv_menu_layer_get_header_height(menu_layer, 0), + .sep = prv_menu_layer_get_separator_height(menu_layer, 0) + }, + }, + .cache_set = false, }; if (prv_menu_layer_get_header_height(menu_layer, 0) != 0) { @@ -1085,7 +1106,7 @@ void menu_layer_update_caches(MenuLayer *menu_layer) { } void menu_layer_set_callbacks(MenuLayer *menu_layer, void *callback_context, - const MenuLayerCallbacks *callbacks) { + const MenuLayerCallbacks *callbacks) { if (callbacks) { menu_layer->callbacks = *callbacks; PBL_ASSERTN(menu_layer->callbacks.draw_row); @@ -1122,7 +1143,7 @@ int16_t menu_index_compare(const MenuIndex *a, const MenuIndex *b) { } static void prv_selection_complete(Animation *animation, bool finished, void *context) { - MenuLayer *menu_layer = (MenuLayer *) context; + MenuLayer *menu_layer = (MenuLayer *)context; menu_layer->animation.animation = NULL; } @@ -1135,7 +1156,7 @@ static bool prv_cancel_selection_animation(MenuLayer *menu_layer) { return result; } -#define TOP_DOWN_PX 7 +#define TOP_DOWN_PX 7 #define BOTTOM_DOWN_PX 10 static void prv_setup_selection_animation(MenuLayer *menu_layer, bool up) { // Move selection inverter layer: @@ -1150,19 +1171,20 @@ static void prv_setup_selection_animation(MenuLayer *menu_layer, bool up) { } else { from = menu_layer->inverter.layer.frame; } - GRect target = (GRect) { - .origin = { - .x = 0, - .y = from.origin.y + ((up) ? 0 : TOP_DOWN_PX), - }, - .size = { - .w = size.w, - .h = size.h - TOP_DOWN_PX, - } + GRect target = (GRect){ + .origin = + { + .x = 0, + .y = from.origin.y + ((up) ? 0 : TOP_DOWN_PX), + }, + .size = { + .w = size.w, + .h = size.h - TOP_DOWN_PX, + } }; - Animation *a1 = (Animation *) property_animation_create_layer_frame(&menu_layer->inverter.layer, - &from, &target); + Animation *a1 = (Animation *)property_animation_create_layer_frame(&menu_layer->inverter.layer, + &from, &target); animation_set_duration(a1, 100); animation_set_curve(a1, AnimationCurveEaseOut); animation_set_auto_destroy(a1, true); @@ -1176,25 +1198,23 @@ static void prv_setup_selection_animation(MenuLayer *menu_layer, bool up) { target.origin.y = menu_layer->selection.y; target.size = size; - Animation *a2 = (Animation *) property_animation_create_layer_frame(&menu_layer->inverter.layer, - &from, &target); + Animation *a2 = (Animation *)property_animation_create_layer_frame(&menu_layer->inverter.layer, + &from, &target); animation_set_duration(a2, 250); animation_set_curve(a2, AnimationCurveEaseOut); animation_set_auto_destroy(a2, true); Animation *a = animation_sequence_create(a1, a2, NULL); - animation_set_auto_destroy(a, true); // [MJ] false? - animation_set_handlers(a, (AnimationHandlers) { .stopped = prv_selection_complete }, menu_layer); + animation_set_auto_destroy(a, true); // [MJ] false? + animation_set_handlers(a, (AnimationHandlers){.stopped = prv_selection_complete}, menu_layer); menu_layer->animation.animation = a; menu_layer->animation.target = target; animation_schedule(a); } - -static void prv_menu_layer_update_selection_highlight(MenuLayer *menu_layer, bool up, - bool animated, +static void prv_menu_layer_update_selection_highlight(MenuLayer *menu_layer, bool up, bool animated, bool change_ongoing_animation) { if (menu_layer->center_focused || menu_layer->selection_animation_disabled) { // animation on center_focused will not happen by moving the selection @@ -1202,7 +1222,7 @@ static void prv_menu_layer_update_selection_highlight(MenuLayer *menu_layer, boo animated = false; } - Animation *scroll_animation = (Animation *) menu_layer->scroll_layer.animation; + Animation *scroll_animation = (Animation *)menu_layer->scroll_layer.animation; if (change_ongoing_animation && animation_is_scheduled(scroll_animation)) { animation_unschedule(scroll_animation); } @@ -1215,16 +1235,17 @@ static void prv_menu_layer_update_selection_highlight(MenuLayer *menu_layer, boo // Move selection inverter layer: const int16_t w = menu_layer->scroll_layer.layer.frame.size.w; const GSize size = GSize(w, menu_layer->selection.h); - menu_layer->inverter.layer.bounds = (GRect) { - .origin = { 0, 0 }, - .size = size, + menu_layer->inverter.layer.bounds = (GRect){ + .origin = {0, 0}, + .size = size, }; - menu_layer->inverter.layer.frame = (GRect) { - .origin = { - .x = 0, - .y = menu_layer->selection.y, - }, - .size = size, + menu_layer->inverter.layer.frame = (GRect){ + .origin = + { + .x = 0, + .y = menu_layer->selection.y, + }, + .size = size, }; layer_mark_dirty(&menu_layer->inverter.layer); } @@ -1248,7 +1269,7 @@ static void prv_menu_layer_update_selection_scroll_position(MenuLayer *menu_laye // Scroll to the right position: switch (scroll_align) { case MenuRowAlignTop: - y = - menu_layer->selection.y; + y = -menu_layer->selection.y; break; case MenuRowAlignBottom: @@ -1274,11 +1295,11 @@ static void prv_menu_layer_update_selection_scroll_position(MenuLayer *menu_laye typedef struct MenuSelectIndexIterator { MenuIterator it; MenuCellSpan selection; - bool did_change_selection:1; + bool did_change_selection : 1; } MenuSelectIndexIterator; static void prv_menu_layer_iterator_selection_index_callback(MenuIterator *iterator) { - MenuSelectIndexIterator *it = (MenuSelectIndexIterator*)iterator; + MenuSelectIndexIterator *it = (MenuSelectIndexIterator *)iterator; if (!menu_index_compare(&it->it.cursor.index, &it->selection.index)) { it->it.menu_layer->selection = it->it.cursor; it->it.should_continue = false; @@ -1346,26 +1367,26 @@ static void prv_announce_selection_changed(MenuLayer *menu_layer, MenuIndex prev return; } - menu_layer->callbacks.selection_changed(menu_layer, menu_layer->selection.index, - prev_index, menu_layer->callback_context); + menu_layer->callbacks.selection_changed(menu_layer, menu_layer->selection.index, prev_index, + menu_layer->callback_context); } -void prv_center_focus_animation_update_impl(Animation *animation, - bool second_half, +void prv_center_focus_animation_update_impl(Animation *animation, bool second_half, AnimationProgress adjusted_progress) { CenterFocusSelectionAnimationState state = prv_center_focus_animation_state(animation); // values as seen in the design videos const int16_t move_in_dist = 16; const int16_t move_out_dist = 4; - const int16_t abs_content_offset = second_half ? - interpolate_int16(adjusted_progress, move_out_dist, 0) : - interpolate_int16(adjusted_progress, 0, move_in_dist); + const int16_t abs_content_offset = second_half + ? interpolate_int16(adjusted_progress, move_out_dist, 0) + : interpolate_int16(adjusted_progress, 0, move_in_dist); const int16_t content_offset = (state.up ? abs_content_offset : -abs_content_offset) / 2; state.menu_layer->animation.cell_content_origin_offset_y = content_offset; - const bool reached_second_half_before = menu_index_compare( - &state.menu_layer->selection.index, &state.menu_layer->animation.new_selection.index) == 0; + const bool reached_second_half_before = + menu_index_compare(&state.menu_layer->selection.index, + &state.menu_layer->animation.new_selection.index) == 0; if (second_half) { if (!reached_second_half_before) { @@ -1393,9 +1414,9 @@ void prv_center_focus_animation_update_in_and_out(Animation *animation, const AnimationProgress progress) { const AnimationProgress half_progress = ANIMATION_NORMALIZED_MAX / 2; const bool second_half = progress >= half_progress; - const AnimationProgress adjusted_progress = second_half ? - animation_timing_scaled(progress, half_progress, ANIMATION_NORMALIZED_MAX) : - animation_timing_scaled(progress, 0, half_progress); + const AnimationProgress adjusted_progress = + second_half ? animation_timing_scaled(progress, half_progress, ANIMATION_NORMALIZED_MAX) + : animation_timing_scaled(progress, 0, half_progress); prv_center_focus_animation_update_impl(animation, second_half, adjusted_progress); } @@ -1427,23 +1448,23 @@ static void prv_schedule_center_focus_animation(MenuLayer *menu_layer, bool up, prv_menu_layer_update_selection_scroll_position(menu_layer, MenuRowAlignNone, selection_animated); static const PropertyAnimationImplementation s_center_focus_selection_animation_in_out_impl = { - .base = { - .setup = prv_center_focus_animation_setup, - .update = prv_center_focus_animation_update_in_and_out, - .teardown = prv_center_focus_animation_teardown, - } + .base = { + .setup = prv_center_focus_animation_setup, + .update = prv_center_focus_animation_update_in_and_out, + .teardown = prv_center_focus_animation_teardown, + } }; static const PropertyAnimationImplementation s_center_focus_selection_animation_out_only_impl = { - .base = { - .setup = prv_center_focus_animation_setup, - .update = prv_center_focus_animation_update_out_only, - .teardown = prv_center_focus_animation_teardown, - } + .base = { + .setup = prv_center_focus_animation_setup, + .update = prv_center_focus_animation_update_out_only, + .teardown = prv_center_focus_animation_teardown, + } }; // when we were animating already, use the implementation that's only showing the bounce back - const PropertyAnimationImplementation *impl = was_animating ? - &s_center_focus_selection_animation_out_only_impl : - &s_center_focus_selection_animation_in_out_impl; + const PropertyAnimationImplementation *impl = + was_animating ? &s_center_focus_selection_animation_out_only_impl + : &s_center_focus_selection_animation_in_out_impl; PropertyAnimation *const prop_anim = property_animation_create(impl, menu_layer, NULL, NULL); // we're (ab)using the .to value to store the direction, see prv_center_focus_animation_state() property_animation_to(prop_anim, &up, sizeof(up), true); @@ -1503,16 +1524,16 @@ static MenuLayerBeforeSelectionChangeState prv_capture_state_and_cancel_center_f MenuLayer *menu_layer) { // it's critical to cancel the animation for center focus here so that any potential in-between // selection state will be cleaned up - const bool was_animating = menu_layer->center_focused ? - prv_cancel_selection_animation(menu_layer) : - false; - return (MenuLayerBeforeSelectionChangeState) { - .was_animating = was_animating, - .prev_selection = menu_layer->selection, + const bool was_animating = + menu_layer->center_focused ? prv_cancel_selection_animation(menu_layer) : false; + return (MenuLayerBeforeSelectionChangeState){ + .was_animating = was_animating, + .prev_selection = menu_layer->selection, }; } -void menu_layer_set_selected_index(MenuLayer *menu_layer, MenuIndex index, MenuRowAlign scroll_align, bool animated) { +void menu_layer_set_selected_index(MenuLayer *menu_layer, MenuIndex index, + MenuRowAlign scroll_align, bool animated) { const MenuLayerBeforeSelectionChangeState before_state = prv_capture_state_and_cancel_center_focus_animation(menu_layer); @@ -1527,7 +1548,8 @@ void menu_layer_set_selected_index(MenuLayer *menu_layer, MenuIndex index, MenuR return; } - const uint16_t num_rows = menu_layer->callbacks.get_num_rows(menu_layer, index.section, menu_layer->callback_context); + const uint16_t num_rows = + menu_layer->callbacks.get_num_rows(menu_layer, index.section, menu_layer->callback_context); if (index.row >= num_rows) { index.row = num_rows - 1; } @@ -1536,20 +1558,22 @@ void menu_layer_set_selected_index(MenuLayer *menu_layer, MenuIndex index, MenuR // selection.index.section could be MENU_INDEX_NOT_FOUND (a very large value) // in this case, walk forward from {0, 0| to avoid a very long loop run const bool is_invalid_section = menu_layer->selection.index.section == MENU_INDEX_NOT_FOUND; - const int16_t comp = is_invalid_section ? 1 : - menu_index_compare(&index, &menu_layer->selection.index); + const int16_t comp = + is_invalid_section ? 1 : menu_index_compare(&index, &menu_layer->selection.index); MenuSelectIndexIterator it = { - .it = { - .menu_layer = menu_layer, - .row_callback_after_geometry = prv_menu_layer_iterator_selection_index_callback, - .section_callback = prv_menu_layer_iterator_noop_callback, - .should_continue = true, - .cursor = is_invalid_section ? (MenuCellSpan){} : menu_layer->selection, - }, - .selection = { - .index = index, - }, - .did_change_selection = false, + .it = + { + .menu_layer = menu_layer, + .row_callback_after_geometry = prv_menu_layer_iterator_selection_index_callback, + .section_callback = prv_menu_layer_iterator_noop_callback, + .should_continue = true, + .cursor = is_invalid_section ? (MenuCellSpan){} : menu_layer->selection, + }, + .selection = + { + .index = index, + }, + .did_change_selection = false, }; prv_walk_with_iterator((int8_t)comp, &it.it); @@ -1562,11 +1586,11 @@ void menu_layer_set_selected_index(MenuLayer *menu_layer, MenuIndex index, MenuR typedef struct MenuSelectNextIterator { MenuIterator it; uint8_t count; - bool did_change_selection:1; + bool did_change_selection : 1; } MenuSelectNextIterator; static void prv_menu_layer_iterator_selection_next_callback(MenuIterator *iterator) { - MenuSelectNextIterator *it = (MenuSelectNextIterator*)iterator; + MenuSelectNextIterator *it = (MenuSelectNextIterator *)iterator; MenuLayer *menu_layer = it->it.menu_layer; if (it->count == 1) { MenuLayerSelectionWillChangeCallback cb = menu_layer->callbacks.selection_will_change; @@ -1598,21 +1622,22 @@ static void prv_menu_layer_iterator_selection_next_callback(MenuIterator *iterat } } -void menu_layer_set_selected_next(MenuLayer *menu_layer, bool up, - MenuRowAlign scroll_align, bool animated) { +void menu_layer_set_selected_next(MenuLayer *menu_layer, bool up, MenuRowAlign scroll_align, + bool animated) { const MenuLayerBeforeSelectionChangeState before_state = prv_capture_state_and_cancel_center_focus_animation(menu_layer); MenuSelectNextIterator it = { - .it = { - .menu_layer = menu_layer, - .row_callback_after_geometry = prv_menu_layer_iterator_selection_next_callback, - .section_callback = prv_menu_layer_iterator_noop_callback, - .should_continue = true, - .cursor = menu_layer->selection, - }, - .count = up ? 1 : 0, // see asymmetry note with menu_layer_walk_downward_from_iterator() - .did_change_selection = false, + .it = + { + .menu_layer = menu_layer, + .row_callback_after_geometry = prv_menu_layer_iterator_selection_next_callback, + .section_callback = prv_menu_layer_iterator_noop_callback, + .should_continue = true, + .cursor = menu_layer->selection, + }, + .count = up ? 1 : 0, // see asymmetry note with menu_layer_walk_downward_from_iterator() + .did_change_selection = false, }; prv_walk_with_iterator((int8_t)(up ? -1 : 1), &it.it); @@ -1721,7 +1746,7 @@ void menu_layer_set_scroll_vibe_on_blocked(MenuLayer *menu_layer, bool scroll_vi if (!menu_layer) { return; } - + if (scroll_vibe_on_blocked) { menu_layer->scroll_vibe_on_wrap_around = false; } @@ -1795,11 +1820,11 @@ static void prv_menu_touch_offset_bounds(MenuLayer *menu_layer, int16_t *min_y, if (menu_layer->center_focused) { const int16_t sel_rest_y = (int16_t)((frame_h - menu_layer->selection.h) / 2); *max_y = prv_menu_index_is_first_index(menu_layer, &menu_layer->selection.index) - ? sel_rest_y - : (int16_t)(frame_h / 2); + ? sel_rest_y + : (int16_t)(frame_h / 2); *min_y = prv_menu_index_is_last_index(menu_layer, &menu_layer->selection.index) - ? (int16_t)(sel_rest_y - menu_layer->selection.y) - : (int16_t)(*min_y - (frame_h / 2)); + ? (int16_t)(sel_rest_y - menu_layer->selection.y) + : (int16_t)(*min_y - (frame_h / 2)); } } @@ -1816,9 +1841,9 @@ static int16_t prv_menu_touch_clamp_offset_y(MenuLayer *menu_layer, int16_t y) { //! moved away with the content). Purely offset-derived, so the live pan, the release //! spring-back, and a cancelled gesture all keep it in sync for free. static void prv_menu_update_overscroll_stretch(MenuLayer *menu_layer) { - GRect frame = (GRect) { - .origin = { 0, menu_layer->selection.y }, - .size = { menu_layer->scroll_layer.layer.frame.size.w, menu_layer->selection.h }, + GRect frame = (GRect){ + .origin = {0, menu_layer->selection.y}, + .size = {menu_layer->scroll_layer.layer.frame.size.w, menu_layer->selection.h}, }; bool stretched = false; if (!menu_layer->center_focused && !menu_layer->selection_animation_disabled && @@ -1883,15 +1908,16 @@ bool menu_layer_touch_find_row_at_content_y(MenuLayer *menu_layer, int16_t conte // section-header/separator geometry is honoured. The downward walk includes the anchor row; the // upward walk covers everything above it. MenuHitTestIterator it = { - .it = { - .menu_layer = menu_layer, - .cursor = menu_layer->cache.cursor, - .row_callback_after_geometry = prv_menu_hit_test_row_callback, - .section_callback = prv_menu_hit_test_section_callback, - .should_continue = true, - }, - .target_y = content_y, - .found = false, + .it = + { + .menu_layer = menu_layer, + .cursor = menu_layer->cache.cursor, + .row_callback_after_geometry = prv_menu_hit_test_row_callback, + .section_callback = prv_menu_hit_test_section_callback, + .should_continue = true, + }, + .target_y = content_y, + .found = false, }; prv_menu_layer_walk_downward_from_iterator(&it.it); if (!it.found) { @@ -1953,17 +1979,19 @@ static void prv_menu_touch_reselect_row(MenuLayer *menu_layer, MenuIndex index) return; } MenuSelectIndexIterator it = { - .it = { - .menu_layer = menu_layer, - .row_callback_after_geometry = prv_menu_layer_iterator_selection_index_callback, - .section_callback = prv_menu_layer_iterator_noop_callback, - .should_continue = true, - .cursor = menu_layer->selection, - }, - .selection = { - .index = index, - }, - .did_change_selection = false, + .it = + { + .menu_layer = menu_layer, + .row_callback_after_geometry = prv_menu_layer_iterator_selection_index_callback, + .section_callback = prv_menu_layer_iterator_noop_callback, + .should_continue = true, + .cursor = menu_layer->selection, + }, + .selection = + { + .index = index, + }, + .did_change_selection = false, }; prv_walk_with_iterator((int8_t)comp, &it.it); if (!it.did_change_selection) { @@ -2005,8 +2033,7 @@ static void prv_menu_touch_track_center_row(MenuLayer *menu_layer) { // here because it forces animated=false on center-focused menus. static void prv_menu_touch_settle_to_center(MenuLayer *menu_layer, bool animated) { const int16_t frame_h = menu_layer->scroll_layer.layer.frame.size.h; - const int16_t y = - (int16_t)(frame_h / 2 - menu_layer->selection.y - menu_layer->selection.h / 2); + const int16_t y = (int16_t)(frame_h / 2 - menu_layer->selection.y - menu_layer->selection.h / 2); scroll_layer_set_content_offset(&menu_layer->scroll_layer, GPoint(0, y), animated); } @@ -2035,9 +2062,9 @@ static void prv_menu_touch_update_center_pin(MenuLayer *menu_layer) { prv_menu_index_is_last_index(menu_layer, &menu_layer->selection.index))) { pinned_y = menu_layer->selection.y; } - const GRect pinned = (GRect) { - .origin = { 0, pinned_y }, - .size = { frame_size.w, menu_layer->selection.h }, + const GRect pinned = (GRect){ + .origin = {0, pinned_y}, + .size = {frame_size.w, menu_layer->selection.h}, }; if (pinned.origin.y == menu_layer->selection.y) { // At rest: the selected row is centred, so the pinned frame and the natural frame are one. @@ -2073,7 +2100,7 @@ void menu_layer_touch_handle_touchdown(MenuLayer *menu_layer) { if (anim && animation_is_scheduled(anim)) { animation_unschedule(anim); } - menu_layer->touch_fling_active = false; // a coast caught pre-first-frame skips its handler + menu_layer->touch_fling_active = false; // a coast caught pre-first-frame skips its handler scroll_layer_touch_fling_cleanup(&menu_layer->scroll_layer); if (menu_layer->center_focused) { // A dead stop could freeze the carousel off-grid forever on a catch-and-hold (a >300 ms hold @@ -2094,8 +2121,8 @@ void menu_layer_touch_handle_pan_update(MenuLayer *menu_layer, GPoint base, // that fits the frame keeps the hard clamp (nothing to scroll, nothing to bounce). const bool scrollable = scroll_layer_get_content_size(&menu_layer->scroll_layer).h > frame_h; const int16_t new_y = scrollable - ? scroll_layer_touch_overscroll_damp(raw_y, min_y, max_y, frame_h) - : (int16_t)CLIP(raw_y, min_y, max_y); + ? scroll_layer_touch_overscroll_damp(raw_y, min_y, max_y, frame_h) + : (int16_t)CLIP(raw_y, min_y, max_y); prv_scrollbar_kick(menu_layer); scroll_layer_touch_set_content_offset_overscrolled(&menu_layer->scroll_layer, new_y); if (menu_layer->center_focused) { @@ -2105,8 +2132,7 @@ void menu_layer_touch_handle_pan_update(MenuLayer *menu_layer, GPoint base, // Plain menus: selection intentionally NOT touched — a pan scrolls, a tap selects. } -static void prv_menu_touch_spring_back_stopped(Animation *animation, bool finished, - void *context) { +static void prv_menu_touch_spring_back_stopped(Animation *animation, bool finished, void *context) { (void)animation; (void)finished; scroll_layer_touch_fling_cleanup(&((MenuLayer *)context)->scroll_layer); @@ -2130,8 +2156,8 @@ static void prv_menu_touch_fling_stopped(Animation *animation, bool finished, vo // Coast toward the velocity projection, clamped by the menu's own (possibly widened) clamp. static void prv_menu_touch_fling(MenuLayer *menu_layer, int16_t released_y, int32_t velocity_y) { const int32_t projected_y = released_y + (velocity_y * TOUCH_FLING_TAU_MS) / 1000; - const int16_t target_y = prv_menu_touch_clamp_offset_y( - menu_layer, (int16_t)CLIP(projected_y, INT16_MIN, INT16_MAX)); + const int16_t target_y = + prv_menu_touch_clamp_offset_y(menu_layer, (int16_t)CLIP(projected_y, INT16_MIN, INT16_MAX)); if (scroll_layer_touch_fling_start(&menu_layer->scroll_layer, target_y, (int16_t)velocity_y, prv_menu_touch_fling_stopped, menu_layer)) { menu_layer->touch_fling_active = true; @@ -2152,8 +2178,8 @@ void menu_layer_touch_handle_snap(MenuLayer *menu_layer, GPoint base, GPoint fin prv_menu_touch_spring_back_stopped, menu_layer); return; } - const int32_t v = CLIP((int32_t)velocity.y, -TOUCH_FLING_MAX_VELOCITY_PX_S, - TOUCH_FLING_MAX_VELOCITY_PX_S); + const int32_t v = + CLIP((int32_t)velocity.y, -TOUCH_FLING_MAX_VELOCITY_PX_S, TOUCH_FLING_MAX_VELOCITY_PX_S); if (ABS(v) >= TOUCH_FLING_MIN_VELOCITY_PX_S) { // Fast liftoff: coast toward the projection from the released offset. The coast starts from // the current (last throttled) offset, so the unthrottled residual is absorbed into the @@ -2274,14 +2300,14 @@ void menu_layer_touch_handle_tap(MenuLayer *menu_layer, GPoint point_on_screen) // prv_schedule_center_focus_animation); opening is the second tap (or the double-tap window). menu_layer_set_selected_index(menu_layer, final, MenuRowAlignCenter, true); // Record the committed (range-clamped) selection, not the raw will_change output: a client that - // redirects to an out-of-range index would otherwise be handed that OOB index by a fast double tap - // (priority 1), diverging from priority 2 which activates the clamped selection.index. The index - // commit is deferred to the half-way point of the jump animation; until then the committed + // redirects to an out-of-range index would otherwise be handed that OOB index by a fast double + // tap (priority 1), diverging from priority 2 which activates the clamped selection.index. The + // index commit is deferred to the half-way point of the jump animation; until then the committed // target lives in animation.new_selection (a priority-1 tap during the jump cancels it, which // drives the animation to its end state and commits that same target). const bool jump_in_flight = animation_is_scheduled(menu_layer->animation.animation); - menu_layer->last_selected_index = jump_in_flight ? menu_layer->animation.new_selection.index - : menu_layer->selection.index; + menu_layer->last_selected_index = + jump_in_flight ? menu_layer->animation.new_selection.index : menu_layer->selection.index; prv_menu_set_last_select_ticks(menu_layer, now); menu_layer->double_tap_armed = true; } @@ -2372,15 +2398,15 @@ static void prv_menu_ops_swipe(void *w, SwipeDirection dir) { // can_start is NULL: a MenuLayer is always ready to start a pan. static const TouchNavWidgetOps s_menu_touch_nav_ops = { - .can_start = NULL, - .touchdown = prv_menu_ops_touchdown, - .pan_started = prv_menu_ops_pan_started, - .get_base_offset = prv_menu_ops_get_base_offset, - .pan_update = prv_menu_ops_pan_update, - .pan_snap = prv_menu_ops_pan_snap, - .pan_cancel = prv_menu_ops_pan_cancel, - .tap = prv_menu_ops_tap, - .swipe = prv_menu_ops_swipe, + .can_start = NULL, + .touchdown = prv_menu_ops_touchdown, + .pan_started = prv_menu_ops_pan_started, + .get_base_offset = prv_menu_ops_get_base_offset, + .pan_update = prv_menu_ops_pan_update, + .pan_snap = prv_menu_ops_pan_snap, + .pan_cancel = prv_menu_ops_pan_cancel, + .tap = prv_menu_ops_tap, + .swipe = prv_menu_ops_swipe, }; static void prv_menu_touch_nav_register(MenuLayer *menu_layer) { @@ -2407,8 +2433,8 @@ static void prv_menu_touch_nav_deregister(MenuLayer *menu_layer) { if (!state) { return; } - // If this menu is the live gesture target and is about to be destroyed under a live window, cancel - // the gesture with NO client callbacks so a snap cannot reach freed client state. + // If this menu is the live gesture target and is about to be destroyed under a live window, + // cancel the gesture with NO client callbacks so a snap cannot reach freed client state. // touch_nav_registry_remove clears the latched target BEFORE we cancel (its UAF hook), so the // resulting Cancelled dispatch finds no target and re-enters nothing. const bool was_target = menu_layer_touch_is_gesture_target(menu_layer); diff --git a/src/fw/applib/ui/menu_layer.h b/src/fw/applib/ui/menu_layer.h index 4405833071..5a0d1839d1 100644 --- a/src/fw/applib/ui/menu_layer.h +++ b/src/fw/applib/ui/menu_layer.h @@ -50,7 +50,7 @@ //! @internal //! Constant to indicate that a menu item index is not found -#define MENU_INDEX_NOT_FOUND ((const uint16_t) ~0) +#define MENU_INDEX_NOT_FOUND ((const uint16_t)~0) ////////////////////// // Menu Layer @@ -67,7 +67,7 @@ typedef struct MenuIndex { } MenuIndex; //! Macro to create a MenuIndex -#define MenuIndex(section, row) ((MenuIndex){ (section), (row) }) +#define MenuIndex(section, row) ((MenuIndex){(section), (row)}) //! Comparator function to determine the order of two MenuIndex values. //! @param a Pointer to the menu index of the first item @@ -117,8 +117,7 @@ typedef uint16_t (*MenuLayerGetNumberOfRowsInSectionsCallback)(struct MenuLayer //! @see \ref menu_layer_set_callbacks() //! @see \ref MenuLayerCallbacks typedef int16_t (*MenuLayerGetCellHeightCallback)(struct MenuLayer *menu_layer, - MenuIndex *cell_index, - void *callback_context); + MenuIndex *cell_index, void *callback_context); //! Function signature for the callback to get the height of the section header //! at a given section index. @@ -130,8 +129,7 @@ typedef int16_t (*MenuLayerGetCellHeightCallback)(struct MenuLayer *menu_layer, //! @see \ref menu_layer_set_callbacks() //! @see \ref MenuLayerCallbacks typedef int16_t (*MenuLayerGetHeaderHeightCallback)(struct MenuLayer *menu_layer, - uint16_t section_index, - void *callback_context); + uint16_t section_index, void *callback_context); //! Function signature for the callback to get the height of the separator //! at a given index. @@ -157,10 +155,8 @@ typedef int16_t (*MenuLayerGetSeparatorHeightCallback)(struct MenuLayer *menu_la //! ignored. //! @see \ref menu_layer_set_callbacks() //! @see \ref MenuLayerCallbacks -typedef void (*MenuLayerDrawRowCallback)(GContext* ctx, - const Layer *cell_layer, - MenuIndex *cell_index, - void *callback_context); +typedef void (*MenuLayerDrawRowCallback)(GContext *ctx, const Layer *cell_layer, + MenuIndex *cell_index, void *callback_context); //! Function signature for the callback to render the section header at a given //! section index. @@ -176,10 +172,8 @@ typedef void (*MenuLayerDrawRowCallback)(GContext* ctx, //! ignored. //! @see \ref menu_layer_set_callbacks() //! @see \ref MenuLayerCallbacks -typedef void (*MenuLayerDrawHeaderCallback)(GContext* ctx, - const Layer *cell_layer, - uint16_t section_index, - void *callback_context); +typedef void (*MenuLayerDrawHeaderCallback)(GContext *ctx, const Layer *cell_layer, + uint16_t section_index, void *callback_context); //! Function signature for the callback to render the separator at a given //! MenuIndex. @@ -193,10 +187,8 @@ typedef void (*MenuLayerDrawHeaderCallback)(GContext* ctx, //! ignored. //! @see \ref menu_layer_set_callbacks() //! @see \ref MenuLayerCallbacks -typedef void (*MenuLayerDrawSeparatorCallback)(GContext* ctx, - const Layer *cell_layer, - MenuIndex *cell_index, - void *callback_context); +typedef void (*MenuLayerDrawSeparatorCallback)(GContext *ctx, const Layer *cell_layer, + MenuIndex *cell_index, void *callback_context); //! Function signature for the callback to handle the event that a user hits //! the SELECT button. @@ -205,8 +197,7 @@ typedef void (*MenuLayerDrawSeparatorCallback)(GContext* ctx, //! @param callback_context The callback context //! @see \ref menu_layer_set_callbacks() //! @see \ref MenuLayerCallbacks -typedef void (*MenuLayerSelectCallback)(struct MenuLayer *menu_layer, - MenuIndex *cell_index, +typedef void (*MenuLayerSelectCallback)(struct MenuLayer *menu_layer, MenuIndex *cell_index, void *callback_context); //! Function signature for the callback to handle a change in the current @@ -217,10 +208,8 @@ typedef void (*MenuLayerSelectCallback)(struct MenuLayer *menu_layer, //! @param callback_context The callback context //! @see \ref menu_layer_set_callbacks() //! @see \ref MenuLayerCallbacks -typedef void (*MenuLayerSelectionChangedCallback)(struct MenuLayer *menu_layer, - MenuIndex new_index, - MenuIndex old_index, - void *callback_context); +typedef void (*MenuLayerSelectionChangedCallback)(struct MenuLayer *menu_layer, MenuIndex new_index, + MenuIndex old_index, void *callback_context); //! Function signature for the callback which allows or changes selection behavior of the menu. //! In order to change the cell that should be selected, modify the passed in new_index. @@ -232,8 +221,7 @@ typedef void (*MenuLayerSelectionChangedCallback)(struct MenuLayer *menu_layer, //! @note \ref menu_layer_set_selected_index will not trigger this callback when //! the selection changes, but \ref menu_layer_set_selected_next will. typedef void (*MenuLayerSelectionWillChangeCallback)(struct MenuLayer *menu_layer, - MenuIndex *new_index, - MenuIndex old_index, + MenuIndex *new_index, MenuIndex old_index, void *callback_context); //! Function signature for the callback which draws the menu's background. @@ -243,10 +231,8 @@ typedef void (*MenuLayerSelectionWillChangeCallback)(struct MenuLayer *menu_laye //! @param bg_layer The background's layer, containing the geometry of the background. //! @param highlight Whether this should be rendered as highlighted or not. Highlight style //! should match the highlight style of cells, since this color can be used for animating selection. -typedef void (*MenuLayerDrawBackgroundCallback)(GContext* ctx, - const Layer *bg_layer, - bool highlight, - void *callback_context); +typedef void (*MenuLayerDrawBackgroundCallback)(GContext *ctx, const Layer *bg_layer, + bool highlight, void *callback_context); //! Data structure containing all the callbacks of a \ref MenuLayer. typedef struct MenuLayerCallbacks { @@ -365,7 +351,7 @@ typedef struct MenuLayer { //! Cell index + geometry cache of a cell that was in frame during the last redraw MenuCellSpan cursor; - uint8_t button_repeat_scrolling:2; + uint8_t button_repeat_scrolling : 2; } cache; //! @internal //! Selected cell index + geometry cache of the selected cell @@ -382,7 +368,7 @@ typedef struct MenuLayer { //! use this. struct { Animation *animation; - GRect target; //! The target frame of the animation + GRect target; //! The target frame of the animation //! cell_layer's bounds.origin will be modified by this to allow for //! content scrolling without scrolling the actual cells int16_t cell_content_origin_offset_y; @@ -402,8 +388,8 @@ typedef struct MenuLayer { //! vtable. Declared unconditionally (not under \c CONFIG_TOUCH) so the struct layout — and //! therefore \c sizeof(MenuLayer) — is identical on every board. It sits right after the //! pointer-aligned \c animation struct so it introduces no alignment padding of its own. A - //! build-time assert in menu_layer.c keeps this node's layout in sync with \ref TouchNavWidgetNode; - //! the applib_malloc size check tracks the (grown) \c sizeof(MenuLayer). + //! build-time assert in menu_layer.c keeps this node's layout in sync with \ref + //! TouchNavWidgetNode; the applib_malloc size check tracks the (grown) \c sizeof(MenuLayer). struct { void *next; void *layer; @@ -416,12 +402,13 @@ typedef struct MenuLayer { //! behaviour: the last row a tap-select committed and when (\ref rtc_get_ticks). A second tap //! within the double-tap window activates that row without re-hit-testing (the row may have //! animated to the centre by then). Plain menus activate on the first tap and never arm this - //! window. Declared unconditionally (not under \c CONFIG_TOUCH) so \c sizeof(MenuLayer) is identical - //! on every board, and carved from \ref padding below like \ref touch_nav_node. The timestamp is - //! split into two 32-bit halves rather than a single 8-byte \ref RtcTicks on purpose: a naturally - //! 8-byte-aligned member would raise the struct's alignment to 8 and its size past the fixed - //! applib-malloc budget (the size check pins \c sizeof(MenuLayer)). Reassemble via the accessors in - //! menu_layer.c. All three fields are 4-/2-byte aligned, so they introduce no alignment padding. + //! window. Declared unconditionally (not under \c CONFIG_TOUCH) so \c sizeof(MenuLayer) is + //! identical on every board, and carved from \ref padding below like \ref touch_nav_node. The + //! timestamp is split into two 32-bit halves rather than a single 8-byte \ref RtcTicks on + //! purpose: a naturally 8-byte-aligned member would raise the struct's alignment to 8 and its + //! size past the fixed applib-malloc budget (the size check pins \c sizeof(MenuLayer)). + //! Reassemble via the accessors in menu_layer.c. All three fields are 4-/2-byte aligned, so they + //! introduce no alignment padding. uint32_t last_select_ticks_hi; uint32_t last_select_ticks_lo; MenuIndex last_selected_index; @@ -435,50 +422,50 @@ typedef struct MenuLayer { //! @internal //! If true, there will be padding after the bottom item in the menu //! Defaults to 'true' - bool pad_bottom:1; + bool pad_bottom : 1; //! If true, the MenuLayer will generally scroll the content so that the selected row is //! on the center of the screen. - bool center_focused:1; + bool center_focused : 1; //! If true, the MenuLayer will not perform the selection cell clipping animation. This is //! independent of the scrolling animation. - bool selection_animation_disabled:1; + bool selection_animation_disabled : 1; //! If true, the MenuLayer will be able to wrap around the first element and the last element //! when scrolling. - bool scroll_wrap_around:1; + bool scroll_wrap_around : 1; //! If this is true alongside \ref scroll_wrap_around, the MenuLayer will be able to wrap around - //! even when the 'up' or 'down' button is held down. - bool scroll_force_wrap_on_repeat:1; + //! even when the 'up' or 'down' button is held down. + bool scroll_force_wrap_on_repeat : 1; //! If True, a vibration will occur when wrapping around. - bool scroll_vibe_on_wrap_around:1; + bool scroll_vibe_on_wrap_around : 1; //! If True, a vibration will occur when cursor is getting blocked at the top or bottom - bool scroll_vibe_on_blocked:1; + bool scroll_vibe_on_blocked : 1; //! @internal //! True once a tap has committed a selection and started the double-tap window (see - //! \ref last_selected_index). Explicit arm flag so the window is never mistaken as open right after - //! boot, when \ref rtc_get_ticks is still small. Packs into the byte already reserved by the flags - //! above, so it does not change \c sizeof(MenuLayer). - bool double_tap_armed:1; + //! \ref last_selected_index). Explicit arm flag so the window is never mistaken as open right + //! after boot, when \ref rtc_get_ticks is still small. Packs into the byte already reserved by + //! the flags above, so it does not change \c sizeof(MenuLayer). + bool double_tap_armed : 1; //! @internal //! True while an inertial coast (touch fling) drives the scroll offset: set when the coast //! animation is scheduled, cleared by its stopped handler. The 8 flag bits above fill their //! byte exactly, so this bit starts a new one, carved from \ref padding to keep //! \c sizeof(MenuLayer) unchanged. - bool touch_fling_active:1; + bool touch_fling_active : 1; //! @internal //! True when the current touch gesture began by catching (stopping) a coasting fling: the tap it //! may become is a stop, not a select, and is swallowed. Assigned (never OR-ed) on every //! Touchdown so it always reflects the current gesture. Packs into \ref touch_fling_active's //! byte. - bool touch_tap_swallow:1; + bool touch_tap_swallow : 1; //! @internal //! True when a tap on a not-selected row of a plain (non-center-focused) menu must only select @@ -486,30 +473,30 @@ typedef struct MenuLayer { //! For menus whose rows hold several items (the action menu's short-item columns), where the //! row-granular tap hit-test cannot tell which item the finger meant. See //! \ref menu_layer_set_tap_select_only. Packs into \ref touch_fling_active's byte. - bool tap_select_only:1; + bool tap_select_only : 1; //! If true, the transient scrollbar overlay is never shown. See //! \ref menu_layer_set_scrollbar_hidden. Packs into \ref touch_fling_active's byte. - bool scrollbar_hidden:1; + bool scrollbar_hidden : 1; //! @internal //! True while the scrollbar overlay is drawn: set while a touch gesture (pan or inertial coast) //! scrolls the content, cleared when \ref scrollbar_hide_timer fires. Packs into //! \ref touch_fling_active's byte. - bool scrollbar_visible:1; + bool scrollbar_visible : 1; //! @internal //! True while a touch overscroll stretches the selection background to the viewport edge. //! Derived purely from the (rubber-banded) scroll offset in the offset-changed handler. Packs //! into \ref touch_fling_active's byte. - bool overscroll_stretched:1; + bool overscroll_stretched : 1; //! @internal //! True while a touch gesture (pan, coast, or the settle that follows) pins a center-focused //! menu's selection highlight to the viewport centre, so rows slide through the fixed box the //! way button steps look. Cleared lazily when the settling row lands in the box. Packs into //! \ref touch_fling_active's byte. - bool touch_center_pin:1; + bool touch_center_pin : 1; //! Add some padding to keep track of the \ref MenuLayer size budget. //! As long as the size stays within this budget, 2.x apps can safely use the 3.x MenuLayer type. @@ -547,12 +534,12 @@ void menu_layer_init(MenuLayer *menu_layer, const GRect *frame); //! will be selected initially. //! @return A pointer to the \ref MenuLayer. `NULL` if the \ref MenuLayer could not //! be created -MenuLayer* menu_layer_create(GRect frame); +MenuLayer *menu_layer_create(GRect frame); -void menu_layer_deinit(MenuLayer* menu_layer); +void menu_layer_deinit(MenuLayer *menu_layer); //! Destroys a \ref MenuLayer previously created by menu_layer_create. -void menu_layer_destroy(MenuLayer* menu_layer); +void menu_layer_destroy(MenuLayer *menu_layer); //! Gets the "root" Layer of the \ref MenuLayer, which is the parent for the sub- //! layers used for its implementation. @@ -560,7 +547,7 @@ void menu_layer_destroy(MenuLayer* menu_layer); //! @return The "root" Layer of the \ref MenuLayer. //! @internal //! @note The result is always equal to `(Layer *) menu_layer`. -Layer* menu_layer_get_layer(const MenuLayer *menu_layer); +Layer *menu_layer_get_layer(const MenuLayer *menu_layer); //! Gets the ScrollLayer of the \ref MenuLayer, which is the layer responsible for //! the scrolling of the \ref MenuLayer. @@ -568,15 +555,14 @@ Layer* menu_layer_get_layer(const MenuLayer *menu_layer); //! @return The ScrollLayer of the \ref MenuLayer. //! @internal //! @note The result is always equal to `(ScrollLayer *) menu_layer`. -ScrollLayer* menu_layer_get_scroll_layer(const MenuLayer *menu_layer); +ScrollLayer *menu_layer_get_scroll_layer(const MenuLayer *menu_layer); //! @internal //! This function replaces \ref menu_layer_set_callbacks_by_value in order to change the callbacks //! parameter to be passed by a pointer instead of being passed by value. Callers consume much less //! code space when passing a pointer compared to passing structs by value. //! @see menu_layer_set_callbacks_by_value -void menu_layer_set_callbacks(MenuLayer *menu_layer, - void *callback_context, +void menu_layer_set_callbacks(MenuLayer *menu_layer, void *callback_context, const MenuLayerCallbacks *callbacks); //! Sets the callbacks for the MenuLayer. @@ -605,8 +591,7 @@ void menu_layer_set_callbacks_by_value(MenuLayer *menu_layer, void *callback_con //! @see \ref Clicks //! @see \ref window_set_click_config_provider_with_context() //! @see \ref scroll_layer_set_click_config_onto_window() -void menu_layer_set_click_config_onto_window(MenuLayer *menu_layer, - struct Window *window); +void menu_layer_set_click_config_onto_window(MenuLayer *menu_layer, struct Window *window); //! This enables or disables padding at the bottom of the \ref MenuLayer. //! Padding at the bottom of the layer keeps the bottom item from being at the very bottom of the @@ -646,9 +631,7 @@ typedef enum { //! @param animated Supply `true` to animate changing the selection, or `false` //! to change the selection instantly. //! @note If there is no next/previous item, this function is a no-op. -void menu_layer_set_selected_next(MenuLayer *menu_layer, - bool up, - MenuRowAlign scroll_align, +void menu_layer_set_selected_next(MenuLayer *menu_layer, bool up, MenuRowAlign scroll_align, bool animated); //! Selects the item with given \ref MenuIndex. @@ -660,9 +643,8 @@ void menu_layer_set_selected_next(MenuLayer *menu_layer, //! @note If the section and/or row index exceeds the available number of sections //! or resp. rows, the exceeding index/indices will be capped, effectively //! selecting the last section and/or row, resp. -void menu_layer_set_selected_index(MenuLayer *menu_layer, - MenuIndex index, MenuRowAlign scroll_align, - bool animated); +void menu_layer_set_selected_index(MenuLayer *menu_layer, MenuIndex index, + MenuRowAlign scroll_align, bool animated); //! Gets the MenuIndex of the currently selected menu item. //! @param menu_layer The \ref MenuLayer for which to get the current selected index. @@ -709,7 +691,6 @@ void menu_layer_set_normal_colors(MenuLayer *menu_layer, GColor background, GCol //! @see \ref menu_layer_set_normal_colors void menu_layer_set_highlight_colors(MenuLayer *menu_layer, GColor background, GColor foreground); - //! True, if the \ref MenuLayer generally scrolls such that the selected row is in the center. //! @see \ref menu_layer_set_center_focused bool menu_layer_get_center_focused(MenuLayer *menu_layer); @@ -744,10 +725,10 @@ void menu_layer_set_tap_select_only(MenuLayer *menu_layer, bool tap_select_only) //! @see \ref menu_layer_set_scroll_wrap_around bool menu_layer_get_scroll_wrap_around(MenuLayer *menu_layer); -//! Controls if the \ref MenuLayer can wrap around from the first element to the last when going +//! Controls if the \ref MenuLayer can wrap around from the first element to the last when going //! up and from the last element to the first when going down. -//! Even enabled, wrap around will stay disabled when holding down the navigation buttons (up or down). -//! Defaults to false for every platform +//! Even enabled, wrap around will stay disabled when holding down the navigation buttons (up or +//! down). Defaults to false for every platform //! @param menu_layer The menu layer for which to enable or disable the behavior. //! @param scroll_wrap_around true = enable the wrap around, false = disable it. //! @see \ref menu_layer_get_scroll_wrap_around @@ -780,4 +761,3 @@ void menu_layer_set_scroll_vibe_on_blocked(MenuLayer *menu_layer, bool scroll_vi //! @} // end addtogroup MenuLayer //! @} // end addtogroup Layer //! @} // end addtogroup UI - diff --git a/src/fw/applib/ui/menu_layer_private.h b/src/fw/applib/ui/menu_layer_private.h index 36beeb9d86..edaa8ef901 100644 --- a/src/fw/applib/ui/menu_layer_private.h +++ b/src/fw/applib/ui/menu_layer_private.h @@ -10,22 +10,22 @@ struct MenuIterator; typedef void (*MenuIteratorCallback)(struct MenuIterator *it); typedef struct MenuIterator { - MenuLayer * menu_layer; + MenuLayer *menu_layer; MenuCellSpan cursor; int16_t cell_bottom_y; MenuIteratorCallback row_callback_before_geometry; MenuIteratorCallback row_callback_after_geometry; MenuIteratorCallback section_callback; - bool should_continue; // callback can set this to false if the row-loop should be exited. + bool should_continue; // callback can set this to false if the row-loop should be exited. } MenuIterator; typedef struct MenuRenderIterator { MenuIterator it; - GContext* ctx; + GContext *ctx; int16_t content_top_y; int16_t content_bottom_y; - bool cache_set:1; - bool cursor_in_frame:1; + bool cache_set : 1; + bool cursor_in_frame : 1; MenuCellSpan new_cache; Layer cell_layer; } MenuRenderIterator; @@ -40,8 +40,10 @@ typedef struct MenuRenderIterator { //! the live content offset. See menu_layer.c for the wiring into the per-task recognizer set. //! Locate the selectable row whose cell spans \a content_y (content-space y). Section headers and -//! separators are not selectable and are skipped. Walks downward then upward from the render anchor. -//! @return true and fills \a index_out if a row is hit; false if \a content_y lands on a header/gap. +//! separators are not selectable and are skipped. Walks downward then upward from the render +//! anchor. +//! @return true and fills \a index_out if a row is hit; false if \a content_y lands on a +//! header/gap. bool menu_layer_touch_find_row_at_content_y(MenuLayer *menu_layer, int16_t content_y, MenuIndex *index_out); @@ -55,7 +57,8 @@ void menu_layer_touch_handle_touchdown(MenuLayer *menu_layer); //! On a plain menu the selection index is intentionally left unchanged. On a center-focused menu //! the focus stays pinned at the viewport centre: the row crossing the centre becomes the //! selection live, through the full selection_will_change contract (veto/redirect honoured). -void menu_layer_touch_handle_pan_update(MenuLayer *menu_layer, GPoint base, GPoint delta_since_start); +void menu_layer_touch_handle_pan_update(MenuLayer *menu_layer, GPoint base, + GPoint delta_since_start); //! Liftoff. Applies the last (unthrottled) pan delta. A plain menu only settles the offset — the //! selection never moves on a pan. A center-focused menu re-tracks the row under the centre and diff --git a/src/fw/applib/ui/menu_layer_system_cells.c b/src/fw/applib/ui/menu_layer_system_cells.c index b416089170..5ed0033dd2 100644 --- a/src/fw/applib/ui/menu_layer_system_cells.c +++ b/src/fw/applib/ui/menu_layer_system_cells.c @@ -30,31 +30,34 @@ typedef struct MenuCellDimensions { } MenuCellDimensions; static const MenuCellDimensions s_menu_cell_dimensions[NumPreferredContentSizes] = { - //! @note these are the same as Medium until Small is designed - [PreferredContentSizeSmall] = { - .basic_cell_height = 44, - .small_cell_height = 34, - .horizontal_inset = 5, - .title_subtitle_left_margin = 30, - }, - [PreferredContentSizeMedium] = { - .basic_cell_height = 44, - .small_cell_height = 34, - .horizontal_inset = 5, - .title_subtitle_left_margin = 30, - }, - [PreferredContentSizeLarge] = { - .basic_cell_height = 61, - .small_cell_height = 42, - .horizontal_inset = 10, - .title_subtitle_left_margin = 34, - }, - [PreferredContentSizeExtraLarge] = { - .basic_cell_height = 85, - .small_cell_height = 52, - .horizontal_inset = 10, - .title_subtitle_left_margin = 34, - }, + //! @note these are the same as Medium until Small is designed + [PreferredContentSizeSmall] = + { + .basic_cell_height = 44, + .small_cell_height = 34, + .horizontal_inset = 5, + .title_subtitle_left_margin = 30, + }, + [PreferredContentSizeMedium] = + { + .basic_cell_height = 44, + .small_cell_height = 34, + .horizontal_inset = 5, + .title_subtitle_left_margin = 30, + }, + [PreferredContentSizeLarge] = + { + .basic_cell_height = 61, + .small_cell_height = 42, + .horizontal_inset = 10, + .title_subtitle_left_margin = 34, + }, + [PreferredContentSizeExtraLarge] = { + .basic_cell_height = 85, + .small_cell_height = 52, + .horizontal_inset = 10, + .title_subtitle_left_margin = 34, + }, }; //! Third-party apps keep the runtime platform's default size so their layouts are unaffected by @@ -65,9 +68,9 @@ static bool prv_use_platform_default_size(void) { } static const MenuCellDimensions *prv_get_cell_dimensions(void) { - const PreferredContentSize size = prv_use_platform_default_size() ? - system_theme_get_default_content_size_for_runtime_platform() : - system_theme_get_content_size(); + const PreferredContentSize size = + prv_use_platform_default_size() ? system_theme_get_default_content_size_for_runtime_platform() + : system_theme_get_content_size(); return &s_menu_cell_dimensions[size]; } @@ -90,8 +93,8 @@ static int16_t prv_title_subtitle_left_margin(void) { #endif static GFont prv_get_cell_font(TextStyleFont font) { - return prv_use_platform_default_size() ? system_theme_get_font_for_default_size(font) : - system_theme_get_font(font); + return prv_use_platform_default_size() ? system_theme_get_font_for_default_size(font) + : system_theme_get_font(font); } static ALWAYS_INLINE GFont prv_get_cell_title_font(const MenuCellLayerConfig *config) { @@ -121,8 +124,8 @@ static ALWAYS_INLINE void prv_draw_icon(GContext *ctx, GBitmap *icon, const GRec } #if PBL_RECT -static void prv_menu_cell_basic_draw_custom_rect( - GContext *ctx, const Layer *cell_layer, const MenuCellLayerConfig *config) { +static void prv_menu_cell_basic_draw_custom_rect(GContext *ctx, const Layer *cell_layer, + const MenuCellLayerConfig *config) { const GRect *bounds = &cell_layer->bounds; const bool is_legacy2 = process_manager_compiled_with_legacy2_sdk(); @@ -138,18 +141,18 @@ static void prv_menu_cell_basic_draw_custom_rect( GRect box; const GAlign icon_align = (GAlign)config->icon_align; if (config->icon) { - box = (GRect) { - .size = config->icon->bounds.size, - .origin = bounds->origin, + box = (GRect){ + .size = config->icon->bounds.size, + .origin = bounds->origin, }; if (is_legacy2) { - static const GSize s_icon_size = { 33, 44 }; + static const GSize s_icon_size = {33, 44}; if (icon_align == GAlignRight) { box.origin.x += bounds->size.w - (horizontal_margin + config->icon->bounds.size.w); - } else { // icon on left - box.origin.x += ((config->icon->bounds.size.w & 1) + // Nudge odd-width icons one right - ((s_icon_size.w - config->icon->bounds.size.w) / 2)); + } else { // icon on left + box.origin.x += ((config->icon->bounds.size.w & 1) + // Nudge odd-width icons one right + ((s_icon_size.w - config->icon->bounds.size.w) / 2)); } box.origin.y += (s_icon_size.h - config->icon->bounds.size.h) / 2; } else { @@ -176,10 +179,11 @@ static void prv_menu_cell_basic_draw_custom_rect( left_margin = horizontal_margin; box.size.w -= config->icon->bounds.size.w; } else { - left_margin = !config->icon ? horizontal_margin : - config->icon_form_fit ? (left_margin + config->icon->bounds.size.w + - (config->icon_box_model ? config->icon_box_model->margin.w : 0)) - : prv_title_subtitle_left_margin() + horizontal_margin; + left_margin = !config->icon ? horizontal_margin + : config->icon_form_fit + ? (left_margin + config->icon->bounds.size.w + + (config->icon_box_model ? config->icon_box_model->margin.w : 0)) + : prv_title_subtitle_left_margin() + horizontal_margin; } box.origin.x += left_margin; box.size.w -= left_margin; @@ -204,27 +208,27 @@ static void prv_menu_cell_basic_draw_custom_rect( value_box.size.w -= horizontal_margin; const GFont value_font = prv_get_cell_value_font(config); - const GSize text_size = graphics_text_layout_get_max_used_size( - ctx, config->value, value_font, value_box, config->overflow_mode, - GTextAlignmentRight, NULL); + const GSize text_size = + graphics_text_layout_get_max_used_size(ctx, config->value, value_font, value_box, + config->overflow_mode, GTextAlignmentRight, NULL); box.size.w -= (text_size.w + horizontal_margin * 2); - graphics_draw_text(ctx, config->value, value_font, value_box, - config->overflow_mode, GTextAlignmentRight, NULL); + graphics_draw_text(ctx, config->value, value_font, value_box, config->overflow_mode, + GTextAlignmentRight, NULL); } if (config->title) { - graphics_draw_text(ctx, config->title, title_font, box, - config->overflow_mode, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, config->title, title_font, box, config->overflow_mode, + GTextAlignmentLeft, NULL); } if (config->subtitle) { box.origin.y += title_height; box.size.h = subtitle_height + 4; - graphics_draw_text(ctx, config->subtitle, subtitle_font, box, - config->overflow_mode, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, config->subtitle, subtitle_font, box, config->overflow_mode, + GTextAlignmentLeft, NULL); } } -#endif // PBL_RECT +#endif // PBL_RECT // This function duplicates `grect_inset()` but helps us save some stack space by using pointer // arguments and always inlining the function @@ -235,8 +239,8 @@ static ALWAYS_INLINE void prv_grect_inset(GRect *rect, GEdgeInsets *insets) { if (new_width < 0 || new_height < 0) { *rect = GRectZero; } else { - *rect = GRect(rect->origin.x + insets->left, rect->origin.y + insets->top, - new_width, new_height); + *rect = + GRect(rect->origin.x + insets->left, rect->origin.y + insets->top, new_width, new_height); } } @@ -247,8 +251,8 @@ static ALWAYS_INLINE bool prv_should_render_subtitle_round(const MenuCellLayerCo } static ALWAYS_INLINE GRect prv_menu_cell_basic_draw_custom_one_column_round( - GContext *ctx, const GRect *cell_layer_bounds, const MenuCellLayerConfig *config, - GTextAlignment text_alignment, GAlign container_alignment, bool is_selected) { + GContext *ctx, const GRect *cell_layer_bounds, const MenuCellLayerConfig *config, + GTextAlignment text_alignment, GAlign container_alignment, bool is_selected) { if (!cell_layer_bounds) { return GRectZero; } @@ -288,11 +292,11 @@ static ALWAYS_INLINE GRect prv_menu_cell_basic_draw_custom_one_column_round( const bool can_use_two_lines_for_title = !(render_subtitle || render_icon); const bool can_use_many_lines_for_title = (config->overflow_mode == GTextOverflowModeWordWrap); const int16_t initial_title_text_lines = can_use_two_lines_for_title ? 2 : 1; - int16_t title_text_frame_height = can_use_many_lines_for_title - ? graphics_text_layout_get_text_height(ctx, config->title, title_font, - cell_layer_bounds_size.w, config->overflow_mode, - text_alignment) - : title_font_height * initial_title_text_lines; + int16_t title_text_frame_height = + can_use_many_lines_for_title ? graphics_text_layout_get_text_height( + ctx, config->title, title_font, cell_layer_bounds_size.w, + config->overflow_mode, text_alignment) + : title_font_height * initial_title_text_lines; const int title_text_cap_offset = (config->title) ? fonts_get_font_cap_offset(title_font) : 0; int16_t container_height = title_text_frame_height + subtitle_text_frame_height; @@ -333,15 +337,17 @@ static ALWAYS_INLINE GRect prv_menu_cell_basic_draw_custom_one_column_round( } // We'll reuse this rect to conserve stack space; here it is used as the title text frame - GRect rect = (GRect) { - .origin = cell_layer_bounds->origin, - .size = GSize(cell_layer_bounds_size.w, title_text_frame_height), + GRect rect = (GRect){ + .origin = cell_layer_bounds->origin, + .size = GSize(cell_layer_bounds_size.w, title_text_frame_height), }; // Update the title text frame's height using the max used size of the title text because we // might only have one line of text to render even though we have space for two lines - title_text_frame_height = graphics_text_layout_get_max_used_size( - ctx, config->title, title_font, rect, config->overflow_mode, text_alignment, NULL).h; + title_text_frame_height = + graphics_text_layout_get_max_used_size(ctx, config->title, title_font, rect, + config->overflow_mode, text_alignment, NULL) + .h; // Calculate the final container height and create a rectangle for it container_height = title_text_frame_height + subtitle_text_frame_height; const bool icon_on_left = ((icon_align == GAlignLeft) || (icon_align == GAlignTopLeft)); @@ -352,7 +358,7 @@ static ALWAYS_INLINE GRect prv_menu_cell_basic_draw_custom_one_column_round( // Let the icon extend the container height if it's taller than the title/subtitle combo container_height = MAX(icon_frame_size.h, container_height); } - GRect container_rect = (GRect) { .size = GSize(cell_layer_bounds_size.w, container_height) }; + GRect container_rect = (GRect){.size = GSize(cell_layer_bounds_size.w, container_height)}; // Align the container rect in the cell grect_align(&container_rect, cell_layer_bounds, container_alignment, true /* clip */); @@ -372,9 +378,9 @@ static ALWAYS_INLINE GRect prv_menu_cell_basic_draw_custom_one_column_round( // round has never worked with legacy2 apps static const bool is_legacy2 = false; // Reuse container_rect as icon frame - container_rect = (GRect) { - .origin = rect.origin, - .size = icon_bitmap_size, + container_rect = (GRect){ + .origin = rect.origin, + .size = icon_bitmap_size, }; if (config->icon_box_model) { container_rect.origin = gpoint_add(container_rect.origin, config->icon_box_model->offset); @@ -398,8 +404,8 @@ static ALWAYS_INLINE GRect prv_menu_cell_basic_draw_custom_one_column_round( // Vertically center the title and subtitle within the container title_text_frame_origin_y = cell_layer_bounds->origin.y + - ((cell_layer_bounds->size.h - title_text_frame_height - - subtitle_text_frame_height - 1) / 2); + ((cell_layer_bounds->size.h - title_text_frame_height - subtitle_text_frame_height - 1) / + 2); if (subtitle_text_frame_height) { title_text_frame_origin_y -= icon_on_left_title_subtitle_vertical_spacing_offset; } @@ -414,9 +420,9 @@ static ALWAYS_INLINE GRect prv_menu_cell_basic_draw_custom_one_column_round( subtitle_text_frame_origin_y += icon_on_left_title_subtitle_vertical_spacing_offset; } // Reuse rect as the subtitle text frame - rect = (GRect) { - .origin = GPoint(cell_layer_bounds_origin_x, subtitle_text_frame_origin_y), - .size = GSize(cell_layer_bounds_size.w, subtitle_text_frame_height) + rect = (GRect){ + .origin = GPoint(cell_layer_bounds_origin_x, subtitle_text_frame_origin_y), + .size = GSize(cell_layer_bounds_size.w, subtitle_text_frame_height) }; graphics_draw_text(ctx, config->subtitle, subtitle_font, rect, config->overflow_mode, text_alignment, NULL); @@ -425,9 +431,9 @@ static ALWAYS_INLINE GRect prv_menu_cell_basic_draw_custom_one_column_round( // Draw the title, which we're guaranteed to have room for because otherwise we would have bailed // out at the beginning of this function // Reuse rect as the title text frame - rect = (GRect) { - .origin = GPoint(cell_layer_bounds_origin_x, title_text_frame_origin_y), - .size = GSize(cell_layer_bounds_size.w, title_text_frame_height) + rect = (GRect){ + .origin = GPoint(cell_layer_bounds_origin_x, title_text_frame_origin_y), + .size = GSize(cell_layer_bounds_size.w, title_text_frame_height) }; // Accumulate the cap offsets we need to position the title properly int cap_offsets_to_apply = title_text_cap_offset; @@ -435,8 +441,8 @@ static ALWAYS_INLINE GRect prv_menu_cell_basic_draw_custom_one_column_round( cap_offsets_to_apply += subtitle_text_cap_offset; } rect.origin.y -= cap_offsets_to_apply; - graphics_draw_text(ctx, config->title, title_font, rect, config->overflow_mode, - text_alignment, NULL); + graphics_draw_text(ctx, config->title, title_font, rect, config->overflow_mode, text_alignment, + NULL); // Add back the cap offset so functions that use the returned title text frame can position // themselves using the actual frame rect.origin.y += cap_offsets_to_apply; @@ -458,9 +464,9 @@ static ALWAYS_INLINE void prv_menu_cell_basic_draw_custom_two_columns_round( GSize right_element_size; const GFont value_font = prv_get_cell_value_font(config); if (config->value) { - right_element_size = graphics_text_layout_get_max_used_size( - ctx, config->value, value_font, *cell_layer_bounds, config->overflow_mode, - GTextAlignmentRight, NULL); + right_element_size = + graphics_text_layout_get_max_used_size(ctx, config->value, value_font, *cell_layer_bounds, + config->overflow_mode, GTextAlignmentRight, NULL); } else { right_element_size = icon_size; } @@ -477,10 +483,8 @@ static ALWAYS_INLINE void prv_menu_cell_basic_draw_custom_two_columns_round( } // Now we store the right element frame in rect - rect = (GRect) { - .origin = GPoint(grect_get_max_x(&rect), rect.origin.y), - .size = right_element_size - }; + rect = + (GRect){.origin = GPoint(grect_get_max_x(&rect), rect.origin.y), .size = right_element_size}; if (config->value) { rect.origin.y -= fonts_get_font_cap_offset(value_font); @@ -501,8 +505,9 @@ static ALWAYS_INLINE void prv_menu_cell_basic_draw_custom_two_columns_round( } } -static ALWAYS_INLINE void prv_menu_cell_basic_draw_custom_round( - GContext* ctx, const Layer *cell_layer, const MenuCellLayerConfig *config) { +static ALWAYS_INLINE void prv_menu_cell_basic_draw_custom_round(GContext *ctx, + const Layer *cell_layer, + const MenuCellLayerConfig *config) { // TODO PBL-23041: When round MenuLayer animations are enabled, we need a "is_selected" function const bool cell_is_selected = menu_cell_layer_is_highlighted(cell_layer); const bool draw_two_columns = @@ -511,25 +516,23 @@ static ALWAYS_INLINE void prv_menu_cell_basic_draw_custom_round( // Determine appropriate insets to match designs GRect cell_layer_bounds = cell_layer->bounds; const int16_t horizontal_inset = (cell_is_selected && !draw_two_columns) - ? MENU_CELL_ROUND_FOCUSED_HORIZONTAL_INSET - : MENU_CELL_ROUND_UNFOCUSED_HORIZONTAL_INSET; - prv_grect_inset(&cell_layer_bounds, - &GEdgeInsets(0, horizontal_inset + config->horizontal_inset)); + ? MENU_CELL_ROUND_FOCUSED_HORIZONTAL_INSET + : MENU_CELL_ROUND_UNFOCUSED_HORIZONTAL_INSET; + prv_grect_inset(&cell_layer_bounds, &GEdgeInsets(0, horizontal_inset + config->horizontal_inset)); if (draw_two_columns) { prv_menu_cell_basic_draw_custom_two_columns_round(ctx, &cell_layer_bounds, config, cell_is_selected); } else { - prv_menu_cell_basic_draw_custom_one_column_round(ctx, &cell_layer_bounds, config, - GTextAlignmentCenter, GAlignCenter, - cell_is_selected); + prv_menu_cell_basic_draw_custom_one_column_round( + ctx, &cell_layer_bounds, config, GTextAlignmentCenter, GAlignCenter, cell_is_selected); } } static ALWAYS_INLINE void prv_draw_cell(GContext *ctx, const Layer *cell_layer, const MenuCellLayerConfig *config) { - PBL_IF_RECT_ELSE(prv_menu_cell_basic_draw_custom_rect, - prv_menu_cell_basic_draw_custom_round)(ctx, cell_layer, config); + PBL_IF_RECT_ELSE(prv_menu_cell_basic_draw_custom_rect, prv_menu_cell_basic_draw_custom_round)( + ctx, cell_layer, config); } //! TODO: PBL-21467 Replace with MenuCellLayer @@ -538,27 +541,29 @@ void menu_cell_layer_draw(GContext *ctx, const Layer *cell_layer, prv_draw_cell(ctx, cell_layer, config); } -static ALWAYS_INLINE void prv_draw_basic( - GContext* ctx, const Layer *cell_layer, GFont const title_font, const char *title, - GFont const value_font, const char *value, GFont const subtitle_font, const char *subtitle, - GBitmap *icon, bool icon_on_right, GTextOverflowMode overflow_mode) { +static ALWAYS_INLINE void prv_draw_basic(GContext *ctx, const Layer *cell_layer, + GFont const title_font, const char *title, + GFont const value_font, const char *value, + GFont const subtitle_font, const char *subtitle, + GBitmap *icon, bool icon_on_right, + GTextOverflowMode overflow_mode) { MenuCellLayerConfig config = { - .title_font = title_font, - .subtitle_font = subtitle_font, - .value_font = value_font, - .title = title, - .subtitle = subtitle, - .value = value, - .icon = icon, - .icon_align = icon_on_right ? MenuCellLayerIconAlign_Right : - PBL_IF_RECT_ELSE(MenuCellLayerIconAlign_Left, - MenuCellLayerIconAlign_Top), - .overflow_mode = overflow_mode, + .title_font = title_font, + .subtitle_font = subtitle_font, + .value_font = value_font, + .title = title, + .subtitle = subtitle, + .value = value, + .icon = icon, + .icon_align = icon_on_right + ? MenuCellLayerIconAlign_Right + : PBL_IF_RECT_ELSE(MenuCellLayerIconAlign_Left, MenuCellLayerIconAlign_Top), + .overflow_mode = overflow_mode, }; prv_draw_cell(ctx, cell_layer, &config); } -void menu_cell_basic_draw_custom(GContext* ctx, const Layer *cell_layer, GFont const title_font, +void menu_cell_basic_draw_custom(GContext *ctx, const Layer *cell_layer, GFont const title_font, const char *title, GFont const value_font, const char *value, GFont const subtitle_font, const char *subtitle, GBitmap *icon, bool icon_on_right, GTextOverflowMode overflow_mode) { @@ -566,13 +571,13 @@ void menu_cell_basic_draw_custom(GContext* ctx, const Layer *cell_layer, GFont c icon, icon_on_right, overflow_mode); } -void menu_cell_basic_draw_icon_right(GContext* ctx, const Layer *cell_layer, - const char *title, const char *subtitle, GBitmap *icon) { +void menu_cell_basic_draw_icon_right(GContext *ctx, const Layer *cell_layer, const char *title, + const char *subtitle, GBitmap *icon) { prv_draw_basic(ctx, cell_layer, NULL, title, NULL, NULL, NULL, subtitle, icon, true, GTextOverflowModeFill); } -void menu_cell_basic_draw(GContext* ctx, const Layer *cell_layer, const char *title, +void menu_cell_basic_draw(GContext *ctx, const Layer *cell_layer, const char *title, const char *subtitle, GBitmap *icon) { prv_draw_basic(ctx, cell_layer, NULL, title, NULL, NULL, NULL, subtitle, icon, false, GTextOverflowModeFill); @@ -581,7 +586,7 @@ void menu_cell_basic_draw(GContext* ctx, const Layer *cell_layer, const char *ti ////////////////////// // Title menu cell -void menu_cell_title_draw(GContext* ctx, const Layer *cell_layer, const char *title) { +void menu_cell_title_draw(GContext *ctx, const Layer *cell_layer, const char *title) { // Title: if (title) { const bool is_legacy2 = process_manager_compiled_with_legacy2_sdk(); @@ -602,7 +607,7 @@ void menu_cell_title_draw(GContext* ctx, const Layer *cell_layer, const char *ti ////////////////////// // Basic header cell -void menu_cell_basic_header_draw(GContext* ctx, const Layer *cell_layer, const char *title) { +void menu_cell_basic_header_draw(GContext *ctx, const Layer *cell_layer, const char *title) { // Title: if (title) { const bool is_legacy2 = process_manager_compiled_with_legacy2_sdk(); @@ -619,4 +624,3 @@ void menu_cell_basic_header_draw(GContext* ctx, const Layer *cell_layer, const c graphics_draw_text(ctx, title, font, box, GTextOverflowModeFill, GTextAlignmentLeft, NULL); } } - diff --git a/src/fw/applib/ui/number_window.c b/src/fw/applib/ui/number_window.c index 874eb26b81..1b46bb84fb 100644 --- a/src/fw/applib/ui/number_window.c +++ b/src/fw/applib/ui/number_window.c @@ -61,22 +61,23 @@ static void select_click_handler(ClickRecognizerRef recognizer, NumberWindow *nf } static void click_config_provider(NumberWindow *nf) { - window_single_repeating_click_subscribe(BUTTON_ID_UP, 50, (ClickHandler) up_click_handler); - window_single_repeating_click_subscribe(BUTTON_ID_DOWN, 50, (ClickHandler) down_click_handler); + window_single_repeating_click_subscribe(BUTTON_ID_UP, 50, (ClickHandler)up_click_handler); + window_single_repeating_click_subscribe(BUTTON_ID_DOWN, 50, (ClickHandler)down_click_handler); // Work-around: by using a multi-click setup for the select button, // the handler will get fired with a very short delay, so the inverted segment of // the action bar is visible for a short period of time as to give visual // feedback of the button press. - window_multi_click_subscribe(BUTTON_ID_SELECT, 1, 2, 25, true, (ClickHandler)select_click_handler); + window_multi_click_subscribe(BUTTON_ID_SELECT, 1, 2, 25, true, + (ClickHandler)select_click_handler); } static GRect prv_get_text_frame(Layer *window_layer) { const int16_t x_margin = 5; const int16_t label_y_offset = PBL_IF_ROUND_ELSE(40, 16); - const GEdgeInsets insets = PBL_IF_ROUND_ELSE(GEdgeInsets(ACTION_BAR_WIDTH + x_margin), - GEdgeInsets(0, ACTION_BAR_WIDTH + x_margin, 0, - x_margin)); + const GEdgeInsets insets = + PBL_IF_ROUND_ELSE(GEdgeInsets(ACTION_BAR_WIDTH + x_margin), + GEdgeInsets(0, ACTION_BAR_WIDTH + x_margin, 0, x_margin)); GRect frame = grect_inset(window_layer->bounds, insets); frame.origin.y = label_y_offset; return frame; @@ -84,7 +85,7 @@ static GRect prv_get_text_frame(Layer *window_layer) { //! Drawing function for our Window's base Layer. Draws the background, the label, and the value, //! which is everything on screen with the exception of the child ActionBarLayer -void prv_update_proc(Layer *layer, GContext* ctx) { +void prv_update_proc(Layer *layer, GContext *ctx) { graphics_context_set_fill_color(ctx, GColorWhite); graphics_fill_rect(ctx, &layer->bounds); @@ -92,7 +93,7 @@ void prv_update_proc(Layer *layer, GContext* ctx) { // NumberWindow. _Static_assert(offsetof(Window, layer) == 0, ""); _Static_assert(offsetof(NumberWindow, window) == 0, ""); - NumberWindow *nw = (NumberWindow*) layer; + NumberWindow *nw = (NumberWindow *)layer; graphics_context_set_text_color(ctx, GColorBlack); @@ -100,12 +101,12 @@ void prv_update_proc(Layer *layer, GContext* ctx) { frame.size.h = 54; TextLayoutExtended cached_label_layout = {}; - graphics_draw_text(ctx, nw->label, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), - frame, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, - (TextLayout*) &cached_label_layout); + graphics_draw_text(ctx, nw->label, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), frame, + GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, + (TextLayout *)&cached_label_layout); char value_output_buffer[12]; - snprintf(value_output_buffer, ARRAY_LENGTH(value_output_buffer), "%"PRId32, nw->value); + snprintf(value_output_buffer, ARRAY_LENGTH(value_output_buffer), "%" PRId32, nw->value); frame.origin.y += cached_label_layout.max_used_size.h; #if PBL_RECT @@ -114,8 +115,7 @@ void prv_update_proc(Layer *layer, GContext* ctx) { #endif frame.size.h = 48; - graphics_draw_text(ctx, value_output_buffer, - fonts_get_system_font(NUMBER_FONT_KEY), frame, + graphics_draw_text(ctx, value_output_buffer, fonts_get_system_font(NUMBER_FONT_KEY), frame, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } @@ -172,32 +172,35 @@ static void number_window_load(NumberWindow *nw) { action_bar_layer_set_icon(action_bar, BUTTON_ID_DOWN, &s_bar_icon_down_bitmap); action_bar_layer_set_icon(action_bar, BUTTON_ID_SELECT, &s_bar_icon_check_bitmap); action_bar_layer_add_to_window(action_bar, &nw->window); - action_bar_layer_set_click_config_provider(action_bar, (ClickConfigProvider) click_config_provider); -} - -void number_window_init(NumberWindow *nw, const char *label, NumberWindowCallbacks callbacks, void *callback_context) { - *nw = (NumberWindow) { - .label = label, - .value = 0, - .max_val = INT_MAX, - .min_val = INT_MIN, - .step_size = 1, - .callbacks = callbacks, - .callback_context = callback_context + action_bar_layer_set_click_config_provider(action_bar, + (ClickConfigProvider)click_config_provider); +} + +void number_window_init(NumberWindow *nw, const char *label, NumberWindowCallbacks callbacks, + void *callback_context) { + *nw = (NumberWindow){ + .label = label, + .value = 0, + .max_val = INT_MAX, + .min_val = INT_MIN, + .step_size = 1, + .callbacks = callbacks, + .callback_context = callback_context }; window_init(&nw->window, WINDOW_NAME(label)); - window_set_window_handlers(&nw->window, &(WindowHandlers) { - .load = (WindowHandler) number_window_load, - }); + window_set_window_handlers(&nw->window, &(WindowHandlers){ + .load = (WindowHandler)number_window_load, + }); layer_set_update_proc(&nw->window.layer, prv_update_proc); ActionBarLayer *action_bar = &nw->action_bar; action_bar_layer_init(action_bar); } -NumberWindow* number_window_create(const char *label, NumberWindowCallbacks callbacks, void *callback_context) { - NumberWindow* window = applib_type_malloc(NumberWindow); +NumberWindow *number_window_create(const char *label, NumberWindowCallbacks callbacks, + void *callback_context) { + NumberWindow *window = applib_type_malloc(NumberWindow); if (window) { number_window_init(window, label, callbacks, callback_context); } diff --git a/src/fw/applib/ui/number_window.h b/src/fw/applib/ui/number_window.h index da6ec67a99..fbff92c8ae 100644 --- a/src/fw/applib/ui/number_window.h +++ b/src/fw/applib/ui/number_window.h @@ -68,26 +68,31 @@ typedef struct NumberWindow { //! Initializes the NumberWindow. //! @param numberwindow Pointer to the NumberWindow to initialize -//! @param label The title or prompt to display in the NumberWindow. Must be long-lived and cannot be stack-allocated. +//! @param label The title or prompt to display in the NumberWindow. Must be long-lived and cannot +//! be stack-allocated. //! @param callbacks The callbacks //! @param callback_context Pointer to application specific data that is passed //! into the callbacks. -//! @note The number window is not pushed to the window stack. Use \ref window_stack_push() to do this. -//! See code fragment here: NumberWindow -void number_window_init(NumberWindow *numberwindow, const char *label, NumberWindowCallbacks callbacks, void *callback_context); +//! @note The number window is not pushed to the window stack. Use \ref window_stack_push() to do +//! this. See code fragment here: NumberWindow +void number_window_init(NumberWindow *numberwindow, const char *label, + NumberWindowCallbacks callbacks, void *callback_context); //! Creates a new NumberWindow on the heap and initializes it with the default values. //! -//! @param label The title or prompt to display in the NumberWindow. Must be long-lived and cannot be stack-allocated. +//! @param label The title or prompt to display in the NumberWindow. Must be long-lived and cannot +//! be stack-allocated. //! @param callbacks The callbacks //! @param callback_context Pointer to application specific data that is passed -//! @note The number window is not pushed to the window stack. Use \ref window_stack_push() to do this. +//! @note The number window is not pushed to the window stack. Use \ref window_stack_push() to do +//! this. //! @return A pointer to the NumberWindow. `NULL` if the NumberWindow could not //! be created -NumberWindow* number_window_create(const char *label, NumberWindowCallbacks callbacks, void *callback_context); +NumberWindow *number_window_create(const char *label, NumberWindowCallbacks callbacks, + void *callback_context); //! Destroys a NumberWindow previously created by number_window_create. -void number_window_destroy(NumberWindow* number_window); +void number_window_destroy(NumberWindow *number_window); //! Sets the text of the title or prompt label. //! @param numberwindow Pointer to the NumberWindow for which to set the label @@ -134,4 +139,3 @@ Window *number_window_get_window(NumberWindow *numberwindow); //! @} // end addtogroup NumberWindow //! @} // end addtogroup Window //! @} // end addtogroup UI - diff --git a/src/fw/applib/ui/option_menu_window.c b/src/fw/applib/ui/option_menu_window.c index b1d51a32a5..bc4c30d344 100644 --- a/src/fw/applib/ui/option_menu_window.c +++ b/src/fw/applib/ui/option_menu_window.c @@ -21,27 +21,27 @@ typedef struct OptionMenuStyle { static const OptionMenuStyle s_style_medium = { #if PBL_RECT - .cell_heights[OptionMenuContentType_DoubleLine] = 56, + .cell_heights[OptionMenuContentType_DoubleLine] = 56, #endif - .right_icon_spacing = PBL_IF_RECT_ELSE(7, 35), + .right_icon_spacing = PBL_IF_RECT_ELSE(7, 35), }; static const OptionMenuStyle s_style_large = { #if PBL_RECT - .cell_heights[OptionMenuContentType_SingleLine] = 46, + .cell_heights[OptionMenuContentType_SingleLine] = 46, #endif - .top_inset = 1, - .right_icon_spacing = PBL_IF_RECT_ELSE(10, 35), - .text_inset_single = -1, - .text_inset_multi = -3, - .right_text_inset_with_icon = 4, + .top_inset = 1, + .right_icon_spacing = PBL_IF_RECT_ELSE(10, 35), + .text_inset_single = -1, + .text_inset_multi = -3, + .right_text_inset_with_icon = 4, }; -static const OptionMenuStyle * const s_styles[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = &s_style_medium, - [PreferredContentSizeMedium] = &s_style_medium, - [PreferredContentSizeLarge] = &s_style_large, - [PreferredContentSizeExtraLarge] = &s_style_large, +static const OptionMenuStyle *const s_styles[NumPreferredContentSizes] = { + [PreferredContentSizeSmall] = &s_style_medium, + [PreferredContentSizeMedium] = &s_style_medium, + [PreferredContentSizeLarge] = &s_style_large, + [PreferredContentSizeExtraLarge] = &s_style_large, }; static const OptionMenuStyle *prv_get_style(void) { @@ -58,10 +58,10 @@ static uint16_t prv_get_num_rows_callback(MenuLayer *menu_layer, uint16_t sectio } uint16_t option_menu_default_cell_height(OptionMenuContentType content_type, bool selected) { - const OptionMenuStyle * const PBL_UNUSED style = prv_get_style(); + const OptionMenuStyle *const PBL_UNUSED style = prv_get_style(); const int16_t cell_height = - PBL_IF_ROUND_ELSE(selected ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT : - MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT, + PBL_IF_ROUND_ELSE(selected ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT + : MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT, style->cell_heights[content_type]); return cell_height ?: menu_cell_basic_cell_height(); } @@ -84,10 +84,10 @@ static int32_t prv_draw_selection_icon(const OptionMenu *option_menu, GContext * const GSize not_chosen_icon_bounds = gbitmap_get_bounds(&option_menu->not_chosen_image).size; const GSize chosen_icon_bounds = gbitmap_get_bounds(&option_menu->chosen_image).size; PBL_ASSERTN(gsize_equal(¬_chosen_icon_bounds, &chosen_icon_bounds)); - GRect icon_frame = { .size = chosen_icon_bounds }; + GRect icon_frame = {.size = chosen_icon_bounds}; grect_align(&icon_frame, cell_layer_bounds, GAlignRight, false); - const OptionMenuStyle * const style = prv_get_style(); + const OptionMenuStyle *const style = prv_get_style(); icon_frame.origin.x -= style->right_icon_spacing; const GBitmap *const icon = @@ -110,31 +110,30 @@ static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIn if (option_menu->icons_enabled) { const bool is_chosen = (cell_index->row == option_menu->choice); const int32_t left_inset_x = PBL_IF_RECT_ELSE(0, 14); - const int32_t right_inset_x = prv_draw_selection_icon(option_menu, ctx, &remaining_rect, - is_chosen); + const int32_t right_inset_x = + prv_draw_selection_icon(option_menu, ctx, &remaining_rect, is_chosen); remaining_rect = grect_inset(remaining_rect, GEdgeInsets(0, right_inset_x, 0, left_inset_x)); } #if PBL_ROUND if (!is_selected && option_menu->icons_enabled) { const int32_t left_text_inset_to_prevent_clipping = 8; - remaining_rect = grect_inset(remaining_rect, - GEdgeInsets(0, 0, 0, left_text_inset_to_prevent_clipping)); + remaining_rect = + grect_inset(remaining_rect, GEdgeInsets(0, 0, 0, left_text_inset_to_prevent_clipping)); } #else - const OptionMenuStyle * const style = prv_get_style(); + const OptionMenuStyle *const style = prv_get_style(); const int32_t left_text_inset = menu_cell_basic_horizontal_inset(); - const int32_t right_text_inset = option_menu->icons_enabled ? style->right_text_inset_with_icon : - left_text_inset; - remaining_rect = grect_inset(remaining_rect, GEdgeInsets(style->top_inset, right_text_inset, 0, - left_text_inset)); + const int32_t right_text_inset = + option_menu->icons_enabled ? style->right_text_inset_with_icon : left_text_inset; + remaining_rect = grect_inset(remaining_rect, + GEdgeInsets(style->top_inset, right_text_inset, 0, left_text_inset)); #endif if (option_menu->callbacks.draw_row) { option_menu->callbacks.draw_row(option_menu, ctx, cell_layer, &remaining_rect, cell_index->row, is_selected, option_menu->context); } - } static void prv_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *context) { @@ -147,24 +146,25 @@ static void prv_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, vo } static void prv_selection_will_change_callback(MenuLayer *menu_layer, MenuIndex *new_index, - MenuIndex old_index, void *context) { + MenuIndex old_index, void *context) { OptionMenu *option_menu = context; if (option_menu->callbacks.selection_will_change) { - option_menu->callbacks.selection_will_change( - option_menu, new_index->row, old_index.row, option_menu->context); + option_menu->callbacks.selection_will_change(option_menu, new_index->row, old_index.row, + option_menu->context); } } static void prv_window_load(Window *window) { OptionMenu *option_menu = window_get_user_data(window); - menu_layer_set_callbacks(&option_menu->menu_layer, option_menu, &(MenuLayerCallbacks) { - .get_cell_height = prv_get_cell_height_callback, - .get_num_rows = prv_get_num_rows_callback, - .draw_row = prv_draw_row_callback, - .selection_will_change = prv_selection_will_change_callback, - .select_click = prv_select_callback - }); + menu_layer_set_callbacks(&option_menu->menu_layer, option_menu, + &(MenuLayerCallbacks){ + .get_cell_height = prv_get_cell_height_callback, + .get_num_rows = prv_get_num_rows_callback, + .draw_row = prv_draw_row_callback, + .selection_will_change = prv_selection_will_change_callback, + .select_click = prv_select_callback + }); menu_layer_set_click_config_onto_window(&option_menu->menu_layer, window); if (option_menu->choice != OPTION_MENU_CHOICE_NONE) { menu_layer_set_selected_index(&option_menu->menu_layer, MenuIndex(0, option_menu->choice), @@ -183,16 +183,14 @@ static void prv_window_unload(Window *window) { void option_menu_set_status_colors(OptionMenu *option_menu, GColor background, GColor foreground) { option_menu->status_colors.background = background; option_menu->status_colors.foreground = foreground; - status_bar_layer_set_colors(&option_menu->status_layer, - option_menu->status_colors.background, + status_bar_layer_set_colors(&option_menu->status_layer, option_menu->status_colors.background, option_menu->status_colors.foreground); } void option_menu_set_normal_colors(OptionMenu *option_menu, GColor background, GColor foreground) { option_menu->normal_colors.background = background; option_menu->normal_colors.foreground = foreground; - menu_layer_set_normal_colors(&option_menu->menu_layer, - option_menu->normal_colors.background, + menu_layer_set_normal_colors(&option_menu->menu_layer, option_menu->normal_colors.background, option_menu->normal_colors.foreground); } @@ -233,8 +231,7 @@ void option_menu_set_icons_enabled(OptionMenu *option_menu, bool icons_enabled) option_menu->icons_enabled = icons_enabled; } -void option_menu_configure(OptionMenu *option_menu, - const OptionMenuConfig *config) { +void option_menu_configure(OptionMenu *option_menu, const OptionMenuConfig *config) { option_menu_set_title(option_menu, config->title); option_menu_set_choice(option_menu, config->choice); option_menu_set_content_type(option_menu, config->content_type); @@ -246,9 +243,9 @@ void option_menu_configure(OptionMenu *option_menu, } void option_menu_init(OptionMenu *option_menu) { - *option_menu = (OptionMenu) { - .choice = OPTION_MENU_CHOICE_NONE, - .title_font = system_theme_get_font_for_default_size(TextStyleFont_MenuCellTitle), + *option_menu = (OptionMenu){ + .choice = OPTION_MENU_CHOICE_NONE, + .title_font = system_theme_get_font_for_default_size(TextStyleFont_MenuCellTitle), }; // radio button icons are enabled by default @@ -261,10 +258,10 @@ void option_menu_init(OptionMenu *option_menu) { window_init(&option_menu->window, WINDOW_NAME("OptionMenu")); window_set_user_data(&option_menu->window, option_menu); - window_set_window_handlers(&option_menu->window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(&option_menu->window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); StatusBarLayer *status_layer = &option_menu->status_layer; status_bar_layer_init(status_layer); @@ -272,10 +269,11 @@ void option_menu_init(OptionMenu *option_menu) { layer_add_child(&option_menu->window.layer, &status_layer->layer); MenuLayer *menu_layer = &option_menu->menu_layer; - GRect bounds = grect_inset(option_menu->window.layer.bounds, (GEdgeInsets) { - .top = STATUS_BAR_LAYER_HEIGHT, - .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT), - }); + GRect bounds = grect_inset(option_menu->window.layer.bounds, + (GEdgeInsets){ + .top = STATUS_BAR_LAYER_HEIGHT, + .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT), + }); menu_layer_init(menu_layer, &bounds); } @@ -309,22 +307,20 @@ void option_menu_system_draw_row(OptionMenu *option_menu, GContext *ctx, const L // On rectangular, always align to the left. On round, align to the right if we have an icon and // otherwise to the center. Icons on the right with text in the center looks very bad and wastes // text space. - const GTextAlignment text_alignment = - PBL_IF_RECT_ELSE(GTextAlignmentLeft, - option_menu->icons_enabled ? GTextAlignmentRight : GTextAlignmentCenter); + const GTextAlignment text_alignment = PBL_IF_RECT_ELSE( + GTextAlignmentLeft, option_menu->icons_enabled ? GTextAlignmentRight : GTextAlignmentCenter); GFont const title_font = option_menu->title_font; - const GSize text_size = graphics_text_layout_get_max_used_size(ctx, title, title_font, - *cell_frame, overflow_mode, - text_alignment, NULL); + const GSize text_size = graphics_text_layout_get_max_used_size( + ctx, title, title_font, *cell_frame, overflow_mode, text_alignment, NULL); GRect text_frame = *cell_frame; const int min_text_height = fonts_get_font_height(title_font); text_frame.size = text_size; const GAlign text_frame_alignment = PBL_IF_RECT_ELSE(GAlignLeft, option_menu->icons_enabled ? GAlignRight : GAlignCenter); grect_align(&text_frame, cell_frame, text_frame_alignment, true /* clips */); - const OptionMenuStyle * const style = prv_get_style(); - const int16_t text_inset = (text_size.h > min_text_height) ? style->text_inset_multi : - style->text_inset_single; + const OptionMenuStyle *const style = prv_get_style(); + const int16_t text_inset = + (text_size.h > min_text_height) ? style->text_inset_multi : style->text_inset_single; text_frame = grect_inset(text_frame, GEdgeInsets(0, text_inset)); text_frame.origin.y -= fonts_get_font_cap_offset(title_font); diff --git a/src/fw/applib/ui/option_menu_window.h b/src/fw/applib/ui/option_menu_window.h index 1c15375303..60e99c7e38 100644 --- a/src/fw/applib/ui/option_menu_window.h +++ b/src/fw/applib/ui/option_menu_window.h @@ -7,8 +7,8 @@ #define OPTION_MENU_CHOICE_NONE (-1) -#define OPTION_MENU_STATUS_SEPARATOR_MODE PBL_IF_RECT_ELSE(StatusBarLayerSeparatorModeDotted, \ - StatusBarLayerSeparatorModeNone) +#define OPTION_MENU_STATUS_SEPARATOR_MODE \ + PBL_IF_RECT_ELSE(StatusBarLayerSeparatorModeDotted, StatusBarLayerSeparatorModeNone) typedef struct OptionMenu OptionMenu; @@ -22,14 +22,11 @@ typedef uint16_t (*OptionMenuGetCellHeightCallback)(OptionMenu *option_menu, uin bool selected, void *context); typedef uint16_t (*OptionMenuSelectionChangedCallback)(OptionMenu *option_menu, uint16_t row, - bool selected, void *context); + bool selected, void *context); -typedef void (*OptionMenuSelectionWillChangeCallback)(OptionMenu *option_menu, - uint16_t new_row, - uint16_t old_row, - void *context); +typedef void (*OptionMenuSelectionWillChangeCallback)(OptionMenu *option_menu, uint16_t new_row, + uint16_t old_row, void *context); - typedef struct OptionMenuCallbacks { OptionMenuSelectCallback select; OptionMenuSelectionWillChangeCallback selection_will_change; diff --git a/src/fw/applib/ui/path_layer.c b/src/fw/applib/ui/path_layer.c index 11823328e9..97983deee0 100644 --- a/src/fw/applib/ui/path_layer.c +++ b/src/fw/applib/ui/path_layer.c @@ -4,7 +4,7 @@ #include "path_layer.h" #include "applib/graphics/graphics.h" -void path_layer_update_proc(PathLayer *path_layer, GContext* ctx) { +void path_layer_update_proc(PathLayer *path_layer, GContext *ctx) { if (!gcolor_is_transparent(path_layer->fill_color)) { graphics_context_set_fill_color(ctx, path_layer->fill_color); gpath_draw_filled(ctx, &path_layer->path); @@ -44,7 +44,6 @@ void path_layer_set_fill_color(PathLayer *path_layer, GColor color) { layer_mark_dirty(&(path_layer->layer)); } -Layer* path_layer_get_layer(const PathLayer *path_layer) { +Layer *path_layer_get_layer(const PathLayer *path_layer) { return &((PathLayer *)path_layer)->layer; } - diff --git a/src/fw/applib/ui/path_layer.h b/src/fw/applib/ui/path_layer.h index 5269b0c789..8ed5c13040 100644 --- a/src/fw/applib/ui/path_layer.h +++ b/src/fw/applib/ui/path_layer.h @@ -27,5 +27,4 @@ void path_layer_set_fill_color(PathLayer *path_layer, GColor color); //! @return The "root" Layer of the path layer. //! @internal //! @note The result is always equal to `(Layer *) path_layer`. -Layer* path_layer_get_layer(const PathLayer *path_layer); - +Layer *path_layer_get_layer(const PathLayer *path_layer); diff --git a/src/fw/applib/ui/progress_layer.c b/src/fw/applib/ui/progress_layer.c index a67a3b344c..5199f146b4 100644 --- a/src/fw/applib/ui/progress_layer.c +++ b/src/fw/applib/ui/progress_layer.c @@ -13,20 +13,19 @@ static int16_t scale_progress_bar_width_px(unsigned int progress_percent, int16_ return ((progress_percent * (rect_width_px)) / 100); } -void progress_layer_set_progress(ProgressLayer* progress_layer, unsigned int progress_percent) { +void progress_layer_set_progress(ProgressLayer *progress_layer, unsigned int progress_percent) { // Can't use the clip macro here because it fails with uints progress_layer->progress_percent = MIN(100, progress_percent); layer_mark_dirty(&progress_layer->layer); } -void progress_layer_update_proc(ProgressLayer* progress_layer, GContext* ctx) { +void progress_layer_update_proc(ProgressLayer *progress_layer, GContext *ctx) { const GRect *bounds = &progress_layer->layer.bounds; - int16_t progress_bar_width_px = scale_progress_bar_width_px(progress_layer->progress_percent, - bounds->size.w); - const GRect progress_bar = GRect(bounds->origin.x, bounds->origin.y, progress_bar_width_px, - bounds->size.h); - + int16_t progress_bar_width_px = + scale_progress_bar_width_px(progress_layer->progress_percent, bounds->size.w); + const GRect progress_bar = + GRect(bounds->origin.x, bounds->origin.y, progress_bar_width_px, bounds->size.h); const int16_t corner_radius = progress_layer->corner_radius; graphics_context_set_fill_color(ctx, progress_layer->background_color); @@ -42,28 +41,28 @@ void progress_layer_update_proc(ProgressLayer* progress_layer, GContext* ctx) { #endif } -void progress_layer_init(ProgressLayer* progress_layer, const GRect *frame) { +void progress_layer_init(ProgressLayer *progress_layer, const GRect *frame) { *progress_layer = (ProgressLayer){}; layer_init(&progress_layer->layer, frame); - progress_layer->layer.update_proc = (LayerUpdateProc) progress_layer_update_proc; + progress_layer->layer.update_proc = (LayerUpdateProc)progress_layer_update_proc; progress_layer->foreground_color = GColorBlack; progress_layer->background_color = GColorWhite; progress_layer->corner_radius = 1; } -void progress_layer_deinit(ProgressLayer* progress_layer) { +void progress_layer_deinit(ProgressLayer *progress_layer) { layer_deinit(&progress_layer->layer); } -void progress_layer_set_foreground_color(ProgressLayer* progress_layer, GColor color) { +void progress_layer_set_foreground_color(ProgressLayer *progress_layer, GColor color) { progress_layer->foreground_color = color; } -void progress_layer_set_background_color(ProgressLayer* progress_layer, GColor color) { +void progress_layer_set_background_color(ProgressLayer *progress_layer, GColor color) { progress_layer->background_color = color; } -void progress_layer_set_corner_radius(ProgressLayer* progress_layer, uint16_t corner_radius) { +void progress_layer_set_corner_radius(ProgressLayer *progress_layer, uint16_t corner_radius) { progress_layer->corner_radius = corner_radius; } diff --git a/src/fw/applib/ui/progress_layer.h b/src/fw/applib/ui/progress_layer.h index aa0d1499b3..bdbde7147f 100644 --- a/src/fw/applib/ui/progress_layer.h +++ b/src/fw/applib/ui/progress_layer.h @@ -28,15 +28,15 @@ typedef struct { //! This is because 2 pixels of white padding are placed around the progress //! bar, and the progress bar itself is bounded by a 2 pixel black rounded rect. //! For greatest sex appeal, make the progress bar larger than 8x8. -void progress_layer_init(ProgressLayer* progress_layer, const GRect *frame); +void progress_layer_init(ProgressLayer *progress_layer, const GRect *frame); -void progress_layer_deinit(ProgressLayer* progress_layer); +void progress_layer_deinit(ProgressLayer *progress_layer); -void progress_layer_set_foreground_color(ProgressLayer* progress_layer, GColor color); +void progress_layer_set_foreground_color(ProgressLayer *progress_layer, GColor color); -void progress_layer_set_background_color(ProgressLayer* progress_layer, GColor color); +void progress_layer_set_background_color(ProgressLayer *progress_layer, GColor color); //! Convenience function to set the progress layer's progress and mark the //! layer dirty. -void progress_layer_set_progress(ProgressLayer* progress_layer, unsigned int progress_percent); +void progress_layer_set_progress(ProgressLayer *progress_layer, unsigned int progress_percent); -void progress_layer_set_corner_radius(ProgressLayer* progress_layer, uint16_t corner_radius); +void progress_layer_set_corner_radius(ProgressLayer *progress_layer, uint16_t corner_radius); diff --git a/src/fw/applib/ui/progress_window.c b/src/fw/applib/ui/progress_window.c index 10796876cf..500e18d69e 100644 --- a/src/fw/applib/ui/progress_window.c +++ b/src/fw/applib/ui/progress_window.c @@ -57,8 +57,8 @@ static void prv_show_peek_layer(ProgressWindow *data) { layer_add_child(root_layer, (Layer *)peek_layer); const int standing_ms = 1 * MS_PER_SECOND; - data->peek_layer_timer = evented_timer_register(PEEK_LAYER_UNFOLD_DURATION + standing_ms, - false, prv_finished_failure_callback, data); + data->peek_layer_timer = evented_timer_register(PEEK_LAYER_UNFOLD_DURATION + standing_ms, false, + prv_finished_failure_callback, data); } else { prv_finished_failure_callback(data); } @@ -76,18 +76,18 @@ static void prv_schedule_progress_success_animation(ProgressWindow *data) { // Morph from progress_layer to a large transition dot to the compositor dot // by changing the bounds of the progress_layer using 2 animations - layer_set_clips((Layer *)&data->progress_layer, false); // Extending bounds to grow the dot + layer_set_clips((Layer *)&data->progress_layer, false); // Extending bounds to grow the dot progress_layer_set_corner_radius(&data->progress_layer, DOT_TRANSITION_RADIUS); mid.size.w = DOT_TRANSITION_RADIUS * 2; mid.size.h = DOT_TRANSITION_RADIUS * 2; mid.origin.x = DOT_OFFSET - DOT_TRANSITION_RADIUS + 2; - mid.origin.y = BAR_HEIGHT - DOT_TRANSITION_RADIUS + 1; // shift to accommodate growing radius + mid.origin.y = BAR_HEIGHT - DOT_TRANSITION_RADIUS + 1; // shift to accommodate growing radius end.size.w = DOT_COMPOSITOR_RADIUS * 2; end.size.h = DOT_COMPOSITOR_RADIUS * 2; end.origin.x = DOT_OFFSET - DOT_COMPOSITOR_RADIUS - 1; - end.origin.y = BAR_HEIGHT - DOT_COMPOSITOR_RADIUS - 2; // shift to accommodate growing radius + end.origin.y = BAR_HEIGHT - DOT_COMPOSITOR_RADIUS - 2; // shift to accommodate growing radius PropertyAnimation *prop_anim = property_animation_create_layer_bounds((Layer *)&data->progress_layer, &beg, &mid); @@ -101,9 +101,11 @@ static void prv_schedule_progress_success_animation(ProgressWindow *data) { Animation *animation2 = property_animation_get_animation(prop_anim); animation_set_duration(animation2, TRANS_TO_DOT_MS); animation_set_curve(animation2, AnimationCurveLinear); - animation_set_handlers(animation2, (AnimationHandlers) { - .stopped = prv_animation_stopped_success, - }, data); + animation_set_handlers(animation2, + (AnimationHandlers){ + .stopped = prv_animation_stopped_success, + }, + data); Animation *animation = animation_sequence_create(animation1, animation2, NULL); @@ -121,7 +123,7 @@ static void prv_schedule_progress_failure_animation(ProgressWindow *data, uint32 peek_layer_set_title_font(peek_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); TimelineResourceInfo timeline_res = { - .res_id = timeline_res_id, + .res_id = timeline_res_id, }; peek_layer_set_icon(peek_layer, &timeline_res); peek_layer_set_title(peek_layer, message); @@ -143,9 +145,11 @@ static void prv_schedule_progress_failure_animation(ProgressWindow *data, uint32 animation_set_delay(animation, delay); animation_set_duration(animation, SCROLL_OUT_MS); animation_set_curve(animation, AnimationCurveEaseOut); - animation_set_handlers(animation, (AnimationHandlers) { - .stopped = prv_animation_stopped_failure, - }, data); + animation_set_handlers(animation, + (AnimationHandlers){ + .stopped = prv_animation_stopped_failure, + }, + data); data->result_animation = animation; animation_schedule(animation); @@ -258,9 +262,9 @@ void progress_window_init(ProgressWindow *data) { const GRect *bounds = &window->layer.bounds; GPoint center = grect_center_point(bounds); - const GRect progress_bounds = (GRect) { - .origin = { center.x - (BAR_WIDTH / 2), center.y - (BAR_HEIGHT / 2) }, - .size = { BAR_WIDTH, BAR_HEIGHT }, + const GRect progress_bounds = (GRect){ + .origin = {center.x - (BAR_WIDTH / 2), center.y - (BAR_HEIGHT / 2)}, + .size = {BAR_WIDTH, BAR_HEIGHT}, }; ProgressLayer *progress_layer = &data->progress_layer; @@ -276,8 +280,8 @@ void progress_window_init(ProgressWindow *data) { data->state = ProgressWindowState_FakeProgress; data->is_peek_layer_used = false; - data->fake_progress_timer = evented_timer_register(FAKE_PROGRESS_UPDATE_INTERVAL, false, - prv_fake_update_progress, data); + data->fake_progress_timer = + evented_timer_register(FAKE_PROGRESS_UPDATE_INTERVAL, false, prv_fake_update_progress, data); prv_set_progress(data, INITIAL_PERCENT); } diff --git a/src/fw/applib/ui/progress_window.h b/src/fw/applib/ui/progress_window.h index e846559ba2..aa385a5351 100644 --- a/src/fw/applib/ui/progress_window.h +++ b/src/fw/applib/ui/progress_window.h @@ -52,7 +52,7 @@ struct ProgressWindow { Animation *result_animation; ProgressWindowCallbacks callbacks; - void *context; //!< context for above callbacks + void *context; //!< context for above callbacks //! What state we're in. ProgressWindowState state; @@ -70,7 +70,6 @@ struct ProgressWindow { bool is_peek_layer_used; }; - void progress_window_init(ProgressWindow *data); void progress_window_deinit(ProgressWindow *data); @@ -79,7 +78,6 @@ ProgressWindow *progress_window_create(void); void progress_window_destroy(ProgressWindow *window); - void progress_window_push(ProgressWindow *window, WindowStack *window_stack); //! Helper function to push a progress window to the app window stack. @@ -87,7 +85,6 @@ void app_progress_window_push(ProgressWindow *window); void progress_window_pop(ProgressWindow *window); - //! Set the maximum percentage we should fake progress to until real progress is required. void progress_window_set_max_fake_progress(ProgressWindow *window, int16_t max_fake_progress_percent); diff --git a/src/fw/applib/ui/property_animation.c b/src/fw/applib/ui/property_animation.c index 35b522dd42..17723370a6 100644 --- a/src/fw/applib/ui/property_animation.c +++ b/src/fw/applib/ui/property_animation.c @@ -18,23 +18,35 @@ // static const PropertyAnimationImplementation s_frame_layer_implementation = { - .base = { - .update = (AnimationUpdateImplementation) property_animation_update_grect, - }, - .accessors = { - .setter = { .grect = (const GRectSetter) layer_set_frame_by_value, }, - .getter = { .grect = (const GRectGetter) layer_get_frame_by_value, }, - }, + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_grect, + }, + .accessors = { + .setter = + { + .grect = (const GRectSetter)layer_set_frame_by_value, + }, + .getter = { + .grect = (const GRectGetter)layer_get_frame_by_value, + }, + }, }; static const PropertyAnimationImplementation s_bounds_layer_implementation = { - .base = { - .update = (AnimationUpdateImplementation) property_animation_update_grect, - }, - .accessors = { - .setter = { .grect = (const GRectSetter) layer_set_bounds_by_value, }, - .getter = { .grect = (const GRectGetter) layer_get_bounds_by_value, }, - }, + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_grect, + }, + .accessors = { + .setter = + { + .grect = (const GRectSetter)layer_set_bounds_by_value, + }, + .getter = { + .grect = (const GRectGetter)layer_get_bounds_by_value, + }, + }, }; // ----------------------------------------------------------------------------------------- @@ -42,7 +54,6 @@ static inline PropertyAnimationPrivate *prv_find_property_animation(PropertyAnim return (PropertyAnimationPrivate *)animation_private_animation_find((Animation *)handle); } - // ----------------------------------------------------------------------------------------- void property_animation_update_int16(PropertyAnimation *property_animation_h, const uint32_t distance_normalized) { @@ -50,7 +61,7 @@ void property_animation_update_int16(PropertyAnimation *property_animation_h, // We need to enable other applib modules like sroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. property_animation_legacy2_update_int16((PropertyAnimationLegacy2 *)property_animation_h, - distance_normalized); + distance_normalized); return; } @@ -59,18 +70,15 @@ void property_animation_update_int16(PropertyAnimation *property_animation_h, return; } - int16_t result = interpolate_int16(distance_normalized, - property_animation->values.from.int16, + int16_t result = interpolate_int16(distance_normalized, property_animation->values.from.int16, property_animation->values.to.int16); - ((PropertyAnimationImplementation*) - property_animation->animation.implementation) - ->accessors.setter.int16(property_animation->subject, result); + ((PropertyAnimationImplementation *)property_animation->animation.implementation) + ->accessors.setter.int16(property_animation->subject, result); } - // ----------------------------------------------------------------------------------------- void property_animation_update_uint32(PropertyAnimation *property_animation_h, - const uint32_t distance_normalized) { + const uint32_t distance_normalized) { PBL_ASSERTN(!animation_private_using_legacy_2(NULL)); PropertyAnimationPrivate *property_animation = prv_find_property_animation(property_animation_h); @@ -78,15 +86,12 @@ void property_animation_update_uint32(PropertyAnimation *property_animation_h, return; } - uint32_t result = interpolate_uint32(distance_normalized, - property_animation->values.from.uint32, + uint32_t result = interpolate_uint32(distance_normalized, property_animation->values.from.uint32, property_animation->values.to.uint32); - ((PropertyAnimationImplementation*) - property_animation->animation.implementation) + ((PropertyAnimationImplementation *)property_animation->animation.implementation) ->accessors.setter.uint32(property_animation->subject, result); } - // ----------------------------------------------------------------------------------------- void property_animation_update_gpoint(PropertyAnimation *property_animation_h, const uint32_t distance_normalized) { @@ -94,7 +99,7 @@ void property_animation_update_gpoint(PropertyAnimation *property_animation_h, // We need to enable other applib modules like sroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. property_animation_legacy2_update_gpoint((PropertyAnimationLegacy2 *)property_animation_h, - distance_normalized); + distance_normalized); return; } @@ -104,18 +109,14 @@ void property_animation_update_gpoint(PropertyAnimation *property_animation_h, } GPoint result; - result.x = interpolate_int16(distance_normalized, - property_animation->values.from.gpoint.x, + result.x = interpolate_int16(distance_normalized, property_animation->values.from.gpoint.x, property_animation->values.to.gpoint.x); - result.y = interpolate_int16(distance_normalized, - property_animation->values.from.gpoint.y, + result.y = interpolate_int16(distance_normalized, property_animation->values.from.gpoint.y, property_animation->values.to.gpoint.y); - ((PropertyAnimationImplementation*) - property_animation->animation.implementation) + ((PropertyAnimationImplementation *)property_animation->animation.implementation) ->accessors.setter.gpoint(property_animation->subject, result); } - // ----------------------------------------------------------------------------------------- void property_animation_update_grect(PropertyAnimation *property_animation_h, const uint32_t distance_normalized) { @@ -123,7 +124,7 @@ void property_animation_update_grect(PropertyAnimation *property_animation_h, // We need to enable other applib modules like sroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. property_animation_legacy2_update_grect((PropertyAnimationLegacy2 *)property_animation_h, - distance_normalized); + distance_normalized); return; } @@ -133,28 +134,22 @@ void property_animation_update_grect(PropertyAnimation *property_animation_h, } GRect result; - result.origin.x = interpolate_int16( - distance_normalized, - property_animation->values.from.grect.origin.x, - property_animation->values.to.grect.origin.x); - result.origin.y = interpolate_int16( - distance_normalized, - property_animation->values.from.grect.origin.y, - property_animation->values.to.grect.origin.y); - result.size.w = interpolate_int16( - distance_normalized, - property_animation->values.from.grect.size.w, - property_animation->values.to.grect.size.w); - result.size.h = interpolate_int16( - distance_normalized, - property_animation->values.from.grect.size.h, - property_animation->values.to.grect.size.h); - ((PropertyAnimationImplementation*) - property_animation->animation.implementation) + result.origin.x = + interpolate_int16(distance_normalized, property_animation->values.from.grect.origin.x, + property_animation->values.to.grect.origin.x); + result.origin.y = + interpolate_int16(distance_normalized, property_animation->values.from.grect.origin.y, + property_animation->values.to.grect.origin.y); + result.size.w = + interpolate_int16(distance_normalized, property_animation->values.from.grect.size.w, + property_animation->values.to.grect.size.w); + result.size.h = + interpolate_int16(distance_normalized, property_animation->values.from.grect.size.h, + property_animation->values.to.grect.size.h); + ((PropertyAnimationImplementation *)property_animation->animation.implementation) ->accessors.setter.grect(property_animation->subject, result); } - // ----------------------------------------------------------------------------------------- void property_animation_update_gtransform(PropertyAnimation *property_animation_h, const uint32_t distance_normalized) { @@ -166,41 +161,31 @@ void property_animation_update_gtransform(PropertyAnimation *property_animation_ } GTransform result; - result.a = interpolate_fixed32( - distance_normalized, - property_animation->values.from.gtransform.a, - property_animation->values.to.gtransform.a); - result.b = interpolate_fixed32( - distance_normalized, - property_animation->values.from.gtransform.b, - property_animation->values.to.gtransform.b); - result.c = interpolate_fixed32( - distance_normalized, - property_animation->values.from.gtransform.c, - property_animation->values.to.gtransform.c); - result.d = interpolate_fixed32( - distance_normalized, - property_animation->values.from.gtransform.d, - property_animation->values.to.gtransform.d); - result.tx = interpolate_fixed32( - distance_normalized, - property_animation->values.from.gtransform.tx, - property_animation->values.to.gtransform.tx); - result.ty = interpolate_fixed32( - distance_normalized, - property_animation->values.from.gtransform.ty, - property_animation->values.to.gtransform.ty); + result.a = interpolate_fixed32(distance_normalized, property_animation->values.from.gtransform.a, + property_animation->values.to.gtransform.a); + result.b = interpolate_fixed32(distance_normalized, property_animation->values.from.gtransform.b, + property_animation->values.to.gtransform.b); + result.c = interpolate_fixed32(distance_normalized, property_animation->values.from.gtransform.c, + property_animation->values.to.gtransform.c); + result.d = interpolate_fixed32(distance_normalized, property_animation->values.from.gtransform.d, + property_animation->values.to.gtransform.d); + result.tx = + interpolate_fixed32(distance_normalized, property_animation->values.from.gtransform.tx, + property_animation->values.to.gtransform.tx); + result.ty = + interpolate_fixed32(distance_normalized, property_animation->values.from.gtransform.ty, + property_animation->values.to.gtransform.ty); // NOTE: We are not exposing the GTransform in the public SDK, so the setter and getter // must be typecast - GTransformSetter setter = (GTransformSetter)(void *)((PropertyAnimationImplementation*) - property_animation->animation.implementation) - ->accessors.setter.int16; + GTransformSetter setter = + (GTransformSetter)(void *)((PropertyAnimationImplementation *) + property_animation->animation.implementation) + ->accessors.setter.int16; setter(property_animation->subject, result); } - // ----------------------------------------------------------------------------------------- void property_animation_update_gcolor8(PropertyAnimation *property_animation_h, const uint32_t distance_normalized) { @@ -212,29 +197,19 @@ void property_animation_update_gcolor8(PropertyAnimation *property_animation_h, } GColor8 result; - result.a = interpolate_int16( - distance_normalized, - property_animation->values.from.gcolor8.a, - property_animation->values.to.gcolor8.a); - result.r = interpolate_int16( - distance_normalized, - property_animation->values.from.gcolor8.r, - property_animation->values.to.gcolor8.r); - result.g = interpolate_int16( - distance_normalized, - property_animation->values.from.gcolor8.g, - property_animation->values.to.gcolor8.g); - result.b = interpolate_int16( - distance_normalized, - property_animation->values.from.gcolor8.b, - property_animation->values.to.gcolor8.b); - - ((PropertyAnimationImplementation*) - property_animation->animation.implementation) + result.a = interpolate_int16(distance_normalized, property_animation->values.from.gcolor8.a, + property_animation->values.to.gcolor8.a); + result.r = interpolate_int16(distance_normalized, property_animation->values.from.gcolor8.r, + property_animation->values.to.gcolor8.r); + result.g = interpolate_int16(distance_normalized, property_animation->values.from.gcolor8.g, + property_animation->values.to.gcolor8.g); + result.b = interpolate_int16(distance_normalized, property_animation->values.from.gcolor8.b, + property_animation->values.to.gcolor8.b); + + ((PropertyAnimationImplementation *)property_animation->animation.implementation) ->accessors.setter.gcolor8(property_animation->subject, result); } - // ----------------------------------------------------------------------------------------- void property_animation_update_fixed_s32_16(PropertyAnimation *property_animation_h, const uint32_t distance_normalized) { @@ -245,96 +220,96 @@ void property_animation_update_fixed_s32_16(PropertyAnimation *property_animatio return; } - Fixed_S32_16 result = interpolate_fixed32(distance_normalized, - property_animation->values.from.fixed_s32_16, - property_animation->values.to.fixed_s32_16); + Fixed_S32_16 result = + interpolate_fixed32(distance_normalized, property_animation->values.from.fixed_s32_16, + property_animation->values.to.fixed_s32_16); // NOTE: We are not exposing the Fixed_S32_16 in the public SDK, so the setter and getter // must be typecast - Fixed_S32_16Setter setter = (Fixed_S32_16Setter)(void *)((PropertyAnimationImplementation*) - property_animation->animation.implementation) - ->accessors.setter.int16; + Fixed_S32_16Setter setter = + (Fixed_S32_16Setter)(void *)((PropertyAnimationImplementation *) + property_animation->animation.implementation) + ->accessors.setter.int16; setter(property_animation->subject, result); } - // ----------------------------------------------------------------------------------------- static void prv_init(PropertyAnimationPrivate *property_animation, - const PropertyAnimationImplementation *implementation, - void *subject, void *from_value, void *to_value) { + const PropertyAnimationImplementation *implementation, void *subject, + void *from_value, void *to_value) { property_animation->animation.is_property_animation = true; memset(&property_animation->values, 0xff, sizeof(property_animation->values)); - property_animation->animation.implementation = (AnimationImplementation*) implementation; + property_animation->animation.implementation = (AnimationImplementation *)implementation; property_animation->subject = subject; if (implementation->accessors.getter.int16) { - if (property_animation->animation.implementation->update - == (AnimationUpdateImplementation) property_animation_update_int16) { - property_animation->values.to.int16 = to_value ? *((int16_t *)to_value) - : implementation->accessors.getter.int16(subject); - property_animation->values.from.int16 = from_value ? *((int16_t*)from_value) - : implementation->accessors.getter.int16(subject); - - } else if (property_animation->animation.implementation->update - == (AnimationUpdateImplementation) property_animation_update_uint32) { - property_animation->values.to.uint32 = to_value ? *((uint32_t *)to_value) - : implementation->accessors.getter.uint32(subject); - property_animation->values.from.uint32 = from_value ? *((uint32_t *)from_value) - : implementation->accessors.getter.uint32(subject); - - } else if (property_animation->animation.implementation->update - == (AnimationUpdateImplementation) property_animation_update_gpoint) { - property_animation->values.to.gpoint = to_value ? *((GPoint*)to_value) - : implementation->accessors.getter.gpoint(subject); - property_animation->values.from.gpoint = from_value ? *((GPoint*)from_value) - : implementation->accessors.getter.gpoint(subject); - - } else if (property_animation->animation.implementation->update - == (AnimationUpdateImplementation)property_animation_update_grect) { - property_animation->values.to.grect = to_value ? *((GRect*)to_value) - : implementation->accessors.getter.grect(subject); - property_animation->values.from.grect = from_value ? *((GRect*)from_value) - : implementation->accessors.getter.grect(subject); - - } else if (property_animation->animation.implementation->update - == (AnimationUpdateImplementation)property_animation_update_gtransform) { + if (property_animation->animation.implementation->update == + (AnimationUpdateImplementation)property_animation_update_int16) { + property_animation->values.to.int16 = + to_value ? *((int16_t *)to_value) : implementation->accessors.getter.int16(subject); + property_animation->values.from.int16 = + from_value ? *((int16_t *)from_value) : implementation->accessors.getter.int16(subject); + + } else if (property_animation->animation.implementation->update == + (AnimationUpdateImplementation)property_animation_update_uint32) { + property_animation->values.to.uint32 = + to_value ? *((uint32_t *)to_value) : implementation->accessors.getter.uint32(subject); + property_animation->values.from.uint32 = + from_value ? *((uint32_t *)from_value) : implementation->accessors.getter.uint32(subject); + + } else if (property_animation->animation.implementation->update == + (AnimationUpdateImplementation)property_animation_update_gpoint) { + property_animation->values.to.gpoint = + to_value ? *((GPoint *)to_value) : implementation->accessors.getter.gpoint(subject); + property_animation->values.from.gpoint = + from_value ? *((GPoint *)from_value) : implementation->accessors.getter.gpoint(subject); + + } else if (property_animation->animation.implementation->update == + (AnimationUpdateImplementation)property_animation_update_grect) { + property_animation->values.to.grect = + to_value ? *((GRect *)to_value) : implementation->accessors.getter.grect(subject); + property_animation->values.from.grect = + from_value ? *((GRect *)from_value) : implementation->accessors.getter.grect(subject); + + } else if (property_animation->animation.implementation->update == + (AnimationUpdateImplementation)property_animation_update_gtransform) { // NOTE: We are not exposing the GTransform in the public SDK, so the setter and getter // must be typecast - GTransformGetter getter = (GTransformGetter)(void *)((PropertyAnimationImplementation*) - property_animation->animation.implementation) - ->accessors.getter.int16; - property_animation->values.to.gtransform = to_value ? *((GTransform*)to_value) - : getter(subject); - property_animation->values.from.gtransform = from_value ? *((GTransform*)from_value) - : getter(subject); - - } else if (property_animation->animation.implementation->update - == (AnimationUpdateImplementation)property_animation_update_gcolor8) { - property_animation->values.to.gcolor8 = to_value ? *((GColor8*)to_value) - : implementation->accessors.getter.gcolor8(subject); - property_animation->values.from.gcolor8 = from_value ? *((GColor8*)from_value) - : implementation->accessors.getter.gcolor8(subject); - - } else if (property_animation->animation.implementation->update - == (AnimationUpdateImplementation)property_animation_update_fixed_s32_16) { + GTransformGetter getter = + (GTransformGetter)(void *)((PropertyAnimationImplementation *) + property_animation->animation.implementation) + ->accessors.getter.int16; + property_animation->values.to.gtransform = + to_value ? *((GTransform *)to_value) : getter(subject); + property_animation->values.from.gtransform = + from_value ? *((GTransform *)from_value) : getter(subject); + + } else if (property_animation->animation.implementation->update == + (AnimationUpdateImplementation)property_animation_update_gcolor8) { + property_animation->values.to.gcolor8 = + to_value ? *((GColor8 *)to_value) : implementation->accessors.getter.gcolor8(subject); + property_animation->values.from.gcolor8 = + from_value ? *((GColor8 *)from_value) : implementation->accessors.getter.gcolor8(subject); + + } else if (property_animation->animation.implementation->update == + (AnimationUpdateImplementation)property_animation_update_fixed_s32_16) { // NOTE: We are not exposing the Fixed_S32_16 in the public SDK, so the setter and getter // must be typecast - Fixed_S32_16Getter getter = (Fixed_S32_16Getter)(void *)((PropertyAnimationImplementation*) - property_animation->animation.implementation) - ->accessors.getter.int16; - property_animation->values.to.fixed_s32_16 = to_value ? *((Fixed_S32_16*)to_value) - : getter(subject); - property_animation->values.from.fixed_s32_16 = from_value ? *((Fixed_S32_16*)from_value) - : getter(subject); + Fixed_S32_16Getter getter = + (Fixed_S32_16Getter)(void *)((PropertyAnimationImplementation *) + property_animation->animation.implementation) + ->accessors.getter.int16; + property_animation->values.to.fixed_s32_16 = + to_value ? *((Fixed_S32_16 *)to_value) : getter(subject); + property_animation->values.from.fixed_s32_16 = + from_value ? *((Fixed_S32_16 *)from_value) : getter(subject); } } } - // ----------------------------------------------------------------------------------------- -PropertyAnimation *property_animation_create( - const PropertyAnimationImplementation *implementation, - void *subject, void *from_value, void *to_value) { +PropertyAnimation *property_animation_create(const PropertyAnimationImplementation *implementation, + void *subject, void *from_value, void *to_value) { if (animation_private_using_legacy_2(NULL)) { // We need to enable other applib modules like sroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. @@ -342,7 +317,7 @@ PropertyAnimation *property_animation_create( (PropertyAnimationLegacy2Implementation *)implementation, subject, from_value, to_value); } - PropertyAnimationPrivate* property_animation = applib_type_malloc(PropertyAnimationPrivate); + PropertyAnimationPrivate *property_animation = applib_type_malloc(PropertyAnimationPrivate); if (!property_animation) { return NULL; } @@ -352,30 +327,28 @@ PropertyAnimation *property_animation_create( return (PropertyAnimation *)handle; } - // ----------------------------------------------------------------------------------------- // Create a new property animation structure, copying just the property animation unique fields PropertyAnimationPrivate *property_animation_private_clone(PropertyAnimationPrivate *from) { PBL_ASSERTN(!animation_private_using_legacy_2(NULL)); - PropertyAnimationPrivate* property_animation = applib_type_malloc(PropertyAnimationPrivate); + PropertyAnimationPrivate *property_animation = applib_type_malloc(PropertyAnimationPrivate); if (!property_animation) { return NULL; } memset(property_animation, 0, sizeof(*property_animation)); uint8_t *dst = (uint8_t *)property_animation; uint8_t *src = (uint8_t *)from; - uint32_t offset = sizeof(AnimationPrivate); // Skip the base class fields + uint32_t offset = sizeof(AnimationPrivate); // Skip the base class fields uint32_t size = sizeof(PropertyAnimationPrivate) - offset; memcpy(dst + offset, src + offset, size); return property_animation; } - // ----------------------------------------------------------------------------------------- bool property_animation_init(PropertyAnimation *animation_h, - const PropertyAnimationImplementation *implementation, - void *subject, void *from_value, void *to_value) { + const PropertyAnimationImplementation *implementation, void *subject, + void *from_value, void *to_value) { if (animation_private_using_legacy_2(NULL)) { // We need to enable other applib modules like sroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. @@ -397,28 +370,28 @@ bool property_animation_init(PropertyAnimation *animation_h, } // ----------------------------------------------------------------------------------------- -PropertyAnimation* property_animation_create_layer_frame(struct Layer *layer, GRect *from_frame, +PropertyAnimation *property_animation_create_layer_frame(struct Layer *layer, GRect *from_frame, GRect *to_frame) { if (animation_private_using_legacy_2(NULL)) { // We need to enable other applib modules like sroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. - return (PropertyAnimation *)property_animation_legacy2_create_layer_frame(layer, - from_frame, to_frame); + return (PropertyAnimation *)property_animation_legacy2_create_layer_frame(layer, from_frame, + to_frame); } return property_animation_create(&s_frame_layer_implementation, layer, from_frame, to_frame); } // ----------------------------------------------------------------------------------------- -PropertyAnimation* property_animation_create_layer_bounds(struct Layer *layer, GRect *from_bounds, +PropertyAnimation *property_animation_create_layer_bounds(struct Layer *layer, GRect *from_bounds, GRect *to_bounds) { // no legacy2 support as this was never exposed on 2.x return property_animation_create(&s_bounds_layer_implementation, layer, from_bounds, to_bounds); } // ----------------------------------------------------------------------------------------- -bool property_animation_init_layer_frame(PropertyAnimation *animation_h, - struct Layer *layer, GRect *from_frame, GRect *to_frame) { +bool property_animation_init_layer_frame(PropertyAnimation *animation_h, struct Layer *layer, + GRect *from_frame, GRect *to_frame) { if (animation_private_using_legacy_2(NULL)) { // We need to enable other applib modules like sroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. @@ -427,7 +400,7 @@ bool property_animation_init_layer_frame(PropertyAnimation *animation_h, return true; } return property_animation_init(animation_h, &s_frame_layer_implementation, layer, from_frame, - to_frame); + to_frame); } // ----------------------------------------------------------------------------------------- @@ -435,8 +408,8 @@ bool property_animation_init_layer_frame(PropertyAnimation *animation_h, PropertyAnimation *property_animation_create_bounds_origin(Layer *layer, GPoint *from, GPoint *to) { // no legacy2 support as this was never exposed on 2.x - PropertyAnimation *result = property_animation_create(&s_bounds_layer_implementation, - layer, NULL, NULL); + PropertyAnimation *result = + property_animation_create(&s_bounds_layer_implementation, layer, NULL, NULL); GRect value = layer->bounds; if (from) { @@ -453,14 +426,13 @@ PropertyAnimation *property_animation_create_bounds_origin(Layer *layer, GPoint return result; } - // ----------------------------------------------------------------------------------------- -static void property_animation_update_mark_dirty(Animation* animation, +static void property_animation_update_mark_dirty(Animation *animation, const AnimationProgress normalized) { PropertyAnimation *prop_anim = (PropertyAnimation *)animation; Layer *subject; - if (property_animation_get_subject(prop_anim, (void**)&subject) && subject) { + if (property_animation_get_subject(prop_anim, (void **)&subject) && subject) { layer_mark_dirty(subject); } } @@ -473,14 +445,14 @@ static const PropertyAnimationImplementation s_dirty_layer_implementation = { PropertyAnimation *property_animation_create_mark_dirty(struct Layer *layer) { // no legacy2 support as this was never exposed on 2.x - PropertyAnimation *result = property_animation_create(&s_dirty_layer_implementation, - layer, NULL, NULL); + PropertyAnimation *result = + property_animation_create(&s_dirty_layer_implementation, layer, NULL, NULL); return result; } // ----------------------------------------------------------------------------------------- -void property_animation_destroy(PropertyAnimation* property_animation_h) { +void property_animation_destroy(PropertyAnimation *property_animation_h) { if (animation_private_using_legacy_2(NULL)) { // We need to enable other applib modules like sroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. @@ -490,7 +462,6 @@ void property_animation_destroy(PropertyAnimation* property_animation_h) { animation_destroy((Animation *)property_animation_h); } - // ----------------------------------------------------------------------------------------- Animation *property_animation_get_animation(PropertyAnimation *property_animation) { return (Animation *)property_animation; @@ -525,7 +496,6 @@ bool property_animation_subject(PropertyAnimation *property_animation_h, void ** return true; } - // ----------------------------------------------------------------------------------------- bool property_animation_from(PropertyAnimation *property_animation_h, void *value, size_t size, bool set) { @@ -564,7 +534,7 @@ bool property_animation_from(PropertyAnimation *property_animation_h, void *valu // ----------------------------------------------------------------------------------------- bool property_animation_to(PropertyAnimation *property_animation_h, void *value, size_t size, - bool set) { + bool set) { if (!value) { return false; } diff --git a/src/fw/applib/ui/property_animation.h b/src/fw/applib/ui/property_animation.h index 066ec2b3e1..8e95928b8b 100644 --- a/src/fw/applib/ui/property_animation.h +++ b/src/fw/applib/ui/property_animation.h @@ -99,7 +99,8 @@ typedef uint32_t (*UInt32Getter)(void *subject); //! @see \ref PropertyAnimationAccessors typedef void (*GPointSetter)(void *subject, GPoint gpoint); -//! Function signature of a getter function to get the current property of type GPoint of the subject. +//! Function signature of a getter function to get the current property of type GPoint of the +//! subject. //! @see \ref property_animation_create() //! @see \ref PropertyAnimationAccessors typedef GPointReturn (*GPointGetter)(void *subject); @@ -109,7 +110,8 @@ typedef GPointReturn (*GPointGetter)(void *subject); //! @see \ref PropertyAnimationAccessors typedef void (*GRectSetter)(void *subject, GRect grect); -//! Function signature of a getter function to get the current property of type GRect of the subject. +//! Function signature of a getter function to get the current property of type GRect of the +//! subject. //! @see \ref property_animation_create() //! @see \ref PropertyAnimationAccessors typedef GRectReturn (*GRectGetter)(void *subject); @@ -172,8 +174,8 @@ typedef struct PropertyAnimationAccessors { UInt32Setter uint32; } setter; //! Function pointer to the implementation of the function that __gets__ the current property - //! value. This function will be called during \ref property_animation_create(), to get the current - //! property value, in case the `from_value` or `to_value` argument is `NULL`. + //! value. This function will be called during \ref property_animation_create(), to get the + //! current property value, in case the `from_value` or `to_value` argument is `NULL`. //! @see PropertyAnimationAccessors union { //! Use if the property to animate is of int16_t type @@ -199,7 +201,6 @@ typedef struct PropertyAnimationImplementation { PropertyAnimationAccessors accessors; } PropertyAnimationImplementation; - //! Convenience function to create and initialize a property animation that animates the frame of a //! Layer. It sets up the PropertyAnimation to use \ref layer_set_frame() and \ref layer_get_frame() //! as accessors and uses the `layer` parameter as the subject for the animation. @@ -227,7 +228,7 @@ PropertyAnimation *property_animation_create_layer_frame(struct Layer *layer, GR //! frame of the layer. //! @return A handle to the property animation. `NULL` if animation could not be created PropertyAnimation *property_animation_create_layer_bounds(struct Layer *layer, GRect *from_bounds, - GRect *to_bounds); + GRect *to_bounds); //! Convenience function to create and initialize a property animation that animates the bound's //! origin of a Layer. It sets up the PropertyAnimation to use layer_set_bounds() and @@ -238,12 +239,10 @@ PropertyAnimation *property_animation_create_layer_bounds(struct Layer *layer, G //! @param to the origin that the layer should animate to //! @return A handle to the property animation. `NULL` if animation could not be created PropertyAnimation *property_animation_create_bounds_origin(struct Layer *layer, GPoint *from, - GPoint *to); - + GPoint *to); PropertyAnimation *property_animation_create_mark_dirty(struct Layer *layer); - //! @internal //! Convenience function to re-initialize an already instantiated layer frame animation. //! @param layer the layer that will be animated @@ -253,14 +252,12 @@ PropertyAnimation *property_animation_create_mark_dirty(struct Layer *layer); //! current frame. This will result in a call to \ref layer_get_frame() to get the current frame of //! the layer. //! @return true if successful -bool property_animation_init_layer_frame(PropertyAnimation *animation_h, - struct Layer *layer, GRect *from_frame, GRect *to_frame); - +bool property_animation_init_layer_frame(PropertyAnimation *animation_h, struct Layer *layer, + GRect *from_frame, GRect *to_frame); //! Destroy a property animation allocated by property_animation_create() or relatives. //! @param property_animation the return value from property_animation_create -void property_animation_destroy(PropertyAnimation* property_animation); - +void property_animation_destroy(PropertyAnimation *property_animation); //! Convenience function to retrieve an animation instance from a property animation instance //! @param property_animation The property animation @@ -271,220 +268,216 @@ Animation *property_animation_get_animation(PropertyAnimation *property_animatio //! @param property_animation The property animation //! @return A clone of the original Animation #define property_animation_clone(property_animation) \ - (PropertyAnimation *)animation_clone((Animation *)property_animation) + (PropertyAnimation *)animation_clone((Animation *)property_animation) //! Convenience function to retrieve the 'from' GRect value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_from_grect(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(GRect), false) + property_animation_from(property_animation, value_ptr, sizeof(GRect), false) //! Convenience function to set the 'from' GRect value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_from_grect(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(GRect), true) + property_animation_from(property_animation, value_ptr, sizeof(GRect), true) //! Convenience function to retrieve the 'from' GPoint value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_from_gpoint(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(GPoint), false) + property_animation_from(property_animation, value_ptr, sizeof(GPoint), false) //! Convenience function to set the 'from' GPoint value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_from_gpoint(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(GPoint), true) + property_animation_from(property_animation, value_ptr, sizeof(GPoint), true) //! Convenience function to retrieve the 'from' int16_t value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_from_int16(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(int16_t), false) + property_animation_from(property_animation, value_ptr, sizeof(int16_t), false) //! Convenience function to set the 'from' int16_t value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_from_int16(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(int16_t), true) + property_animation_from(property_animation, value_ptr, sizeof(int16_t), true) //! Convenience function to retrieve the 'from' uint32_t value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_from_uint32(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(uint32_t), false) + property_animation_from(property_animation, value_ptr, sizeof(uint32_t), false) //! Convenience function to set the 'from' uint32_t value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_from_uint32(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(uint32_t), true) + property_animation_from(property_animation, value_ptr, sizeof(uint32_t), true) //! Convenience function to retrieve the 'from' GTransform value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_from_gtransform(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(GTransform), false) + property_animation_from(property_animation, value_ptr, sizeof(GTransform), false) //! Convenience function to set the 'from' GTransform value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_from_gtransform(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(GTransform), true) + property_animation_from(property_animation, value_ptr, sizeof(GTransform), true) //! Convenience function to retrieve the 'from' GColor8 value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_from_gcolor8(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(GColor8), false) + property_animation_from(property_animation, value_ptr, sizeof(GColor8), false) //! Convenience function to set the 'from' GColor8 value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_from_gcolor8(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(GColor8), true) + property_animation_from(property_animation, value_ptr, sizeof(GColor8), true) //! Convenience function to retrieve the 'from' Fixed_S32_16 value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_from_fixed_s32_16(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(Fixed_S32_16), false) + property_animation_from(property_animation, value_ptr, sizeof(Fixed_S32_16), false) //! Convenience function to set the 'from' Fixed_S32_16 value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_from_fixed_s32_16(property_animation, value_ptr) \ - property_animation_from(property_animation, value_ptr, sizeof(Fixed_S32_16), true) - - + property_animation_from(property_animation, value_ptr, sizeof(Fixed_S32_16), true) //! Convenience function to retrieve the 'to' GRect value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_to_grect(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(GRect), false) + property_animation_to(property_animation, value_ptr, sizeof(GRect), false) //! Convenience function to set the 'to' GRect value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_to_grect(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(GRect), true) + property_animation_to(property_animation, value_ptr, sizeof(GRect), true) //! Convenience function to retrieve the 'to' GPoint value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_to_gpoint(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(GPoint), false) + property_animation_to(property_animation, value_ptr, sizeof(GPoint), false) //! Convenience function to set the 'to' GPoint value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_to_gpoint(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(GPoint), true) + property_animation_to(property_animation, value_ptr, sizeof(GPoint), true) //! Convenience function to retrieve the 'to' int16_t value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_to_int16(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(int16_t), false) + property_animation_to(property_animation, value_ptr, sizeof(int16_t), false) //! Convenience function to set the 'to' int16_t value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_to_int16(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(int16_t), true) + property_animation_to(property_animation, value_ptr, sizeof(int16_t), true) //! Convenience function to retrieve the 'to' uint32_t value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_to_uint32(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(uint32_t), false) + property_animation_to(property_animation, value_ptr, sizeof(uint32_t), false) //! Convenience function to set the 'to' uint32_t value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_to_uint32(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(uint32_t), true) + property_animation_to(property_animation, value_ptr, sizeof(uint32_t), true) //! Convenience function to retrieve the 'to' GTransform value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_to_gtransform(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(GTransform), false) + property_animation_to(property_animation, value_ptr, sizeof(GTransform), false) //! Convenience function to set the 'to' GTransform value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_to_gtransform(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(GTransform), true) + property_animation_to(property_animation, value_ptr, sizeof(GTransform), true) //! Convenience function to retrieve the 'to' GColor8 value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_to_gcolor8(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(GColor8), false) + property_animation_to(property_animation, value_ptr, sizeof(GColor8), false) //! Convenience function to set the 'to' GColor8 value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_to_gcolor8(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(GColor8), true) + property_animation_to(property_animation, value_ptr, sizeof(GColor8), true) //! Convenience function to retrieve the 'to' Fixed_S32_16 value from property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr The value will be retrieved into this pointer //! @return true on success, false on failure #define property_animation_get_to_fixed_s32_16(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(Fixed_S32_16), false) + property_animation_to(property_animation, value_ptr, sizeof(Fixed_S32_16), false) //! Convenience function to set the 'to' Fixed_S32_16 value of property animation handle //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new value //! @return true on success, false on failure #define property_animation_set_to_fixed_s32_16(property_animation, value_ptr) \ - property_animation_to(property_animation, value_ptr, sizeof(Fixed_S32_16), true) - + property_animation_to(property_animation, value_ptr, sizeof(Fixed_S32_16), true) //! Retrieve the subject of a property animation //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer used to store the subject of this property animation //! @return The subject of this PropertyAnimation #define property_animation_get_subject(property_animation, value_ptr) \ - property_animation_subject(property_animation, value_ptr, false) + property_animation_subject(property_animation, value_ptr, false) //! Set the subject of a property animation //! @param property_animation The PropertyAnimation to be accessed //! @param value_ptr Pointer to the new subject value #define property_animation_set_subject(property_animation, value_ptr) \ - property_animation_subject(property_animation, value_ptr, true) - + property_animation_subject(property_animation, value_ptr, true) //////////////////////////////////////////////////////////////////////////////// // Primitive helper functions for the property_animation_get|set.* macros @@ -497,7 +490,6 @@ Animation *property_animation_get_animation(PropertyAnimation *property_animatio //! @return true if successful, false on failure (usually a bad animation_h) bool property_animation_subject(PropertyAnimation *property_animation, void **subject, bool set); - //! Helper function used by the property_animation_get|set_from_.* macros //! @param property_animation Handle to the property animation //! @param from Pointer to the value @@ -505,7 +497,7 @@ bool property_animation_subject(PropertyAnimation *property_animation, void **su //! @param set true to set new value, false to retrieve existing one //! @return true if successful, false on failure (usually a bad animation_h) bool property_animation_from(PropertyAnimation *property_animation, void *from, size_t size, - bool set); + bool set); //! Helper function used by the property_animation_get|set_to_.* macros //! @param property_animation handle to the property animation @@ -513,9 +505,7 @@ bool property_animation_from(PropertyAnimation *property_animation, void *from, //! @param size Size of the to value //! @param set true to set new value, false to retrieve existing one //! @return true if successful, false on failure (usually a bad animation_h) -bool property_animation_to(PropertyAnimation *property_animation, void *to, size_t size, - bool set); - +bool property_animation_to(PropertyAnimation *property_animation, void *to, size_t size, bool set); ////////////////////////////////////////// // Implementing custom Property Animations @@ -538,8 +528,8 @@ bool property_animation_to(PropertyAnimation *property_animation, void *to, size //! both `from_value` and `to_value`, will result in the animation having the same from- and to- //! values, effectively not doing anything. //! @return A handle to the property animation. `NULL` if animation could not be created -PropertyAnimation* property_animation_create(const PropertyAnimationImplementation *implementation, - void *subject, void *from_value, void *to_value); +PropertyAnimation *property_animation_create(const PropertyAnimationImplementation *implementation, + void *subject, void *from_value, void *to_value); //! @internal //! Convenience function to re-initialize an already instantiated property animation. @@ -557,9 +547,8 @@ PropertyAnimation* property_animation_create(const PropertyAnimationImplementati //! values, effectively not doing anything. //! @return true if successful bool property_animation_init(PropertyAnimation *animation_h, - const PropertyAnimationImplementation *implementation, - void *subject, void *from_value, void *to_value); - + const PropertyAnimationImplementation *implementation, void *subject, + void *from_value, void *to_value); //! Default update callback for a property animations to update a property of type int16_t. //! Assign this function to the `.base.update` callback field of your diff --git a/src/fw/applib/ui/property_animation_private.h b/src/fw/applib/ui/property_animation_private.h index bed84be64a..ae6990fffb 100644 --- a/src/fw/applib/ui/property_animation_private.h +++ b/src/fw/applib/ui/property_animation_private.h @@ -48,8 +48,8 @@ typedef struct { //! Valid when the property being animated is of type uint32_t uint32_t uint32; } from; - } values; //! See detail table - void *subject; //! The subject of the animation of which the property should be animated. + } values; //! See detail table + void *subject; //! The subject of the animation of which the property should be animated. } PropertyAnimationPrivate; -PropertyAnimationPrivate* property_animation_private_clone(PropertyAnimationPrivate *from); +PropertyAnimationPrivate *property_animation_private_clone(PropertyAnimationPrivate *from); diff --git a/src/fw/applib/ui/qr_code.c b/src/fw/applib/ui/qr_code.c index 17c58650b7..880d34fddd 100644 --- a/src/fw/applib/ui/qr_code.c +++ b/src/fw/applib/ui/qr_code.c @@ -37,8 +37,8 @@ static void prv_qr_code_update_proc(QRCode *qr_code, GContext *ctx) { GColor old_fill_color; bool ret; - if ((qr_code->data == NULL) || (qr_code->data_len == 0U) || - (qr_code->layer.bounds.size.w <= 0) || (qr_code->layer.bounds.size.h <= 0)) { + if ((qr_code->data == NULL) || (qr_code->data_len == 0U) || (qr_code->layer.bounds.size.w <= 0) || + (qr_code->layer.bounds.size.h <= 0)) { return; } @@ -114,7 +114,8 @@ static void prv_qr_code_update_proc(QRCode *qr_code, GContext *ctx) { } void qr_code_init_with_parameters(QRCode *qr_code, const GRect *frame, const void *data, - size_t data_len, QRCodeECC ecc, GColor fg_color, GColor bg_color) { + size_t data_len, QRCodeECC ecc, GColor fg_color, + GColor bg_color) { PBL_ASSERTN(qr_code); *qr_code = (QRCode){}; qr_code->layer.frame = *frame; @@ -126,24 +127,23 @@ void qr_code_init_with_parameters(QRCode *qr_code, const GRect *frame, const voi qr_code->fg_color = fg_color; qr_code->bg_color = bg_color; layer_set_clips(&qr_code->layer, true); - + layer_mark_dirty(&qr_code->layer); } void qr_code_init(QRCode *qr_code, const GRect *frame) { - qr_code_init_with_parameters(qr_code, frame, NULL, 0, QRCodeECCMedium, - GColorBlack, GColorWhite); + qr_code_init_with_parameters(qr_code, frame, NULL, 0, QRCodeECCMedium, GColorBlack, GColorWhite); } -QRCode* qr_code_create(GRect frame) { - QRCode* qr_code = applib_type_malloc(QRCode); +QRCode *qr_code_create(GRect frame) { + QRCode *qr_code = applib_type_malloc(QRCode); if (qr_code) { qr_code_init(qr_code, &frame); } return qr_code; } -void qr_code_destroy(QRCode* qr_code) { +void qr_code_destroy(QRCode *qr_code) { if (qr_code) { applib_free(qr_code); } diff --git a/src/fw/applib/ui/qr_code.h b/src/fw/applib/ui/qr_code.h index 8568b82ac3..a45e21cb4c 100644 --- a/src/fw/applib/ui/qr_code.h +++ b/src/fw/applib/ui/qr_code.h @@ -64,10 +64,10 @@ void qr_code_init(QRCode *qr_code, const GRect *frame); //! //! @param frame The frame with which to initialize the QRCode //! @return A pointer to the QRCode. `NULL` if the QRCode could not be created -QRCode* qr_code_create(GRect frame); +QRCode *qr_code_create(GRect frame); //! Destroys a QRCode previously created by qr_code_create. -void qr_code_destroy(QRCode* qr_code); +void qr_code_destroy(QRCode *qr_code); //! Sets the pointer to the data where the QRCode is supposed to find the data //! at a later point in time, when it needs to draw itself. diff --git a/src/fw/applib/ui/recognizer/pan.c b/src/fw/applib/ui/recognizer/pan.c index bc1fafeef8..c5a94584de 100644 --- a/src/fw/applib/ui/recognizer/pan.c +++ b/src/fw/applib/ui/recognizer/pan.c @@ -45,11 +45,12 @@ struct PanRecognizerData { // Gesture state struct { - GPoint touch_down_point; // Touchdown point; total_delta is measured from here - GPoint start_point; // Point at which the pan Started; delta_since_start is measured here - GPoint prev_point; // Previous event point; delta_since_prev is measured from here - GPoint last_point; // Most recent position update point (liftoff coords are ignored) - // Velocity sample ring buffer; sample_head indexes the newest, filled up to sample_count entries + GPoint touch_down_point; // Touchdown point; total_delta is measured from here + GPoint start_point; // Point at which the pan Started; delta_since_start is measured here + GPoint prev_point; // Previous event point; delta_since_prev is measured from here + GPoint last_point; // Most recent position update point (liftoff coords are ignored) + // Velocity sample ring buffer; sample_head indexes the newest, filled up to sample_count + // entries PanVelocitySample samples[PAN_VELOCITY_SAMPLE_COUNT]; uint8_t sample_head; uint8_t sample_count; @@ -61,9 +62,7 @@ static void prv_reset(Recognizer *recognizer); static bool prv_cancel(Recognizer *recognizer); static const RecognizerImpl s_pan_recognizer_impl = { - .handle_touch_event = prv_handle_touch_event, - .reset = prv_reset, - .cancel = prv_cancel + .handle_touch_event = prv_handle_touch_event, .reset = prv_reset, .cancel = prv_cancel }; static uint32_t prv_ticks_to_ms(RtcTicks ticks) { @@ -71,9 +70,10 @@ static uint32_t prv_ticks_to_ms(RtcTicks ticks) { } static void prv_record_sample(PanRecognizerData *data, GPoint point, RtcTicks ticks) { - const uint8_t next = (data->state.sample_count == 0) ? - 0 : (uint8_t)((data->state.sample_head + 1) % PAN_VELOCITY_SAMPLE_COUNT); - data->state.samples[next] = (PanVelocitySample) { .point = point, .ticks = ticks }; + const uint8_t next = (data->state.sample_count == 0) + ? 0 + : (uint8_t)((data->state.sample_head + 1) % PAN_VELOCITY_SAMPLE_COUNT); + data->state.samples[next] = (PanVelocitySample){.point = point, .ticks = ticks}; data->state.sample_head = next; if (data->state.sample_count < PAN_VELOCITY_SAMPLE_COUNT) { data->state.sample_count++; @@ -93,7 +93,8 @@ static GPoint prv_compute_velocity(const PanRecognizerData *data) { // Walk back from the newest sample to find the oldest sample still inside the window. const PanVelocitySample *oldest = newest; for (uint8_t i = 1; i < data->state.sample_count; i++) { - const uint8_t idx = (uint8_t)((head + PAN_VELOCITY_SAMPLE_COUNT - i) % PAN_VELOCITY_SAMPLE_COUNT); + const uint8_t idx = + (uint8_t)((head + PAN_VELOCITY_SAMPLE_COUNT - i) % PAN_VELOCITY_SAMPLE_COUNT); const PanVelocitySample *candidate = &data->state.samples[idx]; if (prv_ticks_to_ms(newest->ticks - candidate->ticks) > PAN_VELOCITY_WINDOW_MS) { break; @@ -105,8 +106,10 @@ static GPoint prv_compute_velocity(const PanRecognizerData *data) { if (dt_ms == 0) { return GPointZero; } - const int32_t vx = ((int32_t)(newest->point.x - oldest->point.x) * MS_PER_SECOND) / (int32_t)dt_ms; - const int32_t vy = ((int32_t)(newest->point.y - oldest->point.y) * MS_PER_SECOND) / (int32_t)dt_ms; + const int32_t vx = + ((int32_t)(newest->point.x - oldest->point.x) * MS_PER_SECOND) / (int32_t)dt_ms; + const int32_t vy = + ((int32_t)(newest->point.y - oldest->point.y) * MS_PER_SECOND) / (int32_t)dt_ms; return GPoint((int16_t)vx, (int16_t)vy); } @@ -129,8 +132,8 @@ static bool prv_axis_dominance(const PanRecognizerData *data, GPoint total_delta } static void prv_handle_touch_event(Recognizer *recognizer, const TouchEvent *touch_event) { - PanRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_pan_recognizer_impl); + PanRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_pan_recognizer_impl); switch (touch_event->type) { case TouchEvent_Touchdown: { @@ -170,8 +173,9 @@ static void prv_handle_touch_event(Recognizer *recognizer, const TouchEvent *tou break; } // (a) Dominant axis matches the locked axis -> Start; foreign axis -> Fail. - const bool matches_lock = (is_horizontal && (data->config.axis_lock == PanAxis_Horizontal)) || - (!is_horizontal && (data->config.axis_lock == PanAxis_Vertical)); + const bool matches_lock = + (is_horizontal && (data->config.axis_lock == PanAxis_Horizontal)) || + (!is_horizontal && (data->config.axis_lock == PanAxis_Vertical)); if (matches_lock) { // Anchor delta_since_start at the current point so it is exactly (0, 0) when Started // fires; this prevents a visual jump for live scroll that consumes delta_since_start. @@ -188,8 +192,8 @@ static void prv_handle_touch_event(Recognizer *recognizer, const TouchEvent *tou } case TouchEvent_Liftoff: - // Liftoff coordinates are ignored (the driver reports finger-up at (0, 0)); the gesture end is - // the last position update. + // Liftoff coordinates are ignored (the driver reports finger-up at (0, 0)); the gesture end + // is the last position update. if (recognizer_has_triggered(recognizer)) { recognizer_transition_state(recognizer, RecognizerState_Completed); } else { @@ -201,8 +205,8 @@ static void prv_handle_touch_event(Recognizer *recognizer, const TouchEvent *tou } static void prv_reset(Recognizer *recognizer) { - PanRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_pan_recognizer_impl); + PanRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_pan_recognizer_impl); memset(&data->state, 0, sizeof(data->state)); } @@ -213,11 +217,11 @@ static bool prv_cancel(Recognizer *recognizer) { Recognizer *pan_recognizer_create(RecognizerEventCb event_cb, void *user_data, PanAxis axis) { PanRecognizerData data = { - .config = { - .axis_lock = axis, - .start_threshold_px = PAN_START_THRESHOLD_PX, - .axis_dominance = PAN_AXIS_DOMINANCE, - }, + .config = { + .axis_lock = axis, + .start_threshold_px = PAN_START_THRESHOLD_PX, + .axis_dominance = PAN_AXIS_DOMINANCE, + }, }; return recognizer_create_with_data(&s_pan_recognizer_impl, &data, sizeof(data), event_cb, @@ -229,11 +233,11 @@ Recognizer *pan_recognizer_init_static(void *storage, RecognizerEventCb event_cb _Static_assert(RECOGNIZER_INSTANCE_SIZE + sizeof(PanRecognizerData) <= PAN_RECOGNIZER_STATIC_SIZE, "PAN_RECOGNIZER_STATIC_SIZE too small for a static pan recognizer"); PanRecognizerData data = { - .config = { - .axis_lock = axis, - .start_threshold_px = PAN_START_THRESHOLD_PX, - .axis_dominance = PAN_AXIS_DOMINANCE, - }, + .config = { + .axis_lock = axis, + .start_threshold_px = PAN_START_THRESHOLD_PX, + .axis_dominance = PAN_AXIS_DOMINANCE, + }, }; return recognizer_init_static_with_data(storage, &s_pan_recognizer_impl, &data, sizeof(data), @@ -245,8 +249,8 @@ const PanRecognizerData *pan_recognizer_get_data(const Recognizer *recognizer) { } GPoint pan_recognizer_get_total_delta(const Recognizer *recognizer) { - const PanRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_pan_recognizer_impl); + const PanRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_pan_recognizer_impl); if (!data) { // SDK-reachable with a NULL or non-pan recognizer: reject, don't crash. return GPointZero; @@ -255,8 +259,8 @@ GPoint pan_recognizer_get_total_delta(const Recognizer *recognizer) { } GPoint pan_recognizer_get_delta_since_start(const Recognizer *recognizer) { - const PanRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_pan_recognizer_impl); + const PanRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_pan_recognizer_impl); if (!data) { return GPointZero; } @@ -264,8 +268,8 @@ GPoint pan_recognizer_get_delta_since_start(const Recognizer *recognizer) { } GPoint pan_recognizer_get_delta_since_prev(const Recognizer *recognizer) { - const PanRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_pan_recognizer_impl); + const PanRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_pan_recognizer_impl); if (!data) { return GPointZero; } @@ -273,8 +277,8 @@ GPoint pan_recognizer_get_delta_since_prev(const Recognizer *recognizer) { } GPoint pan_recognizer_get_velocity(const Recognizer *recognizer) { - const PanRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_pan_recognizer_impl); + const PanRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_pan_recognizer_impl); if (!data) { return GPointZero; } diff --git a/src/fw/applib/ui/recognizer/recognizer.c b/src/fw/applib/ui/recognizer/recognizer.c index 776dccbe1e..6abf8bb1b9 100644 --- a/src/fw/applib/ui/recognizer/recognizer.c +++ b/src/fw/applib/ui/recognizer/recognizer.c @@ -19,24 +19,21 @@ _Static_assert(RECOGNIZER_INSTANCE_SIZE >= sizeof(Recognizer), static void prv_set_state(Recognizer *recognizer, RecognizerState new_state) { switch (recognizer->state) { case RecognizerState_Possible: - PBL_ASSERTN((new_state == RecognizerState_Failed) || - (new_state == RecognizerState_Possible) || - (new_state == RecognizerState_Completed) || - (new_state == RecognizerState_Started)); + PBL_ASSERTN( + (new_state == RecognizerState_Failed) || (new_state == RecognizerState_Possible) || + (new_state == RecognizerState_Completed) || (new_state == RecognizerState_Started)); break; case RecognizerState_Started: - PBL_ASSERTN((new_state == RecognizerState_Possible) || - (new_state == RecognizerState_Cancelled) || - (new_state == RecognizerState_Completed) || - (new_state == RecognizerState_Updated)); + PBL_ASSERTN( + (new_state == RecognizerState_Possible) || (new_state == RecognizerState_Cancelled) || + (new_state == RecognizerState_Completed) || (new_state == RecognizerState_Updated)); break; case RecognizerState_Updated: - PBL_ASSERTN((new_state == RecognizerState_Possible) || - (new_state == RecognizerState_Cancelled) || - (new_state == RecognizerState_Completed) || - (new_state == RecognizerState_Updated)); + PBL_ASSERTN( + (new_state == RecognizerState_Possible) || (new_state == RecognizerState_Cancelled) || + (new_state == RecognizerState_Completed) || (new_state == RecognizerState_Updated)); break; case RecognizerState_Cancelled: @@ -97,13 +94,13 @@ static void prv_send_subscriber_event(Recognizer *recognizer) { static void prv_init_recognizer(Recognizer *recognizer, const RecognizerImpl *impl, const void *data, size_t data_size, RecognizerEventCb event_cb, void *user_data) { - *recognizer = (Recognizer) { - .state = RecognizerState_Possible, - .impl = impl, - .subscriber = { - .event = event_cb, - .data = user_data, - } + *recognizer = (Recognizer){ + .state = RecognizerState_Possible, + .impl = impl, + .subscriber = { + .event = event_cb, + .data = user_data, + } }; memcpy(recognizer->impl_data, data, data_size); } @@ -111,7 +108,6 @@ static void prv_init_recognizer(Recognizer *recognizer, const RecognizerImpl *im Recognizer *recognizer_create_with_data(const RecognizerImpl *impl, const void *data, size_t data_size, RecognizerEventCb event_cb, void *user_data) { - // These are passed from the implementation interface, so they must be valid PBL_ASSERTN(impl); PBL_ASSERTN(impl->handle_touch_event && impl->cancel && impl->reset); diff --git a/src/fw/applib/ui/recognizer/recognizer_manager.c b/src/fw/applib/ui/recognizer/recognizer_manager.c index 03cd14ecdf..077358c5de 100644 --- a/src/fw/applib/ui/recognizer/recognizer_manager.c +++ b/src/fw/applib/ui/recognizer/recognizer_manager.c @@ -15,7 +15,6 @@ T_STATIC bool prv_process_all_recognizers(RecognizerManager *manager, RecognizerListIteratorCb iter_cb, void *context) { - // Process the task-global recognizers first (NULL list is a no-op) if (!recognizer_list_iterate(manager->global_list, iter_cb, context)) { return false; @@ -63,8 +62,7 @@ T_STATIC bool prv_dispatch_touch_event(Recognizer *recognizer, void *context) { recognizer_handle_touch_event(recognizer, ctx->touch_event); RecognizerState state = recognizer_get_state(recognizer); if (!ctx->triggered && - ((state == RecognizerState_Completed) || - (state == RecognizerState_Started) || + ((state == RecognizerState_Completed) || (state == RecognizerState_Started) || (state == RecognizerState_Updated))) { ctx->triggered = recognizer; } @@ -75,7 +73,7 @@ T_STATIC bool prv_dispatch_touch_event(Recognizer *recognizer, void *context) { static Recognizer *prv_dispatch_touch_event_to_all_recognizers(RecognizerManager *manager, const TouchEvent *touch_event) { ProcessTouchCtx ctx = { - .touch_event = touch_event, + .touch_event = touch_event, }; prv_process_all_recognizers(manager, prv_dispatch_touch_event, &ctx); return ctx.triggered; @@ -88,8 +86,7 @@ typedef struct FailRecognizerCtx { T_STATIC bool prv_fail_recognizer(Recognizer *recognizer, void *context) { FailRecognizerCtx *ctx = context; - if ((recognizer == ctx->triggered) || - !recognizer_is_active(recognizer)) { + if ((recognizer == ctx->triggered) || !recognizer_is_active(recognizer)) { return true; } if (ctx->triggered && !recognizer_should_evaluate_simultaneously(recognizer, ctx->triggered)) { @@ -103,7 +100,7 @@ T_STATIC bool prv_fail_recognizer(Recognizer *recognizer, void *context) { static bool prv_fail_other_recognizers(RecognizerManager *manager) { FailRecognizerCtx ctx = { - .triggered = manager->triggered, + .triggered = manager->triggered, }; prv_process_all_recognizers(manager, prv_fail_recognizer, &ctx); return ctx.recognizers_active; @@ -167,7 +164,7 @@ static bool prv_reset_recognizer(Recognizer *recognizer, void *context) { } static void prv_reset_layer_tree_recognizers(RecognizerManager *manager, Layer *top_layer, - Layer *bottom_layer) { + Layer *bottom_layer) { prv_process_layer_tree_recognizers(manager, top_layer, bottom_layer, prv_reset_recognizer); } @@ -237,9 +234,7 @@ void recognizer_manager_handle_touch_event(const TouchEvent *touch_event, void * void recognizer_manager_init(RecognizerManager *manager) { PBL_ASSERTN(manager); - *manager = (RecognizerManager) { - .state = RecognizerManagerState_WaitForTouchdown - }; + *manager = (RecognizerManager){.state = RecognizerManagerState_WaitForTouchdown}; } void recognizer_manager_set_window(RecognizerManager *manager, Window *window) { diff --git a/src/fw/applib/ui/recognizer/recognizer_private.h b/src/fw/applib/ui/recognizer/recognizer_private.h index ac7e89cc71..1e939e7d24 100644 --- a/src/fw/applib/ui/recognizer/recognizer_private.h +++ b/src/fw/applib/ui/recognizer/recognizer_private.h @@ -30,14 +30,14 @@ struct Recognizer { union { struct { - bool handling_touch_event:1; - bool is_owned:1; + bool handling_touch_event : 1; + bool is_owned : 1; }; uint32_t flags; }; // Kept outside the flags union so that recognizer_reset() never clears it - bool is_static:1; + bool is_static : 1; struct Recognizer *fail_after; RecognizerSimultaneousWithCb simultaneous_with_cb; diff --git a/src/fw/applib/ui/recognizer/swipe.c b/src/fw/applib/ui/recognizer/swipe.c index afb377002b..395a7f3692 100644 --- a/src/fw/applib/ui/recognizer/swipe.c +++ b/src/fw/applib/ui/recognizer/swipe.c @@ -40,11 +40,12 @@ struct SwipeRecognizerData { // Gesture state struct { - GPoint touch_down_point; // Touchdown point; the path is measured from here - GPoint last_point; // Most recent position update point (liftoff coords are ignored) - RtcTicks touch_down_ticks; // Touchdown time, used for the duration check - SwipeDirection direction; // Recognized direction, valid once Completed - // Velocity sample ring buffer; sample_head indexes the newest, filled up to sample_count entries + GPoint touch_down_point; // Touchdown point; the path is measured from here + GPoint last_point; // Most recent position update point (liftoff coords are ignored) + RtcTicks touch_down_ticks; // Touchdown time, used for the duration check + SwipeDirection direction; // Recognized direction, valid once Completed + // Velocity sample ring buffer; sample_head indexes the newest, filled up to sample_count + // entries SwipeVelocitySample samples[SWIPE_VELOCITY_SAMPLE_COUNT]; uint8_t sample_head; uint8_t sample_count; @@ -56,9 +57,7 @@ static void prv_reset(Recognizer *recognizer); static bool prv_cancel(Recognizer *recognizer); static const RecognizerImpl s_swipe_recognizer_impl = { - .handle_touch_event = prv_handle_touch_event, - .reset = prv_reset, - .cancel = prv_cancel + .handle_touch_event = prv_handle_touch_event, .reset = prv_reset, .cancel = prv_cancel }; static uint32_t prv_ticks_to_ms(RtcTicks ticks) { @@ -70,9 +69,10 @@ static uint32_t prv_touch_duration_ms(const SwipeRecognizerData *data) { } static void prv_record_sample(SwipeRecognizerData *data, GPoint point, RtcTicks ticks) { - const uint8_t next = (data->state.sample_count == 0) ? - 0 : (uint8_t)((data->state.sample_head + 1) % SWIPE_VELOCITY_SAMPLE_COUNT); - data->state.samples[next] = (SwipeVelocitySample) { .point = point, .ticks = ticks }; + const uint8_t next = (data->state.sample_count == 0) + ? 0 + : (uint8_t)((data->state.sample_head + 1) % SWIPE_VELOCITY_SAMPLE_COUNT); + data->state.samples[next] = (SwipeVelocitySample){.point = point, .ticks = ticks}; data->state.sample_head = next; if (data->state.sample_count < SWIPE_VELOCITY_SAMPLE_COUNT) { data->state.sample_count++; @@ -104,8 +104,10 @@ static GPoint prv_compute_velocity(const SwipeRecognizerData *data) { if (dt_ms == 0) { return GPointZero; } - const int32_t vx = ((int32_t)(newest->point.x - oldest->point.x) * MS_PER_SECOND) / (int32_t)dt_ms; - const int32_t vy = ((int32_t)(newest->point.y - oldest->point.y) * MS_PER_SECOND) / (int32_t)dt_ms; + const int32_t vx = + ((int32_t)(newest->point.x - oldest->point.x) * MS_PER_SECOND) / (int32_t)dt_ms; + const int32_t vy = + ((int32_t)(newest->point.y - oldest->point.y) * MS_PER_SECOND) / (int32_t)dt_ms; return GPoint((int16_t)vx, (int16_t)vy); } @@ -121,8 +123,8 @@ static SwipeDirection prv_direction_from_delta(GPoint delta) { } static void prv_handle_touch_event(Recognizer *recognizer, const TouchEvent *touch_event) { - SwipeRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_swipe_recognizer_impl); + SwipeRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_swipe_recognizer_impl); switch (touch_event->type) { case TouchEvent_Touchdown: { @@ -149,8 +151,9 @@ static void prv_handle_touch_event(Recognizer *recognizer, const TouchEvent *tou const int32_t major = MAX(adx, ady); const int32_t minor = MIN(adx, ady); - // Too crooked: once the path is committed (major axis past the drag threshold), the minor-axis - // projection must stay within half the major axis, otherwise this is not a straight swipe. + // Too crooked: once the path is committed (major axis past the drag threshold), the + // minor-axis projection must stay within half the major axis, otherwise this is not a + // straight swipe. if ((major > SWIPE_STRAIGHTNESS_MIN_PX) && ((minor * 2) > major)) { recognizer_transition_state(recognizer, RecognizerState_Failed); break; @@ -164,8 +167,8 @@ static void prv_handle_touch_event(Recognizer *recognizer, const TouchEvent *tou } case TouchEvent_Liftoff: { - // Liftoff coordinates are ignored (the driver reports finger-up at (0, 0)); the gesture end is - // the last position update. + // Liftoff coordinates are ignored (the driver reports finger-up at (0, 0)); the gesture end + // is the last position update. const GPoint total_delta = gpoint_sub(data->state.last_point, data->state.touch_down_point); const int32_t adx = ABS(total_delta.x); const int32_t ady = ABS(total_delta.y); @@ -192,8 +195,8 @@ static void prv_handle_touch_event(Recognizer *recognizer, const TouchEvent *tou } static void prv_reset(Recognizer *recognizer) { - SwipeRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_swipe_recognizer_impl); + SwipeRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_swipe_recognizer_impl); memset(&data->state, 0, sizeof(data->state)); } @@ -205,9 +208,9 @@ static bool prv_cancel(Recognizer *recognizer) { Recognizer *swipe_recognizer_create(RecognizerEventCb event_cb, void *user_data, uint8_t direction_mask) { SwipeRecognizerData data = { - .config = { - .direction_mask = direction_mask, - }, + .config = { + .direction_mask = direction_mask, + }, }; return recognizer_create_with_data(&s_swipe_recognizer_impl, &data, sizeof(data), event_cb, @@ -220,9 +223,9 @@ Recognizer *swipe_recognizer_init_static(void *storage, RecognizerEventCb event_ RECOGNIZER_INSTANCE_SIZE + sizeof(SwipeRecognizerData) <= SWIPE_RECOGNIZER_STATIC_SIZE, "SWIPE_RECOGNIZER_STATIC_SIZE too small for a static swipe recognizer"); SwipeRecognizerData data = { - .config = { - .direction_mask = direction_mask, - }, + .config = { + .direction_mask = direction_mask, + }, }; return recognizer_init_static_with_data(storage, &s_swipe_recognizer_impl, &data, sizeof(data), @@ -234,8 +237,8 @@ const SwipeRecognizerData *swipe_recognizer_get_data(const Recognizer *recognize } SwipeDirection swipe_recognizer_get_direction(const Recognizer *recognizer) { - const SwipeRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_swipe_recognizer_impl); + const SwipeRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_swipe_recognizer_impl); if (!data) { // SDK-reachable with a NULL or non-swipe recognizer: reject, don't crash. return SwipeDirection_None; @@ -244,8 +247,8 @@ SwipeDirection swipe_recognizer_get_direction(const Recognizer *recognizer) { } GPoint swipe_recognizer_get_velocity(const Recognizer *recognizer) { - const SwipeRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_swipe_recognizer_impl); + const SwipeRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_swipe_recognizer_impl); if (!data) { return GPointZero; } diff --git a/src/fw/applib/ui/recognizer/swipe.h b/src/fw/applib/ui/recognizer/swipe.h index 05cfae34d7..cd37766a21 100644 --- a/src/fw/applib/ui/recognizer/swipe.h +++ b/src/fw/applib/ui/recognizer/swipe.h @@ -30,10 +30,10 @@ typedef struct SwipeRecognizerData SwipeRecognizerData; //! Swipe direction, also used as a bitmask when configuring which directions a swipe recognizer //! accepts. Screen coordinates grow downward, so a positive y delta is a downward swipe. typedef enum SwipeDirection { - SwipeDirection_None = 0, - SwipeDirection_Up = 1 << 0, - SwipeDirection_Down = 1 << 1, - SwipeDirection_Left = 1 << 2, + SwipeDirection_None = 0, + SwipeDirection_Up = 1 << 0, + SwipeDirection_Down = 1 << 1, + SwipeDirection_Left = 1 << 2, SwipeDirection_Right = 1 << 3, } SwipeDirection; diff --git a/src/fw/applib/ui/recognizer/tap.c b/src/fw/applib/ui/recognizer/tap.c index 93906f7a43..4e03458848 100644 --- a/src/fw/applib/ui/recognizer/tap.c +++ b/src/fw/applib/ui/recognizer/tap.c @@ -45,16 +45,13 @@ static void prv_reset(Recognizer *recognizer); static bool prv_cancel(Recognizer *recognizer); static const RecognizerImpl s_tap_recognizer_impl = { - .handle_touch_event = prv_handle_touch_event, - .reset = prv_reset, - .cancel = prv_cancel + .handle_touch_event = prv_handle_touch_event, .reset = prv_reset, .cancel = prv_cancel }; static bool prv_moved_too_far(const TapRecognizerData *data, const TouchEvent *touch_event) { const int16_t dx = ABS(touch_event->x - data->state.touch_down_point.x); const int16_t dy = ABS(touch_event->y - data->state.touch_down_point.y); - return (dx > data->config.movement_threshold.x) || - (dy > data->config.movement_threshold.y); + return (dx > data->config.movement_threshold.x) || (dy > data->config.movement_threshold.y); } static uint32_t prv_touch_duration_ms(const TapRecognizerData *data) { @@ -63,8 +60,8 @@ static uint32_t prv_touch_duration_ms(const TapRecognizerData *data) { } static void prv_handle_touch_event(Recognizer *recognizer, const TouchEvent *touch_event) { - TapRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_tap_recognizer_impl); + TapRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_tap_recognizer_impl); switch (touch_event->type) { case TouchEvent_Touchdown: @@ -96,8 +93,8 @@ static void prv_handle_touch_event(Recognizer *recognizer, const TouchEvent *tou } static void prv_reset(Recognizer *recognizer) { - TapRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_tap_recognizer_impl); + TapRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_tap_recognizer_impl); memset(&data->state, 0, sizeof(data->state)); } @@ -108,11 +105,11 @@ static bool prv_cancel(Recognizer *recognizer) { Recognizer *tap_recognizer_create(RecognizerEventCb event_cb, void *user_data) { TapRecognizerData data = { - .config = { - .taps_required = 1, - .fingers_required = 1, - .movement_threshold = GPoint(TAP_MOVEMENT_THRESHOLD_PX, TAP_MOVEMENT_THRESHOLD_PX), - }, + .config = { + .taps_required = 1, + .fingers_required = 1, + .movement_threshold = GPoint(TAP_MOVEMENT_THRESHOLD_PX, TAP_MOVEMENT_THRESHOLD_PX), + }, }; return recognizer_create_with_data(&s_tap_recognizer_impl, &data, sizeof(data), event_cb, @@ -123,11 +120,11 @@ Recognizer *tap_recognizer_init_static(void *storage, RecognizerEventCb event_cb _Static_assert(RECOGNIZER_INSTANCE_SIZE + sizeof(TapRecognizerData) <= TAP_RECOGNIZER_STATIC_SIZE, "TAP_RECOGNIZER_STATIC_SIZE too small for a static tap recognizer"); TapRecognizerData data = { - .config = { - .taps_required = 1, - .fingers_required = 1, - .movement_threshold = GPoint(TAP_MOVEMENT_THRESHOLD_PX, TAP_MOVEMENT_THRESHOLD_PX), - }, + .config = { + .taps_required = 1, + .fingers_required = 1, + .movement_threshold = GPoint(TAP_MOVEMENT_THRESHOLD_PX, TAP_MOVEMENT_THRESHOLD_PX), + }, }; return recognizer_init_static_with_data(storage, &s_tap_recognizer_impl, &data, sizeof(data), @@ -139,8 +136,8 @@ const TapRecognizerData *tap_recognizer_get_data(const Recognizer *recognizer) { } GPoint tap_recognizer_get_tap_point(const Recognizer *recognizer) { - const TapRecognizerData *data = recognizer_get_impl_data((Recognizer *)recognizer, - &s_tap_recognizer_impl); + const TapRecognizerData *data = + recognizer_get_impl_data((Recognizer *)recognizer, &s_tap_recognizer_impl); if (!data) { // SDK-reachable with a NULL or non-tap recognizer: reject, don't crash. return GPointZero; diff --git a/src/fw/applib/ui/recognizer/touch_nav.c b/src/fw/applib/ui/recognizer/touch_nav.c index 92fd44dfde..b8ee7b1c40 100644 --- a/src/fw/applib/ui/recognizer/touch_nav.c +++ b/src/fw/applib/ui/recognizer/touch_nav.c @@ -25,8 +25,9 @@ #define TOUCH_NAV_SWIPE_MASK \ (SwipeDirection_Up | SwipeDirection_Down | SwipeDirection_Left | SwipeDirection_Right) -// The unified widget set is a content scroller (vertical pan) with horizontal-only swipe navigation; -// vertical swipes stay pans so a flick scrolls/flings instead of being eaten by a swipe. +// The unified widget set is a content scroller (vertical pan) with horizontal-only swipe +// navigation; vertical swipes stay pans so a flick scrolls/flings instead of being eaten by a +// swipe. #define TOUCH_NAV_WIDGET_SWIPE_MASK (SwipeDirection_Left | SwipeDirection_Right) // Minimum wall-clock spacing between live-scroll updates applied from pan Updated events, matching @@ -70,9 +71,9 @@ void touch_nav_registry_add(TouchNavState *state, TouchNavWidgetType type, Touch for (TouchNavWidgetNode *cur = *head; cur; cur = cur->next) { if (cur == node) { PBL_LOG_WRN("touch_nav: widget node %p re-added", (void *)node); - // A widget re-init zeroes the node while it is still threaded here; restore the layer/vtable so - // an init-without-deinit keeps routing to and driving the widget instead of matching a NULL - // layer or dispatching through a NULL vtable. + // A widget re-init zeroes the node while it is still threaded here; restore the layer/vtable + // so an init-without-deinit keeps routing to and driving the widget instead of matching a + // NULL layer or dispatching through a NULL vtable. cur->layer = layer; cur->ops = ops; cur->widget = widget; @@ -116,7 +117,9 @@ void touch_nav_registry_remove(TouchNavState *state, TouchNavWidgetType type, // Whether \a node is still threaded onto any registry list (weak-ref re-validation for the latched // widget target). A node zeroed/removed by a widget deinit mid-gesture will not be found. static bool prv_registry_contains_node(TouchNavState *state, const TouchNavWidgetNode *node) { - const TouchNavWidgetNode *const heads[] = {state->menu_head, state->swap_head, state->scroll_head}; + const TouchNavWidgetNode *const heads[] = { + state->menu_head, state->swap_head, state->scroll_head + }; for (unsigned i = 0; i < ARRAY_LENGTH(heads); i++) { for (const TouchNavWidgetNode *n = heads[i]; n; n = n->next) { if (n == node) { @@ -128,8 +131,9 @@ static bool prv_registry_contains_node(TouchNavState *state, const TouchNavWidge } static bool prv_registry_contains_layer(TouchNavState *state, const struct Layer *layer) { - const TouchNavWidgetNode *const heads[] = {state->menu_head, state->scroll_head, - state->swap_head}; + const TouchNavWidgetNode *const heads[] = { + state->menu_head, state->scroll_head, state->swap_head + }; for (unsigned i = 0; i < ARRAY_LENGTH(heads); i++) { for (const TouchNavWidgetNode *n = heads[i]; n; n = n->next) { if (n->layer == layer) { @@ -169,9 +173,9 @@ void touch_nav_set_action_bar(TouchNavState *state, const GRect *frame, uint8_t } if (frame) { state->action_bar = (TouchNavActionBar){ - .frame = *frame, - .icon_mask = icon_mask, - .present = true, + .frame = *frame, + .icon_mask = icon_mask, + .present = true, }; } else { state->action_bar = (TouchNavActionBar){.present = false}; @@ -236,9 +240,9 @@ static bool prv_widget_touch_filter(const Recognizer *recognizer, const TouchEve return prv_resolve_widget_target(state) != NULL; } -// Unified widget dispatch. Mirrors the per-widget recognizer callbacks this replaces, but drives the -// latched target through its \ref TouchNavWidgetOps vtable instead of a concrete widget type. The -// target is latched on Touchdown (in touch_nav_dispatch) and re-validated as a weak ref here on +// Unified widget dispatch. Mirrors the per-widget recognizer callbacks this replaces, but drives +// the latched target through its \ref TouchNavWidgetOps vtable instead of a concrete widget type. +// The target is latched on Touchdown (in touch_nav_dispatch) and re-validated as a weak ref here on // every later event so a widget torn down mid-gesture is dropped with no callback into freed state. static void prv_widget_recognizer_event(const Recognizer *recognizer, RecognizerEvent event) { TouchNavState *state = recognizer_get_user_data(recognizer); @@ -259,8 +263,8 @@ static void prv_widget_recognizer_event(const Recognizer *recognizer, Recognizer if (recognizer == state->widget_pan) { if (ops->can_start && !ops->can_start(w)) { // The widget is not ready (e.g. its layout has not loaded). Decline the whole gesture - // WITHOUT set_failed (the pan is already Started, not Possible) or cancel (we are inside a - // Started callback -- re-entrancy). Every later vtable call is gated on `declined`. + // WITHOUT set_failed (the pan is already Started, not Possible) or cancel (we are inside + // a Started callback -- re-entrancy). Every later vtable call is gated on `declined`. state->declined = true; return; } @@ -396,7 +400,8 @@ static void prv_emit_click(TouchNavState *state, ButtonId button) { if (button == BUTTON_ID_BACK && !(state->ops->top_overrides_back && state->ops->top_overrides_back(state->ops->ctx))) { - // BACK on a window with no back handler pops the stack rather than feeding the click recognizer. + // BACK on a window with no back handler pops the stack rather than feeding the click + // recognizer. if (state->ops->pop_top) { state->ops->pop_top(state->ops->ctx); } @@ -426,10 +431,10 @@ static void prv_recognizer_event(const Recognizer *recognizer, RecognizerEvent e if (state->route == TouchNavRoute_Tier2) { // Liftoff re-check: re-run the bridge-vs-app arbitration at the emit point, not only at the // Touchdown latch. With the sensor held persistently (system hold) the app can opt this - // window out of the bridge AFTER the Touchdown already latched Tier-2; emitting anyway would - // fire alongside the app's own handler -> double action on the first gesture after the window - // opens. If the window is now bridge-disabled, drop instead of emitting. This closes the - // persistent-sensor timing window that a Touchdown-only latch leaves open. + // window out of the bridge AFTER the Touchdown already latched Tier-2; emitting anyway + // would fire alongside the app's own handler -> double action on the first gesture after + // the window opens. If the window is now bridge-disabled, drop instead of emitting. This + // closes the persistent-sensor timing window that a Touchdown-only latch leaves open. if (state->ops->top_bridge_disabled && state->ops->top_bridge_disabled(state->ops->ctx)) { state->counters.dropped++; prv_log_push(state, TouchNavLog_Dropped, 0); @@ -443,12 +448,11 @@ static void prv_recognizer_event(const Recognizer *recognizer, RecognizerEvent e // Route the tap into the action-bar UP/SELECT/DOWN zone if the tap point is inside a // present bar; otherwise (no bar, or a tap outside it) this is a plain SELECT -- unless // the top window requires taps to land on an action-bar icon zone. - const bool require_icon_zone = - state->ops->top_tap_requires_action_bar && - state->ops->top_tap_requires_action_bar(state->ops->ctx); + const bool require_icon_zone = state->ops->top_tap_requires_action_bar && + state->ops->top_tap_requires_action_bar(state->ops->ctx); const GPoint tap_point = tap_recognizer_get_tap_point((Recognizer *)recognizer); prv_emit_click(state, touch_nav_action_bar_zone_button(&state->action_bar, tap_point, - require_icon_zone)); + require_icon_zone)); } } break; @@ -485,10 +489,11 @@ void touch_nav_dispatch(const TouchEvent *touch_event, void *context) { // Drop the latch BEFORE unwinding the gesture (the UAF-safe idiom shared with the deregister // path). This intentionally does NOT run ops->pan_cancel: the pan recognizer's cancel op // returns false (see pan.c prv_cancel) and it never self-transitions to Cancelled, so - // cancel_and_reset delivers no RecognizerEvent_Cancelled to the unified pan on any pre-emption - // (gated or navigational) -- exactly as the per-widget sets behaved before this refactor. - // Synthesising a pan_cancel here would be a new side effect (Ф1 is a no-behaviour-change - // rebuild), so a mid-pan wake/DnD tap unwinds the gesture silently, as it always has. + // cancel_and_reset delivers no RecognizerEvent_Cancelled to the unified pan on any + // pre-emption (gated or navigational) -- exactly as the per-widget sets behaved before this + // refactor. Synthesising a pan_cancel here would be a new side effect (Ф1 is a + // no-behaviour-change rebuild), so a mid-pan wake/DnD tap unwinds the gesture silently, as it + // always has. state->latched_target = NULL; state->declined = false; prv_log_push(state, TouchNavLog_Gated, 0); @@ -531,9 +536,9 @@ void touch_nav_dispatch(const TouchEvent *touch_event, void *context) { } else { // The gesture belongs to the bridge or an un-migrated widget's own set, not the unified set: // fail the unified tap/pan/swipe now, symmetrically to the bridge exclusion. On a fresh - // Touchdown these three are provably still Possible (no recognizer triggers on Touchdown), and - // prv_fail only fails a Possible recognizer, so the manager returns to idle by construction - // after the gesture instead of leaving a filtered-out recognizer stuck Possible. + // Touchdown these three are provably still Possible (no recognizer triggers on Touchdown), + // and prv_fail only fails a Possible recognizer, so the manager returns to idle by + // construction after the gesture instead of leaving a filtered-out recognizer stuck Possible. prv_fail(state, state->widget_tap); prv_fail(state, state->widget_pan); prv_fail(state, state->widget_swipe); @@ -551,14 +556,14 @@ void touch_nav_state_init(TouchNavState *state, RecognizerManager *manager, const TouchNavOps *ops) { PBL_ASSERTN(state && manager && ops); *state = (TouchNavState){ - .manager = manager, - .ops = ops, - .route = TouchNavRoute_None, + .manager = manager, + .ops = ops, + .route = TouchNavRoute_None, }; state->tap = tap_recognizer_init_static(state->tap_storage, prv_recognizer_event, state); - state->pan = pan_recognizer_init_static(state->pan_storage, prv_recognizer_event, state, - PanAxis_Vertical); + state->pan = + pan_recognizer_init_static(state->pan_storage, prv_recognizer_event, state, PanAxis_Vertical); state->swipe = swipe_recognizer_init_static(state->swipe_storage, prv_recognizer_event, state, TOUCH_NAV_SWIPE_MASK); @@ -619,8 +624,8 @@ void touch_nav_transaction_apply(const TouchNavTxnOps *ops, bool enable) { } } -bool touch_nav_app_twin_active(bool system_nav_enabled, bool master_nav_enabled, - bool participating, bool opted_in) { +bool touch_nav_app_twin_active(bool system_nav_enabled, bool master_nav_enabled, bool participating, + bool opted_in) { // Two ways in, nothing else: a participating app (system apps by default) rides the SYSTEM nav // state (master pref AND the Touch Navigation sub-pref), while an app that explicitly opted in // (app_touch_navigation_enable) follows the master pref alone -- a user who turned the system diff --git a/src/fw/applib/ui/recognizer/touch_nav.h b/src/fw/applib/ui/recognizer/touch_nav.h index fab98c4a3a..26bfa65da9 100644 --- a/src/fw/applib/ui/recognizer/touch_nav.h +++ b/src/fw/applib/ui/recognizer/touch_nav.h @@ -58,8 +58,9 @@ typedef enum TouchNavWidgetType { //! vtable, so the touch-nav core (in applib/ui/recognizer/) never casts to a concrete widget type //! and never depends on services/. `w` is the opaque widget pointer stored in the node. typedef struct TouchNavWidgetOps { - //! Optional readiness gate consulted before a pan Starts. NULL means always ready. When it returns - //! false the gesture is declined for its whole lifetime (no pan_started/get_base_offset is called). + //! Optional readiness gate consulted before a pan Starts. NULL means always ready. When it + //! returns false the gesture is declined for its whole lifetime (no pan_started/get_base_offset + //! is called). bool (*can_start)(void *w); //! Optional. Called once when a navigational Touchdown latches this widget as the Tier-1 target, //! before any recognizer triggers. Lets the widget stop a coasting fling at finger-down instead @@ -68,8 +69,8 @@ typedef struct TouchNavWidgetOps { //! Pan Started: cancel any of the widget's own running animation so the finger takes over. void (*pan_started)(void *w); //! @return the widget's content offset at pan Start, latched as the base for the whole gesture. - //! Uses \ref GPointReturn (a plain alias for GPoint) so the `GPoint (*` here does not collide with - //! the function-like \c GPoint(x, y) constructor macro. + //! Uses \ref GPointReturn (a plain alias for GPoint) so the `GPoint (*` here does not collide + //! with the function-like \c GPoint(x, y) constructor macro. GPointReturn (*get_base_offset)(void *w); //! Live pan: apply `base + delta` to the widget's content offset (throttled by the core). void (*pan_update)(void *w, GPoint base, GPoint delta); @@ -85,9 +86,10 @@ typedef struct TouchNavWidgetOps { } TouchNavWidgetOps; //! Intrusive registry node embedded by value in a Tier-1 widget. `layer` identifies the widget for -//! the parent-walk match; `next` links the registry list. A migrated widget also supplies `ops` (its -//! apply-vtable) and `widget` (its opaque self pointer) so the unified widget set can drive it; an -//! un-migrated widget leaves `ops`/`widget` NULL and is driven by its own recognizer set instead. +//! the parent-walk match; `next` links the registry list. A migrated widget also supplies `ops` +//! (its apply-vtable) and `widget` (its opaque self pointer) so the unified widget set can drive +//! it; an un-migrated widget leaves `ops`/`widget` NULL and is driven by its own recognizer set +//! instead. typedef struct TouchNavWidgetNode { struct TouchNavWidgetNode *next; struct Layer *layer; @@ -131,10 +133,10 @@ typedef struct TouchNavOps { //! Kinds of ring-buffer log entries. typedef enum TouchNavLogKind { - TouchNavLog_Route, //!< A route was latched (detail = TouchNavRoute). - TouchNavLog_Emit, //!< A button was emulated (detail = ButtonId). - TouchNavLog_Dropped, //!< A completion was dropped mid-animation (detail = ButtonId). - TouchNavLog_Gated, //!< A gated Touchdown (detail: 0 = dropped, 1 = wake, pans allowed). + TouchNavLog_Route, //!< A route was latched (detail = TouchNavRoute). + TouchNavLog_Emit, //!< A button was emulated (detail = ButtonId). + TouchNavLog_Dropped, //!< A completion was dropped mid-animation (detail = ButtonId). + TouchNavLog_Gated, //!< A gated Touchdown (detail: 0 = dropped, 1 = wake, pans allowed). } TouchNavLogKind; typedef struct TouchNavLogEntry { @@ -156,8 +158,8 @@ typedef struct TouchNavState { Recognizer *swipe; //! The unified widget (tap, pan, swipe) recognizer set, by value. One set per twin drives every - //! migrated Tier-1 widget through its \ref TouchNavWidgetOps vtable; the set is scoped by a filter - //! that only matches a Touchdown resolving to a migrated (ops-bearing) widget. + //! migrated Tier-1 widget through its \ref TouchNavWidgetOps vtable; the set is scoped by a + //! filter that only matches a Touchdown resolving to a migrated (ops-bearing) widget. _Alignas(void *) uint8_t widget_tap_storage[TAP_RECOGNIZER_STATIC_SIZE]; _Alignas(void *) uint8_t widget_pan_storage[PAN_RECOGNIZER_STATIC_SIZE]; _Alignas(void *) uint8_t widget_swipe_storage[SWIPE_RECOGNIZER_STATIC_SIZE]; @@ -172,9 +174,9 @@ typedef struct TouchNavState { //! Per-gesture state for the unified widget set. `latched_target` is the migrated widget node the //! gesture is bound to (resolved on Touchdown, re-validated as a weak ref on every later event); - //! `gesture_base` is the widget content offset latched on pan Start; `last_update_ticks` throttles - //! live pan updates; `declined` is set when `can_start` refused the gesture, gating every later - //! vtable call until the gesture ends. + //! `gesture_base` is the widget content offset latched on pan Start; `last_update_ticks` + //! throttles live pan updates; `declined` is set when `can_start` refused the gesture, gating + //! every later vtable call until the gesture ends. TouchNavWidgetNode *latched_target; GPoint gesture_base; RtcTicks last_update_ticks; @@ -280,8 +282,8 @@ void touch_nav_transaction_apply(const TouchNavTxnOps *ops, bool enable); //! navigation off does not turn off an app's own gestures. A third-party app that never opted in //! stays inert under every pref combination. Factored here (out of app_state.c) so the gate is //! unit-testable without the kernel app-state singleton. -bool touch_nav_app_twin_active(bool system_nav_enabled, bool master_nav_enabled, - bool participating, bool opted_in); +bool touch_nav_app_twin_active(bool system_nav_enabled, bool master_nav_enabled, bool participating, + bool opted_in); //! Gate for the app-task Tier-2 bridge (feeds the \ref TouchNavOps top_bridge_disabled op). Reports //! the bridge as disabled -- routing the gesture to \ref TouchNavRoute_None so NO button is diff --git a/src/fw/applib/ui/rotate_bitmap_layer.c b/src/fw/applib/ui/rotate_bitmap_layer.c index 28fbdc91d4..97b71e8219 100644 --- a/src/fw/applib/ui/rotate_bitmap_layer.c +++ b/src/fw/applib/ui/rotate_bitmap_layer.c @@ -10,7 +10,7 @@ #include "system/passert.h" #include "pbl/util/math.h" -void rot_bitmap_layer_update_proc(RotBitmapLayer *image, GContext* ctx) { +void rot_bitmap_layer_update_proc(RotBitmapLayer *image, GContext *ctx) { const GColor corner_clip_color = image->corner_clip_color; if (!(gcolor_is_transparent(corner_clip_color))) { graphics_context_set_fill_color(ctx, corner_clip_color); @@ -41,8 +41,8 @@ void rot_bitmap_layer_init(RotBitmapLayer *image, GBitmap *bitmap) { layer_mark_dirty(&(image->layer)); } -RotBitmapLayer* rot_bitmap_layer_create(GBitmap *bitmap) { - RotBitmapLayer* layer = applib_type_malloc(RotBitmapLayer); +RotBitmapLayer *rot_bitmap_layer_create(GBitmap *bitmap) { + RotBitmapLayer *layer = applib_type_malloc(RotBitmapLayer); if (layer) { rot_bitmap_layer_init(layer, bitmap); } @@ -61,7 +61,7 @@ void rot_bitmap_layer_destroy(RotBitmapLayer *rot_bitmap_layer) { applib_free(rot_bitmap_layer); } -Layer* rot_bitmap_layer_get_layer(const RotBitmapLayer *rot_bitmap_layer) { +Layer *rot_bitmap_layer_get_layer(const RotBitmapLayer *rot_bitmap_layer) { return &((RotBitmapLayer *)rot_bitmap_layer)->layer; } @@ -103,7 +103,7 @@ void rot_bitmap_set_src_ic(RotBitmapLayer *image, GPoint ic) { const int32_t vert = MAX(ic.y, bottom); GRect r = image->layer.frame; - const int32_t new_dist = integer_sqrt(horiz*horiz + vert*vert) * 2; + const int32_t new_dist = integer_sqrt(horiz * horiz + vert * vert) * 2; r.size.w = new_dist; r.size.h = new_dist; diff --git a/src/fw/applib/ui/rotate_bitmap_layer.h b/src/fw/applib/ui/rotate_bitmap_layer.h index 0dbe2e03f3..c8b027d7b7 100644 --- a/src/fw/applib/ui/rotate_bitmap_layer.h +++ b/src/fw/applib/ui/rotate_bitmap_layer.h @@ -14,26 +14,30 @@ //! @addtogroup RotBitmapLayer //! \brief Layer that displays a rotated bitmap image. //! -//! A RotBitmapLayer is like a \ref BitmapLayer but has the ability to be rotated (by default, around its center). The amount of rotation -//! is specified using \ref rot_bitmap_layer_set_angle() or \ref rot_bitmap_layer_increment_angle(). The rotation argument -//! to those functions is specified as an amount of clockwise rotation, where the value 0x10000 represents a full 360 degree -//! rotation and 0 represent no rotation, and it scales linearly between those values, just like \ref sin_lookup. +//! A RotBitmapLayer is like a \ref BitmapLayer but has the ability to be rotated (by default, +//! around its center). The amount of rotation is specified using \ref rot_bitmap_layer_set_angle() +//! or \ref rot_bitmap_layer_increment_angle(). The rotation argument to those functions is +//! specified as an amount of clockwise rotation, where the value 0x10000 represents a full 360 +//! degree rotation and 0 represent no rotation, and it scales linearly between those values, just +//! like \ref sin_lookup. //! -//! The center of rotation in the source bitmap is always placed at the center of the RotBitmapLayer and the size of the RotBitmapLayer -//! is automatically calculated so that the entire Bitmap can fit in at all rotation angles. +//! The center of rotation in the source bitmap is always placed at the center of the RotBitmapLayer +//! and the size of the RotBitmapLayer is automatically calculated so that the entire Bitmap can fit +//! in at all rotation angles. //! -//! For example, if the image is 10px wide and high, the RotBitmapLayer will be 14px wide ( sqrt(10^2+10^2) ). +//! For example, if the image is 10px wide and high, the RotBitmapLayer will be 14px wide ( +//! sqrt(10^2+10^2) ). //! -//! By default, the center of rotation in the source bitmap is the center of the bitmap but you can call \ref rot_bitmap_set_src_ic() to change the -//! center of rotation. +//! By default, the center of rotation in the source bitmap is the center of the bitmap but you can +//! call \ref rot_bitmap_set_src_ic() to change the center of rotation. //! //! @note RotBitmapLayer has performance limitations that can degrade user //! experience (see \ref graphics_draw_rotated_bitmap). Use sparingly. //! @{ //! The data structure of a RotBitmapLayer, containing a Layer data structure, a pointer to -//! the GBitmap, and all necessary state to draw itself (the clip color, the rotation, center of rotation and -//! the compositing mode). +//! the GBitmap, and all necessary state to draw itself (the clip color, the rotation, center of +//! rotation and the compositing mode). //! @note a `RotBitmapLayer *` can safely be casted to a `Layer *` and can thus be used //! with all other functions that take a `Layer *` as an argument. //!
For example, the following is legal: @@ -50,9 +54,11 @@ typedef struct { //! the color to use in the regions covered by the dest rect, but not by the rotated src rect GColor8 corner_clip_color; - int32_t rotation; //! angle to rotate this by when drawing - GPoint src_ic; //! the instance center (pivot) of the src bitmap, relative to the src bitmap bounds - GPoint dest_ic; //! the instance center (pivot) of the dest bitmap, kept in the center of the frame + int32_t rotation; //! angle to rotate this by when drawing + GPoint + src_ic; //! the instance center (pivot) of the src bitmap, relative to the src bitmap bounds + GPoint + dest_ic; //! the instance center (pivot) of the dest bitmap, kept in the center of the frame // TODO: better name than "instance center"??? GCompOp compositing_mode; @@ -73,7 +79,7 @@ void rot_bitmap_layer_init(RotBitmapLayer *image, GBitmap *bitmap); //! @param bitmap The bitmap to display in this RotBitmapLayer //! @return A pointer to the RotBitmapLayer. `NULL` if the RotBitmapLayer could not //! be created -RotBitmapLayer* rot_bitmap_layer_create(GBitmap *bitmap); +RotBitmapLayer *rot_bitmap_layer_create(GBitmap *bitmap); void rot_bitmap_layer_deinit(RotBitmapLayer *bitmap); @@ -88,7 +94,7 @@ void rot_bitmap_layer_destroy(RotBitmapLayer *bitmap); //! @return The "root" Layer of the RotBitmapLayer. //! @internal //! @note The result is always equal to `(Layer *) rot_bitmap_layer`. -Layer* rot_bitmap_layer_get_layer(const RotBitmapLayer *rot_bitmap_layer); +Layer *rot_bitmap_layer_get_layer(const RotBitmapLayer *rot_bitmap_layer); //! Defines what color to use in areas that are not covered by the source bitmap. //! By default this is \ref GColorClear. @@ -99,7 +105,8 @@ void rot_bitmap_layer_set_corner_clip_color_2bit(RotBitmapLayer *bitmap, GColor2 //! Sets the rotation angle of this RotBitmapLayer //! @param bitmap The RotBitmapLayer on which to change the rotation -//! @param angle Rotation is an integer between 0 (no rotation) and 0x10000 (360 degree rotation). @see sin_lookup() +//! @param angle Rotation is an integer between 0 (no rotation) and 0x10000 (360 degree rotation). +//! @see sin_lookup() void rot_bitmap_layer_set_angle(RotBitmapLayer *bitmap, int32_t angle); //! Change the rotation angle of this RotBitmapLayer @@ -119,10 +126,9 @@ void rot_bitmap_layer_increment_angle(RotBitmapLayer *bitmap, int32_t angle_chan //! @param ic The only point in the original image that will not be affected by the rotation. void rot_bitmap_set_src_ic(RotBitmapLayer *bitmap, GPoint ic); -//! Sets the compositing mode of how the bitmap image is composited onto what has been drawn beneath the -//! RotBitmapLayer. -//! By default this is \ref GCompOpAssign, i.e. transparency disabled. -//! The RotBitmapLayer is automatically marked dirty after this operation. +//! Sets the compositing mode of how the bitmap image is composited onto what has been drawn beneath +//! the RotBitmapLayer. By default this is \ref GCompOpAssign, i.e. transparency disabled. The +//! RotBitmapLayer is automatically marked dirty after this operation. //! @param bitmap The RotBitmapLayer on which to change the rotation //! @param mode The compositing mode to set //! @see \ref GCompOp for visual examples of the different compositing modes. diff --git a/src/fw/applib/ui/rotbmp_pair_layer.c b/src/fw/applib/ui/rotbmp_pair_layer.c index 16ecd0859d..4802c54d70 100644 --- a/src/fw/applib/ui/rotbmp_pair_layer.c +++ b/src/fw/applib/ui/rotbmp_pair_layer.c @@ -10,8 +10,8 @@ static void set_compositing(RotBmpPairLayer *pair) { } void rotbmp_pair_layer_init(RotBmpPairLayer *pair, GBitmap *white, GBitmap *black) { - if (white->bounds.size.w != black->bounds.size.w - && white->bounds.size.h != black->bounds.size.h) { + if (white->bounds.size.w != black->bounds.size.w && + white->bounds.size.h != black->bounds.size.h) { PBL_LOG_ERR("rotbmp_pair inited with unmatching bitmaps"); return; } @@ -37,7 +37,7 @@ void rotbmp_pair_layer_set_angle(RotBmpPairLayer *pair, int32_t angle) { rot_bitmap_layer_set_angle(&pair->white_layer, angle); rot_bitmap_layer_set_angle(&pair->black_layer, angle); } - + void rotbmp_pair_layer_increment_angle(RotBmpPairLayer *pair, int32_t angle_change) { rot_bitmap_layer_increment_angle(&pair->white_layer, angle_change); rot_bitmap_layer_increment_angle(&pair->black_layer, angle_change); @@ -47,8 +47,8 @@ void rotbmp_pair_layer_set_src_ic(RotBmpPairLayer *pair, GPoint ic) { rot_bitmap_set_src_ic(&pair->white_layer, ic); rot_bitmap_set_src_ic(&pair->black_layer, ic); - layer_set_frame(&pair->layer, &(GRect) { pair->layer.frame.origin, - pair->white_layer.layer.bounds.size }); + layer_set_frame(&pair->layer, + &(GRect){pair->layer.frame.origin, pair->white_layer.layer.bounds.size}); } void rotbmp_pair_layer_inver_colors(RotBmpPairLayer *pair) { @@ -56,6 +56,5 @@ void rotbmp_pair_layer_inver_colors(RotBmpPairLayer *pair) { pair->black_layer = pair->white_layer; pair->white_layer = temp; - set_compositing(pair); } diff --git a/src/fw/applib/ui/scroll_layer.c b/src/fw/applib/ui/scroll_layer.c index 8036ffd700..7a0ff8d609 100644 --- a/src/fw/applib/ui/scroll_layer.c +++ b/src/fw/applib/ui/scroll_layer.c @@ -44,12 +44,13 @@ T_STATIC uint16_t prv_scroll_layer_get_paging_height(ScrollLayer *scroll_layer) } //! Return callback_context or if NULL, -inline static void* get_callback_context(ScrollLayer *scroll_layer) { +inline static void *get_callback_context(ScrollLayer *scroll_layer) { return scroll_layer->context ? scroll_layer->context : scroll_layer; } -void scroll_layer_draw_shadow_sublayer(Layer *shadow_sublayer, GContext* ctx) { - ScrollLayer *scroll_layer = (ScrollLayer *)(((uint8_t*)shadow_sublayer) - offsetof(ScrollLayer, shadow_sublayer)); +void scroll_layer_draw_shadow_sublayer(Layer *shadow_sublayer, GContext *ctx) { + ScrollLayer *scroll_layer = + (ScrollLayer *)(((uint8_t *)shadow_sublayer) - offsetof(ScrollLayer, shadow_sublayer)); const GPoint content_offset = scroll_layer_get_content_offset(scroll_layer); const GSize content_size = scroll_layer_get_content_size(scroll_layer); const GSize frame_size = scroll_layer->layer.frame.size; @@ -62,18 +63,20 @@ void scroll_layer_draw_shadow_sublayer(Layer *shadow_sublayer, GContext* ctx) { const int16_t layer_w = shadow_sublayer->bounds.size.w; const int16_t layer_h = shadow_sublayer->bounds.size.h; const int16_t shadow_top_bitmap_h = shadow_top->bounds.size.h; - const int16_t shadow_top_y_offset = -shadow_top_bitmap_h - CLIP(content_offset.y, -shadow_top_bitmap_h, 0); + const int16_t shadow_top_y_offset = + -shadow_top_bitmap_h - CLIP(content_offset.y, -shadow_top_bitmap_h, 0); if (shadow_top_y_offset >= -shadow_top_bitmap_h) { - graphics_draw_bitmap_in_rect(ctx, shadow_top, &GRect(0, shadow_top_y_offset, - layer_w, shadow_top_bitmap_h)); + graphics_draw_bitmap_in_rect(ctx, shadow_top, + &GRect(0, shadow_top_y_offset, layer_w, shadow_top_bitmap_h)); } // Draw bottom shadow, if (partially) visible: const int16_t shadow_bottom_bitmap_h = shadow_top->bounds.size.h; const int16_t bottom_clipped_height = (content_size.h + content_offset.y) - frame_size.h; - const int16_t shadow_bottom_y_offset = - CLIP(bottom_clipped_height, 0, shadow_bottom_bitmap_h); + const int16_t shadow_bottom_y_offset = -CLIP(bottom_clipped_height, 0, shadow_bottom_bitmap_h); if (shadow_bottom_y_offset < 0) { - graphics_draw_bitmap_in_rect(ctx, shadow_bottom, &GRect(0, layer_h + shadow_bottom_y_offset, - layer_w, shadow_bottom_bitmap_h)); + graphics_draw_bitmap_in_rect( + ctx, shadow_bottom, + &GRect(0, layer_h + shadow_bottom_y_offset, layer_w, shadow_bottom_bitmap_h)); } } @@ -85,8 +88,8 @@ static void prv_setup_shadow_layer(ScrollLayer *scroll_layer) { } static void scroll_layer_property_changed_proc(Layer *layer) { - ScrollLayer *scroll_layer = (ScrollLayer*)layer; - const GRect internal_rect = (GRect) { GPointZero, scroll_layer->layer.frame.size }; + ScrollLayer *scroll_layer = (ScrollLayer *)layer; + const GRect internal_rect = (GRect){GPointZero, scroll_layer->layer.frame.size}; // If shadow_sublayer initialized (opposite of paging_enabled) if (!prv_scroll_layer_is_paging_enabled(scroll_layer)) { @@ -106,11 +109,11 @@ static void scroll_layer_property_changed_proc(Layer *layer) { // set, owned by TouchNavState, drives whichever migrated widget the finger lands on through a // per-node apply vtable. A ScrollLayer supplies that vtable (s_scroll_touch_nav_ops) at // registration; the apply functions below stay the public per-scroll gesture surface (and the -// unit-test entry points). A ScrollLayer is a pure scroll container (no selection model): a vertical -// pan drags the content 1:1 and a horizontal swipe navigates (right = BACK, left = SELECT); it has -// no tap action (tap op is NULL, so a tap on it is dropped, never a bridge SELECT). A ScrollLayer -// embedded in a composite that drives its own scrolling (e.g. MenuLayer) deregisters via -// scroll_layer_touch_nav_deregister() so the same layer never has two gesture drivers. +// unit-test entry points). A ScrollLayer is a pure scroll container (no selection model): a +// vertical pan drags the content 1:1 and a horizontal swipe navigates (right = BACK, left = +// SELECT); it has no tap action (tap op is NULL, so a tap on it is dropped, never a bridge SELECT). +// A ScrollLayer embedded in a composite that drives its own scrolling (e.g. MenuLayer) deregisters +// via scroll_layer_touch_nav_deregister() so the same layer never has two gesture drivers. _Static_assert(sizeof(((ScrollLayer *)0)->touch_nav_node) == sizeof(TouchNavWidgetNode), "ScrollLayer touch_nav_node must match TouchNavWidgetNode layout"); @@ -123,8 +126,8 @@ static TouchNavState *prv_task_touch_nav_state(void) { return prv_is_app_task() ? app_state_get_touch_nav_state() : modal_manager_get_touch_nav_state(); } -// Test seam (declared in scroll_layer_private.h under CONFIG_TOUCH). The unified widget set holds no -// per-task singleton to reset; the touch-nav state is owned by TouchNavState, so this is a no-op +// Test seam (declared in scroll_layer_private.h under CONFIG_TOUCH). The unified widget set holds +// no per-task singleton to reset; the touch-nav state is owned by TouchNavState, so this is a no-op // kept for source compatibility with tests that call it in their setup. void scroll_layer_touch_nav_reset_all(void) { } @@ -154,8 +157,8 @@ void scroll_layer_touch_handle_pan_update(ScrollLayer *scroll_layer, GPoint base // Paging layers keep the hard clamp (rubber-banding would fight page alignment); so does // content that fits the frame (nothing to scroll, nothing to bounce). if (scroll_layer_get_paging(scroll_layer) || content_h <= frame_h) { - const int16_t clamped_y = prv_scroll_touch_clamp_offset_y( - scroll_layer, (int16_t)CLIP(raw_y, INT16_MIN, INT16_MAX)); + const int16_t clamped_y = + prv_scroll_touch_clamp_offset_y(scroll_layer, (int16_t)CLIP(raw_y, INT16_MIN, INT16_MAX)); scroll_layer_set_content_offset(scroll_layer, GPoint(0, clamped_y), false); return; } @@ -172,8 +175,7 @@ static void prv_scroll_touch_fling_stopped(Animation *animation, bool finished, void scroll_layer_touch_handle_snap(ScrollLayer *scroll_layer, GPoint base, GPoint final_delta, GPoint velocity) { - const int16_t released_y = prv_scroll_touch_clamp_offset_y(scroll_layer, - base.y + final_delta.y); + const int16_t released_y = prv_scroll_touch_clamp_offset_y(scroll_layer, base.y + final_delta.y); const int16_t current_y = scroll_layer_get_content_offset(scroll_layer).y; if (current_y != prv_scroll_touch_clamp_offset_y(scroll_layer, current_y)) { // Rubber-banded past an edge: glide back to it regardless of velocity (a coast from out of @@ -186,8 +188,8 @@ void scroll_layer_touch_handle_snap(ScrollLayer *scroll_layer, GPoint base, GPoi // coast starts from the current (last throttled) offset, so the unthrottled residual is // absorbed into the animation instead of jumping instantly at liftoff. Paging keeps its snap // semantics (a coast would break page alignment). - const int32_t v = CLIP((int32_t)velocity.y, -TOUCH_FLING_MAX_VELOCITY_PX_S, - TOUCH_FLING_MAX_VELOCITY_PX_S); + const int32_t v = + CLIP((int32_t)velocity.y, -TOUCH_FLING_MAX_VELOCITY_PX_S, TOUCH_FLING_MAX_VELOCITY_PX_S); if (ABS(v) >= TOUCH_FLING_MIN_VELOCITY_PX_S && !scroll_layer_get_paging(scroll_layer)) { const int32_t projected_y = released_y + (v * TOUCH_FLING_TAU_MS) / 1000; const int16_t target_y = prv_scroll_touch_clamp_offset_y( @@ -300,15 +302,15 @@ static void prv_scroll_ops_swipe(void *w, SwipeDirection dir) { // can_start is NULL: a ScrollLayer's content is always valid, so a pan may always start. tap is // NULL: a ScrollLayer has no tap action, so a tap on it is dropped (never a bridge SELECT). static const TouchNavWidgetOps s_scroll_touch_nav_ops = { - .can_start = NULL, - .touchdown = prv_scroll_ops_touchdown, - .pan_started = prv_scroll_ops_pan_started, - .get_base_offset = prv_scroll_ops_get_base_offset, - .pan_update = prv_scroll_ops_pan_update, - .pan_snap = prv_scroll_ops_pan_snap, - .pan_cancel = prv_scroll_ops_pan_cancel, - .tap = NULL, - .swipe = prv_scroll_ops_swipe, + .can_start = NULL, + .touchdown = prv_scroll_ops_touchdown, + .pan_started = prv_scroll_ops_pan_started, + .get_base_offset = prv_scroll_ops_get_base_offset, + .pan_update = prv_scroll_ops_pan_update, + .pan_snap = prv_scroll_ops_pan_snap, + .pan_cancel = prv_scroll_ops_pan_cancel, + .tap = NULL, + .swipe = prv_scroll_ops_swipe, }; static void prv_scroll_touch_nav_register(ScrollLayer *scroll_layer) { @@ -362,7 +364,7 @@ void scroll_layer_init(ScrollLayer *scroll_layer, const GRect *frame) { #endif } -ScrollLayer* scroll_layer_create(GRect frame) { +ScrollLayer *scroll_layer_create(GRect frame) { ScrollLayer *layer = applib_type_malloc(ScrollLayer); if (layer) { scroll_layer_init(layer, &frame); @@ -393,7 +395,7 @@ void scroll_layer_destroy(ScrollLayer *scroll_layer) { applib_free(scroll_layer); } -Layer* scroll_layer_get_layer(const ScrollLayer *scroll_layer) { +Layer *scroll_layer_get_layer(const ScrollLayer *scroll_layer) { return &((ScrollLayer *)scroll_layer)->layer; } @@ -406,13 +408,12 @@ void scroll_layer_add_child(ScrollLayer *scroll_layer, Layer *child) { layer_add_child(&scroll_layer->content_sublayer, child); } - GPoint scroll_layer_get_content_offset(ScrollLayer *scroll_layer) { return scroll_layer->content_sublayer.bounds.origin; } -T_STATIC void prv_scroll_layer_set_content_offset_internal( - ScrollLayer *scroll_layer, GPoint offset) { +T_STATIC void prv_scroll_layer_set_content_offset_internal(ScrollLayer *scroll_layer, + GPoint offset) { const GSize frame_size = scroll_layer->layer.frame.size; GRect bounds = scroll_layer->content_sublayer.bounds; const GPoint old_offset = bounds.origin; @@ -446,18 +447,25 @@ T_STATIC void prv_scroll_layer_set_content_offset_internal( scroll_layer_update_content_indicator(scroll_layer); if (scroll_layer->callbacks.content_offset_changed_handler) { - scroll_layer->callbacks.content_offset_changed_handler(scroll_layer, get_callback_context(scroll_layer)); + scroll_layer->callbacks.content_offset_changed_handler(scroll_layer, + get_callback_context(scroll_layer)); } } static const PropertyAnimationImplementation s_content_offset_animation_impl = { - .base = { - .update = (AnimationUpdateImplementation) property_animation_update_gpoint, - }, - .accessors = { - .setter = { .grect = (const GRectSetter) (void *) prv_scroll_layer_set_content_offset_internal, }, - .getter = { .grect = (const GRectGetter) (void *) scroll_layer_get_content_offset, }, - }, + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_gpoint, + }, + .accessors = { + .setter = + { + .grect = (const GRectSetter)(void *)prv_scroll_layer_set_content_offset_internal, + }, + .getter = { + .grect = (const GRectGetter)(void *)scroll_layer_get_content_offset, + }, + }, }; void scroll_layer_set_content_offset(ScrollLayer *scroll_layer, GPoint offset, bool animated) { @@ -479,8 +487,8 @@ void scroll_layer_set_content_offset(ScrollLayer *scroll_layer, GPoint offset, b animation_set_curve(animation, AnimationCurveEaseOut); } } else { - scroll_layer->animation = property_animation_create(&s_content_offset_animation_impl, - scroll_layer, NULL, &offset); + scroll_layer->animation = + property_animation_create(&s_content_offset_animation_impl, scroll_layer, NULL, &offset); animation = property_animation_get_animation(scroll_layer->animation); if (scroll_layer_get_paging(scroll_layer)) { animation_set_custom_interpolation(animation, interpolate_moook); @@ -498,8 +506,7 @@ void scroll_layer_set_content_offset(ScrollLayer *scroll_layer, GPoint offset, b //! Apply a touch-overscrolled content offset, bypassing the clamp that //! prv_scroll_layer_set_content_offset_internal applies when offset clipping is enabled (the //! clamp would swallow the rubber-band excess every frame). -static void prv_set_content_offset_overscrolled_internal(ScrollLayer *scroll_layer, - GPoint offset) { +static void prv_set_content_offset_overscrolled_internal(ScrollLayer *scroll_layer, GPoint offset) { GRect bounds = scroll_layer->content_sublayer.bounds; const GPoint old_offset = bounds.origin; bounds.origin = offset; @@ -519,14 +526,19 @@ static void prv_set_content_offset_overscrolled_internal(ScrollLayer *scroll_lay //! s_content_offset_animation_impl but with the unclamped setter, so intermediate out-of-bounds //! frames glide instead of being clipped to the edge on the first frame. static const PropertyAnimationImplementation s_overscroll_offset_animation_impl = { - .base = { - .update = (AnimationUpdateImplementation) property_animation_update_gpoint, - }, - .accessors = { - .setter = { .grect = - (const GRectSetter) (void *) prv_set_content_offset_overscrolled_internal, }, - .getter = { .grect = (const GRectGetter) (void *) scroll_layer_get_content_offset, }, - }, + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_gpoint, + }, + .accessors = { + .setter = + { + .grect = (const GRectSetter)(void *)prv_set_content_offset_overscrolled_internal, + }, + .getter = { + .grect = (const GRectGetter)(void *)scroll_layer_get_content_offset, + }, + }, }; int16_t scroll_layer_touch_overscroll_damp(int32_t raw_y, int16_t min_y, int16_t max_y, @@ -583,7 +595,7 @@ void scroll_layer_touch_overscroll_spring_back(ScrollLayer *scroll_layer, int16_ } animation_set_duration(animation, TOUCH_OVERSCROLL_SPRING_BACK_MS); animation_set_curve(animation, AnimationCurveEaseOut); - animation_set_handlers(animation, (AnimationHandlers) { .stopped = stopped }, stopped_context); + animation_set_handlers(animation, (AnimationHandlers){.stopped = stopped}, stopped_context); animation_schedule(animation); } @@ -593,13 +605,12 @@ void scroll_layer_touch_overscroll_spring_back(ScrollLayer *scroll_layer, int16_ static AnimationProgress prv_fling_ease_out_cubic(AnimationProgress progress) { const int64_t remaining = ANIMATION_NORMALIZED_MAX - progress; return (AnimationProgress)(ANIMATION_NORMALIZED_MAX - - (remaining * remaining * remaining) / - ((int64_t)ANIMATION_NORMALIZED_MAX * ANIMATION_NORMALIZED_MAX)); + (remaining * remaining * remaining) / + ((int64_t)ANIMATION_NORMALIZED_MAX * ANIMATION_NORMALIZED_MAX)); } -bool scroll_layer_touch_fling_start(ScrollLayer *scroll_layer, int16_t target_y, - int16_t velocity_y, AnimationStoppedHandler stopped, - void *stopped_context) { +bool scroll_layer_touch_fling_start(ScrollLayer *scroll_layer, int16_t target_y, int16_t velocity_y, + AnimationStoppedHandler stopped, void *stopped_context) { const int16_t current_y = scroll_layer_get_content_offset(scroll_layer).y; const int32_t distance = (int32_t)target_y - current_y; if (ABS(distance) < TOUCH_FLING_MIN_DISTANCE_PX || velocity_y == 0) { @@ -611,8 +622,8 @@ bool scroll_layer_touch_fling_start(ScrollLayer *scroll_layer, int16_t target_y, if (animation_is_scheduled(animation)) { animation_unschedule(animation); // fires a previous coast's stopped handler, if any } - property_animation_init(scroll_layer->animation, &s_content_offset_animation_impl, - scroll_layer, NULL, (void *)&target); + property_animation_init(scroll_layer->animation, &s_content_offset_animation_impl, scroll_layer, + NULL, (void *)&target); } else { scroll_layer->animation = property_animation_create(&s_content_offset_animation_impl, scroll_layer, NULL, (void *)&target); @@ -626,12 +637,12 @@ bool scroll_layer_touch_fling_start(ScrollLayer *scroll_layer, int16_t target_y, // the animated launch velocity equal the finger's liftoff velocity, with a long soft tail. An // edge-truncated distance shortens T proportionally, preserving the launch speed instead of // crawling into the clamp. - const int32_t duration_ms = CLIP((3000 * ABS(distance)) / ABS((int32_t)velocity_y), - (int32_t)TOUCH_FLING_MIN_DURATION_MS, - (int32_t)TOUCH_FLING_MAX_DURATION_MS); + const int32_t duration_ms = + CLIP((3000 * ABS(distance)) / ABS((int32_t)velocity_y), (int32_t)TOUCH_FLING_MIN_DURATION_MS, + (int32_t)TOUCH_FLING_MAX_DURATION_MS); animation_set_duration(animation, (uint32_t)duration_ms); animation_set_custom_curve(animation, prv_fling_ease_out_cubic); - animation_set_handlers(animation, (AnimationHandlers) { .stopped = stopped }, stopped_context); + animation_set_handlers(animation, (AnimationHandlers){.stopped = stopped}, stopped_context); animation_schedule(animation); return true; } @@ -643,7 +654,7 @@ void scroll_layer_touch_fling_cleanup(ScrollLayer *scroll_layer) { } animation_set_duration(animation, ANIMATION_DEFAULT_DURATION_MS); animation_set_curve(animation, AnimationCurveDefault); - animation_set_handlers(animation, (AnimationHandlers) { 0 }, NULL); + animation_set_handlers(animation, (AnimationHandlers){0}, NULL); } #endif @@ -656,8 +667,8 @@ void scroll_layer_set_content_size(ScrollLayer *scroll_layer, GSize size) { // keep potential animations running – since some 3rd-party apps do change the content size // frequently (e.g. in an update_proc) and would otherwise implicitly stop scroll animations. // It's fine to keep scroll animations running as they clip the offset to valid bounds. - prv_scroll_layer_set_content_offset_internal( - scroll_layer, scroll_layer_get_content_offset(scroll_layer)); + prv_scroll_layer_set_content_offset_internal(scroll_layer, + scroll_layer_get_content_offset(scroll_layer)); } GSize scroll_layer_get_content_size(const ScrollLayer *scroll_layer) { @@ -686,7 +697,8 @@ void scroll_layer_scroll(ScrollLayer *scroll_layer, ScrollDirection direction, b offset.y -= scroll_height; break; - default: return; + default: + return; } scroll_layer_set_content_offset(scroll_layer, offset, animated); } @@ -706,7 +718,8 @@ void scroll_layer_scroll_down_click_handler(ClickRecognizerRef recognizer, void static void scroll_layer_click_config_provider(ScrollLayer *scroll_layer) { // Config UP / DOWN button behavior: window_single_repeating_click_subscribe(BUTTON_ID_UP, 100, scroll_layer_scroll_up_click_handler); - window_single_repeating_click_subscribe(BUTTON_ID_DOWN, 100, scroll_layer_scroll_down_click_handler); + window_single_repeating_click_subscribe(BUTTON_ID_DOWN, 100, + scroll_layer_scroll_down_click_handler); // Set the context for the SELECT button: window_set_click_context(BUTTON_ID_SELECT, get_callback_context(scroll_layer)); @@ -717,7 +730,8 @@ static void scroll_layer_click_config_provider(ScrollLayer *scroll_layer) { } void scroll_layer_set_click_config_onto_window(ScrollLayer *scroll_layer, struct Window *window) { - window_set_click_config_provider_with_context(window, (ClickConfigProvider) scroll_layer_click_config_provider, scroll_layer); + window_set_click_config_provider_with_context( + window, (ClickConfigProvider)scroll_layer_click_config_provider, scroll_layer); } void scroll_layer_set_callbacks(ScrollLayer *scroll_layer, ScrollLayerCallbacks callbacks) { @@ -737,7 +751,7 @@ void scroll_layer_set_shadow_hidden(ScrollLayer *scroll_layer, bool hidden) { prv_setup_shadow_layer(scroll_layer); } - scroll_layer_property_changed_proc((Layer*)scroll_layer); + scroll_layer_property_changed_proc((Layer *)scroll_layer); layer_set_hidden(&scroll_layer->shadow_sublayer, hidden); } @@ -765,7 +779,7 @@ void scroll_layer_set_paging(ScrollLayer *scroll_layer, bool paging_enabled) { } } -bool scroll_layer_get_paging(ScrollLayer* scroll_layer) { +bool scroll_layer_get_paging(ScrollLayer *scroll_layer) { return scroll_layer && prv_scroll_layer_is_paging_enabled(scroll_layer); } @@ -784,20 +798,18 @@ void scroll_layer_update_content_indicator(ScrollLayer *scroll_layer) { const int16_t scroll_layer_content_offset_y = scroll_layer_get_content_offset(scroll_layer).y; const bool content_available_up = (scroll_layer_content_offset_y < 0); - content_indicator_set_content_available(content_indicator, - ContentIndicatorDirectionUp, + content_indicator_set_content_available(content_indicator, ContentIndicatorDirectionUp, content_available_up); const bool content_available_down = - (scroll_layer_frame_size.h - scroll_layer_content_offset_y < scroll_layer_content_size.h); - content_indicator_set_content_available(content_indicator, - ContentIndicatorDirectionDown, + (scroll_layer_frame_size.h - scroll_layer_content_offset_y < scroll_layer_content_size.h); + content_indicator_set_content_available(content_indicator, ContentIndicatorDirectionDown, content_available_down); } void scroll_layer_set_clips_content_offset(ScrollLayer *scroll_layer, bool clips) { scroll_layer->content_sublayer.clips = clips; - scroll_layer_set_content_offset(scroll_layer, - scroll_layer_get_content_offset(scroll_layer), false); + scroll_layer_set_content_offset(scroll_layer, scroll_layer_get_content_offset(scroll_layer), + false); } bool scroll_layer_get_clips_content_offset(ScrollLayer *scroll_layer) { diff --git a/src/fw/applib/ui/scroll_layer.h b/src/fw/applib/ui/scroll_layer.h index 021f443812..cba735f093 100644 --- a/src/fw/applib/ui/scroll_layer.h +++ b/src/fw/applib/ui/scroll_layer.h @@ -56,7 +56,6 @@ typedef void (*ScrollLayerCallback)(struct ScrollLayer *scroll_layer, void *cont //! @note The context parameter can be set using scroll_layer_set_context() and //! gets passed in as context with all of these callbacks. typedef struct ScrollLayerCallbacks { - //! Provider function to set up the SELECT button handlers. This will be //! called after the scroll layer has configured the click configurations for //! the up/down buttons, so it can also be used to modify the default up/down @@ -105,8 +104,8 @@ typedef struct ScrollLayer { uint8_t flags; struct { // Do not move these bit-fields! - bool paging_disabled:1; // mutually exclusive of shadow clips - bool shadow_hidden:1; // shadow_hidden in same position as layer hidden + bool paging_disabled : 1; // mutually exclusive of shadow clips + bool shadow_hidden : 1; // shadow_hidden in same position as layer hidden }; }; } paging; @@ -129,11 +128,12 @@ typedef struct ScrollLayer { //! @internal //! Intrusive Tier-1 touch-navigation registry node (layout-compatible with //! \ref TouchNavWidgetNode: four pointers — \c next, \c layer, \c ops, \c widget). Embedding it - //! here lets a bare ScrollLayer be registered as a Tier-1 touch widget so a finger pan scrolls its - //! content 1:1. Declared unconditionally (not under \c CONFIG_TOUCH) so the struct layout — and - //! therefore \c sizeof(ScrollLayer) — is identical on every board and the applib-malloc budget is - //! board-independent. It sits at the pointer-aligned tail, introducing no alignment padding of its - //! own. A build-time assert in scroll_layer.c keeps this node's layout in sync with + //! here lets a bare ScrollLayer be registered as a Tier-1 touch widget so a finger pan scrolls + //! its content 1:1. Declared unconditionally (not under \c CONFIG_TOUCH) so the struct layout — + //! and therefore \c sizeof(ScrollLayer) — is identical on every board and the applib-malloc + //! budget is board-independent. It sits at the pointer-aligned tail, introducing no alignment + //! padding of its own. A build-time assert in scroll_layer.c keeps this node's layout in sync + //! with //! \ref TouchNavWidgetNode; the applib_malloc size check pins the (grown) \c sizeof(ScrollLayer). struct { void *next; @@ -171,7 +171,7 @@ void scroll_layer_init(ScrollLayer *scroll_layer, const GRect *frame); //! * Callback context: `NULL` //! @return A pointer to the ScrollLayer. `NULL` if the ScrollLayer could not //! be created -ScrollLayer* scroll_layer_create(GRect frame); +ScrollLayer *scroll_layer_create(GRect frame); void scroll_layer_deinit(ScrollLayer *scroll_layer); @@ -184,7 +184,7 @@ void scroll_layer_destroy(ScrollLayer *scroll_layer); //! @return The "root" Layer of the scroll layer. //! @internal //! @note The result is always equal to `(Layer *) scroll_layer`. -Layer* scroll_layer_get_layer(const ScrollLayer *scroll_layer); +Layer *scroll_layer_get_layer(const ScrollLayer *scroll_layer); //! Adds the child layer to the content sub-layer of the ScrollLayer. //! This will make the child layer part of the scrollable contents. diff --git a/src/fw/applib/ui/scroll_layer_private.h b/src/fw/applib/ui/scroll_layer_private.h index a635a0429d..8af17dd3ee 100644 --- a/src/fw/applib/ui/scroll_layer_private.h +++ b/src/fw/applib/ui/scroll_layer_private.h @@ -76,9 +76,8 @@ void scroll_layer_touch_overscroll_spring_back(ScrollLayer *scroll_layer, int16_ //! caller). \a stopped runs when the coast ends (finished or unscheduled) and MUST call //! scroll_layer_touch_fling_cleanup() so the shared animation's defaults are restored. //! @return false (and moves nothing) when the remaining distance is below the fling minimum. -bool scroll_layer_touch_fling_start(ScrollLayer *scroll_layer, int16_t target_y, - int16_t velocity_y, AnimationStoppedHandler stopped, - void *stopped_context); +bool scroll_layer_touch_fling_start(ScrollLayer *scroll_layer, int16_t target_y, int16_t velocity_y, + AnimationStoppedHandler stopped, void *stopped_context); //! @internal //! Restore the shared scroll animation's defaults after a fling (duration, curve, handlers). diff --git a/src/fw/applib/ui/selection_layer.c b/src/fw/applib/ui/selection_layer.c index 3de341f6ef..39aad00de0 100644 --- a/src/fw/applib/ui/selection_layer.c +++ b/src/fw/applib/ui/selection_layer.c @@ -39,22 +39,22 @@ typedef struct SelectionSizeConfig { } SelectionSizeConfig; static const SelectionSizeConfig s_selection_config_medium = { - .font_key = FONT_KEY_GOTHIC_28_BOLD, + .font_key = FONT_KEY_GOTHIC_28_BOLD, - .default_cell_height = PBL_IF_RECT_ELSE(34, 40), + .default_cell_height = PBL_IF_RECT_ELSE(34, 40), }; static const SelectionSizeConfig s_selection_config_large = { - .font_key = FONT_KEY_GOTHIC_36_BOLD, + .font_key = FONT_KEY_GOTHIC_36_BOLD, - .default_cell_height = 54, + .default_cell_height = 54, }; static const SelectionSizeConfig *s_selection_configs[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = &s_selection_config_medium, - [PreferredContentSizeMedium] = &s_selection_config_medium, - [PreferredContentSizeLarge] = &s_selection_config_large, - [PreferredContentSizeExtraLarge] = &s_selection_config_large, + [PreferredContentSizeSmall] = &s_selection_config_medium, + [PreferredContentSizeMedium] = &s_selection_config_medium, + [PreferredContentSizeLarge] = &s_selection_config_large, + [PreferredContentSizeExtraLarge] = &s_selection_config_large, }; static const SelectionSizeConfig *prv_selection_config(void) { @@ -113,9 +113,9 @@ typedef struct { } CellCornerInfo; static CellCornerInfo prv_get_cell_corner_info(int16_t cell_height) { - return (CellCornerInfo) { - .corner_mask = PBL_IF_RECT_ELSE(GCornerNone, GCornersAll), - .corner_radius = PBL_IF_RECT_ELSE(1, (cell_height / 2) - 1), + return (CellCornerInfo){ + .corner_mask = PBL_IF_RECT_ELSE(GCornerNone, GCornersAll), + .corner_radius = PBL_IF_RECT_ELSE(1, (cell_height / 2) - 1), }; } @@ -207,7 +207,6 @@ static void prv_draw_slider_slide(SelectionLayer *selection_layer, GContext *ctx // Finally our current x-offset is our starting offset plus our current distance int current_x_offset = starting_x_offset + current_slide_distance; - // As the cell slides the width of the cell also changes... // It starts as the width of the current active cell. int cur_cell_width = selection_layer->cell_widths[selection_layer->selected_cell_idx]; @@ -219,7 +218,7 @@ static void prv_draw_slider_slide(SelectionLayer *selection_layer, GContext *ctx // The current width change depends on how far we are through the animation int current_cell_width_change = - (total_cell_width_change * (int) selection_layer->slide_amin_progress) / 100; + (total_cell_width_change * (int)selection_layer->slide_amin_progress) / 100; // And finally our current width is the starting width plus any change int current_cell_width = cur_cell_width + current_cell_width_change; @@ -250,7 +249,7 @@ static void prv_draw_slider_settle(SelectionLayer *selection_layer, GContext *ct // We need to increase the cell's width by the receding padding int original_width = selection_layer->cell_widths[selection_layer->selected_cell_idx]; int receding_padding = - (selection_layer->cell_padding * selection_layer->slide_settle_anim_progress) / 100; + (selection_layer->cell_padding * selection_layer->slide_settle_anim_progress) / 100; int adjusted_width = original_width + receding_padding; const GRect rect = @@ -291,7 +290,8 @@ static void prv_draw_text(SelectionLayer *selection_layer, GContext *ctx) { // y offset with our progress if (selection_layer->selected_cell_idx == i) { int delta = (selection_layer->bump_text_anim_progress * - prv_get_font_top_padding(selection_layer->font)) / 100; + prv_get_font_top_padding(selection_layer->font)) / + 100; if (selection_layer->bump_is_upwards) { delta *= -1; } @@ -299,8 +299,8 @@ static void prv_draw_text(SelectionLayer *selection_layer, GContext *ctx) { } GRect rect = GRect(current_x_offset, y_offset, selection_layer->cell_widths[i], height); - graphics_draw_text(ctx, text, selection_layer->font, - rect, GTextOverflowModeFill, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, text, selection_layer->font, rect, GTextOverflowModeFill, + GTextAlignmentCenter, NULL); } } // Update the x-offset so we are ready for the next cell @@ -341,7 +341,7 @@ static void prv_draw_selection_layer(SelectionLayer *selection_layer, GContext * static void prv_bump_text_impl(struct Animation *animation, const AnimationProgress distance_normalized) { - SelectionLayer *selection_layer = (SelectionLayer*) animation_get_context(animation); + SelectionLayer *selection_layer = (SelectionLayer *)animation_get_context(animation); // Update the completion percent of the animation selection_layer->bump_text_anim_progress = (100 * distance_normalized) / ANIMATION_NORMALIZED_MAX; @@ -360,7 +360,7 @@ static void prv_update_cell_value(SelectionLayer *selection_layer, bool incremen } static void prv_bump_text_stopped(Animation *animation, bool finished, void *context) { - SelectionLayer *selection_layer = (SelectionLayer*) animation_get_context(animation); + SelectionLayer *selection_layer = (SelectionLayer *)animation_get_context(animation); selection_layer->bump_text_anim_progress = 0; prv_update_cell_value(selection_layer, selection_layer->bump_is_upwards); @@ -368,7 +368,7 @@ static void prv_bump_text_stopped(Animation *animation, bool finished, void *con static void prv_bump_settle_impl(struct Animation *animation, const AnimationProgress distance_normalized) { - SelectionLayer *selection_layer = (SelectionLayer*) animation_get_context(animation); + SelectionLayer *selection_layer = (SelectionLayer *)animation_get_context(animation); // Update the completion percent of the animation selection_layer->bump_settle_anim_progress = @@ -377,38 +377,38 @@ static void prv_bump_settle_impl(struct Animation *animation, } static void prv_bump_settle_stopped(Animation *animation, bool finished, void *context) { - SelectionLayer *selection_layer = (SelectionLayer*) animation_get_context(animation); + SelectionLayer *selection_layer = (SelectionLayer *)animation_get_context(animation); selection_layer->bump_settle_anim_progress = 0; } -static Animation* prv_create_bump_text_animation(SelectionLayer *selection_layer) { +static Animation *prv_create_bump_text_animation(SelectionLayer *selection_layer) { Animation *animation = animation_create(); animation_set_curve(animation, AnimationCurveEaseIn); animation_set_duration(animation, BUMP_TEXT_DURATION_MS); AnimationHandlers anim_handler = { - .stopped = prv_bump_text_stopped, + .stopped = prv_bump_text_stopped, }; animation_set_handlers(animation, anim_handler, selection_layer); - selection_layer->bump_text_impl = (AnimationImplementation) { - .update = prv_bump_text_impl, + selection_layer->bump_text_impl = (AnimationImplementation){ + .update = prv_bump_text_impl, }; animation_set_implementation(animation, &selection_layer->bump_text_impl); return animation; } -static Animation* prv_create_bump_settle_animation(SelectionLayer *selection_layer) { +static Animation *prv_create_bump_settle_animation(SelectionLayer *selection_layer) { Animation *animation = animation_create(); animation_set_curve(animation, AnimationCurveEaseOut); animation_set_duration(animation, BUMP_SETTLE_DURATION_MS); AnimationHandlers anim_handler = { - .stopped = prv_bump_settle_stopped, + .stopped = prv_bump_settle_stopped, }; animation_set_handlers(animation, anim_handler, selection_layer); - selection_layer->bump_settle_anim_impl = (AnimationImplementation) { - .update = prv_bump_settle_impl, + selection_layer->bump_settle_anim_impl = (AnimationImplementation){ + .update = prv_bump_settle_impl, }; animation_set_implementation(animation, &selection_layer->bump_settle_anim_impl); @@ -439,7 +439,7 @@ static void prv_run_value_change_animation(SelectionLayer *selection_layer) { static void prv_slide_impl(struct Animation *animation, const AnimationProgress distance_normalized) { - SelectionLayer *selection_layer = (SelectionLayer*) animation_get_context(animation); + SelectionLayer *selection_layer = (SelectionLayer *)animation_get_context(animation); // Update the completion percent of the animation selection_layer->slide_amin_progress = (100 * distance_normalized) / ANIMATION_NORMALIZED_MAX; @@ -447,14 +447,14 @@ static void prv_slide_impl(struct Animation *animation, } static void prv_slide_stopped(Animation *animation, bool finished, void *context) { - SelectionLayer *selection_layer = (SelectionLayer*) animation_get_context(animation); + SelectionLayer *selection_layer = (SelectionLayer *)animation_get_context(animation); selection_layer->slide_amin_progress = 0; selection_layer->selected_cell_idx++; } static void prv_slide_settle_impl(struct Animation *animation, const AnimationProgress distance_normalized) { - SelectionLayer *selection_layer = (SelectionLayer*) animation_get_context(animation); + SelectionLayer *selection_layer = (SelectionLayer *)animation_get_context(animation); // Update the completion percent of the animation. This is a reverse animation. It starts // fully drawn, then the amount drawn decreases @@ -464,38 +464,38 @@ static void prv_slide_settle_impl(struct Animation *animation, } static void prv_slide_settle_stopped(Animation *animation, bool finished, void *context) { - SelectionLayer *selection_layer = (SelectionLayer*) animation_get_context(animation); + SelectionLayer *selection_layer = (SelectionLayer *)animation_get_context(animation); selection_layer->slide_settle_anim_progress = 0; } -static Animation* prv_create_slide_animation(SelectionLayer *selection_layer) { +static Animation *prv_create_slide_animation(SelectionLayer *selection_layer) { Animation *animation = animation_create(); animation_set_curve(animation, AnimationCurveEaseIn); animation_set_duration(animation, SLIDE_DURATION_MS); AnimationHandlers anim_handler = { - .stopped = prv_slide_stopped, + .stopped = prv_slide_stopped, }; animation_set_handlers(animation, anim_handler, selection_layer); - selection_layer->slide_amin_impl = (AnimationImplementation) { - .update = prv_slide_impl, + selection_layer->slide_amin_impl = (AnimationImplementation){ + .update = prv_slide_impl, }; animation_set_implementation(animation, &selection_layer->slide_amin_impl); return animation; } -static Animation* prv_create_slide_settle_animation(SelectionLayer *selection_layer) { +static Animation *prv_create_slide_settle_animation(SelectionLayer *selection_layer) { Animation *animation = animation_create(); animation_set_curve(animation, AnimationCurveEaseOut); animation_set_duration(animation, SLIDE_SETTLE_DURATION_MS); AnimationHandlers anim_handler = { - .stopped = prv_slide_settle_stopped, + .stopped = prv_slide_settle_stopped, }; animation_set_handlers(animation, anim_handler, selection_layer); - selection_layer->slide_settle_anim_impl = (AnimationImplementation) { - .update = prv_slide_settle_impl, + selection_layer->slide_settle_anim_impl = (AnimationImplementation){ + .update = prv_slide_settle_impl, }; animation_set_implementation(animation, &selection_layer->slide_settle_anim_impl); @@ -514,15 +514,14 @@ static void prv_run_slide_animation(SelectionLayer *selection_layer) { /////////////////////////////////////////////////////////////////////////////////////////////////// //! Click handlers void prv_up_down_click_handler(ClickRecognizerRef recognizer, void *context) { - SelectionLayer *selection_layer = (SelectionLayer*) context; + SelectionLayer *selection_layer = (SelectionLayer *)context; bool is_up = (click_recognizer_get_button_id(recognizer) == BUTTON_ID_UP); if (selection_layer->is_active) { if (click_recognizer_is_repeating(recognizer)) { // Don't animate if the button is being held down. Just update the text - SelectionLayerIncrementCallback func = (is_up) - ? selection_layer->callbacks.increment - : selection_layer->callbacks.decrement; + SelectionLayerIncrementCallback func = + (is_up) ? selection_layer->callbacks.increment : selection_layer->callbacks.decrement; if (func) { func(selection_layer->selected_cell_idx, selection_layer->callback_context); } @@ -536,7 +535,7 @@ void prv_up_down_click_handler(ClickRecognizerRef recognizer, void *context) { } void prv_select_click_handler(ClickRecognizerRef recognizer, void *context) { - SelectionLayer *selection_layer = (SelectionLayer*) context; + SelectionLayer *selection_layer = (SelectionLayer *)context; if (selection_layer->is_active) { animation_unschedule(selection_layer->next_cell_animation); if (selection_layer->selected_cell_idx == selection_layer->num_cells - 1) { @@ -554,32 +553,29 @@ static void prv_click_config_provider(SelectionLayer *selection_layer) { window_set_click_context(BUTTON_ID_DOWN, selection_layer); window_set_click_context(BUTTON_ID_SELECT, selection_layer); - window_single_repeating_click_subscribe(BUTTON_ID_UP, - BUTTON_HOLD_REPEAT_MS, + window_single_repeating_click_subscribe(BUTTON_ID_UP, BUTTON_HOLD_REPEAT_MS, prv_up_down_click_handler); - window_single_repeating_click_subscribe(BUTTON_ID_DOWN, - BUTTON_HOLD_REPEAT_MS, + window_single_repeating_click_subscribe(BUTTON_ID_DOWN, BUTTON_HOLD_REPEAT_MS, prv_up_down_click_handler); window_single_click_subscribe(BUTTON_ID_SELECT, prv_select_click_handler); } /////////////////////////////////////////////////////////////////////////////////////////////////// //! API -void selection_layer_init(SelectionLayer *selection_layer, const GRect *frame, - unsigned num_cells) { +void selection_layer_init(SelectionLayer *selection_layer, const GRect *frame, unsigned num_cells) { if (num_cells > MAX_SELECTION_LAYER_CELLS) { num_cells = MAX_SELECTION_LAYER_CELLS; } // Set layer defaults - *selection_layer = (SelectionLayer) { - .num_cells = num_cells, - .cell_padding = DEFAULT_CELL_PADDING, - .selected_cell_idx = DEFAULT_SELECTED_INDEX, - .font = fonts_get_system_font(prv_selection_config()->font_key), - .active_background_color = DEFAULT_ACTIVE_COLOR, - .inactive_background_color = DEFAULT_INACTIVE_COLOR, - .is_active = true, + *selection_layer = (SelectionLayer){ + .num_cells = num_cells, + .cell_padding = DEFAULT_CELL_PADDING, + .selected_cell_idx = DEFAULT_SELECTED_INDEX, + .font = fonts_get_system_font(prv_selection_config()->font_key), + .active_background_color = DEFAULT_ACTIVE_COLOR, + .inactive_background_color = DEFAULT_INACTIVE_COLOR, + .is_active = true, }; for (unsigned i = 0; i < num_cells; i++) { selection_layer->cell_widths[i] = 0; @@ -588,10 +584,10 @@ void selection_layer_init(SelectionLayer *selection_layer, const GRect *frame, layer_create_with_data(*frame, sizeof(selection_layer)); layer_set_frame(&selection_layer->layer, frame); layer_set_clips(&selection_layer->layer, false); - layer_set_update_proc(&selection_layer->layer, (LayerUpdateProc) prv_draw_selection_layer); + layer_set_update_proc(&selection_layer->layer, (LayerUpdateProc)prv_draw_selection_layer); } -SelectionLayer* selection_layer_create(GRect frame, unsigned num_cells) { +SelectionLayer *selection_layer_create(GRect frame, unsigned num_cells) { // Note: Not yet exported to 3rd party apps so no padding needed SelectionLayer *selection_layer = applib_malloc(sizeof(SelectionLayer)); if (selection_layer) { @@ -600,12 +596,12 @@ SelectionLayer* selection_layer_create(GRect frame, unsigned num_cells) { return selection_layer; } -void selection_layer_deinit(SelectionLayer* selection_layer) { +void selection_layer_deinit(SelectionLayer *selection_layer) { animation_unschedule(selection_layer->next_cell_animation); animation_unschedule(selection_layer->value_change_animation); } -void selection_layer_destroy(SelectionLayer* selection_layer) { +void selection_layer_destroy(SelectionLayer *selection_layer) { if (selection_layer) { selection_layer_deinit(selection_layer); applib_free(selection_layer); @@ -646,7 +642,8 @@ void selection_layer_set_active(SelectionLayer *selection_layer, bool is_active) if (selection_layer) { if (is_active && !selection_layer->is_active) { selection_layer->selected_cell_idx = 0; - } if (!is_active && selection_layer->is_active) { + } + if (!is_active && selection_layer->is_active) { selection_layer->selected_cell_idx = MAX_SELECTION_LAYER_CELLS + 1; } selection_layer->is_active = is_active; @@ -657,8 +654,8 @@ void selection_layer_set_active(SelectionLayer *selection_layer, bool is_active) void selection_layer_set_click_config_onto_window(SelectionLayer *selection_layer, struct Window *window) { if (selection_layer && window) { - window_set_click_config_provider_with_context(window, - (ClickConfigProvider) prv_click_config_provider, selection_layer); + window_set_click_config_provider_with_context( + window, (ClickConfigProvider)prv_click_config_provider, selection_layer); } } diff --git a/src/fw/applib/ui/selection_layer.h b/src/fw/applib/ui/selection_layer.h index 2c7df591a9..d86d45d4a6 100644 --- a/src/fw/applib/ui/selection_layer.h +++ b/src/fw/applib/ui/selection_layer.h @@ -12,7 +12,7 @@ #define MAX_SELECTION_LAYER_CELLS 3 -typedef char* (*SelectionLayerGetCellText)(unsigned index, void *callback_context); +typedef char *(*SelectionLayerGetCellText)(unsigned index, void *callback_context); typedef void (*SelectionLayerCompleteCallback)(void *callback_context); @@ -27,7 +27,6 @@ typedef struct SelectionLayerCallbacks { SelectionLayerDecrementCallback decrement; } SelectionLayerCallbacks; - typedef struct SelectionLayer { Layer layer; unsigned num_cells; @@ -60,18 +59,16 @@ typedef struct SelectionLayer { AnimationImplementation slide_settle_anim_impl; } SelectionLayer; - - void selection_layer_init(SelectionLayer *selection_layer, const GRect *frame, unsigned num_cells); -SelectionLayer* selection_layer_create(GRect frame, unsigned num_cells); +SelectionLayer *selection_layer_create(GRect frame, unsigned num_cells); -void selection_layer_deinit(SelectionLayer* selection_layer); +void selection_layer_deinit(SelectionLayer *selection_layer); -void selection_layer_destroy(SelectionLayer* selection_layer); +void selection_layer_destroy(SelectionLayer *selection_layer); -void selection_layer_set_cell_width(SelectionLayer *selection_layer, - unsigned cell_idx, unsigned width); +void selection_layer_set_cell_width(SelectionLayer *selection_layer, unsigned cell_idx, + unsigned width); void selection_layer_set_font(SelectionLayer *selection_layer, GFont font); @@ -87,8 +84,7 @@ void selection_layer_set_active(SelectionLayer *selection_layer, bool is_active) void selection_layer_set_click_config_onto_window(SelectionLayer *selection_layer, struct Window *window); -void selection_layer_set_callbacks(SelectionLayer *selection_layer, - void *callback_context, +void selection_layer_set_callbacks(SelectionLayer *selection_layer, void *callback_context, SelectionLayerCallbacks callbacks); int selection_layer_default_cell_height(void); diff --git a/src/fw/applib/ui/shadows.c b/src/fw/applib/ui/shadows.c index 2bfdf5bb0a..2ae66becc2 100644 --- a/src/fw/applib/ui/shadows.c +++ b/src/fw/applib/ui/shadows.c @@ -5,47 +5,44 @@ //! Top shadow, horizontally-tileable bitmap (32 x 19px): static const uint8_t s_shadow_top_data[] = { - // GBitmap bytes generated by bitmapgen.py: - 0xdd, 0xdd, 0xdd, 0xdd, 0x77, 0x77, 0x77, 0x77, 0xdd, 0xdd, 0xdd, 0xdd, 0x77, 0x77, 0x77, 0x77, - 0xda, 0xda, 0xda, 0xda, 0xab, 0xab, 0xab, 0xab, 0x6d, 0x6d, 0x6d, 0x6d, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0x82, 0x20, 0x82, 0x20, 0x34, 0x4d, 0x34, 0x4d, - 0x41, 0x10, 0x41, 0x10, 0x14, 0x45, 0x14, 0x45, 0x41, 0x10, 0x41, 0x10, 0x10, 0x04, 0x10, 0x04, - 0x82, 0x20, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, + // GBitmap bytes generated by bitmapgen.py: + 0xdd, 0xdd, 0xdd, 0xdd, 0x77, 0x77, 0x77, 0x77, 0xdd, 0xdd, 0xdd, 0xdd, 0x77, 0x77, 0x77, 0x77, + 0xda, 0xda, 0xda, 0xda, 0xab, 0xab, 0xab, 0xab, 0x6d, 0x6d, 0x6d, 0x6d, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0x82, 0x20, 0x82, 0x20, 0x34, 0x4d, 0x34, 0x4d, + 0x41, 0x10, 0x41, 0x10, 0x14, 0x45, 0x14, 0x45, 0x41, 0x10, 0x41, 0x10, 0x10, 0x04, 0x10, 0x04, + 0x82, 0x20, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, }; static const GBitmap s_shadow_top_bitmap = { - .addr = (uint8_t *)s_shadow_top_data, - .row_size_bytes = 4, - .info.format = GBitmapFormat1Bit, - .info.version = 1, - .bounds = { { 0, 0 }, - { 32, 19 } }, + .addr = (uint8_t *)s_shadow_top_data, + .row_size_bytes = 4, + .info.format = GBitmapFormat1Bit, + .info.version = 1, + .bounds = {{0, 0}, {32, 19}}, }; static const uint8_t s_shadow_bottom_data[] = { - // GBitmap bytes generated by bitmapgen.py: - 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x41, 0x04, 0x41, 0x20, 0x08, 0x20, 0x08, - 0x08, 0x82, 0x08, 0x82, 0xa2, 0x28, 0xa2, 0x28, 0x08, 0x82, 0x08, 0x82, 0xb2, 0x2c, 0xb2, 0x2c, - 0x04, 0x41, 0x04, 0x41, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, - 0xb6, 0xb6, 0xb6, 0xb6, 0xd5, 0xd5, 0xd5, 0xd5, 0x5b, 0x5b, 0x5b, 0x5b, 0xee, 0xee, 0xee, 0xee, - 0xbb, 0xbb, 0xbb, 0xbb, 0xee, 0xee, 0xee, 0xee, 0xbb, 0xbb, 0xbb, 0xbb, + // GBitmap bytes generated by bitmapgen.py: + 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x41, 0x04, 0x41, 0x20, 0x08, 0x20, 0x08, + 0x08, 0x82, 0x08, 0x82, 0xa2, 0x28, 0xa2, 0x28, 0x08, 0x82, 0x08, 0x82, 0xb2, 0x2c, 0xb2, 0x2c, + 0x04, 0x41, 0x04, 0x41, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0xb6, 0xb6, 0xb6, 0xb6, 0xd5, 0xd5, 0xd5, 0xd5, 0x5b, 0x5b, 0x5b, 0x5b, 0xee, 0xee, 0xee, 0xee, + 0xbb, 0xbb, 0xbb, 0xbb, 0xee, 0xee, 0xee, 0xee, 0xbb, 0xbb, 0xbb, 0xbb, }; //! Bottom shadow, horizontally-tileable bitmap (32 x 19px): static const GBitmap s_shadow_bottom_bitmap = { - .addr = (uint8_t *)s_shadow_bottom_data, - .row_size_bytes = 4, - .info.format = GBitmapFormat1Bit, - .info.version = 1, - .bounds = { { 0, 0 }, - { 32, 19 } }, + .addr = (uint8_t *)s_shadow_bottom_data, + .row_size_bytes = 4, + .info.format = GBitmapFormat1Bit, + .info.version = 1, + .bounds = {{0, 0}, {32, 19}}, }; -GBitmap* shadow_get_top(void) { - return (GBitmap*) &s_shadow_top_bitmap; +GBitmap *shadow_get_top(void) { + return (GBitmap *)&s_shadow_top_bitmap; } -GBitmap* shadow_get_bottom(void) { - return (GBitmap *) &s_shadow_bottom_bitmap; +GBitmap *shadow_get_bottom(void) { + return (GBitmap *)&s_shadow_bottom_bitmap; } - diff --git a/src/fw/applib/ui/shadows.h b/src/fw/applib/ui/shadows.h index 16f3e15a12..3a2c7d349e 100644 --- a/src/fw/applib/ui/shadows.h +++ b/src/fw/applib/ui/shadows.h @@ -5,5 +5,5 @@ #include "applib/graphics/gtypes.h" -GBitmap* shadow_get_top(void); -GBitmap* shadow_get_bottom(void); +GBitmap *shadow_get_top(void); +GBitmap *shadow_get_bottom(void); diff --git a/src/fw/applib/ui/simple_menu_layer.c b/src/fw/applib/ui/simple_menu_layer.c index 33039e6961..225ebadb39 100644 --- a/src/fw/applib/ui/simple_menu_layer.c +++ b/src/fw/applib/ui/simple_menu_layer.c @@ -7,9 +7,10 @@ #include "applib/applib_malloc.auto.h" #include "process_management/process_manager.h" -static int16_t get_header_height(struct MenuLayer *menu_layer, uint16_t section_index, void *callback_context) { +static int16_t get_header_height(struct MenuLayer *menu_layer, uint16_t section_index, + void *callback_context) { (void)menu_layer; - if (((SimpleMenuLayer*)callback_context)->sections[section_index].title) { + if (((SimpleMenuLayer *)callback_context)->sections[section_index].title) { return MENU_CELL_BASIC_HEADER_HEIGHT; } else { return 0; @@ -18,24 +19,27 @@ static int16_t get_header_height(struct MenuLayer *menu_layer, uint16_t section_ static uint16_t get_num_sections(MenuLayer *menu_layer, void *callback_context) { (void)menu_layer; - return ((SimpleMenuLayer*)callback_context)->num_sections; + return ((SimpleMenuLayer *)callback_context)->num_sections; } -static uint16_t get_num_rows(MenuLayer *menu_layer, uint16_t section_index, void *callback_context) { +static uint16_t get_num_rows(MenuLayer *menu_layer, uint16_t section_index, + void *callback_context) { (void)menu_layer; - return ((SimpleMenuLayer*)callback_context)->sections[section_index].num_items; + return ((SimpleMenuLayer *)callback_context)->sections[section_index].num_items; } -static void draw_row(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, void *callback_context) { - SimpleMenuLayer *simple_menu = (SimpleMenuLayer*)callback_context; +static void draw_row(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *callback_context) { + SimpleMenuLayer *simple_menu = (SimpleMenuLayer *)callback_context; const SimpleMenuItem *item = &simple_menu->sections[cell_index->section].items[cell_index->row]; menu_cell_basic_draw(ctx, cell_layer, item->title, item->subtitle, item->icon); } -static void draw_header(GContext* ctx, const Layer *cell_layer, uint16_t section_index, void *callback_context) { - const char *title = ((SimpleMenuLayer*)callback_context)->sections[section_index].title; +static void draw_header(GContext *ctx, const Layer *cell_layer, uint16_t section_index, + void *callback_context) { + const char *title = ((SimpleMenuLayer *)callback_context)->sections[section_index].title; if (title == NULL) { return; } @@ -44,15 +48,15 @@ static void draw_header(GContext* ctx, const Layer *cell_layer, uint16_t section static void select_click(MenuLayer *menu_layer, MenuIndex *cell_index, void *callback_context) { (void)menu_layer; - SimpleMenuLayer *simple_menu = (SimpleMenuLayer*)callback_context; + SimpleMenuLayer *simple_menu = (SimpleMenuLayer *)callback_context; - SimpleMenuLayerSelectCallback cb = simple_menu->sections[cell_index->section].items[cell_index->row].callback; + SimpleMenuLayerSelectCallback cb = + simple_menu->sections[cell_index->section].items[cell_index->row].callback; if (cb != NULL) { cb(cell_index->row, simple_menu->callback_context); } } - void simple_menu_layer_init(SimpleMenuLayer *simple_menu, const GRect *frame, Window *window, const SimpleMenuSection *sections, int num_sections, void *callback_context) { @@ -67,19 +71,20 @@ void simple_menu_layer_init(SimpleMenuLayer *simple_menu, const GRect *frame, Wi simple_menu->callback_context = callback_context; // use this SimpleMenuLayer as the callback context - menu_layer_set_callbacks(&simple_menu->menu, simple_menu, &(MenuLayerCallbacks) { - .get_num_sections = get_num_sections, - .get_header_height = get_header_height, - .get_num_rows = get_num_rows, - .draw_row = draw_row, - .select_click = select_click, - .draw_header = draw_header, - }); + menu_layer_set_callbacks(&simple_menu->menu, simple_menu, + &(MenuLayerCallbacks){ + .get_num_sections = get_num_sections, + .get_header_height = get_header_height, + .get_num_rows = get_num_rows, + .draw_row = draw_row, + .select_click = select_click, + .draw_header = draw_header, + }); menu_layer_set_click_config_onto_window(&simple_menu->menu, window); } -SimpleMenuLayer* simple_menu_layer_create(GRect frame, Window *window, +SimpleMenuLayer *simple_menu_layer_create(GRect frame, Window *window, const SimpleMenuSection *sections, int32_t num_sections, void *callback_context) { SimpleMenuLayer *layer = applib_type_malloc(SimpleMenuLayer); @@ -93,7 +98,7 @@ void simple_menu_layer_deinit(SimpleMenuLayer *menu_layer) { menu_layer_deinit(&menu_layer->menu); } -void simple_menu_layer_destroy(SimpleMenuLayer* menu_layer) { +void simple_menu_layer_destroy(SimpleMenuLayer *menu_layer) { if (menu_layer == NULL) { return; } @@ -101,7 +106,7 @@ void simple_menu_layer_destroy(SimpleMenuLayer* menu_layer) { applib_free(menu_layer); } -Layer* simple_menu_layer_get_layer(const SimpleMenuLayer *simple_menu) { +Layer *simple_menu_layer_get_layer(const SimpleMenuLayer *simple_menu) { return menu_layer_get_layer(&simple_menu->menu); } @@ -109,7 +114,8 @@ int simple_menu_layer_get_selected_index(const SimpleMenuLayer *simple_menu) { return menu_layer_get_selected_index(&simple_menu->menu).row; } -void simple_menu_layer_set_selected_index(SimpleMenuLayer *simple_menu, int32_t index, bool animated) { +void simple_menu_layer_set_selected_index(SimpleMenuLayer *simple_menu, int32_t index, + bool animated) { MenuIndex menu_index = MenuIndex(simple_menu->menu.selection.index.section, index); menu_layer_set_selected_index(&simple_menu->menu, menu_index, MenuRowAlignCenter, animated); } diff --git a/src/fw/applib/ui/simple_menu_layer.h b/src/fw/applib/ui/simple_menu_layer.h index cab0c911a3..5af3cd62bc 100644 --- a/src/fw/applib/ui/simple_menu_layer.h +++ b/src/fw/applib/ui/simple_menu_layer.h @@ -98,13 +98,14 @@ void simple_menu_layer_init(SimpleMenuLayer *simple_menu, const GRect *frame, Wi //! @note This function does not add the menu's layer to the window. //! @return A pointer to the SimpleMenuLayer. `NULL` if the SimpleMenuLayer could not //! be created -SimpleMenuLayer* simple_menu_layer_create(GRect frame, Window *window, - const SimpleMenuSection *sections, int32_t num_sections, void *callback_context); +SimpleMenuLayer *simple_menu_layer_create(GRect frame, Window *window, + const SimpleMenuSection *sections, int32_t num_sections, + void *callback_context); void simple_menu_layer_deinit(SimpleMenuLayer *menu_layer); //! Destroys a SimpleMenuLayer previously created by simple_menu_layer_create. -void simple_menu_layer_destroy(SimpleMenuLayer* menu_layer); +void simple_menu_layer_destroy(SimpleMenuLayer *menu_layer); //! Gets the "root" Layer of the simple menu layer, which is the parent for the //! sub-layers used for its implementation. @@ -113,7 +114,7 @@ void simple_menu_layer_destroy(SimpleMenuLayer* menu_layer); //! @return The "root" Layer of the menu layer. //! @internal //! @note The result is always equal to `(Layer *) simple_menu`. -Layer* simple_menu_layer_get_layer(const SimpleMenuLayer *simple_menu); +Layer *simple_menu_layer_get_layer(const SimpleMenuLayer *simple_menu); //! Gets the row index of the currently selection menu item. //! @param simple_menu The SimpleMenuLayer for which to get the current @@ -125,7 +126,8 @@ int simple_menu_layer_get_selected_index(const SimpleMenuLayer *simple_menu); //! @param index The row index of the item to select //! @param animated Supply `true` to animate changing the selection, or `false` //! to change the selection instantly. -void simple_menu_layer_set_selected_index(SimpleMenuLayer *simple_menu, int32_t index, bool animated); +void simple_menu_layer_set_selected_index(SimpleMenuLayer *simple_menu, int32_t index, + bool animated); //! @param simple_menu The \ref SimpleMenuLayer to get the \ref MenuLayer from. //! @return The \ref MenuLayer. diff --git a/src/fw/applib/ui/speaker.c b/src/fw/applib/ui/speaker.c index e2d1bc6d70..48ff63415a 100644 --- a/src/fw/applib/ui/speaker.c +++ b/src/fw/applib/ui/speaker.c @@ -18,15 +18,14 @@ bool speaker_play_notes(const SpeakerNote *notes, uint32_t num_notes, uint8_t vo return sys_speaker_play_note_seq(notes, num_notes, 0 /* SpeakerPriorityApp */, volume); } -bool speaker_play_tone(uint16_t frequency_hz, uint32_t duration_ms, - uint8_t volume, SpeakerWaveform waveform) { +bool speaker_play_tone(uint16_t frequency_hz, uint32_t duration_ms, uint8_t volume, + SpeakerWaveform waveform) { if (duration_ms > 10000) { duration_ms = 10000; } - return sys_speaker_play_tone(frequency_hz, (uint16_t)duration_ms, - (uint8_t)waveform, 0 /* use global volume */, - 0 /* SpeakerPriorityApp */, volume); + return sys_speaker_play_tone(frequency_hz, (uint16_t)duration_ms, (uint8_t)waveform, + 0 /* use global volume */, 0 /* SpeakerPriorityApp */, volume); } bool speaker_stream_open(SpeakerPcmFormat format, uint8_t volume) { @@ -75,8 +74,7 @@ static void prv_finish_event_handler(PebbleEvent *e, void *context) { if (cb == NULL) { return; } - cb((SpeakerFinishReason)e->speaker.finish_reason, - app_state_get_speaker_finish_ctx()); + cb((SpeakerFinishReason)e->speaker.finish_reason, app_state_get_speaker_finish_ctx()); } void speaker_set_finish_callback(SpeakerFinishedCallback cb, void *ctx) { diff --git a/src/fw/applib/ui/speaker.h b/src/fw/applib/ui/speaker.h index 3fc014cafb..696d0c5bde 100644 --- a/src/fw/applib/ui/speaker.h +++ b/src/fw/applib/ui/speaker.h @@ -58,8 +58,8 @@ bool speaker_play_tracks(const SpeakerTrack *tracks, uint32_t num_tracks, uint8_ //! @param volume Playback volume (0-100) //! @param waveform Waveform to use //! @return true if playback started successfully -bool speaker_play_tone(uint16_t frequency_hz, uint32_t duration_ms, - uint8_t volume, SpeakerWaveform waveform); +bool speaker_play_tone(uint16_t frequency_hz, uint32_t duration_ms, uint8_t volume, + SpeakerWaveform waveform); //! Open a raw PCM stream for app-generated audio. //! @param format PCM format specifying sample rate and bit depth diff --git a/src/fw/applib/ui/status_bar_layer.c b/src/fw/applib/ui/status_bar_layer.c index 1b86baeb69..66695a065f 100644 --- a/src/fw/applib/ui/status_bar_layer.c +++ b/src/fw/applib/ui/status_bar_layer.c @@ -33,40 +33,38 @@ static ALWAYS_INLINE bool prv_mode_is_large_bold(StatusBarLayerMode mode) { } static ALWAYS_INLINE bool prv_mode_is_clock(StatusBarLayerMode mode) { - return mode == StatusBarLayerModeClock || - mode == StatusBarLayerModeClockBold || + return mode == StatusBarLayerModeClock || mode == StatusBarLayerModeClockBold || prv_mode_is_large_bold(mode); } -static ALWAYS_INLINE StatusBarTextFormat prv_get_text_format( - const StatusBarLayerConfig *config) { +static ALWAYS_INLINE StatusBarTextFormat prv_get_text_format(const StatusBarLayerConfig *config) { const PlatformType platform = process_manager_current_platform(); const StatusBarLayerMode mode = config ? config->mode : StatusBarLayerModeClock; const char *font_key; if (prv_mode_is_large_bold(mode)) { font_key = PBL_PLATFORM_SWITCH(platform, - /*aplite*/ FONT_KEY_GOTHIC_18_BOLD, - /*basalt*/ FONT_KEY_GOTHIC_18_BOLD, - /*chalk*/ FONT_KEY_GOTHIC_18_BOLD, - /*diorite*/ FONT_KEY_GOTHIC_18_BOLD, - /*emery*/ FONT_KEY_GOTHIC_24_BOLD, - /*flint*/ FONT_KEY_GOTHIC_18_BOLD, - /*gabbro*/ FONT_KEY_GOTHIC_24_BOLD); + /*aplite*/ FONT_KEY_GOTHIC_18_BOLD, + /*basalt*/ FONT_KEY_GOTHIC_18_BOLD, + /*chalk*/ FONT_KEY_GOTHIC_18_BOLD, + /*diorite*/ FONT_KEY_GOTHIC_18_BOLD, + /*emery*/ FONT_KEY_GOTHIC_24_BOLD, + /*flint*/ FONT_KEY_GOTHIC_18_BOLD, + /*gabbro*/ FONT_KEY_GOTHIC_24_BOLD); } else { const bool bold = (mode == StatusBarLayerModeClockBold); font_key = PBL_PLATFORM_SWITCH(platform, - /*aplite*/ bold ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14, - /*basalt*/ bold ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14, - /*chalk*/ bold ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14, - /*diorite*/ bold ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14, - /*emery*/ bold ? FONT_KEY_GOTHIC_18_BOLD : FONT_KEY_GOTHIC_18, - /*flint*/ bold ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14, - /*gabbro*/ bold ? FONT_KEY_GOTHIC_18_BOLD : FONT_KEY_GOTHIC_18); + /*aplite*/ bold ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14, + /*basalt*/ bold ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14, + /*chalk*/ bold ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14, + /*diorite*/ bold ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14, + /*emery*/ bold ? FONT_KEY_GOTHIC_18_BOLD : FONT_KEY_GOTHIC_18, + /*flint*/ bold ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14, + /*gabbro*/ bold ? FONT_KEY_GOTHIC_18_BOLD : FONT_KEY_GOTHIC_18); } - return (StatusBarTextFormat) { - .overflow_mode = GTextOverflowModeTrailingEllipsis, - .text_alignment = GTextAlignmentCenter, - .font = fonts_get_system_font(font_key), + return (StatusBarTextFormat){ + .overflow_mode = GTextOverflowModeTrailingEllipsis, + .text_alignment = GTextAlignmentCenter, + .font = fonts_get_system_font(font_key), }; } @@ -113,7 +111,7 @@ static void prv_status_bar_layer_render(Layer *layer, GContext *ctx) { void status_bar_layer_init(StatusBarLayer *status_bar_layer) { PBL_ASSERTN(status_bar_layer); *status_bar_layer = (StatusBarLayer){ - .previous_min_of_day = -1, + .previous_min_of_day = -1, }; // The status bar needs to be as wide as the framebuffer we will render it into, which may be less @@ -122,22 +120,22 @@ void status_bar_layer_init(StatusBarLayer *status_bar_layer) { GContext *ctx = graphics_context_get_current_context(); const GSize current_framebuffer_size = graphics_context_get_framebuffer_size(ctx); - layer_init(&status_bar_layer->layer, - &GRect(0, 0, current_framebuffer_size.w, prv_height(NULL))); + layer_init(&status_bar_layer->layer, &GRect(0, 0, current_framebuffer_size.w, prv_height(NULL))); status_bar_layer->layer.update_proc = prv_status_bar_layer_render; status_bar_layer->layer.property_changed_proc = prv_status_bar_property_changed; // tick event to callback which checks every second if the time is correct status_bar_layer->tick_event = (EventServiceInfo){ - .type = PEBBLE_TICK_EVENT, - .handler = prv_tick_timer_handler_cb, - .context = status_bar_layer}; + .type = PEBBLE_TICK_EVENT, + .handler = prv_tick_timer_handler_cb, + .context = status_bar_layer + }; event_service_client_subscribe(&(status_bar_layer->tick_event)); status_bar_layer->config = (StatusBarLayerConfig){ - .foreground_color = GColorWhite, - .background_color = GColorBlack, - .separator.mode = StatusBarLayerSeparatorModeNone, + .foreground_color = GColorWhite, + .background_color = GColorBlack, + .separator.mode = StatusBarLayerSeparatorModeNone, }; status_bar_layer->title_timer_id = TIMER_INVALID_ID; @@ -196,19 +194,16 @@ GColor status_bar_layer_get_foreground_color(const StatusBarLayer *status_bar_la return status_bar_layer->config.foreground_color; } -void status_bar_layer_set_title(StatusBarLayer *status_bar_layer, - const char *text, - bool revert, +void status_bar_layer_set_title(StatusBarLayer *status_bar_layer, const char *text, bool revert, bool animated) { // copies the contents at text into title_text_buffer for display strncpy(status_bar_layer->config.title_text_buffer, text, TITLE_TEXT_BUFFER_SIZE); - if (revert) { // revert title text back to clock time after STATUS_BAR_LAYER_TITLE_TIMEOUT + if (revert) { // revert title text back to clock time after STATUS_BAR_LAYER_TITLE_TIMEOUT if (status_bar_layer->title_timer_id != TIMER_INVALID_ID) { - app_timer_cancel(status_bar_layer->title_timer_id); + app_timer_cancel(status_bar_layer->title_timer_id); } - status_bar_layer->title_timer_id = app_timer_register(STATUS_BAR_LAYER_TITLE_TIMEOUT, - status_bar_layer_reset_title, - status_bar_layer); + status_bar_layer->title_timer_id = app_timer_register( + STATUS_BAR_LAYER_TITLE_TIMEOUT, status_bar_layer_reset_title, status_bar_layer); } status_bar_layer->config.mode = StatusBarLayerModeLoading; layer_mark_dirty(&(status_bar_layer->layer)); @@ -233,8 +228,7 @@ void status_bar_layer_set_info_text(StatusBarLayer *status_bar_layer, const char } // Sets info text either ot X/Y or percentage if total is larger than MAX_INFO_TOTAL -void status_bar_layer_set_info_progress(StatusBarLayer *status_bar_layer, - uint16_t current, +void status_bar_layer_set_info_progress(StatusBarLayer *status_bar_layer, uint16_t current, uint16_t total) { PBL_ASSERTN(status_bar_layer); if (current > total) { @@ -242,11 +236,11 @@ void status_bar_layer_set_info_progress(StatusBarLayer *status_bar_layer, return; } else { char *str = status_bar_layer->config.info_text_buffer; - memset(str, 0 , INFO_TEXT_BUFFER_SIZE); - if (total > MAX_INFO_TOTAL) { // total is large; display as a percentage + memset(str, 0, INFO_TEXT_BUFFER_SIZE); + if (total > MAX_INFO_TOTAL) { // total is large; display as a percentage itoa_int(current * 100 / total, str, 10); strcat(str, "%"); - } else { // display as an X/Y + } else { // display as an X/Y itoa_int(current, str, 10); strcat(str, "/"); char buffer[(INFO_TEXT_BUFFER_SIZE - 1) / 2]; @@ -286,7 +280,7 @@ void status_bar_layer_set_mode(StatusBarLayer *status_bar_layer, StatusBarLayerM } void status_bar_layer_set_separator_load_percentage(StatusBarLayer *status_bar_layer, - int16_t percentage) { + int16_t percentage) { PBL_ASSERTN(status_bar_layer); // TODO: animation related function layer_mark_dirty(&(status_bar_layer->layer)); @@ -319,19 +313,15 @@ static void prv_tick_timer_handler_cb(PebbleEvent *e, void *cb_data) { sys_localtime_r(&e->clock_tick.tick_time, &currtime); const int min_of_day = (currtime.tm_hour * 60) + currtime.tm_min; if (status_bar_layer->previous_min_of_day != min_of_day) { - prv_status_bar_layer_update_clock(status_bar_layer); // update clock text and mark dirty + prv_status_bar_layer_update_clock(status_bar_layer); // update clock text and mark dirty status_bar_layer->previous_min_of_day = min_of_day; } } // Calculate position and renders text -static void prv_status_bar_layer_render_text(GContext *ctx, - const StatusBarLayerConfig *config, - int16_t min_x, - int16_t max_x, - int16_t min_y, - int16_t max_y, - char *data) { +static void prv_status_bar_layer_render_text(GContext *ctx, const StatusBarLayerConfig *config, + int16_t min_x, int16_t max_x, int16_t min_y, + int16_t max_y, char *data) { const StatusBarTextFormat text_format = prv_get_text_format(config); const GFont font = text_format.font; const uint8_t font_height = fonts_get_font_height(font); @@ -351,13 +341,13 @@ static void prv_status_bar_layer_render_text(GContext *ctx, // gabbro's round display needs a few extra px so the time clears the curve. const PlatformType platform = process_manager_current_platform(); const int16_t large_bold_y_nudge = PBL_PLATFORM_SWITCH(platform, - /*aplite*/ 0, - /*basalt*/ 0, - /*chalk*/ 0, - /*diorite*/ 0, - /*emery*/ 0, - /*flint*/ 0, - /*gabbro*/ 3); + /*aplite*/ 0, + /*basalt*/ 0, + /*chalk*/ 0, + /*diorite*/ 0, + /*emery*/ 0, + /*flint*/ 0, + /*gabbro*/ 3); y = min_y + (max_y - min_y - font_height) / 2 - (font_height - 4) / 4 + large_bold_y_nudge; } else { // Default: bottom-aligned with separator-area padding. @@ -365,25 +355,22 @@ static void prv_status_bar_layer_render_text(GContext *ctx, } const GRect text_box = GRect(x_start, y, width, font_height); // In the outlined mode, draw a 1px black outline for legibility over busy backgrounds (e.g. album - // art): the glyphs are drawn black at the 8 surrounding offsets first, then the foreground on top. + // art): the glyphs are drawn black at the 8 surrounding offsets first, then the foreground on + // top. if (config && config->mode == StatusBarLayerModeClockLargeBoldOutlined) { static const GPoint k_outline_offsets[] = { - { -1, -1 }, { 0, -1 }, { 1, -1 }, { -1, 0 }, { 1, 0 }, { -1, 1 }, { 0, 1 }, { 1, 1 }, + {-1, -1}, {0, -1}, {1, -1}, {-1, 0}, {1, 0}, {-1, 1}, {0, 1}, {1, 1}, }; graphics_context_set_text_color(ctx, GColorBlack); for (unsigned i = 0; i < sizeof(k_outline_offsets) / sizeof(k_outline_offsets[0]); ++i) { - const GRect box = GRect(x_start + k_outline_offsets[i].x, y + k_outline_offsets[i].y, - width, font_height); + const GRect box = + GRect(x_start + k_outline_offsets[i].x, y + k_outline_offsets[i].y, width, font_height); graphics_draw_text(ctx, data, font, box, text_format.overflow_mode, text_format.text_alignment, NULL); } graphics_context_set_text_color(ctx, config->foreground_color); } - graphics_draw_text(ctx, - data, - font, - text_box, - text_format.overflow_mode, + graphics_draw_text(ctx, data, font, text_box, text_format.overflow_mode, text_format.text_alignment, NULL); } @@ -412,43 +399,34 @@ void status_bar_layer_render(GContext *ctx, const GRect *bounds, StatusBarLayerC // update title buffer with time if in a clock mode if (prv_mode_is_clock(config->mode)) { - clock_copy_time_string(config->title_text_buffer, - sizeof(config->title_text_buffer)); + clock_copy_time_string(config->title_text_buffer, sizeof(config->title_text_buffer)); } - if (config->mode != StatusBarLayerModeCustomText) { // draw center text + if (config->mode != StatusBarLayerModeCustomText) { // draw center text graphics_context_set_compositing_mode(ctx, GCompOpAssign); prv_status_bar_layer_render_text(ctx, config, x_offset_l, x_offset_r, y_offset_top, y_offset_bottom, config->title_text_buffer); - } else { // TODO: here goes center text animations + } else { // TODO: here goes center text animations } // render info text GFont info_font = prv_get_text_format(config).font; // find width of info text - GSize max_used_size = graphics_text_layout_get_max_used_size(ctx, config->info_text_buffer, - info_font, - GRect(0, 0, 100, prv_height(config)), - GTextOverflowModeTrailingEllipsis, - GTextAlignmentCenter, - NULL); + GSize max_used_size = graphics_text_layout_get_max_used_size( + ctx, config->info_text_buffer, info_font, GRect(0, 0, 100, prv_height(config)), + GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); // use the width found to render the info text - int16_t info_text_left_offset = (int16_t) (x_offset_r - max_used_size.w - - STATUS_BAR_LAYER_INFO_PADDING); - int16_t info_text_right_offset = (int16_t) (x_offset_r - STATUS_BAR_LAYER_INFO_PADDING); - prv_status_bar_layer_render_text(ctx, - config, - info_text_left_offset, - info_text_right_offset, - y_offset_top, - y_offset_bottom, - config->info_text_buffer); + int16_t info_text_left_offset = + (int16_t)(x_offset_r - max_used_size.w - STATUS_BAR_LAYER_INFO_PADDING); + int16_t info_text_right_offset = (int16_t)(x_offset_r - STATUS_BAR_LAYER_INFO_PADDING); + prv_status_bar_layer_render_text(ctx, config, info_text_left_offset, info_text_right_offset, + y_offset_top, y_offset_bottom, config->info_text_buffer); // draw the separator if (config->separator.mode != StatusBarLayerSeparatorModeNone) { graphics_context_set_stroke_color(ctx, config->foreground_color); - GPoint origin = {x_offset_l, (int16_t) (y_offset_bottom - STATUS_BAR_LAYER_SEPARATOR_Y_OFFSET)}; - graphics_draw_horizontal_line_dotted(ctx, origin, (uint16_t) x_offset_r); + GPoint origin = {x_offset_l, (int16_t)(y_offset_bottom - STATUS_BAR_LAYER_SEPARATOR_Y_OFFSET)}; + graphics_draw_horizontal_line_dotted(ctx, origin, (uint16_t)x_offset_r); } } @@ -464,11 +442,8 @@ int16_t status_layer_get_title_text_width(StatusBarLayer *status_bar_layer) { char time_text_buffer[TITLE_TEXT_BUFFER_SIZE]; clock_copy_time_string(time_text_buffer, sizeof(time_text_buffer)); GContext *ctx = graphics_context_get_current_context(); - return graphics_text_layout_get_max_used_size(ctx, - time_text_buffer, - text_format.font, - status_bar_layer->layer.bounds, - text_format.overflow_mode, - text_format.text_alignment, - NULL).w; + return graphics_text_layout_get_max_used_size( + ctx, time_text_buffer, text_format.font, status_bar_layer->layer.bounds, + text_format.overflow_mode, text_format.text_alignment, NULL) + .w; } diff --git a/src/fw/applib/ui/status_bar_layer.h b/src/fw/applib/ui/status_bar_layer.h index 5f35c80966..22fc333944 100644 --- a/src/fw/applib/ui/status_bar_layer.h +++ b/src/fw/applib/ui/status_bar_layer.h @@ -18,28 +18,19 @@ //! @{ //! The fixed height of the status bar, including separator height, for all platforms. -#define _STATUS_BAR_LAYER_HEIGHT(plat) PBL_PLATFORM_SWITCH(plat, \ - /*aplite*/ 16, \ - /*basalt*/ 16, \ - /*chalk*/ 24, \ - /*diorite*/ 16, \ - /*emery*/ 20, \ - /*flint*/ 16, \ - /*gabbro*/ 20) +#define _STATUS_BAR_LAYER_HEIGHT(plat) \ + PBL_PLATFORM_SWITCH(plat, /*aplite*/ 16, /*basalt*/ 16, /*chalk*/ 24, /*diorite*/ 16, \ + /*emery*/ 20, /*flint*/ 16, /*gabbro*/ 20) //! The fixed height of the status bar, including separator height #define STATUS_BAR_LAYER_HEIGHT _STATUS_BAR_LAYER_HEIGHT(PBL_PLATFORM_TYPE_CURRENT) //! The height of the status bar when rendering the "Big & Bold" clock, including //! separator height, for all platforms. -#define _STATUS_BAR_LAYER_LARGE_BOLD_HEIGHT(plat) PBL_PLATFORM_SWITCH(plat, \ - /*aplite*/ 20, \ - /*basalt*/ 20, \ - /*chalk*/ 24, /* already tall enough; only the font grows */ \ - /*diorite*/ 20, \ - /*emery*/ 26, \ - /*flint*/ 20, \ - /*gabbro*/ 26) +#define _STATUS_BAR_LAYER_LARGE_BOLD_HEIGHT(plat) \ + PBL_PLATFORM_SWITCH(plat, /*aplite*/ 20, /*basalt*/ 20, /*chalk*/ 24, \ + /* already tall enough; only the font grows */ /*diorite*/ 20, /*emery*/ 26, \ + /*flint*/ 20, /*gabbro*/ 26) //! The "Big & Bold" status bar height for the current platform. #define STATUS_BAR_LAYER_LARGE_BOLD_HEIGHT \ @@ -62,7 +53,6 @@ //! The max size of the total value of set_info_progress before progress is displayed as percentage #define MAX_INFO_TOTAL 99 - //! Values that are used to indicate the different status bar modes typedef enum { //! Default mode. Time display takes priority @@ -97,12 +87,12 @@ typedef struct StatusBarLayerSeparator { //! Configuration of a StatusBarLayer independently from Layer and timer code typedef struct StatusBarLayerConfig { - char title_text_buffer[TITLE_TEXT_BUFFER_SIZE]; // center title text buffer - char info_text_buffer[INFO_TEXT_BUFFER_SIZE]; // right info text buffer - GColor foreground_color; // default:GColorWhite - GColor background_color; // default:GColorBlack - StatusBarLayerSeparator separator; // default:StatusBarLayerSeparatorModeDotted - StatusBarLayerMode mode; // default:StatusBarLayerModeClock + char title_text_buffer[TITLE_TEXT_BUFFER_SIZE]; // center title text buffer + char info_text_buffer[INFO_TEXT_BUFFER_SIZE]; // right info text buffer + GColor foreground_color; // default:GColorWhite + GColor background_color; // default:GColorBlack + StatusBarLayerSeparator separator; // default:StatusBarLayerSeparatorModeDotted + StatusBarLayerMode mode; // default:StatusBarLayerModeClock } StatusBarLayerConfig; //! renders a status bar as described into a given rectangle @@ -120,8 +110,8 @@ void status_bar_layer_render(GContext *ctx, const GRect *bounds, StatusBarLayerC typedef struct StatusBarLayer { Layer layer; StatusBarLayerConfig config; - AppTimer *title_timer_id; // timer id for title revert - EventServiceInfo tick_event; // Event service to update the time + AppTimer *title_timer_id; // timer id for title revert + EventServiceInfo tick_event; // Event service to update the time int previous_min_of_day; } StatusBarLayer; diff --git a/src/fw/applib/ui/text_layer.c b/src/fw/applib/ui/text_layer.c index d5dff50111..b3418705bd 100644 --- a/src/fw/applib/ui/text_layer.c +++ b/src/fw/applib/ui/text_layer.c @@ -23,7 +23,7 @@ static GTextLayoutCacheRef prv_text_layer_get_cache_handle(TextLayer *text_layer return text_layer->should_cache_layout ? text_layer->layout_cache : NULL; } -void text_layer_update_proc(TextLayer *text_layer, GContext* ctx) { +void text_layer_update_proc(TextLayer *text_layer, GContext *ctx) { PBL_ASSERTN(text_layer); const GColor bg_color = text_layer->background_color; if (!(gcolor_equal(bg_color, GColorClear))) { @@ -32,19 +32,19 @@ void text_layer_update_proc(TextLayer *text_layer, GContext* ctx) { } if (text_layer->text && strlen(text_layer->text) > 0) { graphics_context_set_text_color(ctx, text_layer->text_color); - graphics_draw_text(ctx, text_layer->text, text_layer->font, - text_layer->layer.bounds, text_layer->overflow_mode, - text_layer->text_alignment, prv_text_layer_get_cache_handle(text_layer)); + graphics_draw_text(ctx, text_layer->text, text_layer->font, text_layer->layer.bounds, + text_layer->overflow_mode, text_layer->text_alignment, + prv_text_layer_get_cache_handle(text_layer)); } } -static const char * const s_text_layer_default_fonts[NumPreferredContentSizes] = { - //! @note this is the same as Medium until Small is designed - [PreferredContentSizeSmall] = FONT_KEY_GOTHIC_14_BOLD, - [PreferredContentSizeMedium] = FONT_KEY_GOTHIC_14_BOLD, - [PreferredContentSizeLarge] = FONT_KEY_GOTHIC_18_BOLD, - //! @note this is the same as Large until ExtraLarge is designed - [PreferredContentSizeExtraLarge] = FONT_KEY_GOTHIC_18_BOLD, +static const char *const s_text_layer_default_fonts[NumPreferredContentSizes] = { + //! @note this is the same as Medium until Small is designed + [PreferredContentSizeSmall] = FONT_KEY_GOTHIC_14_BOLD, + [PreferredContentSizeMedium] = FONT_KEY_GOTHIC_14_BOLD, + [PreferredContentSizeLarge] = FONT_KEY_GOTHIC_18_BOLD, + //! @note this is the same as Large until ExtraLarge is designed + [PreferredContentSizeExtraLarge] = FONT_KEY_GOTHIC_18_BOLD, }; void text_layer_init_with_parameters(TextLayer *text_layer, const GRect *frame, const char *text, @@ -78,15 +78,15 @@ void text_layer_init(TextLayer *text_layer, const GRect *frame) { GTextAlignmentLeft, GTextOverflowModeTrailingEllipsis); } -TextLayer* text_layer_create(GRect frame) { - TextLayer* layer = applib_type_malloc(TextLayer); +TextLayer *text_layer_create(GRect frame) { + TextLayer *layer = applib_type_malloc(TextLayer); if (layer) { text_layer_init(layer, &frame); } return layer; } -void text_layer_destroy(TextLayer* text_layer) { +void text_layer_destroy(TextLayer *text_layer) { if (!text_layer) { return; } @@ -101,18 +101,18 @@ void text_layer_deinit(TextLayer *text_layer) { text_layer->layout_cache = NULL; } -Layer* text_layer_get_layer(TextLayer *text_layer) { +Layer *text_layer_get_layer(TextLayer *text_layer) { PBL_ASSERTN(text_layer); return &text_layer->layer; } void text_layer_set_size(TextLayer *text_layer, const GSize max_size) { PBL_ASSERTN(text_layer); - layer_set_frame(&text_layer->layer, &(GRect) { text_layer->layer.frame.origin, max_size }); + layer_set_frame(&text_layer->layer, &(GRect){text_layer->layer.frame.origin, max_size}); layer_mark_dirty(&text_layer->layer); } -GSize text_layer_get_size(TextLayer* text_layer) { +GSize text_layer_get_size(TextLayer *text_layer) { PBL_ASSERTN(text_layer); return text_layer->layer.frame.size; } @@ -123,7 +123,7 @@ void text_layer_set_text(TextLayer *text_layer, const char *text) { layer_mark_dirty(&(text_layer->layer)); } -const char* text_layer_get_text(TextLayer *text_layer) { +const char *text_layer_get_text(TextLayer *text_layer) { PBL_ASSERTN(text_layer); return text_layer->text; } @@ -189,7 +189,7 @@ void text_layer_set_should_cache_layout(TextLayer *text_layer, bool should_cache } } -GSize text_layer_get_content_size(GContext* ctx, TextLayer *text_layer) { +GSize text_layer_get_content_size(GContext *ctx, TextLayer *text_layer) { PBL_ASSERTN(text_layer); if (!text_layer->should_cache_layout) { text_layer_set_should_cache_layout(text_layer, true); @@ -200,13 +200,14 @@ GSize text_layer_get_content_size(GContext* ctx, TextLayer *text_layer) { GRect box; layer_get_global_frame(&text_layer->layer, &box); box.size = text_layer->layer.bounds.size; - return graphics_text_layout_get_max_used_size(ctx, text_layer->text, text_layer->font, - box, text_layer->overflow_mode, text_layer->text_alignment, layout); + return graphics_text_layout_get_max_used_size(ctx, text_layer->text, text_layer->font, box, + text_layer->overflow_mode, + text_layer->text_alignment, layout); } GSize app_text_layer_get_content_size(TextLayer *text_layer) { PBL_ASSERTN(text_layer); - GContext* ctx = app_state_get_graphics_context(); + GContext *ctx = app_state_get_graphics_context(); return text_layer_get_content_size(ctx, text_layer); } diff --git a/src/fw/applib/ui/text_layer.h b/src/fw/applib/ui/text_layer.h index 6bd482a393..194898527e 100644 --- a/src/fw/applib/ui/text_layer.h +++ b/src/fw/applib/ui/text_layer.h @@ -36,14 +36,14 @@ //! \endcode typedef struct TextLayer { Layer layer; - const char* text; + const char *text; GFont font; GTextLayoutCacheRef layout_cache; GColor8 text_color; GColor8 background_color; - GTextOverflowMode overflow_mode:2; - GTextAlignment text_alignment:2; - bool should_cache_layout:1; + GTextOverflowMode overflow_mode : 2; + GTextAlignment text_alignment : 2; + bool should_cache_layout : 1; } TextLayer; //! Initializes the TextLayer with given frame @@ -75,10 +75,10 @@ void text_layer_init(TextLayer *text_layer, const GRect *frame); //! @param frame The frame with which to initialize the TextLayer //! @return A pointer to the TextLayer. `NULL` if the TextLayer could not //! be created -TextLayer* text_layer_create(GRect frame); +TextLayer *text_layer_create(GRect frame); //! Destroys a TextLayer previously created by text_layer_create. -void text_layer_destroy(TextLayer* text_layer); +void text_layer_destroy(TextLayer *text_layer); //! Deinitializes the TextLayer and frees any caches. //! @param text_layer The TextLayer to deinitialize @@ -93,12 +93,13 @@ void text_layer_deinit(TextLayer *text_layer); //! @return The "root" Layer of the text layer. //! @internal //! @note The result is always equal to `(Layer *) text_layer`. -Layer* text_layer_get_layer(TextLayer *text_layer); +Layer *text_layer_get_layer(TextLayer *text_layer); //! Sets the pointer to the string where the TextLayer is supposed to find the text //! at a later point in time, when it needs to draw itself. //! @param text_layer The TextLayer of which to set the text -//! @param text The new text to set onto the TextLayer. This must be a null-terminated and valid UTF-8 string! +//! @param text The new text to set onto the TextLayer. This must be a null-terminated and valid +//! UTF-8 string! //! @note The string is not copied, so its buffer most likely cannot be stack allocated, //! but is recommended to be a buffer that is long-lived, at least as long as the TextLayer //! is part of a visible Layer hierarchy. @@ -108,7 +109,7 @@ void text_layer_set_text(TextLayer *text_layer, const char *text); //! Gets the pointer to the string that the TextLayer is using. //! @param text_layer The TextLayer for which to get the text //! @see text_layer_set_text -const char* text_layer_get_text(TextLayer *text_layer); +const char *text_layer_get_text(TextLayer *text_layer); //! Sets the background color of the bounding box that will be drawn behind the text //! @param text_layer The TextLayer of which to set the background color @@ -158,7 +159,7 @@ void text_layer_set_should_cache_layout(TextLayer *text_layer, bool should_cache //! context, even though this function does not draw anything. //! @internal //! @see \ref app_get_current_graphics_context() -GSize text_layer_get_content_size(GContext* ctx, TextLayer *text_layer); +GSize text_layer_get_content_size(GContext *ctx, TextLayer *text_layer); //! Calculates the size occupied by the current text of the TextLayer //! @param text_layer the TextLayer for which to calculate the text's size @@ -172,7 +173,7 @@ GSize app_text_layer_get_content_size(TextLayer *text_layer); void text_layer_set_size(TextLayer *text_layer, const GSize max_size); //! @internal -GSize text_layer_get_size(TextLayer* text_layer); +GSize text_layer_get_size(TextLayer *text_layer); //! Set the vertical line spacing delta for the TextLayer //! @param text_layer The TextLayer of which to set the line spacing delta diff --git a/src/fw/applib/ui/text_layer_flow.c b/src/fw/applib/ui/text_layer_flow.c index 2334f4789f..57bf451e74 100644 --- a/src/fw/applib/ui/text_layer_flow.c +++ b/src/fw/applib/ui/text_layer_flow.c @@ -32,7 +32,7 @@ bool text_layer_calc_text_flow_paging_values(const TextLayer *text_layer, if (page_rect_on_screen) { const Layer *container = - text_layer_find_first_paging_container(text_layer) ?: &text_layer->layer; + text_layer_find_first_paging_container(text_layer) ?: &text_layer->layer; layer_get_global_frame(container, page_rect_on_screen); if (container == &text_layer->layer) { page_rect_on_screen->size.h = TEXT_LAYER_FLOW_DEFAULT_PAGING_HEIGHT; diff --git a/src/fw/applib/ui/time_range_selection_window.c b/src/fw/applib/ui/time_range_selection_window.c index e3ba96019f..f010cd746b 100644 --- a/src/fw/applib/ui/time_range_selection_window.c +++ b/src/fw/applib/ui/time_range_selection_window.c @@ -19,28 +19,28 @@ typedef struct TimeSelectionSizeConfig { } TimeSelectionSizeConfig; static const TimeSelectionSizeConfig s_time_selection_config_medium = { - .cell_width = 40, - .cell_padding = 4, + .cell_width = 40, + .cell_padding = 4, - .top_origin = 10, - .start_end_y_offset = 69, - .selection_y_offset = 32, + .top_origin = 10, + .start_end_y_offset = 69, + .selection_y_offset = 32, }; static const TimeSelectionSizeConfig s_time_selection_config_large = { - .cell_width = 56, - .cell_padding = 6, + .cell_width = 56, + .cell_padding = 6, - .top_origin = 11, - .start_end_y_offset = 105, - .selection_y_offset = 37, + .top_origin = 11, + .start_end_y_offset = 105, + .selection_y_offset = 37, }; static const TimeSelectionSizeConfig *s_time_selection_configs[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = &s_time_selection_config_medium, - [PreferredContentSizeMedium] = &s_time_selection_config_medium, - [PreferredContentSizeLarge] = &s_time_selection_config_large, - [PreferredContentSizeExtraLarge] = &s_time_selection_config_large, + [PreferredContentSizeSmall] = &s_time_selection_config_medium, + [PreferredContentSizeMedium] = &s_time_selection_config_medium, + [PreferredContentSizeLarge] = &s_time_selection_config_large, + [PreferredContentSizeExtraLarge] = &s_time_selection_config_large, }; static const TimeSelectionSizeConfig *prv_selection_config(void) { @@ -50,7 +50,7 @@ static const TimeSelectionSizeConfig *prv_selection_config(void) { } // FROM selection layer callbacks -static char* prv_handle_from_get_text(unsigned index, void *context) { +static char *prv_handle_from_get_text(unsigned index, void *context) { TimeRangeSelectionWindowData *data = context; return date_time_selection_get_text(&data->from, index, data->buf); } @@ -73,7 +73,7 @@ static void prv_handle_from_dec(unsigned index, void *context) { } // TO selection layer callbacks -static char* prv_handle_to_get_text(unsigned index, void *context) { +static char *prv_handle_to_get_text(unsigned index, void *context) { TimeRangeSelectionWindowData *data = context; return date_time_selection_get_text(&data->to, index, data->buf); } @@ -97,26 +97,28 @@ static void prv_handle_to_dec(unsigned index, void *context) { static void prv_text_layer_init(Window *window, TextLayer *text_layer, GRect *rect, const char *i18n_str) { const GFont subtitle_font = system_theme_get_font_for_default_size(TextStyleFont_Subtitle); - text_layer_init_with_parameters(text_layer, rect, i18n_get(i18n_str, window), - subtitle_font, GColorBlack, GColorClear, GTextAlignmentCenter, + text_layer_init_with_parameters(text_layer, rect, i18n_get(i18n_str, window), subtitle_font, + GColorBlack, GColorClear, GTextAlignmentCenter, GTextOverflowModeTrailingEllipsis); layer_add_child(&window->layer, &text_layer->layer); } // Window Setup void time_range_selection_window_init(TimeRangeSelectionWindowData *time_range_selection_window, - GColor color, TimeRangeSelectionCompleteCallback complete_callback, void *callback_context) { + GColor color, + TimeRangeSelectionCompleteCallback complete_callback, + void *callback_context) { // General window setup - *time_range_selection_window = (TimeRangeSelectionWindowData) { - .complete_callback = complete_callback, - .callback_context = callback_context, + *time_range_selection_window = (TimeRangeSelectionWindowData){ + .complete_callback = complete_callback, + .callback_context = callback_context, }; Window *window = &time_range_selection_window->window; window_init(window, WINDOW_NAME("Time Range Selection Window")); window_set_user_data(window, time_range_selection_window); - const TimeSelectionSizeConfig * const config = prv_selection_config(); + const TimeSelectionSizeConfig *const config = prv_selection_config(); // Selection layer variables const int cell_width = config->cell_width; @@ -138,12 +140,12 @@ void time_range_selection_window_init(TimeRangeSelectionWindowData *time_range_s selection_layer_set_active_bg_color(from_selection_layer, color); selection_layer_set_inactive_bg_color(from_selection_layer, GColorDarkGray); selection_layer_set_callbacks(from_selection_layer, time_range_selection_window, - (SelectionLayerCallbacks) { - .get_cell_text = prv_handle_from_get_text, - .complete = prv_handle_from_complete, - .increment = prv_handle_from_inc, - .decrement = prv_handle_from_dec, - }); + (SelectionLayerCallbacks){ + .get_cell_text = prv_handle_from_get_text, + .complete = prv_handle_from_complete, + .increment = prv_handle_from_inc, + .decrement = prv_handle_from_dec, + }); // TO selection layer setup SelectionLayer *to_selection_layer = &time_range_selection_window->to_selection_layer; @@ -156,12 +158,12 @@ void time_range_selection_window_init(TimeRangeSelectionWindowData *time_range_s selection_layer_set_active_bg_color(to_selection_layer, color); selection_layer_set_inactive_bg_color(to_selection_layer, GColorDarkGray); selection_layer_set_callbacks(to_selection_layer, time_range_selection_window, - (SelectionLayerCallbacks) { - .get_cell_text = prv_handle_to_get_text, - .complete = prv_handle_to_complete, - .increment = prv_handle_to_inc, - .decrement = prv_handle_to_dec, - }); + (SelectionLayerCallbacks){ + .get_cell_text = prv_handle_to_get_text, + .complete = prv_handle_to_complete, + .increment = prv_handle_to_inc, + .decrement = prv_handle_to_dec, + }); selection_layer_set_click_config_onto_window(from_selection_layer, window); selection_layer_set_active(to_selection_layer, false); diff --git a/src/fw/applib/ui/time_range_selection_window.h b/src/fw/applib/ui/time_range_selection_window.h index 526f0b20b9..eb49099dc9 100644 --- a/src/fw/applib/ui/time_range_selection_window.h +++ b/src/fw/applib/ui/time_range_selection_window.h @@ -28,8 +28,9 @@ typedef struct TimeRangeSelectionWindowData { char buf[3]; } TimeRangeSelectionWindowData; - void time_range_selection_window_init(TimeRangeSelectionWindowData *time_range_selection_window, - GColor color, TimeRangeSelectionCompleteCallback complete_callback, void *callback_context); + GColor color, + TimeRangeSelectionCompleteCallback complete_callback, + void *callback_context); void time_range_selection_window_deinit(TimeRangeSelectionWindowData *time_range_selection_window); diff --git a/src/fw/applib/ui/time_selection_window.c b/src/fw/applib/ui/time_selection_window.c index 6d9b6ab8db..2e6714979a 100644 --- a/src/fw/applib/ui/time_selection_window.c +++ b/src/fw/applib/ui/time_selection_window.c @@ -25,36 +25,36 @@ typedef struct TimeSelectionSizeConfig { } TimeSelectionSizeConfig; static const TimeSelectionSizeConfig s_time_selection_config_medium = { - .subtitle_font_key = FONT_KEY_GOTHIC_14_BOLD, + .subtitle_font_key = FONT_KEY_GOTHIC_14_BOLD, - .cell_width = 40, - .ampm_cell_width = PBL_IF_RECT_ELSE(40, 50), - .cell_padding = 4, + .cell_width = 40, + .ampm_cell_width = PBL_IF_RECT_ELSE(40, 50), + .cell_padding = 4, - .top_offset_with_label = 75, - .top_offset_without_label = 67, - .label_origin_y = PBL_IF_RECT_ELSE(33, 38), - .range_origin_y = 119, + .top_offset_with_label = 75, + .top_offset_without_label = 67, + .label_origin_y = PBL_IF_RECT_ELSE(33, 38), + .range_origin_y = 119, }; static const TimeSelectionSizeConfig s_time_selection_config_large = { - .subtitle_font_key = FONT_KEY_GOTHIC_18_BOLD, + .subtitle_font_key = FONT_KEY_GOTHIC_18_BOLD, - .cell_width = 56, - .ampm_cell_width = 56, - .cell_padding = 6, + .cell_width = 56, + .ampm_cell_width = 56, + .cell_padding = 6, - .top_offset_with_label = 87, - .top_offset_without_label = 67, // NOTE: this hasn't been designed, because we don't use it - .label_origin_y = 33, - .range_origin_y = 158, + .top_offset_with_label = 87, + .top_offset_without_label = 67, // NOTE: this hasn't been designed, because we don't use it + .label_origin_y = 33, + .range_origin_y = 158, }; static const TimeSelectionSizeConfig *s_time_selection_configs[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = &s_time_selection_config_medium, - [PreferredContentSizeMedium] = &s_time_selection_config_medium, - [PreferredContentSizeLarge] = &s_time_selection_config_large, - [PreferredContentSizeExtraLarge] = &s_time_selection_config_large, + [PreferredContentSizeSmall] = &s_time_selection_config_medium, + [PreferredContentSizeMedium] = &s_time_selection_config_medium, + [PreferredContentSizeLarge] = &s_time_selection_config_large, + [PreferredContentSizeExtraLarge] = &s_time_selection_config_large, }; static const TimeSelectionSizeConfig *prv_selection_config(void) { @@ -64,7 +64,7 @@ static const TimeSelectionSizeConfig *prv_selection_config(void) { } static int prv_cell_width(int i, int num_cells) { - const TimeSelectionSizeConfig * const config = prv_selection_config(); + const TimeSelectionSizeConfig *const config = prv_selection_config(); if (!clock_is_24h_style() && (i == (num_cells - 1))) { return config->ampm_cell_width; } else { @@ -73,9 +73,10 @@ static int prv_cell_width(int i, int num_cells) { } static void prv_update_selection_layer(TimeSelectionWindowData *time_selection_window) { - const TimeSelectionSizeConfig * const config = prv_selection_config(); - const int top_offset = time_selection_window->label_text_layer.text ? - config->top_offset_with_label : config->top_offset_without_label; + const TimeSelectionSizeConfig *const config = prv_selection_config(); + const int top_offset = time_selection_window->label_text_layer.text + ? config->top_offset_with_label + : config->top_offset_without_label; layer_set_frame(&time_selection_window->selection_layer.layer, &GRect(0, top_offset, time_selection_window->window.layer.bounds.size.w, selection_layer_default_cell_height())); @@ -87,7 +88,7 @@ static void prv_vertical_align_text_layer(TimeSelectionWindowData *time_selectio // Supports `lines` or `lines + 1` line vertical centering for i18n const int line_height = fonts_get_font_height(text_layer->font); GRect frame = GRect(0, origin_y, time_selection_window->window.layer.bounds.size.w, - (lines + 1) * line_height + line_height / 2); // 1/2 more for descenders + (lines + 1) * line_height + line_height / 2); // 1/2 more for descenders layer_set_frame(&text_layer->layer, &frame); #if PBL_ROUND const int inset = 4; @@ -124,8 +125,7 @@ static void prv_update_range_text_layer(TimeSelectionWindowData *time_selection_ const int minute_end = time_selection_window->time_data.minute; int hour_start = hour_end; int minute_start = minute_end; - clock_hour_and_minute_add(&hour_start, &minute_start, - -time_selection_window->range_duration_m); + clock_hour_and_minute_add(&hour_start, &minute_start, -time_selection_window->range_duration_m); char start_buf[TIME_STRING_TIME_LENGTH]; char end_buf[TIME_STRING_TIME_LENGTH]; @@ -139,8 +139,8 @@ static void prv_update_range_text_layer(TimeSelectionWindowData *time_selection_ // update range_subtitle_text_layer buffer = time_selection_window->range_subtitle_buf; - snprintf(buffer, sizeof(time_selection_window->range_subtitle_buf), - "%s", time_selection_window->range_text); + snprintf(buffer, sizeof(time_selection_window->range_subtitle_buf), "%s", + time_selection_window->range_text); text_layer_set_text(range_subtitle_text_layer, buffer); @@ -149,12 +149,12 @@ static void prv_update_range_text_layer(TimeSelectionWindowData *time_selection_ const int range_origin_y = prv_selection_config()->range_origin_y; const int extra_line_offset_y = PBL_IF_RECT_ELSE(2, 4); - prv_vertical_align_text_layer(time_selection_window, top_layer, range_origin_y, - 1, extra_line_offset_y); + prv_vertical_align_text_layer(time_selection_window, top_layer, range_origin_y, 1, + extra_line_offset_y); const GSize top_size = app_text_layer_get_content_size(top_layer); const int range_bottom_origin_y = range_origin_y + top_size.h; - prv_vertical_align_text_layer(time_selection_window, bottom_layer, range_bottom_origin_y, - 1, extra_line_offset_y); + prv_vertical_align_text_layer(time_selection_window, bottom_layer, range_bottom_origin_y, 1, + extra_line_offset_y); } static void prv_update_layer_placement(TimeSelectionWindowData *time_selection_window) { @@ -164,7 +164,7 @@ static void prv_update_layer_placement(TimeSelectionWindowData *time_selection_w } // FROM selection layer callbacks -static char* prv_handle_from_get_text(unsigned index, void *context) { +static char *prv_handle_from_get_text(unsigned index, void *context) { TimeSelectionWindowData *data = context; return date_time_selection_get_text(&data->time_data, index, data->cell_buf); } @@ -224,7 +224,7 @@ static void prv_text_layer_init(Layer *window_layer, TextLayer *text_layer, cons void time_selection_window_init(TimeSelectionWindowData *time_selection_window, const TimeSelectionWindowConfig *config) { - *time_selection_window = (TimeSelectionWindowData) {}; + *time_selection_window = (TimeSelectionWindowData){}; // General window setup Window *window = &time_selection_window->window; @@ -232,7 +232,7 @@ void time_selection_window_init(TimeSelectionWindowData *time_selection_window, window_set_user_data(window, time_selection_window); // Selection layer setup - const TimeSelectionSizeConfig * const size_config = prv_selection_config(); + const TimeSelectionSizeConfig *const size_config = prv_selection_config(); const int num_cells = clock_is_24h_style() ? 2 : 3; const int padding = size_config->cell_padding; SelectionLayer *selection_layer = &time_selection_window->selection_layer; @@ -246,12 +246,12 @@ void time_selection_window_init(TimeSelectionWindowData *time_selection_window, selection_layer_set_inactive_bg_color(selection_layer, GColorDarkGray); selection_layer_set_click_config_onto_window(selection_layer, window); selection_layer_set_callbacks(&time_selection_window->selection_layer, time_selection_window, - (SelectionLayerCallbacks) { - .get_cell_text = prv_handle_from_get_text, - .complete = prv_handle_complete, - .increment = prv_handle_inc, - .decrement = prv_handle_dec, - }); + (SelectionLayerCallbacks){ + .get_cell_text = prv_handle_from_get_text, + .complete = prv_handle_complete, + .increment = prv_handle_inc, + .decrement = prv_handle_dec, + }); layer_add_child(&window->layer, &time_selection_window->selection_layer.layer); // Label setup @@ -275,11 +275,10 @@ void time_selection_window_init(TimeSelectionWindowData *time_selection_window, status_bar_layer_set_colors(&time_selection_window->status_layer, PBL_IF_COLOR_ELSE(GColorWhite, GColorBlack), PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite)); - status_bar_layer_set_separator_mode(&time_selection_window->status_layer, - PBL_IF_COLOR_ELSE(OPTION_MENU_STATUS_SEPARATOR_MODE, - StatusBarLayerSeparatorModeNone)); - layer_add_child(&time_selection_window->window.layer, - &time_selection_window->status_layer.layer); + status_bar_layer_set_separator_mode( + &time_selection_window->status_layer, + PBL_IF_COLOR_ELSE(OPTION_MENU_STATUS_SEPARATOR_MODE, StatusBarLayerSeparatorModeNone)); + layer_add_child(&time_selection_window->window.layer, &time_selection_window->status_layer.layer); time_selection_window_configure(time_selection_window, config); } diff --git a/src/fw/applib/ui/ui_debug.c b/src/fw/applib/ui/ui_debug.c index 060efb1b16..81b6f5da02 100644 --- a/src/fw/applib/ui/ui_debug.c +++ b/src/fw/applib/ui/ui_debug.c @@ -9,43 +9,44 @@ #include "console/dbgserial.h" -extern void text_layer_update_proc(TextLayer *text_layer, GContext* ctx); -extern void action_bar_update_proc(ActionBarLayer *action_bar, GContext* ctx); -extern void bitmap_layer_update_proc(BitmapLayer *image, GContext* ctx); -extern void inverter_layer_update_proc(InverterLayer *inverter, GContext* ctx); -extern void menu_layer_update_proc(Layer *scroll_content_layer, GContext* ctx); -extern void path_layer_update_proc(PathLayer *path_layer, GContext* ctx); -extern void progress_layer_update_proc(ProgressLayer* progress_layer, GContext* ctx); -extern void rot_bitmap_layer_update_proc(RotBitmapLayer *image, GContext* ctx); -extern void scroll_layer_draw_shadow_sublayer(Layer *shadow_sublayer, GContext* ctx); -extern void window_do_layer_update_proc(Layer *layer, GContext* ctx); +extern void text_layer_update_proc(TextLayer *text_layer, GContext *ctx); +extern void action_bar_update_proc(ActionBarLayer *action_bar, GContext *ctx); +extern void bitmap_layer_update_proc(BitmapLayer *image, GContext *ctx); +extern void inverter_layer_update_proc(InverterLayer *inverter, GContext *ctx); +extern void menu_layer_update_proc(Layer *scroll_content_layer, GContext *ctx); +extern void path_layer_update_proc(PathLayer *path_layer, GContext *ctx); +extern void progress_layer_update_proc(ProgressLayer *progress_layer, GContext *ctx); +extern void rot_bitmap_layer_update_proc(RotBitmapLayer *image, GContext *ctx); +extern void scroll_layer_draw_shadow_sublayer(Layer *shadow_sublayer, GContext *ctx); +extern void window_do_layer_update_proc(Layer *layer, GContext *ctx); const char *layer_debug_guess_type(Layer *layer) { if (layer == NULL) { return "NULL"; }; - if (layer->update_proc == (LayerUpdateProc) text_layer_update_proc) { + if (layer->update_proc == (LayerUpdateProc)text_layer_update_proc) { return "TextLayer"; - } else if (layer->update_proc == (LayerUpdateProc) action_bar_update_proc) { + } else if (layer->update_proc == (LayerUpdateProc)action_bar_update_proc) { return "ActionBarLayer"; - } else if (layer->update_proc == (LayerUpdateProc) bitmap_layer_update_proc) { + } else if (layer->update_proc == (LayerUpdateProc)bitmap_layer_update_proc) { return "BitmapLayer"; - } else if (layer->update_proc == (LayerUpdateProc) inverter_layer_update_proc) { + } else if (layer->update_proc == (LayerUpdateProc)inverter_layer_update_proc) { return "InverterLayer"; - } else if (layer->update_proc == (LayerUpdateProc) menu_layer_update_proc) { + } else if (layer->update_proc == (LayerUpdateProc)menu_layer_update_proc) { return "MenuLayer"; - } else if (layer->update_proc == (LayerUpdateProc) path_layer_update_proc) { + } else if (layer->update_proc == (LayerUpdateProc)path_layer_update_proc) { return "PathLayer"; - } else if (layer->update_proc == (LayerUpdateProc) progress_layer_update_proc) { + } else if (layer->update_proc == (LayerUpdateProc)progress_layer_update_proc) { return "ProgressLayer"; - } else if (layer->update_proc == (LayerUpdateProc) rot_bitmap_layer_update_proc) { + } else if (layer->update_proc == (LayerUpdateProc)rot_bitmap_layer_update_proc) { return "RotBitmapLayer"; - } else if (layer->update_proc == (LayerUpdateProc) scroll_layer_draw_shadow_sublayer) { + } else if (layer->update_proc == (LayerUpdateProc)scroll_layer_draw_shadow_sublayer) { return "(ScrollLayer's shadow) Layer"; - } else if (((ScrollLayer*)layer)->shadow_sublayer.update_proc == scroll_layer_draw_shadow_sublayer) { + } else if (((ScrollLayer *)layer)->shadow_sublayer.update_proc == + scroll_layer_draw_shadow_sublayer) { return "ScrollLayer"; - } else if (layer->update_proc == (LayerUpdateProc) window_do_layer_update_proc) { + } else if (layer->update_proc == (LayerUpdateProc)window_do_layer_update_proc) { return "Window"; } else if (layer->update_proc == NULL) { return "Layer"; @@ -54,26 +55,33 @@ const char *layer_debug_guess_type(Layer *layer) { } } -static void layer_dump_tree_node(Layer* node, uint8_t indentation_level, char *buffer, uint8_t buffer_size); +static void layer_dump_tree_node(Layer *node, uint8_t indentation_level, char *buffer, + uint8_t buffer_size); -void layer_dump_level(Layer* node, uint8_t indentation_level, char *buffer, uint8_t buffer_size) { +void layer_dump_level(Layer *node, uint8_t indentation_level, char *buffer, uint8_t buffer_size) { while (node) { layer_dump_tree_node(node, indentation_level, buffer, buffer_size); node = node->next_sibling; } } -static void layer_dump_tree_node(Layer* node, uint8_t indentation_level, char *buffer, uint8_t buffer_size) { +static void layer_dump_tree_node(Layer *node, uint8_t indentation_level, char *buffer, + uint8_t buffer_size) { const bool hidden = node->hidden; const bool clips = node->clips; const char *layer_type_string = layer_debug_guess_type(node); - dbgserial_putstr_fmt(buffer, buffer_size, "%*s(%s*) %p b:{{%i, %i}, {%i, %i}} f:{{%i, %i}, {%i, %i}} c:%u h:%u w:%p", (indentation_level * 2), "", layer_type_string, node, node->bounds.origin.x, node->bounds.origin.y, node->bounds.size.w, node->bounds.size.h, node->frame.origin.x, node->frame.origin.y, node->frame.size.w, node->frame.size.h, clips, hidden, node->window); + dbgserial_putstr_fmt(buffer, buffer_size, + "%*s(%s*) %p b:{{%i, %i}, {%i, %i}} f:{{%i, %i}, {%i, %i}} c:%u h:%u w:%p", + (indentation_level * 2), "", layer_type_string, node, node->bounds.origin.x, + node->bounds.origin.y, node->bounds.size.w, node->bounds.size.h, + node->frame.origin.x, node->frame.origin.y, node->frame.size.w, + node->frame.size.h, clips, hidden, node->window); if (node->first_child) { layer_dump_level(node->first_child, ++indentation_level, buffer, buffer_size); } } -void layer_dump_tree(Layer* node) { +void layer_dump_tree(Layer *node) { const uint8_t buffer_size = 128; char buffer[buffer_size]; layer_dump_level(node, 0, buffer, buffer_size); diff --git a/src/fw/applib/ui/ui_debug.h b/src/fw/applib/ui/ui_debug.h index fc03ffc9f8..08a4e82e5d 100644 --- a/src/fw/applib/ui/ui_debug.h +++ b/src/fw/applib/ui/ui_debug.h @@ -7,7 +7,7 @@ struct Layer; //! Dumps debug information of the layer and all its children to debug serial //! @param node the layer to dump -void layer_dump_tree(struct Layer* node); +void layer_dump_tree(struct Layer *node); //! Tries to guess the type of the layer based on the update_proc //! @return a friendly string of the name of the layer type diff --git a/src/fw/applib/ui/vibes.c b/src/fw/applib/ui/vibes.c index 2a70973a68..7fbc1958c1 100644 --- a/src/fw/applib/ui/vibes.c +++ b/src/fw/applib/ui/vibes.c @@ -7,11 +7,14 @@ #include #include "pbl/util/size.h" -#define PATTERN_FROM_DURATIONS(pat, array) (pat) = (VibePattern){ .durations = (array), .num_segments = ARRAY_LENGTH((array)) } +#define PATTERN_FROM_DURATIONS(pat, array) \ + (pat) = (VibePattern) { \ + .durations = (array), .num_segments = ARRAY_LENGTH((array)) \ + } -static const uint32_t SHORT_PULSE_DURATIONS[] = { 250 }; -static const uint32_t LONG_PULSE_DURATIONS[] = { 500 }; -static const uint32_t DOUBLE_PULSE_DURATIONS[] = { 100, 100, 100 }; +static const uint32_t SHORT_PULSE_DURATIONS[] = {250}; +static const uint32_t LONG_PULSE_DURATIONS[] = {500}; +static const uint32_t DOUBLE_PULSE_DURATIONS[] = {100, 100, 100}; void vibes_short_pulse(void) { VibePattern pat; @@ -64,4 +67,3 @@ void vibes_enqueue_custom_pattern_with_amplitudes(VibePatternWithAmplitudes patt sys_vibe_pattern_trigger_start(); } - diff --git a/src/fw/applib/ui/vibes.h b/src/fw/applib/ui/vibes.h index c255e9d312..4dd88e64ed 100644 --- a/src/fw/applib/ui/vibes.h +++ b/src/fw/applib/ui/vibes.h @@ -13,10 +13,11 @@ //! //! The Vibes API provides calls that let you control Pebble’s vibration motor. //! -//! The vibration motor can be used as a visceral mechanism for giving immediate feedback to the user. -//! You can use it to highlight important moments in games, or to draw the attention of the user. -//! However, you should use the vibration feature sparingly, because sustained use will rapidly deplete Pebble’s battery, -//! and vibrating Pebble too much and too often can become annoying for users. +//! The vibration motor can be used as a visceral mechanism for giving immediate feedback to the +//! user. You can use it to highlight important moments in games, or to draw the attention of the +//! user. However, you should use the vibration feature sparingly, because sustained use will +//! rapidly deplete Pebble’s battery, and vibrating Pebble too much and too often can become +//! annoying for users. //! @note When using these calls, if there is an ongoing vibration, //! calling any of the functions to emit (another) vibration will have no effect. //! @{ diff --git a/src/fw/applib/ui/window.c b/src/fw/applib/ui/window.c index 6b24b05151..279dda2f40 100644 --- a/src/fw/applib/ui/window.c +++ b/src/fw/applib/ui/window.c @@ -32,7 +32,7 @@ typedef enum { WindowHandlerOffsetUnload = offsetof(WindowHandlers, unload), } WindowHandlerOffset; -void window_do_layer_update_proc(Layer *layer, GContext* ctx) { +void window_do_layer_update_proc(Layer *layer, GContext *ctx) { Window *window = layer_get_window(layer); const GColor bg_color = window->background_color; @@ -52,7 +52,7 @@ typedef struct { static void prv_adjust_drawing_state_for_legacy2_apps(DrawingStateOrigins *saved_state, GContext *ctx, Window *window) { - GDrawState * const draw_state = &ctx->draw_state; + GDrawState *const draw_state = &ctx->draw_state; *saved_state = (DrawingStateOrigins){ .drawing_box_origin = draw_state->drawing_box.origin, .clip_box = draw_state->clip_box, @@ -139,7 +139,8 @@ void window_call_handler(Window *window, WindowHandlerOffset handler_offset) { if (window == NULL) { return; } - WindowHandler handler = *(WindowHandler*)(((uint8_t*)&window->window_handlers) + handler_offset); + WindowHandler handler = + *(WindowHandler *)(((uint8_t *)&window->window_handlers) + handler_offset); if (handler) { handler(window); } @@ -151,10 +152,7 @@ void window_schedule_render(Window *window) { GRect window_calc_frame(bool fullscreen) { GContext *ctx = graphics_context_get_current_context(); - GRect result = (GRect) { - .origin = { 0, 0 }, - .size = graphics_context_get_framebuffer_size(ctx) - }; + GRect result = (GRect){.origin = {0, 0}, .size = graphics_context_get_framebuffer_size(ctx)}; result.size.h -= fullscreen ? 0 : STATUS_BAR_HEIGHT; return result; } @@ -166,7 +164,7 @@ GRect window_calc_frame(bool fullscreen) { // then this function shifts it to its correct position of (0, STATUS_BAR_HEIGHT). // Either this function should set the window not on screen, or we should provide // an alternate function for initializing the window that takes a frame dimension too. -void window_init(Window *window, const char* debug_name) { +void window_init(Window *window, const char *debug_name) { if (window == NULL) { PBL_LOG_ERR("Tried to init a NULL window"); return; @@ -190,15 +188,15 @@ void window_init(Window *window, const char* debug_name) { window->parent_window_stack = NULL; } -Window* window_create(void) { - Window* window = applib_type_malloc(Window); +Window *window_create(void) { + Window *window = applib_type_malloc(Window); if (window) { window_init(window, ""); } return window; } -void window_destroy(Window* window) { +void window_destroy(Window *window) { if (window == NULL) { return; } @@ -241,7 +239,7 @@ void window_set_touch_tap_requires_action_bar(Window *window, bool requires_acti window->touch_tap_requires_action_bar = requires_action_bar; } -static ClickManager* prv_get_current_click_manager(void) { +static ClickManager *prv_get_current_click_manager(void) { return window_manager_get_window_click_manager(window_manager_get_top_window()); } @@ -253,15 +251,16 @@ static void prv_call_click_provider(Window *window) { static void prv_check_is_in_click_config_provider(Window *window, char *type) { PBL_ASSERT(window->in_click_config_provider, - "Click %s must be set from click config provider (Window %p)", type, window); + "Click %s must be set from click config provider (Window %p)", type, window); } void window_setup_click_config_provider(Window *window) { prv_call_click_provider(window); } -void window_set_click_config_provider_with_context( - Window *window, ClickConfigProvider click_config_provider, void *context) { +void window_set_click_config_provider_with_context(Window *window, + ClickConfigProvider click_config_provider, + void *context) { PBL_ASSERTN(window); window->click_config_provider = click_config_provider; window->click_config_context = context; @@ -300,7 +299,8 @@ void window_single_click_subscribe(ButtonId button_id, ClickHandler handler) { } } -void window_single_repeating_click_subscribe(ButtonId button_id, uint16_t repeat_interval_ms, ClickHandler handler) { +void window_single_repeating_click_subscribe(ButtonId button_id, uint16_t repeat_interval_ms, + ClickHandler handler) { prv_check_is_in_click_config_provider(window_manager_get_top_window(), "subscribe"); if (button_id == BUTTON_ID_BACK) { PBL_LOG_ERR("Cannot register BUTTON_ID_BACK repeating click handler"); @@ -313,8 +313,8 @@ void window_single_repeating_click_subscribe(ButtonId button_id, uint16_t repeat cfg->click.handler = handler; } -void window_multi_click_subscribe(ButtonId button_id, uint8_t min_clicks, uint8_t max_clicks, uint16_t timeout, - bool last_click_only, ClickHandler handler) { +void window_multi_click_subscribe(ButtonId button_id, uint8_t min_clicks, uint8_t max_clicks, + uint16_t timeout, bool last_click_only, ClickHandler handler) { Window *window = window_manager_get_top_window(); prv_check_is_in_click_config_provider(window, "subscribe"); ClickManager *mgr = prv_get_current_click_manager(); @@ -331,7 +331,8 @@ void window_multi_click_subscribe(ButtonId button_id, uint8_t min_clicks, uint8_ } } -void window_long_click_subscribe(ButtonId button_id, uint16_t delay_ms, ClickHandler down_handler, ClickHandler up_handler) { +void window_long_click_subscribe(ButtonId button_id, uint16_t delay_ms, ClickHandler down_handler, + ClickHandler up_handler) { prv_check_is_in_click_config_provider(window_manager_get_top_window(), "subscribe"); if (button_id == BUTTON_ID_BACK) { // We only want system apps to be able to override the back button for long @@ -354,7 +355,8 @@ void window_long_click_subscribe(ButtonId button_id, uint16_t delay_ms, ClickHan cfg->long_click.release_handler = up_handler; } -void window_raw_click_subscribe(ButtonId button_id, ClickHandler down_handler, ClickHandler up_handler, void *context) { +void window_raw_click_subscribe(ButtonId button_id, ClickHandler down_handler, + ClickHandler up_handler, void *context) { prv_check_is_in_click_config_provider(window_manager_get_top_window(), "subscribe"); if (button_id == BUTTON_ID_BACK) { PBL_LOG_ERR("Cannot register BUTTON_ID_BACK raw handler"); @@ -390,11 +392,11 @@ void window_set_user_data(Window *window, void *data) { window->user_data = data; } -void* window_get_user_data(const Window *window) { +void *window_get_user_data(const Window *window) { return window->user_data; } -struct Layer* window_get_root_layer(const Window *window) { +struct Layer *window_get_root_layer(const Window *window) { return &((Window *)window)->layer; } @@ -413,13 +415,14 @@ void window_unload(Window *window) { window->is_loaded = false; window_call_handler(window, WindowHandlerOffsetUnload); - // Don't touch window after calling it's unload handler. We allow windows to free themselves on unload. + // Don't touch window after calling it's unload handler. We allow windows to free themselves on + // unload. } // TODO PBL-1769: deal with window unload. In app deinit? When low memory? void window_set_on_screen(Window *window, bool new_on_screen, bool call_window_appear_handlers) { - PBL_ASSERTN(window != NULL); // This tripped me up for about a day + PBL_ASSERTN(window != NULL); // This tripped me up for about a day if (new_on_screen == window->on_screen) { return; } @@ -517,17 +520,17 @@ bool window_is_focusable(Window *window) { return !window->is_unfocusable; } -const char* window_get_debug_name(Window *window) { +const char *window_get_debug_name(Window *window) { #ifndef CONFIG_RELEASE - return window->debug_name; + return window->debug_name; #else - return "?"; + return "?"; (void)window; #endif } -// A simple wrapper so feedback can be given to developers if click config subscriptions are made from outside of the -// click config configuration callback. +// A simple wrapper so feedback can be given to developers if click config subscriptions are made +// from outside of the click config configuration callback. void window_call_click_config_provider(Window *window, void *context) { window->in_click_config_provider = true; window->click_config_provider(context); @@ -537,7 +540,7 @@ void window_call_click_config_provider(Window *window, void *context) { static bool prv_find_status_bar_layer(Layer *layer, void *ctx) { if (layer_is_status_bar_layer(layer)) { *((StatusBarLayer **)ctx) = (StatusBarLayer *)layer; - return false; // prevent further iterating + return false; // prevent further iterating } return true; } diff --git a/src/fw/applib/ui/window.h b/src/fw/applib/ui/window.h index 0cc4802c91..e3702ddcfd 100644 --- a/src/fw/applib/ui/window.h +++ b/src/fw/applib/ui/window.h @@ -19,29 +19,30 @@ struct WindowStack; //! @addtogroup Window //! \brief The basic building block of the user interface //! -//! Windows are the top-level elements in the UI hierarchy and the basic building blocks for a Pebble -//! UI. A single window is always displayed at a time on Pebble, with the exception of when animating -//! from one window to the other, which, in that case, is managed by the window stack. You can stack -//! windows on top of each other, but only the topmost window will be visible. +//! Windows are the top-level elements in the UI hierarchy and the basic building blocks for a +//! Pebble UI. A single window is always displayed at a time on Pebble, with the exception of when +//! animating from one window to the other, which, in that case, is managed by the window stack. You +//! can stack windows on top of each other, but only the topmost window will be visible. //! -//! Users wearing a Pebble typically interact with the content and media displayed in a window, clicking -//! and pressing buttons on the watch, depending on what they see and wish to respond to in a window. +//! Users wearing a Pebble typically interact with the content and media displayed in a window, +//! clicking and pressing buttons on the watch, depending on what they see and wish to respond to in +//! a window. //! -//! Windows serve to display a hierarchy of layers on the screen and handle user input. When a window is -//! visible, its root Layer (and all its child layers) are drawn onto the screen automatically. +//! Windows serve to display a hierarchy of layers on the screen and handle user input. When a +//! window is visible, its root Layer (and all its child layers) are drawn onto the screen +//! automatically. //! -//! You need a window, which always fills the entire screen, to display images, text, and graphics in -//! your Pebble app. A layer by itself doesn’t display on Pebble; it must be in the current window’s -//! layer hierarchy to be visible. +//! You need a window, which always fills the entire screen, to display images, text, and graphics +//! in your Pebble app. A layer by itself doesn’t display on Pebble; it must be in the current +//! window’s layer hierarchy to be visible. //! -//! The Window Stack serves as the global manager of what window is presented and makes sure that input -//! events are forwarded to the topmost window. +//! The Window Stack serves as the global manager of what window is presented and makes sure that +//! input events are forwarded to the topmost window. //! //! Refer to the \htmlinclude UiFramework.html (chapter "Window") for a conceptual //! overview of Window, the Window Stack and relevant code examples. //! @{ - //! Function signature for a handler that deals with transition events of a window. //! @see WindowHandlers //! @see \ref window_set_window_handlers() @@ -104,35 +105,35 @@ typedef struct Window { //! @see \ref window_set_background_color() GColor8 background_color; - bool is_render_scheduled:1; - bool on_screen:1; - bool is_loaded:1; - bool overrides_back_button:1; - bool is_fullscreen:1; - bool in_click_config_provider:1; + bool is_render_scheduled : 1; + bool on_screen : 1; + bool is_loaded : 1; + bool overrides_back_button : 1; + bool is_fullscreen : 1; + bool in_click_config_provider : 1; //! @internal //! If set, the touch-nav bridge must not emulate buttons for this window (Tier-2 is off). //! A Tier-1 widget sets this so its own recognizers, not the system bridge, drive the gesture. - bool touch_bridge_disabled:1; + bool touch_bridge_disabled : 1; //! @internal //! If set, the touch-nav bridge only synthesizes a button for a tap landing on an action-bar //! icon zone; a tap anywhere else is dropped instead of falling back to SELECT. Swipes are //! unaffected. @see \ref window_set_touch_tap_requires_action_bar() - bool touch_tap_requires_action_bar:1; + bool touch_tap_requires_action_bar : 1; //! @internal //! If a click config provider was changed while the window was covered by a modal, //! this flag is used to indicate that it should be called when uncovered. - bool is_waiting_for_click_config:1; + bool is_waiting_for_click_config : 1; //! @internal //! If the window has configured its click config provider. This flag is used to automatically //! click configure a window if a modal from above relinquishes focus either by going off screen //! or becoming unfocusable. This is necessary because windows can be unfocusable, thus whether //! they are on screen does not indicate whether their click has been configured. - bool is_click_configured:1; + bool is_click_configured : 1; //! @internal //! If the window can visually expose window stacks below it. This property decides whether the @@ -142,7 +143,7 @@ typedef struct Window { //! the top windows of window stacks below it, not windows within the same window stack. //! @note Currently, the app window stack is the lowest stack, is_transparent has no affect on //! app windows. - bool is_transparent:1; + bool is_transparent : 1; //! @internal //! If the window passes input to the next window stack with a top focusable window. A window @@ -150,14 +151,14 @@ typedef struct Window { //! not the top window in their respective window stack never receive input, therefore //! unfocusable windows can only pass input to the top windows of window stacks below it, not //! windows within the same window stack. - bool is_unfocusable:1; + bool is_unfocusable : 1; //! @internal //! Back pointer to the window stack that this Window is residing on. //! @see \ref WindowStack struct WindowStack *parent_window_stack; - const char* debug_name; + const char *debug_name; } Window; #ifdef CONFIG_RELEASE @@ -169,25 +170,27 @@ typedef struct Window { //! Initializes a window and resets its members to the default values: //! //! * Background color : `GColorWhite` -//! * Root layer's `update_proc` : function that fills the window's background using `background_color`. +//! * Root layer's `update_proc` : function that fills the window's background using +//! `background_color`. //! * `click_config_provider` : `NULL` //! * `window_handlers` : all `NULL` //! @param window The window to initialize //! @param debug_name The window's debug name -void window_init(Window *window, const char* debug_name); +void window_init(Window *window, const char *debug_name); //! Creates a new Window on the heap and initializes it with the default values. //! //! * Background color : `GColorWhite` -//! * Root layer's `update_proc` : function that fills the window's background using `background_color`. +//! * Root layer's `update_proc` : function that fills the window's background using +//! `background_color`. //! * `click_config_provider` : `NULL` //! * `window_handlers` : all `NULL` //! @return A pointer to the window. `NULL` if the window could not //! be created -Window* window_create(void); +Window *window_create(void); //! Destroys a Window previously created by window_create. -void window_destroy(Window* window); +void window_destroy(Window *window); //! Deinitializes the window. //! Removes the window from the screen, removes its child layers from the root layer and @@ -202,7 +205,8 @@ void window_deinit(Window *window); //! This will automatically setup the input handlers of the window as well to use //! the click recognizer subsystem. //! @param window The window for which to set the click config provider -//! @param click_config_provider The callback that will be called to configure the click recognizers with the window +//! @param click_config_provider The callback that will be called to configure the click recognizers +//! with the window //! @see Clicks //! @see ClickConfigProvider void window_set_click_config_provider(Window *window, ClickConfigProvider click_config_provider); @@ -210,14 +214,19 @@ void window_set_click_config_provider(Window *window, ClickConfigProvider click_ //! Same as window_set_click_config_provider(), but will assign a custom context pointer //! (instead of the window pointer) that will be passed into the ClickHandler click event handlers. //! @param window The window for which to set the click config provider -//! @param click_config_provider The callback that will be called to configure the click recognizers with the window -//! @param context Pointer to application specific data that will be passed to the click configuration provider callback (defaults to the window). +//! @param click_config_provider The callback that will be called to configure the click recognizers +//! with the window +//! @param context Pointer to application specific data that will be passed to the click +//! configuration provider callback (defaults to the window). //! @see Clicks //! @see window_set_click_config_provider -void window_set_click_config_provider_with_context(Window *window, ClickConfigProvider click_config_provider, void *context); +void window_set_click_config_provider_with_context(Window *window, + ClickConfigProvider click_config_provider, + void *context); -//! Set the context that will be passed to handlers for the given button's events. By default the context passed to handlers -//! is equal to the \ref ClickConfigProvider context (defaults to the window). +//! Set the context that will be passed to handlers for the given button's events. By default the +//! context passed to handlers is equal to the \ref ClickConfigProvider context (defaults to the +//! window). //! @note Must be called from within the \ref ClickConfigProvider. //! @param button_id The button to set the context for. //! @param context Set the context that will be passed to handlers for the given button's events. @@ -225,55 +234,74 @@ void window_set_click_context(ButtonId button_id, void *context); //! Subscribe to single click events. //! @note Must be called from the \ref ClickConfigProvider. -//! @note \ref window_single_click_subscribe() and \ref window_single_repeating_click_subscribe() conflict, and cannot both be used on the same button. -//! @note When there is a multi_click and/or long_click setup, there will be a delay before the single click +//! @note \ref window_single_click_subscribe() and \ref window_single_repeating_click_subscribe() +//! conflict, and cannot both be used on the same button. +//! @note When there is a multi_click and/or long_click setup, there will be a delay before the +//! single click //! @param button_id The button events to subscribe to. //! @param handler The \ref ClickHandler to fire on this event. -//! handler will get fired. On the other hand, when there is no multi_click nor long_click setup, the single click handler will fire directly on button down. +//! handler will get fired. On the other hand, when there is no multi_click nor long_click setup, +//! the single click handler will fire directly on button down. //! @see ButtonId //! @see Clicks //! @see window_single_repeating_click_subscribe void window_single_click_subscribe(ButtonId button_id, ClickHandler handler); -//! Subscribe to single click event, with a repeat interval. A single click is detected every time "repeat_interval_ms" has been reached. +//! Subscribe to single click event, with a repeat interval. A single click is detected every time +//! "repeat_interval_ms" has been reached. //! @note Must be called from the \ref ClickConfigProvider. -//! @note \ref window_single_click_subscribe() and \ref window_single_repeating_click_subscribe() conflict, and cannot both be used on the same button. +//! @note \ref window_single_click_subscribe() and \ref window_single_repeating_click_subscribe() +//! conflict, and cannot both be used on the same button. //! @note The back button cannot be overridden with a repeating click. //! @param button_id The button events to subscribe to. -//! @param repeat_interval_ms When holding down, how many milliseconds before the handler is fired again. -//! A value of 0ms means "no repeat timer". The minimum is 30ms, and values below will be disregarded. -//! If there is a long-click handler subscribed on this button, `repeat_interval_ms` will not be used. +//! @param repeat_interval_ms When holding down, how many milliseconds before the handler is fired +//! again. A value of 0ms means "no repeat timer". The minimum is 30ms, and values below will be +//! disregarded. If there is a long-click handler subscribed on this button, `repeat_interval_ms` +//! will not be used. //! @param handler The \ref ClickHandler to fire on this event. //! @see window_single_click_subscribe -void window_single_repeating_click_subscribe(ButtonId button_id, uint16_t repeat_interval_ms, ClickHandler handler); +void window_single_repeating_click_subscribe(ButtonId button_id, uint16_t repeat_interval_ms, + ClickHandler handler); //! Subscribe to multi click events. //! @note Must be called from the \ref ClickConfigProvider. //! @param button_id The button events to subscribe to. //! @param min_clicks Minimum number of clicks before handler is fired. Defaults to 2. -//! @param max_clicks Maximum number of clicks after which the click counter is reset. A value of 0 means use "min" also as "max". -//! @param timeout The delay after which a sequence of clicks is considered finished, and the click counter is reset. A value of 0 means to use the system default 300ms. -//! @param last_click_only Defaults to false. When true, only the handler for the last multi-click is called. -//! @param handler The \ref ClickHandler to fire on this event. Fired for multi-clicks, as "filtered" by the `last_click_only`, `min`, and `max` parameters. -void window_multi_click_subscribe(ButtonId button_id, uint8_t min_clicks, uint8_t max_clicks, uint16_t timeout, bool last_click_only, ClickHandler handler); +//! @param max_clicks Maximum number of clicks after which the click counter is reset. A value of 0 +//! means use "min" also as "max". +//! @param timeout The delay after which a sequence of clicks is considered finished, and the click +//! counter is reset. A value of 0 means to use the system default 300ms. +//! @param last_click_only Defaults to false. When true, only the handler for the last multi-click +//! is called. +//! @param handler The \ref ClickHandler to fire on this event. Fired for multi-clicks, as +//! "filtered" by the `last_click_only`, `min`, and `max` parameters. +void window_multi_click_subscribe(ButtonId button_id, uint8_t min_clicks, uint8_t max_clicks, + uint16_t timeout, bool last_click_only, ClickHandler handler); //! Subscribe to long click events. //! @note Must be called from the \ref ClickConfigProvider. //! @note The back button cannot be overridden with a long click. //! @param button_id The button events to subscribe to. -//! @param delay_ms Milliseconds after which "handler" is fired. A value of 0 means to use the system default 500ms. -//! @param down_handler The \ref ClickHandler to fire as soon as the button has been held for `delay_ms`. This may be NULL to have no down handler. -//! @param up_handler The \ref ClickHandler to fire on the release of a long click. This may be NULL to have no up handler. -void window_long_click_subscribe(ButtonId button_id, uint16_t delay_ms, ClickHandler down_handler, ClickHandler up_handler); +//! @param delay_ms Milliseconds after which "handler" is fired. A value of 0 means to use the +//! system default 500ms. +//! @param down_handler The \ref ClickHandler to fire as soon as the button has been held for +//! `delay_ms`. This may be NULL to have no down handler. +//! @param up_handler The \ref ClickHandler to fire on the release of a long click. This may be NULL +//! to have no up handler. +void window_long_click_subscribe(ButtonId button_id, uint16_t delay_ms, ClickHandler down_handler, + ClickHandler up_handler); //! Subscribe to raw click events. //! @note Must be called from within the \ref ClickConfigProvider. //! @note The back button cannot be overridden with a raw click. //! @param button_id The button events to subscribe to. -//! @param down_handler The \ref ClickHandler to fire as soon as the button has been pressed. This may be NULL to have no down handler. -//! @param up_handler The \ref ClickHandler to fire on the release of the button. This may be NULL to have no up handler. +//! @param down_handler The \ref ClickHandler to fire as soon as the button has been pressed. This +//! may be NULL to have no down handler. +//! @param up_handler The \ref ClickHandler to fire on the release of the button. This may be NULL +//! to have no up handler. //! @param context If this context is not NULL, it will override the general context. -void window_raw_click_subscribe(ButtonId button_id, ClickHandler down_handler, ClickHandler up_handler, void *context); +void window_raw_click_subscribe(ButtonId button_id, ClickHandler down_handler, + ClickHandler up_handler, void *context); //! Gets the current click configuration provider of the window. //! @param window The window for which to get the click config provider @@ -308,7 +336,7 @@ void window_set_user_data(Window *window, void *data); //! set using window_set_user_data(). //! @see window_set_user_data //! @param window The window for which to get the user data -void* window_get_user_data(const Window *window); +void *window_get_user_data(const Window *window); //! Gets the root Layer of the window. //! The root layer is the layer at the bottom of the layer hierarchy for this window. @@ -316,7 +344,7 @@ void* window_get_user_data(const Window *window); //! a solid fill with the window's background color. //! @param window The window for which to get the root layer //! @return The window's root layer -struct Layer* window_get_root_layer(const Window *window); +struct Layer *window_get_root_layer(const Window *window); //! Sets the background color of the window, which is drawn automatically by the //! root layer of the window. @@ -329,7 +357,8 @@ void window_set_background_color_2bit(Window *window, GColor2 background_color); //! Sets whether or not the window is fullscreen, consequently hiding the system status bar. //! @note This needs to be called before pushing a window to the window stack. //! @param window The window for which to set its full-screen property -//! @param enabled True to make the window full-screen or false to leave space for the system status bar. +//! @param enabled True to make the window full-screen or false to leave space for the system status +//! bar. //! @see \ref window_get_fullscreen() void window_set_fullscreen(Window *window, bool enabled); @@ -347,7 +376,7 @@ void window_set_status_bar_icon(Window *window, const GBitmap *icon); //! @internal //! Internal window layer update proc to be called in window subclass layer update procs -void window_do_layer_update_proc(Layer *window, GContext* ctx); +void window_do_layer_update_proc(Layer *window, GContext *ctx); //! @internal //! This function gets called by the default render event handler. @@ -368,7 +397,7 @@ bool window_is_on_screen(Window *window); //! @return true if the window is currently loaded or false if not. //! @param window The window to query its loaded status //! @see \ref WindowHandlers -bool window_is_loaded(Window *window) ; +bool window_is_loaded(Window *window); //! @internal //! Sets whether a window is transparent. Transparent windows that are at the top of their stack @@ -394,7 +423,7 @@ bool window_is_focusable(Window *window); //! @internal //! @return A name used to identify the window. If CONFIG_RELEASE is defined will just return "?" //! @param window The window for which to get the debug name -const char* window_get_debug_name(Window *window); +const char *window_get_debug_name(Window *window); //! @internal void window_call_click_config_provider(Window *window, void *context); diff --git a/src/fw/applib/ui/window_stack.c b/src/fw/applib/ui/window_stack.c index f0699a6654..8366981a17 100644 --- a/src/fw/applib/ui/window_stack.c +++ b/src/fw/applib/ui/window_stack.c @@ -39,7 +39,7 @@ static WindowStackItem *prv_find_window_stack_item_for_window(WindowStack *windo } WindowStackItem *item = (WindowStackItem *)list_find(window_stack->list_head, - prv_filter_window_item_for_window, window); + prv_filter_window_item_for_window, window); return item; } @@ -115,12 +115,12 @@ static void prv_transition_to(Window *window_from, Window *window_to, } } - *context = (WindowTransitioningContext) { - .window_to = window_to, - .window_to_last_x = INT16_MAX, - .window_from = window_from, - .window_from_last_x = INT16_MAX, - .implementation = transition, + *context = (WindowTransitioningContext){ + .window_to = window_to, + .window_to_last_x = INT16_MAX, + .window_from = window_from, + .window_from_last_x = INT16_MAX, + .implementation = transition, }; // TODO: PBL-17806 in future, store frames and config values as well @@ -165,7 +165,7 @@ static void prv_push_inserter(WindowStackItem *stack_item) { } static void prv_insert_with_function(WindowStack *window_stack_to, Window *window, - void(*inserter)(WindowStackItem *), + void (*inserter)(WindowStackItem *), const WindowTransitionImplementation *transition_insert, const WindowTransitionImplementation *transition_pop) { PBL_ASSERTN(window_stack_to); @@ -192,8 +192,8 @@ static void prv_insert_with_function(WindowStack *window_stack_to, Window *windo // If on the list of removed items for a window stack, remove from the removed items list // as we want to add it back to the window stack. if (window_stack_from) { - ListNode *node = list_find(window_stack_from->removed_list_head, - prv_filter_window_item_for_window, window); + ListNode *node = + list_find(window_stack_from->removed_list_head, prv_filter_window_item_for_window, window); if (node != NULL) { list_remove(node, &window_stack_from->removed_list_head, NULL); } @@ -210,9 +210,9 @@ static void prv_insert_with_function(WindowStack *window_stack_to, Window *windo // on the heap. item = applib_type_malloc(WindowStackItem); - *item = (WindowStackItem) { - .window = window, - .pop_transition_implementation = transition_pop, + *item = (WindowStackItem){ + .window = window, + .pop_transition_implementation = transition_pop, }; } @@ -222,8 +222,8 @@ static void prv_insert_with_function(WindowStack *window_stack_to, Window *windo prv_transition_to(window_from, window, transition_insert); } - PBL_LOG_DBG("(+) %s=%p <%s>", is_app_window ? "window" : "modal window", - window, window_get_debug_name(window)); + PBL_LOG_DBG("(+) %s=%p <%s>", is_app_window ? "window" : "modal window", window, + window_get_debug_name(window)); } static Window *prv_remove_item(WindowStackItem *pop_item, @@ -259,14 +259,14 @@ static Window *prv_remove_item(WindowStackItem *pop_item, Window *window_to = stack_item ? stack_item->window : NULL; // Add the removed item to the 'removed' list - window_stack->removed_list_head = list_insert_before(window_stack->removed_list_head, - &pop_item->list_node); + window_stack->removed_list_head = + list_insert_before(window_stack->removed_list_head, &pop_item->list_node); // Store the window here, as we're potentially free'ing the item later on. Window *pop_item_window = pop_item->window; bool is_app_window = window_manager_is_app_window(pop_item_window); - PBL_LOG_DBG("(-) %s=%p <%s>", is_app_window ? "window" : "modal window", - pop_item_window, window_get_debug_name(pop_item_window)); + PBL_LOG_DBG("(-) %s=%p <%s>", is_app_window ? "window" : "modal window", pop_item_window, + window_get_debug_name(pop_item_window)); // Only animate if the window was previously at the top of the stack and there's a // window we can transition to. @@ -277,7 +277,7 @@ static Window *prv_remove_item(WindowStackItem *pop_item, // will still be called and the click handler is managed correctly, we call the // appropriate helper functions manually with a fake transitioning context. WindowTransitioningContext ctx = { - .window_from = pop_item_window, + .window_from = pop_item_window, }; window_transition_context_disappear(&ctx); @@ -296,11 +296,11 @@ Window *window_stack_get_top_window(WindowStack *window_stack) { void window_stack_push(WindowStack *window_stack, Window *window, bool animated) { const WindowTransitionImplementation *transition_insert = - animated ? window_transition_get_default_push_implementation() : - &g_window_transition_none_implementation; + animated ? window_transition_get_default_push_implementation() + : &g_window_transition_none_implementation; const WindowTransitionImplementation *transition_pop = - animated ? window_transition_get_default_pop_implementation() : - &g_window_transition_none_implementation; + animated ? window_transition_get_default_pop_implementation() + : &g_window_transition_none_implementation; window_stack_push_with_transition(window_stack, window, transition_insert, transition_pop); } @@ -368,8 +368,8 @@ void window_stack_pop_all(WindowStack *window_stack, const bool animated) { } list_remove(&next_item->list_node, &window_stack->list_head, NULL); - window_stack->removed_list_head = list_insert_before(window_stack->removed_list_head, - &next_item->list_node); + window_stack->removed_list_head = + list_insert_before(window_stack->removed_list_head, &next_item->list_node); window_set_on_screen(next_item->window, false /* not new */, true /* call handlers */); } while (true); @@ -382,15 +382,15 @@ bool window_stack_remove(Window *window, bool animated) { return false; } - WindowStackItem *item = prv_find_window_stack_item_for_window(window->parent_window_stack, - window); + WindowStackItem *item = + prv_find_window_stack_item_for_window(window->parent_window_stack, window); if (item == NULL) { return false; } const WindowTransitionImplementation *transition = - animated ? window_transition_get_default_pop_implementation() : - &g_window_transition_none_implementation; + animated ? window_transition_get_default_pop_implementation() + : &g_window_transition_none_implementation; window = prv_remove_item(item, transition); return window != NULL; @@ -436,9 +436,8 @@ bool window_stack_is_animating(WindowStack *window_stack) { bool window_stack_is_animating_with_fixed_status_bar(WindowStack *window_stack) { WindowTransitioningContext *context = &window_stack->transition_context; - return window_stack_is_animating(window_stack) && - window_has_status_bar(context->window_from) && - window_has_status_bar(context->window_to); + return window_stack_is_animating(window_stack) && window_has_status_bar(context->window_from) && + window_has_status_bar(context->window_to); } // Transitioning Context Functions @@ -448,7 +447,7 @@ bool window_stack_is_animating_with_fixed_status_bar(WindowStack *window_stack) bool window_transition_context_has_legacy_window_to(WindowStack *stack, Window *window) { return (stack->transition_context.window_to == window) && - process_manager_compiled_with_legacy2_sdk(); + process_manager_compiled_with_legacy2_sdk(); } void window_transition_context_disappear(WindowTransitioningContext *context) { @@ -513,9 +512,9 @@ size_t window_stack_dump(WindowStack *stack, WindowStackDump **dump) { if (*dump) { WindowStackItem *item = (WindowStackItem *)stack->list_head; while (item) { - (*dump)[idx++] = (WindowStackDump) { - .addr = item->window, - .name = window_get_debug_name(item->window), + (*dump)[idx++] = (WindowStackDump){ + .addr = item->window, + .name = window_get_debug_name(item->window), }; item = (WindowStackItem *)list_get_next(&item->list_node); } diff --git a/src/fw/applib/ui/window_stack_animation.h b/src/fw/applib/ui/window_stack_animation.h index f848fd535a..a3e6981cbd 100644 --- a/src/fw/applib/ui/window_stack_animation.h +++ b/src/fw/applib/ui/window_stack_animation.h @@ -12,7 +12,7 @@ typedef struct WindowTransitioningContext WindowTransitioningContext; typedef Animation *(*WindowTransitionImplementationCreateAnimationFunc)( - WindowTransitioningContext *context); + WindowTransitioningContext *context); typedef void (*WindowTransitionImplementationRenderFunc)(WindowTransitioningContext *context, GContext *ctx); diff --git a/src/fw/applib/ui/window_stack_animation_rect.c b/src/fw/applib/ui/window_stack_animation_rect.c index 7095b22bd0..16ff31243e 100644 --- a/src/fw/applib/ui/window_stack_animation_rect.c +++ b/src/fw/applib/ui/window_stack_animation_rect.c @@ -61,14 +61,15 @@ static void prv_transition_teardown_destroy_animation(Animation *a) { static Animation *prv_window_transition_move(WindowTransitioningContext *ctx, int16_t start_delta_x) { static struct PropertyAnimationImplementation const impl = { - .base = { - .setup = prv_transition_setup_window_callbacks, - .update = prv_update_rect_compatible, - .teardown = prv_transition_teardown_destroy_animation, - }, - .accessors = { - .setter.grect = prv_window_frame_setter, - }, + .base = + { + .setup = prv_transition_setup_window_callbacks, + .update = prv_update_rect_compatible, + .teardown = prv_transition_teardown_destroy_animation, + }, + .accessors = { + .setter.grect = prv_window_frame_setter, + }, }; Window *window = ctx->window_to; @@ -108,23 +109,23 @@ static void prv_window_transition_move_render(WindowTransitioningContext *contex } static Animation *prv_window_transition_move_from_right_create_animation( - WindowTransitioningContext *context) { + WindowTransitioningContext *context) { return prv_window_transition_move(context, DISP_COLS); } static Animation *prv_window_transition_move_from_left_create_animation( - WindowTransitioningContext *context) { + WindowTransitioningContext *context) { return prv_window_transition_move(context, -DISP_COLS); } const WindowTransitionImplementation g_window_transition_default_push_implementation_rect = { - .create_animation = prv_window_transition_move_from_right_create_animation, - .render = prv_window_transition_move_render, + .create_animation = prv_window_transition_move_from_right_create_animation, + .render = prv_window_transition_move_render, }; const WindowTransitionImplementation g_window_transition_default_pop_implementation_rect = { - .create_animation = prv_window_transition_move_from_left_create_animation, - .render = prv_window_transition_move_render, + .create_animation = prv_window_transition_move_from_left_create_animation, + .render = prv_window_transition_move_render, }; static void prv_update_null(Animation *animation, const AnimationProgress distance_normalized) { @@ -133,9 +134,9 @@ static void prv_update_null(Animation *animation, const AnimationProgress distan static Animation *prv_window_transition_none_create_animation(WindowTransitioningContext *context) { static struct AnimationImplementation const impl = { - .setup = prv_transition_setup_window_callbacks, - .update = prv_update_null, - .teardown = prv_transition_teardown_destroy_animation, + .setup = prv_transition_setup_window_callbacks, + .update = prv_update_null, + .teardown = prv_transition_teardown_destroy_animation, }; Animation *result = animation_create(); animation_set_handlers(result, (AnimationHandlers){}, context); @@ -145,6 +146,6 @@ static Animation *prv_window_transition_none_create_animation(WindowTransitionin } const WindowTransitionImplementation g_window_transition_none_implementation = { - .create_animation = prv_window_transition_none_create_animation, - .render = prv_window_transition_move_render, + .create_animation = prv_window_transition_none_create_animation, + .render = prv_window_transition_move_render, }; diff --git a/src/fw/applib/ui/window_stack_animation_round.c b/src/fw/applib/ui/window_stack_animation_round.c index 9d6c093159..6494909981 100644 --- a/src/fw/applib/ui/window_stack_animation_round.c +++ b/src/fw/applib/ui/window_stack_animation_round.c @@ -75,7 +75,7 @@ static GPoint prv_displacement_from(CompositorTransitionDirection direction) { } static CompositorTransitionDirection prv_direction_from_context( - const WindowTransitioningContext *context) { + const WindowTransitioningContext *context) { return ((WindowTransitionRoundImplementation *)context->implementation)->transition_direction; } @@ -116,8 +116,8 @@ static void prv_window_transition_animation_update(Animation *animation, static Animation *prv_window_transition_create_animation(WindowTransitioningContext *context) { static AnimationImplementation const impl = { - .setup = prv_window_transition_animation_setup, - .update = prv_window_transition_animation_update, + .setup = prv_window_transition_animation_setup, + .update = prv_window_transition_animation_update, }; Animation *animation = animation_create(); @@ -130,17 +130,19 @@ static Animation *prv_window_transition_create_animation(WindowTransitioningCont } const WindowTransitionRoundImplementation g_window_transition_default_push_implementation_round = { - .implementation = { - .create_animation = prv_window_transition_create_animation, - .render = prv_window_transition_render, - }, - .transition_direction = CompositorTransitionDirectionLeft, + .implementation = + { + .create_animation = prv_window_transition_create_animation, + .render = prv_window_transition_render, + }, + .transition_direction = CompositorTransitionDirectionLeft, }; const WindowTransitionRoundImplementation g_window_transition_default_pop_implementation_round = { - .implementation = { - .create_animation = prv_window_transition_create_animation, - .render = prv_window_transition_render, - }, - .transition_direction = CompositorTransitionDirectionRight, + .implementation = + { + .create_animation = prv_window_transition_create_animation, + .render = prv_window_transition_render, + }, + .transition_direction = CompositorTransitionDirectionRight, }; diff --git a/src/fw/applib/ui/window_stack_animation_round.h b/src/fw/applib/ui/window_stack_animation_round.h index 6ba8d5c2b5..46483fd9f9 100644 --- a/src/fw/applib/ui/window_stack_animation_round.h +++ b/src/fw/applib/ui/window_stack_animation_round.h @@ -13,6 +13,6 @@ typedef struct { } WindowTransitionRoundImplementation; extern const WindowTransitionRoundImplementation - g_window_transition_default_push_implementation_round; + g_window_transition_default_push_implementation_round; extern const WindowTransitionRoundImplementation - g_window_transition_default_pop_implementation_round; + g_window_transition_default_pop_implementation_round; diff --git a/src/fw/applib/unobstructed_area_service.c b/src/fw/applib/unobstructed_area_service.c index 3cee79b355..23d3bf9b1b 100644 --- a/src/fw/applib/unobstructed_area_service.c +++ b/src/fw/applib/unobstructed_area_service.c @@ -15,12 +15,12 @@ static void prv_origin_y_to_area(int16_t origin_y, GRect *area_out); void unobstructed_area_service_init(UnobstructedAreaState *state, int16_t current_y) { PBL_ASSERTN(state); - *state = (UnobstructedAreaState) {}; + *state = (UnobstructedAreaState){}; prv_origin_y_to_area(current_y, &state->area); - state->event_info = (EventServiceInfo) { - .type = PEBBLE_UNOBSTRUCTED_AREA_EVENT, - .handler = prv_handle_unobstructed_area_event, - .context = state, + state->event_info = (EventServiceInfo){ + .type = PEBBLE_UNOBSTRUCTED_AREA_EVENT, + .handler = prv_handle_unobstructed_area_event, + .context = state, }; event_service_client_subscribe(&state->event_info); } @@ -30,23 +30,23 @@ void unobstructed_area_service_deinit(UnobstructedAreaState *state) { event_service_client_unsubscribe(&state->event_info); } -static void prv_put_area_event(UnobstructedAreaEventType type, int16_t current_y, - int16_t final_y, AnimationProgress progress) { +static void prv_put_area_event(UnobstructedAreaEventType type, int16_t current_y, int16_t final_y, + AnimationProgress progress) { PebbleEvent event = { - .type = PEBBLE_UNOBSTRUCTED_AREA_EVENT, - .unobstructed_area = { - .type = type, - .current_y = current_y, - .final_y = final_y, - .progress = progress, - }, + .type = PEBBLE_UNOBSTRUCTED_AREA_EVENT, + .unobstructed_area = { + .type = type, + .current_y = current_y, + .final_y = final_y, + .progress = progress, + }, }; event_put(&event); } static void prv_clip_area(GRect *area_out) { PBL_ASSERTN(area_out); - const GRect display_frame = { .size = framebuffer_get_size(app_state_get_framebuffer()) }; + const GRect display_frame = {.size = framebuffer_get_size(app_state_get_framebuffer())}; grect_clip(area_out, &display_frame); } @@ -54,8 +54,8 @@ static void prv_clip_area(GRect *area_out) { //! This is equivalent to the height of the unobstructed area. static void prv_origin_y_to_area(int16_t origin_y, GRect *area_out) { PBL_ASSERTN(area_out); - *area_out = (GRect) { - .size = { DISP_COLS, origin_y }, + *area_out = (GRect){ + .size = {DISP_COLS, origin_y}, }; prv_clip_area(area_out); } @@ -141,8 +141,7 @@ static void prv_handle_unobstructed_area_event(PebbleEvent *event, void *context } void unobstructed_area_service_subscribe(UnobstructedAreaState *state, - const UnobstructedAreaHandlers *handlers, - void *context) { + const UnobstructedAreaHandlers *handlers, void *context) { PBL_ASSERTN(state && handlers); state->handlers = *handlers; state->context = context; @@ -151,7 +150,7 @@ void unobstructed_area_service_subscribe(UnobstructedAreaState *state, void unobstructed_area_service_unsubscribe(UnobstructedAreaState *state) { PBL_ASSERTN(state); - state->handlers = (UnobstructedAreaHandlers) {}; + state->handlers = (UnobstructedAreaHandlers){}; state->context = NULL; state->is_subscribed = false; } diff --git a/src/fw/applib/unobstructed_area_service_private.h b/src/fw/applib/unobstructed_area_service_private.h index e24de4c56c..5948de5fc0 100644 --- a/src/fw/applib/unobstructed_area_service_private.h +++ b/src/fw/applib/unobstructed_area_service_private.h @@ -51,8 +51,7 @@ bool unobstructed_area_service_has_requested_area(UnobstructedAreaState *state); //! @param handlers The handlers that should be called when the unobstructed area changes. //! @param context A user-provided context that will be passed to the callback handlers. void unobstructed_area_service_subscribe(UnobstructedAreaState *state, - const UnobstructedAreaHandlers *handlers, - void *context); + const UnobstructedAreaHandlers *handlers, void *context); //! @internal //! @param state Unobstructed area state belonging to the consuming task diff --git a/src/fw/applib/vendor/tinflate/tinflate.c b/src/fw/applib/vendor/tinflate/tinflate.c index f9f74c546e..dd1d853b0f 100644 --- a/src/fw/applib/vendor/tinflate/tinflate.c +++ b/src/fw/applib/vendor/tinflate/tinflate.c @@ -46,62 +46,45 @@ #include "kernel/pbl_malloc.h" -const unsigned char length_bits[30] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 2, 2, 2, 2, - 3, 3, 3, 3, 4, 4, 4, 4, - 5, 5, 5, 5 -}; -const unsigned short length_base[30] = { - 3, 4, 5, 6, 7, 8, 9, 10, - 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, - 131, 163, 195, 227, 258 -}; - -const unsigned char dist_bits[30] = { - 0, 0, 0, 0, 1, 1, 2, 2, - 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 10, 10, - 11, 11, 12, 12, 13, 13 -}; -const unsigned short dist_base[30] = { - 1, 2, 3, 4, 5, 7, 9, 13, - 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, - 4097, 6145, 8193, 12289, 16385, 24577 -}; +const unsigned char length_bits[30] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, + 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5}; +const unsigned short length_base[30] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, + 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, + 67, 83, 99, 115, 131, 163, 195, 227, 258}; + +const unsigned char dist_bits[30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, + 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; +const unsigned short dist_base[30] = {1, 2, 3, 4, 5, 7, 9, 13, + 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, + 4097, 6145, 8193, 12289, 16385, 24577}; /* special ordering of code length codes */ -const unsigned char clcidx[] = { - 16, 17, 18, 0, 8, 7, 9, 6, - 10, 5, 11, 4, 12, 3, 13, 2, - 14, 1, 15 -}; +const unsigned char clcidx[] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; /* data structures */ typedef struct { - unsigned short table[16]; /* table of code length counts */ - unsigned short trans[288]; /* code -> symbol translation table */ + unsigned short table[16]; /* table of code length counts */ + unsigned short trans[288]; /* code -> symbol translation table */ } TINF_TREE; typedef struct TINF_DATA { - const unsigned char *source; - unsigned int tag; - unsigned int bitcount; - - /* Buffer start */ - unsigned char *destStart; - /* Buffer total size */ - unsigned int destSize; - /* Current pointer in buffer */ - unsigned char *dest; - /* Remaining bytes in buffer */ - unsigned int destRemaining; - - TINF_TREE ltree; /* dynamic length/symbol tree */ - TINF_TREE dtree; /* dynamic distance tree */ + const unsigned char *source; + unsigned int tag; + unsigned int bitcount; + + /* Buffer start */ + unsigned char *destStart; + /* Buffer total size */ + unsigned int destSize; + /* Current pointer in buffer */ + unsigned char *dest; + /* Remaining bytes in buffer */ + unsigned int destRemaining; + + TINF_TREE ltree; /* dynamic length/symbol tree */ + TINF_TREE dtree; /* dynamic distance tree */ } TINF_DATA; /* ----------------------- * @@ -109,56 +92,62 @@ typedef struct TINF_DATA { * ----------------------- */ /* build the fixed huffman trees */ -static void tinf_build_fixed_trees(TINF_TREE *lt, TINF_TREE *dt) -{ - int i; - - /* build fixed length tree */ - for (i = 0; i < 7; ++i) lt->table[i] = 0; - - lt->table[7] = 24; - lt->table[8] = 152; - lt->table[9] = 112; - - for (i = 0; i < 24; ++i) lt->trans[i] = 256 + i; - for (i = 0; i < 144; ++i) lt->trans[24 + i] = i; - for (i = 0; i < 8; ++i) lt->trans[24 + 144 + i] = 280 + i; - for (i = 0; i < 112; ++i) lt->trans[24 + 144 + 8 + i] = 144 + i; - - /* build fixed distance tree */ - for (i = 0; i < 5; ++i) dt->table[i] = 0; - - dt->table[5] = 32; - - for (i = 0; i < 32; ++i) dt->trans[i] = i; +static void tinf_build_fixed_trees(TINF_TREE *lt, TINF_TREE *dt) { + int i; + + /* build fixed length tree */ + for (i = 0; i < 7; ++i) + lt->table[i] = 0; + + lt->table[7] = 24; + lt->table[8] = 152; + lt->table[9] = 112; + + for (i = 0; i < 24; ++i) + lt->trans[i] = 256 + i; + for (i = 0; i < 144; ++i) + lt->trans[24 + i] = i; + for (i = 0; i < 8; ++i) + lt->trans[24 + 144 + i] = 280 + i; + for (i = 0; i < 112; ++i) + lt->trans[24 + 144 + 8 + i] = 144 + i; + + /* build fixed distance tree */ + for (i = 0; i < 5; ++i) + dt->table[i] = 0; + + dt->table[5] = 32; + + for (i = 0; i < 32; ++i) + dt->trans[i] = i; } /* given an array of code lengths, build a tree */ -static void tinf_build_tree(TINF_TREE *t, const unsigned char *lengths, unsigned int num) -{ - unsigned short offs[16]; - unsigned int i, sum; - - /* clear code length count table */ - for (i = 0; i < 16; ++i) t->table[i] = 0; - - /* scan symbol lengths, and sum code length counts */ - for (i = 0; i < num; ++i) t->table[lengths[i]]++; - - t->table[0] = 0; - - /* compute offset table for distribution sort */ - for (sum = 0, i = 0; i < 16; ++i) - { - offs[i] = sum; - sum += t->table[i]; - } - - /* create code->symbol translation table (symbols sorted by code) */ - for (i = 0; i < num; ++i) - { - if (lengths[i]) t->trans[offs[lengths[i]]++] = i; - } +static void tinf_build_tree(TINF_TREE *t, const unsigned char *lengths, unsigned int num) { + unsigned short offs[16]; + unsigned int i, sum; + + /* clear code length count table */ + for (i = 0; i < 16; ++i) + t->table[i] = 0; + + /* scan symbol lengths, and sum code length counts */ + for (i = 0; i < num; ++i) + t->table[lengths[i]]++; + + t->table[0] = 0; + + /* compute offset table for distribution sort */ + for (sum = 0, i = 0; i < 16; ++i) { + offs[i] = sum; + sum += t->table[i]; + } + + /* create code->symbol translation table (symbols sorted by code) */ + for (i = 0; i < num; ++i) { + if (lengths[i]) + t->trans[offs[lengths[i]]++] = i; + } } /* ---------------------- * @@ -166,136 +155,125 @@ static void tinf_build_tree(TINF_TREE *t, const unsigned char *lengths, unsigned * ---------------------- */ /* get one bit from source stream */ -static int tinf_getbit(TINF_DATA *d) -{ - unsigned int bit; - - /* check if tag is empty */ - if (!d->bitcount--) - { - /* load next tag */ - d->tag = *d->source++; - d->bitcount = 7; - } - - /* shift bit out of tag */ - bit = d->tag & 0x01; - d->tag >>= 1; - - return bit; +static int tinf_getbit(TINF_DATA *d) { + unsigned int bit; + + /* check if tag is empty */ + if (!d->bitcount--) { + /* load next tag */ + d->tag = *d->source++; + d->bitcount = 7; + } + + /* shift bit out of tag */ + bit = d->tag & 0x01; + d->tag >>= 1; + + return bit; } /* read a num bit value from a stream and add base */ -static unsigned int tinf_read_bits(TINF_DATA *d, int num, int base) -{ - unsigned int val = 0; +static unsigned int tinf_read_bits(TINF_DATA *d, int num, int base) { + unsigned int val = 0; - /* read num bits */ - if (num) - { - unsigned int limit = 1 << (num); - unsigned int mask; + /* read num bits */ + if (num) { + unsigned int limit = 1 << (num); + unsigned int mask; - for (mask = 1; mask < limit; mask *= 2) - if (tinf_getbit(d)) val += mask; - } + for (mask = 1; mask < limit; mask *= 2) + if (tinf_getbit(d)) + val += mask; + } - return val + base; + return val + base; } /* given a data stream and a tree, decode a symbol */ -static int tinf_decode_symbol(TINF_DATA *d, TINF_TREE *t) -{ - int sum = 0, cur = 0, len = 0; - - /* get more bits while code value is above sum */ - do { +static int tinf_decode_symbol(TINF_DATA *d, TINF_TREE *t) { + int sum = 0, cur = 0, len = 0; - cur = 2*cur + tinf_getbit(d); + /* get more bits while code value is above sum */ + do { + cur = 2 * cur + tinf_getbit(d); - ++len; + ++len; - sum += t->table[len]; - cur -= t->table[len]; + sum += t->table[len]; + cur -= t->table[len]; - } while (cur >= 0); + } while (cur >= 0); - return t->trans[sum + cur]; + return t->trans[sum + cur]; } /* given a data stream, decode dynamic trees from it */ -static void tinf_decode_trees(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) -{ - unsigned char *lengths = task_malloc(288+32); - unsigned int hlit, hdist, hclen; - unsigned int i, num, length; +static void tinf_decode_trees(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) { + unsigned char *lengths = task_malloc(288 + 32); + unsigned int hlit, hdist, hclen; + unsigned int i, num, length; - /* get 5 bits HLIT (257-286) */ - hlit = tinf_read_bits(d, 5, 257); + /* get 5 bits HLIT (257-286) */ + hlit = tinf_read_bits(d, 5, 257); - /* get 5 bits HDIST (1-32) */ - hdist = tinf_read_bits(d, 5, 1); + /* get 5 bits HDIST (1-32) */ + hdist = tinf_read_bits(d, 5, 1); - /* get 4 bits HCLEN (4-19) */ - hclen = tinf_read_bits(d, 4, 4); + /* get 4 bits HCLEN (4-19) */ + hclen = tinf_read_bits(d, 4, 4); - for (i = 0; i < 19; ++i) lengths[i] = 0; + for (i = 0; i < 19; ++i) + lengths[i] = 0; - /* read code lengths for code length alphabet */ - for (i = 0; i < hclen; ++i) - { - /* get 3 bits code length (0-7) */ - unsigned int clen = tinf_read_bits(d, 3, 0); + /* read code lengths for code length alphabet */ + for (i = 0; i < hclen; ++i) { + /* get 3 bits code length (0-7) */ + unsigned int clen = tinf_read_bits(d, 3, 0); - lengths[clcidx[i]] = clen; - } + lengths[clcidx[i]] = clen; + } - /* build code length tree, temporarily use length tree */ - tinf_build_tree(lt, lengths, 19); + /* build code length tree, temporarily use length tree */ + tinf_build_tree(lt, lengths, 19); - /* decode code lengths for the dynamic trees */ - for (num = 0; num < hlit + hdist; ) - { - int sym = tinf_decode_symbol(d, lt); + /* decode code lengths for the dynamic trees */ + for (num = 0; num < hlit + hdist;) { + int sym = tinf_decode_symbol(d, lt); - switch (sym) - { + switch (sym) { case 16: - /* copy previous code length 3-6 times (read 2 bits) */ - { - unsigned char prev = lengths[num - 1]; - for (length = tinf_read_bits(d, 2, 3); length; --length) - { - lengths[num++] = prev; - } - } - break; + /* copy previous code length 3-6 times (read 2 bits) */ + { + unsigned char prev = lengths[num - 1]; + for (length = tinf_read_bits(d, 2, 3); length; --length) { + lengths[num++] = prev; + } + } + break; case 17: - /* repeat code length 0 for 3-10 times (read 3 bits) */ - for (length = tinf_read_bits(d, 3, 3); length; --length) - { - lengths[num++] = 0; - } - break; + /* repeat code length 0 for 3-10 times (read 3 bits) */ + for (length = tinf_read_bits(d, 3, 3); length; --length) { + lengths[num++] = 0; + } + break; case 18: - /* repeat code length 0 for 11-138 times (read 7 bits) */ - for (length = tinf_read_bits(d, 7, 11); length; --length) - { - lengths[num++] = 0; - } - break; + /* repeat code length 0 for 11-138 times (read 7 bits) */ + for (length = tinf_read_bits(d, 7, 11); length; --length) { + lengths[num++] = 0; + } + break; default: - /* values 0-15 represent the actual code lengths */ - lengths[num++] = sym; - break; - } - } + /* values 0-15 represent the actual code lengths */ + lengths[num++] = sym; + break; + } + } - /* build dynamic trees */ - tinf_build_tree(lt, lengths, hlit); - tinf_build_tree(dt, lengths + hlit, hdist); + /* build dynamic trees */ + tinf_build_tree(lt, lengths, hlit); + tinf_build_tree(dt, lengths + hlit, hdist); - task_free(lengths); + task_free(lengths); } /* ----------------------------- * @@ -303,167 +281,158 @@ static void tinf_decode_trees(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) * ----------------------------- */ /* given a stream and two trees, inflate a block of data */ -static int tinf_inflate_block_data(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) -{ - while (1) - { - int sym = tinf_decode_symbol(d, lt); - - /* check for end of block */ - if (sym == 256) - { - return TINF_OK; - } +static int tinf_inflate_block_data(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) { + while (1) { + int sym = tinf_decode_symbol(d, lt); - if (sym < 256) - { - *d->dest++ = sym; - d->destRemaining--; - } else { + /* check for end of block */ + if (sym == 256) { + return TINF_OK; + } - unsigned int length, offs, i; - int dist; + if (sym < 256) { + *d->dest++ = sym; + d->destRemaining--; + } else { + unsigned int length, offs, i; + int dist; - sym -= 257; + sym -= 257; - /* possibly get more bits from length code */ - length = tinf_read_bits(d, length_bits[sym], length_base[sym]); + /* possibly get more bits from length code */ + length = tinf_read_bits(d, length_bits[sym], length_base[sym]); - dist = tinf_decode_symbol(d, dt); + dist = tinf_decode_symbol(d, dt); - /* possibly get more bits from distance code */ - offs = tinf_read_bits(d, dist_bits[dist], dist_base[dist]); + /* possibly get more bits from distance code */ + offs = tinf_read_bits(d, dist_bits[dist], dist_base[dist]); - /* copy match */ - for (i = 0; i < length; ++i) - { - d->dest[i] = d->dest[(int)(i - offs)]; - } - - d->dest += length; - d->destRemaining -= length; + /* copy match */ + for (i = 0; i < length; ++i) { + d->dest[i] = d->dest[(int)(i - offs)]; } - } + + d->dest += length; + d->destRemaining -= length; + } + } } /* inflate an uncompressed block of data */ -static int tinf_inflate_uncompressed_block(TINF_DATA *d) -{ - unsigned int length, invlength; - unsigned int i; +static int tinf_inflate_uncompressed_block(TINF_DATA *d) { + unsigned int length, invlength; + unsigned int i; - /* get length */ - length = d->source[1]; - length = 256*length + d->source[0]; + /* get length */ + length = d->source[1]; + length = 256 * length + d->source[0]; - /* get one's complement of length */ - invlength = d->source[3]; - invlength = 256*invlength + d->source[2]; + /* get one's complement of length */ + invlength = d->source[3]; + invlength = 256 * invlength + d->source[2]; - /* check length */ - if (length != (~invlength & 0x0000ffff)) return TINF_DATA_ERROR; + /* check length */ + if (length != (~invlength & 0x0000ffff)) + return TINF_DATA_ERROR; - d->source += 4; + d->source += 4; - /* copy block */ - for (i = length; i; --i) *d->dest++ = *d->source++; - d->destRemaining -= length; + /* copy block */ + for (i = length; i; --i) + *d->dest++ = *d->source++; + d->destRemaining -= length; - /* make sure we start next block on a byte boundary */ - d->bitcount = 0; + /* make sure we start next block on a byte boundary */ + d->bitcount = 0; - return TINF_OK; + return TINF_OK; } /* inflate a block of data compressed with fixed huffman trees */ -static int tinf_inflate_fixed_block(TINF_DATA *d) -{ - /* build fixed huffman trees */ - tinf_build_fixed_trees(&d->ltree, &d->dtree); +static int tinf_inflate_fixed_block(TINF_DATA *d) { + /* build fixed huffman trees */ + tinf_build_fixed_trees(&d->ltree, &d->dtree); - /* decode block using fixed trees */ - return tinf_inflate_block_data(d, &d->ltree, &d->dtree); + /* decode block using fixed trees */ + return tinf_inflate_block_data(d, &d->ltree, &d->dtree); } /* inflate a block of data compressed with dynamic huffman trees */ -static int tinf_inflate_dynamic_block(TINF_DATA *d) -{ - /* decode trees from stream */ - tinf_decode_trees(d, &d->ltree, &d->dtree); +static int tinf_inflate_dynamic_block(TINF_DATA *d) { + /* decode trees from stream */ + tinf_decode_trees(d, &d->ltree, &d->dtree); - /* decode block using decoded trees */ - return tinf_inflate_block_data(d, &d->ltree, &d->dtree); + /* decode block using decoded trees */ + return tinf_inflate_block_data(d, &d->ltree, &d->dtree); } /* inflate stream from source to dest */ -static inline int tinf_uncompress_dyn(TINF_DATA *d) -{ - int bfinal; +static inline int tinf_uncompress_dyn(TINF_DATA *d) { + int bfinal; - /* initialise data */ - d->bitcount = 0; + /* initialise data */ + d->bitcount = 0; - d->dest = d->destStart; - d->destRemaining = d->destSize; + d->dest = d->destStart; + d->destRemaining = d->destSize; - do { + do { + unsigned int btype; + int res; - unsigned int btype; - int res; + /* read final block flag */ + bfinal = tinf_getbit(d); - /* read final block flag */ - bfinal = tinf_getbit(d); + /* read block type (2 bits) */ + btype = tinf_read_bits(d, 2, 0); - /* read block type (2 bits) */ - btype = tinf_read_bits(d, 2, 0); - - /* decompress block */ - switch (btype) - { + /* decompress block */ + switch (btype) { case 0: - /* decompress uncompressed block */ - res = tinf_inflate_uncompressed_block(d); - break; + /* decompress uncompressed block */ + res = tinf_inflate_uncompressed_block(d); + break; case 1: - /* decompress block with fixed huffman trees */ - res = tinf_inflate_fixed_block(d); - break; + /* decompress block with fixed huffman trees */ + res = tinf_inflate_fixed_block(d); + break; case 2: - /* decompress block with dynamic huffman trees */ - res = tinf_inflate_dynamic_block(d); - break; + /* decompress block with dynamic huffman trees */ + res = tinf_inflate_dynamic_block(d); + break; default: - return TINF_DATA_ERROR; - } + return TINF_DATA_ERROR; + } - if (res != TINF_OK) return TINF_DATA_ERROR; + if (res != TINF_OK) + return TINF_DATA_ERROR; - } while (!bfinal); + } while (!bfinal); - return TINF_OK; + return TINF_OK; } /* inflate stream from source to dest */ -int tinflate_uncompress(void *dest, unsigned int *destLen, - const void *source, unsigned int sourceLen) { - /* modification to avoid stack overflow on embedded */ - TINF_DATA *d = task_malloc(sizeof(TINF_DATA)); - if (!d) { - return TINF_MEMORY_ERROR; - } +int tinflate_uncompress(void *dest, unsigned int *destLen, const void *source, + unsigned int sourceLen) { + /* modification to avoid stack overflow on embedded */ + TINF_DATA *d = task_malloc(sizeof(TINF_DATA)); + if (!d) { + return TINF_MEMORY_ERROR; + } - /* initialise data */ - (void)sourceLen; - d->source = (const unsigned char *)source; + /* initialise data */ + (void)sourceLen; + d->source = (const unsigned char *)source; - d->destStart = (unsigned char *)dest; - d->destRemaining = *destLen; + d->destStart = (unsigned char *)dest; + d->destRemaining = *destLen; - int res = tinf_uncompress_dyn(d); + int res = tinf_uncompress_dyn(d); - *destLen = d->dest - d->destStart; + *destLen = d->dest - d->destStart; - task_free(d); + task_free(d); - return res; + return res; } diff --git a/src/fw/applib/vendor/tinflate/tinflate.h b/src/fw/applib/vendor/tinflate/tinflate.h index e2507db665..7263ce8247 100644 --- a/src/fw/applib/vendor/tinflate/tinflate.h +++ b/src/fw/applib/vendor/tinflate/tinflate.h @@ -49,13 +49,13 @@ extern "C" { #endif -#define TINF_OK 0 -#define TINF_MEMORY_ERROR (-1) -#define TINF_DATA_ERROR (-3) +#define TINF_OK 0 +#define TINF_MEMORY_ERROR (-1) +#define TINF_DATA_ERROR (-3) #define TINF_DEST_OVERFLOW (-4) -int tinflate_uncompress(void *dest, unsigned int *destLen, - const void *source, unsigned int sourceLen); +int tinflate_uncompress(void *dest, unsigned int *destLen, const void *source, + unsigned int sourceLen); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/fw/applib/vendor/uPNG/upng.c b/src/fw/applib/vendor/uPNG/upng.c index 81bc8628f4..77dc25e47f 100644 --- a/src/fw/applib/vendor/uPNG/upng.c +++ b/src/fw/applib/vendor/uPNG/upng.c @@ -66,13 +66,17 @@ #define DEFLATE_CODE_BITLEN 15 #define DISTANCE_BITLEN 15 #define CODE_LENGTH_BITLEN 7 -#define MAX_BIT_LENGTH 15 // bug? 15 /* largest bitlen used by any tree type */ +#define MAX_BIT_LENGTH 15 // bug? 15 /* largest bitlen used by any tree type */ #define DEFLATE_CODE_BUFFER_SIZE (NUM_DEFLATE_CODE_SYMBOLS * 2) #define DISTANCE_BUFFER_SIZE (NUM_DISTANCE_SYMBOLS * 2) #define CODE_LENGTH_BUFFER_SIZE (NUM_DISTANCE_SYMBOLS * 2) -#define SET_ERROR(upng, code) do {(upng)->error = (code); (upng)->error_line = __LINE__;} while (0) +#define SET_ERROR(upng, code) \ + do { \ + (upng)->error = (code); \ + (upng)->error_line = __LINE__; \ + } while (0) #define upng_chunk_data_length(chunk) MAKE_WORD_PTR(chunk) #define upng_chunk_type(chunk) MAKE_WORD_PTR((chunk) + 4) @@ -81,30 +85,30 @@ #define upng_chunk_type_critical(chunk_type) (((chunk_type) & 0x20000000) == 0) typedef enum upng_state { - UPNG_ERROR = -1, + UPNG_ERROR = -1, UPNG_DECODED = 0, - UPNG_LOADED = 1, // Global data loaded (Palette) (APNG control data) - UPNG_HEADER = 2, - UPNG_NEW = 3 + UPNG_LOADED = 1, // Global data loaded (Palette) (APNG control data) + UPNG_HEADER = 2, + UPNG_NEW = 3 } upng_state; typedef enum upng_color { - UPNG_LUM = 0, - UPNG_RGB = 2, - UPNG_PLT = 3, + UPNG_LUM = 0, + UPNG_RGB = 2, + UPNG_PLT = 3, UPNG_LUMA = 4, UPNG_RGBA = 6 } upng_color; typedef struct upng_source { - const uint8_t* buffer; - uint32_t size; - char owning; + const uint8_t *buffer; + uint32_t size; + char owning; } upng_source; struct upng_t { - uint32_t width; - uint32_t height; + uint32_t width; + uint32_t height; rgb *palette; uint16_t palette_entries; @@ -112,37 +116,36 @@ struct upng_t { uint8_t *alpha_palette; uint16_t alpha_palette_entries; - upng_color color_type; - uint32_t color_depth; - upng_format format; + upng_color color_type; + uint32_t color_depth; + upng_format format; - const uint8_t* cursor; // data cursor for parsing linearly - uint8_t* buffer; + const uint8_t *cursor; // data cursor for parsing linearly + uint8_t *buffer; uint32_t size; // APNG information for image at current frame bool is_apng; - apng_fctl* apng_frame_control; + apng_fctl *apng_frame_control; uint32_t apng_num_frames; uint32_t apng_num_plays; // 0 indicates infinite looping uint32_t apng_duration_ms; - upng_error error; - uint32_t error_line; + upng_error error; + uint32_t error_line; - upng_state state; - upng_source source; + upng_state state; + upng_source source; }; static uint8_t read_bit(uint32_t *bitpointer, const uint8_t *bitstream) { - uint8_t result = - (uint8_t)((bitstream[(*bitpointer) >> 3] >> ((*bitpointer) & 0x7)) & 1); + uint8_t result = (uint8_t)((bitstream[(*bitpointer) >> 3] >> ((*bitpointer) & 0x7)) & 1); (*bitpointer)++; return result; } -static void inflate_uncompressed(upng_t* upng, uint8_t* out, uint32_t outsize, - const uint8_t *in, uint32_t *bp, uint32_t *pos, uint32_t inlength) { +static void inflate_uncompressed(upng_t *upng, uint8_t *out, uint32_t outsize, const uint8_t *in, + uint32_t *bp, uint32_t *pos, uint32_t inlength) { uint32_t p; uint16_t len, nlen, n; @@ -150,7 +153,7 @@ static void inflate_uncompressed(upng_t* upng, uint8_t* out, uint32_t outsize, while (((*bp) & 0x7) != 0) { (*bp)++; } - p = (*bp) / 8; /*byte position */ + p = (*bp) / 8; /*byte position */ /* read len (2 bytes) and nlen (2 bytes) */ if (p >= inlength - 4) { @@ -188,8 +191,8 @@ static void inflate_uncompressed(upng_t* upng, uint8_t* out, uint32_t outsize, } /*inflate the deflated data (cfr. deflate spec); return value is the error*/ -static upng_error uz_inflate_data(upng_t* upng, uint8_t* out, uint32_t outsize, - const uint8_t *in, uint32_t insize, uint32_t inpos) { +static upng_error uz_inflate_data(upng_t *upng, uint8_t *out, uint32_t outsize, const uint8_t *in, + uint32_t insize, uint32_t inpos) { /*bit pointer in the "in" data, current byte is bp >> 3, * current bit is bp & 0x7 (from lsb to msb of the byte) */ uint32_t bp = 0; @@ -235,8 +238,8 @@ static upng_error uz_inflate_data(upng_t* upng, uint8_t* out, uint32_t outsize, return upng->error; } -static upng_error uz_inflate(upng_t* upng, uint8_t *out, uint32_t outsize, - const uint8_t *in, uint32_t insize) { +static upng_error uz_inflate(upng_t *upng, uint8_t *out, uint32_t outsize, const uint8_t *in, + uint32_t insize) { /* we require two bytes for the zlib data header */ if (insize < 2) { SET_ERROR(upng, UPNG_EMALFORMED); @@ -285,9 +288,9 @@ static int32_t paeth_predictor(int32_t a, int32_t b, int32_t c) { return c; } -static void unfilter_scanline(upng_t* upng, uint8_t *recon, const uint8_t *scanline, - const uint8_t *precon, uint32_t bytewidth, uint8_t filterType, - uint32_t length) { +static void unfilter_scanline(upng_t *upng, uint8_t *recon, const uint8_t *scanline, + const uint8_t *precon, uint32_t bytewidth, uint8_t filterType, + uint32_t length) { /* For PNG filter method 0 unfilter a PNG image scanline by scanline. @@ -336,8 +339,8 @@ static void unfilter_scanline(upng_t* upng, uint8_t *recon, const uint8_t *scanl for (i = 0; i < bytewidth; i++) recon[i] = (uint8_t)(scanline[i] + paeth_predictor(0, precon[i], 0)); for (i = bytewidth; i < length; i++) - recon[i] = (uint8_t)(scanline[i] + paeth_predictor(recon[i - bytewidth], - precon[i], precon[i - bytewidth])); + recon[i] = (uint8_t)(scanline[i] + paeth_predictor(recon[i - bytewidth], precon[i], + precon[i - bytewidth])); } else { for (i = 0; i < bytewidth; i++) recon[i] = scanline[i]; @@ -351,8 +354,8 @@ static void unfilter_scanline(upng_t* upng, uint8_t *recon, const uint8_t *scanl } } -static void unfilter(upng_t* upng, uint8_t *out, const uint8_t *in, - uint32_t w, uint32_t h, uint32_t bpp) { +static void unfilter(upng_t *upng, uint8_t *out, const uint8_t *in, uint32_t w, uint32_t h, + uint32_t bpp) { /* For PNG filter method 0 this function unfilters a single image @@ -376,7 +379,7 @@ static void unfilter(upng_t* upng, uint8_t *out, const uint8_t *in, uint8_t filterType = in[inindex]; unfilter_scanline(upng, &out[outindex], &in[inindex + 1], prevline, bytewidth, filterType, - linebytes); + linebytes); if (upng->error != UPNG_EOK) { return; } @@ -385,8 +388,8 @@ static void unfilter(upng_t* upng, uint8_t *out, const uint8_t *in, } } -static void remove_padding_bits(uint8_t *out, const uint8_t *in, - uint32_t olinebits, uint32_t ilinebits, uint32_t h) { +static void remove_padding_bits(uint8_t *out, const uint8_t *in, uint32_t olinebits, + uint32_t ilinebits, uint32_t h) { /* After filtering there are still padding bpp if scanlines have non multiple of 8 bit amounts. They need to be removed (except at last scanline of (Adam7-reduced) image) @@ -420,8 +423,8 @@ static void remove_padding_bits(uint8_t *out, const uint8_t *in, /*out must be buffer big enough to contain full image, * and in must contain the full decompressed data from the IDAT chunks*/ -static void post_process_scanlines(upng_t* upng, uint8_t *out, uint8_t *in, - uint32_t bpp, uint32_t w, uint32_t h) { +static void post_process_scanlines(upng_t *upng, uint8_t *out, uint8_t *in, uint32_t bpp, + uint32_t w, uint32_t h) { if (bpp == 0) { SET_ERROR(upng, UPNG_EMALFORMED); return; @@ -442,7 +445,7 @@ static void post_process_scanlines(upng_t* upng, uint8_t *out, uint8_t *in, } } -static upng_format determine_format(upng_t* upng) { +static upng_format determine_format(upng_t *upng) { switch (upng->color_type) { case UPNG_PLT: switch (upng->color_depth) { @@ -506,13 +509,13 @@ static upng_format determine_format(upng_t* upng) { } } -static void upng_free_source(upng_t* upng) { +static void upng_free_source(upng_t *upng) { if (!upng) { return; } if (upng->source.owning != 0) { - task_free((void*)upng->source.buffer); + task_free((void *)upng->source.buffer); } upng->source.buffer = NULL; @@ -521,7 +524,7 @@ static void upng_free_source(upng_t* upng) { } /*read the information from the header and store it in the upng_Info. return value is error*/ -upng_error upng_header(upng_t* upng) { +upng_error upng_header(upng_t *upng) { /* if we have an error state, bail now */ if (upng->error != UPNG_EOK) { return upng->error; @@ -586,8 +589,7 @@ upng_error upng_header(upng_t* upng) { return upng->error; } - -upng_error upng_decode_metadata(upng_t* upng) { +upng_error upng_decode_metadata(upng_t *upng) { /* if we have an error state, bail now */ if (upng->error != UPNG_EOK) { return upng->error; @@ -622,7 +624,7 @@ upng_error upng_decode_metadata(upng_t* upng) { switch (chunk_type) { case CHUNK_PLTE: task_free(upng->palette); - upng->palette_entries = data_length / 3; // 3 bytes per color entry + upng->palette_entries = data_length / 3; // 3 bytes per color entry upng->palette = task_malloc(data_length); if (upng->palette == NULL) { SET_ERROR(upng, UPNG_ENOMEM); @@ -632,7 +634,7 @@ upng_error upng_decode_metadata(upng_t* upng) { break; case CHUNK_TRNS: task_free(upng->alpha_palette); - upng->alpha_palette_entries = data_length; // 1 byte per color entry + upng->alpha_palette_entries = data_length; // 1 byte per color entry // protect against tools that create a tRNS chunk with 0 entries if (data_length) { upng->alpha_palette = task_malloc(data_length); @@ -693,12 +695,12 @@ upng_error upng_decode_metadata(upng_t* upng) { default: if (upng_chunk_type_critical(chunk_type)) { SET_ERROR(upng, UPNG_EUNSUPPORTED); - upng->cursor += data_length + CHUNK_META_SIZE; // forward cursor to next chunk + upng->cursor += data_length + CHUNK_META_SIZE; // forward cursor to next chunk return upng->error; } break; } - upng->cursor += data_length + CHUNK_META_SIZE; // forward cursor to next chunk + upng->cursor += data_length + CHUNK_META_SIZE; // forward cursor to next chunk } upng->state = UPNG_LOADED; @@ -706,9 +708,9 @@ upng_error upng_decode_metadata(upng_t* upng) { } /*read a PNG, the result will be in the same color type as the PNG (hence "generic")*/ -upng_error upng_decode_image(upng_t* upng) { - uint8_t* compressed = NULL; - uint8_t* inflated = NULL; +upng_error upng_decode_image(upng_t *upng) { + uint8_t *compressed = NULL; + uint8_t *inflated = NULL; uint32_t compressed_size = 0; uint32_t inflated_size = 0; bool cursor_at_next_frame = false; @@ -726,7 +728,6 @@ upng_error upng_decode_image(upng_t* upng) { } } - /* release old result, if any */ if (upng->buffer) { task_free(upng->buffer); @@ -734,7 +735,6 @@ upng_error upng_decode_image(upng_t* upng) { upng->size = 0; } - /* scan through the chunks, finding the size of all IDAT chunks, and also * verify general well-formed-ness */ while ((upng->cursor < upng->source.buffer + upng->source.size) && !cursor_at_next_frame) { @@ -786,33 +786,32 @@ upng_error upng_decode_image(upng_t* upng) { case CHUNK_FDAT: /* first 4 bytes in fdAT is sequence number, so skip 4 bytes */ // TODO : fix for multiple consecutive fdAT chunks (PBL-14294) - compressed = (uint8_t*)(data + 4); + compressed = (uint8_t *)(data + 4); compressed_size = (data_length - 4); - cursor_at_next_frame = true; // stop processing chunks at the IDAT/fdAT chunks + cursor_at_next_frame = true; // stop processing chunks at the IDAT/fdAT chunks break; case CHUNK_IDAT: // TODO : fix for multiple consecutive IDAT chunks (PBL-14294) - compressed = (uint8_t*)(data); + compressed = (uint8_t *)(data); compressed_size = data_length; - cursor_at_next_frame = true; // stop processing chunks at the IDAT/fdAT chunks + cursor_at_next_frame = true; // stop processing chunks at the IDAT/fdAT chunks break; case CHUNK_IEND: SET_ERROR(upng, UPNG_EDONE); - upng->state = UPNG_ERROR; // force future calls to fail + upng->state = UPNG_ERROR; // force future calls to fail return upng->error; break; default: if (upng_chunk_type_critical(chunk_type)) { SET_ERROR(upng, UPNG_EUNSUPPORTED); - upng->cursor += data_length + CHUNK_META_SIZE; // forward cursor to next chunk + upng->cursor += data_length + CHUNK_META_SIZE; // forward cursor to next chunk return upng->error; } break; } - upng->cursor += data_length + CHUNK_META_SIZE; // forward cursor to next chunk + upng->cursor += data_length + CHUNK_META_SIZE; // forward cursor to next chunk } - uint32_t width = upng->width; uint32_t height = upng->height; if (upng->apng_frame_control) { @@ -822,8 +821,8 @@ upng_error upng_decode_image(upng_t* upng) { /* allocate space to store inflated (but still filtered) data */ int32_t width_aligned_bytes = (width * upng_get_bpp(upng) + 7) / 8; - inflated_size = (width_aligned_bytes * height) + height; // pad byte - inflated = (uint8_t*)task_malloc(inflated_size); + inflated_size = (width_aligned_bytes * height) + height; // pad byte + inflated = (uint8_t *)task_malloc(inflated_size); if (inflated == NULL) { SET_ERROR(upng, UPNG_ENOMEM); return upng->error; @@ -851,8 +850,8 @@ upng_error upng_decode_image(upng_t* upng) { return upng->error; } -upng_t* upng_create(void) { - upng_t* upng = (upng_t*)task_malloc(sizeof(upng_t)); +upng_t *upng_create(void) { + upng_t *upng = (upng_t *)task_malloc(sizeof(upng_t)); if (upng == NULL) { return NULL; } @@ -868,7 +867,6 @@ upng_t* upng_create(void) { return upng; } - void upng_load_bytes(upng_t *upng, const uint8_t *buffer, uint32_t size) { upng->cursor = buffer; upng->source.buffer = buffer; @@ -876,8 +874,7 @@ void upng_load_bytes(upng_t *upng, const uint8_t *buffer, uint32_t size) { upng->source.owning = 0; } - -void upng_destroy(upng_t* upng, bool free_image_buffer) { +void upng_destroy(upng_t *upng, bool free_image_buffer) { if (!upng) { return; } @@ -892,7 +889,7 @@ void upng_destroy(upng_t* upng, bool free_image_buffer) { /* deallocate alpha_palette buffer */ task_free(upng->alpha_palette); - + /* deallocate apng_frame_control struct */ task_free(upng->apng_frame_control); @@ -903,41 +900,41 @@ void upng_destroy(upng_t* upng, bool free_image_buffer) { task_free(upng); } -upng_error upng_get_error(const upng_t* upng) { +upng_error upng_get_error(const upng_t *upng) { return upng->error; } -uint32_t upng_get_error_line(const upng_t* upng) { +uint32_t upng_get_error_line(const upng_t *upng) { return upng->error_line; } -uint32_t upng_get_width(const upng_t* upng) { +uint32_t upng_get_width(const upng_t *upng) { return upng->width; } -uint32_t upng_get_height(const upng_t* upng) { +uint32_t upng_get_height(const upng_t *upng) { return upng->height; } -uint16_t upng_get_palette(const upng_t* upng, rgb **palette) { +uint16_t upng_get_palette(const upng_t *upng, rgb **palette) { if (palette) { *palette = upng->palette; } return upng->palette_entries; } -uint16_t upng_get_alpha_palette(const upng_t* upng, uint8_t **alpha_palette) { +uint16_t upng_get_alpha_palette(const upng_t *upng, uint8_t **alpha_palette) { if (alpha_palette) { *alpha_palette = upng->alpha_palette; } return upng->alpha_palette_entries; } -uint32_t upng_get_bpp(const upng_t* upng) { +uint32_t upng_get_bpp(const upng_t *upng) { return upng_get_bitdepth(upng) * upng_get_components(upng); } -uint32_t upng_get_components(const upng_t* upng) { +uint32_t upng_get_components(const upng_t *upng) { switch (upng->color_type) { case UPNG_PLT: return 1; @@ -954,34 +951,34 @@ uint32_t upng_get_components(const upng_t* upng) { } } -uint32_t upng_get_bitdepth(const upng_t* upng) { +uint32_t upng_get_bitdepth(const upng_t *upng) { return upng->color_depth; } -uint32_t upng_get_pixelsize(const upng_t* upng) { +uint32_t upng_get_pixelsize(const upng_t *upng) { return (upng_get_bitdepth(upng) * upng_get_components(upng)); } -upng_format upng_get_format(const upng_t* upng) { +upng_format upng_get_format(const upng_t *upng) { return upng->format; } -const uint8_t* upng_get_buffer(const upng_t* upng) { +const uint8_t *upng_get_buffer(const upng_t *upng) { return upng->buffer; } -uint32_t upng_get_size(const upng_t* upng) { +uint32_t upng_get_size(const upng_t *upng) { return upng->size; } // returns if the png is an apng after the upng_load() function -bool upng_is_apng(const upng_t* upng) { +bool upng_is_apng(const upng_t *upng) { return upng->is_apng; } // retuns the apng num_frames -uint32_t upng_apng_num_frames(const upng_t* upng) { - uint32_t num_frames = 1; //default to 1 frame for png images used as apng +uint32_t upng_apng_num_frames(const upng_t *upng) { + uint32_t num_frames = 1; // default to 1 frame for png images used as apng if (upng->is_apng) { num_frames = upng->apng_num_frames; } @@ -989,7 +986,7 @@ uint32_t upng_apng_num_frames(const upng_t* upng) { } // retuns the apng num_plays -uint32_t upng_apng_num_plays(const upng_t* upng) { +uint32_t upng_apng_num_plays(const upng_t *upng) { uint32_t num_plays = 1; // default to 1 play for png images used as apng if (upng->is_apng) { num_plays = upng->apng_num_plays; @@ -998,7 +995,7 @@ uint32_t upng_apng_num_plays(const upng_t* upng) { } // Pass in a apng_fctl to get the next frames frame control information -bool upng_get_apng_fctl(const upng_t* upng, apng_fctl *apng_frame_control) { +bool upng_get_apng_fctl(const upng_t *upng, apng_fctl *apng_frame_control) { bool retval = false; if (upng->is_apng && apng_frame_control != NULL) { *apng_frame_control = *upng->apng_frame_control; diff --git a/src/fw/applib/vendor/uPNG/upng.h b/src/fw/applib/vendor/uPNG/upng.h index 1a062da27c..694ec3d992 100644 --- a/src/fw/applib/vendor/uPNG/upng.h +++ b/src/fw/applib/vendor/uPNG/upng.h @@ -47,33 +47,33 @@ // PNG files start with [137, 'P', 'N', 'G'] #define PNG_SIGNATURE MAKE_WORD('\x89', 'P', 'N', 'G') -#define PNG_HEADER_SIZE 33 // Full header == 8 + 25 (PNG_file_signature + IHDR_CHUNK) -#define CHUNK_META_SIZE 12 // PNG Chunks have 12 bytes of metadata (Length, Type, CRC) -#define FCTL_CHUNK_SIZE (26 + CHUNK_META_SIZE) // FCTL data_size + META_SIZE - -#define CHUNK_IHDR MAKE_WORD('I', 'H', 'D', 'R') // Image Header Chunk -#define CHUNK_IDAT MAKE_WORD('I', 'D', 'A', 'T') // Image Data Chunk -#define CHUNK_PLTE MAKE_WORD('P', 'L', 'T', 'E') // Palette Chunk -#define CHUNK_IEND MAKE_WORD('I', 'E', 'N', 'D') // Image End Chunk -#define CHUNK_TRNS MAKE_WORD('t', 'R', 'N', 'S') // Alpha transparency for palettized images -#define CHUNK_ACTL MAKE_WORD('a', 'c', 'T', 'L') // Animation control (APNG) -#define CHUNK_ADTL MAKE_WORD('a', 'd', 'T', 'L') // Animation duration (APNG) -#define CHUNK_FDAT MAKE_WORD('f', 'd', 'A', 'T') // Frame Data (APNG) -#define CHUNK_FCTL MAKE_WORD('f', 'c', 'T', 'L') // Frame control (APNG) +#define PNG_HEADER_SIZE 33 // Full header == 8 + 25 (PNG_file_signature + IHDR_CHUNK) +#define CHUNK_META_SIZE 12 // PNG Chunks have 12 bytes of metadata (Length, Type, CRC) +#define FCTL_CHUNK_SIZE (26 + CHUNK_META_SIZE) // FCTL data_size + META_SIZE + +#define CHUNK_IHDR MAKE_WORD('I', 'H', 'D', 'R') // Image Header Chunk +#define CHUNK_IDAT MAKE_WORD('I', 'D', 'A', 'T') // Image Data Chunk +#define CHUNK_PLTE MAKE_WORD('P', 'L', 'T', 'E') // Palette Chunk +#define CHUNK_IEND MAKE_WORD('I', 'E', 'N', 'D') // Image End Chunk +#define CHUNK_TRNS MAKE_WORD('t', 'R', 'N', 'S') // Alpha transparency for palettized images +#define CHUNK_ACTL MAKE_WORD('a', 'c', 'T', 'L') // Animation control (APNG) +#define CHUNK_ADTL MAKE_WORD('a', 'd', 'T', 'L') // Animation duration (APNG) +#define CHUNK_FDAT MAKE_WORD('f', 'd', 'A', 'T') // Frame Data (APNG) +#define CHUNK_FCTL MAKE_WORD('f', 'c', 'T', 'L') // Frame control (APNG) #define APNG_DEFAULT_DELAY_UNITS (100) // APNG default delay units (ie. 1/100 per frame) typedef enum upng_error { - UPNG_EOK = 0, // success(no error) - UPNG_ENOMEM = 1, // memory allocation failed - UPNG_ENOTFOUND = 2, // resource not found(file missing) - UPNG_ENOTPNG = 3, // image data does not have a PNG header - UPNG_EMALFORMED = 4, // image data is not a valid PNG image - UPNG_EUNSUPPORTED = 5, // critical PNG chunk type is not supported - UPNG_EUNINTERLACED = 6, // image int32_terlacing is not supported - UPNG_EUNFORMAT = 7, // image color format is not supported - UPNG_EPARAM = 8, // invalid parameter to method call - UPNG_EDONE = 9 // completed decoding all information to end of file (IEND) + UPNG_EOK = 0, // success(no error) + UPNG_ENOMEM = 1, // memory allocation failed + UPNG_ENOTFOUND = 2, // resource not found(file missing) + UPNG_ENOTPNG = 3, // image data does not have a PNG header + UPNG_EMALFORMED = 4, // image data is not a valid PNG image + UPNG_EUNSUPPORTED = 5, // critical PNG chunk type is not supported + UPNG_EUNINTERLACED = 6, // image int32_terlacing is not supported + UPNG_EUNFORMAT = 7, // image color format is not supported + UPNG_EPARAM = 8, // invalid parameter to method call + UPNG_EDONE = 9 // completed decoding all information to end of file (IEND) } upng_error; typedef enum upng_format { @@ -104,26 +104,25 @@ typedef struct PACKED rgb { uint8_t b; } rgb; +upng_t *upng_create(void); +void upng_destroy(upng_t *upng, bool free_image_buffer); -upng_t* upng_create(void); -void upng_destroy(upng_t* upng, bool free_image_buffer); +void upng_load_bytes(upng_t *upng, const uint8_t *source_buffer, uint32_t source_size); -void upng_load_bytes(upng_t* upng, const uint8_t* source_buffer, uint32_t source_size); +upng_error upng_decode_metadata(upng_t *upng); +upng_error upng_decode_image(upng_t *upng); -upng_error upng_decode_metadata(upng_t* upng); -upng_error upng_decode_image(upng_t* upng); +upng_error upng_get_error(const upng_t *upng); +uint32_t upng_get_error_line(const upng_t *upng); -upng_error upng_get_error(const upng_t* upng); -uint32_t upng_get_error_line(const upng_t* upng); - -uint32_t upng_get_width(const upng_t* upng); -uint32_t upng_get_height(const upng_t* upng); -uint32_t upng_get_bpp(const upng_t* upng); -uint32_t upng_get_bitdepth(const upng_t* upng); -uint32_t upng_get_components(const upng_t* upng); -uint32_t upng_get_pixelsize(const upng_t* upng); -upng_format upng_get_format(const upng_t* upng); -uint32_t upng_get_size(const upng_t* upng); +uint32_t upng_get_width(const upng_t *upng); +uint32_t upng_get_height(const upng_t *upng); +uint32_t upng_get_bpp(const upng_t *upng); +uint32_t upng_get_bitdepth(const upng_t *upng); +uint32_t upng_get_components(const upng_t *upng); +uint32_t upng_get_pixelsize(const upng_t *upng); +upng_format upng_get_format(const upng_t *upng); +uint32_t upng_get_size(const upng_t *upng); // returns palette and count of entries in palette for indexed images uint16_t upng_get_palette(const upng_t *upng, rgb **palette); @@ -131,7 +130,7 @@ uint16_t upng_get_palette(const upng_t *upng, rgb **palette); // returns(optional) alpha_palette and count of entries in alpha_palette for indexed images uint16_t upng_get_alpha_palette(const upng_t *upng, uint8_t **alpha_palette); -const uint8_t* upng_get_buffer(const upng_t* upng); +const uint8_t *upng_get_buffer(const upng_t *upng); typedef enum apng_dispose_ops { APNG_DISPOSE_OP_NONE = 0, @@ -157,15 +156,15 @@ typedef struct PACKED apng_fctl { } apng_fctl; // returns if the png is an apng after the upng_load() function -bool upng_is_apng(const upng_t* upng); +bool upng_is_apng(const upng_t *upng); // retuns the apng num_frames -uint32_t upng_apng_num_frames(const upng_t* upng); +uint32_t upng_apng_num_frames(const upng_t *upng); // retuns the apng num_plays (0 indicates infinite looping) -uint32_t upng_apng_num_plays(const upng_t* upng); +uint32_t upng_apng_num_plays(const upng_t *upng); // Pass in a apng_fctl to get the next frames frame control information -bool upng_get_apng_fctl(const upng_t* upng, apng_fctl *apng_frame_control); +bool upng_get_apng_fctl(const upng_t *upng, apng_fctl *apng_frame_control); #endif /* defined(UPNG_H) */ diff --git a/src/fw/applib/voice/dictation_session.c b/src/fw/applib/voice/dictation_session.c index b74dd5bda1..fd77a72c91 100644 --- a/src/fw/applib/voice/dictation_session.c +++ b/src/fw/applib/voice/dictation_session.c @@ -16,7 +16,7 @@ static void prv_handle_transcription_result(PebbleEvent *e, void *context) { PBL_ASSERTN(context); - PBL_LOG_DBG("Exiting with status code: %"PRId8, e->dictation.result); + PBL_LOG_DBG("Exiting with status code: %" PRId8, e->dictation.result); DictationSession *session = context; session->callback(session, e->dictation.result, e->dictation.text, session->context); @@ -61,9 +61,10 @@ DictationSession *dictation_session_create(uint32_t buffer_size, // apps. This will result in apps not being able to use the voice APIs unless the phone has the // capability flag set, which is what we want. bool from_app = (pebble_task_get_current() == PebbleTask_App) && - !app_install_id_from_system(sys_process_manager_get_current_process_id()); + !app_install_id_from_system(sys_process_manager_get_current_process_id()); if (from_app && !sys_system_pp_has_capability(CommSessionVoiceApiSupport)) { - PBL_LOG_WRN("No phone connected or phone app does not support app-initiated dictation sessions"); + PBL_LOG_WRN( + "No phone connected or phone app does not support app-initiated dictation sessions"); return NULL; } @@ -81,27 +82,27 @@ DictationSession *dictation_session_create(uint32_t buffer_size, } } - VoiceWindow *voice_window = voice_window_create(buffer, buffer_size, - VoiceEndpointSessionTypeDictation); + VoiceWindow *voice_window = + voice_window_create(buffer, buffer_size, VoiceEndpointSessionTypeDictation); if (!voice_window) { applib_free(buffer); applib_free(session); return NULL; } - *session = (DictationSession) { - .callback = callback, - .context = context, - .voice_window = voice_window, - .dictation_result_sub = (EventServiceInfo) { - .type = PEBBLE_DICTATION_EVENT, - .handler = prv_handle_transcription_result, - .context = session - } + *session = (DictationSession){ + .callback = callback, + .context = context, + .voice_window = voice_window, + .dictation_result_sub = (EventServiceInfo){ + .type = PEBBLE_DICTATION_EVENT, + .handler = prv_handle_transcription_result, + .context = session + } }; if (pebble_task_get_current() == PebbleTask_App) { - session->app_focus_sub = (EventServiceInfo) { + session->app_focus_sub = (EventServiceInfo){ .type = PEBBLE_APP_DID_CHANGE_FOCUS_EVENT, .handler = prv_app_focus_handler, .context = session diff --git a/src/fw/applib/voice/loading_layer.c b/src/fw/applib/voice/loading_layer.c index 17151d8b48..dc95dd3150 100644 --- a/src/fw/applib/voice/loading_layer.c +++ b/src/fw/applib/voice/loading_layer.c @@ -7,9 +7,7 @@ #include "applib/ui/property_animation.h" void loading_layer_init(LoadingLayer *loading_layer, const GRect *frame) { - *loading_layer = (LoadingLayer) { - .full_frame = *frame - }; + *loading_layer = (LoadingLayer){.full_frame = *frame}; ProgressLayer *progress_layer = &loading_layer->progress_layer; progress_layer_init(progress_layer, frame); @@ -32,8 +30,8 @@ void loading_layer_shrink(LoadingLayer *loading_layer, uint32_t delay, uint32_t stop.origin.x += stop.size.w; stop.size.w = 0; - PropertyAnimation *prop_anim = property_animation_create_layer_frame( - (Layer *)loading_layer, start, &stop); + PropertyAnimation *prop_anim = + property_animation_create_layer_frame((Layer *)loading_layer, start, &stop); if (!prop_anim) { return; } @@ -43,9 +41,7 @@ void loading_layer_shrink(LoadingLayer *loading_layer, uint32_t delay, uint32_t animation_set_delay(animation, delay); animation_set_duration(animation, duration); animation_set_curve(animation, AnimationCurveEaseOut); - animation_set_handlers(animation, (AnimationHandlers) { - .stopped = stopped_handler - }, context); + animation_set_handlers(animation, (AnimationHandlers){.stopped = stopped_handler}, context); loading_layer->animation = animation; animation_schedule(animation); diff --git a/src/fw/applib/voice/loading_layer.h b/src/fw/applib/voice/loading_layer.h index 68c4cc36cc..f58683f13e 100644 --- a/src/fw/applib/voice/loading_layer.h +++ b/src/fw/applib/voice/loading_layer.h @@ -8,7 +8,7 @@ #include -#define LOADING_LAYER_DEFAULT_SIZE { 79, PROGRESS_SUGGESTED_HEIGHT } +#define LOADING_LAYER_DEFAULT_SIZE {79, PROGRESS_SUGGESTED_HEIGHT} typedef void (*LoadingLayerAnimCompleteCb)(void *context); diff --git a/src/fw/applib/voice/transcription_dialog.c b/src/fw/applib/voice/transcription_dialog.c index f1f94e76f4..1ef99b953f 100644 --- a/src/fw/applib/voice/transcription_dialog.c +++ b/src/fw/applib/voice/transcription_dialog.c @@ -14,10 +14,10 @@ #include "shell/system_theme.h" #include "system/passert.h" -#define SCROLL_ANIMATION_DURATION (300) +#define SCROLL_ANIMATION_DURATION (300) #define POP_WINDOW_DELAY (400) #define CHARACTER_DELAY (20) -#define TEXT_OFFSET_VERTICAL (6) +#define TEXT_OFFSET_VERTICAL (6) static void prv_show_next_character(TranscriptionDialog *transcription_dialog, int16_t to_idx) { // TODO: at the beginning of a word, check whether it's going to wrap when it's finished @@ -57,29 +57,29 @@ static void prv_set_char_index(void *subject, int16_t index) { prv_show_next_character(transcription_dialog, index); Dialog *dialog = expandable_dialog_get_dialog((ExpandableDialog *)transcription_dialog); - ScrollLayer *scroll_layer = &((ExpandableDialog *) transcription_dialog)->scroll_layer; + ScrollLayer *scroll_layer = &((ExpandableDialog *)transcription_dialog)->scroll_layer; TextLayer *text_layer = &dialog->text_layer; - const GSize size = text_layer_get_content_size(graphics_context_get_current_context(), - text_layer); + const GSize size = + text_layer_get_content_size(graphics_context_get_current_context(), text_layer); const uint16_t font_height = fonts_get_font_height(text_layer->font); - text_layer_set_size(text_layer, (GSize) { text_layer->layer.frame.size.w, size.h + font_height }); + text_layer_set_size(text_layer, (GSize){text_layer->layer.frame.size.w, size.h + font_height}); const GSize scroll_size = scroll_layer_get_content_size(scroll_layer); const int16_t new_height = size.h + TEXT_OFFSET_VERTICAL; if (scroll_size.h != new_height) { const GRect *bounds = &scroll_layer_get_layer(scroll_layer)->bounds; - GPoint offset = { .y = bounds->size.h - new_height }; + GPoint offset = {.y = bounds->size.h - new_height}; #if PBL_ROUND // do paging on round display offset.y = ROUND_TO_MOD_CEIL(offset.y, scroll_layer->layer.frame.size.h); #endif scroll_layer_set_content_size(scroll_layer, - (GSize) { scroll_layer->layer.frame.size.w, new_height }); + (GSize){scroll_layer->layer.frame.size.w, new_height}); scroll_layer_set_content_offset(scroll_layer, offset, true /* animated */); animation_set_duration(property_animation_get_animation(scroll_layer->animation), - SCROLL_ANIMATION_DURATION); + SCROLL_ANIMATION_DURATION); } layer_mark_dirty((Layer *)text_layer); @@ -87,12 +87,11 @@ static void prv_set_char_index(void *subject, int16_t index) { static void prv_start_text_animation(TranscriptionDialog *transcription_dialog) { static const PropertyAnimationImplementation animated_text_len = { - .base = { - .update = (AnimationUpdateImplementation) property_animation_update_int16, - }, - .accessors = { - .setter = { .int16 = prv_set_char_index } - } + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_int16, + }, + .accessors = {.setter = {.int16 = prv_set_char_index}} }; Dialog *dialog = expandable_dialog_get_dialog((ExpandableDialog *)transcription_dialog); @@ -110,8 +109,8 @@ static void prv_start_text_animation(TranscriptionDialog *transcription_dialog) } } - transcription_dialog->animation = property_animation_create(&animated_text_len, - transcription_dialog, NULL, NULL); + transcription_dialog->animation = + property_animation_create(&animated_text_len, transcription_dialog, NULL, NULL); if (!transcription_dialog->animation) { return; } @@ -183,12 +182,12 @@ static void prv_transcription_dialog_select_handler(ClickRecognizerRef recognize } } - transcription_dialog->pop_timer = app_timer_register(POP_WINDOW_DELAY, - prv_transcription_dialog_select_cb, transcription_dialog); + transcription_dialog->pop_timer = app_timer_register( + POP_WINDOW_DELAY, prv_transcription_dialog_select_cb, transcription_dialog); } -void transcription_dialog_update_text(TranscriptionDialog *transcription_dialog, - char *buffer, uint16_t buffer_len) { +void transcription_dialog_update_text(TranscriptionDialog *transcription_dialog, char *buffer, + uint16_t buffer_len) { Dialog *dialog = expandable_dialog_get_dialog((ExpandableDialog *)transcription_dialog); transcription_dialog->buffer_len = buffer_len; @@ -217,8 +216,8 @@ void transcription_dialog_pop(TranscriptionDialog *transcription_dialog) { } void transcription_dialog_set_callback(TranscriptionDialog *transcription_dialog, - TranscriptionConfirmationCallback callback, - void *callback_context) { + TranscriptionConfirmationCallback callback, + void *callback_context) { PBL_ASSERTN(transcription_dialog); transcription_dialog->callback = callback; transcription_dialog->callback_context = callback_context; @@ -247,13 +246,16 @@ void transcription_dialog_init(TranscriptionDialog *transcription_dialog) { expandable_dialog_set_body_font((ExpandableDialog *)transcription_dialog, system_theme_get_font(TextStyleFont_Body)); expandable_dialog_set_select_action((ExpandableDialog *)transcription_dialog, - RESOURCE_ID_ACTION_BAR_ICON_CHECK, prv_transcription_dialog_select_handler); + RESOURCE_ID_ACTION_BAR_ICON_CHECK, + prv_transcription_dialog_select_handler); Dialog *dialog = expandable_dialog_get_dialog((ExpandableDialog *)transcription_dialog); - dialog_set_callbacks(dialog, &(DialogCallbacks) { - .unload = prv_transcription_dialog_unload, - .load = prv_transcription_dialog_load - }, transcription_dialog); + dialog_set_callbacks(dialog, + &(DialogCallbacks){ + .unload = prv_transcription_dialog_unload, + .load = prv_transcription_dialog_load + }, + transcription_dialog); dialog_show_status_bar_layer(dialog, true /* show status bar */); dialog_set_timeout(dialog, DIALOG_TIMEOUT_INFINITE); diff --git a/src/fw/applib/voice/transcription_dialog.h b/src/fw/applib/voice/transcription_dialog.h index 59e0dc14d4..f37e8589ee 100644 --- a/src/fw/applib/voice/transcription_dialog.h +++ b/src/fw/applib/voice/transcription_dialog.h @@ -11,7 +11,7 @@ #include //! Callback from the dialog -typedef void(*TranscriptionConfirmationCallback)(void *callback_context); +typedef void (*TranscriptionConfirmationCallback)(void *callback_context); typedef struct TranscriptionDialog { ExpandableDialog e_dialog; @@ -62,7 +62,7 @@ void transcription_dialog_pop(TranscriptionDialog *transcription_dialog); //! @param transcription The text to display //! @param transcription_len The length of the text in the transcription void transcription_dialog_update_text(TranscriptionDialog *transcription_dialog, - char *transcription, uint16_t transcription_len); + char *transcription, uint16_t transcription_len); //! Sets the callback that is called if the user confirms that the text //! being displayed is what they intended. diff --git a/src/fw/applib/voice/voice_window.c b/src/fw/applib/voice/voice_window.c index 6d15e3c3b6..6651c78466 100644 --- a/src/fw/applib/voice/voice_window.c +++ b/src/fw/applib/voice/voice_window.c @@ -30,7 +30,7 @@ #include "applib/ui/kino/kino_reel/unfold.h" #include "applib/ui/text_layer.h" #include "applib/ui/scroll_layer.h" -#if (0) // https://pebbletechnology.atlassian.net/browse/PBL-20406 +#if (0) // https://pebbletechnology.atlassian.net/browse/PBL-20406 #include "applib/ui/vibes.h" #endif #include "kernel/ui/kernel_ui.h" @@ -49,22 +49,22 @@ #include // TODO: -// mic hot before showing screen - needs robust beginning-of-speech detection - https://pebbletechnology.atlassian.net/browse/PBL-16474 -// animated microphone icon - https://pebbletechnology.atlassian.net/browse/PBL-16481 -// handle line wrapping - https://pebbletechnology.atlassian.net/browse/PBL-16475 -// Brief vibration just before microphone is turned on https://pebbletechnology.atlassian.net/browse/PBL-20406 +// mic hot before showing screen - needs robust beginning-of-speech detection - +// https://pebbletechnology.atlassian.net/browse/PBL-16474 animated microphone icon - +// https://pebbletechnology.atlassian.net/browse/PBL-16481 handle line wrapping - +// https://pebbletechnology.atlassian.net/browse/PBL-16475 Brief vibration just before microphone is +// turned on https://pebbletechnology.atlassian.net/browse/PBL-20406 - -#define DICTATION_TIMEOUT (15 * 1000) // 15s timeout for each dictation +#define DICTATION_TIMEOUT (15 * 1000) // 15s timeout for each dictation #define SPEECH_DETECTION_TIMEOUT (3 * 1000) // Session must last at least 600ms before reporting an error to the user #define MIN_ELAPSED_DURATION (600) #define TEXT_PADDING (4) -#define MIC_DOT_MAX_RADIUS (9) +#define MIC_DOT_MAX_RADIUS (9) #define MIC_DOT_LAYER_RADIUS (MIC_DOT_MAX_RADIUS + 1) -#define MIC_DOT_LAYER_SIZE ((GSize){ .w = MIC_DOT_LAYER_RADIUS * 2, .h = MIC_DOT_LAYER_RADIUS * 2}) +#define MIC_DOT_LAYER_SIZE ((GSize){.w = MIC_DOT_LAYER_RADIUS * 2, .h = MIC_DOT_LAYER_RADIUS * 2}) #define MAX_MESSAGE_LEN (500) @@ -78,8 +78,7 @@ static void prv_start_dictation(VoiceUiData *data); static void prv_stop_dictation(VoiceUiData *data); static void prv_cancel_dictation(VoiceUiData *data); static void prv_set_mic_window_state(VoiceUiData *data, VoiceUiState state); -static PropertyAnimation *prv_create_int16_prop_anim(int16_t from, int16_t to, - uint32_t duration, +static PropertyAnimation *prv_create_int16_prop_anim(int16_t from, int16_t to, uint32_t duration, const PropertyAnimationImplementation *impl, void *subject); static void prv_handle_stop_transition(VoiceUiData *data); @@ -87,8 +86,6 @@ static void prv_voice_window_push(VoiceUiData *data); char *sys_voice_get_transcription_from_event(PebbleVoiceServiceEvent *e, char *buffer, size_t buffer_size, size_t *sentence_len); - - static WindowStack *prv_get_window_stack(void) { if (pebble_task_get_current() == PebbleTask_App) { return app_state_get_window_stack(); @@ -96,7 +93,6 @@ static WindowStack *prv_get_window_stack(void) { return modal_manager_get_window_stack(ModalPriorityVoice); } - static void prv_window_push(Window *window) { window_stack_push(prv_get_window_stack(), window, true /* animated */); } @@ -124,12 +120,12 @@ static void prv_exit_and_send_result_event(VoiceUiData *data, DictationSessionSt PBL_LOG_DBG("Send result"); PebbleEvent event = { - .type = PEBBLE_DICTATION_EVENT, - .dictation = { - .result = result, - .text = (result == DictationSessionStatusSuccess) ? data->message : NULL, - .timestamp = (result == DictationSessionStatusSuccess) ? data->timestamp : 0, - } + .type = PEBBLE_DICTATION_EVENT, + .dictation = { + .result = result, + .text = (result == DictationSessionStatusSuccess) ? data->message : NULL, + .timestamp = (result == DictationSessionStatusSuccess) ? data->timestamp : 0, + } }; sys_send_pebble_event_to_kernel(&event); @@ -154,10 +150,12 @@ static void prv_error_dialog_unload(void *context) { } static void prv_init_dialog(VoiceUiData *data, Dialog *dialog, const char *text, - uint32_t resource_id, bool has_timeout, GColor color) { - dialog_set_callbacks(dialog, &(DialogCallbacks) { - .unload = prv_error_dialog_unload, - }, data); + uint32_t resource_id, bool has_timeout, GColor color) { + dialog_set_callbacks(dialog, + &(DialogCallbacks){ + .unload = prv_error_dialog_unload, + }, + data); sys_i18n_get_with_buffer(text, data->error_text_buffer, sizeof(data->error_text_buffer)); dialog_set_text(dialog, data->error_text_buffer); dialog_set_icon(dialog, resource_id); @@ -167,7 +165,7 @@ static void prv_init_dialog(VoiceUiData *data, Dialog *dialog, const char *text, } static void prv_push_error_dialog(VoiceUiData *data, const char *text, uint32_t resource_id, - GColor color) { + GColor color) { prv_set_mic_window_state(data, StateError); SimpleDialog *simple_dialog = &data->short_error_dialog; @@ -177,8 +175,8 @@ static void prv_push_error_dialog(VoiceUiData *data, const char *text, uint32_t simple_dialog_push(simple_dialog, prv_get_window_stack()); } -static void prv_push_long_error_dialog(VoiceUiData *data, const char* header, const char *text, - uint32_t resource_id) { +static void prv_push_long_error_dialog(VoiceUiData *data, const char *header, const char *text, + uint32_t resource_id) { prv_set_mic_window_state(data, StateError); ExpandableDialog *long_error_dialog = &data->long_error_dialog; @@ -200,8 +198,7 @@ static void prv_show_error_dialog(VoiceUiData *data, const char *msg) { if (data->error_count == MAX_ERROR_COUNT) { data->error_exit_status = DictationSessionStatusFailureSystemAborted; prv_push_final_error_dialog(data); - } - else { + } else { const GColor dialog_bg_color = PBL_IF_COLOR_ELSE(GColorLightGray, GColorWhite); prv_push_error_dialog(data, msg, RESOURCE_ID_GENERIC_WARNING_LARGE, dialog_bg_color); } @@ -215,7 +212,7 @@ static void prv_show_generic_error_dialog(VoiceUiData *data) { } static void prv_show_connectivity_error_and_exit(VoiceUiData *data) { - data->error_count = MAX_ERROR_COUNT; // exit UI after the dialog is shown + data->error_count = MAX_ERROR_COUNT; // exit UI after the dialog is shown if (data->show_error_dialog) { const GColor dialog_bg_color = PBL_IF_COLOR_ELSE(GColorLightGray, GColorWhite); prv_push_error_dialog(data, i18n_noop("No internet connection"), @@ -293,8 +290,8 @@ static void prv_handle_ready_event(VoiceUiData *data, PebbleVoiceServiceEvent *e PBL_LOG_DBG("Session setup successfully"); data->start_ms = prv_get_time_ms(); data->speech_detected = false; - data->dictation_timeout = app_timer_register(DICTATION_TIMEOUT, prv_dictation_timeout_cb, - data); + data->dictation_timeout = + app_timer_register(DICTATION_TIMEOUT, prv_dictation_timeout_cb, data); // Update UI prv_set_mic_window_state(data, StateRecording); @@ -309,10 +306,11 @@ static void prv_handle_ready_event(VoiceUiData *data, PebbleVoiceServiceEvent *e case VoiceStatusErrorDisabled: // This should happen before loading the window, but we currently do not have a mechanism to // tell the watch whether or not voice reply is enabled - data->error_count = MAX_ERROR_COUNT; // exit UI after the dialog is shown + data->error_count = MAX_ERROR_COUNT; // exit UI after the dialog is shown if (data->show_error_dialog) { - prv_push_long_error_dialog(data, NULL, i18n_noop("Enable voice in the settings page of the Pebble app."), - RESOURCE_ID_GENERIC_WARNING_TINY); + prv_push_long_error_dialog( + data, NULL, i18n_noop("Enable voice in the settings page of the Pebble app."), + RESOURCE_ID_GENERIC_WARNING_TINY); data->error_exit_status = DictationSessionStatusFailureDisabled; } else { prv_exit_and_send_result_event(data, DictationSessionStatusFailureDisabled); @@ -339,7 +337,7 @@ static bool prv_handle_dictation_success(VoiceUiData *data, PebbleVoiceServiceEv data->message = NULL; } data->message = sys_voice_get_transcription_from_event(event, data->message, data->buffer_size, - &data->message_len); + &data->message_len); if (data->session_type == VoiceEndpointSessionTypeNLP) { data->timestamp = event->data->timestamp; } @@ -400,7 +398,7 @@ static void prv_handle_dictation_result(VoiceUiData *data, PebbleVoiceServiceEve break; case VoiceStatusErrorGeneric: - PBL_LOG_DBG("Result: error %"PRId8, event->status); + PBL_LOG_DBG("Result: error %" PRId8, event->status); prv_handle_dictation_error(data, event->status); break; @@ -434,31 +432,32 @@ static void prv_handle_dictation_result(VoiceUiData *data, PebbleVoiceServiceEve // Only use stable state for determining how to handle input events and voice service events static VoiceUiState prv_get_simple_state(VoiceUiState state) { static const VoiceUiState state_map[] = { - StateStart, - StateWaitForReady, // StateStartWaitForReady - StateWaitForReady, - StateRecording, - StateWaitForResponse, // StateStopRecording - StateWaitForResponse, - StateTransitionToText, // StateStopWaitForResponse - StateTransitionToText, - StateError, - StateFinished, - StateExiting, + StateStart, + StateWaitForReady, // StateStartWaitForReady + StateWaitForReady, + StateRecording, + StateWaitForResponse, // StateStopRecording + StateWaitForResponse, + StateTransitionToText, // StateStopWaitForResponse + StateTransitionToText, + StateError, + StateFinished, + StateExiting, }; - _Static_assert(StateExiting < ARRAY_LENGTH(state_map), "The number of states has grown, but state" - "the simple state mapping has not been updated"); + _Static_assert(StateExiting < ARRAY_LENGTH(state_map), + "The number of states has grown, but state" + "the simple state mapping has not been updated"); PBL_ASSERTN(state < ARRAY_LENGTH(state_map)); return state_map[state]; } static void prv_voice_event_handler(PebbleEvent *e, void *context) { - PebbleVoiceServiceEvent *event = (PebbleVoiceServiceEvent *) e; + PebbleVoiceServiceEvent *event = (PebbleVoiceServiceEvent *)e; VoiceUiData *data = context; VoiceUiState simple_state = prv_get_simple_state(data->state); - PBL_LOG_DBG("Event received: %"PRIu8"; state:%"PRIu8, event->type, simple_state); + PBL_LOG_DBG("Event received: %" PRIu8 "; state:%" PRIu8, event->type, simple_state); switch (simple_state) { case StateWaitForReady: if (event->type == VoiceEventTypeSessionSetup) { @@ -540,12 +539,12 @@ static void prv_cancel_dictation(VoiceUiData *data) { // Microphone Window /////////////////////////////////////////////////////////////////////////// -#if (0) // https://pebbletechnology.atlassian.net/browse/PBL-20406 +#if (0) // https://pebbletechnology.atlassian.net/browse/PBL-20406 static void prv_short_vibe(void) { - static const uint32_t VIBE_DURATIONS[] = { 50 }; + static const uint32_t VIBE_DURATIONS[] = {50}; VibePattern pattern = { - .durations = VIBE_DURATIONS, - .num_segments = ARRAY_LENGTH(VIBE_DURATIONS), + .durations = VIBE_DURATIONS, + .num_segments = ARRAY_LENGTH(VIBE_DURATIONS), }; vibes_enqueue_custom_pattern(pattern); } @@ -565,11 +564,9 @@ static void prv_set_dot_width(void *subject, int16_t radius) { layer_mark_dirty(&data->mic_window.mic_dot_layer); } -static PropertyAnimation *prv_create_int16_prop_anim(int16_t from, int16_t to, - uint32_t duration, +static PropertyAnimation *prv_create_int16_prop_anim(int16_t from, int16_t to, uint32_t duration, const PropertyAnimationImplementation *impl, void *subject) { - PropertyAnimation *anim = property_animation_create(impl, subject, NULL, NULL); if (!anim) { return NULL; @@ -577,26 +574,27 @@ static PropertyAnimation *prv_create_int16_prop_anim(int16_t from, int16_t to, property_animation_set_from_int16(anim, &from); property_animation_set_to_int16(anim, &to); - animation_set_duration((Animation *) anim, duration); - animation_set_curve((Animation *) anim, AnimationCurveEaseInOut); + animation_set_duration((Animation *)anim, duration); + animation_set_curve((Animation *)anim, AnimationCurveEaseInOut); return anim; } - static const PropertyAnimationImplementation s_animated_dot_impl = { - .base = { - .update = (AnimationUpdateImplementation) property_animation_update_int16, - }, + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_int16, + }, .accessors = { - .setter = { .int16 = prv_set_dot_width, }, + .setter = { + .int16 = prv_set_dot_width, + }, }, - }; +}; static Animation *prv_create_pulse_dot_anim(VoiceUiData *data, int16_t min, int16_t max, int16_t overshoot, uint32_t delay_duration, uint32_t pulse_duration) { - uint32_t stage_duration = (pulse_duration / 3); // Declare these here so that if we goto cleanup, then the variables are initialized @@ -605,28 +603,28 @@ static Animation *prv_create_pulse_dot_anim(VoiceUiData *data, int16_t min, int1 PropertyAnimation *revert = NULL; // Do the overshoot animation first - expand = prv_create_int16_prop_anim(max, overshoot + max, stage_duration, &s_animated_dot_impl, - data); + expand = + prv_create_int16_prop_anim(max, overshoot + max, stage_duration, &s_animated_dot_impl, data); if (!expand) { goto cleanup; } - animation_set_delay((Animation *) expand, delay_duration); + animation_set_delay((Animation *)expand, delay_duration); // If overshoot > 0 shrink to min size, otherwise shrink from max to min int16_t current_size = (overshoot != 0) ? overshoot + max : max; - shrink = prv_create_int16_prop_anim(current_size, min, stage_duration, &s_animated_dot_impl, - data); + shrink = + prv_create_int16_prop_anim(current_size, min, stage_duration, &s_animated_dot_impl, data); if (!shrink) { goto cleanup; } - revert = prv_create_int16_prop_anim(min, max, stage_duration, &s_animated_dot_impl, data); + revert = prv_create_int16_prop_anim(min, max, stage_duration, &s_animated_dot_impl, data); if (!revert) { goto cleanup; } - Animation *sequence = animation_sequence_create((Animation *)expand, (Animation *)shrink, - (Animation *) revert, NULL); + Animation *sequence = animation_sequence_create((Animation *)expand, (Animation *)shrink, + (Animation *)revert, NULL); if (!sequence) { goto cleanup; @@ -671,7 +669,7 @@ static void prv_show_unfold_animation(VoiceUiData *data, bool is_reversed) { if (!reel) { return; } - layer_set_hidden((Layer *) &data->mic_window.icon_layer, false); + layer_set_hidden((Layer *)&data->mic_window.icon_layer, false); kino_layer_rewind(&data->mic_window.icon_layer); GRect from = kino_reel_transform_get_from_frame(reel); @@ -699,7 +697,7 @@ static void prv_show_unfold_animation(VoiceUiData *data, bool is_reversed) { static void prv_hide_unfold_animation(VoiceUiData *data) { kino_layer_pause(&data->mic_window.icon_layer); - layer_set_hidden((Layer *) &data->mic_window.icon_layer, true); + layer_set_hidden((Layer *)&data->mic_window.icon_layer, true); } static void prv_show_mic_dot_pulse(VoiceUiData *data) { @@ -723,8 +721,8 @@ static void prv_show_mic_dot_pulse(VoiceUiData *data) { layer_mark_dirty(&data->mic_window.mic_dot_layer); data->mic_window.mic_dot_radius = MIC_DOT_MAX_RADIUS; - data->mic_window.mic_dot_anim = prv_create_pulse_dot_anim(data, MIN_RADIUS, - MIC_DOT_MAX_RADIUS, OVERSHOOT, DELAY_DURATION, ANIMATION_DURATION); + data->mic_window.mic_dot_anim = prv_create_pulse_dot_anim( + data, MIN_RADIUS, MIC_DOT_MAX_RADIUS, OVERSHOOT, DELAY_DURATION, ANIMATION_DURATION); animation_schedule(data->mic_window.mic_dot_anim); animation_set_elapsed(data->mic_window.mic_dot_anim, START_ELAPSED); @@ -781,9 +779,11 @@ static void prv_fly_dot(VoiceUiData *data, bool fly_in) { animation_set_custom_interpolation((Animation *)anim, prv_interpolate_moook_soft); animation_set_duration((Animation *)anim, interpolate_moook_soft_duration(NUM_MOOOK_FRAMES_MID)); - animation_set_handlers((Animation *)anim, (AnimationHandlers) { - .stopped = prv_handle_animation_stop, - }, data); + animation_set_handlers((Animation *)anim, + (AnimationHandlers){ + .stopped = prv_handle_animation_stop, + }, + data); data->mic_window.fly_anim = anim; animation_schedule((Animation *)anim); @@ -805,12 +805,15 @@ static void prv_set_percent(void *subject, int16_t percent) { } static const PropertyAnimationImplementation s_progress_bar_impl = { - .base = { - .update = (AnimationUpdateImplementation) property_animation_update_int16, - }, - .accessors = { - .setter = { .int16 = prv_set_percent, }, - }, + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_int16, + }, + .accessors = { + .setter = { + .int16 = prv_set_percent, + }, + }, }; // animate the progress bar in by growing it from the left (or just show it if animated == false) @@ -825,15 +828,14 @@ static void prv_show_progress_bar(VoiceUiData *data, bool animated) { progress_layer_set_progress((ProgressLayer *)&data->mic_window.progress_bar, 0); animation_unschedule((Animation *)data->mic_window.progress_anim); - data->mic_window.progress_anim = prv_create_int16_prop_anim(0, MAX_PROGRESS_FUDGE_AMOUNT, - PROGRESS_FUDGE_DURATION, &s_progress_bar_impl, data); + data->mic_window.progress_anim = prv_create_int16_prop_anim( + 0, MAX_PROGRESS_FUDGE_AMOUNT, PROGRESS_FUDGE_DURATION, &s_progress_bar_impl, data); if (data->mic_window.progress_anim) { animation_schedule((Animation *)data->mic_window.progress_anim); } layer_set_hidden((Layer *)&data->mic_window.progress_bar, false); - loading_layer_grow(&data->mic_window.progress_bar, 0, - (animated ? ANIMATE_IN_DURATION : 0)); + loading_layer_grow(&data->mic_window.progress_bar, 0, (animated ? ANIMATE_IN_DURATION : 0)); } static void prv_progress_stop(Animation *animation, bool finished, void *context) { @@ -844,7 +846,7 @@ static void prv_progress_stop(Animation *animation, bool finished, void *context static const uint32_t SHRINK_DURATION = 200; VoiceUiData *data = context; loading_layer_shrink(&data->mic_window.progress_bar, SHRINK_DELAY, SHRINK_DURATION, - prv_handle_animation_stop, data); + prv_handle_animation_stop, data); } // shrink the progress bar from the left after animating the progress % to 100% @@ -855,11 +857,13 @@ static void prv_shrink_progress_bar(VoiceUiData *data) { uint32_t duration = MAX_PROGRESS_PERCENT - progress; data->mic_window.progress_anim = prv_create_int16_prop_anim(progress, MAX_PROGRESS_PERCENT, - duration, &s_progress_bar_impl, data); + duration, &s_progress_bar_impl, data); // use a stopped handler instead of a sequence animation because we need to be able to stop - animation_set_handlers((Animation *)data->mic_window.progress_anim, (AnimationHandlers) { - .stopped = prv_progress_stop, - }, data); + animation_set_handlers((Animation *)data->mic_window.progress_anim, + (AnimationHandlers){ + .stopped = prv_progress_stop, + }, + data); animation_schedule((Animation *)data->mic_window.progress_anim); } @@ -895,12 +899,12 @@ static void prv_back_click_config_provider(void *context) { static void prv_enable_select_click(VoiceUiData *data) { window_set_click_config_provider_with_context(&data->mic_window.window, - prv_back_select_click_config_provider, data); + prv_back_select_click_config_provider, data); } static void prv_disable_select_click(VoiceUiData *data) { window_set_click_config_provider_with_context(&data->mic_window.window, - prv_back_click_config_provider, data); + prv_back_click_config_provider, data); } static void prv_hide_progress_bar(VoiceUiData *data) { @@ -969,10 +973,9 @@ static VoiceUiState prv_get_next_state(VoiceUiState current_state, VoiceUiState return next_state; } - PBL_ASSERT(current_state != next_state, "Trying to transition to the same state %d", - next_state); + PBL_ASSERT(current_state != next_state, "Trying to transition to the same state %d", next_state); - PBL_ASSERTN(next_state != StateStart); // Cannot transition to start state + PBL_ASSERTN(next_state != StateStart); // Cannot transition to start state PBL_LOG_DBG("Transition: Current state: %d; new state: %d", current_state, next_state); @@ -980,9 +983,7 @@ static VoiceUiState prv_get_next_state(VoiceUiState current_state, VoiceUiState *defer_transition = false; // These transitions are always valid - if ((next_state == StateFinished) || - (next_state == StateExiting) || - (next_state == StateError)) { + if ((next_state == StateFinished) || (next_state == StateExiting) || (next_state == StateError)) { return next_state; } @@ -1063,8 +1064,8 @@ static VoiceUiState prv_get_next_state(VoiceUiState current_state, VoiceUiState // No valid transition found! - PBL_CROAK("Cannot transition from state %"PRIu16" to state %"PRIu16, - current_state, next_state); + PBL_CROAK("Cannot transition from state %" PRIu16 " to state %" PRIu16, current_state, + next_state); } // This handles all the microphone UI transitions @@ -1088,7 +1089,7 @@ static void prv_do_transition(VoiceUiData *data, VoiceUiState state) { case StateRecording: // vibe briefly, enable clicking to end the transcription, unfold the mic from a dot // and show text -#if (0) // https://pebbletechnology.atlassian.net/browse/PBL-20406 +#if (0) // https://pebbletechnology.atlassian.net/browse/PBL-20406 prv_short_vibe(); #endif prv_enable_select_click(data); @@ -1179,17 +1180,16 @@ static void prv_mic_window_load(Window *window) { static const int16_t TEXT_LAYER_Y_OFFSET = 50; TextLayer *text_layer = &data->mic_window.text_layer; - text_layer_init_with_parameters(text_layer, - &GRect(0, dot_frame.origin.y + TEXT_LAYER_Y_OFFSET, - root_frame->size.w, font_height * 2), - NULL, font, - GColorBlack, window_bg_color, GTextAlignmentCenter, - GTextOverflowModeTrailingEllipsis); + text_layer_init_with_parameters( + text_layer, + &GRect(0, dot_frame.origin.y + TEXT_LAYER_Y_OFFSET, root_frame->size.w, font_height * 2), + NULL, font, GColorBlack, window_bg_color, GTextAlignmentCenter, + GTextOverflowModeTrailingEllipsis); layer_add_child(root_layer, (Layer *)text_layer); layer_set_hidden((Layer *)text_layer, true); static const int16_t LOADING_FRAME_OFFSET_Y = 27; - GRect loading_frame = (GRect) { .size = LOADING_LAYER_DEFAULT_SIZE }; + GRect loading_frame = (GRect){.size = LOADING_LAYER_DEFAULT_SIZE}; grect_align(&loading_frame, root_frame, GAlignCenter, false); loading_frame.origin.y += LOADING_FRAME_OFFSET_Y; @@ -1206,18 +1206,15 @@ static void prv_mic_window_load(Window *window) { status_bar_layer_init(status_bar); const GColor status_bg_color = PBL_IF_COLOR_ELSE(GColorLightGray, GColorWhite); status_bar_layer_set_colors(status_bar, status_bg_color, GColorBlack); - layer_add_child(root_layer, (Layer *) status_bar); + layer_add_child(root_layer, (Layer *)status_bar); - KinoReel *image = kino_reel_create_with_resource_system(SYSTEM_APP, - RESOURCE_ID_VOICE_MICROPHONE_LARGE); + KinoReel *image = + kino_reel_create_with_resource_system(SYSTEM_APP, RESOURCE_ID_VOICE_MICROPHONE_LARGE); PBL_ASSERTN(image); GSize icon_size = kino_reel_get_size(image); // Center the icon resting position in the window - GRect icon_frame = (GRect) { - .size.w = icon_size.w, - .size.h = icon_size.h - }; + GRect icon_frame = (GRect){.size.w = icon_size.w, .size.h = icon_size.h}; grect_align(&icon_frame, root_frame, GAlignCenter, false); static const int16_t UNFOLD_BOUNCE_AMOUNT = 10; @@ -1225,13 +1222,14 @@ static void prv_mic_window_load(Window *window) { int16_t dot_size = data->mic_window.mic_dot_radius * 2; GRect icon_from = { - .size = { dot_size, dot_size }, + .size = {dot_size, dot_size}, }; grect_align(&icon_from, &icon_frame, GAlignCenter, false); const bool take_ownership = true; - KinoReel *icon_reel = kino_reel_unfold_create(image, take_ownership, icon_frame, 0, - UNFOLD_DEFAULT_NUM_DELAY_GROUPS, UNFOLD_DEFAULT_GROUP_DELAY); + KinoReel *icon_reel = + kino_reel_unfold_create(image, take_ownership, icon_frame, 0, UNFOLD_DEFAULT_NUM_DELAY_GROUPS, + UNFOLD_DEFAULT_GROUP_DELAY); if (icon_reel) { kino_reel_transform_set_from_frame(icon_reel, icon_from); @@ -1243,19 +1241,21 @@ static void prv_mic_window_load(Window *window) { // do not clip bounds of window - animated icon will be hidden when it's not within the // visible bounds kino_layer_set_reel(&data->mic_window.icon_layer, icon_reel, true); - kino_layer_set_callbacks(&data->mic_window.icon_layer, (KinoLayerCallbacks) { - .did_stop = prv_kino_reel_stopped_handler, - }, data); + kino_layer_set_callbacks(&data->mic_window.icon_layer, + (KinoLayerCallbacks){ + .did_stop = prv_kino_reel_stopped_handler, + }, + data); layer_add_child(root_layer, (Layer *)&data->mic_window.icon_layer); layer_set_hidden((Layer *)&data->mic_window.icon_layer, true); } else { kino_reel_destroy(image); } - data->voice_event_sub = (EventServiceInfo) { - .type = PEBBLE_VOICE_SERVICE_EVENT, - .handler = prv_voice_event_handler, - .context = data + data->voice_event_sub = (EventServiceInfo){ + .type = PEBBLE_VOICE_SERVICE_EVENT, + .handler = prv_voice_event_handler, + .context = data }; event_service_client_subscribe(&data->voice_event_sub); @@ -1299,12 +1299,12 @@ static void prv_mic_window_appear(Window *window) { static void prv_voice_window_push(VoiceUiData *data) { Window *window = &data->mic_window.window; window_init(window, WINDOW_NAME("Voice Window")); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_mic_window_load, - .unload = prv_mic_window_unload, - .appear = prv_mic_window_appear, - .disappear = prv_mic_window_disappear - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_mic_window_load, + .unload = prv_mic_window_unload, + .appear = prv_mic_window_appear, + .disappear = prv_mic_window_disappear + }); window_set_user_data(window, data); prv_window_push(window); @@ -1322,13 +1322,13 @@ VoiceWindow *voice_window_create(char *buffer, size_t buffer_size, if (!data) { return NULL; } - *data = (VoiceUiData) { - .state = StateStart, - .show_confirmation_dialog = true, - .show_error_dialog = true, - .message = buffer, - .buffer_size = buffer_size, - .session_type = session_type, + *data = (VoiceUiData){ + .state = StateStart, + .show_confirmation_dialog = true, + .show_error_dialog = true, + .message = buffer, + .buffer_size = buffer_size, + .session_type = session_type, }; return data; @@ -1422,7 +1422,6 @@ void voice_window_reset(VoiceWindow *voice_window) { DEFINE_SYSCALL(char *, sys_voice_get_transcription_from_event, PebbleVoiceServiceEvent *e, char *buffer, size_t buffer_size, size_t *sentence_len) { - if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(e, sizeof(*e)); if (buffer && (buffer_size > 0)) { @@ -1463,10 +1462,9 @@ DEFINE_SYSCALL(char *, sys_voice_get_transcription_from_event, PebbleVoiceServic } memcpy(sentence, e->data->sentence, len); - sentence[len] = '\0'; // Ensure that string is NULL-terminated + sentence[len] = '\0'; // Ensure that string is NULL-terminated *sentence_len = len; return sentence; } - diff --git a/src/fw/applib/voice/voice_window_private.h b/src/fw/applib/voice/voice_window_private.h index 6d075c0f1e..528340126a 100644 --- a/src/fw/applib/voice/voice_window_private.h +++ b/src/fw/applib/voice/voice_window_private.h @@ -24,14 +24,14 @@ #include typedef enum { - StateStart, // Start state. Nothing happens - StateStartWaitForReady, // Dot flies in - StateWaitForReady, // Progress bar shows and animates, dot pulses - StateRecording, // Microphone unfolds and text appears - StateStopRecording, // Microphone folds up again and text disappears - StateWaitForResponse, // Dot pulses, progress bar shown - StateStopWaitForResponse, // Progress bar shrinks - StateTransitionToText, // Dot flies out, text window pushed + StateStart, // Start state. Nothing happens + StateStartWaitForReady, // Dot flies in + StateWaitForReady, // Progress bar shows and animates, dot pulses + StateRecording, // Microphone unfolds and text appears + StateStopRecording, // Microphone folds up again and text disappears + StateWaitForResponse, // Dot pulses, progress bar shown + StateStopWaitForResponse, // Progress bar shrinks + StateTransitionToText, // Dot flies out, text window pushed StateError, StateFinished, StateExiting, @@ -45,14 +45,14 @@ typedef struct VoiceUiData { Layer mic_dot_layer; int16_t mic_dot_radius; TextLayer text_layer; - char text_buffer[20]; // Larger than needed because i18n + char text_buffer[20]; // Larger than needed because i18n StatusBarLayer status_bar; LoadingLayer progress_bar; PropertyAnimation *progress_anim; PropertyAnimation *fly_anim; } mic_window; - union{ + union { TranscriptionDialog transcription_dialog; ExpandableDialog long_error_dialog; SimpleDialog short_error_dialog; diff --git a/src/fw/applib/worker.c b/src/fw/applib/worker.c index 9ccbb884b3..0ee4e7b1c6 100644 --- a/src/fw/applib/worker.c +++ b/src/fw/applib/worker.c @@ -8,9 +8,8 @@ #include "syscall/syscall.h" #include - // ------------------------------------------------------------------------------------------------- -static bool prv_handle_event(PebbleEvent* event) { +static bool prv_handle_event(PebbleEvent *event) { PebbleEventType type = event->type; switch (type) { @@ -24,7 +23,6 @@ static bool prv_handle_event(PebbleEvent* event) { } } - // ------------------------------------------------------------------------------------------------- void worker_event_loop(void) { // Event loop: @@ -47,9 +45,7 @@ void worker_event_loop(void) { } } - // ------------------------------------------------------------------------------------------------- void worker_launch_app(void) { sys_launch_app_for_worker(); } - diff --git a/src/fw/applib/worker.h b/src/fw/applib/worker.h index f9e44f7b19..c95158a0de 100644 --- a/src/fw/applib/worker.h +++ b/src/fw/applib/worker.h @@ -10,7 +10,8 @@ //! @addtogroup Worker //! @{ -//! The event loop for workers, to be used in worker's main(). Will block until the worker is ready to exit. +//! The event loop for workers, to be used in worker's main(). Will block until the worker is ready +//! to exit. //! @see \ref App void worker_event_loop(void); @@ -19,4 +20,3 @@ void worker_launch_app(void); //! @} // end addtogroup Worker //! @} // end addtogroup Foundation - diff --git a/src/fw/apps/core/panic_window.c b/src/fw/apps/core/panic_window.c index d5ee95200d..2a5e828be6 100644 --- a/src/fw/apps/core/panic_window.c +++ b/src/fw/apps/core/panic_window.c @@ -19,15 +19,23 @@ #include static const uint8_t sad_watch[] = { - 0x04, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 0 - 16 */ - 0xff, 0x0f, 0xf8, 0xff, 0xff, 0x57, 0xf5, 0xff, 0xff, 0xa7, 0xf2, 0xff, 0xff, 0x57, 0xf5, 0xff, /* bytes 16 - 32 */ - 0xff, 0xa9, 0xca, 0xff, 0xff, 0x06, 0xb0, 0xff, 0xff, 0xfe, 0xbf, 0xff, 0x7f, 0x06, 0x30, 0xff, /* bytes 32 - 48 */ - 0x7f, 0xfa, 0x2f, 0xff, 0x7f, 0xfa, 0x2f, 0xff, 0x7f, 0xaa, 0x2a, 0xff, 0xff, 0xda, 0xad, 0xff, /* bytes 48 - 64 */ - 0xff, 0xaa, 0x2a, 0xff, 0xff, 0xfa, 0x2f, 0xff, 0xff, 0xfa, 0x2f, 0xff, 0xff, 0x1a, 0x2c, 0xff, /* bytes 64 - 80 */ - 0xff, 0xea, 0xab, 0xff, 0xff, 0xfa, 0x2f, 0xff, 0xff, 0xfa, 0x2f, 0xff, 0xff, 0xfa, 0x2f, 0xff, /* bytes 80 - 96 */ - 0xff, 0x06, 0x20, 0xff, 0xff, 0xfe, 0xbf, 0xff, 0xff, 0xfe, 0xbf, 0xff, 0xff, 0x06, 0xb0, 0xff, /* bytes 96 - 112 */ - 0xff, 0xa9, 0xca, 0xff, 0xff, 0x57, 0xf5, 0xff, 0xff, 0xa7, 0xf2, 0xff, 0xff, 0x57, 0xf5, 0xff, /* bytes 112 - 128 */ - 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x04, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, + 0xff, 0xff, 0xff, 0xff, /* bytes 0 - 16 */ + 0xff, 0x0f, 0xf8, 0xff, 0xff, 0x57, 0xf5, 0xff, 0xff, 0xa7, 0xf2, 0xff, + 0xff, 0x57, 0xf5, 0xff, /* bytes 16 - 32 */ + 0xff, 0xa9, 0xca, 0xff, 0xff, 0x06, 0xb0, 0xff, 0xff, 0xfe, 0xbf, 0xff, + 0x7f, 0x06, 0x30, 0xff, /* bytes 32 - 48 */ + 0x7f, 0xfa, 0x2f, 0xff, 0x7f, 0xfa, 0x2f, 0xff, 0x7f, 0xaa, 0x2a, 0xff, + 0xff, 0xda, 0xad, 0xff, /* bytes 48 - 64 */ + 0xff, 0xaa, 0x2a, 0xff, 0xff, 0xfa, 0x2f, 0xff, 0xff, 0xfa, 0x2f, 0xff, + 0xff, 0x1a, 0x2c, 0xff, /* bytes 64 - 80 */ + 0xff, 0xea, 0xab, 0xff, 0xff, 0xfa, 0x2f, 0xff, 0xff, 0xfa, 0x2f, 0xff, + 0xff, 0xfa, 0x2f, 0xff, /* bytes 80 - 96 */ + 0xff, 0x06, 0x20, 0xff, 0xff, 0xfe, 0xbf, 0xff, 0xff, 0xfe, 0xbf, 0xff, + 0xff, 0x06, 0xb0, 0xff, /* bytes 96 - 112 */ + 0xff, 0xa9, 0xca, 0xff, 0xff, 0x57, 0xf5, 0xff, 0xff, 0xa7, 0xf2, 0xff, + 0xff, 0x57, 0xf5, 0xff, /* bytes 112 - 128 */ + 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; typedef struct PanicWindowAppData { @@ -35,7 +43,7 @@ typedef struct PanicWindowAppData { Layer layer; } PanicWindowAppData; -static void prv_update_proc(Layer* layer, GContext* ctx) { +static void prv_update_proc(Layer *layer, GContext *ctx) { graphics_context_set_compositing_mode(ctx, GCompOpAssignInverted); GBitmap sad_watch_bitmap; @@ -48,16 +56,16 @@ static void prv_update_proc(Layer* layer, GContext* ctx) { const GRect text_dest_rect = GRect(38, 108, 70, 30); char text_buffer[11]; - snprintf(text_buffer, sizeof(text_buffer), "0x%"PRIx32, launcher_panic_get_current_error()); + snprintf(text_buffer, sizeof(text_buffer), "0x%" PRIx32, launcher_panic_get_current_error()); - graphics_draw_text(ctx, text_buffer, error_code_face, - text_dest_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, text_buffer, error_code_face, text_dest_rect, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); } -static void prv_panic_reset_callback(void* data) { +static void prv_panic_reset_callback(void *data) { RebootReason reason = { - .code = RebootReasonCode_LauncherPanic, - .extra = { .value = launcher_panic_get_current_error() } + .code = RebootReasonCode_LauncherPanic, + .extra = {.value = launcher_panic_get_current_error()} }; reboot_reason_set(&reason); @@ -68,14 +76,14 @@ static void prv_panic_button_click_handler(ClickRecognizerRef recognizer, void * launcher_task_add_callback(prv_panic_reset_callback, NULL); } -static void prv_panic_click_config_provider(void* context) { +static void prv_panic_click_config_provider(void *context) { for (ButtonId button_id = BUTTON_ID_BACK; button_id < NUM_BUTTONS; ++button_id) { window_single_click_subscribe(button_id, prv_panic_button_click_handler); } } static void prv_handle_init(void) { - PanicWindowAppData* data = app_malloc_check(sizeof(PanicWindowAppData)); + PanicWindowAppData *data = app_malloc_check(sizeof(PanicWindowAppData)); app_state_set_user_data(data); services_set_runlevel(RunLevel_BareMinimum); @@ -100,17 +108,19 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* panic_app_get_app_info() { +const PebbleProcessMd *panic_app_get_app_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = s_main, - .visibility = ProcessVisibilityHidden, - // UUID: 130fb6d7-da9e-485a-87ca-a5ca4bf21912 - .uuid = {0x13, 0x0f, 0xb6, 0xd7, 0xda, 0x9e, 0x48, 0x5a, 0x87, 0xca, 0xa5, 0xca, 0x4b, 0xf2, 0x19, 0x12}, - }, - .name = "Panic App", - .run_level = ProcessAppRunLevelCritical, + .common = + { + .main_func = s_main, + .visibility = ProcessVisibilityHidden, + // UUID: 130fb6d7-da9e-485a-87ca-a5ca4bf21912 + .uuid = + {0x13, 0x0f, 0xb6, 0xd7, 0xda, 0x9e, 0x48, 0x5a, 0x87, 0xca, 0xa5, 0xca, 0x4b, + 0xf2, 0x19, 0x12}, + }, + .name = "Panic App", + .run_level = ProcessAppRunLevelCritical, }; - return (const PebbleProcessMd*) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } - diff --git a/src/fw/apps/core/panic_window.h b/src/fw/apps/core/panic_window.h index b8edde859e..8ab50e4b6d 100644 --- a/src/fw/apps/core/panic_window.h +++ b/src/fw/apps/core/panic_window.h @@ -5,5 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* panic_app_get_app_info(); - +const PebbleProcessMd *panic_app_get_app_info(); diff --git a/src/fw/apps/core/progress_ui.c b/src/fw/apps/core/progress_ui.c index 25336c0714..14b2b51a5e 100644 --- a/src/fw/apps/core/progress_ui.c +++ b/src/fw/apps/core/progress_ui.c @@ -31,8 +31,8 @@ // Used to force the progress bar to start at PROG_LAYER_START_VAL and scale // the reset of the progress between that value and MAX_PROGRESS_PERCENT #define PROG_LAYER_TRANSFORM(real_prog) \ - (PROG_LAYER_START_VAL + (real_prog * \ - (MAX_PROGRESS_PERCENT - PROG_LAYER_START_VAL) / MAX_PROGRESS_PERCENT)) + (PROG_LAYER_START_VAL + \ + (real_prog * (MAX_PROGRESS_PERCENT - PROG_LAYER_START_VAL) / MAX_PROGRESS_PERCENT)) //////////////////////////////////////////////////////////// // Data structures @@ -40,7 +40,7 @@ typedef struct { Window window; TextLayer percent_done_text_layer; - char percent_done_text_buffer[5]; //percent_done_text_buffer, - sizeof(data->percent_done_text_buffer), "%u%%", data->percent_complete); + sniprintf(data->percent_done_text_buffer, sizeof(data->percent_done_text_buffer), "%u%%", + data->percent_complete); layer_mark_dirty(&data->percent_done_text_layer.layer); } @@ -127,17 +127,15 @@ static void prv_update_progress(ProgressUIData *data) { } prv_update_progress_text(data); - progress_layer_set_progress(&data->progress_layer, - PROG_LAYER_TRANSFORM(data->percent_complete)); + progress_layer_set_progress(&data->progress_layer, PROG_LAYER_TRANSFORM(data->percent_complete)); - if ((data->progress_source != PROGRESS_UI_SOURCE_FW_UPDATE) && - (data->percent_complete >= 100)) { + if ((data->progress_source != PROGRESS_UI_SOURCE_FW_UPDATE) && (data->percent_complete >= 100)) { prv_handle_finished(data, true /* success */); } } static void prv_refresh_progress(void *data_in) { - ProgressUIData *data = (ProgressUIData*) data_in; + ProgressUIData *data = (ProgressUIData *)data_in; if (!data) { // Sanity check return; @@ -159,7 +157,7 @@ static void prv_dialog_unloaded(void *context) { data->timer = app_timer_register(10, prv_quit, data); } -static void prv_window_unload_handler(Window* window) { +static void prv_window_unload_handler(Window *window) { ProgressUIData *data = window_get_user_data(window); if (data) { i18n_free_all(data); @@ -183,10 +181,10 @@ static void prv_push_factory_reset_dialog(ProgressUIData *data) { simple_dialog_push(&data->finished_dialog, app_state_get_window_stack()); } -static void prv_window_load_handler(Window* window) { +static void prv_window_load_handler(Window *window) { ProgressUIData *data = window_get_user_data(window); - const ProgressUIAppArgs* app_args = app_manager_get_task_context()->args; + const ProgressUIAppArgs *app_args = app_manager_get_task_context()->args; data->progress_source = app_args->progress_source; if (data->progress_source == PROGRESS_UI_SOURCE_FACTORY_RESET) { @@ -195,9 +193,11 @@ static void prv_window_load_handler(Window* window) { } simple_dialog_init(&data->finished_dialog, "Update Completed Dialog"); - dialog_set_callbacks(&data->finished_dialog.dialog, &(DialogCallbacks) { - .unload = prv_dialog_unloaded, - }, data); + dialog_set_callbacks(&data->finished_dialog.dialog, + &(DialogCallbacks){ + .unload = prv_dialog_unloaded, + }, + data); dialog_set_destroy_on_pop(&data->finished_dialog.dialog, false); const int16_t load_bar_length = 108; @@ -205,19 +205,18 @@ static void prv_window_load_handler(Window* window) { const int16_t x_offset = (window->layer.bounds.size.w - load_bar_length) / 2; const int16_t y_offset_progress = (window->layer.bounds.size.h - load_bar_height) / 2; const int16_t y_offset_text = y_offset_progress - 38; - const GRect progress_bounds = GRect(x_offset, y_offset_progress, load_bar_length, load_bar_height); + const GRect progress_bounds = + GRect(x_offset, y_offset_progress, load_bar_length, load_bar_height); ProgressLayer *progress_layer = &data->progress_layer; progress_layer_init(progress_layer, &progress_bounds); progress_layer_set_corner_radius(progress_layer, 3); layer_add_child(&window->layer, &progress_layer->layer); TextLayer *percent_done_text_layer = &data->percent_done_text_layer; - text_layer_init_with_parameters(percent_done_text_layer, - &GRect(0, y_offset_text, window->layer.bounds.size.w, 30), - data->percent_done_text_buffer, - fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), - GColorBlack, GColorClear, GTextAlignmentCenter, - GTextOverflowModeTrailingEllipsis); + text_layer_init_with_parameters( + percent_done_text_layer, &GRect(0, y_offset_text, window->layer.bounds.size.w, 30), + data->percent_done_text_buffer, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), GColorBlack, + GColorClear, GTextAlignmentCenter, GTextOverflowModeTrailingEllipsis); layer_add_child(&window->layer, &percent_done_text_layer->layer); data->timer = app_timer_register(UPDATE_FREQ_MS, prv_refresh_progress, data); @@ -227,15 +226,15 @@ static void prv_window_load_handler(Window* window) { static void prv_progress_ui_window_push(void) { ProgressUIData *data = app_zalloc_check(sizeof(ProgressUIData)); - Window* window = &data->window; + Window *window = &data->window; window_init(window, WINDOW_NAME("Progress UI App")); window_set_user_data(window, data); window_set_overrides_back_button(window, true); window_set_background_color(window, PBL_IF_COLOR_ELSE(GColorLightGray, GColorWhite)); window_set_window_handlers(window, &(WindowHandlers){ - .load = prv_window_load_handler, - .unload = prv_window_unload_handler, - }); + .load = prv_window_load_handler, + .unload = prv_window_unload_handler, + }); app_window_stack_push(window, false); } @@ -257,17 +256,19 @@ static void prv_main(void) { //////////////////////////////////////////////////////////// // Public functions -const PebbleProcessMd* progress_ui_app_get_info() { +const PebbleProcessMd *progress_ui_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = &prv_main, - .visibility = ProcessVisibilityHidden, - // UUID: f29f18ac-bbec-452b-9262-49c4f6e5c920 - .uuid = {0xf2, 0x9f, 0x18, 0xac, 0xbb, 0xec, 0x45, 0x2b, - 0x92, 0x62, 0x49, 0xc4, 0xf6, 0xe5, 0xc9, 0x20}, - }, - .name = "Progress UI", - .run_level = ProcessAppRunLevelSystem, + .common = + { + .main_func = &prv_main, + .visibility = ProcessVisibilityHidden, + // UUID: f29f18ac-bbec-452b-9262-49c4f6e5c920 + .uuid = + {0xf2, 0x9f, 0x18, 0xac, 0xbb, 0xec, 0x45, 0x2b, 0x92, 0x62, 0x49, 0xc4, 0xf6, + 0xe5, 0xc9, 0x20}, + }, + .name = "Progress UI", + .run_level = ProcessAppRunLevelSystem, }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/core/progress_ui.h b/src/fw/apps/core/progress_ui.h index 15ba2de045..3855a5d584 100644 --- a/src/fw/apps/core/progress_ui.h +++ b/src/fw/apps/core/progress_ui.h @@ -16,4 +16,4 @@ typedef struct { ProgressUISource progress_source; } ProgressUIAppArgs; -const PebbleProcessMd* progress_ui_app_get_info(); +const PebbleProcessMd *progress_ui_app_get_info(); diff --git a/src/fw/apps/core/spinner_ui_window.c b/src/fw/apps/core/spinner_ui_window.c index 7d83dcccde..ffb00e6d4b 100644 --- a/src/fw/apps/core/spinner_ui_window.c +++ b/src/fw/apps/core/spinner_ui_window.c @@ -26,7 +26,6 @@ typedef struct { bool should_cancel_animation; } SpinnerUIData; - //////////////////////////////////////////////////////////// // Animation Logic @@ -39,10 +38,10 @@ typedef struct { static int prv_get_background_circle_radius(const GRect *bounds) { const int min_dimension = MIN(bounds->size.w, bounds->size.h); - return (min_dimension * 3) / (4 * 2); // 3/4 of min dimension is diameter + return (min_dimension * 3) / (4 * 2); // 3/4 of min dimension is diameter } -static void prv_draw_background_circle(Layer *layer, GContext* ctx) { +static void prv_draw_background_circle(Layer *layer, GContext *ctx) { graphics_context_set_antialiased(ctx, false); const GPoint center = grect_center_point(&layer->bounds); const int radius = prv_get_background_circle_radius(&layer->bounds); @@ -53,7 +52,7 @@ static void prv_draw_background_circle(Layer *layer, GContext* ctx) { graphics_draw_circle(ctx, center, radius); } -static void prv_draw_spinner_circles(Layer *layer, GContext* ctx) { +static void prv_draw_spinner_circles(Layer *layer, GContext *ctx) { // Drawing the circles with aa is just too slow and we end up backing up the rest of the system. // See PBL-16184 graphics_context_set_antialiased(ctx, false); @@ -64,16 +63,17 @@ static void prv_draw_spinner_circles(Layer *layer, GContext* ctx) { const unsigned int radius_of_path = bg_radius - SPINNER_CIRCLE_RADIUS; const unsigned int radius_of_spinner_circles = SPINNER_CIRCLE_RADIUS; const GPoint circle_center_point = grect_center_point(&layer->bounds); - const unsigned int angle = (TRIG_MAX_ANGLE * data->cur_distance_normalized * - LOOPS_PER_ANIMATION) / ANIMATION_NORMALIZED_MAX; + const unsigned int angle = + (TRIG_MAX_ANGLE * data->cur_distance_normalized * LOOPS_PER_ANIMATION) / + ANIMATION_NORMALIZED_MAX; const GPoint circle1_location = { - .x = (sin_lookup(angle) * radius_of_path / TRIG_MAX_RATIO) + circle_center_point.x, - .y = (-cos_lookup(angle) * radius_of_path / TRIG_MAX_RATIO) + circle_center_point.y, + .x = (sin_lookup(angle) * radius_of_path / TRIG_MAX_RATIO) + circle_center_point.x, + .y = (-cos_lookup(angle) * radius_of_path / TRIG_MAX_RATIO) + circle_center_point.y, }; const GPoint circle2_location = { - .x = (-sin_lookup(angle) * (-radius_of_path) / TRIG_MAX_RATIO) + circle_center_point.x, - .y = (-cos_lookup(angle) * (-radius_of_path) / TRIG_MAX_RATIO) + circle_center_point.y, + .x = (-sin_lookup(angle) * (-radius_of_path) / TRIG_MAX_RATIO) + circle_center_point.x, + .y = (-cos_lookup(angle) * (-radius_of_path) / TRIG_MAX_RATIO) + circle_center_point.y, }; graphics_context_set_fill_color(ctx, data->spinner_color); @@ -86,14 +86,14 @@ static void prv_draw_spinner_circles(Layer *layer, GContext* ctx) { static void prv_anim_impl(struct Animation *animation, const AnimationProgress distance_normalized) { - SpinnerUIData *data = (SpinnerUIData*) animation_get_context(animation); + SpinnerUIData *data = (SpinnerUIData *)animation_get_context(animation); // We need to artificially limit how frequent we attempt to update the screen. If we update // it too fast the thing we wanted to do in the background never gets done. This isn't quite // ideal, as around 60 steps is when things are actually smooth, but 60 is too fast and does // restrict the speed of our core dump. See PBL-16184 const uint32_t steps_per_loop = 25; - const int32_t min_delta = (ANIMATION_NORMALIZED_MAX/LOOPS_PER_ANIMATION) / steps_per_loop; + const int32_t min_delta = (ANIMATION_NORMALIZED_MAX / LOOPS_PER_ANIMATION) / steps_per_loop; if (data->cur_distance_normalized + min_delta < distance_normalized) { data->cur_distance_normalized = distance_normalized; layer_mark_dirty(&data->anim_layer); @@ -101,7 +101,7 @@ static void prv_anim_impl(struct Animation *animation, } static void prv_anim_stopped(Animation *animation, bool finished, void *context) { - SpinnerUIData *data = (SpinnerUIData*) animation_get_context(animation); + SpinnerUIData *data = (SpinnerUIData *)animation_get_context(animation); if (!data->should_cancel_animation) { data->cur_distance_normalized = 0; animation_schedule(property_animation_get_animation(data->spinner_animation)); @@ -111,7 +111,7 @@ static void prv_anim_stopped(Animation *animation, bool finished, void *context) //////////////////////////////////////////////////////////// // Window loading, unloading, initializing -static void prv_window_unload_handler(Window* window) { +static void prv_window_unload_handler(Window *window) { SpinnerUIData *data = window_get_user_data(window); if (data) { data->should_cancel_animation = true; @@ -120,7 +120,7 @@ static void prv_window_unload_handler(Window* window) { } } -static void prv_window_load_handler(Window* window) { +static void prv_window_load_handler(Window *window) { SpinnerUIData *data = window_get_user_data(window); window_set_background_color(window, PBL_IF_COLOR_ELSE(GColorLightGray, GColorWhite)); @@ -149,12 +149,12 @@ static void prv_window_load_handler(Window* window) { animation_set_auto_destroy(animation, false); AnimationHandlers anim_handler = { - .stopped = prv_anim_stopped, + .stopped = prv_anim_stopped, }; animation_set_handlers(animation, anim_handler, data); - data->spinner_anim_impl = (AnimationImplementation) { - .update = prv_anim_impl, + data->spinner_anim_impl = (AnimationImplementation){ + .update = prv_anim_impl, }; animation_set_implementation(animation, &data->spinner_anim_impl); @@ -162,21 +162,21 @@ static void prv_window_load_handler(Window* window) { } } -Window* spinner_ui_window_get(GColor spinner_color) { +Window *spinner_ui_window_get(GColor spinner_color) { SpinnerUIData *data = kernel_malloc_check(sizeof(SpinnerUIData)); *data = (SpinnerUIData){}; data->spinner_color = spinner_color; data->should_cancel_animation = false; - Window* window = &data->window; + Window *window = &data->window; window_init(window, WINDOW_NAME("Spinner UI Window")); window_set_user_data(window, data); window_set_overrides_back_button(window, true); window_set_window_handlers(window, &(WindowHandlers){ - .load = prv_window_load_handler, - .unload = prv_window_unload_handler, - }); + .load = prv_window_load_handler, + .unload = prv_window_unload_handler, + }); return window; } diff --git a/src/fw/apps/core/spinner_ui_window.h b/src/fw/apps/core/spinner_ui_window.h index 24c55f44be..2888ae81dc 100644 --- a/src/fw/apps/core/spinner_ui_window.h +++ b/src/fw/apps/core/spinner_ui_window.h @@ -10,4 +10,4 @@ // The function creates a Spinner UI window on the heap with the specified color. // The window is cleaned up when it is popped. // Returns a pointer to the created window -Window* spinner_ui_window_get(GColor spinner_color); +Window *spinner_ui_window_get(GColor spinner_color); diff --git a/src/fw/apps/demo/accel_demo/accel_demo.c b/src/fw/apps/demo/accel_demo/accel_demo.c index 4eabdb5e20..54917b53e1 100644 --- a/src/fw/apps/demo/accel_demo/accel_demo.c +++ b/src/fw/apps/demo/accel_demo/accel_demo.c @@ -36,10 +36,10 @@ typedef struct { // Selectable options. Each menu item maps by index into these tables. static const AccelSamplingRate s_rates[] = { - ACCEL_SAMPLING_10HZ, - ACCEL_SAMPLING_25HZ, - ACCEL_SAMPLING_50HZ, - ACCEL_SAMPLING_100HZ, + ACCEL_SAMPLING_10HZ, + ACCEL_SAMPLING_25HZ, + ACCEL_SAMPLING_50HZ, + ACCEL_SAMPLING_100HZ, }; static const uint32_t s_batches[] = {1, 5, 10, 25}; @@ -48,25 +48,25 @@ static void prv_rate_selected(int index, void *context); static void prv_batch_selected(int index, void *context); static const SimpleMenuItem s_rate_items[] = { - {.title = "10 Hz", .callback = prv_rate_selected}, - {.title = "25 Hz", .callback = prv_rate_selected}, - {.title = "50 Hz", .callback = prv_rate_selected}, - {.title = "100 Hz", .callback = prv_rate_selected}, + {.title = "10 Hz", .callback = prv_rate_selected}, + {.title = "25 Hz", .callback = prv_rate_selected}, + {.title = "50 Hz", .callback = prv_rate_selected}, + {.title = "100 Hz", .callback = prv_rate_selected}, }; static const SimpleMenuSection s_rate_sections[] = { - {.title = "Sample rate", .items = s_rate_items, .num_items = ARRAY_LENGTH(s_rate_items)}, + {.title = "Sample rate", .items = s_rate_items, .num_items = ARRAY_LENGTH(s_rate_items)}, }; static const SimpleMenuItem s_batch_items[] = { - {.title = "1 sample", .callback = prv_batch_selected}, - {.title = "5 samples", .callback = prv_batch_selected}, - {.title = "10 samples", .callback = prv_batch_selected}, - {.title = "25 samples", .callback = prv_batch_selected}, + {.title = "1 sample", .callback = prv_batch_selected}, + {.title = "5 samples", .callback = prv_batch_selected}, + {.title = "10 samples", .callback = prv_batch_selected}, + {.title = "25 samples", .callback = prv_batch_selected}, }; static const SimpleMenuSection s_batch_sections[] = { - {.title = "Batched samples", .items = s_batch_items, .num_items = ARRAY_LENGTH(s_batch_items)}, + {.title = "Batched samples", .items = s_batch_items, .num_items = ARRAY_LENGTH(s_batch_items)}, }; static char prv_axis_char(AccelAxisType axis) { @@ -94,8 +94,8 @@ static void prv_handle_tap(AccelAxisType axis, int32_t direction) { return; } - snprintf(data->tap_buffer, sizeof(data->tap_buffer), "Taps: %" PRIu32 "\n%c %c", - data->tap_count, prv_axis_char(axis), direction < 0 ? '-' : '+'); + snprintf(data->tap_buffer, sizeof(data->tap_buffer), "Taps: %" PRIu32 "\n%c %c", data->tap_count, + prv_axis_char(axis), direction < 0 ? '-' : '+'); text_layer_set_text(&data->tap_layer, data->tap_buffer); } @@ -129,8 +129,8 @@ static void prv_data_window_load(Window *window) { Layer *root = &window->layer; const int16_t w = root->bounds.size.w; - snprintf(data->title_buffer, sizeof(data->title_buffer), "%u Hz x%" PRIu32, - (unsigned)data->rate, data->batch); + snprintf(data->title_buffer, sizeof(data->title_buffer), "%u Hz x%" PRIu32, (unsigned)data->rate, + data->batch); text_layer_init(&data->title_layer, &GRect(0, 0, w, 24)); text_layer_set_text(&data->title_layer, data->title_buffer); layer_add_child(root, &data->title_layer.layer); @@ -240,8 +240,8 @@ static void s_main(void) { const PebbleProcessMd *accel_demo_get_info(void) { static const PebbleProcessMdSystem s_accel_demo_info = { - .common.main_func = s_main, - .name = "Accel Demo", + .common.main_func = s_main, + .name = "Accel Demo", }; return (const PebbleProcessMd *)&s_accel_demo_info; } diff --git a/src/fw/apps/demo/action_menu/action_menu_demo.c b/src/fw/apps/demo/action_menu/action_menu_demo.c index c1342bff4e..4be08bf303 100644 --- a/src/fw/apps/demo/action_menu/action_menu_demo.c +++ b/src/fw/apps/demo/action_menu/action_menu_demo.c @@ -49,77 +49,53 @@ static void prv_result_window_unload(Window *window) { /////////////////////// // Action Menu Window -static void prv_action_menu_did_close_cb(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_action_menu_did_close_cb(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { ActionMenuLevel *root_level = action_menu_get_root_level(action_menu); action_menu_hierarchy_destroy(root_level, NULL, NULL); } -static void prv_action_callback(ActionMenu *action_menu, - const ActionMenuItem *action, +static void prv_action_callback(ActionMenu *action_menu, const ActionMenuItem *action, void *context) { s_app_data->result_window = window_create(); - window_set_window_handlers(s_app_data->result_window, &(WindowHandlers) { - .load = prv_result_window_load, - .unload = prv_result_window_unload, - }); + window_set_window_handlers(s_app_data->result_window, &(WindowHandlers){ + .load = prv_result_window_load, + .unload = prv_result_window_unload, + }); action_menu_set_result_window(action_menu, s_app_data->result_window); } static void prv_select_click_handler(ClickRecognizerRef recognizer, void *context) { // First Level ActionMenuLevel *first_level = action_menu_level_create(10); - action_menu_level_add_action(first_level, - "First!", - prv_action_callback, - NULL); - action_menu_level_add_action(first_level, - "Second!", - prv_action_callback, - NULL); + action_menu_level_add_action(first_level, "First!", prv_action_callback, NULL); + action_menu_level_add_action(first_level, "Second!", prv_action_callback, NULL); // More Levels ActionMenuLevel *more_level = action_menu_level_create(1); - action_menu_level_add_action(more_level, - "That's it, folks!", - prv_action_callback, - NULL); - action_menu_level_add_child(first_level, - more_level, - "More..."); + action_menu_level_add_action(more_level, "That's it, folks!", prv_action_callback, NULL); + action_menu_level_add_child(first_level, more_level, "More..."); // Levels with multiple lines of text ActionMenuLevel *multiline_level = action_menu_level_create(5); - action_menu_level_add_action(multiline_level, - "Sorry, I can't talk right now.", - prv_action_callback, - NULL); + action_menu_level_add_action(multiline_level, "Sorry, I can't talk right now.", + prv_action_callback, NULL); action_menu_level_add_action(multiline_level, "I can't talk just now, please text me if this is an emergency.", - prv_action_callback, - NULL); + prv_action_callback, NULL); action_menu_level_add_action(multiline_level, "In a meeting, I will call you back when the meeting is over.", - prv_action_callback, - NULL); - action_menu_level_add_action(multiline_level, - "On my way, I will text you when I'm nearby.", - prv_action_callback, - NULL); - action_menu_level_add_action(multiline_level, - "I am busy.", - prv_action_callback, - NULL); - action_menu_level_add_child(first_level, - multiline_level, - "Canned Responses"); + prv_action_callback, NULL); + action_menu_level_add_action(multiline_level, "On my way, I will text you when I'm nearby.", + prv_action_callback, NULL); + action_menu_level_add_action(multiline_level, "I am busy.", prv_action_callback, NULL); + action_menu_level_add_child(first_level, multiline_level, "Canned Responses"); // Level with multi-column values of various row lengths ActionMenuLevel *multicolumn_select = action_menu_level_create(3); - static const char* thin_values[] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", - "M", "🍺" }; + static const char *thin_values[] = {"A", "B", "C", "D", "E", "F", "G", + "H", "I", "J", "K", "L", "M", "🍺"}; ActionMenuLevel *multicolumn_one = action_menu_level_create(2); action_menu_level_set_display_mode(multicolumn_one, ActionMenuLevelDisplayModeThin); for (size_t i = 0; i < 2; i++) { @@ -147,11 +123,11 @@ static void prv_select_click_handler(ClickRecognizerRef recognizer, void *contex first_level->separator_index = first_level->num_items - 1; ActionMenuConfig config = { - .root_level = first_level, - .context = NULL, - .colors.background = GColorOxfordBlue, - .colors.foreground = GColorOrange, - .did_close = prv_action_menu_did_close_cb, + .root_level = first_level, + .context = NULL, + .colors.background = GColorOxfordBlue, + .colors.foreground = GColorOrange, + .did_close = prv_action_menu_did_close_cb, }; s_app_data->action_menu = app_action_menu_open(&config); @@ -180,9 +156,9 @@ static void prv_init(void) { s_app_data = app_zalloc_check(sizeof(*s_app_data)); s_app_data->main_window = window_create(); - window_set_window_handlers(s_app_data->main_window, &(WindowHandlers) { - .load = prv_main_window_load, - }); + window_set_window_handlers(s_app_data->main_window, &(WindowHandlers){ + .load = prv_main_window_load, + }); window_set_click_config_provider(s_app_data->main_window, prv_main_window_click_config_provider); app_window_stack_push(s_app_data->main_window, true /* animated */); @@ -194,15 +170,17 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* action_menu_demo_get_app_info() { +const PebbleProcessMd *action_menu_demo_get_app_info() { static const PebbleProcessMdSystem s_app_data = { - .common = { - .main_func = s_main, - // UUID: 101a32d95-ef69-46d4-a0b9-854cc62f97f9 - .uuid = {0x99, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, - 0xa0, 0xb9, 0x85, 0x4c, 0xc6, 0x2f, 0x97, 0xf9}, - }, - .name = "Action Menu Demo", + .common = + { + .main_func = s_main, + // UUID: 101a32d95-ef69-46d4-a0b9-854cc62f97f9 + .uuid = + {0x99, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, 0xa0, 0xb9, 0x85, 0x4c, 0xc6, + 0x2f, 0x97, 0xf9}, + }, + .name = "Action Menu Demo", }; - return (const PebbleProcessMd*) &s_app_data; + return (const PebbleProcessMd *)&s_app_data; } diff --git a/src/fw/apps/demo/action_menu/action_menu_demo.h b/src/fw/apps/demo/action_menu/action_menu_demo.h index e7c267115e..673e36c965 100644 --- a/src/fw/apps/demo/action_menu/action_menu_demo.h +++ b/src/fw/apps/demo/action_menu/action_menu_demo.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* action_menu_demo_get_app_info(void); +const PebbleProcessMd *action_menu_demo_get_app_info(void); diff --git a/src/fw/apps/demo/activity_demo/activity_demo.c b/src/fw/apps/demo/activity_demo/activity_demo.c index 79a7233321..7a8ff0a2f5 100644 --- a/src/fw/apps/demo/activity_demo/activity_demo.c +++ b/src/fw/apps/demo/activity_demo/activity_demo.c @@ -32,8 +32,6 @@ typedef enum { AppPersistKeyLapSteps = 0, } AppPersistKey; - - // ------------------------------------------------------------------------------- // Structures @@ -54,8 +52,7 @@ typedef struct { static ActivityDemoAppData *s_data; // ------------------------------------------------------------------------------- -static void prv_convert_seconds_to_time(uint32_t secs_after_midnight, char *text, - int text_len) { +static void prv_convert_seconds_to_time(uint32_t secs_after_midnight, char *text, int text_len) { uint32_t minutes_after_midnight = secs_after_midnight / SECONDS_PER_MINUTE; uint32_t hour = minutes_after_midnight / MINUTES_PER_HOUR; uint32_t minute = minutes_after_midnight % MINUTES_PER_HOUR; @@ -72,7 +69,6 @@ static void prv_display_alert(const char *text) { app_expandable_dialog_push(expandable_dialog); } - // ----------------------------------------------------------------------------------------- static void prv_display_scalar_history_alert(ActivityDemoAppData *data, const char *title, ActivityMetric metric) { @@ -89,7 +85,6 @@ static void prv_display_scalar_history_alert(ActivityDemoAppData *data, const ch prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_display_averages_alert(ActivityDemoAppData *data, DayInWeek day) { ActivityMetricAverages *averages = app_malloc_check(sizeof(ActivityMetricAverages)); @@ -114,7 +109,6 @@ static void prv_display_averages_alert(ActivityDemoAppData *data, DayInWeek day) app_free(averages); } - // ----------------------------------------------------------------------------------------- static void prv_display_seconds_history_alert(ActivityDemoAppData *data, const char *title, ActivityMetric metric) { @@ -133,7 +127,6 @@ static void prv_display_seconds_history_alert(ActivityDemoAppData *data, const c prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_set_steps(int32_t steps, ActivityDemoAppData *data) { activity_test_set_steps_and_avg(steps, CURRENT_STEP_AVG, DAILY_STEP_AVG); @@ -142,11 +135,10 @@ static void prv_set_steps(int32_t steps, ActivityDemoAppData *data) { data->cur_steps = peek_steps + data->steps_offset; snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), - "Current steps changed to: %"PRIu32"\n", data->cur_steps); + "Current steps changed to: %" PRIu32 "\n", data->cur_steps); prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_tracking(int index, void *context) { ActivityDemoAppData *data = context; @@ -165,7 +157,6 @@ static void prv_debug_cmd_tracking(int index, void *context) { layer_mark_dirty(simple_menu_layer_get_layer(data->debug_card.menu_layer)); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_activity_insights(int index, void *context) { ActivityDemoAppData *data = context; @@ -178,7 +169,6 @@ static void prv_debug_cmd_activity_insights(int index, void *context) { layer_mark_dirty(simple_menu_layer_get_layer(data->debug_card.menu_layer)); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_sleep_insights(int index, void *context) { ActivityDemoAppData *data = context; @@ -191,7 +181,6 @@ static void prv_debug_cmd_sleep_insights(int index, void *context) { layer_mark_dirty(simple_menu_layer_get_layer(data->debug_card.menu_layer)); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_dls_sends(int index, void *context) { ActivityDemoAppData *data = context; @@ -204,28 +193,24 @@ static void prv_debug_cmd_dls_sends(int index, void *context) { layer_mark_dirty(simple_menu_layer_get_layer(data->debug_card.menu_layer)); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_set_steps_below_avg(int index, void *context) { ActivityDemoAppData *data = context; prv_set_steps(CURRENT_STEP_AVG - 250, data); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_set_steps_at_avg(int index, void *context) { ActivityDemoAppData *data = context; prv_set_steps(CURRENT_STEP_AVG, data); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_set_steps_above_avg(int index, void *context) { ActivityDemoAppData *data = context; prv_set_steps(CURRENT_STEP_AVG + 250, data); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_set_steps_history(int index, void *context) { ActivityDemoAppData *data = context; @@ -236,7 +221,6 @@ static void prv_debug_cmd_set_steps_history(int index, void *context) { prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_set_sleep_history(int index, void *context) { ActivityDemoAppData *data = context; @@ -247,7 +231,6 @@ static void prv_debug_cmd_set_sleep_history(int index, void *context) { prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_sleep_file_info(int index, void *context) { ActivityDemoAppData *data = context; @@ -263,7 +246,6 @@ static void prv_debug_cmd_sleep_file_info(int index, void *context) { prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_sleep_file_compact(int index, void *context) { ActivityDemoAppData *data = context; @@ -279,49 +261,42 @@ static void prv_debug_cmd_sleep_file_compact(int index, void *context) { prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_resting_calorie_history(int index, void *context) { ActivityDemoAppData *data = context; prv_display_scalar_history_alert(data, "Resting Calories", ActivityMetricRestingKCalories); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_active_calorie_history(int index, void *context) { ActivityDemoAppData *data = context; prv_display_scalar_history_alert(data, "Active Calories", ActivityMetricActiveKCalories); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_step_history(int index, void *context) { ActivityDemoAppData *data = context; prv_display_scalar_history_alert(data, "Steps", ActivityMetricStepCount); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_sleep_history(int index, void *context) { ActivityDemoAppData *data = context; prv_display_seconds_history_alert(data, "Sleep total", ActivityMetricSleepTotalSeconds); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_active_time_history(int index, void *context) { ActivityDemoAppData *data = context; prv_display_seconds_history_alert(data, "Active Time", ActivityMetricActiveSeconds); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_distance_history(int index, void *context) { ActivityDemoAppData *data = context; prv_display_scalar_history_alert(data, "Distance(m)", ActivityMetricDistanceMeters); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_sleep_sessions(int index, void *context) { ActivityDemoAppData *data = context; @@ -341,11 +316,10 @@ static void prv_debug_cmd_sleep_sessions(int index, void *context) { bool success = activity_get_sessions(&num_sessions, sessions); if (!success) { snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), - "Error getting sleep sessions"); + "Error getting sleep sessions"); goto exit; } - snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), - "Sleep sessions\n"); + snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), "Sleep sessions\n"); // Print info on each one ActivitySession *session = sessions; @@ -393,7 +367,6 @@ static void prv_debug_cmd_sleep_sessions(int index, void *context) { prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_step_sessions(int index, void *context) { ActivityDemoAppData *data = context; @@ -416,8 +389,7 @@ static void prv_debug_cmd_step_sessions(int index, void *context) { "Error getting activity sessions"); goto exit; } - snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), - "Step activities\n"); + snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), "Step activities\n"); // Print info on each one ActivitySession *session = sessions; @@ -452,33 +424,31 @@ static void prv_debug_cmd_step_sessions(int index, void *context) { safe_strcat(data->debug_card.dialog_text, temp, sizeof(data->debug_card.dialog_text)); // Write steps, calories, distance - snprintf(temp, sizeof(temp), " %"PRIu16", %"PRIu16"C, %"PRIu16"m\n", session->step_data.steps, + snprintf(temp, sizeof(temp), " %" PRIu16 ", %" PRIu16 "C, %" PRIu16 "m\n", + session->step_data.steps, session->step_data.active_kcalories + session->step_data.resting_kcalories, session->step_data.distance_meters); safe_strcat(data->debug_card.dialog_text, temp, sizeof(data->debug_card.dialog_text)); } - exit: +exit: // Free session info memory app_free(sessions); prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_weekday_averages(int index, void *context) { ActivityDemoAppData *data = context; prv_display_averages_alert(data, Monday); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_weekend_averages(int index, void *context) { ActivityDemoAppData *data = context; prv_display_averages_alert(data, Saturday); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_activity_prefs(int index, void *context) { ActivityDemoAppData *data = context; @@ -491,18 +461,24 @@ static void prv_debug_cmd_activity_prefs(int index, void *context) { uint8_t age_years = activity_prefs_get_age_years(); snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), - "activity tracking: %"PRIu8"\n" - "activity_insights: %"PRIu8"\n" - "sleep_insights: %"PRIu8"\n" - "gender: %"PRIu8"\n" - "height: %"PRIu16"\n" - "weight: %"PRIu16"\n" - "age: %"PRIu8"", tracking_enabled, activity_insights_enabled, sleep_insights_enabled, - gender, height_mm, weight_dag, age_years); + "activity tracking: %" PRIu8 + "\n" + "activity_insights: %" PRIu8 + "\n" + "sleep_insights: %" PRIu8 + "\n" + "gender: %" PRIu8 + "\n" + "height: %" PRIu16 + "\n" + "weight: %" PRIu16 + "\n" + "age: %" PRIu8 "", + tracking_enabled, activity_insights_enabled, sleep_insights_enabled, gender, height_mm, + weight_dag, age_years); prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_minute_data(int index, void *context) { ActivityDemoAppData *data = context; @@ -511,13 +487,11 @@ static void prv_debug_cmd_minute_data(int index, void *context) { const uint32_t k_size = 1000; HealthMinuteData *minute_data = app_malloc(k_size * sizeof(HealthMinuteData)); if (!minute_data) { - snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), - "Out of memory"); + snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), "Out of memory"); prv_display_alert(data->debug_card.dialog_text); goto exit; } - // Start as far back as 30 days ago time_t utc_start = rtc_get_time() - 30 * SECONDS_PER_DAY; uint32_t num_records = 0; @@ -526,13 +500,12 @@ static void prv_debug_cmd_minute_data(int index, void *context) { time_t prior_start = utc_start; success = activity_get_minute_history(minute_data, &chunk, &utc_start); if (!success) { - snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), - "Failed"); + snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), "Failed"); prv_display_alert(data->debug_card.dialog_text); goto exit; } - PBL_LOG_DBG("Got %d minutes with UTC of %d (delta of %d min)", (int)chunk, - (int)utc_start, (int)(utc_start - prior_start) / SECONDS_PER_MINUTE); + PBL_LOG_DBG("Got %d minutes with UTC of %d (delta of %d min)", (int)chunk, (int)utc_start, + (int)(utc_start - prior_start) / SECONDS_PER_MINUTE); num_records += chunk; utc_start += chunk * SECONDS_PER_MINUTE; if (chunk == 0) { @@ -544,7 +517,6 @@ static void prv_debug_cmd_minute_data(int index, void *context) { snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), "Retrieved %d minute data records", (int)num_records); - // Print detail on the last few minutes const int k_print_batch_size = k_size; PBL_LOG_DBG("Fetching last %d minutes", k_print_batch_size); @@ -553,21 +525,20 @@ static void prv_debug_cmd_minute_data(int index, void *context) { uint32_t chunk = k_print_batch_size; success = activity_get_minute_history(minute_data, &chunk, &utc_start); if (!success) { - snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), - "Failed"); + snprintf(data->debug_card.dialog_text, sizeof(data->debug_card.dialog_text), "Failed"); prv_display_alert(data->debug_card.dialog_text); goto exit; } - PBL_LOG_DBG("Got last %d minutes with UTC of %d (delta of %d min)", (int)chunk, - (int)utc_start, (int)(utc_start - prior_start) / SECONDS_PER_MINUTE); + PBL_LOG_DBG("Got last %d minutes with UTC of %d (delta of %d min)", (int)chunk, (int)utc_start, + (int)(utc_start - prior_start) / SECONDS_PER_MINUTE); const unsigned int k_num_last_minutes = 6; if (chunk >= k_num_last_minutes) { for (int i = (int)chunk - k_num_last_minutes; i < (int)chunk; i++) { HealthMinuteData *m_data = &minute_data[i]; char temp[32]; - snprintf(temp, sizeof(temp), "\n%"PRId8", 0x%"PRIx8", %"PRIu16", %"PRId8" ", + snprintf(temp, sizeof(temp), "\n%" PRId8 ", 0x%" PRIx8 ", %" PRIu16 ", %" PRId8 " ", m_data->steps, m_data->orientation, m_data->vmc, m_data->light); safe_strcat(data->debug_card.dialog_text, temp, sizeof(data->debug_card.dialog_text)); } @@ -579,13 +550,11 @@ static void prv_debug_cmd_minute_data(int index, void *context) { app_free(minute_data); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_send_fake_logging_record(int index, void *context) { activity_test_send_fake_dls_records(); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_push_summary_pins(int index, void *context) { prv_debug_cmd_set_steps_at_avg(index, context); @@ -598,13 +567,11 @@ static void prv_debug_cmd_push_summary_pins(int index, void *context) { prv_display_alert(data->debug_card.dialog_text); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_push_rewards(int index, void *context) { activity_insights_test_push_rewards(); } - // ----------------------------------------------------------------------------------------- static void prv_debug_cmd_push_walk_run(int index, void *context) { activity_insights_test_push_walk_run_sessions(); @@ -622,102 +589,126 @@ static void debug_window_load(Window *window) { const GRect *root_bounds = &window_layer->bounds; static SimpleMenuItem menu_items[] = { - { - .title = "Tracking", - .callback = prv_debug_cmd_tracking, - }, { - .title = "Activity Insights", - .callback = prv_debug_cmd_activity_insights, - }, { - .title = "Sleep Insights", - .callback = prv_debug_cmd_sleep_insights, - }, { - .title = "DLS sends", - .callback = prv_debug_cmd_dls_sends, - }, { - .title = "Step History", - .callback = prv_debug_cmd_step_history, - }, { - .title = "Distance(m) History", - .callback = prv_debug_cmd_distance_history, - }, { - .title = "Resting Calorie History", - .callback = prv_debug_cmd_resting_calorie_history, - }, { - .title = "Active Calorie History", - .callback = prv_debug_cmd_active_calorie_history, - }, { - .title = "Active Minutes History", - .callback = prv_debug_cmd_active_time_history, - }, { - .title = "Sleep History", - .callback = prv_debug_cmd_sleep_history, - }, { - .title = "Sleep Sessions", - .callback = prv_debug_cmd_sleep_sessions, - }, { - .title = "Step activities", - .callback = prv_debug_cmd_step_sessions, - }, { - .title = "Weekday averages", - .callback = prv_debug_cmd_weekday_averages, - }, { - .title = "Weekend averages", - .callback = prv_debug_cmd_weekend_averages, - }, { - .title = "Activity Prefs", - .callback = prv_debug_cmd_activity_prefs, - }, { - .title = "Steps below avg", - .callback = prv_debug_cmd_set_steps_below_avg, - }, { - .title = "Steps at avg", - .callback = prv_debug_cmd_set_steps_at_avg, - }, { - .title = "Steps above avg", - .callback = prv_debug_cmd_set_steps_above_avg, - }, { - .title = "Set step history", - .callback = prv_debug_cmd_set_steps_history, - }, { - .title = "Set sleep history", - .callback = prv_debug_cmd_set_sleep_history, - }, { - .title = "Sleep File Info", - .callback = prv_debug_cmd_sleep_file_info, - }, { - .title = "Sleep File Compact", - .callback = prv_debug_cmd_sleep_file_compact, - }, { - .title = "Read Minute data", - .callback = prv_debug_cmd_minute_data, - }, { - .title = "Send fake DL record", - .callback = prv_debug_cmd_send_fake_logging_record, - }, { - .title = "Push Summary Pins", - .callback = prv_debug_cmd_push_summary_pins, - }, { - .title = "Push Rewards", - .callback = prv_debug_cmd_push_rewards, - }, { - .title = "Walk/Run Notif", - .callback = prv_debug_cmd_push_walk_run, - }, { - .title = "Push Nap Session", - .callback = prv_debug_cmd_push_nap_session, - } + { + .title = "Tracking", + .callback = prv_debug_cmd_tracking, + }, + { + .title = "Activity Insights", + .callback = prv_debug_cmd_activity_insights, + }, + { + .title = "Sleep Insights", + .callback = prv_debug_cmd_sleep_insights, + }, + { + .title = "DLS sends", + .callback = prv_debug_cmd_dls_sends, + }, + { + .title = "Step History", + .callback = prv_debug_cmd_step_history, + }, + { + .title = "Distance(m) History", + .callback = prv_debug_cmd_distance_history, + }, + { + .title = "Resting Calorie History", + .callback = prv_debug_cmd_resting_calorie_history, + }, + { + .title = "Active Calorie History", + .callback = prv_debug_cmd_active_calorie_history, + }, + { + .title = "Active Minutes History", + .callback = prv_debug_cmd_active_time_history, + }, + { + .title = "Sleep History", + .callback = prv_debug_cmd_sleep_history, + }, + { + .title = "Sleep Sessions", + .callback = prv_debug_cmd_sleep_sessions, + }, + { + .title = "Step activities", + .callback = prv_debug_cmd_step_sessions, + }, + { + .title = "Weekday averages", + .callback = prv_debug_cmd_weekday_averages, + }, + { + .title = "Weekend averages", + .callback = prv_debug_cmd_weekend_averages, + }, + { + .title = "Activity Prefs", + .callback = prv_debug_cmd_activity_prefs, + }, + { + .title = "Steps below avg", + .callback = prv_debug_cmd_set_steps_below_avg, + }, + { + .title = "Steps at avg", + .callback = prv_debug_cmd_set_steps_at_avg, + }, + { + .title = "Steps above avg", + .callback = prv_debug_cmd_set_steps_above_avg, + }, + { + .title = "Set step history", + .callback = prv_debug_cmd_set_steps_history, + }, + { + .title = "Set sleep history", + .callback = prv_debug_cmd_set_sleep_history, + }, + { + .title = "Sleep File Info", + .callback = prv_debug_cmd_sleep_file_info, + }, + { + .title = "Sleep File Compact", + .callback = prv_debug_cmd_sleep_file_compact, + }, + { + .title = "Read Minute data", + .callback = prv_debug_cmd_minute_data, + }, + { + .title = "Send fake DL record", + .callback = prv_debug_cmd_send_fake_logging_record, + }, + { + .title = "Push Summary Pins", + .callback = prv_debug_cmd_push_summary_pins, + }, + { + .title = "Push Rewards", + .callback = prv_debug_cmd_push_rewards, + }, + { + .title = "Walk/Run Notif", + .callback = prv_debug_cmd_push_walk_run, + }, + { + .title = "Push Nap Session", + .callback = prv_debug_cmd_push_nap_session, + } }; static const SimpleMenuSection sections[] = { - { - .items = menu_items, - .num_items = ARRAY_LENGTH(menu_items) - } + {.items = menu_items, .num_items = ARRAY_LENGTH(menu_items)} }; data->debug_card.menu_items = menu_items; - data->debug_card.menu_layer = simple_menu_layer_create(*root_bounds, window, sections, - ARRAY_LENGTH(sections), data); + data->debug_card.menu_layer = + simple_menu_layer_create(*root_bounds, window, sections, ARRAY_LENGTH(sections), data); layer_add_child(window_layer, simple_menu_layer_get_layer(data->debug_card.menu_layer)); // Init status @@ -729,14 +720,12 @@ static void debug_window_load(Window *window) { data->debug_card.menu_items[3].subtitle = dls_get_send_enable() ? "Enabled" : "Disabled"; } - // ------------------------------------------------------------------------------- static void debug_window_unload(Window *window) { ActivityDemoAppData *data = window_get_user_data(window); simple_menu_layer_destroy(data->debug_card.menu_layer); } - // ------------------------------------------------------------------------------- static void deinit(void) { ActivityDemoAppData *data = app_state_get_user_data(); @@ -744,7 +733,6 @@ static void deinit(void) { app_free(data); } - // ------------------------------------------------------------------------------- static void init(void) { ActivityDemoAppData *data = app_malloc_check(sizeof(ActivityDemoAppData)); @@ -755,15 +743,14 @@ static void init(void) { // Debug window data->debug_window = window_create(); window_set_user_data(data->debug_window, data); - window_set_window_handlers(data->debug_window, &(WindowHandlers) { - .load = debug_window_load, - .unload = debug_window_unload, - }); + window_set_window_handlers(data->debug_window, &(WindowHandlers){ + .load = debug_window_load, + .unload = debug_window_unload, + }); app_window_stack_push(data->debug_window, true /* Animated */); } - // ------------------------------------------------------------------------------- static void s_main(void) { init(); @@ -771,15 +758,15 @@ static void s_main(void) { deinit(); } - // ------------------------------------------------------------------------------- -const PebbleProcessMd* activity_demo_get_app_info(void) { +const PebbleProcessMd *activity_demo_get_app_info(void) { static const PebbleProcessMdSystem s_activity_demo_app_info = { - .common.main_func = &s_main, - // UUID: 60206d97-818b-4f42-87ae-48fde623608d - .common.uuid = {0x60, 0x20, 0x6d, 0x97, 0x81, 0x8b, 0x4f, 0x42, 0x87, 0xae, 0x48, 0xfd, 0xe6, - 0x23, 0x60, 0x8d}, - .name = "ActivityDemo" + .common.main_func = &s_main, + // UUID: 60206d97-818b-4f42-87ae-48fde623608d + .common.uuid = + {0x60, 0x20, 0x6d, 0x97, 0x81, 0x8b, 0x4f, 0x42, 0x87, 0xae, 0x48, 0xfd, 0xe6, 0x23, 0x60, + 0x8d}, + .name = "ActivityDemo" }; - return (const PebbleProcessMd*) &s_activity_demo_app_info; + return (const PebbleProcessMd *)&s_activity_demo_app_info; } diff --git a/src/fw/apps/demo/activity_demo/activity_demo.h b/src/fw/apps/demo/activity_demo/activity_demo.h index 7c5a6a4503..87e15635e6 100644 --- a/src/fw/apps/demo/activity_demo/activity_demo.h +++ b/src/fw/apps/demo/activity_demo/activity_demo.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* activity_demo_get_app_info(void); +const PebbleProcessMd *activity_demo_get_app_info(void); diff --git a/src/fw/apps/demo/activity_test/activity_test.c b/src/fw/apps/demo/activity_test/activity_test.c index 79f14adf2e..b108e2d5cd 100644 --- a/src/fw/apps/demo/activity_test/activity_test.c +++ b/src/fw/apps/demo/activity_test/activity_test.c @@ -29,8 +29,8 @@ typedef struct { Window *window; SimpleMenuLayer *menu_layer; SimpleMenuItem *menu_items; - int test_index; // Which test is currently running - uint32_t steps_updated_value; // What we last received from the steps update handler + int test_index; // Which test is currently running + uint32_t steps_updated_value; // What we last received from the steps update handler } ActivityTestAppData; #define SAMPLES_PER_SECOND ACCEL_SAMPLING_25HZ @@ -38,7 +38,6 @@ typedef struct { // Forward prototypes static void prv_test_end(void *context, bool passed); - // ========================================================================================== // Activities // These samples were collected using the accel-logging-app: @@ -55,509 +54,133 @@ static void prv_test_end(void *context, bool passed); // // This is about 500 samples, 20 seconds worth of data static AccelRawData s_walk_30_steps[] = { - { -42, -52, -1027}, - { -43, -29, -1054}, - { -76, 12, -975}, - { -72, -17, -906}, - { -64, -40, -892}, - { -81, -37, -933}, - { -77, -15, -1008}, - { -83, 0, -1041}, - { -81, -27, -1029}, - { -80, -57, -993}, - { -97, -27, -973}, - { -119, -21, -991}, - { -120, -19, -1011}, - { -115, -27, -978}, - { -106, -44, -953}, - { -104, -62, -946}, - { -150, -90, -962}, - { -148, -66, -991}, - { -164, -101, -980}, - { -162, -102, -975}, - { -223, -67, -966}, - { -251, -84, -971}, - { -118, -134, -968}, - { -159, -54, -956}, - { -160, -125, -958}, - { -102, -152, -963}, - { -39, -154, -974}, - { 63, -317, -986}, - { -61, -190, -1000}, - { -131, -306, -1022}, - { -189, -295, -844}, - { -224, -317, -694}, - { -243, -177, -563}, - { -420, 58, -499}, - { -677, 416, -469}, - { -796, 908, -426}, - { -844, 1100, -288}, - { -762, 824, -233}, - { -813, 1019, -270}, - { -816, 1041, -119}, - { -865, 914, -6}, - { -848, 872, 24}, - { -817, 776, 42}, - { -765, 655, 14}, - { -804, 635, -20}, - { -839, 657, 13}, - { -874, 659, -1}, - { -926, 587, -19}, - { -976, 510, -31}, - { -937, 466, -78}, - { -1187, 483, 24}, - { -1046, 482, -87}, - { -1071, 566, -238}, - { -884, 460, -301}, - { -844, 144, -211}, - { -880, 213, -78}, - { -972, -2, 38}, - { -786, 53, 32}, - { -739, 232, -12}, - { -695, 344, -61}, - { -706, 394, -72}, - { -743, 351, -67}, - { -775, 334, -58}, - { -819, 333, -45}, - { -869, 365, -70}, - { -833, 405, -36}, - { -1466, 634, 18}, - { -1132, 698, -39}, - { -849, 548, -59}, - { -1073, 483, -47}, - { -970, 540, -84}, - { -883, 458, -35}, - { -781, 364, -41}, - { -732, 345, -40}, - { -751, 324, 2}, - { -752, 287, 42}, - { -727, 285, 29}, - { -718, 304, 44}, - { -813, 325, 79}, - { -903, 335, 75}, - { -880, 323, 4}, - { -1093, 404, 57}, - { -1177, 388, 76}, - { -1098, 513, -82}, - { -892, 549, -256}, - { -739, 484, -199}, - { -695, 337, -82}, - { -846, 302, 0}, - { -787, 298, 24}, - { -712, 392, 29}, - { -733, 439, -20}, - { -740, 464, -49}, - { -739, 450, -50}, - { -752, 411, -87}, - { -837, 438, -93}, - { -961, 453, -73}, - { -994, 442, -23}, - { -1059, 466, 2}, - { -1222, 594, 33}, - { -997, 552, 30}, - { -873, 477, -30}, - { -850, 443, 32}, - { -894, 421, 62}, - { -891, 367, 102}, - { -873, 322, 164}, - { -865, 316, 181}, - { -804, 364, 150}, - { -757, 337, 158}, - { -714, 338, 110}, - { -721, 405, 71}, - { -721, 419, 53}, - { -725, 400, 35}, - { -737, 373, 55}, - { -752, 386, 57}, - { -865, 451, 64}, - { -928, 486, 99}, - { -1113, 519, 257}, - { -1147, 531, 305}, - { -1069, 693, 49}, - { -815, 808, -126}, - { -679, 568, -43}, - { -748, 421, 29}, - { -886, 316, 59}, - { -906, 306, 26}, - { -846, 369, 0}, - { -843, 404, -15}, - { -828, 396, -2}, - { -826, 358, 23}, - { -755, 300, 41}, - { -700, 305, 46}, - { -747, 377, 28}, - { -794, 416, 47}, - { -1102, 470, 161}, - { -1303, 549, 281}, - { -1194, 656, 238}, - { -709, 508, 77}, - { -734, 453, 115}, - { -739, 456, 199}, - { -781, 422, 258}, - { -758, 330, 258}, - { -708, 344, 240}, - { -780, 317, 285}, - { -817, 324, 263}, - { -829, 355, 210}, - { -858, 364, 164}, - { -906, 377, 157}, - { -923, 359, 98}, - { -887, 352, 9}, - { -1061, 369, 100}, - { -1180, 384, 148}, - { -922, 410, 5}, - { -778, 464, -90}, - { -770, 444, -26}, - { -841, 375, 6}, - { -837, 321, 52}, - { -757, 354, 58}, - { -745, 372, 36}, - { -737, 432, -16}, - { -759, 420, -26}, - { -783, 429, -53}, - { -824, 437, -80}, - { -883, 473, -85}, - { -907, 472, -54}, - { -856, 403, 17}, - { -1254, 537, 65}, - { -1046, 516, 93}, - { -1008, 479, 88}, - { -771, 420, 33}, - { -884, 437, 88}, - { -907, 417, 109}, - { -837, 382, 101}, - { -802, 361, 88}, - { -789, 363, 102}, - { -788, 318, 123}, - { -761, 264, 123}, - { -762, 273, 114}, - { -790, 335, 109}, - { -870, 325, 138}, - { -913, 337, 109}, - { -871, 357, 18}, - { -1159, 395, 84}, - { -1036, 382, 52}, - { -907, 491, -125}, - { -798, 533, -195}, - { -784, 460, -111}, - { -835, 375, -31}, - { -840, 327, -9}, - { -773, 403, -1}, - { -739, 434, -30}, - { -773, 450, -57}, - { -786, 449, -64}, - { -862, 447, -89}, - { -934, 463, -112}, - { -975, 473, -92}, - { -897, 430, -62}, - { -851, 399, -43}, - { -1183, 530, 30}, - { -984, 538, 30}, - { -940, 525, 39}, - { -779, 470, 31}, - { -915, 462, 97}, - { -916, 397, 174}, - { -881, 386, 167}, - { -840, 391, 157}, - { -766, 343, 177}, - { -755, 324, 191}, - { -769, 317, 192}, - { -807, 352, 193}, - { -821, 380, 179}, - { -916, 396, 179}, - { -928, 360, 144}, - { -871, 359, 34}, - { -1104, 362, 83}, - { -1048, 368, -61}, - { -819, 467, -296}, - { -747, 536, -384}, - { -840, 488, -258}, - { -858, 404, -178}, - { -831, 316, -141}, - { -734, 466, -161}, - { -715, 431, -110}, - { -760, 436, -88}, - { -762, 422, -44}, - { -726, 430, -46}, - { -778, 447, -31}, - { -872, 477, -16}, - { -987, 484, 33}, - { -962, 420, 126}, - { -1254, 472, 174}, - { -1012, 451, 128}, - { -1023, 473, 152}, - { -863, 461, 115}, - { -836, 440, 169}, - { -887, 418, 182}, - { -946, 397, 235}, - { -878, 358, 206}, - { -779, 327, 142}, - { -748, 269, 156}, - { -745, 232, 145}, - { -737, 260, 111}, - { -772, 324, 96}, - { -874, 366, 115}, - { -954, 347, 148}, - { -919, 360, 83}, - { -994, 403, 83}, - { -1132, 383, 116}, - { -907, 417, -30}, - { -861, 496, -124}, - { -853, 482, -98}, - { -822, 430, -71}, - { -876, 385, -36}, - { -836, 391, -41}, - { -742, 396, -49}, - { -721, 389, -60}, - { -735, 392, -67}, - { -753, 370, -68}, - { -803, 402, -92}, - { -871, 446, -113}, - { -954, 472, -109}, - { -941, 440, -62}, - { -1021, 428, -15}, - { -1181, 546, -10}, - { -979, 498, 48}, - { -970, 454, 18}, - { -808, 412, 6}, - { -925, 465, -8}, - { -942, 404, 39}, - { -851, 352, 49}, - { -788, 336, 43}, - { -760, 304, 71}, - { -755, 270, 106}, - { -744, 257, 119}, - { -724, 280, 111}, - { -745, 307, 103}, - { -874, 345, 116}, - { -948, 331, 95}, - { -958, 361, 58}, - { -1237, 397, 140}, - { -1129, 438, 48}, - { -948, 546, -138}, - { -796, 531, -202}, - { -748, 418, -147}, - { -886, 384, -85}, - { -855, 300, -62}, - { -760, 381, -50}, - { -739, 410, -87}, - { -748, 417, -89}, - { -741, 405, -79}, - { -772, 384, -87}, - { -857, 422, -101}, - { -937, 444, -100}, - { -926, 409, -69}, - { -1087, 440, -28}, - { -1202, 533, -44}, - { -928, 472, -23}, - { -904, 425, -81}, - { -781, 414, -98}, - { -934, 455, -72}, - { -974, 342, -20}, - { -927, 341, 31}, - { -833, 357, 6}, - { -759, 306, 20}, - { -772, 292, 64}, - { -784, 281, 90}, - { -770, 289, 75}, - { -769, 301, 64}, - { -791, 281, 84}, - { -865, 311, 77}, - { -905, 356, 34}, - { -928, 376, 34}, - { -1242, 424, 119}, - { -1062, 453, 58}, - { -963, 584, -126}, - { -810, 527, -67}, - { -812, 403, -9}, - { -880, 330, 21}, - { -792, 329, 40}, - { -692, 363, 0}, - { -689, 397, -46}, - { -698, 405, -71}, - { -710, 379, -79}, - { -795, 419, -102}, - { -892, 468, -119}, - { -1012, 491, -96}, - { -1024, 453, -41}, - { -1262, 560, -19}, - { -1120, 525, 57}, - { -1004, 434, 31}, - { -819, 398, 63}, - { -761, 405, 134}, - { -779, 464, 82}, - { -827, 455, 99}, - { -837, 389, 148}, - { -752, 410, 137}, - { -744, 386, 145}, - { -753, 364, 124}, - { -760, 335, 143}, - { -818, 328, 129}, - { -916, 308, 157}, - { -985, 295, 165}, - { -905, 312, 83}, - { -1069, 368, 131}, - { -1014, 358, 120}, - { -917, 443, -7}, - { -762, 490, -147}, - { -820, 544, -160}, - { -753, 418, -100}, - { -873, 373, -25}, - { -828, 364, -24}, - { -806, 406, -60}, - { -757, 431, -105}, - { -779, 418, -84}, - { -790, 383, -105}, - { -818, 393, -119}, - { -869, 437, -133}, - { -958, 461, -104}, - { -874, 410, -26}, - { -1208, 503, 46}, - { -1075, 527, 44}, - { -1014, 502, 99}, - { -824, 458, 24}, - { -782, 446, 43}, - { -865, 422, 82}, - { -919, 364, 130}, - { -861, 358, 110}, - { -805, 357, 114}, - { -762, 325, 130}, - { -742, 301, 138}, - { -749, 298, 147}, - { -748, 305, 139}, - { -820, 341, 119}, - { -918, 331, 138}, - { -959, 353, 88}, - { -1027, 388, 79}, - { -1112, 380, 70}, - { -941, 440, -98}, - { -921, 522, -223}, - { -848, 539, -239}, - { -787, 394, -149}, - { -890, 329, -70}, - { -888, 341, -52}, - { -802, 381, -61}, - { -742, 399, -88}, - { -739, 403, -76}, - { -741, 364, -54}, - { -778, 357, -64}, - { -824, 402, -103}, - { -912, 451, -105}, - { -893, 426, -70}, - { -854, 394, -25}, - { -1267, 545, 34}, - { -982, 546, 27}, - { -927, 455, 9}, - { -748, 444, -42}, - { -903, 476, 7}, - { -953, 465, 38}, - { -921, 406, 49}, - { -860, 382, 61}, - { -795, 328, 60}, - { -754, 280, 78}, - { -753, 287, 83}, - { -765, 291, 78}, - { -797, 304, 77}, - { -847, 303, 95}, - { -918, 302, 89}, - { -887, 346, 49}, - { -1206, 375, 146}, - { -995, 384, 52}, - { -932, 490, -80}, - { -823, 524, -140}, - { -810, 473, -113}, - { -851, 386, -78}, - { -886, 362, -59}, - { -796, 392, -45}, - { -744, 396, -58}, - { -750, 414, -62}, - { -779, 421, -56}, - { -811, 410, -65}, - { -856, 427, -90}, - { -905, 457, -110}, - { -955, 463, -115}, - { -914, 431, -86}, - { -1064, 447, -36}, - { -1068, 509, -51}, - { -999, 499, 27}, - { -961, 451, 18}, - { -752, 419, -8}, - { -857, 444, 25}, - { -909, 409, 75}, - { -885, 376, 99}, - { -835, 344, 123}, - { -760, 307, 120}, - { -767, 296, 143}, - { -763, 289, 170}, - { -773, 310, 156}, - { -796, 343, 134}, - { -853, 329, 167}, - { -913, 337, 137}, - { -966, 368, 124}, - { -1257, 386, 184}, - { -891, 391, -52}, - { -823, 535, -266}, - { -770, 518, -245}, - { -864, 431, -138}, - { -955, 288, -95}, - { -936, 358, -128}, - { -833, 497, -102}, - { -782, 576, -113}, - { -774, 534, -104}, - { -798, 395, -78}, - { -801, 330, -25}, - { -849, 397, -49}, - { -879, 440, -35}, - { -875, 421, 0}, - { -841, 395, 46}, - { -983, 424, 95}, - { -1097, 478, 126}, - { -983, 499, 146}, - { -854, 450, 37}, - { -674, 450, 43}, - { -906, 448, 80}, - { -965, 379, 158}, - { -882, 328, 162}, - { -835, 354, 136}, - { -857, 347, 171}, - { -828, 307, 190}, - { -841, 307, 192}, - { -855, 339, 173}, - { -863, 323, 195}, - { -876, 319, 192}, - { -888, 320, 150}, - { -841, 343, 63}, - { -918, 377, 11}, - { -1145, 392, 66}, - { -866, 384, -129}, - { -768, 485, -290}, - { -796, 530, -255}, - { -900, 510, -141}, - { -970, 376, -113}, - { -891, 346, -100}, - { -797, 395, -38}, - { -774, 526, -58}, - { -837, 453, -35}, - { -840, 405, 9}, - { -844, 380, 31}, - { -854, 443, 22}, - { -892, 420, 43}, - { -889, 378, 65}, - { -872, 362, 99}, - { -841, 375, 101}, - { -1106, 546, 141}, - { -936, 614, 132}, - { -945, 643, 140}, - { -825, 713, 168}, - { -854, 725, 255}, - { -891, 784, 293}, - { -835, 912, 310}, - { -788, 924, 269}, - { -691, 953, 207}, - { -603, 999, 171}, + {-42, -52, -1027}, {-43, -29, -1054}, {-76, 12, -975}, {-72, -17, -906}, + {-64, -40, -892}, {-81, -37, -933}, {-77, -15, -1008}, {-83, 0, -1041}, + {-81, -27, -1029}, {-80, -57, -993}, {-97, -27, -973}, {-119, -21, -991}, + {-120, -19, -1011}, {-115, -27, -978}, {-106, -44, -953}, {-104, -62, -946}, + {-150, -90, -962}, {-148, -66, -991}, {-164, -101, -980}, {-162, -102, -975}, + {-223, -67, -966}, {-251, -84, -971}, {-118, -134, -968}, {-159, -54, -956}, + {-160, -125, -958}, {-102, -152, -963}, {-39, -154, -974}, {63, -317, -986}, + {-61, -190, -1000}, {-131, -306, -1022}, {-189, -295, -844}, {-224, -317, -694}, + {-243, -177, -563}, {-420, 58, -499}, {-677, 416, -469}, {-796, 908, -426}, + {-844, 1100, -288}, {-762, 824, -233}, {-813, 1019, -270}, {-816, 1041, -119}, + {-865, 914, -6}, {-848, 872, 24}, {-817, 776, 42}, {-765, 655, 14}, + {-804, 635, -20}, {-839, 657, 13}, {-874, 659, -1}, {-926, 587, -19}, + {-976, 510, -31}, {-937, 466, -78}, {-1187, 483, 24}, {-1046, 482, -87}, + {-1071, 566, -238}, {-884, 460, -301}, {-844, 144, -211}, {-880, 213, -78}, + {-972, -2, 38}, {-786, 53, 32}, {-739, 232, -12}, {-695, 344, -61}, + {-706, 394, -72}, {-743, 351, -67}, {-775, 334, -58}, {-819, 333, -45}, + {-869, 365, -70}, {-833, 405, -36}, {-1466, 634, 18}, {-1132, 698, -39}, + {-849, 548, -59}, {-1073, 483, -47}, {-970, 540, -84}, {-883, 458, -35}, + {-781, 364, -41}, {-732, 345, -40}, {-751, 324, 2}, {-752, 287, 42}, + {-727, 285, 29}, {-718, 304, 44}, {-813, 325, 79}, {-903, 335, 75}, + {-880, 323, 4}, {-1093, 404, 57}, {-1177, 388, 76}, {-1098, 513, -82}, + {-892, 549, -256}, {-739, 484, -199}, {-695, 337, -82}, {-846, 302, 0}, + {-787, 298, 24}, {-712, 392, 29}, {-733, 439, -20}, {-740, 464, -49}, + {-739, 450, -50}, {-752, 411, -87}, {-837, 438, -93}, {-961, 453, -73}, + {-994, 442, -23}, {-1059, 466, 2}, {-1222, 594, 33}, {-997, 552, 30}, + {-873, 477, -30}, {-850, 443, 32}, {-894, 421, 62}, {-891, 367, 102}, + {-873, 322, 164}, {-865, 316, 181}, {-804, 364, 150}, {-757, 337, 158}, + {-714, 338, 110}, {-721, 405, 71}, {-721, 419, 53}, {-725, 400, 35}, + {-737, 373, 55}, {-752, 386, 57}, {-865, 451, 64}, {-928, 486, 99}, + {-1113, 519, 257}, {-1147, 531, 305}, {-1069, 693, 49}, {-815, 808, -126}, + {-679, 568, -43}, {-748, 421, 29}, {-886, 316, 59}, {-906, 306, 26}, + {-846, 369, 0}, {-843, 404, -15}, {-828, 396, -2}, {-826, 358, 23}, + {-755, 300, 41}, {-700, 305, 46}, {-747, 377, 28}, {-794, 416, 47}, + {-1102, 470, 161}, {-1303, 549, 281}, {-1194, 656, 238}, {-709, 508, 77}, + {-734, 453, 115}, {-739, 456, 199}, {-781, 422, 258}, {-758, 330, 258}, + {-708, 344, 240}, {-780, 317, 285}, {-817, 324, 263}, {-829, 355, 210}, + {-858, 364, 164}, {-906, 377, 157}, {-923, 359, 98}, {-887, 352, 9}, + {-1061, 369, 100}, {-1180, 384, 148}, {-922, 410, 5}, {-778, 464, -90}, + {-770, 444, -26}, {-841, 375, 6}, {-837, 321, 52}, {-757, 354, 58}, + {-745, 372, 36}, {-737, 432, -16}, {-759, 420, -26}, {-783, 429, -53}, + {-824, 437, -80}, {-883, 473, -85}, {-907, 472, -54}, {-856, 403, 17}, + {-1254, 537, 65}, {-1046, 516, 93}, {-1008, 479, 88}, {-771, 420, 33}, + {-884, 437, 88}, {-907, 417, 109}, {-837, 382, 101}, {-802, 361, 88}, + {-789, 363, 102}, {-788, 318, 123}, {-761, 264, 123}, {-762, 273, 114}, + {-790, 335, 109}, {-870, 325, 138}, {-913, 337, 109}, {-871, 357, 18}, + {-1159, 395, 84}, {-1036, 382, 52}, {-907, 491, -125}, {-798, 533, -195}, + {-784, 460, -111}, {-835, 375, -31}, {-840, 327, -9}, {-773, 403, -1}, + {-739, 434, -30}, {-773, 450, -57}, {-786, 449, -64}, {-862, 447, -89}, + {-934, 463, -112}, {-975, 473, -92}, {-897, 430, -62}, {-851, 399, -43}, + {-1183, 530, 30}, {-984, 538, 30}, {-940, 525, 39}, {-779, 470, 31}, + {-915, 462, 97}, {-916, 397, 174}, {-881, 386, 167}, {-840, 391, 157}, + {-766, 343, 177}, {-755, 324, 191}, {-769, 317, 192}, {-807, 352, 193}, + {-821, 380, 179}, {-916, 396, 179}, {-928, 360, 144}, {-871, 359, 34}, + {-1104, 362, 83}, {-1048, 368, -61}, {-819, 467, -296}, {-747, 536, -384}, + {-840, 488, -258}, {-858, 404, -178}, {-831, 316, -141}, {-734, 466, -161}, + {-715, 431, -110}, {-760, 436, -88}, {-762, 422, -44}, {-726, 430, -46}, + {-778, 447, -31}, {-872, 477, -16}, {-987, 484, 33}, {-962, 420, 126}, + {-1254, 472, 174}, {-1012, 451, 128}, {-1023, 473, 152}, {-863, 461, 115}, + {-836, 440, 169}, {-887, 418, 182}, {-946, 397, 235}, {-878, 358, 206}, + {-779, 327, 142}, {-748, 269, 156}, {-745, 232, 145}, {-737, 260, 111}, + {-772, 324, 96}, {-874, 366, 115}, {-954, 347, 148}, {-919, 360, 83}, + {-994, 403, 83}, {-1132, 383, 116}, {-907, 417, -30}, {-861, 496, -124}, + {-853, 482, -98}, {-822, 430, -71}, {-876, 385, -36}, {-836, 391, -41}, + {-742, 396, -49}, {-721, 389, -60}, {-735, 392, -67}, {-753, 370, -68}, + {-803, 402, -92}, {-871, 446, -113}, {-954, 472, -109}, {-941, 440, -62}, + {-1021, 428, -15}, {-1181, 546, -10}, {-979, 498, 48}, {-970, 454, 18}, + {-808, 412, 6}, {-925, 465, -8}, {-942, 404, 39}, {-851, 352, 49}, + {-788, 336, 43}, {-760, 304, 71}, {-755, 270, 106}, {-744, 257, 119}, + {-724, 280, 111}, {-745, 307, 103}, {-874, 345, 116}, {-948, 331, 95}, + {-958, 361, 58}, {-1237, 397, 140}, {-1129, 438, 48}, {-948, 546, -138}, + {-796, 531, -202}, {-748, 418, -147}, {-886, 384, -85}, {-855, 300, -62}, + {-760, 381, -50}, {-739, 410, -87}, {-748, 417, -89}, {-741, 405, -79}, + {-772, 384, -87}, {-857, 422, -101}, {-937, 444, -100}, {-926, 409, -69}, + {-1087, 440, -28}, {-1202, 533, -44}, {-928, 472, -23}, {-904, 425, -81}, + {-781, 414, -98}, {-934, 455, -72}, {-974, 342, -20}, {-927, 341, 31}, + {-833, 357, 6}, {-759, 306, 20}, {-772, 292, 64}, {-784, 281, 90}, + {-770, 289, 75}, {-769, 301, 64}, {-791, 281, 84}, {-865, 311, 77}, + {-905, 356, 34}, {-928, 376, 34}, {-1242, 424, 119}, {-1062, 453, 58}, + {-963, 584, -126}, {-810, 527, -67}, {-812, 403, -9}, {-880, 330, 21}, + {-792, 329, 40}, {-692, 363, 0}, {-689, 397, -46}, {-698, 405, -71}, + {-710, 379, -79}, {-795, 419, -102}, {-892, 468, -119}, {-1012, 491, -96}, + {-1024, 453, -41}, {-1262, 560, -19}, {-1120, 525, 57}, {-1004, 434, 31}, + {-819, 398, 63}, {-761, 405, 134}, {-779, 464, 82}, {-827, 455, 99}, + {-837, 389, 148}, {-752, 410, 137}, {-744, 386, 145}, {-753, 364, 124}, + {-760, 335, 143}, {-818, 328, 129}, {-916, 308, 157}, {-985, 295, 165}, + {-905, 312, 83}, {-1069, 368, 131}, {-1014, 358, 120}, {-917, 443, -7}, + {-762, 490, -147}, {-820, 544, -160}, {-753, 418, -100}, {-873, 373, -25}, + {-828, 364, -24}, {-806, 406, -60}, {-757, 431, -105}, {-779, 418, -84}, + {-790, 383, -105}, {-818, 393, -119}, {-869, 437, -133}, {-958, 461, -104}, + {-874, 410, -26}, {-1208, 503, 46}, {-1075, 527, 44}, {-1014, 502, 99}, + {-824, 458, 24}, {-782, 446, 43}, {-865, 422, 82}, {-919, 364, 130}, + {-861, 358, 110}, {-805, 357, 114}, {-762, 325, 130}, {-742, 301, 138}, + {-749, 298, 147}, {-748, 305, 139}, {-820, 341, 119}, {-918, 331, 138}, + {-959, 353, 88}, {-1027, 388, 79}, {-1112, 380, 70}, {-941, 440, -98}, + {-921, 522, -223}, {-848, 539, -239}, {-787, 394, -149}, {-890, 329, -70}, + {-888, 341, -52}, {-802, 381, -61}, {-742, 399, -88}, {-739, 403, -76}, + {-741, 364, -54}, {-778, 357, -64}, {-824, 402, -103}, {-912, 451, -105}, + {-893, 426, -70}, {-854, 394, -25}, {-1267, 545, 34}, {-982, 546, 27}, + {-927, 455, 9}, {-748, 444, -42}, {-903, 476, 7}, {-953, 465, 38}, + {-921, 406, 49}, {-860, 382, 61}, {-795, 328, 60}, {-754, 280, 78}, + {-753, 287, 83}, {-765, 291, 78}, {-797, 304, 77}, {-847, 303, 95}, + {-918, 302, 89}, {-887, 346, 49}, {-1206, 375, 146}, {-995, 384, 52}, + {-932, 490, -80}, {-823, 524, -140}, {-810, 473, -113}, {-851, 386, -78}, + {-886, 362, -59}, {-796, 392, -45}, {-744, 396, -58}, {-750, 414, -62}, + {-779, 421, -56}, {-811, 410, -65}, {-856, 427, -90}, {-905, 457, -110}, + {-955, 463, -115}, {-914, 431, -86}, {-1064, 447, -36}, {-1068, 509, -51}, + {-999, 499, 27}, {-961, 451, 18}, {-752, 419, -8}, {-857, 444, 25}, + {-909, 409, 75}, {-885, 376, 99}, {-835, 344, 123}, {-760, 307, 120}, + {-767, 296, 143}, {-763, 289, 170}, {-773, 310, 156}, {-796, 343, 134}, + {-853, 329, 167}, {-913, 337, 137}, {-966, 368, 124}, {-1257, 386, 184}, + {-891, 391, -52}, {-823, 535, -266}, {-770, 518, -245}, {-864, 431, -138}, + {-955, 288, -95}, {-936, 358, -128}, {-833, 497, -102}, {-782, 576, -113}, + {-774, 534, -104}, {-798, 395, -78}, {-801, 330, -25}, {-849, 397, -49}, + {-879, 440, -35}, {-875, 421, 0}, {-841, 395, 46}, {-983, 424, 95}, + {-1097, 478, 126}, {-983, 499, 146}, {-854, 450, 37}, {-674, 450, 43}, + {-906, 448, 80}, {-965, 379, 158}, {-882, 328, 162}, {-835, 354, 136}, + {-857, 347, 171}, {-828, 307, 190}, {-841, 307, 192}, {-855, 339, 173}, + {-863, 323, 195}, {-876, 319, 192}, {-888, 320, 150}, {-841, 343, 63}, + {-918, 377, 11}, {-1145, 392, 66}, {-866, 384, -129}, {-768, 485, -290}, + {-796, 530, -255}, {-900, 510, -141}, {-970, 376, -113}, {-891, 346, -100}, + {-797, 395, -38}, {-774, 526, -58}, {-837, 453, -35}, {-840, 405, 9}, + {-844, 380, 31}, {-854, 443, 22}, {-892, 420, 43}, {-889, 378, 65}, + {-872, 362, 99}, {-841, 375, 101}, {-1106, 546, 141}, {-936, 614, 132}, + {-945, 643, 140}, {-825, 713, 168}, {-854, 725, 255}, {-891, 784, 293}, + {-835, 912, 310}, {-788, 924, 269}, {-691, 953, 207}, {-603, 999, 171}, }; - // Clear out the app event queue // This is necessary so that our app queue doesn't overflow while we are deep inside a test // routine feeding in accel data and advancing the clock. We can get our queue full of health @@ -566,7 +189,6 @@ static void prv_clear_event_queue(void) { event_queue_cleanup_and_reset(app_manager_get_task_context()->to_process_event_queue); } - // ------------------------------------------------------------------------------- // Run the minute callback enough times to cause everything that is normally periodically // recomputed (walking rate, sleep, etc.) to be recomputed @@ -576,17 +198,16 @@ static void prv_force_periodic_updates(void) { } } - // ------------------------------------------------------------------------------- // Feed in N seconds of idle movement static void prv_feed_idle_movement_sec(uint32_t seconds) { AccelRawData idle[SAMPLES_PER_SECOND]; for (int i = 0; i < SAMPLES_PER_SECOND; i++) { - idle[i] = (AccelRawData) { - .x = i % 100, - .y = i % 100, - .z = i % 100, + idle[i] = (AccelRawData){ + .x = i % 100, + .y = i % 100, + .z = i % 100, }; } @@ -595,7 +216,6 @@ static void prv_feed_idle_movement_sec(uint32_t seconds) { } } - // ------------------------------------------------------------------------------- // Feed in N minutes of walking movement static void prv_feed_steps_min(uint32_t minutes) { @@ -664,7 +284,6 @@ static void prv_feed_deep_sleep_min(uint32_t minutes) { } } - // ------------------------------------------------------------------------------- static void prv_test_steps(void *context) { bool passed = false; @@ -685,7 +304,7 @@ static void prv_test_steps(void *context) { steps = health_service_sum_today(HealthMetricStepCount); steps -= before; - PBL_LOG_DBG("steps: %"PRId32, steps); + PBL_LOG_DBG("steps: %" PRId32, steps); if (steps >= 27 && steps <= 33) { passed = true; } @@ -693,7 +312,6 @@ static void prv_test_steps(void *context) { prv_test_end(context, passed); } - // ------------------------------------------------------------------------------- static void prv_test_30_min_walk(void *context) { bool passed = false; @@ -719,7 +337,7 @@ static void prv_test_30_min_walk(void *context) { int32_t steps; steps = health_service_sum_today(HealthMetricStepCount); steps -= before; - PBL_LOG_DBG("steps: %"PRId32, steps); + PBL_LOG_DBG("steps: %" PRId32, steps); if (steps >= ((8 * k_steps_per_minute * k_num_minutes) / 10)) { passed = true; } @@ -730,7 +348,6 @@ static void prv_test_30_min_walk(void *context) { prv_test_end(context, passed); } - // ------------------------------------------------------------------------------- static void prv_test_sleep(void *context) { bool passed = true; @@ -783,17 +400,17 @@ static void prv_test_sleep(void *context) { deep_sleep -= before_deep; PBL_LOG_DBG("total: %d, deep: %d", (int)total_sleep / SECONDS_PER_MINUTE, - (int)deep_sleep / SECONDS_PER_MINUTE); + (int)deep_sleep / SECONDS_PER_MINUTE); const int k_min_total_sleep_min = 240; const int k_max_total_sleep_min = 280; const int k_min_deep_sleep_min = 40; const int k_max_deep_sleep_min = 80; - if ((total_sleep < k_min_total_sleep_min * SECONDS_PER_MINUTE) - || (total_sleep > k_max_total_sleep_min * SECONDS_PER_MINUTE)) { + if ((total_sleep < k_min_total_sleep_min * SECONDS_PER_MINUTE) || + (total_sleep > k_max_total_sleep_min * SECONDS_PER_MINUTE)) { passed = false; } - if ((deep_sleep < k_min_deep_sleep_min * SECONDS_PER_MINUTE) - || (deep_sleep > k_max_deep_sleep_min * SECONDS_PER_MINUTE)) { + if ((deep_sleep < k_min_deep_sleep_min * SECONDS_PER_MINUTE) || + (deep_sleep > k_max_deep_sleep_min * SECONDS_PER_MINUTE)) { passed = false; } @@ -813,7 +430,6 @@ static void prv_test_sleep(void *context) { prv_test_end(context, passed); } - // ------------------------------------------------------------------------------- // Test that we don't crash or get a weird sleep session if the UTC time changes while // sleeping @@ -844,12 +460,12 @@ static void prv_test_sleep_time_change(void *context) { // Sleep a little more, should not crash prv_feed_steps_min(90); - prv_feed_steps_min(20); // wake up + prv_feed_steps_min(20); // wake up // Make sure we registered sleep int32_t value; activity_get_metric(ActivityMetricSleepTotalSeconds, 1, &value); - PBL_LOG_DBG("sleep total: %"PRIi32" ", value); + PBL_LOG_DBG("sleep total: %" PRIi32 " ", value); if (value < (60 * SECONDS_PER_MINUTE) || value > (100 * SECONDS_PER_MINUTE)) { passed = false; } @@ -857,7 +473,6 @@ static void prv_test_sleep_time_change(void *context) { prv_test_end(context, passed); } - // --------------------------------------------------------------------------------- static void prv_count_sleep_sessions(time_t after_time, int *num_sleep, int *num_nap) { *num_sleep = 0; @@ -873,26 +488,25 @@ static void prv_count_sleep_sessions(time_t after_time, int *num_sleep, int *num PBL_LOG_DBG("Looking for sessions..."); for (uint32_t i = 0; i < session_entries; i++) { ActivitySession *session = &sessions[i]; - PBL_LOG_DBG(" Found session type: %d, start_min: %d, length_min: %"PRIu16" ", - (int)session->type, time_util_get_minute_of_day(session->start_utc), - session->length_min); + PBL_LOG_DBG(" Found session type: %d, start_min: %d, length_min: %" PRIu16 " ", + (int)session->type, time_util_get_minute_of_day(session->start_utc), + session->length_min); if (session->start_utc < after_time) { PBL_LOG_DBG(" Ignoring because too old"); continue; } - if ((session->type == ActivitySessionType_Sleep) - || (session->type == ActivitySessionType_RestfulSleep)) { + if ((session->type == ActivitySessionType_Sleep) || + (session->type == ActivitySessionType_RestfulSleep)) { (*num_sleep)++; } - if ((session->type == ActivitySessionType_Nap) - || (session->type == ActivitySessionType_RestfulNap)) { + if ((session->type == ActivitySessionType_Nap) || + (session->type == ActivitySessionType_RestfulNap)) { (*num_nap)++; } } PBL_LOG_DBG("Done looking for sessions"); } - // ------------------------------------------------------------------------------- static void prv_test_nap(void *context) { bool passed = true; @@ -908,8 +522,9 @@ static void prv_test_nap(void *context) { // Go to one hour after the time sleeps are considered naps if we aren't currently in it if (!WITHIN(now_utc, nap_time_start, nap_time_end)) { - const time_t next_nap_time = (nap_time_start < now_utc ? nap_time_start + SECONDS_PER_DAY : - nap_time_start) + SECONDS_PER_HOUR; + const time_t next_nap_time = + (nap_time_start < now_utc ? nap_time_start + SECONDS_PER_DAY : nap_time_start) + + SECONDS_PER_HOUR; rtc_set_time(next_nap_time); } @@ -935,8 +550,7 @@ static void prv_test_nap(void *context) { prv_count_sleep_sessions(test_start_utc, &sleep_count, &nap_count); PBL_LOG_DBG("Found %d sleep sessions and %d nap sessions", sleep_count, nap_count); if (nap_count > 0 || sleep_count == 0) { - PBL_LOG_ERR("FAILED: expected only sleep but got %d naps and %d sleep", nap_count, - sleep_count); + PBL_LOG_ERR("FAILED: expected only sleep but got %d naps and %d sleep", nap_count, sleep_count); prv_test_end(context, false); return; } @@ -948,8 +562,7 @@ static void prv_test_nap(void *context) { prv_count_sleep_sessions(test_start_utc, &sleep_count, &nap_count); PBL_LOG_DBG("Found %d sleep sessions and %d nap sessions", sleep_count, nap_count); if (nap_count == 0 || sleep_count > 0) { - PBL_LOG_ERR("FAILED: expected only naps but got %d nap and %d sleep", nap_count, - sleep_count); + PBL_LOG_ERR("FAILED: expected only naps but got %d nap and %d sleep", nap_count, sleep_count); prv_test_end(context, false); return; } @@ -972,23 +585,13 @@ static void prv_test_sleep_reward(void *context) { // History with low median but good sleep over the past few days ActivitySettingsValueHistory sleep_history = { - .utc_sec = rtc_get_time(), - .values = { - 0, // This ends up overwritten anyway by the current sleep value - GOOD_SLEEP, - GOOD_SLEEP, - GOOD_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP - } + .utc_sec = rtc_get_time(), + .values = { + 0, // This ends up overwritten anyway by the current sleep value + GOOD_SLEEP, GOOD_SLEEP, GOOD_SLEEP, AVERAGE_SLEEP, AVERAGE_SLEEP, AVERAGE_SLEEP, + AVERAGE_SLEEP, AVERAGE_SLEEP, AVERAGE_SLEEP, AVERAGE_SLEEP, AVERAGE_SLEEP, AVERAGE_SLEEP, + AVERAGE_SLEEP + } }; // Reset all stored data @@ -1028,20 +631,12 @@ static void prv_test_activity_reward(void *context) { // History with low median ActivitySettingsValueHistory step_history = { - .utc_sec = rtc_get_time(), - .values = { - 0, // This ends up overwritten anyway by the current sleep value - AVERAGE_STEPS, - AVERAGE_STEPS, - AVERAGE_STEPS, - AVERAGE_STEPS, - AVERAGE_STEPS, - AVERAGE_STEPS, - AVERAGE_STEPS, - AVERAGE_STEPS, - AVERAGE_STEPS, - AVERAGE_STEPS - } + .utc_sec = rtc_get_time(), + .values = { + 0, // This ends up overwritten anyway by the current sleep value + AVERAGE_STEPS, AVERAGE_STEPS, AVERAGE_STEPS, AVERAGE_STEPS, AVERAGE_STEPS, AVERAGE_STEPS, + AVERAGE_STEPS, AVERAGE_STEPS, AVERAGE_STEPS, AVERAGE_STEPS + } }; // Reset all stored data @@ -1083,14 +678,11 @@ static void prv_test_sleep_summary(void *context) { // History with low median but good sleep over the past few days ActivitySettingsValueHistory sleep_history = { - .utc_sec = rtc_get_time(), - .values = { - 0, // This ends up overwritten anyway by the current sleep value - AVERAGE_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP, - AVERAGE_SLEEP - } + .utc_sec = rtc_get_time(), + .values = { + 0, // This ends up overwritten anyway by the current sleep value + AVERAGE_SLEEP, AVERAGE_SLEEP, AVERAGE_SLEEP, AVERAGE_SLEEP + } }; // Reset all stored data @@ -1144,7 +736,6 @@ static void prv_test_fill_sleep(void *context) { prv_test_end(context, success); } - // ------------------------------------------------------------------------------- static void select_click_handler(ClickRecognizerRef recognizer, void *context) { } @@ -1157,7 +748,6 @@ static void up_click_handler(ClickRecognizerRef recognizer, void *context) { static void down_click_handler(ClickRecognizerRef recognizer, void *context) { } - // ------------------------------------------------------------------------------- static void click_config_provider(void *context) { window_single_click_subscribe(BUTTON_ID_SELECT, select_click_handler); @@ -1165,24 +755,20 @@ static void click_config_provider(void *context) { window_single_click_subscribe(BUTTON_ID_DOWN, down_click_handler); } - // ------------------------------------------------------------------------------- -static void prv_health_event_handler(HealthEventType event, - void *context) { +static void prv_health_event_handler(HealthEventType event, void *context) { ActivityTestAppData *data = (ActivityTestAppData *)context; // Test the sum function if (event == HealthEventMovementUpdate) { int32_t steps_today = health_service_sum_today(HealthMetricStepCount); - APP_LOG(APP_LOG_LEVEL_DEBUG, "Got steps update event.(today value: %d)", - (int) steps_today); + APP_LOG(APP_LOG_LEVEL_DEBUG, "Got steps update event.(today value: %d)", (int)steps_today); data->steps_updated_value = steps_today; } } - // ------------------------------------------------------------------------------- // Tests typedef struct { @@ -1191,40 +777,30 @@ typedef struct { } TestEntry; static TestEntry s_test_entries[] = { - { - .title = "steps", - .callback = prv_test_steps, - }, { - .title = "30m walk", - .callback = prv_test_30_min_walk, - }, { - .title = "sleep", - .callback = prv_test_sleep, - }, { - .title = "nap", - .callback = prv_test_nap, - }, { - .title = "fill sleep", - .callback = prv_test_fill_sleep - }, { - .title = "sleep reward", - .callback = prv_test_sleep_reward - }, { - .title = "activity reward", - .callback = prv_test_activity_reward - }, { - .title = "sleep summary", - .callback = prv_test_sleep_summary - }, { - .title = "activity summary", - .callback = prv_test_activity_summary - }, { - .title = "sleep, w/time chg", - .callback = prv_test_sleep_time_change - } + { + .title = "steps", + .callback = prv_test_steps, + }, + { + .title = "30m walk", + .callback = prv_test_30_min_walk, + }, + { + .title = "sleep", + .callback = prv_test_sleep, + }, + { + .title = "nap", + .callback = prv_test_nap, + }, + {.title = "fill sleep", .callback = prv_test_fill_sleep}, + {.title = "sleep reward", .callback = prv_test_sleep_reward}, + {.title = "activity reward", .callback = prv_test_activity_reward}, + {.title = "sleep summary", .callback = prv_test_sleep_summary}, + {.title = "activity summary", .callback = prv_test_activity_summary}, + {.title = "sleep, w/time chg", .callback = prv_test_sleep_time_change} }; - // ------------------------------------------------------------------------------- static void prv_test_begin(int index, void *context) { ActivityTestAppData *data = (ActivityTestAppData *)context; @@ -1238,19 +814,17 @@ static void prv_test_begin(int index, void *context) { app_timer_register(0, s_test_entries[index].callback, context); } - // ------------------------------------------------------------------------------- static void prv_test_end(void *context, bool passed) { ActivityTestAppData *data = (ActivityTestAppData *)context; - const char *result_str = passed ? "PASS" : "FAIL"; + const char *result_str = passed ? "PASS" : "FAIL"; PBL_LOG_DBG("Test result: %s", result_str); data->menu_items[data->test_index].subtitle = result_str; layer_mark_dirty(simple_menu_layer_get_layer(data->menu_layer)); } - // ------------------------------------------------------------------------------- static void prv_window_load(Window *window) { ActivityTestAppData *data = window_get_user_data(window); @@ -1262,10 +836,7 @@ static void prv_window_load(Window *window) { // Create the menu items SimpleMenuItem *menu_items = app_malloc_check(num_tests * sizeof(SimpleMenuItem)); for (uint32_t i = 0; i < num_tests; i++) { - menu_items[i] = (SimpleMenuItem) { - .title = s_test_entries[i].title, - .callback = prv_test_begin - }; + menu_items[i] = (SimpleMenuItem){.title = s_test_entries[i].title, .callback = prv_test_begin}; } static SimpleMenuSection sections; sections.items = menu_items; @@ -1283,7 +854,6 @@ static void prv_window_load(Window *window) { health_service_events_subscribe(prv_health_event_handler, data); } - // ------------------------------------------------------------------------------- static void prv_window_unload(Window *window) { ActivityTestAppData *data = window_get_user_data(window); @@ -1296,7 +866,6 @@ static void prv_window_unload(Window *window) { activity_start_tracking(false /*test_mode*/); } - // ------------------------------------------------------------------------------- static void deinit(void) { ActivityTestAppData *data = app_state_get_user_data(); @@ -1304,7 +873,6 @@ static void deinit(void) { app_free(data); } - // ------------------------------------------------------------------------------- static void init(void) { ActivityTestAppData *data = app_malloc_check(sizeof(ActivityTestAppData)); @@ -1315,15 +883,14 @@ static void init(void) { data->window = window_create(); window_set_user_data(data->window, data); window_set_click_config_provider_with_context(data->window, click_config_provider, data); - window_set_window_handlers(data->window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(data->window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); app_window_stack_push(data->window, true /* Animated */); } - // ------------------------------------------------------------------------------- static void s_main(void) { init(); @@ -1331,12 +898,11 @@ static void s_main(void) { deinit(); } - // ------------------------------------------------------------------------------- -const PebbleProcessMd* activity_test_get_app_info(void) { +const PebbleProcessMd *activity_test_get_app_info(void) { static const PebbleProcessMdSystem s_activity_test_app_info = { - .common.main_func = &s_main, - .name = "ActivityTest" + .common.main_func = &s_main, + .name = "ActivityTest" }; - return (const PebbleProcessMd*) &s_activity_test_app_info; + return (const PebbleProcessMd *)&s_activity_test_app_info; } diff --git a/src/fw/apps/demo/activity_test/activity_test.h b/src/fw/apps/demo/activity_test/activity_test.h index 5c7ba998d1..903249dd9b 100644 --- a/src/fw/apps/demo/activity_test/activity_test.h +++ b/src/fw/apps/demo/activity_test/activity_test.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* activity_test_get_app_info(void); +const PebbleProcessMd *activity_test_get_app_info(void); diff --git a/src/fw/apps/demo/amb_light_read/ambient_light_reading.c b/src/fw/apps/demo/amb_light_read/ambient_light_reading.c index 1774317bd1..d8e1192b3e 100644 --- a/src/fw/apps/demo/amb_light_read/ambient_light_reading.c +++ b/src/fw/apps/demo/amb_light_read/ambient_light_reading.c @@ -41,8 +41,7 @@ static void handle_init(void) { Layer *window_layer = window_get_root_layer(data->window); GRect bounds = window_layer->bounds; - data->text_layer = text_layer_create((GRect) - { .origin = { 0, 40 }, .size = { bounds.size.w, 100 } }); + data->text_layer = text_layer_create((GRect){.origin = {0, 40}, .size = {bounds.size.w, 100}}); prv_populate_amb_read_str(&data->ambient_reading[0]); @@ -70,10 +69,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* ambient_light_reading_get_info() { +const PebbleProcessMd *ambient_light_reading_get_info() { static const PebbleProcessMdSystem s_ambient_light_info = { - .common.main_func = s_main, - .name = "Amb Reading" + .common.main_func = s_main, + .name = "Amb Reading" }; - return (const PebbleProcessMd*) &s_ambient_light_info; + return (const PebbleProcessMd *)&s_ambient_light_info; } diff --git a/src/fw/apps/demo/animated_demo/animated_demo.c b/src/fw/apps/demo/animated_demo/animated_demo.c index f9359d18d8..2df3caedf1 100644 --- a/src/fw/apps/demo/animated_demo/animated_demo.c +++ b/src/fw/apps/demo/animated_demo/animated_demo.c @@ -33,10 +33,10 @@ static void animation_stopped(Animation *animation, bool finished, AnimatedDemoD AnimationProgress animation_bounce(AnimationProgress linear_distance) { // An awful linear "bounce-like" animation - if (linear_distance < ANIMATION_NORMALIZED_MAX/2) { + if (linear_distance < ANIMATION_NORMALIZED_MAX / 2) { return linear_distance * 2; - } else if (linear_distance < ANIMATION_NORMALIZED_MAX * 3/4) { - return ANIMATION_NORMALIZED_MAX * 3/2 - linear_distance; + } else if (linear_distance < ANIMATION_NORMALIZED_MAX * 3 / 4) { + return ANIMATION_NORMALIZED_MAX * 3 / 2 - linear_distance; } else { return linear_distance; } @@ -95,10 +95,12 @@ static void click_handler(ClickRecognizerRef recognizer, Window *window) { animation_set_delay(animation, 1000); */ - animation_set_handlers(animation, (AnimationHandlers) { - .started = (AnimationStartedHandler) animation_started, - .stopped = (AnimationStoppedHandler) animation_stopped, - }, data); + animation_set_handlers(animation, + (AnimationHandlers){ + .started = (AnimationStartedHandler)animation_started, + .stopped = (AnimationStoppedHandler)animation_stopped, + }, + data); animation_schedule(animation); } @@ -122,17 +124,17 @@ static void config_provider(Window *window) { } static void handle_init(void) { - AnimatedDemoData *data = (AnimatedDemoData*) app_malloc_check(sizeof(AnimatedDemoData)); + AnimatedDemoData *data = (AnimatedDemoData *)app_malloc_check(sizeof(AnimatedDemoData)); data->toggle = false; app_state_set_user_data(data); Window *window = &data->window; window_init(window, WINDOW_NAME("Animated Demo")); window_set_user_data(window, data); - window_set_click_config_provider(window, (ClickConfigProvider) config_provider); + window_set_click_config_provider(window, (ClickConfigProvider)config_provider); window_set_window_handlers(window, &(WindowHandlers){ - .load = animated_demo_window_load, - }); + .load = animated_demo_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -150,10 +152,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* animated_demo_get_app_info() { +const PebbleProcessMd *animated_demo_get_app_info() { static const PebbleProcessMdSystem animated_demo_app_info = { - .common.main_func = s_main, - .name = "Animation Demo" + .common.main_func = s_main, + .name = "Animation Demo" }; - return (const PebbleProcessMd*) &animated_demo_app_info; + return (const PebbleProcessMd *)&animated_demo_app_info; } diff --git a/src/fw/apps/demo/animated_demo/animated_demo.h b/src/fw/apps/demo/animated_demo/animated_demo.h index bb96dbfe96..ca3ba3c287 100644 --- a/src/fw/apps/demo/animated_demo/animated_demo.h +++ b/src/fw/apps/demo/animated_demo/animated_demo.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* animated_demo_get_app_info(); +const PebbleProcessMd *animated_demo_get_app_info(); diff --git a/src/fw/apps/demo/app_heap_demo/heap_demo.c b/src/fw/apps/demo/app_heap_demo/heap_demo.c index 5d629df328..a2329b4181 100644 --- a/src/fw/apps/demo/app_heap_demo/heap_demo.c +++ b/src/fw/apps/demo/app_heap_demo/heap_demo.c @@ -17,7 +17,7 @@ static TextLayer *text_heap_info; static Window *window; static void init(void) { - char *start = app_malloc_check(1); // Get a pointer close to where the heap starts + char *start = app_malloc_check(1); // Get a pointer close to where the heap starts window = window_create(); app_window_stack_push(window, true /* Animated */); @@ -30,10 +30,11 @@ static void init(void) { // Get the size of the heap from the beginning of the first thing allocated unsigned long heap_size = 0x20020000 - (unsigned long)start; - unsigned long alloc_size = 0.75*heap_size; + unsigned long alloc_size = 0.75 * heap_size; char *buf = app_malloc_check(alloc_size); - snprintf(buf, 80, "%luB/%luB\n\nJust allocated %lu%% of the app heap.", alloc_size, heap_size, 100*alloc_size/heap_size); + snprintf(buf, 80, "%luB/%luB\n\nJust allocated %lu%% of the app heap.", alloc_size, heap_size, + 100 * alloc_size / heap_size); text_layer_set_text(text_heap_info, buf); layer_add_child(window_layer, text_layer_get_layer(text_heap_info)); } @@ -48,10 +49,10 @@ static void s_main(void) { deinit(); } -const PebbleProcessMd* app_heap_demo_app_get_info(void) { +const PebbleProcessMd *app_heap_demo_app_get_info(void) { static const PebbleProcessMdSystem s_app_heap_demo_app_info = { - .common.main_func = &s_main, - .name = "AppHeap" + .common.main_func = &s_main, + .name = "AppHeap" }; - return (const PebbleProcessMd*) &s_app_heap_demo_app_info; + return (const PebbleProcessMd *)&s_app_heap_demo_app_info; } diff --git a/src/fw/apps/demo/app_heap_demo/heap_demo.h b/src/fw/apps/demo/app_heap_demo/heap_demo.h index 738aee5028..d21229edaf 100644 --- a/src/fw/apps/demo/app_heap_demo/heap_demo.h +++ b/src/fw/apps/demo/app_heap_demo/heap_demo.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* app_heap_demo_app_get_info(void); +const PebbleProcessMd *app_heap_demo_app_get_info(void); diff --git a/src/fw/apps/demo/bouncing_box_demo/bouncing_box.c b/src/fw/apps/demo/bouncing_box_demo/bouncing_box.c index 7dd0be75d2..b7d9917e6b 100644 --- a/src/fw/apps/demo/bouncing_box_demo/bouncing_box.c +++ b/src/fw/apps/demo/bouncing_box_demo/bouncing_box.c @@ -25,8 +25,8 @@ typedef struct AppData { } AppData; static void prv_change_color(AppData *data) { - data->color++; // next RGB value (in lower 6 bits, might overflow to most significant 2 bits) - data->color |= (uint8_t)0b11000000; // make sure color is always 100% opaque + data->color++; // next RGB value (in lower 6 bits, might overflow to most significant 2 bits) + data->color |= (uint8_t)0b11000000; // make sure color is always 100% opaque } static void prv_move_rect(AppData *data) { @@ -49,7 +49,7 @@ static void prv_move_rect(AppData *data) { } } -static void layer_update_proc(Layer *layer, GContext* ctx) { +static void layer_update_proc(Layer *layer, GContext *ctx) { AppData *data = app_state_get_user_data(); graphics_context_set_fill_color(ctx, GColorWhite); @@ -62,7 +62,6 @@ static void layer_update_proc(Layer *layer, GContext* ctx) { graphics_draw_rect(ctx, &data->box_rect); } - void prv_redraw_timer_cb(void *cb_data) { AppData *data = app_state_get_user_data(); @@ -97,11 +96,10 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* bouncing_box_demo_get_app_info(void) { +const PebbleProcessMd *bouncing_box_demo_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = s_main, - .name = "Bouncing Box" + .common.main_func = s_main, + .name = "Bouncing Box" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/demo/bouncing_box_demo/bouncing_box.h b/src/fw/apps/demo/bouncing_box_demo/bouncing_box.h index a1ecd3d78e..e46aa9fc6e 100644 --- a/src/fw/apps/demo/bouncing_box_demo/bouncing_box.h +++ b/src/fw/apps/demo/bouncing_box_demo/bouncing_box.h @@ -5,5 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* bouncing_box_demo_get_app_info(void); - +const PebbleProcessMd *bouncing_box_demo_get_app_info(void); diff --git a/src/fw/apps/demo/click/click.c b/src/fw/apps/demo/click/click.c index 64fa1d9a82..aba60eb7d2 100644 --- a/src/fw/apps/demo/click/click.c +++ b/src/fw/apps/demo/click/click.c @@ -104,29 +104,43 @@ static void config_provider(Window *window) { // See ui/click.h for more information and default values. // single click / repeat-on-hold config: - window_single_repeating_click_subscribe(BUTTON_ID_SELECT, 1000, (ClickHandler)select_single_click_handler); // "hold-to-repeat" gets overriden if there's a long click handler configured! + window_single_repeating_click_subscribe( + BUTTON_ID_SELECT, 1000, + (ClickHandler)select_single_click_handler); // "hold-to-repeat" gets overriden if there's a + // long click handler configured! // multi click config: - window_multi_click_subscribe(BUTTON_ID_SELECT, 2, 10, 0, false, (ClickHandler) select_multi_click_handler); + window_multi_click_subscribe(BUTTON_ID_SELECT, 2, 10, 0, false, + (ClickHandler)select_multi_click_handler); // long click config: - window_long_click_subscribe(BUTTON_ID_SELECT, 700, (ClickHandler) select_long_click_handler, (ClickHandler) select_long_click_release_handler); + window_long_click_subscribe(BUTTON_ID_SELECT, 700, (ClickHandler)select_long_click_handler, + (ClickHandler)select_long_click_release_handler); // single click / repeat-on-hold config: - window_single_repeating_click_subscribe(BUTTON_ID_UP, 1000, (ClickHandler) select_single_click_handler); // "hold-to-repeat" gets overriden if there's a long click handler configured! + window_single_repeating_click_subscribe( + BUTTON_ID_UP, 1000, + (ClickHandler)select_single_click_handler); // "hold-to-repeat" gets overriden if there's a + // long click handler configured! // multi click config: - window_multi_click_subscribe(BUTTON_ID_UP, 2, 10, 0, true, (ClickHandler) select_multi_click_handler); + window_multi_click_subscribe(BUTTON_ID_UP, 2, 10, 0, true, + (ClickHandler)select_multi_click_handler); // raw: - window_raw_click_subscribe(BUTTON_ID_DOWN, (ClickHandler) raw_down_click_handler, (ClickHandler) raw_up_click_handler, NULL); + window_raw_click_subscribe(BUTTON_ID_DOWN, (ClickHandler)raw_down_click_handler, + (ClickHandler)raw_up_click_handler, NULL); } static void prv_window_load(Window *window) { ClickAppData *data = window_get_user_data(window); TextLayer *text = &data->text; text_layer_init(text, &window->layer.bounds); - text_layer_set_text(text, "Use select button and try different clicks: single, hold-to-repeat, multiple, long press, etc.\n\nNOTE: a long click config will override hold-to-repeat config. Comment out the long_click section of the config to enable hold-to-repeat."); + text_layer_set_text( + text, + "Use select button and try different clicks: single, hold-to-repeat, multiple, long press, " + "etc.\n\nNOTE: a long click config will override hold-to-repeat config. Comment out the " + "long_click section of the config to enable hold-to-repeat."); layer_add_child(&window->layer, &text->layer); } @@ -134,10 +148,10 @@ static void push_window(ClickAppData *data) { Window *window = &data->window; window_init(window, WINDOW_NAME("Click Demo")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); - window_set_click_config_provider(window, (ClickConfigProvider) config_provider); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); + window_set_click_config_provider(window, (ClickConfigProvider)config_provider); const bool animated = true; app_window_stack_push(window, animated); } @@ -146,7 +160,7 @@ static void push_window(ClickAppData *data) { // App boilerplate static void handle_init(void) { - ClickAppData *data = (ClickAppData*) app_malloc_check(sizeof(ClickAppData)); + ClickAppData *data = (ClickAppData *)app_malloc_check(sizeof(ClickAppData)); if (data == NULL) { PBL_CROAK("Out of memory"); } @@ -167,12 +181,12 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* click_app_get_info() { +const PebbleProcessMd *click_app_get_info() { static const PebbleProcessMdSystem s_click_app_info = { - .common.main_func = s_main, - .name = "Clicks" + .common.main_func = s_main, + .name = "Clicks" }; - return (const PebbleProcessMd*) &s_click_app_info; + return (const PebbleProcessMd *)&s_click_app_info; } #undef TEXT_BUFFER_SIZE diff --git a/src/fw/apps/demo/click/click.h b/src/fw/apps/demo/click/click.h index e3d03701ef..afd7fb346c 100644 --- a/src/fw/apps/demo/click/click.h +++ b/src/fw/apps/demo/click/click.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* click_app_get_info(); +const PebbleProcessMd *click_app_get_info(); diff --git a/src/fw/apps/demo/data_logging_test/data_logging_test.c b/src/fw/apps/demo/data_logging_test/data_logging_test.c index f5a3335966..badba04c42 100644 --- a/src/fw/apps/demo/data_logging_test/data_logging_test.c +++ b/src/fw/apps/demo/data_logging_test/data_logging_test.c @@ -33,8 +33,8 @@ static uint32_t crc_update(uint32_t crc, const uint8_t *data, uint32_t length) { uint32_t num_whole_word_bytes = length / 4; while (num_whole_word_bytes--) { - crc = crc ^ *((uint32_t*)data); - for(int bit = 0; bit < 32; ++bit) { + crc = crc ^ *((uint32_t *)data); + for (int bit = 0; bit < 32; ++bit) { if ((crc & 0x80000000) != 0) { crc = (crc << 1) ^ CRC_POLY; } else { @@ -49,7 +49,7 @@ static uint32_t crc_update(uint32_t crc, const uint8_t *data, uint32_t length) { for (unsigned int i = 0; i < num_remainder_bytes; ++i) { last_word = (last_word << 8) | data[i]; } - return crc_update(crc, (uint8_t*)&last_word, 4); + return crc_update(crc, (uint8_t *)&last_word, 4); } return crc & 0xffffffff; @@ -93,13 +93,14 @@ static void handle_timer(void *ck) { // Sessions closed. return; } - struct DataLoggingInfo*info = ck; + struct DataLoggingInfo *info = ck; log_moar_data(info); const int num_chunks = 30; - snprintf(info->text, sizeof(info->text), "%lu (%i) %i/%i", info->crc, info->counter * s_chunk_size, info->counter, num_chunks); + snprintf(info->text, sizeof(info->text), "%lu (%i) %i/%i", info->crc, + info->counter * s_chunk_size, info->counter, num_chunks); text_layer_set_text(&info->text_layer, info->text); if (info->counter < num_chunks) { @@ -119,7 +120,9 @@ static void close_sessions(void) { static void start_logging(void) { const uint8_t item_size[] = {4, 2, 16}; - const DataLoggingItemType types[] = {DATA_LOGGING_INT, DATA_LOGGING_UINT, DATA_LOGGING_BYTE_ARRAY}; + const DataLoggingItemType types[] = { + DATA_LOGGING_INT, DATA_LOGGING_UINT, DATA_LOGGING_BYTE_ARRAY + }; for (int i = 0; i < 3; ++i) { text_layer_set_text(&s_data.info[i].text_layer, "Empty"); @@ -128,9 +131,9 @@ static void start_logging(void) { } // start timers - app_timer_register(2000 /* milliseconds */, handle_timer, (void *) &s_data.info[0]); - app_timer_register(1500 /* milliseconds */, handle_timer, (void *) &s_data.info[1]); - app_timer_register(4500 /* milliseconds */, handle_timer, (void *) &s_data.info[2]); + app_timer_register(2000 /* milliseconds */, handle_timer, (void *)&s_data.info[0]); + app_timer_register(1500 /* milliseconds */, handle_timer, (void *)&s_data.info[1]); + app_timer_register(4500 /* milliseconds */, handle_timer, (void *)&s_data.info[2]); text_layer_set_text(&s_data.log_layer, "Logging..."); } @@ -147,10 +150,9 @@ static void click_config_provider(void *context) { window_single_click_subscribe(BUTTON_ID_SELECT, select_click_handler); } - static void handle_deinit(void) { - comm_session_set_responsiveness(comm_session_get_system_session(), BtConsumerApp, - ResponseTimeMax, MAX_PERIOD_RUN_FOREVER); + comm_session_set_responsiveness(comm_session_get_system_session(), BtConsumerApp, ResponseTimeMax, + MAX_PERIOD_RUN_FOREVER); } static void handle_init(void) { @@ -171,14 +173,14 @@ static void handle_init(void) { layer_add_child(&s_data.window.layer, &s_data.info[i].text_layer.layer); } - text_layer_init(&s_data.log_layer, &GRect(0, bounds->size.w / 2, bounds->size.w, - bounds->size.w / 2)); + text_layer_init(&s_data.log_layer, + &GRect(0, bounds->size.w / 2, bounds->size.w, bounds->size.w / 2)); layer_add_child(&s_data.window.layer, &s_data.log_layer.layer); start_logging(); - comm_session_set_responsiveness(comm_session_get_system_session(), BtConsumerApp, - ResponseTimeMax, MAX_PERIOD_RUN_FOREVER); + comm_session_set_responsiveness(comm_session_get_system_session(), BtConsumerApp, ResponseTimeMax, + MAX_PERIOD_RUN_FOREVER); } //////////////////// @@ -192,12 +194,13 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* data_logging_test_get_info() { +const PebbleProcessMd *data_logging_test_get_info() { static const PebbleProcessMdSystem s_app_info = { - // UUID: 01020304-0506-0708-0910-111213141516 - .common.uuid = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16}, - .common.main_func = &s_main, - .name = "Data Logging Test" + // UUID: 01020304-0506-0708-0910-111213141516 + .common.uuid = + {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16}, + .common.main_func = &s_main, + .name = "Data Logging Test" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/data_logging_test/data_logging_test.h b/src/fw/apps/demo/data_logging_test/data_logging_test.h index 7f9cb0f99a..0cc74fd623 100644 --- a/src/fw/apps/demo/data_logging_test/data_logging_test.h +++ b/src/fw/apps/demo/data_logging_test/data_logging_test.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* data_logging_test_get_info(); +const PebbleProcessMd *data_logging_test_get_info(); diff --git a/src/fw/apps/demo/deadlock/deadlock.c b/src/fw/apps/demo/deadlock/deadlock.c index 0bf455ab5b..668a2dd733 100644 --- a/src/fw/apps/demo/deadlock/deadlock.c +++ b/src/fw/apps/demo/deadlock/deadlock.c @@ -45,10 +45,7 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* deadlock_get_app_info(void) { - static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "Deadlock" - }; - return (const PebbleProcessMd*) &s_app_info; +const PebbleProcessMd *deadlock_get_app_info(void) { + static const PebbleProcessMdSystem s_app_info = {.common.main_func = &s_main, .name = "Deadlock"}; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/deadlock/deadlock.h b/src/fw/apps/demo/deadlock/deadlock.h index 89a84b01fa..8e9b09f85a 100644 --- a/src/fw/apps/demo/deadlock/deadlock.h +++ b/src/fw/apps/demo/deadlock/deadlock.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* deadlock_get_app_info(void); +const PebbleProcessMd *deadlock_get_app_info(void); diff --git a/src/fw/apps/demo/demo_images/Drake_after_01.png.h b/src/fw/apps/demo/demo_images/Drake_after_01.png.h index d1a8911d07..972d00b686 100644 --- a/src/fw/apps/demo/demo_images/Drake_after_01.png.h +++ b/src/fw/apps/demo/demo_images/Drake_after_01.png.h @@ -6,1938 +6,3862 @@ // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_Drake_after_01_pixels[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 16 - 32 */ - 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 32 - 48 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 48 - 64 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 64 - 80 */ - 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 80 - 96 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 96 - 112 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 112 - 128 */ - 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 128 - 144 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 144 - 160 */ - 0x14, 0xa8, 0x54, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 160 - 176 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 224 - 240 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 240 - 256 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 256 - 272 */ - 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 272 - 288 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x14, 0x3c, 0x14, /* bytes 288 - 304 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 304 - 320 */ - 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x54, 0x3c, 0xa8, 0x3c, /* bytes 320 - 336 */ - 0xa8, 0xa8, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 336 - 352 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 352 - 368 */ - 0x3c, 0x54, 0x3c, 0x54, 0x54, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, /* bytes 368 - 384 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 432 - 448 */ - 0x3c, 0xa8, 0xa8, 0xfc, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 448 - 464 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, /* bytes 464 - 480 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 480 - 496 */ - 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 496 - 512 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 512 - 528 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 528 - 544 */ - 0x54, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 544 - 560 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 560 - 576 */ - 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 576 - 592 */ - 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 608 - 624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 640 - 656 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 656 - 672 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 672 - 688 */ - 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 688 - 704 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 704 - 720 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 720 - 736 */ - 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x54, 0xa8, 0x3c, /* bytes 736 - 752 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 752 - 768 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 768 - 784 */ - 0xa8, 0x3c, 0x54, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, /* bytes 784 - 800 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 848 - 864 */ - 0x3c, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 864 - 880 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 880 - 896 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 896 - 912 */ - 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 912 - 928 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 928 - 944 */ - 0x0c, 0x3c, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 944 - 960 */ - 0x54, 0xa8, 0xa8, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 960 - 976 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 976 - 992 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 992 - 1008 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1008 - 1024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 1056 - 1072 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 1072 - 1088 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0x54, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 1088 - 1104 */ - 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 1104 - 1120 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x14, 0x14, 0x3c, 0x14, /* bytes 1120 - 1136 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 1136 - 1152 */ - 0x14, 0x54, 0x3c, 0x54, 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 1152 - 1168 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 1168 - 1184 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 1184 - 1200 */ - 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 1200 - 1216 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1248 - 1264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 1264 - 1280 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 1280 - 1296 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 1296 - 1312 */ - 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 1312 - 1328 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1328 - 1344 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1344 - 1360 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 1360 - 1376 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1376 - 1392 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, /* bytes 1392 - 1408 */ - 0x54, 0xa8, 0x14, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 1408 - 1424 */ - 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 1472 - 1488 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 1488 - 1504 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 1504 - 1520 */ - 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 1520 - 1536 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 1536 - 1552 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 1552 - 1568 */ - 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 1568 - 1584 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 1584 - 1600 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 1600 - 1616 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x54, /* bytes 1616 - 1632 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1648 - 1664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 1680 - 1696 */ - 0x3c, 0xa8, 0x54, 0xfc, 0xfc, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 1696 - 1712 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x3c, /* bytes 1712 - 1728 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 1728 - 1744 */ - 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1744 - 1760 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1760 - 1776 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 1776 - 1792 */ - 0x54, 0xa8, 0xa8, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1792 - 1808 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 1808 - 1824 */ - 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 1824 - 1840 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 1888 - 1904 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 1904 - 1920 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x54, 0x54, 0x3c, 0xa8, 0x3c, /* bytes 1920 - 1936 */ - 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 1936 - 1952 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 1952 - 1968 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 1968 - 1984 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 1984 - 2000 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x14, 0x14, 0x3c, 0x14, /* bytes 2000 - 2016 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 2016 - 2032 */ - 0x3c, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, /* bytes 2032 - 2048 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2048 - 2064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 2096 - 2112 */ - 0xa8, 0xa8, 0x0c, 0xfc, 0xa8, 0xfc, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 2112 - 2128 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 2128 - 2144 */ - 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 2144 - 2160 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2160 - 2176 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2176 - 2192 */ - 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 2192 - 2208 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2208 - 2224 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x54, 0xa8, /* bytes 2224 - 2240 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 2240 - 2256 */ - 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2288 - 2304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 2304 - 2320 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 2320 - 2336 */ - 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x54, /* bytes 2336 - 2352 */ - 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2352 - 2368 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 2368 - 2384 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 2384 - 2400 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 2400 - 2416 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 2416 - 2432 */ - 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0xa8, /* bytes 2432 - 2448 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2448 - 2464 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 2512 - 2528 */ - 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 2528 - 2544 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 2544 - 2560 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 2560 - 2576 */ - 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2576 - 2592 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2592 - 2608 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 2608 - 2624 */ - 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2624 - 2640 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 2640 - 2656 */ - 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 2656 - 2672 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2688 - 2704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 2720 - 2736 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 2736 - 2752 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 2752 - 2768 */ - 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 2768 - 2784 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, /* bytes 2784 - 2800 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 2800 - 2816 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x3c, 0xa8, 0x3c, /* bytes 2816 - 2832 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 2832 - 2848 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x3c, 0xa8, 0x54, 0x3c, 0xa8, 0xa8, 0xa8, /* bytes 2848 - 2864 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2864 - 2880 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 2928 - 2944 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 2944 - 2960 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 2960 - 2976 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0x3c, 0x14, 0xa8, /* bytes 2976 - 2992 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2992 - 3008 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3008 - 3024 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x54, 0xa8, /* bytes 3024 - 3040 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3040 - 3056 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 3056 - 3072 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 3072 - 3088 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3088 - 3104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 3136 - 3152 */ - 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0x3c, 0x54, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 3152 - 3168 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 3168 - 3184 */ - 0xa8, 0x3c, 0x54, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, /* bytes 3184 - 3200 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x54, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 3200 - 3216 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 3216 - 3232 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0xa8, /* bytes 3232 - 3248 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x14, 0x3c, 0x14, /* bytes 3248 - 3264 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3264 - 3280 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3280 - 3296 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3328 - 3344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 3344 - 3360 */ - 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 3360 - 3376 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 3376 - 3392 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 3392 - 3408 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3408 - 3424 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3424 - 3440 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x14, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 3440 - 3456 */ - 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 3456 - 3472 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 3472 - 3488 */ - 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 3488 - 3504 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3504 - 3520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3520 - 3536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3536 - 3552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x54, /* bytes 3552 - 3568 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 3568 - 3584 */ - 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3584 - 3600 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x3c, 0xa8, 0x54, /* bytes 3600 - 3616 */ - 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, 0x14, 0x54, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 3616 - 3632 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 3632 - 3648 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x3c, 0x54, 0x3c, 0xa8, 0xa8, /* bytes 3648 - 3664 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 3664 - 3680 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x54, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3680 - 3696 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3696 - 3712 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3712 - 3728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3728 - 3744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3744 - 3760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 3760 - 3776 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 3776 - 3792 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 3792 - 3808 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 3808 - 3824 */ - 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3824 - 3840 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3840 - 3856 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 3856 - 3872 */ - 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, /* bytes 3872 - 3888 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 3888 - 3904 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3904 - 3920 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3920 - 3936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3936 - 3952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3952 - 3968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 3968 - 3984 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 3984 - 4000 */ - 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4000 - 4016 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 4016 - 4032 */ - 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 4032 - 4048 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 4048 - 4064 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 4064 - 4080 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x14, /* bytes 4080 - 4096 */ - 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x54, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4096 - 4112 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4112 - 4128 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4128 - 4144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4144 - 4160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4160 - 4176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 4176 - 4192 */ - 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 4192 - 4208 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 4208 - 4224 */ - 0x3c, 0xfc, 0xa8, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 4224 - 4240 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 4240 - 4256 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 4256 - 4272 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 4272 - 4288 */ - 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x0c, 0xa8, 0x14, 0x3c, /* bytes 4288 - 4304 */ - 0x0c, 0x3c, 0x14, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 4304 - 4320 */ - 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 4320 - 4336 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4336 - 4352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4352 - 4368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4368 - 4384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x54, /* bytes 4384 - 4400 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 4400 - 4416 */ - 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4416 - 4432 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, /* bytes 4432 - 4448 */ - 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 4448 - 4464 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 4464 - 4480 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x54, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0xa8, /* bytes 4480 - 4496 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x14, 0x3c, 0x0c, /* bytes 4496 - 4512 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 4512 - 4528 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4528 - 4544 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4544 - 4560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4560 - 4576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4576 - 4592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 4592 - 4608 */ - 0x54, 0xa8, 0xa8, 0xfc, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 4608 - 4624 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 4624 - 4640 */ - 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, /* bytes 4640 - 4656 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 4656 - 4672 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 4672 - 4688 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 4688 - 4704 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 4704 - 4720 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 4720 - 4736 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4736 - 4752 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4752 - 4768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4768 - 4784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4784 - 4800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 4800 - 4816 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 4816 - 4832 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4832 - 4848 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x14, /* bytes 4848 - 4864 */ - 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 4864 - 4880 */ - 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 4880 - 4896 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4896 - 4912 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x14, 0x14, 0x14, 0x14, /* bytes 4912 - 4928 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 4928 - 4944 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4944 - 4960 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4960 - 4976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4976 - 4992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4992 - 5008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 5008 - 5024 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 5024 - 5040 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 5040 - 5056 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 5056 - 5072 */ - 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 5072 - 5088 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 5088 - 5104 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 5104 - 5120 */ - 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, /* bytes 5120 - 5136 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5136 - 5152 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 5152 - 5168 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5168 - 5184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5184 - 5200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5200 - 5216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 5216 - 5232 */ - 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 5232 - 5248 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5248 - 5264 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x14, /* bytes 5264 - 5280 */ - 0x54, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 5280 - 5296 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x0c, /* bytes 5296 - 5312 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5312 - 5328 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 5328 - 5344 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 5344 - 5360 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5360 - 5376 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5376 - 5392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5392 - 5408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5408 - 5424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 5424 - 5440 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 5440 - 5456 */ - 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 5456 - 5472 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, /* bytes 5472 - 5488 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 5488 - 5504 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, /* bytes 5504 - 5520 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5520 - 5536 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, /* bytes 5536 - 5552 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5552 - 5568 */ - 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5568 - 5584 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5584 - 5600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5600 - 5616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5616 - 5632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x3c, /* bytes 5632 - 5648 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5648 - 5664 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 5664 - 5680 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, /* bytes 5680 - 5696 */ - 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 5696 - 5712 */ - 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, /* bytes 5712 - 5728 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 5728 - 5744 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x14, 0x54, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 5744 - 5760 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 5760 - 5776 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5776 - 5792 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5792 - 5808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5808 - 5824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5824 - 5840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 5840 - 5856 */ - 0x3c, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, /* bytes 5856 - 5872 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5872 - 5888 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, /* bytes 5888 - 5904 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 5904 - 5920 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 5920 - 5936 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 5936 - 5952 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x14, 0x14, 0x3c, /* bytes 5952 - 5968 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 5968 - 5984 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 5984 - 6000 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6000 - 6016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6016 - 6032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6032 - 6048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 6048 - 6064 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6064 - 6080 */ - 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 6080 - 6096 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x14, /* bytes 6096 - 6112 */ - 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, /* bytes 6112 - 6128 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x14, /* bytes 6128 - 6144 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 6144 - 6160 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 6160 - 6176 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x54, 0x54, 0x3c, 0x14, /* bytes 6176 - 6192 */ - 0x54, 0x54, 0x3c, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6192 - 6208 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6208 - 6224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6224 - 6240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6240 - 6256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 6256 - 6272 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, /* bytes 6272 - 6288 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 6288 - 6304 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, /* bytes 6304 - 6320 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6320 - 6336 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6336 - 6352 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0xa8, /* bytes 6352 - 6368 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6368 - 6384 */ - 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6384 - 6400 */ - 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, /* bytes 6400 - 6416 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6416 - 6432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6432 - 6448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6448 - 6464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 6464 - 6480 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6480 - 6496 */ - 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, /* bytes 6496 - 6512 */ - 0xa8, 0x54, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 6512 - 6528 */ - 0x3c, 0x14, 0x3c, 0x14, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 6528 - 6544 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 6544 - 6560 */ - 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 6560 - 6576 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 6576 - 6592 */ - 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 6592 - 6608 */ - 0x14, 0x14, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6608 - 6624 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6624 - 6640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6640 - 6656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6656 - 6672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 6672 - 6688 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 6688 - 6704 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 6704 - 6720 */ - 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 6720 - 6736 */ - 0x0c, 0x3c, 0x0c, 0x54, 0x40, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6736 - 6752 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6752 - 6768 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 6768 - 6784 */ - 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6784 - 6800 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6800 - 6816 */ - 0x0c, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, /* bytes 6816 - 6832 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6832 - 6848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6848 - 6864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6864 - 6880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 6880 - 6896 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 6896 - 6912 */ - 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 6912 - 6928 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0x54, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x0c, /* bytes 6928 - 6944 */ - 0x54, 0x54, 0x54, 0x40, 0x44, 0x44, 0x50, 0x54, 0xa8, 0x54, 0x54, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 6944 - 6960 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 6960 - 6976 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0xa8, 0x3c, /* bytes 6976 - 6992 */ - 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x14, 0x14, 0x3c, 0x0c, /* bytes 6992 - 7008 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 7008 - 7024 */ - 0x54, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7024 - 7040 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7040 - 7056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7056 - 7072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7072 - 7088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 7088 - 7104 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 7104 - 7120 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 7120 - 7136 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x54, 0x50, 0x3c, 0x0c, 0x3c, /* bytes 7136 - 7152 */ - 0x0c, 0x3c, 0x40, 0x10, 0x00, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0x54, 0xf0, 0x54, 0x3c, 0x0c, 0x3c, /* bytes 7152 - 7168 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7168 - 7184 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7184 - 7200 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7200 - 7216 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7216 - 7232 */ - 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 7232 - 7248 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7248 - 7264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7264 - 7280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7280 - 7296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 7296 - 7312 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7312 - 7328 */ - 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 7328 - 7344 */ - 0xa8, 0x3c, 0x54, 0x54, 0x54, 0x54, 0x54, 0x3c, 0x3c, 0x14, 0x44, 0xc0, 0xa8, 0xc0, 0x40, 0x40, /* bytes 7344 - 7360 */ - 0x54, 0x54, 0x10, 0x00, 0x40, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x50, 0x54, 0x14, /* bytes 7360 - 7376 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 7376 - 7392 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, /* bytes 7392 - 7408 */ - 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x14, 0x54, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 7408 - 7424 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 7424 - 7440 */ - 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 7440 - 7456 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7456 - 7472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7472 - 7488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7488 - 7504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 7504 - 7520 */ - 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 7520 - 7536 */ - 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 7536 - 7552 */ - 0x0c, 0xa8, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, 0x0c, 0x50, 0xc0, 0xa8, 0xc0, 0x50, 0x00, 0x40, /* bytes 7552 - 7568 */ - 0x00, 0x54, 0x00, 0x10, 0x44, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 7568 - 7584 */ - 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7584 - 7600 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7600 - 7616 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7616 - 7632 */ - 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7632 - 7648 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 7648 - 7664 */ - 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7664 - 7680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7680 - 7696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7696 - 7712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 7712 - 7728 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 7728 - 7744 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0xa8, 0xa8, 0x3c, /* bytes 7744 - 7760 */ - 0x3c, 0x10, 0x44, 0xc0, 0x54, 0x54, 0x54, 0x44, 0x40, 0xc0, 0xa8, 0x54, 0x40, 0x40, 0x50, 0x40, /* bytes 7760 - 7776 */ - 0x44, 0x40, 0x10, 0x40, 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xc0, /* bytes 7776 - 7792 */ - 0x54, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 7792 - 7808 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 7808 - 7824 */ - 0x14, 0x14, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x14, /* bytes 7824 - 7840 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 7840 - 7856 */ - 0x14, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 7856 - 7872 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7872 - 7888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7888 - 7904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7904 - 7920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 7920 - 7936 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 7936 - 7952 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x04, 0x54, 0x14, 0x3c, 0x54, 0xa8, /* bytes 7952 - 7968 */ - 0x14, 0x50, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, 0x40, 0xa8, 0xc0, 0x54, 0x00, 0x54, 0x40, 0x54, /* bytes 7968 - 7984 */ - 0xc0, 0x54, 0x00, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, /* bytes 7984 - 8000 */ - 0xc0, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8000 - 8016 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8016 - 8032 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8032 - 8048 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8048 - 8064 */ - 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 8064 - 8080 */ - 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8080 - 8096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8096 - 8112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8112 - 8128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 8128 - 8144 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 8144 - 8160 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x14, 0x00, 0x40, 0x00, 0x40, 0x40, 0x14, 0x50, /* bytes 8160 - 8176 */ - 0x50, 0x44, 0x50, 0x50, 0x50, 0x50, 0x54, 0x44, 0x50, 0x50, 0x40, 0x40, 0x44, 0x40, 0x54, 0x54, /* bytes 8176 - 8192 */ - 0xa8, 0x54, 0x50, 0x40, 0xc0, 0xc0, 0x50, 0x44, 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 8192 - 8208 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x14, 0x3c, 0x14, 0x04, 0x00, 0x44, 0x50, 0x54, 0x54, 0x54, 0x0c, /* bytes 8208 - 8224 */ - 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 8224 - 8240 */ - 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 8240 - 8256 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 8256 - 8272 */ - 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x54, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 8272 - 8288 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8288 - 8304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8304 - 8320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8320 - 8336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 8336 - 8352 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 8352 - 8368 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x10, 0x00, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0xc0, /* bytes 8368 - 8384 */ - 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x44, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x54, 0x50, 0x54, /* bytes 8384 - 8400 */ - 0xc0, 0xf0, 0x50, 0x54, 0x40, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 8400 - 8416 */ - 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x40, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 8416 - 8432 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8432 - 8448 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, /* bytes 8448 - 8464 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8464 - 8480 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 8480 - 8496 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8496 - 8512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8512 - 8528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8528 - 8544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 8544 - 8560 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8560 - 8576 */ - 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x14, 0x00, 0x40, 0x44, 0x50, 0x40, 0x44, 0x44, 0x50, 0xc0, /* bytes 8576 - 8592 */ - 0x50, 0x50, 0x50, 0x40, 0x10, 0x44, 0x10, 0x40, 0x40, 0x40, 0x14, 0x40, 0x50, 0x54, 0x54, 0x50, /* bytes 8592 - 8608 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 8608 - 8624 */ - 0x54, 0x54, 0x54, 0x50, 0x50, 0x40, 0x40, 0x04, 0x40, 0x04, 0x10, 0x00, 0x50, 0x54, 0x54, 0xc0, /* bytes 8624 - 8640 */ - 0x54, 0x54, 0x54, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, /* bytes 8640 - 8656 */ - 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 8656 - 8672 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x54, 0x14, 0x3c, 0x0c, /* bytes 8672 - 8688 */ - 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 8688 - 8704 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8704 - 8720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8720 - 8736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8736 - 8752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 8752 - 8768 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 8768 - 8784 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x50, 0x04, 0x50, 0x04, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 8784 - 8800 */ - 0x44, 0x54, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 8800 - 8816 */ - 0xc0, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0x50, 0xf0, /* bytes 8816 - 8832 */ - 0x54, 0xa8, 0xc0, 0x54, 0x40, 0x10, 0x00, 0x54, 0x00, 0x10, 0x00, 0x14, 0x40, 0xa8, 0xc0, 0x54, /* bytes 8832 - 8848 */ - 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8848 - 8864 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8864 - 8880 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8880 - 8896 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 8896 - 8912 */ - 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8912 - 8928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8928 - 8944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8944 - 8960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 8960 - 8976 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 8976 - 8992 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x04, 0x00, 0x40, 0x44, 0x40, 0x10, 0x40, 0x10, 0x40, 0x44, 0x40, /* bytes 8992 - 9008 */ - 0x44, 0x40, 0x44, 0x44, 0x50, 0x40, 0x50, 0x44, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 9008 - 9024 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, /* bytes 9024 - 9040 */ - 0x54, 0x50, 0x54, 0x40, 0x40, 0x00, 0x10, 0x44, 0x50, 0x00, 0x04, 0x40, 0x54, 0x54, 0x54, 0x54, /* bytes 9040 - 9056 */ - 0x54, 0x50, 0x50, 0x50, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x0c, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 9056 - 9072 */ - 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 9072 - 9088 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 9088 - 9104 */ - 0x14, 0x14, 0x14, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 9104 - 9120 */ - 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9120 - 9136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9136 - 9152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9152 - 9168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 9168 - 9184 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 9184 - 9200 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0x14, 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 9200 - 9216 */ - 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 9216 - 9232 */ - 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 9232 - 9248 */ - 0x00, 0x54, 0x40, 0x10, 0x00, 0x54, 0x40, 0x50, 0x04, 0x54, 0x00, 0x50, 0x44, 0xf0, 0x50, 0x54, /* bytes 9248 - 9264 */ - 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 9264 - 9280 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 9280 - 9296 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 9296 - 9312 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 9312 - 9328 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9328 - 9344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9344 - 9360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9360 - 9376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 9376 - 9392 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 9392 - 9408 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0x14, 0x00, 0x10, 0x04, 0x40, 0x40, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, /* bytes 9408 - 9424 */ - 0x44, 0x44, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 9424 - 9440 */ - 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x40, /* bytes 9440 - 9456 */ - 0x44, 0x40, 0x44, 0x00, 0x40, 0x50, 0x50, 0x40, 0x40, 0x04, 0x44, 0x40, 0x54, 0x54, 0x54, 0x50, /* bytes 9456 - 9472 */ - 0x54, 0x54, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0x14, 0x14, 0x14, 0x3c, 0x0c, /* bytes 9472 - 9488 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 9488 - 9504 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 9504 - 9520 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x54, 0x3c, 0xa8, 0x54, /* bytes 9520 - 9536 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9536 - 9552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9552 - 9568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9568 - 9584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 9584 - 9600 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 9600 - 9616 */ - 0x54, 0xa8, 0x54, 0xa8, 0x04, 0x40, 0x00, 0x10, 0x04, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, /* bytes 9616 - 9632 */ - 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 9632 - 9648 */ - 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 9648 - 9664 */ - 0x40, 0x50, 0x00, 0x10, 0x40, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x54, 0xc0, 0xf0, 0xc0, 0xa8, /* bytes 9664 - 9680 */ - 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0xf0, 0x40, 0x40, 0x04, 0x54, /* bytes 9680 - 9696 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 9696 - 9712 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 9712 - 9728 */ - 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 9728 - 9744 */ - 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9744 - 9760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9760 - 9776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9776 - 9792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 9792 - 9808 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, /* bytes 9808 - 9824 */ - 0xa8, 0x54, 0xa8, 0xa8, 0x14, 0x00, 0x44, 0x04, 0x44, 0x40, 0x40, 0x40, 0x50, 0x40, 0x44, 0x40, /* bytes 9824 - 9840 */ - 0x50, 0x40, 0x44, 0x44, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, /* bytes 9840 - 9856 */ - 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, /* bytes 9856 - 9872 */ - 0x50, 0x40, 0x44, 0x40, 0x50, 0x44, 0x50, 0x40, 0x40, 0x00, 0x10, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 9872 - 9888 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x00, 0x40, 0x40, /* bytes 9888 - 9904 */ - 0x50, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 9904 - 9920 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 9920 - 9936 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0xa8, 0x3c, /* bytes 9936 - 9952 */ - 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9952 - 9968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9968 - 9984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9984 - 10000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 10000 - 10016 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 10016 - 10032 */ - 0x0c, 0xa8, 0x3c, 0xa8, 0x00, 0x10, 0x04, 0x10, 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 10032 - 10048 */ - 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x50, 0x40, 0x54, 0x44, 0x50, 0x44, 0x54, 0xc0, 0x54, /* bytes 10048 - 10064 */ - 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 10064 - 10080 */ - 0x40, 0x54, 0x04, 0x50, 0x40, 0x54, 0x40, 0x50, 0x00, 0x14, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 10080 - 10096 */ - 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0x00, 0x50, /* bytes 10096 - 10112 */ - 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 10112 - 10128 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 10128 - 10144 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 10144 - 10160 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10160 - 10176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10176 - 10192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10192 - 10208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 10208 - 10224 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 10224 - 10240 */ - 0xa8, 0x3c, 0xa8, 0x54, 0x00, 0x00, 0x44, 0x00, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 10240 - 10256 */ - 0x44, 0x40, 0x10, 0x40, 0x40, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, /* bytes 10256 - 10272 */ - 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 10272 - 10288 */ - 0x54, 0x44, 0x14, 0x44, 0x50, 0x44, 0x50, 0x04, 0x40, 0x50, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 10288 - 10304 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x40, 0x04, /* bytes 10304 - 10320 */ - 0x40, 0x04, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 10320 - 10336 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 10336 - 10352 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x54, 0x54, 0x3c, 0x14, /* bytes 10352 - 10368 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10368 - 10384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10384 - 10400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10400 - 10416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 10416 - 10432 */ - 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 10432 - 10448 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, /* bytes 10448 - 10464 */ - 0x40, 0x50, 0x04, 0x50, 0x00, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, /* bytes 10464 - 10480 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xf0, 0x54, 0xf0, 0xc0, 0xf0, /* bytes 10480 - 10496 */ - 0xc0, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xa8, /* bytes 10496 - 10512 */ - 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x00, 0x54, /* bytes 10512 - 10528 */ - 0x04, 0x10, 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 10528 - 10544 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 10544 - 10560 */ - 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 10560 - 10576 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10576 - 10592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10592 - 10608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10608 - 10624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 10624 - 10640 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 10640 - 10656 */ - 0xa8, 0x54, 0xa8, 0x54, 0x04, 0x00, 0x04, 0x04, 0x44, 0x04, 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, /* bytes 10656 - 10672 */ - 0x40, 0x40, 0x44, 0x40, 0x10, 0x40, 0x50, 0x44, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, /* bytes 10672 - 10688 */ - 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 10688 - 10704 */ - 0x54, 0x40, 0x50, 0x44, 0x50, 0x44, 0x10, 0x40, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 10704 - 10720 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x50, 0x04, /* bytes 10720 - 10736 */ - 0x44, 0x40, 0x40, 0x40, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 10736 - 10752 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 10752 - 10768 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 10768 - 10784 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10784 - 10800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10800 - 10816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10816 - 10832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 10832 - 10848 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 10848 - 10864 */ - 0x0c, 0xa8, 0x3c, 0x54, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 10864 - 10880 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, /* bytes 10880 - 10896 */ - 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 10896 - 10912 */ - 0x44, 0x54, 0x44, 0x50, 0x44, 0x54, 0x40, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 10912 - 10928 */ - 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0x50, 0x44, 0x14, /* bytes 10928 - 10944 */ - 0x00, 0x50, 0x00, 0x40, 0x40, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 10944 - 10960 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 10960 - 10976 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 10976 - 10992 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10992 - 11008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11008 - 11024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11024 - 11040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 11040 - 11056 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 11056 - 11072 */ - 0xa8, 0x3c, 0xa8, 0x14, 0x00, 0x00, 0x44, 0x00, 0x40, 0x40, 0x44, 0x04, 0x40, 0x40, 0x10, 0x40, /* bytes 11072 - 11088 */ - 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, /* bytes 11088 - 11104 */ - 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, /* bytes 11104 - 11120 */ - 0x54, 0x50, 0x54, 0x44, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x50, /* bytes 11120 - 11136 */ - 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x40, 0x54, 0x40, /* bytes 11136 - 11152 */ - 0x40, 0x40, 0x44, 0x04, 0x40, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, /* bytes 11152 - 11168 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 11168 - 11184 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 11184 - 11200 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11200 - 11216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11216 - 11232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11232 - 11248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 11248 - 11264 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 11264 - 11280 */ - 0x54, 0xa8, 0x54, 0x54, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x04, 0x54, /* bytes 11280 - 11296 */ - 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 11296 - 11312 */ - 0x40, 0x50, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 11312 - 11328 */ - 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xf0, /* bytes 11328 - 11344 */ - 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0x10, 0x40, 0x54, /* bytes 11344 - 11360 */ - 0x00, 0x14, 0x00, 0x50, 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 11360 - 11376 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 11376 - 11392 */ - 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 11392 - 11408 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11408 - 11424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11424 - 11440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11440 - 11456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 11456 - 11472 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 11472 - 11488 */ - 0x3c, 0x3c, 0xa8, 0x04, 0x00, 0x00, 0x40, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 11488 - 11504 */ - 0x44, 0x40, 0x44, 0x40, 0x10, 0x40, 0x40, 0x40, 0x14, 0x40, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, /* bytes 11504 - 11520 */ - 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, /* bytes 11520 - 11536 */ - 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, /* bytes 11536 - 11552 */ - 0x50, 0x40, 0x50, 0x44, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x40, 0x40, 0x50, /* bytes 11552 - 11568 */ - 0x44, 0x04, 0x44, 0x40, 0x40, 0x04, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 11568 - 11584 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 11584 - 11600 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 11600 - 11616 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11616 - 11632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11632 - 11648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11648 - 11664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 11664 - 11680 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 11680 - 11696 */ - 0x0c, 0xa8, 0x54, 0x44, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x40, 0x10, /* bytes 11696 - 11712 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x10, 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 11712 - 11728 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x50, 0x44, 0x54, 0xc0, 0x54, /* bytes 11728 - 11744 */ - 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 11744 - 11760 */ - 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x44, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x50, 0x00, 0x54, /* bytes 11760 - 11776 */ - 0x04, 0x10, 0x04, 0x10, 0x00, 0x50, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 11776 - 11792 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 11792 - 11808 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 11808 - 11824 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11824 - 11840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11840 - 11856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11856 - 11872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 11872 - 11888 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 11888 - 11904 */ - 0x3c, 0xa8, 0x54, 0x00, 0x04, 0x04, 0x44, 0x00, 0x40, 0x40, 0x44, 0x00, 0x40, 0x40, 0x10, 0x40, /* bytes 11904 - 11920 */ - 0x40, 0x44, 0x10, 0x40, 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, /* bytes 11920 - 11936 */ - 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, /* bytes 11936 - 11952 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x40, /* bytes 11952 - 11968 */ - 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x40, 0x40, 0x50, 0x54, 0xa8, 0x54, 0x54, 0x40, 0x44, 0x40, /* bytes 11968 - 11984 */ - 0x50, 0x40, 0x10, 0x00, 0x40, 0x40, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 11984 - 12000 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 12000 - 12016 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 12016 - 12032 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12032 - 12048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12048 - 12064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12064 - 12080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 12080 - 12096 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 12096 - 12112 */ - 0x3c, 0xa8, 0x00, 0x40, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, /* bytes 12112 - 12128 */ - 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x50, 0x04, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, /* bytes 12128 - 12144 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 12144 - 12160 */ - 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x50, /* bytes 12160 - 12176 */ - 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0xf0, 0x40, 0x10, 0x00, 0x50, /* bytes 12176 - 12192 */ - 0x44, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 12192 - 12208 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 12208 - 12224 */ - 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 12224 - 12240 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12240 - 12256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12256 - 12272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12272 - 12288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa8, 0x3c, /* bytes 12288 - 12304 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 12304 - 12320 */ - 0xa8, 0x04, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x04, 0x40, 0x40, /* bytes 12320 - 12336 */ - 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x50, 0x44, /* bytes 12336 - 12352 */ - 0x50, 0x44, 0x50, 0xc0, 0x50, 0x44, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x54, 0x50, /* bytes 12352 - 12368 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x40, 0x44, 0x40, /* bytes 12368 - 12384 */ - 0x50, 0x40, 0x44, 0x44, 0x10, 0x40, 0x44, 0x44, 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, /* bytes 12384 - 12400 */ - 0x50, 0x40, 0x04, 0x40, 0x40, 0x00, 0x40, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 12400 - 12416 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 12416 - 12432 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 12432 - 12448 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12448 - 12464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12464 - 12480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12480 - 12496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 12496 - 12512 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x3c, 0xfc, 0x3c, 0x54, /* bytes 12512 - 12528 */ - 0x00, 0x50, 0x00, 0x14, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 12528 - 12544 */ - 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 12544 - 12560 */ - 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x50, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 12560 - 12576 */ - 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 12576 - 12592 */ - 0x40, 0x54, 0x40, 0x10, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x10, 0x00, 0x50, 0x04, 0x14, /* bytes 12592 - 12608 */ - 0x40, 0x54, 0x00, 0x44, 0x00, 0x50, 0x00, 0x14, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 12608 - 12624 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 12624 - 12640 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 12640 - 12656 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12656 - 12672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12672 - 12688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12688 - 12704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 12704 - 12720 */ - 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x50, 0x00, /* bytes 12720 - 12736 */ - 0x40, 0x40, 0x10, 0x04, 0x40, 0x40, 0x40, 0x00, 0x00, 0x04, 0x40, 0x00, 0x40, 0x40, 0x44, 0x40, /* bytes 12736 - 12752 */ - 0x40, 0x40, 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, /* bytes 12752 - 12768 */ - 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, /* bytes 12768 - 12784 */ - 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 12784 - 12800 */ - 0x44, 0x40, 0x10, 0x40, 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x14, 0x00, /* bytes 12800 - 12816 */ - 0x50, 0x50, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, 0x3c, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 12816 - 12832 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 12832 - 12848 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 12848 - 12864 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12864 - 12880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12880 - 12896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12896 - 12912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 12912 - 12928 */ - 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x14, 0x54, 0x04, 0x54, 0x00, 0x10, 0x00, 0x50, /* bytes 12928 - 12944 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 12944 - 12960 */ - 0x40, 0x10, 0x00, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, /* bytes 12960 - 12976 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, /* bytes 12976 - 12992 */ - 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0x40, 0x50, 0x04, 0x50, 0x40, 0x50, /* bytes 12992 - 13008 */ - 0x00, 0x50, 0x00, 0x54, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x04, 0x50, 0x00, 0x50, /* bytes 13008 - 13024 */ - 0x40, 0x54, 0x00, 0x14, 0x04, 0x10, 0x00, 0x54, 0x14, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 13024 - 13040 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 13040 - 13056 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 13056 - 13072 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13072 - 13088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13088 - 13104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13104 - 13120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x3c, /* bytes 13120 - 13136 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x54, 0x40, 0x44, 0x00, 0x40, 0x40, 0x40, 0x40, 0x10, 0x44, /* bytes 13136 - 13152 */ - 0x10, 0x40, 0x44, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x40, /* bytes 13152 - 13168 */ - 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, /* bytes 13168 - 13184 */ - 0x40, 0x40, 0x44, 0x40, 0x50, 0x44, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, /* bytes 13184 - 13200 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, /* bytes 13200 - 13216 */ - 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x40, 0x00, /* bytes 13216 - 13232 */ - 0x50, 0x44, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, 0x54, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 13232 - 13248 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 13248 - 13264 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 13264 - 13280 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13280 - 13296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13296 - 13312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13312 - 13328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 13328 - 13344 */ - 0x54, 0xa8, 0x3c, 0x54, 0x00, 0x10, 0x00, 0x14, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 13344 - 13360 */ - 0x00, 0x50, 0x04, 0x50, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x50, 0x00, 0x10, /* bytes 13360 - 13376 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x10, 0x40, 0x54, 0x40, 0x14, /* bytes 13376 - 13392 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 13392 - 13408 */ - 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0x54, 0x40, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 13408 - 13424 */ - 0x00, 0x10, 0x40, 0x10, 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x04, 0x10, 0x00, 0x54, 0x00, 0x10, /* bytes 13424 - 13440 */ - 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x00, 0x40, 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 13440 - 13456 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 13456 - 13472 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 13472 - 13488 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13488 - 13504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13504 - 13520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13520 - 13536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 13536 - 13552 */ - 0x3c, 0x54, 0x14, 0x00, 0x40, 0x40, 0x10, 0x40, 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, /* bytes 13552 - 13568 */ - 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x04, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, 0x44, 0x00, /* bytes 13568 - 13584 */ - 0x40, 0x40, 0x50, 0x00, 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 13584 - 13600 */ - 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x04, 0x40, 0x40, 0x50, 0x40, 0x50, 0x50, 0x54, 0x50, /* bytes 13600 - 13616 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 13616 - 13632 */ - 0x40, 0x40, 0x10, 0x04, 0x40, 0x40, 0x44, 0x00, 0x40, 0x40, 0x14, 0x40, 0x40, 0x40, 0x10, 0x00, /* bytes 13632 - 13648 */ - 0x40, 0x40, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x14, 0x3c, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 13648 - 13664 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 13664 - 13680 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 13680 - 13696 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13696 - 13712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13712 - 13728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13728 - 13744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, /* bytes 13744 - 13760 */ - 0x00, 0x40, 0x00, 0x50, 0x40, 0x50, 0x04, 0x50, 0x04, 0x50, 0x04, 0x50, 0x40, 0x50, 0x00, 0x54, /* bytes 13760 - 13776 */ - 0x00, 0x50, 0x04, 0x54, 0x00, 0x50, 0x40, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 13776 - 13792 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x04, 0x54, 0x00, 0x50, 0x40, 0x14, 0x40, 0x50, /* bytes 13792 - 13808 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, /* bytes 13808 - 13824 */ - 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, /* bytes 13824 - 13840 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 13840 - 13856 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x40, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 13856 - 13872 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 13872 - 13888 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 13888 - 13904 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13904 - 13920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13920 - 13936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13936 - 13952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, /* bytes 13952 - 13968 */ - 0x44, 0x40, 0x14, 0x40, 0x14, 0x40, 0x10, 0x40, 0x14, 0x40, 0x10, 0x44, 0x50, 0x40, 0x14, 0x40, /* bytes 13968 - 13984 */ - 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x04, 0x40, 0x00, /* bytes 13984 - 14000 */ - 0x40, 0x00, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 14000 - 14016 */ - 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, /* bytes 14016 - 14032 */ - 0x50, 0x44, 0x50, 0x40, 0x44, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 14032 - 14048 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x04, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, /* bytes 14048 - 14064 */ - 0x44, 0x40, 0x40, 0x04, 0x44, 0x00, 0x40, 0x00, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14064 - 14080 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14080 - 14096 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14096 - 14112 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14112 - 14128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14128 - 14144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14144 - 14160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x50, /* bytes 14160 - 14176 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 14176 - 14192 */ - 0x04, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x14, /* bytes 14192 - 14208 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x04, 0x10, /* bytes 14208 - 14224 */ - 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, /* bytes 14224 - 14240 */ - 0x04, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 14240 - 14256 */ - 0x00, 0x54, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, /* bytes 14256 - 14272 */ - 0x00, 0x54, 0x00, 0x44, 0x00, 0x14, 0x00, 0x40, 0x00, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 14272 - 14288 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 14288 - 14304 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 14304 - 14320 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14320 - 14336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14336 - 14352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14352 - 14368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x50, 0x40, /* bytes 14368 - 14384 */ - 0x40, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x44, 0x44, 0x10, 0x40, 0x44, 0x40, 0x14, 0x40, /* bytes 14384 - 14400 */ - 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x10, 0x00, /* bytes 14400 - 14416 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 14416 - 14432 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, /* bytes 14432 - 14448 */ - 0x10, 0x44, 0x50, 0x40, 0x44, 0x44, 0x10, 0x40, 0x44, 0x40, 0x44, 0x00, 0x40, 0x40, 0x14, 0x40, /* bytes 14448 - 14464 */ - 0x40, 0x40, 0x44, 0x04, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 14464 - 14480 */ - 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x44, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 14480 - 14496 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 14496 - 14512 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 14512 - 14528 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14528 - 14544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14544 - 14560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14560 - 14576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x54, /* bytes 14576 - 14592 */ - 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, /* bytes 14592 - 14608 */ - 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x54, /* bytes 14608 - 14624 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 14624 - 14640 */ - 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, /* bytes 14640 - 14656 */ - 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 14656 - 14672 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, /* bytes 14672 - 14688 */ - 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 14688 - 14704 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 14704 - 14720 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 14720 - 14736 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14736 - 14752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14752 - 14768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14768 - 14784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x40, /* bytes 14784 - 14800 */ - 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, 0x50, 0x40, 0x50, 0x40, 0x40, 0x40, /* bytes 14800 - 14816 */ - 0x50, 0x40, 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, /* bytes 14816 - 14832 */ - 0x50, 0x40, 0x10, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, /* bytes 14832 - 14848 */ - 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0x40, /* bytes 14848 - 14864 */ - 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 14864 - 14880 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 14880 - 14896 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14896 - 14912 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14912 - 14928 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14928 - 14944 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14944 - 14960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14960 - 14976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14976 - 14992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, /* bytes 14992 - 15008 */ - 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 15008 - 15024 */ - 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 15024 - 15040 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 15040 - 15056 */ - 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, /* bytes 15056 - 15072 */ - 0x40, 0x50, 0x04, 0x10, 0x00, 0x50, 0x04, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x14, 0x00, 0x10, /* bytes 15072 - 15088 */ - 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x00, 0x44, 0x00, 0x50, 0x00, 0x14, /* bytes 15088 - 15104 */ - 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 15104 - 15120 */ - 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 15120 - 15136 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 15136 - 15152 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15152 - 15168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15168 - 15184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15184 - 15200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x50, 0x40, /* bytes 15200 - 15216 */ - 0x50, 0xc0, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, 0x40, 0x44, 0x50, 0x40, /* bytes 15216 - 15232 */ - 0x44, 0x44, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, /* bytes 15232 - 15248 */ - 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, /* bytes 15248 - 15264 */ - 0x50, 0x40, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0xc0, 0x50, 0x50, 0x44, /* bytes 15264 - 15280 */ - 0x50, 0xc0, 0x44, 0x00, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x44, 0x00, /* bytes 15280 - 15296 */ - 0x40, 0x04, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 15296 - 15312 */ - 0x40, 0x04, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 15312 - 15328 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 15328 - 15344 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 15344 - 15360 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15360 - 15376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15376 - 15392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15392 - 15408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x54, /* bytes 15408 - 15424 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 15424 - 15440 */ - 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 15440 - 15456 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 15456 - 15472 */ - 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, /* bytes 15472 - 15488 */ - 0xc0, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x50, /* bytes 15488 - 15504 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, /* bytes 15504 - 15520 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x0c, 0x3c, 0x14, 0x3c, 0x14, 0x3c, /* bytes 15520 - 15536 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 15536 - 15552 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 15552 - 15568 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15568 - 15584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15584 - 15600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15600 - 15616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x50, 0xc0, /* bytes 15616 - 15632 */ - 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, /* bytes 15632 - 15648 */ - 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x44, /* bytes 15648 - 15664 */ - 0x50, 0x40, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, /* bytes 15664 - 15680 */ - 0x50, 0x40, 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0xc0, 0x50, 0x50, /* bytes 15680 - 15696 */ - 0x54, 0x50, 0x54, 0x40, 0x44, 0x04, 0x44, 0x40, 0x44, 0x00, 0x40, 0x40, 0x40, 0x04, 0x40, 0x04, /* bytes 15696 - 15712 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, /* bytes 15712 - 15728 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 15728 - 15744 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 15744 - 15760 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 15760 - 15776 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15776 - 15792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15792 - 15808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15808 - 15824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, /* bytes 15824 - 15840 */ - 0x40, 0x54, 0x44, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 15840 - 15856 */ - 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 15856 - 15872 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x10, /* bytes 15872 - 15888 */ - 0x40, 0xf0, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x44, 0xf0, 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x50, /* bytes 15888 - 15904 */ - 0x40, 0xa8, 0xc0, 0x50, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, /* bytes 15904 - 15920 */ - 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x44, 0x00, 0x54, 0x00, 0x44, /* bytes 15920 - 15936 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, 0x00, 0x54, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, /* bytes 15936 - 15952 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 15952 - 15968 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 15968 - 15984 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15984 - 16000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16000 - 16016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16016 - 16032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x44, /* bytes 16032 - 16048 */ - 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x40, /* bytes 16048 - 16064 */ - 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, /* bytes 16064 - 16080 */ - 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0x40, 0x50, 0xc0, 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, /* bytes 16080 - 16096 */ - 0xc0, 0x54, 0xa8, 0x40, 0x40, 0x50, 0x50, 0x00, 0x40, 0xc0, 0x54, 0x40, 0x40, 0x40, 0x50, 0x40, /* bytes 16096 - 16112 */ - 0x40, 0x44, 0x54, 0xc0, 0x40, 0x00, 0x14, 0x00, 0x40, 0x40, 0x44, 0x00, 0x04, 0x04, 0x40, 0x00, /* bytes 16112 - 16128 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x44, 0x00, 0x04, 0x04, 0x44, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 16128 - 16144 */ - 0x04, 0x04, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 16144 - 16160 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 16160 - 16176 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 16176 - 16192 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16192 - 16208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16208 - 16224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16224 - 16240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x54, /* bytes 16240 - 16256 */ - 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 16256 - 16272 */ - 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, /* bytes 16272 - 16288 */ - 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, /* bytes 16288 - 16304 */ - 0x40, 0xf0, 0xc0, 0x50, 0x40, 0x54, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x40, 0x54, /* bytes 16304 - 16320 */ - 0x40, 0x50, 0x40, 0xa8, 0xc0, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 16320 - 16336 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 16336 - 16352 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 16352 - 16368 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 16368 - 16384 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 16384 - 16400 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16400 - 16416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16416 - 16432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16432 - 16448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x50, 0x50, /* bytes 16448 - 16464 */ - 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, /* bytes 16464 - 16480 */ - 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, /* bytes 16480 - 16496 */ - 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0x40, 0x50, 0x40, 0x40, 0x40, /* bytes 16496 - 16512 */ - 0x50, 0x50, 0x50, 0x40, 0x44, 0xc0, 0x50, 0x40, 0x40, 0x00, 0x40, 0x00, 0x10, 0x40, 0x50, 0x40, /* bytes 16512 - 16528 */ - 0x50, 0x40, 0x40, 0x40, 0x54, 0x50, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, /* bytes 16528 - 16544 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, /* bytes 16544 - 16560 */ - 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 16560 - 16576 */ - 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 16576 - 16592 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 16592 - 16608 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16608 - 16624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16624 - 16640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16640 - 16656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 16656 - 16672 */ - 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x50, /* bytes 16672 - 16688 */ - 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x50, /* bytes 16688 - 16704 */ - 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x10, /* bytes 16704 - 16720 */ - 0x40, 0x54, 0xc0, 0x50, 0x00, 0x54, 0xc0, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x10, /* bytes 16720 - 16736 */ - 0x00, 0x50, 0x00, 0x40, 0x40, 0xf0, 0x40, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 16736 - 16752 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, /* bytes 16752 - 16768 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x04, 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 16768 - 16784 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 16784 - 16800 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, /* bytes 16800 - 16816 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16816 - 16832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16832 - 16848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16848 - 16864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0xc0, /* bytes 16864 - 16880 */ - 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 16880 - 16896 */ - 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 16896 - 16912 */ - 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0x40, 0x40, 0x40, 0x14, 0x00, /* bytes 16912 - 16928 */ - 0x40, 0x44, 0x54, 0x50, 0x50, 0x40, 0x54, 0x44, 0x40, 0x40, 0x50, 0x44, 0x40, 0x40, 0x40, 0x40, /* bytes 16928 - 16944 */ - 0x44, 0x40, 0x44, 0x00, 0x00, 0x50, 0x54, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x44, 0x00, /* bytes 16944 - 16960 */ - 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 16960 - 16976 */ - 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 16976 - 16992 */ - 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 16992 - 17008 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 17008 - 17024 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17024 - 17040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17040 - 17056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17056 - 17072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 17072 - 17088 */ - 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 17088 - 17104 */ - 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 17104 - 17120 */ - 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, 0x04, 0x50, /* bytes 17120 - 17136 */ - 0x00, 0x50, 0x40, 0xa8, 0xc0, 0x50, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x50, 0x00, 0x10, 0x40, 0x54, /* bytes 17136 - 17152 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0xc0, 0x54, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 17152 - 17168 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, /* bytes 17168 - 17184 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x54, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 17184 - 17200 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 17200 - 17216 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 17216 - 17232 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17232 - 17248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17248 - 17264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17264 - 17280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x50, /* bytes 17280 - 17296 */ - 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 17296 - 17312 */ - 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, /* bytes 17312 - 17328 */ - 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, 0x40, 0x40, /* bytes 17328 - 17344 */ - 0x10, 0x40, 0x40, 0xc0, 0x54, 0x40, 0x40, 0x44, 0x54, 0x54, 0x50, 0x40, 0x40, 0x40, 0x50, 0x50, /* bytes 17344 - 17360 */ - 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, 0x54, 0x14, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 17360 - 17376 */ - 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, /* bytes 17376 - 17392 */ - 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x40, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 17392 - 17408 */ - 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 17408 - 17424 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 17424 - 17440 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17440 - 17456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17456 - 17472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17472 - 17488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0xa8, /* bytes 17488 - 17504 */ - 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, /* bytes 17504 - 17520 */ - 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x50, 0x40, 0x54, 0xc0, 0x50, /* bytes 17520 - 17536 */ - 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, /* bytes 17536 - 17552 */ - 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0xc0, 0x54, 0x40, 0x40, 0x00, 0x54, 0xc0, 0x54, /* bytes 17552 - 17568 */ - 0x40, 0x50, 0x40, 0x40, 0x00, 0x54, 0x50, 0x50, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x44, /* bytes 17568 - 17584 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x44, 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, /* bytes 17584 - 17600 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 17600 - 17616 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 17616 - 17632 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, /* bytes 17632 - 17648 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17648 - 17664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17664 - 17680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17680 - 17696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x50, 0x50, /* bytes 17696 - 17712 */ - 0x54, 0x50, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 17712 - 17728 */ - 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 17728 - 17744 */ - 0x50, 0x50, 0x50, 0x40, 0x50, 0xc0, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, /* bytes 17744 - 17760 */ - 0x40, 0x40, 0x10, 0x40, 0x44, 0x50, 0x50, 0x40, 0x50, 0xc0, 0x50, 0x40, 0x50, 0x54, 0x54, 0xc0, /* bytes 17760 - 17776 */ - 0x40, 0x44, 0x50, 0x00, 0x40, 0x54, 0x54, 0x04, 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 17776 - 17792 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x44, 0x00, /* bytes 17792 - 17808 */ - 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x44, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 17808 - 17824 */ - 0x14, 0x14, 0x3c, 0x14, 0x54, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 17824 - 17840 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 17840 - 17856 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17856 - 17872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17872 - 17888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17888 - 17904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x54, /* bytes 17904 - 17920 */ - 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 17920 - 17936 */ - 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 17936 - 17952 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x00, 0x50, /* bytes 17952 - 17968 */ - 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x44, 0x54, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, /* bytes 17968 - 17984 */ - 0x40, 0x50, 0x00, 0x50, 0x44, 0xa8, 0x40, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 17984 - 18000 */ - 0x00, 0x40, 0x00, 0x14, 0x00, 0x44, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, /* bytes 18000 - 18016 */ - 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x40, 0x00, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 18016 - 18032 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 18032 - 18048 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 18048 - 18064 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18064 - 18080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18080 - 18096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18096 - 18112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x40, /* bytes 18112 - 18128 */ - 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 18128 - 18144 */ - 0x54, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0xc0, /* bytes 18144 - 18160 */ - 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x40, 0x40, /* bytes 18160 - 18176 */ - 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0xc0, 0x50, 0x44, 0xc0, 0x40, 0x44, 0x40, 0x40, 0x40, /* bytes 18176 - 18192 */ - 0x44, 0x40, 0x40, 0x50, 0x54, 0x44, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 18192 - 18208 */ - 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 18208 - 18224 */ - 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 18224 - 18240 */ - 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 18240 - 18256 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 18256 - 18272 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18272 - 18288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18288 - 18304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18304 - 18320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, /* bytes 18320 - 18336 */ - 0x40, 0x54, 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 18336 - 18352 */ - 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 18352 - 18368 */ - 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 18368 - 18384 */ - 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0xc0, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 18384 - 18400 */ - 0x40, 0x54, 0xc0, 0xa8, 0x40, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 18400 - 18416 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, /* bytes 18416 - 18432 */ - 0x00, 0x14, 0x00, 0x40, 0x00, 0x14, 0x00, 0x44, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 18432 - 18448 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 18448 - 18464 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, /* bytes 18464 - 18480 */ - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18480 - 18496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18496 - 18512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18512 - 18528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x50, 0x40, /* bytes 18528 - 18544 */ - 0x44, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 18544 - 18560 */ - 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x40, /* bytes 18560 - 18576 */ - 0x50, 0xc0, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, /* bytes 18576 - 18592 */ - 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x40, 0x44, 0x50, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 18592 - 18608 */ - 0x54, 0x54, 0x50, 0x00, 0x00, 0x04, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 18608 - 18624 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18624 - 18640 */ - 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 18640 - 18656 */ - 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, /* bytes 18656 - 18672 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 18672 - 18688 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18688 - 18704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18704 - 18720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18720 - 18736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x50, /* bytes 18736 - 18752 */ - 0x44, 0x54, 0x40, 0x50, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 18752 - 18768 */ - 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 18768 - 18784 */ - 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 18784 - 18800 */ - 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, /* bytes 18800 - 18816 */ - 0x04, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 18816 - 18832 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, /* bytes 18832 - 18848 */ - 0x00, 0x44, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 18848 - 18864 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 18864 - 18880 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 18880 - 18896 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18896 - 18912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18912 - 18928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18928 - 18944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x40, /* bytes 18944 - 18960 */ - 0x50, 0x50, 0x10, 0x40, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, /* bytes 18960 - 18976 */ - 0x50, 0x50, 0x50, 0x50, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, /* bytes 18976 - 18992 */ - 0x50, 0x40, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, 0x14, 0x40, /* bytes 18992 - 19008 */ - 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x14, 0x40, 0x10, 0x40, 0x44, 0x40, 0x44, 0x04, 0x40, 0x00, /* bytes 19008 - 19024 */ - 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 19024 - 19040 */ - 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19040 - 19056 */ - 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 19056 - 19072 */ - 0x14, 0x14, 0x54, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 19072 - 19088 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 19088 - 19104 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19104 - 19120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19120 - 19136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19136 - 19152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, /* bytes 19152 - 19168 */ - 0x04, 0x54, 0x40, 0x50, 0x40, 0xf0, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 19168 - 19184 */ - 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x44, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 19184 - 19200 */ - 0x40, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x54, 0x00, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, /* bytes 19200 - 19216 */ - 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, /* bytes 19216 - 19232 */ - 0x00, 0x50, 0x00, 0x44, 0x00, 0x10, 0x00, 0x44, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 19232 - 19248 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x50, 0x00, 0x04, /* bytes 19248 - 19264 */ - 0x00, 0x14, 0x00, 0x04, 0x00, 0x54, 0x00, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 19264 - 19280 */ - 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 19280 - 19296 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, /* bytes 19296 - 19312 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19312 - 19328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19328 - 19344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19344 - 19360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x40, /* bytes 19360 - 19376 */ - 0x40, 0x44, 0x50, 0x40, 0x50, 0x44, 0x54, 0x50, 0x54, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 19376 - 19392 */ - 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0x40, 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, /* bytes 19392 - 19408 */ - 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, /* bytes 19408 - 19424 */ - 0x44, 0x44, 0x10, 0x04, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, /* bytes 19424 - 19440 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 19440 - 19456 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 19456 - 19472 */ - 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 19472 - 19488 */ - 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 19488 - 19504 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 19504 - 19520 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19520 - 19536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19536 - 19552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19552 - 19568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 19568 - 19584 */ - 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 19584 - 19600 */ - 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 19600 - 19616 */ - 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x04, 0x54, 0x00, 0x50, /* bytes 19616 - 19632 */ - 0x40, 0x50, 0x04, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, /* bytes 19632 - 19648 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x44, 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, /* bytes 19648 - 19664 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 19664 - 19680 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 19680 - 19696 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 19696 - 19712 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 19712 - 19728 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19728 - 19744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19744 - 19760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19760 - 19776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x54, /* bytes 19776 - 19792 */ - 0x54, 0x40, 0x44, 0x40, 0xa8, 0x50, 0x40, 0x44, 0x54, 0x50, 0x54, 0x50, 0x54, 0xc0, 0x50, 0x50, /* bytes 19792 - 19808 */ - 0x50, 0xc0, 0x50, 0xc0, 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x10, 0x40, /* bytes 19808 - 19824 */ - 0x50, 0x40, 0x10, 0x40, 0x50, 0x40, 0x14, 0x40, 0x14, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, /* bytes 19824 - 19840 */ - 0x10, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 19840 - 19856 */ - 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 19856 - 19872 */ - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 19872 - 19888 */ - 0x04, 0x00, 0x04, 0x00, 0x00, 0x04, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 19888 - 19904 */ - 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 19904 - 19920 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 19920 - 19936 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19936 - 19952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19952 - 19968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19968 - 19984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc0, 0xa8, /* bytes 19984 - 20000 */ - 0xc0, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x50, /* bytes 20000 - 20016 */ - 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x04, 0x50, 0x40, 0x50, /* bytes 20016 - 20032 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x14, 0x00, 0x50, 0x00, 0x10, /* bytes 20032 - 20048 */ - 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x44, 0x00, 0x10, 0x00, 0x44, /* bytes 20048 - 20064 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 20064 - 20080 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 20080 - 20096 */ - 0x00, 0x50, 0x00, 0x04, 0x00, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 20096 - 20112 */ - 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 20112 - 20128 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, /* bytes 20128 - 20144 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20144 - 20160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20160 - 20176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20176 - 20192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x50, /* bytes 20192 - 20208 */ - 0x54, 0x54, 0x50, 0x44, 0x50, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0x44, /* bytes 20208 - 20224 */ - 0x50, 0xc0, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, /* bytes 20224 - 20240 */ - 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x00, /* bytes 20240 - 20256 */ - 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, 0x44, 0x00, 0x04, 0x04, 0x44, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 20256 - 20272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 20272 - 20288 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 20288 - 20304 */ - 0x04, 0x00, 0x04, 0x00, 0x14, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 20304 - 20320 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 20320 - 20336 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 20336 - 20352 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20352 - 20368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20368 - 20384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20384 - 20400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0xa8, /* bytes 20400 - 20416 */ - 0xc0, 0xa8, 0x40, 0x54, 0xa8, 0x54, 0x00, 0x50, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x40, 0x54, /* bytes 20416 - 20432 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x04, 0x54, /* bytes 20432 - 20448 */ - 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x04, 0x50, 0x40, 0x14, 0x04, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 20448 - 20464 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 20464 - 20480 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x14, /* bytes 20480 - 20496 */ - 0x00, 0x40, 0x00, 0x54, 0x00, 0x04, 0x00, 0x14, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 20496 - 20512 */ - 0x00, 0x10, 0x00, 0x50, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 20512 - 20528 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 20528 - 20544 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 20544 - 20560 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20560 - 20576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20576 - 20592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20592 - 20608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x50, /* bytes 20608 - 20624 */ - 0x54, 0x54, 0x54, 0x44, 0x54, 0xa8, 0x10, 0x40, 0x50, 0x50, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x44, /* bytes 20624 - 20640 */ - 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x14, 0x44, /* bytes 20640 - 20656 */ - 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, 0x40, 0x04, 0x40, 0x40, /* bytes 20656 - 20672 */ - 0x44, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 20672 - 20688 */ - 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 20688 - 20704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 20704 - 20720 */ - 0x04, 0x00, 0x04, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 20720 - 20736 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 20736 - 20752 */ - 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 20752 - 20768 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20768 - 20784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20784 - 20800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20800 - 20816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc0, 0x54, /* bytes 20816 - 20832 */ - 0x44, 0xa8, 0xc0, 0x54, 0x00, 0xf0, 0x50, 0x50, 0x00, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 20832 - 20848 */ - 0x40, 0x54, 0x40, 0x54, 0x00, 0x54, 0x40, 0x50, 0x04, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 20848 - 20864 */ - 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x40, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, /* bytes 20864 - 20880 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 20880 - 20896 */ - 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 20896 - 20912 */ - 0x00, 0x14, 0x00, 0x04, 0x00, 0x50, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x40, /* bytes 20912 - 20928 */ - 0x00, 0x44, 0x44, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 20928 - 20944 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 20944 - 20960 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 20960 - 20976 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20976 - 20992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20992 - 21008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21008 - 21024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0xc0, /* bytes 21024 - 21040 */ - 0x54, 0x54, 0x54, 0x50, 0x40, 0x50, 0x54, 0x50, 0x50, 0x40, 0x54, 0xc0, 0x50, 0x44, 0x50, 0x40, /* bytes 21040 - 21056 */ - 0x50, 0x50, 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, 0x14, 0x44, 0x50, 0x40, 0x14, 0x10, 0x50, 0x40, /* bytes 21056 - 21072 */ - 0x44, 0x44, 0x10, 0x04, 0x40, 0x40, 0x14, 0x00, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x00, /* bytes 21072 - 21088 */ - 0x04, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21088 - 21104 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x44, 0x00, /* bytes 21104 - 21120 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, /* bytes 21120 - 21136 */ - 0x00, 0x10, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 21136 - 21152 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 21152 - 21168 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 21168 - 21184 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21184 - 21200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21200 - 21216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21216 - 21232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xc0, 0xa8, /* bytes 21232 - 21248 */ - 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x50, 0x40, 0x54, /* bytes 21248 - 21264 */ - 0x40, 0x54, 0x00, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x04, 0x54, /* bytes 21264 - 21280 */ - 0x04, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, /* bytes 21280 - 21296 */ - 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, /* bytes 21296 - 21312 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x44, 0x00, 0x14, 0x00, 0x44, 0x00, 0x10, /* bytes 21312 - 21328 */ - 0x00, 0x44, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, /* bytes 21328 - 21344 */ - 0x04, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 21344 - 21360 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 21360 - 21376 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 21376 - 21392 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21392 - 21408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21408 - 21424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21424 - 21440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x50, /* bytes 21440 - 21456 */ - 0x54, 0x50, 0x54, 0x50, 0x50, 0x40, 0x14, 0x40, 0x10, 0x40, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, /* bytes 21456 - 21472 */ - 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x10, 0x50, 0x14, 0x54, 0x54, /* bytes 21472 - 21488 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x14, 0x54, 0x14, 0x14, 0x44, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 21488 - 21504 */ - 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 21504 - 21520 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 21520 - 21536 */ - 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, /* bytes 21536 - 21552 */ - 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 21552 - 21568 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 21568 - 21584 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 21584 - 21600 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21600 - 21616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21616 - 21632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21632 - 21648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc0, 0x54, /* bytes 21648 - 21664 */ - 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 21664 - 21680 */ - 0x40, 0x54, 0x40, 0x50, 0x00, 0x54, 0x50, 0x54, 0x14, 0x3c, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 21680 - 21696 */ - 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0x54, 0x04, 0x54, 0x04, 0x44, /* bytes 21696 - 21712 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x44, 0x00, 0x50, 0x00, 0x00, /* bytes 21712 - 21728 */ - 0x00, 0x54, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x54, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, /* bytes 21728 - 21744 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x40, 0x04, 0x3c, /* bytes 21744 - 21760 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 21760 - 21776 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 21776 - 21792 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 21792 - 21808 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21808 - 21824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21824 - 21840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21840 - 21856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x50, /* bytes 21856 - 21872 */ - 0x54, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x10, 0x40, 0x50, 0x40, 0x50, 0x50, 0x50, 0x44, 0x50, 0x44, /* bytes 21872 - 21888 */ - 0x50, 0x54, 0x54, 0x54, 0x54, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x54, 0x3c, 0xa8, 0x54, /* bytes 21888 - 21904 */ - 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x54, 0x3c, 0x3c, 0x54, /* bytes 21904 - 21920 */ - 0x54, 0x10, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x44, 0x00, /* bytes 21920 - 21936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21936 - 21952 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x14, 0x3c, 0x0c, /* bytes 21952 - 21968 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 21968 - 21984 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 21984 - 22000 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 22000 - 22016 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22016 - 22032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22032 - 22048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22048 - 22064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 22064 - 22080 */ - 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x04, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x54, 0x54, 0xa8, /* bytes 22080 - 22096 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 22096 - 22112 */ - 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, /* bytes 22112 - 22128 */ - 0x3c, 0x3c, 0x14, 0x54, 0x04, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, /* bytes 22128 - 22144 */ - 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x44, 0x00, 0x10, /* bytes 22144 - 22160 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 22160 - 22176 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 22176 - 22192 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 22192 - 22208 */ - 0x0c, 0x54, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, /* bytes 22208 - 22224 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22224 - 22240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22240 - 22256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22256 - 22272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x50, /* bytes 22272 - 22288 */ - 0x54, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x40, 0x50, 0x40, 0x40, 0x44, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 22288 - 22304 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0x54, 0x3c, 0x3c, 0x54, 0x3c, 0x54, /* bytes 22304 - 22320 */ - 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 22320 - 22336 */ - 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x54, 0x14, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, /* bytes 22336 - 22352 */ - 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 22352 - 22368 */ - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 22368 - 22384 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 22384 - 22400 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 22400 - 22416 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 22416 - 22432 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22432 - 22448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22448 - 22464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22464 - 22480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 22480 - 22496 */ - 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x50, 0x40, 0x50, 0x40, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 22496 - 22512 */ - 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 22512 - 22528 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 22528 - 22544 */ - 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x04, 0x10, 0x00, 0x10, 0x00, 0x44, /* bytes 22544 - 22560 */ - 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x44, /* bytes 22560 - 22576 */ - 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x14, /* bytes 22576 - 22592 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 22592 - 22608 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 22608 - 22624 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 22624 - 22640 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22640 - 22656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22656 - 22672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22672 - 22688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0xc0, /* bytes 22688 - 22704 */ - 0x50, 0x50, 0x50, 0x44, 0x54, 0x50, 0x54, 0x50, 0x50, 0x14, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0xa8, /* bytes 22704 - 22720 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 22720 - 22736 */ - 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x14, 0x3c, 0x3c, 0x3c, 0x14, /* bytes 22736 - 22752 */ - 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x54, 0x14, 0x14, 0x00, /* bytes 22752 - 22768 */ - 0x00, 0x00, 0x40, 0x00, 0x04, 0x04, 0x40, 0x00, 0x04, 0x04, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 22768 - 22784 */ - 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x14, 0x3c, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 22784 - 22800 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 22800 - 22816 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 22816 - 22832 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 22832 - 22848 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22848 - 22864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22864 - 22880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22880 - 22896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, /* bytes 22896 - 22912 */ - 0x44, 0x54, 0x44, 0x54, 0x40, 0x50, 0x50, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 22912 - 22928 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 22928 - 22944 */ - 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, /* bytes 22944 - 22960 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x54, /* bytes 22960 - 22976 */ - 0x44, 0x50, 0x00, 0x10, 0x00, 0x04, 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 22976 - 22992 */ - 0x00, 0x10, 0x04, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 22992 - 23008 */ - 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23008 - 23024 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 23024 - 23040 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23040 - 23056 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23056 - 23072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23072 - 23088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23088 - 23104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x50, 0x50, /* bytes 23104 - 23120 */ - 0x50, 0xc0, 0x54, 0x50, 0x50, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 23120 - 23136 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 23136 - 23152 */ - 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 23152 - 23168 */ - 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 23168 - 23184 */ - 0xa8, 0x3c, 0x54, 0x54, 0x54, 0x44, 0x44, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x10, 0x10, /* bytes 23184 - 23200 */ - 0x14, 0x14, 0x54, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 23200 - 23216 */ - 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 23216 - 23232 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 23232 - 23248 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 23248 - 23264 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23264 - 23280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23280 - 23296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23296 - 23312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, /* bytes 23312 - 23328 */ - 0x40, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x14, 0xa8, 0x3c, 0xa8, /* bytes 23328 - 23344 */ - 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 23344 - 23360 */ - 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 23360 - 23376 */ - 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 23376 - 23392 */ - 0x14, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x14, 0x54, 0x0c, 0x3c, 0x14, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23392 - 23408 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23408 - 23424 */ - 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 23424 - 23440 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 23440 - 23456 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23456 - 23472 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23472 - 23488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23488 - 23504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23504 - 23520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x50, 0x44, /* bytes 23520 - 23536 */ - 0x50, 0x50, 0x50, 0x50, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 23536 - 23552 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x54, 0x54, 0x3c, 0x54, /* bytes 23552 - 23568 */ - 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x14, /* bytes 23568 - 23584 */ - 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x3c, 0x3c, 0x54, 0x54, 0x3c, 0x3c, 0x3c, /* bytes 23584 - 23600 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, /* bytes 23600 - 23616 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 23616 - 23632 */ - 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 23632 - 23648 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 23648 - 23664 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 23664 - 23680 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23680 - 23696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23696 - 23712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23712 - 23728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, /* bytes 23728 - 23744 */ - 0x44, 0x54, 0x44, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 23744 - 23760 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 23760 - 23776 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23776 - 23792 */ - 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 23792 - 23808 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23808 - 23824 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23824 - 23840 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23840 - 23856 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 23856 - 23872 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23872 - 23888 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23888 - 23904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23904 - 23920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23920 - 23936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x50, /* bytes 23936 - 23952 */ - 0x50, 0x50, 0xa8, 0x3c, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 23952 - 23968 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x54, 0xa8, 0x3c, /* bytes 23968 - 23984 */ - 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 23984 - 24000 */ - 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 24000 - 24016 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24016 - 24032 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24032 - 24048 */ - 0x14, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24048 - 24064 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24064 - 24080 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24080 - 24096 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24096 - 24112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24112 - 24128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24128 - 24144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, /* bytes 24144 - 24160 */ - 0x40, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 24160 - 24176 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 24176 - 24192 */ - 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 24192 - 24208 */ - 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 24208 - 24224 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 24224 - 24240 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 24240 - 24256 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 24256 - 24272 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 24272 - 24288 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 24288 - 24304 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24304 - 24320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24320 - 24336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24336 - 24352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x44, /* bytes 24352 - 24368 */ - 0x54, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 24368 - 24384 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 24384 - 24400 */ - 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x14, /* bytes 24400 - 24416 */ - 0x3c, 0x54, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x54, /* bytes 24416 - 24432 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 24432 - 24448 */ - 0x54, 0x14, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 24448 - 24464 */ - 0x14, 0x54, 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 24464 - 24480 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 24480 - 24496 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x0c, /* bytes 24496 - 24512 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24512 - 24528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24528 - 24544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24544 - 24560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x3c, /* bytes 24560 - 24576 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 24576 - 24592 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 24592 - 24608 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 24608 - 24624 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 24624 - 24640 */ - 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 24640 - 24656 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 24656 - 24672 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 24672 - 24688 */ - 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 24688 - 24704 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 24704 - 24720 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24720 - 24736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24736 - 24752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24752 - 24768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x3c, /* bytes 24768 - 24784 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 24784 - 24800 */ - 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 24800 - 24816 */ - 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 24816 - 24832 */ - 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 24832 - 24848 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 24848 - 24864 */ - 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24864 - 24880 */ - 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24880 - 24896 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24896 - 24912 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24912 - 24928 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24928 - 24944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24944 - 24960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24960 - 24976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0xa8, /* bytes 24976 - 24992 */ - 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 24992 - 25008 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 25008 - 25024 */ - 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 25024 - 25040 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 25040 - 25056 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25056 - 25072 */ - 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25072 - 25088 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 25088 - 25104 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 25104 - 25120 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25120 - 25136 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25136 - 25152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25152 - 25168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25168 - 25184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa8, 0x3c, /* bytes 25184 - 25200 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 25200 - 25216 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 25216 - 25232 */ - 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x3c, 0x3c, 0x14, /* bytes 25232 - 25248 */ - 0x54, 0x54, 0x3c, 0x0c, 0x54, 0x14, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0xa8, 0x3c, /* bytes 25248 - 25264 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 25264 - 25280 */ - 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 25280 - 25296 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 25296 - 25312 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 25312 - 25328 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 25328 - 25344 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25344 - 25360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25360 - 25376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25376 - 25392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x14, 0xa8, /* bytes 25392 - 25408 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 25408 - 25424 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, /* bytes 25424 - 25440 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 25440 - 25456 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x54, 0xa8, /* bytes 25456 - 25472 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25472 - 25488 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25488 - 25504 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 25504 - 25520 */ - 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 25520 - 25536 */ - 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25536 - 25552 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25552 - 25568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25568 - 25584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25584 - 25600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x54, /* bytes 25600 - 25616 */ - 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 25616 - 25632 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 25632 - 25648 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 25648 - 25664 */ - 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 25664 - 25680 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 25680 - 25696 */ - 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 25696 - 25712 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 25712 - 25728 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 25728 - 25744 */ - 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 25744 - 25760 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25760 - 25776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25776 - 25792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25792 - 25808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 25808 - 25824 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 25824 - 25840 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 25840 - 25856 */ - 0x3c, 0xfc, 0xa8, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x14, 0x3c, /* bytes 25856 - 25872 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 25872 - 25888 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25888 - 25904 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25904 - 25920 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 25920 - 25936 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 25936 - 25952 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 25952 - 25968 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25968 - 25984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25984 - 26000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26000 - 26016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 26016 - 26032 */ - 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 26032 - 26048 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 26048 - 26064 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x3c, 0x3c, 0x14, /* bytes 26064 - 26080 */ - 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 26080 - 26096 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 26096 - 26112 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 26112 - 26128 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26128 - 26144 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26144 - 26160 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26160 - 26176 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26176 - 26192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26192 - 26208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26208 - 26224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 26224 - 26240 */ - 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x14, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 26240 - 26256 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 26256 - 26272 */ - 0xa8, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 26272 - 26288 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 26288 - 26304 */ - 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26304 - 26320 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26320 - 26336 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 26336 - 26352 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 26352 - 26368 */ - 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26368 - 26384 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26384 - 26400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26400 - 26416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26416 - 26432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 26432 - 26448 */ - 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 26448 - 26464 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 26464 - 26480 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 26480 - 26496 */ - 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 26496 - 26512 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x14, 0x14, 0x14, 0x54, 0x14, 0x14, 0x14, /* bytes 26512 - 26528 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 26528 - 26544 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 26544 - 26560 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 26560 - 26576 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 26576 - 26592 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26592 - 26608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26608 - 26624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26624 - 26640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 26640 - 26656 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 26656 - 26672 */ - 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 26672 - 26688 */ - 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 26688 - 26704 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 26704 - 26720 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x14, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26720 - 26736 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26736 - 26752 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 26752 - 26768 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 26768 - 26784 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26784 - 26800 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26800 - 26816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26816 - 26832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26832 - 26848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 26848 - 26864 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 26864 - 26880 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 26880 - 26896 */ - 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, /* bytes 26896 - 26912 */ - 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x14, 0x54, 0x3c, 0xa8, 0x3c, /* bytes 26912 - 26928 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x14, 0x14, /* bytes 26928 - 26944 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26944 - 26960 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26960 - 26976 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26976 - 26992 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 26992 - 27008 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27008 - 27024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27024 - 27040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27040 - 27056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 27056 - 27072 */ - 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 27072 - 27088 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 27088 - 27104 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27104 - 27120 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 27120 - 27136 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, /* bytes 27136 - 27152 */ - 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27152 - 27168 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 27168 - 27184 */ - 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 27184 - 27200 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27200 - 27216 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27216 - 27232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27232 - 27248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27248 - 27264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 27264 - 27280 */ - 0x3c, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 27280 - 27296 */ - 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 27296 - 27312 */ - 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, /* bytes 27312 - 27328 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, /* bytes 27328 - 27344 */ - 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0x14, /* bytes 27344 - 27360 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 27360 - 27376 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 27376 - 27392 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 27392 - 27408 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 27408 - 27424 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27424 - 27440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27440 - 27456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27456 - 27472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 27472 - 27488 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 27488 - 27504 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 27504 - 27520 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27520 - 27536 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 27536 - 27552 */ - 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 27552 - 27568 */ - 0x0c, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27568 - 27584 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 27584 - 27600 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 27600 - 27616 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 27616 - 27632 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27632 - 27648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27648 - 27664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27664 - 27680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x54, /* bytes 27680 - 27696 */ - 0x3c, 0x54, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 27696 - 27712 */ - 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 27712 - 27728 */ - 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, /* bytes 27728 - 27744 */ - 0x14, 0x14, 0x3c, 0x0c, 0x54, 0x54, 0x3c, 0x14, 0x54, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 27744 - 27760 */ - 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x0c, /* bytes 27760 - 27776 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 27776 - 27792 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 27792 - 27808 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 27808 - 27824 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 27824 - 27840 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27840 - 27856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27856 - 27872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27872 - 27888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 27888 - 27904 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 27904 - 27920 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 27920 - 27936 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27936 - 27952 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 27952 - 27968 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, /* bytes 27968 - 27984 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27984 - 28000 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28000 - 28016 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 28016 - 28032 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28032 - 28048 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28048 - 28064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28064 - 28080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28080 - 28096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa8, 0x3c, /* bytes 28096 - 28112 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, /* bytes 28112 - 28128 */ - 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 28128 - 28144 */ - 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, /* bytes 28144 - 28160 */ - 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 28160 - 28176 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x14, /* bytes 28176 - 28192 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 28192 - 28208 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 28208 - 28224 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 28224 - 28240 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 28240 - 28256 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28256 - 28272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28272 - 28288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28288 - 28304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 28304 - 28320 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 28320 - 28336 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 28336 - 28352 */ - 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28352 - 28368 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 28368 - 28384 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x14, 0x3c, /* bytes 28384 - 28400 */ - 0x0c, 0x3c, 0x14, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28400 - 28416 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28416 - 28432 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 28432 - 28448 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 28448 - 28464 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28464 - 28480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28480 - 28496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28496 - 28512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 28512 - 28528 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 28528 - 28544 */ - 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 28544 - 28560 */ - 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, /* bytes 28560 - 28576 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x54, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x54, /* bytes 28576 - 28592 */ - 0x3c, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x0c, /* bytes 28592 - 28608 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 28608 - 28624 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 28624 - 28640 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 28640 - 28656 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 28656 - 28672 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28672 - 28688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28688 - 28704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28704 - 28720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 28720 - 28736 */ - 0x54, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 28736 - 28752 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 28752 - 28768 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28768 - 28784 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28784 - 28800 */ - 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28800 - 28816 */ - 0x0c, 0x3c, 0x14, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28816 - 28832 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28832 - 28848 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 28848 - 28864 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 28864 - 28880 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28880 - 28896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28896 - 28912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28912 - 28928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 28928 - 28944 */ - 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, /* bytes 28944 - 28960 */ - 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 28960 - 28976 */ - 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 28976 - 28992 */ - 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, /* bytes 28992 - 29008 */ - 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, 0x14, 0x14, /* bytes 29008 - 29024 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29024 - 29040 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29040 - 29056 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29056 - 29072 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29072 - 29088 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29088 - 29104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29104 - 29120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29120 - 29136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 29136 - 29152 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 29152 - 29168 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 29168 - 29184 */ - 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29184 - 29200 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 29200 - 29216 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29216 - 29232 */ - 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 29232 - 29248 */ - 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29248 - 29264 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 29264 - 29280 */ - 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 29280 - 29296 */ - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29296 - 29312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29312 - 29328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29328 - 29344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x54, /* bytes 29344 - 29360 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 29360 - 29376 */ - 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 29376 - 29392 */ - 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 29392 - 29408 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x54, 0x54, 0xa8, 0x3c, /* bytes 29408 - 29424 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x0c, /* bytes 29424 - 29440 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 29440 - 29456 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 29456 - 29472 */ - 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 29472 - 29488 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 29488 - 29504 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29504 - 29520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29520 - 29536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29536 - 29552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x0c, 0xa8, /* bytes 29552 - 29568 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 29568 - 29584 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 29584 - 29600 */ - 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29600 - 29616 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, /* bytes 29616 - 29632 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, /* bytes 29632 - 29648 */ - 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29648 - 29664 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29664 - 29680 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 29680 - 29696 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 29696 - 29712 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29712 - 29728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29728 - 29744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29744 - 29760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x3c, 0x3c, /* bytes 29760 - 29776 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 29776 - 29792 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, /* bytes 29792 - 29808 */ - 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 29808 - 29824 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 29824 - 29840 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, /* bytes 29840 - 29856 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29856 - 29872 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, /* bytes 29872 - 29888 */ - 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29888 - 29904 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 29904 - 29920 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29920 - 29936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29936 - 29952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29952 - 29968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 29968 - 29984 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 29984 - 30000 */ - 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 30000 - 30016 */ - 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 30016 - 30032 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 30032 - 30048 */ - 0x54, 0xa8, 0x54, 0xa8, 0x14, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0x3c, /* bytes 30048 - 30064 */ - 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 30064 - 30080 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 30080 - 30096 */ - 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 30096 - 30112 */ - 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 30112 - 30128 */ - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30128 - 30144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30144 - 30160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30160 - 30176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x54, /* bytes 30176 - 30192 */ - 0x3c, 0x54, 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x54, 0x54, 0x3c, 0x54, /* bytes 30192 - 30208 */ - 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 30208 - 30224 */ - 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 30224 - 30240 */ - 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 30240 - 30256 */ - 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0x3c, 0x0c, /* bytes 30256 - 30272 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 30272 - 30288 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x14, /* bytes 30288 - 30304 */ - 0x54, 0x54, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 30304 - 30320 */ - 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 30320 - 30336 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30336 - 30352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30352 - 30368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30368 - 30384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x0c, 0xa8, /* bytes 30384 - 30400 */ - 0x0c, 0x3c, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 30400 - 30416 */ - 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 30416 - 30432 */ - 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 30432 - 30448 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 30448 - 30464 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x3c, /* bytes 30464 - 30480 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 30480 - 30496 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 30496 - 30512 */ - 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 30512 - 30528 */ - 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 30528 - 30544 */ - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30544 - 30560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30560 - 30576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30576 - 30592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x54, /* bytes 30592 - 30608 */ - 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 30608 - 30624 */ - 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x54, 0x3c, /* bytes 30624 - 30640 */ - 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 30640 - 30656 */ - 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, /* bytes 30656 - 30672 */ - 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, /* bytes 30672 - 30688 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 30688 - 30704 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x54, 0x14, /* bytes 30704 - 30720 */ - 0x3c, 0x14, 0x14, 0x14, 0x54, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 30720 - 30736 */ - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 30736 - 30752 */ - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30752 - 30768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 16 - 32 */ + 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 32 - 48 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 48 - 64 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 64 - 80 */ + 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, + 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 80 - 96 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 96 - 112 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 112 - 128 */ + 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 128 - 144 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 144 - 160 */ + 0x14, 0xa8, 0x54, 0x3c, 0x54, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 160 - 176 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 224 - 240 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 240 - 256 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 256 - 272 */ + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 272 - 288 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x14, 0x3c, 0x14, /* bytes 288 - 304 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 304 - 320 */ + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x0c, 0x54, 0x3c, 0xa8, 0x3c, /* bytes 320 - 336 */ + 0xa8, 0xa8, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 336 - 352 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 352 - 368 */ + 0x3c, 0x54, 0x3c, 0x54, 0x54, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, /* bytes 368 - 384 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 432 - 448 */ + 0x3c, 0xa8, 0xa8, 0xfc, 0x3c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 448 - 464 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, + 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, /* bytes 464 - 480 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 480 - 496 */ + 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, + 0xa8, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 496 - 512 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 512 - 528 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 528 - 544 */ + 0x54, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 544 - 560 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 560 - 576 */ + 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 576 - 592 */ + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 608 - 624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 640 - 656 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 656 - 672 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, + 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 672 - 688 */ + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 688 - 704 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 704 - 720 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 720 - 736 */ + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x14, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x54, 0xa8, 0x3c, /* bytes 736 - 752 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 752 - 768 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 768 - 784 */ + 0xa8, 0x3c, 0x54, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x54, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, /* bytes 784 - 800 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 848 - 864 */ + 0x3c, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 864 - 880 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 880 - 896 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 896 - 912 */ + 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, + 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 912 - 928 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 928 - 944 */ + 0x0c, 0x3c, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 944 - 960 */ + 0x54, 0xa8, 0xa8, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 960 - 976 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 976 - 992 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 992 - 1008 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1008 - 1024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 1056 - 1072 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 1072 - 1088 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0x54, 0x3c, 0x3c, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 1088 - 1104 */ + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 1104 - 1120 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x14, 0x14, 0x3c, 0x14, /* bytes 1120 - 1136 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 1136 - 1152 */ + 0x14, 0x54, 0x3c, 0x54, 0x54, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 1152 - 1168 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 1168 - 1184 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 1184 - 1200 */ + 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 1200 - 1216 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1248 - 1264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 1264 - 1280 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 1280 - 1296 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0x3c, 0x54, 0x3c, + 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 1296 - 1312 */ + 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 1312 - 1328 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1328 - 1344 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1344 - 1360 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 1360 - 1376 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1376 - 1392 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, /* bytes 1392 - 1408 */ + 0x54, 0xa8, 0x14, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 1408 - 1424 */ + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 1472 - 1488 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 1488 - 1504 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x54, 0x54, 0x54, + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 1504 - 1520 */ + 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, + 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 1520 - 1536 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 1536 - 1552 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 1552 - 1568 */ + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 1568 - 1584 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 1584 - 1600 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 1600 - 1616 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x54, /* bytes 1616 - 1632 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1648 - 1664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 1680 - 1696 */ + 0x3c, 0xa8, 0x54, 0xfc, 0xfc, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 1696 - 1712 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x3c, /* bytes 1712 - 1728 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 1728 - 1744 */ + 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1744 - 1760 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1760 - 1776 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 1776 - 1792 */ + 0x54, 0xa8, 0xa8, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 1792 - 1808 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 1808 - 1824 */ + 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, + 0x3c, 0xa8, 0xa8, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 1824 - 1840 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 1888 - 1904 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 1904 - 1920 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x54, + 0x54, 0x54, 0x3c, 0x54, 0x54, 0x3c, 0xa8, 0x3c, /* bytes 1920 - 1936 */ + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 1936 - 1952 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, + 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 1952 - 1968 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 1968 - 1984 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 1984 - 2000 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0x3c, 0x3c, 0x3c, 0x54, 0x14, 0x14, 0x3c, 0x14, /* bytes 2000 - 2016 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 2016 - 2032 */ + 0x3c, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, /* bytes 2032 - 2048 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2048 - 2064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 2096 - 2112 */ + 0xa8, 0xa8, 0x0c, 0xfc, 0xa8, 0xfc, 0x3c, 0xa8, + 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 2112 - 2128 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x54, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 2128 - 2144 */ + 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 2144 - 2160 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2160 - 2176 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2176 - 2192 */ + 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 2192 - 2208 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, + 0x3c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2208 - 2224 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x54, 0xa8, /* bytes 2224 - 2240 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 2240 - 2256 */ + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2288 - 2304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 2304 - 2320 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 2320 - 2336 */ + 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, + 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x54, /* bytes 2336 - 2352 */ + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2352 - 2368 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, + 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 2368 - 2384 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 2384 - 2400 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 2400 - 2416 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0x54, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 2416 - 2432 */ + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0xa8, /* bytes 2432 - 2448 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2448 - 2464 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 2512 - 2528 */ + 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 2528 - 2544 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 2544 - 2560 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 2560 - 2576 */ + 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2576 - 2592 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2592 - 2608 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 2608 - 2624 */ + 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, + 0x54, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2624 - 2640 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 2640 - 2656 */ + 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, + 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 2656 - 2672 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2688 - 2704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 2720 - 2736 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 2736 - 2752 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 2752 - 2768 */ + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 2768 - 2784 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, /* bytes 2784 - 2800 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 2800 - 2816 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, + 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x3c, 0xa8, 0x3c, /* bytes 2816 - 2832 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 2832 - 2848 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x3c, 0xa8, 0x54, 0x3c, 0xa8, 0xa8, 0xa8, /* bytes 2848 - 2864 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2864 - 2880 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 2928 - 2944 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 2944 - 2960 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 2960 - 2976 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0x3c, 0x14, 0xa8, /* bytes 2976 - 2992 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 2992 - 3008 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3008 - 3024 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x54, 0xa8, /* bytes 3024 - 3040 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3040 - 3056 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 3056 - 3072 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 3072 - 3088 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3088 - 3104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 3136 - 3152 */ + 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0x3c, 0x54, + 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 3152 - 3168 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 3168 - 3184 */ + 0xa8, 0x3c, 0x54, 0x3c, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, /* bytes 3184 - 3200 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x54, 0xa8, 0x3c, + 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 3200 - 3216 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 3216 - 3232 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0xa8, /* bytes 3232 - 3248 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x14, 0x3c, 0x14, /* bytes 3248 - 3264 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3264 - 3280 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3280 - 3296 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3328 - 3344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 3344 - 3360 */ + 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 3360 - 3376 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 3376 - 3392 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 3392 - 3408 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x14, 0x3c, + 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3408 - 3424 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3424 - 3440 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x14, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 3440 - 3456 */ + 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, + 0x3c, 0xa8, 0xa8, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 3456 - 3472 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 3472 - 3488 */ + 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, + 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 3488 - 3504 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3504 - 3520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3520 - 3536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3536 - 3552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x54, /* bytes 3552 - 3568 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 3568 - 3584 */ + 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3584 - 3600 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, + 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x3c, 0xa8, 0x54, /* bytes 3600 - 3616 */ + 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, + 0x14, 0x54, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 3616 - 3632 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 3632 - 3648 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, + 0x54, 0x54, 0x3c, 0x3c, 0x54, 0x3c, 0xa8, 0xa8, /* bytes 3648 - 3664 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 3664 - 3680 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x54, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3680 - 3696 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3696 - 3712 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3712 - 3728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3728 - 3744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3744 - 3760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 3760 - 3776 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0x3c, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 3776 - 3792 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 3792 - 3808 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 3808 - 3824 */ + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3824 - 3840 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 3840 - 3856 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 3856 - 3872 */ + 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, + 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, /* bytes 3872 - 3888 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 3888 - 3904 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3904 - 3920 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3920 - 3936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3936 - 3952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3952 - 3968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 3968 - 3984 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0x3c, 0x3c, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 3984 - 4000 */ + 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4000 - 4016 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 4016 - 4032 */ + 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, + 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 4032 - 4048 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 4048 - 4064 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 4064 - 4080 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x14, /* bytes 4080 - 4096 */ + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x54, 0x54, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4096 - 4112 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4112 - 4128 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4128 - 4144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4144 - 4160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4160 - 4176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 4176 - 4192 */ + 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 4192 - 4208 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 4208 - 4224 */ + 0x3c, 0xfc, 0xa8, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 4224 - 4240 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 4240 - 4256 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 4256 - 4272 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 4272 - 4288 */ + 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, + 0x3c, 0xfc, 0xa8, 0xa8, 0x0c, 0xa8, 0x14, 0x3c, /* bytes 4288 - 4304 */ + 0x0c, 0x3c, 0x14, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 4304 - 4320 */ + 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, + 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 4320 - 4336 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4336 - 4352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4352 - 4368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4368 - 4384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x54, /* bytes 4384 - 4400 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 4400 - 4416 */ + 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4416 - 4432 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0x14, + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, /* bytes 4432 - 4448 */ + 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 4448 - 4464 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 4464 - 4480 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x54, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0xa8, /* bytes 4480 - 4496 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x14, 0x3c, 0x0c, /* bytes 4496 - 4512 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 4512 - 4528 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4528 - 4544 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4544 - 4560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4560 - 4576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4576 - 4592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 4592 - 4608 */ + 0x54, 0xa8, 0xa8, 0xfc, 0x54, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 4608 - 4624 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 4624 - 4640 */ + 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, /* bytes 4640 - 4656 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 4656 - 4672 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 4672 - 4688 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 4688 - 4704 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 4704 - 4720 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 4720 - 4736 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4736 - 4752 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4752 - 4768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4768 - 4784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4784 - 4800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 4800 - 4816 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 4816 - 4832 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, + 0x3c, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4832 - 4848 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x14, /* bytes 4848 - 4864 */ + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 4864 - 4880 */ + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 4880 - 4896 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4896 - 4912 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x3c, 0x3c, 0x54, 0x14, 0x14, 0x14, 0x14, /* bytes 4912 - 4928 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 4928 - 4944 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4944 - 4960 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4960 - 4976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4976 - 4992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4992 - 5008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 5008 - 5024 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 5024 - 5040 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 5040 - 5056 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x14, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 5056 - 5072 */ + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 5072 - 5088 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 5088 - 5104 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 5104 - 5120 */ + 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, /* bytes 5120 - 5136 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5136 - 5152 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, + 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 5152 - 5168 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5168 - 5184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5184 - 5200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5200 - 5216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 5216 - 5232 */ + 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 5232 - 5248 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5248 - 5264 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x14, /* bytes 5264 - 5280 */ + 0x54, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 5280 - 5296 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x0c, /* bytes 5296 - 5312 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5312 - 5328 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 5328 - 5344 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 5344 - 5360 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5360 - 5376 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5376 - 5392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5392 - 5408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5408 - 5424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 5424 - 5440 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 5440 - 5456 */ + 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 5456 - 5472 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, /* bytes 5472 - 5488 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 5488 - 5504 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, /* bytes 5504 - 5520 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5520 - 5536 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, /* bytes 5536 - 5552 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5552 - 5568 */ + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5568 - 5584 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5584 - 5600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5600 - 5616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5616 - 5632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x3c, /* bytes 5632 - 5648 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, 0x3c, 0x3c, + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5648 - 5664 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 5664 - 5680 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, /* bytes 5680 - 5696 */ + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 5696 - 5712 */ + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, /* bytes 5712 - 5728 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 5728 - 5744 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x14, 0x54, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 5744 - 5760 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 5760 - 5776 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5776 - 5792 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5792 - 5808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5808 - 5824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5824 - 5840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 5840 - 5856 */ + 0x3c, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, /* bytes 5856 - 5872 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5872 - 5888 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, /* bytes 5888 - 5904 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 5904 - 5920 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 5920 - 5936 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 5936 - 5952 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x14, 0x14, 0x3c, /* bytes 5952 - 5968 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 5968 - 5984 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 5984 - 6000 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6000 - 6016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6016 - 6032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6032 - 6048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 6048 - 6064 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6064 - 6080 */ + 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 6080 - 6096 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, + 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x14, /* bytes 6096 - 6112 */ + 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, /* bytes 6112 - 6128 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x14, /* bytes 6128 - 6144 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 6144 - 6160 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 6160 - 6176 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x14, 0x54, 0x54, 0x3c, 0x14, /* bytes 6176 - 6192 */ + 0x54, 0x54, 0x3c, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6192 - 6208 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6208 - 6224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6224 - 6240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6240 - 6256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 6256 - 6272 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, /* bytes 6272 - 6288 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 6288 - 6304 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, /* bytes 6304 - 6320 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6320 - 6336 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6336 - 6352 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0xa8, /* bytes 6352 - 6368 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6368 - 6384 */ + 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6384 - 6400 */ + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, /* bytes 6400 - 6416 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6416 - 6432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6432 - 6448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6448 - 6464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 6464 - 6480 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6480 - 6496 */ + 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, /* bytes 6496 - 6512 */ + 0xa8, 0x54, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 6512 - 6528 */ + 0x3c, 0x14, 0x3c, 0x14, 0x54, 0xc0, 0x54, 0x54, + 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 6528 - 6544 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 6544 - 6560 */ + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 6560 - 6576 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 6576 - 6592 */ + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 6592 - 6608 */ + 0x14, 0x14, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6608 - 6624 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6624 - 6640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6640 - 6656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6656 - 6672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 6672 - 6688 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 6688 - 6704 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 6704 - 6720 */ + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 6720 - 6736 */ + 0x0c, 0x3c, 0x0c, 0x54, 0x40, 0x54, 0xc0, 0xa8, + 0xc0, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6736 - 6752 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6752 - 6768 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 6768 - 6784 */ + 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6784 - 6800 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 6800 - 6816 */ + 0x0c, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, /* bytes 6816 - 6832 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6832 - 6848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6848 - 6864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6864 - 6880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 6880 - 6896 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 6896 - 6912 */ + 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 6912 - 6928 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0x54, 0x3c, 0x3c, 0x54, + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x0c, /* bytes 6928 - 6944 */ + 0x54, 0x54, 0x54, 0x40, 0x44, 0x44, 0x50, 0x54, + 0xa8, 0x54, 0x54, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 6944 - 6960 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x54, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 6960 - 6976 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0xa8, 0x3c, /* bytes 6976 - 6992 */ + 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, + 0x54, 0x54, 0xa8, 0x54, 0x14, 0x14, 0x3c, 0x0c, /* bytes 6992 - 7008 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 7008 - 7024 */ + 0x54, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7024 - 7040 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7040 - 7056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7056 - 7072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7072 - 7088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 7088 - 7104 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 7104 - 7120 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 7120 - 7136 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, + 0x0c, 0xa8, 0x0c, 0x54, 0x50, 0x3c, 0x0c, 0x3c, /* bytes 7136 - 7152 */ + 0x0c, 0x3c, 0x40, 0x10, 0x00, 0x54, 0xc0, 0x54, + 0xc0, 0xa8, 0x54, 0xf0, 0x54, 0x3c, 0x0c, 0x3c, /* bytes 7152 - 7168 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7168 - 7184 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7184 - 7200 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x0c, 0x3c, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7200 - 7216 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7216 - 7232 */ + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 7232 - 7248 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7248 - 7264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7264 - 7280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7280 - 7296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 7296 - 7312 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7312 - 7328 */ + 0x3c, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, + 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 7328 - 7344 */ + 0xa8, 0x3c, 0x54, 0x54, 0x54, 0x54, 0x54, 0x3c, + 0x3c, 0x14, 0x44, 0xc0, 0xa8, 0xc0, 0x40, 0x40, /* bytes 7344 - 7360 */ + 0x54, 0x54, 0x10, 0x00, 0x40, 0x54, 0xa8, 0x54, + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x50, 0x54, 0x14, /* bytes 7360 - 7376 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 7376 - 7392 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, /* bytes 7392 - 7408 */ + 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x14, + 0x3c, 0x14, 0x54, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 7408 - 7424 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 7424 - 7440 */ + 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 7440 - 7456 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7456 - 7472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7472 - 7488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7488 - 7504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 7504 - 7520 */ + 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, + 0x3c, 0xfc, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 7520 - 7536 */ + 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 7536 - 7552 */ + 0x0c, 0xa8, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, + 0x0c, 0x50, 0xc0, 0xa8, 0xc0, 0x50, 0x00, 0x40, /* bytes 7552 - 7568 */ + 0x00, 0x54, 0x00, 0x10, 0x44, 0xa8, 0x54, 0xa8, + 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 7568 - 7584 */ + 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7584 - 7600 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7600 - 7616 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7616 - 7632 */ + 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 7632 - 7648 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 7648 - 7664 */ + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7664 - 7680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7680 - 7696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7696 - 7712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 7712 - 7728 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 7728 - 7744 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0xa8, 0xa8, 0x3c, /* bytes 7744 - 7760 */ + 0x3c, 0x10, 0x44, 0xc0, 0x54, 0x54, 0x54, 0x44, + 0x40, 0xc0, 0xa8, 0x54, 0x40, 0x40, 0x50, 0x40, /* bytes 7760 - 7776 */ + 0x44, 0x40, 0x10, 0x40, 0x50, 0x50, 0x54, 0x54, + 0xa8, 0x54, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xc0, /* bytes 7776 - 7792 */ + 0x54, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x3c, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 7792 - 7808 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 7808 - 7824 */ + 0x14, 0x14, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x14, /* bytes 7824 - 7840 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 7840 - 7856 */ + 0x14, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 7856 - 7872 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7872 - 7888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7888 - 7904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7904 - 7920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 7920 - 7936 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 7936 - 7952 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x3c, 0xa8, 0x04, 0x54, 0x14, 0x3c, 0x54, 0xa8, /* bytes 7952 - 7968 */ + 0x14, 0x50, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, + 0x40, 0xa8, 0xc0, 0x54, 0x00, 0x54, 0x40, 0x54, /* bytes 7968 - 7984 */ + 0xc0, 0x54, 0x00, 0x54, 0x40, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, /* bytes 7984 - 8000 */ + 0xc0, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8000 - 8016 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8016 - 8032 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8032 - 8048 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8048 - 8064 */ + 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 8064 - 8080 */ + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8080 - 8096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8096 - 8112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8112 - 8128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 8128 - 8144 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 8144 - 8160 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, + 0x14, 0x00, 0x40, 0x00, 0x40, 0x40, 0x14, 0x50, /* bytes 8160 - 8176 */ + 0x50, 0x44, 0x50, 0x50, 0x50, 0x50, 0x54, 0x44, + 0x50, 0x50, 0x40, 0x40, 0x44, 0x40, 0x54, 0x54, /* bytes 8176 - 8192 */ + 0xa8, 0x54, 0x50, 0x40, 0xc0, 0xc0, 0x50, 0x44, + 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 8192 - 8208 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x14, 0x3c, 0x14, + 0x04, 0x00, 0x44, 0x50, 0x54, 0x54, 0x54, 0x0c, /* bytes 8208 - 8224 */ + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 8224 - 8240 */ + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 8240 - 8256 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x54, 0x3c, 0x14, 0x14, 0x14, /* bytes 8256 - 8272 */ + 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x54, 0x3c, 0x54, + 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 8272 - 8288 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8288 - 8304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8304 - 8320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8320 - 8336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 8336 - 8352 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, + 0x3c, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 8352 - 8368 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x10, + 0x00, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0xc0, /* bytes 8368 - 8384 */ + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x44, 0x50, + 0x40, 0x50, 0x00, 0x50, 0x00, 0x54, 0x50, 0x54, /* bytes 8384 - 8400 */ + 0xc0, 0xf0, 0x50, 0x54, 0x40, 0x54, 0x50, 0x54, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 8400 - 8416 */ + 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x50, + 0x00, 0x10, 0x00, 0x40, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 8416 - 8432 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8432 - 8448 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, /* bytes 8448 - 8464 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8464 - 8480 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 8480 - 8496 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8496 - 8512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8512 - 8528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8528 - 8544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 8544 - 8560 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8560 - 8576 */ + 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x14, 0x00, + 0x40, 0x44, 0x50, 0x40, 0x44, 0x44, 0x50, 0xc0, /* bytes 8576 - 8592 */ + 0x50, 0x50, 0x50, 0x40, 0x10, 0x44, 0x10, 0x40, + 0x40, 0x40, 0x14, 0x40, 0x50, 0x54, 0x54, 0x50, /* bytes 8592 - 8608 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 8608 - 8624 */ + 0x54, 0x54, 0x54, 0x50, 0x50, 0x40, 0x40, 0x04, + 0x40, 0x04, 0x10, 0x00, 0x50, 0x54, 0x54, 0xc0, /* bytes 8624 - 8640 */ + 0x54, 0x54, 0x54, 0x14, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, /* bytes 8640 - 8656 */ + 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 8656 - 8672 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x14, 0x54, 0x14, 0x3c, 0x0c, /* bytes 8672 - 8688 */ + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 8688 - 8704 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8704 - 8720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8720 - 8736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8736 - 8752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 8752 - 8768 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 8768 - 8784 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x50, + 0x04, 0x50, 0x04, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 8784 - 8800 */ + 0x44, 0x54, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, + 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 8800 - 8816 */ + 0xc0, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0x50, 0xf0, /* bytes 8816 - 8832 */ + 0x54, 0xa8, 0xc0, 0x54, 0x40, 0x10, 0x00, 0x54, + 0x00, 0x10, 0x00, 0x14, 0x40, 0xa8, 0xc0, 0x54, /* bytes 8832 - 8848 */ + 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8848 - 8864 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8864 - 8880 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 8880 - 8896 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 8896 - 8912 */ + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8912 - 8928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8928 - 8944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8944 - 8960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, /* bytes 8960 - 8976 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 8976 - 8992 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x04, 0x00, 0x40, + 0x44, 0x40, 0x10, 0x40, 0x10, 0x40, 0x44, 0x40, /* bytes 8992 - 9008 */ + 0x44, 0x40, 0x44, 0x44, 0x50, 0x40, 0x50, 0x44, + 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 9008 - 9024 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, /* bytes 9024 - 9040 */ + 0x54, 0x50, 0x54, 0x40, 0x40, 0x00, 0x10, 0x44, + 0x50, 0x00, 0x04, 0x40, 0x54, 0x54, 0x54, 0x54, /* bytes 9040 - 9056 */ + 0x54, 0x50, 0x50, 0x50, 0x54, 0xc0, 0x54, 0x54, + 0x54, 0x0c, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 9056 - 9072 */ + 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 9072 - 9088 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 9088 - 9104 */ + 0x14, 0x14, 0x14, 0x54, 0x3c, 0x14, 0x3c, 0x54, + 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 9104 - 9120 */ + 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9120 - 9136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9136 - 9152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9152 - 9168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 9168 - 9184 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 9184 - 9200 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0x14, 0x00, 0x14, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 9200 - 9216 */ + 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 9216 - 9232 */ + 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, + 0x44, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 9232 - 9248 */ + 0x00, 0x54, 0x40, 0x10, 0x00, 0x54, 0x40, 0x50, + 0x04, 0x54, 0x00, 0x50, 0x44, 0xf0, 0x50, 0x54, /* bytes 9248 - 9264 */ + 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 9264 - 9280 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 9280 - 9296 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 9296 - 9312 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 9312 - 9328 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9328 - 9344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9344 - 9360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9360 - 9376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 9376 - 9392 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 9392 - 9408 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0x14, 0x00, 0x10, 0x04, + 0x40, 0x40, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, /* bytes 9408 - 9424 */ + 0x44, 0x44, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 9424 - 9440 */ + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0xc0, + 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x40, /* bytes 9440 - 9456 */ + 0x44, 0x40, 0x44, 0x00, 0x40, 0x50, 0x50, 0x40, + 0x40, 0x04, 0x44, 0x40, 0x54, 0x54, 0x54, 0x50, /* bytes 9456 - 9472 */ + 0x54, 0x54, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, + 0x50, 0x50, 0x54, 0x14, 0x14, 0x14, 0x3c, 0x0c, /* bytes 9472 - 9488 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 9488 - 9504 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 9504 - 9520 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x54, 0x54, 0x3c, 0xa8, 0x54, /* bytes 9520 - 9536 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9536 - 9552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9552 - 9568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9568 - 9584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 9584 - 9600 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, + 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 9600 - 9616 */ + 0x54, 0xa8, 0x54, 0xa8, 0x04, 0x40, 0x00, 0x10, + 0x04, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, /* bytes 9616 - 9632 */ + 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 9632 - 9648 */ + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x54, + 0xc0, 0x54, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 9648 - 9664 */ + 0x40, 0x50, 0x00, 0x10, 0x40, 0x54, 0x40, 0x50, + 0x00, 0x10, 0x00, 0x54, 0xc0, 0xf0, 0xc0, 0xa8, /* bytes 9664 - 9680 */ + 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0xf0, 0x40, 0x40, 0x04, 0x54, /* bytes 9680 - 9696 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 9696 - 9712 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 9712 - 9728 */ + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 9728 - 9744 */ + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9744 - 9760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9760 - 9776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9776 - 9792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 9792 - 9808 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, /* bytes 9808 - 9824 */ + 0xa8, 0x54, 0xa8, 0xa8, 0x14, 0x00, 0x44, 0x04, + 0x44, 0x40, 0x40, 0x40, 0x50, 0x40, 0x44, 0x40, /* bytes 9824 - 9840 */ + 0x50, 0x40, 0x44, 0x44, 0x50, 0xc0, 0x50, 0x50, + 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, /* bytes 9840 - 9856 */ + 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, /* bytes 9856 - 9872 */ + 0x50, 0x40, 0x44, 0x40, 0x50, 0x44, 0x50, 0x40, + 0x40, 0x00, 0x10, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 9872 - 9888 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x54, 0x54, 0x00, 0x40, 0x40, /* bytes 9888 - 9904 */ + 0x50, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 9904 - 9920 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 9920 - 9936 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0xa8, 0x3c, /* bytes 9936 - 9952 */ + 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9952 - 9968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9968 - 9984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9984 - 10000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 10000 - 10016 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 10016 - 10032 */ + 0x0c, 0xa8, 0x3c, 0xa8, 0x00, 0x10, 0x04, 0x10, + 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 10032 - 10048 */ + 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x50, + 0x40, 0x54, 0x44, 0x50, 0x44, 0x54, 0xc0, 0x54, /* bytes 10048 - 10064 */ + 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, + 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 10064 - 10080 */ + 0x40, 0x54, 0x04, 0x50, 0x40, 0x54, 0x40, 0x50, + 0x00, 0x14, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 10080 - 10096 */ + 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0xc0, 0x54, + 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0x00, 0x50, /* bytes 10096 - 10112 */ + 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 10112 - 10128 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 10128 - 10144 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 10144 - 10160 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10160 - 10176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10176 - 10192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10192 - 10208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 10208 - 10224 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 10224 - 10240 */ + 0xa8, 0x3c, 0xa8, 0x54, 0x00, 0x00, 0x44, 0x00, + 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 10240 - 10256 */ + 0x44, 0x40, 0x10, 0x40, 0x40, 0x50, 0x50, 0x44, + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, /* bytes 10256 - 10272 */ + 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, + 0x50, 0x50, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 10272 - 10288 */ + 0x54, 0x44, 0x14, 0x44, 0x50, 0x44, 0x50, 0x04, + 0x40, 0x50, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 10288 - 10304 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x40, 0x04, /* bytes 10304 - 10320 */ + 0x40, 0x04, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 10320 - 10336 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 10336 - 10352 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x54, 0x54, 0x3c, 0x14, /* bytes 10352 - 10368 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10368 - 10384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10384 - 10400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10400 - 10416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 10416 - 10432 */ + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 10432 - 10448 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, /* bytes 10448 - 10464 */ + 0x40, 0x50, 0x04, 0x50, 0x00, 0x50, 0x40, 0x54, + 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, /* bytes 10464 - 10480 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0xc0, 0x54, 0xc0, 0xf0, 0x54, 0xf0, 0xc0, 0xf0, /* bytes 10480 - 10496 */ + 0xc0, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, + 0x40, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xa8, /* bytes 10496 - 10512 */ + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x00, 0x54, /* bytes 10512 - 10528 */ + 0x04, 0x10, 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 10528 - 10544 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 10544 - 10560 */ + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 10560 - 10576 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10576 - 10592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10592 - 10608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10608 - 10624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 10624 - 10640 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 10640 - 10656 */ + 0xa8, 0x54, 0xa8, 0x54, 0x04, 0x00, 0x04, 0x04, + 0x44, 0x04, 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, /* bytes 10656 - 10672 */ + 0x40, 0x40, 0x44, 0x40, 0x10, 0x40, 0x50, 0x44, + 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, /* bytes 10672 - 10688 */ + 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, + 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 10688 - 10704 */ + 0x54, 0x40, 0x50, 0x44, 0x50, 0x44, 0x10, 0x40, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 10704 - 10720 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x50, 0x04, /* bytes 10720 - 10736 */ + 0x44, 0x40, 0x40, 0x40, 0x3c, 0x0c, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 10736 - 10752 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 10752 - 10768 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 10768 - 10784 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10784 - 10800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10800 - 10816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10816 - 10832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 10832 - 10848 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, /* bytes 10848 - 10864 */ + 0x0c, 0xa8, 0x3c, 0x54, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x54, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 10864 - 10880 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, /* bytes 10880 - 10896 */ + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0xc0, 0x54, + 0x40, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 10896 - 10912 */ + 0x44, 0x54, 0x44, 0x50, 0x44, 0x54, 0x40, 0x54, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 10912 - 10928 */ + 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, + 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0x50, 0x44, 0x14, /* bytes 10928 - 10944 */ + 0x00, 0x50, 0x00, 0x40, 0x40, 0x3c, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 10944 - 10960 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 10960 - 10976 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 10976 - 10992 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10992 - 11008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11008 - 11024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11024 - 11040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 11040 - 11056 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, + 0x3c, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 11056 - 11072 */ + 0xa8, 0x3c, 0xa8, 0x14, 0x00, 0x00, 0x44, 0x00, + 0x40, 0x40, 0x44, 0x04, 0x40, 0x40, 0x10, 0x40, /* bytes 11072 - 11088 */ + 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, /* bytes 11088 - 11104 */ + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, + 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, /* bytes 11104 - 11120 */ + 0x54, 0x50, 0x54, 0x44, 0x50, 0x50, 0x54, 0x50, + 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x50, /* bytes 11120 - 11136 */ + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x40, 0x54, 0x40, /* bytes 11136 - 11152 */ + 0x40, 0x40, 0x44, 0x04, 0x40, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, /* bytes 11152 - 11168 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 11168 - 11184 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 11184 - 11200 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11200 - 11216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11216 - 11232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11232 - 11248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 11248 - 11264 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 11264 - 11280 */ + 0x54, 0xa8, 0x54, 0x54, 0x00, 0x50, 0x00, 0x14, + 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x04, 0x54, /* bytes 11280 - 11296 */ + 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 11296 - 11312 */ + 0x40, 0x50, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 11312 - 11328 */ + 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0xf0, + 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xf0, /* bytes 11328 - 11344 */ + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, + 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0x10, 0x40, 0x54, /* bytes 11344 - 11360 */ + 0x00, 0x14, 0x00, 0x50, 0x00, 0x54, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 11360 - 11376 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 11376 - 11392 */ + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 11392 - 11408 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11408 - 11424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11424 - 11440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11440 - 11456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0xa8, /* bytes 11456 - 11472 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 11472 - 11488 */ + 0x3c, 0x3c, 0xa8, 0x04, 0x00, 0x00, 0x40, 0x04, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 11488 - 11504 */ + 0x44, 0x40, 0x44, 0x40, 0x10, 0x40, 0x40, 0x40, + 0x14, 0x40, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, /* bytes 11504 - 11520 */ + 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, 0x50, 0xc0, + 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, /* bytes 11520 - 11536 */ + 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, /* bytes 11536 - 11552 */ + 0x50, 0x40, 0x50, 0x44, 0x50, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x40, 0x40, 0x50, /* bytes 11552 - 11568 */ + 0x44, 0x04, 0x44, 0x40, 0x40, 0x04, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 11568 - 11584 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 11584 - 11600 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 11600 - 11616 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11616 - 11632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11632 - 11648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11648 - 11664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 11664 - 11680 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 11680 - 11696 */ + 0x0c, 0xa8, 0x54, 0x44, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x40, 0x10, /* bytes 11696 - 11712 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x10, + 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 11712 - 11728 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x54, 0xc0, 0x50, 0x44, 0x54, 0xc0, 0x54, /* bytes 11728 - 11744 */ + 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xf0, 0x50, 0xa8, + 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0xf0, 0xc0, 0x54, /* bytes 11744 - 11760 */ + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x44, 0x54, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x50, 0x00, 0x54, /* bytes 11760 - 11776 */ + 0x04, 0x10, 0x04, 0x10, 0x00, 0x50, 0x14, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 11776 - 11792 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 11792 - 11808 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 11808 - 11824 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11824 - 11840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11840 - 11856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11856 - 11872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 11872 - 11888 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 11888 - 11904 */ + 0x3c, 0xa8, 0x54, 0x00, 0x04, 0x04, 0x44, 0x00, + 0x40, 0x40, 0x44, 0x00, 0x40, 0x40, 0x10, 0x40, /* bytes 11904 - 11920 */ + 0x40, 0x44, 0x10, 0x40, 0x44, 0x40, 0x50, 0x40, + 0x40, 0x40, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, /* bytes 11920 - 11936 */ + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, + 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, /* bytes 11936 - 11952 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x40, /* bytes 11952 - 11968 */ + 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x40, 0x40, + 0x50, 0x54, 0xa8, 0x54, 0x54, 0x40, 0x44, 0x40, /* bytes 11968 - 11984 */ + 0x50, 0x40, 0x10, 0x00, 0x40, 0x40, 0x14, 0x0c, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 11984 - 12000 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 12000 - 12016 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 12016 - 12032 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12032 - 12048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12048 - 12064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12064 - 12080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 12080 - 12096 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 12096 - 12112 */ + 0x3c, 0xa8, 0x00, 0x40, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, /* bytes 12112 - 12128 */ + 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x50, + 0x04, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, /* bytes 12128 - 12144 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 12144 - 12160 */ + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x50, /* bytes 12160 - 12176 */ + 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, + 0x00, 0x50, 0x40, 0xf0, 0x40, 0x10, 0x00, 0x50, /* bytes 12176 - 12192 */ + 0x44, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 12192 - 12208 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 12208 - 12224 */ + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 12224 - 12240 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12240 - 12256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12256 - 12272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12272 - 12288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa8, 0x3c, /* bytes 12288 - 12304 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 12304 - 12320 */ + 0xa8, 0x04, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x04, 0x40, 0x04, 0x40, 0x40, /* bytes 12320 - 12336 */ + 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, + 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x50, 0x44, /* bytes 12336 - 12352 */ + 0x50, 0x44, 0x50, 0xc0, 0x50, 0x44, 0x50, 0xc0, + 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x54, 0x50, /* bytes 12352 - 12368 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x50, 0x54, 0x54, 0x54, 0x40, 0x44, 0x40, /* bytes 12368 - 12384 */ + 0x50, 0x40, 0x44, 0x44, 0x10, 0x40, 0x44, 0x44, + 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, /* bytes 12384 - 12400 */ + 0x50, 0x40, 0x04, 0x40, 0x40, 0x00, 0x40, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 12400 - 12416 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 12416 - 12432 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 12432 - 12448 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12448 - 12464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12464 - 12480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12480 - 12496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3c, 0xa8, /* bytes 12496 - 12512 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x3c, 0xa8, 0x3c, 0xfc, 0x3c, 0x54, /* bytes 12512 - 12528 */ + 0x00, 0x50, 0x00, 0x14, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 12528 - 12544 */ + 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, + 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 12544 - 12560 */ + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x50, + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 12560 - 12576 */ + 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, + 0xc0, 0xf0, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 12576 - 12592 */ + 0x40, 0x54, 0x40, 0x10, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x54, 0x40, 0x10, 0x00, 0x50, 0x04, 0x14, /* bytes 12592 - 12608 */ + 0x40, 0x54, 0x00, 0x44, 0x00, 0x50, 0x00, 0x14, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 12608 - 12624 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 12624 - 12640 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 12640 - 12656 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12656 - 12672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12672 - 12688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12688 - 12704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 12704 - 12720 */ + 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x50, 0x00, /* bytes 12720 - 12736 */ + 0x40, 0x40, 0x10, 0x04, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x04, 0x40, 0x00, 0x40, 0x40, 0x44, 0x40, /* bytes 12736 - 12752 */ + 0x40, 0x40, 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, + 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, /* bytes 12752 - 12768 */ + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, + 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, /* bytes 12768 - 12784 */ + 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x54, 0x54, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 12784 - 12800 */ + 0x44, 0x40, 0x10, 0x40, 0x40, 0x40, 0x50, 0x40, + 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x14, 0x00, /* bytes 12800 - 12816 */ + 0x50, 0x50, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, + 0x3c, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 12816 - 12832 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 12832 - 12848 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 12848 - 12864 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12864 - 12880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12880 - 12896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12896 - 12912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 12912 - 12928 */ + 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x14, 0x54, 0x04, 0x54, 0x00, 0x10, 0x00, 0x50, /* bytes 12928 - 12944 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 12944 - 12960 */ + 0x40, 0x10, 0x00, 0x54, 0x40, 0x50, 0x40, 0x50, + 0x40, 0x50, 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, /* bytes 12960 - 12976 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, /* bytes 12976 - 12992 */ + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, + 0xc0, 0xa8, 0x40, 0x50, 0x04, 0x50, 0x40, 0x50, /* bytes 12992 - 13008 */ + 0x00, 0x50, 0x00, 0x54, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x04, 0x50, 0x00, 0x50, /* bytes 13008 - 13024 */ + 0x40, 0x54, 0x00, 0x14, 0x04, 0x10, 0x00, 0x54, + 0x14, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 13024 - 13040 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 13040 - 13056 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 13056 - 13072 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13072 - 13088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13088 - 13104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13104 - 13120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x3c, /* bytes 13120 - 13136 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x54, 0x40, + 0x44, 0x00, 0x40, 0x40, 0x40, 0x40, 0x10, 0x44, /* bytes 13136 - 13152 */ + 0x10, 0x40, 0x44, 0x40, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x40, /* bytes 13152 - 13168 */ + 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, + 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, /* bytes 13168 - 13184 */ + 0x40, 0x40, 0x44, 0x40, 0x50, 0x44, 0x50, 0xc0, + 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, /* bytes 13184 - 13200 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x44, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, /* bytes 13200 - 13216 */ + 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, + 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x40, 0x00, /* bytes 13216 - 13232 */ + 0x50, 0x44, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, + 0x54, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 13232 - 13248 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 13248 - 13264 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 13264 - 13280 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13280 - 13296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13296 - 13312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13312 - 13328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 13328 - 13344 */ + 0x54, 0xa8, 0x3c, 0x54, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 13344 - 13360 */ + 0x00, 0x50, 0x04, 0x50, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x44, 0x00, 0x50, 0x00, 0x10, /* bytes 13360 - 13376 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, + 0x00, 0x50, 0x40, 0x10, 0x40, 0x54, 0x40, 0x14, /* bytes 13376 - 13392 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x54, + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 13392 - 13408 */ + 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0x54, + 0x40, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 13408 - 13424 */ + 0x00, 0x10, 0x40, 0x10, 0x00, 0x54, 0x00, 0x10, + 0x00, 0x50, 0x04, 0x10, 0x00, 0x54, 0x00, 0x10, /* bytes 13424 - 13440 */ + 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x00, 0x40, + 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 13440 - 13456 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 13456 - 13472 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 13472 - 13488 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13488 - 13504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13504 - 13520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13520 - 13536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 13536 - 13552 */ + 0x3c, 0x54, 0x14, 0x00, 0x40, 0x40, 0x10, 0x40, + 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, /* bytes 13552 - 13568 */ + 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x04, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, 0x44, 0x00, /* bytes 13568 - 13584 */ + 0x40, 0x40, 0x50, 0x00, 0x40, 0x40, 0x50, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 13584 - 13600 */ + 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x04, + 0x40, 0x40, 0x50, 0x40, 0x50, 0x50, 0x54, 0x50, /* bytes 13600 - 13616 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x50, 0x40, + 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 13616 - 13632 */ + 0x40, 0x40, 0x10, 0x04, 0x40, 0x40, 0x44, 0x00, + 0x40, 0x40, 0x14, 0x40, 0x40, 0x40, 0x10, 0x00, /* bytes 13632 - 13648 */ + 0x40, 0x40, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x14, 0x3c, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 13648 - 13664 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 13664 - 13680 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 13680 - 13696 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13696 - 13712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13712 - 13728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13728 - 13744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, /* bytes 13744 - 13760 */ + 0x00, 0x40, 0x00, 0x50, 0x40, 0x50, 0x04, 0x50, + 0x04, 0x50, 0x04, 0x50, 0x40, 0x50, 0x00, 0x54, /* bytes 13760 - 13776 */ + 0x00, 0x50, 0x04, 0x54, 0x00, 0x50, 0x40, 0x50, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 13776 - 13792 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, + 0x04, 0x54, 0x00, 0x50, 0x40, 0x14, 0x40, 0x50, /* bytes 13792 - 13808 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, /* bytes 13808 - 13824 */ + 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, + 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, /* bytes 13824 - 13840 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 13840 - 13856 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, + 0x40, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 13856 - 13872 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 13872 - 13888 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 13888 - 13904 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13904 - 13920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13920 - 13936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13936 - 13952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, /* bytes 13952 - 13968 */ + 0x44, 0x40, 0x14, 0x40, 0x14, 0x40, 0x10, 0x40, + 0x14, 0x40, 0x10, 0x44, 0x50, 0x40, 0x14, 0x40, /* bytes 13968 - 13984 */ + 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x44, 0x40, + 0x44, 0x40, 0x44, 0x40, 0x44, 0x04, 0x40, 0x00, /* bytes 13984 - 14000 */ + 0x40, 0x00, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 14000 - 14016 */ + 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, + 0x44, 0x40, 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, /* bytes 14016 - 14032 */ + 0x50, 0x44, 0x50, 0x40, 0x44, 0x40, 0x44, 0x40, + 0x10, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 14032 - 14048 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x44, 0x04, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, /* bytes 14048 - 14064 */ + 0x44, 0x40, 0x40, 0x04, 0x44, 0x00, 0x40, 0x00, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14064 - 14080 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14080 - 14096 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14096 - 14112 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14112 - 14128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14128 - 14144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14144 - 14160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x50, /* bytes 14160 - 14176 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 14176 - 14192 */ + 0x04, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x14, /* bytes 14192 - 14208 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x04, 0x10, /* bytes 14208 - 14224 */ + 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, /* bytes 14224 - 14240 */ + 0x04, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, + 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 14240 - 14256 */ + 0x00, 0x54, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, /* bytes 14256 - 14272 */ + 0x00, 0x54, 0x00, 0x44, 0x00, 0x14, 0x00, 0x40, + 0x00, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 14272 - 14288 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 14288 - 14304 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 14304 - 14320 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14320 - 14336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14336 - 14352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14352 - 14368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x50, 0x40, /* bytes 14368 - 14384 */ + 0x40, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, + 0x44, 0x44, 0x10, 0x40, 0x44, 0x40, 0x14, 0x40, /* bytes 14384 - 14400 */ + 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, + 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x10, 0x00, /* bytes 14400 - 14416 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 14416 - 14432 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, /* bytes 14432 - 14448 */ + 0x10, 0x44, 0x50, 0x40, 0x44, 0x44, 0x10, 0x40, + 0x44, 0x40, 0x44, 0x00, 0x40, 0x40, 0x14, 0x40, /* bytes 14448 - 14464 */ + 0x40, 0x40, 0x44, 0x04, 0x40, 0x40, 0x44, 0x40, + 0x40, 0x40, 0x44, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 14464 - 14480 */ + 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, + 0x44, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 14480 - 14496 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 14496 - 14512 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 14512 - 14528 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14528 - 14544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14544 - 14560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14560 - 14576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x54, /* bytes 14576 - 14592 */ + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, /* bytes 14592 - 14608 */ + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, + 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x54, /* bytes 14608 - 14624 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 14624 - 14640 */ + 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, /* bytes 14640 - 14656 */ + 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x10, + 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 14656 - 14672 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, /* bytes 14672 - 14688 */ + 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 14688 - 14704 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 14704 - 14720 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 14720 - 14736 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14736 - 14752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14752 - 14768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14768 - 14784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x40, /* bytes 14784 - 14800 */ + 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x44, 0x40, + 0x10, 0x40, 0x50, 0x40, 0x50, 0x40, 0x40, 0x40, /* bytes 14800 - 14816 */ + 0x50, 0x40, 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, + 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, /* bytes 14816 - 14832 */ + 0x50, 0x40, 0x10, 0x40, 0x10, 0x40, 0x44, 0x40, + 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, /* bytes 14832 - 14848 */ + 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, + 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0x40, /* bytes 14848 - 14864 */ + 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, + 0x40, 0x04, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 14864 - 14880 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 14880 - 14896 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x40, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14896 - 14912 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14912 - 14928 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 14928 - 14944 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14944 - 14960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14960 - 14976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14976 - 14992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, /* bytes 14992 - 15008 */ + 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 15008 - 15024 */ + 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 15024 - 15040 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 15040 - 15056 */ + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, /* bytes 15056 - 15072 */ + 0x40, 0x50, 0x04, 0x10, 0x00, 0x50, 0x04, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x14, 0x00, 0x10, /* bytes 15072 - 15088 */ + 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, 0x00, 0x44, + 0x00, 0x54, 0x00, 0x44, 0x00, 0x50, 0x00, 0x14, /* bytes 15088 - 15104 */ + 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 15104 - 15120 */ + 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 15120 - 15136 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 15136 - 15152 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15152 - 15168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15168 - 15184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15184 - 15200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x50, 0x40, /* bytes 15200 - 15216 */ + 0x50, 0xc0, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, + 0x44, 0x44, 0x50, 0x40, 0x40, 0x44, 0x50, 0x40, /* bytes 15216 - 15232 */ + 0x44, 0x44, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, + 0x44, 0x40, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, /* bytes 15232 - 15248 */ + 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, + 0x44, 0x40, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, /* bytes 15248 - 15264 */ + 0x50, 0x40, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, + 0x44, 0x40, 0x50, 0x40, 0xc0, 0x50, 0x50, 0x44, /* bytes 15264 - 15280 */ + 0x50, 0xc0, 0x44, 0x00, 0x40, 0x40, 0x10, 0x40, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x44, 0x00, /* bytes 15280 - 15296 */ + 0x40, 0x04, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 15296 - 15312 */ + 0x40, 0x04, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 15312 - 15328 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 15328 - 15344 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 15344 - 15360 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15360 - 15376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15376 - 15392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15392 - 15408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x54, /* bytes 15408 - 15424 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 15424 - 15440 */ + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 15440 - 15456 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 15456 - 15472 */ + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, /* bytes 15472 - 15488 */ + 0xc0, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x50, /* bytes 15488 - 15504 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, /* bytes 15504 - 15520 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x54, 0x0c, 0x3c, 0x14, 0x3c, 0x14, 0x3c, /* bytes 15520 - 15536 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 15536 - 15552 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 15552 - 15568 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15568 - 15584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15584 - 15600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15600 - 15616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x50, 0xc0, /* bytes 15616 - 15632 */ + 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, + 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, /* bytes 15632 - 15648 */ + 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, + 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x44, /* bytes 15648 - 15664 */ + 0x50, 0x40, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, + 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, /* bytes 15664 - 15680 */ + 0x50, 0x40, 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, + 0x54, 0x50, 0x54, 0x54, 0x54, 0xc0, 0x50, 0x50, /* bytes 15680 - 15696 */ + 0x54, 0x50, 0x54, 0x40, 0x44, 0x04, 0x44, 0x40, + 0x44, 0x00, 0x40, 0x40, 0x40, 0x04, 0x40, 0x04, /* bytes 15696 - 15712 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, + 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, /* bytes 15712 - 15728 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x40, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 15728 - 15744 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 15744 - 15760 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 15760 - 15776 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15776 - 15792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15792 - 15808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15808 - 15824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, /* bytes 15824 - 15840 */ + 0x40, 0x54, 0x44, 0x50, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 15840 - 15856 */ + 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 15856 - 15872 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x10, /* bytes 15872 - 15888 */ + 0x40, 0xf0, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, + 0x44, 0xf0, 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x50, /* bytes 15888 - 15904 */ + 0x40, 0xa8, 0xc0, 0x50, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, /* bytes 15904 - 15920 */ + 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x54, 0x00, 0x44, 0x00, 0x54, 0x00, 0x44, /* bytes 15920 - 15936 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x54, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, /* bytes 15936 - 15952 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 15952 - 15968 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 15968 - 15984 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15984 - 16000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16000 - 16016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16016 - 16032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x44, /* bytes 16032 - 16048 */ + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x40, /* bytes 16048 - 16064 */ + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0xc0, + 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, /* bytes 16064 - 16080 */ + 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0x40, + 0x50, 0xc0, 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, /* bytes 16080 - 16096 */ + 0xc0, 0x54, 0xa8, 0x40, 0x40, 0x50, 0x50, 0x00, + 0x40, 0xc0, 0x54, 0x40, 0x40, 0x40, 0x50, 0x40, /* bytes 16096 - 16112 */ + 0x40, 0x44, 0x54, 0xc0, 0x40, 0x00, 0x14, 0x00, + 0x40, 0x40, 0x44, 0x00, 0x04, 0x04, 0x40, 0x00, /* bytes 16112 - 16128 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x44, 0x00, + 0x04, 0x04, 0x44, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 16128 - 16144 */ + 0x04, 0x04, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, + 0x00, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 16144 - 16160 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 16160 - 16176 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 16176 - 16192 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16192 - 16208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16208 - 16224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16224 - 16240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x54, /* bytes 16240 - 16256 */ + 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 16256 - 16272 */ + 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, /* bytes 16272 - 16288 */ + 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, /* bytes 16288 - 16304 */ + 0x40, 0xf0, 0xc0, 0x50, 0x40, 0x54, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x40, 0x54, /* bytes 16304 - 16320 */ + 0x40, 0x50, 0x40, 0xa8, 0xc0, 0x10, 0x00, 0x50, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 16320 - 16336 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 16336 - 16352 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 16352 - 16368 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 16368 - 16384 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 16384 - 16400 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16400 - 16416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16416 - 16432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16432 - 16448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x50, 0x50, /* bytes 16448 - 16464 */ + 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, + 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, /* bytes 16464 - 16480 */ + 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, + 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, /* bytes 16480 - 16496 */ + 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, 0x50, 0xc0, + 0x50, 0xc0, 0x50, 0x40, 0x50, 0x40, 0x40, 0x40, /* bytes 16496 - 16512 */ + 0x50, 0x50, 0x50, 0x40, 0x44, 0xc0, 0x50, 0x40, + 0x40, 0x00, 0x40, 0x00, 0x10, 0x40, 0x50, 0x40, /* bytes 16512 - 16528 */ + 0x50, 0x40, 0x40, 0x40, 0x54, 0x50, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, /* bytes 16528 - 16544 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, + 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, /* bytes 16544 - 16560 */ + 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x00, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 16560 - 16576 */ + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 16576 - 16592 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 16592 - 16608 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16608 - 16624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16624 - 16640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16640 - 16656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 16656 - 16672 */ + 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, + 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x50, /* bytes 16672 - 16688 */ + 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x40, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x50, /* bytes 16688 - 16704 */ + 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, + 0x40, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x10, /* bytes 16704 - 16720 */ + 0x40, 0x54, 0xc0, 0x50, 0x00, 0x54, 0xc0, 0x50, + 0x00, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x10, /* bytes 16720 - 16736 */ + 0x00, 0x50, 0x00, 0x40, 0x40, 0xf0, 0x40, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 16736 - 16752 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x14, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, /* bytes 16752 - 16768 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x04, + 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 16768 - 16784 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 16784 - 16800 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, /* bytes 16800 - 16816 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16816 - 16832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16832 - 16848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16848 - 16864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0xc0, /* bytes 16864 - 16880 */ + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 16880 - 16896 */ + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 16896 - 16912 */ + 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0xc0, + 0x50, 0x50, 0x50, 0x40, 0x40, 0x40, 0x14, 0x00, /* bytes 16912 - 16928 */ + 0x40, 0x44, 0x54, 0x50, 0x50, 0x40, 0x54, 0x44, + 0x40, 0x40, 0x50, 0x44, 0x40, 0x40, 0x40, 0x40, /* bytes 16928 - 16944 */ + 0x44, 0x40, 0x44, 0x00, 0x00, 0x50, 0x54, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x44, 0x00, /* bytes 16944 - 16960 */ + 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 16960 - 16976 */ + 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 16976 - 16992 */ + 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, + 0x54, 0x54, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 16992 - 17008 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 17008 - 17024 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17024 - 17040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17040 - 17056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17056 - 17072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 17072 - 17088 */ + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 17088 - 17104 */ + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 17104 - 17120 */ + 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, 0x04, 0x50, /* bytes 17120 - 17136 */ + 0x00, 0x50, 0x40, 0xa8, 0xc0, 0x50, 0x40, 0x54, + 0x40, 0x54, 0xc0, 0x50, 0x00, 0x10, 0x40, 0x54, /* bytes 17136 - 17152 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0xc0, 0x54, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 17152 - 17168 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, /* bytes 17168 - 17184 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x54, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 17184 - 17200 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, + 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 17200 - 17216 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 17216 - 17232 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17232 - 17248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17248 - 17264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17264 - 17280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x50, /* bytes 17280 - 17296 */ + 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 17296 - 17312 */ + 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, + 0x54, 0x50, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, /* bytes 17312 - 17328 */ + 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0xc0, + 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, 0x40, 0x40, /* bytes 17328 - 17344 */ + 0x10, 0x40, 0x40, 0xc0, 0x54, 0x40, 0x40, 0x44, + 0x54, 0x54, 0x50, 0x40, 0x40, 0x40, 0x50, 0x50, /* bytes 17344 - 17360 */ + 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, 0x54, 0x14, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 17360 - 17376 */ + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, /* bytes 17376 - 17392 */ + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x40, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 17392 - 17408 */ + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0xa8, 0x3c, + 0xa8, 0x54, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 17408 - 17424 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 17424 - 17440 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17440 - 17456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17456 - 17472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17472 - 17488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0xa8, /* bytes 17488 - 17504 */ + 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0xf0, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, /* bytes 17504 - 17520 */ + 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x44, 0x54, 0xc0, 0x50, 0x40, 0x54, 0xc0, 0x50, /* bytes 17520 - 17536 */ + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, /* bytes 17536 - 17552 */ + 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, + 0xc0, 0x54, 0x40, 0x40, 0x00, 0x54, 0xc0, 0x54, /* bytes 17552 - 17568 */ + 0x40, 0x50, 0x40, 0x40, 0x00, 0x54, 0x50, 0x50, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x44, /* bytes 17568 - 17584 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x44, + 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, /* bytes 17584 - 17600 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 17600 - 17616 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 17616 - 17632 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, /* bytes 17632 - 17648 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17648 - 17664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17664 - 17680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17680 - 17696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x50, 0x50, /* bytes 17696 - 17712 */ + 0x54, 0x50, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 17712 - 17728 */ + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, + 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 17728 - 17744 */ + 0x50, 0x50, 0x50, 0x40, 0x50, 0xc0, 0x50, 0x40, + 0x40, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, /* bytes 17744 - 17760 */ + 0x40, 0x40, 0x10, 0x40, 0x44, 0x50, 0x50, 0x40, + 0x50, 0xc0, 0x50, 0x40, 0x50, 0x54, 0x54, 0xc0, /* bytes 17760 - 17776 */ + 0x40, 0x44, 0x50, 0x00, 0x40, 0x54, 0x54, 0x04, + 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 17776 - 17792 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x44, 0x00, /* bytes 17792 - 17808 */ + 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, + 0x44, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 17808 - 17824 */ + 0x14, 0x14, 0x3c, 0x14, 0x54, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 17824 - 17840 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 17840 - 17856 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17856 - 17872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17872 - 17888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17888 - 17904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x54, /* bytes 17904 - 17920 */ + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 17920 - 17936 */ + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 17936 - 17952 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x00, 0x50, /* bytes 17952 - 17968 */ + 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x44, 0x54, + 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, /* bytes 17968 - 17984 */ + 0x40, 0x50, 0x00, 0x50, 0x44, 0xa8, 0x40, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 17984 - 18000 */ + 0x00, 0x40, 0x00, 0x14, 0x00, 0x44, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, /* bytes 18000 - 18016 */ + 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 18016 - 18032 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, + 0x54, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 18032 - 18048 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 18048 - 18064 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18064 - 18080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18080 - 18096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18096 - 18112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x40, /* bytes 18112 - 18128 */ + 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 18128 - 18144 */ + 0x54, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, + 0x50, 0xc0, 0x50, 0x50, 0x50, 0xc0, 0x50, 0xc0, /* bytes 18144 - 18160 */ + 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x44, + 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x40, 0x40, /* bytes 18160 - 18176 */ + 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0xc0, + 0x50, 0x44, 0xc0, 0x40, 0x44, 0x40, 0x40, 0x40, /* bytes 18176 - 18192 */ + 0x44, 0x40, 0x40, 0x50, 0x54, 0x44, 0x40, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 18192 - 18208 */ + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 18208 - 18224 */ + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 18224 - 18240 */ + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, + 0xa8, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 18240 - 18256 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 18256 - 18272 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18272 - 18288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18288 - 18304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18304 - 18320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, /* bytes 18320 - 18336 */ + 0x40, 0x54, 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, + 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 18336 - 18352 */ + 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 18352 - 18368 */ + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 18368 - 18384 */ + 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x40, 0x54, 0xc0, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 18384 - 18400 */ + 0x40, 0x54, 0xc0, 0xa8, 0x40, 0x10, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 18400 - 18416 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, /* bytes 18416 - 18432 */ + 0x00, 0x14, 0x00, 0x40, 0x00, 0x14, 0x00, 0x44, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 18432 - 18448 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 18448 - 18464 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, /* bytes 18464 - 18480 */ + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18480 - 18496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18496 - 18512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18512 - 18528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x50, 0x40, /* bytes 18528 - 18544 */ + 0x44, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0xc0, + 0x54, 0x54, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 18544 - 18560 */ + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x40, /* bytes 18560 - 18576 */ + 0x50, 0xc0, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, + 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, /* bytes 18576 - 18592 */ + 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, + 0x40, 0x44, 0x50, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 18592 - 18608 */ + 0x54, 0x54, 0x50, 0x00, 0x00, 0x04, 0x40, 0x00, + 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 18608 - 18624 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18624 - 18640 */ + 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 18640 - 18656 */ + 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x54, + 0xa8, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, /* bytes 18656 - 18672 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 18672 - 18688 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18688 - 18704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18704 - 18720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18720 - 18736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x50, /* bytes 18736 - 18752 */ + 0x44, 0x54, 0x40, 0x50, 0xc0, 0xa8, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 18752 - 18768 */ + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 18768 - 18784 */ + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 18784 - 18800 */ + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, + 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, /* bytes 18800 - 18816 */ + 0x04, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 18816 - 18832 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, /* bytes 18832 - 18848 */ + 0x00, 0x44, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 18848 - 18864 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0xa8, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 18864 - 18880 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 18880 - 18896 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18896 - 18912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18912 - 18928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18928 - 18944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x40, /* bytes 18944 - 18960 */ + 0x50, 0x50, 0x10, 0x40, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, /* bytes 18960 - 18976 */ + 0x50, 0x50, 0x50, 0x50, 0x50, 0xc0, 0x50, 0xc0, + 0x50, 0xc0, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, /* bytes 18976 - 18992 */ + 0x50, 0x40, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, + 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, 0x14, 0x40, /* bytes 18992 - 19008 */ + 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x14, 0x40, + 0x10, 0x40, 0x44, 0x40, 0x44, 0x04, 0x40, 0x00, /* bytes 19008 - 19024 */ + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 19024 - 19040 */ + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19040 - 19056 */ + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 19056 - 19072 */ + 0x14, 0x14, 0x54, 0x54, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 19072 - 19088 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 19088 - 19104 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19104 - 19120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19120 - 19136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19136 - 19152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, /* bytes 19152 - 19168 */ + 0x04, 0x54, 0x40, 0x50, 0x40, 0xf0, 0xc0, 0x54, + 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 19168 - 19184 */ + 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x44, 0x50, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 19184 - 19200 */ + 0x40, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x54, + 0x00, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, /* bytes 19200 - 19216 */ + 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, /* bytes 19216 - 19232 */ + 0x00, 0x50, 0x00, 0x44, 0x00, 0x10, 0x00, 0x44, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 19232 - 19248 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x14, 0x00, 0x40, 0x00, 0x50, 0x00, 0x04, /* bytes 19248 - 19264 */ + 0x00, 0x14, 0x00, 0x04, 0x00, 0x54, 0x00, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 19264 - 19280 */ + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 19280 - 19296 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, /* bytes 19296 - 19312 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19312 - 19328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19328 - 19344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19344 - 19360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x40, /* bytes 19360 - 19376 */ + 0x40, 0x44, 0x50, 0x40, 0x50, 0x44, 0x54, 0x50, + 0x54, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0xc0, /* bytes 19376 - 19392 */ + 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0x40, + 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, /* bytes 19392 - 19408 */ + 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, + 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, /* bytes 19408 - 19424 */ + 0x44, 0x44, 0x10, 0x04, 0x40, 0x40, 0x10, 0x40, + 0x40, 0x40, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, /* bytes 19424 - 19440 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 19440 - 19456 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 19456 - 19472 */ + 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 19472 - 19488 */ + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, + 0x54, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 19488 - 19504 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 19504 - 19520 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19520 - 19536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19536 - 19552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19552 - 19568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 19568 - 19584 */ + 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0xa8, + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 19584 - 19600 */ + 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 19600 - 19616 */ + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, + 0x40, 0x50, 0x00, 0x54, 0x04, 0x54, 0x00, 0x50, /* bytes 19616 - 19632 */ + 0x40, 0x50, 0x04, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, /* bytes 19632 - 19648 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x44, 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, /* bytes 19648 - 19664 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 19664 - 19680 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 19680 - 19696 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 19696 - 19712 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 19712 - 19728 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19728 - 19744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19744 - 19760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19760 - 19776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x54, /* bytes 19776 - 19792 */ + 0x54, 0x40, 0x44, 0x40, 0xa8, 0x50, 0x40, 0x44, + 0x54, 0x50, 0x54, 0x50, 0x54, 0xc0, 0x50, 0x50, /* bytes 19792 - 19808 */ + 0x50, 0xc0, 0x50, 0xc0, 0x50, 0x44, 0x50, 0x44, + 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x10, 0x40, /* bytes 19808 - 19824 */ + 0x50, 0x40, 0x10, 0x40, 0x50, 0x40, 0x14, 0x40, + 0x14, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, /* bytes 19824 - 19840 */ + 0x10, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 19840 - 19856 */ + 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 19856 - 19872 */ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 19872 - 19888 */ + 0x04, 0x00, 0x04, 0x00, 0x00, 0x04, 0x3c, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 19888 - 19904 */ + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 19904 - 19920 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, + 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 19920 - 19936 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19936 - 19952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19952 - 19968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19968 - 19984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc0, 0xa8, /* bytes 19984 - 20000 */ + 0xc0, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, + 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x50, /* bytes 20000 - 20016 */ + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x50, 0x04, 0x50, 0x40, 0x50, /* bytes 20016 - 20032 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x50, 0x40, 0x14, 0x00, 0x50, 0x00, 0x10, /* bytes 20032 - 20048 */ + 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x44, 0x00, 0x10, 0x00, 0x44, /* bytes 20048 - 20064 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 20064 - 20080 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 20080 - 20096 */ + 0x00, 0x50, 0x00, 0x04, 0x00, 0xa8, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 20096 - 20112 */ + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 20112 - 20128 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, /* bytes 20128 - 20144 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20144 - 20160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20160 - 20176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20176 - 20192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x50, /* bytes 20192 - 20208 */ + 0x54, 0x54, 0x50, 0x44, 0x50, 0x40, 0x50, 0x50, + 0x54, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0x44, /* bytes 20208 - 20224 */ + 0x50, 0xc0, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, + 0x50, 0x44, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, /* bytes 20224 - 20240 */ + 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, + 0x44, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x00, /* bytes 20240 - 20256 */ + 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, 0x44, 0x00, + 0x04, 0x04, 0x44, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 20256 - 20272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 20272 - 20288 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 20288 - 20304 */ + 0x04, 0x00, 0x04, 0x00, 0x14, 0x3c, 0x3c, 0x14, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 20304 - 20320 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 20320 - 20336 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 20336 - 20352 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20352 - 20368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20368 - 20384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20384 - 20400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0xa8, /* bytes 20400 - 20416 */ + 0xc0, 0xa8, 0x40, 0x54, 0xa8, 0x54, 0x00, 0x50, + 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x40, 0x54, /* bytes 20416 - 20432 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x04, 0x54, /* bytes 20432 - 20448 */ + 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x04, 0x50, + 0x40, 0x14, 0x04, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 20448 - 20464 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 20464 - 20480 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x14, /* bytes 20480 - 20496 */ + 0x00, 0x40, 0x00, 0x54, 0x00, 0x04, 0x00, 0x14, + 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 20496 - 20512 */ + 0x00, 0x10, 0x00, 0x50, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 20512 - 20528 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 20528 - 20544 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 20544 - 20560 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20560 - 20576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20576 - 20592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20592 - 20608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x50, /* bytes 20608 - 20624 */ + 0x54, 0x54, 0x54, 0x44, 0x54, 0xa8, 0x10, 0x40, + 0x50, 0x50, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x44, /* bytes 20624 - 20640 */ + 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x44, + 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x14, 0x44, /* bytes 20640 - 20656 */ + 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, 0x44, 0x40, + 0x10, 0x40, 0x44, 0x40, 0x40, 0x04, 0x40, 0x40, /* bytes 20656 - 20672 */ + 0x44, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 20672 - 20688 */ + 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 20688 - 20704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 20704 - 20720 */ + 0x04, 0x00, 0x04, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 20720 - 20736 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 20736 - 20752 */ + 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 20752 - 20768 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20768 - 20784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20784 - 20800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20800 - 20816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc0, 0x54, /* bytes 20816 - 20832 */ + 0x44, 0xa8, 0xc0, 0x54, 0x00, 0xf0, 0x50, 0x50, + 0x00, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 20832 - 20848 */ + 0x40, 0x54, 0x40, 0x54, 0x00, 0x54, 0x40, 0x50, + 0x04, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 20848 - 20864 */ + 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x40, 0x10, + 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, /* bytes 20864 - 20880 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 20880 - 20896 */ + 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 20896 - 20912 */ + 0x00, 0x14, 0x00, 0x04, 0x00, 0x50, 0x00, 0x04, + 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x40, /* bytes 20912 - 20928 */ + 0x00, 0x44, 0x44, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 20928 - 20944 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 20944 - 20960 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x04, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 20960 - 20976 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20976 - 20992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20992 - 21008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21008 - 21024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0xc0, /* bytes 21024 - 21040 */ + 0x54, 0x54, 0x54, 0x50, 0x40, 0x50, 0x54, 0x50, + 0x50, 0x40, 0x54, 0xc0, 0x50, 0x44, 0x50, 0x40, /* bytes 21040 - 21056 */ + 0x50, 0x50, 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, + 0x14, 0x44, 0x50, 0x40, 0x14, 0x10, 0x50, 0x40, /* bytes 21056 - 21072 */ + 0x44, 0x44, 0x10, 0x04, 0x40, 0x40, 0x14, 0x00, + 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x00, /* bytes 21072 - 21088 */ + 0x04, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21088 - 21104 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x44, 0x00, /* bytes 21104 - 21120 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, /* bytes 21120 - 21136 */ + 0x00, 0x10, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 21136 - 21152 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 21152 - 21168 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 21168 - 21184 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21184 - 21200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21200 - 21216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21216 - 21232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xc0, 0xa8, /* bytes 21232 - 21248 */ + 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x50, 0x40, 0x54, + 0x40, 0x50, 0x40, 0x54, 0x44, 0x50, 0x40, 0x54, /* bytes 21248 - 21264 */ + 0x40, 0x54, 0x00, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x04, 0x54, /* bytes 21264 - 21280 */ + 0x04, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, /* bytes 21280 - 21296 */ + 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, /* bytes 21296 - 21312 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, + 0x00, 0x44, 0x00, 0x14, 0x00, 0x44, 0x00, 0x10, /* bytes 21312 - 21328 */ + 0x00, 0x44, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, /* bytes 21328 - 21344 */ + 0x04, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 21344 - 21360 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 21360 - 21376 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 21376 - 21392 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21392 - 21408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21408 - 21424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21424 - 21440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x50, /* bytes 21440 - 21456 */ + 0x54, 0x50, 0x54, 0x50, 0x50, 0x40, 0x14, 0x40, + 0x10, 0x40, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, /* bytes 21456 - 21472 */ + 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, + 0x50, 0x40, 0x54, 0x10, 0x50, 0x14, 0x54, 0x54, /* bytes 21472 - 21488 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x14, 0x54, 0x14, + 0x14, 0x44, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 21488 - 21504 */ + 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 21504 - 21520 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 21520 - 21536 */ + 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, /* bytes 21536 - 21552 */ + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 21552 - 21568 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 21568 - 21584 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 21584 - 21600 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21600 - 21616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21616 - 21632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21632 - 21648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc0, 0x54, /* bytes 21648 - 21664 */ + 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 21664 - 21680 */ + 0x40, 0x54, 0x40, 0x50, 0x00, 0x54, 0x50, 0x54, + 0x14, 0x3c, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 21680 - 21696 */ + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x3c, 0xa8, + 0x0c, 0xa8, 0x54, 0x54, 0x04, 0x54, 0x04, 0x44, /* bytes 21696 - 21712 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x54, 0x00, 0x44, 0x00, 0x50, 0x00, 0x00, /* bytes 21712 - 21728 */ + 0x00, 0x54, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, + 0x00, 0x54, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, /* bytes 21728 - 21744 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x14, 0x00, 0x40, 0x00, 0x40, 0x04, 0x3c, /* bytes 21744 - 21760 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 21760 - 21776 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 21776 - 21792 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 21792 - 21808 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21808 - 21824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21824 - 21840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21840 - 21856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x50, /* bytes 21856 - 21872 */ + 0x54, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x10, 0x40, + 0x50, 0x40, 0x50, 0x50, 0x50, 0x44, 0x50, 0x44, /* bytes 21872 - 21888 */ + 0x50, 0x54, 0x54, 0x54, 0x54, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x54, 0x54, 0x3c, 0xa8, 0x54, /* bytes 21888 - 21904 */ + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0x3c, 0x54, 0x54, 0x3c, 0x3c, 0x54, /* bytes 21904 - 21920 */ + 0x54, 0x10, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x44, 0x00, /* bytes 21920 - 21936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21936 - 21952 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x04, 0x14, 0x3c, 0x0c, /* bytes 21952 - 21968 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 21968 - 21984 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 21984 - 22000 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 22000 - 22016 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22016 - 22032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22032 - 22048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22048 - 22064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 22064 - 22080 */ + 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x04, 0x50, + 0x40, 0x50, 0x00, 0x50, 0x40, 0x54, 0x54, 0xa8, /* bytes 22080 - 22096 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 22096 - 22112 */ + 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, + 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, /* bytes 22112 - 22128 */ + 0x3c, 0x3c, 0x14, 0x54, 0x04, 0x50, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, /* bytes 22128 - 22144 */ + 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x14, 0x00, 0x50, 0x00, 0x44, 0x00, 0x10, /* bytes 22144 - 22160 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x50, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 22160 - 22176 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 22176 - 22192 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 22192 - 22208 */ + 0x0c, 0x54, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, /* bytes 22208 - 22224 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22224 - 22240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22240 - 22256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22256 - 22272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x50, /* bytes 22272 - 22288 */ + 0x54, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x40, + 0x50, 0x40, 0x40, 0x44, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 22288 - 22304 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, + 0xa8, 0x54, 0x54, 0x3c, 0x3c, 0x54, 0x3c, 0x54, /* bytes 22304 - 22320 */ + 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 22320 - 22336 */ + 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x54, 0x14, + 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, /* bytes 22336 - 22352 */ + 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 22352 - 22368 */ + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 22368 - 22384 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 22384 - 22400 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 22400 - 22416 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 22416 - 22432 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22432 - 22448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22448 - 22464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22464 - 22480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 22480 - 22496 */ + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x50, + 0x40, 0x50, 0x40, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 22496 - 22512 */ + 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 22512 - 22528 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 22528 - 22544 */ + 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x04, 0x10, 0x00, 0x10, 0x00, 0x44, /* bytes 22544 - 22560 */ + 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x44, /* bytes 22560 - 22576 */ + 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, + 0x00, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x14, /* bytes 22576 - 22592 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 22592 - 22608 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x14, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 22608 - 22624 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 22624 - 22640 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22640 - 22656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22656 - 22672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22672 - 22688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0xc0, /* bytes 22688 - 22704 */ + 0x50, 0x50, 0x50, 0x44, 0x54, 0x50, 0x54, 0x50, + 0x50, 0x14, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0xa8, /* bytes 22704 - 22720 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 22720 - 22736 */ + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x3c, 0xa8, 0x14, 0x3c, 0x3c, 0x3c, 0x14, /* bytes 22736 - 22752 */ + 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x3c, 0x3c, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0x54, 0x14, 0x14, 0x00, /* bytes 22752 - 22768 */ + 0x00, 0x00, 0x40, 0x00, 0x04, 0x04, 0x40, 0x00, + 0x04, 0x04, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 22768 - 22784 */ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x14, + 0x3c, 0x3c, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 22784 - 22800 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 22800 - 22816 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 22816 - 22832 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 22832 - 22848 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22848 - 22864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22864 - 22880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22880 - 22896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, /* bytes 22896 - 22912 */ + 0x44, 0x54, 0x44, 0x54, 0x40, 0x50, 0x50, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 22912 - 22928 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 22928 - 22944 */ + 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, + 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, /* bytes 22944 - 22960 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x54, /* bytes 22960 - 22976 */ + 0x44, 0x50, 0x00, 0x10, 0x00, 0x04, 0x00, 0x14, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 22976 - 22992 */ + 0x00, 0x10, 0x04, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 22992 - 23008 */ + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23008 - 23024 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 23024 - 23040 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23040 - 23056 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23056 - 23072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23072 - 23088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23088 - 23104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x50, 0x50, /* bytes 23104 - 23120 */ + 0x50, 0xc0, 0x54, 0x50, 0x50, 0x54, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 23120 - 23136 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 23136 - 23152 */ + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 23152 - 23168 */ + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 23168 - 23184 */ + 0xa8, 0x3c, 0x54, 0x54, 0x54, 0x44, 0x44, 0x04, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x10, 0x10, /* bytes 23184 - 23200 */ + 0x14, 0x14, 0x54, 0x14, 0x3c, 0x0c, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 23200 - 23216 */ + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 23216 - 23232 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 23232 - 23248 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 23248 - 23264 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23264 - 23280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23280 - 23296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23296 - 23312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, /* bytes 23312 - 23328 */ + 0x40, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x14, 0xa8, 0x3c, 0xa8, /* bytes 23328 - 23344 */ + 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 23344 - 23360 */ + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 23360 - 23376 */ + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 23376 - 23392 */ + 0x14, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x14, 0x54, + 0x0c, 0x3c, 0x14, 0x54, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23392 - 23408 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23408 - 23424 */ + 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 23424 - 23440 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 23440 - 23456 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23456 - 23472 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23472 - 23488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23488 - 23504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23504 - 23520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x50, 0x44, /* bytes 23520 - 23536 */ + 0x50, 0x50, 0x50, 0x50, 0xa8, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 23536 - 23552 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x54, 0x54, 0x54, 0x3c, 0x54, /* bytes 23552 - 23568 */ + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x14, /* bytes 23568 - 23584 */ + 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, + 0xa8, 0x3c, 0x3c, 0x54, 0x54, 0x3c, 0x3c, 0x3c, /* bytes 23584 - 23600 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0x3c, 0x0c, + 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, /* bytes 23600 - 23616 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 23616 - 23632 */ + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 23632 - 23648 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 23648 - 23664 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 23664 - 23680 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23680 - 23696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23696 - 23712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23712 - 23728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, /* bytes 23728 - 23744 */ + 0x44, 0x54, 0x44, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 23744 - 23760 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 23760 - 23776 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23776 - 23792 */ + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 23792 - 23808 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23808 - 23824 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23824 - 23840 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23840 - 23856 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 23856 - 23872 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 23872 - 23888 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23888 - 23904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23904 - 23920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23920 - 23936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x50, /* bytes 23936 - 23952 */ + 0x50, 0x50, 0xa8, 0x3c, 0x3c, 0x54, 0xa8, 0x3c, + 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 23952 - 23968 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x54, 0xa8, 0x3c, /* bytes 23968 - 23984 */ + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 23984 - 24000 */ + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, + 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 24000 - 24016 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0x54, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24016 - 24032 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24032 - 24048 */ + 0x14, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24048 - 24064 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24064 - 24080 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24080 - 24096 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24096 - 24112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24112 - 24128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24128 - 24144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, /* bytes 24144 - 24160 */ + 0x40, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 24160 - 24176 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 24176 - 24192 */ + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 24192 - 24208 */ + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 24208 - 24224 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 24224 - 24240 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 24240 - 24256 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x14, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 24256 - 24272 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 24272 - 24288 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 24288 - 24304 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24304 - 24320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24320 - 24336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24336 - 24352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x44, /* bytes 24352 - 24368 */ + 0x54, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 24368 - 24384 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 24384 - 24400 */ + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x3c, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x14, /* bytes 24400 - 24416 */ + 0x3c, 0x54, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x54, + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0xa8, 0x54, /* bytes 24416 - 24432 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 24432 - 24448 */ + 0x54, 0x14, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 24448 - 24464 */ + 0x14, 0x54, 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x14, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 24464 - 24480 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 24480 - 24496 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x0c, /* bytes 24496 - 24512 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24512 - 24528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24528 - 24544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24544 - 24560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x3c, /* bytes 24560 - 24576 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 24576 - 24592 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 24592 - 24608 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, + 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 24608 - 24624 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 24624 - 24640 */ + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 24640 - 24656 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 24656 - 24672 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 24672 - 24688 */ + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 24688 - 24704 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 24704 - 24720 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24720 - 24736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24736 - 24752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24752 - 24768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x54, 0x3c, /* bytes 24768 - 24784 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, /* bytes 24784 - 24800 */ + 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 24800 - 24816 */ + 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 24816 - 24832 */ + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 24832 - 24848 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x54, + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 24848 - 24864 */ + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24864 - 24880 */ + 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24880 - 24896 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24896 - 24912 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 24912 - 24928 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24928 - 24944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24944 - 24960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24960 - 24976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0xa8, /* bytes 24976 - 24992 */ + 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 24992 - 25008 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, /* bytes 25008 - 25024 */ + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 25024 - 25040 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 25040 - 25056 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25056 - 25072 */ + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25072 - 25088 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 25088 - 25104 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 25104 - 25120 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25120 - 25136 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25136 - 25152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25152 - 25168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25168 - 25184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa8, 0x3c, /* bytes 25184 - 25200 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 25200 - 25216 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 25216 - 25232 */ + 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x3c, 0x3c, 0x14, /* bytes 25232 - 25248 */ + 0x54, 0x54, 0x3c, 0x0c, 0x54, 0x14, 0x3c, 0x14, + 0x54, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0xa8, 0x3c, /* bytes 25248 - 25264 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, + 0x3c, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 25264 - 25280 */ + 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 25280 - 25296 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 25296 - 25312 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 25312 - 25328 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 25328 - 25344 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25344 - 25360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25360 - 25376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25376 - 25392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x14, 0xa8, /* bytes 25392 - 25408 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 25408 - 25424 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, /* bytes 25424 - 25440 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, + 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 25440 - 25456 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x54, 0xa8, /* bytes 25456 - 25472 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, + 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25472 - 25488 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25488 - 25504 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x14, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 25504 - 25520 */ + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 25520 - 25536 */ + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25536 - 25552 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25552 - 25568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25568 - 25584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25584 - 25600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x54, /* bytes 25600 - 25616 */ + 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 25616 - 25632 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 25632 - 25648 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 25648 - 25664 */ + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 25664 - 25680 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 25680 - 25696 */ + 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 25696 - 25712 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 25712 - 25728 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 25728 - 25744 */ + 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 25744 - 25760 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25760 - 25776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25776 - 25792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25792 - 25808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 25808 - 25824 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 25824 - 25840 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0xa8, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 25840 - 25856 */ + 0x3c, 0xfc, 0xa8, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x14, 0x3c, /* bytes 25856 - 25872 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 25872 - 25888 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25888 - 25904 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 25904 - 25920 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 25920 - 25936 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 25936 - 25952 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 25952 - 25968 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25968 - 25984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25984 - 26000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26000 - 26016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 26016 - 26032 */ + 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, + 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 26032 - 26048 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 26048 - 26064 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x54, + 0x3c, 0x3c, 0x3c, 0x14, 0x3c, 0x3c, 0x3c, 0x14, /* bytes 26064 - 26080 */ + 0x3c, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 26080 - 26096 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, /* bytes 26096 - 26112 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 26112 - 26128 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26128 - 26144 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26144 - 26160 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26160 - 26176 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26176 - 26192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26192 - 26208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26208 - 26224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 26224 - 26240 */ + 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x14, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 26240 - 26256 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 26256 - 26272 */ + 0xa8, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 26272 - 26288 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 26288 - 26304 */ + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, + 0x3c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26304 - 26320 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26320 - 26336 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 26336 - 26352 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 26352 - 26368 */ + 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26368 - 26384 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26384 - 26400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26400 - 26416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26416 - 26432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 26432 - 26448 */ + 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 26448 - 26464 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 26464 - 26480 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 26480 - 26496 */ + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 26496 - 26512 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x14, 0x14, 0x14, 0x54, 0x14, 0x14, 0x14, /* bytes 26512 - 26528 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 26528 - 26544 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 26544 - 26560 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 26560 - 26576 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 26576 - 26592 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26592 - 26608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26608 - 26624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26624 - 26640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 26640 - 26656 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 26656 - 26672 */ + 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x3c, 0xfc, 0xa8, 0xa8, /* bytes 26672 - 26688 */ + 0x3c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, /* bytes 26688 - 26704 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 26704 - 26720 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, + 0x54, 0xa8, 0x14, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26720 - 26736 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x14, 0x14, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26736 - 26752 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 26752 - 26768 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 26768 - 26784 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 26784 - 26800 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26800 - 26816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26816 - 26832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26832 - 26848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa8, 0x3c, /* bytes 26848 - 26864 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 26864 - 26880 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 26880 - 26896 */ + 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, /* bytes 26896 - 26912 */ + 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x54, 0x54, 0x3c, 0x14, 0x54, 0x3c, 0xa8, 0x3c, /* bytes 26912 - 26928 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, + 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x54, 0x14, 0x14, /* bytes 26928 - 26944 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26944 - 26960 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26960 - 26976 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 26976 - 26992 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 26992 - 27008 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27008 - 27024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27024 - 27040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27040 - 27056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 27056 - 27072 */ + 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 27072 - 27088 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 27088 - 27104 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, + 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27104 - 27120 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 27120 - 27136 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x3c, 0x0c, 0x3c, /* bytes 27136 - 27152 */ + 0x0c, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27152 - 27168 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, /* bytes 27168 - 27184 */ + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 27184 - 27200 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27200 - 27216 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27216 - 27232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27232 - 27248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27248 - 27264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 27264 - 27280 */ + 0x3c, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 27280 - 27296 */ + 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 27296 - 27312 */ + 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, /* bytes 27312 - 27328 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x3c, /* bytes 27328 - 27344 */ + 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0x14, /* bytes 27344 - 27360 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 27360 - 27376 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 27376 - 27392 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 27392 - 27408 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 27408 - 27424 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27424 - 27440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27440 - 27456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27456 - 27472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 27472 - 27488 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 27488 - 27504 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 27504 - 27520 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27520 - 27536 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0xa8, 0x14, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 27536 - 27552 */ + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 27552 - 27568 */ + 0x0c, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27568 - 27584 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 27584 - 27600 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 27600 - 27616 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 27616 - 27632 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27632 - 27648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27648 - 27664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27664 - 27680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x54, /* bytes 27680 - 27696 */ + 0x3c, 0x54, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 27696 - 27712 */ + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 27712 - 27728 */ + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x14, + 0x54, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, /* bytes 27728 - 27744 */ + 0x14, 0x14, 0x3c, 0x0c, 0x54, 0x54, 0x3c, 0x14, + 0x54, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 27744 - 27760 */ + 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x0c, /* bytes 27760 - 27776 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 27776 - 27792 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 27792 - 27808 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 27808 - 27824 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 27824 - 27840 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27840 - 27856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27856 - 27872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27872 - 27888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 27888 - 27904 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 27904 - 27920 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, /* bytes 27920 - 27936 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27936 - 27952 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 27952 - 27968 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, /* bytes 27968 - 27984 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 27984 - 28000 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28000 - 28016 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 28016 - 28032 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28032 - 28048 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28048 - 28064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28064 - 28080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28080 - 28096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa8, 0x3c, /* bytes 28096 - 28112 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, /* bytes 28112 - 28128 */ + 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 28128 - 28144 */ + 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, /* bytes 28144 - 28160 */ + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, /* bytes 28160 - 28176 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x14, /* bytes 28176 - 28192 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 28192 - 28208 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 28208 - 28224 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 28224 - 28240 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 28240 - 28256 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28256 - 28272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28272 - 28288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28288 - 28304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 28304 - 28320 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 28320 - 28336 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, /* bytes 28336 - 28352 */ + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28352 - 28368 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 28368 - 28384 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, + 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x14, 0x3c, /* bytes 28384 - 28400 */ + 0x0c, 0x3c, 0x14, 0x14, 0x0c, 0x14, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28400 - 28416 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28416 - 28432 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 28432 - 28448 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 28448 - 28464 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28464 - 28480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28480 - 28496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28496 - 28512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 28512 - 28528 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, + 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 28528 - 28544 */ + 0x3c, 0x3c, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, /* bytes 28544 - 28560 */ + 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, 0x3c, 0x14, + 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, /* bytes 28560 - 28576 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x54, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x54, /* bytes 28576 - 28592 */ + 0x3c, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x3c, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x0c, /* bytes 28592 - 28608 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 28608 - 28624 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 28624 - 28640 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 28640 - 28656 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 28656 - 28672 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28672 - 28688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28688 - 28704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28704 - 28720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 28720 - 28736 */ + 0x54, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 28736 - 28752 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 28752 - 28768 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28768 - 28784 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28784 - 28800 */ + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28800 - 28816 */ + 0x0c, 0x3c, 0x14, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28816 - 28832 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 28832 - 28848 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 28848 - 28864 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, /* bytes 28864 - 28880 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28880 - 28896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28896 - 28912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28912 - 28928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x3c, /* bytes 28928 - 28944 */ + 0x3c, 0x54, 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, /* bytes 28944 - 28960 */ + 0xa8, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, /* bytes 28960 - 28976 */ + 0xa8, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 28976 - 28992 */ + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x54, /* bytes 28992 - 29008 */ + 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, 0x14, 0x14, /* bytes 29008 - 29024 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29024 - 29040 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29040 - 29056 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29056 - 29072 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29072 - 29088 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29088 - 29104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29104 - 29120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29120 - 29136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 29136 - 29152 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 29152 - 29168 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 29168 - 29184 */ + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29184 - 29200 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 29200 - 29216 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29216 - 29232 */ + 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 29232 - 29248 */ + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29248 - 29264 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 29264 - 29280 */ + 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 29280 - 29296 */ + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29296 - 29312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29312 - 29328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29328 - 29344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x54, /* bytes 29344 - 29360 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x54, /* bytes 29360 - 29376 */ + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x54, /* bytes 29376 - 29392 */ + 0x3c, 0x3c, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, + 0x54, 0x54, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 29392 - 29408 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x0c, + 0x14, 0x14, 0x3c, 0x14, 0x54, 0x54, 0xa8, 0x3c, /* bytes 29408 - 29424 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x0c, /* bytes 29424 - 29440 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 29440 - 29456 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x3c, 0x14, /* bytes 29456 - 29472 */ + 0x14, 0x14, 0x3c, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 29472 - 29488 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 29488 - 29504 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29504 - 29520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29520 - 29536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29536 - 29552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x0c, 0xa8, /* bytes 29552 - 29568 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x0c, 0x3c, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 29568 - 29584 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 29584 - 29600 */ + 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29600 - 29616 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, /* bytes 29616 - 29632 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x3c, 0xa8, 0x0c, 0x3c, /* bytes 29632 - 29648 */ + 0x0c, 0x3c, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29648 - 29664 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 29664 - 29680 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 29680 - 29696 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 29696 - 29712 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29712 - 29728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29728 - 29744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29744 - 29760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x3c, 0x3c, /* bytes 29760 - 29776 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x54, 0x3c, 0x3c, + 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 29776 - 29792 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, /* bytes 29792 - 29808 */ + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 29808 - 29824 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x3c, 0xa8, 0x3c, /* bytes 29824 - 29840 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, /* bytes 29840 - 29856 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29856 - 29872 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, /* bytes 29872 - 29888 */ + 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 29888 - 29904 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, /* bytes 29904 - 29920 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29920 - 29936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29936 - 29952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29952 - 29968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0xa8, /* bytes 29968 - 29984 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 29984 - 30000 */ + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, + 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0x3c, /* bytes 30000 - 30016 */ + 0x0c, 0xa8, 0x54, 0x3c, 0x0c, 0xa8, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 30016 - 30032 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x54, 0xa8, /* bytes 30032 - 30048 */ + 0x54, 0xa8, 0x54, 0xa8, 0x14, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x3c, 0xa8, 0x54, 0xa8, 0x54, 0x3c, /* bytes 30048 - 30064 */ + 0x0c, 0x14, 0x14, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 30064 - 30080 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 30080 - 30096 */ + 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 30096 - 30112 */ + 0x0c, 0x14, 0x0c, 0x14, 0x04, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 30112 - 30128 */ + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30128 - 30144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30144 - 30160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30160 - 30176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xa8, 0x54, /* bytes 30176 - 30192 */ + 0x3c, 0x54, 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0x54, 0x54, 0x3c, 0x54, /* bytes 30192 - 30208 */ + 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0xa8, 0x54, + 0x3c, 0x3c, 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, /* bytes 30208 - 30224 */ + 0x3c, 0x54, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x14, + 0x54, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, /* bytes 30224 - 30240 */ + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 30240 - 30256 */ + 0xa8, 0xa8, 0xa8, 0x3c, 0x3c, 0x3c, 0xa8, 0x3c, + 0x3c, 0xa8, 0xa8, 0x3c, 0xa8, 0xa8, 0x3c, 0x0c, /* bytes 30256 - 30272 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 30272 - 30288 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x54, 0x54, 0x3c, 0x14, /* bytes 30288 - 30304 */ + 0x54, 0x54, 0x3c, 0x14, 0x54, 0x14, 0x3c, 0x14, + 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, 0x14, 0x0c, /* bytes 30304 - 30320 */ + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, + 0x14, 0x14, 0x14, 0x0c, 0x14, 0x14, 0x14, 0x0c, /* bytes 30320 - 30336 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30336 - 30352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30352 - 30368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30368 - 30384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x0c, 0xa8, /* bytes 30384 - 30400 */ + 0x0c, 0x3c, 0x54, 0x3c, 0x0c, 0xa8, 0x54, 0x3c, + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 30400 - 30416 */ + 0x0c, 0x3c, 0x54, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, + 0x54, 0xa8, 0x0c, 0xa8, 0x54, 0xa8, 0x0c, 0xa8, /* bytes 30416 - 30432 */ + 0x54, 0xa8, 0x0c, 0xa8, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 30432 - 30448 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0xa8, 0x0c, 0xa8, /* bytes 30448 - 30464 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x3c, /* bytes 30464 - 30480 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 30480 - 30496 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, /* bytes 30496 - 30512 */ + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, + 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x3c, 0x0c, 0x14, /* bytes 30512 - 30528 */ + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, + 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, 0x0c, 0x14, /* bytes 30528 - 30544 */ + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30544 - 30560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30560 - 30576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30576 - 30592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x54, /* bytes 30592 - 30608 */ + 0x3c, 0x54, 0x54, 0x54, 0x3c, 0x54, 0x54, 0x54, + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x3c, /* bytes 30608 - 30624 */ + 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, + 0xa8, 0x54, 0x3c, 0x3c, 0x3c, 0x54, 0x54, 0x3c, /* bytes 30624 - 30640 */ + 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x54, 0x3c, 0x14, + 0x3c, 0x14, 0x3c, 0x14, 0x3c, 0x14, 0x14, 0x14, /* bytes 30640 - 30656 */ + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x14, 0x14, + 0x3c, 0x14, 0x14, 0x14, 0x3c, 0x54, 0x3c, 0x54, /* bytes 30656 - 30672 */ + 0xa8, 0x54, 0x3c, 0x3c, 0xa8, 0x3c, 0x3c, 0x3c, + 0xa8, 0x3c, 0xa8, 0x3c, 0xa8, 0x3c, 0x3c, 0x14, /* bytes 30672 - 30688 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 30688 - 30704 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x3c, 0x14, 0x54, 0x14, /* bytes 30704 - 30720 */ + 0x3c, 0x14, 0x14, 0x14, 0x54, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 30720 - 30736 */ + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, /* bytes 30736 - 30752 */ + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30752 - 30768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; static const GBitmap s_Drake_after_01_bitmap = { - .addr = (void*) &s_Drake_after_01_pixels, - .row_size_bytes = 208, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 205, .h = 148 }, - }, + .addr = (void *)&s_Drake_after_01_pixels, + .row_size_bytes = 208, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 205, .h = 148}, + }, }; diff --git a/src/fw/apps/demo/demo_images/Jane_after_01.png.h b/src/fw/apps/demo/demo_images/Jane_after_01.png.h index e7fec90d30..7d970cf394 100644 --- a/src/fw/apps/demo/demo_images/Jane_after_01.png.h +++ b/src/fw/apps/demo/demo_images/Jane_after_01.png.h @@ -6,1938 +6,3862 @@ // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_Jane_after_01_pixels[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x00, 0x54, 0x40, 0x40, 0x00, 0x54, 0x40, 0x54, 0x00, 0x54, 0x50, 0x50, 0x00, 0x54, 0x54, 0xa8, /* bytes 16 - 32 */ - 0x50, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0x54, 0xc0, 0xf0, 0xa8, 0xa8, /* bytes 32 - 48 */ - 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x44, 0x54, /* bytes 48 - 64 */ - 0x00, 0x54, 0x04, 0x14, 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x04, 0x54, 0x00, 0x54, 0x40, 0x50, /* bytes 64 - 80 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x00, 0x10, /* bytes 80 - 96 */ - 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, 0x00, 0x10, /* bytes 96 - 112 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x00, /* bytes 112 - 128 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 128 - 144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ - 0x00, 0x40, 0x40, 0x00, 0x14, 0x14, 0x50, 0x14, 0x50, 0x54, 0x54, 0x40, 0x50, 0x54, 0xa8, 0x50, /* bytes 224 - 240 */ - 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 240 - 256 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x14, /* bytes 256 - 272 */ - 0x50, 0x50, 0x50, 0x00, 0x40, 0x10, 0x50, 0x40, 0x50, 0x10, 0x54, 0x14, 0x50, 0x10, 0x50, 0x40, /* bytes 272 - 288 */ - 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x04, /* bytes 288 - 304 */ - 0x44, 0x40, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x44, 0x00, 0x40, 0x04, 0x44, 0x00, /* bytes 304 - 320 */ - 0x04, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 320 - 336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 336 - 352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 352 - 368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 368 - 384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ - 0x00, 0x40, 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, 0x50, 0x54, 0x40, 0x50, 0x50, 0xa8, 0x50, 0x54, /* bytes 432 - 448 */ - 0x00, 0x10, 0x40, 0x54, 0x44, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 448 - 464 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0x54, 0x44, 0x54, 0x54, 0x54, /* bytes 464 - 480 */ - 0x50, 0x54, 0x00, 0x54, 0x04, 0x50, 0x04, 0x54, 0x04, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 480 - 496 */ - 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 496 - 512 */ - 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, /* bytes 512 - 528 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x14, 0x00, 0x14, /* bytes 528 - 544 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, /* bytes 544 - 560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 560 - 576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 576 - 592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 608 - 624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ - 0x00, 0x00, 0x40, 0x10, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x14, 0x54, 0x54, 0x54, 0x50, /* bytes 640 - 656 */ - 0x10, 0x40, 0x40, 0x40, 0x50, 0x50, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 656 - 672 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 672 - 688 */ - 0x54, 0x50, 0x14, 0x14, 0x50, 0x10, 0x14, 0x14, 0x50, 0x10, 0x50, 0x10, 0x54, 0x10, 0x14, 0x44, /* bytes 688 - 704 */ - 0x10, 0x40, 0x14, 0x40, 0x10, 0x40, 0x10, 0x44, 0x14, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, /* bytes 704 - 720 */ - 0x14, 0x40, 0x10, 0x40, 0x14, 0x40, 0x10, 0x40, 0x10, 0x00, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, /* bytes 720 - 736 */ - 0x40, 0x04, 0x40, 0x40, 0x44, 0x04, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x54, 0x44, 0x50, 0x10, /* bytes 736 - 752 */ - 0x14, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 752 - 768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 768 - 784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 784 - 800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ - 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x50, 0xf0, 0x50, 0x54, /* bytes 848 - 864 */ - 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x50, 0x54, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 864 - 880 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, 0x40, 0x54, 0x54, 0x54, /* bytes 880 - 896 */ - 0x50, 0x54, 0x10, 0x54, 0x40, 0x54, 0x44, 0x54, 0x04, 0x54, 0x04, 0x54, 0x40, 0x54, 0x44, 0x54, /* bytes 896 - 912 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x44, 0x50, 0x00, 0x54, 0x44, 0x54, /* bytes 912 - 928 */ - 0x04, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x14, 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x04, 0x14, /* bytes 928 - 944 */ - 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x04, 0x50, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x40, 0x54, /* bytes 944 - 960 */ - 0x40, 0x54, 0x40, 0x54, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 960 - 976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, /* bytes 976 - 992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 992 - 1008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1008 - 1024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ - 0x00, 0x40, 0x10, 0x44, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, /* bytes 1056 - 1072 */ - 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 1072 - 1088 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 1088 - 1104 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x44, 0x14, 0x50, 0x54, 0x44, 0x54, 0x54, 0x54, 0x10, /* bytes 1104 - 1120 */ - 0x10, 0x14, 0x54, 0x40, 0x10, 0x44, 0x10, 0x00, 0x40, 0x40, 0x14, 0x40, 0x10, 0x50, 0x54, 0x54, /* bytes 1120 - 1136 */ - 0x54, 0x54, 0x54, 0x14, 0x54, 0x14, 0x50, 0x44, 0x14, 0x14, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, /* bytes 1136 - 1152 */ - 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x14, 0x40, 0x10, 0x04, /* bytes 1152 - 1168 */ - 0x14, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x40, 0x44, 0x40, 0x40, 0x00, 0x40, 0x40, 0x10, 0x04, /* bytes 1168 - 1184 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1184 - 1200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1200 - 1216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1248 - 1264 */ - 0x00, 0x50, 0x00, 0x50, 0x50, 0x54, 0x50, 0xa8, 0x54, 0x54, 0x50, 0xa8, 0x54, 0xa8, 0x54, 0xf0, /* bytes 1264 - 1280 */ - 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0xf0, 0x54, 0xa8, 0x50, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, /* bytes 1280 - 1296 */ - 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0x54, 0x50, 0x54, /* bytes 1296 - 1312 */ - 0x54, 0x54, 0x50, 0x54, 0x14, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 1312 - 1328 */ - 0x44, 0x54, 0x40, 0x54, 0x04, 0x50, 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, /* bytes 1328 - 1344 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 1344 - 1360 */ - 0x44, 0x54, 0x44, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x44, 0x54, /* bytes 1360 - 1376 */ - 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x50, 0x54, 0x44, 0x54, 0x40, 0x50, 0x04, 0x14, 0x04, 0x50, /* bytes 1376 - 1392 */ - 0x04, 0x54, 0x40, 0x54, 0x00, 0x50, 0x00, 0x54, 0x00, 0x50, 0x00, 0x50, 0x00, 0x40, 0x00, 0x00, /* bytes 1392 - 1408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1408 - 1424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ - 0x00, 0x44, 0x40, 0x40, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 1472 - 1488 */ - 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 1488 - 1504 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 1504 - 1520 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x10, 0x44, 0x14, 0x10, 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, /* bytes 1520 - 1536 */ - 0x54, 0x10, 0x50, 0x14, 0x50, 0x44, 0x14, 0x40, 0x10, 0x40, 0x44, 0x00, 0x10, 0x40, 0x10, 0x40, /* bytes 1536 - 1552 */ - 0x50, 0x44, 0x50, 0x40, 0x10, 0x44, 0x10, 0x44, 0x10, 0x44, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, /* bytes 1552 - 1568 */ - 0x10, 0x40, 0x10, 0x40, 0x10, 0x04, 0x14, 0x44, 0x50, 0x14, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 1568 - 1584 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, 0x14, /* bytes 1584 - 1600 */ - 0x50, 0x10, 0x50, 0x50, 0x54, 0x50, 0x50, 0x40, 0x50, 0x40, 0x10, 0x44, 0x50, 0x00, 0x04, 0x00, /* bytes 1600 - 1616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1616 - 1632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1648 - 1664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ - 0x00, 0x54, 0x40, 0x10, 0x40, 0xf0, 0x54, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 1680 - 1696 */ - 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 1696 - 1712 */ - 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0x10, 0x54, /* bytes 1712 - 1728 */ - 0x44, 0x54, 0x54, 0x54, 0x40, 0x54, 0x00, 0x10, 0x04, 0x54, 0x44, 0x54, 0x00, 0x54, 0x14, 0x54, /* bytes 1728 - 1744 */ - 0x40, 0x54, 0x40, 0x54, 0x00, 0x54, 0x04, 0x14, 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x04, 0x50, /* bytes 1744 - 1760 */ - 0x00, 0x54, 0x40, 0x14, 0x00, 0x54, 0x00, 0x14, 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, /* bytes 1760 - 1776 */ - 0x00, 0x54, 0x00, 0x50, 0x00, 0x50, 0x40, 0x10, 0x00, 0x54, 0x44, 0x54, 0x40, 0x54, 0x54, 0x54, /* bytes 1776 - 1792 */ - 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, /* bytes 1792 - 1808 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x54, 0x04, 0x54, 0x00, 0x54, 0x04, 0x54, /* bytes 1808 - 1824 */ - 0x40, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, /* bytes 1824 - 1840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ - 0x00, 0x54, 0x50, 0x40, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 1888 - 1904 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 1904 - 1920 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x50, /* bytes 1920 - 1936 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x40, 0x14, 0x14, 0x54, 0x44, 0x50, 0x50, 0x54, 0x50, /* bytes 1936 - 1952 */ - 0x50, 0x14, 0x54, 0x44, 0x14, 0x10, 0x50, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x44, 0x50, 0x00, /* bytes 1952 - 1968 */ - 0x10, 0x04, 0x14, 0x40, 0x10, 0x40, 0x10, 0x40, 0x14, 0x14, 0x50, 0x44, 0x50, 0x50, 0x54, 0x44, /* bytes 1968 - 1984 */ - 0x50, 0x50, 0x54, 0x44, 0x50, 0x50, 0x54, 0x44, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 1984 - 2000 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2000 - 2016 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, /* bytes 2016 - 2032 */ - 0x54, 0x50, 0x50, 0x40, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2032 - 2048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2048 - 2064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ - 0x00, 0x54, 0x04, 0x50, 0x40, 0x54, 0x50, 0x54, 0x50, 0xa8, 0x54, 0xf0, 0x54, 0xf0, 0x54, 0xa8, /* bytes 2096 - 2112 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0xf0, 0x50, 0x54, 0x54, 0xf0, /* bytes 2112 - 2128 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x44, 0x54, /* bytes 2128 - 2144 */ - 0x44, 0x54, 0x44, 0x54, 0x14, 0x54, 0x04, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 2144 - 2160 */ - 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, 0x04, 0x54, 0x40, 0x50, 0x00, 0x50, 0x04, 0x50, 0x40, 0x54, /* bytes 2160 - 2176 */ - 0x00, 0x50, 0x00, 0x14, 0x40, 0x50, 0x00, 0x54, 0x40, 0x54, 0x04, 0x54, 0x40, 0x54, 0x00, 0x54, /* bytes 2176 - 2192 */ - 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 2192 - 2208 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2208 - 2224 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 2224 - 2240 */ - 0x54, 0x54, 0x14, 0x54, 0x04, 0x54, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x00, /* bytes 2240 - 2256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2288 - 2304 */ - 0x00, 0x50, 0x10, 0x40, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2304 - 2320 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0xa8, 0xa8, /* bytes 2320 - 2336 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x14, /* bytes 2336 - 2352 */ - 0x50, 0x14, 0x50, 0x50, 0x54, 0x14, 0x50, 0x10, 0x50, 0x10, 0x50, 0x14, 0x54, 0x50, 0x54, 0x50, /* bytes 2352 - 2368 */ - 0x50, 0x10, 0x50, 0x14, 0x14, 0x44, 0x14, 0x44, 0x10, 0x40, 0x10, 0x40, 0x14, 0x40, 0x10, 0x40, /* bytes 2368 - 2384 */ - 0x10, 0x40, 0x10, 0x40, 0x14, 0x44, 0x14, 0x44, 0x50, 0x44, 0x14, 0x10, 0x14, 0x40, 0x14, 0x04, /* bytes 2384 - 2400 */ - 0x54, 0x04, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 2400 - 2416 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2416 - 2432 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2432 - 2448 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x44, 0x50, 0x04, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 2448 - 2464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ - 0x00, 0xa8, 0x50, 0x50, 0x40, 0xf0, 0x54, 0xa8, 0x50, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 2512 - 2528 */ - 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x50, 0xf0, 0xa8, 0xa8, /* bytes 2528 - 2544 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0x50, 0x54, /* bytes 2544 - 2560 */ - 0x00, 0x54, 0x40, 0x54, 0x04, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x14, 0x54, /* bytes 2560 - 2576 */ - 0x00, 0x54, 0x40, 0x54, 0x04, 0x54, 0x40, 0x50, 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x00, 0x50, /* bytes 2576 - 2592 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x04, 0x14, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x04, 0x50, /* bytes 2592 - 2608 */ - 0x00, 0x54, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x50, 0xf0, 0x50, 0x54, /* bytes 2608 - 2624 */ - 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x50, 0x54, 0x44, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 2624 - 2640 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2640 - 2656 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x00, 0x10, /* bytes 2656 - 2672 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2688 - 2704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ - 0x00, 0x54, 0xa8, 0x50, 0x50, 0x50, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 2720 - 2736 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2736 - 2752 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x10, /* bytes 2752 - 2768 */ - 0x50, 0x50, 0x54, 0x10, 0x50, 0x50, 0x54, 0x14, 0x50, 0x50, 0x54, 0x44, 0x50, 0x50, 0x54, 0x44, /* bytes 2768 - 2784 */ - 0x50, 0x10, 0x50, 0x44, 0x14, 0x14, 0x50, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x44, 0x50, 0x40, /* bytes 2784 - 2800 */ - 0x44, 0x04, 0x50, 0x00, 0x40, 0x40, 0x54, 0x04, 0x04, 0x04, 0x50, 0x00, 0x10, 0x10, 0x50, 0x14, /* bytes 2800 - 2816 */ - 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x50, /* bytes 2816 - 2832 */ - 0x54, 0x50, 0x54, 0x50, 0x50, 0x54, 0x54, 0x44, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 2832 - 2848 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2848 - 2864 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x14, 0x54, 0x50, 0x54, 0x00, /* bytes 2864 - 2880 */ - 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ - 0x00, 0xa8, 0x54, 0x54, 0x40, 0x54, 0x50, 0xf0, 0x54, 0x54, 0x44, 0x54, 0x50, 0xa8, 0x54, 0xf0, /* bytes 2928 - 2944 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 2944 - 2960 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x50, 0x54, /* bytes 2960 - 2976 */ - 0x14, 0x54, 0x04, 0x54, 0x44, 0x54, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, /* bytes 2976 - 2992 */ - 0x40, 0x50, 0x04, 0x54, 0x04, 0x54, 0x04, 0x50, 0x04, 0x50, 0x04, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 2992 - 3008 */ - 0x00, 0x54, 0x00, 0x54, 0x04, 0x54, 0x00, 0x50, 0x00, 0x54, 0x40, 0x54, 0x50, 0x54, 0x54, 0xa8, /* bytes 3008 - 3024 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, /* bytes 3024 - 3040 */ - 0x54, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, 0x54, 0x54, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0x54, 0x44, 0xa8, /* bytes 3040 - 3056 */ - 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 3056 - 3072 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, /* bytes 3072 - 3088 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3088 - 3104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ - 0x00, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3136 - 3152 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3152 - 3168 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, /* bytes 3168 - 3184 */ - 0x54, 0x54, 0x54, 0x54, 0x50, 0x40, 0x14, 0x10, 0x50, 0x50, 0x50, 0x50, 0x54, 0x14, 0x50, 0x14, /* bytes 3184 - 3200 */ - 0x50, 0x44, 0x14, 0x44, 0x50, 0x40, 0x10, 0x44, 0x14, 0x44, 0x14, 0x40, 0x50, 0x44, 0x50, 0x14, /* bytes 3200 - 3216 */ - 0x50, 0x10, 0x14, 0x50, 0x50, 0x44, 0x54, 0x44, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3216 - 3232 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3232 - 3248 */ - 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x50, /* bytes 3248 - 3264 */ - 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3264 - 3280 */ - 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 3280 - 3296 */ - 0x54, 0x54, 0x54, 0x10, 0x50, 0x04, 0x50, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3328 - 3344 */ - 0x00, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x50, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0xa8, 0xa8, /* bytes 3344 - 3360 */ - 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0xa8, /* bytes 3360 - 3376 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 3376 - 3392 */ - 0x50, 0x54, 0x10, 0x54, 0x44, 0x54, 0x40, 0x54, 0x00, 0x54, 0x10, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 3392 - 3408 */ - 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x14, 0x00, 0x54, 0x40, 0x50, 0x00, 0x14, 0x04, 0x54, /* bytes 3408 - 3424 */ - 0x00, 0x54, 0x40, 0x54, 0x00, 0x54, 0x04, 0x54, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3424 - 3440 */ - 0xa8, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 3440 - 3456 */ - 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0x54, /* bytes 3456 - 3472 */ - 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 3472 - 3488 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 3488 - 3504 */ - 0x54, 0x54, 0x54, 0x54, 0x00, 0x54, 0x04, 0x50, 0x00, 0x50, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, /* bytes 3504 - 3520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3520 - 3536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3536 - 3552 */ - 0x00, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 3552 - 3568 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3568 - 3584 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3584 - 3600 */ - 0xa8, 0x54, 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x10, 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, /* bytes 3600 - 3616 */ - 0x10, 0x44, 0x50, 0x40, 0x10, 0x44, 0x50, 0x04, 0x44, 0x40, 0x50, 0x44, 0x14, 0x44, 0x10, 0x04, /* bytes 3616 - 3632 */ - 0x14, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3632 - 3648 */ - 0xa8, 0xa8, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3648 - 3664 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 3664 - 3680 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3680 - 3696 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 3696 - 3712 */ - 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x50, 0x04, 0x50, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 3712 - 3728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3728 - 3744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3744 - 3760 */ - 0x00, 0xf0, 0x50, 0x54, 0x54, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x50, 0xa8, 0x50, 0xa8, 0xa8, 0xfc, /* bytes 3760 - 3776 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 3776 - 3792 */ - 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 3792 - 3808 */ - 0xa8, 0xa8, 0x50, 0x54, 0x44, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x44, 0x54, 0x50, 0x54, 0x14, 0x54, /* bytes 3808 - 3824 */ - 0x44, 0x50, 0x04, 0x50, 0x40, 0x50, 0x04, 0x54, 0x00, 0x14, 0x04, 0x54, 0x04, 0x14, 0x40, 0x54, /* bytes 3824 - 3840 */ - 0x40, 0x50, 0x00, 0x54, 0x40, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, /* bytes 3840 - 3856 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 3856 - 3872 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3872 - 3888 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 3888 - 3904 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 3904 - 3920 */ - 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x04, 0x54, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, /* bytes 3920 - 3936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3936 - 3952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3952 - 3968 */ - 0x00, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 3968 - 3984 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3984 - 4000 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 4000 - 4016 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 4016 - 4032 */ - 0x54, 0x44, 0x10, 0x40, 0x10, 0x04, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x14, 0x40, 0x50, 0x50, /* bytes 4032 - 4048 */ - 0x54, 0x10, 0x50, 0x14, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4048 - 4064 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4064 - 4080 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4080 - 4096 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4096 - 4112 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4112 - 4128 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x50, 0x50, 0x10, 0x54, 0x00, 0x00, 0x00, /* bytes 4128 - 4144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4144 - 4160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4160 - 4176 */ - 0x00, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0x44, 0xf0, 0x54, 0x54, 0x40, 0xa8, 0x54, 0xa8, /* bytes 4176 - 4192 */ - 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0x54, 0x50, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, /* bytes 4192 - 4208 */ - 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 4208 - 4224 */ - 0xa8, 0xfc, 0xa8, 0x54, 0x40, 0x54, 0x14, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, /* bytes 4224 - 4240 */ - 0x40, 0x54, 0x44, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x44, 0x54, /* bytes 4240 - 4256 */ - 0x04, 0x54, 0x10, 0x54, 0x44, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 4256 - 4272 */ - 0xc0, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 4272 - 4288 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 4288 - 4304 */ - 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 4304 - 4320 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 4320 - 4336 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x14, 0x54, 0x00, 0x00, 0x00, 0x00, /* bytes 4336 - 4352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4352 - 4368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4368 - 4384 */ - 0x00, 0x10, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x50, 0x54, 0x54, 0x44, 0x50, 0x54, 0xa8, 0x54, /* bytes 4384 - 4400 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, /* bytes 4400 - 4416 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4416 - 4432 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x10, 0x50, 0x44, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 4432 - 4448 */ - 0x54, 0x54, 0x54, 0x44, 0x10, 0x40, 0x14, 0x44, 0x14, 0x14, 0x54, 0x40, 0x50, 0x50, 0x54, 0x50, /* bytes 4448 - 4464 */ - 0x54, 0x54, 0x54, 0x14, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4464 - 4480 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4480 - 4496 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 4496 - 4512 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4512 - 4528 */ - 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, /* bytes 4528 - 4544 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x00, 0x00, 0x00, /* bytes 4544 - 4560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4560 - 4576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4576 - 4592 */ - 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x50, 0x54, 0x50, 0x54, /* bytes 4592 - 4608 */ - 0x50, 0x54, 0x44, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 4608 - 4624 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, /* bytes 4624 - 4640 */ - 0xa8, 0xa8, 0x54, 0xa8, 0x44, 0x50, 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, 0x14, 0x54, 0x54, 0x54, /* bytes 4640 - 4656 */ - 0x54, 0x54, 0x50, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x50, 0x54, 0x04, 0x54, /* bytes 4656 - 4672 */ - 0x44, 0x54, 0x50, 0x54, 0x50, 0xa8, 0xc0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4672 - 4688 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 4688 - 4704 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 4704 - 4720 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 4720 - 4736 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 4736 - 4752 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x00, 0x00, 0x00, /* bytes 4752 - 4768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4768 - 4784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4784 - 4800 */ - 0x00, 0x10, 0x50, 0x50, 0x54, 0x54, 0x50, 0x44, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, /* bytes 4800 - 4816 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 4816 - 4832 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4832 - 4848 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x40, 0x44, 0x40, 0x14, 0x04, 0x50, 0x44, 0x50, 0x14, 0x54, 0x54, /* bytes 4848 - 4864 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x14, 0x50, 0x14, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 4864 - 4880 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4880 - 4896 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4896 - 4912 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4912 - 4928 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 4928 - 4944 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, /* bytes 4944 - 4960 */ - 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 4960 - 4976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4976 - 4992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4992 - 5008 */ - 0x00, 0x54, 0x44, 0x54, 0x54, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x50, 0x54, /* bytes 5008 - 5024 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x50, 0xf0, 0x54, 0xa8, /* bytes 5024 - 5040 */ - 0x54, 0xf0, 0x54, 0xa8, 0x50, 0x54, 0x50, 0x54, 0x54, 0xf0, 0x54, 0xa8, 0x50, 0xf0, 0xa8, 0xa8, /* bytes 5040 - 5056 */ - 0x54, 0xf0, 0x54, 0xa8, 0x50, 0x54, 0x00, 0x10, 0x00, 0x54, 0x40, 0x14, 0x00, 0x54, 0x44, 0x54, /* bytes 5056 - 5072 */ - 0x54, 0xa8, 0x54, 0x54, 0x40, 0x54, 0x50, 0x54, 0x44, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5072 - 5088 */ - 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5088 - 5104 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 5104 - 5120 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5120 - 5136 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5136 - 5152 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5152 - 5168 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 5168 - 5184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5184 - 5200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5200 - 5216 */ - 0x00, 0x10, 0x50, 0x50, 0x54, 0x14, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, /* bytes 5216 - 5232 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 5232 - 5248 */ - 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, /* bytes 5248 - 5264 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x50, 0x10, 0x00, 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x50, 0x10, /* bytes 5264 - 5280 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 5280 - 5296 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5296 - 5312 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 5312 - 5328 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5328 - 5344 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 5344 - 5360 */ - 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 5360 - 5376 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 5376 - 5392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5392 - 5408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5408 - 5424 */ - 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, 0x50, 0xa8, 0x54, 0x54, 0x44, 0x54, 0x54, 0x54, 0x54, 0xa8, /* bytes 5424 - 5440 */ - 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5440 - 5456 */ - 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5456 - 5472 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x04, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, /* bytes 5472 - 5488 */ - 0x14, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, /* bytes 5488 - 5504 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 5504 - 5520 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5520 - 5536 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5536 - 5552 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 5552 - 5568 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 5568 - 5584 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0x00, 0x00, 0x00, /* bytes 5584 - 5600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5600 - 5616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5616 - 5632 */ - 0x00, 0x54, 0x50, 0x40, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 5632 - 5648 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 5648 - 5664 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 5664 - 5680 */ - 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0x54, 0x44, 0x40, 0x00, 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, /* bytes 5680 - 5696 */ - 0x50, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5696 - 5712 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5712 - 5728 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5728 - 5744 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5744 - 5760 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5760 - 5776 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5776 - 5792 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0x00, 0x00, 0x00, /* bytes 5792 - 5808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5808 - 5824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5824 - 5840 */ - 0x00, 0xf0, 0x54, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x54, 0x54, 0x50, 0xf0, 0x54, 0x54, /* bytes 5840 - 5856 */ - 0x50, 0xa8, 0x54, 0x54, 0x40, 0x54, 0x44, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0xa8, 0x54, 0xa8, /* bytes 5856 - 5872 */ - 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 5872 - 5888 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x54, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x14, /* bytes 5888 - 5904 */ - 0x04, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 5904 - 5920 */ - 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 5920 - 5936 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0xa8, /* bytes 5936 - 5952 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 5952 - 5968 */ - 0x54, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5968 - 5984 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 5984 - 6000 */ - 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0x00, 0x00, 0x00, /* bytes 6000 - 6016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6016 - 6032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6032 - 6048 */ - 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 6048 - 6064 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 6064 - 6080 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6080 - 6096 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x04, 0x50, 0x40, 0x40, 0x04, /* bytes 6096 - 6112 */ - 0x14, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6112 - 6128 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6128 - 6144 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 6144 - 6160 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 6160 - 6176 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6176 - 6192 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6192 - 6208 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xfc, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 6208 - 6224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6224 - 6240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6240 - 6256 */ - 0x00, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x54, 0x50, 0x54, /* bytes 6256 - 6272 */ - 0x54, 0xa8, 0x50, 0x54, 0x40, 0x54, 0x44, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 6272 - 6288 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, /* bytes 6288 - 6304 */ - 0xa8, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x44, 0x54, /* bytes 6304 - 6320 */ - 0x44, 0x54, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 6320 - 6336 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 6336 - 6352 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 6352 - 6368 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 6368 - 6384 */ - 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 6384 - 6400 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 6400 - 6416 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 6416 - 6432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6432 - 6448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6448 - 6464 */ - 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 6464 - 6480 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 6480 - 6496 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6496 - 6512 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 6512 - 6528 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6528 - 6544 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6544 - 6560 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 6560 - 6576 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 6576 - 6592 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 6592 - 6608 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6608 - 6624 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 6624 - 6640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6640 - 6656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6656 - 6672 */ - 0x00, 0xa8, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 6672 - 6688 */ - 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x50, 0xf0, 0x54, 0x54, /* bytes 6688 - 6704 */ - 0x50, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 6704 - 6720 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 6720 - 6736 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 6736 - 6752 */ - 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 6752 - 6768 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 6768 - 6784 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 6784 - 6800 */ - 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, /* bytes 6800 - 6816 */ - 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 6816 - 6832 */ - 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 6832 - 6848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6848 - 6864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6864 - 6880 */ - 0x00, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6880 - 6896 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 6896 - 6912 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6912 - 6928 */ - 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6928 - 6944 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6944 - 6960 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6960 - 6976 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 6976 - 6992 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6992 - 7008 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 7008 - 7024 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7024 - 7040 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x00, 0x00, 0x00, /* bytes 7040 - 7056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7056 - 7072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7072 - 7088 */ - 0x00, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 7088 - 7104 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, /* bytes 7104 - 7120 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 7120 - 7136 */ - 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 7136 - 7152 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 7152 - 7168 */ - 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 7168 - 7184 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 7184 - 7200 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xf0, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7200 - 7216 */ - 0x54, 0xa8, 0xc0, 0x54, 0x40, 0xf0, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, /* bytes 7216 - 7232 */ - 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 7232 - 7248 */ - 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x50, 0xa8, 0x54, 0x00, 0x00, 0x00, /* bytes 7248 - 7264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7264 - 7280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7280 - 7296 */ - 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7296 - 7312 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7312 - 7328 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 7328 - 7344 */ - 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7344 - 7360 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7360 - 7376 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7376 - 7392 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 7392 - 7408 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7408 - 7424 */ - 0xfc, 0xa8, 0xa8, 0x54, 0x50, 0x40, 0x50, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 7424 - 7440 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7440 - 7456 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 7456 - 7472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7472 - 7488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7488 - 7504 */ - 0x00, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0x54, 0xa8, /* bytes 7504 - 7520 */ - 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 7520 - 7536 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xf0, 0x44, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7536 - 7552 */ - 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 7552 - 7568 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 7568 - 7584 */ - 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 7584 - 7600 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 7600 - 7616 */ - 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 7616 - 7632 */ - 0xc0, 0xfc, 0xa8, 0xa8, 0xc0, 0x54, 0x00, 0x40, 0x40, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0xa8, 0xa8, /* bytes 7632 - 7648 */ - 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 7648 - 7664 */ - 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xc0, 0x00, 0x00, 0x00, /* bytes 7664 - 7680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7680 - 7696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7696 - 7712 */ - 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7712 - 7728 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7728 - 7744 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0x54, 0x50, 0x54, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7744 - 7760 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7760 - 7776 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7776 - 7792 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7792 - 7808 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7808 - 7824 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xc0, /* bytes 7824 - 7840 */ - 0xc0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0x54, 0x00, 0x40, 0xc0, 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 7840 - 7856 */ - 0x54, 0x54, 0x54, 0x50, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 7856 - 7872 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 7872 - 7888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7888 - 7904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7904 - 7920 */ - 0x00, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7920 - 7936 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 7936 - 7952 */ - 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0x50, 0x44, 0x54, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7952 - 7968 */ - 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 7968 - 7984 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7984 - 8000 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 8000 - 8016 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8016 - 8032 */ - 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xf0, 0x54, 0xfc, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xa8, /* bytes 8032 - 8048 */ - 0x40, 0x50, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0x54, 0x00, 0x44, 0x40, 0x54, 0x50, 0xa8, 0xc0, 0x54, /* bytes 8048 - 8064 */ - 0x54, 0xa8, 0xc0, 0xa8, 0x50, 0x54, 0xc0, 0xa8, 0xa8, 0xf0, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, /* bytes 8064 - 8080 */ - 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x00, 0x00, 0x00, /* bytes 8080 - 8096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8096 - 8112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8112 - 8128 */ - 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8128 - 8144 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8144 - 8160 */ - 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, 0xa8, 0x50, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8160 - 8176 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8176 - 8192 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8192 - 8208 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8208 - 8224 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8224 - 8240 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 8240 - 8256 */ - 0x50, 0x00, 0x40, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0x14, 0x00, 0x40, 0x40, 0x54, 0x50, 0x54, 0x54, /* bytes 8256 - 8272 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 8272 - 8288 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 8288 - 8304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8304 - 8320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8320 - 8336 */ - 0x00, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 8336 - 8352 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 8352 - 8368 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0x54, 0xf0, 0x50, 0x54, 0xc0, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8368 - 8384 */ - 0x54, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 8384 - 8400 */ - 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 8400 - 8416 */ - 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 8416 - 8432 */ - 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 8432 - 8448 */ - 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x14, /* bytes 8448 - 8464 */ - 0x00, 0x14, 0x00, 0x54, 0xa8, 0xf0, 0xa8, 0xa8, 0xc0, 0x10, 0x00, 0x50, 0x40, 0x54, 0xc0, 0x54, /* bytes 8464 - 8480 */ - 0xc0, 0xa8, 0x50, 0x54, 0x40, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 8480 - 8496 */ - 0x54, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0x00, 0x00, 0x00, /* bytes 8496 - 8512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8512 - 8528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8528 - 8544 */ - 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8544 - 8560 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8560 - 8576 */ - 0xfc, 0xa8, 0xfc, 0xfc, 0xa8, 0x54, 0xa8, 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 8576 - 8592 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8592 - 8608 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 8608 - 8624 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 8624 - 8640 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8640 - 8656 */ - 0xa8, 0xa8, 0x54, 0x50, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x10, 0x00, /* bytes 8656 - 8672 */ - 0x40, 0x40, 0x40, 0x00, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0x50, 0x00, 0x40, 0x50, 0x50, 0x54, 0x50, /* bytes 8672 - 8688 */ - 0x54, 0x54, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 8688 - 8704 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 8704 - 8720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8720 - 8736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8736 - 8752 */ - 0x00, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 8752 - 8768 */ - 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xfc, /* bytes 8768 - 8784 */ - 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, /* bytes 8784 - 8800 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0x50, 0xa8, 0x54, 0xf0, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 8800 - 8816 */ - 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, /* bytes 8816 - 8832 */ - 0xa8, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, /* bytes 8832 - 8848 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 8848 - 8864 */ - 0x54, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x00, 0x50, /* bytes 8864 - 8880 */ - 0x00, 0x50, 0x04, 0x10, 0x50, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x00, 0x40, 0x40, 0x54, 0xc0, 0xa8, /* bytes 8880 - 8896 */ - 0x54, 0xa8, 0x54, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, /* bytes 8896 - 8912 */ - 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0x00, 0x00, 0x00, /* bytes 8912 - 8928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8928 - 8944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8944 - 8960 */ - 0x00, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8960 - 8976 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8976 - 8992 */ - 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x44, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, /* bytes 8992 - 9008 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9008 - 9024 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 9024 - 9040 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9040 - 9056 */ - 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 9056 - 9072 */ - 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x14, 0x04, 0x04, /* bytes 9072 - 9088 */ - 0x00, 0x00, 0x10, 0x00, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x50, 0x00, 0x10, 0x50, 0x54, 0x54, /* bytes 9088 - 9104 */ - 0xa8, 0x54, 0xa8, 0x54, 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9104 - 9120 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 9120 - 9136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9136 - 9152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9152 - 9168 */ - 0x00, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 9168 - 9184 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 9184 - 9200 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0x50, 0x40, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, /* bytes 9200 - 9216 */ - 0x54, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 9216 - 9232 */ - 0xc0, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 9232 - 9248 */ - 0xc0, 0xf0, 0xa8, 0xa8, 0x54, 0x54, 0xc0, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 9248 - 9264 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 9264 - 9280 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x50, /* bytes 9280 - 9296 */ - 0x00, 0x40, 0x00, 0x40, 0x40, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x44, 0x00, 0x00, 0x54, 0x50, 0x54, /* bytes 9296 - 9312 */ - 0xc0, 0xf0, 0x50, 0x54, 0x00, 0x54, 0x44, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 9312 - 9328 */ - 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 9328 - 9344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9344 - 9360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9360 - 9376 */ - 0x00, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9376 - 9392 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 9392 - 9408 */ - 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x40, 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, /* bytes 9408 - 9424 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9424 - 9440 */ - 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9440 - 9456 */ - 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 9456 - 9472 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9472 - 9488 */ - 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x40, 0x00, /* bytes 9488 - 9504 */ - 0x40, 0x00, 0x00, 0x00, 0x50, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x00, 0x40, 0x50, 0xa8, 0x50, /* bytes 9504 - 9520 */ - 0x54, 0x54, 0x54, 0x50, 0x50, 0x10, 0x54, 0x50, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 9520 - 9536 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 9536 - 9552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9552 - 9568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9568 - 9584 */ - 0x00, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 9584 - 9600 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xfc, /* bytes 9600 - 9616 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0x54, 0x50, 0x44, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 9616 - 9632 */ - 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9632 - 9648 */ - 0xa8, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xf0, 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, /* bytes 9648 - 9664 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0xc0, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, /* bytes 9664 - 9680 */ - 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, /* bytes 9680 - 9696 */ - 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x10, /* bytes 9696 - 9712 */ - 0x00, 0x50, 0x00, 0x40, 0x40, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x50, 0x00, 0x54, 0xc0, 0xa8, /* bytes 9712 - 9728 */ - 0x54, 0xa8, 0x50, 0x54, 0x40, 0x50, 0x44, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xf0, 0xc0, 0xf0, /* bytes 9728 - 9744 */ - 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x00, 0x00, 0x00, /* bytes 9744 - 9760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9760 - 9776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9776 - 9792 */ - 0x00, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 9792 - 9808 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0x54, 0x54, 0xa8, 0xa8, /* bytes 9808 - 9824 */ - 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x40, 0x44, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, /* bytes 9824 - 9840 */ - 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9840 - 9856 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x50, 0x54, 0xa8, 0xa8, /* bytes 9856 - 9872 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 9872 - 9888 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 9888 - 9904 */ - 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x44, /* bytes 9904 - 9920 */ - 0x40, 0x00, 0x00, 0x00, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x44, 0x50, 0x54, 0x54, /* bytes 9920 - 9936 */ - 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x40, 0x10, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 9936 - 9952 */ - 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 9952 - 9968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9968 - 9984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9984 - 10000 */ - 0x00, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x50, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 10000 - 10016 */ - 0x50, 0xf0, 0x54, 0xa8, 0x54, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, /* bytes 10016 - 10032 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0x54, 0x00, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 10032 - 10048 */ - 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 10048 - 10064 */ - 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, 0xc0, 0x54, 0xc0, 0xa8, /* bytes 10064 - 10080 */ - 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 10080 - 10096 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 10096 - 10112 */ - 0xc0, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x54, 0x44, 0x54, /* bytes 10112 - 10128 */ - 0x00, 0x54, 0x00, 0x40, 0x00, 0x54, 0x44, 0x54, 0x44, 0xf0, 0x44, 0x40, 0x40, 0xf0, 0x50, 0xa8, /* bytes 10128 - 10144 */ - 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0x54, 0x04, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 10144 - 10160 */ - 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0x00, 0x00, 0x00, /* bytes 10160 - 10176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10176 - 10192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10192 - 10208 */ - 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 10208 - 10224 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 10224 - 10240 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x40, 0x40, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 10240 - 10256 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 10256 - 10272 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x40, 0x50, /* bytes 10272 - 10288 */ - 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, /* bytes 10288 - 10304 */ - 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 10304 - 10320 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x54, /* bytes 10320 - 10336 */ - 0x54, 0x50, 0x50, 0x00, 0x50, 0x50, 0x54, 0x44, 0x54, 0x54, 0x50, 0x40, 0x50, 0x54, 0x54, 0x54, /* bytes 10336 - 10352 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x14, 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 10352 - 10368 */ - 0xa8, 0x50, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 10368 - 10384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10384 - 10400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10400 - 10416 */ - 0x00, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x50, 0xa8, /* bytes 10416 - 10432 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0x54, 0x54, 0xc0, 0xa8, 0x54, 0xa8, /* bytes 10432 - 10448 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xf0, 0xc0, 0x50, 0xc0, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 10448 - 10464 */ - 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 10464 - 10480 */ - 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xc0, 0x54, /* bytes 10480 - 10496 */ - 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0xa8, /* bytes 10496 - 10512 */ - 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0xf0, /* bytes 10512 - 10528 */ - 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x40, 0x54, /* bytes 10528 - 10544 */ - 0x44, 0x54, 0x00, 0x54, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0x44, 0x54, 0xc0, 0xa8, /* bytes 10544 - 10560 */ - 0x54, 0x54, 0xc0, 0xa8, 0x50, 0x54, 0x44, 0xf0, 0x54, 0xa8, 0x50, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, /* bytes 10560 - 10576 */ - 0x54, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x00, 0x00, 0x00, /* bytes 10576 - 10592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10592 - 10608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10608 - 10624 */ - 0x00, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 10624 - 10640 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0xa8, /* bytes 10640 - 10656 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 10656 - 10672 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 10672 - 10688 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x50, /* bytes 10688 - 10704 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xc0, 0x50, 0x50, /* bytes 10704 - 10720 */ - 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 10720 - 10736 */ - 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, /* bytes 10736 - 10752 */ - 0x54, 0x40, 0x40, 0x44, 0x50, 0x44, 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0xa8, /* bytes 10752 - 10768 */ - 0xa8, 0x54, 0x54, 0x54, 0x54, 0x44, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 10768 - 10784 */ - 0xa8, 0x50, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 10784 - 10800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10800 - 10816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10816 - 10832 */ - 0x00, 0x54, 0x54, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 10832 - 10848 */ - 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x50, 0xc0, 0xf0, 0xa8, 0xa8, /* bytes 10848 - 10864 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0x54, 0x40, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 10864 - 10880 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 10880 - 10896 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0x54, 0x50, /* bytes 10896 - 10912 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xc0, 0x50, /* bytes 10912 - 10928 */ - 0x44, 0xf0, 0xc0, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 10928 - 10944 */ - 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x54, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0x54, 0x50, 0x54, /* bytes 10944 - 10960 */ - 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0xfc, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 10960 - 10976 */ - 0xc0, 0xf0, 0x54, 0x54, 0x40, 0x54, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0x54, /* bytes 10976 - 10992 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x00, 0x00, 0x00, /* bytes 10992 - 11008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11008 - 11024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11024 - 11040 */ - 0x00, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11040 - 11056 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0x44, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11056 - 11072 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x40, 0x50, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, /* bytes 11072 - 11088 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11088 - 11104 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 11104 - 11120 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 11120 - 11136 */ - 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 11136 - 11152 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x50, 0x54, 0x50, 0x54, 0x44, /* bytes 11152 - 11168 */ - 0x50, 0x44, 0x50, 0x40, 0x44, 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, /* bytes 11168 - 11184 */ - 0xa8, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 11184 - 11200 */ - 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 11200 - 11216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11216 - 11232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11232 - 11248 */ - 0x00, 0x54, 0x40, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 11248 - 11264 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x50, 0x54, 0x50, 0xa8, 0xa8, 0xa8, /* bytes 11264 - 11280 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0xc0, 0x54, 0x00, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 11280 - 11296 */ - 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11296 - 11312 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 11312 - 11328 */ - 0xc0, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 11328 - 11344 */ - 0x54, 0xa8, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, /* bytes 11344 - 11360 */ - 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 11360 - 11376 */ - 0xc0, 0x54, 0x40, 0x54, 0x44, 0xa8, 0xa8, 0xfc, 0x54, 0xa8, 0x50, 0xa8, 0x54, 0xa8, 0x54, 0xf0, /* bytes 11376 - 11392 */ - 0x54, 0xa8, 0x50, 0x54, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 11392 - 11408 */ - 0x54, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0x00, 0x00, 0x00, /* bytes 11408 - 11424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11424 - 11440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11440 - 11456 */ - 0x00, 0x40, 0x10, 0x44, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 11456 - 11472 */ - 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11472 - 11488 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x44, 0x50, 0xc0, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 11488 - 11504 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11504 - 11520 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, /* bytes 11520 - 11536 */ - 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11536 - 11552 */ - 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11552 - 11568 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, 0x54, 0x54, 0x50, /* bytes 11568 - 11584 */ - 0x50, 0x50, 0x50, 0x50, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 11584 - 11600 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 11600 - 11616 */ - 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 11616 - 11632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11632 - 11648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11648 - 11664 */ - 0x00, 0x50, 0x04, 0x50, 0x00, 0x54, 0x44, 0x54, 0x00, 0x54, 0x50, 0x54, 0x44, 0xa8, 0x54, 0x54, /* bytes 11664 - 11680 */ - 0xc0, 0x54, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0xa8, 0xa8, /* bytes 11680 - 11696 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0x50, 0x50, 0x40, 0x54, 0x50, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 11696 - 11712 */ - 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 11712 - 11728 */ - 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xc0, 0xa8, /* bytes 11728 - 11744 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11744 - 11760 */ - 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 11760 - 11776 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0x54, 0x40, 0x54, /* bytes 11776 - 11792 */ - 0x40, 0x54, 0x44, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 11792 - 11808 */ - 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 11808 - 11824 */ - 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x00, 0x00, 0x00, /* bytes 11824 - 11840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11840 - 11856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11856 - 11872 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x40, 0x10, 0x10, 0x54, 0x14, 0x54, 0x54, 0x54, 0x44, /* bytes 11872 - 11888 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11888 - 11904 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0x40, 0x50, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 11904 - 11920 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11920 - 11936 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, /* bytes 11936 - 11952 */ - 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11952 - 11968 */ - 0xa8, 0x54, 0xa8, 0x50, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 11968 - 11984 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, /* bytes 11984 - 12000 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 12000 - 12016 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 12016 - 12032 */ - 0x54, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 12032 - 12048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12048 - 12064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12064 - 12080 */ - 0x00, 0x44, 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x40, 0x50, 0x04, 0x54, 0x44, 0x54, 0x40, 0x50, /* bytes 12080 - 12096 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x44, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 12096 - 12112 */ - 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0x50, 0x40, 0x54, 0xc0, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12112 - 12128 */ - 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 12128 - 12144 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x40, 0xa8, /* bytes 12144 - 12160 */ - 0xc0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12160 - 12176 */ - 0x54, 0x54, 0x40, 0x50, 0x40, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12176 - 12192 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, /* bytes 12192 - 12208 */ - 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, /* bytes 12208 - 12224 */ - 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 12224 - 12240 */ - 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x00, 0x00, 0x00, /* bytes 12240 - 12256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12256 - 12272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12272 - 12288 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, 0x14, 0x44, 0x50, 0x40, 0x44, 0x50, /* bytes 12288 - 12304 */ - 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12304 - 12320 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x44, 0x54, 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 12320 - 12336 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12336 - 12352 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 12352 - 12368 */ - 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12368 - 12384 */ - 0xa8, 0x54, 0x50, 0x40, 0x40, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 12384 - 12400 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12400 - 12416 */ - 0x54, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 12416 - 12432 */ - 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 12432 - 12448 */ - 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 12448 - 12464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12464 - 12480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12480 - 12496 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 12496 - 12512 */ - 0x00, 0x54, 0x44, 0x50, 0x40, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x50, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 12512 - 12528 */ - 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0x50, 0x40, 0xa8, 0x50, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12528 - 12544 */ - 0xa8, 0xf0, 0x54, 0x54, 0x54, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 12544 - 12560 */ - 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xfc, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, /* bytes 12560 - 12576 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12576 - 12592 */ - 0xa8, 0xf0, 0x40, 0x40, 0x04, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12592 - 12608 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, /* bytes 12608 - 12624 */ - 0xc0, 0x54, 0x40, 0x50, 0x44, 0x54, 0x50, 0x54, 0x54, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 12624 - 12640 */ - 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 12640 - 12656 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x00, 0x00, 0x00, /* bytes 12656 - 12672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12672 - 12688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12688 - 12704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12704 - 12720 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x50, 0x40, 0x44, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12720 - 12736 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x40, 0x40, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 12736 - 12752 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 12752 - 12768 */ - 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x40, 0x54, 0x54, /* bytes 12768 - 12784 */ - 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 12784 - 12800 */ - 0xa8, 0x54, 0x40, 0x00, 0x50, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12800 - 12816 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 12816 - 12832 */ - 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0x54, /* bytes 12832 - 12848 */ - 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x50, 0x54, 0xa8, 0xa8, 0x50, /* bytes 12848 - 12864 */ - 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 12864 - 12880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12880 - 12896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12896 - 12912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 12912 - 12928 */ - 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x00, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, /* bytes 12928 - 12944 */ - 0xa8, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0x00, 0x50, 0xc0, 0x54, 0x54, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12944 - 12960 */ - 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 12960 - 12976 */ - 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, /* bytes 12976 - 12992 */ - 0x40, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 12992 - 13008 */ - 0xa8, 0xa8, 0x00, 0x00, 0x50, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13008 - 13024 */ - 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 13024 - 13040 */ - 0x50, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x50, 0xa8, /* bytes 13040 - 13056 */ - 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 13056 - 13072 */ - 0xc0, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0xc0, 0x00, 0x00, 0x00, /* bytes 13072 - 13088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13088 - 13104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13104 - 13120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13120 - 13136 */ - 0x00, 0x00, 0x40, 0x00, 0x44, 0x40, 0x40, 0x00, 0x40, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 13136 - 13152 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x50, 0x00, 0x54, 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, /* bytes 13152 - 13168 */ - 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13168 - 13184 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x44, 0x50, 0x50, /* bytes 13184 - 13200 */ - 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13200 - 13216 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13216 - 13232 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13232 - 13248 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, /* bytes 13248 - 13264 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 13264 - 13280 */ - 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 13280 - 13296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13296 - 13312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13312 - 13328 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13328 - 13344 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 13344 - 13360 */ - 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0xa8, 0x14, 0x00, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 13360 - 13376 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0x54, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 13376 - 13392 */ - 0x54, 0xf0, 0x50, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 13392 - 13408 */ - 0x44, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 13408 - 13424 */ - 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 13424 - 13440 */ - 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 13440 - 13456 */ - 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 13456 - 13472 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 13472 - 13488 */ - 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0x00, 0x00, 0x00, /* bytes 13488 - 13504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13504 - 13520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13520 - 13536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13536 - 13552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13552 - 13568 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x50, 0x50, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 13568 - 13584 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 13584 - 13600 */ - 0x54, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x44, 0x40, 0x54, 0x54, /* bytes 13600 - 13616 */ - 0x50, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0x54, 0x54, /* bytes 13616 - 13632 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 13632 - 13648 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13648 - 13664 */ - 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13664 - 13680 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0x54, 0x54, /* bytes 13680 - 13696 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 13696 - 13712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13712 - 13728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13728 - 13744 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13744 - 13760 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x44, 0x54, 0xc0, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, /* bytes 13760 - 13776 */ - 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0x54, 0xc0, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 13776 - 13792 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, /* bytes 13792 - 13808 */ - 0x54, 0xa8, 0xc0, 0x54, 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0x40, 0x54, 0x40, 0x54, 0xc0, 0xa8, /* bytes 13808 - 13824 */ - 0xc0, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0x54, /* bytes 13824 - 13840 */ - 0xc0, 0xa8, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 13840 - 13856 */ - 0xc0, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 13856 - 13872 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 13872 - 13888 */ - 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x54, /* bytes 13888 - 13904 */ - 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0xa8, 0x50, 0x54, 0xc0, 0xf0, 0xc0, 0x00, 0x00, 0x00, /* bytes 13904 - 13920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13920 - 13936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13936 - 13952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13952 - 13968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 13968 - 13984 */ - 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 13984 - 14000 */ - 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 14000 - 14016 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xc0, 0x40, 0x44, 0x54, 0x50, /* bytes 14016 - 14032 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, /* bytes 14032 - 14048 */ - 0x50, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 14048 - 14064 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 14064 - 14080 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 14080 - 14096 */ - 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, /* bytes 14096 - 14112 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 14112 - 14128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14128 - 14144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14144 - 14160 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14160 - 14176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x54, 0x50, 0x54, 0x40, 0x54, 0x54, 0x54, /* bytes 14176 - 14192 */ - 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0x50, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 14192 - 14208 */ - 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, /* bytes 14208 - 14224 */ - 0xc0, 0xf0, 0x54, 0x14, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x50, 0x00, 0x50, 0x44, 0x50, /* bytes 14224 - 14240 */ - 0x40, 0xf0, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x54, 0x44, 0x54, 0x44, 0x50, /* bytes 14240 - 14256 */ - 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x44, 0x54, 0x40, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0x50, 0x54, /* bytes 14256 - 14272 */ - 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 14272 - 14288 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 14288 - 14304 */ - 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 14304 - 14320 */ - 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 14320 - 14336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14336 - 14352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14352 - 14368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14368 - 14384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x50, 0x54, 0x54, 0x54, 0x50, 0x50, 0x10, 0x50, 0xc0, /* bytes 14384 - 14400 */ - 0x50, 0x44, 0x50, 0x44, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 14400 - 14416 */ - 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 14416 - 14432 */ - 0x54, 0x54, 0x54, 0x40, 0x40, 0x44, 0x54, 0x50, 0x54, 0x54, 0x54, 0x44, 0x40, 0x40, 0x50, 0x40, /* bytes 14432 - 14448 */ - 0x40, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x40, /* bytes 14448 - 14464 */ - 0x40, 0x40, 0x40, 0x04, 0x44, 0x44, 0x50, 0x40, 0x10, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0x40, /* bytes 14464 - 14480 */ - 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 14480 - 14496 */ - 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x54, /* bytes 14496 - 14512 */ - 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 14512 - 14528 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 14528 - 14544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14544 - 14560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14560 - 14576 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14576 - 14592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x50, 0x00, 0x50, /* bytes 14592 - 14608 */ - 0x40, 0x50, 0x40, 0x54, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 14608 - 14624 */ - 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xfc, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0x54, /* bytes 14624 - 14640 */ - 0xc0, 0x54, 0x44, 0x54, 0x00, 0x50, 0x40, 0x54, 0xc0, 0xa8, 0x40, 0x54, 0x00, 0x50, 0x40, 0x54, /* bytes 14640 - 14656 */ - 0x40, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0x50, /* bytes 14656 - 14672 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, /* bytes 14672 - 14688 */ - 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xa8, /* bytes 14688 - 14704 */ - 0x50, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xf0, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0xa8, /* bytes 14704 - 14720 */ - 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xa8, /* bytes 14720 - 14736 */ - 0x50, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0xa8, 0x54, 0x54, 0xc0, 0xa8, 0x54, 0x00, 0x00, 0x00, /* bytes 14736 - 14752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14752 - 14768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14768 - 14784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14784 - 14800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x50, 0x54, 0x50, 0x54, 0x10, 0x14, 0x40, 0x44, 0x40, /* bytes 14800 - 14816 */ - 0x50, 0x40, 0x40, 0x50, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 14816 - 14832 */ - 0x54, 0x50, 0x50, 0x40, 0x50, 0x54, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 14832 - 14848 */ - 0x54, 0x50, 0x54, 0x40, 0x10, 0x40, 0x50, 0x44, 0x50, 0x50, 0x50, 0x40, 0x40, 0x44, 0x40, 0x40, /* bytes 14848 - 14864 */ - 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x40, /* bytes 14864 - 14880 */ - 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0x44, 0x40, 0x14, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 14880 - 14896 */ - 0x40, 0x40, 0x40, 0x40, 0x14, 0x40, 0x44, 0x40, 0x50, 0x44, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, /* bytes 14896 - 14912 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 14912 - 14928 */ - 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 14928 - 14944 */ - 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 14944 - 14960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14960 - 14976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14976 - 14992 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, /* bytes 14992 - 15008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x50, 0x54, 0x40, 0x54, 0x44, 0x54, 0x00, 0x54, 0x40, 0x10, /* bytes 15008 - 15024 */ - 0x00, 0x54, 0x40, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0x54, 0xf0, 0x50, 0x54, /* bytes 15024 - 15040 */ - 0x40, 0x54, 0x40, 0x40, 0x00, 0xfc, 0xfc, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x50, 0x54, /* bytes 15040 - 15056 */ - 0x40, 0x54, 0x44, 0x50, 0x00, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x10, 0x00, 0x54, 0x40, 0x10, /* bytes 15056 - 15072 */ - 0x00, 0x54, 0xc0, 0x54, 0xc0, 0xf0, 0x50, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x44, 0x50, /* bytes 15072 - 15088 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x04, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 15088 - 15104 */ - 0x40, 0x54, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, /* bytes 15104 - 15120 */ - 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0xa8, 0x50, 0x54, /* bytes 15120 - 15136 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, /* bytes 15136 - 15152 */ - 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 15152 - 15168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15168 - 15184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15184 - 15200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15200 - 15216 */ - 0x00, 0x00, 0x00, 0x00, 0x44, 0x54, 0x54, 0x50, 0x50, 0x50, 0x54, 0x44, 0x50, 0x44, 0x50, 0x40, /* bytes 15216 - 15232 */ - 0x40, 0x40, 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x50, /* bytes 15232 - 15248 */ - 0x50, 0x44, 0x40, 0x00, 0x54, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x50, /* bytes 15248 - 15264 */ - 0x50, 0x50, 0x54, 0x40, 0x44, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x04, 0x00, 0x14, 0x40, /* bytes 15264 - 15280 */ - 0x40, 0x40, 0x54, 0x50, 0x54, 0x54, 0x54, 0x44, 0x50, 0x50, 0x54, 0x50, 0x50, 0x44, 0x10, 0x04, /* bytes 15280 - 15296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x04, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 15296 - 15312 */ - 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 15312 - 15328 */ - 0x40, 0x40, 0x50, 0x44, 0x50, 0x40, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 15328 - 15344 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x54, /* bytes 15344 - 15360 */ - 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, 0x54, 0x50, 0x54, 0x00, 0x00, 0x00, /* bytes 15360 - 15376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15376 - 15392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15392 - 15408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 15408 - 15424 */ - 0x00, 0x00, 0x00, 0x10, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x54, /* bytes 15424 - 15440 */ - 0x40, 0x50, 0x04, 0x54, 0x50, 0xa8, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x50, 0x54, /* bytes 15440 - 15456 */ - 0x40, 0x50, 0x00, 0x50, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xc0, 0xa8, 0x40, 0x50, 0xc0, 0x54, /* bytes 15456 - 15472 */ - 0x44, 0x54, 0x40, 0x54, 0x04, 0x10, 0x00, 0x54, 0x40, 0x50, 0x04, 0x54, 0x00, 0x10, 0x40, 0x50, /* bytes 15472 - 15488 */ - 0x00, 0x10, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x44, 0x50, 0x40, 0x54, 0x40, 0x50, 0x00, 0x10, /* bytes 15488 - 15504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 15504 - 15520 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 15520 - 15536 */ - 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x44, 0x54, 0x40, 0x54, 0xc0, 0xa8, 0x54, 0xa8, 0x54, 0xf0, /* bytes 15536 - 15552 */ - 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0x50, 0x54, 0xc0, 0xf0, /* bytes 15552 - 15568 */ - 0x54, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 15568 - 15584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15584 - 15600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15600 - 15616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15616 - 15632 */ - 0x00, 0x00, 0x40, 0x50, 0x54, 0x14, 0x50, 0x10, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x40, 0x44, /* bytes 15632 - 15648 */ - 0x50, 0x40, 0x50, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x50, /* bytes 15648 - 15664 */ - 0x50, 0x40, 0x40, 0x50, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x44, 0x44, 0x54, 0x50, /* bytes 15664 - 15680 */ - 0x50, 0x44, 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, /* bytes 15680 - 15696 */ - 0x40, 0x44, 0x54, 0x44, 0x50, 0x40, 0x50, 0x14, 0x54, 0x40, 0x50, 0x40, 0x40, 0x04, 0x40, 0x00, /* bytes 15696 - 15712 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, /* bytes 15712 - 15728 */ - 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 15728 - 15744 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x44, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, /* bytes 15744 - 15760 */ - 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, /* bytes 15760 - 15776 */ - 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, /* bytes 15776 - 15792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15792 - 15808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15808 - 15824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 15824 - 15840 */ - 0x44, 0xf0, 0x54, 0x54, 0x40, 0x54, 0x40, 0x54, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 15840 - 15856 */ - 0x40, 0x50, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x54, 0x40, 0x50, /* bytes 15856 - 15872 */ - 0x40, 0x50, 0x40, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x44, 0x10, 0x40, 0x54, 0x44, 0x54, /* bytes 15872 - 15888 */ - 0x40, 0x50, 0x00, 0x50, 0x00, 0x14, 0x00, 0x44, 0x04, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 15888 - 15904 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x54, 0x04, 0x54, 0x40, 0x50, 0x40, 0x50, 0x00, 0x40, /* bytes 15904 - 15920 */ - 0x00, 0x54, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 15920 - 15936 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 15936 - 15952 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x14, 0x04, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x50, 0xa8, /* bytes 15952 - 15968 */ - 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x50, 0xa8, /* bytes 15968 - 15984 */ - 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0x54, 0x50, 0x54, 0x44, 0x00, 0x00, 0x00, /* bytes 15984 - 16000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16000 - 16016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16016 - 16032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, /* bytes 16032 - 16048 */ - 0xa8, 0xa8, 0x54, 0x44, 0x50, 0x50, 0x50, 0x40, 0x10, 0x44, 0x50, 0x40, 0x40, 0x40, 0x44, 0x04, /* bytes 16048 - 16064 */ - 0x40, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x50, 0x54, 0x50, 0x50, 0x40, /* bytes 16064 - 16080 */ - 0x40, 0x40, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0xa8, 0x54, 0x10, 0x00, 0x50, 0x50, 0x54, 0xc0, /* bytes 16080 - 16096 */ - 0x50, 0x40, 0x14, 0x40, 0x44, 0x40, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 16096 - 16112 */ - 0x40, 0x40, 0x50, 0x44, 0x50, 0x50, 0x54, 0x44, 0x50, 0x10, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, /* bytes 16112 - 16128 */ - 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x04, 0x40, 0x00, /* bytes 16128 - 16144 */ - 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16144 - 16160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, /* bytes 16160 - 16176 */ - 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, /* bytes 16176 - 16192 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, 0x54, 0x54, 0x50, 0x54, 0x00, 0x00, 0x00, /* bytes 16192 - 16208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16208 - 16224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16224 - 16240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0xa8, 0x54, 0xf0, /* bytes 16240 - 16256 */ - 0x54, 0xa8, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x00, 0x50, 0x40, 0x54, 0x00, 0x40, 0x00, 0x10, /* bytes 16256 - 16272 */ - 0x00, 0x40, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0x50, 0x00, 0x10, /* bytes 16272 - 16288 */ - 0x00, 0x50, 0x54, 0xa8, 0x50, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, /* bytes 16288 - 16304 */ - 0x40, 0x54, 0x40, 0x54, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x40, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 16304 - 16320 */ - 0x00, 0x50, 0x00, 0x50, 0x04, 0x50, 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, /* bytes 16320 - 16336 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 16336 - 16352 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x44, 0x00, 0x40, /* bytes 16352 - 16368 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 16368 - 16384 */ - 0x50, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 16384 - 16400 */ - 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 16400 - 16416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16416 - 16432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16432 - 16448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 16448 - 16464 */ - 0xa8, 0x54, 0x50, 0x10, 0x50, 0x40, 0x14, 0x40, 0x10, 0x40, 0x44, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 16464 - 16480 */ - 0x00, 0x04, 0x50, 0x50, 0x54, 0x50, 0x50, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x40, 0x40, 0x40, /* bytes 16480 - 16496 */ - 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x40, 0x40, 0x40, 0x50, 0x50, 0x50, 0x50, /* bytes 16496 - 16512 */ - 0x50, 0x14, 0x50, 0x40, 0x40, 0x40, 0x44, 0x00, 0x40, 0x00, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 16512 - 16528 */ - 0x40, 0x40, 0x10, 0x44, 0x50, 0x14, 0x54, 0x10, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x40, 0x00, /* bytes 16528 - 16544 */ - 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 16544 - 16560 */ - 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x44, 0x04, 0x40, 0x00, /* bytes 16560 - 16576 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x50, 0x44, 0x50, 0x54, /* bytes 16576 - 16592 */ - 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, /* bytes 16592 - 16608 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, /* bytes 16608 - 16624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16624 - 16640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16640 - 16656 */ - 0x00, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x00, 0x54, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0x54, /* bytes 16656 - 16672 */ - 0xc0, 0xf0, 0x44, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, /* bytes 16672 - 16688 */ - 0x00, 0x54, 0x40, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0x50, 0x54, 0xc0, 0x50, 0x00, 0x14, /* bytes 16688 - 16704 */ - 0x40, 0x54, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0x50, 0x00, 0x50, 0x00, 0x54, 0x44, 0x54, /* bytes 16704 - 16720 */ - 0x40, 0x54, 0x40, 0x14, 0x00, 0x14, 0x40, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 16720 - 16736 */ - 0x00, 0x50, 0x04, 0x50, 0x00, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x50, 0x00, 0x54, 0x00, 0x14, /* bytes 16736 - 16752 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 16752 - 16768 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x14, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x44, /* bytes 16768 - 16784 */ - 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x50, 0x54, /* bytes 16784 - 16800 */ - 0x40, 0x54, 0x50, 0x54, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0xf0, 0x50, 0x54, /* bytes 16800 - 16816 */ - 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 16816 - 16832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16832 - 16848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16848 - 16864 */ - 0x00, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x50, /* bytes 16864 - 16880 */ - 0x54, 0x54, 0x54, 0x40, 0x10, 0x44, 0x10, 0x04, 0x40, 0x40, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, /* bytes 16880 - 16896 */ - 0x00, 0x00, 0x50, 0x44, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x40, 0x40, 0x40, /* bytes 16896 - 16912 */ - 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x44, 0x00, 0x10, 0x40, 0x40, 0x10, 0x50, 0x44, /* bytes 16912 - 16928 */ - 0x50, 0x50, 0x50, 0x00, 0x04, 0x00, 0x44, 0x04, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16928 - 16944 */ - 0x40, 0x04, 0x40, 0x00, 0x40, 0x40, 0x50, 0x40, 0x10, 0x44, 0x50, 0x40, 0x44, 0x44, 0x50, 0x00, /* bytes 16944 - 16960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x50, 0x04, 0x40, 0x40, 0x40, 0x00, /* bytes 16960 - 16976 */ - 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x14, 0x04, 0x10, 0x44, 0x50, 0x40, 0x44, 0x40, 0x40, 0x00, /* bytes 16976 - 16992 */ - 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x00, 0x40, 0x00, 0x10, 0x40, 0x44, 0x50, 0x50, 0x44, /* bytes 16992 - 17008 */ - 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x50, /* bytes 17008 - 17024 */ - 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x50, 0x00, 0x00, 0x00, /* bytes 17024 - 17040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17040 - 17056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17056 - 17072 */ - 0x00, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0x54, 0xc0, 0x54, /* bytes 17072 - 17088 */ - 0x50, 0x54, 0xc0, 0x54, 0x40, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, /* bytes 17088 - 17104 */ - 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x10, 0x00, 0x50, /* bytes 17104 - 17120 */ - 0x44, 0x54, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0x54, 0x00, 0x40, 0x00, 0x50, 0x04, 0x50, 0x40, 0x54, /* bytes 17120 - 17136 */ - 0x40, 0x54, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, /* bytes 17136 - 17152 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, 0x04, 0x50, 0x40, 0x50, 0x00, 0x50, /* bytes 17152 - 17168 */ - 0x40, 0x50, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 17168 - 17184 */ - 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x04, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, /* bytes 17184 - 17200 */ - 0x04, 0x50, 0x00, 0x54, 0x40, 0x54, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, /* bytes 17200 - 17216 */ - 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0xa8, /* bytes 17216 - 17232 */ - 0xc0, 0x54, 0x40, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x00, 0x00, 0x00, /* bytes 17232 - 17248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17248 - 17264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17264 - 17280 */ - 0x00, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, /* bytes 17280 - 17296 */ - 0x54, 0x50, 0x54, 0x50, 0x50, 0x40, 0x44, 0x40, 0x44, 0x40, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 17296 - 17312 */ - 0x00, 0x00, 0x44, 0x40, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x40, 0x40, /* bytes 17312 - 17328 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, 0x14, 0x00, 0x40, 0x40, 0x10, 0x40, 0x10, 0x40, /* bytes 17328 - 17344 */ - 0x10, 0x40, 0x10, 0x00, 0x10, 0x00, 0x40, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17344 - 17360 */ - 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x44, 0x40, 0x14, 0x40, 0x10, 0x40, 0x50, 0x40, 0x14, 0x40, /* bytes 17360 - 17376 */ - 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x14, 0x44, 0x14, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x44, /* bytes 17376 - 17392 */ - 0x50, 0x40, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x10, 0x40, 0x50, 0x50, 0x50, 0x40, 0x40, 0x40, /* bytes 17392 - 17408 */ - 0x50, 0x44, 0x40, 0x40, 0x54, 0x44, 0x50, 0x40, 0x44, 0x04, 0x40, 0x40, 0x10, 0x40, 0x50, 0x44, /* bytes 17408 - 17424 */ - 0x50, 0x44, 0x50, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, /* bytes 17424 - 17440 */ - 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00, 0x00, /* bytes 17440 - 17456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17456 - 17472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17472 - 17488 */ - 0x00, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x40, 0x54, 0x44, 0x54, 0x04, 0x54, 0x40, 0x50, /* bytes 17488 - 17504 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x14, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 17504 - 17520 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x54, 0x00, 0x50, /* bytes 17520 - 17536 */ - 0x40, 0x54, 0x50, 0x54, 0xc0, 0xa8, 0x50, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 17536 - 17552 */ - 0x04, 0x50, 0x04, 0x50, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 17552 - 17568 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 17568 - 17584 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x44, 0x50, 0x40, 0x54, 0x40, 0x54, /* bytes 17584 - 17600 */ - 0x40, 0x54, 0x44, 0x50, 0x00, 0x54, 0x44, 0x54, 0x40, 0x54, 0x50, 0x54, 0x00, 0x54, 0x00, 0x44, /* bytes 17600 - 17616 */ - 0x00, 0x54, 0x40, 0x44, 0x00, 0x54, 0x44, 0x50, 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x04, 0x50, /* bytes 17616 - 17632 */ - 0x00, 0x54, 0x44, 0x54, 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0x54, 0x50, 0xa8, 0x44, 0x54, 0x50, 0x54, /* bytes 17632 - 17648 */ - 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x50, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x00, 0x00, 0x00, /* bytes 17648 - 17664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17664 - 17680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17680 - 17696 */ - 0x00, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x50, 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, /* bytes 17696 - 17712 */ - 0x10, 0x44, 0x14, 0x40, 0x10, 0x40, 0x50, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x04, 0x40, 0x00, /* bytes 17712 - 17728 */ - 0x00, 0x00, 0x40, 0x40, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x44, 0x40, /* bytes 17728 - 17744 */ - 0x50, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x10, 0x00, 0x40, 0x00, 0x44, 0x40, 0x10, 0x40, /* bytes 17744 - 17760 */ - 0x10, 0x40, 0x10, 0x40, 0x44, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 17760 - 17776 */ - 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x50, 0x40, 0x40, 0x44, 0x50, 0x44, 0x44, 0x44, 0x50, 0x44, /* bytes 17776 - 17792 */ - 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x50, 0x44, /* bytes 17792 - 17808 */ - 0x54, 0x54, 0x50, 0x40, 0x50, 0x10, 0x50, 0x44, 0x54, 0x54, 0x54, 0x44, 0x50, 0x10, 0x54, 0x00, /* bytes 17808 - 17824 */ - 0x40, 0x50, 0x54, 0x40, 0x40, 0x44, 0x54, 0x40, 0x44, 0x40, 0x44, 0x00, 0x40, 0x40, 0x50, 0x40, /* bytes 17824 - 17840 */ - 0x40, 0x44, 0x50, 0x44, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, /* bytes 17840 - 17856 */ - 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x40, 0x50, 0x50, 0x50, 0x44, 0x50, 0x00, 0x00, 0x00, /* bytes 17856 - 17872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17872 - 17888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17888 - 17904 */ - 0x00, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x44, 0x54, 0x54, 0xa8, 0x40, 0x50, 0x40, 0x50, 0x00, 0x54, /* bytes 17904 - 17920 */ - 0x04, 0x50, 0x00, 0x50, 0x04, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 17920 - 17936 */ - 0x00, 0x40, 0x00, 0x50, 0x40, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0x50, 0x54, 0x00, 0x54, /* bytes 17936 - 17952 */ - 0x44, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, 0xa8, 0x40, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 17952 - 17968 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 17968 - 17984 */ - 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 17984 - 18000 */ - 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 18000 - 18016 */ - 0x44, 0x54, 0x00, 0x54, 0x40, 0x54, 0x40, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x40, 0x50, /* bytes 18016 - 18032 */ - 0x04, 0x50, 0xc0, 0x54, 0x40, 0x14, 0x40, 0x54, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, /* bytes 18032 - 18048 */ - 0x40, 0x50, 0x00, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 18048 - 18064 */ - 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x00, 0x00, 0x00, /* bytes 18064 - 18080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18080 - 18096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18096 - 18112 */ - 0x00, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x14, 0x44, 0x14, 0x44, /* bytes 18112 - 18128 */ - 0x50, 0x40, 0x10, 0x40, 0x10, 0x40, 0x40, 0x40, 0x44, 0x04, 0x40, 0x40, 0x10, 0x40, 0x44, 0x00, /* bytes 18128 - 18144 */ - 0x00, 0x00, 0x40, 0x40, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x44, 0x50, /* bytes 18144 - 18160 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, /* bytes 18160 - 18176 */ - 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x40, /* bytes 18176 - 18192 */ - 0x44, 0x40, 0x44, 0x40, 0x14, 0x40, 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 18192 - 18208 */ - 0x54, 0x50, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 18208 - 18224 */ - 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x50, 0x54, /* bytes 18224 - 18240 */ - 0x10, 0x00, 0x14, 0x54, 0x54, 0x50, 0x50, 0x10, 0x14, 0x04, 0x40, 0x00, 0x40, 0x40, 0x44, 0x40, /* bytes 18240 - 18256 */ - 0x10, 0x40, 0x40, 0x44, 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 18256 - 18272 */ - 0x50, 0xc0, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x44, 0x50, 0x00, 0x00, 0x00, /* bytes 18272 - 18288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18288 - 18304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18304 - 18320 */ - 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x50, /* bytes 18320 - 18336 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x04, 0x10, 0x00, 0x54, 0x00, 0x44, /* bytes 18336 - 18352 */ - 0x00, 0x40, 0x00, 0x50, 0x40, 0x54, 0x50, 0x54, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0x54, 0x00, 0x50, /* bytes 18352 - 18368 */ - 0x40, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0x50, 0x54, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 18368 - 18384 */ - 0x00, 0x54, 0x40, 0x54, 0x00, 0x14, 0x04, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, /* bytes 18384 - 18400 */ - 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x50, 0x54, /* bytes 18400 - 18416 */ - 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 18416 - 18432 */ - 0x44, 0xa8, 0x44, 0x50, 0x44, 0x54, 0x50, 0x54, 0xc0, 0xa8, 0x54, 0x54, 0xc0, 0x54, 0x04, 0x10, /* bytes 18432 - 18448 */ - 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, 0x50, 0x50, 0x04, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 18448 - 18464 */ - 0x00, 0x54, 0x04, 0x10, 0x44, 0x54, 0x50, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x44, 0x50, /* bytes 18464 - 18480 */ - 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x50, 0x40, 0x54, 0x44, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 18480 - 18496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18496 - 18512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18512 - 18528 */ - 0x00, 0x50, 0x50, 0x40, 0x50, 0x10, 0x50, 0x40, 0x10, 0x10, 0x50, 0x44, 0x50, 0x50, 0x54, 0x44, /* bytes 18528 - 18544 */ - 0x50, 0x14, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x50, 0x00, 0x40, 0x40, 0x44, 0x00, /* bytes 18544 - 18560 */ - 0x00, 0x00, 0x40, 0x40, 0x14, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x10, 0x44, /* bytes 18560 - 18576 */ - 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x04, /* bytes 18576 - 18592 */ - 0x40, 0x40, 0x50, 0x00, 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x50, 0x40, 0x10, 0x40, 0x50, 0x40, /* bytes 18592 - 18608 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 18608 - 18624 */ - 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0x44, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, /* bytes 18624 - 18640 */ - 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x50, 0x44, 0x00, /* bytes 18640 - 18656 */ - 0x00, 0x00, 0x00, 0x40, 0x54, 0x54, 0x54, 0x50, 0x50, 0x00, 0x00, 0x00, 0x40, 0x40, 0x14, 0x40, /* bytes 18656 - 18672 */ - 0x40, 0x40, 0x44, 0x00, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x40, 0x50, 0x50, 0x50, 0x40, /* bytes 18672 - 18688 */ - 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x50, 0x40, 0x44, 0x00, 0x00, 0x00, /* bytes 18688 - 18704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18704 - 18720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18720 - 18736 */ - 0x00, 0x50, 0x04, 0x50, 0x00, 0x54, 0x40, 0x54, 0x04, 0x50, 0x44, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 18736 - 18752 */ - 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x04, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x14, /* bytes 18752 - 18768 */ - 0x00, 0x00, 0x00, 0x50, 0x40, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x00, 0x54, /* bytes 18768 - 18784 */ - 0xc0, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 18784 - 18800 */ - 0x00, 0x50, 0x00, 0x10, 0x40, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x54, 0x40, 0x50, 0x04, 0x50, /* bytes 18800 - 18816 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 18816 - 18832 */ - 0xc0, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 18832 - 18848 */ - 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x50, 0x00, 0x10, /* bytes 18848 - 18864 */ - 0x00, 0xa8, 0x04, 0x10, 0x54, 0xa8, 0x40, 0x54, 0x50, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, /* bytes 18864 - 18880 */ - 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 18880 - 18896 */ - 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x00, 0x00, 0x00, /* bytes 18896 - 18912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18912 - 18928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18928 - 18944 */ - 0x00, 0x44, 0x14, 0x40, 0x10, 0x40, 0x14, 0x40, 0x14, 0x40, 0x14, 0x44, 0x50, 0x40, 0x14, 0x14, /* bytes 18944 - 18960 */ - 0x54, 0x50, 0x50, 0x10, 0x50, 0x50, 0x50, 0x40, 0x40, 0x00, 0x40, 0x40, 0x44, 0x40, 0x40, 0x04, /* bytes 18960 - 18976 */ - 0x00, 0x00, 0x00, 0x40, 0x50, 0x44, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x44, 0x50, /* bytes 18976 - 18992 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x44, 0x40, /* bytes 18992 - 19008 */ - 0x40, 0x00, 0x40, 0x14, 0x50, 0x40, 0x50, 0x50, 0x54, 0x50, 0x50, 0x40, 0x10, 0x40, 0x40, 0x00, /* bytes 19008 - 19024 */ - 0x40, 0x00, 0x04, 0x40, 0x40, 0x40, 0x50, 0x44, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 19024 - 19040 */ - 0x54, 0x50, 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, /* bytes 19040 - 19056 */ - 0x54, 0x50, 0x50, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, 0x04, 0x04, 0x00, /* bytes 19056 - 19072 */ - 0x00, 0xa8, 0x54, 0x00, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x44, 0x00, 0x00, 0x50, 0x40, 0x44, 0x40, /* bytes 19072 - 19088 */ - 0x10, 0x40, 0x40, 0x00, 0x10, 0x14, 0x50, 0x50, 0x54, 0x50, 0x50, 0x44, 0x50, 0x44, 0x50, 0x50, /* bytes 19088 - 19104 */ - 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x44, 0x50, 0x00, 0x00, 0x00, /* bytes 19104 - 19120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19120 - 19136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19136 - 19152 */ - 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, /* bytes 19152 - 19168 */ - 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, /* bytes 19168 - 19184 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x40, 0x54, /* bytes 19184 - 19200 */ - 0x40, 0x54, 0x50, 0x54, 0x44, 0x54, 0x40, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, /* bytes 19200 - 19216 */ - 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x44, 0x50, 0x40, 0x54, 0x44, 0x50, 0x04, 0x50, 0x00, 0x44, /* bytes 19216 - 19232 */ - 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 19232 - 19248 */ - 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 19248 - 19264 */ - 0x40, 0x54, 0x50, 0x54, 0x40, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x00, 0x54, 0x00, 0x40, /* bytes 19264 - 19280 */ - 0x00, 0x54, 0x04, 0x40, 0xc0, 0xf0, 0xc0, 0x54, 0x44, 0x54, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, /* bytes 19280 - 19296 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, 0x04, 0x54, 0x40, 0x50, /* bytes 19296 - 19312 */ - 0x40, 0x54, 0x40, 0x54, 0x00, 0x54, 0x40, 0x50, 0x04, 0x54, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 19312 - 19328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19328 - 19344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19344 - 19360 */ - 0x00, 0x10, 0x50, 0x40, 0x44, 0x40, 0x10, 0x04, 0x40, 0x40, 0x44, 0x04, 0x40, 0x40, 0x50, 0x40, /* bytes 19360 - 19376 */ - 0x40, 0x04, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 19376 - 19392 */ - 0x00, 0x00, 0x40, 0x04, 0x40, 0x44, 0x54, 0x50, 0x50, 0x50, 0x54, 0x54, 0x54, 0x40, 0x10, 0x44, /* bytes 19392 - 19408 */ - 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 19408 - 19424 */ - 0x40, 0x44, 0x14, 0x40, 0x10, 0x40, 0x14, 0x04, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x14, 0x40, /* bytes 19424 - 19440 */ - 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x50, 0x44, 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x50, 0x44, /* bytes 19440 - 19456 */ - 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x44, /* bytes 19456 - 19472 */ - 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x40, 0x00, 0x40, 0x00, /* bytes 19472 - 19488 */ - 0x00, 0x04, 0x00, 0x04, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x40, 0x00, 0x40, 0x50, 0x50, 0x40, /* bytes 19488 - 19504 */ - 0x44, 0x40, 0x44, 0x00, 0x40, 0x40, 0x50, 0x40, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x40, /* bytes 19504 - 19520 */ - 0x50, 0x40, 0x50, 0x40, 0x50, 0x14, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, 0x40, 0x00, 0x00, 0x00, /* bytes 19520 - 19536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19536 - 19552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19552 - 19568 */ - 0x00, 0x50, 0x04, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 19568 - 19584 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x14, 0x00, 0x50, /* bytes 19584 - 19600 */ - 0x00, 0x40, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 19600 - 19616 */ - 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, /* bytes 19616 - 19632 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 19632 - 19648 */ - 0x04, 0x14, 0x00, 0x50, 0x04, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, /* bytes 19648 - 19664 */ - 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 19664 - 19680 */ - 0xc0, 0x54, 0xc0, 0x54, 0x50, 0x54, 0x40, 0x54, 0x50, 0x54, 0x40, 0xa8, 0x40, 0x40, 0x00, 0x14, /* bytes 19680 - 19696 */ - 0x00, 0x00, 0x00, 0x54, 0x54, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x00, 0x40, 0x40, 0x54, 0x40, 0x54, /* bytes 19696 - 19712 */ - 0x04, 0x10, 0x00, 0x50, 0x04, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, /* bytes 19712 - 19728 */ - 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 19728 - 19744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19744 - 19760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19760 - 19776 */ - 0x00, 0x40, 0x44, 0x40, 0x40, 0x04, 0x40, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19776 - 19792 */ - 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x44, 0x40, 0x40, 0x00, /* bytes 19792 - 19808 */ - 0x00, 0x00, 0x40, 0x04, 0x44, 0x40, 0x44, 0x44, 0x50, 0x50, 0x50, 0x44, 0x10, 0x04, 0x50, 0x50, /* bytes 19808 - 19824 */ - 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x14, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 19824 - 19840 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 19840 - 19856 */ - 0x40, 0x04, 0x40, 0x40, 0x10, 0x40, 0x50, 0x44, 0x50, 0x40, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, /* bytes 19856 - 19872 */ - 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, /* bytes 19872 - 19888 */ - 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, 0x54, 0x54, 0x54, 0x40, 0x00, 0x00, /* bytes 19888 - 19904 */ - 0x00, 0x00, 0x00, 0x40, 0x54, 0x50, 0x54, 0x54, 0x54, 0x44, 0x04, 0x00, 0x50, 0x44, 0x50, 0x50, /* bytes 19904 - 19920 */ - 0x50, 0x00, 0x40, 0x40, 0x10, 0x40, 0x14, 0x14, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, /* bytes 19920 - 19936 */ - 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x10, 0x44, 0x50, 0x40, 0x10, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 19936 - 19952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19952 - 19968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19968 - 19984 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 19984 - 20000 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x00, 0x40, /* bytes 20000 - 20016 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x04, 0x14, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 20016 - 20032 */ - 0x40, 0x54, 0x50, 0x54, 0x40, 0x54, 0x40, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, /* bytes 20032 - 20048 */ - 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, /* bytes 20048 - 20064 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x50, /* bytes 20064 - 20080 */ - 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 20080 - 20096 */ - 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, 0x54, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x04, /* bytes 20096 - 20112 */ - 0x00, 0x14, 0x00, 0x50, 0x40, 0x54, 0x44, 0x54, 0x04, 0x54, 0x00, 0x40, 0x40, 0x54, 0x44, 0x54, /* bytes 20112 - 20128 */ - 0x04, 0x10, 0x04, 0x50, 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, /* bytes 20128 - 20144 */ - 0x00, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 20144 - 20160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20160 - 20176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20176 - 20192 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20192 - 20208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x40, 0x44, 0x50, 0x44, 0x40, 0x40, 0x10, 0x00, /* bytes 20208 - 20224 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x50, 0x04, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x44, /* bytes 20224 - 20240 */ - 0x50, 0x50, 0x54, 0xc0, 0x50, 0x54, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 20240 - 20256 */ - 0x00, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x14, 0x40, 0x40, 0x44, 0x14, 0x40, /* bytes 20256 - 20272 */ - 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x04, 0x10, 0x44, 0x50, 0x40, 0x50, 0x50, 0x54, 0x44, /* bytes 20272 - 20288 */ - 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0x50, /* bytes 20288 - 20304 */ - 0x54, 0x54, 0x54, 0x44, 0x50, 0x54, 0x54, 0x50, 0x54, 0x10, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, /* bytes 20304 - 20320 */ - 0x40, 0x00, 0x40, 0x44, 0x50, 0x44, 0x54, 0x40, 0x44, 0x44, 0x00, 0x00, 0x44, 0x50, 0x54, 0x50, /* bytes 20320 - 20336 */ - 0x50, 0x40, 0x40, 0x04, 0x44, 0x40, 0x50, 0x40, 0x10, 0x44, 0x44, 0x40, 0x14, 0x40, 0x50, 0x40, /* bytes 20336 - 20352 */ - 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x14, 0x40, 0x40, 0x40, 0x50, 0x40, 0x40, 0x00, 0x00, 0x00, /* bytes 20352 - 20368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20368 - 20384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20384 - 20400 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 20400 - 20416 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x04, 0x50, 0x04, 0x10, 0x00, 0x10, /* bytes 20416 - 20432 */ - 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, /* bytes 20432 - 20448 */ - 0x40, 0x54, 0x40, 0x50, 0xc0, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, /* bytes 20448 - 20464 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 20464 - 20480 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 20480 - 20496 */ - 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, /* bytes 20496 - 20512 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x50, 0x50, 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, /* bytes 20512 - 20528 */ - 0x00, 0x00, 0x00, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x14, 0x00, 0x54, 0x44, 0x54, 0x04, 0x50, /* bytes 20528 - 20544 */ - 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 20544 - 20560 */ - 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x04, 0x50, 0x04, 0x50, 0x40, 0x00, 0x00, 0x00, /* bytes 20560 - 20576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20576 - 20592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20592 - 20608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20608 - 20624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, /* bytes 20624 - 20640 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x50, 0x44, /* bytes 20640 - 20656 */ - 0x50, 0x44, 0x50, 0x40, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 20656 - 20672 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 20672 - 20688 */ - 0x40, 0x00, 0x40, 0x00, 0x44, 0x04, 0x44, 0x40, 0x44, 0x40, 0x10, 0x40, 0x14, 0x40, 0x14, 0x44, /* bytes 20688 - 20704 */ - 0x50, 0x44, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, /* bytes 20704 - 20720 */ - 0x50, 0x44, 0x54, 0x50, 0x50, 0x50, 0x54, 0x54, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, 0x40, 0x00, /* bytes 20720 - 20736 */ - 0x00, 0x00, 0x10, 0x44, 0x10, 0x40, 0x40, 0x40, 0x54, 0x40, 0x40, 0x50, 0x54, 0x54, 0x50, 0x40, /* bytes 20736 - 20752 */ - 0x50, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x14, 0x04, 0x10, 0x40, 0x50, 0x44, 0x44, 0x40, /* bytes 20752 - 20768 */ - 0x14, 0x40, 0x50, 0x40, 0x50, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 20768 - 20784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20784 - 20800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20800 - 20816 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, /* bytes 20816 - 20832 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 20832 - 20848 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x54, /* bytes 20848 - 20864 */ - 0x40, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 20864 - 20880 */ - 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 20880 - 20896 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 20896 - 20912 */ - 0x00, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 20912 - 20928 */ - 0x00, 0x54, 0x44, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x00, 0x50, 0x00, 0x50, 0x00, 0x40, /* bytes 20928 - 20944 */ - 0x00, 0x50, 0x40, 0x10, 0x00, 0x50, 0x40, 0x54, 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, 0x50, 0x54, /* bytes 20944 - 20960 */ - 0x00, 0x50, 0x40, 0x50, 0x00, 0x14, 0x40, 0x50, 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 20960 - 20976 */ - 0x00, 0x54, 0x40, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 20976 - 20992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20992 - 21008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21008 - 21024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21024 - 21040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21040 - 21056 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, 0x40, 0x44, 0x14, 0x04, 0x44, 0x44, 0x50, 0x40, /* bytes 21056 - 21072 */ - 0x50, 0x44, 0x40, 0x00, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21072 - 21088 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x40, 0x04, 0x10, 0x40, /* bytes 21088 - 21104 */ - 0x40, 0x40, 0x44, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x40, /* bytes 21104 - 21120 */ - 0x44, 0x10, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x10, 0x40, 0x50, 0x40, 0x50, 0x50, 0x50, 0x40, /* bytes 21120 - 21136 */ - 0x54, 0x54, 0x50, 0x40, 0x50, 0x50, 0x50, 0x50, 0x50, 0x14, 0x14, 0x04, 0x40, 0x44, 0x40, 0x00, /* bytes 21136 - 21152 */ - 0x04, 0x40, 0x44, 0x00, 0x40, 0x40, 0x50, 0x40, 0x00, 0x44, 0x54, 0x40, 0x50, 0x50, 0x50, 0x40, /* bytes 21152 - 21168 */ - 0x10, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, 0x40, 0x44, 0x14, 0x40, 0x44, 0x40, 0x50, 0x40, /* bytes 21168 - 21184 */ - 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x14, 0x40, 0x44, 0x40, 0x50, 0x40, 0x40, 0x00, 0x00, 0x00, /* bytes 21184 - 21200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21200 - 21216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21216 - 21232 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 21232 - 21248 */ - 0x00, 0x40, 0x00, 0x44, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, /* bytes 21248 - 21264 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 21264 - 21280 */ - 0x00, 0x50, 0x00, 0x54, 0xc0, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, /* bytes 21280 - 21296 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 21296 - 21312 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, /* bytes 21312 - 21328 */ - 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x50, 0x40, 0xa8, /* bytes 21328 - 21344 */ - 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, 0x04, 0x54, 0x40, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 21344 - 21360 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 21360 - 21376 */ - 0x04, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 21376 - 21392 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x00, 0x50, 0x00, 0x50, 0x04, 0x00, 0x00, 0x00, /* bytes 21392 - 21408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21408 - 21424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21424 - 21440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21440 - 21456 */ - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21456 - 21472 */ - 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, 0x44, 0x04, 0x44, 0x40, 0x44, 0x40, /* bytes 21472 - 21488 */ - 0x44, 0x00, 0x54, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 21488 - 21504 */ - 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, /* bytes 21504 - 21520 */ - 0x40, 0x00, 0x44, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, 0x40, 0x40, /* bytes 21520 - 21536 */ - 0x44, 0x40, 0x40, 0x40, 0x44, 0x04, 0x40, 0x40, 0x50, 0x40, 0x50, 0x44, 0x54, 0x50, 0x50, 0x50, /* bytes 21536 - 21552 */ - 0x54, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, 0x50, 0x14, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 21552 - 21568 */ - 0x40, 0x00, 0x40, 0x40, 0x10, 0x40, 0x40, 0x50, 0x54, 0x50, 0x50, 0x50, 0x50, 0x44, 0x14, 0x40, /* bytes 21568 - 21584 */ - 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x40, 0x40, 0x14, 0x40, 0x40, 0x40, 0x10, 0x40, 0x10, 0x40, /* bytes 21584 - 21600 */ - 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x10, 0x44, 0x10, 0x00, 0x00, 0x00, /* bytes 21600 - 21616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21616 - 21632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21632 - 21648 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 21648 - 21664 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, /* bytes 21664 - 21680 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x00, 0x40, 0x00, 0x54, 0x40, 0x14, /* bytes 21680 - 21696 */ - 0x00, 0x54, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, /* bytes 21696 - 21712 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 21712 - 21728 */ - 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x10, /* bytes 21728 - 21744 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 21744 - 21760 */ - 0x40, 0x54, 0x40, 0x50, 0x04, 0x54, 0x40, 0x50, 0x00, 0x54, 0x44, 0x50, 0x00, 0x50, 0x00, 0x40, /* bytes 21760 - 21776 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x04, 0x50, 0x40, 0x54, 0x00, 0x50, /* bytes 21776 - 21792 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x04, 0x10, /* bytes 21792 - 21808 */ - 0x00, 0x54, 0x40, 0x10, 0x00, 0x54, 0x40, 0x10, 0x00, 0x54, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 21808 - 21824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21824 - 21840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21840 - 21856 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 21856 - 21872 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21872 - 21888 */ - 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x40, 0x00, /* bytes 21888 - 21904 */ - 0x40, 0x50, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21904 - 21920 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21920 - 21936 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, /* bytes 21936 - 21952 */ - 0x40, 0x04, 0x40, 0x40, 0x40, 0x40, 0x50, 0x00, 0x40, 0x40, 0x50, 0x40, 0x50, 0x50, 0x50, 0x44, /* bytes 21952 - 21968 */ - 0x54, 0x54, 0x54, 0x40, 0x40, 0x40, 0x50, 0x40, 0x10, 0x40, 0x14, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21968 - 21984 */ - 0x40, 0x00, 0x40, 0x40, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x50, 0x40, 0x44, 0x40, 0x10, 0x04, /* bytes 21984 - 22000 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x44, 0x14, 0x04, 0x40, 0x40, 0x50, 0x40, /* bytes 22000 - 22016 */ - 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x14, 0x00, 0x00, 0x00, /* bytes 22016 - 22032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22032 - 22048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22048 - 22064 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 22064 - 22080 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 22080 - 22096 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x54, 0x40, 0x54, 0x00, 0x54, 0x04, 0x50, 0x00, 0x50, /* bytes 22096 - 22112 */ - 0x40, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, /* bytes 22112 - 22128 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, /* bytes 22128 - 22144 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, /* bytes 22144 - 22160 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, /* bytes 22160 - 22176 */ - 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x44, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, /* bytes 22176 - 22192 */ - 0x00, 0x50, 0x40, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 22192 - 22208 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 22208 - 22224 */ - 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x04, 0x00, 0x00, 0x00, /* bytes 22224 - 22240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22240 - 22256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22256 - 22272 */ - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22272 - 22288 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22288 - 22304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x04, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 22304 - 22320 */ - 0x50, 0x50, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22320 - 22336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22336 - 22352 */ - 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 22352 - 22368 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 22368 - 22384 */ - 0x10, 0x40, 0x50, 0x50, 0x54, 0x50, 0x50, 0x40, 0x10, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, /* bytes 22384 - 22400 */ - 0x50, 0x44, 0x10, 0x40, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 22400 - 22416 */ - 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 22416 - 22432 */ - 0x44, 0x00, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x40, 0x10, 0x44, 0x10, 0x00, 0x00, 0x00, /* bytes 22432 - 22448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22448 - 22464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22464 - 22480 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 22480 - 22496 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, /* bytes 22496 - 22512 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x14, 0x40, 0x10, 0x00, 0x54, 0x00, 0x10, /* bytes 22512 - 22528 */ - 0x00, 0x54, 0x04, 0x00, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, /* bytes 22528 - 22544 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 22544 - 22560 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 22560 - 22576 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 22576 - 22592 */ - 0x40, 0x54, 0x44, 0x50, 0x00, 0x54, 0x40, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x54, 0x00, 0x10, /* bytes 22592 - 22608 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 22608 - 22624 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, /* bytes 22624 - 22640 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x54, 0x04, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 22640 - 22656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22656 - 22672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22672 - 22688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22688 - 22704 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22704 - 22720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x44, 0x10, 0x00, 0x44, 0x40, 0x44, 0x40, /* bytes 22720 - 22736 */ - 0x50, 0x50, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22736 - 22752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 22752 - 22768 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 22768 - 22784 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, 0x40, 0x44, 0x14, 0x40, /* bytes 22784 - 22800 */ - 0x50, 0x10, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, 0x10, 0x40, 0x10, 0x44, 0x40, 0x00, 0x40, 0x00, /* bytes 22800 - 22816 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 22816 - 22832 */ - 0x40, 0x00, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 22832 - 22848 */ - 0x40, 0x04, 0x44, 0x00, 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 22848 - 22864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22864 - 22880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22880 - 22896 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 22896 - 22912 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x40, /* bytes 22912 - 22928 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, /* bytes 22928 - 22944 */ - 0x44, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22944 - 22960 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, /* bytes 22960 - 22976 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, /* bytes 22976 - 22992 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 22992 - 23008 */ - 0x40, 0x50, 0x00, 0x54, 0x00, 0x54, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x00, 0x44, 0x00, 0x10, /* bytes 23008 - 23024 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 23024 - 23040 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x50, /* bytes 23040 - 23056 */ - 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, 0x00, 0x50, 0x04, 0x50, 0x00, 0x50, 0x40, 0x00, 0x00, 0x00, /* bytes 23056 - 23072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23072 - 23088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23088 - 23104 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23104 - 23120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23120 - 23136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x44, /* bytes 23136 - 23152 */ - 0x50, 0x40, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23152 - 23168 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, /* bytes 23168 - 23184 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23184 - 23200 */ - 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, /* bytes 23200 - 23216 */ - 0x10, 0x40, 0x44, 0x40, 0x14, 0x40, 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x44, 0x00, 0x40, 0x40, /* bytes 23216 - 23232 */ - 0x44, 0x04, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 23232 - 23248 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, /* bytes 23248 - 23264 */ - 0x44, 0x00, 0x10, 0x40, 0x10, 0x00, 0x44, 0x44, 0x10, 0x40, 0x10, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 23264 - 23280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23280 - 23296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23296 - 23312 */ - 0x00, 0x10, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23312 - 23328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, /* bytes 23328 - 23344 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 23344 - 23360 */ - 0x40, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23360 - 23376 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 23376 - 23392 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 23392 - 23408 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 23408 - 23424 */ - 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x40, /* bytes 23424 - 23440 */ - 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 23440 - 23456 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 23456 - 23472 */ - 0x00, 0x54, 0x00, 0x14, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x04, 0x50, 0x04, 0x00, 0x00, 0x00, /* bytes 23472 - 23488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23488 - 23504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23504 - 23520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23520 - 23536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23536 - 23552 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x10, 0x40, /* bytes 23552 - 23568 */ - 0x50, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23568 - 23584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23584 - 23600 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23600 - 23616 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x04, 0x44, 0x00, /* bytes 23616 - 23632 */ - 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x04, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 23632 - 23648 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23648 - 23664 */ - 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x44, 0x00, 0x40, 0x40, 0x44, 0x04, /* bytes 23664 - 23680 */ - 0x40, 0x40, 0x10, 0x04, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, 0x14, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 23680 - 23696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23696 - 23712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23712 - 23728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23728 - 23744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 23744 - 23760 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x40, 0x54, 0x04, 0x54, /* bytes 23760 - 23776 */ - 0x40, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, /* bytes 23776 - 23792 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, /* bytes 23792 - 23808 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, /* bytes 23808 - 23824 */ - 0x00, 0x44, 0x00, 0x40, 0x00, 0x44, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 23824 - 23840 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, /* bytes 23840 - 23856 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 23856 - 23872 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 23872 - 23888 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x04, 0x54, 0x40, 0x54, 0x04, 0x00, 0x00, 0x00, /* bytes 23888 - 23904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23904 - 23920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23920 - 23936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23936 - 23952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23952 - 23968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x50, 0x40, 0x50, 0x54, /* bytes 23968 - 23984 */ - 0x50, 0x00, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23984 - 24000 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24000 - 24016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24016 - 24032 */ - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, /* bytes 24032 - 24048 */ - 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 24048 - 24064 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 24064 - 24080 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, 0x44, 0x04, /* bytes 24080 - 24096 */ - 0x10, 0x40, 0x10, 0x40, 0x14, 0x40, 0x10, 0x44, 0x14, 0x40, 0x10, 0x44, 0x10, 0x00, 0x00, 0x00, /* bytes 24096 - 24112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24112 - 24128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24128 - 24144 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24144 - 24160 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, /* bytes 24160 - 24176 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x40, 0x54, /* bytes 24176 - 24192 */ - 0x04, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 24192 - 24208 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, /* bytes 24208 - 24224 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 24224 - 24240 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 24240 - 24256 */ - 0x00, 0x10, 0x00, 0x44, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 24256 - 24272 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 24272 - 24288 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, /* bytes 24288 - 24304 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, 0x04, 0x54, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 24304 - 24320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24320 - 24336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24336 - 24352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24352 - 24368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24368 - 24384 */ - 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x44, 0x44, 0x50, 0x40, /* bytes 24384 - 24400 */ - 0x40, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24400 - 24416 */ - 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24416 - 24432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 24432 - 24448 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 24448 - 24464 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 24464 - 24480 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 24480 - 24496 */ - 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x04, /* bytes 24496 - 24512 */ - 0x44, 0x40, 0x10, 0x04, 0x44, 0x44, 0x14, 0x40, 0x44, 0x44, 0x14, 0x40, 0x44, 0x00, 0x00, 0x00, /* bytes 24512 - 24528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24528 - 24544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24544 - 24560 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 24560 - 24576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 24576 - 24592 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, /* bytes 24592 - 24608 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 24608 - 24624 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 24624 - 24640 */ - 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, /* bytes 24640 - 24656 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, /* bytes 24656 - 24672 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 24672 - 24688 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 24688 - 24704 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, /* bytes 24704 - 24720 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 24720 - 24736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24736 - 24752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24752 - 24768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24768 - 24784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24784 - 24800 */ - 0x40, 0x00, 0x40, 0x04, 0x10, 0x04, 0x40, 0x40, 0x40, 0x04, 0x40, 0x00, 0x40, 0x40, 0x50, 0x44, /* bytes 24800 - 24816 */ - 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 24816 - 24832 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24832 - 24848 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 24848 - 24864 */ - 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 24864 - 24880 */ - 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 24880 - 24896 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 24896 - 24912 */ - 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, /* bytes 24912 - 24928 */ - 0x10, 0x04, 0x44, 0x40, 0x10, 0x04, 0x10, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 24928 - 24944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24944 - 24960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24960 - 24976 */ - 0x00, 0x54, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, /* bytes 24976 - 24992 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 24992 - 25008 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 25008 - 25024 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25024 - 25040 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25040 - 25056 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x44, /* bytes 25056 - 25072 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, /* bytes 25072 - 25088 */ - 0x00, 0x14, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 25088 - 25104 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 25104 - 25120 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 25120 - 25136 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, /* bytes 25136 - 25152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25152 - 25168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25168 - 25184 */ - 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25184 - 25200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 25200 - 25216 */ - 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 25216 - 25232 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 25232 - 25248 */ - 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 25248 - 25264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 25264 - 25280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 25280 - 25296 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 25296 - 25312 */ - 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 25312 - 25328 */ - 0x40, 0x04, 0x44, 0x00, 0x04, 0x00, 0x40, 0x04, 0x00, 0x00, 0x44, 0x00, 0x04, 0x40, 0x10, 0x00, /* bytes 25328 - 25344 */ - 0x40, 0x40, 0x10, 0x00, 0x40, 0x04, 0x10, 0x00, 0x04, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25344 - 25360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25360 - 25376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25376 - 25392 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, /* bytes 25392 - 25408 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, /* bytes 25408 - 25424 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 25424 - 25440 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 25440 - 25456 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, /* bytes 25456 - 25472 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 25472 - 25488 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x44, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 25488 - 25504 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 25504 - 25520 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, /* bytes 25520 - 25536 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 25536 - 25552 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 25552 - 25568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25568 - 25584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25584 - 25600 */ - 0x00, 0x04, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25600 - 25616 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25616 - 25632 */ - 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 25632 - 25648 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, /* bytes 25648 - 25664 */ - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25664 - 25680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 25680 - 25696 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 25696 - 25712 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25712 - 25728 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 25728 - 25744 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x40, 0x44, 0x00, 0x40, 0x00, /* bytes 25744 - 25760 */ - 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25760 - 25776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25776 - 25792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25792 - 25808 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, /* bytes 25808 - 25824 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25824 - 25840 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, /* bytes 25840 - 25856 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25856 - 25872 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25872 - 25888 */ - 0x00, 0x10, 0x00, 0x04, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x44, /* bytes 25888 - 25904 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x00, 0x40, /* bytes 25904 - 25920 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25920 - 25936 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x44, /* bytes 25936 - 25952 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x44, /* bytes 25952 - 25968 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25968 - 25984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25984 - 26000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26000 - 26016 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26016 - 26032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 26032 - 26048 */ - 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x00, /* bytes 26048 - 26064 */ - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 26064 - 26080 */ - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26080 - 26096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 26096 - 26112 */ - 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x40, 0x00, /* bytes 26112 - 26128 */ - 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26128 - 26144 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x04, 0x40, 0x00, 0x04, 0x04, 0x40, 0x00, 0x04, 0x04, 0x40, 0x00, /* bytes 26144 - 26160 */ - 0x04, 0x00, 0x44, 0x00, 0x00, 0x04, 0x44, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 26160 - 26176 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26176 - 26192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26192 - 26208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26208 - 26224 */ - 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, /* bytes 26224 - 26240 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 26240 - 26256 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x14, /* bytes 26256 - 26272 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x44, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, /* bytes 26272 - 26288 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x44, /* bytes 26288 - 26304 */ - 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 26304 - 26320 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 26320 - 26336 */ - 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, /* bytes 26336 - 26352 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 26352 - 26368 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 26368 - 26384 */ - 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 26384 - 26400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26400 - 26416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26416 - 26432 */ - 0x00, 0x00, 0x40, 0x00, 0x10, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x04, 0x40, 0x00, /* bytes 26432 - 26448 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, /* bytes 26448 - 26464 */ - 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x40, 0x00, /* bytes 26464 - 26480 */ - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26480 - 26496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26496 - 26512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26512 - 26528 */ - 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26528 - 26544 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26544 - 26560 */ - 0x00, 0x00, 0x40, 0x00, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 26560 - 26576 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 26576 - 26592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26592 - 26608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26608 - 26624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26624 - 26640 */ - 0x00, 0x10, 0x00, 0x44, 0x00, 0x50, 0x40, 0x10, 0x00, 0x54, 0x00, 0x14, 0x00, 0x50, 0x00, 0x40, /* bytes 26640 - 26656 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 26656 - 26672 */ - 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, /* bytes 26672 - 26688 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 26688 - 26704 */ - 0x00, 0x10, 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 26704 - 26720 */ - 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x54, 0x00, 0x40, /* bytes 26720 - 26736 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 26736 - 26752 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 26752 - 26768 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, /* bytes 26768 - 26784 */ - 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, /* bytes 26784 - 26800 */ - 0x00, 0x50, 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26800 - 26816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26816 - 26832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26832 - 26848 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x00, /* bytes 26848 - 26864 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 26864 - 26880 */ - 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, /* bytes 26880 - 26896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 26896 - 26912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26912 - 26928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26928 - 26944 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 26944 - 26960 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 26960 - 26976 */ - 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x44, 0x00, /* bytes 26976 - 26992 */ - 0x40, 0x04, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 26992 - 27008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27008 - 27024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27024 - 27040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27040 - 27056 */ - 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, /* bytes 27056 - 27072 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 27072 - 27088 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x40, /* bytes 27088 - 27104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 27104 - 27120 */ - 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, /* bytes 27120 - 27136 */ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, /* bytes 27136 - 27152 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, /* bytes 27152 - 27168 */ - 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 27168 - 27184 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 27184 - 27200 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x04, 0x00, 0x40, /* bytes 27200 - 27216 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 27216 - 27232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27232 - 27248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27248 - 27264 */ - 0x00, 0x00, 0x00, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x04, 0x40, 0x40, 0x44, 0x04, 0x40, 0x04, /* bytes 27264 - 27280 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, /* bytes 27280 - 27296 */ - 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, /* bytes 27296 - 27312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27312 - 27328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27328 - 27344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27344 - 27360 */ - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x04, /* bytes 27360 - 27376 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 27376 - 27392 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 27392 - 27408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27408 - 27424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27424 - 27440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27440 - 27456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27456 - 27472 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x54, 0x40, 0x14, 0x00, 0x54, 0x00, 0x14, 0x00, 0x50, 0x00, 0x40, /* bytes 27472 - 27488 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 27488 - 27504 */ - 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x00, 0x10, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x00, /* bytes 27504 - 27520 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 27520 - 27536 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 27536 - 27552 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x50, 0x00, 0x04, /* bytes 27552 - 27568 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x40, /* bytes 27568 - 27584 */ - 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, /* bytes 27584 - 27600 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x04, /* bytes 27600 - 27616 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, /* bytes 27616 - 27632 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27632 - 27648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27648 - 27664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27664 - 27680 */ - 0x00, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x00, 0x40, 0x04, 0x10, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 27680 - 27696 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x04, /* bytes 27696 - 27712 */ - 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27712 - 27728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27728 - 27744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27744 - 27760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27760 - 27776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, /* bytes 27776 - 27792 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x04, 0x44, 0x00, 0x00, 0x00, 0x44, 0x00, /* bytes 27792 - 27808 */ - 0x04, 0x00, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27808 - 27824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27824 - 27840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27840 - 27856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27856 - 27872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27872 - 27888 */ - 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, /* bytes 27888 - 27904 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 27904 - 27920 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 27920 - 27936 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 27936 - 27952 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 27952 - 27968 */ - 0x00, 0x04, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 27968 - 27984 */ - 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 27984 - 28000 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 28000 - 28016 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, /* bytes 28016 - 28032 */ - 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 28032 - 28048 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 28048 - 28064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28064 - 28080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28080 - 28096 */ - 0x00, 0x40, 0x10, 0x40, 0x10, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x44, 0x04, 0x40, 0x40, /* bytes 28096 - 28112 */ - 0x44, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, /* bytes 28112 - 28128 */ - 0x10, 0x00, 0x44, 0x40, 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28128 - 28144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28144 - 28160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28160 - 28176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28176 - 28192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 28192 - 28208 */ - 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 28208 - 28224 */ - 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28224 - 28240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28240 - 28256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28256 - 28272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28272 - 28288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28288 - 28304 */ - 0x00, 0x54, 0x40, 0x14, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x04, 0x14, /* bytes 28304 - 28320 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 28320 - 28336 */ - 0x00, 0x10, 0x04, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 28336 - 28352 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 28352 - 28368 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 28368 - 28384 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 28384 - 28400 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, /* bytes 28400 - 28416 */ - 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, /* bytes 28416 - 28432 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 28432 - 28448 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 28448 - 28464 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28464 - 28480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28480 - 28496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28496 - 28512 */ - 0x00, 0x40, 0x14, 0x04, 0x40, 0x40, 0x40, 0x00, 0x00, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x04, /* bytes 28512 - 28528 */ - 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x44, 0x00, 0x40, 0x04, 0x10, 0x04, /* bytes 28528 - 28544 */ - 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28544 - 28560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28560 - 28576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28576 - 28592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28592 - 28608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28608 - 28624 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 28624 - 28640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28640 - 28656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28656 - 28672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28672 - 28688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28688 - 28704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28704 - 28720 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x54, 0x04, 0x50, 0x00, 0x50, /* bytes 28720 - 28736 */ - 0x04, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, /* bytes 28736 - 28752 */ - 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 28752 - 28768 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 28768 - 28784 */ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, /* bytes 28784 - 28800 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, /* bytes 28800 - 28816 */ - 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 28816 - 28832 */ - 0x00, 0x44, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 28832 - 28848 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, /* bytes 28848 - 28864 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 28864 - 28880 */ - 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 28880 - 28896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28896 - 28912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28912 - 28928 */ - 0x00, 0x00, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, /* bytes 28928 - 28944 */ - 0x10, 0x40, 0x40, 0x00, 0x00, 0x00, 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, /* bytes 28944 - 28960 */ - 0x40, 0x00, 0x40, 0x40, 0x44, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28960 - 28976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28976 - 28992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28992 - 29008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29008 - 29024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29024 - 29040 */ - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29040 - 29056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29056 - 29072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29072 - 29088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29088 - 29104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29104 - 29120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29120 - 29136 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x04, 0x50, /* bytes 29136 - 29152 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 29152 - 29168 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 29168 - 29184 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 29184 - 29200 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 29200 - 29216 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x04, /* bytes 29216 - 29232 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x00, /* bytes 29232 - 29248 */ - 0x00, 0x14, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, /* bytes 29248 - 29264 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 29264 - 29280 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 29280 - 29296 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29296 - 29312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29312 - 29328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29328 - 29344 */ - 0x00, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, 0x14, 0x04, 0x50, 0x40, 0x14, 0x40, /* bytes 29344 - 29360 */ - 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x04, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, /* bytes 29360 - 29376 */ - 0x40, 0x40, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29376 - 29392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29392 - 29408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29408 - 29424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29424 - 29440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 29440 - 29456 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29456 - 29472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29472 - 29488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29488 - 29504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29504 - 29520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29520 - 29536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29536 - 29552 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, /* bytes 29552 - 29568 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 29568 - 29584 */ - 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, /* bytes 29584 - 29600 */ - 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 29600 - 29616 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 29616 - 29632 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, /* bytes 29632 - 29648 */ - 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, /* bytes 29648 - 29664 */ - 0x00, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, /* bytes 29664 - 29680 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 29680 - 29696 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, /* bytes 29696 - 29712 */ - 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 29712 - 29728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29728 - 29744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29744 - 29760 */ - 0x00, 0x00, 0x40, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, /* bytes 29760 - 29776 */ - 0x40, 0x04, 0x40, 0x00, 0x40, 0x40, 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 29776 - 29792 */ - 0x40, 0x00, 0x40, 0x40, 0x44, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29792 - 29808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29808 - 29824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29824 - 29840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29840 - 29856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29856 - 29872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29872 - 29888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29888 - 29904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29904 - 29920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29920 - 29936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29936 - 29952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29952 - 29968 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x04, 0x14, 0x00, 0x50, 0x00, 0x10, /* bytes 29968 - 29984 */ - 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 29984 - 30000 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 30000 - 30016 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 30016 - 30032 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 30032 - 30048 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 30048 - 30064 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, /* bytes 30064 - 30080 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 30080 - 30096 */ - 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 30096 - 30112 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 30112 - 30128 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30128 - 30144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30144 - 30160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30160 - 30176 */ - 0x00, 0x00, 0x40, 0x00, 0x40, 0x44, 0x10, 0x04, 0x40, 0x40, 0x14, 0x04, 0x40, 0x40, 0x50, 0x04, /* bytes 30176 - 30192 */ - 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 30192 - 30208 */ - 0x40, 0x40, 0x10, 0x04, 0x40, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30208 - 30224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30224 - 30240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30240 - 30256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30256 - 30272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30272 - 30288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30288 - 30304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30304 - 30320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30320 - 30336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30336 - 30352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30352 - 30368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30368 - 30384 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x04, 0x14, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 30384 - 30400 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 30400 - 30416 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 30416 - 30432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 30432 - 30448 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 30448 - 30464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 30464 - 30480 */ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, /* bytes 30480 - 30496 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 30496 - 30512 */ - 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 30512 - 30528 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 30528 - 30544 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 30544 - 30560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30560 - 30576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30576 - 30592 */ - 0x00, 0x04, 0x00, 0x00, 0x44, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, /* bytes 30592 - 30608 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x44, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 30608 - 30624 */ - 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30624 - 30640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30640 - 30656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30656 - 30672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30672 - 30688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30688 - 30704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30704 - 30720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30720 - 30736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30736 - 30752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30752 - 30768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x00, 0x54, 0x40, 0x40, 0x00, 0x54, 0x40, 0x54, + 0x00, 0x54, 0x50, 0x50, 0x00, 0x54, 0x54, 0xa8, /* bytes 16 - 32 */ + 0x50, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xa8, 0xf0, 0x54, 0x54, 0xc0, 0xf0, 0xa8, 0xa8, /* bytes 32 - 48 */ + 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xf0, 0x54, 0xa8, + 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x44, 0x54, /* bytes 48 - 64 */ + 0x00, 0x54, 0x04, 0x14, 0x00, 0x54, 0x04, 0x50, + 0x00, 0x54, 0x04, 0x54, 0x00, 0x54, 0x40, 0x50, /* bytes 64 - 80 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x00, 0x10, /* bytes 80 - 96 */ + 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x00, 0x44, + 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, 0x00, 0x10, /* bytes 96 - 112 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x00, /* bytes 112 - 128 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 128 - 144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ + 0x00, 0x40, 0x40, 0x00, 0x14, 0x14, 0x50, 0x14, + 0x50, 0x54, 0x54, 0x40, 0x50, 0x54, 0xa8, 0x50, /* bytes 224 - 240 */ + 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 240 - 256 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x14, /* bytes 256 - 272 */ + 0x50, 0x50, 0x50, 0x00, 0x40, 0x10, 0x50, 0x40, + 0x50, 0x10, 0x54, 0x14, 0x50, 0x10, 0x50, 0x40, /* bytes 272 - 288 */ + 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x04, + 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x04, /* bytes 288 - 304 */ + 0x44, 0x40, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x40, 0x44, 0x00, 0x40, 0x04, 0x44, 0x00, /* bytes 304 - 320 */ + 0x04, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x04, + 0x40, 0x40, 0x10, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 320 - 336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 336 - 352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 352 - 368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 368 - 384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ + 0x00, 0x40, 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, + 0x50, 0x54, 0x40, 0x50, 0x50, 0xa8, 0x50, 0x54, /* bytes 432 - 448 */ + 0x00, 0x10, 0x40, 0x54, 0x44, 0xa8, 0x54, 0xf0, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 448 - 464 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, + 0xa8, 0xa8, 0x54, 0x54, 0x44, 0x54, 0x54, 0x54, /* bytes 464 - 480 */ + 0x50, 0x54, 0x00, 0x54, 0x04, 0x50, 0x04, 0x54, + 0x04, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 480 - 496 */ + 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 496 - 512 */ + 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, /* bytes 512 - 528 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x54, 0x40, 0x14, 0x00, 0x14, /* bytes 528 - 544 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, /* bytes 544 - 560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 560 - 576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 576 - 592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 608 - 624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ + 0x00, 0x00, 0x40, 0x10, 0x50, 0x50, 0x54, 0x50, + 0x54, 0x50, 0x50, 0x14, 0x54, 0x54, 0x54, 0x50, /* bytes 640 - 656 */ + 0x10, 0x40, 0x40, 0x40, 0x50, 0x50, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 656 - 672 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 672 - 688 */ + 0x54, 0x50, 0x14, 0x14, 0x50, 0x10, 0x14, 0x14, + 0x50, 0x10, 0x50, 0x10, 0x54, 0x10, 0x14, 0x44, /* bytes 688 - 704 */ + 0x10, 0x40, 0x14, 0x40, 0x10, 0x40, 0x10, 0x44, + 0x14, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, /* bytes 704 - 720 */ + 0x14, 0x40, 0x10, 0x40, 0x14, 0x40, 0x10, 0x40, + 0x10, 0x00, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, /* bytes 720 - 736 */ + 0x40, 0x04, 0x40, 0x40, 0x44, 0x04, 0x00, 0x00, + 0x40, 0x00, 0x40, 0x40, 0x54, 0x44, 0x50, 0x10, /* bytes 736 - 752 */ + 0x14, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 752 - 768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 768 - 784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 784 - 800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ + 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x50, 0x54, + 0xc0, 0x54, 0x40, 0x54, 0x50, 0xf0, 0x50, 0x54, /* bytes 848 - 864 */ + 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x50, 0x54, + 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 864 - 880 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xf0, + 0xa8, 0xfc, 0xa8, 0xa8, 0x40, 0x54, 0x54, 0x54, /* bytes 880 - 896 */ + 0x50, 0x54, 0x10, 0x54, 0x40, 0x54, 0x44, 0x54, + 0x04, 0x54, 0x04, 0x54, 0x40, 0x54, 0x44, 0x54, /* bytes 896 - 912 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x00, 0x14, + 0x00, 0x50, 0x44, 0x50, 0x00, 0x54, 0x44, 0x54, /* bytes 912 - 928 */ + 0x04, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x14, + 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x04, 0x14, /* bytes 928 - 944 */ + 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x04, 0x50, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x40, 0x54, /* bytes 944 - 960 */ + 0x40, 0x54, 0x40, 0x54, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 960 - 976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, /* bytes 976 - 992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 992 - 1008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1008 - 1024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ + 0x00, 0x40, 0x10, 0x44, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, /* bytes 1056 - 1072 */ + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x54, 0x54, + 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 1072 - 1088 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xfc, 0xfc, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 1088 - 1104 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x44, + 0x14, 0x50, 0x54, 0x44, 0x54, 0x54, 0x54, 0x10, /* bytes 1104 - 1120 */ + 0x10, 0x14, 0x54, 0x40, 0x10, 0x44, 0x10, 0x00, + 0x40, 0x40, 0x14, 0x40, 0x10, 0x50, 0x54, 0x54, /* bytes 1120 - 1136 */ + 0x54, 0x54, 0x54, 0x14, 0x54, 0x14, 0x50, 0x44, + 0x14, 0x14, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, /* bytes 1136 - 1152 */ + 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x44, 0x14, 0x40, 0x10, 0x04, /* bytes 1152 - 1168 */ + 0x14, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x40, + 0x44, 0x40, 0x40, 0x00, 0x40, 0x40, 0x10, 0x04, /* bytes 1168 - 1184 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1184 - 1200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1200 - 1216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1248 - 1264 */ + 0x00, 0x50, 0x00, 0x50, 0x50, 0x54, 0x50, 0xa8, + 0x54, 0x54, 0x50, 0xa8, 0x54, 0xa8, 0x54, 0xf0, /* bytes 1264 - 1280 */ + 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0xf0, + 0x54, 0xa8, 0x50, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, /* bytes 1280 - 1296 */ + 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0x54, 0x50, 0x54, /* bytes 1296 - 1312 */ + 0x54, 0x54, 0x50, 0x54, 0x14, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 1312 - 1328 */ + 0x44, 0x54, 0x40, 0x54, 0x04, 0x50, 0x00, 0x54, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, /* bytes 1328 - 1344 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 1344 - 1360 */ + 0x44, 0x54, 0x44, 0x54, 0x50, 0x54, 0x50, 0x54, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x44, 0x54, /* bytes 1360 - 1376 */ + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x50, 0x54, + 0x44, 0x54, 0x40, 0x50, 0x04, 0x14, 0x04, 0x50, /* bytes 1376 - 1392 */ + 0x04, 0x54, 0x40, 0x54, 0x00, 0x50, 0x00, 0x54, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x40, 0x00, 0x00, /* bytes 1392 - 1408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1408 - 1424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ + 0x00, 0x44, 0x40, 0x40, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 1472 - 1488 */ + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 1488 - 1504 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 1504 - 1520 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x10, 0x44, + 0x14, 0x10, 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, /* bytes 1520 - 1536 */ + 0x54, 0x10, 0x50, 0x14, 0x50, 0x44, 0x14, 0x40, + 0x10, 0x40, 0x44, 0x00, 0x10, 0x40, 0x10, 0x40, /* bytes 1536 - 1552 */ + 0x50, 0x44, 0x50, 0x40, 0x10, 0x44, 0x10, 0x44, + 0x10, 0x44, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, /* bytes 1552 - 1568 */ + 0x10, 0x40, 0x10, 0x40, 0x10, 0x04, 0x14, 0x44, + 0x50, 0x14, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 1568 - 1584 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, 0x14, /* bytes 1584 - 1600 */ + 0x50, 0x10, 0x50, 0x50, 0x54, 0x50, 0x50, 0x40, + 0x50, 0x40, 0x10, 0x44, 0x50, 0x00, 0x04, 0x00, /* bytes 1600 - 1616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1616 - 1632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1648 - 1664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ + 0x00, 0x54, 0x40, 0x10, 0x40, 0xf0, 0x54, 0x54, + 0xc0, 0x54, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 1680 - 1696 */ + 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xf0, + 0xa8, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 1696 - 1712 */ + 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0x10, 0x54, /* bytes 1712 - 1728 */ + 0x44, 0x54, 0x54, 0x54, 0x40, 0x54, 0x00, 0x10, + 0x04, 0x54, 0x44, 0x54, 0x00, 0x54, 0x14, 0x54, /* bytes 1728 - 1744 */ + 0x40, 0x54, 0x40, 0x54, 0x00, 0x54, 0x04, 0x14, + 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x04, 0x50, /* bytes 1744 - 1760 */ + 0x00, 0x54, 0x40, 0x14, 0x00, 0x54, 0x00, 0x14, + 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, /* bytes 1760 - 1776 */ + 0x00, 0x54, 0x00, 0x50, 0x00, 0x50, 0x40, 0x10, + 0x00, 0x54, 0x44, 0x54, 0x40, 0x54, 0x54, 0x54, /* bytes 1776 - 1792 */ + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, /* bytes 1792 - 1808 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, + 0x00, 0x54, 0x04, 0x54, 0x00, 0x54, 0x04, 0x54, /* bytes 1808 - 1824 */ + 0x40, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, /* bytes 1824 - 1840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ + 0x00, 0x54, 0x50, 0x40, 0x50, 0x54, 0x54, 0x54, + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 1888 - 1904 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 1904 - 1920 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x50, /* bytes 1920 - 1936 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x40, + 0x14, 0x14, 0x54, 0x44, 0x50, 0x50, 0x54, 0x50, /* bytes 1936 - 1952 */ + 0x50, 0x14, 0x54, 0x44, 0x14, 0x10, 0x50, 0x40, + 0x44, 0x40, 0x10, 0x40, 0x44, 0x44, 0x50, 0x00, /* bytes 1952 - 1968 */ + 0x10, 0x04, 0x14, 0x40, 0x10, 0x40, 0x10, 0x40, + 0x14, 0x14, 0x50, 0x44, 0x50, 0x50, 0x54, 0x44, /* bytes 1968 - 1984 */ + 0x50, 0x50, 0x54, 0x44, 0x50, 0x50, 0x54, 0x44, + 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 1984 - 2000 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2000 - 2016 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, /* bytes 2016 - 2032 */ + 0x54, 0x50, 0x50, 0x40, 0x40, 0x00, 0x40, 0x00, + 0x04, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2032 - 2048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2048 - 2064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ + 0x00, 0x54, 0x04, 0x50, 0x40, 0x54, 0x50, 0x54, + 0x50, 0xa8, 0x54, 0xf0, 0x54, 0xf0, 0x54, 0xa8, /* bytes 2096 - 2112 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xf0, 0x54, 0xf0, 0x50, 0x54, 0x54, 0xf0, /* bytes 2112 - 2128 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x44, 0x54, /* bytes 2128 - 2144 */ + 0x44, 0x54, 0x44, 0x54, 0x14, 0x54, 0x04, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 2144 - 2160 */ + 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, 0x04, 0x54, + 0x40, 0x50, 0x00, 0x50, 0x04, 0x50, 0x40, 0x54, /* bytes 2160 - 2176 */ + 0x00, 0x50, 0x00, 0x14, 0x40, 0x50, 0x00, 0x54, + 0x40, 0x54, 0x04, 0x54, 0x40, 0x54, 0x00, 0x54, /* bytes 2176 - 2192 */ + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x50, 0x54, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 2192 - 2208 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2208 - 2224 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 2224 - 2240 */ + 0x54, 0x54, 0x14, 0x54, 0x04, 0x54, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x00, /* bytes 2240 - 2256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2288 - 2304 */ + 0x00, 0x50, 0x10, 0x40, 0x50, 0x54, 0x54, 0x54, + 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2304 - 2320 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0xa8, 0xa8, /* bytes 2320 - 2336 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, + 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x14, /* bytes 2336 - 2352 */ + 0x50, 0x14, 0x50, 0x50, 0x54, 0x14, 0x50, 0x10, + 0x50, 0x10, 0x50, 0x14, 0x54, 0x50, 0x54, 0x50, /* bytes 2352 - 2368 */ + 0x50, 0x10, 0x50, 0x14, 0x14, 0x44, 0x14, 0x44, + 0x10, 0x40, 0x10, 0x40, 0x14, 0x40, 0x10, 0x40, /* bytes 2368 - 2384 */ + 0x10, 0x40, 0x10, 0x40, 0x14, 0x44, 0x14, 0x44, + 0x50, 0x44, 0x14, 0x10, 0x14, 0x40, 0x14, 0x04, /* bytes 2384 - 2400 */ + 0x54, 0x04, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 2400 - 2416 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2416 - 2432 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2432 - 2448 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x44, + 0x50, 0x04, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, /* bytes 2448 - 2464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ + 0x00, 0xa8, 0x50, 0x50, 0x40, 0xf0, 0x54, 0xa8, + 0x50, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 2512 - 2528 */ + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0x50, 0xf0, 0xa8, 0xa8, /* bytes 2528 - 2544 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0x50, 0x54, /* bytes 2544 - 2560 */ + 0x00, 0x54, 0x40, 0x54, 0x04, 0x54, 0x44, 0x54, + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x14, 0x54, /* bytes 2560 - 2576 */ + 0x00, 0x54, 0x40, 0x54, 0x04, 0x54, 0x40, 0x50, + 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x00, 0x50, /* bytes 2576 - 2592 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x04, 0x14, + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x04, 0x50, /* bytes 2592 - 2608 */ + 0x00, 0x54, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0x54, 0xf0, 0x54, 0xa8, 0x50, 0xf0, 0x50, 0x54, /* bytes 2608 - 2624 */ + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x50, 0x54, + 0x44, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 2624 - 2640 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2640 - 2656 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, + 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x00, 0x10, /* bytes 2656 - 2672 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2688 - 2704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ + 0x00, 0x54, 0xa8, 0x50, 0x50, 0x50, 0xa8, 0x54, + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 2720 - 2736 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2736 - 2752 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x10, /* bytes 2752 - 2768 */ + 0x50, 0x50, 0x54, 0x10, 0x50, 0x50, 0x54, 0x14, + 0x50, 0x50, 0x54, 0x44, 0x50, 0x50, 0x54, 0x44, /* bytes 2768 - 2784 */ + 0x50, 0x10, 0x50, 0x44, 0x14, 0x14, 0x50, 0x40, + 0x10, 0x40, 0x10, 0x40, 0x10, 0x44, 0x50, 0x40, /* bytes 2784 - 2800 */ + 0x44, 0x04, 0x50, 0x00, 0x40, 0x40, 0x54, 0x04, + 0x04, 0x04, 0x50, 0x00, 0x10, 0x10, 0x50, 0x14, /* bytes 2800 - 2816 */ + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x50, /* bytes 2816 - 2832 */ + 0x54, 0x50, 0x54, 0x50, 0x50, 0x54, 0x54, 0x44, + 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 2832 - 2848 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 2848 - 2864 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0x54, 0x54, 0x54, 0x14, 0x54, 0x50, 0x54, 0x00, /* bytes 2864 - 2880 */ + 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ + 0x00, 0xa8, 0x54, 0x54, 0x40, 0x54, 0x50, 0xf0, + 0x54, 0x54, 0x44, 0x54, 0x50, 0xa8, 0x54, 0xf0, /* bytes 2928 - 2944 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xf0, 0xa8, 0xfc, + 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 2944 - 2960 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x50, 0x54, /* bytes 2960 - 2976 */ + 0x14, 0x54, 0x04, 0x54, 0x44, 0x54, 0x00, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, /* bytes 2976 - 2992 */ + 0x40, 0x50, 0x04, 0x54, 0x04, 0x54, 0x04, 0x50, + 0x04, 0x50, 0x04, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 2992 - 3008 */ + 0x00, 0x54, 0x00, 0x54, 0x04, 0x54, 0x00, 0x50, + 0x00, 0x54, 0x40, 0x54, 0x50, 0x54, 0x54, 0xa8, /* bytes 3008 - 3024 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, /* bytes 3024 - 3040 */ + 0x54, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, 0x54, 0x54, + 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0x54, 0x44, 0xa8, /* bytes 3040 - 3056 */ + 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 3056 - 3072 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, /* bytes 3072 - 3088 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3088 - 3104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ + 0x00, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3136 - 3152 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3152 - 3168 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, /* bytes 3168 - 3184 */ + 0x54, 0x54, 0x54, 0x54, 0x50, 0x40, 0x14, 0x10, + 0x50, 0x50, 0x50, 0x50, 0x54, 0x14, 0x50, 0x14, /* bytes 3184 - 3200 */ + 0x50, 0x44, 0x14, 0x44, 0x50, 0x40, 0x10, 0x44, + 0x14, 0x44, 0x14, 0x40, 0x50, 0x44, 0x50, 0x14, /* bytes 3200 - 3216 */ + 0x50, 0x10, 0x14, 0x50, 0x50, 0x44, 0x54, 0x44, + 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3216 - 3232 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3232 - 3248 */ + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x50, /* bytes 3248 - 3264 */ + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3264 - 3280 */ + 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 3280 - 3296 */ + 0x54, 0x54, 0x54, 0x10, 0x50, 0x04, 0x50, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3328 - 3344 */ + 0x00, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x50, 0x54, + 0xc0, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0xa8, 0xa8, /* bytes 3344 - 3360 */ + 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0xa8, /* bytes 3360 - 3376 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 3376 - 3392 */ + 0x50, 0x54, 0x10, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x00, 0x54, 0x10, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 3392 - 3408 */ + 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x14, + 0x00, 0x54, 0x40, 0x50, 0x00, 0x14, 0x04, 0x54, /* bytes 3408 - 3424 */ + 0x00, 0x54, 0x40, 0x54, 0x00, 0x54, 0x04, 0x54, + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3424 - 3440 */ + 0xa8, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 3440 - 3456 */ + 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0x54, /* bytes 3456 - 3472 */ + 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 3472 - 3488 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 3488 - 3504 */ + 0x54, 0x54, 0x54, 0x54, 0x00, 0x54, 0x04, 0x50, + 0x00, 0x50, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, /* bytes 3504 - 3520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3520 - 3536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3536 - 3552 */ + 0x00, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x50, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 3552 - 3568 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3568 - 3584 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3584 - 3600 */ + 0xa8, 0x54, 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x10, 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, /* bytes 3600 - 3616 */ + 0x10, 0x44, 0x50, 0x40, 0x10, 0x44, 0x50, 0x04, + 0x44, 0x40, 0x50, 0x44, 0x14, 0x44, 0x10, 0x04, /* bytes 3616 - 3632 */ + 0x14, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3632 - 3648 */ + 0xa8, 0xa8, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3648 - 3664 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 3664 - 3680 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3680 - 3696 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 3696 - 3712 */ + 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, + 0x50, 0x04, 0x50, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 3712 - 3728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3728 - 3744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3744 - 3760 */ + 0x00, 0xf0, 0x50, 0x54, 0x54, 0xa8, 0x44, 0x54, + 0x44, 0x54, 0x50, 0xa8, 0x50, 0xa8, 0xa8, 0xfc, /* bytes 3760 - 3776 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 3776 - 3792 */ + 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 3792 - 3808 */ + 0xa8, 0xa8, 0x50, 0x54, 0x44, 0x54, 0x54, 0xa8, + 0x54, 0x54, 0x44, 0x54, 0x50, 0x54, 0x14, 0x54, /* bytes 3808 - 3824 */ + 0x44, 0x50, 0x04, 0x50, 0x40, 0x50, 0x04, 0x54, + 0x00, 0x14, 0x04, 0x54, 0x04, 0x14, 0x40, 0x54, /* bytes 3824 - 3840 */ + 0x40, 0x50, 0x00, 0x54, 0x40, 0x54, 0x54, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, /* bytes 3840 - 3856 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 3856 - 3872 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, + 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3872 - 3888 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xf0, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 3888 - 3904 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 3904 - 3920 */ + 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x50, 0x54, + 0x04, 0x54, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, /* bytes 3920 - 3936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3936 - 3952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3952 - 3968 */ + 0x00, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 3968 - 3984 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 3984 - 4000 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 4000 - 4016 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 4016 - 4032 */ + 0x54, 0x44, 0x10, 0x40, 0x10, 0x04, 0x10, 0x40, + 0x10, 0x40, 0x10, 0x40, 0x14, 0x40, 0x50, 0x50, /* bytes 4032 - 4048 */ + 0x54, 0x10, 0x50, 0x14, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4048 - 4064 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, + 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4064 - 4080 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4080 - 4096 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4096 - 4112 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4112 - 4128 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, + 0x54, 0x50, 0x50, 0x10, 0x54, 0x00, 0x00, 0x00, /* bytes 4128 - 4144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4144 - 4160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4160 - 4176 */ + 0x00, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x54, 0xa8, + 0x44, 0xf0, 0x54, 0x54, 0x40, 0xa8, 0x54, 0xa8, /* bytes 4176 - 4192 */ + 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0x54, 0x50, 0xa8, + 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, /* bytes 4192 - 4208 */ + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 4208 - 4224 */ + 0xa8, 0xfc, 0xa8, 0x54, 0x40, 0x54, 0x14, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, /* bytes 4224 - 4240 */ + 0x40, 0x54, 0x44, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x44, 0x54, /* bytes 4240 - 4256 */ + 0x04, 0x54, 0x10, 0x54, 0x44, 0xf0, 0x54, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 4256 - 4272 */ + 0xc0, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 4272 - 4288 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 4288 - 4304 */ + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 4304 - 4320 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 4320 - 4336 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, + 0x54, 0xa8, 0x14, 0x54, 0x00, 0x00, 0x00, 0x00, /* bytes 4336 - 4352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4352 - 4368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4368 - 4384 */ + 0x00, 0x10, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, + 0x50, 0x54, 0x54, 0x44, 0x50, 0x54, 0xa8, 0x54, /* bytes 4384 - 4400 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, /* bytes 4400 - 4416 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4416 - 4432 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x10, 0x50, 0x44, + 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 4432 - 4448 */ + 0x54, 0x54, 0x54, 0x44, 0x10, 0x40, 0x14, 0x44, + 0x14, 0x14, 0x54, 0x40, 0x50, 0x50, 0x54, 0x50, /* bytes 4448 - 4464 */ + 0x54, 0x54, 0x54, 0x14, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4464 - 4480 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4480 - 4496 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 4496 - 4512 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4512 - 4528 */ + 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, /* bytes 4528 - 4544 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x00, 0x00, 0x00, /* bytes 4544 - 4560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4560 - 4576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4576 - 4592 */ + 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x44, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x50, 0x54, 0x50, 0x54, /* bytes 4592 - 4608 */ + 0x50, 0x54, 0x44, 0x54, 0x54, 0x54, 0x50, 0x54, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 4608 - 4624 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, /* bytes 4624 - 4640 */ + 0xa8, 0xa8, 0x54, 0xa8, 0x44, 0x50, 0x00, 0x50, + 0x40, 0x54, 0x40, 0x54, 0x14, 0x54, 0x54, 0x54, /* bytes 4640 - 4656 */ + 0x54, 0x54, 0x50, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x50, 0x54, 0x04, 0x54, /* bytes 4656 - 4672 */ + 0x44, 0x54, 0x50, 0x54, 0x50, 0xa8, 0xc0, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4672 - 4688 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 4688 - 4704 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 4704 - 4720 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 4720 - 4736 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 4736 - 4752 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x00, 0x00, 0x00, /* bytes 4752 - 4768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4768 - 4784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4784 - 4800 */ + 0x00, 0x10, 0x50, 0x50, 0x54, 0x54, 0x50, 0x44, + 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, /* bytes 4800 - 4816 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 4816 - 4832 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4832 - 4848 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x40, 0x44, 0x40, + 0x14, 0x04, 0x50, 0x44, 0x50, 0x14, 0x54, 0x54, /* bytes 4848 - 4864 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x14, 0x50, 0x14, + 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 4864 - 4880 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4880 - 4896 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4896 - 4912 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 4912 - 4928 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 4928 - 4944 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, + 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, /* bytes 4944 - 4960 */ + 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 4960 - 4976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4976 - 4992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4992 - 5008 */ + 0x00, 0x54, 0x44, 0x54, 0x54, 0x54, 0x40, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x50, 0x54, /* bytes 5008 - 5024 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, + 0x54, 0xf0, 0x54, 0xa8, 0x50, 0xf0, 0x54, 0xa8, /* bytes 5024 - 5040 */ + 0x54, 0xf0, 0x54, 0xa8, 0x50, 0x54, 0x50, 0x54, + 0x54, 0xf0, 0x54, 0xa8, 0x50, 0xf0, 0xa8, 0xa8, /* bytes 5040 - 5056 */ + 0x54, 0xf0, 0x54, 0xa8, 0x50, 0x54, 0x00, 0x10, + 0x00, 0x54, 0x40, 0x14, 0x00, 0x54, 0x44, 0x54, /* bytes 5056 - 5072 */ + 0x54, 0xa8, 0x54, 0x54, 0x40, 0x54, 0x50, 0x54, + 0x44, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5072 - 5088 */ + 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5088 - 5104 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 5104 - 5120 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5120 - 5136 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5136 - 5152 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5152 - 5168 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 5168 - 5184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5184 - 5200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5200 - 5216 */ + 0x00, 0x10, 0x50, 0x50, 0x54, 0x14, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, /* bytes 5216 - 5232 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0x54, + 0x54, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 5232 - 5248 */ + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, /* bytes 5248 - 5264 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x50, 0x10, 0x00, + 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x50, 0x10, /* bytes 5264 - 5280 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 5280 - 5296 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5296 - 5312 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 5312 - 5328 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5328 - 5344 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 5344 - 5360 */ + 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 5360 - 5376 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, + 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 5376 - 5392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5392 - 5408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5408 - 5424 */ + 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, 0x50, 0xa8, + 0x54, 0x54, 0x44, 0x54, 0x54, 0x54, 0x54, 0xa8, /* bytes 5424 - 5440 */ + 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5440 - 5456 */ + 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, + 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 5456 - 5472 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x04, 0x50, + 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, /* bytes 5472 - 5488 */ + 0x14, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, /* bytes 5488 - 5504 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 5504 - 5520 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5520 - 5536 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5536 - 5552 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 5552 - 5568 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 5568 - 5584 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0x00, 0x00, 0x00, /* bytes 5584 - 5600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5600 - 5616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5616 - 5632 */ + 0x00, 0x54, 0x50, 0x40, 0x50, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 5632 - 5648 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 5648 - 5664 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 5664 - 5680 */ + 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0x54, 0x44, + 0x40, 0x00, 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, /* bytes 5680 - 5696 */ + 0x50, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5696 - 5712 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5712 - 5728 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5728 - 5744 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5744 - 5760 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5760 - 5776 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 5776 - 5792 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, + 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0x00, 0x00, 0x00, /* bytes 5792 - 5808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5808 - 5824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5824 - 5840 */ + 0x00, 0xf0, 0x54, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x40, 0x54, 0x54, 0x54, 0x50, 0xf0, 0x54, 0x54, /* bytes 5840 - 5856 */ + 0x50, 0xa8, 0x54, 0x54, 0x40, 0x54, 0x44, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x50, 0xa8, 0x54, 0xa8, /* bytes 5856 - 5872 */ + 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 5872 - 5888 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x54, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x14, /* bytes 5888 - 5904 */ + 0x04, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 5904 - 5920 */ + 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 5920 - 5936 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0xa8, /* bytes 5936 - 5952 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 5952 - 5968 */ + 0x54, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 5968 - 5984 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 5984 - 6000 */ + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0x00, 0x00, 0x00, /* bytes 6000 - 6016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6016 - 6032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6032 - 6048 */ + 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 6048 - 6064 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 6064 - 6080 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6080 - 6096 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0x54, 0x04, 0x50, 0x40, 0x40, 0x04, /* bytes 6096 - 6112 */ + 0x14, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6112 - 6128 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6128 - 6144 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 6144 - 6160 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 6160 - 6176 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6176 - 6192 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6192 - 6208 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, + 0x54, 0xa8, 0xfc, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 6208 - 6224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6224 - 6240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6240 - 6256 */ + 0x00, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, + 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x54, 0x50, 0x54, /* bytes 6256 - 6272 */ + 0x54, 0xa8, 0x50, 0x54, 0x40, 0x54, 0x44, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 6272 - 6288 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, /* bytes 6288 - 6304 */ + 0xa8, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0x44, 0x54, /* bytes 6304 - 6320 */ + 0x44, 0x54, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 6320 - 6336 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 6336 - 6352 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 6352 - 6368 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, + 0x54, 0xf0, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 6368 - 6384 */ + 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, + 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 6384 - 6400 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 6400 - 6416 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xa8, + 0x50, 0x54, 0x54, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 6416 - 6432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6432 - 6448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6448 - 6464 */ + 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 6464 - 6480 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 6480 - 6496 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6496 - 6512 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 6512 - 6528 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6528 - 6544 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6544 - 6560 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, + 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 6560 - 6576 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 6576 - 6592 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 6592 - 6608 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6608 - 6624 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 6624 - 6640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6640 - 6656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6656 - 6672 */ + 0x00, 0xa8, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 6672 - 6688 */ + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x50, 0xf0, 0x54, 0x54, /* bytes 6688 - 6704 */ + 0x50, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 6704 - 6720 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 6720 - 6736 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 6736 - 6752 */ + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 6752 - 6768 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 6768 - 6784 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 6784 - 6800 */ + 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, /* bytes 6800 - 6816 */ + 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 6816 - 6832 */ + 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 6832 - 6848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6848 - 6864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6864 - 6880 */ + 0x00, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6880 - 6896 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 6896 - 6912 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6912 - 6928 */ + 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6928 - 6944 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6944 - 6960 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6960 - 6976 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 6976 - 6992 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 6992 - 7008 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 7008 - 7024 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7024 - 7040 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0x54, 0x50, 0x54, 0x00, 0x00, 0x00, /* bytes 7040 - 7056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7056 - 7072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7072 - 7088 */ + 0x00, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xf0, + 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 7088 - 7104 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0x54, 0xfc, 0xa8, 0xfc, 0xfc, 0xfc, /* bytes 7104 - 7120 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x54, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 7120 - 7136 */ + 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 7136 - 7152 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 7152 - 7168 */ + 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 7168 - 7184 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 7184 - 7200 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xf0, 0x54, 0xfc, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7200 - 7216 */ + 0x54, 0xa8, 0xc0, 0x54, 0x40, 0xf0, 0xc0, 0xf0, + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, /* bytes 7216 - 7232 */ + 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, + 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 7232 - 7248 */ + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0x54, 0xa8, 0x50, 0xa8, 0x54, 0x00, 0x00, 0x00, /* bytes 7248 - 7264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7264 - 7280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7280 - 7296 */ + 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7296 - 7312 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7312 - 7328 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xa8, 0x54, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 7328 - 7344 */ + 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7344 - 7360 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7360 - 7376 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7376 - 7392 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 7392 - 7408 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7408 - 7424 */ + 0xfc, 0xa8, 0xa8, 0x54, 0x50, 0x40, 0x50, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 7424 - 7440 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7440 - 7456 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 7456 - 7472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7472 - 7488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7488 - 7504 */ + 0x00, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0x54, 0xa8, /* bytes 7504 - 7520 */ + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 7520 - 7536 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xfc, 0xf0, 0x44, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7536 - 7552 */ + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 7552 - 7568 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 7568 - 7584 */ + 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 7584 - 7600 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 7600 - 7616 */ + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 7616 - 7632 */ + 0xc0, 0xfc, 0xa8, 0xa8, 0xc0, 0x54, 0x00, 0x40, + 0x40, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0xa8, 0xa8, /* bytes 7632 - 7648 */ + 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 7648 - 7664 */ + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xa8, 0xf0, 0x54, 0xa8, 0xc0, 0x00, 0x00, 0x00, /* bytes 7664 - 7680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7680 - 7696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7696 - 7712 */ + 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7712 - 7728 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7728 - 7744 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0x54, 0x50, 0x54, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7744 - 7760 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7760 - 7776 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7776 - 7792 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7792 - 7808 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7808 - 7824 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xc0, /* bytes 7824 - 7840 */ + 0xc0, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0x54, 0x00, + 0x40, 0xc0, 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 7840 - 7856 */ + 0x54, 0x54, 0x54, 0x50, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 7856 - 7872 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 7872 - 7888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7888 - 7904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7904 - 7920 */ + 0x00, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7920 - 7936 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 7936 - 7952 */ + 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0x50, 0x44, 0x54, + 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7952 - 7968 */ + 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 7968 - 7984 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, + 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 7984 - 8000 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 8000 - 8016 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8016 - 8032 */ + 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xf0, 0x54, 0xfc, + 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xa8, /* bytes 8032 - 8048 */ + 0x40, 0x50, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, 0x54, + 0x00, 0x44, 0x40, 0x54, 0x50, 0xa8, 0xc0, 0x54, /* bytes 8048 - 8064 */ + 0x54, 0xa8, 0xc0, 0xa8, 0x50, 0x54, 0xc0, 0xa8, + 0xa8, 0xf0, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, /* bytes 8064 - 8080 */ + 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, + 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x00, 0x00, 0x00, /* bytes 8080 - 8096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8096 - 8112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8112 - 8128 */ + 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8128 - 8144 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8144 - 8160 */ + 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, 0xa8, 0x50, 0x54, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8160 - 8176 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8176 - 8192 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8192 - 8208 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8208 - 8224 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8224 - 8240 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 8240 - 8256 */ + 0x50, 0x00, 0x40, 0x54, 0xfc, 0xa8, 0xa8, 0xa8, + 0x14, 0x00, 0x40, 0x40, 0x54, 0x50, 0x54, 0x54, /* bytes 8256 - 8272 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 8272 - 8288 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 8288 - 8304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8304 - 8320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8320 - 8336 */ + 0x00, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 8336 - 8352 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xc0, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 8352 - 8368 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0x54, 0xf0, 0x50, 0x54, + 0xc0, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8368 - 8384 */ + 0x54, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 8384 - 8400 */ + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, + 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 8400 - 8416 */ + 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 8416 - 8432 */ + 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 8432 - 8448 */ + 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x14, /* bytes 8448 - 8464 */ + 0x00, 0x14, 0x00, 0x54, 0xa8, 0xf0, 0xa8, 0xa8, + 0xc0, 0x10, 0x00, 0x50, 0x40, 0x54, 0xc0, 0x54, /* bytes 8464 - 8480 */ + 0xc0, 0xa8, 0x50, 0x54, 0x40, 0xa8, 0x54, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 8480 - 8496 */ + 0x54, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0x00, 0x00, 0x00, /* bytes 8496 - 8512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8512 - 8528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8528 - 8544 */ + 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8544 - 8560 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8560 - 8576 */ + 0xfc, 0xa8, 0xfc, 0xfc, 0xa8, 0x54, 0xa8, 0x50, + 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 8576 - 8592 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8592 - 8608 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 8608 - 8624 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 8624 - 8640 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8640 - 8656 */ + 0xa8, 0xa8, 0x54, 0x50, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x10, 0x00, /* bytes 8656 - 8672 */ + 0x40, 0x40, 0x40, 0x00, 0x54, 0xa8, 0xa8, 0xa8, + 0xa8, 0x50, 0x00, 0x40, 0x50, 0x50, 0x54, 0x50, /* bytes 8672 - 8688 */ + 0x54, 0x54, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 8688 - 8704 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 8704 - 8720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8720 - 8736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8736 - 8752 */ + 0x00, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 8752 - 8768 */ + 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xfc, /* bytes 8768 - 8784 */ + 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0x54, + 0xc0, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, /* bytes 8784 - 8800 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0x50, 0xa8, 0x54, 0xf0, + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 8800 - 8816 */ + 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, /* bytes 8816 - 8832 */ + 0xa8, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xf0, + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, /* bytes 8832 - 8848 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 8848 - 8864 */ + 0x54, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x00, 0x50, /* bytes 8864 - 8880 */ + 0x00, 0x50, 0x04, 0x10, 0x50, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0x00, 0x40, 0x40, 0x54, 0xc0, 0xa8, /* bytes 8880 - 8896 */ + 0x54, 0xa8, 0x54, 0x54, 0x44, 0x54, 0x44, 0xa8, + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, /* bytes 8896 - 8912 */ + 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, + 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0x00, 0x00, 0x00, /* bytes 8912 - 8928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8928 - 8944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8944 - 8960 */ + 0x00, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8960 - 8976 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 8976 - 8992 */ + 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x44, + 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, /* bytes 8992 - 9008 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9008 - 9024 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 9024 - 9040 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x50, 0x54, 0x54, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9040 - 9056 */ + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 9056 - 9072 */ + 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x14, 0x04, 0x04, /* bytes 9072 - 9088 */ + 0x00, 0x00, 0x10, 0x00, 0x54, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0x50, 0x00, 0x10, 0x50, 0x54, 0x54, /* bytes 9088 - 9104 */ + 0xa8, 0x54, 0xa8, 0x54, 0x50, 0x50, 0x54, 0x54, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9104 - 9120 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 9120 - 9136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9136 - 9152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9152 - 9168 */ + 0x00, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0xa8, + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 9168 - 9184 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 9184 - 9200 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0x50, + 0x40, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, /* bytes 9200 - 9216 */ + 0x54, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 9216 - 9232 */ + 0xc0, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 9232 - 9248 */ + 0xc0, 0xf0, 0xa8, 0xa8, 0x54, 0x54, 0xc0, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 9248 - 9264 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 9264 - 9280 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x50, /* bytes 9280 - 9296 */ + 0x00, 0x40, 0x00, 0x40, 0x40, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x44, 0x00, 0x00, 0x54, 0x50, 0x54, /* bytes 9296 - 9312 */ + 0xc0, 0xf0, 0x50, 0x54, 0x00, 0x54, 0x44, 0x54, + 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 9312 - 9328 */ + 0x54, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 9328 - 9344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9344 - 9360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9360 - 9376 */ + 0x00, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9376 - 9392 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 9392 - 9408 */ + 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x40, + 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, /* bytes 9408 - 9424 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9424 - 9440 */ + 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9440 - 9456 */ + 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x50, + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 9456 - 9472 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9472 - 9488 */ + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x40, 0x00, /* bytes 9488 - 9504 */ + 0x40, 0x00, 0x00, 0x00, 0x50, 0x54, 0x54, 0x50, + 0x54, 0x54, 0x54, 0x00, 0x40, 0x50, 0xa8, 0x50, /* bytes 9504 - 9520 */ + 0x54, 0x54, 0x54, 0x50, 0x50, 0x10, 0x54, 0x50, + 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 9520 - 9536 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, /* bytes 9536 - 9552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9552 - 9568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9568 - 9584 */ + 0x00, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xc0, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 9584 - 9600 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xfc, /* bytes 9600 - 9616 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0x54, 0x50, + 0x44, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 9616 - 9632 */ + 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9632 - 9648 */ + 0xa8, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, + 0x54, 0xf0, 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, /* bytes 9648 - 9664 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, + 0xc0, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, /* bytes 9664 - 9680 */ + 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0x54, 0x54, 0xa8, + 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, /* bytes 9680 - 9696 */ + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x10, /* bytes 9696 - 9712 */ + 0x00, 0x50, 0x00, 0x40, 0x40, 0x54, 0xc0, 0xa8, + 0xc0, 0xa8, 0xc0, 0x50, 0x00, 0x54, 0xc0, 0xa8, /* bytes 9712 - 9728 */ + 0x54, 0xa8, 0x50, 0x54, 0x40, 0x50, 0x44, 0xa8, + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xf0, 0xc0, 0xf0, /* bytes 9728 - 9744 */ + 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x00, 0x00, 0x00, /* bytes 9744 - 9760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9760 - 9776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9776 - 9792 */ + 0x00, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 9792 - 9808 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0x54, 0x54, 0xa8, 0xa8, /* bytes 9808 - 9824 */ + 0xfc, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x40, + 0x44, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, /* bytes 9824 - 9840 */ + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 9840 - 9856 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0x54, 0x50, 0x54, 0xa8, 0xa8, /* bytes 9856 - 9872 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 9872 - 9888 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 9888 - 9904 */ + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x50, 0x44, /* bytes 9904 - 9920 */ + 0x40, 0x00, 0x00, 0x00, 0x50, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x00, 0x44, 0x50, 0x54, 0x54, /* bytes 9920 - 9936 */ + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x40, 0x10, 0x54, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 9936 - 9952 */ + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 9952 - 9968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9968 - 9984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9984 - 10000 */ + 0x00, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, + 0x50, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 10000 - 10016 */ + 0x50, 0xf0, 0x54, 0xa8, 0x54, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, /* bytes 10016 - 10032 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0x54, + 0x00, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 10032 - 10048 */ + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 10048 - 10064 */ + 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xfc, 0xc0, 0x54, 0xc0, 0xa8, /* bytes 10064 - 10080 */ + 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 10080 - 10096 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 10096 - 10112 */ + 0xc0, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x54, 0x44, 0x54, /* bytes 10112 - 10128 */ + 0x00, 0x54, 0x00, 0x40, 0x00, 0x54, 0x44, 0x54, + 0x44, 0xf0, 0x44, 0x40, 0x40, 0xf0, 0x50, 0xa8, /* bytes 10128 - 10144 */ + 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0x54, 0x04, 0x54, + 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 10144 - 10160 */ + 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0x00, 0x00, 0x00, /* bytes 10160 - 10176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10176 - 10192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10192 - 10208 */ + 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 10208 - 10224 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 10224 - 10240 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0x40, 0x40, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 10240 - 10256 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 10256 - 10272 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x40, 0x50, /* bytes 10272 - 10288 */ + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, /* bytes 10288 - 10304 */ + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 10304 - 10320 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x54, /* bytes 10320 - 10336 */ + 0x54, 0x50, 0x50, 0x00, 0x50, 0x50, 0x54, 0x44, + 0x54, 0x54, 0x50, 0x40, 0x50, 0x54, 0x54, 0x54, /* bytes 10336 - 10352 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x14, 0x50, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 10352 - 10368 */ + 0xa8, 0x50, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 10368 - 10384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10384 - 10400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10400 - 10416 */ + 0x00, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, + 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x50, 0xa8, /* bytes 10416 - 10432 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0xa8, 0xfc, 0x54, 0x54, 0xc0, 0xa8, 0x54, 0xa8, /* bytes 10432 - 10448 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xf0, + 0xc0, 0x50, 0xc0, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 10448 - 10464 */ + 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 10464 - 10480 */ + 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xc0, 0x54, /* bytes 10480 - 10496 */ + 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0xa8, /* bytes 10496 - 10512 */ + 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0xa8, + 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0xf0, /* bytes 10512 - 10528 */ + 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x40, 0x54, /* bytes 10528 - 10544 */ + 0x44, 0x54, 0x00, 0x54, 0x40, 0x54, 0x40, 0x54, + 0xc0, 0x54, 0x54, 0xa8, 0x44, 0x54, 0xc0, 0xa8, /* bytes 10544 - 10560 */ + 0x54, 0x54, 0xc0, 0xa8, 0x50, 0x54, 0x44, 0xf0, + 0x54, 0xa8, 0x50, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, /* bytes 10560 - 10576 */ + 0x54, 0x54, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, + 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x00, 0x00, 0x00, /* bytes 10576 - 10592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10592 - 10608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10608 - 10624 */ + 0x00, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 10624 - 10640 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0xa8, /* bytes 10640 - 10656 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, + 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 10656 - 10672 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 10672 - 10688 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x50, /* bytes 10688 - 10704 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xc0, 0x50, 0x50, /* bytes 10704 - 10720 */ + 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 10720 - 10736 */ + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, /* bytes 10736 - 10752 */ + 0x54, 0x40, 0x40, 0x44, 0x50, 0x44, 0x50, 0x50, + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0xa8, /* bytes 10752 - 10768 */ + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x44, 0x54, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 10768 - 10784 */ + 0xa8, 0x50, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 10784 - 10800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10800 - 10816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10816 - 10832 */ + 0x00, 0x54, 0x54, 0x54, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 10832 - 10848 */ + 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0x50, 0xc0, 0xf0, 0xa8, 0xa8, /* bytes 10848 - 10864 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0x54, + 0x40, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 10864 - 10880 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 10880 - 10896 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0x54, 0x50, /* bytes 10896 - 10912 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0xc0, 0x50, /* bytes 10912 - 10928 */ + 0x44, 0xf0, 0xc0, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 10928 - 10944 */ + 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x54, + 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0x54, 0x50, 0x54, /* bytes 10944 - 10960 */ + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0xc0, 0x54, + 0xc0, 0xfc, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 10960 - 10976 */ + 0xc0, 0xf0, 0x54, 0x54, 0x40, 0x54, 0x54, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0x54, /* bytes 10976 - 10992 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x00, 0x00, 0x00, /* bytes 10992 - 11008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11008 - 11024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11024 - 11040 */ + 0x00, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11040 - 11056 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0xa8, 0x54, 0x44, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11056 - 11072 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x50, + 0x40, 0x50, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, 0xa8, /* bytes 11072 - 11088 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11088 - 11104 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 11104 - 11120 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 11120 - 11136 */ + 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 11136 - 11152 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, + 0x54, 0x54, 0xa8, 0x50, 0x54, 0x50, 0x54, 0x44, /* bytes 11152 - 11168 */ + 0x50, 0x44, 0x50, 0x40, 0x44, 0x50, 0x54, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, /* bytes 11168 - 11184 */ + 0xa8, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 11184 - 11200 */ + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 11200 - 11216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11216 - 11232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11232 - 11248 */ + 0x00, 0x54, 0x40, 0x54, 0x50, 0x54, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 11248 - 11264 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0xa8, 0xa8, 0x50, 0x54, 0x50, 0xa8, 0xa8, 0xa8, /* bytes 11264 - 11280 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0xc0, 0x54, + 0x00, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 11280 - 11296 */ + 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11296 - 11312 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 11312 - 11328 */ + 0xc0, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, /* bytes 11328 - 11344 */ + 0x54, 0xa8, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xa8, + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, /* bytes 11344 - 11360 */ + 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0x54, 0xa8, + 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 11360 - 11376 */ + 0xc0, 0x54, 0x40, 0x54, 0x44, 0xa8, 0xa8, 0xfc, + 0x54, 0xa8, 0x50, 0xa8, 0x54, 0xa8, 0x54, 0xf0, /* bytes 11376 - 11392 */ + 0x54, 0xa8, 0x50, 0x54, 0x50, 0xa8, 0xc0, 0xf0, + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 11392 - 11408 */ + 0x54, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0x00, 0x00, 0x00, /* bytes 11408 - 11424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11424 - 11440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11440 - 11456 */ + 0x00, 0x40, 0x10, 0x44, 0x54, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 11456 - 11472 */ + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11472 - 11488 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x44, + 0x50, 0xc0, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 11488 - 11504 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11504 - 11520 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, /* bytes 11520 - 11536 */ + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11536 - 11552 */ + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11552 - 11568 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0x54, 0x54, 0x54, 0x50, 0x50, 0x54, 0x54, 0x50, /* bytes 11568 - 11584 */ + 0x50, 0x50, 0x50, 0x50, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 11584 - 11600 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, + 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 11600 - 11616 */ + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 11616 - 11632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11632 - 11648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11648 - 11664 */ + 0x00, 0x50, 0x04, 0x50, 0x00, 0x54, 0x44, 0x54, + 0x00, 0x54, 0x50, 0x54, 0x44, 0xa8, 0x54, 0x54, /* bytes 11664 - 11680 */ + 0xc0, 0x54, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, + 0x54, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0xa8, 0xa8, /* bytes 11680 - 11696 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xf0, 0x50, 0x50, + 0x40, 0x54, 0x50, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 11696 - 11712 */ + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 11712 - 11728 */ + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xc0, 0xa8, /* bytes 11728 - 11744 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11744 - 11760 */ + 0xc0, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 11760 - 11776 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0x54, 0x40, 0x54, /* bytes 11776 - 11792 */ + 0x40, 0x54, 0x44, 0x54, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 11792 - 11808 */ + 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0x54, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 11808 - 11824 */ + 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x00, 0x00, 0x00, /* bytes 11824 - 11840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11840 - 11856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11856 - 11872 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x40, + 0x10, 0x10, 0x54, 0x14, 0x54, 0x54, 0x54, 0x44, /* bytes 11872 - 11888 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11888 - 11904 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0x40, + 0x50, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 11904 - 11920 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11920 - 11936 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, /* bytes 11936 - 11952 */ + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 11952 - 11968 */ + 0xa8, 0x54, 0xa8, 0x50, 0x54, 0xa8, 0xa8, 0xfc, + 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, /* bytes 11968 - 11984 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, /* bytes 11984 - 12000 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 12000 - 12016 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 12016 - 12032 */ + 0x54, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0x54, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 12032 - 12048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12048 - 12064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12064 - 12080 */ + 0x00, 0x44, 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, + 0x40, 0x50, 0x04, 0x54, 0x44, 0x54, 0x40, 0x50, /* bytes 12080 - 12096 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, + 0x54, 0x54, 0x44, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 12096 - 12112 */ + 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0x50, + 0x40, 0x54, 0xc0, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12112 - 12128 */ + 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 12128 - 12144 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x40, 0xa8, /* bytes 12144 - 12160 */ + 0xc0, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12160 - 12176 */ + 0x54, 0x54, 0x40, 0x50, 0x40, 0xa8, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12176 - 12192 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, /* bytes 12192 - 12208 */ + 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, + 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, /* bytes 12208 - 12224 */ + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 12224 - 12240 */ + 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, + 0x54, 0xa8, 0x54, 0xf0, 0x54, 0x00, 0x00, 0x00, /* bytes 12240 - 12256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12256 - 12272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12272 - 12288 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, + 0x10, 0x40, 0x14, 0x44, 0x50, 0x40, 0x44, 0x50, /* bytes 12288 - 12304 */ + 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12304 - 12320 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x44, + 0x54, 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 12320 - 12336 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12336 - 12352 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 12352 - 12368 */ + 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12368 - 12384 */ + 0xa8, 0x54, 0x50, 0x40, 0x40, 0xa8, 0xfc, 0xa8, + 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 12384 - 12400 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12400 - 12416 */ + 0x54, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, + 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 12416 - 12432 */ + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 12432 - 12448 */ + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 12448 - 12464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12464 - 12480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12480 - 12496 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 12496 - 12512 */ + 0x00, 0x54, 0x44, 0x50, 0x40, 0x54, 0x54, 0x54, + 0xc0, 0x54, 0x50, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 12512 - 12528 */ + 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0x50, + 0x40, 0xa8, 0x50, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12528 - 12544 */ + 0xa8, 0xf0, 0x54, 0x54, 0x54, 0xfc, 0xa8, 0xfc, + 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 12544 - 12560 */ + 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xfc, 0x54, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, /* bytes 12560 - 12576 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0xa8, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12576 - 12592 */ + 0xa8, 0xf0, 0x40, 0x40, 0x04, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xfc, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12592 - 12608 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, /* bytes 12608 - 12624 */ + 0xc0, 0x54, 0x40, 0x50, 0x44, 0x54, 0x50, 0x54, + 0x54, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 12624 - 12640 */ + 0x54, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 12640 - 12656 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x00, 0x00, 0x00, /* bytes 12656 - 12672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12672 - 12688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12688 - 12704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12704 - 12720 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x50, 0x40, + 0x44, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12720 - 12736 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x40, 0x40, + 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 12736 - 12752 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 12752 - 12768 */ + 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x40, 0x54, 0x54, /* bytes 12768 - 12784 */ + 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 12784 - 12800 */ + 0xa8, 0x54, 0x40, 0x00, 0x50, 0xa8, 0xa8, 0xa8, + 0xa8, 0xfc, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 12800 - 12816 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 12816 - 12832 */ + 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0x54, /* bytes 12832 - 12848 */ + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0x54, 0x54, 0xa8, 0x50, 0x54, 0xa8, 0xa8, 0x50, /* bytes 12848 - 12864 */ + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 12864 - 12880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12880 - 12896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12896 - 12912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 12912 - 12928 */ + 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, + 0x00, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, /* bytes 12928 - 12944 */ + 0xa8, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0x00, 0x50, + 0xc0, 0x54, 0x54, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 12944 - 12960 */ + 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xfc, 0xa8, 0xfc, + 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 12960 - 12976 */ + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, + 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, /* bytes 12976 - 12992 */ + 0x40, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 12992 - 13008 */ + 0xa8, 0xa8, 0x00, 0x00, 0x50, 0xa8, 0x54, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13008 - 13024 */ + 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xf0, /* bytes 13024 - 13040 */ + 0x50, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, + 0xa8, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0x50, 0xa8, /* bytes 13040 - 13056 */ + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 13056 - 13072 */ + 0xc0, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, + 0x50, 0xa8, 0xc0, 0xf0, 0xc0, 0x00, 0x00, 0x00, /* bytes 13072 - 13088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13088 - 13104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13104 - 13120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13120 - 13136 */ + 0x00, 0x00, 0x40, 0x00, 0x44, 0x40, 0x40, 0x00, + 0x40, 0x50, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 13136 - 13152 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x50, 0x00, + 0x54, 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0xfc, 0xfc, /* bytes 13152 - 13168 */ + 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13168 - 13184 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x44, 0x50, 0x50, /* bytes 13184 - 13200 */ + 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13200 - 13216 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13216 - 13232 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13232 - 13248 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, /* bytes 13248 - 13264 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 13264 - 13280 */ + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 13280 - 13296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13296 - 13312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13312 - 13328 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13328 - 13344 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x54, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 13344 - 13360 */ + 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0xa8, 0x14, + 0x00, 0x54, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 13360 - 13376 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0xfc, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0x54, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 13376 - 13392 */ + 0x54, 0xf0, 0x50, 0x54, 0xc0, 0x54, 0x54, 0xa8, + 0xc0, 0xa8, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 13392 - 13408 */ + 0x44, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xa8, 0xf0, 0xa8, 0xa8, 0xa8, 0xf0, 0xa8, 0xa8, /* bytes 13408 - 13424 */ + 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, /* bytes 13424 - 13440 */ + 0x54, 0xf0, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, /* bytes 13440 - 13456 */ + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, + 0xa8, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 13456 - 13472 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 13472 - 13488 */ + 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0xf0, 0x50, 0x54, + 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0x00, 0x00, 0x00, /* bytes 13488 - 13504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13504 - 13520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13520 - 13536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13536 - 13552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x40, 0x50, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13552 - 13568 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, + 0x50, 0x50, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, 0xa8, /* bytes 13568 - 13584 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 13584 - 13600 */ + 0x54, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x44, 0x44, 0x40, 0x54, 0x54, /* bytes 13600 - 13616 */ + 0x50, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0x54, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0x54, 0x54, /* bytes 13616 - 13632 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 13632 - 13648 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13648 - 13664 */ + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 13664 - 13680 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0x54, 0x54, /* bytes 13680 - 13696 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0x50, + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 13696 - 13712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13712 - 13728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13728 - 13744 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13744 - 13760 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, + 0x44, 0x54, 0xc0, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, /* bytes 13760 - 13776 */ + 0xa8, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xa8, 0xfc, + 0xa8, 0x54, 0xc0, 0xf0, 0xa8, 0xfc, 0xa8, 0xfc, /* bytes 13776 - 13792 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xfc, + 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, /* bytes 13792 - 13808 */ + 0x54, 0xa8, 0xc0, 0x54, 0x54, 0xa8, 0xc0, 0xa8, + 0x54, 0xa8, 0x40, 0x54, 0x40, 0x54, 0xc0, 0xa8, /* bytes 13808 - 13824 */ + 0xc0, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, + 0xc0, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0x54, /* bytes 13824 - 13840 */ + 0xc0, 0xa8, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 13840 - 13856 */ + 0xc0, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 13856 - 13872 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0xa8, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, /* bytes 13872 - 13888 */ + 0x54, 0xa8, 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x54, /* bytes 13888 - 13904 */ + 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0xa8, + 0x50, 0x54, 0xc0, 0xf0, 0xc0, 0x00, 0x00, 0x00, /* bytes 13904 - 13920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13920 - 13936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13936 - 13952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13952 - 13968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, + 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 13968 - 13984 */ + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0xa8, + 0xfc, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xfc, /* bytes 13984 - 14000 */ + 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 14000 - 14016 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0xc0, 0x40, 0x44, 0x54, 0x50, /* bytes 14016 - 14032 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, /* bytes 14032 - 14048 */ + 0x50, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 14048 - 14064 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 14064 - 14080 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 14080 - 14096 */ + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, + 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, /* bytes 14096 - 14112 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 14112 - 14128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14128 - 14144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14144 - 14160 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14160 - 14176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, + 0x40, 0x54, 0x50, 0x54, 0x40, 0x54, 0x54, 0x54, /* bytes 14176 - 14192 */ + 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xfc, 0xa8, 0xa8, + 0xa8, 0xfc, 0x50, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, /* bytes 14192 - 14208 */ + 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, /* bytes 14208 - 14224 */ + 0xc0, 0xf0, 0x54, 0x14, 0x40, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0x40, 0x50, 0x00, 0x50, 0x44, 0x50, /* bytes 14224 - 14240 */ + 0x40, 0xf0, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xf0, 0x54, 0x54, 0x44, 0x54, 0x44, 0x50, /* bytes 14240 - 14256 */ + 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x44, 0x54, + 0x40, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0x50, 0x54, /* bytes 14256 - 14272 */ + 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 14272 - 14288 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 14288 - 14304 */ + 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0xf0, 0x54, 0xa8, + 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, /* bytes 14304 - 14320 */ + 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0x54, + 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 14320 - 14336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14336 - 14352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14352 - 14368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14368 - 14384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x50, + 0x54, 0x54, 0x54, 0x50, 0x50, 0x10, 0x50, 0xc0, /* bytes 14384 - 14400 */ + 0x50, 0x44, 0x50, 0x44, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 14400 - 14416 */ + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xa8, 0xfc, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 14416 - 14432 */ + 0x54, 0x54, 0x54, 0x40, 0x40, 0x44, 0x54, 0x50, + 0x54, 0x54, 0x54, 0x44, 0x40, 0x40, 0x50, 0x40, /* bytes 14432 - 14448 */ + 0x40, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x40, /* bytes 14448 - 14464 */ + 0x40, 0x40, 0x40, 0x04, 0x44, 0x44, 0x50, 0x40, + 0x10, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0x40, /* bytes 14464 - 14480 */ + 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, + 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 14480 - 14496 */ + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x54, /* bytes 14496 - 14512 */ + 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 14512 - 14528 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, /* bytes 14528 - 14544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14544 - 14560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14560 - 14576 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14576 - 14592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x40, 0x50, 0x00, 0x50, /* bytes 14592 - 14608 */ + 0x40, 0x50, 0x40, 0x54, 0x54, 0xfc, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, /* bytes 14608 - 14624 */ + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xfc, 0xa8, + 0xa8, 0xfc, 0xa8, 0xfc, 0xa8, 0xa8, 0xc0, 0x54, /* bytes 14624 - 14640 */ + 0xc0, 0x54, 0x44, 0x54, 0x00, 0x50, 0x40, 0x54, + 0xc0, 0xa8, 0x40, 0x54, 0x00, 0x50, 0x40, 0x54, /* bytes 14640 - 14656 */ + 0x40, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, + 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xc0, 0x50, /* bytes 14656 - 14672 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, /* bytes 14672 - 14688 */ + 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xa8, /* bytes 14688 - 14704 */ + 0x50, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xf0, + 0xc0, 0xf0, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0xa8, /* bytes 14704 - 14720 */ + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xf0, + 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xa8, /* bytes 14720 - 14736 */ + 0x50, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0xa8, + 0x54, 0x54, 0xc0, 0xa8, 0x54, 0x00, 0x00, 0x00, /* bytes 14736 - 14752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14752 - 14768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14768 - 14784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14784 - 14800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x10, 0x14, 0x40, 0x44, 0x40, /* bytes 14800 - 14816 */ + 0x50, 0x40, 0x40, 0x50, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 14816 - 14832 */ + 0x54, 0x50, 0x50, 0x40, 0x50, 0x54, 0xfc, 0xfc, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 14832 - 14848 */ + 0x54, 0x50, 0x54, 0x40, 0x10, 0x40, 0x50, 0x44, + 0x50, 0x50, 0x50, 0x40, 0x40, 0x44, 0x40, 0x40, /* bytes 14848 - 14864 */ + 0x50, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x40, /* bytes 14864 - 14880 */ + 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0x44, 0x40, + 0x14, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 14880 - 14896 */ + 0x40, 0x40, 0x40, 0x40, 0x14, 0x40, 0x44, 0x40, + 0x50, 0x44, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, /* bytes 14896 - 14912 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 14912 - 14928 */ + 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 14928 - 14944 */ + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0xa8, 0x00, 0x00, 0x00, /* bytes 14944 - 14960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14960 - 14976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14976 - 14992 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, /* bytes 14992 - 15008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x50, 0x54, + 0x40, 0x54, 0x44, 0x54, 0x00, 0x54, 0x40, 0x10, /* bytes 15008 - 15024 */ + 0x00, 0x54, 0x40, 0x54, 0x54, 0xa8, 0xa8, 0xfc, + 0xa8, 0xf0, 0xa8, 0xfc, 0x54, 0xf0, 0x50, 0x54, /* bytes 15024 - 15040 */ + 0x40, 0x54, 0x40, 0x40, 0x00, 0xfc, 0xfc, 0xfc, + 0xa8, 0xf0, 0xa8, 0xa8, 0x54, 0xf0, 0x50, 0x54, /* bytes 15040 - 15056 */ + 0x40, 0x54, 0x44, 0x50, 0x00, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x10, 0x00, 0x54, 0x40, 0x10, /* bytes 15056 - 15072 */ + 0x00, 0x54, 0xc0, 0x54, 0xc0, 0xf0, 0x50, 0x54, + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x44, 0x50, /* bytes 15072 - 15088 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x54, 0x00, 0x10, + 0x00, 0x54, 0x04, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 15088 - 15104 */ + 0x40, 0x54, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, + 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, /* bytes 15104 - 15120 */ + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x50, 0x54, + 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0xa8, 0x50, 0x54, /* bytes 15120 - 15136 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, /* bytes 15136 - 15152 */ + 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0x54, + 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 15152 - 15168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15168 - 15184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15184 - 15200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15200 - 15216 */ + 0x00, 0x00, 0x00, 0x00, 0x44, 0x54, 0x54, 0x50, + 0x50, 0x50, 0x54, 0x44, 0x50, 0x44, 0x50, 0x40, /* bytes 15216 - 15232 */ + 0x40, 0x40, 0x50, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xfc, 0xa8, 0xa8, 0x54, 0x54, 0x50, /* bytes 15232 - 15248 */ + 0x50, 0x44, 0x40, 0x00, 0x54, 0xfc, 0xfc, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x50, /* bytes 15248 - 15264 */ + 0x50, 0x50, 0x54, 0x40, 0x44, 0x40, 0x50, 0x40, + 0x50, 0x40, 0x50, 0x40, 0x04, 0x00, 0x14, 0x40, /* bytes 15264 - 15280 */ + 0x40, 0x40, 0x54, 0x50, 0x54, 0x54, 0x54, 0x44, + 0x50, 0x50, 0x54, 0x50, 0x50, 0x44, 0x10, 0x04, /* bytes 15280 - 15296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x04, + 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 15296 - 15312 */ + 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, + 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 15312 - 15328 */ + 0x40, 0x40, 0x50, 0x44, 0x50, 0x40, 0x54, 0x50, + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, /* bytes 15328 - 15344 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0x54, 0xa8, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x54, /* bytes 15344 - 15360 */ + 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, + 0x50, 0x50, 0x54, 0x50, 0x54, 0x00, 0x00, 0x00, /* bytes 15360 - 15376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15376 - 15392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15392 - 15408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 15408 - 15424 */ + 0x00, 0x00, 0x00, 0x10, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x54, /* bytes 15424 - 15440 */ + 0x40, 0x50, 0x04, 0x54, 0x50, 0xa8, 0x54, 0xfc, + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x50, 0x54, /* bytes 15440 - 15456 */ + 0x40, 0x50, 0x00, 0x50, 0x54, 0xfc, 0xa8, 0xa8, + 0xa8, 0xa8, 0xc0, 0xa8, 0x40, 0x50, 0xc0, 0x54, /* bytes 15456 - 15472 */ + 0x44, 0x54, 0x40, 0x54, 0x04, 0x10, 0x00, 0x54, + 0x40, 0x50, 0x04, 0x54, 0x00, 0x10, 0x40, 0x50, /* bytes 15472 - 15488 */ + 0x00, 0x10, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, + 0x44, 0x50, 0x40, 0x54, 0x40, 0x50, 0x00, 0x10, /* bytes 15488 - 15504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 15504 - 15520 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 15520 - 15536 */ + 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x44, 0x54, + 0x40, 0x54, 0xc0, 0xa8, 0x54, 0xa8, 0x54, 0xf0, /* bytes 15536 - 15552 */ + 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0x54, 0xa8, + 0xc0, 0xa8, 0xc0, 0xa8, 0x50, 0x54, 0xc0, 0xf0, /* bytes 15552 - 15568 */ + 0x54, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0x50, 0xa8, + 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 15568 - 15584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15584 - 15600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15600 - 15616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15616 - 15632 */ + 0x00, 0x00, 0x40, 0x50, 0x54, 0x14, 0x50, 0x10, + 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x40, 0x44, /* bytes 15632 - 15648 */ + 0x50, 0x40, 0x50, 0x54, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x50, /* bytes 15648 - 15664 */ + 0x50, 0x40, 0x40, 0x50, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0x54, 0x50, 0x44, 0x44, 0x54, 0x50, /* bytes 15664 - 15680 */ + 0x50, 0x44, 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, + 0x50, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, /* bytes 15680 - 15696 */ + 0x40, 0x44, 0x54, 0x44, 0x50, 0x40, 0x50, 0x14, + 0x54, 0x40, 0x50, 0x40, 0x40, 0x04, 0x40, 0x00, /* bytes 15696 - 15712 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, + 0x44, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, /* bytes 15712 - 15728 */ + 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 15728 - 15744 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x44, 0x40, + 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, /* bytes 15744 - 15760 */ + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, /* bytes 15760 - 15776 */ + 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, /* bytes 15776 - 15792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15792 - 15808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15808 - 15824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 15824 - 15840 */ + 0x44, 0xf0, 0x54, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 15840 - 15856 */ + 0x40, 0x50, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x54, 0x40, 0x50, /* bytes 15856 - 15872 */ + 0x40, 0x50, 0x40, 0x54, 0xc0, 0xf0, 0x54, 0xa8, + 0x54, 0xf0, 0x44, 0x10, 0x40, 0x54, 0x44, 0x54, /* bytes 15872 - 15888 */ + 0x40, 0x50, 0x00, 0x50, 0x00, 0x14, 0x00, 0x44, + 0x04, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 15888 - 15904 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x54, + 0x04, 0x54, 0x40, 0x50, 0x40, 0x50, 0x00, 0x40, /* bytes 15904 - 15920 */ + 0x00, 0x54, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 15920 - 15936 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, + 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 15936 - 15952 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x14, + 0x04, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x50, 0xa8, /* bytes 15952 - 15968 */ + 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x54, 0xa8, + 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0xf0, 0x50, 0xa8, /* bytes 15968 - 15984 */ + 0xc0, 0xf0, 0x50, 0xa8, 0xc0, 0xf0, 0x50, 0x54, + 0xc0, 0x54, 0x50, 0x54, 0x44, 0x00, 0x00, 0x00, /* bytes 15984 - 16000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16000 - 16016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16016 - 16032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, /* bytes 16032 - 16048 */ + 0xa8, 0xa8, 0x54, 0x44, 0x50, 0x50, 0x50, 0x40, + 0x10, 0x44, 0x50, 0x40, 0x40, 0x40, 0x44, 0x04, /* bytes 16048 - 16064 */ + 0x40, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, + 0x54, 0x54, 0xa8, 0x50, 0x54, 0x50, 0x50, 0x40, /* bytes 16064 - 16080 */ + 0x40, 0x40, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, + 0xa8, 0x54, 0x10, 0x00, 0x50, 0x50, 0x54, 0xc0, /* bytes 16080 - 16096 */ + 0x50, 0x40, 0x14, 0x40, 0x44, 0x40, 0x40, 0x00, + 0x40, 0x40, 0x10, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 16096 - 16112 */ + 0x40, 0x40, 0x50, 0x44, 0x50, 0x50, 0x54, 0x44, + 0x50, 0x10, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, /* bytes 16112 - 16128 */ + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x00, 0x00, 0x04, 0x40, 0x00, /* bytes 16128 - 16144 */ + 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x40, + 0x40, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16144 - 16160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x40, 0x40, 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, /* bytes 16160 - 16176 */ + 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0xa8, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, /* bytes 16176 - 16192 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, + 0x50, 0x54, 0x54, 0x50, 0x54, 0x00, 0x00, 0x00, /* bytes 16192 - 16208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16208 - 16224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16224 - 16240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x40, 0xa8, 0x54, 0xf0, /* bytes 16240 - 16256 */ + 0x54, 0xa8, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x00, 0x50, 0x40, 0x54, 0x00, 0x40, 0x00, 0x10, /* bytes 16256 - 16272 */ + 0x00, 0x40, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, + 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0x50, 0x00, 0x10, /* bytes 16272 - 16288 */ + 0x00, 0x50, 0x54, 0xa8, 0x50, 0x54, 0x44, 0x54, + 0xc0, 0x54, 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, /* bytes 16288 - 16304 */ + 0x40, 0x54, 0x40, 0x54, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x40, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 16304 - 16320 */ + 0x00, 0x50, 0x00, 0x50, 0x04, 0x50, 0x40, 0x54, + 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, /* bytes 16320 - 16336 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, + 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 16336 - 16352 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x44, 0x00, 0x40, /* bytes 16352 - 16368 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 16368 - 16384 */ + 0x50, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 16384 - 16400 */ + 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0xa8, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 16400 - 16416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16416 - 16432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16432 - 16448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 16448 - 16464 */ + 0xa8, 0x54, 0x50, 0x10, 0x50, 0x40, 0x14, 0x40, + 0x10, 0x40, 0x44, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 16464 - 16480 */ + 0x00, 0x04, 0x50, 0x50, 0x54, 0x50, 0x50, 0x54, + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x40, 0x40, 0x40, /* bytes 16480 - 16496 */ + 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, + 0x54, 0x40, 0x40, 0x40, 0x50, 0x50, 0x50, 0x50, /* bytes 16496 - 16512 */ + 0x50, 0x14, 0x50, 0x40, 0x40, 0x40, 0x44, 0x00, + 0x40, 0x00, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 16512 - 16528 */ + 0x40, 0x40, 0x10, 0x44, 0x50, 0x14, 0x54, 0x10, + 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x40, 0x00, /* bytes 16528 - 16544 */ + 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 16544 - 16560 */ + 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, + 0x40, 0x00, 0x40, 0x40, 0x44, 0x04, 0x40, 0x00, /* bytes 16560 - 16576 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x40, 0x50, 0x44, 0x50, 0x54, /* bytes 16576 - 16592 */ + 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, /* bytes 16592 - 16608 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x50, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, /* bytes 16608 - 16624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16624 - 16640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16640 - 16656 */ + 0x00, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, + 0x00, 0x54, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0x54, /* bytes 16656 - 16672 */ + 0xc0, 0xf0, 0x44, 0x50, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, /* bytes 16672 - 16688 */ + 0x00, 0x54, 0x40, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0xc0, 0xa8, 0x50, 0x54, 0xc0, 0x50, 0x00, 0x14, /* bytes 16688 - 16704 */ + 0x40, 0x54, 0x54, 0xa8, 0xc0, 0xf0, 0x50, 0xa8, + 0xc0, 0x50, 0x00, 0x50, 0x00, 0x54, 0x44, 0x54, /* bytes 16704 - 16720 */ + 0x40, 0x54, 0x40, 0x14, 0x00, 0x14, 0x40, 0x10, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 16720 - 16736 */ + 0x00, 0x50, 0x04, 0x50, 0x00, 0x54, 0x44, 0x54, + 0x40, 0x54, 0x44, 0x50, 0x00, 0x54, 0x00, 0x14, /* bytes 16736 - 16752 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 16752 - 16768 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x14, + 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x44, /* bytes 16768 - 16784 */ + 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x50, 0x54, /* bytes 16784 - 16800 */ + 0x40, 0x54, 0x50, 0x54, 0xc0, 0xa8, 0x50, 0xa8, + 0xc0, 0xf0, 0x54, 0x54, 0xc0, 0xf0, 0x50, 0x54, /* bytes 16800 - 16816 */ + 0xc0, 0xf0, 0x50, 0x54, 0xc0, 0x54, 0x50, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x00, 0x00, 0x00, /* bytes 16816 - 16832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16832 - 16848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16848 - 16864 */ + 0x00, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0x54, 0x54, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0x50, /* bytes 16864 - 16880 */ + 0x54, 0x54, 0x54, 0x40, 0x10, 0x44, 0x10, 0x04, + 0x40, 0x40, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, /* bytes 16880 - 16896 */ + 0x00, 0x00, 0x50, 0x44, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x50, 0x54, 0x40, 0x40, 0x40, /* bytes 16896 - 16912 */ + 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, + 0x44, 0x00, 0x10, 0x40, 0x40, 0x10, 0x50, 0x44, /* bytes 16912 - 16928 */ + 0x50, 0x50, 0x50, 0x00, 0x04, 0x00, 0x44, 0x04, + 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16928 - 16944 */ + 0x40, 0x04, 0x40, 0x00, 0x40, 0x40, 0x50, 0x40, + 0x10, 0x44, 0x50, 0x40, 0x44, 0x44, 0x50, 0x00, /* bytes 16944 - 16960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x40, 0x40, 0x50, 0x04, 0x40, 0x40, 0x40, 0x00, /* bytes 16960 - 16976 */ + 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x14, 0x04, + 0x10, 0x44, 0x50, 0x40, 0x44, 0x40, 0x40, 0x00, /* bytes 16976 - 16992 */ + 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x00, + 0x40, 0x00, 0x10, 0x40, 0x44, 0x50, 0x50, 0x44, /* bytes 16992 - 17008 */ + 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, + 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0x54, 0x50, /* bytes 17008 - 17024 */ + 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, + 0x50, 0x50, 0x54, 0x50, 0x50, 0x00, 0x00, 0x00, /* bytes 17024 - 17040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17040 - 17056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17056 - 17072 */ + 0x00, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0x54, + 0x54, 0xa8, 0xc0, 0xa8, 0x54, 0x54, 0xc0, 0x54, /* bytes 17072 - 17088 */ + 0x50, 0x54, 0xc0, 0x54, 0x40, 0x50, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, /* bytes 17088 - 17104 */ + 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x10, 0x00, 0x50, /* bytes 17104 - 17120 */ + 0x44, 0x54, 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0x54, + 0x00, 0x40, 0x00, 0x50, 0x04, 0x50, 0x40, 0x54, /* bytes 17120 - 17136 */ + 0x40, 0x54, 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, + 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, /* bytes 17136 - 17152 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, + 0x40, 0x50, 0x04, 0x50, 0x40, 0x50, 0x00, 0x50, /* bytes 17152 - 17168 */ + 0x40, 0x50, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, + 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 17168 - 17184 */ + 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x04, 0x54, + 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, /* bytes 17184 - 17200 */ + 0x04, 0x50, 0x00, 0x54, 0x40, 0x54, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, /* bytes 17200 - 17216 */ + 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0xa8, + 0xc0, 0xa8, 0xc0, 0xf0, 0xc0, 0x54, 0xc0, 0xa8, /* bytes 17216 - 17232 */ + 0xc0, 0x54, 0x40, 0x54, 0x50, 0x54, 0xc0, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x40, 0x00, 0x00, 0x00, /* bytes 17232 - 17248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17248 - 17264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17264 - 17280 */ + 0x00, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0x50, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, /* bytes 17280 - 17296 */ + 0x54, 0x50, 0x54, 0x50, 0x50, 0x40, 0x44, 0x40, + 0x44, 0x40, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 17296 - 17312 */ + 0x00, 0x00, 0x44, 0x40, 0x54, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x40, 0x40, /* bytes 17312 - 17328 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, 0x50, 0x50, + 0x14, 0x00, 0x40, 0x40, 0x10, 0x40, 0x10, 0x40, /* bytes 17328 - 17344 */ + 0x10, 0x40, 0x10, 0x00, 0x10, 0x00, 0x40, 0x40, + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17344 - 17360 */ + 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x44, 0x40, + 0x14, 0x40, 0x10, 0x40, 0x50, 0x40, 0x14, 0x40, /* bytes 17360 - 17376 */ + 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x14, 0x44, + 0x14, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x44, /* bytes 17376 - 17392 */ + 0x50, 0x40, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, + 0x10, 0x40, 0x50, 0x50, 0x50, 0x40, 0x40, 0x40, /* bytes 17392 - 17408 */ + 0x50, 0x44, 0x40, 0x40, 0x54, 0x44, 0x50, 0x40, + 0x44, 0x04, 0x40, 0x40, 0x10, 0x40, 0x50, 0x44, /* bytes 17408 - 17424 */ + 0x50, 0x44, 0x50, 0x54, 0x54, 0x50, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, /* bytes 17424 - 17440 */ + 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, + 0x54, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00, 0x00, /* bytes 17440 - 17456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17456 - 17472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17472 - 17488 */ + 0x00, 0xa8, 0x54, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, + 0x40, 0x54, 0x44, 0x54, 0x04, 0x54, 0x40, 0x50, /* bytes 17488 - 17504 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x14, + 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 17504 - 17520 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x54, 0x50, 0x54, + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0x54, 0x00, 0x50, /* bytes 17520 - 17536 */ + 0x40, 0x54, 0x50, 0x54, 0xc0, 0xa8, 0x50, 0x54, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 17536 - 17552 */ + 0x04, 0x50, 0x04, 0x50, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 17552 - 17568 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 17568 - 17584 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x54, 0x44, 0x50, 0x40, 0x54, 0x40, 0x54, /* bytes 17584 - 17600 */ + 0x40, 0x54, 0x44, 0x50, 0x00, 0x54, 0x44, 0x54, + 0x40, 0x54, 0x50, 0x54, 0x00, 0x54, 0x00, 0x44, /* bytes 17600 - 17616 */ + 0x00, 0x54, 0x40, 0x44, 0x00, 0x54, 0x44, 0x50, + 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x04, 0x50, /* bytes 17616 - 17632 */ + 0x00, 0x54, 0x44, 0x54, 0xc0, 0xf0, 0x50, 0x54, + 0xc0, 0x54, 0x50, 0xa8, 0x44, 0x54, 0x50, 0x54, /* bytes 17632 - 17648 */ + 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x50, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x44, 0x00, 0x00, 0x00, /* bytes 17648 - 17664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17664 - 17680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17680 - 17696 */ + 0x00, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0x50, 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, /* bytes 17696 - 17712 */ + 0x10, 0x44, 0x14, 0x40, 0x10, 0x40, 0x50, 0x40, + 0x40, 0x40, 0x40, 0x00, 0x00, 0x04, 0x40, 0x00, /* bytes 17712 - 17728 */ + 0x00, 0x00, 0x40, 0x40, 0x50, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x44, 0x40, /* bytes 17728 - 17744 */ + 0x50, 0x54, 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, + 0x10, 0x00, 0x40, 0x00, 0x44, 0x40, 0x10, 0x40, /* bytes 17744 - 17760 */ + 0x10, 0x40, 0x10, 0x40, 0x44, 0x00, 0x40, 0x00, + 0x40, 0x04, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 17760 - 17776 */ + 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x50, 0x40, + 0x40, 0x44, 0x50, 0x44, 0x44, 0x44, 0x50, 0x44, /* bytes 17776 - 17792 */ + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x40, + 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x50, 0x44, /* bytes 17792 - 17808 */ + 0x54, 0x54, 0x50, 0x40, 0x50, 0x10, 0x50, 0x44, + 0x54, 0x54, 0x54, 0x44, 0x50, 0x10, 0x54, 0x00, /* bytes 17808 - 17824 */ + 0x40, 0x50, 0x54, 0x40, 0x40, 0x44, 0x54, 0x40, + 0x44, 0x40, 0x44, 0x00, 0x40, 0x40, 0x50, 0x40, /* bytes 17824 - 17840 */ + 0x40, 0x44, 0x50, 0x44, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, /* bytes 17840 - 17856 */ + 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x40, + 0x50, 0x50, 0x50, 0x44, 0x50, 0x00, 0x00, 0x00, /* bytes 17856 - 17872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17872 - 17888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17888 - 17904 */ + 0x00, 0xa8, 0x54, 0x54, 0x50, 0x54, 0x44, 0x54, + 0x54, 0xa8, 0x40, 0x50, 0x40, 0x50, 0x00, 0x54, /* bytes 17904 - 17920 */ + 0x04, 0x50, 0x00, 0x50, 0x04, 0x50, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 17920 - 17936 */ + 0x00, 0x40, 0x00, 0x50, 0x40, 0x54, 0xc0, 0x54, + 0x50, 0x54, 0xc0, 0xf0, 0x50, 0x54, 0x00, 0x54, /* bytes 17936 - 17952 */ + 0x44, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, 0xa8, + 0x40, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 17952 - 17968 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 17968 - 17984 */ + 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 17984 - 18000 */ + 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 18000 - 18016 */ + 0x44, 0x54, 0x00, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x50, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x40, 0x50, /* bytes 18016 - 18032 */ + 0x04, 0x50, 0xc0, 0x54, 0x40, 0x14, 0x40, 0x54, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, /* bytes 18032 - 18048 */ + 0x40, 0x50, 0x00, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 18048 - 18064 */ + 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x44, 0x54, 0x40, 0x54, 0x40, 0x00, 0x00, 0x00, /* bytes 18064 - 18080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18080 - 18096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18096 - 18112 */ + 0x00, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, + 0x50, 0x50, 0x54, 0x50, 0x14, 0x44, 0x14, 0x44, /* bytes 18112 - 18128 */ + 0x50, 0x40, 0x10, 0x40, 0x10, 0x40, 0x40, 0x40, + 0x44, 0x04, 0x40, 0x40, 0x10, 0x40, 0x44, 0x00, /* bytes 18128 - 18144 */ + 0x00, 0x00, 0x40, 0x40, 0x50, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x44, 0x50, /* bytes 18144 - 18160 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x54, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, /* bytes 18160 - 18176 */ + 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x40, /* bytes 18176 - 18192 */ + 0x44, 0x40, 0x44, 0x40, 0x14, 0x40, 0x50, 0x50, + 0x50, 0x40, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 18192 - 18208 */ + 0x54, 0x50, 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, + 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 18208 - 18224 */ + 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x44, 0x50, 0x54, /* bytes 18224 - 18240 */ + 0x10, 0x00, 0x14, 0x54, 0x54, 0x50, 0x50, 0x10, + 0x14, 0x04, 0x40, 0x00, 0x40, 0x40, 0x44, 0x40, /* bytes 18240 - 18256 */ + 0x10, 0x40, 0x40, 0x44, 0x50, 0x50, 0x54, 0x54, + 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 18256 - 18272 */ + 0x50, 0xc0, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x50, 0x50, 0x50, 0x44, 0x50, 0x00, 0x00, 0x00, /* bytes 18272 - 18288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18288 - 18304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18304 - 18320 */ + 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x50, /* bytes 18320 - 18336 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x04, 0x50, + 0x00, 0x54, 0x04, 0x10, 0x00, 0x54, 0x00, 0x44, /* bytes 18336 - 18352 */ + 0x00, 0x40, 0x00, 0x50, 0x40, 0x54, 0x50, 0x54, + 0xc0, 0xa8, 0x50, 0xa8, 0xc0, 0x54, 0x00, 0x50, /* bytes 18352 - 18368 */ + 0x40, 0x54, 0x50, 0x54, 0xc0, 0xf0, 0x50, 0x54, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 18368 - 18384 */ + 0x00, 0x54, 0x40, 0x54, 0x00, 0x14, 0x04, 0x10, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, /* bytes 18384 - 18400 */ + 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x50, 0x54, /* bytes 18400 - 18416 */ + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 18416 - 18432 */ + 0x44, 0xa8, 0x44, 0x50, 0x44, 0x54, 0x50, 0x54, + 0xc0, 0xa8, 0x54, 0x54, 0xc0, 0x54, 0x04, 0x10, /* bytes 18432 - 18448 */ + 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, 0x50, 0x50, + 0x04, 0x50, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 18448 - 18464 */ + 0x00, 0x54, 0x04, 0x10, 0x44, 0x54, 0x50, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x44, 0x50, /* bytes 18464 - 18480 */ + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x50, + 0x40, 0x54, 0x44, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 18480 - 18496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18496 - 18512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18512 - 18528 */ + 0x00, 0x50, 0x50, 0x40, 0x50, 0x10, 0x50, 0x40, + 0x10, 0x10, 0x50, 0x44, 0x50, 0x50, 0x54, 0x44, /* bytes 18528 - 18544 */ + 0x50, 0x14, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, + 0x44, 0x40, 0x50, 0x00, 0x40, 0x40, 0x44, 0x00, /* bytes 18544 - 18560 */ + 0x00, 0x00, 0x40, 0x40, 0x14, 0x50, 0x54, 0x50, + 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x10, 0x44, /* bytes 18560 - 18576 */ + 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x04, /* bytes 18576 - 18592 */ + 0x40, 0x40, 0x50, 0x00, 0x40, 0x40, 0x10, 0x40, + 0x44, 0x40, 0x50, 0x40, 0x10, 0x40, 0x50, 0x40, /* bytes 18592 - 18608 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, + 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 18608 - 18624 */ + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0x44, + 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, /* bytes 18624 - 18640 */ + 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x50, 0x44, 0x00, /* bytes 18640 - 18656 */ + 0x00, 0x00, 0x00, 0x40, 0x54, 0x54, 0x54, 0x50, + 0x50, 0x00, 0x00, 0x00, 0x40, 0x40, 0x14, 0x40, /* bytes 18656 - 18672 */ + 0x40, 0x40, 0x44, 0x00, 0x50, 0x50, 0x54, 0x50, + 0x54, 0x54, 0x54, 0x40, 0x50, 0x50, 0x50, 0x40, /* bytes 18672 - 18688 */ + 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x50, 0x40, + 0x50, 0x50, 0x50, 0x40, 0x44, 0x00, 0x00, 0x00, /* bytes 18688 - 18704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18704 - 18720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18720 - 18736 */ + 0x00, 0x50, 0x04, 0x50, 0x00, 0x54, 0x40, 0x54, + 0x04, 0x50, 0x44, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 18736 - 18752 */ + 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x04, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x14, /* bytes 18752 - 18768 */ + 0x00, 0x00, 0x00, 0x50, 0x40, 0x54, 0x44, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x00, 0x54, /* bytes 18768 - 18784 */ + 0xc0, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, 0x54, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 18784 - 18800 */ + 0x00, 0x50, 0x00, 0x10, 0x40, 0x54, 0x00, 0x50, + 0x44, 0x54, 0x00, 0x54, 0x40, 0x50, 0x04, 0x50, /* bytes 18800 - 18816 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, + 0x40, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 18816 - 18832 */ + 0xc0, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, /* bytes 18832 - 18848 */ + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x50, 0x00, 0x10, /* bytes 18848 - 18864 */ + 0x00, 0xa8, 0x04, 0x10, 0x54, 0xa8, 0x40, 0x54, + 0x50, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, /* bytes 18864 - 18880 */ + 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, + 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 18880 - 18896 */ + 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x00, 0x00, 0x00, /* bytes 18896 - 18912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18912 - 18928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18928 - 18944 */ + 0x00, 0x44, 0x14, 0x40, 0x10, 0x40, 0x14, 0x40, + 0x14, 0x40, 0x14, 0x44, 0x50, 0x40, 0x14, 0x14, /* bytes 18944 - 18960 */ + 0x54, 0x50, 0x50, 0x10, 0x50, 0x50, 0x50, 0x40, + 0x40, 0x00, 0x40, 0x40, 0x44, 0x40, 0x40, 0x04, /* bytes 18960 - 18976 */ + 0x00, 0x00, 0x00, 0x40, 0x50, 0x44, 0x50, 0x50, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x44, 0x50, /* bytes 18976 - 18992 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x44, 0x40, /* bytes 18992 - 19008 */ + 0x40, 0x00, 0x40, 0x14, 0x50, 0x40, 0x50, 0x50, + 0x54, 0x50, 0x50, 0x40, 0x10, 0x40, 0x40, 0x00, /* bytes 19008 - 19024 */ + 0x40, 0x00, 0x04, 0x40, 0x40, 0x40, 0x50, 0x44, + 0x50, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, /* bytes 19024 - 19040 */ + 0x54, 0x50, 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, + 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, /* bytes 19040 - 19056 */ + 0x54, 0x50, 0x50, 0x50, 0x50, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x50, 0x50, 0x04, 0x04, 0x00, /* bytes 19056 - 19072 */ + 0x00, 0xa8, 0x54, 0x00, 0xa8, 0x54, 0x54, 0x54, + 0x54, 0x44, 0x00, 0x00, 0x50, 0x40, 0x44, 0x40, /* bytes 19072 - 19088 */ + 0x10, 0x40, 0x40, 0x00, 0x10, 0x14, 0x50, 0x50, + 0x54, 0x50, 0x50, 0x44, 0x50, 0x44, 0x50, 0x50, /* bytes 19088 - 19104 */ + 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, + 0x50, 0x40, 0x50, 0x44, 0x50, 0x00, 0x00, 0x00, /* bytes 19104 - 19120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19120 - 19136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19136 - 19152 */ + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x00, 0x10, + 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, /* bytes 19152 - 19168 */ + 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, /* bytes 19168 - 19184 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x54, 0x44, 0x54, + 0xc0, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x40, 0x54, /* bytes 19184 - 19200 */ + 0x40, 0x54, 0x50, 0x54, 0x44, 0x54, 0x40, 0x40, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, /* bytes 19200 - 19216 */ + 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x44, 0x50, + 0x40, 0x54, 0x44, 0x50, 0x04, 0x50, 0x00, 0x44, /* bytes 19216 - 19232 */ + 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 19232 - 19248 */ + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 19248 - 19264 */ + 0x40, 0x54, 0x50, 0x54, 0x40, 0x54, 0x54, 0x54, + 0xc0, 0x54, 0x54, 0x54, 0x00, 0x54, 0x00, 0x40, /* bytes 19264 - 19280 */ + 0x00, 0x54, 0x04, 0x40, 0xc0, 0xf0, 0xc0, 0x54, + 0x44, 0x54, 0x00, 0x00, 0x00, 0x54, 0x40, 0x50, /* bytes 19280 - 19296 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x44, 0x54, 0x04, 0x54, 0x40, 0x50, /* bytes 19296 - 19312 */ + 0x40, 0x54, 0x40, 0x54, 0x00, 0x54, 0x40, 0x50, + 0x04, 0x54, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 19312 - 19328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19328 - 19344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19344 - 19360 */ + 0x00, 0x10, 0x50, 0x40, 0x44, 0x40, 0x10, 0x04, + 0x40, 0x40, 0x44, 0x04, 0x40, 0x40, 0x50, 0x40, /* bytes 19360 - 19376 */ + 0x40, 0x04, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 19376 - 19392 */ + 0x00, 0x00, 0x40, 0x04, 0x40, 0x44, 0x54, 0x50, + 0x50, 0x50, 0x54, 0x54, 0x54, 0x40, 0x10, 0x44, /* bytes 19392 - 19408 */ + 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x50, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 19408 - 19424 */ + 0x40, 0x44, 0x14, 0x40, 0x10, 0x40, 0x14, 0x04, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x14, 0x40, /* bytes 19424 - 19440 */ + 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x50, 0x44, + 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x50, 0x44, /* bytes 19440 - 19456 */ + 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, 0x54, 0xc0, + 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x44, /* bytes 19456 - 19472 */ + 0x54, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x40, 0x00, 0x40, 0x00, /* bytes 19472 - 19488 */ + 0x00, 0x04, 0x00, 0x04, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x50, 0x40, 0x00, 0x40, 0x50, 0x50, 0x40, /* bytes 19488 - 19504 */ + 0x44, 0x40, 0x44, 0x00, 0x40, 0x40, 0x50, 0x40, + 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x40, /* bytes 19504 - 19520 */ + 0x50, 0x40, 0x50, 0x40, 0x50, 0x14, 0x50, 0x40, + 0x50, 0x44, 0x50, 0x40, 0x40, 0x00, 0x00, 0x00, /* bytes 19520 - 19536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19536 - 19552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19552 - 19568 */ + 0x00, 0x50, 0x04, 0x50, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 19568 - 19584 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x14, 0x00, 0x50, /* bytes 19584 - 19600 */ + 0x00, 0x40, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 19600 - 19616 */ + 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x40, 0x40, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, /* bytes 19616 - 19632 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 19632 - 19648 */ + 0x04, 0x14, 0x00, 0x50, 0x04, 0x50, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, /* bytes 19648 - 19664 */ + 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 19664 - 19680 */ + 0xc0, 0x54, 0xc0, 0x54, 0x50, 0x54, 0x40, 0x54, + 0x50, 0x54, 0x40, 0xa8, 0x40, 0x40, 0x00, 0x14, /* bytes 19680 - 19696 */ + 0x00, 0x00, 0x00, 0x54, 0x54, 0x54, 0x44, 0x54, + 0xc0, 0x54, 0x00, 0x40, 0x40, 0x54, 0x40, 0x54, /* bytes 19696 - 19712 */ + 0x04, 0x10, 0x00, 0x50, 0x04, 0x50, 0x40, 0x50, + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, /* bytes 19712 - 19728 */ + 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x00, 0x54, + 0x40, 0x54, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 19728 - 19744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19744 - 19760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19760 - 19776 */ + 0x00, 0x40, 0x44, 0x40, 0x40, 0x04, 0x40, 0x04, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19776 - 19792 */ + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x04, 0x44, 0x40, 0x40, 0x00, /* bytes 19792 - 19808 */ + 0x00, 0x00, 0x40, 0x04, 0x44, 0x40, 0x44, 0x44, + 0x50, 0x50, 0x50, 0x44, 0x10, 0x04, 0x50, 0x50, /* bytes 19808 - 19824 */ + 0x54, 0x50, 0x54, 0x54, 0x54, 0x50, 0x14, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 19824 - 19840 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 19840 - 19856 */ + 0x40, 0x04, 0x40, 0x40, 0x10, 0x40, 0x50, 0x44, + 0x50, 0x40, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, /* bytes 19856 - 19872 */ + 0x50, 0x50, 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, + 0x50, 0x40, 0x50, 0x50, 0x54, 0x54, 0x54, 0x50, /* bytes 19872 - 19888 */ + 0x50, 0x50, 0x54, 0x50, 0x54, 0x54, 0x54, 0x54, + 0x50, 0x50, 0x54, 0x54, 0x54, 0x40, 0x00, 0x00, /* bytes 19888 - 19904 */ + 0x00, 0x00, 0x00, 0x40, 0x54, 0x50, 0x54, 0x54, + 0x54, 0x44, 0x04, 0x00, 0x50, 0x44, 0x50, 0x50, /* bytes 19904 - 19920 */ + 0x50, 0x00, 0x40, 0x40, 0x10, 0x40, 0x14, 0x14, + 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, /* bytes 19920 - 19936 */ + 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x10, 0x44, + 0x50, 0x40, 0x10, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 19936 - 19952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19952 - 19968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19968 - 19984 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 19984 - 20000 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x00, 0x40, /* bytes 20000 - 20016 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x04, 0x14, + 0x00, 0x54, 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 20016 - 20032 */ + 0x40, 0x54, 0x50, 0x54, 0x40, 0x54, 0x40, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, /* bytes 20032 - 20048 */ + 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, /* bytes 20048 - 20064 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x50, /* bytes 20064 - 20080 */ + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x44, 0x54, + 0x40, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 20080 - 20096 */ + 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, 0x54, 0x54, + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x04, /* bytes 20096 - 20112 */ + 0x00, 0x14, 0x00, 0x50, 0x40, 0x54, 0x44, 0x54, + 0x04, 0x54, 0x00, 0x40, 0x40, 0x54, 0x44, 0x54, /* bytes 20112 - 20128 */ + 0x04, 0x10, 0x04, 0x50, 0x00, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, /* bytes 20128 - 20144 */ + 0x00, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 20144 - 20160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20160 - 20176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20176 - 20192 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20192 - 20208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, + 0x40, 0x44, 0x50, 0x44, 0x40, 0x40, 0x10, 0x00, /* bytes 20208 - 20224 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x50, 0x04, + 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x44, /* bytes 20224 - 20240 */ + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x54, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 20240 - 20256 */ + 0x00, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x40, 0x14, 0x40, 0x40, 0x44, 0x14, 0x40, /* bytes 20256 - 20272 */ + 0x44, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x04, + 0x10, 0x44, 0x50, 0x40, 0x50, 0x50, 0x54, 0x44, /* bytes 20272 - 20288 */ + 0x50, 0x50, 0x50, 0xc0, 0x50, 0x50, 0x54, 0x50, + 0x50, 0x50, 0x54, 0xc0, 0x50, 0x50, 0x50, 0x50, /* bytes 20288 - 20304 */ + 0x54, 0x54, 0x54, 0x44, 0x50, 0x54, 0x54, 0x50, + 0x54, 0x10, 0x50, 0x44, 0x50, 0x40, 0x50, 0x40, /* bytes 20304 - 20320 */ + 0x40, 0x00, 0x40, 0x44, 0x50, 0x44, 0x54, 0x40, + 0x44, 0x44, 0x00, 0x00, 0x44, 0x50, 0x54, 0x50, /* bytes 20320 - 20336 */ + 0x50, 0x40, 0x40, 0x04, 0x44, 0x40, 0x50, 0x40, + 0x10, 0x44, 0x44, 0x40, 0x14, 0x40, 0x50, 0x40, /* bytes 20336 - 20352 */ + 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x14, 0x40, + 0x40, 0x40, 0x50, 0x40, 0x40, 0x00, 0x00, 0x00, /* bytes 20352 - 20368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20368 - 20384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20384 - 20400 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 20400 - 20416 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, + 0x00, 0x50, 0x04, 0x50, 0x04, 0x10, 0x00, 0x10, /* bytes 20416 - 20432 */ + 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x40, 0x54, /* bytes 20432 - 20448 */ + 0x40, 0x54, 0x40, 0x50, 0xc0, 0x50, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, /* bytes 20448 - 20464 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 20464 - 20480 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 20480 - 20496 */ + 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, /* bytes 20496 - 20512 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x50, 0x50, 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, /* bytes 20512 - 20528 */ + 0x00, 0x00, 0x00, 0x50, 0x40, 0x50, 0x40, 0x50, + 0x40, 0x14, 0x00, 0x54, 0x44, 0x54, 0x04, 0x50, /* bytes 20528 - 20544 */ + 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 20544 - 20560 */ + 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x04, 0x50, 0x04, 0x50, 0x40, 0x00, 0x00, 0x00, /* bytes 20560 - 20576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20576 - 20592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20592 - 20608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20608 - 20624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, /* bytes 20624 - 20640 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x50, 0x44, /* bytes 20640 - 20656 */ + 0x50, 0x44, 0x50, 0x40, 0x50, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 20656 - 20672 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x04, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 20672 - 20688 */ + 0x40, 0x00, 0x40, 0x00, 0x44, 0x04, 0x44, 0x40, + 0x44, 0x40, 0x10, 0x40, 0x14, 0x40, 0x14, 0x44, /* bytes 20688 - 20704 */ + 0x50, 0x44, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, 0x50, 0x50, /* bytes 20704 - 20720 */ + 0x50, 0x44, 0x54, 0x50, 0x50, 0x50, 0x54, 0x54, + 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, 0x40, 0x00, /* bytes 20720 - 20736 */ + 0x00, 0x00, 0x10, 0x44, 0x10, 0x40, 0x40, 0x40, + 0x54, 0x40, 0x40, 0x50, 0x54, 0x54, 0x50, 0x40, /* bytes 20736 - 20752 */ + 0x50, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, + 0x14, 0x04, 0x10, 0x40, 0x50, 0x44, 0x44, 0x40, /* bytes 20752 - 20768 */ + 0x14, 0x40, 0x50, 0x40, 0x50, 0x40, 0x44, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 20768 - 20784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20784 - 20800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20800 - 20816 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, /* bytes 20816 - 20832 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 20832 - 20848 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, 0x40, 0x54, /* bytes 20848 - 20864 */ + 0x40, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 20864 - 20880 */ + 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 20880 - 20896 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x54, 0x00, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 20896 - 20912 */ + 0x00, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0xc0, 0x54, /* bytes 20912 - 20928 */ + 0x00, 0x54, 0x44, 0x50, 0x40, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x00, 0x50, 0x00, 0x50, 0x00, 0x40, /* bytes 20928 - 20944 */ + 0x00, 0x50, 0x40, 0x10, 0x00, 0x50, 0x40, 0x54, + 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, 0x50, 0x54, /* bytes 20944 - 20960 */ + 0x00, 0x50, 0x40, 0x50, 0x00, 0x14, 0x40, 0x50, + 0x00, 0x54, 0x04, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 20960 - 20976 */ + 0x00, 0x54, 0x40, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 20976 - 20992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20992 - 21008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21008 - 21024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21024 - 21040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21040 - 21056 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, + 0x40, 0x44, 0x14, 0x04, 0x44, 0x44, 0x50, 0x40, /* bytes 21056 - 21072 */ + 0x50, 0x44, 0x40, 0x00, 0x50, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21072 - 21088 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x40, 0x40, 0x00, 0x40, 0x04, 0x10, 0x40, /* bytes 21088 - 21104 */ + 0x40, 0x40, 0x44, 0x00, 0x40, 0x40, 0x40, 0x00, + 0x40, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x40, /* bytes 21104 - 21120 */ + 0x44, 0x10, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, + 0x10, 0x40, 0x50, 0x40, 0x50, 0x50, 0x50, 0x40, /* bytes 21120 - 21136 */ + 0x54, 0x54, 0x50, 0x40, 0x50, 0x50, 0x50, 0x50, + 0x50, 0x14, 0x14, 0x04, 0x40, 0x44, 0x40, 0x00, /* bytes 21136 - 21152 */ + 0x04, 0x40, 0x44, 0x00, 0x40, 0x40, 0x50, 0x40, + 0x00, 0x44, 0x54, 0x40, 0x50, 0x50, 0x50, 0x40, /* bytes 21152 - 21168 */ + 0x10, 0x40, 0x50, 0x40, 0x40, 0x40, 0x50, 0x40, + 0x40, 0x44, 0x14, 0x40, 0x44, 0x40, 0x50, 0x40, /* bytes 21168 - 21184 */ + 0x40, 0x40, 0x10, 0x40, 0x44, 0x40, 0x14, 0x40, + 0x44, 0x40, 0x50, 0x40, 0x40, 0x00, 0x00, 0x00, /* bytes 21184 - 21200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21200 - 21216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21216 - 21232 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 21232 - 21248 */ + 0x00, 0x40, 0x00, 0x44, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, /* bytes 21248 - 21264 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, + 0x40, 0x54, 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, /* bytes 21264 - 21280 */ + 0x00, 0x50, 0x00, 0x54, 0xc0, 0x00, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, /* bytes 21280 - 21296 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 21296 - 21312 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, /* bytes 21312 - 21328 */ + 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x44, 0x50, 0x40, 0xa8, /* bytes 21328 - 21344 */ + 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, 0x04, 0x54, + 0x40, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 21344 - 21360 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, + 0x40, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 21360 - 21376 */ + 0x04, 0x54, 0x40, 0x54, 0x40, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 21376 - 21392 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, + 0x00, 0x50, 0x00, 0x50, 0x04, 0x00, 0x00, 0x00, /* bytes 21392 - 21408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21408 - 21424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21424 - 21440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21440 - 21456 */ + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21456 - 21472 */ + 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, + 0x10, 0x40, 0x44, 0x04, 0x44, 0x40, 0x44, 0x40, /* bytes 21472 - 21488 */ + 0x44, 0x00, 0x54, 0x54, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 21488 - 21504 */ + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, /* bytes 21504 - 21520 */ + 0x40, 0x00, 0x44, 0x04, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, 0x40, 0x40, /* bytes 21520 - 21536 */ + 0x44, 0x40, 0x40, 0x40, 0x44, 0x04, 0x40, 0x40, + 0x50, 0x40, 0x50, 0x44, 0x54, 0x50, 0x50, 0x50, /* bytes 21536 - 21552 */ + 0x54, 0x50, 0x50, 0x44, 0x50, 0x50, 0x50, 0x44, + 0x50, 0x14, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 21552 - 21568 */ + 0x40, 0x00, 0x40, 0x40, 0x10, 0x40, 0x40, 0x50, + 0x54, 0x50, 0x50, 0x50, 0x50, 0x44, 0x14, 0x40, /* bytes 21568 - 21584 */ + 0x10, 0x40, 0x50, 0x40, 0x10, 0x40, 0x40, 0x40, + 0x14, 0x40, 0x40, 0x40, 0x10, 0x40, 0x10, 0x40, /* bytes 21584 - 21600 */ + 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x44, 0x40, + 0x40, 0x40, 0x10, 0x44, 0x10, 0x00, 0x00, 0x00, /* bytes 21600 - 21616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21616 - 21632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21632 - 21648 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 21648 - 21664 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, /* bytes 21664 - 21680 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, + 0x40, 0x54, 0x00, 0x40, 0x00, 0x54, 0x40, 0x14, /* bytes 21680 - 21696 */ + 0x00, 0x54, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, /* bytes 21696 - 21712 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 21712 - 21728 */ + 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x10, /* bytes 21728 - 21744 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x40, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 21744 - 21760 */ + 0x40, 0x54, 0x40, 0x50, 0x04, 0x54, 0x40, 0x50, + 0x00, 0x54, 0x44, 0x50, 0x00, 0x50, 0x00, 0x40, /* bytes 21760 - 21776 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x50, 0x54, + 0xc0, 0x54, 0x04, 0x50, 0x40, 0x54, 0x00, 0x50, /* bytes 21776 - 21792 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x14, 0x00, 0x50, 0x00, 0x50, 0x04, 0x10, /* bytes 21792 - 21808 */ + 0x00, 0x54, 0x40, 0x10, 0x00, 0x54, 0x40, 0x10, + 0x00, 0x54, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 21808 - 21824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21824 - 21840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21840 - 21856 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 21856 - 21872 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21872 - 21888 */ + 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0x50, 0x40, + 0x40, 0x40, 0x50, 0x40, 0x40, 0x40, 0x40, 0x00, /* bytes 21888 - 21904 */ + 0x40, 0x50, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21904 - 21920 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21920 - 21936 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, /* bytes 21936 - 21952 */ + 0x40, 0x04, 0x40, 0x40, 0x40, 0x40, 0x50, 0x00, + 0x40, 0x40, 0x50, 0x40, 0x50, 0x50, 0x50, 0x44, /* bytes 21952 - 21968 */ + 0x54, 0x54, 0x54, 0x40, 0x40, 0x40, 0x50, 0x40, + 0x10, 0x40, 0x14, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 21968 - 21984 */ + 0x40, 0x00, 0x40, 0x40, 0x54, 0x54, 0x54, 0x50, + 0x54, 0x50, 0x50, 0x40, 0x44, 0x40, 0x10, 0x04, /* bytes 21984 - 22000 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x40, 0x44, 0x14, 0x04, 0x40, 0x40, 0x50, 0x40, /* bytes 22000 - 22016 */ + 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x40, + 0x44, 0x40, 0x10, 0x40, 0x14, 0x00, 0x00, 0x00, /* bytes 22016 - 22032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22032 - 22048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22048 - 22064 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 22064 - 22080 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 22080 - 22096 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x54, + 0x40, 0x54, 0x00, 0x54, 0x04, 0x50, 0x00, 0x50, /* bytes 22096 - 22112 */ + 0x40, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, /* bytes 22112 - 22128 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, /* bytes 22128 - 22144 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, /* bytes 22144 - 22160 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, + 0x40, 0x50, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, /* bytes 22160 - 22176 */ + 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, + 0x44, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, /* bytes 22176 - 22192 */ + 0x00, 0x50, 0x40, 0x54, 0x40, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 22192 - 22208 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 22208 - 22224 */ + 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x54, + 0x00, 0x50, 0x00, 0x54, 0x04, 0x00, 0x00, 0x00, /* bytes 22224 - 22240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22240 - 22256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22256 - 22272 */ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22272 - 22288 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22288 - 22304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x14, 0x04, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 22304 - 22320 */ + 0x50, 0x50, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22320 - 22336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22336 - 22352 */ + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 22352 - 22368 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x40, /* bytes 22368 - 22384 */ + 0x10, 0x40, 0x50, 0x50, 0x54, 0x50, 0x50, 0x40, + 0x10, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, /* bytes 22384 - 22400 */ + 0x50, 0x44, 0x10, 0x40, 0x40, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 22400 - 22416 */ + 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 22416 - 22432 */ + 0x44, 0x00, 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, + 0x10, 0x40, 0x10, 0x44, 0x10, 0x00, 0x00, 0x00, /* bytes 22432 - 22448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22448 - 22464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22464 - 22480 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 22480 - 22496 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, /* bytes 22496 - 22512 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x14, 0x40, 0x10, 0x00, 0x54, 0x00, 0x10, /* bytes 22512 - 22528 */ + 0x00, 0x54, 0x04, 0x00, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, /* bytes 22528 - 22544 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 22544 - 22560 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 22560 - 22576 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 22576 - 22592 */ + 0x40, 0x54, 0x44, 0x50, 0x00, 0x54, 0x40, 0x10, + 0x00, 0x50, 0x00, 0x14, 0x00, 0x54, 0x00, 0x10, /* bytes 22592 - 22608 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 22608 - 22624 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, /* bytes 22624 - 22640 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, + 0x00, 0x54, 0x04, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 22640 - 22656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22656 - 22672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22672 - 22688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22688 - 22704 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22704 - 22720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x44, 0x10, 0x00, 0x44, 0x40, 0x44, 0x40, /* bytes 22720 - 22736 */ + 0x50, 0x50, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22736 - 22752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 22752 - 22768 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 22768 - 22784 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, + 0x40, 0x04, 0x40, 0x40, 0x40, 0x44, 0x14, 0x40, /* bytes 22784 - 22800 */ + 0x50, 0x10, 0x50, 0x40, 0x44, 0x40, 0x50, 0x40, + 0x10, 0x40, 0x10, 0x44, 0x40, 0x00, 0x40, 0x00, /* bytes 22800 - 22816 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 22816 - 22832 */ + 0x40, 0x00, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 22832 - 22848 */ + 0x40, 0x04, 0x44, 0x00, 0x40, 0x40, 0x10, 0x40, + 0x44, 0x40, 0x10, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 22848 - 22864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22864 - 22880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22880 - 22896 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 22896 - 22912 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, 0x00, 0x40, /* bytes 22912 - 22928 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, /* bytes 22928 - 22944 */ + 0x44, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22944 - 22960 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, /* bytes 22960 - 22976 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, /* bytes 22976 - 22992 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 22992 - 23008 */ + 0x40, 0x50, 0x00, 0x54, 0x00, 0x54, 0x00, 0x50, + 0x40, 0x50, 0x00, 0x54, 0x00, 0x44, 0x00, 0x10, /* bytes 23008 - 23024 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, /* bytes 23024 - 23040 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x50, /* bytes 23040 - 23056 */ + 0x00, 0x10, 0x00, 0x54, 0x00, 0x50, 0x00, 0x50, + 0x04, 0x50, 0x00, 0x50, 0x40, 0x00, 0x00, 0x00, /* bytes 23056 - 23072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23072 - 23088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23088 - 23104 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23104 - 23120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23120 - 23136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x44, /* bytes 23136 - 23152 */ + 0x50, 0x40, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23152 - 23168 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, /* bytes 23168 - 23184 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23184 - 23200 */ + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, /* bytes 23200 - 23216 */ + 0x10, 0x40, 0x44, 0x40, 0x14, 0x40, 0x44, 0x40, + 0x50, 0x40, 0x44, 0x40, 0x44, 0x00, 0x40, 0x40, /* bytes 23216 - 23232 */ + 0x44, 0x04, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 23232 - 23248 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, /* bytes 23248 - 23264 */ + 0x44, 0x00, 0x10, 0x40, 0x10, 0x00, 0x44, 0x44, + 0x10, 0x40, 0x10, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 23264 - 23280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23280 - 23296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23296 - 23312 */ + 0x00, 0x10, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23312 - 23328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, /* bytes 23328 - 23344 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, /* bytes 23344 - 23360 */ + 0x40, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23360 - 23376 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 23376 - 23392 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 23392 - 23408 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 23408 - 23424 */ + 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x40, /* bytes 23424 - 23440 */ + 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 23440 - 23456 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x44, + 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 23456 - 23472 */ + 0x00, 0x54, 0x00, 0x14, 0x00, 0x50, 0x40, 0x50, + 0x00, 0x54, 0x04, 0x50, 0x04, 0x00, 0x00, 0x00, /* bytes 23472 - 23488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23488 - 23504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23504 - 23520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23520 - 23536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23536 - 23552 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x10, 0x40, /* bytes 23552 - 23568 */ + 0x50, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23568 - 23584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23584 - 23600 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23600 - 23616 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x40, 0x04, 0x44, 0x00, /* bytes 23616 - 23632 */ + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x04, + 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 23632 - 23648 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23648 - 23664 */ + 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x40, 0x44, 0x00, 0x40, 0x40, 0x44, 0x04, /* bytes 23664 - 23680 */ + 0x40, 0x40, 0x10, 0x04, 0x44, 0x40, 0x10, 0x40, + 0x44, 0x40, 0x14, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 23680 - 23696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23696 - 23712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23712 - 23728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23728 - 23744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 23744 - 23760 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x10, 0x40, 0x54, 0x04, 0x54, /* bytes 23760 - 23776 */ + 0x40, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, /* bytes 23776 - 23792 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, /* bytes 23792 - 23808 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, /* bytes 23808 - 23824 */ + 0x00, 0x44, 0x00, 0x40, 0x00, 0x44, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 23824 - 23840 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, /* bytes 23840 - 23856 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 23856 - 23872 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 23872 - 23888 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x04, 0x54, 0x40, 0x54, 0x04, 0x00, 0x00, 0x00, /* bytes 23888 - 23904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23904 - 23920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23920 - 23936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23936 - 23952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 23952 - 23968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x40, 0x50, 0x40, 0x50, 0x54, /* bytes 23968 - 23984 */ + 0x50, 0x00, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23984 - 24000 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24000 - 24016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24016 - 24032 */ + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, /* bytes 24032 - 24048 */ + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 24048 - 24064 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 24064 - 24080 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, + 0x40, 0x00, 0x40, 0x04, 0x40, 0x40, 0x44, 0x04, /* bytes 24080 - 24096 */ + 0x10, 0x40, 0x10, 0x40, 0x14, 0x40, 0x10, 0x44, + 0x14, 0x40, 0x10, 0x44, 0x10, 0x00, 0x00, 0x00, /* bytes 24096 - 24112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24112 - 24128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24128 - 24144 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24144 - 24160 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, /* bytes 24160 - 24176 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x44, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x40, 0x54, /* bytes 24176 - 24192 */ + 0x04, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 24192 - 24208 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, /* bytes 24208 - 24224 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 24224 - 24240 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 24240 - 24256 */ + 0x00, 0x10, 0x00, 0x44, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 24256 - 24272 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 24272 - 24288 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, /* bytes 24288 - 24304 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, + 0x04, 0x54, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 24304 - 24320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24320 - 24336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24336 - 24352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24352 - 24368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24368 - 24384 */ + 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x44, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x44, 0x44, 0x50, 0x40, /* bytes 24384 - 24400 */ + 0x40, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24400 - 24416 */ + 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24416 - 24432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 24432 - 24448 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 24448 - 24464 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 24464 - 24480 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 24480 - 24496 */ + 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x10, 0x00, + 0x40, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x04, /* bytes 24496 - 24512 */ + 0x44, 0x40, 0x10, 0x04, 0x44, 0x44, 0x14, 0x40, + 0x44, 0x44, 0x14, 0x40, 0x44, 0x00, 0x00, 0x00, /* bytes 24512 - 24528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24528 - 24544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24544 - 24560 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 24560 - 24576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 24576 - 24592 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, /* bytes 24592 - 24608 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 24608 - 24624 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 24624 - 24640 */ + 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, /* bytes 24640 - 24656 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, /* bytes 24656 - 24672 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 24672 - 24688 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 24688 - 24704 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, /* bytes 24704 - 24720 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 24720 - 24736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24736 - 24752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24752 - 24768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24768 - 24784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24784 - 24800 */ + 0x40, 0x00, 0x40, 0x04, 0x10, 0x04, 0x40, 0x40, + 0x40, 0x04, 0x40, 0x00, 0x40, 0x40, 0x50, 0x44, /* bytes 24800 - 24816 */ + 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 24816 - 24832 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24832 - 24848 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 24848 - 24864 */ + 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 24864 - 24880 */ + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 24880 - 24896 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 24896 - 24912 */ + 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, /* bytes 24912 - 24928 */ + 0x10, 0x04, 0x44, 0x40, 0x10, 0x04, 0x10, 0x40, + 0x10, 0x04, 0x40, 0x40, 0x10, 0x00, 0x00, 0x00, /* bytes 24928 - 24944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24944 - 24960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24960 - 24976 */ + 0x00, 0x54, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, /* bytes 24976 - 24992 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 24992 - 25008 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x04, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 25008 - 25024 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25024 - 25040 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25040 - 25056 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x44, /* bytes 25056 - 25072 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, /* bytes 25072 - 25088 */ + 0x00, 0x14, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 25088 - 25104 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 25104 - 25120 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 25120 - 25136 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, 0x00, 0x10, + 0x00, 0x54, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, /* bytes 25136 - 25152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25152 - 25168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25168 - 25184 */ + 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25184 - 25200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 25200 - 25216 */ + 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 25216 - 25232 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 25232 - 25248 */ + 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 25248 - 25264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 25264 - 25280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 25280 - 25296 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 25296 - 25312 */ + 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x40, 0x00, + 0x04, 0x00, 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, /* bytes 25312 - 25328 */ + 0x40, 0x04, 0x44, 0x00, 0x04, 0x00, 0x40, 0x04, + 0x00, 0x00, 0x44, 0x00, 0x04, 0x40, 0x10, 0x00, /* bytes 25328 - 25344 */ + 0x40, 0x40, 0x10, 0x00, 0x40, 0x04, 0x10, 0x00, + 0x04, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25344 - 25360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25360 - 25376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25376 - 25392 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, /* bytes 25392 - 25408 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, /* bytes 25408 - 25424 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 25424 - 25440 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 25440 - 25456 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, /* bytes 25456 - 25472 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 25472 - 25488 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x44, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 25488 - 25504 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 25504 - 25520 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, /* bytes 25520 - 25536 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 25536 - 25552 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 25552 - 25568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25568 - 25584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25584 - 25600 */ + 0x00, 0x04, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25600 - 25616 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25616 - 25632 */ + 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, /* bytes 25632 - 25648 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, /* bytes 25648 - 25664 */ + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25664 - 25680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 25680 - 25696 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 25696 - 25712 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25712 - 25728 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 25728 - 25744 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x40, 0x00, 0x40, 0x40, 0x44, 0x00, 0x40, 0x00, /* bytes 25744 - 25760 */ + 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25760 - 25776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25776 - 25792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25792 - 25808 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x54, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, /* bytes 25808 - 25824 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25824 - 25840 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, /* bytes 25840 - 25856 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25856 - 25872 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25872 - 25888 */ + 0x00, 0x10, 0x00, 0x04, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x44, /* bytes 25888 - 25904 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x00, 0x40, /* bytes 25904 - 25920 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x54, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 25920 - 25936 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x44, /* bytes 25936 - 25952 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x44, /* bytes 25952 - 25968 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25968 - 25984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25984 - 26000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26000 - 26016 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, + 0x40, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26016 - 26032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 26032 - 26048 */ + 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x40, 0x00, + 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x00, /* bytes 26048 - 26064 */ + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 26064 - 26080 */ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26080 - 26096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 26096 - 26112 */ + 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x40, 0x00, /* bytes 26112 - 26128 */ + 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26128 - 26144 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x04, 0x40, 0x00, + 0x04, 0x04, 0x40, 0x00, 0x04, 0x04, 0x40, 0x00, /* bytes 26144 - 26160 */ + 0x04, 0x00, 0x44, 0x00, 0x00, 0x04, 0x44, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 26160 - 26176 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26176 - 26192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26192 - 26208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26208 - 26224 */ + 0x00, 0x40, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, /* bytes 26224 - 26240 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 26240 - 26256 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x14, /* bytes 26256 - 26272 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x44, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, /* bytes 26272 - 26288 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x44, /* bytes 26288 - 26304 */ + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 26304 - 26320 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 26320 - 26336 */ + 0x00, 0x40, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, /* bytes 26336 - 26352 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 26352 - 26368 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 26368 - 26384 */ + 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 26384 - 26400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26400 - 26416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26416 - 26432 */ + 0x00, 0x00, 0x40, 0x00, 0x10, 0x40, 0x40, 0x40, + 0x44, 0x40, 0x40, 0x40, 0x44, 0x04, 0x40, 0x00, /* bytes 26432 - 26448 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, /* bytes 26448 - 26464 */ + 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, + 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x40, 0x00, /* bytes 26464 - 26480 */ + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26480 - 26496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26496 - 26512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26512 - 26528 */ + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26528 - 26544 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26544 - 26560 */ + 0x00, 0x00, 0x40, 0x00, 0x44, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 26560 - 26576 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 26576 - 26592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26592 - 26608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26608 - 26624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26624 - 26640 */ + 0x00, 0x10, 0x00, 0x44, 0x00, 0x50, 0x40, 0x10, + 0x00, 0x54, 0x00, 0x14, 0x00, 0x50, 0x00, 0x40, /* bytes 26640 - 26656 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 26656 - 26672 */ + 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, /* bytes 26672 - 26688 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 26688 - 26704 */ + 0x00, 0x10, 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 26704 - 26720 */ + 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x54, 0x00, 0x40, /* bytes 26720 - 26736 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 26736 - 26752 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x14, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, /* bytes 26752 - 26768 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, /* bytes 26768 - 26784 */ + 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, /* bytes 26784 - 26800 */ + 0x00, 0x50, 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26800 - 26816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26816 - 26832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26832 - 26848 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x40, + 0x44, 0x40, 0x10, 0x00, 0x40, 0x40, 0x10, 0x00, /* bytes 26848 - 26864 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 26864 - 26880 */ + 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, + 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, /* bytes 26880 - 26896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 26896 - 26912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26912 - 26928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26928 - 26944 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 26944 - 26960 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 26960 - 26976 */ + 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x44, 0x00, /* bytes 26976 - 26992 */ + 0x40, 0x04, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 26992 - 27008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27008 - 27024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27024 - 27040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27040 - 27056 */ + 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, /* bytes 27056 - 27072 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 27072 - 27088 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x40, /* bytes 27088 - 27104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 27104 - 27120 */ + 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, /* bytes 27120 - 27136 */ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, /* bytes 27136 - 27152 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, /* bytes 27152 - 27168 */ + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 27168 - 27184 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 27184 - 27200 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x50, 0x00, 0x04, 0x00, 0x40, /* bytes 27200 - 27216 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, + 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 27216 - 27232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27232 - 27248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27248 - 27264 */ + 0x00, 0x00, 0x00, 0x40, 0x10, 0x40, 0x10, 0x40, + 0x10, 0x04, 0x40, 0x40, 0x44, 0x04, 0x40, 0x04, /* bytes 27264 - 27280 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, /* bytes 27280 - 27296 */ + 0x10, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, + 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, /* bytes 27296 - 27312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27312 - 27328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27328 - 27344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27344 - 27360 */ + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x04, /* bytes 27360 - 27376 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 27376 - 27392 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 27392 - 27408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27408 - 27424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27424 - 27440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27440 - 27456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27456 - 27472 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x54, 0x40, 0x14, + 0x00, 0x54, 0x00, 0x14, 0x00, 0x50, 0x00, 0x40, /* bytes 27472 - 27488 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 27488 - 27504 */ + 0x00, 0x54, 0x00, 0x50, 0x00, 0x54, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x00, /* bytes 27504 - 27520 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 27520 - 27536 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 27536 - 27552 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x04, 0x00, 0x50, 0x00, 0x04, /* bytes 27552 - 27568 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x44, 0x00, 0x10, 0x00, 0x40, /* bytes 27568 - 27584 */ + 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, /* bytes 27584 - 27600 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x54, 0x00, 0x40, 0x00, 0x50, 0x00, 0x04, /* bytes 27600 - 27616 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, /* bytes 27616 - 27632 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27632 - 27648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27648 - 27664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27664 - 27680 */ + 0x00, 0x40, 0x10, 0x40, 0x44, 0x40, 0x10, 0x00, + 0x40, 0x04, 0x10, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 27680 - 27696 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x40, 0x04, /* bytes 27696 - 27712 */ + 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27712 - 27728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27728 - 27744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27744 - 27760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27760 - 27776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, /* bytes 27776 - 27792 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x44, 0x00, + 0x00, 0x04, 0x44, 0x00, 0x00, 0x00, 0x44, 0x00, /* bytes 27792 - 27808 */ + 0x04, 0x00, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27808 - 27824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27824 - 27840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27840 - 27856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27856 - 27872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27872 - 27888 */ + 0x00, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, /* bytes 27888 - 27904 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 27904 - 27920 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 27920 - 27936 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 27936 - 27952 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 27952 - 27968 */ + 0x00, 0x04, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 27968 - 27984 */ + 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x44, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 27984 - 28000 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 28000 - 28016 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, /* bytes 28016 - 28032 */ + 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x10, + 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 28032 - 28048 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 28048 - 28064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28064 - 28080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28080 - 28096 */ + 0x00, 0x40, 0x10, 0x40, 0x10, 0x40, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x04, 0x44, 0x04, 0x40, 0x40, /* bytes 28096 - 28112 */ + 0x44, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, + 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, /* bytes 28112 - 28128 */ + 0x10, 0x00, 0x44, 0x40, 0x40, 0x04, 0x40, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28128 - 28144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28144 - 28160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28160 - 28176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28176 - 28192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 28192 - 28208 */ + 0x40, 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 28208 - 28224 */ + 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28224 - 28240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28240 - 28256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28256 - 28272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28272 - 28288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28288 - 28304 */ + 0x00, 0x54, 0x40, 0x14, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x04, 0x14, /* bytes 28304 - 28320 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 28320 - 28336 */ + 0x00, 0x10, 0x04, 0x10, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 28336 - 28352 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 28352 - 28368 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 28368 - 28384 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 28384 - 28400 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x44, /* bytes 28400 - 28416 */ + 0x00, 0x50, 0x00, 0x44, 0x00, 0x54, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, /* bytes 28416 - 28432 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 28432 - 28448 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 28448 - 28464 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28464 - 28480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28480 - 28496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28496 - 28512 */ + 0x00, 0x40, 0x14, 0x04, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x40, 0x10, 0x04, 0x40, 0x40, 0x10, 0x04, /* bytes 28512 - 28528 */ + 0x40, 0x40, 0x10, 0x00, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x00, 0x44, 0x00, 0x40, 0x04, 0x10, 0x04, /* bytes 28528 - 28544 */ + 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28544 - 28560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28560 - 28576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28576 - 28592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28592 - 28608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28608 - 28624 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 28624 - 28640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28640 - 28656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28656 - 28672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28672 - 28688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28688 - 28704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28704 - 28720 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x54, 0x04, 0x50, 0x00, 0x50, /* bytes 28720 - 28736 */ + 0x04, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, /* bytes 28736 - 28752 */ + 0x00, 0x50, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 28752 - 28768 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 28768 - 28784 */ + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, /* bytes 28784 - 28800 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, /* bytes 28800 - 28816 */ + 0x00, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, /* bytes 28816 - 28832 */ + 0x00, 0x44, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, /* bytes 28832 - 28848 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, /* bytes 28848 - 28864 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 28864 - 28880 */ + 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, + 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 28880 - 28896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28896 - 28912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28912 - 28928 */ + 0x00, 0x00, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, + 0x10, 0x00, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, /* bytes 28928 - 28944 */ + 0x10, 0x40, 0x40, 0x00, 0x00, 0x00, 0x40, 0x04, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, /* bytes 28944 - 28960 */ + 0x40, 0x00, 0x40, 0x40, 0x44, 0x00, 0x40, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28960 - 28976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28976 - 28992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28992 - 29008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29008 - 29024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29024 - 29040 */ + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29040 - 29056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29056 - 29072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29072 - 29088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29088 - 29104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29104 - 29120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29120 - 29136 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x04, 0x50, /* bytes 29136 - 29152 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 29152 - 29168 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 29168 - 29184 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 29184 - 29200 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 29200 - 29216 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x04, /* bytes 29216 - 29232 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x14, 0x00, 0x00, /* bytes 29232 - 29248 */ + 0x00, 0x14, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, /* bytes 29248 - 29264 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 29264 - 29280 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 29280 - 29296 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29296 - 29312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29312 - 29328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29328 - 29344 */ + 0x00, 0x40, 0x10, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x40, 0x00, 0x14, 0x04, 0x50, 0x40, 0x14, 0x40, /* bytes 29344 - 29360 */ + 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x04, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, /* bytes 29360 - 29376 */ + 0x40, 0x40, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29376 - 29392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29392 - 29408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29408 - 29424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29424 - 29440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 29440 - 29456 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29456 - 29472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29472 - 29488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29488 - 29504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29504 - 29520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29520 - 29536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29536 - 29552 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x40, 0x50, 0x00, 0x50, /* bytes 29552 - 29568 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, /* bytes 29568 - 29584 */ + 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, /* bytes 29584 - 29600 */ + 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 29600 - 29616 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 29616 - 29632 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, /* bytes 29632 - 29648 */ + 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x14, 0x00, 0x40, 0x00, 0x10, /* bytes 29648 - 29664 */ + 0x00, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, /* bytes 29664 - 29680 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 29680 - 29696 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, /* bytes 29696 - 29712 */ + 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x04, + 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 29712 - 29728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29728 - 29744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29744 - 29760 */ + 0x00, 0x00, 0x40, 0x40, 0x10, 0x40, 0x10, 0x40, + 0x10, 0x40, 0x44, 0x40, 0x10, 0x40, 0x44, 0x40, /* bytes 29760 - 29776 */ + 0x40, 0x04, 0x40, 0x00, 0x40, 0x40, 0x40, 0x04, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 29776 - 29792 */ + 0x40, 0x00, 0x40, 0x40, 0x44, 0x04, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29792 - 29808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29808 - 29824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29824 - 29840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29840 - 29856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29856 - 29872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29872 - 29888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29888 - 29904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29904 - 29920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29920 - 29936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29936 - 29952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29952 - 29968 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x54, 0x04, 0x14, 0x00, 0x50, 0x00, 0x10, /* bytes 29968 - 29984 */ + 0x00, 0x50, 0x00, 0x40, 0x00, 0x54, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 29984 - 30000 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x54, 0x00, 0x40, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 30000 - 30016 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 30016 - 30032 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 30032 - 30048 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 30048 - 30064 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, /* bytes 30064 - 30080 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 30080 - 30096 */ + 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 30096 - 30112 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 30112 - 30128 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30128 - 30144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30144 - 30160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30160 - 30176 */ + 0x00, 0x00, 0x40, 0x00, 0x40, 0x44, 0x10, 0x04, + 0x40, 0x40, 0x14, 0x04, 0x40, 0x40, 0x50, 0x04, /* bytes 30176 - 30192 */ + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x10, 0x00, + 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, /* bytes 30192 - 30208 */ + 0x40, 0x40, 0x10, 0x04, 0x40, 0x04, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30208 - 30224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30224 - 30240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30240 - 30256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30256 - 30272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30272 - 30288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30288 - 30304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30304 - 30320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30320 - 30336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30336 - 30352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30352 - 30368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30368 - 30384 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, + 0x04, 0x14, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, /* bytes 30384 - 30400 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x50, 0x00, 0x54, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 30400 - 30416 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 30416 - 30432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 30432 - 30448 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 30448 - 30464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 30464 - 30480 */ + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, /* bytes 30480 - 30496 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, /* bytes 30496 - 30512 */ + 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 30512 - 30528 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x40, /* bytes 30528 - 30544 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 30544 - 30560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30560 - 30576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30576 - 30592 */ + 0x00, 0x04, 0x00, 0x00, 0x44, 0x40, 0x10, 0x40, + 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, /* bytes 30592 - 30608 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x44, 0x40, + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 30608 - 30624 */ + 0x40, 0x00, 0x40, 0x04, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30624 - 30640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30640 - 30656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30656 - 30672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30672 - 30688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30688 - 30704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30704 - 30720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30720 - 30736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30736 - 30752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30752 - 30768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; static const GBitmap s_Jane_after_01_bitmap = { - .addr = (void*) &s_Jane_after_01_pixels, - .row_size_bytes = 208, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 205, .h = 148 }, - }, + .addr = (void *)&s_Jane_after_01_pixels, + .row_size_bytes = 208, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 205, .h = 148}, + }, }; diff --git a/src/fw/apps/demo/demo_images/Morgan_after_03.png.h b/src/fw/apps/demo/demo_images/Morgan_after_03.png.h index 0d03bcf220..b9edbf9e5f 100644 --- a/src/fw/apps/demo/demo_images/Morgan_after_03.png.h +++ b/src/fw/apps/demo/demo_images/Morgan_after_03.png.h @@ -6,1938 +6,3862 @@ // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_Morgan_after_03_pixels[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 16 - 32 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 32 - 48 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 48 - 64 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 64 - 80 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 80 - 96 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 96 - 112 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 112 - 128 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 128 - 144 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 144 - 160 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 160 - 176 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 224 - 240 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 240 - 256 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 256 - 272 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 272 - 288 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 288 - 304 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 304 - 320 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 320 - 336 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 336 - 352 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 352 - 368 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 368 - 384 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 432 - 448 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 448 - 464 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 464 - 480 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 480 - 496 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 496 - 512 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 512 - 528 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 528 - 544 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 544 - 560 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 560 - 576 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 576 - 592 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 608 - 624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 640 - 656 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 656 - 672 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 672 - 688 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 688 - 704 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 704 - 720 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 720 - 736 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 736 - 752 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 752 - 768 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 768 - 784 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 784 - 800 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 848 - 864 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 864 - 880 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 880 - 896 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 896 - 912 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 912 - 928 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 928 - 944 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 944 - 960 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 960 - 976 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 976 - 992 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 992 - 1008 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 1008 - 1024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1056 - 1072 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1072 - 1088 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1088 - 1104 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1104 - 1120 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1120 - 1136 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1136 - 1152 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1152 - 1168 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1168 - 1184 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1184 - 1200 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1200 - 1216 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1248 - 1264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1264 - 1280 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1280 - 1296 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1296 - 1312 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1312 - 1328 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1328 - 1344 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1344 - 1360 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1360 - 1376 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1376 - 1392 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1392 - 1408 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1408 - 1424 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1472 - 1488 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1488 - 1504 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1504 - 1520 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1520 - 1536 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1536 - 1552 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1552 - 1568 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1568 - 1584 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1584 - 1600 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1600 - 1616 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1616 - 1632 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1648 - 1664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1680 - 1696 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1696 - 1712 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1712 - 1728 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1728 - 1744 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1744 - 1760 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1760 - 1776 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1776 - 1792 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1792 - 1808 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1808 - 1824 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1824 - 1840 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1888 - 1904 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1904 - 1920 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1920 - 1936 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1936 - 1952 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1952 - 1968 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1968 - 1984 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1984 - 2000 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2000 - 2016 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 2016 - 2032 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 2032 - 2048 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 2048 - 2064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2096 - 2112 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2112 - 2128 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2128 - 2144 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2144 - 2160 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2160 - 2176 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2176 - 2192 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2192 - 2208 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2208 - 2224 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 2224 - 2240 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 2240 - 2256 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2288 - 2304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2304 - 2320 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2320 - 2336 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2336 - 2352 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2352 - 2368 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2368 - 2384 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2384 - 2400 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2400 - 2416 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2416 - 2432 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 2432 - 2448 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2448 - 2464 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2512 - 2528 */ - 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2528 - 2544 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2544 - 2560 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2560 - 2576 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2576 - 2592 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2592 - 2608 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2608 - 2624 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 2624 - 2640 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 2640 - 2656 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 2656 - 2672 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2688 - 2704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2720 - 2736 */ - 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2736 - 2752 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2752 - 2768 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2768 - 2784 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2784 - 2800 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2800 - 2816 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2816 - 2832 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 2832 - 2848 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 2848 - 2864 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 2864 - 2880 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2928 - 2944 */ - 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2944 - 2960 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2960 - 2976 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2976 - 2992 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2992 - 3008 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3008 - 3024 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3024 - 3040 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3040 - 3056 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 3056 - 3072 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3072 - 3088 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 3088 - 3104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3136 - 3152 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3152 - 3168 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3168 - 3184 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3184 - 3200 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3200 - 3216 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3216 - 3232 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, /* bytes 3232 - 3248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3248 - 3264 */ - 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 3264 - 3280 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 3280 - 3296 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3328 - 3344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3344 - 3360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3360 - 3376 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3376 - 3392 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3392 - 3408 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3408 - 3424 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3424 - 3440 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 3440 - 3456 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3456 - 3472 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 3472 - 3488 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3488 - 3504 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 3504 - 3520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3520 - 3536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3536 - 3552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3552 - 3568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3568 - 3584 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3584 - 3600 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3600 - 3616 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3616 - 3632 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3632 - 3648 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3648 - 3664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3664 - 3680 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 3680 - 3696 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 3696 - 3712 */ - 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3712 - 3728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3728 - 3744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3744 - 3760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3760 - 3776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3776 - 3792 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3792 - 3808 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3808 - 3824 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3824 - 3840 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3840 - 3856 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3856 - 3872 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3872 - 3888 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 3888 - 3904 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 3904 - 3920 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 3920 - 3936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3936 - 3952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3952 - 3968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3968 - 3984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3984 - 4000 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4000 - 4016 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4016 - 4032 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4032 - 4048 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4048 - 4064 */ - 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4064 - 4080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4080 - 4096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 4096 - 4112 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 4112 - 4128 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 4128 - 4144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4144 - 4160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4160 - 4176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4176 - 4192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4192 - 4208 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4208 - 4224 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4224 - 4240 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4240 - 4256 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4256 - 4272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4272 - 4288 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4288 - 4304 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 4304 - 4320 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4320 - 4336 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 4336 - 4352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4352 - 4368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4368 - 4384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4384 - 4400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4400 - 4416 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4416 - 4432 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4432 - 4448 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4448 - 4464 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 4464 - 4480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4480 - 4496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4496 - 4512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4512 - 4528 */ - 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 4528 - 4544 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 4544 - 4560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4560 - 4576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4576 - 4592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4592 - 4608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4608 - 4624 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4624 - 4640 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4640 - 4656 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4656 - 4672 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 4672 - 4688 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4688 - 4704 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4704 - 4720 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4720 - 4736 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4736 - 4752 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 4752 - 4768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4768 - 4784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4784 - 4800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4800 - 4816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4816 - 4832 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4832 - 4848 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4848 - 4864 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4864 - 4880 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4880 - 4896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4896 - 4912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4912 - 4928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 4928 - 4944 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 4944 - 4960 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 4960 - 4976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4976 - 4992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4992 - 5008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5008 - 5024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5024 - 5040 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5040 - 5056 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5056 - 5072 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5072 - 5088 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5088 - 5104 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 5104 - 5120 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 5120 - 5136 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5136 - 5152 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5152 - 5168 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 5168 - 5184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5184 - 5200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5200 - 5216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5216 - 5232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5232 - 5248 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5248 - 5264 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5264 - 5280 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5280 - 5296 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5296 - 5312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5312 - 5328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5328 - 5344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5344 - 5360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 5360 - 5376 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 5376 - 5392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5392 - 5408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5408 - 5424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5424 - 5440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5440 - 5456 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5456 - 5472 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5472 - 5488 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 5488 - 5504 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5504 - 5520 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5520 - 5536 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5536 - 5552 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5552 - 5568 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5568 - 5584 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 5584 - 5600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5600 - 5616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5616 - 5632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5632 - 5648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5648 - 5664 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5664 - 5680 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5680 - 5696 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 5696 - 5712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5712 - 5728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5728 - 5744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0x00, /* bytes 5744 - 5760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5760 - 5776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 5776 - 5792 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 5792 - 5808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5808 - 5824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5824 - 5840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5840 - 5856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5856 - 5872 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5872 - 5888 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5888 - 5904 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5904 - 5920 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5920 - 5936 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5936 - 5952 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 5952 - 5968 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5968 - 5984 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5984 - 6000 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 6000 - 6016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6016 - 6032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6032 - 6048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6048 - 6064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6064 - 6080 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6080 - 6096 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6096 - 6112 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0x00, /* bytes 6112 - 6128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 6128 - 6144 */ - 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 6144 - 6160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 6160 - 6176 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 6176 - 6192 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 6192 - 6208 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 6208 - 6224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6224 - 6240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6240 - 6256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6256 - 6272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6272 - 6288 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6288 - 6304 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6304 - 6320 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6320 - 6336 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6336 - 6352 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6352 - 6368 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 6368 - 6384 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6384 - 6400 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6400 - 6416 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 6416 - 6432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6432 - 6448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6448 - 6464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6464 - 6480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6480 - 6496 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6496 - 6512 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6512 - 6528 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6528 - 6544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 6544 - 6560 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6560 - 6576 */ - 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 6576 - 6592 */ - 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 6592 - 6608 */ - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 6608 - 6624 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 6624 - 6640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6640 - 6656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6656 - 6672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6672 - 6688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 6688 - 6704 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6704 - 6720 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6720 - 6736 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6736 - 6752 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 6752 - 6768 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6768 - 6784 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6784 - 6800 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6800 - 6816 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6816 - 6832 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 6832 - 6848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6848 - 6864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6864 - 6880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6880 - 6896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 6896 - 6912 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6912 - 6928 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6928 - 6944 */ - 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6944 - 6960 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6960 - 6976 */ - 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6976 - 6992 */ - 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 6992 - 7008 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 7008 - 7024 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 7024 - 7040 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 7040 - 7056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7056 - 7072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7072 - 7088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7088 - 7104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 7104 - 7120 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7120 - 7136 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7136 - 7152 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7152 - 7168 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 7168 - 7184 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7184 - 7200 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7200 - 7216 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7216 - 7232 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7232 - 7248 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 7248 - 7264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7264 - 7280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7280 - 7296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7296 - 7312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7312 - 7328 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7328 - 7344 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, /* bytes 7344 - 7360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7360 - 7376 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7376 - 7392 */ - 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 7392 - 7408 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7408 - 7424 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, /* bytes 7424 - 7440 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 7440 - 7456 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 7456 - 7472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7472 - 7488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7488 - 7504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7504 - 7520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7520 - 7536 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7536 - 7552 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, /* bytes 7552 - 7568 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7568 - 7584 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 7584 - 7600 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7600 - 7616 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 7616 - 7632 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7632 - 7648 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7648 - 7664 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 7664 - 7680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7680 - 7696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7696 - 7712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7712 - 7728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7728 - 7744 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7744 - 7760 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7760 - 7776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 7776 - 7792 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7792 - 7808 */ - 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 7808 - 7824 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 7824 - 7840 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 7840 - 7856 */ - 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7856 - 7872 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 7872 - 7888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7888 - 7904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7904 - 7920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7920 - 7936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7936 - 7952 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7952 - 7968 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7968 - 7984 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7984 - 8000 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8000 - 8016 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8016 - 8032 */ - 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8032 - 8048 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8048 - 8064 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 8064 - 8080 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8080 - 8096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8096 - 8112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8112 - 8128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8128 - 8144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8144 - 8160 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8160 - 8176 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8176 - 8192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 8192 - 8208 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8208 - 8224 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8224 - 8240 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8240 - 8256 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8256 - 8272 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8272 - 8288 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8288 - 8304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8304 - 8320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8320 - 8336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 8336 - 8352 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8352 - 8368 */ - 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8368 - 8384 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 8384 - 8400 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8400 - 8416 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8416 - 8432 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 8432 - 8448 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 8448 - 8464 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 8464 - 8480 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 8480 - 8496 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8496 - 8512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8512 - 8528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8528 - 8544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8544 - 8560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8560 - 8576 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8576 - 8592 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8592 - 8608 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, /* bytes 8608 - 8624 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8624 - 8640 */ - 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, /* bytes 8640 - 8656 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8656 - 8672 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8672 - 8688 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8688 - 8704 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8704 - 8720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8720 - 8736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8736 - 8752 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8752 - 8768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8768 - 8784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8784 - 8800 */ - 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8800 - 8816 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8816 - 8832 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 8832 - 8848 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8848 - 8864 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8864 - 8880 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8880 - 8896 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8896 - 8912 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8912 - 8928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8928 - 8944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8944 - 8960 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8960 - 8976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8976 - 8992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8992 - 9008 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9008 - 9024 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 9024 - 9040 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 9040 - 9056 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, /* bytes 9056 - 9072 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9072 - 9088 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9088 - 9104 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9104 - 9120 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9120 - 9136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9136 - 9152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9152 - 9168 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 9168 - 9184 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9184 - 9200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9200 - 9216 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 9216 - 9232 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 9232 - 9248 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9248 - 9264 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9264 - 9280 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 9280 - 9296 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9296 - 9312 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9312 - 9328 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9328 - 9344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9344 - 9360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9360 - 9376 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9376 - 9392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9392 - 9408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 9408 - 9424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9424 - 9440 */ - 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 9440 - 9456 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9456 - 9472 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9472 - 9488 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9488 - 9504 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9504 - 9520 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9520 - 9536 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9536 - 9552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9552 - 9568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9568 - 9584 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 9584 - 9600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9600 - 9616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 9616 - 9632 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 9632 - 9648 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 9648 - 9664 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 9664 - 9680 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9680 - 9696 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9696 - 9712 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9712 - 9728 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9728 - 9744 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9744 - 9760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9760 - 9776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9776 - 9792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9792 - 9808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9808 - 9824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9824 - 9840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 9840 - 9856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9856 - 9872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 9872 - 9888 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 9888 - 9904 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9904 - 9920 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9920 - 9936 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9936 - 9952 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9952 - 9968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9968 - 9984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9984 - 10000 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10000 - 10016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10016 - 10032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 10032 - 10048 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 10048 - 10064 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10064 - 10080 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10080 - 10096 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, /* bytes 10096 - 10112 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 10112 - 10128 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10128 - 10144 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10144 - 10160 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10160 - 10176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10176 - 10192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10192 - 10208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10208 - 10224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10224 - 10240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10240 - 10256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10256 - 10272 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10272 - 10288 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10288 - 10304 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, /* bytes 10304 - 10320 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10320 - 10336 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10336 - 10352 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10352 - 10368 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10368 - 10384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10384 - 10400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10400 - 10416 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10416 - 10432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10432 - 10448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10448 - 10464 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 10464 - 10480 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10480 - 10496 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 10496 - 10512 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 10512 - 10528 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10528 - 10544 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10544 - 10560 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10560 - 10576 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10576 - 10592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10592 - 10608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10608 - 10624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10624 - 10640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10640 - 10656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10656 - 10672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10672 - 10688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10688 - 10704 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10704 - 10720 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, /* bytes 10720 - 10736 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10736 - 10752 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10752 - 10768 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10768 - 10784 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10784 - 10800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10800 - 10816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10816 - 10832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10832 - 10848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 10848 - 10864 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10864 - 10880 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 10880 - 10896 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10896 - 10912 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10912 - 10928 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10928 - 10944 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 10944 - 10960 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10960 - 10976 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10976 - 10992 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10992 - 11008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11008 - 11024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11024 - 11040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11040 - 11056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11056 - 11072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 11072 - 11088 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11088 - 11104 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11104 - 11120 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 11120 - 11136 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 11136 - 11152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11152 - 11168 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11168 - 11184 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11184 - 11200 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 11200 - 11216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11216 - 11232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11232 - 11248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11248 - 11264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, /* bytes 11264 - 11280 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 11280 - 11296 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 11296 - 11312 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 11312 - 11328 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 11328 - 11344 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 11344 - 11360 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11360 - 11376 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11376 - 11392 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11392 - 11408 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 11408 - 11424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11424 - 11440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11440 - 11456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11456 - 11472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11472 - 11488 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11488 - 11504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11504 - 11520 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 11520 - 11536 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 11536 - 11552 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 11552 - 11568 */ - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11568 - 11584 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11584 - 11600 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11600 - 11616 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 11616 - 11632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11632 - 11648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11648 - 11664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11664 - 11680 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 11680 - 11696 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 11696 - 11712 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 11712 - 11728 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 11728 - 11744 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 11744 - 11760 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11760 - 11776 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11776 - 11792 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11792 - 11808 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11808 - 11824 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 11824 - 11840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11840 - 11856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11856 - 11872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11872 - 11888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11888 - 11904 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11904 - 11920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11920 - 11936 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 11936 - 11952 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11952 - 11968 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11968 - 11984 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11984 - 12000 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12000 - 12016 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12016 - 12032 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12032 - 12048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12048 - 12064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12064 - 12080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12080 - 12096 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12096 - 12112 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12112 - 12128 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12128 - 12144 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12144 - 12160 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12160 - 12176 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12176 - 12192 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12192 - 12208 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12208 - 12224 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12224 - 12240 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12240 - 12256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12256 - 12272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12272 - 12288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12288 - 12304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12304 - 12320 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12320 - 12336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12336 - 12352 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12352 - 12368 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12368 - 12384 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12384 - 12400 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12400 - 12416 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12416 - 12432 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12432 - 12448 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12448 - 12464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12464 - 12480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12480 - 12496 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 12496 - 12512 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12512 - 12528 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 12528 - 12544 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 12544 - 12560 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12560 - 12576 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12576 - 12592 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12592 - 12608 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12608 - 12624 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12624 - 12640 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12640 - 12656 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12656 - 12672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12672 - 12688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12688 - 12704 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12704 - 12720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 12720 - 12736 */ - 0x00, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12736 - 12752 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, /* bytes 12752 - 12768 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 12768 - 12784 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12784 - 12800 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12800 - 12816 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12816 - 12832 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12832 - 12848 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12848 - 12864 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12864 - 12880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12880 - 12896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12896 - 12912 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12912 - 12928 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12928 - 12944 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12944 - 12960 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12960 - 12976 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 12976 - 12992 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12992 - 13008 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13008 - 13024 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13024 - 13040 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13040 - 13056 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13056 - 13072 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 13072 - 13088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13088 - 13104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13104 - 13120 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13120 - 13136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 13136 - 13152 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 13152 - 13168 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 13168 - 13184 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13184 - 13200 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13200 - 13216 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13216 - 13232 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13232 - 13248 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13248 - 13264 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13264 - 13280 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 13280 - 13296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13296 - 13312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13312 - 13328 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 13328 - 13344 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 13344 - 13360 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 13360 - 13376 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 13376 - 13392 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13392 - 13408 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13408 - 13424 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13424 - 13440 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13440 - 13456 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13456 - 13472 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13472 - 13488 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 13488 - 13504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13504 - 13520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13520 - 13536 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13536 - 13552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 13552 - 13568 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, /* bytes 13568 - 13584 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 13584 - 13600 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13600 - 13616 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13616 - 13632 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13632 - 13648 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13648 - 13664 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13664 - 13680 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13680 - 13696 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 13696 - 13712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13712 - 13728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13728 - 13744 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 13744 - 13760 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 13760 - 13776 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 13776 - 13792 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 13792 - 13808 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 13808 - 13824 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13824 - 13840 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13840 - 13856 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13856 - 13872 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13872 - 13888 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13888 - 13904 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 13904 - 13920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13920 - 13936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13936 - 13952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13952 - 13968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0xfc, /* bytes 13968 - 13984 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13984 - 14000 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 14000 - 14016 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14016 - 14032 */ - 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14032 - 14048 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14048 - 14064 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14064 - 14080 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14080 - 14096 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14096 - 14112 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 14112 - 14128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14128 - 14144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14144 - 14160 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 14160 - 14176 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 14176 - 14192 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14192 - 14208 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14208 - 14224 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14224 - 14240 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14240 - 14256 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14256 - 14272 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14272 - 14288 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14288 - 14304 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14304 - 14320 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 14320 - 14336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14336 - 14352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14352 - 14368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14368 - 14384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 14384 - 14400 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14400 - 14416 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14416 - 14432 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14432 - 14448 */ - 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14448 - 14464 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14464 - 14480 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14480 - 14496 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14496 - 14512 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14512 - 14528 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 14528 - 14544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14544 - 14560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14560 - 14576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 14576 - 14592 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 14592 - 14608 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14608 - 14624 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14624 - 14640 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14640 - 14656 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14656 - 14672 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14672 - 14688 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14688 - 14704 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14704 - 14720 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14720 - 14736 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 14736 - 14752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14752 - 14768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14768 - 14784 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14784 - 14800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 14800 - 14816 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14816 - 14832 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14832 - 14848 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14848 - 14864 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14864 - 14880 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14880 - 14896 */ - 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14896 - 14912 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14912 - 14928 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14928 - 14944 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 14944 - 14960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14960 - 14976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14976 - 14992 */ - 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 14992 - 15008 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 15008 - 15024 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15024 - 15040 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15040 - 15056 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15056 - 15072 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15072 - 15088 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 15088 - 15104 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15104 - 15120 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15120 - 15136 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15136 - 15152 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 15152 - 15168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15168 - 15184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15184 - 15200 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15200 - 15216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 15216 - 15232 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15232 - 15248 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15248 - 15264 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15264 - 15280 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15280 - 15296 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15296 - 15312 */ - 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15312 - 15328 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15328 - 15344 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15344 - 15360 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 15360 - 15376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15376 - 15392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15392 - 15408 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 15408 - 15424 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 15424 - 15440 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15440 - 15456 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15456 - 15472 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15472 - 15488 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15488 - 15504 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 15504 - 15520 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15520 - 15536 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15536 - 15552 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15552 - 15568 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 15568 - 15584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15584 - 15600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15600 - 15616 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15616 - 15632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 15632 - 15648 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15648 - 15664 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15664 - 15680 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15680 - 15696 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15696 - 15712 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 15712 - 15728 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15728 - 15744 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15744 - 15760 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15760 - 15776 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 15776 - 15792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15792 - 15808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15808 - 15824 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 15824 - 15840 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 15840 - 15856 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15856 - 15872 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15872 - 15888 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15888 - 15904 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15904 - 15920 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 15920 - 15936 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15936 - 15952 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15952 - 15968 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15968 - 15984 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 15984 - 16000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16000 - 16016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16016 - 16032 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 16032 - 16048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16048 - 16064 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16064 - 16080 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16080 - 16096 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16096 - 16112 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16112 - 16128 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 16128 - 16144 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16144 - 16160 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16160 - 16176 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16176 - 16192 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 16192 - 16208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16208 - 16224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16224 - 16240 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, /* bytes 16240 - 16256 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 16256 - 16272 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16272 - 16288 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16288 - 16304 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16304 - 16320 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16320 - 16336 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 16336 - 16352 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16352 - 16368 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16368 - 16384 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16384 - 16400 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 16400 - 16416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16416 - 16432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16432 - 16448 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 16448 - 16464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 16464 - 16480 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16480 - 16496 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16496 - 16512 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16512 - 16528 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 16528 - 16544 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16544 - 16560 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16560 - 16576 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16576 - 16592 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16592 - 16608 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 16608 - 16624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16624 - 16640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16640 - 16656 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, /* bytes 16656 - 16672 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 16672 - 16688 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16688 - 16704 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 16704 - 16720 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16720 - 16736 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 16736 - 16752 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 16752 - 16768 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16768 - 16784 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16784 - 16800 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16800 - 16816 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 16816 - 16832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16832 - 16848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16848 - 16864 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 16864 - 16880 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 16880 - 16896 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16896 - 16912 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16912 - 16928 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16928 - 16944 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 16944 - 16960 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16960 - 16976 */ - 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16976 - 16992 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16992 - 17008 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17008 - 17024 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 17024 - 17040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17040 - 17056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17056 - 17072 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17072 - 17088 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 17088 - 17104 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17104 - 17120 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 17120 - 17136 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17136 - 17152 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17152 - 17168 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17168 - 17184 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17184 - 17200 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17200 - 17216 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17216 - 17232 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 17232 - 17248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17248 - 17264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17264 - 17280 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17280 - 17296 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 17296 - 17312 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17312 - 17328 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17328 - 17344 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17344 - 17360 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17360 - 17376 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17376 - 17392 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17392 - 17408 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17408 - 17424 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17424 - 17440 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 17440 - 17456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17456 - 17472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17472 - 17488 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17488 - 17504 */ - 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 17504 - 17520 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17520 - 17536 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17536 - 17552 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17552 - 17568 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17568 - 17584 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17584 - 17600 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17600 - 17616 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17616 - 17632 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17632 - 17648 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 17648 - 17664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17664 - 17680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17680 - 17696 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17696 - 17712 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 17712 - 17728 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17728 - 17744 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17744 - 17760 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17760 - 17776 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17776 - 17792 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17792 - 17808 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17808 - 17824 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17824 - 17840 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17840 - 17856 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 17856 - 17872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17872 - 17888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17888 - 17904 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 17904 - 17920 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 17920 - 17936 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17936 - 17952 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17952 - 17968 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17968 - 17984 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17984 - 18000 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 18000 - 18016 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18016 - 18032 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18032 - 18048 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18048 - 18064 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18064 - 18080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18080 - 18096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18096 - 18112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18112 - 18128 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18128 - 18144 */ - 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18144 - 18160 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18160 - 18176 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18176 - 18192 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18192 - 18208 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18208 - 18224 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18224 - 18240 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18240 - 18256 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18256 - 18272 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18272 - 18288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18288 - 18304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18304 - 18320 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 18320 - 18336 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 18336 - 18352 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18352 - 18368 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18368 - 18384 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18384 - 18400 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18400 - 18416 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 18416 - 18432 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18432 - 18448 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18448 - 18464 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18464 - 18480 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18480 - 18496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18496 - 18512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18512 - 18528 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 18528 - 18544 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 18544 - 18560 */ - 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18560 - 18576 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18576 - 18592 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18592 - 18608 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18608 - 18624 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18624 - 18640 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18640 - 18656 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18656 - 18672 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18672 - 18688 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18688 - 18704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18704 - 18720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18720 - 18736 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 18736 - 18752 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 18752 - 18768 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18768 - 18784 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18784 - 18800 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18800 - 18816 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18816 - 18832 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18832 - 18848 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18848 - 18864 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18864 - 18880 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18880 - 18896 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18896 - 18912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18912 - 18928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18928 - 18944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 18944 - 18960 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 18960 - 18976 */ - 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18976 - 18992 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18992 - 19008 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19008 - 19024 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19024 - 19040 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19040 - 19056 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19056 - 19072 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19072 - 19088 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19088 - 19104 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 19104 - 19120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19120 - 19136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19136 - 19152 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 19152 - 19168 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 19168 - 19184 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19184 - 19200 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19200 - 19216 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19216 - 19232 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19232 - 19248 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19248 - 19264 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19264 - 19280 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19280 - 19296 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19296 - 19312 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 19312 - 19328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19328 - 19344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19344 - 19360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19360 - 19376 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 19376 - 19392 */ - 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19392 - 19408 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19408 - 19424 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19424 - 19440 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19440 - 19456 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19456 - 19472 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19472 - 19488 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19488 - 19504 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19504 - 19520 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 19520 - 19536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19536 - 19552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19552 - 19568 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 19568 - 19584 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19584 - 19600 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19600 - 19616 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19616 - 19632 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19632 - 19648 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19648 - 19664 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19664 - 19680 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19680 - 19696 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19696 - 19712 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19712 - 19728 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 19728 - 19744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19744 - 19760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19760 - 19776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19776 - 19792 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19792 - 19808 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19808 - 19824 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19824 - 19840 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19840 - 19856 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19856 - 19872 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19872 - 19888 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19888 - 19904 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19904 - 19920 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19920 - 19936 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 19936 - 19952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19952 - 19968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19968 - 19984 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 19984 - 20000 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20000 - 20016 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20016 - 20032 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20032 - 20048 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 20048 - 20064 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20064 - 20080 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20080 - 20096 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20096 - 20112 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20112 - 20128 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20128 - 20144 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 20144 - 20160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20160 - 20176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20176 - 20192 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20192 - 20208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20208 - 20224 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20224 - 20240 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20240 - 20256 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20256 - 20272 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20272 - 20288 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20288 - 20304 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20304 - 20320 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20320 - 20336 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20336 - 20352 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 20352 - 20368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20368 - 20384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20384 - 20400 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 20400 - 20416 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20416 - 20432 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 20432 - 20448 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20448 - 20464 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20464 - 20480 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20480 - 20496 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20496 - 20512 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20512 - 20528 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20528 - 20544 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20544 - 20560 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 20560 - 20576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20576 - 20592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20592 - 20608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20608 - 20624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20624 - 20640 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20640 - 20656 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20656 - 20672 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20672 - 20688 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20688 - 20704 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20704 - 20720 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20720 - 20736 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20736 - 20752 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20752 - 20768 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 20768 - 20784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20784 - 20800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20800 - 20816 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 20816 - 20832 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 20832 - 20848 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 20848 - 20864 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20864 - 20880 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 20880 - 20896 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20896 - 20912 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20912 - 20928 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20928 - 20944 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20944 - 20960 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20960 - 20976 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 20976 - 20992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20992 - 21008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21008 - 21024 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21024 - 21040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 21040 - 21056 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21056 - 21072 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21072 - 21088 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21088 - 21104 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21104 - 21120 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21120 - 21136 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21136 - 21152 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21152 - 21168 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21168 - 21184 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 21184 - 21200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21200 - 21216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21216 - 21232 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 21232 - 21248 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, /* bytes 21248 - 21264 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 21264 - 21280 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21280 - 21296 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 21296 - 21312 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21312 - 21328 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21328 - 21344 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21344 - 21360 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21360 - 21376 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21376 - 21392 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 21392 - 21408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21408 - 21424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21424 - 21440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 21440 - 21456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21456 - 21472 */ - 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21472 - 21488 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21488 - 21504 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21504 - 21520 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21520 - 21536 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21536 - 21552 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21552 - 21568 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21568 - 21584 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21584 - 21600 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 21600 - 21616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21616 - 21632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21632 - 21648 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 21648 - 21664 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 21664 - 21680 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21680 - 21696 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 21696 - 21712 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21712 - 21728 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21728 - 21744 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21744 - 21760 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21760 - 21776 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21776 - 21792 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21792 - 21808 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 21808 - 21824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21824 - 21840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21840 - 21856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 21856 - 21872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21872 - 21888 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21888 - 21904 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21904 - 21920 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21920 - 21936 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21936 - 21952 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21952 - 21968 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21968 - 21984 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21984 - 22000 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22000 - 22016 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 22016 - 22032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22032 - 22048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22048 - 22064 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22064 - 22080 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22080 - 22096 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22096 - 22112 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22112 - 22128 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22128 - 22144 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22144 - 22160 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 22160 - 22176 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22176 - 22192 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22192 - 22208 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22208 - 22224 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 22224 - 22240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22240 - 22256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22256 - 22272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22272 - 22288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22288 - 22304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22304 - 22320 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22320 - 22336 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22336 - 22352 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22352 - 22368 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22368 - 22384 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22384 - 22400 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22400 - 22416 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22416 - 22432 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 22432 - 22448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22448 - 22464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22464 - 22480 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22480 - 22496 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22496 - 22512 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22512 - 22528 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22528 - 22544 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22544 - 22560 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22560 - 22576 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22576 - 22592 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22592 - 22608 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22608 - 22624 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22624 - 22640 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 22640 - 22656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22656 - 22672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22672 - 22688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 22688 - 22704 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 22704 - 22720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22720 - 22736 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22736 - 22752 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22752 - 22768 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22768 - 22784 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22784 - 22800 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22800 - 22816 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22816 - 22832 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22832 - 22848 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 22848 - 22864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22864 - 22880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22880 - 22896 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22896 - 22912 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22912 - 22928 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22928 - 22944 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 22944 - 22960 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22960 - 22976 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22976 - 22992 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22992 - 23008 */ - 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23008 - 23024 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23024 - 23040 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23040 - 23056 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 23056 - 23072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23072 - 23088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23088 - 23104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23104 - 23120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23120 - 23136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 23136 - 23152 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23152 - 23168 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23168 - 23184 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23184 - 23200 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23200 - 23216 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23216 - 23232 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23232 - 23248 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23248 - 23264 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 23264 - 23280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23280 - 23296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23296 - 23312 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23312 - 23328 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23328 - 23344 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23344 - 23360 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 23360 - 23376 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23376 - 23392 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23392 - 23408 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 23408 - 23424 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23424 - 23440 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23440 - 23456 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23456 - 23472 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 23472 - 23488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23488 - 23504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23504 - 23520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23520 - 23536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23536 - 23552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23552 - 23568 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23568 - 23584 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23584 - 23600 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23600 - 23616 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23616 - 23632 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23632 - 23648 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23648 - 23664 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23664 - 23680 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 23680 - 23696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23696 - 23712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23712 - 23728 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23728 - 23744 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23744 - 23760 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23760 - 23776 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23776 - 23792 */ - 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23792 - 23808 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23808 - 23824 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23824 - 23840 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23840 - 23856 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 23856 - 23872 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 23872 - 23888 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 23888 - 23904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23904 - 23920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23920 - 23936 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23936 - 23952 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23952 - 23968 */ - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 23968 - 23984 */ - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23984 - 24000 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24000 - 24016 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24016 - 24032 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24032 - 24048 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24048 - 24064 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24064 - 24080 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24080 - 24096 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 24096 - 24112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24112 - 24128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24128 - 24144 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24144 - 24160 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24160 - 24176 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24176 - 24192 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24192 - 24208 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24208 - 24224 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24224 - 24240 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24240 - 24256 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24256 - 24272 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24272 - 24288 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 24288 - 24304 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 24304 - 24320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24320 - 24336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24336 - 24352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24352 - 24368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 24368 - 24384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 24384 - 24400 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 24400 - 24416 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24416 - 24432 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24432 - 24448 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24448 - 24464 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24464 - 24480 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24480 - 24496 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 24496 - 24512 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 24512 - 24528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24528 - 24544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24544 - 24560 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24560 - 24576 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24576 - 24592 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24592 - 24608 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 24608 - 24624 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24624 - 24640 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24640 - 24656 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24656 - 24672 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 24672 - 24688 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24688 - 24704 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24704 - 24720 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 24720 - 24736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24736 - 24752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24752 - 24768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24768 - 24784 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24784 - 24800 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 24800 - 24816 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24816 - 24832 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24832 - 24848 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24848 - 24864 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24864 - 24880 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24880 - 24896 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 24896 - 24912 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24912 - 24928 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 24928 - 24944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24944 - 24960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24960 - 24976 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24976 - 24992 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24992 - 25008 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25008 - 25024 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 25024 - 25040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25040 - 25056 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25056 - 25072 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25072 - 25088 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 25088 - 25104 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 25104 - 25120 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 25120 - 25136 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 25136 - 25152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25152 - 25168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25168 - 25184 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 25184 - 25200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25200 - 25216 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 25216 - 25232 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 25232 - 25248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25248 - 25264 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25264 - 25280 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25280 - 25296 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25296 - 25312 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 25312 - 25328 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 25328 - 25344 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 25344 - 25360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25360 - 25376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25376 - 25392 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25392 - 25408 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25408 - 25424 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25424 - 25440 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25440 - 25456 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25456 - 25472 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25472 - 25488 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25488 - 25504 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25504 - 25520 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 25520 - 25536 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 25536 - 25552 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 25552 - 25568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25568 - 25584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25584 - 25600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 25600 - 25616 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25616 - 25632 */ - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 25632 - 25648 */ - 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25648 - 25664 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25664 - 25680 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25680 - 25696 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25696 - 25712 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 25712 - 25728 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25728 - 25744 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25744 - 25760 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 25760 - 25776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25776 - 25792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25792 - 25808 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25808 - 25824 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25824 - 25840 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25840 - 25856 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25856 - 25872 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25872 - 25888 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25888 - 25904 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 25904 - 25920 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 25920 - 25936 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25936 - 25952 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25952 - 25968 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 25968 - 25984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25984 - 26000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26000 - 26016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 26016 - 26032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 26032 - 26048 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 26048 - 26064 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26064 - 26080 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26080 - 26096 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26096 - 26112 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26112 - 26128 */ - 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26128 - 26144 */ - 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 26144 - 26160 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26160 - 26176 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 26176 - 26192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26192 - 26208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26208 - 26224 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26224 - 26240 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26240 - 26256 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26256 - 26272 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26272 - 26288 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26288 - 26304 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26304 - 26320 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26320 - 26336 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 26336 - 26352 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26352 - 26368 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26368 - 26384 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 26384 - 26400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26400 - 26416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26416 - 26432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 26432 - 26448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 26448 - 26464 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 26464 - 26480 */ - 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 26480 - 26496 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26496 - 26512 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26512 - 26528 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26528 - 26544 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26544 - 26560 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26560 - 26576 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26576 - 26592 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 26592 - 26608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26608 - 26624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26624 - 26640 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26640 - 26656 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26656 - 26672 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26672 - 26688 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26688 - 26704 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26704 - 26720 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26720 - 26736 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26736 - 26752 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26752 - 26768 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26768 - 26784 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26784 - 26800 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 26800 - 26816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26816 - 26832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26832 - 26848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26848 - 26864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26864 - 26880 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 26880 - 26896 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 26896 - 26912 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26912 - 26928 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26928 - 26944 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26944 - 26960 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26960 - 26976 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26976 - 26992 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26992 - 27008 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 27008 - 27024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27024 - 27040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27040 - 27056 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27056 - 27072 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27072 - 27088 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27088 - 27104 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27104 - 27120 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27120 - 27136 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27136 - 27152 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27152 - 27168 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27168 - 27184 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27184 - 27200 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27200 - 27216 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 27216 - 27232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27232 - 27248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27248 - 27264 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27264 - 27280 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27280 - 27296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 27296 - 27312 */ - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27312 - 27328 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27328 - 27344 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27344 - 27360 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27360 - 27376 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27376 - 27392 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27392 - 27408 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27408 - 27424 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 27424 - 27440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27440 - 27456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27456 - 27472 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 27472 - 27488 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27488 - 27504 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27504 - 27520 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27520 - 27536 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27536 - 27552 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27552 - 27568 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27568 - 27584 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27584 - 27600 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27600 - 27616 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27616 - 27632 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 27632 - 27648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27648 - 27664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27664 - 27680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27680 - 27696 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27696 - 27712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 27712 - 27728 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 27728 - 27744 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27744 - 27760 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27760 - 27776 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27776 - 27792 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27792 - 27808 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27808 - 27824 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27824 - 27840 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 27840 - 27856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27856 - 27872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27872 - 27888 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27888 - 27904 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27904 - 27920 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27920 - 27936 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27936 - 27952 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27952 - 27968 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27968 - 27984 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27984 - 28000 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28000 - 28016 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28016 - 28032 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28032 - 28048 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 28048 - 28064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28064 - 28080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28080 - 28096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28096 - 28112 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28112 - 28128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 28128 - 28144 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 28144 - 28160 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28160 - 28176 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28176 - 28192 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28192 - 28208 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28208 - 28224 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28224 - 28240 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28240 - 28256 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 28256 - 28272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28272 - 28288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28288 - 28304 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28304 - 28320 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28320 - 28336 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28336 - 28352 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 28352 - 28368 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28368 - 28384 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28384 - 28400 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28400 - 28416 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28416 - 28432 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28432 - 28448 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28448 - 28464 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 28464 - 28480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28480 - 28496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28496 - 28512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28512 - 28528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28528 - 28544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 28544 - 28560 */ - 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28560 - 28576 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28576 - 28592 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28592 - 28608 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28608 - 28624 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28624 - 28640 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28640 - 28656 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28656 - 28672 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 28672 - 28688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28688 - 28704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28704 - 28720 */ - 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28720 - 28736 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28736 - 28752 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28752 - 28768 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28768 - 28784 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28784 - 28800 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28800 - 28816 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28816 - 28832 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28832 - 28848 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28848 - 28864 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28864 - 28880 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 28880 - 28896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28896 - 28912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28912 - 28928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28928 - 28944 */ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28944 - 28960 */ - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28960 - 28976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28976 - 28992 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28992 - 29008 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29008 - 29024 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29024 - 29040 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29040 - 29056 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29056 - 29072 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29072 - 29088 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 29088 - 29104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29104 - 29120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29120 - 29136 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29136 - 29152 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29152 - 29168 */ - 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29168 - 29184 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29184 - 29200 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29200 - 29216 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29216 - 29232 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29232 - 29248 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29248 - 29264 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29264 - 29280 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29280 - 29296 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 29296 - 29312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29312 - 29328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29328 - 29344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29344 - 29360 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29360 - 29376 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 29376 - 29392 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29392 - 29408 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29408 - 29424 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29424 - 29440 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29440 - 29456 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29456 - 29472 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29472 - 29488 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29488 - 29504 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 29504 - 29520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29520 - 29536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29536 - 29552 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29552 - 29568 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, /* bytes 29568 - 29584 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29584 - 29600 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29600 - 29616 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29616 - 29632 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29632 - 29648 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29648 - 29664 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29664 - 29680 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29680 - 29696 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29696 - 29712 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 29712 - 29728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29728 - 29744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29744 - 29760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 29760 - 29776 */ - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29776 - 29792 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 29792 - 29808 */ - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29808 - 29824 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29824 - 29840 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29840 - 29856 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29856 - 29872 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29872 - 29888 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29888 - 29904 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29904 - 29920 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 29920 - 29936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29936 - 29952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29952 - 29968 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29968 - 29984 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 29984 - 30000 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 30000 - 30016 */ - 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30016 - 30032 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30032 - 30048 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30048 - 30064 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30064 - 30080 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30080 - 30096 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30096 - 30112 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30112 - 30128 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 30128 - 30144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30144 - 30160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30160 - 30176 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 30176 - 30192 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 30192 - 30208 */ - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30208 - 30224 */ - 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30224 - 30240 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30240 - 30256 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30256 - 30272 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30272 - 30288 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30288 - 30304 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30304 - 30320 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30320 - 30336 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 30336 - 30352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30352 - 30368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30368 - 30384 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 30384 - 30400 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 30400 - 30416 */ - 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 30416 - 30432 */ - 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30432 - 30448 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30448 - 30464 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30464 - 30480 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30480 - 30496 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30496 - 30512 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30512 - 30528 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30528 - 30544 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 30544 - 30560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30560 - 30576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30576 - 30592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 30592 - 30608 */ - 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30608 - 30624 */ - 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 30624 - 30640 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30640 - 30656 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30656 - 30672 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30672 - 30688 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30688 - 30704 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30704 - 30720 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30720 - 30736 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30736 - 30752 */ - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 30752 - 30768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 16 - 32 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 32 - 48 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 48 - 64 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 64 - 80 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 80 - 96 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 96 - 112 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 112 - 128 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 128 - 144 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 144 - 160 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 160 - 176 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 224 - 240 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 240 - 256 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 256 - 272 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 272 - 288 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 288 - 304 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 304 - 320 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 320 - 336 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 336 - 352 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 352 - 368 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 368 - 384 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 432 - 448 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 448 - 464 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 464 - 480 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 480 - 496 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 496 - 512 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 512 - 528 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 528 - 544 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 544 - 560 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 560 - 576 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 576 - 592 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 608 - 624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 640 - 656 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 656 - 672 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 672 - 688 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 688 - 704 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 704 - 720 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 720 - 736 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 736 - 752 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 752 - 768 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 768 - 784 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 784 - 800 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 848 - 864 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 864 - 880 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 880 - 896 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 896 - 912 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 912 - 928 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 928 - 944 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 944 - 960 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 960 - 976 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 976 - 992 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 992 - 1008 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 1008 - 1024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1056 - 1072 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1072 - 1088 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1088 - 1104 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1104 - 1120 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1120 - 1136 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1136 - 1152 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1152 - 1168 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1168 - 1184 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1184 - 1200 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1200 - 1216 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1248 - 1264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1264 - 1280 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1280 - 1296 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1296 - 1312 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1312 - 1328 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1328 - 1344 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1344 - 1360 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1360 - 1376 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1376 - 1392 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1392 - 1408 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1408 - 1424 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1472 - 1488 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1488 - 1504 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1504 - 1520 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1520 - 1536 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1536 - 1552 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1552 - 1568 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1568 - 1584 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1584 - 1600 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1600 - 1616 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1616 - 1632 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1648 - 1664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1680 - 1696 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1696 - 1712 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1712 - 1728 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1728 - 1744 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1744 - 1760 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1760 - 1776 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1776 - 1792 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1792 - 1808 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1808 - 1824 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1824 - 1840 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1888 - 1904 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1904 - 1920 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1920 - 1936 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1936 - 1952 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1952 - 1968 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1968 - 1984 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 1984 - 2000 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2000 - 2016 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 2016 - 2032 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 2032 - 2048 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 2048 - 2064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2096 - 2112 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2112 - 2128 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2128 - 2144 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2144 - 2160 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2160 - 2176 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2176 - 2192 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2192 - 2208 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2208 - 2224 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 2224 - 2240 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 2240 - 2256 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2288 - 2304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2304 - 2320 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2320 - 2336 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2336 - 2352 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2352 - 2368 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2368 - 2384 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2384 - 2400 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2400 - 2416 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2416 - 2432 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 2432 - 2448 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2448 - 2464 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2512 - 2528 */ + 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2528 - 2544 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2544 - 2560 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2560 - 2576 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2576 - 2592 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2592 - 2608 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2608 - 2624 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 2624 - 2640 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 2640 - 2656 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 2656 - 2672 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2688 - 2704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2720 - 2736 */ + 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2736 - 2752 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2752 - 2768 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2768 - 2784 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2784 - 2800 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2800 - 2816 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2816 - 2832 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 2832 - 2848 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 2848 - 2864 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 2864 - 2880 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2928 - 2944 */ + 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2944 - 2960 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2960 - 2976 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2976 - 2992 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 2992 - 3008 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3008 - 3024 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3024 - 3040 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3040 - 3056 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 3056 - 3072 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3072 - 3088 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 3088 - 3104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3136 - 3152 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3152 - 3168 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3168 - 3184 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3184 - 3200 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3200 - 3216 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3216 - 3232 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, /* bytes 3232 - 3248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3248 - 3264 */ + 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 3264 - 3280 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 3280 - 3296 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3328 - 3344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3344 - 3360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3360 - 3376 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3376 - 3392 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3392 - 3408 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3408 - 3424 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3424 - 3440 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 3440 - 3456 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3456 - 3472 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 3472 - 3488 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3488 - 3504 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 3504 - 3520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3520 - 3536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3536 - 3552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3552 - 3568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3568 - 3584 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3584 - 3600 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3600 - 3616 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3616 - 3632 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3632 - 3648 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3648 - 3664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3664 - 3680 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 3680 - 3696 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 3696 - 3712 */ + 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3712 - 3728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3728 - 3744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3744 - 3760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3760 - 3776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3776 - 3792 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3792 - 3808 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3808 - 3824 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3824 - 3840 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3840 - 3856 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3856 - 3872 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 3872 - 3888 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 3888 - 3904 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 3904 - 3920 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 3920 - 3936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3936 - 3952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3952 - 3968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3968 - 3984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 3984 - 4000 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4000 - 4016 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4016 - 4032 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4032 - 4048 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4048 - 4064 */ + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4064 - 4080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4080 - 4096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 4096 - 4112 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 4112 - 4128 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 4128 - 4144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4144 - 4160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4160 - 4176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4176 - 4192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4192 - 4208 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4208 - 4224 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4224 - 4240 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4240 - 4256 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4256 - 4272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4272 - 4288 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4288 - 4304 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 4304 - 4320 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4320 - 4336 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 4336 - 4352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4352 - 4368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4368 - 4384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4384 - 4400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4400 - 4416 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4416 - 4432 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4432 - 4448 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4448 - 4464 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 4464 - 4480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4480 - 4496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4496 - 4512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4512 - 4528 */ + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 4528 - 4544 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 4544 - 4560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4560 - 4576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4576 - 4592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4592 - 4608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4608 - 4624 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4624 - 4640 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4640 - 4656 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4656 - 4672 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 4672 - 4688 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4688 - 4704 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4704 - 4720 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4720 - 4736 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 4736 - 4752 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 4752 - 4768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4768 - 4784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4784 - 4800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4800 - 4816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4816 - 4832 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4832 - 4848 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4848 - 4864 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 4864 - 4880 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4880 - 4896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4896 - 4912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4912 - 4928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 4928 - 4944 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 4944 - 4960 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 4960 - 4976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4976 - 4992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4992 - 5008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5008 - 5024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5024 - 5040 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5040 - 5056 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5056 - 5072 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5072 - 5088 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5088 - 5104 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 5104 - 5120 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 5120 - 5136 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5136 - 5152 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5152 - 5168 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 5168 - 5184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5184 - 5200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5200 - 5216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5216 - 5232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5232 - 5248 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5248 - 5264 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5264 - 5280 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5280 - 5296 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5296 - 5312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5312 - 5328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5328 - 5344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5344 - 5360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 5360 - 5376 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 5376 - 5392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5392 - 5408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5408 - 5424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5424 - 5440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5440 - 5456 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5456 - 5472 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5472 - 5488 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 5488 - 5504 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5504 - 5520 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5520 - 5536 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5536 - 5552 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5552 - 5568 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5568 - 5584 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 5584 - 5600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5600 - 5616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5616 - 5632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5632 - 5648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5648 - 5664 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5664 - 5680 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5680 - 5696 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 5696 - 5712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5712 - 5728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5728 - 5744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0x00, /* bytes 5744 - 5760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5760 - 5776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 5776 - 5792 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 5792 - 5808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5808 - 5824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5824 - 5840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5840 - 5856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5856 - 5872 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5872 - 5888 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 5888 - 5904 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5904 - 5920 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5920 - 5936 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5936 - 5952 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 5952 - 5968 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5968 - 5984 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 5984 - 6000 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 6000 - 6016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6016 - 6032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6032 - 6048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6048 - 6064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6064 - 6080 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6080 - 6096 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6096 - 6112 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0x00, /* bytes 6112 - 6128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 6128 - 6144 */ + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 6144 - 6160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 6160 - 6176 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 6176 - 6192 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 6192 - 6208 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 6208 - 6224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6224 - 6240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6240 - 6256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6256 - 6272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6272 - 6288 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6288 - 6304 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6304 - 6320 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6320 - 6336 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6336 - 6352 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6352 - 6368 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 6368 - 6384 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6384 - 6400 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6400 - 6416 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 6416 - 6432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6432 - 6448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6448 - 6464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6464 - 6480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6480 - 6496 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6496 - 6512 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6512 - 6528 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6528 - 6544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 6544 - 6560 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6560 - 6576 */ + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 6576 - 6592 */ + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 6592 - 6608 */ + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 6608 - 6624 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 6624 - 6640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6640 - 6656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6656 - 6672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6672 - 6688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 6688 - 6704 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6704 - 6720 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6720 - 6736 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6736 - 6752 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 6752 - 6768 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6768 - 6784 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6784 - 6800 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6800 - 6816 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 6816 - 6832 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 6832 - 6848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6848 - 6864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6864 - 6880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6880 - 6896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 6896 - 6912 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6912 - 6928 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6928 - 6944 */ + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6944 - 6960 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 6960 - 6976 */ + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6976 - 6992 */ + 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 6992 - 7008 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 7008 - 7024 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 7024 - 7040 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 7040 - 7056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7056 - 7072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7072 - 7088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7088 - 7104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 7104 - 7120 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7120 - 7136 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7136 - 7152 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7152 - 7168 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 7168 - 7184 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7184 - 7200 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7200 - 7216 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7216 - 7232 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7232 - 7248 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 7248 - 7264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7264 - 7280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7280 - 7296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7296 - 7312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7312 - 7328 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7328 - 7344 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, /* bytes 7344 - 7360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7360 - 7376 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7376 - 7392 */ + 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 7392 - 7408 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7408 - 7424 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, /* bytes 7424 - 7440 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 7440 - 7456 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 7456 - 7472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7472 - 7488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7488 - 7504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7504 - 7520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7520 - 7536 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7536 - 7552 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, /* bytes 7552 - 7568 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7568 - 7584 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 7584 - 7600 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7600 - 7616 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 7616 - 7632 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7632 - 7648 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7648 - 7664 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 7664 - 7680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7680 - 7696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7696 - 7712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7712 - 7728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7728 - 7744 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7744 - 7760 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7760 - 7776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 7776 - 7792 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7792 - 7808 */ + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 7808 - 7824 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 7824 - 7840 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 7840 - 7856 */ + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7856 - 7872 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 7872 - 7888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7888 - 7904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7904 - 7920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7920 - 7936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7936 - 7952 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 7952 - 7968 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7968 - 7984 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 7984 - 8000 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8000 - 8016 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8016 - 8032 */ + 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8032 - 8048 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8048 - 8064 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 8064 - 8080 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8080 - 8096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8096 - 8112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8112 - 8128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8128 - 8144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8144 - 8160 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8160 - 8176 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8176 - 8192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 8192 - 8208 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8208 - 8224 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8224 - 8240 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8240 - 8256 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8256 - 8272 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8272 - 8288 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8288 - 8304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8304 - 8320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8320 - 8336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 8336 - 8352 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8352 - 8368 */ + 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8368 - 8384 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 8384 - 8400 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8400 - 8416 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8416 - 8432 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 8432 - 8448 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 8448 - 8464 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 8464 - 8480 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 8480 - 8496 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8496 - 8512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8512 - 8528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8528 - 8544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8544 - 8560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8560 - 8576 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8576 - 8592 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8592 - 8608 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, /* bytes 8608 - 8624 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8624 - 8640 */ + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, /* bytes 8640 - 8656 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8656 - 8672 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8672 - 8688 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8688 - 8704 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8704 - 8720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8720 - 8736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8736 - 8752 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8752 - 8768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8768 - 8784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8784 - 8800 */ + 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8800 - 8816 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 8816 - 8832 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 8832 - 8848 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8848 - 8864 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8864 - 8880 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8880 - 8896 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8896 - 8912 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 8912 - 8928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8928 - 8944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8944 - 8960 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8960 - 8976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8976 - 8992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 8992 - 9008 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9008 - 9024 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 9024 - 9040 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 9040 - 9056 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, /* bytes 9056 - 9072 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9072 - 9088 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9088 - 9104 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9104 - 9120 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9120 - 9136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9136 - 9152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9152 - 9168 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 9168 - 9184 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9184 - 9200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9200 - 9216 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 9216 - 9232 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 9232 - 9248 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9248 - 9264 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9264 - 9280 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 9280 - 9296 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9296 - 9312 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9312 - 9328 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9328 - 9344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9344 - 9360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9360 - 9376 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9376 - 9392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9392 - 9408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 9408 - 9424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9424 - 9440 */ + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 9440 - 9456 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9456 - 9472 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9472 - 9488 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9488 - 9504 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9504 - 9520 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9520 - 9536 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9536 - 9552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9552 - 9568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9568 - 9584 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 9584 - 9600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9600 - 9616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 9616 - 9632 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 9632 - 9648 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 9648 - 9664 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 9664 - 9680 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9680 - 9696 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9696 - 9712 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9712 - 9728 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9728 - 9744 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9744 - 9760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9760 - 9776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9776 - 9792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9792 - 9808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9808 - 9824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9824 - 9840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 9840 - 9856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9856 - 9872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 9872 - 9888 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 9888 - 9904 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9904 - 9920 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9920 - 9936 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 9936 - 9952 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 9952 - 9968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9968 - 9984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9984 - 10000 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10000 - 10016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10016 - 10032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 10032 - 10048 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 10048 - 10064 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10064 - 10080 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10080 - 10096 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, /* bytes 10096 - 10112 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 10112 - 10128 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10128 - 10144 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10144 - 10160 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10160 - 10176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10176 - 10192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10192 - 10208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10208 - 10224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10224 - 10240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10240 - 10256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10256 - 10272 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10272 - 10288 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10288 - 10304 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, /* bytes 10304 - 10320 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10320 - 10336 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10336 - 10352 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10352 - 10368 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10368 - 10384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10384 - 10400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10400 - 10416 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10416 - 10432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10432 - 10448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10448 - 10464 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 10464 - 10480 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10480 - 10496 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 10496 - 10512 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 10512 - 10528 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10528 - 10544 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10544 - 10560 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10560 - 10576 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10576 - 10592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10592 - 10608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10608 - 10624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10624 - 10640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10640 - 10656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10656 - 10672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10672 - 10688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10688 - 10704 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10704 - 10720 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, /* bytes 10720 - 10736 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10736 - 10752 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10752 - 10768 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10768 - 10784 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10784 - 10800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10800 - 10816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10816 - 10832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10832 - 10848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 10848 - 10864 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10864 - 10880 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 10880 - 10896 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10896 - 10912 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10912 - 10928 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 10928 - 10944 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 10944 - 10960 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10960 - 10976 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 10976 - 10992 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 10992 - 11008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11008 - 11024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11024 - 11040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11040 - 11056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11056 - 11072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 11072 - 11088 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11088 - 11104 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11104 - 11120 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 11120 - 11136 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 11136 - 11152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11152 - 11168 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11168 - 11184 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11184 - 11200 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 11200 - 11216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11216 - 11232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11232 - 11248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11248 - 11264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, /* bytes 11264 - 11280 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 11280 - 11296 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 11296 - 11312 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 11312 - 11328 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 11328 - 11344 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 11344 - 11360 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11360 - 11376 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11376 - 11392 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11392 - 11408 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 11408 - 11424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11424 - 11440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11440 - 11456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11456 - 11472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11472 - 11488 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11488 - 11504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11504 - 11520 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 11520 - 11536 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 11536 - 11552 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 11552 - 11568 */ + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11568 - 11584 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11584 - 11600 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11600 - 11616 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 11616 - 11632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11632 - 11648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11648 - 11664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11664 - 11680 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 11680 - 11696 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 11696 - 11712 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 11712 - 11728 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 11728 - 11744 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 11744 - 11760 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11760 - 11776 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11776 - 11792 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11792 - 11808 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11808 - 11824 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 11824 - 11840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11840 - 11856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11856 - 11872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11872 - 11888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11888 - 11904 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11904 - 11920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11920 - 11936 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 11936 - 11952 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11952 - 11968 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11968 - 11984 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 11984 - 12000 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12000 - 12016 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12016 - 12032 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12032 - 12048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12048 - 12064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12064 - 12080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12080 - 12096 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12096 - 12112 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12112 - 12128 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12128 - 12144 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12144 - 12160 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12160 - 12176 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12176 - 12192 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12192 - 12208 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12208 - 12224 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12224 - 12240 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12240 - 12256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12256 - 12272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12272 - 12288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12288 - 12304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12304 - 12320 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12320 - 12336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12336 - 12352 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12352 - 12368 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12368 - 12384 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12384 - 12400 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12400 - 12416 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12416 - 12432 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12432 - 12448 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12448 - 12464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12464 - 12480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12480 - 12496 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 12496 - 12512 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12512 - 12528 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 12528 - 12544 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 12544 - 12560 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12560 - 12576 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12576 - 12592 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12592 - 12608 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12608 - 12624 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12624 - 12640 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12640 - 12656 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12656 - 12672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12672 - 12688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12688 - 12704 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12704 - 12720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 12720 - 12736 */ + 0x00, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12736 - 12752 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, /* bytes 12752 - 12768 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 12768 - 12784 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12784 - 12800 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12800 - 12816 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12816 - 12832 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12832 - 12848 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12848 - 12864 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 12864 - 12880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12880 - 12896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12896 - 12912 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12912 - 12928 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12928 - 12944 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12944 - 12960 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 12960 - 12976 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 12976 - 12992 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 12992 - 13008 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13008 - 13024 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13024 - 13040 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13040 - 13056 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13056 - 13072 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 13072 - 13088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13088 - 13104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13104 - 13120 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13120 - 13136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 13136 - 13152 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 13152 - 13168 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 13168 - 13184 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13184 - 13200 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13200 - 13216 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13216 - 13232 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13232 - 13248 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13248 - 13264 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13264 - 13280 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 13280 - 13296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13296 - 13312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13312 - 13328 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 13328 - 13344 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 13344 - 13360 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 13360 - 13376 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 13376 - 13392 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13392 - 13408 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13408 - 13424 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13424 - 13440 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13440 - 13456 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13456 - 13472 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13472 - 13488 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 13488 - 13504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13504 - 13520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13520 - 13536 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13536 - 13552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 13552 - 13568 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, /* bytes 13568 - 13584 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 13584 - 13600 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13600 - 13616 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13616 - 13632 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13632 - 13648 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13648 - 13664 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13664 - 13680 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13680 - 13696 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 13696 - 13712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13712 - 13728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13728 - 13744 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 13744 - 13760 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 13760 - 13776 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 13776 - 13792 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 13792 - 13808 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 13808 - 13824 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13824 - 13840 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13840 - 13856 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13856 - 13872 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13872 - 13888 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13888 - 13904 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 13904 - 13920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13920 - 13936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13936 - 13952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13952 - 13968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0xfc, /* bytes 13968 - 13984 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 13984 - 14000 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 14000 - 14016 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14016 - 14032 */ + 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14032 - 14048 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14048 - 14064 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14064 - 14080 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14080 - 14096 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14096 - 14112 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 14112 - 14128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14128 - 14144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14144 - 14160 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 14160 - 14176 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 14176 - 14192 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14192 - 14208 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14208 - 14224 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14224 - 14240 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14240 - 14256 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14256 - 14272 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14272 - 14288 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14288 - 14304 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14304 - 14320 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 14320 - 14336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14336 - 14352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14352 - 14368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14368 - 14384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 14384 - 14400 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14400 - 14416 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14416 - 14432 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14432 - 14448 */ + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14448 - 14464 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14464 - 14480 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14480 - 14496 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14496 - 14512 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14512 - 14528 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 14528 - 14544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14544 - 14560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14560 - 14576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 14576 - 14592 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 14592 - 14608 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14608 - 14624 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14624 - 14640 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14640 - 14656 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14656 - 14672 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14672 - 14688 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14688 - 14704 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14704 - 14720 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14720 - 14736 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 14736 - 14752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14752 - 14768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14768 - 14784 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14784 - 14800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 14800 - 14816 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14816 - 14832 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14832 - 14848 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14848 - 14864 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14864 - 14880 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14880 - 14896 */ + 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14896 - 14912 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14912 - 14928 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 14928 - 14944 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 14944 - 14960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14960 - 14976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14976 - 14992 */ + 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 14992 - 15008 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 15008 - 15024 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15024 - 15040 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15040 - 15056 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15056 - 15072 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15072 - 15088 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 15088 - 15104 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15104 - 15120 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15120 - 15136 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15136 - 15152 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 15152 - 15168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15168 - 15184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15184 - 15200 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15200 - 15216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 15216 - 15232 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15232 - 15248 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15248 - 15264 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15264 - 15280 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15280 - 15296 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15296 - 15312 */ + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15312 - 15328 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15328 - 15344 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15344 - 15360 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 15360 - 15376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15376 - 15392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15392 - 15408 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 15408 - 15424 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 15424 - 15440 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15440 - 15456 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15456 - 15472 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15472 - 15488 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15488 - 15504 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 15504 - 15520 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15520 - 15536 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15536 - 15552 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15552 - 15568 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 15568 - 15584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15584 - 15600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15600 - 15616 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15616 - 15632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 15632 - 15648 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15648 - 15664 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15664 - 15680 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15680 - 15696 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15696 - 15712 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 15712 - 15728 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15728 - 15744 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15744 - 15760 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15760 - 15776 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 15776 - 15792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15792 - 15808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15808 - 15824 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 15824 - 15840 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 15840 - 15856 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15856 - 15872 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15872 - 15888 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15888 - 15904 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15904 - 15920 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 15920 - 15936 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15936 - 15952 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15952 - 15968 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 15968 - 15984 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 15984 - 16000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16000 - 16016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16016 - 16032 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, /* bytes 16032 - 16048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16048 - 16064 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16064 - 16080 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16080 - 16096 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16096 - 16112 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16112 - 16128 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 16128 - 16144 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16144 - 16160 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16160 - 16176 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16176 - 16192 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 16192 - 16208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16208 - 16224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16224 - 16240 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, /* bytes 16240 - 16256 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 16256 - 16272 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16272 - 16288 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16288 - 16304 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16304 - 16320 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16320 - 16336 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 16336 - 16352 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16352 - 16368 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16368 - 16384 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16384 - 16400 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 16400 - 16416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16416 - 16432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16432 - 16448 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 16448 - 16464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 16464 - 16480 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16480 - 16496 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16496 - 16512 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16512 - 16528 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 16528 - 16544 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16544 - 16560 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16560 - 16576 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16576 - 16592 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16592 - 16608 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 16608 - 16624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16624 - 16640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16640 - 16656 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, /* bytes 16656 - 16672 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 16672 - 16688 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16688 - 16704 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 16704 - 16720 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16720 - 16736 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 16736 - 16752 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 16752 - 16768 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16768 - 16784 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16784 - 16800 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16800 - 16816 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 16816 - 16832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16832 - 16848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16848 - 16864 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 16864 - 16880 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 16880 - 16896 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16896 - 16912 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16912 - 16928 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16928 - 16944 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 16944 - 16960 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16960 - 16976 */ + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16976 - 16992 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 16992 - 17008 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17008 - 17024 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 17024 - 17040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17040 - 17056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17056 - 17072 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17072 - 17088 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 17088 - 17104 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17104 - 17120 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 17120 - 17136 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17136 - 17152 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17152 - 17168 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17168 - 17184 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17184 - 17200 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17200 - 17216 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17216 - 17232 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 17232 - 17248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17248 - 17264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17264 - 17280 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17280 - 17296 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 17296 - 17312 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17312 - 17328 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17328 - 17344 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17344 - 17360 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17360 - 17376 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17376 - 17392 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17392 - 17408 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17408 - 17424 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17424 - 17440 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 17440 - 17456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17456 - 17472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17472 - 17488 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17488 - 17504 */ + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 17504 - 17520 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17520 - 17536 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17536 - 17552 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17552 - 17568 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17568 - 17584 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17584 - 17600 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17600 - 17616 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17616 - 17632 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17632 - 17648 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 17648 - 17664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17664 - 17680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17680 - 17696 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17696 - 17712 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 17712 - 17728 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17728 - 17744 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17744 - 17760 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17760 - 17776 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17776 - 17792 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 17792 - 17808 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17808 - 17824 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17824 - 17840 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17840 - 17856 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 17856 - 17872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17872 - 17888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17888 - 17904 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 17904 - 17920 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 17920 - 17936 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17936 - 17952 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17952 - 17968 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17968 - 17984 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 17984 - 18000 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 18000 - 18016 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18016 - 18032 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18032 - 18048 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18048 - 18064 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18064 - 18080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18080 - 18096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18096 - 18112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18112 - 18128 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18128 - 18144 */ + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18144 - 18160 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18160 - 18176 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18176 - 18192 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18192 - 18208 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18208 - 18224 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18224 - 18240 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18240 - 18256 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18256 - 18272 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18272 - 18288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18288 - 18304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18304 - 18320 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 18320 - 18336 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 18336 - 18352 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18352 - 18368 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18368 - 18384 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18384 - 18400 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18400 - 18416 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 18416 - 18432 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18432 - 18448 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18448 - 18464 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18464 - 18480 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18480 - 18496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18496 - 18512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18512 - 18528 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 18528 - 18544 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 18544 - 18560 */ + 0x00, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18560 - 18576 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18576 - 18592 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18592 - 18608 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18608 - 18624 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18624 - 18640 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18640 - 18656 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18656 - 18672 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18672 - 18688 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18688 - 18704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18704 - 18720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18720 - 18736 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 18736 - 18752 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 18752 - 18768 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18768 - 18784 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18784 - 18800 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18800 - 18816 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18816 - 18832 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18832 - 18848 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18848 - 18864 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18864 - 18880 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18880 - 18896 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 18896 - 18912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18912 - 18928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18928 - 18944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 18944 - 18960 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 18960 - 18976 */ + 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18976 - 18992 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 18992 - 19008 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19008 - 19024 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19024 - 19040 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19040 - 19056 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19056 - 19072 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19072 - 19088 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19088 - 19104 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 19104 - 19120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19120 - 19136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19136 - 19152 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 19152 - 19168 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 19168 - 19184 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19184 - 19200 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19200 - 19216 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19216 - 19232 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19232 - 19248 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19248 - 19264 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19264 - 19280 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19280 - 19296 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19296 - 19312 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 19312 - 19328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19328 - 19344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19344 - 19360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19360 - 19376 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 19376 - 19392 */ + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19392 - 19408 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19408 - 19424 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19424 - 19440 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19440 - 19456 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19456 - 19472 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19472 - 19488 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19488 - 19504 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19504 - 19520 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 19520 - 19536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19536 - 19552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19552 - 19568 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 19568 - 19584 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19584 - 19600 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19600 - 19616 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19616 - 19632 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19632 - 19648 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19648 - 19664 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19664 - 19680 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19680 - 19696 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19696 - 19712 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19712 - 19728 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 19728 - 19744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19744 - 19760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19760 - 19776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19776 - 19792 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19792 - 19808 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19808 - 19824 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19824 - 19840 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19840 - 19856 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19856 - 19872 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19872 - 19888 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19888 - 19904 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19904 - 19920 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 19920 - 19936 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 19936 - 19952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19952 - 19968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19968 - 19984 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 19984 - 20000 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20000 - 20016 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20016 - 20032 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20032 - 20048 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 20048 - 20064 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20064 - 20080 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20080 - 20096 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20096 - 20112 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20112 - 20128 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20128 - 20144 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 20144 - 20160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20160 - 20176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20176 - 20192 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20192 - 20208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20208 - 20224 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20224 - 20240 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20240 - 20256 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20256 - 20272 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20272 - 20288 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20288 - 20304 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20304 - 20320 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20320 - 20336 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20336 - 20352 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 20352 - 20368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20368 - 20384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20384 - 20400 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 20400 - 20416 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20416 - 20432 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 20432 - 20448 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20448 - 20464 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20464 - 20480 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20480 - 20496 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20496 - 20512 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20512 - 20528 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20528 - 20544 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20544 - 20560 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 20560 - 20576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20576 - 20592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20592 - 20608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20608 - 20624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20624 - 20640 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20640 - 20656 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20656 - 20672 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20672 - 20688 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20688 - 20704 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20704 - 20720 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20720 - 20736 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20736 - 20752 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20752 - 20768 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 20768 - 20784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20784 - 20800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20800 - 20816 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 20816 - 20832 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 20832 - 20848 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 20848 - 20864 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20864 - 20880 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 20880 - 20896 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20896 - 20912 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20912 - 20928 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20928 - 20944 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20944 - 20960 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 20960 - 20976 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 20976 - 20992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20992 - 21008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21008 - 21024 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21024 - 21040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 21040 - 21056 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21056 - 21072 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21072 - 21088 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21088 - 21104 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21104 - 21120 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21120 - 21136 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21136 - 21152 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21152 - 21168 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21168 - 21184 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 21184 - 21200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21200 - 21216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21216 - 21232 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 21232 - 21248 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, /* bytes 21248 - 21264 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 21264 - 21280 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21280 - 21296 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 21296 - 21312 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21312 - 21328 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21328 - 21344 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21344 - 21360 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21360 - 21376 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21376 - 21392 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 21392 - 21408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21408 - 21424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21424 - 21440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 21440 - 21456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21456 - 21472 */ + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21472 - 21488 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21488 - 21504 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21504 - 21520 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21520 - 21536 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21536 - 21552 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21552 - 21568 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21568 - 21584 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21584 - 21600 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 21600 - 21616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21616 - 21632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21632 - 21648 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 21648 - 21664 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 21664 - 21680 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21680 - 21696 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 21696 - 21712 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21712 - 21728 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21728 - 21744 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21744 - 21760 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21760 - 21776 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21776 - 21792 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21792 - 21808 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 21808 - 21824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21824 - 21840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21840 - 21856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 21856 - 21872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21872 - 21888 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21888 - 21904 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21904 - 21920 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21920 - 21936 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21936 - 21952 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21952 - 21968 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21968 - 21984 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 21984 - 22000 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22000 - 22016 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 22016 - 22032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22032 - 22048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22048 - 22064 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22064 - 22080 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22080 - 22096 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22096 - 22112 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22112 - 22128 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22128 - 22144 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22144 - 22160 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 22160 - 22176 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22176 - 22192 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22192 - 22208 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22208 - 22224 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 22224 - 22240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22240 - 22256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22256 - 22272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22272 - 22288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22288 - 22304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22304 - 22320 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22320 - 22336 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22336 - 22352 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22352 - 22368 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22368 - 22384 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22384 - 22400 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22400 - 22416 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22416 - 22432 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 22432 - 22448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22448 - 22464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22464 - 22480 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22480 - 22496 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22496 - 22512 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22512 - 22528 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22528 - 22544 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22544 - 22560 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22560 - 22576 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22576 - 22592 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22592 - 22608 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22608 - 22624 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22624 - 22640 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 22640 - 22656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22656 - 22672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22672 - 22688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 22688 - 22704 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 22704 - 22720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22720 - 22736 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22736 - 22752 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22752 - 22768 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22768 - 22784 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22784 - 22800 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22800 - 22816 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22816 - 22832 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22832 - 22848 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 22848 - 22864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22864 - 22880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22880 - 22896 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22896 - 22912 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22912 - 22928 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22928 - 22944 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 22944 - 22960 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 22960 - 22976 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 22976 - 22992 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 22992 - 23008 */ + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23008 - 23024 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23024 - 23040 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23040 - 23056 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 23056 - 23072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23072 - 23088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23088 - 23104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23104 - 23120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23120 - 23136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 23136 - 23152 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23152 - 23168 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23168 - 23184 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23184 - 23200 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23200 - 23216 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23216 - 23232 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23232 - 23248 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23248 - 23264 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 23264 - 23280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23280 - 23296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23296 - 23312 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23312 - 23328 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23328 - 23344 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23344 - 23360 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 23360 - 23376 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23376 - 23392 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23392 - 23408 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 23408 - 23424 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23424 - 23440 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23440 - 23456 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23456 - 23472 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 23472 - 23488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23488 - 23504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23504 - 23520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23520 - 23536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23536 - 23552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23552 - 23568 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23568 - 23584 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23584 - 23600 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23600 - 23616 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23616 - 23632 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23632 - 23648 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23648 - 23664 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23664 - 23680 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 23680 - 23696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23696 - 23712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23712 - 23728 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23728 - 23744 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23744 - 23760 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23760 - 23776 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23776 - 23792 */ + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 23792 - 23808 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23808 - 23824 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23824 - 23840 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23840 - 23856 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 23856 - 23872 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 23872 - 23888 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 23888 - 23904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23904 - 23920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23920 - 23936 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23936 - 23952 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23952 - 23968 */ + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 23968 - 23984 */ + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 23984 - 24000 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24000 - 24016 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24016 - 24032 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24032 - 24048 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24048 - 24064 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24064 - 24080 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24080 - 24096 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 24096 - 24112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24112 - 24128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24128 - 24144 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24144 - 24160 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24160 - 24176 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24176 - 24192 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24192 - 24208 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24208 - 24224 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24224 - 24240 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24240 - 24256 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24256 - 24272 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24272 - 24288 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 24288 - 24304 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 24304 - 24320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24320 - 24336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24336 - 24352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24352 - 24368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 24368 - 24384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 24384 - 24400 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 24400 - 24416 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24416 - 24432 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24432 - 24448 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24448 - 24464 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24464 - 24480 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24480 - 24496 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 24496 - 24512 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 24512 - 24528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24528 - 24544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24544 - 24560 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24560 - 24576 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24576 - 24592 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24592 - 24608 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 24608 - 24624 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24624 - 24640 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24640 - 24656 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24656 - 24672 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 24672 - 24688 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24688 - 24704 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24704 - 24720 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 24720 - 24736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24736 - 24752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24752 - 24768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24768 - 24784 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24784 - 24800 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 24800 - 24816 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24816 - 24832 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24832 - 24848 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24848 - 24864 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24864 - 24880 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24880 - 24896 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 24896 - 24912 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 24912 - 24928 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 24928 - 24944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24944 - 24960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24960 - 24976 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24976 - 24992 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 24992 - 25008 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25008 - 25024 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 25024 - 25040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25040 - 25056 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25056 - 25072 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25072 - 25088 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 25088 - 25104 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 25104 - 25120 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 25120 - 25136 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 25136 - 25152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25152 - 25168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25168 - 25184 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 25184 - 25200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25200 - 25216 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 25216 - 25232 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 25232 - 25248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25248 - 25264 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25264 - 25280 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25280 - 25296 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25296 - 25312 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 25312 - 25328 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, /* bytes 25328 - 25344 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 25344 - 25360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25360 - 25376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25376 - 25392 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25392 - 25408 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25408 - 25424 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25424 - 25440 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25440 - 25456 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25456 - 25472 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25472 - 25488 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25488 - 25504 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25504 - 25520 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 25520 - 25536 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 25536 - 25552 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 25552 - 25568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25568 - 25584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25584 - 25600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 25600 - 25616 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25616 - 25632 */ + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 25632 - 25648 */ + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25648 - 25664 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25664 - 25680 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25680 - 25696 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25696 - 25712 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, /* bytes 25712 - 25728 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25728 - 25744 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25744 - 25760 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 25760 - 25776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25776 - 25792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25792 - 25808 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25808 - 25824 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25824 - 25840 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25840 - 25856 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25856 - 25872 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25872 - 25888 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25888 - 25904 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 25904 - 25920 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 25920 - 25936 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 25936 - 25952 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 25952 - 25968 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 25968 - 25984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25984 - 26000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26000 - 26016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 26016 - 26032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 26032 - 26048 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 26048 - 26064 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26064 - 26080 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26080 - 26096 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26096 - 26112 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26112 - 26128 */ + 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26128 - 26144 */ + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 26144 - 26160 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26160 - 26176 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 26176 - 26192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26192 - 26208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26208 - 26224 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26224 - 26240 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26240 - 26256 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26256 - 26272 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26272 - 26288 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26288 - 26304 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26304 - 26320 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26320 - 26336 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0xfc, /* bytes 26336 - 26352 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26352 - 26368 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26368 - 26384 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 26384 - 26400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26400 - 26416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26416 - 26432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 26432 - 26448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 26448 - 26464 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 26464 - 26480 */ + 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 26480 - 26496 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26496 - 26512 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26512 - 26528 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26528 - 26544 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26544 - 26560 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26560 - 26576 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26576 - 26592 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 26592 - 26608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26608 - 26624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26624 - 26640 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26640 - 26656 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26656 - 26672 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26672 - 26688 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 26688 - 26704 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26704 - 26720 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26720 - 26736 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26736 - 26752 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26752 - 26768 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26768 - 26784 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26784 - 26800 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 26800 - 26816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26816 - 26832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26832 - 26848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26848 - 26864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26864 - 26880 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 26880 - 26896 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 26896 - 26912 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26912 - 26928 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26928 - 26944 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26944 - 26960 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26960 - 26976 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26976 - 26992 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 26992 - 27008 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 27008 - 27024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27024 - 27040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27040 - 27056 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27056 - 27072 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27072 - 27088 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27088 - 27104 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27104 - 27120 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27120 - 27136 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27136 - 27152 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27152 - 27168 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27168 - 27184 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27184 - 27200 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27200 - 27216 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 27216 - 27232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27232 - 27248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27248 - 27264 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27264 - 27280 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27280 - 27296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 27296 - 27312 */ + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27312 - 27328 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27328 - 27344 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27344 - 27360 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27360 - 27376 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27376 - 27392 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27392 - 27408 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27408 - 27424 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 27424 - 27440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27440 - 27456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27456 - 27472 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, /* bytes 27472 - 27488 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27488 - 27504 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27504 - 27520 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27520 - 27536 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27536 - 27552 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27552 - 27568 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27568 - 27584 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27584 - 27600 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27600 - 27616 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27616 - 27632 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 27632 - 27648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27648 - 27664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27664 - 27680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27680 - 27696 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27696 - 27712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 27712 - 27728 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xfc, /* bytes 27728 - 27744 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27744 - 27760 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27760 - 27776 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27776 - 27792 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27792 - 27808 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27808 - 27824 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27824 - 27840 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 27840 - 27856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27856 - 27872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27872 - 27888 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27888 - 27904 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27904 - 27920 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27920 - 27936 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 27936 - 27952 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27952 - 27968 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27968 - 27984 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 27984 - 28000 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28000 - 28016 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28016 - 28032 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28032 - 28048 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 28048 - 28064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28064 - 28080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28080 - 28096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28096 - 28112 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28112 - 28128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 28128 - 28144 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, /* bytes 28144 - 28160 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28160 - 28176 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28176 - 28192 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28192 - 28208 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28208 - 28224 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28224 - 28240 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28240 - 28256 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 28256 - 28272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28272 - 28288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28288 - 28304 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28304 - 28320 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28320 - 28336 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28336 - 28352 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, /* bytes 28352 - 28368 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28368 - 28384 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28384 - 28400 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28400 - 28416 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28416 - 28432 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28432 - 28448 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28448 - 28464 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 28464 - 28480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28480 - 28496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28496 - 28512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28512 - 28528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28528 - 28544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 28544 - 28560 */ + 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28560 - 28576 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28576 - 28592 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28592 - 28608 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28608 - 28624 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28624 - 28640 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28640 - 28656 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28656 - 28672 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 28672 - 28688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28688 - 28704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28704 - 28720 */ + 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28720 - 28736 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28736 - 28752 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 28752 - 28768 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28768 - 28784 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28784 - 28800 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28800 - 28816 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28816 - 28832 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28832 - 28848 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28848 - 28864 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28864 - 28880 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 28880 - 28896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28896 - 28912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28912 - 28928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28928 - 28944 */ + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28944 - 28960 */ + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28960 - 28976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28976 - 28992 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 28992 - 29008 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29008 - 29024 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29024 - 29040 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29040 - 29056 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29056 - 29072 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29072 - 29088 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 29088 - 29104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29104 - 29120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29120 - 29136 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29136 - 29152 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29152 - 29168 */ + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29168 - 29184 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29184 - 29200 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29200 - 29216 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29216 - 29232 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29232 - 29248 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29248 - 29264 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29264 - 29280 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29280 - 29296 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 29296 - 29312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29312 - 29328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29328 - 29344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29344 - 29360 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29360 - 29376 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 29376 - 29392 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29392 - 29408 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29408 - 29424 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29424 - 29440 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29440 - 29456 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29456 - 29472 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29472 - 29488 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29488 - 29504 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 29504 - 29520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29520 - 29536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29536 - 29552 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29552 - 29568 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, /* bytes 29568 - 29584 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29584 - 29600 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29600 - 29616 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29616 - 29632 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29632 - 29648 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29648 - 29664 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29664 - 29680 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29680 - 29696 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29696 - 29712 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 29712 - 29728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29728 - 29744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29744 - 29760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 29760 - 29776 */ + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29776 - 29792 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, /* bytes 29792 - 29808 */ + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29808 - 29824 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29824 - 29840 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29840 - 29856 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29856 - 29872 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29872 - 29888 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29888 - 29904 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 29904 - 29920 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 29920 - 29936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29936 - 29952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29952 - 29968 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 29968 - 29984 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* bytes 29984 - 30000 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 30000 - 30016 */ + 0x00, 0xfc, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30016 - 30032 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30032 - 30048 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30048 - 30064 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30064 - 30080 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30080 - 30096 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30096 - 30112 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30112 - 30128 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 30128 - 30144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30144 - 30160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30160 - 30176 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 30176 - 30192 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, /* bytes 30192 - 30208 */ + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30208 - 30224 */ + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30224 - 30240 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30240 - 30256 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30256 - 30272 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30272 - 30288 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30288 - 30304 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30304 - 30320 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30320 - 30336 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 30336 - 30352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30352 - 30368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30368 - 30384 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 30384 - 30400 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 30400 - 30416 */ + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, + 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, /* bytes 30416 - 30432 */ + 0x00, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30432 - 30448 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30448 - 30464 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30464 - 30480 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30480 - 30496 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30496 - 30512 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30512 - 30528 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30528 - 30544 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 30544 - 30560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30560 - 30576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30576 - 30592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, + 0x00, 0x00, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 30592 - 30608 */ + 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30608 - 30624 */ + 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, /* bytes 30624 - 30640 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30640 - 30656 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30656 - 30672 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30672 - 30688 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30688 - 30704 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30704 - 30720 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30720 - 30736 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, /* bytes 30736 - 30752 */ + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, /* bytes 30752 - 30768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; static const GBitmap s_Morgan_after_03_bitmap = { - .addr = (void*) &s_Morgan_after_03_pixels, - .row_size_bytes = 208, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 205, .h = 148 }, - }, + .addr = (void *)&s_Morgan_after_03_pixels, + .row_size_bytes = 208, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 205, .h = 148}, + }, }; diff --git a/src/fw/apps/demo/demo_images/flower_after_01.png.h b/src/fw/apps/demo/demo_images/flower_after_01.png.h index 34b7befb24..466d5eb284 100644 --- a/src/fw/apps/demo/demo_images/flower_after_01.png.h +++ b/src/fw/apps/demo/demo_images/flower_after_01.png.h @@ -6,1938 +6,3862 @@ // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_flower_after_01_pixels[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 48 - 64 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 64 - 80 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 80 - 96 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 96 - 112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 112 - 128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 128 - 144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 224 - 240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 240 - 256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 256 - 272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 272 - 288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 288 - 304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 304 - 320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 320 - 336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 336 - 352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 352 - 368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 368 - 384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 432 - 448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 448 - 464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 464 - 480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 480 - 496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 496 - 512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 512 - 528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 528 - 544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 544 - 560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 560 - 576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 576 - 592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 608 - 624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 640 - 656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 656 - 672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 672 - 688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 688 - 704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 704 - 720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 720 - 736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 736 - 752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 752 - 768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 768 - 784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 784 - 800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 848 - 864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 864 - 880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 880 - 896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 896 - 912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 912 - 928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 928 - 944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 944 - 960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 960 - 976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 976 - 992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 992 - 1008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1008 - 1024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1056 - 1072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1072 - 1088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1088 - 1104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1104 - 1120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1120 - 1136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1136 - 1152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1152 - 1168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1168 - 1184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1184 - 1200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1200 - 1216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1248 - 1264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1264 - 1280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1280 - 1296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1296 - 1312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1312 - 1328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1328 - 1344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1344 - 1360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1360 - 1376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1376 - 1392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1392 - 1408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1408 - 1424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1472 - 1488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1488 - 1504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1504 - 1520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1520 - 1536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1536 - 1552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1552 - 1568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1568 - 1584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1584 - 1600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1600 - 1616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1616 - 1632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1648 - 1664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1680 - 1696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1696 - 1712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1712 - 1728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1728 - 1744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1744 - 1760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1760 - 1776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1776 - 1792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1792 - 1808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1808 - 1824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1824 - 1840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1888 - 1904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1904 - 1920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1920 - 1936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1936 - 1952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1952 - 1968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1968 - 1984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1984 - 2000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2000 - 2016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2016 - 2032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2032 - 2048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2048 - 2064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2096 - 2112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2112 - 2128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2128 - 2144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2144 - 2160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2160 - 2176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2176 - 2192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2192 - 2208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2208 - 2224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2224 - 2240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2240 - 2256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2288 - 2304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2304 - 2320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2320 - 2336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2336 - 2352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2352 - 2368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2368 - 2384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2384 - 2400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2400 - 2416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2416 - 2432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2432 - 2448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2448 - 2464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2512 - 2528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2528 - 2544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2544 - 2560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2560 - 2576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2576 - 2592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2592 - 2608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2608 - 2624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2624 - 2640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2640 - 2656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2656 - 2672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2688 - 2704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2720 - 2736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2736 - 2752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2752 - 2768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2768 - 2784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2784 - 2800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2800 - 2816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2816 - 2832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2832 - 2848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2848 - 2864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2864 - 2880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2928 - 2944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2944 - 2960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2960 - 2976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2976 - 2992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2992 - 3008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3008 - 3024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3024 - 3040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3040 - 3056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3056 - 3072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3072 - 3088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3088 - 3104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3136 - 3152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3152 - 3168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3168 - 3184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3184 - 3200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3200 - 3216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3216 - 3232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3232 - 3248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3248 - 3264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3264 - 3280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3280 - 3296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3328 - 3344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 3344 - 3360 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 3360 - 3376 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 3376 - 3392 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, /* bytes 3392 - 3408 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 3408 - 3424 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, /* bytes 3424 - 3440 */ - 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x40, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x04, 0x10, /* bytes 3440 - 3456 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 3456 - 3472 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 3472 - 3488 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 3488 - 3504 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 3504 - 3520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3520 - 3536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3536 - 3552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3552 - 3568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x04, 0x10, 0x00, 0x04, 0x04, 0x10, 0x00, /* bytes 3568 - 3584 */ - 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3584 - 3600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 3600 - 3616 */ - 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 3616 - 3632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, /* bytes 3632 - 3648 */ - 0x10, 0x10, 0x10, 0x40, 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, /* bytes 3648 - 3664 */ - 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 3664 - 3680 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 3680 - 3696 */ - 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, /* bytes 3696 - 3712 */ - 0x04, 0x04, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3712 - 3728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3728 - 3744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3744 - 3760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, /* bytes 3760 - 3776 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 3776 - 3792 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 3792 - 3808 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 3808 - 3824 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 3824 - 3840 */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 3840 - 3856 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 3856 - 3872 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, /* bytes 3872 - 3888 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 3888 - 3904 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 3904 - 3920 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 3920 - 3936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3936 - 3952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3952 - 3968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3968 - 3984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3984 - 4000 */ - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 4000 - 4016 */ - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4016 - 4032 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 4032 - 4048 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 4048 - 4064 */ - 0x10, 0x00, 0x10, 0x40, 0x10, 0x04, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 4064 - 4080 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x10, 0x44, 0x10, 0x00, 0x10, 0x40, 0x10, 0x04, 0x10, 0x00, /* bytes 4080 - 4096 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x44, /* bytes 4096 - 4112 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, /* bytes 4112 - 4128 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 4128 - 4144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4144 - 4160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4160 - 4176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4176 - 4192 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 4192 - 4208 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 4208 - 4224 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 4224 - 4240 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 4240 - 4256 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 4256 - 4272 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, 0x40, 0x44, 0x40, 0x54, 0x40, 0x44, 0x00, 0x50, 0x00, 0x40, /* bytes 4272 - 4288 */ - 0x00, 0x50, 0x04, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 4288 - 4304 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 4304 - 4320 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 4320 - 4336 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 4336 - 4352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4352 - 4368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4368 - 4384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4384 - 4400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4400 - 4416 */ - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 4416 - 4432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 4432 - 4448 */ - 0x10, 0x04, 0x10, 0x00, 0x10, 0x10, 0x14, 0x04, 0x10, 0x04, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 4448 - 4464 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 4464 - 4480 */ - 0x00, 0x40, 0x14, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 4480 - 4496 */ - 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x14, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 4496 - 4512 */ - 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 4512 - 4528 */ - 0x10, 0x10, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, /* bytes 4528 - 4544 */ - 0x10, 0x04, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x04, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 4544 - 4560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4560 - 4576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4576 - 4592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4592 - 4608 */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, /* bytes 4608 - 4624 */ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 4624 - 4640 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, /* bytes 4640 - 4656 */ - 0x00, 0x10, 0x00, 0x54, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, /* bytes 4656 - 4672 */ - 0x00, 0x40, 0x00, 0x44, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 4672 - 4688 */ - 0x40, 0x50, 0x04, 0x10, 0x04, 0x44, 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, /* bytes 4688 - 4704 */ - 0x04, 0x44, 0x00, 0x44, 0x00, 0x40, 0x00, 0x44, 0x00, 0x44, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, /* bytes 4704 - 4720 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, /* bytes 4720 - 4736 */ - 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, /* bytes 4736 - 4752 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 4752 - 4768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4768 - 4784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4784 - 4800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4800 - 4816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4816 - 4832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4832 - 4848 */ - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, /* bytes 4848 - 4864 */ - 0x10, 0x04, 0x10, 0x10, 0x10, 0x04, 0x10, 0x40, 0x10, 0x40, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, /* bytes 4864 - 4880 */ - 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x04, 0x44, 0x40, /* bytes 4880 - 4896 */ - 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 4896 - 4912 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 4912 - 4928 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x44, /* bytes 4928 - 4944 */ - 0x10, 0x04, 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, /* bytes 4944 - 4960 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 4960 - 4976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4976 - 4992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4992 - 5008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5008 - 5024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 5024 - 5040 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x14, 0x00, 0x04, /* bytes 5040 - 5056 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 5056 - 5072 */ - 0x00, 0x50, 0x04, 0x14, 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 5072 - 5088 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, 0x40, 0x44, /* bytes 5088 - 5104 */ - 0x04, 0x54, 0x40, 0x44, 0x00, 0x14, 0x40, 0x44, 0x00, 0x50, 0x40, 0x44, 0x00, 0x50, 0x40, 0x44, /* bytes 5104 - 5120 */ - 0x00, 0x50, 0x40, 0x40, 0x00, 0x10, 0x40, 0x40, 0x00, 0x50, 0x40, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 5120 - 5136 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 5136 - 5152 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 5152 - 5168 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 5168 - 5184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5184 - 5200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5200 - 5216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5216 - 5232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5232 - 5248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5248 - 5264 */ - 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x04, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, /* bytes 5264 - 5280 */ - 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 5280 - 5296 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x04, 0x44, 0x44, 0x44, 0x40, /* bytes 5296 - 5312 */ - 0x40, 0x44, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 5312 - 5328 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x14, 0x00, /* bytes 5328 - 5344 */ - 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, /* bytes 5344 - 5360 */ - 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, /* bytes 5360 - 5376 */ - 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5376 - 5392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5392 - 5408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5408 - 5424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5424 - 5440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5440 - 5456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 5456 - 5472 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, /* bytes 5472 - 5488 */ - 0x04, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 5488 - 5504 */ - 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, 0x00, 0x54, 0x40, 0x44, 0x40, 0x50, /* bytes 5504 - 5520 */ - 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x10, 0x40, 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x44, /* bytes 5520 - 5536 */ - 0x40, 0x44, 0x00, 0x44, 0x40, 0x40, 0x00, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x44, 0x00, 0x50, /* bytes 5536 - 5552 */ - 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, /* bytes 5552 - 5568 */ - 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, /* bytes 5568 - 5584 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 5584 - 5600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5600 - 5616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5616 - 5632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5632 - 5648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5648 - 5664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5664 - 5680 */ - 0x40, 0x04, 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, 0x10, 0x04, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, /* bytes 5680 - 5696 */ - 0x10, 0x04, 0x00, 0x00, 0x10, 0x40, 0x10, 0x04, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5696 - 5712 */ - 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x44, 0x44, 0x40, 0x44, 0x40, /* bytes 5712 - 5728 */ - 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, /* bytes 5728 - 5744 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 5744 - 5760 */ - 0x44, 0x10, 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, /* bytes 5760 - 5776 */ - 0x10, 0x40, 0x10, 0x40, 0x10, 0x00, 0x10, 0x04, 0x10, 0x04, 0x10, 0x40, 0x10, 0x00, 0x10, 0x40, /* bytes 5776 - 5792 */ - 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 5792 - 5808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5808 - 5824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5824 - 5840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5840 - 5856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5856 - 5872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x44, 0x00, 0x50, 0x00, 0x10, /* bytes 5872 - 5888 */ - 0x00, 0x50, 0x40, 0x50, 0x04, 0x54, 0x00, 0x50, 0x40, 0x54, 0x00, 0x14, 0x00, 0x54, 0x00, 0x10, /* bytes 5888 - 5904 */ - 0x00, 0x54, 0x04, 0x50, 0x04, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x40, /* bytes 5904 - 5920 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x40, 0x44, 0x00, 0x54, 0x40, 0x44, /* bytes 5920 - 5936 */ - 0x00, 0x50, 0x40, 0x44, 0x40, 0x54, 0x40, 0x44, 0x40, 0x54, 0x40, 0x44, 0x04, 0x50, 0x40, 0x44, /* bytes 5936 - 5952 */ - 0x00, 0x50, 0x40, 0x44, 0x04, 0x40, 0x40, 0x40, 0x00, 0x44, 0x04, 0x40, 0x00, 0x50, 0x04, 0x40, /* bytes 5952 - 5968 */ - 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x04, 0x14, 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x44, 0x14, /* bytes 5968 - 5984 */ - 0x00, 0x14, 0x00, 0x14, 0x00, 0x54, 0x00, 0x10, 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 5984 - 6000 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 6000 - 6016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6016 - 6032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6032 - 6048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6048 - 6064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6064 - 6080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 6080 - 6096 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x14, 0x40, /* bytes 6096 - 6112 */ - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x50, 0x44, 0x44, 0x44, 0x54, 0x44, 0x50, 0x44, 0x10, 0x00, /* bytes 6112 - 6128 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x44, 0x50, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 6128 - 6144 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 6144 - 6160 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x40, 0x40, /* bytes 6160 - 6176 */ - 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x50, 0x00, 0x10, 0x10, 0x14, 0x10, 0x10, 0x10, 0x14, 0x04, /* bytes 6176 - 6192 */ - 0x10, 0x10, 0x14, 0x04, 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x40, 0x10, 0x10, 0x10, 0x00, /* bytes 6192 - 6208 */ - 0x10, 0x10, 0x14, 0x04, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 6208 - 6224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6224 - 6240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6240 - 6256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6256 - 6272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6272 - 6288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x50, 0x04, 0x40, 0x00, 0x10, 0x40, 0x50, 0x00, 0x54, /* bytes 6288 - 6304 */ - 0x40, 0x44, 0x00, 0x44, 0x40, 0x44, 0x00, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 6304 - 6320 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 6320 - 6336 */ - 0x40, 0x50, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x54, 0x40, 0x44, 0x40, 0x44, 0x00, 0x50, /* bytes 6336 - 6352 */ - 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x44, 0x00, 0x44, 0x40, 0x44, 0x00, 0x44, /* bytes 6352 - 6368 */ - 0x00, 0x40, 0x00, 0x40, 0x40, 0x44, 0x04, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x44, /* bytes 6368 - 6384 */ - 0x04, 0x40, 0x04, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x14, 0x04, 0x14, 0x04, 0x14, /* bytes 6384 - 6400 */ - 0x00, 0x14, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, 0x00, 0x14, 0x00, 0x14, /* bytes 6400 - 6416 */ - 0x04, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 6416 - 6432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6432 - 6448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6448 - 6464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6464 - 6480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6480 - 6496 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 6496 - 6512 */ - 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x54, 0x44, 0x44, 0x44, /* bytes 6512 - 6528 */ - 0x44, 0x44, 0x44, 0x44, 0x50, 0x44, 0x44, 0x44, 0x44, 0x44, 0x50, 0x44, 0x54, 0x44, 0x50, 0x44, /* bytes 6528 - 6544 */ - 0x54, 0xc0, 0x50, 0x40, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x44, 0x44, 0x54, 0x50, 0x54, 0x54, /* bytes 6544 - 6560 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0xc0, 0x50, 0x44, /* bytes 6560 - 6576 */ - 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, /* bytes 6576 - 6592 */ - 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x10, 0x10, /* bytes 6592 - 6608 */ - 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, /* bytes 6608 - 6624 */ - 0x14, 0x10, 0x14, 0x10, 0x10, 0x44, 0x10, 0x10, 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 6624 - 6640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6640 - 6656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6656 - 6672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6672 - 6688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6688 - 6704 */ - 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x40, 0x40, 0x00, 0x50, 0x40, 0x44, 0x00, 0x54, 0x40, 0x44, /* bytes 6704 - 6720 */ - 0x00, 0x14, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 6720 - 6736 */ - 0x40, 0x54, 0x44, 0x50, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 6736 - 6752 */ - 0x44, 0x54, 0x44, 0x54, 0x00, 0x40, 0x00, 0x10, 0x40, 0x54, 0x50, 0x54, 0x44, 0x54, 0x50, 0x54, /* bytes 6752 - 6768 */ - 0x40, 0x54, 0x50, 0x54, 0x44, 0x54, 0x50, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, /* bytes 6768 - 6784 */ - 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x14, 0x00, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 6784 - 6800 */ - 0x00, 0x44, 0x00, 0x44, 0x00, 0x54, 0x40, 0x50, 0x00, 0x54, 0x40, 0x44, 0x00, 0x50, 0x40, 0x10, /* bytes 6800 - 6816 */ - 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x04, 0x14, 0x00, 0x54, 0x44, 0x14, 0x00, 0x54, 0x44, 0x14, /* bytes 6816 - 6832 */ - 0x00, 0x54, 0x00, 0x14, 0x00, 0x54, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 6832 - 6848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6848 - 6864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6864 - 6880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6880 - 6896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6896 - 6912 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 6912 - 6928 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0xc0, 0x44, 0x54, 0x44, 0x44, 0x44, 0x50, 0x40, /* bytes 6928 - 6944 */ - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, /* bytes 6944 - 6960 */ - 0x44, 0x54, 0x54, 0x44, 0x54, 0x44, 0x40, 0x40, 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, /* bytes 6960 - 6976 */ - 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x44, 0x50, 0x44, 0x54, 0x40, /* bytes 6976 - 6992 */ - 0x50, 0x44, 0x50, 0x44, 0x44, 0x44, 0x50, 0x44, 0xc0, 0x44, 0x50, 0x40, 0x40, 0x04, 0x40, 0x00, /* bytes 6992 - 7008 */ - 0x40, 0x40, 0x54, 0x44, 0x44, 0x44, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, 0x44, 0x40, /* bytes 7008 - 7024 */ - 0x40, 0x40, 0x44, 0x04, 0x10, 0x10, 0x14, 0x40, 0x10, 0x10, 0x14, 0x10, 0x10, 0x10, 0x14, 0x10, /* bytes 7024 - 7040 */ - 0x10, 0x10, 0x14, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 7040 - 7056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7056 - 7072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7072 - 7088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7088 - 7104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 7104 - 7120 */ - 0x40, 0x40, 0x00, 0x44, 0x40, 0x40, 0x00, 0x44, 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x50, /* bytes 7120 - 7136 */ - 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, /* bytes 7136 - 7152 */ - 0x44, 0x50, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 7152 - 7168 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 7168 - 7184 */ - 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x50, /* bytes 7184 - 7200 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 7200 - 7216 */ - 0x40, 0x44, 0x40, 0x44, 0x40, 0x50, 0x40, 0x50, 0x00, 0x50, 0x00, 0x50, 0x04, 0x44, 0x00, 0x10, /* bytes 7216 - 7232 */ - 0x00, 0x54, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x40, 0x14, 0x04, 0x14, 0x04, 0x50, 0x00, 0x50, /* bytes 7232 - 7248 */ - 0x00, 0x14, 0x00, 0x14, 0x04, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 7248 - 7264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7264 - 7280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7280 - 7296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7296 - 7312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, /* bytes 7312 - 7328 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x50, 0xc0, /* bytes 7328 - 7344 */ - 0x50, 0xc0, 0x50, 0x50, 0x54, 0x44, 0x44, 0x44, 0xc0, 0x44, 0x44, 0x44, 0xc0, 0x44, 0x44, 0x44, /* bytes 7344 - 7360 */ - 0xc0, 0x44, 0xc0, 0x44, 0x50, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xcc, 0x54, 0x44, /* bytes 7360 - 7376 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x50, 0x44, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, /* bytes 7376 - 7392 */ - 0x54, 0x44, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, /* bytes 7392 - 7408 */ - 0x50, 0x44, 0x44, 0x44, 0x50, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, /* bytes 7408 - 7424 */ - 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 7424 - 7440 */ - 0x40, 0x40, 0x40, 0x04, 0x40, 0x00, 0x04, 0x10, 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, /* bytes 7440 - 7456 */ - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x04, 0x10, 0x00, 0x00, 0x00, /* bytes 7456 - 7472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7472 - 7488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7488 - 7504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7504 - 7520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x40, 0x40, /* bytes 7520 - 7536 */ - 0x00, 0x44, 0x40, 0x40, 0x00, 0x44, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x50, /* bytes 7536 - 7552 */ - 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x50, 0x40, 0x54, 0x44, 0x50, 0x44, 0x54, 0x44, 0x54, /* bytes 7552 - 7568 */ - 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 7568 - 7584 */ - 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 7584 - 7600 */ - 0x40, 0x54, 0x44, 0x54, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x44, 0x50, 0x40, 0x50, 0x44, 0x50, /* bytes 7600 - 7616 */ - 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x44, 0x40, 0x54, 0x40, 0x44, 0x40, 0x54, 0x40, 0x44, /* bytes 7616 - 7632 */ - 0x00, 0x50, 0x40, 0x44, 0x40, 0x44, 0x40, 0x50, 0x40, 0x50, 0x40, 0x44, 0x00, 0x50, 0x04, 0x44, /* bytes 7632 - 7648 */ - 0x00, 0x44, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x04, 0x14, /* bytes 7648 - 7664 */ - 0x00, 0x50, 0x00, 0x14, 0x00, 0x54, 0x00, 0x14, 0x00, 0x54, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 7664 - 7680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7680 - 7696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7696 - 7712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7712 - 7728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, /* bytes 7728 - 7744 */ - 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x50, 0x40, 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x50, 0x44, /* bytes 7744 - 7760 */ - 0x50, 0x44, 0x54, 0x44, 0x44, 0x44, 0x54, 0x44, 0x44, 0x44, 0xc0, 0x44, 0x44, 0x44, 0x54, 0x44, /* bytes 7760 - 7776 */ - 0xc0, 0x44, 0x54, 0x44, 0xc0, 0xcc, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, /* bytes 7776 - 7792 */ - 0x54, 0xcc, 0x54, 0x44, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x40, 0x50, 0x40, 0x50, 0x50, 0x50, 0x44, /* bytes 7792 - 7808 */ - 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x50, 0x40, 0x10, 0x40, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, /* bytes 7808 - 7824 */ - 0x44, 0x44, 0x54, 0x40, 0x44, 0x44, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, /* bytes 7824 - 7840 */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x00, /* bytes 7840 - 7856 */ - 0x40, 0x40, 0x10, 0x44, 0x10, 0x10, 0x14, 0x04, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, /* bytes 7856 - 7872 */ - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x14, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 7872 - 7888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7888 - 7904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7904 - 7920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7920 - 7936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x54, /* bytes 7936 - 7952 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 7952 - 7968 */ - 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x50, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 7968 - 7984 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, /* bytes 7984 - 8000 */ - 0x44, 0x54, 0x44, 0xa8, 0x44, 0xa8, 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, /* bytes 8000 - 8016 */ - 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 8016 - 8032 */ - 0x44, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x44, 0x40, 0x44, 0x04, 0x44, 0x40, 0x44, 0x04, 0x44, /* bytes 8032 - 8048 */ - 0x40, 0x44, 0x00, 0x44, 0x40, 0x50, 0x04, 0x50, 0x40, 0x44, 0x00, 0x44, 0x40, 0x40, 0x00, 0x14, /* bytes 8048 - 8064 */ - 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, /* bytes 8064 - 8080 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 8080 - 8096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8096 - 8112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8112 - 8128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8128 - 8144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x44, 0x40, 0xc0, 0x44, /* bytes 8144 - 8160 */ - 0xc0, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, 0xc0, 0x44, 0x50, 0x44, 0x50, 0x44, /* bytes 8160 - 8176 */ - 0x50, 0x44, 0x50, 0x44, 0xc0, 0x44, 0x44, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0x54, 0x44, 0xc0, 0x44, /* bytes 8176 - 8192 */ - 0x54, 0x44, 0x54, 0xcc, 0x54, 0x44, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 8192 - 8208 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, /* bytes 8208 - 8224 */ - 0x50, 0x40, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 8224 - 8240 */ - 0x54, 0xc0, 0x54, 0xcc, 0x54, 0x44, 0x54, 0x44, 0xc0, 0x44, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 8240 - 8256 */ - 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x04, 0x10, 0x10, /* bytes 8256 - 8272 */ - 0x10, 0x04, 0x10, 0x04, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, /* bytes 8272 - 8288 */ - 0x10, 0x04, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x44, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, /* bytes 8288 - 8304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8304 - 8320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8320 - 8336 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 8336 - 8352 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x44, /* bytes 8352 - 8368 */ - 0x40, 0x54, 0x40, 0x44, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, /* bytes 8368 - 8384 */ - 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, /* bytes 8384 - 8400 */ - 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 8400 - 8416 */ - 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 8416 - 8432 */ - 0x40, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 8432 - 8448 */ - 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x40, 0x10, /* bytes 8448 - 8464 */ - 0x00, 0x50, 0x40, 0x44, 0x04, 0x54, 0x40, 0x40, 0x00, 0x44, 0x40, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 8464 - 8480 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 8480 - 8496 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 8496 - 8512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8512 - 8528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8528 - 8544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8544 - 8560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x44, 0x10, 0x40, 0x44, 0x44, 0x44, 0x40, /* bytes 8560 - 8576 */ - 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, 0x44, 0x40, 0x44, 0x44, 0x50, 0x44, 0xc0, 0x44, 0x54, 0x44, /* bytes 8576 - 8592 */ - 0x44, 0xc0, 0x54, 0x40, 0x44, 0x44, 0x54, 0x44, 0xc0, 0x44, 0x50, 0x44, 0x44, 0x44, 0x54, 0x44, /* bytes 8592 - 8608 */ - 0xcc, 0xc0, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 8608 - 8624 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, 0x44, 0x44, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, /* bytes 8624 - 8640 */ - 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xcc, /* bytes 8640 - 8656 */ - 0x54, 0xcc, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x44, /* bytes 8656 - 8672 */ - 0xc0, 0x44, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 8672 - 8688 */ - 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 8688 - 8704 */ - 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 8704 - 8720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8720 - 8736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8736 - 8752 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 8752 - 8768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x14, 0x40, 0x50, 0x40, 0x44, 0x40, 0x44, /* bytes 8768 - 8784 */ - 0x40, 0x44, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 8784 - 8800 */ - 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 8800 - 8816 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 8816 - 8832 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0xa8, /* bytes 8832 - 8848 */ - 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 8848 - 8864 */ - 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 8864 - 8880 */ - 0xc0, 0x54, 0x44, 0x54, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, /* bytes 8880 - 8896 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, /* bytes 8896 - 8912 */ - 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, /* bytes 8912 - 8928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8928 - 8944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8944 - 8960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8960 - 8976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, /* bytes 8976 - 8992 */ - 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, 0xc0, 0x44, /* bytes 8992 - 9008 */ - 0x54, 0x44, 0xc0, 0x40, 0xc0, 0x44, 0x44, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0xc0, /* bytes 9008 - 9024 */ - 0xcc, 0x44, 0xcc, 0xc0, 0x54, 0xcc, 0x54, 0x44, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, /* bytes 9024 - 9040 */ - 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x44, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, /* bytes 9040 - 9056 */ - 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0xc0, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, /* bytes 9056 - 9072 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, /* bytes 9072 - 9088 */ - 0x54, 0xc0, 0x54, 0xcc, 0x54, 0x44, 0x10, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x10, 0x04, /* bytes 9088 - 9104 */ - 0x10, 0x40, 0x10, 0x10, 0x10, 0x40, 0x10, 0x10, 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, 0x10, 0x04, /* bytes 9104 - 9120 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 9120 - 9136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9136 - 9152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9152 - 9168 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 9168 - 9184 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, /* bytes 9184 - 9200 */ - 0x00, 0x54, 0x40, 0x44, 0x04, 0x54, 0x40, 0x44, 0x00, 0x54, 0x40, 0x44, 0x40, 0x54, 0x44, 0x54, /* bytes 9200 - 9216 */ - 0x44, 0x54, 0x40, 0x44, 0x40, 0x54, 0x44, 0xc0, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, /* bytes 9216 - 9232 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 9232 - 9248 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x44, 0x40, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 9248 - 9264 */ - 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0x44, 0xc0, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 9264 - 9280 */ - 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 9280 - 9296 */ - 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 9296 - 9312 */ - 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 9312 - 9328 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 9328 - 9344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9344 - 9360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9360 - 9376 */ - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 9376 - 9392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9392 - 9408 */ - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, 0x44, /* bytes 9408 - 9424 */ - 0xc0, 0x44, 0x44, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, /* bytes 9424 - 9440 */ - 0xc0, 0xc0, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x44, 0xc0, 0xc0, 0x54, 0x44, 0xc0, 0xc0, 0x54, 0x44, /* bytes 9440 - 9456 */ - 0x54, 0xcc, 0x54, 0x44, 0xcc, 0xc0, 0xc0, 0x40, 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x44, /* bytes 9456 - 9472 */ - 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xc0, 0x44, 0xc0, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xcc, /* bytes 9472 - 9488 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, /* bytes 9488 - 9504 */ - 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x44, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, /* bytes 9504 - 9520 */ - 0x10, 0x10, 0x10, 0x44, 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 9520 - 9536 */ - 0x10, 0x40, 0x10, 0x00, 0x04, 0x04, 0x10, 0x00, 0x44, 0x04, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 9536 - 9552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9552 - 9568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9568 - 9584 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 9584 - 9600 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9600 - 9616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x44, 0x54, 0x44, 0x54, /* bytes 9616 - 9632 */ - 0x40, 0x44, 0x40, 0xc0, 0x40, 0xc0, 0x40, 0xc0, 0x40, 0x44, 0x40, 0xc0, 0x40, 0x44, 0x40, 0x44, /* bytes 9632 - 9648 */ - 0x40, 0x44, 0x40, 0x54, 0x44, 0xc0, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 9648 - 9664 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0xc0, 0x40, 0x54, 0xcc, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 9664 - 9680 */ - 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x50, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, /* bytes 9680 - 9696 */ - 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 9696 - 9712 */ - 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x00, 0x10, 0x00, 0x14, /* bytes 9712 - 9728 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 9728 - 9744 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 9744 - 9760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9760 - 9776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9776 - 9792 */ - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 9792 - 9808 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9808 - 9824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x54, 0x44, 0xc0, 0xc0, /* bytes 9824 - 9840 */ - 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, /* bytes 9840 - 9856 */ - 0xc0, 0x44, 0x44, 0x44, 0x44, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0x44, 0x44, /* bytes 9856 - 9872 */ - 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, /* bytes 9872 - 9888 */ - 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0xa8, 0xcc, 0xc0, 0xc0, 0x54, 0xc0, 0x54, 0xcc, /* bytes 9888 - 9904 */ - 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 9904 - 9920 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x04, 0x10, 0x04, /* bytes 9920 - 9936 */ - 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x40, 0x10, 0x00, 0x10, 0x44, 0x10, 0x00, 0x10, 0x40, /* bytes 9936 - 9952 */ - 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9952 - 9968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9968 - 9984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9984 - 10000 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10000 - 10016 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 10016 - 10032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 10032 - 10048 */ - 0x00, 0x40, 0x40, 0x40, 0x40, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 10048 - 10064 */ - 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 10064 - 10080 */ - 0x44, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 10080 - 10096 */ - 0x44, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x50, 0x44, 0xa8, 0xc0, 0x54, /* bytes 10096 - 10112 */ - 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0x54, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 10112 - 10128 */ - 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x04, 0x10, /* bytes 10128 - 10144 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, /* bytes 10144 - 10160 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 10160 - 10176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10176 - 10192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10192 - 10208 */ - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 10208 - 10224 */ - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10224 - 10240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x44, 0x44, 0xc0, 0x40, /* bytes 10240 - 10256 */ - 0x44, 0x44, 0x50, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x54, /* bytes 10256 - 10272 */ - 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0xc0, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 10272 - 10288 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, /* bytes 10288 - 10304 */ - 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xc0, 0xc0, 0x54, 0xc0, /* bytes 10304 - 10320 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 10320 - 10336 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, /* bytes 10336 - 10352 */ - 0x40, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 10352 - 10368 */ - 0x10, 0x40, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10368 - 10384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10384 - 10400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10400 - 10416 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10416 - 10432 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10432 - 10448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x44, 0x40, 0x54, /* bytes 10448 - 10464 */ - 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x40, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 10464 - 10480 */ - 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 10480 - 10496 */ - 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, /* bytes 10496 - 10512 */ - 0x44, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0x54, /* bytes 10512 - 10528 */ - 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 10528 - 10544 */ - 0x44, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, /* bytes 10544 - 10560 */ - 0x44, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10560 - 10576 */ - 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 10576 - 10592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10592 - 10608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10608 - 10624 */ - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 10624 - 10640 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10640 - 10656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xc0, 0xc0, 0x44, 0x54, 0xcc, /* bytes 10656 - 10672 */ - 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x50, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 10672 - 10688 */ - 0xa8, 0x50, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 10688 - 10704 */ - 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, /* bytes 10704 - 10720 */ - 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0xc0, /* bytes 10720 - 10736 */ - 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, /* bytes 10736 - 10752 */ - 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, /* bytes 10752 - 10768 */ - 0x54, 0xc0, 0x14, 0x00, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 10768 - 10784 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10784 - 10800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10800 - 10816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10816 - 10832 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10832 - 10848 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 10848 - 10864 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 10864 - 10880 */ - 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 10880 - 10896 */ - 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 10896 - 10912 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 10912 - 10928 */ - 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0xf0, /* bytes 10928 - 10944 */ - 0xc0, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 10944 - 10960 */ - 0x44, 0xa8, 0xc0, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 10960 - 10976 */ - 0x44, 0x54, 0xc0, 0x54, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10976 - 10992 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10992 - 11008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11008 - 11024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11024 - 11040 */ - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 11040 - 11056 */ - 0x00, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x04, 0x04, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, /* bytes 11056 - 11072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xc0, 0x54, 0xcc, 0x54, 0x44, 0x54, 0xcc, 0x54, 0x44, /* bytes 11072 - 11088 */ - 0xc0, 0xc0, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, /* bytes 11088 - 11104 */ - 0x54, 0x54, 0xa8, 0xc0, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 11104 - 11120 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 11120 - 11136 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xc0, /* bytes 11136 - 11152 */ - 0x50, 0x50, 0x54, 0xc0, 0xcc, 0xc0, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, /* bytes 11152 - 11168 */ - 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, /* bytes 11168 - 11184 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, 0x10, 0x00, 0x40, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 11184 - 11200 */ - 0x44, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11200 - 11216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11216 - 11232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11232 - 11248 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 11248 - 11264 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 11264 - 11280 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 11280 - 11296 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 11296 - 11312 */ - 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 11312 - 11328 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0x54, /* bytes 11328 - 11344 */ - 0x44, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 11344 - 11360 */ - 0xc0, 0xf0, 0xc0, 0xa8, 0xcc, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, /* bytes 11360 - 11376 */ - 0xc0, 0x54, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, /* bytes 11376 - 11392 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, /* bytes 11392 - 11408 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 11408 - 11424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11424 - 11440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11440 - 11456 */ - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x00, /* bytes 11456 - 11472 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, /* bytes 11472 - 11488 */ - 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, /* bytes 11488 - 11504 */ - 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x54, /* bytes 11504 - 11520 */ - 0x54, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 11520 - 11536 */ - 0xa8, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 11536 - 11552 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 11552 - 11568 */ - 0xa8, 0xc0, 0x50, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, /* bytes 11568 - 11584 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, /* bytes 11584 - 11600 */ - 0x54, 0xc0, 0x54, 0xcc, 0xcc, 0xc0, 0x54, 0x44, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, /* bytes 11600 - 11616 */ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11616 - 11632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11632 - 11648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11648 - 11664 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 11664 - 11680 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 11680 - 11696 */ - 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 11696 - 11712 */ - 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, /* bytes 11712 - 11728 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 11728 - 11744 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 11744 - 11760 */ - 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 11760 - 11776 */ - 0xcc, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 11776 - 11792 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 11792 - 11808 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 11808 - 11824 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11824 - 11840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11840 - 11856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11856 - 11872 */ - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 11872 - 11888 */ - 0x00, 0x00, 0x10, 0x00, 0x04, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x04, 0x10, 0x00, /* bytes 11888 - 11904 */ - 0x00, 0x04, 0x54, 0xc0, 0xc0, 0xc0, 0x54, 0x44, 0xc0, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, /* bytes 11904 - 11920 */ - 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0x54, /* bytes 11920 - 11936 */ - 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 11936 - 11952 */ - 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 11952 - 11968 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 11968 - 11984 */ - 0x54, 0xa8, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, /* bytes 11984 - 12000 */ - 0x54, 0xcc, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0x44, /* bytes 12000 - 12016 */ - 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x44, 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 12016 - 12032 */ - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12032 - 12048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12048 - 12064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12064 - 12080 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 12080 - 12096 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 12096 - 12112 */ - 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, /* bytes 12112 - 12128 */ - 0x44, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 12128 - 12144 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 12144 - 12160 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, /* bytes 12160 - 12176 */ - 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 12176 - 12192 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0xa8, /* bytes 12192 - 12208 */ - 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 12208 - 12224 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 12224 - 12240 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 12240 - 12256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12256 - 12272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12272 - 12288 */ - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 12288 - 12304 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 12304 - 12320 */ - 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0xcc, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, /* bytes 12320 - 12336 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x54, /* bytes 12336 - 12352 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 12352 - 12368 */ - 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 12368 - 12384 */ - 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 12384 - 12400 */ - 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xc0, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xcc, 0xcc, /* bytes 12400 - 12416 */ - 0x54, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0x44, 0xc0, 0xc0, 0xcc, 0x44, 0xcc, 0xcc, /* bytes 12416 - 12432 */ - 0xcc, 0xc0, 0xcc, 0xc0, 0x54, 0xc0, 0xcc, 0xc0, 0xc0, 0x44, 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, /* bytes 12432 - 12448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12448 - 12464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12464 - 12480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12480 - 12496 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 12496 - 12512 */ - 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, /* bytes 12512 - 12528 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 12528 - 12544 */ - 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 12544 - 12560 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 12560 - 12576 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xc0, 0x54, /* bytes 12576 - 12592 */ - 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 12592 - 12608 */ - 0x44, 0xa8, 0xcc, 0xa8, 0x54, 0xf0, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, /* bytes 12608 - 12624 */ - 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0x44, 0xcc, /* bytes 12624 - 12640 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, /* bytes 12640 - 12656 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12656 - 12672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12672 - 12688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12688 - 12704 */ - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 12704 - 12720 */ - 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x44, /* bytes 12720 - 12736 */ - 0xc0, 0xc0, 0x54, 0x44, 0xc0, 0x44, 0x54, 0x44, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 12736 - 12752 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, /* bytes 12752 - 12768 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 12768 - 12784 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 12784 - 12800 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 12800 - 12816 */ - 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 12816 - 12832 */ - 0xc0, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, /* bytes 12832 - 12848 */ - 0xc0, 0x44, 0xc0, 0x44, 0x44, 0xc0, 0xcc, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xcc, 0x40, 0x00, 0x00, /* bytes 12848 - 12864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12864 - 12880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12880 - 12896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12896 - 12912 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 12912 - 12928 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, /* bytes 12928 - 12944 */ - 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, /* bytes 12944 - 12960 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, /* bytes 12960 - 12976 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 12976 - 12992 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0x44, 0xa8, /* bytes 12992 - 13008 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13008 - 13024 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13024 - 13040 */ - 0xc0, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0x54, /* bytes 13040 - 13056 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0xc0, 0x40, 0xc0, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x00, 0x00, /* bytes 13056 - 13072 */ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13072 - 13088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13088 - 13104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13104 - 13120 */ - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13120 - 13136 */ - 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x44, 0x54, 0x44, /* bytes 13136 - 13152 */ - 0x54, 0x44, 0xc0, 0x44, 0xc0, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 13152 - 13168 */ - 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xcc, 0xcc, 0x54, 0x54, 0xa8, 0x54, /* bytes 13168 - 13184 */ - 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xcc, /* bytes 13184 - 13200 */ - 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 13200 - 13216 */ - 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 13216 - 13232 */ - 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 13232 - 13248 */ - 0xa8, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 13248 - 13264 */ - 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, 0xc0, 0x44, 0x44, 0x40, 0x44, 0x44, 0xc0, 0x44, 0x44, 0x00, /* bytes 13264 - 13280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13280 - 13296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13296 - 13312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13312 - 13328 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 13328 - 13344 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x40, 0x54, 0x44, 0x54, /* bytes 13344 - 13360 */ - 0x44, 0x54, 0x40, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 13360 - 13376 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, /* bytes 13376 - 13392 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 13392 - 13408 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 13408 - 13424 */ - 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 13424 - 13440 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 13440 - 13456 */ - 0xcc, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0x44, 0x54, /* bytes 13456 - 13472 */ - 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0x40, 0x44, 0x40, 0xc0, 0x40, 0xc0, /* bytes 13472 - 13488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13488 - 13504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13504 - 13520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13520 - 13536 */ - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13536 - 13552 */ - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x40, 0xcc, 0x44, 0x54, 0x44, /* bytes 13552 - 13568 */ - 0xc0, 0x44, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x54, /* bytes 13568 - 13584 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xcc, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 13584 - 13600 */ - 0x54, 0x54, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 13600 - 13616 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 13616 - 13632 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 13632 - 13648 */ - 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 13648 - 13664 */ - 0x54, 0x54, 0xa8, 0xc0, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 13664 - 13680 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, 0x44, 0x40, 0x44, 0x44, /* bytes 13680 - 13696 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13696 - 13712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13712 - 13728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13728 - 13744 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 13744 - 13760 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 13760 - 13776 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13776 - 13792 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, /* bytes 13792 - 13808 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13808 - 13824 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 13824 - 13840 */ - 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13840 - 13856 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13856 - 13872 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13872 - 13888 */ - 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0x40, 0x44, /* bytes 13888 - 13904 */ - 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13904 - 13920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13920 - 13936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13936 - 13952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13952 - 13968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, 0x44, 0xc0, 0x44, /* bytes 13968 - 13984 */ - 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 13984 - 14000 */ - 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 14000 - 14016 */ - 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 14016 - 14032 */ - 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 14032 - 14048 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 14048 - 14064 */ - 0x54, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0x54, /* bytes 14064 - 14080 */ - 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 14080 - 14096 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x40, /* bytes 14096 - 14112 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14112 - 14128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14128 - 14144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14144 - 14160 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 14160 - 14176 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 14176 - 14192 */ - 0x44, 0x54, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 14192 - 14208 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 14208 - 14224 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 14224 - 14240 */ - 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 14240 - 14256 */ - 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, /* bytes 14256 - 14272 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 14272 - 14288 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0x44, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 14288 - 14304 */ - 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 14304 - 14320 */ - 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14320 - 14336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14336 - 14352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14352 - 14368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14368 - 14384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xcc, 0x54, 0x44, 0xc0, 0x44, 0x54, 0xc0, /* bytes 14384 - 14400 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 14400 - 14416 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0x54, /* bytes 14416 - 14432 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 14432 - 14448 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xc0, /* bytes 14448 - 14464 */ - 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 14464 - 14480 */ - 0x54, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 14480 - 14496 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0x54, 0x44, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 14496 - 14512 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xc0, 0xc0, 0x44, /* bytes 14512 - 14528 */ - 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14528 - 14544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14544 - 14560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14560 - 14576 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14576 - 14592 */ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 14592 - 14608 */ - 0x44, 0x54, 0xcc, 0xa8, 0x44, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 14608 - 14624 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 14624 - 14640 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, /* bytes 14640 - 14656 */ - 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 14656 - 14672 */ - 0xc0, 0xa8, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, /* bytes 14672 - 14688 */ - 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 14688 - 14704 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0x54, /* bytes 14704 - 14720 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0xcc, 0x44, 0x54, /* bytes 14720 - 14736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14736 - 14752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14752 - 14768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14768 - 14784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14784 - 14800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x54, 0x44, 0xc0, 0x44, 0x54, 0xcc, 0x54, 0x54, /* bytes 14800 - 14816 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 14816 - 14832 */ - 0x54, 0xcc, 0xa8, 0x54, 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 14832 - 14848 */ - 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 14848 - 14864 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, /* bytes 14864 - 14880 */ - 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 14880 - 14896 */ - 0x54, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xcc, 0x54, 0x54, /* bytes 14896 - 14912 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 14912 - 14928 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0x44, 0xcc, 0xc0, 0xcc, 0x44, 0x44, 0x00, /* bytes 14928 - 14944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14944 - 14960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14960 - 14976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14976 - 14992 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14992 - 15008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 15008 - 15024 */ - 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15024 - 15040 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15040 - 15056 */ - 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 15056 - 15072 */ - 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, /* bytes 15072 - 15088 */ - 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 15088 - 15104 */ - 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 15104 - 15120 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0xa8, /* bytes 15120 - 15136 */ - 0x44, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x00, 0x10, 0x00, 0x00, /* bytes 15136 - 15152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15152 - 15168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15168 - 15184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15184 - 15200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15200 - 15216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0x44, 0x44, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, /* bytes 15216 - 15232 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 15232 - 15248 */ - 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0x54, /* bytes 15248 - 15264 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 15264 - 15280 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, 0xc0, 0xc0, 0x54, 0x44, /* bytes 15280 - 15296 */ - 0xcc, 0xc0, 0xcc, 0x44, 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, /* bytes 15296 - 15312 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, /* bytes 15312 - 15328 */ - 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, /* bytes 15328 - 15344 */ - 0x54, 0x54, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15344 - 15360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15360 - 15376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15376 - 15392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15392 - 15408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15408 - 15424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x54, 0x40, 0x54, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0x54, /* bytes 15424 - 15440 */ - 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15440 - 15456 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15456 - 15472 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0xa8, /* bytes 15472 - 15488 */ - 0xcc, 0xa8, 0xc0, 0xa8, 0x44, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0x54, /* bytes 15488 - 15504 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, /* bytes 15504 - 15520 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, /* bytes 15520 - 15536 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 15536 - 15552 */ - 0x44, 0x54, 0x44, 0xa8, 0x44, 0xa8, 0x44, 0x54, 0xc0, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15552 - 15568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15568 - 15584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15584 - 15600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15600 - 15616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15616 - 15632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x54, 0x44, 0xc0, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, /* bytes 15632 - 15648 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 15648 - 15664 */ - 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 15664 - 15680 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xcc, 0x44, /* bytes 15680 - 15696 */ - 0xcc, 0xcc, 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xc0, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0x44, 0xc0, 0x44, /* bytes 15696 - 15712 */ - 0xc0, 0x44, 0xc0, 0x44, 0xcc, 0x44, 0xc0, 0xc0, 0xc0, 0x44, 0xc0, 0xc0, 0x54, 0x54, 0xa8, 0xa8, /* bytes 15712 - 15728 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 15728 - 15744 */ - 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, /* bytes 15744 - 15760 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x04, 0x00, 0x00, 0x00, 0x00, /* bytes 15760 - 15776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15776 - 15792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15792 - 15808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15808 - 15824 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15824 - 15840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 15840 - 15856 */ - 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15856 - 15872 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15872 - 15888 */ - 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0x54, /* bytes 15888 - 15904 */ - 0x44, 0x54, 0x44, 0xc0, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0xc0, /* bytes 15904 - 15920 */ - 0x44, 0x54, 0x40, 0xc0, 0x44, 0xc0, 0x40, 0xc0, 0x40, 0x54, 0xcc, 0xa8, 0xcc, 0xfc, 0xa8, 0xa8, /* bytes 15920 - 15936 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 15936 - 15952 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 15952 - 15968 */ - 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0x00, 0x00, 0x00, 0x00, /* bytes 15968 - 15984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15984 - 16000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16000 - 16016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16016 - 16032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16032 - 16048 */ - 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x44, /* bytes 16048 - 16064 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 16064 - 16080 */ - 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 16080 - 16096 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 16096 - 16112 */ - 0xa8, 0x54, 0x54, 0xc0, 0xcc, 0xcc, 0xcc, 0x44, 0x44, 0x44, 0x44, 0x40, 0x44, 0x44, 0xc0, 0x44, /* bytes 16112 - 16128 */ - 0x44, 0x44, 0x44, 0x40, 0x40, 0x44, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 16128 - 16144 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 16144 - 16160 */ - 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, /* bytes 16160 - 16176 */ - 0x54, 0x54, 0x54, 0x44, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x40, 0x00, 0x00, 0x00, /* bytes 16176 - 16192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16192 - 16208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16208 - 16224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16224 - 16240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16240 - 16256 */ - 0x00, 0x00, 0x00, 0x10, 0x44, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 16256 - 16272 */ - 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16272 - 16288 */ - 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16288 - 16304 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, /* bytes 16304 - 16320 */ - 0xcc, 0xa8, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0xf0, 0x54, 0xa8, 0xc0, 0x54, 0x40, 0x44, 0x40, 0x44, /* bytes 16320 - 16336 */ - 0x40, 0x44, 0x40, 0x50, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16336 - 16352 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16352 - 16368 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 16368 - 16384 */ - 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0x54, 0x44, 0x00, 0x00, 0x00, /* bytes 16384 - 16400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16400 - 16416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16416 - 16432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16432 - 16448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16448 - 16464 */ - 0x00, 0x00, 0x00, 0x40, 0xc0, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 16464 - 16480 */ - 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 16480 - 16496 */ - 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 16496 - 16512 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 16512 - 16528 */ - 0xa8, 0xcc, 0xa8, 0xa8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xa8, 0xf0, 0xf0, 0xf0, 0xa8, 0x54, 0x40, /* bytes 16528 - 16544 */ - 0x40, 0x40, 0xf0, 0xf0, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 16544 - 16560 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 16560 - 16576 */ - 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, /* bytes 16576 - 16592 */ - 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0x04, 0x00, 0x00, /* bytes 16592 - 16608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16608 - 16624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16624 - 16640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16640 - 16656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16656 - 16672 */ - 0x00, 0x00, 0x00, 0x50, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, 0xcc, 0x54, /* bytes 16672 - 16688 */ - 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 16688 - 16704 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16704 - 16720 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xa8, 0xa8, /* bytes 16720 - 16736 */ - 0xcc, 0xa8, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, 0xc0, 0xf0, 0xa8, 0xf0, /* bytes 16736 - 16752 */ - 0xc0, 0xf0, 0xa8, 0xf0, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16752 - 16768 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16768 - 16784 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 16784 - 16800 */ - 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0xa8, 0x44, 0x54, 0x00, 0x00, /* bytes 16800 - 16816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16816 - 16832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16832 - 16848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16848 - 16864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16864 - 16880 */ - 0x00, 0x00, 0x40, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 16880 - 16896 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, /* bytes 16896 - 16912 */ - 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 16912 - 16928 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 16928 - 16944 */ - 0xa8, 0xa8, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, 0x50, 0xf0, 0xf0, 0xf0, 0xa8, 0xf0, 0xf0, 0xf0, 0xf0, /* bytes 16944 - 16960 */ - 0xf0, 0xf0, 0xf0, 0xa8, 0xf0, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 16960 - 16976 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xcc, /* bytes 16976 - 16992 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xc0, /* bytes 16992 - 17008 */ - 0xcc, 0xc0, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x40, 0x00, /* bytes 17008 - 17024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17024 - 17040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17040 - 17056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17056 - 17072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17072 - 17088 */ - 0x00, 0x00, 0x40, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xcc, 0xa8, 0xc0, 0xa8, /* bytes 17088 - 17104 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, /* bytes 17104 - 17120 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17120 - 17136 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, /* bytes 17136 - 17152 */ - 0xcc, 0xa8, 0x50, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, 0x54, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, 0xc0, 0xf0, /* bytes 17152 - 17168 */ - 0xa8, 0xf0, 0xc0, 0xf0, 0xa8, 0xf0, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17168 - 17184 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17184 - 17200 */ - 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0x54, 0x44, 0x54, /* bytes 17200 - 17216 */ - 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, 0x40, 0x00, /* bytes 17216 - 17232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17232 - 17248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17248 - 17264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17264 - 17280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17280 - 17296 */ - 0x00, 0x00, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 17296 - 17312 */ - 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0x44, 0x44, /* bytes 17312 - 17328 */ - 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 17328 - 17344 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 17344 - 17360 */ - 0xa8, 0x54, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xa8, 0xf0, 0xf0, 0xf0, 0xa8, /* bytes 17360 - 17376 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 17376 - 17392 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 17392 - 17408 */ - 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xc0, 0x54, 0xcc, /* bytes 17408 - 17424 */ - 0x54, 0xc0, 0xcc, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0x04, /* bytes 17424 - 17440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17440 - 17456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17456 - 17472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17472 - 17488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17488 - 17504 */ - 0x00, 0x54, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 17504 - 17520 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0x54, 0x00, 0x54, /* bytes 17520 - 17536 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 17536 - 17552 */ - 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, /* bytes 17552 - 17568 */ - 0xcc, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, 0xc0, 0xf0, 0x54, 0xa8, 0xcc, 0xf0, 0x54, 0xa8, /* bytes 17568 - 17584 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17584 - 17600 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17600 - 17616 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xc0, 0x54, /* bytes 17616 - 17632 */ - 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, /* bytes 17632 - 17648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17648 - 17664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17664 - 17680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17680 - 17696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17696 - 17712 */ - 0x44, 0x54, 0x54, 0x44, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 17712 - 17728 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x40, 0x00, 0x00, 0xcc, /* bytes 17728 - 17744 */ - 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 17744 - 17760 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 17760 - 17776 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 17776 - 17792 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 17792 - 17808 */ - 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 17808 - 17824 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xc0, /* bytes 17824 - 17840 */ - 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xc0, 0x54, 0xc0, 0xc0, 0xc0, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xc0, /* bytes 17840 - 17856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17856 - 17872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17872 - 17888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17888 - 17904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17904 - 17920 */ - 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17920 - 17936 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x40, 0x00, 0x00, 0x00, 0xa8, /* bytes 17936 - 17952 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17952 - 17968 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17968 - 17984 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17984 - 18000 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18000 - 18016 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18016 - 18032 */ - 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0x54, /* bytes 18032 - 18048 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, /* bytes 18048 - 18064 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 18064 - 18080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18080 - 18096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18096 - 18112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, /* bytes 18112 - 18128 */ - 0x54, 0xc0, 0x54, 0xcc, 0x54, 0x44, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 18128 - 18144 */ - 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x54, 0x00, 0x00, 0x00, 0x00, 0x04, 0xa8, /* bytes 18144 - 18160 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 18160 - 18176 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 18176 - 18192 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 18192 - 18208 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 18208 - 18224 */ - 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 18224 - 18240 */ - 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xcc, 0xc0, /* bytes 18240 - 18256 */ - 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xc0, 0xc0, 0x54, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0xcc, /* bytes 18256 - 18272 */ - 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18272 - 18288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18288 - 18304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18304 - 18320 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x54, /* bytes 18320 - 18336 */ - 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0xa8, /* bytes 18336 - 18352 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, 0xa8, /* bytes 18352 - 18368 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18368 - 18384 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18384 - 18400 */ - 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18400 - 18416 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18416 - 18432 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18432 - 18448 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0x44, 0x54, /* bytes 18448 - 18464 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 18464 - 18480 */ - 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18480 - 18496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18496 - 18512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18512 - 18528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, /* bytes 18528 - 18544 */ - 0xcc, 0xc0, 0x54, 0x44, 0xcc, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, /* bytes 18544 - 18560 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xcc, /* bytes 18560 - 18576 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 18576 - 18592 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 18592 - 18608 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 18608 - 18624 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 18624 - 18640 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xcc, /* bytes 18640 - 18656 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x44, /* bytes 18656 - 18672 */ - 0xc0, 0xc0, 0x54, 0x44, 0xc0, 0xc0, 0x54, 0x44, 0xc0, 0xc0, 0xc0, 0x44, 0x44, 0xc0, 0x50, 0x44, /* bytes 18672 - 18688 */ - 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18688 - 18704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18704 - 18720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18720 - 18736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, /* bytes 18736 - 18752 */ - 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, /* bytes 18752 - 18768 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xfc, /* bytes 18768 - 18784 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18784 - 18800 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18800 - 18816 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18816 - 18832 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18832 - 18848 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18848 - 18864 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 18864 - 18880 */ - 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 18880 - 18896 */ - 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 18896 - 18912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18912 - 18928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18928 - 18944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, /* bytes 18944 - 18960 */ - 0xc0, 0x44, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0x54, /* bytes 18960 - 18976 */ - 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa8, /* bytes 18976 - 18992 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 18992 - 19008 */ - 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, /* bytes 19008 - 19024 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 19024 - 19040 */ - 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 19040 - 19056 */ - 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 19056 - 19072 */ - 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 19072 - 19088 */ - 0x40, 0x44, 0xc0, 0x44, 0x44, 0x40, 0x44, 0x44, 0x44, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0x44, 0x44, /* bytes 19088 - 19104 */ - 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 19104 - 19120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19120 - 19136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19136 - 19152 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, /* bytes 19152 - 19168 */ - 0x40, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 19168 - 19184 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xa8, /* bytes 19184 - 19200 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19200 - 19216 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 19216 - 19232 */ - 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19232 - 19248 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 19248 - 19264 */ - 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19264 - 19280 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 19280 - 19296 */ - 0x00, 0x00, 0x00, 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x54, 0x40, 0xc0, 0x40, 0x54, 0x40, 0xc0, /* bytes 19296 - 19312 */ - 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 19312 - 19328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19328 - 19344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19344 - 19360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, /* bytes 19360 - 19376 */ - 0x44, 0xc0, 0x54, 0xc0, 0xcc, 0xc0, 0xcc, 0xc0, 0xc0, 0xc0, 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 19376 - 19392 */ - 0x54, 0xcc, 0xa8, 0xcc, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, /* bytes 19392 - 19408 */ - 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 19408 - 19424 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 19424 - 19440 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 19440 - 19456 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 19456 - 19472 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 19472 - 19488 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 19488 - 19504 */ - 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x40, 0x40, 0x44, 0x40, 0x44, 0x44, 0x44, 0x40, /* bytes 19504 - 19520 */ - 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 19520 - 19536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19536 - 19552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19552 - 19568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, /* bytes 19568 - 19584 */ - 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0x54, /* bytes 19584 - 19600 */ - 0xcc, 0xa8, 0xcc, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xa8, /* bytes 19600 - 19616 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19616 - 19632 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19632 - 19648 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19648 - 19664 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, /* bytes 19664 - 19680 */ - 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19680 - 19696 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, /* bytes 19696 - 19712 */ - 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x14, 0x04, 0x44, /* bytes 19712 - 19728 */ - 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 19728 - 19744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19744 - 19760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19760 - 19776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, /* bytes 19776 - 19792 */ - 0xc0, 0xc0, 0xcc, 0x44, 0xc0, 0x44, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 19792 - 19808 */ - 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa8, /* bytes 19808 - 19824 */ - 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 19824 - 19840 */ - 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 19840 - 19856 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 19856 - 19872 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0xcc, /* bytes 19872 - 19888 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 19888 - 19904 */ - 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 19904 - 19920 */ - 0x54, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, /* bytes 19920 - 19936 */ - 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 19936 - 19952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19952 - 19968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19968 - 19984 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x50, /* bytes 19984 - 20000 */ - 0x44, 0x54, 0x40, 0xc0, 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, /* bytes 20000 - 20016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xcc, 0xa8, /* bytes 20016 - 20032 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 20032 - 20048 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20048 - 20064 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20064 - 20080 */ - 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 20080 - 20096 */ - 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20096 - 20112 */ - 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 20112 - 20128 */ - 0x44, 0xa8, 0x44, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20128 - 20144 */ - 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 20144 - 20160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20160 - 20176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20176 - 20192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, /* bytes 20192 - 20208 */ - 0x44, 0x44, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x40, 0x00, /* bytes 20208 - 20224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xcc, /* bytes 20224 - 20240 */ - 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 20240 - 20256 */ - 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xc0, 0x54, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 20256 - 20272 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 20272 - 20288 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 20288 - 20304 */ - 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0x44, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 20304 - 20320 */ - 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 20320 - 20336 */ - 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20336 - 20352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 20352 - 20368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20368 - 20384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20384 - 20400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0xc0, /* bytes 20400 - 20416 */ - 0x44, 0x54, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x04, 0x00, 0x00, 0x00, /* bytes 20416 - 20432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xcc, 0xa8, /* bytes 20432 - 20448 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20448 - 20464 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20464 - 20480 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20480 - 20496 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20496 - 20512 */ - 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20512 - 20528 */ - 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, /* bytes 20528 - 20544 */ - 0x44, 0x54, 0xc0, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20544 - 20560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 20560 - 20576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20576 - 20592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20592 - 20608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, /* bytes 20608 - 20624 */ - 0x54, 0xc0, 0x54, 0xcc, 0xcc, 0xc0, 0xcc, 0xcc, 0xcc, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20624 - 20640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, /* bytes 20640 - 20656 */ - 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 20656 - 20672 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 20672 - 20688 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 20688 - 20704 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, /* bytes 20704 - 20720 */ - 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 20720 - 20736 */ - 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xc0, /* bytes 20736 - 20752 */ - 0x54, 0xcc, 0xcc, 0xcc, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20752 - 20768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 20768 - 20784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20784 - 20800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20800 - 20816 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x44, 0x54, /* bytes 20816 - 20832 */ - 0x44, 0x54, 0xc0, 0xcc, 0x44, 0xa8, 0x44, 0x50, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 20832 - 20848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xcc, 0xa8, /* bytes 20848 - 20864 */ - 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 20864 - 20880 */ - 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20880 - 20896 */ - 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20896 - 20912 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 20912 - 20928 */ - 0xcc, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x40, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20928 - 20944 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, /* bytes 20944 - 20960 */ - 0x44, 0x54, 0x44, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20960 - 20976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 20976 - 20992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20992 - 21008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21008 - 21024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0xc0, 0x44, /* bytes 21024 - 21040 */ - 0xc0, 0xc0, 0xc0, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21040 - 21056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xa8, 0xcc, /* bytes 21056 - 21072 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 21072 - 21088 */ - 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 21088 - 21104 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 21104 - 21120 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 21120 - 21136 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xc0, 0xc0, 0x54, 0xc0, 0x44, 0xcc, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 21136 - 21152 */ - 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 21152 - 21168 */ - 0xcc, 0xc0, 0x54, 0x44, 0xcc, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21168 - 21184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21184 - 21200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21200 - 21216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21216 - 21232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x50, 0x40, 0x54, /* bytes 21232 - 21248 */ - 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 21248 - 21264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xcc, 0xa8, /* bytes 21264 - 21280 */ - 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 21280 - 21296 */ - 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21296 - 21312 */ - 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21312 - 21328 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21328 - 21344 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0xc0, 0xc0, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21344 - 21360 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0x54, 0xcc, 0x54, /* bytes 21360 - 21376 */ - 0xcc, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21376 - 21392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 21392 - 21408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21408 - 21424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21424 - 21440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21440 - 21456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21456 - 21472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xa8, 0xcc, /* bytes 21472 - 21488 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xc0, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 21488 - 21504 */ - 0xcc, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 21504 - 21520 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 21520 - 21536 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 21536 - 21552 */ - 0xa8, 0x54, 0x54, 0xcc, 0xa8, 0xcc, 0xcc, 0xc0, 0x54, 0x44, 0x54, 0xa8, 0xa8, 0xcc, 0x54, 0x54, /* bytes 21552 - 21568 */ - 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x40, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 21568 - 21584 */ - 0x54, 0xcc, 0x54, 0xc0, 0xc0, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21584 - 21600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21600 - 21616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21616 - 21632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21632 - 21648 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 21648 - 21664 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 21664 - 21680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, 0x54, /* bytes 21680 - 21696 */ - 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0xc0, /* bytes 21696 - 21712 */ - 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21712 - 21728 */ - 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21728 - 21744 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21744 - 21760 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0x40, 0x44, 0x40, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21760 - 21776 */ - 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0x00, 0x00, 0x04, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 21776 - 21792 */ - 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 21792 - 21808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21808 - 21824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21824 - 21840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21840 - 21856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21856 - 21872 */ - 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21872 - 21888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa8, 0xcc, /* bytes 21888 - 21904 */ - 0xcc, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xc0, 0xc0, 0xcc, /* bytes 21904 - 21920 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 21920 - 21936 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 21936 - 21952 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 21952 - 21968 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xcc, 0xc0, 0x54, 0xcc, 0xa8, 0x54, 0x54, 0xcc, /* bytes 21968 - 21984 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x04, 0x00, 0x00, 0x00, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xc0, /* bytes 21984 - 22000 */ - 0xcc, 0xcc, 0x54, 0x44, 0xc0, 0xc0, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22000 - 22016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22016 - 22032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22032 - 22048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22048 - 22064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 22064 - 22080 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 22080 - 22096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, 0x54, /* bytes 22096 - 22112 */ - 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xc0, 0xc0, 0xfc, /* bytes 22112 - 22128 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22128 - 22144 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22144 - 22160 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22160 - 22176 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22176 - 22192 */ - 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x54, 0xc0, 0xa8, /* bytes 22192 - 22208 */ - 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22208 - 22224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22224 - 22240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22240 - 22256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22256 - 22272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22272 - 22288 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22288 - 22304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x54, 0xc0, /* bytes 22304 - 22320 */ - 0x54, 0xcc, 0x54, 0xc0, 0xc0, 0x44, 0xc0, 0xc0, 0xc0, 0xc0, 0xcc, 0x44, 0xcc, 0x54, 0xa8, 0xa8, /* bytes 22320 - 22336 */ - 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, /* bytes 22336 - 22352 */ - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 22352 - 22368 */ - 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 22368 - 22384 */ - 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 22384 - 22400 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, /* bytes 22400 - 22416 */ - 0xc0, 0xc0, 0xcc, 0xc0, 0xc0, 0x44, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22416 - 22432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22432 - 22448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22448 - 22464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22464 - 22480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 22480 - 22496 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22496 - 22512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, 0x54, /* bytes 22512 - 22528 */ - 0x44, 0xa8, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0xc0, 0x44, 0x54, 0x44, 0x54, 0xcc, 0xfc, 0xcc, 0xa8, /* bytes 22528 - 22544 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22544 - 22560 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22560 - 22576 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x00, 0x54, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 22576 - 22592 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, /* bytes 22592 - 22608 */ - 0x44, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22608 - 22624 */ - 0x00, 0x54, 0x40, 0xcc, 0x44, 0xcc, 0x44, 0x44, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22624 - 22640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22640 - 22656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22656 - 22672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22672 - 22688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22688 - 22704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22704 - 22720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0xc0, /* bytes 22720 - 22736 */ - 0xcc, 0xc0, 0x54, 0xcc, 0x54, 0x40, 0x44, 0x44, 0x44, 0x44, 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 22736 - 22752 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 22752 - 22768 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 22768 - 22784 */ - 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x00, 0x00, 0x00, 0x40, 0xcc, 0x54, 0xcc, /* bytes 22784 - 22800 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 22800 - 22816 */ - 0xcc, 0xcc, 0x54, 0xcc, 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22816 - 22832 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22832 - 22848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22848 - 22864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22864 - 22880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22880 - 22896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 22896 - 22912 */ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22912 - 22928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 22928 - 22944 */ - 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0x50, 0x00, 0x40, 0x40, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22944 - 22960 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22960 - 22976 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22976 - 22992 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0xa8, /* bytes 22992 - 23008 */ - 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 23008 - 23024 */ - 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23024 - 23040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23040 - 23056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23056 - 23072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23072 - 23088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23088 - 23104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23104 - 23120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23120 - 23136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xcc, 0x44, /* bytes 23136 - 23152 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xc0, 0xc0, 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xcc, /* bytes 23152 - 23168 */ - 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0x54, /* bytes 23168 - 23184 */ - 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 23184 - 23200 */ - 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23200 - 23216 */ - 0xc0, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, /* bytes 23216 - 23232 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23232 - 23248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23248 - 23264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23264 - 23280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23280 - 23296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23296 - 23312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, /* bytes 23312 - 23328 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23328 - 23344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0xc0, /* bytes 23344 - 23360 */ - 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 23360 - 23376 */ - 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 23376 - 23392 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 23392 - 23408 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23408 - 23424 */ - 0x00, 0x54, 0x40, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 23424 - 23440 */ - 0x44, 0xa8, 0x44, 0x54, 0x44, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 23440 - 23456 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23456 - 23472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23472 - 23488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23488 - 23504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23504 - 23520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23520 - 23536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23536 - 23552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0xc0, /* bytes 23552 - 23568 */ - 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 23568 - 23584 */ - 0x54, 0x00, 0x50, 0xc0, 0xcc, 0xcc, 0x54, 0x44, 0xc0, 0xc0, 0x54, 0xc0, 0xc0, 0xc0, 0x54, 0xcc, /* bytes 23584 - 23600 */ - 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 23600 - 23616 */ - 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23616 - 23632 */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xc0, /* bytes 23632 - 23648 */ - 0xc0, 0xc0, 0xcc, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23648 - 23664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23664 - 23680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23680 - 23696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23696 - 23712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23712 - 23728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23728 - 23744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23744 - 23760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x44, 0xa8, /* bytes 23760 - 23776 */ - 0xc0, 0x54, 0x44, 0xa8, 0x44, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 23776 - 23792 */ - 0x00, 0x00, 0x00, 0x50, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, /* bytes 23792 - 23808 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 23808 - 23824 */ - 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23824 - 23840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x50, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 23840 - 23856 */ - 0x44, 0x54, 0x44, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23856 - 23872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23872 - 23888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23888 - 23904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23904 - 23920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23920 - 23936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23936 - 23952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23952 - 23968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0xc0, /* bytes 23968 - 23984 */ - 0xcc, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xc0, 0x00, /* bytes 23984 - 24000 */ - 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0x54, 0xc0, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0xc0, /* bytes 24000 - 24016 */ - 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xcc, /* bytes 24016 - 24032 */ - 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24032 - 24048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0xc0, 0xc0, 0xcc, 0xc0, 0xc0, 0xc0, /* bytes 24048 - 24064 */ - 0xc0, 0x44, 0xcc, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24064 - 24080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24080 - 24096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24096 - 24112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24112 - 24128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24128 - 24144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24144 - 24160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24160 - 24176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0xcc, /* bytes 24176 - 24192 */ - 0xc0, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0x54, 0x00, 0x00, /* bytes 24192 - 24208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x44, 0xc0, 0x40, 0x54, 0x44, 0xc0, 0x44, 0x54, 0x44, 0x44, /* bytes 24208 - 24224 */ - 0x40, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 24224 - 24240 */ - 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24240 - 24256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0xc0, 0x44, 0x54, 0x44, 0xc0, /* bytes 24256 - 24272 */ - 0x40, 0x54, 0x44, 0x44, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24272 - 24288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24288 - 24304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24304 - 24320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24320 - 24336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24336 - 24352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24352 - 24368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24368 - 24384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0xc0, /* bytes 24384 - 24400 */ - 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x44, 0x00, 0x00, 0x00, /* bytes 24400 - 24416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xc0, 0x40, /* bytes 24416 - 24432 */ - 0x00, 0x44, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 24432 - 24448 */ - 0x54, 0x54, 0x54, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24448 - 24464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0xc0, 0x44, /* bytes 24464 - 24480 */ - 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24480 - 24496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24496 - 24512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24512 - 24528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24528 - 24544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24544 - 24560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24560 - 24576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24576 - 24592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xc0, 0xa8, /* bytes 24592 - 24608 */ - 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x00, 0x00, 0x00, 0x00, /* bytes 24608 - 24624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x44, 0x40, 0xc0, 0x40, 0xc0, 0x00, 0x00, /* bytes 24624 - 24640 */ - 0x00, 0x00, 0x40, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, /* bytes 24640 - 24656 */ - 0xc0, 0x54, 0xc0, 0xa8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24656 - 24672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x40, 0xc0, /* bytes 24672 - 24688 */ - 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24688 - 24704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24704 - 24720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24720 - 24736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24736 - 24752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24752 - 24768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24768 - 24784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24784 - 24800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x54, 0xcc, /* bytes 24800 - 24816 */ - 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0xcc, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24816 - 24832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x44, 0x40, 0x40, 0x00, 0x00, 0x00, /* bytes 24832 - 24848 */ - 0x00, 0x00, 0x00, 0xc0, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, /* bytes 24848 - 24864 */ - 0x54, 0xcc, 0x54, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24864 - 24880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, /* bytes 24880 - 24896 */ - 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24896 - 24912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24912 - 24928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24928 - 24944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24944 - 24960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24960 - 24976 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 24976 - 24992 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24992 - 25008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, 0x54, /* bytes 25008 - 25024 */ - 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25024 - 25040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 25040 - 25056 */ - 0x00, 0x00, 0x00, 0x00, 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 25056 - 25072 */ - 0x44, 0xa8, 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25072 - 25088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, /* bytes 25088 - 25104 */ - 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 25104 - 25120 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 25120 - 25136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25136 - 25152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25152 - 25168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25168 - 25184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25184 - 25200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25200 - 25216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x54, 0xc0, /* bytes 25216 - 25232 */ - 0xc0, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25232 - 25248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25248 - 25264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, /* bytes 25264 - 25280 */ - 0xcc, 0xcc, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25280 - 25296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25296 - 25312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25312 - 25328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25328 - 25344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25344 - 25360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25360 - 25376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25376 - 25392 */ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 25392 - 25408 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25408 - 25424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x54, /* bytes 25424 - 25440 */ - 0x44, 0x54, 0x44, 0x54, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25440 - 25456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25456 - 25472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, /* bytes 25472 - 25488 */ - 0xc0, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25488 - 25504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25504 - 25520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25520 - 25536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25536 - 25552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25552 - 25568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25568 - 25584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25584 - 25600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25600 - 25616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25616 - 25632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, /* bytes 25632 - 25648 */ - 0xc0, 0xc0, 0xc0, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25648 - 25664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25664 - 25680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0xcc, 0xc0, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 25680 - 25696 */ - 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25696 - 25712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25712 - 25728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25728 - 25744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25744 - 25760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25760 - 25776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25776 - 25792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25792 - 25808 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, /* bytes 25808 - 25824 */ - 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25824 - 25840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, /* bytes 25840 - 25856 */ - 0x40, 0xcc, 0x40, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25856 - 25872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25872 - 25888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x44, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 25888 - 25904 */ - 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25904 - 25920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 25920 - 25936 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 25936 - 25952 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 25952 - 25968 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25968 - 25984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25984 - 26000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26000 - 26016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 26016 - 26032 */ - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26032 - 26048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, /* bytes 26048 - 26064 */ - 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26064 - 26080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26080 - 26096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0xcc, 0xc0, 0xcc, 0xcc, 0xcc, 0xc0, /* bytes 26096 - 26112 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26112 - 26128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26128 - 26144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26144 - 26160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26160 - 26176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26176 - 26192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26192 - 26208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26208 - 26224 */ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 26224 - 26240 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26240 - 26256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, /* bytes 26256 - 26272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26272 - 26288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26288 - 26304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 26304 - 26320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26320 - 26336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 26336 - 26352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26352 - 26368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26368 - 26384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26384 - 26400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26400 - 26416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26416 - 26432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 26432 - 26448 */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26448 - 26464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26464 - 26480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26480 - 26496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26496 - 26512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0xc0, 0x44, 0xc0, 0x00, /* bytes 26512 - 26528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26528 - 26544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26544 - 26560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26560 - 26576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26576 - 26592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26592 - 26608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26608 - 26624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26624 - 26640 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 26640 - 26656 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26656 - 26672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26672 - 26688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26688 - 26704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26704 - 26720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x54, 0x00, 0x00, /* bytes 26720 - 26736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 26736 - 26752 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 26752 - 26768 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 26768 - 26784 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 26784 - 26800 */ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26800 - 26816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26816 - 26832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26832 - 26848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 26848 - 26864 */ - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26864 - 26880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26880 - 26896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26896 - 26912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26912 - 26928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00, /* bytes 26928 - 26944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26944 - 26960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26960 - 26976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26976 - 26992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26992 - 27008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27008 - 27024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27024 - 27040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27040 - 27056 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 27056 - 27072 */ - 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27072 - 27088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27088 - 27104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27104 - 27120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27120 - 27136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27136 - 27152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27152 - 27168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27168 - 27184 */ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27184 - 27200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27200 - 27216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27216 - 27232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27232 - 27248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27248 - 27264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27264 - 27280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27280 - 27296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27296 - 27312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27312 - 27328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27328 - 27344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27344 - 27360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27360 - 27376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27376 - 27392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27392 - 27408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27408 - 27424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27424 - 27440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27440 - 27456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27456 - 27472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27472 - 27488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27488 - 27504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27504 - 27520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27520 - 27536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27536 - 27552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27552 - 27568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27568 - 27584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27584 - 27600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27600 - 27616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27616 - 27632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27632 - 27648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27648 - 27664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27664 - 27680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27680 - 27696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27696 - 27712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27712 - 27728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27728 - 27744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27744 - 27760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27760 - 27776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27776 - 27792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27792 - 27808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27808 - 27824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27824 - 27840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27840 - 27856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27856 - 27872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27872 - 27888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27888 - 27904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27904 - 27920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27920 - 27936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27936 - 27952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27952 - 27968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27968 - 27984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27984 - 28000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28000 - 28016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28016 - 28032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28032 - 28048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28048 - 28064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28064 - 28080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28080 - 28096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28096 - 28112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28112 - 28128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28128 - 28144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28144 - 28160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28160 - 28176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28176 - 28192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28192 - 28208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28208 - 28224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28224 - 28240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28240 - 28256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28256 - 28272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28272 - 28288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28288 - 28304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28304 - 28320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28320 - 28336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28336 - 28352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28352 - 28368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28368 - 28384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28384 - 28400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28400 - 28416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28416 - 28432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28432 - 28448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28448 - 28464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28464 - 28480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28480 - 28496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28496 - 28512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28512 - 28528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28528 - 28544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28544 - 28560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28560 - 28576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28576 - 28592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28592 - 28608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28608 - 28624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28624 - 28640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28640 - 28656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28656 - 28672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28672 - 28688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28688 - 28704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28704 - 28720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28720 - 28736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28736 - 28752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28752 - 28768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28768 - 28784 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28784 - 28800 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28800 - 28816 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28816 - 28832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28832 - 28848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28848 - 28864 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28864 - 28880 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28880 - 28896 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28896 - 28912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28912 - 28928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28928 - 28944 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28944 - 28960 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28960 - 28976 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28976 - 28992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28992 - 29008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29008 - 29024 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29024 - 29040 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29040 - 29056 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29056 - 29072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29072 - 29088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29088 - 29104 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29104 - 29120 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29120 - 29136 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29136 - 29152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29152 - 29168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29168 - 29184 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29184 - 29200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29200 - 29216 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29216 - 29232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29232 - 29248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29248 - 29264 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29264 - 29280 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29280 - 29296 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29296 - 29312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29312 - 29328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29328 - 29344 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29344 - 29360 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29360 - 29376 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29376 - 29392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29392 - 29408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29408 - 29424 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29424 - 29440 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29440 - 29456 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29456 - 29472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29472 - 29488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29488 - 29504 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29504 - 29520 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29520 - 29536 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29536 - 29552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29552 - 29568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29568 - 29584 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29584 - 29600 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29600 - 29616 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29616 - 29632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29632 - 29648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29648 - 29664 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29664 - 29680 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29680 - 29696 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29696 - 29712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29712 - 29728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29728 - 29744 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29744 - 29760 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29760 - 29776 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29776 - 29792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29792 - 29808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29808 - 29824 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29824 - 29840 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29840 - 29856 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29856 - 29872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29872 - 29888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29888 - 29904 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29904 - 29920 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29920 - 29936 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29936 - 29952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29952 - 29968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29968 - 29984 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29984 - 30000 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30000 - 30016 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30016 - 30032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30032 - 30048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30048 - 30064 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30064 - 30080 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30080 - 30096 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30096 - 30112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30112 - 30128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30128 - 30144 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30144 - 30160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30160 - 30176 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30176 - 30192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30192 - 30208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30208 - 30224 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30224 - 30240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30240 - 30256 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30256 - 30272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30272 - 30288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30288 - 30304 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30304 - 30320 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30320 - 30336 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30336 - 30352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30352 - 30368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30368 - 30384 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30384 - 30400 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30400 - 30416 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30416 - 30432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30432 - 30448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30448 - 30464 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30464 - 30480 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30480 - 30496 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30496 - 30512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30512 - 30528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30528 - 30544 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30544 - 30560 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30560 - 30576 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30576 - 30592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30592 - 30608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30608 - 30624 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30624 - 30640 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30640 - 30656 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30656 - 30672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30672 - 30688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30688 - 30704 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30704 - 30720 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30720 - 30736 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30736 - 30752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30752 - 30768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 48 - 64 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 64 - 80 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 80 - 96 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 96 - 112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 112 - 128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 128 - 144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 224 - 240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 240 - 256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 256 - 272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 272 - 288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 288 - 304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 304 - 320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 320 - 336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 336 - 352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 352 - 368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 368 - 384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 432 - 448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 448 - 464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 464 - 480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 480 - 496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 496 - 512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 512 - 528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 528 - 544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 544 - 560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 560 - 576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 576 - 592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 608 - 624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 640 - 656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 656 - 672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 672 - 688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 688 - 704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 704 - 720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 720 - 736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 736 - 752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 752 - 768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 768 - 784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 784 - 800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 848 - 864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 864 - 880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 880 - 896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 896 - 912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 912 - 928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 928 - 944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 944 - 960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 960 - 976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 976 - 992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 992 - 1008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1008 - 1024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1056 - 1072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1072 - 1088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1088 - 1104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1104 - 1120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1120 - 1136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1136 - 1152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1152 - 1168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1168 - 1184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1184 - 1200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1200 - 1216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1248 - 1264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1264 - 1280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1280 - 1296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1296 - 1312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1312 - 1328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1328 - 1344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1344 - 1360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1360 - 1376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1376 - 1392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1392 - 1408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1408 - 1424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1472 - 1488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1488 - 1504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1504 - 1520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1520 - 1536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1536 - 1552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1552 - 1568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1568 - 1584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1584 - 1600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1600 - 1616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1616 - 1632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1648 - 1664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1680 - 1696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1696 - 1712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1712 - 1728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1728 - 1744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1744 - 1760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1760 - 1776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1776 - 1792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1792 - 1808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1808 - 1824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1824 - 1840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1888 - 1904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1904 - 1920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1920 - 1936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1936 - 1952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1952 - 1968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1968 - 1984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1984 - 2000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2000 - 2016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2016 - 2032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2032 - 2048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2048 - 2064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2096 - 2112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2112 - 2128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2128 - 2144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2144 - 2160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2160 - 2176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2176 - 2192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2192 - 2208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2208 - 2224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2224 - 2240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2240 - 2256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2288 - 2304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2304 - 2320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2320 - 2336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2336 - 2352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2352 - 2368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2368 - 2384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2384 - 2400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2400 - 2416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2416 - 2432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2432 - 2448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2448 - 2464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2512 - 2528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2528 - 2544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2544 - 2560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2560 - 2576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2576 - 2592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2592 - 2608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2608 - 2624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2624 - 2640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2640 - 2656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2656 - 2672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2688 - 2704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2720 - 2736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2736 - 2752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2752 - 2768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2768 - 2784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2784 - 2800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2800 - 2816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2816 - 2832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2832 - 2848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2848 - 2864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2864 - 2880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2928 - 2944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2944 - 2960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2960 - 2976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2976 - 2992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2992 - 3008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3008 - 3024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3024 - 3040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3040 - 3056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3056 - 3072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3072 - 3088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3088 - 3104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3136 - 3152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3152 - 3168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3168 - 3184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3184 - 3200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3200 - 3216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3216 - 3232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3232 - 3248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3248 - 3264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3264 - 3280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3280 - 3296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3328 - 3344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 3344 - 3360 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 3360 - 3376 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 3376 - 3392 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, /* bytes 3392 - 3408 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 3408 - 3424 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, /* bytes 3424 - 3440 */ + 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x40, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x04, 0x10, /* bytes 3440 - 3456 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 3456 - 3472 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 3472 - 3488 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 3488 - 3504 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 3504 - 3520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3520 - 3536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3536 - 3552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3552 - 3568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x04, 0x10, 0x00, 0x04, 0x04, 0x10, 0x00, /* bytes 3568 - 3584 */ + 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3584 - 3600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 3600 - 3616 */ + 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 3616 - 3632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, /* bytes 3632 - 3648 */ + 0x10, 0x10, 0x10, 0x40, 0x10, 0x10, 0x10, 0x04, + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, /* bytes 3648 - 3664 */ + 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 3664 - 3680 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x04, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 3680 - 3696 */ + 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x04, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, /* bytes 3696 - 3712 */ + 0x04, 0x04, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3712 - 3728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3728 - 3744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3744 - 3760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, /* bytes 3760 - 3776 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 3776 - 3792 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 3792 - 3808 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 3808 - 3824 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 3824 - 3840 */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 3840 - 3856 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x50, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 3856 - 3872 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, /* bytes 3872 - 3888 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 3888 - 3904 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 3904 - 3920 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 3920 - 3936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3936 - 3952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3952 - 3968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3968 - 3984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3984 - 4000 */ + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 4000 - 4016 */ + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4016 - 4032 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 4032 - 4048 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 4048 - 4064 */ + 0x10, 0x00, 0x10, 0x40, 0x10, 0x04, 0x10, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 4064 - 4080 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x10, 0x44, + 0x10, 0x00, 0x10, 0x40, 0x10, 0x04, 0x10, 0x00, /* bytes 4080 - 4096 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x44, /* bytes 4096 - 4112 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, /* bytes 4112 - 4128 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 4128 - 4144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4144 - 4160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4160 - 4176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4176 - 4192 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 4192 - 4208 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 4208 - 4224 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 4224 - 4240 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 4240 - 4256 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 4256 - 4272 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, 0x40, 0x44, + 0x40, 0x54, 0x40, 0x44, 0x00, 0x50, 0x00, 0x40, /* bytes 4272 - 4288 */ + 0x00, 0x50, 0x04, 0x40, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 4288 - 4304 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 4304 - 4320 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 4320 - 4336 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 4336 - 4352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4352 - 4368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4368 - 4384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4384 - 4400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4400 - 4416 */ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 4416 - 4432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 4432 - 4448 */ + 0x10, 0x04, 0x10, 0x00, 0x10, 0x10, 0x14, 0x04, + 0x10, 0x04, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, /* bytes 4448 - 4464 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 4464 - 4480 */ + 0x00, 0x40, 0x14, 0x40, 0x40, 0x40, 0x44, 0x40, + 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, /* bytes 4480 - 4496 */ + 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x14, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 4496 - 4512 */ + 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 4512 - 4528 */ + 0x10, 0x10, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, + 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, /* bytes 4528 - 4544 */ + 0x10, 0x04, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, + 0x04, 0x04, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 4544 - 4560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4560 - 4576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4576 - 4592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4592 - 4608 */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, /* bytes 4608 - 4624 */ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 4624 - 4640 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, /* bytes 4640 - 4656 */ + 0x00, 0x10, 0x00, 0x54, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x14, 0x00, 0x40, 0x00, 0x40, 0x00, 0x10, /* bytes 4656 - 4672 */ + 0x00, 0x40, 0x00, 0x44, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, /* bytes 4672 - 4688 */ + 0x40, 0x50, 0x04, 0x10, 0x04, 0x44, 0x00, 0x50, + 0x00, 0x44, 0x00, 0x50, 0x00, 0x44, 0x00, 0x50, /* bytes 4688 - 4704 */ + 0x04, 0x44, 0x00, 0x44, 0x00, 0x40, 0x00, 0x44, + 0x00, 0x44, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, /* bytes 4704 - 4720 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, /* bytes 4720 - 4736 */ + 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, /* bytes 4736 - 4752 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 4752 - 4768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4768 - 4784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4784 - 4800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4800 - 4816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4816 - 4832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4832 - 4848 */ + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, /* bytes 4848 - 4864 */ + 0x10, 0x04, 0x10, 0x10, 0x10, 0x04, 0x10, 0x40, + 0x10, 0x40, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, /* bytes 4864 - 4880 */ + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x10, 0x04, 0x44, 0x40, /* bytes 4880 - 4896 */ + 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 4896 - 4912 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 4912 - 4928 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x44, /* bytes 4928 - 4944 */ + 0x10, 0x04, 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, /* bytes 4944 - 4960 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 4960 - 4976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4976 - 4992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 4992 - 5008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5008 - 5024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 5024 - 5040 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x04, 0x00, 0x14, 0x00, 0x04, /* bytes 5040 - 5056 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 5056 - 5072 */ + 0x00, 0x50, 0x04, 0x14, 0x00, 0x50, 0x00, 0x14, + 0x00, 0x50, 0x00, 0x40, 0x00, 0x10, 0x00, 0x40, /* bytes 5072 - 5088 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x54, 0x40, 0x44, /* bytes 5088 - 5104 */ + 0x04, 0x54, 0x40, 0x44, 0x00, 0x14, 0x40, 0x44, + 0x00, 0x50, 0x40, 0x44, 0x00, 0x50, 0x40, 0x44, /* bytes 5104 - 5120 */ + 0x00, 0x50, 0x40, 0x40, 0x00, 0x10, 0x40, 0x40, + 0x00, 0x50, 0x40, 0x40, 0x00, 0x50, 0x00, 0x10, /* bytes 5120 - 5136 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 5136 - 5152 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 5152 - 5168 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 5168 - 5184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5184 - 5200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5200 - 5216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5216 - 5232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5232 - 5248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5248 - 5264 */ + 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, + 0x04, 0x04, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, /* bytes 5264 - 5280 */ + 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, + 0x10, 0x10, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 5280 - 5296 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x10, 0x04, 0x44, 0x44, 0x44, 0x40, /* bytes 5296 - 5312 */ + 0x40, 0x44, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 5312 - 5328 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x14, 0x00, /* bytes 5328 - 5344 */ + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, /* bytes 5344 - 5360 */ + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, + 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, /* bytes 5360 - 5376 */ + 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5376 - 5392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5392 - 5408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5408 - 5424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5424 - 5440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5440 - 5456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 5456 - 5472 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, /* bytes 5472 - 5488 */ + 0x04, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 5488 - 5504 */ + 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x10, 0x00, 0x54, 0x40, 0x44, 0x40, 0x50, /* bytes 5504 - 5520 */ + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x10, + 0x40, 0x44, 0x40, 0x50, 0x40, 0x44, 0x40, 0x44, /* bytes 5520 - 5536 */ + 0x40, 0x44, 0x00, 0x44, 0x40, 0x40, 0x00, 0x44, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x44, 0x00, 0x50, /* bytes 5536 - 5552 */ + 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, /* bytes 5552 - 5568 */ + 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, /* bytes 5568 - 5584 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 5584 - 5600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5600 - 5616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5616 - 5632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5632 - 5648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5648 - 5664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5664 - 5680 */ + 0x40, 0x04, 0x40, 0x04, 0x40, 0x00, 0x40, 0x00, + 0x10, 0x04, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, /* bytes 5680 - 5696 */ + 0x10, 0x04, 0x00, 0x00, 0x10, 0x40, 0x10, 0x04, + 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5696 - 5712 */ + 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x40, 0x44, 0x44, 0x40, 0x44, 0x40, /* bytes 5712 - 5728 */ + 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, + 0x44, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, /* bytes 5728 - 5744 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 5744 - 5760 */ + 0x44, 0x10, 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, /* bytes 5760 - 5776 */ + 0x10, 0x40, 0x10, 0x40, 0x10, 0x00, 0x10, 0x04, + 0x10, 0x04, 0x10, 0x40, 0x10, 0x00, 0x10, 0x40, /* bytes 5776 - 5792 */ + 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 5792 - 5808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5808 - 5824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5824 - 5840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5840 - 5856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 5856 - 5872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x44, 0x00, 0x50, 0x00, 0x10, /* bytes 5872 - 5888 */ + 0x00, 0x50, 0x40, 0x50, 0x04, 0x54, 0x00, 0x50, + 0x40, 0x54, 0x00, 0x14, 0x00, 0x54, 0x00, 0x10, /* bytes 5888 - 5904 */ + 0x00, 0x54, 0x04, 0x50, 0x04, 0x54, 0x40, 0x50, + 0x00, 0x54, 0x40, 0x50, 0x00, 0x10, 0x00, 0x40, /* bytes 5904 - 5920 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x00, 0x40, + 0x00, 0x10, 0x40, 0x44, 0x00, 0x54, 0x40, 0x44, /* bytes 5920 - 5936 */ + 0x00, 0x50, 0x40, 0x44, 0x40, 0x54, 0x40, 0x44, + 0x40, 0x54, 0x40, 0x44, 0x04, 0x50, 0x40, 0x44, /* bytes 5936 - 5952 */ + 0x00, 0x50, 0x40, 0x44, 0x04, 0x40, 0x40, 0x40, + 0x00, 0x44, 0x04, 0x40, 0x00, 0x50, 0x04, 0x40, /* bytes 5952 - 5968 */ + 0x00, 0x54, 0x00, 0x10, 0x00, 0x54, 0x04, 0x14, + 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x44, 0x14, /* bytes 5968 - 5984 */ + 0x00, 0x14, 0x00, 0x14, 0x00, 0x54, 0x00, 0x10, + 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 5984 - 6000 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 6000 - 6016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6016 - 6032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6032 - 6048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6048 - 6064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6064 - 6080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 6080 - 6096 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, + 0x40, 0x40, 0x10, 0x40, 0x40, 0x40, 0x14, 0x40, /* bytes 6096 - 6112 */ + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x50, 0x44, + 0x44, 0x44, 0x54, 0x44, 0x50, 0x44, 0x10, 0x00, /* bytes 6112 - 6128 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x44, 0x50, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 6128 - 6144 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 6144 - 6160 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x40, 0x40, /* bytes 6160 - 6176 */ + 0x40, 0x40, 0x40, 0x00, 0x40, 0x04, 0x50, 0x00, + 0x10, 0x10, 0x14, 0x10, 0x10, 0x10, 0x14, 0x04, /* bytes 6176 - 6192 */ + 0x10, 0x10, 0x14, 0x04, 0x10, 0x10, 0x10, 0x04, + 0x10, 0x10, 0x10, 0x40, 0x10, 0x10, 0x10, 0x00, /* bytes 6192 - 6208 */ + 0x10, 0x10, 0x14, 0x04, 0x10, 0x10, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, /* bytes 6208 - 6224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6224 - 6240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6240 - 6256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6256 - 6272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6272 - 6288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x50, + 0x04, 0x40, 0x00, 0x10, 0x40, 0x50, 0x00, 0x54, /* bytes 6288 - 6304 */ + 0x40, 0x44, 0x00, 0x44, 0x40, 0x44, 0x00, 0x54, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 6304 - 6320 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x44, 0x54, + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 6320 - 6336 */ + 0x40, 0x50, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, + 0x00, 0x54, 0x40, 0x44, 0x40, 0x44, 0x00, 0x50, /* bytes 6336 - 6352 */ + 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, + 0x40, 0x44, 0x00, 0x44, 0x40, 0x44, 0x00, 0x44, /* bytes 6352 - 6368 */ + 0x00, 0x40, 0x00, 0x40, 0x40, 0x44, 0x04, 0x44, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x44, /* bytes 6368 - 6384 */ + 0x04, 0x40, 0x04, 0x44, 0x00, 0x40, 0x00, 0x40, + 0x00, 0x40, 0x00, 0x14, 0x04, 0x14, 0x04, 0x14, /* bytes 6384 - 6400 */ + 0x00, 0x14, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x54, 0x00, 0x14, 0x00, 0x14, /* bytes 6400 - 6416 */ + 0x04, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 6416 - 6432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6432 - 6448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6448 - 6464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6464 - 6480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6480 - 6496 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 6496 - 6512 */ + 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x44, 0x44, 0x54, 0x44, 0x44, 0x44, /* bytes 6512 - 6528 */ + 0x44, 0x44, 0x44, 0x44, 0x50, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x50, 0x44, 0x54, 0x44, 0x50, 0x44, /* bytes 6528 - 6544 */ + 0x54, 0xc0, 0x50, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x50, 0x40, 0x44, 0x44, 0x54, 0x50, 0x54, 0x54, /* bytes 6544 - 6560 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x50, 0x54, 0x50, + 0x54, 0x50, 0x54, 0x50, 0x54, 0xc0, 0x50, 0x44, /* bytes 6560 - 6576 */ + 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, /* bytes 6576 - 6592 */ + 0x40, 0x00, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x10, 0x10, /* bytes 6592 - 6608 */ + 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, /* bytes 6608 - 6624 */ + 0x14, 0x10, 0x14, 0x10, 0x10, 0x44, 0x10, 0x10, + 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 6624 - 6640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6640 - 6656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6656 - 6672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6672 - 6688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6688 - 6704 */ + 0x00, 0x10, 0x00, 0x40, 0x00, 0x50, 0x40, 0x40, + 0x00, 0x50, 0x40, 0x44, 0x00, 0x54, 0x40, 0x44, /* bytes 6704 - 6720 */ + 0x00, 0x14, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 6720 - 6736 */ + 0x40, 0x54, 0x44, 0x50, 0x40, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 6736 - 6752 */ + 0x44, 0x54, 0x44, 0x54, 0x00, 0x40, 0x00, 0x10, + 0x40, 0x54, 0x50, 0x54, 0x44, 0x54, 0x50, 0x54, /* bytes 6752 - 6768 */ + 0x40, 0x54, 0x50, 0x54, 0x44, 0x54, 0x50, 0x54, + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, /* bytes 6768 - 6784 */ + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x14, + 0x00, 0x44, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, /* bytes 6784 - 6800 */ + 0x00, 0x44, 0x00, 0x44, 0x00, 0x54, 0x40, 0x50, + 0x00, 0x54, 0x40, 0x44, 0x00, 0x50, 0x40, 0x10, /* bytes 6800 - 6816 */ + 0x00, 0x50, 0x00, 0x14, 0x00, 0x50, 0x04, 0x14, + 0x00, 0x54, 0x44, 0x14, 0x00, 0x54, 0x44, 0x14, /* bytes 6816 - 6832 */ + 0x00, 0x54, 0x00, 0x14, 0x00, 0x54, 0x00, 0x14, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 6832 - 6848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6848 - 6864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6864 - 6880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6880 - 6896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 6896 - 6912 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 6912 - 6928 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, + 0xc0, 0x44, 0x54, 0x44, 0x44, 0x44, 0x50, 0x40, /* bytes 6928 - 6944 */ + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x54, 0x44, + 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, /* bytes 6944 - 6960 */ + 0x44, 0x54, 0x54, 0x44, 0x54, 0x44, 0x40, 0x40, + 0x50, 0x50, 0x54, 0x50, 0x50, 0x50, 0x54, 0x50, /* bytes 6960 - 6976 */ + 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, 0x54, 0x50, + 0x50, 0x50, 0x54, 0x44, 0x50, 0x44, 0x54, 0x40, /* bytes 6976 - 6992 */ + 0x50, 0x44, 0x50, 0x44, 0x44, 0x44, 0x50, 0x44, + 0xc0, 0x44, 0x50, 0x40, 0x40, 0x04, 0x40, 0x00, /* bytes 6992 - 7008 */ + 0x40, 0x40, 0x54, 0x44, 0x44, 0x44, 0x44, 0x40, + 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, 0x44, 0x40, /* bytes 7008 - 7024 */ + 0x40, 0x40, 0x44, 0x04, 0x10, 0x10, 0x14, 0x40, + 0x10, 0x10, 0x14, 0x10, 0x10, 0x10, 0x14, 0x10, /* bytes 7024 - 7040 */ + 0x10, 0x10, 0x14, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x10, 0x10, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 7040 - 7056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7056 - 7072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7072 - 7088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7088 - 7104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 7104 - 7120 */ + 0x40, 0x40, 0x00, 0x44, 0x40, 0x40, 0x00, 0x44, + 0x40, 0x40, 0x00, 0x40, 0x00, 0x40, 0x04, 0x50, /* bytes 7120 - 7136 */ + 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, /* bytes 7136 - 7152 */ + 0x44, 0x50, 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 7152 - 7168 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 7168 - 7184 */ + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x50, /* bytes 7184 - 7200 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x50, /* bytes 7200 - 7216 */ + 0x40, 0x44, 0x40, 0x44, 0x40, 0x50, 0x40, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x04, 0x44, 0x00, 0x10, /* bytes 7216 - 7232 */ + 0x00, 0x54, 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, + 0x40, 0x14, 0x04, 0x14, 0x04, 0x50, 0x00, 0x50, /* bytes 7232 - 7248 */ + 0x00, 0x14, 0x00, 0x14, 0x04, 0x14, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 7248 - 7264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7264 - 7280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7280 - 7296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7296 - 7312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, /* bytes 7312 - 7328 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x50, 0xc0, /* bytes 7328 - 7344 */ + 0x50, 0xc0, 0x50, 0x50, 0x54, 0x44, 0x44, 0x44, + 0xc0, 0x44, 0x44, 0x44, 0xc0, 0x44, 0x44, 0x44, /* bytes 7344 - 7360 */ + 0xc0, 0x44, 0xc0, 0x44, 0x50, 0x44, 0x54, 0x44, + 0x54, 0x44, 0x54, 0x44, 0x54, 0xcc, 0x54, 0x44, /* bytes 7360 - 7376 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, + 0x50, 0x44, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, /* bytes 7376 - 7392 */ + 0x54, 0x44, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x50, 0x44, 0x50, 0x44, 0x50, 0x44, 0x50, 0x40, /* bytes 7392 - 7408 */ + 0x50, 0x44, 0x44, 0x44, 0x50, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, /* bytes 7408 - 7424 */ + 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, + 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 7424 - 7440 */ + 0x40, 0x40, 0x40, 0x04, 0x40, 0x00, 0x04, 0x10, + 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, /* bytes 7440 - 7456 */ + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x04, 0x10, 0x00, 0x00, 0x00, /* bytes 7456 - 7472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7472 - 7488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7488 - 7504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7504 - 7520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x40, 0x40, /* bytes 7520 - 7536 */ + 0x00, 0x44, 0x40, 0x40, 0x00, 0x44, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x50, /* bytes 7536 - 7552 */ + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x50, + 0x40, 0x54, 0x44, 0x50, 0x44, 0x54, 0x44, 0x54, /* bytes 7552 - 7568 */ + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 7568 - 7584 */ + 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 7584 - 7600 */ + 0x40, 0x54, 0x44, 0x54, 0x40, 0x50, 0x40, 0x50, + 0x40, 0x54, 0x44, 0x50, 0x40, 0x50, 0x44, 0x50, /* bytes 7600 - 7616 */ + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x40, 0x44, + 0x40, 0x54, 0x40, 0x44, 0x40, 0x54, 0x40, 0x44, /* bytes 7616 - 7632 */ + 0x00, 0x50, 0x40, 0x44, 0x40, 0x44, 0x40, 0x50, + 0x40, 0x50, 0x40, 0x44, 0x00, 0x50, 0x04, 0x44, /* bytes 7632 - 7648 */ + 0x00, 0x44, 0x00, 0x40, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x04, 0x14, /* bytes 7648 - 7664 */ + 0x00, 0x50, 0x00, 0x14, 0x00, 0x54, 0x00, 0x14, + 0x00, 0x54, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 7664 - 7680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7680 - 7696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7696 - 7712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7712 - 7728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, /* bytes 7728 - 7744 */ + 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x50, 0x40, + 0x44, 0x44, 0x50, 0x40, 0x44, 0x40, 0x50, 0x44, /* bytes 7744 - 7760 */ + 0x50, 0x44, 0x54, 0x44, 0x44, 0x44, 0x54, 0x44, + 0x44, 0x44, 0xc0, 0x44, 0x44, 0x44, 0x54, 0x44, /* bytes 7760 - 7776 */ + 0xc0, 0x44, 0x54, 0x44, 0xc0, 0xcc, 0x54, 0x44, + 0xcc, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, /* bytes 7776 - 7792 */ + 0x54, 0xcc, 0x54, 0x44, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x40, 0x50, 0x40, 0x50, 0x50, 0x50, 0x44, /* bytes 7792 - 7808 */ + 0x50, 0x50, 0x50, 0x40, 0x50, 0x50, 0x50, 0x40, + 0x10, 0x40, 0x50, 0x40, 0x50, 0x44, 0x50, 0x40, /* bytes 7808 - 7824 */ + 0x44, 0x44, 0x54, 0x40, 0x44, 0x44, 0x44, 0x40, + 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, /* bytes 7824 - 7840 */ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, + 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x40, 0x00, /* bytes 7840 - 7856 */ + 0x40, 0x40, 0x10, 0x44, 0x10, 0x10, 0x14, 0x04, + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, /* bytes 7856 - 7872 */ + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x14, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 7872 - 7888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7888 - 7904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7904 - 7920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 7920 - 7936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x54, /* bytes 7936 - 7952 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, + 0x40, 0x50, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 7952 - 7968 */ + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x44, 0x50, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 7968 - 7984 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, /* bytes 7984 - 8000 */ + 0x44, 0x54, 0x44, 0xa8, 0x44, 0xa8, 0x44, 0x54, + 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x50, /* bytes 8000 - 8016 */ + 0x40, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 8016 - 8032 */ + 0x44, 0x50, 0x40, 0x54, 0x40, 0x50, 0x40, 0x44, + 0x40, 0x44, 0x04, 0x44, 0x40, 0x44, 0x04, 0x44, /* bytes 8032 - 8048 */ + 0x40, 0x44, 0x00, 0x44, 0x40, 0x50, 0x04, 0x50, + 0x40, 0x44, 0x00, 0x44, 0x40, 0x40, 0x00, 0x14, /* bytes 8048 - 8064 */ + 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, /* bytes 8064 - 8080 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 8080 - 8096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8096 - 8112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8112 - 8128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8128 - 8144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x40, 0x44, 0x40, 0xc0, 0x44, /* bytes 8144 - 8160 */ + 0xc0, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, + 0x44, 0x44, 0xc0, 0x44, 0x50, 0x44, 0x50, 0x44, /* bytes 8160 - 8176 */ + 0x50, 0x44, 0x50, 0x44, 0xc0, 0x44, 0x44, 0x44, + 0xc0, 0x44, 0xc0, 0x44, 0x54, 0x44, 0xc0, 0x44, /* bytes 8176 - 8192 */ + 0x54, 0x44, 0x54, 0xcc, 0x54, 0x44, 0x54, 0xcc, + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 8192 - 8208 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, + 0x54, 0xcc, 0x50, 0x40, 0x50, 0x40, 0x50, 0x40, /* bytes 8208 - 8224 */ + 0x50, 0x40, 0x50, 0x50, 0x54, 0x54, 0x54, 0x54, + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 8224 - 8240 */ + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0x44, 0x54, 0x44, + 0xc0, 0x44, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, /* bytes 8240 - 8256 */ + 0x40, 0x40, 0x44, 0x40, 0x44, 0x40, 0x40, 0x40, + 0x44, 0x40, 0x40, 0x40, 0x40, 0x04, 0x10, 0x10, /* bytes 8256 - 8272 */ + 0x10, 0x04, 0x10, 0x04, 0x10, 0x00, 0x10, 0x10, + 0x10, 0x04, 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, /* bytes 8272 - 8288 */ + 0x10, 0x04, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x44, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, /* bytes 8288 - 8304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8304 - 8320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8320 - 8336 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 8336 - 8352 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x50, 0x40, 0x50, 0x40, 0x54, 0x40, 0x44, /* bytes 8352 - 8368 */ + 0x40, 0x54, 0x40, 0x44, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, 0x44, 0x54, /* bytes 8368 - 8384 */ + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, /* bytes 8384 - 8400 */ + 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 8400 - 8416 */ + 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, + 0x44, 0x54, 0xc0, 0x54, 0x40, 0x54, 0x40, 0x50, /* bytes 8416 - 8432 */ + 0x40, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 8432 - 8448 */ + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, + 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x40, 0x10, /* bytes 8448 - 8464 */ + 0x00, 0x50, 0x40, 0x44, 0x04, 0x54, 0x40, 0x40, + 0x00, 0x44, 0x40, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 8464 - 8480 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 8480 - 8496 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 8496 - 8512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8512 - 8528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8528 - 8544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8544 - 8560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x50, 0x44, 0x10, 0x40, 0x44, 0x44, 0x44, 0x40, /* bytes 8560 - 8576 */ + 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, 0x44, 0x40, + 0x44, 0x44, 0x50, 0x44, 0xc0, 0x44, 0x54, 0x44, /* bytes 8576 - 8592 */ + 0x44, 0xc0, 0x54, 0x40, 0x44, 0x44, 0x54, 0x44, + 0xc0, 0x44, 0x50, 0x44, 0x44, 0x44, 0x54, 0x44, /* bytes 8592 - 8608 */ + 0xcc, 0xc0, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xc0, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 8608 - 8624 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, + 0x44, 0x44, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, /* bytes 8624 - 8640 */ + 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, + 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xcc, /* bytes 8640 - 8656 */ + 0x54, 0xcc, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xc0, + 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x44, /* bytes 8656 - 8672 */ + 0xc0, 0x44, 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 8672 - 8688 */ + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 8688 - 8704 */ + 0x10, 0x10, 0x10, 0x04, 0x10, 0x10, 0x10, 0x00, + 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 8704 - 8720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8720 - 8736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8736 - 8752 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 8752 - 8768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, + 0x00, 0x14, 0x40, 0x50, 0x40, 0x44, 0x40, 0x44, /* bytes 8768 - 8784 */ + 0x40, 0x44, 0x40, 0x50, 0x40, 0x50, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, /* bytes 8784 - 8800 */ + 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x40, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 8800 - 8816 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 8816 - 8832 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x40, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0xa8, /* bytes 8832 - 8848 */ + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 8848 - 8864 */ + 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 8864 - 8880 */ + 0xc0, 0x54, 0x44, 0x54, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, /* bytes 8880 - 8896 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, /* bytes 8896 - 8912 */ + 0x00, 0x10, 0x00, 0x50, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, /* bytes 8912 - 8928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8928 - 8944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8944 - 8960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 8960 - 8976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, /* bytes 8976 - 8992 */ + 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, 0x44, 0x40, + 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, 0xc0, 0x44, /* bytes 8992 - 9008 */ + 0x54, 0x44, 0xc0, 0x40, 0xc0, 0x44, 0x44, 0x44, + 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0xc0, /* bytes 9008 - 9024 */ + 0xcc, 0x44, 0xcc, 0xc0, 0x54, 0xcc, 0x54, 0x44, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, /* bytes 9024 - 9040 */ + 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, + 0x44, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, /* bytes 9040 - 9056 */ + 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, 0xc0, 0xc0, + 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, /* bytes 9056 - 9072 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, /* bytes 9072 - 9088 */ + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0x44, 0x10, 0x00, + 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x10, 0x04, /* bytes 9088 - 9104 */ + 0x10, 0x40, 0x10, 0x10, 0x10, 0x40, 0x10, 0x10, + 0x10, 0x04, 0x10, 0x00, 0x10, 0x04, 0x10, 0x04, /* bytes 9104 - 9120 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, 0x10, 0x04, + 0x10, 0x04, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 9120 - 9136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9136 - 9152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9152 - 9168 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 9168 - 9184 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, /* bytes 9184 - 9200 */ + 0x00, 0x54, 0x40, 0x44, 0x04, 0x54, 0x40, 0x44, + 0x00, 0x54, 0x40, 0x44, 0x40, 0x54, 0x44, 0x54, /* bytes 9200 - 9216 */ + 0x44, 0x54, 0x40, 0x44, 0x40, 0x54, 0x44, 0xc0, + 0x40, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, /* bytes 9216 - 9232 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 9232 - 9248 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x44, + 0x40, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 9248 - 9264 */ + 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xa8, 0x44, 0xc0, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 9264 - 9280 */ + 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 9280 - 9296 */ + 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 9296 - 9312 */ + 0x00, 0x50, 0x04, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 9312 - 9328 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 9328 - 9344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9344 - 9360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9360 - 9376 */ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 9376 - 9392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9392 - 9408 */ + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, 0x44, /* bytes 9408 - 9424 */ + 0xc0, 0x44, 0x44, 0x40, 0x44, 0x44, 0x44, 0x44, + 0x44, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, /* bytes 9424 - 9440 */ + 0xc0, 0xc0, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x44, + 0xc0, 0xc0, 0x54, 0x44, 0xc0, 0xc0, 0x54, 0x44, /* bytes 9440 - 9456 */ + 0x54, 0xcc, 0x54, 0x44, 0xcc, 0xc0, 0xc0, 0x40, + 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x44, /* bytes 9456 - 9472 */ + 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xc0, + 0x44, 0xc0, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xcc, /* bytes 9472 - 9488 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, /* bytes 9488 - 9504 */ + 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, + 0x54, 0x44, 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, /* bytes 9504 - 9520 */ + 0x10, 0x10, 0x10, 0x44, 0x10, 0x10, 0x10, 0x04, + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 9520 - 9536 */ + 0x10, 0x40, 0x10, 0x00, 0x04, 0x04, 0x10, 0x00, + 0x44, 0x04, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 9536 - 9552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9552 - 9568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9568 - 9584 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 9584 - 9600 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9600 - 9616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x50, 0x44, 0x54, 0x44, 0x54, /* bytes 9616 - 9632 */ + 0x40, 0x44, 0x40, 0xc0, 0x40, 0xc0, 0x40, 0xc0, + 0x40, 0x44, 0x40, 0xc0, 0x40, 0x44, 0x40, 0x44, /* bytes 9632 - 9648 */ + 0x40, 0x44, 0x40, 0x54, 0x44, 0xc0, 0x40, 0x54, + 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 9648 - 9664 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0xc0, 0x40, 0x54, + 0xcc, 0x54, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 9664 - 9680 */ + 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0x54, + 0x44, 0x50, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, /* bytes 9680 - 9696 */ + 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 9696 - 9712 */ + 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, + 0x44, 0x54, 0x44, 0x54, 0x00, 0x10, 0x00, 0x14, /* bytes 9712 - 9728 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, + 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 9728 - 9744 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 9744 - 9760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9760 - 9776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9776 - 9792 */ + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 9792 - 9808 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9808 - 9824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x44, 0x54, 0x44, 0xc0, 0xc0, /* bytes 9824 - 9840 */ + 0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x44, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, /* bytes 9840 - 9856 */ + 0xc0, 0x44, 0x44, 0x44, 0x44, 0x44, 0xc0, 0x44, + 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0x44, 0x44, /* bytes 9856 - 9872 */ + 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0xc0, 0x54, 0x54, + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, /* bytes 9872 - 9888 */ + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, + 0xa8, 0xcc, 0xc0, 0xc0, 0x54, 0xc0, 0x54, 0xcc, /* bytes 9888 - 9904 */ + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 9904 - 9920 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x04, 0x10, 0x04, /* bytes 9920 - 9936 */ + 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x10, 0x40, + 0x10, 0x00, 0x10, 0x44, 0x10, 0x00, 0x10, 0x40, /* bytes 9936 - 9952 */ + 0x10, 0x00, 0x10, 0x04, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9952 - 9968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9968 - 9984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 9984 - 10000 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10000 - 10016 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 10016 - 10032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 10032 - 10048 */ + 0x00, 0x40, 0x40, 0x40, 0x40, 0x54, 0x44, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 10048 - 10064 */ + 0xc0, 0xf0, 0x54, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, + 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 10064 - 10080 */ + 0x44, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 10080 - 10096 */ + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x44, 0xa8, 0xc0, 0x50, 0x44, 0xa8, 0xc0, 0x54, /* bytes 10096 - 10112 */ + 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, + 0xc0, 0x54, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 10112 - 10128 */ + 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x04, 0x10, /* bytes 10128 - 10144 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x14, 0x00, 0x50, 0x00, 0x10, /* bytes 10144 - 10160 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 10160 - 10176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10176 - 10192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10192 - 10208 */ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 10208 - 10224 */ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10224 - 10240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0xc0, 0x44, 0x44, 0xc0, 0x40, /* bytes 10240 - 10256 */ + 0x44, 0x44, 0x50, 0xc0, 0x54, 0x54, 0x54, 0xc0, + 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x54, /* bytes 10256 - 10272 */ + 0x54, 0x54, 0xa8, 0x50, 0x54, 0x54, 0xa8, 0xc0, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 10272 - 10288 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, /* bytes 10288 - 10304 */ + 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0xc0, 0xc0, 0x54, 0xc0, /* bytes 10304 - 10320 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 10320 - 10336 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, /* bytes 10336 - 10352 */ + 0x40, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x04, + 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, /* bytes 10352 - 10368 */ + 0x10, 0x40, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10368 - 10384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10384 - 10400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10400 - 10416 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10416 - 10432 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10432 - 10448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x54, 0x40, 0x44, 0x40, 0x54, /* bytes 10448 - 10464 */ + 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x40, 0x54, + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 10464 - 10480 */ + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 10480 - 10496 */ + 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0xcc, 0x54, + 0xc0, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, /* bytes 10496 - 10512 */ + 0x44, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, + 0x44, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0x54, /* bytes 10512 - 10528 */ + 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 10528 - 10544 */ + 0x44, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0x54, + 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, /* bytes 10544 - 10560 */ + 0x44, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10560 - 10576 */ + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 10576 - 10592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10592 - 10608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10608 - 10624 */ + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 10624 - 10640 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10640 - 10656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x14, 0xc0, 0xc0, 0x44, 0x54, 0xcc, /* bytes 10656 - 10672 */ + 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x50, + 0x54, 0xc0, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 10672 - 10688 */ + 0xa8, 0x50, 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, + 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 10688 - 10704 */ + 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, /* bytes 10704 - 10720 */ + 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0xc0, /* bytes 10720 - 10736 */ + 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, /* bytes 10736 - 10752 */ + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xc0, + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, /* bytes 10752 - 10768 */ + 0x54, 0xc0, 0x14, 0x00, 0x10, 0x00, 0x10, 0x04, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 10768 - 10784 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10784 - 10800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10800 - 10816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10816 - 10832 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10832 - 10848 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 10848 - 10864 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 10864 - 10880 */ + 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0xc0, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 10880 - 10896 */ + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 10896 - 10912 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, + 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 10912 - 10928 */ + 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0xf0, /* bytes 10928 - 10944 */ + 0xc0, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, + 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 10944 - 10960 */ + 0x44, 0xa8, 0xc0, 0x54, 0xcc, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 10960 - 10976 */ + 0x44, 0x54, 0xc0, 0x54, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 10976 - 10992 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 10992 - 11008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11008 - 11024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11024 - 11040 */ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 11040 - 11056 */ + 0x00, 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, + 0x04, 0x04, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, /* bytes 11056 - 11072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xc0, + 0x54, 0xcc, 0x54, 0x44, 0x54, 0xcc, 0x54, 0x44, /* bytes 11072 - 11088 */ + 0xc0, 0xc0, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, /* bytes 11088 - 11104 */ + 0x54, 0x54, 0xa8, 0xc0, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 11104 - 11120 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 11120 - 11136 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xc0, /* bytes 11136 - 11152 */ + 0x50, 0x50, 0x54, 0xc0, 0xcc, 0xc0, 0x54, 0xc0, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, /* bytes 11152 - 11168 */ + 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, /* bytes 11168 - 11184 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, 0x10, 0x00, + 0x40, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 11184 - 11200 */ + 0x44, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11200 - 11216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11216 - 11232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11232 - 11248 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 11248 - 11264 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, /* bytes 11264 - 11280 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 11280 - 11296 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 11296 - 11312 */ + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 11312 - 11328 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0x54, /* bytes 11328 - 11344 */ + 0x44, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, + 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 11344 - 11360 */ + 0xc0, 0xf0, 0xc0, 0xa8, 0xcc, 0xa8, 0x44, 0x54, + 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, /* bytes 11360 - 11376 */ + 0xc0, 0x54, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0xa8, + 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, /* bytes 11376 - 11392 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, /* bytes 11392 - 11408 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 11408 - 11424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11424 - 11440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11440 - 11456 */ + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x00, /* bytes 11456 - 11472 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x04, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, /* bytes 11472 - 11488 */ + 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, 0x54, 0x44, + 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, /* bytes 11488 - 11504 */ + 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x54, /* bytes 11504 - 11520 */ + 0x54, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 11520 - 11536 */ + 0xa8, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 11536 - 11552 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 11552 - 11568 */ + 0xa8, 0xc0, 0x50, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, /* bytes 11568 - 11584 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, /* bytes 11584 - 11600 */ + 0x54, 0xc0, 0x54, 0xcc, 0xcc, 0xc0, 0x54, 0x44, + 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, /* bytes 11600 - 11616 */ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11616 - 11632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11632 - 11648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11648 - 11664 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 11664 - 11680 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, /* bytes 11680 - 11696 */ + 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 11696 - 11712 */ + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, + 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, /* bytes 11712 - 11728 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 11728 - 11744 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 11744 - 11760 */ + 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 11760 - 11776 */ + 0xcc, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, + 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 11776 - 11792 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 11792 - 11808 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 11808 - 11824 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11824 - 11840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11840 - 11856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 11856 - 11872 */ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 11872 - 11888 */ + 0x00, 0x00, 0x10, 0x00, 0x04, 0x04, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x00, 0x40, 0x04, 0x10, 0x00, /* bytes 11888 - 11904 */ + 0x00, 0x04, 0x54, 0xc0, 0xc0, 0xc0, 0x54, 0x44, + 0xc0, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, /* bytes 11904 - 11920 */ + 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0x54, /* bytes 11920 - 11936 */ + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 11936 - 11952 */ + 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 11952 - 11968 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 11968 - 11984 */ + 0x54, 0xa8, 0x54, 0xc0, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, /* bytes 11984 - 12000 */ + 0x54, 0xcc, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xc0, + 0xcc, 0xcc, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0x44, /* bytes 12000 - 12016 */ + 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x44, + 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 12016 - 12032 */ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12032 - 12048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12048 - 12064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12064 - 12080 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 12080 - 12096 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 12096 - 12112 */ + 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, /* bytes 12112 - 12128 */ + 0x44, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, + 0xc0, 0x54, 0xc0, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 12128 - 12144 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 12144 - 12160 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, /* bytes 12160 - 12176 */ + 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 12176 - 12192 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, + 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0xa8, /* bytes 12192 - 12208 */ + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 12208 - 12224 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 12224 - 12240 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 12240 - 12256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12256 - 12272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12272 - 12288 */ + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, /* bytes 12288 - 12304 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, /* bytes 12304 - 12320 */ + 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0xcc, 0x44, + 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, /* bytes 12320 - 12336 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x54, /* bytes 12336 - 12352 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0x54, + 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 12352 - 12368 */ + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 12368 - 12384 */ + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 12384 - 12400 */ + 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xc0, 0x54, 0x54, + 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xcc, 0xcc, /* bytes 12400 - 12416 */ + 0x54, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0x54, 0xcc, + 0x54, 0x44, 0xc0, 0xc0, 0xcc, 0x44, 0xcc, 0xcc, /* bytes 12416 - 12432 */ + 0xcc, 0xc0, 0xcc, 0xc0, 0x54, 0xc0, 0xcc, 0xc0, + 0xc0, 0x44, 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, /* bytes 12432 - 12448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12448 - 12464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12464 - 12480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12480 - 12496 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x14, 0x00, 0x10, /* bytes 12496 - 12512 */ + 0x00, 0x14, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, /* bytes 12512 - 12528 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 12528 - 12544 */ + 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, + 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 12544 - 12560 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 12560 - 12576 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xc0, 0x54, /* bytes 12576 - 12592 */ + 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 12592 - 12608 */ + 0x44, 0xa8, 0xcc, 0xa8, 0x54, 0xf0, 0xc0, 0x54, + 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, /* bytes 12608 - 12624 */ + 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, + 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0x44, 0xcc, /* bytes 12624 - 12640 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, /* bytes 12640 - 12656 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12656 - 12672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12672 - 12688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12688 - 12704 */ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 12704 - 12720 */ + 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x44, /* bytes 12720 - 12736 */ + 0xc0, 0xc0, 0x54, 0x44, 0xc0, 0x44, 0x54, 0x44, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 12736 - 12752 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, /* bytes 12752 - 12768 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 12768 - 12784 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 12784 - 12800 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 12800 - 12816 */ + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 12816 - 12832 */ + 0xc0, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, /* bytes 12832 - 12848 */ + 0xc0, 0x44, 0xc0, 0x44, 0x44, 0xc0, 0xcc, 0x44, + 0xc0, 0x44, 0xc0, 0x44, 0xcc, 0x40, 0x00, 0x00, /* bytes 12848 - 12864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12864 - 12880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12880 - 12896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 12896 - 12912 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 12912 - 12928 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, /* bytes 12928 - 12944 */ + 0x44, 0x54, 0x44, 0x54, 0x40, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, /* bytes 12944 - 12960 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, /* bytes 12960 - 12976 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 12976 - 12992 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0x44, 0xa8, /* bytes 12992 - 13008 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13008 - 13024 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, + 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13024 - 13040 */ + 0xc0, 0x54, 0xc0, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0x54, /* bytes 13040 - 13056 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0xc0, 0x40, 0xc0, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x00, 0x00, /* bytes 13056 - 13072 */ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13072 - 13088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13088 - 13104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13104 - 13120 */ + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13120 - 13136 */ + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x44, 0x54, 0x44, /* bytes 13136 - 13152 */ + 0x54, 0x44, 0xc0, 0x44, 0xc0, 0xcc, 0x54, 0x54, + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 13152 - 13168 */ + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, + 0xa8, 0xcc, 0xcc, 0xcc, 0x54, 0x54, 0xa8, 0x54, /* bytes 13168 - 13184 */ + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, + 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xcc, /* bytes 13184 - 13200 */ + 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 13200 - 13216 */ + 0x54, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 13216 - 13232 */ + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, + 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 13232 - 13248 */ + 0xa8, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 13248 - 13264 */ + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, 0xc0, 0x44, + 0x44, 0x40, 0x44, 0x44, 0xc0, 0x44, 0x44, 0x00, /* bytes 13264 - 13280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13280 - 13296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13296 - 13312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13312 - 13328 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 13328 - 13344 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x40, 0x54, 0x44, 0x54, /* bytes 13344 - 13360 */ + 0x44, 0x54, 0x40, 0x54, 0x44, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 13360 - 13376 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, /* bytes 13376 - 13392 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 13392 - 13408 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, + 0x44, 0x54, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 13408 - 13424 */ + 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, + 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 13424 - 13440 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0x54, 0xa8, + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 13440 - 13456 */ + 0xcc, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xcc, 0x54, + 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0x44, 0x54, /* bytes 13456 - 13472 */ + 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, + 0x44, 0x54, 0x40, 0x44, 0x40, 0xc0, 0x40, 0xc0, /* bytes 13472 - 13488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13488 - 13504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13504 - 13520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13520 - 13536 */ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13536 - 13552 */ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x40, 0xcc, 0x44, 0x54, 0x44, /* bytes 13552 - 13568 */ + 0xc0, 0x44, 0x54, 0xc0, 0x54, 0x54, 0x54, 0xc0, + 0x54, 0x54, 0x54, 0xc0, 0x54, 0x54, 0x54, 0x54, /* bytes 13568 - 13584 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0xcc, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 13584 - 13600 */ + 0x54, 0x54, 0xa8, 0xa8, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 13600 - 13616 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 13616 - 13632 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 13632 - 13648 */ + 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 13648 - 13664 */ + 0x54, 0x54, 0xa8, 0xc0, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 13664 - 13680 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xc0, 0x44, 0x40, 0x44, 0x44, /* bytes 13680 - 13696 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13696 - 13712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13712 - 13728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13728 - 13744 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 13744 - 13760 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 13760 - 13776 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13776 - 13792 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, /* bytes 13792 - 13808 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13808 - 13824 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 13824 - 13840 */ + 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13840 - 13856 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xa8, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13856 - 13872 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0x54, 0xc0, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 13872 - 13888 */ + 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0x40, 0x44, /* bytes 13888 - 13904 */ + 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13904 - 13920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13920 - 13936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13936 - 13952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 13952 - 13968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x54, 0xc0, 0x54, 0x44, 0xc0, 0x44, /* bytes 13968 - 13984 */ + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 13984 - 14000 */ + 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, + 0xa8, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 14000 - 14016 */ + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, + 0xa8, 0xcc, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, /* bytes 14016 - 14032 */ + 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 14032 - 14048 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 14048 - 14064 */ + 0x54, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0xa8, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0x54, /* bytes 14064 - 14080 */ + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 14080 - 14096 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x40, /* bytes 14096 - 14112 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14112 - 14128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14128 - 14144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14144 - 14160 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 14160 - 14176 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 14176 - 14192 */ + 0x44, 0x54, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, + 0x44, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 14192 - 14208 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 14208 - 14224 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 14224 - 14240 */ + 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 14240 - 14256 */ + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, + 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, /* bytes 14256 - 14272 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xfc, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 14272 - 14288 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0x44, 0x54, + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 14288 - 14304 */ + 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, /* bytes 14304 - 14320 */ + 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14320 - 14336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14336 - 14352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14352 - 14368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14368 - 14384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0xcc, 0x54, 0x44, 0xc0, 0x44, 0x54, 0xc0, /* bytes 14384 - 14400 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 14400 - 14416 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0x54, /* bytes 14416 - 14432 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0x54, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 14432 - 14448 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xc0, /* bytes 14448 - 14464 */ + 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 14464 - 14480 */ + 0x54, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 14480 - 14496 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0x54, 0x44, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 14496 - 14512 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, + 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xc0, 0xc0, 0x44, /* bytes 14512 - 14528 */ + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14528 - 14544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14544 - 14560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14560 - 14576 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14576 - 14592 */ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 14592 - 14608 */ + 0x44, 0x54, 0xcc, 0xa8, 0x44, 0xa8, 0x44, 0xa8, + 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 14608 - 14624 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 14624 - 14640 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, /* bytes 14640 - 14656 */ + 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0x54, + 0xcc, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 14656 - 14672 */ + 0xc0, 0xa8, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, + 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, /* bytes 14672 - 14688 */ + 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 14688 - 14704 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0x54, + 0x44, 0x54, 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0x54, /* bytes 14704 - 14720 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, + 0x44, 0x54, 0x44, 0x54, 0x44, 0xcc, 0x44, 0x54, /* bytes 14720 - 14736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14736 - 14752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14752 - 14768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14768 - 14784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14784 - 14800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x54, 0x44, 0xc0, 0x44, 0x54, 0xcc, 0x54, 0x54, /* bytes 14800 - 14816 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, /* bytes 14816 - 14832 */ + 0x54, 0xcc, 0xa8, 0x54, 0x54, 0xcc, 0xa8, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 14832 - 14848 */ + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 14848 - 14864 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0xcc, /* bytes 14864 - 14880 */ + 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 14880 - 14896 */ + 0x54, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xcc, 0x54, 0x54, /* bytes 14896 - 14912 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xcc, + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 14912 - 14928 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, + 0x54, 0x44, 0xcc, 0xc0, 0xcc, 0x44, 0x44, 0x00, /* bytes 14928 - 14944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14944 - 14960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14960 - 14976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14976 - 14992 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 14992 - 15008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, + 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 15008 - 15024 */ + 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0xcc, 0x54, + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15024 - 15040 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15040 - 15056 */ + 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 15056 - 15072 */ + 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, /* bytes 15072 - 15088 */ + 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 15088 - 15104 */ + 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0x54, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 15104 - 15120 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0xa8, /* bytes 15120 - 15136 */ + 0x44, 0xa8, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x00, 0x10, 0x00, 0x00, /* bytes 15136 - 15152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15152 - 15168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15168 - 15184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15184 - 15200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15200 - 15216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, + 0x44, 0x44, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x44, /* bytes 15216 - 15232 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 15232 - 15248 */ + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, + 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0x54, /* bytes 15248 - 15264 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 15264 - 15280 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xc0, 0xc0, 0xc0, 0x54, 0x44, /* bytes 15280 - 15296 */ + 0xcc, 0xc0, 0xcc, 0x44, 0xcc, 0xcc, 0x54, 0xc0, + 0xcc, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, /* bytes 15296 - 15312 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, /* bytes 15312 - 15328 */ + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xc0, + 0x54, 0x54, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, /* bytes 15328 - 15344 */ + 0x54, 0x54, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15344 - 15360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15360 - 15376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15376 - 15392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15392 - 15408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15408 - 15424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x54, + 0x40, 0x54, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0x54, /* bytes 15424 - 15440 */ + 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15440 - 15456 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15456 - 15472 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xa8, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0xa8, /* bytes 15472 - 15488 */ + 0xcc, 0xa8, 0xc0, 0xa8, 0x44, 0x54, 0xc0, 0xa8, + 0xc0, 0xa8, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0x54, /* bytes 15488 - 15504 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, /* bytes 15504 - 15520 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, /* bytes 15520 - 15536 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 15536 - 15552 */ + 0x44, 0x54, 0x44, 0xa8, 0x44, 0xa8, 0x44, 0x54, + 0xc0, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15552 - 15568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15568 - 15584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15584 - 15600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15600 - 15616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15616 - 15632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x54, 0x44, + 0xc0, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, /* bytes 15632 - 15648 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, + 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 15648 - 15664 */ + 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, /* bytes 15664 - 15680 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xcc, 0x44, /* bytes 15680 - 15696 */ + 0xcc, 0xcc, 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xc0, + 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0x44, 0xc0, 0x44, /* bytes 15696 - 15712 */ + 0xc0, 0x44, 0xc0, 0x44, 0xcc, 0x44, 0xc0, 0xc0, + 0xc0, 0x44, 0xc0, 0xc0, 0x54, 0x54, 0xa8, 0xa8, /* bytes 15712 - 15728 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 15728 - 15744 */ + 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, /* bytes 15744 - 15760 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xc0, 0x54, 0x04, 0x00, 0x00, 0x00, 0x00, /* bytes 15760 - 15776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15776 - 15792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15792 - 15808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15808 - 15824 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15824 - 15840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 15840 - 15856 */ + 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15856 - 15872 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 15872 - 15888 */ + 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0x54, /* bytes 15888 - 15904 */ + 0x44, 0x54, 0x44, 0xc0, 0x44, 0x54, 0xc0, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x44, 0xc0, /* bytes 15904 - 15920 */ + 0x44, 0x54, 0x40, 0xc0, 0x44, 0xc0, 0x40, 0xc0, + 0x40, 0x54, 0xcc, 0xa8, 0xcc, 0xfc, 0xa8, 0xa8, /* bytes 15920 - 15936 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 15936 - 15952 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 15952 - 15968 */ + 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, + 0xc0, 0xa8, 0xc0, 0x54, 0x00, 0x00, 0x00, 0x00, /* bytes 15968 - 15984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 15984 - 16000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16000 - 16016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16016 - 16032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16032 - 16048 */ + 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0x54, 0xc0, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x44, /* bytes 16048 - 16064 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 16064 - 16080 */ + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, /* bytes 16080 - 16096 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 16096 - 16112 */ + 0xa8, 0x54, 0x54, 0xc0, 0xcc, 0xcc, 0xcc, 0x44, + 0x44, 0x44, 0x44, 0x40, 0x44, 0x44, 0xc0, 0x44, /* bytes 16112 - 16128 */ + 0x44, 0x44, 0x44, 0x40, 0x40, 0x44, 0x54, 0xc0, + 0x54, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 16128 - 16144 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 16144 - 16160 */ + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, /* bytes 16160 - 16176 */ + 0x54, 0x54, 0x54, 0x44, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xc0, 0x40, 0x00, 0x00, 0x00, /* bytes 16176 - 16192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16192 - 16208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16208 - 16224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16224 - 16240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16240 - 16256 */ + 0x00, 0x00, 0x00, 0x10, 0x44, 0x54, 0xc0, 0xa8, + 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 16256 - 16272 */ + 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16272 - 16288 */ + 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16288 - 16304 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, + 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, /* bytes 16304 - 16320 */ + 0xcc, 0xa8, 0xa8, 0xfc, 0xa8, 0xf0, 0x54, 0xf0, + 0x54, 0xa8, 0xc0, 0x54, 0x40, 0x44, 0x40, 0x44, /* bytes 16320 - 16336 */ + 0x40, 0x44, 0x40, 0x50, 0xc0, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16336 - 16352 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16352 - 16368 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, /* bytes 16368 - 16384 */ + 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, + 0xcc, 0xa8, 0xc0, 0x54, 0x44, 0x00, 0x00, 0x00, /* bytes 16384 - 16400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16400 - 16416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16416 - 16432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16432 - 16448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16448 - 16464 */ + 0x00, 0x00, 0x00, 0x40, 0xc0, 0xc0, 0x54, 0xc0, + 0x54, 0x44, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 16464 - 16480 */ + 0x54, 0x54, 0xa8, 0x54, 0x54, 0x54, 0x54, 0xa8, + 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 16480 - 16496 */ + 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 16496 - 16512 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 16512 - 16528 */ + 0xa8, 0xcc, 0xa8, 0xa8, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xa8, 0xf0, 0xf0, 0xf0, 0xa8, 0x54, 0x40, /* bytes 16528 - 16544 */ + 0x40, 0x40, 0xf0, 0xf0, 0xa8, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 16544 - 16560 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 16560 - 16576 */ + 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, /* bytes 16576 - 16592 */ + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0x04, 0x00, 0x00, /* bytes 16592 - 16608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16608 - 16624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16624 - 16640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16640 - 16656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16656 - 16672 */ + 0x00, 0x00, 0x00, 0x50, 0x44, 0xa8, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, 0xcc, 0x54, /* bytes 16672 - 16688 */ + 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 16688 - 16704 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16704 - 16720 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xa8, 0xa8, /* bytes 16720 - 16736 */ + 0xcc, 0xa8, 0xa8, 0xfc, 0xa8, 0xf0, 0xa8, 0xf0, + 0xa8, 0xf0, 0xa8, 0xf0, 0xc0, 0xf0, 0xa8, 0xf0, /* bytes 16736 - 16752 */ + 0xc0, 0xf0, 0xa8, 0xf0, 0xc0, 0xa8, 0xcc, 0xa8, + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16752 - 16768 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 16768 - 16784 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 16784 - 16800 */ + 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x44, 0xa8, 0xc0, 0xa8, 0x44, 0x54, 0x00, 0x00, /* bytes 16800 - 16816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16816 - 16832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16832 - 16848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16848 - 16864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16864 - 16880 */ + 0x00, 0x00, 0x40, 0xc0, 0x54, 0xc0, 0x54, 0xc0, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 16880 - 16896 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0xa8, 0xa8, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, /* bytes 16896 - 16912 */ + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xa8, 0xa8, 0xa8, /* bytes 16912 - 16928 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 16928 - 16944 */ + 0xa8, 0xa8, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, 0x50, + 0xf0, 0xf0, 0xf0, 0xa8, 0xf0, 0xf0, 0xf0, 0xf0, /* bytes 16944 - 16960 */ + 0xf0, 0xf0, 0xf0, 0xa8, 0xf0, 0xa8, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 16960 - 16976 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xcc, /* bytes 16976 - 16992 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0xa8, 0xa8, 0xcc, + 0xa8, 0xa8, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xc0, /* bytes 16992 - 17008 */ + 0xcc, 0xc0, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xc0, + 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x40, 0x00, /* bytes 17008 - 17024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17024 - 17040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17040 - 17056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17056 - 17072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17072 - 17088 */ + 0x00, 0x00, 0x40, 0xa8, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0xcc, 0xa8, 0xc0, 0xa8, /* bytes 17088 - 17104 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, /* bytes 17104 - 17120 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17120 - 17136 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, /* bytes 17136 - 17152 */ + 0xcc, 0xa8, 0x50, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, + 0x54, 0xf0, 0xa8, 0xf0, 0xa8, 0xf0, 0xc0, 0xf0, /* bytes 17152 - 17168 */ + 0xa8, 0xf0, 0xc0, 0xf0, 0xa8, 0xf0, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17168 - 17184 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17184 - 17200 */ + 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0x54, 0x44, 0x54, /* bytes 17200 - 17216 */ + 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x44, 0x54, 0x44, 0x54, 0xc0, 0xa8, 0x40, 0x00, /* bytes 17216 - 17232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17232 - 17248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17248 - 17264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17264 - 17280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17280 - 17296 */ + 0x00, 0x00, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 17296 - 17312 */ + 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0x44, 0x44, /* bytes 17312 - 17328 */ + 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 17328 - 17344 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 17344 - 17360 */ + 0xa8, 0x54, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xa8, 0xf0, 0xf0, 0xf0, 0xa8, /* bytes 17360 - 17376 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, + 0x54, 0xcc, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 17376 - 17392 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 17392 - 17408 */ + 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xc0, 0x54, 0xcc, /* bytes 17408 - 17424 */ + 0x54, 0xc0, 0xcc, 0xc0, 0x54, 0xc0, 0x54, 0xc0, + 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0x04, /* bytes 17424 - 17440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17440 - 17456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17456 - 17472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17472 - 17488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17488 - 17504 */ + 0x00, 0x54, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, + 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 17504 - 17520 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0x54, 0x00, 0x54, /* bytes 17520 - 17536 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 17536 - 17552 */ + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, /* bytes 17552 - 17568 */ + 0xcc, 0xf0, 0x54, 0xa8, 0x54, 0xf0, 0xa8, 0xa8, + 0xc0, 0xf0, 0x54, 0xa8, 0xcc, 0xf0, 0x54, 0xa8, /* bytes 17568 - 17584 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17584 - 17600 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17600 - 17616 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xc0, 0x54, /* bytes 17616 - 17632 */ + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, 0xc0, 0x54, /* bytes 17632 - 17648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17648 - 17664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17664 - 17680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17680 - 17696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17696 - 17712 */ + 0x44, 0x54, 0x54, 0x44, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 17712 - 17728 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0xa8, 0xcc, 0xa8, 0xcc, 0x40, 0x00, 0x00, 0xcc, /* bytes 17728 - 17744 */ + 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 17744 - 17760 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 17760 - 17776 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 17776 - 17792 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 17792 - 17808 */ + 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 17808 - 17824 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xc0, /* bytes 17824 - 17840 */ + 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xc0, 0x54, 0xc0, + 0xc0, 0xc0, 0x54, 0x44, 0xcc, 0xcc, 0x54, 0xc0, /* bytes 17840 - 17856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17856 - 17872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17872 - 17888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17888 - 17904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 17904 - 17920 */ + 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0xa8, + 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17920 - 17936 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0x40, 0x00, 0x00, 0x00, 0xa8, /* bytes 17936 - 17952 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17952 - 17968 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17968 - 17984 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 17984 - 18000 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18000 - 18016 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18016 - 18032 */ + 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0x54, /* bytes 18032 - 18048 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, /* bytes 18048 - 18064 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 18064 - 18080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18080 - 18096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18096 - 18112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, /* bytes 18112 - 18128 */ + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0x44, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 18128 - 18144 */ + 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, + 0xa8, 0x54, 0x00, 0x00, 0x00, 0x00, 0x04, 0xa8, /* bytes 18144 - 18160 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 18160 - 18176 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, /* bytes 18176 - 18192 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 18192 - 18208 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0xa8, + 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 18208 - 18224 */ + 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 18224 - 18240 */ + 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0x54, + 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xcc, 0xc0, /* bytes 18240 - 18256 */ + 0x54, 0x44, 0x54, 0xc0, 0x54, 0xc0, 0xc0, 0xc0, + 0x54, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0xcc, /* bytes 18256 - 18272 */ + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18272 - 18288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18288 - 18304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18304 - 18320 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x54, /* bytes 18320 - 18336 */ + 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, + 0x44, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0xa8, /* bytes 18336 - 18352 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, + 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, 0xa8, /* bytes 18352 - 18368 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18368 - 18384 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18384 - 18400 */ + 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18400 - 18416 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18416 - 18432 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xa8, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18432 - 18448 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0x44, 0x54, /* bytes 18448 - 18464 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 18464 - 18480 */ + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18480 - 18496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18496 - 18512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18512 - 18528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, /* bytes 18528 - 18544 */ + 0xcc, 0xc0, 0x54, 0x44, 0xcc, 0x54, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, /* bytes 18544 - 18560 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xcc, /* bytes 18560 - 18576 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 18576 - 18592 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xa8, /* bytes 18592 - 18608 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 18608 - 18624 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 18624 - 18640 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, 0xa8, 0xcc, /* bytes 18640 - 18656 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0x44, /* bytes 18656 - 18672 */ + 0xc0, 0xc0, 0x54, 0x44, 0xc0, 0xc0, 0x54, 0x44, + 0xc0, 0xc0, 0xc0, 0x44, 0x44, 0xc0, 0x50, 0x44, /* bytes 18672 - 18688 */ + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18688 - 18704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18704 - 18720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18720 - 18736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, /* bytes 18736 - 18752 */ + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0xa8, /* bytes 18752 - 18768 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x14, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xfc, /* bytes 18768 - 18784 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18784 - 18800 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18800 - 18816 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18816 - 18832 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18832 - 18848 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xfc, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 18848 - 18864 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 18864 - 18880 */ + 0x44, 0x54, 0x40, 0x54, 0x40, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x40, 0x54, 0x40, 0x50, 0x40, 0x54, /* bytes 18880 - 18896 */ + 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x44, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 18896 - 18912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18912 - 18928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 18928 - 18944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, /* bytes 18944 - 18960 */ + 0xc0, 0x44, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0x54, /* bytes 18960 - 18976 */ + 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x44, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa8, /* bytes 18976 - 18992 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x54, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 18992 - 19008 */ + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, /* bytes 19008 - 19024 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 19024 - 19040 */ + 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 19040 - 19056 */ + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0x54, 0x54, /* bytes 19056 - 19072 */ + 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, /* bytes 19072 - 19088 */ + 0x40, 0x44, 0xc0, 0x44, 0x44, 0x40, 0x44, 0x44, + 0x44, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0x44, 0x44, /* bytes 19088 - 19104 */ + 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, /* bytes 19104 - 19120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19120 - 19136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19136 - 19152 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, /* bytes 19152 - 19168 */ + 0x40, 0x54, 0x44, 0x54, 0x44, 0xa8, 0xc0, 0x54, + 0x44, 0xa8, 0x44, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 19168 - 19184 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xa8, /* bytes 19184 - 19200 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19200 - 19216 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 19216 - 19232 */ + 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19232 - 19248 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 19248 - 19264 */ + 0x44, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19264 - 19280 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, + 0xc0, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 19280 - 19296 */ + 0x00, 0x00, 0x00, 0x44, 0x40, 0x50, 0x40, 0x44, + 0x40, 0x54, 0x40, 0xc0, 0x40, 0x54, 0x40, 0xc0, /* bytes 19296 - 19312 */ + 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 19312 - 19328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19328 - 19344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19344 - 19360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, /* bytes 19360 - 19376 */ + 0x44, 0xc0, 0x54, 0xc0, 0xcc, 0xc0, 0xcc, 0xc0, + 0xc0, 0xc0, 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 19376 - 19392 */ + 0x54, 0xcc, 0xa8, 0xcc, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, /* bytes 19392 - 19408 */ + 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 19408 - 19424 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 19424 - 19440 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 19440 - 19456 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, + 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 19456 - 19472 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 19472 - 19488 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 19488 - 19504 */ + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, + 0x40, 0x40, 0x44, 0x40, 0x44, 0x44, 0x44, 0x40, /* bytes 19504 - 19520 */ + 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 19520 - 19536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19536 - 19552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19552 - 19568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, /* bytes 19568 - 19584 */ + 0x44, 0x54, 0x44, 0xa8, 0x44, 0x54, 0x44, 0x54, + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0x54, /* bytes 19584 - 19600 */ + 0xcc, 0xa8, 0xcc, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xa8, /* bytes 19600 - 19616 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19616 - 19632 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19632 - 19648 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19648 - 19664 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, /* bytes 19664 - 19680 */ + 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 19680 - 19696 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, 0xc0, 0x54, /* bytes 19696 - 19712 */ + 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x14, 0x04, 0x44, /* bytes 19712 - 19728 */ + 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, /* bytes 19728 - 19744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19744 - 19760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19760 - 19776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, /* bytes 19776 - 19792 */ + 0xc0, 0xc0, 0xcc, 0x44, 0xc0, 0x44, 0x54, 0x54, + 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 19792 - 19808 */ + 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa8, /* bytes 19808 - 19824 */ + 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0x54, + 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 19824 - 19840 */ + 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 19840 - 19856 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 19856 - 19872 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0xcc, /* bytes 19872 - 19888 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, + 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, 0xa8, 0x54, /* bytes 19888 - 19904 */ + 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0x54, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 19904 - 19920 */ + 0x54, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, /* bytes 19920 - 19936 */ + 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 19936 - 19952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19952 - 19968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 19968 - 19984 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x50, /* bytes 19984 - 20000 */ + 0x44, 0x54, 0x40, 0xc0, 0x44, 0xa8, 0xcc, 0xa8, + 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0x54, /* bytes 20000 - 20016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xcc, 0xa8, /* bytes 20016 - 20032 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 20032 - 20048 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20048 - 20064 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20064 - 20080 */ + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 20080 - 20096 */ + 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20096 - 20112 */ + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0x54, /* bytes 20112 - 20128 */ + 0x44, 0xa8, 0x44, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20128 - 20144 */ + 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 20144 - 20160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20160 - 20176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20176 - 20192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, /* bytes 20192 - 20208 */ + 0x44, 0x44, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x40, 0x00, /* bytes 20208 - 20224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xcc, /* bytes 20224 - 20240 */ + 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xc0, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 20240 - 20256 */ + 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xc0, + 0x54, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 20256 - 20272 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 20272 - 20288 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 20288 - 20304 */ + 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0x44, + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 20304 - 20320 */ + 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 20320 - 20336 */ + 0x54, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20336 - 20352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 20352 - 20368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20368 - 20384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20384 - 20400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0xc0, /* bytes 20400 - 20416 */ + 0x44, 0x54, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0xa8, + 0xc0, 0xa8, 0xc0, 0x54, 0x04, 0x00, 0x00, 0x00, /* bytes 20416 - 20432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xcc, 0xa8, /* bytes 20432 - 20448 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, + 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20448 - 20464 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20464 - 20480 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20480 - 20496 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20496 - 20512 */ + 0xc0, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, 0x44, 0x54, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20512 - 20528 */ + 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, + 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, /* bytes 20528 - 20544 */ + 0x44, 0x54, 0xc0, 0x54, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20544 - 20560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 20560 - 20576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20576 - 20592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20592 - 20608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, /* bytes 20608 - 20624 */ + 0x54, 0xc0, 0x54, 0xcc, 0xcc, 0xc0, 0xcc, 0xcc, + 0xcc, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20624 - 20640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, /* bytes 20640 - 20656 */ + 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 20656 - 20672 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, + 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 20672 - 20688 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 20688 - 20704 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, /* bytes 20704 - 20720 */ + 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0x44, + 0x54, 0xa8, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, /* bytes 20720 - 20736 */ + 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xc0, /* bytes 20736 - 20752 */ + 0x54, 0xcc, 0xcc, 0xcc, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20752 - 20768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 20768 - 20784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20784 - 20800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20800 - 20816 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x44, 0x54, /* bytes 20816 - 20832 */ + 0x44, 0x54, 0xc0, 0xcc, 0x44, 0xa8, 0x44, 0x50, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, /* bytes 20832 - 20848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xcc, 0xa8, /* bytes 20848 - 20864 */ + 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 20864 - 20880 */ + 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xcc, 0xa8, + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20880 - 20896 */ + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20896 - 20912 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 20912 - 20928 */ + 0xcc, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, + 0x40, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 20928 - 20944 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, /* bytes 20944 - 20960 */ + 0x44, 0x54, 0x44, 0x54, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20960 - 20976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 20976 - 20992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 20992 - 21008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21008 - 21024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0xc0, 0x44, /* bytes 21024 - 21040 */ + 0xc0, 0xc0, 0xc0, 0x44, 0x44, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21040 - 21056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xa8, 0xcc, /* bytes 21056 - 21072 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xc0, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 21072 - 21088 */ + 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xa8, 0xa8, 0xcc, + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 21088 - 21104 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 21104 - 21120 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xcc, + 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 21120 - 21136 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xc0, 0xc0, 0x54, 0xc0, + 0x44, 0xcc, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 21136 - 21152 */ + 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 21152 - 21168 */ + 0xcc, 0xc0, 0x54, 0x44, 0xcc, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21168 - 21184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21184 - 21200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21200 - 21216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21216 - 21232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x14, 0x00, 0x50, 0x40, 0x54, /* bytes 21232 - 21248 */ + 0x04, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, /* bytes 21248 - 21264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xcc, 0xa8, /* bytes 21264 - 21280 */ + 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, 0x44, 0x54, + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 21280 - 21296 */ + 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21296 - 21312 */ + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21312 - 21328 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21328 - 21344 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0x54, + 0xc0, 0xc0, 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21344 - 21360 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0x54, 0xcc, 0x54, /* bytes 21360 - 21376 */ + 0xcc, 0xa8, 0x44, 0x54, 0x44, 0x54, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21376 - 21392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 21392 - 21408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21408 - 21424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21424 - 21440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21440 - 21456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21456 - 21472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xa8, 0xcc, /* bytes 21472 - 21488 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xc0, + 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 21488 - 21504 */ + 0xcc, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, + 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 21504 - 21520 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, /* bytes 21520 - 21536 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 21536 - 21552 */ + 0xa8, 0x54, 0x54, 0xcc, 0xa8, 0xcc, 0xcc, 0xc0, + 0x54, 0x44, 0x54, 0xa8, 0xa8, 0xcc, 0x54, 0x54, /* bytes 21552 - 21568 */ + 0x54, 0x54, 0x54, 0x54, 0x54, 0xcc, 0x40, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 21568 - 21584 */ + 0x54, 0xcc, 0x54, 0xc0, 0xc0, 0xc0, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21584 - 21600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21600 - 21616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21616 - 21632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21632 - 21648 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 21648 - 21664 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 21664 - 21680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, 0x54, /* bytes 21680 - 21696 */ + 0xc0, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0x44, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0xc0, /* bytes 21696 - 21712 */ + 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xc0, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21712 - 21728 */ + 0xcc, 0xfc, 0xcc, 0xa8, 0xcc, 0xfc, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21728 - 21744 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21744 - 21760 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, + 0x40, 0x44, 0x40, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 21760 - 21776 */ + 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0x00, 0x00, + 0x04, 0xa8, 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 21776 - 21792 */ + 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0x44, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 21792 - 21808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21808 - 21824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21824 - 21840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21840 - 21856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21856 - 21872 */ + 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 21872 - 21888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa8, 0xcc, /* bytes 21888 - 21904 */ + 0xcc, 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, + 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xc0, 0xc0, 0xcc, /* bytes 21904 - 21920 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 21920 - 21936 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 21936 - 21952 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, /* bytes 21952 - 21968 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, + 0xcc, 0xc0, 0x54, 0xcc, 0xa8, 0x54, 0x54, 0xcc, /* bytes 21968 - 21984 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0xcc, 0x04, 0x00, + 0x00, 0x00, 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xc0, /* bytes 21984 - 22000 */ + 0xcc, 0xcc, 0x54, 0x44, 0xc0, 0xc0, 0x54, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22000 - 22016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22016 - 22032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22032 - 22048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22048 - 22064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 22064 - 22080 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 22080 - 22096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, 0x54, /* bytes 22096 - 22112 */ + 0xcc, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x44, 0x54, + 0x44, 0x54, 0xc0, 0x54, 0x44, 0xc0, 0xc0, 0xfc, /* bytes 22112 - 22128 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22128 - 22144 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22144 - 22160 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22160 - 22176 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22176 - 22192 */ + 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x40, 0x54, 0xc0, 0xa8, /* bytes 22192 - 22208 */ + 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x40, 0x44, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22208 - 22224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22224 - 22240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22240 - 22256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22256 - 22272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22272 - 22288 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22288 - 22304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x54, 0xc0, /* bytes 22304 - 22320 */ + 0x54, 0xcc, 0x54, 0xc0, 0xc0, 0x44, 0xc0, 0xc0, + 0xc0, 0xc0, 0xcc, 0x44, 0xcc, 0x54, 0xa8, 0xa8, /* bytes 22320 - 22336 */ + 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, /* bytes 22336 - 22352 */ + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, /* bytes 22352 - 22368 */ + 0xa8, 0x54, 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, + 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 22368 - 22384 */ + 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 22384 - 22400 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, /* bytes 22400 - 22416 */ + 0xc0, 0xc0, 0xcc, 0xc0, 0xc0, 0x44, 0x44, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22416 - 22432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22432 - 22448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22448 - 22464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22464 - 22480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 22480 - 22496 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22496 - 22512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, 0x54, /* bytes 22512 - 22528 */ + 0x44, 0xa8, 0xc0, 0xa8, 0x44, 0x54, 0x44, 0xc0, + 0x44, 0x54, 0x44, 0x54, 0xcc, 0xfc, 0xcc, 0xa8, /* bytes 22528 - 22544 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, + 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22544 - 22560 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22560 - 22576 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0x54, 0x00, 0x54, 0xcc, 0xa8, 0xcc, 0x54, /* bytes 22576 - 22592 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x54, + 0x44, 0xa8, 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0x54, /* bytes 22592 - 22608 */ + 0x44, 0xa8, 0xcc, 0x54, 0x44, 0x54, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22608 - 22624 */ + 0x00, 0x54, 0x40, 0xcc, 0x44, 0xcc, 0x44, 0x44, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22624 - 22640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22640 - 22656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22656 - 22672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22672 - 22688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22688 - 22704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22704 - 22720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0xc0, /* bytes 22720 - 22736 */ + 0xcc, 0xc0, 0x54, 0xcc, 0x54, 0x40, 0x44, 0x44, + 0x44, 0x44, 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 22736 - 22752 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0xa8, 0xcc, /* bytes 22752 - 22768 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, + 0xa8, 0xa8, 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, /* bytes 22768 - 22784 */ + 0xa8, 0xa8, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0xa8, 0x00, 0x00, 0x00, 0x40, 0xcc, 0x54, 0xcc, /* bytes 22784 - 22800 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 22800 - 22816 */ + 0xcc, 0xcc, 0x54, 0xcc, 0xcc, 0x44, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22816 - 22832 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0xc0, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22832 - 22848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22848 - 22864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22864 - 22880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22880 - 22896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 22896 - 22912 */ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 22912 - 22928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x54, /* bytes 22928 - 22944 */ + 0x44, 0x54, 0xcc, 0xa8, 0xcc, 0x50, 0x00, 0x40, + 0x40, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22944 - 22960 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0x54, 0x44, 0xa8, + 0xc0, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22960 - 22976 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 22976 - 22992 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0x44, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0xa8, /* bytes 22992 - 23008 */ + 0xcc, 0xa8, 0x44, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0x54, 0x44, 0xa8, 0xc0, 0xa8, 0xc0, 0xa8, /* bytes 23008 - 23024 */ + 0xc0, 0x54, 0xc0, 0x54, 0xc0, 0x54, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23024 - 23040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23040 - 23056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23056 - 23072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23072 - 23088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23088 - 23104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23104 - 23120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23120 - 23136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xcc, 0x44, /* bytes 23136 - 23152 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xc0, 0xc0, + 0x54, 0xcc, 0xa8, 0x54, 0xa8, 0x54, 0x54, 0xcc, /* bytes 23152 - 23168 */ + 0xa8, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xcc, 0xc0, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0x54, /* bytes 23168 - 23184 */ + 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0x54, 0xa8, 0x54, + 0xa8, 0xcc, 0xa8, 0x54, 0xa8, 0xcc, 0xa8, 0x54, /* bytes 23184 - 23200 */ + 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xcc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23200 - 23216 */ + 0xc0, 0xcc, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, /* bytes 23216 - 23232 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23232 - 23248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23248 - 23264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23264 - 23280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23280 - 23296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23296 - 23312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, /* bytes 23312 - 23328 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23328 - 23344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x44, 0xc0, /* bytes 23344 - 23360 */ + 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 23360 - 23376 */ + 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0x44, 0x54, + 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xcc, 0xa8, /* bytes 23376 - 23392 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 23392 - 23408 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23408 - 23424 */ + 0x00, 0x54, 0x40, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x44, 0xa8, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 23424 - 23440 */ + 0x44, 0xa8, 0x44, 0x54, 0x44, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 23440 - 23456 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23456 - 23472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23472 - 23488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23488 - 23504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23504 - 23520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23520 - 23536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23536 - 23552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0xc0, /* bytes 23552 - 23568 */ + 0x54, 0xcc, 0xcc, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 23568 - 23584 */ + 0x54, 0x00, 0x50, 0xc0, 0xcc, 0xcc, 0x54, 0x44, + 0xc0, 0xc0, 0x54, 0xc0, 0xc0, 0xc0, 0x54, 0xcc, /* bytes 23584 - 23600 */ + 0x54, 0x54, 0xa8, 0xcc, 0xa8, 0xa8, 0xa8, 0xcc, + 0xa8, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 23600 - 23616 */ + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23616 - 23632 */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x54, 0xc0, + 0xcc, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0xc0, /* bytes 23632 - 23648 */ + 0xc0, 0xc0, 0xcc, 0xc0, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23648 - 23664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23664 - 23680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23680 - 23696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23696 - 23712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23712 - 23728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23728 - 23744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23744 - 23760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x44, 0xa8, /* bytes 23760 - 23776 */ + 0xc0, 0x54, 0x44, 0xa8, 0x44, 0xa8, 0x44, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 23776 - 23792 */ + 0x00, 0x00, 0x00, 0x50, 0x44, 0x54, 0x44, 0x54, + 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0xa8, /* bytes 23792 - 23808 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, /* bytes 23808 - 23824 */ + 0xcc, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23824 - 23840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x50, + 0xc0, 0x54, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 23840 - 23856 */ + 0x44, 0x54, 0x44, 0x54, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23856 - 23872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23872 - 23888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23888 - 23904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23904 - 23920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23920 - 23936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23936 - 23952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 23952 - 23968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0xc0, /* bytes 23968 - 23984 */ + 0xcc, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0xc0, 0x00, /* bytes 23984 - 24000 */ + 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0x54, 0xc0, + 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0xc0, /* bytes 24000 - 24016 */ + 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0xa8, 0x54, + 0xa8, 0xcc, 0xa8, 0x54, 0x54, 0xcc, 0x54, 0xcc, /* bytes 24016 - 24032 */ + 0x54, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24032 - 24048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x44, 0x44, 0xc0, 0xc0, 0xcc, 0xc0, 0xc0, 0xc0, /* bytes 24048 - 24064 */ + 0xc0, 0x44, 0xcc, 0xc0, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24064 - 24080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24080 - 24096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24096 - 24112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24112 - 24128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24128 - 24144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24144 - 24160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24160 - 24176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xc0, 0xcc, /* bytes 24176 - 24192 */ + 0xc0, 0xa8, 0xcc, 0x54, 0xcc, 0xa8, 0xcc, 0x54, + 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0x54, 0x00, 0x00, /* bytes 24192 - 24208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x44, 0xc0, + 0x40, 0x54, 0x44, 0xc0, 0x44, 0x54, 0x44, 0x44, /* bytes 24208 - 24224 */ + 0x40, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, /* bytes 24224 - 24240 */ + 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0x54, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24240 - 24256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x40, 0x40, 0xc0, 0x44, 0x54, 0x44, 0xc0, /* bytes 24256 - 24272 */ + 0x40, 0x54, 0x44, 0x44, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24272 - 24288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24288 - 24304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24304 - 24320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24320 - 24336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24336 - 24352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24352 - 24368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24368 - 24384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0xc0, /* bytes 24384 - 24400 */ + 0x54, 0x54, 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, + 0x54, 0x54, 0x54, 0xcc, 0x44, 0x00, 0x00, 0x00, /* bytes 24400 - 24416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x40, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xc0, 0x40, /* bytes 24416 - 24432 */ + 0x00, 0x44, 0xa8, 0xcc, 0x54, 0x54, 0xa8, 0xcc, + 0x54, 0x54, 0xa8, 0xcc, 0x54, 0x54, 0x54, 0xcc, /* bytes 24432 - 24448 */ + 0x54, 0x54, 0x54, 0xcc, 0xcc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24448 - 24464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0xc0, 0x44, /* bytes 24464 - 24480 */ + 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24480 - 24496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24496 - 24512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24512 - 24528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24528 - 24544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24544 - 24560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24560 - 24576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24576 - 24592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xc0, 0xa8, /* bytes 24592 - 24608 */ + 0xcc, 0x54, 0xc0, 0x54, 0xcc, 0x54, 0xc0, 0x54, + 0xc0, 0x54, 0xc0, 0x54, 0x00, 0x00, 0x00, 0x00, /* bytes 24608 - 24624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, + 0x40, 0x44, 0x40, 0xc0, 0x40, 0xc0, 0x00, 0x00, /* bytes 24624 - 24640 */ + 0x00, 0x00, 0x40, 0xa8, 0xcc, 0xa8, 0xcc, 0xa8, + 0xcc, 0xa8, 0xc0, 0xa8, 0xcc, 0xa8, 0xc0, 0xa8, /* bytes 24640 - 24656 */ + 0xc0, 0x54, 0xc0, 0xa8, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24656 - 24672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x40, 0xc0, /* bytes 24672 - 24688 */ + 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24688 - 24704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24704 - 24720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24720 - 24736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24736 - 24752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24752 - 24768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24768 - 24784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24784 - 24800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x54, 0xcc, /* bytes 24800 - 24816 */ + 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, 0x54, 0xcc, + 0xcc, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24816 - 24832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x40, 0x44, 0x40, 0x40, 0x00, 0x00, 0x00, /* bytes 24832 - 24848 */ + 0x00, 0x00, 0x00, 0xc0, 0xa8, 0xcc, 0x54, 0xcc, + 0x54, 0xcc, 0x54, 0x54, 0x54, 0xcc, 0x54, 0xcc, /* bytes 24848 - 24864 */ + 0x54, 0xcc, 0x54, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24864 - 24880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, /* bytes 24880 - 24896 */ + 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24896 - 24912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24912 - 24928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24928 - 24944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24944 - 24960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24960 - 24976 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 24976 - 24992 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 24992 - 25008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xcc, 0x54, /* bytes 25008 - 25024 */ + 0x44, 0x54, 0xc0, 0x54, 0x44, 0x54, 0xc0, 0x54, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25024 - 25040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x50, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, /* bytes 25040 - 25056 */ + 0x00, 0x00, 0x00, 0x00, 0x44, 0xa8, 0xcc, 0x54, + 0xc0, 0xa8, 0xcc, 0x54, 0xc0, 0xa8, 0xc0, 0x54, /* bytes 25056 - 25072 */ + 0x44, 0xa8, 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25072 - 25088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x40, /* bytes 25088 - 25104 */ + 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 25104 - 25120 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 25120 - 25136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25136 - 25152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25152 - 25168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25168 - 25184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25184 - 25200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25200 - 25216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x54, 0xc0, /* bytes 25216 - 25232 */ + 0xc0, 0xcc, 0x54, 0xc0, 0xcc, 0xcc, 0x54, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25232 - 25248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25248 - 25264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x54, 0xcc, + 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, 0x54, 0xc0, /* bytes 25264 - 25280 */ + 0xcc, 0xcc, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25280 - 25296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25296 - 25312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25312 - 25328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25328 - 25344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25344 - 25360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25360 - 25376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25376 - 25392 */ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 25392 - 25408 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25408 - 25424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x54, /* bytes 25424 - 25440 */ + 0x44, 0x54, 0x44, 0x54, 0xc0, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25440 - 25456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25456 - 25472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, 0xa8, + 0xc0, 0x54, 0xc0, 0xa8, 0xc0, 0x54, 0x44, 0x54, /* bytes 25472 - 25488 */ + 0xc0, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25488 - 25504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25504 - 25520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25520 - 25536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25536 - 25552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25552 - 25568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25568 - 25584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25584 - 25600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25600 - 25616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25616 - 25632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xc0, /* bytes 25632 - 25648 */ + 0xc0, 0xc0, 0xc0, 0x44, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25648 - 25664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25664 - 25680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, + 0xcc, 0xc0, 0xcc, 0xcc, 0x54, 0xcc, 0x54, 0xcc, /* bytes 25680 - 25696 */ + 0xcc, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25696 - 25712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25712 - 25728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25728 - 25744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25744 - 25760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25760 - 25776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25776 - 25792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25792 - 25808 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x10, /* bytes 25808 - 25824 */ + 0x00, 0x50, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25824 - 25840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, /* bytes 25840 - 25856 */ + 0x40, 0xcc, 0x40, 0x40, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25856 - 25872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25872 - 25888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x44, + 0x44, 0x54, 0xc0, 0x54, 0x44, 0xa8, 0xc0, 0x54, /* bytes 25888 - 25904 */ + 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25904 - 25920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 25920 - 25936 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 25936 - 25952 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 25952 - 25968 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25968 - 25984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 25984 - 26000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26000 - 26016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 26016 - 26032 */ + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26032 - 26048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, /* bytes 26048 - 26064 */ + 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26064 - 26080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26080 - 26096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0xc0, 0xcc, 0xc0, 0xcc, 0xcc, 0xcc, 0xc0, /* bytes 26096 - 26112 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26112 - 26128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26128 - 26144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26144 - 26160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26160 - 26176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26176 - 26192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26192 - 26208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26208 - 26224 */ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 26224 - 26240 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26240 - 26256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, /* bytes 26256 - 26272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26272 - 26288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26288 - 26304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x44, 0x54, 0x44, 0x54, 0x44, 0x54, /* bytes 26304 - 26320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26320 - 26336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* bytes 26336 - 26352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26352 - 26368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26368 - 26384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26384 - 26400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26400 - 26416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26416 - 26432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, /* bytes 26432 - 26448 */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26448 - 26464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26464 - 26480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26480 - 26496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26496 - 26512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x44, 0xc0, 0xc0, 0x44, 0xc0, 0x00, /* bytes 26512 - 26528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26528 - 26544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26544 - 26560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26560 - 26576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26576 - 26592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26592 - 26608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26608 - 26624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26624 - 26640 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x10, + 0x00, 0x50, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 26640 - 26656 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26656 - 26672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26672 - 26688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26688 - 26704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26704 - 26720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x40, 0x54, 0x00, 0x00, /* bytes 26720 - 26736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 26736 - 26752 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 26752 - 26768 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 26768 - 26784 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* bytes 26784 - 26800 */ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26800 - 26816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26816 - 26832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26832 - 26848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, /* bytes 26848 - 26864 */ + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26864 - 26880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26880 - 26896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26896 - 26912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26912 - 26928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00, /* bytes 26928 - 26944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26944 - 26960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26960 - 26976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26976 - 26992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 26992 - 27008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27008 - 27024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27024 - 27040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27040 - 27056 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, /* bytes 27056 - 27072 */ + 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27072 - 27088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27088 - 27104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27104 - 27120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27120 - 27136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27136 - 27152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27152 - 27168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27168 - 27184 */ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27184 - 27200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27200 - 27216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27216 - 27232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27232 - 27248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27248 - 27264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27264 - 27280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27280 - 27296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27296 - 27312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27312 - 27328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27328 - 27344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27344 - 27360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27360 - 27376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27376 - 27392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27392 - 27408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27408 - 27424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27424 - 27440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27440 - 27456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27456 - 27472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27472 - 27488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27488 - 27504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27504 - 27520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27520 - 27536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27536 - 27552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27552 - 27568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27568 - 27584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27584 - 27600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27600 - 27616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27616 - 27632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27632 - 27648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27648 - 27664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27664 - 27680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27680 - 27696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27696 - 27712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27712 - 27728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27728 - 27744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27744 - 27760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27760 - 27776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27776 - 27792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27792 - 27808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27808 - 27824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27824 - 27840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27840 - 27856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27856 - 27872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27872 - 27888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27888 - 27904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27904 - 27920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27920 - 27936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27936 - 27952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27952 - 27968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27968 - 27984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 27984 - 28000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28000 - 28016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28016 - 28032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28032 - 28048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28048 - 28064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28064 - 28080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28080 - 28096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28096 - 28112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28112 - 28128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28128 - 28144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28144 - 28160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28160 - 28176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28176 - 28192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28192 - 28208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28208 - 28224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28224 - 28240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28240 - 28256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28256 - 28272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28272 - 28288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28288 - 28304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28304 - 28320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28320 - 28336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28336 - 28352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28352 - 28368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28368 - 28384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28384 - 28400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28400 - 28416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28416 - 28432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28432 - 28448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28448 - 28464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28464 - 28480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28480 - 28496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28496 - 28512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28512 - 28528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28528 - 28544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28544 - 28560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28560 - 28576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28576 - 28592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28592 - 28608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28608 - 28624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28624 - 28640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28640 - 28656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28656 - 28672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28672 - 28688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28688 - 28704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28704 - 28720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28720 - 28736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28736 - 28752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28752 - 28768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28768 - 28784 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28784 - 28800 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28800 - 28816 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28816 - 28832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28832 - 28848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28848 - 28864 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28864 - 28880 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28880 - 28896 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28896 - 28912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28912 - 28928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28928 - 28944 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28944 - 28960 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28960 - 28976 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28976 - 28992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 28992 - 29008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29008 - 29024 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29024 - 29040 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29040 - 29056 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29056 - 29072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29072 - 29088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29088 - 29104 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29104 - 29120 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29120 - 29136 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29136 - 29152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29152 - 29168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29168 - 29184 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29184 - 29200 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29200 - 29216 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29216 - 29232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29232 - 29248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29248 - 29264 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29264 - 29280 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29280 - 29296 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29296 - 29312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29312 - 29328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29328 - 29344 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29344 - 29360 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29360 - 29376 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29376 - 29392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29392 - 29408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29408 - 29424 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29424 - 29440 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29440 - 29456 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29456 - 29472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29472 - 29488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29488 - 29504 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29504 - 29520 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29520 - 29536 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29536 - 29552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29552 - 29568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29568 - 29584 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29584 - 29600 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29600 - 29616 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29616 - 29632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29632 - 29648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29648 - 29664 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29664 - 29680 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29680 - 29696 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29696 - 29712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29712 - 29728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29728 - 29744 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29744 - 29760 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29760 - 29776 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29776 - 29792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29792 - 29808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29808 - 29824 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29824 - 29840 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29840 - 29856 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29856 - 29872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29872 - 29888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29888 - 29904 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29904 - 29920 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29920 - 29936 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29936 - 29952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29952 - 29968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29968 - 29984 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 29984 - 30000 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30000 - 30016 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30016 - 30032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30032 - 30048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30048 - 30064 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30064 - 30080 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30080 - 30096 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30096 - 30112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30112 - 30128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30128 - 30144 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30144 - 30160 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30160 - 30176 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30176 - 30192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30192 - 30208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30208 - 30224 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30224 - 30240 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30240 - 30256 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30256 - 30272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30272 - 30288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30288 - 30304 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30304 - 30320 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30320 - 30336 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30336 - 30352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30352 - 30368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30368 - 30384 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30384 - 30400 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30400 - 30416 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30416 - 30432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30432 - 30448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30448 - 30464 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30464 - 30480 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30480 - 30496 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30496 - 30512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30512 - 30528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30528 - 30544 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30544 - 30560 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30560 - 30576 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30576 - 30592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30592 - 30608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30608 - 30624 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30624 - 30640 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30640 - 30656 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30656 - 30672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30672 - 30688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30688 - 30704 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30704 - 30720 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30720 - 30736 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30736 - 30752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 30752 - 30768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; static const GBitmap s_flower_after_01_bitmap = { - .addr = (void*) &s_flower_after_01_pixels, - .row_size_bytes = 208, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 205, .h = 148 }, - }, + .addr = (void *)&s_flower_after_01_pixels, + .row_size_bytes = 208, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 205, .h = 148}, + }, }; diff --git a/src/fw/apps/demo/dialogs/dialogs_demo.c b/src/fw/apps/demo/dialogs/dialogs_demo.c index 763f997c4f..b160a55f7d 100644 --- a/src/fw/apps/demo/dialogs/dialogs_demo.c +++ b/src/fw/apps/demo/dialogs/dialogs_demo.c @@ -25,7 +25,6 @@ #include #include - typedef struct DialogsData { Window window; MenuLayer menu_layer; @@ -84,8 +83,7 @@ static void prv_show_confirm_dialog(DialogsData *data) { dialog_show_status_bar_layer(dialog, true); actionable_dialog_set_action_bar_type(actionable_dialog, DialogActionBarConfirm, NULL); - actionable_dialog_set_click_config_provider(actionable_dialog, - prv_confirm_config_provider); + actionable_dialog_set_click_config_provider(actionable_dialog, prv_confirm_config_provider); app_actionable_dialog_push(actionable_dialog); } @@ -108,8 +106,7 @@ static void prv_show_decline_dialog(DialogsData *data) { dialog_set_icon(dialog, data->resource_id_80); actionable_dialog_set_action_bar_type(actionable_dialog, DialogActionBarDecline, NULL); - actionable_dialog_set_click_config_provider(actionable_dialog, - prv_decline_config_provider); + actionable_dialog_set_click_config_provider(actionable_dialog, prv_decline_config_provider); app_actionable_dialog_push(actionable_dialog); } @@ -137,10 +134,10 @@ static void prv_show_custom_actionable_dialog(DialogsData *data) { // TODO destroy action bar / icon in unload callback ActionBarLayer *custom_action_bar = action_bar_layer_create(); action_bar_layer_set_icon(custom_action_bar, BUTTON_ID_UP, - gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_CHECK)); + gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_CHECK)); action_bar_layer_set_context(custom_action_bar, dialog); action_bar_layer_set_click_config_provider(custom_action_bar, - prv_custom_action_bar_config_provider); + prv_custom_action_bar_config_provider); actionable_dialog_set_action_bar_type(actionable_dialog, DialogActionBarCustom, custom_action_bar); @@ -165,8 +162,8 @@ static void prv_show_expandable_dialog(DialogsData *data) { dialog_set_icon(dialog, data->resource_id_25); dialog_show_status_bar_layer(dialog, true); - expandable_dialog_set_select_action(expandable_dialog, - RESOURCE_ID_ACTION_BAR_ICON_CHECK, prv_my_select_click_handler); + expandable_dialog_set_select_action(expandable_dialog, RESOURCE_ID_ACTION_BAR_ICON_CHECK, + prv_my_select_click_handler); app_expandable_dialog_push(expandable_dialog); } @@ -289,19 +286,55 @@ typedef struct DialogNode { } DialogNode; static const DialogNode nodes[] = { - { .label = "D1 - Confirm", .show = prv_show_confirm_dialog, }, - { .label = "D2 - Decline", .show = prv_show_decline_dialog, }, - { .label = "D3 - Actionable", .show = prv_show_custom_actionable_dialog, }, - { .label = "D4 - Expandable", .show = prv_show_expandable_dialog, }, - { .label = "D4 - Exp with header", .show = prv_show_expandable_dialog_header, }, - { .label = "D4 - Exp with long header", .show = prv_show_expandable_dialog_long_header, }, - { .label = "D5 - Simple Timeout", .show = prv_show_simple_dialog, }, - { .label = "D5 - Simple Vibe", .show = prv_show_simple_dialog_vibe, }, - { .label = "D6 - Exp no action bar", .show = prv_show_expandable_dialog_no_action_bar, }, - { .label = "D7 - Exp no icon", .show = prv_show_expandable_dialog_no_icon, }, - { .label = "D8 - Exp no scroll", .show = prv_show_expandable_dialog_no_scroll, }, - { .label = "D9 - Exp header only", .show = prv_show_expandable_dialog_header_no_icon }, - { .label = "D10 - Transcription", .show = prv_show_transcription_dialog, } + { + .label = "D1 - Confirm", + .show = prv_show_confirm_dialog, + }, + { + .label = "D2 - Decline", + .show = prv_show_decline_dialog, + }, + { + .label = "D3 - Actionable", + .show = prv_show_custom_actionable_dialog, + }, + { + .label = "D4 - Expandable", + .show = prv_show_expandable_dialog, + }, + { + .label = "D4 - Exp with header", + .show = prv_show_expandable_dialog_header, + }, + { + .label = "D4 - Exp with long header", + .show = prv_show_expandable_dialog_long_header, + }, + { + .label = "D5 - Simple Timeout", + .show = prv_show_simple_dialog, + }, + { + .label = "D5 - Simple Vibe", + .show = prv_show_simple_dialog_vibe, + }, + { + .label = "D6 - Exp no action bar", + .show = prv_show_expandable_dialog_no_action_bar, + }, + { + .label = "D7 - Exp no icon", + .show = prv_show_expandable_dialog_no_icon, + }, + { + .label = "D8 - Exp no scroll", + .show = prv_show_expandable_dialog_no_scroll, + }, + {.label = "D9 - Exp header only", .show = prv_show_expandable_dialog_header_no_icon}, + { + .label = "D10 - Transcription", + .show = prv_show_transcription_dialog, + } }; static const uint16_t NUM_ITEMS = ARRAY_LENGTH(nodes); @@ -309,13 +342,12 @@ static const uint16_t NUM_ITEMS = ARRAY_LENGTH(nodes); ////////////// // MenuLayer callbacks -static void prv_draw_row_callback(GContext* ctx, Layer *cell_layer, MenuIndex *cell_index, +static void prv_draw_row_callback(GContext *ctx, Layer *cell_layer, MenuIndex *cell_index, DialogsData *data) { menu_cell_basic_draw(ctx, cell_layer, nodes[cell_index->row].label, NULL, NULL); } -static void prv_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, - DialogsData *data) { +static void prv_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, DialogsData *data) { nodes[cell_index->row].show(data); } @@ -333,21 +365,25 @@ static void prv_window_load(Window *window) { MenuLayer *menu_layer = &data->menu_layer; menu_layer_init(menu_layer, &window->layer.bounds); - data->lorem_ipsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod " - "tempor incididunt ut labore et dolore magna aliqua. Utem ad happy."; - data->long_message = "Don't you see how great this is? You, you are a... Jesse look at me. " - "You... are a blowfish. A blowfish! Think about it. Small in stature, " - "not swift, not cunning. Easy prey for predators but the blowfish has a " - "secret weapon doesn't he. Doesn't he? What does the blowfish do, Jesse." - " What does the blowfish do? The blowfish puffs up, okay?"; + data->lorem_ipsum = + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod " + "tempor incididunt ut labore et dolore magna aliqua. Utem ad happy."; + data->long_message = + "Don't you see how great this is? You, you are a... Jesse look at me. " + "You... are a blowfish. A blowfish! Think about it. Small in stature, " + "not swift, not cunning. Easy prey for predators but the blowfish has a " + "secret weapon doesn't he. Doesn't he? What does the blowfish do, Jesse." + " What does the blowfish do? The blowfish puffs up, okay?"; data->resource_id_80 = RESOURCE_ID_GENERIC_CONFIRMATION_LARGE; data->resource_id_25 = RESOURCE_ID_GENERIC_CONFIRMATION_TINY; - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_num_rows = (MenuLayerGetNumberOfRowsInSectionsCallback) prv_get_num_rows_callback, - .draw_row = (MenuLayerDrawRowCallback) prv_draw_row_callback, - .select_click = (MenuLayerSelectCallback) prv_select_callback, - }); + menu_layer_set_callbacks( + menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_rows = (MenuLayerGetNumberOfRowsInSectionsCallback)prv_get_num_rows_callback, + .draw_row = (MenuLayerDrawRowCallback)prv_draw_row_callback, + .select_click = (MenuLayerSelectCallback)prv_select_callback, + }); menu_layer_set_click_config_onto_window(menu_layer, window); layer_add_child(&window->layer, menu_layer_get_layer(menu_layer)); } @@ -360,9 +396,9 @@ static void prv_handle_init(void) { Window *window = &data->window; window_init(window, WINDOW_NAME("Dialogs")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -383,15 +419,17 @@ static void s_main(void) { prv_handle_deinit(); } -const PebbleProcessMd* dialogs_demo_get_app_info() { +const PebbleProcessMd *dialogs_demo_get_app_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = s_main, - // UUID: ab470e5f-5ffd-46f2-9aa9-f48352ea5499 - .uuid = {0xab, 0x47, 0x0e, 0x5f, 0x5f, 0xfd, 0x46, 0xf2, - 0x9a, 0xa9, 0xf4, 0x83, 0x52, 0xea, 0x54, 0x99}, - }, - .name = "Dialogs", + .common = + { + .main_func = s_main, + // UUID: ab470e5f-5ffd-46f2-9aa9-f48352ea5499 + .uuid = + {0xab, 0x47, 0x0e, 0x5f, 0x5f, 0xfd, 0x46, 0xf2, 0x9a, 0xa9, 0xf4, 0x83, 0x52, + 0xea, 0x54, 0x99}, + }, + .name = "Dialogs", }; - return (const PebbleProcessMd*) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } diff --git a/src/fw/apps/demo/dialogs/dialogs_demo.h b/src/fw/apps/demo/dialogs/dialogs_demo.h index 2b7331e6db..03aa45e8fe 100644 --- a/src/fw/apps/demo/dialogs/dialogs_demo.h +++ b/src/fw/apps/demo/dialogs/dialogs_demo.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* dialogs_demo_get_app_info(); +const PebbleProcessMd *dialogs_demo_get_app_info(); diff --git a/src/fw/apps/demo/double_tap_test/double_tap_test.c b/src/fw/apps/demo/double_tap_test/double_tap_test.c index 05b5d57d49..f5ac82ebb7 100644 --- a/src/fw/apps/demo/double_tap_test/double_tap_test.c +++ b/src/fw/apps/demo/double_tap_test/double_tap_test.c @@ -37,7 +37,7 @@ static void prv_show_thumbsup(AppData *data) { static void prv_set_tap_text(AppData *data, uint32_t count, AccelAxisType axis) { char axes[] = {'X', 'Y', 'Z'}; - snprintf(data->text, sizeof(data->text), "Axis: %c\nDouble Taps: %6"PRIu32, axes[axis], count); + snprintf(data->text, sizeof(data->text), "Axis: %c\nDouble Taps: %6" PRIu32, axes[axis], count); text_layer_set_text(&data->text_layer, data->text); } @@ -67,14 +67,13 @@ static void prv_handle_tap(AccelAxisType axis, int32_t direction) { } static void prv_handle_init(void) { - AppData *data = (AppData*) app_malloc(sizeof(AppData)); + AppData *data = (AppData *)app_malloc(sizeof(AppData)); app_state_set_user_data(data); window_init(&data->window, WINDOW_NAME("Double Tap Test")); window_set_user_data(&data->window, data); - window_set_window_handlers(&data->window, &(WindowHandlers) { - .load = prv_window_load }); + window_set_window_handlers(&data->window, &(WindowHandlers){.load = prv_window_load}); const bool animated = true; app_window_stack_push(&data->window, animated); @@ -95,10 +94,10 @@ static void s_main(void) { prv_handle_deinit(); } -const PebbleProcessMd* double_tap_test_get_info() { +const PebbleProcessMd *double_tap_test_get_info() { static const PebbleProcessMdSystem s_accel_config_info = { - .common.main_func = s_main, - .name = "Double Tap Test" + .common.main_func = s_main, + .name = "Double Tap Test" }; - return (const PebbleProcessMd*) &s_accel_config_info; + return (const PebbleProcessMd *)&s_accel_config_info; } diff --git a/src/fw/apps/demo/double_tap_test/double_tap_test.h b/src/fw/apps/demo/double_tap_test/double_tap_test.h index 69b677c159..4ec1175601 100644 --- a/src/fw/apps/demo/double_tap_test/double_tap_test.h +++ b/src/fw/apps/demo/double_tap_test/double_tap_test.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* double_tap_test_get_info(); +const PebbleProcessMd *double_tap_test_get_info(); diff --git a/src/fw/apps/demo/event_service/event_service.c b/src/fw/apps/demo/event_service/event_service.c index eca5c31c53..62d27dabce 100644 --- a/src/fw/apps/demo/event_service/event_service.c +++ b/src/fw/apps/demo/event_service/event_service.c @@ -66,9 +66,7 @@ static void handle_init(void) { // subscribe to the accelerometer event stream accel_tap_service_subscribe(&handle_tap); - ConnectionHandlers conn_handlers = { - .pebble_app_connection_handler = handle_bt_connection - }; + ConnectionHandlers conn_handlers = {.pebble_app_connection_handler = handle_bt_connection}; connection_service_subscribe(conn_handlers); } @@ -81,10 +79,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* event_service_app_get_info() { +const PebbleProcessMd *event_service_app_get_info() { static const PebbleProcessMdSystem event_service_app_info = { - .common.main_func = &s_main, - .name = "Event Service App", + .common.main_func = &s_main, + .name = "Event Service App", }; - return (const PebbleProcessMd*) &event_service_app_info; + return (const PebbleProcessMd *)&event_service_app_info; } diff --git a/src/fw/apps/demo/event_service/event_service.h b/src/fw/apps/demo/event_service/event_service.h index eaf7e3af72..ac1f31faeb 100644 --- a/src/fw/apps/demo/event_service/event_service.h +++ b/src/fw/apps/demo/event_service/event_service.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* event_service_app_get_info(); +const PebbleProcessMd *event_service_app_get_info(); diff --git a/src/fw/apps/demo/exit/exit.c b/src/fw/apps/demo/exit/exit.c index 3abfcea9e6..40e699292d 100644 --- a/src/fw/apps/demo/exit/exit.c +++ b/src/fw/apps/demo/exit/exit.c @@ -6,20 +6,18 @@ // Verify that applications can actually call stdlib's exit(). static void s_exit_app_main(void) { - // Make visible in the debugger if we are running privileged. uint32_t value; - __asm volatile("mrs %0, control" : "=r" (value)); + __asm volatile("mrs %0, control" : "=r"(value)); volatile bool is_privileged = !(value & 0x1); APP_LOG(LOG_LEVEL_DEBUG, "Exit app is %sprivileged; now exiting", is_privileged ? "" : "not "); } const PebbleProcessMd *exit_app_get_app_info(void) { static const PebbleProcessMdSystem s_exit_app_info = { - .common.main_func = s_exit_app_main, - .common.is_unprivileged = true, - .name = "Exit Test" + .common.main_func = s_exit_app_main, + .common.is_unprivileged = true, + .name = "Exit Test" }; - return (const PebbleProcessMd*) &s_exit_app_info; + return (const PebbleProcessMd *)&s_exit_app_info; } - diff --git a/src/fw/apps/demo/flash_demo.c b/src/fw/apps/demo/flash_demo.c index b32684527e..41cf18b40b 100644 --- a/src/fw/apps/demo/flash_demo.c +++ b/src/fw/apps/demo/flash_demo.c @@ -17,33 +17,33 @@ static Window *window; static void test_write_short(void) { uint16_t buffer; - flash_read_bytes((uint8_t*) &buffer, BASE_ADDRESS, sizeof(buffer)); - PBL_LOG_DBG(">> Addr 0x%x is 0x%"PRIx16, BASE_ADDRESS, buffer); + flash_read_bytes((uint8_t *)&buffer, BASE_ADDRESS, sizeof(buffer)); + PBL_LOG_DBG(">> Addr 0x%x is 0x%" PRIx16, BASE_ADDRESS, buffer); buffer = 0x0505; - flash_write_bytes((uint8_t*) &buffer, BASE_ADDRESS, sizeof(buffer)); + flash_write_bytes((uint8_t *)&buffer, BASE_ADDRESS, sizeof(buffer)); PBL_LOG_DBG(">> Addr 0x%x Written to 0x%x", BASE_ADDRESS, buffer); uint8_t read_buffer = 0x0; - flash_read_bytes((uint8_t*) &read_buffer, BASE_ADDRESS, sizeof(read_buffer)); - PBL_LOG_DBG(">> Addr 0x%x is (8) 0x%"PRIx8, BASE_ADDRESS, read_buffer); + flash_read_bytes((uint8_t *)&read_buffer, BASE_ADDRESS, sizeof(read_buffer)); + PBL_LOG_DBG(">> Addr 0x%x is (8) 0x%" PRIx8, BASE_ADDRESS, read_buffer); buffer = 0x0; - flash_read_bytes((uint8_t*) &buffer, BASE_ADDRESS, sizeof(buffer)); - PBL_LOG_DBG(">> Addr 0x%x is (16) 0x%"PRIx16, BASE_ADDRESS, buffer); + flash_read_bytes((uint8_t *)&buffer, BASE_ADDRESS, sizeof(buffer)); + PBL_LOG_DBG(">> Addr 0x%x is (16) 0x%" PRIx16, BASE_ADDRESS, buffer); } static void test_write_bytes(void) { for (int i = 1; i < 127; ++i) { uint8_t data = i; - flash_write_bytes((uint8_t*) &data, BASE_ADDRESS + i, sizeof(data)); - PBL_LOG_DBG(">> Wrote Addr 0x%x is 0x%"PRIx8, i, data); + flash_write_bytes((uint8_t *)&data, BASE_ADDRESS + i, sizeof(data)); + PBL_LOG_DBG(">> Wrote Addr 0x%x is 0x%" PRIx8, i, data); } for (int i = 0; i < 128; ++i) { uint8_t data = 0; - flash_read_bytes((uint8_t*) &data, BASE_ADDRESS + i, sizeof(data)); - PBL_LOG_DBG(">> Read Addr 0x%x is (8) 0x%"PRIx8, i, data); + flash_read_bytes((uint8_t *)&data, BASE_ADDRESS + i, sizeof(data)); + PBL_LOG_DBG(">> Read Addr 0x%x is (8) 0x%" PRIx8, i, data); } } @@ -58,8 +58,8 @@ static void test_write_block(void) { for (int i = 0; i < 128; ++i) { uint8_t data = 0; - flash_read_bytes((uint8_t*) &data, BASE_ADDRESS + i, sizeof(data)); - PBL_LOG_DBG(">> Read Addr 0x%x is (8) 0x%"PRIx8, i, data); + flash_read_bytes((uint8_t *)&data, BASE_ADDRESS + i, sizeof(data)); + PBL_LOG_DBG(">> Read Addr 0x%x is (8) 0x%" PRIx8, i, data); } } @@ -87,12 +87,11 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* flash_demo_get_app_info(void) { +const PebbleProcessMd *flash_demo_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "Flash Demo" + .common.main_func = &s_main, + .name = "Flash Demo" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/demo/flash_demo.h b/src/fw/apps/demo/flash_demo.h index 9635c880f1..be0e3f22a5 100644 --- a/src/fw/apps/demo/flash_demo.h +++ b/src/fw/apps/demo/flash_demo.h @@ -5,5 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* flash_demo_get_app_info(void); - +const PebbleProcessMd *flash_demo_get_app_info(void); diff --git a/src/fw/apps/demo/flash_diagnostic/flash_diagnostic.c b/src/fw/apps/demo/flash_diagnostic/flash_diagnostic.c index b28d19de33..263e05a03d 100644 --- a/src/fw/apps/demo/flash_diagnostic/flash_diagnostic.c +++ b/src/fw/apps/demo/flash_diagnostic/flash_diagnostic.c @@ -37,21 +37,11 @@ struct Region { }; static struct Region s_flash_regions[] = { - { - "System Resources", - FLASH_REGION_SYSTEM_RESOURCES_BANK_0_BEGIN, - FLASH_REGION_SYSTEM_RESOURCES_BANK_0_END - }, - { - "System Resources", - FLASH_REGION_SYSTEM_RESOURCES_BANK_1_BEGIN, - FLASH_REGION_SYSTEM_RESOURCES_BANK_1_END - }, - { - "File System", - FLASH_REGION_FILESYSTEM_BEGIN, - FLASH_REGION_FILESYSTEM_END - }, + {"System Resources", FLASH_REGION_SYSTEM_RESOURCES_BANK_0_BEGIN, + FLASH_REGION_SYSTEM_RESOURCES_BANK_0_END}, + {"System Resources", FLASH_REGION_SYSTEM_RESOURCES_BANK_1_BEGIN, + FLASH_REGION_SYSTEM_RESOURCES_BANK_1_END}, + {"File System", FLASH_REGION_FILESYSTEM_BEGIN, FLASH_REGION_FILESYSTEM_END}, }; typedef struct { @@ -68,7 +58,6 @@ typedef struct { int stress_index; } FlashStressWindow; - static bool check_region_erased(struct Region region) { PBL_LOG_SYNC_INFO("Checking Erase ..."); bool success = true; @@ -87,14 +76,12 @@ static bool check_region_erased(struct Region region) { // region: region to check (and possibly write) // use_rand: write random values // perform_writes: perform writes if true, else see if the region reads as 0 -static bool check_region_write(struct Region region, bool use_rand, - bool perform_writes) { +static bool check_region_write(struct Region region, bool use_rand, bool perform_writes) { bool success = true; uint32_t write_rand = (use_rand && perform_writes) ? rand() : 0; - PBL_LOG_SYNC_INFO("%sChecking 0x%lx over 0x%lx 0x%lx", - (perform_writes) ? "Writing and " : "", write_rand, region.begin, - region.end); + PBL_LOG_SYNC_INFO("%sChecking 0x%lx over 0x%lx 0x%lx", (perform_writes) ? "Writing and " : "", + write_rand, region.begin, region.end); for (uint32_t i = region.begin; i < region.end; i += sizeof(uint32_t)) { uint32_t write = write_rand; @@ -104,8 +91,7 @@ static bool check_region_write(struct Region region, bool use_rand, } flash_read_bytes((uint8_t *)&read, i, sizeof(read)); if (read != write) { - PBL_LOG_SYNC_INFO(">>>> Address 0x%lx failed to write: 0x%lx 0x%lx", - i, read, write); + PBL_LOG_SYNC_INFO(">>>> Address 0x%lx failed to write: 0x%lx 0x%lx", i, read, write); success = false; } } @@ -129,7 +115,6 @@ static bool check_subsector_bitflip(struct Region region) { const uint32_t subsector_size = 4 * 1024; for (uint32_t i = region.begin; i < region.end; i += block_size) { - struct Region write_region; write_region.begin = i; write_region.end = i + write_size; @@ -140,10 +125,9 @@ static bool check_subsector_bitflip(struct Region region) { } uint32_t subsec_begin = block_size - write_size; - PBL_ASSERTN((subsec_begin % (32*1024)) == 0); + PBL_ASSERTN((subsec_begin % (32 * 1024)) == 0); - for (uint32_t subsec = subsec_begin; subsec < block_size; - subsec += subsector_size) { + for (uint32_t subsec = subsec_begin; subsec < block_size; subsec += subsector_size) { uint32_t erase = subsec + i; PBL_ASSERTN((erase % (4 * 1024)) == 0); PBL_LOG_SYNC_INFO("Subsector Erase of 0x%lx", erase); @@ -176,8 +160,7 @@ static bool abort_stress_test; static void update_text(int iter, int tot, bool failed) { static char status[50]; - snprintf(status, sizeof(status), "%d / %d %s", iter, tot, - failed ? "Failed Out" : "Complete"); + snprintf(status, sizeof(status), "%d / %d %s", iter, tot, failed ? "Failed Out" : "Complete"); text_layer_set_text(stress_data.text_layer, (char *)status); } @@ -202,8 +185,8 @@ static void app_timer_cb(void *data) { update_text(++stress_data.stress_iteration, num_stress_iters, failed); if (!failed && (stress_data.stress_iteration < num_stress_iters)) { - app_timer_register(1000, app_timer_cb, NULL); // allow for animation to complete - } else { // clean up state + app_timer_register(1000, app_timer_cb, NULL); // allow for animation to complete + } else { // clean up state flash_region_erase_optimal_range(region.begin, region.begin, region.end, region.end); } } @@ -233,27 +216,26 @@ static void file_system_stress_callback(int index, void *data) { stress_data.stress_index = index; window_init(&stress_data.window, WINDOW_NAME("Stress Test")); window_set_user_data(&stress_data.window, &stress_data); - window_set_window_handlers(&stress_data.window, &(WindowHandlers) { - .load = stress_window_load, - .unload = stress_window_unload - }); + window_set_window_handlers( + &stress_data.window, + &(WindowHandlers){.load = stress_window_load, .unload = stress_window_unload}); app_window_stack_push(&stress_data.window, true); } static void populate_menu(SimpleMenuSection *menu_section, SimpleMenuItem *menu_items) { for (unsigned int i = 0; i < NUM_REGIONS; ++i) { - menu_items[i] = (SimpleMenuItem) { - .title = s_flash_regions[i].name, - .callback = menu_select_callback, + menu_items[i] = (SimpleMenuItem){ + .title = s_flash_regions[i].name, + .callback = menu_select_callback, }; } - menu_items[FILE_WRITE_STRESS] = (SimpleMenuItem) { - .title = "File Stress", - .callback = file_system_stress_callback, + menu_items[FILE_WRITE_STRESS] = (SimpleMenuItem){ + .title = "File Stress", + .callback = file_system_stress_callback, }; - menu_items[FILE_SUBSECTOR_STRESS] = (SimpleMenuItem) { - .title = "Subsector Stress", - .callback = file_system_stress_callback, + menu_items[FILE_SUBSECTOR_STRESS] = (SimpleMenuItem){ + .title = "Subsector Stress", + .callback = file_system_stress_callback, }; menu_section->num_items = NUM_MENU_ITEMS; @@ -274,9 +256,9 @@ static void push_window(FlashDiagAppData *data) { Window *window = &data->window; window_init(window, WINDOW_NAME("Flash Diagnostic")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -284,7 +266,7 @@ static void push_window(FlashDiagAppData *data) { //////////////////// // App boilerplate static void handle_init(void) { - FlashDiagAppData *data = (FlashDiagAppData*) app_malloc_check(sizeof(FlashDiagAppData)); + FlashDiagAppData *data = (FlashDiagAppData *)app_malloc_check(sizeof(FlashDiagAppData)); if (data == NULL) { PBL_CROAK("Out of memory"); } @@ -299,8 +281,7 @@ static void handle_deinit(void) { } static void s_main(void) { - if (resource_storage_flash_get_unused_bank()->begin == - s_flash_regions[0].begin) { + if (resource_storage_flash_get_unused_bank()->begin == s_flash_regions[0].begin) { s_flash_regions[0].name = "Unused Resources"; } else { s_flash_regions[1].name = "Unused Resources"; @@ -313,10 +294,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* flash_diagnostic_app_get_info() { +const PebbleProcessMd *flash_diagnostic_app_get_info() { static const PebbleProcessMdSystem s_flash_diagnostic_app_info = { - .common.main_func = s_main, - .name = "Flash Diagnostic" + .common.main_func = s_main, + .name = "Flash Diagnostic" }; - return (const PebbleProcessMd*) &s_flash_diagnostic_app_info; + return (const PebbleProcessMd *)&s_flash_diagnostic_app_info; } diff --git a/src/fw/apps/demo/flash_diagnostic/flash_diagnostic.h b/src/fw/apps/demo/flash_diagnostic/flash_diagnostic.h index 9f2661db88..1ea5227247 100644 --- a/src/fw/apps/demo/flash_diagnostic/flash_diagnostic.h +++ b/src/fw/apps/demo/flash_diagnostic/flash_diagnostic.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* flash_diagnostic_app_get_info(); +const PebbleProcessMd *flash_diagnostic_app_get_info(); diff --git a/src/fw/apps/demo/flash_prof/flash_prof.c b/src/fw/apps/demo/flash_prof/flash_prof.c index 289234cd91..c630276cae 100644 --- a/src/fw/apps/demo/flash_prof/flash_prof.c +++ b/src/fw/apps/demo/flash_prof/flash_prof.c @@ -40,9 +40,11 @@ static void do_timed_read(NumberWindow *nw, void *data) { #define NUM_BYTES 1000 static void handle_init(void) { - number_window_init(&number_window, "Num Writes", (NumberWindowCallbacks) { - .selected = (NumberWindowCallback) do_timed_read, - }, NULL); + number_window_init(&number_window, "Num Writes", + (NumberWindowCallbacks){ + .selected = (NumberWindowCallback)do_timed_read, + }, + NULL); number_window_set_min(&number_window, 1000); number_window_set_max(&number_window, 1000000); number_window_set_step_size(&number_window, 1000); @@ -50,7 +52,6 @@ static void handle_init(void) { } static void handle_deinit(void) { - } static void s_main(void) { @@ -59,11 +60,11 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* flash_prof_get_app_info() { +const PebbleProcessMd *flash_prof_get_app_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "Flash Prof" + .common.main_func = &s_main, + .name = "Flash Prof" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/flash_prof/flash_prof.h b/src/fw/apps/demo/flash_prof/flash_prof.h index 891cbf8f4b..28c9ffb351 100644 --- a/src/fw/apps/demo/flash_prof/flash_prof.h +++ b/src/fw/apps/demo/flash_prof/flash_prof.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* flash_prof_get_app_info(); +const PebbleProcessMd *flash_prof_get_app_info(); diff --git a/src/fw/apps/demo/font_test/font_test.c b/src/fw/apps/demo/font_test/font_test.c index 3cf6e29a29..9313c8c1dc 100644 --- a/src/fw/apps/demo/font_test/font_test.c +++ b/src/fw/apps/demo/font_test/font_test.c @@ -13,7 +13,7 @@ #include "pbl/util/size.h" #define FIRST_GLYPH 0x20 // space -#define LAST_GLYPH 0x7E // tilde +#define LAST_GLYPH 0x7E // tilde typedef struct { const char *key; @@ -21,15 +21,15 @@ typedef struct { } FontEntry; static const FontEntry s_fonts[] = { - { FONT_KEY_LECO_20_BOLD_NUMBERS, "LECO_20_BOLD" }, - { FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, "LECO_26_BOLD" }, - { FONT_KEY_LECO_28_LIGHT_NUMBERS, "LECO_28_LIGHT" }, - { FONT_KEY_LECO_32_BOLD_NUMBERS, "LECO_32_BOLD" }, - { FONT_KEY_LECO_36_BOLD_NUMBERS, "LECO_36_BOLD" }, - { FONT_KEY_LECO_38_BOLD_NUMBERS, "LECO_38_BOLD" }, - { FONT_KEY_LECO_42_NUMBERS, "LECO_42" }, - { FONT_KEY_LECO_60_NUMBERS_AM_PM, "LECO_60" }, - { FONT_KEY_LECO_60_BOLD_NUMBERS_AM_PM, "LECO_60_BOLD" }, + {FONT_KEY_LECO_20_BOLD_NUMBERS, "LECO_20_BOLD"}, + {FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, "LECO_26_BOLD"}, + {FONT_KEY_LECO_28_LIGHT_NUMBERS, "LECO_28_LIGHT"}, + {FONT_KEY_LECO_32_BOLD_NUMBERS, "LECO_32_BOLD"}, + {FONT_KEY_LECO_36_BOLD_NUMBERS, "LECO_36_BOLD"}, + {FONT_KEY_LECO_38_BOLD_NUMBERS, "LECO_38_BOLD"}, + {FONT_KEY_LECO_42_NUMBERS, "LECO_42"}, + {FONT_KEY_LECO_60_NUMBERS_AM_PM, "LECO_60"}, + {FONT_KEY_LECO_60_BOLD_NUMBERS_AM_PM, "LECO_60_BOLD"}, }; typedef struct { @@ -46,16 +46,14 @@ typedef struct { } AppState; static void prv_refresh(AppState *data) { - sniprintf(data->header_buf, sizeof(data->header_buf), "%u/%u %s", - data->font_index + 1, (unsigned int)ARRAY_LENGTH(s_fonts), - s_fonts[data->font_index].label); - sniprintf(data->info_buf, sizeof(data->info_buf), "U+%04X '%c'", - data->codepoint, data->codepoint); + sniprintf(data->header_buf, sizeof(data->header_buf), "%u/%u %s", data->font_index + 1, + (unsigned int)ARRAY_LENGTH(s_fonts), s_fonts[data->font_index].label); + sniprintf(data->info_buf, sizeof(data->info_buf), "U+%04X '%c'", data->codepoint, + data->codepoint); data->glyph_buf[0] = (char)data->codepoint; data->glyph_buf[1] = '\0'; - text_layer_set_font(&data->glyph_layer, - fonts_get_system_font(s_fonts[data->font_index].key)); + text_layer_set_font(&data->glyph_layer, fonts_get_system_font(s_fonts[data->font_index].key)); layer_mark_dirty(&data->header_layer.layer); layer_mark_dirty(&data->info_layer.layer); @@ -66,13 +64,11 @@ static void prv_click_handler(ClickRecognizerRef recognizer, void *context) { AppState *data = context; ButtonId button = click_recognizer_get_button_id(recognizer); if (button == BUTTON_ID_UP) { - data->codepoint = (data->codepoint == FIRST_GLYPH) - ? LAST_GLYPH - : (uint8_t)(data->codepoint - 1); + data->codepoint = + (data->codepoint == FIRST_GLYPH) ? LAST_GLYPH : (uint8_t)(data->codepoint - 1); } else if (button == BUTTON_ID_DOWN) { - data->codepoint = (data->codepoint == LAST_GLYPH) - ? FIRST_GLYPH - : (uint8_t)(data->codepoint + 1); + data->codepoint = + (data->codepoint == LAST_GLYPH) ? FIRST_GLYPH : (uint8_t)(data->codepoint + 1); } else if (button == BUTTON_ID_SELECT) { data->font_index = (data->font_index + 1) % ARRAY_LENGTH(s_fonts); } @@ -109,8 +105,7 @@ static void prv_window_load(Window *window) { // Big glyph fills the rest of the screen. const int16_t glyph_y = 44; - text_layer_init(&data->glyph_layer, - &GRect(0, glyph_y, bounds.size.w, bounds.size.h - glyph_y)); + text_layer_init(&data->glyph_layer, &GRect(0, glyph_y, bounds.size.w, bounds.size.h - glyph_y)); text_layer_set_background_color(&data->glyph_layer, GColorWhite); text_layer_set_text_color(&data->glyph_layer, GColorBlack); text_layer_set_text_alignment(&data->glyph_layer, GTextAlignmentCenter); @@ -127,8 +122,8 @@ static void prv_push_window(AppState *data) { window_set_background_color(window, GColorWhite); window_set_click_config_provider_with_context(window, prv_config_provider, data); window_set_window_handlers(window, &(WindowHandlers){ - .load = prv_window_load, - }); + .load = prv_window_load, + }); app_window_stack_push(window, true); } @@ -153,8 +148,8 @@ static void prv_main(void) { const PebbleProcessMd *font_test_app_get_info(void) { static const PebbleProcessMdSystem s_info = { - .common.main_func = &prv_main, - .name = "Font Test", + .common.main_func = &prv_main, + .name = "Font Test", }; return (const PebbleProcessMd *)&s_info; } diff --git a/src/fw/apps/demo/fps_test.c b/src/fw/apps/demo/fps_test.c index a064391efb..eefff22c07 100644 --- a/src/fw/apps/demo/fps_test.c +++ b/src/fw/apps/demo/fps_test.c @@ -83,8 +83,8 @@ static void prv_pop_all_windows_cb(void *cb_data) { PBL_LOG_INFO("## %d frames rendered", (int)data->rendered_frames); if (time_rendered) { - int frame_period = time_rendered/(int64_t)data->rendered_frames; - int fps = (int64_t)data->rendered_frames*1000/time_rendered; + int frame_period = time_rendered / (int64_t)data->rendered_frames; + int fps = (int64_t)data->rendered_frames * 1000 / time_rendered; PBL_LOG_INFO("## at %d FPS (%d ms/frame)", fps, frame_period); } @@ -92,21 +92,16 @@ static void prv_pop_all_windows_cb(void *cb_data) { } static const char *prv_row_texts[] = { - "Row 1", - "Row 2", - "Row 3", - "Row 4", - "Row 5", - "Row 6", + "Row 1", "Row 2", "Row 3", "Row 4", "Row 5", "Row 6", }; static uint16_t prv_get_num_rows(struct MenuLayer *menu_layer, uint16_t section_index, - void *callback_context) { + void *callback_context) { return ARRAY_LENGTH(prv_row_texts); } -static void prv_draw_row(GContext* ctx, const Layer *cell_layer, char const *title, - int16_t offset) { +static void prv_draw_row(GContext *ctx, const Layer *cell_layer, char const *title, + int16_t offset) { // mostly copied from menu_cell_basic_draw_with_value // (that unfortunately doesn't respect bounds.origin.x) const int16_t title_height = 24; @@ -119,25 +114,25 @@ static void prv_draw_row(GContext* ctx, const Layer *cell_layer, char const *tit const GFont title_font = fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD); if (title) { graphics_context_set_text_color_2bit(ctx, GColor2White); - graphics_draw_text(ctx, title, title_font, box, - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, title, title_font, box, GTextOverflowModeFill, GTextAlignmentLeft, + NULL); } } -void prv_draw_row_1(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, - void *callback_context) { +void prv_draw_row_1(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *callback_context) { const char *title = prv_row_texts[cell_index->row]; - prv_draw_row(ctx, cell_layer, title, -cell_layer->frame.origin.y/4); + prv_draw_row(ctx, cell_layer, title, -cell_layer->frame.origin.y / 4); } -static void prv_draw_row_2(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, - void *callback_context) { +static void prv_draw_row_2(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *callback_context) { const char *title = prv_row_texts[cell_index->row]; - prv_draw_row(ctx, cell_layer, title, -cell_layer->frame.origin.y/4 + cell_layer->bounds.size.w); + prv_draw_row(ctx, cell_layer, title, -cell_layer->frame.origin.y / 4 + cell_layer->bounds.size.w); } static int16_t prv_get_separator_height(struct MenuLayer *menu_layer, MenuIndex *cell_index, - void *callback_context) { + void *callback_context) { return 0; } @@ -194,22 +189,24 @@ static void prv_window_load(Window *window) { const GRect menu_layer_rect = GRect(navbar_width, 0, full_rect->size.w - navbar_width, full_rect->size.h); menu_layer_init(&data->action_list1, &menu_layer_rect); - menu_layer_set_callbacks(&data->action_list1, NULL, &(MenuLayerCallbacks){ - .get_num_rows = prv_get_num_rows, - .draw_row = prv_draw_row_1, - .get_separator_height = prv_get_separator_height, - }); + menu_layer_set_callbacks(&data->action_list1, NULL, + &(MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows, + .draw_row = prv_draw_row_1, + .get_separator_height = prv_get_separator_height, + }); layer_set_hidden(&data->action_list1.inverter.layer, true); scroll_layer_set_shadow_hidden(&data->action_list1.scroll_layer, true); layer_add_child(&window->layer, menu_layer_get_layer(&data->action_list1)); menu_layer_init(&data->action_list2, &menu_layer_rect); - menu_layer_set_callbacks(&data->action_list2, NULL, &(MenuLayerCallbacks){ - .get_num_rows = prv_get_num_rows, - .draw_row = prv_draw_row_2, - .get_separator_height = prv_get_separator_height, - }); + menu_layer_set_callbacks(&data->action_list2, NULL, + &(MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows, + .draw_row = prv_draw_row_2, + .get_separator_height = prv_get_separator_height, + }); scroll_layer_set_shadow_hidden(&data->action_list2.scroll_layer, true); data->prv_orig_content_offset_changed = data->action_list2.scroll_layer.callbacks.content_offset_changed_handler; @@ -240,11 +237,11 @@ static void s_main(void) { window_set_user_data(window, data); window_set_fullscreen(window, true); layer_set_update_proc(&window->layer, prv_window_update_proc); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - .disappear = prv_window_disappear, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + .disappear = prv_window_disappear, + }); app_window_stack_push(window, true); @@ -253,10 +250,7 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* fps_test_get_app_info(void) { - static const PebbleProcessMdSystem s_app_info = { - .common.main_func = s_main, - .name = "FPS Test" - }; - return (const PebbleProcessMd*) &s_app_info; +const PebbleProcessMd *fps_test_get_app_info(void) { + static const PebbleProcessMdSystem s_app_info = {.common.main_func = s_main, .name = "FPS Test"}; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/fps_test.h b/src/fw/apps/demo/fps_test.h index 6ecff5e82a..07b42dd7cb 100644 --- a/src/fw/apps/demo/fps_test.h +++ b/src/fw/apps/demo/fps_test.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* fps_test_get_app_info(void); +const PebbleProcessMd *fps_test_get_app_info(void); diff --git a/src/fw/apps/demo/fps_test_bitmaps.h b/src/fw/apps/demo/fps_test_bitmaps.h index cdf5d35f3c..1d5c4f885d 100644 --- a/src/fw/apps/demo/fps_test_bitmaps.h +++ b/src/fw/apps/demo/fps_test_bitmaps.h @@ -11,1880 +11,3700 @@ // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_fps_background_pixels[] = { - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 0 - 16 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16 - 32 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 32 - 48 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 48 - 64 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 64 - 80 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 80 - 96 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 96 - 112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 112 - 128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 128 - 144 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 144 - 160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 160 - 176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 176 - 192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 192 - 208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 208 - 224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 224 - 240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 240 - 256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 256 - 272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 272 - 288 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 288 - 304 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 304 - 320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 320 - 336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 336 - 352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 352 - 368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 368 - 384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 384 - 400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 400 - 416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 416 - 432 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 432 - 448 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 448 - 464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 464 - 480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 480 - 496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 496 - 512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 512 - 528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 528 - 544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 544 - 560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 560 - 576 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 576 - 592 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 592 - 608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 608 - 624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 624 - 640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 640 - 656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 656 - 672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 672 - 688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 688 - 704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 704 - 720 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 720 - 736 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 736 - 752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 752 - 768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 768 - 784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 784 - 800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 800 - 816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 816 - 832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 832 - 848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 848 - 864 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 864 - 880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 880 - 896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 896 - 912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 912 - 928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 928 - 944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 944 - 960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 960 - 976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 976 - 992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 992 - 1008 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1008 - 1024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1024 - 1040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1040 - 1056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1056 - 1072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1072 - 1088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1088 - 1104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1104 - 1120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1120 - 1136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1136 - 1152 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1152 - 1168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1168 - 1184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1184 - 1200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1200 - 1216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1216 - 1232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1232 - 1248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1248 - 1264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1264 - 1280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1280 - 1296 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1296 - 1312 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1312 - 1328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1328 - 1344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1344 - 1360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1360 - 1376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1376 - 1392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1392 - 1408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1408 - 1424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1424 - 1440 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1440 - 1456 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1456 - 1472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1472 - 1488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1488 - 1504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1504 - 1520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1520 - 1536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1536 - 1552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1552 - 1568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1568 - 1584 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1584 - 1600 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1600 - 1616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1616 - 1632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1632 - 1648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1648 - 1664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1664 - 1680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1680 - 1696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1696 - 1712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1712 - 1728 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1728 - 1744 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1744 - 1760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1760 - 1776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1776 - 1792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1792 - 1808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1808 - 1824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1824 - 1840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1840 - 1856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1856 - 1872 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1872 - 1888 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1888 - 1904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1904 - 1920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1920 - 1936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1936 - 1952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1952 - 1968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1968 - 1984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1984 - 2000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2000 - 2016 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2016 - 2032 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2032 - 2048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2048 - 2064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2064 - 2080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2080 - 2096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2096 - 2112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2112 - 2128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2128 - 2144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2144 - 2160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2160 - 2176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2176 - 2192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2192 - 2208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2208 - 2224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2224 - 2240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2240 - 2256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2256 - 2272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2272 - 2288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2288 - 2304 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2304 - 2320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2320 - 2336 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2336 - 2352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2352 - 2368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2368 - 2384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2384 - 2400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2400 - 2416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2416 - 2432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2432 - 2448 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2448 - 2464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2464 - 2480 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2480 - 2496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2496 - 2512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2512 - 2528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2528 - 2544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2544 - 2560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2560 - 2576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2576 - 2592 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2592 - 2608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2608 - 2624 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2624 - 2640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2640 - 2656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2656 - 2672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2672 - 2688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2688 - 2704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2704 - 2720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2720 - 2736 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2736 - 2752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2752 - 2768 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2768 - 2784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2784 - 2800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2800 - 2816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2816 - 2832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2832 - 2848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2848 - 2864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2864 - 2880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2880 - 2896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2896 - 2912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2912 - 2928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2928 - 2944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2944 - 2960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2960 - 2976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2976 - 2992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2992 - 3008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3008 - 3024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3024 - 3040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3040 - 3056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3056 - 3072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3072 - 3088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3088 - 3104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3104 - 3120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3120 - 3136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3136 - 3152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3152 - 3168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3168 - 3184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3184 - 3200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3200 - 3216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3216 - 3232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3232 - 3248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3248 - 3264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3264 - 3280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3280 - 3296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3296 - 3312 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3312 - 3328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3328 - 3344 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3344 - 3360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3360 - 3376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3376 - 3392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3392 - 3408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3408 - 3424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3424 - 3440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3440 - 3456 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3456 - 3472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3472 - 3488 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3488 - 3504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3504 - 3520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3520 - 3536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3536 - 3552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3552 - 3568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3568 - 3584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3584 - 3600 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3600 - 3616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3616 - 3632 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3632 - 3648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3648 - 3664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3664 - 3680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3680 - 3696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3696 - 3712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3712 - 3728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3728 - 3744 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3744 - 3760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3760 - 3776 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3776 - 3792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3792 - 3808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3808 - 3824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3824 - 3840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3840 - 3856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3856 - 3872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3872 - 3888 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3888 - 3904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3904 - 3920 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3920 - 3936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3936 - 3952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3952 - 3968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3968 - 3984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3984 - 4000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4000 - 4016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4016 - 4032 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4032 - 4048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4048 - 4064 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4064 - 4080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4080 - 4096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4096 - 4112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4112 - 4128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4128 - 4144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4144 - 4160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4160 - 4176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4176 - 4192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4192 - 4208 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4208 - 4224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4224 - 4240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4240 - 4256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4256 - 4272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4272 - 4288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4288 - 4304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4304 - 4320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4320 - 4336 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4336 - 4352 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4352 - 4368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4368 - 4384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4384 - 4400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4400 - 4416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4416 - 4432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4432 - 4448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4448 - 4464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4464 - 4480 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4480 - 4496 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4496 - 4512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4512 - 4528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4528 - 4544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4544 - 4560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4560 - 4576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4576 - 4592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4592 - 4608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4608 - 4624 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4624 - 4640 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4640 - 4656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4656 - 4672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4672 - 4688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4688 - 4704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4704 - 4720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4720 - 4736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4736 - 4752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4752 - 4768 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4768 - 4784 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4784 - 4800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4800 - 4816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4816 - 4832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4832 - 4848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4848 - 4864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4864 - 4880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4880 - 4896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4896 - 4912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4912 - 4928 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4928 - 4944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4944 - 4960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4960 - 4976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4976 - 4992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4992 - 5008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5008 - 5024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5024 - 5040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5040 - 5056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5056 - 5072 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5072 - 5088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5088 - 5104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5104 - 5120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5120 - 5136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5136 - 5152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5152 - 5168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5168 - 5184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5184 - 5200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5200 - 5216 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5216 - 5232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5232 - 5248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5248 - 5264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5264 - 5280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5280 - 5296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5296 - 5312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5312 - 5328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5328 - 5344 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5344 - 5360 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5360 - 5376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5376 - 5392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5392 - 5408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5408 - 5424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5424 - 5440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5440 - 5456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5456 - 5472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5472 - 5488 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5488 - 5504 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5504 - 5520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5520 - 5536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5536 - 5552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5552 - 5568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5568 - 5584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5584 - 5600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5600 - 5616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5616 - 5632 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5632 - 5648 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5648 - 5664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5664 - 5680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5680 - 5696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5696 - 5712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5712 - 5728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5728 - 5744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5744 - 5760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5760 - 5776 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5776 - 5792 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5792 - 5808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5808 - 5824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5824 - 5840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5840 - 5856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5856 - 5872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5872 - 5888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5888 - 5904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5904 - 5920 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5920 - 5936 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5936 - 5952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5952 - 5968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5968 - 5984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5984 - 6000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6000 - 6016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6016 - 6032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6032 - 6048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6048 - 6064 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6064 - 6080 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6080 - 6096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6096 - 6112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6112 - 6128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6128 - 6144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6144 - 6160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6160 - 6176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6176 - 6192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6192 - 6208 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6208 - 6224 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6224 - 6240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6240 - 6256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6256 - 6272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6272 - 6288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6288 - 6304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6304 - 6320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6320 - 6336 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6336 - 6352 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6352 - 6368 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6368 - 6384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6384 - 6400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6400 - 6416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6416 - 6432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6432 - 6448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6448 - 6464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6464 - 6480 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6480 - 6496 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6496 - 6512 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6512 - 6528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6528 - 6544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6544 - 6560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6560 - 6576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6576 - 6592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6592 - 6608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6608 - 6624 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6624 - 6640 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6640 - 6656 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6656 - 6672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6672 - 6688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6688 - 6704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6704 - 6720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6720 - 6736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6736 - 6752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6752 - 6768 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6768 - 6784 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6784 - 6800 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6800 - 6816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6816 - 6832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6832 - 6848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6848 - 6864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6864 - 6880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6880 - 6896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6896 - 6912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6912 - 6928 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6928 - 6944 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6944 - 6960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6960 - 6976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6976 - 6992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6992 - 7008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7008 - 7024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7024 - 7040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7040 - 7056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7056 - 7072 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7072 - 7088 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7088 - 7104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7104 - 7120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7120 - 7136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7136 - 7152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7152 - 7168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7168 - 7184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7184 - 7200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7200 - 7216 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7216 - 7232 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7232 - 7248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7248 - 7264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7264 - 7280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7280 - 7296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7296 - 7312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7312 - 7328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7328 - 7344 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7344 - 7360 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7360 - 7376 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7376 - 7392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7392 - 7408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7408 - 7424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7424 - 7440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7440 - 7456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7456 - 7472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7472 - 7488 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7488 - 7504 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7504 - 7520 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7520 - 7536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7536 - 7552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7552 - 7568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7568 - 7584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7584 - 7600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7600 - 7616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7616 - 7632 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7632 - 7648 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7648 - 7664 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7664 - 7680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7680 - 7696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7696 - 7712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7712 - 7728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7728 - 7744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7744 - 7760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7760 - 7776 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7776 - 7792 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7792 - 7808 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7808 - 7824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7824 - 7840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7840 - 7856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7856 - 7872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7872 - 7888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7888 - 7904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7904 - 7920 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7920 - 7936 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7936 - 7952 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7952 - 7968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7968 - 7984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7984 - 8000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8000 - 8016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8016 - 8032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8032 - 8048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8048 - 8064 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8064 - 8080 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8080 - 8096 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8096 - 8112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8112 - 8128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8128 - 8144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8144 - 8160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8160 - 8176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8176 - 8192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8192 - 8208 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8208 - 8224 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8224 - 8240 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8240 - 8256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8256 - 8272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8272 - 8288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8288 - 8304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8304 - 8320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8320 - 8336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8336 - 8352 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8352 - 8368 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8368 - 8384 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8384 - 8400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8400 - 8416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8416 - 8432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8432 - 8448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8448 - 8464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8464 - 8480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8480 - 8496 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8496 - 8512 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8512 - 8528 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8528 - 8544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8544 - 8560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8560 - 8576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8576 - 8592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8592 - 8608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8608 - 8624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8624 - 8640 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8640 - 8656 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8656 - 8672 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8672 - 8688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8688 - 8704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8704 - 8720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8720 - 8736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8736 - 8752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8752 - 8768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8768 - 8784 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8784 - 8800 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8800 - 8816 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8816 - 8832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8832 - 8848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8848 - 8864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8864 - 8880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8880 - 8896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8896 - 8912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8912 - 8928 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8928 - 8944 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8944 - 8960 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8960 - 8976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8976 - 8992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8992 - 9008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9008 - 9024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9024 - 9040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9040 - 9056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9056 - 9072 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9072 - 9088 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9088 - 9104 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9104 - 9120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9120 - 9136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9136 - 9152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9152 - 9168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9168 - 9184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9184 - 9200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9200 - 9216 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9216 - 9232 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9232 - 9248 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9248 - 9264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9264 - 9280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9280 - 9296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9296 - 9312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9312 - 9328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9328 - 9344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9344 - 9360 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9360 - 9376 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9376 - 9392 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9392 - 9408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9408 - 9424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9424 - 9440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9440 - 9456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9456 - 9472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9472 - 9488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9488 - 9504 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9504 - 9520 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9520 - 9536 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9536 - 9552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9552 - 9568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9568 - 9584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9584 - 9600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9600 - 9616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9616 - 9632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9632 - 9648 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9648 - 9664 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9664 - 9680 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9680 - 9696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9696 - 9712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9712 - 9728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9728 - 9744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9744 - 9760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9760 - 9776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9776 - 9792 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9792 - 9808 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9808 - 9824 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9824 - 9840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9840 - 9856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9856 - 9872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9872 - 9888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9888 - 9904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9904 - 9920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9920 - 9936 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9936 - 9952 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9952 - 9968 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9968 - 9984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9984 - 10000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10000 - 10016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10016 - 10032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10032 - 10048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10048 - 10064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10064 - 10080 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10080 - 10096 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10096 - 10112 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10112 - 10128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10128 - 10144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10144 - 10160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10160 - 10176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10176 - 10192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10192 - 10208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10208 - 10224 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10224 - 10240 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10240 - 10256 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10256 - 10272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10272 - 10288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10288 - 10304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10304 - 10320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10320 - 10336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10336 - 10352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10352 - 10368 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10368 - 10384 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10384 - 10400 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10400 - 10416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10416 - 10432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10432 - 10448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10448 - 10464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10464 - 10480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10480 - 10496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10496 - 10512 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10512 - 10528 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10528 - 10544 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10544 - 10560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10560 - 10576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10576 - 10592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10592 - 10608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10608 - 10624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10624 - 10640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10640 - 10656 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10656 - 10672 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10672 - 10688 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10688 - 10704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10704 - 10720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10720 - 10736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10736 - 10752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10752 - 10768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10768 - 10784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10784 - 10800 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10800 - 10816 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10816 - 10832 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10832 - 10848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10848 - 10864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10864 - 10880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10880 - 10896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10896 - 10912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10912 - 10928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10928 - 10944 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10944 - 10960 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10960 - 10976 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10976 - 10992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10992 - 11008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11008 - 11024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11024 - 11040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11040 - 11056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11056 - 11072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11072 - 11088 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11088 - 11104 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11104 - 11120 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11120 - 11136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11136 - 11152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11152 - 11168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11168 - 11184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11184 - 11200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11200 - 11216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11216 - 11232 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11232 - 11248 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11248 - 11264 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11264 - 11280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11280 - 11296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11296 - 11312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11312 - 11328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11328 - 11344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11344 - 11360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11360 - 11376 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11376 - 11392 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11392 - 11408 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11408 - 11424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11424 - 11440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11440 - 11456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11456 - 11472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11472 - 11488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11488 - 11504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11504 - 11520 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11520 - 11536 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11536 - 11552 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11552 - 11568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11568 - 11584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11584 - 11600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11600 - 11616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11616 - 11632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11632 - 11648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11648 - 11664 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11664 - 11680 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11680 - 11696 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11696 - 11712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11712 - 11728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11728 - 11744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11744 - 11760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11760 - 11776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11776 - 11792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11792 - 11808 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11808 - 11824 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11824 - 11840 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11840 - 11856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11856 - 11872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11872 - 11888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11888 - 11904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11904 - 11920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11920 - 11936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11936 - 11952 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11952 - 11968 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11968 - 11984 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11984 - 12000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12000 - 12016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12016 - 12032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12032 - 12048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12048 - 12064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12064 - 12080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12080 - 12096 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12096 - 12112 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12112 - 12128 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12128 - 12144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12144 - 12160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12160 - 12176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12176 - 12192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12192 - 12208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12208 - 12224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12224 - 12240 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12240 - 12256 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12256 - 12272 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12272 - 12288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12288 - 12304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12304 - 12320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12320 - 12336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12336 - 12352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12352 - 12368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12368 - 12384 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12384 - 12400 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12400 - 12416 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12416 - 12432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12432 - 12448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12448 - 12464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12464 - 12480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12480 - 12496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12496 - 12512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12512 - 12528 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12528 - 12544 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12544 - 12560 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12560 - 12576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12576 - 12592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12592 - 12608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12608 - 12624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12624 - 12640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12640 - 12656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12656 - 12672 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12672 - 12688 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12688 - 12704 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12704 - 12720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12720 - 12736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12736 - 12752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12752 - 12768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12768 - 12784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12784 - 12800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12800 - 12816 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12816 - 12832 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12832 - 12848 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12848 - 12864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12864 - 12880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12880 - 12896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12896 - 12912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12912 - 12928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12928 - 12944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12944 - 12960 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12960 - 12976 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12976 - 12992 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12992 - 13008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13008 - 13024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13024 - 13040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13040 - 13056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13056 - 13072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13072 - 13088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13088 - 13104 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13104 - 13120 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13120 - 13136 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13136 - 13152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13152 - 13168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13168 - 13184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13184 - 13200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13200 - 13216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13216 - 13232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13232 - 13248 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13248 - 13264 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13264 - 13280 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13280 - 13296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13296 - 13312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13312 - 13328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13328 - 13344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13344 - 13360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13360 - 13376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13376 - 13392 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13392 - 13408 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13408 - 13424 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13424 - 13440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13440 - 13456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13456 - 13472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13472 - 13488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13488 - 13504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13504 - 13520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13520 - 13536 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13536 - 13552 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13552 - 13568 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13568 - 13584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13584 - 13600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13600 - 13616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13616 - 13632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13632 - 13648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13648 - 13664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13664 - 13680 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13680 - 13696 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13696 - 13712 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13712 - 13728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13728 - 13744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13744 - 13760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13760 - 13776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13776 - 13792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13792 - 13808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13808 - 13824 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13824 - 13840 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13840 - 13856 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13856 - 13872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13872 - 13888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13888 - 13904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13904 - 13920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13920 - 13936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13936 - 13952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13952 - 13968 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13968 - 13984 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13984 - 14000 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14000 - 14016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14016 - 14032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14032 - 14048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14048 - 14064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14064 - 14080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14080 - 14096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14096 - 14112 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14112 - 14128 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14128 - 14144 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14144 - 14160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14160 - 14176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14176 - 14192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14192 - 14208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14208 - 14224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14224 - 14240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14240 - 14256 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14256 - 14272 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14272 - 14288 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14288 - 14304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14304 - 14320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14320 - 14336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14336 - 14352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14352 - 14368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14368 - 14384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14384 - 14400 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14400 - 14416 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14416 - 14432 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14432 - 14448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14448 - 14464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14464 - 14480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14480 - 14496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14496 - 14512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14512 - 14528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14528 - 14544 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14544 - 14560 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14560 - 14576 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14576 - 14592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14592 - 14608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14608 - 14624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14624 - 14640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14640 - 14656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14656 - 14672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14672 - 14688 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14688 - 14704 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14704 - 14720 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14720 - 14736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14736 - 14752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14752 - 14768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14768 - 14784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14784 - 14800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14800 - 14816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14816 - 14832 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14832 - 14848 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14848 - 14864 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14864 - 14880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14880 - 14896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14896 - 14912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14912 - 14928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14928 - 14944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14944 - 14960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14960 - 14976 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14976 - 14992 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14992 - 15008 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15008 - 15024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15024 - 15040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15040 - 15056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15056 - 15072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15072 - 15088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15088 - 15104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15104 - 15120 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15120 - 15136 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15136 - 15152 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15152 - 15168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15168 - 15184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15184 - 15200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15200 - 15216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15216 - 15232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15232 - 15248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15248 - 15264 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15264 - 15280 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15280 - 15296 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15296 - 15312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15312 - 15328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15328 - 15344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15344 - 15360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15360 - 15376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15376 - 15392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15392 - 15408 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15408 - 15424 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15424 - 15440 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15440 - 15456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15456 - 15472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15472 - 15488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15488 - 15504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15504 - 15520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15520 - 15536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15536 - 15552 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15552 - 15568 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15568 - 15584 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15584 - 15600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15600 - 15616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15616 - 15632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15632 - 15648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15648 - 15664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15664 - 15680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15680 - 15696 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15696 - 15712 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15712 - 15728 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15728 - 15744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15744 - 15760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15760 - 15776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15776 - 15792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15792 - 15808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15808 - 15824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15824 - 15840 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15840 - 15856 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15856 - 15872 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15872 - 15888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15888 - 15904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15904 - 15920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15920 - 15936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15936 - 15952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15952 - 15968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15968 - 15984 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15984 - 16000 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16000 - 16016 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16016 - 16032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16032 - 16048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16048 - 16064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16064 - 16080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16080 - 16096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16096 - 16112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16112 - 16128 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16128 - 16144 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16144 - 16160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16160 - 16176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16176 - 16192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16192 - 16208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16208 - 16224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16224 - 16240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16240 - 16256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16256 - 16272 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16272 - 16288 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16288 - 16304 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16304 - 16320 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16320 - 16336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16336 - 16352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16352 - 16368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16368 - 16384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16384 - 16400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16400 - 16416 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16416 - 16432 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16432 - 16448 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16448 - 16464 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16464 - 16480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16480 - 16496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16496 - 16512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16512 - 16528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16528 - 16544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16544 - 16560 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16560 - 16576 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16576 - 16592 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16592 - 16608 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16608 - 16624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16624 - 16640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16640 - 16656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16656 - 16672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16672 - 16688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16688 - 16704 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16704 - 16720 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16720 - 16736 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16736 - 16752 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16752 - 16768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16768 - 16784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16784 - 16800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16800 - 16816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16816 - 16832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16832 - 16848 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16848 - 16864 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16864 - 16880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16880 - 16896 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16896 - 16912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16912 - 16928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16928 - 16944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16944 - 16960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16960 - 16976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16976 - 16992 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16992 - 17008 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17008 - 17024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17024 - 17040 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17040 - 17056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17056 - 17072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17072 - 17088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17088 - 17104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17104 - 17120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17120 - 17136 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17136 - 17152 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17152 - 17168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17168 - 17184 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17184 - 17200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17200 - 17216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17216 - 17232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17232 - 17248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17248 - 17264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17264 - 17280 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17280 - 17296 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17296 - 17312 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17312 - 17328 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17328 - 17344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17344 - 17360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17360 - 17376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17376 - 17392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17392 - 17408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17408 - 17424 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17424 - 17440 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17440 - 17456 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17456 - 17472 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17472 - 17488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17488 - 17504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17504 - 17520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17520 - 17536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17536 - 17552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17552 - 17568 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17568 - 17584 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17584 - 17600 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17600 - 17616 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17616 - 17632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17632 - 17648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17648 - 17664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17664 - 17680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17680 - 17696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17696 - 17712 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17712 - 17728 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17728 - 17744 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17744 - 17760 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17760 - 17776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17776 - 17792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17792 - 17808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17808 - 17824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17824 - 17840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17840 - 17856 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17856 - 17872 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17872 - 17888 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17888 - 17904 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17904 - 17920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17920 - 17936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17936 - 17952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17952 - 17968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17968 - 17984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17984 - 18000 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18000 - 18016 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18016 - 18032 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18032 - 18048 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18048 - 18064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18064 - 18080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18080 - 18096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18096 - 18112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18112 - 18128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18128 - 18144 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18144 - 18160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18160 - 18176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18176 - 18192 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18192 - 18208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18208 - 18224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18224 - 18240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18240 - 18256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18256 - 18272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18272 - 18288 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18288 - 18304 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18304 - 18320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18320 - 18336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18336 - 18352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18352 - 18368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18368 - 18384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18384 - 18400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18400 - 18416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18416 - 18432 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18432 - 18448 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18448 - 18464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18464 - 18480 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18480 - 18496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18496 - 18512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18512 - 18528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18528 - 18544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18544 - 18560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18560 - 18576 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18576 - 18592 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18592 - 18608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18608 - 18624 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18624 - 18640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18640 - 18656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18656 - 18672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18672 - 18688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18688 - 18704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18704 - 18720 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18720 - 18736 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18736 - 18752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18752 - 18768 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18768 - 18784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18784 - 18800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18800 - 18816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18816 - 18832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18832 - 18848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18848 - 18864 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18864 - 18880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18880 - 18896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18896 - 18912 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18912 - 18928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18928 - 18944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18944 - 18960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18960 - 18976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18976 - 18992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18992 - 19008 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19008 - 19024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19024 - 19040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19040 - 19056 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19056 - 19072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19072 - 19088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19088 - 19104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19104 - 19120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19120 - 19136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19136 - 19152 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19152 - 19168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19168 - 19184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19184 - 19200 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19200 - 19216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19216 - 19232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19232 - 19248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19248 - 19264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19264 - 19280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19280 - 19296 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19296 - 19312 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19312 - 19328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19328 - 19344 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19344 - 19360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19360 - 19376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19376 - 19392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19392 - 19408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19408 - 19424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19424 - 19440 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19440 - 19456 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19456 - 19472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19472 - 19488 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19488 - 19504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19504 - 19520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19520 - 19536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19536 - 19552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19552 - 19568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19568 - 19584 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19584 - 19600 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19600 - 19616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19616 - 19632 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19632 - 19648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19648 - 19664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19664 - 19680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19680 - 19696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19696 - 19712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19712 - 19728 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19728 - 19744 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19744 - 19760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19760 - 19776 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19776 - 19792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19792 - 19808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19808 - 19824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19824 - 19840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19840 - 19856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19856 - 19872 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19872 - 19888 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19888 - 19904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19904 - 19920 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19920 - 19936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19936 - 19952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19952 - 19968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19968 - 19984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19984 - 20000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20000 - 20016 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20016 - 20032 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20032 - 20048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20048 - 20064 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20064 - 20080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20080 - 20096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20096 - 20112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20112 - 20128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20128 - 20144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20144 - 20160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20160 - 20176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20176 - 20192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20192 - 20208 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20208 - 20224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20224 - 20240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20240 - 20256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20256 - 20272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20272 - 20288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20288 - 20304 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20304 - 20320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20320 - 20336 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20336 - 20352 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20352 - 20368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20368 - 20384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20384 - 20400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20400 - 20416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20416 - 20432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20432 - 20448 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20448 - 20464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20464 - 20480 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20480 - 20496 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20496 - 20512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20512 - 20528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20528 - 20544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20544 - 20560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20560 - 20576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20576 - 20592 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20592 - 20608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20608 - 20624 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20624 - 20640 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20640 - 20656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20656 - 20672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20672 - 20688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20688 - 20704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20704 - 20720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20720 - 20736 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20736 - 20752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20752 - 20768 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20768 - 20784 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20784 - 20800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20800 - 20816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20816 - 20832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20832 - 20848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20848 - 20864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20864 - 20880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20880 - 20896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20896 - 20912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20912 - 20928 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20928 - 20944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20944 - 20960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20960 - 20976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20976 - 20992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20992 - 21008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21008 - 21024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21024 - 21040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21040 - 21056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21056 - 21072 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21072 - 21088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21088 - 21104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21104 - 21120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21120 - 21136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21136 - 21152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21152 - 21168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21168 - 21184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21184 - 21200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21200 - 21216 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21216 - 21232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21232 - 21248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21248 - 21264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21264 - 21280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21280 - 21296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21296 - 21312 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21312 - 21328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21328 - 21344 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21344 - 21360 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21360 - 21376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21376 - 21392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21392 - 21408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21408 - 21424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21424 - 21440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21440 - 21456 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21456 - 21472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21472 - 21488 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21488 - 21504 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21504 - 21520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21520 - 21536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21536 - 21552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21552 - 21568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21568 - 21584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21584 - 21600 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21600 - 21616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21616 - 21632 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21632 - 21648 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21648 - 21664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21664 - 21680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21680 - 21696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21696 - 21712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21712 - 21728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21728 - 21744 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21744 - 21760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21760 - 21776 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21776 - 21792 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21792 - 21808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21808 - 21824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21824 - 21840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21840 - 21856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21856 - 21872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21872 - 21888 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21888 - 21904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21904 - 21920 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21920 - 21936 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21936 - 21952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21952 - 21968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21968 - 21984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21984 - 22000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22000 - 22016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22016 - 22032 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22032 - 22048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22048 - 22064 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22064 - 22080 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22080 - 22096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22096 - 22112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22112 - 22128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22128 - 22144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22144 - 22160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22160 - 22176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22176 - 22192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22192 - 22208 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22208 - 22224 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22224 - 22240 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22240 - 22256 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22256 - 22272 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22272 - 22288 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22288 - 22304 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22304 - 22320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22320 - 22336 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22336 - 22352 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22352 - 22368 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22368 - 22384 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22384 - 22400 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22400 - 22416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22416 - 22432 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22432 - 22448 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22448 - 22464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22464 - 22480 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22480 - 22496 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22496 - 22512 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22512 - 22528 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22528 - 22544 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22544 - 22560 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22560 - 22576 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22576 - 22592 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22592 - 22608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22608 - 22624 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22624 - 22640 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22640 - 22656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22656 - 22672 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22672 - 22688 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22688 - 22704 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22704 - 22720 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22720 - 22736 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22736 - 22752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22752 - 22768 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22768 - 22784 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22784 - 22800 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22800 - 22816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22816 - 22832 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22832 - 22848 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22848 - 22864 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22864 - 22880 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22880 - 22896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22896 - 22912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22912 - 22928 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22928 - 22944 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22944 - 22960 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22960 - 22976 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22976 - 22992 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22992 - 23008 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23008 - 23024 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23024 - 23040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23040 - 23056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23056 - 23072 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23072 - 23088 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23088 - 23104 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23104 - 23120 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23120 - 23136 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23136 - 23152 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23152 - 23168 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23168 - 23184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23184 - 23200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23200 - 23216 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23216 - 23232 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23232 - 23248 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23248 - 23264 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23264 - 23280 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23280 - 23296 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23296 - 23312 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23312 - 23328 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23328 - 23344 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23344 - 23360 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23360 - 23376 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23376 - 23392 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23392 - 23408 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23408 - 23424 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23424 - 23440 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23440 - 23456 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23456 - 23472 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23472 - 23488 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23488 - 23504 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23504 - 23520 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23520 - 23536 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23536 - 23552 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23552 - 23568 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23568 - 23584 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23584 - 23600 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23600 - 23616 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23616 - 23632 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23632 - 23648 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23648 - 23664 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23664 - 23680 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23680 - 23696 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23696 - 23712 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23712 - 23728 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23728 - 23744 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23744 - 23760 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23760 - 23776 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23776 - 23792 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23792 - 23808 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23808 - 23824 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23824 - 23840 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23840 - 23856 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23856 - 23872 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23872 - 23888 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23888 - 23904 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23904 - 23920 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23920 - 23936 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23936 - 23952 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23952 - 23968 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23968 - 23984 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23984 - 24000 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24000 - 24016 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24016 - 24032 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24032 - 24048 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 24048 - 24064 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 24064 - 24080 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24080 - 24096 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24096 - 24112 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24112 - 24128 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24128 - 24144 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24144 - 24160 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24160 - 24176 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0 + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 0 - 16 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16 - 32 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 32 - 48 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 48 - 64 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 64 - 80 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 80 - 96 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 96 - 112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 112 - 128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 128 - 144 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 144 - 160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 160 - 176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 176 - 192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 192 - 208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 208 - 224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 224 - 240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 240 - 256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 256 - 272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 272 - 288 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 288 - 304 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 304 - 320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 320 - 336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 336 - 352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 352 - 368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 368 - 384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 384 - 400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 400 - 416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 416 - 432 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 432 - 448 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 448 - 464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 464 - 480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 480 - 496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 496 - 512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 512 - 528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 528 - 544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 544 - 560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 560 - 576 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 576 - 592 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 592 - 608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 608 - 624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 624 - 640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 640 - 656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 656 - 672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 672 - 688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 688 - 704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 704 - 720 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 720 - 736 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 736 - 752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 752 - 768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 768 - 784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 784 - 800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 800 - 816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 816 - 832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 832 - 848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 848 - 864 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 864 - 880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 880 - 896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 896 - 912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 912 - 928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 928 - 944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 944 - 960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 960 - 976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 976 - 992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 992 - 1008 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1008 - 1024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1024 - 1040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1040 - 1056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1056 - 1072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1072 - 1088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1088 - 1104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1104 - 1120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1120 - 1136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1136 - 1152 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1152 - 1168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1168 - 1184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1184 - 1200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1200 - 1216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1216 - 1232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1232 - 1248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1248 - 1264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1264 - 1280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1280 - 1296 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1296 - 1312 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1312 - 1328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1328 - 1344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1344 - 1360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1360 - 1376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1376 - 1392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1392 - 1408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1408 - 1424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1424 - 1440 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1440 - 1456 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1456 - 1472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1472 - 1488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1488 - 1504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1504 - 1520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1520 - 1536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1536 - 1552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1552 - 1568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1568 - 1584 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1584 - 1600 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1600 - 1616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1616 - 1632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1632 - 1648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1648 - 1664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1664 - 1680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1680 - 1696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1696 - 1712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1712 - 1728 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1728 - 1744 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1744 - 1760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1760 - 1776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1776 - 1792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1792 - 1808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1808 - 1824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1824 - 1840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1840 - 1856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1856 - 1872 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1872 - 1888 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1888 - 1904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1904 - 1920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1920 - 1936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1936 - 1952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1952 - 1968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1968 - 1984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 1984 - 2000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2000 - 2016 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2016 - 2032 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2032 - 2048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2048 - 2064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2064 - 2080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2080 - 2096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2096 - 2112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2112 - 2128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2128 - 2144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2144 - 2160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2160 - 2176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2176 - 2192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2192 - 2208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2208 - 2224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2224 - 2240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2240 - 2256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2256 - 2272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2272 - 2288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2288 - 2304 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2304 - 2320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2320 - 2336 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2336 - 2352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2352 - 2368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2368 - 2384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2384 - 2400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2400 - 2416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2416 - 2432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2432 - 2448 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2448 - 2464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2464 - 2480 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2480 - 2496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2496 - 2512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2512 - 2528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2528 - 2544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2544 - 2560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2560 - 2576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2576 - 2592 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2592 - 2608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2608 - 2624 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2624 - 2640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2640 - 2656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2656 - 2672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2672 - 2688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2688 - 2704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2704 - 2720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2720 - 2736 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2736 - 2752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2752 - 2768 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2768 - 2784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2784 - 2800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2800 - 2816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2816 - 2832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2832 - 2848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2848 - 2864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2864 - 2880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2880 - 2896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 2896 - 2912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2912 - 2928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2928 - 2944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2944 - 2960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2960 - 2976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2976 - 2992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 2992 - 3008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3008 - 3024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3024 - 3040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3040 - 3056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3056 - 3072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3072 - 3088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3088 - 3104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3104 - 3120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3120 - 3136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3136 - 3152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3152 - 3168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3168 - 3184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3184 - 3200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3200 - 3216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3216 - 3232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3232 - 3248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3248 - 3264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3264 - 3280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3280 - 3296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3296 - 3312 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3312 - 3328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3328 - 3344 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3344 - 3360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3360 - 3376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3376 - 3392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3392 - 3408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3408 - 3424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3424 - 3440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3440 - 3456 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3456 - 3472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3472 - 3488 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3488 - 3504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3504 - 3520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3520 - 3536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3536 - 3552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3552 - 3568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3568 - 3584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3584 - 3600 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3600 - 3616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3616 - 3632 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3632 - 3648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3648 - 3664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3664 - 3680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3680 - 3696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3696 - 3712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3712 - 3728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3728 - 3744 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3744 - 3760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3760 - 3776 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3776 - 3792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3792 - 3808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3808 - 3824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3824 - 3840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3840 - 3856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3856 - 3872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3872 - 3888 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3888 - 3904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 3904 - 3920 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3920 - 3936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3936 - 3952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3952 - 3968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3968 - 3984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 3984 - 4000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4000 - 4016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4016 - 4032 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4032 - 4048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4048 - 4064 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4064 - 4080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4080 - 4096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4096 - 4112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4112 - 4128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4128 - 4144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4144 - 4160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4160 - 4176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4176 - 4192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4192 - 4208 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4208 - 4224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4224 - 4240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4240 - 4256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4256 - 4272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4272 - 4288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4288 - 4304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4304 - 4320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4320 - 4336 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4336 - 4352 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4352 - 4368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4368 - 4384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4384 - 4400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4400 - 4416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4416 - 4432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4432 - 4448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4448 - 4464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4464 - 4480 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4480 - 4496 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4496 - 4512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4512 - 4528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4528 - 4544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4544 - 4560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4560 - 4576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4576 - 4592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4592 - 4608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4608 - 4624 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4624 - 4640 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4640 - 4656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4656 - 4672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4672 - 4688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4688 - 4704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4704 - 4720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4720 - 4736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4736 - 4752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4752 - 4768 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4768 - 4784 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4784 - 4800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4800 - 4816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4816 - 4832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4832 - 4848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4848 - 4864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4864 - 4880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4880 - 4896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4896 - 4912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 4912 - 4928 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4928 - 4944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4944 - 4960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4960 - 4976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4976 - 4992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 4992 - 5008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5008 - 5024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5024 - 5040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5040 - 5056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5056 - 5072 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5072 - 5088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5088 - 5104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5104 - 5120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5120 - 5136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5136 - 5152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5152 - 5168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5168 - 5184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5184 - 5200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5200 - 5216 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5216 - 5232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5232 - 5248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5248 - 5264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5264 - 5280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5280 - 5296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5296 - 5312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5312 - 5328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5328 - 5344 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5344 - 5360 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5360 - 5376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5376 - 5392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5392 - 5408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5408 - 5424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5424 - 5440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5440 - 5456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5456 - 5472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5472 - 5488 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5488 - 5504 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5504 - 5520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5520 - 5536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5536 - 5552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5552 - 5568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5568 - 5584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5584 - 5600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5600 - 5616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5616 - 5632 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5632 - 5648 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5648 - 5664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5664 - 5680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5680 - 5696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5696 - 5712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5712 - 5728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5728 - 5744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5744 - 5760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5760 - 5776 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5776 - 5792 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5792 - 5808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5808 - 5824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5824 - 5840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5840 - 5856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5856 - 5872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5872 - 5888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5888 - 5904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5904 - 5920 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 5920 - 5936 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5936 - 5952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5952 - 5968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5968 - 5984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 5984 - 6000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6000 - 6016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6016 - 6032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6032 - 6048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6048 - 6064 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6064 - 6080 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6080 - 6096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6096 - 6112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6112 - 6128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6128 - 6144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6144 - 6160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6160 - 6176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6176 - 6192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6192 - 6208 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6208 - 6224 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6224 - 6240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6240 - 6256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6256 - 6272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6272 - 6288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6288 - 6304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6304 - 6320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6320 - 6336 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6336 - 6352 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6352 - 6368 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6368 - 6384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6384 - 6400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6400 - 6416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6416 - 6432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6432 - 6448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6448 - 6464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6464 - 6480 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6480 - 6496 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6496 - 6512 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6512 - 6528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6528 - 6544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6544 - 6560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6560 - 6576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6576 - 6592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6592 - 6608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6608 - 6624 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6624 - 6640 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6640 - 6656 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6656 - 6672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6672 - 6688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6688 - 6704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6704 - 6720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6720 - 6736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6736 - 6752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6752 - 6768 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6768 - 6784 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6784 - 6800 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6800 - 6816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6816 - 6832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6832 - 6848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6848 - 6864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6864 - 6880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6880 - 6896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6896 - 6912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6912 - 6928 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 6928 - 6944 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6944 - 6960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6960 - 6976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6976 - 6992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 6992 - 7008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7008 - 7024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7024 - 7040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7040 - 7056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7056 - 7072 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7072 - 7088 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7088 - 7104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7104 - 7120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7120 - 7136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7136 - 7152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7152 - 7168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7168 - 7184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7184 - 7200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7200 - 7216 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7216 - 7232 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7232 - 7248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7248 - 7264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7264 - 7280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7280 - 7296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7296 - 7312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7312 - 7328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7328 - 7344 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7344 - 7360 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7360 - 7376 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7376 - 7392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7392 - 7408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7408 - 7424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7424 - 7440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7440 - 7456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7456 - 7472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7472 - 7488 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7488 - 7504 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7504 - 7520 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7520 - 7536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7536 - 7552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7552 - 7568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7568 - 7584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7584 - 7600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7600 - 7616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7616 - 7632 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7632 - 7648 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7648 - 7664 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7664 - 7680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7680 - 7696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7696 - 7712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7712 - 7728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7728 - 7744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7744 - 7760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7760 - 7776 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7776 - 7792 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7792 - 7808 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7808 - 7824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7824 - 7840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7840 - 7856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7856 - 7872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7872 - 7888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7888 - 7904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7904 - 7920 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7920 - 7936 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 7936 - 7952 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7952 - 7968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7968 - 7984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 7984 - 8000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8000 - 8016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8016 - 8032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8032 - 8048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8048 - 8064 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8064 - 8080 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8080 - 8096 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8096 - 8112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8112 - 8128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8128 - 8144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8144 - 8160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8160 - 8176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8176 - 8192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8192 - 8208 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8208 - 8224 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8224 - 8240 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8240 - 8256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8256 - 8272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8272 - 8288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8288 - 8304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8304 - 8320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8320 - 8336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8336 - 8352 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8352 - 8368 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8368 - 8384 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8384 - 8400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8400 - 8416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8416 - 8432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8432 - 8448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8448 - 8464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8464 - 8480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8480 - 8496 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8496 - 8512 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8512 - 8528 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8528 - 8544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8544 - 8560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8560 - 8576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8576 - 8592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8592 - 8608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8608 - 8624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8624 - 8640 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8640 - 8656 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8656 - 8672 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8672 - 8688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8688 - 8704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8704 - 8720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8720 - 8736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8736 - 8752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8752 - 8768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8768 - 8784 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8784 - 8800 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8800 - 8816 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8816 - 8832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8832 - 8848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8848 - 8864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8864 - 8880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8880 - 8896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8896 - 8912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8912 - 8928 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8928 - 8944 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 8944 - 8960 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8960 - 8976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8976 - 8992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 8992 - 9008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9008 - 9024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9024 - 9040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9040 - 9056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9056 - 9072 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9072 - 9088 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9088 - 9104 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9104 - 9120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9120 - 9136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9136 - 9152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9152 - 9168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9168 - 9184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9184 - 9200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9200 - 9216 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9216 - 9232 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9232 - 9248 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9248 - 9264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9264 - 9280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9280 - 9296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9296 - 9312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9312 - 9328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9328 - 9344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9344 - 9360 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9360 - 9376 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9376 - 9392 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9392 - 9408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9408 - 9424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9424 - 9440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9440 - 9456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9456 - 9472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9472 - 9488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9488 - 9504 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9504 - 9520 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9520 - 9536 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9536 - 9552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9552 - 9568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9568 - 9584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9584 - 9600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9600 - 9616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9616 - 9632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9632 - 9648 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9648 - 9664 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9664 - 9680 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9680 - 9696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9696 - 9712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9712 - 9728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9728 - 9744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9744 - 9760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9760 - 9776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9776 - 9792 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9792 - 9808 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9808 - 9824 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9824 - 9840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9840 - 9856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9856 - 9872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9872 - 9888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9888 - 9904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9904 - 9920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9920 - 9936 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9936 - 9952 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 9952 - 9968 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9968 - 9984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 9984 - 10000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10000 - 10016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10016 - 10032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10032 - 10048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10048 - 10064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10064 - 10080 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10080 - 10096 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10096 - 10112 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10112 - 10128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10128 - 10144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10144 - 10160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10160 - 10176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10176 - 10192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10192 - 10208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10208 - 10224 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10224 - 10240 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10240 - 10256 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10256 - 10272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10272 - 10288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10288 - 10304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10304 - 10320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10320 - 10336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10336 - 10352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10352 - 10368 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10368 - 10384 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10384 - 10400 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10400 - 10416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10416 - 10432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10432 - 10448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10448 - 10464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10464 - 10480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10480 - 10496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10496 - 10512 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10512 - 10528 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10528 - 10544 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10544 - 10560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10560 - 10576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10576 - 10592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10592 - 10608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10608 - 10624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10624 - 10640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10640 - 10656 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10656 - 10672 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10672 - 10688 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10688 - 10704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10704 - 10720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10720 - 10736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10736 - 10752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10752 - 10768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10768 - 10784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10784 - 10800 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10800 - 10816 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10816 - 10832 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10832 - 10848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10848 - 10864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10864 - 10880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10880 - 10896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10896 - 10912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10912 - 10928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10928 - 10944 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10944 - 10960 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 10960 - 10976 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10976 - 10992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 10992 - 11008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11008 - 11024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11024 - 11040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11040 - 11056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11056 - 11072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11072 - 11088 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11088 - 11104 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11104 - 11120 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11120 - 11136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11136 - 11152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11152 - 11168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11168 - 11184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11184 - 11200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11200 - 11216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11216 - 11232 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11232 - 11248 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11248 - 11264 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11264 - 11280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11280 - 11296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11296 - 11312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11312 - 11328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11328 - 11344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11344 - 11360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11360 - 11376 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11376 - 11392 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11392 - 11408 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11408 - 11424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11424 - 11440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11440 - 11456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11456 - 11472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11472 - 11488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11488 - 11504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11504 - 11520 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11520 - 11536 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11536 - 11552 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11552 - 11568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11568 - 11584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11584 - 11600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11600 - 11616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11616 - 11632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11632 - 11648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11648 - 11664 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11664 - 11680 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11680 - 11696 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11696 - 11712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11712 - 11728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11728 - 11744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11744 - 11760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11760 - 11776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11776 - 11792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11792 - 11808 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11808 - 11824 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11824 - 11840 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11840 - 11856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11856 - 11872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11872 - 11888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11888 - 11904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11904 - 11920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11920 - 11936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11936 - 11952 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11952 - 11968 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 11968 - 11984 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 11984 - 12000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12000 - 12016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12016 - 12032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12032 - 12048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12048 - 12064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12064 - 12080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12080 - 12096 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12096 - 12112 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12112 - 12128 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12128 - 12144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12144 - 12160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12160 - 12176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12176 - 12192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12192 - 12208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12208 - 12224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12224 - 12240 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12240 - 12256 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12256 - 12272 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12272 - 12288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12288 - 12304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12304 - 12320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12320 - 12336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12336 - 12352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12352 - 12368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12368 - 12384 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12384 - 12400 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12400 - 12416 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12416 - 12432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12432 - 12448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12448 - 12464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12464 - 12480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12480 - 12496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12496 - 12512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12512 - 12528 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12528 - 12544 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12544 - 12560 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12560 - 12576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12576 - 12592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12592 - 12608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12608 - 12624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12624 - 12640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12640 - 12656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12656 - 12672 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12672 - 12688 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12688 - 12704 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12704 - 12720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12720 - 12736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12736 - 12752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12752 - 12768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12768 - 12784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12784 - 12800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12800 - 12816 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12816 - 12832 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12832 - 12848 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12848 - 12864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12864 - 12880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12880 - 12896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12896 - 12912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12912 - 12928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12928 - 12944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12944 - 12960 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12960 - 12976 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 12976 - 12992 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 12992 - 13008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13008 - 13024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13024 - 13040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13040 - 13056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13056 - 13072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13072 - 13088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13088 - 13104 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13104 - 13120 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13120 - 13136 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13136 - 13152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13152 - 13168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13168 - 13184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13184 - 13200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13200 - 13216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13216 - 13232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13232 - 13248 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13248 - 13264 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13264 - 13280 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13280 - 13296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13296 - 13312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13312 - 13328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13328 - 13344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13344 - 13360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13360 - 13376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13376 - 13392 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13392 - 13408 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13408 - 13424 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13424 - 13440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13440 - 13456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13456 - 13472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13472 - 13488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13488 - 13504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13504 - 13520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13520 - 13536 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13536 - 13552 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13552 - 13568 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13568 - 13584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13584 - 13600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13600 - 13616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13616 - 13632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13632 - 13648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13648 - 13664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13664 - 13680 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13680 - 13696 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13696 - 13712 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13712 - 13728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13728 - 13744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13744 - 13760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13760 - 13776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13776 - 13792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13792 - 13808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13808 - 13824 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13824 - 13840 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13840 - 13856 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13856 - 13872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13872 - 13888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13888 - 13904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13904 - 13920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13920 - 13936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13936 - 13952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 13952 - 13968 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13968 - 13984 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 13984 - 14000 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14000 - 14016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14016 - 14032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14032 - 14048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14048 - 14064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14064 - 14080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14080 - 14096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14096 - 14112 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14112 - 14128 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14128 - 14144 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14144 - 14160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14160 - 14176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14176 - 14192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14192 - 14208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14208 - 14224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14224 - 14240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14240 - 14256 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14256 - 14272 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14272 - 14288 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14288 - 14304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14304 - 14320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14320 - 14336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14336 - 14352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14352 - 14368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14368 - 14384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14384 - 14400 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14400 - 14416 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14416 - 14432 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14432 - 14448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14448 - 14464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14464 - 14480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14480 - 14496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14496 - 14512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14512 - 14528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14528 - 14544 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14544 - 14560 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14560 - 14576 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14576 - 14592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14592 - 14608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14608 - 14624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14624 - 14640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14640 - 14656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14656 - 14672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14672 - 14688 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14688 - 14704 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14704 - 14720 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14720 - 14736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14736 - 14752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14752 - 14768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14768 - 14784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14784 - 14800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14800 - 14816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14816 - 14832 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14832 - 14848 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14848 - 14864 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14864 - 14880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14880 - 14896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14896 - 14912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14912 - 14928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14928 - 14944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14944 - 14960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 14960 - 14976 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14976 - 14992 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 14992 - 15008 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15008 - 15024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15024 - 15040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15040 - 15056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15056 - 15072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15072 - 15088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15088 - 15104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15104 - 15120 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15120 - 15136 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15136 - 15152 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15152 - 15168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15168 - 15184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15184 - 15200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15200 - 15216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15216 - 15232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15232 - 15248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15248 - 15264 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15264 - 15280 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15280 - 15296 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15296 - 15312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15312 - 15328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15328 - 15344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15344 - 15360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15360 - 15376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15376 - 15392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15392 - 15408 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15408 - 15424 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15424 - 15440 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15440 - 15456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15456 - 15472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15472 - 15488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15488 - 15504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15504 - 15520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15520 - 15536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15536 - 15552 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15552 - 15568 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15568 - 15584 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15584 - 15600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15600 - 15616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15616 - 15632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15632 - 15648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15648 - 15664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15664 - 15680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15680 - 15696 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15696 - 15712 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15712 - 15728 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15728 - 15744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15744 - 15760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15760 - 15776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15776 - 15792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15792 - 15808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15808 - 15824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15824 - 15840 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15840 - 15856 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15856 - 15872 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15872 - 15888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15888 - 15904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15904 - 15920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15920 - 15936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15936 - 15952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15952 - 15968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 15968 - 15984 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 15984 - 16000 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16000 - 16016 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16016 - 16032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16032 - 16048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16048 - 16064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16064 - 16080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16080 - 16096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16096 - 16112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16112 - 16128 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16128 - 16144 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16144 - 16160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16160 - 16176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16176 - 16192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16192 - 16208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16208 - 16224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16224 - 16240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16240 - 16256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16256 - 16272 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16272 - 16288 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16288 - 16304 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16304 - 16320 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16320 - 16336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16336 - 16352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16352 - 16368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16368 - 16384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16384 - 16400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16400 - 16416 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16416 - 16432 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16432 - 16448 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16448 - 16464 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16464 - 16480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16480 - 16496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16496 - 16512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16512 - 16528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16528 - 16544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16544 - 16560 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16560 - 16576 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16576 - 16592 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16592 - 16608 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16608 - 16624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16624 - 16640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16640 - 16656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16656 - 16672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16672 - 16688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16688 - 16704 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16704 - 16720 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16720 - 16736 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16736 - 16752 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16752 - 16768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16768 - 16784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16784 - 16800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16800 - 16816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16816 - 16832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16832 - 16848 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16848 - 16864 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16864 - 16880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16880 - 16896 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16896 - 16912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16912 - 16928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16928 - 16944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16944 - 16960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16960 - 16976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 16976 - 16992 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16992 - 17008 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17008 - 17024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17024 - 17040 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17040 - 17056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17056 - 17072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17072 - 17088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17088 - 17104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17104 - 17120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17120 - 17136 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17136 - 17152 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17152 - 17168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17168 - 17184 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17184 - 17200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17200 - 17216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17216 - 17232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17232 - 17248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17248 - 17264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17264 - 17280 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17280 - 17296 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17296 - 17312 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17312 - 17328 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17328 - 17344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17344 - 17360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17360 - 17376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17376 - 17392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17392 - 17408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17408 - 17424 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17424 - 17440 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17440 - 17456 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17456 - 17472 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17472 - 17488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17488 - 17504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17504 - 17520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17520 - 17536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17536 - 17552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17552 - 17568 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17568 - 17584 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17584 - 17600 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17600 - 17616 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17616 - 17632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17632 - 17648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17648 - 17664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17664 - 17680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17680 - 17696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17696 - 17712 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17712 - 17728 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17728 - 17744 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17744 - 17760 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17760 - 17776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17776 - 17792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17792 - 17808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17808 - 17824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17824 - 17840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17840 - 17856 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17856 - 17872 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 17872 - 17888 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17888 - 17904 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17904 - 17920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17920 - 17936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17936 - 17952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17952 - 17968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17968 - 17984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 17984 - 18000 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18000 - 18016 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18016 - 18032 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18032 - 18048 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18048 - 18064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18064 - 18080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18080 - 18096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18096 - 18112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18112 - 18128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18128 - 18144 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18144 - 18160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18160 - 18176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18176 - 18192 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18192 - 18208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18208 - 18224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18224 - 18240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18240 - 18256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18256 - 18272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18272 - 18288 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18288 - 18304 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18304 - 18320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18320 - 18336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18336 - 18352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18352 - 18368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18368 - 18384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18384 - 18400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18400 - 18416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18416 - 18432 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18432 - 18448 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18448 - 18464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18464 - 18480 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18480 - 18496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18496 - 18512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18512 - 18528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18528 - 18544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18544 - 18560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18560 - 18576 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18576 - 18592 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18592 - 18608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18608 - 18624 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18624 - 18640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18640 - 18656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18656 - 18672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18672 - 18688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18688 - 18704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18704 - 18720 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18720 - 18736 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18736 - 18752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18752 - 18768 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18768 - 18784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18784 - 18800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18800 - 18816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18816 - 18832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18832 - 18848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18848 - 18864 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18864 - 18880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 18880 - 18896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18896 - 18912 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18912 - 18928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18928 - 18944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18944 - 18960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18960 - 18976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18976 - 18992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 18992 - 19008 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19008 - 19024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19024 - 19040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19040 - 19056 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19056 - 19072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19072 - 19088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19088 - 19104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19104 - 19120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19120 - 19136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19136 - 19152 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19152 - 19168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19168 - 19184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19184 - 19200 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19200 - 19216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19216 - 19232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19232 - 19248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19248 - 19264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19264 - 19280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19280 - 19296 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19296 - 19312 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19312 - 19328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19328 - 19344 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19344 - 19360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19360 - 19376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19376 - 19392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19392 - 19408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19408 - 19424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19424 - 19440 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19440 - 19456 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19456 - 19472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19472 - 19488 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19488 - 19504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19504 - 19520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19520 - 19536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19536 - 19552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19552 - 19568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19568 - 19584 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19584 - 19600 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19600 - 19616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19616 - 19632 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19632 - 19648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19648 - 19664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19664 - 19680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19680 - 19696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19696 - 19712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19712 - 19728 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19728 - 19744 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19744 - 19760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19760 - 19776 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19776 - 19792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19792 - 19808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19808 - 19824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19824 - 19840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19840 - 19856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19856 - 19872 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19872 - 19888 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 19888 - 19904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19904 - 19920 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19920 - 19936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19936 - 19952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19952 - 19968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19968 - 19984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 19984 - 20000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20000 - 20016 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20016 - 20032 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20032 - 20048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20048 - 20064 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20064 - 20080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20080 - 20096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20096 - 20112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20112 - 20128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20128 - 20144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20144 - 20160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20160 - 20176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20176 - 20192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20192 - 20208 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20208 - 20224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20224 - 20240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20240 - 20256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20256 - 20272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20272 - 20288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20288 - 20304 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20304 - 20320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20320 - 20336 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20336 - 20352 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20352 - 20368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20368 - 20384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20384 - 20400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20400 - 20416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20416 - 20432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20432 - 20448 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20448 - 20464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20464 - 20480 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20480 - 20496 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20496 - 20512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20512 - 20528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20528 - 20544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20544 - 20560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20560 - 20576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20576 - 20592 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20592 - 20608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20608 - 20624 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20624 - 20640 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20640 - 20656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20656 - 20672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20672 - 20688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20688 - 20704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20704 - 20720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20720 - 20736 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20736 - 20752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20752 - 20768 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20768 - 20784 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20784 - 20800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20800 - 20816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20816 - 20832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20832 - 20848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20848 - 20864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20864 - 20880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20880 - 20896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 20896 - 20912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20912 - 20928 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20928 - 20944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20944 - 20960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20960 - 20976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20976 - 20992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 20992 - 21008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21008 - 21024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21024 - 21040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21040 - 21056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21056 - 21072 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21072 - 21088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21088 - 21104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21104 - 21120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21120 - 21136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21136 - 21152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21152 - 21168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21168 - 21184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21184 - 21200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21200 - 21216 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21216 - 21232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21232 - 21248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21248 - 21264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21264 - 21280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21280 - 21296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21296 - 21312 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21312 - 21328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21328 - 21344 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21344 - 21360 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21360 - 21376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21376 - 21392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21392 - 21408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21408 - 21424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21424 - 21440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21440 - 21456 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21456 - 21472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21472 - 21488 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21488 - 21504 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21504 - 21520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21520 - 21536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21536 - 21552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21552 - 21568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21568 - 21584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21584 - 21600 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21600 - 21616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21616 - 21632 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21632 - 21648 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21648 - 21664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21664 - 21680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21680 - 21696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21696 - 21712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21712 - 21728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21728 - 21744 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21744 - 21760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21760 - 21776 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21776 - 21792 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21792 - 21808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21808 - 21824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21824 - 21840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21840 - 21856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21856 - 21872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21872 - 21888 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21888 - 21904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 21904 - 21920 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21920 - 21936 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21936 - 21952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21952 - 21968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21968 - 21984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 21984 - 22000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22000 - 22016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22016 - 22032 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22032 - 22048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22048 - 22064 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22064 - 22080 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22080 - 22096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22096 - 22112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22112 - 22128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22128 - 22144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22144 - 22160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22160 - 22176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22176 - 22192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22192 - 22208 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22208 - 22224 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22224 - 22240 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22240 - 22256 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22256 - 22272 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22272 - 22288 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22288 - 22304 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22304 - 22320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22320 - 22336 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22336 - 22352 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22352 - 22368 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22368 - 22384 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22384 - 22400 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22400 - 22416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22416 - 22432 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22432 - 22448 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22448 - 22464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22464 - 22480 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22480 - 22496 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22496 - 22512 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22512 - 22528 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22528 - 22544 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22544 - 22560 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22560 - 22576 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22576 - 22592 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22592 - 22608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22608 - 22624 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22624 - 22640 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22640 - 22656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22656 - 22672 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22672 - 22688 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22688 - 22704 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22704 - 22720 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22720 - 22736 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22736 - 22752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22752 - 22768 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22768 - 22784 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22784 - 22800 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22800 - 22816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22816 - 22832 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22832 - 22848 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22848 - 22864 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22864 - 22880 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22880 - 22896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22896 - 22912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 22912 - 22928 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22928 - 22944 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22944 - 22960 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22960 - 22976 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22976 - 22992 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 22992 - 23008 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23008 - 23024 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23024 - 23040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23040 - 23056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23056 - 23072 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23072 - 23088 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23088 - 23104 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23104 - 23120 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23120 - 23136 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23136 - 23152 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23152 - 23168 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23168 - 23184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23184 - 23200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23200 - 23216 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23216 - 23232 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23232 - 23248 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23248 - 23264 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23264 - 23280 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23280 - 23296 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23296 - 23312 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23312 - 23328 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23328 - 23344 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23344 - 23360 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23360 - 23376 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23376 - 23392 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23392 - 23408 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23408 - 23424 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23424 - 23440 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23440 - 23456 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23456 - 23472 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23472 - 23488 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23488 - 23504 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23504 - 23520 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23520 - 23536 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23536 - 23552 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23552 - 23568 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23568 - 23584 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23584 - 23600 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23600 - 23616 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23616 - 23632 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23632 - 23648 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23648 - 23664 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23664 - 23680 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23680 - 23696 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23696 - 23712 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23712 - 23728 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23728 - 23744 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23744 - 23760 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23760 - 23776 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23776 - 23792 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23792 - 23808 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23808 - 23824 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23824 - 23840 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23840 - 23856 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23856 - 23872 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23872 - 23888 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23888 - 23904 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23904 - 23920 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 23920 - 23936 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23936 - 23952 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23952 - 23968 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23968 - 23984 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 23984 - 24000 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24000 - 24016 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24016 - 24032 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24032 - 24048 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 24048 - 24064 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 24064 - 24080 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24080 - 24096 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24096 - 24112 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24112 - 24128 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24128 - 24144 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24144 - 24160 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 24160 - 24176 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0 }; static const GBitmap s_fps_background_bitmap = { - .addr = (void*) &s_fps_background_pixels, - .row_size_bytes = 144, - .info_flags = 0x1002, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 144, .h = 168 }, - }, + .addr = (void *)&s_fps_background_pixels, + .row_size_bytes = 144, + .info_flags = 0x1002, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 144, .h = 168}, + }, }; // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_fps_topleft_pixels[] = { - 0xa9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 0 - 16 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16 - 32 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 32 - 48 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 48 - 64 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 64 - 80 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 80 - 96 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 96 - 112 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 112 - 128 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 128 - 144 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 144 - 160 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 160 - 176 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 176 - 192 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 192 - 208 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 208 - 224 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 224 - 240 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 240 - 256 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 256 - 272 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 272 - 288 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xd4, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 288 - 304 */ - 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 304 - 320 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 320 - 336 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 336 - 352 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 352 - 368 */ - 0xc0, 0xc0, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, /* bytes 368 - 384 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 384 - 400 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 400 - 416 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 416 - 432 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, /* bytes 432 - 448 */ - 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xf9, 0xf9, /* bytes 448 - 464 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, /* bytes 464 - 480 */ - 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 480 - 496 */ - 0xd4, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 496 - 512 */ - 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, /* bytes 512 - 528 */ - 0xda, 0xc0, 0xc0, 0xd0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 528 - 544 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 544 - 560 */ - 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 560 - 576 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, /* bytes 576 - 592 */ - 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 592 - 608 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, /* bytes 608 - 624 */ - 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 624 - 640 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 640 - 656 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, /* bytes 656 - 672 */ - 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 672 - 688 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 688 - 704 */ - 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 704 - 720 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xe4, 0xc0, /* bytes 720 - 736 */ - 0xc0, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, /* bytes 736 - 752 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 752 - 768 */ - 0xf9, 0xf9, 0xd4, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 768 - 784 */ - 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 784 - 800 */ - 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 800 - 816 */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 816 - 832 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 832 - 848 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 848 - 864 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 864 - 880 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 880 - 896 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 896 - 912 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 912 - 928 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 928 - 944 */ - 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 944 - 960 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 960 - 976 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 976 - 992 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 992 - 1008 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1008 - 1024 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1024 - 1040 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1040 - 1056 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1056 - 1072 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1072 - 1088 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1088 - 1104 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1104 - 1120 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1120 - 1136 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1136 - 1152 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1152 - 1168 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1168 - 1184 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1184 - 1200 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1200 - 1216 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1216 - 1232 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1232 - 1248 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1248 - 1264 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1264 - 1280 */ - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9 + 0xa9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 0 - 16 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 16 - 32 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 32 - 48 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 48 - 64 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 64 - 80 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 80 - 96 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 96 - 112 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 112 - 128 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 128 - 144 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 144 - 160 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 160 - 176 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 176 - 192 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 192 - 208 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 208 - 224 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 224 - 240 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 240 - 256 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 256 - 272 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 272 - 288 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xd4, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 288 - 304 */ + 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 304 - 320 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 320 - 336 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 336 - 352 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 352 - 368 */ + 0xc0, 0xc0, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, + 0xd6, 0xd6, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, /* bytes 368 - 384 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 384 - 400 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, + 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 400 - 416 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 416 - 432 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, /* bytes 432 - 448 */ + 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xf9, 0xf9, /* bytes 448 - 464 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, /* bytes 464 - 480 */ + 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, + 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 480 - 496 */ + 0xd4, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 496 - 512 */ + 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, + 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, /* bytes 512 - 528 */ + 0xda, 0xc0, 0xc0, 0xd0, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 528 - 544 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, + 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, /* bytes 544 - 560 */ + 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 560 - 576 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, /* bytes 576 - 592 */ + 0xda, 0xda, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xc0, + 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 592 - 608 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xda, 0xda, /* bytes 608 - 624 */ + 0xda, 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, + 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 624 - 640 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 640 - 656 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, /* bytes 656 - 672 */ + 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 672 - 688 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 688 - 704 */ + 0xda, 0xda, 0xda, 0xda, 0xda, 0xc0, 0xc0, 0xc0, + 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 704 - 720 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xe4, 0xc0, /* bytes 720 - 736 */ + 0xc0, 0xc0, 0xc0, 0xda, 0xda, 0xda, 0xda, 0xda, + 0xda, 0xda, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, /* bytes 736 - 752 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 752 - 768 */ + 0xf9, 0xf9, 0xd4, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 768 - 784 */ + 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 784 - 800 */ + 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, /* bytes 800 - 816 */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 816 - 832 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 832 - 848 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 848 - 864 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 864 - 880 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 880 - 896 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, /* bytes 896 - 912 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 912 - 928 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 928 - 944 */ + 0xc0, 0xc0, 0xe9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 944 - 960 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 960 - 976 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xc0, 0xc0, 0xe9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 976 - 992 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 992 - 1008 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xc0, 0xc0, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1008 - 1024 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1024 - 1040 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1040 - 1056 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1056 - 1072 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1072 - 1088 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1088 - 1104 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1104 - 1120 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1120 - 1136 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1136 - 1152 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1152 - 1168 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1168 - 1184 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1184 - 1200 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1200 - 1216 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1216 - 1232 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1232 - 1248 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1248 - 1264 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, /* bytes 1264 - 1280 */ + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, + 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9 }; static const GBitmap s_fps_topleft_bitmap = { - .addr = (void*) &s_fps_topleft_pixels, - .row_size_bytes = 36, - .info_flags = 0x1002, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 36, .h = 36 }, - }, + .addr = (void *)&s_fps_topleft_pixels, + .row_size_bytes = 36, + .info_flags = 0x1002, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 36, .h = 36}, + }, }; -#else //CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 +#else // CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_fps_background_pixels[] = { - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 48 - 64 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 64 - 80 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 80 - 96 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 96 - 112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 112 - 128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 128 - 144 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 208 - 224 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 224 - 240 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 240 - 256 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 256 - 272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 272 - 288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 288 - 304 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 304 - 320 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 320 - 336 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 336 - 352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 352 - 368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 368 - 384 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 432 - 448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 448 - 464 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 464 - 480 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 480 - 496 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 496 - 512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 512 - 528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 528 - 544 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 544 - 560 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 560 - 576 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 576 - 592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 608 - 624 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 640 - 656 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 656 - 672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 672 - 688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 688 - 704 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 704 - 720 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 720 - 736 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 736 - 752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 752 - 768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 768 - 784 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 784 - 800 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 848 - 864 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 864 - 880 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 880 - 896 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 896 - 912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 912 - 928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 928 - 944 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 944 - 960 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 960 - 976 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 976 - 992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 992 - 1008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1008 - 1024 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1056 - 1072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1072 - 1088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1088 - 1104 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1104 - 1120 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1120 - 1136 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1136 - 1152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1152 - 1168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1168 - 1184 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1184 - 1200 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1200 - 1216 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1248 - 1264 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1264 - 1280 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1280 - 1296 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1296 - 1312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1312 - 1328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1328 - 1344 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1344 - 1360 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1360 - 1376 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1376 - 1392 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1392 - 1408 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1408 - 1424 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1472 - 1488 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1488 - 1504 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1504 - 1520 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1520 - 1536 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1536 - 1552 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1552 - 1568 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1568 - 1584 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1584 - 1600 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1600 - 1616 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1616 - 1632 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1648 - 1664 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1680 - 1696 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1696 - 1712 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1712 - 1728 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1728 - 1744 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1744 - 1760 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1760 - 1776 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1776 - 1792 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1792 - 1808 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1808 - 1824 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1824 - 1840 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1888 - 1904 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1904 - 1920 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1920 - 1936 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1936 - 1952 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1952 - 1968 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1968 - 1984 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1984 - 2000 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2000 - 2016 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2016 - 2032 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2032 - 2048 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2048 - 2064 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2096 - 2112 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2112 - 2128 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2128 - 2144 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2144 - 2160 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2160 - 2176 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2176 - 2192 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2192 - 2208 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2208 - 2224 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2224 - 2240 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2240 - 2256 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2288 - 2304 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2304 - 2320 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2320 - 2336 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2336 - 2352 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2352 - 2368 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2368 - 2384 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2384 - 2400 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2400 - 2416 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2416 - 2432 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2432 - 2448 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2448 - 2464 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2512 - 2528 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2528 - 2544 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2544 - 2560 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2560 - 2576 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2576 - 2592 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2592 - 2608 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2608 - 2624 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2624 - 2640 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2640 - 2656 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2656 - 2672 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2688 - 2704 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2720 - 2736 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2736 - 2752 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2752 - 2768 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2768 - 2784 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2784 - 2800 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2800 - 2816 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2816 - 2832 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2832 - 2848 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2848 - 2864 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2864 - 2880 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2928 - 2944 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2944 - 2960 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2960 - 2976 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2976 - 2992 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2992 - 3008 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3008 - 3024 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3024 - 3040 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3040 - 3056 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3056 - 3072 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3072 - 3088 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3088 - 3104 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3136 - 3152 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3152 - 3168 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3168 - 3184 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3184 - 3200 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3200 - 3216 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3216 - 3232 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3232 - 3248 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3248 - 3264 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3264 - 3280 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3280 - 3296 */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3328 - 3344 */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 48 - 64 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 64 - 80 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 80 - 96 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 96 - 112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 112 - 128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 128 - 144 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 208 - 224 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 224 - 240 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 240 - 256 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 256 - 272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 272 - 288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 288 - 304 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 304 - 320 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 320 - 336 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 336 - 352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 352 - 368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 368 - 384 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 384 - 400 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 400 - 416 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 416 - 432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 432 - 448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 448 - 464 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 464 - 480 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 480 - 496 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 496 - 512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 512 - 528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 528 - 544 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 544 - 560 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 560 - 576 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 576 - 592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 592 - 608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 608 - 624 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 624 - 640 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 640 - 656 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 656 - 672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 672 - 688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 688 - 704 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 704 - 720 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 720 - 736 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 736 - 752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 752 - 768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 768 - 784 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 784 - 800 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 800 - 816 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 816 - 832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 832 - 848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 848 - 864 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 864 - 880 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 880 - 896 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 896 - 912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 912 - 928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 928 - 944 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 944 - 960 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 960 - 976 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 976 - 992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 992 - 1008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1008 - 1024 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1024 - 1040 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1040 - 1056 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1056 - 1072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1072 - 1088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1088 - 1104 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1104 - 1120 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1120 - 1136 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1136 - 1152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1152 - 1168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1168 - 1184 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1184 - 1200 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1200 - 1216 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1216 - 1232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1232 - 1248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1248 - 1264 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1264 - 1280 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1280 - 1296 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1296 - 1312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1312 - 1328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1328 - 1344 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1344 - 1360 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1360 - 1376 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1376 - 1392 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1392 - 1408 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1408 - 1424 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1424 - 1440 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1440 - 1456 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1456 - 1472 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1472 - 1488 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1488 - 1504 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1504 - 1520 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1520 - 1536 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1536 - 1552 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1552 - 1568 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1568 - 1584 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1584 - 1600 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1600 - 1616 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1616 - 1632 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1632 - 1648 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1648 - 1664 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1664 - 1680 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1680 - 1696 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1696 - 1712 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1712 - 1728 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1728 - 1744 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1744 - 1760 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1760 - 1776 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1776 - 1792 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1792 - 1808 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1808 - 1824 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1824 - 1840 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1840 - 1856 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1856 - 1872 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1872 - 1888 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1888 - 1904 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1904 - 1920 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1920 - 1936 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1936 - 1952 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 1952 - 1968 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 1968 - 1984 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 1984 - 2000 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2000 - 2016 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2016 - 2032 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2032 - 2048 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2048 - 2064 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2064 - 2080 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2080 - 2096 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2096 - 2112 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2112 - 2128 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2128 - 2144 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2144 - 2160 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2160 - 2176 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2176 - 2192 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2192 - 2208 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2208 - 2224 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2224 - 2240 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2240 - 2256 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2256 - 2272 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2272 - 2288 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2288 - 2304 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2304 - 2320 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2320 - 2336 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2336 - 2352 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2352 - 2368 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2368 - 2384 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2384 - 2400 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2400 - 2416 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2416 - 2432 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2432 - 2448 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2448 - 2464 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2464 - 2480 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2480 - 2496 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2496 - 2512 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2512 - 2528 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2528 - 2544 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2544 - 2560 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2560 - 2576 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2576 - 2592 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2592 - 2608 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2608 - 2624 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2624 - 2640 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2640 - 2656 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2656 - 2672 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2672 - 2688 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2688 - 2704 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2704 - 2720 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2720 - 2736 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2736 - 2752 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2752 - 2768 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2768 - 2784 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2784 - 2800 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2800 - 2816 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2816 - 2832 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2832 - 2848 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2848 - 2864 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2864 - 2880 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2880 - 2896 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2896 - 2912 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2912 - 2928 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 2928 - 2944 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2944 - 2960 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2960 - 2976 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 2976 - 2992 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 2992 - 3008 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3008 - 3024 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3024 - 3040 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3040 - 3056 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3056 - 3072 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3072 - 3088 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3088 - 3104 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3104 - 3120 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3120 - 3136 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3136 - 3152 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3152 - 3168 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3168 - 3184 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3184 - 3200 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3200 - 3216 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3216 - 3232 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3232 - 3248 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3248 - 3264 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3264 - 3280 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3280 - 3296 */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 3296 - 3312 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 3312 - 3328 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* bytes 3328 - 3344 */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; static const GBitmap s_fps_background_bitmap = { - .addr = (void*) &s_fps_background_pixels, + .addr = (void *)&s_fps_background_pixels, .row_size_bytes = 20, .info_flags = 0x1000, .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 144, .h = 168 }, + .origin = {.x = 0, .y = 0}, + .size = {.w = 144, .h = 168}, }, }; - // GBitmap + pixel data generated by bitmapgen.py: static const uint8_t s_fps_topleft_pixels[] = { - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 48 - 64 */ - 0xff, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 64 - 80 */ - 0xff, 0xfc, 0xf3, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x03, 0xc0, 0x0f, 0x00, 0x00, 0x00, /* bytes 80 - 96 */ - 0xff, 0xfc, 0x03, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0xf3, 0xe3, 0x0f, 0x00, 0x00, 0x00, /* bytes 96 - 112 */ - 0xff, 0xfc, 0xf3, 0xf1, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0xf3, 0xf8, 0x0f, 0x00, 0x00, 0x00, /* bytes 112 - 128 */ - 0xff, 0xfc, 0x73, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x73, 0xfc, 0x0f, 0x00, 0x00, 0x00, /* bytes 128 - 144 */ - 0xff, 0x00, 0xf0, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf0, 0xf1, 0x0f, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ - 0xff, 0x7c, 0xf8, 0xe3, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ - 0xff, 0x7c, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ - 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ - 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ - 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 224 - 240 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 240 - 256 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 256 - 272 */ - 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 48 - 64 */ + 0xff, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 64 - 80 */ + 0xff, 0xfc, 0xf3, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0x03, 0xc0, 0x0f, 0x00, 0x00, 0x00, /* bytes 80 - 96 */ + 0xff, 0xfc, 0x03, 0xc0, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0xf3, 0xe3, 0x0f, 0x00, 0x00, 0x00, /* bytes 96 - 112 */ + 0xff, 0xfc, 0xf3, 0xf1, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0xf3, 0xf8, 0x0f, 0x00, 0x00, 0x00, /* bytes 112 - 128 */ + 0xff, 0xfc, 0x73, 0xfc, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0x73, 0xfc, 0x0f, 0x00, 0x00, 0x00, /* bytes 128 - 144 */ + 0xff, 0x00, 0xf0, 0xf8, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0x00, 0xf0, 0xf1, 0x0f, 0x00, 0x00, 0x00, /* bytes 144 - 160 */ + 0xff, 0x7c, 0xf8, 0xe3, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0x3c, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, /* bytes 160 - 176 */ + 0xff, 0x7c, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 176 - 192 */ + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 192 - 208 */ + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 208 - 224 */ + 0xff, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 224 - 240 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 240 - 256 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, /* bytes 256 - 272 */ + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, }; static const GBitmap s_fps_topleft_bitmap = { - .addr = (void*) &s_fps_topleft_pixels, + .addr = (void *)&s_fps_topleft_pixels, .row_size_bytes = 8, .info_flags = 0x1000, .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 36, .h = 36 }, + .origin = {.x = 0, .y = 0}, + .size = {.w = 36, .h = 36}, }, }; diff --git a/src/fw/apps/demo/fs_resources/test_fs_resources.c b/src/fw/apps/demo/fs_resources/test_fs_resources.c index c49be0d5ab..3578e563fc 100644 --- a/src/fw/apps/demo/fs_resources/test_fs_resources.c +++ b/src/fw/apps/demo/fs_resources/test_fs_resources.c @@ -30,9 +30,9 @@ static void push_window(FSResourceAppData *data) { Window *window = &data->window; window_init(window, WINDOW_NAME("FS Resource Demo")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -40,7 +40,7 @@ static void push_window(FSResourceAppData *data) { //////////////////// // App boilerplate static void handle_init(void) { - FSResourceAppData *data = (FSResourceAppData*) app_malloc_check(sizeof(FSResourceAppData)); + FSResourceAppData *data = (FSResourceAppData *)app_malloc_check(sizeof(FSResourceAppData)); if (data == NULL) { PBL_CROAK("Out of memory"); } @@ -61,12 +61,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* fs_resources_app_get_info() { +const PebbleProcessMd *fs_resources_app_get_info() { static const PebbleProcessMdSystem s_fs_resources_app_info = { - .common.main_func = s_main, - .name = "FS Resources" + .common.main_func = s_main, + .name = "FS Resources" }; - return (const PebbleProcessMd*) &s_fs_resources_app_info; + return (const PebbleProcessMd *)&s_fs_resources_app_info; } - - diff --git a/src/fw/apps/demo/fs_resources/test_fs_resources.h b/src/fw/apps/demo/fs_resources/test_fs_resources.h index cc557e9b1b..f705c1e829 100644 --- a/src/fw/apps/demo/fs_resources/test_fs_resources.h +++ b/src/fw/apps/demo/fs_resources/test_fs_resources.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* fs_resources_app_get_info(); +const PebbleProcessMd *fs_resources_app_get_info(); diff --git a/src/fw/apps/demo/fw_update_progress_sim/fw_update_progress_sim.c b/src/fw/apps/demo/fw_update_progress_sim/fw_update_progress_sim.c index 990e143327..8edb6c7bb6 100644 --- a/src/fw/apps/demo/fw_update_progress_sim/fw_update_progress_sim.c +++ b/src/fw/apps/demo/fw_update_progress_sim/fw_update_progress_sim.c @@ -22,8 +22,8 @@ // Used to force the progress bar to start at PROG_LAYER_START_VAL and scale // the rest of the progress between that value and MAX_PROGRESS_PERCENT #define PROG_LAYER_TRANSFORM(real_prog) \ - (PROG_LAYER_START_VAL + (real_prog * \ - (MAX_PROGRESS_PERCENT - PROG_LAYER_START_VAL) / MAX_PROGRESS_PERCENT)) + (PROG_LAYER_START_VAL + \ + (real_prog * (MAX_PROGRESS_PERCENT - PROG_LAYER_START_VAL) / MAX_PROGRESS_PERCENT)) typedef struct { Window window; @@ -35,8 +35,8 @@ typedef struct { } FwUpdateProgressSimData; static void prv_update_progress_text(FwUpdateProgressSimData *data) { - sniprintf(data->percent_done_text_buffer, - sizeof(data->percent_done_text_buffer), "%u%%", data->percent_complete); + sniprintf(data->percent_done_text_buffer, sizeof(data->percent_done_text_buffer), "%u%%", + data->percent_complete); layer_mark_dirty(&data->percent_done_text_layer.layer); } @@ -55,8 +55,7 @@ static void prv_refresh_progress(void *data_in) { } prv_update_progress_text(data); - progress_layer_set_progress(&data->progress_layer, - PROG_LAYER_TRANSFORM(data->percent_complete)); + progress_layer_set_progress(&data->progress_layer, PROG_LAYER_TRANSFORM(data->percent_complete)); data->timer = app_timer_register(delay, prv_refresh_progress, data); } @@ -69,19 +68,18 @@ static void prv_window_load_handler(Window *window) { const int16_t x_offset = (window->layer.bounds.size.w - load_bar_length) / 2; const int16_t y_offset_progress = (window->layer.bounds.size.h - load_bar_height) / 2; const int16_t y_offset_text = y_offset_progress - 38; - const GRect progress_bounds = GRect(x_offset, y_offset_progress, load_bar_length, load_bar_height); + const GRect progress_bounds = + GRect(x_offset, y_offset_progress, load_bar_length, load_bar_height); ProgressLayer *progress_layer = &data->progress_layer; progress_layer_init(progress_layer, &progress_bounds); progress_layer_set_corner_radius(progress_layer, 3); layer_add_child(&window->layer, &progress_layer->layer); TextLayer *percent_done_text_layer = &data->percent_done_text_layer; - text_layer_init_with_parameters(percent_done_text_layer, - &GRect(0, y_offset_text, window->layer.bounds.size.w, 30), - data->percent_done_text_buffer, - fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), - GColorBlack, GColorClear, GTextAlignmentCenter, - GTextOverflowModeTrailingEllipsis); + text_layer_init_with_parameters( + percent_done_text_layer, &GRect(0, y_offset_text, window->layer.bounds.size.w, 30), + data->percent_done_text_buffer, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), GColorBlack, + GColorClear, GTextAlignmentCenter, GTextOverflowModeTrailingEllipsis); layer_add_child(&window->layer, &percent_done_text_layer->layer); data->percent_complete = 0; @@ -106,10 +104,10 @@ static void prv_handle_init(void) { window_init(window, WINDOW_NAME("FW Update Progress Sim")); window_set_background_color(window, PBL_IF_COLOR_ELSE(GColorLightGray, GColorWhite)); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load_handler, - .unload = prv_window_unload_handler, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load_handler, + .unload = prv_window_unload_handler, + }); app_window_stack_push(window, true); } @@ -128,8 +126,8 @@ static void prv_main(void) { const PebbleProcessMd *fw_update_progress_sim_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &prv_main, - .name = "FW Update Progress Sim", + .common.main_func = &prv_main, + .name = "FW Update Progress Sim", }; - return (const PebbleProcessMd *) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/gdrawmask_demo/gdrawmask_demo.c b/src/fw/apps/demo/gdrawmask_demo/gdrawmask_demo.c index 5398e748cf..b75db9ea26 100644 --- a/src/fw/apps/demo/gdrawmask_demo/gdrawmask_demo.c +++ b/src/fw/apps/demo/gdrawmask_demo/gdrawmask_demo.c @@ -35,8 +35,8 @@ void prv_fill_mask_shape(GContext *ctx, const GRect *layer_bounds, const GSize * // Calculate the radial rect const GRect inset_layer_bounds = grect_inset((*layer_bounds), GEdgeInsets(shape_size->h / 2)); - const GRect shape_rect = grect_centered_from_polar(inset_layer_bounds, oval_scale_mode, - current_angle, (*shape_size)); + const GRect shape_rect = + grect_centered_from_polar(inset_layer_bounds, oval_scale_mode, current_angle, (*shape_size)); // Fill the radial circle graphics_fill_oval(ctx, shape_rect, oval_scale_mode); @@ -71,21 +71,16 @@ static void prv_layer_update_proc(Layer *layer, GContext *ctx) { sys_get_time_ms(&system_time_seconds, &system_time_ms); const uint16_t current_time_progress_ms = - (uint16_t)((system_time_seconds % (full_revolution_time_ms / MS_PER_SECOND)) * MS_PER_SECOND + - (system_time_ms % MS_PER_SECOND)); + (uint16_t)((system_time_seconds % (full_revolution_time_ms / MS_PER_SECOND)) * MS_PER_SECOND + + (system_time_ms % MS_PER_SECOND)); const AnimationProgress animation_progress = - current_time_progress_ms * ANIMATION_NORMALIZED_MAX / full_revolution_time_ms; + current_time_progress_ms * ANIMATION_NORMALIZED_MAX / full_revolution_time_ms; - const GColor mask_colors[3] = { - GColorLightGray, - GColorDarkGray, - GColorBlack - }; + const GColor mask_colors[3] = {GColorLightGray, GColorDarkGray, GColorBlack}; const unsigned int num_mask_levels = ARRAY_LENGTH(mask_colors); - const int16_t shape_width = - (int16_t)(MIN(layer_bounds.size.w, layer_bounds.size.h) / 2); + const int16_t shape_width = (int16_t)(MIN(layer_bounds.size.w, layer_bounds.size.h) / 2); const GSize shape_size = GSize(shape_width, shape_width); for (unsigned int i = 0; i < num_mask_levels; i++) { @@ -93,7 +88,7 @@ static void prv_layer_update_proc(Layer *layer, GContext *ctx) { // Offset the angle to space each of the mask shapes equally apart const uint32_t starting_angle = (i * TRIG_MAX_ANGLE / num_mask_levels); const int32_t progress_angle_delta = - animation_progress * TRIG_MAX_ANGLE / ANIMATION_NORMALIZED_MAX; + animation_progress * TRIG_MAX_ANGLE / ANIMATION_NORMALIZED_MAX; const int32_t current_angle = normalize_angle(starting_angle + progress_angle_delta); // Set the color to fill, progressing through each of the mask levels @@ -134,8 +129,8 @@ static void handle_init(void) { window_init(window, WINDOW_NAME("GDrawMask Demo")); window_set_user_data(window, data); window_set_window_handlers(window, &(WindowHandlers){ - .load = prv_window_load, - }); + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); @@ -156,8 +151,8 @@ static void s_main(void) { const PebbleProcessMd *gdrawmask_demo_get_app_info() { static const PebbleProcessMdSystem gdrawmask_demo_app_info = { - .common.main_func = s_main, - .name = "GDrawMask Demo" + .common.main_func = s_main, + .name = "GDrawMask Demo" }; - return (const PebbleProcessMd*) &gdrawmask_demo_app_info; + return (const PebbleProcessMd *)&gdrawmask_demo_app_info; } diff --git a/src/fw/apps/demo/gfx_tests/circles.c b/src/fw/apps/demo/gfx_tests/circles.c index fa3075d642..5d5353c2ec 100644 --- a/src/fw/apps/demo/gfx_tests/circles.c +++ b/src/fw/apps/demo/gfx_tests/circles.c @@ -13,10 +13,8 @@ static int32_t angle_start; static int32_t angle_end; static void prv_setup_data(GRect bounds) { - center = GPoint(bounds.origin.x + (bounds.size.w / 2), - bounds.origin.y + (bounds.size.h / 2)); - rect = GRect(center.x - (outer_size / 2), center.y - (outer_size / 2), - outer_size, outer_size); + center = GPoint(bounds.origin.x + (bounds.size.w / 2), bounds.origin.y + (bounds.size.h / 2)); + rect = GRect(center.x - (outer_size / 2), center.y - (outer_size / 2), outer_size, outer_size); inset = outer_size - inner_size; scale_mode = GOvalScaleModeFitCircle; } @@ -125,94 +123,94 @@ static void prv_setup_odd_full(Window *window) { prv_setup_data(bounds); } -static void prv_test_radial(Layer *layer, GContext* ctx) { - GColor color = { .argb = (uint8_t) rand() }; +static void prv_test_radial(Layer *layer, GContext *ctx) { + GColor color = {.argb = (uint8_t)rand()}; graphics_context_set_fill_color(ctx, color); graphics_fill_radial(ctx, rect, GOvalScaleModeFillCircle, inset, angle_start, angle_end); } -static void prv_test_circle(Layer *layer, GContext* ctx) { - GColor color = { .argb = (uint8_t) rand() }; +static void prv_test_circle(Layer *layer, GContext *ctx) { + GColor color = {.argb = (uint8_t)rand()}; graphics_context_set_fill_color(ctx, color); graphics_fill_circle(ctx, center, (outer_size / 2)); } GfxTest g_gfx_test_annulus_even_fill_angles = { - .name = "Annulus Even Angles", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test_radial, - .setup = prv_setup_even_angles_inner, + .name = "Annulus Even Angles", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test_radial, + .setup = prv_setup_even_angles_inner, }; GfxTest g_gfx_test_annulus_odd_fill_angles = { - .name = "Annulus Odd Angles", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test_radial, - .setup = prv_setup_odd_angles_inner, + .name = "Annulus Odd Angles", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test_radial, + .setup = prv_setup_odd_angles_inner, }; GfxTest g_gfx_test_annulus_even_fill = { - .name = "Annulus Even", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test_radial, - .setup = prv_setup_even_inner, + .name = "Annulus Even", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test_radial, + .setup = prv_setup_even_inner, }; GfxTest g_gfx_test_annulus_odd_fill = { - .name = "Annulus Odd", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test_radial, - .setup = prv_setup_odd_inner, + .name = "Annulus Odd", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test_radial, + .setup = prv_setup_odd_inner, }; GfxTest g_gfx_test_radial_even_fill_angles = { - .name = "Radial Even Angles", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test_radial, - .setup = prv_setup_even_angles_full, + .name = "Radial Even Angles", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test_radial, + .setup = prv_setup_even_angles_full, }; GfxTest g_gfx_test_radial_odd_fill_angles = { - .name = "Radial Odd Angles", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test_radial, - .setup = prv_setup_odd_angles_full, + .name = "Radial Odd Angles", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test_radial, + .setup = prv_setup_odd_angles_full, }; GfxTest g_gfx_test_radial_even_fill = { - .name = "Radial Even", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test_radial, - .setup = prv_setup_even_full, + .name = "Radial Even", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test_radial, + .setup = prv_setup_even_full, }; GfxTest g_gfx_test_radial_odd_fill = { - .name = "Radial Odd", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test_radial, - .setup = prv_setup_odd_full, + .name = "Radial Odd", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test_radial, + .setup = prv_setup_odd_full, }; GfxTest g_gfx_test_circle_even = { - .name = "Circle Even", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test_circle, - .setup = prv_setup_even_full, + .name = "Circle Even", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test_circle, + .setup = prv_setup_even_full, }; GfxTest g_gfx_test_circle_odd = { - .name = "Circle Odd", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test_circle, - .setup = prv_setup_odd_full, + .name = "Circle Odd", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test_circle, + .setup = prv_setup_odd_full, }; diff --git a/src/fw/apps/demo/gfx_tests/gpath_masking.c b/src/fw/apps/demo/gfx_tests/gpath_masking.c index 29ed79c80a..cf49ec864e 100644 --- a/src/fw/apps/demo/gfx_tests/gpath_masking.c +++ b/src/fw/apps/demo/gfx_tests/gpath_masking.c @@ -3,35 +3,30 @@ #include "tests.h" -static void prv_test(Layer *layer, GContext* ctx); +static void prv_test(Layer *layer, GContext *ctx); GfxTest g_gfx_test_gpath_masking = { - .name = "GPath masking", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test, + .name = "GPath masking", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test, }; static const GPathInfo s_triangle_mask = { - .num_points = 3, - .points = (GPoint[]) { - {0, 0}, - {50, 50}, - {50, -50} - } + .num_points = 3, .points = (GPoint[]){{0, 0}, {50, 50}, {50, -50}} }; -static void prv_test(Layer *layer, GContext* ctx) { +static void prv_test(Layer *layer, GContext *ctx) { GRect bounds = layer->bounds; - GPoint center = GPoint(bounds.size.w/2, bounds.size.h/2); + GPoint center = GPoint(bounds.size.w / 2, bounds.size.h / 2); int outer_radius = 50; int inner_radius = 35; GPath *mask = gpath_create(&s_triangle_mask); gpath_move_to(mask, center); - GColor color = { .argb = (uint8_t) rand() }; - GColor bg_color = { .argb = (uint8_t) rand() }; + GColor color = {.argb = (uint8_t)rand()}; + GColor bg_color = {.argb = (uint8_t)rand()}; graphics_context_set_fill_color(ctx, color); graphics_fill_circle(ctx, center, outer_radius); diff --git a/src/fw/apps/demo/gfx_tests/rotated_bitmap.c b/src/fw/apps/demo/gfx_tests/rotated_bitmap.c index 8aa886d3f1..6aa85fac55 100644 --- a/src/fw/apps/demo/gfx_tests/rotated_bitmap.c +++ b/src/fw/apps/demo/gfx_tests/rotated_bitmap.c @@ -12,15 +12,15 @@ static GPoint bitmap_64_center = {64 / 2, 64 / 2}; static void prv_setup(Window *window) { #if CONFIG_SCREEN_COLOR_DEPTH_BITS == 1 - s_gfx_rotated_bitmap_bitmap = gbitmap_create_blank(GSize(DISP_COLS, DISP_ROWS), - GBitmapFormat1Bit); + s_gfx_rotated_bitmap_bitmap = + gbitmap_create_blank(GSize(DISP_COLS, DISP_ROWS), GBitmapFormat1Bit); s_gfx_rotated_bitmap_64_bitmap = gbitmap_create_blank(GSize(64, 64), GBitmapFormat1Bit); - uint32_t size_full = (DISP_COLS*DISP_ROWS)/8; + uint32_t size_full = (DISP_COLS * DISP_ROWS) / 8; #else - s_gfx_rotated_bitmap_bitmap = gbitmap_create_blank(GSize(DISP_COLS, DISP_ROWS), - GBitmapFormat8Bit); + s_gfx_rotated_bitmap_bitmap = + gbitmap_create_blank(GSize(DISP_COLS, DISP_ROWS), GBitmapFormat8Bit); s_gfx_rotated_bitmap_64_bitmap = gbitmap_create_blank(GSize(64, 64), GBitmapFormat8Bit); - uint32_t size_full = (DISP_COLS*DISP_ROWS); + uint32_t size_full = (DISP_COLS * DISP_ROWS); #endif uint8_t *s_gfx_rotated_bitmap_pixels = s_gfx_rotated_bitmap_bitmap->addr; // Init images @@ -29,9 +29,9 @@ static void prv_setup(Window *window) { } #if CONFIG_SCREEN_COLOR_DEPTH_BITS == 1 - uint32_t size_64 = (64*64)/8; + uint32_t size_64 = (64 * 64) / 8; #else - uint32_t size_64 = (64*64); + uint32_t size_64 = (64 * 64); #endif uint8_t *s_gfx_rotated_bitmap_64_pixels = s_gfx_rotated_bitmap_64_bitmap->addr; for (uint32_t index = 0; index < size_64; index++) { @@ -39,52 +39,52 @@ static void prv_setup(Window *window) { } } -static void prv_test_0_assign(Layer *layer, GContext* ctx) { +static void prv_test_0_assign(Layer *layer, GContext *ctx) { graphics_context_set_compositing_mode(ctx, GCompOpAssign); - graphics_draw_rotated_bitmap(ctx, (GBitmap*)&s_gfx_rotated_bitmap_bitmap, - GPointZero, 0, GPointZero); + graphics_draw_rotated_bitmap(ctx, (GBitmap *)&s_gfx_rotated_bitmap_bitmap, GPointZero, 0, + GPointZero); } -static void prv_test_0_set(Layer *layer, GContext* ctx) { +static void prv_test_0_set(Layer *layer, GContext *ctx) { graphics_context_set_compositing_mode(ctx, GCompOpSet); - graphics_draw_rotated_bitmap(ctx, (GBitmap*)&s_gfx_rotated_bitmap_bitmap, - GPointZero, 0, GPointZero); + graphics_draw_rotated_bitmap(ctx, (GBitmap *)&s_gfx_rotated_bitmap_bitmap, GPointZero, 0, + GPointZero); } -static void prv_test_45_assign(Layer *layer, GContext* ctx) { +static void prv_test_45_assign(Layer *layer, GContext *ctx) { graphics_context_set_compositing_mode(ctx, GCompOpAssign); - graphics_draw_rotated_bitmap(ctx, (GBitmap*)&s_gfx_rotated_bitmap_bitmap, - bitmap_center, DEG_TO_TRIGANGLE(45), bitmap_center); + graphics_draw_rotated_bitmap(ctx, (GBitmap *)&s_gfx_rotated_bitmap_bitmap, bitmap_center, + DEG_TO_TRIGANGLE(45), bitmap_center); } -static void prv_test_45_set(Layer *layer, GContext* ctx) { +static void prv_test_45_set(Layer *layer, GContext *ctx) { graphics_context_set_compositing_mode(ctx, GCompOpSet); - graphics_draw_rotated_bitmap(ctx, (GBitmap*)&s_gfx_rotated_bitmap_bitmap, - bitmap_center, DEG_TO_TRIGANGLE(45), bitmap_center); + graphics_draw_rotated_bitmap(ctx, (GBitmap *)&s_gfx_rotated_bitmap_bitmap, bitmap_center, + DEG_TO_TRIGANGLE(45), bitmap_center); } -static void prv_test_0_assign_64px(Layer *layer, GContext* ctx) { +static void prv_test_0_assign_64px(Layer *layer, GContext *ctx) { graphics_context_set_compositing_mode(ctx, GCompOpAssign); - graphics_draw_rotated_bitmap(ctx, (GBitmap*)&s_gfx_rotated_bitmap_64_bitmap, - GPointZero, 0, GPointZero); + graphics_draw_rotated_bitmap(ctx, (GBitmap *)&s_gfx_rotated_bitmap_64_bitmap, GPointZero, 0, + GPointZero); } -static void prv_test_0_set_64px(Layer *layer, GContext* ctx) { +static void prv_test_0_set_64px(Layer *layer, GContext *ctx) { graphics_context_set_compositing_mode(ctx, GCompOpSet); - graphics_draw_rotated_bitmap(ctx, (GBitmap*)&s_gfx_rotated_bitmap_64_bitmap, - GPointZero, 0, GPointZero); + graphics_draw_rotated_bitmap(ctx, (GBitmap *)&s_gfx_rotated_bitmap_64_bitmap, GPointZero, 0, + GPointZero); } -static void prv_test_45_assign_64px(Layer *layer, GContext* ctx) { +static void prv_test_45_assign_64px(Layer *layer, GContext *ctx) { graphics_context_set_compositing_mode(ctx, GCompOpAssign); - graphics_draw_rotated_bitmap(ctx, (GBitmap*)&s_gfx_rotated_bitmap_64_bitmap, - bitmap_64_center, DEG_TO_TRIGANGLE(45), bitmap_64_center); + graphics_draw_rotated_bitmap(ctx, (GBitmap *)&s_gfx_rotated_bitmap_64_bitmap, bitmap_64_center, + DEG_TO_TRIGANGLE(45), bitmap_64_center); } -static void prv_test_45_set_64px(Layer *layer, GContext* ctx) { +static void prv_test_45_set_64px(Layer *layer, GContext *ctx) { graphics_context_set_compositing_mode(ctx, GCompOpSet); - graphics_draw_rotated_bitmap(ctx, (GBitmap*)&s_gfx_rotated_bitmap_64_bitmap, - bitmap_64_center, DEG_TO_TRIGANGLE(45), bitmap_64_center); + graphics_draw_rotated_bitmap(ctx, (GBitmap *)&s_gfx_rotated_bitmap_64_bitmap, bitmap_64_center, + DEG_TO_TRIGANGLE(45), bitmap_64_center); } static void prv_teardown(Window *window) { @@ -93,73 +93,73 @@ static void prv_teardown(Window *window) { } GfxTest g_gfx_test_rotated_bitmap_0_assign = { - .name = "RotBit 0-A-full", - .duration = 5, - .unit_multiple = 1, - .test_proc = prv_test_0_assign, - .setup = prv_setup, - .teardown = prv_teardown, + .name = "RotBit 0-A-full", + .duration = 5, + .unit_multiple = 1, + .test_proc = prv_test_0_assign, + .setup = prv_setup, + .teardown = prv_teardown, }; GfxTest g_gfx_test_rotated_bitmap_0_set = { - .name = "RotBit 0-S-full", - .duration = 5, - .unit_multiple = 1, - .test_proc = prv_test_0_set, - .setup = prv_setup, - .teardown = prv_teardown, + .name = "RotBit 0-S-full", + .duration = 5, + .unit_multiple = 1, + .test_proc = prv_test_0_set, + .setup = prv_setup, + .teardown = prv_teardown, }; GfxTest g_gfx_test_rotated_bitmap_45_assign = { - .name = "RotBit-45-A-full", - .duration = 5, - .unit_multiple = 1, - .test_proc = prv_test_45_assign, - .setup = prv_setup, - .teardown = prv_teardown, + .name = "RotBit-45-A-full", + .duration = 5, + .unit_multiple = 1, + .test_proc = prv_test_45_assign, + .setup = prv_setup, + .teardown = prv_teardown, }; GfxTest g_gfx_test_rotated_bitmap_45_set = { - .name = "RotBit-45-S-full", - .duration = 5, - .unit_multiple = 1, - .test_proc = prv_test_45_set, - .setup = prv_setup, - .teardown = prv_teardown, + .name = "RotBit-45-S-full", + .duration = 5, + .unit_multiple = 1, + .test_proc = prv_test_45_set, + .setup = prv_setup, + .teardown = prv_teardown, }; GfxTest g_gfx_test_rotated_bitmap_0_assign_64px = { - .name = "RotBit-0-A-64px", - .duration = 5, - .unit_multiple = 1, - .test_proc = prv_test_0_assign_64px, - .setup = prv_setup, - .teardown = prv_teardown, + .name = "RotBit-0-A-64px", + .duration = 5, + .unit_multiple = 1, + .test_proc = prv_test_0_assign_64px, + .setup = prv_setup, + .teardown = prv_teardown, }; GfxTest g_gfx_test_rotated_bitmap_0_set_64px = { - .name = "RotBit-0-S-64px", - .duration = 5, - .unit_multiple = 1, - .test_proc = prv_test_0_set_64px, - .setup = prv_setup, - .teardown = prv_teardown, + .name = "RotBit-0-S-64px", + .duration = 5, + .unit_multiple = 1, + .test_proc = prv_test_0_set_64px, + .setup = prv_setup, + .teardown = prv_teardown, }; GfxTest g_gfx_test_rotated_bitmap_45_assign_64px = { - .name = "RotBit-45-A-64px", - .duration = 5, - .unit_multiple = 1, - .test_proc = prv_test_45_assign_64px, - .setup = prv_setup, - .teardown = prv_teardown, + .name = "RotBit-45-A-64px", + .duration = 5, + .unit_multiple = 1, + .test_proc = prv_test_45_assign_64px, + .setup = prv_setup, + .teardown = prv_teardown, }; GfxTest g_gfx_test_rotated_bitmap_45_set_64px = { - .name = "RotBit-45-S-64px", - .duration = 5, - .unit_multiple = 1, - .test_proc = prv_test_45_set_64px, - .setup = prv_setup, - .teardown = prv_teardown, + .name = "RotBit-45-S-64px", + .duration = 5, + .unit_multiple = 1, + .test_proc = prv_test_45_set_64px, + .setup = prv_setup, + .teardown = prv_teardown, }; diff --git a/src/fw/apps/demo/gfx_tests/single_line.c b/src/fw/apps/demo/gfx_tests/single_line.c index 11bd62a0db..27a6c5c2bf 100644 --- a/src/fw/apps/demo/gfx_tests/single_line.c +++ b/src/fw/apps/demo/gfx_tests/single_line.c @@ -3,23 +3,23 @@ #include "tests.h" -static void prv_test(Layer *layer, GContext* ctx); +static void prv_test(Layer *layer, GContext *ctx); GfxTest g_gfx_test_single_line = { - .name = "Single line", - .duration = 1, - .unit_multiple = 1, - .test_proc = prv_test, + .name = "Single line", + .duration = 1, + .unit_multiple = 1, + .test_proc = prv_test, }; -static void prv_test(Layer *layer, GContext* ctx) { +static void prv_test(Layer *layer, GContext *ctx) { GRect bounds = layer->bounds; int16_t x1 = (rand() % bounds.size.w) + bounds.origin.x; int16_t x2 = (rand() % bounds.size.w) + bounds.origin.x; int16_t y1 = (rand() % bounds.size.h) + bounds.origin.y; int16_t y2 = (rand() % bounds.size.h) + bounds.origin.y; - GColor color = { .argb = (uint8_t) rand() }; + GColor color = {.argb = (uint8_t)rand()}; graphics_context_set_stroke_color(ctx, color); - graphics_draw_line(ctx, (GPoint){.x = x1, .y = y1}, (GPoint) {.x = x2, .y = y2}); + graphics_draw_line(ctx, (GPoint){.x = x1, .y = y1}, (GPoint){.x = x2, .y = y2}); } diff --git a/src/fw/apps/demo/gfx_tests/tests.c b/src/fw/apps/demo/gfx_tests/tests.c index 4f570d900f..ada5d2ad79 100644 --- a/src/fw/apps/demo/gfx_tests/tests.c +++ b/src/fw/apps/demo/gfx_tests/tests.c @@ -23,13 +23,14 @@ typedef struct { GfxTest *current_test; } AppData; -#define RAND_SEED (775762732) // Randomly selected -#define US_PER_MS (1000) -#define US_PER_S (1000 * 1000) -#define TARGET_FPS (30) -#define US_PER_FRAME (20 * US_PER_MS) // Upper bound on amount of time available to the rest of - // the system while a frame is being pushed out to the - // display with the cpu clock at 64MHz +#define RAND_SEED (775762732) // Randomly selected +#define US_PER_MS (1000) +#define US_PER_S (1000 * 1000) +#define TARGET_FPS (30) +#define US_PER_FRAME \ + (20 * US_PER_MS) // Upper bound on amount of time available to the rest of + // the system while a frame is being pushed out to the + // display with the cpu clock at 64MHz #define GFX_TEST(name) extern GfxTest g_gfx_test_##name; #include "list.h" @@ -45,11 +46,11 @@ static void prv_pop_test_window(void *data) { app_window_stack_push(&app_data->results_window, false); } -static void prv_test_update_proc(Layer *layer, GContext* ctx) { +static void prv_test_update_proc(Layer *layer, GContext *ctx) { AppData *app_data = window_get_user_data(layer->window); GfxTest *test = app_data->current_test; - srand(RAND_SEED); // Setup rand for routines that need it + srand(RAND_SEED); // Setup rand for routines that need it if (test->setup) { test->setup(layer->window); @@ -78,16 +79,16 @@ static void prv_start_test(GfxTest *test, AppData *app_data) { window_init(window, WINDOW_NAME(test->name)); window_set_user_data(window, app_data); window_set_fullscreen(window, true); - layer_set_update_proc((Layer *) window, prv_test_update_proc); + layer_set_update_proc((Layer *)window, prv_test_update_proc); app_window_stack_push(window, false); } static uint16_t prv_get_num_rows(struct MenuLayer *menu_layer, uint16_t section, void *callback_context) { - return (uint16_t) ARRAY_LENGTH(s_tests); + return (uint16_t)ARRAY_LENGTH(s_tests); } -static void prv_draw_row(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, +static void prv_draw_row(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, void *callback_context) { PBL_ASSERTN(cell_index->row < ARRAY_LENGTH(s_tests)); menu_cell_title_draw(ctx, cell_layer, s_tests[cell_index->row]->name); @@ -111,20 +112,23 @@ static void prv_results_window_load(Window *window) { GfxTest *test = app_data->current_test; - uint32_t avg_us = (10 * total_us) / count; // multiply by 10 to get decimals - uint32_t per_frame = (100 * US_PER_FRAME) / avg_us; // multiply by 100 to get decimals and account - // for x10 in avg_us calc + uint32_t avg_us = (10 * total_us) / count; // multiply by 10 to get decimals + uint32_t per_frame = (100 * US_PER_FRAME) / avg_us; // multiply by 100 to get decimals and + // account for x10 in avg_us calc uint32_t fps = (TARGET_FPS * 100 * US_PER_FRAME) / avg_us; uint32_t unit_per_frame = ((uint64_t)test->unit_multiple * US_PER_FRAME * 100) / avg_us; snprintf(app_data->results_str, sizeof(app_data->results_str), - "%10s\n" - "Avg (µs):\n%"PRIu32".%"PRIu32"\n" - "FPS:\n%"PRIu32".%"PRIu32"\n" - "Per frame @ 30fps:\n%"PRIu32".%"PRIu32"\n" - "Units per frame @ 30fps:\n%"PRIu32".%"PRIu32, - test->name, avg_us / 10, avg_us % 10, fps / 10, fps % 10, per_frame / 10, per_frame % 10, - unit_per_frame / 10, unit_per_frame % 10); + "%10s\n" + "Avg (µs):\n%" PRIu32 ".%" PRIu32 + "\n" + "FPS:\n%" PRIu32 ".%" PRIu32 + "\n" + "Per frame @ 30fps:\n%" PRIu32 ".%" PRIu32 + "\n" + "Units per frame @ 30fps:\n%" PRIu32 ".%" PRIu32, + test->name, avg_us / 10, avg_us % 10, fps / 10, fps % 10, per_frame / 10, per_frame % 10, + unit_per_frame / 10, unit_per_frame % 10); PBL_LOG_DBG("results: %s", app_data->results_str); text_layer_set_text(&app_data->results_text, app_data->results_str); } @@ -149,13 +153,14 @@ static void handle_init(void) { MenuLayer *menu = &app_data->test_menu; menu_layer_init(menu, &window->layer.bounds); - menu_layer_set_callbacks(menu, app_data, &(MenuLayerCallbacks){ - .get_num_rows = prv_get_num_rows, - .draw_row = prv_draw_row, - .select_click = prv_click_handler, - }); + menu_layer_set_callbacks(menu, app_data, + &(MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows, + .draw_row = prv_draw_row, + .select_click = prv_click_handler, + }); menu_layer_set_click_config_onto_window(menu, window); - layer_add_child((Layer *) window, (Layer *) menu); + layer_add_child((Layer *)window, (Layer *)menu); app_window_stack_push(window, true); // Results window @@ -163,16 +168,16 @@ static void handle_init(void) { window_init(window, WINDOW_NAME("Test Results")); window_set_user_data(window, app_data); window_set_fullscreen(window, false); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_results_window_load, - .unload = prv_results_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_results_window_load, + .unload = prv_results_window_unload, + }); window_set_click_config_provider(window, prv_results_window_click_config_provider); TextLayer *text = &app_data->results_text; text_layer_init(text, &window->layer.bounds); text_layer_set_text(text, ""); - layer_add_child((Layer *) window, (Layer *) text); + layer_add_child((Layer *)window, (Layer *)text); } static void s_main(void) { @@ -180,15 +185,17 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* gfx_tests_get_app_info() { +const PebbleProcessMd *gfx_tests_get_app_info() { static const PebbleProcessMdSystem gfx_tests_app_info = { - .name = "GFX Tests", - .common = { - .main_func = &s_main, - // UUID: 06a8126b-d805-4197-af6d-8df3c1efb8e4 - .uuid = { 0x06, 0xa8, 0x12, 0x6b, 0xd8, 0x05, 0x41, 0x97, 0xaf, 0x6d, 0x8d, 0xf3, - 0xc1, 0xef, 0xb8, 0xe4}, - } + .name = "GFX Tests", + .common = { + .main_func = &s_main, + // UUID: 06a8126b-d805-4197-af6d-8df3c1efb8e4 + .uuid = { + 0x06, 0xa8, 0x12, 0x6b, 0xd8, 0x05, 0x41, 0x97, 0xaf, 0x6d, 0x8d, 0xf3, 0xc1, 0xef, + 0xb8, 0xe4 + }, + } }; - return (const PebbleProcessMd*) &gfx_tests_app_info; + return (const PebbleProcessMd *)&gfx_tests_app_info; } diff --git a/src/fw/apps/demo/gfx_tests/tests.h b/src/fw/apps/demo/gfx_tests/tests.h index 65076584f3..8e28b66e42 100644 --- a/src/fw/apps/demo/gfx_tests/tests.h +++ b/src/fw/apps/demo/gfx_tests/tests.h @@ -12,14 +12,14 @@ //! GFX test struct typedef struct GfxTest { - char *name; //!< Name string - uint32_t duration; //!< Number of seconds to run the test for - uint32_t unit_multiple; //!< Number of actions per test iteration - LayerUpdateProc test_proc; //!< Test procedure - void (*setup)(Window *window); //!< Test setup function - void (*teardown)( Window *window); //!< Test teardown function + char *name; //!< Name string + uint32_t duration; //!< Number of seconds to run the test for + uint32_t unit_multiple; //!< Number of actions per test iteration + LayerUpdateProc test_proc; //!< Test procedure + void (*setup)(Window *window); //!< Test setup function + void (*teardown)(Window *window); //!< Test teardown function } GfxTest; #include "process_management/pebble_process_md.h" -const PebbleProcessMd* gfx_tests_get_app_info(void); +const PebbleProcessMd *gfx_tests_get_app_info(void); diff --git a/src/fw/apps/demo/gfx_tests/text.c b/src/fw/apps/demo/gfx_tests/text.c index fc36549b7c..3aa83efde0 100644 --- a/src/fw/apps/demo/gfx_tests/text.c +++ b/src/fw/apps/demo/gfx_tests/text.c @@ -4,14 +4,14 @@ #include "tests.h" static void prv_setup(Window *window); -static void prv_test(Layer *layer, GContext* ctx); +static void prv_test(Layer *layer, GContext *ctx); GfxTest g_gfx_test_text = { - .name = "Text", - .duration = 5, - .unit_multiple = 0, // Number of characters in test string - set later - .test_proc = prv_test, - .setup = prv_setup, + .name = "Text", + .duration = 5, + .unit_multiple = 0, // Number of characters in test string - set later + .test_proc = prv_test, + .setup = prv_setup, }; static GFont s_font; @@ -20,12 +20,13 @@ static void prv_setup(Window *window) { s_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); } -static void prv_test(Layer *layer, GContext* ctx) { - const char *text_test_str = "Lorem ipsum dolor sit amet, ne choro argumentum est, quando latine " - "copiosae est ea, usu nonumes accusam te."; +static void prv_test(Layer *layer, GContext *ctx) { + const char *text_test_str = + "Lorem ipsum dolor sit amet, ne choro argumentum est, quando latine " + "copiosae est ea, usu nonumes accusam te."; g_gfx_test_text.unit_multiple = strlen(text_test_str); - GColor color = { .argb = (uint8_t) rand() }; + GColor color = {.argb = (uint8_t)rand()}; graphics_context_set_text_color(ctx, color); - graphics_draw_text(ctx, text_test_str, s_font, layer->bounds, - GTextOverflowModeWordWrap, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, text_test_str, s_font, layer->bounds, GTextOverflowModeWordWrap, + GTextAlignmentLeft, NULL); } diff --git a/src/fw/apps/demo/gfx_tests/text_clipping.c b/src/fw/apps/demo/gfx_tests/text_clipping.c index 1044eb3430..9a9d9eddf3 100644 --- a/src/fw/apps/demo/gfx_tests/text_clipping.c +++ b/src/fw/apps/demo/gfx_tests/text_clipping.c @@ -4,16 +4,16 @@ #include "tests.h" static void prv_setup(Window *window); -static void prv_test(Layer *layer, GContext* ctx); +static void prv_test(Layer *layer, GContext *ctx); static void prv_teardown(Window *window); GfxTest g_gfx_test_text_clipping = { - .name = "Text Clipping", - .duration = 5, - .unit_multiple = 0, // Number of characters in test string - set later - .test_proc = prv_test, - .setup = prv_setup, - .teardown = prv_teardown, + .name = "Text Clipping", + .duration = 5, + .unit_multiple = 0, // Number of characters in test string - set later + .test_proc = prv_test, + .setup = prv_setup, + .teardown = prv_teardown, }; static GFont s_font; @@ -25,17 +25,18 @@ static void prv_setup(Window *window) { layer_add_child(&window->layer, &s_canvas); } -static void prv_test(Layer *layer, GContext* ctx) { - const char *text_test_str = "This is a test message that is really long!\"#$%&'()*+,-./01234" - "56789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrs" - "tuvwxyz{|}"; +static void prv_test(Layer *layer, GContext *ctx) { + const char *text_test_str = + "This is a test message that is really long!\"#$%&'()*+,-./01234" + "56789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrs" + "tuvwxyz{|}"; g_gfx_test_text_clipping.unit_multiple = strlen(text_test_str); - GColor color = { .argb = (uint8_t) rand() }; + GColor color = {.argb = (uint8_t)rand()}; graphics_context_set_text_color(ctx, color); GRect bounds = layer->bounds; - bounds.origin.y -= 150; // Drop y by 150 pixels so some data gets clipped - graphics_draw_text(ctx, text_test_str, s_font, bounds, - GTextOverflowModeWordWrap, GTextAlignmentLeft, NULL); + bounds.origin.y -= 150; // Drop y by 150 pixels so some data gets clipped + graphics_draw_text(ctx, text_test_str, s_font, bounds, GTextOverflowModeWordWrap, + GTextAlignmentLeft, NULL); } static void prv_teardown(Window *window) { diff --git a/src/fw/apps/demo/hrm_demo/hrm_demo.c b/src/fw/apps/demo/hrm_demo/hrm_demo.c index 00feeb2761..805b17b982 100644 --- a/src/fw/apps/demo/hrm_demo/hrm_demo.c +++ b/src/fw/apps/demo/hrm_demo/hrm_demo.c @@ -76,21 +76,36 @@ static char *prv_get_quality_string(HRMQuality quality) { static char *prv_translate_error(AppMessageResult result) { switch (result) { - case APP_MSG_OK: return "APP_MSG_OK"; - case APP_MSG_SEND_TIMEOUT: return "APP_MSG_SEND_TIMEOUT"; - case APP_MSG_SEND_REJECTED: return "APP_MSG_SEND_REJECTED"; - case APP_MSG_NOT_CONNECTED: return "APP_MSG_NOT_CONNECTED"; - case APP_MSG_APP_NOT_RUNNING: return "APP_MSG_APP_NOT_RUNNING"; - case APP_MSG_INVALID_ARGS: return "APP_MSG_INVALID_ARGS"; - case APP_MSG_BUSY: return "APP_MSG_BUSY"; - case APP_MSG_BUFFER_OVERFLOW: return "APP_MSG_BUFFER_OVERFLOW"; - case APP_MSG_ALREADY_RELEASED: return "APP_MSG_ALREADY_RELEASED"; - case APP_MSG_CALLBACK_ALREADY_REGISTERED: return "APP_MSG_CALLBACK_ALREADY_REGISTERED"; - case APP_MSG_CALLBACK_NOT_REGISTERED: return "APP_MSG_CALLBACK_NOT_REGISTERED"; - case APP_MSG_OUT_OF_MEMORY: return "APP_MSG_OUT_OF_MEMORY"; - case APP_MSG_CLOSED: return "APP_MSG_CLOSED"; - case APP_MSG_INTERNAL_ERROR: return "APP_MSG_INTERNAL_ERROR"; - default: return "UNKNOWN ERROR"; + case APP_MSG_OK: + return "APP_MSG_OK"; + case APP_MSG_SEND_TIMEOUT: + return "APP_MSG_SEND_TIMEOUT"; + case APP_MSG_SEND_REJECTED: + return "APP_MSG_SEND_REJECTED"; + case APP_MSG_NOT_CONNECTED: + return "APP_MSG_NOT_CONNECTED"; + case APP_MSG_APP_NOT_RUNNING: + return "APP_MSG_APP_NOT_RUNNING"; + case APP_MSG_INVALID_ARGS: + return "APP_MSG_INVALID_ARGS"; + case APP_MSG_BUSY: + return "APP_MSG_BUSY"; + case APP_MSG_BUFFER_OVERFLOW: + return "APP_MSG_BUFFER_OVERFLOW"; + case APP_MSG_ALREADY_RELEASED: + return "APP_MSG_ALREADY_RELEASED"; + case APP_MSG_CALLBACK_ALREADY_REGISTERED: + return "APP_MSG_CALLBACK_ALREADY_REGISTERED"; + case APP_MSG_CALLBACK_NOT_REGISTERED: + return "APP_MSG_CALLBACK_NOT_REGISTERED"; + case APP_MSG_OUT_OF_MEMORY: + return "APP_MSG_OUT_OF_MEMORY"; + case APP_MSG_CLOSED: + return "APP_MSG_CLOSED"; + case APP_MSG_INTERNAL_ERROR: + return "APP_MSG_INTERNAL_ERROR"; + default: + return "UNKNOWN ERROR"; } } @@ -111,8 +126,7 @@ static void prv_send_status_and_version(void) { AppMessageResult result = app_message_outbox_begin(&app_data->out_iter); if (result != APP_MSG_OK) { - PBL_LOG_DBG("Failed to begin outbox - reason %i %s", - result, prv_translate_error(result)); + PBL_LOG_DBG("Failed to begin outbox - reason %i %s", result, prv_translate_error(result)); return; } @@ -120,14 +134,14 @@ static void prv_send_status_and_version(void) { char serial_number_buffer[MFG_SERIAL_NUMBER_SIZE + 1]; mfg_info_get_serialnumber(serial_number_buffer, sizeof(serial_number_buffer)); - dict_write_data(app_data->out_iter, AppMessageKey_SerialNumber, - (uint8_t*) serial_number_buffer, sizeof(serial_number_buffer)); + dict_write_data(app_data->out_iter, AppMessageKey_SerialNumber, (uint8_t *)serial_number_buffer, + sizeof(serial_number_buffer)); #ifdef CONFIG_IS_BIGBOARD WatchInfoColor watch_color = WATCH_INFO_COLOR_UNKNOWN; #else WatchInfoColor watch_color = mfg_info_get_watch_color(); -#endif // CONFIG_IS_BIGBOARD +#endif // CONFIG_IS_BIGBOARD dict_write_uint32(app_data->out_iter, AppMessageKey_Model, watch_color); prv_send_msg(); @@ -140,7 +154,7 @@ static void prv_handle_hrm_data(PebbleEvent *e, void *context) { PebbleHRMEvent *hrm = &e->hrm; if (hrm->event_type == HRMEvent_BPM) { - snprintf(app_data->bpm_string, sizeof(app_data->bpm_string), "%"PRIu8" BPM", hrm->bpm.bpm); + snprintf(app_data->bpm_string, sizeof(app_data->bpm_string), "%" PRIu8 " BPM", hrm->bpm.bpm); text_layer_set_text(&app_data->quality_text_layer, prv_get_quality_string(hrm->bpm.quality)); layer_mark_dirty(&app_data->window.layer); } else if (hrm->event_type == HRMEvent_SubscriptionExpiring) { @@ -156,17 +170,16 @@ static void prv_handle_hrm_data(PebbleEvent *e, void *context) { static void prv_enable_hrm(void) { AppData *app_data = app_state_get_user_data(); - app_data->hrm_event_info = (EventServiceInfo) { - .type = PEBBLE_HRM_EVENT, - .handler = prv_handle_hrm_data, + app_data->hrm_event_info = (EventServiceInfo){ + .type = PEBBLE_HRM_EVENT, + .handler = prv_handle_hrm_data, }; event_service_client_subscribe(&app_data->hrm_event_info); // TODO: Let the mobile app control this? const uint32_t update_time_s = 1; - app_data->session = sys_hrm_manager_app_subscribe( - APP_ID_HRM_DEMO, update_time_s, SECONDS_PER_HOUR, - HRMFeature_BPM); + app_data->session = sys_hrm_manager_app_subscribe(APP_ID_HRM_DEMO, update_time_s, + SECONDS_PER_HOUR, HRMFeature_BPM); } static void prv_disable_hrm(void) { @@ -205,10 +218,9 @@ static void prv_message_sent_cb(DictionaryIterator *iterator, void *context) { app_data->ready_to_send = true; } -static void prv_message_failed_cb(DictionaryIterator *iterator, - AppMessageResult reason, void *context) { - PBL_LOG_DBG("Out message send failed - reason %i %s", - reason, prv_translate_error(reason)); +static void prv_message_failed_cb(DictionaryIterator *iterator, AppMessageResult reason, + void *context) { + PBL_LOG_DBG("Out message send failed - reason %i %s", reason, prv_translate_error(reason)); AppData *app_data = app_state_get_user_data(); app_data->ready_to_send = true; } @@ -219,9 +231,9 @@ static void prv_remote_notify_timer_cb(void *data) { static void prv_init(void) { AppData *app_data = app_malloc_check(sizeof(*app_data)); - *app_data = (AppData) { - .session = (HRMSessionRef)app_data, // Use app data as session ref - .ready_to_send = false, + *app_data = (AppData){ + .session = (HRMSessionRef)app_data, // Use app data as session ref + .ready_to_send = false, }; app_state_set_user_data(app_data); @@ -251,8 +263,7 @@ static void prv_init(void) { const uint32_t outbox_size = 256; AppMessageResult result = app_message_open(inbox_size, outbox_size); if (result != APP_MSG_OK) { - PBL_LOG_ERR("Unable to open app message! %i %s", - result, prv_translate_error(result)); + PBL_LOG_ERR("Unable to open app message! %i %s", result, prv_translate_error(result)); } else { PBL_LOG_DBG("Successfully opened app message"); } @@ -284,13 +295,14 @@ static void prv_main(void) { prv_deinit(); } -const PebbleProcessMd* hrm_demo_get_app_info(void) { +const PebbleProcessMd *hrm_demo_get_app_info(void) { static const PebbleProcessMdSystem s_hrm_demo_app_info = { - .name = "HRM Demo", - .common.uuid = { 0xf8, 0x1b, 0x2a, 0xf8, 0x13, 0x0a, 0x11, 0xe6, - 0x86, 0x9f, 0xa4, 0x5e, 0x60, 0xb9, 0x77, 0x3d }, - .common.main_func = &prv_main, + .name = "HRM Demo", + .common.uuid = + {0xf8, 0x1b, 0x2a, 0xf8, 0x13, 0x0a, 0x11, 0xe6, 0x86, 0x9f, 0xa4, 0x5e, 0x60, 0xb9, 0x77, + 0x3d}, + .common.main_func = &prv_main, }; // Only show in launcher if HRM is present - return (sys_hrm_manager_is_hrm_present()) ? (const PebbleProcessMd*)&s_hrm_demo_app_info : NULL; + return (sys_hrm_manager_is_hrm_present()) ? (const PebbleProcessMd *)&s_hrm_demo_app_info : NULL; } diff --git a/src/fw/apps/demo/idl/idl_demo.c b/src/fw/apps/demo/idl/idl_demo.c index 0fd560a053..b759e87ea5 100644 --- a/src/fw/apps/demo/idl/idl_demo.c +++ b/src/fw/apps/demo/idl/idl_demo.c @@ -17,7 +17,7 @@ static void prv_init(void) { SimpleMessage msg = { - .lucky_number = 42, + .lucky_number = 42, }; uint8_t *buffer = app_malloc(30); pb_ostream_t s = pb_ostream_from_buffer(buffer, 30); @@ -32,7 +32,7 @@ static void prv_deinit(void) { uint8_t *buffer = app_state_get_user_data(); pb_istream_t s = pb_istream_from_buffer(buffer, 30); pb_decode(&s, SimpleMessage_fields, &msg); - PBL_LOG_DBG("The lucky number is %"PRId32, msg.lucky_number); + PBL_LOG_DBG("The lucky number is %" PRId32, msg.lucky_number); } static void prv_app_main(void) { @@ -45,13 +45,15 @@ static void prv_app_main(void) { const PebbleProcessMd *idl_demo_get_app_info() { static const PebbleProcessMdSystem s_app_data = { - .common = { - .main_func = prv_app_main, - // UUID: 101a32d95-1234-46d4-1234-854cc62f97f9 - .uuid = {0x99, 0xa3, 0x2d, 0x95, 0x12, 0x34, 0x46, 0xd4, - 0x12, 0x34, 0x85, 0x4c, 0xc6, 0x2f, 0x97, 0xf9}, - }, - .name = "IDL Demo", + .common = + { + .main_func = prv_app_main, + // UUID: 101a32d95-1234-46d4-1234-854cc62f97f9 + .uuid = + {0x99, 0xa3, 0x2d, 0x95, 0x12, 0x34, 0x46, 0xd4, 0x12, 0x34, 0x85, 0x4c, 0xc6, + 0x2f, 0x97, 0xf9}, + }, + .name = "IDL Demo", }; return (const PebbleProcessMd *)&s_app_data; } diff --git a/src/fw/apps/demo/idl/idl_demo.h b/src/fw/apps/demo/idl/idl_demo.h index 256fe1ec83..fa08c33b4e 100644 --- a/src/fw/apps/demo/idl/idl_demo.h +++ b/src/fw/apps/demo/idl/idl_demo.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* idl_demo_get_app_info(void); +const PebbleProcessMd *idl_demo_get_app_info(void); diff --git a/src/fw/apps/demo/kill_bt/kill_bt.c b/src/fw/apps/demo/kill_bt/kill_bt.c index 90b5d91131..c26186aa01 100644 --- a/src/fw/apps/demo/kill_bt/kill_bt.c +++ b/src/fw/apps/demo/kill_bt/kill_bt.c @@ -18,22 +18,21 @@ struct AppState { }; static void prv_window_load(Window *window) { - struct AppState* data = window_get_user_data(window); + struct AppState *data = window_get_user_data(window); (void)data; } static void push_window(struct AppState *data) { - Window* window = &data->window; + Window *window = &data->window; window_init(window, WINDOW_NAME("Kill BT Demo")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } - //////////////////// // App boilerplate @@ -45,7 +44,7 @@ static void handle_second_tick(struct tm *tick_time, TimeUnits units_changed) { } static void handle_init(void) { - struct AppState* data = app_malloc_check(sizeof(struct AppState)); + struct AppState *data = app_malloc_check(sizeof(struct AppState)); app_state_set_user_data(data); tick_timer_service_subscribe(SECOND_UNIT, handle_second_tick); @@ -53,7 +52,7 @@ static void handle_init(void) { } static void handle_deinit(void) { - struct AppState* data = app_state_get_user_data(); + struct AppState *data = app_state_get_user_data(); app_free(data); } @@ -65,11 +64,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* kill_bt_app_get_info() { +const PebbleProcessMd *kill_bt_app_get_info() { static const PebbleProcessMdSystem kill_bt_app_info = { - .name = "Kill BT Test", - .common.main_func = s_main, + .name = "Kill BT Test", + .common.main_func = s_main, }; - return (const PebbleProcessMd*) &kill_bt_app_info; + return (const PebbleProcessMd *)&kill_bt_app_info; } - diff --git a/src/fw/apps/demo/kill_bt/kill_bt.h b/src/fw/apps/demo/kill_bt/kill_bt.h index 2b75e0e188..41b0b9cd6e 100644 --- a/src/fw/apps/demo/kill_bt/kill_bt.h +++ b/src/fw/apps/demo/kill_bt/kill_bt.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* kill_bt_app_get_info(); +const PebbleProcessMd *kill_bt_app_get_info(); diff --git a/src/fw/apps/demo/kino_layer/kino_layer_demo.c b/src/fw/apps/demo/kino_layer/kino_layer_demo.c index 107b156092..573f308bbc 100644 --- a/src/fw/apps/demo/kino_layer/kino_layer_demo.c +++ b/src/fw/apps/demo/kino_layer/kino_layer_demo.c @@ -20,9 +20,9 @@ typedef struct { } KinoLayerDemoData; uint32_t resources[] = { - RESOURCE_ID_RESULT_SENT_LARGE, - RESOURCE_ID_GENERIC_QUESTION_LARGE, - RESOURCE_ID_VOICE_MICROPHONE_LARGE, + RESOURCE_ID_RESULT_SENT_LARGE, + RESOURCE_ID_GENERIC_QUESTION_LARGE, + RESOURCE_ID_VOICE_MICROPHONE_LARGE, }; static void prv_select_click_handler(ClickRecognizerRef recognizer, void *context) { @@ -62,10 +62,10 @@ static void prv_init(void) { Window *window = &data->window; window_init(window, WINDOW_NAME("Kino Layer")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - .appear = prv_window_appear, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + .appear = prv_window_appear, + }); window_set_click_config_provider_with_context(window, prv_click_config_provider, data); app_window_stack_push(window, true /*animated*/); @@ -89,14 +89,16 @@ static void s_main(void) { const PebbleProcessMd *kino_layer_demo_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = s_main, - // UUID: 67a32d95-ef69-46d4-a0b9-854cc62f97fa - .uuid = {0x12, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, - 0xa0, 0xb9, 0x85, 0x4c, 0xc6, 0x2f, 0x97, 0xfa}, - }, - .name = "KinoLayer Demo", + .common = + { + .main_func = s_main, + // UUID: 67a32d95-ef69-46d4-a0b9-854cc62f97fa + .uuid = + {0x12, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, 0xa0, 0xb9, 0x85, 0x4c, 0xc6, + 0x2f, 0x97, 0xfa}, + }, + .name = "KinoLayer Demo", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/light_config/light_config.c b/src/fw/apps/demo/light_config/light_config.c index 4412ee43b9..1117ddbd5f 100644 --- a/src/fw/apps/demo/light_config/light_config.c +++ b/src/fw/apps/demo/light_config/light_config.c @@ -16,14 +16,13 @@ static void selected_pwm_percentage(NumberWindow *nw, void *ctx) { } static void handle_init(void) { - NumberWindow *light_num_window = number_window_create("Light Config", - (NumberWindowCallbacks) { .selected = selected_pwm_percentage }, - NULL); + NumberWindow *light_num_window = number_window_create( + "Light Config", (NumberWindowCallbacks){.selected = selected_pwm_percentage}, NULL); app_state_set_user_data(light_num_window); - uint8_t scale_granularity = 5; // 5 percent at a time - uint8_t curr_percent = scale_granularity * ((backlight_get_intensity() + - scale_granularity - 1) / scale_granularity); + uint8_t scale_granularity = 5; // 5 percent at a time + uint8_t curr_percent = + scale_granularity * ((backlight_get_intensity() + scale_granularity - 1) / scale_granularity); number_window_set_value(light_num_window, curr_percent); number_window_set_max(light_num_window, 100); @@ -44,10 +43,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* light_config_get_info() { +const PebbleProcessMd *light_config_get_info() { static const PebbleProcessMdSystem s_accel_config_info = { - .common.main_func = s_main, - .name = "Light Config" + .common.main_func = s_main, + .name = "Light Config" }; - return (const PebbleProcessMd*) &s_accel_config_info; + return (const PebbleProcessMd *)&s_accel_config_info; } diff --git a/src/fw/apps/demo/menu/menu.c b/src/fw/apps/demo/menu/menu.c index 6d5b7d897a..541cc6006d 100644 --- a/src/fw/apps/demo/menu/menu.c +++ b/src/fw/apps/demo/menu/menu.c @@ -15,23 +15,29 @@ #define BUFFER_SIZE 25 static const uint8_t s_music_launcher_icon_pixels[] = { - 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, /* bytes 0 - 16 */ - 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x18, 0x00, 0x7f, 0x00, 0x1f, 0x00, /* bytes 16 - 32 */ - 0x7f, 0xf0, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, /* bytes 32 - 48 */ - 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, /* bytes 48 - 64 */ - 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x7f, 0x7c, 0x00, 0x00, /* bytes 64 - 80 */ - 0x03, 0x3c, 0x00, 0x00, 0x01, 0x3c, 0x00, 0x00, 0x00, 0x3c, 0x80, 0x00, 0x00, 0x3c, 0xc0, 0x00, /* bytes 80 - 96 */ - 0x00, 0x7e, 0xe0, 0x00, 0x00, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, + 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0x3f, 0x00, 0x00, + 0xff, 0x03, 0x00, 0x00, /* bytes 0 - 16 */ + 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x18, 0x00, + 0x7f, 0x00, 0x1f, 0x00, /* bytes 16 - 32 */ + 0x7f, 0xf0, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, + 0x7f, 0xfc, 0x1f, 0x00, /* bytes 32 - 48 */ + 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, + 0x7f, 0xfc, 0x1f, 0x00, /* bytes 48 - 64 */ + 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x00, 0x00, + 0x7f, 0x7c, 0x00, 0x00, /* bytes 64 - 80 */ + 0x03, 0x3c, 0x00, 0x00, 0x01, 0x3c, 0x00, 0x00, 0x00, 0x3c, 0x80, 0x00, + 0x00, 0x3c, 0xc0, 0x00, /* bytes 80 - 96 */ + 0x00, 0x7e, 0xe0, 0x00, 0x00, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, }; static const GBitmap s_music_launcher_icon_bitmap = { - .addr = (void*) &s_music_launcher_icon_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 24, .h = 27 }, - }, + .addr = (void *)&s_music_launcher_icon_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 24, .h = 27}, + }, }; typedef struct { @@ -50,19 +56,25 @@ static uint16_t get_num_sections_callback(struct MenuLayer *menu_layer, AppData return 4; } -static uint16_t get_num_rows_callback(struct MenuLayer *menu_layer, uint16_t section_index, AppData *data) { +static uint16_t get_num_rows_callback(struct MenuLayer *menu_layer, uint16_t section_index, + AppData *data) { (void)data; (void)menu_layer; switch (section_index) { default: - case 0: return 2; - case 1: return 3; - case 2: return 4; - case 3: return 5; + case 0: + return 2; + case 1: + return 3; + case 2: + return 4; + case 3: + return 5; } } -static int16_t get_cell_height_callback(struct MenuLayer *menu_layer, MenuIndex *cell_index, AppData *data) { +static int16_t get_cell_height_callback(struct MenuLayer *menu_layer, MenuIndex *cell_index, + AppData *data) { (void)data; (void)menu_layer; (void)cell_index; @@ -81,14 +93,16 @@ static int16_t get_cell_height_callback(struct MenuLayer *menu_layer, MenuIndex } } -static int16_t get_header_height_callback(struct MenuLayer *menu_layer, uint16_t section_index, AppData *data) { +static int16_t get_header_height_callback(struct MenuLayer *menu_layer, uint16_t section_index, + AppData *data) { (void)data; (void)menu_layer; (void)section_index; return MENU_CELL_BASIC_HEADER_HEIGHT; } -static void draw_row_callback(GContext* ctx, Layer *cell_layer, MenuIndex *cell_index, AppData *data) { +static void draw_row_callback(GContext *ctx, Layer *cell_layer, MenuIndex *cell_index, + AppData *data) { char title[BUFFER_SIZE]; char subtitle[BUFFER_SIZE]; @@ -96,7 +110,8 @@ static void draw_row_callback(GContext* ctx, Layer *cell_layer, MenuIndex *cell_ case 0: sniprintf(title, BUFFER_SIZE, "Title %i/%i ", cell_index->section, cell_index->row); sniprintf(subtitle, BUFFER_SIZE, "Subtitle %i/%i", cell_index->section, cell_index->row); - menu_cell_basic_draw(ctx, cell_layer, title, subtitle, (GBitmap*)&s_music_launcher_icon_bitmap); + menu_cell_basic_draw(ctx, cell_layer, title, subtitle, + (GBitmap *)&s_music_launcher_icon_bitmap); break; default: @@ -108,7 +123,8 @@ static void draw_row_callback(GContext* ctx, Layer *cell_layer, MenuIndex *cell_ (void)data; } -static void draw_header_callback(GContext* ctx, Layer *cell_layer, uint16_t section_index, AppData *data) { +static void draw_header_callback(GContext *ctx, Layer *cell_layer, uint16_t section_index, + AppData *data) { char title[BUFFER_SIZE]; sniprintf(title, BUFFER_SIZE, "Section Header (%i)", section_index); menu_cell_basic_header_draw(ctx, cell_layer, title); @@ -124,14 +140,16 @@ static void detail_window_load(Window *window) { } static void push_detail_window(AppData *data, MenuIndex *index, bool is_long_click) { - sniprintf(data->detail_text_buffer, sizeof(data->detail_text_buffer), "SELECTION:\n\nSection %i, Row %i\nLong click: %c", index->section, index->row, is_long_click ? 'Y' : 'N'); + sniprintf(data->detail_text_buffer, sizeof(data->detail_text_buffer), + "SELECTION:\n\nSection %i, Row %i\nLong click: %c", index->section, index->row, + is_long_click ? 'Y' : 'N'); Window *detail_window = &data->detail_window; window_init(detail_window, WINDOW_NAME("Demo Menu Detail")); window_set_user_data(detail_window, data); - window_set_window_handlers(detail_window, &(WindowHandlers) { - .load = detail_window_load, - }); + window_set_window_handlers(detail_window, &(WindowHandlers){ + .load = detail_window_load, + }); const bool animated = true; app_window_stack_push(detail_window, animated); } @@ -151,16 +169,18 @@ static void prv_window_load(Window *window) { MenuLayer *menu_layer = &data->menu_layer; menu_layer_init(menu_layer, &window->layer.bounds); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_num_sections = (MenuLayerGetNumberOfSectionsCallback) get_num_sections_callback, - .get_num_rows = (MenuLayerGetNumberOfRowsInSectionsCallback) get_num_rows_callback, - .get_cell_height = (MenuLayerGetCellHeightCallback) get_cell_height_callback, - .get_header_height = (MenuLayerGetHeaderHeightCallback) get_header_height_callback, - .draw_row = (MenuLayerDrawRowCallback) draw_row_callback, - .draw_header = (MenuLayerDrawHeaderCallback) draw_header_callback, - .select_click = (MenuLayerSelectCallback) select_callback, - .select_long_click = (MenuLayerSelectCallback) select_long_callback, - }); + menu_layer_set_callbacks( + menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_sections = (MenuLayerGetNumberOfSectionsCallback)get_num_sections_callback, + .get_num_rows = (MenuLayerGetNumberOfRowsInSectionsCallback)get_num_rows_callback, + .get_cell_height = (MenuLayerGetCellHeightCallback)get_cell_height_callback, + .get_header_height = (MenuLayerGetHeaderHeightCallback)get_header_height_callback, + .draw_row = (MenuLayerDrawRowCallback)draw_row_callback, + .draw_header = (MenuLayerDrawHeaderCallback)draw_header_callback, + .select_click = (MenuLayerSelectCallback)select_callback, + .select_long_click = (MenuLayerSelectCallback)select_long_callback, + }); menu_layer_set_click_config_onto_window(menu_layer, window); layer_add_child(&window->layer, menu_layer_get_layer(menu_layer)); } @@ -169,9 +189,9 @@ static void push_window(AppData *data) { Window *window = &data->window; window_init(window, WINDOW_NAME("Demo Menu")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -200,12 +220,12 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* menu_app_get_info() { +const PebbleProcessMd *menu_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "MenuLayer Demo" + .common.main_func = &s_main, + .name = "MenuLayer Demo" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } #undef BUFFER_SIZE diff --git a/src/fw/apps/demo/menu/menu.h b/src/fw/apps/demo/menu/menu.h index 1609c18075..2b99dae671 100644 --- a/src/fw/apps/demo/menu/menu.h +++ b/src/fw/apps/demo/menu/menu.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* menu_app_get_info(); +const PebbleProcessMd *menu_app_get_info(); diff --git a/src/fw/apps/demo/menu_overflow/menu_overflow.c b/src/fw/apps/demo/menu_overflow/menu_overflow.c index 69865d368c..e6fa1f8906 100644 --- a/src/fw/apps/demo/menu_overflow/menu_overflow.c +++ b/src/fw/apps/demo/menu_overflow/menu_overflow.c @@ -7,58 +7,57 @@ #include "applib/ui/ui.h" #include "applib/ui/menu_layer.h" - static Window *window; static MenuLayer *menu_layer; -static char *section_names[] = { "Movies", "Books", "Video Games", "Television", "Alcohol" }; +static char *section_names[] = {"Movies", "Books", "Video Games", "Television", "Alcohol"}; static char *row_names[5][2] = { - { "Avengers", "Eden of the East" }, - { "A Song of Ice and Fire", "Lord of the Rings" }, - { "Team Fortress 2", "Super Meat Boy" }, - { "Sunny in Philadelphia", "Gotham" }, - { "Beer", "Vodka" } + {"Avengers", "Eden of the East"}, + {"A Song of Ice and Fire", "Lord of the Rings"}, + {"Team Fortress 2", "Super Meat Boy"}, + {"Sunny in Philadelphia", "Gotham"}, + {"Beer", "Vodka"} }; - //////////////////// // MenuLayer construction and callback static uint16_t prv_menu_get_num_sections_callback(struct MenuLayer *menu_layer, - void *callback_context) { + void *callback_context) { return 5; } -static uint16_t prv_menu_get_num_rows_callback(struct MenuLayer *menu_layer, - uint16_t section_index, void *callback_context) { +static uint16_t prv_menu_get_num_rows_callback(struct MenuLayer *menu_layer, uint16_t section_index, + void *callback_context) { return 2; } static int16_t prv_menu_get_header_height_callback(struct MenuLayer *menu_layer, - uint16_t section_index, void *callback_context) { + uint16_t section_index, void *callback_context) { return 15; } static int16_t prv_menu_get_cell_height_callback(struct MenuLayer *menu_layer, - MenuIndex *cell_index, void *callback_context) { + MenuIndex *cell_index, void *callback_context) { return 20; } static int16_t prv_menu_get_separator_height_callback(struct MenuLayer *menu_layer, - MenuIndex *cell_index, void *callback_context) { + MenuIndex *cell_index, + void *callback_context) { return 10; } static void prv_menu_draw_header_callback(GContext *ctx, const Layer *cell_layer, - uint16_t section_index, void *callback_context) { + uint16_t section_index, void *callback_context) { menu_cell_basic_header_draw(ctx, cell_layer, section_names[section_index]); } static void prv_menu_draw_row_callback(GContext *ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *callback_context) { + MenuIndex *cell_index, void *callback_context) { graphics_context_set_text_color(ctx, GColorBlack); graphics_draw_text(ctx, row_names[cell_index->section][cell_index->row], - fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), GRect(4, 2, 136, 22), - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), GRect(4, 2, 136, 22), + GTextOverflowModeFill, GTextAlignmentLeft, NULL); } //////////////////// @@ -68,15 +67,16 @@ static void init(void) { window = window_create(); menu_layer = menu_layer_create(window_get_root_layer(window)->bounds); - menu_layer_set_callbacks(menu_layer, NULL, &(MenuLayerCallbacks) { - .get_num_sections = prv_menu_get_num_sections_callback, - .get_num_rows = prv_menu_get_num_rows_callback, - .get_header_height = prv_menu_get_header_height_callback, - .get_cell_height = prv_menu_get_cell_height_callback, - .get_separator_height = prv_menu_get_separator_height_callback, - .draw_header = prv_menu_draw_header_callback, - .draw_row = prv_menu_draw_row_callback, - }); + menu_layer_set_callbacks(menu_layer, NULL, + &(MenuLayerCallbacks){ + .get_num_sections = prv_menu_get_num_sections_callback, + .get_num_rows = prv_menu_get_num_rows_callback, + .get_header_height = prv_menu_get_header_height_callback, + .get_cell_height = prv_menu_get_cell_height_callback, + .get_separator_height = prv_menu_get_separator_height_callback, + .draw_header = prv_menu_draw_header_callback, + .draw_row = prv_menu_draw_row_callback, + }); menu_layer_set_click_config_onto_window(menu_layer, window); layer_add_child(window_get_root_layer(window), menu_layer_get_layer(menu_layer)); @@ -97,10 +97,10 @@ static void s_main(void) { deinit(); } -const PebbleProcessMd* menu_overflow_app_get_info() { +const PebbleProcessMd *menu_overflow_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "Menu Overflow" + .common.main_func = &s_main, + .name = "Menu Overflow" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/menu_overflow/menu_overflow.h b/src/fw/apps/demo/menu_overflow/menu_overflow.h index 4542f0a62b..699ee1dc34 100644 --- a/src/fw/apps/demo/menu_overflow/menu_overflow.h +++ b/src/fw/apps/demo/menu_overflow/menu_overflow.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* menu_overflow_app_get_info(); +const PebbleProcessMd *menu_overflow_app_get_info(); diff --git a/src/fw/apps/demo/menu_right_icon/menu_layer_right_icon.c b/src/fw/apps/demo/menu_right_icon/menu_layer_right_icon.c index fb5ef7ccd8..30d4c58d09 100644 --- a/src/fw/apps/demo/menu_right_icon/menu_layer_right_icon.c +++ b/src/fw/apps/demo/menu_right_icon/menu_layer_right_icon.c @@ -13,7 +13,6 @@ #include - #define NUM_MENU_SECTIONS 1 #define NUM_MENU_ITEMS 4 @@ -37,21 +36,19 @@ static int16_t menu_get_header_height_callback(MenuLayer *menu_layer, uint16_t s return MENU_CELL_BASIC_HEADER_HEIGHT; } -static void menu_draw_row_callback(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, +static void menu_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, void *data) { - AppData *app_data = (AppData *) data; + AppData *app_data = (AppData *)data; switch (cell_index->row) { case 0: - menu_cell_basic_draw_icon_right(ctx, cell_layer, "First Item", NULL, - &app_data->checked_icon); + menu_cell_basic_draw_icon_right(ctx, cell_layer, "First Item", NULL, &app_data->checked_icon); break; case 1: menu_cell_basic_draw_icon_right(ctx, cell_layer, "Second Item", NULL, &app_data->checked_icon); break; case 2: - menu_cell_basic_draw(ctx, cell_layer, "Third Item", NULL, - &app_data->checked_icon); + menu_cell_basic_draw(ctx, cell_layer, "Third Item", NULL, &app_data->checked_icon); break; case 3: menu_cell_basic_draw_icon_right(ctx, cell_layer, "Fourth Item", "with a subtitle", @@ -65,12 +62,16 @@ static void menu_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, v } static int16_t menu_get_cell_height_callback(struct MenuLayer *menu_layer, MenuIndex *cell_index, - void *callback_context) { - switch(cell_index->row) { - case 0: return menu_cell_small_cell_height(); - case 1: return menu_cell_basic_cell_height(); - case 2: return menu_cell_small_cell_height(); - case 3: return menu_cell_basic_cell_height(); + void *callback_context) { + switch (cell_index->row) { + case 0: + return menu_cell_small_cell_height(); + case 1: + return menu_cell_basic_cell_height(); + case 2: + return menu_cell_small_cell_height(); + case 3: + return menu_cell_basic_cell_height(); default: return menu_cell_basic_cell_height(); } @@ -83,13 +84,15 @@ static void prv_window_load(Window *window) { MenuLayer *menu_layer = &data->menu_layer; menu_layer_init(menu_layer, &window->layer.bounds); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_num_sections = (MenuLayerGetNumberOfSectionsCallback) menu_get_num_sections_callback, - .get_num_rows = (MenuLayerGetNumberOfRowsInSectionsCallback) menu_get_num_rows_callback, - .get_cell_height = (MenuLayerGetCellHeightCallback) menu_get_cell_height_callback, - .draw_row = (MenuLayerDrawRowCallback) menu_draw_row_callback, - .select_click = menu_select_callback, - }); + menu_layer_set_callbacks( + menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_sections = (MenuLayerGetNumberOfSectionsCallback)menu_get_num_sections_callback, + .get_num_rows = (MenuLayerGetNumberOfRowsInSectionsCallback)menu_get_num_rows_callback, + .get_cell_height = (MenuLayerGetCellHeightCallback)menu_get_cell_height_callback, + .draw_row = (MenuLayerDrawRowCallback)menu_draw_row_callback, + .select_click = menu_select_callback, + }); menu_layer_set_highlight_colors(&data->menu_layer, GColorJaegerGreen, GColorWhite); menu_layer_set_click_config_onto_window(menu_layer, window); layer_add_child(&window->layer, menu_layer_get_layer(menu_layer)); @@ -100,9 +103,9 @@ static void push_window(AppData *data) { Window *window = &data->window; window_init(window, WINDOW_NAME("Demo Menu")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -129,10 +132,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* menu_layer_right_icon_app_get_info() { +const PebbleProcessMd *menu_layer_right_icon_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "MenuLayer Right Icon Demo" + .common.main_func = &s_main, + .name = "MenuLayer Right Icon Demo" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/menu_right_icon/menu_layer_right_icon.h b/src/fw/apps/demo/menu_right_icon/menu_layer_right_icon.h index d9adbf4d04..2812697ab0 100644 --- a/src/fw/apps/demo/menu_right_icon/menu_layer_right_icon.h +++ b/src/fw/apps/demo/menu_right_icon/menu_layer_right_icon.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* menu_layer_right_icon_app_get_info(); +const PebbleProcessMd *menu_layer_right_icon_app_get_info(); diff --git a/src/fw/apps/demo/menu_round/menu_round.c b/src/fw/apps/demo/menu_round/menu_round.c index 1c96b17f8f..73fd244ce7 100644 --- a/src/fw/apps/demo/menu_round/menu_round.c +++ b/src/fw/apps/demo/menu_round/menu_round.c @@ -39,33 +39,28 @@ typedef struct { MenuLayerStyle style; } MenuDetailWindowData; - static const MenuDetailRowData menu_detail_row_data_notifications[] = { - {"Liron Damir", "Late again. Sorry, I'll be on time in the future.", NULL}, - {"Angela Tam", "Late again? Can you be on time for once?", NULL}, - {"Eric Migicovsky", "Friday meeting will be held in the big room.", NULL}, - {"Instagram", "Keep scrolling down.", NULL}, - {"Liron Levak", "That's not my name.", NULL}, - {"Kimberly North West Kardashian", "I broke the Internet again.", NULL}, - {"Henry Damir", "That's not my name.", NULL}, - {"Kevin Conley", "Wubalubadubdub!", NULL}, + {"Liron Damir", "Late again. Sorry, I'll be on time in the future.", NULL}, + {"Angela Tam", "Late again? Can you be on time for once?", NULL}, + {"Eric Migicovsky", "Friday meeting will be held in the big room.", NULL}, + {"Instagram", "Keep scrolling down.", NULL}, + {"Liron Levak", "That's not my name.", NULL}, + {"Kimberly North West Kardashian", "I broke the Internet again.", NULL}, + {"Henry Damir", "That's not my name.", NULL}, + {"Kevin Conley", "Wubalubadubdub!", NULL}, }; static const MenuDetailRowData menu_detail_row_data_days[] = { - {"Monday", NULL, NULL}, - {"Tuesday", NULL, NULL}, - {"Wednesday", NULL, NULL}, - {"Thursday", NULL, NULL}, - {"Friday", NULL, NULL}, - {"Saturday", NULL, NULL}, - {"Sunday", NULL, NULL}, + {"Monday", NULL, NULL}, {"Tuesday", NULL, NULL}, {"Wednesday", NULL, NULL}, + {"Thursday", NULL, NULL}, {"Friday", NULL, NULL}, {"Saturday", NULL, NULL}, + {"Sunday", NULL, NULL}, }; static const MenuDetailRowData menu_detail_row_data_alarms[] = { - {"8:00 AM", "Workdays", "ON"}, - {"10:00 AM", "Sat, Sun, Mon", "OFF"}, - {"11:30 AM", "Weekends", "ON"}, - {"5:00 PM", "Weekdays", "ON"}, + {"8:00 AM", "Workdays", "ON"}, + {"10:00 AM", "Sat, Sun, Mon", "OFF"}, + {"11:30 AM", "Weekends", "ON"}, + {"5:00 PM", "Weekdays", "ON"}, }; typedef struct { @@ -79,44 +74,44 @@ typedef struct { static MenuDetailInfo prv_get_row_details_for_style(MenuLayerStyle style) { switch (style) { case MenuLayerStyleTitle: - return (MenuDetailInfo) { - .rows = menu_detail_row_data_notifications, - .num_rows = ARRAY_LENGTH(menu_detail_row_data_notifications), - .selected_cell_height = MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT, - .unselected_cell_height = MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT, - .highlight_background_color = GColorFolly, + return (MenuDetailInfo){ + .rows = menu_detail_row_data_notifications, + .num_rows = ARRAY_LENGTH(menu_detail_row_data_notifications), + .selected_cell_height = MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT, + .unselected_cell_height = MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT, + .highlight_background_color = GColorFolly, }; case MenuLayerStyleTitleAndSubtitle: - return (MenuDetailInfo) { - .rows = menu_detail_row_data_notifications, - .num_rows = ARRAY_LENGTH(menu_detail_row_data_notifications), - .selected_cell_height = MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT, - .unselected_cell_height = MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT, - .highlight_background_color = GColorIslamicGreen, + return (MenuDetailInfo){ + .rows = menu_detail_row_data_notifications, + .num_rows = ARRAY_LENGTH(menu_detail_row_data_notifications), + .selected_cell_height = MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT, + .unselected_cell_height = MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT, + .highlight_background_color = GColorIslamicGreen, }; case MenuLayerStyleTitleAndSubtitleAndIcon: - return (MenuDetailInfo) { - .rows = menu_detail_row_data_notifications, - .num_rows = ARRAY_LENGTH(menu_detail_row_data_notifications), - .selected_cell_height = MENU_CELL_ROUND_FOCUSED_TALL_CELL_HEIGHT, - .unselected_cell_height = MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT, - .highlight_background_color = GColorFolly, + return (MenuDetailInfo){ + .rows = menu_detail_row_data_notifications, + .num_rows = ARRAY_LENGTH(menu_detail_row_data_notifications), + .selected_cell_height = MENU_CELL_ROUND_FOCUSED_TALL_CELL_HEIGHT, + .unselected_cell_height = MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT, + .highlight_background_color = GColorFolly, }; case MenuLayerStyleTitleAndIconOnRight: - return (MenuDetailInfo) { - .rows = menu_detail_row_data_days, - .num_rows = ARRAY_LENGTH(menu_detail_row_data_days), - .selected_cell_height = menu_cell_basic_cell_height(), - .unselected_cell_height = MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT, - .highlight_background_color = GColorIslamicGreen, + return (MenuDetailInfo){ + .rows = menu_detail_row_data_days, + .num_rows = ARRAY_LENGTH(menu_detail_row_data_days), + .selected_cell_height = menu_cell_basic_cell_height(), + .unselected_cell_height = MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT, + .highlight_background_color = GColorIslamicGreen, }; case MenuLayerStyleTitleAndSubtitleAndValue: - return (MenuDetailInfo) { - .rows = menu_detail_row_data_alarms, - .num_rows = ARRAY_LENGTH(menu_detail_row_data_alarms), - .selected_cell_height = MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT, - .unselected_cell_height = MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT, - .highlight_background_color = GColorIslamicGreen, + return (MenuDetailInfo){ + .rows = menu_detail_row_data_alarms, + .num_rows = ARRAY_LENGTH(menu_detail_row_data_alarms), + .selected_cell_height = MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT, + .unselected_cell_height = MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT, + .highlight_background_color = GColorIslamicGreen, }; default: WTF; @@ -126,9 +121,8 @@ static MenuDetailInfo prv_get_row_details_for_style(MenuLayerStyle style) { static int16_t prv_get_cell_height_for_menu_layer(MenuLayer *menu_layer, MenuIndex *cell_index, MenuLayerStyle style) { const MenuDetailInfo row_details = prv_get_row_details_for_style(style); - return menu_layer_is_index_selected(menu_layer, cell_index) ? - row_details.selected_cell_height : - row_details.unselected_cell_height; + return menu_layer_is_index_selected(menu_layer, cell_index) ? row_details.selected_cell_height + : row_details.unselected_cell_height; } static int16_t prv_menu_detail_get_cell_height(struct MenuLayer *menu_layer, MenuIndex *cell_index, @@ -136,8 +130,7 @@ static int16_t prv_menu_detail_get_cell_height(struct MenuLayer *menu_layer, Men MenuDetailWindowData *data = context; return prv_get_cell_height_for_menu_layer(menu_layer, cell_index, data->style); } -static uint16_t prv_menu_detail_get_num_rows_callback(MenuLayer *menu_layer, - uint16_t section_index, +static uint16_t prv_menu_detail_get_num_rows_callback(MenuLayer *menu_layer, uint16_t section_index, void *context) { MenuDetailWindowData *data = context; return prv_get_row_details_for_style(data->style).num_rows; @@ -183,8 +176,8 @@ static void prv_menu_detail_draw_row(GContext *ctx, const Layer *cell_layer, } } -static void prv_menu_detail_draw_row_callback(GContext* ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *context) { +static void prv_menu_detail_draw_row_callback(GContext *ctx, const Layer *cell_layer, + MenuIndex *cell_index, void *context) { MenuDetailWindowData *data = context; const MenuDetailInfo menu_info = prv_get_row_details_for_style(data->style); MenuDetailRowData row_data = menu_info.rows[cell_index->row]; @@ -195,14 +188,15 @@ static void prv_detail_window_load(Window *window) { MenuDetailWindowData *data = window_get_user_data(window); MenuLayer *menu_layer = &data->menu_layer; - const GRect menu_layer_frame = grect_inset_internal(window->layer.bounds, 0, - STATUS_BAR_LAYER_HEIGHT); + const GRect menu_layer_frame = + grect_inset_internal(window->layer.bounds, 0, STATUS_BAR_LAYER_HEIGHT); menu_layer_init(menu_layer, &menu_layer_frame); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_cell_height = prv_menu_detail_get_cell_height, - .get_num_rows = prv_menu_detail_get_num_rows_callback, - .draw_row = prv_menu_detail_draw_row_callback, - }); + menu_layer_set_callbacks(menu_layer, data, + &(MenuLayerCallbacks){ + .get_cell_height = prv_menu_detail_get_cell_height, + .get_num_rows = prv_menu_detail_get_num_rows_callback, + .draw_row = prv_menu_detail_draw_row_callback, + }); menu_layer_set_click_config_onto_window(menu_layer, window); menu_layer_set_selected_index(menu_layer, MenuIndex(0, 1), MenuRowAlignCenter, false); const MenuDetailInfo menu_info = prv_get_row_details_for_style(data->style); @@ -228,10 +222,10 @@ static void prv_push_detail_window(MenuLayerStyle menu_layer_style) { Window *window = &data->window; window_init(window, WINDOW_NAME("MenuLayer Round Demo Detail Menu")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_detail_window_load, - .unload = prv_detail_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_detail_window_load, + .unload = prv_detail_window_unload, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -251,11 +245,11 @@ typedef struct { } MenuChooserRowData; static const MenuChooserRowData menu_chooser_row_data[] = { - {"Title Only", MenuLayerStyleTitle}, - {"Title & Subtitle", MenuLayerStyleTitleAndSubtitle}, - {"Title & Right Icon", MenuLayerStyleTitleAndIconOnRight}, - {"Title, Sub, Value", MenuLayerStyleTitleAndSubtitleAndValue}, - {"Title, Sub, Icon", MenuLayerStyleTitleAndSubtitleAndIcon}, + {"Title Only", MenuLayerStyleTitle}, + {"Title & Subtitle", MenuLayerStyleTitleAndSubtitle}, + {"Title & Right Icon", MenuLayerStyleTitleAndIconOnRight}, + {"Title, Sub, Value", MenuLayerStyleTitleAndSubtitleAndValue}, + {"Title, Sub, Icon", MenuLayerStyleTitleAndSubtitleAndIcon}, }; static int16_t prv_menu_chooser_get_cell_height(struct MenuLayer *menu_layer, MenuIndex *cell_index, @@ -264,12 +258,11 @@ static int16_t prv_menu_chooser_get_cell_height(struct MenuLayer *menu_layer, Me } static uint16_t prv_menu_chooser_get_num_rows_callback(struct MenuLayer *menu_layer, - uint16_t section_index, - void *context) { + uint16_t section_index, void *context) { return ARRAY_LENGTH(menu_chooser_row_data); } -static void prv_menu_chooser_draw_row_callback(GContext* ctx, const Layer *cell_layer, +static void prv_menu_chooser_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, void *context) { MenuChooserRowData row_data = menu_chooser_row_data[cell_index->row]; menu_cell_basic_draw(ctx, cell_layer, row_data.title, NULL, NULL); @@ -284,15 +277,16 @@ static void prv_window_load(Window *window) { MenuChooserData *data = window_get_user_data(window); MenuLayer *menu_layer = &data->menu_layer; - const GRect menu_layer_frame = grect_inset_internal(window->layer.bounds, 0, - STATUS_BAR_LAYER_HEIGHT); + const GRect menu_layer_frame = + grect_inset_internal(window->layer.bounds, 0, STATUS_BAR_LAYER_HEIGHT); menu_layer_init(menu_layer, &menu_layer_frame); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_cell_height = prv_menu_chooser_get_cell_height, - .get_num_rows = prv_menu_chooser_get_num_rows_callback, - .draw_row = prv_menu_chooser_draw_row_callback, - .select_click = prv_menu_chooser_select_callback, - }); + menu_layer_set_callbacks(menu_layer, data, + &(MenuLayerCallbacks){ + .get_cell_height = prv_menu_chooser_get_cell_height, + .get_num_rows = prv_menu_chooser_get_num_rows_callback, + .draw_row = prv_menu_chooser_draw_row_callback, + .select_click = prv_menu_chooser_select_callback, + }); menu_layer_set_click_config_onto_window(menu_layer, window); menu_layer_set_selected_index(menu_layer, MenuIndex(0, 1), MenuRowAlignCenter, false); menu_layer_set_highlight_colors(menu_layer, GColorPictonBlue, GColorWhite); @@ -320,10 +314,10 @@ static void prv_init(void) { Window *window = &data->window; window_init(window, WINDOW_NAME("MenuLayer Round Demo Chooser Menu")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -339,10 +333,10 @@ static void s_main(void) { prv_deinit(); } -const PebbleProcessMd* menu_round_app_get_info() { +const PebbleProcessMd *menu_round_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "MenuLayer Round Demo" + .common.main_func = &s_main, + .name = "MenuLayer Round Demo" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/menu_round/menu_round.h b/src/fw/apps/demo/menu_round/menu_round.h index 1175d73c54..fd62de35c8 100644 --- a/src/fw/apps/demo/menu_round/menu_round.h +++ b/src/fw/apps/demo/menu_round/menu_round.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* menu_round_app_get_info(); +const PebbleProcessMd *menu_round_app_get_info(); diff --git a/src/fw/apps/demo/morph_square/morph_square_demo.c b/src/fw/apps/demo/morph_square/morph_square_demo.c index 19aa3a1c52..f6844d1872 100644 --- a/src/fw/apps/demo/morph_square/morph_square_demo.c +++ b/src/fw/apps/demo/morph_square/morph_square_demo.c @@ -67,11 +67,11 @@ static void prv_init(void) { Window *window = &data->window; window_init(window, WINDOW_NAME("Morph Square Demo")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - .appear = prv_window_appear, - .unload = prv_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + .appear = prv_window_appear, + .unload = prv_window_unload, + }); window_set_click_config_provider_with_context(window, prv_click_config_provider, data); @@ -96,14 +96,16 @@ static void s_main(void) { const PebbleProcessMd *morph_square_demo_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = s_main, - // UUID: 6447c83d-52b7-4579-8817-8c7ec5927cbe - .uuid = {0x64, 0x47, 0xc8, 0x3d, 0x52, 0xb7, 0x45, 0x79, - 0x88, 0x17, 0x8c, 0x7e, 0xc5, 0x92, 0x7c, 0xbe}, - }, - .name = "Morph Square Demo", + .common = + { + .main_func = s_main, + // UUID: 6447c83d-52b7-4579-8817-8c7ec5927cbe + .uuid = + {0x64, 0x47, 0xc8, 0x3d, 0x52, 0xb7, 0x45, 0x79, 0x88, 0x17, 0x8c, 0x7e, 0xc5, + 0x92, 0x7c, 0xbe}, + }, + .name = "Morph Square Demo", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/movable_line/movable_line.c b/src/fw/apps/demo/movable_line/movable_line.c index 81a461d7bd..876ac4889f 100644 --- a/src/fw/apps/demo/movable_line/movable_line.c +++ b/src/fw/apps/demo/movable_line/movable_line.c @@ -43,7 +43,6 @@ typedef enum LineAttribute { ATTRIBUTE_COUNT } LineAttribute; - typedef struct AppData { Layer *canvas_layer; @@ -133,18 +132,16 @@ static void select_handler(ClickRecognizerRef recognizer, void *context) { layer_mark_dirty(data->canvas_layer); } - static void click_config_provider(void *context) { window_single_repeating_click_subscribe(BUTTON_ID_UP, 100, up_handler); window_single_repeating_click_subscribe(BUTTON_ID_SELECT, 100, select_handler); window_single_repeating_click_subscribe(BUTTON_ID_DOWN, 100, down_handler); } -static void draw_ui_element(GContext *ctx, GRect bounds, const char *text, - bool chosen, bool selected) { - GFont font = fonts_get_system_font(chosen || selected? - FONT_KEY_GOTHIC_14_BOLD - : FONT_KEY_GOTHIC_14); +static void draw_ui_element(GContext *ctx, GRect bounds, const char *text, bool chosen, + bool selected) { + GFont font = + fonts_get_system_font(chosen || selected ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_14); if (chosen && selected) { // Draw rectangle behind text, invert text color graphics_context_set_fill_color(ctx, GColorWhite); @@ -153,11 +150,10 @@ static void draw_ui_element(GContext *ctx, GRect bounds, const char *text, } else { graphics_context_set_text_color(ctx, GColorWhite); } - graphics_draw_text(ctx, text, font, bounds, GTextOverflowModeFill, - GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, text, font, bounds, GTextOverflowModeFill, GTextAlignmentCenter, NULL); } -static void canvas_update_proc(Layer *layer, GContext* ctx) { +static void canvas_update_proc(Layer *layer, GContext *ctx) { AppData *data = window_get_user_data(s_window); GRect bounds = layer->bounds; @@ -175,24 +171,19 @@ static void canvas_update_proc(Layer *layer, GContext* ctx) { draw_ui_element(ctx, GRect(90, 80, 20, 20), "W", data->hue == HUE_WHITE, data->selection == ATTRIBUTE_HUE); - draw_ui_element(ctx, GRect(30, 100, 35, 20), "Both", - data->pixel_bit == PIXEL_BIT_BOTH, + draw_ui_element(ctx, GRect(30, 100, 35, 20), "Both", data->pixel_bit == PIXEL_BIT_BOTH, data->selection == ATTRIBUTE_PIXEL_BIT); - draw_ui_element(ctx, GRect(65, 100, 30, 20), "MSB", - data->pixel_bit == PIXEL_BIT_MSB, + draw_ui_element(ctx, GRect(65, 100, 30, 20), "MSB", data->pixel_bit == PIXEL_BIT_MSB, data->selection == ATTRIBUTE_PIXEL_BIT); - draw_ui_element(ctx, GRect(95, 100, 30, 20), "LSB", - data->pixel_bit == PIXEL_BIT_LSB, + draw_ui_element(ctx, GRect(95, 100, 30, 20), "LSB", data->pixel_bit == PIXEL_BIT_LSB, data->selection == ATTRIBUTE_PIXEL_BIT); char text[10]; - snprintf(text, sizeof(text), "x=%"PRId16, data->intersection.x); - draw_ui_element(ctx, GRect(30, 120, 40, 20), text, - data->selection == ATTRIBUTE_X, + snprintf(text, sizeof(text), "x=%" PRId16, data->intersection.x); + draw_ui_element(ctx, GRect(30, 120, 40, 20), text, data->selection == ATTRIBUTE_X, data->selection == ATTRIBUTE_X); - snprintf(text, sizeof(text), "y=%"PRId16, data->intersection.y); - draw_ui_element(ctx, GRect(70, 120, 40, 20), text, - data->selection == ATTRIBUTE_Y, + snprintf(text, sizeof(text), "y=%" PRId16, data->intersection.y); + draw_ui_element(ctx, GRect(70, 120, 40, 20), text, data->selection == ATTRIBUTE_Y, data->selection == ATTRIBUTE_Y); // Draw the lines @@ -216,8 +207,7 @@ static void canvas_update_proc(Layer *layer, GContext* ctx) { g = 1; b = 1; } - GColor line_color = GColorFromRGB(r * saturation, g * saturation, - b * saturation); + GColor line_color = GColorFromRGB(r * saturation, g * saturation, b * saturation); graphics_context_set_stroke_color(ctx, line_color); graphics_draw_line(ctx, GPoint(0, data->intersection.y), GPoint(bounds.size.w, data->intersection.y)); @@ -230,8 +220,7 @@ static void main_window_load(Window *window) { Layer *window_layer = window_get_root_layer(window); GRect window_bounds = window_layer->bounds; - data->canvas_layer = layer_create(GRect(0, 0, window_bounds.size.w, - window_bounds.size.h)); + data->canvas_layer = layer_create(GRect(0, 0, window_bounds.size.w, window_bounds.size.h)); layer_set_update_proc(data->canvas_layer, canvas_update_proc); layer_add_child(window_layer, data->canvas_layer); } @@ -250,10 +239,10 @@ static void init(void) { s_window = window_create(); window_set_user_data(s_window, data); window_set_fullscreen(s_window, true); - window_set_window_handlers(s_window, &(WindowHandlers) { - .load = main_window_load, - .unload = main_window_unload, - }); + window_set_window_handlers(s_window, &(WindowHandlers){ + .load = main_window_load, + .unload = main_window_unload, + }); window_set_click_config_provider(s_window, click_config_provider); @@ -273,10 +262,10 @@ static void s_main(void) { deinit(); } -const PebbleProcessMd* movable_line_get_app_info(void) { +const PebbleProcessMd *movable_line_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = s_main, - .name = "Movable Line" + .common.main_func = s_main, + .name = "Movable Line" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/movable_line/movable_line.h b/src/fw/apps/demo/movable_line/movable_line.h index 6a883789cd..53f1f53a8d 100644 --- a/src/fw/apps/demo/movable_line/movable_line.h +++ b/src/fw/apps/demo/movable_line/movable_line.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* movable_line_get_app_info(); +const PebbleProcessMd *movable_line_get_app_info(); diff --git a/src/fw/apps/demo/mpu_test/test_mpu_cache.c b/src/fw/apps/demo/mpu_test/test_mpu_cache.c index b5e1b2bf07..77c9209480 100644 --- a/src/fw/apps/demo/mpu_test/test_mpu_cache.c +++ b/src/fw/apps/demo/mpu_test/test_mpu_cache.c @@ -19,7 +19,7 @@ typedef struct { Window window; TextLayer text; - ALIGN(32) uint32_t test; // Align on 32-bit boundary (D-cache line on M7 is 32 bytes) + ALIGN(32) uint32_t test; // Align on 32-bit boundary (D-cache line on M7 is 32 bytes) } AppData; static void prv_window_load(Window *window) { @@ -28,15 +28,15 @@ static void prv_window_load(Window *window) { GRect frame; layer_get_frame(window_get_root_layer(&app_data->window), &frame); GRect text_frame = { - .size.h = 48, - .size.w = 100, + .size.h = 48, + .size.w = 100, }; grect_align(&text_frame, &frame, GAlignCenter, false); text_layer_init(&app_data->text, &text_frame); GFont font = fonts_get_system_font(FONT_KEY_GOTHIC_28); text_layer_set_font(&app_data->text, font); text_layer_set_text_alignment(&app_data->text, GTextAlignmentCenter); - layer_add_child(window_get_root_layer(&app_data->window), (Layer*)&app_data->text); + layer_add_child(window_get_root_layer(&app_data->window), (Layer *)&app_data->text); } static void prv_verify_modify_on_app_task(void *data) { @@ -64,8 +64,7 @@ static void prv_handle_init(void) { app_state_set_user_data(app_data); window_init(&app_data->window, WINDOW_NAME("test_mpu")); window_set_user_data(&app_data->window, app_data); - window_set_window_handlers(&app_data->window, &(WindowHandlers) { - .load = prv_window_load }); + window_set_window_handlers(&app_data->window, &(WindowHandlers){.load = prv_window_load}); const bool animated = true; app_window_stack_push(&app_data->window, animated); @@ -79,10 +78,10 @@ static void prv_main(void) { app_event_loop(); } -const PebbleProcessMd* test_mpu_cache_get_info() { +const PebbleProcessMd *test_mpu_cache_get_info() { static const PebbleProcessMdSystem s_test_mpu_info = { - .common.main_func = prv_main, - .name = "Test MPU cache" + .common.main_func = prv_main, + .name = "Test MPU cache" }; - return (const PebbleProcessMd*) &s_test_mpu_info; + return (const PebbleProcessMd *)&s_test_mpu_info; } diff --git a/src/fw/apps/demo/mpu_test/test_mpu_cache.h b/src/fw/apps/demo/mpu_test/test_mpu_cache.h index 15349b046f..a4c87405eb 100644 --- a/src/fw/apps/demo/mpu_test/test_mpu_cache.h +++ b/src/fw/apps/demo/mpu_test/test_mpu_cache.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* test_mpu_cache_get_info(); +const PebbleProcessMd *test_mpu_cache_get_info(); diff --git a/src/fw/apps/demo/mpu_violation_test/test_mpu_violation.c b/src/fw/apps/demo/mpu_violation_test/test_mpu_violation.c index 8e2c96664e..01851c452a 100644 --- a/src/fw/apps/demo/mpu_violation_test/test_mpu_violation.c +++ b/src/fw/apps/demo/mpu_violation_test/test_mpu_violation.c @@ -177,9 +177,8 @@ static void prv_run_test(TestKind kind) { } static void prv_redraw_selection(AppData *data) { - snprintf(data->selection_buffer, sizeof(data->selection_buffer), - "[%d/%d]\n%s", data->selected_index + 1, TestKindCount, - s_test_titles[data->selected_index]); + snprintf(data->selection_buffer, sizeof(data->selection_buffer), "[%d/%d]\n%s", + data->selected_index + 1, TestKindCount, s_test_titles[data->selected_index]); text_layer_set_text(&data->selection_text, data->selection_buffer); layer_mark_dirty(text_layer_get_layer(&data->selection_text)); } @@ -202,8 +201,7 @@ static void prv_up_click(ClickRecognizerRef rec, void *ctx) { if (data->test_running) { return; } - data->selected_index = - (data->selected_index + TestKindCount - 1) % TestKindCount; + data->selected_index = (data->selected_index + TestKindCount - 1) % TestKindCount; prv_redraw_selection(data); } @@ -246,35 +244,29 @@ static void prv_window_load(Window *window) { GRect header_frame = bounds; header_frame.size.h = 24; text_layer_init(&data->header_text, &header_frame); - text_layer_set_font(&data->header_text, - fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD)); + text_layer_set_font(&data->header_text, fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD)); text_layer_set_text_alignment(&data->header_text, GTextAlignmentCenter); text_layer_set_text(&data->header_text, "MPU violation"); - layer_add_child(window_get_root_layer(window), - text_layer_get_layer(&data->header_text)); + layer_add_child(window_get_root_layer(window), text_layer_get_layer(&data->header_text)); // Selection display in the middle. GRect selection_frame = bounds; selection_frame.origin.y = 32; selection_frame.size.h = bounds.size.h - 64; text_layer_init(&data->selection_text, &selection_frame); - text_layer_set_font(&data->selection_text, - fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); + text_layer_set_font(&data->selection_text, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); text_layer_set_text_alignment(&data->selection_text, GTextAlignmentCenter); - layer_add_child(window_get_root_layer(window), - text_layer_get_layer(&data->selection_text)); + layer_add_child(window_get_root_layer(window), text_layer_get_layer(&data->selection_text)); // Hint at the bottom: button mapping. GRect hint_frame = bounds; hint_frame.origin.y = bounds.size.h - 24; hint_frame.size.h = 24; text_layer_init(&data->hint_text, &hint_frame); - text_layer_set_font(&data->hint_text, - fonts_get_system_font(FONT_KEY_GOTHIC_14)); + text_layer_set_font(&data->hint_text, fonts_get_system_font(FONT_KEY_GOTHIC_14)); text_layer_set_text_alignment(&data->hint_text, GTextAlignmentCenter); text_layer_set_text(&data->hint_text, "Up/Dn cycle, Sel run"); - layer_add_child(window_get_root_layer(window), - text_layer_get_layer(&data->hint_text)); + layer_add_child(window_get_root_layer(window), text_layer_get_layer(&data->hint_text)); prv_redraw_selection(data); } @@ -287,13 +279,12 @@ static void prv_handle_init(void) { window_init(&app_data->window, WINDOW_NAME("test_mpu_violation")); window_set_user_data(&app_data->window, app_data); - window_set_window_handlers(&app_data->window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(&app_data->window, &(WindowHandlers){ + .load = prv_window_load, + }); // Pass app_data as the click context so handlers don't have to reach // for a static (which would live in kernel BSS and fault on write). - window_set_click_config_provider_with_context(&app_data->window, - prv_click_config, app_data); + window_set_click_config_provider_with_context(&app_data->window, prv_click_config, app_data); app_window_stack_push(&app_data->window, true /* animated */); } @@ -303,13 +294,13 @@ static void prv_main(void) { app_event_loop(); } -const PebbleProcessMd* test_mpu_violation_get_info(void) { +const PebbleProcessMd *test_mpu_violation_get_info(void) { static const PebbleProcessMdSystem s_info = { - .common.main_func = prv_main, - // System apps default to privileged; this one must run unprivileged - // for the MPU to actually evaluate access against the App task regions. - .common.is_unprivileged = true, - .name = "MPU violation", + .common.main_func = prv_main, + // System apps default to privileged; this one must run unprivileged + // for the MPU to actually evaluate access against the App task regions. + .common.is_unprivileged = true, + .name = "MPU violation", }; return (const PebbleProcessMd *)&s_info; } diff --git a/src/fw/apps/demo/mpu_violation_test/test_mpu_violation.h b/src/fw/apps/demo/mpu_violation_test/test_mpu_violation.h index 0abafc64b1..07a78efaa4 100644 --- a/src/fw/apps/demo/mpu_violation_test/test_mpu_violation.h +++ b/src/fw/apps/demo/mpu_violation_test/test_mpu_violation.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* test_mpu_violation_get_info(void); +const PebbleProcessMd *test_mpu_violation_get_info(void); diff --git a/src/fw/apps/demo/number_field/number_field.c b/src/fw/apps/demo/number_field/number_field.c index a19a088e7c..62f33602e1 100644 --- a/src/fw/apps/demo/number_field/number_field.c +++ b/src/fw/apps/demo/number_field/number_field.c @@ -15,7 +15,7 @@ typedef struct { } AppData; static void selected(NumberWindow *nw, void *ctx) { - PBL_LOG_DBG("selected: %"PRId32, number_window_get_value(nw)); + PBL_LOG_DBG("selected: %" PRId32, number_window_get_value(nw)); const bool animated = true; app_window_stack_pop(animated); @@ -28,9 +28,8 @@ static void handle_init(void) { app_state_set_user_data(data); - number_window_init(&data->num, "Some Number", - (NumberWindowCallbacks) { .selected = selected }, - data); + number_window_init(&data->num, "Some Number", (NumberWindowCallbacks){.selected = selected}, + data); number_window_set_min(&data->num, 10); number_window_set_max(&data->num, 100); @@ -53,11 +52,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* number_field_app_get_info() { +const PebbleProcessMd *number_field_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "NumberField Demo" + .common.main_func = &s_main, + .name = "NumberField Demo" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/demo/number_field/number_field.h b/src/fw/apps/demo/number_field/number_field.h index 0dc50edcf3..190010e9f1 100644 --- a/src/fw/apps/demo/number_field/number_field.h +++ b/src/fw/apps/demo/number_field/number_field.h @@ -5,5 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* number_field_app_get_info(); - +const PebbleProcessMd *number_field_app_get_info(); diff --git a/src/fw/apps/demo/option_menu/option_menu_demo.c b/src/fw/apps/demo/option_menu/option_menu_demo.c index e3db9a8db0..7f8bedd83a 100644 --- a/src/fw/apps/demo/option_menu/option_menu_demo.c +++ b/src/fw/apps/demo/option_menu/option_menu_demo.c @@ -14,10 +14,10 @@ #include "pbl/util/size.h" const char *s_strings[] = { - "One", - "Two", - "Three", - "Four", + "One", + "Two", + "Three", + "Four", }; static void prv_menu_select(OptionMenu *option_menu, int selection, void *context) { @@ -42,19 +42,21 @@ static void prv_init(void) { OptionMenu *option_menu = option_menu_create(); const OptionMenuConfig config = { - .title = "Option Menu", - .choice = OPTION_MENU_CHOICE_NONE, - .status_colors = { GColorDarkGray, GColorWhite }, - .highlight_colors = { PBL_IF_COLOR_ELSE(GColorCobaltBlue, GColorBlack), GColorWhite }, - .icons_enabled = true + .title = "Option Menu", + .choice = OPTION_MENU_CHOICE_NONE, + .status_colors = {GColorDarkGray, GColorWhite}, + .highlight_colors = {PBL_IF_COLOR_ELSE(GColorCobaltBlue, GColorBlack), GColorWhite}, + .icons_enabled = true }; option_menu_configure(option_menu, &config); - option_menu_set_callbacks(option_menu, &(OptionMenuCallbacks) { - .select = prv_menu_select, - .get_num_rows = prv_menu_get_num_rows, - .draw_row = prv_menu_draw_row, - .unload = prv_menu_unload, - }, option_menu); + option_menu_set_callbacks(option_menu, + &(OptionMenuCallbacks){ + .select = prv_menu_select, + .get_num_rows = prv_menu_get_num_rows, + .draw_row = prv_menu_draw_row, + .unload = prv_menu_unload, + }, + option_menu); const bool animated = true; app_window_stack_push(&option_menu->window, animated); @@ -75,14 +77,16 @@ static void s_main(void) { const PebbleProcessMd *option_menu_demo_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = s_main, - // UUID: e8f5d3cc-76ad-4575-97da-6d2049a1b3a4 - .uuid = {0xe8, 0xf5, 0xd3, 0xcc, 0x76, 0xad, 0x45, 0x75, - 0x97, 0xda, 0x6d, 0x20, 0x49, 0xa1, 0xb3, 0xa4}, - }, - .name = "Option Menu Demo", + .common = + { + .main_func = s_main, + // UUID: e8f5d3cc-76ad-4575-97da-6d2049a1b3a4 + .uuid = + {0xe8, 0xf5, 0xd3, 0xcc, 0x76, 0xad, 0x45, 0x75, 0x97, 0xda, 0x6d, 0x20, 0x49, + 0xa1, 0xb3, 0xa4}, + }, + .name = "Option Menu Demo", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/pebble_colors/pebble_colors.c b/src/fw/apps/demo/pebble_colors/pebble_colors.c index de392549c6..236cd61544 100644 --- a/src/fw/apps/demo/pebble_colors/pebble_colors.c +++ b/src/fw/apps/demo/pebble_colors/pebble_colors.c @@ -16,9 +16,9 @@ #include -#define ALPHA_0 0x00 -#define ALPHA_33 0x40 -#define ALPHA_66 0x80 +#define ALPHA_0 0x00 +#define ALPHA_33 0x40 +#define ALPHA_66 0x80 #define ALPHA_100 0xC0 static Window *s_window; @@ -28,138 +28,18 @@ static uint8_t *s_color_table = NULL; // Sorted by Hue, Value, Saturation static uint8_t color_table_hvs[] = { - 0x00, - 0x15, - 0x10, - 0x2a, - 0x25, - 0x20, - 0x3f, - 0x3a, - 0x35, - 0x30, - 0x34, - 0x24, - 0x39, - 0x38, - 0x14, - 0x29, - 0x28, - 0x3e, - 0x3d, - 0x3c, - 0x2c, - 0x18, - 0x2d, - 0x1c, - 0x04, - 0x19, - 0x08, - 0x2e, - 0x1d, - 0x0c, - 0x0d, - 0x09, - 0x1e, - 0x0e, - 0x05, - 0x1a, - 0x0a, - 0x2f, - 0x1f, - 0x0f, - 0x0b, - 0x06, - 0x1b, - 0x07, - 0x01, - 0x16, - 0x02, - 0x2b, - 0x17, - 0x03, - 0x13, - 0x12, - 0x27, - 0x23, - 0x11, - 0x26, - 0x22, - 0x3b, - 0x37, - 0x33, - 0x32, - 0x21, - 0x36, - 0x31, + 0x00, 0x15, 0x10, 0x2a, 0x25, 0x20, 0x3f, 0x3a, 0x35, 0x30, 0x34, 0x24, 0x39, 0x38, 0x14, 0x29, + 0x28, 0x3e, 0x3d, 0x3c, 0x2c, 0x18, 0x2d, 0x1c, 0x04, 0x19, 0x08, 0x2e, 0x1d, 0x0c, 0x0d, 0x09, + 0x1e, 0x0e, 0x05, 0x1a, 0x0a, 0x2f, 0x1f, 0x0f, 0x0b, 0x06, 0x1b, 0x07, 0x01, 0x16, 0x02, 0x2b, + 0x17, 0x03, 0x13, 0x12, 0x27, 0x23, 0x11, 0x26, 0x22, 0x3b, 0x37, 0x33, 0x32, 0x21, 0x36, 0x31, }; // Sorted by Hue, Saturation, Value static uint8_t color_table_hsv[] = { - 0x00, - 0x15, - 0x2a, - 0x3f, - 0x3a, - 0x25, - 0x35, - 0x10, - 0x20, - 0x30, - 0x34, - 0x39, - 0x24, - 0x38, - 0x3e, - 0x29, - 0x3d, - 0x14, - 0x28, - 0x3c, - 0x2c, - 0x2d, - 0x18, - 0x1c, - 0x2e, - 0x19, - 0x1d, - 0x04, - 0x08, - 0x0c, - 0x0d, - 0x1e, - 0x09, - 0x0e, - 0x2f, - 0x1a, - 0x1f, - 0x05, - 0x0a, - 0x0f, - 0x0b, - 0x1b, - 0x06, - 0x07, - 0x2b, - 0x16, - 0x17, - 0x01, - 0x02, - 0x03, - 0x13, - 0x27, - 0x12, - 0x23, - 0x3b, - 0x26, - 0x37, - 0x11, - 0x22, - 0x33, - 0x32, - 0x36, - 0x21, - 0x31, + 0x00, 0x15, 0x2a, 0x3f, 0x3a, 0x25, 0x35, 0x10, 0x20, 0x30, 0x34, 0x39, 0x24, 0x38, 0x3e, 0x29, + 0x3d, 0x14, 0x28, 0x3c, 0x2c, 0x2d, 0x18, 0x1c, 0x2e, 0x19, 0x1d, 0x04, 0x08, 0x0c, 0x0d, 0x1e, + 0x09, 0x0e, 0x2f, 0x1a, 0x1f, 0x05, 0x0a, 0x0f, 0x0b, 0x1b, 0x06, 0x07, 0x2b, 0x16, 0x17, 0x01, + 0x02, 0x03, 0x13, 0x27, 0x12, 0x23, 0x3b, 0x26, 0x37, 0x11, 0x22, 0x33, 0x32, 0x36, 0x21, 0x31, }; typedef enum { @@ -169,7 +49,7 @@ typedef enum { // Add more above here PROPERTY_MAX, - PROPERTY_COLOR_TABLE, // Currently don't allow to switch the color table order + PROPERTY_COLOR_TABLE, // Currently don't allow to switch the color table order } ColorProperties; typedef struct AppData { @@ -213,9 +93,9 @@ static void set_text_layers(AppData *data) { if (data->alpha == ALPHA_100) { alpha_percent = 100; } else if (data->alpha == ALPHA_66) { - alpha_percent = 50; // FIXME: Currently don't support 66 + alpha_percent = 50; // FIXME: Currently don't support 66 } else if (data->alpha == ALPHA_33) { - alpha_percent = 25; // FIXME: Currently don't support 33 + alpha_percent = 25; // FIXME: Currently don't support 33 } else if (data->alpha == ALPHA_0) { alpha_percent = 0; } @@ -265,9 +145,9 @@ static void set_text_layers(AppData *data) { layer_mark_dirty(text_layer_get_layer(data->bg_text)); } -static void draw_color_point(GContext* ctx, AppData *data, GPoint point) { - GColor fg_color = (GColor){ .argb = (data->fg_color.argb | ALPHA_100) }; - GColor bg_color = (GColor){ .argb = (data->bg_color.argb | ALPHA_100) }; +static void draw_color_point(GContext *ctx, AppData *data, GPoint point) { + GColor fg_color = (GColor){.argb = (data->fg_color.argb | ALPHA_100)}; + GColor bg_color = (GColor){.argb = (data->bg_color.argb | ALPHA_100)}; uint8_t alpha = data->alpha; if (alpha == ALPHA_100) { @@ -299,7 +179,7 @@ static void draw_color_point(GContext* ctx, AppData *data, GPoint point) { } } -static void draw_color_rect(GContext* ctx, AppData *data, GRect rect) { +static void draw_color_rect(GContext *ctx, AppData *data, GRect rect) { uint16_t width = rect.size.w; uint16_t height = rect.size.h; @@ -311,14 +191,14 @@ static void draw_color_rect(GContext* ctx, AppData *data, GRect rect) { } } -static void draw_boxes(GContext* ctx, AppData *data) { +static void draw_boxes(GContext *ctx, AppData *data) { // Draw border if (gcolor_equal(data->fg_color, GColorBlack)) { graphics_context_set_fill_color(ctx, GColorWhite); graphics_fill_round_rect(ctx, &GRect(35, 1, 32, 22), 4, GCornersAll); } // Draw foreground color - GColor fg_color = (GColor){ .argb = (data->fg_color.argb | ALPHA_100) }; + GColor fg_color = (GColor){.argb = (data->fg_color.argb | ALPHA_100)}; graphics_context_set_fill_color(ctx, fg_color); graphics_fill_round_rect(ctx, &GRect(36, 2, 30, 20), 4, GCornersAll); @@ -328,7 +208,7 @@ static void draw_boxes(GContext* ctx, AppData *data) { graphics_fill_round_rect(ctx, &GRect(35, 47, 32, 22), 4, GCornersAll); } // Draw background color - GColor bg_color = (GColor){ .argb = (data->bg_color.argb | ALPHA_100) }; + GColor bg_color = (GColor){.argb = (data->bg_color.argb | ALPHA_100)}; graphics_context_set_fill_color(ctx, bg_color); graphics_fill_round_rect(ctx, &GRect(36, 48, 30, 20), 4, GCornersAll); } @@ -336,7 +216,7 @@ static void draw_boxes(GContext* ctx, AppData *data) { #define COLOR_BAR_WIDTH 4 #define COLOR_BAR_HEIGHT 24 #define ROW_LENGTH 32 -static void draw_color_wheel_box(GContext* ctx, AppData *data) { +static void draw_color_wheel_box(GContext *ctx, AppData *data) { GPoint origin = GPoint(8, 114); GColor compare_color = GColorClear; uint8_t color_index_match = 0; @@ -353,7 +233,7 @@ static void draw_color_wheel_box(GContext* ctx, AppData *data) { for (uint8_t row = 0; row < 2; row++) { for (uint8_t color_index = row * ROW_LENGTH; color_index < (row + 1) * ROW_LENGTH; - color_index++) { + color_index++) { GColor color = (GColor){.argb = (s_color_table[color_index] | ALPHA_100)}; if (compare && gcolor_equal(color, compare_color)) { @@ -361,9 +241,9 @@ static void draw_color_wheel_box(GContext* ctx, AppData *data) { height_offset = row * (COLOR_BAR_HEIGHT + 4); } - GRect box = GRect(origin.x + (4 * (color_index - (row * ROW_LENGTH))), - origin.y + (row * (COLOR_BAR_HEIGHT + 4)), - COLOR_BAR_WIDTH, COLOR_BAR_HEIGHT); + GRect box = + GRect(origin.x + (4 * (color_index - (row * ROW_LENGTH))), + origin.y + (row * (COLOR_BAR_HEIGHT + 4)), COLOR_BAR_WIDTH, COLOR_BAR_HEIGHT); graphics_context_set_fill_color(ctx, color); graphics_fill_rect(ctx, &box); } @@ -371,7 +251,7 @@ static void draw_color_wheel_box(GContext* ctx, AppData *data) { // Draw border if (compare) { - const GRect box = GRect(origin.x + 4*color_index_match - 1, origin.y - 1 + height_offset, + const GRect box = GRect(origin.x + 4 * color_index_match - 1, origin.y - 1 + height_offset, COLOR_BAR_WIDTH + 2, COLOR_BAR_HEIGHT + 2); graphics_context_set_stroke_color(ctx, GColorWhite); graphics_draw_rect(ctx, &box); @@ -432,7 +312,7 @@ static void click_config_provider(void *context) { window_single_repeating_click_subscribe(BUTTON_ID_DOWN, 100, down_handler); } -static void layer_update_proc(Layer *layer, GContext* ctx) { +static void layer_update_proc(Layer *layer, GContext *ctx) { AppData *data = window_get_user_data(s_window); graphics_context_set_fill_color(ctx, GColorBlack); @@ -442,30 +322,29 @@ static void layer_update_proc(Layer *layer, GContext* ctx) { GFont font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); graphics_context_set_stroke_color(ctx, GColorWhite); - graphics_draw_rect(ctx, &GRect(71, 0, 73, 111)); // Border around BG + graphics_draw_rect(ctx, &GRect(71, 0, 73, 111)); // Border around BG graphics_context_set_fill_color(ctx, data->bg_color); graphics_fill_rect(ctx, &GRect(72, 0, 72, 110)); graphics_context_set_text_color(ctx, GColorWhite); - graphics_draw_text(ctx, "BG", font, GRect(72, 110 - 16, 20, 16), - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, "BG", font, GRect(72, 110 - 16, 20, 16), GTextOverflowModeFill, + GTextAlignmentLeft, NULL); draw_color_rect(ctx, data, GRect(92, 0, 62, 90)); graphics_context_set_text_color(ctx, GColorWhite); if (data->alpha < ALPHA_100) { - graphics_draw_text(ctx, "FG+BG", font, GRect(92, 90 - 16, 62, 16), - GTextOverflowModeFill, GTextAlignmentLeft, NULL); - } - else { - graphics_draw_text(ctx, "FG", font, GRect(92, 90 - 16, 62, 16), - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, "FG+BG", font, GRect(92, 90 - 16, 62, 16), GTextOverflowModeFill, + GTextAlignmentLeft, NULL); + } else { + graphics_draw_text(ctx, "FG", font, GRect(92, 90 - 16, 62, 16), GTextOverflowModeFill, + GTextAlignmentLeft, NULL); } if (data->alpha < ALPHA_100) { graphics_context_set_fill_color(ctx, data->fg_color); graphics_fill_rect(ctx, &GRect(124, 0, 20, 40)); graphics_context_set_text_color(ctx, GColorWhite); - graphics_draw_text(ctx, "FG", font, GRect(124, 40 - 16, 20, 16), - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, "FG", font, GRect(124, 40 - 16, 20, 16), GTextOverflowModeFill, + GTextAlignmentLeft, NULL); } draw_color_wheel_box(ctx, data); @@ -483,7 +362,6 @@ static void main_window_load(Window *window) { // Set the update_proc layer_set_update_proc(s_canvas_layer, layer_update_proc); - data->fg_text = text_layer_create(GRect(2, 2, 28, 20)); layer_add_child(window_get_root_layer(window), text_layer_get_layer(data->fg_text)); @@ -526,10 +404,10 @@ static void init(void) { s_window = window_create(); window_set_user_data(s_window, data); window_set_fullscreen(s_window, true); - window_set_window_handlers(s_window, &(WindowHandlers) { - .load = main_window_load, - .unload = main_window_unload, - }); + window_set_window_handlers(s_window, &(WindowHandlers){ + .load = main_window_load, + .unload = main_window_unload, + }); window_set_click_config_provider(s_window, click_config_provider); @@ -551,10 +429,10 @@ static void s_main(void) { deinit(); } -const PebbleProcessMd* pebble_colors_get_app_info(void) { +const PebbleProcessMd *pebble_colors_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = s_main, - .name = "Pebble Colors" + .common.main_func = s_main, + .name = "Pebble Colors" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/pebble_colors/pebble_colors.h b/src/fw/apps/demo/pebble_colors/pebble_colors.h index 58f48a7ab8..3f62b72366 100644 --- a/src/fw/apps/demo/pebble_colors/pebble_colors.h +++ b/src/fw/apps/demo/pebble_colors/pebble_colors.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* pebble_colors_get_app_info(); +const PebbleProcessMd *pebble_colors_get_app_info(); diff --git a/src/fw/apps/demo/pebble_shapes/pebble_shapes.c b/src/fw/apps/demo/pebble_shapes/pebble_shapes.c index fed8870770..f120967aaa 100644 --- a/src/fw/apps/demo/pebble_shapes/pebble_shapes.c +++ b/src/fw/apps/demo/pebble_shapes/pebble_shapes.c @@ -34,24 +34,9 @@ static GColor s_display_colors[NUM_SHAPES]; #define MAX_STROKE_WIDTH 20 -static const GPathInfo s_triangle_path = { - 3, - (GPoint[]) { - { -10, 0 }, - { 0, 10 }, - { 10, 0 } - } -}; - -static const GPathInfo s_bucket_path = { - 4, - (GPoint[]) { - { -10, 0 }, - { -10, 30 }, - { 10, 30 }, - { 10, 0 } - } -}; +static const GPathInfo s_triangle_path = {3, (GPoint[]){{-10, 0}, {0, 10}, {10, 0}}}; + +static const GPathInfo s_bucket_path = {4, (GPoint[]){{-10, 0}, {-10, 30}, {10, 30}, {10, 0}}}; static const int TARGET_FPS = 40; static const int PIXEL_SPEED_PER_FRAME = 2; @@ -134,24 +119,19 @@ typedef struct AppData { bool antialiased; } AppData; - static void log_state(AppData *data) { switch (data->state_index) { case APP_STATE_FILL_NON_AA: - PBL_LOG_DBG("State: Fill Non-Antialiased; SW: N/A (but currently: %d)", - data->stroke_width); + PBL_LOG_DBG("State: Fill Non-Antialiased; SW: N/A (but currently: %d)", data->stroke_width); break; case APP_STATE_FILL_AA: - PBL_LOG_DBG("State: Fill Antialiased; SW: N/A (but currently: %d)", - data->stroke_width); + PBL_LOG_DBG("State: Fill Antialiased; SW: N/A (but currently: %d)", data->stroke_width); break; case APP_STATE_DRAW_NON_AA_NO_SW: - PBL_LOG_DBG("State: Draw Non-Antialiased; SW: N/A (but currently: %d)", - data->stroke_width); + PBL_LOG_DBG("State: Draw Non-Antialiased; SW: N/A (but currently: %d)", data->stroke_width); break; case APP_STATE_DRAW_AA_NO_SW: - PBL_LOG_DBG("State: Draw Antialiased; SW: N/A (but currently: %d)", - data->stroke_width); + PBL_LOG_DBG("State: Draw Antialiased; SW: N/A (but currently: %d)", data->stroke_width); break; case APP_STATE_DRAW_NON_AA_SW: PBL_LOG_DBG("State: Draw Non-Antialiased; SW: %d", data->stroke_width); @@ -171,11 +151,11 @@ static bool stroke_width_enabled(AppStateIndex state_index) { static void update_state(AppData *data, AppStateIndex state_index) { data->state_index = state_index; - data->fill = ((data->state_index == APP_STATE_FILL_NON_AA) || - (data->state_index == APP_STATE_FILL_AA)); - data->antialiased = ((data->state_index == APP_STATE_DRAW_AA_NO_SW) || - (data->state_index == APP_STATE_DRAW_AA_SW) || - (data->state_index == APP_STATE_FILL_AA)); + data->fill = + ((data->state_index == APP_STATE_FILL_NON_AA) || (data->state_index == APP_STATE_FILL_AA)); + data->antialiased = + ((data->state_index == APP_STATE_DRAW_AA_NO_SW) || + (data->state_index == APP_STATE_DRAW_AA_SW) || (data->state_index == APP_STATE_FILL_AA)); } static void back_handler(ClickRecognizerRef recognizer, void *context) { @@ -237,14 +217,14 @@ static void prv_move_shape(AppData *data) { data->line_p0.x += (data->line_velocity_x * PIXEL_SPEED_PER_FRAME * 2); data->line_p1.x += (data->line_velocity_x * PIXEL_SPEED_PER_FRAME * 2); if (data->line_p0.x < 0 || data->line_p0.x > data->window.layer.bounds.size.w || - data->line_p1.x < 0 || data->line_p1.x > data->window.layer.bounds.size.w ) { + data->line_p1.x < 0 || data->line_p1.x > data->window.layer.bounds.size.w) { data->line_velocity_x = data->line_velocity_x * -1; } data->line_p0.y += (data->line_velocity_y * PIXEL_SPEED_PER_FRAME); data->line_p1.y += (data->line_velocity_y * PIXEL_SPEED_PER_FRAME); if (data->line_p0.y < 0 || data->line_p0.y > data->window.layer.bounds.size.h || - data->line_p1.y < 0 || data->line_p1.y > data->window.layer.bounds.size.h ) { + data->line_p1.y < 0 || data->line_p1.y > data->window.layer.bounds.size.h) { data->line_velocity_y = data->line_velocity_y * -1; } } else if (shape == SQUARE) { @@ -290,14 +270,14 @@ static void prv_move_shape(AppData *data) { // Move the line X per Y data->circle_origin.x += (data->circle_velocity_x * PIXEL_SPEED_PER_FRAME); if (data->circle_origin.x - data->circle_radius < 0 || - data->circle_origin.x + data->circle_radius > data->window.layer.bounds.size.w) { + data->circle_origin.x + data->circle_radius > data->window.layer.bounds.size.w) { data->circle_velocity_x = data->circle_velocity_x * -1; data->circle_color.argb = (((data->circle_color.argb + 1) & 0x3F) | 0xC0); } data->circle_origin.y += (data->circle_velocity_y * PIXEL_SPEED_PER_FRAME); if (data->circle_origin.y - data->circle_radius < 0 || - data->circle_origin.y + data->circle_radius > data->window.layer.bounds.size.h) { + data->circle_origin.y + data->circle_radius > data->window.layer.bounds.size.h) { data->circle_velocity_y = data->circle_velocity_y * -1; data->circle_color.argb = (((data->circle_color.argb + 1) & 0x3F) | 0xC0); } @@ -318,14 +298,12 @@ static void prv_move_shape(AppData *data) { } else if (shape == GPATH_OPEN_BUCKET) { // Move the line 2*X per 3*Y data->bucket_offset.x += (data->bucket_velocity_x * PIXEL_SPEED_PER_FRAME * 2); - if (data->bucket_offset.x < 0 || - data->bucket_offset.x > data->window.layer.bounds.size.w) { + if (data->bucket_offset.x < 0 || data->bucket_offset.x > data->window.layer.bounds.size.w) { data->bucket_velocity_x = data->bucket_velocity_x * -1; } data->bucket_offset.y += (data->bucket_velocity_y * PIXEL_SPEED_PER_FRAME * 3); - if (data->bucket_offset.y < 0 || - data->bucket_offset.y > data->window.layer.bounds.size.h) { + if (data->bucket_offset.y < 0 || data->bucket_offset.y > data->window.layer.bounds.size.h) { data->bucket_velocity_y = data->bucket_velocity_y * -1; } gpath_move_to(data->bucket, data->bucket_offset); @@ -333,7 +311,7 @@ static void prv_move_shape(AppData *data) { } } -static void draw_shape(GContext* ctx, AppData *data, DrawShape shape, GColor color) { +static void draw_shape(GContext *ctx, AppData *data, DrawShape shape, GColor color) { graphics_context_set_fill_color(ctx, color); graphics_context_set_stroke_color(ctx, color); if (data->fill) { @@ -386,7 +364,7 @@ static int64_t prv_time_64(void) { return (int64_t)s * 1000 + ms; } -static void layer_update_proc(Layer *layer, GContext* ctx) { +static void layer_update_proc(Layer *layer, GContext *ctx) { AppData *data = app_state_get_user_data(); graphics_context_set_fill_color(ctx, GColorBlack); @@ -404,21 +382,19 @@ static void layer_update_proc(Layer *layer, GContext* ctx) { draw_shape(ctx, data, (DrawShape)shape_index, (GColor)s_display_colors[color_index++]); } - if (data->rendered_frames == 0) { data->time_started = prv_time_64(); } else { int64_t time_rendered = prv_time_64() - data->time_started; if ((data->rendered_frames % 64) == 0) { PBL_LOG_DBG("## %d frames rendered", (int)data->rendered_frames); - PBL_LOG_DBG("## at %"PRIu32" FPS", - (uint32_t)((uint64_t)data->rendered_frames*1000/time_rendered)); + PBL_LOG_DBG("## at %" PRIu32 " FPS", + (uint32_t)((uint64_t)data->rendered_frames * 1000 / time_rendered)); } } data->rendered_frames++; } - static void timer_callback(void *cb_data) { AppData *data = app_state_get_user_data(); @@ -444,7 +420,6 @@ static void init(void) { s_display_colors[6] = (GColor)((uint8_t)0b11110101); s_display_colors[7] = GColorWhite; - app_state_set_user_data(data); Window *window = &data->window; @@ -529,10 +504,10 @@ static void s_main(void) { deinit(); } -const PebbleProcessMd* pebble_shapes_get_app_info(void) { +const PebbleProcessMd *pebble_shapes_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = s_main, - .name = "Pebble Shapes" + .common.main_func = s_main, + .name = "Pebble Shapes" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/pebble_shapes/pebble_shapes.h b/src/fw/apps/demo/pebble_shapes/pebble_shapes.h index 28a8b48edb..72339b1ecc 100644 --- a/src/fw/apps/demo/pebble_shapes/pebble_shapes.h +++ b/src/fw/apps/demo/pebble_shapes/pebble_shapes.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* pebble_shapes_get_app_info(); +const PebbleProcessMd *pebble_shapes_get_app_info(); diff --git a/src/fw/apps/demo/persist/persist.c b/src/fw/apps/demo/persist/persist.c index 2f4b734ef6..269318c40d 100644 --- a/src/fw/apps/demo/persist/persist.c +++ b/src/fw/apps/demo/persist/persist.c @@ -16,23 +16,29 @@ #define BUFFER_SIZE 25 static const uint8_t s_music_launcher_icon_pixels[] = { - 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, /* bytes 0 - 16 */ - 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x18, 0x00, 0x7f, 0x00, 0x1f, 0x00, /* bytes 16 - 32 */ - 0x7f, 0xf0, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, /* bytes 32 - 48 */ - 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, /* bytes 48 - 64 */ - 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x7f, 0x7c, 0x00, 0x00, /* bytes 64 - 80 */ - 0x03, 0x3c, 0x00, 0x00, 0x01, 0x3c, 0x00, 0x00, 0x00, 0x3c, 0x80, 0x00, 0x00, 0x3c, 0xc0, 0x00, /* bytes 80 - 96 */ - 0x00, 0x7e, 0xe0, 0x00, 0x00, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, + 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0x3f, 0x00, 0x00, + 0xff, 0x03, 0x00, 0x00, /* bytes 0 - 16 */ + 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x18, 0x00, + 0x7f, 0x00, 0x1f, 0x00, /* bytes 16 - 32 */ + 0x7f, 0xf0, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, + 0x7f, 0xfc, 0x1f, 0x00, /* bytes 32 - 48 */ + 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, + 0x7f, 0xfc, 0x1f, 0x00, /* bytes 48 - 64 */ + 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x00, 0x00, + 0x7f, 0x7c, 0x00, 0x00, /* bytes 64 - 80 */ + 0x03, 0x3c, 0x00, 0x00, 0x01, 0x3c, 0x00, 0x00, 0x00, 0x3c, 0x80, 0x00, + 0x00, 0x3c, 0xc0, 0x00, /* bytes 80 - 96 */ + 0x00, 0x7e, 0xe0, 0x00, 0x00, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, }; static const GBitmap s_music_launcher_icon_bitmap = { - .addr = (void*) &s_music_launcher_icon_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 24, .h = 27 }, - }, + .addr = (void *)&s_music_launcher_icon_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 24, .h = 27}, + }, }; typedef struct { @@ -53,30 +59,35 @@ static uint16_t get_num_sections_callback(struct MenuLayer *menu_layer, AppData return 1; } -static uint16_t get_num_rows_callback(struct MenuLayer *menu_layer, uint16_t section_index, AppData *data) { +static uint16_t get_num_rows_callback(struct MenuLayer *menu_layer, uint16_t section_index, + AppData *data) { (void)data; (void)menu_layer; switch (section_index) { default: - case 0: return 3; + case 0: + return 3; } } -static int16_t get_header_height_callback(struct MenuLayer *menu_layer, uint16_t section_index, AppData *data) { +static int16_t get_header_height_callback(struct MenuLayer *menu_layer, uint16_t section_index, + AppData *data) { (void)data; (void)menu_layer; (void)section_index; return MENU_CELL_BASIC_HEADER_HEIGHT; } -static void draw_row_callback(GContext* ctx, Layer *cell_layer, MenuIndex *cell_index, AppData *data) { +static void draw_row_callback(GContext *ctx, Layer *cell_layer, MenuIndex *cell_index, + AppData *data) { (void)data; switch (cell_index->row) { case 0: { int num_beers = persist_read_int(COUNT_PKEY); char title[50]; snprintf(title, sizeof(title), "%d Bottles", num_beers); - menu_cell_basic_draw(ctx, cell_layer, title, "of beer on the wall", (GBitmap*)&s_music_launcher_icon_bitmap); + menu_cell_basic_draw(ctx, cell_layer, title, "of beer on the wall", + (GBitmap *)&s_music_launcher_icon_bitmap); break; } case 1: @@ -88,7 +99,8 @@ static void draw_row_callback(GContext* ctx, Layer *cell_layer, MenuIndex *cell_ } } -static void draw_header_callback(GContext* ctx, Layer *cell_layer, uint16_t section_index, AppData *data) { +static void draw_header_callback(GContext *ctx, Layer *cell_layer, uint16_t section_index, + AppData *data) { (void)section_index; (void)data; menu_cell_basic_header_draw(ctx, cell_layer, "Beer Counter"); @@ -100,14 +112,14 @@ static void select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, AppDat switch (cell_index->row) { case 1: { int num_beers = persist_read_int(COUNT_PKEY); - int status = persist_write_int(COUNT_PKEY, num_beers+1); + int status = persist_write_int(COUNT_PKEY, num_beers + 1); PBL_LOG_DBG("argh %d %d", num_beers, status); menu_layer_reload_data(menu_layer); break; } case 2: { int num_beers = persist_read_int(COUNT_PKEY); - persist_write_int(COUNT_PKEY, num_beers-1); + persist_write_int(COUNT_PKEY, num_beers - 1); menu_layer_reload_data(menu_layer); break; } @@ -137,15 +149,17 @@ static void prv_window_load(Window *window) { MenuLayer *menu_layer = &data->menu_layer; menu_layer_init(menu_layer, &window->layer.bounds); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_num_sections = (MenuLayerGetNumberOfSectionsCallback) get_num_sections_callback, - .get_num_rows = (MenuLayerGetNumberOfRowsInSectionsCallback) get_num_rows_callback, - .get_header_height = (MenuLayerGetHeaderHeightCallback) get_header_height_callback, - .draw_row = (MenuLayerDrawRowCallback) draw_row_callback, - .draw_header = (MenuLayerDrawHeaderCallback) draw_header_callback, - .select_click = (MenuLayerSelectCallback) select_callback, - .select_long_click = (MenuLayerSelectCallback) select_long_callback, - }); + menu_layer_set_callbacks( + menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_sections = (MenuLayerGetNumberOfSectionsCallback)get_num_sections_callback, + .get_num_rows = (MenuLayerGetNumberOfRowsInSectionsCallback)get_num_rows_callback, + .get_header_height = (MenuLayerGetHeaderHeightCallback)get_header_height_callback, + .draw_row = (MenuLayerDrawRowCallback)draw_row_callback, + .draw_header = (MenuLayerDrawHeaderCallback)draw_header_callback, + .select_click = (MenuLayerSelectCallback)select_callback, + .select_long_click = (MenuLayerSelectCallback)select_long_callback, + }); menu_layer_set_click_config_onto_window(menu_layer, window); layer_add_child(&window->layer, menu_layer_get_layer(menu_layer)); } @@ -154,9 +168,9 @@ static void push_window(AppData *data) { Window *window = &data->window; window_init(window, WINDOW_NAME("Demo Menu")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -191,12 +205,12 @@ static void s_main() { handle_deinit(); } -const PebbleProcessMd* persist_app_get_info() { +const PebbleProcessMd *persist_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "Persist Demo" + .common.main_func = &s_main, + .name = "Persist Demo" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } #undef BUFFER_SIZE diff --git a/src/fw/apps/demo/persist/persist.h b/src/fw/apps/demo/persist/persist.h index 1c99324f12..6b61ff387b 100644 --- a/src/fw/apps/demo/persist/persist.h +++ b/src/fw/apps/demo/persist/persist.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* persist_app_get_info(); +const PebbleProcessMd *persist_app_get_info(); diff --git a/src/fw/apps/demo/profile_mutexes/profile_mutexes.c b/src/fw/apps/demo/profile_mutexes/profile_mutexes.c index 36d2120cb5..4af7172c7b 100644 --- a/src/fw/apps/demo/profile_mutexes/profile_mutexes.c +++ b/src/fw/apps/demo/profile_mutexes/profile_mutexes.c @@ -21,15 +21,15 @@ static void profile_mutexes(void) { PROFILER_INIT; PROFILER_START; - for (int i=0; i < 10000; i++) { + for (int i = 0; i < 10000; i++) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); pbl_mutex_unlock(&s_mutex); } - for (int i=0; i < 10000; i++) { + for (int i = 0; i < 10000; i++) { pbl_mutex_lock(&s_rmutex, PBL_FOREVER); } - for (int i=0; i < 10000; i++) { + for (int i = 0; i < 10000; i++) { pbl_mutex_unlock(&s_rmutex); } @@ -46,10 +46,10 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* profile_mutexes_get_app_info(void) { +const PebbleProcessMd *profile_mutexes_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "Profile Mutexes" + .common.main_func = &s_main, + .name = "Profile Mutexes" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/progress/progress.c b/src/fw/apps/demo/progress/progress.c index 71e3c9ea36..ef17ce96a1 100644 --- a/src/fw/apps/demo/progress/progress.c +++ b/src/fw/apps/demo/progress/progress.c @@ -51,14 +51,14 @@ static void prv_window_load(Window *window) { ProgressAppData *data = window_get_user_data(window); data->progress = (MIN_PROGRESS_PERCENT + MAX_PROGRESS_PERCENT) / 2; - ProgressLayer* progress_layer = &data->progress_layer; + ProgressLayer *progress_layer = &data->progress_layer; const GRect *frame = &window_get_root_layer(window)->frame; static const uint32_t MARGIN = 20; static const uint32_t HEIGHT = PBL_IF_COLOR_ELSE(6, 7); - const GRect progress_bounds = GRect(MARGIN, (frame->size.h - HEIGHT) / 2, - frame->size.w - (2 * MARGIN), HEIGHT); + const GRect progress_bounds = + GRect(MARGIN, (frame->size.h - HEIGHT) / 2, frame->size.w - (2 * MARGIN), HEIGHT); progress_layer_init(progress_layer, &progress_bounds); progress_layer_set_progress(progress_layer, data->progress); layer_add_child(&window->layer, &progress_layer->layer); @@ -70,19 +70,19 @@ static void handle_init(void) { ProgressAppData *data = app_zalloc_check(sizeof(ProgressAppData)); app_state_set_user_data(data); - Window* window = &data->window; + Window *window = &data->window; window_init(window, WINDOW_NAME("Progress Demo")); window_set_user_data(window, data); window_set_click_config_provider_with_context(window, prv_click_config_provider, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } static void handle_deinit(void) { - struct AppState* data = app_state_get_user_data(); + struct AppState *data = app_state_get_user_data(); tick_timer_service_unsubscribe(); app_free(data); } @@ -95,11 +95,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* progress_app_get_info() { +const PebbleProcessMd *progress_app_get_info() { static const PebbleProcessMdSystem progress_app_info = { - .common.main_func = &s_main, - .name = "Progress Bar Test" + .common.main_func = &s_main, + .name = "Progress Bar Test" }; - return (const PebbleProcessMd*) &progress_app_info; + return (const PebbleProcessMd *)&progress_app_info; } - diff --git a/src/fw/apps/demo/scroll/scroll.c b/src/fw/apps/demo/scroll/scroll.c index 642ab93ea9..65c05bd4f1 100644 --- a/src/fw/apps/demo/scroll/scroll.c +++ b/src/fw/apps/demo/scroll/scroll.c @@ -36,8 +36,8 @@ static void click_config_provider(ScrollAppData *data) { // to scroll up and down. It's possible to override that here, if needed. // Configure how the SELECT button should behave: - window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler) select_click_handler); - window_long_click_subscribe(BUTTON_ID_SELECT, 0, (ClickHandler) select_click_handler, NULL); + window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler)select_click_handler); + window_long_click_subscribe(BUTTON_ID_SELECT, 0, (ClickHandler)select_click_handler, NULL); } static void prv_window_load(Window *window) { @@ -46,23 +46,33 @@ static void prv_window_load(Window *window) { ScrollLayer *scroll_layer = &data->scroll_layer; scroll_layer_init(scroll_layer, &window->layer.bounds); scroll_layer_set_click_config_onto_window(scroll_layer, window); - scroll_layer_set_callbacks(scroll_layer, (ScrollLayerCallbacks) { - .click_config_provider = (ClickConfigProvider) click_config_provider, - }); + scroll_layer_set_callbacks( + scroll_layer, (ScrollLayerCallbacks){ + .click_config_provider = (ClickConfigProvider)click_config_provider, + }); scroll_layer_set_context(scroll_layer, data); scroll_layer_set_content_size(scroll_layer, GSize(window->layer.bounds.size.w, 500)); const GRect max_text_bounds = GRect(0, 0, window->layer.bounds.size.w, 500); TextLayer *text = &data->text; text_layer_init(text, &max_text_bounds); - text_layer_set_text(text, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam quam tellus, fermentum quis vulputate quis, vestibulum interdum sapien. Vestibulum lobortis pellentesque pretium. Quisque ultricies purus eu orci convallis lacinia. Cras a urna mi. Donec convallis ante id dui dapibus nec ullamcorper erat egestas. Aenean a mauris a sapien commodo lacinia. Sed posuere mi vel risus congue ornare. Curabitur leo nisi, euismod ut pellentesque sed, suscipit sit amet lorem. Aliquam eget sem vitae sem aliquam ornare. In sem sapien, imperdiet eget pharetra a, lacinia ac justo. Suspendisse at ante nec felis facilisis eleifend."); + text_layer_set_text( + text, + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam quam tellus, fermentum quis " + "vulputate quis, vestibulum interdum sapien. Vestibulum lobortis pellentesque pretium. " + "Quisque ultricies purus eu orci convallis lacinia. Cras a urna mi. Donec convallis ante id " + "dui dapibus nec ullamcorper erat egestas. Aenean a mauris a sapien commodo lacinia. Sed " + "posuere mi vel risus congue ornare. Curabitur leo nisi, euismod ut pellentesque sed, " + "suscipit sit amet lorem. Aliquam eget sem vitae sem aliquam ornare. In sem sapien, " + "imperdiet eget pharetra a, lacinia ac justo. Suspendisse at ante nec felis facilisis " + "eleifend."); // Trim text layer and scroll content to fit text box GSize max_size = text_layer_get_content_size(app_state_get_graphics_context(), text); text_layer_set_size(text, max_size); static const int vert_scroll_padding = 4; - scroll_layer_set_content_size(scroll_layer, GSize(window->layer.bounds.size.w, - max_size.h + vert_scroll_padding)); + scroll_layer_set_content_size( + scroll_layer, GSize(window->layer.bounds.size.w, max_size.h + vert_scroll_padding)); scroll_layer_add_child(scroll_layer, &text->layer); @@ -77,9 +87,9 @@ static void push_window(ScrollAppData *data) { Window *window = &data->window; window_init(window, WINDOW_NAME("Scroll Demo")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -107,11 +117,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* scroll_app_get_info() { +const PebbleProcessMd *scroll_app_get_info() { static const PebbleProcessMdSystem s_scroll_app_info = { - .common.main_func = &s_main, - .name = "Scroller" + .common.main_func = &s_main, + .name = "Scroller" }; - return (const PebbleProcessMd*) &s_scroll_app_info; + return (const PebbleProcessMd *)&s_scroll_app_info; } - diff --git a/src/fw/apps/demo/scroll/scroll.h b/src/fw/apps/demo/scroll/scroll.h index 9424831267..d2ead6a2db 100644 --- a/src/fw/apps/demo/scroll/scroll.h +++ b/src/fw/apps/demo/scroll/scroll.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* scroll_app_get_info(); +const PebbleProcessMd *scroll_app_get_info(); diff --git a/src/fw/apps/demo/shared/profile_mutexes.h b/src/fw/apps/demo/shared/profile_mutexes.h index 2fecbdc87f..6dd664a5e4 100644 --- a/src/fw/apps/demo/shared/profile_mutexes.h +++ b/src/fw/apps/demo/shared/profile_mutexes.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* profile_mutexes_get_app_info(void); +const PebbleProcessMd *profile_mutexes_get_app_info(void); diff --git a/src/fw/apps/demo/shared/progress.h b/src/fw/apps/demo/shared/progress.h index 23b4f90d97..98a8b1ac81 100644 --- a/src/fw/apps/demo/shared/progress.h +++ b/src/fw/apps/demo/shared/progress.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* progress_app_get_info(); +const PebbleProcessMd *progress_app_get_info(); diff --git a/src/fw/apps/demo/shared/test_args_rx.c b/src/fw/apps/demo/shared/test_args_rx.c index c8bf198626..4707fe044f 100644 --- a/src/fw/apps/demo/shared/test_args_rx.c +++ b/src/fw/apps/demo/shared/test_args_rx.c @@ -16,12 +16,13 @@ static void s_main(void) { } } -const PebbleProcessMd* test_args_receiver_get_app_info() { +const PebbleProcessMd *test_args_receiver_get_app_info() { static const PebbleProcessMdSystem test_args_receiver_demo_app_info = { - .common.uuid = {0x48, 0xBB, 0xB5, 0x04, 0x5A, 0x56, 0x40, 0x73, 0xAF, - 0xEA, 0x5D, 0x83, 0x8D, 0x43, 0x01, 0xA4}, - .common.main_func = s_main, - .name = "Args Receiver Demo" + .common.uuid = + {0x48, 0xBB, 0xB5, 0x04, 0x5A, 0x56, 0x40, 0x73, 0xAF, 0xEA, 0x5D, 0x83, 0x8D, 0x43, 0x01, + 0xA4}, + .common.main_func = s_main, + .name = "Args Receiver Demo" }; - return (const PebbleProcessMd*) &test_args_receiver_demo_app_info; + return (const PebbleProcessMd *)&test_args_receiver_demo_app_info; } diff --git a/src/fw/apps/demo/shared/test_args_rx.h b/src/fw/apps/demo/shared/test_args_rx.h index ebe082a90d..16ce0d3f7f 100644 --- a/src/fw/apps/demo/shared/test_args_rx.h +++ b/src/fw/apps/demo/shared/test_args_rx.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* test_args_receiver_get_app_info(); +const PebbleProcessMd *test_args_receiver_get_app_info(); diff --git a/src/fw/apps/demo/shared/test_args_tx.h b/src/fw/apps/demo/shared/test_args_tx.h index 7877116661..326e0cccca 100644 --- a/src/fw/apps/demo/shared/test_args_tx.h +++ b/src/fw/apps/demo/shared/test_args_tx.h @@ -9,4 +9,4 @@ typedef struct { uint8_t data; } TestArgsData; -const PebbleProcessMd* test_args_sender_get_app_info(); +const PebbleProcessMd *test_args_sender_get_app_info(); diff --git a/src/fw/apps/demo/shared/text_layout.h b/src/fw/apps/demo/shared/text_layout.h index 440134b86b..6949bf0f98 100644 --- a/src/fw/apps/demo/shared/text_layout.h +++ b/src/fw/apps/demo/shared/text_layout.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* text_layout_get_info(); +const PebbleProcessMd *text_layout_get_info(); diff --git a/src/fw/apps/demo/shared/trigger_alarm.h b/src/fw/apps/demo/shared/trigger_alarm.h index 645cbd6e62..bea51d48e1 100644 --- a/src/fw/apps/demo/shared/trigger_alarm.h +++ b/src/fw/apps/demo/shared/trigger_alarm.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* trigger_alarm_get_app_info(); +const PebbleProcessMd *trigger_alarm_get_app_info(); diff --git a/src/fw/apps/demo/simple_menu/simple_menu.c b/src/fw/apps/demo/simple_menu/simple_menu.c index ef54bd7662..c21caf05e2 100644 --- a/src/fw/apps/demo/simple_menu/simple_menu.c +++ b/src/fw/apps/demo/simple_menu/simple_menu.c @@ -33,13 +33,15 @@ static void poll_callback(int index, void *ctx) { } static const SimpleMenuItem s_menu_items[] = { - { "Poll Mail", "", NULL, poll_callback }, - { "Title A", "Callback A", NULL, callback_a }, - { "Another Title", NULL, NULL, other_callback }, - { "Last Title", "Last subtitle", NULL, other_callback } + {"Poll Mail", "", NULL, poll_callback}, + {"Title A", "Callback A", NULL, callback_a}, + {"Another Title", NULL, NULL, other_callback}, + {"Last Title", "Last subtitle", NULL, other_callback} }; -static const SimpleMenuSection s_menu_sections[] = {{ .title = NULL, .items = s_menu_items, .num_items = ARRAY_LENGTH(s_menu_items) }}; +static const SimpleMenuSection s_menu_sections[] = { + {.title = NULL, .items = s_menu_items, .num_items = ARRAY_LENGTH(s_menu_items)} +}; static void prv_window_load(Window *window) { AppData *data = window_get_user_data(window); @@ -58,9 +60,7 @@ static void handle_init(void) { Window *window = &data->window; window_init(window, WINDOW_NAME("Simple Menu Demo")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load - }); + window_set_window_handlers(window, &(WindowHandlers){.load = prv_window_load}); const bool animated = true; app_window_stack_push(window, animated); @@ -80,11 +80,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* simple_menu_app_get_info() { +const PebbleProcessMd *simple_menu_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "SimpleMenuLayer Demo" + .common.main_func = &s_main, + .name = "SimpleMenuLayer Demo" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/demo/simple_menu/simple_menu.h b/src/fw/apps/demo/simple_menu/simple_menu.h index c024acf0c6..58b578ca34 100644 --- a/src/fw/apps/demo/simple_menu/simple_menu.h +++ b/src/fw/apps/demo/simple_menu/simple_menu.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* simple_menu_app_get_info(); +const PebbleProcessMd *simple_menu_app_get_info(); diff --git a/src/fw/apps/demo/statusbar/statusbar_demo.c b/src/fw/apps/demo/statusbar/statusbar_demo.c index 3d3d332f20..0c2613cd56 100644 --- a/src/fw/apps/demo/statusbar/statusbar_demo.c +++ b/src/fw/apps/demo/statusbar/statusbar_demo.c @@ -14,7 +14,7 @@ typedef struct StatusBarDemoWindow { StatusBarLayer status_bar; } StatusBarDemoWindow; -static Window * prv_window_create(void); +static Window *prv_window_create(void); static void prv_handle_click(ClickRecognizerRef ref, void *context) { Window *window = prv_window_create(); @@ -43,32 +43,32 @@ static Window *prv_window_create(void) { } Description; static const Description descriptions[] = { - { - .debug_name = "non-full-screen (legacy status bar)", - .window_color = GColorRedARGB8, - }, - { - .debug_name = "non-full-screen (legacy status bar)", - .window_color = GColorBlueARGB8, - }, - { - .debug_name = "full-screen (transparent status bar)", - .full_screen = true, - .window_color = GColorRedARGB8, - .status_bar = true, - }, - { - .debug_name = "full-screen (opaque status bar)", - .full_screen = true, - .window_color = GColorBlueARGB8, - .status_bar = true, - .status_bar_color = GColorOrangeARGB8, - }, - { - .debug_name = "full-screen (no status bar)", - .full_screen = true, - .window_color = GColorGreenARGB8, - }, + { + .debug_name = "non-full-screen (legacy status bar)", + .window_color = GColorRedARGB8, + }, + { + .debug_name = "non-full-screen (legacy status bar)", + .window_color = GColorBlueARGB8, + }, + { + .debug_name = "full-screen (transparent status bar)", + .full_screen = true, + .window_color = GColorRedARGB8, + .status_bar = true, + }, + { + .debug_name = "full-screen (opaque status bar)", + .full_screen = true, + .window_color = GColorBlueARGB8, + .status_bar = true, + .status_bar_color = GColorOrangeARGB8, + }, + { + .debug_name = "full-screen (no status bar)", + .full_screen = true, + .window_color = GColorGreenARGB8, + }, }; Description description = descriptions[app_window_stack_count() % ARRAY_LENGTH(descriptions)]; @@ -96,8 +96,8 @@ static Window *prv_window_create(void) { window_set_click_config_provider(result, prv_click_config_provider); window_set_window_handlers(&window->window, &(WindowHandlers){ - .unload = prv_window_unload, - }); + .unload = prv_window_unload, + }); return result; } @@ -112,15 +112,17 @@ static void prv_main(void) { app_event_loop(); } -const PebbleProcessMd* statusbar_demo_get_app_info(void) { +const PebbleProcessMd *statusbar_demo_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = prv_main, - // UUID: dfcafc64-0af1-4e4a-8e03-1901b54335c5 - .uuid = {0xdf, 0xca, 0xfc, 0x64, 0xa, 0xf1, 0x4e, 0x4a, - 0x8e, 0x3, 0x19, 0x1, 0xb5, 0x43, 0x35, 0xc5}, - }, + .common = + { + .main_func = prv_main, + // UUID: dfcafc64-0af1-4e4a-8e03-1901b54335c5 + .uuid = + {0xdf, 0xca, 0xfc, 0x64, 0xa, 0xf1, 0x4e, 0x4a, 0x8e, 0x3, 0x19, 0x1, 0xb5, 0x43, + 0x35, 0xc5}, + }, .name = "StatusBar Demo", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/statusbar/statusbar_demo.h b/src/fw/apps/demo/statusbar/statusbar_demo.h index 25f6fe2b91..53d5b0ff90 100644 --- a/src/fw/apps/demo/statusbar/statusbar_demo.h +++ b/src/fw/apps/demo/statusbar/statusbar_demo.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* statusbar_demo_get_app_info(void); +const PebbleProcessMd *statusbar_demo_get_app_info(void); diff --git a/src/fw/apps/demo/stroke_width/stroke_width.c b/src/fw/apps/demo/stroke_width/stroke_width.c index 5ed6334819..afcbe6f0e3 100644 --- a/src/fw/apps/demo/stroke_width/stroke_width.c +++ b/src/fw/apps/demo/stroke_width/stroke_width.c @@ -17,7 +17,7 @@ #include "process_state/app_state/app_state.h" #include -#define STEP_ROTATION_ANGLE (TRIG_MAX_ANGLE / 360) // 1 degree +#define STEP_ROTATION_ANGLE (TRIG_MAX_ANGLE / 360) // 1 degree #define MIN_OPS 0 #define OP_ROTATE 0 #define OP_CHANGE_WIDTH 1 @@ -39,7 +39,7 @@ static Window *s_window; -extern void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecise p1, +extern void prv_draw_stroked_line_precise(GContext *ctx, GPointPrecise p0, GPointPrecise p1, uint8_t width, bool anti_aliased); typedef struct AppData { @@ -71,10 +71,12 @@ static void up_handler(ClickRecognizerRef recognizer, void *context) { case OP_TEST4: case OP_ROTATE2: case OP_ROTATE3: - if (data->stroke_width < MAX_STROKE) data->stroke_width++; + if (data->stroke_width < MAX_STROKE) + data->stroke_width++; break; case OP_TEST5: - if (data->size < 100) data->size++; + if (data->size < 100) + data->size++; break; case OP_MOVE_P1_X: data->p1.x++; @@ -95,9 +97,9 @@ static void up_handler(ClickRecognizerRef recognizer, void *context) { layer_mark_dirty(data->canvas_layer); - PBL_LOG_DBG("line(p1(%d, %d), p2(%d, %d), width=%d), angle=%d)", - data->p1.x, data->p1.y, data->p2.x, data->p2.y, data->stroke_width, - (int)(data->rotation_angle * 360 / TRIG_MAX_ANGLE)); + PBL_LOG_DBG("line(p1(%d, %d), p2(%d, %d), width=%d), angle=%d)", data->p1.x, data->p1.y, + data->p2.x, data->p2.y, data->stroke_width, + (int)(data->rotation_angle * 360 / TRIG_MAX_ANGLE)); } static void down_handler(ClickRecognizerRef recognizer, void *context) { @@ -114,10 +116,12 @@ static void down_handler(ClickRecognizerRef recognizer, void *context) { case OP_TEST4: case OP_ROTATE2: case OP_ROTATE3: - if (data->stroke_width > MIN_STROKE) data->stroke_width--; + if (data->stroke_width > MIN_STROKE) + data->stroke_width--; break; case OP_TEST5: - if (data->size > 1) data->size--; + if (data->size > 1) + data->size--; break; case OP_MOVE_P1_X: data->p1.x--; @@ -138,9 +142,9 @@ static void down_handler(ClickRecognizerRef recognizer, void *context) { layer_mark_dirty(data->canvas_layer); - PBL_LOG_DBG("line(p1(%d, %d), p2(%d, %d), width=%d), angle=%d)", - data->p1.x, data->p1.y, data->p2.x, data->p2.y, data->stroke_width, - (int)(data->rotation_angle * 360 / TRIG_MAX_ANGLE)); + PBL_LOG_DBG("line(p1(%d, %d), p2(%d, %d), width=%d), angle=%d)", data->p1.x, data->p1.y, + data->p2.x, data->p2.y, data->stroke_width, + (int)(data->rotation_angle * 360 / TRIG_MAX_ANGLE)); } static void select_handler(ClickRecognizerRef recognizer, void *context) { @@ -148,7 +152,8 @@ static void select_handler(ClickRecognizerRef recognizer, void *context) { data->operation = (data->operation + 1) % MAX_OPS; - if (data->operation < MIN_OPS) data->operation = MIN_OPS; + if (data->operation < MIN_OPS) + data->operation = MIN_OPS; layer_mark_dirty(data->canvas_layer); @@ -161,7 +166,7 @@ static void click_config_provider(void *context) { window_single_repeating_click_subscribe(BUTTON_ID_DOWN, 100, down_handler); } -static void debug_layer_update_proc(Layer *layer, GContext* ctx) { +static void debug_layer_update_proc(Layer *layer, GContext *ctx) { // For frame/bounds/clipping rect debugging AppData *data = window_get_user_data(s_window); @@ -169,15 +174,15 @@ static void debug_layer_update_proc(Layer *layer, GContext* ctx) { const GRect *frame = &data->canvas_layer->frame; graphics_context_set_stroke_color(ctx, GColorGreen); - graphics_draw_rect(ctx, &GRect(bounds->origin.x + frame->origin.x, - bounds->origin.y + frame->origin.y, - bounds->size.w, bounds->size.h)); + graphics_draw_rect(ctx, + &GRect(bounds->origin.x + frame->origin.x, bounds->origin.y + frame->origin.y, + bounds->size.w, bounds->size.h)); graphics_context_set_stroke_color(ctx, GColorRed); graphics_draw_rect(ctx, frame); } -static void canvas_update_proc(Layer *layer, GContext* ctx) { +static void canvas_update_proc(Layer *layer, GContext *ctx) { AppData *data = window_get_user_data(s_window); GColor main_color = (GColor)GColorRoseVale; @@ -185,10 +190,7 @@ static void canvas_update_proc(Layer *layer, GContext* ctx) { graphics_context_set_fill_color(ctx, main_color); if (data->operation == OP_TEST) { - int x1 = 50, - x2 = 100, - y1 = 40, - y2 = 120; + int x1 = 50, x2 = 100, y1 = 40, y2 = 120; GPoint p0 = GPoint(x1, y1); GPoint p1 = GPoint(x1, y2); @@ -206,10 +208,7 @@ static void canvas_update_proc(Layer *layer, GContext* ctx) { } if (data->operation == OP_TEST2) { - int x1 = 50, - x2 = 100, - y1 = 40, - y2 = 120; + int x1 = 50, x2 = 100, y1 = 40, y2 = 120; GPoint p0 = GPoint(x1, y1); GPoint p1 = GPoint(x1, y2); @@ -225,10 +224,7 @@ static void canvas_update_proc(Layer *layer, GContext* ctx) { } if (data->operation == OP_TEST3) { - int x1 = 50, - x2 = 100, - y1 = 40, - y2 = 120; + int x1 = 50, x2 = 100, y1 = 40, y2 = 120; GPoint p0 = GPoint(x1, y1); GPoint p1 = GPoint(x1, y2); @@ -281,10 +277,12 @@ static void canvas_update_proc(Layer *layer, GContext* ctx) { p0.x.raw_value = (data->canvas_layer->bounds.size.w / 2) * FIXED_S16_3_ONE.raw_value; p0.y.raw_value = (data->canvas_layer->bounds.size.h / 2) * FIXED_S16_3_ONE.raw_value; - p1.x.raw_value = (sin_lookup(rotation) * (line_length * FIXED_S16_3_ONE.raw_value) - / TRIG_MAX_RATIO) + p0.x.raw_value; - p1.y.raw_value = (-cos_lookup(rotation) * (line_length * FIXED_S16_3_ONE.raw_value) - / TRIG_MAX_RATIO) + p0.y.raw_value; + p1.x.raw_value = + (sin_lookup(rotation) * (line_length * FIXED_S16_3_ONE.raw_value) / TRIG_MAX_RATIO) + + p0.x.raw_value; + p1.y.raw_value = + (-cos_lookup(rotation) * (line_length * FIXED_S16_3_ONE.raw_value) / TRIG_MAX_RATIO) + + p0.y.raw_value; graphics_context_set_antialiased(ctx, true); graphics_context_set_stroke_width(ctx, data->stroke_width); @@ -312,10 +310,12 @@ static void canvas_update_proc(Layer *layer, GContext* ctx) { p0.x.raw_value = (data->canvas_layer->bounds.size.w / 2) * FIXED_S16_3_ONE.raw_value; p0.y.raw_value = (data->canvas_layer->bounds.size.h / 2) * FIXED_S16_3_ONE.raw_value; - p1.x.raw_value = (sin_lookup(rotation) * (line_length * FIXED_S16_3_ONE.raw_value) - / TRIG_MAX_RATIO) + p0.x.raw_value; - p1.y.raw_value = (-cos_lookup(rotation) * (line_length * FIXED_S16_3_ONE.raw_value) - / TRIG_MAX_RATIO) + p0.y.raw_value; + p1.x.raw_value = + (sin_lookup(rotation) * (line_length * FIXED_S16_3_ONE.raw_value) / TRIG_MAX_RATIO) + + p0.x.raw_value; + p1.y.raw_value = + (-cos_lookup(rotation) * (line_length * FIXED_S16_3_ONE.raw_value) / TRIG_MAX_RATIO) + + p0.y.raw_value; graphics_context_set_antialiased(ctx, false); graphics_context_set_stroke_width(ctx, data->stroke_width); @@ -360,8 +360,8 @@ static void main_window_load(Window *window) { layer_set_update_proc(data->debug_layer, debug_layer_update_proc); layer_add_child(window_layer, data->debug_layer); - data->canvas_layer = layer_create(GRect(10, 10, window_bounds.size.w - 20, - window_bounds.size.h - 20)); + data->canvas_layer = + layer_create(GRect(10, 10, window_bounds.size.w - 20, window_bounds.size.h - 20)); layer_set_update_proc(data->canvas_layer, canvas_update_proc); layer_add_child(window_layer, data->canvas_layer); @@ -395,10 +395,10 @@ static void init(void) { s_window = window_create(); window_set_user_data(s_window, data); window_set_fullscreen(s_window, true); - window_set_window_handlers(s_window, &(WindowHandlers) { - .load = main_window_load, - .unload = main_window_unload, - }); + window_set_window_handlers(s_window, &(WindowHandlers){ + .load = main_window_load, + .unload = main_window_unload, + }); data->p1.x = 10; data->p1.y = 30; @@ -427,10 +427,10 @@ static void s_main(void) { deinit(); } -const PebbleProcessMd* stroke_width_get_app_info(void) { +const PebbleProcessMd *stroke_width_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = s_main, - .name = "Stroke Width" + .common.main_func = s_main, + .name = "Stroke Width" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/stroke_width/stroke_width.h b/src/fw/apps/demo/stroke_width/stroke_width.h index 2aac7f8961..a59c908d36 100644 --- a/src/fw/apps/demo/stroke_width/stroke_width.h +++ b/src/fw/apps/demo/stroke_width/stroke_width.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* stroke_width_get_app_info(); +const PebbleProcessMd *stroke_width_get_app_info(); diff --git a/src/fw/apps/demo/swap_layer/swap_layer_demo.c b/src/fw/apps/demo/swap_layer/swap_layer_demo.c index cce12fc60a..178d36f0ea 100644 --- a/src/fw/apps/demo/swap_layer/swap_layer_demo.c +++ b/src/fw/apps/demo/swap_layer/swap_layer_demo.c @@ -45,38 +45,34 @@ typedef struct { } TestNotification; static const TestNotification notifications[] = { - { - .type = TimelineItemTypeNotification, - .layout_id = LayoutIdNotification, - .icon_id = TIMELINE_RESOURCE_NOTIFICATION_GOOGLE_HANGOUTS, - .bg_color = GColorJaegerGreenARGB8, - .title = "Henry Levak", - .body = "Welcome mighty Irken soldiers! " - "You are the finest examples of military training the Irken army has to offer! " - "Good for you. Standing behind us, however, are the soldiers we've chosen for roles " - "in one of the most crucial parts in Operation Impending Doom II! " - "[mockingly] You in the audience just get to sit and watch.", - .time_offset = -MINUTES(5) - }, - { - .type = TimelineItemTypeNotification, - .layout_id = LayoutIdNotification, - .icon_id = TIMELINE_RESOURCE_GENERIC_EMAIL, - .bg_color = GColorVividCeruleanARGB8, - .title = "Henry Levak", - .subtitle = "Henry sent you a 1-1 message", - .body = "What is an alternative", - .time_offset = -MINUTES(5) - }, - { - .type = TimelineItemTypeReminder, - .layout_id = LayoutIdReminder, - .icon_id = TIMELINE_RESOURCE_NOTIFICATION_REMINDER, - .title = "Implementation Design Review", - .location = "High (Room 12)\nPebble PA Office", - .body = "with Liron Damir and 10 other people", - .time_offset = MINUTES(10), - } + {.type = TimelineItemTypeNotification, + .layout_id = LayoutIdNotification, + .icon_id = TIMELINE_RESOURCE_NOTIFICATION_GOOGLE_HANGOUTS, + .bg_color = GColorJaegerGreenARGB8, + .title = "Henry Levak", + .body = "Welcome mighty Irken soldiers! " + "You are the finest examples of military training the Irken army has to offer! " + "Good for you. Standing behind us, however, are the soldiers we've chosen for roles " + "in one of the most crucial parts in Operation Impending Doom II! " + "[mockingly] You in the audience just get to sit and watch.", + .time_offset = -MINUTES(5)}, + {.type = TimelineItemTypeNotification, + .layout_id = LayoutIdNotification, + .icon_id = TIMELINE_RESOURCE_GENERIC_EMAIL, + .bg_color = GColorVividCeruleanARGB8, + .title = "Henry Levak", + .subtitle = "Henry sent you a 1-1 message", + .body = "What is an alternative", + .time_offset = -MINUTES(5)}, + { + .type = TimelineItemTypeReminder, + .layout_id = LayoutIdReminder, + .icon_id = TIMELINE_RESOURCE_NOTIFICATION_REMINDER, + .title = "Implementation Design Review", + .location = "High (Room 12)\nPebble PA Office", + .body = "with Liron Damir and 10 other people", + .time_offset = MINUTES(10), + } }; #define NUM_NOTIFS ((int)ARRAY_LENGTH(notifications)) @@ -94,7 +90,6 @@ static LayoutLayer *prv_get_layout_handler(SwapLayer *swap_layer, int8_t rel_pos PBL_LOG_DBG("getting layer %d", rel_position); SwapLayerDemoData *data = context; - int8_t new_idx = data->idx + rel_position; if (0 > new_idx || new_idx >= NUM_NOTIFS) { return NULL; @@ -103,8 +98,7 @@ static LayoutLayer *prv_get_layout_handler(SwapLayer *swap_layer, int8_t rel_pos return data->layout_layers[new_idx]; } -static void prv_layout_removed_handler(SwapLayer *swap_layer, LayoutLayer *layout, - void *context) { +static void prv_layout_removed_handler(SwapLayer *swap_layer, LayoutLayer *layout, void *context) { // layer_destroy(layer); } @@ -113,7 +107,7 @@ static void prv_layout_will_appear_handler(SwapLayer *swap_layer, LayoutLayer *l } static void prv_layout_did_appear_handler(SwapLayer *swap_layer, LayoutLayer *layout, - int8_t rel_change, void *context) { + int8_t rel_change, void *context) { SwapLayerDemoData *data = context; data->idx += rel_change; } @@ -123,14 +117,13 @@ static void prv_update_colors_handler(SwapLayer *swap_layer, GColor bg_color, SwapLayerDemoData *data = context; GColor status_color = PBL_IF_RECT_ELSE((status_bar_filled) ? bg_color : GColorWhite, GColorClear); - status_bar_layer_set_colors(&data->status_layer, status_color, - gcolor_legible_over(status_color)); + status_bar_layer_set_colors(&data->status_layer, status_color, gcolor_legible_over(status_color)); } static void prv_show_incoming_call(void *data) { PebblePhoneCaller caller = { - .number = "+55 408-555-1212", - .name = "Pankajavalli Balamurugan", + .number = "+55 408-555-1212", + .name = "Pankajavalli Balamurugan", }; phone_ui_handle_incoming_call(&caller, false, PhoneCallSource_PP); } @@ -167,14 +160,15 @@ static void prv_window_load(Window *window) { swap_layer_frame.origin.y += STATUS_BAR_LAYER_HEIGHT; swap_layer_frame.size.h -= STATUS_BAR_LAYER_HEIGHT; swap_layer_init(swap_layer, &swap_layer_frame); - swap_layer_set_callbacks(swap_layer, data, (SwapLayerCallbacks) { - .get_layout_handler = prv_get_layout_handler, - .layout_removed_handler = prv_layout_removed_handler, - .layout_will_appear_handler = prv_layout_will_appear_handler, - .layout_did_appear_handler = prv_layout_did_appear_handler, - .update_colors_handler = prv_update_colors_handler, - .click_config_provider = prv_click_config_provider, - }); + swap_layer_set_callbacks(swap_layer, data, + (SwapLayerCallbacks){ + .get_layout_handler = prv_get_layout_handler, + .layout_removed_handler = prv_layout_removed_handler, + .layout_will_appear_handler = prv_layout_will_appear_handler, + .layout_did_appear_handler = prv_layout_did_appear_handler, + .update_colors_handler = prv_update_colors_handler, + .click_config_provider = prv_click_config_provider, + }); layer_add_child(root, swap_layer_get_layer(swap_layer)); // configure status layer @@ -196,10 +190,9 @@ static void handle_init(void) { Window *window = &data->window; window_init(window, WINDOW_NAME("Swap Layer")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); - + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); for (int i = 0; i < NUM_NOTIFS; i++) { TestNotification notif = notifications[i]; @@ -239,19 +232,18 @@ static void handle_init(void) { uint32_t timestamp = (rtc_get_time() + notif.time_offset); - TimelineItem *notification = - timeline_item_create_with_attributes(timestamp, 0, notif.type, - notif.layout_id, &attr_list, NULL); + TimelineItem *notification = timeline_item_create_with_attributes( + timestamp, 0, notif.type, notif.layout_id, &attr_list, NULL); const LayoutLayerConfig config = { - .frame = &window->layer.frame, - .attributes = ¬ification->attr_list, - .mode = LayoutLayerModeCard, - .app_id = ¬ification->header.parent_id, - .context = &(NotificationLayoutInfo) { - .item = notification, - .show_notification_timestamp = true, - }, + .frame = &window->layer.frame, + .attributes = ¬ification->attr_list, + .mode = LayoutLayerModeCard, + .app_id = ¬ification->header.parent_id, + .context = &(NotificationLayoutInfo){ + .item = notification, + .show_notification_timestamp = true, + }, }; LayoutLayer *layout = layout_create(notification->header.layout, &config); @@ -271,15 +263,17 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* swap_layer_demo_get_app_info() { +const PebbleProcessMd *swap_layer_demo_get_app_info() { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = s_main, - // UUID: 12a32d95-ef69-46d4-a0b9-854cc62f97f9 - .uuid = {0x12, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, - 0xa0, 0xb9, 0x85, 0x4c, 0xc6, 0x2f, 0x97, 0xf9}, - }, - .name = "SwapLayer Demo", + .common = + { + .main_func = s_main, + // UUID: 12a32d95-ef69-46d4-a0b9-854cc62f97f9 + .uuid = + {0x12, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, 0xa0, 0xb9, 0x85, 0x4c, 0xc6, + 0x2f, 0x97, 0xf9}, + }, + .name = "SwapLayer Demo", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/swap_layer/swap_layer_demo.h b/src/fw/apps/demo/swap_layer/swap_layer_demo.h index 9f46f7e812..b4ae7c029e 100644 --- a/src/fw/apps/demo/swap_layer/swap_layer_demo.h +++ b/src/fw/apps/demo/swap_layer/swap_layer_demo.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* swap_layer_demo_get_app_info(void); +const PebbleProcessMd *swap_layer_demo_get_app_info(void); diff --git a/src/fw/apps/demo/temperature_demo/temperature_demo.c b/src/fw/apps/demo/temperature_demo/temperature_demo.c index aac96ed934..4d01f3e0b0 100644 --- a/src/fw/apps/demo/temperature_demo/temperature_demo.c +++ b/src/fw/apps/demo/temperature_demo/temperature_demo.c @@ -49,7 +49,6 @@ typedef struct { static TemperatureDemoAppData *s_data; - // ------------------------------------------------------------------------------- static void select_click_handler(ClickRecognizerRef recognizer, void *context) { } @@ -62,7 +61,6 @@ static void up_click_handler(ClickRecognizerRef recognizer, void *context) { static void down_click_handler(ClickRecognizerRef recognizer, void *context) { } - // ------------------------------------------------------------------------------- static void click_config_provider(void *context) { window_single_click_subscribe(BUTTON_ID_SELECT, select_click_handler); @@ -77,15 +75,15 @@ static void cur_temp_update_text(TemperatureDemoAppData *data) { snprintf(data->cur_temp_text, sizeof(data->cur_temp_text), "%d", cur_temp); text_layer_set_text(data->cur_temp_layer, data->cur_temp_text); - snprintf(data->temp_range_text, sizeof(data->temp_range_text), - "%d - %d", data->min_temp, data->max_temp); + snprintf(data->temp_range_text, sizeof(data->temp_range_text), "%d - %d", data->min_temp, + data->max_temp); text_layer_set_text(data->temp_range_layer, data->temp_range_text); layer_mark_dirty(window_get_root_layer(data->window)); } // ------------------------------------------------------------------------------- -static void handle_second_tick(struct tm* tick_time, TimeUnits units_changed) { +static void handle_second_tick(struct tm *tick_time, TimeUnits units_changed) { int32_t reading = temperature_read(); memmove(s_temp_readings, s_temp_readings + 1, (READ_HISTORY_ENTRIES - 1) * sizeof(int32_t)); s_temp_readings[READ_HISTORY_ENTRIES - 1] = reading; @@ -93,7 +91,7 @@ static void handle_second_tick(struct tm* tick_time, TimeUnits units_changed) { } // ------------------------------------------------------------------------------- -static void layer_update_proc(Layer *layer, GContext* ctx) { +static void layer_update_proc(Layer *layer, GContext *ctx) { TemperatureDemoAppData *data = s_data; const GRect *bounds = &layer->bounds; @@ -169,8 +167,7 @@ static void prv_window_load(Window *window) { // Current temp data->cur_temp_layer = text_layer_create(CUR_TEMP_RECT); text_layer_set_text_alignment(data->cur_temp_layer, GTextAlignmentCenter); - text_layer_set_font(data->cur_temp_layer, - fonts_get_system_font(FONT_KEY_LECO_20_BOLD_NUMBERS)); + text_layer_set_font(data->cur_temp_layer, fonts_get_system_font(FONT_KEY_LECO_20_BOLD_NUMBERS)); text_layer_set_background_color(data->cur_temp_layer, GColorClear); text_layer_set_text_color(data->cur_temp_layer, GColorBlack); layer_add_child(window_layer, text_layer_get_layer(data->cur_temp_layer)); @@ -178,8 +175,7 @@ static void prv_window_load(Window *window) { // Current temp range data->temp_range_layer = text_layer_create(TEMP_RANGE_RECT); text_layer_set_text_alignment(data->temp_range_layer, GTextAlignmentCenter); - text_layer_set_font(data->temp_range_layer, - fonts_get_system_font(FONT_KEY_LECO_20_BOLD_NUMBERS)); + text_layer_set_font(data->temp_range_layer, fonts_get_system_font(FONT_KEY_LECO_20_BOLD_NUMBERS)); text_layer_set_background_color(data->temp_range_layer, GColorClear); text_layer_set_text_color(data->temp_range_layer, GColorBlack); layer_add_child(window_layer, text_layer_get_layer(data->temp_range_layer)); @@ -191,14 +187,12 @@ static void prv_window_load(Window *window) { tick_timer_service_subscribe(SECOND_UNIT, handle_second_tick); } - // ------------------------------------------------------------------------------- static void prv_window_unload(Window *window) { TemperatureDemoAppData *data = window_get_user_data(window); text_layer_destroy(data->cur_temp_layer); } - // ------------------------------------------------------------------------------- static void deinit(void) { TemperatureDemoAppData *data = app_state_get_user_data(); @@ -206,7 +200,6 @@ static void deinit(void) { app_free(data); } - // ------------------------------------------------------------------------------- static void init(void) { TemperatureDemoAppData *data = app_zalloc_check(sizeof(TemperatureDemoAppData)); @@ -218,15 +211,14 @@ static void init(void) { window_set_background_color(data->window, GColorWhite); window_set_user_data(data->window, data); window_set_click_config_provider_with_context(data->window, click_config_provider, data); - window_set_window_handlers(data->window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(data->window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); app_window_stack_push(data->window, true /* Animated */); } - // ------------------------------------------------------------------------------- static void s_main(void) { init(); @@ -234,12 +226,11 @@ static void s_main(void) { deinit(); } - // ------------------------------------------------------------------------------- -const PebbleProcessMd* temperature_demo_get_app_info(void) { +const PebbleProcessMd *temperature_demo_get_app_info(void) { static const PebbleProcessMdSystem s_temperature_demo_app_info = { - .common.main_func = &s_main, - .name = "Temperature" + .common.main_func = &s_main, + .name = "Temperature" }; - return (const PebbleProcessMd*) &s_temperature_demo_app_info; + return (const PebbleProcessMd *)&s_temperature_demo_app_info; } diff --git a/src/fw/apps/demo/temperature_demo/temperature_demo.h b/src/fw/apps/demo/temperature_demo/temperature_demo.h index ca3c52820f..427723d158 100644 --- a/src/fw/apps/demo/temperature_demo/temperature_demo.h +++ b/src/fw/apps/demo/temperature_demo/temperature_demo.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* temperature_demo_get_app_info(void); +const PebbleProcessMd *temperature_demo_get_app_info(void); diff --git a/src/fw/apps/demo/test_args_sender/test_args_tx.c b/src/fw/apps/demo/test_args_sender/test_args_tx.c index 38d69be842..a10ed2b603 100644 --- a/src/fw/apps/demo/test_args_sender/test_args_tx.c +++ b/src/fw/apps/demo/test_args_sender/test_args_tx.c @@ -15,9 +15,9 @@ static TestArgsData s_data; static void prv_launch_receiver_callback(void *data) { AppInstallId id = app_install_get_id_for_uuid(&(test_args_receiver_get_app_info()->uuid)); - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = id, - .common.args = data, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = id, + .common.args = data, }); } @@ -27,12 +27,13 @@ static void s_main(void) { launcher_task_add_callback(prv_launch_receiver_callback, &s_data); } -const PebbleProcessMd* test_args_sender_get_app_info() { +const PebbleProcessMd *test_args_sender_get_app_info() { static const PebbleProcessMdSystem test_args_sender_demo_app_info = { - .common.uuid = {0xD1, 0x7E, 0x41, 0xAF, 0x40, 0x5E, 0x40, 0x76, - 0x82, 0xB5, 0x97, 0x71, 0x70, 0x52, 0x66, 0xBA}, - .common.main_func = s_main, - .name = "Args Sender Demo" + .common.uuid = + {0xD1, 0x7E, 0x41, 0xAF, 0x40, 0x5E, 0x40, 0x76, 0x82, 0xB5, 0x97, 0x71, 0x70, 0x52, 0x66, + 0xBA}, + .common.main_func = s_main, + .name = "Args Sender Demo" }; - return (const PebbleProcessMd*) &test_args_sender_demo_app_info; + return (const PebbleProcessMd *)&test_args_sender_demo_app_info; } diff --git a/src/fw/apps/demo/test_bluetooth/test_bluetooth.c b/src/fw/apps/demo/test_bluetooth/test_bluetooth.c index 29d4bb2964..27e4e0248a 100644 --- a/src/fw/apps/demo/test_bluetooth/test_bluetooth.c +++ b/src/fw/apps/demo/test_bluetooth/test_bluetooth.c @@ -23,18 +23,17 @@ typedef struct { SimpleMenuLayer *menu_layer; SimpleMenuSection menu_section; SimpleMenuItem menu_items[NUM_MENU_ITEMS]; - + } TestBTAppData; static TestBTAppData *s_app_data = 0; - static volatile int s_pending_count = 0; static volatile bool s_connected = false; // ================================================================================= -static void send_bluetooth(void* data) { - //uint8_t *buffer = (uint8_t *)"hello world"; +static void send_bluetooth(void *data) { + // uint8_t *buffer = (uint8_t *)"hello world"; CommSession *session = comm_session_get_system_session(); if (!session) { @@ -50,18 +49,17 @@ static void send_bluetooth(void* data) { s_pending_count--; } - // ================================================================================= // You can capture when the user selects a menu icon with a menu item select callback static void menu_select_callback(int index, void *ctx) { PBL_LOG_DBG("Hit menu item %d", index); - + // Here we just change the subtitle to a literal string s_app_data->menu_items[index].subtitle = "You've hit select here!"; - + // Mark the layer to be updated layer_mark_dirty(simple_menu_layer_get_layer(s_app_data->menu_layer)); - + // --------------------------------------------------------------------------- // Run the appropriate test if (index == 0) { @@ -79,49 +77,43 @@ static void menu_select_callback(int index, void *ctx) { } else if (index == 1) { PBL_LOG_DBG("Not implemented"); - } } - // ================================================================================= static void prv_window_load(Window *window) { - TestBTAppData *data = s_app_data; - + int i = 0; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "flood BT", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "flood BT", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "Ad space available", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "Ad space available", + .callback = menu_select_callback, }; PBL_ASSERTN(i == NUM_MENU_ITEMS); - + // The menu sections - data->menu_section = (SimpleMenuSection) { - .num_items = NUM_MENU_ITEMS, - .items = data->menu_items, + data->menu_section = (SimpleMenuSection){ + .num_items = NUM_MENU_ITEMS, + .items = data->menu_items, }; - + Layer *window_layer = window_get_root_layer(data->window); GRect bounds = window_layer->bounds; - - data->menu_layer = simple_menu_layer_create(bounds, data->window, &data->menu_section, 1, - NULL); + + data->menu_layer = simple_menu_layer_create(bounds, data->window, &data->menu_section, 1, NULL); layer_add_child(window_layer, simple_menu_layer_get_layer(data->menu_layer)); } - // ================================================================================= // Deinitialize resources on window unload that were initialized on window load static void prv_window_unload(Window *window) { simple_menu_layer_destroy(s_app_data->menu_layer); } - // ================================================================================= static void handle_init(void) { TestBTAppData *data = app_malloc_check(sizeof(TestBTAppData)); @@ -133,10 +125,10 @@ static void handle_init(void) { return; } window_init(data->window, ""); - window_set_window_handlers(data->window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(data->window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); app_window_stack_push(data->window, true /*animated*/); } @@ -144,7 +136,6 @@ static void handle_deinit(void) { // Don't bother freeing anything, the OS should be re-initing the heap. } - // ================================================================================= static void s_main(void) { handle_init(); @@ -153,11 +144,10 @@ static void s_main(void) { } // ================================================================================= -const PebbleProcessMd* test_bluetooth_app_get_info() { +const PebbleProcessMd *test_bluetooth_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "Bluetooth Test" + .common.main_func = &s_main, + .name = "Bluetooth Test" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/demo/test_bluetooth/test_bluetooth.h b/src/fw/apps/demo/test_bluetooth/test_bluetooth.h index d535bdb2dc..050772f619 100644 --- a/src/fw/apps/demo/test_bluetooth/test_bluetooth.h +++ b/src/fw/apps/demo/test_bluetooth/test_bluetooth.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* test_bluetooth_app_get_info(); +const PebbleProcessMd *test_bluetooth_app_get_info(); diff --git a/src/fw/apps/demo/test_core_dump/test_core_dump.c b/src/fw/apps/demo/test_core_dump/test_core_dump.c index d5a1d5e10b..ee56293357 100644 --- a/src/fw/apps/demo/test_core_dump/test_core_dump.c +++ b/src/fw/apps/demo/test_core_dump/test_core_dump.c @@ -15,8 +15,6 @@ #include #include "system/passert.h" - - #define NUM_MENU_ITEMS 13 static bool s_call_core_dump_from_isr = false; @@ -32,10 +30,8 @@ typedef struct { static TestTimersAppData *s_app_data = 0; - // ================================================================================= -static void stuck_timer_callback(void* data) -{ +static void stuck_timer_callback(void *data) { PBL_LOG_DBG("STT: Entering infinite loop in timer callback"); while (true) { psleep(100); @@ -57,7 +53,8 @@ void OTG_FS_WKUP_IRQHandler(void) { core_dump_reset(false /* don't force overwrite */); } else { dbgserial_putstr("Entering infinite loop in ISR"); - while (true) ; + while (true) + ; } } @@ -65,23 +62,20 @@ void OTG_FS_WKUP_IRQHandler(void) { // You can capture when the user selects a menu icon with a menu item select callback static void menu_select_callback(int index, void *ctx) { PBL_LOG_DBG("Selected menu item %d", index); - + // Here we just change the subtitle to a literal string s_app_data->menu_items[index].subtitle = "You've hit select here!"; - + // Mark the layer to be updated layer_mark_dirty(simple_menu_layer_get_layer(s_app_data->menu_layer)); - // --------------------------------------------------------------------------- // Run the appropriate test if (index == 0) { - // CROAK PBL_CROAK("CROAK"); } else if (index == 1) { - // stuck timer callback TimerID timer = new_timer_create(); PBL_LOG_INFO("Entering infinite loop in Timer callback"); @@ -89,18 +83,16 @@ static void menu_select_callback(int index, void *ctx) { PBL_ASSERTN(success); } else if (index == 2) { - // call directly core_dump_reset(false /* don't force overwrite */); } else if (index == 3) { - // stuck app PBL_LOG_INFO("Entering infinite loop in App Task"); - while (true) ; + while (true) + ; } else if (index == 4) { - PBL_LOG_INFO("Entering infinite loop in FreeRTOS ISR"); NVIC_InitTypeDef NVIC_InitStructure; @@ -116,7 +108,6 @@ static void menu_select_callback(int index, void *ctx) { NVIC_SetPendingIRQ(OTG_FS_WKUP_IRQn); } else if (index == 5) { - PBL_LOG_INFO("Entering infinite loop in non-FreeRTOS ISR."); NVIC_InitTypeDef NVIC_InitStructure; @@ -132,25 +123,21 @@ static void menu_select_callback(int index, void *ctx) { NVIC_SetPendingIRQ(OTG_FS_WKUP_IRQn); } else if (index == 6) { - PBL_LOG_INFO("Forcing bus fault during core dump"); core_dump_test_force_bus_fault(); core_dump_reset(false /* don't force overwrite */); } else if (index == 7) { - PBL_LOG_INFO("Forcing inf loop during core dump"); core_dump_test_force_inf_loop(); core_dump_reset(false /* don't force overwrite */); } else if (index == 8) { - PBL_LOG_INFO("Forcing assert loop during core dump"); core_dump_test_force_assert(); core_dump_reset(false /* don't force overwrite */); } else if (index == 9) { - PBL_LOG_INFO("Calling core_dump FreeRTOS ISR"); s_call_core_dump_from_isr = true; @@ -167,7 +154,6 @@ static void menu_select_callback(int index, void *ctx) { NVIC_SetPendingIRQ(OTG_FS_WKUP_IRQn); } else if (index == 10) { - PBL_LOG_INFO("Causing bus fault in app"); typedef void (*KaboomCallback)(void); KaboomCallback kaboom = 0; @@ -187,93 +173,86 @@ static void menu_select_callback(int index, void *ctx) { extern uint32_t __isr_stack_start__[]; __isr_stack_start__[0] = 0x55; } - } - - // ================================================================================= static void prv_window_load(Window *window) { - TestTimersAppData *data = s_app_data; - + int i = 0; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "croak", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "croak", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "stuck timer", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "stuck timer", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "call core_dump_reset", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "call core_dump_reset", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "stuck app", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "stuck app", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "stuck RTOS ISR", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "stuck RTOS ISR", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "stuck non-RTOS ISR", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "stuck non-RTOS ISR", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "BusFault in CD", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "BusFault in CD", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "stuck in CD", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "stuck in CD", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "assert in CD", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "assert in CD", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "call from ISR", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "call from ISR", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "BusFault in app", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "BusFault in app", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "stuck system task", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "stuck system task", + .callback = menu_select_callback, }; - data->menu_items[i++] = (SimpleMenuItem) { - .title = "hard fault", - .callback = menu_select_callback, + data->menu_items[i++] = (SimpleMenuItem){ + .title = "hard fault", + .callback = menu_select_callback, }; PBL_ASSERTN(i == NUM_MENU_ITEMS); - + // The menu sections - data->menu_section = (SimpleMenuSection) { - .num_items = NUM_MENU_ITEMS, - .items = data->menu_items, + data->menu_section = (SimpleMenuSection){ + .num_items = NUM_MENU_ITEMS, + .items = data->menu_items, }; - + Layer *window_layer = window_get_root_layer(data->window); GRect bounds = window_layer->bounds; - - data->menu_layer = simple_menu_layer_create(bounds, data->window, &data->menu_section, 1, - NULL); + + data->menu_layer = simple_menu_layer_create(bounds, data->window, &data->menu_section, 1, NULL); layer_add_child(window_layer, simple_menu_layer_get_layer(data->menu_layer)); } - // ================================================================================= // Deinitialize resources on window unload that were initialized on window load static void prv_window_unload(Window *window) { simple_menu_layer_destroy(s_app_data->menu_layer); } - // ================================================================================= static void handle_init(void) { TestTimersAppData *data = app_malloc_check(sizeof(TestTimersAppData)); @@ -285,10 +264,10 @@ static void handle_init(void) { return; } window_init(data->window, ""); - window_set_window_handlers(data->window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(data->window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); app_window_stack_push(data->window, true /*animated*/); } @@ -296,7 +275,6 @@ static void handle_deinit(void) { // Don't bother freeing anything, the OS should be re-initing the heap. } - // ================================================================================= static void s_main(void) { handle_init(); @@ -305,11 +283,10 @@ static void s_main(void) { } // ================================================================================= -const PebbleProcessMd* test_core_dump_app_get_info() { +const PebbleProcessMd *test_core_dump_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "Core Dump Test" + .common.main_func = &s_main, + .name = "Core Dump Test" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/demo/test_core_dump/test_core_dump.h b/src/fw/apps/demo/test_core_dump/test_core_dump.h index 62c009047c..3087733fd3 100644 --- a/src/fw/apps/demo/test_core_dump/test_core_dump.h +++ b/src/fw/apps/demo/test_core_dump/test_core_dump.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* test_core_dump_app_get_info(); +const PebbleProcessMd *test_core_dump_app_get_info(); diff --git a/src/fw/apps/demo/test_sys_timer/test_sys_timer.c b/src/fw/apps/demo/test_sys_timer/test_sys_timer.c index f06f2f0a1f..05b09f1a7e 100644 --- a/src/fw/apps/demo/test_sys_timer/test_sys_timer.c +++ b/src/fw/apps/demo/test_sys_timer/test_sys_timer.c @@ -18,7 +18,6 @@ #define NUM_MAX_TIMERS 10 - // ================================================================================= // Application Data typedef struct { @@ -29,17 +28,15 @@ typedef struct { RtcTicks fired_time[NUM_MAX_TIMERS]; RegularTimerInfo reg_timers[NUM_MAX_TIMERS]; - + AppTimer *app_timer; - + } TestTimersAppData; static TestTimersAppData *s_app_data = 0; - // ================================================================================= -static void timer_callback(void* data) -{ +static void timer_callback(void *data) { int idx = (int)data; PBL_ASSERTN(idx >= 0 && idx < NUM_MAX_TIMERS); PBL_LOG_DBG("STT normal callback %d executed", idx); @@ -47,20 +44,16 @@ static void timer_callback(void* data) return; } - // ================================================================================= -static void stuck_timer_callback(void* data) -{ +static void stuck_timer_callback(void *data) { PBL_LOG_DBG("STT entering infinite loop in callback"); while (true) { psleep(100); } } - // ================================================================================= -static void long_timer_callback(void* data) -{ +static void long_timer_callback(void *data) { int idx = (int)data; PBL_ASSERTN(idx >= 0 && idx < NUM_MAX_TIMERS); PBL_LOG_DBG("STT long running callback %d executed", idx); @@ -70,10 +63,9 @@ static void long_timer_callback(void* data) return; } - // ================================================================================= // Try and reschedule a regular timer from it's callback -static void reg_timer_1_callback(void* data) { +static void reg_timer_1_callback(void *data) { PBL_LOG_DBG("STT running reg_timer_1_callback"); if (s_app_data->reg_timers[0].cb != 0) { PBL_LOG_DBG("STT reg_timer_1_callback rescheduling from callback for every 2 secs. "); @@ -81,10 +73,9 @@ static void reg_timer_1_callback(void* data) { } } - // ================================================================================= // Try and delete a regular timer from it's callback -static void reg_timer_2_callback(void* data) { +static void reg_timer_2_callback(void *data) { PBL_LOG_DBG("STT running reg_timer_2_callback"); if (s_app_data->reg_timers[0].cb != 0) { PBL_LOG_DBG("STT reg_timer_2_callback deleting from callback"); @@ -92,11 +83,10 @@ static void reg_timer_2_callback(void* data) { } } - // ================================================================================= // Try and delete, then re-add a regular timer from its callback static int s_reg_timer_3_callback_count = 0; -static void reg_timer_3_callback(void* data) { +static void reg_timer_3_callback(void *data) { s_reg_timer_3_callback_count++; PBL_LOG_DBG("STT running reg_timer_3_callback"); if (s_app_data->reg_timers[0].cb != 0) { @@ -106,7 +96,6 @@ static void reg_timer_3_callback(void* data) { } } - // ================================================================================= static void menu_callback_prefix(int index, void *ctx) { PBL_LOG_DBG("Hit menu item %d", index); @@ -115,7 +104,7 @@ static void menu_callback_prefix(int index, void *ctx) { layer_mark_dirty(simple_menu_layer_get_layer(s_app_data->menu_layer)); // Cancel and delete old timers if present - for (int i=0; ifired_time[i] = 0; if (s_app_data->timer[i] != TIMER_INVALID_ID) { PBL_LOG_DBG("STT stopping and deleting previous timer %d", i); @@ -131,17 +120,15 @@ static void menu_callback_prefix(int index, void *ctx) { } // Cancel and delete old regular timers if present - for (int i=0; ireg_timers[i].cb != NULL) { PBL_LOG_DBG("STT deleting previous regular timer %d", i); regular_timer_remove_callback(&s_app_data->reg_timers[i]); s_app_data->reg_timers[i].cb = NULL; } } - } - // ================================================================================= void single_shot_timer_menu_cb(int index, void *ctx) { uint32_t zero_flags = 0; @@ -153,7 +140,8 @@ void single_shot_timer_menu_cb(int index, void *ctx) { // Single shot timer s_app_data->timer[0] = new_timer_create(); - bool success = new_timer_start(s_app_data->timer[timer_idx_0], 100, timer_callback, (void*)timer_idx_0, zero_flags); + bool success = new_timer_start(s_app_data->timer[timer_idx_0], 100, timer_callback, + (void *)timer_idx_0, zero_flags); PBL_ASSERTN(success); // Make sure it's marked as scheduled @@ -168,7 +156,6 @@ void single_shot_timer_menu_cb(int index, void *ctx) { PBL_ASSERTN(!scheduled); } - // ================================================================================= void repeating_timer_menu_cb(int index, void *ctx) { uint32_t expire_ms; @@ -176,13 +163,13 @@ void repeating_timer_menu_cb(int index, void *ctx) { bool scheduled = false; menu_callback_prefix(index, ctx); - + // Repeating timer - s_app_data->timer[timer_idx_0] = new_timer_create(); - bool success = new_timer_start(s_app_data->timer[timer_idx_0], 500, timer_callback, (void*)timer_idx_0, - TIMER_START_FLAG_REPEATING); + s_app_data->timer[timer_idx_0] = new_timer_create(); + bool success = new_timer_start(s_app_data->timer[timer_idx_0], 500, timer_callback, + (void *)timer_idx_0, TIMER_START_FLAG_REPEATING); PBL_ASSERTN(success); - + scheduled = new_timer_scheduled(s_app_data->timer[timer_idx_0], &expire_ms); PBL_ASSERTN(scheduled && expire_ms <= 500); PBL_LOG_DBG("STT firing in %d ms", (int)expire_ms); @@ -194,19 +181,20 @@ void two_timers_menu_cb(int index, void *ctx) { uint32_t expire_ms; menu_callback_prefix(index, ctx); - + // Multiple timers int timer_idx_0 = 0; s_app_data->timer[timer_idx_0] = new_timer_create(); - bool success = new_timer_start(s_app_data->timer[timer_idx_0], 300, timer_callback, (void*)timer_idx_0, zero_flags); + bool success = new_timer_start(s_app_data->timer[timer_idx_0], 300, timer_callback, + (void *)timer_idx_0, zero_flags); PBL_ASSERTN(success); int timer_idx_1 = 1; s_app_data->timer[timer_idx_1] = new_timer_create(); - success = new_timer_start(s_app_data->timer[timer_idx_1], 100, timer_callback, (void*)timer_idx_1, zero_flags); + success = new_timer_start(s_app_data->timer[timer_idx_1], 100, timer_callback, + (void *)timer_idx_1, zero_flags); PBL_ASSERTN(success); - // Wait for them to fire psleep(500); PBL_ASSERTN(s_app_data->fired_time[timer_idx_0] != 0); @@ -224,16 +212,16 @@ void deferred_delete_menu_cb(int index, void *ctx) { uint32_t zero_flags = 0; menu_callback_prefix(index, ctx); - + // Deferred delete s_app_data->timer[0] = new_timer_create(); bool success = new_timer_start(s_app_data->timer[0], 1, long_timer_callback, cb_data, zero_flags); PBL_ASSERTN(success); psleep(50); - + // Stop and then delete it success = new_timer_stop(s_app_data->timer[0]); - PBL_ASSERTN(!success); /* stop returns false if callback is running */ + PBL_ASSERTN(!success); /* stop returns false if callback is running */ new_timer_delete(s_app_data->timer[0]); s_app_data->timer[0] = TIMER_INVALID_ID; } @@ -250,10 +238,10 @@ void fail_if_executing_menu_cb(int index, void *ctx) { bool success = new_timer_start(s_app_data->timer[0], 1, long_timer_callback, cb_data, zero_flags); PBL_ASSERTN(success); psleep(50); - + // try and reschedule while it's executing - success = new_timer_start(s_app_data->timer[0], 1, long_timer_callback, cb_data, - TIMER_START_FLAG_FAIL_IF_EXECUTING); + success = new_timer_start(s_app_data->timer[0], 1, long_timer_callback, cb_data, + TIMER_START_FLAG_FAIL_IF_EXECUTING); PBL_ASSERTN(!success); } @@ -266,15 +254,13 @@ void fail_if_scheduled_menu_cb(int index, void *ctx) { // fail if scheduled s_app_data->timer[0] = new_timer_create(); - bool success = new_timer_start(s_app_data->timer[0], 100, timer_callback, cb_data, - zero_flags); + bool success = new_timer_start(s_app_data->timer[0], 100, timer_callback, cb_data, zero_flags); PBL_ASSERTN(success); - + // try and reschedule while it's already scheduled - success = new_timer_start(s_app_data->timer[0], 1, timer_callback, cb_data, + success = new_timer_start(s_app_data->timer[0], 1, timer_callback, cb_data, TIMER_START_FLAG_FAIL_IF_SCHEDULED); PBL_ASSERTN(!success); - } // ================================================================================= @@ -296,8 +282,9 @@ void stuck_callback_menu_cb(int index, void *ctx) { menu_callback_prefix(index, ctx); // stuck callback - s_app_data->timer[0] = new_timer_create(); - bool success = new_timer_start(s_app_data->timer[0], 100, stuck_timer_callback, cb_data, zero_flags); + s_app_data->timer[0] = new_timer_create(); + bool success = + new_timer_start(s_app_data->timer[0], 100, stuck_timer_callback, cb_data, zero_flags); PBL_ASSERTN(success); } @@ -312,7 +299,6 @@ void invalid_timer_id_menu_cb(int index, void *ctx) { new_timer_start(0x12345678, 100, timer_callback, cb_data, zero_flags); } - // ================================================================================= void reg_timer_schedule_1sec_from_cb_menu_cb(int index, void *ctx) { menu_callback_prefix(index, ctx); @@ -356,7 +342,6 @@ void reg_timer_delete_then_add_from_cb_menu_cb(int index, void *ctx) { // ================================================================================= void croak_menu_cb(int index, void *ctx) { - menu_callback_prefix(index, ctx); PBL_CROAK("DIE!"); } @@ -366,72 +351,39 @@ static void prv_window_load(Window *window) { TestTimersAppData *data = s_app_data; static const SimpleMenuItem menu_items[] = { - { - .title = "single-shot timer", - .callback = single_shot_timer_menu_cb - }, { - .title = "repeating timer", - .callback = repeating_timer_menu_cb - }, { - .title = "two timers", - .callback = two_timers_menu_cb - }, { - .title = "deferred delete", - .callback = deferred_delete_menu_cb - }, { - .title = "fail if executing", - .callback = fail_if_executing_menu_cb - }, { - .title = "fail if scheduled", - .callback = fail_if_scheduled_menu_cb - }, { - .title = "evented_timer", - .callback = evented_timer_menu_cb - }, { - .title = "stuck callback", - .callback = stuck_callback_menu_cb - }, { - .title = "invalid timer ID", - .callback = invalid_timer_id_menu_cb - }, { - .title = "RT: sch 1 sec from cb", - .callback = reg_timer_schedule_1sec_from_cb_menu_cb - }, { - .title = "RT: sch 1 min from cb", - .callback = reg_timer_schedule_1min_from_cb_menu_cb - }, { - .title = "RT: delete from cb", - .callback = reg_timer_delete_from_cb_menu_cb - }, { - .title = "RT: delete+add from cb", - .callback = reg_timer_delete_then_add_from_cb_menu_cb - }, { - .title = "croak", - .callback = croak_menu_cb - } + {.title = "single-shot timer", .callback = single_shot_timer_menu_cb}, + {.title = "repeating timer", .callback = repeating_timer_menu_cb}, + {.title = "two timers", .callback = two_timers_menu_cb}, + {.title = "deferred delete", .callback = deferred_delete_menu_cb}, + {.title = "fail if executing", .callback = fail_if_executing_menu_cb}, + {.title = "fail if scheduled", .callback = fail_if_scheduled_menu_cb}, + {.title = "evented_timer", .callback = evented_timer_menu_cb}, + {.title = "stuck callback", .callback = stuck_callback_menu_cb}, + {.title = "invalid timer ID", .callback = invalid_timer_id_menu_cb}, + {.title = "RT: sch 1 sec from cb", .callback = reg_timer_schedule_1sec_from_cb_menu_cb}, + {.title = "RT: sch 1 min from cb", .callback = reg_timer_schedule_1min_from_cb_menu_cb}, + {.title = "RT: delete from cb", .callback = reg_timer_delete_from_cb_menu_cb}, + {.title = "RT: delete+add from cb", .callback = reg_timer_delete_then_add_from_cb_menu_cb}, + {.title = "croak", .callback = croak_menu_cb} }; static const SimpleMenuSection sections[] = { - { - .items = menu_items, - .num_items = ARRAY_LENGTH(menu_items) - } + {.items = menu_items, .num_items = ARRAY_LENGTH(menu_items)} }; Layer *window_layer = window_get_root_layer(data->window); GRect bounds = window_layer->bounds; - - data->menu_layer = simple_menu_layer_create(bounds, data->window, sections, ARRAY_LENGTH(sections), NULL); + + data->menu_layer = + simple_menu_layer_create(bounds, data->window, sections, ARRAY_LENGTH(sections), NULL); layer_add_child(window_layer, simple_menu_layer_get_layer(data->menu_layer)); } - // ================================================================================= // Deinitialize resources on window unload that were initialized on window load static void prv_window_unload(Window *window) { simple_menu_layer_destroy(s_app_data->menu_layer); } - // ================================================================================= static void handle_init(void) { TestTimersAppData *data = app_malloc_check(sizeof(TestTimersAppData)); @@ -443,10 +395,10 @@ static void handle_init(void) { return; } window_init(data->window, ""); - window_set_window_handlers(data->window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(data->window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); app_window_stack_push(data->window, true /*animated*/); } @@ -454,7 +406,6 @@ static void handle_deinit(void) { // Don't bother freeing anything, the OS should be re-initing the heap. } - // ================================================================================= static void s_main(void) { handle_init(); @@ -463,11 +414,10 @@ static void s_main(void) { } // ================================================================================= -const PebbleProcessMd* test_sys_timer_app_get_info() { +const PebbleProcessMd *test_sys_timer_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "System Timer Test" + .common.main_func = &s_main, + .name = "System Timer Test" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/demo/test_sys_timer/test_sys_timer.h b/src/fw/apps/demo/test_sys_timer/test_sys_timer.h index bc0a81dad9..f00738daec 100644 --- a/src/fw/apps/demo/test_sys_timer/test_sys_timer.h +++ b/src/fw/apps/demo/test_sys_timer/test_sys_timer.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* test_sys_timer_app_get_info(); +const PebbleProcessMd *test_sys_timer_app_get_info(); diff --git a/src/fw/apps/demo/text_clipping/text_clipping.c b/src/fw/apps/demo/text_clipping/text_clipping.c index 7f7ab7b74b..d41a27a6b0 100644 --- a/src/fw/apps/demo/text_clipping/text_clipping.c +++ b/src/fw/apps/demo/text_clipping/text_clipping.c @@ -27,15 +27,15 @@ typedef struct AppState { TextLayer direction_layer; TextLayer word_wrap_layer; SelectIndex select_index; - bool up_down_direction; // True = move up or down; False = move left or right - bool word_wrap; // True = word wrap; False = don't word wrap + bool up_down_direction; // True = move up or down; False = move left or right + bool word_wrap; // True = word wrap; False = don't word wrap } AppState; -static const char* text_buffer = "Text Clipping"; +static const char *text_buffer = "Text Clipping"; static void init_text_layer(AppState *data, GRect frame) { - text_layer_init(&data->text_layer, &GRect(frame.origin.x, frame.origin.y, - frame.size.w, frame.size.h)); + text_layer_init(&data->text_layer, + &GRect(frame.origin.x, frame.origin.y, frame.size.w, frame.size.h)); text_layer_set_background_color(&data->text_layer, GColorWhite); text_layer_set_text_color(&data->text_layer, GColorBlack); text_layer_set_text(&data->text_layer, text_buffer); @@ -181,30 +181,29 @@ static void prv_window_load(Window *window) { } static void push_window(struct AppState *data) { - Window* window = &data->window; + Window *window = &data->window; window_init(window, WINDOW_NAME("Text Clipping")); window_set_user_data(window, data); - window_set_click_config_provider(window, (ClickConfigProvider) config_provider); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_click_config_provider(window, (ClickConfigProvider)config_provider); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } - //////////////////// // App boilerplate static void handle_init(void) { - struct AppState* data = app_malloc_check(sizeof(struct AppState)); + struct AppState *data = app_malloc_check(sizeof(struct AppState)); app_state_set_user_data(data); push_window(data); } static void handle_deinit(void) { - struct AppState* data = app_state_get_user_data(); + struct AppState *data = app_state_get_user_data(); app_free(data); } @@ -216,10 +215,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* text_clipping_app_get_info() { +const PebbleProcessMd *text_clipping_app_get_info() { static const PebbleProcessMdSystem text_spacing_info = { - .common.main_func = &s_main, - .name = "Text Clipping" + .common.main_func = &s_main, + .name = "Text Clipping" }; - return (const PebbleProcessMd*) &text_spacing_info; + return (const PebbleProcessMd *)&text_spacing_info; } diff --git a/src/fw/apps/demo/text_clipping/text_clipping.h b/src/fw/apps/demo/text_clipping/text_clipping.h index 27e1329c7a..9c3c68aa42 100644 --- a/src/fw/apps/demo/text_clipping/text_clipping.h +++ b/src/fw/apps/demo/text_clipping/text_clipping.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* text_clipping_app_get_info(); +const PebbleProcessMd *text_clipping_app_get_info(); diff --git a/src/fw/apps/demo/text_flow/text_flow.c b/src/fw/apps/demo/text_flow/text_flow.c index 16cf4b3bbb..3b00b5b16a 100644 --- a/src/fw/apps/demo/text_flow/text_flow.c +++ b/src/fw/apps/demo/text_flow/text_flow.c @@ -20,15 +20,15 @@ typedef struct AppState { TextLayer box; } AppState; -static const char* QUOTE_BUF_1 = - "Space, the final frontier. These are the voyages of the starship Enterprise. " - "Its 5-year mission: to explore strange new worlds, " - "to seek out new life and new civilizations, to boldly go where no man has gone before. "; +static const char *QUOTE_BUF_1 = + "Space, the final frontier. These are the voyages of the starship Enterprise. " + "Its 5-year mission: to explore strange new worlds, " + "to seek out new life and new civilizations, to boldly go where no man has gone before. "; -static const char* QUOTE_BUF_2 = - "Dib: You're just jealous...\n" - "Zim: This has nothing to do with jelly!\n" - "Zim: You dare agree with me? Prepare to meet your horrible doom!"; +static const char *QUOTE_BUF_2 = + "Dib: You're just jealous...\n" + "Zim: This has nothing to do with jelly!\n" + "Zim: You dare agree with me? Prepare to meet your horrible doom!"; static void prv_window_load(Window *window) { graphics_text_perimeter_debugging_enable(true); @@ -87,34 +87,33 @@ static void prv_window_load(Window *window) { // Setup paging before getting content size scroll_layer_set_paging(&data->scroll_layer, true); // Trim text layer and scroll content to fit text box - scroll_layer_set_content_size( - &data->scroll_layer, GSize(scroll_bounds.size.w, max_size_1.h + max_size_2.h)); + scroll_layer_set_content_size(&data->scroll_layer, + GSize(scroll_bounds.size.w, max_size_1.h + max_size_2.h)); } static void push_window(struct AppState *data) { - Window* window = &data->window; + Window *window = &data->window; window_init(window, WINDOW_NAME("Text Flow")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } - //////////////////// // App boilerplate static void handle_init(void) { - struct AppState* data = app_zalloc_check(sizeof(struct AppState)); + struct AppState *data = app_zalloc_check(sizeof(struct AppState)); app_state_set_user_data(data); push_window(data); } static void handle_deinit(void) { - struct AppState* data = app_state_get_user_data(); + struct AppState *data = app_state_get_user_data(); app_free(data); } @@ -126,10 +125,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* text_flow_app_get_info() { +const PebbleProcessMd *text_flow_app_get_info() { static const PebbleProcessMdSystem text_flow_info = { - .common.main_func = &s_main, - .name = "Text Flow" + .common.main_func = &s_main, + .name = "Text Flow" }; - return (const PebbleProcessMd*) &text_flow_info; + return (const PebbleProcessMd *)&text_flow_info; } diff --git a/src/fw/apps/demo/text_flow/text_flow.h b/src/fw/apps/demo/text_flow/text_flow.h index dbb55598f4..d2364a4514 100644 --- a/src/fw/apps/demo/text_flow/text_flow.h +++ b/src/fw/apps/demo/text_flow/text_flow.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* text_flow_app_get_info(); +const PebbleProcessMd *text_flow_app_get_info(); diff --git a/src/fw/apps/demo/text_layout/text_layout.c b/src/fw/apps/demo/text_layout/text_layout.c index 491732689b..7f6c213fa5 100644 --- a/src/fw/apps/demo/text_layout/text_layout.c +++ b/src/fw/apps/demo/text_layout/text_layout.c @@ -22,25 +22,28 @@ static GFont s_system_font; static GFont s_fonts[8]; static int s_font_selection = 0; -static const char* ALL_CODEPOINTS = -" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿıŁłŒœŠšŸŽžƒˆˇ˘˙˚˛˜˝π–—‘’‚“”„†‡•…‰‹›⁄€™Ω∂∆∏∑−√∞∫≈≠≤≥◊fifl"; +static const char *ALL_CODEPOINTS = + " !\"#$%&'()*+,-./" + "0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" + " ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ" + "ÿıŁłŒœŠšŸŽžƒˆˇ˘˙˚˛˜˝π–—‘’‚“”„†‡•…‰‹›⁄€™Ω∂∆∏∑−√∞∫≈≠≤≥◊fifl"; -static void select_click_handler(ClickRecognizerRef recognizer, void* callback_param) { - (void) recognizer; - struct AppState* data = (struct AppState*) callback_param; +static void select_click_handler(ClickRecognizerRef recognizer, void *callback_param) { + (void)recognizer; + struct AppState *data = (struct AppState *)callback_param; PBL_LOG_DBG("I should be changing the font!"); if (++s_font_selection > 7) { s_font_selection = 0; } - ScrollLayer* scroll_layer = &data->scroll_layer; - TextLayer* text = &data->text; + ScrollLayer *scroll_layer = &data->scroll_layer; + TextLayer *text = &data->text; text_layer_set_font(text, s_fonts[s_font_selection]); - GSize max_size = graphics_text_layout_get_max_used_size(app_state_get_graphics_context(), - text->text, text->font, - GRect(0, 0, text->layer.bounds.size.w, SHRT_MAX), - text->overflow_mode, text->text_alignment, NULL); + GSize max_size = graphics_text_layout_get_max_used_size( + app_state_get_graphics_context(), text->text, text->font, + GRect(0, 0, text->layer.bounds.size.w, SHRT_MAX), text->overflow_mode, text->text_alignment, + NULL); text_layer_set_size(text, max_size); static const int vert_scroll_padding = 4; @@ -56,30 +59,31 @@ static void select_long_click_handler(ClickRecognizerRef recognizer, struct AppS } #endif -static void click_config_provider(struct AppState* data) { +static void click_config_provider(struct AppState *data) { // The config that gets passed in, has already the UP and DOWN buttons configured // to scroll up and down. It's possible to override that here, if needed. // Configure how the SELECT button should behave: - window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler) select_click_handler); - window_long_click_subscribe(BUTTON_ID_SELECT, 0, (ClickHandler) select_click_handler, NULL); + window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler)select_click_handler); + window_long_click_subscribe(BUTTON_ID_SELECT, 0, (ClickHandler)select_click_handler, NULL); (void)data; } static void prv_window_load(Window *window) { - struct AppState* data = window_get_user_data(window); + struct AppState *data = window_get_user_data(window); - ScrollLayer* scroll_layer = &data->scroll_layer; + ScrollLayer *scroll_layer = &data->scroll_layer; scroll_layer_init(scroll_layer, &window->layer.bounds); scroll_layer_set_click_config_onto_window(scroll_layer, window); - scroll_layer_set_callbacks(scroll_layer, (ScrollLayerCallbacks) { - .click_config_provider = (ClickConfigProvider) click_config_provider, - }); + scroll_layer_set_callbacks( + scroll_layer, (ScrollLayerCallbacks){ + .click_config_provider = (ClickConfigProvider)click_config_provider, + }); scroll_layer_set_context(scroll_layer, data); scroll_layer_set_content_size(scroll_layer, GSize(144, 672)); const GRect max_text_bounds = GRect(0, 0, 144, 672); - TextLayer* text = &data->text; + TextLayer *text = &data->text; text_layer_init(text, &max_text_bounds); text_layer_set_font(text, s_system_font); text_layer_set_text(text, ALL_CODEPOINTS); @@ -95,17 +99,16 @@ static void prv_window_load(Window *window) { } static void push_window(struct AppState *data) { - Window* window = &data->window; + Window *window = &data->window; window_init(window, WINDOW_NAME("Text Layout Demo")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } - //////////////////// // App boilerplate @@ -119,14 +122,14 @@ static void handle_init(void) { s_fonts[6] = fonts_get_system_font(FONT_KEY_GOTHIC_28); s_fonts[7] = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD); s_system_font = s_fonts[0]; - struct AppState* data = app_malloc_check(sizeof(struct AppState)); + struct AppState *data = app_malloc_check(sizeof(struct AppState)); app_state_set_user_data(data); push_window(data); } static void handle_deinit(void) { - struct AppState* data = app_state_get_user_data(); + struct AppState *data = app_state_get_user_data(); app_free(data); } @@ -138,11 +141,11 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* text_layout_get_info() { +const PebbleProcessMd *text_layout_get_info() { static const PebbleProcessMdSystem text_layout_info = { - .common.main_func = &s_main, - .name = "\xF3\xBE\x87\x8A Code Points Overflow This!" // The first 4 bytes is a UTF-8 codepoint for the hamster emoji. + .common.main_func = &s_main, + .name = "\xF3\xBE\x87\x8A Code Points Overflow This!" // The first 4 bytes is a UTF-8 + // codepoint for the hamster emoji. }; - return (const PebbleProcessMd*) &text_layout_info; + return (const PebbleProcessMd *)&text_layout_info; } - diff --git a/src/fw/apps/demo/text_spacing/text_spacing.c b/src/fw/apps/demo/text_spacing/text_spacing.c index 0f8dc33be0..1dbf4cdd03 100644 --- a/src/fw/apps/demo/text_spacing/text_spacing.c +++ b/src/fw/apps/demo/text_spacing/text_spacing.c @@ -23,9 +23,9 @@ typedef struct AppState { GFont gothic_14_bold; } AppState; -static const char* TEXT_DELTA_BUF = - "!\"#$%&'()*+,-./ 0123456789:;<=>?@ ABCDEFGHIJKLMNOP QRSTUVWXYZ [\\]^_` " - "abcdefghijklmnop qrstuvwxyz"; +static const char *TEXT_DELTA_BUF = + "!\"#$%&'()*+,-./ 0123456789:;<=>?@ ABCDEFGHIJKLMNOP QRSTUVWXYZ [\\]^_` " + "abcdefghijklmnop qrstuvwxyz"; static void click_handler(ClickRecognizerRef recognizer, Window *window) { AppState *data = window_get_user_data(window); @@ -45,10 +45,10 @@ static void click_handler(ClickRecognizerRef recognizer, Window *window) { text_layer_set_line_spacing_delta(&data->text_layer, data->line_spacing_delta); } - GSize size_used = text_layer_get_content_size(app_get_current_graphics_context(), - &data->text_layer); - PBL_LOG_DBG("Line Delta: %d, Size %d x %d, Overflow: %d", data->line_spacing_delta, - size_used.w, size_used.h, data->overflow_mode); + GSize size_used = + text_layer_get_content_size(app_get_current_graphics_context(), &data->text_layer); + PBL_LOG_DBG("Line Delta: %d, Size %d x %d, Overflow: %d", data->line_spacing_delta, size_used.w, + size_used.h, data->overflow_mode); } static void config_provider(Window *window) { @@ -78,36 +78,35 @@ static void prv_window_load(Window *window) { layer_add_child(&window->layer, &data->text_layer.layer); - GSize size_used = text_layer_get_content_size(app_get_current_graphics_context(), - &data->text_layer); + GSize size_used = + text_layer_get_content_size(app_get_current_graphics_context(), &data->text_layer); PBL_LOG_DBG("Max size used %d %d", size_used.w, size_used.h); } static void push_window(struct AppState *data) { - Window* window = &data->window; + Window *window = &data->window; window_init(window, WINDOW_NAME("Text Spacing")); window_set_user_data(window, data); - window_set_click_config_provider(window, (ClickConfigProvider) config_provider); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_click_config_provider(window, (ClickConfigProvider)config_provider); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + }); const bool animated = true; app_window_stack_push(window, animated); } - //////////////////// // App boilerplate static void handle_init(void) { - struct AppState* data = app_malloc_check(sizeof(struct AppState)); + struct AppState *data = app_malloc_check(sizeof(struct AppState)); app_state_set_user_data(data); push_window(data); } static void handle_deinit(void) { - struct AppState* data = app_state_get_user_data(); + struct AppState *data = app_state_get_user_data(); app_free(data); } @@ -119,10 +118,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* text_spacing_app_get_info() { +const PebbleProcessMd *text_spacing_app_get_info() { static const PebbleProcessMdSystem text_delta_info = { - .common.main_func = &s_main, - .name = "Text Spacing" // The first 4 bytes is a UTF-8 codepoint for the hamster emoji. + .common.main_func = &s_main, + .name = "Text Spacing" // The first 4 bytes is a UTF-8 codepoint for the hamster emoji. }; - return (const PebbleProcessMd*) &text_delta_info; + return (const PebbleProcessMd *)&text_delta_info; } diff --git a/src/fw/apps/demo/text_spacing/text_spacing.h b/src/fw/apps/demo/text_spacing/text_spacing.h index 77c7fdc296..fa871b0315 100644 --- a/src/fw/apps/demo/text_spacing/text_spacing.h +++ b/src/fw/apps/demo/text_spacing/text_spacing.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* text_spacing_app_get_info(); +const PebbleProcessMd *text_spacing_app_get_info(); diff --git a/src/fw/apps/demo/timeline_pins/timeline_pins_demo.c b/src/fw/apps/demo/timeline_pins/timeline_pins_demo.c index 638ce988a0..a95ce743bc 100644 --- a/src/fw/apps/demo/timeline_pins/timeline_pins_demo.c +++ b/src/fw/apps/demo/timeline_pins/timeline_pins_demo.c @@ -21,10 +21,11 @@ #include -#define StringListLiteral(str) { \ - .serialized_byte_length = ARRAY_LENGTH(str) - 1, \ - .data = str, \ -} \ +#define StringListLiteral(str) \ + { \ + .serialized_byte_length = ARRAY_LENGTH(str) - 1, \ + .data = str, \ + } const char *timeline_demo_strings[TimelinePinsDemoCount] = { [TimelinePinsDemo_Default] = "Default Pins", @@ -68,10 +69,8 @@ static void prv_add_notification(int32_t delta_time_s) { attribute_list_add_cstring(&list, AttributeIdTitle, ARRAY_RAND(titles)); attribute_list_add_cstring(&list, AttributeIdBody, ARRAY_RAND(bodies)); attribute_list_add_uint32(&list, AttributeIdLastUpdated, now); - TimelineItem *item = timeline_item_create_with_attributes(now + delta_time_s, 0, - TimelineItemTypeNotification, - LayoutIdNotification, - &list, NULL); + TimelineItem *item = timeline_item_create_with_attributes( + now + delta_time_s, 0, TimelineItemTypeNotification, LayoutIdNotification, &list, NULL); notification_storage_store(item); timeline_item_destroy(item); attribute_list_destroy_list(&list); @@ -101,9 +100,8 @@ static void prv_add_weather_pin_with_params(int32_t delta_time_s, bool has_times if (has_short_subtitle) { attribute_list_add_cstring(&list, AttributeIdShortSubtitle, "Cloudy with rain and snow"); } - TimelineItem *item = timeline_item_create_with_attributes(now + delta_time_s, 0, - TimelineItemTypePin, LayoutIdWeather, - &list, NULL); + TimelineItem *item = timeline_item_create_with_attributes( + now + delta_time_s, 0, TimelineItemTypePin, LayoutIdWeather, &list, NULL); pin_db_insert_item_without_event(item); timeline_item_destroy(item); @@ -137,9 +135,8 @@ static void prv_add_sports_pin(int32_t delta_time_s, GColor secondary_color, boo "01:45\nJames 3pt Shot: Missed\n" "03:15 | 22-29\nLeonard Free Throw 2 of 2 (8PTS)"); attribute_list_add_uint32(&list, AttributeIdLastUpdated, now); - TimelineItem *item = timeline_item_create_with_attributes(now + delta_time_s, 0, - TimelineItemTypePin, LayoutIdSports, - &list, NULL); + TimelineItem *item = timeline_item_create_with_attributes( + now + delta_time_s, 0, TimelineItemTypePin, LayoutIdSports, &list, NULL); pin_db_insert_item_without_event(item); timeline_item_destroy(item); @@ -175,9 +172,8 @@ static void prv_add_calendar_pin(int32_t delta_time_s, int32_t duration_m, bool "http://docs.google.com/u/1/#inbox/14b9fa5f872ebbc6\n\n" "Will email before if we need to cancel"); attribute_list_add_uint32(&list, AttributeIdLastUpdated, now); - TimelineItem *item = timeline_item_create_with_attributes(target, duration_m, - TimelineItemTypePin, LayoutIdCalendar, - &list, NULL); + TimelineItem *item = timeline_item_create_with_attributes(target, duration_m, TimelineItemTypePin, + LayoutIdCalendar, &list, NULL); pin_db_insert_item_without_event(item); timeline_item_destroy(item); @@ -202,9 +198,8 @@ static void prv_add_generic_pin(int32_t delta_time_s, bool has_subtitle) { attribute_list_add_string_list(&list, AttributeIdParagraphs, ¶graphs); attribute_list_add_cstring(&list, AttributeIdBody, "Body message"); attribute_list_add_uint32(&list, AttributeIdLastUpdated, now); - TimelineItem *item = timeline_item_create_with_attributes(now + delta_time_s, 0, - TimelineItemTypePin, LayoutIdGeneric, - &list, NULL); + TimelineItem *item = timeline_item_create_with_attributes( + now + delta_time_s, 0, TimelineItemTypePin, LayoutIdGeneric, &list, NULL); pin_db_insert_item_without_event(item); timeline_item_destroy(item); @@ -225,20 +220,22 @@ static void prv_add_activity_session_pin(int32_t delta_time_s, int32_t duration_ uint8_t buffer[Uint32ListSize(ActivitySessionMetricCount)]; Uint32List *icons = (Uint32List *)buffer; - icons->num_values = ActivitySessionMetricCount, - icons->values[0] = TIMELINE_RESOURCE_PACE; + icons->num_values = ActivitySessionMetricCount, icons->values[0] = TIMELINE_RESOURCE_PACE; icons->values[1] = TIMELINE_RESOURCE_DURATION; icons->values[2] = TIMELINE_RESOURCE_CALORIES; icons->values[3] = TIMELINE_RESOURCE_DISTANCE; static StringList names = StringListLiteral("Pace\0Run duration\0Calories burned\0Distance"); - static StringList values = StringListLiteral("7:45\0" "30M\0" "8384\0" "3.3 miles"); + static StringList values = StringListLiteral( + "7:45\0" + "30M\0" + "8384\0" + "3.3 miles"); attribute_list_add_string_list(&list, AttributeIdMetricNames, &names); attribute_list_add_string_list(&list, AttributeIdMetricValues, &values); attribute_list_add_uint32_list(&list, AttributeIdMetricIcons, icons); - TimelineItem *item = timeline_item_create_with_attributes(now + delta_time_s, duration_m, - TimelineItemTypePin, LayoutIdHealth, - &list, NULL); + TimelineItem *item = timeline_item_create_with_attributes( + now + delta_time_s, duration_m, TimelineItemTypePin, LayoutIdHealth, &list, NULL); pin_db_insert_item_without_event(item); timeline_item_destroy(item); @@ -246,11 +243,11 @@ static void prv_add_activity_session_pin(int32_t delta_time_s, int32_t duration_ } static void prv_launch_timeline(void) { - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { .id = APP_ID_TIMELINE }); + app_manager_put_launch_app_event(&(AppLaunchEventConfig){.id = APP_ID_TIMELINE}); } static void prv_launch_notifications(void) { - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { .id = APP_ID_NOTIFICATIONS }); + app_manager_put_launch_app_event(&(AppLaunchEventConfig){.id = APP_ID_NOTIFICATIONS}); } void timeline_pins_demo_add_pins(TimelinePinsDemoSet pin_set) { @@ -302,8 +299,8 @@ void timeline_pins_demo_add_pins(TimelinePinsDemoSet pin_set) { prv_add_weather_pin(2 * 24 * 60 * 60); goto timeline; case TimelinePinsDemo_OngoingEvent: { - prv_add_calendar_pin(-(3 * SECONDS_PER_DAY) / 2, 3 * MINUTES_PER_DAY, is_all_day, - !recurring, 0, 0); + prv_add_calendar_pin(-(3 * SECONDS_PER_DAY) / 2, 3 * MINUTES_PER_DAY, is_all_day, !recurring, + 0, 0); goto timeline; } case TimelinePinsDemo_TodayAndTomorrow: @@ -347,8 +344,8 @@ static uint16_t prv_menu_get_num_rows(OptionMenu *option_menu, void *context) { static void prv_menu_draw_row(OptionMenu *option_menu, GContext *ctx, const Layer *cell_layer, const GRect *text_frame, uint32_t row, bool selected, void *context) { - option_menu_system_draw_row(option_menu, ctx, cell_layer, text_frame, - timeline_demo_strings[row], selected, context); + option_menu_system_draw_row(option_menu, ctx, cell_layer, text_frame, timeline_demo_strings[row], + selected, context); } static void prv_menu_unload(OptionMenu *option_menu, void *context) { @@ -358,24 +355,26 @@ static void prv_menu_unload(OptionMenu *option_menu, void *context) { static void prv_handle_init(void) { // add CFLAGS="-DTIMELINE_PIN_SET=OneDayAway" before ./waf configure to skip menu #ifdef TIMELINE_PIN_SET - #define PREFIX_PIN_SET(set) (__CONCAT(TimelinePinsDemo, set)) +#define PREFIX_PIN_SET(set) (__CONCAT(TimelinePinsDemo, set)) timeline_pins_demo_add_pins(PREFIX_PIN_SET(TIMELINE_PIN_SET)); #else OptionMenu *option_menu = option_menu_create(); const OptionMenuConfig config = { - .title = "Select Type of Pins to Add", - .choice = OPTION_MENU_CHOICE_NONE, - .status_colors = { GColorDarkGray, GColorWhite }, - .highlight_colors = { GColorLightGray, GColorBlack }, + .title = "Select Type of Pins to Add", + .choice = OPTION_MENU_CHOICE_NONE, + .status_colors = {GColorDarkGray, GColorWhite}, + .highlight_colors = {GColorLightGray, GColorBlack}, }; option_menu_configure(option_menu, &config); - option_menu_set_callbacks(option_menu, &(OptionMenuCallbacks) { - .select = prv_menu_select, - .get_num_rows = prv_menu_get_num_rows, - .draw_row = prv_menu_draw_row, - .unload = prv_menu_unload, - }, option_menu); + option_menu_set_callbacks(option_menu, + &(OptionMenuCallbacks){ + .select = prv_menu_select, + .get_num_rows = prv_menu_get_num_rows, + .draw_row = prv_menu_draw_row, + .unload = prv_menu_unload, + }, + option_menu); const bool animated = true; app_window_stack_push(&option_menu->window, animated); @@ -387,15 +386,17 @@ static void prv_main(void) { app_event_loop(); } -const PebbleProcessMd* timeline_pins_get_app_info(void) { +const PebbleProcessMd *timeline_pins_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = prv_main, - // UUID: c53a79d7-3472-4062-a7d0-39ada9bfa415 - .uuid = {0xc5, 0x3a, 0x79, 0xd7, 0x34, 0x72, 0x40, 0x62, - 0xa7, 0xd0, 0x39, 0xad, 0xa9, 0xbf, 0xa4, 0x15}, - }, + .common = + { + .main_func = prv_main, + // UUID: c53a79d7-3472-4062-a7d0-39ada9bfa415 + .uuid = + {0xc5, 0x3a, 0x79, 0xd7, 0x34, 0x72, 0x40, 0x62, 0xa7, 0xd0, 0x39, 0xad, 0xa9, + 0xbf, 0xa4, 0x15}, + }, .name = "Timeline Pins Demo", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/timer/timer.c b/src/fw/apps/demo/timer/timer.c index 2fd034e1db..0891c4add6 100644 --- a/src/fw/apps/demo/timer/timer.c +++ b/src/fw/apps/demo/timer/timer.c @@ -40,7 +40,7 @@ static void prv_window_load(Window *window) { } static const WindowHandlers s_main_menu_handlers = { - .load = prv_window_load, + .load = prv_window_load, }; static void handle_init(void) { @@ -63,10 +63,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* timer_app_get_info() { +const PebbleProcessMd *timer_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - .name = "Timer Cancel Test" + .common.main_func = &s_main, + .name = "Timer Cancel Test" }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/demo/timer/timer.h b/src/fw/apps/demo/timer/timer.h index 6f33055b13..1d02b6b005 100644 --- a/src/fw/apps/demo/timer/timer.h +++ b/src/fw/apps/demo/timer/timer.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* timer_app_get_info(); +const PebbleProcessMd *timer_app_get_info(); diff --git a/src/fw/apps/demo/trigger_alarm/trigger_alarm.c b/src/fw/apps/demo/trigger_alarm/trigger_alarm.c index 21fdd7b6d2..da93fbe4e8 100644 --- a/src/fw/apps/demo/trigger_alarm/trigger_alarm.c +++ b/src/fw/apps/demo/trigger_alarm/trigger_alarm.c @@ -23,19 +23,16 @@ static void handle_init(void) { const bool animated = true; app_window_stack_push(&data->window, animated); - PebbleEvent e = (PebbleEvent) { - .type = PEBBLE_ALARM_CLOCK_EVENT, - .alarm_clock = { - .alarm_time = rtc_get_time(), - .alarm_label = "Wake Up" - } + PebbleEvent e = (PebbleEvent){ + .type = PEBBLE_ALARM_CLOCK_EVENT, + .alarm_clock = {.alarm_time = rtc_get_time(), .alarm_label = "Wake Up"} }; event_put(&e); } static void handle_deinit(void) { - TriggerAlarmData *data = (TriggerAlarmData*)app_state_get_user_data(); + TriggerAlarmData *data = (TriggerAlarmData *)app_state_get_user_data(); app_free(data); } @@ -47,12 +44,11 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* trigger_alarm_get_app_info() { +const PebbleProcessMd *trigger_alarm_get_app_info() { static const PebbleProcessMdSystem s_trigger_alarm = { - .common.main_func = s_main, - .name = "Trigger Alarm" + .common.main_func = s_main, + .name = "Trigger Alarm" }; - return (const PebbleProcessMd*) &s_trigger_alarm; + return (const PebbleProcessMd *)&s_trigger_alarm; } - diff --git a/src/fw/apps/demo/vibe_and_logs/vibe_and_logs.c b/src/fw/apps/demo/vibe_and_logs/vibe_and_logs.c index 5a755418ce..2da6ea98f8 100644 --- a/src/fw/apps/demo/vibe_and_logs/vibe_and_logs.c +++ b/src/fw/apps/demo/vibe_and_logs/vibe_and_logs.c @@ -18,7 +18,7 @@ static AppTimer *s_app_timer; TimerID s_sys_timer = TIMER_INVALID_ID; static void app_timer_callback(void *data) { - for (int i=0; i<40; i++) { + for (int i = 0; i < 40; i++) { PBL_LOG_INFO("%d Running app timer callback", i); vibes_short_pulse(); } @@ -43,7 +43,7 @@ static void handle_init(void) { s_app_timer = app_timer_register(100 /* milliseconds */, app_timer_callback, NULL); s_sys_timer = new_timer_create(); - //new_timer_start(s_sys_timer, 10, sys_timer_callback, NULL, 0); + // new_timer_start(s_sys_timer, 10, sys_timer_callback, NULL, 0); } static void handle_deinit(void) { @@ -57,12 +57,11 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* vibe_and_logs_get_app_info() { +const PebbleProcessMd *vibe_and_logs_get_app_info() { static const PebbleProcessMdSystem s_trigger_alarm = { - .common.main_func = s_main, - .name = "VibeAndLogs" + .common.main_func = s_main, + .name = "VibeAndLogs" }; - return (const PebbleProcessMd*) &s_trigger_alarm; + return (const PebbleProcessMd *)&s_trigger_alarm; } - diff --git a/src/fw/apps/demo/vibe_and_logs/vibe_and_logs.h b/src/fw/apps/demo/vibe_and_logs/vibe_and_logs.h index afec447d87..c0671f03af 100644 --- a/src/fw/apps/demo/vibe_and_logs/vibe_and_logs.h +++ b/src/fw/apps/demo/vibe_and_logs/vibe_and_logs.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* vibe_and_logs_get_app_info(); +const PebbleProcessMd *vibe_and_logs_get_app_info(); diff --git a/src/fw/apps/demo/vibe_score/vibe_score_demo.c b/src/fw/apps/demo/vibe_score/vibe_score_demo.c index eba48234e7..fa784511f5 100644 --- a/src/fw/apps/demo/vibe_score/vibe_score_demo.c +++ b/src/fw/apps/demo/vibe_score/vibe_score_demo.c @@ -13,7 +13,7 @@ #include static uint32_t s_vibe_score_resources[] = { - RESOURCE_ID_VIBE_SCORE_NUDGE_NUDGE, + RESOURCE_ID_VIBE_SCORE_NUDGE_NUDGE, }; static VibeScore *s_vibe_scores[ARRAY_LENGTH(s_vibe_score_resources)]; @@ -41,9 +41,8 @@ static void prv_unload_scores(void) { static void handle_init(void) { prv_load_scores(); - NumberWindow *vibe_num_window = number_window_create("Vibe Patterns", - (NumberWindowCallbacks) { .selected = prv_do_vibe }, - NULL); + NumberWindow *vibe_num_window = + number_window_create("Vibe Patterns", (NumberWindowCallbacks){.selected = prv_do_vibe}, NULL); app_state_set_user_data(vibe_num_window); number_window_set_value(vibe_num_window, 0); @@ -66,10 +65,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* vibe_score_demo_get_info() { +const PebbleProcessMd *vibe_score_demo_get_info() { static const PebbleProcessMdSystem s_vibe_score_info = { - .common.main_func = s_main, - .name = "Vibe Patterns" + .common.main_func = s_main, + .name = "Vibe Patterns" }; - return (const PebbleProcessMd*) &s_vibe_score_info; + return (const PebbleProcessMd *)&s_vibe_score_info; } diff --git a/src/fw/apps/demo/vibe_strength/vibe_strength_demo.c b/src/fw/apps/demo/vibe_strength/vibe_strength_demo.c index 484c1f124e..8f632ae8f3 100644 --- a/src/fw/apps/demo/vibe_strength/vibe_strength_demo.c +++ b/src/fw/apps/demo/vibe_strength/vibe_strength_demo.c @@ -19,12 +19,11 @@ static void selected_pwm_percentage(NumberWindow *nw, void *ctx) { } static void handle_init(void) { - NumberWindow *vibe_num_window = number_window_create("Vibe Strength", - (NumberWindowCallbacks) { .selected = selected_pwm_percentage }, - NULL); + NumberWindow *vibe_num_window = number_window_create( + "Vibe Strength", (NumberWindowCallbacks){.selected = selected_pwm_percentage}, NULL); app_state_set_user_data(vibe_num_window); - uint8_t scale_granularity = 5; // 5 percent at a time + uint8_t scale_granularity = 5; // 5 percent at a time uint8_t curr_percent = VIBE_STRENGTH_MAX; number_window_set_value(vibe_num_window, curr_percent); @@ -46,10 +45,10 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* vibe_strength_demo_get_info() { +const PebbleProcessMd *vibe_strength_demo_get_info() { static const PebbleProcessMdSystem s_vibe_strength_info = { - .common.main_func = s_main, - .name = "Vibe Strength" + .common.main_func = s_main, + .name = "Vibe Strength" }; - return (const PebbleProcessMd*) &s_vibe_strength_info; + return (const PebbleProcessMd *)&s_vibe_strength_info; } diff --git a/src/fw/apps/prf/low_power.c b/src/fw/apps/prf/low_power.c index a62461b026..59f90b9ade 100644 --- a/src/fw/apps/prf/low_power.c +++ b/src/fw/apps/prf/low_power.c @@ -27,7 +27,7 @@ typedef struct { // Update Logic static void prv_refresh_state(void *data_in) { - LowPowerAppData *data = (LowPowerAppData*) data_in; + LowPowerAppData *data = (LowPowerAppData *)data_in; BatteryChargeState current_state = battery_get_charge_state(); uint32_t res_id; GRect kino_area; @@ -42,19 +42,19 @@ static void prv_refresh_state(void *data_in) { goto reschedule; } - layer_set_frame((Layer *) &data->kino_layer, &kino_area); + layer_set_frame((Layer *)&data->kino_layer, &kino_area); kino_layer_set_reel_with_resource(&data->kino_layer, res_id); layer_mark_dirty(&data->kino_layer.layer); - reschedule: - data->saved_state = current_state; - data->timer = app_timer_register(LOW_POWER_APP_STATE_UPDATE_TIME_MS, prv_refresh_state, data); +reschedule: + data->saved_state = current_state; + data->timer = app_timer_register(LOW_POWER_APP_STATE_UPDATE_TIME_MS, prv_refresh_state, data); } //////////////////////////////////////////////////////////// // Window loading, unloading, initializing -static void prv_window_unload_handler(Window* window) { +static void prv_window_unload_handler(Window *window) { LowPowerAppData *data = window_get_user_data(window); if (!data) { // Sanity check @@ -66,15 +66,14 @@ static void prv_window_unload_handler(Window* window) { app_free(data); } -static void prv_window_load_handler(Window* window) { +static void prv_window_load_handler(Window *window) { LowPowerAppData *data = window_get_user_data(window); - data->discharging_kino_area = GRect(PBL_IF_RECT_ELSE(4, 5), - PBL_IF_RECT_ELSE(2, 4), - data->window.layer.bounds.size.w, - data->window.layer.bounds.size.h); - data->charging_kino_area = GRect(0, 0, data->window.layer.bounds.size.w, - data->window.layer.bounds.size.h); + data->discharging_kino_area = + GRect(PBL_IF_RECT_ELSE(4, 5), PBL_IF_RECT_ELSE(2, 4), data->window.layer.bounds.size.w, + data->window.layer.bounds.size.h); + data->charging_kino_area = + GRect(0, 0, data->window.layer.bounds.size.w, data->window.layer.bounds.size.h); kino_layer_init(&data->kino_layer, &data->discharging_kino_area); kino_layer_set_reel_with_resource(&data->kino_layer, RESOURCE_ID_RECOVERY_LOW_POWER_DISCHARGING); @@ -88,16 +87,16 @@ static void prv_prf_low_power_app_window_push(void) { *data = (LowPowerAppData){}; - Window* window = &data->window; + Window *window = &data->window; window_init(window, WINDOW_NAME("Low Power App")); window_set_user_data(window, data); window_set_overrides_back_button(window, true); window_set_fullscreen(window, true); window_set_background_color(window, PBL_IF_COLOR_ELSE(GColorLightGray, GColorWhite)); window_set_window_handlers(window, &(WindowHandlers){ - .load = prv_window_load_handler, - .unload = prv_window_unload_handler, - }); + .load = prv_window_load_handler, + .unload = prv_window_unload_handler, + }); app_window_stack_push(window, false); } @@ -114,17 +113,19 @@ static void s_main(void) { //////////////////////////////////////////////////////////// // Public functions -const PebbleProcessMd* prf_low_power_app_get_info() { +const PebbleProcessMd *prf_low_power_app_get_info() { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = &s_main, - .visibility = ProcessVisibilityHidden, - // UUID: f29f18ac-bbec-452b-9262-49b5f6e5c920 - .uuid = {0xf2, 0x9f, 0x18, 0xac, 0xbb, 0xec, 0x45, 0x2b, - 0x92, 0x62, 0x49, 0xb5, 0xf6, 0xe5, 0xc9, 0x20}, - }, - .name = "Low Power App", - .run_level = ProcessAppRunLevelSystem, + .common = + { + .main_func = &s_main, + .visibility = ProcessVisibilityHidden, + // UUID: f29f18ac-bbec-452b-9262-49b5f6e5c920 + .uuid = + {0xf2, 0x9f, 0x18, 0xac, 0xbb, 0xec, 0x45, 0x2b, 0x92, 0x62, 0x49, 0xb5, 0xf6, + 0xe5, 0xc9, 0x20}, + }, + .name = "Low Power App", + .run_level = ProcessAppRunLevelSystem, }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/low_power.h b/src/fw/apps/prf/low_power.h index ba4d869ea5..c4a4a6d003 100644 --- a/src/fw/apps/prf/low_power.h +++ b/src/fw/apps/prf/low_power.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* prf_low_power_app_get_info(); +const PebbleProcessMd *prf_low_power_app_get_info(); diff --git a/src/fw/apps/prf/mfg_accel.c b/src/fw/apps/prf/mfg_accel.c index 6f423fde66..a7a3d73631 100644 --- a/src/fw/apps/prf/mfg_accel.c +++ b/src/fw/apps/prf/mfg_accel.c @@ -67,22 +67,20 @@ static void prv_update_display(void *context) { int ret = accel_peek(&sample); if (ret != 0) { - sniprintf(data->status_string, sizeof(data->status_string), - "ACCEL ERROR:\n%d", ret); + sniprintf(data->status_string, sizeof(data->status_string), "ACCEL ERROR:\n%d", ret); text_layer_set_text(&data->status, data->status_string); return; } - PBL_LOG_DBG("Accel (mG): X:%" PRIi16 " Y:%" PRIi16 " Z:%" PRIi16, - sample.x, sample.y, sample.z); + PBL_LOG_DBG("Accel (mG): X:%" PRIi16 " Y:%" PRIi16 " Z:%" PRIi16, sample.x, sample.y, sample.z); uint32_t elapsed = (uint32_t)(rtc_get_ticks() - data->state_start_time); switch (data->state) { case STATE_IDLE: { sniprintf(data->status_string, sizeof(data->status_string), - "X: %" PRIi16 " mG\nY: %" PRIi16 " mG\nZ: %" PRIi16 " mG\n\nPress SEL", - sample.x, sample.y, sample.z); + "X: %" PRIi16 " mG\nY: %" PRIi16 " mG\nZ: %" PRIi16 " mG\n\nPress SEL", sample.x, + sample.y, sample.z); break; } @@ -93,12 +91,18 @@ static void prv_update_display(void *context) { data->min_y = data->max_y = sample.y; data->min_z = data->max_z = sample.z; } else { - if (sample.x < data->min_x) data->min_x = sample.x; - if (sample.x > data->max_x) data->max_x = sample.x; - if (sample.y < data->min_y) data->min_y = sample.y; - if (sample.y > data->max_y) data->max_y = sample.y; - if (sample.z < data->min_z) data->min_z = sample.z; - if (sample.z > data->max_z) data->max_z = sample.z; + if (sample.x < data->min_x) + data->min_x = sample.x; + if (sample.x > data->max_x) + data->max_x = sample.x; + if (sample.y < data->min_y) + data->min_y = sample.y; + if (sample.y > data->max_y) + data->max_y = sample.y; + if (sample.z < data->min_z) + data->min_z = sample.z; + if (sample.z > data->max_z) + data->max_z = sample.z; } data->sample_count++; @@ -108,10 +112,9 @@ static void prv_update_display(void *context) { int16_t curr_var_z = data->max_z - data->min_z; sniprintf(data->status_string, sizeof(data->status_string), - "Testing...\nRotate device\n\nX: %" PRId16 " mG\nY: %" PRId16 - " mG\nZ: %" PRId16 " mG\n\n%" PRIu32 " sec remaining", - curr_var_x, curr_var_y, curr_var_z, - (TEST_DURATION_MS - elapsed) / 1000 + 1); + "Testing...\nRotate device\n\nX: %" PRId16 " mG\nY: %" PRId16 " mG\nZ: %" PRId16 + " mG\n\n%" PRIu32 " sec remaining", + curr_var_x, curr_var_y, curr_var_z, (TEST_DURATION_MS - elapsed) / 1000 + 1); if (elapsed >= TEST_DURATION_MS) { // Store final variations @@ -121,8 +124,7 @@ static void prv_update_display(void *context) { // Test passes if all axes vary by at least the minimum threshold data->test_passed = - (data->variation_x >= MIN_VARIATION_MG && - data->variation_y >= MIN_VARIATION_MG && + (data->variation_x >= MIN_VARIATION_MG && data->variation_y >= MIN_VARIATION_MG && data->variation_z >= MIN_VARIATION_MG); mfg_test_result_report(MfgTestId_Accel, data->test_passed, 0); @@ -139,10 +141,9 @@ static void prv_update_display(void *context) { return; } sniprintf(data->status_string, sizeof(data->status_string), - "ACCEL: %s\n\nX: %" PRId16 " mG\nY: %" PRId16 - " mG\nZ: %" PRId16 " mG", - data->test_passed ? "PASS" : "FAIL", - data->variation_x, data->variation_y, data->variation_z); + "ACCEL: %s\n\nX: %" PRId16 " mG\nY: %" PRId16 " mG\nZ: %" PRId16 " mG", + data->test_passed ? "PASS" : "FAIL", data->variation_x, data->variation_y, + data->variation_z); break; } } @@ -172,7 +173,7 @@ static void prv_click_config_provider(void *context) { static void prv_handle_init(void) { AppData *data = app_malloc_check(sizeof(AppData)); - *data = (AppData) {}; + *data = (AppData){}; app_state_set_user_data(data); @@ -189,8 +190,7 @@ static void prv_handle_init(void) { TextLayer *status = &data->status; text_layer_init(status, - &GRect(5, 40, - window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 40)); + &GRect(5, 40, window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 40)); text_layer_set_font(status, fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD)); text_layer_set_text_alignment(status, GTextAlignmentCenter); layer_add_child(&window->layer, &status->layer); @@ -202,7 +202,8 @@ static void prv_handle_init(void) { app_window_stack_push(window, true /* Animated */); - s_timer = evented_timer_register(SAMPLE_INTERVAL_MS, true /* repeating */, prv_update_display, data); + s_timer = + evented_timer_register(SAMPLE_INTERVAL_MS, true /* repeating */, prv_update_display, data); } static void s_main(void) { @@ -213,14 +214,30 @@ static void s_main(void) { evented_timer_cancel(s_timer); } -const PebbleProcessMd* mfg_accel_app_get_info(void) { +const PebbleProcessMd *mfg_accel_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: ED2E214A-D4B5-4360-B5EC-612B9E49FB95 - .common.uuid = { 0xED, 0x2E, 0x21, 0x4A, 0xD4, 0xB5, 0x43, 0x60, - 0xB5, 0xEC, 0x61, 0x2B, 0x9E, 0x49, 0xFB, 0x95, - }, - .name = "MfgAccel", + .common.main_func = &s_main, + // UUID: ED2E214A-D4B5-4360-B5EC-612B9E49FB95 + .common.uuid = + { + 0xED, + 0x2E, + 0x21, + 0x4A, + 0xD4, + 0xB5, + 0x43, + 0x60, + 0xB5, + 0xEC, + 0x61, + 0x2B, + 0x9E, + 0x49, + 0xFB, + 0x95, + }, + .name = "MfgAccel", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_accel.h b/src/fw/apps/prf/mfg_accel.h index dcda60fc06..ecf97b343c 100644 --- a/src/fw/apps/prf/mfg_accel.h +++ b/src/fw/apps/prf/mfg_accel.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_accel_app_get_info(void); +const PebbleProcessMd *mfg_accel_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_adv.c b/src/fw/apps/prf/mfg_adv.c index 7acf3f1955..0c8b19d030 100644 --- a/src/fw/apps/prf/mfg_adv.c +++ b/src/fw/apps/prf/mfg_adv.c @@ -33,18 +33,16 @@ static void prv_handle_init(void) { bt_local_id_copy_address_mac_string(data->mac_buffer); QRCode *qr_code = &data->qr_code; - qr_code_init_with_parameters(qr_code, + qr_code_init_with_parameters( + qr_code, #if PBL_ROUND #define QR_CODE_SIZE ((window->layer.bounds.size.w * 10) / 14) - &GRect((window->layer.bounds.size.w - QR_CODE_SIZE) / 2, - (window->layer.bounds.size.h - QR_CODE_SIZE) / 2, - QR_CODE_SIZE, QR_CODE_SIZE), + &GRect((window->layer.bounds.size.w - QR_CODE_SIZE) / 2, + (window->layer.bounds.size.h - QR_CODE_SIZE) / 2, QR_CODE_SIZE, QR_CODE_SIZE), #else - &GRect(10, 10, window->layer.bounds.size.w - 20, - window->layer.bounds.size.h - 30), + &GRect(10, 10, window->layer.bounds.size.w - 20, window->layer.bounds.size.h - 30), #endif - data->mac_buffer, strlen(data->mac_buffer), QRCodeECCMedium, - GColorBlack, GColorWhite); + data->mac_buffer, strlen(data->mac_buffer), QRCodeECCMedium, GColorBlack, GColorWhite); layer_add_child(&window->layer, &qr_code->layer); TextLayer *mac_label = &data->mac_label; @@ -73,8 +71,9 @@ const PebbleProcessMd *mfg_adv_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { .common.main_func = &s_main, // UUID: 4c8e2a1f-7d3b-4f9e-b5a2-6e1c8d3f7a9b - .common.uuid = {0x4c, 0x8e, 0x2a, 0x1f, 0x7d, 0x3b, 0x4f, 0x9e, - 0xb5, 0xa2, 0x6e, 0x1c, 0x8d, 0x3f, 0x7a, 0x9b}, + .common.uuid = + {0x4c, 0x8e, 0x2a, 0x1f, 0x7d, 0x3b, 0x4f, 0x9e, 0xb5, 0xa2, 0x6e, 0x1c, 0x8d, 0x3f, 0x7a, + 0x9b}, .name = "MfgAdv", }; return (const PebbleProcessMd *)&s_app_info; diff --git a/src/fw/apps/prf/mfg_als.c b/src/fw/apps/prf/mfg_als.c index 575f5d4498..61fa6e5c32 100644 --- a/src/fw/apps/prf/mfg_als.c +++ b/src/fw/apps/prf/mfg_als.c @@ -75,7 +75,7 @@ static void prv_update_display(void *context) { case ALSStateCountdown: snprintf(data->status_text, AMBIENT_READING_STR_LEN, "Place in\nlight box"); - snprintf(data->ambient_reading, AMBIENT_READING_STR_LEN, "Starting in: %"PRIu32"s", + snprintf(data->ambient_reading, AMBIENT_READING_STR_LEN, "Starting in: %" PRIu32 "s", (COUNTDOWN_MS - elapsed) / 1000 + 1); if (elapsed >= COUNTDOWN_MS) { // Start sampling @@ -95,21 +95,21 @@ static void prv_update_display(void *context) { snprintf(data->status_text, AMBIENT_READING_STR_LEN, "Sampling..."); snprintf(data->ambient_reading, AMBIENT_READING_STR_LEN, - "Time: %"PRIu32"s\nCurrent: %"PRIu32"\nSamples: %"PRIu32, + "Time: %" PRIu32 "s\nCurrent: %" PRIu32 "\nSamples: %" PRIu32, (SAMPLE_DURATION_MS - elapsed) / 1000 + 1, level, data->als_sample_count); if (elapsed >= SAMPLE_DURATION_MS) { // Calculate average and determine pass/fail data->als_average = (uint32_t)(data->als_sum / data->als_sample_count); - PBL_LOG_INFO("ALS test complete - Average: %"PRIu32" (samples: %"PRIu32")", + PBL_LOG_INFO("ALS test complete - Average: %" PRIu32 " (samples: %" PRIu32 ")", data->als_average, data->als_sample_count); bool passed = ( #if ALS_MIN_VALUE > 0 - data->als_average >= ALS_MIN_VALUE && + data->als_average >= ALS_MIN_VALUE && #endif - data->als_average <= ALS_MAX_VALUE); + data->als_average <= ALS_MAX_VALUE); mfg_test_result_report(MfgTestId_ALS, passed, data->als_average); if (passed) { @@ -117,7 +117,7 @@ static void prv_update_display(void *context) { PBL_LOG_INFO("ALS test PASSED"); } else { data->test_state = ALSStateFail; - PBL_LOG_ERR("ALS test FAILED - Average %"PRIu32" outside range %d-%d", + PBL_LOG_ERR("ALS test FAILED - Average %" PRIu32 " outside range %d-%d", data->als_average, ALS_MIN_VALUE, ALS_MAX_VALUE); } data->state_start_time = rtc_get_ticks(); @@ -133,8 +133,7 @@ static void prv_update_display(void *context) { } snprintf(data->status_text, AMBIENT_READING_STR_LEN, data->test_state == ALSStatePass ? "PASS" : "FAIL"); - snprintf(data->ambient_reading, AMBIENT_READING_STR_LEN, - "Average: %"PRIu32"\nRange: %d-%d", + snprintf(data->ambient_reading, AMBIENT_READING_STR_LEN, "Average: %" PRIu32 "\nRange: %d-%d", data->als_average, ALS_MIN_VALUE, ALS_MAX_VALUE); break; } @@ -143,7 +142,6 @@ static void prv_update_display(void *context) { text_layer_set_text(data->reading_text_layer, data->ambient_reading); } - static void prv_select_click_handler(ClickRecognizerRef recognizer, void *context) { AmbientLightAppData *data = app_state_get_user_data(); @@ -204,7 +202,8 @@ static void prv_handle_init(void) { app_window_stack_push(data->window, true); // Register evented timer for 100ms updates - s_timer = evented_timer_register(SAMPLE_INTERVAL_MS, true /* repeating */, prv_update_display, data); + s_timer = + evented_timer_register(SAMPLE_INTERVAL_MS, true /* repeating */, prv_update_display, data); PBL_LOG_INFO("ALS test initialized - range: %d-%d", ALS_MIN_VALUE, ALS_MAX_VALUE); } @@ -229,10 +228,10 @@ static void prv_main(void) { prv_handle_deinit(); } -const PebbleProcessMd* mfg_als_app_get_info(void) { +const PebbleProcessMd *mfg_als_app_get_info(void) { static const PebbleProcessMdSystem s_ambient_light_info = { - .common.main_func = prv_main, - .name = "MfgALS" + .common.main_func = prv_main, + .name = "MfgALS" }; - return (const PebbleProcessMd*) &s_ambient_light_info; + return (const PebbleProcessMd *)&s_ambient_light_info; } diff --git a/src/fw/apps/prf/mfg_als.h b/src/fw/apps/prf/mfg_als.h index 02cb7a252a..f5518eb99b 100644 --- a/src/fw/apps/prf/mfg_als.h +++ b/src/fw/apps/prf/mfg_als.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_als_app_get_info(void); +const PebbleProcessMd *mfg_als_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_backlight.c b/src/fw/apps/prf/mfg_backlight.c index 1eeceac6ef..7c2ddc5bea 100644 --- a/src/fw/apps/prf/mfg_backlight.c +++ b/src/fw/apps/prf/mfg_backlight.c @@ -29,8 +29,7 @@ typedef struct { TestPattern test_pattern; } AppData; - -static void prv_update_proc(struct Layer *layer, GContext* ctx) { +static void prv_update_proc(struct Layer *layer, GContext *ctx) { graphics_context_set_fill_color(ctx, GColorWhite); graphics_fill_rect(ctx, &layer->bounds); @@ -39,23 +38,23 @@ static void prv_update_proc(struct Layer *layer, GContext* ctx) { PBL_LOG_INFO("backlight id:%d", app_data->test_pattern); switch (app_data->test_pattern) { - case TestPattern_White: - backlight_set_color(BACKLIGHT_COLOR_WHITE); - break; - case TestPattern_Red: - backlight_set_color(BACKLIGHT_COLOR_RED); - break; - case TestPattern_Green: - backlight_set_color(BACKLIGHT_COLOR_GREEN); - break; - case TestPattern_Blue: - backlight_set_color(BACKLIGHT_COLOR_BLUE); - break; - case TestPattern_Black: - backlight_set_color(BACKLIGHT_COLOR_BLACK); - break; - default: - break; + case TestPattern_White: + backlight_set_color(BACKLIGHT_COLOR_WHITE); + break; + case TestPattern_Red: + backlight_set_color(BACKLIGHT_COLOR_RED); + break; + case TestPattern_Green: + backlight_set_color(BACKLIGHT_COLOR_GREEN); + break; + case TestPattern_Blue: + backlight_set_color(BACKLIGHT_COLOR_BLUE); + break; + case TestPattern_Black: + backlight_set_color(BACKLIGHT_COLOR_BLACK); + break; + default: + break; } #endif } @@ -108,9 +107,7 @@ static void prv_config_provider(void *data) { static void prv_handle_init(void) { AppData *data = app_malloc_check(sizeof(AppData)); - *data = (AppData) { - .test_pattern = (TestPattern) app_manager_get_task_context()->args - }; + *data = (AppData){.test_pattern = (TestPattern)app_manager_get_task_context()->args}; app_state_set_user_data(data); @@ -139,13 +136,14 @@ static void s_main(void) { light_enable(false); } -const PebbleProcessMd* mfg_backlight_app_get_info(void) { +const PebbleProcessMd *mfg_backlight_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: 2d825a20-2fa3-4b26-be6f-ab41d1280c73 - .common.uuid = { 0x2d, 0x82, 0x5a, 0x20, 0x2f, 0xa3, 0x4b, 0x26, - 0xbe, 0x6f, 0xab, 0x41, 0xd1, 0x28, 0x0c, 0x73 }, - .name = "MfgBacklight", + .common.main_func = &s_main, + // UUID: 2d825a20-2fa3-4b26-be6f-ab41d1280c73 + .common.uuid = + {0x2d, 0x82, 0x5a, 0x20, 0x2f, 0xa3, 0x4b, 0x26, 0xbe, 0x6f, 0xab, 0x41, 0xd1, 0x28, 0x0c, + 0x73}, + .name = "MfgBacklight", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_backlight.h b/src/fw/apps/prf/mfg_backlight.h index 018db25fd6..b65adf70ca 100644 --- a/src/fw/apps/prf/mfg_backlight.h +++ b/src/fw/apps/prf/mfg_backlight.h @@ -9,4 +9,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_backlight_app_get_info(void); +const PebbleProcessMd *mfg_backlight_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_button.c b/src/fw/apps/prf/mfg_button.c index 52e206cad1..2c71c7fee6 100644 --- a/src/fw/apps/prf/mfg_button.c +++ b/src/fw/apps/prf/mfg_button.c @@ -63,8 +63,8 @@ static void prv_handle_second_tick(struct tm *tick_time, TimeUnits units_changed } data->seconds_remaining = WINDOW_POP_TIME_S; } else { - sniprintf(data->status_string, sizeof(data->status_string), - "TIME REMAINING: %"PRIu32"s", data->seconds_remaining); + sniprintf(data->status_string, sizeof(data->status_string), "TIME REMAINING: %" PRIu32 "s", + data->seconds_remaining); data->seconds_remaining--; } @@ -76,7 +76,7 @@ static void prv_button_click_handler(ClickRecognizerRef recognizer, void *data) ButtonId button_id_pressed = click_recognizer_get_button_id(recognizer); bitset32_set(&app_data->buttons_pressed, button_id_pressed); - layer_set_hidden((struct Layer*)&app_data->arrows[button_id_pressed], true); + layer_set_hidden((struct Layer *)&app_data->arrows[button_id_pressed], true); if (app_data->test_complete) { app_window_stack_remove(&app_data->window, false /* Animated */); @@ -91,12 +91,12 @@ static void prv_config_provider(void *data) { } static void init_arrow_layer_for_button(AppData *data, ButtonId id) { - static GPoint ARROW_PATH_POINTS[] = - {{0, 7}, {14, 7}, {14, 0}, {26, 12}, {14, 24}, {14, 17}, {0, 17}}; + static GPoint ARROW_PATH_POINTS[] = {{0, 7}, {14, 7}, {14, 0}, {26, 12}, + {14, 24}, {14, 17}, {0, 17}}; static const GPathInfo ARROW_PATH_INFO = { - .num_points = ARRAY_LENGTH(ARROW_PATH_POINTS), - .points = ARROW_PATH_POINTS + .num_points = ARRAY_LENGTH(ARROW_PATH_POINTS), + .points = ARROW_PATH_POINTS }; // Original arrow dimensions @@ -129,14 +129,14 @@ static void init_arrow_layer_for_button(AppData *data, ButtonId id) { // Select button: center right = 0 deg // Down button: bottom-right, 30 deg from horizontal = -30 deg const int32_t BUTTON_ANGLES[] = { - // BACK: left side, pointing left - DEG_TO_TRIGANGLE(180), - // UP: top-right, 30 deg - DEG_TO_TRIGANGLE(30), - // SELECT: center right, 0 deg - DEG_TO_TRIGANGLE(0), - // DOWN: bottom-right, -30 deg - DEG_TO_TRIGANGLE(-30), + // BACK: left side, pointing left + DEG_TO_TRIGANGLE(180), + // UP: top-right, 30 deg + DEG_TO_TRIGANGLE(30), + // SELECT: center right, 0 deg + DEG_TO_TRIGANGLE(0), + // DOWN: bottom-right, -30 deg + DEG_TO_TRIGANGLE(-30), }; int32_t angle = BUTTON_ANGLES[id]; @@ -164,14 +164,14 @@ static void init_arrow_layer_for_button(AppData *data, ButtonId id) { #define ARROW_LR_MARGIN 5 #define ARROW_TB_MARGIN 30 const GRect ARROW_RECTS[] = { - // BACK - {{ARROW_LR_MARGIN, ARROW_TB_MARGIN}, ARROW_SIZE}, - // UP - {{DISP_COLS - ARROW_LR_MARGIN - ARROW_W, ARROW_TB_MARGIN}, ARROW_SIZE}, - // SELECT - {{DISP_COLS - ARROW_LR_MARGIN - ARROW_W, (DISP_ROWS - ARROW_H) / 2}, ARROW_SIZE}, - // DOWN - {{DISP_COLS - ARROW_LR_MARGIN - ARROW_W, DISP_ROWS - ARROW_TB_MARGIN - ARROW_H }, ARROW_SIZE}, + // BACK + {{ARROW_LR_MARGIN, ARROW_TB_MARGIN}, ARROW_SIZE}, + // UP + {{DISP_COLS - ARROW_LR_MARGIN - ARROW_W, ARROW_TB_MARGIN}, ARROW_SIZE}, + // SELECT + {{DISP_COLS - ARROW_LR_MARGIN - ARROW_W, (DISP_ROWS - ARROW_H) / 2}, ARROW_SIZE}, + // DOWN + {{DISP_COLS - ARROW_LR_MARGIN - ARROW_W, DISP_ROWS - ARROW_TB_MARGIN - ARROW_H}, ARROW_SIZE}, }; layer_set_frame(&arrow->layer, &ARROW_RECTS[id]); @@ -187,10 +187,10 @@ static void init_arrow_layer_for_button(AppData *data, ButtonId id) { static void prv_handle_init(void) { AppData *data = app_malloc_check(sizeof(AppData)); - *data = (AppData) { - .seconds_remaining = 10, - .buttons_pressed = 0, - .test_complete = false, + *data = (AppData){ + .seconds_remaining = 10, + .buttons_pressed = 0, + .test_complete = false, }; app_state_set_user_data(data); @@ -209,9 +209,8 @@ static void prv_handle_init(void) { layer_add_child(&window->layer, &title->layer); TextLayer *status = &data->status; - text_layer_init(status, - &GRect(5, 110, - window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 110)); + text_layer_init( + status, &GRect(5, 110, window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 110)); text_layer_set_font(status, fonts_get_system_font(FONT_KEY_GOTHIC_24)); text_layer_set_text_alignment(status, GTextAlignmentCenter); layer_add_child(&window->layer, &status->layer); @@ -231,14 +230,14 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* mfg_button_app_get_info(void) { +const PebbleProcessMd *mfg_button_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: eed03647-fa9e-4bae-9254-608aa297e4e4 - .common.uuid = { 0xee, 0xd0, 0x36, 0x47, 0xfa, 0x9e, 0x4b, 0xae, - 0x92, 0x54, 0x60, 0x8a, 0xa2, 0x97, 0xe4, 0xe4}, - .name = "MfgButton", + .common.main_func = &s_main, + // UUID: eed03647-fa9e-4bae-9254-608aa297e4e4 + .common.uuid = + {0xee, 0xd0, 0x36, 0x47, 0xfa, 0x9e, 0x4b, 0xae, 0x92, 0x54, 0x60, 0x8a, 0xa2, 0x97, 0xe4, + 0xe4}, + .name = "MfgButton", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/prf/mfg_button.h b/src/fw/apps/prf/mfg_button.h index 8e09280bce..e896242f3b 100644 --- a/src/fw/apps/prf/mfg_button.h +++ b/src/fw/apps/prf/mfg_button.h @@ -1,10 +1,8 @@ /* SPDX-FileCopyrightText: 2024 Google LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #pragma once #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_button_app_get_info(void); - +const PebbleProcessMd *mfg_button_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_charge.c b/src/fw/apps/prf/mfg_charge.c index 728a91bb82..b1f4a9c69c 100644 --- a/src/fw/apps/prf/mfg_charge.c +++ b/src/fw/apps/prf/mfg_charge.c @@ -21,16 +21,16 @@ typedef enum { ChargeStateFail, } ChargeTestState; -static const char* status_text[] = { - [ChargeStateWaitPlug] = "Plug Charger", - [ChargeStateWaitCharge] = "Wait Charge...", - [ChargeStatePass] = "PASS - Unplug", - [ChargeStateFail] = "FAIL - Unplug", +static const char *status_text[] = { + [ChargeStateWaitPlug] = "Plug Charger", + [ChargeStateWaitCharge] = "Wait Charge...", + [ChargeStatePass] = "PASS - Unplug", + [ChargeStateFail] = "FAIL - Unplug", }; #if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) -static const int TEMP_MIN_MC = 15000; // 15.0C -static const int TEMP_MAX_MC = 35000; // 35.0C +static const int TEMP_MIN_MC = 15000; // 15.0C +static const int TEMP_MAX_MC = 35000; // 35.0C #else static const int TEMP_MIN_MC = 0; static const int TEMP_MAX_MC = 0; @@ -109,17 +109,15 @@ static void prv_handle_second_tick(struct tm *tick_time, TimeUnits units_changed data->test_state = next_state; - sniprintf(data->status_string, sizeof(data->status_string), - "CHARGE\n%s", status_text[data->test_state]); + sniprintf(data->status_string, sizeof(data->status_string), "CHARGE\n%s", + status_text[data->test_state]); text_layer_set_text(&data->status, data->status_string); int8_t temp_c = (int8_t)(temp_mc / 1000); uint8_t temp_c_frac = ((temp_mc > 0 ? temp_mc : -temp_mc) % 1000) / 10; sniprintf(data->details_string, sizeof(data->details_string), - "%umV %" PRId8 ".%02" PRIu8 "C\r\nUSB: %s\r\nCharging: %s", - charge_mv, - temp_c, temp_c_frac, - charge_state.is_plugged ? "yes" : "no", + "%umV %" PRId8 ".%02" PRIu8 "C\r\nUSB: %s\r\nCharging: %s", charge_mv, temp_c, + temp_c_frac, charge_state.is_plugged ? "yes" : "no", charge_state.is_charging ? "yes" : "no"); text_layer_set_text(&data->details, data->details_string); } @@ -129,9 +127,9 @@ static void app_init(void) { app_state_set_user_data(data); - *data = (AppData) { - .test_state = ChargeStateWaitPlug, - .seconds_remaining = WAIT_CHARGE_TIMEOUT_S, + *data = (AppData){ + .test_state = ChargeStateWaitPlug, + .seconds_remaining = WAIT_CHARGE_TIMEOUT_S, }; Window *window = &data->window; @@ -164,14 +162,15 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* mfg_charge_app_get_info(void) { +const PebbleProcessMd *mfg_charge_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: fbb6d0e6-2d7d-40bc-8b01-f2f8beb9c394 - .common.uuid = { 0xfb, 0xb6, 0xd0, 0xe6, 0x2d, 0x7d, 0x40, 0xbc, - 0x8b, 0x01, 0xf2, 0xf8, 0xbe, 0xb9, 0xc3, 0x94 }, - .name = "Charge App", + .common.main_func = &s_main, + // UUID: fbb6d0e6-2d7d-40bc-8b01-f2f8beb9c394 + .common.uuid = + {0xfb, 0xb6, 0xd0, 0xe6, 0x2d, 0x7d, 0x40, 0xbc, 0x8b, 0x01, 0xf2, 0xf8, 0xbe, 0xb9, 0xc3, + 0x94}, + .name = "Charge App", }; - return (PebbleProcessMd*) &s_app_info; + return (PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_charge.h b/src/fw/apps/prf/mfg_charge.h index b1f2ee8cd4..ced0e1d7d4 100644 --- a/src/fw/apps/prf/mfg_charge.h +++ b/src/fw/apps/prf/mfg_charge.h @@ -1,10 +1,8 @@ /* SPDX-FileCopyrightText: 2024 Google LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #pragma once #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_charge_app_get_info(void); - +const PebbleProcessMd *mfg_charge_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_display.c b/src/fw/apps/prf/mfg_display.c index d87fccc5a3..e5ec9cb472 100644 --- a/src/fw/apps/prf/mfg_display.c +++ b/src/fw/apps/prf/mfg_display.c @@ -64,10 +64,10 @@ static void prv_draw_round_border(Layer *layer, GContext *ctx, uint8_t radial_pa graphics_draw_pixel(ctx, GPoint(layer->bounds.size.w - mask - 1, offset)); graphics_draw_pixel(ctx, GPoint(offset, layer->bounds.size.h - mask - 1)); // Bottom-right quadrant - graphics_draw_pixel(ctx, GPoint(layer->bounds.size.w - mask - 1, - layer->bounds.size.h - offset - 1)); - graphics_draw_pixel(ctx, GPoint(layer->bounds.size.w - offset - 1, - layer->bounds.size.h - mask - 1)); + graphics_draw_pixel(ctx, + GPoint(layer->bounds.size.w - mask - 1, layer->bounds.size.h - offset - 1)); + graphics_draw_pixel(ctx, + GPoint(layer->bounds.size.w - offset - 1, layer->bounds.size.h - mask - 1)); } } @@ -111,36 +111,36 @@ static void prv_draw_crosshair_screen(Layer *layer, GContext *ctx, uint8_t radia prv_draw_border(layer, ctx, radial_padding_size); } -static void prv_update_proc(struct Layer *layer, GContext* ctx) { +static void prv_update_proc(struct Layer *layer, GContext *ctx) { AppData *app_data = app_state_get_user_data(); switch (app_data->test_pattern) { - case TestPattern_Crosshair: - prv_draw_crosshair_screen(layer, ctx, 0); - break; - case TestPattern_Black: - prv_draw_solid(layer, ctx, GColorBlack); - break; - case TestPattern_White: - prv_draw_solid(layer, ctx, GColorWhite); - break; + case TestPattern_Crosshair: + prv_draw_crosshair_screen(layer, ctx, 0); + break; + case TestPattern_Black: + prv_draw_solid(layer, ctx, GColorBlack); + break; + case TestPattern_White: + prv_draw_solid(layer, ctx, GColorWhite); + break; #if PBL_COLOR - case TestPattern_Red: - prv_draw_solid(layer, ctx, GColorRed); - break; - case TestPattern_Green: - prv_draw_solid(layer, ctx, GColorGreen); - break; - case TestPattern_Blue: - prv_draw_solid(layer, ctx, GColorBlue); - break; + case TestPattern_Red: + prv_draw_solid(layer, ctx, GColorRed); + break; + case TestPattern_Green: + prv_draw_solid(layer, ctx, GColorGreen); + break; + case TestPattern_Blue: + prv_draw_solid(layer, ctx, GColorBlue); + break; #else - case TestPattern_Gray: - prv_draw_solid(layer, ctx, GColorDarkGray); - break; + case TestPattern_Gray: + prv_draw_solid(layer, ctx, GColorDarkGray); + break; #endif - default: - break; + default: + break; } } @@ -189,7 +189,7 @@ static void prv_button_click_handler(ClickRecognizerRef recognizer, void *data) static void prv_change_pattern(void *data) { AppData *app_data = app_state_get_user_data(); - app_data->test_pattern = (TestPattern) data; + app_data->test_pattern = (TestPattern)data; layer_mark_dirty(&app_data->window.layer); } @@ -200,9 +200,7 @@ static void prv_config_provider(void *data) { static void prv_handle_init(void) { AppData *data = app_malloc_check(sizeof(AppData)); - *data = (AppData) { - .test_pattern = (TestPattern) app_manager_get_task_context()->args - }; + *data = (AppData){.test_pattern = (TestPattern)app_manager_get_task_context()->args}; app_state_set_user_data(data); @@ -223,18 +221,18 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* mfg_display_app_get_info(void) { +const PebbleProcessMd *mfg_display_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: df582042-5beb-410f-9fed-76eccd31821e - .common.uuid = { 0xdf, 0x58, 0x20, 0x42, 0x5b, 0xeb, 0x41, 0x0f, - 0x9f, 0xed, 0x76, 0xec, 0xcd, 0x31, 0x82, 0x1e }, - .name = "MfgDisplay", + .common.main_func = &s_main, + // UUID: df582042-5beb-410f-9fed-76eccd31821e + .common.uuid = + {0xdf, 0x58, 0x20, 0x42, 0x5b, 0xeb, 0x41, 0x0f, 0x9f, 0xed, 0x76, 0xec, 0xcd, 0x31, 0x82, + 0x1e}, + .name = "MfgDisplay", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - // Prompt Commands /////////////////////////////////////////////////////////////////////////////// @@ -242,24 +240,24 @@ static void prv_launch_app_cb(void *data) { if (app_manager_get_current_app_md() == mfg_display_app_get_info()) { process_manager_send_callback_event_to_process(PebbleTask_App, prv_change_pattern, data); } else { - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = mfg_display_app_get_info(), - .common.args = data, + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = mfg_display_app_get_info(), + .common.args = data, }); } } void command_display_set(const char *color) { - const char * const ARGS[] = { - [TestPattern_Crosshair] = "crosshair", - [TestPattern_Black] = "black", - [TestPattern_White] = "white", + const char *const ARGS[] = { + [TestPattern_Crosshair] = "crosshair", + [TestPattern_Black] = "black", + [TestPattern_White] = "white", #if PBL_COLOR - [TestPattern_Red] = "red", - [TestPattern_Green] = "green", - [TestPattern_Blue] = "blue", + [TestPattern_Red] = "red", + [TestPattern_Green] = "green", + [TestPattern_Blue] = "blue", #else - [TestPattern_Gray] = "gray", + [TestPattern_Gray] = "gray", #endif }; @@ -272,7 +270,7 @@ void command_display_set(const char *color) { mfg_enter_mfg_mode_and_launch_app(); } - launcher_task_add_callback(prv_launch_app_cb, (void*) i); + launcher_task_add_callback(prv_launch_app_cb, (void *)i); prompt_send_response("OK"); return; } diff --git a/src/fw/apps/prf/mfg_display.h b/src/fw/apps/prf/mfg_display.h index d9246e3ff1..25f4646e6e 100644 --- a/src/fw/apps/prf/mfg_display.h +++ b/src/fw/apps/prf/mfg_display.h @@ -9,4 +9,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_display_app_get_info(void); +const PebbleProcessMd *mfg_display_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_hrm.c b/src/fw/apps/prf/mfg_hrm.c index 1d9921aa00..d1d39b9dfb 100644 --- a/src/fw/apps/prf/mfg_hrm.c +++ b/src/fw/apps/prf/mfg_hrm.c @@ -44,11 +44,11 @@ static void prv_handle_hrm_data(PebbleEvent *e, void *context) { snprintf(app_data->status_string, STATUS_STRING_LEN, "Sampling..."); if (e->hrm.event_type == HRMEvent_BPM) { - snprintf(app_data->bpm_string, BPM_STRING_LEN, - "HR:%d (quality:%d)", e->hrm.bpm.bpm, e->hrm.bpm.quality); + snprintf(app_data->bpm_string, BPM_STRING_LEN, "HR:%d (quality:%d)", e->hrm.bpm.bpm, + e->hrm.bpm.quality); } else if (e->hrm.event_type == HRMEvent_SpO2) { - snprintf(app_data->spo2_string, SPO2_STRING_LEN, - "SpO2:%d (quality:%d)", e->hrm.spo2.percent, e->hrm.spo2.quality); + snprintf(app_data->spo2_string, SPO2_STRING_LEN, "SpO2:%d (quality:%d)", e->hrm.spo2.percent, + e->hrm.spo2.quality); } layer_mark_dirty(&app_data->window.layer); @@ -92,23 +92,23 @@ static void prv_handle_init(void) { layer_add_child(&window->layer, &bpm->layer); TextLayer *spo2 = &data->spo2_text_layer; - text_layer_init(spo2, - &GRect(5, 120, window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 120)); + text_layer_init( + spo2, &GRect(5, 120, window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 120)); text_layer_set_font(spo2, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); text_layer_set_text_alignment(spo2, GTextAlignmentCenter); text_layer_set_text(spo2, data->spo2_string); layer_add_child(&window->layer, &spo2->layer); data->hrm_event_info = (EventServiceInfo){ - .type = PEBBLE_HRM_EVENT, - .handler = prv_handle_hrm_data, + .type = PEBBLE_HRM_EVENT, + .handler = prv_handle_hrm_data, }; event_service_client_subscribe(&data->hrm_event_info); // Use app data as session ref - AppInstallId app_id = 1; - data->hrm_session = sys_hrm_manager_app_subscribe(app_id, 1, SECONDS_PER_HOUR, - HRMFeature_BPM | HRMFeature_SpO2); + AppInstallId app_id = 1; + data->hrm_session = + sys_hrm_manager_app_subscribe(app_id, 1, SECONDS_PER_HOUR, HRMFeature_BPM | HRMFeature_SpO2); app_window_stack_push(window, true); } @@ -130,12 +130,12 @@ static void prv_main(void) { prv_handle_deinit(); } -const PebbleProcessMd* mfg_hrm_app_get_info(void) { +const PebbleProcessMd *mfg_hrm_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &prv_main, - .name = "MfgHRM", + .common.main_func = &prv_main, + .name = "MfgHRM", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } -#endif // CONFIG_HRM +#endif // CONFIG_HRM diff --git a/src/fw/apps/prf/mfg_hrm.h b/src/fw/apps/prf/mfg_hrm.h index fe2285aa82..05d396f913 100644 --- a/src/fw/apps/prf/mfg_hrm.h +++ b/src/fw/apps/prf/mfg_hrm.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_hrm_app_get_info(void); +const PebbleProcessMd *mfg_hrm_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_hrm_ctr_leakage_obelix.c b/src/fw/apps/prf/mfg_hrm_ctr_leakage_obelix.c index 62b7ac07f1..d5865f5c1a 100644 --- a/src/fw/apps/prf/mfg_hrm_ctr_leakage_obelix.c +++ b/src/fw/apps/prf/mfg_hrm_ctr_leakage_obelix.c @@ -36,18 +36,18 @@ #define LEAKAGE_STRING_LEN 128 #define RESULT_DISPLAY_MS 1000 -#define PPG_GR_CTR_THS0 (423.0f) -#define PPG_GR_CTR_THS1 (441.0f) -#define PPG_IR_CTR_THS0 (339.0f) -#define PPG_IR_CTR_THS1 (336.0f) -#define PPG_RED_CTR_THS0 (564.0f) -#define PPG_RED_CTR_THS1 (597.0f) -#define PPG_GR_LEAK_THS0 (1.87f) -#define PPG_GR_LEAK_THS1 (2.4f) -#define PPG_IR_LEAK_THS0 (10.2f) -#define PPG_IR_LEAK_THS1 (9.8f) -#define PPG_RED_LEAK_THS0 (7.0f) -#define PPG_RED_LEAK_THS1 (9.6f) +#define PPG_GR_CTR_THS0 (423.0f) +#define PPG_GR_CTR_THS1 (441.0f) +#define PPG_IR_CTR_THS0 (339.0f) +#define PPG_IR_CTR_THS1 (336.0f) +#define PPG_RED_CTR_THS0 (564.0f) +#define PPG_RED_CTR_THS1 (597.0f) +#define PPG_GR_LEAK_THS0 (1.87f) +#define PPG_GR_LEAK_THS1 (2.4f) +#define PPG_IR_LEAK_THS0 (10.2f) +#define PPG_IR_LEAK_THS1 (9.8f) +#define PPG_RED_LEAK_THS0 (7.0f) +#define PPG_RED_LEAK_THS1 (9.6f) typedef enum { TestMode_NULL, @@ -55,7 +55,7 @@ typedef enum { TestMode_Leakage, TestMode_Algo_HR, TestMode_Algo_SPO2, -}HRMTestMode; +} HRMTestMode; typedef struct { Window window; @@ -84,61 +84,66 @@ static void prv_handle_hrm_data(PebbleEvent *e, void *context) { if (e->type == PEBBLE_HRM_EVENT) { if (app_data->test_mode >= TestMode_Algo_HR) { if (e->hrm.event_type == HRMEvent_BPM) { - snprintf(app_data->status_string, STATUS_STRING_LEN, "HR Sampling... %d", HRM->state->is_wear); + snprintf(app_data->status_string, STATUS_STRING_LEN, "HR Sampling... %d", + HRM->state->is_wear); memset(app_data->ctr_string, 0, CTR_STRING_LEN); - snprintf(app_data->ctr_string, CTR_STRING_LEN, "HR:%d Q:%d", e->hrm.bpm.bpm, e->hrm.bpm.quality); + snprintf(app_data->ctr_string, CTR_STRING_LEN, "HR:%d Q:%d", e->hrm.bpm.bpm, + e->hrm.bpm.quality); PBL_LOG_DBG("%s", app_data->ctr_string); } else if (e->hrm.event_type == HRMEvent_SpO2) { - snprintf(app_data->status_string, STATUS_STRING_LEN, "SPO2 Sampling... %d", HRM->state->is_wear); + snprintf(app_data->status_string, STATUS_STRING_LEN, "SPO2 Sampling... %d", + HRM->state->is_wear); memset(app_data->leak_string, 0, LEAKAGE_STRING_LEN); - snprintf(app_data->leak_string, CTR_STRING_LEN, "SPO2:%d Q:%d", e->hrm.spo2.percent, e->hrm.spo2.quality); + snprintf(app_data->leak_string, CTR_STRING_LEN, "SPO2:%d Q:%d", e->hrm.spo2.percent, + e->hrm.spo2.quality); PBL_LOG_DBG("%s", app_data->leak_string); } - } - else { + } else { if (e->hrm.event_type == HRMEvent_CTR) { - bool rst = (e->hrm.ctr->ctr[0] >= PPG_GR_CTR_THS0) && (e->hrm.ctr->ctr[1] >= PPG_GR_CTR_THS1) - && (e->hrm.ctr->ctr[2] >= PPG_IR_CTR_THS0) && (e->hrm.ctr->ctr[3] >= PPG_IR_CTR_THS1) - && (e->hrm.ctr->ctr[4] >= PPG_RED_CTR_THS0) && (e->hrm.ctr->ctr[5] >= PPG_RED_CTR_THS1); + bool rst = + (e->hrm.ctr->ctr[0] >= PPG_GR_CTR_THS0) && (e->hrm.ctr->ctr[1] >= PPG_GR_CTR_THS1) && + (e->hrm.ctr->ctr[2] >= PPG_IR_CTR_THS0) && (e->hrm.ctr->ctr[3] >= PPG_IR_CTR_THS1) && + (e->hrm.ctr->ctr[4] >= PPG_RED_CTR_THS0) && (e->hrm.ctr->ctr[5] >= PPG_RED_CTR_THS1); app_data->ctr_received = true; app_data->ctr_passed = rst; memset(app_data->ctr_string, 0, CTR_STRING_LEN); snprintf(app_data->ctr_string, CTR_STRING_LEN, - "CTR:(%s)\n%4d.%02d %4d.%02d %4d.%02d\n%4d.%02d %4d.%02d %4d.%02d", - rst?"PASS":"FAILED", - (int)e->hrm.ctr->ctr[0], (int)(e->hrm.ctr->ctr[0]*100)%100, - (int)e->hrm.ctr->ctr[2], (int)(e->hrm.ctr->ctr[2]*100)%100, - (int)e->hrm.ctr->ctr[4], (int)(e->hrm.ctr->ctr[4]*100)%100, - (int)e->hrm.ctr->ctr[1], (int)(e->hrm.ctr->ctr[1]*100)%100, - (int)e->hrm.ctr->ctr[3], (int)(e->hrm.ctr->ctr[3]*100)%100, - (int)e->hrm.ctr->ctr[5], (int)(e->hrm.ctr->ctr[5]*100)%100); + "CTR:(%s)\n%4d.%02d %4d.%02d %4d.%02d\n%4d.%02d %4d.%02d %4d.%02d", + rst ? "PASS" : "FAILED", (int)e->hrm.ctr->ctr[0], + (int)(e->hrm.ctr->ctr[0] * 100) % 100, (int)e->hrm.ctr->ctr[2], + (int)(e->hrm.ctr->ctr[2] * 100) % 100, (int)e->hrm.ctr->ctr[4], + (int)(e->hrm.ctr->ctr[4] * 100) % 100, (int)e->hrm.ctr->ctr[1], + (int)(e->hrm.ctr->ctr[1] * 100) % 100, (int)e->hrm.ctr->ctr[3], + (int)(e->hrm.ctr->ctr[3] * 100) % 100, (int)e->hrm.ctr->ctr[5], + (int)(e->hrm.ctr->ctr[5] * 100) % 100); PBL_LOG_DBG("%s", app_data->ctr_string); } else if (e->hrm.event_type == HRMEvent_Leakage) { - bool rst = (e->hrm.leakage->leakage[0] <= PPG_GR_LEAK_THS0) && (e->hrm.leakage->leakage[1] <= PPG_GR_LEAK_THS1) - && (e->hrm.leakage->leakage[2] <= PPG_IR_LEAK_THS0) && (e->hrm.leakage->leakage[3] <= PPG_IR_LEAK_THS1) - && (e->hrm.leakage->leakage[4] <= PPG_RED_LEAK_THS0) && (e->hrm.leakage->leakage[5] <= PPG_RED_LEAK_THS1); + bool rst = (e->hrm.leakage->leakage[0] <= PPG_GR_LEAK_THS0) && + (e->hrm.leakage->leakage[1] <= PPG_GR_LEAK_THS1) && + (e->hrm.leakage->leakage[2] <= PPG_IR_LEAK_THS0) && + (e->hrm.leakage->leakage[3] <= PPG_IR_LEAK_THS1) && + (e->hrm.leakage->leakage[4] <= PPG_RED_LEAK_THS0) && + (e->hrm.leakage->leakage[5] <= PPG_RED_LEAK_THS1); app_data->leak_received = true; app_data->leak_passed = rst; memset(app_data->leak_string, 0, LEAKAGE_STRING_LEN); snprintf(app_data->leak_string, LEAKAGE_STRING_LEN, - "Leak:(%s)\n%4d.%02d %4d.%02d %4d.%02d\n%4d.%02d %4d.%02d %4d.%02d", - rst?"PASS":"FAILED", - (int)e->hrm.leakage->leakage[0], (int)(e->hrm.leakage->leakage[0]*100)%100, - (int)e->hrm.leakage->leakage[2], (int)(e->hrm.leakage->leakage[2]*100)%100, - (int)e->hrm.leakage->leakage[4], (int)(e->hrm.leakage->leakage[4]*100)%100, - (int)e->hrm.leakage->leakage[1], (int)(e->hrm.leakage->leakage[1]*100)%100, - (int)e->hrm.leakage->leakage[3], (int)(e->hrm.leakage->leakage[3]*100)%100, - (int)e->hrm.leakage->leakage[5], (int)(e->hrm.leakage->leakage[5]*100)%100); + "Leak:(%s)\n%4d.%02d %4d.%02d %4d.%02d\n%4d.%02d %4d.%02d %4d.%02d", + rst ? "PASS" : "FAILED", (int)e->hrm.leakage->leakage[0], + (int)(e->hrm.leakage->leakage[0] * 100) % 100, (int)e->hrm.leakage->leakage[2], + (int)(e->hrm.leakage->leakage[2] * 100) % 100, (int)e->hrm.leakage->leakage[4], + (int)(e->hrm.leakage->leakage[4] * 100) % 100, (int)e->hrm.leakage->leakage[1], + (int)(e->hrm.leakage->leakage[1] * 100) % 100, (int)e->hrm.leakage->leakage[3], + (int)(e->hrm.leakage->leakage[3] * 100) % 100, (int)e->hrm.leakage->leakage[5], + (int)(e->hrm.leakage->leakage[5] * 100) % 100); PBL_LOG_DBG("%s", app_data->leak_string); } // When both CTR and leakage results are in, report and start close timer - if (app_data->ctr_received && app_data->leak_received && - app_data->result_start_time == 0) { + if (app_data->ctr_received && app_data->leak_received && app_data->result_start_time == 0) { bool passed = app_data->ctr_passed && app_data->leak_passed; mfg_test_result_report(MfgTestId_HrmCtrLeakage, passed, 0); - snprintf(app_data->status_string, STATUS_STRING_LEN, - passed ? "PASS" : "FAIL"); + snprintf(app_data->status_string, STATUS_STRING_LEN, passed ? "PASS" : "FAIL"); app_data->result_start_time = rtc_get_ticks(); } } @@ -161,7 +166,7 @@ static void prv_result_timer_callback(void *cb_data) { app_timer_register(100, prv_result_timer_callback, NULL); } -static void prv_update_status(void* param) { +static void prv_update_status(void *param) { layer_mark_dirty((Layer *)param); } @@ -174,7 +179,7 @@ static void prv_select_click_handler(ClickRecognizerRef recognizer, void *data) snprintf(app_data->status_string, STATUS_STRING_LEN, "CTR Sampling..."); // Start polling timer for result display timeout app_timer_register(100, prv_result_timer_callback, NULL); - } else if(app_data->test_mode != TestMode_Leakage){ + } else if (app_data->test_mode != TestMode_Leakage) { gh3x2x_start_ft_leakage(); app_data->test_mode = TestMode_Leakage; snprintf(app_data->status_string, STATUS_STRING_LEN, "Leak Sampling..."); @@ -185,7 +190,7 @@ static void prv_select_click_handler(ClickRecognizerRef recognizer, void *data) static void prv_down_click_handler(ClickRecognizerRef recognizer, void *data) { AppData *app_data = app_state_get_user_data(); - + if (app_data->test_mode != TestMode_Algo_HR) { snprintf(app_data->status_string, STATUS_STRING_LEN, "HR Sampling..."); gh3x2x_set_work_mode(GH3X2X_FUNCTION_HR); @@ -195,18 +200,18 @@ static void prv_down_click_handler(ClickRecognizerRef recognizer, void *data) { gh3x2x_set_work_mode(GH3X2X_FUNCTION_SPO2); app_data->test_mode = TestMode_Algo_SPO2; } - + snprintf(app_data->ctr_string, CTR_STRING_LEN, "HR: Q:"); snprintf(app_data->leak_string, LEAKAGE_STRING_LEN, "SPO2: Q:"); event_service_client_unsubscribe(&app_data->hrm_event_info); sys_hrm_manager_unsubscribe(app_data->hrm_session); - //let sensor sleep by waiting 50ms + // let sensor sleep by waiting 50ms psleep(50); event_service_client_subscribe(&app_data->hrm_event_info); // Use app data as session ref - AppInstallId app_id = 1; - app_data->hrm_session = sys_hrm_manager_app_subscribe(app_id, 1, SECONDS_PER_HOUR, - HRMFeature_BPM | HRMFeature_SpO2); + AppInstallId app_id = 1; + app_data->hrm_session = + sys_hrm_manager_app_subscribe(app_id, 1, SECONDS_PER_HOUR, HRMFeature_BPM | HRMFeature_SpO2); app_timer_register(10, prv_update_status, &app_data->window.layer); } @@ -246,29 +251,29 @@ static void prv_handle_init(void) { layer_add_child(&window->layer, &status->layer); TextLayer *leak = &data->leak_text_layer; - text_layer_init(leak, - &GRect(5, 60, window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 140)); + text_layer_init( + leak, &GRect(5, 60, window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 140)); text_layer_set_font(leak, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); text_layer_set_text_alignment(leak, GTextAlignmentCenter); text_layer_set_text(leak, data->leak_string); layer_add_child(&window->layer, &leak->layer); TextLayer *ctr = &data->ctr_text_layer; - text_layer_init(ctr, - &GRect(5, 140, window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 60)); + text_layer_init( + ctr, &GRect(5, 140, window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 60)); text_layer_set_font(ctr, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); text_layer_set_text_alignment(ctr, GTextAlignmentCenter); text_layer_set_text(ctr, data->ctr_string); layer_add_child(&window->layer, &ctr->layer); data->hrm_event_info = (EventServiceInfo){ - .type = PEBBLE_HRM_EVENT, - .handler = prv_handle_hrm_data, + .type = PEBBLE_HRM_EVENT, + .handler = prv_handle_hrm_data, }; event_service_client_subscribe(&data->hrm_event_info); // Use app data as session ref - AppInstallId app_id = 1; + AppInstallId app_id = 1; data->hrm_session = sys_hrm_manager_app_subscribe(app_id, 1, SECONDS_PER_HOUR, HRMFeature_CTR | HRMFeature_Leakage); @@ -292,10 +297,10 @@ static void prv_main(void) { prv_handle_deinit(); } -const PebbleProcessMd* mfg_hrm_ctr_leakage_obelix_app_get_info(void) { +const PebbleProcessMd *mfg_hrm_ctr_leakage_obelix_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &prv_main, - .name = "MfgHRMCTRLeakageObelix", + .common.main_func = &prv_main, + .name = "MfgHRMCTRLeakageObelix", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_hrm_ctr_leakage_obelix.h b/src/fw/apps/prf/mfg_hrm_ctr_leakage_obelix.h index 599a1f5c26..4c24e63f8e 100644 --- a/src/fw/apps/prf/mfg_hrm_ctr_leakage_obelix.h +++ b/src/fw/apps/prf/mfg_hrm_ctr_leakage_obelix.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_hrm_ctr_leakage_obelix_app_get_info(void); +const PebbleProcessMd *mfg_hrm_ctr_leakage_obelix_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_info_qr.c b/src/fw/apps/prf/mfg_info_qr.c index 5988793f3b..dbcea033e1 100644 --- a/src/fw/apps/prf/mfg_info_qr.c +++ b/src/fw/apps/prf/mfg_info_qr.c @@ -30,26 +30,26 @@ typedef struct { static const ColorTable s_color_table[] = { #ifdef CONFIG_BOARD_ASTERIX - { .color = WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK, .short_name = "BK" }, - { .color = WATCH_INFO_COLOR_COREDEVICES_P2D_WHITE, .short_name = "WH" }, + {.color = WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK, .short_name = "BK"}, + {.color = WATCH_INFO_COLOR_COREDEVICES_P2D_WHITE, .short_name = "WH"}, #elif defined(CONFIG_BOARD_OBELIX) - { .color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY, .short_name = "BG" }, - { .color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_RED, .short_name = "BR" }, - { .color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_BLUE, .short_name = "SB" }, - { .color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_GREY, .short_name = "SG" }, + {.color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY, .short_name = "BG"}, + {.color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_RED, .short_name = "BR"}, + {.color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_BLUE, .short_name = "SB"}, + {.color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_GREY, .short_name = "SG"}, #elif defined(CONFIG_BOARD_GETAFIX) - { .color = WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20, .short_name = "BK20" }, - { .color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14, .short_name = "SV14" }, - { .color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20, .short_name = "SV20" }, - { .color = WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14, .short_name = "GD14" }, + {.color = WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20, .short_name = "BK20"}, + {.color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14, .short_name = "SV14"}, + {.color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20, .short_name = "SV20"}, + {.color = WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14, .short_name = "GD14"}, #endif }; -static const char* prv_get_color_short_name(WatchInfoColor color) { +static const char *prv_get_color_short_name(WatchInfoColor color) { // Pointer-based iteration so an empty table (boards with no color list) // compiles without a `< 0` unsigned comparison warning. - for (const ColorTable *entry = s_color_table; - entry < s_color_table + ARRAY_LENGTH(s_color_table); entry++) { + for (const ColorTable *entry = s_color_table; entry < s_color_table + ARRAY_LENGTH(s_color_table); + entry++) { if (entry->color == color) { return entry->short_name; } @@ -92,30 +92,27 @@ static void prv_handle_init(void) { const char *color_short_name = prv_get_color_short_name(watch_color); // Build QR code string - snprintf(data->qr_buffer, sizeof(data->qr_buffer), - "%s;%s;%s;%u;%u;%s", - serial_number, data->bt_mac_buffer, GIT_TAG, battery_mv, battery_pct, color_short_name); + snprintf(data->qr_buffer, sizeof(data->qr_buffer), "%s;%s;%s;%u;%u;%s", serial_number, + data->bt_mac_buffer, GIT_TAG, battery_mv, battery_pct, color_short_name); - QRCode* qr_code = &data->qr_code; - qr_code_init_with_parameters(qr_code, + QRCode *qr_code = &data->qr_code; + qr_code_init_with_parameters( + qr_code, #if PBL_ROUND #define QR_CODE_SIZE ((window->layer.bounds.size.w * 10) / 14) - &GRect((window->layer.bounds.size.w - QR_CODE_SIZE) / 2, - (window->layer.bounds.size.h - QR_CODE_SIZE) / 2, - QR_CODE_SIZE, QR_CODE_SIZE), + &GRect((window->layer.bounds.size.w - QR_CODE_SIZE) / 2, + (window->layer.bounds.size.h - QR_CODE_SIZE) / 2, QR_CODE_SIZE, QR_CODE_SIZE), #else - &GRect(10, 10, window->layer.bounds.size.w - 20, - window->layer.bounds.size.h - 30), + &GRect(10, 10, window->layer.bounds.size.w - 20, window->layer.bounds.size.h - 30), #endif - data->qr_buffer, strlen(data->qr_buffer), QRCodeECCMedium, - GColorBlack, GColorWhite); + data->qr_buffer, strlen(data->qr_buffer), QRCodeECCMedium, GColorBlack, GColorWhite); layer_add_child(&window->layer, &qr_code->layer); - TextLayer* serial = &data->serial; + TextLayer *serial = &data->serial; text_layer_init_with_parameters(serial, &GRect(0, window->layer.bounds.size.h - PBL_IF_RECT_ELSE(20, 40), window->layer.bounds.size.w, 20), - data->serial_buffer, fonts_get_system_font(FONT_KEY_GOTHIC_14), + data->serial_buffer, fonts_get_system_font(FONT_KEY_GOTHIC_14), GColorBlack, GColorWhite, GTextAlignmentCenter, GTextOverflowModeTrailingEllipsis); layer_add_child(&window->layer, &serial->layer); @@ -129,13 +126,14 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* mfg_info_qr_app_get_info(void) { +const PebbleProcessMd *mfg_info_qr_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: 4f8a2d3e-1c5b-4a9f-8e7d-6c3b2a1f0e9d - .common.uuid = { 0x4f, 0x8a, 0x2d, 0x3e, 0x1c, 0x5b, 0x4a, 0x9f, - 0x8e, 0x7d, 0x6c, 0x3b, 0x2a, 0x1f, 0x0e, 0x9d }, - .name = "MfgInfoQR", + .common.main_func = &s_main, + // UUID: 4f8a2d3e-1c5b-4a9f-8e7d-6c3b2a1f0e9d + .common.uuid = + {0x4f, 0x8a, 0x2d, 0x3e, 0x1c, 0x5b, 0x4a, 0x9f, 0x8e, 0x7d, 0x6c, 0x3b, 0x2a, 0x1f, 0x0e, + 0x9d}, + .name = "MfgInfoQR", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_info_qr.h b/src/fw/apps/prf/mfg_info_qr.h index e19df97210..a293fd5447 100644 --- a/src/fw/apps/prf/mfg_info_qr.h +++ b/src/fw/apps/prf/mfg_info_qr.h @@ -1,9 +1,8 @@ /* SPDX-FileCopyrightText: 2025 Core Devices LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #pragma once #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_info_qr_app_get_info(void); +const PebbleProcessMd *mfg_info_qr_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_mag.c b/src/fw/apps/prf/mfg_mag.c index bcb631c5b7..a139f82de7 100644 --- a/src/fw/apps/prf/mfg_mag.c +++ b/src/fw/apps/prf/mfg_mag.c @@ -91,12 +91,18 @@ static void prv_update_display(void *context) { data->min_y = data->max_y = sample.y; data->min_z = data->max_z = sample.z; } else { - if (sample.x < data->min_x) data->min_x = sample.x; - if (sample.x > data->max_x) data->max_x = sample.x; - if (sample.y < data->min_y) data->min_y = sample.y; - if (sample.y > data->max_y) data->max_y = sample.y; - if (sample.z < data->min_z) data->min_z = sample.z; - if (sample.z > data->max_z) data->max_z = sample.z; + if (sample.x < data->min_x) + data->min_x = sample.x; + if (sample.x > data->max_x) + data->max_x = sample.x; + if (sample.y < data->min_y) + data->min_y = sample.y; + if (sample.y > data->max_y) + data->max_y = sample.y; + if (sample.z < data->min_z) + data->min_z = sample.z; + if (sample.z > data->max_z) + data->max_z = sample.z; } data->sample_count++; diff --git a/src/fw/apps/prf/mfg_mag.h b/src/fw/apps/prf/mfg_mag.h index a6c8cf192a..d0b4f21975 100644 --- a/src/fw/apps/prf/mfg_mag.h +++ b/src/fw/apps/prf/mfg_mag.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_mag_app_get_info(void); +const PebbleProcessMd *mfg_mag_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_menu.c b/src/fw/apps/prf/mfg_menu.c index 9a9f7b7ff5..5f16f65a3d 100644 --- a/src/fw/apps/prf/mfg_menu.c +++ b/src/fw/apps/prf/mfg_menu.c @@ -42,29 +42,29 @@ static const PebbleProcessMd *s_last_test_menu = NULL; //! Callback to run from the kernel main task static void prv_launch_app_cb(void *data) { - app_manager_launch_new_app(&(AppLaunchConfig) { .md = data }); + app_manager_launch_new_app(&(AppLaunchConfig){.md = data}); } static void prv_select_info_qr(int index, void *context) { - launcher_task_add_callback(prv_launch_app_cb, (void*) mfg_info_qr_app_get_info()); + launcher_task_add_callback(prv_launch_app_cb, (void *)mfg_info_qr_app_get_info()); } static void prv_select_tests_sf(int index, void *context) { s_last_test_menu = mfg_test_menu_semi_finished_app_get_info(); - launcher_task_add_callback(prv_launch_app_cb, (void*) s_last_test_menu); + launcher_task_add_callback(prv_launch_app_cb, (void *)s_last_test_menu); } static void prv_select_tests_fi(int index, void *context) { s_last_test_menu = mfg_test_menu_finished_app_get_info(); - launcher_task_add_callback(prv_launch_app_cb, (void*) s_last_test_menu); + launcher_task_add_callback(prv_launch_app_cb, (void *)s_last_test_menu); } static void prv_select_aging(int index, void *context) { - launcher_task_add_callback(prv_launch_app_cb, (void*) mfg_test_aging_app_get_info()); + launcher_task_add_callback(prv_launch_app_cb, (void *)mfg_test_aging_app_get_info()); } static void prv_select_ble_adv(int index, void *context) { - launcher_task_add_callback(prv_launch_app_cb, (void*) mfg_adv_app_get_info()); + launcher_task_add_callback(prv_launch_app_cb, (void *)mfg_adv_app_get_info()); } static void prv_select_reset(int index, void *context) { @@ -72,7 +72,7 @@ static void prv_select_reset(int index, void *context) { } static void prv_select_utilities(int index, void *context) { - launcher_task_add_callback(prv_launch_app_cb, (void*) mfg_utilities_app_get_info()); + launcher_task_add_callback(prv_launch_app_cb, (void *)mfg_utilities_app_get_info()); } static void prv_select_shutdown(int index, void *context) { @@ -118,8 +118,8 @@ static void prv_select_load_prf(int index, void *context) { static void prv_update_device_info_subtitle(MfgMenuAppData *data, uint8_t charge_percent) { char serial[MFG_SERIAL_NUMBER_SIZE + 1]; mfg_info_get_serialnumber(serial, sizeof(serial)); - sniprintf(data->device_info_subtitle, sizeof(data->device_info_subtitle), - "%s - %"PRIu8"%%", serial, charge_percent); + sniprintf(data->device_info_subtitle, sizeof(data->device_info_subtitle), "%s - %" PRIu8 "%%", + serial, charge_percent); } static void prv_battery_state_handler(BatteryChargeState charge) { @@ -129,21 +129,20 @@ static void prv_battery_state_handler(BatteryChargeState charge) { } //! @param[out] out_menu_items -static size_t prv_create_menu_items(SimpleMenuItem** out_menu_items) { - +static size_t prv_create_menu_items(SimpleMenuItem **out_menu_items) { // Define a const blueprint on the stack. const SimpleMenuItem s_menu_items[] = { - { .title = "Device Info", .callback = prv_select_info_qr }, - { .title = "Semi-finished Tests", .callback = prv_select_tests_sf }, - { .title = "Finished Tests", .callback = prv_select_tests_fi }, - { .title = "Aging Test", .callback = prv_select_aging }, - { .title = "BLE Advertising", .callback = prv_select_ble_adv }, - { .title = "Shutdown", .callback = prv_select_shutdown }, - { .title = "Reset", .callback = prv_select_reset }, + {.title = "Device Info", .callback = prv_select_info_qr}, + {.title = "Semi-finished Tests", .callback = prv_select_tests_sf}, + {.title = "Finished Tests", .callback = prv_select_tests_fi}, + {.title = "Aging Test", .callback = prv_select_aging}, + {.title = "BLE Advertising", .callback = prv_select_ble_adv}, + {.title = "Shutdown", .callback = prv_select_shutdown}, + {.title = "Reset", .callback = prv_select_reset}, #ifdef CONFIG_MFG - { .title = "Load PRF", .callback = prv_select_load_prf }, + {.title = "Load PRF", .callback = prv_select_load_prf}, #endif - { .title = "Utilities", .callback = prv_select_utilities }, + {.title = "Utilities", .callback = prv_select_utilities}, }; // Copy it into the heap so we can modify it. @@ -161,7 +160,7 @@ static void prv_window_load(Window *window) { Layer *window_layer = window_get_root_layer(data->window); GRect bounds = window_layer->bounds; - SimpleMenuItem* menu_items; + SimpleMenuItem *menu_items; size_t num_items = prv_create_menu_items(&menu_items); // Set initial subtitle with serial and battery % @@ -169,10 +168,7 @@ static void prv_window_load(Window *window) { prv_update_device_info_subtitle(data, charge.charge_percent); menu_items[0].subtitle = data->device_info_subtitle; - data->menu_section = (SimpleMenuSection) { - .num_items = num_items, - .items = menu_items - }; + data->menu_section = (SimpleMenuSection){.num_items = num_items, .items = menu_items}; data->menu_layer = simple_menu_layer_create(bounds, data->window, &data->menu_section, 1, NULL); layer_add_child(window_layer, simple_menu_layer_get_layer(data->menu_layer)); @@ -186,7 +182,7 @@ static void prv_window_load(Window *window) { static void s_main(void) { // If returning from a submenu item, relaunch the appropriate submenu if (mfg_test_menu_should_relaunch() && s_last_test_menu) { - launcher_task_add_callback(prv_launch_app_cb, (void*) s_last_test_menu); + launcher_task_add_callback(prv_launch_app_cb, (void *)s_last_test_menu); } bt_pairability_use(); @@ -198,9 +194,9 @@ static void s_main(void) { data->window = window_create(); window_init(data->window, ""); - window_set_window_handlers(data->window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(data->window, &(WindowHandlers){ + .load = prv_window_load, + }); window_set_overrides_back_button(data->window, true); window_set_fullscreen(data->window, true); app_window_stack_push(data->window, true /*animated*/); @@ -212,14 +208,14 @@ static void s_main(void) { s_menu_position = simple_menu_layer_get_selected_index(data->menu_layer); } -const PebbleProcessMd* mfg_menu_app_get_info(void) { +const PebbleProcessMd *mfg_menu_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: ddfdf403-664e-47dd-a620-b1a14ce2b59b - .common.uuid = { 0xdd, 0xfd, 0xf4, 0x03, 0x66, 0x4e, 0x47, 0xdd, - 0xa6, 0x20, 0xb1, 0xa1, 0x4c, 0xe2, 0xb5, 0x9b }, - .name = "MfgMenu", + .common.main_func = &s_main, + // UUID: ddfdf403-664e-47dd-a620-b1a14ce2b59b + .common.uuid = + {0xdd, 0xfd, 0xf4, 0x03, 0x66, 0x4e, 0x47, 0xdd, 0xa6, 0x20, 0xb1, 0xa1, 0x4c, 0xe2, 0xb5, + 0x9b}, + .name = "MfgMenu", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/prf/mfg_menu.h b/src/fw/apps/prf/mfg_menu.h index 7d2b7d03e0..e8962e3b93 100644 --- a/src/fw/apps/prf/mfg_menu.h +++ b/src/fw/apps/prf/mfg_menu.h @@ -5,5 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_menu_app_get_info(void); - +const PebbleProcessMd *mfg_menu_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_mic_asterix.c b/src/fw/apps/prf/mfg_mic_asterix.c index 1cd9ada2c4..5b8b78ad3e 100644 --- a/src/fw/apps/prf/mfg_mic_asterix.c +++ b/src/fw/apps/prf/mfg_mic_asterix.c @@ -26,44 +26,44 @@ #define DUMP_RECORDING_DBGSERIAL 0 #define PLAY_SINEWAVE 0 -#define DA7212_PLL_STATUS 0x03 -#define DA7212_CIF_CTRL 0x1D -#define DA7212_DIG_ROUTING_DAI 0x21 -#define DA7212_SR 0x22 -#define DA7212_REFERENCES 0x23 -#define DA7212_PLL_FRAC_TOP 0x24 -#define DA7212_PLL_FRAC_BOT 0x25 -#define DA7212_PLL_INTEGER 0x26 -#define DA7212_PLL_CTRL 0x27 -#define DA7212_DAI_CLK_MODE 0x28 -#define DA7212_DAI_CTRL 0x29 -#define DA7212_DIG_ROUTING_DAC 0x2A -#define DA7212_DAC_FILTERS5 0x40 -#define DA7212_DAC_R_GAIN 0x46 -#define DA7212_LINE_GAIN 0x4A -#define DA7212_MIXOUT_R_SELECT 0x4C -#define DA7212_SYSTEM_MODES_OUTPUT 0x51 -#define DA7212_DAC_R_CTRL 0x6A -#define DA7212_LINE_CTRL 0x6D -#define DA7212_MIXOUT_R_CTRL 0x6F -#define DA7212_LDO_CTRL 0x90 -#define DA7212_GAIN_RAMP_CTRL 0x92 -#define DA7212_TONE_GEN_CFG1 0xB4 -#define DA7212_TONE_GEN_CYCLES 0xB6 -#define DA7212_TONE_GEN_ON_PER 0xBB -#define DA7212_SYSTEM_ACTIVE 0xFD - -#define RECORDING_MS 3000 -#define SAMPLE_RATE_HZ 16000 -#define SAMPLE_BITS 16 -#define CAPTURE_MS 100 -#define N_CHANNELS 2 -#define N_SAMPLES (N_CHANNELS * ((SAMPLE_RATE_HZ * CAPTURE_MS) / 1000)) +#define DA7212_PLL_STATUS 0x03 +#define DA7212_CIF_CTRL 0x1D +#define DA7212_DIG_ROUTING_DAI 0x21 +#define DA7212_SR 0x22 +#define DA7212_REFERENCES 0x23 +#define DA7212_PLL_FRAC_TOP 0x24 +#define DA7212_PLL_FRAC_BOT 0x25 +#define DA7212_PLL_INTEGER 0x26 +#define DA7212_PLL_CTRL 0x27 +#define DA7212_DAI_CLK_MODE 0x28 +#define DA7212_DAI_CTRL 0x29 +#define DA7212_DIG_ROUTING_DAC 0x2A +#define DA7212_DAC_FILTERS5 0x40 +#define DA7212_DAC_R_GAIN 0x46 +#define DA7212_LINE_GAIN 0x4A +#define DA7212_MIXOUT_R_SELECT 0x4C +#define DA7212_SYSTEM_MODES_OUTPUT 0x51 +#define DA7212_DAC_R_CTRL 0x6A +#define DA7212_LINE_CTRL 0x6D +#define DA7212_MIXOUT_R_CTRL 0x6F +#define DA7212_LDO_CTRL 0x90 +#define DA7212_GAIN_RAMP_CTRL 0x92 +#define DA7212_TONE_GEN_CFG1 0xB4 +#define DA7212_TONE_GEN_CYCLES 0xB6 +#define DA7212_TONE_GEN_ON_PER 0xBB +#define DA7212_SYSTEM_ACTIVE 0xFD + +#define RECORDING_MS 3000 +#define SAMPLE_RATE_HZ 16000 +#define SAMPLE_BITS 16 +#define CAPTURE_MS 100 +#define N_CHANNELS 2 +#define N_SAMPLES (N_CHANNELS * ((SAMPLE_RATE_HZ * CAPTURE_MS) / 1000)) #define SAMPLE_SIZE_BYTES (SAMPLE_BITS / 8) -#define BLOCK_SIZE (N_SAMPLES * SAMPLE_SIZE_BYTES) +#define BLOCK_SIZE (N_SAMPLES * SAMPLE_SIZE_BYTES) -#define FLASH_START FLASH_REGION_FIRMWARE_DEST_BEGIN -#define FLASH_END FLASH_REGION_FIRMWARE_DEST_END +#define FLASH_START FLASH_REGION_FIRMWARE_DEST_BEGIN +#define FLASH_END FLASH_REGION_FIRMWARE_DEST_END #if !PLAY_SINEWAVE static int16_t s_buf[2][N_SAMPLES]; @@ -78,7 +78,7 @@ static nrfx_i2s_buffers_t s_i2s_bufs; #if !PLAY_SINEWAVE static const nrfx_pdm_t s_pdm = NRFX_PDM_INSTANCE(0); static nrfx_pdm_config_t s_pdm_cfg = - NRFX_PDM_DEFAULT_CONFIG(NRF_GPIO_PIN_MAP(1, 0), NRF_GPIO_PIN_MAP(0, 24)); + NRFX_PDM_DEFAULT_CONFIG(NRF_GPIO_PIN_MAP(1, 0), NRF_GPIO_PIN_MAP(0, 24)); #endif static const nrfx_i2s_t s_i2s = NRFX_I2S_INSTANCE(0); @@ -192,7 +192,8 @@ static void prv_codec_standby(void) { static void prv_data_handler(nrfx_i2s_buffers_t const *p_released, uint32_t status) { #if !PLAY_SINEWAVE - PBL_ASSERT(!(status == NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED && p_released == NULL), "I2S buffers re-used"); + PBL_ASSERT(!(status == NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED && p_released == NULL), + "I2S buffers re-used"); if (status == NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED) { s_i2s_bufs.p_tx_buffer = (uint32_t *)s_buf[s_buf_idx]; @@ -208,7 +209,7 @@ static void prv_data_handler(nrfx_i2s_buffers_t const *p_released, uint32_t stat } #if !PLAY_SINEWAVE -static void prv_pdm_evt_handler(nrfx_pdm_evt_t const * p_evt) { +static void prv_pdm_evt_handler(nrfx_pdm_evt_t const *p_evt) { PBL_ASSERT(p_evt->error == NRFX_PDM_NO_ERROR, "PDM overflow"); if (p_evt->buffer_requested) { @@ -271,7 +272,7 @@ static void prv_mic_capture(void) { } } dbgserial_putstr("E"); -#endif // DUMP_RECORDING_DBGSERIAL +#endif // DUMP_RECORDING_DBGSERIAL } #endif @@ -395,8 +396,9 @@ const PebbleProcessMd *mfg_mic_asterix_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { .common.main_func = &s_main, // UUID: 95ada1ce-04b3-46b0-8519-0b42260b5c39 - .common.uuid = {0x95, 0xad, 0xa1, 0xce, 0x04, 0xb3, 0x46, 0xb0, - 0x85, 0x19, 0x0b, 0x42, 0x26, 0x0b, 0x5c, 0x39}, + .common.uuid = + {0x95, 0xad, 0xa1, 0xce, 0x04, 0xb3, 0x46, 0xb0, 0x85, 0x19, 0x0b, 0x42, 0x26, 0x0b, 0x5c, + 0x39}, .name = "MfgMicAsterix", }; return (const PebbleProcessMd *)&s_app_info; diff --git a/src/fw/apps/prf/mfg_mic_asterix.h b/src/fw/apps/prf/mfg_mic_asterix.h index cc39658f3f..94841170a4 100644 --- a/src/fw/apps/prf/mfg_mic_asterix.h +++ b/src/fw/apps/prf/mfg_mic_asterix.h @@ -1,10 +1,8 @@ /* SPDX-FileCopyrightText: 2025 Core Devices LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #pragma once #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_mic_asterix_app_get_info(void); - +const PebbleProcessMd *mfg_mic_asterix_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_mic_getafix.c b/src/fw/apps/prf/mfg_mic_getafix.c index c89e431126..41f4596a6b 100644 --- a/src/fw/apps/prf/mfg_mic_getafix.c +++ b/src/fw/apps/prf/mfg_mic_getafix.c @@ -33,32 +33,32 @@ #include "os_support_custom.h" #include "kiss_fftr.h" -#define SAMPLE_RATE_HZ 16000 -#define RECORDING_DURATION_MS 1000 -#define SAMPLE_BITS 16 -#define FFT_SIZE 1024 -#define MAX_CHANNELS 2 -#define PCM_BUFFER_SIZE 1024 +#define SAMPLE_RATE_HZ 16000 +#define RECORDING_DURATION_MS 1000 +#define SAMPLE_BITS 16 +#define FFT_SIZE 1024 +#define MAX_CHANNELS 2 +#define PCM_BUFFER_SIZE 1024 // Calculate total samples and flash requirements -#define N_SAMPLES (MAX_CHANNELS * ((SAMPLE_RATE_HZ * RECORDING_DURATION_MS) / 1000)) -#define SAMPLE_SIZE_BYTES (SAMPLE_BITS / 8) -#define BLOCK_SIZE (N_SAMPLES * SAMPLE_SIZE_BYTES) +#define N_SAMPLES (MAX_CHANNELS * ((SAMPLE_RATE_HZ * RECORDING_DURATION_MS) / 1000)) +#define SAMPLE_SIZE_BYTES (SAMPLE_BITS / 8) +#define BLOCK_SIZE (N_SAMPLES * SAMPLE_SIZE_BYTES) -#define FLASH_START FLASH_REGION_FIRMWARE_DEST_BEGIN -#define FLASH_END (FLASH_REGION_FIRMWARE_DEST_BEGIN + \ - ROUND_TO_MOD_CEIL(BLOCK_SIZE, SUBSECTOR_SIZE_BYTES)) +#define FLASH_START FLASH_REGION_FIRMWARE_DEST_BEGIN +#define FLASH_END \ + (FLASH_REGION_FIRMWARE_DEST_BEGIN + ROUND_TO_MOD_CEIL(BLOCK_SIZE, SUBSECTOR_SIZE_BYTES)) // Target frequency: 1 kHz ± 100 Hz -#define TARGET_FREQ_HZ 1000 -#define FREQ_TOLERANCE_HZ 100 +#define TARGET_FREQ_HZ 1000 +#define FREQ_TOLERANCE_HZ 100 // Minimum peak magnitude threshold (to reject noise) -#define MIN_PEAK_MAGNITUDE 1000 +#define MIN_PEAK_MAGNITUDE 1000 -#define RESULT_DISPLAY_MS 1000 +#define RESULT_DISPLAY_MS 1000 -#define STATUS_STR_LEN 128 +#define STATUS_STR_LEN 128 typedef enum { TestState_Init, @@ -130,8 +130,8 @@ static int prv_find_peak_frequency(int16_t *samples, size_t sample_count) { // Frequency = (bin * sample_rate) / FFT_SIZE int peak_freq = (peak_bin * SAMPLE_RATE_HZ) / FFT_SIZE; - PBL_LOG_INFO("Peak found at bin %d, frequency %d Hz, magnitude %ld", - peak_bin, peak_freq, (long)max_magnitude); + PBL_LOG_INFO("Peak found at bin %d, frequency %d Hz, magnitude %ld", peak_bin, peak_freq, + (long)max_magnitude); // Clean up kernel_free(freq_data); @@ -187,28 +187,30 @@ static void prv_analyze_dual_mic(AppData *data) { } // Check if peaks are around target frequency - data->mic1_passed = data->mic1_passed || ((data->mic1_peak_freq > 0) && - (abs(data->mic1_peak_freq - TARGET_FREQ_HZ) <= FREQ_TOLERANCE_HZ)); + data->mic1_passed = + data->mic1_passed || ((data->mic1_peak_freq > 0) && + (abs(data->mic1_peak_freq - TARGET_FREQ_HZ) <= FREQ_TOLERANCE_HZ)); if (num_channels == 2) { - data->mic2_passed = data->mic2_passed || ((data->mic2_peak_freq > 0) && - (abs(data->mic2_peak_freq - TARGET_FREQ_HZ) <= FREQ_TOLERANCE_HZ)); + data->mic2_passed = + data->mic2_passed || ((data->mic2_peak_freq > 0) && + (abs(data->mic2_peak_freq - TARGET_FREQ_HZ) <= FREQ_TOLERANCE_HZ)); } else { data->mic2_passed = true; // N/A for single mic } // Update status text if (data->mic1_peak_freq > 0) { - snprintf(data->mic1_text, STATUS_STR_LEN, "Mic 1: %d Hz %s", - TARGET_FREQ_HZ, data->mic1_passed ? "PASS" : "FAIL"); + snprintf(data->mic1_text, STATUS_STR_LEN, "Mic 1: %d Hz %s", TARGET_FREQ_HZ, + data->mic1_passed ? "PASS" : "FAIL"); } else { snprintf(data->mic1_text, STATUS_STR_LEN, "Mic 1: No signal"); } if (num_channels == 2) { if (data->mic2_peak_freq > 0) { - snprintf(data->mic2_text, STATUS_STR_LEN, "Mic 2: %d Hz %s", - TARGET_FREQ_HZ, data->mic2_passed ? "PASS" : "FAIL"); + snprintf(data->mic2_text, STATUS_STR_LEN, "Mic 2: %d Hz %s", TARGET_FREQ_HZ, + data->mic2_passed ? "PASS" : "FAIL"); } else { snprintf(data->mic2_text, STATUS_STR_LEN, "Mic 2: No signal"); } @@ -273,7 +275,7 @@ static void prv_start_test(void) { snprintf(data->status_text, STATUS_STR_LEN, "Recording..."); PBL_LOG_INFO("Starting microphone test (channels=%lu, block_size=%lu)", - (unsigned long)num_channels, (unsigned long)BLOCK_SIZE); + (unsigned long)num_channels, (unsigned long)BLOCK_SIZE); mic_init(MIC); mic_set_volume(MIC, 100); // maximum volume @@ -400,8 +402,9 @@ const PebbleProcessMd *mfg_mic_getafix_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { .common.main_func = &s_main, // UUID: 3e8f9a2c-1b4d-4f5e-9c6a-7d8e0f1a2b3c - .common.uuid = {0x3e, 0x8f, 0x9a, 0x2c, 0x1b, 0x4d, 0x4f, 0x5e, - 0x9c, 0x6a, 0x7d, 0x8e, 0x0f, 0x1a, 0x2b, 0x3c}, + .common.uuid = + {0x3e, 0x8f, 0x9a, 0x2c, 0x1b, 0x4d, 0x4f, 0x5e, 0x9c, 0x6a, 0x7d, 0x8e, 0x0f, 0x1a, 0x2b, + 0x3c}, .name = "MfgMicGetafix", }; return (const PebbleProcessMd *)&s_app_info; diff --git a/src/fw/apps/prf/mfg_mic_obelix.c b/src/fw/apps/prf/mfg_mic_obelix.c index 2b23e90579..ef202c724a 100644 --- a/src/fw/apps/prf/mfg_mic_obelix.c +++ b/src/fw/apps/prf/mfg_mic_obelix.c @@ -20,22 +20,22 @@ #include #include "applib/ui/window_private.h" -#define PCM_BUFFER_SIZE 1024 +#define PCM_BUFFER_SIZE 1024 -#define RECORDING_MS 5000 -#define SAMPLE_RATE_HZ 16000 -#define SAMPLE_BITS 16 -#define CAPTURE_MS 100 -#define N_CHANNELS 2 -#define N_SAMPLES (N_CHANNELS * ((SAMPLE_RATE_HZ * RECORDING_MS) / 1000)) -#define SAMPLE_SIZE_BYTES (SAMPLE_BITS / 8) -#define BLOCK_SIZE (N_SAMPLES * SAMPLE_SIZE_BYTES) +#define RECORDING_MS 5000 +#define SAMPLE_RATE_HZ 16000 +#define SAMPLE_BITS 16 +#define CAPTURE_MS 100 +#define N_CHANNELS 2 +#define N_SAMPLES (N_CHANNELS * ((SAMPLE_RATE_HZ * RECORDING_MS) / 1000)) +#define SAMPLE_SIZE_BYTES (SAMPLE_BITS / 8) +#define BLOCK_SIZE (N_SAMPLES * SAMPLE_SIZE_BYTES) -#define FLASH_START FLASH_REGION_FIRMWARE_DEST_BEGIN -#define FLASH_END (FLASH_REGION_FIRMWARE_DEST_BEGIN + \ - ROUND_TO_MOD_CEIL(BLOCK_SIZE, SUBSECTOR_SIZE_BYTES)) +#define FLASH_START FLASH_REGION_FIRMWARE_DEST_BEGIN +#define FLASH_END \ + (FLASH_REGION_FIRMWARE_DEST_BEGIN + ROUND_TO_MOD_CEIL(BLOCK_SIZE, SUBSECTOR_SIZE_BYTES)) -#define PROCESS_STATUS_STR_LEN 64 +#define PROCESS_STATUS_STR_LEN 64 typedef struct { Window window; @@ -53,15 +53,15 @@ typedef struct { static void prv_interleaved_to_non_interleaved(int16_t *audio_data, size_t frame_count) { if (audio_data == NULL || frame_count == 0) { - return; + return; } for (size_t i = 1; i < frame_count; i++) { - int16_t temp = audio_data[2 * i]; - for (size_t j = 2 * i; j > i; j--) { - audio_data[j] = audio_data[j - 1]; - } - audio_data[i] = temp; + int16_t temp = audio_data[2 * i]; + for (size_t j = 2 * i; j > i; j--) { + audio_data[j] = audio_data[j - 1]; + } + audio_data[i] = temp; } } @@ -69,23 +69,27 @@ static void prv_audio_trans_handler(uint32_t *free_size) { uint32_t available_size = *free_size; AppData *app_data = app_state_get_user_data(); static enum { - MIC1, MIC2, MIC_MAX, + MIC1, + MIC2, + MIC_MAX, } mic_id = MIC1; - while (available_size > PCM_BUFFER_SIZE*sizeof(int16_t)) { - flash_read_bytes((uint8_t *)app_data->pcm, app_data->flash_addr, PCM_BUFFER_SIZE*sizeof(int16_t)); - app_data->flash_addr += PCM_BUFFER_SIZE*sizeof(int16_t); - prv_interleaved_to_non_interleaved(app_data->pcm, PCM_BUFFER_SIZE/2); + while (available_size > PCM_BUFFER_SIZE * sizeof(int16_t)) { + flash_read_bytes((uint8_t *)app_data->pcm, app_data->flash_addr, + PCM_BUFFER_SIZE * sizeof(int16_t)); + app_data->flash_addr += PCM_BUFFER_SIZE * sizeof(int16_t); + prv_interleaved_to_non_interleaved(app_data->pcm, PCM_BUFFER_SIZE / 2); if (mic_id == MIC1) { - available_size = audio_write(AUDIO, (void*)app_data->pcm, PCM_BUFFER_SIZE); + available_size = audio_write(AUDIO, (void *)app_data->pcm, PCM_BUFFER_SIZE); } else if (mic_id == MIC2) { - available_size = audio_write(AUDIO, (void*)&app_data->pcm[PCM_BUFFER_SIZE/2], PCM_BUFFER_SIZE); + available_size = + audio_write(AUDIO, (void *)&app_data->pcm[PCM_BUFFER_SIZE / 2], PCM_BUFFER_SIZE); } } if (app_data->flash_addr >= FLASH_START + BLOCK_SIZE) { app_data->flash_addr = FLASH_START; - if(++mic_id >= MIC_MAX) { + if (++mic_id >= MIC_MAX) { audio_stop(AUDIO); app_data->audio_playing = false; mic_id = MIC1; @@ -107,7 +111,7 @@ static void prv_start_playback() { static void prv_mic_data_handler(int16_t *samples, size_t sample_count, void *context) { AppData *app_data = app_state_get_user_data(); - + if (app_data->flash_addr - FLASH_START > BLOCK_SIZE) { mic_stop(MIC); app_data->mic_recording = false; @@ -116,8 +120,8 @@ static void prv_mic_data_handler(int16_t *samples, size_t sample_count, void *co prv_start_playback(); return; } - flash_write_bytes((uint8_t *)samples, app_data->flash_addr, sample_count*sizeof(int16_t)); - app_data->flash_addr += sample_count*sizeof(int16_t); + flash_write_bytes((uint8_t *)samples, app_data->flash_addr, sample_count * sizeof(int16_t)); + app_data->flash_addr += sample_count * sizeof(int16_t); } static void prv_recording_start(void) { @@ -130,7 +134,7 @@ static void prv_recording_start(void) { snprintf(app_data->status_text, PROCESS_STATUS_STR_LEN, "Pls Speak"); mic_init(MIC); - //set to maximum make it's more audible in testing + // set to maximum make it's more audible in testing mic_set_volume(MIC, 100); mic_start(MIC, prv_mic_data_handler, NULL, app_data->pcm, PCM_BUFFER_SIZE); app_data->mic_recording = true; @@ -217,7 +221,7 @@ static void prv_handle_init(void) { text_layer_set_text_alignment(status, GTextAlignmentCenter); snprintf(data->status_text, PROCESS_STATUS_STR_LEN, "Press Sel to start"); text_layer_set_text(status, data->status_text); - layer_set_frame((Layer*)status, &bounds); + layer_set_frame((Layer *)status, &bounds); layer_add_child(&window->layer, &status->layer); app_window_stack_push(window, true /* Animated */); @@ -250,8 +254,9 @@ const PebbleProcessMd *mfg_mic_obelix_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { .common.main_func = &s_main, // UUID: 6b064482-dc20-45a9-804c-5002746b49f9 - .common.uuid = {0x6b, 0x06, 0x44, 0x82, 0xdc, 0x20, 0x45, 0xa9, 0x80, 0x4c, 0x50, 0x02, 0x74, - 0x6b, 0x49, 0xf9}, + .common.uuid = + {0x6b, 0x06, 0x44, 0x82, 0xdc, 0x20, 0x45, 0xa9, 0x80, 0x4c, 0x50, 0x02, 0x74, 0x6b, 0x49, + 0xf9}, .name = "MfgMicObelix", }; return (const PebbleProcessMd *)&s_app_info; diff --git a/src/fw/apps/prf/mfg_mic_obelix.h b/src/fw/apps/prf/mfg_mic_obelix.h index e459d649e5..22709e6880 100644 --- a/src/fw/apps/prf/mfg_mic_obelix.h +++ b/src/fw/apps/prf/mfg_mic_obelix.h @@ -1,10 +1,8 @@ /* SPDX-FileCopyrightText: 2025 Core Devices LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #pragma once #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_mic_obelix_app_get_info(void); - +const PebbleProcessMd *mfg_mic_obelix_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_program_color.c b/src/fw/apps/prf/mfg_program_color.c index 7a1c7882bb..d527c54d12 100644 --- a/src/fw/apps/prf/mfg_program_color.c +++ b/src/fw/apps/prf/mfg_program_color.c @@ -36,58 +36,58 @@ typedef struct { const ColorTable s_color_table[] = { #ifdef CONFIG_BOARD_ASTERIX - { - .color = WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK, - .name = "BLACK", - .short_name = "BK", - }, - { - .color = WATCH_INFO_COLOR_COREDEVICES_P2D_WHITE, - .name = "WHITE", - .short_name = "WH", - } + { + .color = WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK, + .name = "BLACK", + .short_name = "BK", + }, + { + .color = WATCH_INFO_COLOR_COREDEVICES_P2D_WHITE, + .name = "WHITE", + .short_name = "WH", + } #elif defined(CONFIG_BOARD_OBELIX) - { - .color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY, - .name = "BLACK/GREY", - .short_name = "BG", - }, - { - .color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_RED, - .name = "BLACK/RED", - .short_name = "BR", - }, - { - .color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_BLUE, - .name = "SILVER/BLUE", - .short_name = "SB", - }, - { - .color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_GREY, - .name = "SILVER/GREY", - .short_name = "SG", - }, + { + .color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY, + .name = "BLACK/GREY", + .short_name = "BG", + }, + { + .color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_RED, + .name = "BLACK/RED", + .short_name = "BR", + }, + { + .color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_BLUE, + .name = "SILVER/BLUE", + .short_name = "SB", + }, + { + .color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_GREY, + .name = "SILVER/GREY", + .short_name = "SG", + }, #elif defined(CONFIG_BOARD_GETAFIX) - { - .color = WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20, - .name = "BLACK-20MM", - .short_name = "BK20", - }, - { - .color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14, - .name = "SILVER-14MM", - .short_name = "SV14", - }, - { - .color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20, - .name = "SILVER-20MM", - .short_name = "SV20", - }, - { - .color = WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14, - .name = "GOLD-14MM", - .short_name = "GD14", - }, + { + .color = WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20, + .name = "BLACK-20MM", + .short_name = "BK20", + }, + { + .color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14, + .name = "SILVER-14MM", + .short_name = "SV14", + }, + { + .color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20, + .name = "SILVER-20MM", + .short_name = "SV20", + }, + { + .color = WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14, + .name = "GOLD-14MM", + .short_name = "GD14", + }, #endif }; @@ -193,16 +193,14 @@ static void prv_color_preview_update_proc(Layer *layer, GContext *ctx) { // Top triangle (color1) graphics_context_set_fill_color(ctx, color1); for (int y = 0; y < bounds.size.h; y++) { - GRect top_rect = GRect(bounds.origin.x, bounds.origin.y + y, - bounds.size.w - y, 1); + GRect top_rect = GRect(bounds.origin.x, bounds.origin.y + y, bounds.size.w - y, 1); graphics_fill_rect(ctx, &top_rect); } // Bottom triangle (color2) graphics_context_set_fill_color(ctx, color2); for (int y = 0; y < bounds.size.h; y++) { - GRect bottom_rect = GRect(bounds.origin.x + bounds.size.w - y, - bounds.origin.y + y, y, 1); + GRect bottom_rect = GRect(bounds.origin.x + bounds.size.w - y, bounds.origin.y + y, y, 1); graphics_fill_rect(ctx, &bottom_rect); } } @@ -267,8 +265,8 @@ static void prv_select_click_handler(ClickRecognizerRef recognizer, void *data) return; } - snprintf(model, sizeof(model), "%s-%s", - s_model, s_color_table[app_data->selected_color_index].short_name); + snprintf(model, sizeof(model), "%s-%s", s_model, + s_color_table[app_data->selected_color_index].short_name); mfg_info_set_model(model); mfg_info_set_watch_color(s_color_table[app_data->selected_color_index].color); @@ -287,8 +285,8 @@ static void prv_config_provider(void *data) { static void prv_handle_init(void) { AppData *data = app_malloc_check(sizeof(AppData)); - *data = (AppData) { - .selected_color_index = -1, + *data = (AppData){ + .selected_color_index = -1, }; app_state_set_user_data(data); @@ -308,38 +306,34 @@ static void prv_handle_init(void) { // Create up arrow (pointing up) static GPoint UP_ARROW_POINTS[] = {{0, 10}, {7, 0}, {14, 10}}; static const GPathInfo UP_ARROW_PATH_INFO = { - .num_points = ARRAY_LENGTH(UP_ARROW_POINTS), - .points = UP_ARROW_POINTS + .num_points = ARRAY_LENGTH(UP_ARROW_POINTS), + .points = UP_ARROW_POINTS }; PathLayer *up_arrow = &data->up_arrow; path_layer_init(up_arrow, &UP_ARROW_PATH_INFO); path_layer_set_fill_color(up_arrow, GColorBlack); path_layer_set_stroke_color(up_arrow, GColorBlack); - layer_set_frame(&up_arrow->layer, - &GRect((window->layer.bounds.size.w / 2) - 7, 40, 14, 10)); + layer_set_frame(&up_arrow->layer, &GRect((window->layer.bounds.size.w / 2) - 7, 40, 14, 10)); layer_add_child(&window->layer, &up_arrow->layer); #ifdef PBL_COLOR // Create color preview square above the color text Layer *color_preview = &data->color_preview; const int preview_size = 40; - layer_init(color_preview, - &GRect((window->layer.bounds.size.w / 2) - (preview_size / 2), 55, - preview_size, preview_size)); + layer_init(color_preview, &GRect((window->layer.bounds.size.w / 2) - (preview_size / 2), 55, + preview_size, preview_size)); layer_set_update_proc(color_preview, prv_color_preview_update_proc); layer_add_child(&window->layer, color_preview); #endif TextLayer *color = &data->color; - text_layer_init(color, - &GRect(5, 100, - window->layer.bounds.size.w - 10, 28)); + text_layer_init(color, &GRect(5, 100, window->layer.bounds.size.w - 10, 28)); text_layer_set_font(color, fonts_get_system_font(FONT_KEY_GOTHIC_24)); text_layer_set_text_alignment(color, GTextAlignmentCenter); if (ARRAY_LENGTH(s_color_table) > 0) { data->selected_color_index = 0; - snprintf(data->color_text, sizeof(data->color_text), "%s (%s)", - s_color_table[0].name, s_color_table[0].short_name); + snprintf(data->color_text, sizeof(data->color_text), "%s (%s)", s_color_table[0].name, + s_color_table[0].short_name); text_layer_set_text(color, data->color_text); } else { text_layer_set_text(color, "NO COLORS AVAILABLE"); @@ -349,21 +343,19 @@ static void prv_handle_init(void) { // Create down arrow (pointing down) static GPoint DOWN_ARROW_POINTS[] = {{0, 0}, {7, 10}, {14, 0}}; static const GPathInfo DOWN_ARROW_PATH_INFO = { - .num_points = ARRAY_LENGTH(DOWN_ARROW_POINTS), - .points = DOWN_ARROW_POINTS + .num_points = ARRAY_LENGTH(DOWN_ARROW_POINTS), + .points = DOWN_ARROW_POINTS }; PathLayer *down_arrow = &data->down_arrow; path_layer_init(down_arrow, &DOWN_ARROW_PATH_INFO); path_layer_set_fill_color(down_arrow, GColorBlack); path_layer_set_stroke_color(down_arrow, GColorBlack); - layer_set_frame(&down_arrow->layer, - &GRect((window->layer.bounds.size.w / 2) - 7, 133, 14, 10)); + layer_set_frame(&down_arrow->layer, &GRect((window->layer.bounds.size.w / 2) - 7, 133, 14, 10)); layer_add_child(&window->layer, &down_arrow->layer); TextLayer *status = &data->status; - text_layer_init(status, - &GRect(5, 148, - window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 148)); + text_layer_init( + status, &GRect(5, 148, window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 148)); text_layer_set_font(status, fonts_get_system_font(FONT_KEY_GOTHIC_24)); text_layer_set_text_alignment(status, GTextAlignmentCenter); layer_add_child(&window->layer, &status->layer); @@ -377,14 +369,14 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* mfg_program_color_app_get_info(void) { +const PebbleProcessMd *mfg_program_color_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: d5f0a47d-e570-499d-bcaa-fc6d56230038 - .common.uuid = { 0xd5, 0xf0, 0xa4, 0x7d, 0xe5, 0x70, 0x49, 0x9d, - 0xbc, 0xaa, 0xfc, 0x6d, 0x56, 0x23, 0x00, 0x38 }, - .name = "MfgProgramColor", + .common.main_func = &s_main, + // UUID: d5f0a47d-e570-499d-bcaa-fc6d56230038 + .common.uuid = + {0xd5, 0xf0, 0xa4, 0x7d, 0xe5, 0x70, 0x49, 0x9d, 0xbc, 0xaa, 0xfc, 0x6d, 0x56, 0x23, 0x00, + 0x38}, + .name = "MfgProgramColor", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/prf/mfg_program_color.h b/src/fw/apps/prf/mfg_program_color.h index 7e2da6697e..5fc3deb1c6 100644 --- a/src/fw/apps/prf/mfg_program_color.h +++ b/src/fw/apps/prf/mfg_program_color.h @@ -1,10 +1,8 @@ /* SPDX-FileCopyrightText: 2025 Core Devices LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #pragma once #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_program_color_app_get_info(void); - +const PebbleProcessMd *mfg_program_color_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_qr_results.c b/src/fw/apps/prf/mfg_qr_results.c index 7c5221b220..b186dc80a1 100644 --- a/src/fw/apps/prf/mfg_qr_results.c +++ b/src/fw/apps/prf/mfg_qr_results.c @@ -23,20 +23,31 @@ static const char *prv_color_short_name(WatchInfoColor color) { switch (color) { #ifdef CONFIG_BOARD_ASTERIX - case WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK: return "BK"; - case WATCH_INFO_COLOR_COREDEVICES_P2D_WHITE: return "WH"; + case WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK: + return "BK"; + case WATCH_INFO_COLOR_COREDEVICES_P2D_WHITE: + return "WH"; #elif defined(CONFIG_BOARD_OBELIX) - case WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY: return "BG"; - case WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_RED: return "BR"; - case WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_BLUE: return "SB"; - case WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_GREY: return "SG"; + case WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY: + return "BG"; + case WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_RED: + return "BR"; + case WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_BLUE: + return "SB"; + case WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_GREY: + return "SG"; #elif defined(CONFIG_BOARD_GETAFIX) - case WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20: return "BK20"; - case WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14: return "SV14"; - case WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20: return "SV20"; - case WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14: return "GD14"; + case WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20: + return "BK20"; + case WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14: + return "SV14"; + case WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20: + return "SV20"; + case WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14: + return "GD14"; #endif - default: return "??"; + default: + return "??"; } } @@ -73,61 +84,61 @@ static void prv_append_result(char *buf, size_t bufsz, MfgTestId test) { } switch (test) { - case MfgTestId_Buttons: - snprintf(entry, sizeof(entry), "BTN:%c", rc); - break; - case MfgTestId_Display: - snprintf(entry, sizeof(entry), "DSP:%c", rc); - break; + case MfgTestId_Buttons: + snprintf(entry, sizeof(entry), "BTN:%c", rc); + break; + case MfgTestId_Display: + snprintf(entry, sizeof(entry), "DSP:%c", rc); + break; #ifdef CONFIG_TOUCH - case MfgTestId_Touch: - snprintf(entry, sizeof(entry), "TCH:%c", rc); - break; + case MfgTestId_Touch: + snprintf(entry, sizeof(entry), "TCH:%c", rc); + break; #endif - case MfgTestId_Backlight: - snprintf(entry, sizeof(entry), "BKL:%c", rc); - break; - case MfgTestId_Accel: - snprintf(entry, sizeof(entry), "ACC:%c", rc); - break; + case MfgTestId_Backlight: + snprintf(entry, sizeof(entry), "BKL:%c", rc); + break; + case MfgTestId_Accel: + snprintf(entry, sizeof(entry), "ACC:%c", rc); + break; #ifdef CONFIG_MAG - case MfgTestId_Mag: - snprintf(entry, sizeof(entry), "MAG:%c", rc); - break; + case MfgTestId_Mag: + snprintf(entry, sizeof(entry), "MAG:%c", rc); + break; #endif #if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) - case MfgTestId_Speaker: - snprintf(entry, sizeof(entry), "SPK:%c", rc); - break; + case MfgTestId_Speaker: + snprintf(entry, sizeof(entry), "SPK:%c", rc); + break; #endif #if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) - case MfgTestId_Mic: - snprintf(entry, sizeof(entry), "MIC:%c", rc); - break; + case MfgTestId_Mic: + snprintf(entry, sizeof(entry), "MIC:%c", rc); + break; #endif - case MfgTestId_ALS: - snprintf(entry, sizeof(entry), "ALS:%c,%lu", rc, (unsigned long)r->value); - break; - case MfgTestId_Vibration: - snprintf(entry, sizeof(entry), "VIB:%c", rc); - break; + case MfgTestId_ALS: + snprintf(entry, sizeof(entry), "ALS:%c,%lu", rc, (unsigned long)r->value); + break; + case MfgTestId_Vibration: + snprintf(entry, sizeof(entry), "VIB:%c", rc); + break; #if defined(CONFIG_BOARD_OBELIX) && defined(CONFIG_MFG) - case MfgTestId_HrmCtrLeakage: - snprintf(entry, sizeof(entry), "HRM:%c", rc); - break; + case MfgTestId_HrmCtrLeakage: + snprintf(entry, sizeof(entry), "HRM:%c", rc); + break; #endif - case MfgTestId_Charge: - snprintf(entry, sizeof(entry), "CHG:%c", rc); - break; - case MfgTestId_ProgramColor: - snprintf(entry, sizeof(entry), "CLR:%c,%s", rc, - prv_color_short_name((WatchInfoColor)r->value)); - break; - case MfgTestId_Aging: - snprintf(entry, sizeof(entry), "AGE:%c", rc); - break; - default: - return; + case MfgTestId_Charge: + snprintf(entry, sizeof(entry), "CHG:%c", rc); + break; + case MfgTestId_ProgramColor: + snprintf(entry, sizeof(entry), "CLR:%c,%s", rc, + prv_color_short_name((WatchInfoColor)r->value)); + break; + case MfgTestId_Aging: + snprintf(entry, sizeof(entry), "AGE:%c", rc); + break; + default: + return; } strncat(buf, entry, bufsz - strlen(buf) - 1); @@ -147,9 +158,8 @@ static void prv_handle_init(void) { char mac[BT_DEVICE_ADDRESS_FMT_BUFFER_SIZE]; bt_local_id_copy_address_mac_string(mac); BatteryChargeState charge = battery_state_service_peek(); - snprintf(data->qr_buffer, sizeof(data->qr_buffer), "%s;%s;%s;%" PRIu8, - mfg_get_serial_number(), mac, TINTIN_METADATA.version_tag, - charge.charge_percent); + snprintf(data->qr_buffer, sizeof(data->qr_buffer), "%s;%s;%s;%" PRIu8, mfg_get_serial_number(), + mac, TINTIN_METADATA.version_tag, charge.charge_percent); for (MfgTestId id = 0; id < MfgTestIdCount; id++) { prv_append_result(data->qr_buffer, sizeof(data->qr_buffer), id); @@ -158,18 +168,15 @@ static void prv_handle_init(void) { QRCode *qr_code = &data->qr_code; #if PBL_ROUND #define QR_CODE_SIZE ((window->layer.bounds.size.w * 10) / 14) - qr_code_init_with_parameters(qr_code, - &GRect((window->layer.bounds.size.w - QR_CODE_SIZE) / 2, - (window->layer.bounds.size.h - QR_CODE_SIZE) / 2, - QR_CODE_SIZE, QR_CODE_SIZE), - data->qr_buffer, strlen(data->qr_buffer), QRCodeECCMedium, - GColorBlack, GColorWhite); + qr_code_init_with_parameters( + qr_code, + &GRect((window->layer.bounds.size.w - QR_CODE_SIZE) / 2, + (window->layer.bounds.size.h - QR_CODE_SIZE) / 2, QR_CODE_SIZE, QR_CODE_SIZE), + data->qr_buffer, strlen(data->qr_buffer), QRCodeECCMedium, GColorBlack, GColorWhite); #else - qr_code_init_with_parameters(qr_code, - &GRect(10, 10, window->layer.bounds.size.w - 20, - window->layer.bounds.size.h - 20), - data->qr_buffer, strlen(data->qr_buffer), QRCodeECCMedium, - GColorBlack, GColorWhite); + qr_code_init_with_parameters( + qr_code, &GRect(10, 10, window->layer.bounds.size.w - 20, window->layer.bounds.size.h - 20), + data->qr_buffer, strlen(data->qr_buffer), QRCodeECCMedium, GColorBlack, GColorWhite); #endif layer_add_child(&window->layer, &qr_code->layer); @@ -182,13 +189,14 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* mfg_qr_results_app_get_info(void) { +const PebbleProcessMd *mfg_qr_results_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: 7b3e9f2a-5d1c-4e8b-a6f0-3c9d8e7a1b5f - .common.uuid = { 0x7b, 0x3e, 0x9f, 0x2a, 0x5d, 0x1c, 0x4e, 0x8b, - 0xa6, 0xf0, 0x3c, 0x9d, 0x8e, 0x7a, 0x1b, 0x5f }, - .name = "MfgQRResults", + .common.main_func = &s_main, + // UUID: 7b3e9f2a-5d1c-4e8b-a6f0-3c9d8e7a1b5f + .common.uuid = + {0x7b, 0x3e, 0x9f, 0x2a, 0x5d, 0x1c, 0x4e, 0x8b, 0xa6, 0xf0, 0x3c, 0x9d, 0x8e, 0x7a, 0x1b, + 0x5f}, + .name = "MfgQRResults", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_qr_results.h b/src/fw/apps/prf/mfg_qr_results.h index 1dd7bc3159..5b3d8cd254 100644 --- a/src/fw/apps/prf/mfg_qr_results.h +++ b/src/fw/apps/prf/mfg_qr_results.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_qr_results_app_get_info(void); +const PebbleProcessMd *mfg_qr_results_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_sine_wave.c b/src/fw/apps/prf/mfg_sine_wave.c index a20f61dd64..060fd09af2 100644 --- a/src/fw/apps/prf/mfg_sine_wave.c +++ b/src/fw/apps/prf/mfg_sine_wave.c @@ -4,7 +4,8 @@ #include "mfg_sine_wave.h" /* Stereo sine wave data (L, R, L, R, ...) */ -int16_t sine_wave[SINE_WAVE_TOTAL_SAMPLES] = { - 0, 0, 3134, 3134, 5791, 5791, 7567, 7567, 8191, 8191, 7567, 7567, 5791, 5791, 3134, 3134, - 0, 0, -3134, -3134, -5791, -5791, -7567, -7567, -8191, -8191, -7567, -7567, -5791, -5791, -3134, -3134 -}; +int16_t sine_wave[SINE_WAVE_TOTAL_SAMPLES] = {0, 0, 3134, 3134, 5791, 5791, 7567, + 7567, 8191, 8191, 7567, 7567, 5791, 5791, + 3134, 3134, 0, 0, -3134, -3134, -5791, + -5791, -7567, -7567, -8191, -8191, -7567, -7567, + -5791, -5791, -3134, -3134}; diff --git a/src/fw/apps/prf/mfg_speaker_asterix.c b/src/fw/apps/prf/mfg_speaker_asterix.c index a6eb94a4a7..04eb18e927 100644 --- a/src/fw/apps/prf/mfg_speaker_asterix.c +++ b/src/fw/apps/prf/mfg_speaker_asterix.c @@ -14,22 +14,22 @@ #include "process_management/pebble_process_md.h" #include "process_state/app_state/app_state.h" -#define DA7212_CIF_CTRL 0x1D -#define DA7212_DAI_CLK_MODE 0x28 -#define DA7212_DAI_CTRL 0x29 -#define DA7212_DIG_ROUTING_DAC 0x2A -#define DA7212_DAC_FILTERS5 0x40 -#define DA7212_DAC_R_GAIN 0x46 -#define DA7212_LINE_GAIN 0x4A -#define DA7212_MIXOUT_R_SELECT 0x4C -#define DA7212_SYSTEM_MODES_OUTPUT 0x51 -#define DA7212_DAC_R_CTRL 0x6A -#define DA7212_LINE_CTRL 0x6D -#define DA7212_MIXOUT_R_CTRL 0x6F -#define DA7212_TONE_GEN_CFG1 0xB4 -#define DA7212_TONE_GEN_CYCLES 0xB6 -#define DA7212_TONE_GEN_ON_PER 0xBB -#define DA7212_SYSTEM_ACTIVE 0xFD +#define DA7212_CIF_CTRL 0x1D +#define DA7212_DAI_CLK_MODE 0x28 +#define DA7212_DAI_CTRL 0x29 +#define DA7212_DIG_ROUTING_DAC 0x2A +#define DA7212_DAC_FILTERS5 0x40 +#define DA7212_DAC_R_GAIN 0x46 +#define DA7212_LINE_GAIN 0x4A +#define DA7212_MIXOUT_R_SELECT 0x4C +#define DA7212_SYSTEM_MODES_OUTPUT 0x51 +#define DA7212_DAC_R_CTRL 0x6A +#define DA7212_LINE_CTRL 0x6D +#define DA7212_MIXOUT_R_CTRL 0x6F +#define DA7212_TONE_GEN_CFG1 0xB4 +#define DA7212_TONE_GEN_CYCLES 0xB6 +#define DA7212_TONE_GEN_ON_PER 0xBB +#define DA7212_SYSTEM_ACTIVE 0xFD typedef struct { Window window; @@ -53,7 +53,7 @@ static void da7212_register_write(uint8_t reg, uint8_t value) { static void prv_da7212_play_tone(void) { // CIF_CTRL: soft reset da7212_register_write(DA7212_CIF_CTRL, 0x80); - + psleep(10); // SYSTEM_ACTIVE: wake-up @@ -170,8 +170,9 @@ const PebbleProcessMd *mfg_speaker_asterix_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { .common.main_func = &s_main, // UUID: 27047635-68f1-4ece-9ca7-52dd8e22d1dd - .common.uuid = {0x27, 0x04, 0x76, 0x35, 0x68, 0xf1, 0x4e, 0xce, 0x9c, 0xa7, 0x52, 0xdd, 0x8e, - 0x22, 0xd1, 0xdd}, + .common.uuid = + {0x27, 0x04, 0x76, 0x35, 0x68, 0xf1, 0x4e, 0xce, 0x9c, 0xa7, 0x52, 0xdd, 0x8e, 0x22, 0xd1, + 0xdd}, .name = "MfgSpeakerAsterix", }; return (const PebbleProcessMd *)&s_app_info; diff --git a/src/fw/apps/prf/mfg_speaker_asterix.h b/src/fw/apps/prf/mfg_speaker_asterix.h index 9770b00f29..e204a8065a 100644 --- a/src/fw/apps/prf/mfg_speaker_asterix.h +++ b/src/fw/apps/prf/mfg_speaker_asterix.h @@ -1,10 +1,8 @@ /* SPDX-FileCopyrightText: 2025 Core Devices LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #pragma once #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_speaker_asterix_app_get_info(void); - +const PebbleProcessMd *mfg_speaker_asterix_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_speaker_obelix.c b/src/fw/apps/prf/mfg_speaker_obelix.c index 11a876268c..335b8d137b 100644 --- a/src/fw/apps/prf/mfg_speaker_obelix.c +++ b/src/fw/apps/prf/mfg_speaker_obelix.c @@ -22,15 +22,14 @@ typedef struct { } AppData; static const int16_t sine_wave_4k[] = { - 0, 32767, 0, -32768, 0, 32767, 0, -32768, - 0, 32767, 0, -32768, 0, 32767, 0, -32768, + 0, 32767, 0, -32768, 0, 32767, 0, -32768, 0, 32767, 0, -32768, 0, 32767, 0, -32768, }; static void prv_audio_trans_handler(uint32_t *free_size) { - uint32_t available_size = *free_size; - while (available_size > sizeof(sine_wave_4k)) { - available_size = audio_write(AUDIO, (void*)&sine_wave_4k[0], sizeof(sine_wave_4k)); - } + uint32_t available_size = *free_size; + while (available_size > sizeof(sine_wave_4k)) { + available_size = audio_write(AUDIO, (void *)&sine_wave_4k[0], sizeof(sine_wave_4k)); + } } static void prv_play_audio(void) { @@ -107,8 +106,9 @@ const PebbleProcessMd *mfg_speaker_obelix_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { .common.main_func = &s_main, // UUID: c1479d03-5550-4444-b1e7-e2cbad0e5678 - .common.uuid = {0xc1, 0x47, 0x9d, 0x03, 0x55, 0x50, 0x44, 0x44, 0xb1, 0xe7, 0xe2, 0xcb, 0xad, - 0x0e, 0x56, 0x78}, + .common.uuid = + {0xc1, 0x47, 0x9d, 0x03, 0x55, 0x50, 0x44, 0x44, 0xb1, 0xe7, 0xe2, 0xcb, 0xad, 0x0e, 0x56, + 0x78}, .name = "MfgSpeakerObelix", }; return (const PebbleProcessMd *)&s_app_info; diff --git a/src/fw/apps/prf/mfg_speaker_obelix.h b/src/fw/apps/prf/mfg_speaker_obelix.h index bc31f73d74..a4bcd9a2d0 100644 --- a/src/fw/apps/prf/mfg_speaker_obelix.h +++ b/src/fw/apps/prf/mfg_speaker_obelix.h @@ -1,10 +1,8 @@ /* SPDX-FileCopyrightText: 2025 Core Devices LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #pragma once #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_speaker_obelix_app_get_info(void); - +const PebbleProcessMd *mfg_speaker_obelix_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_test_aging.c b/src/fw/apps/prf/mfg_test_aging.c index 56250c9adb..b938a1a366 100644 --- a/src/fw/apps/prf/mfg_test_aging.c +++ b/src/fw/apps/prf/mfg_test_aging.c @@ -50,8 +50,7 @@ #ifdef CONFIG_SPEAKER static const int16_t sine_wave_4k[] = { - 0, 32767, 0, -32768, 0, 32767, 0, -32768, - 0, 32767, 0, -32768, 0, 32767, 0, -32768, + 0, 32767, 0, -32768, 0, 32767, 0, -32768, 0, 32767, 0, -32768, 0, 32767, 0, -32768, }; #endif @@ -140,8 +139,7 @@ static void prv_cleanup_component(AppData *data) { } #endif #ifdef CONFIG_BACKLIGHT_HAS_COLOR - if (data->component >= ComponentBacklightWhite && - data->component <= ComponentBacklightBlue) { + if (data->component >= ComponentBacklightWhite && data->component <= ComponentBacklightBlue) { backlight_set_color(data->saved_backlight_color); light_enable(false); } @@ -165,8 +163,7 @@ static void prv_start_component(AppData *data) { } #endif #ifdef CONFIG_BACKLIGHT_HAS_COLOR - if (data->component >= ComponentBacklightWhite && - data->component <= ComponentBacklightBlue) { + if (data->component >= ComponentBacklightWhite && data->component <= ComponentBacklightBlue) { light_enable(true); } #else @@ -242,8 +239,7 @@ static void prv_run_component_display(AppData *data) { AccelDriverSample sample; accel_peek(&sample); comp_name = "Accel"; - sniprintf(comp_detail, sizeof(comp_detail), - "X:%" PRIi16 " Y:%" PRIi16 " Z:%" PRIi16, + sniprintf(comp_detail, sizeof(comp_detail), "X:%" PRIi16 " Y:%" PRIi16 " Z:%" PRIi16, sample.x, sample.y, sample.z); break; } @@ -252,8 +248,7 @@ static void prv_run_component_display(AppData *data) { MagData mag_sample; mag_read_data(&mag_sample); comp_name = "Mag"; - sniprintf(comp_detail, sizeof(comp_detail), - "X:%" PRIi16 " Y:%" PRIi16 " Z:%" PRIi16, + sniprintf(comp_detail, sizeof(comp_detail), "X:%" PRIi16 " Y:%" PRIi16 " Z:%" PRIi16, mag_sample.x, mag_sample.y, mag_sample.z); break; } @@ -299,12 +294,12 @@ static void prv_run_component_display(AppData *data) { case ComponentVibe: { // Only pulse once at the start of the vibe phase if (data->component_elapsed_sec <= 1) { - static const uint32_t vibe_durations[] = { 250 }; - static const uint32_t vibe_amplitudes[] = { 50 }; + static const uint32_t vibe_durations[] = {250}; + static const uint32_t vibe_amplitudes[] = {50}; VibePatternWithAmplitudes pat = { - .durations = vibe_durations, - .amplitudes = vibe_amplitudes, - .num_segments = 1, + .durations = vibe_durations, + .amplitudes = vibe_amplitudes, + .num_segments = 1, }; vibes_enqueue_custom_pattern_with_amplitudes(pat); } @@ -329,27 +324,37 @@ static void prv_run_component_display(AppData *data) { chg_str = "Idle"; } else { switch (charge_status) { - case BatteryChargeStatusComplete: chg_str = "Cmpl"; break; - case BatteryChargeStatusTrickle: chg_str = "Trk"; break; - case BatteryChargeStatusCC: chg_str = "CC"; break; - case BatteryChargeStatusCV: chg_str = "CV"; break; - default: chg_str = "?"; break; + case BatteryChargeStatusComplete: + chg_str = "Cmpl"; + break; + case BatteryChargeStatusTrickle: + chg_str = "Trk"; + break; + case BatteryChargeStatusCC: + chg_str = "CC"; + break; + case BatteryChargeStatusCV: + chg_str = "CV"; + break; + default: + chg_str = "?"; + break; } } sniprintf(data->status_string, sizeof(data->status_string), "CHG+CYC [%s]\n" - "Cycle: %" PRIu32 "\n" + "Cycle: %" PRIu32 + "\n" "Elapsed: %s\n" "Remain: %s\n" - "%" PRId32 "mV %" PRIu8 "%% %s\n" - "%" PRId8 ".%02" PRIu8 "C\n" + "%" PRId32 "mV %" PRIu8 + "%% %s\n" + "%" PRId8 ".%02" PRIu8 + "C\n" "%s", - comp_name, data->cycle_count, - time_str, rem_str, - bc.v_mv, cs.charge_percent, chg_str, - temp_c, temp_c_frac, - comp_detail); + comp_name, data->cycle_count, time_str, rem_str, bc.v_mv, cs.charge_percent, chg_str, + temp_c, temp_c_frac, comp_detail); } static void prv_handle_tick(struct tm *tick_time, TimeUnits units_changed) { @@ -368,8 +373,7 @@ static void prv_handle_tick(struct tm *tick_time, TimeUnits units_changed) { data->component_elapsed_sec = 0; data->cycle_count = 1; prv_start_component(data); - sniprintf(data->status_string, sizeof(data->status_string), - "CHG+CYC\nStarting..."); + sniprintf(data->status_string, sizeof(data->status_string), "CHG+CYC\nStarting..."); } else { sniprintf(data->status_string, sizeof(data->status_string), "PLUG CHARGER\n\nPlug the watch\nto start"); @@ -446,7 +450,8 @@ static void prv_handle_tick(struct tm *tick_time, TimeUnits units_changed) { sniprintf(data->status_string, sizeof(data->status_string), "IDLE\nStarting..."); } else { sniprintf(data->status_string, sizeof(data->status_string), - "UNPLUG WATCH\n\nCharged to %" PRIu8 "%%\n" + "UNPLUG WATCH\n\nCharged to %" PRIu8 + "%%\n" "Unplug to begin\nidle test", cs.charge_percent); } @@ -474,9 +479,8 @@ static void prv_handle_tick(struct tm *tick_time, TimeUnits units_changed) { if (data->phase_elapsed_sec >= IDLE_DURATION_SEC) { if (drop > IDLE_MAX_DROP_PERCENT) { char reason[64]; - sniprintf(reason, sizeof(reason), - "Idle drop %" PRId8 "%%\n> %d%%", - drop, IDLE_MAX_DROP_PERCENT); + sniprintf(reason, sizeof(reason), "Idle drop %" PRId8 "%%\n> %d%%", drop, + IDLE_MAX_DROP_PERCENT); prv_enter_fail(data, reason); break; } @@ -496,8 +500,7 @@ static void prv_handle_tick(struct tm *tick_time, TimeUnits units_changed) { char time_str[16], rem_str[16]; prv_format_time(time_str, sizeof(time_str), data->phase_elapsed_sec); - prv_format_time(rem_str, sizeof(rem_str), - IDLE_DURATION_SEC - data->phase_elapsed_sec); + prv_format_time(rem_str, sizeof(rem_str), IDLE_DURATION_SEC - data->phase_elapsed_sec); int8_t temp_c = (int8_t)(bc.t_mc / 1000); uint8_t temp_c_frac = ((bc.t_mc > 0 ? bc.t_mc : -bc.t_mc) % 1000) / 10; @@ -506,12 +509,12 @@ static void prv_handle_tick(struct tm *tick_time, TimeUnits units_changed) { "IDLE\n" "Elapsed: %s\n" "Remain: %s\n" - "%" PRId32 "mV %" PRIu8 "%%\n" - "%" PRId8 ".%02" PRIu8 "C\n" + "%" PRId32 "mV %" PRIu8 + "%%\n" + "%" PRId8 ".%02" PRIu8 + "C\n" "Start:%" PRIu8 "%% Drop:%" PRId8 "/%d%%", - time_str, rem_str, - bc.v_mv, cs.charge_percent, - temp_c, temp_c_frac, + time_str, rem_str, bc.v_mv, cs.charge_percent, temp_c, temp_c_frac, data->initial_percent, drop, IDLE_MAX_DROP_PERCENT); break; } @@ -540,8 +543,7 @@ static void prv_handle_tick(struct tm *tick_time, TimeUnits units_changed) { #endif data->state = AgingStatePass; sniprintf(data->status_string, sizeof(data->status_string), - "PASS\n\nDischarged to\n%" PRIu8 "%%", - cs.charge_percent); + "PASS\n\nDischarged to\n%" PRIu8 "%%", cs.charge_percent); prv_report_result(true); tick_timer_service_unsubscribe(); break; @@ -555,11 +557,12 @@ static void prv_handle_tick(struct tm *tick_time, TimeUnits units_changed) { sniprintf(data->status_string, sizeof(data->status_string), "DISCHARGING\nTime: %s\n\n" - "%" PRId32 "mV %" PRIu8 "%%\n" - "%" PRId8 ".%02" PRIu8 "C\n\n" + "%" PRId32 "mV %" PRIu8 + "%%\n" + "%" PRId8 ".%02" PRIu8 + "C\n\n" "Target: %d%%", - time_str, bc.v_mv, cs.charge_percent, - temp_c, temp_c_frac, + time_str, bc.v_mv, cs.charge_percent, temp_c, temp_c_frac, DISCHARGE_TARGET_PERCENT); break; } @@ -570,8 +573,7 @@ static void prv_handle_tick(struct tm *tick_time, TimeUnits units_changed) { } if (data->state == AgingStateFail) { - sniprintf(data->status_string, sizeof(data->status_string), - "FAIL\n\n%s", data->fail_reason); + sniprintf(data->status_string, sizeof(data->status_string), "FAIL\n\n%s", data->fail_reason); } text_layer_set_text(&data->status, data->status_string); @@ -606,9 +608,9 @@ static void prv_config_provider(void *context) { static void prv_handle_init(void) { AppData *data = app_malloc_check(sizeof(AppData)); *data = (AppData){ - .state = AgingStateWaitPlug, + .state = AgingStateWaitPlug, #ifdef CONFIG_SPEAKER - .audio_playing = false, + .audio_playing = false, #endif }; @@ -642,11 +644,11 @@ static void prv_handle_init(void) { TextLayer *status = &data->status; const int16_t status_y = PBL_IF_ROUND_ELSE(40, 25); const int16_t status_x = PBL_IF_ROUND_ELSE(15, 5); - text_layer_init(status, &GRect(status_x, status_y, bounds.size.w - (status_x * 2), - bounds.size.h - status_y)); + text_layer_init( + status, &GRect(status_x, status_y, bounds.size.w - (status_x * 2), bounds.size.h - status_y)); text_layer_set_font(status, fonts_get_system_font(FONT_KEY_GOTHIC_18)); - text_layer_set_text_alignment(status, PBL_IF_ROUND_ELSE(GTextAlignmentCenter, - GTextAlignmentLeft)); + text_layer_set_text_alignment(status, + PBL_IF_ROUND_ELSE(GTextAlignmentCenter, GTextAlignmentLeft)); layer_add_child(window_layer, &status->layer); tick_timer_service_subscribe(SECOND_UNIT, prv_handle_tick); @@ -662,11 +664,12 @@ static void s_main(void) { const PebbleProcessMd *mfg_test_aging_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: 12345678-ABCD-EF01-2345-6789ABCDEF01 - .common.uuid = { 0x12, 0x34, 0x56, 0x78, 0xAB, 0xCD, 0xEF, 0x01, - 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01 }, - .name = "MfgTestAging", + .common.main_func = &s_main, + // UUID: 12345678-ABCD-EF01-2345-6789ABCDEF01 + .common.uuid = + {0x12, 0x34, 0x56, 0x78, 0xAB, 0xCD, 0xEF, 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, + 0x01}, + .name = "MfgTestAging", }; return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_test_aging.h b/src/fw/apps/prf/mfg_test_aging.h index d19a290362..3d73ddf304 100644 --- a/src/fw/apps/prf/mfg_test_aging.h +++ b/src/fw/apps/prf/mfg_test_aging.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_test_aging_app_get_info(void); +const PebbleProcessMd *mfg_test_aging_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_test_menu.c b/src/fw/apps/prf/mfg_test_menu.c index 3b1485b22b..d4dd2aaf91 100644 --- a/src/fw/apps/prf/mfg_test_menu.c +++ b/src/fw/apps/prf/mfg_test_menu.c @@ -45,35 +45,35 @@ typedef struct { #define FI MFG_TEST_MODE_FINISHED static const MfgTestMenuEntry s_all_entries[] = { - { "Buttons", MfgTestId_Buttons, mfg_button_app_get_info, SF | FI }, - { "Display", MfgTestId_Display, mfg_display_app_get_info, SF | FI }, + {"Buttons", MfgTestId_Buttons, mfg_button_app_get_info, SF | FI}, + {"Display", MfgTestId_Display, mfg_display_app_get_info, SF | FI}, #ifdef CONFIG_TOUCH - { "Touch", MfgTestId_Touch, mfg_touch_app_get_info, SF | FI }, + {"Touch", MfgTestId_Touch, mfg_touch_app_get_info, SF | FI}, #endif - { "Backlight", MfgTestId_Backlight, mfg_backlight_app_get_info, SF | FI }, - { "Accelerometer", MfgTestId_Accel, mfg_accel_app_get_info, SF | FI }, + {"Backlight", MfgTestId_Backlight, mfg_backlight_app_get_info, SF | FI}, + {"Accelerometer", MfgTestId_Accel, mfg_accel_app_get_info, SF | FI}, #ifdef CONFIG_MAG - { "Magnetometer", MfgTestId_Mag, mfg_mag_app_get_info, SF | FI }, + {"Magnetometer", MfgTestId_Mag, mfg_mag_app_get_info, SF | FI}, #endif #ifdef CONFIG_BOARD_ASTERIX - { "Speaker", MfgTestId_Speaker, mfg_speaker_asterix_app_get_info, SF | FI }, + {"Speaker", MfgTestId_Speaker, mfg_speaker_asterix_app_get_info, SF | FI}, #elif defined(CONFIG_BOARD_OBELIX) - { "Speaker", MfgTestId_Speaker, mfg_speaker_obelix_app_get_info, SF | FI }, + {"Speaker", MfgTestId_Speaker, mfg_speaker_obelix_app_get_info, SF | FI}, #endif #ifdef CONFIG_BOARD_ASTERIX - { "Microphone", MfgTestId_Mic, mfg_mic_asterix_app_get_info, SF | FI }, + {"Microphone", MfgTestId_Mic, mfg_mic_asterix_app_get_info, SF | FI}, #elif defined(CONFIG_BOARD_OBELIX) - { "Microphone", MfgTestId_Mic, mfg_mic_obelix_app_get_info, SF | FI }, + {"Microphone", MfgTestId_Mic, mfg_mic_obelix_app_get_info, SF | FI}, #elif defined(CONFIG_BOARD_GETAFIX) - { "Microphone", MfgTestId_Mic, mfg_mic_getafix_app_get_info, SF | FI }, + {"Microphone", MfgTestId_Mic, mfg_mic_getafix_app_get_info, SF | FI}, #endif - { "ALS", MfgTestId_ALS, mfg_als_app_get_info, SF | FI }, - { "Vibration", MfgTestId_Vibration, mfg_vibration_app_get_info, SF | FI }, + {"ALS", MfgTestId_ALS, mfg_als_app_get_info, SF | FI}, + {"Vibration", MfgTestId_Vibration, mfg_vibration_app_get_info, SF | FI}, #if defined(CONFIG_BOARD_OBELIX) && defined(CONFIG_MFG) - { "HRM CTR/L", MfgTestId_HrmCtrLeakage, mfg_hrm_ctr_leakage_obelix_app_get_info, SF | FI }, + {"HRM CTR/L", MfgTestId_HrmCtrLeakage, mfg_hrm_ctr_leakage_obelix_app_get_info, SF | FI}, #endif - { "Charge", MfgTestId_Charge, mfg_charge_app_get_info, SF | FI }, - { "Program Color", MfgTestId_ProgramColor, mfg_program_color_app_get_info, FI }, + {"Charge", MfgTestId_Charge, mfg_charge_app_get_info, SF | FI}, + {"Program Color", MfgTestId_ProgramColor, mfg_program_color_app_get_info, FI}, }; #undef SF @@ -96,13 +96,13 @@ static int16_t s_last_selected = -1; //! Callback to run from the kernel main task static void prv_launch_app_cb(void *data) { - app_manager_launch_new_app(&(AppLaunchConfig) { .md = data }); + app_manager_launch_new_app(&(AppLaunchConfig){.md = data}); } static void prv_launch_test(int index, const PebbleProcessMd *md) { s_relaunch_menu = true; s_last_selected = index; - launcher_task_add_callback(prv_launch_app_cb, (void*) md); + launcher_task_add_callback(prv_launch_app_cb, (void *)md); } static void prv_select_test(int index, void *context) { @@ -115,7 +115,7 @@ static void prv_select_results(int index, void *context) { prv_launch_test(index, mfg_qr_results_app_get_info()); } -static const char * prv_get_status_prefix(MfgTestId test) { +static const char *prv_get_status_prefix(MfgTestId test) { const MfgTestResult *result = mfg_test_result_get(test); if (!result || !result->ran) { return "[ ]"; @@ -147,29 +147,26 @@ static void prv_window_load(Window *window) { char *title = app_malloc(len); snprintf(title, len, "%zu. %s %s", i + 1, prefix, s_entries[i]->title); - items[i] = (SimpleMenuItem) { - .title = title, - .callback = prv_select_test, + items[i] = (SimpleMenuItem){ + .title = title, + .callback = prv_select_test, }; } - items[s_num_entries] = (SimpleMenuItem) { - .title = "RESULTS", - .callback = prv_select_results, + items[s_num_entries] = (SimpleMenuItem){ + .title = "RESULTS", + .callback = prv_select_results, }; - data->menu_section = (SimpleMenuSection) { - .num_items = num_items, - .items = items - }; + data->menu_section = (SimpleMenuSection){.num_items = num_items, .items = items}; data->menu_layer = simple_menu_layer_create(bounds, data->window, &data->menu_section, 1, NULL); if (s_last_selected >= 0) { if (mfg_test_result_was_reported()) { const MfgTestResult *result = ((size_t)s_last_selected < s_num_entries) - ? mfg_test_result_get(s_entries[s_last_selected]->test_id) - : NULL; + ? mfg_test_result_get(s_entries[s_last_selected]->test_id) + : NULL; if (result && result->passed) { // Test passed: auto-advance to next test @@ -227,9 +224,9 @@ static void prv_run_menu(uint8_t mode) { data->window = window_create(); window_init(data->window, "Tests"); - window_set_window_handlers(data->window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(data->window, &(WindowHandlers){ + .load = prv_window_load, + }); window_set_fullscreen(data->window, true); app_window_stack_push(data->window, true); @@ -244,24 +241,26 @@ static void s_main_finished(void) { prv_run_menu(MFG_TEST_MODE_FINISHED); } -const PebbleProcessMd* mfg_test_menu_semi_finished_app_get_info(void) { +const PebbleProcessMd *mfg_test_menu_semi_finished_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main_semi_finished, - // UUID: 8a3f6c1e-9b2d-4f5a-a7c3-1d4e6b8f9a2c - .common.uuid = { 0x8a, 0x3f, 0x6c, 0x1e, 0x9b, 0x2d, 0x4f, 0x5a, - 0xa7, 0xc3, 0x1d, 0x4e, 0x6b, 0x8f, 0x9a, 0x2c }, - .name = "MfgTestMenuSF", + .common.main_func = &s_main_semi_finished, + // UUID: 8a3f6c1e-9b2d-4f5a-a7c3-1d4e6b8f9a2c + .common.uuid = + {0x8a, 0x3f, 0x6c, 0x1e, 0x9b, 0x2d, 0x4f, 0x5a, 0xa7, 0xc3, 0x1d, 0x4e, 0x6b, 0x8f, 0x9a, + 0x2c}, + .name = "MfgTestMenuSF", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } -const PebbleProcessMd* mfg_test_menu_finished_app_get_info(void) { +const PebbleProcessMd *mfg_test_menu_finished_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main_finished, - // UUID: 8a3f6c1e-9b2d-4f5a-a7c3-1d4e6b8f9a2d - .common.uuid = { 0x8a, 0x3f, 0x6c, 0x1e, 0x9b, 0x2d, 0x4f, 0x5a, - 0xa7, 0xc3, 0x1d, 0x4e, 0x6b, 0x8f, 0x9a, 0x2d }, - .name = "MfgTestMenuFI", + .common.main_func = &s_main_finished, + // UUID: 8a3f6c1e-9b2d-4f5a-a7c3-1d4e6b8f9a2d + .common.uuid = + {0x8a, 0x3f, 0x6c, 0x1e, 0x9b, 0x2d, 0x4f, 0x5a, 0xa7, 0xc3, 0x1d, 0x4e, 0x6b, 0x8f, 0x9a, + 0x2d}, + .name = "MfgTestMenuFI", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_test_menu.h b/src/fw/apps/prf/mfg_test_menu.h index 32a14785a3..2912b869ea 100644 --- a/src/fw/apps/prf/mfg_test_menu.h +++ b/src/fw/apps/prf/mfg_test_menu.h @@ -8,8 +8,8 @@ #include -const PebbleProcessMd* mfg_test_menu_semi_finished_app_get_info(void); -const PebbleProcessMd* mfg_test_menu_finished_app_get_info(void); +const PebbleProcessMd *mfg_test_menu_semi_finished_app_get_info(void); +const PebbleProcessMd *mfg_test_menu_finished_app_get_info(void); //! Check and clear the relaunch flag (set when returning from a test) bool mfg_test_menu_should_relaunch(void); diff --git a/src/fw/apps/prf/mfg_test_result.c b/src/fw/apps/prf/mfg_test_result.c index fd67294721..d606113345 100644 --- a/src/fw/apps/prf/mfg_test_result.c +++ b/src/fw/apps/prf/mfg_test_result.c @@ -38,14 +38,14 @@ static uint32_t s_record_count; static void prv_write_record(uint32_t index, MfgTestId test, uint8_t mode_index, bool passed, uint32_t value) { MfgResultRecord rec = { - .test_id = test, - .mode_index = mode_index, - .passed = passed, - .rsvd = 0, - .value = value, + .test_id = test, + .mode_index = mode_index, + .passed = passed, + .rsvd = 0, + .value = value, }; - flash_write_bytes((const uint8_t *)&rec, - FLASH_REGION_MFG_RESULTS_BEGIN + index * sizeof(rec), sizeof(rec)); + flash_write_bytes((const uint8_t *)&rec, FLASH_REGION_MFG_RESULTS_BEGIN + index * sizeof(rec), + sizeof(rec)); } static void prv_load(void) { @@ -58,10 +58,10 @@ static void prv_load(void) { } s_record_count = i + 1; if (rec.test_id < MfgTestIdCount && rec.mode_index < NUM_MODES) { - s_results[rec.mode_index][rec.test_id] = (MfgTestResult) { - .ran = true, - .passed = (rec.passed != 0), - .value = rec.value, + s_results[rec.mode_index][rec.test_id] = (MfgTestResult){ + .ran = true, + .passed = (rec.passed != 0), + .value = rec.value, }; } } @@ -83,8 +83,7 @@ static void prv_append(MfgTestId test, uint8_t mode_index, bool passed, uint32_t for (uint8_t m = 0; m < NUM_MODES; m++) { for (uint8_t t = 0; t < MfgTestIdCount; t++) { if (s_results[m][t].ran) { - prv_write_record(s_record_count++, t, m, s_results[m][t].passed, - s_results[m][t].value); + prv_write_record(s_record_count++, t, m, s_results[m][t].passed, s_results[m][t].value); } } } @@ -109,10 +108,10 @@ void mfg_test_result_report(MfgTestId test, bool passed, uint32_t value) { prv_append(test, s_mode_index, passed, value); #endif - s_results[s_mode_index][test] = (MfgTestResult) { - .ran = true, - .passed = passed, - .value = value, + s_results[s_mode_index][test] = (MfgTestResult){ + .ran = true, + .passed = passed, + .value = value, }; s_result_reported = true; } diff --git a/src/fw/apps/prf/mfg_test_result.h b/src/fw/apps/prf/mfg_test_result.h index ffb0e46a39..9fb44f436a 100644 --- a/src/fw/apps/prf/mfg_test_result.h +++ b/src/fw/apps/prf/mfg_test_result.h @@ -9,8 +9,8 @@ // Test mode bitmask #define MFG_TEST_MODE_SEMI_FINISHED (1 << 0) -#define MFG_TEST_MODE_FINISHED (1 << 1) -#define MFG_TEST_MODE_ALL (MFG_TEST_MODE_SEMI_FINISHED | MFG_TEST_MODE_FINISHED) +#define MFG_TEST_MODE_FINISHED (1 << 1) +#define MFG_TEST_MODE_ALL (MFG_TEST_MODE_SEMI_FINISHED | MFG_TEST_MODE_FINISHED) typedef enum { MfgTestId_Buttons, diff --git a/src/fw/apps/prf/mfg_touch.c b/src/fw/apps/prf/mfg_touch.c index e7485b3b34..5795fdb30d 100644 --- a/src/fw/apps/prf/mfg_touch.c +++ b/src/fw/apps/prf/mfg_touch.c @@ -1,7 +1,6 @@ /* SPDX-FileCopyrightText: 2025 Core Devices LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #include "applib/app.h" #include "applib/graphics/graphics.h" #include "applib/graphics/text.h" @@ -18,7 +17,7 @@ #include "pbl/services/light.h" #include "pbl/util/math.h" -#define TOUCH_SUPPORT_DEBUG 0 +#define TOUCH_SUPPORT_DEBUG 0 #define TEST_TIMEOUT_S (30) #define WINDOW_POP_TIME_S (3) @@ -91,8 +90,8 @@ static void prv_handle_second_tick(struct tm *tick_time, TimeUnits units_changed if (data->seconds_remaining == 0) { prv_complete_test(data, false); } else { - sniprintf(data->status_string, sizeof(data->status_string), - "%" PRIu32 "s", data->seconds_remaining); + sniprintf(data->status_string, sizeof(data->status_string), "%" PRIu32 "s", + data->seconds_remaining); text_layer_set_text(&data->status, data->status_string); layer_mark_dirty(&data->window.layer); data->seconds_remaining--; @@ -140,8 +139,7 @@ static void prv_trace_append(AppData *data, GPoint p) { return; } if (data->trace_len > 0 && - prv_dist_sq(p, data->trace[data->trace_len - 1]) < - TRACE_MIN_DIST_PX * TRACE_MIN_DIST_PX) { + prv_dist_sq(p, data->trace[data->trace_len - 1]) < TRACE_MIN_DIST_PX * TRACE_MIN_DIST_PX) { return; } data->trace[data->trace_len++] = p; @@ -166,17 +164,15 @@ static void prv_draw_walls(GContext *ctx, AppData *data) { int16_t y = GRID_SPACING_Y / 2 + (k - 1) * GRID_SPACING_Y + GRID_SPACING_Y / 2; if (k % 2 == 1) { // Rows connect on the right: wall spans from the left edge - graphics_draw_line(ctx, GPoint(0, y), - GPoint(PBL_DISPLAY_WIDTH - GRID_SPACING_X, y)); + graphics_draw_line(ctx, GPoint(0, y), GPoint(PBL_DISPLAY_WIDTH - GRID_SPACING_X, y)); } else { - graphics_draw_line(ctx, GPoint(GRID_SPACING_X, y), - GPoint(PBL_DISPLAY_WIDTH - 1, y)); + graphics_draw_line(ctx, GPoint(GRID_SPACING_X, y), GPoint(PBL_DISPLAY_WIDTH - 1, y)); } } #endif } -static void prv_update_proc(struct Layer *layer, GContext* ctx) { +static void prv_update_proc(struct Layer *layer, GContext *ctx) { AppData *data = app_state_get_user_data(); // This update proc replaces the default window one: clear the background @@ -229,8 +225,7 @@ static void prv_touch_event_handler(const TouchEvent *event, void *context) { if (!data->tracking) { // Stroke starts anywhere within the corridor mouth around the first dot - if (prv_dist_sq(p, data->dots[0]) <= - PATH_TOLERANCE_PX * PATH_TOLERANCE_PX) { + if (prv_dist_sq(p, data->dots[0]) <= PATH_TOLERANCE_PX * PATH_TOLERANCE_PX) { data->trace_len = 0; data->tracking = true; data->next_dot = 1; @@ -268,9 +263,8 @@ static void prv_touch_event_handler(const TouchEvent *event, void *context) { if (best_end > data->next_dot) { data->next_dot = best_end; } - while (data->next_dot < data->num_dots && - prv_dist_sq(p, data->dots[data->next_dot]) <= - DOT_CAPTURE_RADIUS_PX * DOT_CAPTURE_RADIUS_PX) { + while (data->next_dot < data->num_dots && prv_dist_sq(p, data->dots[data->next_dot]) <= + DOT_CAPTURE_RADIUS_PX * DOT_CAPTURE_RADIUS_PX) { data->next_dot++; } if (data->next_dot > data->best_progress) { @@ -350,8 +344,8 @@ static void prv_init_dots(AppData *data) { static void prv_handle_init(void) { AppData *data = app_malloc_check(sizeof(AppData)); - *data = (AppData) { - .seconds_remaining = TEST_TIMEOUT_S, + *data = (AppData){ + .seconds_remaining = TEST_TIMEOUT_S, }; app_state_set_user_data(data); @@ -368,8 +362,7 @@ static void prv_handle_init(void) { TextLayer *status = &data->status; // Centered overlay; kept small so it covers as little of the path as possible - text_layer_init(status, - &GRect(PBL_DISPLAY_WIDTH / 2 - 34, PBL_DISPLAY_HEIGHT / 2 - 20, 68, 40)); + text_layer_init(status, &GRect(PBL_DISPLAY_WIDTH / 2 - 34, PBL_DISPLAY_HEIGHT / 2 - 20, 68, 40)); text_layer_set_font(status, fonts_get_system_font(FONT_KEY_GOTHIC_24)); text_layer_set_text_alignment(status, GTextAlignmentCenter); text_layer_set_background_color(status, GColorWhite); @@ -391,13 +384,14 @@ static void s_main(void) { light_enable(false); } -const PebbleProcessMd* mfg_touch_app_get_info(void) { +const PebbleProcessMd *mfg_touch_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: a53e7d1c-d2ee-4592-96b9-5d33a46237db - .common.uuid = { 0xa5, 0x3e, 0x7d, 0x1c, 0xd2, 0xee, 0x45, 0x92, - 0x96, 0xb9, 0x5d, 0x33, 0xa4, 0x62, 0x37, 0xdb }, - .name = "MfgTouch", + .common.main_func = &s_main, + // UUID: a53e7d1c-d2ee-4592-96b9-5d33a46237db + .common.uuid = + {0xa5, 0x3e, 0x7d, 0x1c, 0xd2, 0xee, 0x45, 0x92, 0x96, 0xb9, 0x5d, 0x33, 0xa4, 0x62, 0x37, + 0xdb}, + .name = "MfgTouch", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_touch.h b/src/fw/apps/prf/mfg_touch.h index 706af6dcba..f257dad2d8 100644 --- a/src/fw/apps/prf/mfg_touch.h +++ b/src/fw/apps/prf/mfg_touch.h @@ -1,7 +1,6 @@ /* SPDX-FileCopyrightText: 2025 Core Devices LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #pragma once //! @file mfg_display.h @@ -10,4 +9,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_touch_app_get_info(void); +const PebbleProcessMd *mfg_touch_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_utilities.c b/src/fw/apps/prf/mfg_utilities.c index 898172fc5c..3f16c16ed2 100644 --- a/src/fw/apps/prf/mfg_utilities.c +++ b/src/fw/apps/prf/mfg_utilities.c @@ -86,9 +86,9 @@ static void prv_select_reset_results(int index, void *context) { #endif static const SimpleMenuItem s_menu_items[] = { - { .title = "Clear Bondings", .callback = prv_select_clear_bondings }, + {.title = "Clear Bondings", .callback = prv_select_clear_bondings}, #ifdef CONFIG_MFG - { .title = "Reset Results", .callback = prv_select_reset_results }, + {.title = "Reset Results", .callback = prv_select_reset_results}, #endif }; @@ -98,10 +98,8 @@ static void prv_window_load(Window *window) { Layer *window_layer = window_get_root_layer(data->window); GRect bounds = window_layer->bounds; - data->menu_section = (SimpleMenuSection) { - .num_items = ARRAY_LENGTH(s_menu_items), - .items = s_menu_items - }; + data->menu_section = + (SimpleMenuSection){.num_items = ARRAY_LENGTH(s_menu_items), .items = s_menu_items}; data->menu_layer = simple_menu_layer_create(bounds, data->window, &data->menu_section, 1, NULL); layer_add_child(window_layer, simple_menu_layer_get_layer(data->menu_layer)); @@ -115,22 +113,23 @@ static void s_main(void) { data->window = window_create(); window_init(data->window, "Utilities"); - window_set_window_handlers(data->window, &(WindowHandlers) { - .load = prv_window_load, - }); + window_set_window_handlers(data->window, &(WindowHandlers){ + .load = prv_window_load, + }); window_set_fullscreen(data->window, true); app_window_stack_push(data->window, true /*animated*/); app_event_loop(); } -const PebbleProcessMd* mfg_utilities_app_get_info(void) { +const PebbleProcessMd *mfg_utilities_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: 3e7b2c91-5a4d-4f68-b8e2-9c1d5f3a6b47 - .common.uuid = { 0x3e, 0x7b, 0x2c, 0x91, 0x5a, 0x4d, 0x4f, 0x68, - 0xb8, 0xe2, 0x9c, 0x1d, 0x5f, 0x3a, 0x6b, 0x47 }, - .name = "MfgUtilities", + .common.main_func = &s_main, + // UUID: 3e7b2c91-5a4d-4f68-b8e2-9c1d5f3a6b47 + .common.uuid = + {0x3e, 0x7b, 0x2c, 0x91, 0x5a, 0x4d, 0x4f, 0x68, 0xb8, 0xe2, 0x9c, 0x1d, 0x5f, 0x3a, 0x6b, + 0x47}, + .name = "MfgUtilities", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_utilities.h b/src/fw/apps/prf/mfg_utilities.h index a459529591..35934cccb0 100644 --- a/src/fw/apps/prf/mfg_utilities.h +++ b/src/fw/apps/prf/mfg_utilities.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_utilities_app_get_info(void); +const PebbleProcessMd *mfg_utilities_app_get_info(void); diff --git a/src/fw/apps/prf/mfg_vibration.c b/src/fw/apps/prf/mfg_vibration.c index fc2bff36f3..f50d48d29f 100644 --- a/src/fw/apps/prf/mfg_vibration.c +++ b/src/fw/apps/prf/mfg_vibration.c @@ -115,9 +115,9 @@ static void prv_handle_second_tick(struct tm *tick_time, TimeUnits units_changed static void prv_handle_init(void) { AppData *data = app_malloc_check(sizeof(AppData)); - *data = (AppData) { - .wait = 0, - .state = STATE_CALIBRATE, + *data = (AppData){ + .wait = 0, + .state = STATE_CALIBRATE, }; app_state_set_user_data(data); @@ -135,8 +135,7 @@ static void prv_handle_init(void) { TextLayer *status = &data->status; text_layer_init(status, - &GRect(5, 70, - window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 70)); + &GRect(5, 70, window->layer.bounds.size.w - 5, window->layer.bounds.size.h - 70)); text_layer_set_font(status, fonts_get_system_font(FONT_KEY_GOTHIC_24)); text_layer_set_text_alignment(status, GTextAlignmentCenter); layer_add_child(&window->layer, &status->layer); @@ -155,13 +154,14 @@ static void s_main(void) { vibes_cancel(); } -const PebbleProcessMd* mfg_vibration_app_get_info(void) { +const PebbleProcessMd *mfg_vibration_app_get_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common.main_func = &s_main, - // UUID: f676085a-b130-4492-b6a1-85492602ba00 - .common.uuid = { 0xf6, 0x76, 0x08, 0x5a, 0xb1, 0x30, 0x44, 0x92, - 0xb6, 0xa1, 0x85, 0x49, 0x26, 0x02, 0xba, 0x00 }, - .name = "MfgVibration", + .common.main_func = &s_main, + // UUID: f676085a-b130-4492-b6a1-85492602ba00 + .common.uuid = + {0xf6, 0x76, 0x08, 0x5a, 0xb1, 0x30, 0x44, 0x92, 0xb6, 0xa1, 0x85, 0x49, 0x26, 0x02, 0xba, + 0x00}, + .name = "MfgVibration", }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } diff --git a/src/fw/apps/prf/mfg_vibration.h b/src/fw/apps/prf/mfg_vibration.h index 4294c2fd78..dfc80d65e2 100644 --- a/src/fw/apps/prf/mfg_vibration.h +++ b/src/fw/apps/prf/mfg_vibration.h @@ -9,5 +9,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* mfg_vibration_app_get_info(void); - +const PebbleProcessMd *mfg_vibration_app_get_info(void); diff --git a/src/fw/apps/prf/recovery_first_use/getting_started_button_combo.c b/src/fw/apps/prf/recovery_first_use/getting_started_button_combo.c index d3aa49714e..aaa8335a14 100644 --- a/src/fw/apps/prf/recovery_first_use/getting_started_button_combo.c +++ b/src/fw/apps/prf/recovery_first_use/getting_started_button_combo.c @@ -16,10 +16,10 @@ void getting_started_button_combo_init(GettingStartedButtonComboState *state, GettingStartedButtonComboCallback select_callback) { - *state = (GettingStartedButtonComboState) { - .buttons_held_bitset = 0, - .combo_timer = new_timer_create(), - .select_callback = select_callback + *state = (GettingStartedButtonComboState){ + .buttons_held_bitset = 0, + .combo_timer = new_timer_create(), + .select_callback = select_callback }; } @@ -49,22 +49,22 @@ static void prv_timeout_expired(void *data) { PBL_LOG_INFO("Button combo timeout expired!"); // Timeout expired, jump over the app thread to do the thing. - void (*real_callback)(void*) = data; + void (*real_callback)(void *) = data; process_manager_send_callback_event_to_process(PebbleTask_App, real_callback, NULL); } static void prv_update_state(GettingStartedButtonComboState *state) { - const uint32_t COMBO_HOLD_MS = 5 * 1000; // Wait for 5 seconds + const uint32_t COMBO_HOLD_MS = 5 * 1000; // Wait for 5 seconds // Map of button combos -> callback to call if we hit it. const struct { uint8_t desired_bitset; - void (*callback)(void*); + void (*callback)(void *); } BUTTON_COMBOS[] = { - { (1 << BUTTON_ID_SELECT), state->select_callback }, - { (1 << BUTTON_ID_DOWN), prv_down_cb }, + {(1 << BUTTON_ID_SELECT), state->select_callback}, + {(1 << BUTTON_ID_DOWN), prv_down_cb}, #ifdef CONFIG_RECOVERY_FW - { (1 << BUTTON_ID_UP) | (1 << BUTTON_ID_SELECT), prv_mfg_mode_cb }, + {(1 << BUTTON_ID_UP) | (1 << BUTTON_ID_SELECT), prv_mfg_mode_cb}, #endif }; @@ -86,12 +86,12 @@ static void prv_update_state(GettingStartedButtonComboState *state) { void getting_started_button_combo_button_pressed(GettingStartedButtonComboState *state, ButtonId button_id) { - bitset8_set(&state->buttons_held_bitset, button_id); - prv_update_state(state); + bitset8_set(&state->buttons_held_bitset, button_id); + prv_update_state(state); } void getting_started_button_combo_button_released(GettingStartedButtonComboState *state, ButtonId button_id) { - bitset8_clear(&state->buttons_held_bitset, button_id); - prv_update_state(state); + bitset8_clear(&state->buttons_held_bitset, button_id); + prv_update_state(state); } diff --git a/src/fw/apps/prf/recovery_first_use/recovery_first_use.c b/src/fw/apps/prf/recovery_first_use/recovery_first_use.c index 2eda460e55..b7dae9226c 100644 --- a/src/fw/apps/prf/recovery_first_use/recovery_first_use.c +++ b/src/fw/apps/prf/recovery_first_use/recovery_first_use.c @@ -126,7 +126,7 @@ static void prv_raw_up_handler(ClickRecognizerRef recognizer, void *context) { click_recognizer_get_button_id(recognizer)); } -static void prv_click_configure(void* context) { +static void prv_click_configure(void *context) { window_raw_click_subscribe(BUTTON_ID_UP, prv_raw_down_handler, prv_raw_up_handler, NULL); window_raw_click_subscribe(BUTTON_ID_SELECT, prv_raw_down_handler, prv_raw_up_handler, NULL); window_raw_click_subscribe(BUTTON_ID_DOWN, prv_raw_down_handler, prv_raw_up_handler, NULL); @@ -164,8 +164,8 @@ static void prv_update_name_text(RecoveryFUAppData *data) { text_layer_set_text(&data->name_text_layer, data->name_text_buffer); } -static void prv_window_load(Window* window) { - struct RecoveryFUAppData *data = (struct RecoveryFUAppData*) window_get_user_data(window); +static void prv_window_load(Window *window) { + struct RecoveryFUAppData *data = (struct RecoveryFUAppData *)window_get_user_data(window); char serial_number[MFG_SERIAL_NUMBER_SIZE + 1]; char model_name[MFG_INFO_MODEL_STRING_LENGTH]; @@ -175,19 +175,17 @@ static void prv_window_load(Window* window) { snprintf(data->qr_url_buffer, QR_URL_BUFFER_SIZE, s_qr_url_fmt, serial_number, model_name); - QRCode* qr_code = &data->qr_code; - qr_code_init_with_parameters(qr_code, + QRCode *qr_code = &data->qr_code; + qr_code_init_with_parameters( + qr_code, #if PBL_ROUND #define QR_CODE_SIZE ((window->layer.bounds.size.w * 10) / 14) - &GRect((window->layer.bounds.size.w - QR_CODE_SIZE) / 2, - (window->layer.bounds.size.h - QR_CODE_SIZE) / 2, - QR_CODE_SIZE, QR_CODE_SIZE), + &GRect((window->layer.bounds.size.w - QR_CODE_SIZE) / 2, + (window->layer.bounds.size.h - QR_CODE_SIZE) / 2, QR_CODE_SIZE, QR_CODE_SIZE), #else - &GRect(10, 10, window->layer.bounds.size.w - 20, - window->layer.bounds.size.h - 30), + &GRect(10, 10, window->layer.bounds.size.w - 20, window->layer.bounds.size.h - 30), #endif - data->qr_url_buffer, strlen(data->qr_url_buffer), QRCodeECCMedium, - GColorBlack, GColorWhite); + data->qr_url_buffer, strlen(data->qr_url_buffer), QRCodeECCMedium, GColorBlack, GColorWhite); layer_add_child(&window->layer, &qr_code->layer); #if defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) @@ -196,33 +194,32 @@ static void prv_window_load(Window* window) { const uint16_t name_height = 20; #endif - TextLayer* name_text_layer = &data->name_text_layer; - text_layer_init_with_parameters(name_text_layer, - &GRect(0, window->layer.bounds.size.h - - PBL_IF_RECT_ELSE(name_height, name_height + 10), - window->layer.bounds.size.w, name_height), - NULL, + TextLayer *name_text_layer = &data->name_text_layer; + text_layer_init_with_parameters( + name_text_layer, + &GRect(0, window->layer.bounds.size.h - PBL_IF_RECT_ELSE(name_height, name_height + 10), + window->layer.bounds.size.w, name_height), + NULL, #if defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) - fonts_get_system_font(FONT_KEY_GOTHIC_24), + fonts_get_system_font(FONT_KEY_GOTHIC_24), #else - fonts_get_system_font(FONT_KEY_GOTHIC_14), + fonts_get_system_font(FONT_KEY_GOTHIC_14), #endif - GColorBlack, GColorWhite, GTextAlignmentCenter, - GTextOverflowModeTrailingEllipsis); + GColorBlack, GColorWhite, GTextAlignmentCenter, GTextOverflowModeTrailingEllipsis); layer_add_child(&window->layer, &name_text_layer->layer); data->is_showing_version = false; prv_update_name_text(data); } -static void prv_push_window(struct RecoveryFUAppData* data) { - Window* window = &data->launch_app_window; +static void prv_push_window(struct RecoveryFUAppData *data) { + Window *window = &data->launch_app_window; window_init(window, WINDOW_NAME("First Use / Recovery")); window_set_user_data(window, data); window_set_window_handlers(window, &(WindowHandlers){ - .load = prv_window_load, - }); + .load = prv_window_load, + }); window_set_click_config_provider_with_context(window, prv_click_configure, window); window_set_fullscreen(window, true); @@ -235,7 +232,7 @@ static void prv_push_window(struct RecoveryFUAppData* data) { //////////////////// // App Event Handler + Loop -static void prv_allow_pairing(RecoveryFUAppData* data, bool allow) { +static void prv_allow_pairing(RecoveryFUAppData *data, bool allow) { if (data->is_pairing_allowed == allow) { return; } @@ -300,27 +297,27 @@ static void handle_init(void) { data->is_pebble_mobile_app_connected = is_connected; prv_allow_pairing(data, !is_connected); - data->pebble_mobile_app_event_info = (EventServiceInfo) { - .type = PEBBLE_COMM_SESSION_EVENT, - .handler = prv_pebble_mobile_app_event_handler, + data->pebble_mobile_app_event_info = (EventServiceInfo){ + .type = PEBBLE_COMM_SESSION_EVENT, + .handler = prv_pebble_mobile_app_event_handler, }; event_service_client_subscribe(&data->pebble_mobile_app_event_info); - data->pebble_gather_logs_event_info = (EventServiceInfo) { - .type = PEBBLE_GATHER_DEBUG_INFO_EVENT, - .handler = prv_gather_debug_info_event_handler, + data->pebble_gather_logs_event_info = (EventServiceInfo){ + .type = PEBBLE_GATHER_DEBUG_INFO_EVENT, + .handler = prv_gather_debug_info_event_handler, }; event_service_client_subscribe(&data->pebble_gather_logs_event_info); - data->bt_connection_event_info = (EventServiceInfo) { - .type = PEBBLE_BT_CONNECTION_EVENT, - .handler = prv_bt_event_handler, + data->bt_connection_event_info = (EventServiceInfo){ + .type = PEBBLE_BT_CONNECTION_EVENT, + .handler = prv_bt_event_handler, }; event_service_client_subscribe(&data->bt_connection_event_info); - data->ble_device_name_updated_event_info = (EventServiceInfo) { - .type = PEBBLE_BLE_DEVICE_NAME_UPDATED_EVENT, - .handler = prv_bt_event_handler, + data->ble_device_name_updated_event_info = (EventServiceInfo){ + .type = PEBBLE_BLE_DEVICE_NAME_UPDATED_EVENT, + .handler = prv_bt_event_handler, }; event_service_client_subscribe(&data->ble_device_name_updated_event_info); @@ -357,19 +354,19 @@ static void prv_main(void) { handle_deinit(); } -const PebbleProcessMd* recovery_first_use_app_get_app_info(void) { +const PebbleProcessMd *recovery_first_use_app_get_app_info(void) { static const PebbleProcessMdSystem s_recovery_first_use_app = { - .common = { - .main_func = prv_main, - .visibility = ProcessVisibilityHidden, - // UUID: 85b80081-d78f-41aa-96fa-a821c79f3f0f - .uuid = { - 0x85, 0xb8, 0x00, 0x81, 0xd7, 0x8f, 0x41, 0xaa, - 0x96, 0xfa, 0xa8, 0x21, 0xc7, 0x9f, 0x3f, 0x0f - }, - }, - .name = "Getting Started", - .run_level = ProcessAppRunLevelSystem, + .common = + { + .main_func = prv_main, + .visibility = ProcessVisibilityHidden, + // UUID: 85b80081-d78f-41aa-96fa-a821c79f3f0f + .uuid = + {0x85, 0xb8, 0x00, 0x81, 0xd7, 0x8f, 0x41, 0xaa, 0x96, 0xfa, 0xa8, 0x21, 0xc7, + 0x9f, 0x3f, 0x0f}, + }, + .name = "Getting Started", + .run_level = ProcessAppRunLevelSystem, }; - return (const PebbleProcessMd*) &s_recovery_first_use_app; + return (const PebbleProcessMd *)&s_recovery_first_use_app; } diff --git a/src/fw/apps/prf/recovery_first_use/recovery_first_use.h b/src/fw/apps/prf/recovery_first_use/recovery_first_use.h index 96d5da5873..edbc0f6f5c 100644 --- a/src/fw/apps/prf/recovery_first_use/recovery_first_use.h +++ b/src/fw/apps/prf/recovery_first_use/recovery_first_use.h @@ -3,4 +3,4 @@ typedef struct PebbleProcessMd PebbleProcessMd; -const PebbleProcessMd* recovery_first_use_app_get_app_info(void); +const PebbleProcessMd *recovery_first_use_app_get_app_info(void); diff --git a/src/fw/apps/sdk/app.c b/src/fw/apps/sdk/app.c index 0b81639068..db487fde8f 100644 --- a/src/fw/apps/sdk/app.c +++ b/src/fw/apps/sdk/app.c @@ -127,17 +127,17 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* sdk_app_get_info(void) { +const PebbleProcessMd *sdk_app_get_info(void) { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = s_main, - // UUID: 1197fc39-47e7-439b-82be-f56d9ba1dbd8 - .uuid = { 0x11, 0x97, 0xfc, 0x39, 0x47, 0xe7, 0x43, 0x9b, - 0x82, 0xbe, 0xf5, 0x6d, 0x9b, 0xa1, 0xdb, 0xd8 }, - .process_type = ProcessTypeWatchface - }, - .icon_resource_id = RESOURCE_ID_MENU_ICON_TICTOC_WATCH, - .name = "TicToc" + .common = + {.main_func = s_main, + // UUID: 1197fc39-47e7-439b-82be-f56d9ba1dbd8 + .uuid = + {0x11, 0x97, 0xfc, 0x39, 0x47, 0xe7, 0x43, 0x9b, 0x82, 0xbe, 0xf5, 0x6d, 0x9b, 0xa1, + 0xdb, 0xd8}, + .process_type = ProcessTypeWatchface}, + .icon_resource_id = RESOURCE_ID_MENU_ICON_TICTOC_WATCH, + .name = "TicToc" }; - return (const PebbleProcessMd*) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } diff --git a/src/fw/apps/sdk/app.h b/src/fw/apps/sdk/app.h index ff55cd471a..7a965b0557 100644 --- a/src/fw/apps/sdk/app.h +++ b/src/fw/apps/sdk/app.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* sdk_app_get_info(void); +const PebbleProcessMd *sdk_app_get_info(void); diff --git a/src/fw/apps/system/alarms/alarm_detail.c b/src/fw/apps/system/alarms/alarm_detail.c index 75429f4034..5fe4edf341 100644 --- a/src/fw/apps/system/alarms/alarm_detail.c +++ b/src/fw/apps/system/alarms/alarm_detail.c @@ -53,7 +53,6 @@ typedef struct AlarmDetailData { void *callback_context; } AlarmDetailData; - static SimpleDialog *prv_snooze_set_confirm_dialog(void) { SimpleDialog *simple_dialog = simple_dialog_create("AlarmSnoozeSet"); Dialog *dialog = simple_dialog_get_dialog(simple_dialog); @@ -68,8 +67,7 @@ static SimpleDialog *prv_snooze_set_confirm_dialog(void) { return simple_dialog; } -static void prv_edit_snooze_delay(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_edit_snooze_delay(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { alarm_set_snooze_delay((uintptr_t)item->action_data); SimpleDialog *snooze_delay_dialog = prv_snooze_set_confirm_dialog(); @@ -78,7 +76,7 @@ static void prv_edit_snooze_delay(ActionMenu *action_menu, static void prv_toggle_enable_alarm_handler(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { - AlarmDetailData *data = (AlarmDetailData *) context; + AlarmDetailData *data = (AlarmDetailData *)context; alarm_set_enabled(data->alarm_id, !data->alarm_info.enabled); if (data->alarm_editor_callback) { data->alarm_editor_callback(EDITED, data->alarm_id, data->callback_context); @@ -101,27 +99,24 @@ static void prv_toggle_smart_alarm_handler(ActionMenu *action_menu, const Action } } -static void prv_edit_time_handler(ActionMenu *action_menu, - const ActionMenuItem *item, - void *context) { - AlarmDetailData *data = (AlarmDetailData *) context; +static void prv_edit_time_handler(ActionMenu *action_menu, const ActionMenuItem *item, + void *context) { + AlarmDetailData *data = (AlarmDetailData *)context; alarm_editor_update_alarm_time(data->alarm_id, data->alarm_info.is_smart ? AlarmType_Smart : AlarmType_Basic, data->alarm_editor_callback, data->callback_context); } -static void prv_edit_day_handler(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_edit_day_handler(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { - AlarmDetailData *data = (AlarmDetailData *) context; + AlarmDetailData *data = (AlarmDetailData *)context; alarm_editor_update_alarm_days(data->alarm_id, data->alarm_editor_callback, data->callback_context); } -static void prv_delete_alarm_handler(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_delete_alarm_handler(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { - AlarmDetailData *data = (AlarmDetailData *) context; + AlarmDetailData *data = (AlarmDetailData *)context; alarm_delete(data->alarm_id); if (data->alarm_editor_callback) { data->alarm_editor_callback(DELETED, data->alarm_id, data->callback_context); @@ -130,7 +125,7 @@ static void prv_delete_alarm_handler(ActionMenu *action_menu, static void prv_toggle_vibrate_handler(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { - AlarmDetailData *data = (AlarmDetailData *) context; + AlarmDetailData *data = (AlarmDetailData *)context; alarm_set_vibrate_enabled(data->alarm_id, !data->alarm_info.vibrate_enabled); if (data->alarm_editor_callback) { data->alarm_editor_callback(EDITED, data->alarm_id, data->callback_context); @@ -140,7 +135,7 @@ static void prv_toggle_vibrate_handler(ActionMenu *action_menu, const ActionMenu #ifdef CONFIG_SPEAKER static void prv_disable_sound_handler(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { - AlarmDetailData *data = (AlarmDetailData *) context; + AlarmDetailData *data = (AlarmDetailData *)context; alarm_set_sound_enabled(data->alarm_id, false); if (data->alarm_editor_callback) { data->alarm_editor_callback(EDITED, data->alarm_id, data->callback_context); @@ -149,7 +144,7 @@ static void prv_disable_sound_handler(ActionMenu *action_menu, const ActionMenuI static void prv_select_tone_handler(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { - AlarmDetailData *data = (AlarmDetailData *) context; + AlarmDetailData *data = (AlarmDetailData *)context; AlarmTone tone = (AlarmTone)(uintptr_t)item->action_data; alarm_set_tone(data->alarm_id, tone); alarm_set_sound_enabled(data->alarm_id, true); @@ -180,52 +175,53 @@ static void prv_sound_highlight_handler(const ActionMenuItem *item, void *contex prv_stop_sound_preview(); speaker_service_set_owner_task(PebbleTask_App); - speaker_service_play_note_seq(notes, count, SpeakerPriorityApp, - ALARM_SPEAKER_VOLUME); + speaker_service_play_note_seq(notes, count, SpeakerPriorityApp, ALARM_SPEAKER_VOLUME); } #endif static ActionMenuLevel *prv_create_main_menu(void) { - ActionMenuLevel *level = task_malloc(sizeof(ActionMenuLevel) + - DetailMenuItemIndexNum * sizeof(ActionMenuItem)); - if (!level) return NULL; - *level = (ActionMenuLevel) { - .num_items = DetailMenuItemIndexNum, - .parent_level = NULL, - .display_mode = ActionMenuLevelDisplayModeWide, + ActionMenuLevel *level = + task_malloc(sizeof(ActionMenuLevel) + DetailMenuItemIndexNum * sizeof(ActionMenuItem)); + if (!level) + return NULL; + *level = (ActionMenuLevel){ + .num_items = DetailMenuItemIndexNum, + .parent_level = NULL, + .display_mode = ActionMenuLevelDisplayModeWide, }; return level; } static ActionMenuLevel *prv_create_snooze_menu(ActionMenuLevel *parent_level) { - ActionMenuLevel *level = task_malloc(sizeof(ActionMenuLevel) + - NUM_SNOOZE_MENU_ITEMS * sizeof(ActionMenuItem)); - if (!level) return NULL; - *level = (ActionMenuLevel) { - .num_items = NUM_SNOOZE_MENU_ITEMS, - .parent_level = parent_level, - .display_mode = ActionMenuLevelDisplayModeWide, + ActionMenuLevel *level = + task_malloc(sizeof(ActionMenuLevel) + NUM_SNOOZE_MENU_ITEMS * sizeof(ActionMenuItem)); + if (!level) + return NULL; + *level = (ActionMenuLevel){ + .num_items = NUM_SNOOZE_MENU_ITEMS, + .parent_level = parent_level, + .display_mode = ActionMenuLevelDisplayModeWide, }; return level; } #ifdef CONFIG_SPEAKER static ActionMenuLevel *prv_create_sound_menu(ActionMenuLevel *parent_level) { - ActionMenuLevel *level = task_malloc(sizeof(ActionMenuLevel) + - NUM_SOUND_MENU_ITEMS * sizeof(ActionMenuItem)); - if (!level) return NULL; - *level = (ActionMenuLevel) { - .num_items = NUM_SOUND_MENU_ITEMS, - .parent_level = parent_level, - .display_mode = ActionMenuLevelDisplayModeWide, - .selection_changed = prv_sound_highlight_handler, + ActionMenuLevel *level = + task_malloc(sizeof(ActionMenuLevel) + NUM_SOUND_MENU_ITEMS * sizeof(ActionMenuItem)); + if (!level) + return NULL; + *level = (ActionMenuLevel){ + .num_items = NUM_SOUND_MENU_ITEMS, + .parent_level = parent_level, + .display_mode = ActionMenuLevelDisplayModeWide, + .selection_changed = prv_sound_highlight_handler, }; return level; } #endif -static void prv_alarm_detail_menu_will_close(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_alarm_detail_menu_will_close(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { (void)action_menu; (void)item; @@ -236,11 +232,10 @@ static void prv_alarm_detail_menu_will_close(ActionMenu *action_menu, #endif } -void prv_cleanup_alarm_detail_menu(ActionMenu *action_menu, - const ActionMenuItem *item, +void prv_cleanup_alarm_detail_menu(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { ActionMenuLevel *root_level = action_menu_get_root_level(action_menu); - AlarmDetailData *data = (AlarmDetailData *) context; + AlarmDetailData *data = (AlarmDetailData *)context; i18n_free_all(data); task_free((void *)root_level->items[DetailMenuItemIndexSnooze].next_level); #ifdef CONFIG_SPEAKER @@ -254,66 +249,66 @@ void prv_cleanup_alarm_detail_menu(ActionMenu *action_menu, void alarm_detail_window_push(AlarmId alarm_id, AlarmInfo *alarm_info, AlarmEditorCompleteCallback alarm_editor_callback, void *callback_context) { - AlarmDetailData* data = task_malloc_check(sizeof(AlarmDetailData)); - *data = (AlarmDetailData) { - .alarm_id = alarm_id, - .alarm_info = *alarm_info, - .alarm_editor_callback = alarm_editor_callback, - .callback_context = callback_context, - .menu_config = { - .context = data, - .colors.background = ALARMS_APP_HIGHLIGHT_COLOR, - .will_close = prv_alarm_detail_menu_will_close, - .did_close = prv_cleanup_alarm_detail_menu, - }, + AlarmDetailData *data = task_malloc_check(sizeof(AlarmDetailData)); + *data = (AlarmDetailData){ + .alarm_id = alarm_id, + .alarm_info = *alarm_info, + .alarm_editor_callback = alarm_editor_callback, + .callback_context = callback_context, + .menu_config = { + .context = data, + .colors.background = ALARMS_APP_HIGHLIGHT_COLOR, + .will_close = prv_alarm_detail_menu_will_close, + .did_close = prv_cleanup_alarm_detail_menu, + }, }; // Setup main menu items ActionMenuLevel *main_menu = prv_create_main_menu(); - main_menu->items[DetailMenuItemIndexDelete] = (ActionMenuItem) { - .label = i18n_get("Delete", data), - .perform_action = prv_delete_alarm_handler, - .action_data = data, + main_menu->items[DetailMenuItemIndexDelete] = (ActionMenuItem){ + .label = i18n_get("Delete", data), + .perform_action = prv_delete_alarm_handler, + .action_data = data, }; - main_menu->items[DetailMenuItemIndexEnable] = (ActionMenuItem) { - .label = data->alarm_info.enabled ? i18n_get("Disable", data) : i18n_get("Enable", data), - .perform_action = prv_toggle_enable_alarm_handler, - .action_data = data, + main_menu->items[DetailMenuItemIndexEnable] = (ActionMenuItem){ + .label = data->alarm_info.enabled ? i18n_get("Disable", data) : i18n_get("Enable", data), + .perform_action = prv_toggle_enable_alarm_handler, + .action_data = data, }; - main_menu->items[DetailMenuItemIndexChangeTime] = (ActionMenuItem) { - .label = i18n_get("Change Time", data), - .perform_action = prv_edit_time_handler, - .action_data = data, + main_menu->items[DetailMenuItemIndexChangeTime] = (ActionMenuItem){ + .label = i18n_get("Change Time", data), + .perform_action = prv_edit_time_handler, + .action_data = data, }; - main_menu->items[DetailMenuItemIndexChangeDays] = (ActionMenuItem) { - .label = i18n_get("Change Days", data), - .perform_action = prv_edit_day_handler, - .action_data = data, + main_menu->items[DetailMenuItemIndexChangeDays] = (ActionMenuItem){ + .label = i18n_get("Change Days", data), + .perform_action = prv_edit_day_handler, + .action_data = data, }; - main_menu->items[DetailMenuItemIndexConvertSmart] = (ActionMenuItem) { - .label = data->alarm_info.is_smart ? i18n_get("Convert to Basic Alarm", data) : - i18n_get("Convert to Smart Alarm", data), - .perform_action = prv_toggle_smart_alarm_handler, - .action_data = data, + main_menu->items[DetailMenuItemIndexConvertSmart] = (ActionMenuItem){ + .label = data->alarm_info.is_smart ? i18n_get("Convert to Basic Alarm", data) + : i18n_get("Convert to Smart Alarm", data), + .perform_action = prv_toggle_smart_alarm_handler, + .action_data = data, }; #ifdef CONFIG_SPEAKER - main_menu->items[DetailMenuItemIndexSound] = (ActionMenuItem) { - .label = i18n_get("Sound", data), - .is_leaf = 0, - .next_level = prv_create_sound_menu(main_menu), + main_menu->items[DetailMenuItemIndexSound] = (ActionMenuItem){ + .label = i18n_get("Sound", data), + .is_leaf = 0, + .next_level = prv_create_sound_menu(main_menu), }; #endif - main_menu->items[DetailMenuItemIndexVibration] = (ActionMenuItem) { - .label = data->alarm_info.vibrate_enabled ? i18n_get("Vibration: On", data) - : i18n_get("Vibration: Off", data), - .perform_action = prv_toggle_vibrate_handler, - .action_data = data, + main_menu->items[DetailMenuItemIndexVibration] = (ActionMenuItem){ + .label = data->alarm_info.vibrate_enabled ? i18n_get("Vibration: On", data) + : i18n_get("Vibration: Off", data), + .perform_action = prv_toggle_vibrate_handler, + .action_data = data, }; - main_menu->items[DetailMenuItemIndexSnooze] = (ActionMenuItem) { - .label = i18n_get("Snooze Delay", data), - .is_leaf = 0, - .next_level = prv_create_snooze_menu(main_menu), + main_menu->items[DetailMenuItemIndexSnooze] = (ActionMenuItem){ + .label = i18n_get("Snooze Delay", data), + .is_leaf = 0, + .next_level = prv_create_snooze_menu(main_menu), }; main_menu->separator_index = DetailMenuItemIndexSnooze; data->menu_config.root_level = main_menu; @@ -322,19 +317,16 @@ void alarm_detail_window_push(AlarmId alarm_id, AlarmInfo *alarm_info, ActionMenuLevel *snooze_level = main_menu->items[DetailMenuItemIndexSnooze].next_level; static const unsigned snooze_delays[NUM_SNOOZE_MENU_ITEMS] = {5, 10, 15, 30, 60}; static const char *snooze_delay_strs[NUM_SNOOZE_MENU_ITEMS] = { - i18n_noop("5 minutes"), - i18n_noop("10 minutes"), - i18n_noop("15 minutes"), - i18n_noop("30 minutes"), - i18n_noop("1 hour") + i18n_noop("5 minutes"), i18n_noop("10 minutes"), i18n_noop("15 minutes"), + i18n_noop("30 minutes"), i18n_noop("1 hour") }; unsigned current_snooze_delay = alarm_get_snooze_delay(); for (int i = 0; i < NUM_SNOOZE_MENU_ITEMS; i++) { - snooze_level->items[i] = (ActionMenuItem) { - .label = i18n_get(snooze_delay_strs[i], data), - .perform_action = prv_edit_snooze_delay, - .action_data = (void *) (uintptr_t) snooze_delays[i], + snooze_level->items[i] = (ActionMenuItem){ + .label = i18n_get(snooze_delay_strs[i], data), + .perform_action = prv_edit_snooze_delay, + .action_data = (void *)(uintptr_t)snooze_delays[i], }; if (current_snooze_delay == snooze_delays[i]) { @@ -346,19 +338,22 @@ void alarm_detail_window_push(AlarmId alarm_id, AlarmInfo *alarm_info, // Setup sound menu items: Off + one entry per AlarmTone. ActionMenuLevel *sound_level = main_menu->items[DetailMenuItemIndexSound].next_level; static const AlarmTone tone_values[] = { - AlarmTone_Reveille, AlarmTone_Beacon, AlarmTone_Bell, AlarmTone_Chime, + AlarmTone_Reveille, + AlarmTone_Beacon, + AlarmTone_Bell, + AlarmTone_Chime, }; - sound_level->items[0] = (ActionMenuItem) { - .label = i18n_ctx_get("AlarmSound", "Off", data), - .perform_action = prv_disable_sound_handler, - .action_data = data, + sound_level->items[0] = (ActionMenuItem){ + .label = i18n_ctx_get("AlarmSound", "Off", data), + .perform_action = prv_disable_sound_handler, + .action_data = data, }; const int num_tones = (int)(sizeof(tone_values) / sizeof(tone_values[0])); for (int i = 0; i < num_tones; i++) { - sound_level->items[i + 1] = (ActionMenuItem) { - .label = i18n_get(alarm_tones_get_name(tone_values[i]), data), - .perform_action = prv_select_tone_handler, - .action_data = (void *)(uintptr_t)tone_values[i], + sound_level->items[i + 1] = (ActionMenuItem){ + .label = i18n_get(alarm_tones_get_name(tone_values[i]), data), + .perform_action = prv_select_tone_handler, + .action_data = (void *)(uintptr_t)tone_values[i], }; } // Bounds-check the stored tone before indexing the menu. The 3-bit storage diff --git a/src/fw/apps/system/alarms/alarm_editor.c b/src/fw/apps/system/alarms/alarm_editor.c index d8f62975ee..15219f1193 100644 --- a/src/fw/apps/system/alarms/alarm_editor.c +++ b/src/fw/apps/system/alarms/alarm_editor.c @@ -94,28 +94,28 @@ static void prv_day_picker_callback(DayPickerResult result, void *context) { if (data->creating_alarm) { if (data->alarm_kind == ALARM_KIND_CUSTOM) { const AlarmInfo info = { - .hour = data->alarm_hour, - .minute = data->alarm_minute, - .kind = ALARM_KIND_CUSTOM, - .scheduled_days = &result.custom_days, - .is_smart = (data->alarm_type == AlarmType_Smart), - .vibrate_enabled = true, + .hour = data->alarm_hour, + .minute = data->alarm_minute, + .kind = ALARM_KIND_CUSTOM, + .scheduled_days = &result.custom_days, + .is_smart = (data->alarm_type == AlarmType_Smart), + .vibrate_enabled = true, #ifdef CONFIG_SPEAKER - .sound_enabled = false, - .tone = AlarmTone_Reveille, + .sound_enabled = false, + .tone = AlarmTone_Reveille, #endif }; data->alarm_id = alarm_create(&info); } else { const AlarmInfo info = { - .hour = data->alarm_hour, - .minute = data->alarm_minute, - .kind = data->alarm_kind, - .is_smart = (data->alarm_type == AlarmType_Smart), - .vibrate_enabled = true, + .hour = data->alarm_hour, + .minute = data->alarm_minute, + .kind = data->alarm_kind, + .is_smart = (data->alarm_type == AlarmType_Smart), + .vibrate_enabled = true, #ifdef CONFIG_SPEAKER - .sound_enabled = false, - .tone = AlarmTone_Reveille, + .sound_enabled = false, + .tone = AlarmTone_Reveille, #endif }; data->alarm_id = alarm_create(&info); @@ -158,38 +158,39 @@ static void prv_time_picker_window_unload(Window *window) { static void prv_time_picker_window_appear(Window *window) { AlarmEditorData *data = (AlarmEditorData *)window_get_user_data(window); const bool is_smart = (data->alarm_type == AlarmType_Smart); - const char *label = (!data->creating_alarm ? i18n_noop("Change Time") : - is_smart ? i18n_noop("New Smart Alarm") : i18n_noop("New Alarm")); - const char *range_text = PBL_IF_RECT_ELSE(i18n_noop("Wake up between"), - i18n_noop("Wake up interval")); + const char *label = (!data->creating_alarm ? i18n_noop("Change Time") + : is_smart ? i18n_noop("New Smart Alarm") + : i18n_noop("New Alarm")); + const char *range_text = + PBL_IF_RECT_ELSE(i18n_noop("Wake up between"), i18n_noop("Wake up interval")); const TimeSelectionWindowConfig config = { - .label = i18n_get(label, data), - .range = { - .update = true, - .text = is_smart ? i18n_get(range_text, data) : NULL, - .duration_m = SMART_ALARM_RANGE_S / SECONDS_PER_MINUTE, - .enabled = is_smart, - }, + .label = i18n_get(label, data), + .range = { + .update = true, + .text = is_smart ? i18n_get(range_text, data) : NULL, + .duration_m = SMART_ALARM_RANGE_S / SECONDS_PER_MINUTE, + .enabled = is_smart, + }, }; time_selection_window_configure(&data->time_picker_window, &config); data->time_picker_window.selection_layer.selected_cell_idx = 0; } static void prv_time_picker_complete(TimeSelectionWindowData *time_picker_window, void *cb_data) { - AlarmEditorData *data = (AlarmEditorData *) cb_data; + AlarmEditorData *data = (AlarmEditorData *)cb_data; data->time_picker_was_completed = true; data->alarm_hour = time_picker_window->time_data.hour; data->alarm_minute = time_picker_window->time_data.minute; if (data->creating_alarm) { DayPickerResult initial = { - .kind = DayPickerKindJustOnce, + .kind = DayPickerKindJustOnce, }; memset(initial.custom_days, 0, sizeof(initial.custom_days)); DayPickerConfig config = { - .initial = initial, - .highlight_color = ALARMS_APP_HIGHLIGHT_COLOR, - .allow_once = true, + .initial = initial, + .highlight_color = ALARMS_APP_HIGHLIGHT_COLOR, + .allow_once = true, }; day_picker_push(config, prv_day_picker_callback, data); } else { @@ -200,12 +201,12 @@ static void prv_time_picker_complete(TimeSelectionWindowData *time_picker_window static void prv_setup_time_picker_window(AlarmEditorData *data) { const TimeSelectionWindowConfig config = { - .color = ALARMS_APP_HIGHLIGHT_COLOR, - .callback = { - .update = true, - .complete = prv_time_picker_complete, - .context = data, - }, + .color = ALARMS_APP_HIGHLIGHT_COLOR, + .callback = { + .update = true, + .complete = prv_time_picker_complete, + .context = data, + }, }; time_selection_window_init(&data->time_picker_window, &config); window_set_user_data(&data->time_picker_window.window, data); @@ -250,12 +251,12 @@ static void prv_type_menu_select(OptionMenu *option_menu, int selection, void *c static void prv_setup_type_menu_window(AlarmEditorData *data) { const OptionMenuCallbacks callbacks = { - .select = prv_type_menu_select, - .unload = prv_type_menu_unload, + .select = prv_type_menu_select, + .unload = prv_type_menu_unload, }; static const char *s_type_labels[AlarmTypeCount] = { - [AlarmType_Basic] = i18n_noop("Basic Alarm"), - [AlarmType_Smart] = i18n_noop("Smart Alarm"), + [AlarmType_Basic] = i18n_noop("Basic Alarm"), + [AlarmType_Smart] = i18n_noop("Smart Alarm"), }; const char *title = i18n_get("New Alarm", data); OptionMenu *option_menu = settings_option_menu_create( @@ -269,14 +270,14 @@ static void prv_setup_type_menu_window(AlarmEditorData *data) { /////////////////////////////////////////////////////////////////////////////////////////////////// //! Public API -Window* alarm_editor_create_new_alarm(AlarmEditorCompleteCallback complete_callback, +Window *alarm_editor_create_new_alarm(AlarmEditorCompleteCallback complete_callback, void *callback_context) { - AlarmEditorData* data = task_malloc_check(sizeof(AlarmEditorData)); - *data = (AlarmEditorData) { - .alarm_id = ALARM_INVALID_ID, - .complete_callback = complete_callback, - .callback_context = callback_context, - .creating_alarm = true, + AlarmEditorData *data = task_malloc_check(sizeof(AlarmEditorData)); + *data = (AlarmEditorData){ + .alarm_id = ALARM_INVALID_ID, + .complete_callback = complete_callback, + .callback_context = callback_context, + .creating_alarm = true, }; prv_setup_time_picker_window(data); @@ -287,12 +288,12 @@ Window* alarm_editor_create_new_alarm(AlarmEditorCompleteCallback complete_callb void alarm_editor_update_alarm_time(AlarmId alarm_id, AlarmType alarm_type, AlarmEditorCompleteCallback complete_callback, void *callback_context) { - AlarmEditorData* data = task_malloc_check(sizeof(AlarmEditorData)); - *data = (AlarmEditorData) { - .alarm_id = alarm_id, - .alarm_type = alarm_type, - .complete_callback = complete_callback, - .callback_context = callback_context, + AlarmEditorData *data = task_malloc_check(sizeof(AlarmEditorData)); + *data = (AlarmEditorData){ + .alarm_id = alarm_id, + .alarm_type = alarm_type, + .complete_callback = complete_callback, + .callback_context = callback_context, }; prv_setup_time_picker_window(data); @@ -302,11 +303,11 @@ void alarm_editor_update_alarm_time(AlarmId alarm_id, AlarmType alarm_type, void alarm_editor_update_alarm_days(AlarmId alarm_id, AlarmEditorCompleteCallback complete_callback, void *callback_context) { - AlarmEditorData* data = task_malloc_check(sizeof(AlarmEditorData)); - *data = (AlarmEditorData) { - .alarm_id = alarm_id, - .complete_callback = complete_callback, - .callback_context = callback_context, + AlarmEditorData *data = task_malloc_check(sizeof(AlarmEditorData)); + *data = (AlarmEditorData){ + .alarm_id = alarm_id, + .complete_callback = complete_callback, + .callback_context = callback_context, }; alarm_get_kind(alarm_id, &data->alarm_kind); @@ -319,9 +320,9 @@ void alarm_editor_update_alarm_days(AlarmId alarm_id, AlarmEditorCompleteCallbac } DayPickerConfig config = { - .initial = initial, - .highlight_color = ALARMS_APP_HIGHLIGHT_COLOR, - .allow_once = true, + .initial = initial, + .highlight_color = ALARMS_APP_HIGHLIGHT_COLOR, + .allow_once = true, }; day_picker_push(config, prv_day_picker_callback, data); } diff --git a/src/fw/apps/system/alarms/alarm_editor.h b/src/fw/apps/system/alarms/alarm_editor.h index 481fa05cc8..fe4b657dad 100644 --- a/src/fw/apps/system/alarms/alarm_editor.h +++ b/src/fw/apps/system/alarms/alarm_editor.h @@ -16,7 +16,7 @@ typedef enum { typedef void (*AlarmEditorCompleteCallback)(AlarmEditorResult result, AlarmId id, void *callback_context); -Window* alarm_editor_create_new_alarm(AlarmEditorCompleteCallback editor_complete_callback, +Window *alarm_editor_create_new_alarm(AlarmEditorCompleteCallback editor_complete_callback, void *callback_context); void alarm_editor_update_alarm_time(AlarmId alarm_id, AlarmType alarm_type, diff --git a/src/fw/apps/system/alarms/alarms.c b/src/fw/apps/system/alarms/alarms.c index b58b64cdfe..5c810b2dd6 100644 --- a/src/fw/apps/system/alarms/alarms.c +++ b/src/fw/apps/system/alarms/alarms.c @@ -55,13 +55,12 @@ typedef struct AlarmsAppData { EventServiceInfo alarm_event_info; } AlarmsAppData; - /////////////////////////////////////////////////////////////////////////////////////////////////// //! Alarm list functions static int prv_alarm_comparator(void *a, void *b) { - AlarmNode *alarm_a = (AlarmNode*) a; - AlarmNode *alarm_b = (AlarmNode*) b; + AlarmNode *alarm_a = (AlarmNode *)a; + AlarmNode *alarm_b = (AlarmNode *)b; // Sort by alarm time, with 12:00AM being the starting point if (alarm_a->info.hour > alarm_b->info.hour) { @@ -73,10 +72,10 @@ static int prv_alarm_comparator(void *a, void *b) { return false; } -static void prv_clear_alarm_list(AlarmsAppData* data) { +static void prv_clear_alarm_list(AlarmsAppData *data) { while (data->alarm_list_head) { - AlarmNode* old_head = data->alarm_list_head; - data->alarm_list_head = (AlarmNode*) list_pop_head((ListNode *) old_head); + AlarmNode *old_head = data->alarm_list_head; + data->alarm_list_head = (AlarmNode *)list_pop_head((ListNode *)old_head); task_free(old_head); old_head = NULL; } @@ -86,15 +85,13 @@ static void prv_add_alarm_to_list(AlarmId id, const AlarmInfo *info, void *callb AlarmsAppData *data = (AlarmsAppData *)callback_context; AlarmNode *new_node = task_malloc_check(sizeof(AlarmNode)); - list_init((ListNode*) new_node); + list_init((ListNode *)new_node); new_node->id = id; new_node->info = *info; memcpy(&new_node->scheduled_days, info->scheduled_days, sizeof(new_node->scheduled_days)); new_node->info.scheduled_days = &new_node->scheduled_days; - data->alarm_list_head = (AlarmNode *)list_sorted_add((ListNode *)data->alarm_list_head, - (ListNode *)new_node, - prv_alarm_comparator, - false); + data->alarm_list_head = (AlarmNode *)list_sorted_add( + (ListNode *)data->alarm_list_head, (ListNode *)new_node, prv_alarm_comparator, false); } static void prv_update_alarm_list(AlarmsAppData *data) { @@ -105,10 +102,9 @@ static void prv_update_alarm_list(AlarmsAppData *data) { } static bool prv_are_alarms_scheduled(AlarmsAppData *data) { - return (list_count((ListNode*) data->alarm_list_head) > 0); + return (list_count((ListNode *)data->alarm_list_head) > 0); } - /////////////////////////////////////////////////////////////////////////////////////////////////// //! General helper functions @@ -124,7 +120,7 @@ static void prv_show_deleted_dialog(void) { app_simple_dialog_push(simple_dialog); } -static int prv_get_list_idx_of_alarm_id(AlarmsAppData* data, AlarmId id) { +static int prv_get_list_idx_of_alarm_id(AlarmsAppData *data, AlarmId id) { if (id == ALARM_INVALID_ID) { return 0; } @@ -136,16 +132,15 @@ static int prv_get_list_idx_of_alarm_id(AlarmsAppData* data, AlarmId id) { return list_idx; } list_idx++; - cur_node = (AlarmNode* )list_get_next((ListNode*) cur_node); + cur_node = (AlarmNode *)list_get_next((ListNode *)cur_node); } return 0; } -static void prv_update_menu_layer(AlarmsAppData* data, AlarmId select_alarm) { - MenuIndex selected_menu_index = {0, prv_get_list_idx_of_alarm_id(data, select_alarm)}; - menu_layer_reload_data(&data->menu_layer); - menu_layer_set_selected_index(&data->menu_layer, selected_menu_index, - MenuRowAlignCenter, false); +static void prv_update_menu_layer(AlarmsAppData *data, AlarmId select_alarm) { + MenuIndex selected_menu_index = {0, prv_get_list_idx_of_alarm_id(data, select_alarm)}; + menu_layer_reload_data(&data->menu_layer); + menu_layer_set_selected_index(&data->menu_layer, selected_menu_index, MenuRowAlignCenter, false); } static void prv_handle_alarm_editor_complete(AlarmEditorResult result, AlarmId id, @@ -177,12 +172,11 @@ static void prv_handle_alarm_event(PebbleEvent *e, void *callback_context) { prv_update_alarm_list(data); } -static void prv_create_new_alarm(AlarmsAppData* data) { +static void prv_create_new_alarm(AlarmsAppData *data) { Window *editor = alarm_editor_create_new_alarm(prv_handle_alarm_editor_complete, data); app_window_stack_push(editor, true); } - /////////////////////////////////////////////////////////////////////////////////////////////////// //! Menu Layer Callbacks @@ -200,7 +194,7 @@ static uint16_t prv_alarm_list_get_num_rows_callback(struct MenuLayer *menu_laye void *callback_context) { AlarmsAppData *data = (AlarmsAppData *)callback_context; // Number of alarms + the add alarm header - return list_count((ListNode*) data->alarm_list_head) + 1; + return list_count((ListNode *)data->alarm_list_head) + 1; } static int16_t prv_alarm_list_get_cell_height_callback(struct MenuLayer *menu_layer, @@ -221,33 +215,30 @@ static void prv_alarm_list_draw_row_callback(GContext *ctx, const Layer *cell_la AlarmsAppData *data = (AlarmsAppData *)callback_context; if (prv_is_add_alarm_cell(cell_index)) { - GRect box; uint32_t new_bitmap_resource = RESOURCE_ID_PLUS_ICON_BLACK; - if (!data->can_schedule_alarm) { // alarm limit reached + if (!data->can_schedule_alarm) { // alarm limit reached if (menu_cell_layer_is_highlighted(cell_layer)) { if (data->show_limit_reached_text) { // Trying to add a new alarm when list is already full - const GFont font = - system_theme_get_font_for_default_size(TextStyleFont_MenuCellSubtitle); + const GFont font = system_theme_get_font_for_default_size(TextStyleFont_MenuCellSubtitle); box = GRect(0, 0, cell_layer->bounds.size.w, fonts_get_font_height(font)); const char *text = i18n_get("Limit reached.", data); - box.size = graphics_text_layout_get_max_used_size(ctx, text, font, box, - GTextOverflowModeTrailingEllipsis, - GTextAlignmentCenter, NULL); + box.size = graphics_text_layout_get_max_used_size( + ctx, text, font, box, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); grect_align(&box, &cell_layer->bounds, GAlignCenter, true /* clip */); box.origin.y -= fonts_get_font_cap_offset(font); - graphics_draw_text(ctx, text, font, box, - GTextOverflowModeFill, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, text, font, box, GTextOverflowModeFill, GTextAlignmentCenter, + NULL); return; - } else { // "add alarm" cell highlighted + } else { // "add alarm" cell highlighted new_bitmap_resource = RESOURCE_ID_PLUS_ICON_DOTTED; } - } else { // "add alarm" cell not highlighted + } else { // "add alarm" cell not highlighted // Have to manually override the tint color as we're using a color that differs // from the ones the MenuLayer uses. graphics_context_set_tint_color(ctx, GColorLightGray); @@ -261,7 +252,6 @@ static void prv_alarm_list_draw_row_callback(GContext *ctx, const Layer *cell_la gbitmap_init_with_resource(&data->plus_icon, data->current_plus_icon_resource_id); } - box.origin = GPoint((cell_layer->bounds.size.w - data->plus_icon.bounds.size.w) / 2, (cell_layer->bounds.size.h - data->plus_icon.bounds.size.h) / 2); box.size = data->plus_icon.bounds.size; @@ -271,31 +261,33 @@ static void prv_alarm_list_draw_row_callback(GContext *ctx, const Layer *cell_la return; } - AlarmNode *node = (AlarmNode*) list_get_at((ListNode*)data->alarm_list_head, cell_index->row - 1); + AlarmNode *node = + (AlarmNode *)list_get_at((ListNode *)data->alarm_list_head, cell_index->row - 1); // Format 1: 10:34 AM // Format 2: 14:56 char alarm_time_text[9]; - clock_format_time(alarm_time_text, sizeof(alarm_time_text), - node->info.hour, node->info.minute, true); + clock_format_time(alarm_time_text, sizeof(alarm_time_text), node->info.hour, node->info.minute, + true); const char *enabled = node->info.enabled ? i18n_get("ON", data) : i18n_get("OFF", data); graphics_context_set_compositing_mode(ctx, GCompOpTint); // If the alarm is not smart, use the icon as spacing but don't render it. // Otherwise if the alarm is smart draw according to the menu highlight. - graphics_context_set_tint_color(ctx, !node->info.is_smart ? GColorClear : - (cell_layer->is_highlighted ? GColorWhite : GColorBlack)); + graphics_context_set_tint_color( + ctx, !node->info.is_smart ? GColorClear + : (cell_layer->is_highlighted ? GColorWhite : GColorBlack)); char alarm_day_text[32] = {0}; MenuCellLayerConfig config = { - .title = alarm_time_text, - .value = enabled, - .icon = &data->smart_alarm_icon, - .icon_align = MenuCellLayerIconAlign_TopLeft, - .icon_box_model = &(GBoxModel) { .offset = { 0, 5 }, .margin = { 6, 0 } }, - .icon_form_fit = true, - .horizontal_inset = PBL_IF_ROUND_ELSE(-6, 0), - .overflow_mode = GTextOverflowModeTrailingEllipsis, + .title = alarm_time_text, + .value = enabled, + .icon = &data->smart_alarm_icon, + .icon_align = MenuCellLayerIconAlign_TopLeft, + .icon_box_model = &(GBoxModel){.offset = {0, 5}, .margin = {6, 0}}, + .icon_form_fit = true, + .horizontal_inset = PBL_IF_ROUND_ELSE(-6, 0), + .overflow_mode = GTextOverflowModeTrailingEllipsis, }; if (node->info.kind != ALARM_KIND_CUSTOM) { const bool all_caps = false; @@ -350,12 +342,12 @@ static void prv_alarms_app_opened_click_handler(ClickRecognizerRef recognizer, v static void prv_push_alarms_app_opened_dialog(AlarmsAppData *data) { const char *first_use_text = i18n_get( "Let us wake you in your lightest sleep so you're fully refreshed! " - "Smart Alarm wakes you up to 30min before your alarm.", data); + "Smart Alarm wakes you up to 30min before your alarm.", + data); const char *header = i18n_get("Smart Alarm", data); ExpandableDialog *expandable_dialog = expandable_dialog_create_with_params( - header, RESOURCE_ID_SMART_ALARM_TINY, first_use_text, - GColorBlack, GColorWhite, NULL, RESOURCE_ID_ACTION_BAR_ICON_CHECK, - prv_alarms_app_opened_click_handler); + header, RESOURCE_ID_SMART_ALARM_TINY, first_use_text, GColorBlack, GColorWhite, NULL, + RESOURCE_ID_ACTION_BAR_ICON_CHECK, prv_alarms_app_opened_click_handler); expandable_dialog_set_action_bar_background_color(expandable_dialog, ALARMS_APP_HIGHLIGHT_COLOR); expandable_dialog_set_header(expandable_dialog, header); @@ -373,7 +365,7 @@ static void prv_push_alarms_app_opened_dialog(AlarmsAppData *data) { static void prv_handle_init(void) { AlarmsAppData *data = app_malloc_check(sizeof(*data)); - *data = (AlarmsAppData) {{ .user_data = NULL }}; + *data = (AlarmsAppData){{.user_data = NULL}}; Window *window = &data->window; window_init(window, WINDOW_NAME("Alarms")); @@ -383,24 +375,28 @@ static void prv_handle_init(void) { // Alarm list must be updated before menu layer is initialized prv_update_alarm_list(data); - const GRect bounds = grect_inset(data->window.layer.bounds, - GEdgeInsets(STATUS_BAR_LAYER_HEIGHT, 0, - PBL_IF_ROUND_ELSE(STATUS_BAR_LAYER_HEIGHT, 0), 0)); + const GRect bounds = grect_inset( + data->window.layer.bounds, + GEdgeInsets(STATUS_BAR_LAYER_HEIGHT, 0, PBL_IF_ROUND_ELSE(STATUS_BAR_LAYER_HEIGHT, 0), 0)); menu_layer_init(&data->menu_layer, &bounds); - menu_layer_set_callbacks(&data->menu_layer, data, &(MenuLayerCallbacks) { - .get_num_sections = prv_alarm_list_get_num_sections_callback, - .get_num_rows = prv_alarm_list_get_num_rows_callback, - .get_cell_height = prv_alarm_list_get_cell_height_callback, - .draw_row = prv_alarm_list_draw_row_callback, - .select_click = prv_alarm_list_select_callback, - .selection_changed = prv_alarm_list_selection_changed_callback - }); + menu_layer_set_callbacks(&data->menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_sections = prv_alarm_list_get_num_sections_callback, + .get_num_rows = prv_alarm_list_get_num_rows_callback, + .get_cell_height = prv_alarm_list_get_cell_height_callback, + .draw_row = prv_alarm_list_draw_row_callback, + .select_click = prv_alarm_list_select_callback, + .selection_changed = prv_alarm_list_selection_changed_callback + }); menu_layer_set_highlight_colors(&data->menu_layer, ALARMS_APP_HIGHLIGHT_COLOR, GColorWhite); menu_layer_set_click_config_onto_window(&data->menu_layer, &data->window); - menu_layer_set_scroll_wrap_around(&data->menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(&data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(&data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_wrap_around(&data->menu_layer, + shell_prefs_get_menu_scroll_wrap_around_enable()); + menu_layer_set_scroll_vibe_on_wrap( + &data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + &data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&data->window.layer, menu_layer_get_layer(&data->menu_layer)); status_bar_layer_init(&data->status_layer); @@ -415,26 +411,26 @@ static void prv_handle_init(void) { app_state_set_user_data(data); - data->alarm_event_info = (EventServiceInfo) { - .type = PEBBLE_ALARM_CLOCK_EVENT, - .handler = prv_handle_alarm_event, - .context = data, + data->alarm_event_info = (EventServiceInfo){ + .type = PEBBLE_ALARM_CLOCK_EVENT, + .handler = prv_handle_alarm_event, + .context = data, }; event_service_client_subscribe(&data->alarm_event_info); if (prv_are_alarms_scheduled(data)) { - int list_idx = 1; // Default to first alarm entry in list + int list_idx = 1; // Default to first alarm entry in list if (app_launch_reason() == APP_LAUNCH_TIMELINE_ACTION) { AlarmId alarm_id = (AlarmId)app_launch_get_args(); list_idx = prv_get_list_idx_of_alarm_id(data, alarm_id); if (list_idx == 0) { - list_idx = 1; // Default to first alarm if idx not found + list_idx = 1; // Default to first alarm if idx not found } } app_window_stack_push(&data->window, true); - menu_layer_set_selected_index(&data->menu_layer, MenuIndex(0, list_idx), - MenuRowAlignCenter, false); + menu_layer_set_selected_index(&data->menu_layer, MenuIndex(0, list_idx), MenuRowAlignCenter, + false); } else { Window *editor = alarm_editor_create_new_alarm(prv_handle_alarm_editor_complete, data); app_window_stack_push(editor, true); @@ -466,14 +462,15 @@ static void s_main(void) { prv_handle_deinit(); } -const PebbleProcessMd* alarms_app_get_info() { +const PebbleProcessMd *alarms_app_get_info() { static const PebbleProcessMdSystem s_alarms_app_info = { - .common = { - .main_func = s_main, - .uuid = UUID_ALARMS_DATA_SOURCE, - }, - .name = i18n_noop("Alarms"), - .icon_resource_id = RESOURCE_ID_ALARM_CLOCK_TINY, + .common = + { + .main_func = s_main, + .uuid = UUID_ALARMS_DATA_SOURCE, + }, + .name = i18n_noop("Alarms"), + .icon_resource_id = RESOURCE_ID_ALARM_CLOCK_TINY, }; - return (const PebbleProcessMd*) &s_alarms_app_info; + return (const PebbleProcessMd *)&s_alarms_app_info; } diff --git a/src/fw/apps/system/alarms/alarms.h b/src/fw/apps/system/alarms/alarms.h index 833e761918..bd46cbc321 100644 --- a/src/fw/apps/system/alarms/alarms.h +++ b/src/fw/apps/system/alarms/alarms.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* alarms_app_get_info(); +const PebbleProcessMd *alarms_app_get_info(); diff --git a/src/fw/apps/system/app_fetch_ui.c b/src/fw/apps/system/app_fetch_ui.c index 1a541c5e14..3de9c0527f 100644 --- a/src/fw/apps/system/app_fetch_ui.c +++ b/src/fw/apps/system/app_fetch_ui.c @@ -63,17 +63,16 @@ static void prv_app_fetch_launch_app(AppFetchUIData *data) { PBL_LOG_DBG("App Fetch: Putting launch event"); // if this was launched by the phone, it's probably a new install - if ((data->next_app_args.common.reason == APP_LAUNCH_PHONE) && - !battery_is_usb_connected()) { + if ((data->next_app_args.common.reason == APP_LAUNCH_PHONE) && !battery_is_usb_connected()) { vibes_short_pulse(); } // Allocate and initialize the data that would have been sent to the app originally before the // fetch request. PebbleLaunchAppEventExtended *ext = kernel_malloc_check(sizeof(PebbleLaunchAppEventExtended)); - *ext = (PebbleLaunchAppEventExtended) { - .common = data->next_app_args.common, - .wakeup = data->next_app_args.wakeup_info + *ext = (PebbleLaunchAppEventExtended){ + .common = data->next_app_args.common, + .wakeup = data->next_app_args.wakeup_info }; ext->common.transition = compositor_dot_transition_app_fetch_get(); if ((data->next_app_args.common.reason == APP_LAUNCH_WAKEUP) && @@ -82,11 +81,8 @@ static void prv_app_fetch_launch_app(AppFetchUIData *data) { } PebbleEvent launch_event = { - .type = PEBBLE_APP_LAUNCH_EVENT, - .launch_app = { - .id = data->next_app_args.app_id, - .data = ext - } + .type = PEBBLE_APP_LAUNCH_EVENT, + .launch_app = {.id = data->next_app_args.app_id, .data = ext} }; event_put(&launch_event); @@ -112,9 +108,9 @@ static void prv_set_progress_failure(AppFetchUIData *data) { icon = TIMELINE_RESOURCE_WATCH_DISCONNECTED; message = i18n_get("Not connected", data); // Subscribe to the BT remote app connect event - data->connect_event_info = (EventServiceInfo) { - .type = PEBBLE_COMM_SESSION_EVENT, - .handler = prv_remote_comm_session_event_handler + data->connect_event_info = (EventServiceInfo){ + .type = PEBBLE_COMM_SESSION_EVENT, + .handler = prv_remote_comm_session_event_handler }; event_service_client_subscribe(&data->connect_event_info); break; @@ -200,22 +196,22 @@ static void prv_app_fetch_failure(AppFetchUIData *data, uint8_t error_code) { //! App Fetch handler. Used for keeping track of progress and cleanup events static void prv_app_fetch_event_handler(PebbleEvent *event, void *context) { AppFetchUIData *data = app_state_get_user_data(); - PebbleAppFetchEvent *af_event = (PebbleAppFetchEvent *) event; + PebbleAppFetchEvent *af_event = (PebbleAppFetchEvent *)event; // We have starting the App Fetch Process if (af_event->type == AppFetchEventTypeStart) { PBL_LOG_DBG("App Fetch: Got the start event"); - // We have received a new progress event + // We have received a new progress event } else if (af_event->type == AppFetchEventTypeProgress) { progress_window_set_progress(&data->window, af_event->progress_percent); - // We have finished the app fetch. Launching + // We have finished the app fetch. Launching } else if (af_event->type == AppFetchEventTypeFinish) { progress_window_set_result_success(&data->window); prv_app_fetch_cleanup(data); - // We received an error. Fail + // We received an error. Fail } else if (af_event->type == AppFetchEventTypeError) { prv_app_fetch_failure(data, af_event->error_code); } @@ -232,55 +228,53 @@ static void prv_click_handler(ClickRecognizerRef recognizer, Window *window) { } static void config_provider(void *context) { - window_single_click_subscribe(BUTTON_ID_BACK, (ClickHandler) prv_click_handler); - window_single_click_subscribe(BUTTON_ID_UP, (ClickHandler) prv_click_handler); - window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler) prv_click_handler); - window_single_click_subscribe(BUTTON_ID_BACK, (ClickHandler) prv_click_handler); + window_single_click_subscribe(BUTTON_ID_BACK, (ClickHandler)prv_click_handler); + window_single_click_subscribe(BUTTON_ID_UP, (ClickHandler)prv_click_handler); + window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler)prv_click_handler); + window_single_click_subscribe(BUTTON_ID_BACK, (ClickHandler)prv_click_handler); } static void handle_init(void) { - AppFetchUIData* data = app_zalloc_check(sizeof(AppFetchUIData)); + AppFetchUIData *data = app_zalloc_check(sizeof(AppFetchUIData)); app_state_set_user_data(data); // get app args, copy them to app memory, and free the kernel buffer - AppFetchUIArgs *temp_fetch_args = - (AppFetchUIArgs *)process_manager_get_current_process_args(); + AppFetchUIArgs *temp_fetch_args = (AppFetchUIArgs *)process_manager_get_current_process_args(); memcpy(&data->next_app_args, temp_fetch_args, sizeof(AppFetchUIArgs)); kernel_free(temp_fetch_args); // Create and set up window progress_window_init(&data->window); - progress_window_set_callbacks(&data->window, (ProgressWindowCallbacks) { - .finished = prv_progress_window_finished, - }, data); + progress_window_set_callbacks(&data->window, + (ProgressWindowCallbacks){ + .finished = prv_progress_window_finished, + }, + data); window_set_click_config_provider((Window *)&data->window, config_provider); // retrieve data about the AppInstallId given if (!app_install_get_entry_for_install_id(data->next_app_args.app_id, &data->install_entry)) { - PBL_LOG_ERR("App Fetch: Error getting entry for id: %"PRIu32"", - data->next_app_args.app_id); + PBL_LOG_ERR("App Fetch: Error getting entry for id: %" PRIu32 "", data->next_app_args.app_id); return; } AppFetchError prev_error = app_fetch_get_previous_error(); if ((prev_error.id == data->next_app_args.app_id) && - (prev_error.error != AppFetchResultSuccess)) { + (prev_error.error != AppFetchResultSuccess)) { prv_app_fetch_failure(data, prev_error.error); prv_set_progress(data, FAILURE_PERCENT); } // subscribe to PutBytes events - data->fetch_event_info = (EventServiceInfo) { - .type = PEBBLE_APP_FETCH_EVENT, - .handler = prv_app_fetch_event_handler - }; + data->fetch_event_info = + (EventServiceInfo){.type = PEBBLE_APP_FETCH_EVENT, .handler = prv_app_fetch_event_handler}; event_service_client_subscribe(&data->fetch_event_info); app_progress_window_push(&data->window); } static void handle_deinit(void) { - AppFetchUIData* data = app_state_get_user_data(); + AppFetchUIData *data = app_state_get_user_data(); prv_app_fetch_cleanup(data); progress_window_deinit(&data->window); app_free(data); @@ -297,14 +291,16 @@ static void s_main(void) { const PebbleProcessMd *app_fetch_ui_get_app_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = s_main, - .visibility = ProcessVisibilityHidden, - // UUID: 674271bc-f4fa-4536-97f3-8849a5ba75a4 - .uuid = {0x67, 0x42, 0x71, 0xbc, 0xf4, 0xfa, 0x45, 0x36, - 0x97, 0xf3, 0x88, 0x49, 0xa5, 0xba, 0x75, 0xa4}, - }, - .name = "App Fetch", + .common = + { + .main_func = s_main, + .visibility = ProcessVisibilityHidden, + // UUID: 674271bc-f4fa-4536-97f3-8849a5ba75a4 + .uuid = + {0x67, 0x42, 0x71, 0xbc, 0xf4, 0xfa, 0x45, 0x36, 0x97, 0xf3, 0x88, 0x49, 0xa5, + 0xba, 0x75, 0xa4}, + }, + .name = "App Fetch", }; - return (const PebbleProcessMd*) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } diff --git a/src/fw/apps/system/app_fetch_ui.h b/src/fw/apps/system/app_fetch_ui.h index b5d30b1f22..21822cd031 100644 --- a/src/fw/apps/system/app_fetch_ui.h +++ b/src/fw/apps/system/app_fetch_ui.h @@ -15,7 +15,7 @@ typedef struct AppFetchUIArgs { LaunchConfigCommon common; WakeupInfo wakeup_info; AppInstallId app_id; - bool forcefully; //! whether to launch forcefully or not + bool forcefully; //! whether to launch forcefully or not } AppFetchUIArgs; //! Used to launch the app_fetch_ui application diff --git a/src/fw/apps/system/battery_critical.c b/src/fw/apps/system/battery_critical.c index 0dec1eb904..e268bab6af 100644 --- a/src/fw/apps/system/battery_critical.c +++ b/src/fw/apps/system/battery_critical.c @@ -16,22 +16,23 @@ typedef struct BatteryCriticalAppData { GBitmap bitmap; } BatteryCriticalAppData; -static void update_proc(Layer* layer, GContext* ctx) { +static void update_proc(Layer *layer, GContext *ctx) { BatteryCriticalAppData *app_data = app_state_get_user_data(); GRect low_battery_bounds = { - .origin = { - .x = (DISP_COLS - app_data->bitmap.bounds.size.w) / 2, - .y = (DISP_ROWS - app_data->bitmap.bounds.size.h), - }, - .size = app_data->bitmap.bounds.size, + .origin = + { + .x = (DISP_COLS - app_data->bitmap.bounds.size.w) / 2, + .y = (DISP_ROWS - app_data->bitmap.bounds.size.h), + }, + .size = app_data->bitmap.bounds.size, }; graphics_draw_bitmap_in_rect(ctx, &app_data->bitmap, &low_battery_bounds); } static void handle_init(void) { - BatteryCriticalAppData* data = app_malloc_check(sizeof(BatteryCriticalAppData)); + BatteryCriticalAppData *data = app_malloc_check(sizeof(BatteryCriticalAppData)); gbitmap_init_with_resource(&data->bitmap, RESOURCE_ID_BATTERY_ICON_CHARGE); @@ -51,7 +52,7 @@ static void handle_init(void) { } static void handle_deinit(void) { - BatteryCriticalAppData* app_data = app_state_get_user_data(); + BatteryCriticalAppData *app_data = app_state_get_user_data(); gbitmap_deinit(&app_data->bitmap); app_free(app_data); } @@ -64,17 +65,19 @@ static void s_main(void) { handle_deinit(); } -const PebbleProcessMd* battery_critical_get_app_info() { +const PebbleProcessMd *battery_critical_get_app_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = s_main, - .visibility = ProcessVisibilityHidden, - // UUID: 4a71eb65-238d-4faa-b2a0-112aa910d7b4 - .uuid = {0x4a, 0x71, 0xeb, 0x65, 0x23, 0x8d, 0x4f, 0xaa, 0xb2, 0xa0, 0x11, 0x2a, 0xa9, 0x10, 0xd7, 0xb4}, - }, - .name = "Battery Critical", - .run_level = ProcessAppRunLevelCritical, + .common = + { + .main_func = s_main, + .visibility = ProcessVisibilityHidden, + // UUID: 4a71eb65-238d-4faa-b2a0-112aa910d7b4 + .uuid = + {0x4a, 0x71, 0xeb, 0x65, 0x23, 0x8d, 0x4f, 0xaa, 0xb2, 0xa0, 0x11, 0x2a, 0xa9, + 0x10, 0xd7, 0xb4}, + }, + .name = "Battery Critical", + .run_level = ProcessAppRunLevelCritical, }; - return (const PebbleProcessMd*) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } - diff --git a/src/fw/apps/system/battery_critical.h b/src/fw/apps/system/battery_critical.h index b03648e117..3658c5e286 100644 --- a/src/fw/apps/system/battery_critical.h +++ b/src/fw/apps/system/battery_critical.h @@ -5,5 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* battery_critical_get_app_info(); - +const PebbleProcessMd *battery_critical_get_app_info(); diff --git a/src/fw/apps/system/health/activity_detail_card.c b/src/fw/apps/system/health/activity_detail_card.c index b9658dfd91..d5f1f3bb75 100644 --- a/src/fw/apps/system/health/activity_detail_card.c +++ b/src/fw/apps/system/health/activity_detail_card.c @@ -30,7 +30,7 @@ static void prv_set_calories(char *buffer, size_t buffer_size, int32_t current_c return; } - snprintf(buffer, buffer_size, "%"PRId32, current_calories); + snprintf(buffer, buffer_size, "%" PRId32, current_calories); } static void prv_set_distance(char *buffer, size_t buffer_size, int32_t current_distance_meters) { @@ -52,13 +52,13 @@ static void prv_set_distance(char *buffer, size_t buffer_size, int32_t current_d static void prv_set_avg(char *buffer, size_t buffer_size, int32_t daily_avg, void *i18n_owner) { int pos = 0; - pos += snprintf(buffer, buffer_size, - PBL_IF_ROUND_ELSE("%s\n", "%s"), i18n_get("30 DAY AVG", i18n_owner)); + pos += snprintf(buffer, buffer_size, PBL_IF_ROUND_ELSE("%s\n", "%s"), + i18n_get("30 DAY AVG", i18n_owner)); if (daily_avg > 0) { - snprintf(buffer + pos, buffer_size - pos, " %"PRId32, daily_avg); + snprintf(buffer + pos, buffer_size - pos, " %" PRId32, daily_avg); } else { - snprintf(buffer + pos, buffer_size - pos, " "EN_DASH); + snprintf(buffer + pos, buffer_size - pos, " " EN_DASH); } } @@ -70,27 +70,22 @@ Window *health_activity_detail_card_create(HealthData *health_data) { const GColor fill_color = PBL_IF_COLOR_ELSE(GColorIslamicGreen, GColorDarkGray); const GColor today_fill_color = PBL_IF_COLOR_ELSE(GColorScreaminGreen, GColorDarkGray); - health_detail_card_set_render_day_zones(card_data->zones, - &card_data->num_zones, - &card_data->weekly_max, - false /* format hours and minutes */, - true /* show crown */, - fill_color, - today_fill_color, - health_data_steps_get(health_data), - card_data); + health_detail_card_set_render_day_zones( + card_data->zones, &card_data->num_zones, &card_data->weekly_max, + false /* format hours and minutes */, true /* show crown */, fill_color, today_fill_color, + health_data_steps_get(health_data), card_data); const size_t buffer_len = 32; HealthDetailHeading *heading = &card_data->headings[card_data->num_headings++]; - *heading = (HealthDetailHeading) { - .primary_label = (char *)i18n_get("CALORIES", card_data), - .primary_value = app_zalloc_check(buffer_len), - .secondary_label = (char *)i18n_get("DISTANCE", card_data), - .secondary_value = app_zalloc_check(buffer_len), - .fill_color = GColorWhite, - .outline_color = PBL_IF_COLOR_ELSE(GColorClear, GColorBlack), + *heading = (HealthDetailHeading){ + .primary_label = (char *)i18n_get("CALORIES", card_data), + .primary_value = app_zalloc_check(buffer_len), + .secondary_label = (char *)i18n_get("DISTANCE", card_data), + .secondary_value = app_zalloc_check(buffer_len), + .fill_color = GColorWhite, + .outline_color = PBL_IF_COLOR_ELSE(GColorClear, GColorBlack), }; prv_set_calories(heading->primary_value, buffer_len, @@ -101,24 +96,24 @@ Window *health_activity_detail_card_create(HealthData *health_data) { HealthDetailSubtitle *subtitle = &card_data->subtitles[card_data->num_subtitles++]; - *subtitle = (HealthDetailSubtitle) { - .label = app_zalloc_check(buffer_len), - .fill_color = PBL_IF_COLOR_ELSE(GColorYellow, GColorBlack), + *subtitle = (HealthDetailSubtitle){ + .label = app_zalloc_check(buffer_len), + .fill_color = PBL_IF_COLOR_ELSE(GColorYellow, GColorBlack), }; prv_set_avg(subtitle->label, buffer_len, card_data->daily_avg, card_data); const HealthDetailCardConfig config = { - .num_headings = card_data->num_headings, - .headings = card_data->headings, - .num_subtitles = card_data->num_subtitles, - .subtitles = card_data->subtitles, - .daily_avg = card_data->daily_avg, - .weekly_max = card_data->weekly_max, - .bg_color = PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite), - .num_zones = card_data->num_zones, - .zones = card_data->zones, - .data = card_data, + .num_headings = card_data->num_headings, + .headings = card_data->headings, + .num_subtitles = card_data->num_subtitles, + .subtitles = card_data->subtitles, + .daily_avg = card_data->daily_avg, + .weekly_max = card_data->weekly_max, + .bg_color = PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite), + .num_zones = card_data->num_zones, + .zones = card_data->zones, + .data = card_data, }; return (Window *)health_detail_card_create(&config); diff --git a/src/fw/apps/system/health/activity_summary_card.c b/src/fw/apps/system/health/activity_summary_card.c index 008237bd12..27e6332818 100644 --- a/src/fw/apps/system/health/activity_summary_card.c +++ b/src/fw/apps/system/health/activity_summary_card.c @@ -37,7 +37,6 @@ typedef struct HealthActivitySummaryCardData { int32_t daily_average_steps; } HealthActivitySummaryCardData; - #define PROGRESS_CURRENT_COLOR (PBL_IF_COLOR_ELSE(GColorIslamicGreen, GColorDarkGray)) #define PROGRESS_TYPICAL_COLOR (PBL_IF_COLOR_ELSE(GColorYellow, GColorBlack)) #define PROGRESS_BACKGROUND_COLOR (PBL_IF_COLOR_ELSE(GColorDarkGray, GColorClear)) @@ -46,12 +45,11 @@ typedef struct HealthActivitySummaryCardData { #define CURRENT_TEXT_COLOR PROGRESS_CURRENT_COLOR #define CARD_BACKGROUND_COLOR (PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite)) - static void prv_render_progress_bar(GContext *ctx, Layer *base_layer) { HealthActivitySummaryCardData *data = layer_get_data(base_layer); - health_progress_bar_fill(ctx, &data->progress_bar, PROGRESS_BACKGROUND_COLOR, - 0, HEALTH_PROGRESS_BAR_MAX_VALUE); + health_progress_bar_fill(ctx, &data->progress_bar, PROGRESS_BACKGROUND_COLOR, 0, + HEALTH_PROGRESS_BAR_MAX_VALUE); const int32_t progress_max = MAX(data->current_steps, data->daily_average_steps); if (!progress_max) { @@ -101,7 +99,7 @@ static void prv_render_current_steps(GContext *ctx, Layer *base_layer) { GFont font; if (data->current_steps) { font = fonts_get_system_font(HEALTH_STEPS_FONT); - snprintf(buffer, sizeof(buffer), "%"PRIu32"", data->current_steps); + snprintf(buffer, sizeof(buffer), "%" PRIu32 "", data->current_steps); } else { font = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD); snprintf(buffer, sizeof(buffer), EM_DASH); @@ -110,11 +108,10 @@ static void prv_render_current_steps(GContext *ctx, Layer *base_layer) { // Mirror the pill's downshift at half the offset so the step count and // pill stay visually balanced. Zero on legacy-sized displays where // HEALTH_Y_OFFSET itself is 0. - const int y = PBL_IF_RECT_ELSE(PBL_IF_BW_ELSE(85, 83), 88) + HEALTH_Y_OFFSET - + HEALTH_Y_OFFSET / 6; + const int y = + PBL_IF_RECT_ELSE(PBL_IF_BW_ELSE(85, 83), 88) + HEALTH_Y_OFFSET + HEALTH_Y_OFFSET / 6; graphics_context_set_text_color(ctx, CURRENT_TEXT_COLOR); - graphics_draw_text(ctx, buffer, font, - GRect(0, y, base_layer->bounds.size.w, 40), + graphics_draw_text(ctx, buffer, font, GRect(0, y, base_layer->bounds.size.w, 40), GTextOverflowModeFill, GTextAlignmentCenter, NULL); } @@ -123,7 +120,7 @@ static void prv_render_typical_steps(GContext *ctx, Layer *base_layer) { char daily_buffer[12]; if (data->daily_average_steps > 0) { - snprintf(daily_buffer, sizeof(daily_buffer), "%"PRId32, data->daily_average_steps); + snprintf(daily_buffer, sizeof(daily_buffer), "%" PRId32, data->daily_average_steps); } else { snprintf(daily_buffer, sizeof(daily_buffer), EM_DASH); } @@ -135,16 +132,14 @@ static void prv_render_typical_steps(GContext *ctx, Layer *base_layer) { // single daily-total line below. if (data->typical_steps > 0) { char steps_buffer[12]; - snprintf(steps_buffer, sizeof(steps_buffer), "%"PRId32, data->typical_steps); + snprintf(steps_buffer, sizeof(steps_buffer), "%" PRId32, data->typical_steps); char bin_time[12]; - clock_format_time(bin_time, sizeof(bin_time), - data->typical_steps_bin_minute / MINUTES_PER_HOUR, - data->typical_steps_bin_minute % MINUTES_PER_HOUR, - false /* add_space */); + clock_format_time(bin_time, sizeof(bin_time), data->typical_steps_bin_minute / MINUTES_PER_HOUR, + data->typical_steps_bin_minute % MINUTES_PER_HOUR, false /* add_space */); - health_ui_render_split_typical_text_box(ctx, base_layer, steps_buffer, bin_time, - daily_buffer, i18n_get("TOTAL", base_layer)); + health_ui_render_split_typical_text_box(ctx, base_layer, steps_buffer, bin_time, daily_buffer, + i18n_get("TOTAL", base_layer)); return; } #endif @@ -185,13 +180,13 @@ Layer *health_activity_summary_card_create(HealthData *health_data) { HealthActivitySummaryCardData *health_activity_summary_card_data = layer_get_data(base_layer); layer_set_update_proc(base_layer, prv_base_layer_update_proc); // set health data - *health_activity_summary_card_data = (HealthActivitySummaryCardData) { - .health_data = health_data, - .icon = kino_reel_create_with_resource(RESOURCE_ID_HEALTH_APP_ACTIVITY), - .progress_bar = { - .num_segments = ARRAY_LENGTH(s_activity_summary_progress_segments), - .segments = s_activity_summary_progress_segments, - }, + *health_activity_summary_card_data = (HealthActivitySummaryCardData){ + .health_data = health_data, + .icon = kino_reel_create_with_resource(RESOURCE_ID_HEALTH_APP_ACTIVITY), + .progress_bar = { + .num_segments = ARRAY_LENGTH(s_activity_summary_progress_segments), + .segments = s_activity_summary_progress_segments, + }, }; return base_layer; @@ -201,9 +196,9 @@ void health_activity_summary_card_select_click_handler(Layer *layer) { HealthActivitySummaryCardData *health_activity_summary_card_data = layer_get_data(layer); HealthData *health_data = health_activity_summary_card_data->health_data; Window *window = health_activity_detail_card_create(health_data); - window_set_window_handlers(window, &(WindowHandlers) { - .unload = prv_activity_detail_card_unload_callback, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .unload = prv_activity_detail_card_unload_callback, + }); app_window_stack_push(window, true); } diff --git a/src/fw/apps/system/health/activity_summary_card.h b/src/fw/apps/system/health/activity_summary_card.h index 537b196315..c19756eb60 100644 --- a/src/fw/apps/system/health/activity_summary_card.h +++ b/src/fw/apps/system/health/activity_summary_card.h @@ -7,7 +7,6 @@ #include "applib/ui/ui.h" - //////////////////////////////////////////////////////////////////////////////////////////////////// // API Functions // diff --git a/src/fw/apps/system/health/activity_summary_card_segments.h b/src/fw/apps/system/health/activity_summary_card_segments.h index 245b5dc1bf..2ab2d49d53 100644 --- a/src/fw/apps/system/health/activity_summary_card_segments.h +++ b/src/fw/apps/system/health/activity_summary_card_segments.h @@ -21,127 +21,155 @@ #if PBL_BW // The shape of the hexagon is slightly different on BW than on Color static HealthProgressSegment s_activity_summary_progress_segments[] = { - { - // This is an endcap for BW (is a no-op on color) - .type = HealthProgressSegmentType_Corner, - .points = {{42, 85}, {51, 85}, {42, 85}, {51, 85}}, - }, - { - // Left side bottom - .type = HealthProgressSegmentType_Vertical, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{42, 84}, {51, 84}, {38, 58}, {28, 58}}, - }, - { - // Left side top - .type = HealthProgressSegmentType_Vertical, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{38, 57}, {28, 57}, {46, 26}, {56, 26}}, - }, - { - // Top left corner - .type = HealthProgressSegmentType_Corner, - .points = {{56, 26}, {46, 26}, {50, 18}, {56, 18}}, - }, - { - // Center top - .type = HealthProgressSegmentType_Horizontal, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH * 2, - .points = {{55, 26}, {88, 26}, {89, 18}, {54, 18}}, - }, - { - // Top right corner - .type = HealthProgressSegmentType_Corner, - .points = {{88, 26}, {88, 18}, {92, 18}, {96, 26}}, - }, - { - // Right side top - .type = HealthProgressSegmentType_Vertical, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{87, 26}, {96, 26}, {113, 57}, {104, 57}}, - }, - { - // Right side bottom - .type = HealthProgressSegmentType_Vertical, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{104, 58}, {113, 58}, {99, 84}, {90, 84}}, - }, - { - // This is an endcap for BW (is a no-op on color) - .type = HealthProgressSegmentType_Corner, - .points = {{99, 85}, {90, 85}, {99, 85}, {90, 85}}, - }, + { + // This is an endcap for BW (is a no-op on color) + .type = HealthProgressSegmentType_Corner, + .points = {{42, 85}, {51, 85}, {42, 85}, {51, 85}}, + }, + { + // Left side bottom + .type = HealthProgressSegmentType_Vertical, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH, + .points = {{42, 84}, {51, 84}, {38, 58}, {28, 58}}, + }, + { + // Left side top + .type = HealthProgressSegmentType_Vertical, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH, + .points = {{38, 57}, {28, 57}, {46, 26}, {56, 26}}, + }, + { + // Top left corner + .type = HealthProgressSegmentType_Corner, + .points = {{56, 26}, {46, 26}, {50, 18}, {56, 18}}, + }, + { + // Center top + .type = HealthProgressSegmentType_Horizontal, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH * 2, + .points = {{55, 26}, {88, 26}, {89, 18}, {54, 18}}, + }, + { + // Top right corner + .type = HealthProgressSegmentType_Corner, + .points = {{88, 26}, {88, 18}, {92, 18}, {96, 26}}, + }, + { + // Right side top + .type = HealthProgressSegmentType_Vertical, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH, + .points = {{87, 26}, {96, 26}, {113, 57}, {104, 57}}, + }, + { + // Right side bottom + .type = HealthProgressSegmentType_Vertical, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH, + .points = {{104, 58}, {113, 58}, {99, 84}, {90, 84}}, + }, + { + // This is an endcap for BW (is a no-op on color) + .type = HealthProgressSegmentType_Corner, + .points = {{99, 85}, {90, 85}, {99, 85}, {90, 85}}, + }, }; -#else // Color +#else // Color static HealthProgressSegment s_activity_summary_progress_segments[] = { - { - // This is an endcap for BW (is a no-op on color) - .type = HealthProgressSegmentType_Corner, - .points = {{46 + X_ADJ, 81 + Y_ADJ}, {58 + X_ADJ, 81 + Y_ADJ}, - {46 + X_ADJ, 81 + Y_ADJ}, {58 + X_ADJ, 81 + Y_ADJ}}, - }, - { - // Left side bottom - .type = HealthProgressSegmentType_Vertical, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{46 + X_ADJ, 81 + Y_ADJ}, {58 + X_ADJ, 81 + Y_ADJ}, - {41 + X_ADJ, 51 + Y_ADJ}, {29 + X_ADJ, 51 + Y_ADJ}}, - }, - { - // Left side top - .type = HealthProgressSegmentType_Vertical, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{29 + X_ADJ, 51 + Y_ADJ}, {41 + X_ADJ, 51 + Y_ADJ}, - {57 + X_ADJ, 24 + Y_ADJ}, {45 + X_ADJ, 24 + Y_ADJ}}, - }, - { - // Top left corner - .type = HealthProgressSegmentType_Corner, - .points = {{57 + X_ADJ, 24 + Y_ADJ}, {45 + X_ADJ, 24 + Y_ADJ}, - {51 + X_ADJ, 15 + Y_ADJ}, {57 + X_ADJ, 15 + Y_ADJ}}, - }, - { - // Center top - .type = HealthProgressSegmentType_Horizontal, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH * 2, - .points = {{55 + X_ADJ, 24 + Y_ADJ}, {89 + X_ADJ, 24 + Y_ADJ}, - {89 + X_ADJ, 15 + Y_ADJ}, {55 + X_ADJ, 15 + Y_ADJ}}, - }, - { - // Top right corner - .type = HealthProgressSegmentType_Corner, - .points = {{87 + X_ADJ, 24 + Y_ADJ}, {87 + X_ADJ, 15 + Y_ADJ}, - {93 + X_ADJ, 15 + Y_ADJ}, {99 + X_ADJ, 24 + Y_ADJ}}, - }, - { - // Right side top - .type = HealthProgressSegmentType_Vertical, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{87 + X_ADJ, 24 + Y_ADJ}, {99 + X_ADJ, 24 + Y_ADJ}, - {115 + X_ADJ, 51 + Y_ADJ}, {103 + X_ADJ, 51 + Y_ADJ}}, - }, - { - // Right side bottom - .type = HealthProgressSegmentType_Vertical, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{103 + X_ADJ, 51 + Y_ADJ}, {115 + X_ADJ, 51 + Y_ADJ}, - {98 + X_ADJ, 81 + Y_ADJ}, {86 + X_ADJ, 81 + Y_ADJ}}, - }, - { - // This is an endcap for BW (is a no-op on color) - .type = HealthProgressSegmentType_Corner, - .points = {{98 + X_ADJ, 81 + Y_ADJ}, {86 + X_ADJ, 81 + Y_ADJ}, - {98 + X_ADJ, 81 + Y_ADJ}, {86 + X_ADJ, 81 + Y_ADJ}}, - }, + { + // This is an endcap for BW (is a no-op on color) + .type = HealthProgressSegmentType_Corner, + .points = + {{46 + X_ADJ, 81 + Y_ADJ}, + {58 + X_ADJ, 81 + Y_ADJ}, + {46 + X_ADJ, 81 + Y_ADJ}, + {58 + X_ADJ, 81 + Y_ADJ}}, + }, + { + // Left side bottom + .type = HealthProgressSegmentType_Vertical, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH, + .points = + {{46 + X_ADJ, 81 + Y_ADJ}, + {58 + X_ADJ, 81 + Y_ADJ}, + {41 + X_ADJ, 51 + Y_ADJ}, + {29 + X_ADJ, 51 + Y_ADJ}}, + }, + { + // Left side top + .type = HealthProgressSegmentType_Vertical, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH, + .points = + {{29 + X_ADJ, 51 + Y_ADJ}, + {41 + X_ADJ, 51 + Y_ADJ}, + {57 + X_ADJ, 24 + Y_ADJ}, + {45 + X_ADJ, 24 + Y_ADJ}}, + }, + { + // Top left corner + .type = HealthProgressSegmentType_Corner, + .points = + {{57 + X_ADJ, 24 + Y_ADJ}, + {45 + X_ADJ, 24 + Y_ADJ}, + {51 + X_ADJ, 15 + Y_ADJ}, + {57 + X_ADJ, 15 + Y_ADJ}}, + }, + { + // Center top + .type = HealthProgressSegmentType_Horizontal, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH * 2, + .points = + {{55 + X_ADJ, 24 + Y_ADJ}, + {89 + X_ADJ, 24 + Y_ADJ}, + {89 + X_ADJ, 15 + Y_ADJ}, + {55 + X_ADJ, 15 + Y_ADJ}}, + }, + { + // Top right corner + .type = HealthProgressSegmentType_Corner, + .points = + {{87 + X_ADJ, 24 + Y_ADJ}, + {87 + X_ADJ, 15 + Y_ADJ}, + {93 + X_ADJ, 15 + Y_ADJ}, + {99 + X_ADJ, 24 + Y_ADJ}}, + }, + { + // Right side top + .type = HealthProgressSegmentType_Vertical, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH, + .points = + {{87 + X_ADJ, 24 + Y_ADJ}, + {99 + X_ADJ, 24 + Y_ADJ}, + {115 + X_ADJ, 51 + Y_ADJ}, + {103 + X_ADJ, 51 + Y_ADJ}}, + }, + { + // Right side bottom + .type = HealthProgressSegmentType_Vertical, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH, + .points = + {{103 + X_ADJ, 51 + Y_ADJ}, + {115 + X_ADJ, 51 + Y_ADJ}, + {98 + X_ADJ, 81 + Y_ADJ}, + {86 + X_ADJ, 81 + Y_ADJ}}, + }, + { + // This is an endcap for BW (is a no-op on color) + .type = HealthProgressSegmentType_Corner, + .points = { + {98 + X_ADJ, 81 + Y_ADJ}, + {86 + X_ADJ, 81 + Y_ADJ}, + {98 + X_ADJ, 81 + Y_ADJ}, + {86 + X_ADJ, 81 + Y_ADJ} + }, + }, }; #endif diff --git a/src/fw/apps/system/health/card_view.c b/src/fw/apps/system/health/card_view.c index 33bf91cb6c..cd376a60a9 100644 --- a/src/fw/apps/system/health/card_view.c +++ b/src/fw/apps/system/health/card_view.c @@ -46,36 +46,36 @@ typedef struct HealthCardView { bool reverse_order; } HealthCardView; -static Layer* (*s_card_view_create[CardCount])(HealthData *health_data) = { - [Card_ActivitySummary] = health_activity_summary_card_create, +static Layer *(*s_card_view_create[CardCount])(HealthData *health_data) = { + [Card_ActivitySummary] = health_activity_summary_card_create, #ifdef CONFIG_HRM - [Card_HrSummary] = health_hr_summary_card_create, + [Card_HrSummary] = health_hr_summary_card_create, #endif - [Card_SleepSummary] = health_sleep_summary_card_create, + [Card_SleepSummary] = health_sleep_summary_card_create, }; static void (*s_card_view_select_click_handler[CardCount])(Layer *layer) = { - [Card_ActivitySummary] = health_activity_summary_card_select_click_handler, + [Card_ActivitySummary] = health_activity_summary_card_select_click_handler, #ifdef CONFIG_HRM - [Card_HrSummary] = health_hr_summary_card_select_click_handler, + [Card_HrSummary] = health_hr_summary_card_select_click_handler, #endif - [Card_SleepSummary] = health_sleep_summary_card_select_click_handler, + [Card_SleepSummary] = health_sleep_summary_card_select_click_handler, }; static GColor (*s_card_view_get_bg_color[CardCount])(Layer *layer) = { - [Card_ActivitySummary] = health_activity_summary_card_get_bg_color, + [Card_ActivitySummary] = health_activity_summary_card_get_bg_color, #ifdef CONFIG_HRM - [Card_HrSummary] = health_hr_summary_card_get_bg_color, + [Card_HrSummary] = health_hr_summary_card_get_bg_color, #endif - [Card_SleepSummary] = health_sleep_summary_card_get_bg_color, + [Card_SleepSummary] = health_sleep_summary_card_get_bg_color, }; static bool (*s_card_view_show_select_indicator[CardCount])(Layer *layer) = { - [Card_ActivitySummary] = health_activity_summary_show_select_indicator, + [Card_ActivitySummary] = health_activity_summary_show_select_indicator, #ifdef CONFIG_HRM - [Card_HrSummary] = health_hr_summary_show_select_indicator, + [Card_HrSummary] = health_hr_summary_show_select_indicator, #endif - [Card_SleepSummary] = health_sleep_summary_show_select_indicator, + [Card_SleepSummary] = health_sleep_summary_show_select_indicator, }; //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -123,8 +123,8 @@ static void prv_select_indicator_layer_update_proc(Layer *layer, GContext *ctx) static void prv_refresh_select_indicator(HealthCardView *health_card_view) { Layer *card_layer = health_card_view->card_layers[health_card_view->current_card_index]; - const bool is_hidden = !s_card_view_show_select_indicator[health_card_view->current_card_index]( - card_layer); + const bool is_hidden = + !s_card_view_show_select_indicator[health_card_view->current_card_index](card_layer); GColor card_bg_color = s_card_view_get_bg_color[health_card_view->current_card_index](card_layer); health_card_view->select_indicator_color = gcolor_legible_over(card_bg_color); @@ -140,51 +140,47 @@ static void prv_content_indicator_setup_direction(HealthCardView *health_card_vi GColor card_bg_color = s_card_view_get_bg_color[health_card_view->current_card_index](card_layer); - content_indicator_configure_direction(content_indicator, direction, &(ContentIndicatorConfig) { - .layer = indicator_layer, - .colors.foreground = gcolor_legible_over(card_bg_color), - .colors.background = card_bg_color, - }); + content_indicator_configure_direction(content_indicator, direction, + &(ContentIndicatorConfig){ + .layer = indicator_layer, + .colors.foreground = gcolor_legible_over(card_bg_color), + .colors.background = card_bg_color, + }); } static void prv_refresh_content_indicators(HealthCardView *health_card_view) { - prv_content_indicator_setup_direction(health_card_view, - &health_card_view->up_indicator, + prv_content_indicator_setup_direction(health_card_view, &health_card_view->up_indicator, &health_card_view->up_arrow_layer, ContentIndicatorDirectionUp); - prv_content_indicator_setup_direction(health_card_view, - &health_card_view->down_indicator, + prv_content_indicator_setup_direction(health_card_view, &health_card_view->down_indicator, &health_card_view->down_arrow_layer, ContentIndicatorDirectionDown); const bool increment_available = prv_get_next_card_idx(health_card_view->current_card_index, true) < CardCount; - const bool is_up_visible = health_card_view->cycle_cards || - health_card_view->reverse_order || increment_available; - const bool is_down_visible = health_card_view->cycle_cards || - !health_card_view->reverse_order || increment_available; + const bool is_up_visible = + health_card_view->cycle_cards || health_card_view->reverse_order || increment_available; + const bool is_down_visible = + health_card_view->cycle_cards || !health_card_view->reverse_order || increment_available; content_indicator_set_content_available(&health_card_view->up_indicator, - ContentIndicatorDirectionUp, - is_up_visible); + ContentIndicatorDirectionUp, is_up_visible); content_indicator_set_content_available(&health_card_view->down_indicator, - ContentIndicatorDirectionDown, - is_down_visible); + ContentIndicatorDirectionDown, is_down_visible); } static void prv_hide_content_indicators(HealthCardView *health_card_view) { content_indicator_set_content_available(&health_card_view->up_indicator, - ContentIndicatorDirectionUp, - false); + ContentIndicatorDirectionUp, false); content_indicator_set_content_available(&health_card_view->down_indicator, - ContentIndicatorDirectionDown, - false); + ContentIndicatorDirectionDown, false); } static void prv_set_window_background_color(HealthCardView *health_card_view) { Layer *card_layer = health_card_view->card_layers[health_card_view->current_card_index]; - window_set_background_color(&health_card_view->window, + window_set_background_color( + &health_card_view->window, s_card_view_get_bg_color[health_card_view->current_card_index](card_layer)); } @@ -194,7 +190,7 @@ static void prv_bg_animation_update(Animation *animation, AnimationProgress norm HealthCardView *health_card_view = animation_get_context(animation); const AnimationProgress bounce_back_length = (interpolate_moook_out_duration() * ANIMATION_NORMALIZED_MAX) / - interpolate_moook_soft_duration(NUM_MID_FRAMES); + interpolate_moook_soft_duration(NUM_MID_FRAMES); if (normalized >= ANIMATION_NORMALIZED_MAX - bounce_back_length) { prv_set_window_background_color(health_card_view); } @@ -235,7 +231,7 @@ static int64_t prv_interpolate_moook_soft(int32_t normalized, int64_t from, int6 return interpolate_moook_soft(normalized, from, to, NUM_MID_FRAMES); } -static Animation* prv_create_slide_animation(Layer *layer, GRect *from_frame, GRect *to_frame) { +static Animation *prv_create_slide_animation(Layer *layer, GRect *from_frame, GRect *to_frame) { Animation *anim = (Animation *)property_animation_create_layer_frame(layer, from_frame, to_frame); animation_set_duration(anim, interpolate_moook_soft_duration(NUM_MID_FRAMES)); animation_set_custom_interpolation(anim, prv_interpolate_moook_soft); @@ -243,8 +239,8 @@ static Animation* prv_create_slide_animation(Layer *layer, GRect *from_frame, GR } // Create animation -static void prv_schedule_slide_animation(HealthCardView *health_card_view, - Card next_card_index, bool slide_up) { +static void prv_schedule_slide_animation(HealthCardView *health_card_view, Card next_card_index, + bool slide_up) { animation_unschedule(health_card_view->slide_animation); health_card_view->slide_animation = NULL; @@ -263,10 +259,12 @@ static void prv_schedule_slide_animation(HealthCardView *health_card_view, Animation *bg_anim = animation_create(); animation_set_duration(bg_anim, interpolate_moook_soft_duration(NUM_MID_FRAMES)); - animation_set_handlers(bg_anim, (AnimationHandlers){ - .started = prv_bg_animation_started_handler, - .stopped = prv_bg_animation_stopped_handler, - }, health_card_view); + animation_set_handlers(bg_anim, + (AnimationHandlers){ + .started = prv_bg_animation_started_handler, + .stopped = prv_bg_animation_stopped_handler, + }, + health_card_view); animation_set_implementation(bg_anim, &prv_bg_animation_implementation); health_card_view->slide_animation = animation_spawn_create(curr_out, next_in, bg_anim, NULL); @@ -275,7 +273,6 @@ static void prv_schedule_slide_animation(HealthCardView *health_card_view, health_card_view->current_card_index = next_card_index; } - //////////////////////////////////////////////////////////////////////////////////////////////////// // Callback Functions // @@ -322,7 +319,6 @@ static void prv_click_config_provider(void *context) { window_single_click_subscribe(BUTTON_ID_DOWN, prv_up_down_click_handler); } - /////////////////////////////////////////////////////////////////////////////////////////////////// // API Functions // @@ -333,17 +329,17 @@ HealthCardView *health_card_view_create(HealthData *health_data) { if (app_launch_reason() == APP_LAUNCH_QUICK_LAUNCH) { const ButtonId button = app_launch_button(); const AppQuickLaunchAction action = app_launch_get_quick_launch_action(); - directional_quick_launch = (button == BUTTON_ID_UP || button == BUTTON_ID_DOWN) && - (action == APP_QUICK_LAUNCH_ACTION_TAP || - action == APP_QUICK_LAUNCH_ACTION_HOLD); + directional_quick_launch = + (button == BUTTON_ID_UP || button == BUTTON_ID_DOWN) && + (action == APP_QUICK_LAUNCH_ACTION_TAP || action == APP_QUICK_LAUNCH_ACTION_HOLD); reverse_order = directional_quick_launch && (button == BUTTON_ID_DOWN); } HealthCardView *health_card_view = app_malloc_check(sizeof(HealthCardView)); - *health_card_view = (HealthCardView) { - .health_data = health_data, - .cycle_cards = !directional_quick_launch, - .reverse_order = reverse_order, + *health_card_view = (HealthCardView){ + .health_data = health_data, + .cycle_cards = !directional_quick_launch, + .reverse_order = reverse_order, }; window_init(&health_card_view->window, "Health Card View"); window_set_user_data(&health_card_view->window, health_card_view); @@ -358,7 +354,7 @@ HealthCardView *health_card_view_create(HealthData *health_data) { } // set starting card based on launch args - HealthLaunchArgs launch_args = { .args = app_launch_get_args() }; + HealthLaunchArgs launch_args = {.args = app_launch_get_args()}; health_card_view->current_card_index = (launch_args.card_type == HealthCardType_Sleep) ? Card_SleepSummary : Card_ActivitySummary; @@ -378,14 +374,14 @@ HealthCardView *health_card_view_create(HealthData *health_data) { // setup content indicators const int content_indicator_height = PBL_IF_ROUND_ELSE(18, 11); - const GRect down_arrow_layer_frame = grect_inset(window_root->frame, - GEdgeInsets(window_root->frame.size.h - content_indicator_height, 0, 0)); + const GRect down_arrow_layer_frame = grect_inset( + window_root->frame, GEdgeInsets(window_root->frame.size.h - content_indicator_height, 0, 0)); layer_init(&health_card_view->down_arrow_layer, &down_arrow_layer_frame); layer_add_child(window_root, &health_card_view->down_arrow_layer); content_indicator_init(&health_card_view->down_indicator); - const GRect up_arrow_layer_frame = grect_inset(window_root->frame, - GEdgeInsets(0, 0, window_root->frame.size.h - content_indicator_height)); + const GRect up_arrow_layer_frame = grect_inset( + window_root->frame, GEdgeInsets(0, 0, window_root->frame.size.h - content_indicator_height)); layer_init(&health_card_view->up_arrow_layer, &up_arrow_layer_frame); layer_add_child(window_root, &health_card_view->up_arrow_layer); content_indicator_init(&health_card_view->up_indicator); diff --git a/src/fw/apps/system/health/card_view.h b/src/fw/apps/system/health/card_view.h index 26444d7e44..971cddd8c9 100644 --- a/src/fw/apps/system/health/card_view.h +++ b/src/fw/apps/system/health/card_view.h @@ -10,7 +10,6 @@ //! Main structure for card view typedef struct HealthCardView HealthCardView; - //////////////////////////////////////////////////////////////////////////////////////////////////// // API Functions // diff --git a/src/fw/apps/system/health/data.c b/src/fw/apps/system/health/data.c index b3eef20012..9d131f68ec 100644 --- a/src/fw/apps/system/health/data.c +++ b/src/fw/apps/system/health/data.c @@ -11,16 +11,13 @@ #include #include "util/time/time.h" - -T_STATIC void prv_merge_adjacent_sessions(ActivitySession *current, - ActivitySession *previous) { +T_STATIC void prv_merge_adjacent_sessions(ActivitySession *current, ActivitySession *previous) { if (previous == NULL || current == NULL) { return; } - if (current->type != previous->type || - (current->type != ActivitySessionType_RestfulNap && - current->type != ActivitySessionType_RestfulSleep)) { + if (current->type != previous->type || (current->type != ActivitySessionType_RestfulNap && + current->type != ActivitySessionType_RestfulSleep)) { // We only merge sessions if they are "deep" sleep/nap return; } @@ -32,8 +29,8 @@ T_STATIC void prv_merge_adjacent_sessions(ActivitySession *current, const uint16_t max_apart_merge_secs = 5 * SECONDS_PER_MINUTE; time_t end_time = previous->start_utc + previous->length_min * SECONDS_PER_MINUTE; if ((end_time + max_apart_merge_secs) > current->start_utc) { - current->length_min += previous->length_min + - (current->start_utc - end_time) / SECONDS_PER_MINUTE; + current->length_min += + previous->length_min + (current->start_utc - end_time) / SECONDS_PER_MINUTE; current->start_utc = previous->start_utc; previous->length_min = 0; previous->type = ActivitySessionType_None; @@ -73,7 +70,6 @@ void health_data_update(HealthData *health_data) { struct tm local_tm; localtime_r(&now, &local_tm); - //! Step / activity related data // Get the step totals for today and the past 6 days health_service_private_get_metric_history(HealthMetricStepCount, DAYS_PER_WEEK, @@ -87,7 +83,6 @@ void health_data_update(HealthData *health_data) { // Get the average steps for the past month activity_get_metric_monthly_avg(ActivityMetricStepCount, &health_data->monthly_step_average); - //! Sleep related data health_service_private_get_metric_history(HealthMetricSleepSeconds, DAYS_PER_WEEK, health_data->sleep_data); @@ -97,8 +92,7 @@ void health_data_update(HealthData *health_data) { int day_offset = use_yesterday ? 1 : 0; int wday = (local_tm.tm_wday - day_offset + 7) % 7; - activity_get_metric_typical(ActivityMetricSleepTotalSeconds, wday, - &health_data->typical_sleep); + activity_get_metric_typical(ActivityMetricSleepTotalSeconds, wday, &health_data->typical_sleep); int32_t deep_sleep_history[2]; activity_get_metric(ActivityMetricSleepRestfulSeconds, 2, deep_sleep_history); @@ -119,11 +113,9 @@ void health_data_update(HealthData *health_data) { activity_get_metric_monthly_avg(ActivityMetricSleepTotalSeconds, &health_data->monthly_sleep_average); - //! Activity sessions health_data->num_activity_sessions = ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT; - if (!activity_get_sessions(&health_data->num_activity_sessions, - health_data->activity_sessions)) { + if (!activity_get_sessions(&health_data->num_activity_sessions, health_data->activity_sessions)) { PBL_LOG_ERR("Fetching activity sessions failed"); } else { ActivitySession *previous_session = NULL; @@ -144,8 +136,8 @@ void health_data_update_step_derived_metrics(HealthData *health_data) { health_data->current_distance_meters = health_service_sum_today(HealthMetricWalkedDistanceMeters); // get calories - health_data->current_calories = health_service_sum_today(HealthMetricActiveKCalories) - + health_service_sum_today(HealthMetricRestingKCalories); + health_data->current_calories = health_service_sum_today(HealthMetricActiveKCalories) + + health_service_sum_today(HealthMetricRestingKCalories); } void health_data_update_steps(HealthData *health_data, uint32_t new_steps) { @@ -220,10 +212,10 @@ int32_t health_data_steps_get_current_average(HealthData *health_data) { // each average chunk is 15 mins long if (health_data->step_average_last_updated_time != - ((today_min / k_minutes_per_step_avg) * k_minutes_per_step_avg)) { + ((today_min / k_minutes_per_step_avg) * k_minutes_per_step_avg)) { // current_step_average is stale health_data->current_step_average = - prv_health_data_get_n_average_chunks(health_data, today_min / k_minutes_per_step_avg); + prv_health_data_get_n_average_chunks(health_data, today_min / k_minutes_per_step_avg); health_data->step_average_last_updated_time = (today_min / k_minutes_per_step_avg) * k_minutes_per_step_avg; } @@ -242,7 +234,6 @@ int32_t health_data_steps_get_monthly_average(HealthData *health_data) { return health_data->monthly_step_average; } - int32_t *health_data_sleep_get(HealthData *health_data) { return health_data->sleep_data; } diff --git a/src/fw/apps/system/health/data.h b/src/fw/apps/system/health/data.h index a31472d493..4e4ada7f6f 100644 --- a/src/fw/apps/system/health/data.h +++ b/src/fw/apps/system/health/data.h @@ -64,7 +64,6 @@ void health_data_update_current_bpm(HealthData *health_data); //! @param health_data A pointer to the health data to use void health_data_update_hr_zone_minutes(HealthData *health_data); - //! Get the current step count //! @param health_data A pointer to the health data to use //! @return the current step count diff --git a/src/fw/apps/system/health/data_private.h b/src/fw/apps/system/health/data_private.h index 04c2b30a9a..72a794e9dc 100644 --- a/src/fw/apps/system/health/data_private.h +++ b/src/fw/apps/system/health/data_private.h @@ -7,34 +7,34 @@ typedef struct HealthData { //!< Current step / activity info - int32_t step_data[DAYS_PER_WEEK]; //!< Step history for today and the previous 6 days + int32_t step_data[DAYS_PER_WEEK]; //!< Step history for today and the previous 6 days int32_t current_distance_meters; int32_t current_calories; //!< Typical step info - ActivityMetricAverages step_averages; //!< The step averages for the current day - int32_t current_step_average; //!< The current step average so far - int32_t step_average_last_updated_time; //!< The time at which current_step_average was updated + ActivityMetricAverages step_averages; //!< The step averages for the current day + int32_t current_step_average; //!< The current step average so far + int32_t step_average_last_updated_time; //!< The time at which current_step_average was updated int32_t monthly_step_average; - int32_t sleep_data[DAYS_PER_WEEK]; //!< Sleep history for the past week - int32_t typical_sleep; //! Typical sleep for the current week day - int32_t deep_sleep; //!< Amount of deep sleep last night + int32_t sleep_data[DAYS_PER_WEEK]; //!< Sleep history for the past week + int32_t typical_sleep; //! Typical sleep for the current week day + int32_t deep_sleep; //!< Amount of deep sleep last night - int32_t sleep_start; //!< When the user went to sleep (seconds after midnight) - int32_t sleep_end; //!< When the user woke up (seconds after midnight) - int32_t typical_sleep_start; //!< When the user typically goes to sleep - int32_t typical_sleep_end; //!< When the user typically wakes up + int32_t sleep_start; //!< When the user went to sleep (seconds after midnight) + int32_t sleep_end; //!< When the user woke up (seconds after midnight) + int32_t typical_sleep_start; //!< When the user typically goes to sleep + int32_t typical_sleep_end; //!< When the user typically wakes up int32_t monthly_sleep_average; - uint32_t num_activity_sessions; //!< Number of activity sessions returned by the API - ActivitySession activity_sessions[ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT]; //!< Activity sessions + uint32_t num_activity_sessions; //!< Number of activity sessions returned by the API + ActivitySession activity_sessions[ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT]; //!< Activity sessions - int32_t current_hr_bpm; //!< Current BPM - int32_t resting_hr_bpm; //!< Resting BPM - time_t hr_last_updated; //!< Time at which HR data was last updated + int32_t current_hr_bpm; //!< Current BPM + int32_t resting_hr_bpm; //!< Resting BPM + time_t hr_last_updated; //!< Time at which HR data was last updated int32_t hr_zone1_minutes; int32_t hr_zone2_minutes; diff --git a/src/fw/apps/system/health/detail_card.c b/src/fw/apps/system/health/detail_card.c index 19f29d91c1..3591fbde53 100644 --- a/src/fw/apps/system/health/detail_card.c +++ b/src/fw/apps/system/health/detail_card.c @@ -32,8 +32,8 @@ static void prv_draw_headings(HealthDetailCard *detail_card, GContext *ctx, cons #if PBL_ROUND #if PBL_DISPLAY_HEIGHT >= 200 // Spread the summary content over the taller display instead of packing it at the top - int16_t header_y_origin = ((detail_card->num_headings > 1) ? 40 : 52) + - (i * (rect_height + 12)); + int16_t header_y_origin = + ((detail_card->num_headings > 1) ? 40 : 52) + (i * (rect_height + 12)); #else int16_t header_y_origin = ((detail_card->num_headings > 1) ? 22 : 32) + (i * (rect_height + 5)); #endif @@ -62,20 +62,20 @@ static void prv_draw_headings(HealthDetailCard *detail_card, GContext *ctx, cons if (has_secondary_heading) { label_rect.size.w /= 2; } - label_rect.size.h = 12; // Restrict to a single line + label_rect.size.h = 12; // Restrict to a single line graphics_context_set_text_color(ctx, gcolor_legible_over(heading->fill_color)); - graphics_draw_text(ctx, heading->primary_label, detail_card->heading_label_font, - label_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, heading->primary_label, detail_card->heading_label_font, label_rect, + GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); const int16_t value_rect_y_padding = 12; GRect value_rect = label_rect; value_rect.origin.y += value_rect_y_padding; - graphics_draw_text(ctx, heading->primary_value, detail_card->heading_value_font, - value_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, heading->primary_value, detail_card->heading_value_font, value_rect, + GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); if (!heading->secondary_label) { continue; @@ -85,8 +85,9 @@ static void prv_draw_headings(HealthDetailCard *detail_card, GContext *ctx, cons GPoint separator_top_point = GPoint(header_rect.origin.x + (header_rect.size.w / 2) - 1, header_rect.origin.y + separator_padding); - GPoint separator_bot_point = GPoint(separator_top_point.x, separator_top_point.y + - header_rect.size.h - (separator_padding * 2) - 1); + GPoint separator_bot_point = + GPoint(separator_top_point.x, + separator_top_point.y + header_rect.size.h - (separator_padding * 2) - 1); graphics_draw_line(ctx, separator_top_point, separator_bot_point); @@ -98,11 +99,11 @@ static void prv_draw_headings(HealthDetailCard *detail_card, GContext *ctx, cons label_rect.origin.x += label_rect.size.w; value_rect.origin.x += value_rect.size.w; - graphics_draw_text(ctx, heading->secondary_label, detail_card->heading_label_font, - label_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, heading->secondary_label, detail_card->heading_label_font, label_rect, + GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); - graphics_draw_text(ctx, heading->secondary_value, detail_card->heading_value_font, - value_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, heading->secondary_value, detail_card->heading_value_font, value_rect, + GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } } @@ -143,8 +144,8 @@ static void prv_draw_subtitles(HealthDetailCard *detail_card, GContext *ctx, con } static void prv_draw_progress_bar(GContext *ctx, HealthProgressBar *progress_bar, GColor bg_color, - GColor fill_color, int current_progress, int typical_progress, int max_progress, - bool hide_typical) { + GColor fill_color, int current_progress, int typical_progress, + int max_progress, bool hide_typical) { const GColor typical_color = PBL_IF_COLOR_ELSE(GColorYellow, GColorBlack); const GColor outline_color = PBL_IF_COLOR_ELSE(GColorClear, GColorBlack); @@ -166,50 +167,55 @@ static void prv_draw_progress_bar(GContext *ctx, HealthProgressBar *progress_bar #if PBL_RECT static void prv_draw_progress_bar_in_zone(GContext *ctx, const GRect *zone_rect, GColor fill_color, - int current_progress, int typical_progress, int max_progress, bool hide_typical) { + int current_progress, int typical_progress, + int max_progress, bool hide_typical) { const int16_t progress_bar_x = zone_rect->origin.x + PBL_IF_BW_ELSE(0, -1); const int16_t progress_bar_y = zone_rect->origin.y + 22; const int16_t progress_bar_width = zone_rect->size.w + PBL_IF_BW_ELSE(-2, 1); const int16_t progress_bar_height = 10 + PBL_IF_BW_ELSE(-1, 0); HealthProgressSegment segments[] = { - { - // Left side vertical line (needed for the draw outline function to draw the vertical lines) - .type = HealthProgressSegmentType_Corner, - .points = { - {progress_bar_x, progress_bar_y}, - {progress_bar_x, progress_bar_y + progress_bar_height}, - {progress_bar_x, progress_bar_y + progress_bar_height}, - {progress_bar_x, progress_bar_y}, + { + // Left side vertical line (needed for the draw outline function to draw the vertical + // lines) + .type = HealthProgressSegmentType_Corner, + .points = + { + {progress_bar_x, progress_bar_y}, + {progress_bar_x, progress_bar_y + progress_bar_height}, + {progress_bar_x, progress_bar_y + progress_bar_height}, + {progress_bar_x, progress_bar_y}, + }, }, - }, - { - // Right side vertical line (needed for the draw outline function to draw the vertical lines) - .type = HealthProgressSegmentType_Corner, - .points = { - {progress_bar_x + progress_bar_width, progress_bar_y}, - {progress_bar_x + progress_bar_width, progress_bar_y + progress_bar_height}, - {progress_bar_x + progress_bar_width, progress_bar_y + progress_bar_height}, - {progress_bar_x + progress_bar_width, progress_bar_y}, + { + // Right side vertical line (needed for the draw outline function to draw the vertical + // lines) + .type = HealthProgressSegmentType_Corner, + .points = + { + {progress_bar_x + progress_bar_width, progress_bar_y}, + {progress_bar_x + progress_bar_width, progress_bar_y + progress_bar_height}, + {progress_bar_x + progress_bar_width, progress_bar_y + progress_bar_height}, + {progress_bar_x + progress_bar_width, progress_bar_y}, + }, }, - }, - { - // Horizontal bar from left line to right line - .type = HealthProgressSegmentType_Horizontal, - .amount_of_total = HEALTH_PROGRESS_BAR_MAX_VALUE, - .mark_width = 124, // Arbitrarily chosen through trial and error - .points = { - {progress_bar_x, progress_bar_y + progress_bar_height}, - {progress_bar_x + progress_bar_width, progress_bar_y + progress_bar_height}, - {progress_bar_x + progress_bar_width, progress_bar_y}, - {progress_bar_x, progress_bar_y}, + { + // Horizontal bar from left line to right line + .type = HealthProgressSegmentType_Horizontal, + .amount_of_total = HEALTH_PROGRESS_BAR_MAX_VALUE, + .mark_width = 124, // Arbitrarily chosen through trial and error + .points = { + {progress_bar_x, progress_bar_y + progress_bar_height}, + {progress_bar_x + progress_bar_width, progress_bar_y + progress_bar_height}, + {progress_bar_x + progress_bar_width, progress_bar_y}, + {progress_bar_x, progress_bar_y}, + }, }, - }, }; HealthProgressBar progress_bar = { - .num_segments = ARRAY_LENGTH(segments), - .segments = segments, + .num_segments = ARRAY_LENGTH(segments), + .segments = segments, }; const GColor bg_color = PBL_IF_COLOR_ELSE(GColorDarkGray, GColorWhite); @@ -238,8 +244,9 @@ static void prv_draw_zones(HealthDetailCard *detail_card, GContext *ctx) { GTextOverflowModeWordWrap, GTextAlignmentLeft, NULL); if (zone->show_crown) { - const GSize label_size = app_graphics_text_layout_get_content_size(zone->label, - detail_card->subtitle_font, zone_rect, GTextOverflowModeWordWrap, GTextAlignmentLeft); + const GSize label_size = app_graphics_text_layout_get_content_size( + zone->label, detail_card->subtitle_font, zone_rect, GTextOverflowModeWordWrap, + GTextAlignmentLeft); GPoint icon_offset = zone_rect.origin; icon_offset.x += label_size.w + 4; #if PBL_BW @@ -249,7 +256,8 @@ static void prv_draw_zones(HealthDetailCard *detail_card, GContext *ctx) { } prv_draw_progress_bar_in_zone(ctx, &zone_rect, zone->fill_color, zone->progress, - detail_card->daily_avg, detail_card->max_progress, zone->hide_typical); + detail_card->daily_avg, detail_card->max_progress, + zone->hide_typical); zone_rect.origin.y += rect_height + rect_padding; detail_card->y_origin += rect_height + rect_padding; @@ -257,17 +265,17 @@ static void prv_draw_zones(HealthDetailCard *detail_card, GContext *ctx) { detail_card->y_origin += rect_padding; } -#endif // PBL_RECT +#endif // PBL_RECT #if PBL_ROUND -static uint16_t prv_get_num_rows_callback(MenuLayer *menu_layer, - uint16_t section_index, void *context) { +static uint16_t prv_get_num_rows_callback(MenuLayer *menu_layer, uint16_t section_index, + void *context) { HealthDetailCard *detail_card = (HealthDetailCard *)context; return detail_card->num_zones + 1; } -static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *context) { +static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *context) { HealthDetailCard *detail_card = (HealthDetailCard *)context; if (cell_index->row == 0) { @@ -301,23 +309,23 @@ static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, const GRect cell_bounds = grect_inset(cell_layer->bounds, GEdgeInsets(0, -1)); HealthProgressSegment segments[] = { - { - // Horizontal bar from left line to right line - .type = HealthProgressSegmentType_Horizontal, - .amount_of_total = HEALTH_PROGRESS_BAR_MAX_VALUE, - .mark_width = 100, // Arbitrarily chosen through trial and error - .points = { - {cell_bounds.origin.x, cell_bounds.size.h}, - {cell_bounds.size.w, cell_bounds.size.h}, - {cell_bounds.size.w, cell_bounds.origin.y}, - {cell_bounds.origin.x, cell_bounds.origin.y}, + { + // Horizontal bar from left line to right line + .type = HealthProgressSegmentType_Horizontal, + .amount_of_total = HEALTH_PROGRESS_BAR_MAX_VALUE, + .mark_width = 100, // Arbitrarily chosen through trial and error + .points = { + {cell_bounds.origin.x, cell_bounds.size.h}, + {cell_bounds.size.w, cell_bounds.size.h}, + {cell_bounds.size.w, cell_bounds.origin.y}, + {cell_bounds.origin.x, cell_bounds.origin.y}, + }, }, - }, }; HealthProgressBar progress_bar = { - .num_segments = ARRAY_LENGTH(segments), - .segments = segments, + .num_segments = ARRAY_LENGTH(segments), + .segments = segments, }; prv_draw_progress_bar(ctx, &progress_bar, GColorLightGray, zone->fill_color, zone->progress, @@ -339,8 +347,8 @@ static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, } } -static int16_t prv_get_cell_height_callback(MenuLayer *menu_layer, - MenuIndex *cell_index, void *context) { +static int16_t prv_get_cell_height_callback(MenuLayer *menu_layer, MenuIndex *cell_index, + void *context) { if (cell_index->row == 0) { return menu_layer_is_index_selected(menu_layer, cell_index) ? DISP_ROWS : 0; } @@ -355,16 +363,15 @@ static int16_t prv_get_cell_height_callback(MenuLayer *menu_layer, static void prv_refresh_content_indicators(HealthDetailCard *detail_card) { const bool is_up_visible = (menu_layer_get_selected_index(&detail_card->menu_layer).row > 0); - const bool is_down_visible = (menu_layer_get_selected_index(&detail_card->menu_layer).row < - prv_get_num_rows_callback(&detail_card->menu_layer, 0, detail_card) - 1); + const bool is_down_visible = + (menu_layer_get_selected_index(&detail_card->menu_layer).row < + prv_get_num_rows_callback(&detail_card->menu_layer, 0, detail_card) - 1); - content_indicator_set_content_available(&detail_card->up_indicator, - ContentIndicatorDirectionUp, + content_indicator_set_content_available(&detail_card->up_indicator, ContentIndicatorDirectionUp, is_up_visible); content_indicator_set_content_available(&detail_card->down_indicator, - ContentIndicatorDirectionDown, - is_down_visible); + ContentIndicatorDirectionDown, is_down_visible); } static void prv_selection_changed_callback(struct MenuLayer *menu_layer, MenuIndex new_index, @@ -372,7 +379,7 @@ static void prv_selection_changed_callback(struct MenuLayer *menu_layer, MenuInd HealthDetailCard *detail_card = (HealthDetailCard *)context; prv_refresh_content_indicators(detail_card); } -#else // PBL_RECT +#else // PBL_RECT static void prv_health_detail_scroll_layer_update_proc(Layer *layer, GContext *ctx) { ScrollLayer *scroll_layer = (ScrollLayer *)layer->parent; HealthDetailCard *detail_card = (HealthDetailCard *)scroll_layer->context; @@ -386,7 +393,7 @@ static void prv_health_detail_scroll_layer_update_proc(Layer *layer, GContext *c scroll_layer_set_content_size(&detail_card->scroll_layer, GSize(layer->bounds.size.w, detail_card->y_origin)); } -#endif // PBL_RECT +#endif // PBL_RECT HealthDetailCard *health_detail_card_create(const HealthDetailCardConfig *config) { HealthDetailCard *detail_card = app_zalloc_check(sizeof(HealthDetailCard)); @@ -397,38 +404,41 @@ HealthDetailCard *health_detail_card_create(const HealthDetailCardConfig *config // setup menu layer MenuLayer *menu_layer = &detail_card->menu_layer; menu_layer_init(menu_layer, &window_frame); - menu_layer_set_callbacks(menu_layer, detail_card, &(MenuLayerCallbacks) { - .get_num_rows = prv_get_num_rows_callback, - .get_cell_height = prv_get_cell_height_callback, - .draw_row = prv_draw_row_callback, - .selection_changed = prv_selection_changed_callback, - }); + menu_layer_set_callbacks(menu_layer, detail_card, + &(MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows_callback, + .get_cell_height = prv_get_cell_height_callback, + .draw_row = prv_draw_row_callback, + .selection_changed = prv_selection_changed_callback, + }); menu_layer_set_normal_colors(menu_layer, detail_card->bg_color, GColorWhite); menu_layer_set_highlight_colors(menu_layer, detail_card->bg_color, GColorBlack); menu_layer_set_click_config_onto_window(menu_layer, &detail_card->window); menu_layer_set_scroll_wrap_around(menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&detail_card->window.layer, menu_layer_get_layer(menu_layer)); // setup content indicators const int content_indicator_height = 15; - const GRect down_arrow_layer_frame = grect_inset(window_frame, - GEdgeInsets(window_frame.size.h - content_indicator_height, 0, 0)); + const GRect down_arrow_layer_frame = + grect_inset(window_frame, GEdgeInsets(window_frame.size.h - content_indicator_height, 0, 0)); layer_init(&detail_card->down_arrow_layer, &down_arrow_layer_frame); layer_add_child(&detail_card->window.layer, &detail_card->down_arrow_layer); content_indicator_init(&detail_card->down_indicator); - const GRect up_arrow_layer_frame = grect_inset(window_frame, - GEdgeInsets(0, 0, window_frame.size.h - content_indicator_height)); + const GRect up_arrow_layer_frame = + grect_inset(window_frame, GEdgeInsets(0, 0, window_frame.size.h - content_indicator_height)); layer_init(&detail_card->up_arrow_layer, &up_arrow_layer_frame); layer_add_child(&detail_card->window.layer, &detail_card->up_arrow_layer); content_indicator_init(&detail_card->up_indicator); - ContentIndicatorConfig content_indicator_config = (ContentIndicatorConfig) { - .layer = &detail_card->up_arrow_layer, - .colors.foreground = gcolor_legible_over(detail_card->bg_color), - .colors.background = detail_card->bg_color, + ContentIndicatorConfig content_indicator_config = (ContentIndicatorConfig){ + .layer = &detail_card->up_arrow_layer, + .colors.foreground = gcolor_legible_over(detail_card->bg_color), + .colors.background = detail_card->bg_color, }; content_indicator_configure_direction(&detail_card->up_indicator, ContentIndicatorDirectionUp, &content_indicator_config); @@ -436,7 +446,7 @@ HealthDetailCard *health_detail_card_create(const HealthDetailCardConfig *config content_indicator_configure_direction(&detail_card->down_indicator, ContentIndicatorDirectionDown, &content_indicator_config); prv_refresh_content_indicators(detail_card); -#else // PBL_RECT +#else // PBL_RECT // setup scroll layer scroll_layer_init(&detail_card->scroll_layer, &window_frame); scroll_layer_set_click_config_onto_window(&detail_card->scroll_layer, &detail_card->window); @@ -445,7 +455,7 @@ HealthDetailCard *health_detail_card_create(const HealthDetailCardConfig *config layer_add_child(&detail_card->window.layer, (Layer *)&detail_card->scroll_layer); layer_set_update_proc(&detail_card->scroll_layer.content_sublayer, prv_health_detail_scroll_layer_update_proc); -#endif // PBL_RECT +#endif // PBL_RECT detail_card->icon_crown = gdraw_command_image_create_with_resource(RESOURCE_ID_HEALTH_APP_CROWN); detail_card->heading_label_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); detail_card->heading_value_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); @@ -486,7 +496,7 @@ void health_detail_card_configure(HealthDetailCard *detail_card, } detail_card->daily_avg = config->daily_avg; detail_card->max_progress = MAX(config->weekly_max, detail_card->daily_avg); - detail_card->max_progress = detail_card->max_progress * 11 / 10; // add 10%; + detail_card->max_progress = detail_card->max_progress * 11 / 10; // add 10%; if (config->num_zones) { detail_card->num_zones = config->num_zones; detail_card->zones = config->zones; @@ -497,8 +507,10 @@ void health_detail_card_configure(HealthDetailCard *detail_card, } void health_detail_card_set_render_day_zones(HealthDetailZone *zones, int16_t *num_zones, - int32_t *weekly_max, bool format_hours_and_minutes, bool show_crown, GColor fill_color, - GColor today_fill_color, int32_t *day_data, void *i18n_owner) { + int32_t *weekly_max, bool format_hours_and_minutes, + bool show_crown, GColor fill_color, + GColor today_fill_color, int32_t *day_data, + void *i18n_owner) { time_t time_utc = rtc_get_time(); struct tm time_tm; @@ -513,11 +525,11 @@ void health_detail_card_set_render_day_zones(HealthDetailZone *zones, int16_t *n const bool is_today = (i == 0); const size_t buffer_size = 32; - zones[i] = (HealthDetailZone) { - .label = app_zalloc_check(buffer_size), - .progress = day_data[i], - .fill_color = is_today ? PBL_IF_ROUND_ELSE(fill_color, today_fill_color) : fill_color, - .hide_typical = is_today, + zones[i] = (HealthDetailZone){ + .label = app_zalloc_check(buffer_size), + .progress = day_data[i], + .fill_color = is_today ? PBL_IF_ROUND_ELSE(fill_color, today_fill_color) : fill_color, + .hide_typical = is_today, }; char *label_ptr = zones[i].label; @@ -535,7 +547,7 @@ void health_detail_card_set_render_day_zones(HealthDetailZone *zones, int16_t *n health_util_format_hours_and_minutes(label_ptr + pos, buffer_size - pos, day_data[i], i18n_owner); } else { - snprintf(label_ptr + pos, buffer_size - pos, "%"PRId32, day_data[i]); + snprintf(label_ptr + pos, buffer_size - pos, "%" PRId32, day_data[i]); } } diff --git a/src/fw/apps/system/health/detail_card.h b/src/fw/apps/system/health/detail_card.h index 2b8ae067cd..7daf762ddb 100644 --- a/src/fw/apps/system/health/detail_card.h +++ b/src/fw/apps/system/health/detail_card.h @@ -109,5 +109,7 @@ void health_detail_card_configure(HealthDetailCard *detail_card, //! @param day_data pointer to the daily history data //! @param i18n_owner pointer to the i18n owner void health_detail_card_set_render_day_zones(HealthDetailZone *zones, int16_t *num_zones, - int32_t *weekly_max, bool format_hours_and_minutes, bool show_crown, GColor fill_color, - GColor today_fill_color, int32_t *day_data, void *i18n_owner); + int32_t *weekly_max, bool format_hours_and_minutes, + bool show_crown, GColor fill_color, + GColor today_fill_color, int32_t *day_data, + void *i18n_owner); diff --git a/src/fw/apps/system/health/graph_card.c b/src/fw/apps/system/health/graph_card.c index 32a054e427..bcb0c89105 100644 --- a/src/fw/apps/system/health/graph_card.c +++ b/src/fw/apps/system/health/graph_card.c @@ -31,13 +31,18 @@ // Compile-time bar width calculation #define HEALTH_BAR_WIDTH (23 + (DISP_COLS - LEGACY_2X_DISP_COLS) / 19) #define HEALTH_BAR_INSET 3 -#define HEALTH_TOTAL_BAR_WIDTHS PBL_IF_RECT_ELSE((HEALTH_BAR_WIDTH * 7 + 3) - (HEALTH_BAR_INSET * 6), 141) +#define HEALTH_TOTAL_BAR_WIDTHS \ + PBL_IF_RECT_ELSE((HEALTH_BAR_WIDTH * 7 + 3) - (HEALTH_BAR_INSET * 6), 141) // Compile-time avg line width calculations #define HEALTH_WEEKDAY_WIDTH_BASE PBL_IF_RECT_ELSE(103, 119) #define HEALTH_WEEKEND_WIDTH_BASE PBL_IF_RECT_ELSE(38, 58) -#define HEALTH_WEEKDAY_WIDTH (HEALTH_WEEKDAY_WIDTH_BASE + (DISP_COLS - LEGACY_2X_DISP_COLS) * HEALTH_WEEKDAY_WIDTH_BASE / LEGACY_2X_DISP_COLS) -#define HEALTH_WEEKEND_WIDTH (HEALTH_WEEKEND_WIDTH_BASE + (DISP_COLS - LEGACY_2X_DISP_COLS) * HEALTH_WEEKEND_WIDTH_BASE / LEGACY_2X_DISP_COLS) +#define HEALTH_WEEKDAY_WIDTH \ + (HEALTH_WEEKDAY_WIDTH_BASE + \ + (DISP_COLS - LEGACY_2X_DISP_COLS) * HEALTH_WEEKDAY_WIDTH_BASE / LEGACY_2X_DISP_COLS) +#define HEALTH_WEEKEND_WIDTH \ + (HEALTH_WEEKEND_WIDTH_BASE + \ + (DISP_COLS - LEGACY_2X_DISP_COLS) * HEALTH_WEEKEND_WIDTH_BASE / LEGACY_2X_DISP_COLS) #define AVG_LINE_HEIGHT 4 #define AVG_LINE_LEGEND_WIDTH 10 @@ -60,8 +65,9 @@ static void prv_draw_title(HealthGraphCard *graph_card, GContext *ctx) { // inset the drawing bounds if on round to account for the bezel drawing_box = grect_inset(drawing_box, GEdgeInsets(8)); - const GSize text_size = graphics_text_layout_get_max_used_size(ctx, graph_card->title, - graph_card->title_font, drawing_box, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + const GSize text_size = graphics_text_layout_get_max_used_size( + ctx, graph_card->title, graph_card->title_font, drawing_box, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); // increase drawing box y offset if we're only drawing one line of text if (text_size.h < 30) { @@ -75,7 +81,7 @@ static void prv_draw_title(HealthGraphCard *graph_card, GContext *ctx) { static void prv_draw_day_labels_background(HealthGraphCard *graph_card, GContext *ctx) { const GRect *bounds = &graph_card->layer.bounds; - GRect box = {{ .y = LABEL_OFFSET_Y }, { bounds->size.w, LABEL_HEIGHT }}; + GRect box = {{.y = LABEL_OFFSET_Y}, {bounds->size.w, LABEL_HEIGHT}}; graphics_context_set_fill_color(ctx, GColorBlack); graphics_fill_rect(ctx, &box); const int border_width = 3; @@ -109,7 +115,7 @@ static void prv_setup_day_bar_box(int weekday, GRect *box, int16_t bar_height) { // The center bars are slightly wider than the other bars // Note that Thursday is the center bar, not Wednesday since drawing begins with Monday // S M T W T F S - const int bar_widths[DAYS_PER_WEEK] = { w, w, w, w + 1, w + 1, w + 1, w }; + const int bar_widths[DAYS_PER_WEEK] = {w, w, w, w + 1, w + 1, w + 1, w}; const int bar_width = bar_widths[weekday]; #else const int bar_width = w; @@ -127,8 +133,7 @@ static void prv_draw_day_bar_wide(GContext *ctx, const GRect *box, const GRect * graphics_fill_rect(ctx, box_inset); } -static void prv_draw_day_bar_thin(GContext *ctx, const GRect *box, int weekday, - GColor bar_color) { +static void prv_draw_day_bar_thin(GContext *ctx, const GRect *box, int weekday, GColor bar_color) { GRect thin_box = *box; // Nudge the bars before Thursday (inclusive). Note that Sunday is on the right side, at the end const int thin_offset_x = WITHIN(weekday, Monday, Thursday) ? 1 : 0; @@ -139,8 +144,8 @@ static void prv_draw_day_bar_thin(GContext *ctx, const GRect *box, int weekday, graphics_fill_rect(ctx, &thin_box); } -static int16_t prv_draw_day_bar(GContext *ctx, int weekday, const GRect *box, - GColor bar_color, bool wide_bar) { +static int16_t prv_draw_day_bar(GContext *ctx, int weekday, const GRect *box, GColor bar_color, + bool wide_bar) { const int bar_inset = 3; GRect box_inset = grect_inset(*box, GEdgeInsets(bar_inset, bar_inset, 0, bar_inset)); if (wide_bar) { @@ -171,10 +176,9 @@ static void prv_draw_day_bars(HealthGraphCard *graph_card, GContext *ctx) { const int total_bar_widths = HEALTH_TOTAL_BAR_WIDTHS; const int legend_line_height = fonts_get_font_height(graph_card->legend_font); const GRect *bounds = &graph_card->layer.bounds; - GRect box = { .origin.x = (bounds->size.w - total_bar_widths) / 2, .origin.y = LABEL_OFFSET_Y }; + GRect box = {.origin.x = (bounds->size.w - total_bar_widths) / 2, .origin.y = LABEL_OFFSET_Y}; // The first day to draw is Monday, and draw a week's worth of bars - for (int i = Monday, draw_count = 0; - draw_count < DAYS_PER_WEEK; + for (int i = Monday, draw_count = 0; draw_count < DAYS_PER_WEEK; draw_count++, i = (i + 1) % DAYS_PER_WEEK) { // Setup the dimensions and color of the day bar const int32_t day_point = prv_get_day_point(graph_card, i); @@ -200,12 +204,12 @@ static void prv_draw_day_bars(HealthGraphCard *graph_card, GContext *ctx) { const int char_offset_y = 1; box.origin.y = LABEL_OFFSET_Y + char_offset_y; box.size.h = legend_line_height; - char char_buffer[] = { graph_card->day_chars[i], '\0' }; + char char_buffer[] = {graph_card->day_chars[i], '\0'}; const GColor active_legend_color = GColorRed; const GColor inactive_legend_color = GColorBlack; graphics_context_set_text_color(ctx, is_active ? active_legend_color : inactive_legend_color); - graphics_draw_text(ctx, char_buffer, graph_card->legend_font, box, - GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, char_buffer, graph_card->legend_font, box, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); // Move the box cursor to the next bar box.origin.x = next_x; @@ -217,26 +221,26 @@ static void prv_draw_avg_line(HealthGraphCard *graph_card, GContext *ctx, int32_ if (avg == 0) { return; } - const int offset_y = LABEL_OFFSET_Y - MAX(prv_convert_to_graph_height(graph_card, avg), - AVG_LINE_HEIGHT / 2); + const int offset_y = + LABEL_OFFSET_Y - MAX(prv_convert_to_graph_height(graph_card, avg), AVG_LINE_HEIGHT / 2); graphics_context_set_fill_color(ctx, AVG_LINE_COLOR); - graphics_fill_rect(ctx, &(GRect) {{ offset_x, offset_y - AVG_LINE_HEIGHT / 2 }, - { width, AVG_LINE_HEIGHT }}); + graphics_fill_rect( + ctx, &(GRect){{offset_x, offset_y - AVG_LINE_HEIGHT / 2}, {width, AVG_LINE_HEIGHT}}); } static void prv_draw_avg_lines(HealthGraphCard *graph_card, GContext *ctx) { const GRect *bounds = &graph_card->layer.bounds; prv_draw_avg_line(graph_card, ctx, graph_card->stats.weekday.avg, 0, HEALTH_WEEKDAY_WIDTH); - prv_draw_avg_line(graph_card, ctx, graph_card->stats.weekend.avg, bounds->size.w - HEALTH_WEEKEND_WIDTH, - HEALTH_WEEKEND_WIDTH); + prv_draw_avg_line(graph_card, ctx, graph_card->stats.weekend.avg, + bounds->size.w - HEALTH_WEEKEND_WIDTH, HEALTH_WEEKEND_WIDTH); } static int32_t prv_get_info_data_point(HealthGraphCard *graph_card) { // Show today's data point if the selection is a day of the week, otherwise show the weekday // average if the current day is a weekday or weekend average if the current day is on the weekend if (graph_card->selection == HealthGraphIndex_Average) { - return IS_WEEKDAY(graph_card->current_day) ? graph_card->stats.weekday.avg : - graph_card->stats.weekend.avg; + return IS_WEEKDAY(graph_card->current_day) ? graph_card->stats.weekday.avg + : graph_card->stats.weekend.avg; } int day_point = prv_get_day_point(graph_card, graph_card->selection); if (graph_card->selection == graph_card->current_day && day_point == 0) { @@ -251,10 +255,10 @@ static void prv_draw_avg_line_legend(HealthGraphCard *graph_card, GContext *ctx, const int info_line_height = fonts_get_font_height(graph_card->legend_font); const int avg_line_offset_y = -1; const GRect avg_line_box = { - .origin.x = offset_x, - // Position vertically centered with the text - .origin.y = info_offset_y + (info_line_height + INFO_PADDING_BOTTOM) / 2 + avg_line_offset_y, - .size = { AVG_LINE_LEGEND_WIDTH, AVG_LINE_HEIGHT }, + .origin.x = offset_x, + // Position vertically centered with the text + .origin.y = info_offset_y + (info_line_height + INFO_PADDING_BOTTOM) / 2 + avg_line_offset_y, + .size = {AVG_LINE_LEGEND_WIDTH, AVG_LINE_HEIGHT}, }; graphics_context_set_fill_color(ctx, AVG_LINE_COLOR); graphics_fill_rect(ctx, &avg_line_box); @@ -263,7 +267,7 @@ static void prv_draw_avg_line_legend(HealthGraphCard *graph_card, GContext *ctx, static void prv_draw_avg_info_text(HealthGraphCard *graph_card, GContext *ctx, int offset_x, int offset_y, int height) { const GRect *bounds = &graph_card->layer.bounds; - const GRect avg_text_box = {{ offset_x, offset_y }, { bounds->size.w, height }}; + const GRect avg_text_box = {{offset_x, offset_y}, {bounds->size.w, height}}; graphics_draw_text(ctx, graph_card->info_avg, graph_card->legend_font, avg_text_box, GTextOverflowModeWordWrap, GTextAlignmentLeft, NULL); } @@ -271,10 +275,10 @@ static void prv_draw_avg_info_text(HealthGraphCard *graph_card, GContext *ctx, i static void prv_draw_custom_info_text(HealthGraphCard *graph_card, GContext *ctx, char *text, int offset_x, int info_offset_y, int info_height) { const GRect *bounds = &graph_card->layer.bounds; - const GRect info_text_box = {{ offset_x, info_offset_y }, { bounds->size.w, info_height }}; + const GRect info_text_box = {{offset_x, info_offset_y}, {bounds->size.w, info_height}}; graphics_context_set_text_color(ctx, GColorBlack); - graphics_draw_text(ctx, text, graph_card->legend_font, info_text_box, - GTextOverflowModeWordWrap, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, text, graph_card->legend_font, info_text_box, GTextOverflowModeWordWrap, + GTextAlignmentLeft, NULL); } static bool prv_is_selection_last_weekday(HealthGraphCard *graph_card) { @@ -283,9 +287,10 @@ static bool prv_is_selection_last_weekday(HealthGraphCard *graph_card) { // Otherwise the selection is last week if either the selection is Sunday // or if the selection is greater than the current day return (((int)graph_card->current_day == graph_card->selection && graph_card->day_data[0] == 0) || - ((graph_card->current_day == Sunday) ? false : - ((int)graph_card->selection == Sunday || - (int)graph_card->selection > graph_card->current_day))); + ((graph_card->current_day == Sunday) + ? false + : ((int)graph_card->selection == Sunday || + (int)graph_card->selection > graph_card->current_day))); } size_t health_graph_format_weekday_prefix(HealthGraphCard *graph_card, char *buffer, @@ -295,13 +300,14 @@ size_t health_graph_format_weekday_prefix(HealthGraphCard *graph_card, char *buf const time_t selection_time = ((positive_modulo(graph_card->selection - Monday, DAYS_PER_WEEK) - positive_modulo(graph_card->current_day - Monday, DAYS_PER_WEEK) - DAYS_PER_WEEK) * - SECONDS_PER_DAY) + graph_card->data_timestamp; + SECONDS_PER_DAY) + + graph_card->data_timestamp; const int pos = clock_get_month_named_abbrev_date(buffer, buffer_size, selection_time); strncat(buffer, i18n_get(": ", graph_card), buffer_size - pos - 1); return strlen(buffer); } else { - struct tm local_tm = (struct tm) { - .tm_wday = positive_modulo(graph_card->selection, DAYS_PER_WEEK), + struct tm local_tm = (struct tm){ + .tm_wday = positive_modulo(graph_card->selection, DAYS_PER_WEEK), }; return strftime(buffer, buffer_size, i18n_get("%a: ", graph_card), &local_tm); } @@ -327,8 +333,8 @@ static void prv_draw_info_with_text(HealthGraphCard *graph_card, GContext *ctx, int cursor_x = 0; if (graph_card->selection == HealthGraphIndex_Average) { graphics_text_layout_get_max_used_size(ctx, graph_card->info_avg, graph_card->legend_font, - *bounds, GTextOverflowModeWordWrap, - GTextAlignmentLeft, (GTextAttributes *)&text_layout); + *bounds, GTextOverflowModeWordWrap, GTextAlignmentLeft, + (GTextAttributes *)&text_layout); avg_text_size = text_layout.max_used_size; total_width += avg_text_size.w + AVG_LINE_LEGEND_WIDTH; @@ -381,8 +387,8 @@ HealthGraphCard *health_graph_card_create(const HealthGraphCardConfig *config) { layer_init(&graph_card->layer, &GRectZero); layer_set_update_proc(&graph_card->layer, prv_health_graph_layer_update_proc); health_graph_card_configure(graph_card, config); - graph_card->title_font = fonts_get_system_font(PBL_IF_RECT_ELSE(FONT_KEY_GOTHIC_24_BOLD, - FONT_KEY_GOTHIC_18_BOLD)); + graph_card->title_font = + fonts_get_system_font(PBL_IF_RECT_ELSE(FONT_KEY_GOTHIC_24_BOLD, FONT_KEY_GOTHIC_18_BOLD)); graph_card->legend_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); graph_card->current_day = prv_get_weekday(graph_card->data_timestamp); // The day characters in standard tm weekday order @@ -415,8 +421,8 @@ void health_graph_card_configure(HealthGraphCard *graph_card, const HealthGraphC graph_card->stats = config->graph_data->stats; memcpy(graph_card->day_data, config->graph_data->day_data, sizeof(graph_card->day_data)); graph_card->data_timestamp = config->graph_data->timestamp; - graph_card->data_max = MAX(config->graph_data->default_max, - config->graph_data->stats.daily.max); + graph_card->data_max = + MAX(config->graph_data->default_max, config->graph_data->stats.daily.max); } if (config->info_update) { graph_card->info_update = config->info_update; diff --git a/src/fw/apps/system/health/graph_card.h b/src/fw/apps/system/health/graph_card.h index a65e0338a0..c549184f81 100644 --- a/src/fw/apps/system/health/graph_card.h +++ b/src/fw/apps/system/health/graph_card.h @@ -44,7 +44,7 @@ struct HealthGraphCard { WeeklyStats stats; //! Today is 0. Save up to and including last week's day of the same week day int32_t day_data[DAYS_PER_WEEK + 1]; - time_t data_timestamp; //!< Time at which the data applies in UTC seconds + time_t data_timestamp; //!< Time at which the data applies in UTC seconds int32_t data_max; GFont title_font; @@ -57,7 +57,7 @@ struct HealthGraphCard { HealthGraphCardInfoUpdate info_update; size_t info_buffer_size; - uint8_t current_day; //!< Current weekday (weekend inclusive) where Sunday is first at 0 + uint8_t current_day; //!< Current weekday (weekend inclusive) where Sunday is first at 0 HealthGraphIndex selection; }; diff --git a/src/fw/apps/system/health/health.c b/src/fw/apps/system/health/health.c index c1123745ac..cc941b690d 100644 --- a/src/fw/apps/system/health/health.c +++ b/src/fw/apps/system/health/health.c @@ -32,7 +32,6 @@ typedef struct HealthAppData { HealthData *health_data; } HealthAppData; - //////////////////////////////////////////////////////////////////////////////////////////////////// // Callbacks // @@ -55,7 +54,7 @@ static void prv_health_service_event_handler(HealthEventType event, void *contex } else if (event == HealthEventSleepUpdate) { const uint32_t seconds_sleep_today = health_service_sum_today(HealthMetricSleepSeconds); const uint32_t seconds_restful_sleep_today = - health_service_sum_today(HealthMetricSleepRestfulSeconds); + health_service_sum_today(HealthMetricSleepRestfulSeconds); health_data_update_sleep(health_app_data->health_data, seconds_sleep_today, seconds_restful_sleep_today); } else if (event == HealthEventHeartRateUpdate) { @@ -66,7 +65,6 @@ static void prv_health_service_event_handler(HealthEventType event, void *contex health_card_view_mark_dirty(health_app_data->health_card_view); } - //////////////////////////////////////////////////////////////////////////////////////////////////// // Initialization and Termination // @@ -74,17 +72,12 @@ static void prv_health_service_event_handler(HealthEventType event, void *contex //! Show insights onboarding dialog for first-time users static void prv_show_insights_onboarding_dialog(void) { /// Insights onboarding message - static const char *text = i18n_noop("Psst! Want smart tips about your activity and sleep? " - "You can enable Insights in the mobile app."); + static const char *text = i18n_noop( + "Psst! Want smart tips about your activity and sleep? " + "You can enable Insights in the mobile app."); ExpandableDialog *dialog = expandable_dialog_create_with_params( - "Insights Onboarding", - RESOURCE_ID_HEALTH_ICON_MOON, - text, - GColorBlack, - GColorWhite, - NULL, - RESOURCE_ID_ACTION_BAR_ICON_CHECK, - expandable_dialog_close_cb); + "Insights Onboarding", RESOURCE_ID_HEALTH_ICON_MOON, text, GColorBlack, GColorWhite, NULL, + RESOURCE_ID_ACTION_BAR_ICON_CHECK, expandable_dialog_close_cb); app_expandable_dialog_push(dialog); } @@ -109,16 +102,18 @@ static void prv_finish_initialization_cb(bool in_focus) { static void prv_initialize(void) { if (!activity_prefs_tracking_is_enabled()) { /// Health disabled text - static const char *msg = i18n_noop("Track your steps, sleep, and more!" - " Enable Pebble Health in the mobile app."); + static const char *msg = i18n_noop( + "Track your steps, sleep, and more!" + " Enable Pebble Health in the mobile app."); health_tracking_ui_show_message(RESOURCE_ID_HEART_TINY, msg, true); return; } if (!activity_is_initialized()) { /// Health waiting for time sync - static const char *msg = i18n_noop("Health requires the time to be synced." - " Please connect your phone."); + static const char *msg = i18n_noop( + "Health requires the time to be synced." + " Please connect your phone."); health_tracking_ui_show_message(RESOURCE_ID_ALARM_CLOCK_TINY, msg, true); return; } @@ -138,15 +133,15 @@ static void prv_initialize(void) { health_card_view_push(health_app_data->health_card_view); // Show insights onboarding if user hasn't seen it yet and doesn't have insights enabled - const bool insights_enabled = activity_prefs_activity_insights_are_enabled() || - activity_prefs_sleep_insights_are_enabled(); + const bool insights_enabled = + activity_prefs_activity_insights_are_enabled() || activity_prefs_sleep_insights_are_enabled(); if (previous_version < CURRENT_HEALTH_APP_VERSION && !insights_enabled) { prv_show_insights_onboarding_dialog(); } // Finish up initializing the app a bit later. This helps reduce lag when opening the app app_focus_service_subscribe_handlers((AppFocusHandlers){ - .did_focus = prv_finish_initialization_cb, + .did_focus = prv_finish_initialization_cb, }); } @@ -175,15 +170,16 @@ static void prv_main(void) { const PebbleProcessMd *health_app_get_info(void) { static const PebbleProcessMdSystem s_health_app_info = { - .common = { - .main_func = &prv_main, - .uuid = UUID_HEALTH_DATA_SOURCE, + .common = + { + .main_func = &prv_main, + .uuid = UUID_HEALTH_DATA_SOURCE, #if CAPABILITY_HAS_CORE_NAVIGATION4 - .visibility = ProcessVisibilityHidden, + .visibility = ProcessVisibilityHidden, #endif - }, - .icon_resource_id = RESOURCE_ID_MENU_ICON_HEALTH, - .name = i18n_noop("Health"), + }, + .icon_resource_id = RESOURCE_ID_MENU_ICON_HEALTH, + .name = i18n_noop("Health"), }; - return (const PebbleProcessMd*) &s_health_app_info; + return (const PebbleProcessMd *)&s_health_app_info; } diff --git a/src/fw/apps/system/health/hr_detail_card.c b/src/fw/apps/system/health/hr_detail_card.c index 0bdccd5b68..6c8ccf4fbe 100644 --- a/src/fw/apps/system/health/hr_detail_card.c +++ b/src/fw/apps/system/health/hr_detail_card.c @@ -22,16 +22,16 @@ typedef struct HealthHrDetailCard { static void prv_set_zone(HealthDetailZone *zone, int32_t minutes, int32_t *max_progress, const size_t buffer_size, const char *zone_label, void *i18n_owner) { - *zone = (HealthDetailZone) { - .label = app_zalloc_check(buffer_size), - .progress = minutes * SECONDS_PER_MINUTE, - .fill_color = PBL_IF_COLOR_ELSE(GColorSunsetOrange, GColorDarkGray), + *zone = (HealthDetailZone){ + .label = app_zalloc_check(buffer_size), + .progress = minutes * SECONDS_PER_MINUTE, + .fill_color = PBL_IF_COLOR_ELSE(GColorSunsetOrange, GColorDarkGray), }; int pos = snprintf(zone->label, buffer_size, "%s ", i18n_get(zone_label, i18n_owner)); if (zone->progress) { - health_util_format_hours_and_minutes(zone->label + pos, buffer_size - pos, - zone->progress, i18n_owner); + health_util_format_hours_and_minutes(zone->label + pos, buffer_size - pos, zone->progress, + i18n_owner); } if (zone->progress > *max_progress) { @@ -72,25 +72,25 @@ Window *health_hr_detail_card_create(HealthData *health_data) { HealthDetailHeading *heading = &card_data->headings[card_data->num_headings++]; - *heading = (HealthDetailHeading) { - /// Resting HR - .primary_label = (char *)i18n_get("TIME IN ZONES", card_data), - .primary_value = app_zalloc_check(buffer_size), - .fill_color = PBL_IF_COLOR_ELSE(GColorDarkCandyAppleRed, GColorWhite), - .outline_color = PBL_IF_COLOR_ELSE(GColorClear, GColorBlack), + *heading = (HealthDetailHeading){ + /// Resting HR + .primary_label = (char *)i18n_get("TIME IN ZONES", card_data), + .primary_value = app_zalloc_check(buffer_size), + .fill_color = PBL_IF_COLOR_ELSE(GColorDarkCandyAppleRed, GColorWhite), + .outline_color = PBL_IF_COLOR_ELSE(GColorClear, GColorBlack), }; prv_set_heading_value(heading->primary_value, buffer_size, (zone_time_minutes * SECONDS_PER_MINUTE), card_data); const HealthDetailCardConfig config = { - .num_headings = card_data->num_headings, - .headings = card_data->headings, - .weekly_max = max_progress, - .bg_color = GColorWhite, - .num_zones = card_data->num_zones, - .zones = card_data->zones, - .data = card_data, + .num_headings = card_data->num_headings, + .headings = card_data->headings, + .weekly_max = max_progress, + .bg_color = GColorWhite, + .num_zones = card_data->num_zones, + .zones = card_data->zones, + .data = card_data, }; return (Window *)health_detail_card_create(&config); diff --git a/src/fw/apps/system/health/hr_summary_card.c b/src/fw/apps/system/health/hr_summary_card.c index d05e88ee8f..fc06dee729 100644 --- a/src/fw/apps/system/health/hr_summary_card.c +++ b/src/fw/apps/system/health/hr_summary_card.c @@ -43,7 +43,6 @@ typedef struct HealthHrSummaryCardData { #define TEXT_COLOR (PBL_IF_COLOR_ELSE(GColorBulgarianRose, GColorBlack)) #define CARD_BACKGROUND_COLOR (PBL_IF_COLOR_ELSE(GColorWhite, GColorWhite)) - static void prv_pulsing_heart_timer_cb(void *context) { Layer *base_layer = context; HealthHrSummaryCardData *data = layer_get_data(base_layer); @@ -61,9 +60,8 @@ static void prv_pulsing_heart_timer_cb(void *context) { } if (data->num_heart_beats < max_heart_beats) { - data->pulsing_heart_timer = app_timer_register(timer_duration, - prv_pulsing_heart_timer_cb, - base_layer); + data->pulsing_heart_timer = + app_timer_register(timer_duration, prv_pulsing_heart_timer_cb, base_layer); } layer_mark_dirty(base_layer); @@ -72,8 +70,8 @@ static void prv_pulsing_heart_timer_cb(void *context) { static void prv_render_progress_bar(GContext *ctx, Layer *base_layer) { HealthHrSummaryCardData *data = layer_get_data(base_layer); - health_progress_bar_fill(ctx, &data->progress_bar, PROGRESS_BACKGROUND_COLOR, - 0, HEALTH_PROGRESS_BAR_MAX_VALUE); + health_progress_bar_fill(ctx, &data->progress_bar, PROGRESS_BACKGROUND_COLOR, 0, + HEALTH_PROGRESS_BAR_MAX_VALUE); } static void prv_render_icon(GContext *ctx, Layer *base_layer) { @@ -99,14 +97,14 @@ static void prv_render_bpm(GContext *ctx, Layer *base_layer) { horiz_container->horizontal_alignment = GTextAlignmentCenter; if (data->now_bpm == 0) { - health_util_create_text_node_with_text( - EM_DASH, fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD), TEXT_COLOR, container); + health_util_create_text_node_with_text(EM_DASH, fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD), + TEXT_COLOR, container); } else { const size_t bpm_size = sizeof("000"); GTextNodeText *number_text_node = health_util_create_text_node(bpm_size, data->bpm_font, TEXT_COLOR, container); - snprintf((char *)number_text_node->text, bpm_size, "%"PRIu32, data->now_bpm); + snprintf((char *)number_text_node->text, bpm_size, "%" PRIu32, data->now_bpm); GTextNodeText *units_text_node = health_util_create_text_node_with_text( i18n_get("BPM", base_layer), data->units_font, TEXT_COLOR, container); @@ -116,9 +114,10 @@ static void prv_render_bpm(GContext *ctx, Layer *base_layer) { const int offset_y = PBL_IF_RECT_ELSE(101, 109) + HEALTH_Y_OFFSET; - graphics_text_node_draw(&container->node, ctx, - &GRect(0, offset_y, base_layer->bounds.size.w, - fonts_get_font_height(data->bpm_font)), NULL, NULL); + graphics_text_node_draw( + &container->node, ctx, + &GRect(0, offset_y, base_layer->bounds.size.w, fonts_get_font_height(data->bpm_font)), NULL, + NULL); graphics_text_node_destroy(&container->node); } @@ -141,8 +140,8 @@ static void prv_render_timstamp(GContext *ctx, Layer *base_layer) { #endif graphics_context_set_text_color(ctx, TEXT_COLOR); - graphics_draw_text(ctx, buffer, data->timestamp_font, - rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, buffer, data->timestamp_font, rect, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); } static void prv_render_hrm_disabled(GContext *ctx, Layer *base_layer) { @@ -156,8 +155,8 @@ static void prv_render_hrm_disabled(GContext *ctx, Layer *base_layer) { const char *text = i18n_get("Enable heart rate monitoring in the mobile app", base_layer); graphics_context_set_text_color(ctx, TEXT_COLOR); - graphics_draw_text(ctx, text, data->timestamp_font, - rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, text, data->timestamp_font, rect, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); } static void prv_base_layer_update_proc(Layer *base_layer, GContext *ctx) { @@ -194,25 +193,26 @@ Layer *health_hr_summary_card_create(HealthData *health_data) { HealthHrSummaryCardData *data = layer_get_data(base_layer); layer_set_update_proc(base_layer, prv_base_layer_update_proc); // set health data - *data = (HealthHrSummaryCardData) { - .health_data = health_data, - .pulsing_heart = - gdraw_command_sequence_create_with_resource(RESOURCE_ID_HEALTH_APP_PULSING_HEART), - .progress_bar = { - .num_segments = ARRAY_LENGTH(s_hr_summary_progress_segments), - .segments = s_hr_summary_progress_segments, - }, - .now_bpm = health_data_hr_get_current_bpm(health_data), - .resting_bpm = health_data_hr_get_resting_bpm(health_data), - .last_updated = health_data_hr_get_last_updated_timestamp(health_data), + *data = (HealthHrSummaryCardData){ + .health_data = health_data, + .pulsing_heart = + gdraw_command_sequence_create_with_resource(RESOURCE_ID_HEALTH_APP_PULSING_HEART), + .progress_bar = + { + .num_segments = ARRAY_LENGTH(s_hr_summary_progress_segments), + .segments = s_hr_summary_progress_segments, + }, + .now_bpm = health_data_hr_get_current_bpm(health_data), + .resting_bpm = health_data_hr_get_resting_bpm(health_data), + .last_updated = health_data_hr_get_last_updated_timestamp(health_data), #if DISP_ROWS > LEGACY_2X_DISP_ROWS - .bpm_font = fonts_get_system_font(FONT_KEY_LECO_32_BOLD_NUMBERS), - .units_font = fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM), + .bpm_font = fonts_get_system_font(FONT_KEY_LECO_32_BOLD_NUMBERS), + .units_font = fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM), #else - .bpm_font = fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM), - .units_font = fonts_get_system_font(FONT_KEY_LECO_20_BOLD_NUMBERS), + .bpm_font = fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM), + .units_font = fonts_get_system_font(FONT_KEY_LECO_20_BOLD_NUMBERS), #endif - .timestamp_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD), + .timestamp_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD), }; data->pulsing_heart_timer = app_timer_register(0, prv_pulsing_heart_timer_cb, base_layer); @@ -224,9 +224,9 @@ void health_hr_summary_card_select_click_handler(Layer *layer) { HealthHrSummaryCardData *data = layer_get_data(layer); HealthData *health_data = data->health_data; Window *window = health_hr_detail_card_create(health_data); - window_set_window_handlers(window, &(WindowHandlers) { - .unload = prv_hr_detail_card_unload_callback, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .unload = prv_hr_detail_card_unload_callback, + }); app_window_stack_push(window, true); } diff --git a/src/fw/apps/system/health/hr_summary_card.h b/src/fw/apps/system/health/hr_summary_card.h index df58d9d328..b2bb405674 100644 --- a/src/fw/apps/system/health/hr_summary_card.h +++ b/src/fw/apps/system/health/hr_summary_card.h @@ -7,7 +7,6 @@ #include "applib/ui/ui.h" - //////////////////////////////////////////////////////////////////////////////////////////////////// // API Functions // diff --git a/src/fw/apps/system/health/hr_summary_card_segments.h b/src/fw/apps/system/health/hr_summary_card_segments.h index 845774e37e..67120bb498 100644 --- a/src/fw/apps/system/health/hr_summary_card_segments.h +++ b/src/fw/apps/system/health/hr_summary_card_segments.h @@ -17,56 +17,81 @@ #define Y_SHIFT (((DISP_ROWS - LEGACY_2X_DISP_ROWS) / 2) + PBL_IF_ROUND_ELSE(6, 0)) static HealthProgressSegment s_hr_summary_progress_segments[] = { - { - // Bottom corner - .type = HealthProgressSegmentType_Corner, - .points = {{72 + X_SHIFT, 87 + Y_SHIFT}, {65 + X_SHIFT, 94 + Y_SHIFT}, - {72 + X_SHIFT, 101 + Y_SHIFT}, {79 + X_SHIFT, 94 + Y_SHIFT}}, - }, - { - // Left side bottom - .amount_of_total = AMOUNT_PER_SEGMENT, - .type = HealthProgressSegmentType_Vertical, - .points = {{66 + X_SHIFT, 95 + Y_SHIFT}, {73 + X_SHIFT, 88 + Y_SHIFT}, - {42 + X_SHIFT, 57 + Y_SHIFT}, {35 + X_SHIFT, 64 + Y_SHIFT}}, - }, - { - // Left corner - .type = HealthProgressSegmentType_Corner, - .points = {{43 + X_SHIFT, 58 + Y_SHIFT}, {36 + X_SHIFT, 51 + Y_SHIFT}, - {29 + X_SHIFT, 58 + Y_SHIFT}, {36 + X_SHIFT, 65 + Y_SHIFT}}, - }, - { - // Left side top - .amount_of_total = AMOUNT_PER_SEGMENT, - .type = HealthProgressSegmentType_Vertical, - .points = {{35 + X_SHIFT, 52 + Y_SHIFT}, {42 + X_SHIFT, 59 + Y_SHIFT}, - {73 + X_SHIFT, 28 + Y_SHIFT}, {66 + X_SHIFT, 21 + Y_SHIFT}}, - }, - { - // Top corner - .type = HealthProgressSegmentType_Corner, - .points = {{72 + X_SHIFT, 29 + Y_SHIFT}, {79 + X_SHIFT, 22 + Y_SHIFT}, - {72 + X_SHIFT, 15 + Y_SHIFT}, {65 + X_SHIFT, 22 + Y_SHIFT}}, - }, - { - // Right side top - .amount_of_total = AMOUNT_PER_SEGMENT, - .type = HealthProgressSegmentType_Vertical, - .points = {{78 + X_SHIFT, 21 + Y_SHIFT}, {71 + X_SHIFT, 28 + Y_SHIFT}, - {102 + X_SHIFT, 59 + Y_SHIFT}, {109 + X_SHIFT, 52 + Y_SHIFT}}, - }, - { - // Right corner - .type = HealthProgressSegmentType_Corner, - .points = {{101 + X_SHIFT, 58 + Y_SHIFT}, {108 + X_SHIFT, 65 + Y_SHIFT}, - {115 + X_SHIFT, 58 + Y_SHIFT}, {108 + X_SHIFT, 51 + Y_SHIFT}}, - }, - { - // Right side bottom - .amount_of_total = AMOUNT_PER_SEGMENT, - .type = HealthProgressSegmentType_Vertical, - .points = {{102 + X_SHIFT, 57 + Y_SHIFT}, {109 + X_SHIFT, 64 + Y_SHIFT}, - {78 + X_SHIFT, 95 + Y_SHIFT}, {71 + X_SHIFT, 88 + Y_SHIFT}}, - }, + { + // Bottom corner + .type = HealthProgressSegmentType_Corner, + .points = + {{72 + X_SHIFT, 87 + Y_SHIFT}, + {65 + X_SHIFT, 94 + Y_SHIFT}, + {72 + X_SHIFT, 101 + Y_SHIFT}, + {79 + X_SHIFT, 94 + Y_SHIFT}}, + }, + { + // Left side bottom + .amount_of_total = AMOUNT_PER_SEGMENT, + .type = HealthProgressSegmentType_Vertical, + .points = + {{66 + X_SHIFT, 95 + Y_SHIFT}, + {73 + X_SHIFT, 88 + Y_SHIFT}, + {42 + X_SHIFT, 57 + Y_SHIFT}, + {35 + X_SHIFT, 64 + Y_SHIFT}}, + }, + { + // Left corner + .type = HealthProgressSegmentType_Corner, + .points = + {{43 + X_SHIFT, 58 + Y_SHIFT}, + {36 + X_SHIFT, 51 + Y_SHIFT}, + {29 + X_SHIFT, 58 + Y_SHIFT}, + {36 + X_SHIFT, 65 + Y_SHIFT}}, + }, + { + // Left side top + .amount_of_total = AMOUNT_PER_SEGMENT, + .type = HealthProgressSegmentType_Vertical, + .points = + {{35 + X_SHIFT, 52 + Y_SHIFT}, + {42 + X_SHIFT, 59 + Y_SHIFT}, + {73 + X_SHIFT, 28 + Y_SHIFT}, + {66 + X_SHIFT, 21 + Y_SHIFT}}, + }, + { + // Top corner + .type = HealthProgressSegmentType_Corner, + .points = + {{72 + X_SHIFT, 29 + Y_SHIFT}, + {79 + X_SHIFT, 22 + Y_SHIFT}, + {72 + X_SHIFT, 15 + Y_SHIFT}, + {65 + X_SHIFT, 22 + Y_SHIFT}}, + }, + { + // Right side top + .amount_of_total = AMOUNT_PER_SEGMENT, + .type = HealthProgressSegmentType_Vertical, + .points = + {{78 + X_SHIFT, 21 + Y_SHIFT}, + {71 + X_SHIFT, 28 + Y_SHIFT}, + {102 + X_SHIFT, 59 + Y_SHIFT}, + {109 + X_SHIFT, 52 + Y_SHIFT}}, + }, + { + // Right corner + .type = HealthProgressSegmentType_Corner, + .points = + {{101 + X_SHIFT, 58 + Y_SHIFT}, + {108 + X_SHIFT, 65 + Y_SHIFT}, + {115 + X_SHIFT, 58 + Y_SHIFT}, + {108 + X_SHIFT, 51 + Y_SHIFT}}, + }, + { + // Right side bottom + .amount_of_total = AMOUNT_PER_SEGMENT, + .type = HealthProgressSegmentType_Vertical, + .points = { + {102 + X_SHIFT, 57 + Y_SHIFT}, + {109 + X_SHIFT, 64 + Y_SHIFT}, + {78 + X_SHIFT, 95 + Y_SHIFT}, + {71 + X_SHIFT, 88 + Y_SHIFT} + }, + }, }; diff --git a/src/fw/apps/system/health/progress.c b/src/fw/apps/system/health/progress.c index 7a1f936d0b..9455508e63 100644 --- a/src/fw/apps/system/health/progress.c +++ b/src/fw/apps/system/health/progress.c @@ -9,8 +9,7 @@ // Scales a total shape offset to an individual segment offset. // @param total_offset should not be larger than the segment's percent of total -static int prv_total_offset_to_segment_offset(HealthProgressSegment *segment, - int total_offset) { +static int prv_total_offset_to_segment_offset(HealthProgressSegment *segment, int total_offset) { return total_offset * HEALTH_PROGRESS_BAR_MAX_VALUE / segment->amount_of_total; } diff --git a/src/fw/apps/system/health/progress.h b/src/fw/apps/system/health/progress.h index 4070b68909..7e49c553f9 100644 --- a/src/fw/apps/system/health/progress.h +++ b/src/fw/apps/system/health/progress.h @@ -30,7 +30,6 @@ typedef struct HealthProgressBar { HealthProgressSegment *segments; } HealthProgressBar; - void health_progress_bar_fill(GContext *ctx, HealthProgressBar *progress_bar, GColor color, HealthProgressBarValue start, HealthProgressBarValue end); diff --git a/src/fw/apps/system/health/sleep_detail_card.c b/src/fw/apps/system/health/sleep_detail_card.c index dcd42f61c3..c49198b0de 100644 --- a/src/fw/apps/system/health/sleep_detail_card.c +++ b/src/fw/apps/system/health/sleep_detail_card.c @@ -43,13 +43,11 @@ static void prv_set_sleep_session(char *buffer, size_t buffer_size, int32_t slee int pos = 0; - pos += clock_format_time(buffer + pos, buffer_size - pos, - start_hours, start_minutes, false); + pos += clock_format_time(buffer + pos, buffer_size - pos, start_hours, start_minutes, false); pos += snprintf(buffer + pos, buffer_size - pos, " %s ", "-"); - pos += clock_format_time(buffer + pos, buffer_size - pos, - end_hours, end_minutes, false); + pos += clock_format_time(buffer + pos, buffer_size - pos, end_hours, end_minutes, false); } static void prv_set_deep_sleep(char *buffer, size_t buffer_size, int32_t sleep_duration, @@ -72,8 +70,8 @@ static void prv_set_avg(char *buffer, size_t buffer_size, int32_t daily_avg, voi if (daily_avg <= 0) { strncpy(buffer + avg_len, EN_DASH, buffer_size - avg_len); } else { - health_util_format_hours_and_minutes(buffer + avg_len, buffer_size - avg_len, - daily_avg, i18n_owner); + health_util_format_hours_and_minutes(buffer + avg_len, buffer_size - avg_len, daily_avg, + i18n_owner); } } @@ -85,25 +83,20 @@ Window *health_sleep_detail_card_create(HealthData *health_data) { const GColor fill_color = PBL_IF_COLOR_ELSE(GColorVividCerulean, GColorDarkGray); const GColor today_fill_color = PBL_IF_COLOR_ELSE(GColorElectricBlue, GColorDarkGray); - health_detail_card_set_render_day_zones(card_data->zones, - &card_data->num_zones, - &card_data->weekly_max, - true /* format hours and minutes */, - false /* show crown */, - fill_color, - today_fill_color, - health_data_sleep_get(health_data), - card_data); + health_detail_card_set_render_day_zones( + card_data->zones, &card_data->num_zones, &card_data->weekly_max, + true /* format hours and minutes */, false /* show crown */, fill_color, today_fill_color, + health_data_sleep_get(health_data), card_data); const size_t buffer_len = 32; HealthDetailHeading *heading = &card_data->headings[card_data->num_headings++]; - *heading = (HealthDetailHeading) { - .primary_label = (char *)i18n_get("SLEEP SESSION", card_data), - .primary_value = app_zalloc_check(buffer_len), - .fill_color = GColorWhite, - .outline_color = PBL_IF_COLOR_ELSE(GColorClear, GColorBlack), + *heading = (HealthDetailHeading){ + .primary_label = (char *)i18n_get("SLEEP SESSION", card_data), + .primary_value = app_zalloc_check(buffer_len), + .fill_color = GColorWhite, + .outline_color = PBL_IF_COLOR_ELSE(GColorClear, GColorBlack), }; prv_set_sleep_session(heading->primary_value, buffer_len, @@ -112,12 +105,12 @@ Window *health_sleep_detail_card_create(HealthData *health_data) { heading = &card_data->headings[card_data->num_headings++]; - *heading = (HealthDetailHeading) { - .primary_label = (char *)i18n_get("DEEP SLEEP", card_data), - .primary_value = app_zalloc_check(buffer_len), - .fill_color = PBL_IF_COLOR_ELSE(GColorCobaltBlue, GColorWhite), + *heading = (HealthDetailHeading){ + .primary_label = (char *)i18n_get("DEEP SLEEP", card_data), + .primary_value = app_zalloc_check(buffer_len), + .fill_color = PBL_IF_COLOR_ELSE(GColorCobaltBlue, GColorWhite), #if PBL_BW - .outline_color = GColorBlack, + .outline_color = GColorBlack, #endif }; @@ -126,24 +119,24 @@ Window *health_sleep_detail_card_create(HealthData *health_data) { HealthDetailSubtitle *subtitle = &card_data->subtitles[card_data->num_subtitles++]; - *subtitle = (HealthDetailSubtitle) { - .label = app_zalloc_check(buffer_len), - .fill_color = PBL_IF_COLOR_ELSE(GColorYellow, GColorBlack), + *subtitle = (HealthDetailSubtitle){ + .label = app_zalloc_check(buffer_len), + .fill_color = PBL_IF_COLOR_ELSE(GColorYellow, GColorBlack), }; prv_set_avg(subtitle->label, buffer_len, card_data->daily_avg, card_data); const HealthDetailCardConfig config = { - .num_headings = card_data->num_headings, - .headings = card_data->headings, - .num_subtitles = card_data->num_subtitles, - .subtitles = card_data->subtitles, - .daily_avg = card_data->daily_avg, - .weekly_max = card_data->weekly_max, - .bg_color = PBL_IF_COLOR_ELSE(GColorOxfordBlue, GColorWhite), - .num_zones = card_data->num_zones, - .zones = card_data->zones, - .data = card_data, + .num_headings = card_data->num_headings, + .headings = card_data->headings, + .num_subtitles = card_data->num_subtitles, + .subtitles = card_data->subtitles, + .daily_avg = card_data->daily_avg, + .weekly_max = card_data->weekly_max, + .bg_color = PBL_IF_COLOR_ELSE(GColorOxfordBlue, GColorWhite), + .num_zones = card_data->num_zones, + .zones = card_data->zones, + .data = card_data, }; return (Window *)health_detail_card_create(&config); diff --git a/src/fw/apps/system/health/sleep_summary_card.c b/src/fw/apps/system/health/sleep_summary_card.c index aac6e905da..3aa2e160ff 100644 --- a/src/fw/apps/system/health/sleep_summary_card.c +++ b/src/fw/apps/system/health/sleep_summary_card.c @@ -43,7 +43,6 @@ typedef struct HealthSleepSummaryCardData { #define TWELVE_HOURS (SECONDS_PER_HOUR * 12) - static void prv_render_sleep_sessions(GContext *ctx, HealthSleepSummaryCardData *data) { const int num_sessions = health_data_sleep_get_num_sessions(data->health_data); ActivitySession *sessions = health_data_sleep_get_sessions(data->health_data); @@ -64,9 +63,8 @@ static void prv_render_sleep_sessions(GContext *ctx, HealthSleepSummaryCardData struct tm local_tm; localtime_r(&session->start_utc, &local_tm); - const int session_start_24h = (local_tm.tm_sec + - local_tm.tm_min * SECONDS_PER_MINUTE + - local_tm.tm_hour * SECONDS_PER_HOUR); + const int session_start_24h = (local_tm.tm_sec + local_tm.tm_min * SECONDS_PER_MINUTE + + local_tm.tm_hour * SECONDS_PER_HOUR); const int session_end_24h = session_start_24h + (session->length_min * SECONDS_PER_MINUTE); const int session_start_12h = session_start_24h % TWELVE_HOURS; @@ -102,22 +100,21 @@ static void prv_render_typical_markers(GContext *ctx, HealthSleepSummaryCardData const int typical_start = (typical_sleep_start_12h * HEALTH_PROGRESS_BAR_MAX_VALUE / TWELVE_HOURS); - const int typical_end = - (typical_sleep_end_12h * HEALTH_PROGRESS_BAR_MAX_VALUE / TWELVE_HOURS); + const int typical_end = (typical_sleep_end_12h * HEALTH_PROGRESS_BAR_MAX_VALUE / TWELVE_HOURS); #if PBL_COLOR const bool fell_asleep_late = (typical_sleep_start_24h < sleep_start_24h); if (fell_asleep_late) { - health_progress_bar_fill(ctx, &data->progress_bar, PROGRESS_TYPICAL_COLOR, - typical_start, sleep_start); + health_progress_bar_fill(ctx, &data->progress_bar, PROGRESS_TYPICAL_COLOR, typical_start, + sleep_start); } else { health_progress_bar_mark(ctx, &data->progress_bar, PROGRESS_TYPICAL_COLOR, typical_start); } const bool woke_up_early = (typical_sleep_end_24h > sleep_end_24h); if (woke_up_early) { - health_progress_bar_fill(ctx, &data->progress_bar, PROGRESS_TYPICAL_COLOR, - sleep_end, typical_end); + health_progress_bar_fill(ctx, &data->progress_bar, PROGRESS_TYPICAL_COLOR, sleep_end, + typical_end); } else { health_progress_bar_mark(ctx, &data->progress_bar, PROGRESS_TYPICAL_COLOR, typical_end); } @@ -132,8 +129,8 @@ static void prv_render_progress_bar(GContext *ctx, Layer *base_layer) { HealthSleepSummaryCardData *data = layer_get_data(base_layer); // Renders the background - health_progress_bar_fill(ctx, &data->progress_bar, PROGRESS_BACKGROUND_COLOR, - 0, HEALTH_PROGRESS_BAR_MAX_VALUE); + health_progress_bar_fill(ctx, &data->progress_bar, PROGRESS_BACKGROUND_COLOR, 0, + HEALTH_PROGRESS_BAR_MAX_VALUE); prv_render_sleep_sessions(ctx, data); @@ -163,8 +160,8 @@ static void prv_render_current_sleep_text(GContext *ctx, Layer *base_layer) { // Mirror the pill's downshift at half the offset so the step count and // pill stay visually balanced. Zero on legacy-sized displays where // HEALTH_Y_OFFSET itself is 0. - const int y = PBL_IF_RECT_ELSE(PBL_IF_BW_ELSE(85, 83), 88) + HEALTH_Y_OFFSET - + HEALTH_Y_OFFSET / 6; + const int y = + PBL_IF_RECT_ELSE(PBL_IF_BW_ELSE(85, 83), 88) + HEALTH_Y_OFFSET + HEALTH_Y_OFFSET / 6; const GRect rect = GRect(0, y, base_layer->bounds.size.w, 40); const int current_sleep = health_data_current_sleep_get(data->health_data); @@ -174,8 +171,7 @@ static void prv_render_current_sleep_text(GContext *ctx, Layer *base_layer) { GTextNodeContainer *container = &horiz_container->container; horiz_container->horizontal_alignment = GTextAlignmentCenter; health_util_duration_to_hours_and_minutes_text_node(current_sleep, base_layer, - data->number_font, - data->unit_font, + data->number_font, data->unit_font, CURRENT_TEXT_COLOR, container); graphics_text_node_draw(&container->node, ctx, &rect, NULL, NULL); graphics_text_node_destroy(&container->node); @@ -213,8 +209,8 @@ static void prv_render_no_sleep_data_text(GContext *ctx, Layer *base_layer) { const char *text = i18n_get("No sleep data,\nwear your watch\nto sleep", base_layer); graphics_context_set_text_color(ctx, NO_DATA_TEXT_COLOR); - graphics_draw_text(ctx, text, data->typical_font, - rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, text, data->typical_font, rect, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); } static bool prv_has_sleep_data(HealthData *health_data) { @@ -254,22 +250,23 @@ Layer *health_sleep_summary_card_create(HealthData *health_data) { HealthSleepSummaryCardData *health_sleep_summary_card_data = layer_get_data(base_layer); layer_set_update_proc(base_layer, prv_base_layer_update_proc); // set health data - *health_sleep_summary_card_data = (HealthSleepSummaryCardData) { - .icon = kino_reel_create_with_resource(RESOURCE_ID_HEALTH_APP_SLEEP), - .progress_bar = { - .num_segments = ARRAY_LENGTH(s_sleep_summary_progress_segments), - .segments = s_sleep_summary_progress_segments, - }, - .health_data = health_data, + *health_sleep_summary_card_data = (HealthSleepSummaryCardData){ + .icon = kino_reel_create_with_resource(RESOURCE_ID_HEALTH_APP_SLEEP), + .progress_bar = + { + .num_segments = ARRAY_LENGTH(s_sleep_summary_progress_segments), + .segments = s_sleep_summary_progress_segments, + }, + .health_data = health_data, #if DISP_ROWS > LEGACY_2X_DISP_ROWS - .number_font = fonts_get_system_font(FONT_KEY_LECO_32_BOLD_NUMBERS), - .unit_font = fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM), + .number_font = fonts_get_system_font(FONT_KEY_LECO_32_BOLD_NUMBERS), + .unit_font = fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM), #else - .number_font = fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM), - .unit_font = fonts_get_system_font(FONT_KEY_LECO_20_BOLD_NUMBERS), + .number_font = fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM), + .unit_font = fonts_get_system_font(FONT_KEY_LECO_20_BOLD_NUMBERS), #endif - .typical_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD), - .em_dash_font = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD), + .typical_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD), + .em_dash_font = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD), }; return base_layer; } @@ -279,9 +276,9 @@ void health_sleep_summary_card_select_click_handler(Layer *layer) { HealthData *health_data = health_sleep_summary_card_data->health_data; if (prv_has_sleep_data(health_data)) { Window *window = health_sleep_detail_card_create(health_data); - window_set_window_handlers(window, &(WindowHandlers) { - .unload = prv_sleep_detail_card_unload_callback, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .unload = prv_sleep_detail_card_unload_callback, + }); app_window_stack_push(window, true); } } diff --git a/src/fw/apps/system/health/sleep_summary_card_segments.h b/src/fw/apps/system/health/sleep_summary_card_segments.h index 149d2b04f1..82a2cc2cc2 100644 --- a/src/fw/apps/system/health/sleep_summary_card_segments.h +++ b/src/fw/apps/system/health/sleep_summary_card_segments.h @@ -16,8 +16,10 @@ // Dynamically center based on display size vs legacy 144x168 base // Round displays need additional adjustment for the bezel -#define X_SHIFT (((DISP_COLS - LEGACY_2X_DISP_COLS) / 2) + PBL_IF_ROUND_ELSE(23, PBL_IF_BW_ELSE(1, 0))) -#define Y_SHIFT (((DISP_ROWS - LEGACY_2X_DISP_ROWS) / 2) + PBL_IF_ROUND_ELSE(8, PBL_IF_BW_ELSE(3, 0))) +#define X_SHIFT \ + (((DISP_COLS - LEGACY_2X_DISP_COLS) / 2) + PBL_IF_ROUND_ELSE(23, PBL_IF_BW_ELSE(1, 0))) +#define Y_SHIFT \ + (((DISP_ROWS - LEGACY_2X_DISP_ROWS) / 2) + PBL_IF_ROUND_ELSE(8, PBL_IF_BW_ELSE(3, 0))) // Used to shrink the thickness of the bars #define X_SHRINK (PBL_IF_BW_ELSE(2, 0)) @@ -26,90 +28,99 @@ #define X_ADJ (PBL_IF_ROUND_ELSE(-12, PBL_IF_BW_ELSE(-3, 0))) #define Y_ADJ (PBL_IF_ROUND_ELSE(-3, PBL_IF_BW_ELSE(1, 0))) - static HealthProgressSegment s_sleep_summary_progress_segments[] = { - { - // Top right - .type = HealthProgressSegmentType_Horizontal, - .amount_of_total = AMOUNT_PER_SEGMENT / 2, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{71 + X_SHIFT, 22 + Y_SHIFT}, - {116 + X_SHRINK + X_SHIFT + X_ADJ, 22 + Y_SHIFT}, - {116 + X_SHRINK + X_SHIFT + X_ADJ, 13 + Y_SHIFT}, - {71 + X_SHIFT, 13 + Y_SHIFT}}, - }, - { - // Top right corner - .type = HealthProgressSegmentType_Corner, - .points = {{115 + X_SHRINK + X_SHIFT + X_ADJ, 22 + Y_SHIFT}, - {115 + X_SHRINK + X_SHIFT + X_ADJ, 13 + Y_SHIFT}, - {127 + X_SHIFT + X_ADJ, 13 + Y_SHIFT}, - {127 + X_SHIFT + X_ADJ, 22 + Y_SHIFT}}, - }, - { - // Right - .type = HealthProgressSegmentType_Vertical, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH + 10, - .points = {{116 + X_SHRINK + X_SHIFT + X_ADJ, 23 + Y_SHIFT}, - {127 + X_SHIFT + X_ADJ, 23 + Y_SHIFT}, - {127 + X_SHIFT + X_ADJ, 73 + Y_SHIFT + Y_ADJ}, - {116 + X_SHRINK + X_SHIFT + X_ADJ, 73 + Y_SHIFT + Y_ADJ}}, - }, - { - // Bottom right corner - .type = HealthProgressSegmentType_Corner, - .points = {{115 + X_SHRINK + X_SHIFT + X_ADJ, 74 + Y_SHIFT + Y_ADJ}, - {127 + X_SHIFT + X_ADJ, 74 + Y_SHIFT + Y_ADJ}, - {127 + X_SHIFT + X_ADJ, 83 + Y_SHIFT + Y_ADJ}, - {115 + X_SHRINK + X_SHIFT + X_ADJ, 83 + Y_SHIFT + Y_ADJ}}, - }, - { - // Bottom - .type = HealthProgressSegmentType_Horizontal, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{116 + X_SHRINK + X_SHIFT + X_ADJ, 74 + Y_SHIFT + Y_ADJ}, - {27 + X_SHRINK + X_SHIFT + X_ADJ, 74 + Y_SHIFT + Y_ADJ}, - {27 + X_SHRINK + X_SHIFT + X_ADJ, 83 + Y_SHIFT + Y_ADJ}, - {116 + X_SHRINK + X_SHIFT + X_ADJ, 83 + Y_SHIFT + Y_ADJ}}, - }, - { - // Bottom left corner - .type = HealthProgressSegmentType_Corner, - .points = {{29 + -X_SHRINK + X_SHIFT, 74 + Y_SHIFT + Y_ADJ}, - {17 + X_SHIFT, 74 + Y_SHIFT + Y_ADJ}, - {17 + X_SHIFT, 83 + Y_SHIFT + Y_ADJ}, - {29 + -X_SHRINK + X_SHIFT, 83 + Y_SHIFT + Y_ADJ}}, - }, - { - // Left - .type = HealthProgressSegmentType_Vertical, - .amount_of_total = AMOUNT_PER_SEGMENT, - .mark_width = DEFAULT_MARK_WIDTH, - .points = {{28 + -X_SHRINK + X_SHIFT, 74 + Y_SHIFT + Y_ADJ}, - {17 + X_SHIFT, 74 + Y_SHIFT + Y_ADJ}, - {17 + X_SHIFT, 23 + Y_SHIFT}, - {28 + -X_SHRINK + X_SHIFT, 23 + Y_SHIFT}}, - }, - { - // Top left corner - .type = HealthProgressSegmentType_Corner, - .points = {{29 + X_SHIFT, 22 + Y_SHIFT}, - {17 + X_SHIFT, 22 + Y_SHIFT}, - {17 + X_SHIFT, 13 + Y_SHIFT}, - {29 + X_SHIFT, 13 + Y_SHIFT}}, - }, - { - // Top left - .type = HealthProgressSegmentType_Horizontal, - .amount_of_total = AMOUNT_PER_SEGMENT / 2, - .mark_width = DEFAULT_MARK_WIDTH + 10, - .points = {{28 + -X_SHRINK + X_SHIFT, 22 + Y_SHIFT}, - {72 + X_SHIFT, 22 + Y_SHIFT}, - {72 + X_SHIFT, 13 + Y_SHIFT}, - {28 + -X_SHRINK + X_SHIFT, 13 + Y_SHIFT}}, - }, + { + // Top right + .type = HealthProgressSegmentType_Horizontal, + .amount_of_total = AMOUNT_PER_SEGMENT / 2, + .mark_width = DEFAULT_MARK_WIDTH, + .points = + {{71 + X_SHIFT, 22 + Y_SHIFT}, + {116 + X_SHRINK + X_SHIFT + X_ADJ, 22 + Y_SHIFT}, + {116 + X_SHRINK + X_SHIFT + X_ADJ, 13 + Y_SHIFT}, + {71 + X_SHIFT, 13 + Y_SHIFT}}, + }, + { + // Top right corner + .type = HealthProgressSegmentType_Corner, + .points = + {{115 + X_SHRINK + X_SHIFT + X_ADJ, 22 + Y_SHIFT}, + {115 + X_SHRINK + X_SHIFT + X_ADJ, 13 + Y_SHIFT}, + {127 + X_SHIFT + X_ADJ, 13 + Y_SHIFT}, + {127 + X_SHIFT + X_ADJ, 22 + Y_SHIFT}}, + }, + { + // Right + .type = HealthProgressSegmentType_Vertical, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH + 10, + .points = + {{116 + X_SHRINK + X_SHIFT + X_ADJ, 23 + Y_SHIFT}, + {127 + X_SHIFT + X_ADJ, 23 + Y_SHIFT}, + {127 + X_SHIFT + X_ADJ, 73 + Y_SHIFT + Y_ADJ}, + {116 + X_SHRINK + X_SHIFT + X_ADJ, 73 + Y_SHIFT + Y_ADJ}}, + }, + { + // Bottom right corner + .type = HealthProgressSegmentType_Corner, + .points = + {{115 + X_SHRINK + X_SHIFT + X_ADJ, 74 + Y_SHIFT + Y_ADJ}, + {127 + X_SHIFT + X_ADJ, 74 + Y_SHIFT + Y_ADJ}, + {127 + X_SHIFT + X_ADJ, 83 + Y_SHIFT + Y_ADJ}, + {115 + X_SHRINK + X_SHIFT + X_ADJ, 83 + Y_SHIFT + Y_ADJ}}, + }, + { + // Bottom + .type = HealthProgressSegmentType_Horizontal, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH, + .points = + {{116 + X_SHRINK + X_SHIFT + X_ADJ, 74 + Y_SHIFT + Y_ADJ}, + {27 + X_SHRINK + X_SHIFT + X_ADJ, 74 + Y_SHIFT + Y_ADJ}, + {27 + X_SHRINK + X_SHIFT + X_ADJ, 83 + Y_SHIFT + Y_ADJ}, + {116 + X_SHRINK + X_SHIFT + X_ADJ, 83 + Y_SHIFT + Y_ADJ}}, + }, + { + // Bottom left corner + .type = HealthProgressSegmentType_Corner, + .points = + {{29 + -X_SHRINK + X_SHIFT, 74 + Y_SHIFT + Y_ADJ}, + {17 + X_SHIFT, 74 + Y_SHIFT + Y_ADJ}, + {17 + X_SHIFT, 83 + Y_SHIFT + Y_ADJ}, + {29 + -X_SHRINK + X_SHIFT, 83 + Y_SHIFT + Y_ADJ}}, + }, + { + // Left + .type = HealthProgressSegmentType_Vertical, + .amount_of_total = AMOUNT_PER_SEGMENT, + .mark_width = DEFAULT_MARK_WIDTH, + .points = + {{28 + -X_SHRINK + X_SHIFT, 74 + Y_SHIFT + Y_ADJ}, + {17 + X_SHIFT, 74 + Y_SHIFT + Y_ADJ}, + {17 + X_SHIFT, 23 + Y_SHIFT}, + {28 + -X_SHRINK + X_SHIFT, 23 + Y_SHIFT}}, + }, + { + // Top left corner + .type = HealthProgressSegmentType_Corner, + .points = + {{29 + X_SHIFT, 22 + Y_SHIFT}, + {17 + X_SHIFT, 22 + Y_SHIFT}, + {17 + X_SHIFT, 13 + Y_SHIFT}, + {29 + X_SHIFT, 13 + Y_SHIFT}}, + }, + { + // Top left + .type = HealthProgressSegmentType_Horizontal, + .amount_of_total = AMOUNT_PER_SEGMENT / 2, + .mark_width = DEFAULT_MARK_WIDTH + 10, + .points = { + {28 + -X_SHRINK + X_SHIFT, 22 + Y_SHIFT}, + {72 + X_SHIFT, 22 + Y_SHIFT}, + {72 + X_SHIFT, 13 + Y_SHIFT}, + {28 + -X_SHRINK + X_SHIFT, 13 + Y_SHIFT} + }, + }, }; #define MASKING_RECT_X_SHIFT (X_SHIFT + PBL_IF_BW_ELSE(1, 0)) @@ -118,8 +129,8 @@ static HealthProgressSegment s_sleep_summary_progress_segments[] = { #define MASKING_RECT_Y_ADJ (Y_ADJ + PBL_IF_BW_ELSE(-1, 0)) static const GRect s_sleep_summary_masking_rect = { - .origin.x = 16 + MASKING_RECT_X_SHIFT, - .origin.y = 11 + MASKING_RECT_Y_SHIFT, - .size.w = 113 + MASKING_RECT_X_ADJ, - .size.h = 75 + MASKING_RECT_Y_ADJ, + .origin.x = 16 + MASKING_RECT_X_SHIFT, + .origin.y = 11 + MASKING_RECT_Y_SHIFT, + .size.w = 113 + MASKING_RECT_X_ADJ, + .size.h = 75 + MASKING_RECT_Y_ADJ, }; diff --git a/src/fw/apps/system/health/ui.c b/src/fw/apps/system/health/ui.c index e663381969..ea2b10808b 100644 --- a/src/fw/apps/system/health/ui.c +++ b/src/fw/apps/system/health/ui.c @@ -22,12 +22,12 @@ void health_ui_draw_text_in_box(GContext *ctx, const char *text, const GRect dra const GTextOverflowMode overflow_mode = GTextOverflowModeFill; const GTextAlignment alignment = GTextAlignmentCenter; - const GRect text_box = GRect(drawing_bounds.origin.x, y_offset, - drawing_bounds.size.w, text_height); + const GRect text_box = + GRect(drawing_bounds.origin.x, y_offset, drawing_bounds.size.w, text_height); GRect text_fill_box = text_box; - text_fill_box.size = app_graphics_text_layout_get_content_size( - text, small_font, text_box, overflow_mode, alignment); + text_fill_box.size = app_graphics_text_layout_get_content_size(text, small_font, text_box, + overflow_mode, alignment); text_fill_box.origin.x += ((drawing_bounds.size.w - text_fill_box.size.w) / 2); // add a 3 px border (get content size already adds 1 px) @@ -69,8 +69,8 @@ static GRect prv_render_typical_pill(GContext *ctx, Layer *layer, int pill_heigh // flint), a few px on taller displays (obelix, getafix). Applies to both // activity and sleep cards on those taller displays; the extra breathing // room reads better on both. - const int y = PBL_IF_RECT_ELSE(PBL_IF_BW_ELSE(122, 120), 125) + HEALTH_Y_OFFSET - + HEALTH_Y_OFFSET / 3; + const int y = + PBL_IF_RECT_ELSE(PBL_IF_BW_ELSE(122, 120), 125) + HEALTH_Y_OFFSET + HEALTH_Y_OFFSET / 3; GRect rect = GRect(0, y, layer->bounds.size.w, pill_height); #if PBL_RECT rect = grect_inset(rect, GEdgeInsets(0, HEALTH_INSET)); @@ -92,8 +92,8 @@ static GRect prv_render_typical_pill(GContext *ctx, Layer *layer, int pill_heigh // Row 1: TYPICAL , full width. GRect header_rect = rect; header_rect.size.h = 16; - graphics_draw_text(ctx, typical_text, font, header_rect, - GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, typical_text, font, header_rect, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); return rect; } @@ -107,13 +107,13 @@ void health_ui_render_typical_text_box(GContext *ctx, Layer *layer, const char * GRect value_rect = rect; value_rect.size.h = 16; value_rect.origin.y += 16; - graphics_draw_text(ctx, value_text, font, value_rect, - GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, value_text, font, value_rect, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); } -void health_ui_render_split_typical_text_box(GContext *ctx, Layer *layer, - const char *left_value, const char *left_label, - const char *right_value, const char *right_label) { +void health_ui_render_split_typical_text_box(GContext *ctx, Layer *layer, const char *left_value, + const char *left_label, const char *right_value, + const char *right_label) { GRect rect = prv_render_typical_pill(ctx, layer, 53); const GFont font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); @@ -125,14 +125,13 @@ void health_ui_render_split_typical_text_box(GContext *ctx, Layer *layer, const int16_t col_w = (rect.size.w - 2 * col_band_inset) / 2; // Row 2: values, numbers on top. - GRect val_left = GRect(rect.origin.x + col_band_inset, rect.origin.y + 18, - col_w, 16); + GRect val_left = GRect(rect.origin.x + col_band_inset, rect.origin.y + 18, col_w, 16); GRect val_right = val_left; val_right.origin.x += val_left.size.w; - graphics_draw_text(ctx, left_value, font, val_left, - GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); - graphics_draw_text(ctx, right_value, font, val_right, - GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, left_value, font, val_left, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, right_value, font, val_right, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); // Row 3: labels below the numbers, in black. const GColor label_color = GColorArmyGreen; @@ -142,10 +141,10 @@ void health_ui_render_split_typical_text_box(GContext *ctx, Layer *layer, GRect sub_right = sub_left; sub_right.origin.x += sub_left.size.w; graphics_context_set_text_color(ctx, label_color); - graphics_draw_text(ctx, left_label, small_font, sub_left, - GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); - graphics_draw_text(ctx, right_label, small_font, sub_right, - GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, left_label, small_font, sub_left, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, right_label, small_font, sub_right, GTextOverflowModeWordWrap, + GTextAlignmentCenter, NULL); // Vertical divider between the two columns, 1px wide black. graphics_context_set_stroke_color(ctx, label_color); diff --git a/src/fw/apps/system/health/ui.h b/src/fw/apps/system/health/ui.h index 3bfd7ea1a9..d98c5eda99 100644 --- a/src/fw/apps/system/health/ui.h +++ b/src/fw/apps/system/health/ui.h @@ -16,8 +16,7 @@ void health_ui_draw_text_in_box(GContext *ctx, const char *text, const GRect dra //! @param layer Layer to render into. //! @param value_text Pre-formatted value text for the lower line (e.g. the //! daily-total step count, or the typical sleep duration). -void health_ui_render_typical_text_box(GContext *ctx, Layer *layer, - const char *value_text); +void health_ui_render_typical_text_box(GContext *ctx, Layer *layer, const char *value_text); //! Render the "TYPICAL " pill as a two-column split: each column shows a //! value on top and a label beneath, separated by a vertical divider. Used on @@ -30,6 +29,6 @@ void health_ui_render_typical_text_box(GContext *ctx, Layer *layer, //! @param left_label Label for the left column (bottom). //! @param right_value Pre-formatted value for the right column (top). //! @param right_label Label for the right column (bottom). -void health_ui_render_split_typical_text_box(GContext *ctx, Layer *layer, - const char *left_value, const char *left_label, - const char *right_value, const char *right_label); +void health_ui_render_split_typical_text_box(GContext *ctx, Layer *layer, const char *left_value, + const char *left_label, const char *right_value, + const char *right_label); diff --git a/src/fw/apps/system/launcher/default/app_glance.c b/src/fw/apps/system/launcher/default/app_glance.c index f535e3e11d..b49c212299 100644 --- a/src/fw/apps/system/launcher/default/app_glance.c +++ b/src/fw/apps/system/launcher/default/app_glance.c @@ -15,10 +15,10 @@ void launcher_app_glance_init(LauncherAppGlance *glance, const Uuid *uuid, KinoR return; } - *glance = (LauncherAppGlance) { - .uuid = *uuid, - .reel = impl, - .should_consider_slices = should_consider_slices, + *glance = (LauncherAppGlance){ + .uuid = *uuid, + .reel = impl, + .should_consider_slices = should_consider_slices, }; if (handlers) { diff --git a/src/fw/apps/system/launcher/default/app_glance_alarms.c b/src/fw/apps/system/launcher/default/app_glance_alarms.c index 230f577397..6e4a3f57f5 100644 --- a/src/fw/apps/system/launcher/default/app_glance_alarms.c +++ b/src/fw/apps/system/launcher/default/app_glance_alarms.c @@ -41,8 +41,8 @@ static const char *prv_get_title(LauncherAppGlanceStructured *structured_glance) static void prv_alarms_glance_subtitle_dynamic_text_node_update( PBL_UNUSED GContext *ctx, PBL_UNUSED GTextNode *node, PBL_UNUSED const GRect *box, - PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, size_t buffer_size, - void *user_data) { + PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, + size_t buffer_size, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; LauncherAppGlanceAlarms *alarms_glance = launcher_app_glance_structured_get_data(structured_glance); @@ -143,10 +143,10 @@ static void prv_alarm_clock_event_handler(PBL_UNUSED PebbleEvent *event, void *c } static const LauncherAppGlanceStructuredImpl s_alarms_structured_glance_impl = { - .get_icon = prv_get_icon, - .get_title = prv_get_title, - .create_subtitle_node = prv_create_subtitle_node, - .destructor = prv_destructor, + .get_icon = prv_get_icon, + .get_title = prv_get_title, + .create_subtitle_node = prv_create_subtitle_node, + .destructor = prv_destructor, }; LauncherAppGlance *launcher_app_glance_alarms_create(const AppMenuNode *node) { @@ -163,19 +163,18 @@ LauncherAppGlance *launcher_app_glance_alarms_create(const AppMenuNode *node) { alarms_glance->default_icon_resource_id = node->icon_resource_id; const bool should_consider_slices = false; - LauncherAppGlanceStructured *structured_glance = - launcher_app_glance_structured_create(&node->uuid, &s_alarms_structured_glance_impl, - should_consider_slices, alarms_glance); + LauncherAppGlanceStructured *structured_glance = launcher_app_glance_structured_create( + &node->uuid, &s_alarms_structured_glance_impl, should_consider_slices, alarms_glance); PBL_ASSERTN(structured_glance); // Get the first state of the glance prv_update_glance_for_next_alarm(alarms_glance); // Subscribe to alarm clock events for updating the glance - alarms_glance->alarm_clock_event_info = (EventServiceInfo) { - .type = PEBBLE_ALARM_CLOCK_EVENT, - .handler = prv_alarm_clock_event_handler, - .context = structured_glance, + alarms_glance->alarm_clock_event_info = (EventServiceInfo){ + .type = PEBBLE_ALARM_CLOCK_EVENT, + .handler = prv_alarm_clock_event_handler, + .context = structured_glance, }; event_service_client_subscribe(&alarms_glance->alarm_clock_event_info); diff --git a/src/fw/apps/system/launcher/default/app_glance_generic.c b/src/fw/apps/system/launcher/default/app_glance_generic.c index b01b1331fe..88242265c4 100644 --- a/src/fw/apps/system/launcher/default/app_glance_generic.c +++ b/src/fw/apps/system/launcher/default/app_glance_generic.c @@ -70,8 +70,7 @@ static KinoReel *prv_create_glance_icon(const AppResourceInfo *res_info, // Not const to deal with horrifying GCC bug GSize max_size = legacy_icon_size_limit ? LAUNCHER_APP_GLANCE_STRUCTURED_ICON_LEGACY_MAX_SIZE : LAUNCHER_APP_GLANCE_STRUCTURED_ICON_MAX_SIZE; - if ((size.w > max_size.w) || - (size.h > max_size.h)) { + if ((size.w > max_size.w) || (size.h > max_size.h)) { // The icon is too big kino_reel_destroy(icon); return NULL; @@ -93,8 +92,8 @@ static void prv_generic_glance_set_icon(LauncherAppGlanceGeneric *generic_glance const bool is_requested_resource_the_default_icon = ((res_info->res_app_num == generic_glance->default_icon_resource_info.res_app_num) && - ((res_info->res_id == APP_GLANCE_SLICE_DEFAULT_ICON) || - (res_info->res_id == generic_glance->default_icon_resource_info.res_id))); + ((res_info->res_id == APP_GLANCE_SLICE_DEFAULT_ICON) || + (res_info->res_id == generic_glance->default_icon_resource_info.res_id))); const bool does_default_icon_need_to_be_loaded = (is_requested_resource_the_default_icon && !prv_app_resource_info_equal(&generic_glance->displayed_icon_resource_info, @@ -102,9 +101,7 @@ static void prv_generic_glance_set_icon(LauncherAppGlanceGeneric *generic_glance const bool is_icon_stale = (!prv_app_resource_info_equal(&generic_glance->displayed_icon_resource_info, res_info)); - if (generic_glance->displayed_icon && - !does_default_icon_need_to_be_loaded && - !is_icon_stale) { + if (generic_glance->displayed_icon && !does_default_icon_need_to_be_loaded && !is_icon_stale) { // Nothing to do, bail out return; } @@ -121,25 +118,25 @@ static void prv_generic_glance_set_icon(LauncherAppGlanceGeneric *generic_glance const bool legacy_icon_size_limit = generic_glance->use_legacy_28x28_icon_size_limit; // Try loading the requested icon - generic_glance->displayed_icon = prv_create_glance_icon(&res_info_to_load, - legacy_icon_size_limit); + generic_glance->displayed_icon = + prv_create_glance_icon(&res_info_to_load, legacy_icon_size_limit); if (!generic_glance->displayed_icon) { // Try again with the app's default icon if we didn't just try it if (!prv_app_resource_info_equal(&res_info_to_load, &generic_glance->default_icon_resource_info)) { res_info_to_load = generic_glance->default_icon_resource_info; - generic_glance->displayed_icon = prv_create_glance_icon(&res_info_to_load, - legacy_icon_size_limit); + generic_glance->displayed_icon = + prv_create_glance_icon(&res_info_to_load, legacy_icon_size_limit); } // If we don't have a valid icon at this point, use the fallback icon (casting to non-const so // we can use it) if (!generic_glance->displayed_icon && generic_glance->fallback_icon) { // Note that this (reasonably) assumes that the system fallback icon is a system icon - res_info_to_load = (AppResourceInfo) { - .res_app_num = SYSTEM_APP, - .res_id = generic_glance->fallback_icon_resource_id, + res_info_to_load = (AppResourceInfo){ + .res_app_num = SYSTEM_APP, + .res_id = generic_glance->fallback_icon_resource_id, }; generic_glance->displayed_icon = (KinoReel *)generic_glance->fallback_icon; } @@ -180,7 +177,6 @@ static void prv_subtitle_reeval_timer_cb(void *data) { launcher_app_glance_structured_notify_service_glance_changed(structured_glance); } - static void prv_update_subtitle_template_string_reeval_timer_if_necessary( LauncherAppGlanceStructured *structured_glance, time_t new_reeval_time) { LauncherAppGlanceGeneric *generic_glance = @@ -210,9 +206,8 @@ static void prv_update_subtitle_template_string_reeval_timer_if_necessary( prv_cancel_subtitle_reeval_timer(generic_glance); - generic_glance->slice_subtitle_template_string_reeval_timer = - app_timer_register((uint32_t)time_until_next_reeval_ms, prv_subtitle_reeval_timer_cb, - structured_glance); + generic_glance->slice_subtitle_template_string_reeval_timer = app_timer_register( + (uint32_t)time_until_next_reeval_ms, prv_subtitle_reeval_timer_cb, structured_glance); generic_glance->next_slice_subtitle_template_string_reeval_time = new_reeval_time; } @@ -239,10 +234,10 @@ static void prv_current_slice_updated(LauncherAppGlance *glance) { // an SDK that supports app glances (which is newer than the first SDK that supported published // resources as proved by the following asserts) _Static_assert((APP_GLANCE_MIN_SUPPORTED_SDK_VERSION_MAJOR > - TIMELINE_RESOURCE_PBW_SUPPORT_FIRST_SDK_VERSION_MAJOR) || - ((APP_GLANCE_MIN_SUPPORTED_SDK_VERSION_MAJOR == + TIMELINE_RESOURCE_PBW_SUPPORT_FIRST_SDK_VERSION_MAJOR) || + ((APP_GLANCE_MIN_SUPPORTED_SDK_VERSION_MAJOR == TIMELINE_RESOURCE_PBW_SUPPORT_FIRST_SDK_VERSION_MAJOR) && - (APP_GLANCE_MIN_SUPPORTED_SDK_VERSION_MINOR >= + (APP_GLANCE_MIN_SUPPORTED_SDK_VERSION_MINOR >= TIMELINE_RESOURCE_PBW_SUPPORT_FIRST_SDK_VERSION_MINOR)), "App glance min supported SDK version must be equal to or newer than first " "timeline/published resource PBW supported SDK version"); @@ -261,22 +256,20 @@ static void prv_current_slice_updated(LauncherAppGlance *glance) { static const char *prv_get_title(LauncherAppGlanceStructured *structured_glance) { LauncherAppGlanceGeneric *generic_glance = - launcher_app_glance_structured_get_data(structured_glance); + launcher_app_glance_structured_get_data(structured_glance); return NULL_SAFE_FIELD_ACCESS(generic_glance, title_buffer, NULL); } -static void prv_generic_glance_dynamic_text_node_update(PBL_UNUSED GContext *ctx, - PBL_UNUSED GTextNode *node, - PBL_UNUSED const GRect *box, - PBL_UNUSED const GTextNodeDrawConfig *config, - PBL_UNUSED bool render, char *buffer, - size_t buffer_size, void *user_data) { +static void prv_generic_glance_dynamic_text_node_update( + PBL_UNUSED GContext *ctx, PBL_UNUSED GTextNode *node, PBL_UNUSED const GRect *box, + PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, + size_t buffer_size, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; if (!structured_glance) { return; } else if (structured_glance->glance.current_slice.type != AppGlanceSliceType_IconAndSubtitle) { PBL_LOG_WRN("Generic glance doesn't know how to handle slice type %d", - structured_glance->glance.current_slice.type); + structured_glance->glance.current_slice.type); return; } @@ -284,8 +277,8 @@ static void prv_generic_glance_dynamic_text_node_update(PBL_UNUSED GContext *ctx const char *subtitle_template_string = structured_glance->glance.current_slice.icon_and_subtitle.template_string; TemplateStringEvalConditions template_string_reeval_conditions = {0}; - const TemplateStringVars template_string_vars = (TemplateStringVars) { - .current_time = rtc_get_time(), + const TemplateStringVars template_string_vars = (TemplateStringVars){ + .current_time = rtc_get_time(), }; TemplateStringError template_string_error = {0}; template_string_evaluate(subtitle_template_string, buffer, buffer_size, @@ -296,7 +289,7 @@ static void prv_generic_glance_dynamic_text_node_update(PBL_UNUSED GContext *ctx // Zero out the buffer and return buffer[0] = '\0'; PBL_LOG_WRN("Error at index %zu in evaluating template string: %s", - template_string_error.index_in_string, subtitle_template_string); + template_string_error.index_in_string, subtitle_template_string); return; } @@ -319,11 +312,11 @@ static void prv_destructor(LauncherAppGlanceStructured *structured_glance) { } static const LauncherAppGlanceStructuredImpl s_generic_structured_glance_impl = { - .base_handlers.current_slice_updated = prv_current_slice_updated, - .get_icon = prv_get_icon, - .get_title = prv_get_title, - .create_subtitle_node = prv_create_subtitle_node, - .destructor = prv_destructor, + .base_handlers.current_slice_updated = prv_current_slice_updated, + .get_icon = prv_get_icon, + .get_title = prv_get_title, + .create_subtitle_node = prv_create_subtitle_node, + .destructor = prv_destructor, }; LauncherAppGlance *launcher_app_glance_generic_create(const AppMenuNode *node, @@ -337,16 +330,16 @@ LauncherAppGlance *launcher_app_glance_generic_create(const AppMenuNode *node, const size_t title_buffer_size = sizeof(generic_glance->title_buffer); strncpy(generic_glance->title_buffer, node->name, title_buffer_size); generic_glance->title_buffer[title_buffer_size - 1] = '\0'; - generic_glance->default_icon_resource_info = (AppResourceInfo) { - .res_app_num = node->app_num, - .res_id = node->icon_resource_id, + generic_glance->default_icon_resource_info = (AppResourceInfo){ + .res_app_num = node->app_num, + .res_id = node->icon_resource_id, }; generic_glance->fallback_icon = fallback_icon; generic_glance->fallback_icon_resource_id = fallback_icon_resource_id; - const Version app_glance_min_supported_sdk_version = (Version) { - .major = APP_GLANCE_MIN_SUPPORTED_SDK_VERSION_MAJOR, - .minor = APP_GLANCE_MIN_SUPPORTED_SDK_VERSION_MINOR, + const Version app_glance_min_supported_sdk_version = (Version){ + .major = APP_GLANCE_MIN_SUPPORTED_SDK_VERSION_MAJOR, + .minor = APP_GLANCE_MIN_SUPPORTED_SDK_VERSION_MINOR, }; const bool app_glances_supported = @@ -358,21 +351,19 @@ LauncherAppGlance *launcher_app_glance_generic_create(const AppMenuNode *node, // the != SYSTEM_APP condition can't be satisfied easily, so just skip this part for unit tests #if !UNITTEST // Only consider slices for non-system apps that were compiled with an SDK that supports glances - const bool should_consider_slices = (node->app_num != SYSTEM_APP) && - app_glances_supported; + const bool should_consider_slices = (node->app_num != SYSTEM_APP) && app_glances_supported; #else const bool should_consider_slices = true; #endif prv_generic_glance_set_icon(generic_glance, &generic_glance->default_icon_resource_info); - LauncherAppGlanceStructured *structured_glance = - launcher_app_glance_structured_create(&node->uuid, &s_generic_structured_glance_impl, - should_consider_slices, generic_glance); + LauncherAppGlanceStructured *structured_glance = launcher_app_glance_structured_create( + &node->uuid, &s_generic_structured_glance_impl, should_consider_slices, generic_glance); if (structured_glance) { if (generic_glance->use_legacy_28x28_icon_size_limit) { - launcher_app_glance_structured_set_icon_max_size(structured_glance, - LAUNCHER_APP_GLANCE_STRUCTURED_ICON_LEGACY_MAX_SIZE); + launcher_app_glance_structured_set_icon_max_size( + structured_glance, LAUNCHER_APP_GLANCE_STRUCTURED_ICON_LEGACY_MAX_SIZE); } return &structured_glance->glance; } else { diff --git a/src/fw/apps/system/launcher/default/app_glance_music.c b/src/fw/apps/system/launcher/default/app_glance_music.c index 4a9b205c81..4a0f2de6b5 100644 --- a/src/fw/apps/system/launcher/default/app_glance_music.c +++ b/src/fw/apps/system/launcher/default/app_glance_music.c @@ -31,24 +31,21 @@ typedef struct LauncherAppGlanceMusic { } LauncherAppGlanceMusic; static KinoReel *prv_get_icon(LauncherAppGlanceStructured *structured_glance) { - LauncherAppGlanceMusic *music_glance = - launcher_app_glance_structured_get_data(structured_glance); + LauncherAppGlanceMusic *music_glance = launcher_app_glance_structured_get_data(structured_glance); return NULL_SAFE_FIELD_ACCESS(music_glance, icon, NULL); } static const char *prv_get_title(LauncherAppGlanceStructured *structured_glance) { - LauncherAppGlanceMusic *music_glance = - launcher_app_glance_structured_get_data(structured_glance); + LauncherAppGlanceMusic *music_glance = launcher_app_glance_structured_get_data(structured_glance); return NULL_SAFE_FIELD_ACCESS(music_glance, title, NULL); } static void prv_music_glance_subtitle_dynamic_text_node_update( PBL_UNUSED GContext *ctx, PBL_UNUSED GTextNode *node, PBL_UNUSED const GRect *box, - PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, size_t buffer_size, - void *user_data) { + PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, + size_t buffer_size, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; - LauncherAppGlanceMusic *music_glance = - launcher_app_glance_structured_get_data(structured_glance); + LauncherAppGlanceMusic *music_glance = launcher_app_glance_structured_get_data(structured_glance); if (music_glance) { strncpy(buffer, music_glance->subtitle, buffer_size); buffer[buffer_size - 1] = '\0'; @@ -61,8 +58,7 @@ static GTextNode *prv_create_subtitle_node(LauncherAppGlanceStructured *structur } static void prv_destructor(LauncherAppGlanceStructured *structured_glance) { - LauncherAppGlanceMusic *music_glance = - launcher_app_glance_structured_get_data(structured_glance); + LauncherAppGlanceMusic *music_glance = launcher_app_glance_structured_get_data(structured_glance); if (music_glance) { event_service_client_unsubscribe(&music_glance->music_event_info); kino_reel_destroy(music_glance->icon); @@ -107,8 +103,7 @@ static bool prv_should_display_music_state(MusicPlayState play_state, } static void prv_update_glance_for_music_state(LauncherAppGlanceStructured *structured_glance) { - LauncherAppGlanceMusic *music_glance = - launcher_app_glance_structured_get_data(structured_glance); + LauncherAppGlanceMusic *music_glance = launcher_app_glance_structured_get_data(structured_glance); PBL_ASSERTN(music_glance); // Zero out the glance's subtitle buffer @@ -170,10 +165,10 @@ static void prv_music_event_handler(PebbleEvent *event, void *context) { } static const LauncherAppGlanceStructuredImpl s_music_structured_glance_impl = { - .get_icon = prv_get_icon, - .get_title = prv_get_title, - .create_subtitle_node = prv_create_subtitle_node, - .destructor = prv_destructor, + .get_icon = prv_get_icon, + .get_title = prv_get_title, + .create_subtitle_node = prv_create_subtitle_node, + .destructor = prv_destructor, }; LauncherAppGlance *launcher_app_glance_music_create(const AppMenuNode *node) { @@ -190,19 +185,18 @@ LauncherAppGlance *launcher_app_glance_music_create(const AppMenuNode *node) { music_glance->default_icon_resource_id = node->icon_resource_id; const bool should_consider_slices = false; - LauncherAppGlanceStructured *structured_glance = - launcher_app_glance_structured_create(&node->uuid, &s_music_structured_glance_impl, - should_consider_slices, music_glance); + LauncherAppGlanceStructured *structured_glance = launcher_app_glance_structured_create( + &node->uuid, &s_music_structured_glance_impl, should_consider_slices, music_glance); PBL_ASSERTN(structured_glance); // Get the first state of the glance prv_update_glance_for_music_state(structured_glance); // Subscribe to music events for updating the glance - music_glance->music_event_info = (EventServiceInfo) { - .type = PEBBLE_MEDIA_EVENT, - .handler = prv_music_event_handler, - .context = structured_glance, + music_glance->music_event_info = (EventServiceInfo){ + .type = PEBBLE_MEDIA_EVENT, + .handler = prv_music_event_handler, + .context = structured_glance, }; event_service_client_subscribe(&music_glance->music_event_info); diff --git a/src/fw/apps/system/launcher/default/app_glance_notifications.c b/src/fw/apps/system/launcher/default/app_glance_notifications.c index 5e4d09eae9..0f038d1650 100644 --- a/src/fw/apps/system/launcher/default/app_glance_notifications.c +++ b/src/fw/apps/system/launcher/default/app_glance_notifications.c @@ -36,8 +36,8 @@ static const char *prv_get_title(LauncherAppGlanceStructured *structured_glance) static void prv_notifications_glance_subtitle_dynamic_text_node_update( PBL_UNUSED GContext *ctx, PBL_UNUSED GTextNode *node, PBL_UNUSED const GRect *box, - PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, size_t buffer_size, - void *user_data) { + PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, + size_t buffer_size, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; LauncherAppGlanceNotifications *notifications_glance = launcher_app_glance_structured_get_data(structured_glance); @@ -127,10 +127,10 @@ static void prv_notification_event_handler(PebbleEvent *event, void *context) { } static const LauncherAppGlanceStructuredImpl s_notifications_structured_glance_impl = { - .get_icon = prv_get_icon, - .get_title = prv_get_title, - .create_subtitle_node = prv_create_subtitle_node, - .destructor = prv_destructor, + .get_icon = prv_get_icon, + .get_title = prv_get_title, + .create_subtitle_node = prv_create_subtitle_node, + .destructor = prv_destructor, }; LauncherAppGlance *launcher_app_glance_notifications_create(const AppMenuNode *node) { @@ -145,8 +145,8 @@ LauncherAppGlance *launcher_app_glance_notifications_create(const AppMenuNode *n notifications_glance->title[title_size - 1] = '\0'; // Create the icon for the Notifications app - notifications_glance->icon = kino_reel_create_with_resource_system(node->app_num, - node->icon_resource_id); + notifications_glance->icon = + kino_reel_create_with_resource_system(node->app_num, node->icon_resource_id); PBL_ASSERTN(notifications_glance->icon); const bool should_consider_slices = false; @@ -159,10 +159,10 @@ LauncherAppGlance *launcher_app_glance_notifications_create(const AppMenuNode *n prv_update_glance_for_last_notification_received(notifications_glance); // Subscribe to notification events for updating the glance - notifications_glance->notification_event_info = (EventServiceInfo) { - .type = PEBBLE_SYS_NOTIFICATION_EVENT, - .handler = prv_notification_event_handler, - .context = structured_glance, + notifications_glance->notification_event_info = (EventServiceInfo){ + .type = PEBBLE_SYS_NOTIFICATION_EVENT, + .handler = prv_notification_event_handler, + .context = structured_glance, }; event_service_client_subscribe(¬ifications_glance->notification_event_info); diff --git a/src/fw/apps/system/launcher/default/app_glance_service.c b/src/fw/apps/system/launcher/default/app_glance_service.c index ae5470d186..b5a2faf27b 100644 --- a/src/fw/apps/system/launcher/default/app_glance_service.c +++ b/src/fw/apps/system/launcher/default/app_glance_service.c @@ -63,8 +63,8 @@ static void prv_update_slice_expiration_timer_if_necessary(LauncherAppGlanceServ const time_t next_slice_expiration_time = service->next_slice_expiration_time; const bool is_new_slice_expire_time_earlier_than_existing_earliest = (new_slice_expire_time != APP_GLANCE_SLICE_NO_EXPIRATION) && - ((next_slice_expiration_time == APP_GLANCE_SLICE_NO_EXPIRATION) || - (new_slice_expire_time < next_slice_expiration_time)); + ((next_slice_expiration_time == APP_GLANCE_SLICE_NO_EXPIRATION) || + (new_slice_expire_time < next_slice_expiration_time)); if (!is_new_slice_expire_time_earlier_than_existing_earliest) { return; } @@ -86,9 +86,8 @@ static void prv_update_slice_expiration_timer_if_necessary(LauncherAppGlanceServ prv_reset_slice_expiration_timer(service); - service->slice_expiration_timer = - app_timer_register((uint32_t)time_until_slice_expires_ms, prv_slice_expiration_timer_cb, - service); + service->slice_expiration_timer = app_timer_register((uint32_t)time_until_slice_expires_ms, + prv_slice_expiration_timer_cb, service); service->next_slice_expiration_time = new_slice_expire_time; } @@ -182,8 +181,8 @@ static void prv_glance_cache_put(LauncherAppGlanceService *service, const Uuid * // Initialize a new cache entry, add it to the head of the cache list, and return it LauncherAppGlanceCacheEntry *new_cache_entry = app_zalloc_check(sizeof(*new_cache_entry)); - *new_cache_entry = (LauncherAppGlanceCacheEntry) { - .glance = glance, + *new_cache_entry = (LauncherAppGlanceCacheEntry){ + .glance = glance, }; service->glance_cache = list_insert_before(service->glance_cache, &new_cache_entry->node); } @@ -198,46 +197,59 @@ static LauncherAppGlance *prv_load_glance_for_node(const AppMenuNode *node, LauncherAppGlanceService *service) { typedef struct { Uuid uuid; - LauncherAppGlance* (*constructor)(const AppMenuNode *); + LauncherAppGlance *(*constructor)(const AppMenuNode *); } SystemAppGlanceFactory; static const SystemAppGlanceFactory s_system_glance_factories[] = { - { // Settings - .uuid = {0x07, 0xe0, 0xd9, 0xcb, 0x89, 0x57, 0x4b, 0xf7, - 0x9d, 0x42, 0x35, 0xbf, 0x47, 0xca, 0xad, 0xfe}, - .constructor = launcher_app_glance_settings_create, - }, - { // Music - .uuid = {0x1f, 0x03, 0x29, 0x3d, 0x47, 0xaf, 0x4f, 0x28, - 0xb9, 0x60, 0xf2, 0xb0, 0x2a, 0x6d, 0xd7, 0x57}, - .constructor = launcher_app_glance_music_create, - }, - { // Weather - .uuid = {0x61, 0xb2, 0x2b, 0xc8, 0x1e, 0x29, 0x46, 0xd, - 0xa2, 0x36, 0x3f, 0xe4, 0x9, 0xa4, 0x39, 0xff}, - .constructor = launcher_app_glance_weather_create, - }, - { // Notifications - .uuid = {0xb2, 0xca, 0xe8, 0x18, 0x10, 0xf8, 0x46, 0xdf, - 0xad, 0x2b, 0x98, 0xad, 0x22, 0x54, 0xa3, 0xc1}, - .constructor = launcher_app_glance_notifications_create, - }, - { // Alarms - .uuid = {0x67, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, - 0xa0, 0xb9, 0x85, 0x4c, 0xc6, 0x2f, 0x97, 0xf9}, - .constructor = launcher_app_glance_alarms_create, - }, - { // Watchfaces - .uuid = {0x18, 0xe4, 0x43, 0xce, 0x38, 0xfd, 0x47, 0xc8, - 0x84, 0xd5, 0x6d, 0x0c, 0x77, 0x5f, 0xbe, 0x55}, - .constructor = launcher_app_glance_watchfaces_create, - }, - { - // Workout - .uuid = {0xfe, 0xf8, 0x2c, 0x82, 0x71, 0x76, 0x4e, 0x22, - 0x88, 0xde, 0x35, 0xa3, 0xfc, 0x18, 0xd4, 0x3f}, - .constructor = launcher_app_glance_workout_create, - }, + { + // Settings + .uuid = + {0x07, 0xe0, 0xd9, 0xcb, 0x89, 0x57, 0x4b, 0xf7, 0x9d, 0x42, 0x35, 0xbf, 0x47, 0xca, + 0xad, 0xfe}, + .constructor = launcher_app_glance_settings_create, + }, + { + // Music + .uuid = + {0x1f, 0x03, 0x29, 0x3d, 0x47, 0xaf, 0x4f, 0x28, 0xb9, 0x60, 0xf2, 0xb0, 0x2a, 0x6d, + 0xd7, 0x57}, + .constructor = launcher_app_glance_music_create, + }, + { + // Weather + .uuid = + {0x61, 0xb2, 0x2b, 0xc8, 0x1e, 0x29, 0x46, 0xd, 0xa2, 0x36, 0x3f, 0xe4, 0x9, 0xa4, + 0x39, 0xff}, + .constructor = launcher_app_glance_weather_create, + }, + { + // Notifications + .uuid = + {0xb2, 0xca, 0xe8, 0x18, 0x10, 0xf8, 0x46, 0xdf, 0xad, 0x2b, 0x98, 0xad, 0x22, 0x54, + 0xa3, 0xc1}, + .constructor = launcher_app_glance_notifications_create, + }, + { + // Alarms + .uuid = + {0x67, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, 0xa0, 0xb9, 0x85, 0x4c, 0xc6, 0x2f, + 0x97, 0xf9}, + .constructor = launcher_app_glance_alarms_create, + }, + { + // Watchfaces + .uuid = + {0x18, 0xe4, 0x43, 0xce, 0x38, 0xfd, 0x47, 0xc8, 0x84, 0xd5, 0x6d, 0x0c, 0x77, 0x5f, + 0xbe, 0x55}, + .constructor = launcher_app_glance_watchfaces_create, + }, + { + // Workout + .uuid = + {0xfe, 0xf8, 0x2c, 0x82, 0x71, 0x76, 0x4e, 0x22, 0x88, 0xde, 0x35, 0xa3, 0xfc, 0x18, + 0xd4, 0x3f}, + .constructor = launcher_app_glance_workout_create, + }, }; LauncherAppGlance *glance = NULL; @@ -266,7 +278,7 @@ static LauncherAppGlance *prv_load_glance_for_node(const AppMenuNode *node, } static LauncherAppGlanceCacheEntry *prv_find_glance_entry_in_cache( - LauncherAppGlanceService *service, Uuid *uuid) { + LauncherAppGlanceService *service, Uuid *uuid) { return (LauncherAppGlanceCacheEntry *)list_find(service->glance_cache, prv_glance_cache_entry_find_cb, uuid); } @@ -278,8 +290,8 @@ static LauncherAppGlance *prv_find_glance_in_cache(LauncherAppGlanceService *ser //! Request a glance for an icon ID from an "MRU linked list" (list sorted by accesses so that //! most recent accesses are at the head of the list) -static LauncherAppGlance *prv_fetch_from_cache_or_load_glance_for_node(AppMenuNode *node, - LauncherAppGlanceService *service) { +static LauncherAppGlance *prv_fetch_from_cache_or_load_glance_for_node( + AppMenuNode *node, LauncherAppGlanceService *service) { if (!service || !node) { return NULL; } @@ -329,8 +341,8 @@ static void prv_handle_glance_event(PebbleEvent *event, void *context) { PBL_ASSERTN(service); // Update the current slice of the glance that was changed if the glance is in the cache - LauncherAppGlance *glance_in_cache = prv_find_glance_in_cache(service, - event->app_glance.app_uuid); + LauncherAppGlance *glance_in_cache = + prv_find_glance_in_cache(service, event->app_glance.app_uuid); if (glance_in_cache) { launcher_app_glance_update_current_slice(glance_in_cache); @@ -350,9 +362,9 @@ void launcher_app_glance_service_draw_glance_for_app_node(LauncherAppGlanceServi AppMenuNode *node) { const bool use_glance_cache = prv_should_use_glance_cache_for_app_with_uuid(&node->uuid); - LauncherAppGlance *glance = - use_glance_cache ? prv_fetch_from_cache_or_load_glance_for_node(node, service) : - prv_load_glance_for_node(node, service); + LauncherAppGlance *glance = use_glance_cache + ? prv_fetch_from_cache_or_load_glance_for_node(node, service) + : prv_load_glance_for_node(node, service); // Set the screen Y position for arc effect on round displays if (glance) { @@ -425,14 +437,14 @@ void launcher_app_glance_service_init(LauncherAppGlanceService *service, return; } - *service = (LauncherAppGlanceService) {}; + *service = (LauncherAppGlanceService){}; prv_reset_slice_expiration_timer(service); - service->glance_event_info = (EventServiceInfo) { - .type = PEBBLE_APP_GLANCE_EVENT, - .handler = prv_handle_glance_event, - .context = service, + service->glance_event_info = (EventServiceInfo){ + .type = PEBBLE_APP_GLANCE_EVENT, + .handler = prv_handle_glance_event, + .context = service, }; event_service_client_subscribe(&service->glance_event_info); @@ -440,8 +452,8 @@ void launcher_app_glance_service_init(LauncherAppGlanceService *service, PBL_ASSERTN(service->generic_glance_icon); service->generic_glance_icon_resource_id = generic_glance_icon_resource_id; - const KinoPlayerCallbacks glance_reel_player_callbacks = (KinoPlayerCallbacks) { - .frame_did_change = prv_glance_reel_player_frame_did_change_cb, + const KinoPlayerCallbacks glance_reel_player_callbacks = (KinoPlayerCallbacks){ + .frame_did_change = prv_glance_reel_player_frame_did_change_cb, }; kino_player_set_callbacks(&service->glance_reel_player, glance_reel_player_callbacks, service); } @@ -452,7 +464,7 @@ void launcher_app_glance_service_set_handlers(LauncherAppGlanceService *service, if (!service) { return; } else if (!handlers) { - service->handlers = (LauncherAppGlanceServiceHandlers) {}; + service->handlers = (LauncherAppGlanceServiceHandlers){}; } else { service->handlers = *handlers; } diff --git a/src/fw/apps/system/launcher/default/app_glance_settings.c b/src/fw/apps/system/launcher/default/app_glance_settings.c index 273e42e3fa..31a8120404 100644 --- a/src/fw/apps/system/launcher/default/app_glance_settings.c +++ b/src/fw/apps/system/launcher/default/app_glance_settings.c @@ -41,7 +41,8 @@ typedef struct LauncherAppGlanceSettingsState { typedef struct LauncherAppGlanceSettings { char title[APP_NAME_SIZE_BYTES]; - char battery_percent_text[5]; //!< longest string is "100%" (4 characters + 1 for NULL terminator) + char + battery_percent_text[5]; //!< longest string is "100%" (4 characters + 1 for NULL terminator) KinoReel *icon; uint32_t icon_resource_id; KinoReel *charging_indicator_icon; @@ -69,25 +70,24 @@ static const char *prv_get_title(LauncherAppGlanceStructured *structured_glance) } static void prv_charging_icon_node_draw_cb(GContext *ctx, const GRect *rect, - PBL_UNUSED const GTextNodeDrawConfig *config, bool render, - GSize *size_out, void *user_data) { + PBL_UNUSED const GTextNodeDrawConfig *config, + bool render, GSize *size_out, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; LauncherAppGlanceSettings *settings_glance = launcher_app_glance_structured_get_data(structured_glance); - KinoReel *charging_indicator_icon = NULL_SAFE_FIELD_ACCESS(settings_glance, - charging_indicator_icon, NULL); + KinoReel *charging_indicator_icon = + NULL_SAFE_FIELD_ACCESS(settings_glance, charging_indicator_icon, NULL); PBL_ASSERTN(charging_indicator_icon); - if (render && charging_indicator_icon) { launcher_app_glance_structured_draw_icon(structured_glance, ctx, charging_indicator_icon, rect->origin); } if (size_out) { - *size_out = GSize(kino_reel_get_size(charging_indicator_icon).w, - settings_glance->subtitle_font_height); + *size_out = + GSize(kino_reel_get_size(charging_indicator_icon).w, settings_glance->subtitle_font_height); } } @@ -98,25 +98,25 @@ static void prv_battery_icon_node_draw_cb(GContext *ctx, const GRect *rect, LauncherAppGlanceSettings *settings_glance = launcher_app_glance_structured_get_data(structured_glance); - const GSize battery_silhouette_icon_size = GSize(BATTERY_SILHOUETTE_ICON_WIDTH, - BATTERY_SILHOUETTE_ICON_HEIGHT); + const GSize battery_silhouette_icon_size = + GSize(BATTERY_SILHOUETTE_ICON_WIDTH, BATTERY_SILHOUETTE_ICON_HEIGHT); if (render) { // This points array is static to help conserve stack usage static const GPoint s_battery_silhouette_path_points[] = { - {0, 0}, - {BATTERY_SILHOUETTE_ICON_WIDTH - 1, 0}, - {BATTERY_SILHOUETTE_ICON_WIDTH - 1, 1}, - {BATTERY_SILHOUETTE_ICON_WIDTH + 1, 2}, - {BATTERY_SILHOUETTE_ICON_WIDTH + 1, BATTERY_SILHOUETTE_ICON_HEIGHT - 3}, - {BATTERY_SILHOUETTE_ICON_WIDTH - 1, BATTERY_SILHOUETTE_ICON_HEIGHT - 3}, - {BATTERY_SILHOUETTE_ICON_WIDTH - 1, BATTERY_SILHOUETTE_ICON_HEIGHT - 1}, - {0, BATTERY_SILHOUETTE_ICON_HEIGHT - 1}, + {0, 0}, + {BATTERY_SILHOUETTE_ICON_WIDTH - 1, 0}, + {BATTERY_SILHOUETTE_ICON_WIDTH - 1, 1}, + {BATTERY_SILHOUETTE_ICON_WIDTH + 1, 2}, + {BATTERY_SILHOUETTE_ICON_WIDTH + 1, BATTERY_SILHOUETTE_ICON_HEIGHT - 3}, + {BATTERY_SILHOUETTE_ICON_WIDTH - 1, BATTERY_SILHOUETTE_ICON_HEIGHT - 3}, + {BATTERY_SILHOUETTE_ICON_WIDTH - 1, BATTERY_SILHOUETTE_ICON_HEIGHT - 1}, + {0, BATTERY_SILHOUETTE_ICON_HEIGHT - 1}, }; - GPath battery_silhouette_path = (GPath) { - .num_points = ARRAY_LENGTH(s_battery_silhouette_path_points), - .points = (GPoint *)s_battery_silhouette_path_points, - .offset = rect->origin, + GPath battery_silhouette_path = (GPath){ + .num_points = ARRAY_LENGTH(s_battery_silhouette_path_points), + .points = (GPoint *)s_battery_silhouette_path_points, + .offset = rect->origin, }; const GColor battery_silhouette_color = @@ -127,9 +127,9 @@ static void prv_battery_icon_node_draw_cb(GContext *ctx, const GRect *rect, graphics_context_set_fill_color(ctx, battery_silhouette_color); // Draw the battery silhouette - const GRect battery_silhouette_frame = (GRect) { - .origin = rect->origin, - .size = battery_silhouette_icon_size, + const GRect battery_silhouette_frame = (GRect){ + .origin = rect->origin, + .size = battery_silhouette_icon_size, }; gpath_draw_filled(ctx, &battery_silhouette_path); @@ -158,8 +158,8 @@ static void prv_battery_icon_node_draw_cb(GContext *ctx, const GRect *rect, static void prv_battery_percent_dynamic_text_node_update( PBL_UNUSED GContext *ctx, PBL_UNUSED GTextNode *node, PBL_UNUSED const GRect *box, - PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, size_t buffer_size, - void *user_data) { + PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, + size_t buffer_size, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; LauncherAppGlanceSettings *settings_glance = launcher_app_glance_structured_get_data(structured_glance); @@ -194,9 +194,8 @@ static GTextNode *prv_create_subtitle_node(LauncherAppGlanceStructured *structur horizontal_container_node->horizontal_alignment = GTextAlignmentLeft; if (!settings_glance->glance_state.battery_charge_state.is_plugged) { - GTextNode *battery_percent_text_node = - launcher_app_glance_structured_create_subtitle_text_node( - structured_glance, prv_battery_percent_dynamic_text_node_update); + GTextNode *battery_percent_text_node = launcher_app_glance_structured_create_subtitle_text_node( + structured_glance, prv_battery_percent_dynamic_text_node_update); // Achieves the design spec'd 6 px horizontal spacing b/w the percent text and battery icon battery_percent_text_node->margin.w = 4; GTextNode *vertically_centered_battery_percent_text_node = @@ -299,7 +298,7 @@ static uint32_t prv_get_resource_id_for_connectivity_status( static void prv_refresh_glance_content(LauncherAppGlanceSettings *settings_glance) { // Update the battery percent text in the glance const size_t battery_percent_text_size = sizeof(settings_glance->battery_percent_text); - snprintf(settings_glance->battery_percent_text, battery_percent_text_size, "%"PRIu8"%%", + snprintf(settings_glance->battery_percent_text, battery_percent_text_size, "%" PRIu8 "%%", settings_glance->glance_state.battery_charge_state.charge_percent); // Update the icon @@ -362,20 +361,20 @@ static void prv_subscribe_to_event(EventServiceInfo *event_service_info, PebbleE LauncherAppGlanceStructured *structured_glance) { PBL_ASSERTN(event_service_info); - *event_service_info = (EventServiceInfo) { - .type = type, - .handler = prv_event_handler, - .context = structured_glance, + *event_service_info = (EventServiceInfo){ + .type = type, + .handler = prv_event_handler, + .context = structured_glance, }; event_service_client_subscribe(event_service_info); } static const LauncherAppGlanceStructuredImpl s_settings_structured_glance_impl = { - .get_icon = prv_get_icon, - .get_title = prv_get_title, - .create_subtitle_node = prv_create_subtitle_node, - .destructor = prv_destructor, + .get_icon = prv_get_icon, + .get_title = prv_get_title, + .create_subtitle_node = prv_create_subtitle_node, + .destructor = prv_destructor, }; LauncherAppGlance *launcher_app_glance_settings_create(const AppMenuNode *node) { @@ -397,21 +396,20 @@ LauncherAppGlance *launcher_app_glance_settings_create(const AppMenuNode *node) fonts_get_font_height(fonts_get_system_font(LAUNCHER_MENU_LAYER_SUBTITLE_FONT)); const bool should_consider_slices = false; - LauncherAppGlanceStructured *structured_glance = - launcher_app_glance_structured_create(&node->uuid, &s_settings_structured_glance_impl, - should_consider_slices, settings_glance); + LauncherAppGlanceStructured *structured_glance = launcher_app_glance_structured_create( + &node->uuid, &s_settings_structured_glance_impl, should_consider_slices, settings_glance); PBL_ASSERTN(structured_glance); // Disable selection animations for the settings glance structured_glance->selection_animation_disabled = true; // Set the first state of the glance - settings_glance->glance_state = (LauncherAppGlanceSettingsState) { - .battery_charge_state = battery_state_service_peek(), - .is_pebble_app_connected = prv_is_pebble_app_connected(), - .is_airplane_mode_enabled = bt_ctl_is_airplane_mode_on(), - .is_quiet_time_enabled = do_not_disturb_is_active(), + settings_glance->glance_state = (LauncherAppGlanceSettingsState){ + .battery_charge_state = battery_state_service_peek(), + .is_pebble_app_connected = prv_is_pebble_app_connected(), + .is_airplane_mode_enabled = bt_ctl_is_airplane_mode_on(), + .is_quiet_time_enabled = do_not_disturb_is_active(), #ifdef CONFIG_HRM - .is_sharing_hrm = ble_hrm_is_sharing(), + .is_sharing_hrm = ble_hrm_is_sharing(), #endif }; @@ -429,8 +427,7 @@ LauncherAppGlance *launcher_app_glance_settings_create(const AppMenuNode *node) structured_glance); #ifdef CONFIG_HRM prv_subscribe_to_event(&settings_glance->hrm_sharing_event_info, - PEBBLE_BLE_HRM_SHARING_STATE_UPDATED_EVENT, - structured_glance); + PEBBLE_BLE_HRM_SHARING_STATE_UPDATED_EVENT, structured_glance); #endif return &structured_glance->glance; diff --git a/src/fw/apps/system/launcher/default/app_glance_structured.c b/src/fw/apps/system/launcher/default/app_glance_structured.c index 583063af43..863464bfba 100644 --- a/src/fw/apps/system/launcher/default/app_glance_structured.c +++ b/src/fw/apps/system/launcher/default/app_glance_structured.c @@ -40,17 +40,15 @@ static void prv_structured_glance_icon_draw_command_processor_process_command( // Luminance tint the fill color const GColor fill_color = gdraw_command_get_fill_color(processed_command); - const GColor tinted_fill_color = - gcolor_perform_lookup_using_color_luminance_and_multiply_alpha(fill_color, - luminance_tint_lookup_table); + const GColor tinted_fill_color = gcolor_perform_lookup_using_color_luminance_and_multiply_alpha( + fill_color, luminance_tint_lookup_table); gdraw_command_replace_color(processed_command, fill_color, tinted_fill_color); gdraw_command_set_fill_color(processed_command, tinted_fill_color); // Luminance tint the stroke color const GColor stroke_color = gdraw_command_get_stroke_color(processed_command); - const GColor tinted_stroke_color = - gcolor_perform_lookup_using_color_luminance_and_multiply_alpha(stroke_color, - luminance_tint_lookup_table); + const GColor tinted_stroke_color = gcolor_perform_lookup_using_color_luminance_and_multiply_alpha( + stroke_color, luminance_tint_lookup_table); gdraw_command_set_stroke_color(processed_command, tinted_stroke_color); } @@ -78,7 +76,7 @@ static void prv_structured_glance_icon_bitmap_processor_post_func( GBitmapProcessor *processor, GContext *ctx, PBL_UNUSED const GBitmap *bitmap_used, PBL_UNUSED const GRect *global_clipped_grect_used) { GenericGlanceIconBitmapProcessor *processor_with_data = - (GenericGlanceIconBitmapProcessor *)processor; + (GenericGlanceIconBitmapProcessor *)processor; // Restore the saved compositing mode and tint color ctx->draw_state.compositing_mode = processor_with_data->saved_compositing_mode; ctx->draw_state.tint_color = processor_with_data->saved_tint_color; @@ -109,26 +107,27 @@ void launcher_app_glance_structured_draw_icon(LauncherAppGlanceStructured *struc const GColor desired_tint_color = prv_get_icon_tint_color(structured_glance); GenericGlanceIconBitmapProcessor structured_glance_icon_bitmap_processor = { - .bitmap_processor = { - .pre = prv_structured_glance_icon_bitmap_processor_pre_func, - .post = prv_structured_glance_icon_bitmap_processor_post_func, - }, - .desired_tint_color = desired_tint_color, + .bitmap_processor = + { + .pre = prv_structured_glance_icon_bitmap_processor_pre_func, + .post = prv_structured_glance_icon_bitmap_processor_post_func, + }, + .desired_tint_color = desired_tint_color, }; GColor8 luminance_tint_lookup_table[GCOLOR8_COMPONENT_NUM_VALUES] = {}; gcolor_tint_luminance_lookup_table_init(desired_tint_color, luminance_tint_lookup_table); GenericGlanceIconDrawCommandProcessor structured_glance_icon_draw_command_processor = { - .draw_command_processor.command = - prv_structured_glance_icon_draw_command_processor_process_command, - .luminance_tint_lookup_table = luminance_tint_lookup_table, + .draw_command_processor.command = + prv_structured_glance_icon_draw_command_processor_process_command, + .luminance_tint_lookup_table = luminance_tint_lookup_table, }; KinoReelProcessor structured_glance_icon_processor = { - .bitmap_processor = &structured_glance_icon_bitmap_processor.bitmap_processor, - .draw_command_processor = - &structured_glance_icon_draw_command_processor.draw_command_processor, + .bitmap_processor = &structured_glance_icon_bitmap_processor.bitmap_processor, + .draw_command_processor = + &structured_glance_icon_draw_command_processor.draw_command_processor, }; // Draw the glance's icon, luminance tinting its colors according to the glance's highlight @@ -146,13 +145,12 @@ static void prv_structured_glance_icon_node_draw_cb(GContext *ctx, const GRect * if (render && icon) { // Center the frame in which we'll draw the icon - GRect icon_frame = (GRect) { .size = kino_reel_get_size(icon) }; + GRect icon_frame = (GRect){.size = kino_reel_get_size(icon)}; grect_align(&icon_frame, rect, GAlignCenter, false /* clip */); // Save the GContext's clip box and override it so we clip the icon to the max icon size const GRect saved_clip_box = ctx->draw_state.clip_box; - ctx->draw_state.clip_box.origin = gpoint_add(ctx->draw_state.drawing_box.origin, - rect->origin); + ctx->draw_state.clip_box.origin = gpoint_add(ctx->draw_state.drawing_box.origin, rect->origin); ctx->draw_state.clip_box.size = rect->size; // Prevent drawing outside of the existing clip box @@ -190,8 +188,8 @@ static GTextNode *prv_structured_glance_create_text_node( static void prv_structured_glance_title_dynamic_text_node_update( PBL_UNUSED GContext *ctx, PBL_UNUSED GTextNode *node, PBL_UNUSED const GRect *box, - PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, size_t buffer_size, - void *user_data) { + PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, + size_t buffer_size, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; const char *title = NULL; if (structured_glance && structured_glance->impl && structured_glance->impl->get_title) { @@ -233,11 +231,11 @@ static bool prv_get_text_scroll_vars(GContext *ctx, uint32_t cumulative_elapsed_ // Allow for showing up to 3x the width of the draw_box for the text const int16_t max_text_width = draw_box->size.w * (int16_t)3; - const GRect max_text_box = (GRect) { .size = GSize(max_text_width, draw_box->size.h) }; + const GRect max_text_box = (GRect){.size = GSize(max_text_width, draw_box->size.h)}; const int16_t scroll_visible_text_width = - graphics_text_layout_get_max_used_size(ctx, text, font, max_text_box, - overflow_mode, text_alignment, - (GTextLayoutCacheRef)layout).w; + graphics_text_layout_get_max_used_size(ctx, text, font, max_text_box, overflow_mode, + text_alignment, (GTextLayoutCacheRef)layout) + .w; if (scroll_visible_text_width <= draw_box->size.w) { // No need to scroll because text fits completely in the provided draw_box @@ -276,7 +274,7 @@ static bool prv_get_text_scroll_vars(GContext *ctx, uint32_t cumulative_elapsed_ const uint32_t elapsed_normalized = ((uint32_t)elapsed_ms * ANIMATION_NORMALIZED_MAX) / - (rewind ? rewind_scroll_duration_ms : normal_scroll_duration_ms); + (rewind ? rewind_scroll_duration_ms : normal_scroll_duration_ms); vars_out->current_offset = interpolate_int16(elapsed_normalized, 0, total_px_to_scroll); return true; @@ -292,9 +290,7 @@ static void prv_adjust_subtitle_node_for_scrolling_animation( const uint32_t cumulative_elapsed_ms = structured_glance->selection_animation_elapsed_ms; ScrollAnimationVars vars; - if (!prv_get_text_scroll_vars(ctx, - cumulative_elapsed_ms, - text, draw_box, node_text->font, + if (!prv_get_text_scroll_vars(ctx, cumulative_elapsed_ms, text, draw_box, node_text->font, node_text->alignment, node_text->overflow, &structured_glance->subtitle_scroll_calc_text_layout, &vars)) { // No need to scroll because text fits completely on-screen, set the selection animation @@ -326,7 +322,7 @@ static void prv_adjust_subtitle_node_for_scrolling_animation( static void prv_structured_glance_subtitle_dynamic_text_node_update( GContext *ctx, GTextNode *node, const GRect *box, const GTextNodeDrawConfig *config, - bool render, char *buffer, size_t buffer_size, void *user_data) { + bool render, char *buffer, size_t buffer_size, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; if (structured_glance->subtitle_update) { structured_glance->subtitle_update(ctx, node, box, config, render, buffer, buffer_size, @@ -361,7 +357,7 @@ static GTextNode *prv_create_structured_glance_title_subtitle_node( GTextNode *title_node = prv_structured_glance_create_title_text_node(structured_glance); // We require a valid title node PBL_ASSERTN(title_node); - + // Push the margin a bit closer #if PBL_DISPLAY_HEIGHT >= 200 && PBL_RECT title_node->margin.h = -3; @@ -385,7 +381,7 @@ static GTextNode *prv_create_structured_glance_title_subtitle_node( // and a negative width must not reach text layout vertical_node->container.size.w = MAX(0, glance_frame->size.w - structured_glance->icon_horizontal_margin - - structured_glance->icon_max_size.w); + structured_glance->icon_max_size.w); return &vertical_node->container.node; } @@ -401,13 +397,13 @@ static NOINLINE GTextNode *prv_create_structured_glance_node( // This vertical node is just a container to vertically center the icon node const size_t max_vertical_icon_container_nodes = 1; GTextNodeVertical *vertical_icon_container_node = - graphics_text_node_create_vertical(max_vertical_icon_container_nodes); + graphics_text_node_create_vertical(max_vertical_icon_container_nodes); vertical_icon_container_node->vertical_alignment = GVerticalAlignmentCenter; // This horizontal node is just a container to horizontally center the icon node const size_t max_horizontal_icon_container_nodes = 1; GTextNodeHorizontal *horizontal_icon_container_node = - graphics_text_node_create_horizontal(max_horizontal_icon_container_nodes); + graphics_text_node_create_horizontal(max_horizontal_icon_container_nodes); horizontal_icon_container_node->horizontal_alignment = GTextAlignmentCenter; graphics_text_node_container_add_child(&vertical_icon_container_node->container, &horizontal_icon_container_node->container.node); @@ -418,7 +414,8 @@ static NOINLINE GTextNode *prv_create_structured_glance_node( // The +1 is to force a rounding up. This way, 3 pixels extra will move closer to the screen // edge, instead of closer to the text. icon_node->node.offset.x -= (LAUNCHER_APP_GLANCE_STRUCTURED_ICON_HORIZONTAL_MARGIN - - structured_glance->icon_horizontal_margin + 1) / 2; + structured_glance->icon_horizontal_margin + 1) / + 2; graphics_text_node_container_add_child(&horizontal_icon_container_node->container, &icon_node->node); @@ -427,8 +424,7 @@ static NOINLINE GTextNode *prv_create_structured_glance_node( GTextNode *title_subtitle_node = prv_create_structured_glance_title_subtitle_node(structured_glance, glance_frame); - graphics_text_node_container_add_child(&horizontal_node->container, - title_subtitle_node); + graphics_text_node_container_add_child(&horizontal_node->container, title_subtitle_node); return &horizontal_node->container.node; } @@ -440,7 +436,7 @@ static void prv_draw_processed(KinoReel *reel, GContext *ctx, GPoint offset, return; } - GRect glance_frame = (GRect) { .origin = offset, .size = structured_glance->glance.size }; + GRect glance_frame = (GRect){.origin = offset, .size = structured_glance->glance.size}; #if PBL_ROUND && PBL_DISPLAY_HEIGHT >= 200 // For a circle: x = R - sqrt(R^2 - (y - R)^2), where R = display_size / 2 const int16_t radius = PBL_DISPLAY_HEIGHT / 2; @@ -471,8 +467,8 @@ static void prv_draw_processed(KinoReel *reel, GContext *ctx, GPoint offset, return; } - GTextNode *structured_glance_node = prv_create_structured_glance_node(structured_glance, - &glance_frame); + GTextNode *structured_glance_node = + prv_create_structured_glance_node(structured_glance, &glance_frame); if (structured_glance_node) { graphics_text_node_draw(structured_glance_node, ctx, &glance_frame, NULL, NULL); } @@ -514,13 +510,13 @@ static void prv_destructor(KinoReel *reel) { } static const KinoReelImpl s_launcher_app_glance_structured_reel_impl = { - .reel_type = KinoReelTypeCustom, - .get_size = launcher_app_glance_get_size_for_reel, - .draw_processed = prv_draw_processed, - .destructor = prv_destructor, - .get_duration = prv_get_duration, - .get_elapsed = prv_get_elapsed, - .set_elapsed = prv_set_elapsed, + .reel_type = KinoReelTypeCustom, + .get_size = launcher_app_glance_get_size_for_reel, + .draw_processed = prv_draw_processed, + .destructor = prv_destructor, + .get_duration = prv_get_duration, + .get_elapsed = prv_get_elapsed, + .set_elapsed = prv_set_elapsed, }; LauncherAppGlanceStructured *launcher_app_glance_structured_create( @@ -532,12 +528,11 @@ LauncherAppGlanceStructured *launcher_app_glance_structured_create( structured_glance->impl = impl; structured_glance->data = data; structured_glance->icon_max_size = LAUNCHER_APP_GLANCE_STRUCTURED_ICON_MAX_SIZE; - structured_glance->icon_horizontal_margin = - LAUNCHER_APP_GLANCE_STRUCTURED_ICON_HORIZONTAL_MARGIN; + structured_glance->icon_horizontal_margin = LAUNCHER_APP_GLANCE_STRUCTURED_ICON_HORIZONTAL_MARGIN; structured_glance->title_font = fonts_get_system_font(LAUNCHER_MENU_LAYER_TITLE_FONT); structured_glance->subtitle_font = fonts_get_system_font(LAUNCHER_MENU_LAYER_SUBTITLE_FONT); - KinoReel *glance_impl = kino_reel_custom_create(&s_launcher_app_glance_structured_reel_impl, - structured_glance); + KinoReel *glance_impl = + kino_reel_custom_create(&s_launcher_app_glance_structured_reel_impl, structured_glance); // Now that we've setup the structured glance's fields, initialize the LauncherAppGlance launcher_app_glance_init(&structured_glance->glance, uuid, glance_impl, should_consider_slices, base_handlers); @@ -564,8 +559,8 @@ void launcher_app_glance_structured_set_icon_max_size( structured_glance->icon_max_size = new_size; - const int width_diff = structured_glance->icon_max_size.w - - LAUNCHER_APP_GLANCE_STRUCTURED_ICON_MAX_SIZE.w; + const int width_diff = + structured_glance->icon_max_size.w - LAUNCHER_APP_GLANCE_STRUCTURED_ICON_MAX_SIZE.w; structured_glance->icon_horizontal_margin = LAUNCHER_APP_GLANCE_STRUCTURED_ICON_HORIZONTAL_MARGIN - width_diff; diff --git a/src/fw/apps/system/launcher/default/app_glance_structured.h b/src/fw/apps/system/launcher/default/app_glance_structured.h index 4f74a7bcb2..4acefad353 100644 --- a/src/fw/apps/system/launcher/default/app_glance_structured.h +++ b/src/fw/apps/system/launcher/default/app_glance_structured.h @@ -10,9 +10,8 @@ #include "pbl/util/uuid.h" #define LAUNCHER_APP_GLANCE_STRUCTURED_ICON_MAX_SIZE \ - (GSize(ATTRIBUTE_ICON_TINY_SIZE_PX, ATTRIBUTE_ICON_TINY_SIZE_PX)) -#define LAUNCHER_APP_GLANCE_STRUCTURED_ICON_LEGACY_MAX_SIZE \ - (GSize(28, 28)) + (GSize(ATTRIBUTE_ICON_TINY_SIZE_PX, ATTRIBUTE_ICON_TINY_SIZE_PX)) +#define LAUNCHER_APP_GLANCE_STRUCTURED_ICON_LEGACY_MAX_SIZE (GSize(28, 28)) //! Forward declaration typedef struct LauncherAppGlanceStructured LauncherAppGlanceStructured; @@ -20,26 +19,26 @@ typedef struct LauncherAppGlanceStructured LauncherAppGlanceStructured; //! Function used to get the title to display in the structured launcher app glance. //! @param structured_glance The structured glance for which to get the title //! @return The title to display in the structured glance; will be copied so can be short-lived -typedef const char *(*LauncherAppGlanceStructuredTitleGetter) - (LauncherAppGlanceStructured *structured_glance); +typedef const char *(*LauncherAppGlanceStructuredTitleGetter)( + LauncherAppGlanceStructured *structured_glance); //! Function used to create subtitle text nodes for the structured launcher app glance. //! @param structured_glance The structured glance for which to create a text node //! @return The text node the structured glance should use -typedef GTextNode *(*LauncherAppGlanceStructuredTextNodeConstructor) - (LauncherAppGlanceStructured *structured_glance); +typedef GTextNode *(*LauncherAppGlanceStructuredTextNodeConstructor)( + LauncherAppGlanceStructured *structured_glance); //! Function called when the structured launcher app glance is being destroyed. //! @param structured_glance The structured glance that is being destroyed //! @note This function should NOT free the structured glance; only deinit impl-specific things -typedef void (*LauncherAppGlanceStructuredDestructor) - (LauncherAppGlanceStructured *structured_glance); +typedef void (*LauncherAppGlanceStructuredDestructor)( + LauncherAppGlanceStructured *structured_glance); //! Function called to request the icon that should be drawn in the structured glance. //! @param structured_glance The structured glance requesting the icon to draw //! @return The icon to draw in the structured glance -typedef KinoReel *(*LauncherAppGlanceStructuredIconGetter) - (LauncherAppGlanceStructured *structured_glance); +typedef KinoReel *(*LauncherAppGlanceStructuredIconGetter)( + LauncherAppGlanceStructured *structured_glance); typedef struct LauncherAppGlanceStructuredImpl { //! Base handlers for the underlying LauncherAppGlance of the structured glance diff --git a/src/fw/apps/system/launcher/default/app_glance_watchfaces.c b/src/fw/apps/system/launcher/default/app_glance_watchfaces.c index ab87fb0bdc..84e7e584e4 100644 --- a/src/fw/apps/system/launcher/default/app_glance_watchfaces.c +++ b/src/fw/apps/system/launcher/default/app_glance_watchfaces.c @@ -32,8 +32,8 @@ static const char *prv_get_title(LauncherAppGlanceStructured *structured_glance) static void prv_watchfaces_glance_subtitle_dynamic_text_node_update( PBL_UNUSED GContext *ctx, PBL_UNUSED GTextNode *node, PBL_UNUSED const GRect *box, - PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, size_t buffer_size, - void *user_data) { + PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, + size_t buffer_size, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; LauncherAppGlanceWatchfaces *watchfaces_glance = launcher_app_glance_structured_get_data(structured_glance); @@ -69,10 +69,10 @@ static void prv_update_active_watchface_title(LauncherAppGlanceWatchfaces *watch } static const LauncherAppGlanceStructuredImpl s_watchfaces_structured_glance_impl = { - .get_icon = prv_get_icon, - .get_title = prv_get_title, - .create_subtitle_node = prv_create_subtitle_node, - .destructor = prv_destructor, + .get_icon = prv_get_icon, + .get_title = prv_get_title, + .create_subtitle_node = prv_create_subtitle_node, + .destructor = prv_destructor, }; LauncherAppGlance *launcher_app_glance_watchfaces_create(const AppMenuNode *node) { @@ -86,17 +86,16 @@ LauncherAppGlance *launcher_app_glance_watchfaces_create(const AppMenuNode *node watchfaces_glance->title[title_size - 1] = '\0'; // Create the icon for the Watchfaces app - watchfaces_glance->icon = kino_reel_create_with_resource_system(node->app_num, - node->icon_resource_id); + watchfaces_glance->icon = + kino_reel_create_with_resource_system(node->app_num, node->icon_resource_id); PBL_ASSERTN(watchfaces_glance->icon); // Update the active watchface title in the glance's subtitle prv_update_active_watchface_title(watchfaces_glance); const bool should_consider_slices = false; - LauncherAppGlanceStructured *structured_glance = - launcher_app_glance_structured_create(&node->uuid, &s_watchfaces_structured_glance_impl, - should_consider_slices, watchfaces_glance); + LauncherAppGlanceStructured *structured_glance = launcher_app_glance_structured_create( + &node->uuid, &s_watchfaces_structured_glance_impl, should_consider_slices, watchfaces_glance); PBL_ASSERTN(structured_glance); return &structured_glance->glance; diff --git a/src/fw/apps/system/launcher/default/app_glance_weather.c b/src/fw/apps/system/launcher/default/app_glance_weather.c index d6f25f6b8b..ddbef3c0e8 100644 --- a/src/fw/apps/system/launcher/default/app_glance_weather.c +++ b/src/fw/apps/system/launcher/default/app_glance_weather.c @@ -45,8 +45,8 @@ static const char *prv_get_title(LauncherAppGlanceStructured *structured_glance) static void prv_weather_glance_subtitle_dynamic_text_node_update( PBL_UNUSED GContext *ctx, PBL_UNUSED GTextNode *node, PBL_UNUSED const GRect *box, - PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, size_t buffer_size, - void *user_data) { + PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, + size_t buffer_size, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; LauncherAppGlanceWeather *weather_glance = launcher_app_glance_structured_get_data(structured_glance); @@ -73,9 +73,8 @@ static void prv_destructor(LauncherAppGlanceStructured *structured_glance) { static uint32_t prv_get_weather_icon_resource_id_for_type(WeatherType type) { AppResourceInfo res_info; - const bool lookup_success = - timeline_resources_get_id_system(weather_type_get_timeline_resource_id(type), - TimelineResourceSizeTiny, SYSTEM_APP, &res_info); + const bool lookup_success = timeline_resources_get_id_system( + weather_type_get_timeline_resource_id(type), TimelineResourceSizeTiny, SYSTEM_APP, &res_info); return lookup_success ? res_info.res_id : (uint32_t)RESOURCE_ID_INVALID; } @@ -88,8 +87,8 @@ static void prv_weather_event_handler(PBL_UNUSED PebbleEvent *event, void *conte WeatherLocationForecast *forecast = weather_service_create_default_forecast(); // Update the icon for the forecast's weather type - const WeatherType weather_type = NULL_SAFE_FIELD_ACCESS(forecast, current_weather_type, - WeatherType_Unknown); + const WeatherType weather_type = + NULL_SAFE_FIELD_ACCESS(forecast, current_weather_type, WeatherType_Unknown); const uint32_t new_weather_icon_resource_id = prv_get_weather_icon_resource_id_for_type(weather_type); if (weather_glance->icon_resource_id != new_weather_icon_resource_id) { @@ -102,8 +101,8 @@ static void prv_weather_event_handler(PBL_UNUSED PebbleEvent *event, void *conte const size_t weather_glance_title_size = sizeof(weather_glance->title); memset(weather_glance->title, 0, weather_glance_title_size); // Choose the title we should display based on whether or not we have a forecast - const char *title = NULL_SAFE_FIELD_ACCESS(forecast, location_name, - weather_glance->fallback_title); + const char *title = + NULL_SAFE_FIELD_ACCESS(forecast, location_name, weather_glance->fallback_title); // Subtract 1 from the size as a shortcut for null terminating the title since we zero it out // above strncpy(weather_glance->title, title, weather_glance_title_size - 1); @@ -125,8 +124,8 @@ static void prv_weather_event_handler(PBL_UNUSED PebbleEvent *event, void *conte /// Today's current temperature (e.g. "68°") const char *temp_only_formatter = i18n_get("%i°", weather_glance); const char *localized_phrase = i18n_get(forecast->current_weather_phrase, weather_glance); - const char *formatter_string = strlen(localized_phrase) ? temp_and_phrase_formatter : - temp_only_formatter; + const char *formatter_string = + strlen(localized_phrase) ? temp_and_phrase_formatter : temp_only_formatter; // It's safe to pass more arguments to snprintf() than might be used by formatter_string snprintf(weather_glance->subtitle, weather_glance_subtitle_size, formatter_string, forecast->current_temp, localized_phrase); @@ -142,10 +141,10 @@ static void prv_weather_event_handler(PBL_UNUSED PebbleEvent *event, void *conte } static const LauncherAppGlanceStructuredImpl s_weather_structured_glance_impl = { - .get_icon = prv_get_icon, - .get_title = prv_get_title, - .create_subtitle_node = prv_create_subtitle_node, - .destructor = prv_destructor, + .get_icon = prv_get_icon, + .get_title = prv_get_title, + .create_subtitle_node = prv_create_subtitle_node, + .destructor = prv_destructor, }; LauncherAppGlance *launcher_app_glance_weather_create(const AppMenuNode *node) { @@ -160,17 +159,16 @@ LauncherAppGlance *launcher_app_glance_weather_create(const AppMenuNode *node) { weather_glance->fallback_title[fallback_title_size - 1] = '\0'; const bool should_consider_slices = false; - LauncherAppGlanceStructured *structured_glance = - launcher_app_glance_structured_create(&node->uuid, &s_weather_structured_glance_impl, - should_consider_slices, weather_glance); + LauncherAppGlanceStructured *structured_glance = launcher_app_glance_structured_create( + &node->uuid, &s_weather_structured_glance_impl, should_consider_slices, weather_glance); PBL_ASSERTN(structured_glance); prv_weather_event_handler(NULL, structured_glance); - weather_glance->weather_event_info = (EventServiceInfo) { - .type = PEBBLE_WEATHER_EVENT, - .handler = prv_weather_event_handler, - .context = structured_glance, + weather_glance->weather_event_info = (EventServiceInfo){ + .type = PEBBLE_WEATHER_EVENT, + .handler = prv_weather_event_handler, + .context = structured_glance, }; event_service_client_subscribe(&weather_glance->weather_event_info); diff --git a/src/fw/apps/system/launcher/default/app_glance_workout.c b/src/fw/apps/system/launcher/default/app_glance_workout.c index 129f603e92..a71a89ccbd 100644 --- a/src/fw/apps/system/launcher/default/app_glance_workout.c +++ b/src/fw/apps/system/launcher/default/app_glance_workout.c @@ -42,8 +42,8 @@ static const char *prv_get_title(LauncherAppGlanceStructured *structured_glance) static void prv_workout_glance_subtitle_dynamic_text_node_update( PBL_UNUSED GContext *ctx, PBL_UNUSED GTextNode *node, PBL_UNUSED const GRect *box, - PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, size_t buffer_size, - void *user_data) { + PBL_UNUSED const GTextNodeDrawConfig *config, PBL_UNUSED bool render, char *buffer, + size_t buffer_size, void *user_data) { LauncherAppGlanceStructured *structured_glance = user_data; LauncherAppGlanceWorkout *workout_glance = launcher_app_glance_structured_get_data(structured_glance); @@ -159,7 +159,8 @@ static void prv_timer_callback(void *data) { // Set subtitle health_util_format_hours_minutes_seconds(workout_glance->subtitle, - sizeof(workout_glance->subtitle), workout_duration_s, true, workout_glance); + sizeof(workout_glance->subtitle), workout_duration_s, + true, workout_glance); i18n_free_all(workout_glance); @@ -168,10 +169,10 @@ static void prv_timer_callback(void *data) { } static const LauncherAppGlanceStructuredImpl s_workout_structured_glance_impl = { - .get_icon = prv_get_icon, - .get_title = prv_get_title, - .create_subtitle_node = prv_create_subtitle_node, - .destructor = prv_destructor, + .get_icon = prv_get_icon, + .get_title = prv_get_title, + .create_subtitle_node = prv_create_subtitle_node, + .destructor = prv_destructor, }; LauncherAppGlance *launcher_app_glance_workout_create(const AppMenuNode *node) { @@ -185,9 +186,8 @@ LauncherAppGlance *launcher_app_glance_workout_create(const AppMenuNode *node) { workout_glance->title[title_size - 1] = '\0'; const bool should_consider_slices = false; - LauncherAppGlanceStructured *structured_glance = - launcher_app_glance_structured_create(&node->uuid, &s_workout_structured_glance_impl, - should_consider_slices, workout_glance); + LauncherAppGlanceStructured *structured_glance = launcher_app_glance_structured_create( + &node->uuid, &s_workout_structured_glance_impl, should_consider_slices, workout_glance); PBL_ASSERTN(structured_glance); // Call timer callback and register it to repeat diff --git a/src/fw/apps/system/launcher/default/launcher.c b/src/fw/apps/system/launcher/default/launcher.c index 717c41c39e..9cad4452fb 100644 --- a/src/fw/apps/system/launcher/default/launcher.c +++ b/src/fw/apps/system/launcher/default/launcher.c @@ -81,11 +81,13 @@ static void prv_window_load(Window *window) { Layer *window_root_layer = window_get_root_layer(window); AppMenuDataSource *data_source = &data->app_menu_data_source; - app_menu_data_source_init(data_source, &(AppMenuDataSourceCallbacks) { - .changed = prv_data_changed, - .filter = prv_app_filter_callback, - .transform_index = prv_transform_index, - }, data); + app_menu_data_source_init(data_source, + &(AppMenuDataSourceCallbacks){ + .changed = prv_data_changed, + .filter = prv_app_filter_callback, + .transform_index = prv_transform_index, + }, + data); LauncherMenuLayer *launcher_menu_layer = &data->launcher_menu_layer; launcher_menu_layer_init(launcher_menu_layer, data_source); @@ -98,9 +100,9 @@ static void prv_window_load(Window *window) { &s_launcher_app_persisted_data.selection_state); } - app_focus_service_subscribe_handlers((AppFocusHandlers) { - .did_focus = prv_did_focus, - .will_focus = prv_will_focus, + app_focus_service_subscribe_handlers((AppFocusHandlers){ + .did_focus = prv_did_focus, + .will_focus = prv_will_focus, }); } @@ -113,11 +115,11 @@ static void prv_window_unload(Window *window) { &launcher_selection_vertical_range); // Save the current state of the launcher so we can know its draw state and restore it later - s_launcher_app_persisted_data = (LauncherAppPersistedData) { - .valid = true, - .leave_time = rtc_get_ticks(), - .draw_state.selection_vertical_range = launcher_selection_vertical_range, - .draw_state.selection_background_color = shell_prefs_get_theme_highlight_color(), + s_launcher_app_persisted_data = (LauncherAppPersistedData){ + .valid = true, + .leave_time = rtc_get_ticks(), + .draw_state.selection_vertical_range = launcher_selection_vertical_range, + .draw_state.selection_background_color = shell_prefs_get_theme_highlight_color(), }; launcher_menu_layer_get_selection_state(&data->launcher_menu_layer, &s_launcher_app_persisted_data.selection_state); @@ -137,10 +139,10 @@ static void prv_launcher_menu_window_push(void) { Window *window = &data->window; window_init(window, WINDOW_NAME("Launcher Menu")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); const bool animated = false; app_window_stack_push(window, animated); @@ -165,14 +167,14 @@ static void prv_main(void) { const PebbleProcessMd *launcher_menu_app_get_app_info(void) { static const PebbleProcessMdSystem s_launcher_menu_app_info = { - .common = { - .main_func = prv_main, - // UUID: dec0424c-0625-4878-b1f2-147e57e83688 - .uuid = {0xde, 0xc0, 0x42, 0x4c, 0x06, 0x25, 0x48, 0x78, - 0xb1, 0xf2, 0x14, 0x7e, 0x57, 0xe8, 0x36, 0x88}, - .visibility = ProcessVisibilityHidden - }, - .name = "Launcher", + .common = + {.main_func = prv_main, + // UUID: dec0424c-0625-4878-b1f2-147e57e83688 + .uuid = + {0xde, 0xc0, 0x42, 0x4c, 0x06, 0x25, 0x48, 0x78, 0xb1, 0xf2, 0x14, 0x7e, 0x57, 0xe8, + 0x36, 0x88}, + .visibility = ProcessVisibilityHidden}, + .name = "Launcher", }; return (const PebbleProcessMd *)&s_launcher_menu_app_info; } diff --git a/src/fw/apps/system/launcher/default/menu_layer.c b/src/fw/apps/system/launcher/default/menu_layer.c index 379ac61f4d..696ecbe756 100644 --- a/src/fw/apps/system/launcher/default/menu_layer.c +++ b/src/fw/apps/system/launcher/default/menu_layer.c @@ -22,10 +22,10 @@ static void prv_launch_app_cb(void *data) { const AppInstallId app_install_id_to_launch = (AppInstallId)data; - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = app_install_id_to_launch, - .common.reason = APP_LAUNCH_USER, - .common.button = BUTTON_ID_SELECT, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = app_install_id_to_launch, + .common.reason = APP_LAUNCH_USER, + .common.button = BUTTON_ID_SELECT, }); } @@ -83,7 +83,7 @@ static uint16_t prv_menu_layer_get_num_rows(PBL_UNUSED MenuLayer *menu_layer, return data_source ? app_menu_data_source_get_count(data_source) : (uint16_t)0; } -static void prv_menu_layer_draw_row(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, +static void prv_menu_layer_draw_row(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, void *context) { LauncherMenuLayer *launcher_menu_layer = context; AppMenuDataSource *data_source = launcher_menu_layer->data_source; @@ -100,11 +100,13 @@ static void prv_menu_layer_draw_row(GContext* ctx, const Layer *cell_layer, Menu // Include the animation offset for smooth animation during center-focused scroll GRect global_frame; layer_get_global_frame((Layer *)cell_layer, &global_frame); - const int16_t animation_offset = launcher_menu_layer->menu_layer.animation.cell_content_origin_offset_y; - const int16_t screen_center_y = global_frame.origin.y + animation_offset + (global_frame.size.h / 2); + const int16_t animation_offset = + launcher_menu_layer->menu_layer.animation.cell_content_origin_offset_y; + const int16_t screen_center_y = + global_frame.origin.y + animation_offset + (global_frame.size.h / 2); - launcher_app_glance_service_draw_glance_for_app_node(&launcher_menu_layer->glance_service, - ctx, cell_layer_bounds, is_highlighted, + launcher_app_glance_service_draw_glance_for_app_node(&launcher_menu_layer->glance_service, ctx, + cell_layer_bounds, is_highlighted, screen_center_y, node); // If we should launch an app after this render, push a callback to do that on the app task @@ -120,13 +122,14 @@ static void prv_menu_layer_draw_row(GContext* ctx, const Layer *cell_layer, Menu } static int16_t prv_menu_layer_get_cell_height(PBL_UNUSED MenuLayer *menu_layer, - PBL_UNUSED MenuIndex *cell_index, PBL_UNUSED void *context) { + PBL_UNUSED MenuIndex *cell_index, + PBL_UNUSED void *context) { #if PBL_RECT return LAUNCHER_MENU_LAYER_CELL_RECT_CELL_HEIGHT; #elif PBL_ROUND - return menu_layer_is_index_selected(menu_layer, cell_index) ? - LAUNCHER_MENU_LAYER_CELL_ROUND_FOCUSED_CELL_HEIGHT : - LAUNCHER_MENU_LAYER_CELL_ROUND_UNFOCUSED_CELL_HEIGHT; + return menu_layer_is_index_selected(menu_layer, cell_index) + ? LAUNCHER_MENU_LAYER_CELL_ROUND_FOCUSED_CELL_HEIGHT + : LAUNCHER_MENU_LAYER_CELL_ROUND_UNFOCUSED_CELL_HEIGHT; #else #error "Unknown display shape type" #endif @@ -145,7 +148,8 @@ static void prv_play_glance_for_row(LauncherMenuLayer *launcher_menu_layer, uint launcher_app_glance_service_play_glance_for_app_node(&launcher_menu_layer->glance_service, node); } -static void prv_menu_layer_selection_will_change(MenuLayer *PBL_UNUSED menu_layer, MenuIndex *new_index, +static void prv_menu_layer_selection_will_change(MenuLayer *PBL_UNUSED menu_layer, + MenuIndex *new_index, MenuIndex PBL_UNUSED old_index, void *context) { LauncherMenuLayer *launcher_menu_layer = context; prv_play_glance_for_row(launcher_menu_layer, new_index->row); @@ -187,10 +191,10 @@ void launcher_menu_layer_init(LauncherMenuLayer *launcher_menu_layer, GRect menu_layer_frame = frame; #if PBL_ROUND - const int top_bottom_inset = - (frame.size.h - LAUNCHER_MENU_LAYER_CELL_ROUND_FOCUSED_CELL_HEIGHT - - (2 * LAUNCHER_MENU_LAYER_NUM_UNFOCUSED_ROWS_PER_SIDE * - LAUNCHER_MENU_LAYER_CELL_ROUND_UNFOCUSED_CELL_HEIGHT)) / 2; + const int top_bottom_inset = (frame.size.h - LAUNCHER_MENU_LAYER_CELL_ROUND_FOCUSED_CELL_HEIGHT - + (2 * LAUNCHER_MENU_LAYER_NUM_UNFOCUSED_ROWS_PER_SIDE * + LAUNCHER_MENU_LAYER_CELL_ROUND_UNFOCUSED_CELL_HEIGHT)) / + 2; const GEdgeInsets menu_layer_frame_insets = GEdgeInsets(top_bottom_inset, 0); menu_layer_frame = grect_inset(menu_layer_frame, menu_layer_frame_insets); #endif @@ -198,27 +202,28 @@ void launcher_menu_layer_init(LauncherMenuLayer *launcher_menu_layer, MenuLayer *menu_layer = &launcher_menu_layer->menu_layer; menu_layer_init(menu_layer, &menu_layer_frame); GColor highlight_bg = shell_prefs_get_theme_highlight_color(); - menu_layer_set_highlight_colors(menu_layer, - highlight_bg, - gcolor_legible_over(highlight_bg)); + menu_layer_set_highlight_colors(menu_layer, highlight_bg, gcolor_legible_over(highlight_bg)); menu_layer_pad_bottom_enable(menu_layer, false); - menu_layer_set_callbacks(menu_layer, launcher_menu_layer, &(MenuLayerCallbacks) { - .get_num_rows = prv_menu_layer_get_num_rows, - .draw_row = prv_menu_layer_draw_row, - .select_click = prv_menu_layer_select, - .get_cell_height = prv_menu_layer_get_cell_height, - .selection_will_change = prv_menu_layer_selection_will_change, - }); + menu_layer_set_callbacks(menu_layer, launcher_menu_layer, + &(MenuLayerCallbacks){ + .get_num_rows = prv_menu_layer_get_num_rows, + .draw_row = prv_menu_layer_draw_row, + .select_click = prv_menu_layer_select, + .get_cell_height = prv_menu_layer_get_cell_height, + .selection_will_change = prv_menu_layer_selection_will_change, + }); menu_layer_set_scroll_wrap_around(menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); // Only setup the content indicator on round #if PBL_ROUND - const GSize arrow_layer_frame_size = GSize(frame.size.w, - LAUNCHER_MENU_LAYER_CONTENT_INDICATOR_LAYER_HEIGHT); - const GRect up_arrow_layer_frame = (GRect) { - .size = arrow_layer_frame_size, + const GSize arrow_layer_frame_size = + GSize(frame.size.w, LAUNCHER_MENU_LAYER_CONTENT_INDICATOR_LAYER_HEIGHT); + const GRect up_arrow_layer_frame = (GRect){ + .size = arrow_layer_frame_size, }; Layer *up_arrow_layer = &launcher_menu_layer->up_arrow_layer; layer_init(up_arrow_layer, &up_arrow_layer_frame); @@ -235,10 +240,10 @@ void launcher_menu_layer_init(LauncherMenuLayer *launcher_menu_layer, ContentIndicator *content_indicator = scroll_layer_get_content_indicator(&menu_layer->scroll_layer); - ContentIndicatorConfig content_indicator_config = (ContentIndicatorConfig) { - .layer = up_arrow_layer, - .colors.background = GColorWhite, - .colors.foreground = GColorDarkGray, + ContentIndicatorConfig content_indicator_config = (ContentIndicatorConfig){ + .layer = up_arrow_layer, + .colors.background = GColorWhite, + .colors.foreground = GColorDarkGray, }; content_indicator_configure_direction(content_indicator, ContentIndicatorDirectionUp, &content_indicator_config); @@ -254,11 +259,11 @@ void launcher_menu_layer_init(LauncherMenuLayer *launcher_menu_layer, launcher_app_glance_service_init(&launcher_menu_layer->glance_service, LAUNCHER_MENU_LAYER_GENERIC_APP_ICON); - const LauncherAppGlanceServiceHandlers glance_handlers = (LauncherAppGlanceServiceHandlers) { - .glance_changed = prv_glance_changed, + const LauncherAppGlanceServiceHandlers glance_handlers = (LauncherAppGlanceServiceHandlers){ + .glance_changed = prv_glance_changed, }; - launcher_app_glance_service_set_handlers(&launcher_menu_layer->glance_service, - &glance_handlers, launcher_menu_layer); + launcher_app_glance_service_set_handlers(&launcher_menu_layer->glance_service, &glance_handlers, + launcher_menu_layer); // Select the visually first item from the top const uint16_t first_index = 0; @@ -317,9 +322,9 @@ void launcher_menu_layer_get_selection_vertical_range(const LauncherMenuLayer *l GRect selection_global_rect; layer_get_global_frame(&launcher_menu_layer->menu_layer.inverter.layer, &selection_global_rect); - *vertical_range_out = (GRangeVertical) { - .origin_y = selection_global_rect.origin.y, - .size_h = selection_global_rect.size.h, + *vertical_range_out = (GRangeVertical){ + .origin_y = selection_global_rect.origin.y, + .size_h = selection_global_rect.size.h, }; } @@ -332,10 +337,10 @@ void launcher_menu_layer_get_selection_state(const LauncherMenuLayer *launcher_m const MenuLayer *menu_layer = &launcher_menu_layer->menu_layer; const ScrollLayer *scroll_layer = &menu_layer->scroll_layer; - *state_out = (LauncherMenuLayerSelectionState) { - .row_index = menu_layer_get_selected_index(menu_layer).row, - // This cast is required because this ScrollLayer function's argument isn't const - .scroll_offset_y = scroll_layer_get_content_offset((ScrollLayer *)scroll_layer).y, + *state_out = (LauncherMenuLayerSelectionState){ + .row_index = menu_layer_get_selected_index(menu_layer).row, + // This cast is required because this ScrollLayer function's argument isn't const + .scroll_offset_y = scroll_layer_get_content_offset((ScrollLayer *)scroll_layer).y, }; } diff --git a/src/fw/apps/system/launcher/default/menu_layer.h b/src/fw/apps/system/launcher/default/menu_layer.h index 06b58d7f03..12729c73dc 100644 --- a/src/fw/apps/system/launcher/default/menu_layer.h +++ b/src/fw/apps/system/launcher/default/menu_layer.h @@ -16,7 +16,6 @@ #define LAUNCHER_MENU_LAYER_SUBTITLE_FONT (FONT_KEY_GOTHIC_14) #endif - typedef struct LauncherMenuLayer { Layer container_layer; MenuLayer menu_layer; diff --git a/src/fw/apps/system/launcher/default/menu_layer_private.h b/src/fw/apps/system/launcher/default/menu_layer_private.h index 7751288dcf..6f9555d3a1 100644 --- a/src/fw/apps/system/launcher/default/menu_layer_private.h +++ b/src/fw/apps/system/launcher/default/menu_layer_private.h @@ -31,5 +31,5 @@ #define LAUNCHER_MENU_LAYER_NUM_VISIBLE_ROWS (3) #else #define LAUNCHER_MENU_LAYER_NUM_VISIBLE_ROWS \ - (DIVIDE_CEIL(DISP_ROWS, LAUNCHER_MENU_LAYER_CELL_RECT_CELL_HEIGHT)) + (DIVIDE_CEIL(DISP_ROWS, LAUNCHER_MENU_LAYER_CELL_RECT_CELL_HEIGHT)) #endif diff --git a/src/fw/apps/system/launcher/launcher.h b/src/fw/apps/system/launcher/launcher.h index 11804c6274..d4577049bf 100644 --- a/src/fw/apps/system/launcher/launcher.h +++ b/src/fw/apps/system/launcher/launcher.h @@ -9,4 +9,4 @@ #define RETURN_TIMEOUT_TICKS (5 * RTC_TICKS_HZ) -const PebbleProcessMd* launcher_menu_app_get_app_info(void); +const PebbleProcessMd *launcher_menu_app_get_app_info(void); diff --git a/src/fw/apps/system/music.c b/src/fw/apps/system/music.c index c59c923dd1..817a3587db 100644 --- a/src/fw/apps/system/music.c +++ b/src/fw/apps/system/music.c @@ -66,8 +66,7 @@ #endif // The art-mode title font; the round media layout sizes it up for the wide centre band. -#define TITLE_SCROLL_FONT_KEY \ - PBL_IF_RECT_ELSE(FONT_KEY_GOTHIC_24_BOLD, FONT_KEY_GOTHIC_28_BOLD) +#define TITLE_SCROLL_FONT_KEY PBL_IF_RECT_ELSE(FONT_KEY_GOTHIC_24_BOLD, FONT_KEY_GOTHIC_28_BOLD) enum ActionBarState { ActionBarStateSkip, @@ -100,80 +99,88 @@ typedef struct MusicAppSizeConfig { #define CONTENT_VERTICAL_OFFSET PBL_IF_RECT_ELSE(0, 5) static const MusicAppSizeConfig s_music_size_config_medium = { - .music_time_font_key = FONT_KEY_GOTHIC_14, - .no_music_font_key = FONT_KEY_GOTHIC_18_BOLD, - .horizontal_margin = PBL_IF_RECT_ELSE(12, 25), - - .artist_field = { - .origin_y = 31 + CONTENT_VERTICAL_OFFSET, - .size_h = 21, - }, - .title_field = { - .origin_y = 53 + CONTENT_VERTICAL_OFFSET, - .size_h = 44, - }, - .time_field = { - .origin_y = 106 + CONTENT_VERTICAL_OFFSET, - .size_h = 14, - }, - - .cassette_rect = {{0, -1 + CONTENT_VERTICAL_OFFSET}, {43, 28}}, - .cassette_animation_x = 60, - .cassette_animation_time = 1 * ANIMATION_FRAME_MS, - - .track_field = { - .origin_y = 120 + CONTENT_VERTICAL_OFFSET, - .size_h = 4, - }, - .track_corner_radius = 1, - - .no_music_img_pos = {PBL_IF_RECT_ELSE(29, 53), PBL_IF_RECT_ELSE(25, 26)}, - .no_music_text_field = { - .origin_y = PBL_IF_RECT_ELSE(107, 104), - .size_h = 58, - }, + .music_time_font_key = FONT_KEY_GOTHIC_14, + .no_music_font_key = FONT_KEY_GOTHIC_18_BOLD, + .horizontal_margin = PBL_IF_RECT_ELSE(12, 25), + + .artist_field = + { + .origin_y = 31 + CONTENT_VERTICAL_OFFSET, + .size_h = 21, + }, + .title_field = + { + .origin_y = 53 + CONTENT_VERTICAL_OFFSET, + .size_h = 44, + }, + .time_field = + { + .origin_y = 106 + CONTENT_VERTICAL_OFFSET, + .size_h = 14, + }, + + .cassette_rect = {{0, -1 + CONTENT_VERTICAL_OFFSET}, {43, 28}}, + .cassette_animation_x = 60, + .cassette_animation_time = 1 * ANIMATION_FRAME_MS, + + .track_field = + { + .origin_y = 120 + CONTENT_VERTICAL_OFFSET, + .size_h = 4, + }, + .track_corner_radius = 1, + + .no_music_img_pos = {PBL_IF_RECT_ELSE(29, 53), PBL_IF_RECT_ELSE(25, 26)}, + .no_music_text_field = { + .origin_y = PBL_IF_RECT_ELSE(107, 104), + .size_h = 58, + }, }; static const MusicAppSizeConfig s_music_size_config_large = { - .music_time_font_key = FONT_KEY_GOTHIC_18_BOLD, - .no_music_font_key = FONT_KEY_GOTHIC_28, - .horizontal_margin = PBL_IF_RECT_ELSE(10, 30), - - .artist_field = { - .origin_y = PBL_IF_RECT_ELSE(30, 48), - .size_h = 21, - }, - .title_field = { - .origin_y = PBL_IF_RECT_ELSE(60, 72), - .size_h = 80, - }, - .time_field = { - .origin_y = PBL_IF_RECT_ELSE(146, 158), - .size_h = 20, - }, - - .cassette_rect = {{0, -8}, {43, 28}}, - .cassette_animation_x = 140, - .cassette_animation_time = 3 * ANIMATION_FRAME_MS, - - .track_field = { - .origin_y = PBL_IF_RECT_ELSE(168, 182), - .size_h = 10, - }, - .track_corner_radius = 4, - - .no_music_img_pos = {PBL_IF_RECT_ELSE(57, 72), PBL_IF_RECT_ELSE(46, 58)}, - .no_music_text_field = { - .origin_y = PBL_IF_RECT_ELSE(131, 143), - .size_h = 58, - }, + .music_time_font_key = FONT_KEY_GOTHIC_18_BOLD, + .no_music_font_key = FONT_KEY_GOTHIC_28, + .horizontal_margin = PBL_IF_RECT_ELSE(10, 30), + + .artist_field = + { + .origin_y = PBL_IF_RECT_ELSE(30, 48), + .size_h = 21, + }, + .title_field = + { + .origin_y = PBL_IF_RECT_ELSE(60, 72), + .size_h = 80, + }, + .time_field = + { + .origin_y = PBL_IF_RECT_ELSE(146, 158), + .size_h = 20, + }, + + .cassette_rect = {{0, -8}, {43, 28}}, + .cassette_animation_x = 140, + .cassette_animation_time = 3 * ANIMATION_FRAME_MS, + + .track_field = + { + .origin_y = PBL_IF_RECT_ELSE(168, 182), + .size_h = 10, + }, + .track_corner_radius = 4, + + .no_music_img_pos = {PBL_IF_RECT_ELSE(57, 72), PBL_IF_RECT_ELSE(46, 58)}, + .no_music_text_field = { + .origin_y = PBL_IF_RECT_ELSE(131, 143), + .size_h = 58, + }, }; -static const MusicAppSizeConfig * const s_music_size_configs[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = &s_music_size_config_medium, - [PreferredContentSizeMedium] = &s_music_size_config_medium, - [PreferredContentSizeLarge] = &s_music_size_config_large, - [PreferredContentSizeExtraLarge] = &s_music_size_config_large, +static const MusicAppSizeConfig *const s_music_size_configs[NumPreferredContentSizes] = { + [PreferredContentSizeSmall] = &s_music_size_config_medium, + [PreferredContentSizeMedium] = &s_music_size_config_medium, + [PreferredContentSizeLarge] = &s_music_size_config_large, + [PreferredContentSizeExtraLarge] = &s_music_size_config_large, }; static const MusicAppSizeConfig *prv_config(void) { @@ -190,34 +197,35 @@ static int prv_text_layer_width(void) { static GRect prv_artist_rect(void) { const MusicAppSizeConfig *config = prv_config(); - return GRect(config->horizontal_margin, config->artist_field.origin_y, - prv_text_layer_width(), config->artist_field.size_h); + return GRect(config->horizontal_margin, config->artist_field.origin_y, prv_text_layer_width(), + config->artist_field.size_h); } static GRect prv_title_rect(void) { const MusicAppSizeConfig *config = prv_config(); - return GRect(config->horizontal_margin, config->title_field.origin_y, - prv_text_layer_width(), config->title_field.size_h); + return GRect(config->horizontal_margin, config->title_field.origin_y, prv_text_layer_width(), + config->title_field.size_h); } static GRect prv_time_rect(void) { const MusicAppSizeConfig *config = prv_config(); - return GRect(config->horizontal_margin, config->time_field.origin_y, - prv_content_width(), config->time_field.size_h); + return GRect(config->horizontal_margin, config->time_field.origin_y, prv_content_width(), + config->time_field.size_h); } static GRect prv_cassette_rect(void) { const MusicAppSizeConfig *config = prv_config(); - const int16_t cassette_x = config->horizontal_margin + + const int16_t cassette_x = + config->horizontal_margin + PBL_IF_RECT_ELSE(0, prv_content_width() - config->cassette_rect.size.w); - return GRect(cassette_x, config->cassette_rect.origin.y, - config->cassette_rect.size.w, config->cassette_rect.size.h); + return GRect(cassette_x, config->cassette_rect.origin.y, config->cassette_rect.size.w, + config->cassette_rect.size.h); } static GRect prv_track_rect(void) { const MusicAppSizeConfig *config = prv_config(); - return GRect(config->horizontal_margin, config->track_field.origin_y, - prv_content_width(), config->track_field.size_h); + return GRect(config->horizontal_margin, config->track_field.origin_y, prv_content_width(), + config->track_field.size_h); } static const ButtonId BUTTON_FORWARD = BUTTON_ID_DOWN; @@ -234,7 +242,6 @@ static const uint32_t VOLUME_REPEAT_INTERVAL_MS = 400; static const uint32_t ACTION_BAR_TIMEOUT_MS = 2000; static const uint32_t VOLUME_ICON_TIMEOUT_MS = 2000; - typedef struct { Window window; BitmapLayer bitmap_layer; @@ -255,7 +262,7 @@ typedef struct { StatusBarLayer status_layer; TextLayer position_text_layer; - char position_buffer[9]; // 9 will fit "00:00:00" + char position_buffer[9]; // 9 will fit "00:00:00" TextLayer length_text_layer; char length_buffer[9]; @@ -297,10 +304,10 @@ typedef struct { // One-way "digital sign" scroll for the title beside the tape (album-art mode). Runs for a couple // of cycles after a track change then rests at the start; only scrolls when the title overflows. AppTimer *title_marquee_timer; - int16_t title_marquee_offset; // px scrolled left (0..span) - int16_t title_marquee_span; // px of overflow to reveal; 0 => fits, no scroll + int16_t title_marquee_offset; // px scrolled left (0..span) + int16_t title_marquee_span; // px of overflow to reveal; 0 => fits, no scroll uint32_t title_marquee_elapsed_ms; // position within the scroll cycle - bool title_marquee_on; // art-mode title/artist layout applied (transition guard) + bool title_marquee_on; // art-mode title/artist layout applied (transition guard) // Stock TextLayer render, used for the artist/title layers off album art; over art we draw them // ourselves (outlined artist, scrolling title). LayerUpdateProc orig_text_update_proc; @@ -341,14 +348,12 @@ static void prv_set_action_bar_state(MusicAppData *data, enum ActionBarState sta static void prv_trigger_cassette_icon_switch(GBitmap *bitmap, bool animated); static void prv_update_cassette_icon(MusicAppData *data, bool animated); - // Add these two: static void prv_update_layout(MusicAppData *data); static void prv_set_pos_update_timer(MusicAppData *data, MusicPlayState playstate); static void prv_apply_art_appearance(MusicAppData *data); static void prv_maybe_request_album_art(void); - static void prv_do_haptic_feedback_vibe(MusicAppData *data) { vibe_score_do_vibe(data->score); } @@ -364,8 +369,8 @@ static void prv_show_volume_image(GBitmap *bitmap) { if (data->volume_icon_timer) { app_timer_reschedule(data->volume_icon_timer, VOLUME_ICON_TIMEOUT_MS); } else { - data->volume_icon_timer = app_timer_register(VOLUME_ICON_TIMEOUT_MS, - prv_handle_volume_icon_timer, data); + data->volume_icon_timer = + app_timer_register(VOLUME_ICON_TIMEOUT_MS, prv_handle_volume_icon_timer, data); } prv_trigger_cassette_icon_switch(bitmap, true); } @@ -381,7 +386,7 @@ static void prv_change_volume(bool volume_is_up) { music_command_send(volume_is_up ? MusicCommandVolumeUp : MusicCommandVolumeDown); } -static Animation* prv_create_layer_upwards_animation(Layer *layer, int16_t offset) { +static Animation *prv_create_layer_upwards_animation(Layer *layer, int16_t offset) { GPoint target = GPoint(0, -layer->bounds.size.h - offset); GPoint origin = GPoint(0, -offset); Animation *animation = property_animation_get_animation( @@ -391,22 +396,27 @@ static Animation* prv_create_layer_upwards_animation(Layer *layer, int16_t offse return animation; } -static Animation* prv_create_upwards_animation(MusicAppData *data) { +static Animation *prv_create_upwards_animation(MusicAppData *data) { return animation_spawn_create( prv_create_layer_upwards_animation(&data->artist_text_layer.layer, ARTIST_BOUNDS_OFFSET), prv_create_layer_upwards_animation(&data->title_text_layer.layer, TITLE_BOUNDS_OFFSET), prv_create_layer_upwards_animation(&data->position_text_layer.layer, TIME_BOUNDS_OFFSET), - prv_create_layer_upwards_animation(&data->length_text_layer.layer, TIME_BOUNDS_OFFSET), - NULL); + prv_create_layer_upwards_animation(&data->length_text_layer.layer, TIME_BOUNDS_OFFSET), NULL); } static const PropertyAnimationImplementation s_frame_layer_implementation = { - .base = { - .update = (AnimationUpdateImplementation) property_animation_update_grect, - }, + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_grect, + }, .accessors = { - .setter = { .grect = (const GRectSetter) layer_set_frame_by_value, }, - .getter = { .grect = (const GRectGetter) layer_get_frame_by_value, }, + .setter = + { + .grect = (const GRectSetter)layer_set_frame_by_value, + }, + .getter = { + .grect = (const GRectGetter)layer_get_frame_by_value, + }, }, }; @@ -426,8 +436,7 @@ static Animation *prv_create_bounceback_animation(MusicAppData *data) { prv_create_layer_bounceback_animation(&data->artist_text_layer.layer, prv_artist_rect()), prv_create_layer_bounceback_animation(&data->title_text_layer.layer, prv_title_rect()), prv_create_layer_bounceback_animation(&data->position_text_layer.layer, time_rect), - prv_create_layer_bounceback_animation(&data->length_text_layer.layer, time_rect), - NULL); + prv_create_layer_bounceback_animation(&data->length_text_layer.layer, time_rect), NULL); } static void prv_update_track_progress(MusicAppData *data); @@ -453,23 +462,23 @@ static Animation *prv_create_cassette_animation(MusicAppData *data) { const MusicAppSizeConfig *config = prv_config(); const GRect cassette_rect = prv_cassette_rect(); GPoint left_target = GPoint(-cassette_rect.size.w - cassette_rect.origin.x, 0); - Animation *cassette_left = property_animation_get_animation( - property_animation_create_bounds_origin(&data->cassette_container, &GPointZero, - &left_target)); - Animation *cassette_right = property_animation_get_animation( - property_animation_create_bounds_origin(&data->cassette_container, - &GPoint(config->cassette_animation_x, 0), &GPoint(-4, 0))); - Animation *cassette_bounceback = property_animation_get_animation( - property_animation_create_bounds_origin(&data->cassette_container, &GPoint(-4, 0), - &GPointZero)); + Animation *cassette_left = + property_animation_get_animation(property_animation_create_bounds_origin( + &data->cassette_container, &GPointZero, &left_target)); + Animation *cassette_right = + property_animation_get_animation(property_animation_create_bounds_origin( + &data->cassette_container, &GPoint(config->cassette_animation_x, 0), &GPoint(-4, 0))); + Animation *cassette_bounceback = + property_animation_get_animation(property_animation_create_bounds_origin( + &data->cassette_container, &GPoint(-4, 0), &GPointZero)); animation_set_duration(cassette_left, 4 * ANIMATION_FRAME_MS); animation_set_curve(cassette_left, AnimationCurveEaseIn); animation_set_duration(cassette_right, config->cassette_animation_time); animation_set_curve(cassette_left, AnimationCurveLinear); animation_set_duration(cassette_bounceback, 4 * ANIMATION_FRAME_MS); animation_set_curve(cassette_bounceback, AnimationCurveEaseOut); - Animation *sequence = animation_sequence_create(cassette_left, cassette_right, - cassette_bounceback, NULL); + Animation *sequence = + animation_sequence_create(cassette_left, cassette_right, cassette_bounceback, NULL); if (!prv_should_animate_cassette()) { animation_set_play_count(sequence, 0); } @@ -506,15 +515,19 @@ static void prv_trigger_track_change_animation(MusicAppData *data) { data->pause_track_pos_updates = true; Animation *scroll_up = prv_create_upwards_animation(data); Animation *bounceback = prv_create_bounceback_animation(data); - animation_set_handlers(scroll_up, (AnimationHandlers) { - .stopped = prv_flip_animated_text, - }, data); + animation_set_handlers(scroll_up, + (AnimationHandlers){ + .stopped = prv_flip_animated_text, + }, + data); Animation *complete; complete = animation_sequence_create(scroll_up, bounceback, NULL); - animation_set_handlers(complete, (AnimationHandlers) { - .stopped = prv_transition_stopped, - }, data); + animation_set_handlers(complete, + (AnimationHandlers){ + .stopped = prv_transition_stopped, + }, + data); data->transition = complete; animation_schedule(complete); } @@ -542,24 +555,25 @@ static void prv_trigger_cassette_icon_switch(GBitmap *new_bitmap, bool animated) } GRect cassette_rect = prv_cassette_rect(); - Animation *disappear_animation = property_animation_get_animation( - property_animation_create_bounds_origin(&data->cassette_layer.layer, &GPointZero, - &GPoint(0, -cassette_rect.size.h))); + Animation *disappear_animation = + property_animation_get_animation(property_animation_create_bounds_origin( + &data->cassette_layer.layer, &GPointZero, &GPoint(0, -cassette_rect.size.h))); animation_set_duration(disappear_animation, 3 * ANIMATION_FRAME_MS); animation_set_curve(disappear_animation, AnimationCurveEaseIn); GRect origin = cassette_rect; origin.origin.y -= BOUNCEBACK_OFFSET; - Animation *bounceback_animation = property_animation_get_animation( - property_animation_create(&s_frame_layer_implementation, &data->cassette_layer.layer, - &origin, &cassette_rect)); + Animation *bounceback_animation = property_animation_get_animation(property_animation_create( + &s_frame_layer_implementation, &data->cassette_layer.layer, &origin, &cassette_rect)); animation_set_duration(bounceback_animation, 4 * ANIMATION_FRAME_MS); animation_set_curve(bounceback_animation, AnimationCurveEaseOut); - animation_set_handlers(disappear_animation, (AnimationHandlers) { - .stopped = prv_update_icon, - }, new_bitmap); + animation_set_handlers(disappear_animation, + (AnimationHandlers){ + .stopped = prv_update_icon, + }, + new_bitmap); Animation *sequence = animation_sequence_create(disappear_animation, bounceback_animation, NULL); @@ -600,8 +614,7 @@ static void prv_update_cassette_icon(MusicAppData *data, bool animated) { } static void prv_update_ui_state_skipping(MusicAppData *data, bool animated) { - action_bar_layer_set_click_config_provider(&data->action_bar, - prv_skipping_click_config_provider); + action_bar_layer_set_click_config_provider(&data->action_bar, prv_skipping_click_config_provider); const bool seeks = music_skip_seeks_within_track(); action_bar_layer_set_icon_animated(&data->action_bar, BUTTON_FORWARD, seeks ? &data->icon_fast_forward : &data->icon_skip_forward, @@ -624,8 +637,7 @@ static void prv_update_ui_state_skipping(MusicAppData *data, bool animated) { static void prv_update_ui_state_volume(MusicAppData *data, bool animated) { if (data->action_bar_state == ActionBarStateVolume) { - action_bar_layer_set_click_config_provider(&data->action_bar, - prv_volume_click_config_provider); + action_bar_layer_set_click_config_provider(&data->action_bar, prv_volume_click_config_provider); } action_bar_layer_set_icon_animated(&data->action_bar, BUTTON_ID_UP, &data->icon_volume_up, animated); @@ -633,9 +645,15 @@ static void prv_update_ui_state_volume(MusicAppData *data, bool animated) { animated); GBitmap const *select_bitmap; switch (music_get_playback_state()) { - case MusicPlayStatePlaying: select_bitmap = &data->icon_pause; break; - case MusicPlayStatePaused: select_bitmap = &data->icon_play; break; - default: select_bitmap = &data->icon_play_pause; break; + case MusicPlayStatePlaying: + select_bitmap = &data->icon_pause; + break; + case MusicPlayStatePaused: + select_bitmap = &data->icon_play; + break; + default: + select_bitmap = &data->icon_play_pause; + break; } action_bar_layer_set_icon_animated(&data->action_bar, BUTTON_ID_SELECT, select_bitmap, animated); } @@ -700,8 +718,8 @@ static void prv_ellipsis_click_handler(ClickRecognizerRef recognizer, void *cont } MusicAppData *data = context; - data->action_bar_revert_timer = app_timer_register(ACTION_BAR_TIMEOUT_MS, prv_action_bar_revert, - data); + data->action_bar_revert_timer = + app_timer_register(ACTION_BAR_TIMEOUT_MS, prv_action_bar_revert, data); prv_set_action_bar_state(data, ActionBarStateVolume); } @@ -719,8 +737,8 @@ static void prv_handle_volume_repeat(void *context) { if (!data->volume_repeat_timer) { return; } - data->volume_repeat_timer = app_timer_register(VOLUME_REPEAT_INTERVAL_MS, - prv_handle_volume_repeat, data); + data->volume_repeat_timer = + app_timer_register(VOLUME_REPEAT_INTERVAL_MS, prv_handle_volume_repeat, data); prv_change_volume(data->volume_is_up); prv_do_haptic_feedback_vibe(context); } @@ -731,8 +749,8 @@ static void prv_volume_long_click_start_handler(ClickRecognizerRef recognizer, v prv_set_action_bar_state(context, ActionBarStateLongPress); MusicAppData *data = context; data->volume_is_up = volume_is_up; - data->volume_repeat_timer = app_timer_register(VOLUME_REPEAT_INTERVAL_MS, - prv_handle_volume_repeat, data); + data->volume_repeat_timer = + app_timer_register(VOLUME_REPEAT_INTERVAL_MS, prv_handle_volume_repeat, data); prv_do_haptic_feedback_vibe(data); } @@ -787,7 +805,8 @@ static void prv_volume_click_config_provider(void *context) { } static void prv_update_layout(MusicAppData *data) { - const bool show_progress_bar = shell_prefs_get_music_show_progress_bar() || data->temporarily_show_progress; + const bool show_progress_bar = + shell_prefs_get_music_show_progress_bar() || data->temporarily_show_progress; bool hide_layer = !show_progress_bar || !music_is_progress_reporting_supported(); #if MUSIC_ROUND_MEDIA_LAYOUT // The unified round layout draws its own bezel arc and times on the backdrop; the stock bar and @@ -820,30 +839,26 @@ static MusicNoMusicWindow *prv_create_no_music_window(void) { MusicNoMusicWindow *window = app_malloc_check(sizeof(MusicNoMusicWindow)); window_init(&window->window, WINDOW_NAME("NoMusicWindow")); window_set_background_color(&window->window, PBL_IF_COLOR_ELSE(GColorLightGray, GColorWhite)); - window_set_window_handlers(&window->window, &(WindowHandlers) { - .unload = prv_unload_no_music_window - }); + window_set_window_handlers(&window->window, + &(WindowHandlers){.unload = prv_unload_no_music_window}); const MusicAppSizeConfig *config = prv_config(); gbitmap_init_with_resource(&window->bitmap, RESOURCE_ID_MUSIC_IMAGE_NO_MUSIC); const GSize NO_MUSIC_IMAGE_SIZE = window->bitmap.bounds.size; - const GRect NO_MUSIC_IMAGE_RECT = GRect(config->no_music_img_pos.x, - config->no_music_img_pos.y, + const GRect NO_MUSIC_IMAGE_RECT = GRect(config->no_music_img_pos.x, config->no_music_img_pos.y, NO_MUSIC_IMAGE_SIZE.w, NO_MUSIC_IMAGE_SIZE.h); bitmap_layer_init(&window->bitmap_layer, &NO_MUSIC_IMAGE_RECT); bitmap_layer_set_bitmap(&window->bitmap_layer, &window->bitmap); bitmap_layer_set_compositing_mode(&window->bitmap_layer, GCompOpSet); - const GRect NO_MUSIC_TEXT_RECT = GRect(0, config->no_music_text_field.origin_y, - DISP_COLS, config->no_music_text_field.size_h); + const GRect NO_MUSIC_TEXT_RECT = + GRect(0, config->no_music_text_field.origin_y, DISP_COLS, config->no_music_text_field.size_h); - text_layer_init_with_parameters(&window->text_layer, - &NO_MUSIC_TEXT_RECT, - i18n_get("START PLAYBACK\nON YOUR PHONE", window), - fonts_get_system_font(config->no_music_font_key), - GColorBlack, GColorClear, GTextAlignmentCenter, - GTextOverflowModeTrailingEllipsis); + text_layer_init_with_parameters( + &window->text_layer, &NO_MUSIC_TEXT_RECT, i18n_get("START PLAYBACK\nON YOUR PHONE", window), + fonts_get_system_font(config->no_music_font_key), GColorBlack, GColorClear, + GTextAlignmentCenter, GTextOverflowModeTrailingEllipsis); layer_add_child(&window->window.layer, &window->bitmap_layer.layer); layer_add_child(&window->window.layer, &window->text_layer.layer); window_set_click_config_provider(&window->window, prv_no_music_window_click_config); @@ -889,8 +904,7 @@ static void prv_update_now_playing(MusicAppData *data) { // The slide animation bounces the artist/title layers back to their stock positions, which // fights the media layout, so there just swap the text. Also skip it when there's nothing // to animate from. - if (prv_use_media_layout(data) || - (data->artist_buffer[0] == 0 && data->title_buffer[0] == 0)) { + if (prv_use_media_layout(data) || (data->artist_buffer[0] == 0 && data->title_buffer[0] == 0)) { strncpy(data->artist_buffer, artist_buffer, MUSIC_BUFFER_LENGTH); strncpy(data->title_buffer, title_buffer, MUSIC_BUFFER_LENGTH); // It is sufficient to mark one layer as dirty. @@ -916,9 +930,9 @@ static void prv_copy_time_period(char *buffer, size_t n, uint32_t period_s) { uint32_t seconds = period_s % SECONDS_PER_MINUTE; #pragma GCC diagnostic ignored "-Wformat-truncation" if (hours > 0) { - snprintf(buffer, n, "%"PRIu32":%02"PRIu32":%02"PRIu32, hours, minutes, seconds); + snprintf(buffer, n, "%" PRIu32 ":%02" PRIu32 ":%02" PRIu32, hours, minutes, seconds); } else { - snprintf(buffer, n, "%"PRIu32":%02"PRIu32, minutes, seconds); + snprintf(buffer, n, "%" PRIu32 ":%02" PRIu32, minutes, seconds); } } @@ -927,7 +941,7 @@ static void prv_update_track_progress(MusicAppData *data) { return; } - if (!data->temporarily_show_progress && !shell_prefs_get_music_show_progress_bar()){ + if (!data->temporarily_show_progress && !shell_prefs_get_music_show_progress_bar()) { return; } @@ -962,8 +976,9 @@ static void prv_handle_tick_time(struct tm *time, TimeUnits units_changed) { } } -static void prv_set_pos_update_timer(MusicAppData* data, MusicPlayState playstate) { - if (!music_is_progress_reporting_supported() || (!shell_prefs_get_music_show_progress_bar() && !data->temporarily_show_progress)) { +static void prv_set_pos_update_timer(MusicAppData *data, MusicPlayState playstate) { + if (!music_is_progress_reporting_supported() || + (!shell_prefs_get_music_show_progress_bar() && !data->temporarily_show_progress)) { tick_timer_service_unsubscribe(); return; } @@ -978,13 +993,12 @@ static void prv_set_pos_update_timer(MusicAppData* data, MusicPlayState playstat } } -static void prv_configure_music_text_layer( - TextLayer *text_layer, char* text_buffer, const GRect *rect, int16_t y_offset, - GTextAlignment align, GFont font) { - text_layer_init_with_parameters(text_layer, rect, text_buffer, font, - GColorBlack, GColorClear, align, GTextOverflowModeFill); - layer_set_bounds(&text_layer->layer, &GRect(0, -y_offset, - rect->size.w, rect->size.h + y_offset)); +static void prv_configure_music_text_layer(TextLayer *text_layer, char *text_buffer, + const GRect *rect, int16_t y_offset, + GTextAlignment align, GFont font) { + text_layer_init_with_parameters(text_layer, rect, text_buffer, font, GColorBlack, GColorClear, + align, GTextOverflowModeFill); + layer_set_bounds(&text_layer->layer, &GRect(0, -y_offset, rect->size.w, rect->size.h + y_offset)); } // The album-art square fills the width from the top down to just above the times row. On rect @@ -1023,8 +1037,7 @@ static GRect prv_art_title_rect(void) { const int16_t y = ART_ROUND_TITLE_Y; const int16_t radius = DISP_COLS / 2; const int32_t dy = (y + h - 2) - radius; - const int16_t half_chord = - integer_sqrt((int64_t)radius * radius - (int64_t)dy * dy); + const int16_t half_chord = integer_sqrt((int64_t)radius * radius - (int64_t)dy * dy); const int16_t x = MAX(radius - half_chord + 4, ART_ROUND_TEXT_MARGIN); const int16_t right = DISP_COLS - x; #endif @@ -1039,8 +1052,8 @@ static GRect prv_art_artist_rect(void) { const int16_t art_bottom = prv_config()->time_field.origin_y - 2; return GRect(0, art_bottom - 26, content_w, 26); #else - return GRect(ART_ROUND_TEXT_MARGIN, ART_ROUND_ARTIST_Y, - DISP_COLS - 2 * ART_ROUND_TEXT_MARGIN, 24); + return GRect(ART_ROUND_TEXT_MARGIN, ART_ROUND_ARTIST_Y, DISP_COLS - 2 * ART_ROUND_TEXT_MARGIN, + 24); #endif } @@ -1048,7 +1061,7 @@ static GRect prv_art_artist_rect(void) { static void prv_draw_outlined_text(GContext *ctx, const char *text, GFont font, GRect box, GTextOverflowMode overflow, GTextAlignment align) { static const GPoint k_off[] = { - {-1, -1}, {0, -1}, {1, -1}, {-1, 0}, {1, 0}, {-1, 1}, {0, 1}, {1, 1}, + {-1, -1}, {0, -1}, {1, -1}, {-1, 0}, {1, 0}, {-1, 1}, {0, 1}, {1, 1}, }; graphics_context_set_text_color(ctx, GColorBlack); for (unsigned i = 0; i < sizeof(k_off) / sizeof(k_off[0]); ++i) { @@ -1151,7 +1164,8 @@ static void prv_draw_round_progress(GContext *ctx, const GRect *bounds) { prv_fill_bezel_arc(ctx, bounds, ART_ROUND_ARC_START_DEG, ART_ROUND_ARC_END_DEG); if (data->track_length > 0) { const int32_t sweep = ART_ROUND_ARC_END_DEG - ART_ROUND_ARC_START_DEG; - const int32_t end = ART_ROUND_ARC_START_DEG + + const int32_t end = + ART_ROUND_ARC_START_DEG + MIN((int32_t)(((int64_t)sweep * data->track_pos) / data->track_length), sweep); graphics_context_set_fill_color(ctx, GColorRed); prv_fill_bezel_arc(ctx, bounds, ART_ROUND_ARC_START_DEG, end); @@ -1159,15 +1173,14 @@ static void prv_draw_round_progress(GContext *ctx, const GRect *bounds) { if (data->position_buffer[0] && data->length_buffer[0]) { char times[24]; snprintf(times, sizeof(times), "%s / %s", data->position_buffer, data->length_buffer); - const GRect box = GRect(ART_ROUND_TEXT_MARGIN, ART_ROUND_TIMES_Y, - DISP_COLS - 2 * ART_ROUND_TEXT_MARGIN, 22); + const GRect box = + GRect(ART_ROUND_TEXT_MARGIN, ART_ROUND_TIMES_Y, DISP_COLS - 2 * ART_ROUND_TEXT_MARGIN, 22); GFont font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); if (data->has_album_art) { prv_draw_outlined_text(ctx, times, font, box, GTextOverflowModeFill, GTextAlignmentCenter); } else { graphics_context_set_text_color(ctx, GColorBlack); - graphics_draw_text(ctx, times, font, box, GTextOverflowModeFill, GTextAlignmentCenter, - NULL); + graphics_draw_text(ctx, times, font, box, GTextOverflowModeFill, GTextAlignmentCenter, NULL); } } } @@ -1198,8 +1211,8 @@ static void prv_album_art_update_proc(Layer *layer, GContext *ctx) { static void prv_maybe_request_album_art(void) { #if MUSIC_ALBUM_ART_SUPPORTED if (!shell_prefs_get_music_show_album_art() || - !imaging_is_type_supported(ImagingImageTypeAlbumArt) || - !music_has_now_playing() || music_album_art_is_current()) { + !imaging_is_type_supported(ImagingImageTypeAlbumArt) || !music_has_now_playing() || + music_album_art_is_current()) { return; } // The watch picks the size (its art-square width) and asks for the current track by name, so the @@ -1208,17 +1221,17 @@ static void prv_maybe_request_album_art(void) { char title[MUSIC_BUFFER_LENGTH]; char artist[MUSIC_BUFFER_LENGTH]; music_get_now_playing(title, artist, NULL); - imaging_request_album_art(music_get_now_playing_generation(), ImagingFormat4BitPalette, - side, side, title, artist); + imaging_request_album_art(music_get_now_playing_generation(), ImagingFormat4BitPalette, side, + side, title, artist); #endif } // Launcher-glance-style title scroll (same motion as the app-glance subtitles, whose pacing was // design-tuned): pause at the start, scroll just far enough to reveal the end at a moderate pace, // pause there, rewind rapidly. Runs a few cycles per track, then rests showing the start. -#define TITLE_SCROLL_TICK_MS 33 // frame interval while the text is moving -#define TITLE_SCROLL_MS_PER_PX 20 // forward pace -#define TITLE_SCROLL_REWIND_MS_PER_PX 2 // rewind pace +#define TITLE_SCROLL_TICK_MS 33 // frame interval while the text is moving +#define TITLE_SCROLL_MS_PER_PX 20 // forward pace +#define TITLE_SCROLL_REWIND_MS_PER_PX 2 // rewind pace #define TITLE_SCROLL_PAUSE_START_MS 600 #define TITLE_SCROLL_PAUSE_END_MS 750 #define TITLE_SCROLL_CYCLES 3 @@ -1323,9 +1336,8 @@ static void prv_title_restore(MusicAppData *data) { text_layer_set_text_alignment(&data->title_text_layer, PBL_IF_RECT_ELSE(GTextAlignmentLeft, GTextAlignmentRight)); layer_set_frame(&data->title_text_layer.layer, &title_rect); - layer_set_bounds(&data->title_text_layer.layer, - &GRect(0, -TITLE_BOUNDS_OFFSET, title_rect.size.w, - title_rect.size.h + TITLE_BOUNDS_OFFSET)); + layer_set_bounds(&data->title_text_layer.layer, &GRect(0, -TITLE_BOUNDS_OFFSET, title_rect.size.w, + title_rect.size.h + TITLE_BOUNDS_OFFSET)); } // Place the artist as a centred, outlined single line over the bottom of the cover. @@ -1387,10 +1399,9 @@ static void prv_apply_art_appearance(MusicAppData *data) { // The state icons (tape / pause / volume) differ in size. In the media layout, centre them in // the tape frame so a state swap keeps the same visual centre; the stock layout keeps its // original corner pinning. - bitmap_layer_set_alignment(&data->cassette_layer, - prv_use_media_layout(data) - ? GAlignCenter - : PBL_IF_RECT_ELSE(GAlignTopLeft, GAlignTopRight)); + bitmap_layer_set_alignment( + &data->cassette_layer, + prv_use_media_layout(data) ? GAlignCenter : PBL_IF_RECT_ELSE(GAlignTopLeft, GAlignTopRight)); #if MUSIC_ROUND_MEDIA_LAYOUT // The bezel arc + drawn times replace the stock bar and time labels permanently on round. prv_update_layout(data); @@ -1419,8 +1430,8 @@ static void prv_init_ui(Window *window) { const GSize WINDOW_SIZE = window->layer.bounds.size; - const GTextAlignment ARTIST_TITLE_TEXT_ALIGNMENT = PBL_IF_RECT_ELSE(GTextAlignmentLeft, - GTextAlignmentRight); + const GTextAlignment ARTIST_TITLE_TEXT_ALIGNMENT = + PBL_IF_RECT_ELSE(GTextAlignmentLeft, GTextAlignmentRight); const MusicAppSizeConfig *config = prv_config(); @@ -1437,9 +1448,8 @@ static void prv_init_ui(Window *window) { layer_set_hidden(&data->album_art_layer, true); layer_add_child(&data->window.layer, &data->album_art_layer); - prv_configure_music_text_layer(&data->artist_text_layer, data->artist_buffer, - &artist_rect, ARTIST_BOUNDS_OFFSET, - ARTIST_TITLE_TEXT_ALIGNMENT, + prv_configure_music_text_layer(&data->artist_text_layer, data->artist_buffer, &artist_rect, + ARTIST_BOUNDS_OFFSET, ARTIST_TITLE_TEXT_ALIGNMENT, system_theme_get_font_for_default_size(TextStyleFont_Header)); layer_add_child(&data->window.layer, &data->artist_text_layer.layer); @@ -1488,8 +1498,8 @@ static void prv_init_ui(Window *window) { layer_set_frame(&data->title_text_layer.layer, &round_title_rect); text_layer_set_font(&data->title_text_layer, fonts_get_system_font(TITLE_SCROLL_FONT_KEY)); text_layer_set_text_alignment(&data->title_text_layer, GTextAlignmentCenter); - GRect tape_frame = GRect(0, WINDOW_SIZE.h - horizontal_margin - 24, - WINDOW_SIZE.w - ACTION_BAR_WIDTH, 24); + GRect tape_frame = + GRect(0, WINDOW_SIZE.h - horizontal_margin - 24, WINDOW_SIZE.w - ACTION_BAR_WIDTH, 24); tape_frame.origin.x += DISP_COLS / 2 - (cassette_rect.origin.x + cassette_rect.size.w / 2); tape_frame.origin.y = ART_ROUND_ICON_CENTER_Y - cassette_rect.origin.y - cassette_rect.size.h / 2; layer_set_frame(&data->cassette_container, &tape_frame); @@ -1513,8 +1523,8 @@ static void prv_init_ui(Window *window) { StatusBarLayer *status_layer = &data->status_layer; status_bar_layer_init(status_layer); GRect status_layer_frame = status_layer->layer.frame; - const int16_t STATUS_BAR_LAYER_WIDTH = PBL_IF_RECT_ELSE(WINDOW_SIZE.w - ACTION_BAR_WIDTH, - WINDOW_SIZE.w); + const int16_t STATUS_BAR_LAYER_WIDTH = + PBL_IF_RECT_ELSE(WINDOW_SIZE.w - ACTION_BAR_WIDTH, WINDOW_SIZE.w); status_layer_frame.size.w = STATUS_BAR_LAYER_WIDTH; layer_set_frame(&status_layer->layer, &status_layer_frame); status_bar_layer_set_colors(&data->status_layer, GColorClear, GColorBlack); @@ -1534,7 +1544,7 @@ static void prv_push_window(MusicAppData *data) { Window *window = &data->window; window_init(window, WINDOW_NAME("Music")); window_set_user_data(window, data); - window_set_status_bar_icon(window, (GBitmap*)&s_status_icon_music_bitmap); + window_set_status_bar_icon(window, (GBitmap *)&s_status_icon_music_bitmap); // Play/pause is too easy to hit by accident: only taps on the action-bar icons count here, so a // stray touch on the album art / track info does not toggle playback. Swipe nav still works. window_set_touch_tap_requires_action_bar(window, true); @@ -1581,7 +1591,8 @@ static void prv_music_event_handler(PebbleEvent *event, void *context) { prv_update_track_progress(data); prv_update_layout(data); return; - default: return; + default: + return; } } @@ -1594,13 +1605,13 @@ static void prv_handle_init(void) { app_state_set_user_data(data); data->event_info = (EventServiceInfo){ - .type = PEBBLE_MEDIA_EVENT, - .handler = prv_music_event_handler, + .type = PEBBLE_MEDIA_EVENT, + .handler = prv_music_event_handler, }; data->pref_change_event_info = (EventServiceInfo){ - .type = PEBBLE_PREF_CHANGE_EVENT, - .handler = prv_pref_change_handler, + .type = PEBBLE_PREF_CHANGE_EVENT, + .handler = prv_pref_change_handler, }; event_service_client_subscribe(&data->pref_change_event_info); @@ -1662,18 +1673,19 @@ static void prv_main(void) { prv_handle_deinit(); } -const PebbleProcessMd* music_app_get_info(void) { +const PebbleProcessMd *music_app_get_info(void) { // [INTL] The app name should come from a standard app resource, so it's localizable. static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = &prv_main, - // UUID: 1f03293d-47af-4f28-b960-f2b02a6dd757 - .uuid = {0x1f, 0x03, 0x29, 0x3d, 0x47, 0xaf, 0x4f, 0x28, - 0xb9, 0x60, 0xf2, 0xb0, 0x2a, 0x6d, 0xd7, 0x57}, - }, - .name = i18n_noop("Music"), - .icon_resource_id = RESOURCE_ID_AUDIO_CASSETTE_TINY, + .common = + { + .main_func = &prv_main, + // UUID: 1f03293d-47af-4f28-b960-f2b02a6dd757 + .uuid = + {0x1f, 0x03, 0x29, 0x3d, 0x47, 0xaf, 0x4f, 0x28, 0xb9, 0x60, 0xf2, 0xb0, 0x2a, + 0x6d, 0xd7, 0x57}, + }, + .name = i18n_noop("Music"), + .icon_resource_id = RESOURCE_ID_AUDIO_CASSETTE_TINY, }; - return (const PebbleProcessMd*) &s_app_info; + return (const PebbleProcessMd *)&s_app_info; } - diff --git a/src/fw/apps/system/music.h b/src/fw/apps/system/music.h index fdf54f17e6..fb166a0eb6 100644 --- a/src/fw/apps/system/music.h +++ b/src/fw/apps/system/music.h @@ -5,5 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* music_app_get_info(); - +const PebbleProcessMd *music_app_get_info(); diff --git a/src/fw/apps/system/notifications.c b/src/fw/apps/system/notifications.c index d0ffd79d87..0effb8c5f8 100644 --- a/src/fw/apps/system/notifications.c +++ b/src/fw/apps/system/notifications.c @@ -73,41 +73,37 @@ static bool prv_notification_list_filter_cb(ListNode *node, void *data) { } static NotificationNode *prv_find_notification(NotificationNode *list, Uuid *id) { - return (NotificationNode *)list_find((ListNode *)list, - prv_notification_list_filter_cb, - id); + return (NotificationNode *)list_find((ListNode *)list, prv_notification_list_filter_cb, id); } static LoadedNotificationNode *prv_find_loaded_notification(LoadedNotificationNode *list, Uuid *id) { return (LoadedNotificationNode *)list_find((ListNode *)list, - prv_loaded_notification_list_filter_cb, - id); + prv_loaded_notification_list_filter_cb, id); } static NotificationNode *prv_notification_list_add_notification_by_id( NotificationNode **notification_list, Uuid *id) { NotificationNode *new_node = app_malloc_check(sizeof(NotificationNode)); - list_init((ListNode*) new_node); + list_init((ListNode *)new_node); new_node->id = *id; - *notification_list = (NotificationNode*) list_prepend((ListNode*) *notification_list, - (ListNode*) new_node); + *notification_list = + (NotificationNode *)list_prepend((ListNode *)*notification_list, (ListNode *)new_node); return new_node; } -static void prv_notification_list_remove_notification_by_id( - NotificationNode **notification_list, Uuid *id) { - +static void prv_notification_list_remove_notification_by_id(NotificationNode **notification_list, + Uuid *id) { NotificationNode *node = prv_find_notification(*notification_list, id); list_remove((ListNode *)node, (ListNode **)notification_list, NULL); } static NotificationNode *prv_add_notification(NotificationsData *data, Uuid *id) { - NotificationNode *node = prv_notification_list_add_notification_by_id(&data->notification_list, - id); + NotificationNode *node = + prv_notification_list_add_notification_by_id(&data->notification_list, id); return node; } @@ -126,7 +122,7 @@ static void prv_load_notification_storage(NotificationsData *data) { static void prv_notification_list_deinit(NotificationNode *notification_list) { while (notification_list) { NotificationNode *node = notification_list; - notification_list = (NotificationNode*) list_pop_head((ListNode*) notification_list); + notification_list = (NotificationNode *)list_pop_head((ListNode *)notification_list); app_free(node); } } @@ -149,10 +145,10 @@ static NOINLINE LoadedNotificationNode *prv_loaded_notification_list_load_item( } // unload old notifications - if (list_count((ListNode*) *loaded_list) > MAX_ACTIVE_NOTIFICATIONS) { - LoadedNotificationNode *old_node = (LoadedNotificationNode*) list_get_tail( - (ListNode*) *loaded_list); - list_remove((ListNode*) old_node, (ListNode**) loaded_list, NULL); + if (list_count((ListNode *)*loaded_list) > MAX_ACTIVE_NOTIFICATIONS) { + LoadedNotificationNode *old_node = + (LoadedNotificationNode *)list_get_tail((ListNode *)*loaded_list); + list_remove((ListNode *)old_node, (ListNode **)loaded_list, NULL); prv_unload_loaded_notification(old_node); } @@ -165,12 +161,11 @@ static NOINLINE LoadedNotificationNode *prv_loaded_notification_list_load_item( // track the loaded notification loaded_node = app_malloc_check(sizeof(LoadedNotificationNode)); - list_init((ListNode*) loaded_node); + list_init((ListNode *)loaded_node); loaded_node->notification = notification; - TimelineResourceId timeline_res_id = attribute_get_uint32(¬ification.attr_list, - AttributeIdIconTiny, - NOTIF_FALLBACK_ICON); + TimelineResourceId timeline_res_id = + attribute_get_uint32(¬ification.attr_list, AttributeIdIconTiny, NOTIF_FALLBACK_ICON); // Read the associated pin's app id TimelineItem pin; @@ -180,9 +175,9 @@ static NOINLINE LoadedNotificationNode *prv_loaded_notification_list_load_item( } TimelineResourceInfo timeline_res = { - .res_id = timeline_res_id, - .app_id = &pin.header.parent_id, - .fallback_id = NOTIF_FALLBACK_ICON + .res_id = timeline_res_id, + .app_id = &pin.header.parent_id, + .fallback_id = NOTIF_FALLBACK_ICON }; AppResourceInfo icon_res_info; timeline_resources_get_id(&timeline_res, TimelineResourceSizeTiny, &icon_res_info); @@ -191,8 +186,8 @@ static NOINLINE LoadedNotificationNode *prv_loaded_notification_list_load_item( loaded_node->icon_is_default = (timeline_res_id == NOTIF_FALLBACK_ICON) || (timeline_res_id == TIMELINE_RESOURCE_NOTIFICATION_GENERIC); - *loaded_list = (LoadedNotificationNode*) list_prepend((ListNode*) *loaded_list, - (ListNode*)loaded_node); + *loaded_list = + (LoadedNotificationNode *)list_prepend((ListNode *)*loaded_list, (ListNode *)loaded_node); return loaded_node; } @@ -200,7 +195,7 @@ static NOINLINE LoadedNotificationNode *prv_loaded_notification_list_load_item( static void prv_loaded_notification_list_deinit(LoadedNotificationNode *loaded_list) { while (loaded_list) { LoadedNotificationNode *node = loaded_list; - loaded_list = (LoadedNotificationNode*) list_pop_head((ListNode*) loaded_list); + loaded_list = (LoadedNotificationNode *)list_pop_head((ListNode *)loaded_list); prv_unload_loaded_notification(node); } } @@ -217,10 +212,10 @@ static bool prv_push_notification_window(NotificationsData *data) { // iterate over visible items as visible (including the groups) in reverse order // since notification_window shows each newly added notification first - NotificationNode *node = (NotificationNode*)list_get_tail(&data->notification_list->node); + NotificationNode *node = (NotificationNode *)list_get_tail(&data->notification_list->node); while (node) { notification_window_add_notification_by_id(&node->id); - node = (NotificationNode*)list_get_prev(&node->node); + node = (NotificationNode *)list_get_prev(&node->node); } notification_window_show(); @@ -263,7 +258,6 @@ static void prv_confirmed_handler(ClickRecognizerRef recognizer, void *context) app_simple_dialog_push(confirmation_dialog); } - static void prv_dialog_click_config(void *context) { NotificationsData *data = app_state_get_user_data(); window_single_click_subscribe(BUTTON_ID_SELECT, prv_confirmed_handler); @@ -277,15 +271,17 @@ static void prv_settings_clear_history_window_push(NotificationsData *data) { Dialog *dialog = actionable_dialog_get_dialog(actionable_dialog); dialog_set_text(dialog, i18n_get("Clear history?", data)); TimelineResourceInfo timeline_res = { - .res_id = TIMELINE_RESOURCE_GENERIC_QUESTION, + .res_id = TIMELINE_RESOURCE_GENERIC_QUESTION, }; AppResourceInfo icon_res_info; timeline_resources_get_id(&timeline_res, TimelineResourceSizeLarge, &icon_res_info); dialog_set_icon(dialog, icon_res_info.res_id); dialog_set_icon_animate_direction(dialog, DialogIconAnimationFromRight); - dialog_set_callbacks(dialog, &(DialogCallbacks) { - .unload = prv_dialog_unloaded, - }, data); + dialog_set_callbacks(dialog, + &(DialogCallbacks){ + .unload = prv_dialog_unloaded, + }, + data); app_actionable_dialog_push(actionable_dialog); data->actionable_dialog = actionable_dialog; } @@ -300,24 +296,24 @@ static GColor prv_invert_bw_color(GColor color) { return color; } -static void prv_invert_pdc_colors(GDrawCommandProcessor *processor, - GDrawCommand *processed_command, - size_t processed_command_max_size, - const GDrawCommandList* list, +static void prv_invert_pdc_colors(GDrawCommandProcessor *processor, GDrawCommand *processed_command, + size_t processed_command_max_size, const GDrawCommandList *list, const GDrawCommand *command) { - gdraw_command_set_stroke_color(processed_command, + gdraw_command_set_stroke_color( + processed_command, prv_invert_bw_color(gdraw_command_get_stroke_color((GDrawCommand *)command))); - gdraw_command_set_fill_color(processed_command, + gdraw_command_set_fill_color( + processed_command, prv_invert_bw_color(gdraw_command_get_fill_color((GDrawCommand *)command))); } static void prv_draw_pdc_bw_inverted(GContext *ctx, GDrawCommandImage *image, GPoint offset) { GDrawCommandProcessor processor = { - .command = prv_invert_pdc_colors, + .command = prv_invert_pdc_colors, }; gdraw_command_image_draw_processed(ctx, image, offset, &processor); } -#endif // PBL_BW +#endif // PBL_BW ////////////// // MenuLayer callbacks @@ -342,7 +338,7 @@ static void prv_draw_notification_cell_rect(GContext *ctx, const Layer *cell_lay box.origin.x += icon_left_margin; // Align the icon to the left of the draw box, centered vertically - GRect icon_rect = (GRect) { .size = gdraw_command_image_get_bounds_size(icon) }; + GRect icon_rect = (GRect){.size = gdraw_command_image_get_bounds_size(icon)}; grect_align(&icon_rect, &box, GAlignLeft, false /* clip */); draw_func(ctx, icon, icon_rect.origin); @@ -351,10 +347,9 @@ static void prv_draw_notification_cell_rect(GContext *ctx, const Layer *cell_lay // Temporarily inset the cell layer's bounds from the left so the text doesn't draw over any // icon on the left Layer *mutable_cell_layer = (Layer *)cell_layer; - const int text_left_margin = - icon_left_margin + MAX(icon_size.w, ATTRIBUTE_ICON_TINY_SIZE_PX); - mutable_cell_layer->bounds = grect_inset(cell_layer_bounds, - GEdgeInsets(0, 5, 0, text_left_margin)); + const int text_left_margin = icon_left_margin + MAX(icon_size.w, ATTRIBUTE_ICON_TINY_SIZE_PX); + mutable_cell_layer->bounds = + grect_inset(cell_layer_bounds, GEdgeInsets(0, 5, 0, text_left_margin)); const GFont title_font = system_theme_get_font_for_default_size(TextStyleFont_MenuCellTitle); const GFont subtitle_font = system_theme_get_font_for_default_size(TextStyleFont_Caption); @@ -369,7 +364,7 @@ static void prv_draw_notification_cell_rect(GContext *ctx, const Layer *cell_lay //! outer_box is passed as a pointer to save stack space static int16_t prv_draw_centered_text_line_in(GContext *ctx, GFont font, const GRect *outer_box, - const char *text, GAlign align) { + const char *text, GAlign align) { if (!text) { return 0; } @@ -391,7 +386,6 @@ void prv_draw_notification_cell_round(GContext *ctx, const Layer *cell_layer, GR GFont const title_font, const char *title, GFont const subtitle_font, const char *subtitle, GDrawCommandImage *icon) { - if (icon) { GRect icon_rect = (GRect){.size = gdraw_command_image_get_bounds_size(icon)}; @@ -412,8 +406,7 @@ void prv_draw_notification_cell_round(GContext *ctx, const Layer *cell_layer, GR box->origin.y -= 4; if (subtitle) { - box->size.h -= prv_draw_centered_text_line_in(ctx, subtitle_font, box, subtitle, - GAlignBottom); + box->size.h -= prv_draw_centered_text_line_in(ctx, subtitle_font, box, subtitle, GAlignBottom); } if (title) { @@ -460,11 +453,10 @@ static void prv_draw_notification_cell_round_unselected(GContext *ctx, const Lay } #endif -static void prv_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, - void *data) { +static void prv_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *data) { NotificationsData *notifications_data = data; - if ((notifications_data->notification_list) && (cell_index->row == 0)) { + if ((notifications_data->notification_list) && (cell_index->row == 0)) { // Clear All button selected prv_settings_clear_history_window_push(notifications_data); return; @@ -473,8 +465,8 @@ static void prv_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, // shift index since the first one is hard coded to Clear int16_t notif_idx = cell_index->row - 1; - NotificationNode *node = (NotificationNode*) list_get_at( - (ListNode*) notifications_data->notification_list, notif_idx); + NotificationNode *node = + (NotificationNode *)list_get_at((ListNode *)notifications_data->notification_list, notif_idx); if (!node) { return; } @@ -503,7 +495,7 @@ static uint16_t prv_get_num_rows_callback(struct MenuLayer *menu_layer, uint16_t } static int16_t prv_get_cell_height(struct MenuLayer *menu_layer, MenuIndex *cell_index, - void *data) { + void *data) { #if PBL_ROUND MenuIndex selected_index = menu_layer_get_selected_index(menu_layer); bool is_selected = menu_index_compare(cell_index, &selected_index) == 0; @@ -517,14 +509,15 @@ static int16_t prv_get_cell_height(struct MenuLayer *menu_layer, MenuIndex *cell #endif const PreferredContentSize runtime_platform_content_size = system_theme_get_default_content_size_for_runtime_platform(); - return ((int16_t[NumPreferredContentSizes]) { - //! @note this is the same as Medium until Small is designed - [PreferredContentSizeSmall] = PBL_IF_RECT_ELSE(46, MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT), - [PreferredContentSizeMedium] = PBL_IF_RECT_ELSE(46, - MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT), - [PreferredContentSizeLarge] = menu_cell_basic_cell_height(), - //! @note this is the same as Large until ExtraLarge is designed - [PreferredContentSizeExtraLarge] = menu_cell_basic_cell_height(), + return ((int16_t[NumPreferredContentSizes]){ + //! @note this is the same as Medium until Small is designed + [PreferredContentSizeSmall] = + PBL_IF_RECT_ELSE(46, MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT), + [PreferredContentSizeMedium] = + PBL_IF_RECT_ELSE(46, MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT), + [PreferredContentSizeLarge] = menu_cell_basic_cell_height(), + //! @note this is the same as Large until ExtraLarge is designed + [PreferredContentSizeExtraLarge] = menu_cell_basic_cell_height(), })[runtime_platform_content_size]; } @@ -533,7 +526,7 @@ static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIn NotificationsData *notifications_data = data; void (*draw_cell)(GContext *, const Layer *, const char *, const char *, GDrawCommandImage *) = - PBL_IF_RECT_ELSE(prv_draw_notification_cell_rect, prv_draw_notification_cell_round_selected); + PBL_IF_RECT_ELSE(prv_draw_notification_cell_rect, prv_draw_notification_cell_round_selected); #if PBL_ROUND // on round: just draw the title for anything but the focused row if (!menu_layer_is_index_selected(&s_data->menu_layer, cell_index)) { @@ -550,7 +543,8 @@ static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIn #else const GFont font = system_theme_get_font_for_default_size(TextStyleFont_MenuCellTitle); GRect box = cell_layer->bounds; - box.origin.y += (box.size.h - fonts_get_font_height(font)) / 2 - fonts_get_font_cap_offset(font); + box.origin.y += + (box.size.h - fonts_get_font_height(font)) / 2 - fonts_get_font_cap_offset(font); graphics_draw_text(ctx, i18n_get("Clear All", data), font, box, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); @@ -561,14 +555,14 @@ static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIn // shift index since the first one is hard coded to Clear const int16_t notif_idx = cell_index->row - 1; - NotificationNode *node = (NotificationNode*) list_get_at( - (ListNode*) notifications_data->notification_list, notif_idx); + NotificationNode *node = + (NotificationNode *)list_get_at((ListNode *)notifications_data->notification_list, notif_idx); if (!node) { return; } - LoadedNotificationNode *loaded_node = prv_loaded_notification_list_load_item( - ¬ifications_data->loaded_notification_list, node); + LoadedNotificationNode *loaded_node = + prv_loaded_notification_list_load_item(¬ifications_data->loaded_notification_list, node); if (!loaded_node) { return; } @@ -594,7 +588,7 @@ static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIn } else { // try to show as much content as possible in title + subtitle title = body; - subtitle = strchr(body, '\n'); // NULL handled gracefully downstream + subtitle = strchr(body, '\n'); // NULL handled gracefully downstream } } else if (IS_EMPTY_STRING(title)) { // no title, but yes subtitle. @@ -616,11 +610,11 @@ static void prv_update_text_layer_visibility(NotificationsData *data) { // Toggle which layer is visible if (node == NULL) { - layer_set_hidden((Layer *) &data->menu_layer, true); - layer_set_hidden((Layer *) &data->text_layer, false); + layer_set_hidden((Layer *)&data->menu_layer, true); + layer_set_hidden((Layer *)&data->text_layer, false); } else { - layer_set_hidden((Layer *) &data->menu_layer, false); - layer_set_hidden((Layer *) &data->text_layer, true); + layer_set_hidden((Layer *)&data->menu_layer, false); + layer_set_hidden((Layer *)&data->text_layer, true); } } @@ -652,7 +646,7 @@ static void prv_handle_notification_added(Uuid *id) { static void prv_handle_notification(PebbleEvent *e, void *context) { if (e->type == PEBBLE_SYS_NOTIFICATION_EVENT) { Uuid *id = e->sys_notification.notification_id; - switch(e->sys_notification.type) { + switch (e->sys_notification.type) { case NotificationAdded: prv_handle_notification_added(id); break; @@ -664,9 +658,8 @@ static void prv_handle_notification(PebbleEvent *e, void *context) { break; case NotificationActionResult: { PebbleSysNotificationActionResult *action_result = e->sys_notification.action_result; - if (action_result && - (action_result->type == ActionResultTypeSuccess || - action_result->type == ActionResultTypeSuccessANCSDismiss)) { + if (action_result && (action_result->type == ActionResultTypeSuccess || + action_result->type == ActionResultTypeSuccessANCSDismiss)) { prv_remove_notification(s_data, &action_result->id); app_notification_window_remove_notification_by_id(&action_result->id); } @@ -703,35 +696,36 @@ static void prv_window_load(Window *window) { const GRect menu_layer_frame = PBL_IF_RECT_ELSE( window->layer.bounds, grect_inset_internal(window->layer.bounds, 0, STATUS_BAR_LAYER_HEIGHT)); menu_layer_init(menu_layer, &menu_layer_frame); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_num_rows = prv_get_num_rows_callback, - .draw_row = prv_draw_row_callback, - .get_cell_height = prv_get_cell_height, - .select_click = prv_select_callback, - }); + menu_layer_set_callbacks(menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows_callback, + .draw_row = prv_draw_row_callback, + .get_cell_height = prv_get_cell_height, + .select_click = prv_select_callback, + }); menu_layer_set_normal_colors(menu_layer, GColorWhite, GColorBlack); - menu_layer_set_highlight_colors(menu_layer, - PBL_IF_COLOR_ELSE(DEFAULT_NOTIFICATION_COLOR, GColorBlack), - GColorWhite); + menu_layer_set_highlight_colors( + menu_layer, PBL_IF_COLOR_ELSE(DEFAULT_NOTIFICATION_COLOR, GColorBlack), GColorWhite); menu_layer_set_click_config_onto_window(menu_layer, window); menu_layer_set_scroll_wrap_around(menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&window->layer, menu_layer_get_layer(menu_layer)); TextLayer *text_layer = &data->text_layer; const int16_t horizontal_margin = 5; const GFont font = system_theme_get_font_for_default_size(TextStyleFont_MenuCellTitle); // configure text layer to be vertically aligned (15 is hacking around our poor fonts) - text_layer_init_with_parameters(text_layer, - &GRect(horizontal_margin, window->layer.bounds.size.h / 2 - 15, - window->layer.bounds.size.w - horizontal_margin, - window->layer.bounds.size.h / 2), - i18n_get("No notifications", data), font, GColorBlack, - GColorWhite, GTextAlignmentCenter, - GTextOverflowModeTrailingEllipsis); + text_layer_init_with_parameters( + text_layer, + &GRect(horizontal_margin, window->layer.bounds.size.h / 2 - 15, + window->layer.bounds.size.w - horizontal_margin, window->layer.bounds.size.h / 2), + i18n_get("No notifications", data), font, GColorBlack, GColorWhite, GTextAlignmentCenter, + GTextOverflowModeTrailingEllipsis); layer_add_child(&window->layer, text_layer_get_layer(text_layer)); #if PBL_ROUND @@ -752,11 +746,11 @@ static void prv_push_window(NotificationsData *data) { Window *window = &data->window; window_init(window, WINDOW_NAME("Notifications")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - .appear = prv_window_appear, - .disappear = prv_window_disappear, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + .appear = prv_window_appear, + .disappear = prv_window_disappear, + }); const bool animated = true; app_window_stack_push(window, animated); @@ -770,9 +764,9 @@ static void prv_handle_init(void) { app_state_set_user_data(data); - data->notification_event_info = (EventServiceInfo) { - .type = PEBBLE_SYS_NOTIFICATION_EVENT, - .handler = prv_handle_notification, + data->notification_event_info = (EventServiceInfo){ + .type = PEBBLE_SYS_NOTIFICATION_EVENT, + .handler = prv_handle_notification, }; event_service_client_subscribe(&data->notification_event_info); prv_load_notification_storage(data); @@ -827,29 +821,31 @@ static void prv_clear_history_main(void) { prv_clear_history_handle_deinit(); } - -const PebbleProcessMd* notifications_app_get_info() { +const PebbleProcessMd *notifications_app_get_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = prv_s_main, - // UUID: b2cae818-10f8-46df-ad2b-98ad2254a3c1 - .uuid = {0xb2, 0xca, 0xe8, 0x18, 0x10, 0xf8, 0x46, 0xdf, - 0xad, 0x2b, 0x98, 0xad, 0x22, 0x54, 0xa3, 0xc1}, - }, - .name = i18n_noop("Notifications"), - .icon_resource_id = RESOURCE_ID_NOTIFICATIONS_APP_GLANCE, + .common = + { + .main_func = prv_s_main, + // UUID: b2cae818-10f8-46df-ad2b-98ad2254a3c1 + .uuid = + {0xb2, 0xca, 0xe8, 0x18, 0x10, 0xf8, 0x46, 0xdf, 0xad, 0x2b, 0x98, 0xad, 0x22, + 0x54, 0xa3, 0xc1}, + }, + .name = i18n_noop("Notifications"), + .icon_resource_id = RESOURCE_ID_NOTIFICATIONS_APP_GLANCE, }; - return (const PebbleProcessMd*) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } const PebbleProcessMd *notifications_clear_history_app_get_info(void) { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = prv_clear_history_main, - .uuid = NOTIFICATIONS_CLEAR_HISTORY_UUID, - .visibility = ProcessVisibilityQuickLaunch, - }, - .name = i18n_noop("Clear Notification History"), + .common = + { + .main_func = prv_clear_history_main, + .uuid = NOTIFICATIONS_CLEAR_HISTORY_UUID, + .visibility = ProcessVisibilityQuickLaunch, + }, + .name = i18n_noop("Clear Notification History"), }; - return (const PebbleProcessMd *) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } diff --git a/src/fw/apps/system/notifications.h b/src/fw/apps/system/notifications.h index 72c0fb4857..1e8f6e5428 100644 --- a/src/fw/apps/system/notifications.h +++ b/src/fw/apps/system/notifications.h @@ -6,8 +6,8 @@ #include "process_management/pebble_process_md.h" // UUID: d9c0d758-54bd-45b1-99ac-2a3a889350c9 -#define NOTIFICATIONS_CLEAR_HISTORY_UUID {0xd9, 0xc0, 0xd7, 0x58, 0x54, 0xbd, 0x45, 0xb1, \ - 0x99, 0xac, 0x2a, 0x3a, 0x88, 0x93, 0x50, 0xc9} +#define NOTIFICATIONS_CLEAR_HISTORY_UUID \ + {0xd9, 0xc0, 0xd7, 0x58, 0x54, 0xbd, 0x45, 0xb1, 0x99, 0xac, 0x2a, 0x3a, 0x88, 0x93, 0x50, 0xc9} -const PebbleProcessMd* notifications_app_get_info(); -const PebbleProcessMd* notifications_clear_history_app_get_info(void); +const PebbleProcessMd *notifications_app_get_info(); +const PebbleProcessMd *notifications_clear_history_app_get_info(void); diff --git a/src/fw/apps/system/reminders/reminder.c b/src/fw/apps/system/reminders/reminder.c index 95d31127b4..c4c6b890b2 100644 --- a/src/fw/apps/system/reminders/reminder.c +++ b/src/fw/apps/system/reminders/reminder.c @@ -60,32 +60,30 @@ static void prv_create_reminder(ReminderAppData *data) { const int num_actions = 3; TimelineItemActionGroup action_group = { - .num_actions = num_actions, - .actions = (TimelineItemAction[]) { - { - .id = 0, - .type = TimelineItemActionTypeComplete, - .attr_list = completed_attr_list, + .num_actions = num_actions, + .actions = (TimelineItemAction[]){ + { + .id = 0, + .type = TimelineItemActionTypeComplete, + .attr_list = completed_attr_list, + }, + { + .id = 1, + .type = TimelineItemActionTypePostpone, + .attr_list = postpone_attr_list, + }, + { + .id = 2, + .type = TimelineItemActionTypeRemoteRemove, + .attr_list = remove_attr_list, + } }, - { - .id = 1, - .type = TimelineItemActionTypePostpone, - .attr_list = postpone_attr_list, - }, - { - .id = 2, - .type = TimelineItemActionTypeRemoteRemove, - .attr_list = remove_attr_list, - } - }, }; TimelineItem *item = timeline_item_create_with_attributes(data->timestamp, - 0, // duration - TimelineItemTypePin, - LayoutIdGeneric, - &pin_attr_list, - &action_group); + 0, // duration + TimelineItemTypePin, LayoutIdGeneric, + &pin_attr_list, &action_group); item->header.from_watch = true; item->header.parent_id = (Uuid)UUID_REMINDERS_DATA_SOURCE; timeline_add(item); @@ -126,8 +124,7 @@ static void prv_confirm_cb(void *context) { static void prv_push_transcription_dialog(ReminderAppData *data) { TranscriptionDialog *transcription_dialog = &data->transcription_dialog; transcription_dialog_init(transcription_dialog); - transcription_dialog_update_text(transcription_dialog, - data->dialog_text, + transcription_dialog_update_text(transcription_dialog, data->dialog_text, strlen(data->dialog_text)); transcription_dialog_set_callback(transcription_dialog, prv_confirm_cb, data); Dialog *dialog = expandable_dialog_get_dialog((ExpandableDialog *)transcription_dialog); @@ -140,7 +137,7 @@ static void prv_build_transcription_dialog_text(ReminderAppData *data) { app_free(data->dialog_text); } const size_t sentence_len = strlen(data->reminder_str); - const size_t date_time_len = 32; // "September 19th 9:05pm", "Yesterday 12:33pm" + const size_t date_time_len = 32; // "September 19th 9:05pm", "Yesterday 12:33pm" const size_t required_buf_size = sentence_len + date_time_len + 2 /* \n\n */ + 1 /* \0 */; data->dialog_text = app_zalloc_check(required_buf_size); @@ -158,13 +155,13 @@ static void prv_build_transcription_dialog_text(ReminderAppData *data) { strncat(data->dialog_text, "\n\n", buf_space_remaining); buf_space_remaining = MAX(buf_space_remaining - 2, 0); - char tmp[date_time_len]; clock_get_friendly_date(tmp, date_time_len, data->timestamp); strncat(data->dialog_text, tmp, buf_space_remaining); buf_space_remaining = MAX(buf_space_remaining - strlen(tmp), 0); strncat(data->dialog_text, " ", buf_space_remaining); - buf_space_remaining = MAX(buf_space_remaining - 1, 0);; + buf_space_remaining = MAX(buf_space_remaining - 1, 0); + ; clock_get_time_number(tmp, date_time_len, data->timestamp); strncat(data->dialog_text, tmp, buf_space_remaining); @@ -245,13 +242,15 @@ static NOINLINE void prv_init(void) { Window *window = &data->window; window_init(window, WINDOW_NAME("Reminders")); - WindowHandlers handlers = { .appear = prv_appear, }; + WindowHandlers handlers = { + .appear = prv_appear, + }; window_set_window_handlers(window, &handlers); - data->event_service_info = (EventServiceInfo) { - .type = PEBBLE_DICTATION_EVENT, - .handler = prv_handle_dictation_event, - .context = data, + data->event_service_info = (EventServiceInfo){ + .type = PEBBLE_DICTATION_EVENT, + .handler = prv_handle_dictation_event, + .context = data, }; event_service_client_subscribe(&data->event_service_info); @@ -276,23 +275,25 @@ static void prv_main(void) { prv_deinit(); } -const PebbleProcessMd* reminder_app_get_info(void) { +const PebbleProcessMd *reminder_app_get_info(void) { PebbleProtocolCapabilities capabilities; bt_persistent_storage_get_cached_system_capabilities(&capabilities); SerializedReminderAppPrefs *prefs = watch_app_prefs_get_reminder(); - const bool is_visible_in_launcher = capabilities.reminders_app_support && - (prefs ? (prefs->appState == ReminderAppState_Enabled) : false); + const bool is_visible_in_launcher = + capabilities.reminders_app_support && + (prefs ? (prefs->appState == ReminderAppState_Enabled) : false); task_free(prefs); static const PebbleProcessMdSystem s_reminder_app_info = { - .common = { - .main_func = prv_main, - .uuid = UUID_REMINDERS_DATA_SOURCE, - }, - .name = i18n_noop("Reminder"), - .icon_resource_id = RESOURCE_ID_GENERIC_REMINDER_TINY, + .common = + { + .main_func = prv_main, + .uuid = UUID_REMINDERS_DATA_SOURCE, + }, + .name = i18n_noop("Reminder"), + .icon_resource_id = RESOURCE_ID_GENERIC_REMINDER_TINY, }; return is_visible_in_launcher ? (const PebbleProcessMd *)&s_reminder_app_info : NULL; diff --git a/src/fw/apps/system/reminders/reminder.h b/src/fw/apps/system/reminders/reminder.h index 4a425335d9..a073f0c895 100644 --- a/src/fw/apps/system/reminders/reminder.h +++ b/src/fw/apps/system/reminders/reminder.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* reminder_app_get_info(void); +const PebbleProcessMd *reminder_app_get_info(void); diff --git a/src/fw/apps/system/send_text/send_text.c b/src/fw/apps/system/send_text/send_text.c index 1d0126351a..76b7ad7701 100644 --- a/src/fw/apps/system/send_text/send_text.c +++ b/src/fw/apps/system/send_text/send_text.c @@ -35,7 +35,7 @@ typedef struct { ContactId id; char *name; char *display_number; - char *number; // Points to a substring within display_number (the part without the ❤) + char *number; // Points to a substring within display_number (the part without the ❤) } ContactNode; typedef struct SendTextAppData { @@ -49,7 +49,6 @@ typedef struct SendTextAppData { EventServiceInfo event_service_info; } SendTextAppData; - /////////////////////////////////////////////////////////////////////////////////////////////////// //! Action menu functions @@ -93,11 +92,9 @@ static TimelineItem *prv_create_timeline_item(const char *number) { AttributeList attr_list = {}; attribute_list_add_cstring(&attr_list, AttributeIdSender, number); - TimelineItem *item = timeline_item_create_with_attributes(0, 0, - TimelineItemTypeNotification, - LayoutIdNotification, - &attr_list, - ¬if_prefs->action_group); + TimelineItem *item = + timeline_item_create_with_attributes(0, 0, TimelineItemTypeNotification, LayoutIdNotification, + &attr_list, ¬if_prefs->action_group); if (item) { item->header.id = (Uuid)UUID_SEND_SMS; item->header.parent_id = (Uuid)UUID_SEND_TEXT_DATA_SOURCE; @@ -113,8 +110,8 @@ static void prv_open_action_menu(SendTextAppData *data, const char *number) { TimelineItem *item = prv_create_timeline_item(number); // This handles the case where item is NULL, so no need to check for that - TimelineItemAction *reply_action = timeline_item_find_action_by_type( - item, TimelineItemActionTypeResponse); + TimelineItemAction *reply_action = + timeline_item_find_action_by_type(item, TimelineItemActionTypeResponse); if (!reply_action) { PBL_LOG_ERR("Not opening response menu - unable to load reply action"); @@ -127,15 +124,14 @@ static void prv_open_action_menu(SendTextAppData *data, const char *number) { TimelineItemActionSourceSendTextApp, false /* standalone_reply */); - data->event_service_info = (EventServiceInfo) { - .type = PEBBLE_SYS_NOTIFICATION_EVENT, - .handler = prv_action_handle_response, - .context = data, + data->event_service_info = (EventServiceInfo){ + .type = PEBBLE_SYS_NOTIFICATION_EVENT, + .handler = prv_action_handle_response, + .context = data, }; event_service_client_subscribe(&data->event_service_info); } - /////////////////////////////////////////////////////////////////////////////////////////////////// //! Contact list functions @@ -240,9 +236,9 @@ static int16_t prv_contact_list_get_cell_height_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *callback_context) { return PBL_IF_RECT_ELSE(menu_cell_basic_cell_height(), - (menu_layer_is_index_selected(menu_layer, cell_index) ? - MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT : - MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT)); + (menu_layer_is_index_selected(menu_layer, cell_index) + ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT + : MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT)); } #if PBL_ROUND @@ -262,8 +258,8 @@ static void prv_contact_list_draw_row_callback(GContext *ctx, const Layer *cell_ MenuIndex *cell_index, void *callback_context) { SendTextAppData *data = (SendTextAppData *)callback_context; - ContactNode *node = (ContactNode *)list_get_at((ListNode *)data->contact_list_head, - cell_index->row); + ContactNode *node = + (ContactNode *)list_get_at((ListNode *)data->contact_list_head, cell_index->row); if (!node) { return; } @@ -275,16 +271,15 @@ static void prv_contact_list_select_callback(MenuLayer *menu_layer, MenuIndex *c void *callback_context) { SendTextAppData *data = (SendTextAppData *)callback_context; - ContactNode *node = (ContactNode *)list_get_at((ListNode *)data->contact_list_head, - cell_index->row); + ContactNode *node = + (ContactNode *)list_get_at((ListNode *)data->contact_list_head, cell_index->row); if (!node) { - return; - } + return; + } prv_open_action_menu(data, node->number); } - /////////////////////////////////////////////////////////////////////////////////////////////////// //! App boilerplate @@ -301,29 +296,33 @@ static void prv_init(void) { prv_update_contact_list(data); if (prv_has_contacts(data)) { - const GRect menu_layer_frame = - grect_inset(window_root_layer->bounds, - GEdgeInsets(STATUS_BAR_LAYER_HEIGHT, 0, - PBL_IF_ROUND_ELSE(STATUS_BAR_LAYER_HEIGHT, 0), 0)); + const GRect menu_layer_frame = grect_inset( + window_root_layer->bounds, + GEdgeInsets(STATUS_BAR_LAYER_HEIGHT, 0, PBL_IF_ROUND_ELSE(STATUS_BAR_LAYER_HEIGHT, 0), 0)); menu_layer_init(&data->menu_layer, &menu_layer_frame); - menu_layer_set_callbacks(&data->menu_layer, data, &(MenuLayerCallbacks) { - .get_num_rows = prv_contact_list_get_num_rows_callback, - .get_cell_height = prv_contact_list_get_cell_height_callback, - // On round we show the "Select Contact" text in a menu cell header, but on rect we show it - // in the status bar (see below) + menu_layer_set_callbacks(&data->menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_rows = prv_contact_list_get_num_rows_callback, + .get_cell_height = prv_contact_list_get_cell_height_callback, + // On round we show the "Select Contact" text in a menu cell header, but on rect we show it + // in the status bar (see below) #if PBL_ROUND - .draw_header = prv_contact_list_draw_header_callback, - .get_header_height = prv_contact_list_get_header_height_callback, + .draw_header = prv_contact_list_draw_header_callback, + .get_header_height = prv_contact_list_get_header_height_callback, #endif - .draw_row = prv_contact_list_draw_row_callback, - .select_click = prv_contact_list_select_callback, - }); + .draw_row = prv_contact_list_draw_row_callback, + .select_click = prv_contact_list_select_callback, + }); menu_layer_set_highlight_colors(&data->menu_layer, SEND_TEXT_APP_HIGHLIGHT_COLOR, GColorWhite); menu_layer_set_click_config_onto_window(&data->menu_layer, &data->window); - menu_layer_set_scroll_wrap_around(&data->menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(&data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(&data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_wrap_around(&data->menu_layer, + shell_prefs_get_menu_scroll_wrap_around_enable()); + menu_layer_set_scroll_vibe_on_wrap( + &data->menu_layer, + shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + &data->menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&data->window.layer, menu_layer_get_layer(&data->menu_layer)); StatusBarLayer *status_layer = &data->status_layer; @@ -343,7 +342,7 @@ static void prv_init(void) { const GFont title_font = system_theme_get_font_for_default_size(TextStyleFont_Title); peek_layer_set_title_font(peek_layer, title_font); TimelineResourceInfo timeline_res = { - .res_id = TIMELINE_RESOURCE_GENERIC_WARNING, + .res_id = TIMELINE_RESOURCE_GENERIC_WARNING, }; peek_layer_set_icon(peek_layer, &timeline_res); peek_layer_set_title(peek_layer, i18n_get("Add contacts in\nmobile app", data)); @@ -375,12 +374,13 @@ static void prv_main(void) { const PebbleProcessMd *send_text_app_get_info(void) { static const PebbleProcessMdSystem s_send_text_app_info = { - .common = { - .main_func = prv_main, - .uuid = UUID_SEND_TEXT_DATA_SOURCE, - }, - .name = i18n_noop("Send Text"), - .icon_resource_id = RESOURCE_ID_SEND_TEXT_APP_GLANCE, + .common = + { + .main_func = prv_main, + .uuid = UUID_SEND_TEXT_DATA_SOURCE, + }, + .name = i18n_noop("Send Text"), + .icon_resource_id = RESOURCE_ID_SEND_TEXT_APP_GLANCE, }; // If the phone doesn't support this app, we will act as if it's not installed by returning NULL diff --git a/src/fw/apps/system/send_text/send_text.h b/src/fw/apps/system/send_text/send_text.h index 86554a322c..82e404da53 100644 --- a/src/fw/apps/system/send_text/send_text.h +++ b/src/fw/apps/system/send_text/send_text.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* send_text_app_get_info(); +const PebbleProcessMd *send_text_app_get_info(); diff --git a/src/fw/apps/system/settings/activity_tracker.c b/src/fw/apps/system/settings/activity_tracker.c index 0f335a3f0d..143061fa2d 100644 --- a/src/fw/apps/system/settings/activity_tracker.c +++ b/src/fw/apps/system/settings/activity_tracker.c @@ -29,8 +29,7 @@ typedef struct SettingsActivityTrackerData { static bool prv_app_filter_callback(struct AppMenuDataSource *const source, AppInstallEntry *entry) { - if (!app_install_entry_is_hidden(entry) && - app_install_entry_has_worker(entry)) { + if (!app_install_entry_is_hidden(entry) && app_install_entry_has_worker(entry)) { return true; } return false; @@ -89,7 +88,7 @@ static void prv_select_cb(OptionMenu *option_menu, int row, void *context) { process_manager_put_kill_process_event(PebbleTask_Worker, true /* graceful */); worker_manager_set_default_install_id(INSTALL_ID_INVALID); } else { - const uint16_t app_index = row - 1; // offset because of the "None" selection + const uint16_t app_index = row - 1; // offset because of the "None" selection const AppMenuNode *app_node = app_menu_data_source_get_node_at_index(data->data_source, app_index); if (worker_manager_get_task_context()->install_id == INSTALL_ID_INVALID) { @@ -127,7 +126,7 @@ static void prv_draw_no_activities_cell_rect(GContext *ctx, const Layer *cell_la // we divide the height of the cell by two and subtract half of the text size. // However, that just puts the TOP of a line vertically aligned. // So we also have to subtract half of a single line's width. - box.origin.y = (box.size.h - text_size.h - fonts_get_font_height(font)/2) / 2; + box.origin.y = (box.size.h - text_size.h - fonts_get_font_height(font) / 2) / 2; graphics_draw_text(ctx, no_activities_string, font, box, overflow, alignment, NULL); } @@ -153,9 +152,8 @@ static void prv_draw_row_cb(OptionMenu *option_menu, GContext *ctx, const Layer if (prv_num_rows(data) == 0) { // Draw "No background apps" box and exit const char *no_background_apps_string = i18n_get("No background apps", data); - PBL_IF_RECT_ELSE(prv_draw_no_activities_cell_rect, - prv_draw_no_activities_cell_round) - (ctx, cell_layer, no_background_apps_string); + PBL_IF_RECT_ELSE(prv_draw_no_activities_cell_rect, prv_draw_no_activities_cell_round) + (ctx, cell_layer, no_background_apps_string); return; } @@ -223,26 +221,29 @@ static Window *prv_init(void) { }; data->data_source = app_zalloc_check(sizeof(AppMenuDataSource)); - app_menu_data_source_init(data->data_source, &(AppMenuDataSourceCallbacks) { - .changed = prv_reload_menu_data, - .filter = prv_app_filter_callback, - }, data); + app_menu_data_source_init(data->data_source, + &(AppMenuDataSourceCallbacks){ + .changed = prv_reload_menu_data, + .filter = prv_app_filter_callback, + }, + data); option_menu_init(&data->option_menu); // Not using option_menu_configure because prv_reload_menu_data already sets // icons_enabled and chosen row index option_menu_set_status_colors(&data->option_menu, GColorWhite, GColorBlack); GColor highlight_bg = shell_prefs_get_theme_highlight_color(); - option_menu_set_highlight_colors(&data->option_menu, highlight_bg, gcolor_legible_over(highlight_bg)); + option_menu_set_highlight_colors(&data->option_menu, highlight_bg, + gcolor_legible_over(highlight_bg)); option_menu_set_title(&data->option_menu, i18n_get("Background App", data)); option_menu_set_content_type(&data->option_menu, OptionMenuContentType_SingleLine); option_menu_set_callbacks(&data->option_menu, &option_menu_callbacks, data); prv_reload_menu_data(data); - data->worker_launch_info = (EventServiceInfo) { - .type = PEBBLE_WORKER_LAUNCH_EVENT, - .handler = prv_worker_launch_handler, - .context = data + data->worker_launch_info = (EventServiceInfo){ + .type = PEBBLE_WORKER_LAUNCH_EVENT, + .handler = prv_worker_launch_handler, + .context = data }; event_service_client_subscribe(&data->worker_launch_info); @@ -251,8 +252,8 @@ static Window *prv_init(void) { const SettingsModuleMetadata *settings_activity_tracker_get_info(void) { static const SettingsModuleMetadata s_module_info = { - .name = i18n_noop("Background App"), - .init = prv_init, + .name = i18n_noop("Background App"), + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/bluetooth.c b/src/fw/apps/system/settings/bluetooth.c index fa2293e4ce..3fcd944d92 100644 --- a/src/fw/apps/system/settings/bluetooth.c +++ b/src/fw/apps/system/settings/bluetooth.c @@ -53,9 +53,9 @@ enum { }; static const uint32_t ICON_RESOURCE_ID[NumIcons] = { - RESOURCE_ID_SETTINGS_ICON_BLUETOOTH, - RESOURCE_ID_SETTINGS_ICON_BLUETOOTH_ALT, - RESOURCE_ID_SETTINGS_ICON_AIRPLANE, + RESOURCE_ID_SETTINGS_ICON_BLUETOOTH, + RESOURCE_ID_SETTINGS_ICON_BLUETOOTH_ALT, + RESOURCE_ID_SETTINGS_ICON_AIRPLANE, }; typedef enum { @@ -69,7 +69,7 @@ typedef struct SettingsBluetoothData { GBitmap icon_heap_bitmap[NumIcons]; - ListNode* remote_list_head; + ListNode *remote_list_head; char header_buffer[HEADER_BUFFER_SIZE]; ToggleState toggle_state; @@ -87,19 +87,18 @@ typedef struct SettingsBluetoothData { // BT stack interaction stuff /////////////////////////// -static void settings_bluetooth_toggle_airplane_mode(SettingsBluetoothData* data) { +static void settings_bluetooth_toggle_airplane_mode(SettingsBluetoothData *data) { const bool airplane_mode = bt_ctl_is_airplane_mode_on(); bt_ctl_set_airplane_mode_async(!airplane_mode); - data->toggle_state = - airplane_mode ? ToggleStateEnablingBluetooth : ToggleStateDisablingBluetooth; + data->toggle_state = airplane_mode ? ToggleStateEnablingBluetooth : ToggleStateDisablingBluetooth; settings_menu_mark_dirty(SettingsMenuItemBluetooth); } -bool is_remote_connected(StoredRemote* remote) { +bool is_remote_connected(StoredRemote *remote) { return (remote->ble.connection != NULL); } -static int remote_comparator(StoredRemote* remote, StoredRemote* other) { +static int remote_comparator(StoredRemote *remote, StoredRemote *other) { if (is_remote_connected(remote) != is_remote_connected(other)) { return is_remote_connected(remote) ? -1 : 1; } else { @@ -107,14 +106,14 @@ static int remote_comparator(StoredRemote* remote, StoredRemote* other) { } } -static void add_remote(SettingsBluetoothData* data, StoredRemote* remote) { +static void add_remote(SettingsBluetoothData *data, StoredRemote *remote) { const bool ascending = false; data->remote_list_head = list_sorted_add(data->remote_list_head, &remote->list_node, - (Comparator) remote_comparator, ascending); + (Comparator)remote_comparator, ascending); } -static StoredRemote* stored_remote_create(void) { - StoredRemote* remote = task_malloc_check(sizeof(*remote)); +static StoredRemote *stored_remote_create(void) { + StoredRemote *remote = task_malloc_check(sizeof(*remote)); *remote = (StoredRemote){}; return remote; } @@ -129,12 +128,12 @@ static void prv_copy_device_name_with_fallback(StoredRemote *remote, const char static void prv_add_ble_remote(BTDeviceInternal *device, SMIdentityResolvingKey *irk, const char *name, BTBondingID *id, void *context) { - SettingsBluetoothData *data = (SettingsBluetoothData*) context; + SettingsBluetoothData *data = (SettingsBluetoothData *)context; if (!data) { return; } - StoredRemote* remote = stored_remote_create(); + StoredRemote *remote = stored_remote_create(); remote->ble.bonding = *id; prv_copy_device_name_with_fallback(remote, name); add_remote(data, remote); @@ -164,30 +163,30 @@ static void prv_add_ble_remotes(SettingsBluetoothData *data) { } } -static void prv_clear_remote_list(SettingsBluetoothData* data) { +static void prv_clear_remote_list(SettingsBluetoothData *data) { while (data->remote_list_head) { - StoredRemote* remote = (StoredRemote*) data->remote_list_head; + StoredRemote *remote = (StoredRemote *)data->remote_list_head; data->remote_list_head = list_pop_head(&remote->list_node); task_free(remote); } } -static void prv_reload_remote_list(SettingsBluetoothData* data) { +static void prv_reload_remote_list(SettingsBluetoothData *data) { prv_clear_remote_list(data); prv_add_ble_remotes(data); } -static void settings_bluetooth_update_remotes_private(SettingsBluetoothData* data) { +static void settings_bluetooth_update_remotes_private(SettingsBluetoothData *data) { prv_reload_remote_list(data); if (!data->remote_list_head) { strncpy(data->header_buffer, i18n_get("Pairing Instructions", data), HEADER_BUFFER_SIZE); } else { const unsigned int num_remotes = list_count(data->remote_list_head); - sniprintf(data->header_buffer, HEADER_BUFFER_SIZE, - (num_remotes != 1) ? i18n_get("%u Paired Phones", data) : - i18n_get("%u Paired Phone", data), - num_remotes); + sniprintf( + data->header_buffer, HEADER_BUFFER_SIZE, + (num_remotes != 1) ? i18n_get("%u Paired Phones", data) : i18n_get("%u Paired Phone", data), + num_remotes); } } @@ -199,7 +198,7 @@ void settings_bluetooth_update_remotes(SettingsBluetoothData *data) { ////////// static void prv_settings_bluetooth_event_handler(PebbleEvent *event, void *context) { - SettingsBluetoothData* settings_data = (SettingsBluetoothData *) context; + SettingsBluetoothData *settings_data = (SettingsBluetoothData *)context; PBL_LOG_DBG("BT EVENT"); switch (event->type) { case PEBBLE_BT_CONNECTION_EVENT: @@ -220,7 +219,7 @@ static void prv_settings_bluetooth_event_handler(PebbleEvent *event, void *conte bool had_remotes = (settings_data->remote_list_head != NULL); settings_bluetooth_update_remotes_private(settings_data); bool has_remotes = (settings_data->remote_list_head != NULL); - + // Handle single phone pairing policy: enable/disable advertising based on pairing state if (had_remotes && !has_remotes) { // Device was removed, enable advertising @@ -237,7 +236,7 @@ static void prv_settings_bluetooth_event_handler(PebbleEvent *event, void *conte PBL_LOG_INFO("Disabled advertising - device paired"); } } - + settings_menu_mark_dirty(SettingsMenuItemBluetooth); break; } @@ -271,8 +270,9 @@ static void prv_draw_stored_remote_item_rect(GContext *ctx, const Layer *cell_la const char *remote_name, const char *connected_string, const char *le_string, const char *is_sharing_heart_rate_string) { - const GFont font = ((le_string || is_sharing_heart_rate_string) ? - fonts_get_system_font(FONT_KEY_GOTHIC_18) : NULL); + const GFont font = + ((le_string || is_sharing_heart_rate_string) ? fonts_get_system_font(FONT_KEY_GOTHIC_18) + : NULL); if (le_string) { GRect box = cell_layer->bounds; @@ -289,8 +289,8 @@ static void prv_draw_stored_remote_item_rect(GContext *ctx, const Layer *cell_la box.origin.y += 38; box.size.h = 24; - graphics_draw_text(ctx, is_sharing_heart_rate_string, font, box, - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, is_sharing_heart_rate_string, font, box, GTextOverflowModeFill, + GTextAlignmentLeft, NULL); // Gross hack to avoid centering the title / subtitle labels in the entire cell: ((Layer *)cell_layer)->bounds.size.h -= SHARING_HEART_RATE_EXTRA_HEIGHT_PX; @@ -305,7 +305,7 @@ static void prv_draw_stored_remote_item_rect(GContext *ctx, const Layer *cell_la } #endif -bool settings_bluetooth_is_sharing_heart_rate_for_stored_remote(StoredRemote* remote) { +bool settings_bluetooth_is_sharing_heart_rate_for_stored_remote(StoredRemote *remote) { #ifdef CONFIG_HRM return remote->ble.is_sharing_heart_rate; #else @@ -318,25 +318,25 @@ static void prv_draw_stored_remote_item_round(GContext *ctx, const Layer *cell_l const char *remote_name, const char *connected_string, const char *le_string, const char *is_sharing_heart_rate_string) { -# ifdef CONFIG_HRM +#ifdef CONFIG_HRM _Static_assert(false, "FIXME: Implement round drawing code to show heart rate sharing status!"); -# endif // CONFIG_HRM +#endif // CONFIG_HRM menu_cell_basic_draw(ctx, cell_layer, remote_name, connected_string, NULL); } #endif // PBL_ROUND -static void draw_stored_remote_item(GContext *ctx, const Layer *cell_layer, - uint16_t device_index, SettingsBluetoothData *data) { +static void draw_stored_remote_item(GContext *ctx, const Layer *cell_layer, uint16_t device_index, + SettingsBluetoothData *data) { const uint32_t num_remotes = list_count(data->remote_list_head); - PBL_ASSERT(device_index < num_remotes, "Got index %" PRId16 " only have %" PRId32, - device_index, num_remotes); - StoredRemote* remote = (StoredRemote*) list_get_at(data->remote_list_head, device_index); + PBL_ASSERT(device_index < num_remotes, "Got index %" PRId16 " only have %" PRId32, device_index, + num_remotes); + StoredRemote *remote = (StoredRemote *)list_get_at(data->remote_list_head, device_index); bool connected = is_remote_connected(remote); const char *le_string = NULL; - const char *connected_string = connected ? i18n_get("Connected", data) : - PBL_IF_RECT_ELSE("", NULL); + const char *connected_string = + connected ? i18n_get("Connected", data) : PBL_IF_RECT_ELSE("", NULL); // Add ellipsis if the name might have been cut off by the mobile const char ellipsis[] = UTF8_ELLIPSIS_STRING; @@ -350,108 +350,106 @@ static void draw_stored_remote_item(GContext *ctx, const Layer *cell_layer, } const char *is_sharing_heart_rate = - (settings_bluetooth_is_sharing_heart_rate_for_stored_remote(remote) ? - i18n_get("Sharing Heart Rate ❤", data) : NULL); + (settings_bluetooth_is_sharing_heart_rate_for_stored_remote(remote) + ? i18n_get("Sharing Heart Rate ❤", data) + : NULL); - PBL_IF_RECT_ELSE(prv_draw_stored_remote_item_rect, - prv_draw_stored_remote_item_round)(ctx, cell_layer, remote_name, - connected_string, le_string, - is_sharing_heart_rate); + PBL_IF_RECT_ELSE(prv_draw_stored_remote_item_rect, prv_draw_stored_remote_item_round)( + ctx, cell_layer, remote_name, connected_string, le_string, is_sharing_heart_rate); task_free(remote_name); } - static uint16_t prv_num_rows_cb(SettingsCallbacks *context) { - SettingsBluetoothData *data = (SettingsBluetoothData *) context; + SettingsBluetoothData *data = (SettingsBluetoothData *)context; return list_count(data->remote_list_head) + 1; } static int16_t prv_row_height_cb(SettingsCallbacks *context, uint16_t row, bool is_selected) { #if PBL_RECT -# ifdef CONFIG_HRM +#ifdef CONFIG_HRM int heart_rate_sharing_text_height = 0; if (row > 0) { - SettingsBluetoothData *data = (SettingsBluetoothData *) context; + SettingsBluetoothData *data = (SettingsBluetoothData *)context; const uint16_t device_index = row - 1; - StoredRemote* remote = (StoredRemote*) list_get_at(data->remote_list_head, device_index); + StoredRemote *remote = (StoredRemote *)list_get_at(data->remote_list_head, device_index); if (settings_bluetooth_is_sharing_heart_rate_for_stored_remote(remote)) { heart_rate_sharing_text_height = SHARING_HEART_RATE_EXTRA_HEIGHT_PX; } } -# else +#else const int heart_rate_sharing_text_height = 0; -# endif // CONFIG_HRM +#endif // CONFIG_HRM return menu_cell_basic_cell_height() + heart_rate_sharing_text_height; #elif PBL_ROUND - return (is_selected ? MENU_CELL_ROUND_FOCUSED_TALL_CELL_HEIGHT : - MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT); + return (is_selected ? MENU_CELL_ROUND_FOCUSED_TALL_CELL_HEIGHT + : MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT); #else #endif } -static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, - const Layer *cell_layer, uint16_t row, bool selected) { - SettingsBluetoothData *data = (SettingsBluetoothData *) context; +static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, + uint16_t row, bool selected) { + SettingsBluetoothData *data = (SettingsBluetoothData *)context; if (row == 0) { - char device_name_buffer[BT_DEVICE_NAME_BUFFER_SIZE]; - const char *subtitle = NULL; - const char *title = i18n_get("Connection", data); - GBitmap *icon = NULL; - if (data->toggle_state == ToggleStateIdle) { - if (bt_ctl_is_airplane_mode_on()) { - subtitle = i18n_get("Airplane Mode", data); - icon = &data->icon_heap_bitmap[AirplaneIconIdx]; - } else { - // Always show device name as subtitle - bt_local_id_copy_device_name(device_name_buffer, false); - subtitle = device_name_buffer; - icon = &data->icon_heap_bitmap[BluetoothIconIdx]; - } + char device_name_buffer[BT_DEVICE_NAME_BUFFER_SIZE]; + const char *subtitle = NULL; + const char *title = i18n_get("Connection", data); + GBitmap *icon = NULL; + if (data->toggle_state == ToggleStateIdle) { + if (bt_ctl_is_airplane_mode_on()) { + subtitle = i18n_get("Airplane Mode", data); + icon = &data->icon_heap_bitmap[AirplaneIconIdx]; } else { - subtitle = (data->toggle_state == ToggleStateDisablingBluetooth) - ? i18n_get("Disabling...", data) : i18n_get("Enabling...", data); - icon = &data->icon_heap_bitmap[BluetoothAltIconIdx]; + // Always show device name as subtitle + bt_local_id_copy_device_name(device_name_buffer, false); + subtitle = device_name_buffer; + icon = &data->icon_heap_bitmap[BluetoothIconIdx]; } + } else { + subtitle = (data->toggle_state == ToggleStateDisablingBluetooth) + ? i18n_get("Disabling...", data) + : i18n_get("Enabling...", data); + icon = &data->icon_heap_bitmap[BluetoothAltIconIdx]; + } - menu_cell_basic_draw(ctx, cell_layer, title, subtitle, icon); + menu_cell_basic_draw(ctx, cell_layer, title, subtitle, icon); // TODO PBL-23111: Decide how we should show these strings on round displays #if PBL_RECT - // Hack: the pairing instruction is drawn in the cell callback, but outside of the cell... - const GDrawState draw_state = ctx->draw_state; - // Enable drawing outside of the cell: - ctx->draw_state.clip_box = ctx->dest_bitmap.bounds; - - graphics_context_set_text_color(ctx, GColorBlack); - GFont font = system_theme_get_font_for_default_size(TextStyleFont_MenuCellSubtitle); - const int16_t horizontal_inset = menu_cell_basic_horizontal_inset() * 3; - GRect box = cell_layer->bounds; - box.origin.x = horizontal_inset; - box.origin.y = menu_cell_basic_cell_height() + (int16_t)9; - box.size.w -= horizontal_inset * 2; - box.size.h = 83; - - if (!data->remote_list_head) { - if (bt_ctl_is_airplane_mode_on()) { - graphics_draw_text(ctx, i18n_get("Disable Airplane Mode to connect.", data), font, - box, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); - } else { - graphics_draw_text(ctx, i18n_get("Open the Pebble app on your phone to connect.", data), - font, box, GTextOverflowModeTrailingEllipsis, - GTextAlignmentCenter, NULL); - } + // Hack: the pairing instruction is drawn in the cell callback, but outside of the cell... + const GDrawState draw_state = ctx->draw_state; + // Enable drawing outside of the cell: + ctx->draw_state.clip_box = ctx->dest_bitmap.bounds; + + graphics_context_set_text_color(ctx, GColorBlack); + GFont font = system_theme_get_font_for_default_size(TextStyleFont_MenuCellSubtitle); + const int16_t horizontal_inset = menu_cell_basic_horizontal_inset() * 3; + GRect box = cell_layer->bounds; + box.origin.x = horizontal_inset; + box.origin.y = menu_cell_basic_cell_height() + (int16_t)9; + box.size.w -= horizontal_inset * 2; + box.size.h = 83; + + if (!data->remote_list_head) { + if (bt_ctl_is_airplane_mode_on()) { + graphics_draw_text(ctx, i18n_get("Disable Airplane Mode to connect.", data), font, box, + GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } else { - // Show message when any phone is paired (even if disconnected) - // Position the message lower to appear below the paired phone row - GRect msg_box = box; - msg_box.origin.y += menu_cell_basic_cell_height() - 10; - graphics_draw_text(ctx, i18n_get("Forget this device to pair a new device.", data), - font, msg_box, GTextOverflowModeTrailingEllipsis, - GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, i18n_get("Open the Pebble app on your phone to connect.", data), + font, box, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, + NULL); } + } else { + // Show message when any phone is paired (even if disconnected) + // Position the message lower to appear below the paired phone row + GRect msg_box = box; + msg_box.origin.y += menu_cell_basic_cell_height() - 10; + graphics_draw_text(ctx, i18n_get("Forget this device to pair a new device.", data), font, + msg_box, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + } - ctx->draw_state = draw_state; + ctx->draw_state = draw_state; #endif } else { const uint16_t device_index = row - 1; @@ -460,7 +458,7 @@ static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, } static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { - SettingsBluetoothData *data = (SettingsBluetoothData *) context; + SettingsBluetoothData *data = (SettingsBluetoothData *)context; if (row == 0) { settings_bluetooth_toggle_airplane_mode(data); return; @@ -469,7 +467,7 @@ static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { return; } prv_reload_remote_list(data); - StoredRemote* remote = (StoredRemote*) list_get_at(data->remote_list_head, row - 1); + StoredRemote *remote = (StoredRemote *)list_get_at(data->remote_list_head, row - 1); settings_remote_menu_push(data, remote); } @@ -481,7 +479,7 @@ static void prv_focus_handler(bool in_focus) { } static void prv_expand_cb(SettingsCallbacks *context) { - SettingsBluetoothData *data = (SettingsBluetoothData *) context; + SettingsBluetoothData *data = (SettingsBluetoothData *)context; settings_bluetooth_update_remotes_private(data); @@ -490,31 +488,31 @@ static void prv_expand_cb(SettingsCallbacks *context) { gap_le_device_name_request_all(); } - data->bt_airplane_event_info = (EventServiceInfo) { - .type = PEBBLE_BT_STATE_EVENT, - .handler = prv_settings_bluetooth_event_handler, - .context = data, + data->bt_airplane_event_info = (EventServiceInfo){ + .type = PEBBLE_BT_STATE_EVENT, + .handler = prv_settings_bluetooth_event_handler, + .context = data, }; - data->bt_connection_event_info = (EventServiceInfo) { - .type = PEBBLE_BT_CONNECTION_EVENT, - .handler = prv_settings_bluetooth_event_handler, - .context = data, + data->bt_connection_event_info = (EventServiceInfo){ + .type = PEBBLE_BT_CONNECTION_EVENT, + .handler = prv_settings_bluetooth_event_handler, + .context = data, }; - data->bt_pairing_event_info = (EventServiceInfo) { - .type = PEBBLE_BT_PAIRING_EVENT, - .handler = prv_settings_bluetooth_event_handler, - .context = data, + data->bt_pairing_event_info = (EventServiceInfo){ + .type = PEBBLE_BT_PAIRING_EVENT, + .handler = prv_settings_bluetooth_event_handler, + .context = data, }; - data->ble_device_name_updated_event_info = (EventServiceInfo) { - .type = PEBBLE_BLE_DEVICE_NAME_UPDATED_EVENT, - .handler = prv_settings_bluetooth_event_handler, - .context = data, + data->ble_device_name_updated_event_info = (EventServiceInfo){ + .type = PEBBLE_BLE_DEVICE_NAME_UPDATED_EVENT, + .handler = prv_settings_bluetooth_event_handler, + .context = data, }; #ifdef CONFIG_HRM - data->ble_hrm_sharing_event_info = (EventServiceInfo) { - .type = PEBBLE_BLE_HRM_SHARING_STATE_UPDATED_EVENT, - .handler = prv_settings_bluetooth_event_handler, - .context = data, + data->ble_hrm_sharing_event_info = (EventServiceInfo){ + .type = PEBBLE_BLE_HRM_SHARING_STATE_UPDATED_EVENT, + .handler = prv_settings_bluetooth_event_handler, + .context = data, }; event_service_client_subscribe(&data->ble_hrm_sharing_event_info); #endif @@ -522,29 +520,29 @@ static void prv_expand_cb(SettingsCallbacks *context) { event_service_client_subscribe(&data->bt_connection_event_info); event_service_client_subscribe(&data->bt_pairing_event_info); event_service_client_subscribe(&data->ble_device_name_updated_event_info); - + // Only enable pairing/advertising if there are no paired devices (single phone policy) data->did_enable_pairability = false; if (!data->remote_list_head) { bt_pairability_use(); data->did_enable_pairability = true; } - + // Reload & redraw after pairing popup - app_focus_service_subscribe_handlers((AppFocusHandlers) { .did_focus = prv_focus_handler }); + app_focus_service_subscribe_handlers((AppFocusHandlers){.did_focus = prv_focus_handler}); } // Turns off services that are part of the bluetooth settings menu such as enabling // discovery. We don't want to keep these services running longer than necessary because // they consume a fair amount of power static void prv_hide_cb(SettingsCallbacks *context) { - SettingsBluetoothData *data = (SettingsBluetoothData *) context; - + SettingsBluetoothData *data = (SettingsBluetoothData *)context; + // Only release pairability if we enabled it if (data->did_enable_pairability) { bt_pairability_release(); } - + #ifdef CONFIG_HRM event_service_client_unsubscribe(&data->ble_hrm_sharing_event_info); #endif @@ -556,7 +554,7 @@ static void prv_hide_cb(SettingsCallbacks *context) { } static void prv_deinit_cb(SettingsCallbacks *context) { - SettingsBluetoothData *data = (SettingsBluetoothData *) context; + SettingsBluetoothData *data = (SettingsBluetoothData *)context; i18n_free_all(data); @@ -575,14 +573,14 @@ static Window *prv_init(void) { gbitmap_init_with_resource(&data->icon_heap_bitmap[idx], ICON_RESOURCE_ID[idx]); } - data->callbacks = (SettingsCallbacks) { - .deinit = prv_deinit_cb, - .draw_row = prv_draw_row_cb, - .select_click = prv_select_click_cb, - .num_rows = prv_num_rows_cb, - .row_height = prv_row_height_cb, - .expand = prv_expand_cb, - .hide = prv_hide_cb, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_deinit_cb, + .draw_row = prv_draw_row_cb, + .select_click = prv_select_click_cb, + .num_rows = prv_num_rows_cb, + .row_height = prv_row_height_cb, + .expand = prv_expand_cb, + .hide = prv_hide_cb, }; return settings_window_create(SettingsMenuItemBluetooth, &data->callbacks); @@ -590,8 +588,8 @@ static Window *prv_init(void) { const SettingsModuleMetadata *settings_bluetooth_get_info(void) { static const SettingsModuleMetadata s_module_info = { - .name = i18n_noop("Bluetooth"), - .init = prv_init, + .name = i18n_noop("Bluetooth"), + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/bluetooth.h b/src/fw/apps/system/settings/bluetooth.h index 05e4531493..a603443249 100644 --- a/src/fw/apps/system/settings/bluetooth.h +++ b/src/fw/apps/system/settings/bluetooth.h @@ -31,7 +31,7 @@ void settings_bluetooth_update_remotes(struct SettingsBluetoothData *data); const SettingsModuleMetadata *settings_bluetooth_get_info(void); -bool settings_bluetooth_is_sharing_heart_rate_for_stored_remote(StoredRemote* remote); +bool settings_bluetooth_is_sharing_heart_rate_for_stored_remote(StoredRemote *remote); #define BT_FORGET_PAIRING_STR \ i18n_noop("Remember to also forget your Pebble's Bluetooth connection from your phone.") diff --git a/src/fw/apps/system/settings/certifications.h b/src/fw/apps/system/settings/certifications.h index c0de9b8a7b..671fedc179 100644 --- a/src/fw/apps/system/settings/certifications.h +++ b/src/fw/apps/system/settings/certifications.h @@ -7,36 +7,35 @@ #include - //! Which regulatory marks and/or IDs a given product should display. typedef struct RegulatoryFlags { -//! Australia Regulatory Compliance Mark - bool has_australia_rcm:1; -//! Canada IC ID - bool has_canada_ic:1; -//! Canada ISED ID - bool has_canada_ised:1; -//! China CMIIT ID - bool has_china_cmiit:1; -//! EU CE Mark - bool has_eu_ce:1; -//! EU WEEE Mark (wastebin with X) - bool has_eu_weee:1; -//! UKCA Mark - bool has_ukca:1; -//! Japan TELEC (Telecom Engineering Center) [R] mark and ID -//! (Radio equipment conformity) - bool has_japan_telec_r:1; -//! TELEC mark [T] mark and ID (Terminal equipment conformity) - bool has_japan_telec_t:1; -//! Korea -//! - KCC mark -//! - Details window with KCC mark and KCC ID - bool has_korea_kcc:1; -//! Mexico NOM NYCE mark - bool has_mexico_nom_nyce:1; -//! USA FCC Mark and FCC ID - bool has_usa_fcc:1; + //! Australia Regulatory Compliance Mark + bool has_australia_rcm : 1; + //! Canada IC ID + bool has_canada_ic : 1; + //! Canada ISED ID + bool has_canada_ised : 1; + //! China CMIIT ID + bool has_china_cmiit : 1; + //! EU CE Mark + bool has_eu_ce : 1; + //! EU WEEE Mark (wastebin with X) + bool has_eu_weee : 1; + //! UKCA Mark + bool has_ukca : 1; + //! Japan TELEC (Telecom Engineering Center) [R] mark and ID + //! (Radio equipment conformity) + bool has_japan_telec_r : 1; + //! TELEC mark [T] mark and ID (Terminal equipment conformity) + bool has_japan_telec_t : 1; + //! Korea + //! - KCC mark + //! - Details window with KCC mark and KCC ID + bool has_korea_kcc : 1; + //! Mexico NOM NYCE mark + bool has_mexico_nom_nyce : 1; + //! USA FCC Mark and FCC ID + bool has_usa_fcc : 1; } RegulatoryFlags; typedef struct CertificationIds { @@ -58,53 +57,50 @@ typedef struct CertificationIds { const char *usa_fcc_id; } CertificationIds; - -static const RegulatoryFlags s_regulatory_flags_fallback = { -}; +static const RegulatoryFlags s_regulatory_flags_fallback = {}; // Certification ID strings used for bigboards and such. static const CertificationIds s_certification_ids_fallback = { - .company_name = "ACME Inc.", - .product_type = "Product Type", - .trademark = "Product Trademark", - .place_of_origin = "Country of Origin", - .dc_input = "XV/YYYmA", - .rated_voltage = "X.XV", - .milliampere_hour = "XXXmAh", - .watt_hour = "X.XXWh", - .canada_ic_id = "XXXXXX-YYY", - .canada_ised_id = "XXXXXX-YYYYYYYYYYY", - .china_cmiit_id = "ABCDEFGHIJ", - .japan_telec_r_id = "XXX-YYYYYY", - .japan_telec_t_id = "D XX YYYY ZZZ", - .korea_kcc_id = "WWWW-XXX-YYY-ZZZ", - .mexico_ifetel_id = "RCPPEXXXX-YYYY", - .usa_fcc_id = "XXX-YYY", + .company_name = "ACME Inc.", + .product_type = "Product Type", + .trademark = "Product Trademark", + .place_of_origin = "Country of Origin", + .dc_input = "XV/YYYmA", + .rated_voltage = "X.XV", + .milliampere_hour = "XXXmAh", + .watt_hour = "X.XXWh", + .canada_ic_id = "XXXXXX-YYY", + .canada_ised_id = "XXXXXX-YYYYYYYYYYY", + .china_cmiit_id = "ABCDEFGHIJ", + .japan_telec_r_id = "XXX-YYYYYY", + .japan_telec_t_id = "D XX YYYY ZZZ", + .korea_kcc_id = "WWWW-XXX-YYY-ZZZ", + .mexico_ifetel_id = "RCPPEXXXX-YYYY", + .usa_fcc_id = "XXX-YYY", }; - static const RegulatoryFlags s_regulatory_flags_obelix = { - .has_canada_ised = true, - .has_eu_ce = true, - .has_eu_weee = true, - .has_ukca = true, - .has_usa_fcc = true, + .has_canada_ised = true, + .has_eu_ce = true, + .has_eu_weee = true, + .has_ukca = true, + .has_usa_fcc = true, }; static const CertificationIds s_certification_ids_obelix = { - .company_name = "Core Devices LLC", - .product_type = "Smart watch", - .trademark = "Pebble", - .place_of_origin = "Made in China", - .dc_input = "5 V / 300 mA", - .rated_voltage = "3.8 V", - .milliampere_hour = "185 mAh", - .watt_hour = "0.71 Wh", - .canada_ised_id = "34223-PEBBLETIME2", - .usa_fcc_id = "2BQB2-PEBBLETIME2", + .company_name = "Core Devices LLC", + .product_type = "Smart watch", + .trademark = "Pebble", + .place_of_origin = "Made in China", + .dc_input = "5 V / 300 mA", + .rated_voltage = "3.8 V", + .milliampere_hour = "185 mAh", + .watt_hour = "0.71 Wh", + .canada_ised_id = "34223-PEBBLETIME2", + .usa_fcc_id = "2BQB2-PEBBLETIME2", }; -static const RegulatoryFlags * prv_get_regulatory_flags(void) { +static const RegulatoryFlags *prv_get_regulatory_flags(void) { #ifdef CONFIG_BOARD_ASTERIX // TODO: add applicable flags return &s_regulatory_flags_fallback; @@ -116,7 +112,7 @@ static const RegulatoryFlags * prv_get_regulatory_flags(void) { } //! Don't call this function directly. Use the prv_get_*_id functions instead. -static const CertificationIds * prv_get_certification_ids(void) { +static const CertificationIds *prv_get_certification_ids(void) { #ifdef CONFIG_BOARD_ASTERIX // TODO: add real certification ids return &s_certification_ids_fallback; @@ -127,10 +123,9 @@ static const CertificationIds * prv_get_certification_ids(void) { #endif } -#define ID_GETTER(ID_KIND) \ - static const char * prv_get_##ID_KIND(void) { \ - return prv_get_certification_ids()->ID_KIND ?: \ - s_certification_ids_fallback.ID_KIND; \ +#define ID_GETTER(ID_KIND) \ + static const char *prv_get_##ID_KIND(void) { \ + return prv_get_certification_ids()->ID_KIND ?: s_certification_ids_fallback.ID_KIND; \ } ID_GETTER(company_name) diff --git a/src/fw/apps/system/settings/display.c b/src/fw/apps/system/settings/display.c index a219479f36..748eeb6571 100644 --- a/src/fw/apps/system/settings/display.c +++ b/src/fw/apps/system/settings/display.c @@ -30,15 +30,15 @@ typedef struct SettingsDisplayData { typedef struct SettingsBacklightData { SettingsCallbacks callbacks; - char als_value_buffer[16]; // Buffer for ALS value display + char als_value_buffer[16]; // Buffer for ALS value display char backlight_percent_buffer[16]; // Buffer for backlight percentage display - AppTimer *update_timer; // Timer for live updating debug values - bool als_primed; // Whether we currently hold an ambient_light_prime() ref + AppTimer *update_timer; // Timer for live updating debug values + bool als_primed; // Whether we currently hold an ambient_light_prime() ref } SettingsBacklightData; static const char *s_language_labels[] = { - [ShellLanguageInstalledPack] = i18n_noop("Custom"), - [ShellLanguageEnglish] = "English", + [ShellLanguageInstalledPack] = i18n_noop("Custom"), + [ShellLanguageEnglish] = "English", }; static void prv_language_menu_select(OptionMenu *option_menu, int selection, void *context) { @@ -48,21 +48,20 @@ static void prv_language_menu_select(OptionMenu *option_menu, int selection, voi static void prv_language_menu_push(SettingsDisplayData *data) { const OptionMenuCallbacks callbacks = { - .select = prv_language_menu_select, + .select = prv_language_menu_select, }; settings_option_menu_push(i18n_noop("Language"), OptionMenuContentType_SingleLine, - shell_prefs_get_language(), &callbacks, - ARRAY_LENGTH(s_language_labels), false /* icons_enabled */, - s_language_labels, data); + shell_prefs_get_language(), &callbacks, ARRAY_LENGTH(s_language_labels), + false /* icons_enabled */, s_language_labels, data); } // Text Size ///////////////////////////// static const char *s_text_size_names[] = { - [SettingsContentSize_Small] = i18n_noop("Smaller"), - [SettingsContentSize_Default] = i18n_ctx_noop("TextSize", "Default"), - [SettingsContentSize_Large] = i18n_noop("Larger"), + [SettingsContentSize_Small] = i18n_noop("Smaller"), + [SettingsContentSize_Default] = i18n_ctx_noop("TextSize", "Default"), + [SettingsContentSize_Large] = i18n_noop("Larger"), }; static void prv_text_size_menu_select(OptionMenu *option_menu, int selection, void *context) { @@ -72,36 +71,33 @@ static void prv_text_size_menu_select(OptionMenu *option_menu, int selection, vo static void prv_text_size_menu_push(SettingsDisplayData *data) { const OptionMenuCallbacks callbacks = { - .select = prv_text_size_menu_select, + .select = prv_text_size_menu_select, }; /// The option in the Settings app for choosing the text size of the system UI. const char *title = i18n_noop("Text Size"); const SettingsContentSize index = settings_content_size_from_preferred_size(system_theme_get_content_size()); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, SettingsContentSizeCount, - true /* icons_enabled */, s_text_size_names, data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + SettingsContentSizeCount, true /* icons_enabled */, s_text_size_names, + data); } // Intensity Settings ///////////////////////////// -static const uint32_t s_intensity_values[] = { 10, 25, 50, 100 }; +static const uint32_t s_intensity_values[] = {10, 25, 50, 100}; static const char *s_intensity_labels[] = { - i18n_noop("Low"), - i18n_noop("Medium"), - i18n_noop("High"), - i18n_noop("Blinding") + i18n_noop("Low"), i18n_noop("Medium"), i18n_noop("High"), i18n_noop("Blinding") }; #define BACKLIGHT_SCALE_GRANULARITY 5 // Normalize the result from light get brightness as it sometimes // will round down/up by a % static uint8_t prv_get_scaled_brightness(void) { - return BACKLIGHT_SCALE_GRANULARITY - * ((backlight_get_intensity() + BACKLIGHT_SCALE_GRANULARITY - 1) - / BACKLIGHT_SCALE_GRANULARITY); + return BACKLIGHT_SCALE_GRANULARITY * + ((backlight_get_intensity() + BACKLIGHT_SCALE_GRANULARITY - 1) / + BACKLIGHT_SCALE_GRANULARITY); } static int prv_intensity_get_selection_index() { @@ -125,12 +121,12 @@ static void prv_intensity_menu_select(OptionMenu *option_menu, int selection, vo static void prv_intensity_menu_push(SettingsBacklightData *data) { const int index = prv_intensity_get_selection_index(); const OptionMenuCallbacks callbacks = { - .select = prv_intensity_menu_select, + .select = prv_intensity_menu_select, }; const char *title = PBL_IF_RECT_ELSE(i18n_noop("INTENSITY"), i18n_noop("Intensity")); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, ARRAY_LENGTH(s_intensity_labels), - true /* icons_enabled */, s_intensity_labels, data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_intensity_labels), true /* icons_enabled */, + s_intensity_labels, data); } #ifdef CONFIG_ORIENTATION_MANAGER @@ -173,12 +169,10 @@ static void prv_display_orientation_menu_push(SettingsDisplayData *data) { // Timeout Settings ///////////////////////////// -static const uint32_t s_timeout_values[] = { 3000, 5000, 8000 }; +static const uint32_t s_timeout_values[] = {3000, 5000, 8000}; static const char *s_timeout_labels[] = { - i18n_noop("3 Seconds"), - i18n_noop("5 Seconds"), - i18n_noop("8 Seconds") + i18n_noop("3 Seconds"), i18n_noop("5 Seconds"), i18n_noop("8 Seconds") }; static int prv_timeout_get_selection_index() { @@ -199,12 +193,12 @@ static void prv_timeout_menu_select(OptionMenu *option_menu, int selection, void static void prv_timeout_menu_push(SettingsBacklightData *data) { int index = prv_timeout_get_selection_index(); const OptionMenuCallbacks callbacks = { - .select = prv_timeout_menu_select, + .select = prv_timeout_menu_select, }; const char *title = PBL_IF_RECT_ELSE(i18n_noop("TIMEOUT"), i18n_noop("Timeout")); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, ARRAY_LENGTH(s_timeout_labels), - true /* icons_enabled */, s_timeout_labels, data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_timeout_labels), true /* icons_enabled */, + s_timeout_labels, data); } // Touch Wake Settings @@ -224,12 +218,12 @@ static void prv_touch_wake_menu_select(OptionMenu *option_menu, int selection, v static void prv_touch_wake_menu_push(SettingsBacklightData *data) { const int index = (int)backlight_get_touch_wake(); const OptionMenuCallbacks callbacks = { - .select = prv_touch_wake_menu_select, + .select = prv_touch_wake_menu_select, }; const char *title = PBL_IF_RECT_ELSE(i18n_noop("WAKE ON TOUCH"), i18n_noop("Wake on touch")); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, - ARRAY_LENGTH(s_touch_wake_labels), true /* icons_enabled */, s_touch_wake_labels, data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_touch_wake_labels), true /* icons_enabled */, + s_touch_wake_labels, data); } #endif @@ -251,13 +245,13 @@ static void prv_dynamic_mode_menu_select(OptionMenu *option_menu, int selection, static void prv_dynamic_mode_menu_push(SettingsBacklightData *data) { const int index = (int)backlight_get_dynamic_mode(); const OptionMenuCallbacks callbacks = { - .select = prv_dynamic_mode_menu_select, + .select = prv_dynamic_mode_menu_select, }; - const char *title = PBL_IF_RECT_ELSE(i18n_noop("DYNAMIC BACKLIGHT"), - i18n_noop("Dynamic Backlight")); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, - ARRAY_LENGTH(s_dynamic_mode_labels), true /* icons_enabled */, s_dynamic_mode_labels, data); + const char *title = + PBL_IF_RECT_ELSE(i18n_noop("DYNAMIC BACKLIGHT"), i18n_noop("Dynamic Backlight")); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_dynamic_mode_labels), true /* icons_enabled */, + s_dynamic_mode_labels, data); } #endif @@ -285,22 +279,19 @@ static void prv_preset_menu_select(OptionMenu *option_menu, int selection, void static void prv_preset_menu_push(SettingsDisplayData *data) { const int index = (int)backlight_get_preset(); const OptionMenuCallbacks callbacks = { - .select = prv_preset_menu_select, + .select = prv_preset_menu_select, }; const char *title = PBL_IF_RECT_ELSE(i18n_noop("BACKLIGHT"), i18n_noop("Backlight")); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, - ARRAY_LENGTH(s_backlight_preset_labels), true /* icons_enabled */, - s_backlight_preset_labels, data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_backlight_preset_labels), true /* icons_enabled */, + s_backlight_preset_labels, data); } // Legacy App Mode Settings (Obelix only) ///////////////////////////// #ifdef CONFIG_APP_SCALING static const char *s_legacy_app_mode_labels[] = { - i18n_noop("Centered"), - i18n_noop("Scaled (Nearest)"), - i18n_noop("Scaled (Bilinear)") + i18n_noop("Centered"), i18n_noop("Scaled (Nearest)"), i18n_noop("Scaled (Bilinear)") }; static void prv_legacy_app_mode_menu_select(OptionMenu *option_menu, int selection, void *context) { @@ -311,13 +302,12 @@ static void prv_legacy_app_mode_menu_select(OptionMenu *option_menu, int selecti static void prv_legacy_app_mode_menu_push(SettingsDisplayData *data) { const int index = (int)shell_prefs_get_legacy_app_render_mode(); const OptionMenuCallbacks callbacks = { - .select = prv_legacy_app_mode_menu_select, + .select = prv_legacy_app_mode_menu_select, }; const char *title = i18n_noop("Legacy App Display"); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, - ARRAY_LENGTH(s_legacy_app_mode_labels), - false /* icons_enabled */, s_legacy_app_mode_labels, data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_legacy_app_mode_labels), false /* icons_enabled */, + s_legacy_app_mode_labels, data); } #endif @@ -372,7 +362,7 @@ static uint16_t prv_backlight_item_from_row(uint16_t row) { } static void prv_backlight_select_click_cb(SettingsCallbacks *context, uint16_t row) { - SettingsBacklightData *data = (SettingsBacklightData*)context; + SettingsBacklightData *data = (SettingsBacklightData *)context; switch (prv_backlight_item_from_row(row)) { case SettingsBacklightMode: light_toggle_enabled(); @@ -408,7 +398,7 @@ static void prv_backlight_select_click_cb(SettingsCallbacks *context, uint16_t r static void prv_backlight_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, uint16_t row, bool selected) { - SettingsBacklightData *data = (SettingsBacklightData*) context; + SettingsBacklightData *data = (SettingsBacklightData *)context; const char *title = NULL; const char *subtitle = NULL; switch (prv_backlight_item_from_row(row)) { @@ -445,8 +435,8 @@ static void prv_backlight_draw_row_cb(SettingsCallbacks *context, GContext *ctx, title = i18n_noop("Ambient Sensor"); if (backlight_is_ambient_sensor_enabled()) { uint32_t als_value = light_get_ambient_lux(); - snprintf(data->als_value_buffer, sizeof(data->als_value_buffer), - i18n_get("On (%d)", data), (int)als_value); + snprintf(data->als_value_buffer, sizeof(data->als_value_buffer), i18n_get("On (%d)", data), + (int)als_value); subtitle = data->als_value_buffer; } else { subtitle = i18n_ctx_noop("DeviceState", "Off"); @@ -491,16 +481,16 @@ static uint16_t prv_backlight_num_rows_cb(SettingsCallbacks *context) { // the ALS reading and the dynamic-backlight percentage subtitle. #define UPDATE_INTERVAL_MS 500 static void prv_backlight_update_timer_cb(void *context) { - SettingsBacklightData *data = (SettingsBacklightData*)context; + SettingsBacklightData *data = (SettingsBacklightData *)context; settings_menu_mark_dirty(SettingsMenuItemDisplay); data->update_timer = app_timer_register(UPDATE_INTERVAL_MS, prv_backlight_update_timer_cb, data); } static void prv_backlight_appear_cb(SettingsCallbacks *context) { - SettingsBacklightData *data = (SettingsBacklightData*)context; + SettingsBacklightData *data = (SettingsBacklightData *)context; if (!data->update_timer) { - data->update_timer = app_timer_register(UPDATE_INTERVAL_MS, - prv_backlight_update_timer_cb, data); + data->update_timer = + app_timer_register(UPDATE_INTERVAL_MS, prv_backlight_update_timer_cb, data); } // Hold the ALS in continuous mode while this submenu is visible so the // 500 ms refresh tick doesn't pay a full integration time per read. @@ -511,7 +501,7 @@ static void prv_backlight_appear_cb(SettingsCallbacks *context) { } static void prv_backlight_hide_cb(SettingsCallbacks *context) { - SettingsBacklightData *data = (SettingsBacklightData*)context; + SettingsBacklightData *data = (SettingsBacklightData *)context; if (data->update_timer) { app_timer_cancel(data->update_timer); data->update_timer = NULL; @@ -523,7 +513,7 @@ static void prv_backlight_hide_cb(SettingsCallbacks *context) { } static void prv_backlight_deinit_cb(SettingsCallbacks *context) { - SettingsBacklightData *data = (SettingsBacklightData*) context; + SettingsBacklightData *data = (SettingsBacklightData *)context; if (data->update_timer) { app_timer_cancel(data->update_timer); data->update_timer = NULL; @@ -540,18 +530,18 @@ static void prv_backlight_submenu_push(void) { SettingsBacklightData *data = app_malloc_check(sizeof(*data)); *data = (SettingsBacklightData){}; - data->callbacks = (SettingsCallbacks) { - .deinit = prv_backlight_deinit_cb, - .draw_row = prv_backlight_draw_row_cb, - .select_click = prv_backlight_select_click_cb, - .num_rows = prv_backlight_num_rows_cb, - .appear = prv_backlight_appear_cb, - .hide = prv_backlight_hide_cb, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_backlight_deinit_cb, + .draw_row = prv_backlight_draw_row_cb, + .select_click = prv_backlight_select_click_cb, + .num_rows = prv_backlight_num_rows_cb, + .appear = prv_backlight_appear_cb, + .hide = prv_backlight_hide_cb, }; const char *title = i18n_noop("Backlight Settings"); - Window *window = settings_window_create_with_title(SettingsMenuItemDisplay, - title, &data->callbacks); + Window *window = + settings_window_create_with_title(SettingsMenuItemDisplay, title, &data->callbacks); app_window_stack_push(window, true /* animated */); } @@ -626,7 +616,7 @@ static void prv_display_select_click_cb(SettingsCallbacks *context, uint16_t row #endif #ifdef CONFIG_ORIENTATION_MANAGER case SettingsDisplayOrientation: - prv_display_orientation_menu_push((SettingsDisplayData*)context); + prv_display_orientation_menu_push((SettingsDisplayData *)context); break; #endif case SettingsDisplayTextSize: @@ -637,7 +627,7 @@ static void prv_display_select_click_cb(SettingsCallbacks *context, uint16_t row break; #ifdef CONFIG_APP_SCALING case SettingsDisplayLegacyAppMode: - prv_legacy_app_mode_menu_push((SettingsDisplayData*)context); + prv_legacy_app_mode_menu_push((SettingsDisplayData *)context); break; #endif default: @@ -649,7 +639,7 @@ static void prv_display_select_click_cb(SettingsCallbacks *context, uint16_t row static void prv_display_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, uint16_t row, bool selected) { - SettingsDisplayData *data = (SettingsDisplayData*) context; + SettingsDisplayData *data = (SettingsDisplayData *)context; const char *title = NULL; const char *subtitle = NULL; switch (prv_display_item_from_row(row)) { @@ -712,7 +702,7 @@ static uint16_t prv_display_num_rows_cb(SettingsCallbacks *context) { } static void prv_display_deinit_cb(SettingsCallbacks *context) { - SettingsDisplayData *data = (SettingsDisplayData*) context; + SettingsDisplayData *data = (SettingsDisplayData *)context; i18n_free_all(data); app_free(data); } @@ -721,11 +711,11 @@ static Window *prv_init(void) { SettingsDisplayData *data = app_malloc_check(sizeof(*data)); *data = (SettingsDisplayData){}; - data->callbacks = (SettingsCallbacks) { - .deinit = prv_display_deinit_cb, - .draw_row = prv_display_draw_row_cb, - .select_click = prv_display_select_click_cb, - .num_rows = prv_display_num_rows_cb, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_display_deinit_cb, + .draw_row = prv_display_draw_row_cb, + .select_click = prv_display_select_click_cb, + .num_rows = prv_display_num_rows_cb, }; return settings_window_create(SettingsMenuItemDisplay, &data->callbacks); @@ -733,8 +723,8 @@ static Window *prv_init(void) { const SettingsModuleMetadata *settings_display_get_info(void) { static const SettingsModuleMetadata s_module_info = { - .name = i18n_noop("Display"), - .init = prv_init, + .name = i18n_noop("Display"), + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/factory_reset.c b/src/fw/apps/system/settings/factory_reset.c index 5e1aa542ea..c09f53459e 100644 --- a/src/fw/apps/system/settings/factory_reset.c +++ b/src/fw/apps/system/settings/factory_reset.c @@ -50,7 +50,7 @@ static void confirm_click_handler(ClickRecognizerRef recognizer, Window *window) peek_layer_init(peek_layer, &window->layer.bounds); peek_layer_set_title_font(peek_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); TimelineResourceInfo timeline_res = { - .res_id = TIMELINE_RESOURCE_GENERIC_WARNING, + .res_id = TIMELINE_RESOURCE_GENERIC_WARNING, }; peek_layer_set_icon(peek_layer, &timeline_res); peek_layer_set_title(peek_layer, i18n_get("Resetting...", data)); @@ -60,8 +60,8 @@ static void confirm_click_handler(ClickRecognizerRef recognizer, Window *window) // give it a chance to animate const uint32_t factory_reset_start_delay = 100; - app_timer_register(PEEK_LAYER_UNFOLD_DURATION + factory_reset_start_delay, - start_factory_reset, NULL); + app_timer_register(PEEK_LAYER_UNFOLD_DURATION + factory_reset_start_delay, start_factory_reset, + NULL); } //! Wipe registry + Enter Standby (for factory) @@ -80,9 +80,9 @@ static void decline_click_handler(ClickRecognizerRef recognizer, Window *window) } static void config_provider(Window *window) { - window_single_click_subscribe(BUTTON_ID_UP, (ClickHandler) confirm_click_handler); - window_long_click_subscribe(BUTTON_ID_UP, 1200, (ClickHandler) confirm_long_click_handler, NULL); - window_single_click_subscribe(BUTTON_ID_DOWN, (ClickHandler) decline_click_handler); + window_single_click_subscribe(BUTTON_ID_UP, (ClickHandler)confirm_click_handler); + window_long_click_subscribe(BUTTON_ID_UP, 1200, (ClickHandler)confirm_long_click_handler, NULL); + window_single_click_subscribe(BUTTON_ID_DOWN, (ClickHandler)decline_click_handler); (void)window; } @@ -100,9 +100,9 @@ static void prv_window_load(Window *window) { const GColor text_color = PBL_IF_COLOR_ELSE(GColorWhite, GColorBlack); TextLayer *msg_text_layer = &data->msg_text_layer; - GRect msg_text_frame = (GRect) { - .origin = GPoint(x_margin_px, msg_text_y_offset_px), - .size = GSize(width - (2 * x_margin_px), msg_text_max_height_px) + GRect msg_text_frame = (GRect){ + .origin = GPoint(x_margin_px, msg_text_y_offset_px), + .size = GSize(width - (2 * x_margin_px), msg_text_max_height_px) }; text_layer_init_with_parameters(msg_text_layer, &msg_text_frame, i18n_get("Perform factory reset?", data), @@ -121,14 +121,13 @@ static void prv_window_load(Window *window) { const uint16_t forget_text_y_offset_px = msg_text_y_offset_px + msg_text_height_px + text_spacing; TextLayer *forget_text_layer = &data->forget_text_layer; - const GRect forget_text_frame = (GRect) { - .origin = GPoint(x_margin_px, forget_text_y_offset_px), - .size = GSize(width - (2 * x_margin_px), root_layer_bounds->size.h - forget_text_y_offset_px) + const GRect forget_text_frame = (GRect){ + .origin = GPoint(x_margin_px, forget_text_y_offset_px), + .size = GSize(width - (2 * x_margin_px), root_layer_bounds->size.h - forget_text_y_offset_px) }; - text_layer_init_with_parameters(forget_text_layer, &forget_text_frame, - i18n_get(BT_FORGET_PAIRING_STR, data), - fonts_get_system_font(FONT_KEY_GOTHIC_18), text_color, - GColorClear, alignment, overflow_mode); + text_layer_init_with_parameters( + forget_text_layer, &forget_text_frame, i18n_get(BT_FORGET_PAIRING_STR, data), + fonts_get_system_font(FONT_KEY_GOTHIC_18), text_color, GColorClear, alignment, overflow_mode); layer_add_child(&window->layer, &forget_text_layer->layer); #if PBL_ROUND text_layer_enable_screen_text_flow_and_paging(forget_text_layer, text_flow_inset); @@ -139,7 +138,7 @@ static void prv_window_load(Window *window) { action_bar_layer_init(action_bar); action_bar_layer_set_context(action_bar, window); action_bar_layer_add_to_window(action_bar, window); - action_bar_layer_set_click_config_provider(action_bar, (ClickConfigProvider) config_provider); + action_bar_layer_set_click_config_provider(action_bar, (ClickConfigProvider)config_provider); action_bar_layer_set_icon(action_bar, BUTTON_ID_UP, data->action_bar_icon_check); action_bar_layer_set_icon(action_bar, BUTTON_ID_DOWN, data->action_bar_icon_x); } @@ -153,15 +152,15 @@ static void prv_window_unload(Window *window) { } void settings_factory_reset_window_push(void) { - ConfirmUIData *data = (ConfirmUIData*)app_malloc_check(sizeof(ConfirmUIData)); + ConfirmUIData *data = (ConfirmUIData *)app_malloc_check(sizeof(ConfirmUIData)); *data = (ConfirmUIData){}; Window *window = &data->window; window_init(window, "Settings Factory Reset"); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); #if PBL_COLOR window_set_background_color(window, GColorCobaltBlue); #endif diff --git a/src/fw/apps/system/settings/health.c b/src/fw/apps/system/settings/health.c index a0290927a5..c6688fcc63 100644 --- a/src/fw/apps/system/settings/health.c +++ b/src/fw/apps/system/settings/health.c @@ -15,7 +15,7 @@ #include "pbl/util/size.h" typedef struct SettingsHealthData { - SettingsCallbacks callbacks; + SettingsCallbacks callbacks; } SettingsHealthData; static const char *s_units_distance_labels[] = { @@ -33,13 +33,13 @@ static const char *s_hrm_interval_labels[] = { #endif enum SettingsHealthItem { - SettingsHealthTrackingEnabled, - SettingsHealthUnitDistance, + SettingsHealthTrackingEnabled, + SettingsHealthUnitDistance, #ifdef CONFIG_HRM - SettingsHealthHRMonitoringInterval, - SettingsHealthHRActivityTracking, + SettingsHealthHRMonitoringInterval, + SettingsHealthHRActivityTracking, #endif - NumSettingsHealthItems + NumSettingsHealthItems }; #ifdef CONFIG_HRM @@ -47,20 +47,19 @@ enum SettingsHealthItem { ///////////////////////////// static void prv_hrm_interval_menu_select(OptionMenu *option_menu, int selection, void *context) { - activity_prefs_set_hrm_measurement_interval((HRMonitoringInterval)selection); - app_window_stack_remove(&option_menu->window, true /*animated*/); + activity_prefs_set_hrm_measurement_interval((HRMonitoringInterval)selection); + app_window_stack_remove(&option_menu->window, true /*animated*/); } static void prv_hrm_interval_menu_push(SettingsHealthData *data) { - const int index = (int)activity_prefs_get_hrm_measurement_interval(); - const OptionMenuCallbacks callbacks = { - .select = prv_hrm_interval_menu_select, - }; - const char *title = i18n_noop("HR Monitoring"); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, - ARRAY_LENGTH(s_hrm_interval_labels), true /* icons_enabled */, - s_hrm_interval_labels, data); + const int index = (int)activity_prefs_get_hrm_measurement_interval(); + const OptionMenuCallbacks callbacks = { + .select = prv_hrm_interval_menu_select, + }; + const char *title = i18n_noop("HR Monitoring"); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_hrm_interval_labels), true /* icons_enabled */, + s_hrm_interval_labels, data); } #endif @@ -68,99 +67,98 @@ static void prv_hrm_interval_menu_push(SettingsHealthData *data) { ///////////////////////////// static void prv_deinit_cb(SettingsCallbacks *context) { - SettingsHealthData *data = (SettingsHealthData*)context; + SettingsHealthData *data = (SettingsHealthData *)context; - i18n_free_all(data); - app_free(data); + i18n_free_all(data); + app_free(data); } -static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, - const Layer *cell_layer, uint16_t row, bool selected) { - SettingsHealthData *data = (SettingsHealthData*) context; - - const char *title = NULL; - const char *subtitle = NULL; - - switch (row) { - case SettingsHealthTrackingEnabled: { - title = i18n_noop("Health Tracking"); - subtitle = activity_prefs_tracking_is_enabled() - ? i18n_noop("On") : i18n_noop("Off"); - break; - } - case SettingsHealthUnitDistance: { - title = i18n_noop("Distance Unit"); - UnitsDistance unit = shell_prefs_get_units_distance(); - if (unit >= UnitsDistanceCount) { - subtitle = i18n_noop("Unknown"); - } else { - subtitle = s_units_distance_labels[unit]; - } - break; - } +static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, + uint16_t row, bool selected) { + SettingsHealthData *data = (SettingsHealthData *)context; + + const char *title = NULL; + const char *subtitle = NULL; + + switch (row) { + case SettingsHealthTrackingEnabled: { + title = i18n_noop("Health Tracking"); + subtitle = activity_prefs_tracking_is_enabled() ? i18n_noop("On") : i18n_noop("Off"); + break; + } + case SettingsHealthUnitDistance: { + title = i18n_noop("Distance Unit"); + UnitsDistance unit = shell_prefs_get_units_distance(); + if (unit >= UnitsDistanceCount) { + subtitle = i18n_noop("Unknown"); + } else { + subtitle = s_units_distance_labels[unit]; + } + break; + } #ifdef CONFIG_HRM - case SettingsHealthHRMonitoringInterval: { - title = i18n_noop("HR Monitoring"); - HRMonitoringInterval interval = activity_prefs_get_hrm_measurement_interval(); - if (interval >= HRMonitoringIntervalCount) { - subtitle = i18n_noop("Unknown"); - } else { - subtitle = s_hrm_interval_labels[interval]; - } - break; - } - case SettingsHealthHRActivityTracking: { - title = i18n_noop("HR During Activity"); - subtitle = activity_prefs_hrm_activity_tracking_is_enabled() - ? i18n_noop("On") : i18n_noop("Off"); - break; - } -#endif - default: - WTF; + case SettingsHealthHRMonitoringInterval: { + title = i18n_noop("HR Monitoring"); + HRMonitoringInterval interval = activity_prefs_get_hrm_measurement_interval(); + if (interval >= HRMonitoringIntervalCount) { + subtitle = i18n_noop("Unknown"); + } else { + subtitle = s_hrm_interval_labels[interval]; + } + break; + } + case SettingsHealthHRActivityTracking: { + title = i18n_noop("HR During Activity"); + subtitle = + activity_prefs_hrm_activity_tracking_is_enabled() ? i18n_noop("On") : i18n_noop("Off"); + break; } - menu_cell_basic_draw(ctx, cell_layer, i18n_get(title, data), i18n_get(subtitle, data), NULL); +#endif + default: + WTF; + } + menu_cell_basic_draw(ctx, cell_layer, i18n_get(title, data), i18n_get(subtitle, data), NULL); } static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { - switch (row) { - case SettingsHealthTrackingEnabled: { - bool new_value = !activity_prefs_tracking_is_enabled(); - activity_prefs_tracking_set_enabled(new_value); - if (new_value) { - activity_start_tracking(false); - } else { - activity_stop_tracking(); - } - break; - } - case SettingsHealthUnitDistance: { - UnitsDistance unit = shell_prefs_get_units_distance(); - unit = (unit + 1) % UnitsDistanceCount; - shell_prefs_set_units_distance(unit); - break; - } + switch (row) { + case SettingsHealthTrackingEnabled: { + bool new_value = !activity_prefs_tracking_is_enabled(); + activity_prefs_tracking_set_enabled(new_value); + if (new_value) { + activity_start_tracking(false); + } else { + activity_stop_tracking(); + } + break; + } + case SettingsHealthUnitDistance: { + UnitsDistance unit = shell_prefs_get_units_distance(); + unit = (unit + 1) % UnitsDistanceCount; + shell_prefs_set_units_distance(unit); + break; + } #ifdef CONFIG_HRM - case SettingsHealthHRMonitoringInterval: - prv_hrm_interval_menu_push((SettingsHealthData*)context); - break; - case SettingsHealthHRActivityTracking: - activity_prefs_set_hrm_activity_tracking_enabled( - !activity_prefs_hrm_activity_tracking_is_enabled()); - break; + case SettingsHealthHRMonitoringInterval: + prv_hrm_interval_menu_push((SettingsHealthData *)context); + break; + case SettingsHealthHRActivityTracking: + activity_prefs_set_hrm_activity_tracking_enabled( + !activity_prefs_hrm_activity_tracking_is_enabled()); + break; #endif - default: - WTF; - } - settings_menu_reload_data(SettingsMenuItemHealth); - settings_menu_mark_dirty(SettingsMenuItemHealth); + default: + WTF; + } + settings_menu_reload_data(SettingsMenuItemHealth); + settings_menu_mark_dirty(SettingsMenuItemHealth); } static uint16_t prv_num_rows_cb(SettingsCallbacks *context) { - if (!activity_prefs_tracking_is_enabled()) { - return 1; // Only show the Health Tracking toggle - } - return NumSettingsHealthItems; + if (!activity_prefs_tracking_is_enabled()) { + return 1; // Only show the Health Tracking toggle + } + return NumSettingsHealthItems; } static void prv_appear_cb(SettingsCallbacks *context) { @@ -170,26 +168,26 @@ static void prv_hide_cb(SettingsCallbacks *context) { } static Window *prv_init(void) { - SettingsHealthData *data = app_malloc_check(sizeof(*data)); - *data = (SettingsHealthData){}; - - data->callbacks = (SettingsCallbacks) { - .deinit = prv_deinit_cb, - .draw_row = prv_draw_row_cb, - .select_click = prv_select_click_cb, - .num_rows = prv_num_rows_cb, - .appear = prv_appear_cb, - .hide = prv_hide_cb, - }; - - return settings_window_create(SettingsMenuItemHealth, &data->callbacks); + SettingsHealthData *data = app_malloc_check(sizeof(*data)); + *data = (SettingsHealthData){}; + + data->callbacks = (SettingsCallbacks){ + .deinit = prv_deinit_cb, + .draw_row = prv_draw_row_cb, + .select_click = prv_select_click_cb, + .num_rows = prv_num_rows_cb, + .appear = prv_appear_cb, + .hide = prv_hide_cb, + }; + + return settings_window_create(SettingsMenuItemHealth, &data->callbacks); } const SettingsModuleMetadata *settings_health_get_info(void) { - static const SettingsModuleMetadata s_module_info = { - .name = i18n_noop("Health"), - .init = prv_init, - }; + static const SettingsModuleMetadata s_module_info = { + .name = i18n_noop("Health"), + .init = prv_init, + }; - return &s_module_info; + return &s_module_info; } \ No newline at end of file diff --git a/src/fw/apps/system/settings/menu.c b/src/fw/apps/system/settings/menu.c index 15c078e601..5b88a8deaa 100644 --- a/src/fw/apps/system/settings/menu.c +++ b/src/fw/apps/system/settings/menu.c @@ -21,20 +21,20 @@ #include "system/passert.h" static const SettingsModuleGetMetadata s_submodule_registry[] = { - [SettingsMenuItemBluetooth] = settings_bluetooth_get_info, - [SettingsMenuItemNotifications] = settings_notifications_get_info, - [SettingsMenuItemVibrations] = settings_vibe_patterns_get_info, - [SettingsMenuItemQuietTime] = settings_quiet_time_get_info, - [SettingsMenuItemTimeline] = settings_timeline_get_info, - [SettingsMenuItemHealth] = settings_health_get_info, - [SettingsMenuItemActivity] = settings_activity_tracker_get_info, - [SettingsMenuItemQuickLaunch] = settings_quick_launch_get_info, - [SettingsMenuItemDateTime] = settings_time_get_info, - [SettingsMenuItemDisplay] = settings_display_get_info, + [SettingsMenuItemBluetooth] = settings_bluetooth_get_info, + [SettingsMenuItemNotifications] = settings_notifications_get_info, + [SettingsMenuItemVibrations] = settings_vibe_patterns_get_info, + [SettingsMenuItemQuietTime] = settings_quiet_time_get_info, + [SettingsMenuItemTimeline] = settings_timeline_get_info, + [SettingsMenuItemHealth] = settings_health_get_info, + [SettingsMenuItemActivity] = settings_activity_tracker_get_info, + [SettingsMenuItemQuickLaunch] = settings_quick_launch_get_info, + [SettingsMenuItemDateTime] = settings_time_get_info, + [SettingsMenuItemDisplay] = settings_display_get_info, #ifdef CONFIG_THEMING - [SettingsMenuItemThemes] = settings_themes_get_info, + [SettingsMenuItemThemes] = settings_themes_get_info, #endif - [SettingsMenuItemSystem] = settings_system_get_info, + [SettingsMenuItemSystem] = settings_system_get_info, }; const SettingsModuleMetadata *settings_menu_get_submodule_info(SettingsMenuItem category) { diff --git a/src/fw/apps/system/settings/menu.h b/src/fw/apps/system/settings/menu.h index c7a7eadc8e..a903e79060 100644 --- a/src/fw/apps/system/settings/menu.h +++ b/src/fw/apps/system/settings/menu.h @@ -10,7 +10,6 @@ #include - typedef enum { SettingsMenuItemBluetooth = 0, SettingsMenuItemNotifications, diff --git a/src/fw/apps/system/settings/notifications.c b/src/fw/apps/system/settings/notifications.c index 53cb911781..224b3ff9b2 100644 --- a/src/fw/apps/system/settings/notifications.c +++ b/src/fw/apps/system/settings/notifications.c @@ -47,15 +47,15 @@ enum NotificationsItem { // these arrays static const AlertMask s_alert_mode_values[NUM_ALERT_MODES_IN_LIST] = { - AlertMaskAllOn, - AlertMaskPhoneCalls, - AlertMaskAllOff, + AlertMaskAllOn, + AlertMaskPhoneCalls, + AlertMaskAllOff, }; static const char *s_alert_mode_labels[NUM_ALERT_MODES_IN_LIST] = { - i18n_noop("Allow All Notifications"), - i18n_noop("Allow Phone Calls Only"), - i18n_noop("Mute All Notifications"), + i18n_noop("Allow All Notifications"), + i18n_noop("Allow Phone Calls Only"), + i18n_noop("Mute All Notifications"), }; static const char *prv_alert_mask_to_label(AlertMask mask) { @@ -84,41 +84,35 @@ static void prv_filter_menu_push(SettingsNotificationsData *data) { } } const OptionMenuCallbacks callbacks = { - .select = prv_filter_menu_select, + .select = prv_filter_menu_select, }; /// The option in the Settings app for filtering notifications by type. const char *title = i18n_noop("Filter"); - settings_option_menu_push( - title, OptionMenuContentType_DoubleLine, index, &callbacks, cycle_len, - true /* icons_enabled */, s_alert_mode_labels, data); + settings_option_menu_push(title, OptionMenuContentType_DoubleLine, index, &callbacks, cycle_len, + true /* icons_enabled */, s_alert_mode_labels, data); } // Window Timeout //////////////////////// // NOTE: Keep the following two arrays in sync and with the same size. -static const uint32_t s_window_timeouts_ms[] = { - 15 * MS_PER_SECOND, - 30 * MS_PER_SECOND, - 1 * MS_PER_MINUTE, - NOTIF_WINDOW_TIMEOUT_DEFAULT, - 10 * MS_PER_MINUTE, - NOTIF_WINDOW_TIMEOUT_INFINITE -}; +static const uint32_t s_window_timeouts_ms[] = {15 * MS_PER_SECOND, 30 * MS_PER_SECOND, + 1 * MS_PER_MINUTE, NOTIF_WINDOW_TIMEOUT_DEFAULT, + 10 * MS_PER_MINUTE, NOTIF_WINDOW_TIMEOUT_INFINITE}; static const char *s_window_timeouts_labels[] = { - /// 15 Second Notification Window Timeout - i18n_noop("15 Seconds"), - /// 30 Second Notification Window Timeout - i18n_noop("30 Seconds"), - /// 1 Minute Notification Window Timeout - i18n_noop("1 Minute"), - /// 3 Minute Notification Window Timeout - i18n_noop("3 Minutes"), - /// 10 Minute Notification Window Timeout - i18n_noop("10 Minutes"), - /// No Notification Window Timeout - i18n_noop("None"), + /// 15 Second Notification Window Timeout + i18n_noop("15 Seconds"), + /// 30 Second Notification Window Timeout + i18n_noop("30 Seconds"), + /// 1 Minute Notification Window Timeout + i18n_noop("1 Minute"), + /// 3 Minute Notification Window Timeout + i18n_noop("3 Minutes"), + /// 10 Minute Notification Window Timeout + i18n_noop("10 Minutes"), + /// No Notification Window Timeout + i18n_noop("None"), }; _Static_assert(ARRAY_LENGTH(s_window_timeouts_ms) == ARRAY_LENGTH(s_window_timeouts_labels), ""); @@ -147,14 +141,13 @@ static void prv_window_timeout_menu_select(OptionMenu *option_menu, int selectio static void prv_window_timeout_menu_push(SettingsNotificationsData *data) { const int index = prv_window_timeout_get_selection_index(); const OptionMenuCallbacks callbacks = { - .select = prv_window_timeout_menu_select, + .select = prv_window_timeout_menu_select, }; /// Status bar title for the Notification Window Timeout settings screen const char *title = i18n_noop("Timeout"); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, - ARRAY_LENGTH(s_window_timeouts_labels), true /* icons_enabled */, s_window_timeouts_labels, - data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_window_timeouts_labels), true /* icons_enabled */, + s_window_timeouts_labels, data); } // Design Style @@ -162,10 +155,10 @@ static void prv_window_timeout_menu_push(SettingsNotificationsData *data) { #if PBL_BW static const char *s_design_style_labels[] = { - /// Standard notification design option (default) - i18n_noop("Classic"), - /// Alternative notification design option - i18n_noop("Flat Black"), + /// Standard notification design option (default) + i18n_noop("Classic"), + /// Alternative notification design option + i18n_noop("Flat Black"), }; static int prv_design_style_get_selection_index(void) { @@ -180,14 +173,13 @@ static void prv_design_style_menu_select(OptionMenu *option_menu, int selection, static void prv_design_style_menu_push(SettingsNotificationsData *data) { const int index = prv_design_style_get_selection_index(); const OptionMenuCallbacks callbacks = { - .select = prv_design_style_menu_select, + .select = prv_design_style_menu_select, }; /// Status bar title for the Notification Design Style settings screen const char *title = i18n_noop("Banner Style"); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, - ARRAY_LENGTH(s_design_style_labels), true /* icons_enabled */, s_design_style_labels, - data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_design_style_labels), true /* icons_enabled */, + s_design_style_labels, data); } #endif /* PBL_BW */ @@ -195,10 +187,10 @@ static void prv_design_style_menu_push(SettingsNotificationsData *data) { //////////////////////// static const char *s_vibe_delay_labels[] = { - /// Vibrate at the beginning of notification animation (immediate) - i18n_noop("Beginning"), - /// Vibrate at the end of notification animation (delayed) - i18n_noop("End"), + /// Vibrate at the beginning of notification animation (immediate) + i18n_noop("Beginning"), + /// Vibrate at the end of notification animation (delayed) + i18n_noop("End"), }; static int prv_vibe_delay_get_selection_index(void) { @@ -213,30 +205,28 @@ static void prv_vibe_delay_menu_select(OptionMenu *option_menu, int selection, v static void prv_vibe_delay_menu_push(SettingsNotificationsData *data) { const int index = prv_vibe_delay_get_selection_index(); const OptionMenuCallbacks callbacks = { - .select = prv_vibe_delay_menu_select, + .select = prv_vibe_delay_menu_select, }; /// Status bar title for the Notification Vibe Timing settings screen const char *title = i18n_noop("Vibe Timing"); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, - ARRAY_LENGTH(s_vibe_delay_labels), true /* icons_enabled */, s_vibe_delay_labels, - data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_vibe_delay_labels), true /* icons_enabled */, + s_vibe_delay_labels, data); } // Status Bar Style //////////////////////// static const char *s_status_bar_style_labels[] = { - [NotificationStatusBarStyle_Default] = i18n_ctx_noop("StatusBar", "Default"), - [NotificationStatusBarStyle_Bold] = i18n_noop("Bold"), - [NotificationStatusBarStyle_LargeBold] = i18n_noop("Big & Bold"), + [NotificationStatusBarStyle_Default] = i18n_ctx_noop("StatusBar", "Default"), + [NotificationStatusBarStyle_Bold] = i18n_noop("Bold"), + [NotificationStatusBarStyle_LargeBold] = i18n_noop("Big & Bold"), }; _Static_assert(ARRAY_LENGTH(s_status_bar_style_labels) == NotificationStatusBarStyleCount, ""); static int prv_status_bar_style_get_selection_index(void) { - const NotificationStatusBarStyle style = - alerts_preferences_get_notification_status_bar_style(); + const NotificationStatusBarStyle style = alerts_preferences_get_notification_status_bar_style(); return (style < NotificationStatusBarStyleCount) ? (int)style : 0; } @@ -249,14 +239,13 @@ static void prv_status_bar_style_menu_select(OptionMenu *option_menu, int select static void prv_status_bar_style_menu_push(SettingsNotificationsData *data) { const int index = prv_status_bar_style_get_selection_index(); const OptionMenuCallbacks callbacks = { - .select = prv_status_bar_style_menu_select, + .select = prv_status_bar_style_menu_select, }; /// Status bar title for the Notification Status Bar Style settings screen const char *title = i18n_noop("Clock Style"); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, - ARRAY_LENGTH(s_status_bar_style_labels), true /* icons_enabled */, - s_status_bar_style_labels, data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_status_bar_style_labels), true /* icons_enabled */, + s_status_bar_style_labels, data); } // Menu Layer Callbacks @@ -266,8 +255,8 @@ static uint16_t prv_num_rows_cb(SettingsCallbacks *context) { return NotificationsItem_Count; } -static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, - const Layer *cell_layer, uint16_t row, bool selected) { +static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, + uint16_t row, bool selected) { SettingsNotificationsData *data = ((SettingsOptionMenuData *)context)->context; const char *subtitle = NULL; const char *title = NULL; @@ -283,14 +272,14 @@ static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, subtitle = s_window_timeouts_labels[prv_window_timeout_get_selection_index()]; break; } - #if PBL_BW +#if PBL_BW case NotificationsItemDesignStyle: { /// String within Settings->Notifications that describes the notification design style title = i18n_noop("Banner Style"); subtitle = s_design_style_labels[prv_design_style_get_selection_index()]; break; } - #endif /* PBL_BW */ +#endif /* PBL_BW */ case NotificationsItemVibeDelay: { /// String within Settings->Notifications that describes when vibration happens title = i18n_noop("Vibe Timing"); @@ -300,8 +289,8 @@ static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, case NotificationsItemBacklight: { /// String within Settings->Notifications that describes backlight setting title = i18n_noop("Backlight"); - subtitle = alerts_preferences_get_notification_backlight() ? - i18n_noop("On") : i18n_noop("Off"); + subtitle = + alerts_preferences_get_notification_backlight() ? i18n_noop("On") : i18n_noop("Off"); break; } case NotificationsItemStatusBarStyle: { @@ -324,7 +313,7 @@ static void prv_deinit_cb(SettingsCallbacks *context) { } static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { - SettingsNotificationsData *data = (SettingsNotificationsData *) context; + SettingsNotificationsData *data = (SettingsNotificationsData *)context; switch (row) { case NotificationsItemFilter: @@ -367,33 +356,32 @@ static void prv_settings_notifications_event_handler(PebbleEvent *event, void *c } static void prv_expand_cb(SettingsCallbacks *context) { - SettingsNotificationsData *data = (SettingsNotificationsData *) context; + SettingsNotificationsData *data = (SettingsNotificationsData *)context; - data->battery_connection_event_info = (EventServiceInfo) { - .type = PEBBLE_BATTERY_CONNECTION_EVENT, - .handler = prv_settings_notifications_event_handler, + data->battery_connection_event_info = (EventServiceInfo){ + .type = PEBBLE_BATTERY_CONNECTION_EVENT, + .handler = prv_settings_notifications_event_handler, }; event_service_client_subscribe(&data->battery_connection_event_info); - } static void prv_hide_cb(SettingsCallbacks *context) { - SettingsNotificationsData *data = (SettingsNotificationsData *) context; + SettingsNotificationsData *data = (SettingsNotificationsData *)context; event_service_client_unsubscribe(&data->battery_connection_event_info); } static Window *prv_init(void) { - SettingsNotificationsData* data = app_malloc_check(sizeof(*data)); + SettingsNotificationsData *data = app_malloc_check(sizeof(*data)); *data = (SettingsNotificationsData){}; - data->callbacks = (SettingsCallbacks) { - .deinit = prv_deinit_cb, - .draw_row = prv_draw_row_cb, - .select_click = prv_select_click_cb, - .num_rows = prv_num_rows_cb, - .expand = prv_expand_cb, - .hide = prv_hide_cb, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_deinit_cb, + .draw_row = prv_draw_row_cb, + .select_click = prv_select_click_cb, + .num_rows = prv_num_rows_cb, + .expand = prv_expand_cb, + .hide = prv_hide_cb, }; return settings_window_create(SettingsMenuItemNotifications, &data->callbacks); @@ -401,8 +389,8 @@ static Window *prv_init(void) { const SettingsModuleMetadata *settings_notifications_get_info(void) { static const SettingsModuleMetadata s_module_info = { - .name = i18n_noop("Notifications"), - .init = prv_init, + .name = i18n_noop("Notifications"), + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/option_menu.c b/src/fw/apps/system/settings/option_menu.c index c41d872aec..6744a316ad 100644 --- a/src/fw/apps/system/settings/option_menu.c +++ b/src/fw/apps/system/settings/option_menu.c @@ -29,31 +29,31 @@ static void prv_menu_draw_row(OptionMenu *option_menu, GContext *ctx, const Laye option_menu_system_draw_row(option_menu, ctx, cell_layer, cell_frame, title, selected, context); } -OptionMenu *settings_option_menu_create( - const char *i18n_title_key, OptionMenuContentType content_type, int choice, - const OptionMenuCallbacks *callbacks_ref, uint16_t num_rows, bool icons_enabled, - const char **rows, void *context) { +OptionMenu *settings_option_menu_create(const char *i18n_title_key, + OptionMenuContentType content_type, int choice, + const OptionMenuCallbacks *callbacks_ref, uint16_t num_rows, + bool icons_enabled, const char **rows, void *context) { OptionMenu *option_menu = option_menu_create(); if (!option_menu) { return NULL; } GColor highlight_bg = shell_prefs_get_theme_highlight_color(); const OptionMenuConfig config = { - .title = i18n_get(i18n_title_key, option_menu), - .content_type = content_type, - .choice = choice, - .status_colors = { GColorWhite, GColorBlack }, - .highlight_colors = { highlight_bg, gcolor_legible_over(highlight_bg) }, - .icons_enabled = icons_enabled, + .title = i18n_get(i18n_title_key, option_menu), + .content_type = content_type, + .choice = choice, + .status_colors = {GColorWhite, GColorBlack}, + .highlight_colors = {highlight_bg, gcolor_legible_over(highlight_bg)}, + .icons_enabled = icons_enabled, }; option_menu_configure(option_menu, &config); SettingsOptionMenuData *data = task_malloc_check(sizeof(SettingsOptionMenuData)); OptionMenuCallbacks callbacks = *callbacks_ref; - *data = (SettingsOptionMenuData) { - .callbacks = callbacks, - .context = context, - .num_rows = num_rows, - .rows = rows, + *data = (SettingsOptionMenuData){ + .callbacks = callbacks, + .context = context, + .num_rows = num_rows, + .rows = rows, }; callbacks.draw_row = prv_menu_draw_row; callbacks.get_num_rows = prv_menu_get_num_rows; @@ -62,11 +62,11 @@ OptionMenu *settings_option_menu_create( return option_menu; } -OptionMenu *settings_option_menu_push( - const char *i18n_title_key, OptionMenuContentType content_type, int choice, - const OptionMenuCallbacks *callbacks_ref, uint16_t num_rows, bool icons_enabled, - const char **rows, void *context) { - OptionMenu * const option_menu = settings_option_menu_create( +OptionMenu *settings_option_menu_push(const char *i18n_title_key, + OptionMenuContentType content_type, int choice, + const OptionMenuCallbacks *callbacks_ref, uint16_t num_rows, + bool icons_enabled, const char **rows, void *context) { + OptionMenu *const option_menu = settings_option_menu_create( i18n_title_key, content_type, choice, callbacks_ref, num_rows, icons_enabled, rows, context); if (option_menu) { const bool animated = true; diff --git a/src/fw/apps/system/settings/option_menu.h b/src/fw/apps/system/settings/option_menu.h index c53f065004..31856a6c16 100644 --- a/src/fw/apps/system/settings/option_menu.h +++ b/src/fw/apps/system/settings/option_menu.h @@ -10,14 +10,14 @@ typedef struct { uint16_t num_rows; } SettingsOptionMenuData; -OptionMenu *settings_option_menu_create( - const char *i18n_title_key, OptionMenuContentType content_type, int choice, - const OptionMenuCallbacks *callbacks, uint16_t num_rows, bool icons_enabled, const char **rows, - void *context); +OptionMenu *settings_option_menu_create(const char *i18n_title_key, + OptionMenuContentType content_type, int choice, + const OptionMenuCallbacks *callbacks, uint16_t num_rows, + bool icons_enabled, const char **rows, void *context); -OptionMenu *settings_option_menu_push( - const char *i18n_title_key, OptionMenuContentType content_type, int choice, - const OptionMenuCallbacks *callbacks, uint16_t num_rows, bool icons_enabled, const char **rows, - void *context); +OptionMenu *settings_option_menu_push(const char *i18n_title_key, + OptionMenuContentType content_type, int choice, + const OptionMenuCallbacks *callbacks, uint16_t num_rows, + bool icons_enabled, const char **rows, void *context); void *settings_option_menu_get_context(SettingsOptionMenuData *data); diff --git a/src/fw/apps/system/settings/quick_launch.c b/src/fw/apps/system/settings/quick_launch.c index aab2d10122..3f15570bea 100644 --- a/src/fw/apps/system/settings/quick_launch.c +++ b/src/fw/apps/system/settings/quick_launch.c @@ -40,22 +40,22 @@ typedef struct QuickLaunchData { } QuickLaunchData; static const char *s_row_titles[NUM_ROWS] = { - /// Shown in Quick Launch Settings as the title of the tap up button option. - [ROW_TAP_UP] = i18n_noop("Tap Up"), - /// Shown in Quick Launch Settings as the title of the tap down button option. - [ROW_TAP_DOWN] = i18n_noop("Tap Down"), - /// Shown in Quick Launch Settings as the title of the hold up button quick launch option. - [ROW_HOLD_UP] = i18n_noop("Hold Up"), - /// Shown in Quick Launch Settings as the title of the hold center button quick launch option. - [ROW_HOLD_SELECT] = i18n_noop("Hold Center"), - /// Shown in Quick Launch Settings as the title of the hold down button quick launch option. - [ROW_HOLD_DOWN] = i18n_noop("Hold Down"), - /// Shown in Quick Launch Settings as the title of the hold back button quick launch option. - [ROW_HOLD_BACK] = i18n_noop("Hold Back"), + /// Shown in Quick Launch Settings as the title of the tap up button option. + [ROW_TAP_UP] = i18n_noop("Tap Up"), + /// Shown in Quick Launch Settings as the title of the tap down button option. + [ROW_TAP_DOWN] = i18n_noop("Tap Down"), + /// Shown in Quick Launch Settings as the title of the hold up button quick launch option. + [ROW_HOLD_UP] = i18n_noop("Hold Up"), + /// Shown in Quick Launch Settings as the title of the hold center button quick launch option. + [ROW_HOLD_SELECT] = i18n_noop("Hold Center"), + /// Shown in Quick Launch Settings as the title of the hold down button quick launch option. + [ROW_HOLD_DOWN] = i18n_noop("Hold Down"), + /// Shown in Quick Launch Settings as the title of the hold back button quick launch option. + [ROW_HOLD_BACK] = i18n_noop("Hold Back"), }; -static void prv_get_subtitle_string(AppInstallId app_id, QuickLaunchData *data, - char *buffer, uint8_t buf_len) { +static void prv_get_subtitle_string(AppInstallId app_id, QuickLaunchData *data, char *buffer, + uint8_t buf_len) { if (app_id == INSTALL_ID_INVALID) { /// Shown in Quick Launch Settings when the button is disabled. i18n_get_with_buffer("Disabled", buffer, buf_len); @@ -75,7 +75,7 @@ static void prv_get_subtitle_string(AppInstallId app_id, QuickLaunchData *data, // Filter List Callbacks //////////////////////// static void prv_deinit_cb(SettingsCallbacks *context) { - QuickLaunchData *data = (QuickLaunchData *) context; + QuickLaunchData *data = (QuickLaunchData *)context; i18n_free_all(data); app_free(data); } @@ -86,10 +86,10 @@ static void prv_update_app_names(QuickLaunchData *data) { data->app_names[ROW_TAP_UP], APP_NAME_SIZE_BYTES); prv_get_subtitle_string(quick_launch_single_click_get_app(BUTTON_ID_DOWN), data, data->app_names[ROW_TAP_DOWN], APP_NAME_SIZE_BYTES); - + // Hold buttons - prv_get_subtitle_string(quick_launch_get_app(BUTTON_ID_UP), data, - data->app_names[ROW_HOLD_UP], APP_NAME_SIZE_BYTES); + prv_get_subtitle_string(quick_launch_get_app(BUTTON_ID_UP), data, data->app_names[ROW_HOLD_UP], + APP_NAME_SIZE_BYTES); prv_get_subtitle_string(quick_launch_get_app(BUTTON_ID_SELECT), data, data->app_names[ROW_HOLD_SELECT], APP_NAME_SIZE_BYTES); prv_get_subtitle_string(quick_launch_get_app(BUTTON_ID_DOWN), data, @@ -98,8 +98,8 @@ static void prv_update_app_names(QuickLaunchData *data) { data->app_names[ROW_HOLD_BACK], APP_NAME_SIZE_BYTES); } -static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, - const Layer *cell_layer, uint16_t row, bool selected) { +static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, + uint16_t row, bool selected) { QuickLaunchData *data = (QuickLaunchData *)context; PBL_ASSERTN(row < NUM_ROWS); const char *title = i18n_get(s_row_titles[row], data); @@ -113,11 +113,16 @@ static uint16_t prv_get_initial_selection_cb(SettingsCallbacks *context) { ButtonId button = app_launch_button(); // Map button to hold row (quick launch is always hold/long press) switch (button) { - case BUTTON_ID_UP: return ROW_HOLD_UP; - case BUTTON_ID_SELECT: return ROW_HOLD_SELECT; - case BUTTON_ID_DOWN: return ROW_HOLD_DOWN; - case BUTTON_ID_BACK: return ROW_HOLD_BACK; - default: break; + case BUTTON_ID_UP: + return ROW_HOLD_UP; + case BUTTON_ID_SELECT: + return ROW_HOLD_SELECT; + case BUTTON_ID_DOWN: + return ROW_HOLD_DOWN; + case BUTTON_ID_BACK: + return ROW_HOLD_BACK; + default: + break; } } return 0; @@ -125,10 +130,10 @@ static uint16_t prv_get_initial_selection_cb(SettingsCallbacks *context) { static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { PBL_ASSERTN(row < NUM_ROWS); - + ButtonId button; bool is_tap; - + switch (row) { case ROW_TAP_UP: button = BUTTON_ID_UP; @@ -157,7 +162,7 @@ static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { default: return; } - + quick_launch_app_menu_window_push(button, is_tap); } @@ -174,13 +179,13 @@ static Window *prv_init(void) { QuickLaunchData *data = app_malloc_check(sizeof(*data)); *data = (QuickLaunchData){}; - data->callbacks = (SettingsCallbacks) { - .deinit = prv_deinit_cb, - .draw_row = prv_draw_row_cb, - .get_initial_selection = prv_get_initial_selection_cb, - .select_click = prv_select_click_cb, - .num_rows = prv_num_rows_cb, - .appear = prv_appear, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_deinit_cb, + .draw_row = prv_draw_row_cb, + .get_initial_selection = prv_get_initial_selection_cb, + .select_click = prv_select_click_cb, + .num_rows = prv_num_rows_cb, + .appear = prv_appear, }; return settings_window_create(SettingsMenuItemQuickLaunch, &data->callbacks); @@ -188,9 +193,9 @@ static Window *prv_init(void) { const SettingsModuleMetadata *settings_quick_launch_get_info(void) { static const SettingsModuleMetadata s_module_info = { - /// Title of the Quick Launch Settings submenu in Settings - .name = i18n_noop("Quick Launch"), - .init = prv_init, + /// Title of the Quick Launch Settings submenu in Settings + .name = i18n_noop("Quick Launch"), + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/quick_launch_app_menu.c b/src/fw/apps/system/settings/quick_launch_app_menu.c index c90d1c5ced..ef5c0e71bc 100644 --- a/src/fw/apps/system/settings/quick_launch_app_menu.c +++ b/src/fw/apps/system/settings/quick_launch_app_menu.c @@ -29,7 +29,6 @@ typedef struct { #define NUM_CUSTOM_CELLS 1 - /* Callback Functions */ static bool prv_app_filter_callback(struct AppMenuDataSource *source, AppInstallEntry *entry) { @@ -37,15 +36,15 @@ static bool prv_app_filter_callback(struct AppMenuDataSource *source, AppInstall const Uuid timeline_future_uuid = TIMELINE_UUID_INIT; const Uuid timeline_past_uuid = TIMELINE_PAST_UUID_INIT; const Uuid timeline_full_uuid = TIMELINE_FULL_UUID_INIT; - + if (app_install_entry_is_watchface(entry)) { - return false; // Skip watchfaces + return false; // Skip watchfaces } if (app_install_entry_is_hidden(entry) && !app_install_entry_is_quick_launch_visible_only(entry)) { - return false; // Skip hidden apps unless they are quick launch visible + return false; // Skip hidden apps unless they are quick launch visible } - + // For tap buttons, filter Timeline apps based on button if (data->is_tap) { if (data->button == BUTTON_ID_UP) { @@ -66,7 +65,7 @@ static bool prv_app_filter_callback(struct AppMenuDataSource *source, AppInstall } } } - + return true; } @@ -75,16 +74,15 @@ static uint16_t prv_menu_get_num_rows(OptionMenu *option_menu, void *context) { return app_menu_data_source_get_count(&data->data_source) + NUM_CUSTOM_CELLS; } -static void prv_menu_draw_row(OptionMenu *option_menu, GContext* ctx, const Layer *cell_layer, +static void prv_menu_draw_row(OptionMenu *option_menu, GContext *ctx, const Layer *cell_layer, const GRect *text_frame, uint32_t row, bool selected, void *context) { - QuickLaunchAppMenuData *data = context; const char *text = NULL; if (row == 0) { text = i18n_get("Disable", data); } else { - AppMenuNode *node = app_menu_data_source_get_node_at_index(&data->data_source, - row - NUM_CUSTOM_CELLS); + AppMenuNode *node = + app_menu_data_source_get_node_at_index(&data->data_source, row - NUM_CUSTOM_CELLS); text = node->name; } option_menu_system_draw_row(option_menu, ctx, cell_layer, text_frame, text, selected, context); @@ -104,7 +102,7 @@ static void prv_menu_select(OptionMenu *option_menu, int selection, void *contex } app_window_stack_pop(true); } else { - AppMenuNode* app_menu_node = + AppMenuNode *app_menu_node = app_menu_data_source_get_node_at_index(&data->data_source, selection - NUM_CUSTOM_CELLS); if (data->is_tap) { quick_launch_single_click_set_app(data->button, app_menu_node->install_id); @@ -137,31 +135,39 @@ void quick_launch_app_menu_window_push(ButtonId button, bool is_tap) { OptionMenu *option_menu = option_menu_create(); data->option_menu = option_menu; - app_menu_data_source_init(&data->data_source, &(AppMenuDataSourceCallbacks) { - .changed = prv_menu_reload_data, - .filter = prv_app_filter_callback, - }, data); + app_menu_data_source_init(&data->data_source, + &(AppMenuDataSourceCallbacks){ + .changed = prv_menu_reload_data, + .filter = prv_app_filter_callback, + }, + data); - const AppInstallId install_id = is_tap ? quick_launch_single_click_get_app(button) - : quick_launch_get_app(button); - const int app_index = app_menu_data_source_get_index_of_app_with_install_id(&data->data_source, - install_id); + const AppInstallId install_id = + is_tap ? quick_launch_single_click_get_app(button) : quick_launch_get_app(button); + const int app_index = + app_menu_data_source_get_index_of_app_with_install_id(&data->data_source, install_id); GColor highlight_bg = shell_prefs_get_theme_highlight_color(); const OptionMenuConfig config = { - .title = i18n_get(i18n_noop("Quick Launch"), data), - .choice = (install_id == INSTALL_ID_INVALID) ? 0 : (app_index + NUM_CUSTOM_CELLS), - .status_colors = { GColorWhite, GColorBlack, }, - .highlight_colors = { highlight_bg, gcolor_legible_over(highlight_bg) }, - .icons_enabled = true, + .title = i18n_get(i18n_noop("Quick Launch"), data), + .choice = (install_id == INSTALL_ID_INVALID) ? 0 : (app_index + NUM_CUSTOM_CELLS), + .status_colors = + { + GColorWhite, + GColorBlack, + }, + .highlight_colors = {highlight_bg, gcolor_legible_over(highlight_bg)}, + .icons_enabled = true, }; option_menu_configure(option_menu, &config); - option_menu_set_callbacks(option_menu, &(OptionMenuCallbacks) { - .select = prv_menu_select, - .get_num_rows = prv_menu_get_num_rows, - .draw_row = prv_menu_draw_row, - .unload = prv_menu_unload, - }, data); + option_menu_set_callbacks(option_menu, + &(OptionMenuCallbacks){ + .select = prv_menu_select, + .get_num_rows = prv_menu_get_num_rows, + .draw_row = prv_menu_draw_row, + .unload = prv_menu_unload, + }, + data); const bool animated = true; app_window_stack_push(&option_menu->window, animated); diff --git a/src/fw/apps/system/settings/quick_launch_setup_menu.c b/src/fw/apps/system/settings/quick_launch_setup_menu.c index 364a6d4f0a..fc1a1ebedd 100644 --- a/src/fw/apps/system/settings/quick_launch_setup_menu.c +++ b/src/fw/apps/system/settings/quick_launch_setup_menu.c @@ -40,12 +40,14 @@ static void prv_handle_quick_launch_confirm(ClickRecognizerRef recognizer, void } static void prv_push_first_use_dialog(void) { - const void *i18n_owner = prv_push_first_use_dialog; // Use this function as the i18n owner + const void *i18n_owner = prv_push_first_use_dialog; // Use this function as the i18n owner /// Title for the Quick Launch first use dialog. const char *header = i18n_get("Quick Launch", i18n_owner); /// Help text for the Quick Launch first use dialog. - const char *text = i18n_get("Open favorite apps quickly with a long button press from your " - "watchface.", i18n_owner); + const char *text = i18n_get( + "Open favorite apps quickly with a long button press from your " + "watchface.", + i18n_owner); ExpandableDialog *expandable_dialog = expandable_dialog_create_with_params( WINDOW_NAME("Quick Launch First Use"), RESOURCE_ID_SUNNY_DAY_TINY, text, GColorBlack, GColorWhite, NULL, RESOURCE_ID_ACTION_BAR_ICON_CHECK, prv_handle_quick_launch_confirm); @@ -73,16 +75,18 @@ static void prv_main(void) { app_event_loop(); } -const PebbleProcessMd* quick_launch_setup_get_app_info(void) { +const PebbleProcessMd *quick_launch_setup_get_app_info(void) { static const PebbleProcessMdSystem s_quick_launch_setup_app = { - .common = { - .visibility = ProcessVisibilityHidden, - .main_func = prv_main, - // UUID: 07e0d9cb-8957-4bf7-9d42-aaaaaaaaaaaa - .uuid = {0x07, 0xe0, 0xd9, 0xcb, 0x89, 0x57, 0x4b, 0xf7, - 0x9d, 0x42, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, - }, - .name = "Quick Launch", + .common = + { + .visibility = ProcessVisibilityHidden, + .main_func = prv_main, + // UUID: 07e0d9cb-8957-4bf7-9d42-aaaaaaaaaaaa + .uuid = + {0x07, 0xe0, 0xd9, 0xcb, 0x89, 0x57, 0x4b, 0xf7, 0x9d, 0x42, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa}, + }, + .name = "Quick Launch", }; - return (const PebbleProcessMd*) &s_quick_launch_setup_app; + return (const PebbleProcessMd *)&s_quick_launch_setup_app; } diff --git a/src/fw/apps/system/settings/quick_launch_setup_menu.h b/src/fw/apps/system/settings/quick_launch_setup_menu.h index 5bdf866cff..6cd1551d93 100644 --- a/src/fw/apps/system/settings/quick_launch_setup_menu.h +++ b/src/fw/apps/system/settings/quick_launch_setup_menu.h @@ -8,4 +8,4 @@ #include "process_management/pebble_process_md.h" #include "shell/normal/quick_launch.h" -const PebbleProcessMd* quick_launch_setup_get_app_info(void); +const PebbleProcessMd *quick_launch_setup_get_app_info(void); diff --git a/src/fw/apps/system/settings/quiet_time.c b/src/fw/apps/system/settings/quiet_time.c index 669bee7d39..5e9ef8d804 100644 --- a/src/fw/apps/system/settings/quiet_time.c +++ b/src/fw/apps/system/settings/quiet_time.c @@ -69,8 +69,8 @@ enum QuietTimeBacklightItem { #endif static const AlertMask s_dnd_mask_cycle[] = { - AlertMaskAllOff, - AlertMaskPhoneCalls, + AlertMaskAllOff, + AlertMaskPhoneCalls, }; static AlertMask prv_cycle_dnd_mask(void) { @@ -103,7 +103,6 @@ static const char *prv_get_dnd_mask_subtitle(void *i18n_key) { return title; } - static void prv_get_dnd_time(DoNotDisturbScheduleType type, char *time_string, const uint8_t len) { DoNotDisturbSchedule schedule; do_not_disturb_get_schedule(type, &schedule); @@ -125,19 +124,18 @@ enum { DNDMenuItem_Count }; -static void prv_toggle_scheduled_dnd(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_toggle_scheduled_dnd(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { - do_not_disturb_toggle_scheduled((DoNotDisturbScheduleType) item->action_data); + do_not_disturb_toggle_scheduled((DoNotDisturbScheduleType)item->action_data); } static void prv_complete_schedule(TimeRangeSelectionWindowData *schedule_window, void *data) { - DoNotDisturbScheduleType type = (DoNotDisturbScheduleType) data; + DoNotDisturbScheduleType type = (DoNotDisturbScheduleType)data; DoNotDisturbSchedule schedule = { - .from_hour = schedule_window->from.hour, - .from_minute = schedule_window->from.minute, - .to_hour = schedule_window->to.hour, - .to_minute = schedule_window->to.minute, + .from_hour = schedule_window->from.hour, + .from_minute = schedule_window->from.minute, + .to_hour = schedule_window->to.hour, + .to_minute = schedule_window->to.minute, }; if (schedule.from_hour == schedule.to_hour && schedule.from_minute == schedule.to_minute) { @@ -157,8 +155,8 @@ static void prv_time_range_select_window_push(DoNotDisturbScheduleType type, DoNotDisturbSchedule schedule; do_not_disturb_get_schedule(type, &schedule); TimeRangeSelectionWindowData *schedule_window = &data->schedule_window; - time_range_selection_window_init(schedule_window, GColorCobaltBlue, - prv_complete_schedule, (void*)(uintptr_t) type); + time_range_selection_window_init(schedule_window, GColorCobaltBlue, prv_complete_schedule, + (void *)(uintptr_t)type); schedule_window->from.hour = schedule.from_hour; schedule_window->from.minute = schedule.from_minute; @@ -167,17 +165,15 @@ static void prv_time_range_select_window_push(DoNotDisturbScheduleType type, app_window_stack_push(&schedule_window->window, true); } -static void prv_dnd_set_schedule(ActionMenu *action_menu, - const ActionMenuItem *item, - void *context) { - DoNotDisturbScheduleType type = (DoNotDisturbScheduleType) item->action_data; +static void prv_dnd_set_schedule(ActionMenu *action_menu, const ActionMenuItem *item, + void *context) { + DoNotDisturbScheduleType type = (DoNotDisturbScheduleType)item->action_data; do_not_disturb_set_schedule_enabled(type, true); prv_time_range_select_window_push(type, context); } -static void prv_scheduled_dnd_menu_cleanup(ActionMenu *action_menu, - const ActionMenuItem *item, - void *context) { +static void prv_scheduled_dnd_menu_cleanup(ActionMenu *action_menu, const ActionMenuItem *item, + void *context) { ActionMenuLevel *root_level = action_menu_get_root_level(action_menu); SettingsQuietTimeScheduleData *data = context; time_range_selection_window_deinit(&data->schedule_window); @@ -188,17 +184,17 @@ static void prv_scheduled_dnd_menu_cleanup(ActionMenu *action_menu, static void prv_scheduled_dnd_menu_push(DoNotDisturbScheduleType type, SettingsQuietTimeScheduleData *data) { - data->action_menu = (ActionMenuConfig) { - .context = data, - .colors.background = shell_prefs_get_theme_highlight_color(), - .did_close = prv_scheduled_dnd_menu_cleanup, + data->action_menu = (ActionMenuConfig){ + .context = data, + .colors.background = shell_prefs_get_theme_highlight_color(), + .did_close = prv_scheduled_dnd_menu_cleanup, }; ActionMenuLevel *level = task_malloc_check(sizeof(ActionMenuLevel) + DNDMenuItem_Count * sizeof(ActionMenuItem)); - *level = (ActionMenuLevel) { - .num_items = DNDMenuItem_Count, - .display_mode = ActionMenuLevelDisplayModeWide, + *level = (ActionMenuLevel){ + .num_items = DNDMenuItem_Count, + .display_mode = ActionMenuLevelDisplayModeWide, }; const uint8_t text_max_size = 30; const uint8_t buffer_size = text_max_size + 22; @@ -214,22 +210,22 @@ static void prv_scheduled_dnd_menu_push(DoNotDisturbScheduleType type, strcat(data->action_menu_text, ")"); } - level->items[DNDMenuItemDisable] = (ActionMenuItem) { - .label = data->action_menu_text, - .perform_action = prv_toggle_scheduled_dnd, + level->items[DNDMenuItemDisable] = (ActionMenuItem){ + .label = data->action_menu_text, + .perform_action = prv_toggle_scheduled_dnd, }; - level->items[DNDMenuItemChangeSchedule] = (ActionMenuItem) { - .label = i18n_get("Change Schedule", &data->action_menu), - .perform_action = prv_dnd_set_schedule, + level->items[DNDMenuItemChangeSchedule] = (ActionMenuItem){ + .label = i18n_get("Change Schedule", &data->action_menu), + .perform_action = prv_dnd_set_schedule, }; if (type == WeekdaySchedule) { - level->items[DNDMenuItemDisable].action_data = (void*)(uintptr_t) WeekdaySchedule; - level->items[DNDMenuItemChangeSchedule].action_data = (void*)(uintptr_t) WeekdaySchedule; + level->items[DNDMenuItemDisable].action_data = (void *)(uintptr_t)WeekdaySchedule; + level->items[DNDMenuItemChangeSchedule].action_data = (void *)(uintptr_t)WeekdaySchedule; } else { - level->items[DNDMenuItemDisable].action_data = (void*)(uintptr_t) WeekendSchedule; - level->items[DNDMenuItemChangeSchedule].action_data = (void*)(uintptr_t) WeekendSchedule; + level->items[DNDMenuItemDisable].action_data = (void *)(uintptr_t)WeekendSchedule; + level->items[DNDMenuItemChangeSchedule].action_data = (void *)(uintptr_t)WeekendSchedule; } data->action_menu.root_level = level; @@ -241,14 +237,14 @@ static void prv_scheduled_dnd_menu_push(DoNotDisturbScheduleType type, /////////////////////////////// static void prv_schedule_deinit_cb(SettingsCallbacks *context) { - SettingsQuietTimeScheduleData *data = (SettingsQuietTimeScheduleData *) context; + SettingsQuietTimeScheduleData *data = (SettingsQuietTimeScheduleData *)context; i18n_free_all(data); app_free(data); } static void prv_schedule_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, uint16_t row, bool selected) { - SettingsQuietTimeScheduleData *data = (SettingsQuietTimeScheduleData *) context; + SettingsQuietTimeScheduleData *data = (SettingsQuietTimeScheduleData *)context; const char *title = NULL; char *subtitle = NULL; const uint8_t buffer_length = 80; @@ -257,9 +253,10 @@ static void prv_schedule_draw_row_cb(SettingsCallbacks *context, GContext *ctx, switch (row) { case QuietTimeScheduleItemCalendarAware: title = i18n_get("Calendar Aware", data); - strncpy(subtitle, do_not_disturb_is_smart_dnd_enabled() ? - i18n_ctx_get("QuietTime", "Enabled", data) : - i18n_ctx_get("QuietTime", "Disabled", data), buffer_length); + strncpy(subtitle, + do_not_disturb_is_smart_dnd_enabled() ? i18n_ctx_get("QuietTime", "Enabled", data) + : i18n_ctx_get("QuietTime", "Disabled", data), + buffer_length); break; case QuietTimeScheduleItemWeekday: title = i18n_get("Weekdays", data); @@ -278,14 +275,14 @@ static void prv_schedule_draw_row_cb(SettingsCallbacks *context, GContext *ctx, } break; default: - WTF; + WTF; } menu_cell_basic_draw(ctx, cell_layer, title, subtitle, NULL); app_free(subtitle); } static void prv_schedule_select_click_cb(SettingsCallbacks *context, uint16_t row) { - SettingsQuietTimeScheduleData *data = (SettingsQuietTimeScheduleData *) context; + SettingsQuietTimeScheduleData *data = (SettingsQuietTimeScheduleData *)context; switch (row) { case QuietTimeScheduleItemCalendarAware: @@ -298,7 +295,7 @@ static void prv_schedule_select_click_cb(SettingsCallbacks *context, uint16_t ro prv_scheduled_dnd_menu_push(WeekendSchedule, data); break; default: - WTF; + WTF; } settings_menu_reload_data(SettingsMenuItemQuietTime); } @@ -310,11 +307,11 @@ static uint16_t prv_schedule_num_rows_cb(SettingsCallbacks *context) { static void prv_schedule_submenu_push(void) { SettingsQuietTimeScheduleData *data = app_zalloc_check(sizeof(*data)); - data->callbacks = (SettingsCallbacks) { - .deinit = prv_schedule_deinit_cb, - .draw_row = prv_schedule_draw_row_cb, - .select_click = prv_schedule_select_click_cb, - .num_rows = prv_schedule_num_rows_cb, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_schedule_deinit_cb, + .draw_row = prv_schedule_draw_row_cb, + .select_click = prv_schedule_select_click_cb, + .num_rows = prv_schedule_num_rows_cb, }; Window *window = settings_window_create_with_title(SettingsMenuItemQuietTime, @@ -350,14 +347,14 @@ static void prv_cycle_dnd_notifications(void) { #ifdef CONFIG_TOUCH static void prv_backlight_deinit_cb(SettingsCallbacks *context) { - SettingsQuietTimeBacklightData *data = (SettingsQuietTimeBacklightData *) context; + SettingsQuietTimeBacklightData *data = (SettingsQuietTimeBacklightData *)context; i18n_free_all(data); app_free(data); } static void prv_backlight_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, uint16_t row, bool selected) { - SettingsQuietTimeBacklightData *data = (SettingsQuietTimeBacklightData *) context; + SettingsQuietTimeBacklightData *data = (SettingsQuietTimeBacklightData *)context; const char *title = NULL; const char *subtitle = NULL; switch (row) { @@ -370,7 +367,7 @@ static void prv_backlight_draw_row_cb(SettingsCallbacks *context, GContext *ctx, subtitle = alerts_preferences_dnd_get_touch_backlight() ? i18n_noop("On") : i18n_noop("Off"); break; default: - WTF; + WTF; } menu_cell_basic_draw(ctx, cell_layer, i18n_get(title, data), i18n_get(subtitle, data), NULL); } @@ -384,7 +381,7 @@ static void prv_backlight_select_click_cb(SettingsCallbacks *context, uint16_t r alerts_preferences_dnd_set_touch_backlight(!alerts_preferences_dnd_get_touch_backlight()); break; default: - WTF; + WTF; } settings_menu_reload_data(SettingsMenuItemQuietTime); } @@ -396,11 +393,11 @@ static uint16_t prv_backlight_num_rows_cb(SettingsCallbacks *context) { static void prv_backlight_submenu_push(void) { SettingsQuietTimeBacklightData *data = app_zalloc_check(sizeof(*data)); - data->callbacks = (SettingsCallbacks) { - .deinit = prv_backlight_deinit_cb, - .draw_row = prv_backlight_draw_row_cb, - .select_click = prv_backlight_select_click_cb, - .num_rows = prv_backlight_num_rows_cb, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_backlight_deinit_cb, + .draw_row = prv_backlight_draw_row_cb, + .select_click = prv_backlight_select_click_cb, + .num_rows = prv_backlight_num_rows_cb, }; Window *window = settings_window_create_with_title(SettingsMenuItemQuietTime, @@ -414,22 +411,22 @@ static void prv_backlight_submenu_push(void) { /////////////////////////////// static void prv_deinit_cb(SettingsCallbacks *context) { - SettingsQuietTimeData *data = (SettingsQuietTimeData *) context; + SettingsQuietTimeData *data = (SettingsQuietTimeData *)context; i18n_free_all(data); app_free(data); } -static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, - const Layer *cell_layer, uint16_t row, bool selected) { - SettingsQuietTimeData *data = (SettingsQuietTimeData *) context; +static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, + uint16_t row, bool selected) { + SettingsQuietTimeData *data = (SettingsQuietTimeData *)context; const char *title = NULL; const char *subtitle = NULL; switch (row) { case QuietTimeItemManual: title = i18n_get("Manual", data); - subtitle = do_not_disturb_is_manually_enabled() ? - i18n_get("On", data) : i18n_get("Off", data); + subtitle = + do_not_disturb_is_manually_enabled() ? i18n_get("On", data) : i18n_get("Off", data); break; case QuietTimeItemSchedule: title = i18n_get("Schedule", data); @@ -449,19 +446,19 @@ static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, #else case QuietTimeItemMotionBacklight: title = i18n_get("Motion Backlight", data); - subtitle = alerts_preferences_dnd_get_motion_backlight() ? - i18n_get("On", data) : i18n_get("Off", data); + subtitle = alerts_preferences_dnd_get_motion_backlight() ? i18n_get("On", data) + : i18n_get("Off", data); break; #endif #ifdef CONFIG_SPEAKER case QuietTimeItemMuteSpeaker: title = i18n_get("Mute Speaker", data); - subtitle = alerts_preferences_dnd_get_mute_speaker() ? - i18n_get("On", data) : i18n_get("Off", data); + subtitle = + alerts_preferences_dnd_get_mute_speaker() ? i18n_get("On", data) : i18n_get("Off", data); break; #endif default: - WTF; + WTF; } menu_cell_basic_draw(ctx, cell_layer, title, subtitle, NULL); } @@ -495,7 +492,7 @@ static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { break; #endif default: - WTF; + WTF; } settings_menu_reload_data(SettingsMenuItemQuietTime); } @@ -505,13 +502,13 @@ static uint16_t prv_num_rows_cb(SettingsCallbacks *context) { } static Window *prv_init(void) { - SettingsQuietTimeData* data = app_zalloc_check(sizeof(*data)); + SettingsQuietTimeData *data = app_zalloc_check(sizeof(*data)); - data->callbacks = (SettingsCallbacks) { - .deinit = prv_deinit_cb, - .draw_row = prv_draw_row_cb, - .select_click = prv_select_click_cb, - .num_rows = prv_num_rows_cb, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_deinit_cb, + .draw_row = prv_draw_row_cb, + .select_click = prv_select_click_cb, + .num_rows = prv_num_rows_cb, }; return settings_window_create(SettingsMenuItemQuietTime, &data->callbacks); @@ -519,8 +516,8 @@ static Window *prv_init(void) { const SettingsModuleMetadata *settings_quiet_time_get_info(void) { static const SettingsModuleMetadata s_module_info = { - .name = i18n_noop("Quiet Time"), - .init = prv_init, + .name = i18n_noop("Quiet Time"), + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/remote.c b/src/fw/apps/system/settings/remote.c index e09899736e..99de03d7f6 100644 --- a/src/fw/apps/system/settings/remote.c +++ b/src/fw/apps/system/settings/remote.c @@ -41,7 +41,7 @@ static void prv_dialog_unload(void *context) { } static void prv_show_dialog(void *i18n_owner) { - DialogCallbacks callback = { .unload = prv_dialog_unload }; + DialogCallbacks callback = {.unload = prv_dialog_unload}; const char *text = BT_FORGET_PAIRING_STR; ExpandableDialog *e_dialog = expandable_dialog_create_with_params( "Forget Remote", RESOURCE_ID_GENERIC_CONFIRMATION_TINY, i18n_get(text, i18n_owner), @@ -59,21 +59,18 @@ static void prv_forget_ble_remote(int id) { bt_persistent_storage_delete_ble_pairing_by_id(id); } -static void prv_remote_menu_cleanup(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_remote_menu_cleanup(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { ActionMenuLevel *root_level = action_menu_get_root_level(action_menu); - SettingsRemoteData *data = (SettingsRemoteData *) context; + SettingsRemoteData *data = (SettingsRemoteData *)context; i18n_free_all(data); - task_free((void *) root_level); + task_free((void *)root_level); task_free(data); } -static void prv_forget_item(ActionMenu *action_menu, - const ActionMenuItem *item, - void *context) { - SettingsRemoteData* remote_data = (SettingsRemoteData*) context; - StoredRemote* remote = &remote_data->remote; +static void prv_forget_item(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { + SettingsRemoteData *remote_data = (SettingsRemoteData *)context; + StoredRemote *remote = &remote_data->remote; prv_forget_ble_remote(remote->ble.bonding); PBL_LOG_INFO("User Forgot BT Pairing"); PBL_LOG_DBG("Name: %s", remote->name); @@ -82,10 +79,9 @@ static void prv_forget_item(ActionMenu *action_menu, } #ifdef CONFIG_HRM -static void prv_stop_sharing_heart_rate(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_stop_sharing_heart_rate(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { - SettingsRemoteData *remote_data = (SettingsRemoteData*) context; + SettingsRemoteData *remote_data = (SettingsRemoteData *)context; StoredRemote *remote = &remote_data->remote; ble_hrm_revoke_sharing_permission_for_connection(remote->ble.connection); @@ -102,10 +98,10 @@ void settings_remote_menu_push(struct SettingsBluetoothData *bt_data, StoredRemo data->remote = *stored_remote; data->bt_data = bt_data; - data->action_menu = (ActionMenuConfig) { - .context = data, - .colors.background = shell_prefs_get_theme_highlight_color(), - .did_close = prv_remote_menu_cleanup, + data->action_menu = (ActionMenuConfig){ + .context = data, + .colors.background = shell_prefs_get_theme_highlight_color(), + .did_close = prv_remote_menu_cleanup, }; #ifdef CONFIG_HRM @@ -117,23 +113,23 @@ void settings_remote_menu_push(struct SettingsBluetoothData *bt_data, StoredRemo #endif ActionMenuLevel *level = task_zalloc_check(sizeof(ActionMenuLevel) + num_items * sizeof(ActionMenuItem)); - *level = (ActionMenuLevel) { - .num_items = num_items, - .display_mode = ActionMenuLevelDisplayModeWide, + *level = (ActionMenuLevel){ + .num_items = num_items, + .display_mode = ActionMenuLevelDisplayModeWide, }; - level->items[RemoteMenuForget] = (ActionMenuItem) { - .label = i18n_get("Forget", data), - .perform_action = prv_forget_item, - .action_data = data, + level->items[RemoteMenuForget] = (ActionMenuItem){ + .label = i18n_get("Forget", data), + .perform_action = prv_forget_item, + .action_data = data, }; #ifdef CONFIG_HRM if (is_sharing_hr) { - level->items[RemoteMenuStopSharingHeartRate] = (ActionMenuItem) { - .label = i18n_get("Stop Sharing Heart Rate", data), - .perform_action = prv_stop_sharing_heart_rate, - .action_data = data, + level->items[RemoteMenuStopSharingHeartRate] = (ActionMenuItem){ + .label = i18n_get("Stop Sharing Heart Rate", data), + .perform_action = prv_stop_sharing_heart_rate, + .action_data = data, }; } #endif diff --git a/src/fw/apps/system/settings/remote.h b/src/fw/apps/system/settings/remote.h index 40888d58b2..49f3d683d6 100644 --- a/src/fw/apps/system/settings/remote.h +++ b/src/fw/apps/system/settings/remote.h @@ -5,4 +5,4 @@ #include "kernel/events.h" #include "bluetooth.h" -void settings_remote_menu_push(struct SettingsBluetoothData *bt_data, StoredRemote* stored_remote); +void settings_remote_menu_push(struct SettingsBluetoothData *bt_data, StoredRemote *stored_remote); diff --git a/src/fw/apps/system/settings/settings.c b/src/fw/apps/system/settings/settings.c index 18e96323b5..09d73ec3b4 100644 --- a/src/fw/apps/system/settings/settings.c +++ b/src/fw/apps/system/settings/settings.c @@ -28,20 +28,20 @@ #ifdef CONFIG_SETTINGS_ICONS // Icon resource IDs for each settings menu item (RESOURCE_ID_INVALID means no icon) static const uint32_t SETTINGS_MENU_ICON_RESOURCES[SettingsMenuItem_Count] = { - [SettingsMenuItemBluetooth] = RESOURCE_ID_SETTINGS_MENU_ICON_BLUETOOTH, - [SettingsMenuItemNotifications] = RESOURCE_ID_SETTINGS_MENU_ICON_NOTIFICATIONS, - [SettingsMenuItemVibrations] = RESOURCE_ID_SETTINGS_MENU_ICON_VIBRATIONS, - [SettingsMenuItemQuietTime] = RESOURCE_ID_SETTINGS_MENU_ICON_QUIET_TIME, - [SettingsMenuItemTimeline] = RESOURCE_ID_SETTINGS_MENU_ICON_TIMELINE, - [SettingsMenuItemQuickLaunch] = RESOURCE_ID_SETTINGS_MENU_ICON_QUICK_LAUNCH, - [SettingsMenuItemDateTime] = RESOURCE_ID_SETTINGS_MENU_ICON_DATE_TIME, - [SettingsMenuItemDisplay] = RESOURCE_ID_SETTINGS_MENU_ICON_DISPLAY, - [SettingsMenuItemHealth] = RESOURCE_ID_SETTINGS_MENU_ICON_HEALTH, + [SettingsMenuItemBluetooth] = RESOURCE_ID_SETTINGS_MENU_ICON_BLUETOOTH, + [SettingsMenuItemNotifications] = RESOURCE_ID_SETTINGS_MENU_ICON_NOTIFICATIONS, + [SettingsMenuItemVibrations] = RESOURCE_ID_SETTINGS_MENU_ICON_VIBRATIONS, + [SettingsMenuItemQuietTime] = RESOURCE_ID_SETTINGS_MENU_ICON_QUIET_TIME, + [SettingsMenuItemTimeline] = RESOURCE_ID_SETTINGS_MENU_ICON_TIMELINE, + [SettingsMenuItemQuickLaunch] = RESOURCE_ID_SETTINGS_MENU_ICON_QUICK_LAUNCH, + [SettingsMenuItemDateTime] = RESOURCE_ID_SETTINGS_MENU_ICON_DATE_TIME, + [SettingsMenuItemDisplay] = RESOURCE_ID_SETTINGS_MENU_ICON_DISPLAY, + [SettingsMenuItemHealth] = RESOURCE_ID_SETTINGS_MENU_ICON_HEALTH, #ifdef CONFIG_THEMING - [SettingsMenuItemThemes] = RESOURCE_ID_SETTINGS_MENU_ICON_THEMES, + [SettingsMenuItemThemes] = RESOURCE_ID_SETTINGS_MENU_ICON_THEMES, #endif - [SettingsMenuItemActivity] = RESOURCE_ID_SETTINGS_MENU_ICON_BACKGROUND_APP, - [SettingsMenuItemSystem] = RESOURCE_ID_SETTINGS_MENU_ICON_SYSTEM, + [SettingsMenuItemActivity] = RESOURCE_ID_SETTINGS_MENU_ICON_BACKGROUND_APP, + [SettingsMenuItemSystem] = RESOURCE_ID_SETTINGS_MENU_ICON_SYSTEM, }; #endif @@ -51,7 +51,7 @@ typedef struct { #ifdef CONFIG_SETTINGS_ICONS GBitmap *icons[SettingsMenuItem_Count]; #endif - EventServiceInfo pref_change_event_info; //!< Subscription for pref change notifications + EventServiceInfo pref_change_event_info; //!< Subscription for pref change notifications } SettingsAppData; static void prv_pref_change_handler(PebbleEvent *event, void *context) { @@ -60,18 +60,17 @@ static void prv_pref_change_handler(PebbleEvent *event, void *context) { // layer and can change with the preferred content size. Re-anchor the // selection afterwards so the scroll offset stays within the new geometry. menu_layer_reload_data(&data->menu_layer); - menu_layer_set_selected_index(&data->menu_layer, - menu_layer_get_selected_index(&data->menu_layer), + menu_layer_set_selected_index(&data->menu_layer, menu_layer_get_selected_index(&data->menu_layer), MenuRowAlignCenter, false /* animated */); } -static uint16_t prv_get_num_rows_callback(MenuLayer *menu_layer, - uint16_t section_index, void *context) { +static uint16_t prv_get_num_rows_callback(MenuLayer *menu_layer, uint16_t section_index, + void *context) { return SettingsMenuItem_Count; } -static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *context) { +static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *context) { SettingsAppData *data = context; PBL_ASSERTN(cell_index->row < SettingsMenuItem_Count); @@ -79,15 +78,15 @@ static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, const char *category_title = settings_menu_get_submodule_info(cell_index->row)->name; const char *title = i18n_get(category_title, data); GColor highlight_bg = shell_prefs_get_theme_highlight_color(); - menu_layer_set_highlight_colors(&(data->menu_layer), - highlight_bg, - gcolor_legible_over(highlight_bg)); + menu_layer_set_highlight_colors(&(data->menu_layer), highlight_bg, + gcolor_legible_over(highlight_bg)); menu_layer_set_scroll_wrap_around(&(data->menu_layer), - shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(&(data->menu_layer), - shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(&(data->menu_layer), - shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + shell_prefs_get_menu_scroll_wrap_around_enable()); + menu_layer_set_scroll_vibe_on_wrap( + &(data->menu_layer), + shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + &(data->menu_layer), shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); #ifdef CONFIG_SETTINGS_ICONS GBitmap *icon = data->icons[cell_index->row]; @@ -101,25 +100,24 @@ static void prv_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, vo settings_menu_push(cell_index->row); } -static int16_t prv_get_cell_height_callback(MenuLayer *menu_layer, - MenuIndex *cell_index, void *context) { +static int16_t prv_get_cell_height_callback(MenuLayer *menu_layer, MenuIndex *cell_index, + void *context) { #if PBL_ROUND PBL_ASSERTN(cell_index->row < SettingsMenuItem_Count); const int16_t focused_cell_height = MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT; const int16_t unfocused_cell_height = (((DISP_ROWS - focused_cell_height) / 2) - - SETTINGS_CATEGORY_MENU_CELL_UNFOCUSED_ROUND_VERTICAL_PADDING) / + SETTINGS_CATEGORY_MENU_CELL_UNFOCUSED_ROUND_VERTICAL_PADDING) / SETTINGS_CATEGORY_MENU_NUM_UNFOCUSED_ROWS_PER_SIDE; - return menu_layer_is_index_selected(menu_layer, cell_index) ? focused_cell_height : - unfocused_cell_height; + return menu_layer_is_index_selected(menu_layer, cell_index) ? focused_cell_height + : unfocused_cell_height; #else return menu_cell_basic_cell_height(); #endif } -static int16_t prv_get_separator_height_callback(MenuLayer *menu_layer, - MenuIndex *cell_index, +static int16_t prv_get_separator_height_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *context) { return 0; } @@ -141,36 +139,36 @@ static void prv_window_load(Window *window) { // Create the menu GRect bounds = data->window.layer.bounds; #if PBL_ROUND - bounds = grect_inset_internal(bounds, 0, - SETTINGS_CATEGORY_MENU_CELL_UNFOCUSED_ROUND_VERTICAL_PADDING); + bounds = + grect_inset_internal(bounds, 0, SETTINGS_CATEGORY_MENU_CELL_UNFOCUSED_ROUND_VERTICAL_PADDING); #endif MenuLayer *menu_layer = &data->menu_layer; menu_layer_init(menu_layer, &bounds); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_num_rows = prv_get_num_rows_callback, - .get_cell_height = prv_get_cell_height_callback, - .draw_row = prv_draw_row_callback, - .select_click = prv_select_callback, - .get_separator_height = prv_get_separator_height_callback - }); + menu_layer_set_callbacks(menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows_callback, + .get_cell_height = prv_get_cell_height_callback, + .draw_row = prv_draw_row_callback, + .select_click = prv_select_callback, + .get_separator_height = prv_get_separator_height_callback + }); GColor highlight_bg = shell_prefs_get_theme_highlight_color(); - menu_layer_set_normal_colors(menu_layer, - PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite), + menu_layer_set_normal_colors(menu_layer, PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite), PBL_IF_COLOR_ELSE(GColorWhite, GColorBlack)); - menu_layer_set_highlight_colors(menu_layer, - highlight_bg, - gcolor_legible_over(highlight_bg)); + menu_layer_set_highlight_colors(menu_layer, highlight_bg, gcolor_legible_over(highlight_bg)); menu_layer_set_click_config_onto_window(menu_layer, &data->window); menu_layer_set_scroll_wrap_around(menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&data->window.layer, menu_layer_get_layer(menu_layer)); - data->pref_change_event_info = (EventServiceInfo) { - .type = PEBBLE_PREF_CHANGE_EVENT, - .handler = prv_pref_change_handler, - .context = data, + data->pref_change_event_info = (EventServiceInfo){ + .type = PEBBLE_PREF_CHANGE_EVENT, + .handler = prv_pref_change_handler, + .context = data, }; event_service_client_subscribe(&data->pref_change_event_info); } @@ -200,9 +198,9 @@ static void handle_init(void) { window_init(window, WINDOW_NAME("Settings")); window_set_user_data(window, data); window_set_window_handlers(window, &(WindowHandlers){ - .load = prv_window_load, - .unload = prv_window_unload, - }); + .load = prv_window_load, + .unload = prv_window_unload, + }); window_set_background_color(window, PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite)); app_window_stack_push(window, true); } @@ -219,14 +217,16 @@ static void s_main(void) { const PebbleProcessMd *settings_get_app_info() { static const PebbleProcessMdSystem s_settings_app = { - .common = { - .main_func = s_main, - // UUID: 07e0d9cb-8957-4bf7-9d42-35bf47caadfe - .uuid = {0x07, 0xe0, 0xd9, 0xcb, 0x89, 0x57, 0x4b, 0xf7, - 0x9d, 0x42, 0x35, 0xbf, 0x47, 0xca, 0xad, 0xfe}, - }, - .name = i18n_noop("Settings"), - .icon_resource_id = RESOURCE_ID_SETTINGS_TINY, + .common = + { + .main_func = s_main, + // UUID: 07e0d9cb-8957-4bf7-9d42-35bf47caadfe + .uuid = + {0x07, 0xe0, 0xd9, 0xcb, 0x89, 0x57, 0x4b, 0xf7, 0x9d, 0x42, 0x35, 0xbf, 0x47, + 0xca, 0xad, 0xfe}, + }, + .name = i18n_noop("Settings"), + .icon_resource_id = RESOURCE_ID_SETTINGS_TINY, }; - return (const PebbleProcessMd*) &s_settings_app; + return (const PebbleProcessMd *)&s_settings_app; } diff --git a/src/fw/apps/system/settings/settings.h b/src/fw/apps/system/settings/settings.h index 1b2fafe4c3..1b19e98c9f 100644 --- a/src/fw/apps/system/settings/settings.h +++ b/src/fw/apps/system/settings/settings.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* settings_get_app_info(); +const PebbleProcessMd *settings_get_app_info(); diff --git a/src/fw/apps/system/settings/speaker_volume_window.c b/src/fw/apps/system/settings/speaker_volume_window.c index 770c7cc6eb..0eca93cce8 100644 --- a/src/fw/apps/system/settings/speaker_volume_window.c +++ b/src/fw/apps/system/settings/speaker_volume_window.c @@ -46,15 +46,14 @@ static void prv_update_proc(Layer *layer, GContext *ctx) { graphics_context_set_text_color(ctx, GColorBlack); const int16_t x_margin = 5; - const GRect content = grect_inset( - layer->bounds, GEdgeInsets(0, ACTION_BAR_WIDTH + x_margin, 0, x_margin)); + const GRect content = + grect_inset(layer->bounds, GEdgeInsets(0, ACTION_BAR_WIDTH + x_margin, 0, x_margin)); GRect title_frame = content; title_frame.origin.y = PBL_IF_ROUND_ELSE(24, 16); title_frame.size.h = 30; - graphics_draw_text(ctx, i18n_get("Volume", data), - fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), title_frame, - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, i18n_get("Volume", data), fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), + title_frame, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); char value_text[8]; snprintf(value_text, sizeof(value_text), "%d%%", (int)data->value); @@ -64,8 +63,8 @@ static void prv_update_proc(Layer *layer, GContext *ctx) { GRect value_frame = content; value_frame.origin.y = (layer->bounds.size.h - value_height) / 2; value_frame.size.h = value_height + 4; // slack so nothing clips - graphics_draw_text(ctx, value_text, value_font, value_frame, - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, value_text, value_font, value_frame, GTextOverflowModeTrailingEllipsis, + GTextAlignmentCenter, NULL); } static void prv_set_value(SpeakerVolumeWindowData *data, int new_value) { @@ -82,18 +81,15 @@ static void prv_set_value(SpeakerVolumeWindowData *data, int new_value) { prv_play_preview(data); } -static void prv_up_click_handler(ClickRecognizerRef recognizer, - SpeakerVolumeWindowData *data) { +static void prv_up_click_handler(ClickRecognizerRef recognizer, SpeakerVolumeWindowData *data) { prv_set_value(data, data->value + VOLUME_STEP); } -static void prv_down_click_handler(ClickRecognizerRef recognizer, - SpeakerVolumeWindowData *data) { +static void prv_down_click_handler(ClickRecognizerRef recognizer, SpeakerVolumeWindowData *data) { prv_set_value(data, data->value - VOLUME_STEP); } -static void prv_select_click_handler(ClickRecognizerRef recognizer, - SpeakerVolumeWindowData *data) { +static void prv_select_click_handler(ClickRecognizerRef recognizer, SpeakerVolumeWindowData *data) { alerts_preferences_set_speaker_volume((uint8_t)data->value); speaker_service_handle_audio_prefs_changed(); settings_menu_mark_dirty(SettingsMenuItemVibrations); @@ -119,8 +115,8 @@ static void prv_window_load(Window *window) { action_bar_layer_set_icon(action_bar, BUTTON_ID_UP, &s_bar_icon_up_bitmap); action_bar_layer_set_icon(action_bar, BUTTON_ID_DOWN, &s_bar_icon_down_bitmap); action_bar_layer_set_icon(action_bar, BUTTON_ID_SELECT, &s_bar_icon_check_bitmap); - action_bar_layer_set_click_config_provider( - action_bar, (ClickConfigProvider)prv_click_config_provider); + action_bar_layer_set_click_config_provider(action_bar, + (ClickConfigProvider)prv_click_config_provider); action_bar_layer_add_to_window(action_bar, window); } @@ -138,13 +134,13 @@ void speaker_volume_window_push(void) { data->value = alerts_preferences_get_speaker_volume(); window_init(&data->window, WINDOW_NAME("Speaker Volume")); - window_set_window_handlers(&data->window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(&data->window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); layer_set_update_proc(&data->window.layer, prv_update_proc); app_window_stack_push(&data->window, true /* animated */); } -#endif // CONFIG_SPEAKER +#endif // CONFIG_SPEAKER diff --git a/src/fw/apps/system/settings/system.c b/src/fw/apps/system/settings/system.c index b97a8a40ab..8f276be05d 100644 --- a/src/fw/apps/system/settings/system.c +++ b/src/fw/apps/system/settings/system.c @@ -74,12 +74,11 @@ enum { typedef struct SystemCertificationData SystemCertificationData; typedef struct SystemCertificationMenuItem { - void (*draw_cell_fn)( - GContext *ctx, const Layer *cell_layer, SystemCertificationData *cd, - bool is_selected, const void *arg1, const void *arg2); - const void *arg1; - const void *arg2; - void (*select_cb)(SystemCertificationData *cd); + void (*draw_cell_fn)(GContext *ctx, const Layer *cell_layer, SystemCertificationData *cd, + bool is_selected, const void *arg1, const void *arg2); + const void *arg1; + const void *arg2; + void (*select_cb)(SystemCertificationData *cd); } SystemCertificationMenuItem; typedef struct SystemCertificationData { @@ -120,8 +119,8 @@ typedef struct SystemInformationData { // Ensure that OTP values are null-terminated char serial_string[MFG_SERIAL_NUMBER_SIZE + 1]; char hw_version_string[MFG_HW_VERSION_SIZE + 1]; - char uptime_string[16]; // "xxd xxh xxm xxs" - char const * subtitle_text[SystemInformationItem_Count]; + char uptime_string[16]; // "xxd xxh xxm xxs" + char const *subtitle_text[SystemInformationItem_Count]; char language_string[16]; } SystemInformationData; @@ -135,7 +134,7 @@ typedef struct SettingsSystemData { Window window; MenuLayer menu_layer; StatusBarLayer status_layer; - + // ALS threshold data char als_threshold_buffer[16]; // Buffer for formatted ALS threshold char als_status_buffer[64]; // Buffer for NumberWindow label with status @@ -153,12 +152,12 @@ typedef enum { } SystemMenuItem; static const char *s_item_titles[SystemMenuItem_Count] = { - [SystemMenuItemInformation] = i18n_noop("Information"), - [SystemMenuItemCertification] = i18n_noop("Certification"), - [SystemMenuItemStationaryToggle] = i18n_noop("Stand-By Mode"), - [SystemMenuItemDebugging] = i18n_noop("Debugging"), - [SystemMenuItemShutDown] = i18n_noop("Shut Down"), - [SystemMenuItemFactoryReset] = i18n_noop("Factory Reset"), + [SystemMenuItemInformation] = i18n_noop("Information"), + [SystemMenuItemCertification] = i18n_noop("Certification"), + [SystemMenuItemStationaryToggle] = i18n_noop("Stand-By Mode"), + [SystemMenuItemDebugging] = i18n_noop("Debugging"), + [SystemMenuItemShutDown] = i18n_noop("Shut Down"), + [SystemMenuItemFactoryReset] = i18n_noop("Factory Reset"), }; // Common status bar component is used across all windows that need them. @@ -198,84 +197,87 @@ static ConfirmationDialog *prv_settings_confirm(const char *title, const char *t // Information Window ////////////////////// -static const char* s_information_titles[SystemInformationItem_Count] = { - [SystemInformationItemBtAddress] = i18n_noop("BT Address"), - [SystemInformationItemFirmware] = i18n_noop("Firmware"), - [SystemInformationItemLanguage] = i18n_noop("Language"), - [SystemInformationItemRecovery] = i18n_noop("Recovery"), - [SystemInformationItemBootloader] = i18n_noop("Bootloader"), - [SystemInformationItemHardware] = i18n_noop("Hardware"), - [SystemInformationItemSerial] = i18n_noop("Serial"), - [SystemInformationItemUptime] = i18n_noop("Uptime"), - [SystemInformationItemLegal] = i18n_noop("Legal") +static const char *s_information_titles[SystemInformationItem_Count] = { + [SystemInformationItemBtAddress] = i18n_noop("BT Address"), + [SystemInformationItemFirmware] = i18n_noop("Firmware"), + [SystemInformationItemLanguage] = i18n_noop("Language"), + [SystemInformationItemRecovery] = i18n_noop("Recovery"), + [SystemInformationItemBootloader] = i18n_noop("Bootloader"), + [SystemInformationItemHardware] = i18n_noop("Hardware"), + [SystemInformationItemSerial] = i18n_noop("Serial"), + [SystemInformationItemUptime] = i18n_noop("Uptime"), + [SystemInformationItemLegal] = i18n_noop("Legal") }; -static void prv_populate_uptime_string(SystemInformationData* data) { +static void prv_populate_uptime_string(SystemInformationData *data) { uint32_t seconds_since_reboot = time_get_uptime_seconds(); uint32_t days, hours, minutes, seconds; time_util_split_seconds_into_parts(seconds_since_reboot, &days, &hours, &minutes, &seconds); sniprintf(data->uptime_string, sizeof(data->uptime_string), - "%"PRIu32"d %"PRIu32"h %"PRIu32"m %"PRIu32"s", days, hours, minutes, seconds); + "%" PRIu32 "d %" PRIu32 "h %" PRIu32 "m %" PRIu32 "s", days, hours, minutes, seconds); } -static void prv_information_draw_row_callback(GContext* ctx, const Layer *cell_layer, +static void prv_information_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, void *context) { PBL_ASSERTN(cell_index->section == 0); PBL_ASSERTN(cell_index->row < SystemInformationItem_Count); - SettingsSystemData *data = (SettingsSystemData *) context; + SettingsSystemData *data = (SettingsSystemData *)context; SystemInformationData *info = &data->information_data; const char *title = i18n_get(s_information_titles[cell_index->row], data); menu_cell_basic_draw(ctx, cell_layer, title, info->subtitle_text[cell_index->row], NULL); } -int16_t prv_information_get_cell_height_callback(MenuLayer *menu_layer, - MenuIndex *cell_index, void *context) { +int16_t prv_information_get_cell_height_callback(MenuLayer *menu_layer, MenuIndex *cell_index, + void *context) { return PBL_IF_RECT_ELSE(menu_cell_basic_cell_height(), - (menu_layer_is_index_selected(menu_layer, cell_index) ? - MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT : - MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT)); + (menu_layer_is_index_selected(menu_layer, cell_index) + ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT + : MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT)); } -static uint16_t prv_information_get_num_rows_callback(MenuLayer *menu_layer, - uint16_t section_index, void *context) { +static uint16_t prv_information_get_num_rows_callback(MenuLayer *menu_layer, uint16_t section_index, + void *context) { return SystemInformationItem_Count; } static void prv_information_window_load(Window *window) { - SettingsSystemData *data = (SettingsSystemData*) window_get_user_data(window); + SettingsSystemData *data = (SettingsSystemData *)window_get_user_data(window); prv_init_status_bar(&data->status_layer, &data->window, i18n_get("Information", data)); // Create the menu MenuLayer *menu_layer = &data->menu_layer; GRect bounds = data->window.layer.bounds; - const GEdgeInsets menu_layer_insets = (GEdgeInsets) { - .top = STATUS_BAR_LAYER_HEIGHT, - .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT) + const GEdgeInsets menu_layer_insets = (GEdgeInsets){ + .top = STATUS_BAR_LAYER_HEIGHT, + .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT) }; bounds = grect_inset(bounds, menu_layer_insets); menu_layer_init(menu_layer, &bounds); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_num_rows = prv_information_get_num_rows_callback, - .get_cell_height = prv_information_get_cell_height_callback, - .draw_row = prv_information_draw_row_callback, - }); + menu_layer_set_callbacks(menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_rows = prv_information_get_num_rows_callback, + .get_cell_height = prv_information_get_cell_height_callback, + .draw_row = prv_information_draw_row_callback, + }); GColor highlight_bg = shell_prefs_get_theme_highlight_color(); menu_layer_set_highlight_colors(menu_layer, highlight_bg, gcolor_legible_over(highlight_bg)); menu_layer_set_click_config_onto_window(menu_layer, &data->window); menu_layer_set_scroll_wrap_around(menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&data->window.layer, menu_layer_get_layer(menu_layer)); } static void prv_information_window_unload(Window *window) { - SettingsSystemData *data = (SettingsSystemData*) window_get_user_data(window); + SettingsSystemData *data = (SettingsSystemData *)window_get_user_data(window); menu_layer_deinit(&data->menu_layer); prv_deinit_status_bar(&data->status_layer); } @@ -290,8 +292,8 @@ static void prv_information_window_push(SettingsSystemData *data) { info->recovery_version_string[0] = '\0'; } - sniprintf(info->boot_version_string, sizeof(info->boot_version_string), - "0x%08" PRIx32, boot_version_read()); + sniprintf(info->boot_version_string, sizeof(info->boot_version_string), "0x%08" PRIx32, + boot_version_read()); bt_local_id_copy_address_mac_string(info->bt_mac_addr); // Ensure OTP strings are null-terminated @@ -299,27 +301,27 @@ static void prv_information_window_push(SettingsSystemData *data) { mfg_info_get_hw_version(info->hw_version_string, MFG_HW_VERSION_SIZE + 1); prv_populate_uptime_string(info); - sniprintf(info->language_string, sizeof(info->language_string), - "%s, v%u", i18n_get_locale(), i18n_get_version()); + sniprintf(info->language_string, sizeof(info->language_string), "%s, v%u", i18n_get_locale(), + i18n_get_version()); - info->subtitle_text[SystemInformationItemBtAddress] = info->bt_mac_addr; - info->subtitle_text[SystemInformationItemFirmware] = - (char*) (strlen(TINTIN_METADATA.version_tag) >= 2 - ? TINTIN_METADATA.version_tag : TINTIN_METADATA.version_short); - info->subtitle_text[SystemInformationItemLanguage] = info->language_string; - info->subtitle_text[SystemInformationItemRecovery] = info->recovery_version_string; + info->subtitle_text[SystemInformationItemBtAddress] = info->bt_mac_addr; + info->subtitle_text[SystemInformationItemFirmware] = + (char *)(strlen(TINTIN_METADATA.version_tag) >= 2 ? TINTIN_METADATA.version_tag + : TINTIN_METADATA.version_short); + info->subtitle_text[SystemInformationItemLanguage] = info->language_string; + info->subtitle_text[SystemInformationItemRecovery] = info->recovery_version_string; info->subtitle_text[SystemInformationItemBootloader] = info->boot_version_string; - info->subtitle_text[SystemInformationItemHardware] = info->hw_version_string; - info->subtitle_text[SystemInformationItemSerial] = info->serial_string; - info->subtitle_text[SystemInformationItemUptime] = info->uptime_string; - info->subtitle_text[SystemInformationItemLegal] = "repebble.com/terms"; + info->subtitle_text[SystemInformationItemHardware] = info->hw_version_string; + info->subtitle_text[SystemInformationItemSerial] = info->serial_string; + info->subtitle_text[SystemInformationItemUptime] = info->uptime_string; + info->subtitle_text[SystemInformationItemLegal] = "repebble.com/terms"; window_init(&data->window, WINDOW_NAME("System Information")); window_set_user_data(&data->window, data); - window_set_window_handlers(&data->window, &(WindowHandlers) { - .load = prv_information_window_load, - .unload = prv_information_window_unload, - }); + window_set_window_handlers(&data->window, &(WindowHandlers){ + .load = prv_information_window_load, + .unload = prv_information_window_unload, + }); app_window_stack_push(&data->window, true); } @@ -342,10 +344,9 @@ static void prv_coredump_click_config(void *context) { } static void prv_maybe_trigger_core_dump() { - ConfirmationDialog *confirmation_dialog = prv_settings_confirm("Core Dump", - i18n_noop("Core dump and reboot?"), RESOURCE_ID_RESULT_FAILED_LARGE); - confirmation_dialog_set_click_config_provider(confirmation_dialog, - prv_coredump_click_config); + ConfirmationDialog *confirmation_dialog = prv_settings_confirm( + "Core Dump", i18n_noop("Core dump and reboot?"), RESOURCE_ID_RESULT_FAILED_LARGE); + confirmation_dialog_set_click_config_provider(confirmation_dialog, prv_coredump_click_config); app_confirmation_dialog_push(confirmation_dialog); } @@ -356,26 +357,25 @@ static void prv_update_als_threshold_label(NumberWindow *number_window, Settings uint32_t current_reading = light_get_ambient_lux(); uint32_t current_threshold = (uint32_t)number_window_get_value(number_window); bool would_backlight_be_on = current_reading <= current_threshold; - - snprintf(data->als_status_buffer, sizeof(data->als_status_buffer), - "Backlight: %s", + + snprintf(data->als_status_buffer, sizeof(data->als_status_buffer), "Backlight: %s", would_backlight_be_on ? "ON" : "OFF"); - + number_window_set_label(number_window, data->als_status_buffer); } static void prv_als_threshold_incremented(NumberWindow *number_window, void *context) { - SettingsSystemData *data = (SettingsSystemData*)context; + SettingsSystemData *data = (SettingsSystemData *)context; prv_update_als_threshold_label(number_window, data); } static void prv_als_threshold_decremented(NumberWindow *number_window, void *context) { - SettingsSystemData *data = (SettingsSystemData*)context; + SettingsSystemData *data = (SettingsSystemData *)context; prv_update_als_threshold_label(number_window, data); } static void prv_als_threshold_selected(NumberWindow *number_window, void *context) { - SettingsSystemData *data = (SettingsSystemData*)context; + SettingsSystemData *data = (SettingsSystemData *)context; uint32_t new_threshold = (uint32_t)number_window_get_value(number_window); backlight_set_ambient_threshold(new_threshold); data->als_adjustment_active = false; @@ -392,41 +392,38 @@ static void prv_als_threshold_menu_push(SettingsSystemData *data) { // If we don't do this, the text may say the false result // until the user changes the value psleep(200); - + // Get current ambient light reading to show backlight status uint32_t current_reading = light_get_ambient_lux(); uint32_t current_threshold = backlight_get_ambient_threshold(); bool would_backlight_be_on = current_reading <= current_threshold; - + // Create descriptive label with current status - snprintf(data->als_status_buffer, sizeof(data->als_status_buffer), - "Backlight: %s", + snprintf(data->als_status_buffer, sizeof(data->als_status_buffer), "Backlight: %s", would_backlight_be_on ? "ON" : "OFF"); - - NumberWindow *number_window = number_window_create( - data->als_status_buffer, - (NumberWindowCallbacks) { - .selected = prv_als_threshold_selected, - .incremented = prv_als_threshold_incremented, - .decremented = prv_als_threshold_decremented, - }, - data - ); - + + NumberWindow *number_window = + number_window_create(data->als_status_buffer, + (NumberWindowCallbacks){ + .selected = prv_als_threshold_selected, + .incremented = prv_als_threshold_incremented, + .decremented = prv_als_threshold_decremented, + }, + data); + if (!number_window) { // Re-enable backlight if NumberWindow creation failed data->als_adjustment_active = false; light_allow(true); return; } - - + // Set reasonable min/max values for ALS threshold (lux domain) number_window_set_min(number_window, 0); number_window_set_max(number_window, ambient_light_level_to_lux(AMBIENT_LIGHT_LEVEL_MAX)); number_window_set_step_size(number_window, 1); number_window_set_value(number_window, (int32_t)current_threshold); - + const bool animated = true; app_window_stack_push(&number_window->window, animated); } @@ -434,21 +431,16 @@ static void prv_als_threshold_menu_push(SettingsSystemData *data) { // Motion Sensitivity Settings (Asterix/Obelix only) ///////////////////////////// #ifdef CONFIG_ACCEL_SENSITIVITY -static const uint8_t s_motion_sensitivity_values[] = { 10, 25, 40, 55, 70, 85, 100 }; - -static const char *s_motion_sensitivity_labels[] = { - i18n_noop("Very Low"), - i18n_noop("Low"), - i18n_noop("Medium-Low"), - i18n_noop("Medium"), - i18n_noop("Medium-High"), - i18n_noop("High"), - i18n_noop("Very High") -}; +static const uint8_t s_motion_sensitivity_values[] = {10, 25, 40, 55, 70, 85, 100}; + +static const char *s_motion_sensitivity_labels[] = {i18n_noop("Very Low"), i18n_noop("Low"), + i18n_noop("Medium-Low"), i18n_noop("Medium"), + i18n_noop("Medium-High"), i18n_noop("High"), + i18n_noop("Very High")}; static int prv_motion_sensitivity_get_selection_index() { const uint8_t sensitivity = shell_prefs_get_motion_sensitivity(); - + // Find closest match for (int i = 0; i < (int)ARRAY_LENGTH(s_motion_sensitivity_values); i++) { if (sensitivity <= s_motion_sensitivity_values[i]) { @@ -458,7 +450,8 @@ static int prv_motion_sensitivity_get_selection_index() { return ARRAY_LENGTH(s_motion_sensitivity_values) - 1; } -static void prv_motion_sensitivity_menu_select(OptionMenu *option_menu, int selection, void *context) { +static void prv_motion_sensitivity_menu_select(OptionMenu *option_menu, int selection, + void *context) { shell_prefs_set_motion_sensitivity(s_motion_sensitivity_values[selection]); app_window_stack_remove(&option_menu->window, true /* animated */); } @@ -466,13 +459,12 @@ static void prv_motion_sensitivity_menu_select(OptionMenu *option_menu, int sele static void prv_motion_sensitivity_menu_push(SettingsSystemData *data) { int index = prv_motion_sensitivity_get_selection_index(); const OptionMenuCallbacks callbacks = { - .select = prv_motion_sensitivity_menu_select, + .select = prv_motion_sensitivity_menu_select, }; const char *title = i18n_noop("Motion Sensitivity"); - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, index, &callbacks, - ARRAY_LENGTH(s_motion_sensitivity_labels), - true /* icons_enabled */, s_motion_sensitivity_labels, data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, index, &callbacks, + ARRAY_LENGTH(s_motion_sensitivity_labels), true /* icons_enabled */, + s_motion_sensitivity_labels, data); } #endif @@ -490,24 +482,24 @@ static void prv_compact_settings_dbs(void) { // Debug options window /////////////////////// -static const char* s_debugging_titles[DebuggingItem_Count] = { - [DebuggingItemCoreDumpNow] = i18n_noop("CoreDump now"), - [DebuggingItemCoreDumpShortcut] = i18n_noop("CoreDump shortcut"), - [DebuggingItemALSThreshold] = i18n_noop("ALS Threshold"), +static const char *s_debugging_titles[DebuggingItem_Count] = { + [DebuggingItemCoreDumpNow] = i18n_noop("CoreDump now"), + [DebuggingItemCoreDumpShortcut] = i18n_noop("CoreDump shortcut"), + [DebuggingItemALSThreshold] = i18n_noop("ALS Threshold"), #ifdef CONFIG_ACCEL_SENSITIVITY - [DebuggingItemMotionSensitivity] = i18n_noop("Motion Sensitivity"), + [DebuggingItemMotionSensitivity] = i18n_noop("Motion Sensitivity"), #endif - [DebuggingItemAccelShakeLogInfo] = i18n_noop("Shake Log Info"), - [DebuggingItemVibeLogInfo] = i18n_noop("Vibe Log Info"), - [DebuggingItemCompactSettingsDbs] = i18n_noop("Compact Settings DBs"), + [DebuggingItemAccelShakeLogInfo] = i18n_noop("Shake Log Info"), + [DebuggingItemVibeLogInfo] = i18n_noop("Vibe Log Info"), + [DebuggingItemCompactSettingsDbs] = i18n_noop("Compact Settings DBs"), }; -static void prv_debugging_draw_row_callback(GContext* ctx, const Layer *cell_layer, +static void prv_debugging_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, void *context) { PBL_ASSERTN(cell_index->section == 0); PBL_ASSERTN(cell_index->row < DebuggingItem_Count); - SettingsSystemData *data = (SettingsSystemData *) context; + SettingsSystemData *data = (SettingsSystemData *)context; // Check if user canceled out of ALS adjustment (this gets called when we return to settings menu) if (data->als_adjustment_active) { @@ -518,48 +510,48 @@ static void prv_debugging_draw_row_callback(GContext* ctx, const Layer *cell_lay const char *title = i18n_get(s_debugging_titles[cell_index->row], data); const char *subtitle_text = NULL; if (cell_index->row == DebuggingItemCoreDumpShortcut) { - subtitle_text = shell_prefs_can_coredump_on_request() ? i18n_get("10 back-button presses", data) : i18n_get("Disabled", data); + subtitle_text = shell_prefs_can_coredump_on_request() ? i18n_get("10 back-button presses", data) + : i18n_get("Disabled", data); } else if (cell_index->row == DebuggingItemALSThreshold) { // Show current threshold value uint32_t current_threshold = backlight_get_ambient_threshold(); - snprintf(data->als_threshold_buffer, sizeof(data->als_threshold_buffer), - "%"PRIu32, current_threshold); + snprintf(data->als_threshold_buffer, sizeof(data->als_threshold_buffer), "%" PRIu32, + current_threshold); subtitle_text = data->als_threshold_buffer; } #ifdef CONFIG_ACCEL_SENSITIVITY else if (cell_index->row == DebuggingItemMotionSensitivity) { - subtitle_text = i18n_get(s_motion_sensitivity_labels[prv_motion_sensitivity_get_selection_index()], data); + subtitle_text = + i18n_get(s_motion_sensitivity_labels[prv_motion_sensitivity_get_selection_index()], data); } #endif else if (cell_index->row == DebuggingItemAccelShakeLogInfo) { - subtitle_text = shell_prefs_get_accel_shake_log_info_enabled() ? - i18n_get("Enabled", data) : i18n_get("Disabled", data); - } - else if (cell_index->row == DebuggingItemVibeLogInfo) { - subtitle_text = shell_prefs_get_vibe_log_info_enabled() ? - i18n_get("Enabled", data) : i18n_get("Disabled", data); + subtitle_text = shell_prefs_get_accel_shake_log_info_enabled() ? i18n_get("Enabled", data) + : i18n_get("Disabled", data); + } else if (cell_index->row == DebuggingItemVibeLogInfo) { + subtitle_text = shell_prefs_get_vibe_log_info_enabled() ? i18n_get("Enabled", data) + : i18n_get("Disabled", data); } menu_cell_basic_draw(ctx, cell_layer, title, subtitle_text, NULL); } -int16_t prv_debugging_get_cell_height_callback(MenuLayer *menu_layer, - MenuIndex *cell_index, void *context) { +int16_t prv_debugging_get_cell_height_callback(MenuLayer *menu_layer, MenuIndex *cell_index, + void *context) { return PBL_IF_RECT_ELSE(menu_cell_basic_cell_height(), - (menu_layer_is_index_selected(menu_layer, cell_index) ? - MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT : - MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT)); + (menu_layer_is_index_selected(menu_layer, cell_index) + ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT + : MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT)); } -static uint16_t prv_debugging_get_num_rows_callback(MenuLayer *menu_layer, - uint16_t section_index, void *context) { +static uint16_t prv_debugging_get_num_rows_callback(MenuLayer *menu_layer, uint16_t section_index, + void *context) { return DebuggingItem_Count; } -static void prv_debugging_select_callback(MenuLayer *menu_layer, - MenuIndex *cell_index, +static void prv_debugging_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *context) { - SettingsSystemData *data = (SettingsSystemData *) context; - + SettingsSystemData *data = (SettingsSystemData *)context; + switch (cell_index->row) { case DebuggingItemCoreDumpNow: prv_maybe_trigger_core_dump(); @@ -576,12 +568,10 @@ static void prv_debugging_select_callback(MenuLayer *menu_layer, break; #endif case DebuggingItemAccelShakeLogInfo: - shell_prefs_set_accel_shake_log_info_enabled( - !shell_prefs_get_accel_shake_log_info_enabled()); + shell_prefs_set_accel_shake_log_info_enabled(!shell_prefs_get_accel_shake_log_info_enabled()); break; case DebuggingItemVibeLogInfo: - shell_prefs_set_vibe_log_info_enabled( - !shell_prefs_get_vibe_log_info_enabled()); + shell_prefs_set_vibe_log_info_enabled(!shell_prefs_get_vibe_log_info_enabled()); break; case DebuggingItemCompactSettingsDbs: prv_compact_settings_dbs(); @@ -593,37 +583,40 @@ static void prv_debugging_select_callback(MenuLayer *menu_layer, } static void prv_debugging_window_load(Window *window) { - SettingsSystemData *data = (SettingsSystemData*) window_get_user_data(window); + SettingsSystemData *data = (SettingsSystemData *)window_get_user_data(window); prv_init_status_bar(&data->status_layer, &data->window, i18n_get("Debugging", data)); // Create the menu MenuLayer *menu_layer = &data->menu_layer; GRect bounds = data->window.layer.bounds; - const GEdgeInsets menu_layer_insets = (GEdgeInsets) { - .top = STATUS_BAR_LAYER_HEIGHT, - .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT) + const GEdgeInsets menu_layer_insets = (GEdgeInsets){ + .top = STATUS_BAR_LAYER_HEIGHT, + .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT) }; bounds = grect_inset(bounds, menu_layer_insets); menu_layer_init(menu_layer, &bounds); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_num_rows = prv_debugging_get_num_rows_callback, - .get_cell_height = prv_debugging_get_cell_height_callback, - .draw_row = prv_debugging_draw_row_callback, - .select_click = prv_debugging_select_callback, - }); + menu_layer_set_callbacks(menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_rows = prv_debugging_get_num_rows_callback, + .get_cell_height = prv_debugging_get_cell_height_callback, + .draw_row = prv_debugging_draw_row_callback, + .select_click = prv_debugging_select_callback, + }); GColor highlight_bg = shell_prefs_get_theme_highlight_color(); menu_layer_set_highlight_colors(menu_layer, highlight_bg, gcolor_legible_over(highlight_bg)); menu_layer_set_click_config_onto_window(menu_layer, &data->window); menu_layer_set_scroll_wrap_around(menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&data->window.layer, menu_layer_get_layer(menu_layer)); } static void prv_debugging_window_unload(Window *window) { - SettingsSystemData *data = (SettingsSystemData*) window_get_user_data(window); + SettingsSystemData *data = (SettingsSystemData *)window_get_user_data(window); menu_layer_deinit(&data->menu_layer); prv_deinit_status_bar(&data->status_layer); } @@ -631,10 +624,10 @@ static void prv_debugging_window_unload(Window *window) { static void prv_debugging_window_push(SettingsSystemData *data) { window_init(&data->window, WINDOW_NAME("Debugging")); window_set_user_data(&data->window, data); - window_set_window_handlers(&data->window, &(WindowHandlers) { - .load = prv_debugging_window_load, - .unload = prv_debugging_window_unload, - }); + window_set_window_handlers(&data->window, &(WindowHandlers){ + .load = prv_debugging_window_load, + .unload = prv_debugging_window_unload, + }); app_window_stack_push(&data->window, true); } @@ -647,8 +640,9 @@ static bool s_debugging_interstitial_confirmed = false; static void prv_debugging_confirm_cb(ClickRecognizerRef recognizer, void *context) { ConfirmationDialog *dialog = (ConfirmationDialog *)context; - SettingsSystemData *data = (SettingsSystemData *)actionable_dialog_get_user_data((ActionableDialog *) dialog); - + SettingsSystemData *data = + (SettingsSystemData *)actionable_dialog_get_user_data((ActionableDialog *)dialog); + confirmation_dialog_pop(dialog); s_debugging_interstitial_confirmed = true; @@ -667,24 +661,24 @@ static void prv_debugging_interstitial_trigger(SettingsSystemData *context) { return; } - ConfirmationDialog *confirmation_dialog = prv_settings_confirm("Debugging confirmation", - i18n_noop("PebbleOS developers only!"), RESOURCE_ID_GENERIC_WARNING_SMALL); + ConfirmationDialog *confirmation_dialog = + prv_settings_confirm("Debugging confirmation", i18n_noop("PebbleOS developers only!"), + RESOURCE_ID_GENERIC_WARNING_SMALL); actionable_dialog_set_user_data((ActionableDialog *)confirmation_dialog, (void *)context); confirmation_dialog_set_click_config_provider(confirmation_dialog, - prv_debugging_interstitial_click_config); + prv_debugging_interstitial_click_config); app_confirmation_dialog_push(confirmation_dialog); } // Certification Window /////////////////////// -int16_t prv_certification_get_cell_height_callback(MenuLayer *menu_layer, - MenuIndex *cell_index, +int16_t prv_certification_get_cell_height_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *context) { return PBL_IF_RECT_ELSE(menu_cell_basic_cell_height(), - (menu_layer_is_index_selected(menu_layer, cell_index) ? - MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT : - MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT)); + (menu_layer_is_index_selected(menu_layer, cell_index) + ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT + : MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT)); } static void prv_draw_mark_with_inversion(GContext *ctx, GBitmap *mark, const GRect *box, @@ -694,10 +688,7 @@ static void prv_draw_mark_with_inversion(GContext *ctx, GBitmap *mark, const GRe } static int16_t prv_draw_generic_mark(GContext *ctx, GBitmap *mark, GPoint origin, bool highlight) { - GRect box = (GRect) { - .origin = origin, - .size = mark->bounds.size - }; + GRect box = (GRect){.origin = origin, .size = mark->bounds.size}; prv_draw_mark_with_inversion(ctx, mark, &box, highlight); return origin.x + box.size.w; } @@ -732,7 +723,7 @@ static void prv_draw_rt_cell_round(GContext *ctx, const Layer *cell_layer, GBitm // Calculate where the mark should be drawn const GSize mark_size = mark->bounds.size; - GRect mark_rect = (GRect) { .size = mark_size }; + GRect mark_rect = (GRect){.size = mark_size}; // If the cell is selected, align the mark at the top center so we can draw the text below it const GAlign alignment = is_selected ? GAlignTop : GAlignCenter; grect_align(&mark_rect, &rt_rect, alignment, true /* clip */); @@ -753,20 +744,19 @@ static void prv_draw_rt_cell_round(GContext *ctx, const Layer *cell_layer, GBitm } #endif -static void prv_draw_rt_cell( - GContext *ctx, const Layer *cell_layer, SystemCertificationData *cd, - bool is_selected, const void *arg1, const void *arg2) { +static void prv_draw_rt_cell(GContext *ctx, const Layer *cell_layer, SystemCertificationData *cd, + bool is_selected, const void *arg1, const void *arg2) { GBitmap *mark = (GBitmap *)arg1; const char *text = arg2; - PBL_IF_RECT_ELSE(prv_draw_rt_cell_rect, - prv_draw_rt_cell_round)(ctx, cell_layer, mark, text, is_selected); + PBL_IF_RECT_ELSE(prv_draw_rt_cell_rect, prv_draw_rt_cell_round)(ctx, cell_layer, mark, text, + is_selected); } #if PBL_ROUND -static void prv_draw_fcc_cell_round( - GContext *ctx, const GRect *cell_layer_bounds, const char *fcc_title, - const char *fcc_number_subtitle, GBitmap *fcc_mark_icon, - bool cell_is_selected, bool cell_is_highlighted) { +static void prv_draw_fcc_cell_round(GContext *ctx, const GRect *cell_layer_bounds, + const char *fcc_title, const char *fcc_number_subtitle, + GBitmap *fcc_mark_icon, bool cell_is_selected, + bool cell_is_highlighted) { const GFont fcc_title_font = fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD); const int16_t fcc_title_font_cap_padding = 10; const GFont fcc_number_subtitle_font = fonts_get_system_font(FONT_KEY_GOTHIC_18); @@ -778,9 +768,8 @@ static void prv_draw_fcc_cell_round( // Calculate the container of the FCC cell content and center it within the cell const int16_t title_and_icon_width = 50; - GRect container_rect = (GRect) { - .size = GSize(title_and_icon_width, fcc_title_height - fcc_title_font_cap_padding) - }; + GRect container_rect = + (GRect){.size = GSize(title_and_icon_width, fcc_title_height - fcc_title_font_cap_padding)}; if (cell_is_selected) { // Note that we don't subtract the subtitle font's cap padding from the container height // because it exactly matches the vertical spacing we want between the title and subtitle @@ -790,7 +779,7 @@ static void prv_draw_fcc_cell_round( // Draw the FCC title in the top left of the container // We'll reuse this box for the title, subtitle, and icon frames - GRect box = (GRect) { .size = GSize(container_rect.size.w, fcc_title_height) }; + GRect box = (GRect){.size = GSize(container_rect.size.w, fcc_title_height)}; grect_align(&box, &container_rect, GAlignTopLeft, true /* clip */); box.origin.y -= fcc_title_font_cap_padding; graphics_draw_text(ctx, fcc_title, fcc_title_font, box, text_overflow_mode, GTextAlignmentLeft, @@ -814,9 +803,8 @@ static void prv_draw_fcc_cell_round( } #endif -static void prv_draw_fcc_cell( - GContext *ctx, const Layer *cell_layer, SystemCertificationData *cd, - bool is_selected, const void *arg1, const void *arg2) { +static void prv_draw_fcc_cell(GContext *ctx, const Layer *cell_layer, SystemCertificationData *cd, + bool is_selected, const void *arg1, const void *arg2) { const char *title = arg1; const char *subtitle = arg2; const bool highlight = menu_cell_layer_is_highlighted(cell_layer); @@ -828,14 +816,13 @@ static void prv_draw_fcc_cell( const GRect box = (GRect){.origin = mark_origin, .size = mark->bounds.size}; prv_draw_mark_with_inversion(ctx, mark, &box, highlight); #else - prv_draw_fcc_cell_round(ctx, &cell_layer->bounds, title, subtitle, mark, - is_selected, highlight); + prv_draw_fcc_cell_round(ctx, &cell_layer->bounds, title, subtitle, mark, is_selected, highlight); #endif } -static void prv_draw_regulatory_marks_cell( - GContext *ctx, const Layer *cell_layer, SystemCertificationData *cd, - bool is_selected, const void *arg1, const void *arg2) { +static void prv_draw_regulatory_marks_cell(GContext *ctx, const Layer *cell_layer, + SystemCertificationData *cd, bool is_selected, + const void *arg1, const void *arg2) { const GRect *cell_layer_bounds = &cell_layer->bounds; uint32_t start_idx = (uintptr_t)arg1; uint32_t num_marks = (uintptr_t)arg2; @@ -846,7 +833,7 @@ static void prv_draw_regulatory_marks_cell( overall_size.h = MAX(overall_size.h, mark_size.h); overall_size.w += mark_size.w; } - GRect regulatory_marks_rect = (GRect) { .size = overall_size }; + GRect regulatory_marks_rect = (GRect){.size = overall_size}; // Align the rect based on the display shape const GAlign alignment = PBL_IF_RECT_ELSE(GAlignLeft, GAlignCenter); grect_align(®ulatory_marks_rect, cell_layer_bounds, alignment, @@ -860,112 +847,106 @@ static void prv_draw_regulatory_marks_cell( // Vertically center the icon in the cell mark_origin.y = (cell_layer_bounds->size.h - mark->bounds.size.h) / 2; // Draw the icon and advance the x coordinate for drawing the next icon - mark_origin.x = prv_draw_generic_mark(ctx, mark, mark_origin, - highlight) + MARK_PADDING; + mark_origin.x = prv_draw_generic_mark(ctx, mark, mark_origin, highlight) + MARK_PADDING; } } static void prv_append_certification_menu(SystemCertificationData *cd, SystemCertificationMenuItem *item) { PBL_ASSERTN(item->draw_cell_fn); - cd->menu_items = app_realloc(cd->menu_items, - sizeof(*cd->menu_items) * ++cd->menu_count); + cd->menu_items = app_realloc(cd->menu_items, sizeof(*cd->menu_items) * ++cd->menu_count); PBL_ASSERTN(cd->menu_items); cd->menu_items[cd->menu_count - 1] = *item; } -static void prv_append_regulatory_compliance_mark(SystemCertificationData *cd, - GBitmap *mark) { +static void prv_append_regulatory_compliance_mark(SystemCertificationData *cd, GBitmap *mark) { // Determine whether adding this mark overflows the cell, necessitating // another cell for this mark. uint16_t mark_width = mark->bounds.size.w; if (cd->current_regulatory_marks_cell_width + mark_width >= DISP_COLS) { // Flush the current marks to a cell and start a new one. - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_marks_cell, - .arg1 = (void *)(uintptr_t)cd->current_regulatory_marks_cell_start_idx, - .arg2 = (void *)(uintptr_t)cd->num_regulatory_marks_in_current_cell, - }); - cd->current_regulatory_marks_cell_start_idx += - cd->num_regulatory_marks_in_current_cell; + prv_append_certification_menu( + cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_marks_cell, + .arg1 = (void *)(uintptr_t)cd->current_regulatory_marks_cell_start_idx, + .arg2 = (void *)(uintptr_t)cd->num_regulatory_marks_in_current_cell, + }); + cd->current_regulatory_marks_cell_start_idx += cd->num_regulatory_marks_in_current_cell; cd->num_regulatory_marks_in_current_cell = 0; cd->current_regulatory_marks_cell_width = 0; } - cd->regulatory_marks = app_realloc( - cd->regulatory_marks, sizeof(GBitmap *) * ++cd->regulatory_marks_count); + cd->regulatory_marks = + app_realloc(cd->regulatory_marks, sizeof(GBitmap *) * ++cd->regulatory_marks_count); PBL_ASSERTN(cd->regulatory_marks); cd->regulatory_marks[cd->regulatory_marks_count - 1] = mark; cd->num_regulatory_marks_in_current_cell++; cd->current_regulatory_marks_cell_width += mark_width + MARK_PADDING; } -static void prv_finished_appending_regulatory_compliance_marks( - SystemCertificationData *cd) { +static void prv_finished_appending_regulatory_compliance_marks(SystemCertificationData *cd) { if (cd->num_regulatory_marks_in_current_cell) { - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_marks_cell, - .arg1 = (void *)(uintptr_t)cd->current_regulatory_marks_cell_start_idx, - .arg2 = (void *)(uintptr_t)cd->num_regulatory_marks_in_current_cell, - }); + prv_append_certification_menu( + cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_marks_cell, + .arg1 = (void *)(uintptr_t)cd->current_regulatory_marks_cell_start_idx, + .arg2 = (void *)(uintptr_t)cd->num_regulatory_marks_in_current_cell, + }); } } -static void prv_draw_regulatory_id_cell( - GContext *ctx, const Layer *cell_layer, SystemCertificationData *cd, - bool is_selected, const void *arg1, const void *arg2) { +static void prv_draw_regulatory_id_cell(GContext *ctx, const Layer *cell_layer, + SystemCertificationData *cd, bool is_selected, + const void *arg1, const void *arg2) { const char *title = arg1; const char *subtitle = arg2; menu_cell_basic_draw(ctx, cell_layer, title, subtitle, NULL); } -static void prv_draw_korea_regulatory_cell( - GContext *ctx, const Layer *cell_layer, SystemCertificationData *cd, - bool is_selected, const void *arg1, const void *arg2) { +static void prv_draw_korea_regulatory_cell(GContext *ctx, const Layer *cell_layer, + SystemCertificationData *cd, bool is_selected, + const void *arg1, const void *arg2) { const char *title = arg1; const char *subtitle = i18n_get("See details...", title); menu_cell_basic_draw(ctx, cell_layer, title, subtitle, NULL); i18n_free(subtitle, title); } -static void prv_certification_draw_row_callback(GContext* ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *context) { - SettingsSystemData *data = (SettingsSystemData *) context; +static void prv_certification_draw_row_callback(GContext *ctx, const Layer *cell_layer, + MenuIndex *cell_index, void *context) { + SettingsSystemData *data = (SettingsSystemData *)context; PBL_ASSERTN(cell_index->section == 0); SystemCertificationData *cd = &data->certification_data; const bool is_selected = menu_layer_is_index_selected(&data->menu_layer, cell_index); - SystemCertificationMenuItem * const item = &cd->menu_items[cell_index->row]; + SystemCertificationMenuItem *const item = &cd->menu_items[cell_index->row]; item->draw_cell_fn(ctx, cell_layer, cd, is_selected, item->arg1, item->arg2); } static uint16_t prv_certification_get_num_rows_callback(MenuLayer *menu_layer, - uint16_t section_index, - void *context) { - SettingsSystemData *data = (SettingsSystemData *) context; + uint16_t section_index, void *context) { + SettingsSystemData *data = (SettingsSystemData *)context; return data->certification_data.menu_count; } static void prv_push_kcc_window(SystemCertificationData *data); -static void prv_certification_select_callback(MenuLayer *menu_layer, - MenuIndex *cell_index, +static void prv_certification_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *context) { - SettingsSystemData *data = (SettingsSystemData *) context; + SettingsSystemData *data = (SettingsSystemData *)context; SystemCertificationData *cd = &data->certification_data; - if (cell_index->row < cd->menu_count && - cd->menu_items[cell_index->row].select_cb) { + if (cell_index->row < cd->menu_count && cd->menu_items[cell_index->row].select_cb) { cd->menu_items[cell_index->row].select_cb(cd); } } static void prv_certification_window_load(Window *window) { - SettingsSystemData *data = (SettingsSystemData*) window_get_user_data(window); + SettingsSystemData *data = (SettingsSystemData *)window_get_user_data(window); prv_init_status_bar(&data->status_layer, &data->window, i18n_get("Certification", data)); SystemCertificationData *cd = &data->certification_data; - *cd = (SystemCertificationData) {}; + *cd = (SystemCertificationData){}; // Load up the assets gbitmap_init_with_resource(&cd->fcc_mark, RESOURCE_ID_SYSTEM_FCC_MARK); @@ -975,119 +956,117 @@ static void prv_certification_window_load(Window *window) { gbitmap_init_with_resource(&cd->ukca_mark, RESOURCE_ID_SYSTEM_UKCA_MARK); gbitmap_init_with_resource(&cd->r_mark, RESOURCE_ID_SYSTEM_R_MARK); gbitmap_init_with_resource(&cd->t_mark, RESOURCE_ID_SYSTEM_T_MARK); - gbitmap_init_with_resource( - &cd->aus_rcm_mark, RESOURCE_ID_SYSTEM_AUS_RCM_MARK); - gbitmap_init_with_resource( - &cd->nom_nyce_mark, RESOURCE_ID_SYSTEM_NOM_NYCE_MARK); + gbitmap_init_with_resource(&cd->aus_rcm_mark, RESOURCE_ID_SYSTEM_AUS_RCM_MARK); + gbitmap_init_with_resource(&cd->nom_nyce_mark, RESOURCE_ID_SYSTEM_NOM_NYCE_MARK); // Construct the certification menu const RegulatoryFlags *flags = prv_get_regulatory_flags(); // Add company name - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("Company", data), - .arg2 = prv_get_company_name(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("Company", data), + .arg2 = prv_get_company_name(), + }); // Add model from MFG storage prv_get_model(cd->model_buffer); - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("Product Model", data), - .arg2 = cd->model_buffer, - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("Product Model", data), + .arg2 = cd->model_buffer, + }); // Add product type - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("Product Type", data), - .arg2 = prv_get_product_type(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("Product Type", data), + .arg2 = prv_get_product_type(), + }); // Add trademark - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("Trademark", data), - .arg2 = prv_get_trademark(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("Trademark", data), + .arg2 = prv_get_trademark(), + }); // Add place of origin - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("Place of Origin", data), - .arg2 = prv_get_place_of_origin(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("Place of Origin", data), + .arg2 = prv_get_place_of_origin(), + }); // Add DC input - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("DC Input", data), - .arg2 = prv_get_dc_input(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("DC Input", data), + .arg2 = prv_get_dc_input(), + }); // Add rated voltage - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("Rated Voltage", data), - .arg2 = prv_get_rated_voltage(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("Rated Voltage", data), + .arg2 = prv_get_rated_voltage(), + }); // Add milliampere-hour - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("Milliampere-hour", data), - .arg2 = prv_get_milliampere_hour(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("Milliampere-hour", data), + .arg2 = prv_get_milliampere_hour(), + }); // Add watt-hour - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("Watt-hour", data), - .arg2 = prv_get_watt_hour(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("Watt-hour", data), + .arg2 = prv_get_watt_hour(), + }); if (flags->has_usa_fcc) { - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_fcc_cell, - .arg1 = "FCC", - .arg2 = prv_get_usa_fcc_id(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_fcc_cell, + .arg1 = "FCC", + .arg2 = prv_get_usa_fcc_id(), + }); } if (flags->has_canada_ic) { - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("Canada IC", data), - .arg2 = prv_get_canada_ic_id(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("Canada IC", data), + .arg2 = prv_get_canada_ic_id(), + }); } if (flags->has_canada_ised) { - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = i18n_get("Canada ISED", data), - .arg2 = prv_get_canada_ised_id(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = i18n_get("Canada ISED", data), + .arg2 = prv_get_canada_ised_id(), + }); } if (flags->has_china_cmiit) { - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = "CMIIT ID", - .arg2 = prv_get_china_cmiit_id(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = "CMIIT ID", + .arg2 = prv_get_china_cmiit_id(), + }); } if (flags->has_korea_kcc) { - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_korea_regulatory_cell, - .arg1 = i18n_get("South Korea KCC", data), - .select_cb = prv_push_kcc_window, - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_korea_regulatory_cell, + .arg1 = i18n_get("South Korea KCC", data), + .select_cb = prv_push_kcc_window, + }); } if (flags->has_mexico_nom_nyce) { - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_regulatory_id_cell, - .arg1 = "IFETEL", - .arg2 = prv_get_mexico_ifetel_id(), - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_regulatory_id_cell, + .arg1 = "IFETEL", + .arg2 = prv_get_mexico_ifetel_id(), + }); } if (flags->has_korea_kcc) { @@ -1111,47 +1090,50 @@ static void prv_certification_window_load(Window *window) { prv_finished_appending_regulatory_compliance_marks(cd); if (flags->has_japan_telec_r) { - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_rt_cell, - .arg1 = &cd->r_mark, - .arg2 = prv_get_japan_telec_r_id() - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_rt_cell, + .arg1 = &cd->r_mark, + .arg2 = prv_get_japan_telec_r_id() + }); } if (flags->has_japan_telec_t) { - prv_append_certification_menu(cd, &(SystemCertificationMenuItem) { - .draw_cell_fn = prv_draw_rt_cell, - .arg1 = &cd->t_mark, - .arg2 = prv_get_japan_telec_t_id() - }); + prv_append_certification_menu(cd, &(SystemCertificationMenuItem){ + .draw_cell_fn = prv_draw_rt_cell, + .arg1 = &cd->t_mark, + .arg2 = prv_get_japan_telec_t_id() + }); } // Create the menu MenuLayer *menu_layer = &data->menu_layer; GRect bounds = data->window.layer.bounds; - const GEdgeInsets menu_layer_insets = (GEdgeInsets) { - .top = STATUS_BAR_LAYER_HEIGHT, - .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT) + const GEdgeInsets menu_layer_insets = (GEdgeInsets){ + .top = STATUS_BAR_LAYER_HEIGHT, + .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT) }; bounds = grect_inset(bounds, menu_layer_insets); menu_layer_init(menu_layer, &bounds); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_num_rows = prv_certification_get_num_rows_callback, - .get_cell_height = prv_certification_get_cell_height_callback, - .draw_row = prv_certification_draw_row_callback, - .select_click = prv_certification_select_callback, - }); + menu_layer_set_callbacks(menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_rows = prv_certification_get_num_rows_callback, + .get_cell_height = prv_certification_get_cell_height_callback, + .draw_row = prv_certification_draw_row_callback, + .select_click = prv_certification_select_callback, + }); GColor highlight_bg = shell_prefs_get_theme_highlight_color(); menu_layer_set_highlight_colors(menu_layer, highlight_bg, gcolor_legible_over(highlight_bg)); menu_layer_set_click_config_onto_window(menu_layer, &data->window); menu_layer_set_scroll_wrap_around(menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&data->window.layer, menu_layer_get_layer(menu_layer)); } static void prv_certification_window_unload(Window *window) { - SettingsSystemData *data = (SettingsSystemData*) window_get_user_data(window); + SettingsSystemData *data = (SettingsSystemData *)window_get_user_data(window); menu_layer_deinit(&data->menu_layer); @@ -1174,15 +1156,15 @@ static void prv_certification_window_unload(Window *window) { static void prv_certification_window_push(SettingsSystemData *data) { window_init(&data->window, WINDOW_NAME("System Certification")); window_set_user_data(&data->window, data); - window_set_window_handlers(&data->window, &(WindowHandlers) { - .load = prv_certification_window_load, - .unload = prv_certification_window_unload, - }); + window_set_window_handlers(&data->window, &(WindowHandlers){ + .load = prv_certification_window_load, + .unload = prv_certification_window_unload, + }); app_window_stack_push(&data->window, true); } static void prv_kcc_window_load(Window *window) { - SystemCertificationData *data = (SystemCertificationData *) window_get_user_data(window); + SystemCertificationData *data = (SystemCertificationData *)window_get_user_data(window); Layer *window_layer = window_get_root_layer(window); const char *title = i18n_get("South Korea KCC", data); @@ -1198,40 +1180,38 @@ static void prv_kcc_window_load(Window *window) { const GFont info_text_font = fonts_get_system_font(FONT_KEY_GOTHIC_14); const GSize info_text_size = GSize(window_bounds.size.w, fonts_get_font_height(info_text_font)); const int16_t vertical_spacing = 3; - GRect certification_rect = (GRect) { - .size = GSize(window_bounds.size.w, - bmp_size.h + title_text_size.h + info_text_size.h + vertical_spacing) + GRect certification_rect = (GRect){ + .size = GSize(window_bounds.size.w, + bmp_size.h + title_text_size.h + info_text_size.h + vertical_spacing) }; grect_align(&certification_rect, &window_bounds, GAlignCenter, true /* clip */); - GRect bmp_frame = (GRect) { .size = bmp_size }; + GRect bmp_frame = (GRect){.size = bmp_size}; grect_align(&bmp_frame, &certification_rect, GAlignTop, true /* clip */); bitmap_layer_init(&data->bmp_layer, &bmp_frame); bitmap_layer_set_bitmap(&data->bmp_layer, bmp); bitmap_layer_set_compositing_mode(&data->bmp_layer, GCompOpAssign); layer_add_child(window_layer, bitmap_layer_get_layer(&data->bmp_layer)); - GRect title_text_frame = (GRect) { .size = title_text_size }; + GRect title_text_frame = (GRect){.size = title_text_size}; const int16_t title_text_internal_padding = 5; - title_text_frame.origin.y = bmp_frame.origin.y + bmp_size.h + vertical_spacing - - title_text_internal_padding; - text_layer_init_with_parameters(&data->title_text, &title_text_frame, - title, title_text_font, + title_text_frame.origin.y = + bmp_frame.origin.y + bmp_size.h + vertical_spacing - title_text_internal_padding; + text_layer_init_with_parameters(&data->title_text, &title_text_frame, title, title_text_font, GColorBlack, GColorClear, GTextAlignmentCenter, GTextOverflowModeTrailingEllipsis); layer_add_child(window_layer, text_layer_get_layer(&data->title_text)); - GRect info_text_frame = (GRect) { .size = info_text_size }; + GRect info_text_frame = (GRect){.size = info_text_size}; info_text_frame.origin.y = title_text_frame.origin.y + title_text_size.h + vertical_spacing; - text_layer_init_with_parameters(&data->info_text, &info_text_frame, - prv_get_korea_kcc_id(), info_text_font, - GColorBlack, GColorClear, GTextAlignmentCenter, + text_layer_init_with_parameters(&data->info_text, &info_text_frame, prv_get_korea_kcc_id(), + info_text_font, GColorBlack, GColorClear, GTextAlignmentCenter, GTextOverflowModeTrailingEllipsis); layer_add_child(window_layer, text_layer_get_layer(&data->info_text)); } static void prv_kcc_window_unload(Window *window) { - SystemCertificationData *data = (SystemCertificationData *) window_get_user_data(window); + SystemCertificationData *data = (SystemCertificationData *)window_get_user_data(window); prv_deinit_status_bar(&data->status_layer); bitmap_layer_deinit(&data->bmp_layer); text_layer_deinit(&data->title_text); @@ -1242,10 +1222,10 @@ static void prv_kcc_window_unload(Window *window) { static void prv_push_kcc_window(SystemCertificationData *data) { window_init(&data->kcc_window, WINDOW_NAME("System KCC")); window_set_user_data(&data->kcc_window, data); - window_set_window_handlers(&data->kcc_window, &(WindowHandlers) { - .load = prv_kcc_window_load, - .unload = prv_kcc_window_unload, - }); + window_set_window_handlers(&data->kcc_window, &(WindowHandlers){ + .load = prv_kcc_window_load, + .unload = prv_kcc_window_unload, + }); app_window_stack_push(&data->kcc_window, true); } @@ -1253,12 +1233,12 @@ static void prv_push_kcc_window(SystemCertificationData *data) { //////////////////////////////////////////////////// static void prv_shutdown_confirm_cb(ClickRecognizerRef recognizer, void *context) { - actionable_dialog_pop((ActionableDialog *) context); + actionable_dialog_pop((ActionableDialog *)context); battery_ui_handle_shut_down(); } static void prv_shutdown_back_cb(ClickRecognizerRef recognizer, void *context) { - actionable_dialog_pop((ActionableDialog *) context); + actionable_dialog_pop((ActionableDialog *)context); } static void prv_shutdown_click_provider(void *context) { @@ -1266,7 +1246,7 @@ static void prv_shutdown_click_provider(void *context) { window_single_click_subscribe(BUTTON_ID_BACK, prv_shutdown_back_cb); } -static void prv_shutdown_cb(void* data) { +static void prv_shutdown_cb(void *data) { ActionableDialog *a_dialog = actionable_dialog_create("Shutdown"); Dialog *dialog = actionable_dialog_get_dialog(a_dialog); @@ -1284,13 +1264,13 @@ static void prv_shutdown_cb(void* data) { } static void prv_deinit_cb(SettingsCallbacks *context) { - SettingsSystemData *data = (SettingsSystemData *) context; + SettingsSystemData *data = (SettingsSystemData *)context; i18n_free_all(data); } -static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, - const Layer *cell_layer, uint16_t row, bool selected) { - SettingsSystemData *data = (SettingsSystemData *) context; +static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, + uint16_t row, bool selected) { + SettingsSystemData *data = (SettingsSystemData *)context; const char *subtitle = NULL; PBL_ASSERTN(row < SystemMenuItem_Count); switch (row) { @@ -1315,7 +1295,7 @@ void factory_reset_select_callback(int index, void *context) { } static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { - SettingsSystemData *data = (SettingsSystemData *) context; + SettingsSystemData *data = (SettingsSystemData *)context; switch (row) { case SystemMenuItemInformation: @@ -1350,11 +1330,11 @@ static Window *prv_init(void) { SettingsSystemData *data = app_malloc_check(sizeof(SettingsSystemData)); *data = (SettingsSystemData){}; - data->callbacks = (SettingsCallbacks) { - .deinit = prv_deinit_cb, - .draw_row = prv_draw_row_cb, - .select_click = prv_select_click_cb, - .num_rows = prv_num_rows_cb, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_deinit_cb, + .draw_row = prv_draw_row_cb, + .select_click = prv_select_click_cb, + .num_rows = prv_num_rows_cb, }; return settings_window_create(SettingsMenuItemSystem, &data->callbacks); @@ -1362,8 +1342,8 @@ static Window *prv_init(void) { const SettingsModuleMetadata *settings_system_get_info(void) { static const SettingsModuleMetadata s_module_info = { - .name = i18n_noop("System"), - .init = prv_init, + .name = i18n_noop("System"), + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/themes.c b/src/fw/apps/system/settings/themes.c index ff3b2f43bc..9d0ed0aee7 100644 --- a/src/fw/apps/system/settings/themes.c +++ b/src/fw/apps/system/settings/themes.c @@ -23,34 +23,31 @@ typedef struct ColorDefinition { } ColorDefinition; static const ColorDefinition s_color_definitions[11] = { - {"Default", GColorClear}, - {"Red", GColorSunsetOrange}, - {"Orange", GColorChromeYellow}, - {"Yellow", GColorYellow}, - {"Green", GColorGreen}, - {"Cyan", GColorCyan}, - {"Light Blue", GColorVividCerulean}, - {"Royal Blue", GColorVeryLightBlue}, - {"Purple", GColorLavenderIndigo}, - {"Magenta", GColorMagenta}, - {"Pink", GColorBrilliantRose}, + {"Default", GColorClear}, + {"Red", GColorSunsetOrange}, + {"Orange", GColorChromeYellow}, + {"Yellow", GColorYellow}, + {"Green", GColorGreen}, + {"Cyan", GColorCyan}, + {"Light Blue", GColorVividCerulean}, + {"Royal Blue", GColorVeryLightBlue}, + {"Purple", GColorLavenderIndigo}, + {"Magenta", GColorMagenta}, + {"Pink", GColorBrilliantRose}, }; -static const char* color_names[ARRAY_LENGTH(s_color_definitions)]; +static const char *color_names[ARRAY_LENGTH(s_color_definitions)]; static bool color_names_initialized = false; -static const char** prv_get_color_names(bool short_list) { +static const char **prv_get_color_names(bool short_list) { if (!color_names_initialized) { for (size_t i = 0; i < ARRAY_LENGTH(s_color_definitions); i++) { - color_names[i] = (char*)s_color_definitions[i].name; + color_names[i] = (char *)s_color_definitions[i].name; } color_names_initialized = true; } return color_names; } - - - static int prv_color_to_index(GColor color, GColor default_color) { if (color.argb == GColorClear.argb || color.argb == default_color.argb) { return 0; @@ -64,7 +61,6 @@ static int prv_color_to_index(GColor color, GColor default_color) { return -1; } - ///////////////////////////// // Unified Accent Color Settings ///////////////////////////// @@ -84,10 +80,8 @@ static void prv_color_menu_select(OptionMenu *option_menu, int selection, void * app_window_stack_remove(&option_menu->window, true /* animated */); } -static void prv_option_menu_selection_will_change(OptionMenu *option_menu, - uint16_t new_row, - uint16_t old_row, - void *context) { +static void prv_option_menu_selection_will_change(OptionMenu *option_menu, uint16_t new_row, + uint16_t old_row, void *context) { if (new_row == old_row) { return; } @@ -95,17 +89,19 @@ static void prv_option_menu_selection_will_change(OptionMenu *option_menu, if (color.argb != GColorClear.argb) { option_menu_set_highlight_colors(option_menu, color, gcolor_legible_over(color)); } else { - option_menu_set_highlight_colors(option_menu, DEFAULT_THEME_HIGHLIGHT_COLOR, gcolor_legible_over(DEFAULT_THEME_HIGHLIGHT_COLOR)); + option_menu_set_highlight_colors(option_menu, DEFAULT_THEME_HIGHLIGHT_COLOR, + gcolor_legible_over(DEFAULT_THEME_HIGHLIGHT_COLOR)); } } static OptionMenu *prv_push_color_menu(void) { const char *title = i18n_noop("Accent Color"); - int selected = prv_color_to_index(shell_prefs_get_theme_highlight_color(), DEFAULT_THEME_HIGHLIGHT_COLOR); - const char** color_names = prv_get_color_names(false); + int selected = + prv_color_to_index(shell_prefs_get_theme_highlight_color(), DEFAULT_THEME_HIGHLIGHT_COLOR); + const char **color_names = prv_get_color_names(false); const OptionMenuCallbacks callbacks = { - .select = prv_color_menu_select, - .selection_will_change = prv_option_menu_selection_will_change, + .select = prv_color_menu_select, + .selection_will_change = prv_option_menu_selection_will_change, }; if (selected < 0) { // Invalid color stored - fall back to default instead of crashing @@ -113,7 +109,7 @@ static OptionMenu *prv_push_color_menu(void) { PBL_LOG_WRN("Invalid menu color, using default"); selected = 0; } - OptionMenu * const option_menu = settings_option_menu_create( + OptionMenu *const option_menu = settings_option_menu_create( title, OptionMenuContentType_SingleLine, selected, &callbacks, ARRAY_LENGTH(s_color_definitions), true /* icons_enabled */, color_names, NULL); @@ -129,7 +125,7 @@ static OptionMenu *prv_push_color_menu(void) { return option_menu; } -#endif // CONFIG_THEMING +#endif // CONFIG_THEMING static Window *prv_create_color_menu(void) { #ifdef CONFIG_THEMING @@ -145,12 +141,11 @@ static Window *prv_init(void) { return prv_create_color_menu(); } - const SettingsModuleMetadata *settings_themes_get_info(void) { static const SettingsModuleMetadata s_module_info = { - /// Title of the Themes Settings submenu in Settings - .name = i18n_noop("Themes"), - .init = prv_init, + /// Title of the Themes Settings submenu in Settings + .name = i18n_noop("Themes"), + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/time.c b/src/fw/apps/system/settings/time.c index 24e4a1f0bc..406645338b 100644 --- a/src/fw/apps/system/settings/time.c +++ b/src/fw/apps/system/settings/time.c @@ -41,8 +41,8 @@ typedef struct { // Timezone data uint16_t region_count; uint16_t continent_selected; - uint16_t continent_start[NUM_CONTINENTS + 1]; //!< First region id for the continent - uint16_t continent_end[NUM_CONTINENTS]; //!< Last+1 region id for the continent + uint16_t continent_start[NUM_CONTINENTS + 1]; //!< First region id for the continent + uint16_t continent_end[NUM_CONTINENTS]; //!< Last+1 region id for the continent const char **continent_names; const char **region_names; @@ -101,7 +101,6 @@ static uint16_t prv_visible_row_count(void) { return count; } - // Timezone Window Setup //////////////////////////// @@ -117,7 +116,7 @@ static void prv_format_region_name(char *region_name) { //! Initialize the continent and region names for the timezone windows static void prv_init_continent_and_region_names(SettingsTimeData *data) { const uint16_t region_count = data->region_count = timezone_database_get_region_count(); - char * const region_names_buffer = app_zalloc_check(region_count * TIMEZONE_NAME_LENGTH); + char *const region_names_buffer = app_zalloc_check(region_count * TIMEZONE_NAME_LENGTH); char *cursor = region_names_buffer; char *last_cursor = cursor; const char **continent_names = app_zalloc_check(NUM_CONTINENTS * sizeof(char *)); @@ -141,7 +140,7 @@ static void prv_init_continent_and_region_names(SettingsTimeData *data) { } // If the new continent is filtered out, don't create a new continent or update the last // continent pointer. - if (strcmp(cursor, "Etc") == 0) { // Filter out 'Etc' fake-continent + if (strcmp(cursor, "Etc") == 0) { // Filter out 'Etc' fake-continent continue; } // Set pointer for the continent name @@ -181,13 +180,13 @@ static void prv_region_menu_select(OptionMenu *option_menu, int selection, void static void prv_region_menu_push(SettingsTimeData *data) { const char *title = prv_get_timezone_title(); const OptionMenuCallbacks callbacks = { - .select = prv_region_menu_select, + .select = prv_region_menu_select, }; const int start_index = data->continent_start[data->continent_selected]; const int end_index = data->continent_end[data->continent_selected]; - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, OPTION_MENU_CHOICE_NONE, &callbacks, - end_index - start_index, true /* icons_enabled */, &data->region_names[start_index], data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, OPTION_MENU_CHOICE_NONE, + &callbacks, end_index - start_index, true /* icons_enabled */, + &data->region_names[start_index], data); } // Timezone Continent Menu @@ -201,10 +200,10 @@ static void prv_continent_menu_select(OptionMenu *option_menu, int selection, vo static void prv_continent_menu_push(SettingsTimeData *data) { const char *title = prv_get_timezone_title(); - const OptionMenuCallbacks callbacks = { - .select = prv_continent_menu_select, + const OptionMenuCallbacks callbacks = { + .select = prv_continent_menu_select, }; - OptionMenu * const continent_menu = settings_option_menu_push( + OptionMenu *const continent_menu = settings_option_menu_push( title, OptionMenuContentType_SingleLine, OPTION_MENU_CHOICE_NONE, &callbacks, NUM_CONTINENTS, false /* icons_enabled */, data->continent_names, data); data->continent_window = &continent_menu->window; @@ -261,14 +260,14 @@ static void prv_time_picker_push(SettingsTimeData *data) { time_selection_window_deinit(picker); const TimeSelectionWindowConfig config = { - .label = i18n_noop("Set Time"), - .color = PBL_IF_COLOR_ELSE(GColorJaegerGreen, GColorBlack), - .range = { .update = true, .enabled = false }, - .callback = { - .update = true, - .complete = prv_time_picker_complete, - .context = data, - }, + .label = i18n_noop("Set Time"), + .color = PBL_IF_COLOR_ELSE(GColorJaegerGreen, GColorBlack), + .range = {.update = true, .enabled = false}, + .callback = { + .update = true, + .complete = prv_time_picker_complete, + .context = data, + }, }; time_selection_window_init(picker, &config); time_selection_window_set_to_current_time(picker); @@ -311,7 +310,7 @@ static void prv_date_picker_push(SettingsTimeData *data) { // Date & Time Menu //////////////////////////// static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { - SettingsTimeData *data = (SettingsTimeData*) context; + SettingsTimeData *data = (SettingsTimeData *)context; switch (prv_row_for_index(row)) { case TimeRow_TimeSource: // Toggle automatic / manual time @@ -346,9 +345,9 @@ static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { settings_menu_mark_dirty(SettingsMenuItemDateTime); } -static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, - const Layer *cell_layer, uint16_t row, bool selected) { - SettingsTimeData *data = (SettingsTimeData*) context; +static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, + uint16_t row, bool selected) { + SettingsTimeData *data = (SettingsTimeData *)context; const char *title = NULL; const char *subtitle = NULL; @@ -360,16 +359,14 @@ static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, switch (prv_row_for_index(row)) { case TimeRow_TimeSource: { title = i18n_noop("Time Source"); - subtitle = clock_time_source_is_manual() ? i18n_noop("Manual") : - i18n_noop("Automatic"); + subtitle = clock_time_source_is_manual() ? i18n_noop("Manual") : i18n_noop("Automatic"); break; } case TimeRow_SetTime: { title = i18n_noop("Set Time"); struct tm local_now; clock_get_time_tm(&local_now); - clock_format_time(time_buf, sizeof(time_buf), - local_now.tm_hour, local_now.tm_min, true); + clock_format_time(time_buf, sizeof(time_buf), local_now.tm_hour, local_now.tm_min, true); subtitle = time_buf; break; } @@ -393,8 +390,8 @@ static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, } else if (clock_is_timezone_set()) { // Show the active timezone since the Timezone row is hidden clock_get_timezone_region(current_timezone_region, TIMEZONE_NAME_LENGTH); - snprintf(tz_source_buf, sizeof(tz_source_buf), "%s (%s)", - i18n_get("Automatic", data), current_timezone_region); + snprintf(tz_source_buf, sizeof(tz_source_buf), "%s (%s)", i18n_get("Automatic", data), + current_timezone_region); subtitle = tz_source_buf; } else { subtitle = i18n_noop("Automatic"); @@ -419,7 +416,7 @@ static uint16_t prv_num_rows_cb(SettingsCallbacks *context) { } static void prv_deinit_cb(SettingsCallbacks *context) { - SettingsTimeData *data = (SettingsTimeData*) context; + SettingsTimeData *data = (SettingsTimeData *)context; i18n_free_all(data); app_free(data->continent_names); app_free(data->region_names); @@ -433,11 +430,11 @@ static Window *prv_init(void) { SettingsTimeData *data = app_malloc_check(sizeof(*data)); *data = (SettingsTimeData){}; - data->callbacks = (SettingsCallbacks) { - .deinit = prv_deinit_cb, - .draw_row = prv_draw_row_cb, - .select_click = prv_select_click_cb, - .num_rows = prv_num_rows_cb, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_deinit_cb, + .draw_row = prv_draw_row_cb, + .select_click = prv_select_click_cb, + .num_rows = prv_num_rows_cb, }; prv_init_continent_and_region_names(data); @@ -447,8 +444,8 @@ static Window *prv_init(void) { const SettingsModuleMetadata *settings_time_get_info(void) { static const SettingsModuleMetadata s_module_info = { - .name = i18n_noop("Date & Time"), - .init = prv_init, + .name = i18n_noop("Date & Time"), + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/timeline.c b/src/fw/apps/system/settings/timeline.c index 54354a31b6..8c96a2eef0 100644 --- a/src/fw/apps/system/settings/timeline.c +++ b/src/fw/apps/system/settings/timeline.c @@ -64,37 +64,37 @@ typedef enum UnsupportedFacesMenuIndex { #endif static const char *s_before_time_strings[PeekBeforeTimingMenuIndexCount] = { - /// Shows up in the Timeline settings as a "Timing" subtitle and submenu option. - i18n_noop("Start Time"), - /// Shows up in the Timeline settings as a "Timing" subtitle and submenu option. - i18n_noop("5 Min Before"), - /// Shows up in the Timeline settings as a "Timing" subtitle and submenu option. - i18n_noop("10 Min Before"), - /// Shows up in the Timeline settings as a "Timing" subtitle and submenu option. - i18n_noop("15 Min Before"), - /// Shows up in the Timeline settings as a "Timing" subtitle and submenu option. - i18n_noop("30 Min Before"), + /// Shows up in the Timeline settings as a "Timing" subtitle and submenu option. + i18n_noop("Start Time"), + /// Shows up in the Timeline settings as a "Timing" subtitle and submenu option. + i18n_noop("5 Min Before"), + /// Shows up in the Timeline settings as a "Timing" subtitle and submenu option. + i18n_noop("10 Min Before"), + /// Shows up in the Timeline settings as a "Timing" subtitle and submenu option. + i18n_noop("15 Min Before"), + /// Shows up in the Timeline settings as a "Timing" subtitle and submenu option. + i18n_noop("30 Min Before"), }; static uint16_t s_before_time_values[PeekBeforeTimingMenuIndexCount] = { - 0, 5, 10, 15, 30, + 0, 5, 10, 15, 30, }; #if TIMELINE_PEEK_WATCHFACE_FIT_SUPPORTED static const char *s_unsupported_faces_strings[UnsupportedFacesMenuIndexCount] = { - /// Shows up in the Timeline settings as an "Unsupported Faces" submenu option. - i18n_noop("Overlay"), - /// Shows up in the Timeline settings as an "Unsupported Faces" submenu option. - i18n_noop("Shift up"), - /// Shows up in the Timeline settings as an "Unsupported Faces" submenu option. - i18n_noop("Squish up"), + /// Shows up in the Timeline settings as an "Unsupported Faces" submenu option. + i18n_noop("Overlay"), + /// Shows up in the Timeline settings as an "Unsupported Faces" submenu option. + i18n_noop("Shift up"), + /// Shows up in the Timeline settings as an "Unsupported Faces" submenu option. + i18n_noop("Squish up"), }; static const TimelinePeekUnsupportedFaceMode s_unsupported_faces_values[UnsupportedFacesMenuIndexCount] = { - TimelinePeekUnsupportedFaceMode_None, - TimelinePeekUnsupportedFaceMode_ShiftUp, - TimelinePeekUnsupportedFaceMode_SquishUp, + TimelinePeekUnsupportedFaceMode_None, + TimelinePeekUnsupportedFaceMode_ShiftUp, + TimelinePeekUnsupportedFaceMode_SquishUp, }; #endif @@ -123,11 +123,11 @@ static void prv_push_before_time_menu(SettingsTimelinePeekData *data) { const char *title = i18n_noop("Timing"); const int selected = prv_before_time_min_to_index(timeline_peek_prefs_get_before_time()); const OptionMenuCallbacks callbacks = { - .select = prv_before_time_menu_select, + .select = prv_before_time_menu_select, }; - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, selected, &callbacks, - ARRAY_LENGTH(s_before_time_strings), true /* icons_enabled */, s_before_time_strings, data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, selected, &callbacks, + ARRAY_LENGTH(s_before_time_strings), true /* icons_enabled */, + s_before_time_strings, data); } #if TIMELINE_PEEK_WATCHFACE_FIT_SUPPORTED @@ -150,15 +150,14 @@ static void prv_unsupported_faces_menu_select(OptionMenu *option_menu, int selec static void prv_push_unsupported_faces_menu(SettingsTimelinePeekData *data) { /// Shows up in the Timeline settings as the title for unsupported watchface behavior. const char *title = i18n_noop("Unsupported Faces"); - const int selected = prv_unsupported_face_mode_to_index( - timeline_peek_prefs_get_unsupported_face_mode()); + const int selected = + prv_unsupported_face_mode_to_index(timeline_peek_prefs_get_unsupported_face_mode()); const OptionMenuCallbacks callbacks = { - .select = prv_unsupported_faces_menu_select, + .select = prv_unsupported_faces_menu_select, }; - settings_option_menu_push( - title, OptionMenuContentType_SingleLine, selected, &callbacks, - ARRAY_LENGTH(s_unsupported_faces_strings), true /* icons_enabled */, - s_unsupported_faces_strings, data); + settings_option_menu_push(title, OptionMenuContentType_SingleLine, selected, &callbacks, + ARRAY_LENGTH(s_unsupported_faces_strings), true /* icons_enabled */, + s_unsupported_faces_strings, data); } #endif @@ -168,12 +167,12 @@ static void prv_deinit_cb(SettingsCallbacks *context) { } static uint16_t prv_num_rows_cb(SettingsCallbacks *context) { - return timeline_peek_prefs_get_enabled() ? TimelinePeekMenuIndexEnabledCount : - TimelinePeekMenuIndexDisabledCount; + return timeline_peek_prefs_get_enabled() ? TimelinePeekMenuIndexEnabledCount + : TimelinePeekMenuIndexDisabledCount; } -static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, - const Layer *cell_layer, uint16_t row, bool selected) { +static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, + uint16_t row, bool selected) { SettingsTimelinePeekData *data = (SettingsTimelinePeekData *)context; const char *title = NULL; const char *subtitle = NULL; @@ -183,16 +182,19 @@ static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, /// Shows up in the Timeline settings as a toggle-able "Quick View" item. title = i18n_noop("Quick View"); /// Shows up in the Timeline settings as the status under the "Quick View" toggle. - subtitle = timeline_peek_prefs_get_enabled() ? i18n_noop("On") : - /// Shows up in the Timeline settings as the status under the "Quick View" toggle. - i18n_noop("Off"); + subtitle = + timeline_peek_prefs_get_enabled() + ? i18n_noop("On") + : + /// Shows up in the Timeline settings as the status under the "Quick View" toggle. + i18n_noop("Off"); break; case TimelinePeekMenuIndex_Timing: /// Shows up in the Timeline settings as the title for the menu item that controls the /// timing for when to begin showing the peek for an event. title = i18n_noop("Timing"); - subtitle = s_before_time_strings[ - prv_before_time_min_to_index(timeline_peek_prefs_get_before_time())]; + subtitle = s_before_time_strings[prv_before_time_min_to_index( + timeline_peek_prefs_get_before_time())]; break; #if TIMELINE_PEEK_WATCHFACE_FIT_SUPPORTED case TimelinePeekMenuIndex_UnsupportedFaces: @@ -235,14 +237,15 @@ static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { static Window *prv_create_settings_window(void) { SettingsTimelinePeekData *data = app_malloc_check(sizeof(*data)); - *data = (SettingsTimelinePeekData) { - .callbacks = { - .deinit = prv_deinit_cb, - .draw_row = prv_draw_row_cb, - .select_click = prv_select_click_cb, - .num_rows = prv_num_rows_cb, - }, - .info_font = fonts_get_system_font(FONT_KEY_GOTHIC_18), + *data = (SettingsTimelinePeekData){ + .callbacks = + { + .deinit = prv_deinit_cb, + .draw_row = prv_draw_row_cb, + .select_click = prv_select_click_cb, + .num_rows = prv_num_rows_cb, + }, + .info_font = fonts_get_system_font(FONT_KEY_GOTHIC_18), }; return settings_window_create(SettingsMenuItemTimeline, &data->callbacks); @@ -256,12 +259,12 @@ static void prv_push_settings_window(ClickRecognizerRef recognizer, void *contex } static Window *prv_create_first_use_dialog(void) { - const void *i18n_owner = prv_create_first_use_dialog; // Use this function as the i18n owner + const void *i18n_owner = prv_create_first_use_dialog; // Use this function as the i18n owner /// Title for the Timeline Quick View first use dialog. const char *header = i18n_get("Quick View", i18n_owner); /// Help text for the Timeline Quick View first use dialog. - const char *text = i18n_get("Appears on your watchface when an event is about to start.", - i18n_owner); + const char *text = + i18n_get("Appears on your watchface when an event is about to start.", i18n_owner); ExpandableDialog *expandable_dialog = expandable_dialog_create_with_params( WINDOW_NAME("Timeline Quick View First Use"), RESOURCE_ID_SUNNY_DAY_TINY, text, GColorBlack, PBL_IF_COLOR_ELSE(GColorLightGray, GColorWhite), NULL, RESOURCE_ID_ACTION_BAR_ICON_CHECK, @@ -287,8 +290,8 @@ static Window *prv_init(void) { const SettingsModuleMetadata *settings_timeline_get_info(void) { static const SettingsModuleMetadata s_module_info = { - .name = i18n_noop("Timeline"), - .init = prv_init, + .name = i18n_noop("Timeline"), + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/vibe_patterns.c b/src/fw/apps/system/settings/vibe_patterns.c index 8b23684bf2..f68b1186f2 100644 --- a/src/fw/apps/system/settings/vibe_patterns.c +++ b/src/fw/apps/system/settings/vibe_patterns.c @@ -52,8 +52,8 @@ static void prv_deinit_cb(SettingsCallbacks *context) { app_free(data); } -static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, - const Layer *cell_layer, uint16_t row, bool selected) { +static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, const Layer *cell_layer, + uint16_t row, bool selected) { SettingsVibePatternsData *data = (SettingsVibePatternsData *)context; const char *title = NULL; @@ -65,16 +65,14 @@ static void prv_draw_row_cb(SettingsCallbacks *context, GContext *ctx, case VibeSettingsRow_MuteSpeaker: { title = i18n_noop("Mute Speaker"); subtitle = alerts_preferences_get_speaker_muted() ? i18n_noop("On") : i18n_noop("Off"); - menu_cell_basic_draw(ctx, cell_layer, i18n_get(title, data), - i18n_get(subtitle, data), NULL); + menu_cell_basic_draw(ctx, cell_layer, i18n_get(title, data), i18n_get(subtitle, data), NULL); return; } case VibeSettingsRow_SpeakerVolume: { title = i18n_noop("Volume"); snprintf(data->volume_subtitle, sizeof(data->volume_subtitle), "%u%%", alerts_preferences_get_speaker_volume()); - menu_cell_basic_draw(ctx, cell_layer, i18n_get(title, data), - data->volume_subtitle, NULL); + menu_cell_basic_draw(ctx, cell_layer, i18n_get(title, data), data->volume_subtitle, NULL); return; } #endif @@ -216,7 +214,7 @@ static void prv_select_click_cb(SettingsCallbacks *context, uint16_t row) { case VibeSettingsRow_System: { const VibeIntensity current_system_default_vibe_intensity = vibe_intensity_get(); const VibeIntensity next_system_default_vibe_intensity = - vibe_intensity_cycle_next(current_system_default_vibe_intensity); + vibe_intensity_cycle_next(current_system_default_vibe_intensity); // Set the next system default vibe intensity and vibe a short pulse so the user can feel it vibe_intensity_set(next_system_default_vibe_intensity); @@ -265,14 +263,14 @@ static void prv_hide_cb(SettingsCallbacks *context) { static Window *prv_init(void) { SettingsVibePatternsData *data = app_zalloc_check(sizeof(SettingsVibePatternsData)); - data->callbacks = (SettingsCallbacks) { - .deinit = prv_deinit_cb, - .draw_row = prv_draw_row_cb, - .selection_changed = prv_selection_changed_cb, - .select_click = prv_select_click_cb, - .num_rows = prv_num_rows_cb, - .expand = prv_expand_cb, - .hide = prv_hide_cb, + data->callbacks = (SettingsCallbacks){ + .deinit = prv_deinit_cb, + .draw_row = prv_draw_row_cb, + .selection_changed = prv_selection_changed_cb, + .select_click = prv_select_click_cb, + .num_rows = prv_num_rows_cb, + .expand = prv_expand_cb, + .hide = prv_hide_cb, }; return settings_window_create(SettingsMenuItemVibrations, &data->callbacks); @@ -281,11 +279,11 @@ static Window *prv_init(void) { const SettingsModuleMetadata *settings_vibe_patterns_get_info(void) { static const SettingsModuleMetadata s_module_info = { #ifdef CONFIG_SPEAKER - .name = i18n_noop("Sounds & Haptics"), + .name = i18n_noop("Sounds & Haptics"), #else - .name = i18n_noop("Vibrations"), + .name = i18n_noop("Vibrations"), #endif - .init = prv_init, + .init = prv_init, }; return &s_module_info; diff --git a/src/fw/apps/system/settings/window.c b/src/fw/apps/system/settings/window.c index 86f25ec603..e07b7cac19 100644 --- a/src/fw/apps/system/settings/window.c +++ b/src/fw/apps/system/settings/window.c @@ -23,7 +23,7 @@ typedef struct SettingsData { StatusBarLayer status_layer; MenuLayer menu_layer; - SettingsMenuItem current_category; //!< SettingsMenuItem_Invalid if not currently in a category. + SettingsMenuItem current_category; //!< SettingsMenuItem_Invalid if not currently in a category. //! Optional explicit title (used by nested submenus). When NULL, the title //! falls back to the category's status name. @@ -36,12 +36,11 @@ typedef struct SettingsData { const char *title; SettingsCallbacks *callbacks; - ClickConfigProvider menu_layer_click_config; //! HACK: Used to register a back click. + ClickConfigProvider menu_layer_click_config; //! HACK: Used to register a back click. - EventServiceInfo pref_change_event_info; //!< Subscription for pref change notifications + EventServiceInfo pref_change_event_info; //!< Subscription for pref change notifications } SettingsData; - // Pref change handler /////////////////////// @@ -51,8 +50,7 @@ static void prv_pref_change_handler(PebbleEvent *event, void *context) { // layer and can change with the preferred content size. Re-anchor the // selection afterwards so the scroll offset stays within the new geometry. menu_layer_reload_data(&data->menu_layer); - menu_layer_set_selected_index(&data->menu_layer, - menu_layer_get_selected_index(&data->menu_layer), + menu_layer_set_selected_index(&data->menu_layer, menu_layer_get_selected_index(&data->menu_layer), MenuRowAlignCenter, false /* animated */); } @@ -117,8 +115,8 @@ static void prv_selection_will_change_callback(MenuLayer *menu_layer, MenuIndex } } -static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *context) { +static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *context) { SettingsData *data = context; uint16_t row = cell_index->row; @@ -135,8 +133,8 @@ static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, } } -static uint16_t prv_get_num_rows_callback(MenuLayer *menu_layer, - uint16_t section_index, void *context) { +static uint16_t prv_get_num_rows_callback(MenuLayer *menu_layer, uint16_t section_index, + void *context) { PBL_ASSERTN(section_index < SettingsMenuItem_Count); SettingsData *data = context; @@ -144,19 +142,19 @@ static uint16_t prv_get_num_rows_callback(MenuLayer *menu_layer, return callbacks->num_rows ? callbacks->num_rows(callbacks) : (uint16_t)0; } -static int16_t prv_get_cell_height_callback(MenuLayer *menu_layer, - MenuIndex *cell_index, void *context) { +static int16_t prv_get_cell_height_callback(MenuLayer *menu_layer, MenuIndex *cell_index, + void *context) { PBL_ASSERTN(cell_index->section < SettingsMenuItem_Count); SettingsData *data = context; const uint16_t row = cell_index->row; SettingsCallbacks *callbacks = prv_get_current_callbacks(data); const bool is_selected = menu_layer_is_index_selected(menu_layer, cell_index); - return (callbacks->row_height) ? - callbacks->row_height(callbacks, row, is_selected) : - PBL_IF_RECT_ELSE(menu_cell_basic_cell_height(), - (is_selected ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT : - MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT)); + return (callbacks->row_height) + ? callbacks->row_height(callbacks, row, is_selected) + : PBL_IF_RECT_ELSE(menu_cell_basic_cell_height(), + (is_selected ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT + : MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT)); } // Settings Window: @@ -167,37 +165,40 @@ static void prv_settings_window_load(Window *window) { StatusBarLayer *status_layer = &data->status_layer; status_bar_layer_init(status_layer); - const char *title = data->title_override - ? data->title_override - : settings_menu_get_status_name(data->current_category); + const char *title = data->title_override ? data->title_override + : settings_menu_get_status_name(data->current_category); status_bar_layer_set_title(status_layer, i18n_get(title, data), false, false); status_bar_layer_set_colors(status_layer, GColorWhite, GColorBlack); status_bar_layer_set_separator_mode(status_layer, OPTION_MENU_STATUS_SEPARATOR_MODE); layer_add_child(&data->window.layer, status_bar_layer_get_layer(status_layer)); - GRect bounds = grect_inset(data->window.layer.bounds, (GEdgeInsets) { - .top = STATUS_BAR_LAYER_HEIGHT, - .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT), - }); + GRect bounds = grect_inset(data->window.layer.bounds, + (GEdgeInsets){ + .top = STATUS_BAR_LAYER_HEIGHT, + .bottom = PBL_IF_RECT_ELSE(0, STATUS_BAR_LAYER_HEIGHT), + }); // Create the menu MenuLayer *menu_layer = &data->menu_layer; menu_layer_init(menu_layer, &bounds); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { - .get_num_rows = prv_get_num_rows_callback, - .get_cell_height = prv_get_cell_height_callback, - .draw_row = prv_draw_row_callback, - .select_click = prv_select_callback, - .selection_changed = prv_selection_changed_callback, - .selection_will_change = prv_selection_will_change_callback, - }); + menu_layer_set_callbacks(menu_layer, data, + &(MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows_callback, + .get_cell_height = prv_get_cell_height_callback, + .draw_row = prv_draw_row_callback, + .select_click = prv_select_callback, + .selection_changed = prv_selection_changed_callback, + .selection_will_change = prv_selection_will_change_callback, + }); menu_layer_set_normal_colors(menu_layer, GColorWhite, GColorBlack); GColor highlight_bg = shell_prefs_get_theme_highlight_color(); menu_layer_set_highlight_colors(menu_layer, highlight_bg, gcolor_legible_over(highlight_bg)); menu_layer_set_click_config_onto_window(menu_layer, &data->window); menu_layer_set_scroll_wrap_around(menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&data->window.layer, menu_layer_get_layer(menu_layer)); SettingsCallbacks *callbacks = prv_get_current_callbacks(data); @@ -212,10 +213,10 @@ static void prv_settings_window_load(Window *window) { } // Subscribe to pref change events to auto-refresh when settings change remotely - data->pref_change_event_info = (EventServiceInfo) { - .type = PEBBLE_PREF_CHANGE_EVENT, - .handler = prv_pref_change_handler, - .context = data, + data->pref_change_event_info = (EventServiceInfo){ + .type = PEBBLE_PREF_CHANGE_EVENT, + .handler = prv_pref_change_handler, + .context = data, }; event_service_client_subscribe(&data->pref_change_event_info); } @@ -265,10 +266,10 @@ static Window *prv_create(SettingsMenuItem category, const char *title_override, window_init(&data->window, WINDOW_NAME("Settings Window")); window_set_user_data(&data->window, data); window_set_window_handlers(&data->window, &(WindowHandlers){ - .load = prv_settings_window_load, - .appear = prv_settings_window_appear, - .unload = prv_settings_window_unload, - }); + .load = prv_settings_window_load, + .appear = prv_settings_window_appear, + .unload = prv_settings_window_unload, + }); return &data->window; } @@ -316,5 +317,5 @@ int16_t settings_menu_get_selected_row(SettingsMenuItem category) { if (data->current_category == category) { return menu_layer_get_selected_index(&data->menu_layer).row; } - return 0; // say first row is selected if all else fails + return 0; // say first row is selected if all else fails } diff --git a/src/fw/apps/system/timeline/animations.c b/src/fw/apps/system/timeline/animations.c index 6902f9c4f9..0a2bf0b58c 100644 --- a/src/fw/apps/system/timeline/animations.c +++ b/src/fw/apps/system/timeline/animations.c @@ -8,13 +8,12 @@ #include -int64_t timeline_animation_interpolate_moook_soft(int32_t normalized, - int64_t from, int64_t to) { +int64_t timeline_animation_interpolate_moook_soft(int32_t normalized, int64_t from, int64_t to) { return interpolate_moook_soft(normalized, from, to, TIMELINE_NUM_MOOOK_FRAMES_MID); } -int64_t timeline_animation_interpolate_moook_second_half(int32_t normalized, - int64_t from, int64_t to) { +int64_t timeline_animation_interpolate_moook_second_half(int32_t normalized, int64_t from, + int64_t to) { const int32_t cut = (normalized + ANIMATION_NORMALIZED_MAX) / 2; return timeline_animation_interpolate_moook_soft(cut, from, to); } diff --git a/src/fw/apps/system/timeline/animations.h b/src/fw/apps/system/timeline/animations.h index b90c06a29e..6e5f468afd 100644 --- a/src/fw/apps/system/timeline/animations.h +++ b/src/fw/apps/system/timeline/animations.h @@ -7,13 +7,12 @@ #define TIMELINE_NUM_MOOOK_FRAMES_MID 3 #define TIMELINE_UP_DOWN_ANIMATION_DURATION_MS \ - (interpolate_moook_soft_duration(TIMELINE_NUM_MOOOK_FRAMES_MID)) + (interpolate_moook_soft_duration(TIMELINE_NUM_MOOOK_FRAMES_MID)) -int64_t timeline_animation_interpolate_moook_soft(int32_t normalized, - int64_t from, int64_t to); +int64_t timeline_animation_interpolate_moook_soft(int32_t normalized, int64_t from, int64_t to); -int64_t timeline_animation_interpolate_moook_second_half(int32_t normalized, - int64_t from, int64_t to); +int64_t timeline_animation_interpolate_moook_second_half(int32_t normalized, int64_t from, + int64_t to); void timeline_animation_layer_stopped_cut_to_end(Animation *animation, bool finished, void *context); diff --git a/src/fw/apps/system/timeline/layer.c b/src/fw/apps/system/timeline/layer.c index 5fdc5712af..c76254d754 100644 --- a/src/fw/apps/system/timeline/layer.c +++ b/src/fw/apps/system/timeline/layer.c @@ -61,55 +61,55 @@ typedef struct TimelineLayerStyle { #define MARGIN_MEDIUM PBL_IF_RECT_ELSE(4, 13) static const TimelineLayerStyle s_style_medium = { - .sidebar_arrow_size.w = PBL_IF_RECT_ELSE(10, 7), - .sidebar_arrow_size.h = PBL_IF_RECT_ELSE(20, 28), - .sidebar_width = PBL_IF_RECT_ELSE(30, 48), - .past_fin_offset_y = PBL_IF_ROUND_ELSE(-12, 0), - .future_fin_offset_y = PBL_IF_ROUND_ELSE(-20, 0), - .past_top_margin = PBL_IF_RECT_ELSE(10, 18), - .future_top_margin = PBL_IF_RECT_ELSE(10, 39), - .left_margin = MARGIN_MEDIUM, - .right_margin = MARGIN_MEDIUM, - .icon_right_margin = MARGIN_MEDIUM, - .fat_pin_height = 110, - // PBL-42540: This property is dependent on the screen size. The thin pin height is the - // remainder of the screen space after the fat pin. - .thin_pin_height = PBL_IF_RECT_ELSE(66, 43), - .day_sep_dot_diameter = 9, - .day_sep_offset.x = PBL_IF_ROUND_ELSE(12, 0), - .day_sep_offset.y = -12, - .day_sep_subtitle_margin = PEEK_LAYER_SUBTITLE_MARGIN, - .past_day_sep_dot_offset_y = PBL_IF_ROUND_ELSE(-17, 0), - .future_day_sep_dot_offset_y = PBL_IF_ROUND_ELSE(-13, 0), + .sidebar_arrow_size.w = PBL_IF_RECT_ELSE(10, 7), + .sidebar_arrow_size.h = PBL_IF_RECT_ELSE(20, 28), + .sidebar_width = PBL_IF_RECT_ELSE(30, 48), + .past_fin_offset_y = PBL_IF_ROUND_ELSE(-12, 0), + .future_fin_offset_y = PBL_IF_ROUND_ELSE(-20, 0), + .past_top_margin = PBL_IF_RECT_ELSE(10, 18), + .future_top_margin = PBL_IF_RECT_ELSE(10, 39), + .left_margin = MARGIN_MEDIUM, + .right_margin = MARGIN_MEDIUM, + .icon_right_margin = MARGIN_MEDIUM, + .fat_pin_height = 110, + // PBL-42540: This property is dependent on the screen size. The thin pin height is the + // remainder of the screen space after the fat pin. + .thin_pin_height = PBL_IF_RECT_ELSE(66, 43), + .day_sep_dot_diameter = 9, + .day_sep_offset.x = PBL_IF_ROUND_ELSE(12, 0), + .day_sep_offset.y = -12, + .day_sep_subtitle_margin = PEEK_LAYER_SUBTITLE_MARGIN, + .past_day_sep_dot_offset_y = PBL_IF_ROUND_ELSE(-17, 0), + .future_day_sep_dot_offset_y = PBL_IF_ROUND_ELSE(-13, 0), }; static const TimelineLayerStyle s_style_large = { - .sidebar_arrow_size.w = PBL_IF_RECT_ELSE(14, 10), - .sidebar_arrow_size.h = PBL_IF_RECT_ELSE(28, 40), - .sidebar_width = PBL_IF_RECT_ELSE(34, 51), - .fin_offset_x = 4, - .future_fin_offset_y = 37, - .past_top_margin = PBL_IF_RECT_ELSE(7, 18), - .past_thin_pin_margin = 11, - .future_top_margin = PBL_IF_RECT_ELSE(7, 39), - .left_margin = 9, - .right_margin = 14, - .icon_offset_y = 3, - .icon_right_margin = PBL_IF_RECT_ELSE(6, 12), - .fat_pin_height = 131, - // PBL-42540: This property is dependent on the screen size. - .thin_pin_height = 88, - .day_sep_dot_diameter = 12, - .day_sep_offset.y = -21, - .past_day_sep_dot_offset_y = PBL_IF_RECT_ELSE(-16, -32), - .future_day_sep_dot_offset_y = 16, + .sidebar_arrow_size.w = PBL_IF_RECT_ELSE(14, 10), + .sidebar_arrow_size.h = PBL_IF_RECT_ELSE(28, 40), + .sidebar_width = PBL_IF_RECT_ELSE(34, 51), + .fin_offset_x = 4, + .future_fin_offset_y = 37, + .past_top_margin = PBL_IF_RECT_ELSE(7, 18), + .past_thin_pin_margin = 11, + .future_top_margin = PBL_IF_RECT_ELSE(7, 39), + .left_margin = 9, + .right_margin = 14, + .icon_offset_y = 3, + .icon_right_margin = PBL_IF_RECT_ELSE(6, 12), + .fat_pin_height = 131, + // PBL-42540: This property is dependent on the screen size. + .thin_pin_height = 88, + .day_sep_dot_diameter = 12, + .day_sep_offset.y = -21, + .past_day_sep_dot_offset_y = PBL_IF_RECT_ELSE(-16, -32), + .future_day_sep_dot_offset_y = 16, }; -static const TimelineLayerStyle * const s_styles[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = &s_style_medium, - [PreferredContentSizeMedium] = &s_style_medium, - [PreferredContentSizeLarge] = &s_style_large, - [PreferredContentSizeExtraLarge] = &s_style_large, +static const TimelineLayerStyle *const s_styles[NumPreferredContentSizes] = { + [PreferredContentSizeSmall] = &s_style_medium, + [PreferredContentSizeMedium] = &s_style_medium, + [PreferredContentSizeLarge] = &s_style_large, + [PreferredContentSizeExtraLarge] = &s_style_large, }; static int16_t s_height_offsets[TIMELINE_NUM_ITEMS_IN_TIMELINE_LAYER]; @@ -201,17 +201,16 @@ static void prv_get_icon_frame_centered(TimelineLayer *layer, int index, GRect * #endif void timeline_layer_get_icon_frame(TimelineLayer *layer, int index, GRect *icon_frame) { - return PBL_IF_RECT_ELSE(prv_get_icon_frame_exact, - prv_get_icon_frame_centered)(layer, index, icon_frame); + return PBL_IF_RECT_ELSE(prv_get_icon_frame_exact, prv_get_icon_frame_centered)(layer, index, + icon_frame); } static void prv_get_end_of_timeline_frame(TimelineLayer *layer, int index, GRect *frame) { prv_get_frame(layer, index, frame); const bool is_future = (layer->scroll_direction == TimelineScrollDirectionDown); const TimelineLayerStyle *style = prv_get_style(); - gpoint_add_eq(&frame->origin, - GPoint(style->fin_offset_x, - is_future ? style->future_fin_offset_y : style->past_fin_offset_y)); + gpoint_add_eq(&frame->origin, GPoint(style->fin_offset_x, is_future ? style->future_fin_offset_y + : style->past_fin_offset_y)); frame->size.w -= PBL_IF_RECT_ELSE(style->sidebar_width, 0); } @@ -219,21 +218,21 @@ static void prv_get_day_sep_frame(TimelineLayer *layer, int index, GRect *frame) prv_get_frame(layer, index, frame); const bool is_future = (layer->scroll_direction == TimelineScrollDirectionDown); const TimelineLayerStyle *style = prv_get_style(); - frame->origin.y += is_future ? style->future_day_sep_dot_offset_y : - style->past_day_sep_dot_offset_y; + frame->origin.y += + is_future ? style->future_day_sep_dot_offset_y : style->past_day_sep_dot_offset_y; // Remove the built-in margins and subtract the sidebar frame->origin.x -= style->left_margin; - frame->size.w += ((style->left_margin + style->right_margin) - - PBL_IF_RECT_ELSE(style->sidebar_width, 0)); + frame->size.w += + ((style->left_margin + style->right_margin) - PBL_IF_RECT_ELSE(style->sidebar_width, 0)); } static void prv_get_day_sep_show_frame(TimelineLayer *layer, GRect *frame) { const GRect *bounds = &((Layer *)layer)->bounds; const TimelineLayerStyle *style = prv_get_style(); - *frame = (GRect) { - .origin = gpoint_add(bounds->origin, style->day_sep_offset), - .size.w = bounds->size.w - style->sidebar_width, - .size.h = bounds->size.h, + *frame = (GRect){ + .origin = gpoint_add(bounds->origin, style->day_sep_offset), + .size.w = bounds->size.w - style->sidebar_width, + .size.h = bounds->size.h, }; } @@ -247,11 +246,11 @@ static void prv_create_layout(TimelineLayer *layer, TimelineIterState *state, in GRect rect; prv_get_frame(layer, index, &rect); const LayoutLayerConfig config = { - .frame = &rect, - .attributes = &item->attr_list, - .mode = prv_get_mode(index), - .app_id = &item->header.parent_id, - .context = info, + .frame = &rect, + .attributes = &item->attr_list, + .mode = prv_get_mode(index), + .app_id = &item->header.parent_id, + .context = info, }; TimelineLayout *layout = (TimelineLayout *)layout_create(item->header.layout, &config); layer_add_child(&layer->layouts_layer, (Layer *)layout); @@ -337,9 +336,10 @@ static void prv_update_pins_mode(TimelineLayer *layer) { /////////////////////////////////////////////////////////// // An animation that moves a layer from an initial position to its final position -static Animation *prv_create_layout_up_down_animation( - TimelineLayout *timeline_layout, int to_index, TimelineLayer *timeline_layer, - uint32_t duration, InterpolateInt64Function interpolate) { +static Animation *prv_create_layout_up_down_animation(TimelineLayout *timeline_layout, int to_index, + TimelineLayer *timeline_layer, + uint32_t duration, + InterpolateInt64Function interpolate) { const int from_index = to_index + prv_get_index_delta(timeline_layer); GRect from, to, icon_from, icon_to; prv_get_frame(timeline_layer, from_index, &from); @@ -351,8 +351,9 @@ static Animation *prv_create_layout_up_down_animation( duration, interpolate); } -static Animation *prv_create_end_of_timeline_animation( - TimelineLayer *layer, int to_index, uint32_t duration, InterpolateInt64Function interpolate) { +static Animation *prv_create_end_of_timeline_animation(TimelineLayer *layer, int to_index, + uint32_t duration, + InterpolateInt64Function interpolate) { const int from_index = to_index + prv_get_index_delta(layer); GRect from_frame, to_frame; prv_get_end_of_timeline_frame(layer, from_index, &from_frame); @@ -362,9 +363,11 @@ static Animation *prv_create_end_of_timeline_animation( Animation *animation = property_animation_get_animation(prop_animation); animation_set_duration(animation, duration); animation_set_custom_interpolation(animation, interpolate); - animation_set_handlers(animation, (AnimationHandlers) { - .stopped = timeline_animation_layer_stopped_cut_to_end, - }, prop_animation); + animation_set_handlers(animation, + (AnimationHandlers){ + .stopped = timeline_animation_layer_stopped_cut_to_end, + }, + prop_animation); return animation; } @@ -376,13 +379,13 @@ Animation *timeline_layer_create_day_sep_hide(TimelineLayer *timeline_layer) { frame.size.h + 2 * (style->left_margin + style->right_margin); // move way off screen: 2x height * (1/2 - move_delta) in integer logic const int16_t TARGET_Y = (2 * expanded_layer_height * (1 - 2 * timeline_layer->move_delta)) / 2; - const GRect scale_to = GRect(frame.origin.x + frame.size.w / 2, // go to the center + const GRect scale_to = GRect(frame.origin.x + frame.size.w / 2, // go to the center TARGET_Y, 0, 0); peek_layer_set_scale_to(&timeline_layer->day_separator, scale_to); // out anim GRect to = timeline_layer->day_separator.layer.frame; - to.origin = GPoint(0, frame.size.h * timeline_layer->move_delta); // all the way off screen + to.origin = GPoint(0, frame.size.h * timeline_layer->move_delta); // all the way off screen PropertyAnimation *prop_anim = property_animation_create_layer_frame((Layer *)&timeline_layer->day_separator, NULL, &to); Animation *anim = property_animation_get_animation(prop_anim); @@ -411,11 +414,11 @@ static void prv_show_day_sep(TimelineLayer *timeline_layer, bool slide) { GRect frame; layer_get_global_frame((Layer *)&timeline_layer->day_separator, &frame); - const GRect icon_from = { grect_center_point(&frame), GSizeZero }; + const GRect icon_from = {grect_center_point(&frame), GSizeZero}; prv_get_day_sep_show_frame(timeline_layer, &frame); peek_layer_set_frame(&timeline_layer->day_separator, &frame); TimelineResourceInfo timeline_res = { - .res_id = TIMELINE_RESOURCE_DAY_SEPARATOR, + .res_id = TIMELINE_RESOURCE_DAY_SEPARATOR, }; peek_layer_set_icon_with_size(&timeline_layer->day_separator, &timeline_res, TimelineResourceSizeLarge, icon_from); @@ -461,9 +464,11 @@ Animation *timeline_layer_create_day_sep_show(TimelineLayer *timeline_layer) { PropertyAnimation *prop_anim = property_animation_create_layer_frame((Layer *)&timeline_layer->day_separator, from, &to); Animation *anim = property_animation_get_animation(prop_anim); - animation_set_handlers(anim, (AnimationHandlers) { - .stopped = prv_day_sep_anim_stopped, - }, timeline_layer); + animation_set_handlers(anim, + (AnimationHandlers){ + .stopped = prv_day_sep_anim_stopped, + }, + timeline_layer); animation_set_duration(anim, TIMELINE_UP_DOWN_ANIMATION_DURATION_MS); animation_set_custom_interpolation(anim, timeline_animation_interpolate_moook_soft); return anim; @@ -479,9 +484,8 @@ static Animation *prv_create_up_down_animation(TimelineLayer *layer, uint32_t du if (layer->layouts[i]) { animations[num_animations++] = prv_create_layout_up_down_animation(layer->layouts[i], i, layer, duration, interpolate); - animations[num_animations++] = - (Animation *)kino_layer_create_play_section_animation( - &layer->layouts[i]->icon_layer, 0, TIMELINE_UP_DOWN_ANIMATION_DURATION_MS); + animations[num_animations++] = (Animation *)kino_layer_create_play_section_animation( + &layer->layouts[i]->icon_layer, 0, TIMELINE_UP_DOWN_ANIMATION_DURATION_MS); } else if (i == 2 || i == 3) { animations[num_animations++] = prv_create_end_of_timeline_animation(layer, i, duration, interpolate); @@ -492,7 +496,7 @@ static Animation *prv_create_up_down_animation(TimelineLayer *layer, uint32_t du // TODO: PBL-21982: Only support rectangular screen for now #if PBL_RECT Animation *relbar_animation = - timeline_relbar_layer_create_animation(layer, duration, interpolate); + timeline_relbar_layer_create_animation(layer, duration, interpolate); if (relbar_animation) { animations[num_animations++] = relbar_animation; } @@ -527,8 +531,8 @@ static void prv_place_day_separator(TimelineLayer *layer) { static void prv_place_end_of_timeline(TimelineLayer *timeline_layer) { const bool was_hidden = layer_get_hidden((Layer *)&timeline_layer->end_of_timeline); - const bool is_hidden = (timeline_layer_should_animate_day_separator(timeline_layer) || - timeline_layer->layouts[2]); + const bool is_hidden = + (timeline_layer_should_animate_day_separator(timeline_layer) || timeline_layer->layouts[2]); layer_set_hidden((Layer *)&timeline_layer->end_of_timeline, is_hidden); GRect frame; prv_get_end_of_timeline_frame(timeline_layer, is_hidden ? 3 : 2, &frame); @@ -562,17 +566,19 @@ Animation *timeline_layer_create_up_down_animation(TimelineLayer *layer, uint32_ InterpolateInt64Function interpolate) { Animation *animation = prv_create_up_down_animation(layer, duration, interpolate); - animation_set_handlers(animation, (AnimationHandlers) { - .stopped = prv_up_down_stopped, - }, layer); + animation_set_handlers(animation, + (AnimationHandlers){ + .stopped = prv_up_down_stopped, + }, + layer); static const AnimationImplementation s_mode_change_impl = { - .update = prv_mode_change_update, + .update = prv_mode_change_update, }; Animation *mode_change = animation_create(); animation_set_implementation(mode_change, &s_mode_change_impl); - animation_set_handlers(mode_change, (AnimationHandlers){ 0 }, layer); + animation_set_handlers(mode_change, (AnimationHandlers){0}, layer); return animation_spawn_create(animation, mode_change, NULL); } @@ -598,31 +604,31 @@ static void prv_draw_round_flip(GContext *ctx, const GRect *layer_bounds, const const TimelineLayerStyle *style = prv_get_style(); circle_radius += style->sidebar_width / 2; graphics_fill_radial_internal(ctx, circle_center, circle_radius, - layer_bounds->size.w - circle_center.x, - 0, TRIG_MAX_ANGLE); + layer_bounds->size.w - circle_center.x, 0, TRIG_MAX_ANGLE); } } #endif -static void prv_update_proc(struct Layer *layer, GContext* ctx) { +static void prv_update_proc(struct Layer *layer, GContext *ctx) { TimelineLayer *timeline_layer = (TimelineLayer *)layer; const GRect *bounds = &layer->bounds; graphics_context_set_fill_color(ctx, GColorWhite); - graphics_fill_rect(ctx, &(GRect) { .size = bounds->size }); + graphics_fill_rect(ctx, &(GRect){.size = bounds->size}); AnimationProgress progress; if (timeline_layer->animating_intro_or_exit && animation_get_progress(timeline_layer->animation, &progress)) { - const GPoint offset = { PEEK_ANIMATIONS_SPEED_LINES_OFFSET_X, - interpolate_int64_linear(progress, 0, -DISP_ROWS) }; + const GPoint offset = { + PEEK_ANIMATIONS_SPEED_LINES_OFFSET_X, interpolate_int64_linear(progress, 0, -DISP_ROWS) + }; graphics_context_set_fill_color(ctx, GColorBlack); peek_animations_draw_timeline_speed_lines(ctx, offset); } const int16_t sidebar_width = timeline_layer->sidebar_width; - const GRect sidebar_rect = GRect(bounds->size.w - sidebar_width, 0, sidebar_width, - bounds->size.h); + const GRect sidebar_rect = + GRect(bounds->size.w - sidebar_width, 0, sidebar_width, bounds->size.h); graphics_context_set_fill_color(ctx, timeline_layer->sidebar_color); // On round displays, draw the round flip effect if we're animating the intro or exit and then @@ -645,17 +651,20 @@ static void prv_update_proc(struct Layer *layer, GContext* ctx) { const int16_t arrow_base_center_y = PBL_IF_RECT_ELSE(16, bounds->size.h / 2); const int16_t arrow_point_x_offset = PBL_IF_RECT_ELSE(-arrow_size.w, arrow_size.w); GPath arrow_path = { - .num_points = 3, - .points = (GPoint[]) { { arrow_base_x, arrow_base_center_y - (arrow_size.h / 2) }, - { arrow_base_x + arrow_point_x_offset, arrow_base_center_y }, - { arrow_base_x, arrow_base_center_y + (arrow_size.h / 2) } } + .num_points = 3, + .points = (GPoint[]){ + {arrow_base_x, arrow_base_center_y - (arrow_size.h / 2)}, + {arrow_base_x + arrow_point_x_offset, arrow_base_center_y}, + {arrow_base_x, arrow_base_center_y + (arrow_size.h / 2)} + } }; if (timeline_layer->scroll_direction == TimelineScrollDirectionUp) { // arrow is in a different position for past & future, but only on rectangular displays - gpath_move_to(&arrow_path, - PBL_IF_RECT_ELSE(GPoint(0, (style->thin_pin_height + - style->past_thin_pin_margin)), GPointZero)); + gpath_move_to( + &arrow_path, + PBL_IF_RECT_ELSE(GPoint(0, (style->thin_pin_height + style->past_thin_pin_margin)), + GPointZero)); } graphics_context_set_antialiased(ctx, true); @@ -753,7 +762,7 @@ void timeline_layer_reset(TimelineLayer *layer) { layer_set_hidden((Layer *)&layer->day_separator, true); TimelineResourceInfo timeline_res = { - .res_id = TIMELINE_RESOURCE_DAY_SEPARATOR, + .res_id = TIMELINE_RESOURCE_DAY_SEPARATOR, }; peek_layer_set_icon(&layer->day_separator, &timeline_res); @@ -800,9 +809,9 @@ static int16_t prv_sidebar_getter(void *context) { Animation *timeline_layer_create_sidebar_animation(TimelineLayer *timeline_layer, int16_t to_sidebar_width) { static const PropertyAnimationImplementation s_implementation = { - .base.update = (AnimationUpdateImplementation) property_animation_update_int16, - .accessors.setter.int16 = prv_sidebar_setter, - .accessors.getter.int16 = prv_sidebar_getter, + .base.update = (AnimationUpdateImplementation)property_animation_update_int16, + .accessors.setter.int16 = prv_sidebar_setter, + .accessors.getter.int16 = prv_sidebar_getter, }; Animation *animation = (Animation *)property_animation_create( &s_implementation, timeline_layer, &timeline_layer->sidebar_width, &to_sidebar_width); @@ -811,11 +820,12 @@ Animation *timeline_layer_create_sidebar_animation(TimelineLayer *timeline_layer return animation; } -static void prv_speed_lines_update(Animation *animation, AnimationProgress progress) {} +static void prv_speed_lines_update(Animation *animation, AnimationProgress progress) { +} Animation *timeline_layer_create_speed_lines_animation(TimelineLayer *timeline_layer) { static const AnimationImplementation s_speed_lines_impl = { - .update = prv_speed_lines_update, + .update = prv_speed_lines_update, }; Animation *animation = animation_create(); animation_set_implementation(animation, &s_speed_lines_impl); @@ -835,9 +845,11 @@ static Animation *prv_create_bounce_back_animation(Layer *layer, const GRect *to Animation *animation = (Animation *)property_animation_create_layer_frame(layer, &from, &to); animation_set_curve(animation, AnimationCurveEaseOut); animation_set_duration(animation, TIMELINE_LAYER_SLIDE_MS); - animation_set_handlers(animation, (AnimationHandlers) { - .stopped = timeline_animation_layer_stopped_cut_to_end, - }, animation); + animation_set_handlers(animation, + (AnimationHandlers){ + .stopped = timeline_animation_layer_stopped_cut_to_end, + }, + animation); return animation; } @@ -850,18 +862,18 @@ Animation *timeline_layer_create_bounce_back_animation(TimelineLayer *layer, GPo if (layout) { GRect frame; prv_get_frame(layer, i + 1, &frame); - animations[num_animations++] = prv_create_bounce_back_animation((Layer *)layout, &frame, - direction); + animations[num_animations++] = + prv_create_bounce_back_animation((Layer *)layout, &frame, direction); } } const GRect *day_sep_from = &((Layer *)&layer->day_separator)->frame; - animations[num_animations++] = prv_create_bounce_back_animation((Layer *)&layer->day_separator, - day_sep_from, direction); + animations[num_animations++] = + prv_create_bounce_back_animation((Layer *)&layer->day_separator, day_sep_from, direction); const GRect *fin_from = &layer->end_of_timeline.layer.frame; - animations[num_animations++] = prv_create_bounce_back_animation( - &layer->end_of_timeline.layer, fin_from, direction); + animations[num_animations++] = + prv_create_bounce_back_animation(&layer->end_of_timeline.layer, fin_from, direction); Animation *animation = animation_spawn_create_from_array(animations, num_animations); return animation; @@ -880,7 +892,7 @@ void timeline_layer_set_layouts_hidden(TimelineLayer *layer, bool hidden) { void timeline_layer_init(TimelineLayer *layer, const GRect *frame_ref, TimelineScrollDirection scroll_direction) { - *layer = (TimelineLayer) {}; + *layer = (TimelineLayer){}; // timeline layer layer_init(&layer->layer, frame_ref); layer_set_clips(&layer->layer, false); @@ -894,21 +906,21 @@ void timeline_layer_init(TimelineLayer *layer, const GRect *frame_ref, layer->scroll_direction = scroll_direction; layer->move_delta = prv_get_scroll_delta(layer); if (scroll_direction == TimelineScrollDirectionUp) { - s_height_offsets[0] = (PAST_TOP_MARGIN_EXTRA + style->thin_pin_height + - (2 * style->fat_pin_height)); - s_height_offsets[1] = (style->past_top_margin + style->thin_pin_height + - style->past_thin_pin_margin); + s_height_offsets[0] = + (PAST_TOP_MARGIN_EXTRA + style->thin_pin_height + (2 * style->fat_pin_height)); + s_height_offsets[1] = + (style->past_top_margin + style->thin_pin_height + style->past_thin_pin_margin); s_height_offsets[2] = style->past_top_margin; s_height_offsets[3] = style->past_top_margin - 2 * style->fat_pin_height; } else { s_height_offsets[0] = FUTURE_TOP_MARGIN_EXTRA - 2 * style->fat_pin_height; s_height_offsets[1] = style->future_top_margin; s_height_offsets[2] = style->future_top_margin + style->fat_pin_height; - s_height_offsets[3] = (style->future_top_margin + style->fat_pin_height + - (2 * style->fat_pin_height)); + s_height_offsets[3] = + (style->future_top_margin + style->fat_pin_height + (2 * style->fat_pin_height)); } // layouts layer - contains all the pin - layer_init(&layer->layouts_layer, &(GRect) { .size = frame_ref->size }); + layer_init(&layer->layouts_layer, &(GRect){.size = frame_ref->size}); layer_set_clips(&layer->layouts_layer, false); layer_add_child((Layer *)layer, (Layer *)&layer->layouts_layer); @@ -925,7 +937,7 @@ void timeline_layer_init(TimelineLayer *layer, const GRect *frame_ref, style->day_sep_subtitle_margin); TimelineResourceInfo timeline_res = { - .res_id = TIMELINE_RESOURCE_DAY_SEPARATOR, + .res_id = TIMELINE_RESOURCE_DAY_SEPARATOR, }; peek_layer_set_icon(&layer->day_separator, &timeline_res); peek_layer_set_background_color(&layer->day_separator, GColorClear); diff --git a/src/fw/apps/system/timeline/layer.h b/src/fw/apps/system/timeline/layer.h index 0c43c24e9e..7de3ecee95 100644 --- a/src/fw/apps/system/timeline/layer.h +++ b/src/fw/apps/system/timeline/layer.h @@ -19,8 +19,7 @@ #define TIMELINE_LAYER_FIRST_VISIBLE_LAYOUT 1 -#define TIMELINE_LAYER_TEXT_ALIGNMENT \ - PBL_IF_RECT_ELSE(GTextAlignmentLeft, GTextAlignmentRight) +#define TIMELINE_LAYER_TEXT_ALIGNMENT PBL_IF_RECT_ELSE(GTextAlignmentLeft, GTextAlignmentRight) #define TIMELINE_LAYER_TEXT_VERTICAL_ALIGNMENT GVerticalAlignmentTop #define TIMELINE_LAYER_SLIDE_MS (150) @@ -44,10 +43,10 @@ typedef struct { typedef struct { Layer layer; - RelationshipBar prev_rel_bar; // Used for previous relationship bar animation exit - RelationshipBar curr_rel_bar; // Used for current on-screen relationship bar animation - EventedTimerID rel_bar_timer; // Used to show bars after user stops fast scrolling - void *timeline_layer; // Necessary for the layer update proc to access the TimelineLayer + RelationshipBar prev_rel_bar; // Used for previous relationship bar animation exit + RelationshipBar curr_rel_bar; // Used for current on-screen relationship bar animation + EventedTimerID rel_bar_timer; // Used to show bars after user stops fast scrolling + void *timeline_layer; // Necessary for the layer update proc to access the TimelineLayer } RelationshipBarLayer; // The timeline layer is the view(controller, sort of) for the timeline -- it uses diff --git a/src/fw/apps/system/timeline/model.c b/src/fw/apps/system/timeline/model.c index c0c3e332f2..f0fc4ed0ba 100644 --- a/src/fw/apps/system/timeline/model.c +++ b/src/fw/apps/system/timeline/model.c @@ -59,8 +59,9 @@ int timeline_model_get_num_items(void) { if (timeline_model_get_current_state() == NULL) { return 0; } - int num = positive_modulo(s_model_data->last_index - - s_model_data->first_index, TIMELINE_NUM_ITEMS_IN_MODEL) + 1; + int num = positive_modulo(s_model_data->last_index - s_model_data->first_index, + TIMELINE_NUM_ITEMS_IN_MODEL) + + 1; // we always keep one slot marked empty so we can tell if we have zero items if (num == TIMELINE_NUM_ITEMS_IN_MODEL) { return 0; @@ -70,13 +71,11 @@ int timeline_model_get_num_items(void) { } static int prv_get_next_item_idx(void) { - return positive_modulo(s_model_data->last_index + 1, - TIMELINE_NUM_ITEMS_IN_MODEL); + return positive_modulo(s_model_data->last_index + 1, TIMELINE_NUM_ITEMS_IN_MODEL); } static int prv_get_prev_item_idx(void) { - return positive_modulo(s_model_data->first_index - 1, - TIMELINE_NUM_ITEMS_IN_MODEL); + return positive_modulo(s_model_data->first_index - 1, TIMELINE_NUM_ITEMS_IN_MODEL); } static Iterator *prv_get_iter(int index) { @@ -102,8 +101,7 @@ static int prv_find_item_by_uuid(Uuid *id) { #ifdef TIMELINE_DEBUG static void prv_log_all_items(void) { - PBL_LOG_DBG("First item: %d, last item: %d", s_model_data->first_index, - s_model_data->last_index); + PBL_LOG_DBG("First item: %d, last item: %d", s_model_data->first_index, s_model_data->last_index); for (int i = 0; i < TIMELINE_NUM_VISIBLE_ITEMS; i++) { TimelineItem *item = &timeline_model_get_iter_state(i)->pin; PBL_LOG_DBG("ID first byte: 0x%x", item->header.id.byte0); @@ -114,20 +112,17 @@ static void prv_log_all_items(void) { #endif static void prv_move_first_index(int delta) { - s_model_data->first_index = positive_modulo( - s_model_data->first_index + delta, TIMELINE_NUM_ITEMS_IN_MODEL); - PBL_LOG_DBG("Set origin, initial item: %d, final item: %d", - s_model_data->first_index, s_model_data->last_index); + s_model_data->first_index = + positive_modulo(s_model_data->first_index + delta, TIMELINE_NUM_ITEMS_IN_MODEL); + PBL_LOG_DBG("Set origin, initial item: %d, final item: %d", s_model_data->first_index, + s_model_data->last_index); } bool timeline_model_iter_next(int *new_idx, bool *has_next) { int next_idx = prv_get_next_item_idx(); int last_idx = s_model_data->last_index; - timeline_iter_copy_state( - &s_model_data->states[next_idx], - &s_model_data->states[last_idx], - &s_model_data->iters[next_idx], - &s_model_data->iters[last_idx]); + timeline_iter_copy_state(&s_model_data->states[next_idx], &s_model_data->states[last_idx], + &s_model_data->iters[next_idx], &s_model_data->iters[last_idx]); bool rv = iter_next(&s_model_data->iters[next_idx]); if (rv) { if (has_next) { @@ -156,11 +151,8 @@ bool timeline_model_iter_next(int *new_idx, bool *has_next) { bool timeline_model_iter_prev(int *new_idx, bool *has_prev) { int prev_idx = prv_get_prev_item_idx(); int first_idx = s_model_data->first_index; - timeline_iter_copy_state( - &s_model_data->states[prev_idx], - &s_model_data->states[first_idx], - &s_model_data->iters[prev_idx], - &s_model_data->iters[first_idx]); + timeline_iter_copy_state(&s_model_data->states[prev_idx], &s_model_data->states[first_idx], + &s_model_data->iters[prev_idx], &s_model_data->iters[first_idx]); bool rv = iter_prev(&s_model_data->iters[prev_idx]); if (rv) { if (has_prev) { @@ -170,8 +162,8 @@ bool timeline_model_iter_prev(int *new_idx, bool *has_prev) { // TIMELINE_NUM_VISIBLE_ITEMS items in the model. If there are fewer, we keep the last_index // where it is so the model can "grow" to contain TIMELINE_NUM_VISIBLE_ITEMS if (timeline_model_get_num_items() >= TIMELINE_NUM_VISIBLE_ITEMS) { - s_model_data->last_index = positive_modulo( - s_model_data->last_index - 1, TIMELINE_NUM_ITEMS_IN_MODEL); + s_model_data->last_index = + positive_modulo(s_model_data->last_index - 1, TIMELINE_NUM_ITEMS_IN_MODEL); } if (new_idx) { *new_idx = s_model_data->states[prev_idx].index; @@ -183,7 +175,7 @@ bool timeline_model_iter_prev(int *new_idx, bool *has_prev) { } } #ifdef TIMELINE_DEBUG - prv_log_all_items(); + prv_log_all_items(); #endif return rv; } @@ -202,7 +194,7 @@ void timeline_model_init(time_t timestamp, TimelineModel *model) { s_model_data->last_index = TIMELINE_NUM_VISIBLE_ITEMS; for (int i = 0; i < TIMELINE_NUM_VISIBLE_ITEMS; i++) { rv = timeline_iter_init(prv_get_iter(i), timeline_model_get_iter_state(i), - &s_model_data->timeline, s_model_data->direction, timestamp); + &s_model_data->timeline, s_model_data->direction, timestamp); if (FAILED(rv)) { PBL_LOG_ERR("Timeline iterator failed to init!"); } @@ -224,8 +216,8 @@ void timeline_model_init(time_t timestamp, TimelineModel *model) { void timeline_model_deinit(void) { for (int i = 0; i < TIMELINE_NUM_ITEMS_IN_MODEL; i++) { - timeline_iter_deinit(&s_model_data->iters[i], - &s_model_data->states[i], &s_model_data->timeline); + timeline_iter_deinit(&s_model_data->iters[i], &s_model_data->states[i], + &s_model_data->timeline); s_model_data->states[i].node = NULL; } s_model_data->first_index = 0; @@ -245,7 +237,7 @@ static void prv_remove_index_gracefully(int idx) { break; } } while (timeline_nodes_equal(timeline_model_get_iter_state(i)->node, - timeline_model_get_iter_state(i - 1)->node)); + timeline_model_get_iter_state(i - 1)->node)); } timeline_iter_remove_node(&s_model_data->timeline, node); PBL_LOG_DBG("Item to delete in view, iterating next"); @@ -274,5 +266,6 @@ void timeline_model_remove(Uuid *id) { } // remove the rest from the iterator list - while (timeline_iter_remove_node_with_id(&s_model_data->timeline, id)) {} + while (timeline_iter_remove_node_with_id(&s_model_data->timeline, id)) { + } } diff --git a/src/fw/apps/system/timeline/peek_layer.c b/src/fw/apps/system/timeline/peek_layer.c index 26a50fd349..d1b09a8314 100644 --- a/src/fw/apps/system/timeline/peek_layer.c +++ b/src/fw/apps/system/timeline/peek_layer.c @@ -15,14 +15,14 @@ #include "pbl/util/math.h" //! Title text vertically centered position -#define TEXT_OFFSET_Y ((DISP_ROWS / 2) + PBL_IF_RECT_ELSE(46, 42)) +#define TEXT_OFFSET_Y ((DISP_ROWS / 2) + PBL_IF_RECT_ELSE(46, 42)) //! Number text vertically bottom-aligned with Title text #define NUMBER_OFFSET_Y (TEXT_OFFSET_Y + 2) static void prv_update_proc(Layer *layer, GContext *ctx) { PeekLayer *peek_layer = (PeekLayer *)layer; - const GRect layer_bounds = { .size = layer->bounds.size }; + const GRect layer_bounds = {.size = layer->bounds.size}; if (peek_layer->bg_color.a != 0) { graphics_context_set_fill_color(ctx, peek_layer->bg_color); @@ -32,9 +32,7 @@ static void prv_update_proc(Layer *layer, GContext *ctx) { #if PBL_ROUND // Use a radius equal to that of the notification banner to make the transition seamless const int32_t peek_circle_diameter = BANNER_CIRCLE_RADIUS * 2; - GRect peek_circle_frame = (GRect) { - .size = GSize(peek_circle_diameter, peek_circle_diameter) - }; + GRect peek_circle_frame = (GRect){.size = GSize(peek_circle_diameter, peek_circle_diameter)}; grect_align(&peek_circle_frame, &layer_bounds, GAlignBottom, false /* clips */); graphics_fill_oval(ctx, peek_circle_frame, GOvalScaleModeFitCircle); #else @@ -44,7 +42,7 @@ static void prv_update_proc(Layer *layer, GContext *ctx) { if (peek_layer->show_dot) { graphics_context_set_fill_color(ctx, GColorBlack); - GRect dot_rect = { .size = { peek_layer->dot_diameter, peek_layer->dot_diameter } }; + GRect dot_rect = {.size = {peek_layer->dot_diameter, peek_layer->dot_diameter}}; grect_align(&dot_rect, &peek_layer->layer.bounds, GAlignCenter, false /* clip */); graphics_fill_radial(ctx, dot_rect, GOvalScaleModeFitCircle, peek_layer->dot_diameter, 0, TRIG_MAX_ANGLE); @@ -52,7 +50,7 @@ static void prv_update_proc(Layer *layer, GContext *ctx) { } static void prv_layout_text(PeekLayer *peek_layer) { - const GRect layer_bounds = (GRect) { .size = peek_layer->layer.bounds.size }; + const GRect layer_bounds = (GRect){.size = peek_layer->layer.bounds.size}; GContext *ctx = graphics_context_get_current_context(); text_layer_set_size(&peek_layer->title.text_layer, layer_bounds.size); text_layer_set_size(&peek_layer->subtitle.text_layer, layer_bounds.size); @@ -62,20 +60,26 @@ static void prv_layout_text(PeekLayer *peek_layer) { const GSize title_size = text_layer_get_content_size(ctx, &peek_layer->title.text_layer); const GSize subtitle_size = text_layer_get_content_size(ctx, &peek_layer->subtitle.text_layer); - GPoint cursor = { (layer_bounds.size.w - subtitle_size.w) / 2, - -(subtitle_size.h + MAX(number_size.h, title_size.h)) / 2 }; - const int font_height_fuzz = 5; // Replace with font descenders + GPoint cursor = { + (layer_bounds.size.w - subtitle_size.w) / 2, + -(subtitle_size.h + MAX(number_size.h, title_size.h)) / 2 + }; + const int font_height_fuzz = 5; // Replace with font descenders layer_set_frame((Layer *)&peek_layer->subtitle.text_layer, - &(GRect) { { cursor.x, cursor.y + TEXT_OFFSET_Y }, - { subtitle_size.w, subtitle_size.h + font_height_fuzz } }); + &(GRect){ + {cursor.x, cursor.y + TEXT_OFFSET_Y}, + {subtitle_size.w, subtitle_size.h + font_height_fuzz} + }); cursor.x = (layer_bounds.size.w - (title_size.w + number_size.w)) / 2; cursor.y += subtitle_size.h ? (subtitle_size.h + peek_layer->subtitle_margin) : 0; layer_set_frame((Layer *)&peek_layer->number.text_layer, - &(GRect) { { cursor.x, cursor.y + NUMBER_OFFSET_Y }, number_size }); + &(GRect){{cursor.x, cursor.y + NUMBER_OFFSET_Y}, number_size}); cursor.x += number_size.w; layer_set_frame((Layer *)&peek_layer->title.text_layer, - &(GRect) { { cursor.x, cursor.y + TEXT_OFFSET_Y }, - { title_size.w, title_size.h + font_height_fuzz } }); + &(GRect){ + {cursor.x, cursor.y + TEXT_OFFSET_Y}, + {title_size.w, title_size.h + font_height_fuzz} + }); } ////////////////////// @@ -100,18 +104,17 @@ void peek_layer_destroy(PeekLayer *peek_layer) { } void peek_layer_init(PeekLayer *peek_layer, const GRect *frame) { - *peek_layer = (PeekLayer) { - .icon_offset_y = PEEK_LAYER_ICON_OFFSET_Y, - .subtitle_margin = PEEK_LAYER_SUBTITLE_MARGIN, - .dot_diameter = 9, + *peek_layer = (PeekLayer){ + .icon_offset_y = PEEK_LAYER_ICON_OFFSET_Y, + .subtitle_margin = PEEK_LAYER_SUBTITLE_MARGIN, + .dot_diameter = 9, }; // peek layer layer_init(&peek_layer->layer, frame); layer_set_clips(&peek_layer->layer, false); layer_set_update_proc(&peek_layer->layer, prv_update_proc); // kino layer - kino_layer_init(&peek_layer->kino_layer, - &(GRect){ { 0, peek_layer->icon_offset_y }, frame->size }); + kino_layer_init(&peek_layer->kino_layer, &(GRect){{0, peek_layer->icon_offset_y}, frame->size}); kino_layer_set_alignment(&peek_layer->kino_layer, GAlignCenter); layer_set_clips((Layer *)&peek_layer->kino_layer, false); layer_add_child((Layer *)peek_layer, (Layer *)&peek_layer->kino_layer); @@ -119,26 +122,21 @@ void peek_layer_init(PeekLayer *peek_layer, const GRect *frame) { const GTextAlignment text_alignment = GTextAlignmentCenter; GRect text_rect = GRect(0, NUMBER_OFFSET_Y, frame->size.w, 40); // number layer - text_layer_init_with_parameters(&peek_layer->number.text_layer, - &text_rect, - NULL, fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM), + text_layer_init_with_parameters(&peek_layer->number.text_layer, &text_rect, NULL, + fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM), GColorBlack, GColorClear, text_alignment, GTextOverflowModeTrailingEllipsis); layer_add_child((Layer *)peek_layer, (Layer *)&peek_layer->number.text_layer); // title layer text_rect.origin.y = TEXT_OFFSET_Y; - text_layer_init_with_parameters(&peek_layer->title.text_layer, - &text_rect, - NULL, fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD), - GColorBlack, GColorClear, text_alignment, - GTextOverflowModeTrailingEllipsis); + text_layer_init_with_parameters(&peek_layer->title.text_layer, &text_rect, NULL, + fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD), GColorBlack, + GColorClear, text_alignment, GTextOverflowModeTrailingEllipsis); layer_add_child((Layer *)peek_layer, (Layer *)&peek_layer->title.text_layer); // subtitle layer - text_layer_init_with_parameters(&peek_layer->subtitle.text_layer, - &text_rect, - NULL, fonts_get_system_font(FONT_KEY_GOTHIC_18), - GColorBlack, GColorClear, text_alignment, - GTextOverflowModeTrailingEllipsis); + text_layer_init_with_parameters(&peek_layer->subtitle.text_layer, &text_rect, NULL, + fonts_get_system_font(FONT_KEY_GOTHIC_18), GColorBlack, + GColorClear, text_alignment, GTextOverflowModeTrailingEllipsis); layer_add_child((Layer *)peek_layer, (Layer *)&peek_layer->subtitle.text_layer); // initialize labels with empty strings @@ -158,7 +156,7 @@ void peek_layer_deinit(PeekLayer *peek_layer) { void peek_layer_set_frame(PeekLayer *peek_layer, const GRect *frame) { layer_set_frame(&peek_layer->layer, frame); layer_set_frame((Layer *)&peek_layer->kino_layer, - &(GRect) { { 0, peek_layer->icon_offset_y }, frame->size }); + &(GRect){{0, peek_layer->icon_offset_y}, frame->size}); } void peek_layer_set_background_color(PeekLayer *peek_layer, GColor color) { @@ -178,8 +176,8 @@ void peek_layer_set_icon_with_size_invert(PeekLayer *peek_layer, AppResourceInfo icon_res_info; timeline_resources_get_id(timeline_res, res_size, &icon_res_info); - KinoReel *from_reel = kino_reel_create_with_resource_system(icon_res_info.res_app_num, - icon_res_info.res_id); + KinoReel *from_reel = + kino_reel_create_with_resource_system(icon_res_info.res_app_num, icon_res_info.res_id); if (!from_reel) { return; } @@ -189,24 +187,24 @@ void peek_layer_set_icon_with_size_invert(PeekLayer *peek_layer, GRect layer_frame; layer_get_global_frame((Layer *)&peek_layer->kino_layer, &layer_frame); if (grect_equal(&icon_from, &GRectZero)) { - icon_from = (GRect) { - .origin.x = layer_frame.origin.x + (layer_frame.size.w - UNFOLD_DOT_SIZE_PX) / 2, - .origin.y = layer_frame.origin.y + (layer_frame.size.h - UNFOLD_DOT_SIZE_PX) / 2, - .size = UNFOLD_DOT_SIZE, + icon_from = (GRect){ + .origin.x = layer_frame.origin.x + (layer_frame.size.w - UNFOLD_DOT_SIZE_PX) / 2, + .origin.y = layer_frame.origin.y + (layer_frame.size.h - UNFOLD_DOT_SIZE_PX) / 2, + .size = UNFOLD_DOT_SIZE, }; } GSize size = kino_reel_get_size(from_reel); GRect icon_to = { - .origin.x = layer_frame.origin.x + (layer_frame.size.w - size.w) / 2, - .origin.y = layer_frame.origin.y + (layer_frame.size.h - size.h) / 2, - .size = size, + .origin.x = layer_frame.origin.x + (layer_frame.size.w - size.w) / 2, + .origin.y = layer_frame.origin.y + (layer_frame.size.h - size.h) / 2, + .size = size, }; const bool take_ownership = true; - KinoReel *kino_reel = kino_reel_unfold_create( - from_reel, take_ownership, layer_frame, 0, - UNFOLD_DEFAULT_NUM_DELAY_GROUPS, UNFOLD_DEFAULT_GROUP_DELAY); + KinoReel *kino_reel = + kino_reel_unfold_create(from_reel, take_ownership, layer_frame, 0, + UNFOLD_DEFAULT_NUM_DELAY_GROUPS, UNFOLD_DEFAULT_GROUP_DELAY); kino_reel_transform_set_from_frame(kino_reel, icon_from); kino_reel_transform_set_to_frame(kino_reel, icon_to); kino_reel_transform_set_transform_duration(kino_reel, PEEK_LAYER_UNFOLD_DURATION); @@ -240,13 +238,12 @@ void peek_layer_set_icon_with_invert(PeekLayer *peek_layer, //! This is called after both the scale to and the PDCS is complete static void prv_scale_to_did_stop(KinoLayer *kino_layer, bool finished, void *context) { PeekLayer *peek_layer = context; - GRect icon_to = kino_reel_transform_get_to_frame( - kino_layer_get_reel(&peek_layer->kino_layer)); + GRect icon_to = kino_reel_transform_get_to_frame(kino_layer_get_reel(&peek_layer->kino_layer)); // A visible kino layer keeps rendering its end-as-dot frame at the screen center; drawing the // static dot too shows a second dot when the layer origin is offset (e.g. peek_offset_y) - peek_layer->show_dot = prv_is_dot_size(icon_to.size) && - layer_get_hidden((Layer *)&peek_layer->kino_layer); - kino_layer_set_callbacks(kino_layer, (KinoLayerCallbacks) { 0 }, NULL); + peek_layer->show_dot = + prv_is_dot_size(icon_to.size) && layer_get_hidden((Layer *)&peek_layer->kino_layer); + kino_layer_set_callbacks(kino_layer, (KinoLayerCallbacks){0}, NULL); } //! This is called after the scale to is complete @@ -277,8 +274,7 @@ void peek_layer_set_scale_to_image(PeekLayer *peek_layer, const TimelineResource if (timeline_res) { AppResourceInfo res_info; timeline_resources_get_id(timeline_res, res_size, &res_info); - to_reel = kino_reel_create_with_resource_system(res_info.res_app_num, - res_info.res_id); + to_reel = kino_reel_create_with_resource_system(res_info.res_app_num, res_info.res_id); } GSize size; @@ -291,15 +287,15 @@ void peek_layer_set_scale_to_image(PeekLayer *peek_layer, const TimelineResource GRect layer_frame; layer_get_global_frame((Layer *)&peek_layer->kino_layer, &layer_frame); if (grect_equal(&icon_from, &GRectZero)) { - icon_from = (GRect) { - .origin.x = layer_frame.origin.x + (layer_frame.size.w - size.w) / 2, - .origin.y = layer_frame.origin.y + (layer_frame.size.h - size.h) / 2, - .size = size, + icon_from = (GRect){ + .origin.x = layer_frame.origin.x + (layer_frame.size.w - size.w) / 2, + .origin.y = layer_frame.origin.y + (layer_frame.size.h - size.h) / 2, + .size = size, }; } if (to_reel && align_in_frame) { - GRect rect_to_align = { icon_to.origin, kino_reel_get_size(to_reel) }; + GRect rect_to_align = {icon_to.origin, kino_reel_get_size(to_reel)}; grect_align(&rect_to_align, &icon_to, GAlignCenter, false); icon_to = rect_to_align; } @@ -327,14 +323,14 @@ void peek_layer_set_scale_to_image(PeekLayer *peek_layer, const TimelineResource } kino_layer_set_reel(&peek_layer->kino_layer, kino_reel, true); - kino_layer_set_callbacks(&peek_layer->kino_layer, (KinoLayerCallbacks) { - .did_stop = prv_scale_to_did_stop, - }, peek_layer); + kino_layer_set_callbacks(&peek_layer->kino_layer, + (KinoLayerCallbacks){ + .did_stop = prv_scale_to_did_stop, + }, + peek_layer); - peek_layer->hidden_fields_timer = evented_timer_register(PEEK_LAYER_SCALE_DURATION, - false, - prv_scale_to_timer_callback, - peek_layer); + peek_layer->hidden_fields_timer = evented_timer_register(PEEK_LAYER_SCALE_DURATION, false, + prv_scale_to_timer_callback, peek_layer); } void peek_layer_set_scale_to(PeekLayer *peek_layer, GRect icon_to) { @@ -344,8 +340,8 @@ void peek_layer_set_scale_to(PeekLayer *peek_layer, GRect icon_to) { } void peek_layer_set_duration(PeekLayer *peek_layer, uint32_t duration) { - kino_reel_transform_set_transform_duration( - kino_layer_get_reel(&peek_layer->kino_layer), duration); + kino_reel_transform_set_transform_duration(kino_layer_get_reel(&peek_layer->kino_layer), + duration); } static void prv_set_visible(PeekLayer *peek_layer) { diff --git a/src/fw/apps/system/timeline/peek_layer.h b/src/fw/apps/system/timeline/peek_layer.h index a3da71603d..ed5a6d15fc 100644 --- a/src/fw/apps/system/timeline/peek_layer.h +++ b/src/fw/apps/system/timeline/peek_layer.h @@ -45,7 +45,6 @@ typedef struct { bool show_dot; } PeekLayer; - //! Create a peek layer with a frame. PeekLayer *peek_layer_create(GRect frame); diff --git a/src/fw/apps/system/timeline/pin_window.c b/src/fw/apps/system/timeline/pin_window.c index 417159e9ff..3e1b6ee171 100644 --- a/src/fw/apps/system/timeline/pin_window.c +++ b/src/fw/apps/system/timeline/pin_window.c @@ -15,8 +15,8 @@ void timeline_pin_window_set_item(TimelinePinWindow *pin_window, TimelineItem *i timeline_item_layer_set_item(&pin_window->item_detail_layer, item, &pin_window->info); } -static Animation *prv_create_bounds_origin_animation( - TimelinePinWindow *pin_window, GPoint *from_origin, GPoint *to_origin) { +static Animation *prv_create_bounds_origin_animation(TimelinePinWindow *pin_window, + GPoint *from_origin, GPoint *to_origin) { Animation *animation = property_animation_get_animation( property_animation_create_bounds_origin(&pin_window->layer, from_origin, to_origin)); animation_set_duration(animation, TIMELINE_CARD_TRANSITION_MS / 2); @@ -49,7 +49,7 @@ static void prv_pin_window_load(Window *window) { window_set_background_color(window, colors->bg_color); // bounce back from the right - GPoint from_origin = { -TIMELINE_CARD_MARGIN, 0 }; + GPoint from_origin = {-TIMELINE_CARD_MARGIN, 0}; Animation *animation = prv_create_bounds_origin_animation(pin_window, &from_origin, NULL); animation_schedule(animation); } @@ -71,7 +71,7 @@ void timeline_pin_window_pop(TimelinePinWindow *pin_window) { Window *window = &pin_window->window; // delay window unload until the end of the animation - window_set_window_handlers(window, &(WindowHandlers) {}); + window_set_window_handlers(window, &(WindowHandlers){}); window_stack_remove(window, false); // animate the pop by using the new top most window @@ -79,12 +79,14 @@ void timeline_pin_window_pop(TimelinePinWindow *pin_window) { layer_add_child(&other_window->layer, &pin_window->layer); // animate the card layout to the right - GPoint to_origin = { pin_window->layer.bounds.size.w, 0 }; + GPoint to_origin = {pin_window->layer.bounds.size.w, 0}; Animation *animation = prv_create_bounds_origin_animation(pin_window, NULL, &to_origin); animation_set_custom_interpolation(animation, interpolate_moook); - animation_set_handlers(animation, (AnimationHandlers) { - .stopped = prv_pop_animation_stopped, - }, pin_window); + animation_set_handlers(animation, + (AnimationHandlers){ + .stopped = prv_pop_animation_stopped, + }, + pin_window); animation_schedule(animation); pin_window->pop_animation = animation; @@ -99,10 +101,10 @@ void timeline_pin_window_init(TimelinePinWindow *pin_window, TimelineItem *item, Window *window = &pin_window->window; window_init(window, WINDOW_NAME("Pin")); window_set_user_data(window, pin_window); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_pin_window_load, - .unload = prv_pin_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_pin_window_load, + .unload = prv_pin_window_unload, + }); TimelineItemLayer *layer = &pin_window->item_detail_layer; GRect frame = window->layer.bounds; @@ -144,16 +146,16 @@ static void prv_blobdb_event_handler(PebbleEvent *event, void *context) { void timeline_pin_window_push_modal(TimelineItem *item) { TimelinePinWindow *pin_window = kernel_zalloc_check(sizeof(TimelinePinWindow)); timeline_pin_window_init(pin_window, item, time_util_get_midnight_of(rtc_get_time())); - window_set_window_handlers((Window *)pin_window, &(WindowHandlers) { - .load = prv_pin_window_load, - .unload = prv_pin_window_unload_modal, - }); + window_set_window_handlers((Window *)pin_window, &(WindowHandlers){ + .load = prv_pin_window_load, + .unload = prv_pin_window_unload_modal, + }); // Subscribe to pin removal events (handled by timeline app when not modal) - pin_window->blobdb_event_info = (EventServiceInfo) { - .type = PEBBLE_BLOBDB_EVENT, - .handler = prv_blobdb_event_handler, - .context = pin_window, + pin_window->blobdb_event_info = (EventServiceInfo){ + .type = PEBBLE_BLOBDB_EVENT, + .handler = prv_blobdb_event_handler, + .context = pin_window, }; event_service_client_subscribe(&pin_window->blobdb_event_info); diff --git a/src/fw/apps/system/timeline/pin_window.h b/src/fw/apps/system/timeline/pin_window.h index 1be75f15f3..3c24af1193 100644 --- a/src/fw/apps/system/timeline/pin_window.h +++ b/src/fw/apps/system/timeline/pin_window.h @@ -11,13 +11,13 @@ typedef struct TimelinePinWindow TimelinePinWindow; struct TimelinePinWindow { Window window; - Layer layer; //!< Used to perform a bounds animation of the window + Layer layer; //!< Used to perform a bounds animation of the window Layer action_button_layer; StatusBarLayer status_layer; TimelineItemLayer item_detail_layer; TimelineLayoutInfo info; Animation *pop_animation; - EventServiceInfo blobdb_event_info; //!< Used for pin events when in modal window + EventServiceInfo blobdb_event_info; //!< Used for pin events when in modal window }; void timeline_pin_window_set_item(TimelinePinWindow *pin_window, TimelineItem *item, diff --git a/src/fw/apps/system/timeline/private.h b/src/fw/apps/system/timeline/private.h index 048fbf9513..884ea99393 100644 --- a/src/fw/apps/system/timeline/private.h +++ b/src/fw/apps/system/timeline/private.h @@ -1,3 +1,2 @@ /* SPDX-FileCopyrightText: 2024 Google LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - diff --git a/src/fw/apps/system/timeline/relbar.c b/src/fw/apps/system/timeline/relbar.c index fefc0f51e5..1d8823acaa 100644 --- a/src/fw/apps/system/timeline/relbar.c +++ b/src/fw/apps/system/timeline/relbar.c @@ -124,9 +124,9 @@ static Animation *prv_create_prev_rel_bar_animation(TimelineLayer *layer, uint32 int16_t prev_from_rel_bar_value = 0; int16_t prev_to_rel_bar_value = 0; static const PropertyAnimationImplementation prev_implementation = { - .base.update = (AnimationUpdateImplementation) property_animation_update_int16, - .accessors.setter.int16 = prv_prev_rel_bar_setter, - .accessors.getter.int16 = prv_prev_rel_bar_getter, + .base.update = (AnimationUpdateImplementation)property_animation_update_int16, + .accessors.setter.int16 = prv_prev_rel_bar_setter, + .accessors.getter.int16 = prv_prev_rel_bar_getter, }; if (layer->relbar_layer.prev_rel_bar.rel_bar_type == RelationshipBarTypeOverlap) { @@ -165,9 +165,9 @@ static Animation *prv_create_curr_rel_bar_animation(TimelineLayer *layer, uint32 int16_t curr_to_rel_bar_value = 0; static const PropertyAnimationImplementation curr_implementation = { - .base.update = (AnimationUpdateImplementation) property_animation_update_int16, - .accessors.setter.int16 = prv_curr_rel_bar_setter, - .accessors.getter.int16 = prv_curr_rel_bar_getter, + .base.update = (AnimationUpdateImplementation)property_animation_update_int16, + .accessors.setter.int16 = prv_curr_rel_bar_setter, + .accessors.getter.int16 = prv_curr_rel_bar_getter, }; if (layer->relbar_layer.curr_rel_bar.rel_bar_type == RelationshipBarTypeOverlap) { @@ -185,8 +185,8 @@ static Animation *prv_create_curr_rel_bar_animation(TimelineLayer *layer, uint32 if (curr_rel_bar_anim) { // Delay to avoid overlapping moving icon with bars - animation_set_delay(curr_rel_bar_anim, REL_BAR_CURR_ANIM_DELAY(duration)); - animation_set_duration(curr_rel_bar_anim, REL_BAR_CURR_ANIM_DURATION(duration)); + animation_set_delay(curr_rel_bar_anim, REL_BAR_CURR_ANIM_DELAY(duration)); + animation_set_duration(curr_rel_bar_anim, REL_BAR_CURR_ANIM_DURATION(duration)); animation_set_custom_interpolation(curr_rel_bar_anim, interpolate); } @@ -197,18 +197,18 @@ static Animation *prv_create_curr_rel_bar_animation(TimelineLayer *layer, uint32 #define REL_BAR_LINE_WIDTH 2 #define REL_BAR_LINE_HORIZ_OFFSET ((SIDEBAR_WIDTH / 2) + (REL_BAR_LINE_WIDTH / 2)) #define REL_BAR_LINE_NOTCH_HORIZ_OFFSET ((REL_BAR_LINE_CHECK_LENGTH / 2) + (REL_BAR_LINE_WIDTH / 2)) -static void prv_draw_rel_bar_line(TimelineLayer *timeline_layer, GContext* ctx, - bool current, int16_t anim_offset) { - int16_t prev_offset = 0; // Used to animate the previous animation offset +static void prv_draw_rel_bar_line(TimelineLayer *timeline_layer, GContext *ctx, bool current, + int16_t anim_offset) { + int16_t prev_offset = 0; // Used to animate the previous animation offset if (!current) { prev_offset = REL_BAR_PREV_ANIM_OFFSET - anim_offset; prev_offset = (timeline_layer->move_delta > 0) ? prev_offset : -prev_offset; } - int16_t curr_offset = anim_offset; // Used to animate the previous animation offset + int16_t curr_offset = anim_offset; // Used to animate the previous animation offset if ((current && (curr_offset <= 0)) || - ((!current) && ((prev_offset >= REL_BAR_PREV_ANIM_OFFSET) || - (prev_offset <= -REL_BAR_PREV_ANIM_OFFSET)))) { + ((!current) && + ((prev_offset >= REL_BAR_PREV_ANIM_OFFSET) || (prev_offset <= -REL_BAR_PREV_ANIM_OFFSET)))) { return; } @@ -222,8 +222,10 @@ static void prv_draw_rel_bar_line(TimelineLayer *timeline_layer, GContext* ctx, GRect first_icon_frame; GRect second_icon_frame; - const int line_length = (prv_get_line_length(timeline_layer, &first_icon_frame, - &second_icon_frame) - REL_BAR_LINE_WIDTH) / 2; + const int line_length = + (prv_get_line_length(timeline_layer, &first_icon_frame, &second_icon_frame) - + REL_BAR_LINE_WIDTH) / + 2; // Draw two lines that are centered in the side bar // Bar 1 @@ -266,22 +268,21 @@ static void prv_draw_rel_bar_line(TimelineLayer *timeline_layer, GContext* ctx, } #define REL_BAR_DOT_SIZE 2 -static void prv_draw_rel_bar_dotted(TimelineLayer *timeline_layer, GContext* ctx, - bool current, int16_t rel_bar_value) { - int16_t prev_offset = 0; // Used to animate the previous animation offset +static void prv_draw_rel_bar_dotted(TimelineLayer *timeline_layer, GContext *ctx, bool current, + int16_t rel_bar_value) { + int16_t prev_offset = 0; // Used to animate the previous animation offset if (!current) { prev_offset = REL_BAR_PREV_ANIM_OFFSET - rel_bar_value; prev_offset = (timeline_layer->move_delta > 0) ? prev_offset : -prev_offset; } - int16_t curr_offset = rel_bar_value; // Used to animate the current animation offset + int16_t curr_offset = rel_bar_value; // Used to animate the current animation offset if ((current && (curr_offset <= 0)) || - ((!current) && ((prev_offset >= REL_BAR_PREV_ANIM_OFFSET) || - (prev_offset <= -REL_BAR_PREV_ANIM_OFFSET)))) { + ((!current) && + ((prev_offset >= REL_BAR_PREV_ANIM_OFFSET) || (prev_offset <= -REL_BAR_PREV_ANIM_OFFSET)))) { return; } - // Choose which offset to use based on current or previous animation if (!current) { curr_offset = 0; @@ -305,8 +306,8 @@ static void prv_draw_rel_bar_dotted(TimelineLayer *timeline_layer, GContext* ctx GRect line; line.origin.x = layer_bounds.origin.x + layer_bounds.size.w - REL_BAR_LINE_HORIZ_OFFSET; // Account for the size of the icon when positioning vertically - line.origin.y = grect_get_max_y(&first_icon_frame) + - REL_BAR_VERT_MARGIN - curr_offset - prev_offset; + line.origin.y = + grect_get_max_y(&first_icon_frame) + REL_BAR_VERT_MARGIN - curr_offset - prev_offset; line.size.w = REL_BAR_LINE_WIDTH; line.size.h = solid_line_length + curr_offset; graphics_fill_rect(ctx, &line); @@ -320,8 +321,7 @@ static void prv_draw_rel_bar_dotted(TimelineLayer *timeline_layer, GContext* ctx notch.size.h = REL_BAR_LINE_WIDTH; graphics_fill_rect(ctx, ¬ch); - const int dot_origin_y_max = - grect_get_max_y(&line) + dot_line_length + curr_offset - prev_offset; + const int dot_origin_y_max = grect_get_max_y(&line) + dot_line_length + curr_offset - prev_offset; // Dots in between two bars GRect dot = GRect(line.origin.x, grect_get_max_y(&line) + REL_BAR_LINE_WIDTH + dot_padding, REL_BAR_DOT_SIZE, REL_BAR_DOT_SIZE); @@ -352,8 +352,8 @@ static void prv_draw_rel_bar_dotted(TimelineLayer *timeline_layer, GContext* ctx #define REL_BAR_OVERLAP_SIDE_MARGIN 2 #define REL_BAR_OVERLAP_NUDGE_X 1 #define REL_BAR_OVERLAP_LINE2_HORIZ_OFFSET ((2 * REL_BAR_OVERLAP_SIDE_MARGIN) + 1) -static void prv_draw_rel_bar_overlap(TimelineLayer *timeline_layer, GContext* ctx, - bool current, int16_t rel_bar_value) { +static void prv_draw_rel_bar_overlap(TimelineLayer *timeline_layer, GContext *ctx, bool current, + int16_t rel_bar_value) { GRect first_icon_frame; GRect second_icon_frame; const int full_line_length = @@ -363,13 +363,14 @@ static void prv_draw_rel_bar_overlap(TimelineLayer *timeline_layer, GContext* ct int16_t y_offset = 0; if (!current) { line_length = full_line_length; - y_offset = (((full_line_length - rel_bar_value) * REL_BAR_PREV_ANIM_OFFSET) / - full_line_length) * timeline_layer->move_delta; + y_offset = + (((full_line_length - rel_bar_value) * REL_BAR_PREV_ANIM_OFFSET) / full_line_length) * + timeline_layer->move_delta; } if (((line_length <= 0) && current) || - ((!current) && ((y_offset >= REL_BAR_PREV_ANIM_OFFSET) || - (y_offset <= -REL_BAR_PREV_ANIM_OFFSET)))) { + ((!current) && + ((y_offset >= REL_BAR_PREV_ANIM_OFFSET) || (y_offset <= -REL_BAR_PREV_ANIM_OFFSET)))) { return; } @@ -382,11 +383,11 @@ static void prv_draw_rel_bar_overlap(TimelineLayer *timeline_layer, GContext* ct // Draw down line1_start.x = layer_bounds.origin.x + layer_bounds.size.w - (SIDEBAR_WIDTH / 2) - REL_BAR_OVERLAP_NUDGE_X - REL_BAR_OVERLAP_SIDE_MARGIN; - line1_start.y = grect_get_max_y(&first_icon_frame) + REL_BAR_VERT_MARGIN - - y_offset + REL_BAR_LINE_WIDTH; + line1_start.y = + grect_get_max_y(&first_icon_frame) + REL_BAR_VERT_MARGIN - y_offset + REL_BAR_LINE_WIDTH; - graphics_fill_rect(ctx, &GRect(line1_start.x, line1_start.y, - REL_BAR_OVERLAP_STROKE_WIDTH, line_length)); + graphics_fill_rect( + ctx, &GRect(line1_start.x, line1_start.y, REL_BAR_OVERLAP_STROKE_WIDTH, line_length)); GRect notch = GRectZero; notch.origin.x = line1_start.x - REL_BAR_LINE_NOTCH_HORIZ_OFFSET + 1; notch.origin.y = line1_start.y - REL_BAR_LINE_WIDTH; @@ -396,10 +397,9 @@ static void prv_draw_rel_bar_overlap(TimelineLayer *timeline_layer, GContext* ct // Draw up line2_start.x = line1_start.x + REL_BAR_OVERLAP_LINE2_HORIZ_OFFSET; - line2_start.y = second_icon_frame.origin.y - REL_BAR_VERT_MARGIN - y_offset - - REL_BAR_LINE_WIDTH; - graphics_fill_rect(ctx, &GRect(line2_start.x, line2_start.y, - REL_BAR_OVERLAP_STROKE_WIDTH, -line_length)); + line2_start.y = second_icon_frame.origin.y - REL_BAR_VERT_MARGIN - y_offset - REL_BAR_LINE_WIDTH; + graphics_fill_rect( + ctx, &GRect(line2_start.x, line2_start.y, REL_BAR_OVERLAP_STROKE_WIDTH, -line_length)); notch.origin.x = line2_start.x - REL_BAR_LINE_NOTCH_HORIZ_OFFSET + 1; notch.origin.y = line2_start.y; notch.size.w = REL_BAR_LINE_CHECK_LENGTH + REL_BAR_LINE_WIDTH; @@ -421,11 +421,10 @@ static void prv_update_proc(Layer *layer, GContext *ctx) { for (int index = 0; index < NUM_REL_BAR_ANIMATIONS; index++) { bool current = (index == CURRENT_REL_BAR_PIN_INDEX); - RelationshipBarType rel_bar = current ? - timeline_layer->relbar_layer.curr_rel_bar.rel_bar_type : - timeline_layer->relbar_layer.prev_rel_bar.rel_bar_type; - int16_t rel_bar_value = current ? timeline_layer->relbar_layer.curr_rel_bar.anim_offset : - timeline_layer->relbar_layer.prev_rel_bar.anim_offset; + RelationshipBarType rel_bar = current ? timeline_layer->relbar_layer.curr_rel_bar.rel_bar_type + : timeline_layer->relbar_layer.prev_rel_bar.rel_bar_type; + int16_t rel_bar_value = current ? timeline_layer->relbar_layer.curr_rel_bar.anim_offset + : timeline_layer->relbar_layer.prev_rel_bar.anim_offset; switch (rel_bar) { case RelationshipBarTypeFreeTime: // Draw dotted line @@ -462,10 +461,9 @@ void prv_rel_bar_show(void *context) { layer->relbar_layer.curr_rel_bar.anim_offset = REL_BAR_BACK_TO_BACK_OFFSET; } - layer_mark_dirty((Layer*) layer); + layer_mark_dirty((Layer *)layer); } - #define TIMELINE_NUM_REL_BARS (TIMELINE_NUM_VISIBLE_ITEMS + 1) static void prv_update_rel_bars(TimelineLayer *layer) { // Store prev, current, and next item relationship bar types @@ -475,21 +473,21 @@ static void prv_update_rel_bars(TimelineLayer *layer) { for (int index = 0; index < TIMELINE_NUM_REL_BARS; index++) { if (layer->layouts_info[index]) { - rel_bar_types[index] = prv_get_pin_relationship(layer->layouts_info[index], - layer->layouts_info[index + 1]); + rel_bar_types[index] = + prv_get_pin_relationship(layer->layouts_info[index], layer->layouts_info[index + 1]); } } layer->relbar_layer.curr_rel_bar.rel_bar_type = rel_bar_types[1]; if (layer->layouts_info[1]) { - PBL_LOG_DBG("Current rel bar %d, duration %"PRIu32, rel_bar_types[1], - layer->layouts_info[1]->duration_s); + PBL_LOG_DBG("Current rel bar %d, duration %" PRIu32, rel_bar_types[1], + layer->layouts_info[1]->duration_s); } } ///////////////////////////////////////// // Public functions ///////////////////////////////////////// -#define REL_BAR_TIMER_DELAY(delay) (delay / 3) // delay of timer is based on the duration +#define REL_BAR_TIMER_DELAY(delay) (delay / 3) // delay of timer is based on the duration Animation *timeline_relbar_layer_create_animation(TimelineLayer *layer, uint32_t duration, InterpolateInt64Function interpolate) { bool force_rel_bar_anim = false; @@ -507,7 +505,7 @@ Animation *timeline_relbar_layer_create_animation(TimelineLayer *layer, uint32_t // Setup a timer to display bars after a fraction of the input duration (i.e. if the user // has stopped scrolling fast) layer->relbar_layer.rel_bar_timer = - evented_timer_register(REL_BAR_TIMER_DELAY(duration), false, prv_rel_bar_show, layer); + evented_timer_register(REL_BAR_TIMER_DELAY(duration), false, prv_rel_bar_show, layer); // Don't schedule animation return NULL; @@ -559,9 +557,11 @@ Animation *timeline_relbar_layer_create_animation(TimelineLayer *layer, uint32_t } if (rel_bar_anim) { - animation_set_handlers(rel_bar_anim, (AnimationHandlers) { - .stopped = prv_rel_bar_stopped, - }, layer); + animation_set_handlers(rel_bar_anim, + (AnimationHandlers){ + .stopped = prv_rel_bar_stopped, + }, + layer); } return rel_bar_anim; @@ -583,7 +583,7 @@ void timeline_relbar_layer_init(TimelineLayer *timeline_layer) { // init layer layer_init(&relbar_layer->layer, &timeline_layer->layer.frame); layer_set_update_proc(&relbar_layer->layer, prv_update_proc); - layer_add_child((Layer*)timeline_layer, (Layer *)&timeline_layer->relbar_layer); + layer_add_child((Layer *)timeline_layer, (Layer *)&timeline_layer->relbar_layer); relbar_layer->timeline_layer = timeline_layer; } diff --git a/src/fw/apps/system/timeline/text_node.c b/src/fw/apps/system/timeline/text_node.c index ca7f83c413..9cedf4221e 100644 --- a/src/fw/apps/system/timeline/text_node.c +++ b/src/fw/apps/system/timeline/text_node.c @@ -38,21 +38,21 @@ typedef enum { GAxisAlign_Max, } GAxisAlign; -_Static_assert((((int)GAxisAlign_Min == GTextAlignmentLeft) && +_Static_assert((((int)GAxisAlign_Min == GTextAlignmentLeft) && ((int)GAxisAlign_Center == GTextAlignmentCenter) && - ((int)GAxisAlign_Max == GTextAlignmentRight)), + ((int)GAxisAlign_Max == GTextAlignmentRight)), "TextNode requires GTextAlignment == the ordered set (0, 1, 2), left to right"); -_Static_assert((((int)GAxisAlign_Min == GVerticalAlignmentTop) && +_Static_assert((((int)GAxisAlign_Min == GVerticalAlignmentTop) && ((int)GAxisAlign_Center == GVerticalAlignmentCenter) && - ((int)GAxisAlign_Max == GVerticalAlignmentBottom)), + ((int)GAxisAlign_Max == GVerticalAlignmentBottom)), "TextNode requires GVerticalAlignment == the ordered set (0, 1, 2), top to bottom"); typedef struct { - const GTextNodeDrawConfig *config; //!< Draw configuration passed by the user - GTextNode *node; //!< GTextNode the context belongs to - GContext *gcontext; //!< Graphics context to draw with - const GRect *draw_box; //!< Drawing box in local coordinates passed by the user - GSize *size_out; //!< GSize pointer to write the calculated size to + const GTextNodeDrawConfig *config; //!< Draw configuration passed by the user + GTextNode *node; //!< GTextNode the context belongs to + GContext *gcontext; //!< Graphics context to draw with + const GRect *draw_box; //!< Drawing box in local coordinates passed by the user + GSize *size_out; //!< GSize pointer to write the calculated size to //! GRect representing the drawing cursor. For leaf nodes, this is simply the draw_box offset by //! the node's offset. For containers, this is passed as the drawing box to its children, and //! shrinks along the container's axis after drawing each child. @@ -63,7 +63,7 @@ typedef struct { //! GSize representing the size of the container. Used by containers only. This size starts at //! GSizeZero and grows after drawing each child. GSize size; - bool render; //!< true if this context should render, otherwise false only calculating size + bool render; //!< true if this context should render, otherwise false only calculating size //! true if this context should neither render nor calculate size, otherwise false. size_out will //! instead be derived from the node's cached size, and the render box will similarly be advanced //! by a size derived from the node's cached size. @@ -129,26 +129,27 @@ static GAxis prv_get_opposite_axis(GAxis axis) { GTextNodeText *graphics_text_node_create_text(size_t buffer_size) { GTextNodeText *text_node = task_zalloc(sizeof(GTextNodeText) + buffer_size); if (text_node) { - *text_node = (GTextNodeText) { - .node.type = GTextNodeType_Text, - .node.free_on_destroy = true, - .text = buffer_size ? (char *)(text_node + 1) : NULL, + *text_node = (GTextNodeText){ + .node.type = GTextNodeType_Text, + .node.free_on_destroy = true, + .text = buffer_size ? (char *)(text_node + 1) : NULL, }; } return text_node; } -GTextNodeTextDynamic *graphics_text_node_create_text_dynamic( - size_t buffer_size, GTextNodeTextDynamicUpdate update, void *user_data) { +GTextNodeTextDynamic *graphics_text_node_create_text_dynamic(size_t buffer_size, + GTextNodeTextDynamicUpdate update, + void *user_data) { GTextNodeTextDynamic *text_node = task_zalloc(sizeof(GTextNodeTextDynamic) + buffer_size); if (text_node) { - *text_node = (GTextNodeTextDynamic) { - .text.node.type = GTextNodeType_TextDynamic, - .text.node.free_on_destroy = true, - .text.text = buffer_size ? (char *)text_node->buffer : NULL, - .update = update, - .user_data = user_data, - .buffer_size = buffer_size, + *text_node = (GTextNodeTextDynamic){ + .text.node.type = GTextNodeType_TextDynamic, + .text.node.free_on_destroy = true, + .text.text = buffer_size ? (char *)text_node->buffer : NULL, + .update = update, + .user_data = user_data, + .buffer_size = buffer_size, }; } return text_node; @@ -157,11 +158,11 @@ GTextNodeTextDynamic *graphics_text_node_create_text_dynamic( static GTextNodeContainer *prv_create_container(GTextNodeType type, size_t size, size_t max_nodes) { GTextNodeContainer *container_node = task_zalloc(size + max_nodes * sizeof(GTextNode *)); if (container_node) { - *container_node = (GTextNodeContainer) { - .node.type = type, - .node.free_on_destroy = true, - .max_nodes = max_nodes, - .nodes = max_nodes ? (GTextNode **)((uint8_t *)container_node + size) : NULL, + *container_node = (GTextNodeContainer){ + .node.type = type, + .node.free_on_destroy = true, + .max_nodes = max_nodes, + .nodes = max_nodes ? (GTextNode **)((uint8_t *)container_node + size) : NULL, }; } return container_node; @@ -177,15 +178,14 @@ GTextNodeVertical *graphics_text_node_create_vertical(size_t max_nodes) { sizeof(GTextNodeVertical), max_nodes); } -GTextNodeCustom *graphics_text_node_create_custom(GTextNodeDrawCallback callback, - void *user_data) { +GTextNodeCustom *graphics_text_node_create_custom(GTextNodeDrawCallback callback, void *user_data) { GTextNodeCustom *custom_node = task_malloc(sizeof(GTextNodeCustom)); if (custom_node) { - *custom_node = (GTextNodeCustom) { - .node.type = GTextNodeType_Custom, - .node.free_on_destroy = true, - .callback = callback, - .user_data = user_data, + *custom_node = (GTextNodeCustom){ + .node.type = GTextNodeType_Custom, + .node.free_on_destroy = true, + .callback = callback, + .user_data = user_data, }; } return custom_node; @@ -257,7 +257,7 @@ static void prv_draw_text_node_text(GTextNodeDrawContext *ctx) { GTextNodeText *text_node = (GTextNodeText *)ctx->node; prv_clip_size(&ctx->box.size, &text_node->max_size); TextLayoutExtended layout = { - .line_spacing_delta = text_node->line_spacing_delta, + .line_spacing_delta = text_node->line_spacing_delta, }; const GTextNodeDrawConfig *config = ctx->config; if (config) { @@ -336,8 +336,7 @@ static void prv_did_draw_container(GTextNodeDrawContext *ctx) { static bool prv_will_draw_container_child(GTextNodeDrawContext *ctx, GTextNode *child_node) { GTextNode *parent_node = ctx->node; parent_node->cached_size = ctx->box.size; - if (parent_node->type == GTextNodeType_Horizontal && - child_node->type == GTextNodeType_Vertical) { + if (parent_node->type == GTextNodeType_Horizontal && child_node->type == GTextNodeType_Vertical) { prv_clip_width(&ctx->box.size, &child_node->cached_size); } else if (parent_node->type == GTextNodeType_Vertical && child_node->type == GTextNodeType_Horizontal) { @@ -364,61 +363,62 @@ static void prv_draw_text_node_custom(GTextNodeDrawContext *ctx) { custom_node->user_data); } -static void prv_draw_noop(GTextNodeDrawContext *ctx) { } +static void prv_draw_noop(GTextNodeDrawContext *ctx) { +} static const GTextNodeBaseImpl s_text_impl = { - .destructor = prv_destroy_text_node_base, - .will_draw = prv_draw_noop, - .did_draw = prv_draw_noop, - .draw = prv_draw_text_node_text, + .destructor = prv_destroy_text_node_base, + .will_draw = prv_draw_noop, + .did_draw = prv_draw_noop, + .draw = prv_draw_text_node_text, }; static const GTextNodeBaseImpl s_text_dynamic_impl = { - .destructor = prv_destroy_text_node_base, - .will_draw = prv_draw_noop, - .did_draw = prv_draw_noop, - .draw = prv_draw_text_node_text_dynamic, + .destructor = prv_destroy_text_node_base, + .will_draw = prv_draw_noop, + .did_draw = prv_draw_noop, + .draw = prv_draw_text_node_text_dynamic, }; static const GTextNodeBaseImpl s_custom_impl = { - .destructor = prv_destroy_text_node_base, - .will_draw = prv_draw_noop, - .did_draw = prv_draw_noop, - .draw = prv_draw_text_node_custom, + .destructor = prv_destroy_text_node_base, + .will_draw = prv_draw_noop, + .did_draw = prv_draw_noop, + .draw = prv_draw_text_node_custom, }; static const GTextNodeContainerImpl s_horizontal_impl = { - .base.is_container = true, - .base.destructor = prv_destroy_text_node_container, - .base.draw = prv_draw_noop, - .base.will_draw = prv_will_draw_container, - .base.did_draw = prv_did_draw_container, - .axis = GAxis_X, - .get_axis_align = prv_get_axis_align_horizontal, - .add_child = prv_container_add_child, - .will_draw_child = prv_will_draw_container_child, - .did_draw_child = prv_did_draw_container_child, + .base.is_container = true, + .base.destructor = prv_destroy_text_node_container, + .base.draw = prv_draw_noop, + .base.will_draw = prv_will_draw_container, + .base.did_draw = prv_did_draw_container, + .axis = GAxis_X, + .get_axis_align = prv_get_axis_align_horizontal, + .add_child = prv_container_add_child, + .will_draw_child = prv_will_draw_container_child, + .did_draw_child = prv_did_draw_container_child, }; static const GTextNodeContainerImpl s_vertical_impl = { - .base.is_container = true, - .base.destructor = prv_destroy_text_node_container, - .base.draw = prv_draw_noop, - .base.will_draw = prv_will_draw_container, - .base.did_draw = prv_did_draw_container, - .axis = GAxis_Y, - .get_axis_align = prv_get_axis_align_vertical, - .add_child = prv_container_add_child, - .will_draw_child = prv_will_draw_container_child, - .did_draw_child = prv_did_draw_container_child, + .base.is_container = true, + .base.destructor = prv_destroy_text_node_container, + .base.draw = prv_draw_noop, + .base.will_draw = prv_will_draw_container, + .base.did_draw = prv_did_draw_container, + .axis = GAxis_Y, + .get_axis_align = prv_get_axis_align_vertical, + .add_child = prv_container_add_child, + .will_draw_child = prv_will_draw_container_child, + .did_draw_child = prv_did_draw_container_child, }; static const GTextNodeBaseImpl *s_impl_table[GTextNodeTypeCount] = { - [GTextNodeType_Text] = &s_text_impl, - [GTextNodeType_TextDynamic] = &s_text_dynamic_impl, - [GTextNodeType_Horizontal] = &s_horizontal_impl.base, - [GTextNodeType_Vertical] = &s_vertical_impl.base, - [GTextNodeType_Custom] = &s_custom_impl, + [GTextNodeType_Text] = &s_text_impl, + [GTextNodeType_TextDynamic] = &s_text_dynamic_impl, + [GTextNodeType_Horizontal] = &s_horizontal_impl.base, + [GTextNodeType_Vertical] = &s_vertical_impl.base, + [GTextNodeType_Custom] = &s_custom_impl, }; static const GTextNodeBaseImpl *prv_base(GTextNode *node) { @@ -445,14 +445,14 @@ bool graphics_text_node_container_add_child(GTextNodeContainer *parent, GTextNod static void NOINLINE prv_init_draw_context(GTextNodeDrawContext *ctx, GTextNode *node, GContext *gcontext, const GRect *box, const GTextNodeDrawConfig *config, bool render) { - *ctx = (GTextNodeDrawContext) { - .config = config, - .gcontext = gcontext, - .node = node, - .draw_box = box, - .box = { gpoint_add(box->origin, node->offset), box->size }, - .render = render, - .size_out = &node->cached_size, + *ctx = (GTextNodeDrawContext){ + .config = config, + .gcontext = gcontext, + .node = node, + .draw_box = box, + .box = {gpoint_add(box->origin, node->offset), box->size}, + .render = render, + .size_out = &node->cached_size, }; } @@ -462,7 +462,7 @@ static bool prv_should_draw_text_node(GTextNode *node, GContext *ctx, const GRec return false; } if (render && node->cached_size.h) { - GRect global_box = grect_to_global_coordinates((GRect) { box->origin, node->cached_size }, ctx); + GRect global_box = grect_to_global_coordinates((GRect){box->origin, node->cached_size}, ctx); grect_clip(&global_box, &ctx->draw_state.clip_box); if (!global_box.size.h) { return false; @@ -486,8 +486,8 @@ static void prv_iter_will_draw(GTextNodeDrawContext *ctx, GTextNodeDrawContext * if (!ctx->cached && node->clip) { ctx->cached_clip_box = ctx->gcontext->draw_state.clip_box; const GRect draw_box = { - .origin = gpoint_add(ctx->draw_box->origin, ctx->gcontext->draw_state.drawing_box.origin), - .size = ctx->draw_box->size, + .origin = gpoint_add(ctx->draw_box->origin, ctx->gcontext->draw_state.drawing_box.origin), + .size = ctx->draw_box->size, }; grect_clip(&ctx->gcontext->draw_state.clip_box, &draw_box); } diff --git a/src/fw/apps/system/timeline/text_node.h b/src/fw/apps/system/timeline/text_node.h index 3a8476714d..27801486cc 100644 --- a/src/fw/apps/system/timeline/text_node.h +++ b/src/fw/apps/system/timeline/text_node.h @@ -132,8 +132,8 @@ typedef struct { //! value will pin the container's respective non-zero size dimension, allowing the children to //! align themselves differently within the container. GSize size; - size_t num_nodes; //!< Current number of attached nodes - size_t max_nodes; //!< Maximum capacity of nodes + size_t num_nodes; //!< Current number of attached nodes + size_t max_nodes; //!< Maximum capacity of nodes GTextNode **nodes; } GTextNodeContainer; @@ -153,9 +153,9 @@ typedef struct { //! to the text layout max used size calculation, limiting that dimension. GSize max_size; int16_t line_spacing_delta; - GColor color; //!< Text color to draw the text with + GColor color; //!< Text color to draw the text with GTextOverflowMode overflow; - GTextAlignment alignment; //!< Alignment to use within the draw box given to the text node + GTextAlignment alignment; //!< Alignment to use within the draw box given to the text node } GTextNodeText; //! @internal @@ -164,7 +164,7 @@ typedef struct { //! User-defined update function that will be called before every size and render update, //! usually to modify the node's text buffer. GTextNodeTextDynamicUpdate update; - void *user_data; //!< User data that will be passed to the user-defined update function + void *user_data; //!< User data that will be passed to the user-defined update function //! Size of the buffer that will be passed to the update callback. If the node was allocated with //! \ref graphics_text_node_create_text_dynamic, this is the buffer size that was passed to the //! buffer, @@ -172,7 +172,9 @@ typedef struct { size_t buffer_size; //! If the node was created with \ref graphics_text_node_create_text_dynamic, this is the buffer //! described by `.buffer_size`. - union { uint32_t _align; } buffer[]; + union { + uint32_t _align; + } buffer[]; } GTextNodeTextDynamic; //! @internal @@ -192,7 +194,7 @@ typedef struct { GTextNode node; //! User-defined update function that will be called before every size and render update GTextNodeDrawCallback callback; - void *user_data; //!< User data that will be passed to the user-defined update function + void *user_data; //!< User data that will be passed to the user-defined update function } GTextNodeCustom; //! @internal @@ -203,8 +205,9 @@ GTextNodeText *graphics_text_node_create_text(size_t buffer_size); //! @internal //! Allocates a single block of memory that ends with a zero-initialized string buffer. //! Initializes `.text` with a pointer to the buffer if buffer_size not 0. -GTextNodeTextDynamic *graphics_text_node_create_text_dynamic( - size_t buffer_size, GTextNodeTextDynamicUpdate update, void *user_data); +GTextNodeTextDynamic *graphics_text_node_create_text_dynamic(size_t buffer_size, + GTextNodeTextDynamicUpdate update, + void *user_data); //! @internal //! Allocates a single block of memory that ends with a zero-initialized node pointer buffer. @@ -217,8 +220,7 @@ GTextNodeHorizontal *graphics_text_node_create_horizontal(size_t max_nodes); GTextNodeVertical *graphics_text_node_create_vertical(size_t max_nodes); //! @internal -GTextNodeCustom *graphics_text_node_create_custom(GTextNodeDrawCallback callback, - void *user_data); +GTextNodeCustom *graphics_text_node_create_custom(GTextNodeDrawCallback callback, void *user_data); //! @internal //! Deeply destroys a TextNode and all its children diff --git a/src/fw/apps/system/timeline/timeline.c b/src/fw/apps/system/timeline/timeline.c index 6f5a5591d6..ff74a6b35d 100644 --- a/src/fw/apps/system/timeline/timeline.c +++ b/src/fw/apps/system/timeline/timeline.c @@ -44,19 +44,19 @@ typedef struct TimelineAppStyle { } TimelineAppStyle; static const TimelineAppStyle s_style_medium = { - .peek_icon_offset_y = PEEK_LAYER_ICON_OFFSET_Y, + .peek_icon_offset_y = PEEK_LAYER_ICON_OFFSET_Y, }; static const TimelineAppStyle s_style_large = { - .peek_offset_y = -7, - .peek_icon_offset_y = -16, + .peek_offset_y = -7, + .peek_icon_offset_y = -16, }; -static const TimelineAppStyle * const s_styles[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = &s_style_medium, - [PreferredContentSizeMedium] = &s_style_medium, - [PreferredContentSizeLarge] = &s_style_large, - [PreferredContentSizeExtraLarge] = &s_style_large, +static const TimelineAppStyle *const s_styles[NumPreferredContentSizes] = { + [PreferredContentSizeSmall] = &s_style_medium, + [PreferredContentSizeMedium] = &s_style_medium, + [PreferredContentSizeLarge] = &s_style_large, + [PreferredContentSizeExtraLarge] = &s_style_large, }; static TimelineAppData *s_app_data; @@ -64,7 +64,6 @@ static TimelineAppData *s_app_data; static const uint32_t TIMELINE_SLIDE_ANIMATION_MS = 150; static const uint32_t PEEK_SHOW_TIME_MS = 660; - static const TimelineAppStyle *prv_get_style(void) { return s_styles[PreferredContentSizeDefault]; } @@ -75,14 +74,12 @@ static const TimelineAppStyle *prv_get_style(void) { static bool prv_can_transition_state(TimelineAppData *data, TimelineAppState next_state) { // all non-exit states can transition to exit - if (data->state != TimelineAppStateExit && - next_state == TimelineAppStateExit) { + if (data->state != TimelineAppStateExit && next_state == TimelineAppStateExit) { return true; } switch (data->state) { case TimelineAppStateNone: - return (next_state == TimelineAppStatePeek || - next_state == TimelineAppStateHidePeek || + return (next_state == TimelineAppStatePeek || next_state == TimelineAppStateHidePeek || next_state == TimelineAppStateFarDayHidePeek || next_state == TimelineAppStateNoEvents); case TimelineAppStatePeek: @@ -92,10 +89,8 @@ static bool prv_can_transition_state(TimelineAppData *data, TimelineAppState nex case TimelineAppStateFarDayHidePeek: return (next_state == TimelineAppStateDaySeparator); case TimelineAppStateStationary: - return (next_state == TimelineAppStateUpDown || - next_state == TimelineAppStatePushCard || - next_state == TimelineAppStateNoEvents || - next_state == TimelineAppStateInactive); + return (next_state == TimelineAppStateUpDown || next_state == TimelineAppStatePushCard || + next_state == TimelineAppStateNoEvents || next_state == TimelineAppStateInactive); case TimelineAppStateUpDown: return (next_state == TimelineAppStateUpDown || next_state == TimelineAppStateShowDaySeparator || @@ -107,14 +102,11 @@ static bool prv_can_transition_state(TimelineAppData *data, TimelineAppState nex case TimelineAppStateHideDaySeparator: return (next_state == TimelineAppStateStationary); case TimelineAppStatePushCard: - return (next_state == TimelineAppStateCard || - next_state == TimelineAppStatePopCard); + return (next_state == TimelineAppStateCard || next_state == TimelineAppStatePopCard); case TimelineAppStateCard: - return (next_state == TimelineAppStatePopCard || - next_state == TimelineAppStateStationary); + return (next_state == TimelineAppStatePopCard || next_state == TimelineAppStateStationary); case TimelineAppStatePopCard: - return (next_state == TimelineAppStateStationary || - next_state == TimelineAppStatePushCard); + return (next_state == TimelineAppStateStationary || next_state == TimelineAppStatePushCard); case TimelineAppStateNoEvents: return (next_state == TimelineAppStateInactive); case TimelineAppStateInactive: @@ -127,8 +119,7 @@ static bool prv_can_transition_state(TimelineAppData *data, TimelineAppState nex static bool prv_set_state(TimelineAppData *data, TimelineAppState next_state) { const bool can_transition = prv_can_transition_state(data, next_state); - PBL_LOG_DBG("state transition %d->%d valid:%d", - data->state, next_state, can_transition); + PBL_LOG_DBG("state transition %d->%d valid:%d", data->state, next_state, can_transition); if (can_transition) { data->state = next_state; } @@ -168,28 +159,27 @@ static void prv_swap_timeline(void *data) { const CompositorTransition *transition = PBL_IF_RECT_ELSE( compositor_slide_transition_timeline_get(!is_future, to_timeline, timeline_model_is_empty()), compositor_dot_transition_timeline_get(!is_future, to_timeline)); - static TimelineArgs args = (TimelineArgs) { - .force_full = true - }; + static TimelineArgs args = (TimelineArgs){.force_full = true}; args.force_display_day_sep_on_start = s_app_data->day_sep_displayed_on_start; if (is_future) { Uuid past_uuid = TIMELINE_PAST_UUID_INIT; args.direction = TimelineIterDirectionPast; - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = app_install_get_id_for_uuid((const Uuid *)(&past_uuid)), - .common.args = (const void *)&args, - .common.transition = transition, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = app_install_get_id_for_uuid((const Uuid *)(&past_uuid)), + .common.args = (const void *)&args, + .common.transition = transition, }); } else { Uuid app_uuid; sys_get_app_uuid(&app_uuid); - const Uuid target_uuid = uuid_equal(&app_uuid, &(Uuid)TIMELINE_FULL_UUID_INIT) ? - (Uuid)TIMELINE_UUID_INIT : (Uuid)TIMELINE_FULL_UUID_INIT; + const Uuid target_uuid = uuid_equal(&app_uuid, &(Uuid)TIMELINE_FULL_UUID_INIT) + ? (Uuid)TIMELINE_UUID_INIT + : (Uuid)TIMELINE_FULL_UUID_INIT; args.direction = TimelineIterDirectionFuture; - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = app_install_get_id_for_uuid((const Uuid *)&target_uuid), - .common.args = (const void *)&args, - .common.transition = transition, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = app_install_get_id_for_uuid((const Uuid *)&target_uuid), + .common.args = (const void *)&args, + .common.transition = transition, }); } } @@ -226,14 +216,14 @@ static void prv_exit_anim_stopped(Animation *animation, bool finished, void *con //! If use_pin is true, the animation frame size and position will be that of the first pin icon. //! If shift_offscreen is true, the frame will be shifted by the screen row amount in a direction //! depending on the scroll direction. -static void prv_get_icon_animation_frame(TimelineAppData *data, GRect *icon_frame_out, - bool use_pin, bool shift_offscreen) { +static void prv_get_icon_animation_frame(TimelineAppData *data, GRect *icon_frame_out, bool use_pin, + bool shift_offscreen) { #if ANIMATION_DOT const GRect *layer_frame = &data->timeline_window.layer.frame; - *icon_frame_out = (GRect) { - .origin.x = layer_frame->origin.x + (layer_frame->size.w - UNFOLD_DOT_SIZE_PX) / 2, - .origin.y = layer_frame->origin.y + (layer_frame->size.h - UNFOLD_DOT_SIZE_PX) / 2, - .size = UNFOLD_DOT_SIZE, + *icon_frame_out = (GRect){ + .origin.x = layer_frame->origin.x + (layer_frame->size.w - UNFOLD_DOT_SIZE_PX) / 2, + .origin.y = layer_frame->origin.y + (layer_frame->size.h - UNFOLD_DOT_SIZE_PX) / 2, + .size = UNFOLD_DOT_SIZE, }; #elif ANIMATION_SLIDE GRect icon_frame; @@ -245,7 +235,7 @@ static void prv_get_icon_animation_frame(TimelineAppData *data, GRect *icon_fram timeline_layout_get_icon_frame(&frame, data->timeline_layer.scroll_direction, &icon_frame); } else { // Since there is no pin, we need the peek size, which is the large size - icon_frame = (GRect) { .size = TIMELINE_LARGE_RESOURCE_SIZE }; + icon_frame = (GRect){.size = TIMELINE_LARGE_RESOURCE_SIZE}; grect_align(&icon_frame, &data->peek_layer.layer.frame, GAlignCenter, false); const TimelineAppStyle *style = prv_get_style(); icon_frame.origin.y += style->peek_icon_offset_y; @@ -265,12 +255,10 @@ static void prv_get_icon_animation_frame(TimelineAppData *data, GRect *icon_fram static Animation *prv_create_peek_exit_anim(TimelineAppData *data, TimelineAppState prev_state, uint32_t duration) { PeekLayer *peek_layer = &data->peek_layer; - if (prev_state == TimelineAppStateNoEvents || - prev_state == TimelineAppStatePeek || + if (prev_state == TimelineAppStateNoEvents || prev_state == TimelineAppStatePeek || prev_state == TimelineAppStateHidePeek) { prv_cleanup_timer(&data->intro_timer_id); - } else if (prev_state == TimelineAppStateStationary || - prev_state == TimelineAppStateUpDown) { + } else if (prev_state == TimelineAppStateStationary || prev_state == TimelineAppStateUpDown) { TimelineLayout *first_timeline_layout = timeline_layer_get_current_layout(&data->timeline_layer); if (!first_timeline_layout) { @@ -333,10 +321,12 @@ static void prv_exit(TimelineAppData *data) { Animation *sidebar_slide = prv_create_sidebar_animation(data, false /* open */); animation_set_duration(sidebar_slide, duration); - animation_set_handlers(sidebar_slide, (AnimationHandlers) { - .started = prv_intro_or_exit_anim_started, - .stopped = prv_exit_anim_stopped, - }, data); + animation_set_handlers(sidebar_slide, + (AnimationHandlers){ + .started = prv_intro_or_exit_anim_started, + .stopped = prv_exit_anim_stopped, + }, + data); Animation *peek_anim = prv_create_peek_exit_anim(data, prev_state, duration); @@ -391,11 +381,13 @@ static void prv_move_timeline_layer_stopped(Animation *animation, bool finished, static Animation *prv_animate_to_pin_window(TimelineAppData *data) { Layer *layer = &data->timeline_layer.layer; GPoint to_origin = GPoint(-layer->bounds.size.w, 0); - Animation *animation = (Animation *)property_animation_create_bounds_origin(layer, NULL, - &to_origin); - animation_set_handlers(animation, (AnimationHandlers) { - .stopped = prv_move_timeline_layer_stopped, - }, data); + Animation *animation = + (Animation *)property_animation_create_bounds_origin(layer, NULL, &to_origin); + animation_set_handlers(animation, + (AnimationHandlers){ + .stopped = prv_move_timeline_layer_stopped, + }, + data); animation_set_duration(animation, TIMELINE_CARD_TRANSITION_MS / 2); animation_set_custom_interpolation(animation, interpolate_moook); animation_schedule(animation); @@ -461,8 +453,7 @@ T_STATIC void prv_setup_no_events_peek(TimelineAppData *data); static void prv_update_timeline_layer(TimelineAppData *data) { TimelineLayer *timeline_layer = &data->timeline_layer; - if (data->state != TimelineAppStateStationary && - data->state != TimelineAppStateUpDown && + if (data->state != TimelineAppStateStationary && data->state != TimelineAppStateUpDown && data->state != TimelineAppStateCard) { return; } @@ -470,8 +461,7 @@ static void prv_update_timeline_layer(TimelineAppData *data) { data->current_animation = NULL; timeline_layer_reset(timeline_layer); - if (timeline_model_is_empty() && - prv_set_state(data, TimelineAppStateNoEvents)) { + if (timeline_model_is_empty() && prv_set_state(data, TimelineAppStateNoEvents)) { // Hide layouts and animate to "No events" timeline_layer_set_layouts_hidden(&data->timeline_layer, true); @@ -509,9 +499,11 @@ static void prv_hide_day_sep_stopped(Animation *animation, bool finished, void * Animation *move_animation = timeline_layer_create_up_down_animation( &data->timeline_layer, TIMELINE_UP_DOWN_ANIMATION_DURATION_MS / 2, timeline_animation_interpolate_moook_second_half); - animation_set_handlers(move_animation, (AnimationHandlers) { - .stopped = prv_up_down_stopped, - }, data); + animation_set_handlers(move_animation, + (AnimationHandlers){ + .stopped = prv_up_down_stopped, + }, + data); data->current_animation = move_animation; animation_schedule(move_animation); @@ -527,9 +519,11 @@ static void prv_hide_day_sep(void *context) { animation_unschedule(data->current_animation); Animation *day_sep_hide = timeline_layer_create_day_sep_hide(&data->timeline_layer); - animation_set_handlers(day_sep_hide, (AnimationHandlers){ - .stopped = prv_hide_day_sep_stopped, - }, data); + animation_set_handlers(day_sep_hide, + (AnimationHandlers){ + .stopped = prv_hide_day_sep_stopped, + }, + data); data->current_animation = day_sep_hide; animation_schedule(day_sep_hide); } @@ -561,10 +555,8 @@ static void prv_select_click_handler(ClickRecognizerRef recognizer, void *contex static void prv_set_day_sep_timer(TimelineAppData *data) { const int DAY_SEP_TIMEOUT_MS = 1000; - data->day_separator_timer_id = evented_timer_register(DAY_SEP_TIMEOUT_MS, - false, - prv_hide_day_sep, - data); + data->day_separator_timer_id = + evented_timer_register(DAY_SEP_TIMEOUT_MS, false, prv_hide_day_sep, data); } static void prv_day_sep_show_stopped(Animation *animation, bool finished, void *context) { @@ -585,8 +577,8 @@ static void prv_up_down_click_handler(ClickRecognizerRef recognizer, void *conte prv_inactive_timer_refresh(data); ButtonId button = click_recognizer_get_button_id(recognizer); - const bool next = (button == BUTTON_ID_UP) ^ - (data->timeline_model.direction == TimelineIterDirectionFuture); + const bool next = + (button == BUTTON_ID_UP) ^ (data->timeline_model.direction == TimelineIterDirectionFuture); // We want to know if it was stationary before transitioning const bool was_stationary = (data->state == TimelineAppStateStationary); @@ -601,11 +593,11 @@ static void prv_up_down_click_handler(ClickRecognizerRef recognizer, void *conte prv_exit(data); } } - return; // There are no events + return; // There are no events } else if (prv_attempt_hide_day_sep(data)) { - return; // Successfully interrupted the day separator, let it hide + return; // Successfully interrupted the day separator, let it hide } else if (!prv_set_state(data, TimelineAppStateUpDown)) { - return; // Not in a state able to scroll at the moment + return; // Not in a state able to scroll at the moment } animation_unschedule(data->current_animation); @@ -639,23 +631,27 @@ static void prv_up_down_click_handler(ClickRecognizerRef recognizer, void *conte // If we interrupted a previous scroll, hasten this scroll const bool is_hasted = !was_stationary; const uint32_t duration = TIMELINE_UP_DOWN_ANIMATION_DURATION_MS; - const InterpolateInt64Function interpolate = is_hasted ? - timeline_animation_interpolate_moook_second_half : - timeline_animation_interpolate_moook_soft; - Animation *move_animation = timeline_layer_create_up_down_animation( - &data->timeline_layer, duration, interpolate); + const InterpolateInt64Function interpolate = + is_hasted ? timeline_animation_interpolate_moook_second_half + : timeline_animation_interpolate_moook_soft; + Animation *move_animation = + timeline_layer_create_up_down_animation(&data->timeline_layer, duration, interpolate); if (timeline_layer_should_animate_day_separator(&data->timeline_layer) && prv_set_state(data, TimelineAppStateShowDaySeparator)) { Animation *day_sep_show = timeline_layer_create_day_sep_show(&data->timeline_layer); move_animation = animation_spawn_create(move_animation, day_sep_show, NULL); - animation_set_handlers(move_animation, (AnimationHandlers) { - .stopped = prv_day_sep_show_stopped, - }, data); + animation_set_handlers(move_animation, + (AnimationHandlers){ + .stopped = prv_day_sep_show_stopped, + }, + data); } else { - animation_set_handlers(move_animation, (AnimationHandlers) { - .stopped = prv_up_down_stopped, - }, data); + animation_set_handlers(move_animation, + (AnimationHandlers){ + .stopped = prv_up_down_stopped, + }, + data); } data->current_animation = move_animation; @@ -739,8 +735,8 @@ static void prv_intro_anim_stopped(Animation *anim, bool finished, void *context prv_set_day_sep_timer(data); } else { GPoint direction = GPoint(0, -1); - Animation *layer_bounce = timeline_layer_create_bounce_back_animation(&data->timeline_layer, - direction); + Animation *layer_bounce = + timeline_layer_create_bounce_back_animation(&data->timeline_layer, direction); data->current_animation = layer_bounce; animation_schedule(layer_bounce); } @@ -759,9 +755,9 @@ static Animation *prv_create_intro_animation(TimelineAppData *data, uint32_t dur // animate the peek layer to the right GRect *start = &data->peek_layer.layer.frame; - GRect stop = { { was_mini_peek ? 0 : start->size.w , 0 }, start->size }; - Animation *peek_out = (Animation *)property_animation_create_layer_frame( - (Layer *)&data->peek_layer, start, &stop); + GRect stop = {{was_mini_peek ? 0 : start->size.w, 0}, start->size}; + Animation *peek_out = + (Animation *)property_animation_create_layer_frame((Layer *)&data->peek_layer, start, &stop); animation_set_duration(peek_out, duration); animation_set_custom_interpolation(peek_out, interpolate_moook_in_only); @@ -769,8 +765,9 @@ static Animation *prv_create_intro_animation(TimelineAppData *data, uint32_t dur Animation *sidebar_slide = prv_create_sidebar_animation(data, true /* open */); animation_set_duration(sidebar_slide, duration); - Animation *speed_lines = data->launch_into_deep_pin ? - timeline_layer_create_speed_lines_animation(&data->timeline_layer) : NULL; + Animation *speed_lines = data->launch_into_deep_pin + ? timeline_layer_create_speed_lines_animation(&data->timeline_layer) + : NULL; return animation_spawn_create(peek_out, sidebar_slide, speed_lines, NULL); } @@ -828,8 +825,7 @@ static void prv_intro_timer_callback(void *context) { prv_set_state(data, TimelineAppStateHidePeek); - if (data->state != TimelineAppStateHidePeek && - data->state != TimelineAppStateFarDayHidePeek) { + if (data->state != TimelineAppStateHidePeek && data->state != TimelineAppStateFarDayHidePeek) { return; } @@ -839,13 +835,15 @@ static void prv_intro_timer_callback(void *context) { animation_unschedule(data->current_animation); - const uint32_t duration = was_mini_peek ? interpolate_moook_in_duration() : - TIMELINE_SLIDE_ANIMATION_MS; + const uint32_t duration = + was_mini_peek ? interpolate_moook_in_duration() : TIMELINE_SLIDE_ANIMATION_MS; Animation *intro = prv_create_intro_animation(data, duration, was_mini_peek); - animation_set_handlers(intro, (AnimationHandlers) { - .started = prv_intro_or_exit_anim_started, - .stopped = prv_intro_anim_stopped, - }, data); + animation_set_handlers(intro, + (AnimationHandlers){ + .started = prv_intro_or_exit_anim_started, + .stopped = prv_intro_anim_stopped, + }, + data); data->current_animation = intro; animation_schedule(intro); @@ -876,10 +874,8 @@ static void prv_peek_did_focus_handler(PebbleEvent *e, void *context) { data); } else if (data->state == TimelineAppStatePeek && data->intro_timer_id == EVENTED_TIMER_INVALID_ID) { - data->intro_timer_id = evented_timer_register(PEEK_SHOW_TIME_MS, - false, - prv_intro_timer_callback, - data); + data->intro_timer_id = + evented_timer_register(PEEK_SHOW_TIME_MS, false, prv_intro_timer_callback, data); } } @@ -907,7 +903,7 @@ T_STATIC void prv_setup_no_events_peek(TimelineAppData *data) { peek_layer_set_fields(peek_layer, "", i18n_get("No events", peek_layer), ""); // set the icon resource TimelineResourceInfo timeline_res = { - .res_id = TIMELINE_RESOURCE_NO_EVENTS, + .res_id = TIMELINE_RESOURCE_NO_EVENTS, }; const bool use_pin = false; prv_setup_peek_animation(data, &timeline_res, use_pin); @@ -938,13 +934,13 @@ static void prv_setup_first_pin_peek(TimelineAppData *data) { const bool is_mini_peek = (data->state == TimelineAppStateHidePeek); // set the text - char number_buffer[TIME_STRING_REQUIRED_LENGTH] = {}; // "11" - char word_buffer[TIME_STRING_REQUIRED_LENGTH] = {}; // "min to" + char number_buffer[TIME_STRING_REQUIRED_LENGTH] = {}; // "11" + char word_buffer[TIME_STRING_REQUIRED_LENGTH] = {}; // "min to" if (!is_mini_peek) { - clock_get_event_relative_time_string( - number_buffer, sizeof(number_buffer), word_buffer, sizeof(word_buffer), - first_pin->header.timestamp, first_pin->header.duration, state->current_day, - first_pin->header.all_day); + clock_get_event_relative_time_string(number_buffer, sizeof(number_buffer), word_buffer, + sizeof(word_buffer), first_pin->header.timestamp, + first_pin->header.duration, state->current_day, + first_pin->header.all_day); } peek_layer_set_fields(peek_layer, number_buffer, word_buffer, ""); @@ -973,7 +969,9 @@ static void NOINLINE prv_setup_peek(TimelineAppData *data) { layer_set_hidden((Layer *)&data->peek_layer, false); prv_setup_no_events_peek(data); focus_handler = prv_peek_did_focus_handler; - } else if (state && ((state->current_day != time_util_get_midnight_of(now)) || (data->force_display_day_sep == true)) && + } else if (state && + ((state->current_day != time_util_get_midnight_of(now)) || + (data->force_display_day_sep == true)) && prv_set_state(data, TimelineAppStateFarDayHidePeek)) { // entering into a day that isn't today, setup the day separator // If switching from Past to Future or Future to Past, @@ -999,10 +997,10 @@ static void NOINLINE prv_setup_peek(TimelineAppData *data) { } // set the did_focus handler - data->focus_event_info = (EventServiceInfo) { - .type = PEBBLE_APP_DID_CHANGE_FOCUS_EVENT, - .handler = focus_handler, - .context = s_app_data, + data->focus_event_info = (EventServiceInfo){ + .type = PEBBLE_APP_DID_CHANGE_FOCUS_EVENT, + .handler = focus_handler, + .context = s_app_data, }; event_service_client_subscribe(&s_app_data->focus_event_info); } @@ -1021,7 +1019,7 @@ T_STATIC void prv_init_peek_layer(TimelineAppData *data) { Window *window = &data->timeline_window; PeekLayer *peek_layer = &data->peek_layer; const TimelineAppStyle *style = prv_get_style(); - const GRect frame = { .origin.y = style->peek_offset_y, .size = window->layer.bounds.size }; + const GRect frame = {.origin.y = style->peek_offset_y, .size = window->layer.bounds.size}; peek_layer_init(peek_layer, &frame); peek_layer_set_icon_offset_y(peek_layer, style->peek_icon_offset_y); peek_layer_set_frame(peek_layer, &frame); @@ -1042,10 +1040,9 @@ static void prv_timeline_window_load(Window *window) { // timeline layer timeline_layer_init(timeline_layer, &window->layer.bounds, scroll_direction); - timeline_layer_set_sidebar_color(timeline_layer, - PBL_IF_COLOR_ELSE(prv_get_sidebar_color(s_app_data), - GColorLightGray)); - timeline_layer_set_layouts_hidden(timeline_layer, true); // hide until the peek is over + timeline_layer_set_sidebar_color( + timeline_layer, PBL_IF_COLOR_ELSE(prv_get_sidebar_color(s_app_data), GColorLightGray)); + timeline_layer_set_layouts_hidden(timeline_layer, true); // hide until the peek is over layer_set_hidden((Layer *)&timeline_layer->day_separator, true); layer_add_child(&window->layer, (Layer *)timeline_layer); @@ -1087,8 +1084,8 @@ static void prv_back_from_card_stopped(Animation *animation, bool finished, void data->current_animation = NULL; prv_update_timeline_layer(data); - Animation *layer_bounce = timeline_layer_create_bounce_back_animation(&data->timeline_layer, - GPoint(1, 0)); + Animation *layer_bounce = + timeline_layer_create_bounce_back_animation(&data->timeline_layer, GPoint(1, 0)); data->current_animation = layer_bounce; animation_schedule(layer_bounce); @@ -1119,7 +1116,6 @@ Animation *timeline_animate_back_from_card(void) { timeline_layer_set_layouts_hidden(&data->timeline_layer, true); window_set_background_color(&data->timeline_window, GColorWhite); - TimelineLayout *pin_timeline_layout = timeline_layer_get_current_layout(&data->timeline_layer); if (pin_timeline_layout) { // animation the pin icon @@ -1129,14 +1125,16 @@ Animation *timeline_animate_back_from_card(void) { // animate the timeline layer from the left Layer *layer = &data->timeline_layer.layer; - GPoint from_origin = { -layer->bounds.size.w, 0 }; - Animation *layer_in = (Animation *)property_animation_create_bounds_origin(layer, &from_origin, - &GPointZero); + GPoint from_origin = {-layer->bounds.size.w, 0}; + Animation *layer_in = + (Animation *)property_animation_create_bounds_origin(layer, &from_origin, &GPointZero); animation_set_duration(layer_in, TIMELINE_CARD_TRANSITION_MS / 2); animation_set_custom_interpolation(layer_in, interpolate_moook); - animation_set_handlers(layer_in, (AnimationHandlers) { - .stopped = prv_back_from_card_stopped, - }, data); + animation_set_handlers(layer_in, + (AnimationHandlers){ + .stopped = prv_back_from_card_stopped, + }, + data); data->current_animation = layer_in; animation_schedule(layer_in); @@ -1156,10 +1154,10 @@ static bool NOINLINE prv_setup_timeline_app(void) { s_app_data = data; *data = (TimelineAppData){}; - data->blobdb_event_info = (EventServiceInfo) { - .type = PEBBLE_BLOBDB_EVENT, - .handler = prv_blobdb_event_handler, - .context = data, + data->blobdb_event_info = (EventServiceInfo){ + .type = PEBBLE_BLOBDB_EVENT, + .handler = prv_blobdb_event_handler, + .context = data, }; event_service_client_subscribe(&data->blobdb_event_info); @@ -1190,8 +1188,7 @@ static bool NOINLINE prv_setup_timeline_app(void) { time_t now = rtc_get_time(); TimelineItem pin; bool launch_into_pin = false; - if (args && args->launch_into_pin && - !uuid_is_invalid(&args->pin_id) && + if (args && args->launch_into_pin && !uuid_is_invalid(&args->pin_id) && pin_db_get(&args->pin_id, &pin) == S_SUCCESS) { launch_into_pin = true; if (!args->stay_in_list_view) { @@ -1216,7 +1213,8 @@ static bool NOINLINE prv_setup_timeline_app(void) { launch_into_pin = false; data->launch_into_deep_pin = false; // we couldn't find the launch pin, go back to the present - while (timeline_model_iter_prev(NULL, NULL)) {} + while (timeline_model_iter_prev(NULL, NULL)) { + } break; } } @@ -1225,12 +1223,12 @@ static bool NOINLINE prv_setup_timeline_app(void) { Window *window = &data->timeline_window; window_init(window, WINDOW_NAME("Timeline")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_timeline_window_load, - .appear = prv_timeline_window_appear, - .disappear = prv_timeline_window_disappear, - .unload = prv_timeline_window_unload - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_timeline_window_load, + .appear = prv_timeline_window_appear, + .disappear = prv_timeline_window_disappear, + .unload = prv_timeline_window_unload + }); return (launch_into_pin && !(args && args->stay_in_list_view)); } @@ -1272,40 +1270,43 @@ static void prv_main(void) { const PebbleProcessMd *timeline_get_app_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = prv_main, - // uuid: 79C76B48-6111-4E80-8DEB-3119EEBEF33E - .uuid = TIMELINE_UUID_INIT, - .visibility = ProcessVisibilityQuickLaunch, - }, - .name = i18n_noop("Timeline Future"), + .common = + { + .main_func = prv_main, + // uuid: 79C76B48-6111-4E80-8DEB-3119EEBEF33E + .uuid = TIMELINE_UUID_INIT, + .visibility = ProcessVisibilityQuickLaunch, + }, + .name = i18n_noop("Timeline Future"), }; return &s_app_md.common; } const PebbleProcessMd *timeline_past_get_app_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = prv_main, - .uuid = TIMELINE_PAST_UUID_INIT, - .visibility = ProcessVisibilityQuickLaunch, - }, - /// The title of Timeline Past in Quick Launch. If the translation is too long, cut out - /// Timeline and only translate "Past". - .name = i18n_noop("Timeline Past"), + .common = + { + .main_func = prv_main, + .uuid = TIMELINE_PAST_UUID_INIT, + .visibility = ProcessVisibilityQuickLaunch, + }, + /// The title of Timeline Past in Quick Launch. If the translation is too long, cut out + /// Timeline and only translate "Past". + .name = i18n_noop("Timeline Past"), }; return &s_app_md.common; } const PebbleProcessMd *timeline_full_get_app_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = prv_main, - .uuid = TIMELINE_FULL_UUID_INIT, - .visibility = ProcessVisibilityShown, - }, - .name = i18n_noop("Timeline"), - .icon_resource_id = RESOURCE_ID_DAY_SEPARATOR_TINY, + .common = + { + .main_func = prv_main, + .uuid = TIMELINE_FULL_UUID_INIT, + .visibility = ProcessVisibilityShown, + }, + .name = i18n_noop("Timeline"), + .icon_resource_id = RESOURCE_ID_DAY_SEPARATOR_TINY, }; return &s_app_md.common; } \ No newline at end of file diff --git a/src/fw/apps/system/timeline/timeline.h b/src/fw/apps/system/timeline/timeline.h index 57373b8c8e..a7a7079e7a 100644 --- a/src/fw/apps/system/timeline/timeline.h +++ b/src/fw/apps/system/timeline/timeline.h @@ -35,8 +35,8 @@ typedef enum { typedef struct { TimelineDirection direction; - bool launch_into_pin; //!< Launch to a pin specified by `pin_id`. - bool stay_in_list_view; //!< Whether to stay in list view or launch into the detail view. + bool launch_into_pin; //!< Launch to a pin specified by `pin_id`. + bool stay_in_list_view; //!< Whether to stay in list view or launch into the detail view. Uuid pin_id; bool force_full; bool force_display_day_sep_on_start; @@ -54,9 +54,9 @@ typedef struct { EventServiceInfo blobdb_event_info; EventServiceInfo focus_event_info; - EventedTimerID inactive_timer_id; //!< To go back to watchface after inactivity - EventedTimerID intro_timer_id; //!< To perform the intro animation after a peek - EventedTimerID day_separator_timer_id; //!< To hide the day separator after a moment + EventedTimerID inactive_timer_id; //!< To go back to watchface after inactivity + EventedTimerID intro_timer_id; //!< To perform the intro animation after a peek + EventedTimerID day_separator_timer_id; //!< To hide the day separator after a moment TimelineModel timeline_model; @@ -64,9 +64,9 @@ typedef struct { TimelineAppState state; - bool launch_into_deep_pin; //!< Whether we launched directly into a pin that isn't the first - bool in_pin_view; //!< Whether we're in pin view - bool full_app_view; //!< Whether we launched as full app mode + bool launch_into_deep_pin; //!< Whether we launched directly into a pin that isn't the first + bool in_pin_view; //!< Whether we're in pin view + bool full_app_view; //!< Whether we launched as full app mode bool day_sep_displayed_on_start; bool force_display_day_sep; } TimelineAppData; @@ -74,16 +74,16 @@ typedef struct { Animation *timeline_animate_back_from_card(void); // uuid: 79C76B48-6111-4E80-8DEB-3119EEBEF33E -#define TIMELINE_UUID_INIT {0x79, 0xC7, 0x6B, 0x48, 0x61, 0x11, 0x4E, 0x80, \ - 0x8D, 0xEB, 0x31, 0x19, 0xEE, 0xBE, 0xF3, 0x3E} +#define TIMELINE_UUID_INIT \ + {0x79, 0xC7, 0x6B, 0x48, 0x61, 0x11, 0x4E, 0x80, 0x8D, 0xEB, 0x31, 0x19, 0xEE, 0xBE, 0xF3, 0x3E} // uuid: DAAE3686-BFF6-4BA5-921B-262F847BB6E8 -#define TIMELINE_PAST_UUID_INIT {0xDA, 0xAE, 0x36, 0x86, 0xBF, 0xF6, 0x4B, 0xA5, \ - 0x92, 0x1B, 0x26, 0x2F, 0x84, 0x7B, 0xB6, 0xE8} +#define TIMELINE_PAST_UUID_INIT \ + {0xDA, 0xAE, 0x36, 0x86, 0xBF, 0xF6, 0x4B, 0xA5, 0x92, 0x1B, 0x26, 0x2F, 0x84, 0x7B, 0xB6, 0xE8} // uuid: 426ccd53-b380-4d83-8d06-9893de3477ce -#define TIMELINE_FULL_UUID_INIT {0x42, 0x6c, 0xcd, 0x53, 0xb3, 0x80, 0x4d, 0x83, \ - 0x8d, 0x06, 0x98, 0x93, 0xde, 0x34, 0x77, 0xce} +#define TIMELINE_FULL_UUID_INIT \ + {0x42, 0x6c, 0xcd, 0x53, 0xb3, 0x80, 0x4d, 0x83, 0x8d, 0x06, 0x98, 0x93, 0xde, 0x34, 0x77, 0xce} const PebbleProcessMd *timeline_get_app_info(void); const PebbleProcessMd *timeline_past_get_app_info(void); diff --git a/src/fw/apps/system/toggle/airplane_mode.c b/src/fw/apps/system/toggle/airplane_mode.c index 5a9722ebf3..c9a46dbfb0 100644 --- a/src/fw/apps/system/toggle/airplane_mode.c +++ b/src/fw/apps/system/toggle/airplane_mode.c @@ -17,37 +17,38 @@ static void prv_set_state(bool enabled, void *context) { } static const ActionToggleImpl s_airplane_mode_action_toggle_impl = { - .window_name = "Airplane Mode Toggle", - .prompt_icon = RESOURCE_ID_AIRPLANE, - .result_icon = RESOURCE_ID_AIRPLANE, - // Toggling airplane mode involves locks which can block animation, don't animate - .result_icon_static = true, - .prompt_enable_message = i18n_noop("Turn On Airplane Mode?"), - .prompt_disable_message = i18n_noop("Turn Off Airplane Mode?"), - .result_enable_message = i18n_noop("Airplane\nMode On"), - .result_disable_message = i18n_noop("Airplane\nMode Off"), - .callbacks = { - .get_state = prv_get_state, - .set_state = prv_set_state, - }, + .window_name = "Airplane Mode Toggle", + .prompt_icon = RESOURCE_ID_AIRPLANE, + .result_icon = RESOURCE_ID_AIRPLANE, + // Toggling airplane mode involves locks which can block animation, don't animate + .result_icon_static = true, + .prompt_enable_message = i18n_noop("Turn On Airplane Mode?"), + .prompt_disable_message = i18n_noop("Turn Off Airplane Mode?"), + .result_enable_message = i18n_noop("Airplane\nMode On"), + .result_disable_message = i18n_noop("Airplane\nMode Off"), + .callbacks = { + .get_state = prv_get_state, + .set_state = prv_set_state, + }, }; static void prv_main(void) { - action_toggle_push(&(ActionToggleConfig) { - .impl = &s_airplane_mode_action_toggle_impl, - .set_exit_reason = true, + action_toggle_push(&(ActionToggleConfig){ + .impl = &s_airplane_mode_action_toggle_impl, + .set_exit_reason = true, }); app_event_loop(); } const PebbleProcessMd *airplane_mode_toggle_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = &prv_main, - .uuid = AIRPLANE_MODE_TOGGLE_UUID, - .visibility = ProcessVisibilityQuickLaunch, - }, - .name = i18n_noop("Airplane Mode"), + .common = + { + .main_func = &prv_main, + .uuid = AIRPLANE_MODE_TOGGLE_UUID, + .visibility = ProcessVisibilityQuickLaunch, + }, + .name = i18n_noop("Airplane Mode"), }; return &s_app_info.common; } diff --git a/src/fw/apps/system/toggle/airplane_mode.h b/src/fw/apps/system/toggle/airplane_mode.h index cf1efc8c7d..04f3bfdec9 100644 --- a/src/fw/apps/system/toggle/airplane_mode.h +++ b/src/fw/apps/system/toggle/airplane_mode.h @@ -5,7 +5,7 @@ #include "process_management/app_manager.h" -#define AIRPLANE_MODE_TOGGLE_UUID {0x88, 0xc2, 0x8c, 0x12, 0x7f, 0x81, 0x42, 0xdb, \ - 0xaa, 0xa6, 0x14, 0xcc, 0xef, 0x6f, 0x27, 0xe5} +#define AIRPLANE_MODE_TOGGLE_UUID \ + {0x88, 0xc2, 0x8c, 0x12, 0x7f, 0x81, 0x42, 0xdb, 0xaa, 0xa6, 0x14, 0xcc, 0xef, 0x6f, 0x27, 0xe5} const PebbleProcessMd *airplane_mode_toggle_get_app_info(void); diff --git a/src/fw/apps/system/toggle/backlight_state.c b/src/fw/apps/system/toggle/backlight_state.c index 411aeafb50..fccd358bb3 100644 --- a/src/fw/apps/system/toggle/backlight_state.c +++ b/src/fw/apps/system/toggle/backlight_state.c @@ -20,35 +20,36 @@ static void prv_set_state(bool enabled, void *context) { } static const ActionToggleImpl s_backlight_state_action_toggle_impl = { - .window_name = "Backlight Toggle", - .prompt_icon = RESOURCE_ID_BACKLIGHT, - .result_icon = RESOURCE_ID_BACKLIGHT, - .prompt_enable_message = i18n_noop("Turn On Backlight?"), - .prompt_disable_message = i18n_noop("Turn Off Backlight?"), - .result_enable_message = i18n_noop("Backlight On"), - .result_disable_message = i18n_noop("Backlight Off"), - .callbacks = { - .get_state = prv_get_state, - .set_state = prv_set_state, - }, + .window_name = "Backlight Toggle", + .prompt_icon = RESOURCE_ID_BACKLIGHT, + .result_icon = RESOURCE_ID_BACKLIGHT, + .prompt_enable_message = i18n_noop("Turn On Backlight?"), + .prompt_disable_message = i18n_noop("Turn Off Backlight?"), + .result_enable_message = i18n_noop("Backlight On"), + .result_disable_message = i18n_noop("Backlight Off"), + .callbacks = { + .get_state = prv_get_state, + .set_state = prv_set_state, + }, }; static void prv_main(void) { - action_toggle_push(&(ActionToggleConfig) { - .impl = &s_backlight_state_action_toggle_impl, - .set_exit_reason = true, + action_toggle_push(&(ActionToggleConfig){ + .impl = &s_backlight_state_action_toggle_impl, + .set_exit_reason = true, }); app_event_loop(); } const PebbleProcessMd *backlight_state_toggle_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = &prv_main, - .uuid = BACKLIGHT_STATE_TOGGLE_UUID, - .visibility = ProcessVisibilityQuickLaunch, - }, - .name = i18n_noop("Backlight"), + .common = + { + .main_func = &prv_main, + .uuid = BACKLIGHT_STATE_TOGGLE_UUID, + .visibility = ProcessVisibilityQuickLaunch, + }, + .name = i18n_noop("Backlight"), }; return &s_app_info.common; } diff --git a/src/fw/apps/system/toggle/backlight_state.h b/src/fw/apps/system/toggle/backlight_state.h index 83c71d69ee..bf2a8be971 100644 --- a/src/fw/apps/system/toggle/backlight_state.h +++ b/src/fw/apps/system/toggle/backlight_state.h @@ -5,7 +5,7 @@ #include "process_management/app_manager.h" -#define BACKLIGHT_STATE_TOGGLE_UUID {0xd0, 0xf1, 0x2e, 0x6c, 0x97, 0xeb, 0x22, 0x87, \ - 0xa2, 0xf5, 0x11, 0x5d, 0xfa, 0xA1, 0xd1, 0x68} +#define BACKLIGHT_STATE_TOGGLE_UUID \ + {0xd0, 0xf1, 0x2e, 0x6c, 0x97, 0xeb, 0x22, 0x87, 0xa2, 0xf5, 0x11, 0x5d, 0xfa, 0xA1, 0xd1, 0x68} const PebbleProcessMd *backlight_state_toggle_get_app_info(void); diff --git a/src/fw/apps/system/toggle/motion_backlight.c b/src/fw/apps/system/toggle/motion_backlight.c index 60f9c88632..3aabc167a7 100644 --- a/src/fw/apps/system/toggle/motion_backlight.c +++ b/src/fw/apps/system/toggle/motion_backlight.c @@ -17,35 +17,36 @@ static void prv_set_state(bool enabled, void *context) { } static const ActionToggleImpl s_motion_backlight_action_toggle_impl = { - .window_name = "Motion Backlight Toggle", - .prompt_icon = RESOURCE_ID_BACKLIGHT, - .result_icon = RESOURCE_ID_BACKLIGHT, - .prompt_enable_message = i18n_noop("Turn On Motion Backlight?"), - .prompt_disable_message = i18n_noop("Turn Off Motion Backlight?"), - .result_enable_message = i18n_noop("Motion\nBacklight On"), - .result_disable_message = i18n_noop("Motion\nBacklight Off"), - .callbacks = { - .get_state = prv_get_state, - .set_state = prv_set_state, - }, + .window_name = "Motion Backlight Toggle", + .prompt_icon = RESOURCE_ID_BACKLIGHT, + .result_icon = RESOURCE_ID_BACKLIGHT, + .prompt_enable_message = i18n_noop("Turn On Motion Backlight?"), + .prompt_disable_message = i18n_noop("Turn Off Motion Backlight?"), + .result_enable_message = i18n_noop("Motion\nBacklight On"), + .result_disable_message = i18n_noop("Motion\nBacklight Off"), + .callbacks = { + .get_state = prv_get_state, + .set_state = prv_set_state, + }, }; static void prv_main(void) { - action_toggle_push(&(ActionToggleConfig) { - .impl = &s_motion_backlight_action_toggle_impl, - .set_exit_reason = true, + action_toggle_push(&(ActionToggleConfig){ + .impl = &s_motion_backlight_action_toggle_impl, + .set_exit_reason = true, }); app_event_loop(); } const PebbleProcessMd *motion_backlight_toggle_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = &prv_main, - .uuid = MOTION_BACKLIGHT_TOGGLE_UUID, - .visibility = ProcessVisibilityQuickLaunch, - }, - .name = i18n_noop("Motion Backlight"), + .common = + { + .main_func = &prv_main, + .uuid = MOTION_BACKLIGHT_TOGGLE_UUID, + .visibility = ProcessVisibilityQuickLaunch, + }, + .name = i18n_noop("Motion Backlight"), }; return &s_app_info.common; } diff --git a/src/fw/apps/system/toggle/motion_backlight.h b/src/fw/apps/system/toggle/motion_backlight.h index 80e3387624..9b6a051541 100644 --- a/src/fw/apps/system/toggle/motion_backlight.h +++ b/src/fw/apps/system/toggle/motion_backlight.h @@ -5,7 +5,7 @@ #include "process_management/app_manager.h" -#define MOTION_BACKLIGHT_TOGGLE_UUID {0xd4, 0xf7, 0xbe, 0x63, 0x97, 0xe6, 0x49, 0x52, \ - 0xb2, 0x65, 0xdd, 0x4b, 0xce, 0x11, 0xc1, 0x55} +#define MOTION_BACKLIGHT_TOGGLE_UUID \ + {0xd4, 0xf7, 0xbe, 0x63, 0x97, 0xe6, 0x49, 0x52, 0xb2, 0x65, 0xdd, 0x4b, 0xce, 0x11, 0xc1, 0x55} const PebbleProcessMd *motion_backlight_toggle_get_app_info(void); diff --git a/src/fw/apps/system/toggle/quiet_time.c b/src/fw/apps/system/toggle/quiet_time.c index 7c2a084e60..2dca0f1345 100644 --- a/src/fw/apps/system/toggle/quiet_time.c +++ b/src/fw/apps/system/toggle/quiet_time.c @@ -15,12 +15,13 @@ static void prv_main(void) { const PebbleProcessMd *quiet_time_toggle_get_app_info(void) { static const PebbleProcessMdSystem s_app_info = { - .common = { - .main_func = &prv_main, - .uuid = QUIET_TIME_TOGGLE_UUID, - .visibility = ProcessVisibilityQuickLaunch, - }, - .name = i18n_noop("Quiet Time"), + .common = + { + .main_func = &prv_main, + .uuid = QUIET_TIME_TOGGLE_UUID, + .visibility = ProcessVisibilityQuickLaunch, + }, + .name = i18n_noop("Quiet Time"), }; return &s_app_info.common; } diff --git a/src/fw/apps/system/toggle/quiet_time.h b/src/fw/apps/system/toggle/quiet_time.h index 4bede675bf..9e079f32c6 100644 --- a/src/fw/apps/system/toggle/quiet_time.h +++ b/src/fw/apps/system/toggle/quiet_time.h @@ -5,7 +5,7 @@ #include "process_management/app_manager.h" -#define QUIET_TIME_TOGGLE_UUID {0x22, 0x20, 0xd8, 0x05, 0xcf, 0x9a, 0x4e, 0x12, \ - 0x92, 0xb9, 0x5c, 0xa7, 0x78, 0xaf, 0xf6, 0xbb} +#define QUIET_TIME_TOGGLE_UUID \ + {0x22, 0x20, 0xd8, 0x05, 0xcf, 0x9a, 0x4e, 0x12, 0x92, 0xb9, 0x5c, 0xa7, 0x78, 0xaf, 0xf6, 0xbb} const PebbleProcessMd *quiet_time_toggle_get_app_info(void); diff --git a/src/fw/apps/system/watchfaces.c b/src/fw/apps/system/watchfaces.c index 63dcd0baf0..d32433b699 100644 --- a/src/fw/apps/system/watchfaces.c +++ b/src/fw/apps/system/watchfaces.c @@ -32,7 +32,7 @@ static bool prv_app_filter_callback(struct AppMenuDataSource *source, AppInstall return false; } if (app_install_entry_is_watchface(entry)) { - return true; // Only watchfaces + return true; // Only watchfaces } return false; } @@ -51,37 +51,40 @@ static uint16_t prv_transform_index(AppMenuDataSource *data_source, uint16_t ori #endif } -static void select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, SettingsWatchfacesData *data) { - const AppMenuNode* app_node = +static void select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, + SettingsWatchfacesData *data) { + const AppMenuNode *app_node = app_menu_data_source_get_node_at_index(&data->data_source, cell_index->row); // NOTE: The default watchface is not set here in case the app fetch fails. menu_layer_reload_data(menu_layer); - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = app_node->install_id, - .common.reason = APP_LAUNCH_USER, - .common.button = BUTTON_ID_SELECT, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = app_node->install_id, + .common.reason = APP_LAUNCH_USER, + .common.button = BUTTON_ID_SELECT, }); } #if PBL_ROUND static int16_t get_cell_height_callback(struct MenuLayer *menu_layer, MenuIndex *cell_index, SettingsWatchfacesData *data) { - return menu_layer_is_index_selected(menu_layer, cell_index) ? - MENU_CELL_ROUND_FOCUSED_TALL_CELL_HEIGHT : MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT; + return menu_layer_is_index_selected(menu_layer, cell_index) + ? MENU_CELL_ROUND_FOCUSED_TALL_CELL_HEIGHT + : MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT; } #endif -static uint16_t get_num_rows_callback(struct MenuLayer *menu_layer, uint16_t section_index, SettingsWatchfacesData *data) { +static uint16_t get_num_rows_callback(struct MenuLayer *menu_layer, uint16_t section_index, + SettingsWatchfacesData *data) { return app_menu_data_source_get_count(&data->data_source); } -static void draw_row_callback(GContext* ctx, const Layer *cell_layer, MenuIndex *cell_index, +static void draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, SettingsWatchfacesData *data) { AppMenuNode *node = app_menu_data_source_get_node_at_index(&data->data_source, cell_index->row); GBitmap *bitmap = app_menu_data_source_get_node_icon(&data->data_source, node); - const char *subtitle = (data->active_watchface_id == node->install_id) ? - i18n_get("Active", data) : NULL; + const char *subtitle = + (data->active_watchface_id == node->install_id) ? i18n_get("Active", data) : NULL; const GCompOp op = (gbitmap_get_format(bitmap) == GBitmapFormat1Bit) ? GCompOpTint : GCompOpSet; graphics_context_set_compositing_mode(ctx, op); @@ -90,9 +93,8 @@ static void draw_row_callback(GContext* ctx, const Layer *cell_layer, MenuIndex PBL_UNUSED const bool selected = (cell_index->row == data->menu_layer.selection.index.row); // used for a fish-eye effect in the menus, also conveniently prevents us from clipping // during the animation - GFont const title_font = fonts_get_system_font( - PBL_IF_RECT_ELSE(FONT_KEY_GOTHIC_24_BOLD, - selected ? FONT_KEY_GOTHIC_24_BOLD : FONT_KEY_GOTHIC_18_BOLD)); + GFont const title_font = fonts_get_system_font(PBL_IF_RECT_ELSE( + FONT_KEY_GOTHIC_24_BOLD, selected ? FONT_KEY_GOTHIC_24_BOLD : FONT_KEY_GOTHIC_18_BOLD)); GFont const subtitle_font = fonts_get_system_font(FONT_KEY_GOTHIC_18); menu_cell_basic_draw_custom(ctx, cell_layer, title_font, node->name, NULL, NULL, subtitle_font, subtitle, bitmap, false, GTextOverflowModeTrailingEllipsis); @@ -102,13 +104,12 @@ static void draw_row_callback(GContext* ctx, const Layer *cell_layer, MenuIndex // Window callbacks static void prv_window_appear(Window *window) { - SettingsWatchfacesData* data = (SettingsWatchfacesData*)window_get_user_data(window); + SettingsWatchfacesData *data = (SettingsWatchfacesData *)window_get_user_data(window); // Select the currently active watchface: data->active_watchface_id = watchface_get_default_install_id(); - const uint16_t row = - app_menu_data_source_get_index_of_app_with_install_id(&data->data_source, - data->active_watchface_id); + const uint16_t row = app_menu_data_source_get_index_of_app_with_install_id( + &data->data_source, data->active_watchface_id); const bool animated = false; menu_layer_set_selected_index(&data->menu_layer, MenuIndex(0, row), MenuRowAlignCenter, animated); } @@ -121,34 +122,38 @@ static void prv_window_load(Window *window) { SettingsWatchfacesData *data = window_get_user_data(window); MenuLayer *menu_layer = &data->menu_layer; - const GRect menu_layer_frame = - PBL_IF_RECT_ELSE(window->layer.bounds, grect_inset_internal(window->layer.bounds, - 0, STATUS_BAR_LAYER_HEIGHT)); + const GRect menu_layer_frame = PBL_IF_RECT_ELSE( + window->layer.bounds, grect_inset_internal(window->layer.bounds, 0, STATUS_BAR_LAYER_HEIGHT)); menu_layer_init(menu_layer, &menu_layer_frame); - app_menu_data_source_init(&data->data_source, &(AppMenuDataSourceCallbacks) { - .changed = prv_reload_menu_data, - .filter = prv_app_filter_callback, - .transform_index = prv_transform_index, - }, &data->menu_layer); + app_menu_data_source_init(&data->data_source, + &(AppMenuDataSourceCallbacks){ + .changed = prv_reload_menu_data, + .filter = prv_app_filter_callback, + .transform_index = prv_transform_index, + }, + &data->menu_layer); app_menu_data_source_enable_icons(&data->data_source, RESOURCE_ID_MENU_LAYER_GENERIC_WATCHFACE_ICON); - menu_layer_set_callbacks(menu_layer, data, &(MenuLayerCallbacks) { + menu_layer_set_callbacks( + menu_layer, data, + &(MenuLayerCallbacks){ #if PBL_ROUND - .get_cell_height = (MenuLayerGetCellHeightCallback) get_cell_height_callback, + .get_cell_height = (MenuLayerGetCellHeightCallback)get_cell_height_callback, #endif - .get_num_rows = (MenuLayerGetNumberOfRowsInSectionsCallback) get_num_rows_callback, - .draw_row = (MenuLayerDrawRowCallback) draw_row_callback, - .select_click = (MenuLayerSelectCallback) select_callback, - }); + .get_num_rows = (MenuLayerGetNumberOfRowsInSectionsCallback)get_num_rows_callback, + .draw_row = (MenuLayerDrawRowCallback)draw_row_callback, + .select_click = (MenuLayerSelectCallback)select_callback, + }); menu_layer_set_highlight_colors(&data->menu_layer, - PBL_IF_COLOR_ELSE(GColorJazzberryJam, GColorBlack), - GColorWhite); + PBL_IF_COLOR_ELSE(GColorJazzberryJam, GColorBlack), GColorWhite); menu_layer_set_click_config_onto_window(menu_layer, window); menu_layer_set_scroll_wrap_around(menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&window->layer, menu_layer_get_layer(menu_layer)); } @@ -169,11 +174,11 @@ static void handle_init(void) { Window *window = &data->window; window_init(window, WINDOW_NAME("Watchfaces")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - .appear = prv_window_appear, - .unload = prv_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + .appear = prv_window_appear, + .unload = prv_window_unload, + }); const bool animated = true; app_window_stack_push(window, animated); } @@ -187,17 +192,18 @@ static void s_main(void) { app_event_loop(); } -const PebbleProcessMd* watchfaces_get_app_info() { +const PebbleProcessMd *watchfaces_get_app_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - .main_func = s_main, - // UUID: 18e443ce-38fd-47c8-84d5-6d0c775fbe55 - .uuid = {0x18, 0xe4, 0x43, 0xce, 0x38, 0xfd, 0x47, 0xc8, - 0x84, 0xd5, 0x6d, 0x0c, 0x77, 0x5f, 0xbe, 0x55}, - }, - .name = i18n_noop("Watchfaces"), - .icon_resource_id = RESOURCE_ID_WATCHFACES_APP_GLANCE, + .common = + { + .main_func = s_main, + // UUID: 18e443ce-38fd-47c8-84d5-6d0c775fbe55 + .uuid = + {0x18, 0xe4, 0x43, 0xce, 0x38, 0xfd, 0x47, 0xc8, 0x84, 0xd5, 0x6d, 0x0c, 0x77, + 0x5f, 0xbe, 0x55}, + }, + .name = i18n_noop("Watchfaces"), + .icon_resource_id = RESOURCE_ID_WATCHFACES_APP_GLANCE, }; - return (const PebbleProcessMd*) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } - diff --git a/src/fw/apps/system/watchfaces.h b/src/fw/apps/system/watchfaces.h index 64ba0b1f76..1142b67d5a 100644 --- a/src/fw/apps/system/watchfaces.h +++ b/src/fw/apps/system/watchfaces.h @@ -7,4 +7,4 @@ #define WATCHFACES_APP_COLOR_PRIMARY GColorJazzberryJam -const PebbleProcessMd* watchfaces_get_app_info(); +const PebbleProcessMd *watchfaces_get_app_info(); diff --git a/src/fw/apps/system/weather/clock_face.c b/src/fw/apps/system/weather/clock_face.c index 39090c3c2c..74a0598e60 100644 --- a/src/fw/apps/system/weather/clock_face.c +++ b/src/fw/apps/system/weather/clock_face.c @@ -7,13 +7,13 @@ #include "weather_math.h" #include "weather_types.h" #include "pebble_compat.h" -#include "pbl/services/clock.h" // clock_is_24h_style -#include "util/graphics.h" // raw_image_{get,set}_value_for_bitdepth +#include "pbl/services/clock.h" // clock_is_24h_style +#include "util/graphics.h" // raw_image_{get,set}_value_for_bitdepth #include // ---- Layout ---- -#define LOCATION_BAR_H 18 -#define LOCATION_BAR_Y PBL_IF_ROUND_ELSE(18, 0) +#define LOCATION_BAR_H 18 +#define LOCATION_BAR_Y PBL_IF_ROUND_ELSE(18, 0) #define LOCATION_BAR_TEXT_INSET PBL_IF_ROUND_ELSE(36, 0) #define ROUND_LOCATION_BAR_TEXT_INSET 50 #define ROUND_BAR_DEPTH 58 @@ -21,34 +21,34 @@ #define ROUND_BAR_Y_ADJUST -13 #define ROUND_TIME_TEXT_Y 2 #define ROUND_LOCATION_TEXT_Y 21 -#define MAX_DAYS 7 +#define MAX_DAYS 7 // One bitmap slot per drawable WeatherType enum value (0..8). -#define NUM_TYPE_SLOTS 9 +#define NUM_TYPE_SLOTS 9 // Geometry — tuned so 25×25 icons at the orbit don't clip the screen or the bar. #if PBL_DISPLAY_HEIGHT >= 200 - // Emery: 200×228 rect — oval to fill the screen - #define ICON_ORBIT_RX PBL_IF_ROUND_ELSE(100, 87) - #define ICON_ORBIT_RY PBL_IF_ROUND_ELSE(100, 94) +// Emery: 200×228 rect — oval to fill the screen +#define ICON_ORBIT_RX PBL_IF_ROUND_ELSE(100, 87) +#define ICON_ORBIT_RY PBL_IF_ROUND_ELSE(100, 94) #else - // Small displays. Chalk: 180x180 round. Flint/asterix: 144x168 rect - the - // oval hugs the screen edge minus the 25px icons. - #define ICON_ORBIT_RX PBL_IF_ROUND_ELSE(63, 58) - #define ICON_ORBIT_RY PBL_IF_ROUND_ELSE(63, 68) +// Small displays. Chalk: 180x180 round. Flint/asterix: 144x168 rect - the +// oval hugs the screen edge minus the 25px icons. +#define ICON_ORBIT_RX PBL_IF_ROUND_ELSE(63, 58) +#define ICON_ORBIT_RY PBL_IF_ROUND_ELSE(63, 68) #endif -#define ICON_SIZE 25 // Emery/native tiny weather bitmap size +#define ICON_SIZE 25 // Emery/native tiny weather bitmap size // Small rect (flint/asterix 144x168): r17 discs merge at this orbit's ~30px // neighbour spacing — shrink them to keep a visible gap. -#define CLOCK_SMALL_RECT (!PBL_ROUND && PBL_DISPLAY_HEIGHT < 200) -#define CLOCK_DISC_R (CLOCK_SMALL_RECT ? 13 : (ICON_SIZE * 7 / 10)) +#define CLOCK_SMALL_RECT (!PBL_ROUND && PBL_DISPLAY_HEIGHT < 200) +#define CLOCK_DISC_R (CLOCK_SMALL_RECT ? 13 : (ICON_SIZE * 7 / 10)) // Round clock icons draw 1:1 from the 25x25 TINY PNGs (CLOCK ids now map to TINY), // so the slot must be 25 to avoid the previous 50->30 crop. Emery uses ICON_SIZE. // Small rect: the 12-icon ring's orbit spacing is ~30px; with the BW discs // gone the bare 25px art of diagonal neighbours visually collides, so the // dial icons shrink to 20px at load (see prv_shrink_dial_icon). -#define CLOCK_ICON_SIZE PBL_IF_ROUND_ELSE(25, (CLOCK_SMALL_RECT ? 20 : ICON_SIZE)) -#define SWIPE_THRESHOLD 20 +#define CLOCK_ICON_SIZE PBL_IF_ROUND_ELSE(25, (CLOCK_SMALL_RECT ? 20 : ICON_SIZE)) +#define SWIPE_THRESHOLD 20 #define CLOCK_INTRO_DURATION_MS 520 // Rect: 50ms. ROUND (gabbro smoothness step 4): 66ms = exactly 2 animation-service ticks, // so every glow step lands ON a display frame instead of beating against the 33ms interval. @@ -66,61 +66,61 @@ // ---- State ---- typedef struct { - Window *window; - Layer *canvas; + Window *window; + Layer *canvas; WeatherLocationForecast days[MAX_DAYS]; - size_t num_days; - int day_index; // which day this clock represents (0 = today) - uint8_t hourly_types[24]; // WeatherType per hour 0-23 - bool hourly_valid; // true once hourly data received - GBitmap *type_bitmaps[NUM_TYPE_SLOTS]; // one loaded bitmap per unique WeatherType - GFont bar_font; - GFont temp_font; - GBitmap *temp_text_bmp; // captured once at full size; NULL = not yet captured - GSize temp_text_full_sz; // pixel dimensions of the captured bitmap - int16_t temp_text_cx; // x pixel of the text visual centre within the bitmap - int16_t temp_text_cy; // y pixel of the text visual centre within the bitmap - AnimationProgress anim_progress; // intro animation progress (0 → ANIMATION_NORMALIZED_MAX) - Animation *intro_anim; - bool skip_intro_animation; + size_t num_days; + int day_index; // which day this clock represents (0 = today) + uint8_t hourly_types[24]; // WeatherType per hour 0-23 + bool hourly_valid; // true once hourly data received + GBitmap *type_bitmaps[NUM_TYPE_SLOTS]; // one loaded bitmap per unique WeatherType + GFont bar_font; + GFont temp_font; + GBitmap *temp_text_bmp; // captured once at full size; NULL = not yet captured + GSize temp_text_full_sz; // pixel dimensions of the captured bitmap + int16_t temp_text_cx; // x pixel of the text visual centre within the bitmap + int16_t temp_text_cy; // y pixel of the text visual centre within the bitmap + AnimationProgress anim_progress; // intro animation progress (0 → ANIMATION_NORMALIZED_MAX) + Animation *intro_anim; + bool skip_intro_animation; AppTimer *glow_timer; #if PBL_ROUND - Animation *glow_drv; // frame-coalesced glow driver (see prv_glow_drv_*); the 50ms - uint32_t glow_drv_last_ms; // cadence survives as quanta inside the service tick - uint32_t glow_drv_acc_ms; + Animation *glow_drv; // frame-coalesced glow driver (see prv_glow_drv_*); the 50ms + uint32_t glow_drv_last_ms; // cadence survives as quanta inside the service tick + uint32_t glow_drv_acc_ms; #endif uint32_t glow_phase; uint16_t glow_idle_ticks; // ---- Temperature reveal (tap) ---- - int8_t hourly_temps[24]; // temperature per hour 0-23 - bool hourly_temps_valid; + int8_t hourly_temps[24]; // temperature per hour 0-23 + bool hourly_temps_valid; // TOMORROW's hourly series (v4 minor 5) — feeds the dial's post-midnight // positions on day 0 (abs hours 24-47). - uint8_t tomorrow_types[24]; - int8_t tomorrow_temps[24]; - bool tomorrow_hourly_valid; - bool temps_shown; // stable state: true once temps are fully revealed - bool reveal_to; // animation target state (true=reveal, false=hide) - bool reveal_active; // true while reveal/hide animation is in progress + uint8_t tomorrow_types[24]; + int8_t tomorrow_temps[24]; + bool tomorrow_hourly_valid; + bool temps_shown; // stable state: true once temps are fully revealed + bool reveal_to; // animation target state (true=reveal, false=hide) + bool reveal_active; // true while reveal/hide animation is in progress AnimationProgress reveal_p; - Animation *reveal_anim; + Animation *reveal_anim; #ifdef CONFIG_TOUCH - int16_t touch_start_x; - int16_t touch_start_y; - bool touch_active; - bool touch_started_during_intro; + int16_t touch_start_x; + int16_t touch_start_y; + bool touch_active; + bool touch_started_during_intro; #endif // ---- UP → forecast: whole-screen Timeline squash-stretch exit ---- // The clock is captured each frame and jelly-stretched down off the bottom (two moook edges: // the bottom leads, the top trails — the bitmap analogue of scale_segmented's per-point lag). // BOTH shapes: weather_render_squash is chord-clamped, so round drives the same mode. - AnimationProgress fwd_exit_p; // 0 → MAX - Animation *fwd_exit_anim; - bool fwd_exit_active; - bool fwd_captured; // ROUND capture-once: snapshot filled — later frames skip - // the clock render + fb copy and only resample (step 2) - AppTimer *fwd_push_timer; // 0ms timer → hand off to the forecast once fully off-top - uint8_t *fwd_scratch; // full-screen snapshot we re-sample while overwriting the fb + AnimationProgress fwd_exit_p; // 0 → MAX + Animation *fwd_exit_anim; + bool fwd_exit_active; + bool fwd_captured; // ROUND capture-once: snapshot filled — later frames skip + // the clock render + fb copy and only resample (step 2) + AppTimer *fwd_push_timer; // 0ms timer → hand off to the forecast once fully off-top + uint8_t *fwd_scratch; // full-screen snapshot we re-sample while overwriting the fb } ClockFaceData; static ClockFaceData *s_cf; @@ -139,13 +139,12 @@ void clock_face_reset(void) { #define prv_bg_color_for_type weather_type_bg_color #if CLOCK_SMALL_RECT - // 50px source art — downscaled to 20px at load (see prv_shrink_dial_icon). - #define prv_icon_res weather_type_icon_small_resource +// 50px source art — downscaled to 20px at load (see prv_shrink_dial_icon). +#define prv_icon_res weather_type_icon_small_resource #else - #define prv_icon_res weather_type_icon_tiny_resource +#define prv_icon_res weather_type_icon_tiny_resource #endif - #if CLOCK_SMALL_RECT // Shrink the 50px SMALL icon to CLOCK_ICON_SIZE by box sampling with a dark // threshold: a destination pixel inks when >=30% of the source pixels it @@ -153,42 +152,58 @@ void clock_face_reset(void) { // vanish or merge); the 50px art gives each destination pixel a 2-3px box to // vote from, which keeps the strokes one pixel and clean. static GBitmap *prv_shrink_dial_icon(GBitmap *src) { - if (!src) return NULL; + if (!src) + return NULL; const GBitmapFormat fmt = gbitmap_get_format(src); uint8_t bpp; uint32_t entries; switch (fmt) { - case GBitmapFormat1BitPalette: bpp = 1; entries = 2; break; - case GBitmapFormat2BitPalette: bpp = 2; entries = 4; break; - case GBitmapFormat4BitPalette: bpp = 4; entries = 16; break; - default: return src; // unexpected format — draw at native size + case GBitmapFormat1BitPalette: + bpp = 1; + entries = 2; + break; + case GBitmapFormat2BitPalette: + bpp = 2; + entries = 4; + break; + case GBitmapFormat4BitPalette: + bpp = 4; + entries = 16; + break; + default: + return src; // unexpected format — draw at native size } const GRect sb = gbitmap_get_bounds(src); const int dw = CLOCK_ICON_SIZE; GColor *src_pal = gbitmap_get_palette(src); - if (!src_pal || sb.size.w <= dw) return src; + if (!src_pal || sb.size.w <= dw) + return src; // Rank each palette entry once: 0 transparent, 1 light, 2 ink. The 50px art // carries gray shading; anything that quantizes to the dark half is ink. - uint8_t rank[16] = { 0 }; + uint8_t rank[16] = {0}; for (uint32_t i = 0; i < entries; i++) { - if (!src_pal[i].a) continue; + if (!src_pal[i].a) + continue; const GColor8 gray = gcolor_get_grayscale(src_pal[i]); - rank[i] = (gcolor_equal(gray, GColorBlack) || gcolor_equal(gray, GColorDarkGray)) - ? 2 : 1; + rank[i] = (gcolor_equal(gray, GColorBlack) || gcolor_equal(gray, GColorDarkGray)) ? 2 : 1; } // The destination palette is purified to pure black/white: mid-gray fills // would dither on 1-bit and turn the shrunken icons into mush. GColor *pal = malloc(entries * sizeof(GColor)); - if (!pal) return src; + if (!pal) + return src; for (uint32_t i = 0; i < entries; i++) { - if (rank[i] == 2) pal[i] = GColorBlack; - else if (rank[i] == 1) pal[i] = GColorWhite; - else pal[i] = src_pal[i]; // keep transparency + if (rank[i] == 2) + pal[i] = GColorBlack; + else if (rank[i] == 1) + pal[i] = GColorWhite; + else + pal[i] = src_pal[i]; // keep transparency } - GBitmap *dst = gbitmap_create_blank_with_palette(GSize(dw, dw), fmt, pal, - true /* free palette */); + GBitmap *dst = + gbitmap_create_blank_with_palette(GSize(dw, dw), fmt, pal, true /* free palette */); if (!dst) { free(pal); return src; @@ -202,13 +217,16 @@ static GBitmap *prv_shrink_dial_icon(GBitmap *src) { // Canonical palette index per rank (first dark / light / transparent entry). int dark_i = -1, light_i = -1, trans_i = -1; for (uint32_t i = 0; i < entries; i++) { - if (rank[i] == 2 && dark_i < 0) dark_i = (int)i; - if (rank[i] == 1 && light_i < 0) light_i = (int)i; - if (rank[i] == 0 && trans_i < 0) trans_i = (int)i; + if (rank[i] == 2 && dark_i < 0) + dark_i = (int)i; + if (rank[i] == 1 && light_i < 0) + light_i = (int)i; + if (rank[i] == 0 && trans_i < 0) + trans_i = (int)i; } for (int y = 0; y < dw; y++) { const int sy0 = y * sh / dw; - const int sy1 = ((y + 1) * sh + dw - 1) / dw; // exclusive, >= sy0+1 + const int sy1 = ((y + 1) * sh + dw - 1) / dw; // exclusive, >= sy0+1 for (int x = 0; x < dw; x++) { const int sx0 = x * sw / dw; const int sx1 = ((x + 1) * sw + dw - 1) / dw; @@ -216,11 +234,12 @@ static GBitmap *prv_shrink_dial_icon(GBitmap *src) { for (int sy = sy0; sy < sy1 && sy < sh; sy++) { for (int sx = sx0; sx < sx1 && sx < sw; sx++) { const uint8_t ci = raw_image_get_value_for_bitdepth( - sdata, (uint32_t)(sb.origin.x + sx), (uint32_t)(sb.origin.y + sy), - sstride, bpp); + sdata, (uint32_t)(sb.origin.x + sx), (uint32_t)(sb.origin.y + sy), sstride, bpp); n_total++; - if (rank[ci] == 2) n_dark++; - else if (rank[ci] == 1) n_light++; + if (rank[ci] == 2) + n_dark++; + else if (rank[ci] == 1) + n_light++; } } int pick = trans_i; @@ -229,9 +248,10 @@ static GBitmap *prv_shrink_dial_icon(GBitmap *src) { } else if (light_i >= 0 && n_light * 2 > n_total) { pick = light_i; } - if (pick < 0) pick = 0; - raw_image_set_value_for_bitdepth(ddata, (uint32_t)x, (uint32_t)y, dstride, - bpp, (uint8_t)pick); + if (pick < 0) + pick = 0; + raw_image_set_value_for_bitdepth(ddata, (uint32_t)x, (uint32_t)y, dstride, bpp, + (uint8_t)pick); } } gbitmap_destroy(src); @@ -241,7 +261,8 @@ static GBitmap *prv_shrink_dial_icon(GBitmap *src) { // Load the tiny bitmap set once; the clock reuses these during animations. static void prv_load_bitmaps(void) { - if (!s_cf) return; + if (!s_cf) + return; for (int i = 0; i < NUM_TYPE_SLOTS; i++) { if (s_cf->type_bitmaps[i]) { gbitmap_destroy(s_cf->type_bitmaps[i]); @@ -253,7 +274,7 @@ static void prv_load_bitmaps(void) { // flips re-push). Every consumer clamps out-of-range bytes to Generic, so // the used-set applies the same clamp, and Generic is ALWAYS loaded (it is // also the NULL-slot fallback at draw time). A few KB of session heap back. - bool used[NUM_TYPE_SLOTS] = { false }; + bool used[NUM_TYPE_SLOTS] = {false}; used[WeatherType_Generic] = true; for (size_t i = 0; i < s_cf->num_days; i++) { uint8_t wt = (uint8_t)s_cf->days[i].current_weather_type; @@ -273,8 +294,7 @@ static void prv_load_bitmaps(void) { } for (int i = WeatherType_PartlyCloudy; i <= WeatherType_RainAndSnow; i++) { if (used[i]) { - s_cf->type_bitmaps[i] = - gbitmap_create_with_resource(prv_icon_res((WeatherType)i)); + s_cf->type_bitmaps[i] = gbitmap_create_with_resource(prv_icon_res((WeatherType)i)); #if CLOCK_SMALL_RECT s_cf->type_bitmaps[i] = prv_shrink_dial_icon(s_cf->type_bitmaps[i]); #endif @@ -285,8 +305,10 @@ static void prv_load_bitmaps(void) { // One 50ms quantum of glow animation. Returns false when the driver should stop (covered, // or idle wrap complete). static bool prv_glow_step(void) { - if (!s_cf || !s_cf->window || window_stack_get_top_window() != s_cf->window) return false; - if (s_cf->glow_idle_ticks >= CLOCK_GLOW_IDLE_TICKS + WEATHER_GLOW_WRAP_TICKS) return false; + if (!s_cf || !s_cf->window || window_stack_get_top_window() != s_cf->window) + return false; + if (s_cf->glow_idle_ticks >= CLOCK_GLOW_IDLE_TICKS + WEATHER_GLOW_WRAP_TICKS) + return false; bool transition_busy = s_cf->anim_progress < ANIMATION_NORMALIZED_MAX; if (!transition_busy) { @@ -298,29 +320,29 @@ static bool prv_glow_step(void) { (uint32_t)TRIG_MAX_ANGLE; } else { s_cf->glow_phase = - (s_cf->glow_phase + (uint32_t)(TRIG_MAX_ANGLE / 6)) % - (uint32_t)TRIG_MAX_ANGLE; + (s_cf->glow_phase + (uint32_t)(TRIG_MAX_ANGLE / 6)) % (uint32_t)TRIG_MAX_ANGLE; } s_cf->glow_idle_ticks++; } - if (s_cf->canvas) layer_mark_dirty(s_cf->canvas); + if (s_cf->canvas) + layer_mark_dirty(s_cf->canvas); return true; } #if !PBL_ROUND static void prv_clock_glow_timer_callback(void *context) { (void)context; - if (s_cf) s_cf->glow_timer = NULL; + if (s_cf) + s_cf->glow_timer = NULL; if (prv_glow_step()) { - s_cf->glow_timer = app_timer_register(CLOCK_GLOW_TIMER_MS, - prv_clock_glow_timer_callback, NULL); + s_cf->glow_timer = app_timer_register(CLOCK_GLOW_TIMER_MS, prv_clock_glow_timer_callback, NULL); } } static void prv_start_clock_glow(void) { - if (!s_cf || s_cf->glow_timer) return; - s_cf->glow_timer = app_timer_register(CLOCK_GLOW_TIMER_MS, - prv_clock_glow_timer_callback, NULL); + if (!s_cf || s_cf->glow_timer) + return; + s_cf->glow_timer = app_timer_register(CLOCK_GLOW_TIMER_MS, prv_clock_glow_timer_callback, NULL); } #else // Frame-coalesced glow (gabbro): same INFINITE-animation pattern as the forecast icon driver — @@ -328,12 +350,13 @@ static void prv_start_clock_glow(void) { // while the intro/reveal animations run. (Free-running 50ms beat against the 33ms service and // the ~20-25ms display period read as judder; see the display research.) static uint32_t prv_glow_now_ms(void) { - time_t s = 0; uint16_t ms = 0; + time_t s = 0; + uint16_t ms = 0; time_ms(&s, &ms); return (uint32_t)s * 1000u + ms; } -static void prv_glow_drv_stop_cb(void *context) { // 0ms hop: never unschedule inside .update +static void prv_glow_drv_stop_cb(void *context) { // 0ms hop: never unschedule inside .update (void)context; if (s_cf && s_cf->glow_drv) { Animation *a = s_cf->glow_drv; @@ -344,39 +367,47 @@ static void prv_glow_drv_stop_cb(void *context) { // 0ms hop: never unschedule } static void prv_glow_drv_update(Animation *anim, AnimationProgress p) { - (void)anim; (void)p; - if (!s_cf) return; + (void)anim; + (void)p; + if (!s_cf) + return; const uint32_t now = prv_glow_now_ms(); uint32_t dt = now - s_cf->glow_drv_last_ms; s_cf->glow_drv_last_ms = now; - if (dt > 500) dt = 500; + if (dt > 500) + dt = 500; s_cf->glow_drv_acc_ms += dt; bool alive = true; while (alive && s_cf->glow_drv_acc_ms >= CLOCK_GLOW_TIMER_MS) { s_cf->glow_drv_acc_ms -= CLOCK_GLOW_TIMER_MS; alive = prv_glow_step(); } - if (!alive) app_timer_register(0, prv_glow_drv_stop_cb, NULL); + if (!alive) + app_timer_register(0, prv_glow_drv_stop_cb, NULL); } -static const AnimationImplementation s_glow_drv_impl = { .update = prv_glow_drv_update }; +static const AnimationImplementation s_glow_drv_impl = {.update = prv_glow_drv_update}; static void prv_start_clock_glow(void) { - if (!s_cf || s_cf->glow_drv) return; + if (!s_cf || s_cf->glow_drv) + return; Animation *a = animation_create(); - if (!a) return; + if (!a) + return; animation_set_duration(a, ANIMATION_DURATION_INFINITE); animation_set_implementation(a, &s_glow_drv_impl); s_cf->glow_drv_last_ms = prv_glow_now_ms(); - s_cf->glow_drv_acc_ms = 0; + s_cf->glow_drv_acc_ms = 0; s_cf->glow_drv = a; animation_schedule(a); } #endif static void prv_note_clock_interaction(void) { - if (!s_cf) return; + if (!s_cf) + return; s_cf->glow_idle_ticks = 0; - if (s_cf->canvas) layer_mark_dirty(s_cf->canvas); + if (s_cf->canvas) + layer_mark_dirty(s_cf->canvas); prv_start_clock_glow(); } @@ -392,7 +423,7 @@ static void prv_note_clock_interaction(void) { static int prv_cur_hour(void) { static time_t cached_now; static int cached_hour = -1; - time_t now = time(NULL); // rtc read — cheap, unlike localtime + time_t now = time(NULL); // rtc read — cheap, unlike localtime if (now != cached_now || cached_hour < 0) { cached_now = now; cached_hour = localtime(&now)->tm_hour; @@ -415,15 +446,17 @@ static int prv_abs_hour_for_pos(int pos_1_to_12) { // tonight's forecast — lookups must bounds-check instead. for (int i = 0; i <= 11; i++) { int h = cur_h + i; - if (h % 12 == target_mod) return h; + if (h % 12 == target_mod) + return h; } - return pos_1_to_12 % 12; // unreachable + return pos_1_to_12 % 12; // unreachable } // Map a clock-face hour position (1-12) to the WeatherType for that hour. // Uses real hourly data if available, otherwise falls back to daily forecast. static WeatherType prv_type_for_pos(int pos_1_to_12) { - if (!s_cf) return WeatherType_Unknown; + if (!s_cf) + return WeatherType_Unknown; int abs_hour = prv_abs_hour_for_pos(pos_1_to_12); if (s_cf->hourly_valid && abs_hour >= 0 && abs_hour < 24) { return (WeatherType)s_cf->hourly_types[abs_hour]; @@ -432,10 +465,12 @@ static WeatherType prv_type_for_pos(int pos_1_to_12) { // carries it (v4 minor 5); the daily-type fallback below covers its absence. if (abs_hour >= 24 && abs_hour < 48 && s_cf->tomorrow_hourly_valid) { const uint8_t wt = s_cf->tomorrow_types[abs_hour - 24]; - if (wt <= WeatherType_RainAndSnow) return (WeatherType)wt; + if (wt <= WeatherType_RainAndSnow) + return (WeatherType)wt; } // Fallback: daily - if (s_cf->num_days == 0) return WeatherType_Unknown; + if (s_cf->num_days == 0) + return WeatherType_Unknown; if (abs_hour >= 24 && s_cf->num_days > 1) { // Past midnight — the hourly series covers today only, so use tomorrow's // daily type for tonight's small hours. @@ -447,13 +482,15 @@ static WeatherType prv_type_for_pos(int pos_1_to_12) { // Map a clock-face hour position (1-12) to the temperature for that hour. // Returns true and fills *out_temp if hourly temperature data is available. static bool prv_temp_for_pos(int pos_1_to_12, int *out_temp) { - if (!s_cf) return false; + if (!s_cf) + return false; int abs_hour = prv_abs_hour_for_pos(pos_1_to_12); if (abs_hour >= 24 && abs_hour < 48 && s_cf->tomorrow_hourly_valid) { - *out_temp = (int)s_cf->tomorrow_temps[abs_hour - 24]; // v4 minor 5 + *out_temp = (int)s_cf->tomorrow_temps[abs_hour - 24]; // v4 minor 5 return true; } - if (!s_cf->hourly_temps_valid || abs_hour < 0 || abs_hour >= 24) return false; + if (!s_cf->hourly_temps_valid || abs_hour < 0 || abs_hour >= 24) + return false; *out_temp = (int)s_cf->hourly_temps[abs_hour]; return true; } @@ -465,9 +502,11 @@ static int prv_reveal_rp(AnimationProgress reveal_t, int pos) { int32_t item_dur = ANIMATION_NORMALIZED_MAX * 45 / 100; int32_t stagger = (ANIMATION_NORMALIZED_MAX - item_dur) / 11; int32_t local = (int32_t)reveal_t - rank * stagger; - if (local <= 0) return 0; + if (local <= 0) + return 0; int32_t rp = weather_scale_i32(local, ANIMATION_NORMALIZED_MAX, item_dur); - if (rp > ANIMATION_NORMALIZED_MAX) rp = ANIMATION_NORMALIZED_MAX; + if (rp > ANIMATION_NORMALIZED_MAX) + rp = ANIMATION_NORMALIZED_MAX; return (int)rp; } @@ -479,10 +518,11 @@ static void prv_intro_update(Animation *anim, AnimationProgress progress) { progress = ANIMATION_NORMALIZED_MAX; } s_cf->anim_progress = progress; - if (s_cf->canvas) layer_mark_dirty(s_cf->canvas); + if (s_cf->canvas) + layer_mark_dirty(s_cf->canvas); } } -static const AnimationImplementation s_intro_impl = { .update = prv_intro_update }; +static const AnimationImplementation s_intro_impl = {.update = prv_intro_update}; // ---- (Removed) clock -> detail_face exit/return animation ---- // The full-screen weather detail view (temperature + UV/rain + location + last-updated) was made @@ -491,22 +531,27 @@ static const AnimationImplementation s_intro_impl = { .update = prv_intro_update // ---- Temperature reveal animation (tap) ---- static void prv_reveal_update(Animation *anim, AnimationProgress progress) { - if (!s_cf) return; + if (!s_cf) + return; s_cf->reveal_p = progress; if (progress >= ANIMATION_NORMALIZED_MAX) { s_cf->reveal_active = false; s_cf->temps_shown = s_cf->reveal_to; } - if (s_cf->canvas) layer_mark_dirty(s_cf->canvas); + if (s_cf->canvas) + layer_mark_dirty(s_cf->canvas); } -static const AnimationImplementation s_reveal_impl = { .update = prv_reveal_update }; +static const AnimationImplementation s_reveal_impl = {.update = prv_reveal_update}; // Toggle the per-hour temperature reveal. Each tap flips between showing the // weather bitmaps and showing the temperature bubbles. static void prv_toggle_temp_reveal(void) { - if (!s_cf || !s_cf->hourly_temps_valid) return; - if (s_cf->reveal_active) return; // ignore taps until the current reveal/hide cycle finishes - if (s_cf->anim_progress < ANIMATION_NORMALIZED_MAX) return; // wait for intro to finish + if (!s_cf || !s_cf->hourly_temps_valid) + return; + if (s_cf->reveal_active) + return; // ignore taps until the current reveal/hide cycle finishes + if (s_cf->anim_progress < ANIMATION_NORMALIZED_MAX) + return; // wait for intro to finish s_cf->reveal_to = !s_cf->temps_shown; s_cf->reveal_active = true; s_cf->reveal_p = 0; @@ -522,7 +567,8 @@ static void prv_toggle_temp_reveal(void) { } static void prv_play_animation(void) { - if (!s_cf) return; + if (!s_cf) + return; if (s_cf->intro_anim) { animation_unschedule(s_cf->intro_anim); animation_destroy(s_cf->intro_anim); @@ -544,7 +590,8 @@ static void prv_play_animation(void) { // ---- Draw proc ---- static int32_t prv_clock_intro_motion_progress(AnimationProgress progress) { const int32_t max = ANIMATION_NORMALIZED_MAX; - if ((int32_t)progress >= max) return max; + if ((int32_t)progress >= max) + return max; const int32_t overshoot = max / 34; const int32_t rebound = max / 135; @@ -557,18 +604,17 @@ static int32_t prv_clock_intro_motion_progress(AnimationProgress progress) { if ((int32_t)progress < settle) { return max + overshoot - - weather_scale_i32((int32_t)progress - hit, overshoot + rebound, - settle - hit); + weather_scale_i32((int32_t)progress - hit, overshoot + rebound, settle - hit); } - return max - rebound + - weather_scale_i32((int32_t)progress - settle, rebound, max - settle); + return max - rebound + weather_scale_i32((int32_t)progress - settle, rebound, max - settle); } static int32_t prv_clock_center_scale_progress(AnimationProgress progress) { const int32_t max = ANIMATION_NORMALIZED_MAX; - if ((int32_t)progress >= max) return max; - const int32_t min_scale = max / 40; // start from a point — blooms straight out of the dot + if ((int32_t)progress >= max) + return max; + const int32_t min_scale = max / 40; // start from a point — blooms straight out of the dot // Clean ease-out from the point to full size. No overshoot/settle phase (that tail wobble was // dropping the centre temperature for a frame). const int32_t q = max - (int32_t)progress; @@ -585,9 +631,9 @@ static int32_t prv_clock_center_scale_progress(AnimationProgress progress) { // the glass. The scratch is W*H (round 260x260 = 67,600B vs rect 200x228 = 45,600B); the // malloc_try fallback below degrades to an instant return if the app heap can't take it. static void prv_render_fwd_squash(GContext *ctx) { - if (!s_cf || !s_cf->fwd_scratch) return; - weather_render_squash(ctx, s_cf->fwd_scratch, s_cf->fwd_exit_p, - WEATHER_SQUASH_CLOCK_EXIT); + if (!s_cf || !s_cf->fwd_scratch) + return; + weather_render_squash(ctx, s_cf->fwd_scratch, s_cf->fwd_exit_p, WEATHER_SQUASH_CLOCK_EXIT); #if PBL_ROUND // Capture-once (gabbro smoothness step 2): the snapshot now holds the fully-drawn // clock — from the next frame prv_canvas_draw short-circuits to resample-only. @@ -597,33 +643,42 @@ static void prv_render_fwd_squash(GContext *ctx) { static void prv_fwd_exit_push_callback(void *ctx); static void prv_fwd_exit_update(Animation *anim, AnimationProgress progress) { - if (!s_cf) return; + if (!s_cf) + return; s_cf->fwd_exit_p = progress; - if (s_cf->canvas) layer_mark_dirty(s_cf->canvas); + if (s_cf->canvas) + layer_mark_dirty(s_cf->canvas); if (progress >= ANIMATION_NORMALIZED_MAX && !s_cf->fwd_push_timer) { s_cf->fwd_push_timer = app_timer_register(0, prv_fwd_exit_push_callback, NULL); } } -static const AnimationImplementation s_fwd_exit_impl = { .update = prv_fwd_exit_update }; +static const AnimationImplementation s_fwd_exit_impl = {.update = prv_fwd_exit_update}; static void prv_fwd_exit_push_callback(void *ctx) { - if (!s_cf) return; + if (!s_cf) + return; s_cf->fwd_push_timer = NULL; - if (s_cf->fwd_scratch) { free(s_cf->fwd_scratch); s_cf->fwd_scratch = NULL; } + if (s_cf->fwd_scratch) { + free(s_cf->fwd_scratch); + s_cf->fwd_scratch = NULL; + } // Hand off to weather.c, which dismisses this clock and jelly-rises the forecast back in. - if (s_wrap_callback) s_wrap_callback(s_wrap_context); + if (s_wrap_callback) + s_wrap_callback(s_wrap_context); } static void prv_start_fwd_exit_animation(void) { - if (!s_cf || s_cf->fwd_exit_active || !s_cf->canvas) return; + if (!s_cf || s_cf->fwd_exit_active || !s_cf->canvas) + return; GRect bounds = layer_get_bounds(s_cf->canvas); s_cf->fwd_scratch = malloc_try((size_t)bounds.size.w * (size_t)bounds.size.h); - if (!s_cf->fwd_scratch) { // out of heap: fall back to an instant return - if (s_wrap_callback) s_wrap_callback(s_wrap_context); + if (!s_cf->fwd_scratch) { // out of heap: fall back to an instant return + if (s_wrap_callback) + s_wrap_callback(s_wrap_context); return; } s_cf->fwd_exit_active = true; - s_cf->fwd_captured = false; // round capture-once: fresh exit, fresh snapshot + s_cf->fwd_captured = false; // round capture-once: fresh exit, fresh snapshot s_cf->fwd_exit_p = 0; if (s_cf->fwd_exit_anim) { animation_unschedule(s_cf->fwd_exit_anim); @@ -646,7 +701,8 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { return; } #else - if (!s_cf) return; + if (!s_cf) + return; #endif #if PBL_ROUND // Capture-once (gabbro smoothness step 2): during the UP-to-forecast squash the clock @@ -677,18 +733,18 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { bool anim_done = (p >= ANIMATION_NORMALIZED_MAX); // Temperature reveal (tap) state — engaged once the intro has finished and the // temperatures are showing. - bool reveal_engaged = s_cf->hourly_temps_valid && anim_done && - (s_cf->temps_shown || s_cf->reveal_active); + bool reveal_engaged = + s_cf->hourly_temps_valid && anim_done && (s_cf->temps_shown || s_cf->reveal_active); AnimationProgress reveal_t = 0; if (reveal_engaged) { - reveal_t = s_cf->reveal_active - ? (s_cf->reveal_to ? s_cf->reveal_p - : (ANIMATION_NORMALIZED_MAX - s_cf->reveal_p)) - : ANIMATION_NORMALIZED_MAX; + reveal_t = s_cf->reveal_active ? (s_cf->reveal_to ? s_cf->reveal_p + : (ANIMATION_NORMALIZED_MAX - s_cf->reveal_p)) + : ANIMATION_NORMALIZED_MAX; } // Clockwise spin: icons start 90° counter-clockwise from target, sweep clockwise to land - int32_t angle_offset = -(int32_t)(TRIG_MAX_ANGLE / 4) - * (int32_t)(ANIMATION_NORMALIZED_MAX - intro_p) / (int32_t)ANIMATION_NORMALIZED_MAX; + int32_t angle_offset = -(int32_t)(TRIG_MAX_ANGLE / 4) * + (int32_t)(ANIMATION_NORMALIZED_MAX - intro_p) / + (int32_t)ANIMATION_NORMALIZED_MAX; // Current hour — the dial highlights the CURRENT hour's position ("now"). int cur_h24 = prv_cur_hour(); @@ -706,8 +762,8 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { // (rx 87 + 12.5 = 199.5 on emery's 200px). NOT on small rect: its dial // icons are 20px and fit at the true orbit — the leftover nudge made the // ring visibly lopsided and starved the pill's lane at 3/9. - int nudge = (CLOCK_SMALL_RECT || PBL_IF_ROUND_ELSE(1, 0)) - ? 0 : ((pos == 3 || pos == 9) ? 7 : 0); + int nudge = + (CLOCK_SMALL_RECT || PBL_IF_ROUND_ELSE(1, 0)) ? 0 : ((pos == 3 || pos == 9) ? 7 : 0); int orbit_rx = ((int)(ICON_ORBIT_RX - nudge) * (int)intro_p / (int)ANIMATION_NORMALIZED_MAX); int orbit_ry = ((int)ICON_ORBIT_RY * (int)intro_p / (int)ANIMATION_NORMALIZED_MAX); int ix = cx + (int)((int32_t)sin_lookup(angle) * orbit_rx / TRIG_MAX_RATIO); @@ -717,14 +773,13 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { int idx = (wt <= WeatherType_RainAndSnow) ? (int)wt : (int)WeatherType_Generic; int full_r = CLOCK_DISC_R; - int circle_r = anim_done ? full_r - : 2 + (int)((full_r - 2) * (int)intro_p / (int)ANIMATION_NORMALIZED_MAX); + int circle_r = + anim_done ? full_r : 2 + (int)((full_r - 2) * (int)intro_p / (int)ANIMATION_NORMALIZED_MAX); - icon_xs[pos-1] = ix; - icon_ys[pos-1] = iy; - icon_bmps[pos-1] = s_cf->type_bitmaps[idx] - ? s_cf->type_bitmaps[idx] - : s_cf->type_bitmaps[WeatherType_Generic]; + icon_xs[pos - 1] = ix; + icon_ys[pos - 1] = iy; + icon_bmps[pos - 1] = + s_cf->type_bitmaps[idx] ? s_cf->type_bitmaps[idx] : s_cf->type_bitmaps[WeatherType_Generic]; if (reveal_engaged) { // Per-hour temperature reveal: each circle flips clockwise from a coloured @@ -733,16 +788,16 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { // Pinch the circle as it flips: full size at the ends, half size at the // midpoint where the content swaps. int32_t mag = (rp <= ANIMATION_NORMALIZED_MAX / 2) - ? (ANIMATION_NORMALIZED_MAX - 2 * rp) // 1 → 0 - : (2 * rp - ANIMATION_NORMALIZED_MAX); // 0 → 1 - int rr = full_r - weather_scale_i32(ANIMATION_NORMALIZED_MAX - mag, - full_r / 2, + ? (ANIMATION_NORMALIZED_MAX - 2 * rp) // 1 → 0 + : (2 * rp - ANIMATION_NORMALIZED_MAX); // 0 → 1 + int rr = full_r - weather_scale_i32(ANIMATION_NORMALIZED_MAX - mag, full_r / 2, ANIMATION_NORMALIZED_MAX); bool show_temp_side = (rp >= ANIMATION_NORMALIZED_MAX / 2); bool show_temp_text = (rp >= ANIMATION_NORMALIZED_MAX * 76 / 100); - bool show_icon = (rp <= ANIMATION_NORMALIZED_MAX * 24 / 100); + bool show_icon = (rp <= ANIMATION_NORMALIZED_MAX * 24 / 100); - if (rr < 1) continue; // fully shrunk — nothing to draw + if (rr < 1) + continue; // fully shrunk — nothing to draw graphics_context_set_compositing_mode(ctx, GCompOpAssign); if (show_temp_side) { @@ -750,8 +805,7 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { graphics_fill_circle(ctx, GPoint(ix, iy), rr); // Colour: soft grey outline. BW: strokes cannot dither (LightGray // maps to White and vanishes) — solid black is the only visible ring. - graphics_context_set_stroke_color(ctx, - PBL_IF_BW_ELSE(GColorBlack, GColorLightGray)); + graphics_context_set_stroke_color(ctx, PBL_IF_BW_ELSE(GColorBlack, GColorLightGray)); graphics_context_set_stroke_width(ctx, 1); graphics_draw_circle(ctx, GPoint(ix, iy), rr); } else { @@ -765,12 +819,12 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { // Content: weather bitmap before the flip, temperature after — hidden during // the pinch so it never pokes outside the shrinking circle. if (show_icon) { - GBitmap *bmp = icon_bmps[pos-1]; + GBitmap *bmp = icon_bmps[pos - 1]; if (bmp) { weather_icon_draw(ctx, bmp, - GRect(ix - CLOCK_ICON_SIZE / 2, iy - CLOCK_ICON_SIZE / 2, - CLOCK_ICON_SIZE, CLOCK_ICON_SIZE), - false /* no dark grounds on this screen */); + GRect(ix - CLOCK_ICON_SIZE / 2, iy - CLOCK_ICON_SIZE / 2, + CLOCK_ICON_SIZE, CLOCK_ICON_SIZE), + false /* no dark grounds on this screen */); } } else if (show_temp_text) { int temp; @@ -779,27 +833,27 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { // right without shifting the number's centring. char nbuf[6]; snprintf(nbuf, sizeof(nbuf), "%d", temp); - static GFont tfont; // stable system handle — don't re-look-up per icon per frame - if (!tfont) tfont = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); + static GFont tfont; // stable system handle — don't re-look-up per icon per frame + if (!tfont) + tfont = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); GSize nsz = graphics_text_layout_get_content_size( - nbuf, tfont, GRect(0, 0, 40, 18), - GTextOverflowModeFill, GTextAlignmentCenter); + nbuf, tfont, GRect(0, 0, 40, 18), GTextOverflowModeFill, GTextAlignmentCenter); graphics_context_set_text_color(ctx, GColorBlack); - graphics_draw_text(ctx, nbuf, tfont, - GRect(ix - nsz.w / 2, iy - 11, nsz.w, 18), - GTextOverflowModeFill, GTextAlignmentCenter, NULL); - graphics_draw_text(ctx, "\xC2\xB0", tfont, - GRect(ix + nsz.w / 2, iy - 13, 10, 18), - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, nbuf, tfont, GRect(ix - nsz.w / 2, iy - 11, nsz.w, 18), + GTextOverflowModeFill, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, "\xC2\xB0", tfont, GRect(ix + nsz.w / 2, iy - 13, 10, 18), + GTextOverflowModeFill, GTextAlignmentLeft, NULL); } } - continue; // reveal path draws both circle and content; skip the bitmap pass + continue; // reveal path draws both circle and content; skip the bitmap pass } - if (circle_r < 1) continue; // fully shrunk — skip background circle + if (circle_r < 1) + continue; // fully shrunk — skip background circle const GColor disc = weather_type_disc_color(wt); - if (gcolor_equal(disc, GColorClear)) continue; + if (gcolor_equal(disc, GColorClear)) + continue; graphics_context_set_compositing_mode(ctx, GCompOpAssign); graphics_context_set_fill_color(ctx, disc); graphics_fill_circle(ctx, GPoint(ix, iy), circle_r); @@ -808,12 +862,12 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { // Draw icon bitmaps — doing this in a separate pass minimizes framebuffer captures if (!reveal_engaged && (anim_done || p > ANIMATION_NORMALIZED_MAX / 2)) { for (int i = 0; i < 12; i++) { - if (!icon_bmps[i]) continue; + if (!icon_bmps[i]) + continue; int bx = icon_xs[i] - CLOCK_ICON_SIZE / 2; int by = icon_ys[i] - CLOCK_ICON_SIZE / 2; - weather_icon_draw(ctx, icon_bmps[i], - GRect(bx, by, CLOCK_ICON_SIZE, CLOCK_ICON_SIZE), - false /* no dark grounds on this screen */); + weather_icon_draw(ctx, icon_bmps[i], GRect(bx, by, CLOCK_ICON_SIZE, CLOCK_ICON_SIZE), + false /* no dark grounds on this screen */); } } @@ -821,11 +875,10 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { // For today (day 0) the captured bitmap is the current temperature + degree. // For any other day it is the uppercase weekday abbreviation ("MON", "TUE"...). bool centre_is_temp = (s_cf->day_index == 0); - bool centre_valid = centre_is_temp - ? (s_cf->num_days > 0 && - s_cf->days[0].current_temp_now - != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP) - : true; + bool centre_valid = + centre_is_temp ? (s_cf->num_days > 0 && s_cf->days[0].current_temp_now != + WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP) + : true; if (centre_valid) { // ---- Lazy-capture the centre text into a bitmap once, then scale it each frame. ---- // On the very first draw call after a new animation starts, render the text at full size @@ -847,15 +900,15 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { weather_fill_weekday_abbrev(s_cf->day_index, NULL, stg_buf, sizeof(stg_buf)); centre_font = fonts_get_system_font(FONT_KEY_BITHAM_30_BLACK); } - GSize nsz = graphics_text_layout_get_content_size( - stg_buf, centre_font, GRect(0, 0, 100, 50), - GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft); + GSize nsz = graphics_text_layout_get_content_size(stg_buf, centre_font, GRect(0, 0, 100, 50), + GTextOverflowModeTrailingEllipsis, + GTextAlignmentLeft); const int left_pad = 4; const int right_pad = 4; - const int stg_w = left_pad + nsz.w + right_pad; - const int stg_h = nsz.h + 8; // vertical padding - const int stg_x = PBL_IF_ROUND_ELSE((W - stg_w) / 2, 0); - const int stg_y = PBL_IF_ROUND_ELSE((H - stg_h) / 2, 0); + const int stg_w = left_pad + nsz.w + right_pad; + const int stg_h = nsz.h + 8; // vertical padding + const int stg_x = PBL_IF_ROUND_ELSE((W - stg_w) / 2, 0); + const int stg_y = PBL_IF_ROUND_ELSE((H - stg_h) / 2, 0); const int stg_cx = left_pad + nsz.w / 2; const int stg_cy = stg_h / 2; const int font_top_pad = -4; @@ -866,8 +919,8 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { graphics_context_set_text_color(ctx, GColorBlack); // Number: centred horizontally at stg_cx graphics_draw_text(ctx, stg_buf, centre_font, - GRect(stg_x + left_pad, stg_y + ty_s, nsz.w + 2, nsz.h), - GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); + GRect(stg_x + left_pad, stg_y + ty_s, nsz.w + 2, nsz.h), + GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); // Capture those pixels into a GBitmap GBitmap *fb = graphics_capture_frame_buffer(ctx); if (fb) { @@ -877,10 +930,10 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { GSize(stg_w, stg_h), PBL_IF_COLOR_ELSE(GBitmapFormat8Bit, GBitmapFormat1Bit)); if (bmp) { weather_capture_framebuffer_rect(fb, bmp, GRect(stg_x, stg_y, stg_w, stg_h), 0); - s_cf->temp_text_bmp = bmp; + s_cf->temp_text_bmp = bmp; s_cf->temp_text_full_sz = GSize(stg_w, stg_h); - s_cf->temp_text_cx = (int16_t)stg_cx; - s_cf->temp_text_cy = (int16_t)(stg_cy - font_top_pad / 2); + s_cf->temp_text_cx = (int16_t)stg_cx; + s_cf->temp_text_cy = (int16_t)(stg_cy - font_top_pad / 2); } graphics_release_frame_buffer(ctx, fb); } @@ -891,26 +944,33 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { int src_h = s_cf->temp_text_full_sz.h; int dst_w, dst_h; if (anim_done) { - dst_w = src_w; dst_h = src_h; + dst_w = src_w; + dst_h = src_h; } else { dst_w = src_w * centre_scale_p / ANIMATION_NORMALIZED_MAX; dst_h = src_h * centre_scale_p / ANIMATION_NORMALIZED_MAX; } - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; + if (dst_w < 1) + dst_w = 1; + if (dst_h < 1) + dst_h = 1; if (centre_is_temp) { dst_w = dst_w * 11 / 10; dst_h = dst_h * 11 / 10; - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; + if (dst_w < 1) + dst_w = 1; + if (dst_h < 1) + dst_h = 1; } // Weekday label (non-today) renders a touch smaller than today's temperature. // Today's centre is left exactly as-is. if (!centre_is_temp) { dst_w = dst_w * 8 / 10; dst_h = dst_h * 8 / 10; - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; + if (dst_w < 1) + dst_w = 1; + if (dst_h < 1) + dst_h = 1; } // Use the recorded visual centre of the text as the scale pivot, @@ -919,19 +979,18 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { int cy_scaled = s_cf->temp_text_cy * dst_h / src_h; WeatherType centre_weather_type = WeatherType_Unknown; if (s_cf->num_days > 0) { - int di = s_cf->day_index >= 0 && (size_t)s_cf->day_index < s_cf->num_days - ? s_cf->day_index - : 0; + int di = + s_cf->day_index >= 0 && (size_t)s_cf->day_index < s_cf->num_days ? s_cf->day_index : 0; centre_weather_type = s_cf->days[di].current_weather_type; } if (anim_done) { GColor glow_color = prv_bg_color_for_type(centre_weather_type); uint8_t idle_progress = s_cf->glow_idle_ticks >= CLOCK_GLOW_IDLE_TICKS - ? (uint8_t)(s_cf->glow_idle_ticks - CLOCK_GLOW_IDLE_TICKS) : 0; - int glow_outer_r = centre_is_temp ? CLOCK_GLOW_OUTER_R_TODAY - : CLOCK_GLOW_OUTER_R; - weather_draw_lava_ring(ctx, GPoint(cx, cy), glow_outer_r, - glow_color, s_cf->glow_phase, idle_progress); + ? (uint8_t)(s_cf->glow_idle_ticks - CLOCK_GLOW_IDLE_TICKS) + : 0; + int glow_outer_r = centre_is_temp ? CLOCK_GLOW_OUTER_R_TODAY : CLOCK_GLOW_OUTER_R; + weather_draw_lava_ring(ctx, GPoint(cx, cy), glow_outer_r, glow_color, s_cf->glow_phase, + idle_progress); prv_start_clock_glow(); } @@ -943,31 +1002,37 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { GRect fbb = gbitmap_get_bounds(fb); int fb_h = fbb.size.h; uint8_t *sdata = gbitmap_get_data(s_cf->temp_text_bmp); - uint16_t sbpr = gbitmap_get_bytes_per_row(s_cf->temp_text_bmp); + uint16_t sbpr = gbitmap_get_bytes_per_row(s_cf->temp_text_bmp); int32_t sx_step = ((int32_t)src_w << 16) / dst_w; int32_t sy_step = ((int32_t)src_h << 16) / dst_h; int32_t sy_fp = sy_step >> 1; for (int dy = 0; dy < dst_h; dy++, sy_fp += sy_step) { int sy = sy_fp >> 16; - if (sy >= src_h) sy = src_h - 1; + if (sy >= src_h) + sy = src_h - 1; int ay = abs_y + dy; - if (ay < 0 || ay >= fb_h) continue; + if (ay < 0 || ay >= fb_h) + continue; GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); uint8_t *srow = sdata + (uint32_t)sy * sbpr; int32_t sx_fp2 = sx_step >> 1; for (int dx = 0; dx < dst_w; dx++, sx_fp2 += sx_step) { int sx = sx_fp2 >> 16; - if (sx >= src_w) sx = src_w - 1; + if (sx >= src_w) + sx = src_w - 1; int ax = abs_x + dx; - if (ax < (int)ri.min_x || ax > (int)ri.max_x) continue; + if (ax < (int)ri.min_x || ax > (int)ri.max_x) + continue; // Skip white pixels (background). The staging bitmap is 8-bit on // colour and 1-bit on BW — read accordingly. #if PBL_BW - if (bitset8_get(srow, (unsigned)sx)) continue; + if (bitset8_get(srow, (unsigned)sx)) + continue; weather_fb_row_set(ri.data, ax, GColorBlackARGB8); #else uint8_t pixel = srow[sx]; - if (pixel == 0xFF) continue; // GColor8 white + if (pixel == 0xFF) + continue; // GColor8 white weather_fb_row_set(ri.data, ax, pixel); #endif } @@ -985,33 +1050,34 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { // reads as a broken layout on any frozen/slow frame (no fade to lose // there anyway: gray label ink dithers on 1-bit, so it draws solid black). AnimationProgress fade_start = CLOCK_SMALL_RECT - ? ANIMATION_NORMALIZED_MAX - : (AnimationProgress)(ANIMATION_NORMALIZED_MAX * 6 / 10); - if (!anim_done && p < fade_start) return; + ? ANIMATION_NORMALIZED_MAX + : (AnimationProgress)(ANIMATION_NORMALIZED_MAX * 6 / 10); + if (!anim_done && p < fade_start) + return; GColor label_color; if (anim_done || p > (AnimationProgress)(ANIMATION_NORMALIZED_MAX * 85 / 100)) { label_color = GColorDarkGray; } else if (p > (AnimationProgress)(ANIMATION_NORMALIZED_MAX * 72 / 100)) { - label_color = GColorDarkGray; // second step — already dark + label_color = GColorDarkGray; // second step — already dark } else { label_color = GColorLightGray; // first step — light gray on white } if (CLOCK_SMALL_RECT) { - label_color = GColorBlack; // gray dithers to broken specks on 1-bit + label_color = GColorBlack; // gray dithers to broken specks on 1-bit } GFont label_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); #if PBL_DISPLAY_HEIGHT >= 200 - #define LABEL_ORBIT_RX (ICON_ORBIT_RX - 42) - #define LABEL_ORBIT_RY (ICON_ORBIT_RY - 42) - #define DOT_ORBIT_RX (ICON_ORBIT_RX - 27) - #define DOT_ORBIT_RY (ICON_ORBIT_RY - 27) +#define LABEL_ORBIT_RX (ICON_ORBIT_RX - 42) +#define LABEL_ORBIT_RY (ICON_ORBIT_RY - 42) +#define DOT_ORBIT_RX (ICON_ORBIT_RX - 27) +#define DOT_ORBIT_RY (ICON_ORBIT_RY - 27) #else - // Chalk keeps its ring; the small rects give the labels and dots more air - // so they clear the centre temperature. - #define LABEL_ORBIT_RX (ICON_ORBIT_RX - PBL_IF_ROUND_ELSE(30, 24)) - #define LABEL_ORBIT_RY (ICON_ORBIT_RY - PBL_IF_ROUND_ELSE(30, 24)) - #define DOT_ORBIT_RX (ICON_ORBIT_RX - PBL_IF_ROUND_ELSE(18, 13)) - #define DOT_ORBIT_RY (ICON_ORBIT_RY - PBL_IF_ROUND_ELSE(18, 13)) +// Chalk keeps its ring; the small rects give the labels and dots more air +// so they clear the centre temperature. +#define LABEL_ORBIT_RX (ICON_ORBIT_RX - PBL_IF_ROUND_ELSE(30, 24)) +#define LABEL_ORBIT_RY (ICON_ORBIT_RY - PBL_IF_ROUND_ELSE(30, 24)) +#define DOT_ORBIT_RX (ICON_ORBIT_RX - PBL_IF_ROUND_ELSE(18, 13)) +#define DOT_ORBIT_RY (ICON_ORBIT_RY - PBL_IF_ROUND_ELSE(18, 13)) #endif #if CLOCK_SMALL_RECT // Where the pill sits (0 = not on this day's dial) — anchors ring-adjacent @@ -1019,7 +1085,10 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { int now_pos = 0; if (s_cf->day_index == 0) { for (int pos = 1; pos <= 12; pos++) { - if (prv_abs_hour_for_pos(pos) == cur_h24) { now_pos = pos; break; } + if (prv_abs_hour_for_pos(pos) == cur_h24) { + now_pos = pos; + break; + } } } #endif @@ -1034,8 +1103,10 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { // there, and nudging only some of them reads as misalignment (the 9 // anchor closer to the centre than the 3-side pill). int label_nudge = PBL_IF_ROUND_ELSE(0, (pos == 3 || pos == 9) ? 5 : 0); - if (CLOCK_SMALL_RECT) label_nudge = 0; - int lx = cx + (int)((int32_t)sin_lookup(angle) * (LABEL_ORBIT_RX - label_nudge) / TRIG_MAX_RATIO); + if (CLOCK_SMALL_RECT) + label_nudge = 0; + int lx = + cx + (int)((int32_t)sin_lookup(angle) * (LABEL_ORBIT_RX - label_nudge) / TRIG_MAX_RATIO); int ly = cy - (int)((int32_t)cos_lookup(angle) * LABEL_ORBIT_RY / TRIG_MAX_RATIO); // Dot between number and icon — 3 and 9 o'clock nudged 6px inward int dot_nudge = PBL_IF_ROUND_ELSE(0, (pos == 3 || pos == 9) ? 6 : 0); @@ -1047,13 +1118,16 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { // clock position), so only the cardinal anchors are labelled; the pill // names the current hour and clock convention gives the rest. No tick // dots either — the icons already mark the positions. - (void)ddx; (void)ddy; - if (!is_now && (pos % 3) != 0) continue; + (void)ddx; + (void)ddy; + if (!is_now && (pos % 3) != 0) + continue; // An anchor ring-adjacent to the pill shares its cramped corner (e.g. the // 17h pill at 5 o'clock against the 18 anchor at 6) — the pill wins. if (!is_now && now_pos > 0) { const int ring_d = (pos - now_pos + 12) % 12; - if (ring_d == 1 || ring_d == 11) continue; + if (ring_d == 1 || ring_d == 11) + continue; } #else if (!is_now) { @@ -1061,14 +1135,15 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { graphics_fill_circle(ctx, GPoint(ddx, ddy), 2); } #endif - int disp_h = abs_h % 24; // abs_h >= 24 = tomorrow's hour — label wraps + int disp_h = abs_h % 24; // abs_h >= 24 = tomorrow's hour — label wraps if (!clock_is_24h_style()) { disp_h %= 12; - if (disp_h == 0) disp_h = 12; // 12h dials write 12, never 0 + if (disp_h == 0) + disp_h = 12; // 12h dials write 12, never 0 } char lbuf[4]; snprintf(lbuf, sizeof(lbuf), "%d", disp_h); - int lw = (disp_h >= 10) ? 28 : 20; + int lw = (disp_h >= 10) ? 28 : 20; int loff = (disp_h >= 10) ? -14 : -10; GRect label_rect = GRect(lx + loff, ly - 12, lw, 18); GTextAlignment label_align = GTextAlignmentCenter; @@ -1076,11 +1151,10 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { int pill_center_x = lx; int pill_center_y = ly + 1; - // The blue indicator fades in (scales up from a small dot) a few frames before // it settles, then stretches into the oval once the bitmaps have landed. - int32_t pill_appear = (ANIMATION_NORMALIZED_MAX * 70) / 100; // dot starts growing - int32_t pill_settled = (ANIMATION_NORMALIZED_MAX * 78) / 100; // full circle, begins stretch + int32_t pill_appear = (ANIMATION_NORMALIZED_MAX * 70) / 100; // dot starts growing + int32_t pill_settled = (ANIMATION_NORMALIZED_MAX * 78) / 100; // full circle, begins stretch bool show_pill = is_now && (anim_done || p > pill_appear); if (show_pill) { @@ -1093,22 +1167,28 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { int r = 9; int D = (pill_len - (r * 2)) / 2; - int D_out = D - 5; // Pull the pill inwards 5px from the outside (the number-facing end) - if (CLOCK_SMALL_RECT || D_out < 0) D_out = 0; - int D_in = D - 8; // Pull the pill inwards from the center of the watch face (less padding on the inside) - if (CLOCK_SMALL_RECT || D_in < 0) D_in = 0; + int D_out = D - 5; // Pull the pill inwards 5px from the outside (the number-facing end) + if (CLOCK_SMALL_RECT || D_out < 0) + D_out = 0; + int D_in = D - 8; // Pull the pill inwards from the center of the watch face (less padding on + // the inside) + if (CLOCK_SMALL_RECT || D_in < 0) + D_in = 0; if (!anim_done) { if (p < pill_settled) { // Grow the dot from a small radius up to full size while it fades in. - int32_t grow_p = (p - pill_appear) * ANIMATION_NORMALIZED_MAX / (pill_settled - pill_appear); - if (grow_p < 0) grow_p = 0; + int32_t grow_p = + (p - pill_appear) * ANIMATION_NORMALIZED_MAX / (pill_settled - pill_appear); + if (grow_p < 0) + grow_p = 0; r = 2 + (int)((int32_t)(r - 2) * grow_p / ANIMATION_NORMALIZED_MAX); D_out = 0; D_in = 0; } else { // Stretch the full circle out into the oval. - int32_t stretched_p = (p - pill_settled) * ANIMATION_NORMALIZED_MAX / (ANIMATION_NORMALIZED_MAX - pill_settled); + int32_t stretched_p = (p - pill_settled) * ANIMATION_NORMALIZED_MAX / + (ANIMATION_NORMALIZED_MAX - pill_settled); D_out = (int)((int32_t)D_out * stretched_p / ANIMATION_NORMALIZED_MAX); D_in = (int)((int32_t)D_in * stretched_p / ANIMATION_NORMALIZED_MAX); } @@ -1146,31 +1226,33 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { draw_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); draw_rect = GRect(lx - 14, ly - 7, 28, 14); } - graphics_draw_text(ctx, lbuf, draw_font, draw_rect, - GTextOverflowModeTrailingEllipsis, label_align, NULL); + graphics_draw_text(ctx, lbuf, draw_font, draw_rect, GTextOverflowModeTrailingEllipsis, + label_align, NULL); } // UP-to-forecast: wrap the fully-drawn clock in the whole-screen squash-stretch. - if (s_cf->fwd_exit_active) prv_render_fwd_squash(ctx); + if (s_cf->fwd_exit_active) + prv_render_fwd_squash(ctx); } // ---- Tick handler — redraws every minute to keep hands + time current ---- static void prv_tick_handler(struct tm *tick_time, TimeUnits units_changed) { - if (s_cf && s_cf->canvas) layer_mark_dirty(s_cf->canvas); + if (s_cf && s_cf->canvas) + layer_mark_dirty(s_cf->canvas); } // ---- Touch input (touch colour platforms) ---- #ifdef CONFIG_TOUCH static void prv_touch_handler(const TouchEvent *event, void *context) { (void)context; - if (!s_cf) return; + if (!s_cf) + return; if (event->type == TouchEvent_Touchdown) { s_cf->touch_start_x = event->x; s_cf->touch_start_y = event->y; - s_cf->touch_active = true; - s_cf->touch_started_during_intro = - s_cf->anim_progress < ANIMATION_NORMALIZED_MAX; + s_cf->touch_active = true; + s_cf->touch_started_during_intro = s_cf->anim_progress < ANIMATION_NORMALIZED_MAX; } else if (event->type == TouchEvent_Liftoff && s_cf->touch_active) { s_cf->touch_active = false; if (s_cf->touch_started_during_intro) { @@ -1218,16 +1300,16 @@ static void prv_click_up(ClickRecognizerRef r, void *ctx) { // UP returns to the forecast main screen: the clock jelly-stretches down off the bottom, then // the forecast jelly-drops in from above (handoff fires from prv_fwd_exit_push_callback). Ignore // while the intro or any other transition is still in flight. - if (s_cf && !s_cf->fwd_exit_active && - !s_cf->reveal_active && s_cf->anim_progress >= ANIMATION_NORMALIZED_MAX) { + if (s_cf && !s_cf->fwd_exit_active && !s_cf->reveal_active && + s_cf->anim_progress >= ANIMATION_NORMALIZED_MAX) { prv_start_fwd_exit_animation(); } } static void prv_click_provider(void *ctx) { - window_single_click_subscribe(BUTTON_ID_BACK, prv_click_back); - window_single_click_subscribe(BUTTON_ID_UP, prv_click_up); + window_single_click_subscribe(BUTTON_ID_BACK, prv_click_back); + window_single_click_subscribe(BUTTON_ID_UP, prv_click_up); window_single_click_subscribe(BUTTON_ID_SELECT, prv_click_select); - window_single_click_subscribe(BUTTON_ID_DOWN, prv_click_down); + window_single_click_subscribe(BUTTON_ID_DOWN, prv_click_down); } // ---- Window lifecycle ---- @@ -1254,7 +1336,8 @@ static void prv_window_load(Window *window) { if (s_cf->skip_intro_animation) { s_cf->anim_progress = ANIMATION_NORMALIZED_MAX; - if (s_cf->canvas) layer_mark_dirty(s_cf->canvas); + if (s_cf->canvas) + layer_mark_dirty(s_cf->canvas); } else { // Schedule intro animation: bloom + clockwise spin into position (no HUD bar) prv_play_animation(); @@ -1262,7 +1345,8 @@ static void prv_window_load(Window *window) { } static void prv_window_appear(Window *window) { - if (!s_cf) return; + if (!s_cf) + return; // Reset the temperature reveal so the clock shows weather icons on return. s_cf->reveal_active = false; s_cf->temps_shown = false; @@ -1272,7 +1356,8 @@ static void prv_window_appear(Window *window) { animation_destroy(s_cf->reveal_anim); s_cf->reveal_anim = NULL; } - if (s_cf->canvas) layer_mark_dirty(s_cf->canvas); + if (s_cf->canvas) + layer_mark_dirty(s_cf->canvas); #ifdef CONFIG_TOUCH touch_service_subscribe(prv_touch_handler, s_cf); #endif @@ -1349,71 +1434,77 @@ bool clock_face_is_showing(void) { return s_cf != NULL; } -static void prv_clock_face_push(const WeatherLocationForecast *days, size_t num_days, - int day_index, const uint8_t *hourly_types, - size_t hourly_count, bool animated, bool play_intro) { - if (s_cf) return; +static void prv_clock_face_push(const WeatherLocationForecast *days, size_t num_days, int day_index, + const uint8_t *hourly_types, size_t hourly_count, bool animated, + bool play_intro) { + if (s_cf) + return; s_cf = calloc(1, sizeof(ClockFaceData)); - if (!s_cf) return; + if (!s_cf) + return; size_t n = num_days < MAX_DAYS ? num_days : MAX_DAYS; s_cf->num_days = n; - for (size_t i = 0; i < n; i++) s_cf->days[i] = days[i]; + for (size_t i = 0; i < n; i++) + s_cf->days[i] = days[i]; s_cf->day_index = (day_index >= 0 && (size_t)day_index < n) ? day_index : 0; s_cf->skip_intro_animation = !play_intro; // Seed hourly data so it's available immediately on first draw. if (hourly_count > 0) { size_t hn = hourly_count < 24 ? hourly_count : 24; - for (size_t i = 0; i < hn; i++) s_cf->hourly_types[i] = hourly_types[i]; + for (size_t i = 0; i < hn; i++) + s_cf->hourly_types[i] = hourly_types[i]; s_cf->hourly_valid = (hn >= 24); } s_cf->window = window_create(); window_set_background_color(s_cf->window, GColorBlack); window_set_window_handlers(s_cf->window, (WindowHandlers){ - .load = prv_window_load, - .unload = prv_window_unload, - .appear = prv_window_appear, - }); + .load = prv_window_load, + .unload = prv_window_unload, + .appear = prv_window_appear, + }); window_set_click_config_provider(s_cf->window, prv_click_provider); window_stack_push(s_cf->window, animated); } -void clock_face_push(const WeatherLocationForecast *days, size_t num_days, - int day_index, const uint8_t *hourly_types, size_t hourly_count, - bool animated) { - prv_clock_face_push(days, num_days, day_index, hourly_types, hourly_count, - animated, true); +void clock_face_push(const WeatherLocationForecast *days, size_t num_days, int day_index, + const uint8_t *hourly_types, size_t hourly_count, bool animated) { + prv_clock_face_push(days, num_days, day_index, hourly_types, hourly_count, animated, true); } -void clock_face_push_static(const WeatherLocationForecast *days, size_t num_days, - int day_index, const uint8_t *hourly_types, - size_t hourly_count, bool animated) { - prv_clock_face_push(days, num_days, day_index, hourly_types, hourly_count, - animated, false); +void clock_face_push_static(const WeatherLocationForecast *days, size_t num_days, int day_index, + const uint8_t *hourly_types, size_t hourly_count, bool animated) { + prv_clock_face_push(days, num_days, day_index, hourly_types, hourly_count, animated, false); } void clock_face_dismiss(bool animated) { - if (!s_cf || !s_cf->window) return; + if (!s_cf || !s_cf->window) + return; window_stack_remove(s_cf->window, animated); } void clock_face_update_hourly_temps_for_day(int day_index, const int8_t *temps, size_t count) { - if (!s_cf || day_index != s_cf->day_index) return; + if (!s_cf || day_index != s_cf->day_index) + return; size_t n = count < 24 ? count : 24; - for (size_t i = 0; i < n; i++) s_cf->hourly_temps[i] = temps[i]; + for (size_t i = 0; i < n; i++) + s_cf->hourly_temps[i] = temps[i]; s_cf->hourly_temps_valid = (n >= 24); - if (s_cf->canvas) layer_mark_dirty(s_cf->canvas); + if (s_cf->canvas) + layer_mark_dirty(s_cf->canvas); } void clock_face_set_tomorrow_hourly(const uint8_t *types, const int8_t *temps, size_t count) { - if (!s_cf || !types || !temps || count < 24) return; + if (!s_cf || !types || !temps || count < 24) + return; for (size_t i = 0; i < 24; i++) { s_cf->tomorrow_types[i] = types[i]; s_cf->tomorrow_temps[i] = temps[i]; } s_cf->tomorrow_hourly_valid = true; - if (s_cf->canvas) layer_mark_dirty(s_cf->canvas); + if (s_cf->canvas) + layer_mark_dirty(s_cf->canvas); } diff --git a/src/fw/apps/system/weather/clock_face.h b/src/fw/apps/system/weather/clock_face.h index 1ae7e20c60..fb377e7e88 100644 --- a/src/fw/apps/system/weather/clock_face.h +++ b/src/fw/apps/system/weather/clock_face.h @@ -22,13 +22,11 @@ bool clock_face_is_showing(void); // hourly_types/hourly_count: the selected day's hourly weather types. // animated: pass false when a pre-push transition has already played so the // built-in clock spiral intro fires without a system slide animation. -void clock_face_push(const WeatherLocationForecast *days, size_t num_days, - int day_index, const uint8_t *hourly_types, size_t hourly_count, - bool animated); +void clock_face_push(const WeatherLocationForecast *days, size_t num_days, int day_index, + const uint8_t *hourly_types, size_t hourly_count, bool animated); -void clock_face_push_static(const WeatherLocationForecast *days, size_t num_days, - int day_index, const uint8_t *hourly_types, - size_t hourly_count, bool animated); +void clock_face_push_static(const WeatherLocationForecast *days, size_t num_days, int day_index, + const uint8_t *hourly_types, size_t hourly_count, bool animated); void clock_face_dismiss(bool animated); diff --git a/src/fw/apps/system/weather/expanded_view.c b/src/fw/apps/system/weather/expanded_view.c index 1eb2016aad..acae1cedbe 100644 --- a/src/fw/apps/system/weather/expanded_view.c +++ b/src/fw/apps/system/weather/expanded_view.c @@ -5,8 +5,8 @@ #include "pbl/services/i18n/i18n.h" #include "weather_types.h" #include "weather_math.h" -#include "weather_app_layout.h" // the shared UV bar (round) -#include "applib/ui/content_indicator.h" // Health's nav arrow +#include "weather_app_layout.h" // the shared UV bar (round) +#include "applib/ui/content_indicator.h" // Health's nav arrow #include "pebble_compat.h" #include "applib/app_timer.h" #include "applib/graphics/gdraw_command_image.h" @@ -29,42 +29,44 @@ // (This mirrors the Timeline card's own button-scroll: scroll within, navigate at // the ends.) Touch swipe scrolls the two pages. typedef struct { - Window *window; - Layer *canvas; - GDrawCommandImage *icon; // 80x80 PDC weather icon (owned) - int high; - int low; - int uv; // 0-11, -1 unknown - int precip; // rain chance %, -1 unknown - int wind; // mph, -1 unknown - int16_t lat_e2; // degrees*100, INT16_MIN unknown (for sunset) - int16_t lon_e2; - int16_t utc_off_min; // location tz, minutes east of UTC; INT16_MIN = watch tz - char time_str[10]; // status bar time - char sunset_str[40]; // "Sunset 9:30 PM" - char temp_str[16]; // "23/14°" + Window *window; + Layer *canvas; + GDrawCommandImage *icon; // 80x80 PDC weather icon (owned) + int high; + int low; + int uv; // 0-11, -1 unknown + int precip; // rain chance %, -1 unknown + int wind; // mph, -1 unknown + int16_t lat_e2; // degrees*100, INT16_MIN unknown (for sunset) + int16_t lon_e2; + int16_t utc_off_min; // location tz, minutes east of UTC; INT16_MIN = watch tz + char time_str[10]; // status bar time + char sunset_str[40]; // "Sunset 9:30 PM" + char temp_str[16]; // "23/14°" // Content entrance: the card content slides in from the left + bounces (Timeline card entrance). AnimationProgress text_p; - Animation *text_anim; - bool text_active; - ExpandedViewEntrance entrance; // how the card animates in on first appear (latched off after) + Animation *text_anim; + bool text_active; + ExpandedViewEntrance entrance; // how the card animates in on first appear (latched off after) // Status bar: show "Last updated ..." for 2s, then swap it out to the right while the time swoops // in from the left. - char updated_str[40]; // "Last updated 8:23 PM" - bool show_updated; // true until the swap completes - bool swap_active; // the last-updated -> time slide is playing + char updated_str[40]; // "Last updated 8:23 PM" + bool show_updated; // true until the swap completes + bool swap_active; // the last-updated -> time slide is playing AnimationProgress swap_p; - Animation *swap_anim; - AppTimer *updated_timer; // fires 3s after appear to start the swap + Animation *swap_anim; + AppTimer *updated_timer; // fires 3s after appear to start the swap // Whole-card horizontal slide (moook bounce), shared by the SELECT slide-out-left (then on_select // fires -> globe slides in from right) and the globe-BACK slide-in-from-left entrance. - Animation *slide_anim; + Animation *slide_anim; #ifdef CONFIG_TOUCH - int16_t touch_start_x, touch_start_y; // Touchdown origin for swipe detection - bool touch_active; + int16_t touch_start_x, touch_start_y; // Touchdown origin for swipe detection + bool touch_active; #endif - void (*on_down)(void *ctx); void *on_down_ctx; // DOWN/BACK -> forecast - void (*on_select)(void *ctx); void *on_select_ctx; // SELECT -> globe (slide-in from right) + void (*on_down)(void *ctx); + void *on_down_ctx; // DOWN/BACK -> forecast + void (*on_select)(void *ctx); + void *on_select_ctx; // SELECT -> globe (slide-in from right) } ExpandedViewData; static ExpandedViewData *s_ev; @@ -83,10 +85,11 @@ void expanded_view_reset(void) { static int32_t prv_norm_angle(int32_t a) { a %= TRIG_MAX_ANGLE; - if (a < 0) a += TRIG_MAX_ANGLE; + if (a < 0) + a += TRIG_MAX_ANGLE; return a; } -static int32_t prv_angle_from_cdeg(int32_t cdeg) { // degrees*100 -> trig angle +static int32_t prv_angle_from_cdeg(int32_t cdeg) { // degrees*100 -> trig angle return prv_norm_angle((int32_t)(((int64_t)cdeg * TRIG_MAX_ANGLE) / 36000)); } @@ -96,16 +99,15 @@ static int prv_sunset_minutes(int16_t lat_e2, int16_t lon_e2, int16_t utc_off_mi } time_t now = rtc_get_time(); struct tm lt = *localtime(&now); - const int N = lt.tm_yday + 1; // day of year 1..366 + const int N = lt.tm_yday + 1; // day of year 1..366 // The LOCATION's UTC offset when the phone synced one (v4.1) — so a saved city's // sunset reads in that city's local clock; otherwise the watch's own offset. // tm_gmtoff, not time_get_gmtoffset(): the latter excludes DST while lt does not. - const int tz_min = (utc_off_min != INT16_MIN) ? utc_off_min - : (lt.tm_gmtoff / 60); + const int tz_min = (utc_off_min != INT16_MIN) ? utc_off_min : (lt.tm_gmtoff / 60); - const int b_cdeg = (36000 * (N - 81)) / 365; // B = (360/365)*(N-81), deg*100 - const int32_t sinB = sin_lookup(prv_angle_from_cdeg(b_cdeg)); - const int32_t cosB = cos_lookup(prv_angle_from_cdeg(b_cdeg)); + const int b_cdeg = (36000 * (N - 81)) / 365; // B = (360/365)*(N-81), deg*100 + const int32_t sinB = sin_lookup(prv_angle_from_cdeg(b_cdeg)); + const int32_t cosB = cos_lookup(prv_angle_from_cdeg(b_cdeg)); const int32_t sin2B = sin_lookup(prv_angle_from_cdeg(2 * b_cdeg)); const int decl_cdeg = (int)(((int64_t)2345 * sinB) / TRIG_MAX_RATIO); // 23.45*sin(B) @@ -115,25 +117,32 @@ static int prv_sunset_minutes(int16_t lat_e2, int16_t lon_e2, int16_t utc_off_mi const int32_t cosLat = cos_lookup(prv_angle_from_cdeg(lat_e2)); const int64_t den = (int64_t)cosLat * cosDec; - if (den == 0) return -1; - int64_t cosH = -((int64_t)sinLat * sinDec) * 1000000 / den; // ratio *1e6 - if (cosH > 1000000) cosH = 1000000; - if (cosH < -1000000) cosH = -1000000; + if (den == 0) + return -1; + int64_t cosH = -((int64_t)sinLat * sinDec) * 1000000 / den; // ratio *1e6 + if (cosH > 1000000) + cosH = 1000000; + if (cosH < -1000000) + cosH = -1000000; - int32_t alo = 0, ahi = TRIG_MAX_ANGLE / 2; // omega = acos(cosH), binary search + int32_t alo = 0, ahi = TRIG_MAX_ANGLE / 2; // omega = acos(cosH), binary search for (int i = 0; i < 22; i++) { int32_t amid = (alo + ahi) / 2; int64_t c = (int64_t)cos_lookup(amid) * 1000000 / TRIG_MAX_RATIO; - if (c > cosH) alo = amid; else ahi = amid; + if (c > cosH) + alo = amid; + else + ahi = amid; } const int omega_cdeg = (int)(((int64_t)((alo + ahi) / 2) * 36000) / TRIG_MAX_ANGLE); - const int eot_m1000 = (int)(((int64_t)9870 * sin2B - (int64_t)7530 * cosB - - (int64_t)1500 * sinB) / TRIG_MAX_RATIO); + const int eot_m1000 = + (int)(((int64_t)9870 * sin2B - (int64_t)7530 * cosB - (int64_t)1500 * sinB) / TRIG_MAX_RATIO); const int tc_m1000 = 40 * (int)lon_e2 - tz_min * 1000 + eot_m1000; int sunset_min = (720000 + 40 * omega_cdeg - tc_m1000) / 1000; sunset_min %= 1440; - if (sunset_min < 0) sunset_min += 1440; + if (sunset_min < 0) + sunset_min += 1440; return sunset_min; } @@ -141,7 +150,9 @@ static void prv_fmt_hhmm(char *out, size_t n, int h24, int mm) { if (clock_is_24h_style()) { snprintf(out, n, "%d:%02d", h24, mm); } else { - int h12 = h24 % 12; if (h12 == 0) h12 = 12; + int h12 = h24 % 12; + if (h12 == 0) + h12 = 12; char ampm[8]; i18n_get_with_buffer(h24 < 12 ? i18n_noop("AM") : i18n_noop("PM"), ampm, sizeof(ampm)); snprintf(out, n, "%d:%02d %s", h12, mm, ampm); @@ -160,20 +171,26 @@ static void prv_fmt_labelled_time(char *out, size_t n, const char *fmt, int h24, static void prv_build_sunset(char *out, size_t n, int16_t lat_e2, int16_t lon_e2, int16_t utc_off_min) { int m = prv_sunset_minutes(lat_e2, lon_e2, utc_off_min); - if (m < 0) { i18n_get_with_buffer(i18n_noop("Sunset --:--"), out, n); return; } + if (m < 0) { + i18n_get_with_buffer(i18n_noop("Sunset --:--"), out, n); + return; + } prv_fmt_labelled_time(out, n, i18n_noop("Sunset %s"), (m / 60) % 24, m % 60); } static void prv_build_time(char *out, size_t n) { time_t now = rtc_get_time(); struct tm *lt = localtime(&now); - if (!lt) { snprintf(out, n, "--:--"); return; } + if (!lt) { + snprintf(out, n, "--:--"); + return; + } prv_fmt_hhmm(out, n, lt->tm_hour, lt->tm_min); } // Round's status bar is a chord, not a full-width strip, so the rect wording overruns it // and clips. "Updated, 8:23 PM" says the same thing inside the space there actually is. -#define EV_STATUS_Y 0 +#define EV_STATUS_Y 0 #define EV_STATUS_FONT FONT_KEY_GOTHIC_18_BOLD void expanded_view_format_updated(const WeatherLocationForecast *f, char *out, size_t n) { @@ -182,14 +199,16 @@ void expanded_view_format_updated(const WeatherLocationForecast *f, char *out, s time_t t = f->time_updated_utc; lt = localtime(&t); } - if (!lt) { i18n_get_with_buffer(i18n_noop("Last updated --:--"), out, n); return; } + if (!lt) { + i18n_get_with_buffer(i18n_noop("Last updated --:--"), out, n); + return; + } prv_fmt_labelled_time(out, n, i18n_noop("Last updated %s"), lt->tm_hour, lt->tm_min); } void expanded_view_format_glance(const WeatherLocationForecast *f, int16_t lat_e2, int16_t lon_e2, - int16_t utc_off_min, - char *sunset, size_t sunset_sz, char *temp, size_t temp_sz, - char *loc, size_t loc_sz) { + int16_t utc_off_min, char *sunset, size_t sunset_sz, char *temp, + size_t temp_sz, char *loc, size_t loc_sz) { prv_build_sunset(sunset, sunset_sz, lat_e2, lon_e2, utc_off_min); if (!f) { snprintf(temp, temp_sz, "--"); @@ -198,40 +217,46 @@ void expanded_view_format_glance(const WeatherLocationForecast *f, int16_t lat_e } snprintf(loc, loc_sz, "%s", f->location_name ? f->location_name : "--"); const bool hi = f->today_high != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; - const bool lo = f->today_low != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; - if (hi && lo) snprintf(temp, temp_sz, "%d/%d\xC2\xB0", f->today_high, f->today_low); - else if (hi) snprintf(temp, temp_sz, "%d\xC2\xB0", f->today_high); - else snprintf(temp, temp_sz, "--"); + const bool lo = f->today_low != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; + if (hi && lo) + snprintf(temp, temp_sz, "%d/%d\xC2\xB0", f->today_high, f->today_low); + else if (hi) + snprintf(temp, temp_sz, "%d\xC2\xB0", f->today_high); + else + snprintf(temp, temp_sz, "--"); } -static void prv_set_from_forecast(const WeatherLocationForecast *f, - int16_t lat_e2, int16_t lon_e2, int16_t utc_off_min) { - if (!s_ev) return; +static void prv_set_from_forecast(const WeatherLocationForecast *f, int16_t lat_e2, int16_t lon_e2, + int16_t utc_off_min) { + if (!s_ev) + return; s_ev->lat_e2 = lat_e2; s_ev->lon_e2 = lon_e2; s_ev->utc_off_min = utc_off_min; prv_build_time(s_ev->time_str, sizeof(s_ev->time_str)); expanded_view_format_updated(f, s_ev->updated_str, sizeof(s_ev->updated_str)); - char loc_scratch[64]; // the card doesn't display it; the shared formatter needs a sink - expanded_view_format_glance(f, lat_e2, lon_e2, utc_off_min, - s_ev->sunset_str, sizeof(s_ev->sunset_str), - s_ev->temp_str, sizeof(s_ev->temp_str), + char loc_scratch[64]; // the card doesn't display it; the shared formatter needs a sink + expanded_view_format_glance(f, lat_e2, lon_e2, utc_off_min, s_ev->sunset_str, + sizeof(s_ev->sunset_str), s_ev->temp_str, sizeof(s_ev->temp_str), loc_scratch, sizeof(loc_scratch)); - if (s_ev->icon) { gdraw_command_image_destroy(s_ev->icon); s_ev->icon = NULL; } + if (s_ev->icon) { + gdraw_command_image_destroy(s_ev->icon); + s_ev->icon = NULL; + } if (!f) { s_ev->high = s_ev->low = WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; s_ev->uv = s_ev->precip = s_ev->wind = -1; return; } - s_ev->high = f->today_high; - s_ev->low = f->today_low; + s_ev->high = f->today_high; + s_ev->low = f->today_low; // BOTH SHAPES: the sunset card's // UV readout shows the CURRENT hour's UV (today_uv_now) — the live reading once the phone // sends the minor-4 hourly block, falling back to the day's figure until then. - s_ev->uv = f->today_uv_now; + s_ev->uv = f->today_uv_now; s_ev->precip = f->today_precip_mm; - s_ev->wind = f->today_wind_mph; + s_ev->wind = f->today_wind_mph; // BOTH SHAPES: the card's icon is typed by the CURRENT HOUR // (current_type_now) — the same field the mainscreen header and the hero fly use — so the // flown icon and the card icon can never disagree when the phone's synced 'current' and @@ -240,9 +265,10 @@ static void prv_set_from_forecast(const WeatherLocationForecast *f, GDrawCommandImage *raw = gdraw_command_image_create_with_resource( weather_type_icon_large_resource(f->current_type_now)); if (raw) { - s_ev->icon = gdraw_command_image_clone(raw); // writable copy so we can scale it + s_ev->icon = gdraw_command_image_clone(raw); // writable copy so we can scale it gdraw_command_image_destroy(raw); - if (s_ev->icon) gdraw_command_image_scale(s_ev->icon, GSize(EV_ICON_SIZE, EV_ICON_SIZE)); + if (s_ev->icon) + gdraw_command_image_scale(s_ev->icon, GSize(EV_ICON_SIZE, EV_ICON_SIZE)); } } @@ -263,18 +289,19 @@ static void prv_set_from_forecast(const WeatherLocationForecast *f, // the dials were replaced by the report's UV bar. The group KEEPS the exact // centring it had with the dials (ink 73..187, centre 130) — the bar is made COMPACT to fit // beneath it rather than the group moving to make room. -#define EV_ROUND_GROUP_DY 11 // sunset+temp ink 113..160: centred in the - // icon-bottom(103) .. pill-top(170) band, - // 9 rows clear each side (measured) // icon/sunset/temp shift (EV_ICON_Y carries - // the icon's share, see expanded_view.h) -#define EV_UV_BAR_Y 194 // bar top row, just under the group -#define EV_SUNSET_Y PBL_IF_ROUND_ELSE(92 + EV_ROUND_GROUP_DY, (EV_SMALL_RECT ? 82 : 92)) -#define EV_TEMP_Y PBL_IF_ROUND_ELSE(114 + EV_ROUND_GROUP_DY, (EV_SMALL_RECT ? 102 : 114)) +#define EV_ROUND_GROUP_DY \ + 11 // sunset+temp ink 113..160: centred in the + // icon-bottom(103) .. pill-top(170) band, + // 9 rows clear each side (measured) // icon/sunset/temp shift + // (EV_ICON_Y carries the icon's share, see expanded_view.h) +#define EV_UV_BAR_Y 194 // bar top row, just under the group +#define EV_SUNSET_Y PBL_IF_ROUND_ELSE(92 + EV_ROUND_GROUP_DY, (EV_SMALL_RECT ? 82 : 92)) +#define EV_TEMP_Y PBL_IF_ROUND_ELSE(114 + EV_ROUND_GROUP_DY, (EV_SMALL_RECT ? 102 : 114)) // Small rect: the UV/RAIN meters as one centred text row (no room for dials). -#define EV_METERS_Y 140 -#define EV_GAUGE_R PBL_IF_ROUND_ELSE(20, 25) // ring radius -#define EV_GAUGE_CY PBL_IF_ROUND_ELSE(228, 200) // dial centre row -#define EV_GAUGE_INSET PBL_IF_ROUND_ELSE(22, 0) // pull both dials toward the centre column +#define EV_METERS_Y 140 +#define EV_GAUGE_R PBL_IF_ROUND_ELSE(20, 25) // ring radius +#define EV_GAUGE_CY PBL_IF_ROUND_ELSE(228, 200) // dial centre row +#define EV_GAUGE_INSET PBL_IF_ROUND_ELSE(22, 0) // pull both dials toward the centre column // Round's flanking dials. cy 174 puts the gauge's visual block (label top cy-36 .. ring's lowest // ink ~cy+13) centred on the sunset/hi-lo text block (ink 140..187, centre 163.5) and leaves the // ring clear of the UV bar at 194. The x values keep each 72px-wide label BOX overlapping the @@ -289,15 +316,15 @@ static void prv_set_from_forecast(const WeatherLocationForecast *f, // Stat discs: the mainscreen 5-day rows' disc-and-icon at their own scale (their discs are // ~34px with the TINY icon set; ours are 36px with the same 1x icons). Disc row 152 centres // the disc on the sunset+temp block; the value ink lands ~176..186, clear of the bar at 194. -#define EV_PRECIP_PILL_Y 170 // pill rows 170..187; 5px below the temp ink, 6 above the bar -#define EV_PRECIP_PILL_H 18 // same as the mainscreen pill (R5_STAT_PILL_H) -#define EV_ROUND_RAIN_CX 44 -#define EV_ROUND_WIND_CX 218 +#define EV_PRECIP_PILL_Y 170 // pill rows 170..187; 5px below the temp ink, 6 above the bar +#define EV_PRECIP_PILL_H 18 // same as the mainscreen pill (R5_STAT_PILL_H) +#define EV_ROUND_RAIN_CX 44 +#define EV_ROUND_WIND_CX 218 #define EV_GAUGE_DEG_TO_ANGLE(d) ((int32_t)(TRIG_MAX_ANGLE * (d) / 360)) -#define EV_GAUGE_ARC_START EV_GAUGE_DEG_TO_ANGLE(225) -#define EV_GAUGE_ARC_SPAN EV_GAUGE_DEG_TO_ANGLE(270) -#define EV_GAUGE_RING_W 7 +#define EV_GAUGE_ARC_START EV_GAUGE_DEG_TO_ANGLE(225) +#define EV_GAUGE_ARC_SPAN EV_GAUGE_DEG_TO_ANGLE(270) +#define EV_GAUGE_RING_W 7 // WHO UV-index severity color — the SAME ramp as the condensed screen's UV // tally squares (weather_app_layout.c), so the dial and the squares always @@ -306,32 +333,33 @@ static void prv_set_from_forecast(const WeatherLocationForecast *f, #if !PBL_ROUND // Rect only: round replaced its dials with the rain/wind glyphs below (and the shared UV bar). -static void prv_draw_gauge(GContext *ctx, int cx, int cy, int r, const char *label, - int value, int max_val, const char *unit, bool unknown, - GColor fill) { +static void prv_draw_gauge(GContext *ctx, int cx, int cy, int r, const char *label, int value, + int max_val, const char *unit, bool unknown, GColor fill) { GRect ring = GRect(cx - r, cy - r, 2 * r, 2 * r); graphics_context_set_fill_color(ctx, GColorLightGray); - graphics_fill_radial(ctx, ring, GOvalScaleModeFitCircle, EV_GAUGE_RING_W, - EV_GAUGE_ARC_START, EV_GAUGE_ARC_START + EV_GAUGE_ARC_SPAN); + graphics_fill_radial(ctx, ring, GOvalScaleModeFitCircle, EV_GAUGE_RING_W, EV_GAUGE_ARC_START, + EV_GAUGE_ARC_START + EV_GAUGE_ARC_SPAN); if (!unknown && max_val > 0) { int v = value < 0 ? 0 : (value > max_val ? max_val : value); int32_t filled = weather_scale_i32(EV_GAUGE_ARC_SPAN, v, max_val); if (filled > 0) { graphics_context_set_fill_color(ctx, PBL_IF_COLOR_ELSE(fill, GColorBlack)); - graphics_fill_radial(ctx, ring, GOvalScaleModeFitCircle, EV_GAUGE_RING_W, - EV_GAUGE_ARC_START, EV_GAUGE_ARC_START + filled); + graphics_fill_radial(ctx, ring, GOvalScaleModeFitCircle, EV_GAUGE_RING_W, EV_GAUGE_ARC_START, + EV_GAUGE_ARC_START + filled); } } char vbuf[12]; - if (unknown) snprintf(vbuf, sizeof(vbuf), "--"); - else snprintf(vbuf, sizeof(vbuf), "%d%s", value, unit); + if (unknown) + snprintf(vbuf, sizeof(vbuf), "--"); + else + snprintf(vbuf, sizeof(vbuf), "%d%s", value, unit); graphics_context_set_text_color(ctx, GColorBlack); graphics_draw_text(ctx, vbuf, fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD), - GRect(cx - r + 2, cy - 12, 2 * r - 4, 24), - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + GRect(cx - r + 2, cy - 12, 2 * r - 4, 24), GTextOverflowModeTrailingEllipsis, + GTextAlignmentCenter, NULL); graphics_draw_text(ctx, label, fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD), - GRect(cx - 36, cy - r - 16, 72, 16), - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + GRect(cx - 36, cy - r - 16, 72, 16), GTextOverflowModeTrailingEllipsis, + GTextAlignmentCenter, NULL); } #endif // !PBL_ROUND @@ -356,11 +384,12 @@ static void prv_draw_gauge(GContext *ctx, int cx, int cy, int r, const char *lab // optical lift (measured from the live screen — the pill comment says 14_BOLD but round's // day_font resolves to 18_BOLD; the label caps measure 11px). One difference: this one // carries the value inline — "PRECIPITATION: 20%". -static void prv_draw_precip_pill(GContext *ctx, int W, int tdx, int precip, - const void *owner) { +static void prv_draw_precip_pill(GContext *ctx, int W, int tdx, int precip, const void *owner) { char label[40]; - if (precip < 0) snprintf(label, sizeof(label), "%s", i18n_get("PRECIPITATION: --", owner)); - else snprintf(label, sizeof(label), i18n_get("PRECIPITATION: %d%%", owner), precip); + if (precip < 0) + snprintf(label, sizeof(label), "%s", i18n_get("PRECIPITATION: --", owner)); + else + snprintf(label, sizeof(label), i18n_get("PRECIPITATION: %d%%", owner), precip); const int inset = 18 + (W - 144) / 2 / 5; const GRect pill = GRect(inset + tdx, EV_PRECIP_PILL_Y, W - 2 * inset, EV_PRECIP_PILL_H); graphics_context_set_fill_color(ctx, GColorPictonBlue); @@ -368,9 +397,9 @@ static void prv_draw_precip_pill(GContext *ctx, int W, int tdx, int precip, graphics_context_set_text_color(ctx, GColorBlack); GFont lf = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); const int th = fonts_get_font_height(lf); - graphics_draw_text(ctx, label, lf, - GRect(inset + tdx, EV_PRECIP_PILL_Y + (EV_PRECIP_PILL_H - th) / 2 - 3, - W - 2 * inset, th), + graphics_draw_text( + ctx, label, lf, + GRect(inset + tdx, EV_PRECIP_PILL_Y + (EV_PRECIP_PILL_H - th) / 2 - 3, W - 2 * inset, th), GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } @@ -383,13 +412,13 @@ void expanded_view_draw_glance_content(GContext *ctx, int W, int tdx, const char // Status bar (top) — the time or "Last updated ..."; NULL while the card draws the swap itself. if (status) { graphics_draw_text(ctx, status, fonts_get_system_font(EV_STATUS_FONT), - GRect(tdx, EV_STATUS_Y, W, 20), - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + GRect(tdx, EV_STATUS_Y, W, 20), GTextOverflowModeTrailingEllipsis, + GTextAlignmentCenter, NULL); } // Title = "Sunset H:MM" (Header font on emery = GOTHIC_24_BOLD). graphics_draw_text(ctx, sunset, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), - GRect(4 + tdx, EV_SUNSET_Y, W - 8, 30), - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + GRect(4 + tdx, EV_SUNSET_Y, W - 8, 30), GTextOverflowModeTrailingEllipsis, + GTextAlignmentCenter, NULL); // Subtitle = "high/low°" (LECO_36, big) — OPTICALLY centred: the trailing degree sign is // excluded from the width measure (it reads as an appendage, so true centring of the full // string looks left-shifted), then the full string draws left-aligned from that origin with @@ -397,26 +426,25 @@ void expanded_view_draw_glance_content(GContext *ctx, int W, int tdx, const char { // 144px wide: LECO_36 leaves "24/14\xc2\xb0" ~5px of margin — it can't read // as centred. One step down keeps the hierarchy and restores the margins. - GFont tf = fonts_get_system_font( - EV_SMALL_RECT ? FONT_KEY_LECO_32_BOLD_NUMBERS : FONT_KEY_LECO_36_BOLD_NUMBERS); + GFont tf = fonts_get_system_font(EV_SMALL_RECT ? FONT_KEY_LECO_32_BOLD_NUMBERS + : FONT_KEY_LECO_36_BOLD_NUMBERS); char body[16]; strncpy(body, temp, sizeof(body) - 1); body[sizeof(body) - 1] = '\0'; size_t blen = strlen(body); if (blen >= 2 && (uint8_t)body[blen - 2] == 0xC2 && (uint8_t)body[blen - 1] == 0xB0) { - body[blen - 2] = '\0'; // strip the 2-byte UTF-8 degree sign + body[blen - 2] = '\0'; // strip the 2-byte UTF-8 degree sign } // Small rect: LECO's degree glyph is a full-size ring, not a superscript — // excluding it from the measure visibly right-shifts the row, so the whole // string centres there. - GSize bsz = graphics_text_layout_get_content_size( - EV_SMALL_RECT ? temp : body, tf, - GRect(0, 0, W, 46), GTextOverflowModeFill, GTextAlignmentLeft); + GSize bsz = + graphics_text_layout_get_content_size(EV_SMALL_RECT ? temp : body, tf, GRect(0, 0, W, 46), + GTextOverflowModeFill, GTextAlignmentLeft); // BOTH shapes: optical centring, degree sign excluded from the measure (it reads as an // appendage; true centring of the full string looks left-shifted). Round briefly used // true centring while dials flanked this row — the dials are gone, so the override is too. - graphics_draw_text(ctx, temp, tf, - GRect(tdx + (W - bsz.w) / 2, EV_TEMP_Y, W, 46), + graphics_draw_text(ctx, temp, tf, GRect(tdx + (W - bsz.w) / 2, EV_TEMP_Y, W, 46), GTextOverflowModeFill, GTextAlignmentLeft, NULL); } // UV + precipitation meters at the bottom. The UV dial takes the WHO @@ -435,18 +463,16 @@ void expanded_view_draw_glance_content(GContext *ctx, int W, int tdx, const char // Wind on the LEFT, rain on the RIGHT (matching the design). Fill level = how windy / how // rainy; the icon rides on top so it stays legible over the fill. { - (void)wind; // wind was dropped from this screen by design; - // the plumbing stays for whatever wants it next. + (void)wind; // wind was dropped from this screen by design; + // the plumbing stays for whatever wants it next. prv_draw_precip_pill(ctx, W, tdx, precip, owner); // tall from origin.y+1, so -12 left it measurably 1px low (audit finding). - } if (uv >= 0) { char uvbuf[12]; snprintf(uvbuf, sizeof(uvbuf), "%d", uv); - weather_app_layout_draw_uv_bar(ctx, GPoint(W / 2 + tdx, PBL_DISPLAY_HEIGHT / 2), - EV_UV_BAR_Y, uv, uvbuf, WeatherUvBarCompact, - i18n_get("CURRENT UV", owner)); + weather_app_layout_draw_uv_bar(ctx, GPoint(W / 2 + tdx, PBL_DISPLAY_HEIGHT / 2), EV_UV_BAR_Y, + uv, uvbuf, WeatherUvBarCompact, i18n_get("CURRENT UV", owner)); } #else if (EV_SMALL_RECT) { @@ -454,17 +480,21 @@ void expanded_view_draw_glance_content(GContext *ctx, int W, int tdx, const char // carries both readouts instead. char meters[56]; char uv_part[24], rain_part[28]; - if (uv >= 0) snprintf(uv_part, sizeof(uv_part), i18n_get("UV %d", owner), uv); - else snprintf(uv_part, sizeof(uv_part), "%s", i18n_get("UV --", owner)); - if (precip >= 0) snprintf(rain_part, sizeof(rain_part), i18n_get("RAIN %d%%", owner), precip); - else snprintf(rain_part, sizeof(rain_part), "%s", i18n_get("RAIN --", owner)); + if (uv >= 0) + snprintf(uv_part, sizeof(uv_part), i18n_get("UV %d", owner), uv); + else + snprintf(uv_part, sizeof(uv_part), "%s", i18n_get("UV --", owner)); + if (precip >= 0) + snprintf(rain_part, sizeof(rain_part), i18n_get("RAIN %d%%", owner), precip); + else + snprintf(rain_part, sizeof(rain_part), "%s", i18n_get("RAIN --", owner)); snprintf(meters, sizeof(meters), "%s %s", uv_part, rain_part); graphics_context_set_text_color(ctx, GColorBlack); graphics_draw_text(ctx, meters, fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD), - GRect(tdx, EV_METERS_Y, W, 22), - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + GRect(tdx, EV_METERS_Y, W, 22), GTextOverflowModeTrailingEllipsis, + GTextAlignmentCenter, NULL); } else { - prv_draw_gauge(ctx, W / 4 + EV_GAUGE_INSET + tdx, EV_GAUGE_CY, EV_GAUGE_R, + prv_draw_gauge(ctx, W / 4 + EV_GAUGE_INSET + tdx, EV_GAUGE_CY, EV_GAUGE_R, i18n_get("UV", owner), uv, 11, "", uv < 0, prv_uv_severity_color(uv)); prv_draw_gauge(ctx, 3 * W / 4 - EV_GAUGE_INSET + tdx, EV_GAUGE_CY, EV_GAUGE_R, i18n_get("RAIN", owner), precip, 100, "%", precip < 0, GColorVividCerulean); @@ -473,7 +503,8 @@ void expanded_view_draw_glance_content(GContext *ctx, int W, int tdx, const char } static void prv_canvas_draw(Layer *layer, GContext *ctx) { - if (!s_ev) return; + if (!s_ev) + return; GRect b = layer_get_bounds(layer); const int W = b.size.w; @@ -481,19 +512,19 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { graphics_fill_rect(ctx, b, 0, GCornerNone); // Icon stays fixed (the hero fly placed it); everything else slides in from the left + bounces. - // Position (EV_ICON_Y) + size (EV_ICON_SIZE) match forecast_list.c's fly_dest for a seamless hand-off. + // Position (EV_ICON_Y) + size (EV_ICON_SIZE) match forecast_list.c's fly_dest for a seamless + // hand-off. if (s_ev->icon) { GSize sz = gdraw_command_image_get_bounds_size(s_ev->icon); gdraw_command_image_draw(ctx, s_ev->icon, GPoint((W - sz.w) / 2, EV_ICON_Y)); } - const int tdx = s_ev->text_active - ? (int)interpolate_moook_soft(s_ev->text_p, -W, 0, 3) : 0; + const int tdx = s_ev->text_active ? (int)interpolate_moook_soft(s_ev->text_p, -W, 0, 3) : 0; if (s_ev->swap_active) { // Body without the status bar; the last-updated -> time swap is drawn on top: both slide RIGHT, // "Last updated" exiting off the right while the time swoops in from the left, trailing it. - expanded_view_draw_glance_content(ctx, W, tdx, NULL, s_ev->sunset_str, s_ev->temp_str, - s_ev->uv, s_ev->precip, s_ev->wind, s_ev); + expanded_view_draw_glance_content(ctx, W, tdx, NULL, s_ev->sunset_str, s_ev->temp_str, s_ev->uv, + s_ev->precip, s_ev->wind, s_ev); char time_str[10]; prv_build_time(time_str, sizeof(time_str)); const int sx = (int)interpolate_moook_soft(s_ev->swap_p, 0, W, 3); @@ -506,7 +537,10 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { } else { char time_str[10]; const char *status = s_ev->updated_str; - if (!s_ev->show_updated) { prv_build_time(time_str, sizeof(time_str)); status = time_str; } + if (!s_ev->show_updated) { + prv_build_time(time_str, sizeof(time_str)); + status = time_str; + } expanded_view_draw_glance_content(ctx, W, tdx, status, s_ev->sunset_str, s_ev->temp_str, s_ev->uv, s_ev->precip, s_ev->wind, s_ev); } @@ -534,40 +568,46 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { { const int arrow_band = 18; const GRect down_frame = GRect(0, b.size.h - arrow_band, W, arrow_band); - content_indicator_draw_arrow(ctx, &down_frame, ContentIndicatorDirectionDown, - GColorBlack, GColorWhite, GAlignCenter); + content_indicator_draw_arrow(ctx, &down_frame, ContentIndicatorDirectionDown, GColorBlack, + GColorWhite, GAlignCenter); } #endif } // ---- SELECT -> globe: slide the whole card out to the left ---------------- // The card's canvas layer slides one screen-width left with the same moook bounce the globe uses -// for its entrance; the vacated area is the window's white background (no base flash). On completion -// on_select fires and weather.c pushes the globe sliding in from the right. +// for its entrance; the vacated area is the window's white background (no base flash). On +// completion on_select fires and weather.c pushes the globe sliding in from the right. // Slide duration + interpolation are shared with globe_view via weather_math.h // (WEATHER_HSLIDE_MS / weather_interpolate_moook_soft1) so the pair can't drift. // BOTH shapes. static void prv_slide_out_stopped(Animation *anim, bool finished, void *context) { - if (!s_ev) return; - s_ev->slide_anim = NULL; // property animation auto-destroys after a normal stop + if (!s_ev) + return; + s_ev->slide_anim = NULL; // property animation auto-destroys after a normal stop if (finished && s_ev->on_select) { - s_ev->on_select(s_ev->on_select_ctx); // push globe (slide-in-right) + dismiss this card + s_ev->on_select(s_ev->on_select_ctx); // push globe (slide-in-right) + dismiss this card } } static void prv_start_slide_out_left(void) { - if (!s_ev || !s_ev->canvas || s_ev->slide_anim) return; + if (!s_ev || !s_ev->canvas || s_ev->slide_anim) + return; GRect from = layer_get_frame(s_ev->canvas); GRect to = from; - to.origin.x -= from.size.w; // one screen-width to the left, off screen + to.origin.x -= from.size.w; // one screen-width to the left, off screen PropertyAnimation *pa = property_animation_create_layer_frame(s_ev->canvas, &from, &to); - if (!pa) { if (s_ev->on_select) s_ev->on_select(s_ev->on_select_ctx); return; } + if (!pa) { + if (s_ev->on_select) + s_ev->on_select(s_ev->on_select_ctx); + return; + } Animation *a = (Animation *)pa; animation_set_duration(a, WEATHER_HSLIDE_MS); animation_set_custom_interpolation(a, weather_interpolate_moook_soft1); - animation_set_handlers(a, (AnimationHandlers){ .stopped = prv_slide_out_stopped }, NULL); + animation_set_handlers(a, (AnimationHandlers){.stopped = prv_slide_out_stopped}, NULL); s_ev->slide_anim = a; animation_schedule(a); } @@ -575,134 +615,151 @@ static void prv_start_slide_out_left(void) { // Globe-BACK entrance: the whole card starts one screen-width to the left (set in prv_window_load) // and slides home with the same moook bounce — the mirror of the SELECT slide-out-left. static void prv_slide_in_stopped(Animation *anim, bool finished, void *context) { - if (s_ev) s_ev->slide_anim = NULL; // property animation auto-destroys after a normal stop + if (s_ev) + s_ev->slide_anim = NULL; // property animation auto-destroys after a normal stop } static void prv_start_slide_in_left(void) { - if (!s_ev || !s_ev->canvas || s_ev->slide_anim) return; - GRect from = layer_get_frame(s_ev->canvas); // off-left (-W), set in prv_window_load + if (!s_ev || !s_ev->canvas || s_ev->slide_anim) + return; + GRect from = layer_get_frame(s_ev->canvas); // off-left (-W), set in prv_window_load GRect to = from; - to.origin.x += from.size.w; // bring it home to x = 0 + to.origin.x += from.size.w; // bring it home to x = 0 PropertyAnimation *pa = property_animation_create_layer_frame(s_ev->canvas, &from, &to); - if (!pa) { layer_set_frame(s_ev->canvas, to); return; } + if (!pa) { + layer_set_frame(s_ev->canvas, to); + return; + } Animation *a = (Animation *)pa; animation_set_duration(a, WEATHER_HSLIDE_MS); animation_set_custom_interpolation(a, weather_interpolate_moook_soft1); - animation_set_handlers(a, (AnimationHandlers){ .stopped = prv_slide_in_stopped }, NULL); + animation_set_handlers(a, (AnimationHandlers){.stopped = prv_slide_in_stopped}, NULL); s_ev->slide_anim = a; animation_schedule(a); } - // ---- Navigation ----------------------------------------------------------- static void prv_click_down(ClickRecognizerRef r, void *ctx) { - if (s_ev && s_ev->on_down) s_ev->on_down(s_ev->on_down_ctx); // -> forecast + if (s_ev && s_ev->on_down) + s_ev->on_down(s_ev->on_down_ctx); // -> forecast } static void prv_click_select(ClickRecognizerRef r, void *ctx) { - if (s_ev && s_ev->on_select && !s_ev->slide_anim) prv_start_slide_out_left(); // -> globe + if (s_ev && s_ev->on_select && !s_ev->slide_anim) + prv_start_slide_out_left(); // -> globe } // ---- Touch input (touch colour platforms) ---- #ifdef CONFIG_TOUCH -#define SWIPE_THRESHOLD 20 // px; same tap/swipe split as the other screens +#define SWIPE_THRESHOLD 20 // px; same tap/swipe split as the other screens static void prv_touch_handler(const TouchEvent *event, void *context) { (void)context; - if (!s_ev) return; + if (!s_ev) + return; if (event->type == TouchEvent_Touchdown) { s_ev->touch_start_x = event->x; s_ev->touch_start_y = event->y; - s_ev->touch_active = true; + s_ev->touch_active = true; } else if (event->type == TouchEvent_Liftoff && s_ev->touch_active) { s_ev->touch_active = false; - if (s_ev->slide_anim) return; // card is mid-slide — same guard as SELECT + if (s_ev->slide_anim) + return; // card is mid-slide — same guard as SELECT int16_t dx = event->x - s_ev->touch_start_x; int16_t dy = event->y - s_ev->touch_start_y; int16_t adx = dx < 0 ? -dx : dx; int16_t ady = dy < 0 ? -dy : dy; - if (adx <= SWIPE_THRESHOLD && ady <= SWIPE_THRESHOLD) return; // tap — no action + if (adx <= SWIPE_THRESHOLD && ady <= SWIPE_THRESHOLD) + return; // tap — no action if (adx > ady) { if (dx < 0 && s_ev->on_select) { // Swipe left -> globe (the card slides out left, mirroring SELECT). prv_start_slide_out_left(); } } else if (dy < 0 && s_ev->on_down) { - s_ev->on_down(s_ev->on_down_ctx); // swipe up -> back DOWN to the forecast (mirrors DOWN) + s_ev->on_down(s_ev->on_down_ctx); // swipe up -> back DOWN to the forecast (mirrors DOWN) } } } #endif static void prv_click_provider(void *ctx) { - window_single_click_subscribe(BUTTON_ID_DOWN, prv_click_down); // -> forecast - window_single_click_subscribe(BUTTON_ID_BACK, prv_click_down); // -> forecast + window_single_click_subscribe(BUTTON_ID_DOWN, prv_click_down); // -> forecast + window_single_click_subscribe(BUTTON_ID_BACK, prv_click_down); // -> forecast window_single_click_subscribe(BUTTON_ID_SELECT, prv_click_select); // -> globe (slide-in-right) } // ---- Content entrance: slide in from the left + bounce -------------------- static void prv_text_in_update(Animation *anim, AnimationProgress progress) { - if (!s_ev) return; + if (!s_ev) + return; s_ev->text_p = progress; - if (s_ev->canvas) layer_mark_dirty(s_ev->canvas); + if (s_ev->canvas) + layer_mark_dirty(s_ev->canvas); } static void prv_text_in_stopped(Animation *anim, bool finished, void *context) { if (s_ev) { s_ev->text_active = false; s_ev->text_anim = NULL; - if (s_ev->canvas) layer_mark_dirty(s_ev->canvas); + if (s_ev->canvas) + layer_mark_dirty(s_ev->canvas); } animation_destroy(anim); } -static const AnimationImplementation s_text_in_impl = { .update = prv_text_in_update }; +static const AnimationImplementation s_text_in_impl = {.update = prv_text_in_update}; static void prv_start_text_in(void) { - if (!s_ev || s_ev->text_anim) return; + if (!s_ev || s_ev->text_anim) + return; s_ev->text_active = true; s_ev->text_p = 0; s_ev->text_anim = animation_create(); animation_set_implementation(s_ev->text_anim, &s_text_in_impl); animation_set_duration(s_ev->text_anim, interpolate_moook_soft_duration(3)); - animation_set_curve(s_ev->text_anim, AnimationCurveLinear); // interpolate_moook_soft shapes it - animation_set_handlers(s_ev->text_anim, - (AnimationHandlers){ .stopped = prv_text_in_stopped }, NULL); + animation_set_curve(s_ev->text_anim, AnimationCurveLinear); // interpolate_moook_soft shapes it + animation_set_handlers(s_ev->text_anim, (AnimationHandlers){.stopped = prv_text_in_stopped}, + NULL); animation_schedule(s_ev->text_anim); } // ---- Status bar: "Last updated ..." -> time swap (2s after appear) -------- static void prv_swap_update(Animation *anim, AnimationProgress progress) { - if (!s_ev) return; + if (!s_ev) + return; s_ev->swap_p = progress; - if (s_ev->canvas) layer_mark_dirty(s_ev->canvas); + if (s_ev->canvas) + layer_mark_dirty(s_ev->canvas); } static void prv_swap_stopped(Animation *anim, bool finished, void *context) { if (s_ev) { s_ev->swap_active = false; - s_ev->show_updated = false; // the status bar now rests on the time + s_ev->show_updated = false; // the status bar now rests on the time s_ev->swap_anim = NULL; - if (s_ev->canvas) layer_mark_dirty(s_ev->canvas); + if (s_ev->canvas) + layer_mark_dirty(s_ev->canvas); } animation_destroy(anim); } -static const AnimationImplementation s_swap_impl = { .update = prv_swap_update }; +static const AnimationImplementation s_swap_impl = {.update = prv_swap_update}; static void prv_start_swap(void) { - if (!s_ev || s_ev->swap_anim || !s_ev->show_updated) return; + if (!s_ev || s_ev->swap_anim || !s_ev->show_updated) + return; s_ev->swap_active = true; s_ev->swap_p = 0; s_ev->swap_anim = animation_create(); animation_set_implementation(s_ev->swap_anim, &s_swap_impl); animation_set_duration(s_ev->swap_anim, interpolate_moook_soft_duration(3)); - animation_set_curve(s_ev->swap_anim, AnimationCurveLinear); // interpolate_moook_soft shapes it - animation_set_handlers(s_ev->swap_anim, - (AnimationHandlers){ .stopped = prv_swap_stopped }, NULL); + animation_set_curve(s_ev->swap_anim, AnimationCurveLinear); // interpolate_moook_soft shapes it + animation_set_handlers(s_ev->swap_anim, (AnimationHandlers){.stopped = prv_swap_stopped}, NULL); animation_schedule(s_ev->swap_anim); } static void prv_updated_timer_cb(void *ctx) { - if (!s_ev) return; + if (!s_ev) + return; s_ev->updated_timer = NULL; prv_start_swap(); } @@ -710,7 +767,8 @@ static void prv_updated_timer_cb(void *ctx) { // ---- Window lifecycle ----------------------------------------------------- static void prv_window_appear(Window *window) { - if (!s_ev) return; + if (!s_ev) + return; #ifdef CONFIG_TOUCH touch_service_subscribe(prv_touch_handler, s_ev); #endif @@ -721,15 +779,22 @@ static void prv_window_appear(Window *window) { // Play the entrance animation (latched off after the first appearance so button-nav re-appears // don't replay it). Static = no entrance (the forecast's hero icon-fly already animated it in). switch (s_ev->entrance) { - case ExpandedViewEntranceTextFromLeft: prv_start_text_in(); break; - case ExpandedViewEntranceCardFromLeft: prv_start_slide_in_left(); break; - case ExpandedViewEntranceStatic: default: break; + case ExpandedViewEntranceTextFromLeft: + prv_start_text_in(); + break; + case ExpandedViewEntranceCardFromLeft: + prv_start_slide_in_left(); + break; + case ExpandedViewEntranceStatic: + default: + break; } s_ev->entrance = ExpandedViewEntranceStatic; } static void prv_window_load(Window *window) { - if (!s_ev) return; + if (!s_ev) + return; window_set_background_color(window, GColorWhite); GRect bounds = layer_get_bounds(window_get_root_layer(window)); GRect frame = bounds; @@ -760,34 +825,47 @@ static void prv_window_unload(Window *window) { s_ev->updated_timer = NULL; } if (s_ev && s_ev->swap_anim) { - animation_unschedule(s_ev->swap_anim); // fires prv_swap_stopped -> destroys + NULLs it + animation_unschedule(s_ev->swap_anim); // fires prv_swap_stopped -> destroys + NULLs it } if (s_ev && s_ev->text_anim) { - animation_unschedule(s_ev->text_anim); // fires prv_text_in_stopped -> destroys + NULLs it + animation_unschedule(s_ev->text_anim); // fires prv_text_in_stopped -> destroys + NULLs it } if (s_ev && s_ev->slide_anim) { animation_unschedule(s_ev->slide_anim); // fires prv_slide_*_stopped -> NULLs it } if (s_ev) { - if (s_ev->icon) { gdraw_command_image_destroy(s_ev->icon); s_ev->icon = NULL; } - if (s_ev->canvas) { layer_destroy(s_ev->canvas); s_ev->canvas = NULL; } + if (s_ev->icon) { + gdraw_command_image_destroy(s_ev->icon); + s_ev->icon = NULL; + } + if (s_ev->canvas) { + layer_destroy(s_ev->canvas); + s_ev->canvas = NULL; + } } window_destroy(window); - if (s_ev) { i18n_free_all(s_ev); free(s_ev); s_ev = NULL; } + if (s_ev) { + i18n_free_all(s_ev); + free(s_ev); + s_ev = NULL; + } } // ---- Public API ----------------------------------------------------------- -void expanded_view_push(const WeatherLocationForecast *today, - int16_t lat_e2, int16_t lon_e2, int16_t utc_off_min, - ExpandedViewEntrance entrance, - void (*on_down)(void *ctx), void *on_down_ctx, - void (*on_select)(void *ctx), void *on_select_ctx) { - if (s_ev) return; +void expanded_view_push(const WeatherLocationForecast *today, int16_t lat_e2, int16_t lon_e2, + int16_t utc_off_min, ExpandedViewEntrance entrance, + void (*on_down)(void *ctx), void *on_down_ctx, void (*on_select)(void *ctx), + void *on_select_ctx) { + if (s_ev) + return; s_ev = calloc(1, sizeof(ExpandedViewData)); - if (!s_ev) return; - s_ev->on_down = on_down; s_ev->on_down_ctx = on_down_ctx; - s_ev->on_select = on_select; s_ev->on_select_ctx = on_select_ctx; + if (!s_ev) + return; + s_ev->on_down = on_down; + s_ev->on_down_ctx = on_down_ctx; + s_ev->on_select = on_select; + s_ev->on_select_ctx = on_select_ctx; s_ev->entrance = entrance; // Round's status band is a narrow chord — no room for "Last updated H:MM" at this size, // and shrinking or moving it was rejected. It rests on the TIME from the outset, so the @@ -796,15 +874,19 @@ void expanded_view_push(const WeatherLocationForecast *today, prv_set_from_forecast(today, lat_e2, lon_e2, utc_off_min); s_ev->window = window_create(); - if (!s_ev->window) { free(s_ev); s_ev = NULL; return; } + if (!s_ev->window) { + free(s_ev); + s_ev = NULL; + return; + } window_set_window_handlers(s_ev->window, (WindowHandlers){ - .load = prv_window_load, - .appear = prv_window_appear, + .load = prv_window_load, + .appear = prv_window_appear, #ifdef CONFIG_TOUCH - .disappear = prv_window_disappear, + .disappear = prv_window_disappear, #endif - .unload = prv_window_unload, - }); + .unload = prv_window_unload, + }); window_set_click_config_provider(s_ev->window, prv_click_provider); // Un-animated: the forecast's hero icon-fly is the entrance; the card's static icon takes over // exactly where the flown icon landed (a system slide would fight that hand-off). @@ -821,9 +903,11 @@ bool expanded_view_is_showing(void) { return s_ev && s_ev->window; } -void expanded_view_update_data(const WeatherLocationForecast *today, - int16_t lat_e2, int16_t lon_e2, int16_t utc_off_min) { - if (!s_ev) return; +void expanded_view_update_data(const WeatherLocationForecast *today, int16_t lat_e2, int16_t lon_e2, + int16_t utc_off_min) { + if (!s_ev) + return; prv_set_from_forecast(today, lat_e2, lon_e2, utc_off_min); - if (s_ev->canvas) layer_mark_dirty(s_ev->canvas); + if (s_ev->canvas) + layer_mark_dirty(s_ev->canvas); } diff --git a/src/fw/apps/system/weather/expanded_view.h b/src/fw/apps/system/weather/expanded_view.h index a27d619025..7c69299628 100644 --- a/src/fw/apps/system/weather/expanded_view.h +++ b/src/fw/apps/system/weather/expanded_view.h @@ -17,13 +17,15 @@ // icon, tighter rows, and the two dials become a single meters text line. #define EV_SMALL_RECT (!PBL_ROUND && PBL_DISPLAY_HEIGHT < 200) #define EV_ICON_SIZE (EV_SMALL_RECT ? 56 : 74) -#define EV_ICON_Y PBL_IF_ROUND_ELSE(38, (EV_SMALL_RECT ? 24 : 26)) +#define EV_ICON_Y PBL_IF_ROUND_ELSE(38, (EV_SMALL_RECT ? 24 : 26)) // How the card animates in when pushed. typedef enum { - ExpandedViewEntranceStatic = 0, // no entrance — the forecast's hero icon-fly already placed it - ExpandedViewEntranceTextFromLeft, // the glance text slides in from the left (arriving from globe DOWN) - ExpandedViewEntranceCardFromLeft, // the whole card slides in from the left (arriving from globe BACK) + ExpandedViewEntranceStatic = 0, // no entrance — the forecast's hero icon-fly already placed it + ExpandedViewEntranceTextFromLeft, // the glance text slides in from the left (arriving from globe + // DOWN) + ExpandedViewEntranceCardFromLeft, // the whole card slides in from the left (arriving from globe + // BACK) } ExpandedViewEntrance; // Full-screen "expanded weather" card for TODAY — a standalone recreation of the @@ -52,18 +54,17 @@ typedef enum { //! run never reaches unload, so the next launch would read stale pointers). void expanded_view_reset(void); -void expanded_view_push(const WeatherLocationForecast *today, - int16_t lat_e2, int16_t lon_e2, int16_t utc_off_min, - ExpandedViewEntrance entrance, - void (*on_down)(void *ctx), void *on_down_ctx, - void (*on_select)(void *ctx), void *on_select_ctx); +void expanded_view_push(const WeatherLocationForecast *today, int16_t lat_e2, int16_t lon_e2, + int16_t utc_off_min, ExpandedViewEntrance entrance, + void (*on_down)(void *ctx), void *on_down_ctx, void (*on_select)(void *ctx), + void *on_select_ctx); // Format the glance strings (sunset title, "high/low°", location) exactly as the card renders them. // Used by the forecast to animate the identical text in during the hero icon-fly. -void expanded_view_format_glance(const WeatherLocationForecast *today, int16_t lat_e2, int16_t lon_e2, - int16_t utc_off_min, - char *sunset, size_t sunset_sz, char *temp, size_t temp_sz, - char *loc, size_t loc_sz); +void expanded_view_format_glance(const WeatherLocationForecast *today, int16_t lat_e2, + int16_t lon_e2, int16_t utc_off_min, char *sunset, + size_t sunset_sz, char *temp, size_t temp_sz, char *loc, + size_t loc_sz); // Draw the whole card body EXCEPT the icon (status bar, sunset title, high/low°, UV + RAIN meters), // every element shifted right by `tdx`. `status` is the status-bar text (the time, or "Last updated @@ -83,5 +84,5 @@ bool expanded_view_is_showing(void); // Refresh the displayed data when a new record arrives while the card is up. // No-op if the card is not currently showing. -void expanded_view_update_data(const WeatherLocationForecast *today, - int16_t lat_e2, int16_t lon_e2, int16_t utc_off_min); +void expanded_view_update_data(const WeatherLocationForecast *today, int16_t lat_e2, int16_t lon_e2, + int16_t utc_off_min); diff --git a/src/fw/apps/system/weather/forecast_list.c b/src/fw/apps/system/weather/forecast_list.c index 07c6813abf..a5a0102525 100644 --- a/src/fw/apps/system/weather/forecast_list.c +++ b/src/fw/apps/system/weather/forecast_list.c @@ -5,14 +5,14 @@ #include "pbl/services/i18n/i18n.h" #include "expanded_view.h" #include "applib/ui/app_window_stack.h" -#include "applib/ui/status_bar_layer.h" // status-bar height/offset constants (top time) +#include "applib/ui/status_bar_layer.h" // status-bar height/offset constants (top time) #include "weather_math.h" -#include "pbl/services/clock.h" // clock_copy_time_string — notification-style top time +#include "pbl/services/clock.h" // clock_copy_time_string — notification-style top time #include "applib/graphics/gdraw_command_transforms.h" #include "applib/graphics/gdraw_command.h" #include "applib/graphics/gdraw_command_list.h" #include "applib/graphics/gdraw_command_image.h" -#include "applib/graphics/gpath.h" // octagonal animated-sun body (matches static PDC) +#include "applib/graphics/gpath.h" // octagonal animated-sun body (matches static PDC) #include "applib/applib_malloc.auto.h" #include "applib/ui/animation.h" #include "applib/ui/animation_interpolate.h" @@ -28,22 +28,21 @@ // Other rect platforms keep the condensed scrolling list. The geometry inside the shared // draw branches on PBL_ROUND for the round-circle vs the emery-rectangle layout. -#define MAX_ROWS 7 -#define ROWS_VISIBLE 4 -#define ICON_SIZE 25 -#define ICON_X 8 -#define DAY_LABEL_X 50 -#define DAY_LABEL_W PBL_IF_ROUND_ELSE(78, 34) +#define MAX_ROWS 7 +#define ROWS_VISIBLE 4 +#define ICON_SIZE 25 +#define ICON_X 8 +#define DAY_LABEL_X 50 +#define DAY_LABEL_W PBL_IF_ROUND_ELSE(78, 34) #define DAY_CONDITION_DIVIDER_GAP 4 #define CONDITION_TEXT_LEFT_GAP 11 #define CONDITION_RIGHT_MARGIN 4 -#define ANIM_MS 200 -#define LOCATION_BAR_H 18 -#define LOCATION_BAR_Y PBL_IF_ROUND_ELSE(20, 0) -#define LIST_TOP_Y (LOCATION_BAR_Y + LOCATION_BAR_H) +#define ANIM_MS 200 +#define LOCATION_BAR_H 18 +#define LOCATION_BAR_Y PBL_IF_ROUND_ELSE(20, 0) +#define LIST_TOP_Y (LOCATION_BAR_Y + LOCATION_BAR_H) #define ROUND_SIDE_INSET PBL_IF_ROUND_ELSE(28, 0) -#define ROUND_BAR_INSET PBL_IF_ROUND_ELSE(44, 0) - +#define ROUND_BAR_INSET PBL_IF_ROUND_ELSE(44, 0) #define prv_weather_bg_color weather_type_bg_color #define prv_icon_res weather_type_icon_tiny_resource @@ -51,20 +50,20 @@ // ---- State ---- typedef struct { - Window *window; - Layer *canvas; + Window *window; + Layer *canvas; WeatherLocationForecast days[MAX_ROWS]; - size_t num_days; - int scroll_offset_px; - int scroll_from; - int scroll_to; + size_t num_days; + int scroll_offset_px; + int scroll_from; + int scroll_to; Animation *anim; GBitmap *icons[MAX_ROWS]; - GFont day_font; - GFont condition_font; - GFont loc_font; - char condition_str[MAX_ROWS][32]; // pre-formatted condition strings - int row_height; // computed at load: (screen_h - LOCATION_BAR_H) / ROWS_VISIBLE + GFont day_font; + GFont condition_font; + GFont loc_font; + char condition_str[MAX_ROWS][32]; // pre-formatted condition strings + int row_height; // computed at load: (screen_h - LOCATION_BAR_H) / ROWS_VISIBLE #ifdef CONFIG_TOUCH GDrawCommandImage *pdc_icons[MAX_ROWS]; // official PebbleOS weather PDC icons (round 5-day) GDrawCommandImage *today_pdc; // larger today icon for the summary header @@ -76,102 +75,103 @@ typedef struct { // as quanta inside the update (display research mixed timer cadences beat // against the ~20-25ms display period and read as judder). Animation *icon_drv; - uint32_t icon_drv_last_ms; - uint32_t icon_drv_acc_ms; + uint32_t icon_drv_last_ms; + uint32_t icon_drv_acc_ms; #endif - int32_t sun_phase; // ray rotation angle (0..TRIG_MAX_ANGLE) - int idle_ticks; // animation ticks since the last interaction - int icon_fade; // R5_FADE_MAX = animating … 0 = frozen static icon + int32_t sun_phase; // ray rotation angle (0..TRIG_MAX_ANGLE) + int idle_ticks; // animation ticks since the last interaction + int icon_fade; // R5_FADE_MAX = animating … 0 = frozen static icon // Cached so the 40ms animation redraw never re-runs expensive text layout (which was // starving the system task that services touch). Recomputed only on load / data update. - int16_t today_icon_x; // today icon left-x (centred over the date string) - void *today_cond_font; // GFont for today's condition phrase - bool today_header_dirty; // recompute today_icon_x/font (set on data change) - char daydate_cache[24]; // "Sat, Jul 04" — refreshed at local midnight - char weekday_cache[PBL_IF_ROUND_ELSE(6, 5)][8]; // fan weekday labels ([R5_MAX_COLS]) - time_t date_cache_expiry; // next local midnight (0 = caches not built yet) + int16_t today_icon_x; // today icon left-x (centred over the date string) + void *today_cond_font; // GFont for today's condition phrase + bool today_header_dirty; // recompute today_icon_x/font (set on data change) + char daydate_cache[24]; // "Sat, Jul 04" — refreshed at local midnight + char weekday_cache[PBL_IF_ROUND_ELSE(6, 5)][8]; // fan weekday labels ([R5_MAX_COLS]) + time_t date_cache_expiry; // next local midnight (0 = caches not built yet) // SELECT expand: the today icon squash-stretches off-left before the condensed view is pushed. - bool select_exiting; - int32_t select_exit_p; // 0..ANIMATION_NORMALIZED_MAX + bool select_exiting; + int32_t select_exit_p; // 0..ANIMATION_NORMALIZED_MAX // UP-to-card "hero" transition: today's icon is lifted out of the squash-down and instead // scale-segment zooms from its header rect to the expanded card's 80x80 icon rect (the exact // Timeline pin->card icon zoom), synced to the squash animation's progress. - bool flying_icon; - GRect fly_src; // today icon rect on the mainscreen (screen coords) - GRect fly_dest; // card icon rect (screen coords; matches expanded_view) - GDrawCommandImage *fly_pdc; // LARGE weather PDC (writable clone), owned - GPointIndexLookup *fly_lookup; // delay-by-distance lookup — deterministic for the - // whole fly, built once on its first frame, owned - char fly_sunset[40]; // card glance data, slid in from the left during the fly - char fly_temp[16]; // (synced to the icon landing) so the card can then - int fly_uv; // appear static — see forecast_list_set_glance - int fly_precip; - int fly_wind; + bool flying_icon; + GRect fly_src; // today icon rect on the mainscreen (screen coords) + GRect fly_dest; // card icon rect (screen coords; matches expanded_view) + GDrawCommandImage *fly_pdc; // LARGE weather PDC (writable clone), owned + GPointIndexLookup *fly_lookup; // delay-by-distance lookup — deterministic for the + // whole fly, built once on its first frame, owned + char fly_sunset[40]; // card glance data, slid in from the left during the fly + char fly_temp[16]; // (synced to the icon landing) so the card can then + int fly_uv; // appear static — see forecast_list_set_glance + int fly_precip; + int fly_wind; // DOWN/UP "header scroll" transition (emery / !PBL_ROUND only): today header slides UP off // the top while the 5-day section rises to take over the top, driven by the SAME 330ms // interpolate_moook_soft curve Pebble Timeline uses for its card slide (identical bounce). - bool header_shown; // true = State A (header visible); false = State B - int header_scroll; // px the header is currently translated UP (0..84) - int header_from; // moook animation start value for header_scroll - int header_to; // moook animation end value for header_scroll - bool header_hasted; // transition started mid-flight (Timeline "hasted") + bool header_shown; // true = State A (header visible); false = State B + int header_scroll; // px the header is currently translated UP (0..84) + int header_from; // moook animation start value for header_scroll + int header_to; // moook animation end value for header_scroll + bool header_hasted; // transition started mid-flight (Timeline "hasted") // Timeline per-icon transition effects (squash/stretch + zoom lines). Captured straight from // the running Animation each frame so they share the EXACT moook normalized that drives the // slide — the same source Timeline feeds gdraw_command_*_scale_segmented_to + its speed lines. - bool fx_active; // a header transition is currently animating - int32_t fx_progress; // raw AnimationProgress 0..ANIMATION_NORMALIZED_MAX - GPointIndexLookup *jelly_lookup[6]; // per-icon delay-by-distance lookups ([0]=today, - // [1+i]=fan icon i) — deterministic per transition, - // built once on its first frame, freed on start/stop + bool fx_active; // a header transition is currently animating + int32_t fx_progress; // raw AnimationProgress 0..ANIMATION_NORMALIZED_MAX + GPointIndexLookup *jelly_lookup[6]; // per-icon delay-by-distance lookups ([0]=today, + // [1+i]=fan icon i) — deterministic per transition, + // built once on its first frame, freed on start/stop // Clock-burst transition (DOWN again while already scrolled). Stage 1 = whole section exits up // off the top while the bottom nav dot decouples and flies to screen centre; Stage 2 = the // centred dot orbital-shakes; then it hands off to the clock face. - int clock_fx; // 0 none, 1 stage-1 (exit + fly), 2 stage-2 (shake) - int fx_dot_y; // burst dot centre y (flies R5_DOT_REST_Y -> centre) - int fx_shake_dx, fx_shake_dy; // stage-2 orbital shake offset from centre - Animation *clock_anim; // separate from `anim` so the two never collide + int clock_fx; // 0 none, 1 stage-1 (exit + fly), 2 stage-2 (shake) + int fx_dot_y; // burst dot centre y (flies R5_DOT_REST_Y -> centre) + int fx_shake_dx, fx_shake_dy; // stage-2 orbital shake offset from centre + Animation *clock_anim; // separate from `anim` so the two never collide // SELECT -> weather report transition: squash-left, ball roll-in, paper unfold. - int report_fx; // 0 none, 1 squash-left, 2 ball roll, 3 unfold+hold - int fx_ball_x; // ball centre x (rolls W+14 -> W/2, y = R5_SCREEN_CY) - AnimationProgress report_p; // raw stage-3 progress (unfold_p = clip(p*6/5)) - int32_t report_angle; // frozen unfold fan start-ray (picked at stage-3 arm) + int report_fx; // 0 none, 1 squash-left, 2 ball roll, 3 unfold+hold + int fx_ball_x; // ball centre x (rolls W+14 -> W/2, y = R5_SCREEN_CY) + AnimationProgress report_p; // raw stage-3 progress (unfold_p = clip(p*6/5)) + int32_t report_angle; // frozen unfold fan start-ray (picked at stage-3 arm) // ---- Whole-screen jelly squash-stretch (clock exit/return, card, SELECT exit). Shared: // weather_render_squash addresses rows absolutely and clamps to each row's chord, so it // is correct on the round framebuffer too. ---- - AnimationProgress squash_in_p; // 0 → MAX - Animation *squash_in_anim; - int squash_mode; // 0 = inactive; else SQUASH_DROP_IN / _DOWN_EXIT / _RISE_IN - uint8_t *squash_scratch; // full-screen snapshot, re-sampled while overwriting the fb - bool squash_captured; // ROUND capture-once: snapshot filled — later frames skip - // the scene render + fb copy and only resample (step 2) - bool refresh_deferred; // BOTH shapes: a phone sync landed mid-report-scene; - // the heavy visual reload waits for the scene end (see - // forecast_list_update_data / prv_apply_deferred_refresh) + AnimationProgress squash_in_p; // 0 → MAX + Animation *squash_in_anim; + int squash_mode; // 0 = inactive; else SQUASH_DROP_IN / _DOWN_EXIT / _RISE_IN + uint8_t *squash_scratch; // full-screen snapshot, re-sampled while overwriting the fb + bool squash_captured; // ROUND capture-once: snapshot filled — later frames skip + // the scene render + fb copy and only resample (step 2) + bool refresh_deferred; // BOTH shapes: a phone sync landed mid-report-scene; + // the heavy visual reload waits for the scene end (see + // forecast_list_update_data / prv_apply_deferred_refresh) #endif #ifdef CONFIG_TOUCH - int16_t touch_start_x, touch_start_y; // Touchdown origin for swipe detection - bool touch_active; -#endif - void (*on_pop_cb)(void *ctx); - void *on_pop_ctx; - void (*on_city_select_cb)(void *ctx); - void *on_city_select_ctx; - void (*on_clock_request_cb)(void *ctx); // burst transition -> push the clock face - void *on_clock_request_ctx; - void (*on_up_request_cb)(void *ctx); // UP-at-top squash-out done -> push the expanded card - void *on_up_request_ctx; - void (*on_select_request_cb)(void *ctx); // SELECT on the resting main view -> open the condensed view - void *on_select_request_ctx; - int start_day_index; // focused day from main view; list opens scrolled here + int16_t touch_start_x, touch_start_y; // Touchdown origin for swipe detection + bool touch_active; +#endif + void (*on_pop_cb)(void *ctx); + void *on_pop_ctx; + void (*on_city_select_cb)(void *ctx); + void *on_city_select_ctx; + void (*on_clock_request_cb)(void *ctx); // burst transition -> push the clock face + void *on_clock_request_ctx; + void (*on_up_request_cb)(void *ctx); // UP-at-top squash-out done -> push the expanded card + void *on_up_request_ctx; + void (*on_select_request_cb)( + void *ctx); // SELECT on the resting main view -> open the condensed view + void *on_select_request_ctx; + int start_day_index; // focused day from main view; list opens scrolled here // First-entry clock-slot intro: the ACTIVE LOCATION holds the top clock slot for // 2s, then swaps out with the sunset card's own status-bar swap (both slide right, // the time trailing in from the left). Latched once per app run. - bool clock_loc_show; - bool clock_loc_done; - bool clock_swap_active; + bool clock_loc_show; + bool clock_loc_done; + bool clock_swap_active; AnimationProgress clock_swap_p; Animation *clock_swap_anim; - AppTimer *clock_loc_timer; + AppTimer *clock_loc_timer; } ForecastListData; static ForecastListData *s_list; @@ -180,7 +180,10 @@ static ForecastListData *s_list; // One 4x4 ordered-dither (bayer) table for every stipple on this screen // (icon crossfade). static const uint8_t s_bayer4[4][4] = { - { 0, 8, 2, 10 }, { 12, 4, 14, 6 }, { 3, 11, 1, 9 }, { 15, 7, 13, 5 }, + {0, 8, 2, 10}, + {12, 4, 14, 6}, + {3, 11, 1, 9}, + {15, 7, 13, 5}, }; #endif @@ -199,54 +202,72 @@ static int prv_max_scroll(void) { #endif } -static void prv_fill_weekday_label(int day_index, const char *fallback, - char *buffer, size_t buffer_size) { - if (!buffer || buffer_size == 0) return; +static void prv_fill_weekday_label(int day_index, const char *fallback, char *buffer, + size_t buffer_size) { + if (!buffer || buffer_size == 0) + return; weather_fill_weekday_abbrev(day_index, fallback, buffer, buffer_size); } #ifdef CONFIG_TOUCH -#define R5_TODAY_ICON 40 // scaled size of the today-summary header icon +#define R5_TODAY_ICON 40 // scaled size of the today-summary header icon // Official PebbleOS weather PDC icon (Pebble_25x25_*) for each app WeatherType. static uint32_t prv_official_weather_pdc_res(WeatherType t) { switch (t) { - case WeatherType_Sun: return RESOURCE_ID_SUNNY_DAY_TINY; - case WeatherType_PartlyCloudy: return RESOURCE_ID_PARTLY_CLOUDY_TINY; - case WeatherType_CloudyDay: return RESOURCE_ID_CLOUDY_DAY_TINY; - case WeatherType_LightRain: return RESOURCE_ID_LIGHT_RAIN_TINY; - case WeatherType_HeavyRain: return RESOURCE_ID_HEAVY_RAIN_TINY; - case WeatherType_LightSnow: return RESOURCE_ID_LIGHT_SNOW_TINY; - case WeatherType_HeavySnow: return RESOURCE_ID_HEAVY_SNOW_TINY; - case WeatherType_RainAndSnow: return RESOURCE_ID_RAINING_AND_SNOWING_TINY; - default: return RESOURCE_ID_GENERIC_WEATHER_TINY; + case WeatherType_Sun: + return RESOURCE_ID_SUNNY_DAY_TINY; + case WeatherType_PartlyCloudy: + return RESOURCE_ID_PARTLY_CLOUDY_TINY; + case WeatherType_CloudyDay: + return RESOURCE_ID_CLOUDY_DAY_TINY; + case WeatherType_LightRain: + return RESOURCE_ID_LIGHT_RAIN_TINY; + case WeatherType_HeavyRain: + return RESOURCE_ID_HEAVY_RAIN_TINY; + case WeatherType_LightSnow: + return RESOURCE_ID_LIGHT_SNOW_TINY; + case WeatherType_HeavySnow: + return RESOURCE_ID_HEAVY_SNOW_TINY; + case WeatherType_RainAndSnow: + return RESOURCE_ID_RAINING_AND_SNOWING_TINY; + default: + return RESOURCE_ID_GENERIC_WEATHER_TINY; } } // Larger (Pebble_50x50_*) official PDC, scaled down for the today-summary header. static uint32_t prv_official_weather_pdc_res_small(WeatherType t) { switch (t) { - case WeatherType_Sun: return RESOURCE_ID_SUNNY_DAY_SMALL; - case WeatherType_PartlyCloudy: return RESOURCE_ID_PARTLY_CLOUDY_SMALL; - case WeatherType_CloudyDay: return RESOURCE_ID_CLOUDY_DAY_SMALL; - case WeatherType_LightRain: return RESOURCE_ID_LIGHT_RAIN_SMALL; - case WeatherType_HeavyRain: return RESOURCE_ID_HEAVY_RAIN_SMALL; - case WeatherType_LightSnow: return RESOURCE_ID_LIGHT_SNOW_SMALL; - case WeatherType_HeavySnow: return RESOURCE_ID_HEAVY_SNOW_SMALL; - case WeatherType_RainAndSnow: return RESOURCE_ID_RAINING_AND_SNOWING_SMALL; - default: return RESOURCE_ID_GENERIC_WEATHER_SMALL; + case WeatherType_Sun: + return RESOURCE_ID_SUNNY_DAY_SMALL; + case WeatherType_PartlyCloudy: + return RESOURCE_ID_PARTLY_CLOUDY_SMALL; + case WeatherType_CloudyDay: + return RESOURCE_ID_CLOUDY_DAY_SMALL; + case WeatherType_LightRain: + return RESOURCE_ID_LIGHT_RAIN_SMALL; + case WeatherType_HeavyRain: + return RESOURCE_ID_HEAVY_RAIN_SMALL; + case WeatherType_LightSnow: + return RESOURCE_ID_LIGHT_SNOW_SMALL; + case WeatherType_HeavySnow: + return RESOURCE_ID_HEAVY_SNOW_SMALL; + case WeatherType_RainAndSnow: + return RESOURCE_ID_RAINING_AND_SNOWING_SMALL; + default: + return RESOURCE_ID_GENERIC_WEATHER_SMALL; } } #endif - #ifdef CONFIG_TOUCH static WeatherType prv_header_type(void); #endif static void prv_load_icons(void) { #ifdef CONFIG_TOUCH - s_list->today_header_dirty = true; // today's date/condition changed → recompute layout + s_list->today_header_dirty = true; // today's date/condition changed → recompute layout #endif #if defined(CONFIG_TOUCH) // Round 5-day uses the official PebbleOS weather PDC icons, cloned into RAM @@ -259,7 +280,8 @@ static void prv_load_icons(void) { GDrawCommandImage *raw = gdraw_command_image_create_with_resource( prv_official_weather_pdc_res(s_list->days[i].current_weather_type)); s_list->pdc_icons[i] = raw ? gdraw_command_image_clone(raw) : NULL; - if (raw) gdraw_command_image_destroy(raw); + if (raw) + gdraw_command_image_destroy(raw); } // Larger today icon for the summary header: official SMALL (50px) PDC scaled down. if (s_list->today_pdc) { @@ -283,13 +305,12 @@ static void prv_load_icons(void) { gbitmap_destroy(s_list->icons[i]); s_list->icons[i] = NULL; } - s_list->icons[i] = gbitmap_create_with_resource( - prv_icon_res(s_list->days[i].current_weather_type)); + s_list->icons[i] = + gbitmap_create_with_resource(prv_icon_res(s_list->days[i].current_weather_type)); } #endif } - // BOTH SHAPES: the mainscreen header // shows the CURRENT-HOUR conditions — type/temp/phrase derived from the hourly arrays at // the location's local hour, falling back to the synced current when the record has no @@ -304,9 +325,9 @@ static WeatherType prv_header_type(void) { static void prv_format_conditions(void) { for (int i = 0; i < (int)s_list->num_days; i++) { const WeatherLocationForecast *f = &s_list->days[i]; - const char *phrase = (i == 0) - ? f->current_phrase_now // current-hour phrase, both shapes (falls back to synced) - : f->current_weather_phrase; + const char *phrase = + (i == 0) ? f->current_phrase_now // current-hour phrase, both shapes (falls back to synced) + : f->current_weather_phrase; const char *condition = (phrase && phrase[0]) ? phrase : "--"; snprintf(s_list->condition_str[i], sizeof(s_list->condition_str[i]), "%s", condition); } @@ -315,29 +336,33 @@ static void prv_format_conditions(void) { // ---- Scroll animation ---- static void prv_anim_update(Animation *anim, AnimationProgress progress) { - if (!s_list) return; + if (!s_list) + return; int delta = s_list->scroll_to - s_list->scroll_from; - int offset = s_list->scroll_from + - weather_scale_i32(delta, progress, ANIMATION_NORMALIZED_MAX); + int offset = s_list->scroll_from + weather_scale_i32(delta, progress, ANIMATION_NORMALIZED_MAX); s_list->scroll_offset_px = offset; layer_mark_dirty(s_list->canvas); } -static const AnimationImplementation s_anim_impl = { .update = prv_anim_update }; +static const AnimationImplementation s_anim_impl = {.update = prv_anim_update}; static void prv_scroll_to_ms(int target, uint32_t duration_ms, bool button_scroll) { - if (!s_list) return; - if (target < 0) target = 0; - if (target > prv_max_scroll()) target = prv_max_scroll(); + if (!s_list) + return; + if (target < 0) + target = 0; + if (target > prv_max_scroll()) + target = prv_max_scroll(); if (s_list->anim) { animation_unschedule(s_list->anim); animation_destroy(s_list->anim); s_list->anim = NULL; } s_list->scroll_from = s_list->scroll_offset_px; - s_list->scroll_to = target; - if (s_list->scroll_from == s_list->scroll_to) return; + s_list->scroll_to = target; + if (s_list->scroll_from == s_list->scroll_to) + return; if (duration_ms == 0) { // Instant: jump directly with no animation s_list->scroll_offset_px = target; @@ -356,7 +381,6 @@ static void prv_scroll_to(int target) { prv_scroll_to_ms(target, ANIM_MS, false); } - // Shared animation boilerplate: create + duration + curve + impl + optional stopped // handler + schedule. Every moook here runs a manual curve in its update proc, so // the wrapper just parametrizes the pieces that differ. (Shared region: used by @@ -369,7 +393,7 @@ static Animation *prv_start_anim(uint32_t dur_ms, AnimationCurve curve, animation_set_curve(a, curve); animation_set_implementation(a, impl); if (stopped) { - animation_set_handlers(a, (AnimationHandlers){ .stopped = stopped }, NULL); + animation_set_handlers(a, (AnimationHandlers){.stopped = stopped}, NULL); } animation_schedule(a); return a; @@ -383,7 +407,6 @@ static void *s_select_exit_ctx; // ---- Drawing ---- - #ifdef CONFIG_TOUCH // ---- Single-view animated 5-day forecast -------------------------------------- // All five days fit on one screen (no scrolling): a today header (large animated @@ -391,7 +414,7 @@ static void *s_select_exit_ctx; // discs, and a two-line hi/lo dot graph beneath (high temp above each warm dot, low // below each cool dot). Renders on round (gabbro/getafix, 260x260) AND emery/obelix // (200x228); the geometry below branches round-circle vs emery-rectangle. -#define R5_MAX_COLS 5 +#define R5_MAX_COLS 5 // Column tiers. Round fans them inward as they descend to inscribe the circle; emery // is a rectangle, so its three tiers share one uniform step (dots sit straight under // the icons) and pack tighter to fit the 200px width. @@ -405,34 +428,34 @@ static void *s_select_exit_ctx; // already. The widen amplifies the existing fan-inward-as-it-descends grammar. // The wide values apply ONLY at the resting mainscreen; the *_SCROLLED values are the // originals, and the column build interpolates between them on the section scroll so the -// precipitation view's icon row lands PIXEL-IDENTICAL to its pre-spread layout (the spread applies to the -// mainscreen only). On rect both pairs are equal -> the lerp is a no-op. -#define R5_COL_STEP_ICON PBL_IF_ROUND_ELSE(48, 38) // icon / day-name row at REST (was 42) -#define R5_COL_STEP_HIGH PBL_IF_ROUND_ELSE(50, 38) // high temps at REST (was 45) +// precipitation view's icon row lands PIXEL-IDENTICAL to its pre-spread layout (the spread applies +// to the mainscreen only). On rect both pairs are equal -> the lerp is a no-op. +#define R5_COL_STEP_ICON PBL_IF_ROUND_ELSE(48, 38) // icon / day-name row at REST (was 42) +#define R5_COL_STEP_HIGH PBL_IF_ROUND_ELSE(50, 38) // high temps at REST (was 45) #define R5_COL_STEP_ICON_SCROLLED PBL_IF_ROUND_ELSE(42, 38) // precip view: original pitch #define R5_COL_STEP_HIGH_SCROLLED PBL_IF_ROUND_ELSE(45, 38) -#define R5_COL_STEP_LOW PBL_IF_ROUND_ELSE(42, 38) // low temps — chord-bound, unchanged -#define R5_HEADER_Y 14 // header pinned at top; everything below is centred -#define R5_DAYNAME_Y PBL_IF_ROUND_ELSE(94, 84) -#define R5_ICON_CY PBL_IF_ROUND_ELSE(130, 120) // icon row centre-y -#define R5_ICON_SIZE 25 -#define R5_DISC_R (R5_ICON_SIZE * 7 / 10) // 17 — same disc as old list + mainscreen -#define R5_PRECIP_Y 150 -#define R5_GRAPH_TOP PBL_IF_ROUND_ELSE(172, 166) // y of the warmest dot -#define R5_GRAPH_BOT PBL_IF_ROUND_ELSE(202, 202) // y of the coolest dot -#define R5_DOT_R 5 // outer coloured dot radius -#define R5_DOT_INNER 2 // inner white radius (hollow dot) -#define R5_HAIRLINE_Y PBL_IF_ROUND_ELSE(88, 80) // hairline rule under today header +#define R5_COL_STEP_LOW PBL_IF_ROUND_ELSE(42, 38) // low temps — chord-bound, unchanged +#define R5_HEADER_Y 14 // header pinned at top; everything below is centred +#define R5_DAYNAME_Y PBL_IF_ROUND_ELSE(94, 84) +#define R5_ICON_CY PBL_IF_ROUND_ELSE(130, 120) // icon row centre-y +#define R5_ICON_SIZE 25 +#define R5_DISC_R (R5_ICON_SIZE * 7 / 10) // 17 — same disc as old list + mainscreen +#define R5_PRECIP_Y 150 +#define R5_GRAPH_TOP PBL_IF_ROUND_ELSE(172, 166) // y of the warmest dot +#define R5_GRAPH_BOT PBL_IF_ROUND_ELSE(202, 202) // y of the coolest dot +#define R5_DOT_R 5 // outer coloured dot radius +#define R5_DOT_INNER 2 // inner white radius (hollow dot) +#define R5_HAIRLINE_Y PBL_IF_ROUND_ELSE(88, 80) // hairline rule under today header // The emery "today" banner blue. Used by BOTH the banner fill AND the icon crossfade's // erase-to-background — they MUST stay the same colour or the animated↔static icon fade // shows a coloured box on the banner. Change only here. -#define R5_TODAY_X PBL_IF_ROUND_ELSE(68, 18) // today icon draw offset (emery left margin) +#define R5_TODAY_X PBL_IF_ROUND_ELSE(68, 18) // today icon draw offset (emery left margin) // Emery today icon/temp top pushed down to y=20 — the exact slot a notification puts its top // icon (STATUS_BAR_LAYER_HEIGHT 20 + CARD_ICON_UPPER_PADDING 0 on emery) — so the top clock has // the same clearance above the icon that a Gmail-style notification gives. Date row follows so // the header block stays clear of the moved icon and the hairline below it. -#define R5_TODAY_Y PBL_IF_ROUND_ELSE(26, 20) -#define R5_DAYDATE_Y PBL_IF_ROUND_ELSE(68, 62) // day + date, below the today icon +#define R5_TODAY_Y PBL_IF_ROUND_ELSE(26, 20) +#define R5_DAYDATE_Y PBL_IF_ROUND_ELSE(68, 62) // day + date, below the today icon // DOWN/UP header transition travel (emery / !PBL_ROUND). HEADER_TRAVEL slides the today // header (icon/temp/date/condition/hairline) fully off the top; SECTION_TRAVEL lifts the @@ -440,7 +463,7 @@ static void *s_select_exit_ctx; // top slot (R5_TODAY_Y). One scheduled moook animation drives header_scroll across // [0..HEADER_TRAVEL]; the section offset is a synced scaled copy (see the draw proc), so the // two groups bounce in perfect lockstep — exactly Timeline's "everything in one spawn" rule. -#define R5_HEADER_TRAVEL R5_DAYNAME_Y // 84: header fully off the top edge +#define R5_HEADER_TRAVEL R5_DAYNAME_Y // 84: header fully off the top edge // Extra lift past today's old slot, applied uniformly to the whole scrolled 5-day section // (day names, discs, graph, icon rest + its stretch travel all key off SECTION_TRAVEL, so they // stay in lockstep) to free more room at the bottom of the scrolled screen for the new stats. @@ -487,12 +510,11 @@ static void *s_select_exit_ctx; // 42px column step is 0 / 7 / 31px — using it whole fans the row out hard, so it is // damped to ~45%: a curve you feel rather than read. Precomputed (no sqrt per frame); // index is the column's distance from centre, so n<=R5_MAX_COLS keeps it in range. -static const uint8_t s_round_col_bow[3] = { 0, 2, 10 }; +static const uint8_t s_round_col_bow[3] = {0, 2, 10}; // Scaled by the section lift: flat at rest (the row sits at the circle's widest), fully // bowed once scrolled to the top where the glass actually curves away. #define R5_BOW_DY(i, n, ss) \ - ((int)s_round_col_bow[(i) < (n) / 2 ? (n) / 2 - (i) : (i) - (n) / 2] \ - * (ss) / R5_SECTION_TRAVEL) + ((int)s_round_col_bow[(i) < (n) / 2 ? (n) / 2 - (i) : (i) - (n) / 2] * (ss) / R5_SECTION_TRAVEL) #else // Rect is a rectangle — no bow. (Round's draw path still compiles here, so this must exist.) #define R5_BOW_DY(i, n, ss) 0 @@ -527,7 +549,8 @@ static int64_t prv_moook_hasted(int32_t n, int64_t from, int64_t to) { // Shared: round's report stage 3 reuses the same fly slot for the paper clone. static void prv_clear_fly(void) { - if (!s_list) return; + if (!s_list) + return; s_list->flying_icon = false; if (s_list->fly_pdc) { gdraw_command_image_destroy(s_list->fly_pdc); @@ -541,14 +564,15 @@ static void prv_clear_fly(void) { // Squash directions (s_list->squash_mode; 0 = inactive). Shared: the renderer is // chord-clamped, so round drives the same modes. -#define SQUASH_DROP_IN 1 // fall in from above (returning from the clock) -#define SQUASH_DOWN_EXIT 2 // swoosh down off-bottom (heading up to the expanded card) -#define SQUASH_RISE_IN 3 // rise up from below (returning from above) -#define SQUASH_UP_EXIT 5 // clock-burst stage-1: jelly-stretch up off the top -#define SQUASH_LEFT_EXIT 6 // select-exit stage-1: jelly-stretch off the LEFT +#define SQUASH_DROP_IN 1 // fall in from above (returning from the clock) +#define SQUASH_DOWN_EXIT 2 // swoosh down off-bottom (heading up to the expanded card) +#define SQUASH_RISE_IN 3 // rise up from below (returning from above) +#define SQUASH_UP_EXIT 5 // clock-burst stage-1: jelly-stretch up off the top +#define SQUASH_LEFT_EXIT 6 // select-exit stage-1: jelly-stretch off the LEFT static void prv_render_squash_in(GContext *ctx) { - if (!s_list || !s_list->squash_scratch) return; + if (!s_list || !s_list->squash_scratch) + return; #if PBL_ROUND // Capture-once (gabbro smoothness step 2): the source scene is static during every // squash (nub/arrows/dot all exclude themselves or draw after), so the first frame @@ -561,8 +585,7 @@ static void prv_render_squash_in(GContext *ctx) { } s_list->squash_captured = true; #endif - weather_render_squash(ctx, s_list->squash_scratch, s_list->squash_in_p, - s_list->squash_mode); + weather_render_squash(ctx, s_list->squash_scratch, s_list->squash_in_p, s_list->squash_mode); } #ifdef CONFIG_TOUCH @@ -590,12 +613,16 @@ static bool s_pending_return_fly; // Tear down the hero icon-fly state (idempotent). static void prv_squash_in_update(Animation *anim, AnimationProgress progress) { - if (!s_list) return; + if (!s_list) + return; s_list->squash_in_p = progress; if (progress >= ANIMATION_NORMALIZED_MAX) { int done_mode = s_list->squash_mode; s_list->squash_mode = 0; - if (s_list->squash_scratch) { free(s_list->squash_scratch); s_list->squash_scratch = NULL; } + if (s_list->squash_scratch) { + free(s_list->squash_scratch); + s_list->squash_scratch = NULL; + } // The hero icon has landed on the card's icon spot — drop it, then reveal the card (pushed // un-animated so its static icon takes over exactly where the flown icon settled). prv_clear_fly(); @@ -604,16 +631,17 @@ static void prv_squash_in_update(Animation *anim, AnimationProgress progress) { s_list->on_up_request_cb(s_list->on_up_request_ctx); } } - if (s_list->canvas) layer_mark_dirty(s_list->canvas); + if (s_list->canvas) + layer_mark_dirty(s_list->canvas); } -static const AnimationImplementation s_squash_in_impl = { .update = prv_squash_in_update }; - +static const AnimationImplementation s_squash_in_impl = {.update = prv_squash_in_update}; static void prv_start_squash(int mode) { - if (!s_list || !s_list->canvas || s_list->squash_mode) return; + if (!s_list || !s_list->canvas || s_list->squash_mode) + return; GRect bounds = layer_get_bounds(s_list->canvas); s_list->squash_scratch = malloc_try((size_t)bounds.size.w * (size_t)bounds.size.h); - if (!s_list->squash_scratch) { // out of heap: skip the effect + if (!s_list->squash_scratch) { // out of heap: skip the effect if (mode == SQUASH_DOWN_EXIT && s_list->on_up_request_cb) { s_list->on_up_request_cb(s_list->on_up_request_ctx); } @@ -621,7 +649,7 @@ static void prv_start_squash(int mode) { } s_list->squash_mode = mode; s_list->squash_in_p = 0; - s_list->squash_captured = false; // round capture-once: fresh squash, fresh snapshot + s_list->squash_captured = false; // round capture-once: fresh squash, fresh snapshot if (s_list->squash_in_anim) { animation_unschedule(s_list->squash_in_anim); animation_destroy(s_list->squash_in_anim); @@ -631,9 +659,9 @@ static void prv_start_squash(int mode) { // original 330ms. More mid frames (8 vs 3) keeps the moook curve one-keyframe-per-render-tick. // Every synced part (background jelly, hero icon-fly, glance-text slide) reads squash_in_p, so // they all stretch by the same factor and the icon + text still co-land on the final frame. - s_list->squash_in_anim = prv_start_anim((mode == SQUASH_DOWN_EXIT) - ? interpolate_moook_soft_duration(8) // ~495ms - : interpolate_moook_soft_duration(3), // 330ms (unchanged) + s_list->squash_in_anim = prv_start_anim( + (mode == SQUASH_DOWN_EXIT) ? interpolate_moook_soft_duration(8) // ~495ms + : interpolate_moook_soft_duration(3), // 330ms (unchanged) AnimationCurveLinear, &s_squash_in_impl, NULL); layer_mark_dirty(s_list->canvas); } @@ -647,29 +675,40 @@ static void prv_start_squash(int mode) { // Shared: the hero icon-fly + DOWN_EXIT squash now work on round too. static void prv_start_up_to_card(void) { - if (!s_list || !s_list->canvas || s_list->flying_icon || s_list->squash_mode) return; - if (!s_list->header_shown || s_list->num_days == 0) { prv_start_squash(SQUASH_DOWN_EXIT); return; } + if (!s_list || !s_list->canvas || s_list->flying_icon || s_list->squash_mode) + return; + if (!s_list->header_shown || s_list->num_days == 0) { + prv_start_squash(SQUASH_DOWN_EXIT); + return; + } // LARGE (80x80) weather PDC — the SAME resource the card draws, so the hand-off is seamless. - GDrawCommandImage *raw = gdraw_command_image_create_with_resource( - weather_type_icon_large_resource(prv_header_type())); + GDrawCommandImage *raw = + gdraw_command_image_create_with_resource(weather_type_icon_large_resource(prv_header_type())); GDrawCommandImage *pdc = raw ? gdraw_command_image_clone(raw) : NULL; - if (raw) gdraw_command_image_destroy(raw); - if (!pdc) { prv_start_squash(SQUASH_DOWN_EXIT); return; } + if (raw) + gdraw_command_image_destroy(raw); + if (!pdc) { + prv_start_squash(SQUASH_DOWN_EXIT); + return; + } const int W = layer_get_bounds(s_list->canvas).size.w; - s_list->fly_pdc = pdc; - s_list->fly_src = GRect(s_list->today_icon_x, R5_TODAY_Y, R5_TODAY_ICON, R5_TODAY_ICON); - // Must match expanded_view.c's static card icon — shared constants keep the fly landing pixel-exact. - s_list->fly_dest = GRect((W - EV_ICON_SIZE) / 2, EV_ICON_Y, EV_ICON_SIZE, EV_ICON_SIZE); + s_list->fly_pdc = pdc; + s_list->fly_src = GRect(s_list->today_icon_x, R5_TODAY_Y, R5_TODAY_ICON, R5_TODAY_ICON); + // Must match expanded_view.c's static card icon — shared constants keep the fly landing + // pixel-exact. + s_list->fly_dest = GRect((W - EV_ICON_SIZE) / 2, EV_ICON_Y, EV_ICON_SIZE, EV_ICON_SIZE); s_list->flying_icon = true; prv_start_squash(SQUASH_DOWN_EXIT); - if (!s_list->squash_mode) prv_clear_fly(); // squash couldn't start (OOM); cb already fired + if (!s_list->squash_mode) + prv_clear_fly(); // squash couldn't start (OOM); cb already fired } // Free the cached jelly lookups (on transition start — the travel direction can flip — on // transition stop, and at unload). The rect-only jelly draw is the only writer; on round these // stay NULL and this is a no-op. static void prv_free_jelly_lookups(void) { - if (!s_list) return; + if (!s_list) + return; for (size_t i = 0; i < sizeof(s_list->jelly_lookup) / sizeof(s_list->jelly_lookup[0]); i++) { if (s_list->jelly_lookup[i]) { applib_free(s_list->jelly_lookup[i]); @@ -679,37 +718,41 @@ static void prv_free_jelly_lookups(void) { } static void prv_header_anim_update(Animation *anim, AnimationProgress progress) { - if (!s_list) return; + if (!s_list) + return; InterpolateInt64Function fn = s_list->header_hasted ? prv_moook_hasted : prv_moook_full; s_list->header_scroll = (int)fn(progress, s_list->header_from, s_list->header_to); // Stash the RAW normalized so the per-icon squash + the zoom lines run off the exact same // moook progress that positions the slide (this is the `normalized` Timeline hands its // scale_segmented transforms + speed-line interpolation). s_list->fx_progress = progress; - s_list->fx_active = true; + s_list->fx_active = true; layer_mark_dirty(s_list->canvas); } static void prv_header_anim_stopped(Animation *anim, bool finished, void *context) { - if (!s_list) return; + if (!s_list) + return; // Snap exactly onto the endpoint (mirror Timeline's cut-to-end) and latch the rest state. s_list->header_scroll = s_list->header_to; - s_list->header_shown = (s_list->header_to == 0); + s_list->header_shown = (s_list->header_to == 0); s_list->header_hasted = false; // At rest there must be NO residual deformation and NO zoom lines. s_list->fx_active = false; s_list->anim = NULL; - prv_free_jelly_lookups(); // don't hold the 6 lookups while at rest + prv_free_jelly_lookups(); // don't hold the 6 lookups while at rest layer_mark_dirty(s_list->canvas); } -static const AnimationImplementation s_header_anim_impl = { .update = prv_header_anim_update }; +static const AnimationImplementation s_header_anim_impl = {.update = prv_header_anim_update}; static void prv_start_header_transition(bool to_scrolled) { - if (!s_list) return; - const int from = s_list->header_scroll; // current px (supports interruption) - const int to = to_scrolled ? R5_HEADER_TRAVEL : 0; - if (from == to) return; + if (!s_list) + return; + const int from = s_list->header_scroll; // current px (supports interruption) + const int to = to_scrolled ? R5_HEADER_TRAVEL : 0; + if (from == to) + return; // A transition already running => this is an interrupting press (Timeline "hasted"). s_list->header_hasted = (s_list->anim != NULL); if (s_list->anim) { @@ -721,17 +764,15 @@ static void prv_start_header_transition(bool to_scrolled) { animation_destroy(old); } s_list->header_from = from; - s_list->header_to = to; - prv_free_jelly_lookups(); // travel direction flipped/changed — stale lookups must rebuild + s_list->header_to = to; + prv_free_jelly_lookups(); // travel direction flipped/changed — stale lookups must rebuild // Full-moook duration for the standard slide (keeps one curve keyframe per // render tick); the hasted remap still rides the soft(3) timing. Linear curve: // the manual moook in prv_header_anim_update IS the curve. - s_list->anim = prv_start_anim(s_list->header_hasted - ? interpolate_moook_soft_duration(3) - : interpolate_moook_duration(), - AnimationCurveLinear, &s_header_anim_impl, - prv_header_anim_stopped); - s_list->fx_active = true; + s_list->anim = prv_start_anim( + s_list->header_hasted ? interpolate_moook_soft_duration(3) : interpolate_moook_duration(), + AnimationCurveLinear, &s_header_anim_impl, prv_header_anim_stopped); + s_list->fx_active = true; s_list->fx_progress = 0; // start at the from-frame. Without this, the PREVIOUS transition left // fx_progress at MAX, so the first frame (before the anim's first // update) renders the bitmap at its destination/final frame — a flash. @@ -749,24 +790,25 @@ static void prv_start_header_transition(bool to_scrolled) { // masking it. Round uses a FULL SCREEN HEIGHT of lift, which is the robust statement of intent: // anything drawn inside the visible frame at scrolled rest is guaranteed off-top, whatever the // temperature spread does to the graph's height. Emery's 200 is untouched. -#define R5_CLOCK_EXIT (R5_HEADER_TRAVEL + PBL_IF_ROUND_ELSE(PBL_DISPLAY_HEIGHT, 200)) +#define R5_CLOCK_EXIT (R5_HEADER_TRAVEL + PBL_IF_ROUND_ELSE(PBL_DISPLAY_HEIGHT, 200)) // Screen centre-y — the destination for the burst dot AND the whole report entry scene // (ball + unfolding paper). Was hardcoded to rect's 228/2, which put round's animation // 16px high and off the SELECT nub it is supposed to grow out of. -#define R5_SCREEN_CY PBL_IF_ROUND_ELSE(130, 114) +#define R5_SCREEN_CY PBL_IF_ROUND_ELSE(130, 114) // Dot's resting y on the scrolled screen. Round: the precip values end at y216 and the // glass ends at 260, so 238 centres it in that gap (the circle is still 145px wide there). -#define R5_DOT_REST_Y PBL_IF_ROUND_ELSE(233, 198) +#define R5_DOT_REST_Y PBL_IF_ROUND_ELSE(233, 198) static void prv_start_clock_stage2(void); static void prv_clock_stage1_update(Animation *anim, AnimationProgress progress) { - if (!s_list) return; + if (!s_list) + return; // The PAGE exits at DOUBLE TIME (fully off by the 50% mark) while the dot keeps the // full-length ease below — the content clears the dot's climb path early and the dot // rises the whole second half alone: the focal point the transition is about. - AnimationProgress pm = (progress > ANIMATION_NORMALIZED_MAX / 2) - ? ANIMATION_NORMALIZED_MAX : progress * 2; + AnimationProgress pm = + (progress > ANIMATION_NORMALIZED_MAX / 2) ? ANIMATION_NORMALIZED_MAX : progress * 2; if (s_list->squash_mode == SQUASH_UP_EXIT) { // Squash path (BOTH shapes): the scene keeps drawing at the scrolled rest // (header_scroll pinned at R5_HEADER_TRAVEL by prv_start_clock_stage1) and the whole @@ -781,15 +823,17 @@ static void prv_clock_stage1_update(Animation *anim, AnimationProgress progress) // must stay clear above the dot throughout. The squash path never dips (its jelly // edges are clamped the same way). int hsv = (int)prv_moook_soft3(pm, R5_HEADER_TRAVEL, R5_CLOCK_EXIT); - if (hsv < R5_HEADER_TRAVEL) hsv = R5_HEADER_TRAVEL; + if (hsv < R5_HEADER_TRAVEL) + hsv = R5_HEADER_TRAVEL; s_list->header_scroll = hsv; } // The dot eases cleanly into the centre (ease-out quad — NO moook anticipation dip or overshoot // wobble) so it lands exactly at the animation's end and the shake fires the instant it lands. const int32_t q = ANIMATION_NORMALIZED_MAX - (int32_t)progress; - const int32_t eased = ANIMATION_NORMALIZED_MAX - (int32_t)((int64_t)q * q / ANIMATION_NORMALIZED_MAX); - s_list->fx_dot_y = R5_DOT_REST_Y + - (R5_SCREEN_CY - R5_DOT_REST_Y) * eased / ANIMATION_NORMALIZED_MAX; + const int32_t eased = + ANIMATION_NORMALIZED_MAX - (int32_t)((int64_t)q * q / ANIMATION_NORMALIZED_MAX); + s_list->fx_dot_y = + R5_DOT_REST_Y + (R5_SCREEN_CY - R5_DOT_REST_Y) * eased / ANIMATION_NORMALIZED_MAX; layer_mark_dirty(s_list->canvas); } @@ -799,73 +843,82 @@ static void prv_clock_stage1_update(Animation *anim, AnimationProgress progress) // every clock visit and (b) made prv_start_squash refuse the return DROP_IN, so the forecast came // back permanently squashed off the top — a blank white screen. static void prv_clock_stage1_end_squash(void) { - if (s_list->squash_mode != SQUASH_UP_EXIT) return; + if (s_list->squash_mode != SQUASH_UP_EXIT) + return; s_list->squash_mode = 0; - if (s_list->squash_scratch) { free(s_list->squash_scratch); s_list->squash_scratch = NULL; } + if (s_list->squash_scratch) { + free(s_list->squash_scratch); + s_list->squash_scratch = NULL; + } } static void prv_clock_stage1_stopped(Animation *anim, bool finished, void *context) { - if (!s_list) return; + if (!s_list) + return; s_list->clock_anim = NULL; prv_clock_stage1_end_squash(); - if (!finished) { // BACK cancelled — snap back to the scrolled screen + if (!finished) { // BACK cancelled — snap back to the scrolled screen s_list->clock_fx = 0; s_list->header_scroll = R5_HEADER_TRAVEL; layer_mark_dirty(s_list->canvas); return; } - s_list->header_scroll = R5_CLOCK_EXIT; // content fully off-top - s_list->fx_dot_y = R5_SCREEN_CY; // dot parked at centre + s_list->header_scroll = R5_CLOCK_EXIT; // content fully off-top + s_list->fx_dot_y = R5_SCREEN_CY; // dot parked at centre prv_start_clock_stage2(); } static void prv_clock_stage2_update(Animation *anim, AnimationProgress progress) { - if (!s_list) return; + if (!s_list) + return; // Verbatim port of the original burst's orbital shake (weather_app_layout.c): 4 rotations, // bell-curve amplitude 3 -> 7 -> 0 px. Standalone here, so shake_t == progress (no CS rescale). int32_t angle = (int32_t)TRIG_MAX_ANGLE * 4 * progress / ANIMATION_NORMALIZED_MAX; int32_t amp_n = weather_norm_bell(progress); int amp = 3 + (int)(amp_n * 4 / ANIMATION_NORMALIZED_MAX); - s_list->fx_shake_dx = (int)((int32_t)sin_lookup(angle) * amp / TRIG_MAX_RATIO); + s_list->fx_shake_dx = (int)((int32_t)sin_lookup(angle) * amp / TRIG_MAX_RATIO); s_list->fx_shake_dy = -(int)((int32_t)cos_lookup(angle) * amp / TRIG_MAX_RATIO); layer_mark_dirty(s_list->canvas); } static void prv_clock_stage2_stopped(Animation *anim, bool finished, void *context) { - if (!s_list) return; - s_list->clock_anim = NULL; + if (!s_list) + return; + s_list->clock_anim = NULL; s_list->fx_shake_dx = s_list->fx_shake_dy = 0; if (finished && s_list->on_clock_request_cb) { s_list->on_clock_request_cb(s_list->on_clock_request_ctx); // push the clock (spiral) on top } // Reset to the resting forecast (State A) BENEATH the now-on-top clock, so backing out of the // clock reveals a clean forecast rather than the post-burst frame. - s_list->clock_fx = 0; + s_list->clock_fx = 0; s_list->header_scroll = 0; - s_list->header_shown = true; - s_list->fx_active = false; + s_list->header_shown = true; + s_list->fx_active = false; layer_mark_dirty(s_list->canvas); } -static const AnimationImplementation s_clock_stage1_impl = { .update = prv_clock_stage1_update }; -static const AnimationImplementation s_clock_stage2_impl = { .update = prv_clock_stage2_update }; +static const AnimationImplementation s_clock_stage1_impl = {.update = prv_clock_stage1_update}; +static const AnimationImplementation s_clock_stage2_impl = {.update = prv_clock_stage2_update}; static void prv_start_clock_stage2(void) { - if (!s_list) return; - s_list->clock_fx = 2; + if (!s_list) + return; + s_list->clock_fx = 2; s_list->fx_shake_dx = s_list->fx_shake_dy = 0; // 220ms: legible (the original's shake tail was ~53ms); linear — amplitude self-modulates. - s_list->clock_anim = prv_start_anim(220, AnimationCurveLinear, &s_clock_stage2_impl, - prv_clock_stage2_stopped); + s_list->clock_anim = + prv_start_anim(220, AnimationCurveLinear, &s_clock_stage2_impl, prv_clock_stage2_stopped); } static void prv_start_clock_stage1(void) { - if (!s_list || s_list->clock_fx) return; // a burst is already running/parked — ignore re-press - s_list->clock_fx = 1; - s_list->fx_dot_y = R5_DOT_REST_Y; + if (!s_list || s_list->clock_fx) + return; // a burst is already running/parked — ignore re-press + s_list->clock_fx = 1; + s_list->fx_dot_y = R5_DOT_REST_Y; s_list->fx_shake_dx = s_list->fx_shake_dy = 0; - s_list->fx_active = false; // uniform exit — no per-icon jelly - if (s_list->anim) { // capture-first: .stopped NULLs the field during unschedule + s_list->fx_active = false; // uniform exit — no per-icon jelly + if (s_list->anim) { // capture-first: .stopped NULLs the field during unschedule Animation *old = s_list->anim; s_list->anim = NULL; animation_unschedule(old); @@ -880,7 +933,7 @@ static void prv_start_clock_stage1(void) { if (s_list->squash_scratch) { s_list->squash_mode = SQUASH_UP_EXIT; s_list->squash_in_p = 0; - s_list->squash_captured = false; // round capture-once + s_list->squash_captured = false; // round capture-once } } // 330ms — Timeline feel. LINEAR like every other squash driver: the jelly edges (and the @@ -893,9 +946,9 @@ static void prv_start_clock_stage1(void) { // the budget is simply too few frames for the taller screen. Lengthening stage 1 on round // (330 -> 561ms) buys the visible half ~11 frames, measured. The STAGING RATIO is untouched // on both shapes — content is still clear of the dot's climb path by the halfway mark. - s_list->clock_anim = prv_start_anim( - interpolate_moook_soft_duration(PBL_IF_ROUND_ELSE(10, 3)), - AnimationCurveLinear, &s_clock_stage1_impl, prv_clock_stage1_stopped); + s_list->clock_anim = + prv_start_anim(interpolate_moook_soft_duration(PBL_IF_ROUND_ELSE(10, 3)), + AnimationCurveLinear, &s_clock_stage1_impl, prv_clock_stage1_stopped); } // =================================================================================== @@ -908,17 +961,17 @@ static void prv_start_clock_stage1(void) { // =================================================================================== #ifdef CONFIG_TOUCH -static Animation *s_report_anim; // stages 2-4 (stage 2 overlaps stage 1's tail) -#define R5_REPORT_BALL_R 13 // = the SELECT nub's radius +static Animation *s_report_anim; // stages 2-4 (stage 2 overlaps stage 1's tail) +#define R5_REPORT_BALL_R 13 // = the SELECT nub's radius // The SELECT nub is fill_oval(GRect(W-5, (H-26)/2, 26, 26)) — a r13 circle centred at // x = W + 8. The ball starts EXACTLY there, so the indicator visibly becomes the ball. -#define R5_REPORT_BALL_X0(W) ((W) + 8) -#define R5_REPORT_BALL_START (ANIMATION_NORMALIZED_MAX * 40 / 100) -#define R5_REPORT_BALL_MS 200 +#define R5_REPORT_BALL_X0(W) ((W) + 8) +#define R5_REPORT_BALL_START (ANIMATION_NORMALIZED_MAX * 40 / 100) +#define R5_REPORT_BALL_MS 200 // Stage 3: 1000ms total, matching Timeline's day separator exactly — DAY_SEP_TIMEOUT_MS // (timeline.c:570) starts when the separator APPEARS, so the 500ms unfold plays inside // the second and the settled paper holds the remainder. -#define R5_REPORT_SHOW_MS 1000 +#define R5_REPORT_SHOW_MS 1000 static void prv_start_report_stage2(void); static void prv_start_report_stage3(void); @@ -932,9 +985,11 @@ static void prv_report_stage4_stopped(Animation *anim, bool finished, void *cont // jumps missed animations straight to their final frame, which erased the bow). Called // from every scene exit — finish and cancel alike. static void prv_apply_deferred_refresh(void) { - if (!s_list || !s_list->refresh_deferred) return; + if (!s_list || !s_list->refresh_deferred) + return; s_list->refresh_deferred = false; - if (!s_list->canvas) return; + if (!s_list->canvas) + return; prv_load_icons(); prv_free_jelly_lookups(); prv_format_conditions(); @@ -948,37 +1003,45 @@ static void prv_apply_deferred_refresh(void) { // mostly cleared. static void prv_report_stage1_update(Animation *anim, AnimationProgress progress) { (void)anim; - if (!s_list) return; + if (!s_list) + return; s_list->squash_in_p = progress; if (s_list->report_fx == 1 && progress >= R5_REPORT_BALL_START) { - prv_start_report_stage2(); // overlap: the ball rolls in while the squash tail clears + prv_start_report_stage2(); // overlap: the ball rolls in while the squash tail clears } layer_mark_dirty(s_list->canvas); } static void prv_report_stage1_stopped(Animation *anim, bool finished, void *context) { - (void)anim; (void)context; + (void)anim; + (void)context; s_select_exit_anim = NULL; - if (!s_list) return; - if (s_list->squash_mode == SQUASH_LEFT_EXIT) { // free scratch on finish AND cancel + if (!s_list) + return; + if (s_list->squash_mode == SQUASH_LEFT_EXIT) { // free scratch on finish AND cancel s_list->squash_mode = 0; - if (s_list->squash_scratch) { free(s_list->squash_scratch); s_list->squash_scratch = NULL; } + if (s_list->squash_scratch) { + free(s_list->squash_scratch); + s_list->squash_scratch = NULL; + } } - if (!finished) { // only unload cancels (inputs are guarded) + if (!finished) { // only unload cancels (inputs are guarded) s_list->report_fx = 0; prv_apply_deferred_refresh(); layer_mark_dirty(s_list->canvas); return; } - if (s_list->report_fx == 1) prv_start_report_stage2(); // threshold missed (paranoia) + if (s_list->report_fx == 1) + prv_start_report_stage2(); // threshold missed (paranoia) } -static const AnimationImplementation s_report_stage1_impl = { .update = prv_report_stage1_update }; +static const AnimationImplementation s_report_stage1_impl = {.update = prv_report_stage1_update}; // Stage 2: the ball. Burst-dot grammar — clean ease-out-quad, no bounce (the unfold's // deflate overshoot supplies the landing energy; a ball bounce would double-bounce). static void prv_report_stage2_update(Animation *anim, AnimationProgress progress) { (void)anim; - if (!s_list) return; + if (!s_list) + return; const int W = layer_get_bounds(s_list->canvas).size.w; const int x0 = R5_REPORT_BALL_X0(W), x1 = W / 2; const int32_t q = ANIMATION_NORMALIZED_MAX - (int32_t)progress; @@ -989,67 +1052,74 @@ static void prv_report_stage2_update(Animation *anim, AnimationProgress progress } static void prv_report_stage2_stopped(Animation *anim, bool finished, void *context) { - (void)anim; (void)context; + (void)anim; + (void)context; s_report_anim = NULL; - if (!s_list) return; + if (!s_list) + return; if (!finished) { s_list->report_fx = 0; prv_apply_deferred_refresh(); layer_mark_dirty(s_list->canvas); return; } - s_list->fx_ball_x = layer_get_bounds(s_list->canvas).size.w / 2; // parked at centre + s_list->fx_ball_x = layer_get_bounds(s_list->canvas).size.w / 2; // parked at centre prv_start_report_stage3(); } -static const AnimationImplementation s_report_stage2_impl = { .update = prv_report_stage2_update }; +static const AnimationImplementation s_report_stage2_impl = {.update = prv_report_stage2_update}; static void prv_start_report_stage2(void) { - if (!s_list || s_report_anim) return; + if (!s_list || s_report_anim) + return; s_list->report_fx = 2; s_list->fx_ball_x = R5_REPORT_BALL_X0(layer_get_bounds(s_list->canvas).size.w); - s_report_anim = prv_start_anim(R5_REPORT_BALL_MS, AnimationCurveLinear, - &s_report_stage2_impl, prv_report_stage2_stopped); + s_report_anim = prv_start_anim(R5_REPORT_BALL_MS, AnimationCurveLinear, &s_report_stage2_impl, + prv_report_stage2_stopped); } // Stage 3: the unfold + the day-separator-length hold. static void prv_report_stage3_update(Animation *anim, AnimationProgress progress) { (void)anim; - if (!s_list) return; + if (!s_list) + return; s_list->report_p = progress; layer_mark_dirty(s_list->canvas); } static void prv_report_stage3_stopped(Animation *anim, bool finished, void *context) { - (void)anim; (void)context; + (void)anim; + (void)context; s_report_anim = NULL; - if (!s_list) return; - if (!finished) { // only unload cancels; it clears the done cb + fly itself + if (!s_list) + return; + if (!finished) { // only unload cancels; it clears the done cb + fly itself s_list->report_fx = 0; prv_clear_fly(); prv_apply_deferred_refresh(); layer_mark_dirty(s_list->canvas); return; } - prv_start_report_stage4(); // the paper takes its bow: squash-stretch off the left + prv_start_report_stage4(); // the paper takes its bow: squash-stretch off the left } -static const AnimationImplementation s_report_stage3_impl = { .update = prv_report_stage3_update }; +static const AnimationImplementation s_report_stage3_impl = {.update = prv_report_stage3_update}; static void prv_start_report_stage3(void) { s_list->report_fx = 3; - s_list->report_p = 0; - prv_clear_fly(); // the fly slot carries the paper clone + fan lookup (idempotent) + s_list->report_p = 0; + prv_clear_fly(); // the fly slot carries the paper clone + fan lookup (idempotent) GDrawCommandImage *raw = gdraw_command_image_create_with_resource(RESOURCE_ID_WEATHER_REPORT_PAPER); - s_list->fly_pdc = raw ? gdraw_command_image_clone(raw) : NULL; // flash PDC is read-only - if (raw) gdraw_command_image_destroy(raw); + s_list->fly_pdc = raw ? gdraw_command_image_clone(raw) : NULL; // flash PDC is read-only + if (raw) + gdraw_command_image_destroy(raw); // Frozen fan start-ray (Timeline picks a random ray per unfold; RTC seconds vary plenty). s_list->report_angle = (int32_t)(rtc_get_time() % TRIG_MAX_ANGLE); - if (!s_list->fly_pdc) { // resource missing: skip straight to the handoff + if (!s_list->fly_pdc) { // resource missing: skip straight to the handoff prv_report_stage4_stopped(NULL, true, NULL); return; } - s_report_anim = prv_start_anim(R5_REPORT_SHOW_MS, AnimationCurveLinear, - &s_report_stage3_impl, prv_report_stage3_stopped); + s_report_anim = prv_start_anim(R5_REPORT_SHOW_MS, AnimationCurveLinear, &s_report_stage3_impl, + prv_report_stage3_stopped); } // Stage 4: the paper + caption squash-stretch off the LEFT (the paper deforms ITSELF — @@ -1057,21 +1127,27 @@ static void prv_start_report_stage3(void) { // call stack: weather.c arms the report's squash-in-from-the-right. static void prv_report_stage4_update(Animation *anim, AnimationProgress progress) { (void)anim; - if (!s_list) return; - s_list->report_p = progress; // stage 4 owns report_p: the exit flight's raw progress + if (!s_list) + return; + s_list->report_p = progress; // stage 4 owns report_p: the exit flight's raw progress layer_mark_dirty(s_list->canvas); } static void prv_report_stage4_stopped(Animation *anim, bool finished, void *context) { - (void)anim; (void)context; + (void)anim; + (void)context; s_report_anim = NULL; - if (!s_list) return; + if (!s_list) + return; // BOTH shapes: round drives the same squash now, so it must also be torn down here — // leaving squash_mode set makes the entry guard reject every later SELECT (and leaks // the full-screen scratch, 67.6 KB on round, every time). if (s_list->squash_mode == SQUASH_LEFT_EXIT) { s_list->squash_mode = 0; - if (s_list->squash_scratch) { free(s_list->squash_scratch); s_list->squash_scratch = NULL; } + if (s_list->squash_scratch) { + free(s_list->squash_scratch); + s_list->squash_scratch = NULL; + } } prv_clear_fly(); s_list->report_fx = 0; @@ -1081,24 +1157,25 @@ static void prv_report_stage4_stopped(Animation *anim, bool finished, void *cont void (*done)(void *) = s_select_exit_done; void *dctx = s_select_exit_ctx; s_select_exit_done = NULL; - s_select_exit_ctx = NULL; - if (finished && done) done(dctx); // -> weather.c: arm the report's squash-in + push + s_select_exit_ctx = NULL; + if (finished && done) + done(dctx); // -> weather.c: arm the report's squash-in + push layer_mark_dirty(s_list->canvas); } -static const AnimationImplementation s_report_stage4_impl = { .update = prv_report_stage4_update }; +static const AnimationImplementation s_report_stage4_impl = {.update = prv_report_stage4_update}; static void prv_start_report_stage4(void) { s_list->report_fx = 4; - s_list->report_p = 0; // flight start: moook(0) = rest — no first-frame jump + s_list->report_p = 0; // flight start: moook(0) = rest — no first-frame jump // Stage 3's angle-fan lookup indexes the same pristine PDC but the exit needs a // DISTANCE lookup — free it so prv_draw_exiting_paper builds its own in the slot. if (s_list->fly_lookup) { applib_free(s_list->fly_lookup); s_list->fly_lookup = NULL; } - s_report_anim = prv_start_anim(240, AnimationCurveLinear, // the moook table IS the easing + s_report_anim = prv_start_anim(240, AnimationCurveLinear, // the moook table IS the easing &s_report_stage4_impl, prv_report_stage4_stopped); - if (!s_report_anim) { // OOM: skip the flourish, hand off directly + if (!s_report_anim) { // OOM: skip the flourish, hand off directly prv_report_stage4_stopped(NULL, true, NULL); } } @@ -1112,8 +1189,10 @@ static void prv_draw_report_ball(GContext *ctx) { graphics_fill_circle(ctx, GPoint(cx, cy), R5_REPORT_BALL_R); const int32_t a = -(int32_t)(mb.size.w + R5_REPORT_BALL_R + 1 - cx) * (TRIG_MAX_ANGLE / 82); graphics_context_set_fill_color(ctx, GColorWhite); - graphics_fill_circle(ctx, GPoint(cx + (int)((int32_t)sin_lookup(a) * 7 / TRIG_MAX_RATIO), - cy - (int)((int32_t)cos_lookup(a) * 7 / TRIG_MAX_RATIO)), 3); + graphics_fill_circle(ctx, + GPoint(cx + (int)((int32_t)sin_lookup(a) * 7 / TRIG_MAX_RATIO), + cy - (int)((int32_t)cos_lookup(a) * 7 / TRIG_MAX_RATIO)), + 3); } // Timeline day-separator unfold, hand-rolled in the prv_draw_flying_icon idiom (clone per @@ -1121,44 +1200,53 @@ static void prv_draw_report_ball(GContext *ctx) { // deflate-8 intermediate -> rest, 3 clockwise delay groups, fat stroke decaying from the // ball's diameter over the first quarter so the dot IS the paper's first frame. static void prv_draw_unfolding_paper(GContext *ctx) { - if (!s_list->fly_pdc) return; + if (!s_list->fly_pdc) + return; GDrawCommandImage *clone = gdraw_command_image_clone(s_list->fly_pdc); - if (!clone) return; + if (!clone) + return; GDrawCommandList *list = gdraw_command_image_get_command_list(clone); - if (!list) { gdraw_command_image_destroy(clone); return; } - const GSize nsz = gdraw_command_image_get_bounds_size(clone); // 80x80 - if (!s_list->fly_lookup) { // pristine geometry: cache + if (!list) { + gdraw_command_image_destroy(clone); + return; + } + const GSize nsz = gdraw_command_image_get_bounds_size(clone); // 80x80 + if (!s_list->fly_lookup) { // pristine geometry: cache GPointIndexLookup *lu = gdraw_command_list_create_index_lookup_by_angle( list, GPoint(nsz.w / 2, nsz.h / 2), s_list->report_angle); - if (!lu) { gdraw_command_image_destroy(clone); return; } + if (!lu) { + gdraw_command_image_destroy(clone); + return; + } gpoint_index_lookup_set_groups(lu, 3, Fixed_S32_16(3 * FIXED_S32_16_ONE.raw_value / 2)); s_list->fly_lookup = lu; } - AnimationProgress up = (AnimationProgress)((int64_t)s_list->report_p * 2); // unfold done - if (up > ANIMATION_NORMALIZED_MAX) up = ANIMATION_NORMALIZED_MAX; // at 500/1000ms, then hold + AnimationProgress up = (AnimationProgress)((int64_t)s_list->report_p * 2); // unfold done + if (up > ANIMATION_NORMALIZED_MAX) + up = ANIMATION_NORMALIZED_MAX; // at 500/1000ms, then hold const GRect mb = layer_get_bounds(s_list->canvas); const GPoint origin = GPoint((mb.size.w - nsz.w) / 2, R5_SCREEN_CY - nsz.h / 2); - if (4 * up < ANIMATION_NORMALIZED_MAX) { // dot phase: keep the ball UNDER the fat stroke + if (4 * up < ANIMATION_NORMALIZED_MAX) { // dot phase: keep the ball UNDER the fat stroke graphics_context_set_fill_color(ctx, GColorBlack); graphics_fill_circle(ctx, GPoint(mb.size.w / 2, R5_SCREEN_CY), R5_REPORT_BALL_R); } - const GRect to = GRect(0, 0, nsz.w, nsz.h); - const GRect from = GRect(nsz.w / 2, nsz.h / 2, 0, 0); // collapsed dot at centre = the ball - const Fixed_S32_16 point_dur = Fixed_S32_16(FIXED_S32_16_ONE.raw_value / 6); + const GRect to = GRect(0, 0, nsz.w, nsz.h); + const GRect from = GRect(nsz.w / 2, nsz.h / 2, 0, 0); // collapsed dot at centre = the ball + const Fixed_S32_16 point_dur = Fixed_S32_16(FIXED_S32_16_ONE.raw_value / 6); const Fixed_S32_16 effect_dur = Fixed_S32_16(3 * FIXED_S32_16_ONE.raw_value / 4); - GRect intermediate = grect_scalar_expand(to, 8); // deflate 8, no bounce (day-sep exact) + GRect intermediate = grect_scalar_expand(to, 8); // deflate 8, no bounce (day-sep exact) GSize size = nsz; AnimationProgress seg = animation_timing_segmented(up, 0, 2, effect_dur); - gdraw_command_list_scale_segmented_to(list, size, from, intermediate, seg, - NULL, s_list->fly_lookup, point_dur, false); + gdraw_command_list_scale_segmented_to(list, size, from, intermediate, seg, NULL, + s_list->fly_lookup, point_dur, false); size = intermediate.size; seg = animation_timing_segmented(up, 1, 2, effect_dur); - gdraw_command_list_scale_segmented_to(list, size, intermediate, to, seg, - NULL, s_list->fly_lookup, point_dur, true); + gdraw_command_list_scale_segmented_to(list, size, intermediate, to, seg, NULL, s_list->fly_lookup, + point_dur, true); const AnimationProgress sw = animation_timing_curve( - animation_timing_clip(4 * up), AnimationCurveEaseInOut); // fat stroke decays, first 25% - gdraw_command_list_scale_stroke_width(list, - Fixed_S16_3((2 * R5_REPORT_BALL_R) << FIXED_S16_3_PRECISION), FIXED_S16_3_ONE, + animation_timing_clip(4 * up), AnimationCurveEaseInOut); // fat stroke decays, first 25% + gdraw_command_list_scale_stroke_width( + list, Fixed_S16_3((2 * R5_REPORT_BALL_R) << FIXED_S16_3_PRECISION), FIXED_S16_3_ONE, GStrokeWidthOpSet, GStrokeWidthOpMultiply, sw); gdraw_command_image_draw(ctx, clone, origin); gdraw_command_image_destroy(clone); @@ -1168,16 +1256,19 @@ static void prv_draw_unfolding_paper(GContext *ctx) { // dx slides the settled caption during the stage-4 exit; settled skips the rise // (stage 4 reuses report_p as its OWN progress — the rise must not replay). static void prv_draw_report_caption(GContext *ctx, int dx, bool settled) { - AnimationProgress up = settled ? ANIMATION_NORMALIZED_MAX - : (AnimationProgress)((int64_t)s_list->report_p * 2); - if (up > ANIMATION_NORMALIZED_MAX) up = ANIMATION_NORMALIZED_MAX; + AnimationProgress up = + settled ? ANIMATION_NORMALIZED_MAX : (AnimationProgress)((int64_t)s_list->report_p * 2); + if (up > ANIMATION_NORMALIZED_MAX) + up = ANIMATION_NORMALIZED_MAX; const AnimationProgress start = ANIMATION_NORMALIZED_MAX * 3 / 5; - if (up < start) return; - int dy = 0; // 6px ease-out-quad rise over up in [0.6, 0.96] + if (up < start) + return; + int dy = 0; // 6px ease-out-quad rise over up in [0.6, 0.96] if (up < ANIMATION_NORMALIZED_MAX * 24 / 25) { - int32_t t = (int32_t)((int64_t)(up - start) * ANIMATION_NORMALIZED_MAX - / (ANIMATION_NORMALIZED_MAX * 9 / 25)); - if (t > ANIMATION_NORMALIZED_MAX) t = ANIMATION_NORMALIZED_MAX; + int32_t t = (int32_t)((int64_t)(up - start) * ANIMATION_NORMALIZED_MAX / + (ANIMATION_NORMALIZED_MAX * 9 / 25)); + if (t > ANIMATION_NORMALIZED_MAX) + t = ANIMATION_NORMALIZED_MAX; const int32_t q = ANIMATION_NORMALIZED_MAX - t; dy = (int)(6 * ((int64_t)q * q / ANIMATION_NORMALIZED_MAX) / ANIMATION_NORMALIZED_MAX); } @@ -1195,27 +1286,35 @@ static void prv_draw_report_caption(GContext *ctx, int dx, bool settled) { // delay-by-distance lag the stretch — trailing (right) edge pulls last, same target // convention as the header jelly ({w/2, h} for upward travel), rotated: {w, h/2}. static void prv_draw_exiting_paper(GContext *ctx) { - if (!s_list->fly_pdc) return; + if (!s_list->fly_pdc) + return; GDrawCommandImage *clone = gdraw_command_image_clone(s_list->fly_pdc); - if (!clone) return; + if (!clone) + return; GDrawCommandList *list = gdraw_command_image_get_command_list(clone); - if (!list) { gdraw_command_image_destroy(clone); return; } + if (!list) { + gdraw_command_image_destroy(clone); + return; + } const GSize nsz = gdraw_command_image_get_bounds_size(clone); const GRect mb = layer_get_bounds(s_list->canvas); const GPoint origin = GPoint((mb.size.w - nsz.w) / 2, R5_SCREEN_CY - nsz.h / 2); - if (!s_list->fly_lookup) { // stage-3's angle fan was freed at arm; build the exit's - GPointIndexLookup *lu = gdraw_command_list_create_index_lookup_by_distance( - list, GPoint(nsz.w, nsz.h / 2)); - if (!lu) { gdraw_command_image_destroy(clone); return; } + if (!s_list->fly_lookup) { // stage-3's angle fan was freed at arm; build the exit's + GPointIndexLookup *lu = + gdraw_command_list_create_index_lookup_by_distance(list, GPoint(nsz.w, nsz.h / 2)); + if (!lu) { + gdraw_command_image_destroy(clone); + return; + } s_list->fly_lookup = lu; } const GRect from = GRect(0, 0, nsz.w, nsz.h); // END fully past the left edge with stretch headroom (the moook overshoots beyond it). const GRect to = GRect(-(origin.x + nsz.w + 40), 0, nsz.w, nsz.h); - gdraw_command_image_scale_segmented_to(clone, from, to, s_list->report_p, - prv_moook_full, s_list->fly_lookup, + gdraw_command_image_scale_segmented_to(clone, from, to, s_list->report_p, prv_moook_full, + s_list->fly_lookup, Fixed_S32_16(5 * FIXED_S32_16_ONE.raw_value / 6), - false); // = R5_FX_POINT_DURATION (defined below) + false); // = R5_FX_POINT_DURATION (defined below) gdraw_command_image_draw(ctx, clone, origin); gdraw_command_image_destroy(clone); } @@ -1235,13 +1334,14 @@ static void prv_draw_exiting_paper(GContext *ctx) { // Timeline's POINT_DURATION = 5/6 (timeline_layout_create_up_down_animation). EFFECT_DURATION (2/3) // is only needed for the two-edge disc capsule envelope below (the icon move is single-stage). -#define R5_FX_POINT_DURATION Fixed_S32_16(5 * FIXED_S32_16_ONE.raw_value / 6) -#define R5_FX_EFFECT_DURATION Fixed_S32_16(2 * FIXED_S32_16_ONE.raw_value / 3) +#define R5_FX_POINT_DURATION Fixed_S32_16(5 * FIXED_S32_16_ONE.raw_value / 6) +#define R5_FX_EFFECT_DURATION Fixed_S32_16(2 * FIXED_S32_16_ONE.raw_value / 3) // Clone `src`, scale-segment it FROM its start frame TO its end frame across `travel` px (an actual -// move, exactly like Timeline), then draw the clone at its END position `end_origin`. The persistent -// s_list icons are never touched. `travel` = how far up the icon has come (R5_SECTION_TRAVEL for the -// 5-day discs, R5_HEADER_TRAVEL for the today bitmap). Returns true if it drew the deformed clone. +// move, exactly like Timeline), then draw the clone at its END position `end_origin`. The +// persistent s_list icons are never touched. `travel` = how far up the icon has come +// (R5_SECTION_TRAVEL for the 5-day discs, R5_HEADER_TRAVEL for the today bitmap). Returns true if +// it drew the deformed clone. // // from/to are in the icon's LOCAL (0-based) coords — gdraw_command_image_draw applies the draw // offset separately — so the travel is encoded as a y-DIFFERENCE: from sits +travel below the end, @@ -1249,11 +1349,14 @@ static void prv_draw_exiting_paper(GContext *ctx) { // delay_by_distance lookup pulls from middle-x + the leading edge (top when going up-screen, bottom // when going down), so as fx_progress advances the leading points reach `to` first while the // trailing points still lag near `from` — that gap IS the across-the-travel stretch. -__attribute__((unused)) static bool prv_draw_jelly_icon(GContext *ctx, GDrawCommandImage *src, GPoint end_origin, - GSize isz, int travel, GPointIndexLookup **lookup_cache) { - if (!src) return false; +__attribute__((unused)) static bool prv_draw_jelly_icon(GContext *ctx, GDrawCommandImage *src, + GPoint end_origin, GSize isz, int travel, + GPointIndexLookup **lookup_cache) { + if (!src) + return false; GDrawCommandImage *clone = gdraw_command_image_clone(src); - if (!clone) return false; + if (!clone) + return false; GDrawCommandList *list = gdraw_command_image_get_command_list(clone); if (!list) { gdraw_command_image_destroy(clone); @@ -1282,7 +1385,7 @@ __attribute__((unused)) static bool prv_draw_jelly_icon(GContext *ctx, GDrawComm // drops back to the header-shown rest). A single scale_segment moves START -> END; the per-point // delay does the stretch. const GRect from = GRect(0, going_up_screen ? travel : -travel, isz.w, isz.h); - const GRect to = GRect(0, 0, isz.w, isz.h); + const GRect to = GRect(0, 0, isz.w, isz.h); gdraw_command_image_scale_segmented_to(clone, from, to, s_list->fx_progress, interp, lookup, R5_FX_POINT_DURATION, false); gdraw_command_image_draw(ctx, clone, end_origin); // draw at the END (fully-scrolled) position @@ -1294,9 +1397,11 @@ __attribute__((unused)) static bool prv_draw_jelly_icon(GContext *ctx, GDrawComm static GPoint prv_fly_bounce_offset(GRect from, GRect to, int16_t bounce) { const int dx = to.origin.x - from.origin.x; const int dy = to.origin.y - from.origin.y; - if (!dx && !dy) return GPointZero; + if (!dx && !dy) + return GPointZero; const int mag = weather_isqrt(dx * dx + dy * dy); - if (!mag) return GPointZero; + if (!mag) + return GPointZero; return GPoint(bounce * dx / mag, bounce * dy / mag); } @@ -1308,27 +1413,35 @@ static GPoint prv_fly_bounce_offset(GRect from, GRect to, int16_t bounce) { // left) at liftoff, and stage 1 settles from the over-grown/overshot intermediate back into the // destination (the overshoot bounce on landing). Drawn on top of the squashing screen. static void prv_draw_flying_icon(GContext *ctx) { - if (!s_list->fly_pdc) return; + if (!s_list->fly_pdc) + return; GDrawCommandImage *clone = gdraw_command_image_clone(s_list->fly_pdc); - if (!clone) return; + if (!clone) + return; GDrawCommandList *list = gdraw_command_image_get_command_list(clone); - if (!list) { gdraw_command_image_destroy(clone); return; } + if (!list) { + gdraw_command_image_destroy(clone); + return; + } // Local coords: draw at fly_dest.origin, so `to` is the dest box at 0,0 and `from` carries the // source's size + its offset relative to the dest. - const GRect to = GRect(0, 0, s_list->fly_dest.size.w, s_list->fly_dest.size.h); + const GRect to = GRect(0, 0, s_list->fly_dest.size.w, s_list->fly_dest.size.h); const GRect from = GRect(s_list->fly_src.origin.x - s_list->fly_dest.origin.x, s_list->fly_src.origin.y - s_list->fly_dest.origin.y, s_list->fly_src.size.w, s_list->fly_src.size.h); // delay-by-distance target, matching peek_layer: (dest_centre - src_centre) + native_size/2. const GSize nsz = gdraw_command_image_get_bounds_size(clone); const GPoint c_from = grect_center_point(&s_list->fly_src); - const GPoint c_to = grect_center_point(&s_list->fly_dest); + const GPoint c_to = grect_center_point(&s_list->fly_dest); const GPoint target = gpoint_add(gpoint_sub(c_to, c_from), GPoint(nsz.w / 2, nsz.h / 2)); // Deterministic for the whole fly (fly_src/fly_dest fixed at arm time): build once, cache. GPointIndexLookup *lookup = s_list->fly_lookup; if (!lookup) { lookup = gdraw_command_list_create_index_lookup_by_distance(list, target); - if (!lookup) { gdraw_command_image_destroy(clone); return; } + if (!lookup) { + gdraw_command_image_destroy(clone); + return; + } s_list->fly_lookup = lookup; } @@ -1345,8 +1458,8 @@ static void prv_draw_flying_icon(GContext *ctx) { lookup, R5_FX_POINT_DURATION, false); size = intermediate.size; const AnimationProgress seg1 = animation_timing_segmented(p, 1, 2, R5_FX_EFFECT_DURATION); - gdraw_command_list_scale_segmented_to(list, size, intermediate, to, seg1, prv_moook_soft3, - lookup, R5_FX_POINT_DURATION, true); + gdraw_command_list_scale_segmented_to(list, size, intermediate, to, seg1, prv_moook_soft3, lookup, + R5_FX_POINT_DURATION, true); gdraw_command_image_draw(ctx, clone, s_list->fly_dest.origin); gdraw_command_image_destroy(clone); @@ -1363,23 +1476,24 @@ static void prv_draw_flying_content(GContext *ctx) { // it still co-lands with the hero icon on the final frame. const int32_t MAXN = ANIMATION_NORMALIZED_MAX; int32_t local = (int32_t)s_list->squash_in_p - (MAXN * 2) / 5; - if (local < 0) local = 0; + if (local < 0) + local = 0; local = (int32_t)((int64_t)local * 5 / 3); - if (local > MAXN) local = MAXN; + if (local > MAXN) + local = MAXN; const int tdx = (int)prv_moook_soft3(local, -W, 0); // This preview must match what the card will REST on, or the status line visibly changes // in the first frames after the hand-off. char updated[40] = ""; #if PBL_ROUND - clock_copy_time_string(updated, sizeof(updated)); // round's card shows the time only + clock_copy_time_string(updated, sizeof(updated)); // round's card shows the time only #else - if (s_list->num_days > 0) { // rect starts on "Last updated ..." for its first 2s + if (s_list->num_days > 0) { // rect starts on "Last updated ..." for its first 2s expanded_view_format_updated(&s_list->days[0], updated, sizeof(updated)); } #endif expanded_view_draw_glance_content(ctx, W, tdx, updated, s_list->fly_sunset, s_list->fly_temp, - s_list->fly_uv, s_list->fly_precip, s_list->fly_wind, - s_list); + s_list->fly_uv, s_list->fly_precip, s_list->fly_wind, s_list); } // The disc behind each 5-day icon must stretch across the SAME travel as its icon: a capsule whose @@ -1391,12 +1505,14 @@ static void prv_draw_flying_content(GContext *ctx) { // // Returns the capsule rect for column centre-x `cx`; *is_capsule_out is true while stretched. __attribute__((unused)) static GRect prv_fx_disc_capsule(int cx, bool *is_capsule_out) { - if (is_capsule_out) *is_capsule_out = false; - const bool going_up = (s_list->header_to == R5_HEADER_TRAVEL); // DOWN press -> section travels up + if (is_capsule_out) + *is_capsule_out = false; + const bool going_up = + (s_list->header_to == R5_HEADER_TRAVEL); // DOWN press -> section travels up const int cy_a = R5_ICON_CY; // header-shown row centre const int cy_b = R5_ICON_CY - R5_SECTION_TRAVEL; // scrolled row centre const int cy_start = going_up ? cy_a : cy_b; // this transition's start centre (A->B / B->A) - const int cy_end = going_up ? cy_b : cy_a; // ... and end centre + const int cy_end = going_up ? cy_b : cy_a; // ... and end centre if (!s_list->fx_active) { // Rest: a plain circle at the icon row's current (post-slide) centre. const int dcy = R5_ICON_CY - (s_list->header_scroll * R5_SECTION_TRAVEL / R5_HEADER_TRAVEL); @@ -1406,17 +1522,18 @@ __attribute__((unused)) static GRect prv_fx_disc_capsule(int cx, bool *is_capsul InterpolateInt64Function interp = s_list->header_hasted ? prv_moook_hasted : prv_moook_full; // Two segments of the same 2/3-effect timing the icon scale uses. Segment 0 leads (reaches the // destination first), segment 1 trails. Ease each by the moook, then map to a disc-centre y. - const AnimationProgress lead_n = animation_timing_segmented(n, 0, 2, R5_FX_EFFECT_DURATION); + const AnimationProgress lead_n = animation_timing_segmented(n, 0, 2, R5_FX_EFFECT_DURATION); const AnimationProgress trail_n = animation_timing_segmented(n, 1, 2, R5_FX_EFFECT_DURATION); - const int lead_cy = (int)interp(lead_n, cy_start, cy_end); + const int lead_cy = (int)interp(lead_n, cy_start, cy_end); const int trail_cy = (int)interp(trail_n, cy_start, cy_end); // Going up-screen (DOWN press): the TOP is the leading edge (smaller y) and the BOTTOM trails. // Going down (UP press): flip — the BOTTOM leads, the TOP trails. - const int top_cy = going_up ? lead_cy : trail_cy; + const int top_cy = going_up ? lead_cy : trail_cy; const int bottom_cy = going_up ? trail_cy : lead_cy; - const int top = top_cy - R5_DISC_R; + const int top = top_cy - R5_DISC_R; const int bottom = bottom_cy + R5_DISC_R; - if (is_capsule_out) *is_capsule_out = (bottom - top > 2 * R5_DISC_R); + if (is_capsule_out) + *is_capsule_out = (bottom - top > 2 * R5_DISC_R); return GRect(cx - R5_DISC_R, top, 2 * R5_DISC_R, bottom - top); } @@ -1426,7 +1543,7 @@ __attribute__((unused)) static GRect prv_fx_disc_capsule(int cx, bool *is_capsul // banner pill (the Health "TYPICAL" pill — rounded-rect, bold centred label — made thinner), // with the five per-day precip values aligned under their day columns beneath. The block // slides up from below into the gap on the same moook bounce. -#define R5_STAT_PILL_H 18 // thinner than Health's ~35px pill +#define R5_STAT_PILL_H 18 // thinner than Health's ~35px pill static void prv_draw_stat_pill(GContext *ctx, const char *label, int y, int W, GColor fill) { // Pebble Health's pill geometry EXACTLY: a full-width rect inset on each side by // HEALTH_INSET = 18 + HEALTH_X_OFFSET/5, where HEALTH_X_OFFSET = (DISP_COLS - 144)/2 — i.e. 23px @@ -1439,25 +1556,28 @@ static void prv_draw_stat_pill(GContext *ctx, const char *label, int y, int W, G graphics_context_set_text_color(ctx, GColorBlack); // Vertically centre the label. graphics_draw_text top-aligns, and GOTHIC_14_BOLD carries ~7px of // top padding inside its ascent (measured: in an 18px pill the caps land 7px down / 2px up), so - // centring the line box reads low. Lift it by that asymmetry so the caps sit on the pill's centre. - GFont lf = s_list->day_font; // GOTHIC_14_BOLD, cached at load — this draws per scroll frame + // centring the line box reads low. Lift it by that asymmetry so the caps sit on the pill's + // centre. + GFont lf = s_list->day_font; // GOTHIC_14_BOLD, cached at load — this draws per scroll frame const int th = fonts_get_font_height(lf); graphics_draw_text(ctx, label, lf, - GRect(inset, y + (R5_STAT_PILL_H - th) / 2 - 3, W - 2 * inset, th), - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + GRect(inset, y + (R5_STAT_PILL_H - th) / 2 - 3, W - 2 * inset, th), + GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } // One row of five per-day precip-% values, each centred under its day column. static void prv_draw_stat_row(GContext *ctx, const WeatherLocationForecast *fan, int n, const int *col_x, int y) { - GFont vfont = s_list->day_font; // GOTHIC_14_BOLD, cached at load + GFont vfont = s_list->day_font; // GOTHIC_14_BOLD, cached at load const int cw = R5_COL_STEP_ICON; graphics_context_set_text_color(ctx, GColorBlack); for (int i = 0; i < n; i++) { const int v = fan[i].today_precip_mm; char buf[16]; - if (v < 0) snprintf(buf, sizeof(buf), "--"); - else snprintf(buf, sizeof(buf), "%d%%", v); + if (v < 0) + snprintf(buf, sizeof(buf), "--"); + else + snprintf(buf, sizeof(buf), "%d%%", v); graphics_draw_text(ctx, buf, vfont, GRect(col_x[i] - cw / 2, y, cw, 16), GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } @@ -1465,7 +1585,8 @@ static void prv_draw_stat_row(GContext *ctx, const WeatherLocationForecast *fan, static void prv_draw_bottom_stats(GContext *ctx, const WeatherLocationForecast *fan, int n, const int *col_x, int W) { - if (s_list->header_scroll <= 0) return; // hidden until the gap starts opening + if (s_list->header_scroll <= 0) + return; // hidden until the gap starts opening const int slide = R5_HEADER_TRAVEL - s_list->header_scroll; // off the bottom at A, in-gap at B // The precip banner rides `slide` like everything else, INCLUDING during the clock burst: // stage 1 squashes the whole drawn frame up off the top (SQUASH_UP_EXIT), so the pill must @@ -1477,12 +1598,12 @@ static void prv_draw_bottom_stats(GContext *ctx, const WeatherLocationForecast * // holds for any temp spread). prv_draw_stat_pill(ctx, i18n_get("PRECIPITATION", s_list), 145 + slide + R5_BAND_DY, W, GColorPictonBlue); - prv_draw_stat_row (ctx, fan, n, col_x, 164 + slide + R5_BAND_DY + R5_BAND_ROW_GAP); + prv_draw_stat_row(ctx, fan, n, col_x, 164 + slide + R5_BAND_DY + R5_BAND_ROW_GAP); if (!s_list->clock_fx) { // Timeline's day-separator peek dot (the one that unwinds into "Tomorrow"/"Tuesday"): a 12px // black circle, horizontally centred, the same 30px above the bottom edge as Timeline. On emery - // (>=200px height -> s_style_large) its centre lands at y = future_top_margin(7) + fat_pin(131) + - // future_dot_offset(16) + thin_pin(88)/2 = 198 on the 228px screen. + // (>=200px height -> s_style_large) its centre lands at y = future_top_margin(7) + fat_pin(131) + // + future_dot_offset(16) + thin_pin(88)/2 = 198 on the 228px screen. graphics_context_set_fill_color(ctx, GColorBlack); graphics_fill_circle(ctx, GPoint(W / 2, R5_DOT_REST_Y + slide), 6); } @@ -1491,10 +1612,10 @@ static void prv_draw_bottom_stats(GContext *ctx, const WeatherLocationForecast * // ---- Animated sun: 10 rays orbit the sun clockwise, each ray's length recomputed // from its CURRENT angle to the sun's natural profile (short at top, long at bottom) // so the rays grow as they descend + shrink as they rise — a living glow. ---- -#define R5_SUN_RAYS 10 -#define R5_SUN_SCALE 100 // body + ray scale, percent of the 40px reference +#define R5_SUN_RAYS 10 +#define R5_SUN_SCALE 100 // body + ray scale, percent of the 40px reference // Partly cloudy reuses the same sun, smaller, poking out behind the cloud. -#define R5_PC_SUN_SCALE 60 +#define R5_PC_SUN_SCALE 60 // Animation cadence (sun + rain share one timer). Rect: 80 ms tick = 12.5 fps; prv_sun_tick // advances 2 phase steps per tick so the VISUAL speed matches the old 40ms/25fps cadence @@ -1505,24 +1626,24 @@ static void prv_draw_bottom_stats(GContext *ctx, const WeatherLocationForecast * // frame interval, so every icon step lands ON a display frame. 80ms landed on alternating // 66/99ms boundaries — a visible advance/skip/advance micro-judder. The per-tick phase // advance is scaled (see prv_sun_step) so the visual speed is unchanged. -#define R5_SUN_PERIOD_MS PBL_IF_ROUND_ELSE(66, 80) -#define R5_SUN_ANGLE_STEP (TRIG_MAX_ANGLE / 168) +#define R5_SUN_PERIOD_MS PBL_IF_ROUND_ELSE(66, 80) +#define R5_SUN_ANGLE_STEP (TRIG_MAX_ANGLE / 168) // Power saving: after R5_IDLE_TICKS of no interaction (10 s at each shape's cadence: rect // 125 × 80 ms, round 152 × 66 ms) the animated colour today-icon fades over R5_FADE_MAX // ticks into Pebble's own static weather artwork, then the timer stops so the screen draws // no more frames. A touch wakes it again. The animated overlays (flakes / rays / drops) // scale by icon_fade/R5_FADE_MAX during the fade. -#define R5_IDLE_TICKS PBL_IF_ROUND_ELSE(152, 125) +#define R5_IDLE_TICKS PBL_IF_ROUND_ELSE(152, 125) // Fade duration in ticks — round carries 14 so the fade-to-static lasts ~the same wall time // at the 66ms cadence (14x66 = 924ms vs rect 12x80 = 960ms); kept EVEN because the dither // cross-fade splits it into two symmetric R5_FADE_MAX/2 halves. -#define R5_FADE_MAX PBL_IF_ROUND_ELSE(14, 12) -#define R5_FADE(x) ((x) * s_list->icon_fade / R5_FADE_MAX) +#define R5_FADE_MAX PBL_IF_ROUND_ELSE(14, 12) +#define R5_FADE(x) ((x) * s_list->icon_fade / R5_FADE_MAX) // Transition look (mirrors the clock screen's weather-bitmap drop/rise): the colour anim // drops down + dither-fades out while the static icon rises up + dither-fades in. -#define R5_ICON_SLIDE 14 // px the icon travels during the fade transition -#define R5_FADE_LEVELS 4 // dither steps for the cross-fade +#define R5_ICON_SLIDE 14 // px the icon travels during the fade transition +#define R5_FADE_LEVELS 4 // dither steps for the cross-fade // The sun's body, drawn the way the PDC draws it: the EXACT octagon polygon from // Pebble_50x50_Sunny_day.svg (points (+-4.5,+-11.5)/(+-11.5,+-4.5) about the body centre, @@ -1531,19 +1652,18 @@ static void prv_draw_bottom_stats(GContext *ctx, const WeatherLocationForecast * // path smears its corners and reads as an oval; the stroked path keeps the flats crisp, // exactly like the static bitmap. static void prv_draw_sun_body(GContext *ctx, GPoint c, int scale_pct, GColor outline_col) { - const int a = (92 * scale_pct + 500) / 1000; // apothem, from the art's 11.5 x 0.8 - const int d = (36 * scale_pct + 500) / 1000; // corner half-flat, from 4.5 x 0.8 + const int a = (92 * scale_pct + 500) / 1000; // apothem, from the art's 11.5 x 0.8 + const int d = (36 * scale_pct + 500) / 1000; // corner half-flat, from 4.5 x 0.8 GPoint pts[8] = { - {(int16_t)-d, (int16_t)-a}, {(int16_t)-a, (int16_t)-d}, - {(int16_t)-a, (int16_t)d}, {(int16_t)-d, (int16_t)a}, - {(int16_t)d, (int16_t)a}, {(int16_t)a, (int16_t)d}, - {(int16_t)a, (int16_t)-d}, {(int16_t)d, (int16_t)-a}, + {(int16_t)-d, (int16_t)-a}, {(int16_t)-a, (int16_t)-d}, {(int16_t)-a, (int16_t)d}, + {(int16_t)-d, (int16_t)a}, {(int16_t)d, (int16_t)a}, {(int16_t)a, (int16_t)d}, + {(int16_t)a, (int16_t)-d}, {(int16_t)d, (int16_t)-a}, }; - GPath path = { .num_points = 8, .points = pts, .offset = c }; + GPath path = {.num_points = 8, .points = pts, .offset = c}; graphics_context_set_fill_color(ctx, GColorWhite); gpath_draw_filled(ctx, &path); graphics_context_set_stroke_color(ctx, outline_col); - graphics_context_set_stroke_width(ctx, 3); // the PDC body's own stroke width + graphics_context_set_stroke_width(ctx, 3); // the PDC body's own stroke width gpath_draw_outline(ctx, &path); } @@ -1558,32 +1678,39 @@ static void prv_draw_sun_body(GContext *ctx, GPoint c, int scale_pct, GColor out // silhouette stays the PDC's composition while the glow lives. // Values in tenths of a pixel; inner radii carry +1px over the raw art so the stroke-2 // round caps land where the PDC's ink starts — the gap around the body survives. -static const uint16_t kSunRayAngles[10] = { // the PDC's own ray positions (from top, cw) - 0, - (uint16_t)(TRIG_MAX_ANGLE * 43 / 360), - (uint16_t)(TRIG_MAX_ANGLE * 73 / 360), - (uint16_t)(TRIG_MAX_ANGLE * 104 / 360), - (uint16_t)(TRIG_MAX_ANGLE * 137 / 360), - (uint16_t)(TRIG_MAX_ANGLE / 2), - (uint16_t)(TRIG_MAX_ANGLE * 223 / 360), - (uint16_t)(TRIG_MAX_ANGLE * 256 / 360), - (uint16_t)(TRIG_MAX_ANGLE * 287 / 360), - (uint16_t)(TRIG_MAX_ANGLE * 317 / 360), +static const uint16_t kSunRayAngles[10] = { + // the PDC's own ray positions (from top, cw) + 0, + (uint16_t)(TRIG_MAX_ANGLE * 43 / 360), + (uint16_t)(TRIG_MAX_ANGLE * 73 / 360), + (uint16_t)(TRIG_MAX_ANGLE * 104 / 360), + (uint16_t)(TRIG_MAX_ANGLE * 137 / 360), + (uint16_t)(TRIG_MAX_ANGLE / 2), + (uint16_t)(TRIG_MAX_ANGLE * 223 / 360), + (uint16_t)(TRIG_MAX_ANGLE * 256 / 360), + (uint16_t)(TRIG_MAX_ANGLE * 287 / 360), + (uint16_t)(TRIG_MAX_ANGLE * 317 / 360), }; -static const struct { uint16_t ang; uint8_t len10; uint8_t inner10; } kSunRayProfile[] = { - { 0, 24, 138 }, // top stub - { TRIG_MAX_ANGLE * 43 / 360, 34, 163 }, // upper diagonal stub (pushed out) - { TRIG_MAX_ANGLE * 73 / 360, 66, 144 }, // upper horizontal - { TRIG_MAX_ANGLE * 104 / 360, 66, 142 }, // lower horizontal - { TRIG_MAX_ANGLE * 137 / 360, 113, 152 }, // the long SE/SW diagonal - { TRIG_MAX_ANGLE / 2, 104, 138 }, // long bottom ray +static const struct { + uint16_t ang; + uint8_t len10; + uint8_t inner10; +} kSunRayProfile[] = { + {0, 24, 138}, // top stub + {TRIG_MAX_ANGLE * 43 / 360, 34, 163}, // upper diagonal stub (pushed out) + {TRIG_MAX_ANGLE * 73 / 360, 66, 144}, // upper horizontal + {TRIG_MAX_ANGLE * 104 / 360, 66, 142}, // lower horizontal + {TRIG_MAX_ANGLE * 137 / 360, 113, 152}, // the long SE/SW diagonal + {TRIG_MAX_ANGLE / 2, 104, 138}, // long bottom ray }; // Piecewise-linear sample of the profile at `ang` (any angle; folded to 0..180deg). static void prv_sun_ray_at(int32_t ang, int *len10, int *inner10) { int32_t f = ang % TRIG_MAX_ANGLE; - if (f < 0) f += TRIG_MAX_ANGLE; - if (f > TRIG_MAX_ANGLE / 2) f = TRIG_MAX_ANGLE - f; + if (f < 0) + f += TRIG_MAX_ANGLE; + if (f > TRIG_MAX_ANGLE / 2) + f = TRIG_MAX_ANGLE - f; const int n = (int)(sizeof(kSunRayProfile) / sizeof(kSunRayProfile[0])); for (int i = 1; i < n; i++) { if (f <= kSunRayProfile[i].ang) { @@ -1603,7 +1730,7 @@ static void prv_sun_ray_at(int32_t ang, int *len10, int *inner10) { // Rounded projection of a tenths-of-a-px radius along (sin, -cos) — truncation was // eating a full pixel of the body gap on the axis-aligned rays. static int prv_sun_proj(int32_t r10, int32_t trig, int c) { - int32_t v = r10 * trig / TRIG_MAX_RATIO; // tenths of a px, signed + int32_t v = r10 * trig / TRIG_MAX_RATIO; // tenths of a px, signed v = (v >= 0) ? (v + 5) / 10 : (v - 5) / 10; return c + (int)v; } @@ -1616,19 +1743,19 @@ static void prv_draw_animated_sun(GContext *ctx, GPoint c, int32_t phase, int sc // Rays: the PDC's clustered constellation rotates as one wheel; each ray samples the // length/inner profile at its current angle. graphics_context_set_stroke_color(ctx, sun_color); - graphics_context_set_stroke_width(ctx, 2); // the PDC rays' own stroke width + graphics_context_set_stroke_width(ctx, 2); // the PDC rays' own stroke width for (int i = 0; i < R5_SUN_RAYS; i++) { const int32_t ang = phase + (int32_t)kSunRayAngles[i]; int len10, inner10; prv_sun_ray_at(ang, &len10, &inner10); - len10 = R5_FADE(len10 * scale_pct / 100); // rays retract as the icon fades to static + len10 = R5_FADE(len10 * scale_pct / 100); // rays retract as the icon fades to static inner10 = inner10 * scale_pct / 100; - if (len10 < 8) continue; // sub-pixel nub: not worth a cap dot + if (len10 < 8) + continue; // sub-pixel nub: not worth a cap dot const int32_t cos_a = cos_lookup(ang); const int32_t sin_a = sin_lookup(ang); // Radial direction from the sun centre, clockwise from top = (sin, -cos). - const GPoint p0 = GPoint(prv_sun_proj(inner10, sin_a, c.x), - prv_sun_proj(inner10, -cos_a, c.y)); + const GPoint p0 = GPoint(prv_sun_proj(inner10, sin_a, c.x), prv_sun_proj(inner10, -cos_a, c.y)); const GPoint p1 = GPoint(prv_sun_proj(inner10 + len10, sin_a, c.x), prv_sun_proj(inner10 + len10, -cos_a, c.y)); graphics_draw_line(ctx, p0, p1); @@ -1645,80 +1772,94 @@ static void prv_draw_animated_sun(GContext *ctx, GPoint c, int32_t phase, int sc // follows the cloud on any platform. Round icon sits at y=26, so 28/42/25 here reproduce // the original absolute 54/68/51; emery's icon sits higher (y=10) so the band rides up // with it, staying just below the cloud and clear of the date row. -#define R5_RAIN_TOP 28 // drops emerge here — a clear gap below the cloud bottom -#define R5_RAIN_BOT 42 // drops are destroyed here — just above the date -#define R5_RAIN_LEN 5 // full streak length -#define R5_RAIN_FADE 4 // px over which a drop grows in / shrinks out -#define R5_SNOW_TOP 25 // snow starts a touch higher than rain → more room to grow -#define R5_SNOW_MAX 5 // snowflake half-size (px) at its peak, just before it vanishes - -typedef struct { int8_t dx; uint8_t spd; uint8_t off; } RainDrop; +#define R5_RAIN_TOP 28 // drops emerge here — a clear gap below the cloud bottom +#define R5_RAIN_BOT 42 // drops are destroyed here — just above the date +#define R5_RAIN_LEN 5 // full streak length +#define R5_RAIN_FADE 4 // px over which a drop grows in / shrinks out +#define R5_SNOW_TOP 25 // snow starts a touch higher than rain → more room to grow +#define R5_SNOW_MAX 5 // snowflake half-size (px) at its peak, just before it vanishes + typedef struct { - GColor main_col; // streak colour - GColor pale_col; // colour at the fade-in/out ends (toward the background) - int8_t slant; // horizontal drift per px of fall, in 1/16 px (0 = vertical) - uint8_t bob_y; // gentle vertical cloud bob amplitude (px) - uint8_t bob_ticks; // cloud bob period (ticks) + int8_t dx; + uint8_t spd; + uint8_t off; +} RainDrop; +typedef struct { + GColor main_col; // streak colour + GColor pale_col; // colour at the fade-in/out ends (toward the background) + int8_t slant; // horizontal drift per px of fall, in 1/16 px (0 = vertical) + uint8_t bob_y; // gentle vertical cloud bob amplitude (px) + uint8_t bob_ticks; // cloud bob period (ticks) const RainDrop *drops; uint8_t n_drops; - uint8_t sway; // snow side-to-side amplitude (px); 0 = falls dead straight - uint8_t sway_div; // snow sway period divisor (bigger = slower, gentler drift) - bool snow; // true = flakes (sway/grow), false = streaks (slant/fade) + uint8_t sway; // snow side-to-side amplitude (px); 0 = falls dead straight + uint8_t sway_div; // snow sway period divisor (bigger = slower, gentler drift) + bool snow; // true = flakes (sway/grow), false = streaks (slant/fade) } PrecipStyle; // Light rain: 4 vertical drops on the columns the PDC implies, gentle vertical float. static const RainDrop kRainDrops[4] = { - { -11, 14, 0 }, { -4, 18, 7 }, { 4, 12, 3 }, { 11, 16, 10 }, + {-11, 14, 0}, + {-4, 18, 7}, + {4, 12, 3}, + {11, 16, 10}, }; static const PrecipStyle kLightRainStyle = { - GColorVividCerulean, GColorCeleste, 0, 2, 88, kRainDrops, 4, 0, 45, // rain: sway unused + GColorVividCerulean, GColorCeleste, 0, 2, 88, kRainDrops, 4, 0, 45, // rain: sway unused }; // Storm (heavy rain): 4 diagonal (wind-swept, down-left) drops in darker blue, with the // same gentle vertical bob as the rain cloud. static const RainDrop kStormDrops[4] = { - { -10, 15, 0 }, { -4, 19, 8 }, { 2, 13, 4 }, { 8, 17, 11 }, // centred under the cloud + {-10, 15, 0}, + {-4, 19, 8}, + {2, 13, 4}, + {8, 17, 11}, // centred under the cloud }; static const PrecipStyle kStormStyle = { - GColorDukeBlue, GColorVividCerulean, 4, 2, 88, kStormDrops, 4, 0, 45, // rain: sway unused + GColorDukeBlue, GColorVividCerulean, 4, 2, 88, kStormDrops, 4, 0, 45, // rain: sway unused }; // Light snow: mirrors Pebble's snow bitmap — a cloud above 4 evenly-spaced snowflake // "lanes". Each flake falls dead straight in its own lane and drifts side-to-side only a // hair (sway=2) and slowly (sway_div=72), so the lanes never cross. `dx` = lane centre, // `spd` = fall speed, `off` = phase (staggered so they don't fall in lockstep). static const RainDrop kSnowFlakes[4] = { - { -12, 4, 0 }, { -4, 4, 9 }, { 4, 4, 4 }, { 12, 4, 13 }, + {-12, 4, 0}, + {-4, 4, 9}, + {4, 4, 4}, + {12, 4, 13}, }; static const PrecipStyle kLightSnowStyle = { - GColorPictonBlue, GColorPictonBlue, 0, 2, 88, kSnowFlakes, 4, 2, 72, true, + GColorPictonBlue, GColorPictonBlue, 0, 2, 88, kSnowFlakes, 4, 2, 72, true, }; // Heavy snow: same flakes, denser (6) and a touch faster — a thicker fall. static const RainDrop kHeavySnowFlakes[6] = { - { -13, 5, 0 }, { -8, 6, 9 }, { -2, 5, 4 }, { 4, 6, 13 }, { 9, 5, 7 }, { 13, 6, 2 }, + {-13, 5, 0}, {-8, 6, 9}, {-2, 5, 4}, {4, 6, 13}, {9, 5, 7}, {13, 6, 2}, }; static const PrecipStyle kHeavySnowStyle = { - GColorPictonBlue, GColorPictonBlue, 0, 2, 88, kHeavySnowFlakes, 6, 3, 45, true, // busier drift + GColorPictonBlue, GColorPictonBlue, 0, 2, 88, kHeavySnowFlakes, 6, 3, 45, true, // busier drift }; // Rain & snow (sleet): a moderate flake count falling a little quicker than plain snow. static const RainDrop kRainSnowFlakes[4] = { - { -11, 6, 0 }, { -3, 7, 9 }, { 5, 6, 4 }, { 12, 7, 12 }, + {-11, 6, 0}, + {-3, 7, 9}, + {5, 6, 4}, + {12, 7, 12}, }; static const PrecipStyle kRainSnowStyle = { - GColorPictonBlue, GColorPictonBlue, 0, 2, 88, kRainSnowFlakes, 4, 2, 55, true, + GColorPictonBlue, GColorPictonBlue, 0, 2, 88, kRainSnowFlakes, 4, 2, 55, true, }; -static void prv_hide_rain_proc(GDrawCommandProcessor *processor, GDrawCommand *pc, - size_t max_size, const GDrawCommandList *list, - const GDrawCommand *command) { +static void prv_hide_rain_proc(GDrawCommandProcessor *processor, GDrawCommand *pc, size_t max_size, + const GDrawCommandList *list, const GDrawCommand *command) { if (gdraw_command_get_num_points(pc) == 2) { // 2-pt commands = the PDC rain/snow lines - gdraw_command_set_hidden(pc, true); // hide cleanly — the processor runs on a - } // per-frame copy, so no off-screen stray dot + gdraw_command_set_hidden(pc, true); // hide cleanly — the processor runs on a + } // per-frame copy, so no off-screen stray dot } // Hide the PartlyCloudy PDC's sun (8-pt body octagon + 2-pt rays), leaving just the // 13-pt cloud + its 3-pt highlight — so we can draw our own animated sun behind it. -static void prv_hide_sun_proc(GDrawCommandProcessor *processor, GDrawCommand *pc, - size_t max_size, const GDrawCommandList *list, - const GDrawCommand *command) { +static void prv_hide_sun_proc(GDrawCommandProcessor *processor, GDrawCommand *pc, size_t max_size, + const GDrawCommandList *list, const GDrawCommand *command) { // Keep only the cloud (13/14-pt polygon) + its highlight (3-pt polyline); hide the // sun body (8 or 9 pts, depending on the explicit polygon close) + its rays (2 pts). const uint16_t n = gdraw_command_get_num_points(pc); @@ -1734,14 +1875,14 @@ static void prv_draw_animated_partly_cloudy(GContext *ctx, GPoint pdc_offset, in const int32_t ay = (int32_t)(tick % 88) * (TRIG_MAX_ANGLE / 88); const int bob_y = 2 * sin_lookup(ay) / TRIG_MAX_RATIO; // Sun first (behind) at the PDC sun centre (33,16) scaled into the today box. - prv_draw_animated_sun(ctx, - GPoint(pdc_offset.x + 33 * R5_TODAY_ICON / 50, pdc_offset.y + 16 * R5_TODAY_ICON / 50), + prv_draw_animated_sun( + ctx, GPoint(pdc_offset.x + 33 * R5_TODAY_ICON / 50, pdc_offset.y + 16 * R5_TODAY_ICON / 50), phase, R5_PC_SUN_SCALE); // Floating cloud on top, its sun hidden (we drew our own animated one). if (s_list->today_pdc) { - GDrawCommandProcessor proc = { .command = prv_hide_sun_proc }; + GDrawCommandProcessor proc = {.command = prv_hide_sun_proc}; gdraw_command_image_draw_processed(ctx, s_list->today_pdc, - GPoint(pdc_offset.x, pdc_offset.y + bob_y), &proc); + GPoint(pdc_offset.x, pdc_offset.y + bob_y), &proc); } } @@ -1751,14 +1892,13 @@ static void prv_draw_animated_partly_cloudy(GContext *ctx, GPoint pdc_offset, in // the kept cloud renders crisply at its own offset. CloudyDay PDC = lower cloud (cmds 0+1) // then upper cloud (cmds 2+3). typedef struct { - GDrawCommandProcessor base; // must be first — callback casts back to this + GDrawCommandProcessor base; // must be first — callback casts back to this int counter; - int keep; // 0 = render lower cloud only, 1 = render upper cloud only + int keep; // 0 = render lower cloud only, 1 = render upper cloud only } CloudHideProc; -static void prv_cloud_hide_proc(GDrawCommandProcessor *processor, GDrawCommand *pc, - size_t max_size, const GDrawCommandList *list, - const GDrawCommand *command) { +static void prv_cloud_hide_proc(GDrawCommandProcessor *processor, GDrawCommand *pc, size_t max_size, + const GDrawCommandList *list, const GDrawCommand *command) { CloudHideProc *p = (CloudHideProc *)processor; const int which = (p->counter < 2) ? 0 : 1; // cmds 0,1 = lower cloud; 2,3 = upper cloud p->counter++; @@ -1769,26 +1909,29 @@ static void prv_cloud_hide_proc(GDrawCommandProcessor *processor, GDrawCommand * } static void prv_draw_animated_cloudy(GContext *ctx, GPoint pdc_offset, int32_t phase) { - if (!s_list->today_pdc) return; + if (!s_list->today_pdc) + return; const int tick = phase / R5_SUN_ANGLE_STEP; // Each cloud floats a gentle ellipse — wider than tall, like a breeze — at different // rates + phases so they drift around and slide relative to one another. - const int32_t aL = (int32_t)tick * (TRIG_MAX_ANGLE / 140); // lower cloud, slower - const int32_t aU = (int32_t)tick * (TRIG_MAX_ANGLE / 100) + 0x5000; // upper cloud, faster + offset + const int32_t aL = (int32_t)tick * (TRIG_MAX_ANGLE / 140); // lower cloud, slower + const int32_t aU = + (int32_t)tick * (TRIG_MAX_ANGLE / 100) + 0x5000; // upper cloud, faster + offset const int lx = 5 * cos_lookup(aL) / TRIG_MAX_RATIO, ly = 2 * sin_lookup(aL) / TRIG_MAX_RATIO; const int ux = 5 * cos_lookup(aU) / TRIG_MAX_RATIO, uy = 2 * sin_lookup(aU) / TRIG_MAX_RATIO; - CloudHideProc keep_lower = { .base = { .command = prv_cloud_hide_proc }, .counter = 0, .keep = 0 }; - gdraw_command_image_draw_processed(ctx, s_list->today_pdc, - GPoint(pdc_offset.x + lx, pdc_offset.y + ly), &keep_lower.base); - CloudHideProc keep_upper = { .base = { .command = prv_cloud_hide_proc }, .counter = 0, .keep = 1 }; - gdraw_command_image_draw_processed(ctx, s_list->today_pdc, - GPoint(pdc_offset.x + ux, pdc_offset.y + uy), &keep_upper.base); + CloudHideProc keep_lower = {.base = {.command = prv_cloud_hide_proc}, .counter = 0, .keep = 0}; + gdraw_command_image_draw_processed( + ctx, s_list->today_pdc, GPoint(pdc_offset.x + lx, pdc_offset.y + ly), &keep_lower.base); + CloudHideProc keep_upper = {.base = {.command = prv_cloud_hide_proc}, .counter = 0, .keep = 1}; + gdraw_command_image_draw_processed( + ctx, s_list->today_pdc, GPoint(pdc_offset.x + ux, pdc_offset.y + uy), &keep_upper.base); } // A small snowflake: a "+" with shorter diagonals (8-pointed asterisk) at half-size r. static void prv_draw_flake(GContext *ctx, GPoint c, int r) { - if (r < 1) return; + if (r < 1) + return; graphics_draw_line(ctx, GPoint(c.x, c.y - r), GPoint(c.x, c.y + r)); graphics_draw_line(ctx, GPoint(c.x - r, c.y), GPoint(c.x + r, c.y)); const int d = (r * 3) / 4; // diagonals a touch shorter so the star stays round @@ -1798,32 +1941,32 @@ static void prv_draw_flake(GContext *ctx, GPoint c, int r) { static void prv_draw_animated_precip(GContext *ctx, GPoint pdc_offset, int32_t phase, const PrecipStyle *st) { - const GColor main_col = GColorBlack; // one ink for all precip — flakes included - const GColor pale_col = main_col; // (white flakes vanished on the white page) + const GColor main_col = GColorBlack; // one ink for all precip — flakes included + const GColor pale_col = main_col; // (white flakes vanished on the white page) // phase is the sun-angle accumulator -> back to a tick count (sun-speed independent). const int tick = phase / R5_SUN_ANGLE_STEP; const int32_t ay = (int32_t)(tick % st->bob_ticks) * (TRIG_MAX_ANGLE / st->bob_ticks); const int bob_y = st->bob_y * sin_lookup(ay) / TRIG_MAX_RATIO; if (s_list->today_pdc) { - GDrawCommandProcessor proc = { .command = prv_hide_rain_proc }; + GDrawCommandProcessor proc = {.command = prv_hide_rain_proc}; gdraw_command_image_draw_processed(ctx, s_list->today_pdc, - GPoint(pdc_offset.x, pdc_offset.y + bob_y), &proc); + GPoint(pdc_offset.x, pdc_offset.y + bob_y), &proc); } - const int top = st->snow ? R5_SNOW_TOP : R5_RAIN_TOP; + const int top = st->snow ? R5_SNOW_TOP : R5_RAIN_TOP; const int range = R5_RAIN_BOT - top; - const int peak = (range * 3) / 5; - const int cx = pdc_offset.x + R5_TODAY_ICON / 2; + const int peak = (range * 3) / 5; + const int cx = pdc_offset.x + R5_TODAY_ICON / 2; graphics_context_set_antialiased(ctx, true); graphics_context_set_stroke_width(ctx, st->snow ? 1 : 2); - if (st->snow) graphics_context_set_stroke_color(ctx, main_col); + if (st->snow) + graphics_context_set_stroke_color(ctx, main_col); for (int i = 0; i < st->n_drops; i++) { const RainDrop *d = &st->drops[i]; const int prog = ((tick * d->spd) / 10 + d->off) % range; if (st->snow) { const int y = pdc_offset.y + top + prog; - const int r = (prog <= peak) - ? 1 + (R5_SNOW_MAX - 1) * prog / peak - : R5_SNOW_MAX * (range - 1 - prog) / (range - 1 - peak); + const int r = (prog <= peak) ? 1 + (R5_SNOW_MAX - 1) * prog / peak + : R5_SNOW_MAX * (range - 1 - prog) / (range - 1 - peak); const int32_t sa = (int32_t)tick * (TRIG_MAX_ANGLE / st->sway_div) + (int32_t)i * 0x2800; const int sway = st->sway * sin_lookup(sa) / TRIG_MAX_RATIO; prv_draw_flake(ctx, GPoint(cx + d->dx + sway, y), R5_FADE(r)); @@ -1847,7 +1990,6 @@ static void prv_draw_animated_precip(GContext *ctx, GPoint pdc_offset, int32_t p } } - // Light snow: same feel as the rain — flakes fall beneath a gently bobbing cloud, fade in // under it and shrink away just above the date — but drawn as light-blue flakes that fall // slower and sway side to side. Reuses prv_hide_rain_proc (the PDC's static flakes are 2-pt @@ -1855,15 +1997,12 @@ static void prv_draw_animated_precip(GContext *ctx, GPoint pdc_offset, int32_t p // Draw today's animated condition icon with its top-left at (x, y). Factored so the // power-save transition can render it at a dropped position. static const PrecipStyle *const kFallStyles[] = { - [WeatherType_LightSnow] = &kLightSnowStyle, - [WeatherType_LightRain] = &kLightRainStyle, - [WeatherType_HeavyRain] = &kStormStyle, - [WeatherType_HeavySnow] = &kHeavySnowStyle, - [WeatherType_RainAndSnow] = &kRainSnowStyle, + [WeatherType_LightSnow] = &kLightSnowStyle, [WeatherType_LightRain] = &kLightRainStyle, + [WeatherType_HeavyRain] = &kStormStyle, [WeatherType_HeavySnow] = &kHeavySnowStyle, + [WeatherType_RainAndSnow] = &kRainSnowStyle, }; -static void prv_draw_today_anim(GContext *ctx, const WeatherLocationForecast *today, - int x, int y) { +static void prv_draw_today_anim(GContext *ctx, const WeatherLocationForecast *today, int x, int y) { (void)today; // Dispatch on prv_header_type() — THE SAME FIELD today_pdc was loaded from — never on // today->current_weather_type. The animated families all composite today_pdc into the @@ -1872,7 +2011,8 @@ static void prv_draw_today_anim(GContext *ctx, const WeatherLocationForecast *to // on-watch during an overcast->rain change: overcast clouds over rain streaks). On rect // prv_header_type() == current_weather_type, so this is a no-op there. const unsigned t = (unsigned)prv_header_type(); - const PrecipStyle *st = (t < (sizeof(kFallStyles)/sizeof(kFallStyles[0]))) ? kFallStyles[t] : NULL; + const PrecipStyle *st = + (t < (sizeof(kFallStyles) / sizeof(kFallStyles[0]))) ? kFallStyles[t] : NULL; if (st) { prv_draw_animated_precip(ctx, GPoint(x, y), s_list->sun_phase, st); return; @@ -1880,14 +2020,17 @@ static void prv_draw_today_anim(GContext *ctx, const WeatherLocationForecast *to switch (prv_header_type()) { case WeatherType_Sun: prv_draw_animated_sun(ctx, GPoint(x + R5_TODAY_ICON / 2, y + R5_TODAY_ICON * 2 / 5), - s_list->sun_phase, R5_SUN_SCALE); + s_list->sun_phase, R5_SUN_SCALE); break; case WeatherType_PartlyCloudy: - prv_draw_animated_partly_cloudy(ctx, GPoint(x, y), s_list->sun_phase); break; + prv_draw_animated_partly_cloudy(ctx, GPoint(x, y), s_list->sun_phase); + break; case WeatherType_CloudyDay: - prv_draw_animated_cloudy(ctx, GPoint(x, y), s_list->sun_phase); break; + prv_draw_animated_cloudy(ctx, GPoint(x, y), s_list->sun_phase); + break; default: - if (s_list->today_pdc) gdraw_command_image_draw(ctx, s_list->today_pdc, GPoint(x, y)); + if (s_list->today_pdc) + gdraw_command_image_draw(ctx, s_list->today_pdc, GPoint(x, y)); break; } } @@ -1898,16 +2041,20 @@ static void prv_draw_today_anim(GContext *ctx, const WeatherLocationForecast *to // on emery, white on round — erasing to the wrong colour paints a visible box. Operates // directly on the framebuffer. static void prv_fade_erase(GContext *ctx, GRect r, int keep, GColor bg) { - if (keep >= R5_FADE_LEVELS) return; // fully opaque — nothing to erase - const int thr = keep * 4; // erase any pixel whose dither value >= thr + if (keep >= R5_FADE_LEVELS) + return; // fully opaque — nothing to erase + const int thr = keep * 4; // erase any pixel whose dither value >= thr GBitmap *fb = graphics_capture_frame_buffer(ctx); - if (!fb) return; + if (!fb) + return; const GRect fbb = gbitmap_get_bounds(fb); for (int y = r.origin.y; y < r.origin.y + r.size.h; y++) { - if (y < fbb.origin.y || y >= fbb.origin.y + fbb.size.h) continue; + if (y < fbb.origin.y || y >= fbb.origin.y + fbb.size.h) + continue; GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)y); for (int x = r.origin.x; x < r.origin.x + r.size.w; x++) { - if (x < (int)ri.min_x || x > (int)ri.max_x) continue; + if (x < (int)ri.min_x || x > (int)ri.max_x) + continue; if (s_bayer4[y & 3][x & 3] >= thr) { weather_fb_row_set(ri.data, x, bg.argb); } @@ -1917,8 +2064,8 @@ static void prv_fade_erase(GContext *ctx, GRect r, int keep, GColor bg) { } // Connector polyline for one masked series (skip segments touching an unknown value). -static void prv_draw_series_links(GContext *ctx, const int *colx, const int *y, - const bool *ok, int n, GColor c) { +static void prv_draw_series_links(GContext *ctx, const int *colx, const int *y, const bool *ok, + int n, GColor c) { graphics_context_set_stroke_color(ctx, c); for (int i = 0; i < n - 1; i++) { if (ok[i] && ok[i + 1]) { @@ -1940,17 +2087,23 @@ static void prv_draw_ring_dot(GContext *ctx, GPoint p, GColor ring) { static void prv_draw_temp_centered(GContext *ctx, int temp, GFont font, int cx, int y) { char b[8]; snprintf(b, sizeof(b), "%d\xC2\xB0", temp); - graphics_draw_text(ctx, b, font, GRect(cx - 26, y, 52, 16), - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, b, font, GRect(cx - 26, y, 52, 16), GTextOverflowModeTrailingEllipsis, + GTextAlignmentCenter, NULL); } // Fold min/max over the masked entries of v[0..n); *have tracks whether any seen yet. static void prv_fold_minmax(const int *v, const bool *ok, int n, bool *have, int *mn, int *mx) { for (int i = 0; i < n; i++) { - if (!ok[i]) continue; - if (!*have) { *mn = *mx = v[i]; *have = true; } - if (v[i] > *mx) *mx = v[i]; - if (v[i] < *mn) *mn = v[i]; + if (!ok[i]) + continue; + if (!*have) { + *mn = *mx = v[i]; + *have = true; + } + if (v[i] > *mx) + *mx = v[i]; + if (v[i] < *mn) + *mn = v[i]; } } #endif @@ -1969,7 +2122,8 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { const int ss = hs * R5_SECTION_TRAVEL / R5_HEADER_TRAVEL; int total = (int)s_list->num_days; - if (total <= 0) return; + if (total <= 0) + return; #if !PBL_ROUND // Current time at the very top, drawn exactly like the notification status-bar clock // (StatusBarLayerModeClock, status_bar_layer.c): white, centred, FONT_KEY_GOTHIC_18, and @@ -1988,8 +2142,8 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { } GFont sb_font = fonts_get_system_font(FONT_KEY_GOTHIC_18); const int sb_fh = fonts_get_font_height(sb_font); - const int sb_ty = (STATUS_BAR_LAYER_HEIGHT - 2 * STATUS_BAR_LAYER_SEPARATOR_Y_OFFSET - sb_fh) - - hs; + const int sb_ty = + (STATUS_BAR_LAYER_HEIGHT - 2 * STATUS_BAR_LAYER_SEPARATOR_Y_OFFSET - sb_fh) - hs; graphics_context_set_text_color(ctx, GColorBlack); if (s_list->clock_loc_show || s_list->clock_swap_active) { // First entry: the active location holds the slot, then swaps out exactly like @@ -1999,7 +2153,8 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { prv_clock_loc_city(loc, sizeof(loc), s_list->days[0].location_name); } const int sx = s_list->clock_swap_active - ? (int)interpolate_moook_soft(s_list->clock_swap_p, 0, W, 3) : 0; + ? (int)interpolate_moook_soft(s_list->clock_swap_p, 0, W, 3) + : 0; graphics_draw_text(ctx, loc, sb_font, GRect(sx, sb_ty, W, sb_fh), GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); if (s_list->clock_swap_active) { @@ -2017,8 +2172,10 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { // four days. Same five columns, same geometry — only the day window shifts. const int fan_start = 0; int n = total - fan_start; - if (n > R5_MAX_COLS) n = R5_MAX_COLS; - if (n < 0) n = 0; + if (n > R5_MAX_COLS) + n = R5_MAX_COLS; + if (n < 0) + n = 0; const WeatherLocationForecast *fan = &s_list->days[fan_start]; // Three column tiers, each horizontally centred, fanning inward as they descend. @@ -2029,21 +2186,23 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { // and an unclamped lerp would extrapolate the pitch negative mid-transition. { int ssc = ss; - if (ssc < 0) ssc = 0; - if (ssc > R5_SECTION_TRAVEL) ssc = R5_SECTION_TRAVEL; - const int step_icon = R5_COL_STEP_ICON - - (R5_COL_STEP_ICON - R5_COL_STEP_ICON_SCROLLED) * ssc / R5_SECTION_TRAVEL; - const int step_high = R5_COL_STEP_HIGH - - (R5_COL_STEP_HIGH - R5_COL_STEP_HIGH_SCROLLED) * ssc / R5_SECTION_TRAVEL; + if (ssc < 0) + ssc = 0; + if (ssc > R5_SECTION_TRAVEL) + ssc = R5_SECTION_TRAVEL; + const int step_icon = + R5_COL_STEP_ICON - (R5_COL_STEP_ICON - R5_COL_STEP_ICON_SCROLLED) * ssc / R5_SECTION_TRAVEL; + const int step_high = + R5_COL_STEP_HIGH - (R5_COL_STEP_HIGH - R5_COL_STEP_HIGH_SCROLLED) * ssc / R5_SECTION_TRAVEL; for (int i = 0; i < n; i++) { col_icon[i] = W / 2 - (n - 1) * step_icon / 2 + i * step_icon; col_high[i] = W / 2 - (n - 1) * step_high / 2 + i * step_high; - col_low[i] = W / 2 - (n - 1) * R5_COL_STEP_LOW / 2 + i * R5_COL_STEP_LOW; + col_low[i] = W / 2 - (n - 1) * R5_COL_STEP_LOW / 2 + i * R5_COL_STEP_LOW; } } const int box_w = 52; // text box; centred short text never overlaps neighbours // Fan weekday row demoted to match the today header weight (so TODAY outranks the fan). - GFont day_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); + GFont day_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); GFont small_font = fonts_get_system_font(FONT_KEY_GOTHIC_14); // Today's date caption + fan weekday labels change only at local midnight (or on a data @@ -2059,19 +2218,18 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { // Cap the expiry at an hour: DST-transition days aren't 86400s long and backward // clock/timezone changes would otherwise leave stale strings up for hours. One extra // strftime per hour is noise; the midnight rollover still lands within the hour. - time_t to_midnight = - (time_t)(86400 - (lt->tm_hour * 3600 + lt->tm_min * 60 + lt->tm_sec)); + time_t to_midnight = (time_t)(86400 - (lt->tm_hour * 3600 + lt->tm_min * 60 + lt->tm_sec)); s_list->date_cache_expiry = now + (to_midnight < 3600 ? to_midnight : 3600); } else { s_list->daydate_cache[0] = '\0'; - s_list->date_cache_expiry = now + 60; // retry shortly; localtime failed + s_list->date_cache_expiry = now + 60; // retry shortly; localtime failed } for (int i = 0; i < n && i < R5_MAX_COLS; i++) { // Day offset == column index: the fan starts at TODAY on both shapes . prv_fill_weekday_label(i, fan[i].label, s_list->weekday_cache[i], sizeof(s_list->weekday_cache[i])); } - s_list->today_header_dirty = true; // icon centring depends on the date width + s_list->today_header_dirty = true; // icon centring depends on the date width } } const char *daydate = s_list->daydate_cache; @@ -2082,20 +2240,23 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { if (s_list->today_header_dirty) { s_list->today_icon_x = R5_TODAY_X; #if !PBL_ROUND - const GSize dsz = graphics_text_layout_get_content_size( - daydate, day_font, GRect(0, 0, W, 20), - GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft); + const GSize dsz = graphics_text_layout_get_content_size(daydate, day_font, GRect(0, 0, W, 20), + GTextOverflowModeTrailingEllipsis, + GTextAlignmentLeft); s_list->today_icon_x = R5_TODAY_X + (dsz.w - R5_TODAY_ICON) / 2; - if (s_list->today_icon_x < R5_TODAY_X) s_list->today_icon_x = R5_TODAY_X; + if (s_list->today_icon_x < R5_TODAY_X) + s_list->today_icon_x = R5_TODAY_X; #endif - const char *cph = (s_list->days[0].current_weather_phrase && - s_list->days[0].current_weather_phrase[0]) - ? s_list->days[0].current_weather_phrase : "--"; + const char *cph = + (s_list->days[0].current_weather_phrase && s_list->days[0].current_weather_phrase[0]) + ? s_list->days[0].current_weather_phrase + : "--"; const int cl = PBL_IF_ROUND_ELSE(110, W / 2), cr = PBL_IF_ROUND_ELSE(230, W - R5_TODAY_X); GFont cf = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); const GSize cw0 = graphics_text_layout_get_content_size( cph, cf, GRect(0, 0, 300, 20), GTextOverflowModeWordWrap, GTextAlignmentLeft); - if (cw0.w > cr - cl) cf = fonts_get_system_font(FONT_KEY_GOTHIC_14); + if (cw0.w > cr - cl) + cf = fonts_get_system_font(FONT_KEY_GOTHIC_14); s_list->today_cond_font = cf; s_list->today_header_dirty = false; } @@ -2117,8 +2278,9 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { const GSize tsz = gdraw_command_image_get_bounds_size(s_list->today_pdc); // END position: off the top on the DOWN press, the normal header row on the UP press; the // scale-segment supplies the travel + stretch from there. - const GPoint tend = GPoint(today_x, (s_list->header_to == R5_HEADER_TRAVEL) - ? (R5_TODAY_Y - R5_HEADER_TRAVEL) : R5_TODAY_Y); + const GPoint tend = + GPoint(today_x, (s_list->header_to == R5_HEADER_TRAVEL) ? (R5_TODAY_Y - R5_HEADER_TRAVEL) + : R5_TODAY_Y); today_jellied = prv_draw_jelly_icon(ctx, s_list->today_pdc, tend, tsz, R5_HEADER_TRAVEL, &s_list->jelly_lookup[0]); } @@ -2126,7 +2288,7 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { // already drawn deformed above } else #endif - if (s_list->flying_icon) { + if (s_list->flying_icon) { // Hero icon-fly (UP -> card): today's icon is lifted out of the squash and drawn separately, // zooming to the card's icon spot (see prv_draw_flying_icon). Draw nothing for it here. } else if (fade >= R5_FADE_MAX) { @@ -2146,26 +2308,28 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { const int half = R5_FADE_MAX / 2; if (fade > half) { // Outgoing colour animation: drop down + fade out into the banner. - const int prog = R5_FADE_MAX - fade; // 1 → half - const int drop = R5_ICON_SLIDE * prog / half; // 0 → full drop - const int keep_out = (fade - half) * R5_FADE_LEVELS / half; // opaque → gone + const int prog = R5_FADE_MAX - fade; // 1 → half + const int drop = R5_ICON_SLIDE * prog / half; // 0 → full drop + const int keep_out = (fade - half) * R5_FADE_LEVELS / half; // opaque → gone prv_draw_today_anim(ctx, today, today_x, R5_TODAY_Y - hs + drop); // Erase wider than the 40px box: the cloud art (and the two-cloud cloudy float) spills // past the icon edges, so a tight rect would leave its far sides un-faded. - prv_fade_erase(ctx, GRect(today_x - 10, R5_TODAY_Y - hs + drop, R5_TODAY_ICON + 20, - R5_TODAY_ICON + 8), keep_out, icon_bg); + prv_fade_erase( + ctx, GRect(today_x - 10, R5_TODAY_Y - hs + drop, R5_TODAY_ICON + 20, R5_TODAY_ICON + 8), + keep_out, icon_bg); } else if (s_list->today_pdc) { // Incoming static icon: rise up from below + fade in (blank at the midpoint). - const int prog = half - fade; // 0 → half - const int rise = R5_ICON_SLIDE * fade / half; // full below → 0 - const int keep_in = prog * R5_FADE_LEVELS / half; // gone → opaque + const int prog = half - fade; // 0 → half + const int rise = R5_ICON_SLIDE * fade / half; // full below → 0 + const int keep_in = prog * R5_FADE_LEVELS / half; // gone → opaque gdraw_command_image_draw(ctx, s_list->today_pdc, GPoint(today_x, R5_TODAY_Y - hs + rise)); - prv_fade_erase(ctx, GRect(today_x - 10, R5_TODAY_Y - hs + rise, R5_TODAY_ICON + 20, - R5_TODAY_ICON), keep_in, icon_bg); + prv_fade_erase(ctx, + GRect(today_x - 10, R5_TODAY_Y - hs + rise, R5_TODAY_ICON + 20, R5_TODAY_ICON), + keep_in, icon_bg); } } char tnow[16]; - const int hdr_temp = today->current_temp_now; // current-hour temp, both shapes + const int hdr_temp = today->current_temp_now; // current-hour temp, both shapes if (hdr_temp != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP) { snprintf(tnow, sizeof(tnow), "%d\xC2\xB0", hdr_temp); } else { @@ -2175,59 +2339,60 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { #if PBL_ROUND graphics_context_set_text_color(ctx, GColorBlack); graphics_draw_text(ctx, tnow, fonts_get_system_font(FONT_KEY_LECO_36_BOLD_NUMBERS), - GRect(112, 22 - hs, 120, 44), // -hs: ride the header scroll off the top - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + GRect(112, 22 - hs, 120, 44), // -hs: ride the header scroll off the top + GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); #else // Emery: FLAT BLACK LECO on the white page — the Timeline sloth-screen grammar: black // type directly on the field, white reserved for fills inside the black-inked artwork. // Right margin equals the icon's left margin (R5_TODAY_X). graphics_context_set_text_color(ctx, GColorBlack); - graphics_draw_text(ctx, tnow, fonts_get_system_font(FONT_KEY_LECO_36_BOLD_NUMBERS), - GRect(W - R5_TODAY_X - 120, R5_TODAY_Y - 2 - hs, 120, 44), // -2: LECO parks low + graphics_draw_text( + ctx, tnow, fonts_get_system_font(FONT_KEY_LECO_36_BOLD_NUMBERS), + GRect(W - R5_TODAY_X - 120, R5_TODAY_Y - 2 - hs, 120, 44), // -2: LECO parks low GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); #endif char cond[32]; snprintf(cond, sizeof(cond), "%s", (today->current_weather_phrase && today->current_weather_phrase[0]) - ? today->current_weather_phrase : "--"); + ? today->current_weather_phrase + : "--"); // Title-case (e.g. "Partly Cloudy") — Pebble reserves ALL CAPS for terse labels/units. // Condition matches the date: same font/size/weight, same baseline (date is on // the left under the icon, condition on the right under the temp). - graphics_context_set_text_color(ctx, GColorBlack); // black on the page + graphics_context_set_text_color(ctx, GColorBlack); // black on the page // Condition: right-anchored at x=230 (mirrors the left date, aligned to the fan's // 30/230 columns), growing LEFT as it lengthens down to x=110 (just clear of the // date). Length-dependent: measure the phrase + step the font down one size if even // that band can't hold it, so long phrases like "PARTLY CLOUDY" are never clipped. const int cond_l = PBL_IF_ROUND_ELSE(110, W / 2), cond_r = PBL_IF_ROUND_ELSE(230, W - R5_TODAY_X); GFont cond_font = (GFont)s_list->today_cond_font; // measured once on data change, not per frame - graphics_draw_text(ctx, cond, cond_font, - GRect(cond_l, R5_DAYDATE_Y - hs, cond_r - cond_l, 16), - GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); - graphics_context_set_text_color(ctx, GColorBlack); // black on the page + graphics_draw_text(ctx, cond, cond_font, GRect(cond_l, R5_DAYDATE_Y - hs, cond_r - cond_l, 16), + GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); + graphics_context_set_text_color(ctx, GColorBlack); // black on the page // Date: left box, left-aligned (the today icon above is centred over this string). - graphics_draw_text(ctx, daydate, day_font, // day_font IS GOTHIC_14_BOLD — no re-lookup - GRect(PBL_IF_ROUND_ELSE(30, R5_TODAY_X), R5_DAYDATE_Y - hs, - PBL_IF_ROUND_ELSE(95, W / 2 - R5_TODAY_X), 16), - GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, daydate, day_font, // day_font IS GOTHIC_14_BOLD — no re-lookup + GRect(PBL_IF_ROUND_ELSE(30, R5_TODAY_X), R5_DAYDATE_Y - hs, + PBL_IF_ROUND_ELSE(95, W / 2 - R5_TODAY_X), 16), + GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); // Hairline rule separating the today header from the 5-day fan (timeline-card idiom). graphics_context_set_stroke_color(ctx, GColorLightGray); graphics_context_set_stroke_width(ctx, 1); graphics_draw_line(ctx, GPoint(PBL_IF_ROUND_ELSE(40, 8), R5_HAIRLINE_Y - hs), - GPoint(W - PBL_IF_ROUND_ELSE(40, 8), R5_HAIRLINE_Y - hs)); + GPoint(W - PBL_IF_ROUND_ELSE(40, 8), R5_HAIRLINE_Y - hs)); // ---- Per-day fan column: weekday, disc + icon, precip % ---- for (int i = 0; i < n; i++) { const WeatherLocationForecast *f = &fan[i]; const int cx = col_icon[i]; - const char *weekday = s_list->weekday_cache[i]; // built in the date-cache block above + const char *weekday = s_list->weekday_cache[i]; // built in the date-cache block above graphics_context_set_text_color(ctx, GColorBlack); - const int bow = R5_BOW_DY(i, n, ss); // slight follow-the-glass curve (round only) + const int bow = R5_BOW_DY(i, n, ss); // slight follow-the-glass curve (round only) if (!R5_DAYNAME_SCROLL_HIDE || ss * 4 < R5_SECTION_TRAVEL) { graphics_draw_text(ctx, weekday, day_font, - GRect(cx - box_w / 2, R5_DAYNAME_Y - ss + bow, box_w, 22), - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + GRect(cx - box_w / 2, R5_DAYNAME_Y - ss + bow, box_w, 22), + GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } GColor bg = weather_type_disc_color(f->current_weather_type); @@ -2269,11 +2434,11 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { const int icon_day = i; if (s_list->pdc_icons[icon_day]) { GSize isz = gdraw_command_image_get_bounds_size(s_list->pdc_icons[icon_day]); - const GRect ibox = { GPoint(cx - isz.w / 2, R5_ICON_CY - ss + bow - dsc - isz.h / 2), isz }; + const GRect ibox = {GPoint(cx - isz.w / 2, R5_ICON_CY - ss + bow - dsc - isz.h / 2), isz}; #if !PBL_ROUND // The icon's END position: scrolled row on the DOWN press, header-shown row on the UP press. - const int iend_cy = (s_list->header_to == R5_HEADER_TRAVEL) ? (R5_ICON_CY - R5_SECTION_TRAVEL) - : R5_ICON_CY; + const int iend_cy = + (s_list->header_to == R5_HEADER_TRAVEL) ? (R5_ICON_CY - R5_SECTION_TRAVEL) : R5_ICON_CY; const GPoint iend = GPoint(cx - isz.w / 2, iend_cy - isz.h / 2); // Mid-transition: scale-segment the disc icon across its FULL travel (Timeline up/down move), // drawing at the END position — the scale-segment provides the travel + the stretch. At rest @@ -2291,7 +2456,8 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { } // ---- Two-line hi/lo dot graph ---- - if (n < 1) return; // no future days → just the today header + if (n < 1) + return; // no future days → just the today header #if !PBL_ROUND // Emery: ONE shared temperature scale so highs sit above lows with the true gap shown // (the white space between the lines IS the daily range). Highs are the HERO series — @@ -2318,26 +2484,28 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { } // No headroom padding: let the highs and lows fill the full plot height so the two // series sit further apart and have room to breathe. - int vr = vmax - vmin; if (vr < 4) vr = 4; // floor avoids over-scaling a flat week - const int ph = R5_GRAPH_BOT - R5_GRAPH_TOP; // plot travel + int vr = vmax - vmin; + if (vr < 4) + vr = 4; // floor avoids over-scaling a flat week + const int ph = R5_GRAPH_BOT - R5_GRAPH_TOP; // plot travel int yh[R5_MAX_COLS], yl[R5_MAX_COLS]; for (int i = 0; i < n; i++) { // The high (hero) series rides 3px above the shared scale for a little extra air // between the warm and cool lines; the lows stay anchored to the scale. Subtract the // section lift (ss) here so every downstream line/dot/label inherits the slide. yh[i] = okh[i] ? R5_GRAPH_BOT - (fan[i].today_high - vmin) * ph / vr - 3 - ss : 0; - yl[i] = okl[i] ? R5_GRAPH_BOT - (fan[i].today_low - vmin) * ph / vr - ss : 0; + yl[i] = okl[i] ? R5_GRAPH_BOT - (fan[i].today_low - vmin) * ph / vr - ss : 0; } // Centre the graph's visible span between the weather discs above and the PRECIPITATION banner // below, keyed off the ACTUAL peaks: yh_min = highest high dot, yl_max = lowest low dot; their - // midpoint is the graph centre. Worked in section coords (+ss) so gshift is a constant the whole - // fan still scrolls by. -1 corrects for the temp labels reaching ~2px further below the low dot - // than above the high dot. + // midpoint is the graph centre. Worked in section coords (+ss) so gshift is a constant the + // whole fan still scrolls by. -1 corrects for the temp labels reaching ~2px further below the + // low dot than above the high dot. int yh_min = 0, yl_max = 0; bool have_y = false; // fold only known dots (highs sit above lows, so this matches prv_fold_minmax(yh, okh, n, &have_y, &yh_min, &yl_max); prv_fold_minmax(yl, okl, n, &have_y, &yh_min, &yl_max); - const int dot_mid = (yh_min + yl_max) / 2 + ss; // peak midpoint (section) + const int dot_mid = (yh_min + yl_max) / 2 + ss; // peak midpoint (section) // Band bounds in SCREEN coords, morphing with the section slide: at REST the peaks // centre between the disc bottoms and the SCREEN BOTTOM (hand-tuned); fully scrolled // they centre between the lifted discs and the stats pill top (145, @@ -2348,7 +2516,10 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { const int band_bot_scr = H - (H - 145) * ss / R5_SECTION_TRAVEL; const int avail_mid = (band_top_scr + band_bot_scr) / 2 + ss; const int gshift = avail_mid - dot_mid - 1; - for (int i = 0; i < n; i++) { yh[i] += gshift; yl[i] += gshift; } + for (int i = 0; i < n; i++) { + yh[i] += gshift; + yl[i] += gshift; + } graphics_context_set_antialiased(ctx, true); // High (warm) and low (cold) links match in weight (2px) — the low one was previously a // thin recessive line that vanished on the real display. High link = muted Windsor Tan; @@ -2358,16 +2529,20 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { prv_draw_series_links(ctx, col_high, yh, okh, n, GColorWindsorTan); // Low dots match the high dots: hollow ring with a white centre — blue ring for the lows. for (int i = 0; i < n; i++) { - if (okl[i]) prv_draw_ring_dot(ctx, GPoint(col_low[i], yl[i]), GColorBlue); + if (okl[i]) + prv_draw_ring_dot(ctx, GPoint(col_low[i], yl[i]), GColorBlue); } for (int i = 0; i < n; i++) { - if (okh[i]) prv_draw_ring_dot(ctx, GPoint(col_high[i], yh[i]), GColorOrange); + if (okh[i]) + prv_draw_ring_dot(ctx, GPoint(col_high[i], yh[i]), GColorOrange); } // Numerals: both bold black — high ABOVE its dot, low BELOW its dot. graphics_context_set_text_color(ctx, GColorBlack); for (int i = 0; i < n; i++) { - if (okh[i]) prv_draw_temp_centered(ctx, th[i], day_font, col_high[i], yh[i] - 4 - 16); - if (okl[i]) prv_draw_temp_centered(ctx, tl[i], day_font, col_low[i], yl[i] + 4); + if (okh[i]) + prv_draw_temp_centered(ctx, th[i], day_font, col_high[i], yh[i] - 4 - 16); + if (okl[i]) + prv_draw_temp_centered(ctx, tl[i], day_font, col_low[i], yl[i] + 4); } } // Bottom-gap banner stats (the PRECIPITATION pill with per-day values), slid up @@ -2383,26 +2558,41 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { bool haveh = false, havel = false; for (int i = 0; i < n; i++) { okh[i] = fan[i].today_high != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; - okl[i] = fan[i].today_low != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; + okl[i] = fan[i].today_low != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; if (okh[i]) { - if (!haveh) { hmin = hmax = fan[i].today_high; haveh = true; } - if (fan[i].today_high > hmax) hmax = fan[i].today_high; - if (fan[i].today_high < hmin) hmin = fan[i].today_high; + if (!haveh) { + hmin = hmax = fan[i].today_high; + haveh = true; + } + if (fan[i].today_high > hmax) + hmax = fan[i].today_high; + if (fan[i].today_high < hmin) + hmin = fan[i].today_high; } if (okl[i]) { - if (!havel) { lmin = lmax = fan[i].today_low; havel = true; } - if (fan[i].today_low > lmax) lmax = fan[i].today_low; - if (fan[i].today_low < lmin) lmin = fan[i].today_low; + if (!havel) { + lmin = lmax = fan[i].today_low; + havel = true; + } + if (fan[i].today_low > lmax) + lmax = fan[i].today_low; + if (fan[i].today_low < lmin) + lmin = fan[i].today_low; } } - if (!haveh && !havel) return; // every hi/lo unknown: nothing to plot - int hrange = hmax - hmin; if (hrange < 2) hrange = 2; - int lrange = lmax - lmin; if (lrange < 2) lrange = 2; + if (!haveh && !havel) + return; // every hi/lo unknown: nothing to plot + int hrange = hmax - hmin; + if (hrange < 2) + hrange = 2; + int lrange = lmax - lmin; + if (lrange < 2) + lrange = 2; // Scrolled-only shift/squeeze (see R5_GRAPH_SCROLL_*_DY): 0 at rest, full when scrolled. const int gtop = R5_GRAPH_TOP + R5_GRAPH_SCROLL_TOP_DY * ss / R5_SECTION_TRAVEL; const int gbot = R5_GRAPH_BOT + R5_GRAPH_SCROLL_BOT_DY * ss / R5_SECTION_TRAVEL; - const int band = (gbot - gtop) / R5_GRAPH_BAND_DIV; // each line's vertical band - const int hi_bot = gtop + band; // high band = [TOP, hi_bot] + const int band = (gbot - gtop) / R5_GRAPH_BAND_DIV; // each line's vertical band + const int hi_bot = gtop + band; // high band = [TOP, hi_bot] int y_hi[R5_MAX_COLS], y_lo[R5_MAX_COLS]; for (int i = 0; i < n; i++) { @@ -2438,14 +2628,14 @@ static void prv_canvas_draw_round_5day(Layer *layer, GContext *ctx) { if (okh[i]) { snprintf(hs, sizeof(hs), "%d\xC2\xB0", fan[i].today_high); graphics_draw_text(ctx, hs, small_font, - GRect(col_high[i] - box_w / 2, y_hi[i] - R5_DOT_R - 17, box_w, 16), - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + GRect(col_high[i] - box_w / 2, y_hi[i] - R5_DOT_R - 17, box_w, 16), + GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } if (okl[i]) { snprintf(ls, sizeof(ls), "%d\xC2\xB0", fan[i].today_low); graphics_draw_text(ctx, ls, small_font, - GRect(col_low[i] - box_w / 2, y_lo[i] + R5_DOT_R + 1, box_w, 16), - GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + GRect(col_low[i] - box_w / 2, y_lo[i] + R5_DOT_R + 1, box_w, 16), + GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } } // Bottom-gap banner stats, slid up into the gap the lifting section opens. @@ -2463,7 +2653,8 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { return; } #else - if (!s_list) return; + if (!s_list) + return; #endif #ifdef CONFIG_TOUCH if (s_list->report_fx == 4) { @@ -2472,14 +2663,13 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { graphics_context_set_fill_color(ctx, GColorWhite); graphics_fill_rect(ctx, layer_get_bounds(layer), 0, GCornerNone); prv_draw_exiting_paper(ctx); - const int dx = (int)prv_moook_full(s_list->report_p, 0, - -layer_get_bounds(layer).size.w); + const int dx = (int)prv_moook_full(s_list->report_p, 0, -layer_get_bounds(layer).size.w); prv_draw_report_caption(ctx, dx, true); return; } - if (PBL_IF_ROUND_ELSE(s_list->squash_mode && s_list->squash_captured && - s_list->squash_scratch != NULL, - false)) { + if (PBL_IF_ROUND_ELSE( + s_list->squash_mode && s_list->squash_captured && s_list->squash_scratch != NULL, + false)) { // Capture-once (gabbro smoothness step 2): the squash snapshot is already filled, and // prv_render_squash_in below overwrites every pixel from it — re-rendering the scene // here would be pure per-frame waste. Skip it. @@ -2489,7 +2679,7 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { graphics_context_set_fill_color(ctx, GColorWhite); graphics_fill_rect(ctx, layer_get_bounds(layer), 0, GCornerNone); } else - prv_canvas_draw_round_5day(layer, ctx); + prv_canvas_draw_round_5day(layer, ctx); // Pebble-Health "select" marker: a half-circle nub on the centre-right edge identifying the // SELECT button. Same radius-13 oval as applib action_button_draw, but pushed further off-screen // so it only protrudes ~5px (origin.x = W - protrusion) — shallow enough to clear the right-hand @@ -2519,25 +2709,27 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { const GRect ab = layer_get_bounds(layer); const int arrow_band = 18; const GRect up_frame = GRect(0, 0, ab.size.w, arrow_band); - content_indicator_draw_arrow(ctx, &up_frame, ContentIndicatorDirectionUp, - GColorBlack, GColorWhite, GAlignCenter); + content_indicator_draw_arrow(ctx, &up_frame, ContentIndicatorDirectionUp, GColorBlack, + GColorWhite, GAlignCenter); if (s_list->header_shown) { const GRect down_frame = GRect(0, ab.size.h - arrow_band, ab.size.w, arrow_band); - content_indicator_draw_arrow(ctx, &down_frame, ContentIndicatorDirectionDown, - GColorBlack, GColorWhite, GAlignCenter); + content_indicator_draw_arrow(ctx, &down_frame, ContentIndicatorDirectionDown, GColorBlack, + GColorWhite, GAlignCenter); } } #endif - if (s_list->squash_mode) prv_render_squash_in(ctx); + if (s_list->squash_mode) + prv_render_squash_in(ctx); if (s_list->clock_fx) { // Burst dot: decoupled from the content — drawn AFTER the squash so it flies to centre // (stage 1) / orbital-shakes (stage 2) crisply while the frame jelly-stretches off the top. // Shared: it is the subject of the transition on both shapes. GRect mb = layer_get_bounds(layer); graphics_context_set_fill_color(ctx, GColorBlack); - graphics_fill_circle(ctx, GPoint(mb.size.w / 2 + s_list->fx_shake_dx, - s_list->fx_dot_y + s_list->fx_shake_dy), 6); + graphics_fill_circle( + ctx, GPoint(mb.size.w / 2 + s_list->fx_shake_dx, s_list->fx_dot_y + s_list->fx_shake_dy), + 6); } #if !PBL_ROUND // Report scene: the ball (parked on the nub's spot during stage 1, rolling in stage 2) @@ -2573,8 +2765,8 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { return; #endif GRect bounds = layer_get_bounds(layer); - int W = bounds.size.w; - int H = bounds.size.h; + int W = bounds.size.w; + int H = bounds.size.h; int off = s_list->scroll_offset_px; // Background @@ -2592,14 +2784,14 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { const int right_margin = CONDITION_RIGHT_MARGIN + side_inset; for (int i = 0; i < (int)s_list->num_days; i++) { int ry = LIST_TOP_Y + i * rh - off; - if (ry + rh <= LIST_TOP_Y || ry >= H) continue; + if (ry + rh <= LIST_TOP_Y || ry >= H) + continue; const WeatherLocationForecast *f = &s_list->days[i]; // Row separator (skip very first row) if (ry > LIST_TOP_Y) { - graphics_draw_line(ctx, GPoint(day_label_x, ry), - GPoint(W - right_margin, ry)); + graphics_draw_line(ctx, GPoint(day_label_x, ry), GPoint(W - right_margin, ry)); } // Coloured circle — use fill_circle (much faster than fill_radial for full circles) @@ -2614,9 +2806,8 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { if (s_list->icons[i]) { int iy = ry + (rh - ICON_SIZE) / 2; - weather_icon_draw(ctx, s_list->icons[i], - GRect(icon_x, iy, ICON_SIZE, ICON_SIZE), - false /* rows sit on the white field */); + weather_icon_draw(ctx, s_list->icons[i], GRect(icon_x, iy, ICON_SIZE, ICON_SIZE), + false /* rows sit on the white field */); } // Vertical text baseline — subtract 3px to correct for GOTHIC_18 internal top padding @@ -2628,8 +2819,8 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { prv_fill_weekday_label(i, f->label, weekday_label, sizeof(weekday_label)); graphics_context_set_text_color(ctx, GColorBlack); graphics_draw_text(ctx, weekday_label, s_list->day_font, - GRect(day_label_x, ty, DAY_LABEL_W, 20), - GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); + GRect(day_label_x, ty, DAY_LABEL_W, 20), GTextOverflowModeTrailingEllipsis, + GTextAlignmentLeft, NULL); // Hi over lo, right-aligned — the day's actual numbers, not a phrase that // truncates to nothing in this narrow column. Bold hi / regular lo carries @@ -2642,45 +2833,43 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { } else { snprintf(temp_str, sizeof(temp_str), "--"); } - graphics_draw_text(ctx, temp_str, s_list->day_font, - GRect(temp_x, ry + 1, temp_w, 20), - GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); + graphics_draw_text(ctx, temp_str, s_list->day_font, GRect(temp_x, ry + 1, temp_w, 20), + GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); if (f->today_low != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP) { snprintf(temp_str, sizeof(temp_str), "%d\xC2\xB0", f->today_low); } else { snprintf(temp_str, sizeof(temp_str), "--"); } graphics_draw_text(ctx, temp_str, s_list->condition_font, - GRect(temp_x, ry + rh / 2 - 2, temp_w, 20), - GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); + GRect(temp_x, ry + rh / 2 - 2, temp_w, 20), + GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); } // Scroll indicator int max_s = prv_max_scroll(); if (max_s > 0) { int scroll_h = H - LIST_TOP_Y; - int total_h = (int)s_list->num_days * rh; - int bar_h = scroll_h * scroll_h / total_h; - int bar_y = LIST_TOP_Y + off * scroll_h / total_h; + int total_h = (int)s_list->num_days * rh; + int bar_h = scroll_h * scroll_h / total_h; + int bar_y = LIST_TOP_Y + off * scroll_h / total_h; graphics_context_set_fill_color(ctx, GColorLightGray); - graphics_fill_rect(ctx, GRect(W - side_inset - 3, bar_y, 3, bar_h), - 0, GCornerNone); + graphics_fill_rect(ctx, GRect(W - side_inset - 3, bar_y, 3, bar_h), 0, GCornerNone); } // Location bar drawn last (covers any row that scrolled under it). Solid black // on the BW boards — the dithered blue rendered the white text unreadable. graphics_context_set_fill_color(ctx, PBL_IF_COLOR_ELSE(GColorVividCerulean, GColorBlack)); - graphics_fill_rect(ctx, GRect(0, LOCATION_BAR_Y, W, LOCATION_BAR_H), - 0, GCornerNone); + graphics_fill_rect(ctx, GRect(0, LOCATION_BAR_Y, W, LOCATION_BAR_H), 0, GCornerNone); graphics_context_set_text_color(ctx, GColorWhite); GFont bar_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); const int bar_inset = ROUND_BAR_INSET; // Location name: left-aligned const char *loc = (s_list->num_days > 0 && s_list->days[0].location_name[0]) - ? s_list->days[0].location_name : ""; - graphics_draw_text(ctx, loc, bar_font, - GRect(bar_inset + 4, LOCATION_BAR_Y + 1, - W - (bar_inset * 2) - 52, LOCATION_BAR_H), + ? s_list->days[0].location_name + : ""; + graphics_draw_text( + ctx, loc, bar_font, + GRect(bar_inset + 4, LOCATION_BAR_Y + 1, W - (bar_inset * 2) - 52, LOCATION_BAR_H), GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); // Digital time: right-aligned (matches main screen) char time_str[8]; @@ -2690,11 +2879,12 @@ static void prv_canvas_draw(Layer *layer, GContext *ctx) { strftime(time_str, sizeof(time_str), "%H:%M", lt); } else { strftime(time_str, sizeof(time_str), "%I:%M", lt); - if (time_str[0] == '0') memmove(time_str, time_str + 1, sizeof(time_str) - 1); + if (time_str[0] == '0') + memmove(time_str, time_str + 1, sizeof(time_str) - 1); } graphics_draw_text(ctx, time_str, bar_font, - GRect(W - bar_inset - 50, LOCATION_BAR_Y + 1, 48, LOCATION_BAR_H), - GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); + GRect(W - bar_inset - 50, LOCATION_BAR_Y + 1, 48, LOCATION_BAR_H), + GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); } // ---- Touch input (Emery only) ---- @@ -2711,20 +2901,28 @@ static void prv_icon_driver_start(void); // True if today's condition has an animated icon (so there is a fade/timer to wake). static bool prv_today_animated(void) { - if (!s_list || s_list->num_days == 0) return false; + if (!s_list || s_list->num_days == 0) + return false; switch (prv_header_type()) { - case WeatherType_Sun: case WeatherType_PartlyCloudy: case WeatherType_CloudyDay: - case WeatherType_LightRain: case WeatherType_HeavyRain: - case WeatherType_LightSnow: case WeatherType_HeavySnow: case WeatherType_RainAndSnow: + case WeatherType_Sun: + case WeatherType_PartlyCloudy: + case WeatherType_CloudyDay: + case WeatherType_LightRain: + case WeatherType_HeavyRain: + case WeatherType_LightSnow: + case WeatherType_HeavySnow: + case WeatherType_RainAndSnow: return true; - default: return false; + default: + return false; } } // Any interaction resets the 10s power-save countdown and, if the icon had already frozen // to its static state, wakes the colour animation back up. static void prv_note_icon_interaction(void) { - if (!prv_today_animated()) return; + if (!prv_today_animated()) + return; s_list->idle_ticks = 0; if (s_list->icon_fade < R5_FADE_MAX) { s_list->icon_fade = R5_FADE_MAX; @@ -2742,50 +2940,60 @@ static void prv_note_icon_interaction(void) { // City-only copy (split at the comma, like the round location bar). static void prv_clock_loc_city(char *dst, size_t dst_size, const char *src) { size_t i = 0; - for (; src && src[i] && src[i] != ',' && i < dst_size - 1; i++) dst[i] = src[i]; - while (i > 0 && dst[i - 1] == ' ') i--; + for (; src && src[i] && src[i] != ',' && i < dst_size - 1; i++) + dst[i] = src[i]; + while (i > 0 && dst[i - 1] == ' ') + i--; dst[i] = '\0'; } static void prv_clock_swap_update(Animation *anim, AnimationProgress progress) { (void)anim; - if (!s_list) return; + if (!s_list) + return; s_list->clock_swap_p = progress; - if (s_list->canvas) layer_mark_dirty(s_list->canvas); + if (s_list->canvas) + layer_mark_dirty(s_list->canvas); } static void prv_clock_swap_stopped(Animation *anim, bool finished, void *context) { - (void)finished; (void)context; + (void)finished; + (void)context; if (s_list) { - if (s_list->clock_swap_anim == anim) s_list->clock_swap_anim = NULL; + if (s_list->clock_swap_anim == anim) + s_list->clock_swap_anim = NULL; s_list->clock_swap_active = false; - s_list->clock_loc_show = false; // the slot now rests on the time - if (s_list->canvas) layer_mark_dirty(s_list->canvas); + s_list->clock_loc_show = false; // the slot now rests on the time + if (s_list->canvas) + layer_mark_dirty(s_list->canvas); } animation_destroy(anim); } -static const AnimationImplementation s_clock_swap_impl = { .update = prv_clock_swap_update }; +static const AnimationImplementation s_clock_swap_impl = {.update = prv_clock_swap_update}; static void prv_clock_loc_timer_cb(void *ctx) { (void)ctx; - if (!s_list) return; + if (!s_list) + return; s_list->clock_loc_timer = NULL; - if (!s_list->clock_loc_show || s_list->clock_swap_anim) return; + if (!s_list->clock_loc_show || s_list->clock_swap_anim) + return; s_list->clock_swap_active = true; s_list->clock_swap_p = 0; s_list->clock_swap_anim = animation_create(); - if (!s_list->clock_swap_anim) { // OOM: hard cut to the time + if (!s_list->clock_swap_anim) { // OOM: hard cut to the time s_list->clock_swap_active = false; s_list->clock_loc_show = false; - if (s_list->canvas) layer_mark_dirty(s_list->canvas); + if (s_list->canvas) + layer_mark_dirty(s_list->canvas); return; } animation_set_implementation(s_list->clock_swap_anim, &s_clock_swap_impl); animation_set_duration(s_list->clock_swap_anim, interpolate_moook_soft_duration(3)); animation_set_curve(s_list->clock_swap_anim, AnimationCurveLinear); // the moook shapes it animation_set_handlers(s_list->clock_swap_anim, - (AnimationHandlers){ .stopped = prv_clock_swap_stopped }, NULL); + (AnimationHandlers){.stopped = prv_clock_swap_stopped}, NULL); animation_schedule(s_list->clock_swap_anim); } @@ -2795,19 +3003,20 @@ static void prv_clock_loc_timer_cb(void *ctx) { void forecast_list_replay_location_intro(void) { #if defined(CONFIG_TOUCH) && !PBL_ROUND - if (!s_list) return; + if (!s_list) + return; if (s_list->clock_loc_timer) { app_timer_cancel(s_list->clock_loc_timer); s_list->clock_loc_timer = NULL; } - if (s_list->clock_swap_anim) { // null-first: .stopped only destroys + if (s_list->clock_swap_anim) { // null-first: .stopped only destroys Animation *a = s_list->clock_swap_anim; s_list->clock_swap_anim = NULL; animation_unschedule(a); } s_list->clock_swap_active = false; s_list->clock_loc_show = false; - s_list->clock_loc_done = false; // the appear-arming runs again + s_list->clock_loc_done = false; // the appear-arming runs again #else // No clock-slot intro on this mainscreen — the API stays for weather.c. #endif @@ -2816,8 +3025,7 @@ void forecast_list_replay_location_intro(void) { // Start the 2s hold — called when the screen first appears. #if defined(CONFIG_TOUCH) && !PBL_ROUND static void prv_clock_loc_hold(void) { - if (!s_list || !s_list->clock_loc_show || s_list->clock_loc_timer || - s_list->clock_swap_active) { + if (!s_list || !s_list->clock_loc_show || s_list->clock_loc_timer || s_list->clock_swap_active) { return; } s_list->clock_loc_timer = app_timer_register(2000, prv_clock_loc_timer_cb, NULL); @@ -2825,7 +3033,8 @@ static void prv_clock_loc_hold(void) { #endif static void prv_click_up_down(ClickRecognizerRef recognizer, void *context) { - if (!s_list) return; + if (!s_list) + return; bool down = click_recognizer_get_button_id(recognizer) == BUTTON_ID_DOWN; #ifdef CONFIG_TOUCH // Mirror prv_click_select: while an exclusive transition owns the screen (clock burst, @@ -2844,11 +3053,15 @@ static void prv_click_up_down(ClickRecognizerRef recognizer, void *context) { // 5-day view is a single screen). Vertical swipes (prv_touch_handler) drive these same // transitions. if (down) { - if (s_list->header_shown) prv_start_header_transition(true); - else prv_start_clock_stage1(); // DOWN again when scrolled -> clock burst + if (s_list->header_shown) + prv_start_header_transition(true); + else + prv_start_clock_stage1(); // DOWN again when scrolled -> clock burst } else { - if (!s_list->header_shown) prv_start_header_transition(false); - else prv_start_up_to_card(); // UP at top -> squash + hero icon-fly to the card + if (!s_list->header_shown) + prv_start_header_transition(false); + else + prv_start_up_to_card(); // UP at top -> squash + hero icon-fly to the card } prv_note_icon_interaction(); // wake a faded today icon so it animates during the move return; @@ -2881,7 +3094,8 @@ static void prv_click_back(ClickRecognizerRef recognizer, void *context) { static void prv_select_exit_update(Animation *anim, AnimationProgress progress) { (void)anim; - if (!s_list || !s_list->canvas) return; + if (!s_list || !s_list->canvas) + return; const int w = layer_get_bounds(s_list->canvas).size.w; GRect f = layer_get_frame_by_value(s_list->canvas); f.origin.x = (int)interpolate_moook(progress, 0, -w); @@ -2889,13 +3103,17 @@ static void prv_select_exit_update(Animation *anim, AnimationProgress progress) } static void prv_select_exit_stopped(Animation *anim, bool finished, void *context) { - (void)anim; (void)finished; (void)context; + (void)anim; + (void)finished; + (void)context; s_select_exit_anim = NULL; - if (!s_list) return; + if (!s_list) + return; #if PBL_ROUND // Fallback slide over — back to the transparent bg (step 3); the canvas frame is reset // to full coverage below, so the invariant holds again. - if (s_list->window) window_set_background_color(s_list->window, GColorClear); + if (s_list->window) + window_set_background_color(s_list->window, GColorClear); #endif // Reset the (base) main window to rest so a later BACK returns cleanly, then fire the hard cut. if (s_list->canvas) { @@ -2907,15 +3125,18 @@ static void prv_select_exit_stopped(Animation *anim, bool finished, void *contex void *ctx = s_select_exit_ctx; s_select_exit_done = NULL; s_select_exit_ctx = NULL; - if (done) done(ctx); + if (done) + done(ctx); } -static const AnimationImplementation s_select_exit_impl = { .update = prv_select_exit_update }; +static const AnimationImplementation s_select_exit_impl = {.update = prv_select_exit_update}; bool forecast_list_get_today_icon_rect(GRect *out) { - if (!s_list || !out) return false; + if (!s_list || !out) + return false; #if defined(CONFIG_TOUCH) && !PBL_ROUND - if (!s_list->header_shown) return false; + if (!s_list->header_shown) + return false; *out = GRect(s_list->today_icon_x, R5_TODAY_Y, R5_TODAY_ICON, R5_TODAY_ICON); return true; #else @@ -2924,21 +3145,28 @@ bool forecast_list_get_today_icon_rect(GRect *out) { } void forecast_list_start_select_exit(void (*done_cb)(void *ctx), void *ctx) { - if (!s_list || !s_list->canvas) { if (done_cb) done_cb(ctx); return; } - if (s_select_exit_anim) return; + if (!s_list || !s_list->canvas) { + if (done_cb) + done_cb(ctx); + return; + } + if (s_select_exit_anim) + return; #ifdef CONFIG_TOUCH - if (s_report_anim || s_list->report_fx) return; + if (s_report_anim || s_list->report_fx) + return; // Mid-transition: REFUSE (the press is ignored) rather than fall back to the legacy // slide — the fallback exists for genuine scratch-OOM at rest, not as a degraded scene // for badly-timed presses. Belt to prv_click_select's braces; both shapes. - if (s_list->squash_mode || s_list->clock_fx || s_list->flying_icon) return; + if (s_list->squash_mode || s_list->clock_fx || s_list->flying_icon) + return; #endif s_select_exit_done = done_cb; - s_select_exit_ctx = ctx; + s_select_exit_ctx = ctx; #ifdef CONFIG_TOUCH // The full scene: whole-frame squash-left (stage 1), ball roll-in (2), unfold (3). if (!s_list->squash_mode) { - if (s_list->anim) { // capture-first, same defensive kill as prv_start_clock_stage1 + if (s_list->anim) { // capture-first, same defensive kill as prv_start_clock_stage1 Animation *old = s_list->anim; s_list->anim = NULL; animation_unschedule(old); @@ -2949,19 +3177,20 @@ void forecast_list_start_select_exit(void (*done_cb)(void *ctx), void *ctx) { if (s_list->squash_scratch) { s_list->squash_mode = SQUASH_LEFT_EXIT; s_list->squash_in_p = 0; - s_list->squash_captured = false; // round capture-once - s_list->report_fx = 1; + s_list->squash_captured = false; // round capture-once + s_list->report_fx = 1; // The ball is born on the SELECT nub's own spot (decoupled from the squash, like // the burst dot) — the indicator visibly becomes the ball. - s_list->fx_ball_x = R5_REPORT_BALL_X0(b.size.w); + s_list->fx_ball_x = R5_REPORT_BALL_X0(b.size.w); s_select_exit_anim = prv_start_anim(interpolate_moook_soft_duration(3), // 330ms - AnimationCurveLinear, // jelly does the shaping + AnimationCurveLinear, // jelly does the shaping &s_report_stage1_impl, prv_report_stage1_stopped); return; } } #endif - // Fallback (scratch OOM on either shape): the legacy 115ms moook slide; done cb fires in its .stopped. + // Fallback (scratch OOM on either shape): the legacy 115ms moook slide; done cb fires in its + // .stopped. #if PBL_ROUND // The slide moves the CANVAS FRAME, exposing window pixels nobody paints now that the // window bg is transparent (step 3) — the vacated strip would smear stale frames. Restore @@ -2969,14 +3198,15 @@ void forecast_list_start_select_exit(void (*done_cb)(void *ctx), void *ctx) { window_set_background_color(s_list->window, GColorWhite); #endif s_select_exit_anim = prv_start_anim(interpolate_moook_duration() / 2, // 115ms (Timeline) - AnimationCurveLinear, // moook is the shaping + AnimationCurveLinear, // moook is the shaping &s_select_exit_impl, prv_select_exit_stopped); } static void prv_click_select(ClickRecognizerRef recognizer, void *context) { (void)recognizer; (void)context; - if (!s_list || !s_list->on_select_request_cb) return; + if (!s_list || !s_list->on_select_request_cb) + return; #ifdef CONFIG_TOUCH // Only from the resting main view (State A, no transition in flight) — same condition as the // "select" marker that advertises this button. BOTH shapes: the !PBL_ROUND on this gate @@ -2984,22 +3214,24 @@ static void prv_click_select(ClickRecognizerRef recognizer, void *context) { // DROP_IN/RISE_IN/DOWN_EXIT window skipped the whole newspaper scene via the legacy // fallback slide (and during the clock burst it raced the clock push). if (!s_list->header_shown || s_list->fx_active || s_list->clock_fx || s_list->squash_mode || - s_select_exit_anim || s_list->report_fx) return; + s_select_exit_anim || s_list->report_fx) + return; #endif s_list->on_select_request_cb(s_list->on_select_request_ctx); // -> weather.c pushes the report } // ---- Touch input (touch colour platforms) ---- #ifdef CONFIG_TOUCH -#define SWIPE_THRESHOLD 20 // px; same tap/swipe split as clock_face + the original app +#define SWIPE_THRESHOLD 20 // px; same tap/swipe split as clock_face + the original app static void prv_touch_handler(const TouchEvent *event, void *context) { (void)context; - if (!s_list) return; + if (!s_list) + return; if (event->type == TouchEvent_Touchdown) { s_list->touch_start_x = event->x; s_list->touch_start_y = event->y; - s_list->touch_active = true; + s_list->touch_active = true; } else if (event->type == TouchEvent_Liftoff && s_list->touch_active) { s_list->touch_active = false; // Same exclusive-transition guard as the buttons — see prv_click_up_down. @@ -3015,17 +3247,22 @@ static void prv_touch_handler(const TouchEvent *event, void *context) { int16_t dy = event->y - s_list->touch_start_y; int16_t adx = dx < 0 ? -dx : dx; int16_t ady = dy < 0 ? -dy : dy; - if (adx <= SWIPE_THRESHOLD && ady <= SWIPE_THRESHOLD) return; // tap — no action here + if (adx <= SWIPE_THRESHOLD && ady <= SWIPE_THRESHOLD) + return; // tap — no action here if (ady >= adx) { // Vertical swipe follows the finger: UP pulls the deeper screens up (scrolled stats, // then the clock burst — the DOWN button); DOWN backs out (rest, then the card — UP). if (dy < 0) { - if (s_list->header_shown) prv_start_header_transition(true); - else prv_start_clock_stage1(); + if (s_list->header_shown) + prv_start_header_transition(true); + else + prv_start_clock_stage1(); } else { - if (!s_list->header_shown) prv_start_header_transition(false); - else prv_start_up_to_card(); // BOTH shapes: the hero fly + - // card open work on round + if (!s_list->header_shown) + prv_start_header_transition(false); + else + prv_start_up_to_card(); // BOTH shapes: the hero fly + + // card open work on round } prv_note_icon_interaction(); } else if (dx < 0) { @@ -3043,22 +3280,24 @@ static void prv_touch_handler(const TouchEvent *event, void *context) { // Rectangular builds keep the previous physics-style continuous scrolling. // A 16ms ticker nudges scroll_offset_px by a velocity that ramps up each tick. // Velocity stored in 1/16 px units to allow smooth sub-pixel accumulation. -#define SCROLL_TICK_MS 16 // ~60fps -#define SCROLL_VEL_START 16 // initial: 1 px/frame (units = 1/16 px) -#define SCROLL_VEL_MAX 96 // maximum: 6 px/frame -#define SCROLL_VEL_ACCEL 2 // added to velocity each tick +#define SCROLL_TICK_MS 16 // ~60fps +#define SCROLL_VEL_START 16 // initial: 1 px/frame (units = 1/16 px) +#define SCROLL_VEL_MAX 96 // maximum: 6 px/frame +#define SCROLL_VEL_ACCEL 2 // added to velocity each tick static AppTimer *s_list_hold_timer = NULL; -static bool s_list_hold_down = false; -static int s_list_velocity = 0; -static int s_list_subpx = 0; +static bool s_list_hold_down = false; +static int s_list_velocity = 0; +static int s_list_subpx = 0; static void prv_list_tick_cb(void *ctx) { s_list_hold_timer = NULL; - if (!s_list) return; + if (!s_list) + return; s_list_velocity += SCROLL_VEL_ACCEL; - if (s_list_velocity > SCROLL_VEL_MAX) s_list_velocity = SCROLL_VEL_MAX; + if (s_list_velocity > SCROLL_VEL_MAX) + s_list_velocity = SCROLL_VEL_MAX; s_list_subpx += s_list_velocity; int delta = s_list_subpx / 16; @@ -3066,9 +3305,11 @@ static void prv_list_tick_cb(void *ctx) { if (delta > 0) { int next = s_list->scroll_offset_px + (s_list_hold_down ? delta : -delta); - int max = prv_max_scroll(); - if (next < 0) next = 0; - if (next > max) next = max; + int max = prv_max_scroll(); + if (next < 0) + next = 0; + if (next > max) + next = max; // Cancel any in-flight eased animation and take direct control if (s_list->anim) { @@ -3077,8 +3318,8 @@ static void prv_list_tick_cb(void *ctx) { s_list->anim = NULL; } s_list->scroll_offset_px = next; - s_list->scroll_to = next; - s_list->scroll_from = next; + s_list->scroll_to = next; + s_list->scroll_from = next; layer_mark_dirty(s_list->canvas); } @@ -3088,32 +3329,46 @@ static void prv_list_tick_cb(void *ctx) { static void prv_list_raw(ButtonId btn, bool pressed) { if (pressed) { s_list_hold_down = (btn == BUTTON_ID_DOWN); - s_list_velocity = SCROLL_VEL_START; - s_list_subpx = 0; - if (s_list_hold_timer) { app_timer_cancel(s_list_hold_timer); s_list_hold_timer = NULL; } + s_list_velocity = SCROLL_VEL_START; + s_list_subpx = 0; + if (s_list_hold_timer) { + app_timer_cancel(s_list_hold_timer); + s_list_hold_timer = NULL; + } // 300ms hold threshold before continuous scroll begins s_list_hold_timer = app_timer_register(300, prv_list_tick_cb, NULL); } else { - if (s_list_hold_timer) { app_timer_cancel(s_list_hold_timer); s_list_hold_timer = NULL; } + if (s_list_hold_timer) { + app_timer_cancel(s_list_hold_timer); + s_list_hold_timer = NULL; + } } } -static void prv_list_raw_up_press(ClickRecognizerRef r, void *ctx) { prv_list_raw(BUTTON_ID_UP, true); } -static void prv_list_raw_up_rel(ClickRecognizerRef r, void *ctx) { prv_list_raw(BUTTON_ID_UP, false); } -static void prv_list_raw_down_press(ClickRecognizerRef r, void *ctx) { prv_list_raw(BUTTON_ID_DOWN, true); } -static void prv_list_raw_down_rel(ClickRecognizerRef r, void *ctx) { prv_list_raw(BUTTON_ID_DOWN, false); } +static void prv_list_raw_up_press(ClickRecognizerRef r, void *ctx) { + prv_list_raw(BUTTON_ID_UP, true); +} +static void prv_list_raw_up_rel(ClickRecognizerRef r, void *ctx) { + prv_list_raw(BUTTON_ID_UP, false); +} +static void prv_list_raw_down_press(ClickRecognizerRef r, void *ctx) { + prv_list_raw(BUTTON_ID_DOWN, true); +} +static void prv_list_raw_down_rel(ClickRecognizerRef r, void *ctx) { + prv_list_raw(BUTTON_ID_DOWN, false); +} #endif static void prv_click_provider(void *context) { - window_single_click_subscribe(BUTTON_ID_UP, prv_click_up_down); - window_single_click_subscribe(BUTTON_ID_DOWN, prv_click_up_down); - window_single_click_subscribe(BUTTON_ID_BACK, prv_click_back); + window_single_click_subscribe(BUTTON_ID_UP, prv_click_up_down); + window_single_click_subscribe(BUTTON_ID_DOWN, prv_click_up_down); + window_single_click_subscribe(BUTTON_ID_BACK, prv_click_back); window_single_click_subscribe(BUTTON_ID_SELECT, prv_click_select); #ifndef CONFIG_TOUCH // The legacy continuous hold-to-scroll spins prv_list_tick_cb against scroll_offset_px, // which is meaningless for the single-screen 5-day view (max scroll 0) and would consume // a held DOWN press alongside the header transition. Disabled for CONFIG_TOUCH. - window_raw_click_subscribe(BUTTON_ID_UP, prv_list_raw_up_press, prv_list_raw_up_rel, NULL); + window_raw_click_subscribe(BUTTON_ID_UP, prv_list_raw_up_press, prv_list_raw_up_rel, NULL); window_raw_click_subscribe(BUTTON_ID_DOWN, prv_list_raw_down_press, prv_list_raw_down_rel, NULL); #endif } @@ -3124,15 +3379,17 @@ static void prv_click_provider(void *context) { // One 80ms quantum of icon animation. Returns false when the driver should stop entirely // (covered by another window, or faded fully static); prv_window_appear rearms on return. static bool prv_sun_step(void) { - if (!s_list) return false; - if (!s_list->window || window_stack_get_top_window() != s_list->window) return false; + if (!s_list) + return false; + if (!s_list->window || window_stack_get_top_window() != s_list->window) + return false; s_list->idle_ticks++; // Power saving: once idle for 10s, ramp icon_fade down to 0 (fading the colour overlay // into the static icon). Only advance the animation phase while there is still motion. if (s_list->icon_fade == R5_FADE_MAX && s_list->idle_ticks >= R5_IDLE_TICKS) { - s_list->icon_fade = R5_FADE_MAX - 1; // begin the fade-to-static + s_list->icon_fade = R5_FADE_MAX - 1; // begin the fade-to-static } else if (s_list->icon_fade > 0 && s_list->icon_fade < R5_FADE_MAX) { - s_list->icon_fade--; // continue fading + s_list->icon_fade--; // continue fading } if (s_list->icon_fade > 0) { // Rect: 2 phase steps per 80ms tick preserves the visual speed of the old 40ms cadence @@ -3140,8 +3397,7 @@ static bool prv_sun_step(void) { // real hardware, backing up the task that services touch). // Round: the 66ms clean-rate tick (step 4) carries 66/80 of that advance — 33*STEP/20 — // so degrees-per-ms is unchanged (0.1% under, invisible on a cyclic rotation). - s_list->sun_phase += PBL_IF_ROUND_ELSE((33 * R5_SUN_ANGLE_STEP) / 20, - 2 * R5_SUN_ANGLE_STEP); + s_list->sun_phase += PBL_IF_ROUND_ELSE((33 * R5_SUN_ANGLE_STEP) / 20, 2 * R5_SUN_ANGLE_STEP); } if (s_list->canvas) { layer_mark_dirty(s_list->canvas); @@ -3153,7 +3409,8 @@ static bool prv_sun_step(void) { #if !PBL_ROUND static void prv_sun_tick(void *ctx) { (void)ctx; - if (!s_list) return; + if (!s_list) + return; s_list->sun_timer = NULL; if (prv_sun_step()) { s_list->sun_timer = app_timer_register(R5_SUN_PERIOD_MS, prv_sun_tick, NULL); @@ -3161,12 +3418,13 @@ static void prv_sun_tick(void *ctx) { } #else static uint32_t prv_now_ms32(void) { - time_t s = 0; uint16_t ms = 0; + time_t s = 0; + uint16_t ms = 0; time_ms(&s, &ms); return (uint32_t)s * 1000u + ms; } -static void prv_icon_drv_stop_cb(void *ctx) { // 0ms hop: never unschedule from inside .update +static void prv_icon_drv_stop_cb(void *ctx) { // 0ms hop: never unschedule from inside .update (void)ctx; if (s_list && s_list->icon_drv) { Animation *a = s_list->icon_drv; @@ -3177,18 +3435,22 @@ static void prv_icon_drv_stop_cb(void *ctx) { // 0ms hop: never unschedule fro } static void prv_icon_drv_update(Animation *anim, AnimationProgress p) { - (void)anim; (void)p; // INFINITE animations tick with progress 0 — time is tracked here - if (!s_list) return; + (void)anim; + (void)p; // INFINITE animations tick with progress 0 — time is tracked here + if (!s_list) + return; const uint32_t now = prv_now_ms32(); uint32_t dt = now - s_list->icon_drv_last_ms; s_list->icon_drv_last_ms = now; - if (dt > 500) dt = 500; // clock hiccup / long-suspend guard + if (dt > 500) + dt = 500; // clock hiccup / long-suspend guard #ifdef CONFIG_TOUCH // Capture-once companion: while a squash freezes the scene at its snapshot, PAUSE the // icon's clock instead of letting the phase advance invisibly — otherwise the rays/drops // jump ~4 ticks the instant the live scene resumes. Swallowing dt here means the icon // resumes exactly at the pose the snapshot froze it in. - if (s_list->squash_mode) return; + if (s_list->squash_mode) + return; #endif s_list->icon_drv_acc_ms += dt; bool alive = true; @@ -3196,22 +3458,26 @@ static void prv_icon_drv_update(Animation *anim, AnimationProgress p) { s_list->icon_drv_acc_ms -= R5_SUN_PERIOD_MS; alive = prv_sun_step(); } - if (!alive) app_timer_register(0, prv_icon_drv_stop_cb, NULL); + if (!alive) + app_timer_register(0, prv_icon_drv_stop_cb, NULL); } -static const AnimationImplementation s_icon_drv_impl = { .update = prv_icon_drv_update }; +static const AnimationImplementation s_icon_drv_impl = {.update = prv_icon_drv_update}; #endif // Start the icon animation driver, whichever kind this shape uses. Self-guarding. static void prv_icon_driver_start(void) { - if (!s_list) return; + if (!s_list) + return; #if PBL_ROUND - if (s_list->icon_drv) return; + if (s_list->icon_drv) + return; Animation *a = animation_create(); - if (!a) return; + if (!a) + return; animation_set_duration(a, ANIMATION_DURATION_INFINITE); animation_set_implementation(a, &s_icon_drv_impl); s_list->icon_drv_last_ms = prv_now_ms32(); - s_list->icon_drv_acc_ms = 0; + s_list->icon_drv_acc_ms = 0; s_list->icon_drv = a; animation_schedule(a); #else @@ -3229,39 +3495,38 @@ static void prv_window_load(Window *window) { // Apply initial scroll so the focused day is at the top. { int initial = s_list->start_day_index * s_list->row_height; - int max_s = prv_max_scroll(); - if (initial > max_s) initial = max_s; - if (initial < 0) initial = 0; // 0 rows: max_s goes negative — never rest above the top + int max_s = prv_max_scroll(); + if (initial > max_s) + initial = max_s; + if (initial < 0) + initial = 0; // 0 rows: max_s goes negative — never rest above the top s_list->scroll_offset_px = initial; - s_list->scroll_to = initial; - s_list->scroll_from = initial; + s_list->scroll_to = initial; + s_list->scroll_from = initial; } s_list->canvas = layer_create(bounds); layer_set_update_proc(s_list->canvas, prv_canvas_draw); layer_add_child(window_get_root_layer(window), s_list->canvas); - s_list->day_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); + s_list->day_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); s_list->condition_font = fonts_get_system_font(FONT_KEY_GOTHIC_18); - s_list->loc_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); + s_list->loc_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); prv_load_icons(); prv_format_conditions(); #ifdef CONFIG_TOUCH - s_list->header_shown = true; // State A: today header visible (calloc zeroed header_scroll) + s_list->header_shown = true; // State A: today header visible (calloc zeroed header_scroll) s_list->header_scroll = 0; if (s_list->num_days > 0 && - (prv_header_type() == WeatherType_Sun || - prv_header_type() == WeatherType_PartlyCloudy || - prv_header_type() == WeatherType_CloudyDay || - prv_header_type() == WeatherType_LightRain || - prv_header_type() == WeatherType_HeavyRain || - prv_header_type() == WeatherType_LightSnow || + (prv_header_type() == WeatherType_Sun || prv_header_type() == WeatherType_PartlyCloudy || + prv_header_type() == WeatherType_CloudyDay || prv_header_type() == WeatherType_LightRain || + prv_header_type() == WeatherType_HeavyRain || prv_header_type() == WeatherType_LightSnow || prv_header_type() == WeatherType_HeavySnow || prv_header_type() == WeatherType_RainAndSnow)) { s_list->sun_phase = 0; s_list->idle_ticks = 0; - s_list->icon_fade = R5_FADE_MAX; // start animating; fades to static after 10s idle + s_list->icon_fade = R5_FADE_MAX; // start animating; fades to static after 10s idle prv_icon_driver_start(); } #endif @@ -3269,8 +3534,10 @@ static void prv_window_load(Window *window) { #ifdef CONFIG_TOUCH static void prv_hslide_in_stopped(Animation *anim, bool finished, void *context) { - (void)anim; (void)finished; (void)context; - s_hslide_anim = NULL; // property animation auto-destroys after a normal stop + (void)anim; + (void)finished; + (void)context; + s_hslide_anim = NULL; // property animation auto-destroys after a normal stop if (s_list && s_list->canvas) { GRect home = layer_get_frame(s_list->canvas); home.origin.x = 0; @@ -3290,8 +3557,8 @@ static void prv_window_appear(Window *window) { // First-entry clock-slot intro: show the active location for 2s, then swap to the // time (sunset-card swap). Latched once per app run. #if defined(CONFIG_TOUCH) && !PBL_ROUND - if (s_list && !s_list->clock_loc_done && s_list->num_days > 0 && - s_list->days[0].location_name && s_list->days[0].location_name[0]) { + if (s_list && !s_list->clock_loc_done && s_list->num_days > 0 && s_list->days[0].location_name && + s_list->days[0].location_name[0]) { s_list->clock_loc_done = true; s_list->clock_loc_show = true; prv_clock_loc_hold(); @@ -3300,7 +3567,8 @@ static void prv_window_appear(Window *window) { #ifdef CONFIG_TOUCH // (Re)claim the touch slot — a popping child (condensed/card/clock) unsubscribed in its // unload, which runs BEFORE this appear (window_transition_context_appearance_call_all). - if (s_list) touch_service_subscribe(prv_touch_handler, s_list); + if (s_list) + touch_service_subscribe(prv_touch_handler, s_list); #endif #ifdef CONFIG_TOUCH // Rearm the icon driver if it parked itself while this window was covered. @@ -3315,19 +3583,18 @@ static void prv_window_appear(Window *window) { s_pending_hslide_in = false; GRect to = layer_get_frame(s_list->canvas); GRect from = to; - from.origin.x -= to.size.w; // start one screen-width off-left + from.origin.x -= to.size.w; // start one screen-width off-left layer_set_frame(s_list->canvas, from); PropertyAnimation *pa = property_animation_create_layer_frame(s_list->canvas, &from, &to); if (pa) { Animation *anim = (Animation *)pa; animation_set_duration(anim, WEATHER_HSLIDE_MS); animation_set_custom_interpolation(anim, weather_interpolate_moook_soft1); - animation_set_handlers(anim, - (AnimationHandlers){ .stopped = prv_hslide_in_stopped }, NULL); + animation_set_handlers(anim, (AnimationHandlers){.stopped = prv_hslide_in_stopped}, NULL); s_hslide_anim = anim; animation_schedule(anim); } else { - layer_set_frame(s_list->canvas, to); // OOM: appear in place + layer_set_frame(s_list->canvas, to); // OOM: appear in place } } if (s_list && s_pending_squash_mode) { @@ -3344,20 +3611,20 @@ static void prv_window_appear(Window *window) { GDrawCommandImage *raw = gdraw_command_image_create_with_resource( weather_type_icon_large_resource(prv_header_type())); GDrawCommandImage *pdc = raw ? gdraw_command_image_clone(raw) : NULL; - if (raw) gdraw_command_image_destroy(raw); + if (raw) + gdraw_command_image_destroy(raw); if (pdc) { const int W = layer_get_bounds(s_list->canvas).size.w; - s_list->fly_pdc = pdc; - s_list->fly_src = GRect((W - EV_ICON_SIZE) / 2, EV_ICON_Y, - EV_ICON_SIZE, EV_ICON_SIZE); - s_list->fly_dest = GRect(s_list->today_icon_x, R5_TODAY_Y, - R5_TODAY_ICON, R5_TODAY_ICON); + s_list->fly_pdc = pdc; + s_list->fly_src = GRect((W - EV_ICON_SIZE) / 2, EV_ICON_Y, EV_ICON_SIZE, EV_ICON_SIZE); + s_list->fly_dest = GRect(s_list->today_icon_x, R5_TODAY_Y, R5_TODAY_ICON, R5_TODAY_ICON); s_list->flying_icon = true; } } s_pending_return_fly = false; - prv_start_squash(m); // DROP_IN (from clock) or RISE_IN (from globe/card) - if (!s_list->squash_mode) prv_clear_fly(); // squash couldn't start (OOM) + prv_start_squash(m); // DROP_IN (from clock) or RISE_IN (from globe/card) + if (!s_list->squash_mode) + prv_clear_fly(); // squash couldn't start (OOM) } #endif } @@ -3370,7 +3637,7 @@ static void prv_window_unload(Window *window) { app_timer_cancel(s_list->clock_loc_timer); s_list->clock_loc_timer = NULL; } - if (s_list && s_list->clock_swap_anim) { // null-first: .stopped only destroys + if (s_list && s_list->clock_swap_anim) { // null-first: .stopped only destroys Animation *a = s_list->clock_swap_anim; s_list->clock_swap_anim = NULL; animation_unschedule(a); @@ -3380,12 +3647,12 @@ static void prv_window_unload(Window *window) { if (s_list && s_list->on_pop_cb) { void (*cb)(void *) = s_list->on_pop_cb; void *ctx = s_list->on_pop_ctx; - s_list->on_pop_cb = NULL; + s_list->on_pop_cb = NULL; s_list->on_pop_ctx = NULL; cb(ctx); } - if (s_list->anim) { // capture-first: .stopped NULLs the field during unschedule + if (s_list->anim) { // capture-first: .stopped NULLs the field during unschedule Animation *old = s_list->anim; s_list->anim = NULL; animation_unschedule(old); @@ -3410,7 +3677,7 @@ static void prv_window_unload(Window *window) { // The select-exit slide is module-level, not per-instance: clear the done callback FIRST // (unschedule fires .stopped, which would otherwise invoke it mid-teardown), then cancel. s_select_exit_done = NULL; - s_select_exit_ctx = NULL; + s_select_exit_ctx = NULL; if (s_select_exit_anim) { Animation *a = s_select_exit_anim; s_select_exit_anim = NULL; @@ -3421,7 +3688,7 @@ static void prv_window_unload(Window *window) { // BOTH shapes (the !PBL_ROUND exclusions dated from before round drove the report scene // and the squashes): cancel the scene animation and free the squash machinery at unload, // or the scratch (67.6KB on round) leaks and a scheduled animation outlives its window. - if (s_report_anim) { // capture-first: the synchronous .stopped sees the NULLed handle + if (s_report_anim) { // capture-first: the synchronous .stopped sees the NULLed handle Animation *a = s_report_anim; s_report_anim = NULL; animation_unschedule(a); @@ -3491,23 +3758,24 @@ static void prv_window_unload(Window *window) { // ---- Public API ---- static void prv_forecast_list_push(const WeatherLocationForecast *days, size_t num_days, - int start_day_index, bool animated, - void (*on_pop)(void *ctx), void *on_pop_ctx, - void (*on_city_select)(void *ctx), + int start_day_index, bool animated, void (*on_pop)(void *ctx), + void *on_pop_ctx, void (*on_city_select)(void *ctx), void *on_city_select_ctx) { - if (s_list) return; // already showing + if (s_list) + return; // already showing s_list = calloc(1, sizeof(ForecastListData)); - if (!s_list) return; + if (!s_list) + return; size_t n = num_days < MAX_ROWS ? num_days : MAX_ROWS; s_list->num_days = n; for (size_t i = 0; i < n; i++) { s_list->days[i] = days[i]; } - s_list->on_pop_cb = on_pop; - s_list->on_pop_ctx = on_pop_ctx; - s_list->on_city_select_cb = on_city_select; + s_list->on_pop_cb = on_pop; + s_list->on_pop_ctx = on_pop_ctx; + s_list->on_city_select_cb = on_city_select; s_list->on_city_select_ctx = on_city_select_ctx; { int sdi = start_day_index < (int)n ? start_day_index : (int)n - 1; @@ -3522,39 +3790,41 @@ static void prv_forecast_list_push(const WeatherLocationForecast *days, size_t n // window fill was pure duplicate work. The !s_list early-return keeps a white guard. window_set_background_color(s_list->window, PBL_IF_ROUND_ELSE(GColorClear, GColorWhite)); window_set_window_handlers(s_list->window, (WindowHandlers){ - .load = prv_window_load, - .appear = prv_window_appear, - .unload = prv_window_unload, - }); + .load = prv_window_load, + .appear = prv_window_appear, + .unload = prv_window_unload, + }); window_set_click_config_provider(s_list->window, prv_click_provider); window_stack_push(s_list->window, animated); } -void forecast_list_push(const WeatherLocationForecast *days, size_t num_days, - int start_day_index, bool animated, - void (*on_pop)(void *ctx), void *on_pop_ctx, +void forecast_list_push(const WeatherLocationForecast *days, size_t num_days, int start_day_index, + bool animated, void (*on_pop)(void *ctx), void *on_pop_ctx, void (*on_city_select)(void *ctx), void *on_city_select_ctx) { - prv_forecast_list_push(days, num_days, start_day_index, animated, - on_pop, on_pop_ctx, on_city_select, on_city_select_ctx); + prv_forecast_list_push(days, num_days, start_day_index, animated, on_pop, on_pop_ctx, + on_city_select, on_city_select_ctx); } // The DOWN-again clock burst calls this on completion to push the clock face. Set by the host so // the list (which has no hourly data) can delegate the actual clock push back to weather.c. void forecast_list_set_on_clock_request(void (*cb)(void *ctx), void *ctx) { - if (!s_list) return; - s_list->on_clock_request_cb = cb; + if (!s_list) + return; + s_list->on_clock_request_cb = cb; s_list->on_clock_request_ctx = ctx; } void forecast_list_set_on_up_request(void (*cb)(void *ctx), void *ctx) { - if (!s_list) return; - s_list->on_up_request_cb = cb; + if (!s_list) + return; + s_list->on_up_request_cb = cb; s_list->on_up_request_ctx = ctx; } void forecast_list_set_on_select_request(void (*cb)(void *ctx), void *ctx) { - if (!s_list) return; - s_list->on_select_request_cb = cb; + if (!s_list) + return; + s_list->on_select_request_cb = cb; s_list->on_select_request_ctx = ctx; } @@ -3575,7 +3845,8 @@ void forecast_list_arm_return_fly(void) { } void forecast_list_update_data(const WeatherLocationForecast *days, size_t num_days) { - if (!s_list) return; + if (!s_list) + return; size_t n = num_days < MAX_ROWS ? num_days : MAX_ROWS; s_list->num_days = n; @@ -3609,16 +3880,20 @@ void forecast_list_update_data(const WeatherLocationForecast *days, size_t num_d } } -void forecast_list_set_glance(const char *sunset, const char *temp, int uv, int precip, - int wind) { +void forecast_list_set_glance(const char *sunset, const char *temp, int uv, int precip, int wind) { #ifdef CONFIG_TOUCH - if (!s_list) return; + if (!s_list) + return; snprintf(s_list->fly_sunset, sizeof(s_list->fly_sunset), "%s", sunset ? sunset : ""); - snprintf(s_list->fly_temp, sizeof(s_list->fly_temp), "%s", temp ? temp : ""); - s_list->fly_uv = uv; + snprintf(s_list->fly_temp, sizeof(s_list->fly_temp), "%s", temp ? temp : ""); + s_list->fly_uv = uv; s_list->fly_precip = precip; - s_list->fly_wind = wind; + s_list->fly_wind = wind; #else - (void)sunset; (void)temp; (void)uv; (void)precip; (void)wind; + (void)sunset; + (void)temp; + (void)uv; + (void)precip; + (void)wind; #endif } diff --git a/src/fw/apps/system/weather/forecast_list.h b/src/fw/apps/system/weather/forecast_list.h index ac2386534e..1e6aca5f29 100644 --- a/src/fw/apps/system/weather/forecast_list.h +++ b/src/fw/apps/system/weather/forecast_list.h @@ -17,9 +17,8 @@ // the next appear replays it — call on a globe city commit before the reveal. void forecast_list_replay_location_intro(void); -void forecast_list_push(const WeatherLocationForecast *days, size_t num_days, - int start_day_index, bool animated, - void (*on_pop)(void *ctx), void *on_pop_ctx, +void forecast_list_push(const WeatherLocationForecast *days, size_t num_days, int start_day_index, + bool animated, void (*on_pop)(void *ctx), void *on_pop_ctx, void (*on_city_select)(void *ctx), void *on_city_select_ctx); // Register the callback the DOWN-again clock-burst fires on completion (to push the clock face). @@ -55,5 +54,4 @@ void forecast_list_update_data(const WeatherLocationForecast *days, size_t num_d // The expanded card's glance data (sunset title + high/low° strings, UV + rain %). The UP-to-card // hero transition animates this identical content (time, text, meters) in from the left, synced to // the icon-fly landing. -void forecast_list_set_glance(const char *sunset, const char *temp, int uv, int precip, - int wind); +void forecast_list_set_glance(const char *sunset, const char *temp, int uv, int precip, int wind); diff --git a/src/fw/apps/system/weather/globe_view.c b/src/fw/apps/system/weather/globe_view.c index 8806de7071..90e0e02c7e 100644 --- a/src/fw/apps/system/weather/globe_view.c +++ b/src/fw/apps/system/weather/globe_view.c @@ -11,7 +11,7 @@ // GLOBE_* resource ids come from the real resource_ids.auto.h (via // pebble_compat.h); the stored-app pinned header is not used in the system app. -#include "weather_data_source.h" // WX_DS_UNKNOWN_TEMP +#include "weather_data_source.h" // WX_DS_UNKNOWN_TEMP #include "weather_math.h" #include "applib/graphics/gdraw_command_transforms.h" #include "weather.h" @@ -31,7 +31,7 @@ #define GLOBE_CUBEMAP_FACE_COUNT 6 #define GLOBE_CUBEMAP_FACE_SIZE 64 #define GLOBE_CUBEMAP_DATA_SIZE \ - ((GLOBE_CUBEMAP_FACE_COUNT * GLOBE_CUBEMAP_FACE_SIZE * GLOBE_CUBEMAP_FACE_SIZE) / 2) + ((GLOBE_CUBEMAP_FACE_COUNT * GLOBE_CUBEMAP_FACE_SIZE * GLOBE_CUBEMAP_FACE_SIZE) / 2) #define GLOBE_CUBEMAP_PALETTE_SIZE 12 #define GLOBE_ROT_SHIFT 10 #define GLOBE_ROT_SCALE (1 << GLOBE_ROT_SHIFT) @@ -52,9 +52,9 @@ #define GLOBE_INTRO_SELECTION_OFFSET_PX 5 #define GLOBE_PLANET_CENTER_Y_OFFSET -11 #define GLOBE_COLOR_PLANET_CENTER_Y_OFFSET \ - PBL_IF_ROUND_ELSE(-GLOBE_CRADLE_CENTER_Y_OFFSET, GLOBE_PLANET_CENTER_Y_OFFSET) + PBL_IF_ROUND_ELSE(-GLOBE_CRADLE_CENTER_Y_OFFSET, GLOBE_PLANET_CENTER_Y_OFFSET) #define GLOBE_REVEALED_CENTER_Y_OFFSET \ - PBL_IF_ROUND_ELSE(0, GLOBE_CRADLE_CENTER_Y_OFFSET + GLOBE_PLANET_CENTER_Y_OFFSET) + PBL_IF_ROUND_ELSE(0, GLOBE_CRADLE_CENTER_Y_OFFSET + GLOBE_PLANET_CENTER_Y_OFFSET) #define GLOBE_CURRENT_LOCATION_INDEX 0 #define GLOBE_FIRST_PRESET_INDEX 1 #define GLOBE_CUSTOM_LOCATION_INDEX (CITY_PRESET_COUNT + GLOBE_FIRST_PRESET_INDEX) @@ -160,15 +160,15 @@ // Pin depth classes (post-cull depth_q8 range is 51..255): pins shrink toward // the limb so cities read as sitting ON a sphere. Class 2 (front) is // bit-identical to the original single-size pin. -#define GLOBE_PIN_DEPTH_MID_Q8 112 +#define GLOBE_PIN_DEPTH_MID_Q8 112 #define GLOBE_PIN_DEPTH_FRONT_Q8 192 static const uint8_t GLOBE_SPACE_FADE_DITHER[GLOBE_SPACE_FADE_DITHER_SIZE] - [GLOBE_SPACE_FADE_DITHER_SIZE] = { - { 0, 8, 2, 10 }, - { 12, 4, 14, 6 }, - { 3, 11, 1, 9 }, - { 15, 7, 13, 5 }, + [GLOBE_SPACE_FADE_DITHER_SIZE] = { + {0, 8, 2, 10}, + {12, 4, 14, 6}, + {3, 11, 1, 9}, + {15, 7, 13, 5}, }; // Cubemap palette by lighting band: [0] daylight (the original colors), @@ -176,30 +176,32 @@ static const uint8_t GLOBE_SPACE_FADE_DITHER[GLOBE_SPACE_FADE_DITHER_SIZE] // palette indices: DukeBlue, BlueMoon, VividCerulean, PictonBlue, Celeste, // White, MayGreen, DarkGreen, JaegerGreen, SpringBud, ScreaminGreen, Mint. static const uint8_t GLOBE_SHADE_PALETTE[4][GLOBE_CUBEMAP_PALETTE_SIZE] = { - { 0xC2, 0xC7, 0xCB, 0xDB, 0xEF, 0xFF, 0xD9, 0xC4, 0xC9, 0xEC, 0xDD, 0xEE }, - { 0xC2, 0xC2, 0xC7, 0xCB, 0xDB, 0xEF, 0xC8, 0xC4, 0xC8, 0xD8, 0xC9, 0xD9 }, + {0xC2, 0xC7, 0xCB, 0xDB, 0xEF, 0xFF, 0xD9, 0xC4, 0xC9, 0xEC, 0xDD, 0xEE}, + {0xC2, 0xC2, 0xC7, 0xCB, 0xDB, 0xEF, 0xC8, 0xC4, 0xC8, 0xD8, 0xC9, 0xD9}, // Shadow ocean floors at DukeBlue so the dark limb stays visibly blue // against space; OxfordBlue appears only for the rare deep-trench texels. - { 0xC1, 0xC2, 0xC6, 0xC7, 0xCB, 0xDB, 0xC4, 0xC4, 0xC4, 0xC8, 0xC8, 0xC8 }, + {0xC1, 0xC2, 0xC6, 0xC7, 0xCB, 0xDB, 0xC4, 0xC4, 0xC4, 0xC8, 0xC8, 0xC8}, // [3] specular sun-glint: every OCEAN column promoted one step up the blue // ramp (sun-on-water sheen); LAND columns identical to daylight so the // glint self-limits to water. Selected only for band-0 pixels inside the // GLOBE_GLINT_MIN_Q10 cap. - { 0xC7, 0xCB, 0xDB, 0xEF, 0xFF, 0xFF, 0xD9, 0xC4, 0xC9, 0xEC, 0xDD, 0xEE }, + {0xC7, 0xCB, 0xDB, 0xEF, 0xFF, 0xFF, 0xD9, 0xC4, 0xC9, 0xEC, 0xDD, 0xEE}, }; // Haze wash keyed by lighting band: the sunlit limb atmosphere catches the sun // (Celeste bloom decaying inward — the Wii limb); terminator/night keep the // original PictonBlue wash. static const uint8_t GLOBE_HAZE_WASH_BY_BAND[3] = { - GColorCelesteARGB8, GColorPictonBlueARGB8, GColorPictonBlueARGB8, + GColorCelesteARGB8, + GColorPictonBlueARGB8, + GColorPictonBlueARGB8, }; // Haze reach keyed by band: the brightening wash is withheld sooner on the // night side, so the atmosphere reads thick on the sun side and thin in // shadow — a pure differential-BRIGHTENING depth cue (nothing drops below its // base palette value). 220 == the full BLEND-RIM span; set [2] back to 220 to // restore a symmetric night limb with one byte. -static const uint8_t GLOBE_HAZE_SPAN_BY_BAND[3] = { 220, 220, 128 }; +static const uint8_t GLOBE_HAZE_SPAN_BY_BAND[3] = {220, 220, 128}; static void animation_timer_handler(void *context); static void schedule_frame_timer(GlobeView *view); @@ -217,71 +219,70 @@ static void start_lock_pulse(GlobeView *view); static void ensure_visual_resources(GlobeView *view); static void release_visual_resources(GlobeView *view); static int bounce_offset(GlobeView *view); -static void framebuffer_draw_starfield(GBitmap *fb, GlobeView *view, - GRect bounds, GRect clip_rect); +static void framebuffer_draw_starfield(GBitmap *fb, GlobeView *view, GRect bounds, GRect clip_rect); #ifdef CONFIG_TOUCH static void stop_globe_coast(GlobeView *view, bool mark_dirty); static bool try_start_magnetic_city_lock(GlobeView *view, int radius_px); static bool point_is_on_revealed_globe(GlobeView *view, int16_t x, int16_t y); -static void apply_globe_screen_delta_q8(GlobeView *view, - int32_t dx_q8, - int32_t dy_q8); +static void apply_globe_screen_delta_q8(GlobeView *view, int32_t dx_q8, int32_t dy_q8); #endif static uint32_t bw_frame_count_for_view(GlobeView *view) { - return (view && view->bw_frame_count > 0) ? view->bw_frame_count : NUM_BW_FRAMES; + return (view && view->bw_frame_count > 0) ? view->bw_frame_count : NUM_BW_FRAMES; } static int bw_frame_index_for_view(GlobeView *view, int frame) { - uint32_t frame_count = bw_frame_count_for_view(view); - if (frame_count == 0) return 0; + uint32_t frame_count = bw_frame_count_for_view(view); + if (frame_count == 0) + return 0; - int result = frame % (int)frame_count; - return result < 0 ? result + (int)frame_count : result; + int result = frame % (int)frame_count; + return result < 0 ? result + (int)frame_count : result; } static uint32_t bw_sequence_duration_for_view(GlobeView *view) { - if (view && view->bw_sequence_duration_ms > 0) { - return view->bw_sequence_duration_ms; - } - return bw_frame_count_for_view(view) * GLOBE_FRAME_INTERVAL_MS; + if (view && view->bw_sequence_duration_ms > 0) { + return view->bw_sequence_duration_ms; + } + return bw_frame_count_for_view(view) * GLOBE_FRAME_INTERVAL_MS; } static void sync_bw_elapsed_to_current_frame(GlobeView *view) { - if (!view) return; + if (!view) + return; - uint32_t duration = bw_sequence_duration_for_view(view); - if (duration == 0) { - view->bw_elapsed_ms = 0; - return; - } + uint32_t duration = bw_sequence_duration_for_view(view); + if (duration == 0) { + view->bw_elapsed_ms = 0; + return; + } - uint32_t frame = (uint32_t)bw_frame_index_for_view(view, view->current_frame); - view->bw_elapsed_ms = (frame * GLOBE_FRAME_INTERVAL_MS) % duration; + uint32_t frame = (uint32_t)bw_frame_index_for_view(view, view->current_frame); + view->bw_elapsed_ms = (frame * GLOBE_FRAME_INTERVAL_MS) % duration; } // positive_modulo is provided by util/math.h (same semantics) — using that. #ifdef CONFIG_TOUCH static int32_t abs_i32(int32_t value) { - return value < 0 ? -value : value; + return value < 0 ? -value : value; } #endif static int rounded_divide(int value, int divisor) { - if (divisor == 0) return 0; - return value >= 0 ? (value + (divisor / 2)) / divisor - : (value - (divisor / 2)) / divisor; + if (divisor == 0) + return 0; + return value >= 0 ? (value + (divisor / 2)) / divisor : (value - (divisor / 2)) / divisor; } static int bw_frame_for_longitude_e2(int16_t longitude_e2) { - return positive_modulo(rounded_divide(-longitude_e2, 600), NUM_BW_FRAMES); + return positive_modulo(rounded_divide(-longitude_e2, 600), NUM_BW_FRAMES); } __attribute__((noinline)) static int32_t longitude_e2_for_bw_frame(int bw_frame) { - int frame = ((bw_frame * NUM_COLOR_LON_FRAMES) + (NUM_BW_FRAMES / 2)) / - NUM_BW_FRAMES % NUM_COLOR_LON_FRAMES; - return -frame * 1500; + int frame = ((bw_frame * NUM_COLOR_LON_FRAMES) + (NUM_BW_FRAMES / 2)) / NUM_BW_FRAMES % + NUM_COLOR_LON_FRAMES; + return -frame * 1500; } static int32_t shortest_longitude_delta_e2(int32_t from_e2, int32_t to_e2); @@ -290,482 +291,475 @@ static int32_t selected_city_latitude_e2(GlobeView *view); static int32_t selected_city_longitude_e2(GlobeView *view); static SavedLocationEntry *saved_entry_for_index(GlobeView *view, int index) { - if (!view || index < 0 || index >= view->saved_entry_count) return NULL; - return &view->saved_entries[index]; + if (!view || index < 0 || index >= view->saved_entry_count) + return NULL; + return &view->saved_entries[index]; } static SavedLocationEntry *selected_saved_entry(GlobeView *view) { - if (!view || view->saved_entry_count <= 0) return NULL; - if (view->selected_city_index < 0) { - view->selected_city_index = 0; - } else if (view->selected_city_index >= view->saved_entry_count) { - view->selected_city_index = view->saved_entry_count - 1; - } - return saved_entry_for_index(view, view->selected_city_index); + if (!view || view->saved_entry_count <= 0) + return NULL; + if (view->selected_city_index < 0) { + view->selected_city_index = 0; + } else if (view->selected_city_index >= view->saved_entry_count) { + view->selected_city_index = view->saved_entry_count - 1; + } + return saved_entry_for_index(view, view->selected_city_index); } static int find_current_saved_entry_index(GlobeView *view) { - if (!view) return -1; - for (int i = 0; i < view->saved_entry_count; i++) { - if (view->saved_entries[i].is_current_location) { - return i; - } + if (!view) + return -1; + for (int i = 0; i < view->saved_entry_count; i++) { + if (view->saved_entries[i].is_current_location) { + return i; } - return view->saved_entry_count > 0 ? 0 : -1; + } + return view->saved_entry_count > 0 ? 0 : -1; } -static bool saved_entry_matches(const SavedLocationEntry *a, - const SavedLocationEntry *b) { - if (!a || !b) return false; - // A re-sync can renumber records, so fall back to the name when the index - // no longer lines up. - if (a->ds_index == b->ds_index) return true; - return a->label[0] && b->label[0] && strcmp(a->label, b->label) == 0; +static bool saved_entry_matches(const SavedLocationEntry *a, const SavedLocationEntry *b) { + if (!a || !b) + return false; + // A re-sync can renumber records, so fall back to the name when the index + // no longer lines up. + if (a->ds_index == b->ds_index) + return true; + return a->label[0] && b->label[0] && strcmp(a->label, b->label) == 0; } -static int find_saved_entry_index(GlobeView *view, - const SavedLocationEntry *needle) { - if (!view || !needle) return -1; - for (int i = 0; i < view->saved_entry_count; i++) { - if (saved_entry_matches(&view->saved_entries[i], needle)) { - return i; - } - } +static int find_saved_entry_index(GlobeView *view, const SavedLocationEntry *needle) { + if (!view || !needle) return -1; + for (int i = 0; i < view->saved_entry_count; i++) { + if (saved_entry_matches(&view->saved_entries[i], needle)) { + return i; + } + } + return -1; } static void update_selected_transition_target(GlobeView *view) { - if (!view) return; - view->transition_color_target_latitude_e2 = selected_city_latitude_e2(view); - view->transition_color_target_longitude_e2 = selected_city_longitude_e2(view); + if (!view) + return; + view->transition_color_target_latitude_e2 = selected_city_latitude_e2(view); + view->transition_color_target_longitude_e2 = selected_city_longitude_e2(view); } // In-file only (defined below with the other saved-locations plumbing). static void globe_view_reload_saved_locations(GlobeView *view); static bool selected_city_is_current_location(GlobeView *view) { - SavedLocationEntry *entry = selected_saved_entry(view); - return entry && entry->is_current_location; + SavedLocationEntry *entry = selected_saved_entry(view); + return entry && entry->is_current_location; } static int globe_max_selector_index(GlobeView *view) { - return (view && view->saved_entry_count > 0) - ? view->saved_entry_count - 1 - : 0; + return (view && view->saved_entry_count > 0) ? view->saved_entry_count - 1 : 0; } static int32_t selected_city_latitude_e2(GlobeView *view) { - SavedLocationEntry *entry = selected_saved_entry(view); - return entry ? entry->latitude_e2 : 0; + SavedLocationEntry *entry = selected_saved_entry(view); + return entry ? entry->latitude_e2 : 0; } static int32_t selected_city_longitude_e2(GlobeView *view) { - SavedLocationEntry *entry = selected_saved_entry(view); - return entry ? entry->longitude_e2 : 0; + SavedLocationEntry *entry = selected_saved_entry(view); + return entry ? entry->longitude_e2 : 0; } static bool selected_city_is_valid(GlobeView *view, int city_index) { - SavedLocationEntry *e = saved_entry_for_index(view, city_index); - if (!e) return false; - // A location the phone sent WITHOUT coordinates cannot be placed on the - // globe (the watch has no geocoder), so skip it while cycling rather than - // rotating to (0,0). The caller already retries and falls back to a bounce. - return e->has_coordinates || - (e->is_current_location && view && view->has_current_location); -} - -static bool saved_entry_has_globe_coordinates(GlobeView *view, - SavedLocationEntry *entry) { - if (!entry) return false; - if (entry->has_coordinates) return true; - return entry->is_current_location && - view && view->has_current_location; -} - -static int16_t saved_entry_latitude_e2(GlobeView *view, - SavedLocationEntry *entry) { - if (entry && entry->is_current_location && - view && view->has_current_location) { - return (int16_t)view->current_location_latitude_e2; - } - return entry ? entry->latitude_e2 : 0; + SavedLocationEntry *e = saved_entry_for_index(view, city_index); + if (!e) + return false; + // A location the phone sent WITHOUT coordinates cannot be placed on the + // globe (the watch has no geocoder), so skip it while cycling rather than + // rotating to (0,0). The caller already retries and falls back to a bounce. + return e->has_coordinates || (e->is_current_location && view && view->has_current_location); +} + +static bool saved_entry_has_globe_coordinates(GlobeView *view, SavedLocationEntry *entry) { + if (!entry) + return false; + if (entry->has_coordinates) + return true; + return entry->is_current_location && view && view->has_current_location; } -static int16_t saved_entry_longitude_e2(GlobeView *view, - SavedLocationEntry *entry) { - if (entry && entry->is_current_location && - view && view->has_current_location) { - return (int16_t)view->current_location_longitude_e2; - } - return entry ? entry->longitude_e2 : 0; +static int16_t saved_entry_latitude_e2(GlobeView *view, SavedLocationEntry *entry) { + if (entry && entry->is_current_location && view && view->has_current_location) { + return (int16_t)view->current_location_latitude_e2; + } + return entry ? entry->latitude_e2 : 0; +} + +static int16_t saved_entry_longitude_e2(GlobeView *view, SavedLocationEntry *entry) { + if (entry && entry->is_current_location && view && view->has_current_location) { + return (int16_t)view->current_location_longitude_e2; + } + return entry ? entry->longitude_e2 : 0; } #ifdef CONFIG_TOUCH // Merged has-coordinates + coordinate fetch: one call per entry instead of // three, false when the entry has no usable globe position. static bool saved_entry_globe_coords(GlobeView *view, SavedLocationEntry *entry, - int32_t *latitude_e2_out, - int32_t *longitude_e2_out) { - if (!saved_entry_has_globe_coordinates(view, entry)) return false; - if (entry->is_current_location && - view && view->has_current_location) { - *latitude_e2_out = (int16_t)view->current_location_latitude_e2; - *longitude_e2_out = (int16_t)view->current_location_longitude_e2; - } else { - *latitude_e2_out = entry->latitude_e2; - *longitude_e2_out = entry->longitude_e2; - } - return true; + int32_t *latitude_e2_out, int32_t *longitude_e2_out) { + if (!saved_entry_has_globe_coordinates(view, entry)) + return false; + if (entry->is_current_location && view && view->has_current_location) { + *latitude_e2_out = (int16_t)view->current_location_latitude_e2; + *longitude_e2_out = (int16_t)view->current_location_longitude_e2; + } else { + *latitude_e2_out = entry->latitude_e2; + *longitude_e2_out = entry->longitude_e2; + } + return true; } static int nearest_city_index_for_orientation(GlobeView *view) { - if (!view) return 0; - - int best_index = 0; - int32_t best_score = INT32_MAX; - int max_index = globe_max_selector_index(view); - for (int i = 0; i <= max_index; i++) { - if (!selected_city_is_valid(view, i)) continue; - SavedLocationEntry *entry = saved_entry_for_index(view, i); - int32_t candidate_latitude_e2; - int32_t candidate_longitude_e2; - if (!saved_entry_globe_coords(view, entry, &candidate_latitude_e2, - &candidate_longitude_e2)) { - continue; - } - - int32_t lat_delta = candidate_latitude_e2 - view->color_latitude_e2; - int32_t lon_delta = shortest_longitude_delta_e2( - view->color_longitude_e2, - candidate_longitude_e2); - int32_t score = (lat_delta * lat_delta) + (lon_delta * lon_delta); - if (score < best_score) { - best_score = score; - best_index = i; - } + if (!view) + return 0; + + int best_index = 0; + int32_t best_score = INT32_MAX; + int max_index = globe_max_selector_index(view); + for (int i = 0; i <= max_index; i++) { + if (!selected_city_is_valid(view, i)) + continue; + SavedLocationEntry *entry = saved_entry_for_index(view, i); + int32_t candidate_latitude_e2; + int32_t candidate_longitude_e2; + if (!saved_entry_globe_coords(view, entry, &candidate_latitude_e2, &candidate_longitude_e2)) { + continue; + } + + int32_t lat_delta = candidate_latitude_e2 - view->color_latitude_e2; + int32_t lon_delta = + shortest_longitude_delta_e2(view->color_longitude_e2, candidate_longitude_e2); + int32_t score = (lat_delta * lat_delta) + (lon_delta * lon_delta); + if (score < best_score) { + best_score = score; + best_index = i; } + } - return best_index; + return best_index; } #endif static GSize get_vector_or_bitmap_size(GlobeView *view) { - if (view->bw_sequence) { - return gdraw_command_sequence_get_bounds_size(view->bw_sequence); - } - if (view->cradle_pdc) { - return gdraw_command_image_get_bounds_size(view->cradle_pdc); - } - return GSize(124, 144); + if (view->bw_sequence) { + return gdraw_command_sequence_get_bounds_size(view->bw_sequence); + } + if (view->cradle_pdc) { + return gdraw_command_image_get_bounds_size(view->cradle_pdc); + } + return GSize(124, 144); } static void draw_bw_frame(GContext *ctx, GlobeView *view, GPoint origin, GSize frame_size) { - (void)frame_size; - if (view->bw_sequence) { - uint32_t duration = bw_sequence_duration_for_view(view); - uint32_t elapsed = duration > 0 ? view->bw_elapsed_ms % duration : 0; - GDrawCommandFrame *frame = - gdraw_command_sequence_get_frame_by_elapsed(view->bw_sequence, elapsed); - if (!frame) { - frame = gdraw_command_sequence_get_frame_by_index( - view->bw_sequence, - bw_frame_index_for_view(view, view->current_frame)); - } - if (frame) { - gdraw_command_frame_draw(ctx, view->bw_sequence, frame, origin); - return; - } + (void)frame_size; + if (view->bw_sequence) { + uint32_t duration = bw_sequence_duration_for_view(view); + uint32_t elapsed = duration > 0 ? view->bw_elapsed_ms % duration : 0; + GDrawCommandFrame *frame = + gdraw_command_sequence_get_frame_by_elapsed(view->bw_sequence, elapsed); + if (!frame) { + frame = gdraw_command_sequence_get_frame_by_index( + view->bw_sequence, bw_frame_index_for_view(view, view->current_frame)); } + if (frame) { + gdraw_command_frame_draw(ctx, view->bw_sequence, frame, origin); + return; + } + } } static AnimationProgress ease_in_out(AnimationProgress progress) { - int32_t p = (int32_t)progress; - int32_t square = weather_norm_square(p); - int32_t shape = (3 * ANIMATION_NORMALIZED_MAX) - (2 * p); - return (AnimationProgress)weather_scale_i32(shape, square, - ANIMATION_NORMALIZED_MAX); + int32_t p = (int32_t)progress; + int32_t square = weather_norm_square(p); + int32_t shape = (3 * ANIMATION_NORMALIZED_MAX) - (2 * p); + return (AnimationProgress)weather_scale_i32(shape, square, ANIMATION_NORMALIZED_MAX); } static int crumple_delay_index(GPoint point, GPoint center) { - int angle = positive_modulo( - atan2_lookup(point.y - center.y, point.x - center.x) + GLOBE_CRUMPLE_SWEEP_ANGLE, - TRIG_MAX_ANGLE); - int distance_from_sweep = abs(angle - (TRIG_MAX_ANGLE / 2)); - return (int)weather_scale_i32(distance_from_sweep, - GLOBE_CRUMPLE_DELAY_SEGMENTS, - TRIG_MAX_ANGLE / 2); + int angle = positive_modulo( + atan2_lookup(point.y - center.y, point.x - center.x) + GLOBE_CRUMPLE_SWEEP_ANGLE, + TRIG_MAX_ANGLE); + int distance_from_sweep = abs(angle - (TRIG_MAX_ANGLE / 2)); + return (int)weather_scale_i32(distance_from_sweep, GLOBE_CRUMPLE_DELAY_SEGMENTS, + TRIG_MAX_ANGLE / 2); } static AnimationProgress segmented_crumple_progress(AnimationProgress amount, int delay_index) { - int duration = (ANIMATION_NORMALIZED_MAX * GLOBE_CRUMPLE_POINT_DURATION_NUM) / - GLOBE_CRUMPLE_POINT_DURATION_DEN; - int delay_per_item = (ANIMATION_NORMALIZED_MAX - duration) / - GLOBE_CRUMPLE_DELAY_SEGMENTS; - int offset = amount - (delay_index * delay_per_item); - if (offset <= 0) return 0; + int duration = (ANIMATION_NORMALIZED_MAX * GLOBE_CRUMPLE_POINT_DURATION_NUM) / + GLOBE_CRUMPLE_POINT_DURATION_DEN; + int delay_per_item = (ANIMATION_NORMALIZED_MAX - duration) / GLOBE_CRUMPLE_DELAY_SEGMENTS; + int offset = amount - (delay_index * delay_per_item); + if (offset <= 0) + return 0; - int32_t relative = weather_scale_i32(offset, ANIMATION_NORMALIZED_MAX, - duration); - if (relative >= ANIMATION_NORMALIZED_MAX) return ANIMATION_NORMALIZED_MAX; - return ease_in_out((AnimationProgress)relative); + int32_t relative = weather_scale_i32(offset, ANIMATION_NORMALIZED_MAX, duration); + if (relative >= ANIMATION_NORMALIZED_MAX) + return ANIMATION_NORMALIZED_MAX; + return ease_in_out((AnimationProgress)relative); } static GPoint crumple_point(GPoint point, GPoint center, AnimationProgress amount) { - AnimationProgress progress = - segmented_crumple_progress(amount, crumple_delay_index(point, center)); - int scale = ANIMATION_NORMALIZED_MAX - progress; - return GPoint( - center.x + (int16_t)((int32_t)(point.x - center.x) * scale / ANIMATION_NORMALIZED_MAX), - center.y + (int16_t)((int32_t)(point.y - center.y) * scale / ANIMATION_NORMALIZED_MAX) - ); + AnimationProgress progress = + segmented_crumple_progress(amount, crumple_delay_index(point, center)); + int scale = ANIMATION_NORMALIZED_MAX - progress; + return GPoint( + center.x + (int16_t)((int32_t)(point.x - center.x) * scale / ANIMATION_NORMALIZED_MAX), + center.y + (int16_t)((int32_t)(point.y - center.y) * scale / ANIMATION_NORMALIZED_MAX)); } // (bw_crumple_sequence machinery deleted — the field was only ever NULL) typedef struct { - GContext *ctx; - GPoint origin; - GPoint center; - AnimationProgress amount; - bool drew_command; + GContext *ctx; + GPoint origin; + GPoint center; + AnimationProgress amount; + bool drew_command; } DirectCrumpleContext; -static bool draw_direct_crumple_command(GDrawCommand *command, - uint32_t index, - void *context) { - (void)index; - DirectCrumpleContext *crumple = context; - if (!command || gdraw_command_get_hidden(command)) return true; - - GDrawCommandType type = gdraw_command_get_type(command); - GColor fill_color = gdraw_command_get_fill_color(command); - GColor stroke_color = gdraw_command_get_stroke_color(command); - uint8_t stroke_width = gdraw_command_get_stroke_width(command); - uint32_t stroke_scale = ANIMATION_NORMALIZED_MAX - - ((uint32_t)crumple->amount * 55 / 100); - uint8_t scaled_stroke = - (uint8_t)((uint32_t)stroke_width * stroke_scale / ANIMATION_NORMALIZED_MAX); - if (scaled_stroke == 0) scaled_stroke = 1; - - if (type == GDrawCommandTypeCircle) { - uint16_t radius = gdraw_command_get_radius(command); - AnimationProgress progress = ease_in_out(crumple->amount); - uint16_t scaled_radius = - (uint16_t)((uint32_t)radius * (ANIMATION_NORMALIZED_MAX - progress) / - ANIMATION_NORMALIZED_MAX); - if (scaled_radius < 2) { - return true; - } +static bool draw_direct_crumple_command(GDrawCommand *command, uint32_t index, void *context) { + (void)index; + DirectCrumpleContext *crumple = context; + if (!command || gdraw_command_get_hidden(command)) + return true; - GPoint center = gdraw_command_get_point(command, 0); - center = GPoint(center.x + crumple->origin.x, - center.y + crumple->origin.y); + GDrawCommandType type = gdraw_command_get_type(command); + GColor fill_color = gdraw_command_get_fill_color(command); + GColor stroke_color = gdraw_command_get_stroke_color(command); + uint8_t stroke_width = gdraw_command_get_stroke_width(command); + uint32_t stroke_scale = ANIMATION_NORMALIZED_MAX - ((uint32_t)crumple->amount * 55 / 100); + uint8_t scaled_stroke = + (uint8_t)((uint32_t)stroke_width * stroke_scale / ANIMATION_NORMALIZED_MAX); + if (scaled_stroke == 0) + scaled_stroke = 1; - if (!gcolor_equal(fill_color, GColorClear)) { - graphics_context_set_fill_color(crumple->ctx, fill_color); - graphics_fill_circle(crumple->ctx, center, scaled_radius); - } - if (!gcolor_equal(stroke_color, GColorClear)) { - graphics_context_set_stroke_color(crumple->ctx, stroke_color); - graphics_context_set_stroke_width(crumple->ctx, scaled_stroke); - graphics_draw_circle(crumple->ctx, center, scaled_radius); - } - crumple->drew_command = true; - return true; + if (type == GDrawCommandTypeCircle) { + uint16_t radius = gdraw_command_get_radius(command); + AnimationProgress progress = ease_in_out(crumple->amount); + uint16_t scaled_radius = (uint16_t)((uint32_t)radius * (ANIMATION_NORMALIZED_MAX - progress) / + ANIMATION_NORMALIZED_MAX); + if (scaled_radius < 2) { + return true; } - if (type != GDrawCommandTypePath && type != GDrawCommandTypePrecisePath) { - return true; - } + GPoint center = gdraw_command_get_point(command, 0); + center = GPoint(center.x + crumple->origin.x, center.y + crumple->origin.y); - uint16_t num_points = gdraw_command_get_num_points(command); - if (num_points < 3) return true; - if (num_points > GLOBE_CRUMPLE_MAX_POINTS) { - num_points = GLOBE_CRUMPLE_MAX_POINTS; + if (!gcolor_equal(fill_color, GColorClear)) { + graphics_context_set_fill_color(crumple->ctx, fill_color); + graphics_fill_circle(crumple->ctx, center, scaled_radius); } - - GPoint points[GLOBE_CRUMPLE_MAX_POINTS]; - int16_t min_x = INT16_MAX; - int16_t min_y = INT16_MAX; - int16_t max_x = INT16_MIN; - int16_t max_y = INT16_MIN; - for (uint16_t i = 0; i < num_points; i++) { - GPoint point = gdraw_command_get_point(command, i); - GPoint crumpled = crumple_point(point, crumple->center, crumple->amount); - crumpled = GPoint(crumpled.x + crumple->origin.x, - crumpled.y + crumple->origin.y); - points[i] = crumpled; - - if (crumpled.x < min_x) min_x = crumpled.x; - if (crumpled.y < min_y) min_y = crumpled.y; - if (crumpled.x > max_x) max_x = crumpled.x; - if (crumpled.y > max_y) max_y = crumpled.y; + if (!gcolor_equal(stroke_color, GColorClear)) { + graphics_context_set_stroke_color(crumple->ctx, stroke_color); + graphics_context_set_stroke_width(crumple->ctx, scaled_stroke); + graphics_draw_circle(crumple->ctx, center, scaled_radius); } + crumple->drew_command = true; + return true; + } - if ((max_x - min_x) < 2 && (max_y - min_y) < 2) { - return true; - } + if (type != GDrawCommandTypePath && type != GDrawCommandTypePrecisePath) { + return true; + } - GPath path = { - .num_points = num_points, - .points = points, - .rotation = 0, - .offset = GPoint(0, 0), - }; + uint16_t num_points = gdraw_command_get_num_points(command); + if (num_points < 3) + return true; + if (num_points > GLOBE_CRUMPLE_MAX_POINTS) { + num_points = GLOBE_CRUMPLE_MAX_POINTS; + } - if (!gdraw_command_get_path_open(command) && - !gcolor_equal(fill_color, GColorClear)) { - graphics_context_set_fill_color(crumple->ctx, fill_color); - gpath_draw_filled(crumple->ctx, &path); - } - if (!gcolor_equal(stroke_color, GColorClear)) { - graphics_context_set_stroke_color(crumple->ctx, stroke_color); - graphics_context_set_stroke_width(crumple->ctx, scaled_stroke); - if (gdraw_command_get_path_open(command)) { - gpath_draw_outline_open(crumple->ctx, &path); - } else { - gpath_draw_outline(crumple->ctx, &path); - } - } - crumple->drew_command = true; + GPoint points[GLOBE_CRUMPLE_MAX_POINTS]; + int16_t min_x = INT16_MAX; + int16_t min_y = INT16_MAX; + int16_t max_x = INT16_MIN; + int16_t max_y = INT16_MIN; + for (uint16_t i = 0; i < num_points; i++) { + GPoint point = gdraw_command_get_point(command, i); + GPoint crumpled = crumple_point(point, crumple->center, crumple->amount); + crumpled = GPoint(crumpled.x + crumple->origin.x, crumpled.y + crumple->origin.y); + points[i] = crumpled; + + if (crumpled.x < min_x) + min_x = crumpled.x; + if (crumpled.y < min_y) + min_y = crumpled.y; + if (crumpled.x > max_x) + max_x = crumpled.x; + if (crumpled.y > max_y) + max_y = crumpled.y; + } + + if ((max_x - min_x) < 2 && (max_y - min_y) < 2) { return true; + } + + GPath path = { + .num_points = num_points, + .points = points, + .rotation = 0, + .offset = GPoint(0, 0), + }; + + if (!gdraw_command_get_path_open(command) && !gcolor_equal(fill_color, GColorClear)) { + graphics_context_set_fill_color(crumple->ctx, fill_color); + gpath_draw_filled(crumple->ctx, &path); + } + if (!gcolor_equal(stroke_color, GColorClear)) { + graphics_context_set_stroke_color(crumple->ctx, stroke_color); + graphics_context_set_stroke_width(crumple->ctx, scaled_stroke); + if (gdraw_command_get_path_open(command)) { + gpath_draw_outline_open(crumple->ctx, &path); + } else { + gpath_draw_outline(crumple->ctx, &path); + } + } + crumple->drew_command = true; + return true; } -static bool draw_bw_crumple_frame(GContext *ctx, GlobeView *view, GPoint origin, - GSize frame_size, int amount) { - if (!view || !view->bw_sequence) return false; +static bool draw_bw_crumple_frame(GContext *ctx, GlobeView *view, GPoint origin, GSize frame_size, + int amount) { + if (!view || !view->bw_sequence) + return false; - int bw_frame = bw_frame_index_for_view(view, view->transition_bw_frame); - GDrawCommandFrame *frame = - gdraw_command_sequence_get_frame_by_index(view->bw_sequence, bw_frame); - if (!frame) return false; - - GDrawCommandList *list = gdraw_command_frame_get_command_list(frame); - if (!list) return false; - - DirectCrumpleContext context = { - .ctx = ctx, - .origin = origin, - .center = GPoint(frame_size.w / 2, (frame_size.h / 2) + GLOBE_PLANET_CENTER_Y_OFFSET), - .amount = (AnimationProgress)amount, - .drew_command = false, - }; - gdraw_command_list_iterate(list, draw_direct_crumple_command, &context); - return context.drew_command; + int bw_frame = bw_frame_index_for_view(view, view->transition_bw_frame); + GDrawCommandFrame *frame = gdraw_command_sequence_get_frame_by_index(view->bw_sequence, bw_frame); + if (!frame) + return false; + + GDrawCommandList *list = gdraw_command_frame_get_command_list(frame); + if (!list) + return false; + + DirectCrumpleContext context = { + .ctx = ctx, + .origin = origin, + .center = GPoint(frame_size.w / 2, (frame_size.h / 2) + GLOBE_PLANET_CENTER_Y_OFFSET), + .amount = (AnimationProgress)amount, + .drew_command = false, + }; + gdraw_command_list_iterate(list, draw_direct_crumple_command, &context); + return context.drew_command; } -static bool color_highlight_bw_command(GDrawCommand *command, - uint32_t index, - void *context) { - (void)context; +static bool color_highlight_bw_command(GDrawCommand *command, uint32_t index, void *context) { + (void)context; - // Command 0 of every frame is the (low-poly) ocean disc; the land - // polygons follow it, so recolor by position rather than command type. - gdraw_command_set_stroke_color(command, GColorBlack); + // Command 0 of every frame is the (low-poly) ocean disc; the land + // polygons follow it, so recolor by position rather than command type. + gdraw_command_set_stroke_color(command, GColorBlack); #if PBL_BW - // The colour tints quantize to a solid black blob on 1-bit — shade just - // the ocean disc 50% instead; land stays white line-art. - gdraw_command_set_fill_color(command, index == 0 ? GColorLightGray : GColorWhite); + // The colour tints quantize to a solid black blob on 1-bit — shade just + // the ocean disc 50% instead; land stays white line-art. + gdraw_command_set_fill_color(command, index == 0 ? GColorLightGray : GColorWhite); #else - gdraw_command_set_fill_color(command, index == 0 ? GColorVividCerulean - : GColorScreaminGreen); + gdraw_command_set_fill_color(command, index == 0 ? GColorVividCerulean : GColorScreaminGreen); #endif - return true; + return true; } // Restore pass for the in-place highlight below: the bw art is UNIFORMLY // stroke-Black / fill-White (byte-verified across all 60 frames, widths vary // but are never touched), so constant restore is exactly invertible. -static bool restore_bw_command(GDrawCommand *command, uint32_t index, - void *context) { - (void)index; (void)context; - gdraw_command_set_stroke_color(command, GColorBlack); - gdraw_command_set_fill_color(command, GColorWhite); - return true; +static bool restore_bw_command(GDrawCommand *command, uint32_t index, void *context) { + (void)index; + (void)context; + gdraw_command_set_stroke_color(command, GColorBlack); + gdraw_command_set_fill_color(command, GColorWhite); + return true; } -static void draw_intro_world_frame(GContext *ctx, GlobeView *view, - GPoint origin, GSize frame_size) { - // Highlight IN PLACE: recolor the single frame being drawn, draw, restore — - // this replaced an 18.7 KB full-sequence clone (size pass). The - // sequence lives on the heap (prv_load_inflated), never in mmap'd flash. - if (view && view->intro_world_selected && view->bw_sequence) { - uint32_t duration = bw_sequence_duration_for_view(view); - uint32_t elapsed = duration > 0 ? view->bw_elapsed_ms % duration : 0; - GDrawCommandFrame *frame = - gdraw_command_sequence_get_frame_by_elapsed(view->bw_sequence, elapsed); - if (!frame) { - frame = gdraw_command_sequence_get_frame_by_index( - view->bw_sequence, - bw_frame_index_for_view(view, view->current_frame)); - } - if (frame) { - GDrawCommandList *list = gdraw_command_frame_get_command_list(frame); - if (list) { - gdraw_command_list_iterate(list, color_highlight_bw_command, NULL); - gdraw_command_frame_draw(ctx, view->bw_sequence, frame, origin); - gdraw_command_list_iterate(list, restore_bw_command, NULL); - return; - } - } +static void draw_intro_world_frame(GContext *ctx, GlobeView *view, GPoint origin, + GSize frame_size) { + // Highlight IN PLACE: recolor the single frame being drawn, draw, restore — + // this replaced an 18.7 KB full-sequence clone (size pass). The + // sequence lives on the heap (prv_load_inflated), never in mmap'd flash. + if (view && view->intro_world_selected && view->bw_sequence) { + uint32_t duration = bw_sequence_duration_for_view(view); + uint32_t elapsed = duration > 0 ? view->bw_elapsed_ms % duration : 0; + GDrawCommandFrame *frame = + gdraw_command_sequence_get_frame_by_elapsed(view->bw_sequence, elapsed); + if (!frame) { + frame = gdraw_command_sequence_get_frame_by_index( + view->bw_sequence, bw_frame_index_for_view(view, view->current_frame)); + } + if (frame) { + GDrawCommandList *list = gdraw_command_frame_get_command_list(frame); + if (list) { + gdraw_command_list_iterate(list, color_highlight_bw_command, NULL); + gdraw_command_frame_draw(ctx, view->bw_sequence, frame, origin); + gdraw_command_list_iterate(list, restore_bw_command, NULL); + return; + } } - draw_bw_frame(ctx, view, origin, frame_size); + } + draw_bw_frame(ctx, view, origin, frame_size); } static void draw_cradle(GContext *ctx, GlobeView *view, GPoint origin, GSize frame_size) { - (void)frame_size; - graphics_context_set_antialiased(ctx, false); - graphics_context_set_fill_color(ctx, GColorBlack); - const int acx = GLOBE_CRADLE_ARM_CENTER_X * GLOBE_CRADLE_SCALE_PCT / 100; - const int acy = GLOBE_CRADLE_ARM_CENTER_Y * GLOBE_CRADLE_SCALE_PCT / 100; - const int aor = GLOBE_CRADLE_ARM_OUTER_RADIUS * GLOBE_CRADLE_SCALE_PCT / 100; - const int ath = GLOBE_CRADLE_ARM_THICKNESS * GLOBE_CRADLE_SCALE_PCT / 100; - graphics_fill_radial( - ctx, - GRect(origin.x + acx - aor, origin.y + acy - aor, aor * 2, aor * 2), - GOvalScaleModeFitCircle, - ath, - GLOBE_CRADLE_ARM_START_ANGLE, - GLOBE_CRADLE_ARM_END_ANGLE - ); - - if (view->cradle_pdc) { - gdraw_command_image_draw(ctx, view->cradle_pdc, origin); - } - graphics_context_set_antialiased(ctx, true); + (void)frame_size; + graphics_context_set_antialiased(ctx, false); + graphics_context_set_fill_color(ctx, GColorBlack); + const int acx = GLOBE_CRADLE_ARM_CENTER_X * GLOBE_CRADLE_SCALE_PCT / 100; + const int acy = GLOBE_CRADLE_ARM_CENTER_Y * GLOBE_CRADLE_SCALE_PCT / 100; + const int aor = GLOBE_CRADLE_ARM_OUTER_RADIUS * GLOBE_CRADLE_SCALE_PCT / 100; + const int ath = GLOBE_CRADLE_ARM_THICKNESS * GLOBE_CRADLE_SCALE_PCT / 100; + graphics_fill_radial(ctx, GRect(origin.x + acx - aor, origin.y + acy - aor, aor * 2, aor * 2), + GOvalScaleModeFitCircle, ath, GLOBE_CRADLE_ARM_START_ANGLE, + GLOBE_CRADLE_ARM_END_ANGLE); + + if (view->cradle_pdc) { + gdraw_command_image_draw(ctx, view->cradle_pdc, origin); + } + graphics_context_set_antialiased(ctx, true); } static int32_t normalize_longitude_e2(int32_t longitude_e2) { - while (longitude_e2 < -18000) longitude_e2 += 36000; - while (longitude_e2 >= 18000) longitude_e2 -= 36000; - return longitude_e2; + while (longitude_e2 < -18000) + longitude_e2 += 36000; + while (longitude_e2 >= 18000) + longitude_e2 -= 36000; + return longitude_e2; } __attribute__((noinline)) static int32_t clamp_latitude_e2(int32_t latitude_e2) { - if (latitude_e2 > 8900) return 8900; - if (latitude_e2 < -8900) return -8900; - return latitude_e2; + if (latitude_e2 > 8900) + return 8900; + if (latitude_e2 < -8900) + return -8900; + return latitude_e2; } static int32_t shortest_longitude_delta_e2(int32_t from_e2, int32_t to_e2) { - int32_t delta = normalize_longitude_e2(to_e2 - from_e2); - if (delta >= 18000) delta -= 36000; - if (delta < -18000) delta += 36000; - return delta; + int32_t delta = normalize_longitude_e2(to_e2 - from_e2); + if (delta >= 18000) + delta -= 36000; + if (delta < -18000) + delta += 36000; + return delta; } __attribute__((noinline)) static int trigangle_from_degrees_e2(int32_t degrees_e2) { - return (int)weather_scale_i32(degrees_e2, TRIG_MAX_ANGLE, 36000); + return (int)weather_scale_i32(degrees_e2, TRIG_MAX_ANGLE, 36000); } static int32_t trig_sin_q10(int angle) { - return (int32_t)(sin_lookup(positive_modulo(angle, TRIG_MAX_ANGLE)) * - GLOBE_ROT_SCALE / TRIG_MAX_RATIO); + return (int32_t)(sin_lookup(positive_modulo(angle, TRIG_MAX_ANGLE)) * GLOBE_ROT_SCALE / + TRIG_MAX_RATIO); } static int32_t trig_cos_q10(int angle) { - return (int32_t)(cos_lookup(positive_modulo(angle, TRIG_MAX_ANGLE)) * - GLOBE_ROT_SCALE / TRIG_MAX_RATIO); + return (int32_t)(cos_lookup(positive_modulo(angle, TRIG_MAX_ANGLE)) * GLOBE_ROT_SCALE / + TRIG_MAX_RATIO); } // (globe_isqrt was token-identical to weather_isqrt — merged, size pass) @@ -775,180 +769,179 @@ static int32_t trig_cos_q10(int angle) { // seed the iteration is strictly decreasing and lands exactly on the floor, // so results match weather_isqrt() bit-for-bit at a fraction of the cost. static inline int32_t floor_sqrt_seeded(int32_t value, int32_t seed) { - if (value <= 0) return 0; - if (seed <= 0) return weather_isqrt(value); - int32_t s = seed; - for (;;) { - int32_t next = (s + (value / s)) >> 1; - if (next >= s) break; - s = next; - } - return s; + if (value <= 0) + return 0; + if (seed <= 0) + return weather_isqrt(value); + int32_t s = seed; + for (;;) { + int32_t next = (s + (value / s)) >> 1; + if (next >= s) + break; + s = next; + } + return s; } static void matrix_identity(int32_t matrix[9]) { - matrix[0] = GLOBE_ROT_SCALE; - matrix[1] = 0; - matrix[2] = 0; - matrix[3] = 0; - matrix[4] = GLOBE_ROT_SCALE; - matrix[5] = 0; - matrix[6] = 0; - matrix[7] = 0; - matrix[8] = GLOBE_ROT_SCALE; + matrix[0] = GLOBE_ROT_SCALE; + matrix[1] = 0; + matrix[2] = 0; + matrix[3] = 0; + matrix[4] = GLOBE_ROT_SCALE; + matrix[5] = 0; + matrix[6] = 0; + matrix[7] = 0; + matrix[8] = GLOBE_ROT_SCALE; } #ifdef CONFIG_TOUCH static void matrix_copy(int32_t destination[9], const int32_t source[9]) { - for (int i = 0; i < 9; i++) { - destination[i] = source[i]; - } + for (int i = 0; i < 9; i++) { + destination[i] = source[i]; + } } -static void matrix_multiply(int32_t destination[9], - const int32_t left[9], - const int32_t right[9]) { - int32_t result[9]; - for (int row = 0; row < 3; row++) { - for (int column = 0; column < 3; column++) { - int64_t value = 0; - for (int i = 0; i < 3; i++) { - value += (int64_t)left[(row * 3) + i] * right[(i * 3) + column]; - } - result[(row * 3) + column] = (int32_t)(value >> GLOBE_ROT_SHIFT); - } +static void matrix_multiply(int32_t destination[9], const int32_t left[9], const int32_t right[9]) { + int32_t result[9]; + for (int row = 0; row < 3; row++) { + for (int column = 0; column < 3; column++) { + int64_t value = 0; + for (int i = 0; i < 3; i++) { + value += (int64_t)left[(row * 3) + i] * right[(i * 3) + column]; + } + result[(row * 3) + column] = (int32_t)(value >> GLOBE_ROT_SHIFT); } - matrix_copy(destination, result); + } + matrix_copy(destination, result); } static void matrix_screen_rotation(int32_t matrix[9], int yaw_angle, int pitch_angle) { - int32_t yaw[9]; - int32_t pitch[9]; - int32_t cy = trig_cos_q10(yaw_angle); - int32_t sy = trig_sin_q10(yaw_angle); - int32_t cp = trig_cos_q10(pitch_angle); - int32_t sp = trig_sin_q10(pitch_angle); - - yaw[0] = cy; - yaw[1] = 0; - yaw[2] = sy; - yaw[3] = 0; - yaw[4] = GLOBE_ROT_SCALE; - yaw[5] = 0; - yaw[6] = -sy; - yaw[7] = 0; - yaw[8] = cy; - - pitch[0] = GLOBE_ROT_SCALE; - pitch[1] = 0; - pitch[2] = 0; - pitch[3] = 0; - pitch[4] = cp; - pitch[5] = -sp; - pitch[6] = 0; - pitch[7] = sp; - pitch[8] = cp; - - matrix_multiply(matrix, yaw, pitch); + int32_t yaw[9]; + int32_t pitch[9]; + int32_t cy = trig_cos_q10(yaw_angle); + int32_t sy = trig_sin_q10(yaw_angle); + int32_t cp = trig_cos_q10(pitch_angle); + int32_t sp = trig_sin_q10(pitch_angle); + + yaw[0] = cy; + yaw[1] = 0; + yaw[2] = sy; + yaw[3] = 0; + yaw[4] = GLOBE_ROT_SCALE; + yaw[5] = 0; + yaw[6] = -sy; + yaw[7] = 0; + yaw[8] = cy; + + pitch[0] = GLOBE_ROT_SCALE; + pitch[1] = 0; + pitch[2] = 0; + pitch[3] = 0; + pitch[4] = cp; + pitch[5] = -sp; + pitch[6] = 0; + pitch[7] = sp; + pitch[8] = cp; + + matrix_multiply(matrix, yaw, pitch); } static void normalize_axis(int32_t *x, int32_t *y, int32_t *z) { - int32_t length = weather_isqrt((*x * *x) + (*y * *y) + (*z * *z)); - if (length <= 0) return; + int32_t length = weather_isqrt((*x * *x) + (*y * *y) + (*z * *z)); + if (length <= 0) + return; - *x = (*x * GLOBE_ROT_SCALE) / length; - *y = (*y * GLOBE_ROT_SCALE) / length; - *z = (*z * GLOBE_ROT_SCALE) / length; + *x = (*x * GLOBE_ROT_SCALE) / length; + *y = (*y * GLOBE_ROT_SCALE) / length; + *z = (*z * GLOBE_ROT_SCALE) / length; } static void normalize_globe_rotation(GlobeView *view) { - if (!view) return; - - int32_t rx = view->globe_rotation[0]; - int32_t ry = view->globe_rotation[3]; - int32_t rz = view->globe_rotation[6]; - int32_t ux = view->globe_rotation[1]; - int32_t uy = view->globe_rotation[4]; - int32_t uz = view->globe_rotation[7]; - normalize_axis(&rx, &ry, &rz); - normalize_axis(&ux, &uy, &uz); - - int32_t fx = ((ry * uz) - (rz * uy)) >> GLOBE_ROT_SHIFT; - int32_t fy = ((rz * ux) - (rx * uz)) >> GLOBE_ROT_SHIFT; - int32_t fz = ((rx * uy) - (ry * ux)) >> GLOBE_ROT_SHIFT; - normalize_axis(&fx, &fy, &fz); - - ux = ((fy * rz) - (fz * ry)) >> GLOBE_ROT_SHIFT; - uy = ((fz * rx) - (fx * rz)) >> GLOBE_ROT_SHIFT; - uz = ((fx * ry) - (fy * rx)) >> GLOBE_ROT_SHIFT; - normalize_axis(&ux, &uy, &uz); - - view->globe_rotation[0] = rx; - view->globe_rotation[1] = ux; - view->globe_rotation[2] = fx; - view->globe_rotation[3] = ry; - view->globe_rotation[4] = uy; - view->globe_rotation[5] = fy; - view->globe_rotation[6] = rz; - view->globe_rotation[7] = uz; - view->globe_rotation[8] = fz; + if (!view) + return; + + int32_t rx = view->globe_rotation[0]; + int32_t ry = view->globe_rotation[3]; + int32_t rz = view->globe_rotation[6]; + int32_t ux = view->globe_rotation[1]; + int32_t uy = view->globe_rotation[4]; + int32_t uz = view->globe_rotation[7]; + normalize_axis(&rx, &ry, &rz); + normalize_axis(&ux, &uy, &uz); + + int32_t fx = ((ry * uz) - (rz * uy)) >> GLOBE_ROT_SHIFT; + int32_t fy = ((rz * ux) - (rx * uz)) >> GLOBE_ROT_SHIFT; + int32_t fz = ((rx * uy) - (ry * ux)) >> GLOBE_ROT_SHIFT; + normalize_axis(&fx, &fy, &fz); + + ux = ((fy * rz) - (fz * ry)) >> GLOBE_ROT_SHIFT; + uy = ((fz * rx) - (fx * rz)) >> GLOBE_ROT_SHIFT; + uz = ((fx * ry) - (fy * rx)) >> GLOBE_ROT_SHIFT; + normalize_axis(&ux, &uy, &uz); + + view->globe_rotation[0] = rx; + view->globe_rotation[1] = ux; + view->globe_rotation[2] = fx; + view->globe_rotation[3] = ry; + view->globe_rotation[4] = uy; + view->globe_rotation[5] = fy; + view->globe_rotation[6] = rz; + view->globe_rotation[7] = uz; + view->globe_rotation[8] = fz; } #endif -static void matrix_from_lat_lon(int32_t matrix[9], - int32_t latitude_e2, - int32_t longitude_e2) { - latitude_e2 = clamp_latitude_e2(latitude_e2); - longitude_e2 = normalize_longitude_e2(longitude_e2); - - int lat_angle = trigangle_from_degrees_e2(latitude_e2); - int lon_angle = trigangle_from_degrees_e2(longitude_e2); - int32_t sin_lat = trig_sin_q10(lat_angle); - int32_t cos_lat = trig_cos_q10(lat_angle); - int32_t sin_lon = trig_sin_q10(lon_angle); - int32_t cos_lon = trig_cos_q10(lon_angle); - - int32_t right_x = cos_lon; - int32_t right_y = 0; - int32_t right_z = -sin_lon; - int32_t forward_x = (int32_t)((int64_t)sin_lon * cos_lat >> GLOBE_ROT_SHIFT); - int32_t forward_y = sin_lat; - int32_t forward_z = (int32_t)((int64_t)cos_lon * cos_lat >> GLOBE_ROT_SHIFT); - int32_t up_x = (int32_t)(-((int64_t)sin_lat * sin_lon >> GLOBE_ROT_SHIFT)); - int32_t up_y = cos_lat; - int32_t up_z = (int32_t)(-((int64_t)sin_lat * cos_lon >> GLOBE_ROT_SHIFT)); - - matrix[0] = right_x; - matrix[1] = up_x; - matrix[2] = forward_x; - matrix[3] = right_y; - matrix[4] = up_y; - matrix[5] = forward_y; - matrix[6] = right_z; - matrix[7] = up_z; - matrix[8] = forward_z; -} - -static void set_color_orientation(GlobeView *view, - int32_t latitude_e2, - int32_t longitude_e2) { - if (!view) return; - - latitude_e2 = clamp_latitude_e2(latitude_e2); - longitude_e2 = normalize_longitude_e2(longitude_e2); - view->color_latitude_e2 = latitude_e2; - view->color_longitude_e2 = longitude_e2; - view->current_frame = bw_frame_for_longitude_e2((int16_t)longitude_e2); - sync_bw_elapsed_to_current_frame(view); - matrix_from_lat_lon(view->globe_rotation, latitude_e2, longitude_e2); +static void matrix_from_lat_lon(int32_t matrix[9], int32_t latitude_e2, int32_t longitude_e2) { + latitude_e2 = clamp_latitude_e2(latitude_e2); + longitude_e2 = normalize_longitude_e2(longitude_e2); + + int lat_angle = trigangle_from_degrees_e2(latitude_e2); + int lon_angle = trigangle_from_degrees_e2(longitude_e2); + int32_t sin_lat = trig_sin_q10(lat_angle); + int32_t cos_lat = trig_cos_q10(lat_angle); + int32_t sin_lon = trig_sin_q10(lon_angle); + int32_t cos_lon = trig_cos_q10(lon_angle); + + int32_t right_x = cos_lon; + int32_t right_y = 0; + int32_t right_z = -sin_lon; + int32_t forward_x = (int32_t)((int64_t)sin_lon * cos_lat >> GLOBE_ROT_SHIFT); + int32_t forward_y = sin_lat; + int32_t forward_z = (int32_t)((int64_t)cos_lon * cos_lat >> GLOBE_ROT_SHIFT); + int32_t up_x = (int32_t)(-((int64_t)sin_lat * sin_lon >> GLOBE_ROT_SHIFT)); + int32_t up_y = cos_lat; + int32_t up_z = (int32_t)(-((int64_t)sin_lat * cos_lon >> GLOBE_ROT_SHIFT)); + + matrix[0] = right_x; + matrix[1] = up_x; + matrix[2] = forward_x; + matrix[3] = right_y; + matrix[4] = up_y; + matrix[5] = forward_y; + matrix[6] = right_z; + matrix[7] = up_z; + matrix[8] = forward_z; +} + +static void set_color_orientation(GlobeView *view, int32_t latitude_e2, int32_t longitude_e2) { + if (!view) + return; + + latitude_e2 = clamp_latitude_e2(latitude_e2); + longitude_e2 = normalize_longitude_e2(longitude_e2); + view->color_latitude_e2 = latitude_e2; + view->color_longitude_e2 = longitude_e2; + view->current_frame = bw_frame_for_longitude_e2((int16_t)longitude_e2); + sync_bw_elapsed_to_current_frame(view); + matrix_from_lat_lon(view->globe_rotation, latitude_e2, longitude_e2); #ifdef CONFIG_TOUCH - // 64-bit product: pm(lon) * width * 256 overflows int32 for most - // western longitudes (pm >= 20972), which used to scatter the starfield. - view->starfield_offset_x_q8 = - (int32_t)(((int64_t)positive_modulo(longitude_e2, 36000) * - GLOBE_STARFIELD_WIDTH * GLOBE_Q8_ONE) / 36000); - view->starfield_offset_y_q8 = - (latitude_e2 * GLOBE_STARFIELD_HEIGHT * GLOBE_Q8_ONE) / 36000; + // 64-bit product: pm(lon) * width * 256 overflows int32 for most + // western longitudes (pm >= 20972), which used to scatter the starfield. + view->starfield_offset_x_q8 = (int32_t)(((int64_t)positive_modulo(longitude_e2, 36000) * + GLOBE_STARFIELD_WIDTH * GLOBE_Q8_ONE) / + 36000); + view->starfield_offset_y_q8 = (latitude_e2 * GLOBE_STARFIELD_HEIGHT * GLOBE_Q8_ONE) / 36000; #endif } @@ -962,768 +955,756 @@ static void set_color_orientation(GlobeView *view, // pressure must degrade to "no globe", never reboot the watch. // Returns NULL on any failure; *out_size gets the inflated size. static void *prv_load_inflated(uint32_t res_id, uint32_t *out_size) { - ResHandle handle = resource_get_handle(res_id); - size_t csize = resource_size(handle); - if (csize <= sizeof(uint32_t)) return NULL; - uint8_t *cbuf = malloc_try(csize); - if (!cbuf) return NULL; - void *out = NULL; - uint32_t inflated_size = 0; - if (resource_load(handle, cbuf, csize) == csize) { - memcpy(&inflated_size, cbuf, sizeof(inflated_size)); // LE prefix - out = malloc_try(inflated_size); - if (out) { - unsigned int dlen = inflated_size; - if (tinflate_uncompress(out, &dlen, cbuf + sizeof(uint32_t), - (unsigned int)(csize - sizeof(uint32_t))) != TINF_OK || - dlen != inflated_size) { - free(out); - out = NULL; - } - } + ResHandle handle = resource_get_handle(res_id); + size_t csize = resource_size(handle); + if (csize <= sizeof(uint32_t)) + return NULL; + uint8_t *cbuf = malloc_try(csize); + if (!cbuf) + return NULL; + void *out = NULL; + uint32_t inflated_size = 0; + if (resource_load(handle, cbuf, csize) == csize) { + memcpy(&inflated_size, cbuf, sizeof(inflated_size)); // LE prefix + out = malloc_try(inflated_size); + if (out) { + unsigned int dlen = inflated_size; + if (tinflate_uncompress(out, &dlen, cbuf + sizeof(uint32_t), + (unsigned int)(csize - sizeof(uint32_t))) != TINF_OK || + dlen != inflated_size) { + free(out); + out = NULL; + } } - free(cbuf); - if (out && out_size) *out_size = inflated_size; - return out; + } + free(cbuf); + if (out && out_size) + *out_size = inflated_size; + return out; } static bool load_cubemap_resource(GlobeView *view) { - if (!view) return false; - if (view->cubemap_data && view->cubemap_size >= GLOBE_CUBEMAP_DATA_SIZE) { - return true; - } + if (!view) + return false; + if (view->cubemap_data && view->cubemap_size >= GLOBE_CUBEMAP_DATA_SIZE) { + return true; + } - uint32_t size = 0; - uint8_t *data = prv_load_inflated(RESOURCE_ID_GLOBE_CUBEMAP, &size); - if (!data) return false; - if (size < GLOBE_CUBEMAP_DATA_SIZE) { - applib_free(data); - return false; - } + uint32_t size = 0; + uint8_t *data = prv_load_inflated(RESOURCE_ID_GLOBE_CUBEMAP, &size); + if (!data) + return false; + if (size < GLOBE_CUBEMAP_DATA_SIZE) { + applib_free(data); + return false; + } - if (view->cubemap_data) { - free(view->cubemap_data); - } - view->cubemap_data = data; - view->cubemap_size = size; - return true; + if (view->cubemap_data) { + free(view->cubemap_data); + } + view->cubemap_data = data; + view->cubemap_size = size; + return true; } static void unload_cubemap_resource(GlobeView *view) { - if (!view || !view->cubemap_data) return; + if (!view || !view->cubemap_data) + return; - free(view->cubemap_data); - view->cubemap_data = NULL; - view->cubemap_size = 0; + free(view->cubemap_data); + view->cubemap_data = NULL; + view->cubemap_size = 0; } static bool load_starfield_resource(GlobeView *view) { - if (!view) return false; - if (view->starfield_data && view->starfield_size > 2) return true; - - uint32_t size = 0; - uint8_t *data = prv_load_inflated(RESOURCE_ID_GLOBE_STARFIELD, &size); - if (!data) return false; - if (size <= 2) { - applib_free(data); - return false; - } - - if (view->starfield_data) free(view->starfield_data); - view->starfield_data = data; - view->starfield_size = size; + if (!view) + return false; + if (view->starfield_data && view->starfield_size > 2) return true; + + uint32_t size = 0; + uint8_t *data = prv_load_inflated(RESOURCE_ID_GLOBE_STARFIELD, &size); + if (!data) + return false; + if (size <= 2) { + applib_free(data); + return false; + } + + if (view->starfield_data) + free(view->starfield_data); + view->starfield_data = data; + view->starfield_size = size; + return true; } static void unload_starfield_resource(GlobeView *view) { - if (!view || !view->starfield_data) return; + if (!view || !view->starfield_data) + return; - free(view->starfield_data); - view->starfield_data = NULL; - view->starfield_size = 0; + free(view->starfield_data); + view->starfield_data = NULL; + view->starfield_size = 0; } static void ensure_visual_resources(GlobeView *view) { - if (!view) return; - - if (!view->bw_sequence) { - // Stored payload-deflated: inflate into an applib_malloc buffer and - // validate with the exact gate create_with_resource uses. Ownership - // passes to the sequence — gdraw_command_sequence_destroy applib_free()s - // heap pointers (applib_resource_munmap_or_free address-range check). - uint32_t seq_size = 0; - GDrawCommandSequence *seq = - prv_load_inflated(RESOURCE_ID_GLOBE_BW_SEQUENCE, &seq_size); - if (seq && !gdraw_command_sequence_validate(seq, seq_size)) { - applib_free(seq); - seq = NULL; - } - view->bw_sequence = seq; - if (view->bw_sequence) { - view->bw_frame_count = - gdraw_command_sequence_get_num_frames(view->bw_sequence); - view->bw_sequence_duration_ms = - gdraw_command_sequence_get_total_duration(view->bw_sequence); - if (view->bw_frame_count == 0) { - view->bw_frame_count = NUM_BW_FRAMES; - } - if (view->bw_sequence_duration_ms == 0) { - view->bw_sequence_duration_ms = - view->bw_frame_count * GLOBE_FRAME_INTERVAL_MS; - } - } + if (!view) + return; + + if (!view->bw_sequence) { + // Stored payload-deflated: inflate into an applib_malloc buffer and + // validate with the exact gate create_with_resource uses. Ownership + // passes to the sequence — gdraw_command_sequence_destroy applib_free()s + // heap pointers (applib_resource_munmap_or_free address-range check). + uint32_t seq_size = 0; + GDrawCommandSequence *seq = prv_load_inflated(RESOURCE_ID_GLOBE_BW_SEQUENCE, &seq_size); + if (seq && !gdraw_command_sequence_validate(seq, seq_size)) { + applib_free(seq); + seq = NULL; + } + view->bw_sequence = seq; + if (view->bw_sequence) { + view->bw_frame_count = gdraw_command_sequence_get_num_frames(view->bw_sequence); + view->bw_sequence_duration_ms = gdraw_command_sequence_get_total_duration(view->bw_sequence); + if (view->bw_frame_count == 0) { + view->bw_frame_count = NUM_BW_FRAMES; + } + if (view->bw_sequence_duration_ms == 0) { + view->bw_sequence_duration_ms = view->bw_frame_count * GLOBE_FRAME_INTERVAL_MS; + } } + } - if (!view->cradle_pdc) { - view->cradle_pdc = gdraw_command_image_create_with_resource( - RESOURCE_ID_GLOBE_CRADLE_PDC); - } + if (!view->cradle_pdc) { + view->cradle_pdc = gdraw_command_image_create_with_resource(RESOURCE_ID_GLOBE_CRADLE_PDC); + } #if GLOBE_SMALL_RECT - // Scale the writable clones once, right after load. (Both live in RAM — - // scaling an mmap'd resource would write read-only flash.) - if (view->bw_sequence && !view->bw_sequence_scaled) { - const GSize from = gdraw_command_sequence_get_bounds_size(view->bw_sequence); - if (from.w > 0 && from.h > 0) { - const GSize to = GSize((int16_t)(from.w * GLOBE_CRADLE_SCALE_PCT / 100), - (int16_t)(from.h * GLOBE_CRADLE_SCALE_PCT / 100)); - const uint32_t frames = gdraw_command_sequence_get_num_frames(view->bw_sequence); - for (uint32_t i = 0; i < frames; i++) { - GDrawCommandFrame *frame = - gdraw_command_sequence_get_frame_by_index(view->bw_sequence, i); - if (frame) { - gdraw_command_list_scale(gdraw_command_frame_get_command_list(frame), - from, to); - } - } - gdraw_command_sequence_set_bounds_size(view->bw_sequence, to); - } - view->bw_sequence_scaled = true; - } - if (view->cradle_pdc && !view->cradle_pdc_scaled) { - const GSize from = gdraw_command_image_get_bounds_size(view->cradle_pdc); - if (from.w > 0 && from.h > 0) { - gdraw_command_image_scale(view->cradle_pdc, - GSize((int16_t)(from.w * GLOBE_CRADLE_SCALE_PCT / 100), - (int16_t)(from.h * GLOBE_CRADLE_SCALE_PCT / 100))); + // Scale the writable clones once, right after load. (Both live in RAM — + // scaling an mmap'd resource would write read-only flash.) + if (view->bw_sequence && !view->bw_sequence_scaled) { + const GSize from = gdraw_command_sequence_get_bounds_size(view->bw_sequence); + if (from.w > 0 && from.h > 0) { + const GSize to = GSize((int16_t)(from.w * GLOBE_CRADLE_SCALE_PCT / 100), + (int16_t)(from.h * GLOBE_CRADLE_SCALE_PCT / 100)); + const uint32_t frames = gdraw_command_sequence_get_num_frames(view->bw_sequence); + for (uint32_t i = 0; i < frames; i++) { + GDrawCommandFrame *frame = gdraw_command_sequence_get_frame_by_index(view->bw_sequence, i); + if (frame) { + gdraw_command_list_scale(gdraw_command_frame_get_command_list(frame), from, to); } - view->cradle_pdc_scaled = true; + } + gdraw_command_sequence_set_bounds_size(view->bw_sequence, to); } + view->bw_sequence_scaled = true; + } + if (view->cradle_pdc && !view->cradle_pdc_scaled) { + const GSize from = gdraw_command_image_get_bounds_size(view->cradle_pdc); + if (from.w > 0 && from.h > 0) { + gdraw_command_image_scale(view->cradle_pdc, + GSize((int16_t)(from.w * GLOBE_CRADLE_SCALE_PCT / 100), + (int16_t)(from.h * GLOBE_CRADLE_SCALE_PCT / 100))); + } + view->cradle_pdc_scaled = true; + } #endif - load_cubemap_resource(view); - load_starfield_resource(view); + load_cubemap_resource(view); + load_starfield_resource(view); } static void release_visual_resources(GlobeView *view) { - if (!view) return; - - unload_cubemap_resource(view); - unload_starfield_resource(view); - if (view->bw_sequence) { - gdraw_command_sequence_destroy(view->bw_sequence); - view->bw_sequence = NULL; - } - if (view->cradle_pdc) { - gdraw_command_image_destroy(view->cradle_pdc); - view->cradle_pdc = NULL; - } + if (!view) + return; + + unload_cubemap_resource(view); + unload_starfield_resource(view); + if (view->bw_sequence) { + gdraw_command_sequence_destroy(view->bw_sequence); + view->bw_sequence = NULL; + } + if (view->cradle_pdc) { + gdraw_command_image_destroy(view->cradle_pdc); + view->cradle_pdc = NULL; + } } // Returns the packed cubemap PALETTE INDEX (0..11); the caller picks the // final color through GLOBE_SHADE_PALETTE using its lighting band. -static inline uint8_t cubemap_sample(const uint8_t *cubemap_data, - int32_t x, int32_t y, int32_t z) { - int32_t ax = x < 0 ? -x : x; - int32_t ay = y < 0 ? -y : y; - int32_t az = z < 0 ? -z : z; - int face; - int32_t major; - int32_t uc; - int32_t vc; - - // C division truncates toward zero, so folding the sign into the - // numerator gives the same result as negating the quotient — one shared - // division pair replaces the per-face copies. - if (ax >= ay && ax >= az) { - major = ax; - face = x >= 0 ? 0 : 1; - uc = x >= 0 ? -z : z; - vc = -y; - } else if (ay >= ax && ay >= az) { - major = ay; - face = y >= 0 ? 2 : 3; - uc = x; - vc = y >= 0 ? z : -z; - } else { - major = az; - face = z >= 0 ? 4 : 5; - uc = z >= 0 ? x : -x; - vc = -y; - } +static inline uint8_t cubemap_sample(const uint8_t *cubemap_data, int32_t x, int32_t y, int32_t z) { + int32_t ax = x < 0 ? -x : x; + int32_t ay = y < 0 ? -y : y; + int32_t az = z < 0 ? -z : z; + int face; + int32_t major; + int32_t uc; + int32_t vc; + + // C division truncates toward zero, so folding the sign into the + // numerator gives the same result as negating the quotient — one shared + // division pair replaces the per-face copies. + if (ax >= ay && ax >= az) { + major = ax; + face = x >= 0 ? 0 : 1; + uc = x >= 0 ? -z : z; + vc = -y; + } else if (ay >= ax && ay >= az) { + major = ay; + face = y >= 0 ? 2 : 3; + uc = x; + vc = y >= 0 ? z : -z; + } else { + major = az; + face = z >= 0 ? 4 : 5; + uc = z >= 0 ? x : -x; + vc = -y; + } - int32_t u = uc * GLOBE_ROT_SCALE / major; - int32_t v = vc * GLOBE_ROT_SCALE / major; - - int sx = ((u + GLOBE_ROT_SCALE) * GLOBE_CUBEMAP_FACE_SIZE) / - (GLOBE_ROT_SCALE * 2); - int sy = ((v + GLOBE_ROT_SCALE) * GLOBE_CUBEMAP_FACE_SIZE) / - (GLOBE_ROT_SCALE * 2); - if (sx < 0) sx = 0; - if (sy < 0) sy = 0; - if (sx >= GLOBE_CUBEMAP_FACE_SIZE) sx = GLOBE_CUBEMAP_FACE_SIZE - 1; - if (sy >= GLOBE_CUBEMAP_FACE_SIZE) sy = GLOBE_CUBEMAP_FACE_SIZE - 1; - - int face_area = GLOBE_CUBEMAP_FACE_SIZE * GLOBE_CUBEMAP_FACE_SIZE; - int pixel_index = (face * face_area) + (sy * GLOBE_CUBEMAP_FACE_SIZE) + sx; - uint8_t packed = cubemap_data[pixel_index >> 1]; - uint8_t palette_index = (pixel_index & 1) ? (packed & 0x0F) : (packed >> 4); - if (palette_index >= GLOBE_CUBEMAP_PALETTE_SIZE) { - return 1; // BlueMoon slot — same fallback color as before - } - return palette_index; + int32_t u = uc * GLOBE_ROT_SCALE / major; + int32_t v = vc * GLOBE_ROT_SCALE / major; + + int sx = ((u + GLOBE_ROT_SCALE) * GLOBE_CUBEMAP_FACE_SIZE) / (GLOBE_ROT_SCALE * 2); + int sy = ((v + GLOBE_ROT_SCALE) * GLOBE_CUBEMAP_FACE_SIZE) / (GLOBE_ROT_SCALE * 2); + if (sx < 0) + sx = 0; + if (sy < 0) + sy = 0; + if (sx >= GLOBE_CUBEMAP_FACE_SIZE) + sx = GLOBE_CUBEMAP_FACE_SIZE - 1; + if (sy >= GLOBE_CUBEMAP_FACE_SIZE) + sy = GLOBE_CUBEMAP_FACE_SIZE - 1; + + int face_area = GLOBE_CUBEMAP_FACE_SIZE * GLOBE_CUBEMAP_FACE_SIZE; + int pixel_index = (face * face_area) + (sy * GLOBE_CUBEMAP_FACE_SIZE) + sx; + uint8_t packed = cubemap_data[pixel_index >> 1]; + uint8_t palette_index = (pixel_index & 1) ? (packed & 0x0F) : (packed >> 4); + if (palette_index >= GLOBE_CUBEMAP_PALETTE_SIZE) { + return 1; // BlueMoon slot — same fallback color as before + } + return palette_index; } static uint8_t starfield_color_from_flags(uint8_t flags) { - switch (flags & 0x03) { - case 3: return GColorWhiteARGB8; - case 2: return GColorCelesteARGB8; - default: return GColorLightGrayARGB8; - } + switch (flags & 0x03) { + case 3: + return GColorWhiteARGB8; + case 2: + return GColorCelesteARGB8; + default: + return GColorLightGrayARGB8; + } } -static void draw_forward_space_fade(GContext *ctx, GRect bounds, int amount, - GlobeView *view) { - if (amount <= 0) return; - - const int full_at = - (ANIMATION_NORMALIZED_MAX * GLOBE_SPACE_FADE_FULL_PERCENT) / 100; - const int stars_at = - (ANIMATION_NORMALIZED_MAX * GLOBE_SPACE_STAR_REVEAL_START_PERCENT) / 100; - - if (amount >= full_at) { - graphics_context_set_fill_color(ctx, GColorBlack); - graphics_fill_rect(ctx, bounds, 0, GCornerNone); - if (amount >= stars_at) { - GBitmap *fb = graphics_capture_frame_buffer(ctx); - if (fb) { - framebuffer_draw_starfield(fb, view, bounds, - clip_rect_to_bounds(bounds, gbitmap_get_bounds(fb))); - graphics_release_frame_buffer(ctx, fb); - } - } - return; - } +static void draw_forward_space_fade(GContext *ctx, GRect bounds, int amount, GlobeView *view) { + if (amount <= 0) + return; - int relative = weather_scale_i32(amount, ANIMATION_NORMALIZED_MAX, full_at); - int inv = ANIMATION_NORMALIZED_MAX - relative; - int eased = ANIMATION_NORMALIZED_MAX - - weather_norm_square(inv); - int coverage = - (eased * 16 + (ANIMATION_NORMALIZED_MAX - 1)) / - ANIMATION_NORMALIZED_MAX; - if (coverage <= 0) return; - if (coverage >= 16) { - graphics_context_set_fill_color(ctx, GColorBlack); - graphics_fill_rect(ctx, bounds, 0, GCornerNone); - return; - } + const int full_at = (ANIMATION_NORMALIZED_MAX * GLOBE_SPACE_FADE_FULL_PERCENT) / 100; + const int stars_at = (ANIMATION_NORMALIZED_MAX * GLOBE_SPACE_STAR_REVEAL_START_PERCENT) / 100; - GBitmap *fb = graphics_capture_frame_buffer(ctx); - if (!fb) return; + if (amount >= full_at) { + graphics_context_set_fill_color(ctx, GColorBlack); + graphics_fill_rect(ctx, bounds, 0, GCornerNone); + if (amount >= stars_at) { + GBitmap *fb = graphics_capture_frame_buffer(ctx); + if (fb) { + framebuffer_draw_starfield(fb, view, bounds, + clip_rect_to_bounds(bounds, gbitmap_get_bounds(fb))); + graphics_release_frame_buffer(ctx, fb); + } + } + return; + } - GRect fbb = gbitmap_get_bounds(fb); - GRect clipped = clip_rect_to_bounds(bounds, fbb); - int left = clipped.origin.x; - int right = clipped.origin.x + clipped.size.w - 1; - int bottom = clipped.origin.y + clipped.size.h; + int relative = weather_scale_i32(amount, ANIMATION_NORMALIZED_MAX, full_at); + int inv = ANIMATION_NORMALIZED_MAX - relative; + int eased = ANIMATION_NORMALIZED_MAX - weather_norm_square(inv); + int coverage = (eased * 16 + (ANIMATION_NORMALIZED_MAX - 1)) / ANIMATION_NORMALIZED_MAX; + if (coverage <= 0) + return; + if (coverage >= 16) { + graphics_context_set_fill_color(ctx, GColorBlack); + graphics_fill_rect(ctx, bounds, 0, GCornerNone); + return; + } - for (int ay = clipped.origin.y; ay < bottom; ay++) { - GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); - int row_left = left < (int)ri.min_x ? (int)ri.min_x : left; - int row_right = right > (int)ri.max_x ? (int)ri.max_x : right; - for (int ax = row_left; ax <= row_right; ax++) { - if (GLOBE_SPACE_FADE_DITHER[ay % GLOBE_SPACE_FADE_DITHER_SIZE] - [ax % GLOBE_SPACE_FADE_DITHER_SIZE] < - coverage) { - weather_fb_row_set(ri.data, ax, GColorBlackARGB8); - } - } + GBitmap *fb = graphics_capture_frame_buffer(ctx); + if (!fb) + return; + + GRect fbb = gbitmap_get_bounds(fb); + GRect clipped = clip_rect_to_bounds(bounds, fbb); + int left = clipped.origin.x; + int right = clipped.origin.x + clipped.size.w - 1; + int bottom = clipped.origin.y + clipped.size.h; + + for (int ay = clipped.origin.y; ay < bottom; ay++) { + GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); + int row_left = left < (int)ri.min_x ? (int)ri.min_x : left; + int row_right = right > (int)ri.max_x ? (int)ri.max_x : right; + for (int ax = row_left; ax <= row_right; ax++) { + if (GLOBE_SPACE_FADE_DITHER[ay % GLOBE_SPACE_FADE_DITHER_SIZE] + [ax % GLOBE_SPACE_FADE_DITHER_SIZE] < coverage) { + weather_fb_row_set(ri.data, ax, GColorBlackARGB8); + } } + } - if (amount >= stars_at) { - framebuffer_draw_starfield(fb, view, bounds, clipped); - } - graphics_release_frame_buffer(ctx, fb); + if (amount >= stars_at) { + framebuffer_draw_starfield(fb, view, bounds, clipped); + } + graphics_release_frame_buffer(ctx, fb); } static int revealed_globe_radius(void) { - return ((GLOBE_RENDER_BASE_DIAMETER * GLOBE_COLOR_FINAL_SCALE_PERCENT) / - 100) / 2; + return ((GLOBE_RENDER_BASE_DIAMETER * GLOBE_COLOR_FINAL_SCALE_PERCENT) / 100) / 2; } __attribute__((noinline)) static GPoint revealed_globe_center_for_bounds(GRect bounds, int offset) { - return GPoint(bounds.origin.x + (bounds.size.w / 2), - bounds.origin.y + (bounds.size.h / 2) + - GLOBE_REVEALED_CENTER_Y_OFFSET + offset); + return GPoint(bounds.origin.x + (bounds.size.w / 2), + bounds.origin.y + (bounds.size.h / 2) + GLOBE_REVEALED_CENTER_Y_OFFSET + offset); } static GRect clip_rect_to_bounds(GRect rect, GRect bounds) { - int left = rect.origin.x; - int top = rect.origin.y; - int right = rect.origin.x + rect.size.w; - int bottom = rect.origin.y + rect.size.h; - int bounds_right = bounds.origin.x + bounds.size.w; - int bounds_bottom = bounds.origin.y + bounds.size.h; - - if (left < bounds.origin.x) left = bounds.origin.x; - if (top < bounds.origin.y) top = bounds.origin.y; - if (right > bounds_right) right = bounds_right; - if (bottom > bounds_bottom) bottom = bounds_bottom; - if (right <= left || bottom <= top) return GRectZero; - - return GRect(left, top, right - left, bottom - top); + int left = rect.origin.x; + int top = rect.origin.y; + int right = rect.origin.x + rect.size.w; + int bottom = rect.origin.y + rect.size.h; + int bounds_right = bounds.origin.x + bounds.size.w; + int bounds_bottom = bounds.origin.y + bounds.size.h; + + if (left < bounds.origin.x) + left = bounds.origin.x; + if (top < bounds.origin.y) + top = bounds.origin.y; + if (right > bounds_right) + right = bounds_right; + if (bottom > bounds_bottom) + bottom = bounds_bottom; + if (right <= left || bottom <= top) + return GRectZero; + + return GRect(left, top, right - left, bottom - top); } static GRect revealed_globe_layer_frame(GRect bounds) { - int extent = revealed_globe_radius() + GLOBE_ATMOSPHERE_GLOW_PX + - GLOBE_CITY_BOUNCE_PX + GLOBE_ATMOSPHERE_LAYER_MARGIN_PX; - GPoint center = revealed_globe_center_for_bounds(bounds, 0); - return clip_rect_to_bounds( - GRect(center.x - extent, center.y - extent, - (extent * 2) + 1, (extent * 2) + 1), - bounds); + int extent = revealed_globe_radius() + GLOBE_ATMOSPHERE_GLOW_PX + GLOBE_CITY_BOUNCE_PX + + GLOBE_ATMOSPHERE_LAYER_MARGIN_PX; + GPoint center = revealed_globe_center_for_bounds(bounds, 0); + return clip_rect_to_bounds( + GRect(center.x - extent, center.y - extent, (extent * 2) + 1, (extent * 2) + 1), bounds); } static void clear_framebuffer_rect(GBitmap *fb, GRect rect) { - if (!fb || rect.size.w <= 0 || rect.size.h <= 0) return; - - GRect fbb = gbitmap_get_bounds(fb); - GRect clipped = clip_rect_to_bounds(rect, fbb); - int left = clipped.origin.x; - int right = clipped.origin.x + clipped.size.w - 1; - int bottom = clipped.origin.y + clipped.size.h; - - for (int ay = clipped.origin.y; ay < bottom; ay++) { - GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); - int row_left = left < (int)ri.min_x ? (int)ri.min_x : left; - int row_right = right > (int)ri.max_x ? (int)ri.max_x : right; - if (row_right >= row_left) { + if (!fb || rect.size.w <= 0 || rect.size.h <= 0) + return; + + GRect fbb = gbitmap_get_bounds(fb); + GRect clipped = clip_rect_to_bounds(rect, fbb); + int left = clipped.origin.x; + int right = clipped.origin.x + clipped.size.w - 1; + int bottom = clipped.origin.y + clipped.size.h; + + for (int ay = clipped.origin.y; ay < bottom; ay++) { + GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); + int row_left = left < (int)ri.min_x ? (int)ri.min_x : left; + int row_right = right > (int)ri.max_x ? (int)ri.max_x : right; + if (row_right >= row_left) { #if PBL_BW - for (int ax = row_left; ax <= row_right; ax++) { - weather_fb_row_set(ri.data, ax, GColorBlackARGB8); - } + for (int ax = row_left; ax <= row_right; ax++) { + weather_fb_row_set(ri.data, ax, GColorBlackARGB8); + } #else - memset(&ri.data[row_left], GColorBlackARGB8, - (size_t)(row_right - row_left + 1)); + memset(&ri.data[row_left], GColorBlackARGB8, (size_t)(row_right - row_left + 1)); #endif - } } + } } -static void framebuffer_draw_starfield(GBitmap *fb, GlobeView *view, - GRect bounds, GRect clip_rect) { - if (!fb || !view || !view->starfield_data || view->starfield_size <= 2 || - bounds.size.w <= 0 || bounds.size.h <= 0) { - return; - } +static void framebuffer_draw_starfield(GBitmap *fb, GlobeView *view, GRect bounds, + GRect clip_rect) { + if (!fb || !view || !view->starfield_data || view->starfield_size <= 2 || bounds.size.w <= 0 || + bounds.size.h <= 0) { + return; + } - uint16_t count = view->starfield_data[0] | - ((uint16_t)view->starfield_data[1] << 8); - size_t available = (view->starfield_size - 2) / 3; - if (count > available) count = (uint16_t)available; + uint16_t count = view->starfield_data[0] | ((uint16_t)view->starfield_data[1] << 8); + size_t available = (view->starfield_size - 2) / 3; + if (count > available) + count = (uint16_t)available; #ifdef CONFIG_TOUCH - int offset_x = positive_modulo( - (int)(view->starfield_offset_x_q8 / GLOBE_Q8_ONE), - GLOBE_STARFIELD_WIDTH); - int offset_y = positive_modulo( - (int)(view->starfield_offset_y_q8 / GLOBE_Q8_ONE), - GLOBE_STARFIELD_HEIGHT); + int offset_x = + positive_modulo((int)(view->starfield_offset_x_q8 / GLOBE_Q8_ONE), GLOBE_STARFIELD_WIDTH); + int offset_y = + positive_modulo((int)(view->starfield_offset_y_q8 / GLOBE_Q8_ONE), GLOBE_STARFIELD_HEIGHT); #else - // No touch pan/coast on this platform, so the starfield never scrolls. - int offset_x = 0; - int offset_y = 0; + // No touch pan/coast on this platform, so the starfield never scrolls. + int offset_x = 0; + int offset_y = 0; #endif - int clip_left = clip_rect.origin.x; - int clip_top = clip_rect.origin.y; - int clip_right = clip_rect.origin.x + clip_rect.size.w - 1; - int clip_bottom = clip_rect.origin.y + clip_rect.size.h - 1; - const uint8_t *records = view->starfield_data + 2; - - for (uint16_t i = 0; i < count; i++) { - uint8_t flags = records[(i * 3) + 2]; - int source_x = records[i * 3] + ((flags & 0x80) ? 256 : 0); - int source_y = records[(i * 3) + 1]; - // Parallax: bright (near) stars sweep at 2x, the rest at 1x. The - // factor must be an INTEGER: the offset derives from a longitude - // that wraps by exactly one field width per revolution, and only - // whole multiples of the width vanish under the modulo — a - // fractional factor would make stars jump when a spin crosses - // longitude zero. - int mult = ((flags & 0x03) == 3) ? 2 : 1; - int first_x = positive_modulo(source_x - (offset_x * mult), - GLOBE_STARFIELD_WIDTH); - int first_y = positive_modulo(source_y - (offset_y * mult), - GLOBE_STARFIELD_HEIGHT); - for (int local_y = first_y; local_y < bounds.size.h; - local_y += GLOBE_STARFIELD_HEIGHT) { - for (int local_x = first_x; local_x < bounds.size.w; - local_x += GLOBE_STARFIELD_WIDTH) { - int ax = bounds.origin.x + local_x; - int ay = bounds.origin.y + local_y; - if (ay < clip_top || ay > clip_bottom || - ax < clip_left || ax > clip_right) { - continue; - } - - GBitmapDataRowInfo ri = - gbitmap_get_data_row_info(fb, (uint16_t)ay); - if (ax < (int)ri.min_x || ax > (int)ri.max_x) continue; - weather_fb_row_set(ri.data, ax, starfield_color_from_flags(flags)); - } + int clip_left = clip_rect.origin.x; + int clip_top = clip_rect.origin.y; + int clip_right = clip_rect.origin.x + clip_rect.size.w - 1; + int clip_bottom = clip_rect.origin.y + clip_rect.size.h - 1; + const uint8_t *records = view->starfield_data + 2; + + for (uint16_t i = 0; i < count; i++) { + uint8_t flags = records[(i * 3) + 2]; + int source_x = records[i * 3] + ((flags & 0x80) ? 256 : 0); + int source_y = records[(i * 3) + 1]; + // Parallax: bright (near) stars sweep at 2x, the rest at 1x. The + // factor must be an INTEGER: the offset derives from a longitude + // that wraps by exactly one field width per revolution, and only + // whole multiples of the width vanish under the modulo — a + // fractional factor would make stars jump when a spin crosses + // longitude zero. + int mult = ((flags & 0x03) == 3) ? 2 : 1; + int first_x = positive_modulo(source_x - (offset_x * mult), GLOBE_STARFIELD_WIDTH); + int first_y = positive_modulo(source_y - (offset_y * mult), GLOBE_STARFIELD_HEIGHT); + for (int local_y = first_y; local_y < bounds.size.h; local_y += GLOBE_STARFIELD_HEIGHT) { + for (int local_x = first_x; local_x < bounds.size.w; local_x += GLOBE_STARFIELD_WIDTH) { + int ax = bounds.origin.x + local_x; + int ay = bounds.origin.y + local_y; + if (ay < clip_top || ay > clip_bottom || ax < clip_left || ax > clip_right) { + continue; } + + GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); + if (ax < (int)ri.min_x || ax > (int)ri.max_x) + continue; + weather_fb_row_set(ri.data, ax, starfield_color_from_flags(flags)); + } } + } } static void draw_space_background(GContext *ctx, GRect bounds, GlobeView *view) { - graphics_context_set_fill_color(ctx, GColorBlack); - graphics_fill_rect(ctx, bounds, 0, GCornerNone); + graphics_context_set_fill_color(ctx, GColorBlack); + graphics_fill_rect(ctx, bounds, 0, GCornerNone); - if (!view || !view->starfield_data) return; + if (!view || !view->starfield_data) + return; - GBitmap *fb = graphics_capture_frame_buffer(ctx); - if (!fb) return; - framebuffer_draw_starfield(fb, view, bounds, - clip_rect_to_bounds(bounds, gbitmap_get_bounds(fb))); - graphics_release_frame_buffer(ctx, fb); + GBitmap *fb = graphics_capture_frame_buffer(ctx); + if (!fb) + return; + framebuffer_draw_starfield(fb, view, bounds, clip_rect_to_bounds(bounds, gbitmap_get_bounds(fb))); + graphics_release_frame_buffer(ctx, fb); } // A filled circle IS a ring with inner radius 0 (d2 >= 0 is always true) — // one rasterizer serves both (size pass). NOINLINE on the ring keeps // the sharing real; inlined, it would clone into every caller. -static void framebuffer_draw_ring(GBitmap *fb, GPoint center, int outer_r, - int inner_r, uint8_t color, GRect clip_rect); +static void framebuffer_draw_ring(GBitmap *fb, GPoint center, int outer_r, int inner_r, + uint8_t color, GRect clip_rect); -static void framebuffer_fill_circle(GBitmap *fb, GPoint center, int radius, - uint8_t color, GRect clip_rect) { - framebuffer_draw_ring(fb, center, radius, 0, color, clip_rect); +static void framebuffer_fill_circle(GBitmap *fb, GPoint center, int radius, uint8_t color, + GRect clip_rect) { + framebuffer_draw_ring(fb, center, radius, 0, color, clip_rect); } // Ring (annulus) rasterizer for the lock pulse — framebuffer_fill_circle's // bbox scan with an inner-radius reject. -static NOINLINE void framebuffer_draw_ring(GBitmap *fb, GPoint center, int outer_r, - int inner_r, uint8_t color, GRect clip_rect) { - if (!fb || outer_r <= 0) return; - if (inner_r < 0) inner_r = 0; - - GRect fbb = gbitmap_get_bounds(fb); - GRect clipped = clip_rect_to_bounds(clip_rect, fbb); - int outer_sq = outer_r * outer_r; - int inner_sq = inner_r * inner_r; - int clip_left = clipped.origin.x; - int clip_top = clipped.origin.y; - int clip_right = clipped.origin.x + clipped.size.w - 1; - int clip_bottom = clipped.origin.y + clipped.size.h - 1; - - for (int ay = center.y - outer_r; ay <= center.y + outer_r; ay++) { - if (ay < clip_top || ay > clip_bottom) continue; - int dy = ay - center.y; - GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); - for (int ax = center.x - outer_r; ax <= center.x + outer_r; ax++) { - if (ax < clip_left || ax > clip_right || - ax < (int)ri.min_x || ax > (int)ri.max_x) { - continue; - } - int dx = ax - center.x; - int d2 = (dx * dx) + (dy * dy); - if (d2 <= outer_sq && d2 >= inner_sq) { - weather_fb_row_set(ri.data, ax, color); - } - } +static NOINLINE void framebuffer_draw_ring(GBitmap *fb, GPoint center, int outer_r, int inner_r, + uint8_t color, GRect clip_rect) { + if (!fb || outer_r <= 0) + return; + if (inner_r < 0) + inner_r = 0; + + GRect fbb = gbitmap_get_bounds(fb); + GRect clipped = clip_rect_to_bounds(clip_rect, fbb); + int outer_sq = outer_r * outer_r; + int inner_sq = inner_r * inner_r; + int clip_left = clipped.origin.x; + int clip_top = clipped.origin.y; + int clip_right = clipped.origin.x + clipped.size.w - 1; + int clip_bottom = clipped.origin.y + clipped.size.h - 1; + + for (int ay = center.y - outer_r; ay <= center.y + outer_r; ay++) { + if (ay < clip_top || ay > clip_bottom) + continue; + int dy = ay - center.y; + GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); + for (int ax = center.x - outer_r; ax <= center.x + outer_r; ax++) { + if (ax < clip_left || ax > clip_right || ax < (int)ri.min_x || ax > (int)ri.max_x) { + continue; + } + int dx = ax - center.x; + int d2 = (dx * dx) + (dy * dy); + if (d2 <= outer_sq && d2 >= inner_sq) { + weather_fb_row_set(ri.data, ax, color); + } } + } } // Depth-posterized pin styles (3 classes echoing the 3-band lit shading): // pins shrink toward the limb and their raise flattens, so the cities read // as floating on a sphere. Class 2 (front) is the original pin geometry. -typedef struct { uint8_t outline_r, head_r, base_r, raise; } GlobePinStyle; +typedef struct { + uint8_t outline_r, head_r, base_r, raise; +} GlobePinStyle; static const GlobePinStyle GLOBE_PIN_STYLES[3] = { - { 3, 2, 1, 2 }, // limb (depth 51..111) - { 4, 2, 2, 3 }, // mid (112..191) - { 5, 3, 2, 4 }, // front (192..255) — original geometry + {3, 2, 1, 2}, // limb (depth 51..111) + {4, 2, 2, 3}, // mid (112..191) + {5, 3, 2, 4}, // front (192..255) — original geometry }; -static void framebuffer_draw_raised_pin(GBitmap *fb, GPoint globe_center, - GPoint surface, int depth_q8, - bool emphasized, GRect clip_rect) { - int cls = depth_q8 >= GLOBE_PIN_DEPTH_FRONT_Q8 - ? 2 - : (depth_q8 >= GLOBE_PIN_DEPTH_MID_Q8 ? 1 : 0); - const GlobePinStyle *st = &GLOBE_PIN_STYLES[cls]; - int g = emphasized ? 1 : 0; // locked pin grows 1px (lands with the pulse) - int raise = st->raise + g; - int dx = surface.x - globe_center.x; - int dy = surface.y - globe_center.y; - int distance = weather_isqrt((dx * dx) + (dy * dy)); - GPoint head = surface; - if (distance > 0) { - head.x += (dx * raise) / distance; - head.y += (dy * raise) / distance; - } else { - head.y -= raise; - } +static void framebuffer_draw_raised_pin(GBitmap *fb, GPoint globe_center, GPoint surface, + int depth_q8, bool emphasized, GRect clip_rect) { + int cls = depth_q8 >= GLOBE_PIN_DEPTH_FRONT_Q8 ? 2 : (depth_q8 >= GLOBE_PIN_DEPTH_MID_Q8 ? 1 : 0); + const GlobePinStyle *st = &GLOBE_PIN_STYLES[cls]; + int g = emphasized ? 1 : 0; // locked pin grows 1px (lands with the pulse) + int raise = st->raise + g; + int dx = surface.x - globe_center.x; + int dy = surface.y - globe_center.y; + int distance = weather_isqrt((dx * dx) + (dy * dy)); + GPoint head = surface; + if (distance > 0) { + head.x += (dx * raise) / distance; + head.y += (dy * raise) / distance; + } else { + head.y -= raise; + } - framebuffer_fill_circle(fb, surface, st->base_r, GColorBlackARGB8, clip_rect); - framebuffer_fill_circle(fb, head, st->outline_r + g, GColorBlackARGB8, clip_rect); - framebuffer_fill_circle(fb, head, st->head_r + g, GColorWhiteARGB8, clip_rect); -} - -static bool project_lat_lon_to_globe_point_with_depth(GlobeView *view, - int32_t latitude_e2, - int32_t longitude_e2, - GPoint center, - int radius, - int32_t min_front_scale, - GPoint *point_out, - int *depth_q8_out) { - if (!view || !point_out || radius <= 0) return false; - - latitude_e2 = clamp_latitude_e2(latitude_e2); - longitude_e2 = normalize_longitude_e2(longitude_e2); - - int lat_angle = trigangle_from_degrees_e2(latitude_e2); - int lon_angle = trigangle_from_degrees_e2(longitude_e2); - int32_t sin_lat = trig_sin_q10(lat_angle); - int32_t cos_lat = trig_cos_q10(lat_angle); - int32_t sin_lon = trig_sin_q10(lon_angle); - int32_t cos_lon = trig_cos_q10(lon_angle); - - int32_t wx = (int32_t)((int64_t)sin_lon * cos_lat >> GLOBE_ROT_SHIFT); - int32_t wy = sin_lat; - int32_t wz = (int32_t)((int64_t)cos_lon * cos_lat >> GLOBE_ROT_SHIFT); - - int32_t sx = - (int32_t)(((int64_t)view->globe_rotation[0] * wx + - (int64_t)view->globe_rotation[3] * wy + - (int64_t)view->globe_rotation[6] * wz) >> - GLOBE_ROT_SHIFT); - int32_t sy = - (int32_t)(((int64_t)view->globe_rotation[1] * wx + - (int64_t)view->globe_rotation[4] * wy + - (int64_t)view->globe_rotation[7] * wz) >> - GLOBE_ROT_SHIFT); - int32_t sz = - (int32_t)(((int64_t)view->globe_rotation[2] * wx + - (int64_t)view->globe_rotation[5] * wy + - (int64_t)view->globe_rotation[8] * wz) >> - GLOBE_ROT_SHIFT); - - if (sz <= min_front_scale) return false; - - point_out->x = center.x + (int)(sx * radius / GLOBE_ROT_SCALE); - point_out->y = center.y - (int)(sy * radius / GLOBE_ROT_SCALE); - if (depth_q8_out) { - int depth_q8 = (sz * 256) / GLOBE_ROT_SCALE; - if (depth_q8 < 0) depth_q8 = 0; - else if (depth_q8 > 255) depth_q8 = 255; - *depth_q8_out = depth_q8; - } - return true; + framebuffer_fill_circle(fb, surface, st->base_r, GColorBlackARGB8, clip_rect); + framebuffer_fill_circle(fb, head, st->outline_r + g, GColorBlackARGB8, clip_rect); + framebuffer_fill_circle(fb, head, st->head_r + g, GColorWhiteARGB8, clip_rect); +} + +static bool project_lat_lon_to_globe_point_with_depth(GlobeView *view, int32_t latitude_e2, + int32_t longitude_e2, GPoint center, + int radius, int32_t min_front_scale, + GPoint *point_out, int *depth_q8_out) { + if (!view || !point_out || radius <= 0) + return false; + + latitude_e2 = clamp_latitude_e2(latitude_e2); + longitude_e2 = normalize_longitude_e2(longitude_e2); + + int lat_angle = trigangle_from_degrees_e2(latitude_e2); + int lon_angle = trigangle_from_degrees_e2(longitude_e2); + int32_t sin_lat = trig_sin_q10(lat_angle); + int32_t cos_lat = trig_cos_q10(lat_angle); + int32_t sin_lon = trig_sin_q10(lon_angle); + int32_t cos_lon = trig_cos_q10(lon_angle); + + int32_t wx = (int32_t)((int64_t)sin_lon * cos_lat >> GLOBE_ROT_SHIFT); + int32_t wy = sin_lat; + int32_t wz = (int32_t)((int64_t)cos_lon * cos_lat >> GLOBE_ROT_SHIFT); + + int32_t sx = + (int32_t)(((int64_t)view->globe_rotation[0] * wx + (int64_t)view->globe_rotation[3] * wy + + (int64_t)view->globe_rotation[6] * wz) >> + GLOBE_ROT_SHIFT); + int32_t sy = + (int32_t)(((int64_t)view->globe_rotation[1] * wx + (int64_t)view->globe_rotation[4] * wy + + (int64_t)view->globe_rotation[7] * wz) >> + GLOBE_ROT_SHIFT); + int32_t sz = + (int32_t)(((int64_t)view->globe_rotation[2] * wx + (int64_t)view->globe_rotation[5] * wy + + (int64_t)view->globe_rotation[8] * wz) >> + GLOBE_ROT_SHIFT); + + if (sz <= min_front_scale) + return false; + + point_out->x = center.x + (int)(sx * radius / GLOBE_ROT_SCALE); + point_out->y = center.y - (int)(sy * radius / GLOBE_ROT_SCALE); + if (depth_q8_out) { + int depth_q8 = (sz * 256) / GLOBE_ROT_SCALE; + if (depth_q8 < 0) + depth_q8 = 0; + else if (depth_q8 > 255) + depth_q8 = 255; + *depth_q8_out = depth_q8; + } + return true; } #ifdef CONFIG_TOUCH __attribute__((noinline)) static bool project_lat_lon_to_globe_point(GlobeView *view, - int32_t latitude_e2, - int32_t longitude_e2, - GPoint center, - int radius, - GPoint *point_out) { - return project_lat_lon_to_globe_point_with_depth(view, latitude_e2, longitude_e2, - center, radius, - GLOBE_ROT_SCALE / 10, - point_out, NULL); + int32_t latitude_e2, + int32_t longitude_e2, + GPoint center, int radius, + GPoint *point_out) { + return project_lat_lon_to_globe_point_with_depth(view, latitude_e2, longitude_e2, center, radius, + GLOBE_ROT_SCALE / 10, point_out, NULL); } static int nearest_centered_city_index(GlobeView *view, int radius_px) { - if (!view || !view->window || radius_px <= 0) return -1; - - Layer *root_layer = window_get_root_layer(view->window); - if (!root_layer) return -1; - - GRect bounds = layer_get_bounds(root_layer); - GPoint center = revealed_globe_center_for_bounds(bounds, bounce_offset(view)); - int globe_radius = revealed_globe_radius() - GLOBE_OUTLINE_PX; - if (globe_radius <= 0) return -1; - int best_index = -1; - int best_distance_sq = (radius_px * radius_px) + 1; - - int max_index = globe_max_selector_index(view); - for (int i = 0; i <= max_index; i++) { - SavedLocationEntry *entry = saved_entry_for_index(view, i); - int32_t entry_latitude_e2; - int32_t entry_longitude_e2; - if (!saved_entry_globe_coords(view, entry, &entry_latitude_e2, - &entry_longitude_e2)) { - continue; - } - - GPoint point; - if (!project_lat_lon_to_globe_point(view, - entry_latitude_e2, - entry_longitude_e2, - center, - globe_radius, - &point)) { - continue; - } - - int dx = point.x - center.x; - int dy = point.y - center.y; - int distance_sq = (dx * dx) + (dy * dy); - if (distance_sq < best_distance_sq) { - best_distance_sq = distance_sq; - best_index = i; - } - } + if (!view || !view->window || radius_px <= 0) + return -1; - return best_index; -} + Layer *root_layer = window_get_root_layer(view->window); + if (!root_layer) + return -1; -static bool city_pin_offset_from_center(GlobeView *view, - int city_index, - int *dx_out, - int *dy_out) { - if (!view || !view->window || !dx_out || !dy_out) return false; + GRect bounds = layer_get_bounds(root_layer); + GPoint center = revealed_globe_center_for_bounds(bounds, bounce_offset(view)); + int globe_radius = revealed_globe_radius() - GLOBE_OUTLINE_PX; + if (globe_radius <= 0) + return -1; + int best_index = -1; + int best_distance_sq = (radius_px * radius_px) + 1; - SavedLocationEntry *entry = saved_entry_for_index(view, city_index); + int max_index = globe_max_selector_index(view); + for (int i = 0; i <= max_index; i++) { + SavedLocationEntry *entry = saved_entry_for_index(view, i); int32_t entry_latitude_e2; int32_t entry_longitude_e2; - if (!saved_entry_globe_coords(view, entry, &entry_latitude_e2, - &entry_longitude_e2)) { - return false; + if (!saved_entry_globe_coords(view, entry, &entry_latitude_e2, &entry_longitude_e2)) { + continue; } - Layer *root_layer = window_get_root_layer(view->window); - if (!root_layer) return false; - - GRect bounds = layer_get_bounds(root_layer); - GPoint center = revealed_globe_center_for_bounds(bounds, bounce_offset(view)); - int globe_radius = revealed_globe_radius() - GLOBE_OUTLINE_PX; - if (globe_radius <= 0) return false; GPoint point; - if (!project_lat_lon_to_globe_point(view, - entry_latitude_e2, - entry_longitude_e2, - center, - globe_radius, - &point)) { - return false; + if (!project_lat_lon_to_globe_point(view, entry_latitude_e2, entry_longitude_e2, center, + globe_radius, &point)) { + continue; } - *dx_out = point.x - center.x; - *dy_out = point.y - center.y; - return true; + int dx = point.x - center.x; + int dy = point.y - center.y; + int distance_sq = (dx * dx) + (dy * dy); + if (distance_sq < best_distance_sq) { + best_distance_sq = distance_sq; + best_index = i; + } + } + + return best_index; } -static void settle_city_pin_to_center(GlobeView *view, int city_index) { - int deadzone_sq = GLOBE_LOCK_SETTLE_DEADZONE_PX * - GLOBE_LOCK_SETTLE_DEADZONE_PX; - - for (int i = 0; i < GLOBE_LOCK_SETTLE_STEPS; i++) { - int dx; - int dy; - if (!city_pin_offset_from_center(view, city_index, &dx, &dy)) return; - if ((dx * dx) + (dy * dy) <= deadzone_sq) { - return; - } +static bool city_pin_offset_from_center(GlobeView *view, int city_index, int *dx_out, int *dy_out) { + if (!view || !view->window || !dx_out || !dy_out) + return false; - int nudge_x = -dx / GLOBE_LOCK_SETTLE_DIVISOR; - int nudge_y = -dy / GLOBE_LOCK_SETTLE_DIVISOR; - if (nudge_x == 0 && dx != 0) nudge_x = dx < 0 ? 1 : -1; - if (nudge_y == 0 && dy != 0) nudge_y = dy < 0 ? 1 : -1; + SavedLocationEntry *entry = saved_entry_for_index(view, city_index); + int32_t entry_latitude_e2; + int32_t entry_longitude_e2; + if (!saved_entry_globe_coords(view, entry, &entry_latitude_e2, &entry_longitude_e2)) { + return false; + } - apply_globe_screen_delta_q8(view, - (int32_t)nudge_x * GLOBE_Q8_ONE, - (int32_t)nudge_y * GLOBE_Q8_ONE); - } + Layer *root_layer = window_get_root_layer(view->window); + if (!root_layer) + return false; + + GRect bounds = layer_get_bounds(root_layer); + GPoint center = revealed_globe_center_for_bounds(bounds, bounce_offset(view)); + int globe_radius = revealed_globe_radius() - GLOBE_OUTLINE_PX; + if (globe_radius <= 0) + return false; + GPoint point; + if (!project_lat_lon_to_globe_point(view, entry_latitude_e2, entry_longitude_e2, center, + globe_radius, &point)) { + return false; + } + + *dx_out = point.x - center.x; + *dy_out = point.y - center.y; + return true; +} + +static void settle_city_pin_to_center(GlobeView *view, int city_index) { + int deadzone_sq = GLOBE_LOCK_SETTLE_DEADZONE_PX * GLOBE_LOCK_SETTLE_DEADZONE_PX; + + for (int i = 0; i < GLOBE_LOCK_SETTLE_STEPS; i++) { + int dx; + int dy; + if (!city_pin_offset_from_center(view, city_index, &dx, &dy)) + return; + if ((dx * dx) + (dy * dy) <= deadzone_sq) { + return; + } + + int nudge_x = -dx / GLOBE_LOCK_SETTLE_DIVISOR; + int nudge_y = -dy / GLOBE_LOCK_SETTLE_DIVISOR; + if (nudge_x == 0 && dx != 0) + nudge_x = dx < 0 ? 1 : -1; + if (nudge_y == 0 && dy != 0) + nudge_y = dy < 0 ? 1 : -1; + + apply_globe_screen_delta_q8(view, (int32_t)nudge_x * GLOBE_Q8_ONE, + (int32_t)nudge_y * GLOBE_Q8_ONE); + } } #endif -static void draw_saved_location_pins(GBitmap *fb, GlobeView *view, - GPoint center, int radius, +static void draw_saved_location_pins(GBitmap *fb, GlobeView *view, GPoint center, int radius, GRect clip_rect) { - if (!fb || !view || !view->is_revealed || view->is_revealing) return; - - int pin_radius = radius - GLOBE_OUTLINE_PX; - if (pin_radius <= 0) return; - - // Two passes: project + cull into a list, depth-sort (back pins paint - // first so near cities overlap far ones — the 3D read), then draw. The - // sort is stable and Current is appended last, so at equal depth the - // current-location pin still paints on top (old semantics). - typedef struct { GPoint pt; uint8_t depth; bool emphasized; } PinDrawEntry; - PinDrawEntry pins[SAVED_LOCATIONS_MAX_ENTRIES + 1]; - int n = 0; - - int max_index = globe_max_selector_index(view); - for (int i = 0; i <= max_index && n < (int)(sizeof(pins) / sizeof(pins[0])); i++) { - SavedLocationEntry *entry = saved_entry_for_index(view, i); - if (!saved_entry_has_globe_coordinates(view, entry)) continue; - if (entry->is_current_location) continue; - - GPoint pin; - int depth = 255; - if (!project_lat_lon_to_globe_point_with_depth(view, - saved_entry_latitude_e2(view, entry), - saved_entry_longitude_e2(view, entry), - center, pin_radius, - GLOBE_PIN_EDGE_FRONT_Q10, - &pin, &depth)) { - continue; - } - - bool emphasized = (i == view->selected_city_index); + if (!fb || !view || !view->is_revealed || view->is_revealing) + return; + + int pin_radius = radius - GLOBE_OUTLINE_PX; + if (pin_radius <= 0) + return; + + // Two passes: project + cull into a list, depth-sort (back pins paint + // first so near cities overlap far ones — the 3D read), then draw. The + // sort is stable and Current is appended last, so at equal depth the + // current-location pin still paints on top (old semantics). + typedef struct { + GPoint pt; + uint8_t depth; + bool emphasized; + } PinDrawEntry; + PinDrawEntry pins[SAVED_LOCATIONS_MAX_ENTRIES + 1]; + int n = 0; + + int max_index = globe_max_selector_index(view); + for (int i = 0; i <= max_index && n < (int)(sizeof(pins) / sizeof(pins[0])); i++) { + SavedLocationEntry *entry = saved_entry_for_index(view, i); + if (!saved_entry_has_globe_coordinates(view, entry)) + continue; + if (entry->is_current_location) + continue; + + GPoint pin; + int depth = 255; + if (!project_lat_lon_to_globe_point_with_depth( + view, saved_entry_latitude_e2(view, entry), saved_entry_longitude_e2(view, entry), + center, pin_radius, GLOBE_PIN_EDGE_FRONT_Q10, &pin, &depth)) { + continue; + } + + bool emphasized = (i == view->selected_city_index); #ifdef CONFIG_TOUCH - emphasized = emphasized && !view->is_free_roam; - if (view->city_anim && view->hover_lock_active) { - // Grow mid-swoop so the emphasis lands as the pin centres. - emphasized = emphasized && - view->city_anim_progress > ANIMATION_NORMALIZED_MAX / 2; - } -#endif - pins[n++] = (PinDrawEntry){ .pt = pin, .depth = (uint8_t)depth, - .emphasized = emphasized }; + emphasized = emphasized && !view->is_free_roam; + if (view->city_anim && view->hover_lock_active) { + // Grow mid-swoop so the emphasis lands as the pin centres. + emphasized = emphasized && view->city_anim_progress > ANIMATION_NORMALIZED_MAX / 2; } +#endif + pins[n++] = (PinDrawEntry){.pt = pin, .depth = (uint8_t)depth, .emphasized = emphasized}; + } - if (view->has_current_location && n < (int)(sizeof(pins) / sizeof(pins[0]))) { - GPoint pin; - int depth = 255; - if (project_lat_lon_to_globe_point_with_depth(view, - view->current_location_latitude_e2, - view->current_location_longitude_e2, - center, pin_radius, - GLOBE_PIN_EDGE_FRONT_Q10, - &pin, &depth)) { - pins[n++] = (PinDrawEntry){ .pt = pin, .depth = (uint8_t)depth, - .emphasized = false }; - } + if (view->has_current_location && n < (int)(sizeof(pins) / sizeof(pins[0]))) { + GPoint pin; + int depth = 255; + if (project_lat_lon_to_globe_point_with_depth( + view, view->current_location_latitude_e2, view->current_location_longitude_e2, center, + pin_radius, GLOBE_PIN_EDGE_FRONT_Q10, &pin, &depth)) { + pins[n++] = (PinDrawEntry){.pt = pin, .depth = (uint8_t)depth, .emphasized = false}; } + } - for (int i = 1; i < n; i++) { // stable insertion sort, ascending depth - PinDrawEntry key = pins[i]; - int j = i; - while (j > 0 && pins[j - 1].depth > key.depth) { - pins[j] = pins[j - 1]; - j--; - } - pins[j] = key; + for (int i = 1; i < n; i++) { // stable insertion sort, ascending depth + PinDrawEntry key = pins[i]; + int j = i; + while (j > 0 && pins[j - 1].depth > key.depth) { + pins[j] = pins[j - 1]; + j--; } + pins[j] = key; + } - for (int k = 0; k < n; k++) { - framebuffer_draw_raised_pin(fb, center, pins[k].pt, pins[k].depth, - pins[k].emphasized, clip_rect); - } + for (int k = 0; k < n; k++) { + framebuffer_draw_raised_pin(fb, center, pins[k].pt, pins[k].depth, pins[k].emphasized, + clip_rect); + } } #if PBL_BW @@ -1732,12 +1713,14 @@ static void draw_saved_location_pins(GBitmap *fb, GlobeView *view, // shading bands — terrain vs sea vs glint vs atmosphere — instead of // collapsing into a solid disc. static inline bool prv_bw_lit(uint8_t argb8, int x, int y) { - static const uint8_t kBayer[4][4] = { - { 0, 8, 2, 10 }, { 12, 4, 14, 6 }, { 3, 11, 1, 9 }, { 15, 7, 13, 5 }, - }; - const int lum = ((argb8 >> 4) & 0x3) * 3 + ((argb8 >> 2) & 0x3) * 4 + - (argb8 & 0x3) * 2; // 0..27 - return (lum * 16) > (kBayer[y & 3][x & 3] * 27 + 13); + static const uint8_t kBayer[4][4] = { + {0, 8, 2, 10}, + {12, 4, 14, 6}, + {3, 11, 1, 9}, + {15, 7, 13, 5}, + }; + const int lum = ((argb8 >> 4) & 0x3) * 3 + ((argb8 >> 2) & 0x3) * 4 + (argb8 & 0x3) * 2; // 0..27 + return (lum * 16) > (kBayer[y & 3][x & 3] * 27 + 13); } #endif @@ -1745,26 +1728,28 @@ static inline bool prv_bw_lit(uint8_t argb8, int x, int y) { // Bayer-dithered bit. (weather_fb_row_set stays for pure black/white intents.) static inline void prv_globe_px(uint8_t *row_data, int x, int y, uint8_t argb8) { #if PBL_BW - bitset8_update(row_data, (unsigned)x, prv_bw_lit(argb8, x, y)); + bitset8_update(row_data, (unsigned)x, prv_bw_lit(argb8, x, y)); #else - row_data[x] = argb8; + row_data[x] = argb8; #endif } -static void fill_row_span(uint8_t *row_data, int y, int x0, int x1, - int lo, int hi, uint8_t color) { - if (x0 < lo) x0 = lo; - if (x1 > hi) x1 = hi; - if (x1 < x0) return; +static void fill_row_span(uint8_t *row_data, int y, int x0, int x1, int lo, int hi, uint8_t color) { + if (x0 < lo) + x0 = lo; + if (x1 > hi) + x1 = hi; + if (x1 < x0) + return; #if PBL_BW - // Packed 1-bit rows: a byte memset would overrun the 20-byte row (it - // stomped the render context on flint) — write dithered bits instead. - for (int x = x0; x <= x1; x++) { - prv_globe_px(row_data, x, y, color); - } + // Packed 1-bit rows: a byte memset would overrun the 20-byte row (it + // stomped the render context on flint) — write dithered bits instead. + for (int x = x0; x <= x1; x++) { + prv_globe_px(row_data, x, y, color); + } #else - (void)y; - memset(&row_data[x0], color, (size_t)(x1 - x0 + 1)); + (void)y; + memset(&row_data[x0], color, (size_t)(x1 - x0 + 1)); #endif } @@ -1775,244 +1760,237 @@ static void fill_row_span(uint8_t *row_data, int y, int x0, int x1, // entry is offset by -1 because the textured test is a strict inequality // (dist^2 < inner^2). #define GLOBE_RING_COUNT 5 -static int fill_globe_ring_row(uint8_t *row_data, int y, int cx, int dy_sq, - const int32_t *radii_sq, int lo, int hi) { - // Atmosphere halo: a luminous Celeste band on the rim itself (no hard - // outline — it merges with the on-planet rim glow), fading into space. - static const uint8_t ring_colors[GLOBE_RING_COUNT] = { - GColorDukeBlueARGB8, // outermost wisp - GColorBlueMoonARGB8, - GColorVividCeruleanARGB8, - GColorPictonBlueARGB8, - GColorCelesteARGB8, // brightest, straddling the limb - }; - int spans[GLOBE_RING_COUNT + 1]; - for (int r = 0; r <= GLOBE_RING_COUNT; r++) { - int32_t rem = radii_sq[r] - dy_sq; - spans[r] = rem >= 0 ? (int)weather_isqrt(rem) : -1; - } - for (int r = 0; r < GLOBE_RING_COUNT; r++) { - fill_row_span(row_data, y, cx - spans[r], cx - spans[r + 1] - 1, - lo, hi, ring_colors[r]); - fill_row_span(row_data, y, cx + spans[r + 1] + 1, cx + spans[r], - lo, hi, ring_colors[r]); - } - return spans[GLOBE_RING_COUNT]; -} - -static void draw_cubemap_globe_at_center(GContext *ctx, GlobeView *view, - GPoint center, int scale_percent, - GRect clip_rect, - bool clear_clip) { - if (!view || !view->cubemap_data || scale_percent <= 0) return; - - int diameter = (GLOBE_RENDER_BASE_DIAMETER * scale_percent) / 100; - if (diameter < 4) return; - - int radius = diameter / 2; - int outline_inner_radius = radius - GLOBE_OUTLINE_PX; - if (outline_inner_radius < 0) outline_inner_radius = 0; - int outline_inner_radius_sq = outline_inner_radius * outline_inner_radius; - int glow_outer_radius = radius + GLOBE_ATMOSPHERE_GLOW_PX; - const int32_t ring_radii_sq[GLOBE_RING_COUNT + 1] = { - glow_outer_radius * glow_outer_radius, // deep-space wisp - (radius + 8) * (radius + 8), - (radius + 6) * (radius + 6), - (radius + 4) * (radius + 4), - (radius + 2) * (radius + 2), // Celeste rim band - outline_inner_radius_sq - 1, // textured face (strict <) - }; - - GBitmap *fb = graphics_capture_frame_buffer(ctx); - if (!fb) return; +static int fill_globe_ring_row(uint8_t *row_data, int y, int cx, int dy_sq, const int32_t *radii_sq, + int lo, int hi) { + // Atmosphere halo: a luminous Celeste band on the rim itself (no hard + // outline — it merges with the on-planet rim glow), fading into space. + static const uint8_t ring_colors[GLOBE_RING_COUNT] = { + GColorDukeBlueARGB8, // outermost wisp + GColorBlueMoonARGB8, GColorVividCeruleanARGB8, GColorPictonBlueARGB8, + GColorCelesteARGB8, // brightest, straddling the limb + }; + int spans[GLOBE_RING_COUNT + 1]; + for (int r = 0; r <= GLOBE_RING_COUNT; r++) { + int32_t rem = radii_sq[r] - dy_sq; + spans[r] = rem >= 0 ? (int)weather_isqrt(rem) : -1; + } + for (int r = 0; r < GLOBE_RING_COUNT; r++) { + fill_row_span(row_data, y, cx - spans[r], cx - spans[r + 1] - 1, lo, hi, ring_colors[r]); + fill_row_span(row_data, y, cx + spans[r + 1] + 1, cx + spans[r], lo, hi, ring_colors[r]); + } + return spans[GLOBE_RING_COUNT]; +} + +static void draw_cubemap_globe_at_center(GContext *ctx, GlobeView *view, GPoint center, + int scale_percent, GRect clip_rect, bool clear_clip) { + if (!view || !view->cubemap_data || scale_percent <= 0) + return; + + int diameter = (GLOBE_RENDER_BASE_DIAMETER * scale_percent) / 100; + if (diameter < 4) + return; + + int radius = diameter / 2; + int outline_inner_radius = radius - GLOBE_OUTLINE_PX; + if (outline_inner_radius < 0) + outline_inner_radius = 0; + int outline_inner_radius_sq = outline_inner_radius * outline_inner_radius; + int glow_outer_radius = radius + GLOBE_ATMOSPHERE_GLOW_PX; + const int32_t ring_radii_sq[GLOBE_RING_COUNT + 1] = { + glow_outer_radius * glow_outer_radius, // deep-space wisp + (radius + 8) * (radius + 8), (radius + 6) * (radius + 6), + (radius + 4) * (radius + 4), + (radius + 2) * (radius + 2), // Celeste rim band + outline_inner_radius_sq - 1, // textured face (strict <) + }; + + GBitmap *fb = graphics_capture_frame_buffer(ctx); + if (!fb) + return; + + GRect fbb = gbitmap_get_bounds(fb); + GRect clipped = clip_rect_to_bounds(clip_rect, fbb); + if (clear_clip) { + clear_framebuffer_rect(fb, clipped); + framebuffer_draw_starfield(fb, view, fbb, clipped); + } - GRect fbb = gbitmap_get_bounds(fb); - GRect clipped = clip_rect_to_bounds(clip_rect, fbb); - if (clear_clip) { - clear_framebuffer_rect(fb, clipped); - framebuffer_draw_starfield(fb, view, fbb, clipped); + int clip_left = clipped.origin.x; + int clip_top = clipped.origin.y; + int clip_right = clipped.origin.x + clipped.size.w - 1; + int clip_bottom = clipped.origin.y + clipped.size.h - 1; + + // Hoist the rotation matrix and texture pointer into locals: the + // framebuffer byte writes below would otherwise force the compiler to + // reload them from the view struct on every pixel. + int32_t m[9]; + memcpy(m, view->globe_rotation, sizeof(m)); + const uint8_t *cubemap = view->cubemap_data; + + const int cx = center.x; + for (int dy = -glow_outer_radius; dy <= glow_outer_radius; dy++) { + int ay = center.y + dy; + if (ay < clip_top || ay > clip_bottom) + continue; + + GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); + + int row_left = clip_left < (int)ri.min_x ? (int)ri.min_x : clip_left; + int row_right = clip_right > (int)ri.max_x ? (int)ri.max_x : clip_right; + if (row_left > row_right) + continue; + + int t_span = fill_globe_ring_row(ri.data, ay, cx, dy * dy, ring_radii_sq, row_left, row_right); + if (t_span < 0) + continue; + int lo = cx - t_span < row_left ? row_left : cx - t_span; + int hi = cx + t_span > row_right ? row_right : cx + t_span; + if (lo > hi) + continue; + + int32_t sy = ((int32_t)-dy * GLOBE_ROT_SCALE) / radius; + int32_t plane_sq = (GLOBE_ROT_SCALE * GLOBE_ROT_SCALE) - (sy * sy); + int32_t row_x = m[1] * sy; + int32_t row_y = m[4] * sy; + int32_t row_z = m[7] * sy; + int32_t light_row = GLOBE_LIGHT_Y_Q10 * sy; + const uint8_t *dither_row = GLOBE_SPACE_FADE_DITHER[ay % GLOBE_SPACE_FADE_DITHER_SIZE]; + + int d_max = cx - lo > hi - cx ? cx - lo : hi - cx; + + // The two halves of the row mirror in sx, so one depth (sz) and one + // sz/sy matrix contribution serve both pixels. sz shrinks + // monotonically as d grows, so the seeded Newton sqrt can reuse the + // previous pixel's depth as its starting point; the row seed below + // is the depth at d = 0, an upper bound for the whole row. + int32_t sz = weather_isqrt(plane_sq); + for (int d = 0; d <= d_max; d++) { + int32_t sx = ((int32_t)d * GLOBE_ROT_SCALE) / radius; + sz = floor_sqrt_seeded(plane_sq - (sx * sx), sz); + + int32_t base_x = row_x + (m[2] * sz); + int32_t base_y = row_y + (m[5] * sz); + int32_t base_z = row_z + (m[8] * sz); + int32_t col_x = m[0] * sx; + int32_t col_y = m[3] * sx; + int32_t col_z = m[6] * sx; + int32_t light_base = light_row + (GLOBE_LIGHT_Z_Q10 * sz); + int32_t light_col = GLOBE_LIGHT_X_Q10 * sx; + + for (int side = 0; side < 2; side++) { + if (side) { + if (d == 0) + break; + col_x = -col_x; + col_y = -col_y; + col_z = -col_z; + light_col = -light_col; + } + int ax = side ? cx - d : cx + d; + if (ax < lo || ax > hi) + continue; + if (sz < GLOBE_HAZE_RIM_SZ_Q10) { + // Luminous rim: the atmosphere outshines the terrain at + // the very edge of the disc (merges with the halo ring), + // whitened into a fresnel glint where the limb faces the + // light — solid White arc with a 50%-dithered skirt. + int32_t rim_light = (light_base + light_col) >> GLOBE_ROT_SHIFT; + uint8_t rim_color = GColorCelesteARGB8; + if (rim_light >= GLOBE_RIM_HOT_MIN_Q10 || + (rim_light >= GLOBE_RIM_WARM_MIN_Q10 && + dither_row[ax % GLOBE_SPACE_FADE_DITHER_SIZE] < 8)) { + rim_color = GColorWhiteARGB8; + } + prv_globe_px(ri.data, ax, ay, rim_color); + continue; + } + uint8_t tex = cubemap_sample(cubemap, (base_x + col_x) >> GLOBE_ROT_SHIFT, + (base_y + col_y) >> GLOBE_ROT_SHIFT, + (base_z + col_z) >> GLOBE_ROT_SHIFT); + // Posterized lambert shading, dithered at the band edges. + int32_t dith = (int32_t)dither_row[ax % GLOBE_SPACE_FADE_DITHER_SIZE]; + int32_t light_pre = (light_base + light_col) >> GLOBE_ROT_SHIFT; + int32_t light = light_pre + ((dith - 8) << 4); + int band = + light >= GLOBE_SHADE_LIT_MIN_Q10 ? 0 : (light >= GLOBE_SHADE_MID_MIN_Q10 ? 1 : 2); + uint8_t color = GLOBE_SHADE_PALETTE[band][tex]; + if (band == 0 && light_pre >= GLOBE_GLINT_MIN_Q10 && + ((dith * GLOBE_GLINT_SPAN_Q10) >> 4) <= (light_pre - GLOBE_GLINT_MIN_Q10)) { + // Specular sun pool (screen-fixed; terrain scrolls under + // it) — water brightens one ramp step, land stays matte. + color = GLOBE_SHADE_PALETTE[3][tex]; + } + if (sz < GLOBE_HAZE_BLEND_SZ_Q10) { + // Atmospheric wash over terrain near the horizon, dithered + // denser toward the rim; color + reach keyed by band (the + // sunlit limb blooms Celeste and reaches deeper — haze + // wins over the glint, so the rim stays atmospheric). + int32_t haze_span = GLOBE_HAZE_SPAN_BY_BAND[band]; + if (((dith * haze_span) >> 4) >= (sz - GLOBE_HAZE_RIM_SZ_Q10)) { + color = GLOBE_HAZE_WASH_BY_BAND[band]; + } + } + prv_globe_px(ri.data, ax, ay, color); + } } + } - int clip_left = clipped.origin.x; - int clip_top = clipped.origin.y; - int clip_right = clipped.origin.x + clipped.size.w - 1; - int clip_bottom = clipped.origin.y + clipped.size.h - 1; + draw_saved_location_pins(fb, view, center, radius, clipped); - // Hoist the rotation matrix and texture pointer into locals: the - // framebuffer byte writes below would otherwise force the compiler to - // reload them from the view struct on every pixel. - int32_t m[9]; - memcpy(m, view->globe_rotation, sizeof(m)); - const uint8_t *cubemap = view->cubemap_data; + if (view->lock_pulse_anim) { + // Lock pulse: a Celeste ring expanding from the settled pin's head + // (raised 4px above center) and easing out — "target acquired". + int eased = ease_out_quad(view->lock_pulse_progress); + int outer_r = + GLOBE_LOCK_PULSE_R_MIN_PX + (GLOBE_LOCK_PULSE_R_GROW_PX * eased) / ANIMATION_NORMALIZED_MAX; + framebuffer_draw_ring(fb, GPoint(center.x, center.y - 5), outer_r, + outer_r - GLOBE_LOCK_PULSE_THICKNESS_PX, GColorCelesteARGB8, clipped); + } - const int cx = center.x; - for (int dy = -glow_outer_radius; dy <= glow_outer_radius; dy++) { - int ay = center.y + dy; - if (ay < clip_top || ay > clip_bottom) continue; + graphics_release_frame_buffer(ctx, fb); +} - GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); +static void draw_cubemap_globe(GContext *ctx, GlobeView *view, GPoint origin, GSize frame_size, + int scale_percent, GRect clip_rect, bool clear_clip) { + if (!view || !view->cubemap_data || scale_percent <= 0) + return; - int row_left = clip_left < (int)ri.min_x ? (int)ri.min_x : clip_left; - int row_right = clip_right > (int)ri.max_x ? (int)ri.max_x : clip_right; - if (row_left > row_right) continue; - - int t_span = fill_globe_ring_row(ri.data, ay, cx, dy * dy, ring_radii_sq, - row_left, row_right); - if (t_span < 0) continue; - int lo = cx - t_span < row_left ? row_left : cx - t_span; - int hi = cx + t_span > row_right ? row_right : cx + t_span; - if (lo > hi) continue; - - int32_t sy = ((int32_t)-dy * GLOBE_ROT_SCALE) / radius; - int32_t plane_sq = (GLOBE_ROT_SCALE * GLOBE_ROT_SCALE) - (sy * sy); - int32_t row_x = m[1] * sy; - int32_t row_y = m[4] * sy; - int32_t row_z = m[7] * sy; - int32_t light_row = GLOBE_LIGHT_Y_Q10 * sy; - const uint8_t *dither_row = - GLOBE_SPACE_FADE_DITHER[ay % GLOBE_SPACE_FADE_DITHER_SIZE]; - - int d_max = cx - lo > hi - cx ? cx - lo : hi - cx; - - // The two halves of the row mirror in sx, so one depth (sz) and one - // sz/sy matrix contribution serve both pixels. sz shrinks - // monotonically as d grows, so the seeded Newton sqrt can reuse the - // previous pixel's depth as its starting point; the row seed below - // is the depth at d = 0, an upper bound for the whole row. - int32_t sz = weather_isqrt(plane_sq); - for (int d = 0; d <= d_max; d++) { - int32_t sx = ((int32_t)d * GLOBE_ROT_SCALE) / radius; - sz = floor_sqrt_seeded(plane_sq - (sx * sx), sz); - - int32_t base_x = row_x + (m[2] * sz); - int32_t base_y = row_y + (m[5] * sz); - int32_t base_z = row_z + (m[8] * sz); - int32_t col_x = m[0] * sx; - int32_t col_y = m[3] * sx; - int32_t col_z = m[6] * sx; - int32_t light_base = light_row + (GLOBE_LIGHT_Z_Q10 * sz); - int32_t light_col = GLOBE_LIGHT_X_Q10 * sx; - - for (int side = 0; side < 2; side++) { - if (side) { - if (d == 0) break; - col_x = -col_x; - col_y = -col_y; - col_z = -col_z; - light_col = -light_col; - } - int ax = side ? cx - d : cx + d; - if (ax < lo || ax > hi) continue; - if (sz < GLOBE_HAZE_RIM_SZ_Q10) { - // Luminous rim: the atmosphere outshines the terrain at - // the very edge of the disc (merges with the halo ring), - // whitened into a fresnel glint where the limb faces the - // light — solid White arc with a 50%-dithered skirt. - int32_t rim_light = - (light_base + light_col) >> GLOBE_ROT_SHIFT; - uint8_t rim_color = GColorCelesteARGB8; - if (rim_light >= GLOBE_RIM_HOT_MIN_Q10 || - (rim_light >= GLOBE_RIM_WARM_MIN_Q10 && - dither_row[ax % GLOBE_SPACE_FADE_DITHER_SIZE] < 8)) { - rim_color = GColorWhiteARGB8; - } - prv_globe_px(ri.data, ax, ay, rim_color); - continue; - } - uint8_t tex = cubemap_sample( - cubemap, - (base_x + col_x) >> GLOBE_ROT_SHIFT, - (base_y + col_y) >> GLOBE_ROT_SHIFT, - (base_z + col_z) >> GLOBE_ROT_SHIFT); - // Posterized lambert shading, dithered at the band edges. - int32_t dith = - (int32_t)dither_row[ax % GLOBE_SPACE_FADE_DITHER_SIZE]; - int32_t light_pre = (light_base + light_col) >> GLOBE_ROT_SHIFT; - int32_t light = light_pre + ((dith - 8) << 4); - int band = light >= GLOBE_SHADE_LIT_MIN_Q10 - ? 0 - : (light >= GLOBE_SHADE_MID_MIN_Q10 ? 1 : 2); - uint8_t color = GLOBE_SHADE_PALETTE[band][tex]; - if (band == 0 && light_pre >= GLOBE_GLINT_MIN_Q10 && - ((dith * GLOBE_GLINT_SPAN_Q10) >> 4) <= - (light_pre - GLOBE_GLINT_MIN_Q10)) { - // Specular sun pool (screen-fixed; terrain scrolls under - // it) — water brightens one ramp step, land stays matte. - color = GLOBE_SHADE_PALETTE[3][tex]; - } - if (sz < GLOBE_HAZE_BLEND_SZ_Q10) { - // Atmospheric wash over terrain near the horizon, dithered - // denser toward the rim; color + reach keyed by band (the - // sunlit limb blooms Celeste and reaches deeper — haze - // wins over the glint, so the rim stays atmospheric). - int32_t haze_span = GLOBE_HAZE_SPAN_BY_BAND[band]; - if (((dith * haze_span) >> 4) >= - (sz - GLOBE_HAZE_RIM_SZ_Q10)) { - color = GLOBE_HAZE_WASH_BY_BAND[band]; - } - } - prv_globe_px(ri.data, ax, ay, color); - } - } - } + int diameter = (GLOBE_RENDER_BASE_DIAMETER * scale_percent) / 100; + if (diameter < 4) + return; - draw_saved_location_pins(fb, view, center, radius, clipped); - - if (view->lock_pulse_anim) { - // Lock pulse: a Celeste ring expanding from the settled pin's head - // (raised 4px above center) and easing out — "target acquired". - int eased = ease_out_quad(view->lock_pulse_progress); - int outer_r = GLOBE_LOCK_PULSE_R_MIN_PX + - (GLOBE_LOCK_PULSE_R_GROW_PX * eased) / - ANIMATION_NORMALIZED_MAX; - framebuffer_draw_ring(fb, GPoint(center.x, center.y - 5), outer_r, - outer_r - GLOBE_LOCK_PULSE_THICKNESS_PX, - GColorCelesteARGB8, clipped); - } + GPoint center = GPoint(origin.x + (frame_size.w / 2), + origin.y + (frame_size.h / 2) + GLOBE_COLOR_PLANET_CENTER_Y_OFFSET); - graphics_release_frame_buffer(ctx, fb); -} - -static void draw_cubemap_globe(GContext *ctx, GlobeView *view, GPoint origin, - GSize frame_size, int scale_percent, - GRect clip_rect, bool clear_clip) { - if (!view || !view->cubemap_data || scale_percent <= 0) return; - - int diameter = (GLOBE_RENDER_BASE_DIAMETER * scale_percent) / 100; - if (diameter < 4) return; - - GPoint center = GPoint(origin.x + (frame_size.w / 2), - origin.y + (frame_size.h / 2) + - GLOBE_COLOR_PLANET_CENTER_Y_OFFSET); - - draw_cubemap_globe_at_center(ctx, view, center, scale_percent, - clip_rect, clear_clip); + draw_cubemap_globe_at_center(ctx, view, center, scale_percent, clip_rect, clear_clip); } static void reload_current_frame(GlobeView *view) { - if (!view) return; - if (view->is_revealed && !view->is_revealing) { - update_city_label_layer(view); - } - mark_dynamic_globe_dirty(view); + if (!view) + return; + if (view->is_revealed && !view->is_revealing) { + update_city_label_layer(view); + } + mark_dynamic_globe_dirty(view); } // Identical to reload_current_frame; keep one body. #define reload_color_frame reload_current_frame static void mark_dynamic_globe_dirty(GlobeView *view) { - if (!view) return; + if (!view) + return; - if (view->is_revealed && !view->is_revealing && view->globe_layer) { - layer_mark_dirty(view->globe_layer); - } else if (view->canvas_layer) { - layer_mark_dirty(view->canvas_layer); - } + if (view->is_revealed && !view->is_revealing && view->globe_layer) { + layer_mark_dirty(view->globe_layer); + } else if (view->canvas_layer) { + layer_mark_dirty(view->canvas_layer); + } } static int32_t ease_out_quad(AnimationProgress progress) { - int32_t inv = ANIMATION_NORMALIZED_MAX - (int32_t)progress; - return ANIMATION_NORMALIZED_MAX - weather_norm_square(inv); + int32_t inv = ANIMATION_NORMALIZED_MAX - (int32_t)progress; + return ANIMATION_NORMALIZED_MAX - weather_norm_square(inv); } #ifdef CONFIG_TOUCH @@ -2024,547 +2002,543 @@ static int32_t ease_out_quad(AnimationProgress progress) { // MUST only be used where a closed-loop correction follows (the hover branch) // — never for open-loop lat/lon interpolation (10% of a long arc is huge). static int32_t ease_out_back(AnimationProgress progress) { - int32_t inv = ANIMATION_NORMALIZED_MAX - (int32_t)progress; - if (inv <= 0) return ANIMATION_NORMALIZED_MAX; - int32_t inv2 = weather_norm_square(inv); // inv^2/N - int32_t inv3 = weather_scale_i32(inv2, inv, ANIMATION_NORMALIZED_MAX); // inv^3/N^2 - int32_t eased = ANIMATION_NORMALIZED_MAX + (7 * inv2 - 11 * inv3) / 4; - int32_t cap = ANIMATION_NORMALIZED_MAX + ANIMATION_NORMALIZED_MAX / 8; - return eased > cap ? cap : eased; + int32_t inv = ANIMATION_NORMALIZED_MAX - (int32_t)progress; + if (inv <= 0) + return ANIMATION_NORMALIZED_MAX; + int32_t inv2 = weather_norm_square(inv); // inv^2/N + int32_t inv3 = weather_scale_i32(inv2, inv, ANIMATION_NORMALIZED_MAX); // inv^3/N^2 + int32_t eased = ANIMATION_NORMALIZED_MAX + (7 * inv2 - 11 * inv3) / 4; + int32_t cap = ANIMATION_NORMALIZED_MAX + ANIMATION_NORMALIZED_MAX / 8; + return eased > cap ? cap : eased; } #endif static AnimationProgress color_transition_grow_progress(int amount) { - const int grow_start = - (ANIMATION_NORMALIZED_MAX * GLOBE_COLOR_GROW_START_PERCENT) / 100; - if (amount <= grow_start) { - return 0; - } + const int grow_start = (ANIMATION_NORMALIZED_MAX * GLOBE_COLOR_GROW_START_PERCENT) / 100; + if (amount <= grow_start) { + return 0; + } - return (AnimationProgress)weather_scale_i32(amount - grow_start, - ANIMATION_NORMALIZED_MAX, - ANIMATION_NORMALIZED_MAX - - grow_start); + return (AnimationProgress)weather_scale_i32(amount - grow_start, ANIMATION_NORMALIZED_MAX, + ANIMATION_NORMALIZED_MAX - grow_start); } static int color_transition_scale_percent(int amount) { - AnimationProgress relative = color_transition_grow_progress(amount); - if (relative <= 0) { - return 0; - } + AnimationProgress relative = color_transition_grow_progress(amount); + if (relative <= 0) { + return 0; + } - int eased = ease_out_quad(relative); - return weather_scale_i32(eased, GLOBE_COLOR_FINAL_SCALE_PERCENT, - ANIMATION_NORMALIZED_MAX); + int eased = ease_out_quad(relative); + return weather_scale_i32(eased, GLOBE_COLOR_FINAL_SCALE_PERCENT, ANIMATION_NORMALIZED_MAX); } static int transition_color_amount(GlobeView *view) { - int progress = (int)view->reveal_progress; - return view->reveal_direction > 0 - ? progress - : (ANIMATION_NORMALIZED_MAX - progress); + int progress = (int)view->reveal_progress; + return view->reveal_direction > 0 ? progress : (ANIMATION_NORMALIZED_MAX - progress); } static int transition_bw_amount(GlobeView *view) { - int amount = transition_color_amount(view); - if (view && view->reveal_direction > 0) { - amount = (amount * GLOBE_REVEAL_BW_SPEED_NUM) / - GLOBE_REVEAL_BW_SPEED_DEN; - if (amount > ANIMATION_NORMALIZED_MAX) { - amount = ANIMATION_NORMALIZED_MAX; - } + int amount = transition_color_amount(view); + if (view && view->reveal_direction > 0) { + amount = (amount * GLOBE_REVEAL_BW_SPEED_NUM) / GLOBE_REVEAL_BW_SPEED_DEN; + if (amount > ANIMATION_NORMALIZED_MAX) { + amount = ANIMATION_NORMALIZED_MAX; } - return amount; + } + return amount; } static int intro_selection_offset(GlobeView *view) { - if (!view || view->intro_selection_ms == 0) return 0; - return (view->intro_selection_ms * GLOBE_INTRO_SELECTION_OFFSET_PX) / - GLOBE_INTRO_SELECTION_DURATION_MS; + if (!view || view->intro_selection_ms == 0) + return 0; + return (view->intro_selection_ms * GLOBE_INTRO_SELECTION_OFFSET_PX) / + GLOBE_INTRO_SELECTION_DURATION_MS; } static int bounce_offset(GlobeView *view) { - if (!view || !view->bounce_anim) return 0; + if (!view || !view->bounce_anim) + return 0; - int p = (int)view->bounce_progress; - int peak = p <= ANIMATION_NORMALIZED_MAX / 2 - ? p - : ANIMATION_NORMALIZED_MAX - p; - return (view->bounce_direction * GLOBE_CITY_BOUNCE_PX * peak * 2) / - ANIMATION_NORMALIZED_MAX; + int p = (int)view->bounce_progress; + int peak = p <= ANIMATION_NORMALIZED_MAX / 2 ? p : ANIMATION_NORMALIZED_MAX - p; + return (view->bounce_direction * GLOBE_CITY_BOUNCE_PX * peak * 2) / ANIMATION_NORMALIZED_MAX; } // One canceller for all Animation-slot fields: clears the slot first (the // stopped handler checks ownership), then unschedules + destroys. static void cancel_animation_slot(Animation **slot) { - Animation *anim = *slot; - if (!anim) return; - *slot = NULL; - animation_unschedule(anim); - animation_destroy(anim); + Animation *anim = *slot; + if (!anim) + return; + *slot = NULL; + animation_unschedule(anim); + animation_destroy(anim); } static void cancel_timer_slot(AppTimer **slot) { - if (*slot) { - app_timer_cancel(*slot); - *slot = NULL; - } + if (*slot) { + app_timer_cancel(*slot); + *slot = NULL; + } } static void cancel_city_animation(GlobeView *view) { - if (view) cancel_animation_slot(&view->city_anim); + if (view) + cancel_animation_slot(&view->city_anim); } static void cancel_bounce_animation(GlobeView *view) { - if (view) cancel_animation_slot(&view->bounce_anim); + if (view) + cancel_animation_slot(&view->bounce_anim); } #ifdef CONFIG_TOUCH static void stop_globe_coast(GlobeView *view, bool mark_dirty) { - if (!view) return; + if (!view) + return; - cancel_timer_slot(&view->coast_timer); - view->coast_active = false; - view->coast_velocity_x_q8 = 0; - view->coast_velocity_y_q8 = 0; + cancel_timer_slot(&view->coast_timer); + view->coast_active = false; + view->coast_velocity_x_q8 = 0; + view->coast_velocity_y_q8 = 0; - if (mark_dirty) { - mark_dynamic_globe_dirty(view); - } + if (mark_dirty) { + mark_dynamic_globe_dirty(view); + } } #endif static void notify_city_selected(GlobeView *view, bool force) { - if (!view) return; + if (!view) + return; - SavedLocationEntry *entry = selected_saved_entry(view); - if (entry && view->location_select_callback) { - view->location_select_callback(entry->ds_index, force, - view->location_select_context); - } + SavedLocationEntry *entry = selected_saved_entry(view); + if (entry && view->location_select_callback) { + view->location_select_callback(entry->ds_index, force, view->location_select_context); + } } static bool commit_hovered_location(GlobeView *view) { - if (!view || !view->is_revealed || view->is_revealing) return false; + if (!view || !view->is_revealed || view->is_revealing) + return false; - if (view->city_anim) { - set_color_orientation(view, - view->city_anim_target_latitude_e2, - view->city_anim_target_longitude_e2); - cancel_city_animation(view); - } + if (view->city_anim) { + set_color_orientation(view, view->city_anim_target_latitude_e2, + view->city_anim_target_longitude_e2); + cancel_city_animation(view); + } #ifdef CONFIG_TOUCH - stop_globe_coast(view, false); - if (view->is_free_roam) { - int city_index = nearest_centered_city_index(view, - GLOBE_COMMIT_LOCK_RADIUS_PX); - if (city_index < 0) { - mark_dynamic_globe_dirty(view); - return false; - } - view->selected_city_index = city_index; - view->hover_city_index = city_index; - view->hover_lock_active = true; - set_color_orientation(view, - selected_city_latitude_e2(view), - selected_city_longitude_e2(view)); - set_free_roam_enabled(view, false); + stop_globe_coast(view, false); + if (view->is_free_roam) { + int city_index = nearest_centered_city_index(view, GLOBE_COMMIT_LOCK_RADIUS_PX); + if (city_index < 0) { + mark_dynamic_globe_dirty(view); + return false; } + view->selected_city_index = city_index; + view->hover_city_index = city_index; + view->hover_lock_active = true; + set_color_orientation(view, selected_city_latitude_e2(view), selected_city_longitude_e2(view)); + set_free_roam_enabled(view, false); + } #endif - update_city_label_layer(view); - notify_city_selected(view, true); - return true; + update_city_label_layer(view); + notify_city_selected(view, true); + return true; } static void format_selected_label(GlobeView *view, char *buffer, size_t buffer_size) { - if (!buffer || buffer_size == 0) return; - - SavedLocationEntry *entry = selected_saved_entry(view); - const char *label = i18n_get("Saved Location", view); - if (entry && entry->label[0]) { - label = entry->label; - } else if (entry && entry->is_current_location) { - label = i18n_get("Current Location", view); - } + if (!buffer || buffer_size == 0) + return; + + SavedLocationEntry *entry = selected_saved_entry(view); + const char *label = i18n_get("Saved Location", view); + if (entry && entry->label[0]) { + label = entry->label; + } else if (entry && entry->is_current_location) { + label = i18n_get("Current Location", view); + } #if PBL_ROUND - const char *first_comma = strchr(label, ','); - if (first_comma) { - const char *last_comma = strrchr(label, ','); - const char *country_start = last_comma ? last_comma + 1 : first_comma + 1; - while (*country_start == ' ') country_start++; - - size_t city_len = (size_t)(first_comma - label); - while (city_len > 0 && label[city_len - 1] == ' ') city_len--; - - size_t country_len = 0; - while (country_start[country_len]) country_len++; - while (country_len > 0 && country_start[country_len - 1] == ' ') country_len--; - - const char *abbr = NULL; - if (country_len == 13 && strncmp(country_start, "United States", 13) == 0) abbr = "USA"; - else if (country_len == 14 && strncmp(country_start, "United Kingdom", 14) == 0) abbr = "UK"; - else if (country_len == 9 && strncmp(country_start, "Australia", 9) == 0) abbr = "AUS"; - else if (country_len == 20 && strncmp(country_start, "United Arab Emirates", 20) == 0) abbr = "UAE"; - else if (country_len == 12 && strncmp(country_start, "South Africa", 12) == 0) abbr = "SA"; - - if (city_len > 0 && (abbr || country_len > 0)) { - if (abbr) { - snprintf(buffer, buffer_size, "%.*s, %s", (int)city_len, label, abbr); - } else { - snprintf(buffer, buffer_size, "%.*s, %.*s", - (int)city_len, label, - (int)country_len, country_start); - } - buffer[buffer_size - 1] = '\0'; - return; - } + const char *first_comma = strchr(label, ','); + if (first_comma) { + const char *last_comma = strrchr(label, ','); + const char *country_start = last_comma ? last_comma + 1 : first_comma + 1; + while (*country_start == ' ') + country_start++; + + size_t city_len = (size_t)(first_comma - label); + while (city_len > 0 && label[city_len - 1] == ' ') + city_len--; + + size_t country_len = 0; + while (country_start[country_len]) + country_len++; + while (country_len > 0 && country_start[country_len - 1] == ' ') + country_len--; + + const char *abbr = NULL; + if (country_len == 13 && strncmp(country_start, "United States", 13) == 0) + abbr = "USA"; + else if (country_len == 14 && strncmp(country_start, "United Kingdom", 14) == 0) + abbr = "UK"; + else if (country_len == 9 && strncmp(country_start, "Australia", 9) == 0) + abbr = "AUS"; + else if (country_len == 20 && strncmp(country_start, "United Arab Emirates", 20) == 0) + abbr = "UAE"; + else if (country_len == 12 && strncmp(country_start, "South Africa", 12) == 0) + abbr = "SA"; + + if (city_len > 0 && (abbr || country_len > 0)) { + if (abbr) { + snprintf(buffer, buffer_size, "%.*s, %s", (int)city_len, label, abbr); + } else { + snprintf(buffer, buffer_size, "%.*s, %.*s", (int)city_len, label, (int)country_len, + country_start); + } + buffer[buffer_size - 1] = '\0'; + return; } + } #endif - strncpy(buffer, label, buffer_size - 1); - buffer[buffer_size - 1] = '\0'; + strncpy(buffer, label, buffer_size - 1); + buffer[buffer_size - 1] = '\0'; } static void update_city_label_layer(GlobeView *view) { - if (!view || !view->city_label_layer) return; + if (!view || !view->city_label_layer) + return; - format_selected_label(view, view->city_label_text, - sizeof(view->city_label_text)); - text_layer_set_text(view->city_label_layer, view->city_label_text); + format_selected_label(view, view->city_label_text, sizeof(view->city_label_text)); + text_layer_set_text(view->city_label_layer, view->city_label_text); } static void set_text_layer_hidden(TextLayer *text_layer, bool hidden) { - if (text_layer) { - layer_set_hidden(text_layer_get_layer(text_layer), hidden); - } + if (text_layer) { + layer_set_hidden(text_layer_get_layer(text_layer), hidden); + } } #ifdef CONFIG_TOUCH static void set_free_roam_enabled(GlobeView *view, bool enabled) { - if (!view) return; + if (!view) + return; - if (enabled) { - cancel_city_animation(view); - cancel_bounce_animation(view); - view->hover_lock_active = false; - view->hover_city_index = -1; - } + if (enabled) { + cancel_city_animation(view); + cancel_bounce_animation(view); + view->hover_lock_active = false; + view->hover_city_index = -1; + } - view->is_free_roam = enabled; + view->is_free_roam = enabled; - if (view->is_revealed && !view->is_revealing) { - if (!enabled) { - update_city_label_layer(view); - } - set_text_layer_hidden(view->city_label_layer, - enabled && !view->hover_lock_active); - mark_dynamic_globe_dirty(view); + if (view->is_revealed && !view->is_revealing) { + if (!enabled) { + update_city_label_layer(view); } + set_text_layer_hidden(view->city_label_layer, enabled && !view->hover_lock_active); + mark_dynamic_globe_dirty(view); + } } #endif static void show_intro_canvas(GlobeView *view) { - if (!view) return; + if (!view) + return; - if (view->window) { - window_set_background_color(view->window, GColorWhite); - } - if (view->canvas_layer) layer_set_hidden(view->canvas_layer, false); - if (view->space_layer) layer_set_hidden(view->space_layer, true); - if (view->globe_layer) layer_set_hidden(view->globe_layer, true); - set_text_layer_hidden(view->city_label_layer, true); + if (view->window) { + window_set_background_color(view->window, GColorWhite); + } + if (view->canvas_layer) + layer_set_hidden(view->canvas_layer, false); + if (view->space_layer) + layer_set_hidden(view->space_layer, true); + if (view->globe_layer) + layer_set_hidden(view->globe_layer, true); + set_text_layer_hidden(view->city_label_layer, true); - if (view->canvas_layer) layer_mark_dirty(view->canvas_layer); + if (view->canvas_layer) + layer_mark_dirty(view->canvas_layer); } static void show_revealed_space_layers(GlobeView *view) { - if (!view) return; + if (!view) + return; - if (view->window) { - window_set_background_color(view->window, GColorBlack); - } - update_city_label_layer(view); + if (view->window) { + window_set_background_color(view->window, GColorBlack); + } + update_city_label_layer(view); - if (view->canvas_layer) layer_set_hidden(view->canvas_layer, true); - if (view->space_layer) { - layer_set_hidden(view->space_layer, false); - layer_mark_dirty(view->space_layer); - } - if (view->globe_layer) { - Layer *root_layer = window_get_root_layer(view->window); - layer_set_frame(view->globe_layer, - revealed_globe_layer_frame(layer_get_bounds(root_layer))); - layer_set_hidden(view->globe_layer, false); - layer_mark_dirty(view->globe_layer); - } + if (view->canvas_layer) + layer_set_hidden(view->canvas_layer, true); + if (view->space_layer) { + layer_set_hidden(view->space_layer, false); + layer_mark_dirty(view->space_layer); + } + if (view->globe_layer) { + Layer *root_layer = window_get_root_layer(view->window); + layer_set_frame(view->globe_layer, revealed_globe_layer_frame(layer_get_bounds(root_layer))); + layer_set_hidden(view->globe_layer, false); + layer_mark_dirty(view->globe_layer); + } #ifdef CONFIG_TOUCH - set_text_layer_hidden(view->city_label_layer, - view->is_free_roam && !view->hover_lock_active); + set_text_layer_hidden(view->city_label_layer, view->is_free_roam && !view->hover_lock_active); #else - set_text_layer_hidden(view->city_label_layer, view->is_free_roam); + set_text_layer_hidden(view->city_label_layer, view->is_free_roam); #endif } static void city_anim_update(Animation *anim, AnimationProgress progress) { - GlobeView *view = (GlobeView *)animation_get_context(anim); - if (!view) return; + GlobeView *view = (GlobeView *)animation_get_context(anim); + if (!view) + return; - view->city_anim_progress = progress; + view->city_anim_progress = progress; #ifdef CONFIG_TOUCH - if (view->hover_lock_active && view->hover_city_index >= 0) { - // Ease-out-BACK in the servo: eased exceeds MAX near the end, so - // `remaining` goes briefly negative and the pin swings a few px PAST - // center and settles back — a magnetic snap that self-scales with the - // capture distance. (Safe only here: the servo re-corrects per frame.) - int eased = ease_out_back(progress); - int remaining = ANIMATION_NORMALIZED_MAX - eased; - int target_dx = weather_scale_i32(view->city_anim_longitude_delta_e2, - remaining, - ANIMATION_NORMALIZED_MAX); - int target_dy = weather_scale_i32(view->city_anim_latitude_delta_e2, - remaining, - ANIMATION_NORMALIZED_MAX); - int current_dx; - int current_dy; - if (city_pin_offset_from_center(view, view->hover_city_index, - ¤t_dx, ¤t_dy)) { - int correction_x = target_dx - current_dx; - int correction_y = target_dy - current_dy; - if (correction_x || correction_y) { - apply_globe_screen_delta_q8( - view, - (int32_t)correction_x * GLOBE_Q8_ONE, - (int32_t)correction_y * GLOBE_Q8_ONE); - return; - } - } - mark_dynamic_globe_dirty(view); + if (view->hover_lock_active && view->hover_city_index >= 0) { + // Ease-out-BACK in the servo: eased exceeds MAX near the end, so + // `remaining` goes briefly negative and the pin swings a few px PAST + // center and settles back — a magnetic snap that self-scales with the + // capture distance. (Safe only here: the servo re-corrects per frame.) + int eased = ease_out_back(progress); + int remaining = ANIMATION_NORMALIZED_MAX - eased; + int target_dx = + weather_scale_i32(view->city_anim_longitude_delta_e2, remaining, ANIMATION_NORMALIZED_MAX); + int target_dy = + weather_scale_i32(view->city_anim_latitude_delta_e2, remaining, ANIMATION_NORMALIZED_MAX); + int current_dx; + int current_dy; + if (city_pin_offset_from_center(view, view->hover_city_index, ¤t_dx, ¤t_dy)) { + int correction_x = target_dx - current_dx; + int correction_y = target_dy - current_dy; + if (correction_x || correction_y) { + apply_globe_screen_delta_q8(view, (int32_t)correction_x * GLOBE_Q8_ONE, + (int32_t)correction_y * GLOBE_Q8_ONE); return; + } } + mark_dynamic_globe_dirty(view); + return; + } #endif - int eased = ease_out_quad(progress); - int32_t latitude_e2 = view->city_anim_start_latitude_e2 + - weather_scale_i32(view->city_anim_latitude_delta_e2, eased, - ANIMATION_NORMALIZED_MAX); - int32_t longitude_e2 = view->city_anim_start_longitude_e2 + - weather_scale_i32(view->city_anim_longitude_delta_e2, eased, - ANIMATION_NORMALIZED_MAX); - - set_color_orientation(view, latitude_e2, longitude_e2); - mark_dynamic_globe_dirty(view); + int eased = ease_out_quad(progress); + int32_t latitude_e2 = + view->city_anim_start_latitude_e2 + + weather_scale_i32(view->city_anim_latitude_delta_e2, eased, ANIMATION_NORMALIZED_MAX); + int32_t longitude_e2 = + view->city_anim_start_longitude_e2 + + weather_scale_i32(view->city_anim_longitude_delta_e2, eased, ANIMATION_NORMALIZED_MAX); + + set_color_orientation(view, latitude_e2, longitude_e2); + mark_dynamic_globe_dirty(view); } static void city_anim_stopped(Animation *anim, bool finished, void *context) { - GlobeView *view = (GlobeView *)context; - if (!view) return; + GlobeView *view = (GlobeView *)context; + if (!view) + return; - bool owns_anim = view->city_anim == anim; - if (owns_anim) { - view->city_anim = NULL; - } + bool owns_anim = view->city_anim == anim; + if (owns_anim) { + view->city_anim = NULL; + } #ifdef CONFIG_TOUCH - if (view->hover_lock_active && view->hover_city_index >= 0) { - if (owns_anim && finished) { - settle_city_pin_to_center(view, view->hover_city_index); - update_city_label_layer(view); - start_lock_pulse(view); // ring flash: target acquired - mark_dynamic_globe_dirty(view); - } - if (owns_anim) { - animation_destroy(anim); - } - return; - } -#endif - + if (view->hover_lock_active && view->hover_city_index >= 0) { if (owns_anim && finished) { - set_color_orientation(view, - view->city_anim_target_latitude_e2, - view->city_anim_target_longitude_e2); - reload_color_frame(view); - start_lock_pulse(view); // button-nav arrival gets the same pulse + settle_city_pin_to_center(view, view->hover_city_index); + update_city_label_layer(view); + start_lock_pulse(view); // ring flash: target acquired + mark_dynamic_globe_dirty(view); } - if (owns_anim) { - animation_destroy(anim); + animation_destroy(anim); } + return; + } +#endif + + if (owns_anim && finished) { + set_color_orientation(view, view->city_anim_target_latitude_e2, + view->city_anim_target_longitude_e2); + reload_color_frame(view); + start_lock_pulse(view); // button-nav arrival gets the same pulse + } + + if (owns_anim) { + animation_destroy(anim); + } } -static const AnimationImplementation s_city_anim_impl = { - .update = city_anim_update -}; +static const AnimationImplementation s_city_anim_impl = {.update = city_anim_update}; static void bounce_anim_update(Animation *anim, AnimationProgress progress) { - GlobeView *view = (GlobeView *)animation_get_context(anim); - if (!view) return; + GlobeView *view = (GlobeView *)animation_get_context(anim); + if (!view) + return; - view->bounce_progress = progress; - mark_dynamic_globe_dirty(view); + view->bounce_progress = progress; + mark_dynamic_globe_dirty(view); } static void bounce_anim_stopped(Animation *anim, bool finished, void *context) { - (void)finished; - GlobeView *view = (GlobeView *)context; - if (!view) return; - - bool owns_anim = view->bounce_anim == anim; - if (owns_anim) { - view->bounce_anim = NULL; - } - view->bounce_progress = 0; - mark_dynamic_globe_dirty(view); + (void)finished; + GlobeView *view = (GlobeView *)context; + if (!view) + return; + + bool owns_anim = view->bounce_anim == anim; + if (owns_anim) { + view->bounce_anim = NULL; + } + view->bounce_progress = 0; + mark_dynamic_globe_dirty(view); - if (owns_anim) { - animation_destroy(anim); - } + if (owns_anim) { + animation_destroy(anim); + } } -static const AnimationImplementation s_bounce_anim_impl = { - .update = bounce_anim_update -}; +static const AnimationImplementation s_bounce_anim_impl = {.update = bounce_anim_update}; // ---- Lock pulse: an expanding Celeste ring from the locked pin's head ---- static void lock_pulse_anim_update(Animation *anim, AnimationProgress progress) { - GlobeView *view = (GlobeView *)animation_get_context(anim); - if (!view) return; + GlobeView *view = (GlobeView *)animation_get_context(anim); + if (!view) + return; - view->lock_pulse_progress = progress; - mark_dynamic_globe_dirty(view); + view->lock_pulse_progress = progress; + mark_dynamic_globe_dirty(view); } static void lock_pulse_anim_stopped(Animation *anim, bool finished, void *context) { - (void)finished; - GlobeView *view = (GlobeView *)context; - if (!view) return; - - bool owns_anim = view->lock_pulse_anim == anim; - if (owns_anim) { - view->lock_pulse_anim = NULL; - } - view->lock_pulse_progress = 0; - mark_dynamic_globe_dirty(view); + (void)finished; + GlobeView *view = (GlobeView *)context; + if (!view) + return; + + bool owns_anim = view->lock_pulse_anim == anim; + if (owns_anim) { + view->lock_pulse_anim = NULL; + } + view->lock_pulse_progress = 0; + mark_dynamic_globe_dirty(view); - if (owns_anim) { - animation_destroy(anim); - } + if (owns_anim) { + animation_destroy(anim); + } } -static const AnimationImplementation s_lock_pulse_anim_impl = { - .update = lock_pulse_anim_update -}; +static const AnimationImplementation s_lock_pulse_anim_impl = {.update = lock_pulse_anim_update}; static void cancel_lock_pulse_animation(GlobeView *view) { - if (view) cancel_animation_slot(&view->lock_pulse_anim); + if (view) + cancel_animation_slot(&view->lock_pulse_anim); } -static Animation *start_view_animation(GlobeView *view, uint32_t duration_ms, - AnimationCurve curve, +static Animation *start_view_animation(GlobeView *view, uint32_t duration_ms, AnimationCurve curve, const AnimationImplementation *impl, AnimationStoppedHandler stopped); static void start_lock_pulse(GlobeView *view) { - if (!view) return; - cancel_lock_pulse_animation(view); - view->lock_pulse_progress = 0; - view->lock_pulse_anim = start_view_animation(view, - GLOBE_LOCK_PULSE_DURATION_MS, - AnimationCurveLinear, - &s_lock_pulse_anim_impl, - lock_pulse_anim_stopped); - // The haptic nudge, landing with the ring. Emery keeps the original whisper tick - // (25ms @ 25%). Round runs FIRMER (45ms @ 70%): the softer pulse was imperceptible on - // the round hardware — a pulse this short at low amplitude can sit under the vibe - // motor's start-up threshold, so it must be long/strong enough to actually spin up. - // Still a tick, nowhere near a notification buzz (those are 100s of ms at 100%). - static const uint32_t nudge_ms[] = { PBL_IF_ROUND_ELSE(45, 25) }; - static const uint32_t nudge_amp[] = { PBL_IF_ROUND_ELSE(70, 25) }; - vibes_enqueue_custom_pattern_with_amplitudes((VibePatternWithAmplitudes){ - .durations = nudge_ms, - .amplitudes = nudge_amp, - .num_segments = 1, - }); + if (!view) + return; + cancel_lock_pulse_animation(view); + view->lock_pulse_progress = 0; + view->lock_pulse_anim = + start_view_animation(view, GLOBE_LOCK_PULSE_DURATION_MS, AnimationCurveLinear, + &s_lock_pulse_anim_impl, lock_pulse_anim_stopped); + // The haptic nudge, landing with the ring. Emery keeps the original whisper tick + // (25ms @ 25%). Round runs FIRMER (45ms @ 70%): the softer pulse was imperceptible on + // the round hardware — a pulse this short at low amplitude can sit under the vibe + // motor's start-up threshold, so it must be long/strong enough to actually spin up. + // Still a tick, nowhere near a notification buzz (those are 100s of ms at 100%). + static const uint32_t nudge_ms[] = {PBL_IF_ROUND_ELSE(45, 25)}; + static const uint32_t nudge_amp[] = {PBL_IF_ROUND_ELSE(70, 25)}; + vibes_enqueue_custom_pattern_with_amplitudes((VibePatternWithAmplitudes){ + .durations = nudge_ms, + .amplitudes = nudge_amp, + .num_segments = 1, + }); } // Shared boilerplate for the view's stopped-handler animations: create, // configure, schedule. Returns the animation (NULL if creation failed) so // callers can store it in their slot; behavior matches the previous inline // sequences (applib animation_* functions tolerate NULL). -static Animation *start_view_animation(GlobeView *view, uint32_t duration_ms, - AnimationCurve curve, +static Animation *start_view_animation(GlobeView *view, uint32_t duration_ms, AnimationCurve curve, const AnimationImplementation *impl, AnimationStoppedHandler stopped) { - Animation *anim = animation_create(); - animation_set_duration(anim, duration_ms); - animation_set_curve(anim, curve); - animation_set_implementation(anim, impl); - animation_set_handlers(anim, (AnimationHandlers){ .stopped = stopped }, - view); - animation_schedule(anim); - return anim; + Animation *anim = animation_create(); + animation_set_duration(anim, duration_ms); + animation_set_curve(anim, curve); + animation_set_implementation(anim, impl); + animation_set_handlers(anim, (AnimationHandlers){.stopped = stopped}, view); + animation_schedule(anim); + return anim; } static void start_city_bounce(GlobeView *view, bool is_down) { - if (!view) return; + if (!view) + return; - cancel_bounce_animation(view); - view->bounce_direction = is_down ? -1 : 1; - view->bounce_progress = 0; - view->bounce_anim = start_view_animation(view, - GLOBE_CITY_BOUNCE_DURATION_MS, - AnimationCurveEaseOut, - &s_bounce_anim_impl, - bounce_anim_stopped); + cancel_bounce_animation(view); + view->bounce_direction = is_down ? -1 : 1; + view->bounce_progress = 0; + view->bounce_anim = + start_view_animation(view, GLOBE_CITY_BOUNCE_DURATION_MS, AnimationCurveEaseOut, + &s_bounce_anim_impl, bounce_anim_stopped); } static void start_city_rotation(GlobeView *view, int city_index) { - if (!view || view->city_anim) return; + if (!view || view->city_anim) + return; - if (!selected_city_is_valid(view, city_index)) return; + if (!selected_city_is_valid(view, city_index)) + return; #ifdef CONFIG_TOUCH - stop_globe_coast(view, false); + stop_globe_coast(view, false); #endif - cancel_bounce_animation(view); - view->selected_city_index = city_index; + cancel_bounce_animation(view); + view->selected_city_index = city_index; #ifdef CONFIG_TOUCH - set_free_roam_enabled(view, false); - view->hover_lock_active = false; - view->hover_city_index = -1; + set_free_roam_enabled(view, false); + view->hover_lock_active = false; + view->hover_city_index = -1; #endif - view->city_anim_start_latitude_e2 = view->color_latitude_e2; - view->city_anim_start_longitude_e2 = view->color_longitude_e2; - view->city_anim_target_latitude_e2 = selected_city_latitude_e2(view); - view->city_anim_target_longitude_e2 = selected_city_longitude_e2(view); - view->city_anim_latitude_delta_e2 = view->city_anim_target_latitude_e2 - - view->city_anim_start_latitude_e2; - view->city_anim_longitude_delta_e2 = shortest_longitude_delta_e2( - view->city_anim_start_longitude_e2, - view->city_anim_target_longitude_e2); - view->city_anim_progress = 0; - - if (view->city_anim_longitude_delta_e2 == 0 && - view->city_anim_latitude_delta_e2 == 0) { - update_city_label_layer(view); - mark_dynamic_globe_dirty(view); - return; - } - - // Linear: city_anim_update applies ease_out_quad itself — a curved - // AnimationCurve here would double-ease into mush (brisk start, crisp - // landing is the point; the arrival pulse supplies the punctuation). - view->city_anim = start_view_animation(view, - GLOBE_CITY_ROTATION_DURATION_MS, - AnimationCurveLinear, - &s_city_anim_impl, - city_anim_stopped); + view->city_anim_start_latitude_e2 = view->color_latitude_e2; + view->city_anim_start_longitude_e2 = view->color_longitude_e2; + view->city_anim_target_latitude_e2 = selected_city_latitude_e2(view); + view->city_anim_target_longitude_e2 = selected_city_longitude_e2(view); + view->city_anim_latitude_delta_e2 = + view->city_anim_target_latitude_e2 - view->city_anim_start_latitude_e2; + view->city_anim_longitude_delta_e2 = shortest_longitude_delta_e2( + view->city_anim_start_longitude_e2, view->city_anim_target_longitude_e2); + view->city_anim_progress = 0; + + if (view->city_anim_longitude_delta_e2 == 0 && view->city_anim_latitude_delta_e2 == 0) { update_city_label_layer(view); mark_dynamic_globe_dirty(view); + return; + } + + // Linear: city_anim_update applies ease_out_quad itself — a curved + // AnimationCurve here would double-ease into mush (brisk start, crisp + // landing is the point; the arrival pulse supplies the punctuation). + view->city_anim = + start_view_animation(view, GLOBE_CITY_ROTATION_DURATION_MS, AnimationCurveLinear, + &s_city_anim_impl, city_anim_stopped); + update_city_label_layer(view); + mark_dynamic_globe_dirty(view); } #ifdef CONFIG_TOUCH @@ -2572,623 +2546,576 @@ static void start_city_rotation(GlobeView *view, int city_index) { // A pin still moving AWAY from center is not captured — the coast tick // retries at dead-stop, so a retrograde fling locks gently from standstill // instead of being yanked mid-flight. -static bool try_start_magnetic_city_lock_v(GlobeView *view, int radius_px, - int32_t vx_q8, int32_t vy_q8) { - if (!view || view->city_anim) return false; - - int city_index = nearest_centered_city_index(view, radius_px); - if (city_index < 0) return false; - - int start_dx = 0; - int start_dy = 0; - bool has_offset = city_pin_offset_from_center(view, city_index, - &start_dx, &start_dy); - int deadzone_sq = GLOBE_LOCK_SETTLE_DEADZONE_PX * - GLOBE_LOCK_SETTLE_DEADZONE_PX; - - if ((vx_q8 | vy_q8) != 0 && has_offset) { - // Directional gate: coast deltas move the pin WITH the velocity, so a - // positive dot product = the pin is receding from center — defer. - int32_t dot = vx_q8 * start_dx + vy_q8 * start_dy; - if (dot > 0) return false; - } +static bool try_start_magnetic_city_lock_v(GlobeView *view, int radius_px, int32_t vx_q8, + int32_t vy_q8) { + if (!view || view->city_anim) + return false; + + int city_index = nearest_centered_city_index(view, radius_px); + if (city_index < 0) + return false; + + int start_dx = 0; + int start_dy = 0; + bool has_offset = city_pin_offset_from_center(view, city_index, &start_dx, &start_dy); + int deadzone_sq = GLOBE_LOCK_SETTLE_DEADZONE_PX * GLOBE_LOCK_SETTLE_DEADZONE_PX; + + if ((vx_q8 | vy_q8) != 0 && has_offset) { + // Directional gate: coast deltas move the pin WITH the velocity, so a + // positive dot product = the pin is receding from center — defer. + int32_t dot = vx_q8 * start_dx + vy_q8 * start_dy; + if (dot > 0) + return false; + } - stop_globe_coast(view, false); - cancel_bounce_animation(view); - view->selected_city_index = city_index; - view->hover_city_index = city_index; - view->hover_lock_active = true; - set_free_roam_enabled(view, false); + stop_globe_coast(view, false); + cancel_bounce_animation(view); + view->selected_city_index = city_index; + view->hover_city_index = city_index; + view->hover_lock_active = true; + set_free_roam_enabled(view, false); - if (!has_offset || (start_dx * start_dx) + (start_dy * start_dy) <= - deadzone_sq) { - start_lock_pulse(view); // instant lock (already centered) - mark_dynamic_globe_dirty(view); - return true; - } + if (!has_offset || (start_dx * start_dx) + (start_dy * start_dy) <= deadzone_sq) { + start_lock_pulse(view); // instant lock (already centered) + mark_dynamic_globe_dirty(view); + return true; + } - view->city_anim_start_latitude_e2 = view->color_latitude_e2; - view->city_anim_start_longitude_e2 = view->color_longitude_e2; - view->city_anim_target_latitude_e2 = view->color_latitude_e2; - view->city_anim_target_longitude_e2 = view->color_longitude_e2; - view->city_anim_latitude_delta_e2 = start_dy; - view->city_anim_longitude_delta_e2 = start_dx; - view->city_anim_progress = 0; - - // Swoop duration proportional to the capture distance: a 5px capture no - // longer crawls and a 49px capture no longer whips. - int dist_px = weather_isqrt(start_dx * start_dx + start_dy * start_dy); - uint32_t swoop_ms = GLOBE_LOCK_SWOOP_BASE_MS + - (uint32_t)dist_px * GLOBE_LOCK_SWOOP_MS_PER_PX; - if (swoop_ms < GLOBE_LOCK_SWOOP_MIN_MS) swoop_ms = GLOBE_LOCK_SWOOP_MIN_MS; - if (swoop_ms > GLOBE_LOCK_SWOOP_DURATION_MS) { - swoop_ms = GLOBE_LOCK_SWOOP_DURATION_MS; - } + view->city_anim_start_latitude_e2 = view->color_latitude_e2; + view->city_anim_start_longitude_e2 = view->color_longitude_e2; + view->city_anim_target_latitude_e2 = view->color_latitude_e2; + view->city_anim_target_longitude_e2 = view->color_longitude_e2; + view->city_anim_latitude_delta_e2 = start_dy; + view->city_anim_longitude_delta_e2 = start_dx; + view->city_anim_progress = 0; + + // Swoop duration proportional to the capture distance: a 5px capture no + // longer crawls and a 49px capture no longer whips. + int dist_px = weather_isqrt(start_dx * start_dx + start_dy * start_dy); + uint32_t swoop_ms = GLOBE_LOCK_SWOOP_BASE_MS + (uint32_t)dist_px * GLOBE_LOCK_SWOOP_MS_PER_PX; + if (swoop_ms < GLOBE_LOCK_SWOOP_MIN_MS) + swoop_ms = GLOBE_LOCK_SWOOP_MIN_MS; + if (swoop_ms > GLOBE_LOCK_SWOOP_DURATION_MS) { + swoop_ms = GLOBE_LOCK_SWOOP_DURATION_MS; + } - // Linear is MANDATORY: city_anim_update's servo applies ease_out_back - // itself; a curved AnimationCurve would compose with it and distort. - view->city_anim = start_view_animation(view, - swoop_ms, - AnimationCurveLinear, - &s_city_anim_impl, - city_anim_stopped); - if (!view->city_anim) { - settle_city_pin_to_center(view, city_index); - mark_dynamic_globe_dirty(view); - } - return true; + // Linear is MANDATORY: city_anim_update's servo applies ease_out_back + // itself; a curved AnimationCurve would compose with it and distort. + view->city_anim = start_view_animation(view, swoop_ms, AnimationCurveLinear, &s_city_anim_impl, + city_anim_stopped); + if (!view->city_anim) { + settle_city_pin_to_center(view, city_index); + mark_dynamic_globe_dirty(view); + } + return true; } static bool try_start_magnetic_city_lock(GlobeView *view, int radius_px) { - return try_start_magnetic_city_lock_v(view, radius_px, 0, 0); + return try_start_magnetic_city_lock_v(view, radius_px, 0, 0); } #endif static void navigate_city(GlobeView *view, bool is_down) { - if (!view || view->city_anim) return; + if (!view || view->city_anim) + return; #ifdef CONFIG_TOUCH - stop_globe_coast(view, false); - if (view->is_free_roam) { - int nearest_index = nearest_centered_city_index(view, revealed_globe_radius()); - view->selected_city_index = nearest_index >= 0 - ? nearest_index - : nearest_city_index_for_orientation(view); - set_free_roam_enabled(view, false); - } + stop_globe_coast(view, false); + if (view->is_free_roam) { + int nearest_index = nearest_centered_city_index(view, revealed_globe_radius()); + view->selected_city_index = + nearest_index >= 0 ? nearest_index : nearest_city_index_for_orientation(view); + set_free_roam_enabled(view, false); + } #endif - int current_index = view->selected_city_index; - int max_index = globe_max_selector_index(view); - int next_index = current_index; - int selector_count = view->saved_entry_count > 0 ? view->saved_entry_count : 1; - for (int attempt = 0; attempt < selector_count; attempt++) { - next_index += is_down ? 1 : -1; - if (next_index > max_index) { - next_index = 0; - } else if (next_index < 0) { - next_index = max_index; - } + int current_index = view->selected_city_index; + int max_index = globe_max_selector_index(view); + int next_index = current_index; + int selector_count = view->saved_entry_count > 0 ? view->saved_entry_count : 1; + for (int attempt = 0; attempt < selector_count; attempt++) { + next_index += is_down ? 1 : -1; + if (next_index > max_index) { + next_index = 0; + } else if (next_index < 0) { + next_index = max_index; + } - if (selected_city_is_valid(view, next_index)) { - start_city_rotation(view, next_index); - return; - } + if (selected_city_is_valid(view, next_index)) { + start_city_rotation(view, next_index); + return; } + } - start_city_bounce(view, is_down); + start_city_bounce(view, is_down); } #ifdef CONFIG_TOUCH __attribute__((noinline)) static int32_t clamp_globe_velocity_q8(int32_t value) { - if (value > GLOBE_COAST_MAX_SPEED_Q8) return GLOBE_COAST_MAX_SPEED_Q8; - if (value < -GLOBE_COAST_MAX_SPEED_Q8) return -GLOBE_COAST_MAX_SPEED_Q8; - return value; -} - -static void apply_globe_screen_delta_q8(GlobeView *view, - int32_t dx_q8, - int32_t dy_q8) { - if (!view || !view->is_revealed || view->is_revealing) return; - if (dx_q8 == 0 && dy_q8 == 0) { - return; - } + if (value > GLOBE_COAST_MAX_SPEED_Q8) + return GLOBE_COAST_MAX_SPEED_Q8; + if (value < -GLOBE_COAST_MAX_SPEED_Q8) + return -GLOBE_COAST_MAX_SPEED_Q8; + return value; +} + +static void apply_globe_screen_delta_q8(GlobeView *view, int32_t dx_q8, int32_t dy_q8) { + if (!view || !view->is_revealed || view->is_revealing) + return; + if (dx_q8 == 0 && dy_q8 == 0) { + return; + } - int yaw_angle = -(dx_q8 * GLOBE_DRAG_TRIGANGLE_PER_PX) / GLOBE_Q8_ONE; - int pitch_angle = -(dy_q8 * GLOBE_DRAG_TRIGANGLE_PER_PX) / GLOBE_Q8_ONE; - if (yaw_angle == 0 && pitch_angle == 0) return; - - int32_t delta[9]; - int32_t next[9]; - matrix_screen_rotation(delta, yaw_angle, pitch_angle); - matrix_multiply(next, view->globe_rotation, delta); - - matrix_copy(view->globe_rotation, next); - normalize_globe_rotation(view); - - view->color_longitude_e2 = normalize_longitude_e2( - view->color_longitude_e2 - ((dx_q8 * 86) / GLOBE_Q8_ONE)); - view->color_latitude_e2 = clamp_latitude_e2( - view->color_latitude_e2 - ((dy_q8 * 86) / GLOBE_Q8_ONE)); - view->starfield_offset_x_q8 -= (dx_q8 * 34400) / 36000; - view->starfield_offset_y_q8 -= dy_q8; - view->current_frame = bw_frame_for_longitude_e2((int16_t)view->color_longitude_e2); - sync_bw_elapsed_to_current_frame(view); - mark_dynamic_globe_dirty(view); + int yaw_angle = -(dx_q8 * GLOBE_DRAG_TRIGANGLE_PER_PX) / GLOBE_Q8_ONE; + int pitch_angle = -(dy_q8 * GLOBE_DRAG_TRIGANGLE_PER_PX) / GLOBE_Q8_ONE; + if (yaw_angle == 0 && pitch_angle == 0) + return; + + int32_t delta[9]; + int32_t next[9]; + matrix_screen_rotation(delta, yaw_angle, pitch_angle); + matrix_multiply(next, view->globe_rotation, delta); + + matrix_copy(view->globe_rotation, next); + normalize_globe_rotation(view); + + view->color_longitude_e2 = + normalize_longitude_e2(view->color_longitude_e2 - ((dx_q8 * 86) / GLOBE_Q8_ONE)); + view->color_latitude_e2 = + clamp_latitude_e2(view->color_latitude_e2 - ((dy_q8 * 86) / GLOBE_Q8_ONE)); + view->starfield_offset_x_q8 -= (dx_q8 * 34400) / 36000; + view->starfield_offset_y_q8 -= dy_q8; + view->current_frame = bw_frame_for_longitude_e2((int16_t)view->color_longitude_e2); + sync_bw_elapsed_to_current_frame(view); + mark_dynamic_globe_dirty(view); } -static void begin_globe_drag_capture(GlobeView *view, - int16_t x, - int16_t y, - bool whole_screen) { - if (!view || !view->is_revealed || view->is_revealing) return; +static void begin_globe_drag_capture(GlobeView *view, int16_t x, int16_t y, bool whole_screen) { + if (!view || !view->is_revealed || view->is_revealing) + return; - view->touch_down_on_globe = point_is_on_revealed_globe(view, x, y); - view->touch_controls_globe = whole_screen || view->touch_down_on_globe; - if (!view->touch_controls_globe) return; + view->touch_down_on_globe = point_is_on_revealed_globe(view, x, y); + view->touch_controls_globe = whole_screen || view->touch_down_on_globe; + if (!view->touch_controls_globe) + return; - stop_globe_coast(view, false); - cancel_city_animation(view); - cancel_bounce_animation(view); - set_free_roam_enabled(view, true); - view->touch_start_x = x; - view->touch_start_y = y; - view->touch_last_x = x; - view->touch_last_y = y; - view->touch_velocity_x_q8 = 0; - view->touch_velocity_y_q8 = 0; - view->coast_velocity_x_q8 = 0; - view->coast_velocity_y_q8 = 0; - view->touch_drag_axis_set = false; - view->touch_drag_rotated = false; + stop_globe_coast(view, false); + cancel_city_animation(view); + cancel_bounce_animation(view); + set_free_roam_enabled(view, true); + view->touch_start_x = x; + view->touch_start_y = y; + view->touch_last_x = x; + view->touch_last_y = y; + view->touch_velocity_x_q8 = 0; + view->touch_velocity_y_q8 = 0; + view->coast_velocity_x_q8 = 0; + view->coast_velocity_y_q8 = 0; + view->touch_drag_axis_set = false; + view->touch_drag_rotated = false; } static void update_globe_drag(GlobeView *view, int16_t x, int16_t y) { - if (!view || !view->touch_controls_globe || - !view->is_revealed || view->is_revealing) return; - - int16_t dx = x - view->touch_last_x; - int16_t dy = y - view->touch_last_y; - if (dx == 0 && dy == 0) return; - - apply_globe_screen_delta_q8(view, - (int32_t)dx * GLOBE_Q8_ONE, - (int32_t)dy * GLOBE_Q8_ONE); - - view->touch_last_x = x; - view->touch_last_y = y; - view->touch_velocity_x_q8 = clamp_globe_velocity_q8( - ((view->touch_velocity_x_q8 * 3) + ((int32_t)dx * GLOBE_Q8_ONE)) / 4); - view->touch_velocity_y_q8 = clamp_globe_velocity_q8( - ((view->touch_velocity_y_q8 * 3) + ((int32_t)dy * GLOBE_Q8_ONE)) / 4); - view->coast_velocity_x_q8 = view->touch_velocity_x_q8; - view->coast_velocity_y_q8 = view->touch_velocity_y_q8; - - int16_t total_dx = x - view->touch_start_x; - int16_t total_dy = y - view->touch_start_y; - int16_t total_adx = total_dx < 0 ? -total_dx : total_dx; - int16_t total_ady = total_dy < 0 ? -total_dy : total_dy; - if (total_adx > GLOBE_DRAG_AXIS_THRESHOLD || - total_ady > GLOBE_DRAG_AXIS_THRESHOLD) { - view->touch_drag_axis_set = true; - view->touch_drag_rotated = true; - } + if (!view || !view->touch_controls_globe || !view->is_revealed || view->is_revealing) + return; + + int16_t dx = x - view->touch_last_x; + int16_t dy = y - view->touch_last_y; + if (dx == 0 && dy == 0) + return; + + apply_globe_screen_delta_q8(view, (int32_t)dx * GLOBE_Q8_ONE, (int32_t)dy * GLOBE_Q8_ONE); + + view->touch_last_x = x; + view->touch_last_y = y; + view->touch_velocity_x_q8 = + clamp_globe_velocity_q8(((view->touch_velocity_x_q8 * 3) + ((int32_t)dx * GLOBE_Q8_ONE)) / 4); + view->touch_velocity_y_q8 = + clamp_globe_velocity_q8(((view->touch_velocity_y_q8 * 3) + ((int32_t)dy * GLOBE_Q8_ONE)) / 4); + view->coast_velocity_x_q8 = view->touch_velocity_x_q8; + view->coast_velocity_y_q8 = view->touch_velocity_y_q8; + + int16_t total_dx = x - view->touch_start_x; + int16_t total_dy = y - view->touch_start_y; + int16_t total_adx = total_dx < 0 ? -total_dx : total_dx; + int16_t total_ady = total_dy < 0 ? -total_dy : total_dy; + if (total_adx > GLOBE_DRAG_AXIS_THRESHOLD || total_ady > GLOBE_DRAG_AXIS_THRESHOLD) { + view->touch_drag_axis_set = true; + view->touch_drag_rotated = true; + } } static void globe_coast_timer_handler(void *context) { - GlobeView *view = (GlobeView *)context; - if (!view) return; - - view->coast_timer = NULL; - if (!view->coast_active || view->touch_active || - !view->is_revealed || view->is_revealing) { - view->coast_active = false; - view->coast_velocity_x_q8 = 0; - view->coast_velocity_y_q8 = 0; - return; - } + GlobeView *view = (GlobeView *)context; + if (!view) + return; - apply_globe_screen_delta_q8(view, - (view->coast_velocity_x_q8 * - GLOBE_COAST_STEP_NUM) / - GLOBE_COAST_STEP_DEN, - (view->coast_velocity_y_q8 * - GLOBE_COAST_STEP_NUM) / - GLOBE_COAST_STEP_DEN); - - view->coast_velocity_x_q8 = - (view->coast_velocity_x_q8 * GLOBE_COAST_DECAY_NUM) / - GLOBE_COAST_DECAY_DEN; - view->coast_velocity_y_q8 = - (view->coast_velocity_y_q8 * GLOBE_COAST_DECAY_NUM) / - GLOBE_COAST_DECAY_DEN; - - int32_t speed = abs_i32(view->coast_velocity_x_q8) + - abs_i32(view->coast_velocity_y_q8); - if (speed <= GLOBE_COAST_SETTLE_SPEED_Q8 && - try_start_magnetic_city_lock_v(view, GLOBE_LOCK_RADIUS_PX, - view->coast_velocity_x_q8, - view->coast_velocity_y_q8)) { - return; - } + view->coast_timer = NULL; + if (!view->coast_active || view->touch_active || !view->is_revealed || view->is_revealing) { + view->coast_active = false; + view->coast_velocity_x_q8 = 0; + view->coast_velocity_y_q8 = 0; + return; + } - if (speed <= GLOBE_COAST_MIN_SPEED_Q8) { - view->coast_active = false; - view->coast_velocity_x_q8 = 0; - view->coast_velocity_y_q8 = 0; - // Dead-stop retry: a lock deferred by the directional gate (pin was - // still receding mid-flight) captures gently now that we're still. - if (try_start_magnetic_city_lock(view, GLOBE_LOCK_RADIUS_PX)) { - return; - } - mark_dynamic_globe_dirty(view); - return; + apply_globe_screen_delta_q8( + view, (view->coast_velocity_x_q8 * GLOBE_COAST_STEP_NUM) / GLOBE_COAST_STEP_DEN, + (view->coast_velocity_y_q8 * GLOBE_COAST_STEP_NUM) / GLOBE_COAST_STEP_DEN); + + view->coast_velocity_x_q8 = + (view->coast_velocity_x_q8 * GLOBE_COAST_DECAY_NUM) / GLOBE_COAST_DECAY_DEN; + view->coast_velocity_y_q8 = + (view->coast_velocity_y_q8 * GLOBE_COAST_DECAY_NUM) / GLOBE_COAST_DECAY_DEN; + + int32_t speed = abs_i32(view->coast_velocity_x_q8) + abs_i32(view->coast_velocity_y_q8); + if (speed <= GLOBE_COAST_SETTLE_SPEED_Q8 && + try_start_magnetic_city_lock_v(view, GLOBE_LOCK_RADIUS_PX, view->coast_velocity_x_q8, + view->coast_velocity_y_q8)) { + return; + } + + if (speed <= GLOBE_COAST_MIN_SPEED_Q8) { + view->coast_active = false; + view->coast_velocity_x_q8 = 0; + view->coast_velocity_y_q8 = 0; + // Dead-stop retry: a lock deferred by the directional gate (pin was + // still receding mid-flight) captures gently now that we're still. + if (try_start_magnetic_city_lock(view, GLOBE_LOCK_RADIUS_PX)) { + return; } + mark_dynamic_globe_dirty(view); + return; + } - view->coast_timer = app_timer_register(GLOBE_COAST_FRAME_MS, - globe_coast_timer_handler, - view); + view->coast_timer = app_timer_register(GLOBE_COAST_FRAME_MS, globe_coast_timer_handler, view); } static bool start_globe_coast(GlobeView *view) { - if (!view || !view->is_revealed || view->is_revealing) return false; - - int32_t vx = clamp_globe_velocity_q8(view->touch_velocity_x_q8 * 5 / 4); - int32_t vy = clamp_globe_velocity_q8(view->touch_velocity_y_q8 * 5 / 4); - int32_t speed = abs_i32(vx) + abs_i32(vy); - if (speed < GLOBE_COAST_START_SPEED_Q8) { - view->coast_active = false; - view->coast_velocity_x_q8 = 0; - view->coast_velocity_y_q8 = 0; - return false; - } + if (!view || !view->is_revealed || view->is_revealing) + return false; - stop_globe_coast(view, false); - view->coast_velocity_x_q8 = vx; - view->coast_velocity_y_q8 = vy; - view->coast_active = true; - view->coast_timer = app_timer_register(GLOBE_COAST_FRAME_MS, - globe_coast_timer_handler, - view); - return true; + int32_t vx = clamp_globe_velocity_q8(view->touch_velocity_x_q8 * 5 / 4); + int32_t vy = clamp_globe_velocity_q8(view->touch_velocity_y_q8 * 5 / 4); + int32_t speed = abs_i32(vx) + abs_i32(vy); + if (speed < GLOBE_COAST_START_SPEED_Q8) { + view->coast_active = false; + view->coast_velocity_x_q8 = 0; + view->coast_velocity_y_q8 = 0; + return false; + } + + stop_globe_coast(view, false); + view->coast_velocity_x_q8 = vx; + view->coast_velocity_y_q8 = vy; + view->coast_active = true; + view->coast_timer = app_timer_register(GLOBE_COAST_FRAME_MS, globe_coast_timer_handler, view); + return true; } #endif static void reveal_anim_update(Animation *anim, AnimationProgress progress) { - GlobeView *view = (GlobeView *)animation_get_context(anim); - if (!view) return; - - view->reveal_progress = progress; - int32_t next_latitude_e2; - int32_t next_longitude_e2; - if (view->reveal_direction > 0) { - int eased = ease_out_quad(progress); - int32_t lon_delta = shortest_longitude_delta_e2( - view->transition_color_start_longitude_e2, - view->transition_color_target_longitude_e2); - int32_t lat_delta = view->transition_color_target_latitude_e2 - - view->transition_color_start_latitude_e2; - next_latitude_e2 = view->transition_color_start_latitude_e2 + - weather_scale_i32(lat_delta, eased, ANIMATION_NORMALIZED_MAX); - int32_t base_longitude_e2 = view->transition_color_start_longitude_e2 + - weather_scale_i32(lon_delta, eased, ANIMATION_NORMALIZED_MAX); - int spin_eased = ease_out_quad(color_transition_grow_progress(progress)); - int32_t reveal_spin_e2 = - weather_scale_i32(GLOBE_REVEAL_COLOR_SPIN_DEGREES_E2, - spin_eased, ANIMATION_NORMALIZED_MAX); - next_longitude_e2 = normalize_longitude_e2(base_longitude_e2 - reveal_spin_e2); - } else { - next_latitude_e2 = 0; - next_longitude_e2 = normalize_longitude_e2( - view->transition_color_start_longitude_e2 - - weather_scale_i32((int32_t)progress, - GLOBE_REVEAL_SPIN_STEPS * 1500, - ANIMATION_NORMALIZED_MAX)); - } + GlobeView *view = (GlobeView *)animation_get_context(anim); + if (!view) + return; + + view->reveal_progress = progress; + int32_t next_latitude_e2; + int32_t next_longitude_e2; + if (view->reveal_direction > 0) { + int eased = ease_out_quad(progress); + int32_t lon_delta = shortest_longitude_delta_e2(view->transition_color_start_longitude_e2, + view->transition_color_target_longitude_e2); + int32_t lat_delta = + view->transition_color_target_latitude_e2 - view->transition_color_start_latitude_e2; + next_latitude_e2 = view->transition_color_start_latitude_e2 + + weather_scale_i32(lat_delta, eased, ANIMATION_NORMALIZED_MAX); + int32_t base_longitude_e2 = view->transition_color_start_longitude_e2 + + weather_scale_i32(lon_delta, eased, ANIMATION_NORMALIZED_MAX); + int spin_eased = ease_out_quad(color_transition_grow_progress(progress)); + int32_t reveal_spin_e2 = + weather_scale_i32(GLOBE_REVEAL_COLOR_SPIN_DEGREES_E2, spin_eased, ANIMATION_NORMALIZED_MAX); + next_longitude_e2 = normalize_longitude_e2(base_longitude_e2 - reveal_spin_e2); + } else { + next_latitude_e2 = 0; + next_longitude_e2 = + normalize_longitude_e2(view->transition_color_start_longitude_e2 - + weather_scale_i32((int32_t)progress, GLOBE_REVEAL_SPIN_STEPS * 1500, + ANIMATION_NORMALIZED_MAX)); + } - set_color_orientation(view, next_latitude_e2, next_longitude_e2); - if (view->reveal_direction < 0) { - view->transition_bw_frame = view->current_frame; - } - layer_mark_dirty(view->canvas_layer); + set_color_orientation(view, next_latitude_e2, next_longitude_e2); + if (view->reveal_direction < 0) { + view->transition_bw_frame = view->current_frame; + } + layer_mark_dirty(view->canvas_layer); } static void reveal_anim_stopped(Animation *anim, bool finished, void *context) { - GlobeView *view = (GlobeView *)context; - if (!view) return; + GlobeView *view = (GlobeView *)context; + if (!view) + return; - bool owns_anim = view->reveal_anim == anim; - if (owns_anim) { - view->reveal_anim = NULL; - } - view->is_revealing = false; + bool owns_anim = view->reveal_anim == anim; + if (owns_anim) { + view->reveal_anim = NULL; + } + view->is_revealing = false; - if (owns_anim && finished) { - view->is_revealed = view->reveal_direction > 0; - view->reveal_progress = 0; - if (view->is_revealed) { - set_color_orientation(view, - view->transition_color_target_latitude_e2, - view->transition_color_target_longitude_e2); - cancel_timer_slot(&view->animation_timer); - show_revealed_space_layers(view); - } else { - view->is_free_roam = false; - int landed_bw_frame = bw_frame_index_for_view(view, view->current_frame); - view->transition_bw_frame = landed_bw_frame; - set_color_orientation(view, 0, - longitude_e2_for_bw_frame(landed_bw_frame)); - view->current_frame = landed_bw_frame; - sync_bw_elapsed_to_current_frame(view); - view->bw_idle = false; - view->bw_idle_slowdown_step = 0; - if (view->is_animating && !view->animation_timer) { - schedule_frame_timer(view); - } - start_globe_idle_timer(view); - show_intro_canvas(view); - } + if (owns_anim && finished) { + view->is_revealed = view->reveal_direction > 0; + view->reveal_progress = 0; + if (view->is_revealed) { + set_color_orientation(view, view->transition_color_target_latitude_e2, + view->transition_color_target_longitude_e2); + cancel_timer_slot(&view->animation_timer); + show_revealed_space_layers(view); + } else { + view->is_free_roam = false; + int landed_bw_frame = bw_frame_index_for_view(view, view->current_frame); + view->transition_bw_frame = landed_bw_frame; + set_color_orientation(view, 0, longitude_e2_for_bw_frame(landed_bw_frame)); + view->current_frame = landed_bw_frame; + sync_bw_elapsed_to_current_frame(view); + view->bw_idle = false; + view->bw_idle_slowdown_step = 0; + if (view->is_animating && !view->animation_timer) { + schedule_frame_timer(view); + } + start_globe_idle_timer(view); + show_intro_canvas(view); } + } - if (owns_anim) { - animation_destroy(anim); - } + if (owns_anim) { + animation_destroy(anim); + } } -static const AnimationImplementation s_reveal_impl = { - .update = reveal_anim_update -}; +static const AnimationImplementation s_reveal_impl = {.update = reveal_anim_update}; static void cancel_reveal_animation(GlobeView *view) { - if (view) cancel_animation_slot(&view->reveal_anim); + if (view) + cancel_animation_slot(&view->reveal_anim); } static void cancel_all_view_animations(GlobeView *view) { - cancel_reveal_animation(view); - cancel_city_animation(view); - cancel_bounce_animation(view); - cancel_lock_pulse_animation(view); + cancel_reveal_animation(view); + cancel_city_animation(view); + cancel_bounce_animation(view); + cancel_lock_pulse_animation(view); } static void toggle_reveal(GlobeView *view) { - if (!view) return; + if (!view) + return; - if (view->is_revealing) { - return; - } + if (view->is_revealing) { + return; + } #ifdef CONFIG_TOUCH - stop_globe_coast(view, false); - view->hover_lock_active = false; + stop_globe_coast(view, false); + view->hover_lock_active = false; #endif - if (!view->is_revealed) { - globe_view_reload_saved_locations(view); - } + if (!view->is_revealed) { + globe_view_reload_saved_locations(view); + } - view->reveal_direction = view->is_revealed ? -1 : 1; - view->is_revealing = true; - view->transition_bw_frame = view->current_frame; - set_color_orientation(view, 0, - longitude_e2_for_bw_frame(view->current_frame)); - view->transition_color_start_latitude_e2 = view->color_latitude_e2; - view->transition_color_start_longitude_e2 = view->color_longitude_e2; - view->transition_color_target_latitude_e2 = selected_city_latitude_e2(view); - view->transition_color_target_longitude_e2 = selected_city_longitude_e2(view); - view->reveal_progress = 0; - show_intro_canvas(view); + view->reveal_direction = view->is_revealed ? -1 : 1; + view->is_revealing = true; + view->transition_bw_frame = view->current_frame; + set_color_orientation(view, 0, longitude_e2_for_bw_frame(view->current_frame)); + view->transition_color_start_latitude_e2 = view->color_latitude_e2; + view->transition_color_start_longitude_e2 = view->color_longitude_e2; + view->transition_color_target_latitude_e2 = selected_city_latitude_e2(view); + view->transition_color_target_longitude_e2 = selected_city_longitude_e2(view); + view->reveal_progress = 0; + show_intro_canvas(view); - cancel_all_view_animations(view); - view->reveal_anim = start_view_animation(view, - view->reveal_direction < 0 - ? GLOBE_REVEAL_REVERSE_DURATION_MS - : GLOBE_REVEAL_DURATION_MS, - AnimationCurveEaseOut, - &s_reveal_impl, - reveal_anim_stopped); + cancel_all_view_animations(view); + view->reveal_anim = start_view_animation( + view, + view->reveal_direction < 0 ? GLOBE_REVEAL_REVERSE_DURATION_MS : GLOBE_REVEAL_DURATION_MS, + AnimationCurveEaseOut, &s_reveal_impl, reveal_anim_stopped); } static void schedule_frame_timer(GlobeView *view) { - view->animation_timer = app_timer_register(GLOBE_FRAME_INTERVAL_MS, - animation_timer_handler, - view); + view->animation_timer = + app_timer_register(GLOBE_FRAME_INTERVAL_MS, animation_timer_handler, view); } static void note_globe_interaction(GlobeView *view) { - if (!view) return; - cancel_timer_slot(&view->idle_timer); - view->bw_idle = false; - view->bw_idle_slowdown_step = 0; - if (view->is_animating && !view->is_revealed && - !view->animation_timer) { - schedule_frame_timer(view); - } - start_globe_idle_timer(view); + if (!view) + return; + cancel_timer_slot(&view->idle_timer); + view->bw_idle = false; + view->bw_idle_slowdown_step = 0; + if (view->is_animating && !view->is_revealed && !view->animation_timer) { + schedule_frame_timer(view); + } + start_globe_idle_timer(view); } static void globe_idle_timer_handler(void *context) { - GlobeView *view = (GlobeView *)context; - if (!view) return; - view->idle_timer = NULL; - if (!view->is_animating || view->is_revealed || view->is_revealing) { - return; - } - view->bw_idle = true; - view->bw_idle_slowdown_step = 0; - if (!view->animation_timer) { - schedule_frame_timer(view); - } + GlobeView *view = (GlobeView *)context; + if (!view) + return; + view->idle_timer = NULL; + if (!view->is_animating || view->is_revealed || view->is_revealing) { + return; + } + view->bw_idle = true; + view->bw_idle_slowdown_step = 0; + if (!view->animation_timer) { + schedule_frame_timer(view); + } } static void start_globe_idle_timer(GlobeView *view) { - if (!view || view->idle_timer) return; - view->idle_timer = app_timer_register(GLOBE_IDLE_TIMEOUT_MS, - globe_idle_timer_handler, - view); + if (!view || view->idle_timer) + return; + view->idle_timer = app_timer_register(GLOBE_IDLE_TIMEOUT_MS, globe_idle_timer_handler, view); } /** * Animation timer callback - advances to next frame */ static void animation_timer_handler(void *context) { - GlobeView *view = (GlobeView *)context; + GlobeView *view = (GlobeView *)context; - if (!view || !view->is_animating || view->is_revealed) { - if (view) view->animation_timer = NULL; - return; - } + if (!view || !view->is_animating || view->is_revealed) { + if (view) + view->animation_timer = NULL; + return; + } - view->animation_timer = NULL; + view->animation_timer = NULL; - if (!view->is_revealing) { - if (view->intro_selection_ms > GLOBE_FRAME_INTERVAL_MS) { - view->intro_selection_ms -= GLOBE_FRAME_INTERVAL_MS; - } else { - view->intro_selection_ms = 0; - } - if (!view->bw_idle || - view->bw_idle_slowdown_step < GLOBE_IDLE_SLOWDOWN_STEPS) { - uint32_t duration = bw_sequence_duration_for_view(view); - view->bw_elapsed_ms = duration > 0 - ? (view->bw_elapsed_ms + GLOBE_FRAME_INTERVAL_MS) % duration - : 0; - view->current_frame = bw_frame_index_for_view( - view, - (int)(view->bw_elapsed_ms / GLOBE_FRAME_INTERVAL_MS)); - if (view->canvas_layer) { - layer_mark_dirty(view->canvas_layer); - } - } + if (!view->is_revealing) { + if (view->intro_selection_ms > GLOBE_FRAME_INTERVAL_MS) { + view->intro_selection_ms -= GLOBE_FRAME_INTERVAL_MS; + } else { + view->intro_selection_ms = 0; + } + if (!view->bw_idle || view->bw_idle_slowdown_step < GLOBE_IDLE_SLOWDOWN_STEPS) { + uint32_t duration = bw_sequence_duration_for_view(view); + view->bw_elapsed_ms = + duration > 0 ? (view->bw_elapsed_ms + GLOBE_FRAME_INTERVAL_MS) % duration : 0; + view->current_frame = + bw_frame_index_for_view(view, (int)(view->bw_elapsed_ms / GLOBE_FRAME_INTERVAL_MS)); + if (view->canvas_layer) { + layer_mark_dirty(view->canvas_layer); + } } + } - if (view->bw_idle && !view->is_revealing) { - if (view->bw_idle_slowdown_step >= GLOBE_IDLE_SLOWDOWN_STEPS) { - return; - } - view->bw_idle_slowdown_step++; - uint32_t interval = GLOBE_FRAME_INTERVAL_MS + - (uint32_t)view->bw_idle_slowdown_step * - GLOBE_IDLE_SLOWDOWN_STEP_MS; - view->animation_timer = app_timer_register( - interval, - animation_timer_handler, - view); - } else { - schedule_frame_timer(view); + if (view->bw_idle && !view->is_revealing) { + if (view->bw_idle_slowdown_step >= GLOBE_IDLE_SLOWDOWN_STEPS) { + return; } + view->bw_idle_slowdown_step++; + uint32_t interval = GLOBE_FRAME_INTERVAL_MS + + (uint32_t)view->bw_idle_slowdown_step * GLOBE_IDLE_SLOWDOWN_STEP_MS; + view->animation_timer = app_timer_register(interval, animation_timer_handler, view); + } else { + schedule_frame_timer(view); + } } -static void draw_transition_state(GContext *ctx, GlobeView *view, GPoint origin, - GSize frame_size, GRect bounds) { - if (!view->bw_sequence) return; - if (!view->cradle_pdc) return; +static void draw_transition_state(GContext *ctx, GlobeView *view, GPoint origin, GSize frame_size, + GRect bounds) { + if (!view->bw_sequence) + return; + if (!view->cradle_pdc) + return; - const int color_amount = transition_color_amount(view); - const int bw_amount = transition_bw_amount(view); - const int eased = ease_out_quad((AnimationProgress)bw_amount); - const int drop = (eased * GLOBE_CRADLE_DROP_PX) / ANIMATION_NORMALIZED_MAX; + const int color_amount = transition_color_amount(view); + const int bw_amount = transition_bw_amount(view); + const int eased = ease_out_quad((AnimationProgress)bw_amount); + const int drop = (eased * GLOBE_CRADLE_DROP_PX) / ANIMATION_NORMALIZED_MAX; - if (view->reveal_direction > 0) { - draw_forward_space_fade(ctx, bounds, color_amount, view); - } + if (view->reveal_direction > 0) { + draw_forward_space_fade(ctx, bounds, color_amount, view); + } - draw_cradle(ctx, view, GPoint(origin.x, origin.y + drop), frame_size); - - int wipe_h = (frame_size.h * bw_amount) / ANIMATION_NORMALIZED_MAX; - if (wipe_h > 0) { - GRect wipe_rect = - GRect(origin.x - GLOBE_CRADLE_WIPE_MARGIN, - origin.y + drop - GLOBE_CRADLE_WIPE_MARGIN, - frame_size.w + (GLOBE_CRADLE_WIPE_MARGIN * 2), - wipe_h + (GLOBE_CRADLE_WIPE_MARGIN * 2)); - - graphics_context_set_fill_color(ctx, GColorWhite); - graphics_fill_rect(ctx, wipe_rect, - 0, GCornerNone); - if (view->reveal_direction > 0) { - draw_forward_space_fade(ctx, wipe_rect, color_amount, view); - } - } + draw_cradle(ctx, view, GPoint(origin.x, origin.y + drop), frame_size); - draw_cubemap_globe(ctx, view, origin, frame_size, - color_transition_scale_percent(color_amount), - bounds, false); + int wipe_h = (frame_size.h * bw_amount) / ANIMATION_NORMALIZED_MAX; + if (wipe_h > 0) { + GRect wipe_rect = GRect( + origin.x - GLOBE_CRADLE_WIPE_MARGIN, origin.y + drop - GLOBE_CRADLE_WIPE_MARGIN, + frame_size.w + (GLOBE_CRADLE_WIPE_MARGIN * 2), wipe_h + (GLOBE_CRADLE_WIPE_MARGIN * 2)); - if (!draw_bw_crumple_frame(ctx, view, origin, frame_size, bw_amount) && - bw_amount <= 0) { - draw_bw_frame(ctx, view, origin, frame_size); + graphics_context_set_fill_color(ctx, GColorWhite); + graphics_fill_rect(ctx, wipe_rect, 0, GCornerNone); + if (view->reveal_direction > 0) { + draw_forward_space_fade(ctx, wipe_rect, color_amount, view); } + } + + draw_cubemap_globe(ctx, view, origin, frame_size, color_transition_scale_percent(color_amount), + bounds, false); + + if (!draw_bw_crumple_frame(ctx, view, origin, frame_size, bw_amount) && bw_amount <= 0) { + draw_bw_frame(ctx, view, origin, frame_size); + } } static GRect city_label_frame_for_bounds(GRect bounds) { - int side = GLOBE_CITY_LABEL_ROUND_SIDE_INSET; - return GRect(side, - bounds.size.h - GLOBE_CITY_LABEL_HEIGHT - - GLOBE_CITY_LABEL_ROUND_BOTTOM_INSET, - bounds.size.w - (side * 2), - GLOBE_CITY_LABEL_HEIGHT); + int side = GLOBE_CITY_LABEL_ROUND_SIDE_INSET; + return GRect(side, bounds.size.h - GLOBE_CITY_LABEL_HEIGHT - GLOBE_CITY_LABEL_ROUND_BOTTOM_INSET, + bounds.size.w - (side * 2), GLOBE_CITY_LABEL_HEIGHT); } static void draw_city_label(GContext *ctx, GlobeView *view, GRect bounds) { - char label[48]; - format_selected_label(view, label, sizeof(label)); + char label[48]; + format_selected_label(view, label, sizeof(label)); - GRect label_rect = city_label_frame_for_bounds(bounds); - graphics_context_set_text_color(ctx, GColorWhite); - graphics_draw_text(ctx, label, - fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD), - GRect(label_rect.origin.x + 4, label_rect.origin.y + 3, - label_rect.size.w - 8, label_rect.size.h - 3), - GTextOverflowModeTrailingEllipsis, - GTextAlignmentCenter, - NULL); + GRect label_rect = city_label_frame_for_bounds(bounds); + graphics_context_set_text_color(ctx, GColorWhite); + graphics_draw_text(ctx, label, fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD), + GRect(label_rect.origin.x + 4, label_rect.origin.y + 3, label_rect.size.w - 8, + label_rect.size.h - 3), + GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } static void draw_intro_title(GContext *ctx, GlobeView *view, GRect bounds, int globe_y, GSize frame_size) { #if !PBL_ROUND - (void)globe_y; - (void)frame_size; - - const int header_height = GLOBE_SMALL_RECT ? 24 : 38; - graphics_context_set_text_color(ctx, GColorBlack); - graphics_draw_text(ctx, i18n_get("CITY SELECT", view), - fonts_get_system_font(GLOBE_SMALL_RECT ? FONT_KEY_GOTHIC_18_BOLD - : FONT_KEY_GOTHIC_28_BOLD), - GRect(0, -2, bounds.size.w, header_height + 2), - GTextOverflowModeTrailingEllipsis, - GTextAlignmentCenter, - NULL); - graphics_context_set_fill_color(ctx, GColorBlack); - graphics_fill_rect(ctx, - GRect(0, header_height - 2, bounds.size.w, 2), - 0, GCornerNone); + (void)globe_y; + (void)frame_size; + + const int header_height = GLOBE_SMALL_RECT ? 24 : 38; + graphics_context_set_text_color(ctx, GColorBlack); + graphics_draw_text( + ctx, i18n_get("CITY SELECT", view), + fonts_get_system_font(GLOBE_SMALL_RECT ? FONT_KEY_GOTHIC_18_BOLD : FONT_KEY_GOTHIC_28_BOLD), + GRect(0, -2, bounds.size.w, header_height + 2), GTextOverflowModeTrailingEllipsis, + GTextAlignmentCenter, NULL); + graphics_context_set_fill_color(ctx, GColorBlack); + graphics_fill_rect(ctx, GRect(0, header_height - 2, bounds.size.w, 2), 0, GCornerNone); #else - const char *title = i18n_get("CITY SELECT", view); - GFont font = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD); - int planet_center_y = globe_y + frame_size.h / 2 + - GLOBE_PLANET_CENTER_Y_OFFSET; - int planet_top = planet_center_y - GLOBE_RENDER_BASE_DIAMETER / 2; - int title_y = (planet_top - GLOBE_INTRO_TITLE_HEIGHT) / 2; - if (title_y < 0) title_y = 0; - - graphics_context_set_text_color(ctx, GColorBlack); - graphics_draw_text(ctx, title, - font, - GRect(0, title_y - 4, - bounds.size.w, - GLOBE_INTRO_TITLE_HEIGHT + 8), - GTextOverflowModeTrailingEllipsis, - GTextAlignmentCenter, - NULL); - // Divider under the title (round port of the rect city-select redesign): the same - // 2px black rule, FULL WIDTH — the round framebuffer clips each row to the glass, - // so drawing edge to edge lands it bezel-to-bezel. Rides title_y like the title. - { - const int rule_y = title_y + GLOBE_INTRO_TITLE_HEIGHT - 2; - graphics_context_set_fill_color(ctx, GColorBlack); - graphics_fill_rect(ctx, GRect(0, rule_y, bounds.size.w, 2), 0, GCornerNone); - } + const char *title = i18n_get("CITY SELECT", view); + GFont font = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD); + int planet_center_y = globe_y + frame_size.h / 2 + GLOBE_PLANET_CENTER_Y_OFFSET; + int planet_top = planet_center_y - GLOBE_RENDER_BASE_DIAMETER / 2; + int title_y = (planet_top - GLOBE_INTRO_TITLE_HEIGHT) / 2; + if (title_y < 0) + title_y = 0; + + graphics_context_set_text_color(ctx, GColorBlack); + graphics_draw_text(ctx, title, font, + GRect(0, title_y - 4, bounds.size.w, GLOBE_INTRO_TITLE_HEIGHT + 8), + GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + // Divider under the title (round port of the rect city-select redesign): the same + // 2px black rule, FULL WIDTH — the round framebuffer clips each row to the glass, + // so drawing edge to edge lands it bezel-to-bezel. Rides title_y like the title. + { + const int rule_y = title_y + GLOBE_INTRO_TITLE_HEIGHT - 2; + graphics_context_set_fill_color(ctx, GColorBlack); + graphics_fill_rect(ctx, GRect(0, rule_y, bounds.size.w, 2), 0, GCornerNone); + } #endif } @@ -3196,130 +3123,113 @@ static void draw_intro_title(GContext *ctx, GlobeView *view, GRect bounds, int g // resources/svg/location/location_pin.svg): outer teardrop filled in `color`, inner // octagonal window in `bg_color`. Embedded as GPaths so both label states (black-on- // white / white-on-cerulean) recolor for free. -static void draw_saved_locations_pin(GContext *ctx, GPoint origin, - GColor color, GColor bg_color) { - static const GPoint kPinBody[] = { - {8, 1}, {10, 1}, {11, 2}, {13, 3}, {15, 5}, {16, 7}, {16, 10}, - {15, 11}, {15, 13}, {14, 14}, {13, 16}, {10, 19}, {10, 20}, {9, 21}, - {8, 20}, {8, 19}, {5, 16}, {4, 14}, {3, 13}, {3, 11}, {2, 10}, - {2, 7}, {3, 5}, {5, 3}, {7, 2}, - }; - static const GPoint kPinWindow[] = { - {10, 5}, {12, 7}, {12, 9}, {10, 11}, {8, 11}, {6, 9}, {6, 7}, {8, 5}, - }; - // The art is 22px tall in an 18px (GLOBE_SAVED_COG_SIZE) slot: lift 2px so it - // optically centres in the 34px label row. - const GPoint off = GPoint(origin.x, origin.y - 2); - GPath body = { - .num_points = sizeof(kPinBody) / sizeof(kPinBody[0]), - .points = (GPoint *)kPinBody, - .offset = off, - }; - GPath window = { - .num_points = sizeof(kPinWindow) / sizeof(kPinWindow[0]), - .points = (GPoint *)kPinWindow, - .offset = off, - }; - - graphics_context_set_antialiased(ctx, false); - graphics_context_set_fill_color(ctx, color); - gpath_draw_filled(ctx, &body); - graphics_context_set_fill_color(ctx, bg_color); - gpath_draw_filled(ctx, &window); - graphics_context_set_antialiased(ctx, true); -} - -static void draw_saved_locations_label(GContext *ctx, GlobeView *view, - GRect bounds, bool selected) { +static void draw_saved_locations_pin(GContext *ctx, GPoint origin, GColor color, GColor bg_color) { + static const GPoint kPinBody[] = { + {8, 1}, {10, 1}, {11, 2}, {13, 3}, {15, 5}, {16, 7}, {16, 10}, {15, 11}, {15, 13}, + {14, 14}, {13, 16}, {10, 19}, {10, 20}, {9, 21}, {8, 20}, {8, 19}, {5, 16}, {4, 14}, + {3, 13}, {3, 11}, {2, 10}, {2, 7}, {3, 5}, {5, 3}, {7, 2}, + }; + static const GPoint kPinWindow[] = { + {10, 5}, {12, 7}, {12, 9}, {10, 11}, {8, 11}, {6, 9}, {6, 7}, {8, 5}, + }; + // The art is 22px tall in an 18px (GLOBE_SAVED_COG_SIZE) slot: lift 2px so it + // optically centres in the 34px label row. + const GPoint off = GPoint(origin.x, origin.y - 2); + GPath body = { + .num_points = sizeof(kPinBody) / sizeof(kPinBody[0]), + .points = (GPoint *)kPinBody, + .offset = off, + }; + GPath window = { + .num_points = sizeof(kPinWindow) / sizeof(kPinWindow[0]), + .points = (GPoint *)kPinWindow, + .offset = off, + }; + + graphics_context_set_antialiased(ctx, false); + graphics_context_set_fill_color(ctx, color); + gpath_draw_filled(ctx, &body); + graphics_context_set_fill_color(ctx, bg_color); + gpath_draw_filled(ctx, &window); + graphics_context_set_antialiased(ctx, true); +} + +static void draw_saved_locations_label(GContext *ctx, GlobeView *view, GRect bounds, + bool selected) { #if !PBL_ROUND - const char *label = i18n_get("SAVED LOCATIONS", view); - const int side_inset = 10; - const int bar_h = GLOBE_SMALL_RECT ? 24 : GLOBE_SAVED_LABEL_HEIGHT; - int y = bounds.size.h - bar_h; - if (selected) y += intro_selection_offset(view); - - // BW: the dithered blue read as noise under white text — the selected bar - // goes solid black instead. - const GColor sel_fill = PBL_IF_COLOR_ELSE(GColorVividCerulean, GColorBlack); - graphics_context_set_fill_color(ctx, selected ? sel_fill : GColorWhite); - graphics_fill_rect(ctx, GRect(0, y, bounds.size.w, bar_h), 0, GCornerNone); - graphics_context_set_fill_color(ctx, GColorBlack); - graphics_fill_rect(ctx, GRect(0, y, bounds.size.w, 2), - 0, GCornerNone); - - GColor label_color = selected ? GColorWhite : GColorBlack; - GColor bg_color = selected ? sel_fill : GColorWhite; - draw_saved_locations_pin(ctx, - GPoint(side_inset, - y + (bar_h - GLOBE_SAVED_COG_SIZE) / 2), - label_color, bg_color); - - graphics_context_set_text_color(ctx, label_color); - // Small rect: centring the label under-laps the pin glyph — align it left - // of the remaining width instead. - const int text_x = GLOBE_SMALL_RECT ? (side_inset + GLOBE_SAVED_COG_SIZE + 6) : 0; - graphics_draw_text(ctx, label, - fonts_get_system_font(GLOBE_SMALL_RECT ? FONT_KEY_GOTHIC_14_BOLD - : FONT_KEY_GOTHIC_18_BOLD), - GRect(text_x, y + (GLOBE_SMALL_RECT ? 2 : 3), - bounds.size.w - text_x, - bar_h - 3), - GTextOverflowModeTrailingEllipsis, - GLOBE_SMALL_RECT ? GTextAlignmentLeft : GTextAlignmentCenter, - NULL); + const char *label = i18n_get("SAVED LOCATIONS", view); + const int side_inset = 10; + const int bar_h = GLOBE_SMALL_RECT ? 24 : GLOBE_SAVED_LABEL_HEIGHT; + int y = bounds.size.h - bar_h; + if (selected) + y += intro_selection_offset(view); + + // BW: the dithered blue read as noise under white text — the selected bar + // goes solid black instead. + const GColor sel_fill = PBL_IF_COLOR_ELSE(GColorVividCerulean, GColorBlack); + graphics_context_set_fill_color(ctx, selected ? sel_fill : GColorWhite); + graphics_fill_rect(ctx, GRect(0, y, bounds.size.w, bar_h), 0, GCornerNone); + graphics_context_set_fill_color(ctx, GColorBlack); + graphics_fill_rect(ctx, GRect(0, y, bounds.size.w, 2), 0, GCornerNone); + + GColor label_color = selected ? GColorWhite : GColorBlack; + GColor bg_color = selected ? sel_fill : GColorWhite; + draw_saved_locations_pin(ctx, GPoint(side_inset, y + (bar_h - GLOBE_SAVED_COG_SIZE) / 2), + label_color, bg_color); + + graphics_context_set_text_color(ctx, label_color); + // Small rect: centring the label under-laps the pin glyph — align it left + // of the remaining width instead. + const int text_x = GLOBE_SMALL_RECT ? (side_inset + GLOBE_SAVED_COG_SIZE + 6) : 0; + graphics_draw_text( + ctx, label, + fonts_get_system_font(GLOBE_SMALL_RECT ? FONT_KEY_GOTHIC_14_BOLD : FONT_KEY_GOTHIC_18_BOLD), + GRect(text_x, y + (GLOBE_SMALL_RECT ? 2 : 3), bounds.size.w - text_x, bar_h - 3), + GTextOverflowModeTrailingEllipsis, + GLOBE_SMALL_RECT ? GTextAlignmentLeft : GTextAlignmentCenter, NULL); #else - // Uppercase to match the rect city-select redesign's footer treatment. - const char *label = i18n_get("SAVED LOCATIONS", view); - GFont font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); - // Constant string + constant font: measure once, not per intro frame (28.6fps while the - // cradle animates). - static GSize text_size; - if (text_size.w == 0) { - text_size = graphics_text_layout_get_content_size( - label, - font, - GRect(0, 0, 300, GLOBE_SAVED_LABEL_HEIGHT), // unconstrained: natural label width - GTextOverflowModeTrailingEllipsis, - GTextAlignmentLeft - ); - } - // The TEXT centres on the screen; the pin hangs off its left (so the label reads - // centred rather than the pin+text group being centred, which right-shifted the text). - int text_x = (bounds.size.w - text_size.w) / 2; - // +4: pulled right off the chin's curve so the pin reads fully inside the glass. - int pin_x = text_x - GLOBE_SAVED_LABEL_GAP - GLOBE_SAVED_COG_SIZE + 4; - if (pin_x < 2) pin_x = 2; - int y = bounds.size.h - GLOBE_SAVED_LABEL_HEIGHT - - GLOBE_SAVED_LABEL_ROUND_BOTTOM_INSET; - if (selected) y += intro_selection_offset(view); - if (selected) { - int fill_h = PBL_IF_ROUND_ELSE(bounds.size.h - y, - GLOBE_SAVED_LABEL_HEIGHT); - graphics_context_set_fill_color(ctx, GColorVividCerulean); - graphics_fill_rect(ctx, GRect(0, y, bounds.size.w, fill_h), - 0, GCornerNone); - } - // Divider above the row, ALWAYS drawn (rect redesign parity): 2px black rule replacing - // the old selection-only 1px grey line, FULL WIDTH (the glass mask clips it edge to edge). - graphics_context_set_fill_color(ctx, GColorBlack); - graphics_fill_rect(ctx, GRect(0, y, bounds.size.w, 2), 0, GCornerNone); - - GColor label_color = selected ? GColorWhite : GColorBlack; - GColor bg_color = selected ? GColorVividCerulean : GColorWhite; - draw_saved_locations_pin(ctx, - GPoint(pin_x, y + (GLOBE_SAVED_LABEL_HEIGHT - - GLOBE_SAVED_COG_SIZE) / 2), - label_color, bg_color); - - graphics_context_set_text_color(ctx, label_color); - graphics_draw_text(ctx, label, - font, - GRect(text_x, y + 3, - bounds.size.w - text_x, - GLOBE_SAVED_LABEL_HEIGHT - 3), - GTextOverflowModeTrailingEllipsis, - GTextAlignmentLeft, - NULL); + // Uppercase to match the rect city-select redesign's footer treatment. + const char *label = i18n_get("SAVED LOCATIONS", view); + GFont font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); + // Constant string + constant font: measure once, not per intro frame (28.6fps while the + // cradle animates). + static GSize text_size; + if (text_size.w == 0) { + text_size = graphics_text_layout_get_content_size( + label, font, + GRect(0, 0, 300, GLOBE_SAVED_LABEL_HEIGHT), // unconstrained: natural label width + GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft); + } + // The TEXT centres on the screen; the pin hangs off its left (so the label reads + // centred rather than the pin+text group being centred, which right-shifted the text). + int text_x = (bounds.size.w - text_size.w) / 2; + // +4: pulled right off the chin's curve so the pin reads fully inside the glass. + int pin_x = text_x - GLOBE_SAVED_LABEL_GAP - GLOBE_SAVED_COG_SIZE + 4; + if (pin_x < 2) + pin_x = 2; + int y = bounds.size.h - GLOBE_SAVED_LABEL_HEIGHT - GLOBE_SAVED_LABEL_ROUND_BOTTOM_INSET; + if (selected) + y += intro_selection_offset(view); + if (selected) { + int fill_h = PBL_IF_ROUND_ELSE(bounds.size.h - y, GLOBE_SAVED_LABEL_HEIGHT); + graphics_context_set_fill_color(ctx, GColorVividCerulean); + graphics_fill_rect(ctx, GRect(0, y, bounds.size.w, fill_h), 0, GCornerNone); + } + // Divider above the row, ALWAYS drawn (rect redesign parity): 2px black rule replacing + // the old selection-only 1px grey line, FULL WIDTH (the glass mask clips it edge to edge). + graphics_context_set_fill_color(ctx, GColorBlack); + graphics_fill_rect(ctx, GRect(0, y, bounds.size.w, 2), 0, GCornerNone); + + GColor label_color = selected ? GColorWhite : GColorBlack; + GColor bg_color = selected ? GColorVividCerulean : GColorWhite; + draw_saved_locations_pin(ctx, + GPoint(pin_x, y + (GLOBE_SAVED_LABEL_HEIGHT - GLOBE_SAVED_COG_SIZE) / 2), + label_color, bg_color); + + graphics_context_set_text_color(ctx, label_color); + graphics_draw_text(ctx, label, font, + GRect(text_x, y + 3, bounds.size.w - text_x, GLOBE_SAVED_LABEL_HEIGHT - 3), + GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); #endif } @@ -3327,273 +3237,270 @@ static void draw_saved_locations_label(GContext *ctx, GlobeView *view, * Canvas layer draw handler - renders current globe frame */ static void canvas_layer_draw(Layer *layer, GContext *ctx) { - GlobeView *view = *(GlobeView **)layer_get_data(layer); - - if (!view || view->current_frame >= (int)bw_frame_count_for_view(view)) return; - - // Draw frame centered in canvas. - GRect bounds = layer_get_bounds(layer); - GSize frame_size = get_vector_or_bitmap_size(view); - - // Center the planet itself; the cradle extends below the globe bitmap. - int x = (bounds.size.w - frame_size.w) / 2; - int y = ((bounds.size.h - frame_size.h) / 2) + GLOBE_CRADLE_CENTER_Y_OFFSET; - - if (view->is_revealing) { - draw_transition_state(ctx, view, GPoint(x, y), frame_size, bounds); - } else if (view->is_revealed) { - int offset = bounce_offset(view); - draw_space_background(ctx, bounds, view); - draw_cubemap_globe(ctx, view, GPoint(x, y + offset), - frame_size, GLOBE_COLOR_FINAL_SCALE_PERCENT, - bounds, false); - draw_city_label(ctx, view, bounds); - } else { - draw_intro_title(ctx, view, bounds, y, frame_size); - if (view->intro_world_selected) { - y += intro_selection_offset(view); - } - draw_cradle(ctx, view, GPoint(x, y), frame_size); - draw_intro_world_frame(ctx, view, GPoint(x, y), frame_size); - draw_saved_locations_label(ctx, view, bounds, - !view->intro_world_selected); + GlobeView *view = *(GlobeView **)layer_get_data(layer); + + if (!view || view->current_frame >= (int)bw_frame_count_for_view(view)) + return; + + // Draw frame centered in canvas. + GRect bounds = layer_get_bounds(layer); + GSize frame_size = get_vector_or_bitmap_size(view); + + // Center the planet itself; the cradle extends below the globe bitmap. + int x = (bounds.size.w - frame_size.w) / 2; + int y = ((bounds.size.h - frame_size.h) / 2) + GLOBE_CRADLE_CENTER_Y_OFFSET; + + if (view->is_revealing) { + draw_transition_state(ctx, view, GPoint(x, y), frame_size, bounds); + } else if (view->is_revealed) { + int offset = bounce_offset(view); + draw_space_background(ctx, bounds, view); + draw_cubemap_globe(ctx, view, GPoint(x, y + offset), frame_size, + GLOBE_COLOR_FINAL_SCALE_PERCENT, bounds, false); + draw_city_label(ctx, view, bounds); + } else { + draw_intro_title(ctx, view, bounds, y, frame_size); + if (view->intro_world_selected) { + y += intro_selection_offset(view); } + draw_cradle(ctx, view, GPoint(x, y), frame_size); + draw_intro_world_frame(ctx, view, GPoint(x, y), frame_size); + draw_saved_locations_label(ctx, view, bounds, !view->intro_world_selected); + } } static void space_layer_draw(Layer *layer, GContext *ctx) { - GlobeView *view = *(GlobeView **)layer_get_data(layer); - draw_space_background(ctx, layer_get_bounds(layer), view); + GlobeView *view = *(GlobeView **)layer_get_data(layer); + draw_space_background(ctx, layer_get_bounds(layer), view); } static void globe_layer_draw(Layer *layer, GContext *ctx) { - GlobeView *view = *(GlobeView **)layer_get_data(layer); - if (!view || !view->is_revealed || view->is_revealing) return; + GlobeView *view = *(GlobeView **)layer_get_data(layer); + if (!view || !view->is_revealed || view->is_revealing) + return; - Layer *root_layer = window_get_root_layer(view->window); - GRect root_bounds = layer_get_bounds(root_layer); - GRect frame = layer_get_frame(layer); - GPoint center = revealed_globe_center_for_bounds(root_bounds, - bounce_offset(view)); - draw_cubemap_globe_at_center(ctx, view, center, - GLOBE_COLOR_FINAL_SCALE_PERCENT, - frame, true); + Layer *root_layer = window_get_root_layer(view->window); + GRect root_bounds = layer_get_bounds(root_layer); + GRect frame = layer_get_frame(layer); + GPoint center = revealed_globe_center_for_bounds(root_bounds, bounce_offset(view)); + draw_cubemap_globe_at_center(ctx, view, center, GLOBE_COLOR_FINAL_SCALE_PERCENT, frame, true); } static void set_intro_world_selected(GlobeView *view, bool selected) { - if (!view || view->is_revealed || view->is_revealing) return; - if (view->intro_world_selected == selected) return; - view->intro_world_selected = selected; - view->intro_selection_ms = GLOBE_INTRO_SELECTION_DURATION_MS; - if (view->canvas_layer) { - layer_mark_dirty(view->canvas_layer); - } + if (!view || view->is_revealed || view->is_revealing) + return; + if (view->intro_world_selected == selected) + return; + view->intro_world_selected = selected; + view->intro_selection_ms = GLOBE_INTRO_SELECTION_DURATION_MS; + if (view->canvas_layer) { + layer_mark_dirty(view->canvas_layer); + } } static void activate_intro_selection(GlobeView *view) { - if (!view || view->is_revealing) return; - if (view->intro_world_selected) { - toggle_reveal(view); - } else if (view->saved_locations_callback) { - view->saved_locations_callback(view->saved_locations_context); - } else { - globe_view_pop(view); - } + if (!view || view->is_revealing) + return; + if (view->intro_world_selected) { + toggle_reveal(view); + } else if (view->saved_locations_callback) { + view->saved_locations_callback(view->saved_locations_context); + } else { + globe_view_pop(view); + } } /** * Create window click handler */ static void window_click_handler(ClickRecognizerRef recognizer, void *context) { - GlobeView *view = (GlobeView *)context; - note_globe_interaction(view); + GlobeView *view = (GlobeView *)context; + note_globe_interaction(view); - ButtonId button = click_recognizer_get_button_id(recognizer); - if (button == BUTTON_ID_BACK) { - if (view->is_revealed && !view->is_revealing) { - toggle_reveal(view); // colour earth -> animated un-reveal back to the B+W cradle - } else if (!view->is_revealing) { - if (view->back_callback) { - globe_view_slide_out_right(view); // cradle BACK -> slide out right, card slides back in - } else { - app_window_stack_pop_all(true); // no card to return to -> exit the app (carousel) - } - } - } else if (button == BUTTON_ID_SELECT) { - if (!view->is_revealed) { - activate_intro_selection(view); - } else if (!view->is_revealing) { - if (commit_hovered_location(view)) { - globe_view_pop(view); - } - } - } else if (button == BUTTON_ID_UP) { - if (view->is_revealed && !view->is_revealing) { - navigate_city(view, false); - } else if (!view->is_revealing) { - set_intro_world_selected(view, true); - } - } else if (button == BUTTON_ID_DOWN) { - if (view->is_revealed && !view->is_revealing) { - navigate_city(view, true); - } else if (!view->is_revealing) { - if (view->intro_world_selected) { - set_intro_world_selected(view, false); // world -> saved-locations cursor (in-screen) - } - // DOWN on the saved-locations cursor no longer exits to the sunset card (removed); the - // way back to the card is the BACK button (globe_view_slide_out_right). - } + ButtonId button = click_recognizer_get_button_id(recognizer); + if (button == BUTTON_ID_BACK) { + if (view->is_revealed && !view->is_revealing) { + toggle_reveal(view); // colour earth -> animated un-reveal back to the B+W cradle + } else if (!view->is_revealing) { + if (view->back_callback) { + globe_view_slide_out_right(view); // cradle BACK -> slide out right, card slides back in + } else { + app_window_stack_pop_all(true); // no card to return to -> exit the app (carousel) + } + } + } else if (button == BUTTON_ID_SELECT) { + if (!view->is_revealed) { + activate_intro_selection(view); + } else if (!view->is_revealing) { + if (commit_hovered_location(view)) { + globe_view_pop(view); + } } + } else if (button == BUTTON_ID_UP) { + if (view->is_revealed && !view->is_revealing) { + navigate_city(view, false); + } else if (!view->is_revealing) { + set_intro_world_selected(view, true); + } + } else if (button == BUTTON_ID_DOWN) { + if (view->is_revealed && !view->is_revealing) { + navigate_city(view, true); + } else if (!view->is_revealing) { + if (view->intro_world_selected) { + set_intro_world_selected(view, false); // world -> saved-locations cursor (in-screen) + } + // DOWN on the saved-locations cursor no longer exits to the sunset card (removed); the + // way back to the card is the BACK button (globe_view_slide_out_right). + } + } } #ifdef CONFIG_TOUCH static bool point_is_on_intro_globe(GlobeView *view, int16_t x, int16_t y) { - if (!view || !view->window) return false; - - Layer *root_layer = window_get_root_layer(view->window); - GRect bounds = layer_get_bounds(root_layer); - GSize frame_size = get_vector_or_bitmap_size(view); - int origin_x = (bounds.size.w - frame_size.w) / 2; - int origin_y = ((bounds.size.h - frame_size.h) / 2) + - GLOBE_CRADLE_CENTER_Y_OFFSET; - int center_x = origin_x + frame_size.w / 2; - int center_y = origin_y + frame_size.h / 2 + GLOBE_PLANET_CENTER_Y_OFFSET; - int radius = GLOBE_RENDER_BASE_DIAMETER / 2; - int dx = x - center_x; - int dy = y - center_y; - return (dx * dx) + (dy * dy) <= radius * radius; + if (!view || !view->window) + return false; + + Layer *root_layer = window_get_root_layer(view->window); + GRect bounds = layer_get_bounds(root_layer); + GSize frame_size = get_vector_or_bitmap_size(view); + int origin_x = (bounds.size.w - frame_size.w) / 2; + int origin_y = ((bounds.size.h - frame_size.h) / 2) + GLOBE_CRADLE_CENTER_Y_OFFSET; + int center_x = origin_x + frame_size.w / 2; + int center_y = origin_y + frame_size.h / 2 + GLOBE_PLANET_CENTER_Y_OFFSET; + int radius = GLOBE_RENDER_BASE_DIAMETER / 2; + int dx = x - center_x; + int dy = y - center_y; + return (dx * dx) + (dy * dy) <= radius * radius; } static bool point_is_on_saved_locations_label(GlobeView *view, int16_t y) { - if (!view || !view->window) return false; - GRect bounds = layer_get_bounds(window_get_root_layer(view->window)); - // Top of the label band — same expression as draw_saved_locations_label; everything - // from the rule line down (incl. the round bottom inset) counts as the touch target. - return y >= (bounds.size.h - GLOBE_SAVED_LABEL_HEIGHT - - GLOBE_SAVED_LABEL_ROUND_BOTTOM_INSET); + if (!view || !view->window) + return false; + GRect bounds = layer_get_bounds(window_get_root_layer(view->window)); + // Top of the label band — same expression as draw_saved_locations_label; everything + // from the rule line down (incl. the round bottom inset) counts as the touch target. + return y >= (bounds.size.h - GLOBE_SAVED_LABEL_HEIGHT - GLOBE_SAVED_LABEL_ROUND_BOTTOM_INSET); } static bool point_is_on_revealed_globe(GlobeView *view, int16_t x, int16_t y) { - if (!view || !view->window) return false; + if (!view || !view->window) + return false; - Layer *root_layer = window_get_root_layer(view->window); - GRect bounds = layer_get_bounds(root_layer); - GPoint center = revealed_globe_center_for_bounds(bounds, bounce_offset(view)); - int radius = revealed_globe_radius() + GLOBE_ATMOSPHERE_GLOW_PX; - int dx = x - center.x; - int dy = y - center.y; - return (dx * dx) + (dy * dy) <= radius * radius; + Layer *root_layer = window_get_root_layer(view->window); + GRect bounds = layer_get_bounds(root_layer); + GPoint center = revealed_globe_center_for_bounds(bounds, bounce_offset(view)); + int radius = revealed_globe_radius() + GLOBE_ATMOSPHERE_GLOW_PX; + int dx = x - center.x; + int dy = y - center.y; + return (dx * dx) + (dy * dy) <= radius * radius; } static void touch_handler(const TouchEvent *event, void *context) { - GlobeView *view = (GlobeView *)context; - if (!view) return; - // Pop-transition gap: globe_view_pop stops the animation state BEFORE the - // async window pop finishes, but touch stays subscribed until disappear. - // Ignore events in that window — a drag could re-arm timers the disappear - // handler already skipped, and a tap could double-pop the stack. - if (!view->is_animating) return; - - if (event->type == TouchEvent_Touchdown) { - note_globe_interaction(view); - view->touch_start_x = event->x; - view->touch_start_y = event->y; - view->touch_last_x = event->x; - view->touch_last_y = event->y; - view->touch_velocity_x_q8 = 0; - view->touch_velocity_y_q8 = 0; - view->touch_active = true; - view->touch_drag_axis_set = false; - view->touch_drag_rotated = false; - view->touch_down_on_globe = false; - view->touch_controls_globe = false; - - if (view->is_revealed && !view->is_revealing) { - bool whole_screen = - view->is_free_roam || view->coast_active || - view->coast_timer || view->city_anim; - begin_globe_drag_capture(view, event->x, event->y, whole_screen); - } + GlobeView *view = (GlobeView *)context; + if (!view) + return; + // Pop-transition gap: globe_view_pop stops the animation state BEFORE the + // async window pop finishes, but touch stays subscribed until disappear. + // Ignore events in that window — a drag could re-arm timers the disappear + // handler already skipped, and a tap could double-pop the stack. + if (!view->is_animating) + return; + + if (event->type == TouchEvent_Touchdown) { + note_globe_interaction(view); + view->touch_start_x = event->x; + view->touch_start_y = event->y; + view->touch_last_x = event->x; + view->touch_last_y = event->y; + view->touch_velocity_x_q8 = 0; + view->touch_velocity_y_q8 = 0; + view->touch_active = true; + view->touch_drag_axis_set = false; + view->touch_drag_rotated = false; + view->touch_down_on_globe = false; + view->touch_controls_globe = false; - } else if (event->type == TouchEvent_PositionUpdate) { - if (view->is_revealed && !view->is_revealing && - !view->touch_active && - (view->is_free_roam || view->coast_active || - view->coast_timer || view->city_anim)) { - view->touch_active = true; - begin_globe_drag_capture(view, event->x, event->y, true); - return; - } + if (view->is_revealed && !view->is_revealing) { + bool whole_screen = + view->is_free_roam || view->coast_active || view->coast_timer || view->city_anim; + begin_globe_drag_capture(view, event->x, event->y, whole_screen); + } - if (!view->touch_active) return; + } else if (event->type == TouchEvent_PositionUpdate) { + if (view->is_revealed && !view->is_revealing && !view->touch_active && + (view->is_free_roam || view->coast_active || view->coast_timer || view->city_anim)) { + view->touch_active = true; + begin_globe_drag_capture(view, event->x, event->y, true); + return; + } - if (view->is_revealed && !view->is_revealing && - view->touch_controls_globe) { - update_globe_drag(view, event->x, event->y); - } + if (!view->touch_active) + return; - } else if (event->type == TouchEvent_Liftoff && view->touch_active) { - view->touch_active = false; - int16_t dx = event->x - view->touch_start_x; - int16_t dy = event->y - view->touch_start_y; - int16_t adx = dx < 0 ? -dx : dx; - int16_t ady = dy < 0 ? -dy : dy; - - if (view->is_revealed && !view->is_revealing && - view->touch_controls_globe) { - bool was_dragged = view->touch_drag_rotated; - bool was_globe_tap = view->touch_down_on_globe && - adx <= GLOBE_TAP_THRESHOLD && ady <= GLOBE_TAP_THRESHOLD; - view->touch_controls_globe = false; - view->touch_down_on_globe = false; - - if (was_dragged) { - if (start_globe_coast(view)) { - mark_dynamic_globe_dirty(view); - } else if (!try_start_magnetic_city_lock(view, GLOBE_LOCK_RADIUS_PX)) { - mark_dynamic_globe_dirty(view); - } - } else if (was_globe_tap) { - if (commit_hovered_location(view)) { - globe_view_pop(view); - } - } else { - mark_dynamic_globe_dirty(view); - } - return; + if (view->is_revealed && !view->is_revealing && view->touch_controls_globe) { + update_globe_drag(view, event->x, event->y); + } + + } else if (event->type == TouchEvent_Liftoff && view->touch_active) { + view->touch_active = false; + int16_t dx = event->x - view->touch_start_x; + int16_t dy = event->y - view->touch_start_y; + int16_t adx = dx < 0 ? -dx : dx; + int16_t ady = dy < 0 ? -dy : dy; + + if (view->is_revealed && !view->is_revealing && view->touch_controls_globe) { + bool was_dragged = view->touch_drag_rotated; + bool was_globe_tap = + view->touch_down_on_globe && adx <= GLOBE_TAP_THRESHOLD && ady <= GLOBE_TAP_THRESHOLD; + view->touch_controls_globe = false; + view->touch_down_on_globe = false; + + if (was_dragged) { + if (start_globe_coast(view)) { + mark_dynamic_globe_dirty(view); + } else if (!try_start_magnetic_city_lock(view, GLOBE_LOCK_RADIUS_PX)) { + mark_dynamic_globe_dirty(view); } + } else if (was_globe_tap) { + if (commit_hovered_location(view)) { + globe_view_pop(view); + } + } else { + mark_dynamic_globe_dirty(view); + } + return; + } + + view->touch_controls_globe = false; + view->touch_down_on_globe = false; - view->touch_controls_globe = false; - view->touch_down_on_globe = false; - - if (adx <= GLOBE_TAP_THRESHOLD && ady <= GLOBE_TAP_THRESHOLD) { - // B&W cradle taps route by target: tap the globe to reveal it, tap the - // saved-locations bar to open the list. Taps elsewhere (title/dead space) no-op. - if (!view->is_revealed) { - if (point_is_on_intro_globe(view, event->x, event->y)) { - toggle_reveal(view); - } else if (!view->is_revealing && - point_is_on_saved_locations_label(view, event->y) && - view->saved_locations_callback) { - view->saved_locations_callback(view->saved_locations_context); - } - } - } else if (!view->is_revealed && !view->is_revealing && - adx > ady && dx > 0) { - // Cradle swipe RIGHT backs out to the sunset card (mirrors BACK). The only - // cradle swipe — vertical swipes stay inert (taps handle globe/saved-list). - if (view->back_callback) { - globe_view_slide_out_right(view); - } else { - app_window_stack_pop_all(true); - } - } else if (view->is_revealed && !view->is_revealing) { - if (view->touch_drag_axis_set) { - mark_dynamic_globe_dirty(view); // revealed-globe drag settle (in-screen) - } else if (adx > ady && dx > 0) { - toggle_reveal(view); // off-globe swipe right = BACK (un-reveal to the cradle) - } + if (adx <= GLOBE_TAP_THRESHOLD && ady <= GLOBE_TAP_THRESHOLD) { + // B&W cradle taps route by target: tap the globe to reveal it, tap the + // saved-locations bar to open the list. Taps elsewhere (title/dead space) no-op. + if (!view->is_revealed) { + if (point_is_on_intro_globe(view, event->x, event->y)) { + toggle_reveal(view); + } else if (!view->is_revealing && point_is_on_saved_locations_label(view, event->y) && + view->saved_locations_callback) { + view->saved_locations_callback(view->saved_locations_context); } + } + } else if (!view->is_revealed && !view->is_revealing && adx > ady && dx > 0) { + // Cradle swipe RIGHT backs out to the sunset card (mirrors BACK). The only + // cradle swipe — vertical swipes stay inert (taps handle globe/saved-list). + if (view->back_callback) { + globe_view_slide_out_right(view); + } else { + app_window_stack_pop_all(true); + } + } else if (view->is_revealed && !view->is_revealing) { + if (view->touch_drag_axis_set) { + mark_dynamic_globe_dirty(view); // revealed-globe drag settle (in-screen) + } else if (adx > ady && dx > 0) { + toggle_reveal(view); // off-globe swipe right = BACK (un-reveal to the cradle) + } } + } } #endif @@ -3601,350 +3508,342 @@ static void touch_handler(const TouchEvent *event, void *context) { * Register window click handlers */ static void window_click_provider(void *context) { - window_single_click_subscribe(BUTTON_ID_BACK, window_click_handler); - window_single_click_subscribe(BUTTON_ID_SELECT, window_click_handler); - window_single_click_subscribe(BUTTON_ID_UP, window_click_handler); - window_single_click_subscribe(BUTTON_ID_DOWN, window_click_handler); + window_single_click_subscribe(BUTTON_ID_BACK, window_click_handler); + window_single_click_subscribe(BUTTON_ID_SELECT, window_click_handler); + window_single_click_subscribe(BUTTON_ID_UP, window_click_handler); + window_single_click_subscribe(BUTTON_ID_DOWN, window_click_handler); } static void window_appear_handler(Window *window) { - GlobeView *view = (GlobeView *)window_get_user_data(window); - if (!view || !view->is_animating) return; + GlobeView *view = (GlobeView *)window_get_user_data(window); + if (!view || !view->is_animating) + return; - ensure_visual_resources(view); - if (!view->is_revealed && !view->animation_timer) { - schedule_frame_timer(view); - start_globe_idle_timer(view); - } + ensure_visual_resources(view); + if (!view->is_revealed && !view->animation_timer) { + schedule_frame_timer(view); + start_globe_idle_timer(view); + } #ifdef CONFIG_TOUCH - touch_service_subscribe(touch_handler, view); + touch_service_subscribe(touch_handler, view); #endif - mark_dynamic_globe_dirty(view); + mark_dynamic_globe_dirty(view); } static void window_disappear_handler(Window *window) { - GlobeView *view = (GlobeView *)window_get_user_data(window); + GlobeView *view = (GlobeView *)window_get_user_data(window); #ifdef CONFIG_TOUCH - // Always release the touch slot here (not in stop_animation): the globe is often - // DESTROYED after the next window's appear already re-subscribed (commit -> forecast, - // BACK -> card), and a late unsubscribe would clobber that window's subscription. - touch_service_unsubscribe(); + // Always release the touch slot here (not in stop_animation): the globe is often + // DESTROYED after the next window's appear already re-subscribed (commit -> forecast, + // BACK -> card), and a late unsubscribe would clobber that window's subscription. + touch_service_unsubscribe(); #endif - if (!view || !view->is_animating) return; + if (!view || !view->is_animating) + return; #ifdef CONFIG_TOUCH - stop_globe_coast(view, false); + stop_globe_coast(view, false); #endif - cancel_timer_slot(&view->animation_timer); - cancel_timer_slot(&view->idle_timer); - view->bw_idle = false; - view->bw_idle_slowdown_step = 0; - release_visual_resources(view); + cancel_timer_slot(&view->animation_timer); + cancel_timer_slot(&view->idle_timer); + view->bw_idle = false; + view->bw_idle_slowdown_step = 0; + release_visual_resources(view); } /** * Create a new globe view */ GlobeView *globe_view_create(void) { - GlobeView *view = malloc(sizeof(GlobeView)); - if (!view) return NULL; - memset(view, 0, sizeof(*view)); - - // Create window - view->window = window_create(); - if (!view->window) { - free(view); - return NULL; - } - - // Configure window - window_set_user_data(view->window, view); - window_set_background_color(view->window, GColorWhite); - window_set_click_config_provider_with_context(view->window, window_click_provider, view); - window_set_window_handlers(view->window, (WindowHandlers) { - .appear = window_appear_handler, - .disappear = window_disappear_handler, - }); - // Create canvas layer for animation - Layer *root_layer = window_get_root_layer(view->window); - GRect bounds = layer_get_bounds(root_layer); + GlobeView *view = malloc(sizeof(GlobeView)); + if (!view) + return NULL; + memset(view, 0, sizeof(*view)); + + // Create window + view->window = window_create(); + if (!view->window) { + free(view); + return NULL; + } - view->canvas_layer = layer_create_with_data(bounds, sizeof(GlobeView *)); - if (!view->canvas_layer) { - window_destroy(view->window); - free(view); - return NULL; - } - *(GlobeView **)layer_get_data(view->canvas_layer) = view; - layer_set_update_proc(view->canvas_layer, canvas_layer_draw); - layer_add_child(root_layer, view->canvas_layer); - - view->space_layer = layer_create_with_data(bounds, sizeof(GlobeView *)); - if (!view->space_layer) { - layer_destroy(view->canvas_layer); - window_destroy(view->window); - free(view); - return NULL; - } - *(GlobeView **)layer_get_data(view->space_layer) = view; - layer_set_update_proc(view->space_layer, space_layer_draw); - layer_set_hidden(view->space_layer, true); - layer_add_child(root_layer, view->space_layer); - - view->globe_layer = layer_create_with_data( - revealed_globe_layer_frame(bounds), sizeof(GlobeView *)); - if (!view->globe_layer) { - layer_destroy(view->space_layer); - layer_destroy(view->canvas_layer); - window_destroy(view->window); - free(view); - return NULL; - } - *(GlobeView **)layer_get_data(view->globe_layer) = view; - layer_set_update_proc(view->globe_layer, globe_layer_draw); - layer_set_hidden(view->globe_layer, true); - layer_add_child(root_layer, view->globe_layer); - - view->city_label_layer = text_layer_create( - city_label_frame_for_bounds(bounds)); - if (!view->city_label_layer) { - layer_destroy(view->globe_layer); - layer_destroy(view->space_layer); - layer_destroy(view->canvas_layer); - window_destroy(view->window); - free(view); - return NULL; - } + // Configure window + window_set_user_data(view->window, view); + window_set_background_color(view->window, GColorWhite); + window_set_click_config_provider_with_context(view->window, window_click_provider, view); + window_set_window_handlers(view->window, (WindowHandlers){ + .appear = window_appear_handler, + .disappear = window_disappear_handler, + }); + // Create canvas layer for animation + Layer *root_layer = window_get_root_layer(view->window); + GRect bounds = layer_get_bounds(root_layer); + + view->canvas_layer = layer_create_with_data(bounds, sizeof(GlobeView *)); + if (!view->canvas_layer) { + window_destroy(view->window); + free(view); + return NULL; + } + *(GlobeView **)layer_get_data(view->canvas_layer) = view; + layer_set_update_proc(view->canvas_layer, canvas_layer_draw); + layer_add_child(root_layer, view->canvas_layer); + + view->space_layer = layer_create_with_data(bounds, sizeof(GlobeView *)); + if (!view->space_layer) { + layer_destroy(view->canvas_layer); + window_destroy(view->window); + free(view); + return NULL; + } + *(GlobeView **)layer_get_data(view->space_layer) = view; + layer_set_update_proc(view->space_layer, space_layer_draw); + layer_set_hidden(view->space_layer, true); + layer_add_child(root_layer, view->space_layer); + + view->globe_layer = + layer_create_with_data(revealed_globe_layer_frame(bounds), sizeof(GlobeView *)); + if (!view->globe_layer) { + layer_destroy(view->space_layer); + layer_destroy(view->canvas_layer); + window_destroy(view->window); + free(view); + return NULL; + } + *(GlobeView **)layer_get_data(view->globe_layer) = view; + layer_set_update_proc(view->globe_layer, globe_layer_draw); + layer_set_hidden(view->globe_layer, true); + layer_add_child(root_layer, view->globe_layer); + + view->city_label_layer = text_layer_create(city_label_frame_for_bounds(bounds)); + if (!view->city_label_layer) { + layer_destroy(view->globe_layer); + layer_destroy(view->space_layer); + layer_destroy(view->canvas_layer); + window_destroy(view->window); + free(view); + return NULL; + } - // BW: white-on-clear text sinks into the dithered globe — give the label a - // solid black chip. Colour keeps the borderless look over the dark space bg. - text_layer_set_background_color(view->city_label_layer, - PBL_IF_COLOR_ELSE(GColorClear, GColorBlack)); - text_layer_set_text_color(view->city_label_layer, GColorWhite); - text_layer_set_font(view->city_label_layer, - fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD)); - text_layer_set_text_alignment(view->city_label_layer, - GTextAlignmentCenter); - text_layer_set_overflow_mode(view->city_label_layer, - GTextOverflowModeTrailingEllipsis); - text_layer_set_text(view->city_label_layer, ""); - layer_set_hidden(text_layer_get_layer(view->city_label_layer), true); - layer_add_child(root_layer, text_layer_get_layer(view->city_label_layer)); - - // Initialize animation state (all-zero fields come from the memset above) - matrix_identity(view->globe_rotation); - view->bw_frame_count = NUM_BW_FRAMES; - view->bw_sequence_duration_ms = NUM_BW_FRAMES * GLOBE_FRAME_INTERVAL_MS; - view->reveal_direction = 1; + // BW: white-on-clear text sinks into the dithered globe — give the label a + // solid black chip. Colour keeps the borderless look over the dark space bg. + text_layer_set_background_color(view->city_label_layer, + PBL_IF_COLOR_ELSE(GColorClear, GColorBlack)); + text_layer_set_text_color(view->city_label_layer, GColorWhite); + text_layer_set_font(view->city_label_layer, fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD)); + text_layer_set_text_alignment(view->city_label_layer, GTextAlignmentCenter); + text_layer_set_overflow_mode(view->city_label_layer, GTextOverflowModeTrailingEllipsis); + text_layer_set_text(view->city_label_layer, ""); + layer_set_hidden(text_layer_get_layer(view->city_label_layer), true); + layer_add_child(root_layer, text_layer_get_layer(view->city_label_layer)); + + // Initialize animation state (all-zero fields come from the memset above) + matrix_identity(view->globe_rotation); + view->bw_frame_count = NUM_BW_FRAMES; + view->bw_sequence_duration_ms = NUM_BW_FRAMES * GLOBE_FRAME_INTERVAL_MS; + view->reveal_direction = 1; #ifdef CONFIG_TOUCH - view->hover_city_index = -1; + view->hover_city_index = -1; #endif - globe_view_reload_saved_locations(view); + globe_view_reload_saved_locations(view); - return view; + return view; } -void globe_view_set_location_select_callback(GlobeView *view, - GlobeLocationSelectCallback callback, +void globe_view_set_location_select_callback(GlobeView *view, GlobeLocationSelectCallback callback, void *context) { - if (!view) return; - view->location_select_callback = callback; - view->location_select_context = context; + if (!view) + return; + view->location_select_callback = callback; + view->location_select_context = context; } static void globe_view_reload_saved_locations(GlobeView *view) { - if (!view) return; - - SavedLocationEntry previous_entry; - bool had_previous_entry = false; - SavedLocationEntry *current_entry = selected_saved_entry(view); - if (current_entry) { - previous_entry = *current_entry; - had_previous_entry = true; - } + if (!view) + return; + + SavedLocationEntry previous_entry; + bool had_previous_entry = false; + SavedLocationEntry *current_entry = selected_saved_entry(view); + if (current_entry) { + previous_entry = *current_entry; + had_previous_entry = true; + } - // The phone's synced records ARE the pin list. - view->saved_entry_count = saved_locations_get_entries( - view->saved_entries, SAVED_LOCATIONS_MAX_ENTRIES); - - if (view->saved_entry_count <= 0) { - // Nothing synced yet: keep one entry so the globe still has a subject. - view->saved_entry_count = 1; - view->saved_entries[0] = (SavedLocationEntry) { - .ds_index = -1, - .is_current_location = true, - .latitude_e2 = (int16_t)view->current_location_latitude_e2, - .longitude_e2 = (int16_t)view->current_location_longitude_e2, - .has_coordinates = view->has_current_location, - .temp = (int16_t)WX_DS_UNKNOWN_TEMP, - }; - snprintf(view->saved_entries[0].label, - sizeof(view->saved_entries[0].label), "%s", - view->current_location_label[0] - ? view->current_location_label - : i18n_get("Current Location", view)); - } + // The phone's synced records ARE the pin list. + view->saved_entry_count = + saved_locations_get_entries(view->saved_entries, SAVED_LOCATIONS_MAX_ENTRIES); + + if (view->saved_entry_count <= 0) { + // Nothing synced yet: keep one entry so the globe still has a subject. + view->saved_entry_count = 1; + view->saved_entries[0] = (SavedLocationEntry){ + .ds_index = -1, + .is_current_location = true, + .latitude_e2 = (int16_t)view->current_location_latitude_e2, + .longitude_e2 = (int16_t)view->current_location_longitude_e2, + .has_coordinates = view->has_current_location, + .temp = (int16_t)WX_DS_UNKNOWN_TEMP, + }; + snprintf(view->saved_entries[0].label, sizeof(view->saved_entries[0].label), "%s", + view->current_location_label[0] ? view->current_location_label + : i18n_get("Current Location", view)); + } - int next_index = had_previous_entry - ? find_saved_entry_index(view, &previous_entry) - : -1; - if (next_index < 0) { - next_index = find_current_saved_entry_index(view); - } - if (next_index < 0) next_index = 0; + int next_index = had_previous_entry ? find_saved_entry_index(view, &previous_entry) : -1; + if (next_index < 0) { + next_index = find_current_saved_entry_index(view); + } + if (next_index < 0) + next_index = 0; - view->selected_city_index = next_index; - update_selected_transition_target(view); + view->selected_city_index = next_index; + update_selected_transition_target(view); - if (view->is_revealed && !view->is_revealing && !view->is_free_roam) { - set_color_orientation(view, - view->transition_color_target_latitude_e2, - view->transition_color_target_longitude_e2); - reload_current_frame(view); - } else { - update_city_label_layer(view); - mark_dynamic_globe_dirty(view); - } + if (view->is_revealed && !view->is_revealing && !view->is_free_roam) { + set_color_orientation(view, view->transition_color_target_latitude_e2, + view->transition_color_target_longitude_e2); + reload_current_frame(view); + } else { + update_city_label_layer(view); + mark_dynamic_globe_dirty(view); + } } -void globe_view_set_saved_locations_callback(GlobeView *view, - GlobeSavedLocationsCallback callback, +void globe_view_set_saved_locations_callback(GlobeView *view, GlobeSavedLocationsCallback callback, void *context) { - if (!view) return; - view->saved_locations_callback = callback; - view->saved_locations_context = context; + if (!view) + return; + view->saved_locations_callback = callback; + view->saved_locations_context = context; } // (main_callback chain deleted — registered but never invoked; size pass) -void globe_view_set_back_callback(GlobeView *view, - GlobeMainCallback callback, - void *context) { - if (!view) return; - view->back_callback = callback; - view->back_context = context; +void globe_view_set_back_callback(GlobeView *view, GlobeMainCallback callback, void *context) { + if (!view) + return; + view->back_callback = callback; + view->back_context = context; } -void globe_view_set_current_location(GlobeView *view, - const char *label, - int16_t latitude_e2, +void globe_view_set_current_location(GlobeView *view, const char *label, int16_t latitude_e2, int16_t longitude_e2) { - if (!view) return; - - bool should_select_current = - !view->is_animating || selected_city_is_current_location(view); - - view->has_current_location = true; - view->current_location_latitude_e2 = latitude_e2; - view->current_location_longitude_e2 = longitude_e2; - if (label && label[0]) { - strncpy(view->current_location_label, label, - sizeof(view->current_location_label) - 1); - view->current_location_label[sizeof(view->current_location_label) - 1] = '\0'; - } else { - strncpy(view->current_location_label, i18n_get("Current Location", view), - sizeof(view->current_location_label) - 1); - view->current_location_label[sizeof(view->current_location_label) - 1] = '\0'; - } + if (!view) + return; + + bool should_select_current = !view->is_animating || selected_city_is_current_location(view); + + view->has_current_location = true; + view->current_location_latitude_e2 = latitude_e2; + view->current_location_longitude_e2 = longitude_e2; + if (label && label[0]) { + strncpy(view->current_location_label, label, sizeof(view->current_location_label) - 1); + view->current_location_label[sizeof(view->current_location_label) - 1] = '\0'; + } else { + strncpy(view->current_location_label, i18n_get("Current Location", view), + sizeof(view->current_location_label) - 1); + view->current_location_label[sizeof(view->current_location_label) - 1] = '\0'; + } - globe_view_reload_saved_locations(view); + globe_view_reload_saved_locations(view); - if (should_select_current) { - int current_index = find_current_saved_entry_index(view); - if (current_index >= 0) { - view->selected_city_index = current_index; - } - update_selected_transition_target(view); - if (view->is_revealed && !view->is_revealing && - !view->is_free_roam) { - set_color_orientation(view, - view->transition_color_target_latitude_e2, - view->transition_color_target_longitude_e2); - reload_current_frame(view); - } + if (should_select_current) { + int current_index = find_current_saved_entry_index(view); + if (current_index >= 0) { + view->selected_city_index = current_index; } + update_selected_transition_target(view); + if (view->is_revealed && !view->is_revealing && !view->is_free_roam) { + set_color_orientation(view, view->transition_color_target_latitude_e2, + view->transition_color_target_longitude_e2); + reload_current_frame(view); + } + } } /** * Destroy the globe view */ void globe_view_destroy(GlobeView *view) { - if (!view) return; + if (!view) + return; - // Stop animation - globe_view_stop_animation(view); + // Stop animation + globe_view_stop_animation(view); - cancel_reveal_animation(view); + cancel_reveal_animation(view); - release_visual_resources(view); + release_visual_resources(view); - if (view->city_label_layer) { - text_layer_destroy(view->city_label_layer); - view->city_label_layer = NULL; - } - if (view->globe_layer) { - layer_destroy(view->globe_layer); - view->globe_layer = NULL; - } - if (view->space_layer) { - layer_destroy(view->space_layer); - view->space_layer = NULL; - } + if (view->city_label_layer) { + text_layer_destroy(view->city_label_layer); + view->city_label_layer = NULL; + } + if (view->globe_layer) { + layer_destroy(view->globe_layer); + view->globe_layer = NULL; + } + if (view->space_layer) { + layer_destroy(view->space_layer); + view->space_layer = NULL; + } - // Destroy canvas layer - if (view->canvas_layer) { - layer_destroy(view->canvas_layer); - view->canvas_layer = NULL; - } + // Destroy canvas layer + if (view->canvas_layer) { + layer_destroy(view->canvas_layer); + view->canvas_layer = NULL; + } - // Destroy window - if (view->window) { - window_destroy(view->window); - view->window = NULL; - } + // Destroy window + if (view->window) { + window_destroy(view->window); + view->window = NULL; + } - i18n_free_all(view); - free(view); + i18n_free_all(view); + free(view); } /** * Start the globe animation */ void globe_view_start_animation(GlobeView *view) { - if (!view || view->is_animating) return; - - globe_view_reload_saved_locations(view); - - view->is_animating = true; - view->current_frame = 0; - view->bw_elapsed_ms = 0; - set_color_orientation(view, 0, longitude_e2_for_bw_frame(view->current_frame)); - view->transition_color_start_latitude_e2 = 0; - view->transition_color_start_longitude_e2 = view->color_longitude_e2; - view->transition_color_target_latitude_e2 = selected_city_latitude_e2(view); - view->transition_color_target_longitude_e2 = selected_city_longitude_e2(view); - view->transition_bw_frame = 0; - view->reveal_progress = 0; - view->reveal_direction = 1; - view->is_revealing = false; - view->is_revealed = false; - view->intro_world_selected = true; // cursor starts on the globe (SELECT reveals it immediately) - view->bw_idle = false; - view->bw_idle_slowdown_step = 0; - view->intro_selection_ms = 0; + if (!view || view->is_animating) + return; + + globe_view_reload_saved_locations(view); + + view->is_animating = true; + view->current_frame = 0; + view->bw_elapsed_ms = 0; + set_color_orientation(view, 0, longitude_e2_for_bw_frame(view->current_frame)); + view->transition_color_start_latitude_e2 = 0; + view->transition_color_start_longitude_e2 = view->color_longitude_e2; + view->transition_color_target_latitude_e2 = selected_city_latitude_e2(view); + view->transition_color_target_longitude_e2 = selected_city_longitude_e2(view); + view->transition_bw_frame = 0; + view->reveal_progress = 0; + view->reveal_direction = 1; + view->is_revealing = false; + view->is_revealed = false; + view->intro_world_selected = true; // cursor starts on the globe (SELECT reveals it immediately) + view->bw_idle = false; + view->bw_idle_slowdown_step = 0; + view->intro_selection_ms = 0; #ifdef CONFIG_TOUCH - stop_globe_coast(view, false); - view->hover_lock_active = false; + stop_globe_coast(view, false); + view->hover_lock_active = false; #endif - cancel_all_view_animations(view); - ensure_visual_resources(view); + cancel_all_view_animations(view); + ensure_visual_resources(view); - show_intro_canvas(view); - layer_mark_dirty(view->canvas_layer); - schedule_frame_timer(view); - start_globe_idle_timer(view); + show_intro_canvas(view); + layer_mark_dirty(view->canvas_layer); + schedule_frame_timer(view); + start_globe_idle_timer(view); #ifdef CONFIG_TOUCH - touch_service_subscribe(touch_handler, view); + touch_service_subscribe(touch_handler, view); #endif } @@ -3952,41 +3851,43 @@ void globe_view_start_animation(GlobeView *view) { * Stop the globe animation */ void globe_view_stop_animation(GlobeView *view) { - if (!view) return; - // BOTH shapes: round drives the card<->globe hslide pair now, so a mid-slide dismissal - // must cancel this before the layer is torn down, exactly like rect's drop-in. - if (view->entry_drop_anim) { - Animation *a = view->entry_drop_anim; - view->entry_drop_anim = NULL; - animation_unschedule(a); - animation_destroy(a); - } - if (!view->is_animating) return; + if (!view) + return; + // BOTH shapes: round drives the card<->globe hslide pair now, so a mid-slide dismissal + // must cancel this before the layer is torn down, exactly like rect's drop-in. + if (view->entry_drop_anim) { + Animation *a = view->entry_drop_anim; + view->entry_drop_anim = NULL; + animation_unschedule(a); + animation_destroy(a); + } + if (!view->is_animating) + return; - view->is_animating = false; + view->is_animating = false; - // Cancel animation timer - cancel_timer_slot(&view->animation_timer); - cancel_timer_slot(&view->idle_timer); - view->bw_idle = false; - view->bw_idle_slowdown_step = 0; + // Cancel animation timer + cancel_timer_slot(&view->animation_timer); + cancel_timer_slot(&view->idle_timer); + view->bw_idle = false; + view->bw_idle_slowdown_step = 0; - cancel_all_view_animations(view); - view->is_revealing = false; + cancel_all_view_animations(view); + view->is_revealing = false; #ifdef CONFIG_TOUCH - stop_globe_coast(view, false); - // touch_service_unsubscribe lives in window_disappear_handler — stop_animation runs on - // destroy AFTER the next window re-subscribed and must not clobber it. - view->touch_active = false; - view->touch_drag_axis_set = false; - view->touch_drag_rotated = false; - view->touch_down_on_globe = false; - view->touch_controls_globe = false; - view->coast_active = false; - view->hover_lock_active = false; + stop_globe_coast(view, false); + // touch_service_unsubscribe lives in window_disappear_handler — stop_animation runs on + // destroy AFTER the next window re-subscribed and must not clobber it. + view->touch_active = false; + view->touch_drag_axis_set = false; + view->touch_drag_rotated = false; + view->touch_down_on_globe = false; + view->touch_controls_globe = false; + view->coast_active = false; + view->hover_lock_active = false; #endif - release_visual_resources(view); + release_visual_resources(view); } // Slide duration + interpolation are shared with expanded_view via weather_math.h @@ -3994,11 +3895,11 @@ void globe_view_stop_animation(GlobeView *view) { // BOTH shapes. static void prv_drop_stopped(Animation *anim, bool finished, void *context) { - (void)finished; - GlobeView *view = (GlobeView *)context; - if (view && view->entry_drop_anim == anim) { - view->entry_drop_anim = NULL; // auto-destroyed after a normal stop - } + (void)finished; + GlobeView *view = (GlobeView *)context; + if (view && view->entry_drop_anim == anim) { + view->entry_drop_anim = NULL; // auto-destroyed after a normal stop + } } // Shared moook horizontal slide for the intro canvas: create + configure + @@ -4006,75 +3907,83 @@ static void prv_drop_stopped(Animation *anim, bool finished, void *context) { // callers can run their fallback. static bool start_canvas_hslide(GlobeView *view, GRect *from, GRect *to, AnimationStoppedHandler stopped) { - PropertyAnimation *pa = - property_animation_create_layer_frame(view->canvas_layer, from, to); - if (!pa) return false; - Animation *a = (Animation *)pa; - animation_set_duration(a, WEATHER_HSLIDE_MS); - animation_set_custom_interpolation(a, weather_interpolate_moook_soft1); - animation_set_handlers(a, (AnimationHandlers){ .stopped = stopped }, view); - view->entry_drop_anim = a; - animation_schedule(a); - return true; + PropertyAnimation *pa = property_animation_create_layer_frame(view->canvas_layer, from, to); + if (!pa) + return false; + Animation *a = (Animation *)pa; + animation_set_duration(a, WEATHER_HSLIDE_MS); + animation_set_custom_interpolation(a, weather_interpolate_moook_soft1); + animation_set_handlers(a, (AnimationHandlers){.stopped = stopped}, view); + view->entry_drop_anim = a; + animation_schedule(a); + return true; } // SELECT-from-card entrance: the intro canvas slides in from one screen-width to the RIGHT (with // the same moook bounce as the drop-in), pairing with the card's slide-out to the left. void globe_view_push_slide_in_right(GlobeView *view) { - if (!view || !view->canvas_layer) { globe_view_push_animated(view, false); return; } - GRect to = layer_get_frame(view->canvas_layer); - GRect from = to; - from.origin.x += to.size.w; // start one screen-width off the right - layer_set_frame(view->canvas_layer, from); // first painted frame is already off the right - window_stack_push(view->window, false); - globe_view_start_animation(view); - if (!start_canvas_hslide(view, &from, &to, prv_drop_stopped)) { - layer_set_frame(view->canvas_layer, to); - } + if (!view || !view->canvas_layer) { + globe_view_push_animated(view, false); + return; + } + GRect to = layer_get_frame(view->canvas_layer); + GRect from = to; + from.origin.x += to.size.w; // start one screen-width off the right + layer_set_frame(view->canvas_layer, from); // first painted frame is already off the right + window_stack_push(view->window, false); + globe_view_start_animation(view); + if (!start_canvas_hslide(view, &from, &to, prv_drop_stopped)) { + layer_set_frame(view->canvas_layer, to); + } } // Cradle BACK exit: the intro canvas slides out to the right, then hands off via back_callback // (weather.c dismisses the globe and slides the card back in from the left). static void prv_slide_out_right_stopped(Animation *anim, bool finished, void *context) { - GlobeView *view = (GlobeView *)context; - if (!view) return; - if (view->entry_drop_anim == anim) view->entry_drop_anim = NULL; - if (finished && view->back_callback) { - view->back_callback(view->back_context); // dismiss globe + slide card in from the left - } - // Restore the canvas to its on-screen home so a later push isn't left off-screen. - if (view->canvas_layer && view->window) { - layer_set_frame(view->canvas_layer, - layer_get_bounds(window_get_root_layer(view->window))); - } + GlobeView *view = (GlobeView *)context; + if (!view) + return; + if (view->entry_drop_anim == anim) + view->entry_drop_anim = NULL; + if (finished && view->back_callback) { + view->back_callback(view->back_context); // dismiss globe + slide card in from the left + } + // Restore the canvas to its on-screen home so a later push isn't left off-screen. + if (view->canvas_layer && view->window) { + layer_set_frame(view->canvas_layer, layer_get_bounds(window_get_root_layer(view->window))); + } } void globe_view_slide_out_right(GlobeView *view) { - if (!view || !view->canvas_layer) { - if (view && view->back_callback) view->back_callback(view->back_context); - return; - } - GRect from = layer_get_frame(view->canvas_layer); // current, on-screen - GRect to = from; - to.origin.x += from.size.w; // right and off the edge - if (!start_canvas_hslide(view, &from, &to, prv_slide_out_right_stopped)) { - if (view->back_callback) view->back_callback(view->back_context); - } + if (!view || !view->canvas_layer) { + if (view && view->back_callback) + view->back_callback(view->back_context); + return; + } + GRect from = layer_get_frame(view->canvas_layer); // current, on-screen + GRect to = from; + to.origin.x += from.size.w; // right and off the edge + if (!start_canvas_hslide(view, &from, &to, prv_slide_out_right_stopped)) { + if (view->back_callback) + view->back_callback(view->back_context); + } } - // Entry coords for the focus search — platform-neutral (the touch build's // saved_entry_globe_coords twin lives inside CONFIG_TOUCH). -static bool prv_entry_coords_for_focus(GlobeView *view, SavedLocationEntry *e, - int32_t *lat, int32_t *lon) { - if (!e) return false; +static bool prv_entry_coords_for_focus(GlobeView *view, SavedLocationEntry *e, int32_t *lat, + int32_t *lon) { + if (!e) + return false; if (e->is_current_location) { - if (!view->has_current_location) return false; + if (!view->has_current_location) + return false; *lat = view->current_location_latitude_e2; *lon = view->current_location_longitude_e2; return true; } - if (!e->has_coordinates) return false; + if (!e->has_coordinates) + return false; *lat = e->latitude_e2; *lon = e->longitude_e2; return true; @@ -4085,20 +3994,27 @@ static bool prv_entry_coords_for_focus(GlobeView *view, SavedLocationEntry *e, // BEFORE the push: the reveal intro targets selected_city_index, and the direct // orientation snap covers re-pushes that skip the intro. No-op without coords. void globe_view_focus_coords(GlobeView *view, int16_t lat_e2, int16_t lon_e2) { - if (!view || view->saved_entry_count <= 0) return; - if (lat_e2 == INT16_MIN || lon_e2 == INT16_MIN) return; + if (!view || view->saved_entry_count <= 0) + return; + if (lat_e2 == INT16_MIN || lon_e2 == INT16_MIN) + return; int best = -1; int32_t best_d = 0; for (int i = 0; i < view->saved_entry_count; i++) { SavedLocationEntry *e = saved_entry_for_index(view, i); int32_t elat, elon; - if (!prv_entry_coords_for_focus(view, e, &elat, &elon)) continue; + if (!prv_entry_coords_for_focus(view, e, &elat, &elon)) + continue; const int32_t dlat = elat - lat_e2; const int32_t dlon = shortest_longitude_delta_e2(lon_e2, elon); const int32_t d = dlat * dlat + dlon * dlon; - if (best < 0 || d < best_d) { best = i; best_d = d; } + if (best < 0 || d < best_d) { + best = i; + best_d = d; + } } - if (best < 0) return; + if (best < 0) + return; cancel_city_animation(view); cancel_bounce_animation(view); view->selected_city_index = best; @@ -4120,25 +4036,28 @@ void globe_view_focus_coords(GlobeView *view, int16_t lat_e2, int16_t lon_e2) { } void globe_view_push_animated(GlobeView *view, bool animated) { - if (!view) return; + if (!view) + return; - window_stack_push(view->window, animated); - globe_view_start_animation(view); + window_stack_push(view->window, animated); + globe_view_start_animation(view); } /** * Pop the globe view from the window stack */ void globe_view_pop(GlobeView *view) { - if (!view) return; + if (!view) + return; - globe_view_stop_animation(view); - window_stack_pop(true); + globe_view_stop_animation(view); + window_stack_pop(true); } void globe_view_dismiss(GlobeView *view, bool animated) { - if (!view) return; + if (!view) + return; - globe_view_stop_animation(view); - window_stack_remove(view->window, animated); + globe_view_stop_animation(view); + window_stack_remove(view->window, animated); } diff --git a/src/fw/apps/system/weather/globe_view.h b/src/fw/apps/system/weather/globe_view.h index bc1ee29c64..4928bd7a08 100644 --- a/src/fw/apps/system/weather/globe_view.h +++ b/src/fw/apps/system/weather/globe_view.h @@ -12,103 +12,102 @@ #include "saved_locations.h" //! `ds_index` identifies the phone's weather record directly — no matching. -typedef void (*GlobeLocationSelectCallback)(int ds_index, bool force, - void *context); +typedef void (*GlobeLocationSelectCallback)(int ds_index, bool force, void *context); typedef void (*GlobeSavedLocationsCallback)(void *context); typedef void (*GlobeMainCallback)(void *context); typedef struct { - Window *window; - Layer *canvas_layer; - Layer *space_layer; - Layer *globe_layer; - TextLayer *city_label_layer; - uint8_t *cubemap_data; - size_t cubemap_size; - uint8_t *starfield_data; - size_t starfield_size; - GDrawCommandSequence *bw_sequence; - GDrawCommandImage *cradle_pdc; - uint32_t bw_frame_count; - uint32_t bw_sequence_duration_ms; - uint32_t bw_elapsed_ms; - int current_frame; - int32_t color_latitude_e2; - int32_t color_longitude_e2; - int32_t transition_color_start_latitude_e2; - int32_t transition_color_start_longitude_e2; - int32_t transition_color_target_latitude_e2; - int32_t transition_color_target_longitude_e2; - int32_t city_anim_start_latitude_e2; - int32_t city_anim_start_longitude_e2; - int32_t city_anim_target_latitude_e2; - int32_t city_anim_target_longitude_e2; - int32_t city_anim_latitude_delta_e2; - int32_t city_anim_longitude_delta_e2; - int32_t globe_rotation[9]; - int transition_bw_frame; - Animation *reveal_anim; - Animation *city_anim; - Animation *bounce_anim; - Animation *lock_pulse_anim; // expanding Celeste ring on lock/nav arrival - AnimationProgress reveal_progress; - AnimationProgress city_anim_progress; - AnimationProgress bounce_progress; - AnimationProgress lock_pulse_progress; - int reveal_direction; - int selected_city_index; - SavedLocationEntry saved_entries[SAVED_LOCATIONS_MAX_ENTRIES]; - int saved_entry_count; - int32_t current_location_latitude_e2; - int32_t current_location_longitude_e2; - int bounce_direction; - char current_location_label[48]; - char city_label_text[48]; - GlobeLocationSelectCallback location_select_callback; - void *location_select_context; - GlobeSavedLocationsCallback saved_locations_callback; - void *saved_locations_context; - GlobeMainCallback back_callback; // cradle BACK -> weather card (reverse of the SELECT entrance) - void *back_context; - AppTimer *animation_timer; - AppTimer *idle_timer; + Window *window; + Layer *canvas_layer; + Layer *space_layer; + Layer *globe_layer; + TextLayer *city_label_layer; + uint8_t *cubemap_data; + size_t cubemap_size; + uint8_t *starfield_data; + size_t starfield_size; + GDrawCommandSequence *bw_sequence; + GDrawCommandImage *cradle_pdc; + uint32_t bw_frame_count; + uint32_t bw_sequence_duration_ms; + uint32_t bw_elapsed_ms; + int current_frame; + int32_t color_latitude_e2; + int32_t color_longitude_e2; + int32_t transition_color_start_latitude_e2; + int32_t transition_color_start_longitude_e2; + int32_t transition_color_target_latitude_e2; + int32_t transition_color_target_longitude_e2; + int32_t city_anim_start_latitude_e2; + int32_t city_anim_start_longitude_e2; + int32_t city_anim_target_latitude_e2; + int32_t city_anim_target_longitude_e2; + int32_t city_anim_latitude_delta_e2; + int32_t city_anim_longitude_delta_e2; + int32_t globe_rotation[9]; + int transition_bw_frame; + Animation *reveal_anim; + Animation *city_anim; + Animation *bounce_anim; + Animation *lock_pulse_anim; // expanding Celeste ring on lock/nav arrival + AnimationProgress reveal_progress; + AnimationProgress city_anim_progress; + AnimationProgress bounce_progress; + AnimationProgress lock_pulse_progress; + int reveal_direction; + int selected_city_index; + SavedLocationEntry saved_entries[SAVED_LOCATIONS_MAX_ENTRIES]; + int saved_entry_count; + int32_t current_location_latitude_e2; + int32_t current_location_longitude_e2; + int bounce_direction; + char current_location_label[48]; + char city_label_text[48]; + GlobeLocationSelectCallback location_select_callback; + void *location_select_context; + GlobeSavedLocationsCallback saved_locations_callback; + void *saved_locations_context; + GlobeMainCallback back_callback; // cradle BACK -> weather card (reverse of the SELECT entrance) + void *back_context; + AppTimer *animation_timer; + AppTimer *idle_timer; #ifdef CONFIG_TOUCH - AppTimer *coast_timer; + AppTimer *coast_timer; #endif - bool is_animating; - bool is_revealing; - bool is_revealed; - bool has_current_location; - bool has_custom_location; - bool is_free_roam; - bool intro_world_selected; - bool bw_idle; - uint8_t bw_idle_slowdown_step; - uint8_t intro_selection_ms; - bool bw_sequence_scaled; // small-rect: writable clones scaled once at load - bool cradle_pdc_scaled; + bool is_animating; + bool is_revealing; + bool is_revealed; + bool has_current_location; + bool has_custom_location; + bool is_free_roam; + bool intro_world_selected; + bool bw_idle; + uint8_t bw_idle_slowdown_step; + uint8_t intro_selection_ms; + bool bw_sequence_scaled; // small-rect: writable clones scaled once at load + bool cradle_pdc_scaled; #ifdef CONFIG_TOUCH - int16_t touch_start_x; - int16_t touch_start_y; - int16_t touch_last_x; - int16_t touch_last_y; - int32_t touch_velocity_x_q8; - int32_t touch_velocity_y_q8; - int32_t coast_velocity_x_q8; - int32_t coast_velocity_y_q8; - int32_t starfield_offset_x_q8; - int32_t starfield_offset_y_q8; - int hover_city_index; - bool touch_active; - bool touch_drag_axis_set; - bool touch_drag_rotated; - bool touch_down_on_globe; - bool touch_controls_globe; - bool coast_active; - bool hover_lock_active; + int16_t touch_start_x; + int16_t touch_start_y; + int16_t touch_last_x; + int16_t touch_last_y; + int32_t touch_velocity_x_q8; + int32_t touch_velocity_y_q8; + int32_t coast_velocity_x_q8; + int32_t coast_velocity_y_q8; + int32_t starfield_offset_x_q8; + int32_t starfield_offset_y_q8; + int hover_city_index; + bool touch_active; + bool touch_drag_axis_set; + bool touch_drag_rotated; + bool touch_down_on_globe; + bool touch_controls_globe; + bool coast_active; + bool hover_lock_active; #endif - // UP-from-forecast entrance: Pebble-Health drop-from-above + bounce (rect only). - Animation *entry_drop_anim; + // UP-from-forecast entrance: Pebble-Health drop-from-above + bounce (rect only). + Animation *entry_drop_anim; } GlobeView; /** @@ -117,24 +116,18 @@ typedef struct { */ GlobeView *globe_view_create(void); -void globe_view_set_location_select_callback(GlobeView *view, - GlobeLocationSelectCallback callback, +void globe_view_set_location_select_callback(GlobeView *view, GlobeLocationSelectCallback callback, void *context); -void globe_view_set_saved_locations_callback(GlobeView *view, - GlobeSavedLocationsCallback callback, +void globe_view_set_saved_locations_callback(GlobeView *view, GlobeSavedLocationsCallback callback, void *context); // Set the callback fired when BACK is pressed on the intro cradle: the globe slides out to the // RIGHT, then this fires so weather.c can bring the weather card back in from the LEFT. When unset, // cradle BACK keeps its default (exit the app). -void globe_view_set_back_callback(GlobeView *view, - GlobeMainCallback callback, - void *context); +void globe_view_set_back_callback(GlobeView *view, GlobeMainCallback callback, void *context); -void globe_view_set_current_location(GlobeView *view, - const char *label, - int16_t latitude_e2, +void globe_view_set_current_location(GlobeView *view, const char *label, int16_t latitude_e2, int16_t longitude_e2); /** diff --git a/src/fw/apps/system/weather/pebble_compat.h b/src/fw/apps/system/weather/pebble_compat.h index 743ad3676d..86d512d884 100644 --- a/src/fw/apps/system/weather/pebble_compat.h +++ b/src/fw/apps/system/weather/pebble_compat.h @@ -59,11 +59,11 @@ // --- Window-stack call-site shims: the SDK names map 1:1 to the app-window // variants firmware apps must use. --- -#define window_stack_push(window, animated) app_window_stack_push((window), (animated)) -#define window_stack_pop(animated) app_window_stack_pop((animated)) -#define window_stack_pop_all(animated) app_window_stack_pop_all((animated)) -#define window_stack_remove(window, animated) app_window_stack_remove((window), (animated)) -#define window_stack_get_top_window() app_window_stack_get_top_window() +#define window_stack_push(window, animated) app_window_stack_push((window), (animated)) +#define window_stack_pop(animated) app_window_stack_pop((animated)) +#define window_stack_pop_all(animated) app_window_stack_pop_all((animated)) +#define window_stack_remove(window, animated) app_window_stack_remove((window), (animated)) +#define window_stack_get_top_window() app_window_stack_get_top_window() // =========================================================================== // SDK→firmware applib SIGNATURE shims. @@ -76,35 +76,40 @@ // =========================================================================== #include "pbl/drivers/rtc.h" // rtc_get_time -#define layer_get_bounds(layer) layer_get_bounds_by_value(layer) -#define layer_get_frame(layer) layer_get_frame_by_value(layer) -#define layer_set_frame(layer, ...) layer_set_frame_by_value((layer), __VA_ARGS__) -#define menu_layer_set_callbacks(ml, ctx, ...) menu_layer_set_callbacks_by_value((ml), (ctx), __VA_ARGS__) +#define layer_get_bounds(layer) layer_get_bounds_by_value(layer) +#define layer_get_frame(layer) layer_get_frame_by_value(layer) +#define layer_set_frame(layer, ...) layer_set_frame_by_value((layer), __VA_ARGS__) +#define menu_layer_set_callbacks(ml, ctx, ...) \ + menu_layer_set_callbacks_by_value((ml), (ctx), __VA_ARGS__) // Variadic: a WindowHandlers brace-literal arg contains commas that the // preprocessor would otherwise split into multiple macro arguments. -#define window_set_window_handlers(w, ...) window_set_window_handlers_by_value((w), __VA_ARGS__) -#define graphics_text_layout_get_content_size(...) app_graphics_text_layout_get_content_size(__VA_ARGS__) -#define graphics_fill_rect(ctx, rect, rad, mask) graphics_fill_round_rect_by_value((ctx), (rect), (rad), (mask)) -#define graphics_draw_rect(ctx, rect) graphics_draw_rect_by_value((ctx), (rect)) -#define graphics_draw_round_rect(ctx, rect, rad) graphics_draw_round_rect_by_value((ctx), (rect), (rad)) -#define graphics_draw_bitmap_in_rect(ctx, bmp, rect) graphics_draw_bitmap_in_rect_by_value((ctx), (bmp), (rect)) +#define window_set_window_handlers(w, ...) window_set_window_handlers_by_value((w), __VA_ARGS__) +#define graphics_text_layout_get_content_size(...) \ + app_graphics_text_layout_get_content_size(__VA_ARGS__) +#define graphics_fill_rect(ctx, rect, rad, mask) \ + graphics_fill_round_rect_by_value((ctx), (rect), (rad), (mask)) +#define graphics_draw_rect(ctx, rect) graphics_draw_rect_by_value((ctx), (rect)) +#define graphics_draw_round_rect(ctx, rect, rad) \ + graphics_draw_round_rect_by_value((ctx), (rect), (rad)) +#define graphics_draw_bitmap_in_rect(ctx, bmp, rect) \ + graphics_draw_bitmap_in_rect_by_value((ctx), (bmp), (rect)) // Raw resource loading: the firmware's bare resource_* take a ResAppNum; the // app-facing applib_resource_* variants match the SDK's by-id/by-handle forms. -#define resource_get_handle(id) applib_resource_get_handle(id) -#define resource_size(handle) applib_resource_size(handle) -#define resource_load(handle, buf, max) applib_resource_load((handle), (buf), (max)) +#define resource_get_handle(id) applib_resource_get_handle(id) +#define resource_size(handle) applib_resource_size(handle) +#define resource_load(handle, buf, max) applib_resource_load((handle), (buf), (max)) // App-task heap (the ported code uses the libc names). NOTE: the *_check variants // CROAK (kill the app) on OOM and never return NULL — any `if (!p)` after these is // unreachable. Sites with a real fallback path (skip-the-effect scratch buffers, // optional resource loads) must use malloc_try instead. #define calloc(n, sz) app_calloc_check((n), (sz)) -#define malloc(sz) app_malloc_check(sz) +#define malloc(sz) app_malloc_check(sz) #define malloc_try(sz) app_malloc(sz) -#define free(p) app_free(p) +#define free(p) app_free(p) // Current wall-clock epoch (ported code calls time(NULL)). -#define time(p) ((void)(p), rtc_get_time()) +#define time(p) ((void)(p), rtc_get_time()) // localtime isn't linked for apps; the applib provides the override. -#define localtime(t) pbl_override_localtime(t) +#define localtime(t) pbl_override_localtime(t) diff --git a/src/fw/apps/system/weather/resource_ids.pin.h b/src/fw/apps/system/weather/resource_ids.pin.h index e985c1e3ad..2246b75987 100644 --- a/src/fw/apps/system/weather/resource_ids.pin.h +++ b/src/fw/apps/system/weather/resource_ids.pin.h @@ -9,25 +9,25 @@ #pragma once // ---- TINY (25x25 PNG / WX_*_TINY) ---- -#define RESOURCE_ID_IMAGE_SUNNY_DAY_TINY RESOURCE_ID_WX_SUNNY_TINY -#define RESOURCE_ID_IMAGE_PARTLY_CLOUDY_TINY RESOURCE_ID_WX_PARTLY_TINY -#define RESOURCE_ID_IMAGE_CLOUDY_DAY_TINY RESOURCE_ID_WX_CLOUDY_TINY -#define RESOURCE_ID_IMAGE_LIGHT_RAIN_TINY RESOURCE_ID_WX_LIGHTRAIN_TINY -#define RESOURCE_ID_IMAGE_HEAVY_RAIN_TINY RESOURCE_ID_WX_HEAVYRAIN_TINY -#define RESOURCE_ID_IMAGE_LIGHT_SNOW_TINY RESOURCE_ID_WX_LIGHTSNOW_TINY -#define RESOURCE_ID_IMAGE_HEAVY_SNOW_TINY RESOURCE_ID_WX_HEAVYSNOW_TINY -#define RESOURCE_ID_IMAGE_RAIN_AND_SNOW_TINY RESOURCE_ID_WX_RAINSNOW_TINY -#define RESOURCE_ID_IMAGE_GENERIC_WEATHER_TINY RESOURCE_ID_WX_GENERIC_TINY +#define RESOURCE_ID_IMAGE_SUNNY_DAY_TINY RESOURCE_ID_WX_SUNNY_TINY +#define RESOURCE_ID_IMAGE_PARTLY_CLOUDY_TINY RESOURCE_ID_WX_PARTLY_TINY +#define RESOURCE_ID_IMAGE_CLOUDY_DAY_TINY RESOURCE_ID_WX_CLOUDY_TINY +#define RESOURCE_ID_IMAGE_LIGHT_RAIN_TINY RESOURCE_ID_WX_LIGHTRAIN_TINY +#define RESOURCE_ID_IMAGE_HEAVY_RAIN_TINY RESOURCE_ID_WX_HEAVYRAIN_TINY +#define RESOURCE_ID_IMAGE_LIGHT_SNOW_TINY RESOURCE_ID_WX_LIGHTSNOW_TINY +#define RESOURCE_ID_IMAGE_HEAVY_SNOW_TINY RESOURCE_ID_WX_HEAVYSNOW_TINY +#define RESOURCE_ID_IMAGE_RAIN_AND_SNOW_TINY RESOURCE_ID_WX_RAINSNOW_TINY +#define RESOURCE_ID_IMAGE_GENERIC_WEATHER_TINY RESOURCE_ID_WX_GENERIC_TINY // ---- SMALL (50x50 PNG / WX_*_SMALL) ---- -#define RESOURCE_ID_IMAGE_SUNNY_DAY_SMALL RESOURCE_ID_WX_SUNNY_SMALL -#define RESOURCE_ID_IMAGE_PARTLY_CLOUDY_SMALL RESOURCE_ID_WX_PARTLY_SMALL -#define RESOURCE_ID_IMAGE_CLOUDY_DAY_SMALL RESOURCE_ID_WX_CLOUDY_SMALL -#define RESOURCE_ID_IMAGE_LIGHT_RAIN_SMALL RESOURCE_ID_WX_LIGHTRAIN_SMALL -#define RESOURCE_ID_IMAGE_HEAVY_RAIN_SMALL RESOURCE_ID_WX_HEAVYRAIN_SMALL -#define RESOURCE_ID_IMAGE_LIGHT_SNOW_SMALL RESOURCE_ID_WX_LIGHTSNOW_SMALL -#define RESOURCE_ID_IMAGE_HEAVY_SNOW_SMALL RESOURCE_ID_WX_HEAVYSNOW_SMALL -#define RESOURCE_ID_IMAGE_RAIN_AND_SNOW_SMALL RESOURCE_ID_WX_RAINSNOW_SMALL +#define RESOURCE_ID_IMAGE_SUNNY_DAY_SMALL RESOURCE_ID_WX_SUNNY_SMALL +#define RESOURCE_ID_IMAGE_PARTLY_CLOUDY_SMALL RESOURCE_ID_WX_PARTLY_SMALL +#define RESOURCE_ID_IMAGE_CLOUDY_DAY_SMALL RESOURCE_ID_WX_CLOUDY_SMALL +#define RESOURCE_ID_IMAGE_LIGHT_RAIN_SMALL RESOURCE_ID_WX_LIGHTRAIN_SMALL +#define RESOURCE_ID_IMAGE_HEAVY_RAIN_SMALL RESOURCE_ID_WX_HEAVYRAIN_SMALL +#define RESOURCE_ID_IMAGE_LIGHT_SNOW_SMALL RESOURCE_ID_WX_LIGHTSNOW_SMALL +#define RESOURCE_ID_IMAGE_HEAVY_SNOW_SMALL RESOURCE_ID_WX_HEAVYSNOW_SMALL +#define RESOURCE_ID_IMAGE_RAIN_AND_SNOW_SMALL RESOURCE_ID_WX_RAINSNOW_SMALL #define RESOURCE_ID_IMAGE_GENERIC_WEATHER_SMALL RESOURCE_ID_WX_GENERIC_SMALL // ---- LARGE (80x80 PDC) weather icons — the SYSTEM pack's own big weather icons @@ -38,28 +38,28 @@ // silently drift on gabbro. Drawn via gdraw_command_image_* (PDC vectors). ---- // Sunny/partly/cloudy/generic use the app's own restyled copies (WX_*_LARGE); // the rain/snow types render the shared system PDCs unchanged. -#define RESOURCE_ID_IMAGE_PARTLY_CLOUDY_LARGE RESOURCE_ID_WX_PARTLY_LARGE -#define RESOURCE_ID_IMAGE_CLOUDY_DAY_LARGE RESOURCE_ID_WX_CLOUDY_LARGE -#define RESOURCE_ID_IMAGE_LIGHT_SNOW_LARGE RESOURCE_ID_LIGHT_SNOW_LARGE -#define RESOURCE_ID_IMAGE_LIGHT_RAIN_LARGE RESOURCE_ID_LIGHT_RAIN_LARGE -#define RESOURCE_ID_IMAGE_HEAVY_RAIN_LARGE RESOURCE_ID_HEAVY_RAIN_LARGE -#define RESOURCE_ID_IMAGE_HEAVY_SNOW_LARGE RESOURCE_ID_HEAVY_SNOW_LARGE -#define RESOURCE_ID_IMAGE_RAIN_AND_SNOW_LARGE RESOURCE_ID_RAINING_AND_SNOWING_LARGE +#define RESOURCE_ID_IMAGE_PARTLY_CLOUDY_LARGE RESOURCE_ID_WX_PARTLY_LARGE +#define RESOURCE_ID_IMAGE_CLOUDY_DAY_LARGE RESOURCE_ID_WX_CLOUDY_LARGE +#define RESOURCE_ID_IMAGE_LIGHT_SNOW_LARGE RESOURCE_ID_LIGHT_SNOW_LARGE +#define RESOURCE_ID_IMAGE_LIGHT_RAIN_LARGE RESOURCE_ID_LIGHT_RAIN_LARGE +#define RESOURCE_ID_IMAGE_HEAVY_RAIN_LARGE RESOURCE_ID_HEAVY_RAIN_LARGE +#define RESOURCE_ID_IMAGE_HEAVY_SNOW_LARGE RESOURCE_ID_HEAVY_SNOW_LARGE +#define RESOURCE_ID_IMAGE_RAIN_AND_SNOW_LARGE RESOURCE_ID_RAINING_AND_SNOWING_LARGE #define RESOURCE_ID_IMAGE_GENERIC_WEATHER_LARGE RESOURCE_ID_WX_GENERIC_LARGE -#define RESOURCE_ID_IMAGE_SUNNY_DAY_LARGE RESOURCE_ID_WX_SUNNY_LARGE +#define RESOURCE_ID_IMAGE_SUNNY_DAY_LARGE RESOURCE_ID_WX_SUNNY_LARGE // ---- CLOCK icons: gabbro-only (compiled out on emery). Mapped to the TINY // (25x25) ids so the source matches CLOCK_ICON_SIZE (25) — previously // aliased to the 50x50 SMALL ids, which made the round clock draw a // cropped/off-centre top-left 25-of-50 icon. ---- -#define RESOURCE_ID_IMAGE_SUNNY_DAY_CLOCK RESOURCE_ID_WX_SUNNY_TINY -#define RESOURCE_ID_IMAGE_PARTLY_CLOUDY_CLOCK RESOURCE_ID_WX_PARTLY_TINY -#define RESOURCE_ID_IMAGE_CLOUDY_DAY_CLOCK RESOURCE_ID_WX_CLOUDY_TINY -#define RESOURCE_ID_IMAGE_LIGHT_RAIN_CLOCK RESOURCE_ID_WX_LIGHTRAIN_TINY -#define RESOURCE_ID_IMAGE_HEAVY_RAIN_CLOCK RESOURCE_ID_WX_HEAVYRAIN_TINY -#define RESOURCE_ID_IMAGE_LIGHT_SNOW_CLOCK RESOURCE_ID_WX_LIGHTSNOW_TINY -#define RESOURCE_ID_IMAGE_HEAVY_SNOW_CLOCK RESOURCE_ID_WX_HEAVYSNOW_TINY -#define RESOURCE_ID_IMAGE_RAIN_AND_SNOW_CLOCK RESOURCE_ID_WX_RAINSNOW_TINY +#define RESOURCE_ID_IMAGE_SUNNY_DAY_CLOCK RESOURCE_ID_WX_SUNNY_TINY +#define RESOURCE_ID_IMAGE_PARTLY_CLOUDY_CLOCK RESOURCE_ID_WX_PARTLY_TINY +#define RESOURCE_ID_IMAGE_CLOUDY_DAY_CLOCK RESOURCE_ID_WX_CLOUDY_TINY +#define RESOURCE_ID_IMAGE_LIGHT_RAIN_CLOCK RESOURCE_ID_WX_LIGHTRAIN_TINY +#define RESOURCE_ID_IMAGE_HEAVY_RAIN_CLOCK RESOURCE_ID_WX_HEAVYRAIN_TINY +#define RESOURCE_ID_IMAGE_LIGHT_SNOW_CLOCK RESOURCE_ID_WX_LIGHTSNOW_TINY +#define RESOURCE_ID_IMAGE_HEAVY_SNOW_CLOCK RESOURCE_ID_WX_HEAVYSNOW_TINY +#define RESOURCE_ID_IMAGE_RAIN_AND_SNOW_CLOCK RESOURCE_ID_WX_RAINSNOW_TINY #define RESOURCE_ID_IMAGE_GENERIC_WEATHER_CLOCK RESOURCE_ID_WX_GENERIC_TINY // RESULT_SHREDDED_LARGE intentionally NOT pinned: the animated shredder PDC is a @@ -70,7 +70,7 @@ // shipped in the pack as WX_WEATHER_ICONS_PDC; alias the app's name to the // real auto id (the auto header is included via pebble_compat before this). // WEATHER_CLOCK_ICONS_PDC has no asset yet (forecast_list null-checks it). ---- -#define RESOURCE_ID_WEATHER_ICONS_PDC RESOURCE_ID_WX_WEATHER_ICONS_PDC -#define RESOURCE_ID_WEATHER_CLOCK_ICONS_PDC 0 +#define RESOURCE_ID_WEATHER_ICONS_PDC RESOURCE_ID_WX_WEATHER_ICONS_PDC +#define RESOURCE_ID_WEATHER_CLOCK_ICONS_PDC 0 // ---- Globe resources (type raw): pinned to the real ids from the built pack. ---- diff --git a/src/fw/apps/system/weather/saved_locations.c b/src/fw/apps/system/weather/saved_locations.c index 73375a769f..ff395c355d 100644 --- a/src/fw/apps/system/weather/saved_locations.c +++ b/src/fw/apps/system/weather/saved_locations.c @@ -6,7 +6,7 @@ #include "weather_data_source.h" #include "weather_types.h" -#include "pbl/util/math.h" // integer_sqrt — the launcher's chord-inset math +#include "pbl/util/math.h" // integer_sqrt — the launcher's chord-inset math #define SAVED_LOCATIONS_ROW_HEIGHT 44 #define SAVED_LOCATIONS_TOUCH_AXIS_THRESHOLD_PX 5 @@ -19,16 +19,16 @@ typedef struct { MenuLayer *menu_layer; SavedLocationsSelectCallback select_callback; void *select_context; - int active_ds_index; // pre-highlighted record, -1 = none + int active_ds_index; // pre-highlighted record, -1 = none int scroll_at_drag_start; int16_t touch_start_x; int16_t touch_start_y; bool touch_active; bool drag_axis_set; bool drag_is_vertical; - int16_t last_drag_y; // momentum: most recent drag sample position - uint32_t last_drag_ms; // ... and its time, for velocity - int fling_velocity; // most recent finger velocity, px/s (down = +) + int16_t last_drag_y; // momentum: most recent drag sample position + uint32_t last_drag_ms; // ... and its time, for velocity + int fling_velocity; // most recent finger velocity, px/s (down = +) } SavedLocationsView; static SavedLocationsView *s_view; @@ -51,10 +51,10 @@ static void prv_glance_destroy_icons(void) { } static GBitmap *prv_glance_icon(uint8_t type) { - if (type >= GLANCE_WEATHER_TYPES) return NULL; + if (type >= GLANCE_WEATHER_TYPES) + return NULL; if (!s_glance_icons[type]) { - s_glance_icons[type] = - gbitmap_create_with_resource(weather_type_icon_tiny_resource(type)); + s_glance_icons[type] = gbitmap_create_with_resource(weather_type_icon_tiny_resource(type)); } return s_glance_icons[type]; } @@ -65,33 +65,38 @@ static void prv_touch_handler(const TouchEvent *event, void *context); #endif int saved_locations_get_entries(SavedLocationEntry *entries, int max_entries) { - if (!entries || max_entries <= 0) return 0; - if (!weather_ds_supported()) return 0; + if (!entries || max_entries <= 0) + return 0; + if (!weather_ds_supported()) + return 0; const int total = weather_ds_location_count(); - if (total <= 0) return 0; + if (total <= 0) + return 0; - WxDsForecast *ds = malloc_try(sizeof(*ds)); // ~400 B; keep off the task stack - if (!ds) return 0; + WxDsForecast *ds = malloc_try(sizeof(*ds)); // ~400 B; keep off the task stack + if (!ds) + return 0; int count = 0; // Two passes so the phone's current-location record always leads the list; // the rest follow in the phone's own order. for (int pass = 0; pass < 2 && count < max_entries; pass++) { for (int i = 0; i < total && count < max_entries; i++) { - if (!weather_ds_read_index(i, ds)) continue; + if (!weather_ds_read_index(i, ds)) + continue; const bool is_current = ds->is_current_location; - if ((pass == 0) != is_current) continue; + if ((pass == 0) != is_current) + continue; SavedLocationEntry *e = &entries[count++]; - *e = (SavedLocationEntry) { - .ds_index = (int16_t)i, - .is_current_location = is_current, - .latitude_e2 = ds->latitude_e2, - .longitude_e2 = ds->longitude_e2, - // No coordinates => the globe cannot pin it (the watch has no geocoder). - .has_coordinates = (ds->latitude_e2 != INT16_MIN && - ds->longitude_e2 != INT16_MIN), - .temp = (int16_t)ds->current_temp, - .weather_type = ds->current_weather_type, + *e = (SavedLocationEntry){ + .ds_index = (int16_t)i, + .is_current_location = is_current, + .latitude_e2 = ds->latitude_e2, + .longitude_e2 = ds->longitude_e2, + // No coordinates => the globe cannot pin it (the watch has no geocoder). + .has_coordinates = (ds->latitude_e2 != INT16_MIN && ds->longitude_e2 != INT16_MIN), + .temp = (int16_t)ds->current_temp, + .weather_type = ds->current_weather_type, }; strncpy(e->label, ds->location_name, sizeof(e->label) - 1); e->label[sizeof(e->label) - 1] = '\0'; @@ -118,7 +123,8 @@ static int prv_num_rows(void) { static int prv_row_for_ds_index(int ds_index) { for (int i = 0; i < s_entry_count; i++) { - if (s_entries[i].ds_index == ds_index) return i; + if (s_entries[i].ds_index == ds_index) + return i; } return -1; } @@ -129,16 +135,14 @@ static uint16_t prv_get_num_sections(MenuLayer *menu_layer, void *context) { return 1; } -static uint16_t prv_get_num_rows(MenuLayer *menu_layer, uint16_t section, - void *context) { +static uint16_t prv_get_num_rows(MenuLayer *menu_layer, uint16_t section, void *context) { (void)menu_layer; (void)section; (void)context; return prv_num_rows(); } -static int16_t prv_get_cell_height(MenuLayer *menu_layer, MenuIndex *cell_index, - void *context) { +static int16_t prv_get_cell_height(MenuLayer *menu_layer, MenuIndex *cell_index, void *context) { (void)menu_layer; (void)cell_index; (void)context; @@ -153,8 +157,7 @@ static int16_t prv_get_cell_height(MenuLayer *menu_layer, MenuIndex *cell_index, static void prv_draw_glance_row(GContext *ctx, const Layer *cell_layer, const SavedLocationEntry *glance) { const char *title = glance->label[0] ? glance->label : i18n_get("Location", s_view); - const char *subtitle = glance->is_current_location ? i18n_get("Current Location", s_view) - : NULL; + const char *subtitle = glance->is_current_location ? i18n_get("Current Location", s_view) : NULL; if (glance->temp == (int16_t)WX_DS_UNKNOWN_TEMP) { menu_cell_basic_draw(ctx, cell_layer, title, subtitle, NULL); return; @@ -178,7 +181,7 @@ static void prv_draw_glance_row(GContext *ctx, const Layer *cell_layer, const int32_t radius_sq = (int32_t)radius * radius; const int32_t sqrt_arg = radius_sq - y_offset_sq; const int16_t circle_inset = radius - integer_sqrt(sqrt_arg > 0 ? sqrt_arg : 0); - const int16_t base_inset = 10; // the launcher's padding beyond the geometric chord + const int16_t base_inset = 10; // the launcher's padding beyond the geometric chord int16_t horizontal_inset = (int16_t)(base_inset + circle_inset); // DIVERGENCE from the launcher, and it matters: the launcher's menu frame is inset so its // rows never approach the glass edge, but THIS menu is full-screen — a row scrolled near @@ -186,14 +189,14 @@ static void prv_draw_glance_row(GContext *ctx, const Layer *cell_layer, // fed graphics_draw_text a negative-width rect, which reset the watch the moment the // screen opened. Clamp so at least 60px of content width always survives. const int16_t max_inset = (int16_t)((bounds.size.w - 60) / 2); - if (horizontal_inset > max_inset) horizontal_inset = max_inset; + if (horizontal_inset > max_inset) + horizontal_inset = max_inset; bounds = grect_inset_internal(bounds, horizontal_inset, 0); } #endif const bool highlighted = menu_cell_layer_is_highlighted(cell_layer); GFont font = fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD); - graphics_context_set_text_color(ctx, - highlighted ? GColorWhite : GColorBlack); + graphics_context_set_text_color(ctx, highlighted ? GColorWhite : GColorBlack); char temp_text[12]; snprintf(temp_text, sizeof(temp_text), "%d°", (int)glance->temp); @@ -201,8 +204,7 @@ static void prv_draw_glance_row(GContext *ctx, const Layer *cell_layer, const int text_y = (bounds.size.h - 28) / 2 - 3; graphics_draw_text(ctx, temp_text, font, GRect(bounds.origin.x + bounds.size.w - temp_w - 4, text_y, temp_w, 30), - GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, - NULL); + GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); // Rows show the CITY only — the synced name is "New York, United States", // which truncates to an unreadable "New York, Un..." in a row this wide. The @@ -211,29 +213,28 @@ static void prv_draw_glance_row(GContext *ctx, const Layer *cell_layer, strncpy(city, title, sizeof(city) - 1); city[sizeof(city) - 1] = 0; char *comma = strchr(city, ','); - if (comma) *comma = 0; + if (comma) + *comma = 0; title = city; int title_x = 8; GBitmap *icon = prv_glance_icon(glance->weather_type); if (icon) { // BW highlight is solid black — the icon ink inverts to stay visible. - weather_icon_draw(ctx, icon, - GRect(bounds.origin.x + 5, (bounds.size.h - 25) / 2, 25, 25), + weather_icon_draw(ctx, icon, GRect(bounds.origin.x + 5, (bounds.size.h - 25) / 2, 25, 25), PBL_IF_COLOR_ELSE(false, highlighted)); title_x = 5 + 25 + 5; } const int16_t title_w = (int16_t)(bounds.size.w - title_x - temp_w - 8); - if (title_w <= 0) return; - graphics_draw_text(ctx, title, font, - GRect(bounds.origin.x + title_x, text_y, title_w, 30), - GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, - NULL); + if (title_w <= 0) + return; + graphics_draw_text(ctx, title, font, GRect(bounds.origin.x + title_x, text_y, title_w, 30), + GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); } -static void prv_draw_row(GContext *ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *context) { +static void prv_draw_row(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *context) { (void)context; const int row = cell_index->row; if (s_entry_count <= 0) { @@ -241,17 +242,19 @@ static void prv_draw_row(GContext *ctx, const Layer *cell_layer, i18n_get("Add them in the app", s_view), NULL); return; } - if (row < 0 || row >= s_entry_count) return; + if (row < 0 || row >= s_entry_count) + return; prv_draw_glance_row(ctx, cell_layer, &s_entries[row]); } -static void saved_locations_dismiss(bool animated); // defined below +static void saved_locations_dismiss(bool animated); // defined below // Activating a row (button SELECT or touch tap) switches the app to that // location and closes the screen — the same commit a globe pin selection makes. // Locations are added/removed in the phone app — the watch only picks. static void prv_activate_saved_row(SavedLocationsView *view, int row) { - if (!view || row < 0 || row >= s_entry_count) return; + if (!view || row < 0 || row >= s_entry_count) + return; if (view->select_callback) { view->select_callback(s_entries[row].ds_index, view->select_context); } @@ -267,7 +270,8 @@ static uint32_t prv_now_ms(void) { } static int prv_touch_max_scroll(SavedLocationsView *view) { - if (!view || !view->menu_layer) return 0; + if (!view || !view->menu_layer) + return 0; int rows = prv_num_rows(); GRect bounds = layer_get_bounds(menu_layer_get_layer(view->menu_layer)); int max_scroll = rows * SAVED_LOCATIONS_ROW_HEIGHT - bounds.size.h; @@ -275,35 +279,42 @@ static int prv_touch_max_scroll(SavedLocationsView *view) { } static int prv_touch_clamp_scroll(SavedLocationsView *view, int amount) { - if (amount < 0) return 0; + if (amount < 0) + return 0; int max_scroll = prv_touch_max_scroll(view); return amount > max_scroll ? max_scroll : amount; } static int prv_touch_scroll_amount(SavedLocationsView *view) { - if (!view || !view->menu_layer) return 0; + if (!view || !view->menu_layer) + return 0; ScrollLayer *scroll_layer = menu_layer_get_scroll_layer(view->menu_layer); - if (!scroll_layer) return 0; + if (!scroll_layer) + return 0; return -scroll_layer_get_content_offset(scroll_layer).y; } -static void prv_touch_set_scroll(SavedLocationsView *view, int amount, - bool animated) { - if (!view || !view->menu_layer) return; +static void prv_touch_set_scroll(SavedLocationsView *view, int amount, bool animated) { + if (!view || !view->menu_layer) + return; ScrollLayer *scroll_layer = menu_layer_get_scroll_layer(view->menu_layer); - if (!scroll_layer) return; + if (!scroll_layer) + return; amount = prv_touch_clamp_scroll(view, amount); scroll_layer_set_content_offset(scroll_layer, GPoint(0, -amount), animated); } static void prv_touch_select_row(SavedLocationsView *view, int row) { - if (!view || !view->menu_layer) return; + if (!view || !view->menu_layer) + return; int rows = prv_num_rows(); - if (rows <= 0) return; - if (row < 0) row = 0; - if (row >= rows) row = rows - 1; - menu_layer_set_selected_index(view->menu_layer, MenuIndex(0, row), - MenuRowAlignNone, false); + if (rows <= 0) + return; + if (row < 0) + row = 0; + if (row >= rows) + row = rows - 1; + menu_layer_set_selected_index(view->menu_layer, MenuIndex(0, row), MenuRowAlignNone, false); } static int prv_touch_row_at_y(SavedLocationsView *view, int16_t y) { @@ -311,7 +322,8 @@ static int prv_touch_row_at_y(SavedLocationsView *view, int16_t y) { const int fy = layer_get_frame(menu_layer_get_layer(view->menu_layer)).origin.y; int row = (prv_touch_scroll_amount(view) + y - fy) / SAVED_LOCATIONS_ROW_HEIGHT; int rows = prv_num_rows(); - if (row < 0 || row >= rows) return -1; + if (row < 0 || row >= rows) + return -1; return row; } @@ -343,17 +355,15 @@ static void prv_touch_handler(const TouchEvent *event, void *context) { int16_t adx = dx < 0 ? -dx : dx; int16_t ady = dy < 0 ? -dy : dy; - if (!view->drag_axis_set && - (adx > SAVED_LOCATIONS_TOUCH_AXIS_THRESHOLD_PX || - ady > SAVED_LOCATIONS_TOUCH_AXIS_THRESHOLD_PX)) { + if (!view->drag_axis_set && (adx > SAVED_LOCATIONS_TOUCH_AXIS_THRESHOLD_PX || + ady > SAVED_LOCATIONS_TOUCH_AXIS_THRESHOLD_PX)) { view->drag_axis_set = true; view->drag_is_vertical = ady >= adx; } if (view->drag_is_vertical) { // 1:1 finger tracking. - int amount = prv_touch_clamp_scroll( - view, view->scroll_at_drag_start - (int)dy); + int amount = prv_touch_clamp_scroll(view, view->scroll_at_drag_start - (int)dy); prv_touch_set_scroll(view, amount, false); // Track finger velocity over the latest segment (px/s, down = +) for the // release fling. Light smoothing rejects single-sample jitter; if the finger @@ -388,7 +398,7 @@ static void prv_touch_handler(const TouchEvent *event, void *context) { if (view->drag_axis_set && !view->drag_is_vertical && dx > SAVED_LOCATIONS_TOUCH_SWIPE_BACK_PX) { - window_stack_pop(true); // swipe right = BACK to the globe cradle + window_stack_pop(true); // swipe right = BACK to the globe cradle return; } @@ -396,7 +406,7 @@ static void prv_touch_handler(const TouchEvent *event, void *context) { // Momentum: coast in the fling direction and ease to a stop. Project a // target from the release velocity; the scroll layer's animated move // decelerates into it (a fast flick travels further than a gentle one). - int v = view->fling_velocity; // px/s, down = + + int v = view->fling_velocity; // px/s, down = + int av = v < 0 ? -v : v; int target = prv_touch_scroll_amount(view); if (av >= SAVED_LOCATIONS_FLING_MIN_VELOCITY) { @@ -407,13 +417,13 @@ static void prv_touch_handler(const TouchEvent *event, void *context) { // Every touch rest lands ON the row grid, so no row ever sits half-cut at the window // edge: round to the nearest 44px multiple and ease into it. (The scroll range's ends // are themselves multiples of 44 — rows*44 - 220 — so the clamp can't un-align it.) - target = ((target + SAVED_LOCATIONS_ROW_HEIGHT / 2) / SAVED_LOCATIONS_ROW_HEIGHT) - * SAVED_LOCATIONS_ROW_HEIGHT; + target = ((target + SAVED_LOCATIONS_ROW_HEIGHT / 2) / SAVED_LOCATIONS_ROW_HEIGHT) * + SAVED_LOCATIONS_ROW_HEIGHT; target = prv_touch_clamp_scroll(view, target); prv_touch_set_scroll(view, target, true); #else if (av >= SAVED_LOCATIONS_FLING_MIN_VELOCITY) { - prv_touch_set_scroll(view, target, true); // animated = ease-out deceleration + prv_touch_set_scroll(view, target, true); // animated = ease-out deceleration } else { prv_touch_set_scroll(view, prv_touch_clamp_scroll(view, target), false); } @@ -423,8 +433,7 @@ static void prv_touch_handler(const TouchEvent *event, void *context) { } #endif -static void prv_select_click(MenuLayer *menu_layer, MenuIndex *cell_index, - void *context) { +static void prv_select_click(MenuLayer *menu_layer, MenuIndex *cell_index, void *context) { (void)menu_layer; SavedLocationsView *view = context; prv_activate_saved_row(view, cell_index->row); @@ -432,7 +441,8 @@ static void prv_select_click(MenuLayer *menu_layer, MenuIndex *cell_index, static void prv_window_unload(Window *window) { SavedLocationsView *view = (SavedLocationsView *)window_get_user_data(window); - if (!view) return; + if (!view) + return; if (view->menu_layer) { menu_layer_destroy(view->menu_layer); @@ -454,12 +464,14 @@ static void prv_window_unload(Window *window) { // would be clobbered by it. Appear runs after every disappear/unload in the transition. static void prv_window_appear(Window *window) { SavedLocationsView *view = (SavedLocationsView *)window_get_user_data(window); - if (view) touch_service_subscribe(prv_touch_handler, view); + if (view) + touch_service_subscribe(prv_touch_handler, view); } #endif static void saved_locations_dismiss(bool animated) { - if (!s_view || !s_view->window) return; + if (!s_view || !s_view->window) + return; window_stack_remove(s_view->window, animated); } @@ -478,12 +490,13 @@ void saved_locations_push(const SavedLocationsConfig *config) { s_view->touch_start_x = 0; s_view->touch_start_y = 0; menu_layer_reload_data(s_view->menu_layer); - window_stack_push(s_view->window, true); // touch subscribe happens in .appear + window_stack_push(s_view->window, true); // touch subscribe happens in .appear return; } SavedLocationsView *view = calloc(1, sizeof(SavedLocationsView)); - if (!view) return; + if (!view) + return; s_view = view; prv_refresh_entries(); @@ -499,12 +512,12 @@ void saved_locations_push(const SavedLocationsConfig *config) { } window_set_user_data(view->window, view); window_set_background_color(view->window, GColorWhite); - window_set_window_handlers(view->window, (WindowHandlers) { + window_set_window_handlers(view->window, (WindowHandlers){ #ifdef CONFIG_TOUCH - .appear = prv_window_appear, + .appear = prv_window_appear, #endif - .unload = prv_window_unload, - }); + .unload = prv_window_unload, + }); Layer *root = window_get_root_layer(view->window); GRect bounds = layer_get_bounds(root); @@ -515,7 +528,7 @@ void saved_locations_push(const SavedLocationsConfig *config) { // window = 5 rows exactly. Centre-focus then keeps every BUTTON rest grid-aligned for // free (uniform 44px rows centred on the frame centre land on multiples of 44). bounds = grect_inset_internal(bounds, 0, - (int16_t)((bounds.size.h - 5 * SAVED_LOCATIONS_ROW_HEIGHT) / 2)); + (int16_t)((bounds.size.h - 5 * SAVED_LOCATIONS_ROW_HEIGHT) / 2)); #endif view->menu_layer = menu_layer_create(bounds); if (!view->menu_layer) { @@ -525,26 +538,26 @@ void saved_locations_push(const SavedLocationsConfig *config) { return; } - menu_layer_set_callbacks(view->menu_layer, view, (MenuLayerCallbacks) { - .get_num_sections = prv_get_num_sections, - .get_num_rows = prv_get_num_rows, - .get_cell_height = prv_get_cell_height, - .draw_row = prv_draw_row, - .select_click = prv_select_click, - }); + menu_layer_set_callbacks(view->menu_layer, view, + (MenuLayerCallbacks){ + .get_num_sections = prv_get_num_sections, + .get_num_rows = prv_get_num_rows, + .get_cell_height = prv_get_cell_height, + .draw_row = prv_draw_row, + .select_click = prv_select_click, + }); menu_layer_set_normal_colors(view->menu_layer, GColorWhite, GColorBlack); menu_layer_set_highlight_colors(view->menu_layer, - PBL_IF_COLOR_ELSE(GColorVividCerulean, GColorBlack), - GColorWhite); + PBL_IF_COLOR_ELSE(GColorVividCerulean, GColorBlack), GColorWhite); menu_layer_set_click_config_onto_window(view->menu_layer, view->window); layer_add_child(root, menu_layer_get_layer(view->menu_layer)); - int selected_row = (view->active_ds_index >= 0) - ? prv_row_for_ds_index(view->active_ds_index) : -1; - if (selected_row < 0 || selected_row >= prv_num_rows()) selected_row = 0; - menu_layer_set_selected_index(view->menu_layer, - MenuIndex(0, selected_row), - MenuRowAlignCenter, false); + int selected_row = + (view->active_ds_index >= 0) ? prv_row_for_ds_index(view->active_ds_index) : -1; + if (selected_row < 0 || selected_row >= prv_num_rows()) + selected_row = 0; + menu_layer_set_selected_index(view->menu_layer, MenuIndex(0, selected_row), MenuRowAlignCenter, + false); window_stack_push(view->window, true); } diff --git a/src/fw/apps/system/weather/saved_locations.h b/src/fw/apps/system/weather/saved_locations.h index 02fcbf971c..986bc4f2be 100644 --- a/src/fw/apps/system/weather/saved_locations.h +++ b/src/fw/apps/system/weather/saved_locations.h @@ -14,14 +14,14 @@ #define SAVED_LOCATION_LABEL_SIZE 48 typedef struct { - int16_t ds_index; //!< weather-ds record index — the stable identity - bool is_current_location; //!< the phone's "current location" record - char label[SAVED_LOCATION_LABEL_SIZE]; - int16_t latitude_e2; //!< latitude * 100, INT16_MIN unknown - int16_t longitude_e2; //!< longitude * 100, INT16_MIN unknown - bool has_coordinates; //!< false => cannot be pinned on the globe - int16_t temp; //!< current temp for the row glance, or WX_DS_UNKNOWN_TEMP - uint8_t weather_type; //!< WeatherType for the row glance icon + int16_t ds_index; //!< weather-ds record index — the stable identity + bool is_current_location; //!< the phone's "current location" record + char label[SAVED_LOCATION_LABEL_SIZE]; + int16_t latitude_e2; //!< latitude * 100, INT16_MIN unknown + int16_t longitude_e2; //!< longitude * 100, INT16_MIN unknown + bool has_coordinates; //!< false => cannot be pinned on the globe + int16_t temp; //!< current temp for the row glance, or WX_DS_UNKNOWN_TEMP + uint8_t weather_type; //!< WeatherType for the row glance icon } SavedLocationEntry; //! Fired when the user picks a location. `ds_index` indexes the weather-ds @@ -29,7 +29,7 @@ typedef struct { typedef void (*SavedLocationsSelectCallback)(int ds_index, void *context); typedef struct { - int active_ds_index; //!< pre-highlight this record's row; -1 = none + int active_ds_index; //!< pre-highlight this record's row; -1 = none SavedLocationsSelectCallback select_callback; void *select_context; } SavedLocationsConfig; diff --git a/src/fw/apps/system/weather/warning_dialog.c b/src/fw/apps/system/weather/warning_dialog.c index 9951eb3e01..164f4bb777 100644 --- a/src/fw/apps/system/weather/warning_dialog.c +++ b/src/fw/apps/system/weather/warning_dialog.c @@ -24,8 +24,8 @@ static void prv_warning_dialog_select_handler(ClickRecognizerRef recognizer, voi expandable_dialog_pop(expandable_dialog); } -WeatherAppWarningDialog *weather_app_warning_dialog_push(const char *localized_string, - WeatherAppWarningDialogDismissedCallback dismissed_cb) { +WeatherAppWarningDialog *weather_app_warning_dialog_push( + const char *localized_string, WeatherAppWarningDialogDismissedCallback dismissed_cb) { WeatherAppWarningDialogData *data = task_zalloc_check(sizeof(WeatherAppWarningDialogData)); ExpandableDialog *expandable_dialog = expandable_dialog_create("Weather - warning dialog"); @@ -34,7 +34,7 @@ WeatherAppWarningDialog *weather_app_warning_dialog_push(const char *localized_s dialog_set_icon(dialog, RESOURCE_ID_GENERIC_WARNING_TINY); dialog_set_text(dialog, localized_string); const DialogCallbacks callbacks = { - .unload = prv_warning_dialog_unload, + .unload = prv_warning_dialog_unload, }; dialog_set_callbacks(dialog, &callbacks, data); diff --git a/src/fw/apps/system/weather/warning_dialog.h b/src/fw/apps/system/weather/warning_dialog.h index cb61c4773a..854000bdf3 100644 --- a/src/fw/apps/system/weather/warning_dialog.h +++ b/src/fw/apps/system/weather/warning_dialog.h @@ -9,5 +9,5 @@ typedef ExpandableDialog WeatherAppWarningDialog; typedef void (*WeatherAppWarningDialogDismissedCallback)(void); -WeatherAppWarningDialog *weather_app_warning_dialog_push(const char *localized_string, - WeatherAppWarningDialogDismissedCallback dismissed_cb); +WeatherAppWarningDialog *weather_app_warning_dialog_push( + const char *localized_string, WeatherAppWarningDialogDismissedCallback dismissed_cb); diff --git a/src/fw/apps/system/weather/weather.c b/src/fw/apps/system/weather/weather.c index 6b48c5fd51..5f98dde36b 100644 --- a/src/fw/apps/system/weather/weather.c +++ b/src/fw/apps/system/weather/weather.c @@ -37,27 +37,28 @@ typedef struct WeatherAppData { EventServiceInfo weather_event_info; int location_count; - int active_index; // which configured location is shown + int active_index; // which configured location is shown unsigned int current_day_index; size_t days_received; WeatherLocationForecast days[WX_MAX_DAYS]; char location_buf[64]; - char phrase_buf0[32]; // day 0: the record's real short_phrase - char current_now_buf[32]; // day 0: current-hour phrase, translated - char phrase_buf[WX_MAX_DAYS][32]; // days 1+: derived from the type; row 0 unused (day 0 = phrase_buf0), kept for index parity with days[] - char label_buf[WX_MAX_DAYS][24]; // "Today", "Tomorrow" or a weekday name + char phrase_buf0[32]; // day 0: the record's real short_phrase + char current_now_buf[32]; // day 0: current-hour phrase, translated + char phrase_buf[WX_MAX_DAYS][32]; // days 1+: derived from the type; row 0 unused (day 0 = + // phrase_buf0), kept for index parity with days[] + char label_buf[WX_MAX_DAYS][24]; // "Today", "Tomorrow" or a weekday name // Today's hourly series (v4; clock dial glyphs + Select temperature reveal). // The v4 record carries hourly for TODAY only, so this applies to day 0. uint8_t hourly_type[24]; - int8_t hourly_temp[24]; - bool hourly_valid; + int8_t hourly_temp[24]; + bool hourly_valid; // Tomorrow's hourly series (v4 minor 5): the clock dial's next-12-hours window // crosses midnight from early afternoon, and these feed those positions. uint8_t tomorrow_hourly_type[24]; - int8_t tomorrow_hourly_temp[24]; - bool tomorrow_hourly_valid; + int8_t tomorrow_hourly_temp[24]; + bool tomorrow_hourly_valid; // Active location coordinates (v4; for the 3D globe). int16_t latitude_e2; int16_t longitude_e2; @@ -68,7 +69,7 @@ typedef struct WeatherAppData { // NEVER the active selection. Feeds the globe's "My Location" entry and the // saved-locations Current row, so switching city on the globe can't overwrite // them with a duplicate of the selected city. - char current_loc_buf[64]; + char current_loc_buf[64]; int16_t current_lat_e2; int16_t current_lon_e2; WeatherAppWarningDialog *warning_dialog; @@ -93,17 +94,26 @@ static void prv_sync_glance_strings(WeatherAppData *data); // get a derived phrase; day 0 keeps the record's real short_phrase. static const char *prv_phrase_for_type(uint8_t type) { switch ((WeatherType)type) { - case WeatherType_Sun: return i18n_noop("Sunny"); - case WeatherType_PartlyCloudy: return i18n_noop("Partly Cloudy"); - case WeatherType_CloudyDay: return i18n_noop("Cloudy"); - case WeatherType_LightRain: return i18n_noop("Light Rain"); - case WeatherType_HeavyRain: return i18n_noop("Rain"); - case WeatherType_LightSnow: return i18n_noop("Light Snow"); - case WeatherType_HeavySnow: return i18n_noop("Snow"); - case WeatherType_RainAndSnow: return i18n_noop("Rain & Snow"); + case WeatherType_Sun: + return i18n_noop("Sunny"); + case WeatherType_PartlyCloudy: + return i18n_noop("Partly Cloudy"); + case WeatherType_CloudyDay: + return i18n_noop("Cloudy"); + case WeatherType_LightRain: + return i18n_noop("Light Rain"); + case WeatherType_HeavyRain: + return i18n_noop("Rain"); + case WeatherType_LightSnow: + return i18n_noop("Light Snow"); + case WeatherType_HeavySnow: + return i18n_noop("Snow"); + case WeatherType_RainAndSnow: + return i18n_noop("Rain & Snow"); case WeatherType_Generic: case WeatherType_Unknown: - default: return NULL; + default: + return NULL; } } @@ -128,8 +138,8 @@ static void prv_day_label(int day_offset, char *buf, size_t bufsize) { i18n_get_with_buffer(i18n_noop("Tomorrow"), buf, bufsize); } else { static const char *const kWday[7] = { - i18n_noop("Sunday"), i18n_noop("Monday"), i18n_noop("Tuesday"), i18n_noop("Wednesday"), - i18n_noop("Thursday"), i18n_noop("Friday"), i18n_noop("Saturday"), + i18n_noop("Sunday"), i18n_noop("Monday"), i18n_noop("Tuesday"), i18n_noop("Wednesday"), + i18n_noop("Thursday"), i18n_noop("Friday"), i18n_noop("Saturday"), }; time_t t = rtc_get_time() + (time_t)day_offset * SECONDS_PER_DAY; struct tm *lt = localtime(&t); // compat maps to pbl_override_localtime @@ -145,13 +155,13 @@ static void prv_day_label(int day_offset, char *buf, size_t bufsize) { static int prv_location_local_hour(const WxDsForecast *ds) { time_t now = rtc_get_time(); struct tm *lt = localtime(&now); - if (!lt) return -1; + if (!lt) + return -1; int hour = lt->tm_hour; if (ds && ds->utc_offset_min != INT16_MIN) { // tm_gmtoff, not time_get_gmtoffset(): the latter excludes DST while lt does not, which // would skew the location's hour by the DST adjustment for half the year. - int mins = lt->tm_hour * 60 + lt->tm_min - - (int)(lt->tm_gmtoff / 60) + ds->utc_offset_min; + int mins = lt->tm_hour * 60 + lt->tm_min - (int)(lt->tm_gmtoff / 60) + ds->utc_offset_min; mins = ((mins % 1440) + 1440) % 1440; hour = mins / 60; } @@ -159,9 +169,11 @@ static int prv_location_local_hour(const WxDsForecast *ds) { } static int prv_uv_for_current_hour(const WxDsForecast *ds) { - if (!ds || !ds->has_hourly_uv) return ds ? ds->today_uv : -1; + if (!ds || !ds->has_hourly_uv) + return ds ? ds->today_uv : -1; const int hour = prv_location_local_hour(ds); - if (hour < 0) return ds->today_uv; + if (hour < 0) + return ds->today_uv; const int uv = ds->hourly_uv[hour]; return (uv < 0) ? ds->today_uv : uv; } @@ -200,31 +212,31 @@ static void prv_fill_days_from_ds(WeatherAppData *data, const WxDsForecast *ds) // CURRENT-hour UV. The record's today_uv is the day's figure (peak), so a live value can // only come from the minor-4 hourly block; without it we fall back to the day's figure so // the screen shows something sane rather than "--". - data->days[0] = (WeatherLocationForecast) { - .location_name = data->location_buf, - .is_current_location = ds->is_current_location, - .current_temp = ds->current_temp, - .today_high = ds->today_high, - .today_low = ds->today_low, - .today_uv = ds->today_uv, - .today_uv_now = prv_uv_for_current_hour(ds), - .today_precip_mm = ds->today_precip, - .today_wind_mph = ds->today_wind, - .today_wind_dir_deg = ds->today_wind_dir, - .today_feels = ds->today_feels, - .today_wmo = ds->today_wmo, - .today_humidity = ds->today_humidity, - .today_visibility_m = (int)ds->today_visibility_m, - .today_precip_sum_mm = ds->today_precip_sum_mm, - .current_weather_type = (WeatherType)ds->current_weather_type, - .current_weather_phrase = data->phrase_buf0, - // Current-HOUR conditions for the round header. hourly_type entries are phone-provided: - // validate the enum range before trusting one; any gap falls back to the synced current. - .current_type_now = (WeatherType)ds->current_weather_type, - .current_temp_now = ds->current_temp, - .current_phrase_now = data->phrase_buf0, - .label = data->label_buf[0], - .time_updated_utc = ds->time_updated_utc, + data->days[0] = (WeatherLocationForecast){ + .location_name = data->location_buf, + .is_current_location = ds->is_current_location, + .current_temp = ds->current_temp, + .today_high = ds->today_high, + .today_low = ds->today_low, + .today_uv = ds->today_uv, + .today_uv_now = prv_uv_for_current_hour(ds), + .today_precip_mm = ds->today_precip, + .today_wind_mph = ds->today_wind, + .today_wind_dir_deg = ds->today_wind_dir, + .today_feels = ds->today_feels, + .today_wmo = ds->today_wmo, + .today_humidity = ds->today_humidity, + .today_visibility_m = (int)ds->today_visibility_m, + .today_precip_sum_mm = ds->today_precip_sum_mm, + .current_weather_type = (WeatherType)ds->current_weather_type, + .current_weather_phrase = data->phrase_buf0, + // Current-HOUR conditions for the round header. hourly_type entries are phone-provided: + // validate the enum range before trusting one; any gap falls back to the synced current. + .current_type_now = (WeatherType)ds->current_weather_type, + .current_temp_now = ds->current_temp, + .current_phrase_now = data->phrase_buf0, + .label = data->label_buf[0], + .time_updated_utc = ds->time_updated_utc, }; { // WATCH-local hour, deliberately NOT prv_location_local_hour: the header's spec is "what @@ -237,14 +249,13 @@ static void prv_fill_days_from_ds(WeatherAppData *data, const WxDsForecast *ds) const int hour = lt_h ? lt_h->tm_hour : -1; if (ds->hourly_count == WX_DS_HOURLY && hour >= 0 && hour < WX_DS_HOURLY && ds->hourly_type[hour] <= WeatherType_RainAndSnow) { - data->days[0].current_type_now = (WeatherType)ds->hourly_type[hour]; - data->days[0].current_temp_now = ds->hourly_temp[hour]; + data->days[0].current_type_now = (WeatherType)ds->hourly_type[hour]; + data->days[0].current_temp_now = ds->hourly_temp[hour]; // The hourly block has no phrase; derive and translate one from the type. // Leave the record's own phrase in place when the type has no name. const char *hourly_phrase = prv_phrase_for_type(ds->hourly_type[hour]); if (hourly_phrase) { - i18n_get_with_buffer(hourly_phrase, data->current_now_buf, - sizeof(data->current_now_buf)); + i18n_get_with_buffer(hourly_phrase, data->current_now_buf, sizeof(data->current_now_buf)); data->days[0].current_phrase_now = data->current_now_buf; } } @@ -261,57 +272,56 @@ static void prv_fill_days_from_ds(WeatherAppData *data, const WxDsForecast *ds) for (size_t i = 1; i < nd; i++) { prv_day_label((int)i, data->label_buf[i], sizeof(data->label_buf[i])); prv_fill_phrase(ds->daily[i].type, data->phrase_buf[i], sizeof(data->phrase_buf[i])); - data->days[i] = (WeatherLocationForecast) { - .location_name = data->location_buf, - .is_current_location = ds->is_current_location, - .current_temp = WX_DS_UNKNOWN_TEMP, - .today_high = ds->daily[i].high, - .today_low = ds->daily[i].low, - .today_uv = ds->daily[i].uv, // per-day UV (v4.1 daily_metrics; -1 when absent) - .today_uv_now = -1, // hourly UV is today-only - .today_precip_mm = ds->daily[i].precip, // per-day precip + wind (v4.1; -1 when absent) - .today_wind_mph = ds->daily[i].wind, - .today_wind_dir_deg = ds->daily[i].wind_dir, - .today_feels = ds->daily[i].feels, // per-day feels-like (v4.2 daily_feels_like) - .today_wmo = -1, // warning readings are today-only (v4.2) - .today_humidity = -1, - .today_visibility_m = -1, - .today_precip_sum_mm = -1, - .current_weather_type = (WeatherType)ds->daily[i].type, - .current_weather_phrase = data->phrase_buf[i], - .label = data->label_buf[i], - .time_updated_utc = ds->time_updated_utc, + data->days[i] = (WeatherLocationForecast){ + .location_name = data->location_buf, + .is_current_location = ds->is_current_location, + .current_temp = WX_DS_UNKNOWN_TEMP, + .today_high = ds->daily[i].high, + .today_low = ds->daily[i].low, + .today_uv = ds->daily[i].uv, // per-day UV (v4.1 daily_metrics; -1 when absent) + .today_uv_now = -1, // hourly UV is today-only + .today_precip_mm = ds->daily[i].precip, // per-day precip + wind (v4.1; -1 when absent) + .today_wind_mph = ds->daily[i].wind, + .today_wind_dir_deg = ds->daily[i].wind_dir, + .today_feels = ds->daily[i].feels, // per-day feels-like (v4.2 daily_feels_like) + .today_wmo = -1, // warning readings are today-only (v4.2) + .today_humidity = -1, + .today_visibility_m = -1, + .today_precip_sum_mm = -1, + .current_weather_type = (WeatherType)ds->daily[i].type, + .current_weather_phrase = data->phrase_buf[i], + .label = data->label_buf[i], + .time_updated_utc = ds->time_updated_utc, }; } data->days_received = nd; } else { // v3 fallback: day 1 = tomorrow from the v3 prefix fields (high/low/type). - const bool have_tomorrow = (ds->tomorrow_high != WX_DS_UNKNOWN_TEMP) || - (ds->tomorrow_low != WX_DS_UNKNOWN_TEMP); + const bool have_tomorrow = + (ds->tomorrow_high != WX_DS_UNKNOWN_TEMP) || (ds->tomorrow_low != WX_DS_UNKNOWN_TEMP); if (have_tomorrow) { prv_day_label(1, data->label_buf[1], sizeof(data->label_buf[1])); - prv_fill_phrase(ds->tomorrow_weather_type, data->phrase_buf[1], - sizeof(data->phrase_buf[1])); - data->days[1] = (WeatherLocationForecast) { - .location_name = data->location_buf, - .is_current_location = ds->is_current_location, - .current_temp = WX_DS_UNKNOWN_TEMP, - .today_high = ds->tomorrow_high, - .today_low = ds->tomorrow_low, - .today_uv = -1, - .today_uv_now = -1, - .today_precip_mm = -1, - .today_wind_mph = -1, - .today_wind_dir_deg = -1, - .today_feels = WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP, // zeroed = a KNOWN 0° - .today_wmo = -1, - .today_humidity = -1, - .today_visibility_m = -1, - .today_precip_sum_mm = -1, - .current_weather_type = (WeatherType)ds->tomorrow_weather_type, - .current_weather_phrase = data->phrase_buf[1], - .label = data->label_buf[1], - .time_updated_utc = ds->time_updated_utc, + prv_fill_phrase(ds->tomorrow_weather_type, data->phrase_buf[1], sizeof(data->phrase_buf[1])); + data->days[1] = (WeatherLocationForecast){ + .location_name = data->location_buf, + .is_current_location = ds->is_current_location, + .current_temp = WX_DS_UNKNOWN_TEMP, + .today_high = ds->tomorrow_high, + .today_low = ds->tomorrow_low, + .today_uv = -1, + .today_uv_now = -1, + .today_precip_mm = -1, + .today_wind_mph = -1, + .today_wind_dir_deg = -1, + .today_feels = WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP, // zeroed = a KNOWN 0° + .today_wmo = -1, + .today_humidity = -1, + .today_visibility_m = -1, + .today_precip_sum_mm = -1, + .current_weather_type = (WeatherType)ds->tomorrow_weather_type, + .current_weather_phrase = data->phrase_buf[1], + .label = data->label_buf[1], + .time_updated_utc = ds->time_updated_utc, }; data->days_received = 2; } @@ -323,13 +333,10 @@ static void prv_fill_days_from_ds(WeatherAppData *data, const WxDsForecast *ds) static void prv_sync_glance_strings(WeatherAppData *data) { const WeatherLocationForecast *today = data->days_received >= 1 ? &data->days[0] : NULL; char sunset[40], temp[16], loc[64]; - expanded_view_format_glance(today, data->latitude_e2, data->longitude_e2, - data->utc_offset_min, + expanded_view_format_glance(today, data->latitude_e2, data->longitude_e2, data->utc_offset_min, sunset, sizeof(sunset), temp, sizeof(temp), loc, sizeof(loc)); - forecast_list_set_glance(sunset, temp, - today ? today->today_uv : -1, - today ? today->today_precip_mm : -1, - today ? today->today_wind_mph : -1); + forecast_list_set_glance(sunset, temp, today ? today->today_uv : -1, + today ? today->today_precip_mm : -1, today ? today->today_wind_mph : -1); } // Refresh the GPS ("My Location") identity from the record flagged is_current_location @@ -343,7 +350,8 @@ static void prv_read_current_location(WeatherAppData *data, WxDsForecast *scratc break; } } - if (!weather_ds_read_index(idx, scratch)) return; + if (!weather_ds_read_index(idx, scratch)) + return; strncpy(data->current_loc_buf, scratch->location_name, sizeof(data->current_loc_buf) - 1); data->current_loc_buf[sizeof(data->current_loc_buf) - 1] = '\0'; data->current_lat_e2 = scratch->latitude_e2; @@ -366,8 +374,10 @@ static void prv_show_no_data_warning(WeatherAppData *data) { } app_window_stack_pop_all(false /* animated */); /// Shown when there are no forecasts available to show the user - const char *warning_text = i18n_get("No location information available. To see weather, add " - "locations in your Pebble mobile app.", data); + const char *warning_text = i18n_get( + "No location information available. To see weather, add " + "locations in your Pebble mobile app.", + data); data->warning_dialog = weather_app_warning_dialog_push(warning_text, prv_warning_dialog_dismiss_cb); } @@ -395,12 +405,11 @@ static void prv_refresh(WeatherAppData *data) { // prv_refresh in prv_init runs before the base window is pushed). forecast_list_update_data(data->days, data->days_received); // Keep the expanded card current too if it happens to be showing (no-op otherwise). - expanded_view_update_data(data->days_received >= 1 ? &data->days[0] : NULL, - data->latitude_e2, data->longitude_e2, - data->utc_offset_min); + expanded_view_update_data(data->days_received >= 1 ? &data->days[0] : NULL, data->latitude_e2, + data->longitude_e2, data->utc_offset_min); // And the weather report — it borrows days[] and must re-render today's edition. weather_report_update_data(data->days, data->days_received); - prv_sync_glance_strings(data); // for the hero-fly text + prv_sync_glance_strings(data); // for the hero-fly text } } @@ -410,8 +419,14 @@ static void prv_refresh(WeatherAppData *data) { // {clock, globe, expanded card} sits on top of it, reached via buttons. s_page is a simple tag the // button handlers keep updated (the swipe carousel that once read it has been removed). PAGE_MAIN, // the old scrub screen, is gone; its enum value is retained only to keep the numbering stable. -typedef enum { PAGE_MAIN = 0, PAGE_LIST, PAGE_CLOCK, PAGE_GLOBE, PAGE_EXPANDED, PAGE_COUNT } - WeatherCarouselPage; +typedef enum { + PAGE_MAIN = 0, + PAGE_LIST, + PAGE_CLOCK, + PAGE_GLOBE, + PAGE_EXPANDED, + PAGE_COUNT +} WeatherCarouselPage; static WeatherCarouselPage s_page = PAGE_LIST; // ---- Sub-view transitions ---- @@ -429,8 +444,8 @@ static void prv_push_clock(WeatherAppData *data, bool static_push) { // is synthesized from that day's high/low + type (a placeholder until the v4 struct is // extended to carry per-day hourly for the phone to populate — today is the only // day the record carries hourly for today). - uint8_t s_hourly_type[24]; // stack scratch — every consumer copies synchronously - int8_t s_hourly_temp[24]; + uint8_t s_hourly_type[24]; // stack scratch — every consumer copies synchronously + int8_t s_hourly_temp[24]; const uint8_t *hourly_types = NULL; bool have_hourly = false; @@ -442,7 +457,7 @@ static void prv_push_clock(WeatherAppData *data, bool static_push) { } else if (di < data->days_received) { const WeatherLocationForecast *d = &data->days[di]; int hi = (d->today_high != WX_DS_UNKNOWN_TEMP) ? d->today_high : 20; - int lo = (d->today_low != WX_DS_UNKNOWN_TEMP) ? d->today_low : 12; + int lo = (d->today_low != WX_DS_UNKNOWN_TEMP) ? d->today_low : 12; if (hi <= lo) { hi = lo + 6; } @@ -458,11 +473,11 @@ static void prv_push_clock(WeatherAppData *data, bool static_push) { } if (static_push) { - clock_face_push_static(data->days, data->days_received, (int)di, - hourly_types, have_hourly ? 24 : 0, false); + clock_face_push_static(data->days, data->days_received, (int)di, hourly_types, + have_hourly ? 24 : 0, false); } else { - clock_face_push(data->days, data->days_received, (int)di, - hourly_types, have_hourly ? 24 : 0, false); + clock_face_push(data->days, data->days_received, (int)di, hourly_types, have_hourly ? 24 : 0, + false); } if (have_hourly) { clock_face_update_hourly_temps_for_day((int)di, s_hourly_temp, 24); @@ -470,8 +485,7 @@ static void prv_push_clock(WeatherAppData *data, bool static_push) { // Day 0's dial crosses midnight from early afternoon — hand it tomorrow's // hourly series (v4 minor 5) so those positions show real data. if (di == 0 && data->tomorrow_hourly_valid) { - clock_face_set_tomorrow_hourly(data->tomorrow_hourly_type, - data->tomorrow_hourly_temp, 24); + clock_face_set_tomorrow_hourly(data->tomorrow_hourly_type, data->tomorrow_hourly_temp, 24); } } @@ -488,10 +502,8 @@ static void prv_on_clock_burst_requested(void *ctx) { // It borrows today's forecast (day 0) and takes the UP/DOWN callbacks that step the stack. static void prv_push_expanded(WeatherAppData *data, ExpandedViewEntrance entrance) { const WeatherLocationForecast *today = (data->days_received >= 1) ? &data->days[0] : NULL; - expanded_view_push(today, data->latitude_e2, data->longitude_e2, - data->utc_offset_min, entrance, - prv_expanded_down_to_main, data, - prv_expanded_select_to_globe, data); + expanded_view_push(today, data->latitude_e2, data->longitude_e2, data->utc_offset_min, entrance, + prv_expanded_down_to_main, data, prv_expanded_select_to_globe, data); } static void prv_on_list_up_to_expanded(void *ctx) { @@ -499,7 +511,8 @@ static void prv_on_list_up_to_expanded(void *ctx) { // UP at the top of the forecast: the mainscreen has squashed down off the bottom and the hero // icon-fly + glance text have already animated in (drawn by the forecast, synced to the icon // landing). Reveal the static card; don't replay the text slide. - if (expanded_view_is_showing()) return; + if (expanded_view_is_showing()) + return; s_page = PAGE_EXPANDED; prv_push_expanded(data, ExpandedViewEntranceStatic); } @@ -509,16 +522,20 @@ static void prv_expanded_select_to_globe(void *ctx) { // SELECT on the card: the card has already slid out to the LEFT (expanded_view fired us on the // slide-out completion). Push the globe sliding in from the RIGHT on top, then dismiss the // now-hidden card underneath (its white slide-out already covered the base — no flash). - if (!data->globe_view) { expanded_view_dismiss(false); s_page = PAGE_LIST; return; } + if (!data->globe_view) { + expanded_view_dismiss(false); + s_page = PAGE_LIST; + return; + } if (data->current_lat_e2 != INT16_MIN && data->current_lon_e2 != INT16_MIN) { - globe_view_set_current_location(data->globe_view, data->current_loc_buf, - data->current_lat_e2, data->current_lon_e2); + globe_view_set_current_location(data->globe_view, data->current_loc_buf, data->current_lat_e2, + data->current_lon_e2); } // Open hovering the ACTIVE location's pin — the city last selected to look at. globe_view_focus_coords(data->globe_view, data->latitude_e2, data->longitude_e2); s_page = PAGE_GLOBE; globe_view_push_slide_in_right(data->globe_view); - expanded_view_dismiss(false); // remove the card, now hidden beneath the globe + expanded_view_dismiss(false); // remove the card, now hidden beneath the globe } static void prv_expanded_down_to_main(void *ctx) { @@ -533,7 +550,7 @@ static void prv_expanded_down_to_main(void *ctx) { static void prv_report_after_exit(void *ctx) { WeatherAppData *data = (WeatherAppData *)ctx; - weather_report_arm_static_in(); // the unfold scene already delivered the entrance — hard cut + weather_report_arm_static_in(); // the unfold scene already delivered the entrance — hard cut weather_report_push(data->days, data->days_received, (int)data->current_day_index); } @@ -541,7 +558,8 @@ static void prv_on_report_requested(void *ctx) { WeatherAppData *data = (WeatherAppData *)ctx; // SELECT on the forecast main view -> slide the main screen off to the left, then hard-cut to // the weather report. Falls back to a plain push where the today-icon rect isn't available. - if (!data || weather_report_is_showing()) return; + if (!data || weather_report_is_showing()) + return; #if PBL_ROUND // Round has no hero icon-fly, but it DOES play the ball -> unfold -> paper scene, so it // must not be gated on the icon rect (which is rect-only and always false here — that @@ -560,10 +578,8 @@ static void prv_on_report_requested(void *ctx) { static void prv_on_list_transition_done(void *ctx) { WeatherAppData *data = (WeatherAppData *)ctx; // The animated forecast is the carousel base window — pushed once and never dismissed. - forecast_list_push(data->days, data->days_received, - (int)data->current_day_index, false, - NULL, NULL, - prv_on_city_select_requested, data); + forecast_list_push(data->days, data->days_received, (int)data->current_day_index, false, NULL, + NULL, prv_on_city_select_requested, data); forecast_list_set_on_clock_request(prv_on_clock_burst_requested, data); forecast_list_set_on_up_request(prv_on_list_up_to_expanded, data); forecast_list_set_on_select_request(prv_on_report_requested, data); @@ -583,8 +599,8 @@ static void prv_push_globe(WeatherAppData *data, bool animated) { return; } if (data->current_lat_e2 != INT16_MIN && data->current_lon_e2 != INT16_MIN) { - globe_view_set_current_location(data->globe_view, data->current_loc_buf, - data->current_lat_e2, data->current_lon_e2); + globe_view_set_current_location(data->globe_view, data->current_loc_buf, data->current_lat_e2, + data->current_lon_e2); } globe_view_focus_coords(data->globe_view, data->latitude_e2, data->longitude_e2); globe_view_push_animated(data->globe_view, animated); @@ -598,9 +614,9 @@ static void prv_on_city_select_requested(void *ctx) { static void prv_globe_back_to_expanded(void *ctx) { WeatherAppData *data = (WeatherAppData *)ctx; - // BACK on the globe cradle: the globe has already slid out to the RIGHT (globe_view fired us on the - // slide-out completion). Dismiss it (revealing the forecast base) and bring the whole card back in - // from the LEFT — the exact mirror of the SELECT slide-out-left that got us here. + // BACK on the globe cradle: the globe has already slid out to the RIGHT (globe_view fired us on + // the slide-out completion). Dismiss it (revealing the forecast base) and bring the whole card + // back in from the LEFT — the exact mirror of the SELECT slide-out-left that got us here. if (data->globe_view) { globe_view_dismiss(data->globe_view, false); } @@ -614,7 +630,8 @@ static void prv_globe_back_to_expanded(void *ctx) { // Switch the ACTIVE location to a phone-synced record. `ds_index` comes straight // off the pin/row, so the selection can't fail to resolve. static void prv_select_ds_location(WeatherAppData *data, int ds_index) { - if (!data || ds_index < 0 || ds_index >= weather_ds_location_count()) return; + if (!data || ds_index < 0 || ds_index >= weather_ds_location_count()) + return; // prv_refresh re-reads the record and pushes the chosen city into every view // (forecast base, card, report, glance). data->active_index = ds_index; @@ -657,10 +674,10 @@ static void prv_open_saved_locations(void *ctx) { return; } SavedLocationsConfig config = { - // Both are weather-ds record indices now, so the active city pre-highlights. - .active_ds_index = data->active_index, - .select_callback = prv_on_saved_location_selected, - .select_context = data, + // Both are weather-ds record indices now, so the active city pre-highlights. + .active_ds_index = data->active_index, + .select_callback = prv_on_saved_location_selected, + .select_context = data, }; saved_locations_push(&config); } @@ -725,28 +742,26 @@ static NOINLINE void prv_init(void) { // starfield + sequence resources). prv_refresh ran first, so lat/lon is set. data->globe_view = globe_view_create(); if (data->globe_view) { - globe_view_set_location_select_callback(data->globe_view, - prv_globe_location_selected, data); + globe_view_set_location_select_callback(data->globe_view, prv_globe_location_selected, data); globe_view_set_back_callback(data->globe_view, prv_globe_back_to_expanded, data); globe_view_set_saved_locations_callback(data->globe_view, prv_open_saved_locations, data); if (data->current_lat_e2 != INT16_MIN && data->current_lon_e2 != INT16_MIN) { - globe_view_set_current_location(data->globe_view, data->current_loc_buf, - data->current_lat_e2, data->current_lon_e2); + globe_view_set_current_location(data->globe_view, data->current_loc_buf, data->current_lat_e2, + data->current_lon_e2); } } clock_face_set_wrap_callback(prv_on_clock_wrap_to_main, data); // App-global weather event subscription: re-read the BlobDB whenever the phone // writes a new weather record (there is no persistent main window to host it). - data->weather_event_info = (EventServiceInfo) { - .type = PEBBLE_WEATHER_EVENT, - .handler = prv_handle_weather, + data->weather_event_info = (EventServiceInfo){ + .type = PEBBLE_WEATHER_EVENT, + .handler = prv_handle_weather, }; event_service_client_subscribe(&data->weather_event_info); // Push the animated forecast as the carousel base window. prv_on_list_transition_done(data); - } static void prv_deinit(void) { @@ -770,14 +785,15 @@ static void prv_main(void) { prv_deinit(); } -const PebbleProcessMd* weather_app_get_info(void) { +const PebbleProcessMd *weather_app_get_info(void) { static const PebbleProcessMdSystem s_weather_app_info = { - .common = { - .main_func = prv_main, - .uuid = UUID_WEATHER_DATA_SOURCE, - }, - .name = i18n_noop("Weather"), - .icon_resource_id = RESOURCE_ID_GENERIC_WEATHER_TINY, + .common = + { + .main_func = prv_main, + .uuid = UUID_WEATHER_DATA_SOURCE, + }, + .name = i18n_noop("Weather"), + .icon_resource_id = RESOURCE_ID_GENERIC_WEATHER_TINY, }; return weather_ds_supported() ? (const PebbleProcessMd *)&s_weather_app_info : NULL; } diff --git a/src/fw/apps/system/weather/weather.h b/src/fw/apps/system/weather/weather.h index 745d39efda..4970e012bd 100644 --- a/src/fw/apps/system/weather/weather.h +++ b/src/fw/apps/system/weather/weather.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* weather_app_get_info(); +const PebbleProcessMd *weather_app_get_info(); diff --git a/src/fw/apps/system/weather/weather_app_layout.c b/src/fw/apps/system/weather/weather_app_layout.c index d46253468d..909702322c 100644 --- a/src/fw/apps/system/weather/weather_app_layout.c +++ b/src/fw/apps/system/weather/weather_app_layout.c @@ -34,7 +34,7 @@ // top inset, which is precisely the deficit emery's content set ran at on a // circle. (Both arms are 0 now; rect's arm was already 0.) #define WEATHER_APP_LAYOUT_MAIN_CONTENT_TOP 0 -#define WEATHER_APP_LAYOUT_CONTENT_Y_SHIFT 0 +#define WEATHER_APP_LAYOUT_CONTENT_Y_SHIFT 0 #define WEATHER_APP_LAYOUT_ACTIVE_BAR_DEPTH \ PBL_IF_ROUND_ELSE(WEATHER_APP_LAYOUT_ROUND_BAR_DEPTH, WEATHER_APP_LAYOUT_MAIN_BAR_HEIGHT) #define WEATHER_APP_LAYOUT_LOCATION_BAR_TEXT_INSET PBL_IF_ROUND_ELSE(50, 0) @@ -49,16 +49,15 @@ #define WEATHER_APP_LAYOUT_TEXT_STACK_STEP PBL_IF_ROUND_ELSE(34, 0) #define WEATHER_APP_LAYOUT_TEXT_STACK_GAP PBL_IF_ROUND_ELSE(4, 0) #define WEATHER_APP_LAYOUT_METRIC_TEXT_Y_INSET PBL_IF_RECT_ELSE(17, 18) -#define WEATHER_APP_LAYOUT_TEMP_Y_SHIFT \ - PBL_IF_ROUND_ELSE(WEATHER_APP_LAYOUT_TEXT_STACK_GAP, 0) +#define WEATHER_APP_LAYOUT_TEMP_Y_SHIFT PBL_IF_ROUND_ELSE(WEATHER_APP_LAYOUT_TEXT_STACK_GAP, 0) // Rect: +3 drops the high/low line so the LECO temp's glyphs sit visually // CENTERED between the day label above and the high/low below (LECO carries // ~6px of top bearing, so equal box gaps read as lopsided without this). #define WEATHER_APP_LAYOUT_HIGHLOW_Y_SHIFT \ PBL_IF_ROUND_ELSE(WEATHER_APP_LAYOUT_TEXT_STACK_GAP * 2, 5) #define WEATHER_APP_LAYOUT_METRICS_Y_SHIFT \ - PBL_IF_ROUND_ELSE(WEATHER_APP_LAYOUT_TEXT_STACK_GAP * 3 - \ - WEATHER_APP_LAYOUT_METRIC_TEXT_Y_INSET, 2) + PBL_IF_ROUND_ELSE( \ + WEATHER_APP_LAYOUT_TEXT_STACK_GAP * 3 - WEATHER_APP_LAYOUT_METRIC_TEXT_Y_INSET, 2) #define WEATHER_APP_LAYOUT_TOMORROW_ICON_X_ADJUST PBL_IF_ROUND_ELSE(23, 0) // (TODAY_ICON_X/Y_ADJUST deleted dead defines, referenced nowhere — the round // hero disc is positioned by WEATHER_APP_LAYOUT_ROUND_TODAY_ICON_X_INSET / _Y below.) @@ -77,14 +76,14 @@ // REST_ANGLE = 3*TRIG_MAX_ANGLE/4 (9 o'clock from centre) puts the icon // on-screen to the LEFT of the centre, which is right of screen centre. // Both today and tomorrow icons ride the same circle with a fixed angular gap. -#define ICON_ARC_RADIUS PBL_IF_RECT_ELSE(220, 190) +#define ICON_ARC_RADIUS PBL_IF_RECT_ELSE(220, 190) // 50°: at radius 220 the outgoing icon travels ~169px vertically + ~79px // horizontally — enough to carry the 50px day icon fully past the screen // corner. The old 40° sweep stopped with an ~18px sliver still on-screen at // the bottom-right, which then popped away when the animation ended. -#define ICON_ARC_SWEEP_ANGLE (TRIG_MAX_ANGLE * 50 / 360) +#define ICON_ARC_SWEEP_ANGLE (TRIG_MAX_ANGLE * 50 / 360) // 9 o'clock: icon is to the left of the circle centre (which is off-screen right) -#define ICON_ARC_TODAY_REST (TRIG_MAX_ANGLE * 3 / 4) +#define ICON_ARC_TODAY_REST (TRIG_MAX_ANGLE * 3 / 4) // Timeline-style landing bounce for day text: anticipation, fast travel, // then a tiny overshoot back into place. #define TEXT_MOOOK_MID_FRAMES 3 @@ -96,7 +95,7 @@ // which cannot be chord-checked at compile time; on a circle every ink band has // to be proven against BOTH edges of its own row, so round pins them instead. // Every band below was checked against display_getafix.c's real 260-row mask. -#define WEATHER_APP_LAYOUT_ROUND_TEXT_RAIL 16 // + off->x (2) -> content 18 -> screen 30 +#define WEATHER_APP_LAYOUT_ROUND_TEXT_RAIL 16 // + off->x (2) -> content 18 -> screen 30 // 28_BOLD ink 46..63. This is as high as the day name can go: 'WEDNESDAY' is // 113px, and between the glass on its left and the today disc's white halo on // its right (the halo is drawn AFTER the text stack and erases it) the row only @@ -106,11 +105,12 @@ // above (city ink ends 31) and 10px below (temp ink starts 70). Emery's own // number is 14px, but emery has nothing above its day name -- matching 14 here // pushed the day up into the city and read as top-heavy. -#define WEATHER_APP_LAYOUT_ROUND_LABEL_Y 8 // G28_BOLD caps ink ~18..35, centred at - // the top arc (the round reference's city - // slot). Measured: widest day name is - // 112px; chord at ink-top 18 is 138 — fits - // with 26px total margin. +#define WEATHER_APP_LAYOUT_ROUND_LABEL_Y \ + 8 // G28_BOLD caps ink ~18..35, centred at + // the top arc (the round reference's city + // slot). Measured: widest day name is + // 112px; chord at ink-top 18 is 138 — fits + // with 26px total margin. // reference stack (the original round app's arrangement): the temp, // hi/lo and condition left the rail and sit on a SHARED AXIS LEFT OF CENTRE // (STACK_AXIS_DX below) directly under the day name, with the FULL-SIZE 83px @@ -120,10 +120,11 @@ // CONDITION'S BOTTOM ink row stays exactly on the disc fill's bottom row (123); // the hi/lo splits the remaining air as evenly as whole pixels allow (10 above, // 9 below). -#define WEATHER_APP_LAYOUT_ROUND_TEMP_Y 42 // LECO_36 ink 53..77 -#define WEATHER_APP_LAYOUT_ROUND_HIGHLOW_Y 82 // G18_BOLD ink 88..100 (10px under temp) -#define WEATHER_APP_LAYOUT_ROUND_PHRASE_Y 103 // G18 ink 110..123 (9px under hi/lo; - // descender bottom == disc bottom 123) +#define WEATHER_APP_LAYOUT_ROUND_TEMP_Y 42 // LECO_36 ink 53..77 +#define WEATHER_APP_LAYOUT_ROUND_HIGHLOW_Y 82 // G18_BOLD ink 88..100 (10px under temp) +#define WEATHER_APP_LAYOUT_ROUND_PHRASE_Y \ + 103 // G18 ink 110..123 (9px under hi/lo; + // descender bottom == disc bottom 123) // The temp / hi-lo / condition column (final): each line's left // edge FOLLOWS THE CURVE OF THE SCREEN via prv_round_rail — the same parabola // the description rides — so the column leans with the bezel instead of standing @@ -131,54 +132,57 @@ // previous iteration; the curve won design review.) Rail is solved from each // row's INK TOP; the BEAR trims cancel each font's left side-bearing so the INK, // not the box, sits on the rail (measured: LECO indents +2, G18/G18_BOLD +1). -#define WEATHER_APP_LAYOUT_ROUND_TEMP_BEAR (-2) -#define WEATHER_APP_LAYOUT_ROUND_HILO_BEAR (-1) +#define WEATHER_APP_LAYOUT_ROUND_TEMP_BEAR (-2) +#define WEATHER_APP_LAYOUT_ROUND_HILO_BEAR (-1) #define WEATHER_APP_LAYOUT_ROUND_PHRASE_BEAR (-1) -#define WEATHER_APP_LAYOUT_ROUND_DESC_Y 125 // G14_BOLD ink 130..154 (2 lines) -#define WEATHER_APP_LAYOUT_ROUND_DESC_H 32 // TWO G14_BOLD lines -- emery's full - // sentence wraps, and the space the - // glyph row used to hold is now its. -#define WEATHER_APP_LAYOUT_ROUND_LABEL_W 114 // measure/draw box width for temp + hi/lo -#define WEATHER_APP_LAYOUT_ROUND_PHRASE_W 104 // left-aligned box 38..142 keeps - // every phrase clear of the disc halo -#define WEATHER_APP_LAYOUT_ROUND_DESC_W 190 // emery's full-measure description rail +#define WEATHER_APP_LAYOUT_ROUND_DESC_Y 125 // G14_BOLD ink 130..154 (2 lines) +#define WEATHER_APP_LAYOUT_ROUND_DESC_H \ + 32 // TWO G14_BOLD lines -- emery's full + // sentence wraps, and the space the + // glyph row used to hold is now its. +#define WEATHER_APP_LAYOUT_ROUND_LABEL_W 114 // measure/draw box width for temp + hi/lo +#define WEATHER_APP_LAYOUT_ROUND_PHRASE_W \ + 104 // left-aligned box 38..142 keeps + // every phrase clear of the disc halo +#define WEATHER_APP_LAYOUT_ROUND_DESC_W 190 // emery's full-measure description rail // ---- The LEFT RAIL CURVES with the glass, the way official round Pebble apps // hug the bezel: every row starts further left as it nears the display's widest // point. Modelled as a parabola matched to the circle (x ~ dy^2/2R for small dy) // rather than a true chord -- a true chord sags ~10px between the hi/lo and // phrase rows and reads as a kink, where this stays continuous down the stack. -// -#define WEATHER_APP_LAYOUT_ROUND_RAIL_MIN 6 // content x -> screen 18 -#define WEATHER_APP_LAYOUT_ROUND_RAIL_PIVOT 118 // ink y where the rail bottoms out -#define WEATHER_APP_LAYOUT_ROUND_RAIL_K 320 // 2 * effective radius +// +#define WEATHER_APP_LAYOUT_ROUND_RAIL_MIN 6 // content x -> screen 18 +#define WEATHER_APP_LAYOUT_ROUND_RAIL_PIVOT 118 // ink y where the rail bottoms out +#define WEATHER_APP_LAYOUT_ROUND_RAIL_K 320 // 2 * effective radius // ---- ROUND UV bar: emery's grid, but its LEFT AND RIGHT EDGES ARE ARCS // CONCENTRIC WITH THE GLASS, so the bar leans with the bezel and keeps a // near-constant 15-17px margin down its whole height. A straight full-measure // box would clear at its top row and clip at its bottom -- the circle narrows // downward, which is exactly the trap that bit the UV box on the 5-day screen. -#define WEATHER_APP_LAYOUT_ROUND_UV_BOX_Y 157 // nudged up 3 with the rule (was 160) -#define WEATHER_APP_LAYOUT_ROUND_UV_BOX_H 34 // emery is 40 +#define WEATHER_APP_LAYOUT_ROUND_UV_BOX_Y 157 // nudged up 3 with the rule (was 160) +#define WEATHER_APP_LAYOUT_ROUND_UV_BOX_H 34 // emery is 40 #define WEATHER_APP_LAYOUT_ROUND_UV_ARC_R_OUT 116 -#define WEATHER_APP_LAYOUT_ROUND_UV_ARC_R_IN 114 -#define WEATHER_APP_LAYOUT_ROUND_UV_SQ_DX (-90) // squares start, RELATIVE TO THE GLASS - // CENTRE (was content x 28; the report's - // content layer is inset 12, so its glass - // centre sits at content x 118 -> 28-118) -#define WEATHER_APP_LAYOUT_ROUND_UV_SQ_DY 21 // BY+21 (emery BY+25) -#define WEATHER_APP_LAYOUT_ROUND_UV_SUN_DX (-86) // sun-glyph centre (was content x 32) +#define WEATHER_APP_LAYOUT_ROUND_UV_ARC_R_IN 114 +#define WEATHER_APP_LAYOUT_ROUND_UV_SQ_DX \ + (-90) // squares start, RELATIVE TO THE GLASS + // CENTRE (was content x 28; the report's + // content layer is inset 12, so its glass + // centre sits at content x 118 -> 28-118) +#define WEATHER_APP_LAYOUT_ROUND_UV_SQ_DY 21 // BY+21 (emery BY+25) +#define WEATHER_APP_LAYOUT_ROUND_UV_SUN_DX (-86) // sun-glyph centre (was content x 32) // Sun + 'UV INDEX' are centred in the band between the widget's top edge (BY) // and the top of the tally squares (BY+SQ_DY) -- rows 157..177, centre 167. // Sun glyph is centre-anchored (core r3 + rays to r7, so bbox 160..174); the // header is box-anchored, and G18 puts its cap ink at box_y+7 .. +17, so // box BY-2 lands ink 162..172. Both centre on 167. (All BY-relative: the whole // widget moved up 3 with the rule, so only these absolute rows changed.) -#define WEATHER_APP_LAYOUT_ROUND_UV_SUN_DY 10 // BY+10 -> centre row 167 -#define WEATHER_APP_LAYOUT_ROUND_UV_HDR_DY -2 // BY-2 -> ink 162..172 -#define WEATHER_APP_LAYOUT_ROUND_UV_HDR_DX (-74) // 'UV INDEX' box (was content x 44) -#define WEATHER_APP_LAYOUT_ROUND_UV_NUM_DX (43) // LECO value box (was content x 161) -#define WEATHER_APP_LAYOUT_ROUND_UV_NUM_DY -6 // BY-6 (emery BY-5) +#define WEATHER_APP_LAYOUT_ROUND_UV_SUN_DY 10 // BY+10 -> centre row 167 +#define WEATHER_APP_LAYOUT_ROUND_UV_HDR_DY -2 // BY-2 -> ink 162..172 +#define WEATHER_APP_LAYOUT_ROUND_UV_HDR_DX (-74) // 'UV INDEX' box (was content x 44) +#define WEATHER_APP_LAYOUT_ROUND_UV_NUM_DX (43) // LECO value box (was content x 161) +#define WEATHER_APP_LAYOUT_ROUND_UV_NUM_DY -6 // BY-6 (emery BY-5) // ---- ROUND icon rails (the 75px PDC today icon + the bare 25px footer icon) // The coloured disc behind the today icon, in HUNDREDTHS of the icon layer's @@ -198,7 +202,7 @@ // - phrase: left-aligned W=104 box ends at 142; halo left at its cap row (98) // is >= 153 // - desc: halo bottom ~128.5 stays above the description's first ink row (130) -#define WEATHER_APP_LAYOUT_DISC_RATIO_NUM PBL_IF_ROUND_ELSE(111, 140) // 75*111/100 = 83 +#define WEATHER_APP_LAYOUT_DISC_RATIO_NUM PBL_IF_ROUND_ELSE(111, 140) // 75*111/100 = 83 // Where the outgoing disc has fully collapsed during the UP day-flip, as a raw // icon width. Rect 32 of 50 (64%); round 48 of 75 (the same 64%). #define WEATHER_APP_LAYOUT_DISC_COLLAPSE_W0 PBL_IF_ROUND_ELSE(48, 32) @@ -206,16 +210,17 @@ // 41..124 cols 154..236, centre (196,83). Its top (41) sits ~level with the // temp's cap ink row (44) — the pictured top-alignment — and its bottom clears // the description's first ink row (130) with the halo at ~128.5. -#define WEATHER_APP_LAYOUT_ROUND_TODAY_ICON_X_INSET 15 // 236-75-15 = 146 -> screen 158 -#define WEATHER_APP_LAYOUT_ROUND_TODAY_ICON_Y 45 // layer top; disc top = 41 +#define WEATHER_APP_LAYOUT_ROUND_TODAY_ICON_X_INSET 15 // 236-75-15 = 146 -> screen 158 +#define WEATHER_APP_LAYOUT_ROUND_TODAY_ICON_Y 45 // layer top; disc top = 41 // The PDC's native viewbox is 75x75 and gdraw_command_frame_draw ignores // sequence->size, so the ONLY way to shrink the art is to scale its command // lists in place -- done once at init against the RAM clone. The icon LAYER // stays 75px, which is what the disc diameter is derived from, so the circle is // unchanged and only the artwork inside it gets smaller. #define WEATHER_APP_LAYOUT_ROUND_PDC_NATIVE 75 -#define WEATHER_APP_LAYOUT_ROUND_PDC_ART 65 // the user's art size — restored with the - // 83px disc (65/83 = 0.78) +#define WEATHER_APP_LAYOUT_ROUND_PDC_ART \ + 65 // the user's art size — restored with the + // 83px disc (65/83 = 0.78) #define WEATHER_APP_LAYOUT_ROUND_PDC_INSET \ ((WEATHER_APP_LAYOUT_ROUND_PDC_NATIVE - WEATHER_APP_LAYOUT_ROUND_PDC_ART) / 2) @@ -240,34 +245,32 @@ // mask -- higher rows have a WIDER chord -- but if it ever moves DOWN, check the // bitmap's bottom-right corner first: it is the tightest margin on the page. #define WEATHER_APP_LAYOUT_ROUND_FOOT_DISC 35 -#define WEATHER_APP_LAYOUT_ROUND_FOOT_LABEL_DY -5 -#define WEATHER_APP_LAYOUT_ROUND_FOOT_TEMP_DY 12 -#define WEATHER_APP_LAYOUT_ROUND_CITY_X 57 // (city removed; kept for reference) -#define WEATHER_APP_LAYOUT_ROUND_CITY_Y 8 // G24_BOLD ink 18..31; halo top row is 32 -#define WEATHER_APP_LAYOUT_ROUND_CITY_W 122 // chord at row 18 is x 64..196; 'LOS ANGELES' - // measures ~119px in 24_BOLD, so it just fits - -#define WEATHER_APP_LAYOUT_ROUND_CHIN_Y 240 // band rows 240..259 = 20px -#define WEATHER_APP_LAYOUT_ROUND_CHEV_W 19 // odd width -> 19,17,...,1 scanlines -#define WEATHER_APP_LAYOUT_ROUND_CHEV_Y 249 // rows 249..258, sitting on the band's - // lower edge as in the reference -#define WEATHER_APP_LAYOUT_ROUND_CHEV_H 10 +#define WEATHER_APP_LAYOUT_ROUND_FOOT_LABEL_DY -5 +#define WEATHER_APP_LAYOUT_ROUND_FOOT_TEMP_DY 12 +#define WEATHER_APP_LAYOUT_ROUND_CITY_X 57 // (city removed; kept for reference) +#define WEATHER_APP_LAYOUT_ROUND_CITY_Y 8 // G24_BOLD ink 18..31; halo top row is 32 +#define WEATHER_APP_LAYOUT_ROUND_CITY_W \ + 122 // chord at row 18 is x 64..196; 'LOS ANGELES' + // measures ~119px in 24_BOLD, so it just fits + +#define WEATHER_APP_LAYOUT_ROUND_CHIN_Y 240 // band rows 240..259 = 20px +#define WEATHER_APP_LAYOUT_ROUND_CHEV_W 19 // odd width -> 19,17,...,1 scanlines +#define WEATHER_APP_LAYOUT_ROUND_CHEV_Y \ + 249 // rows 249..258, sitting on the band's + // lower edge as in the reference +#define WEATHER_APP_LAYOUT_ROUND_CHEV_H 10 #define WEATHER_APP_LAYOUT_ROUND_TOMORROW_ICON_X_INSET 42 // 236-25-42 = 169 -> screen 181 // Round bar layer height keeps the (removed) pull-to-refresh drawer's sizing so the // round location bar renders unchanged: ROUND_BAR_DEPTH + 40 (old PULL_TRIGGER_PX) + 6. -#define WEATHER_APP_LAYOUT_ROUND_PULL_LAYER_HEIGHT \ - (WEATHER_APP_LAYOUT_ROUND_BAR_DEPTH + 40 + 6) +#define WEATHER_APP_LAYOUT_ROUND_PULL_LAYER_HEIGHT (WEATHER_APP_LAYOUT_ROUND_BAR_DEPTH + 40 + 6) #define weather_type_get_bg_color weather_type_bg_color #define weather_type_get_icon_res_tiny weather_type_icon_tiny_resource #define weather_type_get_icon_res_today weather_type_icon_small_resource #if PBL_DISPLAY_HEIGHT >= 200 -static const GSize s_today_icon_size = { - PBL_IF_ROUND_ELSE(75, 50), - PBL_IF_ROUND_ELSE(75, 50) -}; +static const GSize s_today_icon_size = {PBL_IF_ROUND_ELSE(75, 50), PBL_IF_ROUND_ELSE(75, 50)}; #else static const GSize s_today_icon_size = {25, 25}; #endif @@ -275,14 +278,13 @@ static const GSize s_tomorrow_icon_size = {25, 25}; static bool prv_prepare_day_transition(WeatherAppLayout *layout, const WeatherLocationForecast *new_today, - const WeatherLocationForecast *new_next, - bool animate_down); + const WeatherLocationForecast *new_next, bool animate_down); __attribute__((unused)) static int prv_draw_text(GPoint offset, int max_width, GContext *context, - const char *text, const GFont font, - GColor font_color, GTextAlignment alignment) { - GSize size = graphics_text_layout_get_content_size( - text, font, GRect(0, 0, max_width, 1000), GTextOverflowModeFill, alignment); + const char *text, const GFont font, + GColor font_color, GTextAlignment alignment) { + GSize size = graphics_text_layout_get_content_size(text, font, GRect(0, 0, max_width, 1000), + GTextOverflowModeFill, alignment); const int height = size.h; const GRect box = (GRect){offset, GSize(max_width, height + 2)}; graphics_context_set_text_color(context, font_color); @@ -327,8 +329,8 @@ static void prv_move_day_icons_to_content(WeatherAppLayout *layout) { // behavior); GCC's format-truncation heuristic can't see the value ranges. #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-truncation" -static void prv_fill_high_low_buffer(int high, int low, bool tight, - char *buffer, size_t buffer_size) { +static void prv_fill_high_low_buffer(int high, int low, bool tight, char *buffer, + size_t buffer_size) { char hs[12], ls[12]; if (high == WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP) { snprintf(hs, sizeof(hs), "--\xC2\xB0"); @@ -346,9 +348,10 @@ static void prv_fill_high_low_buffer(int high, int low, bool tight, #define prv_fill_high_low_temp_buffer(h, l, b, n) \ prv_fill_high_low_buffer((h), (l), false, (b), (n)) -static void prv_fill_uv_value_buffer(const WeatherLocationForecast *forecast, - char *buffer, const size_t buffer_size) { - if (!buffer || buffer_size == 0) return; +static void prv_fill_uv_value_buffer(const WeatherLocationForecast *forecast, char *buffer, + const size_t buffer_size) { + if (!buffer || buffer_size == 0) + return; if (forecast && forecast->today_uv >= 0) { snprintf(buffer, buffer_size, "%d", forecast->today_uv); } else { @@ -360,7 +363,6 @@ static void prv_fill_uv_value_buffer(const WeatherLocationForecast *forecast, // cell and the round "Feels like" metric row are gone. today_feels_like_temp stays // in the v4 schema should a real phone-supplied feels-like ever be displayed.) - #if PBL_ROUND // Left rail x (CONTENT coords) for a row whose ink starts at ink_top_y. static int prv_round_rail(int ink_top_y) { @@ -374,15 +376,12 @@ static int prv_round_rail(int ink_top_y) { // the glass centre). The bar leans with the glass and keeps a near-constant // 15-17px margin down its whole 34px height, where a straight full-measure box // would clear at its top row and clip at its bottom (the circle narrows down). -static void prv_draw_uv_bar_frame(GContext *ctx, GPoint gc, int by, int h, - int r_out, int r_in) { +static void prv_draw_uv_bar_frame(GContext *ctx, GPoint gc, int by, int h, int r_out, int r_in) { graphics_context_set_fill_color(ctx, GColorBlack); for (int y = by; y < by + h; y++) { const int dy = y - gc.y; - const int ho = (int)weather_isqrt( - r_out * r_out - dy * dy); - const int hi = (int)weather_isqrt( - r_in * r_in - dy * dy); + const int ho = (int)weather_isqrt(r_out * r_out - dy * dy); + const int hi = (int)weather_isqrt(r_in * r_in - dy * dy); if (y < by + 2 || y >= by + h - 2) { graphics_fill_rect(ctx, GRect(gc.x - ho, y, 2 * ho + 1, 1), 0, GCornerNone); } else { @@ -402,18 +401,24 @@ static void prv_draw_uv_bar_frame(GContext *ctx, GPoint gc, int by, int h, static const char *prv_precip_likely(WeatherType t) { switch (t) { case WeatherType_LightSnow: - case WeatherType_HeavySnow: return i18n_noop("Snow likely"); - case WeatherType_RainAndSnow: return i18n_noop("Sleet likely"); - default: return i18n_noop("Rain likely"); + case WeatherType_HeavySnow: + return i18n_noop("Snow likely"); + case WeatherType_RainAndSnow: + return i18n_noop("Sleet likely"); + default: + return i18n_noop("Rain likely"); } } static const char *prv_precip_chance(WeatherType t) { switch (t) { case WeatherType_LightSnow: - case WeatherType_HeavySnow: return i18n_noop("Chance of snow"); - case WeatherType_RainAndSnow: return i18n_noop("Chance of sleet"); - default: return i18n_noop("Chance of rain"); + case WeatherType_HeavySnow: + return i18n_noop("Chance of snow"); + case WeatherType_RainAndSnow: + return i18n_noop("Chance of sleet"); + default: + return i18n_noop("Chance of rain"); } } @@ -443,16 +448,16 @@ static int prv_temp(int celsius) { static void prv_build_alert(const WeatherLocationForecast *f, char *buf, size_t buf_size, bool *wind_out) { const WeatherType t = f->current_weather_type; - const int wmo = f->today_wmo; // WMO 4677 code, -1 unknown + const int wmo = f->today_wmo; // WMO 4677 code, -1 unknown const bool feels_known = f->today_feels != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; - const bool temp_known = f->current_temp != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; - const bool high_known = f->today_high != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; - const bool low_known = f->today_low != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; + const bool temp_known = f->current_temp != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; + const bool high_known = f->today_high != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; + const bool low_known = f->today_low != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; const char *alert; bool wind = false; - if (wmo == 96 || wmo == 99) { // thunderstorm with hail + if (wmo == 96 || wmo == 99) { // thunderstorm with hail alert = i18n_noop("Hail"); - } else if (wmo >= 95 && wmo <= 99) { // thunderstorm codes + } else if (wmo >= 95 && wmo <= 99) { // thunderstorm codes alert = i18n_noop("Chance of storms"); } else if (t == WeatherType_HeavySnow || wmo == 75 || wmo == 86) { alert = i18n_noop("Heavy snow"); @@ -460,17 +465,17 @@ static void prv_build_alert(const WeatherLocationForecast *f, char *buf, size_t alert = i18n_noop("Heavy rain"); } else if (t == WeatherType_RainAndSnow) { alert = i18n_noop("Wintry mix"); - } else if (f->today_precip_sum_mm >= 30) { // a real soaking on the day + } else if (f->today_precip_sum_mm >= 30) { // a real soaking on the day alert = i18n_noop("Flood risk"); } else if (f->today_wind_mph >= 25) { alert = i18n_noop("Strong winds"); wind = true; - } else if (high_known && f->today_high <= prv_temp(0)) { // an ice day + } else if (high_known && f->today_high <= prv_temp(0)) { // an ice day alert = i18n_noop("Below freezing"); } else if (low_known && f->today_low <= prv_temp(-4)) { alert = i18n_noop("Hard frost"); - } else if (feels_known && f->today_feels <= prv_temp(0) && - temp_known && f->current_temp > prv_temp(0)) { // wind chill crosses zero + } else if (feels_known && f->today_feels <= prv_temp(0) && temp_known && + f->current_temp > prv_temp(0)) { // wind chill crosses zero alert = i18n_noop("Feels below freezing"); } else if (high_known && f->today_high >= prv_temp(30)) { alert = i18n_noop("Heatwave"); @@ -478,7 +483,7 @@ static void prv_build_alert(const WeatherLocationForecast *f, char *buf, size_t alert = i18n_noop("Very high UV"); } else if (f->today_uv >= 6) { alert = i18n_noop("High UV"); - } else if (wmo == 45 || wmo == 48 || // fog / depositing rime fog + } else if (wmo == 45 || wmo == 48 || // fog / depositing rime fog (f->today_visibility_m >= 0 && f->today_visibility_m <= 1000)) { alert = i18n_noop("Poor visibility"); } else if (f->today_humidity >= 85 && high_known && f->today_high >= prv_temp(20)) { @@ -502,8 +507,7 @@ static void prv_build_alert(const WeatherLocationForecast *f, char *buf, size_t wind = true; } else if (t == WeatherType_PartlyCloudy) { alert = i18n_noop("Fair conditions"); - } else if (temp_known && f->current_temp >= prv_temp(12) && - f->current_temp <= prv_temp(24)) { + } else if (temp_known && f->current_temp >= prv_temp(12) && f->current_temp <= prv_temp(24)) { alert = i18n_noop("Mild conditions"); } else { alert = i18n_noop("All clear"); @@ -516,30 +520,31 @@ static void prv_build_alert(const WeatherLocationForecast *f, char *buf, size_t // 8-point compass name from degrees (0 = N, clockwise). static const char *prv_compass8(int deg) { static const char *const kDirs[8] = { - i18n_noop("N"), i18n_noop("NE"), i18n_noop("E"), i18n_noop("SE"), - i18n_noop("S"), i18n_noop("SW"), i18n_noop("W"), i18n_noop("NW"), + i18n_noop("N"), i18n_noop("NE"), i18n_noop("E"), i18n_noop("SE"), + i18n_noop("S"), i18n_noop("SW"), i18n_noop("W"), i18n_noop("NW"), }; deg %= 360; - if (deg < 0) deg += 360; + if (deg < 0) + deg += 360; return kDirs[((deg + 22) / 45) & 7]; } // The forecast description: "High UV. Winds SW at 12mph. Precipitation 20%." — // warning first, then wind (direction when the record carries it), then precip. // Sentences drop out cleanly when their reading is off the wire. -static void prv_build_forecast_desc(const WeatherLocationForecast *f, const void *owner, - char *buf, size_t buf_size) { +static void prv_build_forecast_desc(const WeatherLocationForecast *f, const void *owner, char *buf, + size_t buf_size) { char alert[64]; bool wind_alert; prv_build_alert(f, alert, sizeof(alert), &wind_alert); int n = snprintf(buf, buf_size, "%s.", alert); - if (n < 0) return; + if (n < 0) + return; // A wind-flavored warning already said "winds" -- the wind sentence then // drops its prefix ("Light winds. SW at 12mph.", not "...Winds SW at..."). if (f->today_wind_mph >= 0 && (size_t)n < buf_size) { const bool mph = shell_prefs_get_units_wind() == UnitsWind_Mph; - const int speed = mph ? f->today_wind_mph - : ((f->today_wind_mph * 1609) + 500) / 1000; + const int speed = mph ? f->today_wind_mph : ((f->today_wind_mph * 1609) + 500) / 1000; const char *unit = i18n_get(mph ? i18n_noop("mph") : i18n_noop("km/h"), owner); if (f->today_wind_dir_deg >= 0) { const char *fmt = wind_alert ? i18n_noop("%s at %d%s.") : i18n_noop("Winds %s at %d%s."); @@ -551,7 +556,8 @@ static void prv_build_forecast_desc(const WeatherLocationForecast *f, const void n += snprintf(buf + n, buf_size - n, " "); n += snprintf(buf + n, buf_size - n, i18n_get(fmt, owner), speed, unit); } - if (n < 0) return; + if (n < 0) + return; } if (f->today_precip_mm >= 0 && (size_t)n < buf_size) { n += snprintf(buf + n, buf_size - n, " "); @@ -600,20 +606,20 @@ static void prv_draw_sun_glyph(GContext *ctx, GPoint c) { // rows beneath them. The bar also sits 5px lower now (EV_UV_BAR_Y 194), which costs chord width // — hence the compact-only arcs at r=124/122 instead of 116/114. That is still well inside the // glass (7-10px) and still narrower than the report's bar, which is 225px at its top row. -#define WX_UVC_H 36 -#define WX_UVC_R_OUT 124 -#define WX_UVC_R_IN 122 -#define WX_UVC_SQ_SIZE 10 -#define WX_UVC_SQ_PITCH 12 -#define WX_UVC_SQ_DX (-72) -#define WX_UVC_SQ_DY 21 -#define WX_UVC_NUM_DX 32 -#define WX_UVC_NUM_W 46 -#define WX_UVC_NUM_DY (-6) -#define WX_UVC_SUN_DX (-78) -#define WX_UVC_SUN_DY 10 -#define WX_UVC_HDR_DX (-68) -#define WX_UVC_HDR_DY (-2) +#define WX_UVC_H 36 +#define WX_UVC_R_OUT 124 +#define WX_UVC_R_IN 122 +#define WX_UVC_SQ_SIZE 10 +#define WX_UVC_SQ_PITCH 12 +#define WX_UVC_SQ_DX (-72) +#define WX_UVC_SQ_DY 21 +#define WX_UVC_NUM_DX 32 +#define WX_UVC_NUM_W 46 +#define WX_UVC_NUM_DY (-6) +#define WX_UVC_SUN_DX (-78) +#define WX_UVC_SUN_DY 10 +#define WX_UVC_HDR_DX (-68) +#define WX_UVC_HDR_DY (-2) #if PBL_DISPLAY_HEIGHT >= 200 #define WX_UV_HDR_FONT FONT_KEY_GOTHIC_18 @@ -635,33 +641,32 @@ int weather_app_layout_uv_bar_height(WeatherUvBarSize size) { return (size == WeatherUvBarCompact) ? WX_UVC_H : WEATHER_APP_LAYOUT_ROUND_UV_BOX_H; } -void weather_app_layout_draw_uv_bar(GContext *ctx, GPoint gc, int by, - int uv_value, const char *uv_text, WeatherUvBarSize size, - const char *label) { +void weather_app_layout_draw_uv_bar(GContext *ctx, GPoint gc, int by, int uv_value, + const char *uv_text, WeatherUvBarSize size, const char *label) { const bool c = (size == WeatherUvBarCompact); - const int h = c ? WX_UVC_H : WEATHER_APP_LAYOUT_ROUND_UV_BOX_H; - const int r_out = c ? WX_UVC_R_OUT : WEATHER_APP_LAYOUT_ROUND_UV_ARC_R_OUT; - const int r_in = c ? WX_UVC_R_IN : WEATHER_APP_LAYOUT_ROUND_UV_ARC_R_IN; - const int sun_dx = c ? WX_UVC_SUN_DX : WEATHER_APP_LAYOUT_ROUND_UV_SUN_DX; - const int hdr_dx = c ? WX_UVC_HDR_DX : WEATHER_APP_LAYOUT_ROUND_UV_HDR_DX; - const int hdr_dy = c ? WX_UVC_HDR_DY : WEATHER_APP_LAYOUT_ROUND_UV_HDR_DY; - const int sq_dx = c ? WX_UVC_SQ_DX : WEATHER_APP_LAYOUT_ROUND_UV_SQ_DX; - const int sq_dy = c ? WX_UVC_SQ_DY : WEATHER_APP_LAYOUT_ROUND_UV_SQ_DY; - const int sq_sz = c ? WX_UVC_SQ_SIZE : 10; - const int num_dx = c ? WX_UVC_NUM_DX : WEATHER_APP_LAYOUT_ROUND_UV_NUM_DX; - const int num_dy = c ? WX_UVC_NUM_DY : WEATHER_APP_LAYOUT_ROUND_UV_NUM_DY; - const int num_w = c ? WX_UVC_NUM_W : 46; - const char *hdr_font = WX_UV_HDR_FONT; // both sizes use the report's label font + const int h = c ? WX_UVC_H : WEATHER_APP_LAYOUT_ROUND_UV_BOX_H; + const int r_out = c ? WX_UVC_R_OUT : WEATHER_APP_LAYOUT_ROUND_UV_ARC_R_OUT; + const int r_in = c ? WX_UVC_R_IN : WEATHER_APP_LAYOUT_ROUND_UV_ARC_R_IN; + const int sun_dx = c ? WX_UVC_SUN_DX : WEATHER_APP_LAYOUT_ROUND_UV_SUN_DX; + const int hdr_dx = c ? WX_UVC_HDR_DX : WEATHER_APP_LAYOUT_ROUND_UV_HDR_DX; + const int hdr_dy = c ? WX_UVC_HDR_DY : WEATHER_APP_LAYOUT_ROUND_UV_HDR_DY; + const int sq_dx = c ? WX_UVC_SQ_DX : WEATHER_APP_LAYOUT_ROUND_UV_SQ_DX; + const int sq_dy = c ? WX_UVC_SQ_DY : WEATHER_APP_LAYOUT_ROUND_UV_SQ_DY; + const int sq_sz = c ? WX_UVC_SQ_SIZE : 10; + const int num_dx = c ? WX_UVC_NUM_DX : WEATHER_APP_LAYOUT_ROUND_UV_NUM_DX; + const int num_dy = c ? WX_UVC_NUM_DY : WEATHER_APP_LAYOUT_ROUND_UV_NUM_DY; + const int num_w = c ? WX_UVC_NUM_W : 46; + const char *hdr_font = WX_UV_HDR_FONT; // both sizes use the report's label font graphics_context_set_stroke_color(ctx, GColorBlack); graphics_context_set_stroke_width(ctx, 1); prv_draw_uv_bar_frame(ctx, gc, by, h, r_out, r_in); - prv_draw_sun_glyph(ctx, GPoint(gc.x + sun_dx, - by + (c ? WX_UVC_SUN_DY : WEATHER_APP_LAYOUT_ROUND_UV_SUN_DY))); + prv_draw_sun_glyph( + ctx, GPoint(gc.x + sun_dx, by + (c ? WX_UVC_SUN_DY : WEATHER_APP_LAYOUT_ROUND_UV_SUN_DY))); graphics_context_set_text_color(ctx, GColorBlack); graphics_draw_text(ctx, label, fonts_get_system_font(hdr_font), - GRect(gc.x + hdr_dx, by + hdr_dy, c ? 96 : 70, 20), - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + GRect(gc.x + hdr_dx, by + hdr_dy, c ? 96 : 70, 20), GTextOverflowModeFill, + GTextAlignmentLeft, NULL); const int filled = uv_value < 10 ? uv_value : 10; const int pitch = c ? WX_UVC_SQ_PITCH : ((uv_value > 10) ? 12 : 13); for (int i = 0; i < 10; i++) { @@ -672,7 +677,7 @@ void weather_app_layout_draw_uv_bar(GContext *ctx, GPoint gc, int by, } graphics_draw_rect(ctx, sq); } - if (uv_value > 10 && filled >= 10) { // "10+" tick past the last square + if (uv_value > 10 && filled >= 10) { // "10+" tick past the last square const int px = gc.x + sq_dx + 9 * pitch + sq_sz + 3; const int py = by + sq_dy + sq_sz / 2; graphics_context_set_stroke_width(ctx, 2); @@ -684,8 +689,8 @@ void weather_app_layout_draw_uv_bar(GContext *ctx, GPoint gc, int by, // The VALUE stays LECO_36 in both sizes — the compact bar shrinks its squares and pulls the // value box in, never the digit itself. graphics_draw_text(ctx, uv_text, fonts_get_system_font(WX_UV_NUM_FONT), - GRect(gc.x + num_dx, by + num_dy, num_w, 44), - GTextOverflowModeFill, GTextAlignmentRight, NULL); + GRect(gc.x + num_dx, by + num_dy, num_w, 44), GTextOverflowModeFill, + GTextAlignmentRight, NULL); } #endif // PBL_ROUND @@ -697,23 +702,25 @@ static int prv_interpolate_text_moook(AnimationProgress progress, int from, int const int32_t num_out = sizeof(frames_out) / sizeof(frames_out[0]); const int32_t num_total = num_in + num_mid + num_out; const int32_t dir = (from == to) ? 0 : ((from < to) ? 1 : -1); - if (dir == 0 || progress >= ANIMATION_NORMALIZED_MAX) return to; + if (dir == 0 || progress >= ANIMATION_NORMALIZED_MAX) + return to; - int32_t frame_idx = (progress * num_total + - (ANIMATION_NORMALIZED_MAX / (2 * num_total))) / + int32_t frame_idx = (progress * num_total + (ANIMATION_NORMALIZED_MAX / (2 * num_total))) / ANIMATION_NORMALIZED_MAX; - if (frame_idx < 0) frame_idx = 0; - if (frame_idx >= num_total) frame_idx = num_total - 1; + if (frame_idx < 0) + frame_idx = 0; + if (frame_idx >= num_total) + frame_idx = num_total - 1; if (frame_idx < num_in) { return from + (int)(dir * frames_in[frame_idx]); } if (frame_idx < num_in + num_mid) { - int32_t shifted = progress - - (num_in * ANIMATION_NORMALIZED_MAX / num_total); + int32_t shifted = progress - (num_in * ANIMATION_NORMALIZED_MAX / num_total); int32_t mid_normalized = num_total * shifted / num_mid; - if (mid_normalized < 0) mid_normalized = 0; + if (mid_normalized < 0) + mid_normalized = 0; if (mid_normalized > ANIMATION_NORMALIZED_MAX) { mid_normalized = ANIMATION_NORMALIZED_MAX; } @@ -728,7 +735,8 @@ static int prv_interpolate_text_moook(AnimationProgress progress, int from, int static int32_t prv_interpolate_icon_landing_progress(AnimationProgress progress) { const int32_t max = ANIMATION_NORMALIZED_MAX; - if (progress >= max) return max; + if (progress >= max) + return max; const int32_t overshoot = max / 36; const int32_t rebound = max / 120; @@ -740,17 +748,16 @@ static int32_t prv_interpolate_icon_landing_progress(AnimationProgress progress) } if ((int32_t)progress < settle) { - return max + overshoot - - weather_scale_i32(progress - hit, overshoot + rebound, settle - hit); + return max + overshoot - weather_scale_i32(progress - hit, overshoot + rebound, settle - hit); } - return max - rebound + - weather_scale_i32(progress - settle, rebound, max - settle); + return max - rebound + weather_scale_i32(progress - settle, rebound, max - settle); } static int32_t prv_interpolate_icon_landing_progress_down(AnimationProgress progress) { const int32_t max = ANIMATION_NORMALIZED_MAX; - if (progress >= max) return max; + if (progress >= max) + return max; const int32_t rebound = max / 140; const int32_t hit = max * 88 / 100; @@ -764,13 +771,13 @@ static int32_t prv_interpolate_icon_landing_progress_down(AnimationProgress prog return max - weather_scale_i32(progress - hit, rebound, settle - hit); } - return max - rebound + - weather_scale_i32(progress - settle, rebound, max - settle); + return max - rebound + weather_scale_i32(progress - settle, rebound, max - settle); } static void prv_draw_fin_layer(Layer *layer, GContext *context) { WeatherAppLayout *layout = *(WeatherAppLayout **)layer_get_data(layer); - if (!layout || !layout->fin_pdc) return; + if (!layout || !layout->fin_pdc) + return; graphics_context_set_compositing_mode(context, GCompOpSet); gdraw_command_image_draw(context, layout->fin_pdc, GPointZero); @@ -779,10 +786,10 @@ static void prv_draw_fin_layer(Layer *layer, GContext *context) { static void prv_fin_anim_update(Animation *anim, AnimationProgress progress) { WeatherAppLayout *layout = (WeatherAppLayout *)animation_get_context(anim); GRect frame = layout->fin_anim.to; - frame.origin.x = prv_interpolate_text_moook( - progress, layout->fin_anim.from.origin.x, layout->fin_anim.to.origin.x); - frame.origin.y = prv_interpolate_text_moook( - progress, layout->fin_anim.from.origin.y, layout->fin_anim.to.origin.y); + frame.origin.x = prv_interpolate_text_moook(progress, layout->fin_anim.from.origin.x, + layout->fin_anim.to.origin.x); + frame.origin.y = prv_interpolate_text_moook(progress, layout->fin_anim.from.origin.y, + layout->fin_anim.to.origin.y); layer_set_frame(layout->fin_layer, frame); } @@ -798,13 +805,13 @@ static void prv_fin_anim_stopped(Animation *anim, bool finished, void *context) } static const AnimationImplementation s_fin_anim_impl = { - .update = prv_fin_anim_update, + .update = prv_fin_anim_update, }; // ---- Text animation snapshot helpers ---- // Featured temperature: current temp, or the daily high on future days. -static void prv_fill_featured_temp_buffer(const WeatherLocationForecast *f, - char *buffer, size_t buffer_size) { +static void prv_fill_featured_temp_buffer(const WeatherLocationForecast *f, char *buffer, + size_t buffer_size) { if (f->current_temp == WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP) { if (f->today_high != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP) snprintf(buffer, buffer_size, "%d\xC2\xB0", f->today_high); @@ -836,12 +843,10 @@ static void prv_snapshot_text(WeatherAppLayout *layout) { prv_fill_featured_temp_buffer(f, layout->text_anim.top_temp, sizeof(layout->text_anim.top_temp)); #if PBL_ROUND - prv_fill_high_low_temp_buffer(f->today_high, f->today_low, - layout->text_anim.top_highlow, + prv_fill_high_low_temp_buffer(f->today_high, f->today_low, layout->text_anim.top_highlow, sizeof(layout->text_anim.top_highlow)); #else - prv_fill_high_low_temp_buffer(f->today_high, f->today_low, - layout->text_anim.top_highlow, + prv_fill_high_low_temp_buffer(f->today_high, f->today_low, layout->text_anim.top_highlow, sizeof(layout->text_anim.top_highlow)); #endif strncpy(layout->text_anim.top_phrase, @@ -850,12 +855,10 @@ static void prv_snapshot_text(WeatherAppLayout *layout) { layout->text_anim.top_phrase[sizeof(layout->text_anim.top_phrase) - 1] = '\0'; prv_build_forecast_desc(f, layout, layout->text_anim.top_desc, sizeof(layout->text_anim.top_desc)); - prv_fill_uv_value_buffer(f, - layout->text_anim.top_uv, - sizeof(layout->text_anim.top_uv)); + prv_fill_uv_value_buffer(f, layout->text_anim.top_uv, sizeof(layout->text_anim.top_uv)); } else { layout->text_anim.top_label[0] = '\0'; - layout->text_anim.top_temp[0] = '\0'; + layout->text_anim.top_temp[0] = '\0'; layout->text_anim.top_phrase[0] = '\0'; layout->text_anim.top_desc[0] = '\0'; layout->text_anim.top_highlow[0] = '\0'; @@ -867,10 +870,8 @@ static void prv_snapshot_text(WeatherAppLayout *layout) { const char *lbl = (n->label && n->label[0]) ? n->label : i18n_get("TOMORROW", layout); strncpy(layout->text_anim.bot_label, lbl, sizeof(layout->text_anim.bot_label) - 1); layout->text_anim.bot_label[sizeof(layout->text_anim.bot_label) - 1] = '\0'; - prv_fill_high_low_buffer(n->today_high, n->today_low, - true /* tight on both shapes now */, - layout->text_anim.bot_highlow, - sizeof(layout->text_anim.bot_highlow)); + prv_fill_high_low_buffer(n->today_high, n->today_low, true /* tight on both shapes now */, + layout->text_anim.bot_highlow, sizeof(layout->text_anim.bot_highlow)); layout->text_anim.bot_valid = true; } else { layout->text_anim.bot_valid = false; @@ -881,12 +882,11 @@ static void prv_snapshot_text(WeatherAppLayout *layout) { // snapshot pass and the live pass — the row geometry lives here exactly once. typedef struct { const char *label, *temp, *highlow; - const char *uv, *phrase, *desc; // UV bar, condition line, forecast description + const char *uv, *phrase, *desc; // UV bar, condition line, forecast description } TopText; -static void prv_draw_top_rows(const WeatherAppLayout *layout, GPoint *off, int cw, - GContext *ctx, const TopText *t, int label_temp_gap, - bool draw_uv_box) { +static void prv_draw_top_rows(const WeatherAppLayout *layout, GPoint *off, int cw, GContext *ctx, + const TopText *t, int label_temp_gap, bool draw_uv_box) { #if PBL_ROUND (void)label_temp_gap; // ROUND : emery's page, on a FIXED grid. Same rows, same @@ -898,8 +898,8 @@ static void prv_draw_top_rows(const WeatherAppLayout *layout, GPoint *off, int c // description below it, which a fixed grid cannot absorb the way a flow can. // Ink-top offsets per font (box y -> first ink row): G24_BOLD/G28_BOLD +10, // LECO_36 +11, G18_BOLD/G18 +7, G14_BOLD +5. Label ink 42..55 then leaves a - // 14px gap to the temp's ink at 70 -- emery's exact label->temp air. The rail is solved from the ink, not the - // box, so the curve follows what the eye actually sees. + // 14px gap to the temp's ink at 70 -- emery's exact label->temp air. The rail is solved from the + // ink, not the box, so the curve follows what the eye actually sees. graphics_context_set_text_color(ctx, GColorBlack); char caps[24]; @@ -914,32 +914,31 @@ static void prv_draw_top_rows(const WeatherAppLayout *layout, GPoint *off, int c // Day name centred at the crown. Rides off->x/off->y so the day-flip slide // carries it like every other row. Font/size unchanged (G28_BOLD caps). graphics_draw_text(ctx, caps, layout->location_font, - GRect(off->x + gcx - 100, - off->y + WEATHER_APP_LAYOUT_ROUND_LABEL_Y, 200, 30), + GRect(off->x + gcx - 100, off->y + WEATHER_APP_LAYOUT_ROUND_LABEL_Y, 200, 30), GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); // Temp / hi-lo / condition: a left column whose edge FOLLOWS THE CURVE OF THE // SCREEN (design review) — each line starts from prv_round_rail solved at // its own ink-top row, the same parabola the description rides, so the stack // leans with the bezel. BEAR trims put the INK (not the box) on the rail. - graphics_draw_text(ctx, t->temp, layout->temperature_font, - GRect(off->x + prv_round_rail(WEATHER_APP_LAYOUT_ROUND_TEMP_Y + 11) + - WEATHER_APP_LAYOUT_ROUND_TEMP_BEAR, - off->y + WEATHER_APP_LAYOUT_ROUND_TEMP_Y, - WEATHER_APP_LAYOUT_ROUND_LABEL_W, 38), - GTextOverflowModeFill, GTextAlignmentLeft, NULL); - graphics_draw_text(ctx, t->highlow, layout->high_low_phrase_font, - GRect(off->x + prv_round_rail(WEATHER_APP_LAYOUT_ROUND_HIGHLOW_Y + 6) + - WEATHER_APP_LAYOUT_ROUND_HILO_BEAR, - off->y + WEATHER_APP_LAYOUT_ROUND_HIGHLOW_Y, - WEATHER_APP_LAYOUT_ROUND_LABEL_W, 20), - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + graphics_draw_text( + ctx, t->temp, layout->temperature_font, + GRect(off->x + prv_round_rail(WEATHER_APP_LAYOUT_ROUND_TEMP_Y + 11) + + WEATHER_APP_LAYOUT_ROUND_TEMP_BEAR, + off->y + WEATHER_APP_LAYOUT_ROUND_TEMP_Y, WEATHER_APP_LAYOUT_ROUND_LABEL_W, 38), + GTextOverflowModeFill, GTextAlignmentLeft, NULL); + graphics_draw_text( + ctx, t->highlow, layout->high_low_phrase_font, + GRect(off->x + prv_round_rail(WEATHER_APP_LAYOUT_ROUND_HIGHLOW_Y + 6) + + WEATHER_APP_LAYOUT_ROUND_HILO_BEAR, + off->y + WEATHER_APP_LAYOUT_ROUND_HIGHLOW_Y, WEATHER_APP_LAYOUT_ROUND_LABEL_W, 20), + GTextOverflowModeFill, GTextAlignmentLeft, NULL); if (t->phrase && t->phrase[0]) { - graphics_draw_text(ctx, t->phrase, layout->metrics_value_font, - GRect(off->x + prv_round_rail(WEATHER_APP_LAYOUT_ROUND_PHRASE_Y + 7) + - WEATHER_APP_LAYOUT_ROUND_PHRASE_BEAR, - off->y + WEATHER_APP_LAYOUT_ROUND_PHRASE_Y, - WEATHER_APP_LAYOUT_ROUND_PHRASE_W, 20), - GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); + graphics_draw_text( + ctx, t->phrase, layout->metrics_value_font, + GRect(off->x + prv_round_rail(WEATHER_APP_LAYOUT_ROUND_PHRASE_Y + 7) + + WEATHER_APP_LAYOUT_ROUND_PHRASE_BEAR, + off->y + WEATHER_APP_LAYOUT_ROUND_PHRASE_Y, WEATHER_APP_LAYOUT_ROUND_PHRASE_W, 20), + GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); } // Emery's sentence, verbatim -- "Light winds. SW at 12mph. Precipitation 20%." // It wraps to two lines at this measure, which is why it gets DESC_H and the @@ -948,8 +947,7 @@ static void prv_draw_top_rows(const WeatherAppLayout *layout, GPoint *off, int c graphics_draw_text(ctx, t->desc, layout->metrics_font, GRect(off->x + prv_round_rail(WEATHER_APP_LAYOUT_ROUND_DESC_Y + 5), off->y + WEATHER_APP_LAYOUT_ROUND_DESC_Y, - WEATHER_APP_LAYOUT_ROUND_DESC_W, - WEATHER_APP_LAYOUT_ROUND_DESC_H), + WEATHER_APP_LAYOUT_ROUND_DESC_W, WEATHER_APP_LAYOUT_ROUND_DESC_H), GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); } @@ -985,8 +983,7 @@ static void prv_draw_top_rows(const WeatherAppLayout *layout, GPoint *off, int c // existing 14px label→temp whitespace, they don't push the temp down. // Label→temp air: 17px ink gap minus the user's −3 trim = 14 (gap param 3); // the rows below stay reference-tight (9/4) and ride with the temp. - prv_draw_text(line, cw, ctx, caps, layout->location_font, - GColorBlack, GTextAlignmentLeft); + prv_draw_text(line, cw, ctx, caps, layout->location_font, GColorBlack, GTextAlignmentLeft); line.y += fonts_get_font_height(fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); line.y += label_temp_gap; // Even ink gaps down the temp / hi-lo / condition stack (matching @@ -996,42 +993,46 @@ static void prv_draw_top_rows(const WeatherAppLayout *layout, GPoint *off, int c // the 29px between (air 7 above / 6 below its mass); the -1 after the hi/lo keeps the // condition riding at 93. (The temp trim moves everything below it; only the hi/lo trim // moves the condition relative to the hi/lo.) - line.y += prv_draw_text(line, cw, ctx, t->temp, layout->temperature_font, - GColorBlack, GTextAlignmentLeft) - 1; - line.y += prv_draw_text(line, cw, ctx, t->highlow, layout->high_low_phrase_font, - GColorBlack, GTextAlignmentLeft) - 1; + line.y += prv_draw_text(line, cw, ctx, t->temp, layout->temperature_font, GColorBlack, + GTextAlignmentLeft) - + 1; + line.y += prv_draw_text(line, cw, ctx, t->highlow, layout->high_low_phrase_font, GColorBlack, + GTextAlignmentLeft) - + 1; if (!WEATHER_APP_LAYOUT_RECT_SMALL && t->phrase && t->phrase[0]) { // Width-limited so a long phrase ellipsizes before the disc (disc's left // edge sits ~x116 in content coords). The small rects skip the phrase row // (the header icon carries the condition) to keep the description on-page. - line.y += prv_draw_text(line, 112, ctx, t->phrase, layout->metrics_value_font, - GColorBlack, GTextAlignmentLeft) - 2; + line.y += prv_draw_text(line, 112, ctx, t->phrase, layout->metrics_value_font, GColorBlack, + GTextAlignmentLeft) - + 2; } // Forecast description ("High UV. Winds SW at 12mph. Precipitation 20%."): // warning, wind, precip. Measured and CENTERED in the band between the // condition text's bottom (the flow's current line) and the UV box top — // one- and two-line descriptions both float mid-band. const int band_bot_anchor = WEATHER_APP_LAYOUT_RECT_SMALL ? 122 : 150; - int box_top = off->y + band_bot_anchor; // no-description fallback: the classic anchor + int box_top = off->y + band_bot_anchor; // no-description fallback: the classic anchor if (t->desc && t->desc[0]) { - const GSize dsz = graphics_text_layout_get_content_size( - t->desc, layout->metrics_font, GRect(0, 0, cw, 40), - GTextOverflowModeWordWrap, GTextAlignmentLeft); + const GSize dsz = + graphics_text_layout_get_content_size(t->desc, layout->metrics_font, GRect(0, 0, cw, 40), + GTextOverflowModeWordWrap, GTextAlignmentLeft); const int band_top = line.y; const int band_bot = off->y + band_bot_anchor; // the box's nominal top (keeps desc placement) int desc_y = band_top + (band_bot - band_top - dsz.h) / 2; - if (desc_y < band_top) desc_y = band_top; + if (desc_y < band_top) + desc_y = band_top; graphics_context_set_text_color(ctx, GColorBlack); - graphics_draw_text(ctx, t->desc, layout->metrics_font, - GRect(off->x, desc_y, cw, dsz.h + 2), + graphics_draw_text(ctx, t->desc, layout->metrics_font, GRect(off->x, desc_y, cw, dsz.h + 2), GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); // Center the UV box between the description's ink bottom and the y195 // divider — per page, since one- and two-line descriptions end at // different depths (same optical rule as the fin below the divider). - const int desc_bot = desc_y + dsz.h + 2; // +2: G14's descent runs past the metric + const int desc_bot = desc_y + dsz.h + 2; // +2: G14's descent runs past the metric const int divider_y = off->y + 195; box_top = desc_bot + (divider_y - desc_bot - 40) / 2; - if (box_top < desc_bot) box_top = desc_bot; + if (box_top < desc_bot) + box_top = desc_bot; } // The BIG UV BAR (brought back from the newspaper version, verbatim grid): @@ -1060,8 +1061,8 @@ static void prv_draw_top_rows(const WeatherAppLayout *layout, GPoint *off, int c // Gothic-14-Bold's V glyph fuses into a solid stem (reads as "UY") — // Gothic 18's V tapers properly (metrics_value_font is G18 on rect). graphics_draw_text(ctx, i18n_get("UV INDEX", layout), layout->metrics_value_font, - GRect(off->x + 24, by + 2, 70, 20), - GTextOverflowModeFill, GTextAlignmentLeft, NULL); + GRect(off->x + 24, by + 2, 70, 20), GTextOverflowModeFill, + GTextAlignmentLeft, NULL); // Fully filled the instant the box appears — no tick-in (the box no longer // rides any animation; it just renders in once the transition settles). const int filled = uvv < 10 ? uvv : 10; @@ -1078,9 +1079,9 @@ static void prv_draw_top_rows(const WeatherAppLayout *layout, GPoint *off, int c } graphics_draw_rect(ctx, sq); } - if (uvv > 10 && filled >= 10) { // appears with the final tick + if (uvv > 10 && filled >= 10) { // appears with the final tick const int px = off->x + 5 + 9 * pitch + 10 + 3; - const int py = by + 30; // the squares' vertical center + const int py = by + 30; // the squares' vertical center graphics_context_set_stroke_width(ctx, 2); graphics_draw_line(ctx, GPoint(px, py), GPoint(px + 6, py)); graphics_draw_line(ctx, GPoint(px + 3, py - 3), GPoint(px + 3, py + 3)); @@ -1088,22 +1089,22 @@ static void prv_draw_top_rows(const WeatherAppLayout *layout, GPoint *off, int c } graphics_context_set_fill_color(ctx, GColorBlack); graphics_draw_text(ctx, t->uv, layout->temperature_font, - GRect(off->x + cw - 52, by - 5, 46, 44), - GTextOverflowModeFill, GTextAlignmentRight, NULL); + GRect(off->x + cw - 52, by - 5, 46, 44), GTextOverflowModeFill, + GTextAlignmentRight, NULL); } #endif } // Draw top-half text from the snapshot (outgoing frame). -static void prv_draw_snapshot_top(const WeatherAppLayout *layout, GPoint *off, - int cw, GContext *ctx) { +static void prv_draw_snapshot_top(const WeatherAppLayout *layout, GPoint *off, int cw, + GContext *ctx) { const TopText t = { - .label = layout->text_anim.top_label, - .temp = layout->text_anim.top_temp, - .highlow = layout->text_anim.top_highlow, - .uv = layout->text_anim.top_uv, - .phrase = layout->text_anim.top_phrase, - .desc = layout->text_anim.top_desc, + .label = layout->text_anim.top_label, + .temp = layout->text_anim.top_temp, + .highlow = layout->text_anim.top_highlow, + .uv = layout->text_anim.top_uv, + .phrase = layout->text_anim.top_phrase, + .desc = layout->text_anim.top_desc, }; // Outgoing (snapshot) frame is only ever drawn mid-transition -> never the box. prv_draw_top_rows(layout, off, cw, ctx, &t, PBL_IF_RECT_ELSE(3, 0), false); @@ -1120,34 +1121,35 @@ static void prv_draw_top_half_text(const WeatherAppLayout *layout, GPoint *curre prv_build_forecast_desc(forecast, layout, desc_buffer, sizeof(desc_buffer)); prv_fill_uv_value_buffer(forecast, uv_buffer, sizeof(uv_buffer)); prv_fill_featured_temp_buffer(forecast, temp_buffer, sizeof(temp_buffer)); - prv_fill_high_low_temp_buffer(forecast->today_high, forecast->today_low, - highlow_buffer, sizeof(highlow_buffer)); + prv_fill_high_low_temp_buffer(forecast->today_high, forecast->today_low, highlow_buffer, + sizeof(highlow_buffer)); const TopText t = { - .label = (forecast->label && forecast->label[0]) ? forecast->label - : i18n_get("TODAY", layout), - .temp = temp_buffer, - .highlow = highlow_buffer, - .uv = uv_buffer, - .phrase = forecast->current_weather_phrase, - .desc = desc_buffer, + .label = + (forecast->label && forecast->label[0]) ? forecast->label : i18n_get("TODAY", layout), + .temp = temp_buffer, + .highlow = highlow_buffer, + .uv = uv_buffer, + .phrase = forecast->current_weather_phrase, + .desc = desc_buffer, }; // The box draws only on the STATIC render (transition settled) — never while // the page/text is sliding, so it appears in place rather than sliding with it. - prv_draw_top_rows(layout, current_offset, content_width, context, &t, - PBL_IF_RECT_ELSE(3, 0), !layout->text_anim.active); + prv_draw_top_rows(layout, current_offset, content_width, context, &t, PBL_IF_RECT_ELSE(3, 0), + !layout->text_anim.active); } // Shared bottom-half rows (label + high/low), string-driven. -static void prv_draw_bottom_rows(const WeatherAppLayout *layout, GPoint *off, int cw, - GContext *ctx, const char *label, const char *highlow, - const char *phrase, int gap) { +static void prv_draw_bottom_rows(const WeatherAppLayout *layout, GPoint *off, int cw, GContext *ctx, + const char *label, const char *highlow, const char *phrase, + int gap) { #if PBL_ROUND // ROUND: the reference's STACKED block -- the day name bold on its own line // with the high/low beneath it, bare icon railed right. The rail is pushed in // to content 41 (screen 53) because the lower line's ink reaches row 233, // where the glass only starts at x50.7 -- the single-row footer could sit at // screen 42 precisely because it never went that deep. - (void)gap; (void)phrase; + (void)gap; + (void)phrase; off->x += WEATHER_APP_LAYOUT_BOTTOM_TEXT_X_SHIFT; char rcaps[24]; prv_upcase_into(rcaps, sizeof(rcaps), label); @@ -1161,44 +1163,41 @@ static void prv_draw_bottom_rows(const WeatherAppLayout *layout, GPoint *off, in GRect(off->x, off->y + WEATHER_APP_LAYOUT_ROUND_FOOT_TEMP_DY, r_w, 20), GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); #else - // The NEWSPAPER FOOTER SLOT (rect) // Rect: the NEWSPAPER FOOTER SLOT (brought back from the front-page-spread - // version): one compact row under the rule — next-day label + tight temps on + // The NEWSPAPER FOOTER SLOT (rect) // Rect: the NEWSPAPER FOOTER SLOT (brought back from the + // front-page-spread version): one compact row under the rule — next-day label + tight temps on // the left, the bare 25px bitmap right-railed by its rest frame. Fixed // anchors so nothing jumps between pages; temps ellipsize before they can // reach the icon (double-negative winters). - (void)gap; (void)phrase; - off->x += WEATHER_APP_LAYOUT_BOTTOM_TEXT_X_SHIFT; // 0 on rect + (void)gap; + (void)phrase; + off->x += WEATHER_APP_LAYOUT_BOTTOM_TEXT_X_SHIFT; // 0 on rect const int row_y = off->y + 3; // Small rect: no room for the 25px icon under the rule, so the footer is // text-only in G14_BOLD and the label+temps take the full width. - GFont foot_font = WEATHER_APP_LAYOUT_RECT_SMALL ? layout->metrics_font - : layout->tomorrow_font; + GFont foot_font = WEATHER_APP_LAYOUT_RECT_SMALL ? layout->metrics_font : layout->tomorrow_font; char caps[24]; prv_upcase_into(caps, sizeof(caps), label); graphics_context_set_text_color(ctx, GColorBlack); const GSize lsz = graphics_text_layout_get_content_size( - caps, foot_font, GRect(0, 0, 200, 20), GTextOverflowModeFill, - GTextAlignmentLeft); - graphics_draw_text(ctx, caps, foot_font, - GRect(off->x, row_y, lsz.w + 2, 20), + caps, foot_font, GRect(0, 0, 200, 20), GTextOverflowModeFill, GTextAlignmentLeft); + graphics_draw_text(ctx, caps, foot_font, GRect(off->x, row_y, lsz.w + 2, 20), GTextOverflowModeFill, GTextAlignmentLeft, NULL); // Derived from the frame the bitmap actually rests in, so the ellipsis point // can never drift away from the icon. On rect this is 190-25-3 = 162, exactly // what the old cw-based formula produced; on round it self-syncs to 177. - const int icon_left = WEATHER_APP_LAYOUT_RECT_SMALL - ? (off->x + cw + 4) - : layout->tomorrow_icon_rest_frame.origin.x; + const int icon_left = + WEATHER_APP_LAYOUT_RECT_SMALL ? (off->x + cw + 4) : layout->tomorrow_icon_rest_frame.origin.x; const int tx = off->x + lsz.w + PBL_IF_RECT_ELSE(10, 5); - graphics_draw_text(ctx, highlow, foot_font, - GRect(tx, row_y, icon_left - 4 - tx, 20), + graphics_draw_text(ctx, highlow, foot_font, GRect(tx, row_y, icon_left - 4 - tx, 20), GTextOverflowModeTrailingEllipsis, GTextAlignmentLeft, NULL); #endif } // Draw bottom-half text from the snapshot (outgoing frame). -static void prv_draw_snapshot_bot(const WeatherAppLayout *layout, GPoint *off, - int cw, GContext *ctx) { - if (!layout->text_anim.bot_valid) return; +static void prv_draw_snapshot_bot(const WeatherAppLayout *layout, GPoint *off, int cw, + GContext *ctx) { + if (!layout->text_anim.bot_valid) + return; prv_draw_bottom_rows(layout, off, cw, ctx, layout->text_anim.bot_label, layout->text_anim.bot_highlow, NULL, 6); } @@ -1206,16 +1205,14 @@ static void prv_draw_snapshot_bot(const WeatherAppLayout *layout, GPoint *off, static void prv_draw_bottom_half_text(const WeatherAppLayout *layout, GPoint *current_offset, int content_width, GContext *context) { const WeatherLocationForecast *next = layout->next_forecast; - if (!next) return; + if (!next) + return; char text_buffer[15] = {0}; - prv_fill_high_low_buffer(next->today_high, next->today_low, - true /* tight on both shapes now */, + prv_fill_high_low_buffer(next->today_high, next->today_low, true /* tight on both shapes now */, text_buffer, sizeof(text_buffer)); prv_draw_bottom_rows(layout, current_offset, content_width, context, - (next->label && next->label[0]) ? next->label - : i18n_get("TOMORROW", layout), - text_buffer, next->current_weather_phrase, - PBL_IF_RECT_ELSE(2, 10)); + (next->label && next->label[0]) ? next->label : i18n_get("TOMORROW", layout), + text_buffer, next->current_weather_phrase, PBL_IF_RECT_ELSE(2, 10)); } #if PBL_ROUND @@ -1229,8 +1226,10 @@ static int prv_round_scaler_disc(int w) { const int hi = s_today_icon_size.w * WEATHER_APP_LAYOUT_DISC_RATIO_NUM / 100; const int w0 = s_tomorrow_icon_size.w; const int w1 = s_today_icon_size.w; - if (w <= w0 || w1 <= w0) return lo; - if (w >= w1) return hi; + if (w <= w0 || w1 <= w0) + return lo; + if (w >= w1) + return hi; return lo + (hi - lo) * (w - w0) / (w1 - w0); } #endif @@ -1241,27 +1240,23 @@ static void prv_draw_circle_at_layer(Layer *icon_layer, GContext *context, const GSize sz = frame.size; const int diam = (int)(sz.w * WEATHER_APP_LAYOUT_DISC_RATIO_NUM / 100); GRect bg_circle = (GRect){ - .origin = GPoint(frame.origin.x + sz.w / 2 - diam / 2, - frame.origin.y + sz.h / 2 - diam / 2), - .size = GSize(diam, diam), + .origin = GPoint(frame.origin.x + sz.w / 2 - diam / 2, frame.origin.y + sz.h / 2 - diam / 2), + .size = GSize(diam, diam), }; prv_draw_weather_background(&bg_circle, context, weather_type_disc_color(weather_type)); } #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS -static void prv_draw_weather_pdc_frame(const WeatherAppLayout *layout, - GContext *ctx, - WeatherType weather_type, - GRect frame_rect) { - int frame_index = ((int)weather_type <= WeatherType_RainAndSnow) - ? (int)weather_type : WeatherType_Generic; +static void prv_draw_weather_pdc_frame(const WeatherAppLayout *layout, GContext *ctx, + WeatherType weather_type, GRect frame_rect) { + int frame_index = + ((int)weather_type <= WeatherType_RainAndSnow) ? (int)weather_type : WeatherType_Generic; // No set_bounds_size: the PDC's native viewbox is already the displayed size // (75x75) and gdraw_command_frame_draw never reads sequence->size — it draws at // the native coords offset by frame_rect.origin. (The sequence is also a RAM // clone now, so a write would be legal, but it's simply unnecessary here.) GDrawCommandFrame *frame = - gdraw_command_sequence_get_frame_by_index(layout->weather_icon_pdc_sequence, - frame_index); + gdraw_command_sequence_get_frame_by_index(layout->weather_icon_pdc_sequence, frame_index); gdraw_command_frame_draw(ctx, layout->weather_icon_pdc_sequence, frame, GPoint(frame_rect.origin.x + WEATHER_APP_LAYOUT_ROUND_PDC_INSET, frame_rect.origin.y + WEATHER_APP_LAYOUT_ROUND_PDC_INSET)); @@ -1271,15 +1266,15 @@ static GRect prv_icon_background_frame_for_icon(GRect icon_frame) { const GSize sz = icon_frame.size; const int diam = (int)(sz.w * WEATHER_APP_LAYOUT_DISC_RATIO_NUM / 100); return (GRect){ - .origin = GPoint(icon_frame.origin.x + sz.w / 2 - diam / 2, - icon_frame.origin.y + sz.h / 2 - diam / 2), - .size = GSize(diam, diam), + .origin = GPoint(icon_frame.origin.x + sz.w / 2 - diam / 2, + icon_frame.origin.y + sz.h / 2 - diam / 2), + .size = GSize(diam, diam), }; } -static void prv_set_current_escape_icon_frame(WeatherAppLayout *layout, - GRect content_icon_frame) { - if (!layout->current_weather_escape_layer) return; +static void prv_set_current_escape_icon_frame(WeatherAppLayout *layout, GRect content_icon_frame) { + if (!layout->current_weather_escape_layer) + return; GRect root_icon = content_icon_frame; root_icon.origin.x += layout->content_layer_origin.x; root_icon.origin.y += layout->content_layer_origin.y; @@ -1296,23 +1291,18 @@ static void prv_hide_current_escape_icon(WeatherAppLayout *layout) { static void prv_draw_current_escape_icon(Layer *layer, GContext *ctx) { WeatherAppLayout *layout = *(WeatherAppLayout **)layer_get_data(layer); - if (!layout || !layout->anim_params.current_root_overlay - || !layout->weather_icon_pdc_sequence) { + if (!layout || !layout->anim_params.current_root_overlay || !layout->weather_icon_pdc_sequence) { return; } GRect bounds = layer_get_bounds(layer); prv_draw_weather_background(&bounds, ctx, - weather_type_disc_color(layout->anim_params.incoming_weather_type)); + weather_type_disc_color(layout->anim_params.incoming_weather_type)); GSize icon_size = layout->today_icon_rest_frame.size; GRect icon_rect = { - GPoint((bounds.size.w - icon_size.w) / 2, - (bounds.size.h - icon_size.h) / 2), - icon_size + GPoint((bounds.size.w - icon_size.w) / 2, (bounds.size.h - icon_size.h) / 2), icon_size }; - prv_draw_weather_pdc_frame(layout, ctx, - layout->anim_params.incoming_weather_type, - icon_rect); + prv_draw_weather_pdc_frame(layout, ctx, layout->anim_params.incoming_weather_type, icon_rect); } static bool prv_weather_pdc_paused(const WeatherAppLayout *layout) { @@ -1320,7 +1310,8 @@ static bool prv_weather_pdc_paused(const WeatherAppLayout *layout) { } static void prv_draw_current_weather_pdc(const WeatherAppLayout *layout, GContext *ctx) { - if (prv_weather_pdc_paused(layout)) return; + if (prv_weather_pdc_paused(layout)) + return; prv_draw_weather_pdc_frame(layout, ctx, layout->forecast->current_weather_type, layout->today_icon_rest_frame); } @@ -1332,8 +1323,7 @@ static void prv_set_current_weather_pdc(WeatherAppLayout *layout, } #endif -static void prv_draw_weather_icon_backgrounds(const WeatherAppLayout *layout, - GContext *context) { +static void prv_draw_weather_icon_backgrounds(const WeatherAppLayout *layout, GContext *context) { bool animating = !layer_get_hidden(layout->outgoing_weather_icon_layer); if (animating) { @@ -1347,7 +1337,7 @@ static void prv_draw_weather_icon_backgrounds(const WeatherAppLayout *layout, // classic page; the grey dots through the art's gaps for the last few // frames are the lesser evil on the furnished one). const GRect f = layer_get_frame(layout->outgoing_weather_icon_layer); - const int w = f.size.w; // 50 -> 25 (moook rebound: 26) + const int w = f.size.w; // 50 -> 25 (moook rebound: 26) const GPoint c = GPoint(f.origin.x + w / 2, f.origin.y + f.size.h / 2); // Disc/icon ratio falls linearly RATIO -> 0 over w = -> W0, // hard 0 below (zero-at-W0 also clamps the moook rebound's undershoot to @@ -1361,13 +1351,13 @@ static void prv_draw_weather_icon_backgrounds(const WeatherAppLayout *layout, #else const int w0 = WEATHER_APP_LAYOUT_DISC_COLLAPSE_W0; const int wrest = s_today_icon_size.w; - const int diam = (w > w0 && wrest > w0) - ? (WEATHER_APP_LAYOUT_DISC_RATIO_NUM * w * (w - w0) / (100 * (wrest - w0))) - : 0; + const int diam = + (w > w0 && wrest > w0) + ? (WEATHER_APP_LAYOUT_DISC_RATIO_NUM * w * (w - w0) / (100 * (wrest - w0))) + : 0; #endif - const GColor bg = - weather_type_disc_color(layout->anim_params.outgoing_weather_type); - if (diam >= 4 && !gcolor_equal(bg, GColorClear)) { // skip sub-dot residue + const GColor bg = weather_type_disc_color(layout->anim_params.outgoing_weather_type); + if (diam >= 4 && !gcolor_equal(bg, GColorClear)) { // skip sub-dot residue graphics_context_set_fill_color(context, bg); graphics_fill_circle(context, c, (uint16_t)(diam / 2)); } @@ -1379,21 +1369,20 @@ static void prv_draw_weather_icon_backgrounds(const WeatherAppLayout *layout, { const GRect gf = layer_get_frame(layout->outgoing_weather_icon_layer); const int gd = prv_round_scaler_disc(gf.size.w); - graphics_context_set_fill_color(context, - weather_type_get_bg_color(layout->anim_params.outgoing_weather_type)); + graphics_context_set_fill_color( + context, weather_type_get_bg_color(layout->anim_params.outgoing_weather_type)); graphics_fill_circle(context, GPoint(gf.origin.x + gf.size.w / 2, gf.origin.y + gf.size.h / 2), (uint16_t)(gd / 2)); } #else - prv_draw_circle_at_layer(layout->outgoing_weather_icon_layer, - context, layout->anim_params.outgoing_weather_type); + prv_draw_circle_at_layer(layout->outgoing_weather_icon_layer, context, + layout->anim_params.outgoing_weather_type); #endif } #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS if (layout->text_anim.active && !layout->outgoing_weather_icon) { - prv_draw_weather_pdc_frame(layout, context, - layout->anim_params.outgoing_weather_type, + prv_draw_weather_pdc_frame(layout, context, layout->anim_params.outgoing_weather_type, layer_get_frame(layout->outgoing_weather_icon_layer)); } #endif @@ -1402,14 +1391,13 @@ static void prv_draw_weather_icon_backgrounds(const WeatherAppLayout *layout, #else { #endif - prv_draw_circle_at_layer(bitmap_layer_get_layer(layout->current_weather_icon_layer), - context, layout->anim_params.incoming_weather_type); + prv_draw_circle_at_layer(bitmap_layer_get_layer(layout->current_weather_icon_layer), context, + layout->anim_params.incoming_weather_type); #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS if (layout->text_anim.active && layout->text_anim.progress > 0) { - prv_draw_weather_pdc_frame(layout, context, - layout->anim_params.incoming_weather_type, - layer_get_frame(bitmap_layer_get_layer( - layout->current_weather_icon_layer))); + prv_draw_weather_pdc_frame( + layout, context, layout->anim_params.incoming_weather_type, + layer_get_frame(bitmap_layer_get_layer(layout->current_weather_icon_layer))); } #endif } @@ -1426,12 +1414,12 @@ static void prv_draw_weather_icon_backgrounds(const WeatherAppLayout *layout, // would bite a white gap out of it (the same reason the resting disc is bare). if (layout->anim_params.tomorrow_reparented || layout->anim_params.tomorrow_incoming) { const GRect fr = layer_get_frame(bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer)); - graphics_context_set_fill_color(context, - weather_type_get_bg_color(layout->anim_params.tomorrow_exit_weather_type)); + graphics_context_set_fill_color( + context, weather_type_get_bg_color(layout->anim_params.tomorrow_exit_weather_type)); graphics_fill_circle(context, - GPoint(fr.origin.x - layout->content_layer_origin.x + fr.size.w / 2, - fr.origin.y - layout->content_layer_origin.y + fr.size.h / 2), - WEATHER_APP_LAYOUT_ROUND_FOOT_DISC / 2); + GPoint(fr.origin.x - layout->content_layer_origin.x + fr.size.w / 2, + fr.origin.y - layout->content_layer_origin.y + fr.size.h / 2), + WEATHER_APP_LAYOUT_ROUND_FOOT_DISC / 2); } #endif // Rect: the 25px footer bitmap flies BARE — no disc AND no halo (the old @@ -1439,8 +1427,8 @@ static void prv_draw_weather_icon_backgrounds(const WeatherAppLayout *layout, } else { if (layout->forecast) { - prv_draw_circle_at_layer(bitmap_layer_get_layer(layout->current_weather_icon_layer), - context, layout->forecast->current_weather_type); + prv_draw_circle_at_layer(bitmap_layer_get_layer(layout->current_weather_icon_layer), context, + layout->forecast->current_weather_type); // Glow ring removed on this screen — just the plain background disc behind the icon. #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS prv_draw_current_weather_pdc(layout, context); @@ -1457,8 +1445,8 @@ static void prv_draw_weather_icon_backgrounds(const WeatherAppLayout *layout, // dotted rule and bit a white gap out of it. The footer disc is a plain // filled circle -- nothing above it needs erasing. GRect fi = layer_get_frame(bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer)); - graphics_context_set_fill_color(context, - weather_type_get_bg_color(layout->next_forecast->current_weather_type)); + graphics_context_set_fill_color( + context, weather_type_get_bg_color(layout->next_forecast->current_weather_type)); graphics_fill_circle(context, GPoint(fi.origin.x + fi.size.w / 2, fi.origin.y + fi.size.h / 2), WEATHER_APP_LAYOUT_ROUND_FOOT_DISC / 2); @@ -1490,7 +1478,7 @@ static void prv_render_layout(Layer *layer, GContext *context) { bool dir_down = layout->text_anim.dir_down; int out_dy = prv_interpolate_text_moook(p, 0, dir_down ? -full_h : full_h); - int in_dy = prv_interpolate_text_moook(p, dir_down ? full_h : -full_h, 0); + int in_dy = prv_interpolate_text_moook(p, dir_down ? full_h : -full_h, 0); // ---- TOP HALF (region 0 → separator_y) ---- // Fill white first so it acts as a clip: any text drawn outside is invisible. @@ -1503,20 +1491,20 @@ static void prv_render_layout(Layer *layer, GContext *context) { // ---- BOTTOM HALF (region separator_y → full_h) ---- graphics_context_set_fill_color(context, GColorWhite); - graphics_fill_rect(context, GRect(0, separator_y, bounds.size.w, full_h - separator_y), - 0, GCornerNone); + graphics_fill_rect(context, GRect(0, separator_y, bounds.size.w, full_h - separator_y), 0, + GCornerNone); { // Clip the bottom-half passes to below the separator: during the moook bounce the // incoming/outgoing text overshoots above it, and the un-clipped bleed used to be // erased by re-drawing the entire top half a second time — twice the text-layout // work per frame on the hold-scroll hot path. GDrawState saved = context->draw_state; - const int16_t sep_abs_y = - (int16_t)(context->draw_state.drawing_box.origin.y + separator_y); + const int16_t sep_abs_y = (int16_t)(context->draw_state.drawing_box.origin.y + separator_y); GRect below = context->draw_state.clip_box; if (below.origin.y < sep_abs_y) { below.size.h = (int16_t)(below.size.h - (sep_abs_y - below.origin.y)); - if (below.size.h < 0) below.size.h = 0; + if (below.size.h < 0) + below.size.h = 0; below.origin.y = sep_abs_y; } context->draw_state.clip_box = below; @@ -1563,12 +1551,12 @@ static void prv_render_layout(Layer *layer, GContext *context) { const int divider_dot_y = separator_y - 1 - 3 - PBL_IF_ROUND_ELSE(3, 0); const int dot_w = 2; const int dot_h = 2; - const int pitch = 4; // dot + gap, IDENTICAL for every one of the 45 dots + const int pitch = 4; // dot + gap, IDENTICAL for every one of the 45 dots const int total_span = 44 * pitch + dot_w; const int start_x = (bounds.size.w - total_span) / 2; for (int i = 0; i < 45; i++) { - graphics_fill_rect(context, GRect(start_x + i * pitch, divider_dot_y, dot_w, dot_h), - 0, GCornerNone); + graphics_fill_rect(context, GRect(start_x + i * pitch, divider_dot_y, dot_w, dot_h), 0, + GCornerNone); } prv_draw_weather_icon_backgrounds(layout, context); @@ -1578,7 +1566,7 @@ static void prv_render_layout(Layer *layer, GContext *context) { // mirrors the fin's exactly (prv_fin_* draws only when !next_forecast), so // stepping onto the final day swaps the chevron out for the fin. if (layout->next_forecast) { - const int chin_x = -layout->content_layer_origin.x; // content coords -> screen 0 + const int chin_x = -layout->content_layer_origin.x; // content coords -> screen 0 graphics_context_set_fill_color(context, GColorLightGray); graphics_fill_rect(context, GRect(chin_x, WEATHER_APP_LAYOUT_ROUND_CHIN_Y, PBL_DISPLAY_WIDTH, @@ -1590,11 +1578,11 @@ static void prv_render_layout(Layer *layer, GContext *context) { const int cx = PBL_DISPLAY_WIDTH / 2 + chin_x; for (int i = 0; i < WEATHER_APP_LAYOUT_ROUND_CHEV_H; i++) { const int half = WEATHER_APP_LAYOUT_ROUND_CHEV_W / 2 - i; - if (half < 0) break; + if (half < 0) + break; graphics_fill_rect(context, - GRect(cx - half, WEATHER_APP_LAYOUT_ROUND_CHEV_Y + i, - 2 * half + 1, 1), - 0, GCornerNone); + GRect(cx - half, WEATHER_APP_LAYOUT_ROUND_CHEV_Y + i, 2 * half + 1, 1), 0, + GCornerNone); } } #endif @@ -1602,21 +1590,18 @@ static void prv_render_layout(Layer *layer, GContext *context) { // ---- Arc animation ---- -static GRect prv_icon_frame_at_angle(GPoint circle_center, int32_t radius, - int32_t angle, GSize icon_size) { +static GRect prv_icon_frame_at_angle(GPoint circle_center, int32_t radius, int32_t angle, + GSize icon_size) { // Pebble trig: 0=up (12 o'clock), increases clockwise. // x = cx + sin(angle)*r, y = cy - cos(angle)*r - int16_t cx = circle_center.x + - (int16_t)((int32_t)sin_lookup(angle) * radius / TRIG_MAX_RATIO); - int16_t cy = circle_center.y - - (int16_t)((int32_t)cos_lookup(angle) * radius / TRIG_MAX_RATIO); + int16_t cx = circle_center.x + (int16_t)((int32_t)sin_lookup(angle) * radius / TRIG_MAX_RATIO); + int16_t cy = circle_center.y - (int16_t)((int32_t)cos_lookup(angle) * radius / TRIG_MAX_RATIO); return (GRect){ - .origin = GPoint(cx - icon_size.w / 2, cy - icon_size.h / 2), - .size = icon_size, + .origin = GPoint(cx - icon_size.w / 2, cy - icon_size.h / 2), + .size = icon_size, }; } - // Lerp between two rects: centres and sizes interpolate together (p in 0..MAX). static GRect prv_lerp_rect_center(GRect a, GRect b, int32_t p) { const int16_t a_cx = (int16_t)(a.origin.x + a.size.w / 2); @@ -1625,28 +1610,28 @@ static GRect prv_lerp_rect_center(GRect a, GRect b, int32_t p) { const int16_t b_cy = (int16_t)(b.origin.y + b.size.h / 2); const int16_t cx = a_cx + (int16_t)((int32_t)(b_cx - a_cx) * p / ANIMATION_NORMALIZED_MAX); const int16_t cy = a_cy + (int16_t)((int32_t)(b_cy - a_cy) * p / ANIMATION_NORMALIZED_MAX); - const int16_t sw = (int16_t)((int32_t)a.size.w + - (int32_t)(b.size.w - a.size.w) * p / ANIMATION_NORMALIZED_MAX); - const int16_t sh = (int16_t)((int32_t)a.size.h + - (int32_t)(b.size.h - a.size.h) * p / ANIMATION_NORMALIZED_MAX); - return (GRect){ .origin = GPoint(cx - sw / 2, cy - sh / 2), .size = GSize(sw, sh) }; + const int16_t sw = + (int16_t)((int32_t)a.size.w + (int32_t)(b.size.w - a.size.w) * p / ANIMATION_NORMALIZED_MAX); + const int16_t sh = + (int16_t)((int32_t)a.size.h + (int32_t)(b.size.h - a.size.h) * p / ANIMATION_NORMALIZED_MAX); + return (GRect){.origin = GPoint(cx - sw / 2, cy - sh / 2), .size = GSize(sw, sh)}; } // Lerp only the origin between two equal-size rects. static GRect prv_lerp_rect_origin(GRect from, GRect to, int32_t p, GSize sz) { int16_t x = from.origin.x + - (int16_t)((int32_t)(to.origin.x - from.origin.x) * p / ANIMATION_NORMALIZED_MAX); + (int16_t)((int32_t)(to.origin.x - from.origin.x) * p / ANIMATION_NORMALIZED_MAX); int16_t y = from.origin.y + - (int16_t)((int32_t)(to.origin.y - from.origin.y) * p / ANIMATION_NORMALIZED_MAX); - return (GRect){ GPoint(x, y), sz }; + (int16_t)((int32_t)(to.origin.y - from.origin.y) * p / ANIMATION_NORMALIZED_MAX); + return (GRect){GPoint(x, y), sz}; } // The tomorrow rest frame translated into root-layer coordinates. static GRect prv_tomorrow_rest_root(const WeatherAppLayout *layout) { return (GRect){ - GPoint(layout->content_layer_origin.x + layout->tomorrow_icon_rest_frame.origin.x, - layout->content_layer_origin.y + layout->tomorrow_icon_rest_frame.origin.y), - layout->tomorrow_icon_rest_frame.size + GPoint(layout->content_layer_origin.x + layout->tomorrow_icon_rest_frame.origin.x, + layout->content_layer_origin.y + layout->tomorrow_icon_rest_frame.origin.y), + layout->tomorrow_icon_rest_frame.size }; } @@ -1654,11 +1639,11 @@ static void prv_apply_day_transition_progress(WeatherAppLayout *layout, AnimationProgress progress) { layout->text_anim.progress = progress; const int32_t motion_p = layout->anim_params.animate_down - ? prv_interpolate_icon_landing_progress_down(progress) - : prv_interpolate_icon_landing_progress(progress); + ? prv_interpolate_icon_landing_progress_down(progress) + : prv_interpolate_icon_landing_progress(progress); - GPoint cc = layout->anim_params.circle_center; - int32_t r = layout->anim_params.radius; + GPoint cc = layout->anim_params.circle_center; + int32_t r = layout->anim_params.radius; GSize today_sz = layout->today_icon_rest_frame.size; GRect in_frame; @@ -1671,14 +1656,14 @@ static void prv_apply_day_transition_progress(WeatherAppLayout *layout, // Incoming (scaler): straight-line from tomorrow_rest → today_rest while scaling up. // This is the exact reverse of UP’s outgoing shrink path — same motion, opposite direction. - in_frame = prv_lerp_rect_center(layout->tomorrow_icon_rest_frame, - layout->today_icon_rest_frame, motion_p); + in_frame = prv_lerp_rect_center(layout->tomorrow_icon_rest_frame, layout->today_icon_rest_frame, + motion_p); // Outgoing (BitmapLayer, old today): sweeps CW along arc at full size and exits. int32_t out_angle = layout->anim_params.outgoing_start_angle + - weather_scale_i32(layout->anim_params.outgoing_end_angle - - layout->anim_params.outgoing_start_angle, - motion_p, ANIMATION_NORMALIZED_MAX); + weather_scale_i32(layout->anim_params.outgoing_end_angle - + layout->anim_params.outgoing_start_angle, + motion_p, ANIMATION_NORMALIZED_MAX); out_frame = prv_icon_frame_at_angle(cc, r, out_angle, today_sz); // Roles swapped: scaler gets in_frame, BitmapLayer gets out_frame. @@ -1693,22 +1678,20 @@ static void prv_apply_day_transition_progress(WeatherAppLayout *layout, // Animate new tomorrow icon in from off-screen arc position → tomorrow rest slot. if (layout->anim_params.tomorrow_incoming) { GSize tmr_sz2 = layout->tomorrow_icon_rest_frame.size; - GPoint cc_root = GPoint( - layout->anim_params.circle_center.x + layout->content_layer_origin.x, - layout->anim_params.circle_center.y + layout->content_layer_origin.y); - GRect tmr_arc_start = prv_icon_frame_at_angle(cc_root, layout->anim_params.radius, - layout->anim_params.incoming_start_angle, - tmr_sz2); - layer_set_frame(bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer), - prv_lerp_rect_origin(tmr_arc_start, prv_tomorrow_rest_root(layout), - motion_p, tmr_sz2)); + GPoint cc_root = GPoint(layout->anim_params.circle_center.x + layout->content_layer_origin.x, + layout->anim_params.circle_center.y + layout->content_layer_origin.y); + GRect tmr_arc_start = prv_icon_frame_at_angle( + cc_root, layout->anim_params.radius, layout->anim_params.incoming_start_angle, tmr_sz2); + layer_set_frame( + bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer), + prv_lerp_rect_origin(tmr_arc_start, prv_tomorrow_rest_root(layout), motion_p, tmr_sz2)); } } else { // UP: incoming (previous day) arrives full-size along arc, no scaling - int32_t in_angle = layout->anim_params.incoming_start_angle + - weather_scale_i32(ICON_ARC_TODAY_REST - - layout->anim_params.incoming_start_angle, - motion_p, ANIMATION_NORMALIZED_MAX); + int32_t in_angle = + layout->anim_params.incoming_start_angle + + weather_scale_i32(ICON_ARC_TODAY_REST - layout->anim_params.incoming_start_angle, motion_p, + ANIMATION_NORMALIZED_MAX); in_frame = prv_icon_frame_at_angle(cc, r, in_angle, today_sz); // Outgoing (old today) shrinks and slides straight to tomorrow slot @@ -1727,31 +1710,30 @@ static void prv_apply_day_transition_progress(WeatherAppLayout *layout, // outgoing today icon — faster exit so it clears the screen early. if (layout->anim_params.tomorrow_reparented) { GSize tmr_sz2 = layout->tomorrow_icon_rest_frame.size; - GPoint cc_root = GPoint( - layout->anim_params.circle_center.x + layout->content_layer_origin.x, - layout->anim_params.circle_center.y + layout->content_layer_origin.y); + GPoint cc_root = GPoint(layout->anim_params.circle_center.x + layout->content_layer_origin.x, + layout->anim_params.circle_center.y + layout->content_layer_origin.y); GRect tmr_end = prv_icon_frame_at_angle(cc_root, layout->anim_params.radius, - layout->anim_params.outgoing_end_angle, tmr_sz2); + layout->anim_params.outgoing_end_angle, tmr_sz2); // Faster exit: accelerate so it's off-screen well before animation ends. int32_t fast_p = motion_p * 5 / 3; - if (fast_p > ANIMATION_NORMALIZED_MAX) fast_p = ANIMATION_NORMALIZED_MAX; + if (fast_p > ANIMATION_NORMALIZED_MAX) + fast_p = ANIMATION_NORMALIZED_MAX; - layer_set_frame(bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer), - prv_lerp_rect_origin(prv_tomorrow_rest_root(layout), tmr_end, - fast_p, tmr_sz2)); + layer_set_frame( + bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer), + prv_lerp_rect_origin(prv_tomorrow_rest_root(layout), tmr_end, fast_p, tmr_sz2)); } } layer_mark_dirty(layout->root_layer); } - // Destroy *slot, load the day/tiny icon for f (NULL f -> no bitmap), point bl at it. // Unconditional: on round the CURRENT icon goes through the PDC path, but the // tomorrow icon is still a bitmap and reloads through here. -static void prv_reload_icon(GBitmap **slot, BitmapLayer *bl, - const WeatherLocationForecast *f, bool tiny) { +static void prv_reload_icon(GBitmap **slot, BitmapLayer *bl, const WeatherLocationForecast *f, + bool tiny) { if (*slot) { gbitmap_destroy(*slot); *slot = NULL; @@ -1817,7 +1799,7 @@ static void prv_icon_anim_stopped(Animation *anim, bool finished, void *context) } } // Restore the static tomorrow icon - if (!WEATHER_APP_LAYOUT_RECT_SMALL) { // small rect: footer is text-only + if (!WEATHER_APP_LAYOUT_RECT_SMALL) { // small rect: footer is text-only layer_set_hidden(bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer), false); } #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS @@ -1832,7 +1814,7 @@ static void prv_icon_anim_stopped(Animation *anim, bool finished, void *context) } static const AnimationImplementation s_icon_anim_impl = { - .update = prv_icon_anim_update, + .update = prv_icon_anim_update, }; // ---- Right-swipe list transition animation ---- @@ -1841,10 +1823,8 @@ static const AnimationImplementation s_icon_anim_impl = { // Rows 0 and 1 positions match forecast_list.c's draw formula exactly so // the instant window-push is invisible. -#define LIST_ROWS_VISIBLE 4 -#define LIST_ICON_X 8 - - +#define LIST_ROWS_VISIBLE 4 +#define LIST_ICON_X 8 // Shared boilerplate: create + duration + linear curve + impl + stopped(ctx) + schedule. static Animation *prv_start_anim(uint32_t dur_ms, const AnimationImplementation *impl, @@ -1853,7 +1833,7 @@ static Animation *prv_start_anim(uint32_t dur_ms, const AnimationImplementation animation_set_duration(a, dur_ms); animation_set_curve(a, AnimationCurveLinear); animation_set_implementation(a, impl); - animation_set_handlers(a, (AnimationHandlers){ .stopped = stopped }, ctx); + animation_set_handlers(a, (AnimationHandlers){.stopped = stopped}, ctx); animation_schedule(a); return a; } @@ -1861,7 +1841,8 @@ static Animation *prv_start_anim(uint32_t dur_ms, const AnimationImplementation // Move the Timeline Fin marker from the next scroll slot into its resting spot, // matching Timeline's single frame animation rather than a delayed two-phase slide. static void prv_animate_fin_in(WeatherAppLayout *layout, uint32_t total_ms) { - if (!layout->fin_layer || !layout->fin_pdc) return; + if (!layout->fin_layer || !layout->fin_pdc) + return; if (layout->fin_animation) { animation_unschedule(layout->fin_animation); layout->fin_animation = NULL; @@ -1871,12 +1852,12 @@ static void prv_animate_fin_in(WeatherAppLayout *layout, uint32_t total_ms) { GRect cl = layer_get_frame(layout->content_layer); GSize fin_size = gdraw_command_image_get_bounds_size(layout->fin_pdc); GRect to = (GRect){ - GPoint(cl.origin.x + (cl.size.w - fin_size.w) / 2, - // Rect: rest in the footer zone — the PDC's ink (rows 12..32 of its - // 50px box) vertically centred between the y195 divider and the - // screen bottom; round keeps the classic centred rest. - cl.origin.y + cl.size.h - fin_size.h + PBL_IF_RECT_ELSE(11, -16)), - fin_size + GPoint(cl.origin.x + (cl.size.w - fin_size.w) / 2, + // Rect: rest in the footer zone — the PDC's ink (rows 12..32 of its + // 50px box) vertically centred between the y195 divider and the + // screen bottom; round keeps the classic centred rest. + cl.origin.y + cl.size.h - fin_size.h + PBL_IF_RECT_ELSE(11, -16)), + fin_size }; GRect from = to; from.origin.y += cl.size.h / 3; @@ -1886,40 +1867,43 @@ static void prv_animate_fin_in(WeatherAppLayout *layout, uint32_t total_ms) { layer_set_frame(fin, from); layer_set_hidden(fin, false); - layout->fin_animation = prv_start_anim(total_ms, &s_fin_anim_impl, - prv_fin_anim_stopped, layout); + layout->fin_animation = prv_start_anim(total_ms, &s_fin_anim_impl, prv_fin_anim_stopped, layout); } // Per-pixel scaler for the outgoing icon, identical technique to the map app's zoom path. // Walks the parent-layer chain to find screen-absolute coords, then captures the framebuffer // and writes scaled pixels directly — the only way to truly scale a bitmap on Pebble. static void prv_draw_bitmap_scaled_to_root(GContext *ctx, GBitmap *src, GRect root_frame) { - if (!src) return; + if (!src) + return; // Use layer_get_frame for BOTH position and animated size. // layer_get_bounds does not auto-update when layer_set_frame shrinks the layer, // so layer_get_frame is the only reliable source of the current animated size. int dst_w = root_frame.size.w; int dst_h = root_frame.size.h; - if (dst_w <= 0 || dst_h <= 0) return; + if (dst_w <= 0 || dst_h <= 0) + return; GRect src_bounds = gbitmap_get_bounds(src); int src_w = src_bounds.size.w; int src_h = src_bounds.size.h; - if (src_w <= 0 || src_h <= 0) return; + if (src_w <= 0 || src_h <= 0) + return; uint8_t *sdata = gbitmap_get_data(src); - uint16_t sbpr = gbitmap_get_bytes_per_row(src); + uint16_t sbpr = gbitmap_get_bytes_per_row(src); // Pebble tools compile small-colour PNGs as 4-bit or 2-bit palette bitmaps, // not GBitmapFormat8Bit. We must look up each pixel's palette entry to get // the actual GColor8 ARGB byte — otherwise we read raw palette indices and // get garbage colours (including the grey silhouette this bug caused). GBitmapFormat fmt = gbitmap_get_format(src); - GColor *palette = gbitmap_get_palette(src); // NULL for non-palette formats + GColor *palette = gbitmap_get_palette(src); // NULL for non-palette formats GBitmap *fb = graphics_capture_frame_buffer(ctx); - if (!fb) return; + if (!fb) + return; GRect fbb = gbitmap_get_bounds(fb); int fb_w = fbb.size.w; int fb_h = fbb.size.h; @@ -1930,9 +1914,11 @@ static void prv_draw_bitmap_scaled_to_root(GContext *ctx, GBitmap *src, GRect ro int32_t sy_fp = sy_step >> 1; for (int dy = 0; dy < dst_h; dy++, sy_fp += sy_step) { int sy = sy_fp >> 16; - if (sy >= src_h) sy = src_h - 1; + if (sy >= src_h) + sy = src_h - 1; int ay = root_frame.origin.y + dy; - if (ay < 0 || ay >= fb_h) continue; + if (ay < 0 || ay >= fb_h) + continue; uint8_t *srow = sdata + (uint32_t)sy * sbpr; GBitmapDataRowInfo row = gbitmap_get_data_row_info(fb, ay); @@ -1940,10 +1926,13 @@ static void prv_draw_bitmap_scaled_to_root(GContext *ctx, GBitmap *src, GRect ro int32_t sx_fp2 = sx_step >> 1; for (int dx = 0; dx < dst_w; dx++, sx_fp2 += sx_step) { int sx = sx_fp2 >> 16; - if (sx >= src_w) sx = src_w - 1; + if (sx >= src_w) + sx = src_w - 1; int ax = root_frame.origin.x + dx; - if (ax < 0 || ax >= fb_w) continue; - if (ax < row.min_x || ax > row.max_x) continue; + if (ax < 0 || ax >= fb_w) + continue; + if (ax < row.min_x || ax > row.max_x) + continue; uint8_t pixel; if (fmt == GBitmapFormat8Bit || fmt == GBitmapFormat8BitCircular) { @@ -1971,7 +1960,8 @@ static void prv_draw_bitmap_scaled_to_root(GContext *ctx, GBitmap *src, GRect ro } // Top 2 bits are the alpha channel; 0b00 = transparent, skip it - if (pixel >> 6) weather_fb_row_set(row.data, ax, pixel); + if (pixel >> 6) + weather_fb_row_set(row.data, ax, pixel); } } @@ -2000,18 +1990,17 @@ static void prv_draw_outgoing_icon_scaled(Layer *layer, GContext *ctx) { // The FRAME is deliberately left alone: the coloured disc is derived from it // (prv_draw_circle_at_layer), so shrinking the frame would shrink the disc too // and just move the snap from the icon onto the circle. - const int w0 = s_tomorrow_icon_size.w; // 25: art fills the frame - const int w1 = s_today_icon_size.w; // 75: art is ROUND_PDC_ART + const int w0 = s_tomorrow_icon_size.w; // 25: art fills the frame + const int w1 = s_today_icon_size.w; // 75: art is ROUND_PDC_ART int art_w; if (root_frame.size.w <= w0 || w1 <= w0) { art_w = root_frame.size.w; } else if (root_frame.size.w >= w1) { art_w = WEATHER_APP_LAYOUT_ROUND_PDC_ART; } else { - art_w = w0 + (WEATHER_APP_LAYOUT_ROUND_PDC_ART - w0) * - (root_frame.size.w - w0) / (w1 - w0); + art_w = w0 + (WEATHER_APP_LAYOUT_ROUND_PDC_ART - w0) * (root_frame.size.w - w0) / (w1 - w0); } - const int art_h = art_w; // the flip's frames are square (75x75 <-> 25x25) + const int art_h = art_w; // the flip's frames are square (75x75 <-> 25x25) root_frame.origin.x += (root_frame.size.w - art_w) / 2; root_frame.origin.y += (root_frame.size.h - art_h) / 2; root_frame.size = GSize(art_w, art_h); @@ -2021,20 +2010,21 @@ static void prv_draw_outgoing_icon_scaled(Layer *layer, GContext *ctx) { static GRect prv_fin_rest_frame(WeatherAppLayout *layout) { GRect cl = layer_get_frame(layout->content_layer); - GSize fin_size = layout->fin_pdc ? gdraw_command_image_get_bounds_size(layout->fin_pdc) - : GSize(0, 0); + GSize fin_size = + layout->fin_pdc ? gdraw_command_image_get_bounds_size(layout->fin_pdc) : GSize(0, 0); return (GRect){ - GPoint(cl.origin.x + (cl.size.w - fin_size.w) / 2, - // Rect: rest in the footer zone — the PDC's ink (rows 12..32 of its - // 50px box) vertically centred between the y195 divider and the - // screen bottom; round keeps the classic centred rest. - cl.origin.y + cl.size.h - fin_size.h + PBL_IF_RECT_ELSE(11, -16)), - fin_size + GPoint(cl.origin.x + (cl.size.w - fin_size.w) / 2, + // Rect: rest in the footer zone — the PDC's ink (rows 12..32 of its + // 50px box) vertically centred between the y195 divider and the + // screen bottom; round keeps the classic centred rest. + cl.origin.y + cl.size.h - fin_size.h + PBL_IF_RECT_ELSE(11, -16)), + fin_size }; } static void prv_restore_fin_rest(WeatherAppLayout *layout) { - if (!layout->fin_layer || !layout->fin_pdc) return; + if (!layout->fin_layer || !layout->fin_pdc) + return; if (layout->fin_animation) { animation_unschedule(layout->fin_animation); layout->fin_animation = NULL; @@ -2055,24 +2045,21 @@ void weather_app_layout_init(WeatherAppLayout *layout, const GRect *frame) { // Day name: heavier on rect (28_BOLD) to match the reference's chunky caps; // the flow advance is pinned to 24_BOLD in prv_draw_top_rows so the stack // below is undisturbed. Round unchanged (28_BOLD). - layout->location_font = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD); - layout->temperature_font = fonts_get_system_font(FONT_KEY_LECO_36_BOLD_NUMBERS); - layout->high_low_phrase_font = fonts_get_system_font( - PBL_IF_RECT_ELSE(WEATHER_APP_LAYOUT_RECT_SMALL ? FONT_KEY_GOTHIC_18_BOLD - : FONT_KEY_GOTHIC_24_BOLD, - FONT_KEY_GOTHIC_18_BOLD)); - layout->metrics_font = fonts_get_system_font( - FONT_KEY_GOTHIC_14_BOLD); - layout->metrics_value_font = fonts_get_system_font( - FONT_KEY_GOTHIC_18); - layout->tomorrow_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); + layout->location_font = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD); + layout->temperature_font = fonts_get_system_font(FONT_KEY_LECO_36_BOLD_NUMBERS); + layout->high_low_phrase_font = fonts_get_system_font(PBL_IF_RECT_ELSE( + WEATHER_APP_LAYOUT_RECT_SMALL ? FONT_KEY_GOTHIC_18_BOLD : FONT_KEY_GOTHIC_24_BOLD, + FONT_KEY_GOTHIC_18_BOLD)); + layout->metrics_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); + layout->metrics_value_font = fonts_get_system_font(FONT_KEY_GOTHIC_18); + layout->tomorrow_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); #else - layout->location_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); - layout->metrics_value_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); - layout->temperature_font = fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM); + layout->location_font = fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD); + layout->metrics_value_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); + layout->temperature_font = fonts_get_system_font(FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM); layout->high_low_phrase_font = fonts_get_system_font(FONT_KEY_GOTHIC_18); - layout->metrics_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); - layout->tomorrow_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); + layout->metrics_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); + layout->tomorrow_font = fonts_get_system_font(FONT_KEY_GOTHIC_14_BOLD); #endif layout->fin_pdc = NULL; @@ -2100,9 +2087,9 @@ void weather_app_layout_init(WeatherAppLayout *layout, const GRect *frame) { // Taller than the forecast-list bar (MAIN_BAR_HEIGHT vs LOCATION_BAR_HEIGHT) // for better readability on the main screen. layout->city_layer = NULL; - layout->location_bar_layer = NULL; // no bar on either shape -- content owns - // the whole screen (round joined rect - // in the report-page port) + layout->location_bar_layer = NULL; // no bar on either shape -- content owns + // the whole screen (round joined rect + // in the report-page port) // Added to root_layer last (after fin_layer) so it renders on top of everything. // Down-arrow removed — location bar provides sufficient bottom UI. @@ -2111,8 +2098,7 @@ void weather_app_layout_init(WeatherAppLayout *layout, const GRect *frame) { // Content layer fills the root below the location bar. const int content_layer_side_padding = PBL_IF_RECT_ELSE(5, 12); GRect content_layer_frame = grect_inset( - *frame, GEdgeInsets(WEATHER_APP_LAYOUT_MAIN_CONTENT_TOP, - content_layer_side_padding, + *frame, GEdgeInsets(WEATHER_APP_LAYOUT_MAIN_CONTENT_TOP, content_layer_side_padding, -WEATHER_APP_LAYOUT_CONTENT_Y_SHIFT)); content_layer_frame.origin.y += WEATHER_APP_LAYOUT_CONTENT_Y_SHIFT; @@ -2131,30 +2117,30 @@ void weather_app_layout_init(WeatherAppLayout *layout, const GRect *frame) { // Store the screen-absolute origin of the content layer for the per-pixel scaler. // root_layer is at *frame.origin (0,0 for fullscreen), content_layer is inset from that. - layout->content_layer_origin = GPoint( - frame->origin.x + content_layer_frame.origin.x, - frame->origin.y + content_layer_frame.origin.y); + layout->content_layer_origin = GPoint(frame->origin.x + content_layer_frame.origin.x, + frame->origin.y + content_layer_frame.origin.y); - const int content_separator_y = content_layer_frame.size.h * 2 / 3 + - WEATHER_APP_LAYOUT_SEPARATOR_Y_ADJUST; + const int content_separator_y = + content_layer_frame.size.h * 2 / 3 + WEATHER_APP_LAYOUT_SEPARATOR_Y_ADJUST; GRect today_icon_frame = (GRect){ - // Rect: right-railed like the original app — the disc + icon own the right - // side while the text stack flows down the left rail. - .origin = PBL_IF_RECT_ELSE( - // Disc top rides 5px ABOVE the hero temp's cap line (temp ink top 39 - // after the −3 trim, disc top 34 -> icon y 44), right margin 9px — - // calibrated relationship, kept through moves; - // later raised 8px more -> y 36. - GPoint(content_layer_frame.size.w - s_today_icon_size.w - - (WEATHER_APP_LAYOUT_CONTENT_LAYER_HORIZONTAL_INSET + 11), 36), - // Round: 75px PDC layer, right-railed. The 52px accent disc centres on - // this layer -> screen (197.5,69.5); its r=30 halo's furthest point is - // 120.3px from the glass centre, contained with ~10px to spare. - GPoint(content_layer_frame.size.w - s_today_icon_size.w - - WEATHER_APP_LAYOUT_ROUND_TODAY_ICON_X_INSET, - WEATHER_APP_LAYOUT_ROUND_TODAY_ICON_Y)), - .size = s_today_icon_size, + // Rect: right-railed like the original app — the disc + icon own the right + // side while the text stack flows down the left rail. + .origin = PBL_IF_RECT_ELSE( + // Disc top rides 5px ABOVE the hero temp's cap line (temp ink top 39 + // after the −3 trim, disc top 34 -> icon y 44), right margin 9px — + // calibrated relationship, kept through moves; + // later raised 8px more -> y 36. + GPoint(content_layer_frame.size.w - s_today_icon_size.w - + (WEATHER_APP_LAYOUT_CONTENT_LAYER_HORIZONTAL_INSET + 11), + 36), + // Round: 75px PDC layer, right-railed. The 52px accent disc centres on + // this layer -> screen (197.5,69.5); its r=30 halo's furthest point is + // 120.3px from the glass centre, contained with ~10px to spare. + GPoint(content_layer_frame.size.w - s_today_icon_size.w - + WEATHER_APP_LAYOUT_ROUND_TODAY_ICON_X_INSET, + WEATHER_APP_LAYOUT_ROUND_TODAY_ICON_Y)), + .size = s_today_icon_size, }; layout->today_icon_rest_frame = today_icon_frame; layout->current_weather_icon_layer = bitmap_layer_create(today_icon_frame); @@ -2176,18 +2162,18 @@ void weather_app_layout_init(WeatherAppLayout *layout, const GRect *frame) { layer_add_child(layout->content_layer, layout->outgoing_weather_icon_layer); GRect tomorrow_icon_frame = (GRect){ - // Rect: right-railed under the today disc, vertically on the next-day block. - .origin = PBL_IF_RECT_ELSE( - GPoint(content_layer_frame.size.w - s_tomorrow_icon_size.w - - WEATHER_APP_LAYOUT_CONTENT_LAYER_HORIZONTAL_INSET, - content_separator_y + 3), - // Round: the bare 25px footer bitmap. Its BOTTOM-right corner is the - // tightest margin on the page (x213 vs mask max_x 215 at row 228) -- - // check that corner first on any screendump. - GPoint(content_layer_frame.size.w - s_tomorrow_icon_size.w - - WEATHER_APP_LAYOUT_ROUND_TOMORROW_ICON_X_INSET, - content_separator_y + 4)), // disc centre (193,217), r17 -> rows 200..234 - .size = s_tomorrow_icon_size, + // Rect: right-railed under the today disc, vertically on the next-day block. + .origin = PBL_IF_RECT_ELSE( + GPoint(content_layer_frame.size.w - s_tomorrow_icon_size.w - + WEATHER_APP_LAYOUT_CONTENT_LAYER_HORIZONTAL_INSET, + content_separator_y + 3), + // Round: the bare 25px footer bitmap. Its BOTTOM-right corner is the + // tightest margin on the page (x213 vs mask max_x 215 at row 228) -- + // check that corner first on any screendump. + GPoint(content_layer_frame.size.w - s_tomorrow_icon_size.w - + WEATHER_APP_LAYOUT_ROUND_TOMORROW_ICON_X_INSET, + content_separator_y + 4)), // disc centre (193,217), r17 -> rows 200..234 + .size = s_tomorrow_icon_size, }; layout->tomorrow_icon_rest_frame = tomorrow_icon_frame; layout->tomorrow_weather_icon_layer = bitmap_layer_create(tomorrow_icon_frame); @@ -2208,8 +2194,7 @@ void weather_app_layout_init(WeatherAppLayout *layout, const GRect *frame) { // same clone-into-RAM pattern for its writable sequence.) GDrawCommandSequence *pdc_raw = gdraw_command_sequence_create_with_resource(RESOURCE_ID_WEATHER_ICONS_PDC); - layout->weather_icon_pdc_sequence = - pdc_raw ? gdraw_command_sequence_clone(pdc_raw) : NULL; + layout->weather_icon_pdc_sequence = pdc_raw ? gdraw_command_sequence_clone(pdc_raw) : NULL; if (pdc_raw) { gdraw_command_sequence_destroy(pdc_raw); // munmaps the read-only flash mapping } @@ -2218,25 +2203,23 @@ void weather_app_layout_init(WeatherAppLayout *layout, const GRect *frame) { // ROUND_PDC_INSET to keep it centred (see prv_draw_weather_pdc_frame). if (layout->weather_icon_pdc_sequence && WEATHER_APP_LAYOUT_ROUND_PDC_ART != WEATHER_APP_LAYOUT_ROUND_PDC_NATIVE) { - const int nframes = - gdraw_command_sequence_get_num_frames(layout->weather_icon_pdc_sequence); + const int nframes = gdraw_command_sequence_get_num_frames(layout->weather_icon_pdc_sequence); for (int i = 0; i < nframes; i++) { GDrawCommandFrame *f = gdraw_command_sequence_get_frame_by_index(layout->weather_icon_pdc_sequence, i); - if (!f) continue; - gdraw_command_list_scale(gdraw_command_frame_get_command_list(f), - GSize(WEATHER_APP_LAYOUT_ROUND_PDC_NATIVE, - WEATHER_APP_LAYOUT_ROUND_PDC_NATIVE), - GSize(WEATHER_APP_LAYOUT_ROUND_PDC_ART, - WEATHER_APP_LAYOUT_ROUND_PDC_ART)); + if (!f) + continue; + gdraw_command_list_scale( + gdraw_command_frame_get_command_list(f), + GSize(WEATHER_APP_LAYOUT_ROUND_PDC_NATIVE, WEATHER_APP_LAYOUT_ROUND_PDC_NATIVE), + GSize(WEATHER_APP_LAYOUT_ROUND_PDC_ART, WEATHER_APP_LAYOUT_ROUND_PDC_ART)); } } layout->current_weather_escape_layer = layer_create_with_data(GRect(0, 0, 1, 1), sizeof(WeatherAppLayout *)); if (layout->current_weather_escape_layer) { *(WeatherAppLayout **)layer_get_data(layout->current_weather_escape_layer) = layout; - layer_set_update_proc(layout->current_weather_escape_layer, - prv_draw_current_escape_icon); + layer_set_update_proc(layout->current_weather_escape_layer, prv_draw_current_escape_icon); layer_set_hidden(layout->current_weather_escape_layer, true); layer_add_child(layout->root_layer, layout->current_weather_escape_layer); } @@ -2244,8 +2227,8 @@ void weather_app_layout_init(WeatherAppLayout *layout, const GRect *frame) { // Timeline Fin marker: child of root_layer so it can animate like the system timeline. if (layout->fin_pdc) { - GRect fin_offscreen = (GRect){GPoint(0, frame->size.h), - gdraw_command_image_get_bounds_size(layout->fin_pdc)}; + GRect fin_offscreen = + (GRect){GPoint(0, frame->size.h), gdraw_command_image_get_bounds_size(layout->fin_pdc)}; layout->fin_layer = layer_create_with_data(fin_offscreen, sizeof(WeatherAppLayout *)); *(WeatherAppLayout **)layer_get_data(layout->fin_layer) = layout; layer_set_update_proc(layout->fin_layer, prv_draw_fin_layer); @@ -2301,9 +2284,9 @@ void weather_app_layout_set_data(WeatherAppLayout *layout, layer_mark_dirty(layout->root_layer); } -void weather_app_layout_set_fin_allowed(WeatherAppLayout *layout, - bool fin_allowed) { - if (!layout) return; +void weather_app_layout_set_fin_allowed(WeatherAppLayout *layout, bool fin_allowed) { + if (!layout) + return; layout->fin_allowed = fin_allowed; prv_restore_fin_rest(layout); } @@ -2336,30 +2319,35 @@ void weather_app_layout_deinit(WeatherAppLayout *layout) { layer_destroy(layout->current_weather_escape_layer); } #endif - if (layout->fin_pdc) gdraw_command_image_destroy(layout->fin_pdc); - if (layout->fin_layer) layer_destroy(layout->fin_layer); - if (layout->city_layer) layer_destroy(layout->city_layer); + if (layout->fin_pdc) + gdraw_command_image_destroy(layout->fin_pdc); + if (layout->fin_layer) + layer_destroy(layout->fin_layer); + if (layout->city_layer) + layer_destroy(layout->city_layer); bitmap_layer_destroy(layout->current_weather_icon_layer); layer_destroy(layout->outgoing_weather_icon_layer); bitmap_layer_destroy(layout->tomorrow_weather_icon_layer); - if (layout->location_bar_layer) layer_destroy(layout->location_bar_layer); + if (layout->location_bar_layer) + layer_destroy(layout->location_bar_layer); layer_destroy(layout->content_layer); layer_destroy(layout->root_layer); } void weather_app_layout_set_location(WeatherAppLayout *layout, const char *name) { - if (!name) return; + if (!name) + return; strncpy(layout->location_name, name, sizeof(layout->location_name) - 1); layout->location_name[sizeof(layout->location_name) - 1] = '\0'; #if PBL_ROUND - if (layout->city_layer) layer_mark_dirty(layout->city_layer); + if (layout->city_layer) + layer_mark_dirty(layout->city_layer); #endif } static bool prv_prepare_day_transition(WeatherAppLayout *layout, const WeatherLocationForecast *new_today, - const WeatherLocationForecast *new_next, - bool animate_down) { + const WeatherLocationForecast *new_next, bool animate_down) { // Cancel any running animation if (layout->icon_animation) { Animation *old = layout->icon_animation; @@ -2375,7 +2363,7 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, } animation_unschedule(old); layer_set_hidden(layout->outgoing_weather_icon_layer, true); - if (!WEATHER_APP_LAYOUT_RECT_SMALL) { // small rect: footer is text-only + if (!WEATHER_APP_LAYOUT_RECT_SMALL) { // small rect: footer is text-only layer_set_hidden(bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer), false); } layer_set_frame(bitmap_layer_get_layer(layout->current_weather_icon_layer), @@ -2412,8 +2400,10 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, // For DOWN (entering next day), use new_next (the day that will become tomorrow). // For UP (returning), use the current tomorrow that's about to exit. layout->anim_params.tomorrow_exit_weather_type = - (animate_down && new_next) ? new_next->current_weather_type : - (layout->next_forecast ? layout->next_forecast->current_weather_type : WeatherType_Unknown); + (animate_down && new_next) + ? new_next->current_weather_type + : (layout->next_forecast ? layout->next_forecast->current_weather_type + : WeatherType_Unknown); // ---- Layer bitmap setup ---- #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS @@ -2423,24 +2413,28 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, // DOWN: scaler layer (outgoing_weather_icon_layer) = INCOMING tiny icon that scales up. // BitmapLayer (current_weather_icon_layer) = OUTGOING old today at full size. // Load the tiny resource of new_today into the scaler; start it at the tomorrow slot. - if (layout->outgoing_weather_icon) gbitmap_destroy(layout->outgoing_weather_icon); + if (layout->outgoing_weather_icon) + gbitmap_destroy(layout->outgoing_weather_icon); #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS bitmap_layer_set_bitmap(layout->current_weather_icon_layer, NULL); #endif - layout->outgoing_weather_icon = new_today ? - gbitmap_create_with_resource( - weather_type_get_icon_res_today(new_today->current_weather_type)) : NULL; + layout->outgoing_weather_icon = + new_today ? gbitmap_create_with_resource( + weather_type_get_icon_res_today(new_today->current_weather_type)) + : NULL; // Frame set to arc start position below, after circle_center is computed. layer_set_hidden(layout->outgoing_weather_icon_layer, false); // current_weather_icon_layer already holds the old today bitmap — keep it as-is. } else { // UP: scaler layer = OUTGOING old today (shrinks + slides to tomorrow slot). // BitmapLayer = INCOMING new today (previous day, full size, sweeps along arc). - if (layout->outgoing_weather_icon) gbitmap_destroy(layout->outgoing_weather_icon); + if (layout->outgoing_weather_icon) + gbitmap_destroy(layout->outgoing_weather_icon); #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS - layout->outgoing_weather_icon = layout->forecast ? - gbitmap_create_with_resource( - weather_type_get_icon_res_today(layout->forecast->current_weather_type)) : NULL; + layout->outgoing_weather_icon = + layout->forecast ? gbitmap_create_with_resource(weather_type_get_icon_res_today( + layout->forecast->current_weather_type)) + : NULL; #else layout->outgoing_weather_icon = layout->current_weather_icon; layout->current_weather_icon = NULL; @@ -2455,8 +2449,8 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS bitmap_layer_set_bitmap(layout->current_weather_icon_layer, NULL); #else - prv_reload_icon(&layout->current_weather_icon, layout->current_weather_icon_layer, - new_today, false); + prv_reload_icon(&layout->current_weather_icon, layout->current_weather_icon_layer, new_today, + false); #endif } @@ -2468,9 +2462,9 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, if (!WEATHER_APP_LAYOUT_RECT_SMALL && !animate_down && layout->next_forecast) { Layer *tmr = bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer); GRect tmr_root = (GRect){ - GPoint(layout->content_layer_origin.x + layout->tomorrow_icon_rest_frame.origin.x, - layout->content_layer_origin.y + layout->tomorrow_icon_rest_frame.origin.y), - layout->tomorrow_icon_rest_frame.size + GPoint(layout->content_layer_origin.x + layout->tomorrow_icon_rest_frame.origin.x, + layout->content_layer_origin.y + layout->tomorrow_icon_rest_frame.origin.y), + layout->tomorrow_icon_rest_frame.size }; layer_set_frame(tmr, tmr_root); layer_remove_from_parent(tmr); @@ -2502,8 +2496,8 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, // The bitmap is reloaded in prv_icon_anim_stopped after the animation ends. if (!layout->anim_params.tomorrow_reparented) { #if !WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS - prv_reload_icon(&layout->tomorrow_weather_icon, layout->tomorrow_weather_icon_layer, - new_next, true); + prv_reload_icon(&layout->tomorrow_weather_icon, layout->tomorrow_weather_icon_layer, new_next, + true); #else if (layout->tomorrow_weather_icon) { gbitmap_destroy(layout->tomorrow_weather_icon); @@ -2523,7 +2517,7 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, prv_snapshot_text(layout); layout->text_anim.dir_down = animate_down; layout->text_anim.progress = 0; - layout->text_anim.active = true; + layout->text_anim.active = true; #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS prv_move_day_icons_to_root(layout); #endif @@ -2543,17 +2537,17 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, // Incoming: TODAY_REST + SWEEP → TODAY_REST (arrives from above-right) GRect today_rest = layout->today_icon_rest_frame; GPoint today_center = GPoint(today_rest.origin.x + today_rest.size.w / 2, - today_rest.origin.y + today_rest.size.h / 2); + today_rest.origin.y + today_rest.size.h / 2); int32_t radius = ICON_ARC_RADIUS; layout->anim_params.circle_center = GPoint(today_center.x + radius, today_center.y); layout->anim_params.radius = radius; layout->anim_params.animate_down = animate_down; layout->anim_params.outgoing_start_angle = ICON_ARC_TODAY_REST; if (animate_down) { - layout->anim_params.outgoing_end_angle = ICON_ARC_TODAY_REST + ICON_ARC_SWEEP_ANGLE; + layout->anim_params.outgoing_end_angle = ICON_ARC_TODAY_REST + ICON_ARC_SWEEP_ANGLE; layout->anim_params.incoming_start_angle = ICON_ARC_TODAY_REST - ICON_ARC_SWEEP_ANGLE; } else { - layout->anim_params.outgoing_end_angle = ICON_ARC_TODAY_REST - ICON_ARC_SWEEP_ANGLE; + layout->anim_params.outgoing_end_angle = ICON_ARC_TODAY_REST - ICON_ARC_SWEEP_ANGLE; layout->anim_params.incoming_start_angle = ICON_ARC_TODAY_REST + ICON_ARC_SWEEP_ANGLE; } // Place each icon at its starting position. @@ -2563,13 +2557,12 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, // BitmapLayer (outgoing) is already at today_icon_rest_frame — no change needed. // New tomorrow icon entrance: start it at the arc incoming position in root coords. if (layout->anim_params.tomorrow_incoming) { - GPoint cc_root = GPoint( - layout->content_layer_origin.x + layout->anim_params.circle_center.x, - layout->content_layer_origin.y + layout->anim_params.circle_center.y); - layer_set_frame(bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer), - prv_icon_frame_at_angle(cc_root, radius, - layout->anim_params.incoming_start_angle, - layout->tomorrow_icon_rest_frame.size)); + GPoint cc_root = GPoint(layout->content_layer_origin.x + layout->anim_params.circle_center.x, + layout->content_layer_origin.y + layout->anim_params.circle_center.y); + layer_set_frame( + bitmap_layer_get_layer(layout->tomorrow_weather_icon_layer), + prv_icon_frame_at_angle(cc_root, radius, layout->anim_params.incoming_start_angle, + layout->tomorrow_icon_rest_frame.size)); } } else { // BitmapLayer (incoming): starts at arc entry point above-right (TODAY_REST + SWEEP). @@ -2581,10 +2574,10 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS if (layout->current_weather_escape_layer) { GRect start_frame = animate_down - ? layout->today_icon_rest_frame - : prv_icon_frame_at_angle(layout->anim_params.circle_center, radius, - layout->anim_params.incoming_start_angle, - layout->today_icon_rest_frame.size); + ? layout->today_icon_rest_frame + : prv_icon_frame_at_angle(layout->anim_params.circle_center, radius, + layout->anim_params.incoming_start_angle, + layout->today_icon_rest_frame.size); layout->anim_params.current_root_overlay = true; prv_set_current_escape_icon_frame(layout, start_frame); layer_set_hidden(layout->current_weather_escape_layer, false); @@ -2594,17 +2587,16 @@ static bool prv_prepare_day_transition(WeatherAppLayout *layout, return true; } -void weather_app_layout_animate(WeatherAppLayout *layout, - const WeatherLocationForecast *new_today, - const WeatherLocationForecast *new_next, - bool animate_down) { - if (!prv_prepare_day_transition(layout, new_today, new_next, animate_down)) return; +void weather_app_layout_animate(WeatherAppLayout *layout, const WeatherLocationForecast *new_today, + const WeatherLocationForecast *new_next, bool animate_down) { + if (!prv_prepare_day_transition(layout, new_today, new_next, animate_down)) + return; // Linear time: the moook frame tables ARE the easing. Stacking EaseOut on // top crushed the 3-frame anticipation (~25ms, invisible) and smeared the // bounce-back across ~130ms of mush — every firmware moook runs linear. - layout->icon_animation = prv_start_anim(ICON_ANIM_DURATION_MS, &s_icon_anim_impl, - prv_icon_anim_stopped, layout); + layout->icon_animation = + prv_start_anim(ICON_ANIM_DURATION_MS, &s_icon_anim_impl, prv_icon_anim_stopped, layout); // If this scroll lands on the last day (no next forecast), kick off the FIN // ribbon slide at the same time so it arrives exactly as the icon settles. diff --git a/src/fw/apps/system/weather/weather_app_layout.h b/src/fw/apps/system/weather/weather_app_layout.h index 2d43cb5b94..80a8fef432 100644 --- a/src/fw/apps/system/weather/weather_app_layout.h +++ b/src/fw/apps/system/weather/weather_app_layout.h @@ -40,7 +40,7 @@ typedef struct WeatherAppLayout { GBitmap *tomorrow_weather_icon; GDrawCommandImage *fin_pdc; // real timeline 'fin' flag (END_OF_TIMELINE PDC) Layer *fin_layer; - Layer *city_layer; //!< round: the crown city masthead (topmost root child) + Layer *city_layer; //!< round: the crown city masthead (topmost root child) Animation *fin_animation; const WeatherLocationForecast *forecast; const WeatherLocationForecast *next_forecast; @@ -48,13 +48,13 @@ typedef struct WeatherAppLayout { GFont temperature_font; GFont high_low_phrase_font; GFont metrics_font; - GFont metrics_value_font; // bold metric VALUES (Timeline label/value texture) + GFont metrics_value_font; // bold metric VALUES (Timeline label/value texture) GFont tomorrow_font; Layer *down_arrow_layer; Layer *location_bar_layer; char location_name[32]; bool fin_allowed; - GPoint content_layer_origin; // screen-absolute origin of content_layer + GPoint content_layer_origin; // screen-absolute origin of content_layer GRect today_icon_rest_frame; GRect tomorrow_icon_rest_frame; Animation *icon_animation; @@ -67,12 +67,12 @@ typedef struct WeatherAppLayout { // incoming always ends at ICON_ARC_TODAY_REST WeatherType outgoing_weather_type; WeatherType incoming_weather_type; - WeatherType tomorrow_exit_weather_type; // weather type of tomorrow icon while it exits/enters + WeatherType tomorrow_exit_weather_type; // weather type of tomorrow icon while it exits/enters bool animate_down; bool tomorrow_reparented; // true when tomorrow_layer lives in root_layer during animation bool tomorrow_incoming; // true when tomorrow_layer is animating IN during DOWN animation #if WEATHER_APP_LAYOUT_USE_PDC_WEATHER_ICONS - bool current_root_overlay; // Gabbro-only: current icon exits above content clipping + bool current_root_overlay; // Gabbro-only: current icon exits above content clipping #endif } anim_params; struct { @@ -80,13 +80,14 @@ typedef struct WeatherAppLayout { GRect to; } fin_anim; struct { - // Pre-formatted strings snapshot of the OUTGOING text (captured before forecast pointer updates) + // Pre-formatted strings snapshot of the OUTGOING text (captured before forecast pointer + // updates) char top_label[24]; char top_temp[15]; char top_highlow[15]; - char top_uv[12]; // UV bar numeral - char top_phrase[32]; // condition line - char top_desc[128]; // forecast description (warning/wind/precip) + char top_uv[12]; // UV bar numeral + char top_phrase[32]; // condition line + char top_desc[128]; // forecast description (warning/wind/precip) char bot_label[24]; char bot_highlow[15]; bool bot_valid; @@ -103,20 +104,19 @@ void weather_app_layout_set_data(WeatherAppLayout *layout, const WeatherLocationForecast *next_forecast); #define weather_app_layout_set_down_arrow_visible(layout, is_down_visible) \ - do { (void)(layout); (void)(is_down_visible); } while (0) + do { \ + (void)(layout); \ + (void)(is_down_visible); \ + } while (0) -void weather_app_layout_set_fin_allowed(WeatherAppLayout *layout, - bool fin_allowed); +void weather_app_layout_set_fin_allowed(WeatherAppLayout *layout, bool fin_allowed); void weather_app_layout_set_location(WeatherAppLayout *layout, const char *name); void weather_app_layout_deinit(WeatherAppLayout *layout); -void weather_app_layout_animate(WeatherAppLayout *layout, - const WeatherLocationForecast *new_today, - const WeatherLocationForecast *new_next, - bool animate_down); - +void weather_app_layout_animate(WeatherAppLayout *layout, const WeatherLocationForecast *new_today, + const WeatherLocationForecast *new_next, bool animate_down); #if PBL_ROUND // The weather report's UV bar, as a reusable component: glass-concentric arc ends, sun glyph, @@ -142,9 +142,8 @@ typedef enum { // `label` is the caption drawn beside the sun glyph — the report says "UV INDEX", the // sunset card says "CURRENT UV" (its value is the current hour's, not the day's). -void weather_app_layout_draw_uv_bar(GContext *ctx, GPoint gc, int by, - int uv_value, const char *uv_text, WeatherUvBarSize size, - const char *label); +void weather_app_layout_draw_uv_bar(GContext *ctx, GPoint gc, int by, int uv_value, + const char *uv_text, WeatherUvBarSize size, const char *label); // Height in rows of each bar size, so callers can budget vertical space without guessing. int weather_app_layout_uv_bar_height(WeatherUvBarSize size); diff --git a/src/fw/apps/system/weather/weather_data_source.c b/src/fw/apps/system/weather/weather_data_source.c index 2966ff0645..453c50d6b3 100644 --- a/src/fw/apps/system/weather/weather_data_source.c +++ b/src/fw/apps/system/weather/weather_data_source.c @@ -40,7 +40,8 @@ static void prv_fill_from_fw(WxDsForecast *out, const WeatherLocationForecast *f // them from the v4 WeatherDBEntry directly (no-op for v3 records). out->today_uv = -1; out->has_hourly_uv = false; - for (int i = 0; i < WX_DS_HOURLY; i++) out->hourly_uv[i] = -1; + for (int i = 0; i < WX_DS_HOURLY; i++) + out->hourly_uv[i] = -1; out->today_precip = -1; out->today_wind = -1; out->today_feels = WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP; @@ -81,8 +82,7 @@ static void prv_overlay_v4(WxDsForecast *out, int location_id) { return; } WeatherDBEntry *entry = task_zalloc_check(len); - const status_t rv = - weather_db_read((uint8_t *)&key, sizeof(key), (uint8_t *)entry, len); + const status_t rv = weather_db_read((uint8_t *)&key, sizeof(key), (uint8_t *)entry, len); // Version alone isn't enough: a truncated/corrupt record can carry version==4 with a // v3-sized payload (weather_db_insert validates length, insert_stale does not) — reading // the v4 fields below would then run past the allocation. Gate on the minor-0 base size; @@ -99,8 +99,7 @@ static void prv_overlay_v4(WxDsForecast *out, int location_id) { if (entry->today_wind_speed > 0) { out->today_wind = entry->today_wind_speed; } - if (entry->today_feels_like_temp != - WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP) { + if (entry->today_feels_like_temp != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP) { out->today_feels = entry->today_feels_like_temp; } out->latitude_e2 = entry->latitude_e2; @@ -119,7 +118,7 @@ static void prv_overlay_v4(WxDsForecast *out, int location_id) { out->daily[i].wind = -1; out->daily[i].uv = -1; out->daily[i].wind_dir = -1; - out->daily[i].feels = WX_DS_UNKNOWN_TEMP; // zeroed struct would read as a KNOWN 0° + out->daily[i].feels = WX_DS_UNKNOWN_TEMP; // zeroed struct would read as a KNOWN 0° } if (entry->today_hourly_count == WEATHER_DB_HOURLY_COUNT) { out->hourly_count = WX_DS_HOURLY; @@ -133,9 +132,12 @@ static void prv_overlay_v4(WxDsForecast *out, int location_id) { out->utc_offset_min = entry->location_utc_offset_min; for (uint8_t i = 0; i < nd; i++) { const WeatherDBDailyMetrics *m = &entry->daily_metrics[i]; - if (m->precip_probability != 255) out->daily[i].precip = m->precip_probability; - if (m->wind_speed != 255) out->daily[i].wind = m->wind_speed; - if (m->uv_index_x10 != 255) out->daily[i].uv = m->uv_index_x10 / 10; + if (m->precip_probability != 255) + out->daily[i].precip = m->precip_probability; + if (m->wind_speed != 255) + out->daily[i].wind = m->wind_speed; + if (m->uv_index_x10 != 255) + out->daily[i].uv = m->uv_index_x10 / 10; } } // v4.4 appended block (hourly UV) — the only source of a CURRENT UV reading; @@ -157,10 +159,14 @@ static void prv_overlay_v4(WxDsForecast *out, int location_id) { } // v4.2 appended block (today's raw warning readings + per-day feels-like). if (entry->minor_version >= 2 && len >= (int)WEATHER_DB_V4_2_FIXED_SIZE) { - if (entry->today_wmo_code != 0xFF) out->today_wmo = entry->today_wmo_code; - if (entry->today_humidity_pct != 0xFF) out->today_humidity = entry->today_humidity_pct; - if (entry->today_visibility_m != 0xFFFF) out->today_visibility_m = entry->today_visibility_m; - if (entry->today_precip_sum_mm != 0xFFFF) out->today_precip_sum_mm = entry->today_precip_sum_mm; + if (entry->today_wmo_code != 0xFF) + out->today_wmo = entry->today_wmo_code; + if (entry->today_humidity_pct != 0xFF) + out->today_humidity = entry->today_humidity_pct; + if (entry->today_visibility_m != 0xFFFF) + out->today_visibility_m = entry->today_visibility_m; + if (entry->today_precip_sum_mm != 0xFFFF) + out->today_precip_sum_mm = entry->today_precip_sum_mm; for (uint8_t i = 0; i < nd; i++) { if (entry->daily_feels_like[i] != WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP) { out->daily[i].feels = entry->daily_feels_like[i]; @@ -183,20 +189,26 @@ static void prv_overlay_v4(WxDsForecast *out, int location_id) { } bool weather_ds_name_prefix(const char *name, const char *needle) { - if (!name || !needle || !needle[0]) return false; + if (!name || !needle || !needle[0]) + return false; for (size_t i = 0; needle[i]; i++) { char a = name[i], b = needle[i]; - if (a >= 'A' && a <= 'Z') a += 'a' - 'A'; - if (b >= 'A' && b <= 'Z') b += 'a' - 'A'; - if (a != b) return false; + if (a >= 'A' && a <= 'Z') + a += 'a' - 'A'; + if (b >= 'A' && b <= 'Z') + b += 'a' - 'A'; + if (a != b) + return false; } return true; } bool weather_ds_name_matches(const char *name, const char *needle) { - if (!name) return false; + if (!name) + return false; for (const char *p = name; *p; p++) { - if (weather_ds_name_prefix(p, needle)) return true; + if (weather_ds_name_prefix(p, needle)) + return true; } return false; } diff --git a/src/fw/apps/system/weather/weather_data_source.h b/src/fw/apps/system/weather/weather_data_source.h index d7de4aca44..fa8f3cd9d5 100644 --- a/src/fw/apps/system/weather/weather_data_source.h +++ b/src/fw/apps/system/weather/weather_data_source.h @@ -15,57 +15,58 @@ #include #define WX_DS_HOURLY 24 -#define WX_DS_DAYS 7 -#define WX_DS_UNKNOWN_TEMP 32767 // matches WEATHER_SERVICE_..._UNKNOWN_TEMP (INT16_MAX) + app sentinel +#define WX_DS_DAYS 7 +#define WX_DS_UNKNOWN_TEMP \ + 32767 // matches WEATHER_SERVICE_..._UNKNOWN_TEMP (INT16_MAX) + app sentinel //! One day of the multi-day forecast (v4 daily[] array). daily[0] == today. typedef struct { - int high; // WX_DS_UNKNOWN_TEMP if unknown - int low; // WX_DS_UNKNOWN_TEMP if unknown - uint8_t type; // WeatherType (app + fw enum values are identical) - int precip; // % rain chance, -1 if unknown (real v4 schema is today-only) - int wind; // mph, -1 if unknown (real v4 schema is today-only) - int wind_dir; // degrees 0..359, -1 if unknown (v4.3) - int uv; // UV index 0-11, -1 if unknown (real v4 schema is today-only) - int feels; // feels-like temp, WX_DS_UNKNOWN_TEMP if unknown (v4.2 daily_feels_like) + int high; // WX_DS_UNKNOWN_TEMP if unknown + int low; // WX_DS_UNKNOWN_TEMP if unknown + uint8_t type; // WeatherType (app + fw enum values are identical) + int precip; // % rain chance, -1 if unknown (real v4 schema is today-only) + int wind; // mph, -1 if unknown (real v4 schema is today-only) + int wind_dir; // degrees 0..359, -1 if unknown (v4.3) + int uv; // UV index 0-11, -1 if unknown (real v4 schema is today-only) + int feels; // feels-like temp, WX_DS_UNKNOWN_TEMP if unknown (v4.2 daily_feels_like) } WxDsDaily; typedef struct { char location_name[64]; char short_phrase[32]; bool is_current_location; - int current_temp; // WX_DS_UNKNOWN_TEMP if unknown + int current_temp; // WX_DS_UNKNOWN_TEMP if unknown int today_high; int today_low; uint8_t current_weather_type; // 0-8 / 255 (app + fw enum values are identical) int tomorrow_high; int tomorrow_low; uint8_t tomorrow_weather_type; - int today_uv; // UV index 0-11, -1 unknown (v4) - int today_precip; // % , -1 unknown (v4) - int today_wind; // mph, -1 unknown (v4) - int today_wind_dir; // degrees 0..359, -1 unknown (v4.3) - int today_feels; // feels-like temp, 32767 (unknown-temp) if unknown (v4) - int today_wmo; // WMO weather code, -1 unknown (v4.2 — warnings) - int today_humidity; // relative humidity %, -1 unknown (v4.2) + int today_uv; // UV index 0-11, -1 unknown (v4) + int today_precip; // % , -1 unknown (v4) + int today_wind; // mph, -1 unknown (v4) + int today_wind_dir; // degrees 0..359, -1 unknown (v4.3) + int today_feels; // feels-like temp, 32767 (unknown-temp) if unknown (v4) + int today_wmo; // WMO weather code, -1 unknown (v4.2 — warnings) + int today_humidity; // relative humidity %, -1 unknown (v4.2) int32_t today_visibility_m; // minimum visibility today in meters, -1 unknown (v4.2) - int today_precip_sum_mm; // total precipitation today in mm, -1 unknown (v4.2) + int today_precip_sum_mm; // total precipitation today in mm, -1 unknown (v4.2) int32_t time_updated_utc; // ---- v4-only extras (zeroed/unknown when the record is still v3) ---- - bool is_v4; // true if the active record was a v4 WeatherDBEntry - uint8_t num_daily; // valid entries in daily[] (0 = no v4 daily array) - WxDsDaily daily[WX_DS_DAYS]; // daily[0] == today - uint8_t hourly_count; // 0 or WX_DS_HOURLY (today only, per the v4 schema) + bool is_v4; // true if the active record was a v4 WeatherDBEntry + uint8_t num_daily; // valid entries in daily[] (0 = no v4 daily array) + WxDsDaily daily[WX_DS_DAYS]; // daily[0] == today + uint8_t hourly_count; // 0 or WX_DS_HOURLY (today only, per the v4 schema) uint8_t hourly_type[WX_DS_HOURLY]; // WeatherType per hour 0-23 - int8_t hourly_temp[WX_DS_HOURLY]; // temperature per hour 0-23 - int8_t hourly_uv[WX_DS_HOURLY]; // UV index per hour 0-23, -1 unknown (v4 minor 4+) - bool has_hourly_uv; // true when the phone sent the minor-4 hourly UV block + int8_t hourly_temp[WX_DS_HOURLY]; // temperature per hour 0-23 + int8_t hourly_uv[WX_DS_HOURLY]; // UV index per hour 0-23, -1 unknown (v4 minor 4+) + bool has_hourly_uv; // true when the phone sent the minor-4 hourly UV block uint8_t tomorrow_hourly_count; // 0 or WX_DS_HOURLY (v4 minor 5+) uint8_t tomorrow_hourly_type[WX_DS_HOURLY]; // WeatherType per hour 0-23 of TOMORROW - int8_t tomorrow_hourly_temp[WX_DS_HOURLY]; // temperature per hour 0-23 of TOMORROW - int16_t latitude_e2; // latitude * 100 (for the globe), INT16_MIN unknown - int16_t longitude_e2; // longitude * 100 (for the globe), INT16_MIN unknown + int8_t tomorrow_hourly_temp[WX_DS_HOURLY]; // temperature per hour 0-23 of TOMORROW + int16_t latitude_e2; // latitude * 100 (for the globe), INT16_MIN unknown + int16_t longitude_e2; // longitude * 100 (for the globe), INT16_MIN unknown int16_t utc_offset_min; // location's tz, minutes east of UTC (v4.1), INT16_MIN unknown } WxDsForecast; diff --git a/src/fw/apps/system/weather/weather_math.c b/src/fw/apps/system/weather/weather_math.c index 675c823ef2..75706eec1a 100644 --- a/src/fw/apps/system/weather/weather_math.c +++ b/src/fw/apps/system/weather/weather_math.c @@ -14,15 +14,14 @@ int64_t weather_interpolate_moook_soft1(int32_t n, int64_t from, int64_t to) { // (the expanded card's dial + the report page's UV bar tell the same story): // 0-2 green, 3-5 yellow, 6-7 orange, 8+ red (incl. off-scale). GColor weather_uv_severity_color(int uv) { - return (uv <= 2) ? GColorIslamicGreen - : (uv <= 5) ? GColorChromeYellow - : (uv <= 7) ? GColorOrange - : GColorRed; + return (uv <= 2) ? GColorIslamicGreen + : (uv <= 5) ? GColorChromeYellow + : (uv <= 7) ? GColorOrange + : GColorRed; } const uint8_t weather_diurnal_curve[24] = { - 10, 6, 3, 0, 0, 3, 8, 16, 28, 42, 56, 70, - 82, 92, 98, 100, 96, 88, 76, 62, 48, 36, 26, 17, + 10, 6, 3, 0, 0, 3, 8, 16, 28, 42, 56, 70, 82, 92, 98, 100, 96, 88, 76, 62, 48, 36, 26, 17, }; // One jelly edge — leading edge delay 0, trailing edge delay 1/6 over a 5/6 point-duration, on @@ -30,9 +29,11 @@ const uint8_t weather_diurnal_curve[24] = { static int prv_jelly_edge(AnimationProgress m, int delay_num, int from, int to) { const int32_t MAX = ANIMATION_NORMALIZED_MAX; int32_t local = (int32_t)m - MAX * delay_num / 6; - if (local < 0) local = 0; + if (local < 0) + local = 0; local = (int32_t)((int64_t)local * 6 / 5); - if (local > MAX) local = MAX; + if (local > MAX) + local = MAX; return (int)interpolate_moook_soft(local, from, to, 3); } @@ -50,8 +51,8 @@ static int prv_jelly_edge(AnimationProgress m, int delay_num, int from, int to) // (weather_render_squash_cached) can re-blit from an existing snapshot without paying the // full framebuffer copy every frame — the resample writes EVERY pixel of every row's // chord (src or white), so nothing stale survives underneath. -static void prv_squash_resample(GBitmap *fb, const uint8_t *scratch, - AnimationProgress m, int mode) { +static void prv_squash_resample(GBitmap *fb, const uint8_t *scratch, AnimationProgress m, + int mode) { GRect b = gbitmap_get_bounds(fb); const int W = b.size.w, H = b.size.h; const uint8_t white = GColorWhite.argb; @@ -63,66 +64,83 @@ static void prv_squash_resample(GBitmap *fb, const uint8_t *scratch, // Left edge leads 0 -> -W (delay 0); right trails the HALF-lag (average of leading // and 1/6-lagged), both clamped to rest so the moook anticipation never pokes the // frame rightward (same reasoning as the UP_EXIT clamp). - left_edge = prv_jelly_edge(m, 0, 0, -W); + left_edge = prv_jelly_edge(m, 0, 0, -W); right_edge = (prv_jelly_edge(m, 0, W, 0) + prv_jelly_edge(m, 1, W, 0)) / 2; - if (left_edge > 0) left_edge = 0; - if (right_edge > W) right_edge = W; + if (left_edge > 0) + left_edge = 0; + if (right_edge > W) + right_edge = W; } int dst_w = right_edge - left_edge; - if (dst_w < 1) dst_w = 1; + if (dst_w < 1) + dst_w = 1; const int32_t sx_step = ((int32_t)W << 16) / dst_w; int vis0 = left_edge > 0 ? left_edge : 0; int vis1 = right_edge < W ? right_edge : W; - if (vis1 < vis0) vis1 = vis0; + if (vis1 < vis0) + vis1 = vis0; for (int y = 0; y < H; y++) { GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)y); - uint8_t *dst = ri.data; // absolute-x + uint8_t *dst = ri.data; // absolute-x const uint8_t *src = scratch + (uint32_t)y * W; for (int x = (int)ri.min_x; x <= (int)ri.max_x; x++) { - if (x < vis0 || x >= vis1) { weather_fb_row_set(dst, x, white); continue; } + if (x < vis0 || x >= vis1) { + weather_fb_row_set(dst, x, white); + continue; + } int sx = (int)((((int32_t)(x - left_edge)) * sx_step) >> 16); - if (sx < 0) sx = 0; else if (sx >= W) sx = W - 1; + if (sx < 0) + sx = 0; + else if (sx >= W) + sx = W - 1; weather_fb_row_set(dst, x, src[sx]); } } return; } int top_edge, bot_edge; - if (mode == WEATHER_SQUASH_DOWN_EXIT) { // down exit: bottom leads off the bottom + if (mode == WEATHER_SQUASH_DOWN_EXIT) { // down exit: bottom leads off the bottom // Compress the exit into the first ~75% of the animation so the screen has fully // cleared before the card's glance text sweeps across (see prv_draw_flying_content). AnimationProgress me = m + m / 3; - if (me > ANIMATION_NORMALIZED_MAX) me = ANIMATION_NORMALIZED_MAX; + if (me > ANIMATION_NORMALIZED_MAX) + me = ANIMATION_NORMALIZED_MAX; top_edge = prv_jelly_edge(me, 1, 0, H); bot_edge = prv_jelly_edge(me, 0, H, 2 * H); - } else if (mode == WEATHER_SQUASH_CLOCK_EXIT) { // clock exit: same geometry, full timeline + } else if (mode == WEATHER_SQUASH_CLOCK_EXIT) { // clock exit: same geometry, full timeline top_edge = prv_jelly_edge(m, 1, 0, H); bot_edge = prv_jelly_edge(m, 0, H, 2 * H); - } else if (mode == WEATHER_SQUASH_RISE_IN) { // rise from below: top leads up into place - top_edge = prv_jelly_edge(m, 0, H, 0); + } else if (mode == WEATHER_SQUASH_RISE_IN) { // rise from below: top leads up into place + top_edge = prv_jelly_edge(m, 0, H, 0); bot_edge = prv_jelly_edge(m, 1, 2 * H, H); - } else if (mode == WEATHER_SQUASH_UP_EXIT) { // up exit: top leads off the top; the bottom + } else if (mode == WEATHER_SQUASH_UP_EXIT) { // up exit: top leads off the top; the bottom // trails a HALF-lag (1/12 — the average of the leading and 1/6-lagged edges) for a // subtler stretch than the other modes. Full timeline (no haste), like mode 4. top_edge = prv_jelly_edge(m, 0, 0, -H); bot_edge = (prv_jelly_edge(m, 0, H, 0) + prv_jelly_edge(m, 1, H, 0)) / 2; // Never let the frame move DOWN past its rest: the moook anticipation dip would poke // the bottom content below the decoupled burst dot for a beat, which reads wrong. - if (top_edge > 0) top_edge = 0; - if (bot_edge > H) bot_edge = H; - } else { // drop-in: bottom leads down into place + if (top_edge > 0) + top_edge = 0; + if (bot_edge > H) + bot_edge = H; + } else { // drop-in: bottom leads down into place top_edge = prv_jelly_edge(m, 1, -H, 0); - bot_edge = prv_jelly_edge(m, 0, 0, H); + bot_edge = prv_jelly_edge(m, 0, 0, H); } int dst_h = bot_edge - top_edge; - if (dst_h < 1) dst_h = 1; + if (dst_h < 1) + dst_h = 1; const int32_t sy_step = ((int32_t)H << 16) / dst_h; for (int ay = 0; ay < H; ay++) { GBitmapDataRowInfo ri = gbitmap_get_data_row_info(fb, (uint16_t)ay); const int lo = (int)ri.min_x, hi = (int)ri.max_x; if (ay >= top_edge && ay < bot_edge) { int sy = (int)((((int32_t)(ay - top_edge)) * sy_step) >> 16); - if (sy < 0) sy = 0; else if (sy >= H) sy = H - 1; + if (sy < 0) + sy = 0; + else if (sy >= H) + sy = H - 1; // The SOURCE row's chord differs from this row's, so anything this row exposes // beyond it would read pixels that were never drawn — white those. GBitmapDataRowInfo sri = gbitmap_get_data_row_info(fb, (uint16_t)sy); @@ -132,14 +150,16 @@ static void prv_squash_resample(GBitmap *fb, const uint8_t *scratch, (x >= (int)sri.min_x && x <= (int)sri.max_x) ? src[x] : white); } } else { - for (int x = lo; x <= hi; x++) weather_fb_row_set(ri.data, x, white); + for (int x = lo; x <= hi; x++) + weather_fb_row_set(ri.data, x, white); } } } void weather_render_squash(GContext *ctx, uint8_t *scratch, AnimationProgress m, int mode) { GBitmap *fb = graphics_capture_frame_buffer(ctx); - if (!fb) return; + if (!fb) + return; GRect b = gbitmap_get_bounds(fb); const int W = b.size.w, H = b.size.h; for (int y = 0; y < H; y++) { @@ -150,7 +170,7 @@ void weather_render_squash(GContext *ctx, uint8_t *scratch, AnimationProgress m, scratch[(uint32_t)y * W + x] = weather_fb_row_get(ri.data, x); } #else - memcpy(scratch + (uint32_t)y * W, ri.data, W); // absolute-x row + memcpy(scratch + (uint32_t)y * W, ri.data, W); // absolute-x row #endif } prv_squash_resample(fb, scratch, m, mode); @@ -160,17 +180,19 @@ void weather_render_squash(GContext *ctx, uint8_t *scratch, AnimationProgress m, // Capture-once fast path (gabbro smoothness step 2): re-blit from a snapshot some earlier // weather_render_squash call already filled — no scene render needed beneath it and no // per-frame framebuffer copy. The caller owns knowing the snapshot is valid. -void weather_render_squash_cached(GContext *ctx, const uint8_t *scratch, - AnimationProgress m, int mode) { +void weather_render_squash_cached(GContext *ctx, const uint8_t *scratch, AnimationProgress m, + int mode) { GBitmap *fb = graphics_capture_frame_buffer(ctx); - if (!fb) return; + if (!fb) + return; prv_squash_resample(fb, scratch, m, mode); graphics_release_frame_buffer(ctx, fb); } -void weather_fill_weekday_abbrev(int day_offset, const char *fallback, - char *buffer, size_t buffer_size) { - if (!buffer || buffer_size == 0) return; +void weather_fill_weekday_abbrev(int day_offset, const char *fallback, char *buffer, + size_t buffer_size) { + if (!buffer || buffer_size == 0) + return; time_t target = time(NULL) + (time_t)day_offset * 86400; struct tm *lt = localtime(&target); if (!lt || strftime(buffer, buffer_size, "%a", lt) == 0) { @@ -181,22 +203,23 @@ void weather_fill_weekday_abbrev(int day_offset, const char *fallback, } } for (char *c = buffer; *c; c++) { - if (*c >= 'a' && *c <= 'z') *c = (char)(*c - 'a' + 'A'); + if (*c >= 'a' && *c <= 'z') + *c = (char)(*c - 'a' + 'A'); } } -uint32_t weather_scale_u32(uint32_t value, uint32_t numerator, - uint32_t denominator) { - if (denominator == 0) return 0; +uint32_t weather_scale_u32(uint32_t value, uint32_t numerator, uint32_t denominator) { + if (denominator == 0) + return 0; uint32_t whole = value / denominator; uint32_t remainder = value % denominator; return (whole * numerator) + ((remainder * numerator) / denominator); } -int32_t weather_scale_i32(int32_t value, int32_t numerator, - int32_t denominator) { - if (denominator == 0) return 0; +int32_t weather_scale_i32(int32_t value, int32_t numerator, int32_t denominator) { + if (denominator == 0) + return 0; bool negative = false; if (value < 0) { @@ -212,17 +235,18 @@ int32_t weather_scale_i32(int32_t value, int32_t numerator, negative = !negative; } - uint32_t scaled = weather_scale_u32((uint32_t)value, (uint32_t)numerator, - (uint32_t)denominator); + uint32_t scaled = weather_scale_u32((uint32_t)value, (uint32_t)numerator, (uint32_t)denominator); return negative ? -(int32_t)scaled : (int32_t)scaled; } int32_t weather_isqrt(int32_t value) { - if (value <= 0) return 0; + if (value <= 0) + return 0; uint32_t x = (uint32_t)value; uint32_t result = 0; uint32_t bit = 1UL << 30; - while (bit > x) bit >>= 2; + while (bit > x) + bit >>= 2; while (bit != 0) { if (x >= result + bit) { x -= result + bit; @@ -236,21 +260,22 @@ int32_t weather_isqrt(int32_t value) { } int32_t weather_norm_square(int32_t value) { - if (value <= 0) return 0; - if (value >= ANIMATION_NORMALIZED_MAX) return ANIMATION_NORMALIZED_MAX; - return (int32_t)(((uint32_t)value * (uint32_t)value) / - (uint32_t)ANIMATION_NORMALIZED_MAX); + if (value <= 0) + return 0; + if (value >= ANIMATION_NORMALIZED_MAX) + return ANIMATION_NORMALIZED_MAX; + return (int32_t)(((uint32_t)value * (uint32_t)value) / (uint32_t)ANIMATION_NORMALIZED_MAX); } int32_t weather_norm_bell(int32_t value) { - if (value <= 0 || value >= ANIMATION_NORMALIZED_MAX) return 0; + if (value <= 0 || value >= ANIMATION_NORMALIZED_MAX) + return 0; uint32_t v = (uint32_t)value; uint32_t max = (uint32_t)ANIMATION_NORMALIZED_MAX; return (int32_t)((4U * v * (max - v)) / max); } -void weather_capture_framebuffer_rect(GBitmap *fb, GBitmap *dst, - GRect src_rect, int dst_x) { +void weather_capture_framebuffer_rect(GBitmap *fb, GBitmap *dst, GRect src_rect, int dst_x) { uint8_t *dst_data = gbitmap_get_data(dst); uint16_t dbpr = gbitmap_get_bytes_per_row(dst); int sx = src_rect.origin.x; @@ -275,8 +300,7 @@ void weather_capture_framebuffer_rect(GBitmap *fb, GBitmap *dst, if (xs <= xe) { #if PBL_BW for (int x = xs; x <= xe; x++) { - bitset8_update(dst_row, (unsigned)(x - sx), - bitset8_get(ri.data, (unsigned)x)); + bitset8_update(dst_row, (unsigned)(x - sx), bitset8_get(ri.data, (unsigned)x)); weather_fb_row_set(ri.data, x, GColorWhiteARGB8); } #else @@ -288,8 +312,8 @@ void weather_capture_framebuffer_rect(GBitmap *fb, GBitmap *dst, } } -static void prv_fill_wrapped_radial(GContext *ctx, GRect rect, uint16_t inset, - int32_t start, int32_t span) { +static void prv_fill_wrapped_radial(GContext *ctx, GRect rect, uint16_t inset, int32_t start, + int32_t span) { const int32_t max = (int32_t)TRIG_MAX_ANGLE; start &= max - 1; if (span >= max) { @@ -302,14 +326,12 @@ static void prv_fill_wrapped_radial(GContext *ctx, GRect rect, uint16_t inset, graphics_fill_radial(ctx, rect, GOvalScaleModeFitCircle, inset, start, end); } else { graphics_fill_radial(ctx, rect, GOvalScaleModeFitCircle, inset, start, max); - graphics_fill_radial(ctx, rect, GOvalScaleModeFitCircle, inset, 0, - end - max); + graphics_fill_radial(ctx, rect, GOvalScaleModeFitCircle, inset, 0, end - max); } } -void weather_draw_lava_ring(GContext *ctx, GPoint center, int outer_r, - GColor glow_color, uint32_t phase_u, - uint8_t idle_progress) { +void weather_draw_lava_ring(GContext *ctx, GPoint center, int outer_r, GColor glow_color, + uint32_t phase_u, uint8_t idle_progress) { int32_t phase = (int32_t)phase_u & ((int32_t)TRIG_MAX_ANGLE - 1); int32_t half = (int32_t)(TRIG_MAX_ANGLE / 2); int32_t span = half; @@ -318,19 +340,22 @@ void weather_draw_lava_ring(GContext *ctx, GPoint center, int outer_r, if (idle_progress > WEATHER_GLOW_WRAP_SPIN_TICKS) { uint8_t close = idle_progress - WEATHER_GLOW_WRAP_SPIN_TICKS; - if (close > WEATHER_GLOW_WRAP_CLOSE_TICKS) close = WEATHER_GLOW_WRAP_CLOSE_TICKS; + if (close > WEATHER_GLOW_WRAP_CLOSE_TICKS) + close = WEATHER_GLOW_WRAP_CLOSE_TICKS; span += (int32_t)close * (half / WEATHER_GLOW_WRAP_CLOSE_TICKS); } // (The faded Celeste outer halo ring was removed by design — // the temp keeps just the solid condition-colored ring + sparks/beads.) - GRect ring_rect = { GPoint(center.x - outer_r, center.y - outer_r), - GSize(outer_r * 2, outer_r * 2) }; + GRect ring_rect = { + GPoint(center.x - outer_r, center.y - outer_r), GSize(outer_r * 2, outer_r * 2) + }; graphics_context_set_fill_color(ctx, glow_color); prv_fill_wrapped_radial(ctx, ring_rect, 2, phase, span); prv_fill_wrapped_radial(ctx, ring_rect, 2, neg, span); - if (idle) return; + if (idle) + return; int sx1 = center.x + (int)((int32_t)sin_lookup(phase) * outer_r / TRIG_MAX_RATIO); int sy1 = center.y - (int)((int32_t)cos_lookup(phase) * outer_r / TRIG_MAX_RATIO); @@ -341,9 +366,9 @@ void weather_draw_lava_ring(GContext *ctx, GPoint center, int outer_r, graphics_fill_circle(ctx, GPoint(sx2, sy2), 2); int32_t b_ang[3] = { - (phase * 3 / 2) % (int32_t)TRIG_MAX_ANGLE, - ((int32_t)(TRIG_MAX_ANGLE * 4) - phase * 2) % (int32_t)TRIG_MAX_ANGLE, - (phase / 2 + (int32_t)(TRIG_MAX_ANGLE * 2 / 3)) % (int32_t)TRIG_MAX_ANGLE, + (phase * 3 / 2) % (int32_t)TRIG_MAX_ANGLE, + ((int32_t)(TRIG_MAX_ANGLE * 4) - phase * 2) % (int32_t)TRIG_MAX_ANGLE, + (phase / 2 + (int32_t)(TRIG_MAX_ANGLE * 2 / 3)) % (int32_t)TRIG_MAX_ANGLE, }; graphics_context_set_fill_color(ctx, glow_color); for (int b = 0; b < 3; b++) { diff --git a/src/fw/apps/system/weather/weather_math.h b/src/fw/apps/system/weather/weather_math.h index 9071480aef..c6ee1ec196 100644 --- a/src/fw/apps/system/weather/weather_math.h +++ b/src/fw/apps/system/weather/weather_math.h @@ -27,20 +27,16 @@ static inline uint8_t weather_fb_row_get(const uint8_t *row_data, int x) { #endif } -uint32_t weather_scale_u32(uint32_t value, uint32_t numerator, - uint32_t denominator); -int32_t weather_scale_i32(int32_t value, int32_t numerator, - int32_t denominator); +uint32_t weather_scale_u32(uint32_t value, uint32_t numerator, uint32_t denominator); +int32_t weather_scale_i32(int32_t value, int32_t numerator, int32_t denominator); int32_t weather_isqrt(int32_t value); int32_t weather_norm_square(int32_t value); int32_t weather_norm_bell(int32_t value); -void weather_capture_framebuffer_rect(GBitmap *fb, GBitmap *dst, - GRect src_rect, int dst_x); +void weather_capture_framebuffer_rect(GBitmap *fb, GBitmap *dst, GRect src_rect, int dst_x); #define WEATHER_GLOW_WRAP_SPIN_TICKS 12 #define WEATHER_GLOW_WRAP_CLOSE_TICKS 4 -#define WEATHER_GLOW_WRAP_TICKS \ - (WEATHER_GLOW_WRAP_SPIN_TICKS + WEATHER_GLOW_WRAP_CLOSE_TICKS) +#define WEATHER_GLOW_WRAP_TICKS (WEATHER_GLOW_WRAP_SPIN_TICKS + WEATHER_GLOW_WRAP_CLOSE_TICKS) // Card<->globe horizontal slide duration (SELECT out-left / BACK in-left): a snappy fraction // of the moook default so the two-phase transition feels quick. Shared by expanded_view.c and @@ -53,8 +49,8 @@ int64_t weather_interpolate_moook_soft1(int32_t n, int64_t from, int64_t to); // Uppercase 3-letter weekday abbreviation for the day `day_offset` days from now ("MON"). // Falls back to (up to 3 chars of) `fallback`, or "---", if localtime/strftime fail. -void weather_fill_weekday_abbrev(int day_offset, const char *fallback, - char *buffer, size_t buffer_size); +void weather_fill_weekday_abbrev(int day_offset, const char *fallback, char *buffer, + size_t buffer_size); // Diurnal curve (0..100): cool overnight, peak mid-afternoon. Shared by the hourly // synth in weather.c and the v4 test seed in weather_data_source.c. @@ -63,9 +59,8 @@ extern const uint8_t weather_diurnal_curve[24]; //! WHO UV severity ramp (shared by the card dial + the report UV bar). GColor weather_uv_severity_color(int uv); -void weather_draw_lava_ring(GContext *ctx, GPoint center, int outer_r, - GColor glow_color, uint32_t phase, - uint8_t idle_progress); +void weather_draw_lava_ring(GContext *ctx, GPoint center, int outer_r, GColor glow_color, + uint32_t phase, uint8_t idle_progress); // Whole-screen Timeline jelly squash-stretch blit, shared by forecast_list and clock_face. // `scratch` = W*H one-shot framebuffer snapshot. Modes 1-3 match forecast_list's @@ -73,21 +68,21 @@ void weather_draw_lava_ring(GContext *ctx, GPoint center, int outer_r, // down-exit, WITHOUT the me=m+m/3 haste — the forecast's exit is deliberately compressed into // its first ~75% (sunset-card text staging) while the clock's hand-tuned exit runs the full // timeline. Do not merge the two. -#define WEATHER_SQUASH_DROP_IN 1 -#define WEATHER_SQUASH_DOWN_EXIT 2 -#define WEATHER_SQUASH_RISE_IN 3 +#define WEATHER_SQUASH_DROP_IN 1 +#define WEATHER_SQUASH_DOWN_EXIT 2 +#define WEATHER_SQUASH_RISE_IN 3 #define WEATHER_SQUASH_CLOCK_EXIT 4 // Mode 5: the forecast's clock-burst stage-1 — the whole scrolled screen jelly-stretches // UP off the top (top edge leads, bottom trails), full timeline like the clock exit. -#define WEATHER_SQUASH_UP_EXIT 5 +#define WEATHER_SQUASH_UP_EXIT 5 // Mode 6: the forecast's SELECT exit — the UP_EXIT grammar rotated 90°: the whole // screen jelly-stretches off the LEFT (left edge leads, right trails the half-lag). -#define WEATHER_SQUASH_LEFT_EXIT 6 +#define WEATHER_SQUASH_LEFT_EXIT 6 // Mode 7: the weather report's entrance — RISE_IN rotated 90°: the whole screen // jelly-stretches IN from the RIGHT (left edge leads into place, right trails). void weather_render_squash(GContext *ctx, uint8_t *scratch, AnimationProgress m, int mode); // Capture-once fast path: re-blit from a snapshot a prior weather_render_squash call // filled, skipping the per-frame framebuffer copy. Round-only callers (gabbro // smoothness step 2); rect keeps calling weather_render_squash unchanged. -void weather_render_squash_cached(GContext *ctx, const uint8_t *scratch, - AnimationProgress m, int mode); +void weather_render_squash_cached(GContext *ctx, const uint8_t *scratch, AnimationProgress m, + int mode); diff --git a/src/fw/apps/system/weather/weather_report.c b/src/fw/apps/system/weather/weather_report.c index befb1e1594..1772b292f9 100644 --- a/src/fw/apps/system/weather/weather_report.c +++ b/src/fw/apps/system/weather/weather_report.c @@ -3,7 +3,7 @@ #include "weather_report.h" #include "weather_math.h" -#include "forecast_list.h" // arm_hslide_in — the report-BACK glide pair +#include "forecast_list.h" // arm_hslide_in — the report-BACK glide pair #include "applib/app_timer.h" #include "applib/ui/animation.h" #include "applib/ui/animation_interpolate.h" @@ -37,12 +37,12 @@ void weather_report_arm_static_in(void) { typedef struct { Window *window; WeatherAppLayout layout; - const WeatherLocationForecast *days; // borrowed; owned by weather.c (app-lifetime) + const WeatherLocationForecast *days; // borrowed; owned by weather.c (app-lifetime) size_t num_days; - int current_day_index; + int current_day_index; #ifdef CONFIG_TOUCH int16_t touch_start_x, touch_start_y; // Touchdown origin for swipe detection - bool touch_active; + bool touch_active; #endif } WeatherReportData; @@ -52,7 +52,7 @@ static WeatherReportData *s_report; // last day. Pointers are borrowed straight from days[] (the layout stores them without copying). static void prv_seed_day(int i) { const WeatherLocationForecast *today = &s_report->days[i]; - const WeatherLocationForecast *next = + const WeatherLocationForecast *next = (i + 1 < (int)s_report->num_days) ? &s_report->days[i + 1] : NULL; weather_app_layout_set_fin_allowed(&s_report->layout, s_report->num_days > 1 && i + 1 >= (int)s_report->num_days); @@ -67,18 +67,21 @@ static void prv_seed_day(int i) { // hold-scroll timer) are fine: weather_app_layout_animate cancels the in-flight arc and restarts, // so an accelerating hold fast-forwards through the days. static void prv_navigate(bool is_down) { - if (!s_report) return; + if (!s_report) + return; int i = s_report->current_day_index; if (is_down) { - if (i + 1 >= (int)s_report->num_days) return; // already at the last day + if (i + 1 >= (int)s_report->num_days) + return; // already at the last day i++; } else { - if (i <= 0) return; // already at today + if (i <= 0) + return; // already at today i--; } s_report->current_day_index = i; const WeatherLocationForecast *new_today = &s_report->days[i]; - const WeatherLocationForecast *new_next = + const WeatherLocationForecast *new_next = (i + 1 < (int)s_report->num_days) ? &s_report->days[i + 1] : NULL; weather_app_layout_set_fin_allowed(&s_report->layout, s_report->num_days > 1 && i + 1 >= (int)s_report->num_days); @@ -86,11 +89,12 @@ static void prv_navigate(bool is_down) { } static void prv_click_up_down(ClickRecognizerRef r, void *ctx) { - if (!s_report) return; + if (!s_report) + return; prv_navigate(click_recognizer_get_button_id(r) == BUTTON_ID_DOWN); } -static Animation *s_slide_in_anim; // entrance slide (defined below); shared exclusivity +static Animation *s_slide_in_anim; // entrance slide (defined below); shared exclusivity // BACK: the page glide pair (globe grammar): this page slides out RIGHT while the mainscreen // slides in from the left (forecast_list_arm_hslide_in). Same WEATHER_HSLIDE_MS + moook_soft1. static Animation *s_back_slide_anim; @@ -105,102 +109,127 @@ void weather_report_reset(void) { } static void prv_back_slide_stopped(Animation *anim, bool finished, void *context) { - (void)anim; (void)context; - s_back_slide_anim = NULL; // property animation auto-destroys after a normal stop + (void)anim; + (void)context; + s_back_slide_anim = NULL; // property animation auto-destroys after a normal stop if (finished) { forecast_list_arm_hslide_in(); - window_stack_pop(false); // un-animated: the glide already happened + window_stack_pop(false); // un-animated: the glide already happened } } static void prv_start_back_slide(void) { - if (!s_report || s_back_slide_anim || s_slide_in_anim) return; // entrance/exit exclusive + if (!s_report || s_back_slide_anim || s_slide_in_anim) + return; // entrance/exit exclusive Layer *root = s_report->layout.root_layer; GRect from = layer_get_frame_by_value(root); GRect to = from; - to.origin.x += from.size.w; // out to the RIGHT + to.origin.x += from.size.w; // out to the RIGHT PropertyAnimation *pa = property_animation_create_layer_frame(root, &from, &to); - if (!pa) { window_stack_pop(true); return; } + if (!pa) { + window_stack_pop(true); + return; + } Animation *a = (Animation *)pa; animation_set_duration(a, WEATHER_HSLIDE_MS); animation_set_custom_interpolation(a, weather_interpolate_moook_soft1); - animation_set_handlers(a, (AnimationHandlers){ .stopped = prv_back_slide_stopped }, NULL); + animation_set_handlers(a, (AnimationHandlers){.stopped = prv_back_slide_stopped}, NULL); s_back_slide_anim = a; animation_schedule(a); } static void prv_click_back(ClickRecognizerRef r, void *ctx) { - prv_start_back_slide(); // glide out right; pops in the .stopped + prv_start_back_slide(); // glide out right; pops in the .stopped } // ---- Touch input (touch colour platforms) ---- #ifdef CONFIG_TOUCH -#define SWIPE_THRESHOLD 20 // px; same tap/swipe split as the other screens +#define SWIPE_THRESHOLD 20 // px; same tap/swipe split as the other screens static void prv_touch_handler(const TouchEvent *event, void *context) { (void)context; - if (!s_report) return; + if (!s_report) + return; if (event->type == TouchEvent_Touchdown) { s_report->touch_start_x = event->x; s_report->touch_start_y = event->y; - s_report->touch_active = true; + s_report->touch_active = true; } else if (event->type == TouchEvent_Liftoff && s_report->touch_active) { s_report->touch_active = false; int16_t dx = event->x - s_report->touch_start_x; int16_t dy = event->y - s_report->touch_start_y; int16_t adx = dx < 0 ? -dx : dx; int16_t ady = dy < 0 ? -dy : dy; - if (adx <= SWIPE_THRESHOLD && ady <= SWIPE_THRESHOLD) return; // tap — no action + if (adx <= SWIPE_THRESHOLD && ady <= SWIPE_THRESHOLD) + return; // tap — no action if (ady >= adx) { - prv_navigate(dy < 0); // swipe up = next day (like DOWN), swipe down = previous + prv_navigate(dy < 0); // swipe up = next day (like DOWN), swipe down = previous } else if (dx > 0) { - prv_start_back_slide(); // swipe right = BACK, same glide + prv_start_back_slide(); // swipe right = BACK, same glide } } } #endif // ---- Hold-to-scroll with acceleration (raw click subscriber + AppTimer) ---- -// Ported verbatim from the original main screen (the original condensed build's weather.c): a single tap steps one -// day; holding UP/DOWN kicks off a timer that steps repeatedly, shrinking the interval by 50ms each -// step (from 300ms down to a 90ms floor) so the scroll speeds up the longer it is held. -#define HOLD_INITIAL_MS 300 -#define HOLD_MIN_MS 90 +// Ported verbatim from the original main screen (the original condensed build's weather.c): a +// single tap steps one day; holding UP/DOWN kicks off a timer that steps repeatedly, shrinking the +// interval by 50ms each step (from 300ms down to a 90ms floor) so the scroll speeds up the longer +// it is held. +#define HOLD_INITIAL_MS 300 +#define HOLD_MIN_MS 90 -static AppTimer *s_hold_timer = NULL; -static bool s_hold_is_down = false; -static int s_hold_repeat = 0; +static AppTimer *s_hold_timer = NULL; +static bool s_hold_is_down = false; +static int s_hold_repeat = 0; static void prv_hold_timer_cb(void *ctx) { s_hold_timer = NULL; - if (!s_report) return; + if (!s_report) + return; prv_navigate(s_hold_is_down); s_hold_repeat++; int interval = HOLD_INITIAL_MS - s_hold_repeat * 50; - if (interval < HOLD_MIN_MS) interval = HOLD_MIN_MS; + if (interval < HOLD_MIN_MS) + interval = HOLD_MIN_MS; s_hold_timer = app_timer_register(interval, prv_hold_timer_cb, NULL); } static void prv_raw_up_down(ButtonId btn, bool pressed) { - if (!s_report) return; + if (!s_report) + return; if (pressed) { s_hold_is_down = (btn == BUTTON_ID_DOWN); - s_hold_repeat = 0; - if (s_hold_timer) { app_timer_cancel(s_hold_timer); s_hold_timer = NULL; } + s_hold_repeat = 0; + if (s_hold_timer) { + app_timer_cancel(s_hold_timer); + s_hold_timer = NULL; + } s_hold_timer = app_timer_register(HOLD_INITIAL_MS, prv_hold_timer_cb, NULL); } else { - if (s_hold_timer) { app_timer_cancel(s_hold_timer); s_hold_timer = NULL; } + if (s_hold_timer) { + app_timer_cancel(s_hold_timer); + s_hold_timer = NULL; + } } } -static void prv_raw_up_pressed(ClickRecognizerRef r, void *ctx) { prv_raw_up_down(BUTTON_ID_UP, true); } -static void prv_raw_up_released(ClickRecognizerRef r, void *ctx) { prv_raw_up_down(BUTTON_ID_UP, false); } -static void prv_raw_down_pressed(ClickRecognizerRef r, void *ctx) { prv_raw_up_down(BUTTON_ID_DOWN, true); } -static void prv_raw_down_released(ClickRecognizerRef r, void *ctx){ prv_raw_up_down(BUTTON_ID_DOWN, false); } +static void prv_raw_up_pressed(ClickRecognizerRef r, void *ctx) { + prv_raw_up_down(BUTTON_ID_UP, true); +} +static void prv_raw_up_released(ClickRecognizerRef r, void *ctx) { + prv_raw_up_down(BUTTON_ID_UP, false); +} +static void prv_raw_down_pressed(ClickRecognizerRef r, void *ctx) { + prv_raw_up_down(BUTTON_ID_DOWN, true); +} +static void prv_raw_down_released(ClickRecognizerRef r, void *ctx) { + prv_raw_up_down(BUTTON_ID_DOWN, false); +} static void prv_click_provider(void *ctx) { // Single tap = one day; hold UP/DOWN = accelerating scroll (raw handlers drive the hold timer). - window_single_click_subscribe(BUTTON_ID_UP, prv_click_up_down); + window_single_click_subscribe(BUTTON_ID_UP, prv_click_up_down); window_single_click_subscribe(BUTTON_ID_DOWN, prv_click_up_down); - window_raw_click_subscribe(BUTTON_ID_UP, prv_raw_up_pressed, prv_raw_up_released, NULL); + window_raw_click_subscribe(BUTTON_ID_UP, prv_raw_up_pressed, prv_raw_up_released, NULL); window_raw_click_subscribe(BUTTON_ID_DOWN, prv_raw_down_pressed, prv_raw_down_released, NULL); window_single_click_subscribe(BUTTON_ID_BACK, prv_click_back); } @@ -208,12 +237,15 @@ static void prv_click_provider(void *ctx) { // The location bar's HH:MM needs a once-a-minute tick. Never overlaps clock_face's // subscription — nothing stacks on top of this window. static void prv_minute_tick(struct tm *tick_time, TimeUnits units_changed) { - (void)tick_time; (void)units_changed; - if (s_report) layer_mark_dirty(s_report->layout.root_layer); + (void)tick_time; + (void)units_changed; + if (s_report) + layer_mark_dirty(s_report->layout.root_layer); } static void prv_window_load(Window *window) { - if (!s_report) return; + if (!s_report) + return; GRect bounds = layer_get_bounds(window_get_root_layer(window)); weather_app_layout_init(&s_report->layout, &bounds); layer_add_child(window_get_root_layer(window), s_report->layout.root_layer); @@ -233,16 +265,19 @@ static void prv_window_load(Window *window) { static void prv_slide_in_update(Animation *anim, AnimationProgress progress) { (void)anim; - if (!s_report) return; + if (!s_report) + return; Layer *root = s_report->layout.root_layer; const int w = layer_get_bounds(root).size.w; GRect f = layer_get_frame_by_value(root); - f.origin.x = (int)interpolate_moook(progress, w, 0); // slide in from the right (+w -> 0) + f.origin.x = (int)interpolate_moook(progress, w, 0); // slide in from the right (+w -> 0) layer_set_frame(root, f); } static void prv_slide_in_stopped(Animation *anim, bool finished, void *context) { - (void)anim; (void)finished; (void)context; + (void)anim; + (void)finished; + (void)context; s_slide_in_anim = NULL; if (s_report) { Layer *root = s_report->layout.root_layer; @@ -254,32 +289,36 @@ static void prv_slide_in_stopped(Animation *anim, bool finished, void *context) animation_destroy(anim); } -static const AnimationImplementation s_slide_in_impl = { .update = prv_slide_in_update }; +static const AnimationImplementation s_slide_in_impl = {.update = prv_slide_in_update}; static void prv_start_slide_in(void) { - if (!s_report || s_slide_in_anim) return; + if (!s_report || s_slide_in_anim) + return; Layer *root = s_report->layout.root_layer; const int w = layer_get_bounds(root).size.w; GRect f = layer_get_frame_by_value(root); - f.origin.x = w; // start the whole page off the right edge + f.origin.x = w; // start the whole page off the right edge layer_set_frame(root, f); s_slide_in_anim = animation_create(); animation_set_implementation(s_slide_in_anim, &s_slide_in_impl); - animation_set_duration(s_slide_in_anim, interpolate_moook_duration()); // full moook — - // Timeline's day-text intro length, bounce included + animation_set_duration( + s_slide_in_anim, + interpolate_moook_duration()); // full moook — + // Timeline's day-text intro length, bounce included animation_set_curve(s_slide_in_anim, AnimationCurveLinear); - animation_set_handlers(s_slide_in_anim, - (AnimationHandlers){ .stopped = prv_slide_in_stopped }, NULL); + animation_set_handlers(s_slide_in_anim, (AnimationHandlers){.stopped = prv_slide_in_stopped}, + NULL); animation_schedule(s_slide_in_anim); } static void prv_window_appear(Window *window) { #ifdef CONFIG_TOUCH - if (s_report) touch_service_subscribe(prv_touch_handler, s_report); + if (s_report) + touch_service_subscribe(prv_touch_handler, s_report); #endif if (s_report && s_pending_static_in) { s_pending_static_in = false; - prv_start_slide_in(); // the scene's finale: Timeline moook slide from the right + prv_start_slide_in(); // the scene's finale: Timeline moook slide from the right } } @@ -288,7 +327,10 @@ static void prv_window_unload(Window *window) { touch_service_unsubscribe(); #endif tick_timer_service_unsubscribe(); - if (s_hold_timer) { app_timer_cancel(s_hold_timer); s_hold_timer = NULL; } + if (s_hold_timer) { + app_timer_cancel(s_hold_timer); + s_hold_timer = NULL; + } // Module-level animations: null-first, then unschedule (the synchronous .stopped // handlers see nulled handles and only destroy) — so a re-push can't find stale // handles or animate the next instance's layers. Mirrors the rect arm. @@ -303,7 +345,8 @@ static void prv_window_unload(Window *window) { animation_unschedule(a); } if (s_report) { - weather_app_layout_deinit(&s_report->layout); // cancels glow/icon/fin timers, frees layers+bitmaps + weather_app_layout_deinit( + &s_report->layout); // cancels glow/icon/fin timers, frees layers+bitmaps } window_destroy(window); if (s_report) { @@ -312,16 +355,19 @@ static void prv_window_unload(Window *window) { } } -void weather_report_push(const WeatherLocationForecast *days, size_t num_days, int start_day_index) { +void weather_report_push(const WeatherLocationForecast *days, size_t num_days, + int start_day_index) { // Consume the entrance latch up front so NO early return (guard, alloc, window failure) // can leave it armed for an unrelated future push; re-armed below just before the push. // static_in also suppresses the compositor's own push animation, so the moook slide is // the ONLY motion (two competing slides read as a stutter). const bool static_in = s_pending_static_in; s_pending_static_in = false; - if (s_report || !days || num_days == 0) return; + if (s_report || !days || num_days == 0) + return; s_report = calloc(1, sizeof(WeatherReportData)); - if (!s_report) return; + if (!s_report) + return; s_report->days = days; s_report->num_days = num_days; s_report->current_day_index = @@ -334,12 +380,12 @@ void weather_report_push(const WeatherLocationForecast *days, size_t num_days, i } window_set_background_color(s_report->window, GColorWhite); window_set_window_handlers(s_report->window, (WindowHandlers){ - .load = prv_window_load, - .appear = prv_window_appear, - .unload = prv_window_unload, - }); + .load = prv_window_load, + .appear = prv_window_appear, + .unload = prv_window_unload, + }); window_set_click_config_provider(s_report->window, prv_click_provider); - s_pending_static_in = static_in; // re-arm for prv_window_appear (-> the moook slide-in) + s_pending_static_in = static_in; // re-arm for prv_window_appear (-> the moook slide-in) window_stack_push(s_report->window, !static_in); } @@ -351,14 +397,15 @@ bool weather_report_is_showing(void) { // place and can SHRINK, e.g. a location change to a v3-only record) — without this the view // keeps navigating over the previous city's stale day slots. No-op when not showing. void weather_report_update_data(const WeatherLocationForecast *days, size_t num_days) { - if (!s_report || !days || num_days == 0) return; + if (!s_report || !days || num_days == 0) + return; s_report->days = days; s_report->num_days = num_days; if (s_report->current_day_index >= (int)num_days) { s_report->current_day_index = (int)num_days - 1; } - if (s_report->layout.root_layer) { // update_data-before-load guard - prv_seed_day(s_report->current_day_index); // re-seed: may be a different city now + if (s_report->layout.root_layer) { // update_data-before-load guard + prv_seed_day(s_report->current_day_index); // re-seed: may be a different city now } } @@ -379,12 +426,12 @@ void weather_report_update_data(const WeatherLocationForecast *days, size_t num_ typedef struct { Window *window; WeatherAppLayout layout; - const WeatherLocationForecast *days; // borrowed; owned by weather.c (app-lifetime) + const WeatherLocationForecast *days; // borrowed; owned by weather.c (app-lifetime) size_t num_days; - int current_day_index; + int current_day_index; #ifdef CONFIG_TOUCH int16_t touch_start_x, touch_start_y; // Touchdown origin for swipe detection - bool touch_active; + bool touch_active; #endif } WeatherReportData; @@ -404,7 +451,7 @@ void weather_report_reset(void) { // last day. Pointers are borrowed straight from days[] (the layout stores them without copying). static void prv_seed_day(int i) { const WeatherLocationForecast *today = &s_report->days[i]; - const WeatherLocationForecast *next = + const WeatherLocationForecast *next = (i + 1 < (int)s_report->num_days) ? &s_report->days[i + 1] : NULL; weather_app_layout_set_fin_allowed(&s_report->layout, s_report->num_days > 1 && i + 1 >= (int)s_report->num_days); @@ -419,18 +466,21 @@ static void prv_seed_day(int i) { // hold-scroll timer) are fine: weather_app_layout_animate cancels the in-flight arc and restarts, // so an accelerating hold fast-forwards through the days. static void prv_navigate(bool is_down) { - if (!s_report || s_slide_in_anim) return; // entrance gate + if (!s_report || s_slide_in_anim) + return; // entrance gate int i = s_report->current_day_index; if (is_down) { - if (i + 1 >= (int)s_report->num_days) return; // already at the last day + if (i + 1 >= (int)s_report->num_days) + return; // already at the last day i++; } else { - if (i <= 0) return; // already at today + if (i <= 0) + return; // already at today i--; } s_report->current_day_index = i; const WeatherLocationForecast *new_today = &s_report->days[i]; - const WeatherLocationForecast *new_next = + const WeatherLocationForecast *new_next = (i + 1 < (int)s_report->num_days) ? &s_report->days[i + 1] : NULL; weather_app_layout_set_fin_allowed(&s_report->layout, s_report->num_days > 1 && i + 1 >= (int)s_report->num_days); @@ -438,83 +488,104 @@ static void prv_navigate(bool is_down) { } static void prv_click_up_down(ClickRecognizerRef r, void *ctx) { - if (!s_report) return; + if (!s_report) + return; prv_navigate(click_recognizer_get_button_id(r) == BUTTON_ID_DOWN); } static void prv_click_back(ClickRecognizerRef r, void *ctx) { - window_stack_pop(true); // back to the forecast list + window_stack_pop(true); // back to the forecast list } // ---- Touch input (touch colour platforms) ---- #ifdef CONFIG_TOUCH -#define SWIPE_THRESHOLD 20 // px; same tap/swipe split as the other screens +#define SWIPE_THRESHOLD 20 // px; same tap/swipe split as the other screens static void prv_touch_handler(const TouchEvent *event, void *context) { (void)context; - if (!s_report) return; + if (!s_report) + return; if (event->type == TouchEvent_Touchdown) { s_report->touch_start_x = event->x; s_report->touch_start_y = event->y; - s_report->touch_active = true; + s_report->touch_active = true; } else if (event->type == TouchEvent_Liftoff && s_report->touch_active) { s_report->touch_active = false; int16_t dx = event->x - s_report->touch_start_x; int16_t dy = event->y - s_report->touch_start_y; int16_t adx = dx < 0 ? -dx : dx; int16_t ady = dy < 0 ? -dy : dy; - if (adx <= SWIPE_THRESHOLD && ady <= SWIPE_THRESHOLD) return; // tap — no action + if (adx <= SWIPE_THRESHOLD && ady <= SWIPE_THRESHOLD) + return; // tap — no action if (ady >= adx) { - prv_navigate(dy < 0); // swipe up = next day (like DOWN), swipe down = previous + prv_navigate(dy < 0); // swipe up = next day (like DOWN), swipe down = previous } else if (dx > 0) { - window_stack_pop(true); // swipe right = BACK to the forecast list + window_stack_pop(true); // swipe right = BACK to the forecast list } } } #endif // ---- Hold-to-scroll with acceleration (raw click subscriber + AppTimer) ---- -// The original condensed build's contract, verbatim timing: a single tap steps one day; holding UP/DOWN kicks -// off a timer that steps repeatedly, shrinking the interval by 50ms each step (300ms -> 90ms). -#define HOLD_INITIAL_MS 300 -#define HOLD_MIN_MS 90 +// The original condensed build's contract, verbatim timing: a single tap steps one day; holding +// UP/DOWN kicks off a timer that steps repeatedly, shrinking the interval by 50ms each step (300ms +// -> 90ms). +#define HOLD_INITIAL_MS 300 +#define HOLD_MIN_MS 90 -static AppTimer *s_hold_timer = NULL; -static bool s_hold_is_down = false; -static int s_hold_repeat = 0; +static AppTimer *s_hold_timer = NULL; +static bool s_hold_is_down = false; +static int s_hold_repeat = 0; static void prv_hold_timer_cb(void *ctx) { s_hold_timer = NULL; - if (!s_report) return; + if (!s_report) + return; prv_navigate(s_hold_is_down); s_hold_repeat++; int interval = HOLD_INITIAL_MS - s_hold_repeat * 50; - if (interval < HOLD_MIN_MS) interval = HOLD_MIN_MS; + if (interval < HOLD_MIN_MS) + interval = HOLD_MIN_MS; s_hold_timer = app_timer_register(interval, prv_hold_timer_cb, NULL); } static void prv_raw_up_down(ButtonId btn, bool pressed) { - if (!s_report) return; + if (!s_report) + return; if (pressed) { s_hold_is_down = (btn == BUTTON_ID_DOWN); - s_hold_repeat = 0; - if (s_hold_timer) { app_timer_cancel(s_hold_timer); s_hold_timer = NULL; } + s_hold_repeat = 0; + if (s_hold_timer) { + app_timer_cancel(s_hold_timer); + s_hold_timer = NULL; + } s_hold_timer = app_timer_register(HOLD_INITIAL_MS, prv_hold_timer_cb, NULL); } else { - if (s_hold_timer) { app_timer_cancel(s_hold_timer); s_hold_timer = NULL; } + if (s_hold_timer) { + app_timer_cancel(s_hold_timer); + s_hold_timer = NULL; + } } } -static void prv_raw_up_pressed(ClickRecognizerRef r, void *ctx) { prv_raw_up_down(BUTTON_ID_UP, true); } -static void prv_raw_up_released(ClickRecognizerRef r, void *ctx) { prv_raw_up_down(BUTTON_ID_UP, false); } -static void prv_raw_down_pressed(ClickRecognizerRef r, void *ctx) { prv_raw_up_down(BUTTON_ID_DOWN, true); } -static void prv_raw_down_released(ClickRecognizerRef r, void *ctx){ prv_raw_up_down(BUTTON_ID_DOWN, false); } +static void prv_raw_up_pressed(ClickRecognizerRef r, void *ctx) { + prv_raw_up_down(BUTTON_ID_UP, true); +} +static void prv_raw_up_released(ClickRecognizerRef r, void *ctx) { + prv_raw_up_down(BUTTON_ID_UP, false); +} +static void prv_raw_down_pressed(ClickRecognizerRef r, void *ctx) { + prv_raw_up_down(BUTTON_ID_DOWN, true); +} +static void prv_raw_down_released(ClickRecognizerRef r, void *ctx) { + prv_raw_up_down(BUTTON_ID_DOWN, false); +} static void prv_click_provider(void *ctx) { // Single tap = one day; hold UP/DOWN = accelerating scroll (raw handlers drive the hold timer). - window_single_click_subscribe(BUTTON_ID_UP, prv_click_up_down); + window_single_click_subscribe(BUTTON_ID_UP, prv_click_up_down); window_single_click_subscribe(BUTTON_ID_DOWN, prv_click_up_down); - window_raw_click_subscribe(BUTTON_ID_UP, prv_raw_up_pressed, prv_raw_up_released, NULL); + window_raw_click_subscribe(BUTTON_ID_UP, prv_raw_up_pressed, prv_raw_up_released, NULL); window_raw_click_subscribe(BUTTON_ID_DOWN, prv_raw_down_pressed, prv_raw_down_released, NULL); window_single_click_subscribe(BUTTON_ID_BACK, prv_click_back); } @@ -526,16 +597,19 @@ static void prv_click_provider(void *ctx) { static void prv_slide_in_update(Animation *anim, AnimationProgress progress) { (void)anim; - if (!s_report) return; + if (!s_report) + return; Layer *root = s_report->layout.root_layer; const int w = layer_get_bounds(root).size.w; GRect f = layer_get_frame_by_value(root); - f.origin.x = (int)interpolate_moook(progress, w, 0); // slide in from the right (+w -> 0) + f.origin.x = (int)interpolate_moook(progress, w, 0); // slide in from the right (+w -> 0) layer_set_frame(root, f); } static void prv_slide_in_stopped(Animation *anim, bool finished, void *context) { - (void)anim; (void)finished; (void)context; + (void)anim; + (void)finished; + (void)context; s_slide_in_anim = NULL; if (s_report) { Layer *root = s_report->layout.root_layer; @@ -547,29 +621,33 @@ static void prv_slide_in_stopped(Animation *anim, bool finished, void *context) animation_destroy(anim); } -static const AnimationImplementation s_slide_in_impl = { .update = prv_slide_in_update }; +static const AnimationImplementation s_slide_in_impl = {.update = prv_slide_in_update}; static void prv_start_slide_in(void) { - if (!s_report || s_slide_in_anim) return; + if (!s_report || s_slide_in_anim) + return; Layer *root = s_report->layout.root_layer; const int w = layer_get_bounds(root).size.w; GRect f = layer_get_frame_by_value(root); - f.origin.x = w; // start the whole page off the right edge + f.origin.x = w; // start the whole page off the right edge layer_set_frame(root, f); s_slide_in_anim = animation_create(); animation_set_implementation(s_slide_in_anim, &s_slide_in_impl); - animation_set_duration(s_slide_in_anim, interpolate_moook_duration()); // full moook — - // Timeline's day-text intro length, bounce included + animation_set_duration( + s_slide_in_anim, + interpolate_moook_duration()); // full moook — + // Timeline's day-text intro length, bounce included animation_set_curve(s_slide_in_anim, AnimationCurveLinear); - animation_set_handlers(s_slide_in_anim, - (AnimationHandlers){ .stopped = prv_slide_in_stopped }, NULL); + animation_set_handlers(s_slide_in_anim, (AnimationHandlers){.stopped = prv_slide_in_stopped}, + NULL); animation_schedule(s_slide_in_anim); } // ---- Window lifecycle ---- static void prv_window_load(Window *window) { - if (!s_report) return; + if (!s_report) + return; GRect bounds = layer_get_bounds(window_get_root_layer(window)); weather_app_layout_init(&s_report->layout, &bounds); layer_add_child(window_get_root_layer(window), s_report->layout.root_layer); @@ -578,11 +656,12 @@ static void prv_window_load(Window *window) { static void prv_window_appear(Window *window) { #ifdef CONFIG_TOUCH - if (s_report) touch_service_subscribe(prv_touch_handler, s_report); + if (s_report) + touch_service_subscribe(prv_touch_handler, s_report); #endif if (s_report && s_pending_static_in) { s_pending_static_in = false; - prv_start_slide_in(); // the scene's finale: Timeline moook slide from the right + prv_start_slide_in(); // the scene's finale: Timeline moook slide from the right } } @@ -590,7 +669,10 @@ static void prv_window_unload(Window *window) { #ifdef CONFIG_TOUCH touch_service_unsubscribe(); #endif - if (s_hold_timer) { app_timer_cancel(s_hold_timer); s_hold_timer = NULL; } + if (s_hold_timer) { + app_timer_cancel(s_hold_timer); + s_hold_timer = NULL; + } // Module-level animations: null-first, then unschedule (the synchronous .stopped // handlers see nulled handles and only destroy) — so a re-push can't find stale // handles or animate the next instance's layers. @@ -609,14 +691,17 @@ static void prv_window_unload(Window *window) { } } -void weather_report_push(const WeatherLocationForecast *days, size_t num_days, int start_day_index) { +void weather_report_push(const WeatherLocationForecast *days, size_t num_days, + int start_day_index) { // Consume the entrance latch up front so NO early return (guard, alloc, window failure) // can leave it armed for an unrelated future push; re-armed below just before the push. const bool static_in = s_pending_static_in; s_pending_static_in = false; - if (s_report || !days || num_days == 0) return; + if (s_report || !days || num_days == 0) + return; s_report = calloc(1, sizeof(WeatherReportData)); - if (!s_report) return; + if (!s_report) + return; s_report->days = days; s_report->num_days = num_days; s_report->current_day_index = @@ -629,12 +714,12 @@ void weather_report_push(const WeatherLocationForecast *days, size_t num_days, i } window_set_background_color(s_report->window, GColorWhite); window_set_window_handlers(s_report->window, (WindowHandlers){ - .load = prv_window_load, - .appear = prv_window_appear, - .unload = prv_window_unload, - }); + .load = prv_window_load, + .appear = prv_window_appear, + .unload = prv_window_unload, + }); window_set_click_config_provider(s_report->window, prv_click_provider); - s_pending_static_in = static_in; // re-arm for prv_window_appear (-> the moook slide-in) + s_pending_static_in = static_in; // re-arm for prv_window_appear (-> the moook slide-in) window_stack_push(s_report->window, !static_in); } @@ -646,14 +731,15 @@ bool weather_report_is_showing(void) { // place and can SHRINK, e.g. a location change to a v3-only record) — without this the view // keeps navigating over the previous city's stale day slots. No-op when not showing. void weather_report_update_data(const WeatherLocationForecast *days, size_t num_days) { - if (!s_report || !days || num_days == 0) return; + if (!s_report || !days || num_days == 0) + return; s_report->days = days; s_report->num_days = num_days; if (s_report->current_day_index >= (int)num_days) { s_report->current_day_index = (int)num_days - 1; } - if (s_report->layout.root_layer) { // update_data-before-load guard - prv_seed_day(s_report->current_day_index); // re-seed: may be a different city now + if (s_report->layout.root_layer) { // update_data-before-load guard + prv_seed_day(s_report->current_day_index); // re-seed: may be a different city now } } diff --git a/src/fw/apps/system/weather/weather_report.h b/src/fw/apps/system/weather/weather_report.h index ddda58aa7c..744e7e7b2d 100644 --- a/src/fw/apps/system/weather/weather_report.h +++ b/src/fw/apps/system/weather/weather_report.h @@ -18,7 +18,6 @@ void weather_report_reset(void); void weather_report_push(const WeatherLocationForecast *days, size_t num_days, int start_day_index); - // Arm a hard-cut entrance for the NEXT push (no system slide, no slide-in) — used when a // transition scene (the unfold) has already delivered the entrance. Rect only. void weather_report_arm_static_in(void); diff --git a/src/fw/apps/system/weather/weather_types.c b/src/fw/apps/system/weather/weather_types.c index 76a1b9016c..d59184a131 100644 --- a/src/fw/apps/system/weather/weather_types.c +++ b/src/fw/apps/system/weather/weather_types.c @@ -11,32 +11,27 @@ static int weather_type_slot_index(WeatherType weather_type) { GColor weather_type_bg_color(WeatherType weather_type) { static const GColor s_colors[] = { - GColorChromeYellow, // PartlyCloudy - GColorLightGray, // CloudyDay - GColorElectricBlue, // LightSnow - GColorPictonBlue, // LightRain - GColorBlueMoon, // HeavyRain - GColorTiffanyBlue, // HeavySnow - GColorLightGray, // Generic - GColorOrange, // Sun - GColorMidnightGreen, // RainAndSnow - GColorLightGray, // Unknown + GColorChromeYellow, // PartlyCloudy + GColorLightGray, // CloudyDay + GColorElectricBlue, // LightSnow + GColorPictonBlue, // LightRain + GColorBlueMoon, // HeavyRain + GColorTiffanyBlue, // HeavySnow + GColorLightGray, // Generic + GColorOrange, // Sun + GColorMidnightGreen, // RainAndSnow + GColorLightGray, // Unknown }; return s_colors[weather_type_slot_index(weather_type)]; } uint32_t weather_type_icon_tiny_resource(WeatherType weather_type) { static const uint16_t s_resources[] = { - RESOURCE_ID_IMAGE_PARTLY_CLOUDY_TINY, - RESOURCE_ID_IMAGE_CLOUDY_DAY_TINY, - RESOURCE_ID_IMAGE_LIGHT_SNOW_TINY, - RESOURCE_ID_IMAGE_LIGHT_RAIN_TINY, - RESOURCE_ID_IMAGE_HEAVY_RAIN_TINY, - RESOURCE_ID_IMAGE_HEAVY_SNOW_TINY, - RESOURCE_ID_IMAGE_GENERIC_WEATHER_TINY, - RESOURCE_ID_IMAGE_SUNNY_DAY_TINY, - RESOURCE_ID_IMAGE_RAIN_AND_SNOW_TINY, - RESOURCE_ID_IMAGE_GENERIC_WEATHER_TINY, + RESOURCE_ID_IMAGE_PARTLY_CLOUDY_TINY, RESOURCE_ID_IMAGE_CLOUDY_DAY_TINY, + RESOURCE_ID_IMAGE_LIGHT_SNOW_TINY, RESOURCE_ID_IMAGE_LIGHT_RAIN_TINY, + RESOURCE_ID_IMAGE_HEAVY_RAIN_TINY, RESOURCE_ID_IMAGE_HEAVY_SNOW_TINY, + RESOURCE_ID_IMAGE_GENERIC_WEATHER_TINY, RESOURCE_ID_IMAGE_SUNNY_DAY_TINY, + RESOURCE_ID_IMAGE_RAIN_AND_SNOW_TINY, RESOURCE_ID_IMAGE_GENERIC_WEATHER_TINY, }; return s_resources[weather_type_slot_index(weather_type)]; } @@ -45,16 +40,25 @@ uint32_t weather_type_icon_small_resource(WeatherType weather_type) { #if PBL_DISPLAY_HEIGHT >= 200 // Every SMALL id sits exactly one above its TINY twin — except Sun, whose // SMALL is a separate legacy asset. Asserts pin the id-order invariant. - _Static_assert(RESOURCE_ID_IMAGE_PARTLY_CLOUDY_SMALL == RESOURCE_ID_IMAGE_PARTLY_CLOUDY_TINY + 1, "id order"); - _Static_assert(RESOURCE_ID_IMAGE_CLOUDY_DAY_SMALL == RESOURCE_ID_IMAGE_CLOUDY_DAY_TINY + 1, "id order"); - _Static_assert(RESOURCE_ID_IMAGE_LIGHT_SNOW_SMALL == RESOURCE_ID_IMAGE_LIGHT_SNOW_TINY + 1, "id order"); - _Static_assert(RESOURCE_ID_IMAGE_LIGHT_RAIN_SMALL == RESOURCE_ID_IMAGE_LIGHT_RAIN_TINY + 1, "id order"); - _Static_assert(RESOURCE_ID_IMAGE_HEAVY_RAIN_SMALL == RESOURCE_ID_IMAGE_HEAVY_RAIN_TINY + 1, "id order"); - _Static_assert(RESOURCE_ID_IMAGE_HEAVY_SNOW_SMALL == RESOURCE_ID_IMAGE_HEAVY_SNOW_TINY + 1, "id order"); - _Static_assert(RESOURCE_ID_IMAGE_GENERIC_WEATHER_SMALL == RESOURCE_ID_IMAGE_GENERIC_WEATHER_TINY + 1, "id order"); - _Static_assert(RESOURCE_ID_IMAGE_RAIN_AND_SNOW_SMALL == RESOURCE_ID_IMAGE_RAIN_AND_SNOW_TINY + 1, "id order"); + _Static_assert(RESOURCE_ID_IMAGE_PARTLY_CLOUDY_SMALL == RESOURCE_ID_IMAGE_PARTLY_CLOUDY_TINY + 1, + "id order"); + _Static_assert(RESOURCE_ID_IMAGE_CLOUDY_DAY_SMALL == RESOURCE_ID_IMAGE_CLOUDY_DAY_TINY + 1, + "id order"); + _Static_assert(RESOURCE_ID_IMAGE_LIGHT_SNOW_SMALL == RESOURCE_ID_IMAGE_LIGHT_SNOW_TINY + 1, + "id order"); + _Static_assert(RESOURCE_ID_IMAGE_LIGHT_RAIN_SMALL == RESOURCE_ID_IMAGE_LIGHT_RAIN_TINY + 1, + "id order"); + _Static_assert(RESOURCE_ID_IMAGE_HEAVY_RAIN_SMALL == RESOURCE_ID_IMAGE_HEAVY_RAIN_TINY + 1, + "id order"); + _Static_assert(RESOURCE_ID_IMAGE_HEAVY_SNOW_SMALL == RESOURCE_ID_IMAGE_HEAVY_SNOW_TINY + 1, + "id order"); + _Static_assert( + RESOURCE_ID_IMAGE_GENERIC_WEATHER_SMALL == RESOURCE_ID_IMAGE_GENERIC_WEATHER_TINY + 1, + "id order"); + _Static_assert(RESOURCE_ID_IMAGE_RAIN_AND_SNOW_SMALL == RESOURCE_ID_IMAGE_RAIN_AND_SNOW_TINY + 1, + "id order"); if (weather_type_slot_index(weather_type) == 7) { - return RESOURCE_ID_IMAGE_SUNNY_DAY_SMALL; // the one exception (slot 7 = Sun) + return RESOURCE_ID_IMAGE_SUNNY_DAY_SMALL; // the one exception (slot 7 = Sun) } return weather_type_icon_tiny_resource(weather_type) + 1; #else @@ -76,18 +80,27 @@ GColor weather_type_disc_color(WeatherType weather_type) { } void weather_icon_invert_ink(GBitmap *icon) { - if (!icon) return; + if (!icon) + return; GColor *palette = gbitmap_get_palette(icon); uint32_t entries = 0; switch (gbitmap_get_format(icon)) { - case GBitmapFormat1BitPalette: entries = 2; break; - case GBitmapFormat2BitPalette: entries = 4; break; - case GBitmapFormat4BitPalette: entries = 16; break; - default: break; // non-palettized: leave as-is + case GBitmapFormat1BitPalette: + entries = 2; + break; + case GBitmapFormat2BitPalette: + entries = 4; + break; + case GBitmapFormat4BitPalette: + entries = 16; + break; + default: + break; // non-palettized: leave as-is } - if (!palette) return; + if (!palette) + return; for (uint32_t i = 0; i < entries; i++) { - if (palette[i].a) { // leave transparency alone + if (palette[i].a) { // leave transparency alone palette[i].r = (uint8_t)(0b11 - palette[i].r); palette[i].g = (uint8_t)(0b11 - palette[i].g); palette[i].b = (uint8_t)(0b11 - palette[i].b); @@ -96,30 +109,30 @@ void weather_icon_invert_ink(GBitmap *icon) { } void weather_icon_draw(GContext *ctx, GBitmap *icon, GRect rect, bool invert_ink) { - if (!icon) return; + if (!icon) + return; graphics_context_set_compositing_mode(ctx, GCompOpSet); if (invert_ink) { weather_icon_invert_ink(icon); } graphics_draw_bitmap_in_rect(ctx, icon, rect); if (invert_ink) { - weather_icon_invert_ink(icon); // self-inverse restore — bitmaps are shared + weather_icon_invert_ink(icon); // self-inverse restore — bitmaps are shared } } uint32_t weather_type_icon_large_resource(WeatherType weather_type) { static const uint16_t s_resources[] = { - RESOURCE_ID_IMAGE_PARTLY_CLOUDY_LARGE, // 0 PartlyCloudy - RESOURCE_ID_IMAGE_CLOUDY_DAY_LARGE, // 1 CloudyDay - RESOURCE_ID_IMAGE_LIGHT_SNOW_LARGE, // 2 LightSnow - RESOURCE_ID_IMAGE_LIGHT_RAIN_LARGE, // 3 LightRain - RESOURCE_ID_IMAGE_HEAVY_RAIN_LARGE, // 4 HeavyRain - RESOURCE_ID_IMAGE_HEAVY_SNOW_LARGE, // 5 HeavySnow - RESOURCE_ID_IMAGE_GENERIC_WEATHER_LARGE, // 6 Generic - RESOURCE_ID_IMAGE_SUNNY_DAY_LARGE, // 7 Sun - RESOURCE_ID_IMAGE_RAIN_AND_SNOW_LARGE, // 8 RainAndSnow - RESOURCE_ID_IMAGE_GENERIC_WEATHER_LARGE, // 9 Unknown + RESOURCE_ID_IMAGE_PARTLY_CLOUDY_LARGE, // 0 PartlyCloudy + RESOURCE_ID_IMAGE_CLOUDY_DAY_LARGE, // 1 CloudyDay + RESOURCE_ID_IMAGE_LIGHT_SNOW_LARGE, // 2 LightSnow + RESOURCE_ID_IMAGE_LIGHT_RAIN_LARGE, // 3 LightRain + RESOURCE_ID_IMAGE_HEAVY_RAIN_LARGE, // 4 HeavyRain + RESOURCE_ID_IMAGE_HEAVY_SNOW_LARGE, // 5 HeavySnow + RESOURCE_ID_IMAGE_GENERIC_WEATHER_LARGE, // 6 Generic + RESOURCE_ID_IMAGE_SUNNY_DAY_LARGE, // 7 Sun + RESOURCE_ID_IMAGE_RAIN_AND_SNOW_LARGE, // 8 RainAndSnow + RESOURCE_ID_IMAGE_GENERIC_WEATHER_LARGE, // 9 Unknown }; return s_resources[weather_type_slot_index(weather_type)]; } - diff --git a/src/fw/apps/system/weather/weather_types.h b/src/fw/apps/system/weather/weather_types.h index 25442be7df..dbdb6a42df 100644 --- a/src/fw/apps/system/weather/weather_types.h +++ b/src/fw/apps/system/weather/weather_types.h @@ -8,44 +8,44 @@ #define WEATHER_SERVICE_LOCATION_FORECAST_UNKNOWN_TEMP (32767) // Message keys — must match messageKeys in package.json -#define MESSAGE_KEY_LOCATION_NAME 0 -#define MESSAGE_KEY_CURRENT_TEMP 1 -#define MESSAGE_KEY_DAY_INDEX 2 -#define MESSAGE_KEY_DAY_HIGH 3 -#define MESSAGE_KEY_DAY_LOW 4 -#define MESSAGE_KEY_DAY_WEATHER_TYPE 5 +#define MESSAGE_KEY_LOCATION_NAME 0 +#define MESSAGE_KEY_CURRENT_TEMP 1 +#define MESSAGE_KEY_DAY_INDEX 2 +#define MESSAGE_KEY_DAY_HIGH 3 +#define MESSAGE_KEY_DAY_LOW 4 +#define MESSAGE_KEY_DAY_WEATHER_TYPE 5 #define MESSAGE_KEY_DAY_WEATHER_PHRASE 6 -#define MESSAGE_KEY_DAY_LABEL 7 +#define MESSAGE_KEY_DAY_LABEL 7 // Hourly weather types: byte array of 24 values, one per hour 0-23. -#define MESSAGE_KEY_HOURLY_WEATHER 8 +#define MESSAGE_KEY_HOURLY_WEATHER 8 // Watch → JS: request an immediate data refresh. -#define MESSAGE_KEY_REFRESH_REQUEST 9 +#define MESSAGE_KEY_REFRESH_REQUEST 9 // Today's UV index (0-11), rain chance (%), and max wind speed (mph). -#define MESSAGE_KEY_DAY_UV 10 -#define MESSAGE_KEY_DAY_PRECIP 11 +#define MESSAGE_KEY_DAY_UV 10 +#define MESSAGE_KEY_DAY_PRECIP 11 // Hourly temperatures: byte array of 24 signed values (int8), one per hour 0-23. -#define MESSAGE_KEY_HOURLY_TEMP 12 +#define MESSAGE_KEY_HOURLY_TEMP 12 // Watch → JS: select a preset city by index. JS → Watch: request id echoed // in every response message so stale weather responses can be ignored. -#define MESSAGE_KEY_CITY_SELECT_INDEX 13 +#define MESSAGE_KEY_CITY_SELECT_INDEX 13 #define MESSAGE_KEY_WEATHER_REQUEST_ID 14 -#define MESSAGE_KEY_CURRENT_LATITUDE 15 -#define MESSAGE_KEY_CURRENT_LONGITUDE 16 +#define MESSAGE_KEY_CURRENT_LATITUDE 15 +#define MESSAGE_KEY_CURRENT_LONGITUDE 16 // (key 17 retired with the watch-side dictation add flow — locations are phone-owned) #define MESSAGE_KEY_CURRENT_LOCATION_REQUEST 18 -#define MESSAGE_KEY_DAY_WIND 19 +#define MESSAGE_KEY_DAY_WIND 19 typedef enum { WeatherType_PartlyCloudy = 0, - WeatherType_CloudyDay = 1, - WeatherType_LightSnow = 2, - WeatherType_LightRain = 3, - WeatherType_HeavyRain = 4, - WeatherType_HeavySnow = 5, - WeatherType_Generic = 6, - WeatherType_Sun = 7, - WeatherType_RainAndSnow = 8, - WeatherType_Unknown = 255, + WeatherType_CloudyDay = 1, + WeatherType_LightSnow = 2, + WeatherType_LightRain = 3, + WeatherType_HeavyRain = 4, + WeatherType_HeavySnow = 5, + WeatherType_Generic = 6, + WeatherType_Sun = 7, + WeatherType_RainAndSnow = 8, + WeatherType_Unknown = 255, } WeatherType; typedef struct WeatherLocationForecast { @@ -54,16 +54,17 @@ typedef struct WeatherLocationForecast { int current_temp; int today_high; int today_low; - int today_uv; // UV index 0-11, or -1 if unknown (the DAY's figure — Open-Meteo's - // daily uv_index_max, i.e. the peak; NOT a live reading) - int today_uv_now; // UV index for the CURRENT hour, -1 unknown. Needs the v4 minor-4 - // hourly UV block; falls back to today_uv until the phone sends it. - int today_precip_mm; // rain chance percent, or -1 if unknown + int today_uv; // UV index 0-11, or -1 if unknown (the DAY's figure — Open-Meteo's + // daily uv_index_max, i.e. the peak; NOT a live reading) + int today_uv_now; // UV index for the CURRENT hour, -1 unknown. Needs the v4 minor-4 + // hourly UV block; falls back to today_uv until the phone sends it. + int today_precip_mm; // rain chance percent, or -1 if unknown int today_wind_mph; - int today_wind_dir_deg; // dominant direction 0..359, -1 unknown (v4.3) // max wind speed in mph, or -1 if unknown - int today_feels; // feels-like temp, UNKNOWN_TEMP if unknown (today only) - int today_wmo; // WMO weather code, -1 if unknown (v4.2, today only) - int today_humidity; // relative humidity %, -1 if unknown (v4.2, today only) + int today_wind_dir_deg; // dominant direction 0..359, -1 unknown (v4.3) // max wind speed in + // mph, or -1 if unknown + int today_feels; // feels-like temp, UNKNOWN_TEMP if unknown (today only) + int today_wmo; // WMO weather code, -1 if unknown (v4.2, today only) + int today_humidity; // relative humidity %, -1 if unknown (v4.2, today only) int today_visibility_m; // minimum visibility in meters, -1 if unknown (v4.2, today only) int today_precip_sum_mm; // total precipitation in mm, -1 if unknown (v4.2, today only) WeatherType current_weather_type; diff --git a/src/fw/apps/system/workout/active.c b/src/fw/apps/system/workout/active.c index b783af9060..ac10b0a3e9 100644 --- a/src/fw/apps/system/workout/active.c +++ b/src/fw/apps/system/workout/active.c @@ -87,14 +87,13 @@ static void prv_draw_hr_measuring_node_callback(GContext *ctx, const GRect *box, //! Helpers static void prv_add_scrollable_metrics(WorkoutActiveWindow *active_window, - int num_scrollable_metrics, - WorkoutMetricType *metrics) { + int num_scrollable_metrics, WorkoutMetricType *metrics) { for (int i = 0; i < num_scrollable_metrics; i++) { active_window->scrollable_metrics[active_window->num_scrollable_metrics++] = metrics[i]; } } -static const char* prv_get_label_for_hr_metric(int bpm) { +static const char *prv_get_label_for_hr_metric(int bpm) { switch (hr_util_get_hr_zone(bpm)) { case HRZone_Zone1: /// Zone 1 HR Label @@ -111,11 +110,10 @@ static const char* prv_get_label_for_hr_metric(int bpm) { } } -static const char* prv_get_label_for_metric(WorkoutMetricType metric_type, +static const char *prv_get_label_for_metric(WorkoutMetricType metric_type, WorkoutActiveWindow *active_window) { switch (metric_type) { - case WorkoutMetricType_Hr: - { + case WorkoutMetricType_Hr: { int bpm = active_window->workout_controller->get_metric_value(WorkoutMetricType_Hr, active_window->workout_data); return prv_get_label_for_hr_metric(bpm); @@ -171,8 +169,7 @@ static const char* prv_get_label_for_metric(WorkoutMetricType metric_type, } static GColor prv_get_bg_color_for_metric(WorkoutMetricType metric_type, - WorkoutActiveWindow *active_window, - bool is_scrollable) { + WorkoutActiveWindow *active_window, bool is_scrollable) { #if PBL_BW return GColorWhite; #else @@ -217,9 +214,8 @@ static GFont prv_get_duration_font(void) { #endif } -static GTextNode* prv_create_text_node(WorkoutActiveWindow *active_window, - WorkoutMetricType metric_type, - bool prefer_larger_font, +static GTextNode *prv_create_text_node(WorkoutActiveWindow *active_window, + WorkoutMetricType metric_type, bool prefer_larger_font, void *i18n_owner) { GTextNodeHorizontal *horiz_container = graphics_text_node_create_horizontal(MAX_TEXT_NODES); GTextNodeContainer *container = &horiz_container->container; @@ -234,24 +230,22 @@ static GTextNode* prv_create_text_node(WorkoutActiveWindow *active_window, case WorkoutMetricType_Hr: { GPoint heart_node_offset = GPoint(2, prefer_larger_font ? 5 : 0); GTextNodeCustom *heart_node; - if (active_window->workout_controller->get_metric_value( - metric_type, active_window->workout_data) > 0) { + if (active_window->workout_controller->get_metric_value(metric_type, + active_window->workout_data) > 0) { const size_t buffer_size = sizeof("000"); - GTextNodeText *number_text_node = health_util_create_text_node(buffer_size, number_font, - TEXT_COLOR, container); - active_window->workout_controller->metric_to_string(metric_type, - (char *) number_text_node->text, - buffer_size, i18n_owner, - active_window->workout_data); + GTextNodeText *number_text_node = + health_util_create_text_node(buffer_size, number_font, TEXT_COLOR, container); + active_window->workout_controller->metric_to_string( + metric_type, (char *)number_text_node->text, buffer_size, i18n_owner, + active_window->workout_data); heart_node_offset.y += fonts_get_font_cap_offset(number_font); - heart_node = graphics_text_node_create_custom(prv_draw_heart_node_callback, - active_window); + heart_node = graphics_text_node_create_custom(prv_draw_heart_node_callback, active_window); } else { // if metric value is 0, we draw another icon that needs different offset heart_node_offset.x += 2; heart_node_offset.y += 7; - heart_node = graphics_text_node_create_custom(prv_draw_hr_measuring_node_callback, - active_window); + heart_node = + graphics_text_node_create_custom(prv_draw_hr_measuring_node_callback, active_window); } heart_node->node.offset = heart_node_offset; graphics_text_node_container_add_child(container, &heart_node->node); @@ -259,55 +253,50 @@ static GTextNode* prv_create_text_node(WorkoutActiveWindow *active_window, } case WorkoutMetricType_Steps: { const size_t buffer_size = sizeof("000000"); - GTextNodeText *number_text_node = health_util_create_text_node(buffer_size, number_font, - TEXT_COLOR, container); - active_window->workout_controller->metric_to_string(metric_type, - (char *) number_text_node->text, - buffer_size, i18n_owner, - active_window->workout_data); + GTextNodeText *number_text_node = + health_util_create_text_node(buffer_size, number_font, TEXT_COLOR, container); + active_window->workout_controller->metric_to_string( + metric_type, (char *)number_text_node->text, buffer_size, i18n_owner, + active_window->workout_data); break; } case WorkoutMetricType_Distance: { GTextNodeText *number_text_node = health_util_create_text_node( HEALTH_WHOLE_AND_DECIMAL_LENGTH, number_font, TEXT_COLOR, container); - active_window->workout_controller->metric_to_string(metric_type, - (char *) number_text_node->text, - HEALTH_WHOLE_AND_DECIMAL_LENGTH, - i18n_owner, - active_window->workout_data); + active_window->workout_controller->metric_to_string( + metric_type, (char *)number_text_node->text, HEALTH_WHOLE_AND_DECIMAL_LENGTH, i18n_owner, + active_window->workout_data); #if PBL_RECT /// MI/KM units string - const char *units_string = active_window->workout_controller->get_distance_string( - i18n_noop("MI"), i18n_noop("KM")); + const char *units_string = + active_window->workout_controller->get_distance_string(i18n_noop("MI"), i18n_noop("KM")); GTextNodeText *units_text_node = health_util_create_text_node_with_text( i18n_get(units_string, i18n_owner), units_font, TEXT_COLOR, container); units_text_node->node.offset.y = units_offset_y; #endif break; } - case WorkoutMetricType_Custom: - { + case WorkoutMetricType_Custom: { const size_t buffer_size = 20; - GTextNodeText *number_text_node = health_util_create_text_node(buffer_size, number_font, - TEXT_COLOR, container); + GTextNodeText *number_text_node = + health_util_create_text_node(buffer_size, number_font, TEXT_COLOR, container); number_text_node->overflow = GTextOverflowModeTrailingEllipsis; - active_window->workout_controller->metric_to_string(metric_type, - (char *) number_text_node->text, - buffer_size, i18n_owner, - active_window->workout_data); + active_window->workout_controller->metric_to_string( + metric_type, (char *)number_text_node->text, buffer_size, i18n_owner, + active_window->workout_data); if (strlen(number_text_node->text) > 5) { number_text_node->font = prv_get_number_font(false); } break; } - case WorkoutMetricType_Duration: - { + case WorkoutMetricType_Duration: { const size_t buffer_size = sizeof("00:00:00"); - GTextNodeText *number_text_node = health_util_create_text_node(buffer_size, number_font, - TEXT_COLOR, container); - active_window->workout_controller->metric_to_string(metric_type, - (char *)number_text_node->text, buffer_size, i18n_owner, active_window->workout_data); + GTextNodeText *number_text_node = + health_util_create_text_node(buffer_size, number_font, TEXT_COLOR, container); + active_window->workout_controller->metric_to_string( + metric_type, (char *)number_text_node->text, buffer_size, i18n_owner, + active_window->workout_data); if (strlen(number_text_node->text) > 5) { // text is long (includes hours) so use a font that fits the seconds @@ -316,30 +305,29 @@ static GTextNode* prv_create_text_node(WorkoutActiveWindow *active_window, break; } case WorkoutMetricType_Pace: - case WorkoutMetricType_AvgPace: - { + case WorkoutMetricType_AvgPace: { if (active_window->workout_controller->get_metric_value( - metric_type, active_window->workout_data) >= SECONDS_PER_HOUR) { - GTextNodeText *text_node = + metric_type, active_window->workout_data) >= SECONDS_PER_HOUR) { + GTextNodeText *text_node = health_util_create_text_node_with_text(EM_DASH, units_font, TEXT_COLOR, container); - text_node->node.offset.x += 1; - text_node->node.offset.y = units_offset_y; - } else { + text_node->node.offset.x += 1; + text_node->node.offset.y = units_offset_y; + } else { const size_t buffer_size = sizeof("00:00:00"); - GTextNodeText *number_text_node = health_util_create_text_node(buffer_size, number_font, - TEXT_COLOR, container); - active_window->workout_controller->metric_to_string(metric_type, - (char *)number_text_node->text, buffer_size, i18n_owner, active_window->workout_data); + GTextNodeText *number_text_node = + health_util_create_text_node(buffer_size, number_font, TEXT_COLOR, container); + active_window->workout_controller->metric_to_string( + metric_type, (char *)number_text_node->text, buffer_size, i18n_owner, + active_window->workout_data); #if PBL_RECT - GTextNodeText *divider_text_node = health_util_create_text_node_with_text( - "/", units_font, TEXT_COLOR, container); + GTextNodeText *divider_text_node = + health_util_create_text_node_with_text("/", units_font, TEXT_COLOR, container); divider_text_node->node.offset.y = units_offset_y; /// MI/KM units string - const char *units_string = - active_window->workout_controller->get_distance_string(i18n_noop("MI"), - i18n_noop("KM")); + const char *units_string = active_window->workout_controller->get_distance_string( + i18n_noop("MI"), i18n_noop("KM")); GTextNodeText *units_text_node = health_util_create_text_node_with_text( i18n_get(units_string, i18n_owner), units_font, TEXT_COLOR, container); units_text_node->node.offset.y = units_offset_y; @@ -347,19 +335,18 @@ static GTextNode* prv_create_text_node(WorkoutActiveWindow *active_window, } break; } - case WorkoutMetricType_Speed: - { + case WorkoutMetricType_Speed: { const size_t buffer_size = sizeof("00:00:00"); - GTextNodeText *number_text_node = health_util_create_text_node(buffer_size, number_font, - TEXT_COLOR, container); - active_window->workout_controller->metric_to_string(metric_type, - (char *)number_text_node->text, buffer_size, i18n_owner, active_window->workout_data); + GTextNodeText *number_text_node = + health_util_create_text_node(buffer_size, number_font, TEXT_COLOR, container); + active_window->workout_controller->metric_to_string( + metric_type, (char *)number_text_node->text, buffer_size, i18n_owner, + active_window->workout_data); #if PBL_RECT /// MI/KM units string - const char *units_string = - active_window->workout_controller->get_distance_string(i18n_noop("MPH"), - i18n_noop("KM/H")); + const char *units_string = active_window->workout_controller->get_distance_string( + i18n_noop("MPH"), i18n_noop("KM/H")); GTextNodeText *units_text_node = health_util_create_text_node_with_text( i18n_get(units_string, i18n_owner), units_font, TEXT_COLOR, container); units_text_node->node.offset.y = units_offset_y; @@ -413,13 +400,13 @@ static void prv_update_ui(WorkoutActiveWindow *active_window) { static void prv_hr_measuring_timer_callback(void *data) { WorkoutActiveWindow *active_window = data; - active_window->cur_hr_measuring_width_idx = (active_window->cur_hr_measuring_width_idx + 1) - % ARRAY_LENGTH(s_hr_measuring_widths); + active_window->cur_hr_measuring_width_idx = + (active_window->cur_hr_measuring_width_idx + 1) % ARRAY_LENGTH(s_hr_measuring_widths); prv_update_ui(active_window); - if (active_window->workout_controller->get_metric_value( - WorkoutMetricType_Hr, active_window->workout_data) == 0) { + if (active_window->workout_controller->get_metric_value(WorkoutMetricType_Hr, + active_window->workout_data) == 0) { int timeout_ms = (active_window->cur_hr_measuring_width_idx == 0) ? 800 : 200; active_window->hr_measuring_timer = app_timer_register(timeout_ms, prv_hr_measuring_timer_callback, active_window); @@ -438,8 +425,8 @@ static void prv_update_timer_callback(void *data) { prv_update_ui(active_window); active_window->update_timer = app_timer_register(1000, prv_update_timer_callback, active_window); - const int bpm = active_window->workout_controller->get_metric_value( - WorkoutMetricType_Hr, active_window->workout_data); + const int bpm = active_window->workout_controller->get_metric_value(WorkoutMetricType_Hr, + active_window->workout_data); if (bpm == 0 && !active_window->hr_measuring_timer) { active_window->cur_hr_measuring_width_idx = 0; prv_hr_measuring_timer_callback(active_window); @@ -449,8 +436,8 @@ static void prv_update_timer_callback(void *data) { //////////////////////////////////////////////////////////////////////////////////////////////////// //! Drawing -static void prv_draw_heart_icon(GContext *ctx, GBitmap *icon, const GRect *rect, - bool render, GSize *size_out) { +static void prv_draw_heart_icon(GContext *ctx, GBitmap *icon, const GRect *rect, bool render, + GSize *size_out) { if (render) { graphics_context_set_compositing_mode(ctx, GCompOpSet); graphics_draw_bitmap_in_rect(ctx, icon, rect); @@ -503,15 +490,11 @@ static void prv_render_metric_label(GContext *ctx, GRect *box, WorkoutMetricType overflow_mode = GTextOverflowModeTrailingEllipsis; } - graphics_context_set_text_color(ctx, TEXT_COLOR); graphics_draw_text(ctx, i18n_get(prv_get_label_for_metric(metric_type, active_window), i18n_owner), - fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD), - label_box, - overflow_mode, - TEXT_ALIGNMENT, - NULL); + fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD), label_box, overflow_mode, + TEXT_ALIGNMENT, NULL); } static void prv_render_hr_zones(GContext *ctx, GRect *box, WorkoutActiveWindow *active_window) { @@ -529,7 +512,7 @@ static void prv_render_hr_zones(GContext *ctx, GRect *box, WorkoutActiveWindow * for (HRZone i = HRZone_Zone1; i < HRZoneCount; i++) { if (i <= hr_util_get_hr_zone(active_window->workout_controller->get_metric_value( - WorkoutMetricType_Hr, active_window->workout_data))) { + WorkoutMetricType_Hr, active_window->workout_data))) { graphics_fill_rect(ctx, &zone_rect); } else { // drawing it twice to draw a 2px border @@ -558,8 +541,8 @@ static void prv_render_metric(GContext *ctx, WorkoutMetricType metric_type, Laye } else if (active_window->layout == WorkoutLayout_StaticAndScrollable) { rect.origin.y = prefer_larger_font ? PBL_IF_RECT_ELSE(2, 13) : PBL_IF_RECT_ELSE(5, 1); } else if (active_window->layout == WorkoutLayout_TwoStaticAndScrollable) { - rect.origin.y = (&active_window->scrollable_metric_layer == layer) ? - PBL_IF_RECT_ELSE(-2, 0) : PBL_IF_RECT_ELSE(-4, -2); + rect.origin.y = (&active_window->scrollable_metric_layer == layer) ? PBL_IF_RECT_ELSE(-2, 0) + : PBL_IF_RECT_ELSE(-4, -2); } // set the rect height so we don't wrap text to the next line @@ -592,8 +575,8 @@ static void prv_render_metric(GContext *ctx, WorkoutMetricType metric_type, Laye rect.origin.x -= PBL_IF_RECT_ELSE(1, 46); rect.size.w += (rl_margin * 2); - GTextNode *text_node = prv_create_text_node(active_window, metric_type, - prefer_larger_font, layer); + GTextNode *text_node = + prv_create_text_node(active_window, metric_type, prefer_larger_font, layer); graphics_text_node_draw(text_node, ctx, &rect, NULL, NULL); graphics_text_node_destroy(text_node); } @@ -708,7 +691,7 @@ static void prv_handle_pause_button(WorkoutActiveWindow *active_window) { } if (active_window->workout_controller) { - active_window->workout_controller->pause(!is_paused); + active_window->workout_controller->pause(!is_paused); } prv_update_ui(active_window); @@ -800,8 +783,7 @@ static void prv_window_unload_handler(Window *window) { //////////////////////////////////////////////////////////////////////////////////////////////////// //! Common Setup -static void prv_create_window_common(WorkoutActiveWindow *active_window, - void *workout_data, +static void prv_create_window_common(WorkoutActiveWindow *active_window, void *workout_data, WorkoutController *workout_controller) { active_window->workout_data = workout_data; active_window->workout_controller = workout_controller; @@ -811,8 +793,8 @@ static void prv_create_window_common(WorkoutActiveWindow *active_window, window_set_user_data(window, active_window); window_set_background_color(window, BACKGROUND_COLOR); window_set_window_handlers(window, &(WindowHandlers){ - .unload = prv_window_unload_handler, - }); + .unload = prv_window_unload_handler, + }); GRect base_layer_bounds = window->layer.bounds; #if PBL_RECT @@ -844,8 +826,8 @@ static void prv_create_window_common(WorkoutActiveWindow *active_window, GRect scrollable_metric_bounds = top_metric_bounds; scrollable_metric_bounds.origin.y = scrollable_metric_bounds.size.h; - scrollable_metric_bounds.size.h = window->layer.bounds.size.h - - scrollable_metric_bounds.origin.y; + scrollable_metric_bounds.size.h = + window->layer.bounds.size.h - scrollable_metric_bounds.origin.y; layer_init(&active_window->scrollable_metric_layer, &scrollable_metric_bounds); layer_set_update_proc(&active_window->scrollable_metric_layer, prv_scrollable_layer_update_proc); @@ -900,16 +882,11 @@ static void prv_create_window_common(WorkoutActiveWindow *active_window, active_window->hr_measuring_icon = gbitmap_create_with_resource(RESOURCE_ID_WORKOUT_APP_MEASURING_HR), - active_window->action_bar_start = - gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_START); - active_window->action_bar_pause = - gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_PAUSE); - active_window->action_bar_stop = - gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_STOP); - active_window->action_bar_more = - gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_MORE); - active_window->action_bar_next = - gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_TOGGLE); + active_window->action_bar_start = gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_START); + active_window->action_bar_pause = gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_PAUSE); + active_window->action_bar_stop = gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_STOP); + active_window->action_bar_more = gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_MORE); + active_window->action_bar_next = gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_TOGGLE); prv_set_pause_button(active_window); prv_set_action_bar_icons(active_window); @@ -917,7 +894,6 @@ static void prv_create_window_common(WorkoutActiveWindow *active_window, active_window->update_timer = app_timer_register(1000, prv_update_timer_callback, active_window); } - //////////////////////////////////////////////////////////////////////////////////////////////////// //! Public API @@ -984,71 +960,58 @@ WorkoutActiveWindow *workout_active_create_triple_layout(WorkoutMetricType top_m return active_window; } -WorkoutActiveWindow *workout_active_create_for_activity_type(ActivitySessionType type, - void *workout_data, WorkoutController *workout_controller) { +WorkoutActiveWindow *workout_active_create_for_activity_type( + ActivitySessionType type, void *workout_data, WorkoutController *workout_controller) { const bool hrm_is_available = activity_is_hrm_present() && activity_prefs_heart_rate_is_enabled(); switch (type) { - case ActivitySessionType_Open: - { + case ActivitySessionType_Open: { if (hrm_is_available) { WorkoutMetricType scrollable_metrics[] = {WorkoutMetricType_Duration}; - return workout_active_create_double_layout(WorkoutMetricType_Hr, - ARRAY_LENGTH(scrollable_metrics), - scrollable_metrics, - workout_data, - workout_controller); + return workout_active_create_double_layout( + WorkoutMetricType_Hr, ARRAY_LENGTH(scrollable_metrics), scrollable_metrics, + workout_data, workout_controller); } else { - return workout_active_create_single_layout(WorkoutMetricType_Duration, - workout_data, + return workout_active_create_single_layout(WorkoutMetricType_Duration, workout_data, workout_controller); } } - case ActivitySessionType_Walk: - { + case ActivitySessionType_Walk: { if (hrm_is_available) { WorkoutMetricType top_metric = WorkoutMetricType_Hr; - WorkoutMetricType scrollable_metrics[] = {WorkoutMetricType_Duration, - WorkoutMetricType_Distance, - WorkoutMetricType_AvgPace, - WorkoutMetricType_Steps}; - return workout_active_create_double_layout(top_metric, - ARRAY_LENGTH(scrollable_metrics), - scrollable_metrics, - workout_data, + WorkoutMetricType scrollable_metrics[] = { + WorkoutMetricType_Duration, WorkoutMetricType_Distance, WorkoutMetricType_AvgPace, + WorkoutMetricType_Steps + }; + return workout_active_create_double_layout(top_metric, ARRAY_LENGTH(scrollable_metrics), + scrollable_metrics, workout_data, workout_controller); } else { WorkoutMetricType top_metric = WorkoutMetricType_Duration; - WorkoutMetricType scrollable_metrics[] = {WorkoutMetricType_Distance, - WorkoutMetricType_AvgPace, - WorkoutMetricType_Steps}; - return workout_active_create_double_layout(top_metric, - ARRAY_LENGTH(scrollable_metrics), - scrollable_metrics, - workout_data, + WorkoutMetricType scrollable_metrics[] = { + WorkoutMetricType_Distance, WorkoutMetricType_AvgPace, WorkoutMetricType_Steps + }; + return workout_active_create_double_layout(top_metric, ARRAY_LENGTH(scrollable_metrics), + scrollable_metrics, workout_data, workout_controller); } } - case ActivitySessionType_Run: - { + case ActivitySessionType_Run: { if (hrm_is_available) { WorkoutMetricType top_metric = WorkoutMetricType_Hr; - WorkoutMetricType scrollable_metrics[] = {WorkoutMetricType_Duration, - WorkoutMetricType_AvgPace, - WorkoutMetricType_Distance}; - return workout_active_create_double_layout(top_metric, - ARRAY_LENGTH(scrollable_metrics), - scrollable_metrics, - workout_data, + WorkoutMetricType scrollable_metrics[] = { + WorkoutMetricType_Duration, WorkoutMetricType_AvgPace, WorkoutMetricType_Distance + }; + return workout_active_create_double_layout(top_metric, ARRAY_LENGTH(scrollable_metrics), + scrollable_metrics, workout_data, workout_controller); } else { WorkoutMetricType top_metric = WorkoutMetricType_Duration; - WorkoutMetricType scrollable_metrics[] = {WorkoutMetricType_AvgPace, - WorkoutMetricType_Distance}; - return workout_active_create_double_layout(top_metric, - ARRAY_LENGTH(scrollable_metrics), - scrollable_metrics, - workout_data, + WorkoutMetricType scrollable_metrics[] = { + WorkoutMetricType_AvgPace, WorkoutMetricType_Distance + }; + return workout_active_create_double_layout(top_metric, ARRAY_LENGTH(scrollable_metrics), + scrollable_metrics, workout_data, workout_controller); } } diff --git a/src/fw/apps/system/workout/active.h b/src/fw/apps/system/workout/active.h index 6cd1026f5e..30acceb9ce 100644 --- a/src/fw/apps/system/workout/active.h +++ b/src/fw/apps/system/workout/active.h @@ -10,7 +10,6 @@ typedef struct WorkoutActiveWindow WorkoutActiveWindow; - WorkoutActiveWindow *workout_active_create_single_layout(WorkoutMetricType metric, void *workout_data, WorkoutController *workout_controller); diff --git a/src/fw/apps/system/workout/controller.h b/src/fw/apps/system/workout/controller.h index ca4d7569bd..7993e46512 100644 --- a/src/fw/apps/system/workout/controller.h +++ b/src/fw/apps/system/workout/controller.h @@ -15,9 +15,9 @@ typedef struct WorkoutController { bool (*stop)(void); void (*update_data)(void *data); - void (*metric_to_string)(WorkoutMetricType type, char *buffer, - size_t buffer_size, void *i18n_owner, void *workout_data); + void (*metric_to_string)(WorkoutMetricType type, char *buffer, size_t buffer_size, + void *i18n_owner, void *workout_data); int32_t (*get_metric_value)(WorkoutMetricType type, void *data); - const char* (*get_distance_string)(const char *miles_string, const char *km_string); - char* (*get_custom_metric_label_string)(void); + const char *(*get_distance_string)(const char *miles_string, const char *km_string); + char *(*get_custom_metric_label_string)(void); } WorkoutController; diff --git a/src/fw/apps/system/workout/countdown.c b/src/fw/apps/system/workout/countdown.c index ecc1bc29fe..05a17f006d 100644 --- a/src/fw/apps/system/workout/countdown.c +++ b/src/fw/apps/system/workout/countdown.c @@ -78,8 +78,8 @@ void workout_countdown_start(ActivitySessionType type, StartWorkoutCallback star window_set_user_data(window, countdown_window); window_set_background_color(window, PBL_IF_COLOR_ELSE(GColorYellow, GColorDarkGray)); window_set_window_handlers(window, &(WindowHandlers){ - .unload = prv_window_unload_handler, - }); + .unload = prv_window_unload_handler, + }); layer_init(&countdown_window->base_layer, &window->layer.bounds); layer_set_update_proc(&countdown_window->base_layer, prv_base_layer_update_proc); diff --git a/src/fw/apps/system/workout/data.c b/src/fw/apps/system/workout/data.c index 77ba3b75d8..27d9475be9 100644 --- a/src/fw/apps/system/workout/data.c +++ b/src/fw/apps/system/workout/data.c @@ -19,8 +19,8 @@ void workout_data_update(void *data) { &workout_data->hr_zone); if (workout_data->duration_s && workout_data->distance_m) { - workout_data->avg_pace = health_util_get_pace(workout_data->duration_s, - workout_data->distance_m); + workout_data->avg_pace = + health_util_get_pace(workout_data->duration_s, workout_data->distance_m); } } @@ -30,28 +30,23 @@ void workout_data_fill_metric_value(WorkoutMetricType type, char *buffer, size_t switch (type) { case WorkoutMetricType_Hr: - case WorkoutMetricType_Steps: - { - snprintf(buffer, buffer_size, "%"PRId32, metric_value); + case WorkoutMetricType_Steps: { + snprintf(buffer, buffer_size, "%" PRId32, metric_value); break; } - case WorkoutMetricType_Distance: - { + case WorkoutMetricType_Distance: { const int conversion_factor = health_util_get_distance_factor(); health_util_format_whole_and_decimal(buffer, buffer_size, metric_value, conversion_factor); break; } - case WorkoutMetricType_Duration: - { - health_util_format_hours_minutes_seconds(buffer, buffer_size, metric_value, - true, i18n_owner); + case WorkoutMetricType_Duration: { + health_util_format_hours_minutes_seconds(buffer, buffer_size, metric_value, true, i18n_owner); break; } case WorkoutMetricType_Pace: - case WorkoutMetricType_AvgPace: - { - health_util_format_hours_minutes_seconds(buffer, buffer_size, metric_value, - false, i18n_owner); + case WorkoutMetricType_AvgPace: { + health_util_format_hours_minutes_seconds(buffer, buffer_size, metric_value, false, + i18n_owner); break; } case WorkoutMetricType_Speed: diff --git a/src/fw/apps/system/workout/data.h b/src/fw/apps/system/workout/data.h index dffe20f60d..d678d33715 100644 --- a/src/fw/apps/system/workout/data.h +++ b/src/fw/apps/system/workout/data.h @@ -21,7 +21,7 @@ typedef struct WorkoutData { void workout_data_update(void *workout_data); -void workout_data_fill_metric_value(WorkoutMetricType type, char *buffer, - size_t buffer_size, void *i18n_owner, void *workout_data); +void workout_data_fill_metric_value(WorkoutMetricType type, char *buffer, size_t buffer_size, + void *i18n_owner, void *workout_data); int32_t workout_data_get_metric_value(WorkoutMetricType type, void *workout_data); diff --git a/src/fw/apps/system/workout/dialog.c b/src/fw/apps/system/workout/dialog.c index 8e7021793a..c271562bab 100644 --- a/src/fw/apps/system/workout/dialog.c +++ b/src/fw/apps/system/workout/dialog.c @@ -66,20 +66,17 @@ static void prv_workout_dialog_load(Window *window) { // Check if the text takes up more than one line. If the dialog has a single line of text, // the icon and line of text are positioned lower so as to be more vertically centered. GContext *ctx = graphics_context_get_current_context(); - const GTextAlignment text_alignment = PBL_IF_RECT_ELSE(GTextAlignmentCenter, - show_action_bar ? GTextAlignmentRight : GTextAlignmentCenter); + const GTextAlignment text_alignment = PBL_IF_RECT_ELSE( + GTextAlignmentCenter, show_action_bar ? GTextAlignmentRight : GTextAlignmentCenter); { // do all this in a block so we enforce that nobody uses these variables outside of the block // when dealing with round displays, sizes change depending on location. - const GRect probe_rect = GRect(x, y + text_single_line_text_offset_px, - w, max_text_line_height_px); - text_height = graphics_text_layout_get_max_used_size(ctx, - dialog->buffer, - dialog_text_font, - probe_rect, - GTextOverflowModeWordWrap, - text_alignment, - text_attributes).h; + const GRect probe_rect = + GRect(x, y + text_single_line_text_offset_px, w, max_text_line_height_px); + text_height = graphics_text_layout_get_max_used_size(ctx, dialog->buffer, dialog_text_font, + probe_rect, GTextOverflowModeWordWrap, + text_alignment, text_attributes) + .h; if (text_height <= single_line_text_height_px) { text_top_margin_px += text_single_line_text_offset_px; icon_top_margin_px += icon_single_line_text_offset_px; @@ -95,8 +92,7 @@ static void prv_workout_dialog_load(Window *window) { // Set up the text. TextLayer *text_layer = &dialog->text_layer; - text_layer_init_with_parameters(text_layer, &GRect(x, y, w, h), - dialog->buffer, dialog_text_font, + text_layer_init_with_parameters(text_layer, &GRect(x, y, w, h), dialog->buffer, dialog_text_font, dialog->text_color, GColorClear, text_alignment, GTextOverflowModeWordWrap); #if PBL_ROUND @@ -110,10 +106,9 @@ static void prv_workout_dialog_load(Window *window) { y = subtext_top_margin_px; TextLayer *subtext_layer = &workout_dialog->subtext_layer; - text_layer_init_with_parameters(subtext_layer, &GRect(x, y, w, h), - workout_dialog->subtext_buffer, dialog_subtext_font, - dialog->text_color, GColorClear, text_alignment, - GTextOverflowModeWordWrap); + text_layer_init_with_parameters( + subtext_layer, &GRect(x, y, w, h), workout_dialog->subtext_buffer, dialog_subtext_font, + dialog->text_color, GColorClear, text_alignment, GTextOverflowModeWordWrap); #if PBL_ROUND text_layer_enable_screen_text_flow_and_paging(subtext_layer, TEXT_FLOW_INSET_PX); #endif @@ -135,7 +130,7 @@ static void prv_workout_dialog_load(Window *window) { // text is right aligned to if action bar is present otherwise do what rect does if (show_action_bar) { x = grect_get_max_x(bounds) - action_bar_width - content_and_action_bar_horizontal_spacing - - icon_size.w; + icon_size.w; } else { x = (grect_get_max_x(bounds) - action_bar_width - icon_size.w) / 2; } @@ -180,11 +175,11 @@ void workout_dialog_init(WorkoutDialog *workout_dialog, const char *dialog_name) dialog_init(&workout_dialog->dialog, dialog_name); Window *window = &workout_dialog->dialog.window; - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_workout_dialog_load, - .unload = prv_workout_dialog_unload, - .appear = prv_workout_dialog_appear, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_workout_dialog_load, + .unload = prv_workout_dialog_unload, + .appear = prv_workout_dialog_appear, + }); window_set_user_data(window, workout_dialog); gbitmap_init_with_resource(&workout_dialog->confirm_icon, RESOURCE_ID_ACTION_BAR_ICON_CHECK); diff --git a/src/fw/apps/system/workout/selection.c b/src/fw/apps/system/workout/selection.c index c32f354f87..50237b2cb2 100644 --- a/src/fw/apps/system/workout/selection.c +++ b/src/fw/apps/system/workout/selection.c @@ -84,9 +84,10 @@ static void prv_draw_row_callback(GContext *ctx, const Layer *cell_layer, MenuIn const int max_icon_w = PBL_IF_RECT_ELSE(55, cell_layer->bounds.size.w); const int title_origin_x = PBL_IF_RECT_ELSE(max_icon_w, 0); const GTextAlignment title_alignment = PBL_IF_RECT_ELSE(GTextAlignmentLeft, GTextAlignmentCenter); - const GFont title_font = PBL_IF_RECT_ELSE(fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), - cell_layer->is_highlighted ? fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD) - : fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); + const GFont title_font = + PBL_IF_RECT_ELSE(fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), + cell_layer->is_highlighted ? fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD) + : fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); const int title_height = fonts_get_font_height(title_font); GRect image_bounds = gbitmap_get_bounds(icon); @@ -156,8 +157,8 @@ WorkoutSelectionWindow *workout_selection_push(SelectWorkoutCallback select_work window_init(window, WINDOW_NAME("Workout Selection")); window_set_user_data(window, selection_window); window_set_window_handlers(window, &(WindowHandlers){ - .unload = prv_window_unload_handler, - }); + .unload = prv_window_unload_handler, + }); for (int i = 0; i < WorkoutTypeCount; i++) { gbitmap_init_with_resource(&selection_window->workout_icons[i], prv_get_icon_resource_id(i)); @@ -166,20 +167,22 @@ WorkoutSelectionWindow *workout_selection_push(SelectWorkoutCallback select_work MenuLayer *menu_layer = &selection_window->menu_layer; menu_layer_init(menu_layer, &window->layer.bounds); menu_layer_pad_bottom_enable(menu_layer, false); - menu_layer_set_callbacks(menu_layer, selection_window, &(MenuLayerCallbacks){ - .get_num_rows = prv_get_num_rows_callback, - .get_cell_height = prv_get_cell_height_callback, - .draw_row = prv_draw_row_callback, - .select_click = prv_select_callback, - }); + menu_layer_set_callbacks(menu_layer, selection_window, + &(MenuLayerCallbacks){ + .get_num_rows = prv_get_num_rows_callback, + .get_cell_height = prv_get_cell_height_callback, + .draw_row = prv_draw_row_callback, + .select_click = prv_select_callback, + }); menu_layer_set_normal_colors(menu_layer, GColorWhite, GColorBlack); - menu_layer_set_highlight_colors(menu_layer, - PBL_IF_COLOR_ELSE(GColorYellow, GColorBlack), + menu_layer_set_highlight_colors(menu_layer, PBL_IF_COLOR_ELSE(GColorYellow, GColorBlack), PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite)); menu_layer_set_click_config_onto_window(menu_layer, &selection_window->window); menu_layer_set_scroll_wrap_around(menu_layer, shell_prefs_get_menu_scroll_wrap_around_enable()); - menu_layer_set_scroll_vibe_on_wrap(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); - menu_layer_set_scroll_vibe_on_blocked(menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); + menu_layer_set_scroll_vibe_on_wrap( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnWrapAround); + menu_layer_set_scroll_vibe_on_blocked( + menu_layer, shell_prefs_get_menu_scroll_vibe_behavior() == MenuScrollVibeOnLocked); layer_add_child(&selection_window->window.layer, menu_layer_get_layer(menu_layer)); app_window_stack_push(&selection_window->window, true); diff --git a/src/fw/apps/system/workout/sports.c b/src/fw/apps/system/workout/sports.c index 8800c2fff0..c82c1e89d0 100644 --- a/src/fw/apps/system/workout/sports.c +++ b/src/fw/apps/system/workout/sports.c @@ -18,24 +18,23 @@ #include - enum { - SPORTS_TIME_KEY = 0x0, // TUPLE_CSTRING - SPORTS_DISTANCE_KEY = 0x1, // TUPLE_CSTRING - SPORTS_DATA_KEY = 0x2, // TUPLE_CSTRING - SPORTS_UNITS_KEY = 0x3, // TUPLE_UINT(8) - SPORTS_ACTIVITY_STATE_KEY = 0x4, // TUPLE_UINT(8) - SPORTS_LABEL_KEY = 0x5, // TUPLE_UINT(8) - SPORTS_HRM_KEY = 0x6, // TUPLE_UINT(8) - SPORTS_CUSTOM_LABEL_KEY = 0x7, // TUPLE_CSTRING - SPORTS_CUSTOM_VALUE_KEY = 0x8, // TUPLE_CSTRING + SPORTS_TIME_KEY = 0x0, // TUPLE_CSTRING + SPORTS_DISTANCE_KEY = 0x1, // TUPLE_CSTRING + SPORTS_DATA_KEY = 0x2, // TUPLE_CSTRING + SPORTS_UNITS_KEY = 0x3, // TUPLE_UINT(8) + SPORTS_ACTIVITY_STATE_KEY = 0x4, // TUPLE_UINT(8) + SPORTS_LABEL_KEY = 0x5, // TUPLE_UINT(8) + SPORTS_HRM_KEY = 0x6, // TUPLE_UINT(8) + SPORTS_CUSTOM_LABEL_KEY = 0x7, // TUPLE_CSTRING + SPORTS_CUSTOM_VALUE_KEY = 0x8, // TUPLE_CSTRING }; enum { - STATE_INIT_VALUE = 0x00, + STATE_INIT_VALUE = 0x00, STATE_RUNNING_VALUE = 0x01, - STATE_PAUSED_VALUE = 0x02, - STATE_END_VALUE = 0x03, + STATE_PAUSED_VALUE = 0x02, + STATE_END_VALUE = 0x03, }; typedef struct { @@ -68,14 +67,14 @@ typedef struct { static void prv_health_service_event_handler(HealthEventType event, void *context) { SportsAppData *sports_app_data = context; if (event == HealthEventHeartRateUpdate) { - sports_app_data->current_bpm = health_service_peek_current_value(HealthMetricHeartRateBPM);; + sports_app_data->current_bpm = health_service_peek_current_value(HealthMetricHeartRateBPM); + ; } } static void prv_sync_error_callback(DictionaryResult dict_error, AppMessageResult app_message_error, - void *context) { - PBL_LOG_DBG("Sports error! dict: %u, app msg: %u", dict_error, - app_message_error); + void *context) { + PBL_LOG_DBG("Sports error! dict: %u, app msg: %u", dict_error, app_message_error); } static void prv_update_scrollable_metrics(SportsAppData *data) { @@ -89,14 +88,13 @@ static void prv_update_scrollable_metrics(SportsAppData *data) { scrollable_metrics[num_scrollable_metrics++] = WorkoutMetricType_Hr; } - const bool has_custom_metric = data->custom_label_string[0] != '\0' && - data->custom_value_string[0] != '\0'; + const bool has_custom_metric = + data->custom_label_string[0] != '\0' && data->custom_value_string[0] != '\0'; if (has_custom_metric) { scrollable_metrics[num_scrollable_metrics++] = WorkoutMetricType_Custom; } - workout_active_update_scrollable_metrics(data->active_window, - num_scrollable_metrics, + workout_active_update_scrollable_metrics(data->active_window, num_scrollable_metrics, scrollable_metrics); } @@ -114,8 +112,7 @@ static void prv_sync_tuple_changed_callback(uint32_t key, const Tuple *new_tuple case SPORTS_TIME_KEY: strncpy(data->duration_string, new_tuple->value->cstring, sizeof(data->duration_string)); break; - case SPORTS_LABEL_KEY: - { + case SPORTS_LABEL_KEY: { const bool is_pace = MIN(new_tuple->value->uint8, 1); WorkoutMetricType metric_type = is_pace ? WorkoutMetricType_Pace : WorkoutMetricType_Speed; if (metric_type != data->pace_speed_metric) { @@ -126,8 +123,7 @@ static void prv_sync_tuple_changed_callback(uint32_t key, const Tuple *new_tuple } case SPORTS_UNITS_KEY: break; - case SPORTS_HRM_KEY: - { + case SPORTS_HRM_KEY: { // This returns if the SPORTS_HRM_KEY value has not changed from the default 0 value if (new_tuple->value->uint8 == 0) { return; @@ -140,25 +136,19 @@ static void prv_sync_tuple_changed_callback(uint32_t key, const Tuple *new_tuple data->current_bpm = new_tuple->value->uint8; break; } - case SPORTS_CUSTOM_LABEL_KEY: - { - if (strncmp(new_tuple->value->cstring, - data->custom_label_string, + case SPORTS_CUSTOM_LABEL_KEY: { + if (strncmp(new_tuple->value->cstring, data->custom_label_string, sizeof(data->custom_label_string)) != 0) { - strncpy(data->custom_label_string, - new_tuple->value->cstring, + strncpy(data->custom_label_string, new_tuple->value->cstring, sizeof(data->custom_label_string)); prv_update_scrollable_metrics(data); } break; } - case SPORTS_CUSTOM_VALUE_KEY: - { - if (strncmp(new_tuple->value->cstring, - data->custom_value_string, + case SPORTS_CUSTOM_VALUE_KEY: { + if (strncmp(new_tuple->value->cstring, data->custom_value_string, sizeof(data->custom_value_string)) != 0) { - strncpy(data->custom_value_string, - new_tuple->value->cstring, + strncpy(data->custom_value_string, new_tuple->value->cstring, sizeof(data->custom_value_string)); prv_update_scrollable_metrics(data); } @@ -196,7 +186,7 @@ static bool prv_pause(bool should_be_paused) { } Tuplet values[] = { - TupletInteger(SPORTS_ACTIVITY_STATE_KEY, new_state), + TupletInteger(SPORTS_ACTIVITY_STATE_KEY, new_state), }; app_sync_set(s, values, 1); @@ -212,31 +202,25 @@ static void prv_metric_to_string(WorkoutMetricType type, char *buffer, size_t bu SportsAppData *data = app_state_get_user_data(); switch (type) { - case WorkoutMetricType_Hr: - { + case WorkoutMetricType_Hr: { snprintf(buffer, buffer_size, "%d", data->current_bpm); break; } case WorkoutMetricType_Speed: - case WorkoutMetricType_Pace: - { + case WorkoutMetricType_Pace: { strncpy(buffer, data->pace_string, MIN(buffer_size, sizeof(data->pace_string))); break; } - case WorkoutMetricType_Distance: - { + case WorkoutMetricType_Distance: { strncpy(buffer, data->distance_string, MIN(buffer_size, sizeof(data->distance_string))); break; } - case WorkoutMetricType_Duration: - { + case WorkoutMetricType_Duration: { strncpy(buffer, data->duration_string, MIN(buffer_size, sizeof(data->duration_string))); break; } - case WorkoutMetricType_Custom: - { - strncpy(buffer, - data->custom_value_string, + case WorkoutMetricType_Custom: { + strncpy(buffer, data->custom_value_string, MIN(buffer_size, sizeof(data->custom_value_string))); break; } @@ -288,42 +272,34 @@ static void prv_init(void) { app_message_open(114, 16); // Sync setup: - const uint8_t is_metric = (uint8_t) false; - const uint8_t is_pace = (uint8_t) true; + const uint8_t is_metric = (uint8_t)false; + const uint8_t is_pace = (uint8_t)true; const uint8_t state = STATE_INIT_VALUE; Tuplet initial_values[] = { - TupletCString(SPORTS_DATA_KEY, "0:00"), - TupletCString(SPORTS_DISTANCE_KEY, "0.0"), - TupletCString(SPORTS_TIME_KEY, "00:00"), - TupletInteger(SPORTS_UNITS_KEY, is_metric), - TupletInteger(SPORTS_LABEL_KEY, is_pace), - TupletInteger(SPORTS_ACTIVITY_STATE_KEY, state), - TupletInteger(SPORTS_HRM_KEY, 0), - TupletCString(SPORTS_CUSTOM_LABEL_KEY, ""), - TupletCString(SPORTS_CUSTOM_VALUE_KEY, "") + TupletCString(SPORTS_DATA_KEY, "0:00"), TupletCString(SPORTS_DISTANCE_KEY, "0.0"), + TupletCString(SPORTS_TIME_KEY, "00:00"), TupletInteger(SPORTS_UNITS_KEY, is_metric), + TupletInteger(SPORTS_LABEL_KEY, is_pace), TupletInteger(SPORTS_ACTIVITY_STATE_KEY, state), + TupletInteger(SPORTS_HRM_KEY, 0), TupletCString(SPORTS_CUSTOM_LABEL_KEY, ""), + TupletCString(SPORTS_CUSTOM_VALUE_KEY, "") }; app_sync_init(&data->sync, data->sync_buffer, sizeof(data->sync_buffer), initial_values, ARRAY_LENGTH(initial_values), prv_sync_tuple_changed_callback, prv_sync_error_callback, data); - - data->workout_controller = (WorkoutController) { - .is_paused = prv_is_paused, - .pause = prv_pause, - .stop = NULL, - .update_data = prv_update_data, - .metric_to_string = prv_metric_to_string, - .get_metric_value = prv_get_metric_value, - .get_distance_string = prv_get_distance_string, - .get_custom_metric_label_string = prv_get_custom_metric_label_string, + data->workout_controller = (WorkoutController){ + .is_paused = prv_is_paused, + .pause = prv_pause, + .stop = NULL, + .update_data = prv_update_data, + .metric_to_string = prv_metric_to_string, + .get_metric_value = prv_get_metric_value, + .get_distance_string = prv_get_distance_string, + .get_custom_metric_label_string = prv_get_custom_metric_label_string, }; - data->active_window = workout_active_create_triple_layout(WorkoutMetricType_Duration, - WorkoutMetricType_Distance, - 0, - NULL, - NULL, - &data->workout_controller); + data->active_window = + workout_active_create_triple_layout(WorkoutMetricType_Duration, WorkoutMetricType_Distance, 0, + NULL, NULL, &data->workout_controller); data->pace_speed_metric = DEFAULT_PACE_SPEED_METRIC; prv_update_scrollable_metrics(data); workout_active_window_push(data->active_window); @@ -357,13 +333,15 @@ static void prv_main(void) { const PebbleProcessMd *sports_app_get_info(void) { static const PebbleProcessMdSystem s_sports_app_info = { - .common = { - .main_func = &prv_main, - .visibility = ProcessVisibilityShownOnCommunication, - .uuid = {0x4d, 0xab, 0x81, 0xa6, 0xd2, 0xfc, 0x45, 0x8a, - 0x99, 0x2c, 0x7a, 0x1f, 0x3b, 0x96, 0xa9, 0x70}, - }, - .name = i18n_noop("Sports"), + .common = + { + .main_func = &prv_main, + .visibility = ProcessVisibilityShownOnCommunication, + .uuid = + {0x4d, 0xab, 0x81, 0xa6, 0xd2, 0xfc, 0x45, 0x8a, 0x99, 0x2c, 0x7a, 0x1f, 0x3b, + 0x96, 0xa9, 0x70}, + }, + .name = i18n_noop("Sports"), }; - return (const PebbleProcessMd*) &s_sports_app_info; + return (const PebbleProcessMd *)&s_sports_app_info; } diff --git a/src/fw/apps/system/workout/summary.c b/src/fw/apps/system/workout/summary.c index dcbe25eb5f..b9146e4fc3 100644 --- a/src/fw/apps/system/workout/summary.c +++ b/src/fw/apps/system/workout/summary.c @@ -37,7 +37,7 @@ typedef struct WorkoutSummaryWindow { //////////////////////////////////////////////////////////////////////////////////////////////////// //! Helpers -static KinoReel* prv_get_icon_for_activity(ActivitySessionType type) { +static KinoReel *prv_get_icon_for_activity(ActivitySessionType type) { switch (type) { case ActivitySessionType_Open: return kino_reel_create_with_resource(RESOURCE_ID_WORKOUT_APP_WORKOUT); @@ -62,8 +62,8 @@ static void prv_render_activity_type(GContext *ctx, Layer *layer, KinoReel *icon GRect drawing_rect = grect_inset(layer->bounds, GEdgeInsets(0, rl_margin)); const GSize icon_size = kino_reel_get_size(icon); - const int icon_x = drawing_rect.origin.x + PBL_IF_RECT_ELSE(0, (rl_margin / 2)) - + (drawing_rect.size.w / 2) - (icon_size.w / 2); + const int icon_x = drawing_rect.origin.x + PBL_IF_RECT_ELSE(0, (rl_margin / 2)) + + (drawing_rect.size.w / 2) - (icon_size.w / 2); const int icon_y = PBL_IF_RECT_ELSE(45, 49); kino_reel_draw(icon, ctx, GPoint(icon_x, icon_y)); @@ -136,8 +136,8 @@ WorkoutSummaryWindow *workout_summary_window_create(ActivitySessionType activity window_set_user_data(window, summary_window); window_set_background_color(window, BACKGROUND_COLOR); window_set_window_handlers(window, &(WindowHandlers){ - .unload = prv_window_unload_handler, - }); + .unload = prv_window_unload_handler, + }); GRect layer_bounds = window->layer.bounds; layer_bounds.size.w -= ACTION_BAR_WIDTH; @@ -165,8 +165,7 @@ WorkoutSummaryWindow *workout_summary_window_create(ActivitySessionType activity summary_window->action_bar_start = gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_START); - summary_window->action_bar_more = - gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_MORE); + summary_window->action_bar_more = gbitmap_create_with_resource(RESOURCE_ID_ACTION_BAR_ICON_MORE); action_bar_layer_set_icon(action_bar, BUTTON_ID_UP, summary_window->action_bar_start); action_bar_layer_set_icon(action_bar, BUTTON_ID_DOWN, summary_window->action_bar_more); diff --git a/src/fw/apps/system/workout/utils.c b/src/fw/apps/system/workout/utils.c index 08d7f1c2ee..a118817196 100644 --- a/src/fw/apps/system/workout/utils.c +++ b/src/fw/apps/system/workout/utils.c @@ -13,8 +13,9 @@ #include "system/passert.h" static TimelineItem *prv_create_abandoned_workout_notification(void) { - const char *msg = i18n_noop("Still sweating? Your workout is active and will be ended soon. " - "Open the workout to keep it going."); + const char *msg = i18n_noop( + "Still sweating? Your workout is active and will be ended soon. " + "Open the workout to keep it going."); AttributeList notif_attr_list = {0}; attribute_list_add_uint32(¬if_attr_list, AttributeIdIconTiny, TIMELINE_RESOURCE_ACTIVITY); @@ -38,33 +39,32 @@ static TimelineItem *prv_create_abandoned_workout_notification(void) { const int num_actions = 3; TimelineItemActionGroup action_group = { - .num_actions = num_actions, - .actions = (TimelineItemAction[]) { - { - .id = 0, - .type = TimelineItemActionTypeDismiss, - .attr_list = dismiss_attr_list, + .num_actions = num_actions, + .actions = (TimelineItemAction[]){ + { + .id = 0, + .type = TimelineItemActionTypeDismiss, + .attr_list = dismiss_attr_list, + }, + { + .id = 1, + .type = TimelineItemActionTypeOpenWatchApp, + .attr_list = end_workout_attr_list, + }, + { + .id = 2, + .type = TimelineItemActionTypeOpenWatchApp, + .attr_list = open_workout_attr_list, + }, }, - { - .id = 1, - .type = TimelineItemActionTypeOpenWatchApp, - .attr_list = end_workout_attr_list, - }, - { - .id = 2, - .type = TimelineItemActionTypeOpenWatchApp, - .attr_list = open_workout_attr_list, - }, - }, }; const time_t now_utc = rtc_get_time(); // Note: it's fine if this returns null, since the parent functions will check for a null pointer - TimelineItem *item = timeline_item_create_with_attributes(now_utc, 0, - TimelineItemTypeNotification, - LayoutIdNotification, ¬if_attr_list, - &action_group); + TimelineItem *item = + timeline_item_create_with_attributes(now_utc, 0, TimelineItemTypeNotification, + LayoutIdNotification, ¬if_attr_list, &action_group); i18n_free_all(¬if_attr_list); attribute_list_destroy_list(¬if_attr_list); @@ -84,7 +84,7 @@ void workout_utils_send_abandoned_workout_notification(void) { } } -const char* workout_utils_get_name_for_activity(ActivitySessionType type) { +const char *workout_utils_get_name_for_activity(ActivitySessionType type) { switch (type) { case ActivitySessionType_Open: /// Workout Label @@ -108,7 +108,7 @@ const char* workout_utils_get_name_for_activity(ActivitySessionType type) { WTF; } -const char* workout_utils_get_detection_text_for_activity(ActivitySessionType type) { +const char *workout_utils_get_detection_text_for_activity(ActivitySessionType type) { switch (type) { case ActivitySessionType_Open: /// Workout automatically detected dialog text @@ -136,8 +136,8 @@ bool workout_utils_find_ongoing_activity_session(ActivitySession *session_out) { bool found_session = false; uint32_t num_sessions = ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT; - ActivitySession *sessions = app_zalloc_check(sizeof(ActivitySession) * - ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT); + ActivitySession *sessions = + app_zalloc_check(sizeof(ActivitySession) * ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT); activity_get_sessions(&num_sessions, sessions); for (int i = num_sessions; i >= 0; i--) { diff --git a/src/fw/apps/system/workout/utils.h b/src/fw/apps/system/workout/utils.h index ee6cead6ed..8bde0318d7 100644 --- a/src/fw/apps/system/workout/utils.h +++ b/src/fw/apps/system/workout/utils.h @@ -7,8 +7,8 @@ void workout_utils_send_abandoned_workout_notification(void); -const char* workout_utils_get_name_for_activity(ActivitySessionType type); +const char *workout_utils_get_name_for_activity(ActivitySessionType type); -const char* workout_utils_get_detection_text_for_activity(ActivitySessionType type); +const char *workout_utils_get_detection_text_for_activity(ActivitySessionType type); bool workout_utils_find_ongoing_activity_session(ActivitySession *session_out); diff --git a/src/fw/apps/system/workout/workout.c b/src/fw/apps/system/workout/workout.c index b57b469478..df57005b4c 100644 --- a/src/fw/apps/system/workout/workout.c +++ b/src/fw/apps/system/workout/workout.c @@ -48,19 +48,18 @@ static ActivitySessionType s_activity_type = DEFAULT_ACTIVITY_TYPE; static void prv_prep_and_open_active_window(ActivitySessionType type) { WorkoutAppData *data = app_state_get_user_data(); - data->workout_controller = (WorkoutController) { - .is_paused = workout_service_is_paused, - .pause = workout_service_pause_workout, - .stop = workout_service_stop_workout, - .update_data = workout_data_update, - .metric_to_string = workout_data_fill_metric_value, - .get_metric_value = workout_data_get_metric_value, - .get_distance_string = health_util_get_distance_string, + data->workout_controller = (WorkoutController){ + .is_paused = workout_service_is_paused, + .pause = workout_service_pause_workout, + .stop = workout_service_stop_workout, + .update_data = workout_data_update, + .metric_to_string = workout_data_fill_metric_value, + .get_metric_value = workout_data_get_metric_value, + .get_distance_string = health_util_get_distance_string, }; - data->active_window = workout_active_create_for_activity_type(type, - &data->workout_data, - &data->workout_controller); + data->active_window = + workout_active_create_for_activity_type(type, &data->workout_data, &data->workout_controller); workout_active_window_push(data->active_window); } @@ -124,8 +123,8 @@ static void prv_show_workout_detected_dialog(WorkoutAppData *data) { char text_buffer[32]; const uint32_t length_s = rtc_get_time() - data->ongoing_session.start_utc; - health_util_format_hours_minutes_seconds( - text_buffer, sizeof(text_buffer), length_s, true, workout_dialog); + health_util_format_hours_minutes_seconds(text_buffer, sizeof(text_buffer), length_s, true, + workout_dialog); workout_dialog_set_subtext(workout_dialog, text_buffer); @@ -170,9 +169,8 @@ static void prv_show_workout_ended_dialog(WorkoutAppData *data) { void workout_push_summary_window(void) { WorkoutAppData *data = app_state_get_user_data(); - data->summary_window = workout_summary_window_create(s_activity_type, - prv_start_workout_cb, - prv_select_workout_cb); + data->summary_window = + workout_summary_window_create(s_activity_type, prv_start_workout_cb, prv_select_workout_cb); workout_summary_window_push(data->summary_window); } @@ -180,10 +178,11 @@ void workout_push_summary_window(void) { // Initialization static void prv_init(void) { - if (!activity_is_initialized()) { + if (!activity_is_initialized()) { /// Workouts waiting for time sync - static const char *msg = i18n_noop("Workout requires the time to be synced." - " Please connect your phone."); + static const char *msg = i18n_noop( + "Workout requires the time to be synced." + " Please connect your phone."); health_tracking_ui_show_message(RESOURCE_ID_ALARM_CLOCK_TINY, msg, true); return; } @@ -197,8 +196,9 @@ static void prv_init(void) { if (activity_prefs_get_workout_app_opened_version() != CURRENT_WORKOUT_APP_VERSION) { /// Workout app first use text - static const char *msg = i18n_noop("Wear your watch snug and 2 fingers' width above " - "your wrist bone for best results."); + static const char *msg = i18n_noop( + "Wear your watch snug and 2 fingers' width above " + "your wrist bone for best results."); health_tracking_ui_show_message(RESOURCE_ID_WORKOUT_APP_HR_PULSE_TINY, msg, true); } @@ -248,13 +248,15 @@ static void prv_main(void) { const PebbleProcessMd *workout_app_get_info(void) { static const PebbleProcessMdSystem s_workout_app_info = { - .common = { - .main_func = &prv_main, - .uuid = {0xfe, 0xf8, 0x2c, 0x82, 0x71, 0x76, 0x4e, 0x22, - 0x88, 0xde, 0x35, 0xa3, 0xfc, 0x18, 0xd4, 0x3f}, - }, - .name = i18n_noop("Workout"), - .icon_resource_id = RESOURCE_ID_ACTIVITY_TINY, + .common = + { + .main_func = &prv_main, + .uuid = + {0xfe, 0xf8, 0x2c, 0x82, 0x71, 0x76, 0x4e, 0x22, 0x88, 0xde, 0x35, 0xa3, 0xfc, + 0x18, 0xd4, 0x3f}, + }, + .name = i18n_noop("Workout"), + .icon_resource_id = RESOURCE_ID_ACTIVITY_TINY, }; - return (const PebbleProcessMd*) &s_workout_app_info; + return (const PebbleProcessMd *)&s_workout_app_info; } diff --git a/src/fw/apps/watch/kickstart/kickstart.c b/src/fw/apps/watch/kickstart/kickstart.c index 2a9f9496e7..1f464dc1c5 100644 --- a/src/fw/apps/watch/kickstart/kickstart.c +++ b/src/fw/apps/watch/kickstart/kickstart.c @@ -72,9 +72,9 @@ static GPoint prv_steps_to_point(int32_t cur, int32_t total, GRect frame) { frame.origin.y); } else if (cur <= limit_c) { // zone b - c - return GPoint(frame.origin.x + frame.size.w, - frame.origin.y + - DIV_X(frame.size.h * MULT_X((cur - limit_b), (limit_c - limit_b)))); + return GPoint( + frame.origin.x + frame.size.w, + frame.origin.y + DIV_X(frame.size.h * MULT_X((cur - limit_b), (limit_c - limit_b)))); } else if (cur <= limit_d) { // zone c - d return GPoint(frame.origin.x + @@ -87,9 +87,9 @@ static GPoint prv_steps_to_point(int32_t cur, int32_t total, GRect frame) { DIV_X(frame.size.h * (1000 - MULT_X((cur - limit_d), (limit_e - limit_d))))); } else { // zone e - 0 - return GPoint(frame.origin.x + - DIV_X(frame.size.w / 2 * MULT_X((cur - limit_e), (total - limit_e))), - frame.origin.y); + return GPoint( + frame.origin.x + DIV_X(frame.size.w / 2 * MULT_X((cur - limit_e), (total - limit_e))), + frame.origin.y); } #elif PBL_ROUND // Simply a calculated point on the circumference @@ -101,9 +101,9 @@ static GPoint prv_steps_to_point(int32_t cur, int32_t total, GRect frame) { #if PBL_RECT static GPoint prv_inset_point(GRect *frame, GPoint outer_point, int32_t inset_amount) { // Insets the given point by the specified amount - return (GPoint) { - .x = MAX(inset_amount - 1, MIN(outer_point.x, frame->size.w - inset_amount)), - .y = MAX(inset_amount - 1, MIN(outer_point.y, frame->size.h - inset_amount)) + return (GPoint){ + .x = MAX(inset_amount - 1, MIN(outer_point.x, frame->size.w - inset_amount)), + .y = MAX(inset_amount - 1, MIN(outer_point.y, frame->size.h - inset_amount)) }; } #endif @@ -134,9 +134,9 @@ static void prv_draw_outer_ring(GContext *ctx, int32_t current, int32_t total, const int32_t max_points = 20; - GPath path = (GPath) { - .points = app_zalloc_check(sizeof(GPoint) * max_points), - .num_points = 0, + GPath path = (GPath){ + .points = app_zalloc_check(sizeof(GPoint) * max_points), + .num_points = 0, }; const int32_t top_right = frame.size.w / 2; @@ -145,12 +145,14 @@ static void prv_draw_outer_ring(GContext *ctx, int32_t current, int32_t total, const int32_t top_left = frame.size.h + bot_left; const int32_t rect_perimeter = top_left + top_right; - const int32_t corners[] = {0, - total * top_right / rect_perimeter, - total * bot_right / rect_perimeter, - total * bot_left / rect_perimeter, - total * top_left / rect_perimeter, - total}; + const int32_t corners[] = { + 0, + total * top_right / rect_perimeter, + total * bot_right / rect_perimeter, + total * bot_left / rect_perimeter, + total * top_left / rect_perimeter, + total + }; // start the path with start_outer_point path.points[path.num_points++] = start_outer_point; @@ -220,8 +222,8 @@ static void prv_draw_goal_line(GContext *ctx, int32_t current_progress, int32_t const GPoint line_inner_point = prv_inset_point(&frame, line_outer_point, line_length); #elif PBL_ROUND const GRect inner_bounds = grect_inset(frame, GEdgeInsets(line_length)); - const GPoint line_inner_point = prv_steps_to_point(current_progress, - total_progress, inner_bounds); + const GPoint line_inner_point = + prv_steps_to_point(current_progress, total_progress, inner_bounds); #endif graphics_context_set_stroke_color(ctx, color); @@ -231,7 +233,7 @@ static void prv_draw_goal_line(GContext *ctx, int32_t current_progress, int32_t #if EMERY_SCREEN_RES static void prv_draw_separator(GContext *ctx, GRect bounds, GColor color) { - bounds.origin.y += 111; // top offset + bounds.origin.y += 111; // top offset GPoint p1 = bounds.origin; GPoint p2 = p1; @@ -259,20 +261,20 @@ static void prv_draw_steps_and_shoe(GContext *ctx, const char *steps_buffer, GFo GRect icon_bounds = gbitmap_get_bounds(shoe_icon); icon_bounds.origin = bounds.origin; #if PBL_BW - icon_bounds.origin.x += 23; // icon left offset - icon_bounds.origin.y += 9; // icon top offset + icon_bounds.origin.x += 23; // icon left offset + icon_bounds.origin.y += 9; // icon top offset #elif EMERY_SCREEN_RES - icon_bounds.origin.y += (46 - icon_bounds.size.h); // icon top offset + icon_bounds.origin.y += (46 - icon_bounds.size.h); // icon top offset #elif SNOWY_SCREEN_RES - icon_bounds.origin.x = screen_is_obstructed ? bounds.origin.x // icon_left offset + icon_bounds.origin.x = screen_is_obstructed ? bounds.origin.x // icon_left offset : (bounds.size.w / 2) - (icon_bounds.size.w / 2); - icon_bounds.origin.y += screen_is_obstructed ? 84 : 22; // icon top offset + icon_bounds.origin.y += screen_is_obstructed ? 84 : 22; // icon top offset #elif SPALDING_SCREEN_RES icon_bounds.origin.x = (bounds.size.w / 2) - (icon_bounds.size.w / 2); - icon_bounds.origin.y += 27; // icon top offset + icon_bounds.origin.y += 27; // icon top offset #elif GETAFIX_SCREEN_RES icon_bounds.origin.x = (bounds.size.w / 2) - (icon_bounds.size.w / 2); - icon_bounds.origin.y += 39; // icon top offset + icon_bounds.origin.y += 39; // icon top offset #endif graphics_context_set_compositing_mode(ctx, GCompOpSet); @@ -280,18 +282,19 @@ static void prv_draw_steps_and_shoe(GContext *ctx, const char *steps_buffer, GFo #if PBL_BW const GTextAlignment alignment = GTextAlignmentLeft; - bounds.origin.x += 62; // steps text left offset + bounds.origin.x += 62; // steps text left offset #elif EMERY_SCREEN_RES const GTextAlignment alignment = GTextAlignmentRight; #elif SNOWY_SCREEN_RES - const GTextAlignment alignment = screen_is_obstructed ? GTextAlignmentRight: GTextAlignmentCenter; - bounds.origin.y += screen_is_obstructed ? 65 : 108; // steps text top offset + const GTextAlignment alignment = + screen_is_obstructed ? GTextAlignmentRight : GTextAlignmentCenter; + bounds.origin.y += screen_is_obstructed ? 65 : 108; // steps text top offset #elif SPALDING_SCREEN_RES const GTextAlignment alignment = GTextAlignmentCenter; - bounds.origin.y += 113; // steps text top offset + bounds.origin.y += 113; // steps text top offset #elif GETAFIX_SCREEN_RES const GTextAlignment alignment = GTextAlignmentCenter; - bounds.origin.y += 163; // steps text top offset + bounds.origin.y += 163; // steps text top offset #endif graphics_context_set_text_color(ctx, color); @@ -311,15 +314,13 @@ static void prv_draw_time(GContext *ctx, GFont time_font, GFont am_pm_font, GRec /// Current time in 24 or 12 hour const char *time_fmt = clock_is_24h_style() ? "%R" : "%l:%M"; strftime(time_buffer, sizeof(time_buffer), time_fmt, pbl_override_localtime(&now)); - health_util_create_text_node_with_text( - string_strip_leading_whitespace(time_buffer), - time_font, GColorWhite, container); + health_util_create_text_node_with_text(string_strip_leading_whitespace(time_buffer), time_font, + GColorWhite, container); if (!clock_is_24h_style()) { /// AM/PM for the current time strftime(am_pm_buffer, sizeof(am_pm_buffer), "%p", pbl_override_localtime(&now)); - health_util_create_text_node_with_text( - am_pm_buffer, am_pm_font, GColorWhite, container); + health_util_create_text_node_with_text(am_pm_buffer, am_pm_font, GColorWhite, container); } #if PBL_BW @@ -350,7 +351,7 @@ static void prv_draw_bpm(GContext *ctx, int32_t current_bpm, GFont font, GBitmap GRect icon_bounds = gbitmap_get_bounds(heart_icon); icon_bounds.origin = bounds.origin; #if PBL_BW - icon_bounds.origin.x += 20; // icon left offset + icon_bounds.origin.x += 20; // icon left offset #endif graphics_context_set_compositing_mode(ctx, GCompOpSet); @@ -360,9 +361,9 @@ static void prv_draw_bpm(GContext *ctx, int32_t current_bpm, GFont font, GBitmap snprintf(bpm_text, sizeof(bpm_text), i18n_get("%d BPM", i18n_owner), current_bpm); #if PBL_BW - bounds.origin.x += 62; // bpm text left offset + bounds.origin.x += 62; // bpm text left offset #endif - bounds.origin.y -= PBL_IF_BW_ELSE(5, 8); // bpm text top offset + bounds.origin.y -= PBL_IF_BW_ELSE(5, 8); // bpm text top offset const GTextAlignment alignment = PBL_IF_BW_ELSE(GTextAlignmentLeft, GTextAlignmentRight); @@ -404,25 +405,25 @@ static void prv_base_layer_update_proc(Layer *layer, GContext *ctx) { const GColor fill_color = has_passed_goal ? GColorJaegerGreen : GColorVividCerulean; const GColor text_color = has_passed_goal ? GColorJaegerGreen : GColorVividCerulean; #if SNOWY_SCREEN_RES - GBitmap *shoe = - has_passed_goal ? (screen_is_obstructed ? &data->shoe_green_small : &data->shoe_green) + GBitmap *shoe = has_passed_goal + ? (screen_is_obstructed ? &data->shoe_green_small : &data->shoe_green) : (screen_is_obstructed ? &data->shoe_blue_small : &data->shoe_blue); #else GBitmap *shoe = has_passed_goal ? &data->shoe_green : &data->shoe_blue; -#endif // SNOWY_SCREEN_RES +#endif // SNOWY_SCREEN_RES #else const GColor fill_color = GColorDarkGray; const GColor text_color = GColorWhite; GBitmap *shoe = &data->shoe; -#endif // PBL_COLOR +#endif // PBL_COLOR #if PBL_ROUND prv_draw_outer_dots(ctx, bounds); #endif // draw outer ring - prv_draw_outer_ring(ctx, data->current_steps, data->daily_steps_avg, - fill_thickness, bounds, fill_color); + prv_draw_outer_ring(ctx, data->current_steps, data->daily_steps_avg, fill_thickness, bounds, + fill_color); const int goal_line_length = PBL_IF_COLOR_ELSE(fill_thickness + 3, 12); const int goal_line_width = 4; @@ -434,8 +435,8 @@ static void prv_base_layer_update_proc(Layer *layer, GContext *ctx) { const bool has_bpm = (data->current_bpm > 0); // draw time - prv_draw_time(ctx, data->time_font, PBL_IF_COLOR_ELSE(data->am_pm_font, data->time_font), - bounds, screen_is_obstructed, has_bpm); + prv_draw_time(ctx, data->time_font, PBL_IF_COLOR_ELSE(data->am_pm_font, data->time_font), bounds, + screen_is_obstructed, has_bpm); #if EMERY_SCREEN_RES bounds = grect_inset(bounds, GEdgeInsets(0, 25)); @@ -467,12 +468,11 @@ static void prv_update_steps_buffer(KickstartData *data) { const int hundreds = data->current_steps % 1000; if (thousands) { /// Step count greater than 1000 with a thousands separator - snprintf(data->steps_buffer, sizeof(data->steps_buffer), i18n_get("%d,%03d", data), - thousands, hundreds); + snprintf(data->steps_buffer, sizeof(data->steps_buffer), i18n_get("%d,%03d", data), thousands, + hundreds); } else { /// Step count less than 1000 - snprintf(data->steps_buffer, sizeof(data->steps_buffer), i18n_get("%d", data), - hundreds); + snprintf(data->steps_buffer, sizeof(data->steps_buffer), i18n_get("%d", data), hundreds); } layer_mark_dirty(&data->base_layer); } @@ -483,17 +483,14 @@ static void prv_update_current_steps(KickstartData *data) { } static void prv_update_typical_steps(KickstartData *data) { - data->typical_steps = health_service_sum_averaged(HealthMetricStepCount, - time_start_of_today(), - rtc_get_time(), - HealthServiceTimeScopeWeekly); + data->typical_steps = health_service_sum_averaged(HealthMetricStepCount, time_start_of_today(), + rtc_get_time(), HealthServiceTimeScopeWeekly); } static void prv_update_daily_steps_avg(KickstartData *data) { - data->daily_steps_avg = health_service_sum_averaged(HealthMetricStepCount, - time_start_of_today(), - time_start_of_today() + SECONDS_PER_DAY, - HealthServiceTimeScopeWeekly); + data->daily_steps_avg = health_service_sum_averaged(HealthMetricStepCount, time_start_of_today(), + time_start_of_today() + SECONDS_PER_DAY, + HealthServiceTimeScopeWeekly); } static void prv_update_hrm_bpm(KickstartData *data) { @@ -523,8 +520,8 @@ static void prv_update_data(KickstartData *data) { } #if UNITTEST -T_STATIC void prv_set_data(KickstartData *data, int32_t current_steps, - int32_t typical_steps, int32_t daily_steps_avg, int32_t current_bpm) { +T_STATIC void prv_set_data(KickstartData *data, int32_t current_steps, int32_t typical_steps, + int32_t daily_steps_avg, int32_t current_bpm) { data->current_steps = current_steps; data->typical_steps = typical_steps; data->daily_steps_avg = daily_steps_avg; @@ -568,14 +565,14 @@ T_STATIC void prv_window_load_handler(Window *window) { #if PBL_RECT gbitmap_init_with_resource(&data->shoe_blue_small, RESOURCE_ID_STRIDE_SHOE_BLUE_SMALL); gbitmap_init_with_resource(&data->shoe_green_small, RESOURCE_ID_STRIDE_SHOE_GREEN_SMALL); -#endif // PBL_RECT +#endif // PBL_RECT data->steps_font = fonts_get_system_font(FONT_KEY_AGENCY_FB_36_NUMBERS_AM_PM); data->time_font = fonts_get_system_font(FONT_KEY_AGENCY_FB_60_NUMBERS_AM_PM); data->am_pm_font = fonts_get_system_font(FONT_KEY_AGENCY_FB_60_THIN_NUMBERS_AM_PM); #else #error "Undefined screen size" -#endif // EMERY_SCREEN_RES -#endif // PBL_BW +#endif // EMERY_SCREEN_RES +#endif // PBL_BW Layer *window_layer = window_get_root_layer(window); @@ -630,10 +627,10 @@ static void prv_main(void) { window_init(&data->window, WINDOW_NAME("Kickstart")); window_set_user_data(&data->window, data); - window_set_window_handlers(&data->window, &(WindowHandlers) { - .load = prv_window_load_handler, - .unload = prv_window_unload_handler, - }); + window_set_window_handlers(&data->window, &(WindowHandlers){ + .load = prv_window_load_handler, + .unload = prv_window_unload_handler, + }); app_window_stack_push(&data->window, true); app_event_loop(); @@ -643,17 +640,19 @@ static void prv_main(void) { app_free(data); } -const PebbleProcessMd* kickstart_get_app_info() { +const PebbleProcessMd *kickstart_get_app_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - // UUID: 3af858c3-16cb-4561-91e7-f1ad2df8725f - .uuid = {0x3a, 0xf8, 0x58, 0xc3, 0x16, 0xcb, 0x45, 0x61, - 0x91, 0xe7, 0xf1, 0xad, 0x2d, 0xf8, 0x72, 0x5f}, - .main_func = prv_main, - .process_type = ProcessTypeWatchface, - }, - .icon_resource_id = RESOURCE_ID_MENU_ICON_KICKSTART_WATCH, - .name = "Kickstart" + .common = + { + // UUID: 3af858c3-16cb-4561-91e7-f1ad2df8725f + .uuid = + {0x3a, 0xf8, 0x58, 0xc3, 0x16, 0xcb, 0x45, 0x61, 0x91, 0xe7, 0xf1, 0xad, 0x2d, + 0xf8, 0x72, 0x5f}, + .main_func = prv_main, + .process_type = ProcessTypeWatchface, + }, + .icon_resource_id = RESOURCE_ID_MENU_ICON_KICKSTART_WATCH, + .name = "Kickstart" }; - return (const PebbleProcessMd*) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } diff --git a/src/fw/apps/watch/kickstart/kickstart.h b/src/fw/apps/watch/kickstart/kickstart.h index c249a9ca7c..2b448d45cf 100644 --- a/src/fw/apps/watch/kickstart/kickstart.h +++ b/src/fw/apps/watch/kickstart/kickstart.h @@ -35,4 +35,4 @@ typedef struct KickstartData { char steps_buffer[8]; } KickstartData; -const PebbleProcessMd* kickstart_get_app_info(); +const PebbleProcessMd *kickstart_get_app_info(); diff --git a/src/fw/apps/watch/low_power/face.c b/src/fw/apps/watch/low_power/face.c index af914300cb..bea11f31b4 100644 --- a/src/fw/apps/watch/low_power/face.c +++ b/src/fw/apps/watch/low_power/face.c @@ -36,23 +36,19 @@ static void prv_minute_tick(struct tm *tick_time, TimeUnits units_changed) { time_format = "%I:%M"; } - strftime(s_low_power_data->time_text, sizeof(s_low_power_data->time_text), - time_format, tick_time); + strftime(s_low_power_data->time_text, sizeof(s_low_power_data->time_text), time_format, + tick_time); // Remove leading zero from hour in case of 12h mode if (!clock_is_24h_style() && (s_low_power_data->time_text[0] == '0')) { - text_layer_set_text(&s_low_power_data->low_power_time_layer, - s_low_power_data->time_text+1); + text_layer_set_text(&s_low_power_data->low_power_time_layer, s_low_power_data->time_text + 1); } else { - text_layer_set_text(&s_low_power_data->low_power_time_layer, - s_low_power_data->time_text); + text_layer_set_text(&s_low_power_data->low_power_time_layer, s_low_power_data->time_text); } if (units_changed & DAY_UNIT) { - clock_get_date_tm(s_low_power_data->date_text, sizeof(s_low_power_data->date_text), - tick_time); - text_layer_set_text(&s_low_power_data->low_power_date_layer, - s_low_power_data->date_text); + clock_get_date_tm(s_low_power_data->date_text, sizeof(s_low_power_data->date_text), tick_time); + text_layer_set_text(&s_low_power_data->low_power_date_layer, s_low_power_data->date_text); } } @@ -78,9 +74,9 @@ static void init(void) { const GTextAlignment text_alignment = GTextAlignmentCenter; const unsigned int font_height = fonts_get_font_height(text_font); const GTextOverflowMode text_overflow_mode = GTextOverflowModeTrailingEllipsis; - const GSize text_size = app_graphics_text_layout_get_content_size("00:00", text_font, - s_low_power_data->low_power_window.layer.bounds, text_overflow_mode, - text_alignment); + const GSize text_size = app_graphics_text_layout_get_content_size( + "00:00", text_font, s_low_power_data->low_power_window.layer.bounds, text_overflow_mode, + text_alignment); #if PBL_DISPLAY_HEIGHT >= 200 const int text_pos_y_adjust = -9; #else @@ -88,7 +84,7 @@ static void init(void) { #endif const int text_pos_y = (DISP_ROWS / 2) - (font_height / 2) + text_pos_y_adjust; const GRect text_container_rect = GRect(0, text_pos_y, DISP_COLS, font_height); - GRect text_frame = (GRect) { .size = text_size }; + GRect text_frame = (GRect){.size = text_size}; grect_align(&text_frame, &text_container_rect, GAlignTop, false); kino_layer_init(&s_low_power_data->low_power_kino_layer, @@ -106,7 +102,7 @@ static void init(void) { GColorBlack, GColorClear, text_alignment, text_overflow_mode); layer_set_frame(&s_low_power_data->low_power_time_layer.layer, &text_frame); layer_add_child(&s_low_power_data->low_power_window.layer, - &s_low_power_data->low_power_time_layer.layer); + &s_low_power_data->low_power_time_layer.layer); #if PBL_DISPLAY_HEIGHT >= 200 const GFont date_font = fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD); @@ -118,13 +114,13 @@ static void init(void) { const int icon_top_y = s_low_power_data->low_power_kino_layer.layer.frame.origin.y + icon_bounds.origin.y; const int time_bottom_y = text_frame.origin.y + text_frame.size.h; - const GRect date_frame = (GRect) { - .origin = { 0, time_bottom_y + (icon_top_y - time_bottom_y - (int)date_font_height) / 2 - 3 }, - .size = { DISP_COLS, date_font_height }, + const GRect date_frame = (GRect){ + .origin = {0, time_bottom_y + (icon_top_y - time_bottom_y - (int)date_font_height) / 2 - 3}, + .size = {DISP_COLS, date_font_height}, }; - text_layer_init_with_parameters(&s_low_power_data->low_power_date_layer, - &date_frame, NULL, date_font, - GColorBlack, GColorClear, text_alignment, text_overflow_mode); + text_layer_init_with_parameters(&s_low_power_data->low_power_date_layer, &date_frame, NULL, + date_font, GColorBlack, GColorClear, text_alignment, + text_overflow_mode); layer_add_child(&s_low_power_data->low_power_window.layer, &s_low_power_data->low_power_date_layer.layer); @@ -145,16 +141,19 @@ static void low_power_main(void) { deinit(); } -const PebbleProcessMd* low_power_face_get_app_info() { +const PebbleProcessMd *low_power_face_get_app_info() { static const PebbleProcessMdSystem s_app_md = { - .common = { - // UUID: e9475244-5bbe-4e0f-a637-a218af4c3110 - .uuid = {0xe9, 0x47, 0x52, 0x44, 0x5b, 0xbe, 0x4e, 0x0f, 0xa6, 0x37, 0xa2, 0x18, 0xaf, 0x4c, 0x31, 0x10}, - .main_func = low_power_main, - .process_type = ProcessTypeWatchface, - .visibility = ProcessVisibilityHidden, - }, - .name = "Watch Only" + .common = + { + // UUID: e9475244-5bbe-4e0f-a637-a218af4c3110 + .uuid = + {0xe9, 0x47, 0x52, 0x44, 0x5b, 0xbe, 0x4e, 0x0f, 0xa6, 0x37, 0xa2, 0x18, 0xaf, + 0x4c, 0x31, 0x10}, + .main_func = low_power_main, + .process_type = ProcessTypeWatchface, + .visibility = ProcessVisibilityHidden, + }, + .name = "Watch Only" }; - return (const PebbleProcessMd*) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } diff --git a/src/fw/apps/watch/low_power/face.h b/src/fw/apps/watch/low_power/face.h index 6b81a7d1c9..e356bdcb2e 100644 --- a/src/fw/apps/watch/low_power/face.h +++ b/src/fw/apps/watch/low_power/face.h @@ -5,4 +5,4 @@ #include "process_management/pebble_process_md.h" -const PebbleProcessMd* low_power_face_get_app_info(); +const PebbleProcessMd *low_power_face_get_app_info(); diff --git a/src/fw/apps/watch/tictoc/bw/tictoc_bw.c b/src/fw/apps/watch/tictoc/bw/tictoc_bw.c index f39a59a8c6..7ca7da8338 100644 --- a/src/fw/apps/watch/tictoc/bw/tictoc_bw.c +++ b/src/fw/apps/watch/tictoc/bw/tictoc_bw.c @@ -22,7 +22,7 @@ typedef struct { char date_text[13]; } TicTocData; -static void prv_line_layer_update_callback(Layer *me, GContext* ctx) { +static void prv_line_layer_update_callback(Layer *me, GContext *ctx) { GRect bounds; layer_get_bounds(me, &bounds); GRect unobstructed_bounds; @@ -75,8 +75,8 @@ static void prv_minute_tick_handler(struct tm *tick_time, TimeUnits units_change strftime(data->date_text, sizeof(data->date_text), i18n_get("%B %e", data), tick_time); text_layer_set_text(&data->text_date_layer, data->date_text); - strftime(data->time_text, sizeof(data->time_text), - clock_is_24h_style() ? "%R" : "%I:%M", tick_time); + strftime(data->time_text, sizeof(data->time_text), clock_is_24h_style() ? "%R" : "%I:%M", + tick_time); // Handle lack of non-padded hour format string for twelve hour clock. char *start_time_text = data->time_text; @@ -129,9 +129,7 @@ static void prv_init(void) { app_window_stack_push(&data->window, true); // Subscribe to unobstructed area changes - UnobstructedAreaHandlers unobstructed_handlers = { - .change = prv_unobstructed_area_change_handler - }; + UnobstructedAreaHandlers unobstructed_handlers = {.change = prv_unobstructed_area_change_handler}; app_unobstructed_area_service_subscribe(unobstructed_handlers, NULL); // Set initial positions based on unobstructed area diff --git a/src/fw/apps/watch/tictoc/default/tictoc_default.c b/src/fw/apps/watch/tictoc/default/tictoc_default.c index ac551db8a6..d71ddedec1 100644 --- a/src/fw/apps/watch/tictoc/default/tictoc_default.c +++ b/src/fw/apps/watch/tictoc/default/tictoc_default.c @@ -80,17 +80,17 @@ static void prv_canvas_layer_update_proc(Layer *layer, GContext *ctx) { int hour_hand_length = clock_radius - HOUR_HAND_MARGIN; // Plot hands - GPoint minute_hand = (GPoint) { - .x = (int16_t)(sin_lookup(minute_angle) * (int32_t)minute_hand_length - / TRIG_MAX_RATIO) + center.x, - .y = (int16_t)(-cos_lookup(minute_angle) * (int32_t)minute_hand_length - / TRIG_MAX_RATIO) + center.y + GPoint minute_hand = (GPoint){ + .x = (int16_t)(sin_lookup(minute_angle) * (int32_t)minute_hand_length / TRIG_MAX_RATIO) + + center.x, + .y = (int16_t)(-cos_lookup(minute_angle) * (int32_t)minute_hand_length / TRIG_MAX_RATIO) + + center.y }; - GPoint hour_hand = (GPoint) { - .x = (int16_t)(sin_lookup(hour_angle) * (int32_t)hour_hand_length - / TRIG_MAX_RATIO) + center.x, - .y = (int16_t)(-cos_lookup(hour_angle) * (int32_t)hour_hand_length - / TRIG_MAX_RATIO) + center.y + GPoint hour_hand = (GPoint){ + .x = + (int16_t)(sin_lookup(hour_angle) * (int32_t)hour_hand_length / TRIG_MAX_RATIO) + center.x, + .y = + (int16_t)(-cos_lookup(hour_angle) * (int32_t)hour_hand_length / TRIG_MAX_RATIO) + center.y }; // Draw hands with positive length only @@ -123,7 +123,7 @@ static void prv_window_load(Window *window) { layer_set_update_proc(&data->canvas_layer, prv_canvas_layer_update_proc); layer_add_child(window_layer, &data->canvas_layer); - AppFocusHandlers focus_handlers = { .did_focus = prv_did_focus_handler }; + AppFocusHandlers focus_handlers = {.did_focus = prv_did_focus_handler}; app_focus_service_subscribe_handlers(focus_handlers); } @@ -132,9 +132,7 @@ static void prv_init() { app_state_set_user_data(data); window_init(&data->window, WINDOW_NAME("TicToc")); - window_set_window_handlers(&data->window, &(WindowHandlers) { - .load = prv_window_load - }); + window_set_window_handlers(&data->window, &(WindowHandlers){.load = prv_window_load}); window_set_user_data(&data->window, data); app_window_stack_push(&data->window, true); diff --git a/src/fw/apps/watch/tictoc/round/tictoc_round.c b/src/fw/apps/watch/tictoc/round/tictoc_round.c index 0341ccd563..5aca80379a 100644 --- a/src/fw/apps/watch/tictoc/round/tictoc_round.c +++ b/src/fw/apps/watch/tictoc/round/tictoc_round.c @@ -21,55 +21,63 @@ typedef struct { GBitmap *tz_bitmap[NUM_NON_LOCAL_CLOCKS]; } MultiWatchData; -static GPath* prv_pointed_hand_path(GContext *ctx, ClockHand *hand) { +static GPath *prv_pointed_hand_path(GContext *ctx, ClockHand *hand) { uint32_t num_points = 5; - if (hand->backwards_extension > 0) num_points = 9; - - GPoint *points = (GPoint*)malloc(num_points * sizeof(GPoint)); - if (!points) return NULL; - - points[0] = GPoint(hand->thickness / -2, hand->thickness); // top left - points[1] = GPoint(hand->thickness / -2, -(hand->length - hand->thickness / 2)); // bottom left - points[2] = GPoint(0, -(hand->length)); // point - points[3] = GPoint(hand->thickness / 2, -(hand->length - hand->thickness / 2)); // bottom right - points[4] = GPoint(hand->thickness / 2, hand->thickness); // top right + if (hand->backwards_extension > 0) + num_points = 9; + + GPoint *points = (GPoint *)malloc(num_points * sizeof(GPoint)); + if (!points) + return NULL; + + points[0] = GPoint(hand->thickness / -2, hand->thickness); // top left + points[1] = GPoint(hand->thickness / -2, -(hand->length - hand->thickness / 2)); // bottom left + points[2] = GPoint(0, -(hand->length)); // point + points[3] = GPoint(hand->thickness / 2, -(hand->length - hand->thickness / 2)); // bottom right + points[4] = GPoint(hand->thickness / 2, hand->thickness); // top right if (hand->backwards_extension > 0) { - points[5] = GPoint(hand->thickness / 4, hand->thickness); // bottom right - points[6] = GPoint(hand->thickness / 4, hand->thickness + hand->backwards_extension); // top right - points[7] = GPoint(hand->thickness / -4, hand->thickness + hand->backwards_extension); // top left - points[8] = GPoint(hand->thickness / -4, hand->thickness); // bottom left + points[5] = GPoint(hand->thickness / 4, hand->thickness); // bottom right + points[6] = + GPoint(hand->thickness / 4, hand->thickness + hand->backwards_extension); // top right + points[7] = + GPoint(hand->thickness / -4, hand->thickness + hand->backwards_extension); // top left + points[8] = GPoint(hand->thickness / -4, hand->thickness); // bottom left } GPathInfo info = { - .num_points = num_points, - .points = points, + .num_points = num_points, + .points = points, }; GPath *path = gpath_create(&info); return path; } -static GPath* prv_square_hand_path(GContext *ctx, ClockHand *hand) { +static GPath *prv_square_hand_path(GContext *ctx, ClockHand *hand) { uint32_t num_points = 4; - if (hand->backwards_extension > 0) num_points = 8; + if (hand->backwards_extension > 0) + num_points = 8; - GPoint *points = (GPoint*)malloc(num_points * sizeof(GPoint)); - if (!points) return NULL; + GPoint *points = (GPoint *)malloc(num_points * sizeof(GPoint)); + if (!points) + return NULL; - points[0] = GPoint(hand->thickness / -2, hand->thickness); // top left - points[1] = GPoint(hand->thickness / -2, -(hand->length)); // bottom left - points[2] = GPoint(hand->thickness / 2, -(hand->length)); // bottom right - points[3] = GPoint(hand->thickness / 2, hand->thickness); // top right + points[0] = GPoint(hand->thickness / -2, hand->thickness); // top left + points[1] = GPoint(hand->thickness / -2, -(hand->length)); // bottom left + points[2] = GPoint(hand->thickness / 2, -(hand->length)); // bottom right + points[3] = GPoint(hand->thickness / 2, hand->thickness); // top right if (hand->backwards_extension > 0) { - points[4] = GPoint(hand->thickness / 4, hand->thickness); // bottom right - points[5] = GPoint(hand->thickness / 4, hand->thickness + hand->backwards_extension); // top right - points[6] = GPoint(hand->thickness / -4, hand->thickness + hand->backwards_extension); // top left - points[7] = GPoint(hand->thickness / -4, hand->thickness); // bottom left + points[4] = GPoint(hand->thickness / 4, hand->thickness); // bottom right + points[5] = + GPoint(hand->thickness / 4, hand->thickness + hand->backwards_extension); // top right + points[6] = + GPoint(hand->thickness / -4, hand->thickness + hand->backwards_extension); // top left + points[7] = GPoint(hand->thickness / -4, hand->thickness); // bottom left } GPathInfo info = { - .num_points = num_points, - .points = points, + .num_points = num_points, + .points = points, }; GPath *path = gpath_create(&info); @@ -83,7 +91,7 @@ void watch_model_handle_change(ClockModel *model) { } static GPointPrecise prv_gpoint_from_polar(const GPointPrecise *center, uint32_t distance, - int32_t angle) { + int32_t angle) { return gpoint_from_polar_precise(center, distance << GPOINT_PRECISE_PRECISION, angle); } @@ -91,12 +99,12 @@ static void prv_graphics_draw_centered_text(GContext *ctx, const GSize *max_size const GPoint *center, const GFont font, const GColor color, const char *text) { GSize text_size = app_graphics_text_layout_get_content_size( - text, font, (GRect) { .size = *max_size }, GTextOverflowModeFill, GTextAlignmentCenter); + text, font, (GRect){.size = *max_size}, GTextOverflowModeFill, GTextAlignmentCenter); GPoint text_center = *center; text_center.x -= text_size.w / 2 + 1; text_center.y -= text_size.h * 2 / 3; graphics_context_set_text_color(ctx, color); - graphics_draw_text(ctx, text, font, (GRect) { .origin = text_center, .size = text_size }, + graphics_draw_text(ctx, text, font, (GRect){.origin = text_center, .size = text_size}, GTextOverflowModeFill, GTextAlignmentCenter, NULL); } @@ -148,34 +156,34 @@ static GPointPrecise prv_get_clock_center_point(ClockLocation location, const GR GPoint imprecise_center_point = {0}; switch (location) { case CLOCK_LOCATION_TOP: - imprecise_center_point = (GPoint) { - .x = bounds->size.w / 2, - .y = bounds->size.h / 4, + imprecise_center_point = (GPoint){ + .x = bounds->size.w / 2, + .y = bounds->size.h / 4, }; break; case CLOCK_LOCATION_RIGHT: - imprecise_center_point = (GPoint) { - .x = bounds->size.w * 3 / 4 - 5, - .y = bounds->size.h / 2, + imprecise_center_point = (GPoint){ + .x = bounds->size.w * 3 / 4 - 5, + .y = bounds->size.h / 2, }; break; case CLOCK_LOCATION_BOTTOM: - imprecise_center_point = (GPoint) { - .x = bounds->size.w / 2, - .y = bounds->size.h * 3 / 4 + 6, + imprecise_center_point = (GPoint){ + .x = bounds->size.w / 2, + .y = bounds->size.h * 3 / 4 + 6, }; break; case CLOCK_LOCATION_LEFT: - imprecise_center_point = (GPoint) { - .x = bounds->size.w / 4 + 4, - .y = bounds->size.h / 2, + imprecise_center_point = (GPoint){ + .x = bounds->size.w / 4 + 4, + .y = bounds->size.h / 2, }; break; default: // aiming for width / 2 - 0.5 to get the true center - return (GPointPrecise) { - .x = { .integer = bounds->size.w / 2 - 1, .fraction = 3 }, - .y = { .integer = bounds->size.h / 2 - 1, .fraction = 3 } + return (GPointPrecise){ + .x = {.integer = bounds->size.w / 2 - 1, .fraction = 3}, + .y = {.integer = bounds->size.h / 2 - 1, .fraction = 3} }; } return GPointPreciseFromGPoint(imprecise_center_point); @@ -184,18 +192,22 @@ static GPointPrecise prv_get_clock_center_point(ClockLocation location, const GR static void prv_draw_clock_text(GContext *ctx, ClockText text, GPoint center) { MultiWatchData *data = app_state_get_user_data(); const GRect *bounds = &window_get_root_layer(&data->window)->bounds; - switch(text.location) { + switch (text.location) { case CLOCK_TEXT_LOCATION_LEFT: - const GRect box = (GRect) { .origin = GPoint(center.x - text.offset - bounds->size.w, center.y - text.font_size * 2 / 3), .size = bounds->size }; - graphics_draw_text(ctx, text.buffer, text.font, box, - GTextOverflowModeFill, GTextAlignmentRight, NULL); + const GRect box = (GRect){ + .origin = + GPoint(center.x - text.offset - bounds->size.w, center.y - text.font_size * 2 / 3), + .size = bounds->size + }; + graphics_draw_text(ctx, text.buffer, text.font, box, GTextOverflowModeFill, + GTextAlignmentRight, NULL); break; case CLOCK_TEXT_LOCATION_BOTTOM: default: - const GPoint point = (GPoint) { center.x, center.y + text.offset }; - prv_graphics_draw_centered_text(ctx, &bounds->size, &point, text.font, - text.color, text.buffer); - break; + const GPoint point = (GPoint){center.x, center.y + text.offset}; + prv_graphics_draw_centered_text(ctx, &bounds->size, &point, text.font, text.color, + text.buffer); + break; } } @@ -212,12 +224,14 @@ static void prv_draw_clock_face(GContext *ctx, ClockFace *face) { prv_draw_watch_hand(ctx, &face->minute_hand, center); // Draw bob. - GRect bob_rect = (GRect) { - .origin = GPoint(GPointFromGPointPrecise(center).x - face->bob_radius, GPointFromGPointPrecise(center).y - face->bob_radius), + GRect bob_rect = (GRect){ + .origin = GPoint(GPointFromGPointPrecise(center).x - face->bob_radius, + GPointFromGPointPrecise(center).y - face->bob_radius), .size = GSize(face->bob_radius * 2, face->bob_radius * 2) }; - GRect bob_center_rect = (GRect) { - .origin = GPoint(GPointFromGPointPrecise(center).x - face->bob_center_radius, GPointFromGPointPrecise(center).y - face->bob_center_radius), + GRect bob_center_rect = (GRect){ + .origin = GPoint(GPointFromGPointPrecise(center).x - face->bob_center_radius, + GPointFromGPointPrecise(center).y - face->bob_center_radius), .size = GSize(face->bob_center_radius * 2, face->bob_center_radius * 2) }; graphics_context_set_fill_color(ctx, face->bob_color); @@ -226,7 +240,6 @@ static void prv_draw_clock_face(GContext *ctx, ClockFace *face) { graphics_fill_oval(ctx, bob_center_rect, GOvalScaleModeFitCircle); } - static void prv_update_proc(Layer *layer, GContext *ctx) { MultiWatchData *data = app_state_get_user_data(); @@ -242,7 +255,8 @@ static void prv_update_proc(Layer *layer, GContext *ctx) { for (uint32_t i = 0; i < clock_model->num_non_local_clocks; ++i) { // Draw clock background GRect bitmap_bounds = gbitmap_get_bounds(data->tz_bitmap[i]); - GPointPrecise bitmap_center = prv_get_clock_center_point(clock_model->non_local_clock[i].location, bounds); + GPointPrecise bitmap_center = + prv_get_clock_center_point(clock_model->non_local_clock[i].location, bounds); bitmap_bounds.origin.x = GPointFromGPointPrecise(bitmap_center).x - (bitmap_bounds.size.w / 2); bitmap_bounds.origin.y = GPointFromGPointPrecise(bitmap_center).y - (bitmap_bounds.size.h / 2); graphics_draw_bitmap_in_rect(ctx, data->tz_bitmap[i], &bitmap_bounds); @@ -261,7 +275,8 @@ static void prv_window_load(Window *window) { data->bg_bitmap = gbitmap_create_with_resource(data->clock_model.bg_bitmap_id); for (uint32_t i = 0; i < data->clock_model.num_non_local_clocks; ++i) { - data->tz_bitmap[i] = gbitmap_create_with_resource(data->clock_model.non_local_clock[i].bg_bitmap_id); + data->tz_bitmap[i] = + gbitmap_create_with_resource(data->clock_model.non_local_clock[i].bg_bitmap_id); } } @@ -286,15 +301,15 @@ static void prv_init(void) { app_state_set_user_data(data); window_init(&data->window, "TicToc"); - window_set_window_handlers(&data->window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(&data->window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); const bool animated = true; app_window_stack_push(&data->window, animated); - app_focus_service_subscribe_handlers((AppFocusHandlers) { - .did_focus = prv_app_did_focus, + app_focus_service_subscribe_handlers((AppFocusHandlers){ + .did_focus = prv_app_did_focus, }); } diff --git a/src/fw/apps/watch/tictoc/round/watch_model.c b/src/fw/apps/watch/tictoc/round/watch_model.c index 6dd64dafcb..9edc2d16cc 100644 --- a/src/fw/apps/watch/tictoc/round/watch_model.c +++ b/src/fw/apps/watch/tictoc/round/watch_model.c @@ -16,8 +16,8 @@ // TODO: Add seconds as an option static void prv_calculate_hand_angles(struct tm *tick_time, int32_t *hour_angle, int32_t *minute_angle) { - *hour_angle = (tick_time->tm_hour % 12) * TRIG_MAX_ANGLE / 12 - + tick_time->tm_min * TRIG_MAX_ANGLE / 60 / 12; + *hour_angle = (tick_time->tm_hour % 12) * TRIG_MAX_ANGLE / 12 + + tick_time->tm_min * TRIG_MAX_ANGLE / 60 / 12; *minute_angle = tick_time->tm_min * TRIG_MAX_ANGLE / 60; } @@ -26,23 +26,25 @@ static ClockFace prv_local_clock_face_default(struct tm *tick_time) { prv_calculate_hand_angles(tick_time, &hour_angle, &minute_angle); // TODO: Don't return by value. This thing is massive. - return (ClockFace) { - .hour_hand = { - .angle = hour_angle, - .backwards_extension = LOCAL_HOUR_HAND_BACK_EXT_DEFAULT, - .color = LOCAL_HOUR_HAND_COLOR_DEFAULT, - .length = LOCAL_HOUR_HAND_LENGTH_DEFAULT, - .style = CLOCK_HAND_STYLE_ROUNDED, - .thickness = LOCAL_HOUR_HAND_THICKNESS_DEFAULT, - }, - .minute_hand = { - .angle = minute_angle, - .backwards_extension = LOCAL_MINUTE_HAND_BACK_EXT_DEFAULT, - .color = LOCAL_MINUTE_HAND_COLOR_DEFAULT, - .length = LOCAL_MINUTE_HAND_LENGTH_DEFAULT, - .style = CLOCK_HAND_STYLE_ROUNDED, - .thickness = LOCAL_MINUTE_HAND_THICKNESS_DEFAULT, - }, + return (ClockFace){ + .hour_hand = + { + .angle = hour_angle, + .backwards_extension = LOCAL_HOUR_HAND_BACK_EXT_DEFAULT, + .color = LOCAL_HOUR_HAND_COLOR_DEFAULT, + .length = LOCAL_HOUR_HAND_LENGTH_DEFAULT, + .style = CLOCK_HAND_STYLE_ROUNDED, + .thickness = LOCAL_HOUR_HAND_THICKNESS_DEFAULT, + }, + .minute_hand = + { + .angle = minute_angle, + .backwards_extension = LOCAL_MINUTE_HAND_BACK_EXT_DEFAULT, + .color = LOCAL_MINUTE_HAND_COLOR_DEFAULT, + .length = LOCAL_MINUTE_HAND_LENGTH_DEFAULT, + .style = CLOCK_HAND_STYLE_ROUNDED, + .thickness = LOCAL_MINUTE_HAND_THICKNESS_DEFAULT, + }, .bob_radius = LOCAL_BOB_RADIUS_DEFAULT, .bob_color = LOCAL_BOB_COLOR_DEFAULT, .location = CLOCK_LOCATION_CENTER, @@ -51,43 +53,45 @@ static ClockFace prv_local_clock_face_default(struct tm *tick_time) { static ClockFace prv_configure_non_local_clock_face(int32_t utc_offset, const char *text, GColor text_color, GColor hand_color, - uint32_t bg_bitmap_id, - ClockLocation location) { + uint32_t bg_bitmap_id, ClockLocation location) { time_t t = rtc_get_time(); - struct tm* tick_time = pbl_override_gmtime(&t); + struct tm *tick_time = pbl_override_gmtime(&t); // TODO: Make this work with non integer hour offsets - tick_time->tm_hour += utc_offset; // TODO check if this works properly + tick_time->tm_hour += utc_offset; // TODO check if this works properly int32_t hour_angle, minute_angle; prv_calculate_hand_angles(tick_time, &hour_angle, &minute_angle); // TODO: Don't return by value. This thing is massive. - ClockFace non_local_clock = (ClockFace) { - .hour_hand = { - .length = NON_LOCAL_HOUR_HAND_LENGTH_DEFAULT, - .thickness = NON_LOCAL_HOUR_HAND_WIDTH_DEFAULT, - .backwards_extension = 0, - .angle = hour_angle, - .color = hand_color, - .style = CLOCK_HAND_STYLE_ROUNDED, - }, - .minute_hand = { - .length = NON_LOCAL_MINUTE_HAND_LENGTH_DEFAULT, - .thickness = NON_LOCAL_MINUTE_HAND_WIDTH_DEFAULT, - .backwards_extension = 0, - .angle = minute_angle, - .color = hand_color, - .style = CLOCK_HAND_STYLE_ROUNDED, - }, - .location = location, - .text = { - .type = CLOCK_TEXT_TYPE_BUFFER, - .location = CLOCK_TEXT_LOCATION_BOTTOM, - .color = text_color, - .offset = NON_LOCAL_TEXT_OFFSET, - .font = fonts_get_system_font(NON_LOCAL_TEXT_FONT), - .font_size = NON_LOCAL_TEXT_FONT_SIZE, - }, - .bg_bitmap_id = bg_bitmap_id, + ClockFace non_local_clock = (ClockFace){ + .hour_hand = + { + .length = NON_LOCAL_HOUR_HAND_LENGTH_DEFAULT, + .thickness = NON_LOCAL_HOUR_HAND_WIDTH_DEFAULT, + .backwards_extension = 0, + .angle = hour_angle, + .color = hand_color, + .style = CLOCK_HAND_STYLE_ROUNDED, + }, + .minute_hand = + { + .length = NON_LOCAL_MINUTE_HAND_LENGTH_DEFAULT, + .thickness = NON_LOCAL_MINUTE_HAND_WIDTH_DEFAULT, + .backwards_extension = 0, + .angle = minute_angle, + .color = hand_color, + .style = CLOCK_HAND_STYLE_ROUNDED, + }, + .location = location, + .text = + { + .type = CLOCK_TEXT_TYPE_BUFFER, + .location = CLOCK_TEXT_LOCATION_BOTTOM, + .color = text_color, + .offset = NON_LOCAL_TEXT_OFFSET, + .font = fonts_get_system_font(NON_LOCAL_TEXT_FONT), + .font_size = NON_LOCAL_TEXT_FONT_SIZE, + }, + .bg_bitmap_id = bg_bitmap_id, }; strncpy(non_local_clock.text.buffer, text, sizeof(non_local_clock.text.buffer)); return non_local_clock; @@ -96,15 +100,15 @@ static ClockFace prv_configure_non_local_clock_face(int32_t utc_offset, const ch // Configure the text displayed on the clock. static ClockText prv_configure_clock_text(ClockTextType type, ClockTextLocation location, GColor color, struct tm *tick_time) { - ClockText text = (ClockText) { - .location = location, - .color = color, - .offset = LOCAL_TEXT_OFFSET, - .font = fonts_get_system_font(LOCAL_TEXT_FONT), - .font_size = LOCAL_TEXT_FONT_SIZE, + ClockText text = (ClockText){ + .location = location, + .color = color, + .offset = LOCAL_TEXT_OFFSET, + .font = fonts_get_system_font(LOCAL_TEXT_FONT), + .font_size = LOCAL_TEXT_FONT_SIZE, }; - switch(type) { + switch (type) { case CLOCK_TEXT_TYPE_TIME: // TODO: Return system configured format strftime(text.buffer, sizeof(text.buffer), "$l:%M%P", tick_time); @@ -142,16 +146,14 @@ static ClockModel prv_clock_model_default(struct tm *tick_time) { model.local_clock.minute_hand.thickness = 10; model.local_clock.minute_hand.style = CLOCK_HAND_STYLE_SQUARE; model.local_clock.minute_hand.length = 105; - model.non_local_clock[0] = prv_configure_non_local_clock_face(-7, "LA", GColorDarkGray, - GColorWhite, - RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_BLACK, - CLOCK_LOCATION_LEFT); - model.non_local_clock[1] = prv_configure_non_local_clock_face(2, "PAR", GColorDarkGray, - GColorWhite, - RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_BLACK, - CLOCK_LOCATION_RIGHT); - model.local_clock.text = prv_configure_clock_text(CLOCK_TEXT_TYPE_DATE, CLOCK_TEXT_LOCATION_BOTTOM, - GColorWhite, tick_time); + model.non_local_clock[0] = prv_configure_non_local_clock_face( + -7, "LA", GColorDarkGray, GColorWhite, RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_BLACK, + CLOCK_LOCATION_LEFT); + model.non_local_clock[1] = prv_configure_non_local_clock_face( + 2, "PAR", GColorDarkGray, GColorWhite, RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_BLACK, + CLOCK_LOCATION_RIGHT); + model.local_clock.text = prv_configure_clock_text( + CLOCK_TEXT_TYPE_DATE, CLOCK_TEXT_LOCATION_BOTTOM, GColorWhite, tick_time); model.bg_bitmap_id = RESOURCE_ID_MULTIWATCH_BACKGROUND_20MM_BLACK; break; case WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14: @@ -165,16 +167,14 @@ static ClockModel prv_clock_model_default(struct tm *tick_time) { model.local_clock.minute_hand.thickness = 14; model.local_clock.minute_hand.length = 110; model.num_non_local_clocks = 2; - model.non_local_clock[0] = prv_configure_non_local_clock_face(-7, "LA", GColorDarkGray, - GColorBlack, - RESOURCE_ID_MULTIWATCH_TIMEZONE_14MM_SILVER, - CLOCK_LOCATION_LEFT); - model.non_local_clock[1] = prv_configure_non_local_clock_face(2, "PAR", GColorDarkGray, - GColorBlack, - RESOURCE_ID_MULTIWATCH_TIMEZONE_14MM_SILVER, - CLOCK_LOCATION_RIGHT); - model.local_clock.text = prv_configure_clock_text(CLOCK_TEXT_TYPE_DATE, CLOCK_TEXT_LOCATION_BOTTOM, - GColorDarkGray, tick_time); + model.non_local_clock[0] = prv_configure_non_local_clock_face( + -7, "LA", GColorDarkGray, GColorBlack, RESOURCE_ID_MULTIWATCH_TIMEZONE_14MM_SILVER, + CLOCK_LOCATION_LEFT); + model.non_local_clock[1] = prv_configure_non_local_clock_face( + 2, "PAR", GColorDarkGray, GColorBlack, RESOURCE_ID_MULTIWATCH_TIMEZONE_14MM_SILVER, + CLOCK_LOCATION_RIGHT); + model.local_clock.text = prv_configure_clock_text( + CLOCK_TEXT_TYPE_DATE, CLOCK_TEXT_LOCATION_BOTTOM, GColorDarkGray, tick_time); model.bg_bitmap_id = RESOURCE_ID_MULTIWATCH_BACKGROUND_14MM_SILVER; break; case WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20: @@ -188,14 +188,12 @@ static ClockModel prv_clock_model_default(struct tm *tick_time) { model.local_clock.minute_hand.length = 105; model.local_clock.bob_color = GColorBlack; model.num_non_local_clocks = 2; - model.non_local_clock[0] = prv_configure_non_local_clock_face(-7, "LA", GColorWhite, - GColorWhite, - RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_SILVER, - CLOCK_LOCATION_LEFT); - model.non_local_clock[1] = prv_configure_non_local_clock_face(2, "PAR", GColorWhite, - GColorWhite, - RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_SILVER, - CLOCK_LOCATION_RIGHT); + model.non_local_clock[0] = prv_configure_non_local_clock_face( + -7, "LA", GColorWhite, GColorWhite, RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_SILVER, + CLOCK_LOCATION_LEFT); + model.non_local_clock[1] = prv_configure_non_local_clock_face( + 2, "PAR", GColorWhite, GColorWhite, RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_SILVER, + CLOCK_LOCATION_RIGHT); model.bg_bitmap_id = RESOURCE_ID_MULTIWATCH_BACKGROUND_20MM_SILVER; break; case WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14: @@ -211,35 +209,31 @@ static ClockModel prv_clock_model_default(struct tm *tick_time) { model.local_clock.bob_center_radius = 4; model.local_clock.bob_color = GColorWhite; model.num_non_local_clocks = 2; - model.non_local_clock[0] = prv_configure_non_local_clock_face(-7, "LA", GColorBlack, - GColorWhite, - RESOURCE_ID_MULTIWATCH_TIMEZONE_14MM_ROSE_GOLD, - CLOCK_LOCATION_LEFT); - model.non_local_clock[1] = prv_configure_non_local_clock_face(2, "PAR", GColorBlack, - GColorWhite, - RESOURCE_ID_MULTIWATCH_TIMEZONE_14MM_ROSE_GOLD, - CLOCK_LOCATION_RIGHT); + model.non_local_clock[0] = prv_configure_non_local_clock_face( + -7, "LA", GColorBlack, GColorWhite, RESOURCE_ID_MULTIWATCH_TIMEZONE_14MM_ROSE_GOLD, + CLOCK_LOCATION_LEFT); + model.non_local_clock[1] = prv_configure_non_local_clock_face( + 2, "PAR", GColorBlack, GColorWhite, RESOURCE_ID_MULTIWATCH_TIMEZONE_14MM_ROSE_GOLD, + CLOCK_LOCATION_RIGHT); model.bg_bitmap_id = RESOURCE_ID_MULTIWATCH_BACKGROUND_14MM_ROSE_GOLD; break; #else case WATCH_INFO_COLOR_TIME_ROUND_BLACK_14: model.local_clock.minute_hand.color = GColorBlue; - model.local_clock.text = prv_configure_clock_text(CLOCK_TEXT_TYPE_DATE, CLOCK_TEXT_LOCATION_LEFT, - GColorWhite, tick_time); + model.local_clock.text = prv_configure_clock_text( + CLOCK_TEXT_TYPE_DATE, CLOCK_TEXT_LOCATION_LEFT, GColorWhite, tick_time); model.bg_bitmap_id = RESOURCE_ID_MULTIWATCH_BACKGROUND_14MM_BLACK_RED; break; case WATCH_INFO_COLOR_TIME_ROUND_BLACK_20: model.num_non_local_clocks = 2; - model.non_local_clock[0] = prv_configure_non_local_clock_face(-7, "LA", GColorDarkGray, - GColorWhite, - RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_BLACK, - CLOCK_LOCATION_LEFT); - model.non_local_clock[1] = prv_configure_non_local_clock_face(2, "PAR", GColorDarkGray, - GColorWhite, - RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_BLACK, - CLOCK_LOCATION_RIGHT); - model.local_clock.text = prv_configure_clock_text(CLOCK_TEXT_TYPE_DATE, CLOCK_TEXT_LOCATION_BOTTOM, - GColorWhite, tick_time); + model.non_local_clock[0] = prv_configure_non_local_clock_face( + -7, "LA", GColorDarkGray, GColorWhite, RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_BLACK, + CLOCK_LOCATION_LEFT); + model.non_local_clock[1] = prv_configure_non_local_clock_face( + 2, "PAR", GColorDarkGray, GColorWhite, RESOURCE_ID_MULTIWATCH_TIMEZONE_20MM_BLACK, + CLOCK_LOCATION_RIGHT); + model.local_clock.text = prv_configure_clock_text( + CLOCK_TEXT_TYPE_DATE, CLOCK_TEXT_LOCATION_BOTTOM, GColorWhite, tick_time); model.bg_bitmap_id = RESOURCE_ID_MULTIWATCH_BACKGROUND_20MM_BLACK; break; case WATCH_INFO_COLOR_TIME_ROUND_SILVER_14: @@ -252,8 +246,8 @@ static ClockModel prv_clock_model_default(struct tm *tick_time) { model.local_clock.minute_hand.color = GColorCadetBlue; model.local_clock.minute_hand.thickness = 10; model.local_clock.minute_hand.length = 66; - model.local_clock.text = prv_configure_clock_text(CLOCK_TEXT_TYPE_DATE, CLOCK_TEXT_LOCATION_BOTTOM, - GColorDarkGray, tick_time); + model.local_clock.text = prv_configure_clock_text( + CLOCK_TEXT_TYPE_DATE, CLOCK_TEXT_LOCATION_BOTTOM, GColorDarkGray, tick_time); model.bg_bitmap_id = RESOURCE_ID_MULTIWATCH_BACKGROUND_14MM_SILVER; break; case WATCH_INFO_COLOR_TIME_ROUND_SILVER_20: diff --git a/src/fw/apps/watch/tictoc/round/watch_model.h b/src/fw/apps/watch/tictoc/round/watch_model.h index 729e59cc36..185d6036e8 100644 --- a/src/fw/apps/watch/tictoc/round/watch_model.h +++ b/src/fw/apps/watch/tictoc/round/watch_model.h @@ -114,7 +114,7 @@ typedef struct { typedef struct { ClockTextType type; ClockTextLocation location; - char buffer[10]; // FIXME magic number + char buffer[10]; // FIXME magic number GColor color; uint16_t offset; GFont font; diff --git a/src/fw/apps/watch/tictoc/tictoc.c b/src/fw/apps/watch/tictoc/tictoc.c index 01273ebfc2..37dc6a711e 100644 --- a/src/fw/apps/watch/tictoc/tictoc.c +++ b/src/fw/apps/watch/tictoc/tictoc.c @@ -5,17 +5,19 @@ #include "resource/resource_ids.auto.h" -const PebbleProcessMd* tictoc_get_app_info(void) { +const PebbleProcessMd *tictoc_get_app_info(void) { static const PebbleProcessMdSystem s_app_md = { - .common = { - // UUID: 8f3c8686-31a1-4f5f-91f5-01600c9bdc59 - .uuid = { 0x8f, 0x3c, 0x86, 0x86, 0x31, 0xa1, 0x4f, 0x5f, - 0x91, 0xf5, 0x01, 0x60, 0x0c, 0x9b, 0xdc, 0x59 }, - .main_func = tictoc_main, - .process_type = ProcessTypeWatchface, - }, - .icon_resource_id = RESOURCE_ID_MENU_ICON_TICTOC_WATCH, - .name = "TicToc", + .common = + { + // UUID: 8f3c8686-31a1-4f5f-91f5-01600c9bdc59 + .uuid = + {0x8f, 0x3c, 0x86, 0x86, 0x31, 0xa1, 0x4f, 0x5f, 0x91, 0xf5, 0x01, 0x60, 0x0c, + 0x9b, 0xdc, 0x59}, + .main_func = tictoc_main, + .process_type = ProcessTypeWatchface, + }, + .icon_resource_id = RESOURCE_ID_MENU_ICON_TICTOC_WATCH, + .name = "TicToc", }; - return (const PebbleProcessMd*) &s_app_md; + return (const PebbleProcessMd *)&s_app_md; } diff --git a/src/fw/apps/watch/tictoc/tictoc.h b/src/fw/apps/watch/tictoc/tictoc.h index 9557dff794..068557e44a 100644 --- a/src/fw/apps/watch/tictoc/tictoc.h +++ b/src/fw/apps/watch/tictoc/tictoc.h @@ -7,4 +7,4 @@ void tictoc_main(void); -const PebbleProcessMd* tictoc_get_app_info(void); +const PebbleProcessMd *tictoc_get_app_info(void); diff --git a/src/fw/board/board.h b/src/fw/board/board.h index 4529adb00e..85e6cb1088 100644 --- a/src/fw/board/board.h +++ b/src/fw/board/board.h @@ -4,11 +4,11 @@ #pragma once #if defined(CONFIG_QEMU) -# include "board_qemu.h" +#include "board_qemu.h" #elif defined(CONFIG_SOC_NRF52) -# include "board_nrf5.h" +#include "board_nrf5.h" #elif defined(CONFIG_SOC_SF32LB52) -# include "board_sf32lb52.h" +#include "board_sf32lb52.h" #elif !defined(SDK) && !defined(UNITTEST) -# error "Unknown or missing MICRO_FAMILY_* define" +#error "Unknown or missing MICRO_FAMILY_* define" #endif diff --git a/src/fw/board/board_definitions.h b/src/fw/board/board_definitions.h index e5f71ed6b1..749b307dc9 100644 --- a/src/fw/board/board_definitions.h +++ b/src/fw/board/board_definitions.h @@ -6,7 +6,8 @@ // FIXME: PBL-21049 Fix platform abstraction and board definition scheme #ifdef CONFIG_BOARD_ASTERIX #include "boards/board_asterix.h" -#elif defined(CONFIG_BOARD_OBELIX_DVT) || defined(CONFIG_BOARD_OBELIX_PVT) || defined(CONFIG_BOARD_OBELIX_BB2) +#elif defined(CONFIG_BOARD_OBELIX_DVT) || defined(CONFIG_BOARD_OBELIX_PVT) || \ + defined(CONFIG_BOARD_OBELIX_BB2) #include "boards/board_obelix.h" #elif defined(CONFIG_BOARD_GETAFIX_DVT) || defined(CONFIG_BOARD_GETAFIX_DVT2) #include "boards/board_getafix.h" diff --git a/src/fw/board/board_nrf5.h b/src/fw/board/board_nrf5.h index 192a9cdf8d..291c1d043c 100644 --- a/src/fw/board/board_nrf5.h +++ b/src/fw/board/board_nrf5.h @@ -12,7 +12,7 @@ #include #pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" #include #include #include @@ -30,24 +30,24 @@ enum { #define IRQ_DEF(num, irq) IS_VALID_IRQ__##irq, #if defined(CONFIG_SOC_NRF52) -# include "irq_nrf52.def" +#include "irq_nrf52.def" #else -# error need IRQ table for new micro family +#error need IRQ table for new micro family #endif #undef IRQ_DEF }; //! Creates a trampoline to the interrupt handler defined within the driver #define IRQ_MAP(irq, handler, device) \ - void irq##_IRQHandler(void) { \ - handler(device); \ - } \ + void irq##_IRQHandler(void) { \ + handler(device); \ + } \ _Static_assert(IS_VALID_IRQ__##irq || true, "(See comment below)") #define IRQ_MAP_NRFX(irq, handler) \ - void irq##_IRQHandler(void) { \ - handler(); \ - } \ + void irq##_IRQHandler(void) { \ + handler(); \ + } \ _Static_assert(IS_VALID_IRQ__##irq || true, "(See comment below)") /* @@ -59,38 +59,38 @@ enum { typedef struct { nrfx_gpiote_t peripheral; uint8_t channel; - uint32_t gpio_pin; ///< The result of NRF_GPIO_PIN_MAP(port, pin). + uint32_t gpio_pin; ///< The result of NRF_GPIO_PIN_MAP(port, pin). } GpioteConfig; typedef GpioteConfig ExtiConfig; /* compatibility */ typedef struct { - const char* const name; ///< Name for debugging purposes. + const char *const name; ///< Name for debugging purposes. GpioteConfig gpiote; nrf_gpio_pin_pull_t pull; } ButtonConfig; typedef struct { - const uint32_t gpio_pin; ///< The result of NRF_GPIO_PIN_MAP(port, pin). + const uint32_t gpio_pin; ///< The result of NRF_GPIO_PIN_MAP(port, pin). } ButtonComConfig; #define NRF5_GPIO_RESOURCE_EXISTS ((void *)1) typedef struct { - void *gpio; ///< For compatibility, GPIO_RESOURCE_EXISTS if this is in use, NULL if not. - const uint32_t gpio_pin; ///< The result of NRF_GPIO_PIN_MAP(port, pin). + void *gpio; ///< For compatibility, GPIO_RESOURCE_EXISTS if this is in use, NULL if not. + const uint32_t gpio_pin; ///< The result of NRF_GPIO_PIN_MAP(port, pin). } InputConfig; typedef struct { - void *gpio; ///< For compatibility, GPIO_RESOURCE_EXISTS if this is in use, NULL if not. - const uint32_t gpio_pin; ///< The result of NRF_GPIO_PIN_MAP(port, pin). - bool active_high; ///< Pin is active high or active low + void *gpio; ///< For compatibility, GPIO_RESOURCE_EXISTS if this is in use, NULL if not. + const uint32_t gpio_pin; ///< The result of NRF_GPIO_PIN_MAP(port, pin). + bool active_high; ///< Pin is active high or active low } OutputConfig; //! Alternate function pin configuration //! Used to configure a pin for use by a peripheral typedef struct { - void *gpio; ///< For compatibility, GPIO_RESOURCE_EXISTS if this is in use, NULL if not. - const uint32_t gpio_pin; ///< The result of NRF_GPIO_PIN_MAP(port, pin). + void *gpio; ///< For compatibility, GPIO_RESOURCE_EXISTS if this is in use, NULL if not. + const uint32_t gpio_pin; ///< The result of NRF_GPIO_PIN_MAP(port, pin). } AfConfig; typedef struct { @@ -136,7 +136,7 @@ typedef struct { const OutputConfig photo_en; const bool als_always_on; - const uint8_t backlight_on_percent; // percent of max possible brightness + const uint8_t backlight_on_percent; // percent of max possible brightness } BoardConfig; // Button Configuration diff --git a/src/fw/board/board_qemu.h b/src/fw/board/board_qemu.h index bae2fdb64a..6b684dd738 100644 --- a/src/fw/board/board_qemu.h +++ b/src/fw/board/board_qemu.h @@ -14,16 +14,16 @@ #define IRQ_PRIORITY_INVALID (1 << __NVIC_PRIO_BITS) enum { - #define IRQ_DEF(num, irq) IS_VALID_IRQ__##irq, - #include "irq_qemu.def" - #undef IRQ_DEF +#define IRQ_DEF(num, irq) IS_VALID_IRQ__##irq, +#include "irq_qemu.def" +#undef IRQ_DEF }; //! Creates a trampoline to the interrupt handler defined within the driver #define IRQ_MAP(irq, handler, device) \ - void irq##_IRQHandler(void) { \ - handler(device); \ - } \ + void irq##_IRQHandler(void) { \ + handler(device); \ + } \ _Static_assert(IS_VALID_IRQ__##irq || true, "(See comment below)") /* * The above static assert checks that the requested IRQ is valid by checking that the enum @@ -133,19 +133,19 @@ typedef struct { } BoardConfigMag; // QEMU MMIO peripheral base addresses -#define QEMU_UART0_BASE 0x40000000 -#define QEMU_UART1_BASE 0x40001000 -#define QEMU_UART2_BASE 0x40002000 -#define QEMU_TIMER0_BASE 0x40003000 -#define QEMU_TIMER1_BASE 0x40004000 -#define QEMU_RTC_BASE 0x40005000 -#define QEMU_GPIO_BASE 0x40006000 -#define QEMU_SYSCTRL_BASE 0x40007000 -#define QEMU_DISPLAY_BASE 0x40008000 +#define QEMU_UART0_BASE 0x40000000 +#define QEMU_UART1_BASE 0x40001000 +#define QEMU_UART2_BASE 0x40002000 +#define QEMU_TIMER0_BASE 0x40003000 +#define QEMU_TIMER1_BASE 0x40004000 +#define QEMU_RTC_BASE 0x40005000 +#define QEMU_GPIO_BASE 0x40006000 +#define QEMU_SYSCTRL_BASE 0x40007000 +#define QEMU_DISPLAY_BASE 0x40008000 #define QEMU_DISPLAY_FB_BASE 0x50000000 -#define QEMU_EXTFLASH_BASE 0x40010000 -#define QEMU_TOUCH_BASE 0x40011000 -#define QEMU_AUDIO_BASE 0x40012000 +#define QEMU_EXTFLASH_BASE 0x40010000 +#define QEMU_TOUCH_BASE 0x40011000 +#define QEMU_AUDIO_BASE 0x40012000 #define QEMU_EXTFLASH_XIP_BASE 0x10000000 diff --git a/src/fw/board/board_sf32lb52.h b/src/fw/board/board_sf32lb52.h index e5b73851e7..0a7597c535 100644 --- a/src/fw/board/board_sf32lb52.h +++ b/src/fw/board/board_sf32lb52.h @@ -14,16 +14,16 @@ #define IRQ_PRIORITY_INVALID (1 << __NVIC_PRIO_BITS) enum { - #define IRQ_DEF(num, irq) IS_VALID_IRQ__##irq, - #include "irq_sf32lb52.def" - #undef IRQ_DEF +#define IRQ_DEF(num, irq) IS_VALID_IRQ__##irq, +#include "irq_sf32lb52.def" +#undef IRQ_DEF }; //! Creates a trampoline to the interrupt handler defined within the driver #define IRQ_MAP(irq, handler, device) \ - void irq##_IRQHandler(void) { \ - handler(device); \ - } \ + void irq##_IRQHandler(void) { \ + handler(device); \ + } \ _Static_assert(IS_VALID_IRQ__##irq || true, "(See comment below)") /* * The above static assert checks that the requested IRQ is valid by checking that the enum @@ -46,9 +46,9 @@ typedef enum { } GPIOPuPd_TypeDef; typedef struct { - GPIO_TypeDef* const peripheral; ///< One of GPIOX. For example, GPIOA. - const uint32_t gpio_pin; ///< One of GPIO_Pin_X. - GPIOPuPd_TypeDef pull; ///< Pull-up / pull-down configuration for the pin + GPIO_TypeDef *const peripheral; ///< One of GPIOX. For example, GPIOA. + const uint32_t gpio_pin; ///< One of GPIO_Pin_X. + GPIOPuPd_TypeDef pull; ///< Pull-up / pull-down configuration for the pin } ExtiConfig; typedef struct { @@ -75,7 +75,7 @@ typedef struct { uint16_t resolution; int enabled; uint16_t channel; - uint8_t is_comp; + uint8_t is_comp; } PwmState; typedef struct { @@ -89,7 +89,7 @@ typedef struct { typedef struct { uint8_t backlight_on_percent; - //ambient light config + // ambient light config uint32_t ambient_light_dark_threshold; uint32_t ambient_k_delta_threshold; // Raw-count -> lux conversion: lux = (level - offset) * num / den. @@ -105,8 +105,8 @@ typedef struct { } BoardConfig; typedef struct { - const char* name; - GPIO_TypeDef* const port; + const char *name; + GPIO_TypeDef *const port; uint8_t pin; GPIOPuPd_TypeDef pull; bool active_high; diff --git a/src/fw/board/boards/board_asterix.c b/src/fw/board/boards/board_asterix.c index e7a67371ef..88d7691094 100644 --- a/src/fw/board/boards/board_asterix.c +++ b/src/fw/board/boards/board_asterix.c @@ -31,13 +31,12 @@ static QSPIPort QSPI_PORT = { .clk_freq_hz = 8000000UL, .cs_gpio = NRF_GPIO_PIN_MAP(0, 17), .clk_gpio = NRF_GPIO_PIN_MAP(0, 19), - .data_gpio = - { - NRF_GPIO_PIN_MAP(0, 20), - NRF_GPIO_PIN_MAP(0, 21), - NRF_GPIO_PIN_MAP(0, 22), - NRF_GPIO_PIN_MAP(0, 23), - }, + .data_gpio = { + NRF_GPIO_PIN_MAP(0, 20), + NRF_GPIO_PIN_MAP(0, 21), + NRF_GPIO_PIN_MAP(0, 22), + NRF_GPIO_PIN_MAP(0, 23), + }, }; QSPIPort *const QSPI = &QSPI_PORT; @@ -175,24 +174,28 @@ static LSM6DSOState s_lsm6dso_state; static const LSM6DSOConfig s_lsm6dso_config = { .state = &s_lsm6dso_state, - .i2c = { - .bus = &I2C_IIC2_BUS, - .address = 0x6A << 1, - }, - .int1 = { - .peripheral = NRFX_GPIOTE_INSTANCE(0), - .channel = 7, - .gpio_pin = NRF_GPIO_PIN_MAP(1, 13), - }, - .int1_in = { - .gpio = NRF5_GPIO_RESOURCE_EXISTS, - .gpio_pin = NRF_GPIO_PIN_MAP(1, 13), - }, - .axis_map = { - [AXIS_X] = 1, - [AXIS_Y] = 0, - [AXIS_Z] = 2, - }, + .i2c = + { + .bus = &I2C_IIC2_BUS, + .address = 0x6A << 1, + }, + .int1 = + { + .peripheral = NRFX_GPIOTE_INSTANCE(0), + .channel = 7, + .gpio_pin = NRF_GPIO_PIN_MAP(1, 13), + }, + .int1_in = + { + .gpio = NRF5_GPIO_RESOURCE_EXISTS, + .gpio_pin = NRF_GPIO_PIN_MAP(1, 13), + }, + .axis_map = + { + [AXIS_X] = 1, + [AXIS_Y] = 0, + [AXIS_Z] = 2, + }, .axis_dir = { [AXIS_X] = 1, [AXIS_Y] = 1, @@ -211,13 +214,13 @@ IRQ_MAP_NRFX(PDM, NRFX_PDM_INST_HANDLER_GET(0)); /* Microphone */ static MicDeviceState s_mic_state_storage; static MicDevice s_mic_device = { - .state = &s_mic_state_storage, - .pdm_instance = NRFX_PDM_INSTANCE(0), - .clk_pin = NRF_GPIO_PIN_MAP(1, 0), // P1.00 - PDM CLK - .data_pin = NRF_GPIO_PIN_MAP(0, 24), // P0.24 - PDM DATA - .channels = 1, + .state = &s_mic_state_storage, + .pdm_instance = NRFX_PDM_INSTANCE(0), + .clk_pin = NRF_GPIO_PIN_MAP(1, 0), // P1.00 - PDM CLK + .data_pin = NRF_GPIO_PIN_MAP(0, 24), // P0.24 - PDM DATA + .channels = 1, }; -MicDevice * const MIC = &s_mic_device; +MicDevice *const MIC = &s_mic_device; /* Speaker / audio output (DA7212 codec over I2S) */ static AudioDeviceState s_audio_state_storage; @@ -228,23 +231,23 @@ static void prv_audio_power_down(void) { NPM1300_OPS.dischg_limit_ma_set(NPM1300_CONFIG.dischg_limit_ma); } static const BoardPowerOps s_audio_power_ops = { - .power_up = prv_audio_power_up, - .power_down = prv_audio_power_down, + .power_up = prv_audio_power_up, + .power_down = prv_audio_power_down, }; static const AudioDevice s_audio_device = { - .state = &s_audio_state_storage, - .i2s_instance = NRFX_I2S_INSTANCE(0), - .sck_pin = NRF_GPIO_PIN_MAP(0, 12), // P0.12 - I2S SCK -> DA7212 BCLK - .lrck_pin = NRF_GPIO_PIN_MAP(0, 7), // P0.07 - I2S LRCK -> DA7212 WCLK - .mck_pin = NRF_GPIO_PIN_MAP(1, 9), // P1.09 - I2S MCK -> DA7212 MCLK - .sdout_pin = NRF_GPIO_PIN_MAP(0, 13), // P0.13 - I2S SDOUT -> DA7212 DATA_IN - .sdin_pin = NRF_I2S_PIN_NOT_CONNECTED, // codec DATA_OUT unused for playback - .irq_priority = 5, - .codec = &I2C_SLAVE_DA7212, - .power_ops = &s_audio_power_ops, - .samplerate = 16000, + .state = &s_audio_state_storage, + .i2s_instance = NRFX_I2S_INSTANCE(0), + .sck_pin = NRF_GPIO_PIN_MAP(0, 12), // P0.12 - I2S SCK -> DA7212 BCLK + .lrck_pin = NRF_GPIO_PIN_MAP(0, 7), // P0.07 - I2S LRCK -> DA7212 WCLK + .mck_pin = NRF_GPIO_PIN_MAP(1, 9), // P1.09 - I2S MCK -> DA7212 MCLK + .sdout_pin = NRF_GPIO_PIN_MAP(0, 13), // P0.13 - I2S SDOUT -> DA7212 DATA_IN + .sdin_pin = NRF_I2S_PIN_NOT_CONNECTED, // codec DATA_OUT unused for playback + .irq_priority = 5, + .codec = &I2C_SLAVE_DA7212, + .power_ops = &s_audio_power_ops, + .samplerate = 16000, }; -AudioDevice * const AUDIO = (AudioDevice *)&s_audio_device; +AudioDevice *const AUDIO = (AudioDevice *)&s_audio_device; /* sensor SPI bus */ @@ -256,12 +259,9 @@ IRQ_MAP_NRFX(PWM0, nrfx_pwm_0_irq_handler); IRQ_MAP_NRFX(RTC1, rtc_irq_handler); const Npm1300Config NPM1300_CONFIG = { - // 128mA = ~1C (rapid charge) - .chg_current_ma = 128, - .dischg_limit_ma = 200, - .term_current_pct = 10, - .thermistor_beta = 3380, - .ntc_hot_celsius = 45, + // 128mA = ~1C (rapid charge) + .chg_current_ma = 128, .dischg_limit_ma = 200, .term_current_pct = 10, + .thermistor_beta = 3380, .ntc_hot_celsius = 45, }; void board_early_init(void) { @@ -285,7 +285,7 @@ void board_init(void) { i2c_init(&I2C_NPMC_IIC1_BUS); i2c_init(&I2C_IIC2_BUS); - uint8_t da7212_powerdown[] = { 0xFD /* SYSTEM_ACTIVE */, 0 }; + uint8_t da7212_powerdown[] = {0xFD /* SYSTEM_ACTIVE */, 0}; i2c_use(I2C_DA7212); i2c_write_block(I2C_DA7212, 2, da7212_powerdown); i2c_release(I2C_DA7212); diff --git a/src/fw/board/boards/board_asterix.h b/src/fw/board/boards/board_asterix.h index 4590775673..5d41271ff8 100644 --- a/src/fw/board/boards/board_asterix.h +++ b/src/fw/board/boards/board_asterix.h @@ -14,103 +14,109 @@ #define BOARD_RTC_IRQN RTC1_IRQn static const BoardConfig BOARD_CONFIG = { - .ambient_light_dark_threshold = 100, - .ambient_k_delta_threshold = 30, - .als_always_on = true, + .ambient_light_dark_threshold = 100, + .ambient_k_delta_threshold = 30, + .als_always_on = true, - .backlight_on_percent = 25, + .backlight_on_percent = 25, - .mic_config = { - .gain = 40, - } + .mic_config = { + .gain = 40, + } }; static const BoardConfigButton BOARD_CONFIG_BUTTON = { - .buttons = { - [BUTTON_ID_BACK] = - { "Back", { NRFX_GPIOTE_INSTANCE(0), 2, NRF_GPIO_PIN_MAP(0, 28) }, NRF_GPIO_PIN_PULLUP }, - [BUTTON_ID_UP] = - { "Up", { NRFX_GPIOTE_INSTANCE(0), 3, NRF_GPIO_PIN_MAP(0, 29) }, NRF_GPIO_PIN_PULLUP }, - [BUTTON_ID_SELECT] = - { "Select", { NRFX_GPIOTE_INSTANCE(0), 4, NRF_GPIO_PIN_MAP(0, 30) }, NRF_GPIO_PIN_PULLUP }, - [BUTTON_ID_DOWN] = - { "Down", { NRFX_GPIOTE_INSTANCE(0), 5, NRF_GPIO_PIN_MAP(0, 31) }, NRF_GPIO_PIN_PULLUP }, - }, - .active_high = false, - .timer = NRFX_TIMER_INSTANCE(1), + .buttons = + { + [BUTTON_ID_BACK] = + {"Back", + {NRFX_GPIOTE_INSTANCE(0), 2, NRF_GPIO_PIN_MAP(0, 28)}, + NRF_GPIO_PIN_PULLUP}, + [BUTTON_ID_UP] = + {"Up", {NRFX_GPIOTE_INSTANCE(0), 3, NRF_GPIO_PIN_MAP(0, 29)}, NRF_GPIO_PIN_PULLUP}, + [BUTTON_ID_SELECT] = + {"Select", + {NRFX_GPIOTE_INSTANCE(0), 4, NRF_GPIO_PIN_MAP(0, 30)}, + NRF_GPIO_PIN_PULLUP}, + [BUTTON_ID_DOWN] = + {"Down", + {NRFX_GPIOTE_INSTANCE(0), 5, NRF_GPIO_PIN_MAP(0, 31)}, + NRF_GPIO_PIN_PULLUP}, + }, + .active_high = false, + .timer = NRFX_TIMER_INSTANCE(1), }; static const BoardConfigPower BOARD_CONFIG_POWER = { - .pmic_int = { NRFX_GPIOTE_INSTANCE(0), 1, NRF_GPIO_PIN_MAP(1, 12) }, - .pmic_int_gpio = { NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(1, 12) }, - .low_power_threshold = 2, - .battery_capacity_hours = 450, + .pmic_int = {NRFX_GPIOTE_INSTANCE(0), 1, NRF_GPIO_PIN_MAP(1, 12)}, + .pmic_int_gpio = {NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(1, 12)}, + .low_power_threshold = 2, + .battery_capacity_hours = 450, }; static const BoardConfigActuator BOARD_CONFIG_VIBE = { - .ctl = { NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(0, 2), true }, // LRA_EN + .ctl = {NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(0, 2), true}, // LRA_EN }; static const BoardConfigAccel BOARD_CONFIG_ACCEL = { - .default_motion_sensitivity = 55U, // Medium + .default_motion_sensitivity = 55U, // Medium }; static const BoardConfigMag BOARD_CONFIG_MAG = { - .mag_config = { - .axes_offsets[AXIS_X] = 1, - .axes_offsets[AXIS_Y] = 0, - .axes_offsets[AXIS_Z] = 2, - .axes_inverts[AXIS_X] = false, - .axes_inverts[AXIS_Y] = true, - .axes_inverts[AXIS_Z] = false, - }, + .mag_config = { + .axes_offsets[AXIS_X] = 1, + .axes_offsets[AXIS_Y] = 0, + .axes_offsets[AXIS_Z] = 2, + .axes_inverts[AXIS_X] = false, + .axes_inverts[AXIS_Y] = true, + .axes_inverts[AXIS_Z] = false, + }, }; -extern UARTDevice * const DBG_UART; +extern UARTDevice *const DBG_UART; extern PwmState BACKLIGHT_PWM_STATE; static const BacklightPwmConfig BACKLIGHT_PWM = { - .ctl = { NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(1, 8), true }, - .pwm = { - .state = &BACKLIGHT_PWM_STATE, - .output = { NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(0, 26), true }, - .peripheral = NRFX_PWM_INSTANCE(0) - }, - .max_duty_cycle_percent = 67, + .ctl = {NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(1, 8), true}, + .pwm = + {.state = &BACKLIGHT_PWM_STATE, + .output = {NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(0, 26), true}, + .peripheral = NRFX_PWM_INSTANCE(0)}, + .max_duty_cycle_percent = 67, }; static const BoardConfigSharpDisplay BOARD_CONFIG_DISPLAY = { - .spi = NRFX_SPIM_INSTANCE(3), - - .clk = { NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(0, 6), true }, - .mosi = { NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(0, 8), true }, - .cs = { NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(1, 3), true }, - - .on_ctrl = { NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(0, 4), true }, - - .extcomin = { - .rtc = NRF_RTC2, - .gpiote = NRF_GPIOTE, - .gpiote_ch = 6, - .psel = NRF_GPIO_PIN_MAP(1, 15), - // 120Hz/5% (feeds flip-flop, generating 60Hz/50% signal to EXTCOMIN) - .period_us = 1000000 / 120, - .pulse_us = (1000000 / 120) / 20, - }, + .spi = NRFX_SPIM_INSTANCE(3), + + .clk = {NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(0, 6), true}, + .mosi = {NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(0, 8), true}, + .cs = {NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(1, 3), true}, + + .on_ctrl = {NRF5_GPIO_RESOURCE_EXISTS, NRF_GPIO_PIN_MAP(0, 4), true}, + + .extcomin = { + .rtc = NRF_RTC2, + .gpiote = NRF_GPIOTE, + .gpiote_ch = 6, + .psel = NRF_GPIO_PIN_MAP(1, 15), + // 120Hz/5% (feeds flip-flop, generating 60Hz/50% signal to EXTCOMIN) + .period_us = 1000000 / 120, + .pulse_us = (1000000 / 120) / 20, + }, }; -extern QSPIPort * const QSPI; -extern QSPIFlash * const QSPI_FLASH; +extern QSPIPort *const QSPI; +extern QSPIFlash *const QSPI_FLASH; -extern MicDevice * const MIC; -extern AudioDevice * const AUDIO; +extern MicDevice *const MIC; +extern AudioDevice *const AUDIO; -extern I2CSlavePort * const I2C_NPM1300; -extern I2CSlavePort * const I2C_DRV2604; -extern I2CSlavePort * const I2C_OPT3001; -extern I2CSlavePort * const I2C_DA7212; -extern I2CSlavePort * const I2C_MMC5603NJ; -extern I2CSlavePort * const I2C_BMP390; +extern I2CSlavePort *const I2C_NPM1300; +extern I2CSlavePort *const I2C_DRV2604; +extern I2CSlavePort *const I2C_OPT3001; +extern I2CSlavePort *const I2C_DA7212; +extern I2CSlavePort *const I2C_MMC5603NJ; +extern I2CSlavePort *const I2C_BMP390; extern const LSM6DSOConfig *const LSM6DSO; extern const Npm1300Config NPM1300_CONFIG; diff --git a/src/fw/board/boards/board_getafix.c b/src/fw/board/boards/board_getafix.c index 7f9a22613d..5f7f6b8c16 100644 --- a/src/fw/board/boards/board_getafix.c +++ b/src/fw/board/boards/board_getafix.c @@ -7,38 +7,42 @@ #include "system/passert.h" static UARTDeviceState s_dbg_uart_state = { - .huart = { - .Instance = USART1, - .Init = { - .BaudRate = 1000000, - .WordLength = UART_WORDLENGTH_8B, - .StopBits = UART_STOPBITS_1, - .Parity = UART_PARITY_NONE, - .HwFlowCtl = UART_HWCONTROL_NONE, - .OverSampling = UART_OVERSAMPLING_16, - }, - }, - .hdma = { - .Instance = DMA1_Channel1, - .Init = { - .Request = DMA_REQUEST_5, - .IrqPrio = 5, + .huart = + { + .Instance = USART1, + .Init = + { + .BaudRate = 1000000, + .WordLength = UART_WORDLENGTH_8B, + .StopBits = UART_STOPBITS_1, + .Parity = UART_PARITY_NONE, + .HwFlowCtl = UART_HWCONTROL_NONE, + .OverSampling = UART_OVERSAMPLING_16, + }, + }, + .hdma = { + .Instance = DMA1_Channel1, + .Init = { + .Request = DMA_REQUEST_5, + .IrqPrio = 5, + }, }, - }, }; static UARTDevice DBG_UART_DEVICE = { .state = &s_dbg_uart_state, - .tx = { - .pad = PAD_PA19, - .func = USART1_TXD, - .flags = PIN_NOPULL, - }, - .rx = { - .pad = PAD_PA18, - .func = USART1_RXD, - .flags = PIN_PULLUP, - }, + .tx = + { + .pad = PAD_PA19, + .func = USART1_TXD, + .flags = PIN_NOPULL, + }, + .rx = + { + .pad = PAD_PA18, + .func = USART1_RXD, + .flags = PIN_PULLUP, + }, .irqn = USART1_IRQn, .irq_priority = 5, .dma_irqn = DMAC1_CH1_IRQn, @@ -52,16 +56,16 @@ IRQ_MAP(DMAC1_CH1, uart_dma_irq_handler, DBG_UART); #ifdef NIMBLE_HCI_SF32LB52_TRACE_BINARY static UARTDeviceState s_hci_trace_uart_state = { - .huart = { - .Instance = USART3, - .Init = { - .WordLength = UART_WORDLENGTH_8B, - .StopBits = UART_STOPBITS_1, - .Parity = UART_PARITY_NONE, - .HwFlowCtl = UART_HWCONTROL_NONE, - .OverSampling = UART_OVERSAMPLING_16, + .huart = { + .Instance = USART3, + .Init = { + .WordLength = UART_WORDLENGTH_8B, + .StopBits = UART_STOPBITS_1, + .Parity = UART_PARITY_NONE, + .HwFlowCtl = UART_HWCONTROL_NONE, + .OverSampling = UART_OVERSAMPLING_16, + }, }, - }, }; static UARTDevice HCI_TRACE_UART_DEVICE = { @@ -73,21 +77,23 @@ static UARTDevice HCI_TRACE_UART_DEVICE = { }, }; UARTDevice *const HCI_TRACE_UART = &HCI_TRACE_UART_DEVICE; -#endif // NIMBLE_HCI_SF32LB52_TRACE_BINARY +#endif // NIMBLE_HCI_SF32LB52_TRACE_BINARY static QSPIPortState s_qspi_port_state = { - .cfg = { - .Instance = FLASH2, - .line = HAL_FLASH_QMODE, - .base = FLASH2_BASE_ADDR, - .msize = 32, - .SpiMode = SPI_MODE_NOR, - }, - .dma = { - .Instance = DMA1_Channel2, - .dma_irq = DMAC1_CH2_IRQn, - .request = DMA_REQUEST_1, - }, + .cfg = + { + .Instance = FLASH2, + .line = HAL_FLASH_QMODE, + .base = FLASH2_BASE_ADDR, + .msize = 32, + .SpiMode = SPI_MODE_NOR, + }, + .dma = + { + .Instance = DMA1_Channel2, + .dma_irq = DMAC1_CH2_IRQn, + .request = DMA_REQUEST_1, + }, .t_enter_deep_us = 3, .t_exit_deep_us = 20, }; @@ -113,17 +119,17 @@ static DisplayJDIState s_display_state = { .color_mode = LCDC_PIXEL_FORMAT_RGB332, .freq = 746268, // HCK frequency .cfg = { - .jdi = { - .bank_col_head = 0, - .valid_columns = PBL_DISPLAY_WIDTH, - .bank_col_tail = 8, - .bank_row_head = 0, - .valid_rows = PBL_DISPLAY_HEIGHT, - .bank_row_tail = 4, - .enb_start_col = 6, - .enb_end_col = 128, + .jdi = { + .bank_col_head = 0, + .valid_columns = PBL_DISPLAY_WIDTH, + .bank_col_tail = 8, + .bank_row_head = 0, + .valid_rows = PBL_DISPLAY_HEIGHT, + .bank_row_tail = 4, + .enb_start_col = 6, + .enb_end_col = 128, + }, }, - }, }, }, }; @@ -132,82 +138,98 @@ static DisplayJDIDevice s_display = { .state = &s_display_state, .irqn = LCDC1_IRQn, .irq_priority = 5, - .vcom = { - .lptim = hwp_lptim2, - .freq_hz = 60U, - }, - .pinmux = { - .xrst = { - .pad = PAD_PA40, - .func = LCDC1_JDI_XRST, - .flags = PIN_NOPULL, - }, - .vst = { - .pad = PAD_PA08, - .func = LCDC1_JDI_VST, - .flags = PIN_NOPULL, - }, - .vck = { - .pad = PAD_PA39, - .func = LCDC1_JDI_VCK, - .flags = PIN_NOPULL, - }, - .enb = { - .pad = PAD_PA07, - .func = LCDC1_JDI_ENB, - .flags = PIN_NOPULL, - }, - .hst = { - .pad = PAD_PA06, - .func = LCDC1_JDI_HST, - .flags = PIN_NOPULL, - }, - .hck = { - .pad = PAD_PA41, - .func = LCDC1_JDI_HCK, - .flags = PIN_NOPULL, - }, - .r1 = { - .pad = PAD_PA05, - .func = LCDC1_JDI_R1, - .flags = PIN_NOPULL, - }, - .r2 = { - .pad = PAD_PA42, - .func = LCDC1_JDI_R2, - .flags = PIN_NOPULL, - }, - .g1 = { - .pad = PAD_PA04, - .func = LCDC1_JDI_G1, - .flags = PIN_NOPULL, - }, - .g2 = { - .pad = PAD_PA43, - .func = LCDC1_JDI_G2, - .flags = PIN_NOPULL, - }, - .b1 = { - .pad = PAD_PA03, - .func = LCDC1_JDI_B1, - .flags = PIN_NOPULL, - }, - .b2 = { - .pad = PAD_PA02, - .func = LCDC1_JDI_B2, - .flags = PIN_NOPULL, - }, - .vcom_frp = { - .pad = PAD_PA24, - .func = PBR_LPTIM2_OUT, - .flags = PIN_NOPULL, + .vcom = + { + .lptim = hwp_lptim2, + .freq_hz = 60U, }, - .xfrp = { - .pad = PAD_PA25, - .func = PBR_LPTIM2_INV_OUT, - .flags = PIN_NOPULL, + .pinmux = + { + .xrst = + { + .pad = PAD_PA40, + .func = LCDC1_JDI_XRST, + .flags = PIN_NOPULL, + }, + .vst = + { + .pad = PAD_PA08, + .func = LCDC1_JDI_VST, + .flags = PIN_NOPULL, + }, + .vck = + { + .pad = PAD_PA39, + .func = LCDC1_JDI_VCK, + .flags = PIN_NOPULL, + }, + .enb = + { + .pad = PAD_PA07, + .func = LCDC1_JDI_ENB, + .flags = PIN_NOPULL, + }, + .hst = + { + .pad = PAD_PA06, + .func = LCDC1_JDI_HST, + .flags = PIN_NOPULL, + }, + .hck = + { + .pad = PAD_PA41, + .func = LCDC1_JDI_HCK, + .flags = PIN_NOPULL, + }, + .r1 = + { + .pad = PAD_PA05, + .func = LCDC1_JDI_R1, + .flags = PIN_NOPULL, + }, + .r2 = + { + .pad = PAD_PA42, + .func = LCDC1_JDI_R2, + .flags = PIN_NOPULL, + }, + .g1 = + { + .pad = PAD_PA04, + .func = LCDC1_JDI_G1, + .flags = PIN_NOPULL, + }, + .g2 = + { + .pad = PAD_PA43, + .func = LCDC1_JDI_G2, + .flags = PIN_NOPULL, + }, + .b1 = + { + .pad = PAD_PA03, + .func = LCDC1_JDI_B1, + .flags = PIN_NOPULL, + }, + .b2 = + { + .pad = PAD_PA02, + .func = LCDC1_JDI_B2, + .flags = PIN_NOPULL, + }, + .vcom_frp = + { + .pad = PAD_PA24, + .func = PBR_LPTIM2_OUT, + .flags = PIN_NOPULL, + }, + .xfrp = + { + .pad = PAD_PA25, + .func = PBR_LPTIM2_INV_OUT, + .flags = PIN_NOPULL, + }, }, - }, .vddp = {hwp_gpio1, 0, true}, .vlcd = {hwp_gpio1, 9, true}, .splash = { @@ -231,11 +253,12 @@ const LedControllerAW9364E AW9364E = { static I2CBusHalState s_i2c_bus_hal_state_1 = { .hdl = { .Instance = I2C1, - .Init = { - .AddressingMode = I2C_ADDRESSINGMODE_7BIT, - .ClockSpeed = 400000, - .GeneralCallMode = I2C_GENERALCALL_DISABLE, - }, + .Init = + { + .AddressingMode = I2C_ADDRESSINGMODE_7BIT, + .ClockSpeed = 400000, + .GeneralCallMode = I2C_GENERALCALL_DISABLE, + }, .Mode = HAL_I2C_MODE_MASTER, .core = CORE_ID_HCPU, }, @@ -276,23 +299,27 @@ static LIS2DW12State s_lis2dw12_state; static const LIS2DW12Config s_lis2dw12_config = { .state = &s_lis2dw12_state, - .i2c = { - .bus = &s_i2c_bus_1, - .address = 0x19, - }, - .int1 = { - .peripheral = hwp_gpio1, - .gpio_pin = 26, - }, - .int1_in = { - .gpio = hwp_gpio1, - .gpio_pin = 26, - }, - .axis_map = { - [AXIS_X] = 0, - [AXIS_Y] = 1, - [AXIS_Z] = 2, - }, + .i2c = + { + .bus = &s_i2c_bus_1, + .address = 0x19, + }, + .int1 = + { + .peripheral = hwp_gpio1, + .gpio_pin = 26, + }, + .int1_in = + { + .gpio = hwp_gpio1, + .gpio_pin = 26, + }, + .axis_map = + { + [AXIS_X] = 0, + [AXIS_Y] = 1, + [AXIS_Z] = 2, + }, .axis_dir = { [AXIS_X] = -1, [AXIS_Y] = 1, @@ -312,11 +339,12 @@ I2CSlavePort *const I2C_MMC5603NJ = &s_i2c_mmc5603nj; static I2CBusHalState s_i2c_bus_hal_state_2 = { .hdl = { .Instance = I2C2, - .Init = { - .AddressingMode = I2C_ADDRESSINGMODE_7BIT, - .ClockSpeed = 400000, - .GeneralCallMode = I2C_GENERALCALL_DISABLE, - }, + .Init = + { + .AddressingMode = I2C_ADDRESSINGMODE_7BIT, + .ClockSpeed = 400000, + .GeneralCallMode = I2C_GENERALCALL_DISABLE, + }, .Mode = HAL_I2C_MODE_MASTER, .core = CORE_ID_HCPU, }, @@ -365,11 +393,12 @@ static const I2CSlavePort s_i2c_cst816_boot = { static const TouchSensor s_touch_cst816 = { .i2c = &s_i2c_cst816, .i2c_boot = &s_i2c_cst816_boot, - .int_exti = { - .peripheral = hwp_gpio1, - .gpio_pin = 38, - .pull = GPIO_PuPd_UP, - }, + .int_exti = + { + .peripheral = hwp_gpio1, + .gpio_pin = 38, + .pull = GPIO_PuPd_UP, + }, .reset = { .gpio = hwp_gpio1, .gpio_pin = 28, @@ -382,11 +411,12 @@ const TouchSensor *CST816 = &s_touch_cst816; static I2CBusHalState s_i2c_bus_hal_state_3 = { .hdl = { .Instance = I2C3, - .Init = { - .AddressingMode = I2C_ADDRESSINGMODE_7BIT, - .ClockSpeed = 400000, - .GeneralCallMode = I2C_GENERALCALL_DISABLE, - }, + .Init = + { + .AddressingMode = I2C_ADDRESSINGMODE_7BIT, + .ClockSpeed = 400000, + .GeneralCallMode = I2C_GENERALCALL_DISABLE, + }, .Mode = HAL_I2C_MODE_MASTER, .core = CORE_ID_HCPU, }, @@ -441,7 +471,7 @@ static const I2CSlavePort s_i2c_aw86225 = { .bus = &s_i2c_bus_3, .address = 0x58, }; - + I2CSlavePort *const I2C_AW86225 = &s_i2c_aw86225; #else static const I2CSlavePort s_i2c_aw8623x = { @@ -457,70 +487,70 @@ const BoardConfigActuator BOARD_CONFIG_VIBE = { }; const Npm1300Config NPM1300_CONFIG = { - // 70mA = 1C (max limit from datasheet) - .chg_current_ma = 70, - .dischg_limit_ma = 200, - .term_current_pct = 10, - .thermistor_beta = 3380, - .ntc_hot_celsius = 45, - .vbus_current_lim0 = 500, - .vbus_current_startup = 500, + // 70mA = 1C (max limit from datasheet) + .chg_current_ma = 70, .dischg_limit_ma = 200, .term_current_pct = 10, + .thermistor_beta = 3380, .ntc_hot_celsius = 45, .vbus_current_lim0 = 500, + .vbus_current_startup = 500, }; const BoardConfigPower BOARD_CONFIG_POWER = { - .pmic_int = { - .peripheral = hwp_gpio1, - .gpio_pin = 44, - }, - .low_power_threshold = 5U, - .battery_capacity_hours = 150U, + .pmic_int = + { + .peripheral = hwp_gpio1, + .gpio_pin = 44, + }, + .low_power_threshold = 5U, + .battery_capacity_hours = 150U, }; const BoardConfig BOARD_CONFIG = { - .backlight_on_percent = 25, - .ambient_light_dark_threshold = 800, - .ambient_k_delta_threshold = 100, - // Bench-calibrated on 1 DVT2 unit, fit above 4500 lux; readings below - // ~4000 lux deviated from the fit on that unit and need a re-measure. - .ambient_light_lux_dark_offset = 0, - .ambient_light_lux_num = 50, - .ambient_light_lux_den = 517, + .backlight_on_percent = 25, + .ambient_light_dark_threshold = 800, + .ambient_k_delta_threshold = 100, + // Bench-calibrated on 1 DVT2 unit, fit above 4500 lux; readings below + // ~4000 lux deviated from the fit on that unit and need a re-measure. + .ambient_light_lux_dark_offset = 0, + .ambient_light_lux_num = 50, + .ambient_light_lux_den = 517, }; const BoardConfigButton BOARD_CONFIG_BUTTON = { - .buttons = { - [BUTTON_ID_BACK] = { "Back", hwp_gpio1, 34, GPIO_PuPd_NOPULL, true }, - [BUTTON_ID_UP] = { "Up", hwp_gpio1, 35, GPIO_PuPd_UP, false}, - [BUTTON_ID_SELECT] = { "Select", hwp_gpio1, 36, GPIO_PuPd_UP, false}, - [BUTTON_ID_DOWN] = { "Down", hwp_gpio1, 37, GPIO_PuPd_UP, false}, - }, - .timer = GPTIM2, - .timer_irqn = GPTIM2_IRQn, + .buttons = + { + [BUTTON_ID_BACK] = {"Back", hwp_gpio1, 34, GPIO_PuPd_NOPULL, true}, + [BUTTON_ID_UP] = {"Up", hwp_gpio1, 35, GPIO_PuPd_UP, false}, + [BUTTON_ID_SELECT] = {"Select", hwp_gpio1, 36, GPIO_PuPd_UP, false}, + [BUTTON_ID_DOWN] = {"Down", hwp_gpio1, 37, GPIO_PuPd_UP, false}, + }, + .timer = GPTIM2, + .timer_irqn = GPTIM2_IRQn, }; IRQ_MAP(GPTIM2, debounced_button_irq_handler, GPTIM2); static MicDeviceState mic_state = { - .hdma = { - .Instance = DMA1_Channel5, - .Init = { - .Request = DMA_REQUEST_36, - .IrqPrio = 5, + .hdma = { + .Instance = DMA1_Channel5, + .Init = { + .Request = DMA_REQUEST_36, + .IrqPrio = 5, + }, }, - }, }; static const MicDevice mic_device = { .state = &mic_state, .pdm_instance = hwp_pdm1, - .clk_gpio = { - .pad = PAD_PA22, - .func = PDM1_CLK, - .flags = PIN_NOPULL, - }, - .data_gpio = { - .pad = PAD_PA23, - .func = PDM1_DATA, - .flags = PIN_PULLDOWN, - }, + .clk_gpio = + { + .pad = PAD_PA22, + .func = PDM1_CLK, + .flags = PIN_NOPULL, + }, + .data_gpio = + { + .pad = PAD_PA23, + .func = PDM1_DATA, + .flags = PIN_PULLDOWN, + }, .pdm_dma_irq = DMAC1_CH5_IRQn, .pdm_irq = PDM1_IRQn, .pdm_irq_priority = 5, @@ -533,7 +563,7 @@ static const MicDevice mic_device = { .sample_rate = 16000, .channel_depth = 16, }; -const MicDevice* MIC = &mic_device; +const MicDevice *MIC = &mic_device; IRQ_MAP(PDM1, pdm1_data_handler, MIC); IRQ_MAP(DMAC1_CH5, pdm1_l_dma_handler, MIC); @@ -542,7 +572,6 @@ uint32_t BSP_GetOtpBase(void) { } void board_early_init(void) { - } void board_init(void) { diff --git a/src/fw/board/boards/board_getafix.h b/src/fw/board/boards/board_getafix.h index 17fa54f96b..da15e374f4 100644 --- a/src/fw/board/boards/board_getafix.h +++ b/src/fw/board/boards/board_getafix.h @@ -12,18 +12,18 @@ #define BT_VENDOR_ID 0x0EEA #define BT_VENDOR_NAME "Core Devices LLC" -extern UARTDevice * const DBG_UART; +extern UARTDevice *const DBG_UART; #ifdef NIMBLE_HCI_SF32LB52_TRACE_BINARY -extern UARTDevice * const HCI_TRACE_UART; -#endif // NIMBLE_HCI_SF32LB52_TRACE_BINARY -extern QSPIPort * const QSPI; -extern QSPIFlash * const QSPI_FLASH; +extern UARTDevice *const HCI_TRACE_UART; +#endif // NIMBLE_HCI_SF32LB52_TRACE_BINARY +extern QSPIPort *const QSPI; +extern QSPIFlash *const QSPI_FLASH; extern I2CBus *const I2C1_BUS; extern I2CBus *const I2C2_BUS; extern I2CBus *const I2C3_BUS; extern const LIS2DW12Config *const LIS2DW12; -extern I2CSlavePort * const I2C_MMC5603NJ; -extern I2CSlavePort * const I2C_NPM1300; +extern I2CSlavePort *const I2C_MMC5603NJ; +extern I2CSlavePort *const I2C_NPM1300; extern I2CSlavePort *const I2C_W1160; #ifdef CONFIG_BOARD_GETAFIX_DVT2 extern I2CSlavePort *const I2C_AW86225; @@ -35,24 +35,24 @@ extern DisplayJDIDevice *const DISPLAY; extern const BoardConfigPower BOARD_CONFIG_POWER; extern const BoardConfig BOARD_CONFIG; extern const BoardConfigButton BOARD_CONFIG_BUTTON; -extern const MicDevice* MIC; +extern const MicDevice *MIC; extern const TouchSensor *CST816; extern const LedControllerAW9364E AW9364E; extern const BoardConfigActuator BOARD_CONFIG_VIBE; static const BoardConfigAccel BOARD_CONFIG_ACCEL = { - .default_motion_sensitivity = 55U, // Medium + .default_motion_sensitivity = 55U, // Medium }; static const BoardConfigMag BOARD_CONFIG_MAG = { - // TODO(GETAFIX): Review if correct - .mag_config = { - .axes_offsets[AXIS_X] = 1, - .axes_offsets[AXIS_Y] = 0, - .axes_offsets[AXIS_Z] = 2, - .axes_inverts[AXIS_X] = false, - .axes_inverts[AXIS_Y] = true, - .axes_inverts[AXIS_Z] = false, - }, + // TODO(GETAFIX): Review if correct + .mag_config = { + .axes_offsets[AXIS_X] = 1, + .axes_offsets[AXIS_Y] = 0, + .axes_offsets[AXIS_Z] = 2, + .axes_inverts[AXIS_X] = false, + .axes_inverts[AXIS_Y] = true, + .axes_inverts[AXIS_Z] = false, + }, }; diff --git a/src/fw/board/boards/board_obelix.c b/src/fw/board/boards/board_obelix.c index c1a8e1175e..c10ed62ce7 100644 --- a/src/fw/board/boards/board_obelix.c +++ b/src/fw/board/boards/board_obelix.c @@ -11,38 +11,42 @@ #include "kernel/util/delay.h" static UARTDeviceState s_dbg_uart_state = { - .huart = { - .Instance = USART1, - .Init = { - .BaudRate = 1000000, - .WordLength = UART_WORDLENGTH_8B, - .StopBits = UART_STOPBITS_1, - .Parity = UART_PARITY_NONE, - .HwFlowCtl = UART_HWCONTROL_NONE, - .OverSampling = UART_OVERSAMPLING_16, - }, - }, - .hdma = { - .Instance = DMA1_Channel1, - .Init = { - .Request = DMA_REQUEST_5, - .IrqPrio = 5, + .huart = + { + .Instance = USART1, + .Init = + { + .BaudRate = 1000000, + .WordLength = UART_WORDLENGTH_8B, + .StopBits = UART_STOPBITS_1, + .Parity = UART_PARITY_NONE, + .HwFlowCtl = UART_HWCONTROL_NONE, + .OverSampling = UART_OVERSAMPLING_16, + }, + }, + .hdma = { + .Instance = DMA1_Channel1, + .Init = { + .Request = DMA_REQUEST_5, + .IrqPrio = 5, + }, }, - }, }; static UARTDevice DBG_UART_DEVICE = { .state = &s_dbg_uart_state, - .tx = { - .pad = PAD_PA19, - .func = USART1_TXD, - .flags = PIN_NOPULL, - }, - .rx = { - .pad = PAD_PA18, - .func = USART1_RXD, - .flags = PIN_PULLUP, - }, + .tx = + { + .pad = PAD_PA19, + .func = USART1_TXD, + .flags = PIN_NOPULL, + }, + .rx = + { + .pad = PAD_PA18, + .func = USART1_RXD, + .flags = PIN_PULLUP, + }, .irqn = USART1_IRQn, .irq_priority = 5, .dma_irqn = DMAC1_CH1_IRQn, @@ -62,17 +66,17 @@ static DisplayJDIState s_display_state = { .color_mode = LCDC_PIXEL_FORMAT_RGB332, .freq = 746268, // HCK frequency .cfg = { - .jdi = { - .bank_col_head = 2, - .valid_columns = PBL_DISPLAY_WIDTH, - .bank_col_tail = 6, - .bank_row_head = 0, - .valid_rows = PBL_DISPLAY_HEIGHT, - .bank_row_tail = 6, - .enb_start_col = 3, - .enb_end_col = 99, + .jdi = { + .bank_col_head = 2, + .valid_columns = PBL_DISPLAY_WIDTH, + .bank_col_tail = 6, + .bank_row_head = 0, + .valid_rows = PBL_DISPLAY_HEIGHT, + .bank_row_tail = 6, + .enb_start_col = 3, + .enb_end_col = 99, + }, }, - }, }, }, }; @@ -81,82 +85,98 @@ static DisplayJDIDevice s_display = { .state = &s_display_state, .irqn = LCDC1_IRQn, .irq_priority = 5, - .vcom = { - .lptim = hwp_lptim2, - .freq_hz = 60U, - }, - .pinmux = { - .xrst = { - .pad = PAD_PA40, - .func = LCDC1_JDI_XRST, - .flags = PIN_NOPULL, - }, - .vst = { - .pad = PAD_PA08, - .func = LCDC1_JDI_VST, - .flags = PIN_NOPULL, - }, - .vck = { - .pad = PAD_PA39, - .func = LCDC1_JDI_VCK, - .flags = PIN_NOPULL, - }, - .enb = { - .pad = PAD_PA07, - .func = LCDC1_JDI_ENB, - .flags = PIN_NOPULL, - }, - .hst = { - .pad = PAD_PA06, - .func = LCDC1_JDI_HST, - .flags = PIN_NOPULL, - }, - .hck = { - .pad = PAD_PA41, - .func = LCDC1_JDI_HCK, - .flags = PIN_NOPULL, - }, - .r1 = { - .pad = PAD_PA05, - .func = LCDC1_JDI_R1, - .flags = PIN_NOPULL, - }, - .r2 = { - .pad = PAD_PA42, - .func = LCDC1_JDI_R2, - .flags = PIN_NOPULL, - }, - .g1 = { - .pad = PAD_PA04, - .func = LCDC1_JDI_G1, - .flags = PIN_NOPULL, - }, - .g2 = { - .pad = PAD_PA43, - .func = LCDC1_JDI_G2, - .flags = PIN_NOPULL, - }, - .b1 = { - .pad = PAD_PA03, - .func = LCDC1_JDI_B1, - .flags = PIN_NOPULL, - }, - .b2 = { - .pad = PAD_PA02, - .func = LCDC1_JDI_B2, - .flags = PIN_NOPULL, - }, - .vcom_frp = { - .pad = PAD_PA24, - .func = PBR_LPTIM2_OUT, - .flags = PIN_NOPULL, + .vcom = + { + .lptim = hwp_lptim2, + .freq_hz = 60U, }, - .xfrp = { - .pad = PAD_PA25, - .func = PBR_LPTIM2_INV_OUT, - .flags = PIN_NOPULL, + .pinmux = + { + .xrst = + { + .pad = PAD_PA40, + .func = LCDC1_JDI_XRST, + .flags = PIN_NOPULL, + }, + .vst = + { + .pad = PAD_PA08, + .func = LCDC1_JDI_VST, + .flags = PIN_NOPULL, + }, + .vck = + { + .pad = PAD_PA39, + .func = LCDC1_JDI_VCK, + .flags = PIN_NOPULL, + }, + .enb = + { + .pad = PAD_PA07, + .func = LCDC1_JDI_ENB, + .flags = PIN_NOPULL, + }, + .hst = + { + .pad = PAD_PA06, + .func = LCDC1_JDI_HST, + .flags = PIN_NOPULL, + }, + .hck = + { + .pad = PAD_PA41, + .func = LCDC1_JDI_HCK, + .flags = PIN_NOPULL, + }, + .r1 = + { + .pad = PAD_PA05, + .func = LCDC1_JDI_R1, + .flags = PIN_NOPULL, + }, + .r2 = + { + .pad = PAD_PA42, + .func = LCDC1_JDI_R2, + .flags = PIN_NOPULL, + }, + .g1 = + { + .pad = PAD_PA04, + .func = LCDC1_JDI_G1, + .flags = PIN_NOPULL, + }, + .g2 = + { + .pad = PAD_PA43, + .func = LCDC1_JDI_G2, + .flags = PIN_NOPULL, + }, + .b1 = + { + .pad = PAD_PA03, + .func = LCDC1_JDI_B1, + .flags = PIN_NOPULL, + }, + .b2 = + { + .pad = PAD_PA02, + .func = LCDC1_JDI_B2, + .flags = PIN_NOPULL, + }, + .vcom_frp = + { + .pad = PAD_PA24, + .func = PBR_LPTIM2_OUT, + .flags = PIN_NOPULL, + }, + .xfrp = + { + .pad = PAD_PA25, + .func = PBR_LPTIM2_INV_OUT, + .flags = PIN_NOPULL, + }, }, - }, .vddp = {hwp_gpio1, 28, true}, .vlcd = {hwp_gpio1, 29, false}, .splash = { @@ -171,16 +191,16 @@ IRQ_MAP(LCDC1, display_jdi_irq_handler, DISPLAY); #ifdef NIMBLE_HCI_SF32LB52_TRACE_BINARY static UARTDeviceState s_hci_trace_uart_state = { - .huart = { - .Instance = USART3, - .Init = { - .WordLength = UART_WORDLENGTH_8B, - .StopBits = UART_STOPBITS_1, - .Parity = UART_PARITY_NONE, - .HwFlowCtl = UART_HWCONTROL_NONE, - .OverSampling = UART_OVERSAMPLING_16, + .huart = { + .Instance = USART3, + .Init = { + .WordLength = UART_WORDLENGTH_8B, + .StopBits = UART_STOPBITS_1, + .Parity = UART_PARITY_NONE, + .HwFlowCtl = UART_HWCONTROL_NONE, + .OverSampling = UART_OVERSAMPLING_16, + }, }, - }, }; static UARTDevice HCI_TRACE_UART_DEVICE = { @@ -192,21 +212,23 @@ static UARTDevice HCI_TRACE_UART_DEVICE = { }, }; UARTDevice *const HCI_TRACE_UART = &HCI_TRACE_UART_DEVICE; -#endif // NIMBLE_HCI_SF32LB52_TRACE_BINARY +#endif // NIMBLE_HCI_SF32LB52_TRACE_BINARY static QSPIPortState s_qspi_port_state = { - .cfg = { - .Instance = FLASH2, - .line = HAL_FLASH_QMODE, - .base = FLASH2_BASE_ADDR, - .msize = 16, - .SpiMode = SPI_MODE_NOR, - }, - .dma = { - .Instance = DMA1_Channel2, - .dma_irq = DMAC1_CH2_IRQn, - .request = DMA_REQUEST_1, - }, + .cfg = + { + .Instance = FLASH2, + .line = HAL_FLASH_QMODE, + .base = FLASH2_BASE_ADDR, + .msize = 16, + .SpiMode = SPI_MODE_NOR, + }, + .dma = + { + .Instance = DMA1_Channel2, + .dma_irq = DMAC1_CH2_IRQn, + .request = DMA_REQUEST_1, + }, .t_enter_deep_us = 3, .t_exit_deep_us = 20, }; @@ -227,11 +249,12 @@ QSPIFlash *const QSPI_FLASH = &QSPI_FLASH_DEVICE; static I2CBusHalState s_i2c_bus_hal_state_1 = { .hdl = { .Instance = I2C1, - .Init = { - .AddressingMode = I2C_ADDRESSINGMODE_7BIT, - .ClockSpeed = 400000, - .GeneralCallMode = I2C_GENERALCALL_DISABLE, - }, + .Init = + { + .AddressingMode = I2C_ADDRESSINGMODE_7BIT, + .ClockSpeed = 400000, + .GeneralCallMode = I2C_GENERALCALL_DISABLE, + }, .Mode = HAL_I2C_MODE_MASTER, .core = CORE_ID_HCPU, }, @@ -279,7 +302,7 @@ static const I2CSlavePort s_i2c_aw86225 = { .bus = &s_i2c_bus_1, .address = 0x58, }; - + I2CSlavePort *const I2C_AW86225 = &s_i2c_aw86225; static const I2CSlavePort s_i2c_aw2016 = { @@ -292,11 +315,12 @@ I2CSlavePort *const I2C_AW2016 = &s_i2c_aw2016; static I2CBusHalState s_i2c_bus_hal_state_2 = { .hdl = { .Instance = I2C2, - .Init = { - .AddressingMode = I2C_ADDRESSINGMODE_7BIT, - .ClockSpeed = 400000, - .GeneralCallMode = I2C_GENERALCALL_DISABLE, - }, + .Init = + { + .AddressingMode = I2C_ADDRESSINGMODE_7BIT, + .ClockSpeed = 400000, + .GeneralCallMode = I2C_GENERALCALL_DISABLE, + }, .Mode = HAL_I2C_MODE_MASTER, .core = CORE_ID_HCPU, }, @@ -337,35 +361,40 @@ static LSM6DSOState s_lsm6dso_state; static const LSM6DSOConfig s_lsm6dso_config = { .state = &s_lsm6dso_state, - .i2c = { - .bus = &s_i2c_bus_2, - .address = 0x6a, - }, - .int1 = { - .peripheral = hwp_gpio1, - .gpio_pin = 38, - }, - .int1_in = { - .gpio = hwp_gpio1, - .gpio_pin = 38, - }, + .i2c = + { + .bus = &s_i2c_bus_2, + .address = 0x6a, + }, + .int1 = + { + .peripheral = hwp_gpio1, + .gpio_pin = 38, + }, + .int1_in = + { + .gpio = hwp_gpio1, + .gpio_pin = 38, + }, #ifdef CONFIG_IS_BIGBOARD - .axis_map = { - [AXIS_X] = 0, - [AXIS_Y] = 1, - [AXIS_Z] = 2, - }, + .axis_map = + { + [AXIS_X] = 0, + [AXIS_Y] = 1, + [AXIS_Z] = 2, + }, .axis_dir = { [AXIS_X] = -1, [AXIS_Y] = -1, [AXIS_Z] = 1, }, #else - .axis_map = { - [AXIS_X] = 0, - [AXIS_Y] = 1, - [AXIS_Z] = 2, - }, + .axis_map = + { + [AXIS_X] = 0, + [AXIS_Y] = 1, + [AXIS_Z] = 2, + }, .axis_dir = { [AXIS_X] = -1, [AXIS_Y] = 1, @@ -397,11 +426,12 @@ I2CSlavePort *const I2C_MMC5603NJ = &s_i2c_mmc5603nj; static I2CBusHalState s_i2c_bus_hal_state_3 = { .hdl = { .Instance = I2C3, - .Init = { - .AddressingMode = I2C_ADDRESSINGMODE_7BIT, - .ClockSpeed = 400000, - .GeneralCallMode = I2C_GENERALCALL_DISABLE, - }, + .Init = + { + .AddressingMode = I2C_ADDRESSINGMODE_7BIT, + .ClockSpeed = 400000, + .GeneralCallMode = I2C_GENERALCALL_DISABLE, + }, .Mode = HAL_I2C_MODE_MASTER, .core = CORE_ID_HCPU, }, @@ -463,11 +493,12 @@ const TouchSensor *CST816 = &touch_cst816; static I2CBusHalState s_i2c_bus_hal_state_4 = { .hdl = { .Instance = I2C4, - .Init = { - .AddressingMode = I2C_ADDRESSINGMODE_7BIT, - .ClockSpeed = 400000, - .GeneralCallMode = I2C_GENERALCALL_DISABLE, - }, + .Init = + { + .AddressingMode = I2C_ADDRESSINGMODE_7BIT, + .ClockSpeed = 400000, + .GeneralCallMode = I2C_GENERALCALL_DISABLE, + }, .Mode = HAL_I2C_MODE_MASTER, .core = CORE_ID_HCPU, }, @@ -513,17 +544,18 @@ static HRMDeviceState s_hrm_state; static HRMDevice s_hrm = { .state = &s_hrm_state, .i2c = &s_i2c_gh3x2x, - .int_exti = { - .peripheral = hwp_gpio1, - .gpio_pin = 44, - }, + .int_exti = + { + .peripheral = hwp_gpio1, + .gpio_pin = 44, + }, .int_input = { .gpio = hwp_gpio1, .gpio_pin = 44, }, }; -HRMDevice * const HRM = &s_hrm; +HRMDevice *const HRM = &s_hrm; const BoardConfigActuator BOARD_CONFIG_VIBE = { .ctl = {hwp_gpio1, 1, false}, @@ -531,78 +563,78 @@ const BoardConfigActuator BOARD_CONFIG_VIBE = { // TODO(OBELIX): Adjust to final battery parameters const Npm1300Config NPM1300_CONFIG = { - // 190mA = 1C (rapid charge, max limit from datasheet) - .chg_current_ma = 190, - .dischg_limit_ma = 200, - .term_current_pct = 10, - .thermistor_beta = 3380, - .ntc_hot_celsius = 45, - .vbus_current_lim0 = 500, - .vbus_current_startup = 500, + // 190mA = 1C (rapid charge, max limit from datasheet) + .chg_current_ma = 190, .dischg_limit_ma = 200, .term_current_pct = 10, + .thermistor_beta = 3380, .ntc_hot_celsius = 45, .vbus_current_lim0 = 500, + .vbus_current_startup = 500, }; static const I2CSlavePort s_i2c_w1160 = { .bus = &s_i2c_bus_1, .address = 0x48, - }; - +}; + I2CSlavePort *const I2C_W1160 = &s_i2c_w1160; const BoardConfigPower BOARD_CONFIG_POWER = { - .pmic_int = { - .peripheral = hwp_gpio1, - .gpio_pin = 26, - }, - .low_power_threshold = 4U, - .battery_capacity_hours = 400U, + .pmic_int = + { + .peripheral = hwp_gpio1, + .gpio_pin = 26, + }, + .low_power_threshold = 4U, + .battery_capacity_hours = 400U, }; const BoardConfig BOARD_CONFIG = { - .backlight_on_percent = 45, - .ambient_light_dark_threshold = 800, - .ambient_k_delta_threshold = 100, - // Bench-calibrated on 3 production units (unit spread 1.3%); dark floor - // is <20 counts so no offset is needed. - .ambient_light_lux_dark_offset = 0, - .ambient_light_lux_num = 100, - .ambient_light_lux_den = 483, - .backlight_default_color = BACKLIGHT_COLOR_WARM_WHITE, + .backlight_on_percent = 45, + .ambient_light_dark_threshold = 800, + .ambient_k_delta_threshold = 100, + // Bench-calibrated on 3 production units (unit spread 1.3%); dark floor + // is <20 counts so no offset is needed. + .ambient_light_lux_dark_offset = 0, + .ambient_light_lux_num = 100, + .ambient_light_lux_den = 483, + .backlight_default_color = BACKLIGHT_COLOR_WARM_WHITE, }; const BoardConfigButton BOARD_CONFIG_BUTTON = { - .buttons = { - [BUTTON_ID_BACK] = { "Back", hwp_gpio1, 34, GPIO_PuPd_NOPULL, true }, - [BUTTON_ID_UP] = { "Up", hwp_gpio1, 35, GPIO_PuPd_UP, false}, - [BUTTON_ID_SELECT] = { "Select", hwp_gpio1, 36, GPIO_PuPd_UP, false}, - [BUTTON_ID_DOWN] = { "Down", hwp_gpio1, 37, GPIO_PuPd_UP, false}, - }, - .timer = GPTIM2, - .timer_irqn = GPTIM2_IRQn, + .buttons = + { + [BUTTON_ID_BACK] = {"Back", hwp_gpio1, 34, GPIO_PuPd_NOPULL, true}, + [BUTTON_ID_UP] = {"Up", hwp_gpio1, 35, GPIO_PuPd_UP, false}, + [BUTTON_ID_SELECT] = {"Select", hwp_gpio1, 36, GPIO_PuPd_UP, false}, + [BUTTON_ID_DOWN] = {"Down", hwp_gpio1, 37, GPIO_PuPd_UP, false}, + }, + .timer = GPTIM2, + .timer_irqn = GPTIM2_IRQn, }; IRQ_MAP(GPTIM2, debounced_button_irq_handler, GPTIM2); static MicDeviceState mic_state = { - .hdma = { - .Instance = DMA1_Channel5, - .Init = { - .Request = DMA_REQUEST_36, - .IrqPrio = 5, + .hdma = { + .Instance = DMA1_Channel5, + .Init = { + .Request = DMA_REQUEST_36, + .IrqPrio = 5, + }, }, - }, }; static const MicDevice mic_device = { .state = &mic_state, .pdm_instance = hwp_pdm1, - .clk_gpio = { - .pad = PAD_PA22, - .func = PDM1_CLK, - .flags = PIN_NOPULL, - }, - .data_gpio = { - .pad = PAD_PA23, - .func = PDM1_DATA, - .flags = PIN_PULLDOWN, - }, + .clk_gpio = + { + .pad = PAD_PA22, + .func = PDM1_CLK, + .flags = PIN_NOPULL, + }, + .data_gpio = + { + .pad = PAD_PA23, + .func = PDM1_DATA, + .flags = PIN_PULLDOWN, + }, .pdm_dma_irq = DMAC1_CH5_IRQn, .pdm_irq = PDM1_IRQn, .pdm_irq_priority = 5, @@ -615,7 +647,7 @@ static const MicDevice mic_device = { .sample_rate = 16000, .channel_depth = 16, }; -const MicDevice* MIC = &mic_device; +const MicDevice *MIC = &mic_device; IRQ_MAP(PDM1, pdm1_data_handler, MIC); IRQ_MAP(DMAC1_CH5, pdm1_l_dma_handler, MIC); @@ -643,14 +675,15 @@ static const AudioDevice audio_device = { .audec_dma_channel = DMA1_Channel4, .audec_dma_request = DMA_REQUEST_41, - .pa_ctrl = { - .gpio = hwp_gpio1, - .gpio_pin = 0, - .active_high =true, - }, + .pa_ctrl = + { + .gpio = hwp_gpio1, + .gpio_pin = 0, + .active_high = true, + }, .power_ops = &prv_audio_power_ops, }; -const AudioDevice* AUDIO = &audio_device; +const AudioDevice *AUDIO = &audio_device; IRQ_MAP(DMAC1_CH4, audec_dac0_dma_irq_handler, AUDIO); uint32_t BSP_GetOtpBase(void) { @@ -658,7 +691,6 @@ uint32_t BSP_GetOtpBase(void) { } void board_early_init(void) { - } void board_init(void) { diff --git a/src/fw/board/boards/board_obelix.h b/src/fw/board/boards/board_obelix.h index 86b4e7a8c2..823fbf3b72 100644 --- a/src/fw/board/boards/board_obelix.h +++ b/src/fw/board/boards/board_obelix.h @@ -11,17 +11,17 @@ #define BT_VENDOR_ID 0x0EEA #define BT_VENDOR_NAME "Core Devices LLC" -extern UARTDevice * const DBG_UART; +extern UARTDevice *const DBG_UART; #ifdef NIMBLE_HCI_SF32LB52_TRACE_BINARY -extern UARTDevice * const HCI_TRACE_UART; -#endif // NIMBLE_HCI_SF32LB52_TRACE_BINARY -extern QSPIPort * const QSPI; -extern QSPIFlash * const QSPI_FLASH; +extern UARTDevice *const HCI_TRACE_UART; +#endif // NIMBLE_HCI_SF32LB52_TRACE_BINARY +extern QSPIPort *const QSPI; +extern QSPIFlash *const QSPI_FLASH; extern I2CBus *const I2C1_BUS; extern I2CBus *const I2C2_BUS; extern const LSM6DSOConfig *const LSM6DSO; -extern I2CSlavePort * const I2C_MMC5603NJ; -extern I2CSlavePort * const I2C_NPM1300; +extern I2CSlavePort *const I2C_MMC5603NJ; +extern I2CSlavePort *const I2C_NPM1300; extern I2CSlavePort *const I2C_AW86225; extern I2CSlavePort *const I2C_W1160; extern I2CSlavePort *const I2C_AW2016; @@ -32,31 +32,31 @@ extern DisplayJDIDevice *const DISPLAY; extern const BoardConfigPower BOARD_CONFIG_POWER; extern const BoardConfig BOARD_CONFIG; extern const BoardConfigButton BOARD_CONFIG_BUTTON; -extern const MicDevice* MIC; -extern HRMDevice * const HRM; +extern const MicDevice *MIC; +extern HRMDevice *const HRM; extern const TouchSensor *CST816; -extern const AudioDevice* AUDIO; +extern const AudioDevice *AUDIO; static const BoardConfigAccel BOARD_CONFIG_ACCEL = { - .default_motion_sensitivity = 55U, // Medium + .default_motion_sensitivity = 55U, // Medium }; static const BoardConfigMag BOARD_CONFIG_MAG = { - .mag_config = { + .mag_config = { #ifdef CONFIG_IS_BIGBOARD - .axes_offsets[AXIS_X] = 1, - .axes_offsets[AXIS_Y] = 0, - .axes_offsets[AXIS_Z] = 2, - .axes_inverts[AXIS_X] = true, - .axes_inverts[AXIS_Y] = false, - .axes_inverts[AXIS_Z] = false, + .axes_offsets[AXIS_X] = 1, + .axes_offsets[AXIS_Y] = 0, + .axes_offsets[AXIS_Z] = 2, + .axes_inverts[AXIS_X] = true, + .axes_inverts[AXIS_Y] = false, + .axes_inverts[AXIS_Z] = false, #else - .axes_offsets[AXIS_X] = 1, - .axes_offsets[AXIS_Y] = 0, - .axes_offsets[AXIS_Z] = 2, - .axes_inverts[AXIS_X] = false, - .axes_inverts[AXIS_Y] = true, - .axes_inverts[AXIS_Z] = false, + .axes_offsets[AXIS_X] = 1, + .axes_offsets[AXIS_Y] = 0, + .axes_offsets[AXIS_Z] = 2, + .axes_inverts[AXIS_X] = false, + .axes_inverts[AXIS_Y] = true, + .axes_inverts[AXIS_Z] = false, #endif - }, + }, }; diff --git a/src/fw/board/boards/board_qemu_emery.c b/src/fw/board/boards/board_qemu_emery.c index 28b91a4cb7..030ff0f7c6 100644 --- a/src/fw/board/boards/board_qemu_emery.c +++ b/src/fw/board/boards/board_qemu_emery.c @@ -13,10 +13,10 @@ static UARTDeviceState s_dbg_uart_state = {}; static struct UARTDevice DBG_UART_DEVICE = { - .state = &s_dbg_uart_state, - .base_addr = QEMU_UART2_BASE, - .irqn = UART2_IRQn, - .irq_priority = 5, + .state = &s_dbg_uart_state, + .base_addr = QEMU_UART2_BASE, + .irqn = UART2_IRQn, + .irq_priority = 5, }; UARTDevice *const DBG_UART = (UARTDevice *)&DBG_UART_DEVICE; @@ -25,72 +25,73 @@ UARTDevice *const DBG_UART = (UARTDevice *)&DBG_UART_DEVICE; static UARTDeviceState s_qemu_uart_state = {}; static struct UARTDevice QEMU_UART_DEVICE = { - .state = &s_qemu_uart_state, - .base_addr = QEMU_UART1_BASE, - .irqn = UART1_IRQn, - .irq_priority = 6, + .state = &s_qemu_uart_state, + .base_addr = QEMU_UART1_BASE, + .irqn = UART1_IRQn, + .irq_priority = 6, }; UARTDevice *const QEMU_UART = (UARTDevice *)&QEMU_UART_DEVICE; // Display device - QEMU framebuffer at DISPLAY_BASE + 0x1000 static QemuDisplayDevice s_display = { - .base_addr = QEMU_DISPLAY_BASE, - .fb_addr = QEMU_DISPLAY_FB_BASE, - .width = 200, - .height = 228, - .bpp = 8, - .irqn = DISPLAY_IRQn, - .irq_priority = 5, + .base_addr = QEMU_DISPLAY_BASE, + .fb_addr = QEMU_DISPLAY_FB_BASE, + .width = 200, + .height = 228, + .bpp = 8, + .irqn = DISPLAY_IRQn, + .irq_priority = 5, }; DisplayDevice *const DISPLAY = &s_display; const BoardConfigPower BOARD_CONFIG_POWER = { - .low_power_threshold = 2U, - .battery_capacity_hours = 168U, + .low_power_threshold = 2U, + .battery_capacity_hours = 168U, }; const BoardConfig BOARD_CONFIG = { - .backlight_on_percent = 100, - .ambient_light_dark_threshold = 150, - .ambient_k_delta_threshold = 25, - .backlight_default_color = BACKLIGHT_COLOR_WHITE, + .backlight_on_percent = 100, + .ambient_light_dark_threshold = 150, + .ambient_k_delta_threshold = 25, + .backlight_default_color = BACKLIGHT_COLOR_WHITE, }; const BoardConfigButton BOARD_CONFIG_BUTTON = { - .buttons = { - [BUTTON_ID_BACK] = { "Back", NULL, 0, GPIO_PuPd_NOPULL, true }, - [BUTTON_ID_UP] = { "Up", NULL, 1, GPIO_PuPd_UP, false }, - [BUTTON_ID_SELECT] = { "Select", NULL, 2, GPIO_PuPd_UP, false }, - [BUTTON_ID_DOWN] = { "Down", NULL, 3, GPIO_PuPd_UP, false }, - }, - .timer = NULL, - .timer_irqn = TIMER0_IRQn, + .buttons = + { + [BUTTON_ID_BACK] = {"Back", NULL, 0, GPIO_PuPd_NOPULL, true}, + [BUTTON_ID_UP] = {"Up", NULL, 1, GPIO_PuPd_UP, false}, + [BUTTON_ID_SELECT] = {"Select", NULL, 2, GPIO_PuPd_UP, false}, + [BUTTON_ID_DOWN] = {"Down", NULL, 3, GPIO_PuPd_UP, false}, + }, + .timer = NULL, + .timer_irqn = TIMER0_IRQn, }; // Audio device static struct AudioState s_audio_state; static struct AudioDevice AUDIO_DEVICE = { - .state = &s_audio_state, - .base_addr = QEMU_AUDIO_BASE, - .irqn = AUDIO_IRQn, + .state = &s_audio_state, + .base_addr = QEMU_AUDIO_BASE, + .irqn = AUDIO_IRQn, }; AudioDevice *const AUDIO = (AudioDevice *)&AUDIO_DEVICE; // Microphone (QEMU stub — feeds silence on a timer) static MicDeviceState s_mic_state; static MicDevice MIC_DEVICE = { - .state = &s_mic_state, - .channels = 1, + .state = &s_mic_state, + .channels = 1, }; -MicDevice * const MIC = &MIC_DEVICE; +MicDevice *const MIC = &MIC_DEVICE; static HRMDeviceState s_hrm_state; static HRMDevice s_hrm = { - .state = &s_hrm_state, + .state = &s_hrm_state, }; -HRMDevice * const HRM = &s_hrm; +HRMDevice *const HRM = &s_hrm; // IRQ handler trampolines IRQ_MAP(UART2, uart_irq_handler, DBG_UART); diff --git a/src/fw/board/boards/board_qemu_emery.h b/src/fw/board/boards/board_qemu_emery.h index 9d52c71d4a..03727bffe6 100644 --- a/src/fw/board/boards/board_qemu_emery.h +++ b/src/fw/board/boards/board_qemu_emery.h @@ -6,19 +6,19 @@ #define BT_VENDOR_ID 0x0000 #define BT_VENDOR_NAME "QEMU" -extern UARTDevice * const DBG_UART; -extern UARTDevice * const QEMU_UART; +extern UARTDevice *const DBG_UART; +extern UARTDevice *const QEMU_UART; extern DisplayDevice *const DISPLAY; -extern MicDevice * const MIC; -extern HRMDevice * const HRM; +extern MicDevice *const MIC; +extern HRMDevice *const HRM; extern const BoardConfigPower BOARD_CONFIG_POWER; extern const BoardConfig BOARD_CONFIG; extern const BoardConfigButton BOARD_CONFIG_BUTTON; static const BoardConfigAccel BOARD_CONFIG_ACCEL = { - .default_motion_sensitivity = 85U, + .default_motion_sensitivity = 85U, }; static const BoardConfigMag BOARD_CONFIG_MAG = { - .mag_config = {{0}}, + .mag_config = {{0}}, }; diff --git a/src/fw/board/boards/board_qemu_flint.c b/src/fw/board/boards/board_qemu_flint.c index 24a1ad8830..65a190347e 100644 --- a/src/fw/board/boards/board_qemu_flint.c +++ b/src/fw/board/boards/board_qemu_flint.c @@ -11,10 +11,10 @@ static UARTDeviceState s_dbg_uart_state = {}; static struct UARTDevice DBG_UART_DEVICE = { - .state = &s_dbg_uart_state, - .base_addr = QEMU_UART2_BASE, - .irqn = UART2_IRQn, - .irq_priority = 5, + .state = &s_dbg_uart_state, + .base_addr = QEMU_UART2_BASE, + .irqn = UART2_IRQn, + .irq_priority = 5, }; UARTDevice *const DBG_UART = (UARTDevice *)&DBG_UART_DEVICE; @@ -23,65 +23,66 @@ UARTDevice *const DBG_UART = (UARTDevice *)&DBG_UART_DEVICE; static UARTDeviceState s_qemu_uart_state = {}; static struct UARTDevice QEMU_UART_DEVICE = { - .state = &s_qemu_uart_state, - .base_addr = QEMU_UART1_BASE, - .irqn = UART1_IRQn, - .irq_priority = 6, + .state = &s_qemu_uart_state, + .base_addr = QEMU_UART1_BASE, + .irqn = UART1_IRQn, + .irq_priority = 6, }; UARTDevice *const QEMU_UART = (UARTDevice *)&QEMU_UART_DEVICE; // Display device - QEMU framebuffer static QemuDisplayDevice s_display = { - .base_addr = QEMU_DISPLAY_BASE, - .fb_addr = QEMU_DISPLAY_FB_BASE, - .width = 144, - .height = 168, - .bpp = 1, - .irqn = DISPLAY_IRQn, - .irq_priority = 5, + .base_addr = QEMU_DISPLAY_BASE, + .fb_addr = QEMU_DISPLAY_FB_BASE, + .width = 144, + .height = 168, + .bpp = 1, + .irqn = DISPLAY_IRQn, + .irq_priority = 5, }; DisplayDevice *const DISPLAY = &s_display; const BoardConfigPower BOARD_CONFIG_POWER = { - .low_power_threshold = 2U, - .battery_capacity_hours = 168U, + .low_power_threshold = 2U, + .battery_capacity_hours = 168U, }; const BoardConfig BOARD_CONFIG = { - .backlight_on_percent = 100, - .ambient_light_dark_threshold = 150, - .ambient_k_delta_threshold = 25, + .backlight_on_percent = 100, + .ambient_light_dark_threshold = 150, + .ambient_k_delta_threshold = 25, }; const BoardConfigButton BOARD_CONFIG_BUTTON = { - .buttons = { - [BUTTON_ID_BACK] = { "Back", NULL, 0, GPIO_PuPd_NOPULL, true }, - [BUTTON_ID_UP] = { "Up", NULL, 1, GPIO_PuPd_UP, false }, - [BUTTON_ID_SELECT] = { "Select", NULL, 2, GPIO_PuPd_UP, false }, - [BUTTON_ID_DOWN] = { "Down", NULL, 3, GPIO_PuPd_UP, false }, - }, - .timer = NULL, - .timer_irqn = TIMER0_IRQn, + .buttons = + { + [BUTTON_ID_BACK] = {"Back", NULL, 0, GPIO_PuPd_NOPULL, true}, + [BUTTON_ID_UP] = {"Up", NULL, 1, GPIO_PuPd_UP, false}, + [BUTTON_ID_SELECT] = {"Select", NULL, 2, GPIO_PuPd_UP, false}, + [BUTTON_ID_DOWN] = {"Down", NULL, 3, GPIO_PuPd_UP, false}, + }, + .timer = NULL, + .timer_irqn = TIMER0_IRQn, }; // Audio device static struct AudioState s_audio_state; static struct AudioDevice AUDIO_DEVICE = { - .state = &s_audio_state, - .base_addr = QEMU_AUDIO_BASE, - .irqn = AUDIO_IRQn, + .state = &s_audio_state, + .base_addr = QEMU_AUDIO_BASE, + .irqn = AUDIO_IRQn, }; AudioDevice *const AUDIO = (AudioDevice *)&AUDIO_DEVICE; // Microphone (QEMU stub — feeds silence on a timer) static MicDeviceState s_mic_state; static MicDevice MIC_DEVICE = { - .state = &s_mic_state, - .channels = 1, + .state = &s_mic_state, + .channels = 1, }; -MicDevice * const MIC = &MIC_DEVICE; +MicDevice *const MIC = &MIC_DEVICE; // IRQ handler trampolines IRQ_MAP(UART2, uart_irq_handler, DBG_UART); diff --git a/src/fw/board/boards/board_qemu_flint.h b/src/fw/board/boards/board_qemu_flint.h index 824c104bea..567aa05f14 100644 --- a/src/fw/board/boards/board_qemu_flint.h +++ b/src/fw/board/boards/board_qemu_flint.h @@ -6,18 +6,18 @@ #define BT_VENDOR_ID 0x0000 #define BT_VENDOR_NAME "QEMU" -extern UARTDevice * const DBG_UART; -extern UARTDevice * const QEMU_UART; +extern UARTDevice *const DBG_UART; +extern UARTDevice *const QEMU_UART; extern DisplayDevice *const DISPLAY; -extern MicDevice * const MIC; +extern MicDevice *const MIC; extern const BoardConfigPower BOARD_CONFIG_POWER; extern const BoardConfig BOARD_CONFIG; extern const BoardConfigButton BOARD_CONFIG_BUTTON; static const BoardConfigAccel BOARD_CONFIG_ACCEL = { - .default_motion_sensitivity = 85U, + .default_motion_sensitivity = 85U, }; static const BoardConfigMag BOARD_CONFIG_MAG = { - .mag_config = {{0}}, + .mag_config = {{0}}, }; diff --git a/src/fw/board/boards/board_qemu_gabbro.c b/src/fw/board/boards/board_qemu_gabbro.c index afcc2c2707..d4943264ca 100644 --- a/src/fw/board/boards/board_qemu_gabbro.c +++ b/src/fw/board/boards/board_qemu_gabbro.c @@ -10,10 +10,10 @@ static UARTDeviceState s_dbg_uart_state = {}; static struct UARTDevice DBG_UART_DEVICE = { - .state = &s_dbg_uart_state, - .base_addr = QEMU_UART2_BASE, - .irqn = UART2_IRQn, - .irq_priority = 5, + .state = &s_dbg_uart_state, + .base_addr = QEMU_UART2_BASE, + .irqn = UART2_IRQn, + .irq_priority = 5, }; UARTDevice *const DBG_UART = (UARTDevice *)&DBG_UART_DEVICE; @@ -22,56 +22,57 @@ UARTDevice *const DBG_UART = (UARTDevice *)&DBG_UART_DEVICE; static UARTDeviceState s_qemu_uart_state = {}; static struct UARTDevice QEMU_UART_DEVICE = { - .state = &s_qemu_uart_state, - .base_addr = QEMU_UART1_BASE, - .irqn = UART1_IRQn, - .irq_priority = 6, + .state = &s_qemu_uart_state, + .base_addr = QEMU_UART1_BASE, + .irqn = UART1_IRQn, + .irq_priority = 6, }; UARTDevice *const QEMU_UART = (UARTDevice *)&QEMU_UART_DEVICE; // Display device - QEMU framebuffer static QemuDisplayDevice s_display = { - .base_addr = QEMU_DISPLAY_BASE, - .fb_addr = QEMU_DISPLAY_FB_BASE, - .width = 260, - .height = 260, - .bpp = 8, - .irqn = DISPLAY_IRQn, - .irq_priority = 5, + .base_addr = QEMU_DISPLAY_BASE, + .fb_addr = QEMU_DISPLAY_FB_BASE, + .width = 260, + .height = 260, + .bpp = 8, + .irqn = DISPLAY_IRQn, + .irq_priority = 5, }; DisplayDevice *const DISPLAY = &s_display; const BoardConfigPower BOARD_CONFIG_POWER = { - .low_power_threshold = 2U, - .battery_capacity_hours = 168U, + .low_power_threshold = 2U, + .battery_capacity_hours = 168U, }; const BoardConfig BOARD_CONFIG = { - .backlight_on_percent = 100, - .ambient_light_dark_threshold = 150, - .ambient_k_delta_threshold = 25, + .backlight_on_percent = 100, + .ambient_light_dark_threshold = 150, + .ambient_k_delta_threshold = 25, }; const BoardConfigButton BOARD_CONFIG_BUTTON = { - .buttons = { - [BUTTON_ID_BACK] = { "Back", NULL, 0, GPIO_PuPd_NOPULL, true }, - [BUTTON_ID_UP] = { "Up", NULL, 1, GPIO_PuPd_UP, false }, - [BUTTON_ID_SELECT] = { "Select", NULL, 2, GPIO_PuPd_UP, false }, - [BUTTON_ID_DOWN] = { "Down", NULL, 3, GPIO_PuPd_UP, false }, - }, - .timer = NULL, - .timer_irqn = TIMER0_IRQn, + .buttons = + { + [BUTTON_ID_BACK] = {"Back", NULL, 0, GPIO_PuPd_NOPULL, true}, + [BUTTON_ID_UP] = {"Up", NULL, 1, GPIO_PuPd_UP, false}, + [BUTTON_ID_SELECT] = {"Select", NULL, 2, GPIO_PuPd_UP, false}, + [BUTTON_ID_DOWN] = {"Down", NULL, 3, GPIO_PuPd_UP, false}, + }, + .timer = NULL, + .timer_irqn = TIMER0_IRQn, }; // Microphone (QEMU stub — feeds silence on a timer) static MicDeviceState s_mic_state; static MicDevice MIC_DEVICE = { - .state = &s_mic_state, - .channels = 1, + .state = &s_mic_state, + .channels = 1, }; -MicDevice * const MIC = &MIC_DEVICE; +MicDevice *const MIC = &MIC_DEVICE; // IRQ handler trampolines IRQ_MAP(UART2, uart_irq_handler, DBG_UART); diff --git a/src/fw/board/boards/board_qemu_gabbro.h b/src/fw/board/boards/board_qemu_gabbro.h index 824c104bea..567aa05f14 100644 --- a/src/fw/board/boards/board_qemu_gabbro.h +++ b/src/fw/board/boards/board_qemu_gabbro.h @@ -6,18 +6,18 @@ #define BT_VENDOR_ID 0x0000 #define BT_VENDOR_NAME "QEMU" -extern UARTDevice * const DBG_UART; -extern UARTDevice * const QEMU_UART; +extern UARTDevice *const DBG_UART; +extern UARTDevice *const QEMU_UART; extern DisplayDevice *const DISPLAY; -extern MicDevice * const MIC; +extern MicDevice *const MIC; extern const BoardConfigPower BOARD_CONFIG_POWER; extern const BoardConfig BOARD_CONFIG; extern const BoardConfigButton BOARD_CONFIG_BUTTON; static const BoardConfigAccel BOARD_CONFIG_ACCEL = { - .default_motion_sensitivity = 85U, + .default_motion_sensitivity = 85U, }; static const BoardConfigMag BOARD_CONFIG_MAG = { - .mag_config = {{0}}, + .mag_config = {{0}}, }; diff --git a/src/fw/board/display.h b/src/fw/board/display.h index 42a8a7cb8d..39418aebb4 100644 --- a/src/fw/board/display.h +++ b/src/fw/board/display.h @@ -24,7 +24,8 @@ typedef struct { #ifdef CONFIG_BOARD_ASTERIX #include "displays/display_asterix.h" -#elif defined(CONFIG_BOARD_OBELIX_DVT) || defined(CONFIG_BOARD_OBELIX_PVT) || defined(CONFIG_BOARD_OBELIX_BB2) +#elif defined(CONFIG_BOARD_OBELIX_DVT) || defined(CONFIG_BOARD_OBELIX_PVT) || \ + defined(CONFIG_BOARD_OBELIX_BB2) #include "displays/display_obelix.h" #elif defined(CONFIG_BOARD_GETAFIX_DVT) || defined(CONFIG_BOARD_GETAFIX_DVT2) #include "displays/display_getafix.h" @@ -36,14 +37,14 @@ typedef struct { #include "displays/display_qemu_gabbro.h" #else #error "Unknown display definition for board" -#endif // BOARD_* +#endif // BOARD_* -#endif // UNITTEST +#endif // UNITTEST // For backwards compatibility, new code should use PBL_DISPLAY_WIDTH and PBL_DISPLAY_HEIGHT #if !defined(DISP_COLS) || !defined(DISP_ROWS) #define DISP_COLS PBL_DISPLAY_WIDTH #define DISP_ROWS PBL_DISPLAY_HEIGHT -#endif // DISP_COLS || DISP_ROWS +#endif // DISP_COLS || DISP_ROWS -#endif // !SDK +#endif // !SDK diff --git a/src/fw/board/displays/display_asterix.h b/src/fw/board/displays/display_asterix.h index 6fa37e4157..7d6bf724a7 100644 --- a/src/fw/board/displays/display_asterix.h +++ b/src/fw/board/displays/display_asterix.h @@ -23,4 +23,4 @@ #define LEGACY_3X_DISP_ROWS PBL_DISPLAY_HEIGHT #define DISPLAY_FRAMEBUFFER_BYTES \ - (ROUND_TO_MOD_CEIL(PBL_DISPLAY_WIDTH, 32) / 8 * PBL_DISPLAY_HEIGHT) + (ROUND_TO_MOD_CEIL(PBL_DISPLAY_WIDTH, 32) / 8 * PBL_DISPLAY_HEIGHT) diff --git a/src/fw/board/displays/display_getafix.c b/src/fw/board/displays/display_getafix.c index dfbba74ee9..f14ec78818 100644 --- a/src/fw/board/displays/display_getafix.c +++ b/src/fw/board/displays/display_getafix.c @@ -51,263 +51,263 @@ // print("Rectangular Framebuffer has %d bytes" % (260 * 260)) const void *const g_gbitmap_data_row_infos = (const GBitmapDataRowInfoInternal[]){ - /* y = 0 */ {.offset = 0, .min_x = 113, .max_x = 146}, - /* y = 1 */ {.offset = 260, .min_x = 107, .max_x = 152}, - /* y = 2 */ {.offset = 520, .min_x = 102, .max_x = 157}, - /* y = 3 */ {.offset = 780, .min_x = 98, .max_x = 161}, - /* y = 4 */ {.offset = 1040, .min_x = 94, .max_x = 165}, - /* y = 5 */ {.offset = 1300, .min_x = 90, .max_x = 169}, - /* y = 6 */ {.offset = 1560, .min_x = 87, .max_x = 172}, - /* y = 7 */ {.offset = 1820, .min_x = 85, .max_x = 174}, - /* y = 8 */ {.offset = 2080, .min_x = 82, .max_x = 177}, - /* y = 9 */ {.offset = 2340, .min_x = 80, .max_x = 179}, - /* y = 10 */ {.offset = 2600, .min_x = 77, .max_x = 182}, - /* y = 11 */ {.offset = 2860, .min_x = 75, .max_x = 184}, - /* y = 12 */ {.offset = 3120, .min_x = 73, .max_x = 186}, - /* y = 13 */ {.offset = 3380, .min_x = 71, .max_x = 188}, - /* y = 14 */ {.offset = 3640, .min_x = 69, .max_x = 190}, - /* y = 15 */ {.offset = 3900, .min_x = 67, .max_x = 192}, - /* y = 16 */ {.offset = 4160, .min_x = 65, .max_x = 194}, - /* y = 17 */ {.offset = 4420, .min_x = 64, .max_x = 195}, - /* y = 18 */ {.offset = 4680, .min_x = 62, .max_x = 197}, - /* y = 19 */ {.offset = 4940, .min_x = 60, .max_x = 199}, - /* y = 20 */ {.offset = 5200, .min_x = 59, .max_x = 200}, - /* y = 21 */ {.offset = 5460, .min_x = 57, .max_x = 202}, - /* y = 22 */ {.offset = 5720, .min_x = 56, .max_x = 203}, - /* y = 23 */ {.offset = 5980, .min_x = 54, .max_x = 205}, - /* y = 24 */ {.offset = 6240, .min_x = 53, .max_x = 206}, - /* y = 25 */ {.offset = 6500, .min_x = 52, .max_x = 207}, - /* y = 26 */ {.offset = 6760, .min_x = 50, .max_x = 209}, - /* y = 27 */ {.offset = 7020, .min_x = 49, .max_x = 210}, - /* y = 28 */ {.offset = 7280, .min_x = 48, .max_x = 211}, - /* y = 29 */ {.offset = 7540, .min_x = 46, .max_x = 213}, - /* y = 30 */ {.offset = 7800, .min_x = 45, .max_x = 214}, - /* y = 31 */ {.offset = 8060, .min_x = 44, .max_x = 215}, - /* y = 32 */ {.offset = 8320, .min_x = 43, .max_x = 216}, - /* y = 33 */ {.offset = 8580, .min_x = 42, .max_x = 217}, - /* y = 34 */ {.offset = 8840, .min_x = 41, .max_x = 218}, - /* y = 35 */ {.offset = 9100, .min_x = 40, .max_x = 219}, - /* y = 36 */ {.offset = 9360, .min_x = 39, .max_x = 220}, - /* y = 37 */ {.offset = 9620, .min_x = 38, .max_x = 221}, - /* y = 38 */ {.offset = 9880, .min_x = 37, .max_x = 222}, - /* y = 39 */ {.offset = 10140, .min_x = 36, .max_x = 223}, - /* y = 40 */ {.offset = 10400, .min_x = 35, .max_x = 224}, - /* y = 41 */ {.offset = 10660, .min_x = 34, .max_x = 225}, - /* y = 42 */ {.offset = 10920, .min_x = 33, .max_x = 226}, - /* y = 43 */ {.offset = 11180, .min_x = 32, .max_x = 227}, - /* y = 44 */ {.offset = 11440, .min_x = 31, .max_x = 228}, - /* y = 45 */ {.offset = 11700, .min_x = 30, .max_x = 229}, - /* y = 46 */ {.offset = 11960, .min_x = 29, .max_x = 230}, - /* y = 47 */ {.offset = 12220, .min_x = 29, .max_x = 230}, - /* y = 48 */ {.offset = 12480, .min_x = 28, .max_x = 231}, - /* y = 49 */ {.offset = 12740, .min_x = 27, .max_x = 232}, - /* y = 50 */ {.offset = 13000, .min_x = 26, .max_x = 233}, - /* y = 51 */ {.offset = 13260, .min_x = 26, .max_x = 233}, - /* y = 52 */ {.offset = 13520, .min_x = 25, .max_x = 234}, - /* y = 53 */ {.offset = 13780, .min_x = 24, .max_x = 235}, - /* y = 54 */ {.offset = 14040, .min_x = 23, .max_x = 236}, - /* y = 55 */ {.offset = 14300, .min_x = 23, .max_x = 236}, - /* y = 56 */ {.offset = 14560, .min_x = 22, .max_x = 237}, - /* y = 57 */ {.offset = 14820, .min_x = 21, .max_x = 238}, - /* y = 58 */ {.offset = 15080, .min_x = 21, .max_x = 238}, - /* y = 59 */ {.offset = 15340, .min_x = 20, .max_x = 239}, - /* y = 60 */ {.offset = 15600, .min_x = 19, .max_x = 240}, - /* y = 61 */ {.offset = 15860, .min_x = 19, .max_x = 240}, - /* y = 62 */ {.offset = 16120, .min_x = 18, .max_x = 241}, - /* y = 63 */ {.offset = 16380, .min_x = 18, .max_x = 241}, - /* y = 64 */ {.offset = 16640, .min_x = 17, .max_x = 242}, - /* y = 65 */ {.offset = 16900, .min_x = 16, .max_x = 243}, - /* y = 66 */ {.offset = 17160, .min_x = 16, .max_x = 243}, - /* y = 67 */ {.offset = 17420, .min_x = 15, .max_x = 244}, - /* y = 68 */ {.offset = 17680, .min_x = 15, .max_x = 244}, - /* y = 69 */ {.offset = 17940, .min_x = 14, .max_x = 245}, - /* y = 70 */ {.offset = 18200, .min_x = 14, .max_x = 245}, - /* y = 71 */ {.offset = 18460, .min_x = 13, .max_x = 246}, - /* y = 72 */ {.offset = 18720, .min_x = 13, .max_x = 246}, - /* y = 73 */ {.offset = 18980, .min_x = 12, .max_x = 247}, - /* y = 74 */ {.offset = 19240, .min_x = 12, .max_x = 247}, - /* y = 75 */ {.offset = 19500, .min_x = 11, .max_x = 248}, - /* y = 76 */ {.offset = 19760, .min_x = 11, .max_x = 248}, - /* y = 77 */ {.offset = 20020, .min_x = 10, .max_x = 249}, - /* y = 78 */ {.offset = 20280, .min_x = 10, .max_x = 249}, - /* y = 79 */ {.offset = 20540, .min_x = 10, .max_x = 249}, - /* y = 80 */ {.offset = 20800, .min_x = 9, .max_x = 250}, - /* y = 81 */ {.offset = 21060, .min_x = 9, .max_x = 250}, - /* y = 82 */ {.offset = 21320, .min_x = 8, .max_x = 251}, - /* y = 83 */ {.offset = 21580, .min_x = 8, .max_x = 251}, - /* y = 84 */ {.offset = 21840, .min_x = 8, .max_x = 251}, - /* y = 85 */ {.offset = 22100, .min_x = 7, .max_x = 252}, - /* y = 86 */ {.offset = 22360, .min_x = 7, .max_x = 252}, - /* y = 87 */ {.offset = 22620, .min_x = 6, .max_x = 253}, - /* y = 88 */ {.offset = 22880, .min_x = 6, .max_x = 253}, - /* y = 89 */ {.offset = 23140, .min_x = 6, .max_x = 253}, - /* y = 90 */ {.offset = 23400, .min_x = 5, .max_x = 254}, - /* y = 91 */ {.offset = 23660, .min_x = 5, .max_x = 254}, - /* y = 92 */ {.offset = 23920, .min_x = 5, .max_x = 254}, - /* y = 93 */ {.offset = 24180, .min_x = 5, .max_x = 254}, - /* y = 94 */ {.offset = 24440, .min_x = 4, .max_x = 255}, - /* y = 95 */ {.offset = 24700, .min_x = 4, .max_x = 255}, - /* y = 96 */ {.offset = 24960, .min_x = 4, .max_x = 255}, - /* y = 97 */ {.offset = 25220, .min_x = 4, .max_x = 255}, - /* y = 98 */ {.offset = 25480, .min_x = 3, .max_x = 256}, - /* y = 99 */ {.offset = 25740, .min_x = 3, .max_x = 256}, - /* y = 100 */ {.offset = 26000, .min_x = 3, .max_x = 256}, - /* y = 101 */ {.offset = 26260, .min_x = 3, .max_x = 256}, - /* y = 102 */ {.offset = 26520, .min_x = 2, .max_x = 257}, - /* y = 103 */ {.offset = 26780, .min_x = 2, .max_x = 257}, - /* y = 104 */ {.offset = 27040, .min_x = 2, .max_x = 257}, - /* y = 105 */ {.offset = 27300, .min_x = 2, .max_x = 257}, - /* y = 106 */ {.offset = 27560, .min_x = 2, .max_x = 257}, - /* y = 107 */ {.offset = 27820, .min_x = 1, .max_x = 258}, - /* y = 108 */ {.offset = 28080, .min_x = 1, .max_x = 258}, - /* y = 109 */ {.offset = 28340, .min_x = 1, .max_x = 258}, - /* y = 110 */ {.offset = 28600, .min_x = 1, .max_x = 258}, - /* y = 111 */ {.offset = 28860, .min_x = 1, .max_x = 258}, - /* y = 112 */ {.offset = 29120, .min_x = 1, .max_x = 258}, - /* y = 113 */ {.offset = 29380, .min_x = 0, .max_x = 259}, - /* y = 114 */ {.offset = 29640, .min_x = 0, .max_x = 259}, - /* y = 115 */ {.offset = 29900, .min_x = 0, .max_x = 259}, - /* y = 116 */ {.offset = 30160, .min_x = 0, .max_x = 259}, - /* y = 117 */ {.offset = 30420, .min_x = 0, .max_x = 259}, - /* y = 118 */ {.offset = 30680, .min_x = 0, .max_x = 259}, - /* y = 119 */ {.offset = 30940, .min_x = 0, .max_x = 259}, - /* y = 120 */ {.offset = 31200, .min_x = 0, .max_x = 259}, - /* y = 121 */ {.offset = 31460, .min_x = 0, .max_x = 259}, - /* y = 122 */ {.offset = 31720, .min_x = 0, .max_x = 259}, - /* y = 123 */ {.offset = 31980, .min_x = 0, .max_x = 259}, - /* y = 124 */ {.offset = 32240, .min_x = 0, .max_x = 259}, - /* y = 125 */ {.offset = 32500, .min_x = 0, .max_x = 259}, - /* y = 126 */ {.offset = 32760, .min_x = 0, .max_x = 259}, - /* y = 127 */ {.offset = 33020, .min_x = 0, .max_x = 259}, - /* y = 128 */ {.offset = 33280, .min_x = 0, .max_x = 259}, - /* y = 129 */ {.offset = 33540, .min_x = 0, .max_x = 259}, - /* y = 130 */ {.offset = 33800, .min_x = 0, .max_x = 259}, - /* y = 131 */ {.offset = 34060, .min_x = 0, .max_x = 259}, - /* y = 132 */ {.offset = 34320, .min_x = 0, .max_x = 259}, - /* y = 133 */ {.offset = 34580, .min_x = 0, .max_x = 259}, - /* y = 134 */ {.offset = 34840, .min_x = 0, .max_x = 259}, - /* y = 135 */ {.offset = 35100, .min_x = 0, .max_x = 259}, - /* y = 136 */ {.offset = 35360, .min_x = 0, .max_x = 259}, - /* y = 137 */ {.offset = 35620, .min_x = 0, .max_x = 259}, - /* y = 138 */ {.offset = 35880, .min_x = 0, .max_x = 259}, - /* y = 139 */ {.offset = 36140, .min_x = 0, .max_x = 259}, - /* y = 140 */ {.offset = 36400, .min_x = 0, .max_x = 259}, - /* y = 141 */ {.offset = 36660, .min_x = 0, .max_x = 259}, - /* y = 142 */ {.offset = 36920, .min_x = 0, .max_x = 259}, - /* y = 143 */ {.offset = 37180, .min_x = 0, .max_x = 259}, - /* y = 144 */ {.offset = 37440, .min_x = 0, .max_x = 259}, - /* y = 145 */ {.offset = 37700, .min_x = 0, .max_x = 259}, - /* y = 146 */ {.offset = 37960, .min_x = 0, .max_x = 259}, - /* y = 147 */ {.offset = 38220, .min_x = 1, .max_x = 258}, - /* y = 148 */ {.offset = 38480, .min_x = 1, .max_x = 258}, - /* y = 149 */ {.offset = 38740, .min_x = 1, .max_x = 258}, - /* y = 150 */ {.offset = 39000, .min_x = 1, .max_x = 258}, - /* y = 151 */ {.offset = 39260, .min_x = 1, .max_x = 258}, - /* y = 152 */ {.offset = 39520, .min_x = 1, .max_x = 258}, - /* y = 153 */ {.offset = 39780, .min_x = 2, .max_x = 257}, - /* y = 154 */ {.offset = 40040, .min_x = 2, .max_x = 257}, - /* y = 155 */ {.offset = 40300, .min_x = 2, .max_x = 257}, - /* y = 156 */ {.offset = 40560, .min_x = 2, .max_x = 257}, - /* y = 157 */ {.offset = 40820, .min_x = 2, .max_x = 257}, - /* y = 158 */ {.offset = 41080, .min_x = 3, .max_x = 256}, - /* y = 159 */ {.offset = 41340, .min_x = 3, .max_x = 256}, - /* y = 160 */ {.offset = 41600, .min_x = 3, .max_x = 256}, - /* y = 161 */ {.offset = 41860, .min_x = 3, .max_x = 256}, - /* y = 162 */ {.offset = 42120, .min_x = 4, .max_x = 255}, - /* y = 163 */ {.offset = 42380, .min_x = 4, .max_x = 255}, - /* y = 164 */ {.offset = 42640, .min_x = 4, .max_x = 255}, - /* y = 165 */ {.offset = 42900, .min_x = 4, .max_x = 255}, - /* y = 166 */ {.offset = 43160, .min_x = 5, .max_x = 254}, - /* y = 167 */ {.offset = 43420, .min_x = 5, .max_x = 254}, - /* y = 168 */ {.offset = 43680, .min_x = 5, .max_x = 254}, - /* y = 169 */ {.offset = 43940, .min_x = 5, .max_x = 254}, - /* y = 170 */ {.offset = 44200, .min_x = 6, .max_x = 253}, - /* y = 171 */ {.offset = 44460, .min_x = 6, .max_x = 253}, - /* y = 172 */ {.offset = 44720, .min_x = 6, .max_x = 253}, - /* y = 173 */ {.offset = 44980, .min_x = 7, .max_x = 252}, - /* y = 174 */ {.offset = 45240, .min_x = 7, .max_x = 252}, - /* y = 175 */ {.offset = 45500, .min_x = 8, .max_x = 251}, - /* y = 176 */ {.offset = 45760, .min_x = 8, .max_x = 251}, - /* y = 177 */ {.offset = 46020, .min_x = 8, .max_x = 251}, - /* y = 178 */ {.offset = 46280, .min_x = 9, .max_x = 250}, - /* y = 179 */ {.offset = 46540, .min_x = 9, .max_x = 250}, - /* y = 180 */ {.offset = 46800, .min_x = 10, .max_x = 249}, - /* y = 181 */ {.offset = 47060, .min_x = 10, .max_x = 249}, - /* y = 182 */ {.offset = 47320, .min_x = 10, .max_x = 249}, - /* y = 183 */ {.offset = 47580, .min_x = 11, .max_x = 248}, - /* y = 184 */ {.offset = 47840, .min_x = 11, .max_x = 248}, - /* y = 185 */ {.offset = 48100, .min_x = 12, .max_x = 247}, - /* y = 186 */ {.offset = 48360, .min_x = 12, .max_x = 247}, - /* y = 187 */ {.offset = 48620, .min_x = 13, .max_x = 246}, - /* y = 188 */ {.offset = 48880, .min_x = 13, .max_x = 246}, - /* y = 189 */ {.offset = 49140, .min_x = 14, .max_x = 245}, - /* y = 190 */ {.offset = 49400, .min_x = 14, .max_x = 245}, - /* y = 191 */ {.offset = 49660, .min_x = 15, .max_x = 244}, - /* y = 192 */ {.offset = 49920, .min_x = 15, .max_x = 244}, - /* y = 193 */ {.offset = 50180, .min_x = 16, .max_x = 243}, - /* y = 194 */ {.offset = 50440, .min_x = 16, .max_x = 243}, - /* y = 195 */ {.offset = 50700, .min_x = 17, .max_x = 242}, - /* y = 196 */ {.offset = 50960, .min_x = 18, .max_x = 241}, - /* y = 197 */ {.offset = 51220, .min_x = 18, .max_x = 241}, - /* y = 198 */ {.offset = 51480, .min_x = 19, .max_x = 240}, - /* y = 199 */ {.offset = 51740, .min_x = 19, .max_x = 240}, - /* y = 200 */ {.offset = 52000, .min_x = 20, .max_x = 239}, - /* y = 201 */ {.offset = 52260, .min_x = 21, .max_x = 238}, - /* y = 202 */ {.offset = 52520, .min_x = 21, .max_x = 238}, - /* y = 203 */ {.offset = 52780, .min_x = 22, .max_x = 237}, - /* y = 204 */ {.offset = 53040, .min_x = 23, .max_x = 236}, - /* y = 205 */ {.offset = 53300, .min_x = 23, .max_x = 236}, - /* y = 206 */ {.offset = 53560, .min_x = 24, .max_x = 235}, - /* y = 207 */ {.offset = 53820, .min_x = 25, .max_x = 234}, - /* y = 208 */ {.offset = 54080, .min_x = 26, .max_x = 233}, - /* y = 209 */ {.offset = 54340, .min_x = 26, .max_x = 233}, - /* y = 210 */ {.offset = 54600, .min_x = 27, .max_x = 232}, - /* y = 211 */ {.offset = 54860, .min_x = 28, .max_x = 231}, - /* y = 212 */ {.offset = 55120, .min_x = 29, .max_x = 230}, - /* y = 213 */ {.offset = 55380, .min_x = 29, .max_x = 230}, - /* y = 214 */ {.offset = 55640, .min_x = 30, .max_x = 229}, - /* y = 215 */ {.offset = 55900, .min_x = 31, .max_x = 228}, - /* y = 216 */ {.offset = 56160, .min_x = 32, .max_x = 227}, - /* y = 217 */ {.offset = 56420, .min_x = 33, .max_x = 226}, - /* y = 218 */ {.offset = 56680, .min_x = 34, .max_x = 225}, - /* y = 219 */ {.offset = 56940, .min_x = 35, .max_x = 224}, - /* y = 220 */ {.offset = 57200, .min_x = 36, .max_x = 223}, - /* y = 221 */ {.offset = 57460, .min_x = 37, .max_x = 222}, - /* y = 222 */ {.offset = 57720, .min_x = 38, .max_x = 221}, - /* y = 223 */ {.offset = 57980, .min_x = 39, .max_x = 220}, - /* y = 224 */ {.offset = 58240, .min_x = 40, .max_x = 219}, - /* y = 225 */ {.offset = 58500, .min_x = 41, .max_x = 218}, - /* y = 226 */ {.offset = 58760, .min_x = 42, .max_x = 217}, - /* y = 227 */ {.offset = 59020, .min_x = 43, .max_x = 216}, - /* y = 228 */ {.offset = 59280, .min_x = 44, .max_x = 215}, - /* y = 229 */ {.offset = 59540, .min_x = 45, .max_x = 214}, - /* y = 230 */ {.offset = 59800, .min_x = 46, .max_x = 213}, - /* y = 231 */ {.offset = 60060, .min_x = 48, .max_x = 211}, - /* y = 232 */ {.offset = 60320, .min_x = 49, .max_x = 210}, - /* y = 233 */ {.offset = 60580, .min_x = 50, .max_x = 209}, - /* y = 234 */ {.offset = 60840, .min_x = 52, .max_x = 207}, - /* y = 235 */ {.offset = 61100, .min_x = 53, .max_x = 206}, - /* y = 236 */ {.offset = 61360, .min_x = 54, .max_x = 205}, - /* y = 237 */ {.offset = 61620, .min_x = 56, .max_x = 203}, - /* y = 238 */ {.offset = 61880, .min_x = 57, .max_x = 202}, - /* y = 239 */ {.offset = 62140, .min_x = 59, .max_x = 200}, - /* y = 240 */ {.offset = 62400, .min_x = 60, .max_x = 199}, - /* y = 241 */ {.offset = 62660, .min_x = 62, .max_x = 197}, - /* y = 242 */ {.offset = 62920, .min_x = 64, .max_x = 195}, - /* y = 243 */ {.offset = 63180, .min_x = 65, .max_x = 194}, - /* y = 244 */ {.offset = 63440, .min_x = 67, .max_x = 192}, - /* y = 245 */ {.offset = 63700, .min_x = 69, .max_x = 190}, - /* y = 246 */ {.offset = 63960, .min_x = 71, .max_x = 188}, - /* y = 247 */ {.offset = 64220, .min_x = 73, .max_x = 186}, - /* y = 248 */ {.offset = 64480, .min_x = 75, .max_x = 184}, - /* y = 249 */ {.offset = 64740, .min_x = 77, .max_x = 182}, - /* y = 250 */ {.offset = 65000, .min_x = 80, .max_x = 179}, - /* y = 251 */ {.offset = 65260, .min_x = 82, .max_x = 177}, - /* y = 252 */ {.offset = 65520, .min_x = 85, .max_x = 174}, - /* y = 253 */ {.offset = 65780, .min_x = 87, .max_x = 172}, - /* y = 254 */ {.offset = 66040, .min_x = 90, .max_x = 169}, - /* y = 255 */ {.offset = 66300, .min_x = 94, .max_x = 165}, - /* y = 256 */ {.offset = 66560, .min_x = 98, .max_x = 161}, + /* y = 0 */ {.offset = 0, .min_x = 113, .max_x = 146}, + /* y = 1 */ {.offset = 260, .min_x = 107, .max_x = 152}, + /* y = 2 */ {.offset = 520, .min_x = 102, .max_x = 157}, + /* y = 3 */ {.offset = 780, .min_x = 98, .max_x = 161}, + /* y = 4 */ {.offset = 1040, .min_x = 94, .max_x = 165}, + /* y = 5 */ {.offset = 1300, .min_x = 90, .max_x = 169}, + /* y = 6 */ {.offset = 1560, .min_x = 87, .max_x = 172}, + /* y = 7 */ {.offset = 1820, .min_x = 85, .max_x = 174}, + /* y = 8 */ {.offset = 2080, .min_x = 82, .max_x = 177}, + /* y = 9 */ {.offset = 2340, .min_x = 80, .max_x = 179}, + /* y = 10 */ {.offset = 2600, .min_x = 77, .max_x = 182}, + /* y = 11 */ {.offset = 2860, .min_x = 75, .max_x = 184}, + /* y = 12 */ {.offset = 3120, .min_x = 73, .max_x = 186}, + /* y = 13 */ {.offset = 3380, .min_x = 71, .max_x = 188}, + /* y = 14 */ {.offset = 3640, .min_x = 69, .max_x = 190}, + /* y = 15 */ {.offset = 3900, .min_x = 67, .max_x = 192}, + /* y = 16 */ {.offset = 4160, .min_x = 65, .max_x = 194}, + /* y = 17 */ {.offset = 4420, .min_x = 64, .max_x = 195}, + /* y = 18 */ {.offset = 4680, .min_x = 62, .max_x = 197}, + /* y = 19 */ {.offset = 4940, .min_x = 60, .max_x = 199}, + /* y = 20 */ {.offset = 5200, .min_x = 59, .max_x = 200}, + /* y = 21 */ {.offset = 5460, .min_x = 57, .max_x = 202}, + /* y = 22 */ {.offset = 5720, .min_x = 56, .max_x = 203}, + /* y = 23 */ {.offset = 5980, .min_x = 54, .max_x = 205}, + /* y = 24 */ {.offset = 6240, .min_x = 53, .max_x = 206}, + /* y = 25 */ {.offset = 6500, .min_x = 52, .max_x = 207}, + /* y = 26 */ {.offset = 6760, .min_x = 50, .max_x = 209}, + /* y = 27 */ {.offset = 7020, .min_x = 49, .max_x = 210}, + /* y = 28 */ {.offset = 7280, .min_x = 48, .max_x = 211}, + /* y = 29 */ {.offset = 7540, .min_x = 46, .max_x = 213}, + /* y = 30 */ {.offset = 7800, .min_x = 45, .max_x = 214}, + /* y = 31 */ {.offset = 8060, .min_x = 44, .max_x = 215}, + /* y = 32 */ {.offset = 8320, .min_x = 43, .max_x = 216}, + /* y = 33 */ {.offset = 8580, .min_x = 42, .max_x = 217}, + /* y = 34 */ {.offset = 8840, .min_x = 41, .max_x = 218}, + /* y = 35 */ {.offset = 9100, .min_x = 40, .max_x = 219}, + /* y = 36 */ {.offset = 9360, .min_x = 39, .max_x = 220}, + /* y = 37 */ {.offset = 9620, .min_x = 38, .max_x = 221}, + /* y = 38 */ {.offset = 9880, .min_x = 37, .max_x = 222}, + /* y = 39 */ {.offset = 10140, .min_x = 36, .max_x = 223}, + /* y = 40 */ {.offset = 10400, .min_x = 35, .max_x = 224}, + /* y = 41 */ {.offset = 10660, .min_x = 34, .max_x = 225}, + /* y = 42 */ {.offset = 10920, .min_x = 33, .max_x = 226}, + /* y = 43 */ {.offset = 11180, .min_x = 32, .max_x = 227}, + /* y = 44 */ {.offset = 11440, .min_x = 31, .max_x = 228}, + /* y = 45 */ {.offset = 11700, .min_x = 30, .max_x = 229}, + /* y = 46 */ {.offset = 11960, .min_x = 29, .max_x = 230}, + /* y = 47 */ {.offset = 12220, .min_x = 29, .max_x = 230}, + /* y = 48 */ {.offset = 12480, .min_x = 28, .max_x = 231}, + /* y = 49 */ {.offset = 12740, .min_x = 27, .max_x = 232}, + /* y = 50 */ {.offset = 13000, .min_x = 26, .max_x = 233}, + /* y = 51 */ {.offset = 13260, .min_x = 26, .max_x = 233}, + /* y = 52 */ {.offset = 13520, .min_x = 25, .max_x = 234}, + /* y = 53 */ {.offset = 13780, .min_x = 24, .max_x = 235}, + /* y = 54 */ {.offset = 14040, .min_x = 23, .max_x = 236}, + /* y = 55 */ {.offset = 14300, .min_x = 23, .max_x = 236}, + /* y = 56 */ {.offset = 14560, .min_x = 22, .max_x = 237}, + /* y = 57 */ {.offset = 14820, .min_x = 21, .max_x = 238}, + /* y = 58 */ {.offset = 15080, .min_x = 21, .max_x = 238}, + /* y = 59 */ {.offset = 15340, .min_x = 20, .max_x = 239}, + /* y = 60 */ {.offset = 15600, .min_x = 19, .max_x = 240}, + /* y = 61 */ {.offset = 15860, .min_x = 19, .max_x = 240}, + /* y = 62 */ {.offset = 16120, .min_x = 18, .max_x = 241}, + /* y = 63 */ {.offset = 16380, .min_x = 18, .max_x = 241}, + /* y = 64 */ {.offset = 16640, .min_x = 17, .max_x = 242}, + /* y = 65 */ {.offset = 16900, .min_x = 16, .max_x = 243}, + /* y = 66 */ {.offset = 17160, .min_x = 16, .max_x = 243}, + /* y = 67 */ {.offset = 17420, .min_x = 15, .max_x = 244}, + /* y = 68 */ {.offset = 17680, .min_x = 15, .max_x = 244}, + /* y = 69 */ {.offset = 17940, .min_x = 14, .max_x = 245}, + /* y = 70 */ {.offset = 18200, .min_x = 14, .max_x = 245}, + /* y = 71 */ {.offset = 18460, .min_x = 13, .max_x = 246}, + /* y = 72 */ {.offset = 18720, .min_x = 13, .max_x = 246}, + /* y = 73 */ {.offset = 18980, .min_x = 12, .max_x = 247}, + /* y = 74 */ {.offset = 19240, .min_x = 12, .max_x = 247}, + /* y = 75 */ {.offset = 19500, .min_x = 11, .max_x = 248}, + /* y = 76 */ {.offset = 19760, .min_x = 11, .max_x = 248}, + /* y = 77 */ {.offset = 20020, .min_x = 10, .max_x = 249}, + /* y = 78 */ {.offset = 20280, .min_x = 10, .max_x = 249}, + /* y = 79 */ {.offset = 20540, .min_x = 10, .max_x = 249}, + /* y = 80 */ {.offset = 20800, .min_x = 9, .max_x = 250}, + /* y = 81 */ {.offset = 21060, .min_x = 9, .max_x = 250}, + /* y = 82 */ {.offset = 21320, .min_x = 8, .max_x = 251}, + /* y = 83 */ {.offset = 21580, .min_x = 8, .max_x = 251}, + /* y = 84 */ {.offset = 21840, .min_x = 8, .max_x = 251}, + /* y = 85 */ {.offset = 22100, .min_x = 7, .max_x = 252}, + /* y = 86 */ {.offset = 22360, .min_x = 7, .max_x = 252}, + /* y = 87 */ {.offset = 22620, .min_x = 6, .max_x = 253}, + /* y = 88 */ {.offset = 22880, .min_x = 6, .max_x = 253}, + /* y = 89 */ {.offset = 23140, .min_x = 6, .max_x = 253}, + /* y = 90 */ {.offset = 23400, .min_x = 5, .max_x = 254}, + /* y = 91 */ {.offset = 23660, .min_x = 5, .max_x = 254}, + /* y = 92 */ {.offset = 23920, .min_x = 5, .max_x = 254}, + /* y = 93 */ {.offset = 24180, .min_x = 5, .max_x = 254}, + /* y = 94 */ {.offset = 24440, .min_x = 4, .max_x = 255}, + /* y = 95 */ {.offset = 24700, .min_x = 4, .max_x = 255}, + /* y = 96 */ {.offset = 24960, .min_x = 4, .max_x = 255}, + /* y = 97 */ {.offset = 25220, .min_x = 4, .max_x = 255}, + /* y = 98 */ {.offset = 25480, .min_x = 3, .max_x = 256}, + /* y = 99 */ {.offset = 25740, .min_x = 3, .max_x = 256}, + /* y = 100 */ {.offset = 26000, .min_x = 3, .max_x = 256}, + /* y = 101 */ {.offset = 26260, .min_x = 3, .max_x = 256}, + /* y = 102 */ {.offset = 26520, .min_x = 2, .max_x = 257}, + /* y = 103 */ {.offset = 26780, .min_x = 2, .max_x = 257}, + /* y = 104 */ {.offset = 27040, .min_x = 2, .max_x = 257}, + /* y = 105 */ {.offset = 27300, .min_x = 2, .max_x = 257}, + /* y = 106 */ {.offset = 27560, .min_x = 2, .max_x = 257}, + /* y = 107 */ {.offset = 27820, .min_x = 1, .max_x = 258}, + /* y = 108 */ {.offset = 28080, .min_x = 1, .max_x = 258}, + /* y = 109 */ {.offset = 28340, .min_x = 1, .max_x = 258}, + /* y = 110 */ {.offset = 28600, .min_x = 1, .max_x = 258}, + /* y = 111 */ {.offset = 28860, .min_x = 1, .max_x = 258}, + /* y = 112 */ {.offset = 29120, .min_x = 1, .max_x = 258}, + /* y = 113 */ {.offset = 29380, .min_x = 0, .max_x = 259}, + /* y = 114 */ {.offset = 29640, .min_x = 0, .max_x = 259}, + /* y = 115 */ {.offset = 29900, .min_x = 0, .max_x = 259}, + /* y = 116 */ {.offset = 30160, .min_x = 0, .max_x = 259}, + /* y = 117 */ {.offset = 30420, .min_x = 0, .max_x = 259}, + /* y = 118 */ {.offset = 30680, .min_x = 0, .max_x = 259}, + /* y = 119 */ {.offset = 30940, .min_x = 0, .max_x = 259}, + /* y = 120 */ {.offset = 31200, .min_x = 0, .max_x = 259}, + /* y = 121 */ {.offset = 31460, .min_x = 0, .max_x = 259}, + /* y = 122 */ {.offset = 31720, .min_x = 0, .max_x = 259}, + /* y = 123 */ {.offset = 31980, .min_x = 0, .max_x = 259}, + /* y = 124 */ {.offset = 32240, .min_x = 0, .max_x = 259}, + /* y = 125 */ {.offset = 32500, .min_x = 0, .max_x = 259}, + /* y = 126 */ {.offset = 32760, .min_x = 0, .max_x = 259}, + /* y = 127 */ {.offset = 33020, .min_x = 0, .max_x = 259}, + /* y = 128 */ {.offset = 33280, .min_x = 0, .max_x = 259}, + /* y = 129 */ {.offset = 33540, .min_x = 0, .max_x = 259}, + /* y = 130 */ {.offset = 33800, .min_x = 0, .max_x = 259}, + /* y = 131 */ {.offset = 34060, .min_x = 0, .max_x = 259}, + /* y = 132 */ {.offset = 34320, .min_x = 0, .max_x = 259}, + /* y = 133 */ {.offset = 34580, .min_x = 0, .max_x = 259}, + /* y = 134 */ {.offset = 34840, .min_x = 0, .max_x = 259}, + /* y = 135 */ {.offset = 35100, .min_x = 0, .max_x = 259}, + /* y = 136 */ {.offset = 35360, .min_x = 0, .max_x = 259}, + /* y = 137 */ {.offset = 35620, .min_x = 0, .max_x = 259}, + /* y = 138 */ {.offset = 35880, .min_x = 0, .max_x = 259}, + /* y = 139 */ {.offset = 36140, .min_x = 0, .max_x = 259}, + /* y = 140 */ {.offset = 36400, .min_x = 0, .max_x = 259}, + /* y = 141 */ {.offset = 36660, .min_x = 0, .max_x = 259}, + /* y = 142 */ {.offset = 36920, .min_x = 0, .max_x = 259}, + /* y = 143 */ {.offset = 37180, .min_x = 0, .max_x = 259}, + /* y = 144 */ {.offset = 37440, .min_x = 0, .max_x = 259}, + /* y = 145 */ {.offset = 37700, .min_x = 0, .max_x = 259}, + /* y = 146 */ {.offset = 37960, .min_x = 0, .max_x = 259}, + /* y = 147 */ {.offset = 38220, .min_x = 1, .max_x = 258}, + /* y = 148 */ {.offset = 38480, .min_x = 1, .max_x = 258}, + /* y = 149 */ {.offset = 38740, .min_x = 1, .max_x = 258}, + /* y = 150 */ {.offset = 39000, .min_x = 1, .max_x = 258}, + /* y = 151 */ {.offset = 39260, .min_x = 1, .max_x = 258}, + /* y = 152 */ {.offset = 39520, .min_x = 1, .max_x = 258}, + /* y = 153 */ {.offset = 39780, .min_x = 2, .max_x = 257}, + /* y = 154 */ {.offset = 40040, .min_x = 2, .max_x = 257}, + /* y = 155 */ {.offset = 40300, .min_x = 2, .max_x = 257}, + /* y = 156 */ {.offset = 40560, .min_x = 2, .max_x = 257}, + /* y = 157 */ {.offset = 40820, .min_x = 2, .max_x = 257}, + /* y = 158 */ {.offset = 41080, .min_x = 3, .max_x = 256}, + /* y = 159 */ {.offset = 41340, .min_x = 3, .max_x = 256}, + /* y = 160 */ {.offset = 41600, .min_x = 3, .max_x = 256}, + /* y = 161 */ {.offset = 41860, .min_x = 3, .max_x = 256}, + /* y = 162 */ {.offset = 42120, .min_x = 4, .max_x = 255}, + /* y = 163 */ {.offset = 42380, .min_x = 4, .max_x = 255}, + /* y = 164 */ {.offset = 42640, .min_x = 4, .max_x = 255}, + /* y = 165 */ {.offset = 42900, .min_x = 4, .max_x = 255}, + /* y = 166 */ {.offset = 43160, .min_x = 5, .max_x = 254}, + /* y = 167 */ {.offset = 43420, .min_x = 5, .max_x = 254}, + /* y = 168 */ {.offset = 43680, .min_x = 5, .max_x = 254}, + /* y = 169 */ {.offset = 43940, .min_x = 5, .max_x = 254}, + /* y = 170 */ {.offset = 44200, .min_x = 6, .max_x = 253}, + /* y = 171 */ {.offset = 44460, .min_x = 6, .max_x = 253}, + /* y = 172 */ {.offset = 44720, .min_x = 6, .max_x = 253}, + /* y = 173 */ {.offset = 44980, .min_x = 7, .max_x = 252}, + /* y = 174 */ {.offset = 45240, .min_x = 7, .max_x = 252}, + /* y = 175 */ {.offset = 45500, .min_x = 8, .max_x = 251}, + /* y = 176 */ {.offset = 45760, .min_x = 8, .max_x = 251}, + /* y = 177 */ {.offset = 46020, .min_x = 8, .max_x = 251}, + /* y = 178 */ {.offset = 46280, .min_x = 9, .max_x = 250}, + /* y = 179 */ {.offset = 46540, .min_x = 9, .max_x = 250}, + /* y = 180 */ {.offset = 46800, .min_x = 10, .max_x = 249}, + /* y = 181 */ {.offset = 47060, .min_x = 10, .max_x = 249}, + /* y = 182 */ {.offset = 47320, .min_x = 10, .max_x = 249}, + /* y = 183 */ {.offset = 47580, .min_x = 11, .max_x = 248}, + /* y = 184 */ {.offset = 47840, .min_x = 11, .max_x = 248}, + /* y = 185 */ {.offset = 48100, .min_x = 12, .max_x = 247}, + /* y = 186 */ {.offset = 48360, .min_x = 12, .max_x = 247}, + /* y = 187 */ {.offset = 48620, .min_x = 13, .max_x = 246}, + /* y = 188 */ {.offset = 48880, .min_x = 13, .max_x = 246}, + /* y = 189 */ {.offset = 49140, .min_x = 14, .max_x = 245}, + /* y = 190 */ {.offset = 49400, .min_x = 14, .max_x = 245}, + /* y = 191 */ {.offset = 49660, .min_x = 15, .max_x = 244}, + /* y = 192 */ {.offset = 49920, .min_x = 15, .max_x = 244}, + /* y = 193 */ {.offset = 50180, .min_x = 16, .max_x = 243}, + /* y = 194 */ {.offset = 50440, .min_x = 16, .max_x = 243}, + /* y = 195 */ {.offset = 50700, .min_x = 17, .max_x = 242}, + /* y = 196 */ {.offset = 50960, .min_x = 18, .max_x = 241}, + /* y = 197 */ {.offset = 51220, .min_x = 18, .max_x = 241}, + /* y = 198 */ {.offset = 51480, .min_x = 19, .max_x = 240}, + /* y = 199 */ {.offset = 51740, .min_x = 19, .max_x = 240}, + /* y = 200 */ {.offset = 52000, .min_x = 20, .max_x = 239}, + /* y = 201 */ {.offset = 52260, .min_x = 21, .max_x = 238}, + /* y = 202 */ {.offset = 52520, .min_x = 21, .max_x = 238}, + /* y = 203 */ {.offset = 52780, .min_x = 22, .max_x = 237}, + /* y = 204 */ {.offset = 53040, .min_x = 23, .max_x = 236}, + /* y = 205 */ {.offset = 53300, .min_x = 23, .max_x = 236}, + /* y = 206 */ {.offset = 53560, .min_x = 24, .max_x = 235}, + /* y = 207 */ {.offset = 53820, .min_x = 25, .max_x = 234}, + /* y = 208 */ {.offset = 54080, .min_x = 26, .max_x = 233}, + /* y = 209 */ {.offset = 54340, .min_x = 26, .max_x = 233}, + /* y = 210 */ {.offset = 54600, .min_x = 27, .max_x = 232}, + /* y = 211 */ {.offset = 54860, .min_x = 28, .max_x = 231}, + /* y = 212 */ {.offset = 55120, .min_x = 29, .max_x = 230}, + /* y = 213 */ {.offset = 55380, .min_x = 29, .max_x = 230}, + /* y = 214 */ {.offset = 55640, .min_x = 30, .max_x = 229}, + /* y = 215 */ {.offset = 55900, .min_x = 31, .max_x = 228}, + /* y = 216 */ {.offset = 56160, .min_x = 32, .max_x = 227}, + /* y = 217 */ {.offset = 56420, .min_x = 33, .max_x = 226}, + /* y = 218 */ {.offset = 56680, .min_x = 34, .max_x = 225}, + /* y = 219 */ {.offset = 56940, .min_x = 35, .max_x = 224}, + /* y = 220 */ {.offset = 57200, .min_x = 36, .max_x = 223}, + /* y = 221 */ {.offset = 57460, .min_x = 37, .max_x = 222}, + /* y = 222 */ {.offset = 57720, .min_x = 38, .max_x = 221}, + /* y = 223 */ {.offset = 57980, .min_x = 39, .max_x = 220}, + /* y = 224 */ {.offset = 58240, .min_x = 40, .max_x = 219}, + /* y = 225 */ {.offset = 58500, .min_x = 41, .max_x = 218}, + /* y = 226 */ {.offset = 58760, .min_x = 42, .max_x = 217}, + /* y = 227 */ {.offset = 59020, .min_x = 43, .max_x = 216}, + /* y = 228 */ {.offset = 59280, .min_x = 44, .max_x = 215}, + /* y = 229 */ {.offset = 59540, .min_x = 45, .max_x = 214}, + /* y = 230 */ {.offset = 59800, .min_x = 46, .max_x = 213}, + /* y = 231 */ {.offset = 60060, .min_x = 48, .max_x = 211}, + /* y = 232 */ {.offset = 60320, .min_x = 49, .max_x = 210}, + /* y = 233 */ {.offset = 60580, .min_x = 50, .max_x = 209}, + /* y = 234 */ {.offset = 60840, .min_x = 52, .max_x = 207}, + /* y = 235 */ {.offset = 61100, .min_x = 53, .max_x = 206}, + /* y = 236 */ {.offset = 61360, .min_x = 54, .max_x = 205}, + /* y = 237 */ {.offset = 61620, .min_x = 56, .max_x = 203}, + /* y = 238 */ {.offset = 61880, .min_x = 57, .max_x = 202}, + /* y = 239 */ {.offset = 62140, .min_x = 59, .max_x = 200}, + /* y = 240 */ {.offset = 62400, .min_x = 60, .max_x = 199}, + /* y = 241 */ {.offset = 62660, .min_x = 62, .max_x = 197}, + /* y = 242 */ {.offset = 62920, .min_x = 64, .max_x = 195}, + /* y = 243 */ {.offset = 63180, .min_x = 65, .max_x = 194}, + /* y = 244 */ {.offset = 63440, .min_x = 67, .max_x = 192}, + /* y = 245 */ {.offset = 63700, .min_x = 69, .max_x = 190}, + /* y = 246 */ {.offset = 63960, .min_x = 71, .max_x = 188}, + /* y = 247 */ {.offset = 64220, .min_x = 73, .max_x = 186}, + /* y = 248 */ {.offset = 64480, .min_x = 75, .max_x = 184}, + /* y = 249 */ {.offset = 64740, .min_x = 77, .max_x = 182}, + /* y = 250 */ {.offset = 65000, .min_x = 80, .max_x = 179}, + /* y = 251 */ {.offset = 65260, .min_x = 82, .max_x = 177}, + /* y = 252 */ {.offset = 65520, .min_x = 85, .max_x = 174}, + /* y = 253 */ {.offset = 65780, .min_x = 87, .max_x = 172}, + /* y = 254 */ {.offset = 66040, .min_x = 90, .max_x = 169}, + /* y = 255 */ {.offset = 66300, .min_x = 94, .max_x = 165}, + /* y = 256 */ {.offset = 66560, .min_x = 98, .max_x = 161}, /* y = 257 */ {.offset = 66820, .min_x = 102, .max_x = 157}, /* y = 258 */ {.offset = 67080, .min_x = 107, .max_x = 152}, /* y = 259 */ {.offset = 67340, .min_x = 113, .max_x = 146}, @@ -349,185 +349,185 @@ const void *const g_gbitmap_data_row_infos = (const GBitmapDataRowInfoInternal[] // # framebuffer row reads never access memory beyond the buffer // print("Circular Framebuffer has %d bytes" % (offset + topleft_mask[0])) -const void * const g_gbitmap_legacy_3x_data_row_infos = (const GBitmapDataRowInfoInternal[]) { - /* y = 0 */ {.offset = 0, .min_x = 76, .max_x = 103}, - /* y = 1 */ {.offset = 33, .min_x = 71, .max_x = 108}, - /* y = 2 */ {.offset = 76, .min_x = 66, .max_x = 113}, - /* y = 3 */ {.offset = 127, .min_x = 63, .max_x = 116}, - /* y = 4 */ {.offset = 184, .min_x = 60, .max_x = 119}, - /* y = 5 */ {.offset = 247, .min_x = 57, .max_x = 122}, - /* y = 6 */ {.offset = 315, .min_x = 55, .max_x = 124}, - /* y = 7 */ {.offset = 388, .min_x = 52, .max_x = 127}, - /* y = 8 */ {.offset = 466, .min_x = 50, .max_x = 129}, - /* y = 9 */ {.offset = 548, .min_x = 48, .max_x = 131}, - /* y = 10 */ {.offset = 634, .min_x = 46, .max_x = 133}, - /* y = 11 */ {.offset = 723, .min_x = 45, .max_x = 134}, - /* y = 12 */ {.offset = 815, .min_x = 43, .max_x = 136}, - /* y = 13 */ {.offset = 911, .min_x = 41, .max_x = 138}, - /* y = 14 */ {.offset = 1010, .min_x = 40, .max_x = 139}, - /* y = 15 */ {.offset = 1112, .min_x = 38, .max_x = 141}, - /* y = 16 */ {.offset = 1217, .min_x = 37, .max_x = 142}, - /* y = 17 */ {.offset = 1324, .min_x = 36, .max_x = 143}, - /* y = 18 */ {.offset = 1434, .min_x = 34, .max_x = 145}, - /* y = 19 */ {.offset = 1547, .min_x = 33, .max_x = 146}, - /* y = 20 */ {.offset = 1662, .min_x = 32, .max_x = 147}, - /* y = 21 */ {.offset = 1779, .min_x = 31, .max_x = 148}, - /* y = 22 */ {.offset = 1899, .min_x = 29, .max_x = 150}, - /* y = 23 */ {.offset = 2022, .min_x = 28, .max_x = 151}, - /* y = 24 */ {.offset = 2147, .min_x = 27, .max_x = 152}, - /* y = 25 */ {.offset = 2274, .min_x = 26, .max_x = 153}, - /* y = 26 */ {.offset = 2403, .min_x = 25, .max_x = 154}, - /* y = 27 */ {.offset = 2534, .min_x = 24, .max_x = 155}, - /* y = 28 */ {.offset = 2667, .min_x = 23, .max_x = 156}, - /* y = 29 */ {.offset = 2802, .min_x = 22, .max_x = 157}, - /* y = 30 */ {.offset = 2938, .min_x = 22, .max_x = 157}, - /* y = 31 */ {.offset = 3075, .min_x = 21, .max_x = 158}, - /* y = 32 */ {.offset = 3214, .min_x = 20, .max_x = 159}, - /* y = 33 */ {.offset = 3355, .min_x = 19, .max_x = 160}, - /* y = 34 */ {.offset = 3498, .min_x = 18, .max_x = 161}, - /* y = 35 */ {.offset = 3642, .min_x = 18, .max_x = 161}, - /* y = 36 */ {.offset = 3787, .min_x = 17, .max_x = 162}, - /* y = 37 */ {.offset = 3934, .min_x = 16, .max_x = 163}, - /* y = 38 */ {.offset = 4083, .min_x = 15, .max_x = 164}, - /* y = 39 */ {.offset = 4233, .min_x = 15, .max_x = 164}, - /* y = 40 */ {.offset = 4384, .min_x = 14, .max_x = 165}, - /* y = 41 */ {.offset = 4537, .min_x = 13, .max_x = 166}, - /* y = 42 */ {.offset = 4691, .min_x = 13, .max_x = 166}, - /* y = 43 */ {.offset = 4846, .min_x = 12, .max_x = 167}, - /* y = 44 */ {.offset = 5002, .min_x = 12, .max_x = 167}, - /* y = 45 */ {.offset = 5159, .min_x = 11, .max_x = 168}, - /* y = 46 */ {.offset = 5318, .min_x = 10, .max_x = 169}, - /* y = 47 */ {.offset = 5478, .min_x = 10, .max_x = 169}, - /* y = 48 */ {.offset = 5639, .min_x = 9, .max_x = 170}, - /* y = 49 */ {.offset = 5801, .min_x = 9, .max_x = 170}, - /* y = 50 */ {.offset = 5964, .min_x = 8, .max_x = 171}, - /* y = 51 */ {.offset = 6128, .min_x = 8, .max_x = 171}, - /* y = 52 */ {.offset = 6293, .min_x = 7, .max_x = 172}, - /* y = 53 */ {.offset = 6459, .min_x = 7, .max_x = 172}, - /* y = 54 */ {.offset = 6625, .min_x = 7, .max_x = 172}, - /* y = 55 */ {.offset = 6792, .min_x = 6, .max_x = 173}, - /* y = 56 */ {.offset = 6960, .min_x = 6, .max_x = 173}, - /* y = 57 */ {.offset = 7129, .min_x = 5, .max_x = 174}, - /* y = 58 */ {.offset = 7299, .min_x = 5, .max_x = 174}, - /* y = 59 */ {.offset = 7469, .min_x = 5, .max_x = 174}, - /* y = 60 */ {.offset = 7640, .min_x = 4, .max_x = 175}, - /* y = 61 */ {.offset = 7812, .min_x = 4, .max_x = 175}, - /* y = 62 */ {.offset = 7984, .min_x = 4, .max_x = 175}, - /* y = 63 */ {.offset = 8157, .min_x = 3, .max_x = 176}, - /* y = 64 */ {.offset = 8331, .min_x = 3, .max_x = 176}, - /* y = 65 */ {.offset = 8505, .min_x = 3, .max_x = 176}, - /* y = 66 */ {.offset = 8680, .min_x = 2, .max_x = 177}, - /* y = 67 */ {.offset = 8856, .min_x = 2, .max_x = 177}, - /* y = 68 */ {.offset = 9032, .min_x = 2, .max_x = 177}, - /* y = 69 */ {.offset = 9208, .min_x = 2, .max_x = 177}, - /* y = 70 */ {.offset = 9384, .min_x = 2, .max_x = 177}, - /* y = 71 */ {.offset = 9561, .min_x = 1, .max_x = 178}, - /* y = 72 */ {.offset = 9739, .min_x = 1, .max_x = 178}, - /* y = 73 */ {.offset = 9917, .min_x = 1, .max_x = 178}, - /* y = 74 */ {.offset = 10095, .min_x = 1, .max_x = 178}, - /* y = 75 */ {.offset = 10273, .min_x = 1, .max_x = 178}, - /* y = 76 */ {.offset = 10452, .min_x = 0, .max_x = 179}, - /* y = 77 */ {.offset = 10632, .min_x = 0, .max_x = 179}, - /* y = 78 */ {.offset = 10812, .min_x = 0, .max_x = 179}, - /* y = 79 */ {.offset = 10992, .min_x = 0, .max_x = 179}, - /* y = 80 */ {.offset = 11172, .min_x = 0, .max_x = 179}, - /* y = 81 */ {.offset = 11352, .min_x = 0, .max_x = 179}, - /* y = 82 */ {.offset = 11532, .min_x = 0, .max_x = 179}, - /* y = 83 */ {.offset = 11712, .min_x = 0, .max_x = 179}, - /* y = 84 */ {.offset = 11892, .min_x = 0, .max_x = 179}, - /* y = 85 */ {.offset = 12072, .min_x = 0, .max_x = 179}, - /* y = 86 */ {.offset = 12252, .min_x = 0, .max_x = 179}, - /* y = 87 */ {.offset = 12432, .min_x = 0, .max_x = 179}, - /* y = 88 */ {.offset = 12612, .min_x = 0, .max_x = 179}, - /* y = 89 */ {.offset = 12792, .min_x = 0, .max_x = 179}, - /* y = 90 */ {.offset = 12972, .min_x = 0, .max_x = 179}, - /* y = 91 */ {.offset = 13152, .min_x = 0, .max_x = 179}, - /* y = 92 */ {.offset = 13332, .min_x = 0, .max_x = 179}, - /* y = 93 */ {.offset = 13512, .min_x = 0, .max_x = 179}, - /* y = 94 */ {.offset = 13692, .min_x = 0, .max_x = 179}, - /* y = 95 */ {.offset = 13872, .min_x = 0, .max_x = 179}, - /* y = 96 */ {.offset = 14052, .min_x = 0, .max_x = 179}, - /* y = 97 */ {.offset = 14232, .min_x = 0, .max_x = 179}, - /* y = 98 */ {.offset = 14412, .min_x = 0, .max_x = 179}, - /* y = 99 */ {.offset = 14592, .min_x = 0, .max_x = 179}, - /* y = 100 */ {.offset = 14772, .min_x = 0, .max_x = 179}, - /* y = 101 */ {.offset = 14952, .min_x = 0, .max_x = 179}, - /* y = 102 */ {.offset = 15132, .min_x = 0, .max_x = 179}, - /* y = 103 */ {.offset = 15312, .min_x = 0, .max_x = 179}, - /* y = 104 */ {.offset = 15491, .min_x = 1, .max_x = 178}, - /* y = 105 */ {.offset = 15669, .min_x = 1, .max_x = 178}, - /* y = 106 */ {.offset = 15847, .min_x = 1, .max_x = 178}, - /* y = 107 */ {.offset = 16025, .min_x = 1, .max_x = 178}, - /* y = 108 */ {.offset = 16203, .min_x = 1, .max_x = 178}, - /* y = 109 */ {.offset = 16380, .min_x = 2, .max_x = 177}, - /* y = 110 */ {.offset = 16556, .min_x = 2, .max_x = 177}, - /* y = 111 */ {.offset = 16732, .min_x = 2, .max_x = 177}, - /* y = 112 */ {.offset = 16908, .min_x = 2, .max_x = 177}, - /* y = 113 */ {.offset = 17084, .min_x = 2, .max_x = 177}, - /* y = 114 */ {.offset = 17259, .min_x = 3, .max_x = 176}, - /* y = 115 */ {.offset = 17433, .min_x = 3, .max_x = 176}, - /* y = 116 */ {.offset = 17607, .min_x = 3, .max_x = 176}, - /* y = 117 */ {.offset = 17780, .min_x = 4, .max_x = 175}, - /* y = 118 */ {.offset = 17952, .min_x = 4, .max_x = 175}, - /* y = 119 */ {.offset = 18124, .min_x = 4, .max_x = 175}, - /* y = 120 */ {.offset = 18295, .min_x = 5, .max_x = 174}, - /* y = 121 */ {.offset = 18465, .min_x = 5, .max_x = 174}, - /* y = 122 */ {.offset = 18635, .min_x = 5, .max_x = 174}, - /* y = 123 */ {.offset = 18804, .min_x = 6, .max_x = 173}, - /* y = 124 */ {.offset = 18972, .min_x = 6, .max_x = 173}, - /* y = 125 */ {.offset = 19139, .min_x = 7, .max_x = 172}, - /* y = 126 */ {.offset = 19305, .min_x = 7, .max_x = 172}, - /* y = 127 */ {.offset = 19471, .min_x = 7, .max_x = 172}, - /* y = 128 */ {.offset = 19636, .min_x = 8, .max_x = 171}, - /* y = 129 */ {.offset = 19800, .min_x = 8, .max_x = 171}, - /* y = 130 */ {.offset = 19963, .min_x = 9, .max_x = 170}, - /* y = 131 */ {.offset = 20125, .min_x = 9, .max_x = 170}, - /* y = 132 */ {.offset = 20286, .min_x = 10, .max_x = 169}, - /* y = 133 */ {.offset = 20446, .min_x = 10, .max_x = 169}, - /* y = 134 */ {.offset = 20605, .min_x = 11, .max_x = 168}, - /* y = 135 */ {.offset = 20762, .min_x = 12, .max_x = 167}, - /* y = 136 */ {.offset = 20918, .min_x = 12, .max_x = 167}, - /* y = 137 */ {.offset = 21073, .min_x = 13, .max_x = 166}, - /* y = 138 */ {.offset = 21227, .min_x = 13, .max_x = 166}, - /* y = 139 */ {.offset = 21380, .min_x = 14, .max_x = 165}, - /* y = 140 */ {.offset = 21531, .min_x = 15, .max_x = 164}, - /* y = 141 */ {.offset = 21681, .min_x = 15, .max_x = 164}, - /* y = 142 */ {.offset = 21830, .min_x = 16, .max_x = 163}, - /* y = 143 */ {.offset = 21977, .min_x = 17, .max_x = 162}, - /* y = 144 */ {.offset = 22122, .min_x = 18, .max_x = 161}, - /* y = 145 */ {.offset = 22266, .min_x = 18, .max_x = 161}, - /* y = 146 */ {.offset = 22409, .min_x = 19, .max_x = 160}, - /* y = 147 */ {.offset = 22550, .min_x = 20, .max_x = 159}, - /* y = 148 */ {.offset = 22689, .min_x = 21, .max_x = 158}, - /* y = 149 */ {.offset = 22826, .min_x = 22, .max_x = 157}, - /* y = 150 */ {.offset = 22962, .min_x = 22, .max_x = 157}, - /* y = 151 */ {.offset = 23097, .min_x = 23, .max_x = 156}, - /* y = 152 */ {.offset = 23230, .min_x = 24, .max_x = 155}, - /* y = 153 */ {.offset = 23361, .min_x = 25, .max_x = 154}, - /* y = 154 */ {.offset = 23490, .min_x = 26, .max_x = 153}, - /* y = 155 */ {.offset = 23617, .min_x = 27, .max_x = 152}, - /* y = 156 */ {.offset = 23742, .min_x = 28, .max_x = 151}, - /* y = 157 */ {.offset = 23865, .min_x = 29, .max_x = 150}, - /* y = 158 */ {.offset = 23985, .min_x = 31, .max_x = 148}, - /* y = 159 */ {.offset = 24102, .min_x = 32, .max_x = 147}, - /* y = 160 */ {.offset = 24217, .min_x = 33, .max_x = 146}, - /* y = 161 */ {.offset = 24330, .min_x = 34, .max_x = 145}, - /* y = 162 */ {.offset = 24440, .min_x = 36, .max_x = 143}, - /* y = 163 */ {.offset = 24547, .min_x = 37, .max_x = 142}, - /* y = 164 */ {.offset = 24652, .min_x = 38, .max_x = 141}, - /* y = 165 */ {.offset = 24754, .min_x = 40, .max_x = 139}, - /* y = 166 */ {.offset = 24853, .min_x = 41, .max_x = 138}, - /* y = 167 */ {.offset = 24949, .min_x = 43, .max_x = 136}, - /* y = 168 */ {.offset = 25041, .min_x = 45, .max_x = 134}, - /* y = 169 */ {.offset = 25130, .min_x = 46, .max_x = 133}, - /* y = 170 */ {.offset = 25216, .min_x = 48, .max_x = 131}, - /* y = 171 */ {.offset = 25298, .min_x = 50, .max_x = 129}, - /* y = 172 */ {.offset = 25376, .min_x = 52, .max_x = 127}, - /* y = 173 */ {.offset = 25449, .min_x = 55, .max_x = 124}, - /* y = 174 */ {.offset = 25517, .min_x = 57, .max_x = 122}, - /* y = 175 */ {.offset = 25580, .min_x = 60, .max_x = 119}, - /* y = 176 */ {.offset = 25637, .min_x = 63, .max_x = 116}, - /* y = 177 */ {.offset = 25688, .min_x = 66, .max_x = 113}, - /* y = 178 */ {.offset = 25731, .min_x = 71, .max_x = 108}, - /* y = 179 */ {.offset = 25764, .min_x = 76, .max_x = 103}, +const void *const g_gbitmap_legacy_3x_data_row_infos = (const GBitmapDataRowInfoInternal[]){ + /* y = 0 */ {.offset = 0, .min_x = 76, .max_x = 103}, + /* y = 1 */ {.offset = 33, .min_x = 71, .max_x = 108}, + /* y = 2 */ {.offset = 76, .min_x = 66, .max_x = 113}, + /* y = 3 */ {.offset = 127, .min_x = 63, .max_x = 116}, + /* y = 4 */ {.offset = 184, .min_x = 60, .max_x = 119}, + /* y = 5 */ {.offset = 247, .min_x = 57, .max_x = 122}, + /* y = 6 */ {.offset = 315, .min_x = 55, .max_x = 124}, + /* y = 7 */ {.offset = 388, .min_x = 52, .max_x = 127}, + /* y = 8 */ {.offset = 466, .min_x = 50, .max_x = 129}, + /* y = 9 */ {.offset = 548, .min_x = 48, .max_x = 131}, + /* y = 10 */ {.offset = 634, .min_x = 46, .max_x = 133}, + /* y = 11 */ {.offset = 723, .min_x = 45, .max_x = 134}, + /* y = 12 */ {.offset = 815, .min_x = 43, .max_x = 136}, + /* y = 13 */ {.offset = 911, .min_x = 41, .max_x = 138}, + /* y = 14 */ {.offset = 1010, .min_x = 40, .max_x = 139}, + /* y = 15 */ {.offset = 1112, .min_x = 38, .max_x = 141}, + /* y = 16 */ {.offset = 1217, .min_x = 37, .max_x = 142}, + /* y = 17 */ {.offset = 1324, .min_x = 36, .max_x = 143}, + /* y = 18 */ {.offset = 1434, .min_x = 34, .max_x = 145}, + /* y = 19 */ {.offset = 1547, .min_x = 33, .max_x = 146}, + /* y = 20 */ {.offset = 1662, .min_x = 32, .max_x = 147}, + /* y = 21 */ {.offset = 1779, .min_x = 31, .max_x = 148}, + /* y = 22 */ {.offset = 1899, .min_x = 29, .max_x = 150}, + /* y = 23 */ {.offset = 2022, .min_x = 28, .max_x = 151}, + /* y = 24 */ {.offset = 2147, .min_x = 27, .max_x = 152}, + /* y = 25 */ {.offset = 2274, .min_x = 26, .max_x = 153}, + /* y = 26 */ {.offset = 2403, .min_x = 25, .max_x = 154}, + /* y = 27 */ {.offset = 2534, .min_x = 24, .max_x = 155}, + /* y = 28 */ {.offset = 2667, .min_x = 23, .max_x = 156}, + /* y = 29 */ {.offset = 2802, .min_x = 22, .max_x = 157}, + /* y = 30 */ {.offset = 2938, .min_x = 22, .max_x = 157}, + /* y = 31 */ {.offset = 3075, .min_x = 21, .max_x = 158}, + /* y = 32 */ {.offset = 3214, .min_x = 20, .max_x = 159}, + /* y = 33 */ {.offset = 3355, .min_x = 19, .max_x = 160}, + /* y = 34 */ {.offset = 3498, .min_x = 18, .max_x = 161}, + /* y = 35 */ {.offset = 3642, .min_x = 18, .max_x = 161}, + /* y = 36 */ {.offset = 3787, .min_x = 17, .max_x = 162}, + /* y = 37 */ {.offset = 3934, .min_x = 16, .max_x = 163}, + /* y = 38 */ {.offset = 4083, .min_x = 15, .max_x = 164}, + /* y = 39 */ {.offset = 4233, .min_x = 15, .max_x = 164}, + /* y = 40 */ {.offset = 4384, .min_x = 14, .max_x = 165}, + /* y = 41 */ {.offset = 4537, .min_x = 13, .max_x = 166}, + /* y = 42 */ {.offset = 4691, .min_x = 13, .max_x = 166}, + /* y = 43 */ {.offset = 4846, .min_x = 12, .max_x = 167}, + /* y = 44 */ {.offset = 5002, .min_x = 12, .max_x = 167}, + /* y = 45 */ {.offset = 5159, .min_x = 11, .max_x = 168}, + /* y = 46 */ {.offset = 5318, .min_x = 10, .max_x = 169}, + /* y = 47 */ {.offset = 5478, .min_x = 10, .max_x = 169}, + /* y = 48 */ {.offset = 5639, .min_x = 9, .max_x = 170}, + /* y = 49 */ {.offset = 5801, .min_x = 9, .max_x = 170}, + /* y = 50 */ {.offset = 5964, .min_x = 8, .max_x = 171}, + /* y = 51 */ {.offset = 6128, .min_x = 8, .max_x = 171}, + /* y = 52 */ {.offset = 6293, .min_x = 7, .max_x = 172}, + /* y = 53 */ {.offset = 6459, .min_x = 7, .max_x = 172}, + /* y = 54 */ {.offset = 6625, .min_x = 7, .max_x = 172}, + /* y = 55 */ {.offset = 6792, .min_x = 6, .max_x = 173}, + /* y = 56 */ {.offset = 6960, .min_x = 6, .max_x = 173}, + /* y = 57 */ {.offset = 7129, .min_x = 5, .max_x = 174}, + /* y = 58 */ {.offset = 7299, .min_x = 5, .max_x = 174}, + /* y = 59 */ {.offset = 7469, .min_x = 5, .max_x = 174}, + /* y = 60 */ {.offset = 7640, .min_x = 4, .max_x = 175}, + /* y = 61 */ {.offset = 7812, .min_x = 4, .max_x = 175}, + /* y = 62 */ {.offset = 7984, .min_x = 4, .max_x = 175}, + /* y = 63 */ {.offset = 8157, .min_x = 3, .max_x = 176}, + /* y = 64 */ {.offset = 8331, .min_x = 3, .max_x = 176}, + /* y = 65 */ {.offset = 8505, .min_x = 3, .max_x = 176}, + /* y = 66 */ {.offset = 8680, .min_x = 2, .max_x = 177}, + /* y = 67 */ {.offset = 8856, .min_x = 2, .max_x = 177}, + /* y = 68 */ {.offset = 9032, .min_x = 2, .max_x = 177}, + /* y = 69 */ {.offset = 9208, .min_x = 2, .max_x = 177}, + /* y = 70 */ {.offset = 9384, .min_x = 2, .max_x = 177}, + /* y = 71 */ {.offset = 9561, .min_x = 1, .max_x = 178}, + /* y = 72 */ {.offset = 9739, .min_x = 1, .max_x = 178}, + /* y = 73 */ {.offset = 9917, .min_x = 1, .max_x = 178}, + /* y = 74 */ {.offset = 10095, .min_x = 1, .max_x = 178}, + /* y = 75 */ {.offset = 10273, .min_x = 1, .max_x = 178}, + /* y = 76 */ {.offset = 10452, .min_x = 0, .max_x = 179}, + /* y = 77 */ {.offset = 10632, .min_x = 0, .max_x = 179}, + /* y = 78 */ {.offset = 10812, .min_x = 0, .max_x = 179}, + /* y = 79 */ {.offset = 10992, .min_x = 0, .max_x = 179}, + /* y = 80 */ {.offset = 11172, .min_x = 0, .max_x = 179}, + /* y = 81 */ {.offset = 11352, .min_x = 0, .max_x = 179}, + /* y = 82 */ {.offset = 11532, .min_x = 0, .max_x = 179}, + /* y = 83 */ {.offset = 11712, .min_x = 0, .max_x = 179}, + /* y = 84 */ {.offset = 11892, .min_x = 0, .max_x = 179}, + /* y = 85 */ {.offset = 12072, .min_x = 0, .max_x = 179}, + /* y = 86 */ {.offset = 12252, .min_x = 0, .max_x = 179}, + /* y = 87 */ {.offset = 12432, .min_x = 0, .max_x = 179}, + /* y = 88 */ {.offset = 12612, .min_x = 0, .max_x = 179}, + /* y = 89 */ {.offset = 12792, .min_x = 0, .max_x = 179}, + /* y = 90 */ {.offset = 12972, .min_x = 0, .max_x = 179}, + /* y = 91 */ {.offset = 13152, .min_x = 0, .max_x = 179}, + /* y = 92 */ {.offset = 13332, .min_x = 0, .max_x = 179}, + /* y = 93 */ {.offset = 13512, .min_x = 0, .max_x = 179}, + /* y = 94 */ {.offset = 13692, .min_x = 0, .max_x = 179}, + /* y = 95 */ {.offset = 13872, .min_x = 0, .max_x = 179}, + /* y = 96 */ {.offset = 14052, .min_x = 0, .max_x = 179}, + /* y = 97 */ {.offset = 14232, .min_x = 0, .max_x = 179}, + /* y = 98 */ {.offset = 14412, .min_x = 0, .max_x = 179}, + /* y = 99 */ {.offset = 14592, .min_x = 0, .max_x = 179}, + /* y = 100 */ {.offset = 14772, .min_x = 0, .max_x = 179}, + /* y = 101 */ {.offset = 14952, .min_x = 0, .max_x = 179}, + /* y = 102 */ {.offset = 15132, .min_x = 0, .max_x = 179}, + /* y = 103 */ {.offset = 15312, .min_x = 0, .max_x = 179}, + /* y = 104 */ {.offset = 15491, .min_x = 1, .max_x = 178}, + /* y = 105 */ {.offset = 15669, .min_x = 1, .max_x = 178}, + /* y = 106 */ {.offset = 15847, .min_x = 1, .max_x = 178}, + /* y = 107 */ {.offset = 16025, .min_x = 1, .max_x = 178}, + /* y = 108 */ {.offset = 16203, .min_x = 1, .max_x = 178}, + /* y = 109 */ {.offset = 16380, .min_x = 2, .max_x = 177}, + /* y = 110 */ {.offset = 16556, .min_x = 2, .max_x = 177}, + /* y = 111 */ {.offset = 16732, .min_x = 2, .max_x = 177}, + /* y = 112 */ {.offset = 16908, .min_x = 2, .max_x = 177}, + /* y = 113 */ {.offset = 17084, .min_x = 2, .max_x = 177}, + /* y = 114 */ {.offset = 17259, .min_x = 3, .max_x = 176}, + /* y = 115 */ {.offset = 17433, .min_x = 3, .max_x = 176}, + /* y = 116 */ {.offset = 17607, .min_x = 3, .max_x = 176}, + /* y = 117 */ {.offset = 17780, .min_x = 4, .max_x = 175}, + /* y = 118 */ {.offset = 17952, .min_x = 4, .max_x = 175}, + /* y = 119 */ {.offset = 18124, .min_x = 4, .max_x = 175}, + /* y = 120 */ {.offset = 18295, .min_x = 5, .max_x = 174}, + /* y = 121 */ {.offset = 18465, .min_x = 5, .max_x = 174}, + /* y = 122 */ {.offset = 18635, .min_x = 5, .max_x = 174}, + /* y = 123 */ {.offset = 18804, .min_x = 6, .max_x = 173}, + /* y = 124 */ {.offset = 18972, .min_x = 6, .max_x = 173}, + /* y = 125 */ {.offset = 19139, .min_x = 7, .max_x = 172}, + /* y = 126 */ {.offset = 19305, .min_x = 7, .max_x = 172}, + /* y = 127 */ {.offset = 19471, .min_x = 7, .max_x = 172}, + /* y = 128 */ {.offset = 19636, .min_x = 8, .max_x = 171}, + /* y = 129 */ {.offset = 19800, .min_x = 8, .max_x = 171}, + /* y = 130 */ {.offset = 19963, .min_x = 9, .max_x = 170}, + /* y = 131 */ {.offset = 20125, .min_x = 9, .max_x = 170}, + /* y = 132 */ {.offset = 20286, .min_x = 10, .max_x = 169}, + /* y = 133 */ {.offset = 20446, .min_x = 10, .max_x = 169}, + /* y = 134 */ {.offset = 20605, .min_x = 11, .max_x = 168}, + /* y = 135 */ {.offset = 20762, .min_x = 12, .max_x = 167}, + /* y = 136 */ {.offset = 20918, .min_x = 12, .max_x = 167}, + /* y = 137 */ {.offset = 21073, .min_x = 13, .max_x = 166}, + /* y = 138 */ {.offset = 21227, .min_x = 13, .max_x = 166}, + /* y = 139 */ {.offset = 21380, .min_x = 14, .max_x = 165}, + /* y = 140 */ {.offset = 21531, .min_x = 15, .max_x = 164}, + /* y = 141 */ {.offset = 21681, .min_x = 15, .max_x = 164}, + /* y = 142 */ {.offset = 21830, .min_x = 16, .max_x = 163}, + /* y = 143 */ {.offset = 21977, .min_x = 17, .max_x = 162}, + /* y = 144 */ {.offset = 22122, .min_x = 18, .max_x = 161}, + /* y = 145 */ {.offset = 22266, .min_x = 18, .max_x = 161}, + /* y = 146 */ {.offset = 22409, .min_x = 19, .max_x = 160}, + /* y = 147 */ {.offset = 22550, .min_x = 20, .max_x = 159}, + /* y = 148 */ {.offset = 22689, .min_x = 21, .max_x = 158}, + /* y = 149 */ {.offset = 22826, .min_x = 22, .max_x = 157}, + /* y = 150 */ {.offset = 22962, .min_x = 22, .max_x = 157}, + /* y = 151 */ {.offset = 23097, .min_x = 23, .max_x = 156}, + /* y = 152 */ {.offset = 23230, .min_x = 24, .max_x = 155}, + /* y = 153 */ {.offset = 23361, .min_x = 25, .max_x = 154}, + /* y = 154 */ {.offset = 23490, .min_x = 26, .max_x = 153}, + /* y = 155 */ {.offset = 23617, .min_x = 27, .max_x = 152}, + /* y = 156 */ {.offset = 23742, .min_x = 28, .max_x = 151}, + /* y = 157 */ {.offset = 23865, .min_x = 29, .max_x = 150}, + /* y = 158 */ {.offset = 23985, .min_x = 31, .max_x = 148}, + /* y = 159 */ {.offset = 24102, .min_x = 32, .max_x = 147}, + /* y = 160 */ {.offset = 24217, .min_x = 33, .max_x = 146}, + /* y = 161 */ {.offset = 24330, .min_x = 34, .max_x = 145}, + /* y = 162 */ {.offset = 24440, .min_x = 36, .max_x = 143}, + /* y = 163 */ {.offset = 24547, .min_x = 37, .max_x = 142}, + /* y = 164 */ {.offset = 24652, .min_x = 38, .max_x = 141}, + /* y = 165 */ {.offset = 24754, .min_x = 40, .max_x = 139}, + /* y = 166 */ {.offset = 24853, .min_x = 41, .max_x = 138}, + /* y = 167 */ {.offset = 24949, .min_x = 43, .max_x = 136}, + /* y = 168 */ {.offset = 25041, .min_x = 45, .max_x = 134}, + /* y = 169 */ {.offset = 25130, .min_x = 46, .max_x = 133}, + /* y = 170 */ {.offset = 25216, .min_x = 48, .max_x = 131}, + /* y = 171 */ {.offset = 25298, .min_x = 50, .max_x = 129}, + /* y = 172 */ {.offset = 25376, .min_x = 52, .max_x = 127}, + /* y = 173 */ {.offset = 25449, .min_x = 55, .max_x = 124}, + /* y = 174 */ {.offset = 25517, .min_x = 57, .max_x = 122}, + /* y = 175 */ {.offset = 25580, .min_x = 60, .max_x = 119}, + /* y = 176 */ {.offset = 25637, .min_x = 63, .max_x = 116}, + /* y = 177 */ {.offset = 25688, .min_x = 66, .max_x = 113}, + /* y = 178 */ {.offset = 25731, .min_x = 71, .max_x = 108}, + /* y = 179 */ {.offset = 25764, .min_x = 76, .max_x = 103}, }; diff --git a/src/fw/board/displays/display_getafix.h b/src/fw/board/displays/display_getafix.h index 4928ae6257..c91f6126fc 100644 --- a/src/fw/board/displays/display_getafix.h +++ b/src/fw/board/displays/display_getafix.h @@ -27,5 +27,5 @@ // This uses more memory than circular (67600 vs 53786) but saves the separate display buffer #define DISPLAY_FRAMEBUFFER_BYTES (PBL_DISPLAY_WIDTH * PBL_DISPLAY_HEIGHT) -extern const void * const g_gbitmap_data_row_infos; -extern const void * const g_gbitmap_legacy_3x_data_row_infos; \ No newline at end of file +extern const void *const g_gbitmap_data_row_infos; +extern const void *const g_gbitmap_legacy_3x_data_row_infos; \ No newline at end of file diff --git a/src/fw/board/displays/display_qemu_flint.h b/src/fw/board/displays/display_qemu_flint.h index 6da718d93c..7715de4759 100644 --- a/src/fw/board/displays/display_qemu_flint.h +++ b/src/fw/board/displays/display_qemu_flint.h @@ -23,4 +23,4 @@ #define LEGACY_3X_DISP_ROWS PBL_DISPLAY_HEIGHT #define DISPLAY_FRAMEBUFFER_BYTES \ - (ROUND_TO_MOD_CEIL(PBL_DISPLAY_WIDTH, 32) / 8 * PBL_DISPLAY_HEIGHT) + (ROUND_TO_MOD_CEIL(PBL_DISPLAY_WIDTH, 32) / 8 * PBL_DISPLAY_HEIGHT) diff --git a/src/fw/board/displays/display_qemu_gabbro.h b/src/fw/board/displays/display_qemu_gabbro.h index ec44415f4c..4525517993 100644 --- a/src/fw/board/displays/display_qemu_gabbro.h +++ b/src/fw/board/displays/display_qemu_gabbro.h @@ -24,5 +24,5 @@ #define DISPLAY_FRAMEBUFFER_BYTES (PBL_DISPLAY_WIDTH * PBL_DISPLAY_HEIGHT) -extern const void * const g_gbitmap_data_row_infos; -extern const void * const g_gbitmap_legacy_3x_data_row_infos; +extern const void *const g_gbitmap_data_row_infos; +extern const void *const g_gbitmap_legacy_3x_data_row_infos; diff --git a/src/fw/board/splash.h b/src/fw/board/splash.h index 81590e95bf..92fdb9181d 100644 --- a/src/fw/board/splash.h +++ b/src/fw/board/splash.h @@ -3,7 +3,8 @@ #pragma once -#if defined(CONFIG_BOARD_OBELIX_DVT) || defined(CONFIG_BOARD_OBELIX_PVT) || defined(CONFIG_BOARD_OBELIX_BB2) +#if defined(CONFIG_BOARD_OBELIX_DVT) || defined(CONFIG_BOARD_OBELIX_PVT) || \ + defined(CONFIG_BOARD_OBELIX_BB2) #include "splash/splash_obelix.xbm" #elif defined(CONFIG_BOARD_GETAFIX_DVT) || defined(CONFIG_BOARD_GETAFIX_DVT2) #include "splash/splash_getafix.xbm" @@ -15,4 +16,4 @@ #include "splash/splash_obelix.xbm" #else #error "Unknown splash definition for board" -#endif // BOARD_* +#endif // BOARD_* diff --git a/src/fw/comm/ble/gap_le_advert.c b/src/fw/comm/ble/gap_le_advert.c index b45d02254a..9db885e061 100644 --- a/src/fw/comm/ble/gap_le_advert.c +++ b/src/fw/comm/ble/gap_le_advert.c @@ -51,8 +51,8 @@ PBL_LOG_MODULE_DECLARE(bt, CONFIG_BT_LOG_LEVEL); // Advertising interval parameters in ms, indexed by GAPLEAdvertisingInterval. // Values comply with Apple Accessory Design Guidelines. static const uint32_t s_interval_ms[] = { - [GAPLEAdvertisingInterval_Short] = 20, // 20ms - [GAPLEAdvertisingInterval_Long] = 1022, // 1022.5ms (truncated to ms) + [GAPLEAdvertisingInterval_Short] = 20, // 20ms + [GAPLEAdvertisingInterval_Long] = 1022, // 1022.5ms (truncated to ms) }; typedef struct GAPLEAdvertisingJob { @@ -71,7 +71,7 @@ typedef struct GAPLEAdvertisingJob { //! The terms are run in the order that they appear in this array GAPLEAdvertisingJobTerm *terms; - GAPLEAdvertisingJobTag tag:8; + GAPLEAdvertisingJobTag tag : 8; //! The advertisement and scan response data BLEAdData payload; @@ -131,11 +131,14 @@ static void prv_analytics_start_timer(GAPLEAdvertisingInterval interval) { // ----------------------------------------------------------------------------- -static const char * prv_string_for_debug_tag(GAPLEAdvertisingJobTag tag) { +static const char *prv_string_for_debug_tag(GAPLEAdvertisingJobTag tag) { switch (tag) { - case GAPLEAdvertisingJobTagDiscovery: return "DIS"; - case GAPLEAdvertisingJobTagReconnection: return "RCN"; - default: return "?"; + case GAPLEAdvertisingJobTagDiscovery: + return "DIS"; + case GAPLEAdvertisingJobTagReconnection: + return "RCN"; + default: + return "?"; } } @@ -167,7 +170,7 @@ static void prv_unlink_job(GAPLEAdvertisingJob *job) { job->node.prev = NULL; s_jobs = NULL; } else { - list_remove(&job->node, (ListNode **) &s_jobs, NULL); + list_remove(&job->node, (ListNode **)&s_jobs, NULL); } } @@ -179,7 +182,7 @@ static bool prv_is_registered_job(const GAPLEAdvertisingJob *job) { // Search jobs (can't use list_contains(), because circular): ListNode *node = &s_jobs->node; while (node) { - if (node == (const ListNode *) job) { + if (node == (const ListNode *)job) { return true; } node = node->next; @@ -206,14 +209,13 @@ static void prv_increment_elapsed_time_for_job(GAPLEAdvertisingJob **job_ptr, bo if (job->cur_term < job->num_terms) { // Take care of GAPLE_ADVERTISING_DURATION_LOOP_AROUND: if (job->terms[job->cur_term].duration_secs == GAPLE_ADVERTISING_DURATION_LOOP_AROUND) { - PBL_LOG_DBG("Job looped around to term %"PRIu16, + PBL_LOG_DBG("Job looped around to term %" PRIu16, job->terms[job->cur_term].loop_around_index); job->cur_term = job->terms[job->cur_term].loop_around_index; } job->term_time_elapsed_secs = 0; - PBL_LOG_DBG("Job is performing next advertising term (%d/%d)", - job->cur_term, job->num_terms); + PBL_LOG_DBG("Job is performing next advertising term (%d/%d)", job->cur_term, job->num_terms); // force an update to make sure the new requested term takes if (has_new_term) { *has_new_term = true; @@ -229,8 +231,7 @@ static void prv_increment_elapsed_time_for_job(GAPLEAdvertisingJob **job_ptr, bo job->unscheduled_callback(job, true /* completed */, job->unscheduled_callback_data); } - PBL_LOG_DBG("Unscheduled advertising completed job: %s", - prv_string_for_debug_tag(job->tag)); + PBL_LOG_DBG("Unscheduled advertising completed job: %s", prv_string_for_debug_tag(job->tag)); kernel_free(job->terms); kernel_free(job); *job_ptr = NULL; @@ -263,7 +264,7 @@ static void prv_cycle_kernelmain_cb(void *unused) { GAPLEAdvertisingJob *job = s_current; // Set to next job (round-robin) - s_jobs = (GAPLEAdvertisingJob *) job->node.next; + s_jobs = (GAPLEAdvertisingJob *)job->node.next; prv_increment_elapsed_time_for_job(&job, &force_update); @@ -356,7 +357,7 @@ static void prv_perform_next_job(bool force_refresh) { const uint32_t min_interval_ms = s_interval_ms[interval]; const uint32_t max_interval_ms = s_interval_ms[interval]; - PBL_LOG_DBG("Enable Ad job %s", prv_string_for_debug_tag(next->tag)); + PBL_LOG_DBG("Enable Ad job %s", prv_string_for_debug_tag(next->tag)); bool result = bt_driver_advert_advertising_enable(min_interval_ms, max_interval_ms); if (result) { s_is_advertising = true; @@ -370,14 +371,12 @@ static void prv_perform_next_job(bool force_refresh) { // ----------------------------------------------------------------------------- GAPLEAdvertisingJobRef gap_le_advert_schedule(const BLEAdData *payload, - const GAPLEAdvertisingJobTerm *terms, - uint8_t num_terms, - GAPLEAdvertisingJobUnscheduleCallback callback, - void *callback_data, - GAPLEAdvertisingJobTag tag) { + const GAPLEAdvertisingJobTerm *terms, + uint8_t num_terms, + GAPLEAdvertisingJobUnscheduleCallback callback, + void *callback_data, GAPLEAdvertisingJobTag tag) { // Sanity check payload: - if (!payload || - payload->ad_data_length > GAP_LE_AD_REPORT_DATA_MAX_LENGTH || + if (!payload || payload->ad_data_length > GAP_LE_AD_REPORT_DATA_MAX_LENGTH || payload->scan_resp_data_length > GAP_LE_AD_REPORT_DATA_MAX_LENGTH) { return NULL; } @@ -400,20 +399,19 @@ GAPLEAdvertisingJobRef gap_le_advert_schedule(const BLEAdData *payload, } // Create the job data structure: - GAPLEAdvertisingJob *job = kernel_malloc_check(sizeof(GAPLEAdvertisingJob) + - payload->ad_data_length + - payload->scan_resp_data_length); - - *job = (const GAPLEAdvertisingJob) { - .unscheduled_callback = callback, - .unscheduled_callback_data = callback_data, - .term_time_elapsed_secs = 0, - .num_terms = num_terms, - .tag = tag, - .payload = { - .ad_data_length = payload->ad_data_length, - .scan_resp_data_length = payload->scan_resp_data_length, - }, + GAPLEAdvertisingJob *job = kernel_malloc_check( + sizeof(GAPLEAdvertisingJob) + payload->ad_data_length + payload->scan_resp_data_length); + + *job = (const GAPLEAdvertisingJob){ + .unscheduled_callback = callback, + .unscheduled_callback_data = callback_data, + .term_time_elapsed_secs = 0, + .num_terms = num_terms, + .tag = tag, + .payload = { + .ad_data_length = payload->ad_data_length, + .scan_resp_data_length = payload->scan_resp_data_length, + }, }; job->terms = kernel_malloc_check(sizeof(GAPLEAdvertisingJobTerm) * num_terms); @@ -423,8 +421,7 @@ GAPLEAdvertisingJobRef gap_le_advert_schedule(const BLEAdData *payload, memcpy(job->payload.data, payload->data, payload->ad_data_length + payload->scan_resp_data_length); - PBL_LOG_INFO("Scheduling advertising job: %s", - prv_string_for_debug_tag(job->tag)); + PBL_LOG_INFO("Scheduling advertising job: %s", prv_string_for_debug_tag(job->tag)); // Schedule bt_lock(); @@ -460,16 +457,14 @@ void gap_le_advert_unschedule(GAPLEAdvertisingJobRef job) { is_registered = prv_is_registered_job(job); if (is_registered) { - PBL_LOG_INFO("Unscheduling advertising job: %s", - prv_string_for_debug_tag(job->tag)); + PBL_LOG_INFO("Unscheduling advertising job: %s", prv_string_for_debug_tag(job->tag)); prv_unlink_job(job); prv_perform_next_job(false); // Call the unscheduled callback: if (job->unscheduled_callback) { - job->unscheduled_callback(job, false /* completed */, - job->unscheduled_callback_data); + job->unscheduled_callback(job, false /* completed */, job->unscheduled_callback_data); } // In case the payload pointer of a future jobs ends up being the same, ensure the adv data @@ -488,8 +483,7 @@ void gap_le_advert_unschedule(GAPLEAdvertisingJobRef job) { } } -void gap_le_advert_unschedule_job_types( - GAPLEAdvertisingJobTag *tag_types, size_t num_types) { +void gap_le_advert_unschedule_job_types(GAPLEAdvertisingJobTag *tag_types, size_t num_types) { bt_lock(); ListNode *first_node = &s_current->node; @@ -507,14 +501,13 @@ void gap_le_advert_unschedule_job_types( for (size_t i = 0; i < num_types; i++) { if (job->tag == tag_types[i]) { - PBL_LOG_DBG("Removing advertisement of type %s", - prv_string_for_debug_tag(job->tag)); + PBL_LOG_DBG("Removing advertisement of type %s", prv_string_for_debug_tag(job->tag)); gap_le_advert_unschedule(job); } } if (curr_node == first_node) { - break; // we have cycled through all the jobs + break; // we have cycled through all the jobs } curr_node = prev_node; @@ -551,8 +544,8 @@ void gap_le_advert_init(void) { s_jobs = NULL; s_current = NULL; s_current_ad_data = NULL; - s_cycle_regular_timer = (const RegularTimerInfo) { - .cb = prv_cycle_timer_callback, + s_cycle_regular_timer = (const RegularTimerInfo){ + .cb = prv_cycle_timer_callback, }; s_is_advertising = false; diff --git a/src/fw/comm/ble/gap_le_advert.h b/src/fw/comm/ble/gap_le_advert.h index 355fcbb11a..4ee4dbbec9 100644 --- a/src/fw/comm/ble/gap_le_advert.h +++ b/src/fw/comm/ble/gap_le_advert.h @@ -21,7 +21,7 @@ typedef enum { struct GAPLEAdvertisingJob; //! Opaque reference to an advertising job. -typedef struct GAPLEAdvertisingJob * GAPLEAdvertisingJobRef; +typedef struct GAPLEAdvertisingJob *GAPLEAdvertisingJobRef; // Each GAPLEAdvertisingJob consists of 1 or more term. typedef struct GAPLEAdvertisingJobTerm { @@ -54,17 +54,16 @@ typedef struct GAPLEAdvertisingJobTerm { //! unscheduled using gap_le_advert_unschedule() or gap_le_advert_deinit()). //! For infinite jobs, the value will always be false when unscheduled. //! @param cb_data Pointer to client data as passed into gap_le_advert_schedule -typedef void (*GAPLEAdvertisingJobUnscheduleCallback)(GAPLEAdvertisingJobRef job, - bool completed, +typedef void (*GAPLEAdvertisingJobUnscheduleCallback)(GAPLEAdvertisingJobRef job, bool completed, void *cb_data); //! Constant to use with gap_le_advert_schedule to schedule an advertisement job //! with infinite duration. -#define GAPLE_ADVERTISING_DURATION_INFINITE ((uint16_t) ~0) +#define GAPLE_ADVERTISING_DURATION_INFINITE ((uint16_t)~0) //! Constant to use with gap_le_advert_schedule to indicate that the job //! scheduler should loop back to the first term. -#define GAPLE_ADVERTISING_DURATION_LOOP_AROUND ((uint16_t) 0) +#define GAPLE_ADVERTISING_DURATION_LOOP_AROUND ((uint16_t)0) //! Schedules an advertisement & scan response job. //! Based on the given minimum and maximum interval values, an interval is @@ -93,11 +92,10 @@ typedef void (*GAPLEAdvertisingJobUnscheduleCallback)(GAPLEAdvertisingJobRef job //! @return Reference to the scheduled job, or NULL if the parameters were not //! valid. GAPLEAdvertisingJobRef gap_le_advert_schedule(const BLEAdData *payload, - const GAPLEAdvertisingJobTerm *terms, - uint8_t num_terms, - GAPLEAdvertisingJobUnscheduleCallback callback, - void *callback_data, - GAPLEAdvertisingJobTag tag); + const GAPLEAdvertisingJobTerm *terms, + uint8_t num_terms, + GAPLEAdvertisingJobUnscheduleCallback callback, + void *callback_data, GAPLEAdvertisingJobTag tag); //! Unschedules an existing advertisement job. //! It is safe to call this function with a reference to a non-existing job. @@ -109,8 +107,7 @@ void gap_le_advert_unschedule(GAPLEAdvertisingJobRef advertisement_job); //! removed //! @param tag_types an array of tags for the Advertisement Types to remove //! @param num_types the length of the 'tag_types' list -void gap_le_advert_unschedule_job_types( - GAPLEAdvertisingJobTag *tag_types, size_t num_types); +void gap_le_advert_unschedule_job_types(GAPLEAdvertisingJobTag *tag_types, size_t num_types); //! Convenience function to get the transmission power level in dBm for //! advertising channels. diff --git a/src/fw/comm/ble/gap_le_connect.c b/src/fw/comm/ble/gap_le_connect.c index 2cfd482b0f..6dd05d01fc 100644 --- a/src/fw/comm/ble/gap_le_connect.c +++ b/src/fw/comm/ble/gap_le_connect.c @@ -24,7 +24,7 @@ PBL_LOG_MODULE_DECLARE(bt, CONFIG_BT_LOG_LEVEL); -#if BLE_MASTER_CONNECT_SUPPORT // FIXME: Shouldn't be needed after PBL-32761 +#if BLE_MASTER_CONNECT_SUPPORT // FIXME: Shouldn't be needed after PBL-32761 extern unsigned int bt_stack_id(void); #endif @@ -126,7 +126,7 @@ typedef enum { // Static Variables -- MUST be protected with bt_lock/unlock! //! The list of connection intents. -static GAPLEConnectionIntent * s_intents; +static GAPLEConnectionIntent *s_intents; //! True if there is a pending LE Create Connection call, false if not. static bool s_has_pending_create_connection; @@ -149,15 +149,14 @@ static void prv_apply_fuction_to_intents_matching_connection(const GAPLEConnecti static bool prv_intent_matches_connection(const GAPLEConnectionIntent *intent, const GAPLEConnection *connection); static void prv_start_connecting_if_needed(void); -static GAPLEConnectionIntent * prv_get_intent_by_device(const BTDeviceInternal *device); +static GAPLEConnectionIntent *prv_get_intent_by_device(const BTDeviceInternal *device); static void prv_intent_remove_and_free(GAPLEConnectionIntent *intent); static bool prv_is_intent_used(const GAPLEConnectionIntent *intent); static bool prv_is_intent_requiring_encryption(const GAPLEConnectionIntent *intent); static bool prv_is_intent_using_whitelist(const GAPLEConnectionIntent *intent); static BTBondingID prv_get_bonding_id_for_intent(const GAPLEConnectionIntent *intent); static void prv_mutate_whitelist(const BTDeviceInternal *device, bool is_adding); -static void prv_mutate_whitelist_safely(const BTDeviceInternal *device, - bool is_adding); +static void prv_mutate_whitelist_safely(const BTDeviceInternal *device, bool is_adding); // ------------------------------------------------------------------------------------------------- @@ -165,13 +164,13 @@ static void prv_mutate_whitelist_safely(const BTDeviceInternal *device, // Need to fix this up when addressing https://pebbletechnology.atlassian.net/browse/PBL-5254 static void prv_put_legacy_connection_event(const BTDeviceInternal *device, bool is_connected) { PebbleEvent event = { - .type = PEBBLE_BT_CONNECTION_EVENT, - .bluetooth = { - .connection = { - .is_ble = true, - .device = *device, + .type = PEBBLE_BT_CONNECTION_EVENT, + .bluetooth = { + .connection = { + .is_ble = true, + .device = *device, + }, }, - }, }; if (is_connected) { @@ -184,24 +183,21 @@ static void prv_put_legacy_connection_event(const BTDeviceInternal *device, bool // ------------------------------------------------------------------------------------------------- -static void prv_put_connection_event(PebbleTaskBitset task_mask, - const BTDeviceInternal *device, - uint8_t hci_reason, - bool connected, - BTBondingID bonding_id) { +static void prv_put_connection_event(PebbleTaskBitset task_mask, const BTDeviceInternal *device, + uint8_t hci_reason, bool connected, BTBondingID bonding_id) { PebbleEvent pebble_event = { - .type = PEBBLE_BLE_CONNECTION_EVENT, - .task_mask = task_mask, - .bluetooth = { - .le = { - .connection = { - .bt_device_bits = device->opaque.opaque_64, - .hci_reason = hci_reason, - .connected = connected, - .bonding_id = bonding_id, - }, + .type = PEBBLE_BLE_CONNECTION_EVENT, + .task_mask = task_mask, + .bluetooth = { + .le = { + .connection = { + .bt_device_bits = device->opaque.opaque_64, + .hci_reason = hci_reason, + .connected = connected, + .bonding_id = bonding_id, + }, + }, }, - }, }; event_put(&pebble_event); } @@ -209,7 +205,7 @@ static void prv_put_connection_event(PebbleTaskBitset task_mask, // ------------------------------------------------------------------------------------------------- static void prv_build_task_mask_cb(GAPLEConnectionIntent *intent, void *data) { - PebbleTaskBitset *task_mask = (PebbleTaskBitset *) data; + PebbleTaskBitset *task_mask = (PebbleTaskBitset *)data; for (GAPLEClient c = 0; c < GAPLEClientNum; ++c) { GAPLEConnectionClient *client = &intent->client[c]; if (client->is_used) { @@ -240,8 +236,7 @@ PebbleTaskBitset gap_le_connect_task_mask_for_connection(const GAPLEConnection * //! bt_lock is assumed to be taken before calling this function. //! @return false if the intent has been cleaned-up by this function and should //! not be accessed any longer after returning. -static bool prv_update_clients(GAPLEConnectionIntent *intent, - uint8_t hci_reason, +static bool prv_update_clients(GAPLEConnectionIntent *intent, uint8_t hci_reason, GAPLEConnectionEvent event) { const BTDeviceInternal *device = &intent->device; const bool connected = (event == GAPLEConnectionEventConnectedNotEncrypted || @@ -269,8 +264,7 @@ static bool prv_update_clients(GAPLEConnectionIntent *intent, } if (client->connected != connected) { - if (client->is_pairing_required && - event == GAPLEConnectionEventConnectedNotEncrypted) { + if (client->is_pairing_required && event == GAPLEConnectionEventConnectedNotEncrypted) { // If is_pairing_required is true, "connected & not encrypted" is an // in-between state that should not be reported to the client. continue; @@ -289,7 +283,6 @@ static bool prv_update_clients(GAPLEConnectionIntent *intent, prv_put_connection_event(task_mask, device, hci_reason, connected, bonding_id); } - // Clean up unused intent: if (!prv_is_intent_used(intent)) { prv_intent_remove_and_free(intent); @@ -303,14 +296,16 @@ void bt_driver_handle_le_connection_handle_update_address(const BleAddressChange { GAPLEConnection *connection = gap_le_connection_by_device(&e->device); if (!connection) { - PBL_LOG_ERR("Got address update for non-existent connection. " - "Old addr:"BT_DEVICE_ADDRESS_FMT, BT_DEVICE_ADDRESS_XPLODE(e->device.address)); + PBL_LOG_ERR( + "Got address update for non-existent connection. " + "Old addr:" BT_DEVICE_ADDRESS_FMT, + BT_DEVICE_ADDRESS_XPLODE(e->device.address)); goto unlock; } connection->device = e->new_device; - PBL_LOG_INFO("Updated address to "BT_DEVICE_ADDRESS_FMT, - BT_DEVICE_ADDRESS_XPLODE(connection->device.address)); + PBL_LOG_INFO("Updated address to " BT_DEVICE_ADDRESS_FMT, + BT_DEVICE_ADDRESS_XPLODE(connection->device.address)); } unlock: bt_unlock(); @@ -343,7 +338,8 @@ void bt_driver_handle_peer_version_info_event(const BleRemoteVersionInfoReceived const BleRemoteVersionInfo *info = &e->remote_version_info; connection->remote_version_info = *info; PBL_LOG_DBG("Remote Vers Info: VersNr: %d, CompId: 0x%x, SubVersNr: 0x%x", - (int)info->version_number, (int)info->company_identifier, (int)info->subversion_number); + (int)info->version_number, (int)info->company_identifier, + (int)info->subversion_number); } bt_unlock(); @@ -365,14 +361,15 @@ void bt_driver_handle_le_connection_complete_event(const BleConnectionCompleteEv bt_lock(); const BleConnectionParams *params = &event->conn_params; - PBL_LOG_INFO("LE Conn Compl: addr="BT_DEVICE_ADDRESS_FMT", is_random_addr=%u,", - BT_DEVICE_ADDRESS_XPLODE(event->peer_address.address), - event->peer_address.is_random_address); - PBL_LOG_INFO(" hdl=%u, status=0x%02x, master=%u, %u, slave lat=%u, " - "supervision timeout=%u, is_resolved=%c", - event->handle, event->status, event->is_master, params->conn_interval_1_25ms, - params->slave_latency_events, params->supervision_timeout_10ms, - event->is_resolved ? 'Y' : 'N'); + PBL_LOG_INFO("LE Conn Compl: addr=" BT_DEVICE_ADDRESS_FMT ", is_random_addr=%u,", + BT_DEVICE_ADDRESS_XPLODE(event->peer_address.address), + event->peer_address.is_random_address); + PBL_LOG_INFO( + " hdl=%u, status=0x%02x, master=%u, %u, slave lat=%u, " + "supervision timeout=%u, is_resolved=%c", + event->handle, event->status, event->is_master, params->conn_interval_1_25ms, + params->slave_latency_events, params->supervision_timeout_10ms, + event->is_resolved ? 'Y' : 'N'); // When an "LE Connection Complete" event is received, the // "LE Create Connection" operation is stopped, so update our state: @@ -397,14 +394,14 @@ void bt_driver_handle_le_connection_complete_event(const BleConnectionCompleteEv // does take place, let's trigger a disconnect to try and put us back into a sane state PBL_LOG_ERR("Not adding connection for device. It is already connected .. disconnecting"); bt_driver_gap_le_disconnect(&event->peer_address); - param_watchdog_timer = TIMER_INVALID_ID; // Don't use timer, will clean up below + param_watchdog_timer = TIMER_INVALID_ID; // Don't use timer, will clean up below break; } const SMIdentityResolvingKey *remote_irk = event->is_resolved ? &event->irk : NULL; GAPLEConnection *connection = gap_le_connection_add(&event->peer_address, remote_irk, local_is_master, param_watchdog_timer); - param_watchdog_timer = TIMER_INVALID_ID; // Timer now owned by connection + param_watchdog_timer = TIMER_INVALID_ID; // Timer now owned by connection // Cache the BLE connection parameters connection->conn_params = *params; connection->gatt_mtu = event->mtu; @@ -412,7 +409,7 @@ void bt_driver_handle_le_connection_complete_event(const BleConnectionCompleteEv bool found_match = false; GAPLEConnectionIntent *intent = s_intents; while (intent) { - GAPLEConnectionIntent *next = (GAPLEConnectionIntent *) intent->node.next; + GAPLEConnectionIntent *next = (GAPLEConnectionIntent *)intent->node.next; if (prv_intent_matches_connection(intent, connection)) { found_match = true; @@ -441,11 +438,10 @@ void bt_driver_handle_le_connection_complete_event(const BleConnectionCompleteEv intent = next; } - if (!local_is_master) { // At the moment we don't grab analytics for connections we generate + if (!local_is_master) { // At the moment we don't grab analytics for connections we generate bluetooth_analytics_handle_connect(&event->peer_address, &event->conn_params); } - if (!found_match) { // There is no connection intent from our end. This could be the phone that is connecting // for the first time. Let the connection watchdog (TODO: PBL-11236) take care of @@ -456,8 +452,8 @@ void bt_driver_handle_le_connection_complete_event(const BleConnectionCompleteEv #ifdef CONFIG_RECOVERY_FW // In PRF, stick to shortest connection interval indefinitely: - conn_mgr_set_ble_conn_response_time(connection, BtConsumerPRF, - ResponseTimeMin, MAX_PERIOD_RUN_FOREVER); + conn_mgr_set_ble_conn_response_time(connection, BtConsumerPRF, ResponseTimeMin, + MAX_PERIOD_RUN_FOREVER); #endif break; } @@ -469,8 +465,7 @@ void bt_driver_handle_le_connection_complete_event(const BleConnectionCompleteEv } default: { - PBL_LOG_ERR("Connection Complete Event status: 0x%x", - event->status); + PBL_LOG_ERR("Connection Complete Event status: 0x%x", event->status); break; } } @@ -478,7 +473,7 @@ void bt_driver_handle_le_connection_complete_event(const BleConnectionCompleteEv // Continue initiating connections to disconnected devices: prv_start_connecting_if_needed(); bt_unlock(); - + // Clean up timer if we didn't use it (e.g., connection failed or already connected) if (param_watchdog_timer != TIMER_INVALID_ID) { new_timer_delete(param_watchdog_timer); @@ -498,16 +493,16 @@ void bt_driver_handle_le_disconnection_complete_event(const BleDisconnectionComp #endif const bool local_is_master = connection->local_is_master; - PBL_LOG_INFO("LE Disconn: addr="BT_DEVICE_ADDRESS_FMT", is_random_addr=%u,", - BT_DEVICE_ADDRESS_XPLODE(event->peer_address.address), - event->peer_address.is_random_address); - PBL_LOG_INFO(" hdl=%u, status=0x%02x, reason=0x%02x, master=%u", - event->handle, event->status, event->reason, local_is_master); + PBL_LOG_INFO("LE Disconn: addr=" BT_DEVICE_ADDRESS_FMT ", is_random_addr=%u,", + BT_DEVICE_ADDRESS_XPLODE(event->peer_address.address), + event->peer_address.is_random_address); + PBL_LOG_INFO(" hdl=%u, status=0x%02x, reason=0x%02x, master=%u", event->handle, + event->status, event->reason, local_is_master); bluetooth_analytics_handle_disconnect(local_is_master); - bluetooth_analytics_handle_connection_disconnection_event( - event->reason, &connection->remote_version_info); + bluetooth_analytics_handle_connection_disconnection_event(event->reason, + &connection->remote_version_info); if (!local_is_master) { s_is_connected_as_slave = false; @@ -518,11 +513,10 @@ void bt_driver_handle_le_disconnection_complete_event(const BleDisconnectionComp GAPLEConnectionIntent *intent = s_intents; while (intent) { - GAPLEConnectionIntent *next = (GAPLEConnectionIntent *) intent->node.next; + GAPLEConnectionIntent *next = (GAPLEConnectionIntent *)intent->node.next; if (prv_intent_matches_connection(intent, connection)) { // Notify clients: - if (prv_update_clients(intent, event->reason, - GAPLEConnectionEventDisconnected)) { + if (prv_update_clients(intent, event->reason, GAPLEConnectionEventDisconnected)) { // Only if the intent hasn't been cleaned up by now: if (prv_is_intent_using_whitelist(intent)) { // Add to white-list, because the device is disconnected now and we @@ -532,7 +526,7 @@ void bt_driver_handle_le_disconnection_complete_event(const BleDisconnectionComp if (intent->is_bonding_based) { // Clear out connection address (more for debugging than any else): - intent->device = (const BTDeviceInternal) {}; + intent->device = (const BTDeviceInternal){}; } } } @@ -544,8 +538,7 @@ void bt_driver_handle_le_disconnection_complete_event(const BleDisconnectionComp } default: { - PBL_LOG_ERR("Disconnection Complete Event status: 0x%x", - event->status); + PBL_LOG_ERR("Disconnection Complete Event status: 0x%x", event->status); break; } } @@ -559,7 +552,7 @@ static void prv_apply_fuction_to_intents_matching_connection(const GAPLEConnecti IntentApply fp, void *data) { GAPLEConnectionIntent *intent = s_intents; while (intent) { - GAPLEConnectionIntent *next = (GAPLEConnectionIntent *) intent->node.next; + GAPLEConnectionIntent *next = (GAPLEConnectionIntent *)intent->node.next; if (prv_intent_matches_connection(intent, connection)) { fp(intent, data); } @@ -571,8 +564,7 @@ static void prv_apply_fuction_to_intents_matching_connection(const GAPLEConnecti //! Helper for prv_handle_encryption_change static void prv_send_clients_encrypted_event(GAPLEConnectionIntent *intent, void *unused_data) { - prv_update_clients(intent, HciStatusCode_Success, - GAPLEConnectionEventConnectedAndEncrypted); + prv_update_clients(intent, HciStatusCode_Success, GAPLEConnectionEventConnectedAndEncrypted); } //! bt_lock is assumed to be taken before calling this function. @@ -604,8 +596,8 @@ void bt_driver_handle_le_encryption_change_event(const BleEncryptionChange *even bt_driver_pebble_pairing_service_handle_status_change(connection); } - prv_apply_fuction_to_intents_matching_connection(connection, - prv_send_clients_encrypted_event, NULL); + prv_apply_fuction_to_intents_matching_connection(connection, prv_send_clients_encrypted_event, + NULL); unlock: bt_unlock(); } @@ -615,7 +607,7 @@ void bt_driver_handle_le_encryption_change_event(const BleEncryptionChange *even //! bt_lock is assumed to be taken before calling these functions. static void prv_start_connecting(void) { -#if !BLE_MASTER_CONNECT_SUPPORT // PBL-32761 +#if !BLE_MASTER_CONNECT_SUPPORT // PBL-32761 PBL_LOG_WRN("Watch driven BLE connection unimplemented"); #else if (s_has_pending_create_connection) { @@ -628,19 +620,17 @@ static void prv_start_connecting(void) { // See Bluetooth Spec 4.0, Volume 2, Part E, Chapter 7.8.12: const GAP_LE_Address_Type_t local_addr_type = BleAddressType_Random; GAP_LE_Connection_Parameters_t connection_params = { - .Connection_Interval_Min = 40, - .Connection_Interval_Max = 60, - .Slave_Latency = 0, - .Supervision_Timeout = 6000, - .Minimum_Connection_Length = 0, - .Maximum_Connection_Length = 40950, + .Connection_Interval_Min = 40, + .Connection_Interval_Max = 60, + .Slave_Latency = 0, + .Supervision_Timeout = 6000, + .Minimum_Connection_Length = 0, + .Maximum_Connection_Length = 40950, }; - const int r = GAP_LE_Create_Connection(stack_id, 10240, 10240, fpWhiteList, - 0 /* fpWhiteList ignores remote addr type */, - NULL /* fpWhiteList ignores remote addr */, - local_addr_type, &connection_params, - gap_le_connect_bluetopia_connection_callback, - 0 /* callback context: unused */); + const int r = GAP_LE_Create_Connection( + stack_id, 10240, 10240, fpWhiteList, 0 /* fpWhiteList ignores remote addr type */, + NULL /* fpWhiteList ignores remote addr */, local_addr_type, &connection_params, + gap_le_connect_bluetopia_connection_callback, 0 /* callback context: unused */); if (r) { PBL_LOG_ERR("GAP_LE_Create_Connection (r=%d)", r); } else { @@ -650,7 +640,7 @@ static void prv_start_connecting(void) { } static void prv_stop_connecting(void) { -#if !BLE_MASTER_CONNECT_SUPPORT // PBL-32761 +#if !BLE_MASTER_CONNECT_SUPPORT // PBL-32761 PBL_LOG_WRN("Watch driven BLE connection cancel unimplemented"); #else if (!s_has_pending_create_connection) { @@ -671,22 +661,21 @@ static void prv_stop_connecting(void) { } static void prv_mutate_whitelist(const BTDeviceInternal *device, bool is_adding) { -#if !BLE_MASTER_CONNECT_SUPPORT // PBL-32761 +#if !BLE_MASTER_CONNECT_SUPPORT // PBL-32761 PBL_LOG_WRN("BLE whitelist mutation unimplemented"); #else unsigned int stack_id = bt_stack_id(); - PBL_LOG_DBG("Mutating white-list (adding=%u): " BD_ADDR_FMT, - is_adding, BT_DEVICE_ADDRESS_XPLODE(device->address)); + PBL_LOG_DBG("Mutating white-list (adding=%u): " BD_ADDR_FMT, is_adding, + BT_DEVICE_ADDRESS_XPLODE(device->address)); // See Bluetooth Spec 4.0, Volume 2, Part E, Chapter 7.8.15: uint8_t status = 0; const uint8_t addr_type = device->is_random_address ? 0x01 : 0x00; __typeof__(&HCI_LE_Add_Device_To_White_List) mutator = - (is_adding ? HCI_LE_Add_Device_To_White_List : HCI_LE_Remove_Device_From_White_List); - const int r = mutator(stack_id, addr_type, - BTDeviceAddressToBDADDR(device->address), &status); + (is_adding ? HCI_LE_Add_Device_To_White_List : HCI_LE_Remove_Device_From_White_List); + const int r = mutator(stack_id, addr_type, BTDeviceAddressToBDADDR(device->address), &status); if (r) { - PBL_LOG_ERR("HCI_LE_..._Device_To_White_List (is_adding=%u, r=%d, status=0x%x)", - is_adding, r, status); + PBL_LOG_ERR("HCI_LE_..._Device_To_White_List (is_adding=%u, r=%d, status=0x%x)", is_adding, r, + status); } #endif } @@ -720,42 +709,40 @@ static bool prv_intent_matches_connection(const GAPLEConnectionIntent *intent, } static void prv_intent_remove_and_free(GAPLEConnectionIntent *intent) { - list_remove(&intent->node, (ListNode **) &s_intents, NULL); + list_remove(&intent->node, (ListNode **)&s_intents, NULL); kernel_free(intent); } static bool prv_intent_filter_by_device(ListNode *node, void *data) { - const BTDeviceInternal *target_device = (const BTDeviceInternal *) data; - const GAPLEConnectionIntent *intent = (const GAPLEConnectionIntent *) node; + const BTDeviceInternal *target_device = (const BTDeviceInternal *)data; + const GAPLEConnectionIntent *intent = (const GAPLEConnectionIntent *)node; if (intent->is_bonding_based) { return false; } return bt_device_equal(&target_device->opaque, &intent->device.opaque); } -static GAPLEConnectionIntent * prv_get_intent_by_device(const BTDeviceInternal *device) { - return (GAPLEConnectionIntent *) list_find(&s_intents->node, - prv_intent_filter_by_device, - (void *) device); +static GAPLEConnectionIntent *prv_get_intent_by_device(const BTDeviceInternal *device) { + return (GAPLEConnectionIntent *)list_find(&s_intents->node, prv_intent_filter_by_device, + (void *)device); } static bool prv_intent_filter_by_bonding_id(ListNode *node, void *data) { - const BTBondingID bonding_id = (BTBondingID) (uintptr_t) data; - const GAPLEConnectionIntent *intent = (const GAPLEConnectionIntent *) node; + const BTBondingID bonding_id = (BTBondingID)(uintptr_t)data; + const GAPLEConnectionIntent *intent = (const GAPLEConnectionIntent *)node; if (!intent->is_bonding_based) { return false; } return (intent->bonding->id == bonding_id); } -static GAPLEConnectionIntent * prv_get_intent_by_bonding_id(BTBondingID bonding_id) { - return (GAPLEConnectionIntent *) list_find(&s_intents->node, - prv_intent_filter_by_bonding_id, - (void *) (uintptr_t) bonding_id); +static GAPLEConnectionIntent *prv_get_intent_by_bonding_id(BTBondingID bonding_id) { + return (GAPLEConnectionIntent *)list_find(&s_intents->node, prv_intent_filter_by_bonding_id, + (void *)(uintptr_t)bonding_id); } static bool prv_intent_filter_disconnected(ListNode *node, void *data) { - const GAPLEConnectionIntent *intent = (const GAPLEConnectionIntent *) node; + const GAPLEConnectionIntent *intent = (const GAPLEConnectionIntent *)node; return !gap_le_connection_is_connected(&intent->device); } @@ -768,8 +755,7 @@ static uint32_t prv_intents_count(void) { } static bool prv_is_intent_used(const GAPLEConnectionIntent *intent) { - return (intent->client[GAPLEClientKernel].is_used | - intent->client[GAPLEClientApp].is_used); + return (intent->client[GAPLEClientKernel].is_used | intent->client[GAPLEClientApp].is_used); } // ------------------------------------------------------------------------------------------------- @@ -808,8 +794,7 @@ static void prv_start_connecting_if_needed(void) { // ------------------------------------------------------------------------------------------------- //! Adds or removes a device to/from the Bluetooth controller's whitelist. //! Stops and (re)starts the LE Create Connection operation as necessary. -static void prv_mutate_whitelist_safely(const BTDeviceInternal *device, - bool is_adding) { +static void prv_mutate_whitelist_safely(const BTDeviceInternal *device, bool is_adding) { // If there are already connection intents, cancel connecting briefly, // otherwise it's illegal to modify the white-list. prv_stop_connecting(); @@ -835,10 +820,8 @@ struct RegisterIntentRequest { // ------------------------------------------------------------------------------------------------- //! Registers a connection intent for a client task //! bt_lock() is expected to be taken by the caller -static BTErrno prv_register_intent(struct RegisterIntentRequest *request, - bool auto_reconnect, - bool is_pairing_required, - GAPLEClient c) { +static BTErrno prv_register_intent(struct RegisterIntentRequest *request, bool auto_reconnect, + bool is_pairing_required, GAPLEClient c) { // Check if the max count wasn't exceeded: const uint32_t prev_num_intents = prv_intents_count(); if (prev_num_intents >= GAP_LE_CONNECT_MASTER_MAX_CONNECTION_INTENTS) { @@ -882,20 +865,19 @@ static BTErrno prv_register_intent(struct RegisterIntentRequest *request, } } else { // Create intent for device and add to list: - const size_t alloc_size = sizeof(GAPLEConnectionIntent) + - (request->is_bonding_based ? sizeof(GAPLEConnectionIntentBonding) : 0); - intent = (GAPLEConnectionIntent *) kernel_malloc(alloc_size); + const size_t alloc_size = + sizeof(GAPLEConnectionIntent) + + (request->is_bonding_based ? sizeof(GAPLEConnectionIntentBonding) : 0); + intent = (GAPLEConnectionIntent *)kernel_malloc(alloc_size); if (!intent) { return BTErrnoNotEnoughResources; } memset(intent, 0, alloc_size); - s_intents = (GAPLEConnectionIntent *) list_prepend(&s_intents->node, - &intent->node); + s_intents = (GAPLEConnectionIntent *)list_prepend(&s_intents->node, &intent->node); if (request->is_bonding_based) { // Create bonding info cache if it has not been created yet: - intent->is_bonding_based = true, - *intent->bonding = request->bonding; + intent->is_bonding_based = true, *intent->bonding = request->bonding; if (connected_device) { intent->device = *connected_device; } @@ -934,8 +916,8 @@ static BTErrno prv_register_intent(struct RegisterIntentRequest *request, // Notify client of the virtual connection: prv_update_clients(intent, HciStatusCode_Success, - is_already_encrypted ? GAPLEConnectionEventConnectedAndEncrypted : - GAPLEConnectionEventConnectedNotEncrypted); + is_already_encrypted ? GAPLEConnectionEventConnectedAndEncrypted + : GAPLEConnectionEventConnectedNotEncrypted); return BTErrnoOK; } @@ -943,10 +925,8 @@ static BTErrno prv_register_intent(struct RegisterIntentRequest *request, // ------------------------------------------------------------------------------------------------- //! Unregisters a connection intent for a client task //! bt_lock() is expected to be taken by the caller -static BTErrno prv_unregister_intent(GAPLEConnectionIntent *intent, - GAPLEClient c, - bool should_send_disconnection_event, - uint8_t hci_reason) { +static BTErrno prv_unregister_intent(GAPLEConnectionIntent *intent, GAPLEClient c, + bool should_send_disconnection_event, uint8_t hci_reason) { if (!intent->client[c].is_used) { // No intent that is owned by the given client return BTErrnoInvalidParameter; @@ -1008,7 +988,7 @@ void gap_le_connect_handle_bonding_change(BTBondingID bonding_id, BtPersistBondi GAPLEConnectionIntentBonding updated_bonding; if (op == BtPersistBondingOpDidChange) { if (!bt_persistent_storage_get_ble_pairing_by_id(bonding_id, &updated_bonding.irk, - &updated_bonding.device, NULL)) { + &updated_bonding.device, NULL)) { WTF; } updated_bonding.id = bonding_id; @@ -1045,14 +1025,14 @@ void gap_le_connect_handle_bonding_change(BTBondingID bonding_id, BtPersistBondi // ------------------------------------------------------------------------------------------------- BTErrno gap_le_connect_connect(const BTDeviceInternal *device, bool auto_reconnect, - bool is_pairing_required, GAPLEClient client) { + bool is_pairing_required, GAPLEClient client) { if (!device || client >= GAPLEClientNum) { return BTErrnoInvalidParameter; } bt_lock(); struct RegisterIntentRequest request = { - .is_bonding_based = false, - .device = device, + .is_bonding_based = false, + .device = device, }; BTErrno ret_value = prv_register_intent(&request, auto_reconnect, is_pairing_required, client); bt_unlock(); @@ -1061,8 +1041,7 @@ BTErrno gap_le_connect_connect(const BTDeviceInternal *device, bool auto_reconne // ------------------------------------------------------------------------------------------------- -BTErrno gap_le_connect_cancel(const BTDeviceInternal *device, - GAPLEClient client) { +BTErrno gap_le_connect_cancel(const BTDeviceInternal *device, GAPLEClient client) { if (!device || client >= GAPLEClientNum) { return BTErrnoInvalidParameter; } @@ -1089,15 +1068,15 @@ BTErrno gap_le_connect_connect_by_bonding(BTBondingID bonding_id, bool auto_reco return BTErrnoInvalidParameter; } struct RegisterIntentRequest request = { - .is_bonding_based = true, - .bonding = { - .id = bonding_id, - }, + .is_bonding_based = true, + .bonding = { + .id = bonding_id, + }, }; // Get the IRK and device from the bonding storage, // outside of bt_lock(), because it uses flash. if (!bt_persistent_storage_get_ble_pairing_by_id(bonding_id, &request.bonding.irk, - &request.bonding.device, NULL)) { + &request.bonding.device, NULL)) { return BTErrnoInvalidParameter; } bt_lock(); @@ -1136,7 +1115,7 @@ void gap_le_connect_cancel_all(GAPLEClient client) { GAPLEConnectionIntent *intent = s_intents; while (intent) { - GAPLEConnectionIntent *next = (GAPLEConnectionIntent *) intent->node.next; + GAPLEConnectionIntent *next = (GAPLEConnectionIntent *)intent->node.next; prv_unregister_intent(intent, client, false /* should_send_disconnection_event */, GAPLEConnectHCIReasonExtensionCancelConnect); intent = next; @@ -1157,7 +1136,6 @@ bool gap_le_connect_is_connected_as_slave(void) { return connected; } - // ------------------------------------------------------------------------------------------------- void gap_le_connect_init(void) { @@ -1165,7 +1143,7 @@ void gap_le_connect_init(void) { { GAPLEConnectionIntent *intent = s_intents; while (intent) { - GAPLEConnectionIntent *next = (GAPLEConnectionIntent *) intent->node.next; + GAPLEConnectionIntent *next = (GAPLEConnectionIntent *)intent->node.next; prv_mutate_whitelist(&intent->device, true /* add */); intent = next; } @@ -1185,7 +1163,7 @@ void gap_le_connect_deinit(void) { // Going into air-plane mode, send virtual disconnection events: GAPLEConnectionIntent *intent = s_intents; while (intent) { - GAPLEConnectionIntent *next = (GAPLEConnectionIntent *) intent->node.next; + GAPLEConnectionIntent *next = (GAPLEConnectionIntent *)intent->node.next; prv_update_clients(intent, GAPLEConnectHCIReasonExtensionAirPlaneMode, GAPLEConnectionEventDisconnected); intent = next; @@ -1212,8 +1190,7 @@ bool gap_le_connect_has_pending_create_connection(void) { return ret_value; } -bool gap_le_connect_has_connection_intent(const BTDeviceInternal *device, - GAPLEClient c) { +bool gap_le_connect_has_connection_intent(const BTDeviceInternal *device, GAPLEClient c) { bt_lock(); bool ret_value = true; const GAPLEConnectionIntent *intent = prv_get_intent_by_device(device); @@ -1230,8 +1207,7 @@ bool gap_le_connect_has_connection_intent(const BTDeviceInternal *device, return ret_value; } -bool gap_le_connect_has_connection_intent_for_bonding(BTBondingID bonding_id, - GAPLEClient c) { +bool gap_le_connect_has_connection_intent_for_bonding(BTBondingID bonding_id, GAPLEClient c) { bt_lock(); bool ret_value = true; const GAPLEConnectionIntent *intent = prv_get_intent_by_bonding_id(bonding_id); @@ -1250,7 +1226,7 @@ bool gap_le_connect_has_connection_intent_for_bonding(BTBondingID bonding_id, uint32_t gap_le_connect_connection_intents_count(void) { bt_lock(); - const uint32_t count = prv_intents_count(); + const uint32_t count = prv_intents_count(); bt_unlock(); return count; } diff --git a/src/fw/comm/ble/gap_le_connect.h b/src/fw/comm/ble/gap_le_connect.h index 196f0d58de..c9ad51edc4 100644 --- a/src/fw/comm/ble/gap_le_connect.h +++ b/src/fw/comm/ble/gap_le_connect.h @@ -31,7 +31,7 @@ bool gap_le_connect_is_connected_as_slave(void); void gap_le_connect_handle_bonding_change(BTBondingID bonding, BtPersistBondingOp op); BTErrno gap_le_connect_connect(const BTDeviceInternal *device, bool auto_reconnect, - bool is_pairing_required, GAPLEClient client); + bool is_pairing_required, GAPLEClient client); BTErrno gap_le_connect_cancel(const BTDeviceInternal *device, GAPLEClient client); @@ -53,10 +53,8 @@ bool gap_le_connect_has_pending_create_connection(void); //! @return true if there is a connection intent for the specified device and //! specified client. -bool gap_le_connect_has_connection_intent(const BTDeviceInternal *device, - GAPLEClient client); +bool gap_le_connect_has_connection_intent(const BTDeviceInternal *device, GAPLEClient client); -bool gap_le_connect_has_connection_intent_for_bonding(BTBondingID bonding_id, - GAPLEClient c); +bool gap_le_connect_has_connection_intent_for_bonding(BTBondingID bonding_id, GAPLEClient c); uint32_t gap_le_connect_connection_intents_count(void); diff --git a/src/fw/comm/ble/gap_le_connect_params.c b/src/fw/comm/ble/gap_le_connect_params.c index f9498d0ee8..68caead672 100644 --- a/src/fw/comm/ble/gap_le_connect_params.c +++ b/src/fw/comm/ble/gap_le_connect_params.c @@ -74,24 +74,26 @@ #define MAX_UPDATE_REQUEST_ATTEMPTS (3) static const GAPLEConnectRequestParams s_default_connection_params_table[NumResponseTimeState] = { - [ResponseTimeMax] = { - .slave_latency_events = 3, - .connection_interval_min_1_25ms = 24, // 30ms - .connection_interval_max_1_25ms = 36, // 45ms - .supervision_timeout_10ms = 600, // 6s - }, - [ResponseTimeMiddle] = { - .slave_latency_events = 3, - .connection_interval_min_1_25ms = 24, // 30ms - .connection_interval_max_1_25ms = 36, // 45ms - .supervision_timeout_10ms = 600, // 6s - }, - [ResponseTimeMin] = { - .slave_latency_events = 0, - .connection_interval_min_1_25ms = 12, // 15ms - .connection_interval_max_1_25ms = 12, // 15ms - .supervision_timeout_10ms = 600, // 6s - }, + [ResponseTimeMax] = + { + .slave_latency_events = 3, + .connection_interval_min_1_25ms = 24, // 30ms + .connection_interval_max_1_25ms = 36, // 45ms + .supervision_timeout_10ms = 600, // 6s + }, + [ResponseTimeMiddle] = + { + .slave_latency_events = 3, + .connection_interval_min_1_25ms = 24, // 30ms + .connection_interval_max_1_25ms = 36, // 45ms + .supervision_timeout_10ms = 600, // 6s + }, + [ResponseTimeMin] = { + .slave_latency_events = 0, + .connection_interval_min_1_25ms = 12, // 15ms + .connection_interval_max_1_25ms = 12, // 15ms + .supervision_timeout_10ms = 600, // 6s + }, }; extern void conn_mgr_handle_desired_state_granted(GAPLEConnection *hdl, @@ -183,8 +185,7 @@ static bool prv_do_actual_params_match_desired_state(const GAPLEConnection *conn actual_params->slave_latency_events == desired_params->slave_latency_events); } -static void prv_request_params_update(GAPLEConnection *connection, - ResponseTimeState state) { +static void prv_request_params_update(GAPLEConnection *connection, ResponseTimeState state) { if (connection->is_remote_device_managing_connection_parameters || connection->param_update_info.is_request_pending) { return; @@ -221,10 +222,10 @@ static void prv_request_params_update(GAPLEConnection *connection, const GAPLEConnectRequestParams *desired_params = prv_params_for_state(connection, state); BleConnectionParamsUpdateReq req = { - .interval_min_1_25ms = desired_params->connection_interval_min_1_25ms, - .interval_max_1_25ms = desired_params->connection_interval_max_1_25ms, - .slave_latency_events = desired_params->slave_latency_events, - .supervision_timeout_10ms = desired_params->supervision_timeout_10ms, + .interval_min_1_25ms = desired_params->connection_interval_min_1_25ms, + .interval_max_1_25ms = desired_params->connection_interval_max_1_25ms, + .slave_latency_events = desired_params->slave_latency_events, + .supervision_timeout_10ms = desired_params->supervision_timeout_10ms, }; const bool success = bt_driver_le_connection_parameter_update(&connection->device, &req); @@ -263,8 +264,7 @@ static void prv_watchdog_timer_callback(void *ctx) { system_task_add_callback(prv_watchdog_system_task_callback, ctx); } -void gap_le_connect_params_request(GAPLEConnection *connection, - ResponseTimeState desired_state) { +void gap_le_connect_params_request(GAPLEConnection *connection, ResponseTimeState desired_state) { // A new desired state is requested by the FW, start afresh: connection->param_update_info.attempts = 0; @@ -344,9 +344,9 @@ void bt_driver_handle_le_conn_params_update_event(const BleConnectionUpdateCompl const bool local_is_master = connection->local_is_master; if (!local_is_master) { - bluetooth_analytics_handle_connection_params_update(params); - prv_analytics_update_conn_params(params->conn_interval_1_25ms, params->slave_latency_events); - PBL_ANALYTICS_ADD(ble_conn_param_update_count, 1); + bluetooth_analytics_handle_connection_params_update(params); + prv_analytics_update_conn_params(params->conn_interval_1_25ms, params->slave_latency_events); + PBL_ANALYTICS_ADD(ble_conn_param_update_count, 1); } prv_evaluate(connection, desired_state); diff --git a/src/fw/comm/ble/gap_le_connect_params.h b/src/fw/comm/ble/gap_le_connect_params.h index f13ced61d6..9eb86f1f69 100644 --- a/src/fw/comm/ble/gap_le_connect_params.h +++ b/src/fw/comm/ble/gap_le_connect_params.h @@ -20,5 +20,4 @@ typedef struct GAPLEConnectRequestParams { //! @note The change does not take effect immediately. When Pebble is the LE slave, it depends on //! the other side (master) to actually act upon the request and apply the change. With iOS //! devices, this does not always happen. -void gap_le_connect_params_request(GAPLEConnection *connection, - ResponseTimeState desired_state); +void gap_le_connect_params_request(GAPLEConnection *connection, ResponseTimeState desired_state); diff --git a/src/fw/comm/ble/gap_le_connection.c b/src/fw/comm/ble/gap_le_connection.c index 2582fc0ad3..4a41002667 100644 --- a/src/fw/comm/ble/gap_le_connection.c +++ b/src/fw/comm/ble/gap_le_connection.c @@ -46,39 +46,35 @@ static bool s_le_connection_module_initialized = false; // Internal helpers static bool prv_list_filter_by_gatt_id(ListNode *found_node, void *data) { - const unsigned int connection_id = (uintptr_t) data; - const GAPLEConnection *connection = (const GAPLEConnection *) found_node; + const unsigned int connection_id = (uintptr_t)data; + const GAPLEConnection *connection = (const GAPLEConnection *)found_node; return (connection->gatt_connection_id == connection_id); } -static GAPLEConnection * prv_find_connection_by_gatt_id(uintptr_t connection_id) { - return (GAPLEConnection *) list_find(&s_connections->node, - prv_list_filter_by_gatt_id, - (void *) connection_id); +static GAPLEConnection *prv_find_connection_by_gatt_id(uintptr_t connection_id) { + return (GAPLEConnection *)list_find(&s_connections->node, prv_list_filter_by_gatt_id, + (void *)connection_id); } static bool prv_list_filter_for_addr(ListNode *found_node, void *data) { - const BTDeviceAddress *addr = (const BTDeviceAddress *) data; - const GAPLEConnection *connection = (const GAPLEConnection *) found_node; + const BTDeviceAddress *addr = (const BTDeviceAddress *)data; + const GAPLEConnection *connection = (const GAPLEConnection *)found_node; return bt_device_address_equal(&connection->device.address, addr); } -static GAPLEConnection * prv_find_connection_by_addr(const BTDeviceAddress *addr) { - return (GAPLEConnection *) list_find(&s_connections->node, - prv_list_filter_for_addr, - (void *) addr); +static GAPLEConnection *prv_find_connection_by_addr(const BTDeviceAddress *addr) { + return (GAPLEConnection *)list_find(&s_connections->node, prv_list_filter_for_addr, (void *)addr); } static bool prv_list_filter_for_device(ListNode *found_node, void *data) { - const BTDeviceInternal *device = (const BTDeviceInternal *) data; - const GAPLEConnection *connection = (const GAPLEConnection *) found_node; + const BTDeviceInternal *device = (const BTDeviceInternal *)data; + const GAPLEConnection *connection = (const GAPLEConnection *)found_node; return bt_device_equal(&connection->device.opaque, &device->opaque); } -static GAPLEConnection * prv_find_connection(const BTDeviceInternal *device) { - return (GAPLEConnection *) list_find(&s_connections->node, - prv_list_filter_for_device, - (void *) device); +static GAPLEConnection *prv_find_connection(const BTDeviceInternal *device) { + return (GAPLEConnection *)list_find(&s_connections->node, prv_list_filter_for_device, + (void *)device); } // ------------------------------------------------------------------------------------------------- @@ -114,27 +110,25 @@ void gap_le_connection_set_irk(GAPLEConnection *connection, const SMIdentityReso // ------------------------------------------------------------------------------------------------- GAPLEConnection *gap_le_connection_add(const BTDeviceInternal *device, - const SMIdentityResolvingKey *irk, - bool local_is_master, + const SMIdentityResolvingKey *irk, bool local_is_master, TimerID param_watchdog_timer) { bt_lock_assert_held(true /* is_held */); PBL_ASSERTN(!gap_le_connection_is_connected(device)); GAPLEConnection *connection = kernel_zalloc_check(sizeof(GAPLEConnection)); - *connection = (const GAPLEConnection) { - .device = *device, - .local_is_master = local_is_master, - .conn_mgr_info = bt_conn_mgr_info_init(), - .bonding_id = BT_BONDING_ID_INVALID, - .ticks_since_connection = rtc_get_ticks(), - .is_remote_device_managing_connection_parameters = false, - .connection_parameter_sets = NULL, + *connection = (const GAPLEConnection){ + .device = *device, + .local_is_master = local_is_master, + .conn_mgr_info = bt_conn_mgr_info_init(), + .bonding_id = BT_BONDING_ID_INVALID, + .ticks_since_connection = rtc_get_ticks(), + .is_remote_device_managing_connection_parameters = false, + .connection_parameter_sets = NULL, }; gap_le_connection_set_irk(connection, irk); - s_connections = (GAPLEConnection *) list_prepend(&s_connections->node, - &connection->node); + s_connections = (GAPLEConnection *)list_prepend(&s_connections->node, &connection->node); gap_le_connect_params_setup_connection(connection, param_watchdog_timer); @@ -150,7 +144,7 @@ void prv_destroy_connection(GAPLEConnection *connection) { gatt_client_subscriptions_cleanup_by_connection(connection, false /* should_unsubscribe */); gatt_client_cleanup_discovery_jobs(connection); - list_remove(&connection->node, (ListNode **) &s_connections, NULL); + list_remove(&connection->node, (ListNode **)&s_connections, NULL); bt_conn_mgr_info_deinit(&connection->conn_mgr_info); kernel_free(connection->connection_parameter_sets); kernel_free(connection->pairing_state); @@ -221,8 +215,7 @@ void gap_le_connection_deinit(void) { { GAPLEConnection *connection = s_connections; while (connection) { - GAPLEConnection *next_connection = - (GAPLEConnection *) connection->node.next; + GAPLEConnection *next_connection = (GAPLEConnection *)connection->node.next; prv_destroy_connection(connection); connection = next_connection; } @@ -274,11 +267,8 @@ GAPLEConnection *gap_le_connection_by_gatt_id(unsigned int connection_id) { // ------------------------------------------------------------------------------------------------- //! @note !!! To access the returned context bt_lock MUST be held!!! -GAPLEConnection *gap_le_connection_find(GAPLEConnectionFindCallback filter, - void *data) { - return (GAPLEConnection *) list_find(&s_connections->node, - (ListFilterCallback) filter, - data); +GAPLEConnection *gap_le_connection_find(GAPLEConnectionFindCallback filter, void *data) { + return (GAPLEConnection *)list_find(&s_connections->node, (ListFilterCallback)filter, data); } // ------------------------------------------------------------------------------------------------- @@ -288,7 +278,7 @@ void gap_le_connection_for_each(GAPLEConnectionForEachCallback cb, void *data) { GAPLEConnection *connection = s_connections; while (connection) { cb(connection, data); - connection = (GAPLEConnection *) connection->node.next; + connection = (GAPLEConnection *)connection->node.next; } } @@ -324,16 +314,16 @@ void gap_le_connection_handle_bonding_change(BTBondingID bonding, BtPersistBondi } // Clean up the bonding_id field for the bonding that just got removed: bt_lock(); - GAPLEConnection *connection = gap_le_connection_find(prv_find_connection_with_bonding_id, - (void *)(uintptr_t)bonding); + GAPLEConnection *connection = + gap_le_connection_find(prv_find_connection_with_bonding_id, (void *)(uintptr_t)bonding); if (connection) { connection->bonding_id = BT_BONDING_ID_INVALID; } bt_unlock(); } -void gap_le_connection_copy_device_name( - const GAPLEConnection *connection, char *name_out, size_t name_out_len) { +void gap_le_connection_copy_device_name(const GAPLEConnection *connection, char *name_out, + size_t name_out_len) { bt_lock(); { if (!gap_le_connection_is_valid(connection)) { diff --git a/src/fw/comm/ble/gap_le_connection.h b/src/fw/comm/ble/gap_le_connection.h index 666f1c2c47..99b59b1379 100644 --- a/src/fw/comm/ble/gap_le_connection.h +++ b/src/fw/comm/ble/gap_le_connection.h @@ -53,28 +53,28 @@ typedef struct GAPLEConnection { BTDeviceInternal device; //! Whether we are the master for this connection. - bool local_is_master:1; + bool local_is_master : 1; //! Whether the connection is encrypted or not. - bool is_encrypted:1; + bool is_encrypted : 1; //! Whether GATT service discovery is in progress - bool gatt_is_service_discovery_in_progress:1; + bool gatt_is_service_discovery_in_progress : 1; //! Whether the connected device is our gateway (aka "the phone running Pebble app") - bool is_gateway:1; + bool is_gateway : 1; //! @see pebble_pairing_service.c - bool is_subscribed_to_connection_status_notifications:1; - bool is_subscribed_to_gatt_mtu_notifications:1; + bool is_subscribed_to_connection_status_notifications : 1; + bool is_subscribed_to_gatt_mtu_notifications : 1; //! Whether the device is subscribed to heart rate monitor value updates (the other device has //! enabled the "Notifications" bit of the CCCD). - bool hrm_service_is_subscribed:1; + bool hrm_service_is_subscribed : 1; //! The number of service discovery retries. //! See field `gatt_service_discovery_watchdog_timer` - uint8_t gatt_service_discovery_retries:GATT_CLIENT_DISCOVERY_MAX_RETRY_BITS; + uint8_t gatt_service_discovery_retries : GATT_CLIENT_DISCOVERY_MAX_RETRY_BITS; //! The generation number of the remote services that have been discovered. uint8_t gatt_service_discovery_generation; @@ -144,10 +144,8 @@ typedef struct GAPLEConnection { RtcTicks ticks_since_connection; } GAPLEConnection; - GAPLEConnection *gap_le_connection_add(const BTDeviceInternal *device, - const SMIdentityResolvingKey *irk, - bool local_is_master, + const SMIdentityResolvingKey *irk, bool local_is_master, TimerID param_watchdog_timer); //! Checks to see if the LE connection is in our list of currently tracked @@ -175,14 +173,11 @@ GAPLEConnection *gap_le_connection_by_gatt_id(unsigned int connection_id); //! Find the GAPLEConnection by IRK. GAPLEConnection *gap_le_connection_find_by_irk(const SMIdentityResolvingKey *irk); -typedef bool (*GAPLEConnectionFindCallback)(GAPLEConnection *connection, - void *data); +typedef bool (*GAPLEConnectionFindCallback)(GAPLEConnection *connection, void *data); -GAPLEConnection *gap_le_connection_find(GAPLEConnectionFindCallback filter, - void *data); +GAPLEConnection *gap_le_connection_find(GAPLEConnectionFindCallback filter, void *data); -typedef void (*GAPLEConnectionForEachCallback)(GAPLEConnection *connection, - void *data); +typedef void (*GAPLEConnectionForEachCallback)(GAPLEConnection *connection, void *data); void gap_le_connection_for_each(GAPLEConnectionForEachCallback cb, void *data); @@ -195,5 +190,5 @@ void gap_le_connection_set_gateway(GAPLEConnection *connection, bool is_gateway) GAPLEConnection *gap_le_connection_get_gateway(void); -void gap_le_connection_copy_device_name( - const GAPLEConnection *connection, char *name_out, size_t namelen); +void gap_le_connection_copy_device_name(const GAPLEConnection *connection, char *name_out, + size_t namelen); diff --git a/src/fw/comm/ble/gap_le_device_name.c b/src/fw/comm/ble/gap_le_device_name.c index afd4ee7c7a..2fd29d8894 100644 --- a/src/fw/comm/ble/gap_le_device_name.c +++ b/src/fw/comm/ble/gap_le_device_name.c @@ -9,7 +9,7 @@ #include "kernel/pbl_malloc.h" #include "pbl/services/bluetooth/bluetooth_persistent_storage.h" -BTBondingID prv_get_bonding_id_and_name_from_address_safe(void *ctx, char* device_name) { +BTBondingID prv_get_bonding_id_and_name_from_address_safe(void *ctx, char *device_name) { BTBondingID bonding_id = BT_BONDING_ID_INVALID; BTDeviceAddress *addr = (BTDeviceAddress *)ctx; GAPLEConnection *connection = gap_le_connection_by_addr(addr); @@ -46,7 +46,7 @@ void bt_driver_store_device_name_kernelbg_cb(void *ctx) { } PebbleEvent event = { - .type = PEBBLE_BLE_DEVICE_NAME_UPDATED_EVENT, + .type = PEBBLE_BLE_DEVICE_NAME_UPDATED_EVENT, }; event_put(&event); } diff --git a/src/fw/comm/ble/gap_le_scan.c b/src/fw/comm/ble/gap_le_scan.c index fefb42c5cc..24cc561331 100644 --- a/src/fw/comm/ble/gap_le_scan.c +++ b/src/fw/comm/ble/gap_le_scan.c @@ -40,14 +40,13 @@ bool gap_le_start_scan(void) { if (!s_is_scanning) { s_dropped_reports = 0; - success = bt_driver_start_le_scan( - true /* active_scan */, false /* use_white_list_filter */, - true /* filter_dups */, 10240, 10240); + success = bt_driver_start_le_scan(true /* active_scan */, false /* use_white_list_filter */, + true /* filter_dups */, 10240, 10240); if (success) { // Allocate report buffers if advertising started successfully const size_t buffer_size = GAP_LE_SCAN_REPORTS_BUFFER_SIZE; - s_reports_buffer = (uint8_t *) kernel_malloc_check(buffer_size); + s_reports_buffer = (uint8_t *)kernel_malloc_check(buffer_size); circular_buffer_init(&s_circular_buffer, s_reports_buffer, buffer_size); s_is_scanning = true; } @@ -63,7 +62,6 @@ bool gap_le_stop_scan(void) { bt_lock(); { if (s_is_scanning) { - success = bt_driver_stop_le_scan(); kernel_free(s_reports_buffer); s_reports_buffer = NULL; @@ -87,14 +85,13 @@ bool gap_le_is_scanning(void) { //! "slot". In case there is no space left, the pending report will be dropped. //! and a counter will be incremented void bt_driver_cb_le_scan_handle_report(const GAPLERawAdReport *report_buffer, int length) { - const bool written = circular_buffer_write( - &s_circular_buffer, (uint8_t *)report_buffer, length); + const bool written = circular_buffer_write(&s_circular_buffer, (uint8_t *)report_buffer, length); if (!written) { ++s_dropped_reports; - } else { // notify clients there's a new event available + } else { // notify clients there's a new event available PebbleEvent e = { - .type = PEBBLE_BLE_SCAN_EVENT, + .type = PEBBLE_BLE_SCAN_EVENT, }; event_put(&e); } @@ -125,13 +122,12 @@ bool gap_le_consume_scan_results(uint8_t *buffer, uint16_t *size_in_out) { while (read_space && write_space >= sizeof(GAPLERawAdReport)) { // First copy the header. We know for sure this will fit into buffer, // because it was tested in the while() condition: - circular_buffer_copy(&s_circular_buffer, - buffer, sizeof(GAPLERawAdReport)); - const GAPLERawAdReport *report = (const GAPLERawAdReport *) buffer; + circular_buffer_copy(&s_circular_buffer, buffer, sizeof(GAPLERawAdReport)); + const GAPLERawAdReport *report = (const GAPLERawAdReport *)buffer; // Now use the copied header to figure out how big the report actually is: - const uint32_t payload_len = report->payload.ad_data_length + - report->payload.scan_resp_data_length; + const uint32_t payload_len = + report->payload.ad_data_length + report->payload.scan_resp_data_length; const uint32_t report_len = sizeof(GAPLERawAdReport) + payload_len; // There should always be at least enough bytes to read in the circular @@ -173,7 +169,6 @@ void gap_le_scan_init(void) { bt_unlock(); } - // ----------------------------------------------------------------------------- void gap_le_scan_deinit(void) { bt_lock(); diff --git a/src/fw/comm/ble/gap_le_scan.h b/src/fw/comm/ble/gap_le_scan.h index ccfb97da24..332bab8013 100644 --- a/src/fw/comm/ble/gap_le_scan.h +++ b/src/fw/comm/ble/gap_le_scan.h @@ -10,8 +10,8 @@ //! @internal //! The number of reports that the circular reports buffer can contain. //! Accommodate for 4 reports with advertisement and scan response data: -#define GAP_LE_SCAN_REPORTS_BUFFER_SIZE (4 * (sizeof(GAPLERawAdReport) + \ -(2 * GAP_LE_AD_REPORT_DATA_MAX_LENGTH))) +#define GAP_LE_SCAN_REPORTS_BUFFER_SIZE \ + (4 * (sizeof(GAPLERawAdReport) + (2 * GAP_LE_AD_REPORT_DATA_MAX_LENGTH))) //! @internal //! This is a semi-processed advertisement report. It is "raw" in the sense that @@ -19,8 +19,8 @@ //! stuff into a circular buffer. typedef struct { //! Is the advertiser's address a public address or random address? - bool is_random_address:1; - uint8_t rsvd:7; // free for use + bool is_random_address : 1; + uint8_t rsvd : 7; // free for use //! The address of the advertiser BTDeviceInternal address; diff --git a/src/fw/comm/ble/gap_le_slave_discovery.c b/src/fw/comm/ble/gap_le_slave_discovery.c index c26f93bc81..1037146446 100644 --- a/src/fw/comm/ble/gap_le_slave_discovery.c +++ b/src/fw/comm/ble/gap_le_slave_discovery.c @@ -32,9 +32,7 @@ static GAPLEAdvertisingJobRef s_discovery_advert_job; // ----------------------------------------------------------------------------- //! Handles unscheduling of the discovery advertisement job. -static void prv_job_unschedule_callback(GAPLEAdvertisingJobRef job, - bool completed, - void *cb_data) { +static void prv_job_unschedule_callback(GAPLEAdvertisingJobRef job, bool completed, void *cb_data) { // Cleanup: s_discovery_advert_job = NULL; } @@ -55,8 +53,8 @@ static void prv_schedule_ad_job(void) { // Advertise "BR/EDR Not Supported" alongside General Discoverable: these are // BLE-only watches, so dual-mode hosts must connect over LE instead of attempting // a classic page (which would time out). - ble_ad_set_flags(ad, GAP_LE_AD_FLAGS_GEN_DISCOVERABLE_MASK | - GAP_LE_AD_FLAGS_BR_EDR_NOT_SUPPORTED_MASK); + ble_ad_set_flags( + ad, GAP_LE_AD_FLAGS_GEN_DISCOVERABLE_MASK | GAP_LE_AD_FLAGS_BR_EDR_NOT_SUPPORTED_MASK); // *DO NOT* use pebble_bt_uuid_expand() here! // ble_ad_set_service_uuids() will be "smart" and include only the 16-bit UUID, but only if the @@ -99,30 +97,27 @@ static void prv_schedule_ad_job(void) { union { uint8_t flags; struct { - bool is_running_recovery_firmware:1; - bool is_first_use:1; + bool is_running_recovery_firmware : 1; + bool is_first_use : 1; }; }; } mfg_data = { - .payload_type = 0 /* For future proofing. Only one type for now.*/, - .hw_platform = TINTIN_METADATA.hw_platform, - .color = mfg_info_get_watch_color(), - .fw_version = { - .major = GIT_MAJOR_VERSION, - .minor = GIT_MINOR_VERSION, - .patch = GIT_PATCH_VERSION, - }, - .is_running_recovery_firmware = TINTIN_METADATA.is_recovery_firmware, - .is_first_use = false, // !getting_started_is_complete(), // TODO + .payload_type = 0 /* For future proofing. Only one type for now.*/, + .hw_platform = TINTIN_METADATA.hw_platform, + .color = mfg_info_get_watch_color(), + .fw_version = + { + .major = GIT_MAJOR_VERSION, + .minor = GIT_MINOR_VERSION, + .patch = GIT_PATCH_VERSION, + }, + .is_running_recovery_firmware = TINTIN_METADATA.is_recovery_firmware, + .is_first_use = false, // !getting_started_is_complete(), // TODO }; - memcpy(&mfg_data.serial_number, - mfg_get_serial_number(), - MFG_SERIAL_NUMBER_SIZE); - - ble_ad_set_manufacturer_specific_data(ad, - BT_VENDOR_ID, - (const uint8_t *) &mfg_data, - sizeof(struct ManufacturerSpecificData)); + memcpy(&mfg_data.serial_number, mfg_get_serial_number(), MFG_SERIAL_NUMBER_SIZE); + + ble_ad_set_manufacturer_specific_data(ad, BT_VENDOR_ID, (const uint8_t *)&mfg_data, + sizeof(struct ManufacturerSpecificData)); // Values chosen according to Apple Accessory Design Guidelines. const GAPLEAdvertisingJobTerm advert_terms[] = { diff --git a/src/fw/comm/ble/gap_le_slave_reconnect.c b/src/fw/comm/ble/gap_le_slave_reconnect.c index c1c4f415cd..838ec1280d 100644 --- a/src/fw/comm/ble/gap_le_slave_reconnect.c +++ b/src/fw/comm/ble/gap_le_slave_reconnect.c @@ -26,9 +26,9 @@ static bool s_is_basic_reconnection_enabled; static bool s_is_hrm_reconnection_enabled; typedef enum { - ReconnectType_None, // Not advertising for reconnection - ReconnectType_Plain, // Advertising for reconnection with empty payload - ReconnectType_BleHrm // Advertising for reconnection with HRM payload + ReconnectType_None, // Not advertising for reconnection + ReconnectType_Plain, // Advertising for reconnection with empty payload + ReconnectType_BleHrm // Advertising for reconnection with HRM payload } ReconnectType; //! When the master reconnects and drops repeatedly (e.g. supervision timeouts @@ -55,8 +55,7 @@ static bool prv_should_skip_short_interval(void) { // ----------------------------------------------------------------------------- //! Static, internal helper functions -static void prv_advert_job_unscheduled_callback(GAPLEAdvertisingJobRef job, - bool completed, +static void prv_advert_job_unscheduled_callback(GAPLEAdvertisingJobRef job, bool completed, void *data) { // bt_lock() is still held for us by gap_le_advert s_reconnect_advert_job = NULL; @@ -106,8 +105,8 @@ static void prv_evaluate(ReconnectType prev_type) { // fitness apps to be able to reconnect to Pebble as BLE HRM. ad = ble_ad_create(); // BLE-only watch: advertise "BR/EDR Not Supported" so dual-mode hosts use LE. - ble_ad_set_flags(ad, GAP_LE_AD_FLAGS_GEN_DISCOVERABLE_MASK | - GAP_LE_AD_FLAGS_BR_EDR_NOT_SUPPORTED_MASK); + ble_ad_set_flags( + ad, GAP_LE_AD_FLAGS_GEN_DISCOVERABLE_MASK | GAP_LE_AD_FLAGS_BR_EDR_NOT_SUPPORTED_MASK); Uuid service_uuid = bt_uuid_expand_16bit(0x180D); ble_ad_set_service_uuids(ad, &service_uuid, 1); } else { @@ -128,8 +127,8 @@ static void prv_evaluate(ReconnectType prev_type) { // still leave out the flags. static BLEAdData payload = { - .ad_data_length = 0, - .scan_resp_data_length = 0, + .ad_data_length = 0, + .scan_resp_data_length = 0, }; ad = &payload; } @@ -155,9 +154,9 @@ static void prv_evaluate(ReconnectType prev_type) { num_terms = 1; } - s_reconnect_advert_job = gap_le_advert_schedule( - ad, terms, num_terms, - prv_advert_job_unscheduled_callback, NULL, GAPLEAdvertisingJobTagReconnection); + s_reconnect_advert_job = + gap_le_advert_schedule(ad, terms, num_terms, prv_advert_job_unscheduled_callback, NULL, + GAPLEAdvertisingJobTagReconnection); if (use_hrm_payload) { ble_ad_destroy(ad); @@ -185,7 +184,7 @@ void gap_le_slave_reconnect_stop(void) { // ----------------------------------------------------------------------------- void gap_le_slave_reconnect_start(void) { #ifdef CONFIG_RECOVERY_FW - return; // Only use discoverable packet for PRF + return; // Only use discoverable packet for PRF #endif bt_lock(); { @@ -233,8 +232,8 @@ void gap_le_slave_reconnect_hrm_restart(void) { // Always restart the timer: if (!regular_timer_is_scheduled(&s_hrm_reconnect_timer)) { - s_hrm_reconnect_timer = (RegularTimerInfo) { - .cb = prv_hrm_reconnect_timeout_timer_callback, + s_hrm_reconnect_timer = (RegularTimerInfo){ + .cb = prv_hrm_reconnect_timeout_timer_callback, }; regular_timer_add_multisecond_callback(&s_hrm_reconnect_timer, RECONNECT_HRM_TIMEOUT_SECS); } diff --git a/src/fw/comm/ble/gatt.c b/src/fw/comm/ble/gatt.c index 396f425fb7..6055c34f73 100644 --- a/src/fw/comm/ble/gatt.c +++ b/src/fw/comm/ble/gatt.c @@ -60,9 +60,8 @@ void bt_driver_cb_gatt_handle_mtu_update(const GattDeviceMtuUpdateEvent *event) if (!connection) { goto unlock; } - - PBL_LOG_INFO("Handle MTU change from %d to %d bytes", - connection->gatt_mtu, event->mtu); + + PBL_LOG_INFO("Handle MTU change from %d to %d bytes", connection->gatt_mtu, event->mtu); connection->gatt_mtu = event->mtu; } unlock: @@ -81,10 +80,8 @@ void bt_driver_cb_gatt_handle_notification(const GattServerNotifIndicEvent *even return; } - gatt_client_subscriptions_handle_server_notification(connection, - event->attr_handle, - event->attr_val, - event->attr_val_len); + gatt_client_subscriptions_handle_server_notification(connection, event->attr_handle, + event->attr_val, event->attr_val_len); PBL_LOG_VERBOSE("GATT Server Notification for handle %u " BT_DEVICE_ADDRESS_FMT, event->attr_handle, BT_DEVICE_ADDRESS_XPLODE(event->dev_address)); } @@ -97,13 +94,13 @@ void bt_driver_cb_gatt_handle_indication(const GattServerNotifIndicEvent *event) connection = gap_le_connection_by_addr(&event->dev_address); PBL_LOG_VERBOSE("GATT Server Indication for handle %u " BT_DEVICE_ADDRESS_FMT, - event->attr_handle, - BT_DEVICE_ADDRESS_XPLODE(event->dev_address)); + event->attr_handle, BT_DEVICE_ADDRESS_XPLODE(event->dev_address)); // We are done if we got disconnected in the meantime or if this is a Service Changed indication // consumed by gatt_service_changed.c - done = (connection == NULL) || gatt_service_changed_client_handle_indication( - connection, event->attr_handle, event->attr_val, event->attr_val_len); + done = (connection == NULL) || + gatt_service_changed_client_handle_indication(connection, event->attr_handle, + event->attr_val, event->attr_val_len); } bt_unlock(); @@ -111,8 +108,8 @@ void bt_driver_cb_gatt_handle_indication(const GattServerNotifIndicEvent *event) return; } - gatt_client_subscriptions_handle_server_notification( - connection, event->attr_handle, event->attr_val, event->attr_val_len); + gatt_client_subscriptions_handle_server_notification(connection, event->attr_handle, + event->attr_val, event->attr_val_len); } void bt_driver_cb_gatt_handle_buffer_empty(const GattDeviceBufferEmptyEvent *event) { @@ -126,15 +123,15 @@ void bt_driver_cb_gatt_handle_buffer_empty(const GattDeviceBufferEmptyEvent *eve PebbleTaskBitset task_mask = gap_le_connect_task_mask_for_connection(connection); PebbleEvent e = { - .type = PEBBLE_BLE_GATT_CLIENT_EVENT, - .task_mask = task_mask, - .bluetooth = { - .le = { - .gatt_client = { - .subtype = PebbleBLEGATTClientEventTypeBufferEmpty, - }, + .type = PEBBLE_BLE_GATT_CLIENT_EVENT, + .task_mask = task_mask, + .bluetooth = { + .le = { + .gatt_client = { + .subtype = PebbleBLEGATTClientEventTypeBufferEmpty, + }, + }, }, - }, }; event_put(&e); } diff --git a/src/fw/comm/ble/gatt_client_accessors.c b/src/fw/comm/ble/gatt_client_accessors.c index bdcd68d1f3..a6393d9e70 100644 --- a/src/fw/comm/ble/gatt_client_accessors.c +++ b/src/fw/comm/ble/gatt_client_accessors.c @@ -24,12 +24,12 @@ // and forced to be always set for a reference. This way, 0 is never used and // we can use it to symbolize an "invalid reference". -#define MACHINE_WORD_MSB (((uintptr_t) 1) << ((sizeof(uintptr_t) * 8) - 1)) +#define MACHINE_WORD_MSB (((uintptr_t)1) << ((sizeof(uintptr_t) * 8) - 1)) static uintptr_t prv_get_generation(const GAPLEConnection *connection) { const uintptr_t mask = ~MACHINE_WORD_MSB; const uint32_t timestamp = (connection->ticks_since_connection / RTC_TICKS_HZ); - return mask & ((uintptr_t) timestamp); + return mask & ((uintptr_t)timestamp); } //! Please don't use directly, but use the prv_get_..._ref helpers so that the @@ -37,7 +37,7 @@ static uintptr_t prv_get_generation(const GAPLEConnection *connection) { //! @see prv_get_object_by_ref for the inverse static uintptr_t prv_get_ref(const GAPLEConnection *connection, const void *object) { const uintptr_t generation = prv_get_generation(connection); - return (((uintptr_t)(void *) object) ^ generation) | MACHINE_WORD_MSB; + return (((uintptr_t)(void *)object) ^ generation) | MACHINE_WORD_MSB; } static uintptr_t prv_get_service_ref(const GAPLEConnection *connection, @@ -58,11 +58,10 @@ static uintptr_t prv_get_descriptor_ref(const GAPLEConnection *connection, //! Please don't use directly, but use the prv_get_...by_ref helpers so that the //! compiler can catch type errors. //! @see prv_get_ref for the inverse -static void * prv_get_object_by_ref(const GAPLEConnection *connection, - uintptr_t ref) { +static void *prv_get_object_by_ref(const GAPLEConnection *connection, uintptr_t ref) { const uintptr_t generation = prv_get_generation(connection); const uintptr_t mask = ~MACHINE_WORD_MSB; - return (void *) ((ref ^ generation) & mask); + return (void *)((ref ^ generation) & mask); } //! Returns internal GATTServiceNode associated with the connection and service reference. @@ -90,26 +89,23 @@ typedef struct { } GATTIterationCallbacks; static bool prv_find_service_node_by_att_handle_callback(ListNode *node, void *cb_data) { - const uint16_t att_handle = (uintptr_t) cb_data; - const GATTServiceNode *service_node = (const GATTServiceNode *) node; + const uint16_t att_handle = (uintptr_t)cb_data; + const GATTServiceNode *service_node = (const GATTServiceNode *)node; return (service_node->service->att_handle == att_handle); } //! Find a sibling service node with given ATT handle -static const GATTServiceNode * prv_find_service_node_by_att_handle( - const GATTServiceNode *service_node, - uint16_t att_handle) { - return (const GATTServiceNode *) list_find_next((ListNode *)service_node, - prv_find_service_node_by_att_handle_callback, - true /* wrap around end */, - (void *)(uintptr_t) att_handle); +static const GATTServiceNode *prv_find_service_node_by_att_handle( + const GATTServiceNode *service_node, uint16_t att_handle) { + return (const GATTServiceNode *)list_find_next( + (ListNode *)service_node, prv_find_service_node_by_att_handle_callback, + true /* wrap around end */, (void *)(uintptr_t)att_handle); } //! @return false if an iterator callback indicated it should not continue iterating, //! or true if the iterator reached the end completely. static bool prv_iter_service_node(const GATTServiceNode *service_node, - const GATTIterationCallbacks *callbacks, - void *cb_data) { + const GATTIterationCallbacks *callbacks, void *cb_data) { const GATTService *service = service_node->service; // Walk all the characteristics for the service: @@ -134,18 +130,17 @@ static bool prv_iter_service_node(const GATTServiceNode *service_node, } characteristic = - (const GATTCharacteristic *) &characteristic->descriptors[characteristic->num_descriptors]; + (const GATTCharacteristic *)&characteristic->descriptors[characteristic->num_descriptors]; } // Walk all the Included Services: - if (callbacks->included_services_iterator && - service->num_att_handles_included_services) { + if (callbacks->included_services_iterator && service->num_att_handles_included_services) { // Included Services handles are tacked at the end, after the *last* descriptor of the *last* // characteristic. The `characteristic` variable is pointing to the end at this point. - const uint16_t *handle = (const uint16_t *) characteristic; + const uint16_t *handle = (const uint16_t *)characteristic; for (int h = 0; h < service->num_att_handles_included_services; ++h) { - const GATTServiceNode *inc_service_node = prv_find_service_node_by_att_handle(service_node, - handle[h]); + const GATTServiceNode *inc_service_node = + prv_find_service_node_by_att_handle(service_node, handle[h]); if (inc_service_node) { callbacks->included_services_iterator(inc_service_node, cb_data); } else { @@ -167,7 +162,7 @@ typedef struct { static bool prv_find_connection_and_service_node_by_service_ref_find_cb(GAPLEConnection *connection, void *cb_data) { - FindServiceNodeByRefCtx *ctx = (FindServiceNodeByRefCtx *) cb_data; + FindServiceNodeByRefCtx *ctx = (FindServiceNodeByRefCtx *)cb_data; ListNode *head = &connection->gatt_remote_services->node; const GATTServiceNode *service_node = prv_get_service_by_ref(connection, ctx->service_ref); if (list_contains(head, &service_node->node)) { @@ -181,14 +176,14 @@ static bool prv_find_connection_and_service_node_by_service_ref_find_cb(GAPLECon //! Based on a potentially invalid service reference, find the internal GATTServiceNode and //! GAPLEConnection. This function is actually safe to call with an invalid / bogus service ref. -static const GATTServiceNode * prv_find_service_and_connection(BLEService service_ref, - const GAPLEConnection **out_connection) { +static const GATTServiceNode *prv_find_service_and_connection( + BLEService service_ref, const GAPLEConnection **out_connection) { // Find the GAPLEConnection & GATTServiceNode with the BLEService service_ref: FindServiceNodeByRefCtx ctx = { - .service_ref = service_ref, + .service_ref = service_ref, }; const GAPLEConnection *connection = - gap_le_connection_find(prv_find_connection_and_service_node_by_service_ref_find_cb, &ctx); + gap_le_connection_find(prv_find_connection_and_service_node_by_service_ref_find_cb, &ctx); if (connection) { if (out_connection) { *out_connection = connection; @@ -211,7 +206,7 @@ typedef struct { } FindObjectByRefCtx; static bool prv_find_characteristic_cb(const GATTCharacteristic *characteristic, void *cb_data) { - FindObjectByRefCtx *ctx = (FindObjectByRefCtx *) cb_data; + FindObjectByRefCtx *ctx = (FindObjectByRefCtx *)cb_data; if (ctx->object_ref_in == prv_get_ref(ctx->connection_out, characteristic)) { ctx->characteristic_out = characteristic; return false /* should_continue */; @@ -220,7 +215,7 @@ static bool prv_find_characteristic_cb(const GATTCharacteristic *characteristic, } static bool prv_find_descriptor_cb(const GATTDescriptor *descriptor, void *cb_data) { - FindObjectByRefCtx *ctx = (FindObjectByRefCtx *) cb_data; + FindObjectByRefCtx *ctx = (FindObjectByRefCtx *)cb_data; if (ctx->object_ref_in == prv_get_ref(ctx->connection_out, descriptor)) { ctx->descriptor_out = descriptor; return false /* should_continue */; @@ -232,19 +227,19 @@ static bool prv_find_descriptor_cb(const GATTDescriptor *descriptor, void *cb_da //! descriptor. It's kind of ugly, I know. static bool prv_track_last_characteristic_cb(const GATTCharacteristic *characteristic, void *cb_data) { - FindObjectByRefCtx *ctx = (FindObjectByRefCtx *) cb_data; + FindObjectByRefCtx *ctx = (FindObjectByRefCtx *)cb_data; ctx->characteristic_out = characteristic; return true /* should_continue */; } static bool prv_find_service_containing_object_by_ref_find_cb(ListNode *node, void *cb_data) { - FindObjectByRefCtx *ctx = (FindObjectByRefCtx *) cb_data; - const GATTServiceNode *service_node = (const GATTServiceNode *) node; + FindObjectByRefCtx *ctx = (FindObjectByRefCtx *)cb_data; + const GATTServiceNode *service_node = (const GATTServiceNode *)node; // Bail out early if the object reference resolves to an address outside of the service blob: - const uintptr_t object_addr = (uintptr_t) prv_get_object_by_ref(ctx->connection_out, - ctx->object_ref_in); - const uintptr_t service_node_addr = (uintptr_t) (void *) service_node->service; + const uintptr_t object_addr = + (uintptr_t)prv_get_object_by_ref(ctx->connection_out, ctx->object_ref_in); + const uintptr_t service_node_addr = (uintptr_t)(void *)service_node->service; const size_t size_bytes = service_node->service->size_bytes; if (object_addr < service_node_addr || object_addr >= service_node_addr + size_bytes) { return false /* should_stop -- list_find() is different... */; @@ -255,31 +250,29 @@ static bool prv_find_service_containing_object_by_ref_find_cb(ListNode *node, vo } static bool prv_find_connection_and_object_by_ref_find_cb(GAPLEConnection *connection, - void *cb_data) { - FindObjectByRefCtx *ctx = (FindObjectByRefCtx *) cb_data; + void *cb_data) { + FindObjectByRefCtx *ctx = (FindObjectByRefCtx *)cb_data; // connection needed by: // - prv_find_service_containing_object_by_ref_list_find_cb // - prv_find_characteristic_cb ctx->connection_out = connection; ListNode *head = &connection->gatt_remote_services->node; - ctx->service_node_out = - (const GATTServiceNode *) list_find(head, prv_find_service_containing_object_by_ref_find_cb, - cb_data); + ctx->service_node_out = (const GATTServiceNode *)list_find( + head, prv_find_service_containing_object_by_ref_find_cb, cb_data); return (ctx->service_node_out != NULL); } -static void prv_find_object(uintptr_t object_ref, - const GATTDescriptor **descriptor_out, +static void prv_find_object(uintptr_t object_ref, const GATTDescriptor **descriptor_out, const GATTCharacteristic **characteristic_out, const GATTServiceNode **service_node_out, const GAPLEConnection **connection_out, const GATTIterationCallbacks *object_iter_callbacks) { FindObjectByRefCtx ctx = { - .object_ref_in = object_ref, - .object_iter_callbacks_in = object_iter_callbacks, + .object_ref_in = object_ref, + .object_iter_callbacks_in = object_iter_callbacks, }; const GAPLEConnection *connection = - gap_le_connection_find(prv_find_connection_and_object_by_ref_find_cb, &ctx); + gap_le_connection_find(prv_find_connection_and_object_by_ref_find_cb, &ctx); if (connection_out) { *connection_out = connection; } @@ -297,11 +290,11 @@ static void prv_find_object(uintptr_t object_ref, //! Based on a potentially invalid characteristic reference, find the internal GATTCharacteristic //! and GAPLEConnection. //! This function is actually safe to call with an invalid / bogus characteristic reference. -static const GATTCharacteristic * prv_find_characteristic(BLECharacteristic characteristic_ref, - const GATTServiceNode **service_node_out, - const GAPLEConnection **connection_out) { +static const GATTCharacteristic *prv_find_characteristic(BLECharacteristic characteristic_ref, + const GATTServiceNode **service_node_out, + const GAPLEConnection **connection_out) { const GATTIterationCallbacks object_iter_callbacks = { - .characteristic_iterator = prv_find_characteristic_cb, + .characteristic_iterator = prv_find_characteristic_cb, }; const GATTCharacteristic *characteristic; prv_find_object(characteristic_ref, NULL, &characteristic, service_node_out, connection_out, @@ -312,13 +305,13 @@ static const GATTCharacteristic * prv_find_characteristic(BLECharacteristic char //! Based on a potentially invalid descriptor reference, find the internal GATTDescriptor and //! GAPLEConnection. //! This function is actually safe to call with an invalid / bogus descriptor reference. -static const GATTDescriptor * prv_find_descriptor(BLEDescriptor descriptor_ref, - const GATTCharacteristic **characteristic_out, - const GATTServiceNode **service_node_out, - const GAPLEConnection **connection_out) { +static const GATTDescriptor *prv_find_descriptor(BLEDescriptor descriptor_ref, + const GATTCharacteristic **characteristic_out, + const GATTServiceNode **service_node_out, + const GAPLEConnection **connection_out) { const GATTIterationCallbacks object_iter_callbacks = { - .characteristic_iterator = prv_track_last_characteristic_cb, - .descriptor_iterator = prv_find_descriptor_cb, + .characteristic_iterator = prv_track_last_characteristic_cb, + .descriptor_iterator = prv_find_descriptor_cb, }; const GATTDescriptor *descriptor; const GATTCharacteristic *characteristic; @@ -332,16 +325,15 @@ static const GATTDescriptor * prv_find_descriptor(BLEDescriptor descriptor_ref, // ------------------------------------------------------------------------------------------------- -uint8_t gatt_client_copy_service_refs(const BTDeviceInternal *device, - BLEService services_out[], +uint8_t gatt_client_copy_service_refs(const BTDeviceInternal *device, BLEService services_out[], uint8_t num_services) { - return gatt_client_copy_service_refs_matching_uuid( - device, services_out, num_services, NULL); + return gatt_client_copy_service_refs_matching_uuid(device, services_out, num_services, NULL); } -uint8_t gatt_client_copy_service_refs_by_discovery_generation( - const BTDeviceInternal *device, BLEService services_out[], - uint8_t num_services, uint8_t discovery_gen) { +uint8_t gatt_client_copy_service_refs_by_discovery_generation(const BTDeviceInternal *device, + BLEService services_out[], + uint8_t num_services, + uint8_t discovery_gen) { uint8_t index = 0; bt_lock(); { @@ -359,7 +351,7 @@ uint8_t gatt_client_copy_service_refs_by_discovery_generation( } ++index; } - node = (GATTServiceNode *) node->node.next; + node = (GATTServiceNode *)node->node.next; } } unlock: @@ -370,8 +362,7 @@ uint8_t gatt_client_copy_service_refs_by_discovery_generation( } uint8_t gatt_client_copy_service_refs_matching_uuid(const BTDeviceInternal *device, - BLEService services_out[], - uint8_t num_services, + BLEService services_out[], uint8_t num_services, const Uuid *matching_service_uuid) { uint8_t index = 0; bt_lock(); @@ -383,15 +374,15 @@ uint8_t gatt_client_copy_service_refs_matching_uuid(const BTDeviceInternal *devi } GATTServiceNode *node = connection->gatt_remote_services; while (node) { - const bool is_match = (!matching_service_uuid || - uuid_equal(matching_service_uuid, &node->service->uuid)); + const bool is_match = + (!matching_service_uuid || uuid_equal(matching_service_uuid, &node->service->uuid)); if (is_match) { if (index < num_services) { services_out[index] = prv_get_service_ref(connection, node); } ++index; } - node = (GATTServiceNode *) node->node.next; + node = (GATTServiceNode *)node->node.next; } } unlock: @@ -409,7 +400,7 @@ typedef struct { uintptr_t *refs_out; uint8_t num_found; uint8_t num_max; - const Uuid * const matching_uuids; + const Uuid *const matching_uuids; } CopyRefsCtx; //! Please do not use the functions that take GATTObjectHeader directly, but use the typed versions @@ -417,9 +408,8 @@ typedef struct { //! prv_copy_included_service_refs_cb. This way the compiler can detect type errors. //! Copies the reference for object into the CopyRefsCtx->refs_out array -static bool prv_copy_refs_cb(const GATTObjectHeader *object, - void *cb_data) { - CopyRefsCtx *ctx = (CopyRefsCtx *) cb_data; +static bool prv_copy_refs_cb(const GATTObjectHeader *object, void *cb_data) { + CopyRefsCtx *ctx = (CopyRefsCtx *)cb_data; int index = ctx->num_found++; if (index < ctx->num_max) { ctx->refs_out[index] = prv_get_ref(ctx->connection, object); @@ -429,9 +419,8 @@ static bool prv_copy_refs_cb(const GATTObjectHeader *object, //! Copies the reference for object into the CopyRefsCtx->refs_out array, only when //! its Uuid is found in the matching_uuids array -static bool prv_copy_refs_matching_cb(const GATTObjectHeader *object, - void *cb_data) { - CopyRefsCtx *ctx = (CopyRefsCtx *) cb_data; +static bool prv_copy_refs_matching_cb(const GATTObjectHeader *object, void *cb_data) { + CopyRefsCtx *ctx = (CopyRefsCtx *)cb_data; for (int i = 0; i < ctx->num_max; ++i) { if (uuid_equal(&ctx->matching_uuids[i], &object->uuid)) { ctx->refs_out[i] = prv_get_ref(ctx->connection, object); @@ -446,20 +435,19 @@ static bool prv_copy_refs_matching_cb(const GATTObjectHeader *object, //! Copies the reference for characteristic into the CopyRefsCtx->refs_out array static bool prv_copy_characteristic_refs_cb(const GATTCharacteristic *characteristic, void *cb_data) { - return prv_copy_refs_cb((const GATTObjectHeader *) characteristic, cb_data); + return prv_copy_refs_cb((const GATTObjectHeader *)characteristic, cb_data); } //! Copies the reference for characteristic into the CopyRefsCtx->refs_out array, only when //! its Uuid is found in the matching_uuids array static bool prv_copy_characteristic_refs_matching_cb(const GATTCharacteristic *characteristic, - void *cb_data) { - return prv_copy_refs_matching_cb((const GATTObjectHeader *) characteristic, cb_data); + void *cb_data) { + return prv_copy_refs_matching_cb((const GATTObjectHeader *)characteristic, cb_data); } //! Copies the reference for included service into the CopyRefsCtx->refs_out array -static bool prv_copy_included_service_refs_cb(const GATTServiceNode *inc_service, - void *cb_data) { - return prv_copy_refs_cb((const GATTObjectHeader *) inc_service, cb_data); +static bool prv_copy_included_service_refs_cb(const GATTServiceNode *inc_service, void *cb_data) { + return prv_copy_refs_cb((const GATTObjectHeader *)inc_service, cb_data); } //! Copies object references associated with service_ref into refs_out. @@ -469,20 +457,19 @@ static bool prv_copy_included_service_refs_cb(const GATTServiceNode *inc_service //! @param matching_uuids If not NULL, only copy references for objects with a matching Uuid //! @param callbacks These callbacks determine references for what objects need to be copied out //! (characteristics, descriptors or included services) -static uint8_t prv_locked_copy_refs_with_service_ref(BLEService service_ref, - uintptr_t refs_out[], +static uint8_t prv_locked_copy_refs_with_service_ref(BLEService service_ref, uintptr_t refs_out[], uint8_t num_refs_out, const Uuid *matching_uuids, const GATTIterationCallbacks *callbacks) { CopyRefsCtx ctx = { - .refs_out = refs_out, - .num_max = num_refs_out, - .matching_uuids = matching_uuids, + .refs_out = refs_out, + .num_max = num_refs_out, + .matching_uuids = matching_uuids, }; bt_lock(); { - const GATTServiceNode *service_node = prv_find_service_and_connection(service_ref, - &ctx.connection); + const GATTServiceNode *service_node = + prv_find_service_and_connection(service_ref, &ctx.connection); if (!service_node) { goto unlock; } @@ -501,7 +488,7 @@ uint8_t gatt_client_service_get_characteristics(BLEService service_ref, BLECharacteristic characteristics[], uint8_t num_characteristics) { const GATTIterationCallbacks callbacks = { - .characteristic_iterator = prv_copy_characteristic_refs_cb, + .characteristic_iterator = prv_copy_characteristic_refs_cb, }; return prv_locked_copy_refs_with_service_ref(service_ref, characteristics, num_characteristics, NULL, &callbacks); @@ -509,12 +496,11 @@ uint8_t gatt_client_service_get_characteristics(BLEService service_ref, // ------------------------------------------------------------------------------------------------- -uint8_t gatt_client_service_get_characteristics_matching_uuids(BLEService service_ref, - BLECharacteristic characteristics[], - const Uuid matching_characteristic_uuids[], - uint8_t num_characteristics) { +uint8_t gatt_client_service_get_characteristics_matching_uuids( + BLEService service_ref, BLECharacteristic characteristics[], + const Uuid matching_characteristic_uuids[], uint8_t num_characteristics) { const GATTIterationCallbacks callbacks = { - .characteristic_iterator = prv_copy_characteristic_refs_matching_cb, + .characteristic_iterator = prv_copy_characteristic_refs_matching_cb, }; // Set all elements to BLE_CHARACTERISTIC_INVALID first: memset(characteristics, 0, sizeof(characteristics[0]) * num_characteristics); @@ -524,14 +510,13 @@ uint8_t gatt_client_service_get_characteristics_matching_uuids(BLEService servic // ------------------------------------------------------------------------------------------------- -uint8_t gatt_client_service_get_included_services(BLEService service_ref, - BLEService services_out[], - uint8_t num_services_out) { +uint8_t gatt_client_service_get_included_services(BLEService service_ref, BLEService services_out[], + uint8_t num_services_out) { const GATTIterationCallbacks callbacks = { - .included_services_iterator = prv_copy_included_service_refs_cb, + .included_services_iterator = prv_copy_included_service_refs_cb, }; - return prv_locked_copy_refs_with_service_ref(service_ref, services_out, num_services_out, - NULL, &callbacks); + return prv_locked_copy_refs_with_service_ref(service_ref, services_out, num_services_out, NULL, + &callbacks); } // ------------------------------------------------------------------------------------------------- @@ -575,8 +560,8 @@ BTDeviceInternal gatt_client_service_get_device(BLEService service_ref) { Uuid gatt_client_characteristic_get_uuid(BLECharacteristic characteristic_ref) { bt_lock(); - const GATTCharacteristic * const characteristic = prv_find_characteristic(characteristic_ref, - NULL, NULL); + const GATTCharacteristic *const characteristic = + prv_find_characteristic(characteristic_ref, NULL, NULL); // MT: Working around compiler bug in gcc 4.7.2, when written using ?: it generates broken code Uuid characteristic_uuid = UUID_INVALID; if (characteristic) { @@ -589,10 +574,10 @@ Uuid gatt_client_characteristic_get_uuid(BLECharacteristic characteristic_ref) { // ------------------------------------------------------------------------------------------------- BLEAttributeProperty gatt_client_characteristic_get_properties( - BLECharacteristic characteristic_ref) { + BLECharacteristic characteristic_ref) { bt_lock(); - const GATTCharacteristic * const characteristic = prv_find_characteristic(characteristic_ref, - NULL, NULL); + const GATTCharacteristic *const characteristic = + prv_find_characteristic(characteristic_ref, NULL, NULL); const uint8_t properties = characteristic ? characteristic->properties : 0; bt_unlock(); return properties; @@ -605,8 +590,8 @@ BLEService gatt_client_characteristic_get_service(BLECharacteristic characterist const GATTServiceNode *service_node = NULL; const GAPLEConnection *connection; prv_find_characteristic(characteristic_ref, &service_node, &connection); - const BLEService service_ref = service_node ? - prv_get_service_ref(connection, service_node) : BLE_SERVICE_INVALID; + const BLEService service_ref = + service_node ? prv_get_service_ref(connection, service_node) : BLE_SERVICE_INVALID; bt_unlock(); return service_ref; } @@ -628,20 +613,20 @@ BTDeviceInternal gatt_client_characteristic_get_device(BLECharacteristic charact GAPLEConnection *gatt_client_characteristic_get_connection(BLECharacteristic characteristic_ref) { bt_lock_assert_held(true); GAPLEConnection *connection; - prv_find_characteristic(characteristic_ref, NULL, (const GAPLEConnection **) &connection); + prv_find_characteristic(characteristic_ref, NULL, (const GAPLEConnection **)&connection); return connection; } // ------------------------------------------------------------------------------------------------- uint8_t gatt_client_characteristic_get_descriptors(BLECharacteristic characteristic_ref, - BLEDescriptor descriptor_refs_out[], - uint8_t num_descriptors) { + BLEDescriptor descriptor_refs_out[], + uint8_t num_descriptors) { uint8_t index = 0; bt_lock(); const GAPLEConnection *connection; - const GATTCharacteristic *characteristic = prv_find_characteristic(characteristic_ref, NULL, - &connection); + const GATTCharacteristic *characteristic = + prv_find_characteristic(characteristic_ref, NULL, &connection); if (characteristic) { const GATTDescriptor *descriptor = characteristic->descriptors; while (index < characteristic->num_descriptors) { @@ -657,23 +642,21 @@ uint8_t gatt_client_characteristic_get_descriptors(BLECharacteristic characteris } void gatt_client_service_get_all_characteristics_and_descriptors( - GAPLEConnection *connection, GATTService *service, - BLECharacteristic *characteristic_hdls_out, + GAPLEConnection *connection, GATTService *service, BLECharacteristic *characteristic_hdls_out, BLEDescriptor *descriptor_hdls_out) { uint8_t curr_desc_idx = 0; const GATTCharacteristic *characteristic = service->characteristics; for (unsigned int c = 0; c < service->num_characteristics; c++) { for (unsigned int d = 0; d < characteristic->num_descriptors; ++d) { const GATTDescriptor *descriptor = &characteristic->descriptors[d]; - descriptor_hdls_out[curr_desc_idx] = - prv_get_descriptor_ref(connection, descriptor); + descriptor_hdls_out[curr_desc_idx] = prv_get_descriptor_ref(connection, descriptor); curr_desc_idx++; } characteristic_hdls_out[c] = prv_get_characteristic_ref(connection, characteristic); characteristic = - (const GATTCharacteristic *) &characteristic->descriptors[characteristic->num_descriptors]; + (const GATTCharacteristic *)&characteristic->descriptors[characteristic->num_descriptors]; } } @@ -694,13 +677,12 @@ Uuid gatt_client_descriptor_get_uuid(BLEDescriptor descriptor_ref) { // ------------------------------------------------------------------------------------------------- BLECharacteristic gatt_client_descriptor_get_characteristic_and_connection( - BLEDescriptor descriptor_ref, - GAPLEConnection **connection_out); + BLEDescriptor descriptor_ref, GAPLEConnection **connection_out); BLECharacteristic gatt_client_descriptor_get_characteristic(BLEDescriptor descriptor_ref) { bt_lock(); const BLECharacteristic characteristic_ref = - gatt_client_descriptor_get_characteristic_and_connection(descriptor_ref, NULL); + gatt_client_descriptor_get_characteristic_and_connection(descriptor_ref, NULL); bt_unlock(); return characteristic_ref; } @@ -712,9 +694,8 @@ uint16_t gatt_client_characteristic_get_handle_and_connection(BLECharacteristic GAPLEConnection **connection_out) { GAPLEConnection *connection; const GATTServiceNode *service_node; - const GATTCharacteristic *characteristic = - prv_find_characteristic(characteristic_ref, &service_node, - (const GAPLEConnection **) &connection); + const GATTCharacteristic *characteristic = prv_find_characteristic( + characteristic_ref, &service_node, (const GAPLEConnection **)&connection); if (!characteristic) { return GATTHandleInvalid; } @@ -740,7 +721,7 @@ static uint16_t prv_get_largest_att_handle_offset(const GATTService *service) { } characteristic = - (const GATTCharacteristic *) &characteristic->descriptors[characteristic->num_descriptors]; + (const GATTCharacteristic *)&characteristic->descriptors[characteristic->num_descriptors]; } return largest_offset_hdl; } @@ -756,9 +737,9 @@ bool gatt_client_service_get_handle_range(BLEService service_ref, ATTHandleRange uint16_t start_hdl = service_node->service->att_handle; - *range = (ATTHandleRange) { - .start = start_hdl, - .end = start_hdl + prv_get_largest_att_handle_offset(service_node->service), + *range = (ATTHandleRange){ + .start = start_hdl, + .end = start_hdl + prv_get_largest_att_handle_offset(service_node->service), }; } success = true; @@ -776,7 +757,7 @@ uint16_t gatt_client_descriptor_get_handle_and_connection(BLEDescriptor descript GAPLEConnection *connection; const GATTServiceNode *service_node; const GATTDescriptor *descriptor = prv_find_descriptor(descriptor_ref, NULL, &service_node, - (const GAPLEConnection **) &connection); + (const GAPLEConnection **)&connection); if (!descriptor) { return GATTHandleInvalid; } @@ -789,36 +770,32 @@ uint16_t gatt_client_descriptor_get_handle_and_connection(BLEDescriptor descript // ------------------------------------------------------------------------------------------------- //! @note !!! To access the returned GAPLEConnection bt_lock MUST be held!!! -const GATTCharacteristic * gatt_client_find_characteristic(BLECharacteristic characteristic_ref, - const GATTServiceNode **service_node_out, - const GAPLEConnection **connection_out) { +const GATTCharacteristic *gatt_client_find_characteristic(BLECharacteristic characteristic_ref, + const GATTServiceNode **service_node_out, + const GAPLEConnection **connection_out) { return prv_find_characteristic(characteristic_ref, service_node_out, connection_out); } - // ------------------------------------------------------------------------------------------------- //! Used by gatt_client_subscription.c //! @note !!! To access the returned GAPLEConnection bt_lock MUST be held!!! BLEDescriptor gatt_client_accessors_find_cccd_with_characteristic( - BLECharacteristic characteristic_ref, - uint8_t *characteristic_properties_out, - uint16_t *characteristic_att_handle_out, - GAPLEConnection **connection_out) { + BLECharacteristic characteristic_ref, uint8_t *characteristic_properties_out, + uint16_t *characteristic_att_handle_out, GAPLEConnection **connection_out) { const GAPLEConnection *connection; const GATTServiceNode *service_node; - const GATTCharacteristic *characteristic = gatt_client_find_characteristic(characteristic_ref, - &service_node, - &connection); + const GATTCharacteristic *characteristic = + gatt_client_find_characteristic(characteristic_ref, &service_node, &connection); if (characteristic) { *characteristic_properties_out = characteristic->properties; const Uuid cccd_uuid = bt_uuid_expand_16bit(0x2902); for (unsigned int d = 0; d < characteristic->num_descriptors; ++d) { const GATTDescriptor *descriptor = &characteristic->descriptors[d]; if (uuid_equal(&descriptor->uuid, &cccd_uuid)) { - *connection_out = (GAPLEConnection *) connection; - *characteristic_att_handle_out = characteristic->att_handle_offset + - service_node->service->att_handle; + *connection_out = (GAPLEConnection *)connection; + *characteristic_att_handle_out = + characteristic->att_handle_offset + service_node->service->att_handle; return prv_get_descriptor_ref(connection, descriptor); } } @@ -833,22 +810,22 @@ BLEDescriptor gatt_client_accessors_find_cccd_with_characteristic( //! Used by gatt_client_subscription.c //! @note !!! To access the returned GAPLEConnection bt_lock MUST be held!!! BLECharacteristic gatt_client_descriptor_get_characteristic_and_connection( - BLEDescriptor descriptor_ref, - GAPLEConnection **connection_out) { + BLEDescriptor descriptor_ref, GAPLEConnection **connection_out) { const GATTCharacteristic *characteristic; GAPLEConnection *connection; const GATTDescriptor *descriptor = prv_find_descriptor(descriptor_ref, &characteristic, NULL, - (const GAPLEConnection **) &connection); - const BLECharacteristic characteristic_ref = descriptor ? - prv_get_characteristic_ref(connection, characteristic) : BLE_CHARACTERISTIC_INVALID; + (const GAPLEConnection **)&connection); + const BLECharacteristic characteristic_ref = + descriptor ? prv_get_characteristic_ref(connection, characteristic) + : BLE_CHARACTERISTIC_INVALID; if (connection_out) { *connection_out = connection; } return characteristic_ref; } -BLEService gatt_client_att_handle_get_service( - GAPLEConnection *connection, uint16_t att_handle, const GATTServiceNode **service_node_out) { +BLEService gatt_client_att_handle_get_service(GAPLEConnection *connection, uint16_t att_handle, + const GATTServiceNode **service_node_out) { const GATTServiceNode *node = prv_find_service_node_by_att_handle(connection->gatt_remote_services, att_handle); *service_node_out = node; diff --git a/src/fw/comm/ble/gatt_client_accessors.h b/src/fw/comm/ble/gatt_client_accessors.h index ac83a212f6..7cb8fc1985 100644 --- a/src/fw/comm/ble/gatt_client_accessors.h +++ b/src/fw/comm/ble/gatt_client_accessors.h @@ -16,13 +16,12 @@ typedef struct GATTServiceNode { GATTService *service; } GATTServiceNode; -#define GATTHandleInvalid ((uint16_t) 0) +#define GATTHandleInvalid ((uint16_t)0) //! Copies the BLEService references for the gatt_remote_services associated //! with the device. //! @see prv_handle_service_change in ble_client.c -uint8_t gatt_client_copy_service_refs(const BTDeviceInternal *device, - BLEService services_out[], +uint8_t gatt_client_copy_service_refs(const BTDeviceInternal *device, BLEService services_out[], uint8_t num_services); // TODO: add public API to applib @@ -30,8 +29,7 @@ uint8_t gatt_client_copy_service_refs(const BTDeviceInternal *device, //! with the device, that match a given Service UUID. //! @note It is possible to have multiple service instances with the same Service UUID. uint8_t gatt_client_copy_service_refs_matching_uuid(const BTDeviceInternal *device, - BLEService services_out[], - uint8_t num_services, + BLEService services_out[], uint8_t num_services, const Uuid *matching_service_uuid); //! Copies the BLECharacteristic references associated with the service. @@ -58,10 +56,9 @@ uint8_t gatt_client_service_get_characteristics(BLEService service_ref, //! If there were multiple characteristics with the same Uuid, the first one to be found will be //! copied. //! @see ble_service_get_characteristics -uint8_t gatt_client_service_get_characteristics_matching_uuids(BLEService service_ref, - BLECharacteristic characteristics_out[], - const Uuid matching_characteristic_uuids[], - uint8_t num_characteristics); +uint8_t gatt_client_service_get_characteristics_matching_uuids( + BLEService service_ref, BLECharacteristic characteristics_out[], + const Uuid matching_characteristic_uuids[], uint8_t num_characteristics); //! Gets the Service UUID associated with the service //! @see ble_service_get_uuid @@ -73,8 +70,7 @@ BTDeviceInternal gatt_client_service_get_device(BLEService service_ref); //! Gets the included services associated with the service //! @see ble_service_get_included_services -uint8_t gatt_client_service_get_included_services(BLEService service_ref, - BLEService services_out[], +uint8_t gatt_client_service_get_included_services(BLEService service_ref, BLEService services_out[], uint8_t num_services_out); //! Gets the UUID of the characteristic //! @see ble_characteristic_get_uuid @@ -91,8 +87,8 @@ BTDeviceInternal gatt_client_characteristic_get_device(BLECharacteristic charact //! @see ble_characteristic_get_descriptors uint8_t gatt_client_characteristic_get_descriptors(BLECharacteristic characteristic, - BLEDescriptor descriptors_out[], - uint8_t num_descriptors); + BLEDescriptor descriptors_out[], + uint8_t num_descriptors); //! @see ble_descriptor_get_uuid Uuid gatt_client_descriptor_get_uuid(BLEDescriptor descriptor); diff --git a/src/fw/comm/ble/gatt_client_discovery.c b/src/fw/comm/ble/gatt_client_discovery.c index 8ed3b67fa8..2698643c96 100644 --- a/src/fw/comm/ble/gatt_client_discovery.c +++ b/src/fw/comm/ble/gatt_client_discovery.c @@ -5,7 +5,6 @@ #include "gatt_service_changed.h" #include "gap_le_connection.h" - #include "comm/bt_lock.h" #include "comm/bt_conn_mgr.h" @@ -24,12 +23,13 @@ //! Defined in gatt_client_subscriptions.c. Should only be called when receiving //! notification of a service change -extern void gatt_client_subscription_cleanup_by_att_handle_range( - struct GAPLEConnection *connection, ATTHandleRange *range); +extern void gatt_client_subscription_cleanup_by_att_handle_range(struct GAPLEConnection *connection, + ATTHandleRange *range); //! Defined in gatt_client_accessors.c. Should only be needed in this module -extern BLEService gatt_client_att_handle_get_service( - GAPLEConnection *connection, uint16_t att_handle, GATTServiceNode **service_node_out); +extern BLEService gatt_client_att_handle_get_service(GAPLEConnection *connection, + uint16_t att_handle, + GATTServiceNode **service_node_out); // ------------------------------------------------------------------------------------------------- // Static function prototypes @@ -48,16 +48,12 @@ typedef struct DiscoveryJobQueue { } DiscoveryJobQueue; // Assumes we are holding the BT lock -static void prv_add_discovery_job( - GAPLEConnection *connection, ATTHandleRange *hdl_range) { +static void prv_add_discovery_job(GAPLEConnection *connection, ATTHandleRange *hdl_range) { DiscoveryJobQueue *node = kernel_zalloc_check(sizeof(DiscoveryJobQueue)); if (hdl_range) { node->hdl = *hdl_range; - } else { // discover everything - node->hdl = (ATTHandleRange) { - .start = MIN_ATT_HANDLE, - .end = MAX_ATT_HANDLE - }; + } else { // discover everything + node->hdl = (ATTHandleRange){.start = MIN_ATT_HANDLE, .end = MAX_ATT_HANDLE}; } if (!connection->discovery_jobs) { @@ -85,19 +81,15 @@ static BTErrno prv_run_next_job(GAPLEConnection *connection) { DiscoveryJobQueue *node = connection->discovery_jobs; if (!node) { - return BTErrnoOK; // no more jobs to run + return BTErrnoOK; // no more jobs to run } // Note, that the job only gets removed from the list after discovery // has finished or error'ed out. That way the watchdog retry mechanism // can simply call this routine again to kick off another discovery attempt - PBL_LOG_INFO("Starting BLE Service Discovery: 0x%x to 0x%x", - node->hdl.start, node->hdl.end); - ATTHandleRange hdl = { - .start = node->hdl.start, - .end = node->hdl.end - }; + PBL_LOG_INFO("Starting BLE Service Discovery: 0x%x to 0x%x", node->hdl.start, node->hdl.end); + ATTHandleRange hdl = {.start = node->hdl.start, .end = node->hdl.end}; // Release bt_lock before calling into Nimble to avoid deadlock. // bt_driver_gatt_start_discovery_range calls pebble_device_to_nimble_conn_handle @@ -177,48 +169,46 @@ static bool prv_discovery_handle_timeout(GAPLEConnection *connection, BTErrno *e } // ------------------------------------------------------------------------------------------------- -extern uint8_t gatt_client_copy_service_refs_by_discovery_generation( - const BTDeviceInternal *device, BLEService services_out[], - uint8_t num_services, uint8_t discovery_gen); +extern uint8_t gatt_client_copy_service_refs_by_discovery_generation(const BTDeviceInternal *device, + BLEService services_out[], + uint8_t num_services, + uint8_t discovery_gen); static void prv_send_event(PebbleBLEGATTClientServiceEventInfo *info) { - PebbleEvent e = (const PebbleEvent) { - .type = PEBBLE_BLE_GATT_CLIENT_EVENT, - .task_mask = 0, - .bluetooth = { - .le = { - .gatt_client_service = { - .info = info, - .subtype = PebbleBLEGATTClientEventTypeServiceChange, - }, + PebbleEvent e = (const PebbleEvent){ + .type = PEBBLE_BLE_GATT_CLIENT_EVENT, + .task_mask = 0, + .bluetooth = { + .le = { + .gatt_client_service = { + .info = info, + .subtype = PebbleBLEGATTClientEventTypeServiceChange, + }, + }, }, - }, }; // TODO: send only to tasks that are connected virtually event_put(&e); } -static void prv_send_services_added_event( - const GAPLEConnection *connection, BTErrno status) { - - uint8_t num_services_changed = (status == BTErrnoOK) ? - list_count(&connection->gatt_remote_services->node) : 0; +static void prv_send_services_added_event(const GAPLEConnection *connection, BTErrno status) { + uint8_t num_services_changed = + (status == BTErrnoOK) ? list_count(&connection->gatt_remote_services->node) : 0; if (num_services_changed > BLE_GATT_MAX_SERVICES_CHANGED) { - PBL_LOG_ERR("Remote has %u services, more than we can handle.", - num_services_changed); + PBL_LOG_ERR("Remote has %u services, more than we can handle.", num_services_changed); num_services_changed = BLE_GATT_MAX_SERVICES_CHANGED; } - size_t space_needed = num_services_changed * sizeof(PebbleBLEGATTClientServiceHandles) - + sizeof(PebbleBLEGATTClientServiceEventInfo); + size_t space_needed = num_services_changed * sizeof(PebbleBLEGATTClientServiceHandles) + + sizeof(PebbleBLEGATTClientServiceEventInfo); PebbleBLEGATTClientServiceEventInfo *info = kernel_zalloc_check(space_needed); - *info = (PebbleBLEGATTClientServiceEventInfo) { - .type = PebbleServicesAdded, - .device = connection->device, - .status = status + *info = (PebbleBLEGATTClientServiceEventInfo){ + .type = PebbleServicesAdded, + .device = connection->device, + .status = status }; info->services_added_data.num_services_added = @@ -229,28 +219,27 @@ static void prv_send_services_added_event( prv_send_event(info); } -static void prv_send_services_invalidate_all_event( - const GAPLEConnection *connection, BTErrno status) { +static void prv_send_services_invalidate_all_event(const GAPLEConnection *connection, + BTErrno status) { PebbleBLEGATTClientServiceEventInfo *info = kernel_zalloc_check(sizeof(PebbleBLEGATTClientServiceEventInfo)); - *info = (PebbleBLEGATTClientServiceEventInfo) { - .type = PebbleServicesInvalidateAll, - .device = connection->device, - .status = status + *info = (PebbleBLEGATTClientServiceEventInfo){ + .type = PebbleServicesInvalidateAll, + .device = connection->device, + .status = status }; prv_send_event(info); } extern void gatt_client_service_get_all_characteristics_and_descriptors( - GAPLEConnection *connection, GATTService *service, - BLECharacteristic *characteristics_hdls_out, + GAPLEConnection *connection, GATTService *service, BLECharacteristic *characteristics_hdls_out, BLEDescriptor *descriptor_hdls_out); //! @note bt_lock is assumed to be taken by the caller -void gatt_client_discovery_handle_service_range_change( - GAPLEConnection *connection, ATTHandleRange *range) { +void gatt_client_discovery_handle_service_range_change(GAPLEConnection *connection, + ATTHandleRange *range) { GATTServiceNode *service_node; BLEService service = gatt_client_att_handle_get_service(connection, range->start, &service_node); @@ -260,15 +249,15 @@ void gatt_client_discovery_handle_service_range_change( } int memory_needed = service_node->service->num_characteristics * sizeof(BLECharacteristic) + - service_node->service->num_descriptors * sizeof(BLEDescriptor); + service_node->service->num_descriptors * sizeof(BLEDescriptor); memory_needed += sizeof(PebbleBLEGATTClientServiceEventInfo) + sizeof(PebbleBLEGATTClientServiceHandles); PebbleBLEGATTClientServiceEventInfo *info = kernel_zalloc_check(memory_needed); - *info = (PebbleBLEGATTClientServiceEventInfo) { - .type = PebbleServicesRemoved, - .device = connection->device, - .status = BTErrnoOK + *info = (PebbleBLEGATTClientServiceEventInfo){ + .type = PebbleServicesRemoved, + .device = connection->device, + .status = BTErrnoOK }; info->services_removed_data.num_services_removed = 1; @@ -280,13 +269,12 @@ void gatt_client_discovery_handle_service_range_change( remove_hdl->num_characteristics = service_node->service->num_characteristics; remove_hdl->num_descriptors = service_node->service->num_descriptors; gatt_client_service_get_all_characteristics_and_descriptors( - connection, service_node->service, - &remove_hdl->char_and_desc_handles[0], + connection, service_node->service, &remove_hdl->char_and_desc_handles[0], &remove_hdl->char_and_desc_handles[service_node->service->num_characteristics]); // a service has been removed/updated gatt_client_subscription_cleanup_by_att_handle_range(connection, range); - ListNode **head = (ListNode **) &connection->gatt_remote_services; + ListNode **head = (ListNode **)&connection->gatt_remote_services; list_remove((ListNode *)service_node, head, NULL); kernel_free(service_node->service); service_node->service = NULL; @@ -298,7 +286,7 @@ void gatt_client_discovery_handle_service_range_change( static void prv_free_service_nodes(GAPLEConnection *connection) { GATTServiceNode *node = connection->gatt_remote_services; while (node) { - GATTServiceNode *next = (GATTServiceNode *) node->node.next; + GATTServiceNode *next = (GATTServiceNode *)node->node.next; kernel_free(node->service); node->service = NULL; kernel_free(node); @@ -312,8 +300,8 @@ static void prv_remove_current_discovery_job(GAPLEConnection *connection) { if (!node) { return; } - list_remove((ListNode *)connection->discovery_jobs, - (ListNode **)&connection->discovery_jobs, NULL); + list_remove((ListNode *)connection->discovery_jobs, (ListNode **)&connection->discovery_jobs, + NULL); kernel_free(node); // Handle the case where we are have received service change indication @@ -323,15 +311,14 @@ static void prv_remove_current_discovery_job(GAPLEConnection *connection) { DiscoveryJobQueue *new_job = connection->discovery_jobs; if (!new_job) { - return; // nothing to do + return; // nothing to do } if ((new_job->hdl.start == MIN_ATT_HANDLE) && (new_job->hdl.end == MAX_ATT_HANDLE)) { // we are rediscovering all services so flush everything prv_free_service_nodes(connection); - prv_send_services_invalidate_all_event( - connection, BTErrnoServiceDiscoveryDatabaseChanged); - } else { // we are rediscovering one service + prv_send_services_invalidate_all_event(connection, BTErrnoServiceDiscoveryDatabaseChanged); + } else { // we are rediscovering one service gatt_client_discovery_handle_service_range_change(connection, &new_job->hdl); } } @@ -353,7 +340,7 @@ static void prv_finalize_discovery(GAPLEConnection *connection, BTErrno errno) { (job && ((job->hdl.start != MIN_ATT_HANDLE) || (job->hdl.end != MAX_ATT_HANDLE))); if (errno != BTErrnoServiceDiscoveryDatabaseChanged) { PBL_LOG_ERR("GATT service discovery failed: errno=%d, range=0x%x-0x%x", errno, - job ? job->hdl.start : 0, job ? job->hdl.end : 0); + job ? job->hdl.start : 0, job ? job->hdl.end : 0); } if (!is_range_job || (errno == BTErrnoServiceDiscoveryDatabaseChanged)) { // Handle failure -- cleanup and dispatch event: @@ -378,9 +365,8 @@ static void prv_finalize_discovery(GAPLEConnection *connection, BTErrno errno) { prv_run_next_job(connection); } -void bt_driver_cb_gatt_client_discovery_handle_indication( - GAPLEConnection *connection, GATTService *service, BTErrno error) { - +void bt_driver_cb_gatt_client_discovery_handle_indication(GAPLEConnection *connection, + GATTService *service, BTErrno error) { // We experienced some kind of conversion error, pass it on if (error != BTErrnoOK) { prv_send_services_added_event(connection, error); @@ -394,7 +380,7 @@ void bt_driver_cb_gatt_client_discovery_handle_indication( bt_lock(); { - ListNode **head = (ListNode **) &connection->gatt_remote_services; + ListNode **head = (ListNode **)&connection->gatt_remote_services; if (*head) { list_append(*head, &node->node); } else { @@ -424,12 +410,12 @@ bool bt_driver_cb_gatt_client_discovery_complete(GAPLEConnection *connection, BT if (errno == BTErrnoOK) { const uint32_t discovery_ms = (rtc_get_ticks() - connection->gatt_discovery_start_ticks) * 1000 / RTC_TICKS_HZ; - PBL_LOG_INFO("GATT service discovery completed in %"PRIu32"ms", discovery_ms); + PBL_LOG_INFO("GATT service discovery completed in %" PRIu32 "ms", discovery_ms); // Completion of service discovery implies we are about to have more BLE // traffic (for example, ANCS notifications, PPoG communication). Keep the // channel at a high throughput speed for a little bit longer to handle these bursts. - conn_mgr_set_ble_conn_response_time(connection, BtConsumerLeServiceDiscovery, - ResponseTimeMin, 10); + conn_mgr_set_ble_conn_response_time(connection, BtConsumerLeServiceDiscovery, ResponseTimeMin, + 10); } if (finalize_discovery) { @@ -459,8 +445,8 @@ BTErrno gatt_client_discovery_discover_all(const BTDeviceInternal *device) { prv_send_services_added_event(connection, BTErrnoOK); goto unlock; } - conn_mgr_set_ble_conn_response_time(connection, BtConsumerLeServiceDiscovery, - ResponseTimeMin, 30); + conn_mgr_set_ble_conn_response_time(connection, BtConsumerLeServiceDiscovery, ResponseTimeMin, + 30); prv_add_discovery_job(connection, NULL); // if we get here there is no discovery in progress so dispatch the job ret_val = prv_run_next_job(connection); diff --git a/src/fw/comm/ble/gatt_client_operations.c b/src/fw/comm/ble/gatt_client_operations.c index 3a7267ae7d..3670bc96c1 100644 --- a/src/fw/comm/ble/gatt_client_operations.c +++ b/src/fw/comm/ble/gatt_client_operations.c @@ -17,8 +17,7 @@ // function and for as long as the result is being used / accessed. extern uint16_t gatt_client_characteristic_get_handle_and_connection( - BLECharacteristic characteristic_ref, - GAPLEConnection **connection_out); + BLECharacteristic characteristic_ref, GAPLEConnection **connection_out); extern uint16_t gatt_client_descriptor_get_handle_and_connection(BLEDescriptor descriptor_ref, GAPLEConnection **connection_out); @@ -53,21 +52,21 @@ static GattClientEventContext *s_client_event_ctxs[GAPLEClientNum]; static void prv_send_event(PebbleBLEGATTClientEventType subtype, GAPLEClient client, uintptr_t object_ref, uint16_t value_length, BLEGATTError gatt_error) { - PebbleEvent e = { + PebbleEvent e = { .type = PEBBLE_BLE_GATT_CLIENT_EVENT, .task_mask = ~(gap_le_pebble_task_bit_for_client(client)), .bluetooth = { - .le = { - .gatt_client = { - .subtype = subtype, - .object_ref = object_ref, - .gatt_error = gatt_error, - .value_length = value_length, + .le = { + .gatt_client = { + .subtype = subtype, + .object_ref = object_ref, + .gatt_error = gatt_error, + .value_length = value_length, + }, }, - }, }, - }; - event_put(&e); + }; + event_put(&e); } static void prv_internal_write_cccd_response_cb(GattClientOpResponseHdr *event) { @@ -88,9 +87,9 @@ static BLEGATTError prv_handle_response(const GattClientOpReadResponse *resp, *gatt_value_length = 0; return BLEGATTErrorLocalInsufficientResources; } - *read_response = (const ReadResponseData) { - .object_ref = data->obj_ref, - .length = val_len, + *read_response = (const ReadResponseData){ + .object_ref = data->obj_ref, + .length = val_len, }; memcpy(read_response->value, resp->value, val_len); if (s_read_responses[data->client]) { @@ -116,8 +115,8 @@ void bt_driver_cb_gatt_client_operations_handle_response(GattClientOpResponseHdr { //! Special case: writes to the "Client Characteristic Configuration Descriptor" are handled by //! the gatt_client_subscriptions.c module. - if (data->client == GAPLEClientKernel - && data->subtype == PebbleBLEGATTClientEventTypeCharacteristicSubscribe) { + if (data->client == GAPLEClientKernel && + data->subtype == PebbleBLEGATTClientEventTypeCharacteristicSubscribe) { prv_internal_write_cccd_response_cb(event); goto cleanup; } @@ -143,7 +142,7 @@ void bt_driver_cb_gatt_client_operations_handle_response(GattClientOpResponseHdr const GattClientOpReadResponse *resp = (GattClientOpReadResponse *)event; PBL_ASSERTN(data->subtype == PebbleBLEGATTClientEventTypeCharacteristicRead || data->subtype == PebbleBLEGATTClientEventTypeDescriptorRead); - gatt_err_code = prv_handle_response(resp, data, &gatt_value_length); + gatt_err_code = prv_handle_response(resp, data, &gatt_value_length); break; } case GattClientOpResponseWrite: { @@ -157,7 +156,6 @@ void bt_driver_cb_gatt_client_operations_handle_response(GattClientOpResponseHdr } prv_send_event(data->subtype, data->client, data->obj_ref, gatt_value_length, gatt_err_code); - } cleanup: @@ -167,8 +165,7 @@ void bt_driver_cb_gatt_client_operations_handle_response(GattClientOpResponseHdr bt_unlock(); } -typedef uint16_t (*HandleAndConnectionGetter)(uintptr_t obj_ref, - GAPLEConnection **connection_out); +typedef uint16_t (*HandleAndConnectionGetter)(uintptr_t obj_ref, GAPLEConnection **connection_out); static GattClientEventContext *prv_create_event_context(GAPLEClient client) { GattClientEventContext *evt_ctx = kernel_zalloc(sizeof(GattClientEventContext)); @@ -266,17 +263,13 @@ static BTErrno prv_write(uintptr_t obj_ref, const uint8_t *value, size_t value_l return ret_val; } -BTErrno gatt_client_op_read(BLECharacteristic characteristic, - GAPLEClient client) { - return prv_read(characteristic, client, - gatt_client_characteristic_get_handle_and_connection, +BTErrno gatt_client_op_read(BLECharacteristic characteristic, GAPLEClient client) { + return prv_read(characteristic, client, gatt_client_characteristic_get_handle_and_connection, PebbleBLEGATTClientEventTypeCharacteristicRead); } -void gatt_client_consume_read_response(uintptr_t object_ref, - uint8_t value_out[], - uint16_t value_length, - GAPLEClient client) { +void gatt_client_consume_read_response(uintptr_t object_ref, uint8_t value_out[], + uint16_t value_length, GAPLEClient client) { bt_lock(); { // For responses with 0 length, no ReadResponseData is created therefore @@ -290,32 +283,28 @@ void gatt_client_consume_read_response(uintptr_t object_ref, if (value_out) { memcpy(value_out, read_response->value, read_response->length); } - list_remove(&read_response->node, (ListNode **) &s_read_responses[client], NULL); + list_remove(&read_response->node, (ListNode **)&s_read_responses[client], NULL); kernel_free(read_response); } bt_unlock(); } -BTErrno gatt_client_op_write(BLECharacteristic characteristic, - const uint8_t *value, - size_t value_length, - GAPLEClient client) { +BTErrno gatt_client_op_write(BLECharacteristic characteristic, const uint8_t *value, + size_t value_length, GAPLEClient client) { return prv_write(characteristic, value, value_length, client, gatt_client_characteristic_get_handle_and_connection, PebbleBLEGATTClientEventTypeCharacteristicWrite); } BTErrno gatt_client_op_write_without_response(BLECharacteristic characteristic, - const uint8_t *value, - size_t value_length, + const uint8_t *value, size_t value_length, GAPLEClient client) { GAPLEConnection *connection; uint16_t att_handle; bt_lock(); { - att_handle = - gatt_client_characteristic_get_handle_and_connection(characteristic, &connection); + att_handle = gatt_client_characteristic_get_handle_and_connection(characteristic, &connection); if (!att_handle) { bt_unlock(); return BTErrnoInvalidParameter; @@ -329,24 +318,20 @@ BTErrno gatt_client_op_write_without_response(BLECharacteristic characteristic, return bt_driver_gatt_write_without_response(connection, value, value_length, att_handle); } -BTErrno gatt_client_op_write_descriptor(BLEDescriptor descriptor, - const uint8_t *value, - size_t value_length, - GAPLEClient client) { +BTErrno gatt_client_op_write_descriptor(BLEDescriptor descriptor, const uint8_t *value, + size_t value_length, GAPLEClient client) { return prv_write(descriptor, value, value_length, client, gatt_client_descriptor_get_handle_and_connection, PebbleBLEGATTClientEventTypeDescriptorWrite); } -BTErrno gatt_client_op_read_descriptor(BLEDescriptor descriptor, - GAPLEClient client) { - return prv_read(descriptor, client, - gatt_client_descriptor_get_handle_and_connection, +BTErrno gatt_client_op_read_descriptor(BLEDescriptor descriptor, GAPLEClient client) { + return prv_read(descriptor, client, gatt_client_descriptor_get_handle_and_connection, PebbleBLEGATTClientEventTypeDescriptorRead); } BTErrno gatt_client_op_write_descriptor_cccd(BLEDescriptor cccd, const uint16_t *value) { - return prv_write(cccd, (const uint8_t *) value, sizeof(*value), GAPLEClientKernel, + return prv_write(cccd, (const uint8_t *)value, sizeof(*value), GAPLEClientKernel, gatt_client_descriptor_get_handle_and_connection, PebbleBLEGATTClientEventTypeCharacteristicSubscribe); } @@ -365,7 +350,7 @@ void gatt_client_op_cleanup(GAPLEClient client) { ReadResponseData *read_response = s_read_responses[client]; while (read_response) { - ReadResponseData *next_read_response = (ReadResponseData *) read_response->node.next; + ReadResponseData *next_read_response = (ReadResponseData *)read_response->node.next; kernel_free(read_response); read_response = next_read_response; } diff --git a/src/fw/comm/ble/gatt_client_operations.h b/src/fw/comm/ble/gatt_client_operations.h index 776fc34a12..83300d41f5 100644 --- a/src/fw/comm/ble/gatt_client_operations.h +++ b/src/fw/comm/ble/gatt_client_operations.h @@ -20,30 +20,21 @@ #define GATT_MTU_MINIMUM (23) -BTErrno gatt_client_op_read(BLECharacteristic characteristic, - GAPLEClient client); +BTErrno gatt_client_op_read(BLECharacteristic characteristic, GAPLEClient client); -void gatt_client_consume_read_response(uintptr_t object_ref, - uint8_t value_out[], - uint16_t value_length, - GAPLEClient client); +void gatt_client_consume_read_response(uintptr_t object_ref, uint8_t value_out[], + uint16_t value_length, GAPLEClient client); -BTErrno gatt_client_op_write(BLECharacteristic characteristic, - const uint8_t *value, - size_t value_length, - GAPLEClient client); +BTErrno gatt_client_op_write(BLECharacteristic characteristic, const uint8_t *value, + size_t value_length, GAPLEClient client); BTErrno gatt_client_op_write_without_response(BLECharacteristic characteristic, - const uint8_t *value, - size_t value_length, + const uint8_t *value, size_t value_length, GAPLEClient client); -BTErrno gatt_client_op_write_descriptor(BLEDescriptor descriptor, - const uint8_t *value, - size_t value_length, - GAPLEClient client); +BTErrno gatt_client_op_write_descriptor(BLEDescriptor descriptor, const uint8_t *value, + size_t value_length, GAPLEClient client); -BTErrno gatt_client_op_read_descriptor(BLEDescriptor descriptor, - GAPLEClient client); +BTErrno gatt_client_op_read_descriptor(BLEDescriptor descriptor, GAPLEClient client); void gatt_client_op_cleanup(GAPLEClient client); diff --git a/src/fw/comm/ble/gatt_client_subscriptions.c b/src/fw/comm/ble/gatt_client_subscriptions.c index b4e1bd5f49..3b0bbba614 100644 --- a/src/fw/comm/ble/gatt_client_subscriptions.c +++ b/src/fw/comm/ble/gatt_client_subscriptions.c @@ -53,14 +53,11 @@ static bool s_is_notification_event_pending[GAPLEClientNum]; // The call below requires the caller to own the bt_lock while calling the // function and for as long as the result is being used / accessed. extern BLEDescriptor gatt_client_accessors_find_cccd_with_characteristic( - BLECharacteristic characteristic_ref, - uint8_t *characteristic_properties_out, - uint16_t *characteristic_att_handle_out, - GAPLEConnection **connection_out); + BLECharacteristic characteristic_ref, uint8_t *characteristic_properties_out, + uint16_t *characteristic_att_handle_out, GAPLEConnection **connection_out); extern BLECharacteristic gatt_client_descriptor_get_characteristic_and_connection( - BLEDescriptor descriptor_ref, - GAPLEConnection **connection_out); + BLEDescriptor descriptor_ref, GAPLEConnection **connection_out); // ------------------------------------------------------------------------------------------------- // Function implemented by the gatt_client_operations module to write the CCCD (to alter the remote @@ -73,9 +70,8 @@ extern BTErrno gatt_client_op_write_descriptor_cccd(BLEDescriptor cccd_ref, // ------------------------------------------------------------------------------------------------- // Static function prototypes -static GATTClientSubscriptionNode * prv_find_subscription_for_characteristic( - BLECharacteristic characteristic_ref, - GAPLEConnection *connection); +static GATTClientSubscriptionNode *prv_find_subscription_for_characteristic( + BLECharacteristic characteristic_ref, GAPLEConnection *connection); static BLESubscription prv_prevailing_subscription_type(GATTClientSubscriptionNode *subscription); @@ -97,16 +93,16 @@ static void prv_unlock(void) { static void prv_send_notification_event(PebbleTaskBitset task_mask) { PebbleEvent e = { - .type = PEBBLE_BLE_GATT_CLIENT_EVENT, - .task_mask = task_mask, - .bluetooth = { - .le = { - .gatt_client = { - .subtype = PebbleBLEGATTClientEventTypeNotification, - .gatt_error = BLEGATTErrorSuccess, - }, + .type = PEBBLE_BLE_GATT_CLIENT_EVENT, + .task_mask = task_mask, + .bluetooth = { + .le = { + .gatt_client = { + .subtype = PebbleBLEGATTClientEventTypeNotification, + .gatt_error = BLEGATTErrorSuccess, + }, + }, }, - }, }; event_put(&e); } @@ -115,25 +111,25 @@ static void prv_send_subscription_event(BLECharacteristic characteristic_ref, PebbleTaskBitset task_mask, BLESubscription type, BLEGATTError gatt_error) { PebbleEvent e = { - .type = PEBBLE_BLE_GATT_CLIENT_EVENT, - .task_mask = task_mask, - .bluetooth = { - .le = { - .gatt_client = { - .subtype = PebbleBLEGATTClientEventTypeCharacteristicSubscribe, - .object_ref = characteristic_ref, - .subscription_type = type, - .gatt_error = gatt_error, - }, + .type = PEBBLE_BLE_GATT_CLIENT_EVENT, + .task_mask = task_mask, + .bluetooth = { + .le = { + .gatt_client = { + .subtype = PebbleBLEGATTClientEventTypeCharacteristicSubscribe, + .object_ref = characteristic_ref, + .subscription_type = type, + .gatt_error = gatt_error, + }, + }, }, - }, }; event_put(&e); } static bool prv_find_subscription_by_att_handle(ListNode *node, void *data) { - const GATTClientSubscriptionNode *subscription = (const GATTClientSubscriptionNode *) node; - const uint16_t att_handle = (const uint16_t)(uintptr_t) data; + const GATTClientSubscriptionNode *subscription = (const GATTClientSubscriptionNode *)node; + const uint16_t att_handle = (const uint16_t)(uintptr_t)data; return (subscription->att_handle == att_handle); } @@ -153,7 +149,7 @@ static bool prv_wait_until_write_space_available(const CircularBuffer *buffer, if (LIKELY(write_space >= required_length)) { if (UNLIKELY(did_stall)) { PBL_LOG_DBG("GATT notification stalled for %d ms...", - (int)(timeout_ms - pbl_ticks_to_ms(timeout_end_ticks - rtc_get_ticks()))); + (int)(timeout_ms - pbl_ticks_to_ms(timeout_end_ticks - rtc_get_ticks()))); } return true; } @@ -180,15 +176,13 @@ static bool prv_wait_until_write_space_available(const CircularBuffer *buffer, //! @note bt_lock may be held by the caller. If the bt_lock is not held we will block for a little //! if the subscription buffer is full void gatt_client_subscriptions_handle_server_notification(GAPLEConnection *connection, - uint16_t att_handle, - const uint8_t *value, + uint16_t att_handle, const uint8_t *value, uint16_t length) { bt_lock(); - ListNode *head = (ListNode *) connection->gatt_subscriptions; - const GATTClientSubscriptionNode *subscription = - (const GATTClientSubscriptionNode *) list_find(head, prv_find_subscription_by_att_handle, - (void *)(uintptr_t) att_handle); + ListNode *head = (ListNode *)connection->gatt_subscriptions; + const GATTClientSubscriptionNode *subscription = (const GATTClientSubscriptionNode *)list_find( + head, prv_find_subscription_by_att_handle, (void *)(uintptr_t)att_handle); if (UNLIKELY(!subscription)) { // MT: I suspect this can be hit when the remote remembers the CCCD subscription state across // disconnections (while we don't remember it across disconnections). @@ -214,8 +208,8 @@ void gatt_client_subscriptions_handle_server_notification(GAPLEConnection *conne } // Write the header first, then write the payload: GATTBufferedNotificationHeader header = { - .characteristic = subscription->characteristic, - .value_length = length, + .characteristic = subscription->characteristic, + .value_length = length, }; CircularBuffer *buffer = s_circular_buffer[c]; bt_unlock(); @@ -223,18 +217,19 @@ void gatt_client_subscriptions_handle_server_notification(GAPLEConnection *conne // If we do not hold the bt_lock() at this point it's safe to block for a little bit waiting // for notifications to be consumed uint32_t write_timeout = bt_lock_is_held() ? 0 : CONFIG_BLE_GATT_NOTIF_WRITE_TIMEOUT_MS; - bool consumed = prv_wait_until_write_space_available(buffer, (sizeof(header) + length), - write_timeout); + bool consumed = + prv_wait_until_write_space_available(buffer, (sizeof(header) + length), write_timeout); bt_lock(); if (!consumed) { - PBL_LOG_ERR("Subscription buffer full. Dropping GATT notification of %u bytes (bt_lock held: %s)", - length, bt_lock_is_held() ? "yes" : "no"); + PBL_LOG_ERR( + "Subscription buffer full. Dropping GATT notification of %u bytes (bt_lock held: %s)", + length, bt_lock_is_held() ? "yes" : "no"); continue; } prv_lock(); { - circular_buffer_write(buffer, (const uint8_t *) &header, sizeof(header)); + circular_buffer_write(buffer, (const uint8_t *)&header, sizeof(header)); circular_buffer_write(buffer, value, length); if (UNLIKELY(!s_is_notification_event_pending[c])) { task_mask &= ~gap_le_pebble_task_bit_for_client(c); @@ -253,12 +248,10 @@ void gatt_client_subscriptions_handle_server_notification(GAPLEConnection *conne // ------------------------------------------------------------------------------------------------- -static GATTClientSubscriptionNode * prv_find_subscription_and_connection_for_cccd( - BLEDescriptor cccd_ref, - GAPLEConnection **connection_out) { +static GATTClientSubscriptionNode *prv_find_subscription_and_connection_for_cccd( + BLEDescriptor cccd_ref, GAPLEConnection **connection_out) { BLECharacteristic characteristic_ref = - gatt_client_descriptor_get_characteristic_and_connection(cccd_ref, - connection_out); + gatt_client_descriptor_get_characteristic_and_connection(cccd_ref, connection_out); if (!*connection_out) { return NULL; } @@ -272,7 +265,7 @@ static GATTClientSubscriptionNode * prv_find_subscription_and_connection_for_ccc void gatt_client_subscriptions_handle_write_cccd_response(BLEDescriptor cccd, BLEGATTError error) { GAPLEConnection *connection; GATTClientSubscriptionNode *subscription = - prv_find_subscription_and_connection_for_cccd(cccd, &connection); + prv_find_subscription_and_connection_for_cccd(cccd, &connection); if (!subscription || !connection) { // FIXME: When unsubscribing, the GATTClientSubscriptionNode is already removed at this point PBL_LOG_DBG("No subscription and/or connection found for CCCD write response (%u)", error); @@ -284,8 +277,8 @@ void gatt_client_subscriptions_handle_write_cccd_response(BLEDescriptor cccd, BL PebbleTaskBitset task_mask = task_mask_none; const bool has_error = (error != BLEGATTErrorSuccess); - const BLESubscription type = has_error ? - BLESubscriptionNone : prv_prevailing_subscription_type(subscription); + const BLESubscription type = + has_error ? BLESubscriptionNone : prv_prevailing_subscription_type(subscription); for (GAPLEClient c = 0; c < GAPLEClientNum; ++c) { if (subscription->pending_confirmation[c]) { subscription->pending_confirmation[c] = false; @@ -328,9 +321,8 @@ bool prv_get_next_notification_header(GAPLEClient client, GATTBufferedNotificationHeader *header_out) { bool has_notification = false; GATTBufferedNotificationHeader header; - const uint16_t copied_length = circular_buffer_copy(s_circular_buffer[client], - (uint8_t *) &header, - sizeof(header)); + const uint16_t copied_length = + circular_buffer_copy(s_circular_buffer[client], (uint8_t *)&header, sizeof(header)); if (copied_length == sizeof(header)) { has_notification = true; if (header_out) { @@ -373,7 +365,7 @@ uint16_t gatt_client_subscriptions_consume_notification(BLECharacteristic *chara prv_lock(); { if (!prv_check_buffer(client)) { - has_more = false; // the client went away + has_more = false; // the client went away goto unlock; } @@ -382,41 +374,37 @@ uint16_t gatt_client_subscriptions_consume_notification(BLECharacteristic *chara if (LIKELY(has_notification)) { if (LIKELY(*value_length_in_out >= header.value_length)) { const uint16_t copied_length = - circular_buffer_copy_offset(s_circular_buffer[client], - sizeof(header), /* skip header */ - value_out, - header.value_length); + circular_buffer_copy_offset(s_circular_buffer[client], sizeof(header), /* skip header */ + value_out, header.value_length); if (UNLIKELY(copied_length != header.value_length)) { - PBL_LOG_ERR("Couldn't copy the number of requested byes (%u vs %u)", - header.value_length, copied_length); + PBL_LOG_ERR("Couldn't copy the number of requested byes (%u vs %u)", header.value_length, + copied_length); } *characteristic_ref_out = header.characteristic; *value_length_in_out = copied_length; } else { PBL_LOG_ERR("Client didn't provide buffer that was big enough (%u vs %u)", - *value_length_in_out, header.value_length); + *value_length_in_out, header.value_length); *characteristic_ref_out = BLE_CHARACTERISTIC_INVALID; *value_length_in_out = 0; } // Always eat the notification: - circular_buffer_consume(s_circular_buffer[client], - sizeof(header) + header.value_length); + circular_buffer_consume(s_circular_buffer[client], sizeof(header) + header.value_length); } else { PBL_LOG_WRN("Consume called while no notifications in buffer"); *characteristic_ref_out = BLE_CHARACTERISTIC_INVALID; *value_length_in_out = 0; } - has_more = has_notification && - prv_get_next_notification_header(client, &next_header); + has_more = has_notification && prv_get_next_notification_header(client, &next_header); } unlock: - if (!has_more) { - s_is_notification_event_pending[client] = false; - } - if (has_more_out) { - *has_more_out = has_more; - } + if (!has_more) { + s_is_notification_event_pending[client] = false; + } + if (has_more_out) { + *has_more_out = has_more; + } prv_unlock(); @@ -469,13 +457,13 @@ static bool prv_retain_buffer(GAPLEClient client) { const size_t size = sizeof(CircularBuffer) + GATT_CLIENT_SUBSCRIPTIONS_BUFFER_SIZE; // TODO: Use app_malloc for the storage when client is app // https://pebbletechnology.atlassian.net/browse/PBL-14151 - uint8_t *buffer = (uint8_t *) kernel_zalloc(size); + uint8_t *buffer = (uint8_t *)kernel_zalloc(size); if (!buffer) { rv = false; goto unlock; } - CircularBuffer *circular_buffer = (CircularBuffer *) buffer; - circular_buffer_init(circular_buffer, (uint8_t *) (circular_buffer + 1), + CircularBuffer *circular_buffer = (CircularBuffer *)buffer; + circular_buffer_init(circular_buffer, (uint8_t *)(circular_buffer + 1), GATT_CLIENT_SUBSCRIPTIONS_BUFFER_SIZE); s_circular_buffer[client] = circular_buffer; } @@ -489,17 +477,16 @@ static bool prv_retain_buffer(GAPLEClient client) { // ------------------------------------------------------------------------------------------------- static bool prv_find_subscription_cb(ListNode *node, void *data) { - const GATTClientSubscriptionNode *subscription = (const GATTClientSubscriptionNode *) node; - const BLECharacteristic characteristic_ref = (BLECharacteristic) data; + const GATTClientSubscriptionNode *subscription = (const GATTClientSubscriptionNode *)node; + const BLECharacteristic characteristic_ref = (BLECharacteristic)data; return (subscription->characteristic == characteristic_ref); } -static GATTClientSubscriptionNode * prv_find_subscription_for_characteristic( - BLECharacteristic characteristic_ref, - GAPLEConnection *connection) { - ListNode *head = (ListNode *) connection->gatt_subscriptions; - return (GATTClientSubscriptionNode *) list_find(head, prv_find_subscription_cb, - (void *) characteristic_ref); +static GATTClientSubscriptionNode *prv_find_subscription_for_characteristic( + BLECharacteristic characteristic_ref, GAPLEConnection *connection) { + ListNode *head = (ListNode *)connection->gatt_subscriptions; + return (GATTClientSubscriptionNode *)list_find(head, prv_find_subscription_cb, + (void *)characteristic_ref); } // ------------------------------------------------------------------------------------------------- @@ -514,8 +501,8 @@ static bool prv_has_pending_cccd_write(GATTClientSubscriptionNode *subscription) } static BLESubscription prv_prevailing_subscription_type(GATTClientSubscriptionNode *subscription) { - const BLESubscription orred = subscription->subscriptions[GAPLEClientApp] | - subscription->subscriptions[GAPLEClientKernel]; + const BLESubscription orred = + subscription->subscriptions[GAPLEClientApp] | subscription->subscriptions[GAPLEClientKernel]; // Notifications wins over None and Indications: if (orred & BLESubscriptionNotifications) { return BLESubscriptionNotifications; @@ -549,23 +536,21 @@ static bool prv_sanitize_subscription_type(BLESubscription *subscription_type, static void prv_remove_subscription(GAPLEConnection *connection, GATTClientSubscriptionNode *subscription) { - list_remove(&subscription->node, - (ListNode **) &connection->gatt_subscriptions, NULL); + list_remove(&subscription->node, (ListNode **)&connection->gatt_subscriptions, NULL); kernel_free(subscription); } // ------------------------------------------------------------------------------------------------- static BTErrno prv_subscribe(BLECharacteristic characteristic_ref, - BLESubscription subscription_type, - GAPLEClient client, bool is_cleaning_up) { + BLESubscription subscription_type, GAPLEClient client, + bool is_cleaning_up) { BLESubscription previous_prevailing_type = BLESubscriptionNone; GAPLEConnection *connection; uint8_t supported_properties; uint16_t att_handle; - BLEDescriptor cccd_ref = - gatt_client_accessors_find_cccd_with_characteristic(characteristic_ref, &supported_properties, - &att_handle, &connection); + BLEDescriptor cccd_ref = gatt_client_accessors_find_cccd_with_characteristic( + characteristic_ref, &supported_properties, &att_handle, &connection); if (cccd_ref == BLE_DESCRIPTOR_INVALID || !connection) { // Invalid characteristic or characteristic does not have a CCCD return BTErrnoInvalidParameter; @@ -578,7 +563,7 @@ static BTErrno prv_subscribe(BLECharacteristic characteristic_ref, // Try to find existing subscription GATTClientSubscriptionNode *subscription = - prv_find_subscription_for_characteristic(characteristic_ref, connection); + prv_find_subscription_for_characteristic(characteristic_ref, connection); bool did_create_new_subscription = false; if (subscription) { if (subscription->subscriptions[client] == subscription_type) { @@ -596,20 +581,20 @@ static BTErrno prv_subscribe(BLECharacteristic characteristic_ref, return BTErrnoInvalidState; } // No subscriptions for the characteristic yet, go create one: - subscription = (GATTClientSubscriptionNode *) kernel_malloc(sizeof(GATTClientSubscriptionNode)); + subscription = (GATTClientSubscriptionNode *)kernel_malloc(sizeof(GATTClientSubscriptionNode)); if (!subscription) { // OOM return BTErrnoNotEnoughResources; } // Initialize it: - *subscription = (const GATTClientSubscriptionNode) { - .characteristic = characteristic_ref, - .att_handle = att_handle, + *subscription = (const GATTClientSubscriptionNode){ + .characteristic = characteristic_ref, + .att_handle = att_handle, }; // Prepend to the list of subscriptions of the connection: ListNode *head = &connection->gatt_subscriptions->node; connection->gatt_subscriptions = - (GATTClientSubscriptionNode *) list_prepend(head, &subscription->node); + (GATTClientSubscriptionNode *)list_prepend(head, &subscription->node); PBL_LOG_DBG("Added BLE subscription for handle 0x%x", att_handle); did_create_new_subscription = true; @@ -696,11 +681,10 @@ static BTErrno prv_subscribe(BLECharacteristic characteristic_ref, } BTErrno gatt_client_subscriptions_subscribe(BLECharacteristic characteristic_ref, - BLESubscription subscription_type, - GAPLEClient client) { + BLESubscription subscription_type, GAPLEClient client) { bt_lock(); - BTErrno ret_val = prv_subscribe(characteristic_ref, subscription_type, client, - false /* is_cleaning_up */); + BTErrno ret_val = + prv_subscribe(characteristic_ref, subscription_type, client, false /* is_cleaning_up */); bt_unlock(); return ret_val; } @@ -708,11 +692,11 @@ BTErrno gatt_client_subscriptions_subscribe(BLECharacteristic characteristic_ref // ------------------------------------------------------------------------------------------------- bool prv_cleanup_subscriptions_for_client(GAPLEConnection *connection, void *data) { - const GAPLEClient client = (const GAPLEClient)(uintptr_t) data; + const GAPLEClient client = (const GAPLEClient)(uintptr_t)data; GATTClientSubscriptionNode *subscription = connection->gatt_subscriptions; while (subscription) { GATTClientSubscriptionNode *next_subscription = - (GATTClientSubscriptionNode *) subscription->node.next; + (GATTClientSubscriptionNode *)subscription->node.next; // If subscribed, unsubscribe: if (subscription->subscriptions[client] != BLESubscriptionNone) { prv_subscribe(subscription->characteristic, BLESubscriptionNone, client, @@ -727,7 +711,7 @@ void gatt_client_subscriptions_cleanup_by_client(GAPLEClient client) { bt_lock(); { // Walk all the connections to find subscriptions to unsubscribe: - gap_le_connection_find(prv_cleanup_subscriptions_for_client, (void *)(uintptr_t) client); + gap_le_connection_find(prv_cleanup_subscriptions_for_client, (void *)(uintptr_t)client); } bt_unlock(); } @@ -740,15 +724,14 @@ void gatt_client_subscriptions_cleanup_by_connection(struct GAPLEConnection *con { GATTClientSubscriptionNode *node = connection->gatt_subscriptions; while (node) { - GATTClientSubscriptionNode *next = (GATTClientSubscriptionNode *) node->node.next; + GATTClientSubscriptionNode *next = (GATTClientSubscriptionNode *)node->node.next; // Decrement circular buffer retain count: for (GAPLEClient c = 0; c < GAPLEClientNum; ++c) { if (node->subscriptions[c] != BLESubscriptionNone) { if (should_unsubscribe) { // The connection is not gone, so unsubscribe for this client, this will also // free the GATTClientSubscriptionNode when both clients are unsubscribed: - prv_subscribe(node->characteristic, BLESubscriptionNone, c, - true /* is_cleaning_up */); + prv_subscribe(node->characteristic, BLESubscriptionNone, c, true /* is_cleaning_up */); } else { // Just release the buffer on behalf of the subscription prv_release_buffer(c); @@ -767,20 +750,18 @@ void gatt_client_subscriptions_cleanup_by_connection(struct GAPLEConnection *con bt_unlock(); } -void gatt_client_subscription_cleanup_by_att_handle_range( - struct GAPLEConnection *connection, ATTHandleRange *range) { - +void gatt_client_subscription_cleanup_by_att_handle_range(struct GAPLEConnection *connection, + ATTHandleRange *range) { bt_lock(); { GATTClientSubscriptionNode *node = connection->gatt_subscriptions; while (node) { - GATTClientSubscriptionNode *next = (GATTClientSubscriptionNode *) node->node.next; + GATTClientSubscriptionNode *next = (GATTClientSubscriptionNode *)node->node.next; if (node->att_handle >= range->start && node->att_handle <= range->end) { for (GAPLEClient c = 0; c < GAPLEClientNum; ++c) { - prv_subscribe(node->characteristic, BLESubscriptionNone, c, - true); + prv_subscribe(node->characteristic, BLESubscriptionNone, c, true); } } node = next; @@ -800,7 +781,7 @@ T_STATIC bool gatt_client_get_event_pending_state(GAPLEClient client) { #endif //! Only for unit tests -struct pbl_sem * gatt_client_subscription_get_semaphore(void) { +struct pbl_sem *gatt_client_subscription_get_semaphore(void) { return &s_gatt_client_subscriptions_semphr; } diff --git a/src/fw/comm/ble/gatt_client_subscriptions.h b/src/fw/comm/ble/gatt_client_subscriptions.h index baf573434d..c2d3c27e14 100644 --- a/src/fw/comm/ble/gatt_client_subscriptions.h +++ b/src/fw/comm/ble/gatt_client_subscriptions.h @@ -13,7 +13,7 @@ struct GAPLEConnection; #define MAX_ATT_WRITE_PAYLOAD_SIZE (ATT_MAX_SUPPORTED_MTU - 3) -#define GATT_CLIENT_SUBSCRIPTIONS_BUFFER_SIZE \ +#define GATT_CLIENT_SUBSCRIPTIONS_BUFFER_SIZE \ ((MAX_ATT_WRITE_PAYLOAD_SIZE + sizeof(GATTBufferedNotificationHeader)) * \ CONFIG_BLE_GATT_SUBSCRIPTION_DEPTH) @@ -45,8 +45,7 @@ typedef struct PACKED { } GATTBufferedNotificationHeader; BTErrno gatt_client_subscriptions_subscribe(BLECharacteristic characteristic, - BLESubscription subscription_type, - GAPLEClient client); + BLESubscription subscription_type, GAPLEClient client); //! Gets the length of the next notification in the buffer that was received. //! @param client The client for which to get the next notification header. diff --git a/src/fw/comm/ble/gatt_service_changed.c b/src/fw/comm/ble/gatt_service_changed.c index 3e325ae572..6826161873 100644 --- a/src/fw/comm/ble/gatt_service_changed.c +++ b/src/fw/comm/ble/gatt_service_changed.c @@ -21,13 +21,12 @@ extern void gatt_client_discovery_handle_service_range_change(GAPLEConnection *c extern void gatt_client_discovery_discover_range(GAPLEConnection *connection, ATTHandleRange *hdl_range); - //////////////////////////////////////////////////////////////////////////////////////////////////// // Client -- Pebble consuming the remote's "Service Changed" characteristic static void prv_rediscover_kernelbg_cb(void *data) { // Rediscover the world: - BTDeviceInternal *device = (BTDeviceInternal *) data; + BTDeviceInternal *device = (BTDeviceInternal *)data; const BTErrno e = gatt_client_discovery_rediscover_all(device); kernel_free(device); if (e != BTErrnoOK) { @@ -44,17 +43,17 @@ bool gatt_service_changed_client_handle_indication(struct GAPLEConnection *conne } if (value_length != sizeof(ATTHandleRange)) { PBL_LOG_ERR("Service Changed Indication incorrect length: %u", value_length); - // Pretend we ate the indication. There will be no GAPLECharacteristic in the system that will - // match this ATT handle anyway. + // Pretend we ate the indication. There will be no GAPLECharacteristic in the system that will + // match this ATT handle anyway. return true; } - ATTHandleRange *range = (ATTHandleRange *) value; + ATTHandleRange *range = (ATTHandleRange *)value; PBL_LOG_DBG("Service Changed Indication: %x - %x", range->start, range->end); // Initiate rediscovery on KernelBG if the Server is asking us to rediscover everything // (See "2.5.2 Attribute Caching" in BT Core Specification) if ((range->start == 0x001 && range->end == 0xFFFF)) { - BTDeviceInternal *device = (BTDeviceInternal *) kernel_malloc_check(sizeof(BTDeviceInternal)); + BTDeviceInternal *device = (BTDeviceInternal *)kernel_malloc_check(sizeof(BTDeviceInternal)); *device = connection->device; system_task_add_callback(prv_rediscover_kernelbg_cb, device); return true; @@ -74,7 +73,6 @@ bool gatt_service_changed_client_handle_indication(struct GAPLEConnection *conne return true; } - //////////////////////////////////////////////////////////////////////////////////////////////////// // Server -- Pebble serving up the "Service Changed" characteristic to the remote @@ -104,8 +102,8 @@ void gatt_service_changed_server_handle_fw_update(void) { void bt_driver_cb_gatt_service_changed_server_confirmation( const GattServerChangedConfirmationEvent *event) { if (event->status_code != HciStatusCode_Success) { - PBL_LOG_ERR("Service Changed indication confirmation failure (timed out?) %"PRIu32, - (uint32_t)event->status_code); + PBL_LOG_ERR("Service Changed indication confirmation failure (timed out?) %" PRIu32, + (uint32_t)event->status_code); } } @@ -151,8 +149,7 @@ static void prv_send_indication_timer_cb(void *ctx) { system_task_add_callback(prv_send_service_changed_indication, connection); } -void bt_driver_cb_gatt_service_changed_server_subscribe( - const GattServerSubscribeEvent *event) { +void bt_driver_cb_gatt_service_changed_server_subscribe(const GattServerSubscribeEvent *event) { // Create timer outside of bt_lock to avoid deadlock with NimbleHost. // new_timer_create() acquires TaskTimerManager mutex, which may be held by NimbleHost // when it's trying to acquire bt_lock, leading to a lock ordering deadlock. @@ -190,7 +187,7 @@ void bt_driver_cb_gatt_service_changed_server_subscribe( new_timer_start(connection->gatt_service_changed_indication_timer, GATT_SERVICE_CHANGED_INDICATION_DELAY_MS, prv_send_indication_timer_cb, connection, 0); - timer = TIMER_INVALID_ID; // Timer now owned by connection, don't delete it below + timer = TIMER_INVALID_ID; // Timer now owned by connection, don't delete it below --s_service_changed_indications_left; // Don't send again for this connection: connection->has_sent_gatt_service_changed_indication = true; @@ -198,7 +195,7 @@ void bt_driver_cb_gatt_service_changed_server_subscribe( } unlock: bt_unlock(); - + // Clean up timer if we didn't use it if (timer != TIMER_INVALID_ID) { new_timer_delete(timer); @@ -234,7 +231,7 @@ void command_ble_send_service_changed_indication(void) { void command_ble_rediscover(void) { // assume we only have one connection for debug GAPLEConnection *conn_hdl = gap_le_connection_any(); - BTDeviceInternal *device = (BTDeviceInternal *) kernel_malloc_check(sizeof(BTDeviceInternal)); + BTDeviceInternal *device = (BTDeviceInternal *)kernel_malloc_check(sizeof(BTDeviceInternal)); *device = conn_hdl->device; system_task_add_callback(prv_rediscover_kernelbg_cb, device); } diff --git a/src/fw/comm/ble/kernel_le_client/ams/ams.c b/src/fw/comm/ble/kernel_le_client/ams/ams.c index b8048cdc1e..5ae23ea428 100644 --- a/src/fw/comm/ble/kernel_le_client/ams/ams.c +++ b/src/fw/comm/ble/kernel_le_client/ams/ams.c @@ -97,8 +97,7 @@ static void prv_music_command_send(MusicCommand command) { } static MusicServerCapability prv_music_get_capability_bitset(void) { - return (MusicServerCapabilityPlaybackStateReporting | - MusicServerCapabilityProgressReporting | + return (MusicServerCapabilityPlaybackStateReporting | MusicServerCapabilityProgressReporting | MusicServerCapabilityVolumeReporting); } @@ -144,13 +143,13 @@ static void prv_music_request_low_latency_for_period(uint32_t period_ms) { } static const MusicServerImplementation s_ams_music_implementation = { - .debug_name = "AMS", - .is_command_supported = prv_music_is_command_supported, - .command_send = prv_music_command_send, - .needs_user_to_start_playback_on_phone = prv_music_needs_user_to_start_playback_on_phone, - .get_capability_bitset = prv_music_get_capability_bitset, - .request_reduced_latency = prv_music_request_reduced_latency, - .request_low_latency_for_period = prv_music_request_low_latency_for_period, + .debug_name = "AMS", + .is_command_supported = prv_music_is_command_supported, + .command_send = prv_music_command_send, + .needs_user_to_start_playback_on_phone = prv_music_needs_user_to_start_playback_on_phone, + .get_capability_bitset = prv_music_get_capability_bitset, + .request_reduced_latency = prv_music_request_reduced_latency, + .request_low_latency_for_period = prv_music_request_low_latency_for_period, }; // ------------------------------------------------------------------------------------------------- @@ -181,45 +180,44 @@ static AMSCharacteristic prv_get_id_for_characteristic(BLECharacteristic charact static const uint8_t *prv_get_registration_cmd_for_entity(AMSEntityID entity_id, uint8_t *cmd_length_out) { static const uint8_t register_for_player_entity_updates_cmd[] = { - AMSEntityIDPlayer, - // Apple bug #21283910 - // http://www.openradar.me/radar?id=6752237204275200 - // Registering for the Player Name attribute can cause BTLEServer to crash repeatedly. - // (verified in iOS 8.3 and iOS 9 beta 1) - // AMSPlayerAttributeIDName, - AMSPlayerAttributeIDPlaybackInfo, - AMSPlayerAttributeIDVolume, + AMSEntityIDPlayer, + // Apple bug #21283910 + // http://www.openradar.me/radar?id=6752237204275200 + // Registering for the Player Name attribute can cause BTLEServer to crash repeatedly. + // (verified in iOS 8.3 and iOS 9 beta 1) + // AMSPlayerAttributeIDName, + AMSPlayerAttributeIDPlaybackInfo, + AMSPlayerAttributeIDVolume, }; static const uint8_t register_for_queue_entity_updates_cmd[] = { - AMSEntityIDQueue, - AMSQueueAttributeIDIndex, - AMSQueueAttributeIDCount, - AMSQueueAttributeIDShuffleMode, - AMSQueueAttributeIDRepeatMode, + AMSEntityIDQueue, + AMSQueueAttributeIDIndex, + AMSQueueAttributeIDCount, + AMSQueueAttributeIDShuffleMode, + AMSQueueAttributeIDRepeatMode, }; static const uint8_t register_for_track_entity_updates_cmd[] = { - AMSEntityIDTrack, - AMSTrackAttributeIDArtist, - AMSTrackAttributeIDAlbum, - AMSTrackAttributeIDTitle, - AMSTrackAttributeIDDuration, + AMSEntityIDTrack, AMSTrackAttributeIDArtist, AMSTrackAttributeIDAlbum, + AMSTrackAttributeIDTitle, AMSTrackAttributeIDDuration, }; static const struct { const uint8_t length; - const uint8_t * const value; + const uint8_t *const value; } packet_length_and_data[NumAMSEntityID] = { - [AMSEntityIDPlayer] = { - .length = sizeof(register_for_player_entity_updates_cmd), - .value = register_for_player_entity_updates_cmd, - }, - [AMSEntityIDQueue] = { - .length = sizeof(register_for_queue_entity_updates_cmd), - .value = register_for_queue_entity_updates_cmd, - }, - [AMSEntityIDTrack] = { - .length = sizeof(register_for_track_entity_updates_cmd), - .value = register_for_track_entity_updates_cmd, - }, + [AMSEntityIDPlayer] = + { + .length = sizeof(register_for_player_entity_updates_cmd), + .value = register_for_player_entity_updates_cmd, + }, + [AMSEntityIDQueue] = + { + .length = sizeof(register_for_queue_entity_updates_cmd), + .value = register_for_queue_entity_updates_cmd, + }, + [AMSEntityIDTrack] = { + .length = sizeof(register_for_track_entity_updates_cmd), + .value = register_for_track_entity_updates_cmd, + }, }; if (cmd_length_out) { *cmd_length_out = packet_length_and_data[entity_id].length; @@ -245,12 +243,11 @@ static void prv_register_next_entity(void *unused) { // queueing up all the writes in one go): const AMSEntityID entity_id = s_ams_client->next_entity_to_register; const BLECharacteristic entity_update_characteristic = - s_ams_client->characteristics[AMSCharacteristicEntityUpdate]; + s_ams_client->characteristics[AMSCharacteristicEntityUpdate]; uint8_t cmd_length = 0; const uint8_t *cmd_value = prv_get_registration_cmd_for_entity(entity_id, &cmd_length); - const BTErrno e = gatt_client_op_write(entity_update_characteristic, - cmd_value, cmd_length, - GAPLEClientKernel); + const BTErrno e = + gatt_client_op_write(entity_update_characteristic, cmd_value, cmd_length, GAPLEClientKernel); if (e != BTErrnoOK) { if (e == BTErrnoNotEnoughResources) { // Need to wait for space to become available @@ -291,11 +288,16 @@ static void prv_handle_player_name_update(const AMSEntityUpdateNotification *upd static MusicPlayState prv_music_playstate_for_ams_playback_state(int32_t ams_playback_state) { switch (ams_playback_state) { - case AMSPlaybackStatePaused: return MusicPlayStatePaused; - case AMSPlaybackStatePlaying: return MusicPlayStatePlaying; - case AMSPlaybackStateRewinding: return MusicPlayStateRewinding; - case AMSPlaybackStateForwarding: return MusicPlayStateForwarding; - default: return MusicPlayStateUnknown; + case AMSPlaybackStatePaused: + return MusicPlayStatePaused; + case AMSPlaybackStatePlaying: + return MusicPlayStatePlaying; + case AMSPlaybackStateRewinding: + return MusicPlayStateRewinding; + case AMSPlaybackStateForwarding: + return MusicPlayStateForwarding; + default: + return MusicPlayStateUnknown; } } @@ -313,22 +315,22 @@ static bool prv_handle_player_playback_info_value(const char *value, uint32_t va int32_t value_out = (idx == AMSPlaybackInfoIdxState) ? -1 : 0; const int32_t multiplier[] = { - // First value is the AMSPlaybackState enum, so unity multiplier: - [AMSPlaybackInfoIdxState] = 1, + // First value is the AMSPlaybackState enum, so unity multiplier: + [AMSPlaybackInfoIdxState] = 1, - // Second value is the playback rate [0.0, 1.0]. We store as percent, so 100x multiplier: - [AMSPlaybackInfoIdxRate] = 100, + // Second value is the playback rate [0.0, 1.0]. We store as percent, so 100x multiplier: + [AMSPlaybackInfoIdxRate] = 100, - // Third value is the elapsed time in seconds. We store as ms, so 1000x multiplier: - [AMSPlaybackInfoIdxElapsedTime] = 1000, + // Third value is the elapsed time in seconds. We store as ms, so 1000x multiplier: + [AMSPlaybackInfoIdxElapsedTime] = 1000, }; - if (value_length && !ams_util_float_string_parse(value, value_length, - multiplier[idx], &value_out)) { + if (value_length && + !ams_util_float_string_parse(value, value_length, multiplier[idx], &value_out)) { PBL_LOG_ERR("AMS playback info value failed to parse: %s", value); return false /* should_continue */; } - PBL_LOG_DBG("Playback info value update %"PRId32"=%"PRId32, idx, value_out); + PBL_LOG_DBG("Playback info value update %" PRId32 "=%" PRId32, idx, value_out); MusicPlayerStateUpdate *state = (MusicPlayerStateUpdate *)context; switch (idx) { @@ -361,14 +363,13 @@ static void prv_handle_player_playback_info_update(const AMSEntityUpdateNotifica music_update_player_playback_state(&state); } else { PBL_LOG_ERR("Expected CSV with 3 values:"); - PBL_HEXDUMP(LOG_LEVEL_ERROR, (const uint8_t *) update->value_str, value_length); + PBL_HEXDUMP(LOG_LEVEL_ERROR, (const uint8_t *)update->value_str, value_length); } } static bool prv_float_string_parse(const char *value, const uint16_t value_length, int32_t multiplier, int32_t *value_in_out) { - if (value_length && - !ams_util_float_string_parse(value, value_length, multiplier, value_in_out)) { + if (value_length && !ams_util_float_string_parse(value, value_length, multiplier, value_in_out)) { PBL_LOG_ERR("AMS float failed to parse:"); PBL_HEXDUMP(LOG_LEVEL_ERROR, (const uint8_t *)value, value_length); return false; @@ -397,14 +398,14 @@ static int32_t prv_parse_queue_value(const char *value, const uint16_t value_len static void prv_handle_queue_index_update(const AMSEntityUpdateNotification *update, const uint16_t value_length) { const int32_t idx = prv_parse_queue_value(update->value_str, value_length); - PBL_LOG_DBG("Queue index update: %"PRId32, idx); + PBL_LOG_DBG("Queue index update: %" PRId32, idx); // TODO: Do something with this info } static void prv_handle_queue_count_update(const AMSEntityUpdateNotification *update, const uint16_t value_length) { const int32_t count = prv_parse_queue_value(update->value_str, value_length); - PBL_LOG_DBG("Queue count update: %"PRId32, count); + PBL_LOG_DBG("Queue count update: %" PRId32, count); // TODO: Do something with this info } @@ -426,12 +427,12 @@ static void prv_handle_queue_repeat_mode_update(const AMSEntityUpdateNotificatio // Track entity update handlers static void prv_handle_track_artist_update(const AMSEntityUpdateNotification *update, - const uint16_t value_length) { + const uint16_t value_length) { music_update_track_artist(update->value_str, value_length); } static void prv_handle_track_album_update(const AMSEntityUpdateNotification *update, - const uint16_t value_length) { + const uint16_t value_length) { music_update_track_album(update->value_str, value_length); } @@ -525,8 +526,7 @@ static void prv_handle_update(const AMSEntityUpdateNotification *update, break; } - PBL_LOG_ERR("Unknown EntityID:%u + AttrID:%u", - update->entity_id, update->attribute_id); + PBL_LOG_ERR("Unknown EntityID:%u + AttrID:%u", update->entity_id, update->attribute_id); } // ------------------------------------------------------------------------------------------------- @@ -534,7 +534,7 @@ static void prv_handle_update(const AMSEntityUpdateNotification *update, void ams_create(void) { PBL_ASSERTN(!s_ams_client); - s_ams_client = (AMSClient *) kernel_zalloc_check(sizeof(AMSClient)); + s_ams_client = (AMSClient *)kernel_zalloc_check(sizeof(AMSClient)); } void ams_invalidate_all_references(void) { @@ -573,9 +573,8 @@ void ams_handle_service_discovered(BLECharacteristic *characteristics) { const BLECharacteristic entity_update_characteristic = characteristics[AMSCharacteristicEntityUpdate]; - const BTErrno e = gatt_client_subscriptions_subscribe(entity_update_characteristic, - BLESubscriptionNotifications, - GAPLEClientKernel); + const BTErrno e = gatt_client_subscriptions_subscribe( + entity_update_characteristic, BLESubscriptionNotifications, GAPLEClientKernel); // Reject the service if subscribing fails instead of asserting (e.g. a "fake // AMS" without CCCD). if (e != BTErrnoOK) { @@ -671,8 +670,8 @@ static void prv_send_command_kernel_main_task_cb(void *data) { } const AMSRemoteCommandID command_id = (uintptr_t)data; BLECharacteristic characteristic = s_ams_client->characteristics[AMSCharacteristicRemoteCommand]; - BTErrno error = gatt_client_op_write(characteristic, - (const uint8_t *) &command_id, 1, GAPLEClientKernel); + BTErrno error = + gatt_client_op_write(characteristic, (const uint8_t *)&command_id, 1, GAPLEClientKernel); const bool has_error = (error != BTErrnoOK); if (has_error) { PBL_LOG_ERR("Couldn't write command: %d", error); diff --git a/src/fw/comm/ble/kernel_le_client/ams/ams.h b/src/fw/comm/ble/kernel_le_client/ams/ams.h index 5413d923b9..4031921cd6 100644 --- a/src/fw/comm/ble/kernel_le_client/ams/ams.h +++ b/src/fw/comm/ble/kernel_le_client/ams/ams.h @@ -49,7 +49,6 @@ void ams_invalidate_all_references(void); void ams_handle_service_removed(BLECharacteristic *characteristics, uint8_t num_characteristics); - //! @param characteristic The characteristic for which to test whether the AMS module handles //! reads/writes/notifications for it. //! @return True whether the AMS module handles reads/writes/etc for it, false if not @@ -58,8 +57,8 @@ bool ams_can_handle_characteristic(BLECharacteristic characteristic); //! Handles GATT subscriptions //! @see BLEClientSubscribeHandler //! Must only be called from KernelMain! -void ams_handle_subscribe(BLECharacteristic characteristic, - BLESubscription subscription_type, BLEGATTError error); +void ams_handle_subscribe(BLECharacteristic characteristic, BLESubscription subscription_type, + BLEGATTError error); //! Handles GATT write responses //! @see BLEClientWriteHandler @@ -69,7 +68,7 @@ void ams_handle_write_response(BLECharacteristic characteristic, BLEGATTError er //! Handles GATT notifications //! Must only be called from KernelMain! void ams_handle_read_or_notification(BLECharacteristic characteristic, const uint8_t *value, - size_t value_length, BLEGATTError error); + size_t value_length, BLEGATTError error); //! Destroys the AMS client. //! Must only be called from KernelMain! diff --git a/src/fw/comm/ble/kernel_le_client/ams/ams_definition.h b/src/fw/comm/ble/kernel_le_client/ams/ams_definition.h index 436e1af5c2..d54b8b0dcc 100644 --- a/src/fw/comm/ble/kernel_le_client/ams/ams_definition.h +++ b/src/fw/comm/ble/kernel_le_client/ams/ams_definition.h @@ -7,27 +7,70 @@ //! AMS Service UUID - 89D3502B-0F36-433A-8EF4-C502AD55F8DC static const Uuid s_ams_service_uuid = { - 0x89, 0xD3, 0x50, 0x2B, 0x0F, 0x36, 0x43, 0x3A, - 0x8E, 0xF4, 0xC5, 0x02, 0xAD, 0x55, 0xF8, 0xDC, + 0x89, 0xD3, 0x50, 0x2B, 0x0F, 0x36, 0x43, 0x3A, 0x8E, 0xF4, 0xC5, 0x02, 0xAD, 0x55, 0xF8, 0xDC, }; //! AMS Characteristic UUIDs static const Uuid s_ams_characteristic_uuids[NumAMSCharacteristic] = { - //! Remote Command - 9B3C81D8-57B1-4A8A-B8DF-0E56F7CA51C2 - [AMSCharacteristicRemoteCommand] = { - 0x9B, 0x3C, 0x81, 0xD8, 0x57, 0xB1, 0x4A, 0x8A, - 0xB8, 0xDF, 0x0E, 0x56, 0xF7, 0xCA, 0x51, 0xC2, - }, + //! Remote Command - 9B3C81D8-57B1-4A8A-B8DF-0E56F7CA51C2 + [AMSCharacteristicRemoteCommand] = + { + 0x9B, + 0x3C, + 0x81, + 0xD8, + 0x57, + 0xB1, + 0x4A, + 0x8A, + 0xB8, + 0xDF, + 0x0E, + 0x56, + 0xF7, + 0xCA, + 0x51, + 0xC2, + }, - //! Entity Update - 2F7CABCE-808D-411F-9A0C-BB92BA96C102 - [AMSCharacteristicEntityUpdate] = { - 0x2F, 0x7C, 0xAB, 0xCE, 0x80, 0x8D, 0x41, 0x1F, - 0x9A, 0x0C, 0xBB, 0x92, 0xBA, 0x96, 0xC1, 0x02, - }, + //! Entity Update - 2F7CABCE-808D-411F-9A0C-BB92BA96C102 + [AMSCharacteristicEntityUpdate] = + { + 0x2F, + 0x7C, + 0xAB, + 0xCE, + 0x80, + 0x8D, + 0x41, + 0x1F, + 0x9A, + 0x0C, + 0xBB, + 0x92, + 0xBA, + 0x96, + 0xC1, + 0x02, + }, - //! Entity Attribute - C6B2F38C-23AB-46D8-A6AB-A3A870BBD5D7 - [AMSCharacteristicEntityAttribute] = { - 0xC6, 0xB2, 0xF3, 0x8C, 0x23, 0xAB, 0x46, 0xD8, - 0xA6, 0xAB, 0xA3, 0xA8, 0x70, 0xBB, 0xD5, 0xD7, - }, + //! Entity Attribute - C6B2F38C-23AB-46D8-A6AB-A3A870BBD5D7 + [AMSCharacteristicEntityAttribute] = { + 0xC6, + 0xB2, + 0xF3, + 0x8C, + 0x23, + 0xAB, + 0x46, + 0xD8, + 0xA6, + 0xAB, + 0xA3, + 0xA8, + 0x70, + 0xBB, + 0xD5, + 0xD7, + }, }; diff --git a/src/fw/comm/ble/kernel_le_client/ams/ams_types.h b/src/fw/comm/ble/kernel_le_client/ams/ams_types.h index 1b00393f59..da04381fd4 100644 --- a/src/fw/comm/ble/kernel_le_client/ams/ams_types.h +++ b/src/fw/comm/ble/kernel_le_client/ams/ams_types.h @@ -143,8 +143,8 @@ typedef enum { NumAMSTrackAttributeID, } AMSTrackAttributeID; -#define AMS_MAX_NUM_ATTRIBUTE_ID (MAX(MAX((int)NumAMSTrackAttributeID, \ - (int)NumAMSQueueAttributeID), (int)NumAMSPlayerAttributeID)) +#define AMS_MAX_NUM_ATTRIBUTE_ID \ + (MAX(MAX((int)NumAMSTrackAttributeID, (int)NumAMSQueueAttributeID), (int)NumAMSPlayerAttributeID)) //////////////////////////////////////////////////////////////////////////////////////////////////// // Packet Formats @@ -152,14 +152,14 @@ typedef enum { //! Written (with Response) to the Remote Command characteristic, //! to execute the specified command on the AMS. typedef struct PACKED { - AMSRemoteCommandID command_id:8; + AMSRemoteCommandID command_id : 8; } AMSRemoteCommand; //! Written (without Response) to the Entity Update characteristic, //! to indicate that the client is interested in receiving updates for the specified entity //! and attributes. typedef struct PACKED { - AMSEntityID entity_id:8; + AMSEntityID entity_id : 8; //! Array of Attribute IDs for which the client wants to receive updates. //! Can be of type AMSPlayerAttributeID, AMSQueueAttributeID, AMSTrackAttributeID, depending on @@ -170,14 +170,14 @@ typedef struct PACKED { //! Notification from the Entity Update characteristic, //! sent to notify the client of an updated attribute value. typedef struct PACKED { - AMSEntityID entity_id:8; + AMSEntityID entity_id : 8; //! The Attribute ID of the updated value. //! Can be of type AMSPlayerAttributeID, AMSQueueAttributeID, AMSTrackAttributeID, depending on //! the value of `entity_id`. uint8_t attribute_id; - AMSEntityUpdateFlag flags:8; + AMSEntityUpdateFlag flags : 8; //! The updated value. //! @note The string is never zero-terminated, so cannot be used as a C-string, as-is. diff --git a/src/fw/comm/ble/kernel_le_client/ams/ams_util.c b/src/fw/comm/ble/kernel_le_client/ams/ams_util.c index 87ebf8d5ed..4a100ecfb5 100644 --- a/src/fw/comm/ble/kernel_le_client/ams/ams_util.c +++ b/src/fw/comm/ble/kernel_le_client/ams/ams_util.c @@ -21,7 +21,7 @@ bool ams_util_float_string_parse(const char *number_str, uint32_t number_str_len bool number_started = false; uint32_t decimal_divisor = 0; int64_t result = 0; - const char * const number_str_end = number_str + number_str_length; + const char *const number_str_end = number_str + number_str_length; do { const char c = *number_str; switch (c) { @@ -93,8 +93,8 @@ bool ams_util_float_string_parse(const char *number_str, uint32_t number_str_len // ------------------------------------------------------------------------------------------------- // Parsing comma-separated value -uint8_t ams_util_csv_parse(const char *csv_value, uint32_t csv_length, - void *context, AMSUtilCSVCallback callback) { +uint8_t ams_util_csv_parse(const char *csv_value, uint32_t csv_length, void *context, + AMSUtilCSVCallback callback) { if (csv_value == NULL || csv_length == 0) { return 0; } diff --git a/src/fw/comm/ble/kernel_le_client/ams/ams_util.h b/src/fw/comm/ble/kernel_le_client/ams/ams_util.h index 9fc2ca95b2..83c1d01c66 100644 --- a/src/fw/comm/ble/kernel_le_client/ams/ams_util.h +++ b/src/fw/comm/ble/kernel_le_client/ams/ams_util.h @@ -28,8 +28,8 @@ bool ams_util_float_string_parse(const char *number_str, uint32_t number_str_len //! @param index The index of the value in the total CSV list //! @param context User-specified callback, as passed into ams_util_csv_parse //! @return True to continue parsing, false to stop parsing -typedef bool (*AMSUtilCSVCallback)(const char *value, uint32_t value_length, - uint32_t index, void *context); +typedef bool (*AMSUtilCSVCallback)(const char *value, uint32_t value_length, uint32_t index, + void *context); //! Parses a comma separated value string. //! @param csv_value The buffer with the CSV string. The string does not necessarily need to be @@ -39,5 +39,5 @@ typedef bool (*AMSUtilCSVCallback)(const char *value, uint32_t value_length, //! @param callback The function to call for each found value. //! @return The number of parsed values. In case the number of values in csv_value is different from //! the number of callbacks passed, only up to the smallest number will be parsed. -uint8_t ams_util_csv_parse(const char *csv_value, uint32_t csv_length, - void *context, AMSUtilCSVCallback callback); +uint8_t ams_util_csv_parse(const char *csv_value, uint32_t csv_length, void *context, + AMSUtilCSVCallback callback); diff --git a/src/fw/comm/ble/kernel_le_client/ancs/ancs.c b/src/fw/comm/ble/kernel_le_client/ancs/ancs.c index 93922fd097..604d75cd47 100644 --- a/src/fw/comm/ble/kernel_le_client/ancs/ancs.c +++ b/src/fw/comm/ble/kernel_le_client/ancs/ancs.c @@ -81,7 +81,6 @@ typedef struct { }; } ReassemblyContext; - typedef enum { NotificationQueueOpGetAttributes = 0, NotificationQueueOpPerformAction, @@ -96,7 +95,7 @@ typedef struct { ListNode list_node; NotificationQueueOp op; uint32_t uid; - ActionId action_id; // Only valid if op == NotificationQueueOpPerformAction + ActionId action_id; // Only valid if op == NotificationQueueOpPerformAction ANCSProperty properties; } NotificationQueueNode; @@ -136,21 +135,19 @@ static bool prv_can_transition_state(ANCSClientState new_state) { new_state == ANCSClientStateAliveCheck); case ANCSClientStateRequestedNotification: return (new_state == ANCSClientStateReassemblingNotification || - new_state == ANCSClientStateRequestedApp || - new_state == ANCSClientStateRetrying || + new_state == ANCSClientStateRequestedApp || new_state == ANCSClientStateRetrying || new_state == ANCSClientStateIdle); case ANCSClientStateReassemblingNotification: - return (new_state == ANCSClientStateRequestedApp || - new_state == ANCSClientStateIdle); + return (new_state == ANCSClientStateRequestedApp || new_state == ANCSClientStateIdle); case ANCSClientStatePerformingAction: return (new_state == ANCSClientStateIdle); case ANCSClientStateRequestedApp: return (new_state == ANCSClientStateIdle); case ANCSClientStateAliveCheck: - return (new_state == ANCSClientStateIdle); + return (new_state == ANCSClientStateIdle); case ANCSClientStateRetrying: - return (new_state == ANCSClientStateRequestedNotification || - new_state == ANCSClientStateIdle); + return (new_state == ANCSClientStateRequestedNotification || + new_state == ANCSClientStateIdle); default: WTF; } @@ -186,8 +183,7 @@ static bool prv_notif_queue_comparator(ListNode *found_node, void *data) { static NotificationQueueNode *prv_notif_queue_find(NotificationQueueNode *node) { return (NotificationQueueNode *)list_find((ListNode *)s_ancs_client->queue, - prv_notif_queue_comparator, - (void *)node); + prv_notif_queue_comparator, (void *)node); } static void prv_notif_queue_reset(void) { @@ -210,25 +206,24 @@ static void prv_notif_queue_push_common(NotificationQueueNode *node) { } if (s_ancs_client->state == ANCSClientStateIdle) { - s_ancs_client->queue = (NotificationQueueNode *)list_prepend((ListNode *)s_ancs_client->queue, - (ListNode *)node); + s_ancs_client->queue = + (NotificationQueueNode *)list_prepend((ListNode *)s_ancs_client->queue, (ListNode *)node); prv_do_notif_queue_operation(); } else { - list_append((ListNode *)s_ancs_client->queue, - (ListNode *)node); + list_append((ListNode *)s_ancs_client->queue, (ListNode *)node); } } static void prv_notif_queue_push_action(uint32_t uid, ActionId action_id) { NotificationQueueNode *node = kernel_malloc(sizeof(NotificationQueueNode)); if (!node) { - PBL_LOG_WRN("ANCS action alloc failed, dropping (uid=%"PRIu32")", uid); + PBL_LOG_WRN("ANCS action alloc failed, dropping (uid=%" PRIu32 ")", uid); return; } - *node = (NotificationQueueNode) { - .op = NotificationQueueOpPerformAction, - .uid = uid, - .action_id = action_id + *node = (NotificationQueueNode){ + .op = NotificationQueueOpPerformAction, + .uid = uid, + .action_id = action_id }; prv_notif_queue_push_common(node); @@ -243,7 +238,7 @@ static bool prv_evict_oldest_attr_request(void) { while (node) { NotificationQueueNode *next = (NotificationQueueNode *)list_get_next((ListNode *)node); if (node != in_flight && node->op == NotificationQueueOpGetAttributes) { - PBL_LOG_WRN("ANCS queue full, evicting oldest notif (uid=%"PRIu32")", node->uid); + PBL_LOG_WRN("ANCS queue full, evicting oldest notif (uid=%" PRIu32 ")", node->uid); list_remove((ListNode *)node, (ListNode **)&s_ancs_client->queue, NULL); kernel_free(node); return true; @@ -257,20 +252,20 @@ static void prv_notif_queue_push_attr_request(uint32_t uid, ANCSProperty propert if (list_count((ListNode *)s_ancs_client->queue) >= ANCS_NOTIF_QUEUE_MAX_DEPTH) { // Evict a stale entry rather than drop the fresh one. if (!prv_evict_oldest_attr_request()) { - PBL_LOG_WRN("ANCS queue full, dropping notif (uid=%"PRIu32")", uid); + PBL_LOG_WRN("ANCS queue full, dropping notif (uid=%" PRIu32 ")", uid); return; } } NotificationQueueNode *node = kernel_malloc(sizeof(NotificationQueueNode)); if (!node) { - PBL_LOG_WRN("ANCS attr-request alloc failed, dropping (uid=%"PRIu32")", uid); + PBL_LOG_WRN("ANCS attr-request alloc failed, dropping (uid=%" PRIu32 ")", uid); return; } - *node = (NotificationQueueNode) { - .op = NotificationQueueOpGetAttributes, - .uid = uid, - .properties = properties, + *node = (NotificationQueueNode){ + .op = NotificationQueueOpGetAttributes, + .uid = uid, + .properties = properties, }; prv_notif_queue_push_common(node); @@ -279,9 +274,7 @@ static void prv_notif_queue_push_attr_request(uint32_t uid, ANCSProperty propert static void prv_notif_queue_pop(void) { NotificationQueueNode *temp = s_ancs_client->queue; if (temp) { - list_remove((ListNode *)s_ancs_client->queue, - (ListNode **)&s_ancs_client->queue, - NULL); + list_remove((ListNode *)s_ancs_client->queue, (ListNode **)&s_ancs_client->queue, NULL); kernel_free(temp); } } @@ -307,8 +300,8 @@ T_STATIC uint32_t prv_get_queue_depth(void) { T_STATIC bool prv_queue_contains_uid(uint32_t uid) { NotificationQueueNode key = { - .op = NotificationQueueOpGetAttributes, - .uid = uid, + .op = NotificationQueueOpGetAttributes, + .uid = uid, }; return prv_notif_queue_find(&key) != NULL; } @@ -363,9 +356,8 @@ static void prv_op_timeout_launcher_task_cb(void *unused) { return; } prv_op_timeout_stop(); - PBL_LOG_WRN("ANCS op timed out (state=%d, uid=%"PRIu32"); dropping stuck head", - s_ancs_client->state, - s_ancs_client->queue ? s_ancs_client->queue->uid : 0); + PBL_LOG_WRN("ANCS op timed out (state=%d, uid=%" PRIu32 "); dropping stuck head", + s_ancs_client->state, s_ancs_client->queue ? s_ancs_client->queue->uid : 0); // Drop the wedged head so the queue keeps draining. prv_reset_and_next(); } @@ -405,8 +397,8 @@ static void prv_op_timeout_kick(void) { // Is Alive Logic #define ANCS_INVALID_PARAM 0xA2 -#define ANCS_IS_ALIVE_NEXT_CHECK_TIME_MINUTES 15 // Check every 15 minutes for faster recovery -#define ANCS_IS_ALIVE_RESPONSE_WAIT_TIME_SECONDS 5 // 5 seconds +#define ANCS_IS_ALIVE_NEXT_CHECK_TIME_MINUTES 15 // Check every 15 minutes for faster recovery +#define ANCS_IS_ALIVE_RESPONSE_WAIT_TIME_SECONDS 5 // 5 seconds // Force a flush + resubscribe if still busy after this many alive checks // (a wedge the op watchdog somehow missed). @@ -419,23 +411,22 @@ static void prv_op_timeout_kick(void) { // alive-check interval so future tuning of one doesn't desync the other. #define ANCS_NO_NS_TIMEOUT_HOURS 6 #define ANCS_ALIVE_CHECKS_WITHOUT_NS_BEFORE_RESUBSCRIBE \ - ((ANCS_NO_NS_TIMEOUT_HOURS * 60) / ANCS_IS_ALIVE_NEXT_CHECK_TIME_MINUTES) - + ((ANCS_NO_NS_TIMEOUT_HOURS * 60) / ANCS_IS_ALIVE_NEXT_CHECK_TIME_MINUTES) static void prv_is_ancs_alive_cb(void *data); static void prv_is_ancs_alive_response_timeout(void *data); static void prv_ancs_is_alive_schedule_next_check(void) { - s_ancs_client->is_alive_timer = (const RegularTimerInfo) { - .cb = prv_is_ancs_alive_cb, + s_ancs_client->is_alive_timer = (const RegularTimerInfo){ + .cb = prv_is_ancs_alive_cb, }; regular_timer_add_multiminute_callback(&s_ancs_client->is_alive_timer, ANCS_IS_ALIVE_NEXT_CHECK_TIME_MINUTES); } static void prv_ancs_is_alive_start_response_wait_timer(void) { - s_ancs_client->is_alive_timer = (const RegularTimerInfo) { - .cb = prv_is_ancs_alive_response_timeout, + s_ancs_client->is_alive_timer = (const RegularTimerInfo){ + .cb = prv_is_ancs_alive_response_timeout, }; regular_timer_add_multisecond_callback(&s_ancs_client->is_alive_timer, ANCS_IS_ALIVE_RESPONSE_WAIT_TIME_SECONDS); @@ -462,7 +453,8 @@ static void prv_resubscribe_to_ancs(void) { } // Check if we have valid characteristic handles to re-subscribe to - if (s_ancs_client->characteristics[ANCSCharacteristicNotification] == BLE_CHARACTERISTIC_INVALID) { + if (s_ancs_client->characteristics[ANCSCharacteristicNotification] == + BLE_CHARACTERISTIC_INVALID) { PBL_LOG_WRN("Cannot resubscribe to ANCS: no valid characteristic handles"); return; } @@ -481,8 +473,7 @@ static void prv_resubscribe_to_ancs(void) { // may already have been cleaned up) gatt_client_subscriptions_subscribe(charx, BLESubscriptionNone, GAPLEClientKernel); - const BTErrno e = gatt_client_subscriptions_subscribe(charx, - BLESubscriptionNotifications, + const BTErrno e = gatt_client_subscriptions_subscribe(charx, BLESubscriptionNotifications, GAPLEClientKernel); if (e != BTErrnoOK) { PBL_LOG_ERR("Failed to resubscribe to ANCS charx %d: %d", c, e); @@ -556,8 +547,8 @@ T_STATIC void prv_check_ancs_alive(void) { //! Sends an ANCS attribute fetch (to the Control Point). The notification UID is invalid, ANCS //! will reply with 0xA2 (invalid param) const GetNotificationAttributesMsg dummy_cmd = { - .command_id = CommandIDGetNotificationAttributes, - .notification_uid = INVALID_NOTIFICATION_UID, + .command_id = CommandIDGetNotificationAttributes, + .notification_uid = INVALID_NOTIFICATION_UID, }; prv_write_control_point_request((const CPDSMessage *)&dummy_cmd, sizeof(dummy_cmd)); prv_ancs_is_alive_start_response_wait_timer(); @@ -607,8 +598,8 @@ static void prv_start_temp_notification_connection_delay_timer(void) { s_just_connected = true; const int post_connection_notification_ignore_seconds = 10; - s_notification_connection_delay_timer = (const RegularTimerInfo) { - .cb = prv_set_no_longer_just_connected, + s_notification_connection_delay_timer = (const RegularTimerInfo){ + .cb = prv_set_no_longer_just_connected, }; regular_timer_add_multisecond_callback(&s_notification_connection_delay_timer, post_connection_notification_ignore_seconds); @@ -626,14 +617,14 @@ static bool prv_is_reassembly_in_progress(void) { return (s_ancs_client->state == ANCSClientStateReassemblingNotification); } -static bool prv_reassembly_start(const uint8_t* const data, const size_t length) { +static bool prv_reassembly_start(const uint8_t *const data, const size_t length) { PBL_ASSERTN(!prv_is_reassembly_in_progress()); ReassemblyContext *reassembly_ctx = &s_ancs_client->reassembly_ctx; // Check that command ID is valid to prevent first part of buffer being occupied by invalid data // when a new, valid message is received - const CPDSMessage * cmd_header = (const CPDSMessage *) data; + const CPDSMessage *cmd_header = (const CPDSMessage *)data; if (cmd_header->command_id < CommandIdInvalid) { prv_set_state(ANCSClientStateReassemblingNotification); @@ -650,16 +641,16 @@ static bool prv_reassembly_start(const uint8_t* const data, const size_t length) return false; } -static bool prv_reassembly_append(const uint8_t* const data, const size_t length) { +static bool prv_reassembly_append(const uint8_t *const data, const size_t length) { PBL_ASSERTN(s_ancs_client->state == ANCSClientStateReassemblingNotification); return (buffer_add(&s_ancs_client->reassembly_ctx.buffer, data, length) != 0); } -static uint8_t prv_current_command_id(const uint8_t* data) { +static uint8_t prv_current_command_id(const uint8_t *data) { return ((const CPDSMessage *)data)->command_id; } -static bool prv_reassembly_is_complete(const uint8_t* data, const size_t length, bool* out_error) { +static bool prv_reassembly_is_complete(const uint8_t *data, const size_t length, bool *out_error) { switch (prv_current_command_id(data)) { case CommandIDGetNotificationAttributes: return ancs_util_is_complete_notif_attr_response(data, length, out_error); @@ -672,7 +663,7 @@ static bool prv_reassembly_is_complete(const uint8_t* data, const size_t length, return false; } -static void prv_reassembly_handle_complete_response(const uint8_t* data, const size_t length) { +static void prv_reassembly_handle_complete_response(const uint8_t *data, const size_t length) { switch (prv_current_command_id(data)) { case CommandIDGetNotificationAttributes: prv_handle_notification_attributes_response(data, length); @@ -706,7 +697,6 @@ static void prv_reassemble_ds_notification(uint32_t length, const uint8_t *data) prv_reset_due_to_parse_error(); return; } - } const uint8_t *response_data = s_ancs_client->reassembly_ctx.buffer.data; @@ -714,8 +704,7 @@ static void prv_reassemble_ds_notification(uint32_t length, const uint8_t *data) // Is the response complete? Or do we need to wait for more DS notifications? bool parse_error = false; - const bool is_complete = prv_reassembly_is_complete(response_data, response_length, - &parse_error); + const bool is_complete = prv_reassembly_is_complete(response_data, response_length, &parse_error); if (parse_error) { PBL_HEXDUMP(LOG_LEVEL_INFO, response_data, response_length); @@ -734,10 +723,8 @@ static void prv_reassemble_ds_notification(uint32_t length, const uint8_t *data) } static void prv_put_ancs_message(ANCSAttribute **app_attrs) { - ancs_notifications_handle_message(s_ancs_client->queue->uid, - s_ancs_client->queue->properties, - s_ancs_client->attributes, - app_attrs); + ancs_notifications_handle_message(s_ancs_client->queue->uid, s_ancs_client->queue->properties, + s_ancs_client->attributes, app_attrs); } // ----------------------------------------------------------------------------- @@ -759,12 +746,8 @@ static void prv_handle_app_attributes_response(const uint8_t *data, size_t lengt } bool error = false; - const bool complete = ancs_util_get_attr_ptrs(data, - length, - s_fetched_app_attributes, - NUM_FETCHED_APP_ATTRIBUTES, - app_attrs, - &error); + const bool complete = ancs_util_get_attr_ptrs(data, length, s_fetched_app_attributes, + NUM_FETCHED_APP_ATTRIBUTES, app_attrs, &error); if (!complete || error) { PBL_LOG_WRN("Error parsing app attributes"); goto fail; @@ -785,35 +768,33 @@ static void prv_handle_app_attributes_response(const uint8_t *data, size_t lengt static void prv_add_attributes_to_request(Buffer *request_buffer) { static const struct PACKED { - NotificationAttributeID positive_action:8; - NotificationAttributeID negative_action:8; - NotificationAttributeID app_id:8; - NotificationAttributeID title:8; + NotificationAttributeID positive_action : 8; + NotificationAttributeID negative_action : 8; + NotificationAttributeID app_id : 8; + NotificationAttributeID title : 8; uint16_t max_title_length; - NotificationAttributeID subtitle:8; + NotificationAttributeID subtitle : 8; uint16_t max_subtitle_length; - NotificationAttributeID message:8; + NotificationAttributeID message : 8; uint16_t max_message_length; //! Finish with the Date because the response value for the Date is //! fixed-length which allows us to determine whether the total response is //! finished or whether we need to expect DS notifications with more data. - NotificationAttributeID date:8; + NotificationAttributeID date : 8; } finishing_attributes = { - .positive_action = NotificationAttributeIDPositiveActionLabel, - .negative_action = NotificationAttributeIDNegativeActionLabel, - .app_id = NotificationAttributeIDAppIdentifier, - .title = NotificationAttributeIDTitle, - .max_title_length = TITLE_MAX_LENGTH, - .subtitle = NotificationAttributeIDSubtitle, - .max_subtitle_length = SUBTITLE_MAX_LENGTH, - .message = NotificationAttributeIDMessage, - .max_message_length = MESSAGE_MAX_LENGTH, - .date = NotificationAttributeIDDate, + .positive_action = NotificationAttributeIDPositiveActionLabel, + .negative_action = NotificationAttributeIDNegativeActionLabel, + .app_id = NotificationAttributeIDAppIdentifier, + .title = NotificationAttributeIDTitle, + .max_title_length = TITLE_MAX_LENGTH, + .subtitle = NotificationAttributeIDSubtitle, + .max_subtitle_length = SUBTITLE_MAX_LENGTH, + .message = NotificationAttributeIDMessage, + .max_message_length = MESSAGE_MAX_LENGTH, + .date = NotificationAttributeIDDate, }; - buffer_add(request_buffer, - (const uint8_t *) &finishing_attributes, - sizeof(finishing_attributes)); + buffer_add(request_buffer, (const uint8_t *)&finishing_attributes, sizeof(finishing_attributes)); } static void prv_get_app_attributes(const ANCSAttribute *app_id) { @@ -822,14 +803,12 @@ static void prv_get_app_attributes(const ANCSAttribute *app_id) { return; } - const size_t request_size = sizeof(GetAppAttributesMsg) + - app_id->length + - 1 + // NULL terminator + const size_t request_size = sizeof(GetAppAttributesMsg) + app_id->length + 1 + // NULL terminator ARRAY_LENGTH(s_fetched_app_attributes); GetAppAttributesMsg *request = kernel_zalloc_check(request_size); - *request = (GetAppAttributesMsg) { - .command_id = CommandIDGetAppAttributes, + *request = (GetAppAttributesMsg){ + .command_id = CommandIDGetAppAttributes, }; uint8_t *request_data_ptr = (uint8_t *)request + sizeof(GetAppAttributesMsg); @@ -848,7 +827,7 @@ static void prv_get_app_attributes(const ANCSAttribute *app_id) { prv_set_state(ANCSClientStateRequestedApp); prv_op_timeout_start(); - bool success = prv_write_control_point_request((const CPDSMessage *) request, request_size); + bool success = prv_write_control_point_request((const CPDSMessage *)request, request_size); kernel_free(request); @@ -863,15 +842,14 @@ static void prv_get_app_attributes(const ANCSAttribute *app_id) { static void prv_get_notification_attributes(uint32_t uid) { const GetNotificationAttributesMsg cmd_header = { - .command_id = CommandIDGetNotificationAttributes, - .notification_uid = uid, + .command_id = CommandIDGetNotificationAttributes, + .notification_uid = uid, }; static const size_t request_max_size = 32; Buffer *request_buffer = buffer_create(request_max_size); - const size_t written_size = buffer_add(request_buffer, - (const uint8_t *) &cmd_header, - sizeof(cmd_header)); + const size_t written_size = + buffer_add(request_buffer, (const uint8_t *)&cmd_header, sizeof(cmd_header)); PBL_ASSERTN(written_size == sizeof(cmd_header)); prv_add_attributes_to_request(request_buffer); @@ -881,7 +859,7 @@ static void prv_get_notification_attributes(uint32_t uid) { // Arm before the write so completion/failure can cancel it. prv_op_timeout_start(); - bool success = prv_write_control_point_request((const CPDSMessage *) request_buffer->data, + bool success = prv_write_control_point_request((const CPDSMessage *)request_buffer->data, request_buffer->bytes_written); kernel_free(request_buffer); @@ -904,11 +882,9 @@ static void prv_handle_notification_attributes_response(const uint8_t *data, siz length -= sizeof(GetNotificationAttributesMsg); bool error = false; - const bool did_get_attrs = ancs_util_get_attr_ptrs(data, length, - s_fetched_notif_attributes, - NUM_FETCHED_NOTIF_ATTRIBUTES, - s_ancs_client->attributes, - &error); + const bool did_get_attrs = + ancs_util_get_attr_ptrs(data, length, s_fetched_notif_attributes, + NUM_FETCHED_NOTIF_ATTRIBUTES, s_ancs_client->attributes, &error); if (!did_get_attrs || error) { PBL_LOG_ERR("Error parsing attributes: %u, %u", did_get_attrs, error); prv_reset_and_next(); @@ -983,7 +959,7 @@ void ancs_handle_service_removed(BLECharacteristic *characteristics, uint8_t num void ancs_handle_service_discovered(BLECharacteristic *characteristics) { PBL_LOG_DBG("In ANCS service discovery CB"); - PBL_ASSERTN(characteristics); // should only be called if we found something! + PBL_ASSERTN(characteristics); // should only be called if we found something! // Pause while re-subscribing, it will be resumed when re-subscribed: prv_ancs_is_alive_stop_timer(); @@ -1000,9 +976,8 @@ void ancs_handle_service_discovered(BLECharacteristic *characteristics) { // Subscribe to Data, then to Notification characteristics. Reject the service // if subscribing fails instead of asserting (e.g. a "fake ANCS" without CCCD). for (int c = ANCSCharacteristicData; c >= ANCSCharacteristicNotification; --c) { - const BTErrno e = gatt_client_subscriptions_subscribe(characteristics[c], - BLESubscriptionNotifications, - GAPLEClientKernel); + const BTErrno e = gatt_client_subscriptions_subscribe( + characteristics[c], BLESubscriptionNotifications, GAPLEClientKernel); if (e != BTErrnoOK) { PBL_LOG_WRN("Failed to subscribe ANCS charx %d (err=%d), ignoring service", c, e); ancs_invalidate_all_references(); @@ -1030,7 +1005,7 @@ static void prv_handle_ns_notification(uint32_t length, const uint8_t *notificat PBL_ASSERTN(notification != NULL); if (length != sizeof(NSNotification)) { - PBL_LOG_ERR("Received invalid ANCS NS Notification length=<%"PRIu32">", length); + PBL_LOG_ERR("Received invalid ANCS NS Notification length=<%" PRIu32 ">", length); return; } @@ -1038,7 +1013,7 @@ static void prv_handle_ns_notification(uint32_t length, const uint8_t *notificat // delivering, so the silent-NS resubscribe watchdog can stand down. s_ancs_client->alive_checks_without_ns = 0; - NSNotification* nsnotification = (NSNotification*) notification; + NSNotification *nsnotification = (NSNotification *)notification; ANCSProperty properties = ANCSProperty_None; PBL_LOG_VERBOSE("NSNotification: "); @@ -1046,7 +1021,7 @@ static void prv_handle_ns_notification(uint32_t length, const uint8_t *notificat PBL_LOG_VERBOSE("> EventFlags: <%d>", nsnotification->event_flags); PBL_LOG_VERBOSE("> CategoryID: <%d>", nsnotification->category_id); PBL_LOG_VERBOSE("> CategoryCount: <%d>", nsnotification->category_count); - PBL_LOG_VERBOSE("> NotificationUID: <%"PRIu32">", nsnotification->uid); + PBL_LOG_VERBOSE("> NotificationUID: <%" PRIu32 ">", nsnotification->uid); PBL_HEXDUMP(LOG_LEVEL_DEBUG_VERBOSE, (uint8_t *)nsnotification, sizeof(NSNotification)); // Handle the CategoryID @@ -1097,7 +1072,6 @@ static void prv_handle_ns_notification(uint32_t length, const uint8_t *notificat static void prv_handle_ds_notification(uint32_t length, const uint8_t *data) { PBL_ASSERTN(data != NULL); - if (length < 1) { PBL_LOG_ERR("Received ANCS DS notification of length 0"); return; @@ -1168,10 +1142,10 @@ void ancs_handle_write_response(BLECharacteristic characteristic, BLEGATTError e static bool prv_write_control_point_request(const CPDSMessage *cmd, size_t size) { const BLECharacteristic cp = s_ancs_client->characteristics[ANCSCharacteristicControl]; - const BTErrno error = gatt_client_op_write(cp, (const uint8_t *) cmd, size, GAPLEClientKernel); + const BTErrno error = gatt_client_op_write(cp, (const uint8_t *)cmd, size, GAPLEClientKernel); PBL_LOG_DBG("Writing to control point:"); - PBL_HEXDUMP(LOG_LEVEL_DEBUG, (const uint8_t *) cmd, size); + PBL_HEXDUMP(LOG_LEVEL_DEBUG, (const uint8_t *)cmd, size); if (error != BTErrnoOK) { PBL_LOG_DBG("Control point write error: %d", error); @@ -1187,17 +1161,16 @@ static bool prv_write_control_point_request(const CPDSMessage *cmd, size_t size) static void prv_perform_action(uint32_t notification_uid, ActionId action_id) { prv_set_state(ANCSClientStatePerformingAction); PerformNotificationActionMsg action_msg = { - .command_id = CommandIDPerformNotificationAction, - .notification_uid = notification_uid, - .action_id = action_id, + .command_id = CommandIDPerformNotificationAction, + .notification_uid = notification_uid, + .action_id = action_id, }; - PBL_LOG_DBG("Taking action <%u> upon UID: %"PRIu32, action_id, - notification_uid); + PBL_LOG_DBG("Taking action <%u> upon UID: %" PRIu32, action_id, notification_uid); prv_op_timeout_start(); - const bool success = prv_write_control_point_request((const CPDSMessage *) &action_msg, - sizeof(action_msg)); + const bool success = + prv_write_control_point_request((const CPDSMessage *)&action_msg, sizeof(action_msg)); if (!success) { prv_reset_and_next(); } @@ -1213,7 +1186,7 @@ static void prv_serialize_action(const PerformNotificationActionMsg *action_msg) } void prv_serialize_action_launcher_task_cb(void *data) { - const PerformNotificationActionMsg *action_msg = (PerformNotificationActionMsg *) data; + const PerformNotificationActionMsg *action_msg = (PerformNotificationActionMsg *)data; prv_serialize_action(action_msg); kernel_free(data); } @@ -1222,12 +1195,12 @@ void ancs_perform_action(uint32_t notification_uid, uint8_t action_id) { bool is_kernel_main = (pebble_task_get_current() == PebbleTask_KernelMain); // Avoid heap allocation when directly calling prv_serialize_action: PerformNotificationActionMsg action_msg; - PerformNotificationActionMsg *action_msg_ptr = is_kernel_main ? - &action_msg : kernel_malloc_check(sizeof(PerformNotificationActionMsg)); - *action_msg_ptr = (const PerformNotificationActionMsg) { - .command_id = CommandIDPerformNotificationAction, - .notification_uid = notification_uid, - .action_id = action_id, + PerformNotificationActionMsg *action_msg_ptr = + is_kernel_main ? &action_msg : kernel_malloc_check(sizeof(PerformNotificationActionMsg)); + *action_msg_ptr = (const PerformNotificationActionMsg){ + .command_id = CommandIDPerformNotificationAction, + .notification_uid = notification_uid, + .action_id = action_id, }; if (is_kernel_main) { prv_serialize_action(action_msg_ptr); @@ -1247,7 +1220,7 @@ void ancs_handle_ios9_or_newer_detected(void) { void ancs_create(void) { PBL_ASSERTN(s_ancs_client == NULL); - s_ancs_client = (ANCSClient *) kernel_zalloc_check(sizeof(ANCSClient)); + s_ancs_client = (ANCSClient *)kernel_zalloc_check(sizeof(ANCSClient)); buffer_init(&s_ancs_client->reassembly_ctx.buffer, sizeof(s_ancs_client->reassembly_ctx.buffer_storage)); ancs_app_name_storage_init(); diff --git a/src/fw/comm/ble/kernel_le_client/ancs/ancs.h b/src/fw/comm/ble/kernel_le_client/ancs/ancs.h index bfce372465..99f7afdbe7 100644 --- a/src/fw/comm/ble/kernel_le_client/ancs/ancs.h +++ b/src/fw/comm/ble/kernel_le_client/ancs/ancs.h @@ -23,7 +23,7 @@ typedef enum { typedef enum { // Subscribe-able: ANCSCharacteristicNotification = 0, //length);; + ANCSAttribute *app_id_copy = kernel_zalloc_check(sizeof(ANCSAttribute) + app_id->length); + ; memcpy(app_id_copy, app_id, sizeof(ANCSAttribute) + app_id->length); // copy app name - ANCSAttribute *app_name_copy = kernel_zalloc_check(sizeof(ANCSAttribute) + app_name->length);; + ANCSAttribute *app_name_copy = kernel_zalloc_check(sizeof(ANCSAttribute) + app_name->length); + ; memcpy(app_name_copy, app_name, sizeof(ANCSAttribute) + app_name->length); AncsAppNameStorageEntry entry = { - .app_id = app_id_copy, - .app_name = app_name_copy, + .app_id = app_id_copy, + .app_name = app_name_copy, }; circular_cache_push(s_cache, &entry); } ANCSAttribute *ancs_app_name_storage_get(const ANCSAttribute *app_id) { AncsAppNameStorageEntry entry = { - .app_id = (ANCSAttribute *)app_id, + .app_id = (ANCSAttribute *)app_id, }; AncsAppNameStorageEntry *found = circular_cache_get(s_cache, &entry); if (found) { diff --git a/src/fw/comm/ble/kernel_le_client/ancs/ancs_definition.h b/src/fw/comm/ble/kernel_le_client/ancs/ancs_definition.h index 19468a8ba5..79e8011084 100644 --- a/src/fw/comm/ble/kernel_le_client/ancs/ancs_definition.h +++ b/src/fw/comm/ble/kernel_le_client/ancs/ancs_definition.h @@ -6,23 +6,19 @@ #include "ancs.h" //! ANCS Service UUID -static const Uuid s_ancs_service_uuid = { - 0x79, 0x05, 0xf4, 0x31, 0xb5, 0xce, 0x4e, 0x99, - 0xa4, 0x0f, 0x4b, 0x1e, 0x12, 0x2d, 0x00, 0xd0 -}; +static const Uuid s_ancs_service_uuid = {0x79, 0x05, 0xf4, 0x31, 0xb5, 0xce, 0x4e, 0x99, + 0xa4, 0x0f, 0x4b, 0x1e, 0x12, 0x2d, 0x00, 0xd0}; //! ANCS Characteristic UUIDs static const Uuid s_ancs_characteristic_uuids[NumANCSCharacteristic] = { - [ANCSCharacteristicNotification] = { - 0x9f, 0xbf, 0x12, 0x0d, 0x63, 0x01, 0x42, 0xd9, - 0x8c, 0x58, 0x25, 0xe6, 0x99, 0xa2, 0x1d, 0xbd - }, - [ANCSCharacteristicData] = { - 0x22, 0xea, 0xc6, 0xe9, 0x24, 0xd6, 0x4b, 0xb5, - 0xbe, 0x44, 0xb3, 0x6a, 0xce, 0x7c, 0x7b, 0xfb - }, - [ANCSCharacteristicControl] = { - 0x69, 0xd1, 0xd8, 0xf3, 0x45, 0xe1, 0x49, 0xa8, - 0x98, 0x21, 0x9b, 0xbd, 0xfd, 0xaa, 0xd9, 0xd9 - }, + [ANCSCharacteristicNotification] = + {0x9f, 0xbf, 0x12, 0x0d, 0x63, 0x01, 0x42, 0xd9, 0x8c, 0x58, 0x25, 0xe6, 0x99, 0xa2, 0x1d, + 0xbd}, + [ANCSCharacteristicData] = + {0x22, 0xea, 0xc6, 0xe9, 0x24, 0xd6, 0x4b, 0xb5, 0xbe, 0x44, 0xb3, 0x6a, 0xce, 0x7c, 0x7b, + 0xfb}, + [ANCSCharacteristicControl] = { + 0x69, 0xd1, 0xd8, 0xf3, 0x45, 0xe1, 0x49, 0xa8, 0x98, 0x21, 0x9b, 0xbd, 0xfd, 0xaa, 0xd9, + 0xd9 + }, }; diff --git a/src/fw/comm/ble/kernel_le_client/ancs/ancs_types.h b/src/fw/comm/ble/kernel_le_client/ancs/ancs_types.h index 7bb94265d6..fcf46dbe74 100644 --- a/src/fw/comm/ble/kernel_le_client/ancs/ancs_types.h +++ b/src/fw/comm/ble/kernel_le_client/ancs/ancs_types.h @@ -17,7 +17,8 @@ //! is the most unlikely UID that an iOS device would use. #define INVALID_UID UINT32_MAX -typedef bool (*AttrDictCompletePredicate)(const uint8_t* data, const size_t length, bool* out_error); +typedef bool (*AttrDictCompletePredicate)(const uint8_t *data, const size_t length, + bool *out_error); typedef enum { EventIDNotificationAdded = 0, @@ -57,10 +58,10 @@ typedef enum { //! Notification Source's "Notification" format typedef struct PACKED { - EventID event_id:8; - EventFlags event_flags:8; - CategoryID category_id:8; - uint8_t category_count; // @@ -13,23 +12,22 @@ #include - -bool ancs_util_is_complete_notif_attr_response(const uint8_t* data, const size_t length, bool* out_error) { +bool ancs_util_is_complete_notif_attr_response(const uint8_t *data, const size_t length, + bool *out_error) { PBL_ASSERTN(out_error); const size_t header_len = sizeof(GetNotificationAttributesMsg); if (length > header_len) { ANCSAttribute *attributes[NUM_FETCHED_NOTIF_ATTRIBUTES] = {}; - bool complete = ancs_util_get_attr_ptrs(data + header_len, length - header_len, - s_fetched_notif_attributes, - ARRAY_LENGTH(s_fetched_notif_attributes), - attributes, out_error); + bool complete = + ancs_util_get_attr_ptrs(data + header_len, length - header_len, s_fetched_notif_attributes, + ARRAY_LENGTH(s_fetched_notif_attributes), attributes, out_error); return complete; } return false; } -bool ancs_util_is_complete_app_attr_dict(const uint8_t* data, size_t length, bool* out_error) { +bool ancs_util_is_complete_app_attr_dict(const uint8_t *data, size_t length, bool *out_error) { PBL_ASSERTN(out_error); // Search for end of the App ID before checking that all attributes are present. @@ -43,22 +41,20 @@ bool ancs_util_is_complete_app_attr_dict(const uint8_t* data, size_t length, boo *out_error = false; return false; } - return ancs_util_get_attr_ptrs(data, length, - s_fetched_app_attributes, - ARRAY_LENGTH(s_fetched_app_attributes), - NULL, out_error); + return ancs_util_get_attr_ptrs(data, length, s_fetched_app_attributes, + ARRAY_LENGTH(s_fetched_app_attributes), NULL, out_error); } -bool ancs_util_get_attr_ptrs(const uint8_t* data, const size_t length, const FetchedAttribute* attr_list, - const int num_attrs, ANCSAttribute *out_attr_ptrs[], bool* out_error) { - +bool ancs_util_get_attr_ptrs(const uint8_t *data, const size_t length, + const FetchedAttribute *attr_list, const int num_attrs, + ANCSAttribute *out_attr_ptrs[], bool *out_error) { PBL_ASSERTN(out_error); *out_error = false; - const uint8_t* iter = data; + const uint8_t *iter = data; if (length < sizeof(ANCSAttribute)) { - PBL_LOG_ERR("ANCS data length is too small. Length: %d, sizeof(ANCSAttribute): %d", - (int)length, (int)sizeof(ANCSAttribute)); + PBL_LOG_ERR("ANCS data length is too small. Length: %d, sizeof(ANCSAttribute): %d", (int)length, + (int)sizeof(ANCSAttribute)); *out_error = true; return false; } @@ -69,8 +65,8 @@ bool ancs_util_get_attr_ptrs(const uint8_t* data, const size_t length, const Fet bool extracted_complete_attribute = false; // Iterate over the contents of the buffer while ((iter + sizeof(ANCSAttribute)) <= (data + length)) { - ANCSAttribute* attr = (ANCSAttribute*) iter; - const uint8_t* next_iter = (uint8_t*) attr->value + attr->length; + ANCSAttribute *attr = (ANCSAttribute *)iter; + const uint8_t *next_iter = (uint8_t *)attr->value + attr->length; // Match this attribute with its entry in the FetchedNotifAttribute list bool is_found = false; @@ -78,7 +74,8 @@ bool ancs_util_get_attr_ptrs(const uint8_t* data, const size_t length, const Fet is_found = (attr->id == attr_list[i].id); if (is_found) { // Check that attribute length is valid - bool attr_length_invalid = (attr_list[i].max_length != 0) && (attr->length > attr_list[i].max_length); + bool attr_length_invalid = + (attr_list[i].max_length != 0) && (attr->length > attr_list[i].max_length); if (attr_length_invalid) { PBL_LOG_ERR("Length of ANCS attribute %d is invalid: length: %d, max_length: %d", attr->id, attr->length, attr_list[i].max_length); @@ -87,7 +84,7 @@ bool ancs_util_get_attr_ptrs(const uint8_t* data, const size_t length, const Fet } attrs_found[i] = true; if (out_attr_ptrs) { - out_attr_ptrs[i] = (ANCSAttribute *) attr; + out_attr_ptrs[i] = (ANCSAttribute *)attr; } break; @@ -101,7 +98,7 @@ bool ancs_util_get_attr_ptrs(const uint8_t* data, const size_t length, const Fet return false; } - extracted_complete_attribute = ((uint8_t*)attr->value + attr->length <= data + length); + extracted_complete_attribute = ((uint8_t *)attr->value + attr->length <= data + length); iter = next_iter; } @@ -109,7 +106,6 @@ bool ancs_util_get_attr_ptrs(const uint8_t* data, const size_t length, const Fet // that were in the FetchedNotifAttribute list // Check if there are any outstanding attributes that have not been found for (int i = 0; i < num_attrs; ++i) { - const bool optional = (attr_list[i].flags & FetchedAttributeFlagOptional); if (optional) { continue; diff --git a/src/fw/comm/ble/kernel_le_client/ancs/ancs_util.h b/src/fw/comm/ble/kernel_le_client/ancs/ancs_util.h index b4c163ef0d..b5bb7de0a5 100644 --- a/src/fw/comm/ble/kernel_le_client/ancs/ancs_util.h +++ b/src/fw/comm/ble/kernel_le_client/ancs/ancs_util.h @@ -9,12 +9,13 @@ #include -int ancs_util_get_notif_attr_response_len(const uint8_t* data, const size_t length); +int ancs_util_get_notif_attr_response_len(const uint8_t *data, const size_t length); //! Helper functions that wrap ancs_util_get_attrs, checking if all respective attr list //! parameters were found -bool ancs_util_is_complete_notif_attr_response(const uint8_t* data, const size_t length, bool* out_error); -bool ancs_util_is_complete_app_attr_dict(const uint8_t* data, const size_t length, bool* out_error); +bool ancs_util_is_complete_notif_attr_response(const uint8_t *data, const size_t length, + bool *out_error); +bool ancs_util_is_complete_app_attr_dict(const uint8_t *data, const size_t length, bool *out_error); //! Extract pointers to the start of each attribute in attr_list //! @param data The raw attribute dictionary data to parse @@ -26,5 +27,6 @@ bool ancs_util_is_complete_app_attr_dict(const uint8_t* data, const size_t lengt //! if true, bail out! //! @return True if all requested attributes are present and complete; false if //! one or more attributes are missing or the last attribute is truncated. -bool ancs_util_get_attr_ptrs(const uint8_t* data, const size_t length, const FetchedAttribute* attr_list, - const int num_attrs, ANCSAttribute *out_attr_ptrs[], bool* out_error); +bool ancs_util_get_attr_ptrs(const uint8_t *data, const size_t length, + const FetchedAttribute *attr_list, const int num_attrs, + ANCSAttribute *out_attr_ptrs[], bool *out_error); diff --git a/src/fw/comm/ble/kernel_le_client/app_launch/app_launch.c b/src/fw/comm/ble/kernel_le_client/app_launch/app_launch.c index 5339f25d82..996ec14235 100644 --- a/src/fw/comm/ble/kernel_le_client/app_launch/app_launch.c +++ b/src/fw/comm/ble/kernel_le_client/app_launch/app_launch.c @@ -36,8 +36,8 @@ void app_launch_invalidate_all_references(void) { s_app_launch_characteristic = BLE_CHARACTERISTIC_INVALID; } -void app_launch_handle_service_removed( - BLECharacteristic *characteristics, uint8_t num_characteristics) { +void app_launch_handle_service_removed(BLECharacteristic *characteristics, + uint8_t num_characteristics) { app_launch_invalidate_all_references(); } diff --git a/src/fw/comm/ble/kernel_le_client/app_launch/app_launch.h b/src/fw/comm/ble/kernel_le_client/app_launch/app_launch.h index 53244412da..43a88db7d7 100644 --- a/src/fw/comm/ble/kernel_le_client/app_launch/app_launch.h +++ b/src/fw/comm/ble/kernel_le_client/app_launch/app_launch.h @@ -14,8 +14,8 @@ void app_launch_handle_service_discovered(BLECharacteristic *characteristics); void app_launch_invalidate_all_references(void); -void app_launch_handle_service_removed( - BLECharacteristic *characteristics, uint8_t num_characteristics); +void app_launch_handle_service_removed(BLECharacteristic *characteristics, + uint8_t num_characteristics); bool app_launch_can_handle_characteristic(BLECharacteristic characteristic); diff --git a/src/fw/comm/ble/kernel_le_client/app_launch/app_launch_definition.h b/src/fw/comm/ble/kernel_le_client/app_launch/app_launch_definition.h index e7c98f24d8..41d143ae50 100644 --- a/src/fw/comm/ble/kernel_le_client/app_launch/app_launch_definition.h +++ b/src/fw/comm/ble/kernel_le_client/app_launch/app_launch_definition.h @@ -7,12 +7,11 @@ #include -static const Uuid s_app_launch_service_uuid = { - PEBBLE_BT_UUID_EXPAND(PEBBLE_BT_APP_LAUNCH_SERVICE_UUID_32BIT) -}; +static const Uuid s_app_launch_service_uuid = {PEBBLE_BT_UUID_EXPAND( + PEBBLE_BT_APP_LAUNCH_SERVICE_UUID_32BIT)}; static const Uuid s_app_launch_characteristic_uuids[AppLaunchCharacteristicNum] = { - [AppLaunchCharacteristicAppLaunch] = { - PEBBLE_BT_UUID_EXPAND(PEBBLE_BT_APP_LAUNCH_CHARACTERISTIC_UUID_32BIT), - }, + [AppLaunchCharacteristicAppLaunch] = { + PEBBLE_BT_UUID_EXPAND(PEBBLE_BT_APP_LAUNCH_CHARACTERISTIC_UUID_32BIT), + }, }; diff --git a/src/fw/comm/ble/kernel_le_client/dis/dis_definition.h b/src/fw/comm/ble/kernel_le_client/dis/dis_definition.h index 0d5ef3c392..a2df092d04 100644 --- a/src/fw/comm/ble/kernel_le_client/dis/dis_definition.h +++ b/src/fw/comm/ble/kernel_le_client/dis/dis_definition.h @@ -6,14 +6,10 @@ #include "dis.h" //! DIS Service UUID - 0000180A-0000-1000-8000-00805F9B34FB -static const Uuid s_dis_service_uuid = { - BT_UUID_EXPAND(0x180A) -}; +static const Uuid s_dis_service_uuid = {BT_UUID_EXPAND(0x180A)}; //! DIS Characteristic UUIDs static const Uuid s_dis_characteristic_uuids[NumDISCharacteristic] = { - //! Manufacturer Name String - 00002A29-0000-1000-8000-00805F9B34FB - [DISCharacteristicManufacturerNameString] = { - BT_UUID_EXPAND(0x2A29) - }, + //! Manufacturer Name String - 00002A29-0000-1000-8000-00805F9B34FB + [DISCharacteristicManufacturerNameString] = {BT_UUID_EXPAND(0x2A29)}, }; diff --git a/src/fw/comm/ble/kernel_le_client/kernel_le_client.c b/src/fw/comm/ble/kernel_le_client/kernel_le_client.c index 9e74099eef..c7f740d533 100644 --- a/src/fw/comm/ble/kernel_le_client/kernel_le_client.c +++ b/src/fw/comm/ble/kernel_le_client/kernel_le_client.c @@ -52,11 +52,11 @@ enum { typedef struct { //! Name of the GATT profile that will be used in debug logs - const char * const debug_name; + const char *const debug_name; //! The Service UUID of the remote GATT service - const Uuid * const service_uuid; + const Uuid *const service_uuid; //! Array of Characteristic UUIDs that are expected to be part of the remote GATT service - const Uuid * const characteristic_uuids; + const Uuid *const characteristic_uuids; //! The number of elements in the `characteristic_uuids` array const uint8_t num_characteristics; //! Callback executed every time a BT LE service matching 'service_uuid' is discovered @@ -89,102 +89,105 @@ typedef struct { static const KernelLEClient s_clients[KernelLEClientNum] = { #if UNITTEST - [KernelLEClientUnitTest] = { - .debug_name = "TEST", - .service_uuid = &s_test_service_uuid, - .characteristic_uuids = s_test_characteristic_uuids, - .num_characteristics = TestCharacteristicCount, - .handle_service_discovered = test_client_handle_service_discovered, - .handle_service_removed = test_client_handle_service_removed, - .invalidate_all_references = test_client_invalidate_all_references, - .can_handle_characteristic = test_client_can_handle_characteristic, - .handle_write_response = test_client_handle_write_response, - .handle_subscribe = test_client_handle_subscribe, - .handle_read_or_notification = test_client_handle_read_or_notification, - }, + [KernelLEClientUnitTest] = { + .debug_name = "TEST", + .service_uuid = &s_test_service_uuid, + .characteristic_uuids = s_test_characteristic_uuids, + .num_characteristics = TestCharacteristicCount, + .handle_service_discovered = test_client_handle_service_discovered, + .handle_service_removed = test_client_handle_service_removed, + .invalidate_all_references = test_client_invalidate_all_references, + .can_handle_characteristic = test_client_can_handle_characteristic, + .handle_write_response = test_client_handle_write_response, + .handle_subscribe = test_client_handle_subscribe, + .handle_read_or_notification = test_client_handle_read_or_notification, + }, #else - [KernelLEClientPPoGATT] = { - .debug_name = "PPoG", - .service_uuid = &s_ppogatt_service_uuid, - .characteristic_uuids = s_ppogatt_characteristic_uuids, - .num_characteristics = PPoGATTCharacteristicNum, - .handle_service_discovered = ppogatt_handle_service_discovered, - .handle_service_removed = ppogatt_handle_service_removed, - .invalidate_all_references = ppogatt_invalidate_all_references, - .can_handle_characteristic = ppogatt_can_handle_characteristic, - .handle_write_response = NULL, - .handle_subscribe = ppogatt_handle_subscribe, - .handle_read_or_notification = ppogatt_handle_read_or_notification, - }, + [KernelLEClientPPoGATT] = + { + .debug_name = "PPoG", + .service_uuid = &s_ppogatt_service_uuid, + .characteristic_uuids = s_ppogatt_characteristic_uuids, + .num_characteristics = PPoGATTCharacteristicNum, + .handle_service_discovered = ppogatt_handle_service_discovered, + .handle_service_removed = ppogatt_handle_service_removed, + .invalidate_all_references = ppogatt_invalidate_all_references, + .can_handle_characteristic = ppogatt_can_handle_characteristic, + .handle_write_response = NULL, + .handle_subscribe = ppogatt_handle_subscribe, + .handle_read_or_notification = ppogatt_handle_read_or_notification, + }, #if defined(CONFIG_BT_ANCS_CLIENT) - [KernelLEClientANCS] = { - .debug_name = "ANCS", - .service_uuid = &s_ancs_service_uuid, - .characteristic_uuids = s_ancs_characteristic_uuids, - .num_characteristics = NumANCSCharacteristic, - .handle_service_discovered = ancs_handle_service_discovered, - .handle_service_removed = ancs_handle_service_removed, - .invalidate_all_references = ancs_invalidate_all_references, - .can_handle_characteristic = ancs_can_handle_characteristic, - .handle_write_response = ancs_handle_write_response, - .handle_subscribe = ancs_handle_subscribe, - .handle_read_or_notification = ancs_handle_read_or_notification, - }, + [KernelLEClientANCS] = + { + .debug_name = "ANCS", + .service_uuid = &s_ancs_service_uuid, + .characteristic_uuids = s_ancs_characteristic_uuids, + .num_characteristics = NumANCSCharacteristic, + .handle_service_discovered = ancs_handle_service_discovered, + .handle_service_removed = ancs_handle_service_removed, + .invalidate_all_references = ancs_invalidate_all_references, + .can_handle_characteristic = ancs_can_handle_characteristic, + .handle_write_response = ancs_handle_write_response, + .handle_subscribe = ancs_handle_subscribe, + .handle_read_or_notification = ancs_handle_read_or_notification, + }, #endif #if defined(CONFIG_BT_AMS_CLIENT) - [KernelLEClientAMS] = { - .debug_name = "AMS", - .service_uuid = &s_ams_service_uuid, - .characteristic_uuids = s_ams_characteristic_uuids, - .num_characteristics = NumAMSCharacteristic, - .handle_service_discovered = ams_handle_service_discovered, - .handle_service_removed = ams_handle_service_removed, - .invalidate_all_references = ams_invalidate_all_references, - .can_handle_characteristic = ams_can_handle_characteristic, - .handle_write_response = ams_handle_write_response, - .handle_subscribe = ams_handle_subscribe, - .handle_read_or_notification = ams_handle_read_or_notification, - }, + [KernelLEClientAMS] = + { + .debug_name = "AMS", + .service_uuid = &s_ams_service_uuid, + .characteristic_uuids = s_ams_characteristic_uuids, + .num_characteristics = NumAMSCharacteristic, + .handle_service_discovered = ams_handle_service_discovered, + .handle_service_removed = ams_handle_service_removed, + .invalidate_all_references = ams_invalidate_all_references, + .can_handle_characteristic = ams_can_handle_characteristic, + .handle_write_response = ams_handle_write_response, + .handle_subscribe = ams_handle_subscribe, + .handle_read_or_notification = ams_handle_read_or_notification, + }, #endif - [KernelLEClientAppLaunch] = { - .debug_name = "Lnch", - .service_uuid = &s_app_launch_service_uuid, - .characteristic_uuids = s_app_launch_characteristic_uuids, - .num_characteristics = AppLaunchCharacteristicNum, - .handle_service_discovered = app_launch_handle_service_discovered, - .handle_service_removed = app_launch_handle_service_removed, - .invalidate_all_references = app_launch_invalidate_all_references, - .can_handle_characteristic = app_launch_can_handle_characteristic, - .handle_read_or_notification = NULL, - }, - [KernelLEClientDIS] = { - .debug_name = "DIS", - .service_uuid = &s_dis_service_uuid, - .characteristic_uuids = s_dis_characteristic_uuids, - .num_characteristics = NumDISCharacteristic, - .handle_service_discovered = dis_handle_service_discovered, - .handle_service_removed = dis_handle_service_removed, - .invalidate_all_references = dis_invalidate_all_references, - .can_handle_characteristic = NULL, - .handle_read_or_notification = NULL, - }, -#endif // UNITTEST + [KernelLEClientAppLaunch] = + { + .debug_name = "Lnch", + .service_uuid = &s_app_launch_service_uuid, + .characteristic_uuids = s_app_launch_characteristic_uuids, + .num_characteristics = AppLaunchCharacteristicNum, + .handle_service_discovered = app_launch_handle_service_discovered, + .handle_service_removed = app_launch_handle_service_removed, + .invalidate_all_references = app_launch_invalidate_all_references, + .can_handle_characteristic = app_launch_can_handle_characteristic, + .handle_read_or_notification = NULL, + }, + [KernelLEClientDIS] = { + .debug_name = "DIS", + .service_uuid = &s_dis_service_uuid, + .characteristic_uuids = s_dis_characteristic_uuids, + .num_characteristics = NumDISCharacteristic, + .handle_service_discovered = dis_handle_service_discovered, + .handle_service_removed = dis_handle_service_removed, + .invalidate_all_references = dis_invalidate_all_references, + .can_handle_characteristic = NULL, + .handle_read_or_notification = NULL, + }, +#endif // UNITTEST }; static void prv_handle_services_removed(PebbleBLEGATTClientServicesRemoved *services_removed) { PebbleBLEGATTClientServiceHandles *service_remove_info = &services_removed->handles[0]; for (int s = 0; s < services_removed->num_services_removed; s++) { for (int c = 0; c < KernelLEClientNum; c++) { - const KernelLEClient * const client = &s_clients[c]; + const KernelLEClient *const client = &s_clients[c]; if (uuid_equal(&service_remove_info->uuid, client->service_uuid)) { client->handle_service_removed( (BLECharacteristic *)&service_remove_info->char_and_desc_handles[0], - service_remove_info->num_characteristics); + service_remove_info->num_characteristics); } } - int num_hdls = service_remove_info->num_descriptors + - service_remove_info->num_characteristics; + int num_hdls = service_remove_info->num_descriptors + service_remove_info->num_characteristics; service_remove_info = (PebbleBLEGATTClientServiceHandles *)&service_remove_info->char_and_desc_handles[num_hdls]; } @@ -192,13 +195,13 @@ static void prv_handle_services_removed(PebbleBLEGATTClientServicesRemoved *serv static void prv_handle_all_services_invalidated(void) { for (int c = 0; c < KernelLEClientNum; c++) { - const KernelLEClient * const client = &s_clients[c]; + const KernelLEClient *const client = &s_clients[c]; client->invalidate_all_references(); } } -static void prv_handle_services_added( - PebbleBLEGATTClientServicesAdded *added_services, BTDeviceInternal *device) { +static void prv_handle_services_added(PebbleBLEGATTClientServicesAdded *added_services, + BTDeviceInternal *device) { // loop through the new services for (int s = 0; s < added_services->num_services_added; s++) { // get the uuid for the service @@ -206,7 +209,7 @@ static void prv_handle_services_added( // are any clients looking for this uuid? for (int c = 0; c < KernelLEClientNum; c++) { - const KernelLEClient * const client = &s_clients[c]; + const KernelLEClient *const client = &s_clients[c]; if (!uuid_equal(&service_uuid, (const Uuid *)client->service_uuid)) { continue; @@ -215,14 +218,13 @@ static void prv_handle_services_added( // We have found a service that a client is looking for. Make sure the // characteristics we want are present and if so notify the interested client about it BLECharacteristic characteristics[client->num_characteristics]; - const uint8_t num_characteristics = - gatt_client_service_get_characteristics_matching_uuids( - added_services->services[s], &characteristics[0], client->characteristic_uuids, - client->num_characteristics); + const uint8_t num_characteristics = gatt_client_service_get_characteristics_matching_uuids( + added_services->services[s], &characteristics[0], client->characteristic_uuids, + client->num_characteristics); if (num_characteristics != client->num_characteristics) { - PBL_LOG_ERR("Found %s, but only %u characteristics...", - client->debug_name, num_characteristics); + PBL_LOG_ERR("Found %s, but only %u characteristics...", client->debug_name, + num_characteristics); continue; } @@ -246,8 +248,8 @@ static void prv_handle_gatt_service_discovery_event(const PebbleBLEGATTClientSer if (event_info->type != PebbleServicesRemoved) { // For removals, we log info in the handler routine - PBL_LOG_INFO("Service changed Indication: type: %d status: %d", - event_info->type, event_info->status); + PBL_LOG_INFO("Service changed Indication: type: %d status: %d", event_info->type, + event_info->status); } switch (event_info->type) { @@ -265,9 +267,9 @@ static void prv_handle_gatt_service_discovery_event(const PebbleBLEGATTClientSer } } -static const KernelLEClient * prv_client_for_characteristic(BLECharacteristic characteristic) { +static const KernelLEClient *prv_client_for_characteristic(BLECharacteristic characteristic) { for (int c = 0; c < KernelLEClientNum; ++c) { - const KernelLEClient * const client = &s_clients[c]; + const KernelLEClient *const client = &s_clients[c]; if (client->can_handle_characteristic && client->can_handle_characteristic(characteristic)) { return client; } @@ -275,8 +277,8 @@ static const KernelLEClient * prv_client_for_characteristic(BLECharacteristic ch return NULL; } -typedef void (*ConsumeFuncPtr)(BLECharacteristic characteristic_ref, - uint8_t *value_out, uint16_t value_length, GAPLEClient client); +typedef void (*ConsumeFuncPtr)(BLECharacteristic characteristic_ref, uint8_t *value_out, + uint16_t value_length, GAPLEClient client); typedef void (*ReadNotifyHandler)(BLECharacteristic characteristic, const uint8_t *value, size_t value_length, BLEGATTError error); @@ -289,18 +291,16 @@ static void prv_consume_read_response(const PebbleBLEGATTClientEvent *event, if (value_length) { // This is ugly and causes double-copying the data... // TODO: https://pebbletechnology.atlassian.net/browse/PBL-14164 - buffer = (uint8_t *) kernel_malloc(value_length); + buffer = (uint8_t *)kernel_malloc(value_length); if (UNLIKELY(!buffer)) { PBL_LOG_ERR("OOM for GATT read response - %d bytes", (int)value_length); return; } - gatt_client_consume_read_response(event->object_ref, - buffer, value_length, GAPLEClientKernel); + gatt_client_consume_read_response(event->object_ref, buffer, value_length, GAPLEClientKernel); } if (client->handle_read_or_notification) { - client->handle_read_or_notification(event->object_ref, buffer, - value_length, event->gatt_error); + client->handle_read_or_notification(event->object_ref, buffer, value_length, event->gatt_error); } kernel_free(buffer); } @@ -324,24 +324,22 @@ static void prv_consume_notifications(const PebbleBLEGATTClientEvent *event) { // This is ugly and causes double-copying the data... // TODO: https://pebbletechnology.atlassian.net/browse/PBL-14164 - uint8_t *buffer = (uint8_t *) kernel_malloc(header.value_length); + uint8_t *buffer = (uint8_t *)kernel_malloc(header.value_length); if (UNLIKELY(header.value_length && !buffer)) { PBL_LOG_ERR("OOM for GATT notification"); return; } - const uint16_t next_value_length = - gatt_client_subscriptions_consume_notification(&header.characteristic, - buffer, &header.value_length, - GAPLEClientKernel, &has_more); + const uint16_t next_value_length = gatt_client_subscriptions_consume_notification( + &header.characteristic, buffer, &header.value_length, GAPLEClientKernel, &has_more); - const KernelLEClient * const client = prv_client_for_characteristic(header.characteristic); + const KernelLEClient *const client = prv_client_for_characteristic(header.characteristic); if (client->handle_read_or_notification) { client->handle_read_or_notification(header.characteristic, buffer, header.value_length, BLEGATTErrorSuccess); } else { PBL_LOG_DBG("No client to handle GATT notification from characteristic %p", - (void*) header.characteristic); + (void *)header.characteristic); } kernel_free(buffer); header.value_length = next_value_length; @@ -358,12 +356,12 @@ static void prv_handle_gatt_event(const PebbleBLEGATTClientEvent *event) { return; } - const KernelLEClient * const client = prv_client_for_characteristic(event->object_ref); + const KernelLEClient *const client = prv_client_for_characteristic(event->object_ref); if (!client) { // Read responses still need to be consumed, even if the client has disappeared: if (event->subtype == PebbleBLEGATTClientEventTypeCharacteristicRead && event->value_length) { - gatt_client_consume_read_response(event->object_ref, - NULL, event->value_length, GAPLEClientKernel); + gatt_client_consume_read_response(event->object_ref, NULL, event->value_length, + GAPLEClientKernel); } goto log_error; } @@ -395,17 +393,14 @@ static void prv_handle_gatt_event(const PebbleBLEGATTClientEvent *event) { } log_error: - PBL_LOG_ERR("Unhandled GATT event:%u ref:%"PRIu32" err:%"PRIu16" len:%"PRIu16" cl:%p", - event->subtype, - (uint32_t)event->object_ref, - (uint16_t)event->gatt_error, - (uint16_t)event->value_length, - client); + PBL_LOG_ERR("Unhandled GATT event:%u ref:%" PRIu32 " err:%" PRIu16 " len:%" PRIu16 " cl:%p", + event->subtype, (uint32_t)event->object_ref, (uint16_t)event->gatt_error, + (uint16_t)event->value_length, client); } static void prv_handle_connection_event(const PebbleBLEConnectionEvent *event) { - PBL_LOG_DBG("PEBBLE_BLE_CONNECTION_EVENT: reason=0x%x, conn=%u, bond=%u", - event->hci_reason, event->connected, event->bonding_id); + PBL_LOG_DBG("PEBBLE_BLE_CONNECTION_EVENT: reason=0x%x, conn=%u, bond=%u", event->hci_reason, + event->connected, event->bonding_id); const bool connected = event->connected; // FIXME: When PPoGATT is supported add a check for active gateway @@ -474,7 +469,7 @@ void kernel_le_client_handle_event(const PebbleEvent *e) { static void prv_connect_gateway_bonding(BTBondingID gateway_bonding) { gap_le_slave_reconnect_start(); gap_le_connect_connect_by_bonding(gateway_bonding, true /* auto_reconnect */, - true /* is_pairing_required */, GAPLEClientKernel); + true /* is_pairing_required */, GAPLEClientKernel); } // ------------------------------------------------------------------------------------------------- diff --git a/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.c b/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.c index 5825831dd5..f8d774b6e5 100644 --- a/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.c +++ b/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.c @@ -118,8 +118,8 @@ typedef struct PPoGATTClient { uint8_t next_expected_ack_sn; uint8_t next_data_sn; - bool send_rx_ack_now; //! True if we want to flush the Ack immediately! - uint8_t outstanding_rx_ack_count; //! Count of how many data packets we have yet to Ack + bool send_rx_ack_now; //! True if we want to flush the Ack immediately! + uint8_t outstanding_rx_ack_count; //! Count of how many data packets we have yet to Ack } out; //! Number of consecutive resets so far @@ -128,7 +128,7 @@ typedef struct PPoGATTClient { //! Number of meta read retry attempts uint8_t meta_read_retries; - bool disconnect_requested; //! True if the client requested a disconnect + bool disconnect_requested; //! True if the client requested a disconnect //! Guards prv_send_next_packets against re-entry while bt_lock is dropped. bool send_in_progress; @@ -137,7 +137,7 @@ typedef struct PPoGATTClient { //! buffers (reversed role only); 0 when not stalled. uint16_t send_retry_count; - TimerID rx_ack_timer; //! Timer to ensure Acks for data are dispatched regularly + TimerID rx_ack_timer; //! Timer to ensure Acks for data are dispatched regularly //! Timer to retry sending after the BT stack ran out of buffers //! (reversed role only; NimBLE has no "buffers freed" event to wait for) @@ -195,10 +195,9 @@ extern GAPLEConnection *gatt_client_characteristic_get_connection(BLECharacteris extern uint16_t gatt_client_characteristic_get_handle_and_connection( BLECharacteristic characteristic_ref, GAPLEConnection **connection_out); - // ------------------------------------------------------------------------------------------------- void ppogatt_reset_disconnect_counter(void) { - s_disconnect_counter = 0; + s_disconnect_counter = 0; } static bool prv_client_supports_enhanced_throughput_features(const PPoGATTClient *client) { @@ -223,17 +222,17 @@ static GAPLEConnection *prv_get_connection(const PPoGATTClient *client) { return gatt_client_characteristic_get_connection(client->characteristics.meta); } -static void prv_set_connection_responsiveness( - Transport *transport, BtConsumer consumer, ResponseTimeState state, uint16_t max_period_secs, - ResponsivenessGrantedHandler granted_handler) { - PPoGATTClient *client = (PPoGATTClient *) transport; +static void prv_set_connection_responsiveness(Transport *transport, BtConsumer consumer, + ResponseTimeState state, uint16_t max_period_secs, + ResponsivenessGrantedHandler granted_handler) { + PPoGATTClient *client = (PPoGATTClient *)transport; GAPLEConnection *connection = prv_get_connection(client); conn_mgr_set_ble_conn_response_time_ext(connection, consumer, state, max_period_secs, granted_handler); } static const Uuid *prv_get_uuid(Transport *transport) { - PPoGATTClient *client = (PPoGATTClient *) transport; + PPoGATTClient *client = (PPoGATTClient *)transport; return &client->app_uuid; } @@ -242,12 +241,12 @@ static CommSessionTransportType prv_get_type(struct Transport *transport) { } static const TransportImplementation s_ppogatt_transport_implementation = { - .send_next = &ppogatt_send_next, - .close = &ppogatt_close, - .reset = &ppogatt_reset, - .set_connection_responsiveness = prv_set_connection_responsiveness, - .get_uuid = prv_get_uuid, - .get_type = prv_get_type, + .send_next = &ppogatt_send_next, + .close = &ppogatt_close, + .reset = &ppogatt_reset, + .set_connection_responsiveness = prv_set_connection_responsiveness, + .get_uuid = prv_get_uuid, + .get_type = prv_get_type, }; // ------------------------------------------------------------------------------------------------- @@ -261,7 +260,7 @@ static void prv_send_next_packets_async(PPoGATTClient *client) { // ------------------------------------------------------------------------------------------------- static uint32_t prv_sn_distance(uint8_t sn_begin_incl, uint32_t sn_end_excl) { - return ((uint32_t) PPOGATT_SN_MOD_DIV + sn_end_excl - sn_begin_incl) % PPOGATT_SN_MOD_DIV; + return ((uint32_t)PPOGATT_SN_MOD_DIV + sn_end_excl - sn_begin_incl) % PPOGATT_SN_MOD_DIV; } //! @return Number of packets in flight, *excluding* packets that are pending retransmission. @@ -290,8 +289,7 @@ static bool prv_is_packet_with_sn_awaiting_ack(const PPoGATTClient *client, uint static uint16_t prv_total_num_bytes_awaiting_ack_up_to(const PPoGATTClient *client, uint32_t sn_end_excl) { uint16_t num_bytes = 0; - for (uint32_t sn = client->out.next_expected_ack_sn; - sn != sn_end_excl; sn = prv_next_sn(sn)) { + for (uint32_t sn = client->out.next_expected_ack_sn; sn != sn_end_excl; sn = prv_next_sn(sn)) { num_bytes += prv_get_payload_size_for_sn(client, sn); } return num_bytes; @@ -305,10 +303,8 @@ static void prv_set_payload_size_for_sn(PPoGATTClient *client, uint32_t sn, uint client->out.payload_sizes[sn] = payload_size; } -static void prv_clear_payload_sizes_up_to(PPoGATTClient *client, - uint32_t sn_end_excl) { - for (uint32_t sn = client->out.next_expected_ack_sn; - sn != sn_end_excl; sn = prv_next_sn(sn)) { +static void prv_clear_payload_sizes_up_to(PPoGATTClient *client, uint32_t sn_end_excl) { + for (uint32_t sn = client->out.next_expected_ack_sn; sn != sn_end_excl; sn = prv_next_sn(sn)) { prv_set_payload_size_for_sn(client, sn, 0); } } @@ -329,8 +325,8 @@ static void prv_roll_back(PPoGATTClient *client, uint32_t sn) { return; } - PBL_LOG_WRN("Rolling back from (%u, %u) to %"PRIu32, - client->out.next_data_sn, client->out.next_expected_ack_sn, sn); + PBL_LOG_WRN("Rolling back from (%u, %u) to %" PRIu32, client->out.next_data_sn, + client->out.next_expected_ack_sn, sn); // Go back and send again: // No need to worry about the timeouts of these packets hitting, because prv_check_timeouts uses @@ -383,7 +379,7 @@ static void prv_ack_timeout_kernelmain_cb(void *unused) { while (client) { prv_increment_timeout_counter_if_necessary(client); prv_check_timeouts(client); - client = (PPoGATTClient *) client->node.next; + client = (PPoGATTClient *)client->node.next; } } bt_unlock(); @@ -407,7 +403,7 @@ static PPoGATTClient *prv_create_client(TimerID rx_ack_timer, TimerID send_retry client->rx_ack_timer = rx_ack_timer; client->send_retry_timer = send_retry_timer; client->created_ticks = rtc_get_ticks(); - s_ppogatt_head = (PPoGATTClient *) list_prepend((ListNode *)s_ppogatt_head, &client->node); + s_ppogatt_head = (PPoGATTClient *)list_prepend((ListNode *)s_ppogatt_head, &client->node); if (!regular_timer_is_scheduled(&s_ack_timer)) { s_ack_timer.cb = prv_timer_callback; regular_timer_add_multisecond_callback(&s_ack_timer, PPOGATT_TIMEOUT_TICK_INTERVAL_SECS); @@ -419,11 +415,12 @@ static PPoGATTClient *prv_create_client(TimerID rx_ack_timer, TimerID send_retry static void prv_delete_client(PPoGATTClient *client, bool is_disconnected, DeleteReason reason) { const uint32_t elapsed_ms = (rtc_get_ticks() - client->created_ticks) * 1000 / RTC_TICKS_HZ; - PBL_LOG_INFO("PPoGATT client deleted: role=%u state=%u reason=%u disconnected=%u after %"PRIu32"ms", - client->role, client->state, reason, is_disconnected, elapsed_ms); + PBL_LOG_INFO("PPoGATT client deleted: role=%u state=%u reason=%u disconnected=%u after %" PRIu32 + "ms", + client->role, client->state, reason, is_disconnected, elapsed_ms); // Unsubscribe from the phone's Data characteristic (forward role only): - if (client->role == PPoGATTRoleForward && - client->state > StateDisconnectedSubscribingData && !is_disconnected) { + if (client->role == PPoGATTRoleForward && client->state > StateDisconnectedSubscribingData && + !is_disconnected) { BLECharacteristic data_char = client->characteristics.data; // Release bt_lock before calling into NimBLE to avoid deadlock with ble_hs_mutex. bt_unlock(); @@ -439,7 +436,7 @@ static void prv_delete_client(PPoGATTClient *client, bool is_disconnected, Delet s_reversed_active_conn = NULL; } - list_remove(&client->node, (ListNode **) &s_ppogatt_head, NULL); + list_remove(&client->node, (ListNode **)&s_ppogatt_head, NULL); new_timer_delete(client->rx_ack_timer); new_timer_delete(client->send_retry_timer); kernel_free(client); @@ -452,17 +449,17 @@ static void prv_delete_client(PPoGATTClient *client, bool is_disconnected, Delet // ------------------------------------------------------------------------------------------------- static bool prv_characteristic_filter_callback(ListNode *found_node, void *data) { - const PPoGATTClient *client = (const PPoGATTClient *) found_node; - const BLECharacteristic characteristic = (const BLECharacteristic) data; + const PPoGATTClient *client = (const PPoGATTClient *)found_node; + const BLECharacteristic characteristic = (const BLECharacteristic)data; return (client->characteristics.data == characteristic || client->characteristics.meta == characteristic); } -static PPoGATTClient * prv_find_client_with_characteristic(BLECharacteristic characteristic, - bool *is_data) { +static PPoGATTClient *prv_find_client_with_characteristic(BLECharacteristic characteristic, + bool *is_data) { PPoGATTClient *client = - (PPoGATTClient *) list_find((ListNode *)s_ppogatt_head, prv_characteristic_filter_callback, - (void *)(uintptr_t) characteristic); + (PPoGATTClient *)list_find((ListNode *)s_ppogatt_head, prv_characteristic_filter_callback, + (void *)(uintptr_t)characteristic); if (client && is_data) { *is_data = (client->characteristics.data == characteristic); } @@ -472,33 +469,32 @@ static PPoGATTClient * prv_find_client_with_characteristic(BLECharacteristic cha // ------------------------------------------------------------------------------------------------- static bool prv_uuid_filter_callback(ListNode *found_node, void *data) { - const PPoGATTClient *client = (const PPoGATTClient *) found_node; - const Uuid *uuid = (const Uuid *) data; + const PPoGATTClient *client = (const PPoGATTClient *)found_node; + const Uuid *uuid = (const Uuid *)data; return uuid_equal(&client->app_uuid, uuid); } -static PPoGATTClient * prv_find_client_with_uuid(const Uuid *uuid) { - return (PPoGATTClient *) list_find((ListNode *)s_ppogatt_head, - prv_uuid_filter_callback, (void *) uuid); +static PPoGATTClient *prv_find_client_with_uuid(const Uuid *uuid) { + return (PPoGATTClient *)list_find((ListNode *)s_ppogatt_head, prv_uuid_filter_callback, + (void *)uuid); } // ------------------------------------------------------------------------------------------------- static bool prv_reversed_conn_filter_callback(ListNode *found_node, void *data) { - const PPoGATTClient *client = (const PPoGATTClient *) found_node; - const uint16_t conn_handle = (uint16_t)(uintptr_t) data; + const PPoGATTClient *client = (const PPoGATTClient *)found_node; + const uint16_t conn_handle = (uint16_t)(uintptr_t)data; return (client->role == PPoGATTRoleReversed && client->rev.conn_handle == conn_handle); } static PPoGATTClient *prv_find_reversed_client_for_conn(uint16_t conn_handle) { - return (PPoGATTClient *) list_find((ListNode *) s_ppogatt_head, - prv_reversed_conn_filter_callback, - (void *)(uintptr_t) conn_handle); + return (PPoGATTClient *)list_find((ListNode *)s_ppogatt_head, prv_reversed_conn_filter_callback, + (void *)(uintptr_t)conn_handle); } static bool prv_connection_filter_callback(ListNode *found_node, void *data) { - const PPoGATTClient *client = (const PPoGATTClient *) found_node; - const GAPLEConnection *connection = (const GAPLEConnection *) data; + const PPoGATTClient *client = (const PPoGATTClient *)found_node; + const GAPLEConnection *connection = (const GAPLEConnection *)data; if (client->role == PPoGATTRoleReversed) { return (client->rev.connection == connection); } @@ -508,19 +504,19 @@ static bool prv_connection_filter_callback(ListNode *found_node, void *data) { } static PPoGATTClient *prv_find_client_for_connection(GAPLEConnection *connection) { - return (PPoGATTClient *) list_find((ListNode *) s_ppogatt_head, - prv_connection_filter_callback, (void *) connection); + return (PPoGATTClient *)list_find((ListNode *)s_ppogatt_head, prv_connection_filter_callback, + (void *)connection); } // ------------------------------------------------------------------------------------------------- static bool prv_client_filter_callback(ListNode *found_node, void *data) { - return ((const PPoGATTClient *) found_node == (const PPoGATTClient *) data); + return ((const PPoGATTClient *)found_node == (const PPoGATTClient *)data); } static bool prv_is_client_valid(const PPoGATTClient *client) { - return (list_find((ListNode *)s_ppogatt_head, - prv_client_filter_callback, (void *) client) != NULL); + return (list_find((ListNode *)s_ppogatt_head, prv_client_filter_callback, (void *)client) != + NULL); } // ------------------------------------------------------------------------------------------------- @@ -557,7 +553,7 @@ static void prv_enter_awaiting_reset_complete(PPoGATTClient *client, bool self_i } client->in.next_expected_data_sn = 0; // FIXME: Use SN for RR / RC (https://pebbletechnology.atlassian.net/browse/PBL-12424) - client->out = (__typeof__(client->out)) {}; + client->out = (__typeof__(client->out)){}; if (prv_client_supports_enhanced_throughput_features(client)) { // Set our desired window sizes @@ -655,8 +651,7 @@ static void prv_handle_reset_request(PPoGATTClient *client) { static void prv_handle_reset_complete(PPoGATTClient *client, const PPoGATTPacket *packet, uint16_t payload_length) { - CommSession *session = comm_session_open((Transport *) client, - &s_ppogatt_transport_implementation, + CommSession *session = comm_session_open((Transport *)client, &s_ppogatt_transport_implementation, client->destination); if (!session) { prv_delete_client(client, false /* is_disconnected */, DeleteReason_CouldntOpenCommSession); @@ -669,11 +664,10 @@ static void prv_handle_reset_complete(PPoGATTClient *client, const PPoGATTPacket ppogatt_reset_disconnect_counter(); client->resets_counter = 0; - if (LIKELY(client->state == StateConnectedClosedAwaitingResetCompleteSelfInitiatedReset)) { - client->out.reset_packet_to_send = (const PPoGATTPacket) { - .sn = 0, - .type = PPoGATTPacketTypeResetComplete, + client->out.reset_packet_to_send = (const PPoGATTPacket){ + .sn = 0, + .type = PPoGATTPacketTypeResetComplete, }; prv_send_next_packets(client); } @@ -684,15 +678,14 @@ static void prv_handle_reset_complete(PPoGATTClient *client, const PPoGATTPacket if (prv_client_supports_enhanced_throughput_features(client)) { if (payload_length < sizeof(PPoGATTResetCompleteClientIDPayloadV1)) { - PBL_LOG_WRN("Unexpected PPoGatt Reset Complete Payload Size: %"PRIu16, - payload_length); + PBL_LOG_WRN("Unexpected PPoGatt Reset Complete Payload Size: %" PRIu16, payload_length); // Be defensive, and use the original window size client->out.tx_window_size = client->out.rx_window_size = PPOGATT_V0_WINDOW_SIZE; } else { PPoGATTResetCompleteClientIDPayloadV1 *payload = (PPoGATTResetCompleteClientIDPayloadV1 *)&packet->payload[0]; - PBL_LOG_DBG("PPoGATT Remote RxWindow: %d TxWindow %d", - payload->ppogatt_max_rx_window, payload->ppogatt_max_tx_window); + PBL_LOG_DBG("PPoGATT Remote RxWindow: %d TxWindow %d", payload->ppogatt_max_rx_window, + payload->ppogatt_max_tx_window); client->out.tx_window_size = MIN(client->out.tx_window_size, payload->ppogatt_max_rx_window); client->out.rx_window_size = MIN(client->out.rx_window_size, payload->ppogatt_max_tx_window); @@ -700,11 +693,10 @@ static void prv_handle_reset_complete(PPoGATTClient *client, const PPoGATTPacket } { - const uint32_t elapsed_ms = - (rtc_get_ticks() - client->created_ticks) * 1000 / RTC_TICKS_HZ; - PBL_LOG_INFO("PPoGATT Session is opened (%s, Vers: %d TXW: %d RXW: %d) after %"PRIu32"ms!", - (client->role == PPoGATTRoleReversed) ? "reversed" : "forward", - client->version, client->out.tx_window_size, client->out.rx_window_size, elapsed_ms); + const uint32_t elapsed_ms = (rtc_get_ticks() - client->created_ticks) * 1000 / RTC_TICKS_HZ; + PBL_LOG_INFO("PPoGATT Session is opened (%s, Vers: %d TXW: %d RXW: %d) after %" PRIu32 "ms!", + (client->role == PPoGATTRoleReversed) ? "reversed" : "forward", client->version, + client->out.tx_window_size, client->out.rx_window_size, elapsed_ms); } } @@ -733,7 +725,7 @@ static void prv_handle_ack(PPoGATTClient *client, uint32_t sn) { client->out.next_expected_ack_sn = next_sn; - if (prv_get_payload_size_for_sn(client, next_sn) != 0) { // Still awaiting ACKs + if (prv_get_payload_size_for_sn(client, next_sn) != 0) { // Still awaiting ACKs prv_reset_ack_timeout(client); } @@ -743,47 +735,47 @@ static void prv_handle_ack(PPoGATTClient *client, uint32_t sn) { // Don't roll back directly to avoid creating an Sorcerer's Apprentice bug // https://en.wikipedia.org/wiki/Sorcerer%27s_Apprentice_Syndrome // We'll rely on the ACK timeout for the next data packet to fire and roll back. - PBL_LOG_WRN("Received retransmitted Ack for sn:%"PRIu32". Ignoring it.", sn); + PBL_LOG_WRN("Received retransmitted Ack for sn:%" PRIu32 ". Ignoring it.", sn); } else { - PBL_LOG_ERR("Ack'd packet out of range %"PRIu32", [%u-%u].", - sn, client->out.next_expected_ack_sn, client->out.next_data_sn); + PBL_LOG_ERR("Ack'd packet out of range %" PRIu32 ", [%u-%u].", sn, + client->out.next_expected_ack_sn, client->out.next_data_sn); prv_start_reset(client); } } // ------------------------------------------------------------------------------------------------- -static void prv_handle_data(PPoGATTClient *client, - const PPoGATTPacket *packet, uint16_t payload_length) { +static void prv_handle_data(PPoGATTClient *client, const PPoGATTPacket *packet, + uint16_t payload_length) { if (client->in.next_expected_data_sn == packet->sn) { - client->out.ack_packet_to_send = (const PPoGATTPacket) { - .sn = client->in.next_expected_data_sn, - .type = PPoGATTPacketTypeAck, + client->out.ack_packet_to_send = (const PPoGATTPacket){ + .sn = client->in.next_expected_data_sn, + .type = PPoGATTPacketTypeAck, }; prv_send_next_packets(client); client->in.next_expected_data_sn = prv_next_sn(client->in.next_expected_data_sn); comm_session_receive_router_write(client->session, packet->payload, payload_length); -// PBL_LOG_DBG("Got PP data (sn=%u, %u bytes)", packet->sn, payload_length); + // PBL_LOG_DBG("Got PP data (sn=%u, %u bytes)", packet->sn, payload_length); } else { - PBL_LOG_DBG("packet->sn != next_expected_data_sn (%u != %u)", - packet->sn, client->in.next_expected_data_sn); + PBL_LOG_DBG("packet->sn != next_expected_data_sn (%u != %u)", packet->sn, + client->in.next_expected_data_sn); // Rely on the server retransmitting on Ack time-out } } // ------------------------------------------------------------------------------------------------- -static void prv_handle_data_notification(PPoGATTClient *client, - const uint8_t *value, uint16_t value_length) { -// PBL_LOG_DBG("IN:"); -// PBL_HEXDUMP(LOG_LEVEL_DEBUG, value, value_length); +static void prv_handle_data_notification(PPoGATTClient *client, const uint8_t *value, + uint16_t value_length) { + // PBL_LOG_DBG("IN:"); + // PBL_HEXDUMP(LOG_LEVEL_DEBUG, value, value_length); if (UNLIKELY(value_length == 0)) { PBL_LOG_ERR("Zero length packet"); return; } - const PPoGATTPacket *packet = (const PPoGATTPacket *) value; + const PPoGATTPacket *packet = (const PPoGATTPacket *)value; if (UNLIKELY(packet->type >= PPoGATTPacketTypeInvalidRangeStart)) { PBL_LOG_ERR("Invalid type %u", packet->type); return; @@ -849,8 +841,8 @@ static void prv_retry_meta_read(PPoGATTClient *client) { return; } - PBL_LOG_INFO("Retrying PPoGATT meta read (attempt %u/%u)", - client->meta_read_retries + 1, PPOGATT_META_READ_RETRY_COUNT_MAX); + PBL_LOG_INFO("Retrying PPoGATT meta read (attempt %u/%u)", client->meta_read_retries + 1, + PPOGATT_META_READ_RETRY_COUNT_MAX); client->state = StateDisconnectedReadingMeta; BLECharacteristic meta = client->characteristics.meta; @@ -891,22 +883,22 @@ static void prv_meta_read_retry_timer_cb(void *data) { // ------------------------------------------------------------------------------------------------- -static void prv_handle_meta_read(PPoGATTClient *client, const uint8_t *value, - size_t value_length, BLEGATTError error) { +static void prv_handle_meta_read(PPoGATTClient *client, const uint8_t *value, size_t value_length, + BLEGATTError error) { const uint32_t elapsed_ms = (rtc_get_ticks() - client->created_ticks) * 1000 / RTC_TICKS_HZ; PBL_ASSERTN(client->state == StateDisconnectedReadingMeta); if (error != BLEGATTErrorSuccess) { - PBL_LOG_ERR("PPoGATT meta read failed: err=0x%x after %"PRIu32"ms (retry %u/%u)", - error, elapsed_ms, client->meta_read_retries, PPOGATT_META_READ_RETRY_COUNT_MAX); + PBL_LOG_ERR("PPoGATT meta read failed: err=0x%x after %" PRIu32 "ms (retry %u/%u)", error, + elapsed_ms, client->meta_read_retries, PPOGATT_META_READ_RETRY_COUNT_MAX); // GATT read failed - this is retriable since the mobile app may not be ready yet goto handle_retriable_error; } - PBL_LOG_INFO("PPoGATT meta read success after %"PRIu32"ms, len=%u", elapsed_ms, + PBL_LOG_INFO("PPoGATT meta read success after %" PRIu32 "ms, len=%u", elapsed_ms, (unsigned int)value_length); if (value_length < sizeof(PPoGATTMetaV0)) { goto handle_error; } - const PPoGATTMetaV0 *meta = (const PPoGATTMetaV0 *) value; + const PPoGATTMetaV0 *meta = (const PPoGATTMetaV0 *)value; if (meta->ppogatt_min_version > PPOGATT_MAX_VERSION /* || meta->ppogatt_max_version < PPOGATT_MIN_VERSION // always true at the moment */) { goto handle_error; @@ -947,8 +939,7 @@ static void prv_handle_meta_read(PPoGATTClient *client, const uint8_t *value, // See prv_retry_meta_read for the same pattern. bt_unlock(); - BTErrno e = gatt_client_subscriptions_subscribe(data_char, - BLESubscriptionNotifications, + BTErrno e = gatt_client_subscriptions_subscribe(data_char, BLESubscriptionNotifications, GAPLEClientKernel); // Re-acquire bt_lock before accessing client state @@ -989,15 +980,14 @@ static void prv_handle_meta_read(PPoGATTClient *client, const uint8_t *value, handle_retriable_error: // GATT read failed - schedule a retry if we haven't exceeded the max retry count if (++client->meta_read_retries < PPOGATT_META_READ_RETRY_COUNT_MAX) { - PBL_LOG_WRN("PPoGATT meta read failed (err=%x), scheduling retry %u/%u", - error, client->meta_read_retries, PPOGATT_META_READ_RETRY_COUNT_MAX); + PBL_LOG_WRN("PPoGATT meta read failed (err=%x), scheduling retry %u/%u", error, + client->meta_read_retries, PPOGATT_META_READ_RETRY_COUNT_MAX); client->state = StateDisconnectedAwaitingMetaRetry; new_timer_start(client->rx_ack_timer, PPOGATT_META_READ_RETRY_DELAY_MS, prv_meta_read_retry_timer_cb, client, 0); return; } - PBL_LOG_ERR("PPoGATT meta read failed after %u retries", - PPOGATT_META_READ_RETRY_COUNT_MAX); + PBL_LOG_ERR("PPoGATT meta read failed after %u retries", PPOGATT_META_READ_RETRY_COUNT_MAX); // Cached handle may be stale; try once with fresh discovery. if (!s_rediscovery_requested_this_connection) { @@ -1007,12 +997,11 @@ static void prv_handle_meta_read(PPoGATTClient *client, const uint8_t *value, } handle_error: - PBL_LOG_ERR("Failed handling PPoGATT meta: len=%u ver=%x err=%x", - (unsigned int) value_length, value_length ? value[0] : ~0, error); + PBL_LOG_ERR("Failed handling PPoGATT meta: len=%u ver=%x err=%x", (unsigned int)value_length, + value_length ? value[0] : ~0, error); prv_delete_client(client, false /* is_disconnected */, DeleteReason_MetaDataInvalid); } - // ------------------------------------------------------------------------------------------------- void ppogatt_create(void) { @@ -1028,8 +1017,8 @@ void ppogatt_create(void) { // ------------------------------------------------------------------------------------------------- -void ppogatt_handle_service_removed( - BLECharacteristic *characteristics, uint8_t num_characteristics) { +void ppogatt_handle_service_removed(BLECharacteristic *characteristics, + uint8_t num_characteristics) { bt_lock(); { bool client_removed = false; @@ -1037,7 +1026,7 @@ void ppogatt_handle_service_removed( // Delete existing clients: PPoGATTClient *client = s_ppogatt_head; while (client) { - PPoGATTClient *next = (PPoGATTClient *) client->node.next; + PPoGATTClient *next = (PPoGATTClient *)client->node.next; for (int i = 0; i < num_characteristics; i++) { if (client->characteristics.meta == characteristics[i] || client->characteristics.data == characteristics[i]) { @@ -1065,8 +1054,8 @@ void ppogatt_handle_service_removed( BLECharacteristic char1 = num_characteristics > 0 ? characteristics[0] : 0; BLECharacteristic char2 = num_characteristics > 1 ? characteristics[1] : 0; - PBL_LOG_WRN("No ppog client removed? 0x%x 0x%x vs 0x%x 0x%x", - (int)meta, (int)data, (int)char1, (int)char2); + PBL_LOG_WRN("No ppog client removed? 0x%x 0x%x vs 0x%x 0x%x", (int)meta, (int)data, + (int)char1, (int)char2); } } bt_unlock(); @@ -1077,7 +1066,7 @@ void ppogatt_invalidate_all_references(void) { { PPoGATTClient *client = s_ppogatt_head; while (client) { - PPoGATTClient *next = (PPoGATTClient *) client->node.next; + PPoGATTClient *next = (PPoGATTClient *)client->node.next; prv_delete_client(client, true /* is_disconnected */, DeleteReason_InvalidateAllReferences); client = next; } @@ -1168,7 +1157,7 @@ void ppogatt_reversed_handle_data(uint16_t conn_handle, const uint8_t *buf, size PBL_LOG_DBG("Reversed PPoG data for unknown conn_handle=%u", conn_handle); goto unlock; } - prv_handle_data_notification(client, buf, (uint16_t) len); + prv_handle_data_notification(client, buf, (uint16_t)len); } unlock: bt_unlock(); @@ -1236,8 +1225,7 @@ void bt_driver_cb_ppog_reversed_unsubscribed(uint16_t conn_handle) { launcher_task_add_callback(prv_reversed_unsubscribed_kernelmain_cb, ctx); } -void bt_driver_cb_ppog_reversed_data_written(uint16_t conn_handle, - uint8_t *buf, uint16_t len) { +void bt_driver_cb_ppog_reversed_data_written(uint16_t conn_handle, uint8_t *buf, uint16_t len) { ReversedDataCtx *ctx = kernel_malloc(sizeof(*ctx)); if (!ctx) { PBL_LOG_ERR("Reversed PPoG data: out of memory"); @@ -1321,8 +1309,8 @@ bool ppogatt_can_handle_characteristic(BLECharacteristic characteristic) { // ------------------------------------------------------------------------------------------------- -void ppogatt_handle_subscribe(BLECharacteristic characteristic, - BLESubscription subscription_type, BLEGATTError error) { +void ppogatt_handle_subscribe(BLECharacteristic characteristic, BLESubscription subscription_type, + BLEGATTError error) { bt_lock(); { const bool is_subscribed = (subscription_type != BLESubscriptionNone); @@ -1338,9 +1326,8 @@ void ppogatt_handle_subscribe(BLECharacteristic characteristic, } PBL_ASSERTN(client->state == StateDisconnectedSubscribingData); if (error) { - const uint32_t elapsed_ms = - (rtc_get_ticks() - client->created_ticks) * 1000 / RTC_TICKS_HZ; - PBL_LOG_ERR("PPoGATT subscribe failed: err=0x%x after %"PRIu32"ms", error, elapsed_ms); + const uint32_t elapsed_ms = (rtc_get_ticks() - client->created_ticks) * 1000 / RTC_TICKS_HZ; + PBL_LOG_ERR("PPoGATT subscribe failed: err=0x%x after %" PRIu32 "ms", error, elapsed_ms); prv_delete_client(client, false /* is_disconnected */, DeleteReason_SubscribeFailure); goto unlock; } @@ -1349,10 +1336,9 @@ void ppogatt_handle_subscribe(BLECharacteristic characteristic, goto unlock; } { - const uint32_t elapsed_ms = - (rtc_get_ticks() - client->created_ticks) * 1000 / RTC_TICKS_HZ; - PBL_LOG_INFO("PPoGATT subscribed to Data after %"PRIu32"ms, sending ResetRequest", - elapsed_ms); + const uint32_t elapsed_ms = (rtc_get_ticks() - client->created_ticks) * 1000 / RTC_TICKS_HZ; + PBL_LOG_INFO("PPoGATT subscribed to Data after %" PRIu32 "ms, sending ResetRequest", + elapsed_ms); } prv_start_reset(client); } @@ -1384,8 +1370,8 @@ void ppogatt_handle_read_or_notification(BLECharacteristic characteristic, const // ------------------------------------------------------------------------------------------------- -static PPoGATTPacket * prv_lazily_allocate_packet_if_needed(const PPoGATTClient *client, - PPoGATTPacket **heap_packet_in_out) { +static PPoGATTPacket *prv_lazily_allocate_packet_if_needed(const PPoGATTClient *client, + PPoGATTPacket **heap_packet_in_out) { PPoGATTPacket *packet = *heap_packet_in_out; // Lazily allocate a buffer on the heap: if (!packet) { @@ -1393,7 +1379,7 @@ static PPoGATTPacket * prv_lazily_allocate_packet_if_needed(const PPoGATTClient if (max_payload_size == 0) { return NULL; } - packet = (PPoGATTPacket *) kernel_malloc_check(sizeof(PPoGATTPacket) + max_payload_size); + packet = (PPoGATTPacket *)kernel_malloc_check(sizeof(PPoGATTPacket) + max_payload_size); *heap_packet_in_out = packet; } return packet; @@ -1401,43 +1387,42 @@ static PPoGATTPacket * prv_lazily_allocate_packet_if_needed(const PPoGATTClient // ------------------------------------------------------------------------------------------------- -static const PPoGATTPacket * prv_prepare_next_reset_packet(const PPoGATTClient *client, - PPoGATTPacket **heap_packet_in_out, - uint16_t *payload_size_out) { +static const PPoGATTPacket *prv_prepare_next_reset_packet(const PPoGATTClient *client, + PPoGATTPacket **heap_packet_in_out, + uint16_t *payload_size_out) { PPoGATTPacket *packet = prv_lazily_allocate_packet_if_needed(client, heap_packet_in_out); if (!packet) { - PBL_LOG_WRN("Couldn't allocate reset packet: role=%u state=%u type=%u", - client->role, client->state, - (unsigned) client->out.reset_packet_to_send.type); + PBL_LOG_WRN("Couldn't allocate reset packet: role=%u state=%u type=%u", client->role, + client->state, (unsigned)client->out.reset_packet_to_send.type); return NULL; } if (client->out.reset_packet_to_send.type == PPoGATTPacketTypeResetRequest) { // Reset Request packet: - *packet = (const PPoGATTPacket) { - .type = PPoGATTPacketTypeResetRequest, - .sn = 0, + *packet = (const PPoGATTPacket){ + .type = PPoGATTPacketTypeResetRequest, + .sn = 0, }; PPoGATTResetRequestClientIDPayload *client_id_payload = - (PPoGATTResetRequestClientIDPayload *) packet->payload; - *client_id_payload = (const PPoGATTResetRequestClientIDPayload) { - .ppogatt_version = client->version, + (PPoGATTResetRequestClientIDPayload *)packet->payload; + *client_id_payload = (const PPoGATTResetRequestClientIDPayload){ + .ppogatt_version = client->version, }; memcpy(client_id_payload->serial_number, mfg_get_serial_number(), sizeof(client_id_payload->serial_number)); *payload_size_out = sizeof(*client_id_payload); return packet; - } else { // PPoGATTPacketTypeResetComplete + } else { // PPoGATTPacketTypeResetComplete if (prv_client_supports_enhanced_throughput_features(client)) { - *packet = (const PPoGATTPacket) { - .sn = 0, - .type = PPoGATTPacketTypeResetComplete, + *packet = (const PPoGATTPacket){ + .sn = 0, + .type = PPoGATTPacketTypeResetComplete, }; PPoGATTResetCompleteClientIDPayloadV1 *client_id_payload = - (PPoGATTResetCompleteClientIDPayloadV1 *) packet->payload; - *client_id_payload = (const PPoGATTResetCompleteClientIDPayloadV1) { - .ppogatt_max_rx_window = client->out.rx_window_size, - .ppogatt_max_tx_window = client->out.tx_window_size, + (PPoGATTResetCompleteClientIDPayloadV1 *)packet->payload; + *client_id_payload = (const PPoGATTResetCompleteClientIDPayloadV1){ + .ppogatt_max_rx_window = client->out.rx_window_size, + .ppogatt_max_tx_window = client->out.tx_window_size, }; *payload_size_out = sizeof(*client_id_payload); return packet; @@ -1490,13 +1475,12 @@ static void prv_send_retry_timer_cb(void *data) { launcher_task_add_callback(prv_send_retry_kernelmain_cb, data); } -static const PPoGATTPacket * prv_prepare_next_packet(PPoGATTClient *client, - PPoGATTPacket **heap_packet_in_out, - uint16_t *payload_size_out) { +static const PPoGATTPacket *prv_prepare_next_packet(PPoGATTClient *client, + PPoGATTPacket **heap_packet_in_out, + uint16_t *payload_size_out) { if (client->out.reset_packet_byte != 0) { return prv_prepare_next_reset_packet(client, heap_packet_in_out, payload_size_out); } else if (client->out.ack_packet_byte != 0) { - if (!prv_client_supports_enhanced_throughput_features(client)) { client->out.send_rx_ack_now = true; } else { @@ -1518,8 +1502,8 @@ static const PPoGATTPacket * prv_prepare_next_packet(PPoGATTClient *client, } if (!new_timer_scheduled(client->rx_ack_timer, NULL)) { - new_timer_start(client->rx_ack_timer, PPOGATT_MAX_DATA_ACK_LATENCY_MS, - rx_ack_timer_cb, client, 0); + new_timer_start(client->rx_ack_timer, PPOGATT_MAX_DATA_ACK_LATENCY_MS, rx_ack_timer_cb, + client, 0); } // We will defer sending the Ack for now, fallthrough and send data instead } @@ -1569,8 +1553,7 @@ static const PPoGATTPacket * prv_prepare_next_packet(PPoGATTClient *client, } packet->type = PPoGATTPacketTypeData; packet->sn = client->out.next_data_sn; - PBL_ASSERTN(comm_session_send_queue_copy(client->session, offset, - payload_size, packet->payload)); + PBL_ASSERTN(comm_session_send_queue_copy(client->session, offset, payload_size, packet->payload)); *payload_size_out = payload_size; return packet; } @@ -1584,11 +1567,11 @@ static void prv_finalize_queued_packet(PPoGATTClient *client, uint16_t payload_s client->out.ack_packet_byte = 0; client->out.send_rx_ack_now = false; client->out.outstanding_rx_ack_count = 0; - } else { // we are sending a data packet + } else { // we are sending a data packet const uint32_t sn = client->out.next_data_sn; prv_set_payload_size_for_sn(client, sn, payload_size); if (client->out.ack_timeout_state == AckTimeoutState_Inactive) { - prv_reset_ack_timeout(client); // Enable timeout if we don't already have it set + prv_reset_ack_timeout(client); // Enable timeout if we don't already have it set } client->out.next_data_sn = prv_next_sn(sn); } @@ -1624,7 +1607,7 @@ static void prv_send_next_packets(PPoGATTClient *client) { bt_unlock(); } const BTErrno e = bt_driver_ppog_reversed_notify(client->rev.conn_handle, - (const uint8_t *) packet, total_len); + (const uint8_t *)packet, total_len); if (lock_was_held) { bt_lock(); } @@ -1675,10 +1658,9 @@ static void prv_send_next_packets(PPoGATTClient *client) { } else { // If bt_lock wasn't held, we can call gatt_client_op_write_without_response directly // (it will manage the lock itself) - const BTErrno e = gatt_client_op_write_without_response(client->characteristics.data, - (const uint8_t *) packet, - sizeof(PPoGATTPacket) + payload_size, - GAPLEClientKernel); + const BTErrno e = gatt_client_op_write_without_response( + client->characteristics.data, (const uint8_t *)packet, + sizeof(PPoGATTPacket) + payload_size, GAPLEClientKernel); if (e == BTErrnoNotEnoughResources) { // Need to wait for "Buffer Empty" event (see ppogatt_handle_buffer_empty) break; @@ -1700,9 +1682,8 @@ static void prv_send_next_packets(PPoGATTClient *client) { } // Call into NimBLE without holding bt_lock - const BTErrno e = bt_driver_gatt_write_without_response(connection, (const uint8_t *) packet, - sizeof(PPoGATTPacket) + payload_size, - att_handle); + const BTErrno e = bt_driver_gatt_write_without_response( + connection, (const uint8_t *)packet, sizeof(PPoGATTPacket) + payload_size, att_handle); // Re-acquire bt_lock before accessing client state bt_lock(); @@ -1715,8 +1696,9 @@ static void prv_send_next_packets(PPoGATTClient *client) { PBL_LOG_ERR("Write failed %i", e); break; } else { -// PBL_LOG_DBG("OUT:"); -// PBL_HEXDUMP(LOG_LEVEL_DEBUG, (const uint8_t *) packet, sizeof(PPoGATTPacket) + payload_size); + // PBL_LOG_DBG("OUT:"); + // PBL_HEXDUMP(LOG_LEVEL_DEBUG, (const uint8_t *) packet, sizeof(PPoGATTPacket) + + // payload_size); // Packet successfully queued prv_finalize_queued_packet(client, payload_size); @@ -1745,7 +1727,7 @@ void ppogatt_handle_buffer_empty(void) { PPoGATTClient *client = s_ppogatt_head; while (client) { prv_send_next_packets(client); - client = (PPoGATTClient *) client->node.next; + client = (PPoGATTClient *)client->node.next; } } bt_unlock(); @@ -1757,7 +1739,7 @@ void ppogatt_handle_buffer_empty(void) { // bt_lock() must be held before calling void ppogatt_send_next(Transport *transport) { bt_lock_assert_held(true); - PPoGATTClient *client = (PPoGATTClient *) transport; + PPoGATTClient *client = (PPoGATTClient *)transport; if (!prv_is_client_valid(client)) { // Client became invalid in the mean time return; @@ -1769,14 +1751,14 @@ void ppogatt_send_next(Transport *transport) { void ppogatt_close(struct Transport *transport) { bt_lock_assert_held(true); - PPoGATTClient *client = (PPoGATTClient *) transport; + PPoGATTClient *client = (PPoGATTClient *)transport; prv_delete_client(client, false /* is_disconnected */, DeleteReason_CloseCalled); } // ------------------------------------------------------------------------------------------------- void ppogatt_reset(struct Transport *transport) { - PPoGATTClient *client = (PPoGATTClient *) transport; + PPoGATTClient *client = (PPoGATTClient *)transport; bt_lock(); { if (!prv_is_client_valid(client)) { @@ -1797,7 +1779,7 @@ void ppogatt_destroy(void) { { PPoGATTClient *client = s_ppogatt_head; while (client) { - PPoGATTClient *next = (PPoGATTClient *) client->node.next; + PPoGATTClient *next = (PPoGATTClient *)client->node.next; self_initiated_disconnect = self_initiated_disconnect || client->disconnect_requested; prv_delete_client(client, true /* is_disconnected */, DeleteReason_DestroyCalled); client = next; @@ -1818,7 +1800,7 @@ void ppogatt_destroy(void) { // For Unit Testing Transport *ppogatt_client_for_uuid(const Uuid *uuid) { - return (Transport *) prv_find_client_with_uuid(uuid); + return (Transport *)prv_find_client_with_uuid(uuid); } TransportDestination ppogatt_get_destination(Transport *transport) { @@ -1830,13 +1812,13 @@ bool ppogatt_has_client_for_uuid(const Uuid *uuid) { } uint32_t ppogatt_client_count(void) { - return list_count((ListNode *) s_ppogatt_head); + return list_count((ListNode *)s_ppogatt_head); } void ppogatt_trigger_rx_ack_send_timeout(void) { PPoGATTClient *client = s_ppogatt_head; while (client) { prv_rx_ack_kernelmain_cb(client); - client = (PPoGATTClient *) client->node.next; + client = (PPoGATTClient *)client->node.next; } } diff --git a/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.h b/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.h index d159047d69..2eab33e704 100644 --- a/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.h +++ b/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.h @@ -25,8 +25,8 @@ void ppogatt_handle_subscribe(BLECharacteristic subscribed_characteristic, void ppogatt_handle_read_or_notification(BLECharacteristic characteristic, const uint8_t *value, size_t value_length, BLEGATTError error); -void ppogatt_handle_service_removed( - BLECharacteristic *characteristics, uint8_t num_characteristics); +void ppogatt_handle_service_removed(BLECharacteristic *characteristics, + uint8_t num_characteristics); void ppogatt_invalidate_all_references(void); diff --git a/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt_definition.h b/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt_definition.h index d878498ea8..31138e43fc 100644 --- a/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt_definition.h +++ b/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt_definition.h @@ -7,15 +7,15 @@ #include -static const Uuid s_ppogatt_service_uuid = { - PEBBLE_BT_UUID_EXPAND(PEBBLE_BT_PPOGATT_SERVICE_UUID_32BIT) -}; +static const Uuid s_ppogatt_service_uuid = {PEBBLE_BT_UUID_EXPAND( + PEBBLE_BT_PPOGATT_SERVICE_UUID_32BIT)}; static const Uuid s_ppogatt_characteristic_uuids[PPoGATTCharacteristicNum] = { - [PPoGATTCharacteristicData] = { - PEBBLE_BT_UUID_EXPAND(PEBBLE_BT_PPOGATT_DATA_CHARACTERISTIC_UUID_32BIT), - }, - [PPoGATTCharacteristicMeta] = { - PEBBLE_BT_UUID_EXPAND(PEBBLE_BT_PPOGATT_META_CHARACTERISTIC_UUID_32BIT), - }, + [PPoGATTCharacteristicData] = + { + PEBBLE_BT_UUID_EXPAND(PEBBLE_BT_PPOGATT_DATA_CHARACTERISTIC_UUID_32BIT), + }, + [PPoGATTCharacteristicMeta] = { + PEBBLE_BT_UUID_EXPAND(PEBBLE_BT_PPOGATT_META_CHARACTERISTIC_UUID_32BIT), + }, }; diff --git a/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt_internal.h b/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt_internal.h index 4d5c79fac1..c70c814733 100644 --- a/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt_internal.h +++ b/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt_internal.h @@ -60,8 +60,8 @@ _Static_assert(PPoGATTPacketTypeResetRequest != 0, "Reset type can't be 0; see r _Static_assert(PPoGATTPacketTypeResetComplete != 0, "Reset type can't be 0; see reset_packet_byte"); typedef struct PACKED { - PPoGATTPacketType type:3; - uint8_t sn:PPOGATT_SN_BITS; + PPoGATTPacketType type : 3; + uint8_t sn : PPOGATT_SN_BITS; uint8_t payload[]; } PPoGATTPacket; @@ -99,5 +99,5 @@ typedef struct PACKED { uint8_t ppogatt_min_version; uint8_t ppogatt_max_version; Uuid app_uuid; - PPoGATTSessionType pp_session_type:8; + PPoGATTSessionType pp_session_type : 8; } PPoGATTMetaV1; diff --git a/src/fw/comm/ble/kernel_le_client/test/test_definition.h b/src/fw/comm/ble/kernel_le_client/test/test_definition.h index f7f69d9f21..aaecaab400 100644 --- a/src/fw/comm/ble/kernel_le_client/test/test_definition.h +++ b/src/fw/comm/ble/kernel_le_client/test/test_definition.h @@ -14,21 +14,49 @@ typedef enum { //! Test Service UUID static const Uuid s_test_service_uuid = { - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, }; //! Test Characteristic UUIDs static const Uuid s_test_characteristic_uuids[TestCharacteristicCount] = { - [TestCharacteristic_One] = { - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - }, - - [TestCharacteristic_Two] = { - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - }, + [TestCharacteristic_One] = + { + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + }, + + [TestCharacteristic_Two] = { + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + 0x02, + }, }; void test_client_handle_service_discovered(BLECharacteristic *characteristics); diff --git a/src/fw/comm/ble/pebble_bt.c b/src/fw/comm/ble/pebble_bt.c index 2527fc3d5e..dc938d2f23 100644 --- a/src/fw/comm/ble/pebble_bt.c +++ b/src/fw/comm/ble/pebble_bt.c @@ -8,9 +8,7 @@ void pebble_bt_uuid_expand(Uuid *uuid, uint32_t value) { static const uint8_t pebble_base_uuid_last_12_bytes[] = { - 0x32, 0x8E, 0x0F, 0xBB, - 0xC6, 0x42, 0x1A, 0xA6, - 0x69, 0x9B, 0xDA, 0xDA, + 0x32, 0x8E, 0x0F, 0xBB, 0xC6, 0x42, 0x1A, 0xA6, 0x69, 0x9B, 0xDA, 0xDA, }; memcpy(&uuid->byte4, &pebble_base_uuid_last_12_bytes, sizeof(Uuid) - offsetof(Uuid, byte4)); uuid->byte0 = (value >> 24) & 0xFF; diff --git a/src/fw/comm/bluetooth_analytics.c b/src/fw/comm/bluetooth_analytics.c index 53a1bb695a..4fdb5183c3 100644 --- a/src/fw/comm/bluetooth_analytics.c +++ b/src/fw/comm/bluetooth_analytics.c @@ -19,7 +19,7 @@ typedef struct { int num_samps; } LeConnectionParams; -static LeConnectionParams s_le_conn_params = { 0 }; +static LeConnectionParams s_le_conn_params = {0}; void bluetooth_analytics_get_param_averages(uint16_t *params) { int num_samps = s_le_conn_params.num_samps; @@ -31,8 +31,7 @@ void bluetooth_analytics_get_param_averages(uint16_t *params) { s_le_conn_params = (LeConnectionParams){}; } -static void prv_update_conn_params(uint16_t slave_latency_events, - uint16_t supervision_to_10ms) { +static void prv_update_conn_params(uint16_t slave_latency_events, uint16_t supervision_to_10ms) { bt_lock(); s_le_conn_params.slave_latency_events += slave_latency_events; s_le_conn_params.supervision_to_ms += (supervision_to_10ms * 10); @@ -85,22 +84,22 @@ void bluetooth_analytics_handle_connection_disconnection_event( break; } - if (num_events_logged > 100) { // don't log a ridiculous amount of tightly looped disconnects + if (num_events_logged > 100) { // don't log a ridiculous amount of tightly looped disconnects return; } // It's okay to log to analytics directly from the BT02 callback thread // because flash writes are dispatched to KernelBG if the datalogging session // is buffered - if (!vers_info) { // We expect version info + if (!vers_info) { // We expect version info PBL_LOG_WRN("Le Disconnect but no version info?"); } num_events_logged++; } -void bluetooth_analytics_handle_connect( - const BTDeviceInternal *peer_addr, const BleConnectionParams *conn_params) { +void bluetooth_analytics_handle_connect(const BTDeviceInternal *peer_addr, + const BleConnectionParams *conn_params) { bluetooth_analytics_handle_connection_params_update(conn_params); } @@ -122,7 +121,7 @@ void bluetooth_analytics_handle_ble_pairing_error(uint32_t error) { } static bool prv_calc_stats_and_print(const SlaveConnEventStats *orig_stats, - SlaveConnEventStats *stats_buf, bool is_putbytes) { + SlaveConnEventStats *stats_buf, bool is_putbytes) { return false; } @@ -131,7 +130,6 @@ void bluetooth_analytics_handle_put_bytes_stats(bool successful, uint8_t type, u const SlaveConnEventStats *orig_stats) { SlaveConnEventStats new_stats = {}; prv_calc_stats_and_print(orig_stats, &new_stats, true /* is_putbytes */); - } void bluetooth_analytics_handle_get_bytes_stats(uint8_t type, uint32_t total_size, @@ -139,5 +137,4 @@ void bluetooth_analytics_handle_get_bytes_stats(uint8_t type, uint32_t total_siz const SlaveConnEventStats *orig_stats) { SlaveConnEventStats new_stats = {}; prv_calc_stats_and_print(orig_stats, &new_stats, false /* is_putbytes */); - } diff --git a/src/fw/comm/bluetooth_analytics.h b/src/fw/comm/bluetooth_analytics.h index 5e68b658d5..a029d74e38 100644 --- a/src/fw/comm/bluetooth_analytics.h +++ b/src/fw/comm/bluetooth_analytics.h @@ -16,8 +16,8 @@ void bluetooth_analytics_handle_param_update_failed(void); void bluetooth_analytics_handle_connection_params_update(const BleConnectionParams *params); -void bluetooth_analytics_handle_connect( - const BTDeviceInternal *peer_addr, const BleConnectionParams *conn_params); +void bluetooth_analytics_handle_connect(const BTDeviceInternal *peer_addr, + const BleConnectionParams *conn_params); void bluetooth_analytics_handle_disconnect(bool local_is_master); diff --git a/src/fw/comm/bt_conn_mgr.h b/src/fw/comm/bt_conn_mgr.h index b60f942510..d030997935 100644 --- a/src/fw/comm/bt_conn_mgr.h +++ b/src/fw/comm/bt_conn_mgr.h @@ -41,14 +41,13 @@ typedef struct GAPLEConnection GAPLEConnection; //! *as least* as responsive as the requested state. //! It will be executed on KernelMain. //! It is guaranteed to be called exactly once per call to this function. -void conn_mgr_set_ble_conn_response_time_ext( - GAPLEConnection *hdl, BtConsumer consumer, ResponseTimeState state, - uint16_t max_period_secs, ResponsivenessGrantedHandler granted_handler); +void conn_mgr_set_ble_conn_response_time_ext(GAPLEConnection *hdl, BtConsumer consumer, + ResponseTimeState state, uint16_t max_period_secs, + ResponsivenessGrantedHandler granted_handler); //! Same as conn_mgr_set_ble_conn_response_time_ext, but without granted_handler. -void conn_mgr_set_ble_conn_response_time( - GAPLEConnection *hdl, BtConsumer consumer, ResponseTimeState state, - uint16_t max_period_secs); +void conn_mgr_set_ble_conn_response_time(GAPLEConnection *hdl, BtConsumer consumer, + ResponseTimeState state, uint16_t max_period_secs); //! Informs the BT manager module that we want to run the provided classic //! connection at the requested rate. @@ -65,14 +64,14 @@ void conn_mgr_set_ble_conn_response_time( //! *as least* as responsive as the requested state. //! It will be executed on KernelMain. //! It is guaranteed to be called exactly once per call to this function. -void conn_mgr_set_bt_classic_conn_response_time_ext( - struct Remote *remote, BtConsumer consumer, ResponseTimeState state, - uint16_t max_period_secs, ResponsivenessGrantedHandler granted_handler); +void conn_mgr_set_bt_classic_conn_response_time_ext(struct Remote *remote, BtConsumer consumer, + ResponseTimeState state, + uint16_t max_period_secs, + ResponsivenessGrantedHandler granted_handler); //! Same as conn_mgr_set_bt_classic_conn_response_time_ext, but without granted_handler.s -void conn_mgr_set_bt_classic_conn_response_time( - struct Remote *remote, BtConsumer consumer, ResponseTimeState state, - uint16_t max_period_secs); +void conn_mgr_set_bt_classic_conn_response_time(struct Remote *remote, BtConsumer consumer, + ResponseTimeState state, uint16_t max_period_secs); //! @param[in] connection The connection for which to get the lowest requested latency. //! @param[out] secs_to_wait The longest amount of time that interval has been requested. diff --git a/src/fw/comm/bt_lock.c b/src/fw/comm/bt_lock.c index 6ae97daf7f..a479b6b27a 100644 --- a/src/fw/comm/bt_lock.c +++ b/src/fw/comm/bt_lock.c @@ -25,7 +25,7 @@ struct pbl_mutex *bt_lock_get(void) { } void bt_lock(void) { - register uint32_t LR __asm ("lr"); + register uint32_t LR __asm("lr"); uint32_t myLR = LR; pbl_mutex_lock_lr(&s_bt_lock, PBL_FOREVER, myLR); } diff --git a/src/fw/comm/internals/bt_conn_mgr.c b/src/fw/comm/internals/bt_conn_mgr.c index d14ab160eb..12055d5770 100644 --- a/src/fw/comm/internals/bt_conn_mgr.c +++ b/src/fw/comm/internals/bt_conn_mgr.c @@ -30,19 +30,19 @@ //! future, we will add support for handling classic connections as well typedef struct { - ListNode list_node; - uint32_t timeout; // time to stop this request (in rtc ticks) + ListNode list_node; + uint32_t timeout; // time to stop this request (in rtc ticks) ResponseTimeState req_state; - BtConsumer consumer; + BtConsumer consumer; ResponsivenessGrantedHandler granted_handler; } ConnectionStateRequest; typedef struct ConnectionMgrInfo { // callback which returns us to a low power state if user of API does not exit // a high power state - RegularTimerInfo watchdog_cb_info; + RegularTimerInfo watchdog_cb_info; // current running state of the connection - ResponseTimeState curr_requested_state; + ResponseTimeState curr_requested_state; // A list of consumers who have requested changes to latency state != ResponseTimeMax ConnectionStateRequest *requests; } ConnectionMgrInfo; @@ -64,25 +64,25 @@ static const char *prv_response_time_state_name(ResponseTimeState state) { static const char *prv_consumer_name(BtConsumer consumer) { static const char *const s_consumer_names[NumBtConsumer] = { - [BtConsumerNone] = "None", - [BtConsumerApp] = "App", - [BtConsumerLePairing] = "LePairing", - [BtConsumerLeServiceDiscovery] = "LeServiceDiscovery", - [BtConsumerMusicServiceIndefinite] = "MusicServiceIndefinite", - [BtConsumerMusicServiceMomentary] = "MusicServiceMomentary", - [BtConsumerPpAppFetch] = "PpAppFetch", - [BtConsumerPpAppMessage] = "PpAppMessage", - [BtConsumerPpAudioEndpoint] = "PpAudioEndpoint", - [BtConsumerPpGetBytes] = "PpGetBytes", - [BtConsumerPpLogDump] = "PpLogDump", - [BtConsumerPpPutBytes] = "PpPutBytes", - [BtConsumerPpScreenshot] = "PpScreenshot", - [BtConsumerPpVoiceEndpoint] = "PpVoiceEndpoint", - [BtConsumerPrompt] = "Prompt", - [BtConsumerTimelineActionMenu] = "TimelineActionMenu", - [BtConsumerPRF] = "PRF", - [BtConsumerPebblePairingServiceRemoteDevice] = "PebblePairingServiceRemoteDevice", - [BtConsumerUnitTests] = "UnitTests", + [BtConsumerNone] = "None", + [BtConsumerApp] = "App", + [BtConsumerLePairing] = "LePairing", + [BtConsumerLeServiceDiscovery] = "LeServiceDiscovery", + [BtConsumerMusicServiceIndefinite] = "MusicServiceIndefinite", + [BtConsumerMusicServiceMomentary] = "MusicServiceMomentary", + [BtConsumerPpAppFetch] = "PpAppFetch", + [BtConsumerPpAppMessage] = "PpAppMessage", + [BtConsumerPpAudioEndpoint] = "PpAudioEndpoint", + [BtConsumerPpGetBytes] = "PpGetBytes", + [BtConsumerPpLogDump] = "PpLogDump", + [BtConsumerPpPutBytes] = "PpPutBytes", + [BtConsumerPpScreenshot] = "PpScreenshot", + [BtConsumerPpVoiceEndpoint] = "PpVoiceEndpoint", + [BtConsumerPrompt] = "Prompt", + [BtConsumerTimelineActionMenu] = "TimelineActionMenu", + [BtConsumerPRF] = "PRF", + [BtConsumerPebblePairingServiceRemoteDevice] = "PebblePairingServiceRemoteDevice", + [BtConsumerUnitTests] = "UnitTests", }; if (consumer >= NumBtConsumer || s_consumer_names[consumer] == NULL) { @@ -95,8 +95,9 @@ static const char *prv_consumer_name(BtConsumer consumer) { //! connection. Also detects the longest amount of time that interval has been //! requested. Also gets the consumer that is responsible for the lowest latency + longest timeout //! combo. These pieces of information are then returned to the caller. -static ResponseTimeState prv_determine_latency_for_connection( - ConnectionStateRequest *requests, uint16_t *secs_to_wait, BtConsumer *consumer_out) { +static ResponseTimeState prv_determine_latency_for_connection(ConnectionStateRequest *requests, + uint16_t *secs_to_wait, + BtConsumer *consumer_out) { ResponseTimeState state = ResponseTimeMax; uint32_t timeout = 0; BtConsumer responsible_consumer = BtConsumerNone; @@ -152,14 +153,12 @@ static void prv_schedule_granted_handler(ResponsivenessGrantedHandler granted_ha } //! extern'd for gap_le_connect_params.c -void conn_mgr_handle_desired_state_granted(GAPLEConnection *hdl, - ResponseTimeState granted_state) { +void conn_mgr_handle_desired_state_granted(GAPLEConnection *hdl, ResponseTimeState granted_state) { bt_lock_assert_held(true); ConnectionStateRequest *curr_request = hdl->conn_mgr_info->requests; while (curr_request != NULL) { - if (curr_request->granted_handler && - curr_request->req_state <= granted_state) { + if (curr_request->granted_handler && curr_request->req_state <= granted_state) { prv_schedule_granted_handler(curr_request->granted_handler); curr_request->granted_handler = NULL; } @@ -177,15 +176,15 @@ static void prv_handle_response_latency_for_le_conn(GAPLEConnection *hdl) { state = ResponseTimeMin; responsible_consumer = 0; #else - state = prv_determine_latency_for_connection(hdl->conn_mgr_info->requests, - &secs_til_max_latency, &responsible_consumer); + state = prv_determine_latency_for_connection(hdl->conn_mgr_info->requests, &secs_til_max_latency, + &responsible_consumer); #endif // actually request the mode if it has changed: if (hdl->conn_mgr_info->curr_requested_state != state) { PBL_LOG_INFO("LE: Requesting state <%s> for %d secs, due to <%s>", - prv_response_time_state_name(state), secs_til_max_latency, - prv_consumer_name(responsible_consumer)); + prv_response_time_state_name(state), secs_til_max_latency, + prv_consumer_name(responsible_consumer)); gap_le_connect_params_request(hdl, state); } @@ -203,8 +202,7 @@ static void prv_handle_response_latency_for_le_conn(GAPLEConnection *hdl) { // wait an extra second since the multisecond callback will fire somewhere // between 0 and 1 seconds from now and we want to make sure the interval // we are currently running at actually expires - regular_timer_add_multisecond_callback( - watchdog_cb_info, secs_til_max_latency + 1); + regular_timer_add_multisecond_callback(watchdog_cb_info, secs_til_max_latency + 1); } hdl->conn_mgr_info->curr_requested_state = state; @@ -264,15 +262,14 @@ static bool prv_find_source(ListNode *found_node, void *data) { * Exported APIs */ -void conn_mgr_set_ble_conn_response_time( - GAPLEConnection *hdl, BtConsumer consumer, ResponseTimeState state, - uint16_t max_period_secs) { +void conn_mgr_set_ble_conn_response_time(GAPLEConnection *hdl, BtConsumer consumer, + ResponseTimeState state, uint16_t max_period_secs) { conn_mgr_set_ble_conn_response_time_ext(hdl, consumer, state, max_period_secs, NULL); } -void conn_mgr_set_ble_conn_response_time_ext( - GAPLEConnection *hdl, BtConsumer consumer, ResponseTimeState state, - uint16_t max_period_secs, ResponsivenessGrantedHandler granted_handler) { +void conn_mgr_set_ble_conn_response_time_ext(GAPLEConnection *hdl, BtConsumer consumer, + ResponseTimeState state, uint16_t max_period_secs, + ResponsivenessGrantedHandler granted_handler) { ConnectionMgrInfo *conn_mgr_info; if (!hdl || !((conn_mgr_info = hdl->conn_mgr_info))) { PBL_LOG_ERR("GAP Handle not properly initialized"); @@ -287,9 +284,8 @@ void conn_mgr_set_ble_conn_response_time_ext( regular_timer_remove_callback(watchdog_cb_info); } - ConnectionStateRequest *consumer_request = - (ConnectionStateRequest *)list_find((ListNode *)conn_mgr_info->requests, - prv_find_source, (void *)consumer); + ConnectionStateRequest *consumer_request = (ConnectionStateRequest *)list_find( + (ListNode *)conn_mgr_info->requests, prv_find_source, (void *)consumer); bool is_already_granted = (gap_le_connect_params_get_actual_state(hdl) >= state); @@ -318,7 +314,7 @@ void conn_mgr_set_ble_conn_response_time_ext( } // populate node with new info. If it was previously set we override it - consumer_request->timeout = rtc_get_ticks() + max_period_secs * RTC_TICKS_HZ; + consumer_request->timeout = rtc_get_ticks() + max_period_secs * RTC_TICKS_HZ; consumer_request->req_state = state; consumer_request->consumer = consumer; consumer_request->granted_handler = is_already_granted ? NULL : granted_handler; @@ -334,10 +330,10 @@ void conn_mgr_set_ble_conn_response_time_ext( } //! expects that the bt lock is held -ConnectionMgrInfo * bt_conn_mgr_info_init(void) { +ConnectionMgrInfo *bt_conn_mgr_info_init(void) { ConnectionMgrInfo *newinfo = kernel_malloc_check(sizeof(ConnectionMgrInfo)); - *newinfo = (ConnectionMgrInfo) { - .curr_requested_state = ResponseTimeMax, + *newinfo = (ConnectionMgrInfo){ + .curr_requested_state = ResponseTimeMax, }; return newinfo; @@ -368,13 +364,11 @@ void command_change_le_mode(char *mode) { GAPLEConnection *conn_hdl = gap_le_connection_any(); ResponseTimeState state = atoi(mode); - conn_mgr_set_ble_conn_response_time( - conn_hdl, BtConsumerPrompt, state, MAX_PERIOD_RUN_FOREVER); + conn_mgr_set_ble_conn_response_time(conn_hdl, BtConsumerPrompt, state, MAX_PERIOD_RUN_FOREVER); } -ResponseTimeState conn_mgr_get_latency_for_le_connection( - GAPLEConnection *hdl, uint16_t *secs_to_wait) { +ResponseTimeState conn_mgr_get_latency_for_le_connection(GAPLEConnection *hdl, + uint16_t *secs_to_wait) { bt_lock_assert_held(true); - return prv_determine_latency_for_connection( - hdl->conn_mgr_info->requests, secs_to_wait, NULL); + return prv_determine_latency_for_connection(hdl->conn_mgr_info->requests, secs_to_wait, NULL); } diff --git a/src/fw/console/best_effort_transport.c b/src/fw/console/best_effort_transport.c index 77bcd245de..1b6a09dd41 100644 --- a/src/fw/console/best_effort_transport.c +++ b/src/fw/console/best_effort_transport.c @@ -25,8 +25,7 @@ static bool s_layer_up = false; static void prv_on_this_layer_up(PPPControlProtocol *this) { s_layer_up = true; -#define REGISTER_PROTOCOL(N, HANDLER, LAYER_STATE_HANDLER) \ - LAYER_STATE_HANDLER(PulseLinkState_Open); +#define REGISTER_PROTOCOL(N, HANDLER, LAYER_STATE_HANDLER) LAYER_STATE_HANDLER(PulseLinkState_Open); #include "console/pulse_protocol_registry.def" #undef REGISTER_PROTOCOL } @@ -39,22 +38,21 @@ static void prv_on_this_layer_down(PPPControlProtocol *this) { #undef REGISTER_PROTOCOL } -static void prv_on_receive_code_reject(PPPControlProtocol *this, - LCPPacket *packet) { +static void prv_on_receive_code_reject(PPPControlProtocol *this, LCPPacket *packet) { // TODO } static PPPControlProtocolState s_becp_state = {}; static PPPControlProtocol s_becp_protocol = { - .protocol_number = PULSE2_BEST_EFFORT_CONTROL_PROTOCOL, - .state = &s_becp_state, - .on_this_layer_up = prv_on_this_layer_up, - .on_this_layer_down = prv_on_this_layer_down, - .on_receive_code_reject = prv_on_receive_code_reject, + .protocol_number = PULSE2_BEST_EFFORT_CONTROL_PROTOCOL, + .state = &s_becp_state, + .on_this_layer_up = prv_on_this_layer_up, + .on_this_layer_down = prv_on_this_layer_down, + .on_receive_code_reject = prv_on_receive_code_reject, }; -PPPControlProtocol * const PULSE2_BECP = &s_becp_protocol; +PPPControlProtocol *const PULSE2_BECP = &s_becp_protocol; void pulse2_best_effort_control_on_packet(void *packet, size_t length) { ppp_control_protocol_handle_incoming_packet(PULSE2_BECP, packet, length); @@ -70,8 +68,8 @@ typedef struct PACKED BestEffortPacket { } BestEffortPacket; static PulseControlMessageProtocol s_best_effort_pcmp = { - .send_begin_fn = pulse_best_effort_send_begin, - .send_fn = pulse_best_effort_send, + .send_begin_fn = pulse_best_effort_send_begin, + .send_fn = pulse_best_effort_send, }; void pulse2_best_effort_transport_on_packet(void *raw_packet, size_t length) { @@ -91,26 +89,25 @@ void pulse2_best_effort_transport_on_packet(void *raw_packet, size_t length) { switch (ntoh16(packet->protocol)) { case PULSE_CONTROL_MESSAGE_PROTOCOL: - pulse_control_message_protocol_on_packet( - &s_best_effort_pcmp, packet->information, info_length); + pulse_control_message_protocol_on_packet(&s_best_effort_pcmp, packet->information, + info_length); break; #define REGISTER_PROTOCOL(N, HANDLER, LAYER_STATE_HANDLER) \ - case N: \ - HANDLER(packet->information, info_length); \ - break; + case N: \ + HANDLER(packet->information, info_length); \ + break; #include "console/pulse_protocol_registry.def" #undef REGISTER_PROTOCOL default: - pulse_control_message_protocol_send_port_closed_message( - &s_best_effort_pcmp, packet->protocol); + pulse_control_message_protocol_send_port_closed_message(&s_best_effort_pcmp, + packet->protocol); break; } } void *pulse_best_effort_send_begin(const uint16_t app_protocol) { PBL_ASSERTN(s_layer_up); - BestEffortPacket *packet = pulse_link_send_begin( - PULSE2_BEST_EFFORT_TRANSPORT_PROTOCOL); + BestEffortPacket *packet = pulse_link_send_begin(PULSE2_BEST_EFFORT_TRANSPORT_PROTOCOL); packet->protocol = hton16(app_protocol); return &packet->information; } @@ -123,8 +120,7 @@ void pulse_best_effort_send(void *buf, const size_t length) { // pulse_best_effort_send_begin. If it isn't, we'll either crash here // when trying to dereference it or we'll hit the assert in // pulse_link_send. - BestEffortPacket *packet = - (void *)((char *)buf - offsetof(BestEffortPacket, information)); + BestEffortPacket *packet = (void *)((char *)buf - offsetof(BestEffortPacket, information)); size_t packet_size = length + sizeof(BestEffortPacket); packet->length = hton16(packet_size); pulse_link_send(packet, packet_size); diff --git a/src/fw/console/cobs.c b/src/fw/console/cobs.c index 18af0b81d9..f2e1f4900e 100644 --- a/src/fw/console/cobs.c +++ b/src/fw/console/cobs.c @@ -8,8 +8,7 @@ #include "pbl/util/likely.h" -void cobs_streaming_decode_start(CobsDecodeContext * restrict ctx, - void * restrict output_buffer, +void cobs_streaming_decode_start(CobsDecodeContext *restrict ctx, void *restrict output_buffer, size_t length) { ctx->output = output_buffer; ctx->output_length = length; @@ -18,7 +17,7 @@ void cobs_streaming_decode_start(CobsDecodeContext * restrict ctx, ctx->block_is_terminated = false; } -bool cobs_streaming_decode(CobsDecodeContext * restrict ctx, char in) { +bool cobs_streaming_decode(CobsDecodeContext *restrict ctx, char in) { if (ctx->output == NULL) { // Uninitialized context or decoding has already failed. return false; @@ -33,8 +32,8 @@ bool cobs_streaming_decode(CobsDecodeContext * restrict ctx, char in) { if (UNLIKELY(ctx->payload_remaining == 0)) { // Incoming byte is a code byte. ctx->payload_remaining = (uint8_t)in - 1; - if (ctx->decoded_length + ctx->payload_remaining + - (ctx->block_is_terminated? 1 : 0) > ctx->output_length) { + if (ctx->decoded_length + ctx->payload_remaining + (ctx->block_is_terminated ? 1 : 0) > + ctx->output_length) { // Full decoded output cannot fit into the buffer; fail fast. ctx->output = NULL; return false; @@ -58,7 +57,7 @@ bool cobs_streaming_decode(CobsDecodeContext * restrict ctx, char in) { return true; } -size_t cobs_streaming_decode_finish(CobsDecodeContext * restrict ctx) { +size_t cobs_streaming_decode_finish(CobsDecodeContext *restrict ctx) { if (ctx->output == NULL || ctx->payload_remaining != 0) { return SIZE_MAX; } diff --git a/src/fw/console/cobs.h b/src/fw/console/cobs.h index 8aeca818da..b6cc3a433a 100644 --- a/src/fw/console/cobs.h +++ b/src/fw/console/cobs.h @@ -27,19 +27,18 @@ typedef struct CobsDecodeContext { } CobsDecodeContext; //! Initialize the COBS decoding context. -void cobs_streaming_decode_start(CobsDecodeContext * restrict ctx, - void * restrict output_buffer, +void cobs_streaming_decode_start(CobsDecodeContext *restrict ctx, void *restrict output_buffer, size_t length); //! Decode a byte in the COBS stream. //! //! @return false if decoding has failed. -bool cobs_streaming_decode(CobsDecodeContext * restrict ctx, char in); +bool cobs_streaming_decode(CobsDecodeContext *restrict ctx, char in); //! Complete a COBS stream. //! //! @return length of decoded stream, or SIZE_MAX if decoding has failed. -size_t cobs_streaming_decode_finish(CobsDecodeContext * restrict ctx); +size_t cobs_streaming_decode_finish(CobsDecodeContext *restrict ctx); //! COBS-encode a buffer out to another buffer. //! @@ -47,5 +46,4 @@ size_t cobs_streaming_decode_finish(CobsDecodeContext * restrict ctx); //! MAX_SIZE_AFTER_COBS_ENCODING(length) bytes long. //! @param [in] src source buffer //! @param length length of src -size_t cobs_encode(void * restrict dst, const void * restrict src, - size_t length); +size_t cobs_encode(void *restrict dst, const void *restrict src, size_t length); diff --git a/src/fw/console/control_protocol.c b/src/fw/console/control_protocol.c index 9b54d79d27..2448eb865c 100644 --- a/src/fw/console/control_protocol.c +++ b/src/fw/console/control_protocol.c @@ -23,35 +23,28 @@ #define LCP_HEADER_LEN (sizeof(LCPPacket)) - static void prv_on_timeout(void *context); static void prv_start_timer(PPPControlProtocol *this) { PBL_ASSERTN(this->state->restart_timer != TIMER_INVALID_ID); - new_timer_start(this->state->restart_timer, RESTART_TIMEOUT_MS, - prv_on_timeout, (void *)this, 0); + new_timer_start(this->state->restart_timer, RESTART_TIMEOUT_MS, prv_on_timeout, (void *)this, 0); } static void prv_stop_timer(PPPControlProtocol *this) { new_timer_stop(this->state->restart_timer); } -static void prv_transition_to(PPPControlProtocol *this, - enum LinkState nextstate) { - if (nextstate == LinkState_Initial || - nextstate == LinkState_Starting || - nextstate == LinkState_Closed || - nextstate == LinkState_Stopped || +static void prv_transition_to(PPPControlProtocol *this, enum LinkState nextstate) { + if (nextstate == LinkState_Initial || nextstate == LinkState_Starting || + nextstate == LinkState_Closed || nextstate == LinkState_Stopped || nextstate == LinkState_Opened) { prv_stop_timer(this); } - if (nextstate == LinkState_Opened && - this->state->link_state != LinkState_Opened) { + if (nextstate == LinkState_Opened && this->state->link_state != LinkState_Opened) { this->on_this_layer_up(this); } - if (this->state->link_state == LinkState_Opened && - nextstate != LinkState_Opened) { + if (this->state->link_state == LinkState_Opened && nextstate != LinkState_Opened) { this->on_this_layer_down(this); } @@ -67,16 +60,15 @@ static void prv_send_configure_request(PPPControlProtocol *this) { this->state->last_configure_request_id = id; struct LCPPacket *request = pulse_link_send_begin(this->protocol_number); - *request = (struct LCPPacket) { - .code = ControlCode_ConfigureRequest, - .identifier = id, - .length = hton16(LCP_HEADER_LEN), + *request = (struct LCPPacket){ + .code = ControlCode_ConfigureRequest, + .identifier = id, + .length = hton16(LCP_HEADER_LEN), }; pulse_link_send(request, LCP_HEADER_LEN); } -static void prv_send_configure_ack(PPPControlProtocol *this, - struct LCPPacket *triggering_packet) { +static void prv_send_configure_ack(PPPControlProtocol *this, struct LCPPacket *triggering_packet) { if (ntoh16(triggering_packet->length) > pulse_link_max_send_size()) { // Too big to send and truncation will corrupt the packet. PBL_LOG_ERR("Configure-Request too large to Ack"); @@ -88,8 +80,7 @@ static void prv_send_configure_ack(PPPControlProtocol *this, pulse_link_send(packet, ntoh16(triggering_packet->length)); } -static void prv_send_configure_reject(PPPControlProtocol *this, - struct LCPPacket *bad_packet) { +static void prv_send_configure_reject(PPPControlProtocol *this, struct LCPPacket *bad_packet) { if (ntoh16(bad_packet->length) > pulse_link_max_send_size()) { // Too big to send and truncation will corrupt the packet. // There isn't really anything we can do. @@ -107,10 +98,10 @@ static void prv_send_terminate_request(PPPControlProtocol *this) { prv_start_timer(this); uint8_t id = this->state->next_terminate_id++; struct LCPPacket *packet = pulse_link_send_begin(this->protocol_number); - *packet = (struct LCPPacket) { - .code = ControlCode_TerminateRequest, - .identifier = id, - .length = hton16(LCP_HEADER_LEN), + *packet = (struct LCPPacket){ + .code = ControlCode_TerminateRequest, + .identifier = id, + .length = hton16(LCP_HEADER_LEN), }; pulse_link_send(packet, LCP_HEADER_LEN); } @@ -125,21 +116,19 @@ static void prv_send_terminate_ack(PPPControlProtocol *this, int identifier) { this->state->next_terminate_id = identifier + 1; } struct LCPPacket *packet = pulse_link_send_begin(this->protocol_number); - *packet = (struct LCPPacket) { - .code = ControlCode_TerminateAck, - .identifier = identifier, - .length = hton16(LCP_HEADER_LEN), + *packet = (struct LCPPacket){ + .code = ControlCode_TerminateAck, + .identifier = identifier, + .length = hton16(LCP_HEADER_LEN), }; pulse_link_send(packet, LCP_HEADER_LEN); } -static void prv_send_code_reject(PPPControlProtocol *this, - struct LCPPacket *bad_packet) { +static void prv_send_code_reject(PPPControlProtocol *this, struct LCPPacket *bad_packet) { struct LCPPacket *packet = pulse_link_send_begin(this->protocol_number); packet->code = ControlCode_CodeReject; packet->identifier = this->state->next_code_reject_id++; - size_t body_len = MIN(ntoh16(bad_packet->length), - pulse_link_max_send_size() - LCP_HEADER_LEN); + size_t body_len = MIN(ntoh16(bad_packet->length), pulse_link_max_send_size() - LCP_HEADER_LEN); memcpy(packet->data, bad_packet, body_len); pulse_link_send(packet, LCP_HEADER_LEN + body_len); } @@ -182,8 +171,7 @@ static void prv_on_timeout(void *context) { pbl_mutex_unlock(&this->state->lock); } -static bool prv_handle_configure_request(PPPControlProtocol *this, - struct LCPPacket *packet) { +static bool prv_handle_configure_request(PPPControlProtocol *this, struct LCPPacket *packet) { if (ntoh16(packet->length) == LCP_HEADER_LEN) { // The request has no options prv_send_configure_ack(this, packet); return true; @@ -194,8 +182,7 @@ static bool prv_handle_configure_request(PPPControlProtocol *this, } } -static void prv_on_configure_request(PPPControlProtocol *this, - struct LCPPacket *packet) { +static void prv_on_configure_request(PPPControlProtocol *this, struct LCPPacket *packet) { switch (this->state->link_state) { case LinkState_Closing: case LinkState_Stopping: @@ -228,8 +215,7 @@ static void prv_on_configure_request(PPPControlProtocol *this, } } -static void prv_on_configure_ack(PPPControlProtocol *this, - struct LCPPacket *packet) { +static void prv_on_configure_ack(PPPControlProtocol *this, struct LCPPacket *packet) { if (packet->identifier != this->state->last_configure_request_id) { // Invalid packet; silently discard return; @@ -239,8 +225,9 @@ static void prv_on_configure_ack(PPPControlProtocol *this, // If the length is greater than four, there are options in the Ack // which means that the Ack'ed options list does not match the // options list from the request. The Ack packet is invalid. - PBL_LOG_WRN("Configure-Ack received with options list which differs from " - "the sent Configure-Request. Discarding."); + PBL_LOG_WRN( + "Configure-Ack received with options list which differs from " + "the sent Configure-Request. Discarding."); return; } @@ -272,15 +259,13 @@ static void prv_on_configure_ack(PPPControlProtocol *this, } } -static void prv_handle_nak_or_reject(PPPControlProtocol *this, - struct LCPPacket *packet) { +static void prv_handle_nak_or_reject(PPPControlProtocol *this, struct LCPPacket *packet) { // Process nak/rej options // respond with new configure request // TODO: we don't send options, so no nak/rej is expected yet } -static void prv_on_configure_nak_or_reject(PPPControlProtocol *this, - struct LCPPacket *packet) { +static void prv_on_configure_nak_or_reject(PPPControlProtocol *this, struct LCPPacket *packet) { if (packet->identifier != this->state->last_configure_request_id) { // Invalid packet; silently discard return; @@ -312,8 +297,7 @@ static void prv_on_configure_nak_or_reject(PPPControlProtocol *this, } } -static void prv_on_terminate_request(PPPControlProtocol *this, - struct LCPPacket *packet) { +static void prv_on_terminate_request(PPPControlProtocol *this, struct LCPPacket *packet) { if (this->state->link_state == LinkState_AckReceived || this->state->link_state == LinkState_AckSent) { prv_transition_to(this, LinkState_RequestSent); @@ -325,8 +309,7 @@ static void prv_on_terminate_request(PPPControlProtocol *this, prv_send_terminate_ack(this, packet->identifier); } -static void prv_on_terminate_ack(PPPControlProtocol *this, - struct LCPPacket *packet) { +static void prv_on_terminate_ack(PPPControlProtocol *this, struct LCPPacket *packet) { if (this->state->link_state == LinkState_Closing) { prv_transition_to(this, LinkState_Closed); } else if (this->state->link_state == LinkState_Stopping) { @@ -344,13 +327,13 @@ static void prv_on_terminate_ack(PPPControlProtocol *this, // ============================================= void ppp_control_protocol_init(PPPControlProtocol *this) { - *this->state = (PPPControlProtocolState) { - .link_state = LinkState_Initial, - .restart_count = 0, - .restart_timer = new_timer_create(), - .last_configure_request_id = -1, - .next_code_reject_id = 0, - .next_terminate_id = 0, + *this->state = (PPPControlProtocolState){ + .link_state = LinkState_Initial, + .restart_count = 0, + .restart_timer = new_timer_create(), + .last_configure_request_id = -1, + .next_code_reject_id = 0, + .next_terminate_id = 0, }; pbl_mutex_init(&this->state->lock); } @@ -405,8 +388,7 @@ void ppp_control_protocol_open(PPPControlProtocol *this) { pbl_mutex_unlock(&this->state->lock); } -void ppp_control_protocol_close(PPPControlProtocol *this, - PPPCPCloseWait wait) { +void ppp_control_protocol_close(PPPControlProtocol *this, PPPCPCloseWait wait) { pbl_mutex_lock(&this->state->lock, PBL_FOREVER); switch (this->state->link_state) { case LinkState_Starting: @@ -444,8 +426,8 @@ void ppp_control_protocol_close(PPPControlProtocol *this, } } -void ppp_control_protocol_handle_incoming_packet( - PPPControlProtocol *this, void *raw_packet, size_t length) { +void ppp_control_protocol_handle_incoming_packet(PPPControlProtocol *this, void *raw_packet, + size_t length) { pbl_mutex_lock(&this->state->lock, PBL_FOREVER); if (this->state->link_state == LinkState_Initial || this->state->link_state == LinkState_Starting) { @@ -455,8 +437,7 @@ void ppp_control_protocol_handle_incoming_packet( } struct LCPPacket *packet = raw_packet; - if (length < sizeof(*packet) || - ntoh16(packet->length) < sizeof(*packet) || + if (length < sizeof(*packet) || ntoh16(packet->length) < sizeof(*packet) || length < ntoh16(packet->length)) { // Invalid packet; silently discard goto done; diff --git a/src/fw/console/control_protocol.h b/src/fw/console/control_protocol.h index 2931288045..0e9735387d 100644 --- a/src/fw/console/control_protocol.h +++ b/src/fw/console/control_protocol.h @@ -24,9 +24,8 @@ void ppp_control_protocol_lower_layer_is_down(PPPControlProtocol *protocol); void ppp_control_protocol_open(PPPControlProtocol *protocol); //! Notify the control protocol that the layer is not allowed to be opened. -void ppp_control_protocol_close(PPPControlProtocol *protocol, - PPPCPCloseWait wait); +void ppp_control_protocol_close(PPPControlProtocol *protocol, PPPCPCloseWait wait); //! Pass an incoming packet to the control protocol. -void ppp_control_protocol_handle_incoming_packet(PPPControlProtocol *protocol, - void *packet, size_t length); +void ppp_control_protocol_handle_incoming_packet(PPPControlProtocol *protocol, void *packet, + size_t length); diff --git a/src/fw/console/control_protocol_impl.h b/src/fw/console/control_protocol_impl.h index 381ff97799..0399f6ed91 100644 --- a/src/fw/console/control_protocol_impl.h +++ b/src/fw/console/control_protocol_impl.h @@ -34,15 +34,15 @@ typedef enum ControlCode { } ControlCode; typedef enum LinkState { - LinkState_Initial, //!< Lower layer is Down; this layer is Closed - LinkState_Starting, //!< Lower layer is Down; this layer is Open - LinkState_Closed, //!< Lower layer is Up; this layer is Closed - LinkState_Stopped, //!< Waiting passively for a new connection - LinkState_Closing, //!< Connection is being terminated before Closed - LinkState_Stopping, //!< Connection is being terminated before Stopped + LinkState_Initial, //!< Lower layer is Down; this layer is Closed + LinkState_Starting, //!< Lower layer is Down; this layer is Open + LinkState_Closed, //!< Lower layer is Up; this layer is Closed + LinkState_Stopped, //!< Waiting passively for a new connection + LinkState_Closing, //!< Connection is being terminated before Closed + LinkState_Stopping, //!< Connection is being terminated before Stopped LinkState_RequestSent, //!< Configure-Request sent LinkState_AckReceived, //!< Configure-Request sent, Configure-Ack received - LinkState_AckSent, //!< Configure-Request and Configure-Ack sent + LinkState_AckSent, //!< Configure-Request and Configure-Ack sent LinkState_Opened, } LinkState; @@ -58,14 +58,13 @@ typedef struct PPPControlProtocolState { typedef const struct PPPControlProtocol PPPControlProtocol; struct PPPControlProtocol { - PPPControlProtocolState * const state; + PPPControlProtocolState *const state; //! Called when the layer is ready to carry traffic. void (*const on_this_layer_up)(PPPControlProtocol *this); //! Called when the layer is no longe ready to carry traffic. void (*const on_this_layer_down)(PPPControlProtocol *this); //! Called when a Code-Reject packet is received. - void (*const on_receive_code_reject)(PPPControlProtocol *this, - LCPPacket *packet); + void (*const on_receive_code_reject)(PPPControlProtocol *this, LCPPacket *packet); //! Called when a packet is received with a code not handled by the //! base Control Protocol implementation. May be NULL if no extended //! codes are supported by the implementation. @@ -76,8 +75,7 @@ struct PPPControlProtocol { //! If the code is unknown to the implementation, a Code-Reject //! response packet is sent by the base Control Protocol //! implementation. - bool (*const on_receive_unrecognized_code)(PPPControlProtocol *this, - LCPPacket *packet); + bool (*const on_receive_unrecognized_code)(PPPControlProtocol *this, LCPPacket *packet); //! PPP Encapsulation protocol number for the control protocol. uint16_t protocol_number; }; diff --git a/src/fw/console/dbgserial.c b/src/fw/console/dbgserial.c index 100c34d145..09ca8048a2 100644 --- a/src/fw/console/dbgserial.c +++ b/src/fw/console/dbgserial.c @@ -9,14 +9,12 @@ #include #include - #ifdef CONFIG_PULSE_EVERYWHERE #define DEFAULT_SERIAL_BAUD_RATE 1000000 #else #define DEFAULT_SERIAL_BAUD_RATE 115200 #endif - void dbgserial_init(void) { #if !defined(CONFIG_RELEASE) || defined(CONFIG_MFG) uart_init(DBG_UART); @@ -34,7 +32,7 @@ void dbgserial_restore_baud_rate(void) { dbgserial_change_baud_rate(DEFAULT_SERIAL_BAUD_RATE); } -void dbgserial_putstr(const char* str) { +void dbgserial_putstr(const char *str) { while (*str) { dbgserial_putchar(*str); ++str; @@ -56,7 +54,7 @@ void dbgserial_flush(void) { uart_wait_for_tx_complete(DBG_UART); } -void dbgserial_putstr_fmt(char* buffer, unsigned int buffer_size, const char* fmt, ...) { +void dbgserial_putstr_fmt(char *buffer, unsigned int buffer_size, const char *fmt, ...) { va_list ap; va_start(ap, fmt); vsniprintf(buffer, buffer_size, fmt, ap); diff --git a/src/fw/console/dbgserial.h b/src/fw/console/dbgserial.h index 5b56e0ce55..b2e6e8f722 100644 --- a/src/fw/console/dbgserial.h +++ b/src/fw/console/dbgserial.h @@ -14,9 +14,9 @@ void dbgserial_putchar(uint8_t c); //! Use if you don't need a guarantee that your character will be written. void dbgserial_putchar_lazy(uint8_t c); -void dbgserial_putstr(const char* str); +void dbgserial_putstr(const char *str); -void dbgserial_putstr_fmt(char* buffer, unsigned int buffer_size, const char* fmt, ...) +void dbgserial_putstr_fmt(char *buffer, unsigned int buffer_size, const char *fmt, ...) __attribute__((__format__(__printf__, 3, 4))); void dbgserial_change_baud_rate(uint32_t new_baud); diff --git a/src/fw/console/dbgserial_input.c b/src/fw/console/dbgserial_input.c index 0af140a5c0..cbb89280ab 100644 --- a/src/fw/console/dbgserial_input.c +++ b/src/fw/console/dbgserial_input.c @@ -50,11 +50,15 @@ void dbgserial_set_input_enabled(bool enabled) { } #else -void dbgserial_input_init(void) {} +void dbgserial_input_init(void) { +} -void dbgserial_register_character_callback(DbgSerialCharacterCallback callback) {} +void dbgserial_register_character_callback(DbgSerialCharacterCallback callback) { +} -void dbgserial_set_rx_dma_enabled(bool enabled) {} +void dbgserial_set_rx_dma_enabled(bool enabled) { +} -void dbgserial_set_input_enabled(bool enabled) {} +void dbgserial_set_input_enabled(bool enabled) { +} #endif diff --git a/src/fw/console/dbgserial_input.h b/src/fw/console/dbgserial_input.h index 5e95590718..dfa3524978 100644 --- a/src/fw/console/dbgserial_input.h +++ b/src/fw/console/dbgserial_input.h @@ -6,14 +6,13 @@ #include #include - //! @file dbgserial_input.h //! Contains the input related functionality of the debug serial port. //! Initializes the input portions of the dbgserial driver. void dbgserial_input_init(void); -typedef void (*DbgSerialCharacterCallback)(char c, bool* should_context_switch); +typedef void (*DbgSerialCharacterCallback)(char c, bool *should_context_switch); void dbgserial_register_character_callback(DbgSerialCharacterCallback callback); //! Enables/disables DMA-based receiving diff --git a/src/fw/console/prompt.c b/src/fw/console/prompt.c index dfc875030c..26b5e810f0 100644 --- a/src/fw/console/prompt.c +++ b/src/fw/console/prompt.c @@ -23,10 +23,10 @@ #define PROMPT_RESP_MESSAGE (102) static void start_prompt(void); -static void pulse_send_message(const int message_type, const char* response); +static void pulse_send_message(const int message_type, const char *response); static void prv_pulse_done_command(void); -static void prv_dbgserial_response_callback(const char* response) { +static void prv_dbgserial_response_callback(const char *response) { if (serial_console_get_state() == SERIAL_CONSOLE_STATE_PULSE) { pulse_send_message(PROMPT_RESP_MESSAGE, response); } else { @@ -44,15 +44,15 @@ static void prv_dbgserial_command_complete_callback(void) { } static PromptContext s_dbgserial_prompt_context = { - .response_callback = prv_dbgserial_response_callback, - .command_complete_callback = prv_dbgserial_command_complete_callback, + .response_callback = prv_dbgserial_response_callback, + .command_complete_callback = prv_dbgserial_command_complete_callback, }; typedef enum { ExecutingCommandNone = 0, - ExecutingCommandDbgSerial, //!< Currently executing command through dbgserial - ExecutingCommandPulse, //!< Currently executing command is through Pulse - ExecutingCommandContext, //!< Currently executing command is a custom \ref PromptContext + ExecutingCommandDbgSerial, //!< Currently executing command through dbgserial + ExecutingCommandPulse, //!< Currently executing command is through Pulse + ExecutingCommandContext, //!< Currently executing command is a custom \ref PromptContext } ExecutingCommand; static bool s_command_continues_after_return = false; @@ -79,10 +79,10 @@ void console_switch_to_prompt(void) { ///////////////////////////////////////////////////////////////// typedef void (*CommandFuncNoParam)(void); -typedef void (*CommandFuncOneParam)(const char*); -typedef void (*CommandFuncTwoParams)(const char*, const char*); -typedef void (*CommandFuncThreeParams)(const char*, const char*, const char*); -typedef void (*CommandFuncFourParams)(const char*, const char*, const char*, const char*); +typedef void (*CommandFuncOneParam)(const char *); +typedef void (*CommandFuncTwoParams)(const char *, const char *); +typedef void (*CommandFuncThreeParams)(const char *, const char *, const char *); +typedef void (*CommandFuncFourParams)(const char *, const char *, const char *, const char *); #define NUM_SUPPORTED_PARAM_COUNT 4 @@ -90,10 +90,10 @@ void command_help(void) { prompt_send_response("Available Commands:"); char buffer[32]; for (unsigned int i = 0; i < NUM_PROMPT_COMMANDS; ++i) { - const Command* cmd = &s_prompt_commands[i]; + const Command *cmd = &s_prompt_commands[i]; if (cmd->num_params) { - prompt_send_response_fmt(buffer, sizeof(buffer), - "%s {%u args}", cmd->cmd_str, cmd->num_params); + prompt_send_response_fmt(buffer, sizeof(buffer), "%s {%u args}", cmd->cmd_str, + cmd->num_params); } else { prompt_send_response(cmd->cmd_str); } @@ -102,10 +102,10 @@ void command_help(void) { typedef struct CommandArgs { unsigned int num_args; - const char* args[NUM_SUPPORTED_PARAM_COUNT]; + const char *args[NUM_SUPPORTED_PARAM_COUNT]; } CommandArgs; -static CommandArgs prv_parse_arguments(char* buffer, char* buffer_end) { +static CommandArgs prv_parse_arguments(char *buffer, char *buffer_end) { CommandArgs args; for (int i = 0; i < NUM_SUPPORTED_PARAM_COUNT; ++i) { @@ -132,27 +132,27 @@ static CommandArgs prv_parse_arguments(char* buffer, char* buffer_end) { return args; } -static void prv_execute_given_command(const Command* cmd, char* param_str, char* param_str_end) { +static void prv_execute_given_command(const Command *cmd, char *param_str, char *param_str_end) { CommandArgs args = prv_parse_arguments(param_str, param_str_end); if (args.num_args != cmd->num_params) { char buffer[128]; prompt_send_response_fmt(buffer, sizeof(buffer), - "Incorrect number of arguments: Wanted %u Got %u", - cmd->num_params, args.num_args); + "Incorrect number of arguments: Wanted %u Got %u", cmd->num_params, + args.num_args); goto done; } if (cmd->num_params == 4) { - ((CommandFuncFourParams) cmd->func)(args.args[0], args.args[1], args.args[2], args.args[3]); + ((CommandFuncFourParams)cmd->func)(args.args[0], args.args[1], args.args[2], args.args[3]); } else if (cmd->num_params == 3) { - ((CommandFuncThreeParams) cmd->func)(args.args[0], args.args[1], args.args[2]); + ((CommandFuncThreeParams)cmd->func)(args.args[0], args.args[1], args.args[2]); } else if (cmd->num_params == 2) { - ((CommandFuncTwoParams) cmd->func)(args.args[0], args.args[1]); + ((CommandFuncTwoParams)cmd->func)(args.args[0], args.args[1]); } else if (cmd->num_params == 1) { - ((CommandFuncOneParam) cmd->func)(args.args[0]); + ((CommandFuncOneParam)cmd->func)(args.args[0]); } else if (cmd->num_params == 0) { - ((CommandFuncNoParam) cmd->func)(); + ((CommandFuncNoParam)cmd->func)(); } done: @@ -161,7 +161,7 @@ static void prv_execute_given_command(const Command* cmd, char* param_str, char* } } -static void prv_find_and_execute_command(char* cmd, size_t cmd_len, PromptContext *context) { +static void prv_find_and_execute_command(char *cmd, size_t cmd_len, PromptContext *context) { if (!cmd_len) { // Empty command. s_executing_command = ExecutingCommandNone; @@ -175,9 +175,7 @@ static void prv_find_and_execute_command(char* cmd, size_t cmd_len, PromptContex const Command *cmd_iter = &s_prompt_commands[i]; const size_t cmd_iter_length = strlen(cmd_iter->cmd_str); - if (cmd_len >= cmd_iter_length && - memcmp(cmd_iter->cmd_str, cmd, cmd_iter_length) == 0) { - + if (cmd_len >= cmd_iter_length && memcmp(cmd_iter->cmd_str, cmd, cmd_iter_length) == 0) { prv_execute_given_command(cmd_iter, cmd + cmd_iter_length, cmd + cmd_len); command_found = true; @@ -204,7 +202,7 @@ void prompt_context_execute(PromptContext *context) { static void prv_execute_command_from_dbgserial(void *data) { dbgserial_putstr(""); - char* buffer = s_dbgserial_prompt_context.buffer; + char *buffer = s_dbgserial_prompt_context.buffer; if (s_dbgserial_prompt_context.write_index > 0 && buffer[0] == '!') { // Go to log mode immediately. @@ -216,8 +214,7 @@ static void prv_execute_command_from_dbgserial(void *data) { s_dbgserial_prompt_context.buffer + s_dbgserial_prompt_context.write_index; const size_t buffer_length = end_of_buffer - buffer; - prv_find_and_execute_command(buffer, buffer_length, - &s_dbgserial_prompt_context); + prv_find_and_execute_command(buffer, buffer_length, &s_dbgserial_prompt_context); } bool prompt_context_append_char(PromptContext *prompt_context, char c) { @@ -230,7 +227,7 @@ bool prompt_context_append_char(PromptContext *prompt_context, char c) { } // Crank up the optimization on this bad boy. -OPTIMIZE_FUNC(2) void prompt_handle_character(char c, bool* should_context_switch) { +OPTIMIZE_FUNC(2) void prompt_handle_character(char c, bool *should_context_switch) { if (UNLIKELY(prompt_command_is_executing())) { return; } @@ -238,7 +235,7 @@ OPTIMIZE_FUNC(2) void prompt_handle_character(char c, bool* should_context_switc if (LIKELY(c >= 0x20 && c < 127)) { // Printable character. if (!prompt_context_append_char(&s_dbgserial_prompt_context, c)) { - dbgserial_putchar(0x07); // bell + dbgserial_putchar(0x07); // bell return; } @@ -250,33 +247,33 @@ OPTIMIZE_FUNC(2) void prompt_handle_character(char c, bool* should_context_switc // Handle unprintable control characters. - if (UNLIKELY(c == 0x3)) { // CTRL-C + if (UNLIKELY(c == 0x3)) { // CTRL-C dbgserial_putstr(""); - start_prompt(); // Start over + start_prompt(); // Start over return; } - if (UNLIKELY(c == 0x4)) { // CTRL-D + if (UNLIKELY(c == 0x4)) { // CTRL-D dbgserial_putstr("^D"); serial_console_set_state(SERIAL_CONSOLE_STATE_LOGGING); return; } - if (UNLIKELY(c == 0xd)) { // Enter key + if (UNLIKELY(c == 0xd)) { // Enter key s_executing_command = ExecutingCommandDbgSerial; system_task_add_callback_from_isr(prv_execute_command_from_dbgserial, NULL, should_context_switch); return; } - if (UNLIKELY(c == 0x7f)) { // Backspace + if (UNLIKELY(c == 0x7f)) { // Backspace if (s_dbgserial_prompt_context.write_index != 0) { s_dbgserial_prompt_context.write_index--; - dbgserial_putchar(0x8); // move cursor back one character - dbgserial_putchar(0x20); // replace that character with a space, advancing the cursor - dbgserial_putchar(0x8); // move the cursor back again + dbgserial_putchar(0x8); // move cursor back one character + dbgserial_putchar(0x20); // replace that character with a space, advancing the cursor + dbgserial_putchar(0x8); // move the cursor back again } else { - dbgserial_putchar(0x07); // bell + dbgserial_putchar(0x07); // bell } return; } @@ -290,12 +287,12 @@ void prompt_watchdog_feed(void) { system_task_watchdog_feed(); } -void prompt_send_response(const char* response) { +void prompt_send_response(const char *response) { PBL_ASSERTN(s_current_context && s_current_context->response_callback); s_current_context->response_callback(response); } -void prompt_send_response_fmt(char* buffer, size_t buffer_size, const char* fmt, ...) { +void prompt_send_response_fmt(char *buffer, size_t buffer_size, const char *fmt, ...) { va_list ap; va_start(ap, fmt); vsniprintf(buffer, buffer_size, fmt, ap); @@ -341,16 +338,14 @@ typedef struct __attribute__((__packed__)) PromptResponseContents { static void pulse_send_message(const int message_type, const char *response) { size_t response_length = 0; #ifdef CONFIG_PULSE_EVERYWHERE - PromptResponseContents *contents = pulse_reliable_send_begin( - PULSE2_RELIABLE_PROMPT_PROTOCOL); + PromptResponseContents *contents = pulse_reliable_send_begin(PULSE2_RELIABLE_PROMPT_PROTOCOL); if (!contents) { // Transport went down while waiting to send. Just throw away the message; // there's not much else we can do. return; } #else - PromptResponseContents *contents = pulse_best_effort_send_begin( - PULSE_PROTOCOL_PROMPT); + PromptResponseContents *contents = pulse_best_effort_send_begin(PULSE_PROTOCOL_PROMPT); #endif if (response) { @@ -363,7 +358,7 @@ static void pulse_send_message(const int message_type, const char *response) { time_t time_s; uint16_t time_ms; rtc_get_time_ms(&time_s, &time_ms); - contents->time_ms = (uint64_t) time_s * 1000 + time_ms; + contents->time_ms = (uint64_t)time_s * 1000 + time_ms; if (response_length > 0) { strncpy(contents->message, response, response_length); @@ -384,8 +379,9 @@ static void prv_pulse_done_command(void) { void pulse2_prompt_packet_handler(void *packet, size_t length) { if (prompt_command_is_executing()) { - PBL_LOG_DBG("Ignoring prompt command as another command is " - "currently executing"); + PBL_LOG_DBG( + "Ignoring prompt command as another command is " + "currently executing"); return; } diff --git a/src/fw/console/prompt.h b/src/fw/console/prompt.h index feb5fa2e40..d994997de3 100644 --- a/src/fw/console/prompt.h +++ b/src/fw/console/prompt.h @@ -31,7 +31,7 @@ typedef struct PromptContext { //! PROMPT_BUFFER_SIZE_BYTES - 1. unsigned int write_index; - char buffer[PROMPT_BUFFER_SIZE_BYTES + 1]; // Leave space for a trailing null always. + char buffer[PROMPT_BUFFER_SIZE_BYTES + 1]; // Leave space for a trailing null always. } PromptContext; //! Asks the console to switch to prompt mode. Used by other console modes to flip back to the @@ -39,7 +39,7 @@ typedef struct PromptContext { void console_switch_to_prompt(void); //! Called on an ISR. Handles a new character from the dbgserial when we're in prompt mode. -void prompt_handle_character(char c, bool* should_context_switch); +void prompt_handle_character(char c, bool *should_context_switch); //! Appends a character to a given context. //! @return true if the character fits, false if the buffer is full @@ -56,12 +56,12 @@ void prompt_watchdog_feed(void); //! appropriate output terminal depending on who ran the command (dbgserial or accessory //! connector). //! @param response NULL-terminated string -void prompt_send_response(const char* response); +void prompt_send_response(const char *response); //! Use this from a prompt command to respond to a command. The output will directed out the //! appropriate output terminal depending on who ran the command (dbgserial or accessory //! connector). This option allows the use of printf style formatters to create output. -void prompt_send_response_fmt(char* buffer, size_t buffer_size, const char* fmt, ...) +void prompt_send_response_fmt(char *buffer, size_t buffer_size, const char *fmt, ...) FORMAT_PRINTF(3, 4); //! Finishes the currently running prompt command, and sends the prompt command complete message. diff --git a/src/fw/console/prompt_commands.c b/src/fw/console/prompt_commands.c index ddcf6fbb0e..c8161b3e48 100644 --- a/src/fw/console/prompt_commands.c +++ b/src/fw/console/prompt_commands.c @@ -59,17 +59,17 @@ void pfs_command_stress(void) { system_task_add_callback(prv_pfs_stress_callback, NULL); } -extern void command_read_word(const char* address_str) { +extern void command_read_word(const char *address_str) { int32_t address = str_to_address(address_str); if (address == -1) { prompt_send_response("Invalid address"); return; } - uint32_t word = *(uint32_t*) address; + uint32_t word = *(uint32_t *)address; char buffer[32]; - prompt_send_response_fmt(buffer, sizeof(buffer), "0x%"PRIx32" = 0x%"PRIx32, address, word); + prompt_send_response_fmt(buffer, sizeof(buffer), "0x%" PRIx32 " = 0x%" PRIx32, address, word); } void command_format_flash(void) { @@ -90,8 +90,8 @@ void command_erase_flash(const char *address_str, const char *length_str) { } char buffer[128]; - prompt_send_response_fmt(buffer, 128, "Erasing sectors from 0x%"PRIx32" for %ub", - address, length); + prompt_send_response_fmt(buffer, 128, "Erasing sectors from 0x%" PRIx32 " for %ub", address, + length); const uint32_t end_address = address + length; const uint32_t aligned_end_address = @@ -102,7 +102,7 @@ void command_erase_flash(const char *address_str, const char *length_str) { prompt_send_response("OK"); } -void command_dump_flash(const char* address_str, const char* length_str) { +void command_dump_flash(const char *address_str, const char *length_str) { int32_t address = str_to_address(address_str); if (address == -1) { prompt_send_response("Invalid address"); @@ -124,7 +124,7 @@ void command_dump_flash(const char* address_str, const char* length_str) { uint32_t chunk_size = MIN(length, 128); flash_read_bytes(buffer, address, chunk_size); - PBL_LOG_ALWAYS("Data at address 0x%"PRIx32, address); + PBL_LOG_ALWAYS("Data at address 0x%" PRIx32, address); hexdump_log(LOG_LEVEL_ALWAYS, buffer, chunk_size); address += chunk_size; @@ -135,7 +135,7 @@ void command_dump_flash(const char* address_str, const char* length_str) { serial_console_set_state(SERIAL_CONSOLE_STATE_PROMPT); } -void command_crc_flash(const char* address_str, const char* length_str) { +void command_crc_flash(const char *address_str, const char *length_str) { int32_t address = str_to_address(address_str); if (address == -1) { prompt_send_response("Invalid address"); @@ -150,11 +150,11 @@ void command_crc_flash(const char* address_str, const char* length_str) { uint32_t crc = flash_calculate_legacy_defective_checksum(address, length); char buffer[32]; - prompt_send_response_fmt(buffer, sizeof(buffer), "CRC: %"PRIx32, crc); + prompt_send_response_fmt(buffer, sizeof(buffer), "CRC: %" PRIx32, crc); } -#define MAX_READ_FLASH_SIZE 1024 // 1KB -void command_flash_read(const char* address_str, const char* length_str) { +#define MAX_READ_FLASH_SIZE 1024 // 1KB +void command_flash_read(const char *address_str, const char *length_str) { // Read data from flash and output the data directly to serial port in segmented chunks int32_t address = str_to_address(address_str); @@ -170,7 +170,7 @@ void command_flash_read(const char* address_str, const char* length_str) { } // Allocate a 1KB buffer to read data in segments - uint8_t *buffer = (uint8_t *) kernel_malloc(MIN(MAX_READ_FLASH_SIZE,length)); + uint8_t *buffer = (uint8_t *)kernel_malloc(MIN(MAX_READ_FLASH_SIZE, length)); if (buffer == 0) { prompt_send_response("Unable to allocate read buffer"); return; @@ -178,7 +178,7 @@ void command_flash_read(const char* address_str, const char* length_str) { while (length > 0) { uint32_t read_length = MAX_READ_FLASH_SIZE; - if (length < MAX_READ_FLASH_SIZE){ + if (length < MAX_READ_FLASH_SIZE) { read_length = length; } @@ -196,13 +196,13 @@ void command_flash_read(const char* address_str, const char* length_str) { kernel_free(buffer); } -void command_flash_switch_mode (const char* mode_str) { +void command_flash_switch_mode(const char *mode_str) { int mode = atoi(mode_str); flash_switch_mode(mode); } #define WRITE_PAGE_SIZE_BYTES 64 -void command_flash_fill (const char* address_str, const char* length_str, const char* value_str) { +void command_flash_fill(const char *address_str, const char *length_str, const char *value_str) { int32_t address = str_to_address(address_str); if (address == -1) { prompt_send_response("Invalid address"); @@ -228,8 +228,7 @@ void command_flash_fill (const char* address_str, const char* length_str, const } uint32_t bytes_remaining = length; - while (bytes_remaining > 0) - { + while (bytes_remaining > 0) { uint32_t bytes_to_write = WRITE_PAGE_SIZE_BYTES; if (bytes_remaining < WRITE_PAGE_SIZE_BYTES) { bytes_to_write = bytes_remaining; @@ -274,7 +273,7 @@ void command_flash_validate(void) { for (uint32_t i = 0; i < BUFFER_SIZE; i++) { if (buffer[i] != i) { char err_buf[80]; - prompt_send_response_fmt(err_buf, sizeof(err_buf), "FAIL: Incorrect value at 0x%"PRIx32, + prompt_send_response_fmt(err_buf, sizeof(err_buf), "FAIL: Incorrect value at 0x%" PRIx32, addr + i); return; } @@ -283,9 +282,10 @@ void command_flash_validate(void) { // read it back, albeit awkwardly. We have seen issues that arise when stitching different // types of flash ops together (i.e single byte reads followed by memmaps) - const uint32_t SHORT_TEST_LENGTH = 1000; // single byte reads are slow so do a shorter test length - for (uint32_t offset = 0; offset < SHORT_TEST_LENGTH ; offset++) { - uint8_t memmap_buffer[130]; // > 128 bytes, triggers a memmap read for QSPI + const uint32_t SHORT_TEST_LENGTH = + 1000; // single byte reads are slow so do a shorter test length + for (uint32_t offset = 0; offset < SHORT_TEST_LENGTH; offset++) { + uint8_t memmap_buffer[130]; // > 128 bytes, triggers a memmap read for QSPI memset(memmap_buffer, 0x00, sizeof(memmap_buffer)); const uint32_t pre_addr = TEST_ADDR + offset - MIN(offset, 1); @@ -329,8 +329,9 @@ static bool prv_is_really_erased(uint32_t addr, bool is_subsector) { if (buffer[j] != 0xFF) { erased = false; prompt_send_response_fmt(buffer, sizeof(buffer), - "(Sub)Sector at addr: 0x%"PRIX32" not really erased. is_subsector: %d", - addr, is_subsector); + "(Sub)Sector at addr: 0x%" PRIX32 + " not really erased. is_subsector: %d", + addr, is_subsector); goto done; } } @@ -351,13 +352,13 @@ void command_flash_show_erased_sectors(const char *arg) { uint32_t addr = 0; while (addr < BOARD_NOR_FLASH_SIZE) { bool erased = prv_is_really_erased(addr, false); - prompt_send_response_fmt(buffer, sizeof(buffer), "SECTOR - 0x%-6"PRIX32" :: %s", - addr, erased ? "true" : "false"); + prompt_send_response_fmt(buffer, sizeof(buffer), "SECTOR - 0x%-6" PRIX32 " :: %s", addr, + erased ? "true" : "false"); if (show_subsectors && !erased) { for (uint32_t i = 0; i < (SECTOR_SIZE_BYTES / SUBSECTOR_SIZE_BYTES); i++) { const uint32_t sub_addr = (addr + (i * SUBSECTOR_SIZE_BYTES)); bool sub_erased = prv_is_really_erased(sub_addr, true); - prompt_send_response_fmt(buffer, sizeof(buffer), " SUBSECTOR - 0X%-6"PRIx32" :: %s", + prompt_send_response_fmt(buffer, sizeof(buffer), " SUBSECTOR - 0X%-6" PRIx32 " :: %s", sub_addr, sub_erased ? "true" : "false"); } } @@ -433,7 +434,8 @@ void command_flash_sec_info(void) { return; } - prompt_send_response_fmt(buf, sizeof(buf), "Number of security registers: %d", info->num_sec_regs); + prompt_send_response_fmt(buf, sizeof(buf), "Number of security registers: %d", + info->num_sec_regs); for (int i = 0; i < info->num_sec_regs; i++) { bool locked; status_t ret; @@ -444,8 +446,8 @@ void command_flash_sec_info(void) { return; } - prompt_send_response_fmt(buf, sizeof(buf), "Security register %d: 0x%08lx (locked: %u)", - i, info->sec_regs[i], locked); + prompt_send_response_fmt(buf, sizeof(buf), "Security register %d: 0x%08lx (locked: %u)", i, + info->sec_regs[i], locked); } } @@ -459,8 +461,8 @@ void command_flash_sec_lock(const char *address_str, const char *password) { prompt_send_response("FAIL: Invalid password"); } } -#endif // CONFIG_RECOVERY_FW -#endif // CONFIG_OTP_FLASH +#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_OTP_FLASH #include "util/rand.h" @@ -481,7 +483,7 @@ static void prv_flash_stress_callback(void *data) { PBL_LOG_ALWAYS("flash stress test complete"); return; } - + int bufsz = rand32() % 1024; uint8_t *buf = kernel_malloc(bufsz); if (!buf) { @@ -502,8 +504,10 @@ static void prv_flash_stress_callback(void *data) { } int miscompare = 0; - - uint32_t sector_address = flash_get_sector_base_address(flash_addr + bufsz); // the beginning has already been erased, since we are always smaller than a sector + + uint32_t sector_address = flash_get_sector_base_address( + flash_addr + + bufsz); // the beginning has already been erased, since we are always smaller than a sector if (sector_address != s_flash_stress_last_sector) { PBL_LOG_ALWAYS("flash stress test: erasing flash address %lx", sector_address); flash_erase_sector_blocking(sector_address); @@ -514,7 +518,7 @@ static void prv_flash_stress_callback(void *data) { goto bailout; } } - + uint32_t lfsr_cur = lfsr_seed; for (int i = 0; i < bufsz; i++) { buf[i] = lfsr_cur & 0xFF; @@ -522,7 +526,7 @@ static void prv_flash_stress_callback(void *data) { } flash_write_bytes((const uint8_t *)buf, flash_addr, bufsz); - + for (int j = 0; j < 8; j++) { memset(buf, 0, bufsz); flash_read_bytes(buf, flash_addr, bufsz); @@ -531,7 +535,10 @@ static void prv_flash_stress_callback(void *data) { for (int i = 0; i < bufsz; i++) { if (buf[i] != (lfsr_cur & 0xFF)) { - PBL_LOG_ALWAYS("flash stress test: readback %d: miscompare at offset %d (%lx): expected 0x%02lx, found 0x%02x", j, i, flash_addr + i, lfsr_cur & 0xFF, buf[i]); + PBL_LOG_ALWAYS( + "flash stress test: readback %d: miscompare at offset %d (%lx): expected 0x%02lx, " + "found 0x%02x", + j, i, flash_addr + i, lfsr_cur & 0xFF, buf[i]); miscompare++; } lfsr_cur = prv_xorshift32(lfsr_cur); @@ -540,13 +547,15 @@ static void prv_flash_stress_callback(void *data) { break; } -bailout: +bailout: kernel_free(buf); if (miscompare) { - PBL_LOG_ALWAYS("flash stress test: %d miscompares on %d byte chunk at address %lx! giving up", miscompare, bufsz, flash_addr); + PBL_LOG_ALWAYS("flash stress test: %d miscompares on %d byte chunk at address %lx! giving up", + miscompare, bufsz, flash_addr); } else { - PBL_LOG_ALWAYS("flash stress test: %d bytes at address %lx OK; %d to go", bufsz, flash_addr, iters - 1); + PBL_LOG_ALWAYS("flash stress test: %d bytes at address %lx OK; %d to go", bufsz, flash_addr, + iters - 1); system_task_add_callback(prv_flash_stress_callback, (void *)(iters - 1)); } } @@ -582,7 +591,7 @@ static void s_flash_benchmark(size_t sz) { for (int i = 0; i < iters; i++) { flash_read_bytes(buf, flash_addr, sz); flash_addr += sz; - flash_addr &= ~3; /* keep us aligned */ + flash_addr &= ~3; /* keep us aligned */ flash_addr &= ~(SUBSECTOR_SIZE_BYTES << 1); /* keep us from wrapping too far */ } @@ -590,7 +599,9 @@ static void s_flash_benchmark(size_t sz) { } while (ticks_elapsed < 300); uint32_t us_per_tick = ticks_elapsed * 1000000 / (iters * RTC_TICKS_HZ); - prompt_send_response_fmt(rbuf, sizeof(rbuf), " -> %d bytes: %d iters in %lld ticks = %ld us/iter", sz, iters, ticks_elapsed, us_per_tick); + prompt_send_response_fmt(rbuf, sizeof(rbuf), + " -> %d bytes: %d iters in %lld ticks = %ld us/iter", sz, iters, + ticks_elapsed, us_per_tick); free(buf); @@ -614,7 +625,7 @@ void command_flash_benchmark() { void command_reset() { prompt_command_finish(); - RebootReason reason = { RebootReasonCode_Serial, 0 }; + RebootReason reason = {RebootReasonCode_Serial, 0}; reboot_reason_set(&reason); system_reset(); } @@ -622,7 +633,7 @@ void command_reset() { void command_crash() { prompt_command_finish(); - RebootReason reason = { RebootReasonCode_LauncherPanic, 0 }; + RebootReason reason = {RebootReasonCode_LauncherPanic, 0}; reboot_reason_set(&reason); system_reset(); } @@ -630,7 +641,7 @@ void command_crash() { void command_hard_crash() { prompt_command_finish(); - RebootReason reason = { RebootReasonCode_HardFault, 0 }; + RebootReason reason = {RebootReasonCode_HardFault, 0}; reboot_reason_set(&reason); boot_bit_set(BOOT_BIT_FW_START_FAIL_STRIKE_TWO); boot_bit_set(BOOT_BIT_SOFTWARE_FAILURE_OCCURRED); @@ -641,18 +652,20 @@ void command_hard_crash() { void command_boot_prf(void) { prompt_command_finish(); - RebootReason reason = { RebootReasonCode_Serial, 0 }; + RebootReason reason = {RebootReasonCode_Serial, 0}; reboot_reason_set(&reason); boot_bit_set(BOOT_BIT_FORCE_PRF); system_reset(); } void command_infinite_loop(void) { - while(1); + while (1) + ; } -void stuck_timer_cb(void* data) { - while(1); +void stuck_timer_cb(void *data) { + while (1) + ; } #include "pbl/services/new_timer/new_timer.h" @@ -686,7 +699,7 @@ void command_hardfault(void) { kaboom(); } -void command_boot_bit_set(const char* bit, const char* value) { +void command_boot_bit_set(const char *bit, const char *value) { int len = strlen(bit); int bit_number = 0; @@ -714,8 +727,7 @@ void command_boot_bit_set(const char* bit, const char* value) { } static bool prv_convert_and_validate_timeout_value(const char *timeout_string, - uint32_t default_value, - uint32_t *result) { + uint32_t default_value, uint32_t *result) { if (!result) { return false; } @@ -789,8 +801,8 @@ static void prv_button_press_multiple(const char *button_index, const char *pres break; } - error: - prompt_send_response("ERROR"); +error: + prompt_send_response("ERROR"); } // Perform a button press from the serial console. Three responses are provided @@ -833,8 +845,8 @@ void command_factory_reset_fast(void) { launcher_task_add_callback(factory_reset_fast, NULL); } -static bool prv_serial_dump_chunk_callback(uint8_t* msg, uint32_t total_length) { - LogBinaryMessage* message = (LogBinaryMessage *)msg; +static bool prv_serial_dump_chunk_callback(uint8_t *msg, uint32_t total_length) { + LogBinaryMessage *message = (LogBinaryMessage *)msg; char buffer[256]; char time_buffer[TIME_STRING_BUFFER_SIZE]; @@ -842,9 +854,7 @@ static bool prv_serial_dump_chunk_callback(uint8_t* msg, uint32_t total_length) prompt_send_response_fmt(buffer, sizeof(buffer), "%c %s %s:%d> %s", pbl_log_get_level_char(message->log_level), time_t_to_string(time_buffer, htonl(message->timestamp)), - message->filename, - (int)htons(message->line_number), - message->message); + message->filename, (int)htons(message->line_number), message->message); return true; } @@ -862,7 +872,7 @@ void command_log_dump_last(void) { prompt_command_continues_after_returning(); } -void command_log_dump_generation(const char* generation_str) { +void command_log_dump_generation(const char *generation_str) { int generation = atoi(generation_str); flash_dump_log_file(generation, prv_serial_dump_chunk_callback, prv_serial_dump_completed_callback); @@ -870,11 +880,11 @@ void command_log_dump_generation(const char* generation_str) { } static void spam_callback(void *data) { - uint32_t iteration = (uintptr_t) data; + uint32_t iteration = (uintptr_t)data; uint8_t buffer[128]; time_t base = sys_get_time(); for (int i = 0; i < 16; ++i) { - LogBinaryMessage* msg = (LogBinaryMessage*) buffer; + LogBinaryMessage *msg = (LogBinaryMessage *)buffer; msg->timestamp = htonl(base + iteration * 16 + i); msg->log_level = LOG_LEVEL_ERROR; msg->message_length = sizeof(buffer) - sizeof(LogBinaryMessage); @@ -893,7 +903,7 @@ static void spam_callback(void *data) { void command_log_dump_spam(void) { prompt_send_response("Spam logs!"); for (int i = 0; i < 16; ++i) { - system_task_add_callback(spam_callback, (void *)(uintptr_t) i); + system_task_add_callback(spam_callback, (void *)(uintptr_t)i); } } @@ -908,22 +918,21 @@ void command_log_dump_spam(void) { void flash_expect_program_failure(bool expect_failure); void command_flash_test_locked_sectors(void) { // write 0's to the entire flash - static uint8_t buf[2048] = { 0 }; + static uint8_t buf[2048] = {0}; char status[80]; __disable_irq(); for (int i = 0; i < 2; i++) { for (uint32_t addr = 0; addr < BOARD_NOR_FLASH_SIZE; addr += sizeof(buf)) { - if (addr >= FLASH_REGION_SAFE_FIRMWARE_BEGIN && - addr < FLASH_REGION_SAFE_FIRMWARE_END) { + if (addr >= FLASH_REGION_SAFE_FIRMWARE_BEGIN && addr < FLASH_REGION_SAFE_FIRMWARE_END) { flash_expect_program_failure(true); } if ((addr % SECTOR_SIZE_BYTES) == 0) { prompt_send_response_fmt(status, sizeof(status), "Validated: 0x%lx", addr); flash_erase_sector_blocking(addr); - flash_erase_sector_blocking(addr); // exercise already erased check + flash_erase_sector_blocking(addr); // exercise already erased check } flash_write_bytes(&buf[0], addr, sizeof(buf)); @@ -944,14 +953,14 @@ struct WasteTimerData { uint16_t count; uint16_t delay; }; -_Static_assert(sizeof(struct WasteTimerData) <= sizeof(uintptr_t), - "struct WasteTimerData too big"); +_Static_assert(sizeof(struct WasteTimerData) <= sizeof(uintptr_t), "struct WasteTimerData too big"); static void prv_waste_time_cb(void *context) { struct WasteTimerData data; memcpy(&data, &context, sizeof data); - for (int i = 0; i < data.delay; ++i) delay_us(1000); + for (int i = 0; i < data.delay; ++i) + delay_us(1000); if (--data.count > 0) { memcpy(&context, &data, sizeof context); new_timer_start(s_abusive_timer, 1, prv_waste_time_cb, context, 0); @@ -967,17 +976,16 @@ void command_waste_time(const char *count_arg, const char *delay_arg) { return; } - struct WasteTimerData data = { count, delay }; + struct WasteTimerData data = {count, delay}; uintptr_t data_pack; memcpy(&data_pack, &data, sizeof data_pack); if (s_abusive_timer == TIMER_INVALID_ID) { s_abusive_timer = new_timer_create(); } - if (new_timer_start(s_abusive_timer, 100, prv_waste_time_cb, - (void *)data_pack, 0)) { + if (new_timer_start(s_abusive_timer, 100, prv_waste_time_cb, (void *)data_pack, 0)) { prompt_send_response("OK"); - } else { + } else { prompt_send_response("ERROR"); } } @@ -1002,7 +1010,7 @@ void command_audit_delay_us(void) { // the requested time by more than 5% bool passed = ((duration_us >= i) && (duration_us <= ((i * 105) / 100))); if (!passed) { - prompt_send_response_fmt(buf, sizeof(buf), "Audit Failed: Expected %"PRIu32", Got %"PRIu32, + prompt_send_response_fmt(buf, sizeof(buf), "Audit Failed: Expected %" PRIu32 ", Got %" PRIu32, i, duration_us); } } @@ -1061,35 +1069,30 @@ static GAPLEConnection *prv_get_le_connection_and_print_info(void) { return conn; } -void command_bt_conn_param_set( - char *interval_min_1_25ms, char *interval_max_1_25ms, char *slave_latency_events, - char *timeout_10ms) { - - BleConnectionParamsUpdateReq req = { +void command_bt_conn_param_set(char *interval_min_1_25ms, char *interval_max_1_25ms, + char *slave_latency_events, char *timeout_10ms) { + BleConnectionParamsUpdateReq req = { .interval_min_1_25ms = atoi(interval_min_1_25ms), .interval_max_1_25ms = atoi(interval_max_1_25ms), .slave_latency_events = atoi(slave_latency_events), .supervision_timeout_10ms = atoi(timeout_10ms), - }; + }; - GAPLEConnection *conn = prv_get_le_connection_and_print_info(); - BTDeviceInternal addr = {}; - if (conn) { - addr.address = conn->device.address; - } + GAPLEConnection *conn = prv_get_le_connection_and_print_info(); + BTDeviceInternal addr = {}; + if (conn) { + addr.address = conn->device.address; + } - bt_driver_le_connection_parameter_update(&addr, &req); + bt_driver_le_connection_parameter_update(&addr, &req); } // Not in a header because it's really only used from within the gatt_service_changed module -extern void gatt_client_discovery_discover_range( - GAPLEConnection *connection, ATTHandleRange *hdl_range); +extern void gatt_client_discovery_discover_range(GAPLEConnection *connection, + ATTHandleRange *hdl_range); void command_bt_disc_start(char *start_handle, char *end_handle) { bt_lock(); { - ATTHandleRange range = { - .start = atoi(start_handle), - .end = atoi(end_handle) - }; + ATTHandleRange range = {.start = atoi(start_handle), .end = atoi(end_handle)}; GAPLEConnection *conn = prv_get_le_connection_and_print_info(); if (conn) { @@ -1158,7 +1161,7 @@ void command_perftest_line(const char *do_aa, const char *width) { GContext *ctx = prv_perftest_get_context(); - GColor color = { .argb = (uint8_t)0x33 }; + GColor color = {.argb = (uint8_t)0x33}; graphics_context_set_stroke_color(ctx, color); bool aa_enable = false; if (strcmp(do_aa, "aa") == 0) { @@ -1175,21 +1178,20 @@ void command_perftest_line(const char *do_aa, const char *width) { // 45 degrees graphics_draw_line(ctx, GPoint(0, 0), GPoint(DISP_COLS, DISP_ROWS)); // ~63 degrees - graphics_draw_line(ctx, GPoint(DISP_COLS/2, 0), GPoint(DISP_COLS, DISP_ROWS)); + graphics_draw_line(ctx, GPoint(DISP_COLS / 2, 0), GPoint(DISP_COLS, DISP_ROWS)); // ~33 degrees - graphics_draw_line(ctx, GPoint(0, DISP_ROWS/3), GPoint(DISP_COLS, DISP_ROWS)); + graphics_draw_line(ctx, GPoint(0, DISP_ROWS / 3), GPoint(DISP_COLS, DISP_ROWS)); // ~53 degrees - graphics_draw_line(ctx, GPoint(DISP_COLS/4, 0), GPoint(DISP_COLS, DISP_ROWS)); + graphics_draw_line(ctx, GPoint(DISP_COLS / 4, 0), GPoint(DISP_COLS, DISP_ROWS)); // ~39 degrees - graphics_draw_line(ctx, GPoint(0, DISP_ROWS/5), GPoint(DISP_COLS, DISP_ROWS)); + graphics_draw_line(ctx, GPoint(0, DISP_ROWS / 5), GPoint(DISP_COLS, DISP_ROWS)); profiler_stop(); uint32_t total_time = profiler_get_total_duration(false); uint32_t us = profiler_get_total_duration(true); char buf[80]; - prompt_send_response_fmt(buf, sizeof(buf), - "%s, %s, %"PRIu32", %"PRIu32, - do_aa, width, us, total_time); + prompt_send_response_fmt(buf, sizeof(buf), "%s, %s, %" PRIu32 ", %" PRIu32, do_aa, width, us, + total_time); } void command_perftest_line_all(void) { @@ -1219,9 +1221,9 @@ typedef struct PerftestTextArguments { static volatile PerftestTextArguments s_perftest_text_arguments; enum { - TestString_Best, // The best case - TestString_Worst, // Entirely unique characters, in order to miss the font cache every time - TestString_Typical, // A very typical notification + TestString_Best, // The best case + TestString_Worst, // Entirely unique characters, in order to miss the font cache every time + TestString_Typical, // A very typical notification TestStringCount, }; @@ -1241,59 +1243,63 @@ typedef struct PerftestTextString { } PerftestTextString; static const PerftestTextString s_perftest_text_strings[TestStringCount] = { - [TestString_Best] = { - .string = "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" - "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" - "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" - "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" - "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" - "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" - "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", - .lengths = { + [TestString_Best] = + { + .string = "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" + "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" + "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" + "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" + "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" + "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" + "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", + .lengths = + { #if defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) - [TestStringFont_Gothic18] = 204, - [TestStringFont_Gothic24B] = 144, - [TestStringFont_Other] = STRING_LENGTH_MAX, + [TestStringFont_Gothic18] = 204, + [TestStringFont_Gothic24B] = 144, + [TestStringFont_Other] = STRING_LENGTH_MAX, #endif - }, - }, - [TestString_Worst] = { - .string = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./~!@#$%%^&*()_+QWERTYUIOP{}|A" - "SDFGHJKL:\"ZXCVBNM<>?èéêëēėęÿûüùúūîïíī" - "įìôöòóœøōõàáâäæãåāßśšłžźżçćčñń∑´®†¥¨ˆπ" - "∂ƒ©˙∆˚¬…Ω≈√∫˜µ≤≥÷¡™£¢∞§¶•ªº–≠`“‘" - "«ÈÉÊËĒĖĘŸÛÜÙÚŪÎÏÍĪĮÌÔÖÒÓŒØŌÕÀÁÂÄÆÃÅĀŚ" - "ŠŁŽŹŻÇĆČÑŃ∑ˇ∏”’»˝¸˛◊ı˜¯˘¿" - "あいうえおかきくけこさしすせそたちつてとなに" - "ぬねのはひふへほまみむめもやゆよらりるれろわ" - "をんアイウエオサシスセソタチツテトナニヌネノ" - "ハヒフヘホマミムメモヤユヨラリルレロワヲン", - .lengths = { + }, + }, + [TestString_Worst] = + { + .string = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./~!@#$%%^&*()_+QWERTYUIOP{}|A" + "SDFGHJKL:\"ZXCVBNM<>?èéêëēėęÿûüùúūîïíī" + "įìôöòóœøōõàáâäæãåāßśšłžźżçćčñń∑´®†¥¨ˆπ" + "∂ƒ©˙∆˚¬…Ω≈√∫˜µ≤≥÷¡™£¢∞§¶•ªº–≠`“‘" + "«ÈÉÊËĒĖĘŸÛÜÙÚŪÎÏÍĪĮÌÔÖÒÓŒØŌÕÀÁÂÄÆÃÅĀŚ" + "ŠŁŽŹŻÇĆČÑŃ∑ˇ∏”’»˝¸˛◊ı˜¯˘¿" + "あいうえおかきくけこさしすせそたちつてとなに" + "ぬねのはひふへほまみむめもやゆよらりるれろわ" + "をんアイウエオサシスセソタチツテトナニヌネノ" + "ハヒフヘホマミムメモヤユヨラリルレロワヲン", + .lengths = + { #if defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) - [TestStringFont_Gothic18] = 579, - [TestStringFont_Gothic24B] = 291, - [TestStringFont_Other] = STRING_LENGTH_MAX, + [TestStringFont_Gothic18] = 579, + [TestStringFont_Gothic24B] = 291, + [TestStringFont_Other] = STRING_LENGTH_MAX, #endif - }, - }, - [TestString_Typical] = { - .string = "Brian Gomberg\n" - "Re: Robert stand-up 06/06 • " - "y: - DDAD (enabling system apps to take advantage of memory mapped " - "FLASH access on Robe" - "\xe2\x80\xa6", - .lengths = { + }, + }, + [TestString_Typical] = { + .string = "Brian Gomberg\n" + "Re: Robert stand-up 06/06 • " + "y: - DDAD (enabling system apps to take advantage of memory mapped " + "FLASH access on Robe" + "\xe2\x80\xa6", + .lengths = { #if defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) - [TestStringFont_Gothic18] = 134, - [TestStringFont_Gothic24B] = 134, - [TestStringFont_Other] = STRING_LENGTH_MAX, + [TestStringFont_Gothic18] = 134, + [TestStringFont_Gothic24B] = 134, + [TestStringFont_Other] = STRING_LENGTH_MAX, #endif + }, }, - }, }; #define TEXT_ALIGNMENT (GTextAlignmentCenter) -#define TEXT_OVERFLOW (GTextOverflowModeWordWrap) +#define TEXT_OVERFLOW (GTextOverflowModeWordWrap) // Enable this to show the actual contents, to check lengths and such. #define TEXT_PERFTEST_MODAL 0 @@ -1320,8 +1326,7 @@ static void prv_dialog_load(Window *window) { TextLayer *text_layer = &dialog->text_layer; text_layer_init_with_parameters(text_layer, &GRect(0, 0, DISP_COLS, DISP_ROWS), dialog->buffer, - font, GColorBlack, GColorClear, TEXT_ALIGNMENT, - TEXT_OVERFLOW); + font, GColorBlack, GColorClear, TEXT_ALIGNMENT, TEXT_OVERFLOW); layer_add_child(&window->layer, &text_layer->layer); #if PBL_ROUND @@ -1338,11 +1343,11 @@ static void prv_display_modal(WindowStack *stack, const char *string) { dialog_set_text(new_dialog, string); Window *window = &new_dialog->window; - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_dialog_load, - .unload = prv_dialog_unload, - .appear = prv_dialog_appear, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_dialog_load, + .unload = prv_dialog_unload, + .appear = prv_dialog_appear, + }); window_set_user_data(window, new_dialog); dialog_push(new_dialog, stack); } @@ -1385,8 +1390,7 @@ static void prv_perftest_test_main(void *data) { #endif length = MIN(length, sizeof(s_text_test_str)); - strncpy(s_text_test_str, s_perftest_text_strings[text_index].string, - length); + strncpy(s_text_test_str, s_perftest_text_strings[text_index].string, length); s_text_test_str[length] = '\0'; #if TEXT_PERFTEST_MODAL @@ -1414,8 +1418,7 @@ static void prv_perftest_test_main(void *data) { graphics_context_set_text_color(ctx, GColorBlack); profiler_start(); - graphics_draw_text(ctx, s_text_test_str, font, bounds, - TEXT_OVERFLOW, TEXT_ALIGNMENT, NULL); + graphics_draw_text(ctx, s_text_test_str, font, bounds, TEXT_OVERFLOW, TEXT_ALIGNMENT, NULL); profiler_stop(); avg += profiler_get_total_duration(true); } @@ -1423,11 +1426,9 @@ static void prv_perftest_test_main(void *data) { avg /= PERFTEST_TEXT_ITERATIONS; char buf[80]; uint32_t flash_us_avg = PROFILER_NODE_GET_TOTAL_US(text_render_flash) / PERFTEST_TEXT_ITERATIONS; - prompt_send_response_fmt(buf, sizeof(buf), "%s, %s, %s, %"PRIu32", %"PRIu32, - s_perftest_text_arguments.font_key, - s_perftest_text_arguments.string_type, - s_perftest_text_arguments.y_offset, - avg, flash_us_avg); + prompt_send_response_fmt( + buf, sizeof(buf), "%s, %s, %s, %" PRIu32 ", %" PRIu32, s_perftest_text_arguments.font_key, + s_perftest_text_arguments.string_type, s_perftest_text_arguments.y_offset, avg, flash_us_avg); s_perftest_text_arguments.string_type = NULL; } @@ -1446,18 +1447,17 @@ void command_perftest_text(const char *string_type, const char *fontkey, const c void command_perftest_text_all(void) { static const char *fonts[] = { - "RESOURCE_ID_GOTHIC_28", - "RESOURCE_ID_GOTHIC_24", - "RESOURCE_ID_GOTHIC_18", - "RESOURCE_ID_GOTHIC_28_BOLD", - "RESOURCE_ID_GOTHIC_24_BOLD", - "RESOURCE_ID_GOTHIC_18_BOLD", + "RESOURCE_ID_GOTHIC_28", "RESOURCE_ID_GOTHIC_24", "RESOURCE_ID_GOTHIC_18", + "RESOURCE_ID_GOTHIC_28_BOLD", "RESOURCE_ID_GOTHIC_24_BOLD", "RESOURCE_ID_GOTHIC_18_BOLD", }; static const char *types[] = { - "best", "worst", "typical", + "best", + "worst", + "typical", }; static const char *offsets[] = { - "0", "2000", + "0", + "2000", }; prompt_send_response("Font, Type, Offset, Total avg us, Flash avg us"); for (unsigned int type = 0; type < ARRAY_LENGTH(types); type++) { @@ -1492,8 +1492,8 @@ void command_console_disable_rx(const char *seconds_str) { char buf[64]; prompt_send_response_fmt(buf, sizeof(buf), "Console RX disabled for %d seconds", seconds); - new_timer_start(s_console_disable_rx_timer, seconds * 1000, - prv_console_disable_rx_timer_cb, NULL, 0 /*flags*/); + new_timer_start(s_console_disable_rx_timer, seconds * 1000, prv_console_disable_rx_timer_cb, NULL, + 0 /*flags*/); } #ifdef CONFIG_TOUCH @@ -1520,15 +1520,15 @@ void command_notif_test(void) { AttributeList dismiss_attr = {}; attribute_list_add_cstring(&dismiss_attr, AttributeIdTitle, "Dismiss"); TimelineItemActionGroup action_group = { - .num_actions = 1, - .actions = (TimelineItemAction[]){ - { .id = 0, .type = TimelineItemActionTypeDismiss, .attr_list = dismiss_attr }, - }, + .num_actions = 1, + .actions = (TimelineItemAction[]){ + {.id = 0, .type = TimelineItemActionTypeDismiss, .attr_list = dismiss_attr}, + }, }; - TimelineItem *item = timeline_item_create_with_attributes( - rtc_get_time(), 0, TimelineItemTypeNotification, LayoutIdNotification, &attr_list, - &action_group); + TimelineItem *item = + timeline_item_create_with_attributes(rtc_get_time(), 0, TimelineItemTypeNotification, + LayoutIdNotification, &attr_list, &action_group); attribute_list_destroy_list(&attr_list); attribute_list_destroy_list(&dismiss_attr); notifications_add_notification(item); @@ -1558,8 +1558,7 @@ void command_touch_nav_log(void) { const TouchNavState *state = modal_manager_get_touch_nav_state(); char buf[96]; prompt_send_response_fmt( - buf, sizeof(buf), - "started=%u completed=%u failed=%u cancelled=%u dropped=%u gated=%u", + buf, sizeof(buf), "started=%u completed=%u failed=%u cancelled=%u dropped=%u gated=%u", state->counters.started, state->counters.completed, state->counters.failed, state->counters.cancelled, state->counters.dropped, state->counters.gated); diff --git a/src/fw/console/prompt_commands.h b/src/fw/console/prompt_commands.h index 20c05a55c0..0884fc73d5 100644 --- a/src/fw/console/prompt_commands.h +++ b/src/fw/console/prompt_commands.h @@ -11,19 +11,19 @@ extern void command_help(void); -extern void command_log_level_set(const char*); +extern void command_log_level_set(const char *); extern void command_log_level_get(void); extern void command_log_dump_current(void); extern void command_log_dump_last(void); extern void command_log_dump_spam(void); -extern void command_log_dump_generation(const char*); +extern void command_log_dump_generation(const char *); -extern void command_put_raw_button_event(const char*, const char*); -extern void command_put_button_event(const char*, const char*); -extern void command_button_press(const char*, const char*); +extern void command_put_raw_button_event(const char *, const char *); +extern void command_put_button_event(const char *, const char *); +extern void command_button_press(const char *, const char *); extern void command_button_press_multiple(const char *, const char *, const char *, const char *); -extern void command_button_press_short(const char*); +extern void command_button_press_short(const char *); #ifdef CONFIG_TOUCH extern void command_touch_nav_log(void); extern void command_touch_nav_enable(void); @@ -34,7 +34,7 @@ extern void command_notif_test(void); extern void command_stats_dump_now(void); extern void command_stats_dump_current(void); extern void command_stats_dump_last(void); -extern void command_stats_dump_generation(const char*); +extern void command_stats_dump_generation(const char *); extern void command_crash(void); extern void command_hard_crash(void); @@ -55,17 +55,17 @@ extern void command_dump_malloc_app(void); extern void command_dump_malloc_worker(void); extern void command_dump_malloc_bt(void); -extern void command_read_word(const char*); +extern void command_read_word(const char *); -extern void command_backlight_ctl(const char*); +extern void command_backlight_ctl(const char *); extern void command_light_test(void); extern void command_als_lux(void); #if defined(CONFIG_ALS_SCREEN_COMPENSATION) extern void command_als_curve(void); #endif -extern void command_backlight_set_color(const char*); +extern void command_backlight_set_color(const char *); -extern void command_battery_charge_option(const char*); +extern void command_battery_charge_option(const char *); extern void command_print_battery_status(void); extern void command_compass_peek(void); @@ -74,21 +74,21 @@ extern void command_accel_num_samples(char *num_samples); extern void command_accel_status(void); extern void command_accel_softreset(void); -extern void command_dump_flash(const char*, const char*); -extern void command_crc_flash(const char*, const char*); +extern void command_dump_flash(const char *, const char *); +extern void command_crc_flash(const char *, const char *); extern void command_format_flash(void); -extern void command_erase_flash(const char*, const char*); -extern void command_flash_read(const char*, const char*); -extern void command_flash_switch_mode(const char*); -extern void command_flash_fill(const char*, const char*, const char*); +extern void command_erase_flash(const char *, const char *); +extern void command_flash_read(const char *, const char *); +extern void command_flash_switch_mode(const char *); +extern void command_flash_fill(const char *, const char *, const char *); extern void command_flash_test_locked_sectors(void); extern void command_flash_stress(const char *); extern void command_flash_benchmark(void); extern void command_flash_validate(void); extern void command_flash_apicheck(const char *len); extern void command_flash_unprotect(void); -//extern void command_flash_signal_test_init(void); -//extern void command_flash_signal_test_run(void); +// extern void command_flash_signal_test_init(void); +// extern void command_flash_signal_test_run(void); extern void command_flash_show_erased_sectors(const char *arg); #ifdef CONFIG_OTP_FLASH extern void command_flash_sec_read(const char *); @@ -98,8 +98,8 @@ extern void command_flash_sec_wipe(void); extern void command_flash_sec_info(void); #if defined(CONFIG_RECOVERY_FW) extern void command_flash_sec_lock(const char *, const char *); -#endif // CONFIG_RECOVERY_FW -#endif // CONFIG_OTP_FLASH +#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_OTP_FLASH extern void command_get_time(void); extern void command_set_time(const char *arg); @@ -110,7 +110,7 @@ extern void command_vibe_ctl(const char *arg); // extern void command_print_task_list(void); extern void command_timers(void); -extern void command_bt_airplane_mode(const char*); +extern void command_bt_airplane_mode(const char *); extern void command_bt_prefs_wipe(void); extern void command_bt_print_mac(void); extern void command_bt_set_name(const char *bt_name); @@ -126,13 +126,13 @@ extern void command_bt_status(void); extern void command_get_active_app_metadata(void); extern void command_app_list(void); -extern void command_app_launch(const char* app_num_str); -extern void command_app_remove(const char* app_num_str); +extern void command_app_launch(const char *app_num_str); +extern void command_app_remove(const char *app_num_str); -extern void command_worker_launch(const char* app_num_str); +extern void command_worker_launch(const char *app_num_str); extern void command_worker_kill(void); -extern void command_boot_bit_set(const char* bit, const char* value); +extern void command_boot_bit_set(const char *bit, const char *value); extern void command_boot_bits_get(void); extern void command_window_stack_info(void); @@ -140,7 +140,7 @@ extern void command_modal_stack_info(void); extern void command_animations_info(void); extern void command_legacy2_animations_info(void); -extern void command_sim_panic(const char*); +extern void command_sim_panic(const char *); extern void command_alarm(void); @@ -151,7 +151,7 @@ extern void command_print_now_playing(void); extern void command_enter_mfg(void); extern void command_enter_standby(void); extern void command_enter_consumer_mode(void); -extern void command_power_5v(const char*); +extern void command_power_5v(const char *); extern void command_serial_read(void); extern void command_hwver_read(void); @@ -160,12 +160,12 @@ extern void command_color_read(void); extern void command_rtcfreq_read(void); extern void command_model_read(void); -extern void command_serial_write(const char*); -extern void command_hwver_write(const char*); -extern void command_pcba_serial_write(const char*); -extern void command_color_write(const char*); -extern void command_rtcfreq_write(const char*); -extern void command_model_write(const char*); +extern void command_serial_write(const char *); +extern void command_hwver_write(const char *); +extern void command_pcba_serial_write(const char *); +extern void command_color_write(const char *); +extern void command_rtcfreq_write(const char *); +extern void command_model_write(const char *); extern void command_version_info(void); extern void command_als_read(void); @@ -179,7 +179,7 @@ extern void command_layer_nudge(const char *address); extern void command_scheduler_force_active(void); extern void command_scheduler_resume_normal(void); -extern void command_button_read(const char*); +extern void command_button_read(const char *); extern void memory_layout_dump_mpu_regions_to_dbgserial(void); @@ -220,8 +220,8 @@ extern void command_set_runlevel(const char *runlevel); extern void command_litter_filesystem(const char *s_number, const char *s_size); typedef struct Command { - char* cmd_str; - void* func; + char *cmd_str; + void *func; unsigned int num_params; } Command; @@ -254,14 +254,14 @@ extern void dialog_test_cmds(void); extern void command_dump_notif_pref_db(void); -extern void command_bt_conn_param_set( - char *interval_min_ms, char *interval_max_ms, char *slave_latency, char *timeout_ms); +extern void command_bt_conn_param_set(char *interval_min_ms, char *interval_max_ms, + char *slave_latency, char *timeout_ms); extern void command_bt_disc_start(char *start_handle, char *end_handle); extern void command_bt_disc_stop(void); // Commands to support MFG Bluetooth LE-only testing -extern void command_btle_test_le_tx_start( - char *tx_channel, char *tx_packet_length, char *packet_payload_type); +extern void command_btle_test_le_tx_start(char *tx_channel, char *tx_packet_length, + char *packet_payload_type); extern void command_btle_test_rx_start(char *rx_channel); extern void command_btle_test_end(void); extern void command_btle_pa_set(char *option); @@ -297,264 +297,261 @@ extern void command_display_drop_complete(void); #define KEEP_NON_ESSENTIAL_COMMANDS 1 static const Command s_prompt_commands[] = { - // PULSE entry point, needed for anything PULSE-related to work - { "PULSEv1", pulse_start, 0 }, + // PULSE entry point, needed for anything PULSE-related to work + {"PULSEv1", pulse_start, 0}, #if KEEP_NON_ESSENTIAL_COMMANDS == 1 - // ==================================================================================== - // NOTE: The following commands are used by test automation. - // Disabling/removing them will break testing against those FW builds. - { "click short", command_button_press_short, 1 }, - { "click multiple", command_button_press_multiple, 4 }, - { "click long", command_button_press, 2 }, + // ==================================================================================== + // NOTE: The following commands are used by test automation. + // Disabling/removing them will break testing against those FW builds. + {"click short", command_button_press_short, 1}, + {"click multiple", command_button_press_multiple, 4}, + {"click long", command_button_press, 2}, #ifdef CONFIG_TOUCH - { "touch nav log", command_touch_nav_log, 0 }, - { "touch nav enable", command_touch_nav_enable, 0 }, - { "touch nav disable", command_touch_nav_disable, 0 }, + {"touch nav log", command_touch_nav_log, 0}, + {"touch nav enable", command_touch_nav_enable, 0}, + {"touch nav disable", command_touch_nav_disable, 0}, #ifndef CONFIG_RECOVERY_FW - { "notif test", command_notif_test, 0 }, + {"notif test", command_notif_test, 0}, #endif // CONFIG_RECOVERY_FW #endif - { "reset", command_reset, 0 }, - { "crash", command_crash, 0 }, - { "hard crash", command_hard_crash, 0 }, + {"reset", command_reset, 0}, + {"crash", command_crash, 0}, + {"hard crash", command_hard_crash, 0}, #ifndef CONFIG_RECOVERY_FW - { "factory reset fast", command_factory_reset_fast, 0 }, -#endif - { "factory reset", command_factory_reset, 0 }, - { "set time", command_set_time, 1 }, - { "version", command_version_info, 0 }, - { "boot bit set", command_boot_bit_set, 2 }, - { "window stack", command_window_stack_info, 0 }, - { "modal stack", command_modal_stack_info, 0 }, - { "battery chargeopt", command_battery_charge_option, 1}, - { "bt airplane mode", command_bt_airplane_mode, 1 }, - { "bt prefs wipe", command_bt_prefs_wipe, 0 }, - { "bt mac", command_bt_print_mac, 0 }, - { "bt set name", command_bt_set_name, 1 }, - { "bt cp set", command_bt_conn_param_set, 4 }, - { "bt disc start", command_bt_disc_start, 2 }, - { "bt disc stop", command_bt_disc_stop, 0 }, - { "timezone clear", command_timezone_clear, 0 }, - { "battery status", command_print_battery_status, 0 }, + {"factory reset fast", command_factory_reset_fast, 0}, +#endif + {"factory reset", command_factory_reset, 0}, + {"set time", command_set_time, 1}, + {"version", command_version_info, 0}, + {"boot bit set", command_boot_bit_set, 2}, + {"window stack", command_window_stack_info, 0}, + {"modal stack", command_modal_stack_info, 0}, + {"battery chargeopt", command_battery_charge_option, 1}, + {"bt airplane mode", command_bt_airplane_mode, 1}, + {"bt prefs wipe", command_bt_prefs_wipe, 0}, + {"bt mac", command_bt_print_mac, 0}, + {"bt set name", command_bt_set_name, 1}, + {"bt cp set", command_bt_conn_param_set, 4}, + {"bt disc start", command_bt_disc_start, 2}, + {"bt disc stop", command_bt_disc_stop, 0}, + {"timezone clear", command_timezone_clear, 0}, + {"battery status", command_print_battery_status, 0}, #ifndef CONFIG_RELEASE - { "audit delay", command_audit_delay_us, 0 }, + {"audit delay", command_audit_delay_us, 0}, #endif #ifndef CONFIG_RECOVERY_FW - { "app list", command_app_list, 0 }, - { "app launch", command_app_launch, 1 }, - { "app remove", command_app_remove, 1 }, + {"app list", command_app_list, 0}, + {"app launch", command_app_launch, 1}, + {"app remove", command_app_remove, 1}, #endif - // End of automation commands - // ==================================================================================== + // End of automation commands + // ==================================================================================== - { "erase flash", command_erase_flash, 2 }, - { "crc flash", command_crc_flash, 2 }, + {"erase flash", command_erase_flash, 2}, + {"crc flash", command_crc_flash, 2}, #ifndef CONFIG_RECOVERY_FW - { "temp read", command_temperature_read, 0 }, - { "als read", command_als_read, 0}, - { "als lux", command_als_lux, 0}, - { "light test", command_light_test, 0}, + {"temp read", command_temperature_read, 0}, + {"als read", command_als_read, 0}, + {"als lux", command_als_lux, 0}, + {"light test", command_light_test, 0}, #if defined(CONFIG_ALS_SCREEN_COMPENSATION) - { "als curve", command_als_curve, 0}, + {"als curve", command_als_curve, 0}, #endif #ifndef CONFIG_RELEASE - { "litter pfs", command_litter_filesystem, 2 }, + {"litter pfs", command_litter_filesystem, 2}, #endif #endif - // ==================================================================================== - // Following commands are used for manufacturing. We use a PRF firmware for manufacturing, so - // we can only include these commands when we're building for PRF. Some of the commands are - // specific to snowy manufacturing as well +// ==================================================================================== +// Following commands are used for manufacturing. We use a PRF firmware for manufacturing, so +// we can only include these commands when we're building for PRF. Some of the commands are +// specific to snowy manufacturing as well #ifdef CONFIG_RECOVERY_FW - { "info", command_version_info, 0 }, + {"info", command_version_info, 0}, - { "enter mfg", command_enter_mfg, 0 }, + {"enter mfg", command_enter_mfg, 0}, - { "enter standby", command_enter_standby, 0 }, + {"enter standby", command_enter_standby, 0}, - { "enter consumer", command_enter_consumer_mode, 0 }, + {"enter consumer", command_enter_consumer_mode, 0}, - { "serial read", command_serial_read, 0 }, - { "hwver read", command_hwver_read, 0 }, - { "pcbaserial read", command_pcba_serial_read, 0 }, - { "color read", command_color_read, 0 }, - { "rtcfreq read", command_rtcfreq_read, 0 }, - { "model read", command_model_read, 0 }, + {"serial read", command_serial_read, 0}, + {"hwver read", command_hwver_read, 0}, + {"pcbaserial read", command_pcba_serial_read, 0}, + {"color read", command_color_read, 0}, + {"rtcfreq read", command_rtcfreq_read, 0}, + {"model read", command_model_read, 0}, #ifdef CONFIG_OTP_FLASH - { "flash sec lock", command_flash_sec_lock, 2}, -#endif // CONFIG_OTP_FLASH + {"flash sec lock", command_flash_sec_lock, 2}, +#endif // CONFIG_OTP_FLASH - { "serial write", command_serial_write, 1 }, - { "hwver write", command_hwver_write, 1 }, - { "pcbaserial write", command_pcba_serial_write, 1 }, + {"serial write", command_serial_write, 1}, + {"hwver write", command_hwver_write, 1}, + {"pcbaserial write", command_pcba_serial_write, 1}, #ifdef CONFIG_MFG - { "color write", command_color_write, 1 }, - { "rtcfreq write", command_rtcfreq_write, 1 }, - { "model write", command_model_write, 1 }, -#endif // CONFIG_MFG + {"color write", command_color_write, 1}, + {"rtcfreq write", command_rtcfreq_write, 1}, + {"model write", command_model_write, 1}, +#endif // CONFIG_MFG - { "bt status", command_bt_status, 0 }, + {"bt status", command_bt_status, 0}, - { "button read", command_button_read, 1 }, + {"button read", command_button_read, 1}, #ifdef CONFIG_MAG - { "compass peek", command_compass_peek, 0 }, + {"compass peek", command_compass_peek, 0}, #endif - { "accel read", command_accel_peek, 0 }, + {"accel read", command_accel_peek, 0}, - { "als read", command_als_read, 0}, + {"als read", command_als_read, 0}, - { "flash read", command_flash_read, 2}, - { "flash switchmode", command_flash_switch_mode, 1}, - { "flash fill", command_flash_fill, 3}, - { "flash validate", command_flash_validate, 0}, - { "flash erased_sectors", command_flash_show_erased_sectors, 1}, + {"flash read", command_flash_read, 2}, + {"flash switchmode", command_flash_switch_mode, 1}, + {"flash fill", command_flash_fill, 3}, + {"flash validate", command_flash_validate, 0}, + {"flash erased_sectors", command_flash_show_erased_sectors, 1}, #ifdef CONFIG_OTP_FLASH - { "flash sec read", command_flash_sec_read, 1}, - { "flash sec write", command_flash_sec_write, 2}, - { "flash sec erase", command_flash_sec_erase, 1}, - { "flash sec wipe", command_flash_sec_wipe, 0}, - { "flash sec info", command_flash_sec_info, 0}, -#endif // CONFIG_OTP_FLASH + {"flash sec read", command_flash_sec_read, 1}, + {"flash sec write", command_flash_sec_write, 2}, + {"flash sec erase", command_flash_sec_erase, 1}, + {"flash sec wipe", command_flash_sec_wipe, 0}, + {"flash sec info", command_flash_sec_info, 0}, +#endif // CONFIG_OTP_FLASH - //{ "pmic rails", command_pmic_rails, 0}, +//{ "pmic rails", command_pmic_rails, 0}, #ifdef CONFIG_MFG - { "disp", command_display_set, 1}, + {"disp", command_display_set, 1}, #endif -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW #ifdef CONFIG_HRM - { "hrm read", command_hrm_read, 0}, + {"hrm read", command_hrm_read, 0}, #endif #ifdef CONFIG_PMIC - {"pmic regs", command_pmic_read_registers, 0}, + {"pmic regs", command_pmic_read_registers, 0}, #endif #ifdef CONFIG_MIC - { "mic start", command_mic_start, 4}, - { "mic read", command_mic_read, 0}, + {"mic start", command_mic_start, 4}, + {"mic read", command_mic_read, 0}, #endif + // End of manufacturing commands + // ==================================================================================== - // End of manufacturing commands - // ==================================================================================== - + // The rest of the commands are pretty much a misc free-for-all of functionality that's useful + // for debugging. - // The rest of the commands are pretty much a misc free-for-all of functionality that's useful - // for debugging. + // Meta + {"help", command_help, 0}, - // Meta - { "help", command_help, 0 }, + {"scheduler force active", command_scheduler_force_active, 0}, + {"scheduler resume normal", command_scheduler_resume_normal, 0}, - { "scheduler force active", command_scheduler_force_active, 0 }, - { "scheduler resume normal", command_scheduler_resume_normal, 0 }, + {"log level set", command_log_level_set, 1}, + {"log level get", command_log_level_get, 0}, - { "log level set", command_log_level_set, 1 }, - { "log level get", command_log_level_get, 0 }, + {"log dump current", command_log_dump_current, 0}, + {"log dump last", command_log_dump_last, 0}, + {"log spam", command_log_dump_spam, 0}, + {"log dump gen", command_log_dump_generation, 1}, - { "log dump current", command_log_dump_current, 0 }, - { "log dump last", command_log_dump_last, 0 }, - { "log spam", command_log_dump_spam, 0 }, - { "log dump gen", command_log_dump_generation, 1 }, + {"ble mode", command_change_le_mode, 1}, + {"ble ind svc", command_ble_send_service_changed_indication, 0}, + {"ble rediscover", command_ble_rediscover, 0}, + {"ble set log level", command_ble_logging_set_level, 1}, + {"ble get log level", command_ble_logging_get_level, 0}, + {"ble host reset", command_ble_host_reset, 0}, - { "ble mode", command_change_le_mode, 1 }, - { "ble ind svc", command_ble_send_service_changed_indication, 0 }, - { "ble rediscover", command_ble_rediscover, 0 }, - { "ble set log level", command_ble_logging_set_level, 1}, - { "ble get log level", command_ble_logging_get_level, 0}, - { "ble host reset", command_ble_host_reset, 0}, + /* + { "stats dump now", command_stats_dump_now, 0 }, + { "stats dump current", command_stats_dump_current, 0 }, + { "stats dump last", command_stats_dump_last, 0 }, + { "stats dump generation", command_stats_dump_generation, 1 }, + */ - /* - { "stats dump now", command_stats_dump_now, 0 }, - { "stats dump current", command_stats_dump_current, 0 }, - { "stats dump last", command_stats_dump_last, 0 }, - { "stats dump generation", command_stats_dump_generation, 1 }, - */ + // Buttons + {"raw button event", command_put_raw_button_event, 2}, + // { "click button event", command_put_button_event, 2 }, - // Buttons - { "raw button event", command_put_raw_button_event, 2 }, - // { "click button event", command_put_button_event, 2 }, + // General utils + // { "boot prf", command_boot_prf, 0 }, - // General utils - // { "boot prf", command_boot_prf, 0 }, - - /* - { "infinite loop", command_infinite_loop, 0 }, - { "assert fail", command_assert_fail, 0 }, - { "stuck timer", command_stuck_timer, 0 }, - { "hard fault", command_hardfault, 0 }, - */ - { "croak", command_croak, 0 }, + /* + { "infinite loop", command_infinite_loop, 0 }, + { "assert fail", command_assert_fail, 0 }, + { "stuck timer", command_stuck_timer, 0 }, + { "hard fault", command_hardfault, 0 }, + */ + {"croak", command_croak, 0}, #ifdef CONFIG_MALLOC_INSTRUMENTATION - { "dump malloc kernel", command_dump_malloc_kernel, 0 }, - { "dump malloc app", command_dump_malloc_app, 0 }, - { "dump malloc worker", command_dump_malloc_worker, 0 }, + {"dump malloc kernel", command_dump_malloc_kernel, 0}, + {"dump malloc app", command_dump_malloc_app, 0}, + {"dump malloc worker", command_dump_malloc_worker, 0}, #endif /* CONFIG_MALLOC_INSTRUMENTATION */ - /* - { "read word", command_read_word, 1 }, +/* +{ "read word", command_read_word, 1 }, - { "remote os", command_get_connected_os, 0 }, - */ +{ "remote os", command_get_connected_os, 0 }, +*/ #ifdef CONFIG_UI_DEBUG - { "window dump", command_dump_window, 0 }, - { "layer nudge", command_layer_nudge, 1 }, + {"window dump", command_dump_window, 0}, + {"layer nudge", command_layer_nudge, 1}, #endif - { "backlight level", command_backlight_ctl, 1 }, + {"backlight level", command_backlight_ctl, 1}, #ifdef CONFIG_BACKLIGHT_HAS_COLOR - // Drivers - { "backlight color", command_backlight_set_color, 1 }, + // Drivers + {"backlight color", command_backlight_set_color, 1}, #endif -// { "watch", command_watch, 0 }, + // { "watch", command_watch, 0 }, - // Flash manipulation commands - { "dump flash", command_dump_flash, 2 }, - // { "format flash", command_format_flash, 0 }, + // Flash manipulation commands + {"dump flash", command_dump_flash, 2}, + // { "format flash", command_format_flash, 0 }, - { "flash unprotect", command_flash_unprotect, 0 }, + {"flash unprotect", command_flash_unprotect, 0}, #ifndef CONFIG_RECOVERY_FW - { "worker launch", command_worker_launch, 1 }, - { "worker kill", command_worker_kill, 0}, + {"worker launch", command_worker_launch, 1}, + {"worker kill", command_worker_kill, 0}, #endif #ifdef TEST_FLASH_LOCK_PROTECTION - { "flash lock test", command_flash_test_locked_sectors, 0 }, + {"flash lock test", command_flash_test_locked_sectors, 0}, #endif - /* - { "get time", command_get_time, 0 }, - */ - - // Firmware specific - //{ "task-list", command_print_task_list, 0 }, + /* + { "get time", command_get_time, 0 }, + */ - { "cpustats", dump_current_runtime_stats, 0 }, - //{ "bt prefs get", command_get_remote_prefs, 0 }, - //{ "bt prefs del", command_del_remote_pref, 1 }, - //{ "bt sniff bounce", command_bt_sniff_bounce, 0 }, - //{ "bt active enter", command_bt_active_enter, 0 }, - //{ "bt active exit", command_bt_active_exit, 0 }, + // Firmware specific + //{ "task-list", command_print_task_list, 0 }, + {"cpustats", dump_current_runtime_stats, 0}, +//{ "bt prefs get", command_get_remote_prefs, 0 }, +//{ "bt prefs del", command_del_remote_pref, 1 }, +//{ "bt sniff bounce", command_bt_sniff_bounce, 0 }, +//{ "bt active enter", command_bt_active_enter, 0 }, +//{ "bt active exit", command_bt_active_exit, 0 }, #if !defined(CONFIG_RECOVERY_FW) - { "get active app metadata", command_get_active_app_metadata, 0 }, + {"get active app metadata", command_get_active_app_metadata, 0}, #endif -// { "boot bits get", command_boot_bits_get, 0 }, + // { "boot bits get", command_boot_bits_get, 0 }, - { "animations", command_animations_info, 0 }, - { "pause animations", command_pause_animations, 0 }, - { "resume animations", command_resume_animations, 0 }, + {"animations", command_animations_info, 0}, + {"pause animations", command_pause_animations, 0}, + {"resume animations", command_resume_animations, 0}, // { "animations_l2", command_legacy2_animations_info, 0 }, @@ -563,52 +560,52 @@ static const Command s_prompt_commands[] = { // #endif #if !defined(CONFIG_RECOVERY_FW) - { "alarm", command_alarm, 0 }, + {"alarm", command_alarm, 0}, - //{ "now playing", command_print_now_playing, 0 }, + //{ "now playing", command_print_now_playing, 0 }, - { "dls list", command_dls_list, 0 }, - // { "dls show", command_dls_show, 1 }, - { "dls wipe", command_dls_erase_all, 0 }, - { "dls send", command_dls_send_all, 0 }, + {"dls list", command_dls_list, 0}, + // { "dls show", command_dls_show, 1 }, + {"dls wipe", command_dls_erase_all, 0}, + {"dls send", command_dls_send_all, 0}, -#endif // !defined(CONFIG_RECOVERY_FW) +#endif // !defined(CONFIG_RECOVERY_FW) - { "dump mpu", memory_layout_dump_mpu_regions_to_dbgserial, 0 }, + {"dump mpu", memory_layout_dump_mpu_regions_to_dbgserial, 0}, #ifndef CONFIG_RECOVERY_FW - {"pfs format", pfs_command_fs_format, 1}, - {"pfs ls", pfs_command_fs_ls, 0}, - // {"pfs cat", pfs_command_cat, 2}, - // {"pfs rmall", pfs_remove_all, 0}, - {"pfs rm", pfs_remove, 1}, - {"pfs hdr", pfs_command_dump_hdr, 1}, - // {"pfs stress", pfs_command_stress, 0 }, - {"pfs crc", pfs_command_crc, 1}, + {"pfs format", pfs_command_fs_format, 1}, + {"pfs ls", pfs_command_fs_ls, 0}, + // {"pfs cat", pfs_command_cat, 2}, + // {"pfs rmall", pfs_remove_all, 0}, + {"pfs rm", pfs_remove, 1}, + {"pfs hdr", pfs_command_dump_hdr, 1}, + // {"pfs stress", pfs_command_stress, 0 }, + {"pfs crc", pfs_command_crc, 1}, - // This command is dangerous to your flash. Be careful. - {"flash stress", command_flash_stress, 1 }, - {"flash benchmark", command_flash_benchmark, 0 }, + // This command is dangerous to your flash. Be careful. + {"flash stress", command_flash_stress, 1}, + {"flash benchmark", command_flash_benchmark, 0}, #endif - { "ping", command_ping_send, 0}, + {"ping", command_ping_send, 0}, - { "runlevel", command_set_runlevel, 1 }, + {"runlevel", command_set_runlevel, 1}, #if defined(CONFIG_PROFILER) - { "profiler start", command_profiler_start, 0 }, - { "profiler stop", command_profiler_stop, 0 }, - { "profiler stats", command_profiler_stats, 0 }, + {"profiler start", command_profiler_start, 0}, + {"profiler stop", command_profiler_stop, 0}, + {"profiler stats", command_profiler_stats, 0}, #endif #if (LOG_DOMAIN_BT_PAIRING_INFO != 0) - // Note to future codespace saver ... this is on by default for debug builds - // Removing it will save ~2400 bytes but it is super useful for BT bringup debug! - { "gapdb dump", command_gapdb_dump, 0 }, - { "sprf nuke", command_bt_sprf_nuke, 0 }, + // Note to future codespace saver ... this is on by default for debug builds + // Removing it will save ~2400 bytes but it is super useful for BT bringup debug! + {"gapdb dump", command_gapdb_dump, 0}, + {"sprf nuke", command_bt_sprf_nuke, 0}, #if !defined(CONFIG_RECOVERY_FW) - { "sprf sync", command_force_shared_prf_flush, 0}, -#endif // !defined(CONFIG_RECOVERY_FW) + {"sprf sync", command_force_shared_prf_flush, 0}, +#endif // !defined(CONFIG_RECOVERY_FW) #endif #if 0 @@ -617,33 +614,33 @@ static const Command s_prompt_commands[] = { { "battui dismiss", command_battery_ui_dismiss, 0 }, #endif - { "waste time", command_waste_time, 2 }, + {"waste time", command_waste_time, 2}, #if !defined(CONFIG_RECOVERY_FW) - { "dump notif_pref_db", command_dump_notif_pref_db, 0 }, + {"dump notif_pref_db", command_dump_notif_pref_db, 0}, #endif #ifdef CONFIG_PERFORMANCE_TESTS - { "perftest all line", command_perftest_line_all, 0 }, - { "perftest all text", command_perftest_text_all, 0 }, - { "perftest line", command_perftest_line, 2 }, - { "perftest text", command_perftest_text, 3 }, + {"perftest all line", command_perftest_line_all, 0}, + {"perftest all text", command_perftest_text_all, 0}, + {"perftest line", command_perftest_line, 2}, + {"perftest text", command_perftest_text, 3}, #endif -#endif // KEEP_NON_ESSENTIAL_COMMANDS +#endif // KEEP_NON_ESSENTIAL_COMMANDS - { "vibe", command_vibe_ctl, 1 }, - { "console disable rx", command_console_disable_rx, 1 }, + {"vibe", command_vibe_ctl, 1}, + {"console disable rx", command_console_disable_rx, 1}, #ifdef CONFIG_SOC_SF32LB52 - { "force wfi", command_force_wfi, 1 }, + {"force wfi", command_force_wfi, 1}, #endif #if !defined(CONFIG_RELEASE) && defined(CONFIG_DISPLAY_JDI_SF32LB) - { "display drop_complete", command_display_drop_complete, 0 }, + {"display drop_complete", command_display_drop_complete, 0}, #endif #if ANALYTICS_NATIVE - { "analytics native metrics_dump", command_analytics_native_metrics_dump, 0 }, + {"analytics native metrics_dump", command_analytics_native_metrics_dump, 0}, #endif - { "analytics heartbeat", command_analytics_heartbeat, 0 }, + {"analytics heartbeat", command_analytics_heartbeat, 0}, }; #define NUM_PROMPT_COMMANDS ARRAY_LENGTH(s_prompt_commands) diff --git a/src/fw/console/pulse.c b/src/fw/console/pulse.c index 4cd19f8016..871128d6a5 100644 --- a/src/fw/console/pulse.c +++ b/src/fw/console/pulse.c @@ -31,7 +31,6 @@ #define FRAME_DELIMITER '\0' #define LINK_HEADER_LEN (1) - typedef struct IncomingPulseFrame { uint16_t length; bool taken; @@ -45,8 +44,8 @@ static CobsDecodeContext s_frame_decode_ctx; static bool s_drop_rest_of_frame; static PBL_MUTEX_DEFINE(s_tx_buffer_mutex); -static char s_tx_buffer[MAX_SIZE_AFTER_COBS_ENCODING( - PULSE_MAX_SEND_SIZE + PULSE_MIN_FRAME_LENGTH) + COBS_OVERHEAD(PULSE_MAX_SEND_SIZE)]; +static char s_tx_buffer[MAX_SIZE_AFTER_COBS_ENCODING(PULSE_MAX_SEND_SIZE + PULSE_MIN_FRAME_LENGTH) + + COBS_OVERHEAD(PULSE_MAX_SEND_SIZE)]; typedef void (*ProtocolHandlerFunc)(void *packet, size_t length); typedef void (*LinkStateChangedHandlerFunc)(PulseLinkState link_state); @@ -58,25 +57,19 @@ typedef struct PACKED ProtocolHandler { } ProtocolHandler; static const ProtocolHandler s_supported_protocols[] = { -#define REGISTER_PROTOCOL(n, f1, f2) { \ - .number = (n), \ - .handler = (f1), \ - .link_state_handler = (f2) \ - }, +#define REGISTER_PROTOCOL(n, f1, f2) {.number = (n), .handler = (f1), .link_state_handler = (f2)}, #include "console/pulse_protocol_registry.def" #undef REGISTER_PROTOCOL }; static TimerID s_keepalive_timer = TIMER_INVALID_ID; - static void prv_reset_receive_buffer(IncomingPulseFrame *buf) { buf->length = 0; - cobs_streaming_decode_start(&s_frame_decode_ctx, &buf->data, - sizeof(buf->data)); + cobs_streaming_decode_start(&s_frame_decode_ctx, &buf->data, sizeof(buf->data)); } -static IncomingPulseFrame* prv_take_receive_buffer(void) { +static IncomingPulseFrame *prv_take_receive_buffer(void) { IncomingPulseFrame *buf = NULL; for (unsigned int i = 0; i < ARRAY_LENGTH(s_receive_buffers); ++i) { if (s_receive_buffers[i]->taken == false) { @@ -99,11 +92,8 @@ static void prv_keepalive_timeout_expired(void *data) { static void prv_reset_keepalive_timer(void) { if (s_keepalive_timer) { - new_timer_start(s_keepalive_timer, - PULSE_KEEPALIVE_TIMEOUT_DECISECONDS * 100, - prv_keepalive_timeout_expired, - NULL, - TIMER_START_FLAG_FAIL_IF_EXECUTING); + new_timer_start(s_keepalive_timer, PULSE_KEEPALIVE_TIMEOUT_DECISECONDS * 100, + prv_keepalive_timeout_expired, NULL, TIMER_START_FLAG_FAIL_IF_EXECUTING); } } @@ -158,8 +148,7 @@ static void prv_process_received_frame(void *frame_ptr) { uint32_t fcs; // Comply with strict aliasing rules. The memcpy is optimized away. memcpy(&fcs, &frame->data[frame->length - sizeof(fcs)], sizeof(fcs)); - uint32_t crc = legacy_defective_checksum_memory( - &frame->data, frame->length - sizeof(fcs)); + uint32_t crc = legacy_defective_checksum_memory(&frame->data, frame->length - sizeof(fcs)); if (fcs == crc) { prv_reset_keepalive_timer(); @@ -168,16 +157,14 @@ static void prv_process_received_frame(void *frame_ptr) { for (unsigned int i = 0; i < ARRAY_LENGTH(s_supported_protocols); ++i) { if (s_supported_protocols[i].number == protocol) { protocol_found = true; - s_supported_protocols[i].handler( - &frame->data[sizeof(protocol)], - frame->length - sizeof(protocol) - sizeof(fcs)); + s_supported_protocols[i].handler(&frame->data[sizeof(protocol)], + frame->length - sizeof(protocol) - sizeof(fcs)); break; } } if (!protocol_found) { - pulse_llc_unknown_protocol_handler( - protocol, &frame->data[sizeof(protocol)], - frame->length - sizeof(protocol) - sizeof(fcs)); + pulse_llc_unknown_protocol_handler(protocol, &frame->data[sizeof(protocol)], + frame->length - sizeof(protocol) - sizeof(fcs)); } } prv_return_receive_buffer(frame); @@ -211,8 +198,7 @@ void pulse_handle_character(char c, bool *should_context_switch) { if (decoded_length >= PULSE_MIN_FRAME_LENGTH && decoded_length < SIZE_MAX) { // Potentially valid frame; queue up for further processing. s_current_receive_buffer->length = decoded_length; - system_task_add_callback_from_isr(prv_process_received_frame, - s_current_receive_buffer, + system_task_add_callback_from_isr(prv_process_received_frame, s_current_receive_buffer, should_context_switch); // Prepare to receive the next character. s_current_receive_buffer = prv_take_receive_buffer(); @@ -223,8 +209,7 @@ void pulse_handle_character(char c, bool *should_context_switch) { } else if (s_drop_rest_of_frame) { // The frame has already been found to be bad and we haven't yet // seen the start of the next frame. - } else if (UNLIKELY(s_current_receive_buffer->length >= - sizeof(s_current_receive_buffer->data))) { + } else if (UNLIKELY(s_current_receive_buffer->length >= sizeof(s_current_receive_buffer->data))) { // Frame too long; invalid. s_drop_rest_of_frame = true; prv_reset_receive_buffer(s_current_receive_buffer); @@ -248,10 +233,10 @@ void pulse_best_effort_send(void *buf, const size_t payload_length) { PBL_ASSERT(payload_length <= PULSE_MAX_SEND_SIZE, "PULSE frame payload too long"); // Rewind the pointer to the beginning of the buffer - char *frame = ((char *) buf) - COBS_OVERHEAD(PULSE_MAX_SEND_SIZE) - LINK_HEADER_LEN; + char *frame = ((char *)buf) - COBS_OVERHEAD(PULSE_MAX_SEND_SIZE) - LINK_HEADER_LEN; size_t length = LINK_HEADER_LEN + payload_length; - uint32_t fcs = legacy_defective_checksum_memory( - frame + COBS_OVERHEAD(PULSE_MAX_SEND_SIZE), length); + uint32_t fcs = + legacy_defective_checksum_memory(frame + COBS_OVERHEAD(PULSE_MAX_SEND_SIZE), length); memcpy(&frame[length + COBS_OVERHEAD(PULSE_MAX_SEND_SIZE)], &fcs, sizeof(fcs)); length += sizeof(fcs); diff --git a/src/fw/console/pulse2.c b/src/fw/console/pulse2.c index 537f79b379..6803da5725 100644 --- a/src/fw/console/pulse2.c +++ b/src/fw/console/pulse2.c @@ -70,18 +70,15 @@ static void prv_on_lcp_down(PPPControlProtocol *this) { #undef ON_LINK_STATE_CHANGE } -static void prv_on_code_reject(PPPControlProtocol *this, - struct LCPPacket *packet) { +static void prv_on_code_reject(PPPControlProtocol *this, struct LCPPacket *packet) { // TODO } -static void prv_on_protocol_reject(PPPControlProtocol *this, - struct LCPPacket *packet) { +static void prv_on_protocol_reject(PPPControlProtocol *this, struct LCPPacket *packet) { // TODO } -static void prv_on_echo_request(PPPControlProtocol *this, - struct LCPPacket *packet) { +static void prv_on_echo_request(PPPControlProtocol *this, struct LCPPacket *packet) { if (this->state->link_state == LinkState_Opened) { struct LCPPacket *reply = pulse_link_send_begin(this->protocol_number); memcpy(reply, packet, ntoh16(packet->length)); @@ -90,13 +87,11 @@ static void prv_on_echo_request(PPPControlProtocol *this, } } -static void prv_on_echo_reply(PPPControlProtocol *this, - struct LCPPacket *packet) { +static void prv_on_echo_reply(PPPControlProtocol *this, struct LCPPacket *packet) { // TODO } -static bool prv_handle_extended_lcp_codes(PPPControlProtocol *this, - LCPPacket *packet) { +static bool prv_handle_extended_lcp_codes(PPPControlProtocol *this, LCPPacket *packet) { switch (packet->code) { case ControlCode_ProtocolReject: prv_on_protocol_reject(this, packet); @@ -117,18 +112,17 @@ static bool prv_handle_extended_lcp_codes(PPPControlProtocol *this, static PPPControlProtocolState s_lcp_state = {}; static PPPControlProtocol s_lcp_protocol = { - .protocol_number = LCP_PROTOCOL_NUMBER, - .state = &s_lcp_state, - .on_this_layer_up = prv_on_lcp_up, - .on_this_layer_down = prv_on_lcp_down, - .on_receive_code_reject = prv_on_code_reject, - .on_receive_unrecognized_code = prv_handle_extended_lcp_codes, + .protocol_number = LCP_PROTOCOL_NUMBER, + .state = &s_lcp_state, + .on_this_layer_up = prv_on_lcp_up, + .on_this_layer_down = prv_on_lcp_down, + .on_receive_code_reject = prv_on_code_reject, + .on_receive_unrecognized_code = prv_handle_extended_lcp_codes, }; -PPPControlProtocol * const PULSE2_LCP = &s_lcp_protocol; +PPPControlProtocol *const PULSE2_LCP = &s_lcp_protocol; -static void prv_lcp_handle_unknown_protocol(uint16_t protocol, void *body, - size_t body_len) { +static void prv_lcp_handle_unknown_protocol(uint16_t protocol, void *body, size_t body_len) { // TODO: send Protocol-Reject } @@ -155,8 +149,8 @@ static volatile bool s_pulse_task_idle = true; static uint8_t s_current_rx_frame[RX_MAX_FRAME_SIZE]; static PBL_MUTEX_DEFINE(s_tx_buffer_mutex); -static char s_tx_buffer[MAX_SIZE_AFTER_COBS_ENCODING( - FRAME_MAX_SEND_SIZE + PULSE_MIN_FRAME_LENGTH) + COBS_OVERHEAD(FRAME_MAX_SEND_SIZE)]; +static char s_tx_buffer[MAX_SIZE_AFTER_COBS_ENCODING(FRAME_MAX_SEND_SIZE + PULSE_MIN_FRAME_LENGTH) + + COBS_OVERHEAD(FRAME_MAX_SEND_SIZE)]; // Lock for exclusive access to the reliable timer state. static PBL_MUTEX_DEFINE(s_reliable_timer_state_lock); @@ -182,9 +176,9 @@ static void prv_process_received_frame(size_t frame_length) { prv_lcp_on_packet(body, body_len); break; #define ON_PACKET(NUMBER, HANDLER) \ - case NUMBER: \ - HANDLER(body, body_len); \ - break; + case NUMBER: \ + HANDLER(body, body_len); \ + break; #define ON_INIT(...) #define ON_LINK_STATE_CHANGE(...) #include "console/pulse2_transport_registry.def" @@ -197,8 +191,7 @@ static void prv_process_received_frame(size_t frame_length) { } } -void pulse2_reliable_retransmit_timer_start(unsigned int timeout_ms, - uint8_t sequence_number) { +void pulse2_reliable_retransmit_timer_start(unsigned int timeout_ms, uint8_t sequence_number) { pbl_mutex_lock(&s_reliable_timer_state_lock, PBL_FOREVER); RtcTicks timeout_ticks = timeout_ms * RTC_TICKS_HZ / 1000; s_reliable_timer_expiry_time_tick = rtc_get_ticks() + timeout_ticks; @@ -251,7 +244,7 @@ static void prv_pulse_task_feed_watchdog(void) { task_watchdog_bit_set(PebbleTask_PULSE); } -static void prv_pulse_task_idle_timer_callback(void* data) { +static void prv_pulse_task_idle_timer_callback(void *data) { if (s_pulse_task_idle && pbl_msgq_num_used(&s_pulse_task_queue) == 0) { prv_pulse_task_feed_watchdog(); } @@ -260,14 +253,11 @@ static void prv_pulse_task_idle_timer_callback(void* data) { static void prv_pulse_task_main(void *unused) { task_watchdog_mask_set(PebbleTask_PULSE); - static RegularTimerInfo idle_watchdog_timer = { - .cb = prv_pulse_task_idle_timer_callback - }; + static RegularTimerInfo idle_watchdog_timer = {.cb = prv_pulse_task_idle_timer_callback}; regular_timer_add_seconds_callback(&idle_watchdog_timer); CobsDecodeContext frame_decode_ctx; - cobs_streaming_decode_start(&frame_decode_ctx, s_current_rx_frame, - RX_MAX_FRAME_SIZE); + cobs_streaming_decode_start(&frame_decode_ctx, s_current_rx_frame, RX_MAX_FRAME_SIZE); while (true) { uint8_t timer_sequence_number; @@ -290,8 +280,7 @@ static void prv_pulse_task_main(void *unused) { if (UNLIKELY(c == FRAME_DELIMITER)) { size_t decoded_length = cobs_streaming_decode_finish(&frame_decode_ctx); prv_process_received_frame(decoded_length); - cobs_streaming_decode_start(&frame_decode_ctx, s_current_rx_frame, - RX_MAX_FRAME_SIZE); + cobs_streaming_decode_start(&frame_decode_ctx, s_current_rx_frame, RX_MAX_FRAME_SIZE); // Break out after processing one complete frame so that we handle // the timer and kick the watchdog within a reasonable amount of // time, even if the queue is filling as fast as we can drain it. @@ -318,10 +307,10 @@ static void prv_forge_terminate_ack(void) { // API since we need to send these packets from precarious situations // when the OS and PULSE may not have been initialized yet. uint8_t *packet = pulse_link_send_begin(LCP_PROTOCOL_NUMBER); - packet[0] = 6; // Code: Terminate-Ack + packet[0] = 6; // Code: Terminate-Ack packet[1] = 255; // Identifier - packet[2] = 0; // Length MSB - packet[3] = 4; // Length LSB + packet[2] = 0; // Length MSB + packet[3] = 4; // Length LSB pulse_link_send(packet, 4); } @@ -336,12 +325,12 @@ void pulse_init(void) { void pulse_start(void) { struct pbl_thread_attr attr = { - .name = "PULSE", - .entry = prv_pulse_task_main, - .prio = PBL_PRIO_IDLE + 3, - .privileged = true, - .stack = s_pulse_task_stack, - .stack_size = sizeof(s_pulse_task_stack), + .name = "PULSE", + .entry = prv_pulse_task_main, + .prio = PBL_PRIO_IDLE + 3, + .privileged = true, + .stack = s_pulse_task_stack, + .stack_size = sizeof(s_pulse_task_stack), }; s_pulse_task_handle = pebble_task_create(PebbleTask_PULSE, &attr); @@ -384,8 +373,7 @@ void pulse_handle_character(char c, bool *should_context_switch) { } static bool prv_safe_to_touch_mutex(void) { - return !(pbl_irq_is_locked() || mcu_state_is_isr() || - !pbl_kernel_is_running()); + return !(pbl_irq_is_locked() || mcu_state_is_isr() || !pbl_kernel_is_running()); } void *pulse_link_send_begin(const uint16_t protocol) { @@ -394,8 +382,7 @@ void *pulse_link_send_begin(const uint16_t protocol) { } net16 header = hton16(protocol); - memcpy(s_tx_buffer + COBS_OVERHEAD(FRAME_MAX_SEND_SIZE), - &header, sizeof(header)); + memcpy(s_tx_buffer + COBS_OVERHEAD(FRAME_MAX_SEND_SIZE), &header, sizeof(header)); return s_tx_buffer + COBS_OVERHEAD(FRAME_MAX_SEND_SIZE) + sizeof(header); } @@ -404,10 +391,9 @@ void pulse_link_send(void *buf, const size_t payload_length) { PBL_ASSERT(payload_length <= FRAME_MAX_SEND_SIZE, "PULSE frame payload too long"); // Rewind the pointer to the beginning of the buffer - char *frame = ((char *) buf) - COBS_OVERHEAD(FRAME_MAX_SEND_SIZE) - LINK_HEADER_LEN; + char *frame = ((char *)buf) - COBS_OVERHEAD(FRAME_MAX_SEND_SIZE) - LINK_HEADER_LEN; size_t length = LINK_HEADER_LEN + payload_length; - uint32_t fcs = crc32(CRC32_INIT, frame + COBS_OVERHEAD(FRAME_MAX_SEND_SIZE), - length); + uint32_t fcs = crc32(CRC32_INIT, frame + COBS_OVERHEAD(FRAME_MAX_SEND_SIZE), length); memcpy(&frame[length + COBS_OVERHEAD(FRAME_MAX_SEND_SIZE)], &fcs, sizeof(fcs)); length += sizeof(fcs); diff --git a/src/fw/console/pulse2_reliable_retransmit_timer.h b/src/fw/console/pulse2_reliable_retransmit_timer.h index a2753c08bd..c58378c78d 100644 --- a/src/fw/console/pulse2_reliable_retransmit_timer.h +++ b/src/fw/console/pulse2_reliable_retransmit_timer.h @@ -8,8 +8,7 @@ #include //! Start or restart the PULSEv2 reliable transport retransmit timer. -void pulse2_reliable_retransmit_timer_start( - unsigned int timeout_ms, uint8_t sequence_number); +void pulse2_reliable_retransmit_timer_start(unsigned int timeout_ms, uint8_t sequence_number); //! Cancel a running retransmit timer if it has not already expired. //! diff --git a/src/fw/console/pulse2_transport_impl.h b/src/fw/console/pulse2_transport_impl.h index 6fb7154588..17817524c3 100644 --- a/src/fw/console/pulse2_transport_impl.h +++ b/src/fw/console/pulse2_transport_impl.h @@ -27,15 +27,12 @@ void pulse_link_send(void *buf, size_t length); //! by \ref pulse_link_send_begin. void pulse_link_send_cancel(void *buf); - // Use preprocessor magic to generate function signatures for all protocol // handler functions. -#define ON_PACKET(NUMBER, PACKET_HANDLER) \ - void PACKET_HANDLER(void *packet, size_t length); -#define ON_INIT(INITIALIZER) \ - void INITIALIZER(void); +#define ON_PACKET(NUMBER, PACKET_HANDLER) void PACKET_HANDLER(void *packet, size_t length); +#define ON_INIT(INITIALIZER) void INITIALIZER(void); #define ON_LINK_STATE_CHANGE(ON_UP, ON_DOWN) \ - void ON_UP(void); \ + void ON_UP(void); \ void ON_DOWN(void); #include "console/pulse2_transport_registry.def" #undef ON_PACKET diff --git a/src/fw/console/pulse_bulkio.c b/src/fw/console/pulse_bulkio.c index c9d3da980a..f3cf095a32 100644 --- a/src/fw/console/pulse_bulkio.c +++ b/src/fw/console/pulse_bulkio.c @@ -126,13 +126,13 @@ typedef struct PACKED InternalErrorResponse { } InternalErrorResponse; #define REGISTER_BULKIO_HANDLER(domain_type, domain_id, vtable) \ - extern PulseBulkIODomainHandler vtable; + extern PulseBulkIODomainHandler vtable; #include "pulse_bulkio_handler.def" #undef REGISTER_BULKIO_HANDLER static PulseBulkIODomainHandler * const s_domain_handlers[] = { #define REGISTER_BULKIO_HANDLER(domain_type, domain_id, vtable) \ - [PulseBulkIODomainType_ ## domain_type] = &vtable, + [PulseBulkIODomainType_##domain_type] = &vtable, #include "pulse_bulkio_handler.def" #undef REGISTER_BULKIO_HANDLER }; @@ -158,15 +158,14 @@ typedef struct BulkIOPacketCallbackData { static PulseTransferFD s_transfer_fds[MAX_PULSE_FDS]; -static void prv_respond_malformed_command(void *cmd, size_t length, - const char *message) { +static void prv_respond_malformed_command(void *cmd, size_t length, const char *message) { uint8_t *resp = pulse_reliable_send_begin(PULSE2_BULKIO_PROTOCOL); resp[0] = BULKIO_RESP_MALFORMED_CMD; size_t message_len = strlen(message) + 1; memcpy(resp + 1, message, message_len); - size_t response_len = sizeof(*resp) + message_len; + size_t response_len = sizeof(*resp) + message_len; size_t command_len = MIN(length, PULSE_MAX_SEND_SIZE - response_len); memcpy(resp + response_len, cmd, command_len); @@ -175,10 +174,8 @@ static void prv_respond_malformed_command(void *cmd, size_t length, pulse_reliable_send(resp, response_len); } -static void prv_respond_internal_error(Command *cmd, size_t length, - status_t status_code) { - InternalErrorResponse *resp = pulse_reliable_send_begin( - PULSE2_BULKIO_PROTOCOL); +static void prv_respond_internal_error(Command *cmd, size_t length, status_t status_code) { + InternalErrorResponse *resp = pulse_reliable_send_begin(PULSE2_BULKIO_PROTOCOL); resp->opcode = BULKIO_RESP_INTERNAL_ERROR; resp->status_code = status_code; @@ -191,13 +188,10 @@ static void prv_respond_internal_error(Command *cmd, size_t length, } static int prv_get_fresh_fd(PulseBulkIODomainHandler *domain_handler, PulseTransferFD **fd) { - for (int i=0; i < MAX_PULSE_FDS; ++i) { + for (int i = 0; i < MAX_PULSE_FDS; ++i) { if (s_transfer_fds[i].impl == NULL) { - s_transfer_fds[i] = (PulseTransferFD) { - .impl = domain_handler, - .domain_state = NULL, - .transfer_state = { 0 } - }; + s_transfer_fds[i] = + (PulseTransferFD){.impl = domain_handler, .domain_state = NULL, .transfer_state = {0}}; *fd = &s_transfer_fds[i]; return i; } @@ -209,7 +203,7 @@ static void prv_free_fd(int fd) { s_transfer_fds[fd].impl = NULL; } -PulseTransferFD* prv_get_fd(Command *cmd, size_t length) { +PulseTransferFD *prv_get_fd(Command *cmd, size_t length) { int fd = cmd->fd; PulseTransferFD *pulse_fd = &s_transfer_fds[fd]; if (fd >= 0 && fd < MAX_PULSE_FDS && pulse_fd && pulse_fd->impl) { @@ -221,7 +215,7 @@ PulseTransferFD* prv_get_fd(Command *cmd, size_t length) { } } -static PulseBulkIODomainHandler* prv_get_domain_handler(uint8_t domain_id) { +static PulseBulkIODomainHandler *prv_get_domain_handler(uint8_t domain_id) { for (uint8_t i = 0; i < NUM_DOMAIN_HANDLERS; i++) { PulseBulkIODomainHandler *domain_handler = s_domain_handlers[i]; if (domain_handler && domain_handler->id == domain_id) { @@ -251,17 +245,12 @@ static void prv_domain_read_cb(void *data) { pulse_reliable_send(resp, read_len + sizeof(ReadResponse)); if (pulse_fd->transfer_state.bytes_left > 0) { - system_task_add_callback(prv_domain_read_cb, (void*)(uintptr_t)fd_num); + system_task_add_callback(prv_domain_read_cb, (void *)(uintptr_t)fd_num); } } else { pulse_reliable_send_cancel(resp); - Command cmd = { - .opcode = BULKIO_CMD_DOMAIN_READ, - .read = { - .fd = fd_num - } - }; + Command cmd = {.opcode = BULKIO_CMD_DOMAIN_READ, .read = {.fd = fd_num}}; prv_respond_internal_error(&cmd, sizeof(cmd), ret); } @@ -341,7 +330,7 @@ static void prv_handle_read(Command *cmd, size_t length) { pulse_fd->transfer_state.offset = cmd->read.address; pulse_fd->transfer_state.bytes_left = cmd->read.length; - system_task_add_callback(prv_domain_read_cb, (void*)(uintptr_t)cmd->fd); + system_task_add_callback(prv_domain_read_cb, (void *)(uintptr_t)cmd->fd); } static void prv_handle_write(Command *cmd, size_t length) { @@ -361,11 +350,11 @@ static void prv_handle_write(Command *cmd, size_t length) { } WriteResponse *resp = pulse_reliable_send_begin(PULSE2_BULKIO_PROTOCOL); - *resp = (WriteResponse) { - .opcode = BULKIO_RESP_DOMAIN_WRITE, - .fd = cmd->write.fd, - .address = cmd->write.address, - .length = payload_length + *resp = (WriteResponse){ + .opcode = BULKIO_RESP_DOMAIN_WRITE, + .fd = cmd->write.fd, + .address = cmd->write.address, + .length = payload_length }; pulse_reliable_send(resp, sizeof(*resp)); } @@ -384,7 +373,7 @@ static void prv_handle_crc(Command *cmd, size_t length) { uint32_t crc = crc32(0, NULL, 0); while (bytes_read < cmd->crc.length) { uint32_t read_len = MIN(cmd->crc.length - bytes_read, chunk_size); - int ret = pulse_fd->impl->read_proc(buffer, cmd->crc.address+bytes_read, read_len, + int ret = pulse_fd->impl->read_proc(buffer, cmd->crc.address + bytes_read, read_len, pulse_fd->domain_state); if (FAILED(ret)) { @@ -397,12 +386,12 @@ static void prv_handle_crc(Command *cmd, size_t length) { } CRCResponse *resp = pulse_reliable_send_begin(PULSE2_BULKIO_PROTOCOL); - *resp = (CRCResponse) { - .opcode = BULKIO_RESP_DOMAIN_CRC, - .fd = cmd->crc.fd, - .address = cmd->crc.address, - .length = bytes_read, - .crc = crc + *resp = (CRCResponse){ + .opcode = BULKIO_RESP_DOMAIN_CRC, + .fd = cmd->crc.fd, + .address = cmd->crc.address, + .length = bytes_read, + .crc = crc }; pulse_reliable_send(resp, sizeof(*resp)); } @@ -415,10 +404,7 @@ static void prv_handle_stat(Command *cmd, size_t length) { } StatResponse *resp = pulse_reliable_send_begin(PULSE2_BULKIO_PROTOCOL); - *resp = (StatResponse) { - .opcode = BULKIO_RESP_DOMAIN_STAT, - .fd = cmd->stat.fd - }; + *resp = (StatResponse){.opcode = BULKIO_RESP_DOMAIN_STAT, .fd = cmd->stat.fd}; size_t data_max_len = PULSE_MAX_SEND_SIZE - sizeof(StatResponse); int ret = pulse_fd->impl->stat_proc(resp->data, data_max_len, pulse_fd->domain_state); if (ret >= 0) { @@ -454,17 +440,17 @@ static void prv_handle_erase(Command *cmd, size_t length) { void pulse_bulkio_erase_message_send(PulseBulkIODomainType domain_type, status_t status, uint8_t cookie) { - EraseResponse *resp = pulse_reliable_send_begin(PULSE2_BULKIO_PROTOCOL); - resp->opcode = BULKIO_RESP_DOMAIN_ERASE; - resp->domain = domain_type; - resp->status = status; - resp->cookie = cookie; - pulse_reliable_send(resp, sizeof(*resp)); + EraseResponse *resp = pulse_reliable_send_begin(PULSE2_BULKIO_PROTOCOL); + resp->opcode = BULKIO_RESP_DOMAIN_ERASE; + resp->domain = domain_type; + resp->status = status; + resp->cookie = cookie; + pulse_reliable_send(resp, sizeof(*resp)); } static void prv_handle_packet(void *data) { BulkIOPacketCallbackData *callback_data = data; - Command *cmd = (Command*)&callback_data->packet; + Command *cmd = (Command *)&callback_data->packet; size_t length = callback_data->length; if (length) { switch (cmd->opcode) { diff --git a/src/fw/console/pulse_bulkio_coredump.c b/src/fw/console/pulse_bulkio_coredump.c index 500d9c4e78..c114fe898d 100644 --- a/src/fw/console/pulse_bulkio_coredump.c +++ b/src/fw/console/pulse_bulkio_coredump.c @@ -18,19 +18,17 @@ typedef struct PACKED CoredumpStatResp { } CoredumpStatResp; static uint32_t prv_get_coredump_index(void *packet_data) { - return *(uint32_t*)packet_data; + return *(uint32_t *)packet_data; } -static int coredump_domain_read(uint8_t *buf, uint32_t address, uint32_t length, - void *context) { +static int coredump_domain_read(uint8_t *buf, uint32_t address, uint32_t length, void *context) { uint32_t index = (uintptr_t)context; uint32_t core_base_addr = core_dump_get_slot_address(index) + sizeof(CoreDumpFlashRegionHeader); flash_read_bytes(buf, core_base_addr + address, length); return length; } -static int coredump_domain_write(uint8_t *buf, uint32_t address, uint32_t length, - void *context) { +static int coredump_domain_write(uint8_t *buf, uint32_t address, uint32_t length, void *context) { return E_INVALID_OPERATION; } @@ -38,12 +36,12 @@ static int coredump_domain_stat(uint8_t *resp, size_t resp_max_len, void *contex uint32_t index = (uintptr_t)context; uint32_t addr = core_dump_get_slot_address(index); - CoredumpStatResp *stat_resp = (CoredumpStatResp*)resp; - *stat_resp = (CoredumpStatResp) { - .flags = 0, - .unread = core_dump_is_unread_available(addr), - // Size of 0 indicates no core dump available - .size = 0 + CoredumpStatResp *stat_resp = (CoredumpStatResp *)resp; + *stat_resp = (CoredumpStatResp){ + .flags = 0, + .unread = core_dump_is_unread_available(addr), + // Size of 0 indicates no core dump available + .size = 0 }; if (stat_resp->unread == 1) { @@ -65,7 +63,7 @@ static status_t coredump_domain_erase(uint8_t *packet_data, size_t length, uint8 } static status_t coredump_domain_open(uint8_t *packet_data, size_t length, void **resp) { - *resp = (void*)(uintptr_t)prv_get_coredump_index(packet_data); + *resp = (void *)(uintptr_t)prv_get_coredump_index(packet_data); return S_SUCCESS; } @@ -74,11 +72,11 @@ static status_t coredump_domain_close(void *context) { } PulseBulkIODomainHandler pulse_bulkio_domain_coredump = { - .id = PulseBulkIODomainType_Coredump, - .open_proc = coredump_domain_open, - .close_proc = coredump_domain_close, - .read_proc = coredump_domain_read, - .write_proc = coredump_domain_write, - .stat_proc = coredump_domain_stat, - .erase_proc = coredump_domain_erase + .id = PulseBulkIODomainType_Coredump, + .open_proc = coredump_domain_open, + .close_proc = coredump_domain_close, + .read_proc = coredump_domain_read, + .write_proc = coredump_domain_write, + .stat_proc = coredump_domain_stat, + .erase_proc = coredump_domain_erase }; diff --git a/src/fw/console/pulse_bulkio_domain_handler.h b/src/fw/console/pulse_bulkio_domain_handler.h index 382355abd2..4e7b0ef174 100644 --- a/src/fw/console/pulse_bulkio_domain_handler.h +++ b/src/fw/console/pulse_bulkio_domain_handler.h @@ -8,7 +8,7 @@ typedef enum { #define REGISTER_BULKIO_HANDLER(domain_type, domain_id, vtable) \ - PulseBulkIODomainType_ ## domain_type = domain_id, + PulseBulkIODomainType_##domain_type = domain_id, #include "pulse_bulkio_handler.def" #undef REGISTER_BULKIO_HANDLER } PulseBulkIODomainType; diff --git a/src/fw/console/pulse_bulkio_external_flash.c b/src/fw/console/pulse_bulkio_external_flash.c index 2221455d8d..67f8f5c405 100644 --- a/src/fw/console/pulse_bulkio_external_flash.c +++ b/src/fw/console/pulse_bulkio_external_flash.c @@ -30,7 +30,7 @@ static int external_flash_domain_read(uint8_t *buf, uint32_t address, uint32_t l } static int external_flash_domain_write(uint8_t *buf, uint32_t address, uint32_t length, - void *context) { + void *context) { flash_write_bytes(buf, address, length); return length; } @@ -42,8 +42,7 @@ static int external_flash_domain_stat(uint8_t *resp, size_t resp_max_len, void * static void prv_erase_sector(void *context, status_t result) { ExternalFlashEraseState *state = context; - const unsigned int sectors_to_erase = ( - state->length + SECTOR_SIZE_BYTES - 1) / SECTOR_SIZE_BYTES; + const unsigned int sectors_to_erase = (state->length + SECTOR_SIZE_BYTES - 1) / SECTOR_SIZE_BYTES; if (FAILED(result)) { pulse_bulkio_erase_message_send(PulseBulkIODomainType_ExternalFlash, result, state->cookie); @@ -64,14 +63,14 @@ static status_t external_flash_domain_erase(uint8_t *packet_data, size_t length, return E_INVALID_ARGUMENT; } - ExternalFlashEraseOptions *options = (ExternalFlashEraseOptions*)packet_data; + ExternalFlashEraseOptions *options = (ExternalFlashEraseOptions *)packet_data; ExternalFlashEraseState *state = kernel_malloc(sizeof(ExternalFlashEraseState)); - *state = (ExternalFlashEraseState) { - .address = options->address, - .length = options->length, - .next_sector = 0, - .cookie = cookie + *state = (ExternalFlashEraseState){ + .address = options->address, + .length = options->length, + .next_sector = 0, + .cookie = cookie }; prv_erase_sector(state, 0); @@ -89,11 +88,11 @@ static status_t external_flash_domain_close(void *context) { } PulseBulkIODomainHandler pulse_bulkio_domain_external_flash = { - .id = PulseBulkIODomainType_ExternalFlash, - .open_proc = external_flash_domain_open, - .close_proc = external_flash_domain_close, - .read_proc = external_flash_domain_read, - .write_proc = external_flash_domain_write, - .stat_proc = external_flash_domain_stat, - .erase_proc = external_flash_domain_erase + .id = PulseBulkIODomainType_ExternalFlash, + .open_proc = external_flash_domain_open, + .close_proc = external_flash_domain_close, + .read_proc = external_flash_domain_read, + .write_proc = external_flash_domain_write, + .stat_proc = external_flash_domain_stat, + .erase_proc = external_flash_domain_erase }; diff --git a/src/fw/console/pulse_bulkio_framebuffer.c b/src/fw/console/pulse_bulkio_framebuffer.c index 1b1762e584..29379445fb 100644 --- a/src/fw/console/pulse_bulkio_framebuffer.c +++ b/src/fw/console/pulse_bulkio_framebuffer.c @@ -14,7 +14,6 @@ #include #include - typedef struct PACKED FramebufferStatResp { uint8_t flags; uint16_t width; @@ -23,28 +22,27 @@ typedef struct PACKED FramebufferStatResp { uint32_t length; } FramebufferStatResp; -static int framebuffer_domain_read(uint8_t *buf, uint32_t address, uint32_t length, - void *context) { - uint8_t *fb_offset = (uint8_t*)compositor_get_framebuffer()->buffer + address; +static int framebuffer_domain_read(uint8_t *buf, uint32_t address, uint32_t length, void *context) { + uint8_t *fb_offset = (uint8_t *)compositor_get_framebuffer()->buffer + address; memcpy(buf, fb_offset, length); return length; } static int framebuffer_domain_write(uint8_t *buf, uint32_t address, uint32_t length, - void *context) { - uint8_t *fb_offset = (uint8_t*)compositor_get_framebuffer()->buffer + address; + void *context) { + uint8_t *fb_offset = (uint8_t *)compositor_get_framebuffer()->buffer + address; memcpy(fb_offset, buf, length); return length; } static int framebuffer_domain_stat(uint8_t *resp, size_t resp_max_len, void *context) { - FramebufferStatResp *stat_resp = (FramebufferStatResp*) resp; - *stat_resp = (FramebufferStatResp) { - .flags = 0, - .length = FRAMEBUFFER_SIZE_BYTES, - .width = DISP_COLS, - .height = DISP_ROWS, - .bpp = CONFIG_SCREEN_COLOR_DEPTH_BITS + FramebufferStatResp *stat_resp = (FramebufferStatResp *)resp; + *stat_resp = (FramebufferStatResp){ + .flags = 0, + .length = FRAMEBUFFER_SIZE_BYTES, + .width = DISP_COLS, + .height = DISP_ROWS, + .bpp = CONFIG_SCREEN_COLOR_DEPTH_BITS }; return sizeof(FramebufferStatResp); @@ -65,7 +63,7 @@ static void framebuffer_domain_close_cb(void *foo) { compositor_display_update(NULL); } -static status_t framebuffer_domain_close(void* data) { +static status_t framebuffer_domain_close(void *data) { animation_private_resume(); // Force the compositor to redraw the framebuffer @@ -75,11 +73,11 @@ static status_t framebuffer_domain_close(void* data) { } PulseBulkIODomainHandler pulse_bulkio_domain_framebuffer = { - .id = PulseBulkIODomainType_Framebuffer, - .open_proc = framebuffer_domain_open, - .close_proc = framebuffer_domain_close, - .read_proc = framebuffer_domain_read, - .write_proc = framebuffer_domain_write, - .stat_proc = framebuffer_domain_stat, - .erase_proc = framebuffer_domain_erase + .id = PulseBulkIODomainType_Framebuffer, + .open_proc = framebuffer_domain_open, + .close_proc = framebuffer_domain_close, + .read_proc = framebuffer_domain_read, + .write_proc = framebuffer_domain_write, + .stat_proc = framebuffer_domain_stat, + .erase_proc = framebuffer_domain_erase }; diff --git a/src/fw/console/pulse_bulkio_memory.c b/src/fw/console/pulse_bulkio_memory.c index 4599cab6a6..fe4dacd12d 100644 --- a/src/fw/console/pulse_bulkio_memory.c +++ b/src/fw/console/pulse_bulkio_memory.c @@ -14,14 +14,12 @@ typedef struct PACKED MemoryEraseOptions { uint32_t length; } MemoryEraseOptions; -static int memory_domain_read(uint8_t *buf, uint32_t address, uint32_t length, - void *context) { +static int memory_domain_read(uint8_t *buf, uint32_t address, uint32_t length, void *context) { memcpy(buf, (void *)address, length); return length; } -static int memory_domain_write(uint8_t *buf, uint32_t address, uint32_t length, - void *context) { +static int memory_domain_write(uint8_t *buf, uint32_t address, uint32_t length, void *context) { memcpy(buf, (void *)address, length); return length; } @@ -35,7 +33,7 @@ static status_t memory_domain_erase(uint8_t *packet_data, size_t length, uint8_t return E_INVALID_ARGUMENT; } - MemoryEraseOptions *options = (MemoryEraseOptions*)packet_data; + MemoryEraseOptions *options = (MemoryEraseOptions *)packet_data; memset((void *)options->address, 0x0, length); return S_SUCCESS; @@ -50,11 +48,11 @@ static status_t memory_domain_close(void *context) { } PulseBulkIODomainHandler pulse_bulkio_domain_memory = { - .id = PulseBulkIODomainType_Memory, - .open_proc = memory_domain_open, - .close_proc = memory_domain_close, - .read_proc = memory_domain_read, - .write_proc = memory_domain_write, - .stat_proc = memory_domain_stat, - .erase_proc = memory_domain_erase + .id = PulseBulkIODomainType_Memory, + .open_proc = memory_domain_open, + .close_proc = memory_domain_close, + .read_proc = memory_domain_read, + .write_proc = memory_domain_write, + .stat_proc = memory_domain_stat, + .erase_proc = memory_domain_erase }; diff --git a/src/fw/console/pulse_bulkio_pfs.c b/src/fw/console/pulse_bulkio_pfs.c index d4186c48bc..c74a18c50d 100644 --- a/src/fw/console/pulse_bulkio_pfs.c +++ b/src/fw/console/pulse_bulkio_pfs.c @@ -30,7 +30,7 @@ static int prv_open_file(void *packet_data, size_t length) { size_t filename_length = MIN(FILE_MAX_NAME_LEN, length - sizeof(*options)); - char filename[filename_length+1]; + char filename[filename_length + 1]; strncpy(filename, options->filename, filename_length); filename[filename_length] = '\0'; @@ -57,18 +57,15 @@ static int pfs_domain_write(uint8_t *buf, uint32_t address, uint32_t length, voi static int pfs_domain_stat(uint8_t *resp, size_t resp_max_len, void *context) { int fd = prv_fd_from_context(context); - PFSStatResp *stat_resp = (PFSStatResp*)resp; - *stat_resp = (PFSStatResp) { - .flags = 0, - .size = (uint32_t)pfs_get_file_size(fd) - }; + PFSStatResp *stat_resp = (PFSStatResp *)resp; + *stat_resp = (PFSStatResp){.flags = 0, .size = (uint32_t)pfs_get_file_size(fd)}; return sizeof(PFSStatResp); } static status_t pfs_domain_erase(uint8_t *packet_data, size_t length, uint8_t cookie) { char filename[FILE_MAX_NAME_LEN + 1]; - strncpy(filename, (char*)packet_data, FILE_MAX_NAME_LEN); + strncpy(filename, (char *)packet_data, FILE_MAX_NAME_LEN); length = MIN(FILE_MAX_NAME_LEN, length); filename[length] = '\0'; @@ -82,7 +79,7 @@ static status_t pfs_domain_open(uint8_t *packet_data, size_t length, void **resp return fd; } - *resp = (void*)(uintptr_t)fd; + *resp = (void *)(uintptr_t)fd; return S_SUCCESS; } @@ -92,12 +89,12 @@ static status_t pfs_domain_close(void *context) { } PulseBulkIODomainHandler pulse_bulkio_domain_pfs = { - .id = PulseBulkIODomainType_PFS, - .open_proc = pfs_domain_open, - .read_proc = pfs_domain_read, - .write_proc = pfs_domain_write, - .close_proc = pfs_domain_close, - .stat_proc = pfs_domain_stat, - .erase_proc = pfs_domain_erase + .id = PulseBulkIODomainType_PFS, + .open_proc = pfs_domain_open, + .read_proc = pfs_domain_read, + .write_proc = pfs_domain_write, + .close_proc = pfs_domain_close, + .stat_proc = pfs_domain_stat, + .erase_proc = pfs_domain_erase }; #endif diff --git a/src/fw/console/pulse_control_message_protocol.c b/src/fw/console/pulse_control_message_protocol.c index 0a9c141e65..cb22b1aafb 100644 --- a/src/fw/console/pulse_control_message_protocol.c +++ b/src/fw/console/pulse_control_message_protocol.c @@ -24,8 +24,8 @@ enum PCMPCode { PCMPCode_UnknownCode = 130, }; -void pulse_control_message_protocol_on_packet( - PulseControlMessageProtocol *this, void *raw_packet, size_t packet_length) { +void pulse_control_message_protocol_on_packet(PulseControlMessageProtocol *this, void *raw_packet, + size_t packet_length) { if (packet_length < sizeof(PCMPPacket)) { // Malformed packet; silently discard. return; @@ -57,8 +57,8 @@ void pulse_control_message_protocol_on_packet( } } -void pulse_control_message_protocol_send_port_closed_message( - PulseControlMessageProtocol *this, net16 port) { +void pulse_control_message_protocol_send_port_closed_message(PulseControlMessageProtocol *this, + net16 port) { PCMPPacket *message = this->send_begin_fn(PULSE_CONTROL_MESSAGE_PROTOCOL); message->code = PCMPCode_PortClosed; memcpy(message->information, &port, sizeof(port)); diff --git a/src/fw/console/pulse_control_message_protocol.h b/src/fw/console/pulse_control_message_protocol.h index e5aff32ad4..58f42a9356 100644 --- a/src/fw/console/pulse_control_message_protocol.h +++ b/src/fw/console/pulse_control_message_protocol.h @@ -15,8 +15,8 @@ typedef const struct PulseControlMessageProtocol { void (*send_fn)(void *buf, size_t length); } PulseControlMessageProtocol; -void pulse_control_message_protocol_on_packet(PulseControlMessageProtocol *this, - void *information, size_t length); +void pulse_control_message_protocol_on_packet(PulseControlMessageProtocol *this, void *information, + size_t length); -void pulse_control_message_protocol_send_port_closed_message( - PulseControlMessageProtocol *this, net16 port); +void pulse_control_message_protocol_send_port_closed_message(PulseControlMessageProtocol *this, + net16 port); diff --git a/src/fw/console/pulse_flash_imaging.c b/src/fw/console/pulse_flash_imaging.c index f3d28bc71e..21b2022ec4 100644 --- a/src/fw/console/pulse_flash_imaging.c +++ b/src/fw/console/pulse_flash_imaging.c @@ -56,14 +56,12 @@ typedef union Command { } region; } Command; - static void prv_handle_erase(Command *cmd, size_t length); static void prv_handle_write(Command *cmd, size_t length); static void prv_handle_crc(Command *cmd, size_t length); static void prv_handle_query_region(Command *cmd, size_t length); static void prv_handle_finalize_region(Command *cmd, size_t length); -static void prv_respond_malformed_command(Command *cmd, size_t length, - const char *message); +static void prv_respond_malformed_command(Command *cmd, size_t length, const char *message); void pulse_flash_imaging_handler(void *packet, size_t length) { Command *command = packet; @@ -115,13 +113,12 @@ static void prv_handle_erase(Command *cmd, size_t length) { } if (s_erase_in_progress) { - EraseAndWriteAck *ack = pulse_best_effort_send_begin( - PULSE_PROTOCOL_FLASH_IMAGING); - *ack = (EraseAndWriteAck) { - .opcode = IMAGING_RESP_ACK_ERASE, - .address = s_erase_start_address, - .length = s_erase_length, - .complete = 0 + EraseAndWriteAck *ack = pulse_best_effort_send_begin(PULSE_PROTOCOL_FLASH_IMAGING); + *ack = (EraseAndWriteAck){ + .opcode = IMAGING_RESP_ACK_ERASE, + .address = s_erase_start_address, + .length = s_erase_length, + .complete = 0 }; pulse_best_effort_send(ack, sizeof(EraseAndWriteAck)); } else { @@ -129,32 +126,29 @@ static void prv_handle_erase(Command *cmd, size_t length) { s_erase_start_address = cmd->erase.address; s_erase_length = cmd->erase.length; - EraseAndWriteAck *message = pulse_best_effort_send_begin( - PULSE_PROTOCOL_FLASH_IMAGING); - *message = (EraseAndWriteAck) { - .opcode = IMAGING_RESP_ACK_ERASE, - .address = s_erase_start_address, - .length = s_erase_length, - .complete = 0 + EraseAndWriteAck *message = pulse_best_effort_send_begin(PULSE_PROTOCOL_FLASH_IMAGING); + *message = (EraseAndWriteAck){ + .opcode = IMAGING_RESP_ACK_ERASE, + .address = s_erase_start_address, + .length = s_erase_length, + .complete = 0 }; pulse_best_effort_send(message, sizeof(EraseAndWriteAck)); uint32_t end_address = cmd->erase.address + cmd->erase.length; - flash_erase_optimal_range( - cmd->erase.address, cmd->erase.address, end_address, - (end_address + SECTOR_SIZE_BYTES - 1) & SECTOR_ADDR_MASK, - prv_erase_complete, NULL); + flash_erase_optimal_range(cmd->erase.address, cmd->erase.address, end_address, + (end_address + SECTOR_SIZE_BYTES - 1) & SECTOR_ADDR_MASK, + prv_erase_complete, NULL); } } static void prv_erase_complete(void *ignored, status_t result) { - EraseAndWriteAck *message = pulse_best_effort_send_begin( - PULSE_PROTOCOL_FLASH_IMAGING); - *message = (EraseAndWriteAck) { - .opcode = IMAGING_RESP_ACK_ERASE, - .address = s_erase_start_address, - .length = s_erase_length, - .complete = 1 + EraseAndWriteAck *message = pulse_best_effort_send_begin(PULSE_PROTOCOL_FLASH_IMAGING); + *message = (EraseAndWriteAck){ + .opcode = IMAGING_RESP_ACK_ERASE, + .address = s_erase_start_address, + .length = s_erase_length, + .complete = 1 }; if (FAILED(result)) { @@ -176,13 +170,12 @@ static void prv_handle_write(Command *cmd, size_t command_length) { size_t write_length = command_length - sizeof(cmd->write); flash_write_bytes(&cmd->write.data[0], cmd->write.address, write_length); - EraseAndWriteAck *ack = pulse_best_effort_send_begin( - PULSE_PROTOCOL_FLASH_IMAGING); - *ack = (EraseAndWriteAck) { - .opcode = IMAGING_RESP_ACK_WRITE, - .address = cmd->write.address, - .length = write_length, - .complete = 1 + EraseAndWriteAck *ack = pulse_best_effort_send_begin(PULSE_PROTOCOL_FLASH_IMAGING); + *ack = (EraseAndWriteAck){ + .opcode = IMAGING_RESP_ACK_WRITE, + .address = cmd->write.address, + .length = write_length, + .complete = 1 }; pulse_best_effort_send(ack, sizeof(EraseAndWriteAck)); @@ -209,11 +202,11 @@ static void prv_handle_crc(Command *cmd, size_t length) { uint32_t crc = flash_calculate_legacy_defective_checksum(cmd->crc.address, cmd->crc.length); CrcAck *ack = pulse_best_effort_send_begin(PULSE_PROTOCOL_FLASH_IMAGING); - *ack = (CrcAck) { - .opcode = IMAGING_RESP_CRC, - .address = cmd->crc.address, - .length = cmd->crc.length, - .crc = crc + *ack = (CrcAck){ + .opcode = IMAGING_RESP_CRC, + .address = cmd->crc.address, + .length = cmd->crc.length, + .crc = crc }; pulse_best_effort_send(ack, sizeof(CrcAck)); } @@ -230,8 +223,7 @@ static void prv_handle_query_region(Command *cmd, size_t length) { // assume a query of the region means we are going to write to it flash_prf_set_protection(false); region_base = FLASH_REGION_SAFE_FIRMWARE_BEGIN; - region_length = FLASH_REGION_SAFE_FIRMWARE_END - - FLASH_REGION_SAFE_FIRMWARE_BEGIN; + region_length = FLASH_REGION_SAFE_FIRMWARE_END - FLASH_REGION_SAFE_FIRMWARE_BEGIN; break; case FLASH_REGION_SYSTEM_RESOURCES: { const SystemResourceBank *bank = resource_storage_flash_get_unused_bank(); @@ -252,13 +244,12 @@ static void prv_handle_query_region(Command *cmd, size_t length) { uint32_t length; } RegionGeometry; - RegionGeometry *resp = pulse_best_effort_send_begin( - PULSE_PROTOCOL_FLASH_IMAGING); - *resp = (RegionGeometry) { - .opcode = IMAGING_RESP_REGION_GEOMETRY, - .region = cmd->region.region, - .address = region_base, - .length = region_length + RegionGeometry *resp = pulse_best_effort_send_begin(PULSE_PROTOCOL_FLASH_IMAGING); + *resp = (RegionGeometry){ + .opcode = IMAGING_RESP_REGION_GEOMETRY, + .region = cmd->region.region, + .address = region_base, + .length = region_length }; pulse_best_effort_send(resp, sizeof(RegionGeometry)); @@ -290,16 +281,14 @@ static void prv_handle_finalize_region(Command *cmd, size_t length) { pulse_best_effort_send(resp, sizeof(resp->region)); } -static void prv_respond_malformed_command(Command *cmd, size_t length, - const char *message) { +static void prv_respond_malformed_command(Command *cmd, size_t length, const char *message) { typedef struct PACKED MalformedCommandResponse { uint8_t opcode; uint8_t bad_command[9]; char error_message[40]; } MalformedCommandResponse; - MalformedCommandResponse *resp = pulse_best_effort_send_begin( - PULSE_PROTOCOL_FLASH_IMAGING); + MalformedCommandResponse *resp = pulse_best_effort_send_begin(PULSE_PROTOCOL_FLASH_IMAGING); resp->opcode = IMAGING_RESP_MALFORMED_CMD; memcpy(resp->bad_command, cmd, MIN(length, sizeof(resp->bad_command))); diff --git a/src/fw/console/pulse_llc.c b/src/fw/console/pulse_llc.c index df546d0dbb..eedaa00b5f 100644 --- a/src/fw/console/pulse_llc.c +++ b/src/fw/console/pulse_llc.c @@ -22,12 +22,9 @@ #define LLC_OUTMSG_INVALID_LLC_MESSAGE (128) #define LLC_OUTMSG_UNKNOWN_PROTOCOL_NUMBER (129) - -static void prv_bad_packet_response(uint8_t type, uint8_t bad_id, void *body, - size_t body_length); +static void prv_bad_packet_response(uint8_t type, uint8_t bad_id, void *body, size_t body_length); static void prv_handle_change_baud(void *body, size_t body_length); - void pulse_llc_handler(void *packet, size_t length) { if (!length) { // Message too small; doesn't contain a type field. @@ -37,7 +34,7 @@ void pulse_llc_handler(void *packet, size_t length) { return; } - uint8_t type = *(uint8_t*)packet; + uint8_t type = *(uint8_t *)packet; switch (type) { case LLC_INMSG_LINK_ESTABLISHMENT_REQUEST: pulse_llc_send_link_opened_msg(); @@ -46,7 +43,7 @@ void pulse_llc_handler(void *packet, size_t length) { pulse_end(); return; case LLC_INMSG_ECHO_REQUEST: - *(uint8_t*)packet = LLC_OUTMSG_ECHO_REPLY; + *(uint8_t *)packet = LLC_OUTMSG_ECHO_REPLY; uint8_t *message = pulse_best_effort_send_begin(PULSE_PROTOCOL_LLC); memcpy(message, packet, length); @@ -54,11 +51,10 @@ void pulse_llc_handler(void *packet, size_t length) { pulse_best_effort_send(message, length); return; case LLC_INMSG_CHANGE_BAUD: - prv_handle_change_baud((char*)packet + 1, length - 1); + prv_handle_change_baud((char *)packet + 1, length - 1); return; default: - prv_bad_packet_response(LLC_OUTMSG_INVALID_LLC_MESSAGE, type, - (char*)packet + 1, length - 1); + prv_bad_packet_response(LLC_OUTMSG_INVALID_LLC_MESSAGE, type, (char *)packet + 1, length - 1); return; } } @@ -76,27 +72,25 @@ void pulse_llc_send_link_opened_msg(void) { } Response; Response *response = pulse_best_effort_send_begin(PULSE_PROTOCOL_LLC); - *response = (Response) { - .type = LLC_OUTMSG_LINK_OPENED, - .pulse_version = 1, - .mtu = PULSE_MAX_SEND_SIZE + PULSE_MIN_FRAME_LENGTH, - .mru = PULSE_MAX_RECEIVE_UNIT, - .timeout = PULSE_KEEPALIVE_TIMEOUT_DECISECONDS + *response = (Response){ + .type = LLC_OUTMSG_LINK_OPENED, + .pulse_version = 1, + .mtu = PULSE_MAX_SEND_SIZE + PULSE_MIN_FRAME_LENGTH, + .mru = PULSE_MAX_RECEIVE_UNIT, + .timeout = PULSE_KEEPALIVE_TIMEOUT_DECISECONDS }; pulse_best_effort_send(response, sizeof(Response)); } void pulse_llc_send_link_closed_msg(void) { - uint8_t *link_close_response = pulse_best_effort_send_begin( - PULSE_PROTOCOL_LLC); + uint8_t *link_close_response = pulse_best_effort_send_begin(PULSE_PROTOCOL_LLC); *link_close_response = LLC_OUTMSG_LINK_CLOSED; pulse_best_effort_send(link_close_response, sizeof(uint8_t)); } -static void prv_bad_packet_response(uint8_t type, uint8_t bad_id, void *body, - size_t body_length) { +static void prv_bad_packet_response(uint8_t type, uint8_t bad_id, void *body, size_t body_length) { typedef struct PACKED Response { uint8_t type; uint8_t bad_identifier; @@ -104,10 +98,7 @@ static void prv_bad_packet_response(uint8_t type, uint8_t bad_id, void *body, } Response; Response *response = pulse_best_effort_send_begin(PULSE_PROTOCOL_LLC); - *response = (Response) { - .type = type, - .bad_identifier = bad_id - }; + *response = (Response){.type = type, .bad_identifier = bad_id}; body_length = MIN(sizeof(response->body), body_length); if (body_length) { @@ -117,10 +108,8 @@ static void prv_bad_packet_response(uint8_t type, uint8_t bad_id, void *body, pulse_best_effort_send(response, 2 + body_length); } -void pulse_llc_unknown_protocol_handler(uint8_t protocol, void *packet, - size_t length) { - prv_bad_packet_response(LLC_OUTMSG_UNKNOWN_PROTOCOL_NUMBER, protocol, packet, - length); +void pulse_llc_unknown_protocol_handler(uint8_t protocol, void *packet, size_t length) { + prv_bad_packet_response(LLC_OUTMSG_UNKNOWN_PROTOCOL_NUMBER, protocol, packet, length); } void prv_handle_change_baud(void *body, size_t body_length) { diff --git a/src/fw/console/pulse_llc.h b/src/fw/console/pulse_llc.h index a259fe33c0..ec2f844909 100644 --- a/src/fw/console/pulse_llc.h +++ b/src/fw/console/pulse_llc.h @@ -9,5 +9,4 @@ void pulse_llc_send_link_opened_msg(void); void pulse_llc_send_link_closed_msg(void); -void pulse_llc_unknown_protocol_handler(uint8_t protocol, void *packet, - size_t length); +void pulse_llc_unknown_protocol_handler(uint8_t protocol, void *packet, size_t length); diff --git a/src/fw/console/pulse_pp.c b/src/fw/console/pulse_pp.c index 3d05b93fb8..ea0bbfcacc 100644 --- a/src/fw/console/pulse_pp.c +++ b/src/fw/console/pulse_pp.c @@ -54,15 +54,14 @@ static void prv_send_next(Transport *transport) { while (bytes_remaining) { bt_unlock(); - PulsePPPacket *resp = (PulsePPPacket*) pulse_reliable_send_begin(PULSE2_PEBBLE_PROTOCOL); + PulsePPPacket *resp = (PulsePPPacket *)pulse_reliable_send_begin(PULSE2_PEBBLE_PROTOCOL); bt_lock(); if (resp) { resp->opcode = PULSE_PP_OPCODE_DATA; const size_t bytes_to_copy = MIN(bytes_remaining, mss); - comm_session_send_queue_copy(session, 0 /* start_offset */, - bytes_to_copy, &resp->data[0]); + comm_session_send_queue_copy(session, 0 /* start_offset */, bytes_to_copy, &resp->data[0]); pulse_reliable_send(resp, bytes_to_copy + sizeof(PulsePPPacket)); comm_session_send_queue_consume(session, bytes_to_copy); @@ -85,9 +84,9 @@ static void prv_granted_kernel_main_cb(void *ctx) { granted_handler(); } -static void prv_set_connection_responsiveness( - Transport *transport, BtConsumer consumer, ResponseTimeState state, uint16_t max_period_secs, - ResponsivenessGrantedHandler granted_handler) { +static void prv_set_connection_responsiveness(Transport *transport, BtConsumer consumer, + ResponseTimeState state, uint16_t max_period_secs, + ResponsivenessGrantedHandler granted_handler) { if (granted_handler) { launcher_task_add_callback(prv_granted_kernel_main_cb, granted_handler); } @@ -112,8 +111,8 @@ static bool prv_is_current_task_schedule_task(struct Transport *transport) { } //! Defined in session.c -extern void comm_session_set_capabilities( - CommSession *session, CommSessionCapability capability_flags); +extern void comm_session_set_capabilities(CommSession *session, + CommSessionCapability capability_flags); bool pulse_transport_is_connected(void) { return (s_transport.session != NULL); @@ -126,32 +125,29 @@ void pulse_transport_set_connected(bool is_connected) { } static const TransportImplementation s_pulse_transport_implementation = { - .send_next = prv_send_next, - .reset = prv_reset, - .set_connection_responsiveness = prv_set_connection_responsiveness, - .get_type = prv_get_type, - .schedule = prv_schedule_send_next_job, - .is_current_task_schedule_task = prv_is_current_task_schedule_task, + .send_next = prv_send_next, + .reset = prv_reset, + .set_connection_responsiveness = prv_set_connection_responsiveness, + .get_type = prv_get_type, + .schedule = prv_schedule_send_next_job, + .is_current_task_schedule_task = prv_is_current_task_schedule_task, }; bool send_event = true; if (is_connected) { - s_transport.session = comm_session_open((Transport *) &s_transport, - &s_pulse_transport_implementation, - TransportDestinationHybrid); + s_transport.session = comm_session_open( + (Transport *)&s_transport, &s_pulse_transport_implementation, TransportDestinationHybrid); if (!s_transport.session) { PBL_LOG_ERR("CommSession couldn't be opened"); send_event = false; } // Give it the appropriate capabilities - const CommSessionCapability capabilities = CommSessionRunState | - CommSessionInfiniteLogDumping | - CommSessionVoiceApiSupport | - CommSessionAppMessage8kSupport | - CommSessionWeatherAppSupport | - CommSessionExtendedNotificationService; + const CommSessionCapability capabilities = + CommSessionRunState | CommSessionInfiniteLogDumping | CommSessionVoiceApiSupport | + CommSessionAppMessage8kSupport | CommSessionWeatherAppSupport | + CommSessionExtendedNotificationService; comm_session_set_capabilities(s_transport.session, capabilities); } else { comm_session_close(s_transport.session, CommSessionCloseReason_UnderlyingDisconnection); @@ -160,13 +156,13 @@ void pulse_transport_set_connected(bool is_connected) { if (send_event) { PebbleEvent e = { - .type = PEBBLE_BT_CONNECTION_EVENT, - .bluetooth = { - .connection = { - .state = (s_transport.session) ? PebbleBluetoothConnectionEventStateConnected - : PebbleBluetoothConnectionEventStateDisconnected + .type = PEBBLE_BT_CONNECTION_EVENT, + .bluetooth = { + .connection = { + .state = (s_transport.session) ? PebbleBluetoothConnectionEventStateConnected + : PebbleBluetoothConnectionEventStateDisconnected + } } - } }; event_put(&e); } diff --git a/src/fw/console/pulse_protocol_impl.h b/src/fw/console/pulse_protocol_impl.h index bc271d4626..5251cda922 100644 --- a/src/fw/console/pulse_protocol_impl.h +++ b/src/fw/console/pulse_protocol_impl.h @@ -56,15 +56,14 @@ size_t pulse_reliable_max_send_size(void); // Use preprocessor magic to generate function signatures for all protocol // handler functions. #define REGISTER_PROTOCOL(n, message_handler, link_state_handler) \ - void message_handler(void *packet, size_t length); \ - void link_state_handler(PulseLinkState link_state); + void message_handler(void *packet, size_t length); \ + void link_state_handler(PulseLinkState link_state); #include "console/pulse_protocol_registry.def" #undef REGISTER_PROTOCOL -#define ON_PACKET(N, PACKET_HANDLER) \ - void PACKET_HANDLER(void *packet, size_t length); +#define ON_PACKET(N, PACKET_HANDLER) void PACKET_HANDLER(void *packet, size_t length); #define ON_TRANSPORT_STATE_CHANGE(UP_HANDLER, DOWN_HANDLER) \ - void UP_HANDLER(void); \ + void UP_HANDLER(void); \ void DOWN_HANDLER(void); #include "console/pulse2_reliable_protocol_registry.def" #undef ON_PACKET diff --git a/src/fw/console/push_transport.c b/src/fw/console/push_transport.c index 8a3fe04174..293e0b9cd8 100644 --- a/src/fw/console/push_transport.c +++ b/src/fw/console/push_transport.c @@ -28,14 +28,12 @@ void *pulse_push_send_begin(uint16_t app_protocol) { } void pulse_push_send(void *buf, size_t length) { - PBL_ASSERT(length <= pulse_link_max_send_size() - sizeof(PushPacket), - "Packet to big to send"); + PBL_ASSERT(length <= pulse_link_max_send_size() - sizeof(PushPacket), "Packet to big to send"); // We're blindly assuming that buf is the same pointer returned by // pulse_push_send_begin. If it isn't, we'll either crash here // when trying to dereference it or we'll hit the assert in // pulse_link_send. - PushPacket *packet = (void *)((char *)buf - offsetof(PushPacket, - information)); + PushPacket *packet = (void *)((char *)buf - offsetof(PushPacket, information)); size_t packet_size = length + sizeof(PushPacket); packet->length = hton16(packet_size); pulse_link_send(packet, packet_size); diff --git a/src/fw/console/reliable_transport.c b/src/fw/console/reliable_transport.c index 5e160e18e6..66584c937d 100644 --- a/src/fw/console/reliable_transport.c +++ b/src/fw/console/reliable_transport.c @@ -47,35 +47,33 @@ enum SupervisoryKind { }; typedef union ReliablePacket { - bool is_supervisory:1; + bool is_supervisory : 1; struct PACKED ReliableInfoPacket { - bool is_supervisory:1; - uint8_t sequence_number:7; - bool poll:1; - uint8_t ack_number:7; + bool is_supervisory : 1; + uint8_t sequence_number : 7; + bool poll : 1; + uint8_t ack_number : 7; net16 protocol; net16 length; char information[]; } i; struct PACKED ReliableSupervisoryPacket { - bool is_supervisory:1; - bool is_unnumbered:1; // is_unnumbered=true is unsupported - enum SupervisoryKind kind:2; - char _reserved:4; - bool poll_or_final:1; - uint8_t ack_number:7; + bool is_supervisory : 1; + bool is_unnumbered : 1; // is_unnumbered=true is unsupported + enum SupervisoryKind kind : 2; + char _reserved : 4; + bool poll_or_final : 1; + uint8_t ack_number : 7; } s; } ReliablePacket; static PulseControlMessageProtocol s_reliable_pcmp = { - .send_begin_fn = pulse_reliable_send_begin, - .send_fn = pulse_reliable_send, + .send_begin_fn = pulse_reliable_send_begin, + .send_fn = pulse_reliable_send, }; -_Static_assert(sizeof((ReliablePacket){0}.i) == 6, - "sizeof ReliablePacket.i is wrong"); -_Static_assert(sizeof((ReliablePacket){0}.s) == 2, - "sizeof ReliablePacket.s is wrong"); +_Static_assert(sizeof((ReliablePacket){0}.i) == 6, "sizeof ReliablePacket.i is wrong"); +_Static_assert(sizeof((ReliablePacket){0}.s) == 2, "sizeof ReliablePacket.s is wrong"); _Static_assert(sizeof((ReliablePacket){0}.i) == sizeof(ReliablePacket), "Something is really wrong here"); @@ -87,7 +85,7 @@ static PBL_SEM_DEFINE(s_tx_lock, 0, 1); //! V(S) in the LAPB spec. static uint8_t s_send_variable; static uint8_t s_retransmit_count; -static uint8_t s_last_ack_number; //!< N(R) of most recently received packet. +static uint8_t s_last_ack_number; //!< N(R) of most recently received packet. static uint8_t s_receive_variable; //!< V(R) in the LAPB spec. static void prv_bounce_ncp_state(void); @@ -96,35 +94,29 @@ size_t pulse_reliable_max_send_size(void) { return pulse_link_max_send_size() - sizeof(ReliablePacket); } -static void prv_send_supervisory_response(enum SupervisoryKind kind, - bool final) { - ReliablePacket *packet = pulse_link_send_begin( - PULSE2_RELIABLE_TRANSPORT_RESPONSE); - packet->s = (struct ReliableSupervisoryPacket) { - .is_supervisory = true, - .kind = kind, - .poll_or_final = final, - .ack_number = s_receive_variable, +static void prv_send_supervisory_response(enum SupervisoryKind kind, bool final) { + ReliablePacket *packet = pulse_link_send_begin(PULSE2_RELIABLE_TRANSPORT_RESPONSE); + packet->s = (struct ReliableSupervisoryPacket){ + .is_supervisory = true, + .kind = kind, + .poll_or_final = final, + .ack_number = s_receive_variable, }; pulse_link_send(packet, sizeof(packet->s)); } -static void prv_send_info_packet(uint8_t sequence_number, - uint16_t app_protocol, - const char *information, - uint16_t info_length) { - PBL_ASSERT(info_length <= pulse_reliable_max_send_size(), - "Packet too big to send"); +static void prv_send_info_packet(uint8_t sequence_number, uint16_t app_protocol, + const char *information, uint16_t info_length) { + PBL_ASSERT(info_length <= pulse_reliable_max_send_size(), "Packet too big to send"); - ReliablePacket *packet = pulse_link_send_begin( - PULSE2_RELIABLE_TRANSPORT_COMMAND); + ReliablePacket *packet = pulse_link_send_begin(PULSE2_RELIABLE_TRANSPORT_COMMAND); size_t packet_size = sizeof(ReliablePacket) + info_length; - packet->i = (struct ReliableInfoPacket) { - .sequence_number = sequence_number, - .poll = true, - .ack_number = s_receive_variable, - .protocol = hton16(app_protocol), - .length = hton16(packet_size), + packet->i = (struct ReliableInfoPacket){ + .sequence_number = sequence_number, + .poll = true, + .ack_number = s_receive_variable, + .protocol = hton16(app_protocol), + .length = hton16(packet_size), }; memcpy(&packet->i.information[0], information, info_length); pulse_link_send(packet, packet_size); @@ -142,12 +134,10 @@ static void prv_process_ack(uint8_t ack_number) { static void prv_send_port_closed_message(void *context) { net16 bad_port; memcpy(&bad_port, &context, sizeof(bad_port)); - pulse_control_message_protocol_send_port_closed_message( - &s_reliable_pcmp, bad_port); + pulse_control_message_protocol_send_port_closed_message(&s_reliable_pcmp, bad_port); } -void pulse2_reliable_transport_on_command_packet( - void *raw_packet, size_t length) { +void pulse2_reliable_transport_on_command_packet(void *raw_packet, size_t length) { if (!s_layer_up) { return; } @@ -163,8 +153,8 @@ void pulse2_reliable_transport_on_command_packet( if (packet->s.kind != SupervisoryKind_ReceiveReady && packet->s.kind != SupervisoryKind_Reject) { PBL_LOG_DBG("Received a command packet of type %" PRIu8 - " which is not supported by this implementation.", - (uint8_t)packet->s.kind); + " which is not supported by this implementation.", + (uint8_t)packet->s.kind); // Pretend it is an RR packet } prv_process_ack(packet->s.ack_number); @@ -193,10 +183,10 @@ void pulse2_reliable_transport_on_command_packet( // pulse_control_message_protocol_on_packet( // &s_reliable_pcmp, packet->i.information, info_length); break; -#define ON_PACKET(N, HANDLER) \ - case N: \ - HANDLER(packet->i.information, info_length); \ - break; +#define ON_PACKET(N, HANDLER) \ + case N: \ + HANDLER(packet->i.information, info_length); \ + break; #define ON_TRANSPORT_STATE_CHANGE(...) #include "console/pulse2_reliable_protocol_registry.def" #undef ON_PACKET @@ -206,15 +196,17 @@ void pulse2_reliable_transport_on_command_packet( // from KernelBG. uintptr_t bad_port; memcpy(&bad_port, &packet->i.protocol, sizeof(packet->i.protocol)); - system_task_add_callback(prv_send_port_closed_message, - (void *)bad_port); + system_task_add_callback(prv_send_port_closed_message, (void *)bad_port); break; } } } else { - PBL_LOG_DBG("Received truncated or corrupt info packet " - "field (expected %" PRIu16 ", got %" PRIu16 " data bytes). " - "Discarding.", ntoh16(packet->i.length), (uint16_t)length); + PBL_LOG_DBG( + "Received truncated or corrupt info packet " + "field (expected %" PRIu16 ", got %" PRIu16 + " data bytes). " + "Discarding.", + ntoh16(packet->i.length), (uint16_t)length); return; } } @@ -222,8 +214,7 @@ void pulse2_reliable_transport_on_command_packet( } } -void pulse2_reliable_transport_on_response_packet( - void *raw_packet, size_t length) { +void pulse2_reliable_transport_on_response_packet(void *raw_packet, size_t length) { if (!s_layer_up) { return; } @@ -236,36 +227,33 @@ void pulse2_reliable_transport_on_response_packet( ReliablePacket *packet = raw_packet; if (!packet->is_supervisory) { - PBL_LOG_DBG("Received Information packet response; this is " - "not permitted by the protocol (Information packets can only be " - "commands). Discarding."); + PBL_LOG_DBG( + "Received Information packet response; this is " + "not permitted by the protocol (Information packets can only be " + "commands). Discarding."); return; } prv_process_ack(packet->s.ack_number); - if (packet->s.kind != SupervisoryKind_ReceiveReady && - packet->s.kind != SupervisoryKind_Reject) { + if (packet->s.kind != SupervisoryKind_ReceiveReady && packet->s.kind != SupervisoryKind_Reject) { PBL_LOG_DBG("Received a command packet of type %" PRIu8 - " which is not supported by this implementation.", - (uint8_t)packet->s.kind); + " which is not supported by this implementation.", + (uint8_t)packet->s.kind); } } static void prv_start_retransmit_timer(uint8_t sequence_number); -void pulse2_reliable_retransmit_timer_expired_handler( - uint8_t retransmit_sequence_number) { +void pulse2_reliable_retransmit_timer_expired_handler(uint8_t retransmit_sequence_number) { if (s_send_variable != retransmit_sequence_number) { // ACK was received and processed between the time that the // retransmit timer expired and this callback ran. return; } if (++s_retransmit_count < MAX_RETRANSMITS) { - prv_send_info_packet(retransmit_sequence_number, - s_tx_buffer->app_protocol, - &s_tx_buffer->information[0], - s_tx_buffer->length); + prv_send_info_packet(retransmit_sequence_number, s_tx_buffer->app_protocol, + &s_tx_buffer->information[0], s_tx_buffer->length); prv_start_retransmit_timer(retransmit_sequence_number); } else { PBL_LOG_DBG("Reached maximum number of retransmit attempts."); @@ -274,8 +262,7 @@ void pulse2_reliable_retransmit_timer_expired_handler( } static void prv_start_retransmit_timer(uint8_t sequence_number) { - pulse2_reliable_retransmit_timer_start( - RETRANSMIT_TIMEOUT_MS, sequence_number); + pulse2_reliable_retransmit_timer_start(RETRANSMIT_TIMEOUT_MS, sequence_number); } static void prv_assert_reliable_buffer(void *buf) { @@ -319,9 +306,7 @@ void pulse_reliable_send(void *buf, const size_t length) { prv_start_retransmit_timer(sequence_number); - prv_send_info_packet(sequence_number, - s_tx_buffer->app_protocol, - &s_tx_buffer->information[0], + prv_send_info_packet(sequence_number, s_tx_buffer->app_protocol, &s_tx_buffer->information[0], s_tx_buffer->length); // As soon as we send the packet we could get ACK'd, preempting this thread and releasing the @@ -340,8 +325,7 @@ static void prv_on_this_layer_up(PPPControlProtocol *this) { pbl_sem_give(&s_tx_lock); #define ON_PACKET(...) -#define ON_TRANSPORT_STATE_CHANGE(UP_HANDLER, DOWN_HANDLER) \ - UP_HANDLER(); +#define ON_TRANSPORT_STATE_CHANGE(UP_HANDLER, DOWN_HANDLER) UP_HANDLER(); #include "console/pulse2_reliable_protocol_registry.def" #undef ON_PACKET #undef ON_TRANSPORT_STATE_CHANGE @@ -353,29 +337,27 @@ static void prv_on_this_layer_down(PPPControlProtocol *this) { pbl_sem_give(&s_tx_lock); #define ON_PACKET(...) -#define ON_TRANSPORT_STATE_CHANGE(UP_HANDLER, DOWN_HANDLER) \ - DOWN_HANDLER(); +#define ON_TRANSPORT_STATE_CHANGE(UP_HANDLER, DOWN_HANDLER) DOWN_HANDLER(); #include "console/pulse2_reliable_protocol_registry.def" #undef ON_PACKET #undef ON_TRANSPORT_STATE_CHANGE } -static void prv_on_receive_code_reject(PPPControlProtocol *this, - LCPPacket *packet) { +static void prv_on_receive_code_reject(PPPControlProtocol *this, LCPPacket *packet) { // TODO } static PPPControlProtocolState s_traincp_state = {}; static PPPControlProtocol s_traincp_protocol = { - .protocol_number = PULSE2_RELIABLE_CONTROL_PROTOCOL, - .state = &s_traincp_state, - .on_this_layer_up = prv_on_this_layer_up, - .on_this_layer_down = prv_on_this_layer_down, - .on_receive_code_reject = prv_on_receive_code_reject, + .protocol_number = PULSE2_RELIABLE_CONTROL_PROTOCOL, + .state = &s_traincp_state, + .on_this_layer_up = prv_on_this_layer_up, + .on_this_layer_down = prv_on_this_layer_down, + .on_receive_code_reject = prv_on_receive_code_reject, }; -PPPControlProtocol * const PULSE2_TRAINCP = &s_traincp_protocol; +PPPControlProtocol *const PULSE2_TRAINCP = &s_traincp_protocol; void pulse2_reliable_control_on_packet(void *packet, size_t length) { ppp_control_protocol_handle_incoming_packet(PULSE2_TRAINCP, packet, length); @@ -394,8 +376,7 @@ void pulse2_reliable_on_link_down(void) { void pulse2_reliable_init(void) { ppp_control_protocol_init(PULSE2_TRAINCP); ppp_control_protocol_open(PULSE2_TRAINCP); - s_tx_buffer = kernel_zalloc_check(sizeof(ReliableInfoBuffer) + - pulse_reliable_max_send_size()); + s_tx_buffer = kernel_zalloc_check(sizeof(ReliableInfoBuffer) + pulse_reliable_max_send_size()); pbl_sem_give(&s_tx_lock); } diff --git a/src/fw/console/serial_console.c b/src/fw/console/serial_console.c index e2d2a9bf62..17003c6e9d 100644 --- a/src/fw/console/serial_console.c +++ b/src/fw/console/serial_console.c @@ -19,13 +19,13 @@ static bool s_serial_console_initialized; static bool s_prompt_enabled = false; -static void logging_handle_character(char c, bool* should_context_switch) { +static void logging_handle_character(char c, bool *should_context_switch) { #ifndef CONFIG_PROMPT return; #endif // Remember, you're in an interrupt here! - if (c == 0x3) { // CTRL-C + if (c == 0x3) { // CTRL-C if (!s_prompt_enabled) { PBL_LOG_DBG("Ignoring prompt request, not yet ready!"); return; @@ -66,7 +66,7 @@ void serial_console_enable_prompt(void) { s_prompt_enabled = true; } -void serial_console_write_log_message(const char* msg) { +void serial_console_write_log_message(const char *msg) { while (*msg) { dbgserial_putchar(*(msg++)); } @@ -103,7 +103,7 @@ void serial_console_set_state(SerialConsoleState new_state) { dbgserial_set_rx_dma_enabled(true); break; default: - WTF; // Don't know this state + WTF; // Don't know this state } pbl_irq_unlock(); diff --git a/src/fw/console/serial_console.h b/src/fw/console/serial_console.h index a91e529ee5..6095374413 100644 --- a/src/fw/console/serial_console.h +++ b/src/fw/console/serial_console.h @@ -16,4 +16,4 @@ bool serial_console_is_prompt_enabled(void); //! lands so no need to rearrange the deck chairs on the titanic. void serial_console_enable_prompt(void); -void serial_console_write_log_message(const char* msg); +void serial_console_write_log_message(const char *msg); diff --git a/src/fw/debug/advanced_logging.c b/src/fw/debug/advanced_logging.c index 6c729725d2..e54246b75d 100644 --- a/src/fw/debug/advanced_logging.c +++ b/src/fw/debug/advanced_logging.c @@ -16,10 +16,11 @@ static SharedCircularBufferClient s_buffer_client; // bytes long with the longest being about 80 bytes, so this is enough for 15-40 // or so messages. static uint8_t s_buffer_storage[1200]; -static PBL_MUTEX_DEFINE(s_buffer_mutex); //!< Protects s_buffer -static PBL_MUTEX_DEFINE(s_flash_write_mutex); //!< Protects log line consistency +static PBL_MUTEX_DEFINE(s_buffer_mutex); //!< Protects s_buffer +static PBL_MUTEX_DEFINE(s_flash_write_mutex); //!< Protects log line consistency static bool s_initialized; -static bool s_is_flash_write_scheduled; //!< true if handle_buffer_sync KernelBG callback is scheduled +static bool + s_is_flash_write_scheduled; //!< true if handle_buffer_sync KernelBG callback is scheduled static void write_message(void) { // Note that we should enter this function with the buffer mutex held. @@ -28,13 +29,16 @@ static void write_message(void) { uint16_t read_length; // Read the header part - bool result = shared_circular_buffer_read(&s_buffer, &s_buffer_client, sizeof(uint8_t), &data_read, &read_length); + bool result = shared_circular_buffer_read(&s_buffer, &s_buffer_client, sizeof(uint8_t), + &data_read, &read_length); PBL_ASSERTN(result); - PBL_ASSERT(read_length == sizeof(uint8_t), "read_length %u sizeof(uint8_t) %u", read_length, sizeof(uint8_t)); + PBL_ASSERT(read_length == sizeof(uint8_t), "read_length %u sizeof(uint8_t) %u", read_length, + sizeof(uint8_t)); uint8_t msg_length = *data_read; - if (shared_circular_buffer_get_read_space_remaining(&s_buffer, &s_buffer_client) < msg_length + sizeof(uint8_t)) { - return; // Not ready yet, consume nothing. + if (shared_circular_buffer_get_read_space_remaining(&s_buffer, &s_buffer_client) < + msg_length + sizeof(uint8_t)) { + return; // Not ready yet, consume nothing. } // Flash_logging_log_start can trigger a flash erase. Release the buffer mutex @@ -53,7 +57,8 @@ static void write_message(void) { // Note that this buffer read really should be done with the buffer mutex held. // This works only because writes to the buffer do not advance slackers. - result = shared_circular_buffer_read(&s_buffer, &s_buffer_client, msg_length, &data_read, &read_length); + result = shared_circular_buffer_read(&s_buffer, &s_buffer_client, msg_length, &data_read, + &read_length); PBL_ASSERTN(result); msg_length -= read_length; @@ -68,7 +73,7 @@ static void write_message(void) { } static void handle_buffer_sync(void *data) { - const bool is_async = (uintptr_t) data; + const bool is_async = (uintptr_t)data; pbl_mutex_lock(&s_flash_write_mutex, PBL_FOREVER); pbl_mutex_lock(&s_buffer_mutex, PBL_FOREVER); @@ -107,7 +112,6 @@ static void handle_buffer_sync(void *data) { pbl_mutex_unlock(&s_flash_write_mutex); } - void advanced_logging_init(void) { flash_logging_init(); @@ -118,19 +122,21 @@ void advanced_logging_init(void) { } // Return true on success -static bool write_buffer_locking(char* buffer, int length, bool async) { +static bool write_buffer_locking(char *buffer, int length, bool async) { bool success = false; do { pbl_mutex_lock(&s_buffer_mutex, PBL_FOREVER); if (shared_circular_buffer_get_write_space_remaining(&s_buffer) >= length + 1) { - // Ideally we could figure out a way to skip out on this copy but then you'd potentially need to sniprintf - // into a non-contiguous buffer... whatever, we have CPU to burn. + // Ideally we could figure out a way to skip out on this copy but then you'd potentially need + // to sniprintf into a non-contiguous buffer... whatever, we have CPU to burn. uint8_t msg_length = length; // Do not advance slackers. Data loss and/or corruption will occur! See write_message() - shared_circular_buffer_write(&s_buffer, &msg_length, sizeof(uint8_t), false /*advance_slackers*/); - shared_circular_buffer_write(&s_buffer, (const uint8_t*) buffer, length, false /*advance_slackers*/); + shared_circular_buffer_write(&s_buffer, &msg_length, sizeof(uint8_t), + false /*advance_slackers*/); + shared_circular_buffer_write(&s_buffer, (const uint8_t *)buffer, length, + false /*advance_slackers*/); success = true; } @@ -139,19 +145,19 @@ static bool write_buffer_locking(char* buffer, int length, bool async) { // If we failed to buffer this message, flush the buffer to cache to make room. // Otherwise, if this is a sync message, flush this message to flash. if (!success || !async) { - handle_buffer_sync((void *)(uintptr_t) false /* !is_async */); + handle_buffer_sync((void *)(uintptr_t)false /* !is_async */); } - } while (!success); // Loop until the buffer copy succeeds. If sync, also wait until this message - // is written to flash. - // It's highly unlikely that another task will win the race and completely - // fill the buffer between the flash write and the next buffer write attempt. - // If so, there are bigger issues. + } while (!success); // Loop until the buffer copy succeeds. If sync, also wait until this message + // is written to flash. + // It's highly unlikely that another task will win the race and completely + // fill the buffer between the flash write and the next buffer write attempt. + // If so, there are bigger issues. if (async) { pbl_mutex_lock(&s_buffer_mutex, PBL_FOREVER); if (!s_is_flash_write_scheduled) { s_is_flash_write_scheduled = true; - system_task_add_callback(handle_buffer_sync, (void *)(uintptr_t) true /* is_async */); + system_task_add_callback(handle_buffer_sync, (void *)(uintptr_t)true /* is_async */); } pbl_mutex_unlock(&s_buffer_mutex); } @@ -159,7 +165,7 @@ static bool write_buffer_locking(char* buffer, int length, bool async) { return success; } -void pbl_log_advanced(char* buffer, int length, bool async) { +void pbl_log_advanced(char *buffer, int length, bool async) { if (!s_initialized) { return; } @@ -168,20 +174,19 @@ void pbl_log_advanced(char* buffer, int length, bool async) { char pbl_log_get_level_char(const uint8_t log_level) { switch (log_level) { - case LOG_LEVEL_ALWAYS: - return '*'; - case LOG_LEVEL_ERROR: - return 'E'; - case LOG_LEVEL_WARNING: - return 'W'; - case LOG_LEVEL_INFO: - return 'I'; - case LOG_LEVEL_DEBUG: - return 'D'; - case LOG_LEVEL_DEBUG_VERBOSE: - return 'V'; - default: - return '?'; + case LOG_LEVEL_ALWAYS: + return '*'; + case LOG_LEVEL_ERROR: + return 'E'; + case LOG_LEVEL_WARNING: + return 'W'; + case LOG_LEVEL_INFO: + return 'I'; + case LOG_LEVEL_DEBUG: + return 'D'; + case LOG_LEVEL_DEBUG_VERBOSE: + return 'V'; + default: + return '?'; } } - diff --git a/src/fw/debug/advanced_logging.h b/src/fw/debug/advanced_logging.h index d65f6f3d48..e8809c10a2 100644 --- a/src/fw/debug/advanced_logging.h +++ b/src/fw/debug/advanced_logging.h @@ -7,5 +7,4 @@ void advanced_logging_init(void); -void pbl_log_advanced(const char* buffer, int length, bool async); - +void pbl_log_advanced(const char *buffer, int length, bool async); diff --git a/src/fw/debug/app_logging.c b/src/fw/debug/app_logging.c index 619423a56d..4cbc761c6f 100644 --- a/src/fw/debug/app_logging.c +++ b/src/fw/debug/app_logging.c @@ -42,7 +42,8 @@ DEFINE_SYSCALL(void, sys_app_log, size_t length, void *log_buffer) { if (stack_space > MIN_STACK_FOR_SEND_DATA) { CommSession *session = comm_session_get_system_session(); if (session) { - comm_session_send_data(session, APP_LOGGING_ENDPOINT, (uint8_t*)log_buffer, length, COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(session, APP_LOGGING_ENDPOINT, (uint8_t *)log_buffer, length, + COMM_SESSION_DEFAULT_TIMEOUT); } } } @@ -58,15 +59,14 @@ void app_log_protocol_msg_callback(CommSession *session, const uint8_t *data, co }; AppLogCommand *command = (AppLogCommand *)data; - switch(command->commandType) { - case APP_LOG_COMMAND_ENABLE_LOGGING: - s_app_logging_mode = AppLoggingEnabled; - break; - case APP_LOG_COMMAND_DISABLE_LOGGING: - s_app_logging_mode = AppLoggingDisabled; - break; - default: - PBL_LOG_WRN("Invalid app log command 0x%x", command->commandType); + switch (command->commandType) { + case APP_LOG_COMMAND_ENABLE_LOGGING: + s_app_logging_mode = AppLoggingEnabled; + break; + case APP_LOG_COMMAND_DISABLE_LOGGING: + s_app_logging_mode = AppLoggingDisabled; + break; + default: + PBL_LOG_WRN("Invalid app log command 0x%x", command->commandType); } } - diff --git a/src/fw/debug/debug.c b/src/fw/debug/debug.c index 850c8a84cb..7e23ab9248 100644 --- a/src/fw/debug/debug.c +++ b/src/fw/debug/debug.c @@ -41,11 +41,11 @@ BluetoothDumpLineCallbackData s_bt_dump_chunk_callback_data; static void prv_put_status_event(DebugInfoEventState state) { PebbleEvent event = { - .type = PEBBLE_GATHER_DEBUG_INFO_EVENT, - .debug_info = { - .source = DebugInfoSourceFWLogs, - .state = state, - }, + .type = PEBBLE_GATHER_DEBUG_INFO_EVENT, + .debug_info = { + .source = DebugInfoSourceFWLogs, + .state = state, + }, }; event_put(&event); } @@ -54,8 +54,8 @@ static bool prv_bt_log_dump_line_cb(uint8_t *message, uint32_t total_length) { CommSession *session = s_bt_dump_chunk_callback_data.comm_session; // keep us sending data quickly - comm_session_set_responsiveness( - s_bt_dump_chunk_callback_data.comm_session, BtConsumerPpLogDump, ResponseTimeMin, 5); + comm_session_set_responsiveness(s_bt_dump_chunk_callback_data.comm_session, BtConsumerPpLogDump, + ResponseTimeMin, 5); const uint16_t required_length = total_length + 1 + 4; SendBuffer *sb = comm_session_send_buffer_begin_write(session, ENDPOINT_ID, required_length, @@ -66,10 +66,10 @@ static bool prv_bt_log_dump_line_cb(uint8_t *message, uint32_t total_length) { } BluetoothHeader header = { - .command = 0x80, - .cookie = s_bt_dump_chunk_callback_data.cookie, + .command = 0x80, + .cookie = s_bt_dump_chunk_callback_data.cookie, }; - comm_session_send_buffer_write(sb, (const uint8_t *) &header, sizeof(header)); + comm_session_send_buffer_write(sb, (const uint8_t *)&header, sizeof(header)); comm_session_send_buffer_write(sb, message, total_length); comm_session_send_buffer_end_write(sb); return true; @@ -77,34 +77,31 @@ static bool prv_bt_log_dump_line_cb(uint8_t *message, uint32_t total_length) { // Called by flash_dump_log_file() when the log has been completely dumped static void prv_bt_log_dump_completed_cb(bool success) { - BluetoothHeader header = { - .cookie = s_bt_dump_chunk_callback_data.cookie - }; + BluetoothHeader header = {.cookie = s_bt_dump_chunk_callback_data.cookie}; // Send a "no logs" message if the generation did not exist and the remote supports // "infinite log dumping" CommSession *session = s_bt_dump_chunk_callback_data.comm_session; if (!success && comm_session_has_capability(session, CommSessionInfiniteLogDumping)) { header.command = 0x82; comm_session_send_data(s_bt_dump_chunk_callback_data.comm_session, ENDPOINT_ID, - (uint8_t *) &header, sizeof(header), - COMM_SESSION_DEFAULT_TIMEOUT); + (uint8_t *)&header, sizeof(header), COMM_SESSION_DEFAULT_TIMEOUT); } else { // Otherwise, just send a "done" message header.command = 0x81; comm_session_send_data(s_bt_dump_chunk_callback_data.comm_session, ENDPOINT_ID, - (uint8_t *) &header, sizeof(header), COMM_SESSION_DEFAULT_TIMEOUT); + (uint8_t *)&header, sizeof(header), COMM_SESSION_DEFAULT_TIMEOUT); } s_bt_dump_chunk_callback_data.in_progress = false; // Ok to enter a lower power less responsive state - comm_session_set_responsiveness( - s_bt_dump_chunk_callback_data.comm_session, BtConsumerPpLogDump, ResponseTimeMax, 0); + comm_session_set_responsiveness(s_bt_dump_chunk_callback_data.comm_session, BtConsumerPpLogDump, + ResponseTimeMax, 0); prv_put_status_event(DebugInfoStateFinished); } -static void prv_flash_logging_bluetooth_dump( - CommSession *session, int generation, uint32_t cookie) { +static void prv_flash_logging_bluetooth_dump(CommSession *session, int generation, + uint32_t cookie) { PBL_ASSERT_RUNNING_FROM_EXPECTED_TASK(PebbleTask_KernelBackground); if (s_bt_dump_chunk_callback_data.in_progress) { PBL_LOG_ERR("Already in the middle of dumping logs"); @@ -126,7 +123,7 @@ static void prv_flash_logging_bluetooth_dump( flash_logging_set_enabled(true); } -void dump_log_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length) { +void dump_log_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length) { uint32_t cookie; int generation = 0; if (data[0] == 0x10 || data[0] == 0x11) { @@ -136,30 +133,30 @@ void dump_log_protocol_msg_callback(CommSession *session, const uint8_t* data, s } generation = data[1]; - cookie = *((uint32_t*) (data + 2)); + cookie = *((uint32_t *)(data + 2)); } else { if (length != 5) { PBL_LOG_ERR("Invalid dump log message received -- length %u", length); return; } - cookie = *((uint32_t*) (data + 1)); + cookie = *((uint32_t *)(data + 1)); } switch (*data) { - case 0x00: - prv_flash_logging_bluetooth_dump(session, 0, cookie); - break; - case 0x01: - prv_flash_logging_bluetooth_dump(session, 1, cookie); - break; - case 0x10: - prv_flash_logging_bluetooth_dump(session, generation, cookie); - break; - case 0x02: - case 0x03: - case 0x11: - break; + case 0x00: + prv_flash_logging_bluetooth_dump(session, 0, cookie); + break; + case 0x01: + prv_flash_logging_bluetooth_dump(session, 1, cookie); + break; + case 0x10: + prv_flash_logging_bluetooth_dump(session, generation, cookie); + break; + case 0x02: + case 0x03: + case 0x11: + break; } } @@ -168,9 +165,7 @@ void debug_init(McuRebootReason mcu_reboot_reason) { // Log the firmware version in the first flash log line: PBL_LOG_ALWAYS("Firmware version: %s", TINTIN_METADATA.version_tag); - PBL_LOG_ALWAYS("Platform: %u, hw: %s, sn: %s", - TINTIN_METADATA.hw_platform, - mfg_get_hw_version(), + PBL_LOG_ALWAYS("Platform: %u, hw: %s, sn: %s", TINTIN_METADATA.hw_platform, mfg_get_hw_version(), mfg_get_serial_number()); // Log the firmware build id to flash: @@ -196,10 +191,8 @@ void debug_print_last_launched_app(void) { } else if ((last_launched_app_slot != (uint32_t)INVALID_BANK_ID)) { PebbleProcessInfo last_launched_app; uint8_t build_id[BUILD_ID_EXPECTED_LEN]; - AppStorageGetAppInfoResult result = app_storage_get_process_info(&last_launched_app, - build_id, - (AppInstallId)last_launched_app_slot, - PebbleTask_App); + AppStorageGetAppInfoResult result = app_storage_get_process_info( + &last_launched_app, build_id, (AppInstallId)last_launched_app_slot, PebbleTask_App); if (result == GET_APP_INFO_SUCCESS) { PBL_LOG_INFO("Last launched app: %s", last_launched_app.name); diff --git a/src/fw/debug/debug.h b/src/fw/debug/debug.h index f86d75bd31..bee0740ce1 100644 --- a/src/fw/debug/debug.h +++ b/src/fw/debug/debug.h @@ -8,4 +8,3 @@ void debug_init(McuRebootReason reason); void debug_print_last_launched_app(void); - diff --git a/src/fw/debug/debug_reboot_reason.c b/src/fw/debug/debug_reboot_reason.c index 817f9992f8..ffa09415fd 100644 --- a/src/fw/debug/debug_reboot_reason.c +++ b/src/fw/debug/debug_reboot_reason.c @@ -21,9 +21,9 @@ void debug_reboot_reason_print(McuRebootReason mcu_reboot_reason) { s_last_reboot_reason_code = reason.code; // We're out of flash space, scrape a few bytes back! - static const char* rebooted_due_to = " rebooted due to "; + static const char *rebooted_due_to = " rebooted due to "; - const char* restarted_safely_string = "Safely"; + const char *restarted_safely_string = "Safely"; if (!reason.restarted_safely) { restarted_safely_string = "Dangerously"; } @@ -31,102 +31,99 @@ void debug_reboot_reason_print(McuRebootReason mcu_reboot_reason) { // Leave this NULL to do your own printing. const char *reason_string = NULL; switch (reason.code) { - // Normal stuff - case RebootReasonCode_Unknown: - reason_string = "We don't know why we %s rebooted."; - break; - case RebootReasonCode_LowBattery: - reason_string = "%s%sLowBattery"; - break; - case RebootReasonCode_SoftwareUpdate: - gatt_service_changed_server_handle_fw_update(); - reason_string = "%s%sSoftwareUpdate"; - break; - case RebootReasonCode_ResetButtonsHeld: - // Since we forced the reset, it isn't unexpected - reason_string = "%s%sResetButtonsHeld"; - break; - case RebootReasonCode_ShutdownMenuItem: - reason_string = "%s%sLowBattery"; - break; - case RebootReasonCode_FactoryResetReset: - reason_string = "%s%sFactoryResetReset"; - break; - case RebootReasonCode_FactoryResetShutdown: - reason_string = "%s%sFactoryResetShutdown"; - break; - case RebootReasonCode_MfgShutdown: - reason_string = "%s%sMfgShutdown"; - break; - case RebootReasonCode_Serial: - reason_string = "%s%sSerial"; - break; - case RebootReasonCode_RemoteReset: - reason_string = "%s%sa Remote Reset"; - break; - case RebootReasonCode_ForcedCoreDump: - reason_string = "%s%sa Forced Coredump"; - break; - case RebootReasonCode_PrfIdle: - reason_string = "%s%sIdle PRF"; - break; - // Error occurred - case RebootReasonCode_Assert: - reason_string = "%s%sAssert: LR %#"PRIxPTR; - break; - case RebootReasonCode_HardFault: - reason_string = "%s%sHardFault: LR %#"PRIxPTR; - break; - case RebootReasonCode_LauncherPanic: - reason_string = "%s%sLauncherPanic: code 0x%"PRIx32; - break; - case RebootReasonCode_ClockFailure: - reason_string = "%s%sClock Failure"; - break; - case RebootReasonCode_WorkerHardFault: - reason_string = "%s%sWorker HardFault"; - break; - case RebootReasonCode_OutOfMemory: - reason_string = "%s%sOOM"; - break; - case RebootReasonCode_BtCoredump: - reason_string = "%s%sBT Coredump"; - break; - default: - reason_string = "%s%sUnrecognized Reason"; - break; - // Error occurred - case RebootReasonCode_Watchdog: - PBL_LOG_WRN("%s%sWatchdog: Bits 0x%" PRIx8 ", Mask 0x%" PRIx8, - restarted_safely_string, rebooted_due_to, reason.data8[0], reason.data8[1]); + // Normal stuff + case RebootReasonCode_Unknown: + reason_string = "We don't know why we %s rebooted."; + break; + case RebootReasonCode_LowBattery: + reason_string = "%s%sLowBattery"; + break; + case RebootReasonCode_SoftwareUpdate: + gatt_service_changed_server_handle_fw_update(); + reason_string = "%s%sSoftwareUpdate"; + break; + case RebootReasonCode_ResetButtonsHeld: + // Since we forced the reset, it isn't unexpected + reason_string = "%s%sResetButtonsHeld"; + break; + case RebootReasonCode_ShutdownMenuItem: + reason_string = "%s%sLowBattery"; + break; + case RebootReasonCode_FactoryResetReset: + reason_string = "%s%sFactoryResetReset"; + break; + case RebootReasonCode_FactoryResetShutdown: + reason_string = "%s%sFactoryResetShutdown"; + break; + case RebootReasonCode_MfgShutdown: + reason_string = "%s%sMfgShutdown"; + break; + case RebootReasonCode_Serial: + reason_string = "%s%sSerial"; + break; + case RebootReasonCode_RemoteReset: + reason_string = "%s%sa Remote Reset"; + break; + case RebootReasonCode_ForcedCoreDump: + reason_string = "%s%sa Forced Coredump"; + break; + case RebootReasonCode_PrfIdle: + reason_string = "%s%sIdle PRF"; + break; + // Error occurred + case RebootReasonCode_Assert: + reason_string = "%s%sAssert: LR %#" PRIxPTR; + break; + case RebootReasonCode_HardFault: + reason_string = "%s%sHardFault: LR %#" PRIxPTR; + break; + case RebootReasonCode_LauncherPanic: + reason_string = "%s%sLauncherPanic: code 0x%" PRIx32; + break; + case RebootReasonCode_ClockFailure: + reason_string = "%s%sClock Failure"; + break; + case RebootReasonCode_WorkerHardFault: + reason_string = "%s%sWorker HardFault"; + break; + case RebootReasonCode_OutOfMemory: + reason_string = "%s%sOOM"; + break; + case RebootReasonCode_BtCoredump: + reason_string = "%s%sBT Coredump"; + break; + default: + reason_string = "%s%sUnrecognized Reason"; + break; + // Error occurred + case RebootReasonCode_Watchdog: + PBL_LOG_WRN("%s%sWatchdog: Bits 0x%" PRIx8 ", Mask 0x%" PRIx8, restarted_safely_string, + rebooted_due_to, reason.data8[0], reason.data8[1]); - if (reason.watchdog.stuck_task_pc != 0) { - PBL_LOG_WRN("Stuck task PC: 0x%" PRIx32 ", LR: 0x%" PRIx32, - reason.watchdog.stuck_task_pc, reason.watchdog.stuck_task_lr); + if (reason.watchdog.stuck_task_pc != 0) { + PBL_LOG_WRN("Stuck task PC: 0x%" PRIx32 ", LR: 0x%" PRIx32, reason.watchdog.stuck_task_pc, + reason.watchdog.stuck_task_lr); - if (reason.watchdog.stuck_task_callback) { - PBL_LOG_WRN("Stuck callback: 0x%" PRIx32, - reason.watchdog.stuck_task_callback); + if (reason.watchdog.stuck_task_callback) { + PBL_LOG_WRN("Stuck callback: 0x%" PRIx32, reason.watchdog.stuck_task_callback); + } } - } - break; - case RebootReasonCode_StackOverflow: - PebbleTask task = (PebbleTask) reason.data8[0]; - PBL_LOG_WRN("%s%sStackOverflow: Task #%d", restarted_safely_string, - rebooted_due_to, task); - break; - case RebootReasonCode_EventQueueFull: - PBL_LOG_WRN("%s%sEvent Queue Full", restarted_safely_string, rebooted_due_to); - PBL_LOG_WRN("LR: 0x%"PRIx32" Current: 0x%"PRIx32" Dropped: 0x%"PRIx32, - reason.event_queue.push_lr, - reason.event_queue.current_event, - reason.event_queue.dropped_event); - break; + break; + case RebootReasonCode_StackOverflow: + PebbleTask task = (PebbleTask)reason.data8[0]; + PBL_LOG_WRN("%s%sStackOverflow: Task #%d", restarted_safely_string, rebooted_due_to, task); + break; + case RebootReasonCode_EventQueueFull: + PBL_LOG_WRN("%s%sEvent Queue Full", restarted_safely_string, rebooted_due_to); + PBL_LOG_WRN("LR: 0x%" PRIx32 " Current: 0x%" PRIx32 " Dropped: 0x%" PRIx32, + reason.event_queue.push_lr, reason.event_queue.current_event, + reason.event_queue.dropped_event); + break; } // Generic reason string if (reason_string) { - pbl_log(LOG_LEVEL_WARNING, __FILE__, __LINE__, reason_string, - restarted_safely_string, rebooted_due_to, reason.extra.value); + pbl_log(LOG_LEVEL_WARNING, __FILE__, __LINE__, reason_string, restarted_safely_string, + rebooted_due_to, reason.extra.value); } if (is_unread_coredump_available()) { diff --git a/src/fw/debug/flash_logging.c b/src/fw/debug/flash_logging.c index f07ecd22e5..250fef8191 100644 --- a/src/fw/debug/flash_logging.c +++ b/src/fw/debug/flash_logging.c @@ -49,17 +49,17 @@ static bool s_flash_logging_enabled = false; typedef struct PACKED { - uint32_t magic; - uint8_t version; - uint8_t build_id[BUILD_ID_EXPECTED_LEN]; - uint8_t log_file_id; - uint8_t log_chunk_id; // For a given log file, the id of the page - uint8_t log_flags; // this should be the last header field written + uint32_t magic; + uint8_t version; + uint8_t build_id[BUILD_ID_EXPECTED_LEN]; + uint8_t log_file_id; + uint8_t log_chunk_id; // For a given log file, the id of the page + uint8_t log_flags; // this should be the last header field written } FlashLoggingHeader; // indicates the region is erased and no logs are stored in it #define LOG_MAGIC_PAGE_FREE 0xffffffff -#define LOG_MAGIC 0x21474F4C /* LOG! */ +#define LOG_MAGIC 0x21474F4C /* LOG! */ #define LOG_VERSION 0x1 typedef struct PACKED { @@ -70,40 +70,40 @@ typedef struct PACKED { #define LOG_FLAGS_VALID (0x1 << 0) typedef struct { - uint32_t page_start_addr; // absolute start addr of the page we are logging to - uint32_t offset_in_log_page; // the offset we writing to in a given page - uint32_t log_start_addr; // the starting address of the curr log being written - uint8_t bytes_remaining; // the bytes left to write for the current log - uint8_t log_chunk_id; // the id of the current page being logged to - uint8_t log_file_id; // the id of the current log generation + uint32_t page_start_addr; // absolute start addr of the page we are logging to + uint32_t offset_in_log_page; // the offset we writing to in a given page + uint32_t log_start_addr; // the starting address of the curr log being written + uint8_t bytes_remaining; // the bytes left to write for the current log + uint8_t log_chunk_id; // the id of the current page being logged to + uint8_t log_file_id; // the id of the current log generation } CurrentLoggingState; static CurrentLoggingState s_curr_state; #define CHUNK_ID_BITWIDTH (sizeof(((FlashLoggingHeader *)0)->log_chunk_id) * 8) -#define LOG_ID_BITWIDTH (sizeof(((FlashLoggingHeader *)0)->log_file_id) * 8) -#define MAX_LOG_FILE_ID (0x1UL << LOG_ID_BITWIDTH) +#define LOG_ID_BITWIDTH (sizeof(((FlashLoggingHeader *)0)->log_file_id) * 8) +#define MAX_LOG_FILE_ID (0x1UL << LOG_ID_BITWIDTH) #define MAX_PAGE_CHUNK_ID (0x1UL << CHUNK_ID_BITWIDTH) // we use 0xff... to indicate an unpopulated msg so define max msg len to be 1 // less than that -#define MAX_MSG_LEN ((0x1UL << sizeof(((LogRecordHeader *)0)->length) * 8) - 2) +#define MAX_MSG_LEN ((0x1UL << sizeof(((LogRecordHeader *)0)->length) * 8) - 2) // This is the state used while performing flash_log_file(). Each log message gets handled // by a separate system task callback typedef struct { - uint8_t page_index; // which page we are currently dumping - uint8_t num_pages; // number of pages to dump - uint8_t retry_count; // How many retries we have performed at this offset - bool sent_build_id; // True after we've sent the build ID - uint16_t page_offset; // current offset within the page - uint32_t log_start_addr; // start address of the log file we are dumping - DumpLineCallback line_cb; // Called to send each line - DumpCompletedCallback completed_cb; // Called when completed - uint8_t msg_buf[MAX_MSG_LEN]; // Message buffer + uint8_t page_index; // which page we are currently dumping + uint8_t num_pages; // number of pages to dump + uint8_t retry_count; // How many retries we have performed at this offset + bool sent_build_id; // True after we've sent the build ID + uint16_t page_offset; // current offset within the page + uint32_t log_start_addr; // start address of the log file we are dumping + DumpLineCallback line_cb; // Called to send each line + DumpCompletedCallback completed_cb; // Called when completed + uint8_t msg_buf[MAX_MSG_LEN]; // Message buffer } DumpLogState; -#define DUMP_LOG_MAX_RETRIES 3 +#define DUMP_LOG_MAX_RETRIES 3 typedef enum { DumpStatus_DoneFailure, @@ -111,33 +111,29 @@ typedef enum { DumpStatus_DoneSuccess, } DumpStatus; - // Static asserts to make sure user has configured flash logging correctly for // the platform of interest -_Static_assert((MAX_POSSIBLE_LOG_GENS >= 4) && - (MAX_POSSIBLE_LOG_GENS < MAX_LOG_FILE_ID), - "Invalid number of log generation numbers"); +_Static_assert((MAX_POSSIBLE_LOG_GENS >= 4) && (MAX_POSSIBLE_LOG_GENS < MAX_LOG_FILE_ID), + "Invalid number of log generation numbers"); _Static_assert(MAX_POSSIBLE_LOG_GENS < MAX_PAGE_CHUNK_ID, - "Invalid number of chunk ids for serial distance to work"); + "Invalid number of chunk ids for serial distance to work"); _Static_assert((LOG_REGION_SIZE / ERASE_UNIT_SIZE) >= 2, - "Need to have at least 2 eraseable units for flash logging to work"); + "Need to have at least 2 eraseable units for flash logging to work"); _Static_assert((LOG_REGION_SIZE % LOG_PAGE_SIZE) == 0, - "The log page size must be divisible by the log region size"); + "The log page size must be divisible by the log region size"); _Static_assert(((FLASH_REGION_DEBUG_DB_END % ERASE_UNIT_SIZE) == 0) && - ((FLASH_REGION_DEBUG_DB_END % ERASE_UNIT_SIZE) == 0), - "Space for flash logging must be aligned on an erase region boundary"); -_Static_assert(LOG_PAGE_SIZE <= ERASE_UNIT_SIZE, - "Log pages must fit within an erase unit"); + ((FLASH_REGION_DEBUG_DB_END % ERASE_UNIT_SIZE) == 0), + "Space for flash logging must be aligned on an erase region boundary"); +_Static_assert(LOG_PAGE_SIZE <= ERASE_UNIT_SIZE, "Log pages must fit within an erase unit"); _Static_assert((ERASE_UNIT_SIZE % LOG_PAGE_SIZE) == 0, - "The log page size must be divisible by the erase unit size"); + "The log page size must be divisible by the erase unit size"); //! Given the current address and amount to increment it by, handles wrapping //! and computes the valid flash address static uint32_t prv_get_page_addr(uint32_t curr_page_addr, uint32_t incr_by) { uint32_t new_offset = - ((curr_page_addr - FLASH_REGION_DEBUG_DB_BEGIN) + incr_by) % - LOG_REGION_SIZE; + ((curr_page_addr - FLASH_REGION_DEBUG_DB_BEGIN) + incr_by) % LOG_REGION_SIZE; return (new_offset + FLASH_REGION_DEBUG_DB_BEGIN); } @@ -151,7 +147,9 @@ static uint8_t prv_get_next_log_file_id(uint8_t file_id) { } static uint32_t prv_get_unit_base_address(uint32_t addr) { -#if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) || defined(CONFIG_BOARD_QEMU_EMERY) || defined(CONFIG_BOARD_QEMU_FLINT) || defined(CONFIG_BOARD_QEMU_GABBRO) +#if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) || \ + defined(CONFIG_BOARD_GETAFIX) || defined(CONFIG_BOARD_QEMU_EMERY) || \ + defined(CONFIG_BOARD_QEMU_FLINT) || defined(CONFIG_BOARD_QEMU_GABBRO) return flash_get_subsector_base_address(addr); #else #error "Invalid platform!" @@ -159,7 +157,9 @@ static uint32_t prv_get_unit_base_address(uint32_t addr) { } static void prv_erase_unit(uint32_t addr) { -#if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) || defined(CONFIG_BOARD_QEMU_EMERY) || defined(CONFIG_BOARD_QEMU_FLINT) || defined(CONFIG_BOARD_QEMU_GABBRO) +#if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) || \ + defined(CONFIG_BOARD_GETAFIX) || defined(CONFIG_BOARD_QEMU_EMERY) || \ + defined(CONFIG_BOARD_QEMU_FLINT) || defined(CONFIG_BOARD_QEMU_GABBRO) flash_erase_subsector_blocking(addr); #else #error "Invalid platform!" @@ -168,8 +168,8 @@ static void prv_erase_unit(uint32_t addr) { static void prv_format_flash_logging_region(void) { uint32_t sector_addr; - for (sector_addr = FLASH_REGION_DEBUG_DB_BEGIN; - sector_addr < FLASH_REGION_DEBUG_DB_END; sector_addr += ERASE_UNIT_SIZE) { + for (sector_addr = FLASH_REGION_DEBUG_DB_BEGIN; sector_addr < FLASH_REGION_DEBUG_DB_END; + sector_addr += ERASE_UNIT_SIZE) { prv_erase_unit(sector_addr); } } @@ -198,13 +198,13 @@ static uint32_t prv_validate_flash_log_region(uint8_t *first_log_file_id) { FlashLoggingHeader hdr; flash_read_bytes((uint8_t *)&hdr, flash_addr, sizeof(hdr)); - if (!prv_flash_log_valid(&hdr)) { // is the region erased ? + if (!prv_flash_log_valid(&hdr)) { // is the region erased ? FlashLoggingHeader erased_hdr; memset(&erased_hdr, 0xff, sizeof(erased_hdr)); bool region_erased = (memcmp(&erased_hdr, &hdr, sizeof(hdr)) == 0); - if (!region_erased) { // unrecognized format, erase everything + if (!region_erased) { // unrecognized format, erase everything prv_format_flash_logging_region(); - return (UINT32_MAX); // no region in use after formatting + return (UINT32_MAX); // no region in use after formatting } } else if (first_used_region == UINT32_MAX) { first_used_region = offset; @@ -218,8 +218,7 @@ static uint32_t prv_validate_flash_log_region(uint8_t *first_log_file_id) { //! @param[out] start_page_addr - the address of the page the log starts on //! @return the number of pages in the log file requested or 0 if no //! file is found -static int prv_get_start_of_log_file(uint8_t log_file_id, - uint32_t *start_page_addr) { +static int prv_get_start_of_log_file(uint8_t log_file_id, uint32_t *start_page_addr) { uint8_t num_log_pages = 0; uint8_t prev_chunk_id = 0; uint32_t log_start_addr = FLASH_LOG_INVALID_ADDR; @@ -240,18 +239,17 @@ static int prv_get_start_of_log_file(uint8_t log_file_id, num_log_pages++; - int32_t dist = serial_distance(prev_chunk_id, hdr.log_chunk_id, - LOG_ID_BITWIDTH); + int32_t dist = serial_distance(prev_chunk_id, hdr.log_chunk_id, LOG_ID_BITWIDTH); if (log_start_addr == FLASH_LOG_INVALID_ADDR) { // this is the first page we've found log_start_addr = flash_addr; - dist = 0; // nothing else to compare against yet + dist = 0; // nothing else to compare against yet } if ((dist == 0) || (dist == 1)) { prev_chunk_id = hdr.log_chunk_id; - continue; // keep looking + continue; // keep looking } // we have found a gap in the number sequence which means we have found @@ -294,7 +292,7 @@ void flash_logging_init(void) { uint8_t prev_log_id = 0; uint32_t first_used_region = prv_validate_flash_log_region(&prev_log_id); - if (first_used_region == UINT32_MAX) { // no logs exist so start at region 0 + if (first_used_region == UINT32_MAX) { // no logs exist so start at region 0 s_curr_state.page_start_addr = FLASH_REGION_DEBUG_DB_BEGIN; goto done; } @@ -311,13 +309,12 @@ void flash_logging_init(void) { if (prv_flash_log_valid(&hdr)) { // we use serial distance to find the gap in the numbering - int32_t dist = serial_distance(prev_log_id, hdr.log_file_id, - LOG_ID_BITWIDTH); + int32_t dist = serial_distance(prev_log_id, hdr.log_file_id, LOG_ID_BITWIDTH); if ((dist == 0) || (dist == 1)) { prev_log_id = hdr.log_file_id; multiple_gens_found |= (dist != 0 && offset != 0); - continue; // keep looking + continue; // keep looking } // we have found a page to use, but we need to erase the contents first @@ -333,8 +330,8 @@ void flash_logging_init(void) { // everything was in increasing order or there was only one log generation // if there was only one log generation, we must find the oldest part of it if (!new_log_region_found) { - if (multiple_gens_found || (prv_get_start_of_log_file(prev_log_id, - &s_curr_state.page_start_addr) == 0)) { + if (multiple_gens_found || + (prv_get_start_of_log_file(prev_log_id, &s_curr_state.page_start_addr) == 0)) { s_curr_state.page_start_addr = FLASH_REGION_DEBUG_DB_BEGIN; } @@ -344,7 +341,7 @@ void flash_logging_init(void) { s_curr_state.log_file_id = prv_get_next_log_file_id(prev_log_id); } -done: // we have allocated a region to be used +done: // we have allocated a region to be used prv_allocate_page_for_use(); flash_logging_set_enabled(true); } @@ -365,8 +362,7 @@ static void prv_write_flash_log_record_header(uint8_t msg_length) { } uint32_t flash_logging_log_start(uint8_t msg_length) { - if ((msg_length == 0) || (msg_length > MAX_MSG_LEN) || - !s_flash_logging_enabled) { + if ((msg_length == 0) || (msg_length > MAX_MSG_LEN) || !s_flash_logging_enabled) { return FLASH_LOG_INVALID_ADDR; } @@ -376,16 +372,15 @@ uint32_t flash_logging_log_start(uint8_t msg_length) { uint32_t payload_size = sizeof(LogRecordHeader) + msg_length; if ((s_curr_state.offset_in_log_page + payload_size) <= LOG_PAGE_SIZE) { - goto done; // there is enough space in the current page + goto done; // there is enough space in the current page } // out of space, mark end of page - uint32_t new_flash_addr = prv_get_page_addr(s_curr_state.page_start_addr, - LOG_PAGE_SIZE); + uint32_t new_flash_addr = prv_get_page_addr(s_curr_state.page_start_addr, LOG_PAGE_SIZE); uint32_t curr_sector = s_curr_state.page_start_addr / ERASE_UNIT_SIZE; uint32_t new_sector = new_flash_addr / ERASE_UNIT_SIZE; - if (curr_sector != new_sector) { // have we crossed into a new erase region ? + if (curr_sector != new_sector) { // have we crossed into a new erase region ? prv_erase_unit(prv_get_unit_base_address(new_flash_addr)); } @@ -393,17 +388,14 @@ uint32_t flash_logging_log_start(uint8_t msg_length) { prv_allocate_page_for_use(); done: - s_curr_state.log_start_addr = s_curr_state.offset_in_log_page + - s_curr_state.page_start_addr; + s_curr_state.log_start_addr = s_curr_state.offset_in_log_page + s_curr_state.page_start_addr; s_curr_state.bytes_remaining = msg_length; prv_write_flash_log_record_header(msg_length); return (s_curr_state.log_start_addr); } -bool flash_logging_write(const uint8_t *data_to_write, uint32_t flash_addr, - uint32_t read_length) { - +bool flash_logging_write(const uint8_t *data_to_write, uint32_t flash_addr, uint32_t read_length) { if ((s_curr_state.bytes_remaining < read_length) || !s_flash_logging_enabled) { return (false); } @@ -417,8 +409,7 @@ bool flash_logging_write(const uint8_t *data_to_write, uint32_t flash_addr, if (s_curr_state.bytes_remaining == 0) { // we are done with the current log record, mark it valid uint8_t flags = ~(LOG_FLAGS_VALID); - flash_write_bytes((uint8_t *)&flags, s_curr_state.log_start_addr, - sizeof(flags)); + flash_write_bytes((uint8_t *)&flags, s_curr_state.log_start_addr, sizeof(flags)); } return (true); @@ -438,8 +429,8 @@ static void prv_dump_log_system_cb(void *context) { // use the read buffer to also hold build id str. Each byte of the build ID requires 2 // characters. - const int off = MEMBER_SIZE(DumpLogState, msg_buf) - - 2 * MEMBER_SIZE(FlashLoggingHeader, build_id) - 1; + const int off = + MEMBER_SIZE(DumpLogState, msg_buf) - 2 * MEMBER_SIZE(FlashLoggingHeader, build_id) - 1; uint8_t build_id[MEMBER_SIZE(FlashLoggingHeader, build_id)]; uint32_t build_id_addr = flash_addr + offsetof(FlashLoggingHeader, build_id); @@ -490,7 +481,6 @@ static void prv_dump_log_system_cb(void *context) { state->page_offset += rec.length + sizeof(rec); } - // If we're done with this page, onto the next if (page_done || state->page_offset + sizeof(LogRecordHeader) >= LOG_PAGE_SIZE) { state->page_index++; @@ -499,7 +489,7 @@ static void prv_dump_log_system_cb(void *context) { status = DumpStatus_DoneSuccess; } else { status = DumpStatus_InProgress; - PBL_LOG_DBG("Dumping page %d of %d", state->page_index, state->num_pages-1); + PBL_LOG_DBG("Dumping page %d of %d", state->page_index, state->num_pages - 1); } } @@ -513,7 +503,6 @@ static void prv_dump_log_system_cb(void *context) { } } - bool flash_dump_log_file(int generation, DumpLineCallback line_cb, DumpCompletedCallback completed_cb) { uint8_t log_file_id = generation_to_log_file_id(generation); @@ -524,19 +513,19 @@ bool flash_dump_log_file(int generation, DumpLineCallback line_cb, if (num_log_pages == 0) { completed_cb(false); - return (false); // no match found + return (false); // no match found } DumpLogState *state = kernel_malloc_check(sizeof(DumpLogState)); // Init our state - *state = (DumpLogState) { - .log_start_addr = log_start_addr, - .page_index = 0, - .num_pages = num_log_pages, - .page_offset = sizeof(FlashLoggingHeader), - .line_cb = line_cb, - .completed_cb = completed_cb, + *state = (DumpLogState){ + .log_start_addr = log_start_addr, + .page_index = 0, + .num_pages = num_log_pages, + .page_offset = sizeof(FlashLoggingHeader), + .line_cb = line_cb, + .completed_cb = completed_cb, }; // Kick it off @@ -546,7 +535,7 @@ bool flash_dump_log_file(int generation, DumpLineCallback line_cb, //! For unit tests void test_flash_logging_get_info(uint32_t *tot_size, uint32_t *erase_unit_size, - uint32_t *chunk_size, uint32_t *page_hdr_size) { + uint32_t *chunk_size, uint32_t *page_hdr_size) { *tot_size = LOG_REGION_SIZE; *erase_unit_size = ERASE_UNIT_SIZE; *chunk_size = LOG_PAGE_SIZE; diff --git a/src/fw/debug/flash_logging.h b/src/fw/debug/flash_logging.h index 6f186da0f7..97ec67d999 100644 --- a/src/fw/debug/flash_logging.h +++ b/src/fw/debug/flash_logging.h @@ -25,8 +25,7 @@ uint32_t flash_logging_log_start(uint8_t msg_length); //! Performs a log message write //! //! @return True if the message write was successful, false otherwise -bool flash_logging_write(const uint8_t *data_to_write, uint32_t flash_addr, - uint32_t data_length); +bool flash_logging_write(const uint8_t *data_to_write, uint32_t flash_addr, uint32_t data_length); //! Allows a user to disable/enable flash logging after flash_logging_init() //! has been called. diff --git a/src/fw/debug/power_tracking.c b/src/fw/debug/power_tracking.c index d9388bae1c..ad83186536 100644 --- a/src/fw/debug/power_tracking.c +++ b/src/fw/debug/power_tracking.c @@ -16,62 +16,62 @@ void power_tracking_init(void) { void power_tracking_start(PowerSystem system) { // sanitize all uses of this function when you implement it - (void) system; + (void)system; } void power_tracking_stop(PowerSystem system) { // sanitize all uses of this function when you implement it - (void) system; + (void)system; } -#else // SW_POWER_TRACKING +#else // SW_POWER_TRACKING static bool s_initialized = false; typedef struct { - const char* const name; + const char *const name; RtcTicks start_ticks; RtcTicks total_ticks; bool dirty; } DiscreteSystemProfile; static DiscreteSystemProfile s_discrete_consumer_profiles[num_power_systems] = { - [PowerSystem2v5Reg] = { "2v5Reg", 0, 0, false}, - [PowerSystem5vReg] = { "5vReg", 0, 0, false}, - [PowerSystemMcuCoreSleep] = { "McuCoreSleep", 0, 0, false}, - [PowerSystemMcuCoreRun] = { "McuCoreRun", 0, 0, false}, - [PowerSystemMcuGpioA] = { "McuGpioA", 0, 0, false}, - [PowerSystemMcuGpioB] = { "McuGpioB", 0, 0, false}, - [PowerSystemMcuGpioC] = { "McuGpioC", 0, 0, false}, - [PowerSystemMcuGpioD] = { "McuGpioD", 0, 0, false}, - [PowerSystemMcuGpioH] = { "McuGpioH", 0, 0, false}, - [PowerSystemMcuCrc] = { "McuCrc", 0, 0, false}, - [PowerSystemMcuPwr] = { "McuPwr", 0, 0, false}, - [PowerSystemMcuDma1] = { "McuDma1", 0, 0, false}, - [PowerSystemMcuDma2] = { "McuDma2", 0, 0, false}, - [PowerSystemMcuTim1] = { "McuTim1", 0, 0, false}, - [PowerSystemMcuTim3] = { "McuTim3", 0, 0, false}, - [PowerSystemMcuTim4] = { "McuTim4", 0, 0, false}, - [PowerSystemMcuUsart1] = { "McuUsart1", 0, 0, false}, - [PowerSystemMcuUsart3] = { "McuUsart3", 0, 0, false}, - [PowerSystemMcuI2C1] = { "McuI2C1", 0, 0, false}, - [PowerSystemMcuI2C2] = { "McuI2C2", 0, 0, false}, - [PowerSystemMcuSpi1] = { "McuSpi1", 0, 0, false}, - [PowerSystemMcuSpi6] = { "McuSpi6", 0, 0, false}, - [PowerSystemMcuAdc1] = { "McuAdc1", 0, 0, false}, - [PowerSystemMcuAdc2] = { "McuAdc2", 0, 0, false}, - [PowerSystemFlashRead] = { "FlashRead", 0, 0, false}, - [PowerSystemFlashWrite] = { "FlashWrite", 0, 0, false}, - [PowerSystemFlashErase] = { "FlashErase", 0, 0, false}, - [PowerSystemAccelLowPower] = { "AccelLowPower", 0, 0, false}, - [PowerSystemAccelNormal] = { "AccelNormal", 0, 0, false}, - [PowerSystemMfi] = { "Mfi", 0, 0, false}, - [PowerSystemMag] = { "Mag", 0, 0, false}, - [PowerSystemBtShutdown] = { "BtShutdown", 0, 0, false}, - [PowerSystemBtDeepSleep] = { "BtDeepSleep", 0, 0, false}, - [PowerSystemBtActive] = { "BtActive", 0, 0, false}, - [PowerSystemAmbient] = { "Ambient", 0, 0, false}, - [PowerSystemProfiling] = { "Profiling", 0, 0, false}, + [PowerSystem2v5Reg] = {"2v5Reg", 0, 0, false}, + [PowerSystem5vReg] = {"5vReg", 0, 0, false}, + [PowerSystemMcuCoreSleep] = {"McuCoreSleep", 0, 0, false}, + [PowerSystemMcuCoreRun] = {"McuCoreRun", 0, 0, false}, + [PowerSystemMcuGpioA] = {"McuGpioA", 0, 0, false}, + [PowerSystemMcuGpioB] = {"McuGpioB", 0, 0, false}, + [PowerSystemMcuGpioC] = {"McuGpioC", 0, 0, false}, + [PowerSystemMcuGpioD] = {"McuGpioD", 0, 0, false}, + [PowerSystemMcuGpioH] = {"McuGpioH", 0, 0, false}, + [PowerSystemMcuCrc] = {"McuCrc", 0, 0, false}, + [PowerSystemMcuPwr] = {"McuPwr", 0, 0, false}, + [PowerSystemMcuDma1] = {"McuDma1", 0, 0, false}, + [PowerSystemMcuDma2] = {"McuDma2", 0, 0, false}, + [PowerSystemMcuTim1] = {"McuTim1", 0, 0, false}, + [PowerSystemMcuTim3] = {"McuTim3", 0, 0, false}, + [PowerSystemMcuTim4] = {"McuTim4", 0, 0, false}, + [PowerSystemMcuUsart1] = {"McuUsart1", 0, 0, false}, + [PowerSystemMcuUsart3] = {"McuUsart3", 0, 0, false}, + [PowerSystemMcuI2C1] = {"McuI2C1", 0, 0, false}, + [PowerSystemMcuI2C2] = {"McuI2C2", 0, 0, false}, + [PowerSystemMcuSpi1] = {"McuSpi1", 0, 0, false}, + [PowerSystemMcuSpi6] = {"McuSpi6", 0, 0, false}, + [PowerSystemMcuAdc1] = {"McuAdc1", 0, 0, false}, + [PowerSystemMcuAdc2] = {"McuAdc2", 0, 0, false}, + [PowerSystemFlashRead] = {"FlashRead", 0, 0, false}, + [PowerSystemFlashWrite] = {"FlashWrite", 0, 0, false}, + [PowerSystemFlashErase] = {"FlashErase", 0, 0, false}, + [PowerSystemAccelLowPower] = {"AccelLowPower", 0, 0, false}, + [PowerSystemAccelNormal] = {"AccelNormal", 0, 0, false}, + [PowerSystemMfi] = {"Mfi", 0, 0, false}, + [PowerSystemMag] = {"Mag", 0, 0, false}, + [PowerSystemBtShutdown] = {"BtShutdown", 0, 0, false}, + [PowerSystemBtDeepSleep] = {"BtDeepSleep", 0, 0, false}, + [PowerSystemBtActive] = {"BtActive", 0, 0, false}, + [PowerSystemAmbient] = {"Ambient", 0, 0, false}, + [PowerSystemProfiling] = {"Profiling", 0, 0, false}, }; static const uint16_t power_tracking_integration_period_s = 1; @@ -79,8 +79,8 @@ static const uint16_t power_tracking_integration_period_s = 1; static void power_tracking_flush(void *); static RegularTimerInfo s_power_profile_timer = { - .list_node = { 0, 0 }, - .cb = power_tracking_flush, + .list_node = {0, 0}, + .cb = power_tracking_flush, }; static void power_tracking_flush(void *null) { @@ -89,7 +89,7 @@ static void power_tracking_flush(void *null) { RtcTicks log_record_time = rtc_get_ticks(); char buffer[32]; - for (int i = 0; idirty) { @@ -108,7 +108,8 @@ static void power_tracking_flush(void *null) { if (total_ticks != 0) { // dump the current ticks - dbgserial_putstr_fmt(buffer, sizeof(buffer), ">>>PWR:%"PRIu64",%s,%"PRIu64"<", log_record_time, current_profile->name, total_ticks); + dbgserial_putstr_fmt(buffer, sizeof(buffer), ">>>PWR:%" PRIu64 ",%s,%" PRIu64 "<", + log_record_time, current_profile->name, total_ticks); } } } @@ -116,9 +117,11 @@ static void power_tracking_flush(void *null) { } void power_tracking_init(void) { - regular_timer_add_multisecond_callback(&s_power_profile_timer, power_tracking_integration_period_s); + regular_timer_add_multisecond_callback(&s_power_profile_timer, + power_tracking_integration_period_s); char buffer[32]; - dbgserial_putstr_fmt(buffer, sizeof(buffer), ">>>PWR:%"PRIu64",START,%"PRIu16, rtc_get_ticks(), power_tracking_integration_period_s); + dbgserial_putstr_fmt(buffer, sizeof(buffer), ">>>PWR:%" PRIu64 ",START,%" PRIu16, rtc_get_ticks(), + power_tracking_integration_period_s); s_initialized = true; } @@ -152,7 +155,8 @@ void power_tracking_stop(PowerSystem system) { DiscreteSystemProfile *current_profile = &s_discrete_consumer_profiles[system]; if (current_profile->start_ticks == 0) { - PBL_LOG_WRN("Stop ticks before start called: probably losing profile accuracy in %s", current_profile->name); + PBL_LOG_WRN("Stop ticks before start called: probably losing profile accuracy in %s", + current_profile->name); // Someone was careless: two cases: // 1) someone forgot to call start // 2) someone re-entered a function that called stop already, so it is called twice. @@ -164,5 +168,4 @@ void power_tracking_stop(PowerSystem system) { current_profile->start_ticks = 0; } - -#endif // SW_POWER_TRACKING +#endif // SW_POWER_TRACKING diff --git a/src/fw/debug/power_tracking.h b/src/fw/debug/power_tracking.h index 33376b18b2..e54ce0f5f7 100644 --- a/src/fw/debug/power_tracking.h +++ b/src/fw/debug/power_tracking.h @@ -42,21 +42,21 @@ typedef enum { PowerSystemMcuGpioC, PowerSystemMcuGpioD, PowerSystemMcuGpioH, - PowerSystemMcuCrc, // Flash - PowerSystemMcuPwr, // Everything - PowerSystemMcuDma1, // Display - PowerSystemMcuDma2, // BT - PowerSystemMcuTim1, // Future use for the vibe PWM - PowerSystemMcuTim3, // Used for the backlight PWM - PowerSystemMcuTim4, // Used for the button debouncer - PowerSystemMcuUsart1, // Used for BT - PowerSystemMcuUsart3, // dbgserial - PowerSystemMcuI2C1, // Main I2C - PowerSystemMcuI2C2, // 2V5 I2C - PowerSystemMcuSpi1, // FLASH - PowerSystemMcuSpi6, // LCD - PowerSystemMcuAdc1, // Voltage monitoring & ambient light sensing - PowerSystemMcuAdc2, // Voltage monitoring & ambient light sensing + PowerSystemMcuCrc, // Flash + PowerSystemMcuPwr, // Everything + PowerSystemMcuDma1, // Display + PowerSystemMcuDma2, // BT + PowerSystemMcuTim1, // Future use for the vibe PWM + PowerSystemMcuTim3, // Used for the backlight PWM + PowerSystemMcuTim4, // Used for the button debouncer + PowerSystemMcuUsart1, // Used for BT + PowerSystemMcuUsart3, // dbgserial + PowerSystemMcuI2C1, // Main I2C + PowerSystemMcuI2C2, // 2V5 I2C + PowerSystemMcuSpi1, // FLASH + PowerSystemMcuSpi6, // LCD + PowerSystemMcuAdc1, // Voltage monitoring & ambient light sensing + PowerSystemMcuAdc2, // Voltage monitoring & ambient light sensing PowerSystemFlashRead, PowerSystemFlashWrite, PowerSystemFlashErase, @@ -67,8 +67,8 @@ typedef enum { PowerSystemBtShutdown, PowerSystemBtDeepSleep, PowerSystemBtActive, - PowerSystemAmbient, - PowerSystemProfiling, // So that we can diminish the effects that dumping the profile logs has + PowerSystemAmbient, + PowerSystemProfiling, // So that we can diminish the effects that dumping the profile logs has num_power_systems, } PowerSystem; @@ -78,20 +78,21 @@ void power_tracking_start(PowerSystem system); void power_tracking_stop(PowerSystem system); #if defined(SW_POWER_TRACKING) - #define PWR_TRACK(system, state_fmt, args...) \ - { \ - power_tracking_start(PowerSystemProfiling); \ - char buffer[64]; \ - dbgserial_putstr_fmt(buffer, sizeof(buffer), ">>>PWR:%"PRIu64",%s,"state_fmt"<", rtc_get_ticks(), system, ## args); \ - power_tracking_stop(PowerSystemProfiling); \ - } +#define PWR_TRACK(system, state_fmt, args...) \ + { \ + power_tracking_start(PowerSystemProfiling); \ + char buffer[64]; \ + dbgserial_putstr_fmt(buffer, sizeof(buffer), ">>>PWR:%" PRIu64 ",%s," state_fmt "<", \ + rtc_get_ticks(), system, ##args); \ + power_tracking_stop(PowerSystemProfiling); \ + } #else - #define PWR_TRACK(system, state_fmt, args...) +#define PWR_TRACK(system, state_fmt, args...) #endif - -#define PWR_TRACK_BATT(chg_state, voltage) PWR_TRACK("Battery", "%s,%u", chg_state, voltage) -#define PWR_TRACK_ACCEL(state, frequency) PWR_TRACK("Accel", "%s,%u", state, frequency) -#define PWR_TRACK_MAG(state, adc_rate) PWR_TRACK("Mag", "%s,%u", state, adc_rate) -#define PWR_TRACK_VIBE(state, freq, duty) PWR_TRACK("Vibe", "%s,%u,%u", state, freq, duty) -#define PWR_TRACK_BACKLIGHT(state, freq, duty) PWR_TRACK("Backlight", "%s,%"PRIu32",%u", state, freq, duty) +#define PWR_TRACK_BATT(chg_state, voltage) PWR_TRACK("Battery", "%s,%u", chg_state, voltage) +#define PWR_TRACK_ACCEL(state, frequency) PWR_TRACK("Accel", "%s,%u", state, frequency) +#define PWR_TRACK_MAG(state, adc_rate) PWR_TRACK("Mag", "%s,%u", state, adc_rate) +#define PWR_TRACK_VIBE(state, freq, duty) PWR_TRACK("Vibe", "%s,%u,%u", state, freq, duty) +#define PWR_TRACK_BACKLIGHT(state, freq, duty) \ + PWR_TRACK("Backlight", "%s,%" PRIu32 ",%u", state, freq, duty) diff --git a/src/fw/drivers/ambient/ambient_light_common.c b/src/fw/drivers/ambient/ambient_light_common.c index 8b1f8450bb..40892e7ce2 100644 --- a/src/fw/drivers/ambient/ambient_light_common.c +++ b/src/fw/drivers/ambient/ambient_light_common.c @@ -85,6 +85,5 @@ uint32_t ambient_light_level_to_lux(uint32_t light_level) { if (light_level <= offset) { return 0; } - return (uint32_t)(((uint64_t)(light_level - offset) * - BOARD_CONFIG.ambient_light_lux_num) / den); + return (uint32_t)(((uint64_t)(light_level - offset) * BOARD_CONFIG.ambient_light_lux_num) / den); } diff --git a/src/fw/drivers/ambient/ambient_light_opt3001.c b/src/fw/drivers/ambient/ambient_light_opt3001.c index 10a5010cdb..f4a4c0d6b4 100644 --- a/src/fw/drivers/ambient/ambient_light_opt3001.c +++ b/src/fw/drivers/ambient/ambient_light_opt3001.c @@ -17,12 +17,12 @@ static bool s_initialized = false; #define OPT3001_RESULT 0x00 #define OPT3001_RESULT_EXPONENT_SHIFT 12 -#define OPT3001_RESULT_MANTISSA_MASK 0x0FFF +#define OPT3001_RESULT_MANTISSA_MASK 0x0FFF #define OPT3001_CONFIG 0x01 -#define OPT3001_CONFIG_RANGE_AUTO 0xC000 +#define OPT3001_CONFIG_RANGE_AUTO 0xC000 #define OPT3001_CONFIG_CONVTIME_100MSEC 0x0000 -#define OPT3001_CONFIG_MODE_CONTINUOUS 0x0600 -#define OPT3001_CONFIG_MODE_SINGLESHOT 0x0200 +#define OPT3001_CONFIG_MODE_CONTINUOUS 0x0600 +#define OPT3001_CONFIG_MODE_SINGLESHOT 0x0200 #define OPT3001_MFGID 0x7E #define OPT3001_MFGID_VAL 0x5449 /* "TI" */ #define OPT3001_DEVID 0x7F @@ -39,7 +39,7 @@ static bool prv_read_register(uint8_t register_address, uint16_t *result) { static bool prv_write_register(uint8_t register_address, uint16_t datum) { i2c_use(I2C_OPT3001); - uint8_t block[3] = { register_address, datum >> 8, datum & 0xFF }; + uint8_t block[3] = {register_address, datum >> 8, datum & 0xFF}; bool rv = i2c_write_block(I2C_OPT3001, 3, block); i2c_release(I2C_OPT3001); return rv; @@ -66,7 +66,8 @@ void ambient_light_init(void) { } if (BOARD_CONFIG.als_always_on) { - prv_write_register(OPT3001_CONFIG, OPT3001_CONFIG_RANGE_AUTO | OPT3001_CONFIG_CONVTIME_100MSEC | OPT3001_CONFIG_MODE_CONTINUOUS); + prv_write_register(OPT3001_CONFIG, OPT3001_CONFIG_RANGE_AUTO | OPT3001_CONFIG_CONVTIME_100MSEC | + OPT3001_CONFIG_MODE_CONTINUOUS); } ambient_light_common_init(); @@ -83,9 +84,10 @@ uint32_t ambient_light_get_light_level(void) { if (!s_initialized) { return BOARD_CONFIG.ambient_light_dark_threshold; } - + if (!BOARD_CONFIG.als_always_on) { - prv_write_register(OPT3001_CONFIG, OPT3001_CONFIG_RANGE_AUTO | OPT3001_CONFIG_CONVTIME_100MSEC | OPT3001_CONFIG_MODE_SINGLESHOT); + prv_write_register(OPT3001_CONFIG, OPT3001_CONFIG_RANGE_AUTO | OPT3001_CONFIG_CONVTIME_100MSEC | + OPT3001_CONFIG_MODE_SINGLESHOT); } uint16_t result; @@ -100,7 +102,7 @@ uint32_t ambient_light_get_light_level(void) { void command_als_read(void) { char buffer[16]; - prompt_send_response_fmt(buffer, sizeof(buffer), "%"PRIu32"", ambient_light_get_light_level()); + prompt_send_response_fmt(buffer, sizeof(buffer), "%" PRIu32 "", ambient_light_get_light_level()); } uint32_t ambient_light_get_dark_threshold(void) { diff --git a/src/fw/drivers/ambient/ambient_light_w1160.c b/src/fw/drivers/ambient/ambient_light_w1160.c index 264e109b47..4d22923eed 100644 --- a/src/fw/drivers/ambient/ambient_light_w1160.c +++ b/src/fw/drivers/ambient/ambient_light_w1160.c @@ -15,63 +15,63 @@ PBL_LOG_MODULE_DEFINE(driver_ambient_w1160, CONFIG_DRIVER_AMBIENT_LOG_LEVEL); // Registers -#define W1160_STATE_REG 0x00 -#define W1160_IT_FAST1_REG 0x02 -#define W1160_IT_FAST2_REG 0x03 -#define W1160_SAMPLE_FAST1_REG 0x05 -#define W1160_SAMPLE_FAST2_REG 0x06 -#define W1160_SAMPLE_SLOW1_REG 0x07 -#define W1160_SAMPLE_SLOW2_REG 0x08 -#define W1160_FLAG1_REG 0x10 -#define W1160_DATA1_ALS_REG 0x13 -#define W1160_DATA2_ALS_REG 0x14 -#define W1160_DATA_GC_REG 0x17 -#define W1160_POWER_MODE_REG 0x3D -#define W1160_PDT_ID_REG 0x3E -#define W1160_FIFOCTRL1_REG 0x60 -#define W1160_FIFOCTRL1_REG_VALUE 0x20 -#define W1160_FIFO1_WM_LV_REG 0x61 -#define W1160_FIFO2_WM_LV_REG 0x62 -#define W1160_FIFOCTRL2_REG 0x63 -#define W1160_FIFO_FCNT1_REG 0x64 -#define W1160_FIFO_FCNT2_REG 0x65 -#define W1160_FIFO_OUT_REG 0x66 -#define W1160_FIFO_FLAG_REG 0x67 -#define W1160_FIFOCTRL3_REG 0x68 -#define W1160_FIFOCTRL4_REG 0x69 -#define W1160_AGCCTRL1_REG 0x6A -#define W1160_MANUAL_GAIN_CTRL_REG 0x6B -#define W1160_AGCCTRL2_REG 0x6C -#define W1160_THD_SAT_GC_REG 0x6D -#define W1160_IT_SLOW1_REG 0x6E -#define W1160_IT_SLOW2_REG 0x6F -#define W1160_SOFT_RESET_REG 0x80 +#define W1160_STATE_REG 0x00 +#define W1160_IT_FAST1_REG 0x02 +#define W1160_IT_FAST2_REG 0x03 +#define W1160_SAMPLE_FAST1_REG 0x05 +#define W1160_SAMPLE_FAST2_REG 0x06 +#define W1160_SAMPLE_SLOW1_REG 0x07 +#define W1160_SAMPLE_SLOW2_REG 0x08 +#define W1160_FLAG1_REG 0x10 +#define W1160_DATA1_ALS_REG 0x13 +#define W1160_DATA2_ALS_REG 0x14 +#define W1160_DATA_GC_REG 0x17 +#define W1160_POWER_MODE_REG 0x3D +#define W1160_PDT_ID_REG 0x3E +#define W1160_FIFOCTRL1_REG 0x60 +#define W1160_FIFOCTRL1_REG_VALUE 0x20 +#define W1160_FIFO1_WM_LV_REG 0x61 +#define W1160_FIFO2_WM_LV_REG 0x62 +#define W1160_FIFOCTRL2_REG 0x63 +#define W1160_FIFO_FCNT1_REG 0x64 +#define W1160_FIFO_FCNT2_REG 0x65 +#define W1160_FIFO_OUT_REG 0x66 +#define W1160_FIFO_FLAG_REG 0x67 +#define W1160_FIFOCTRL3_REG 0x68 +#define W1160_FIFOCTRL4_REG 0x69 +#define W1160_AGCCTRL1_REG 0x6A +#define W1160_MANUAL_GAIN_CTRL_REG 0x6B +#define W1160_AGCCTRL2_REG 0x6C +#define W1160_THD_SAT_GC_REG 0x6D +#define W1160_IT_SLOW1_REG 0x6E +#define W1160_IT_SLOW2_REG 0x6F +#define W1160_SOFT_RESET_REG 0x80 // Configuration register bits -#define W1160_ALSCTRL_REG 0xA4 - -#define W1160_POR_WAIT_TIME (10) /* ms */ -#define W1160_AGCCTRL1_AGC_EN (0<<7) /* 1:en; 0:dis */ -#define W1160_AGCCTRL1_MGC_EN (1) /* 1:en; 0:dis */ -#define W1160_AGCCTRL2_SEL_MODE (1<<2) /* must be 1 */ -#define W1160_AGCCTRL2_12B_MODE (0<<3) /* 1:12bit */ -#define W1160_ALSCTRL_SAT_EN (0<<1) /* 1:en; 0:dis */ -#define W1160_ALSCTRL_DATA_FORMAT12 (0<<2) /* 1:12bit 0:16bit */ -#define W1160_DATA_GC_LVL (15<<4) /* gc lelvel 15 */ -#define W1160_SAT_GC_CONFIG (0x0A) -#define W1160_SLOW_IT_CONFIG1 (0x03) /* 99ms ((0x3E7+1) * 99us) */ -#define W1160_SLOW_IT_CONFIG2 (0xE7) -#define W1160_SLOW_ST_CONFIG1 (0x07) /* 200ms ((0x7CF+1) * 100us) */ -#define W1160_SLOW_ST_CONFIG2 (0xCF) -#define W1160_SAMPLING_EN (1<<1) /* 1:en 0:dis */ -#define W1160_SAMPLING_DIS (0<<1) /* 1:en 0:dis */ -#define W1160_CHIP_ID (0xE5) -#define W1160_FLG_ALS_DR (1<<7) +#define W1160_ALSCTRL_REG 0xA4 + +#define W1160_POR_WAIT_TIME (10) /* ms */ +#define W1160_AGCCTRL1_AGC_EN (0 << 7) /* 1:en; 0:dis */ +#define W1160_AGCCTRL1_MGC_EN (1) /* 1:en; 0:dis */ +#define W1160_AGCCTRL2_SEL_MODE (1 << 2) /* must be 1 */ +#define W1160_AGCCTRL2_12B_MODE (0 << 3) /* 1:12bit */ +#define W1160_ALSCTRL_SAT_EN (0 << 1) /* 1:en; 0:dis */ +#define W1160_ALSCTRL_DATA_FORMAT12 (0 << 2) /* 1:12bit 0:16bit */ +#define W1160_DATA_GC_LVL (15 << 4) /* gc lelvel 15 */ +#define W1160_SAT_GC_CONFIG (0x0A) +#define W1160_SLOW_IT_CONFIG1 (0x03) /* 99ms ((0x3E7+1) * 99us) */ +#define W1160_SLOW_IT_CONFIG2 (0xE7) +#define W1160_SLOW_ST_CONFIG1 (0x07) /* 200ms ((0x7CF+1) * 100us) */ +#define W1160_SLOW_ST_CONFIG2 (0xCF) +#define W1160_SAMPLING_EN (1 << 1) /* 1:en 0:dis */ +#define W1160_SAMPLING_DIS (0 << 1) /* 1:en 0:dis */ +#define W1160_CHIP_ID (0xE5) +#define W1160_FLG_ALS_DR (1 << 7) #define W1160_RESULT_EXPONENT_SHIFT (12) -#define W1160_RESULT_MANTISSA_MASK (0x0FFF) +#define W1160_RESULT_MANTISSA_MASK (0x0FFF) -#define W1160_ALS_POLL_DELAY_MS (5) /* ms between data-ready polls */ -#define W1160_ALS_POLL_TIMEOUT_MS (200) /* max wait for ALS data-ready */ +#define W1160_ALS_POLL_DELAY_MS (5) /* ms between data-ready polls */ +#define W1160_ALS_POLL_TIMEOUT_MS (200) /* max wait for ALS data-ready */ static bool s_initialized; static uint32_t s_sensor_light_dark_threshold; @@ -136,8 +136,8 @@ void ambient_light_init(void) { rv = prv_write_register(W1160_AGCCTRL1_REG, W1160_AGCCTRL1_AGC_EN); rv &= prv_write_register(W1160_MANUAL_GAIN_CTRL_REG, W1160_AGCCTRL1_MGC_EN); rv &= prv_write_register(W1160_DATA_GC_REG, W1160_DATA_GC_LVL); - rv &= prv_write_register(W1160_AGCCTRL2_REG, W1160_AGCCTRL2_SEL_MODE|W1160_AGCCTRL2_12B_MODE); - rv &= prv_write_register(W1160_ALSCTRL_REG, W1160_ALSCTRL_SAT_EN|W1160_ALSCTRL_DATA_FORMAT12); + rv &= prv_write_register(W1160_AGCCTRL2_REG, W1160_AGCCTRL2_SEL_MODE | W1160_AGCCTRL2_12B_MODE); + rv &= prv_write_register(W1160_ALSCTRL_REG, W1160_ALSCTRL_SAT_EN | W1160_ALSCTRL_DATA_FORMAT12); rv &= prv_write_register(W1160_THD_SAT_GC_REG, W1160_SAT_GC_CONFIG); rv &= prv_write_register(W1160_IT_SLOW1_REG, W1160_SLOW_IT_CONFIG1); rv &= prv_write_register(W1160_IT_SLOW2_REG, W1160_SLOW_IT_CONFIG2); @@ -269,7 +269,7 @@ void ambient_light_driver_set_state(bool active, bool sampling) { void command_als_read(void) { char buffer[16] = {0}; - prompt_send_response_fmt(buffer, sizeof(buffer), "%"PRIu32"", ambient_light_get_light_level()); + prompt_send_response_fmt(buffer, sizeof(buffer), "%" PRIu32 "", ambient_light_get_light_level()); } uint32_t ambient_light_get_dark_threshold(void) { diff --git a/src/fw/drivers/backlight/aw2016.c b/src/fw/drivers/backlight/aw2016.c index 8a07f8998a..6edf48cbbc 100644 --- a/src/fw/drivers/backlight/aw2016.c +++ b/src/fw/drivers/backlight/aw2016.c @@ -165,8 +165,7 @@ void backlight_refresh(void) { return; } - ret = prv_write_register(AW2016_REG_GCR1, - AW2016_REG_GCR1_CHGDIS_DIS | AW2016_REG_GCR1_CHIPEN_EN); + ret = prv_write_register(AW2016_REG_GCR1, AW2016_REG_GCR1_CHGDIS_DIS | AW2016_REG_GCR1_CHIPEN_EN); ret &= prv_configure_registers(); if (!ret) { PBL_LOG_ERR("AW2016 refresh failed (i2c)"); diff --git a/src/fw/drivers/backlight/pwm.c b/src/fw/drivers/backlight/pwm.c index 1107ad8bea..b64d503f33 100644 --- a/src/fw/drivers/backlight/pwm.c +++ b/src/fw/drivers/backlight/pwm.c @@ -36,8 +36,8 @@ void backlight_set_brightness(uint8_t brightness) { pwm_enable(&BACKLIGHT_PWM.pwm, true); - const uint32_t desired_duty_cycle = brightness * BACKLIGHT_PWM.max_duty_cycle_percent * - TIMER_PERIOD_RESOLUTION / 10000; + const uint32_t desired_duty_cycle = + brightness * BACKLIGHT_PWM.max_duty_cycle_percent * TIMER_PERIOD_RESOLUTION / 10000; pwm_set_duty_cycle(&BACKLIGHT_PWM.pwm, desired_duty_cycle); } } diff --git a/src/fw/drivers/backlight/qemu.c b/src/fw/drivers/backlight/qemu.c index 6c3c292f7f..d4ccbc6cb7 100644 --- a/src/fw/drivers/backlight/qemu.c +++ b/src/fw/drivers/backlight/qemu.c @@ -12,16 +12,16 @@ #define REG32(addr) (*(volatile uint32_t *)(addr)) // Display register offsets (must match QEMU pebble-display) -#define DISP_CTRL 0x000 -#define DISP_BRIGHTNESS 0x018 -#define DISP_BL_RED 0x024 -#define DISP_BL_GREEN 0x028 -#define DISP_BL_BLUE 0x02C -#define CTRL_UPDATE (1 << 1) +#define DISP_CTRL 0x000 +#define DISP_BRIGHTNESS 0x018 +#define DISP_BL_RED 0x024 +#define DISP_BL_GREEN 0x028 +#define DISP_BL_BLUE 0x02C +#define CTRL_UPDATE (1 << 1) // Brightness levels for QEMU display grayscale path -#define BACKLIGHT_OFF_LEVEL 180 -#define BACKLIGHT_ON_LEVEL 255 +#define BACKLIGHT_OFF_LEVEL 180 +#define BACKLIGHT_ON_LEVEL 255 static bool s_initialized; diff --git a/src/fw/drivers/display/sf32lb/display_jdi.c b/src/fw/drivers/display/sf32lb/display_jdi.c index a74074605a..b7d5fd3ef3 100644 --- a/src/fw/drivers/display/sf32lb/display_jdi.c +++ b/src/fw/drivers/display/sf32lb/display_jdi.c @@ -23,7 +23,7 @@ PBL_LOG_MODULE_DEFINE(driver_display_jdi, CONFIG_DRIVER_DISPLAY_LOG_LEVEL); -#define POWER_SEQ_DELAY_TIME_US 11000 +#define POWER_SEQ_DELAY_TIME_US 11000 #define POWER_RESET_CYCLE_DELAY_TIME_US 500000 // Timeout for detecting the SiFli HAL silent-loss bug: the LCDC kicks off a @@ -75,7 +75,7 @@ typedef struct { } DisplayIrqLogEntry; typedef struct { - uint32_t write_count; // total IRQs logged; newest = (write_count-1) % N + uint32_t write_count; // total IRQs logged; newest = (write_count-1) % N DisplayIrqLogEntry entries[DISPLAY_IRQ_LOG_ENTRIES]; } DisplayIrqLog; @@ -98,10 +98,10 @@ static bool s_rotated_180 = true; static bool s_rotated_180 = false; #endif -static void prv_power_cycle(void){ +static void prv_power_cycle(void) { OutputConfig cfg = { - .gpio = hwp_gpio1, - .active_high = true, + .gpio = hwp_gpio1, + .active_high = true, }; // This will disable all JDI pull-ups/downs so that VLCD can fully turn off, @@ -183,9 +183,8 @@ static HAL_StatusTypeDef prv_display_update_start(void) { static void prv_handle_send_failure(const char *ctx, HAL_StatusTypeDef status) { DisplayJDIState *state = DISPLAY->state; - PBL_LOG_ERR("display: %s SendLayerData_IT=%d State=%d ErrorCode=0x%08lx", - ctx, (int)status, (int)state->hlcdc.State, - (unsigned long)state->hlcdc.ErrorCode); + PBL_LOG_ERR("display: %s SendLayerData_IT=%d State=%d ErrorCode=0x%08lx", ctx, (int)status, + (int)state->hlcdc.State, (unsigned long)state->hlcdc.ErrorCode); state->hlcdc.State = HAL_LCDC_STATE_READY; state->hlcdc.ErrorCode = HAL_LCDC_ERROR_NONE; } @@ -226,10 +225,8 @@ static void prv_silent_loss_handler(void *data) { dcache_align(&snap_addr, &snap_size); dcache_flush((const void *)snap_addr, snap_size); PBL_CROAK("LCDC silent loss: no EOF in %ums (State=%d Err=0x%lx y=%u..%u)", - (unsigned)DISPLAY_SILENT_LOSS_TIMEOUT_MS, - (int)state->hlcdc.State, - (unsigned long)state->hlcdc.ErrorCode, - (unsigned)s_update_y0, (unsigned)s_update_y1); + (unsigned)DISPLAY_SILENT_LOSS_TIMEOUT_MS, (int)state->hlcdc.State, + (unsigned long)state->hlcdc.ErrorCode, (unsigned)s_update_y0, (unsigned)s_update_y1); } static void prv_display_update_terminate(void *data) { @@ -239,14 +236,14 @@ static void prv_display_update_terminate(void *data) { for (uint16_t y = s_update_y0; y <= s_update_y1; y++) { uint8_t *row = &s_framebuffer[y * PBL_DISPLAY_WIDTH]; - if (s_rotated_180) { - // Undo HMirror before converting back - for (uint16_t x = 0; x < PBL_DISPLAY_WIDTH / 2; x++) { - uint8_t tmp = row[x]; - row[x] = row[PBL_DISPLAY_WIDTH - 1 - x]; - row[PBL_DISPLAY_WIDTH - 1 - x] = tmp; + if (s_rotated_180) { + // Undo HMirror before converting back + for (uint16_t x = 0; x < PBL_DISPLAY_WIDTH / 2; x++) { + uint8_t tmp = row[x]; + row[x] = row[PBL_DISPLAY_WIDTH - 1 - x]; + row[PBL_DISPLAY_WIDTH - 1 - x] = tmp; + } } - } // Convert this row in-place from 332 to 222 using word-level bit manipulation // 332 format: RR 0G GG BB (bits 7-6 R, 4-3 G, 1-0 B) @@ -311,17 +308,15 @@ void HAL_LCDC_SendLayerDataCpltCbk(LCDC_HandleTypeDef *lcdc) { if (s_updating) { PebbleEvent e = { .type = PEBBLE_CALLBACK_EVENT, - .callback = - { - .callback = prv_display_update_terminate, - }, + .callback = { + .callback = prv_display_update_terminate, + }, }; event_put_isr(&e); } else { pbl_sem_give(&s_sem); } - } void display_init(void) { @@ -348,7 +343,8 @@ void display_init(void) { HAL_PIN_Set(DISPLAY->pinmux.g2.pad, DISPLAY->pinmux.g2.func, DISPLAY->pinmux.g2.flags, 1); HAL_PIN_Set(DISPLAY->pinmux.b1.pad, DISPLAY->pinmux.b1.func, DISPLAY->pinmux.b1.flags, 1); HAL_PIN_Set(DISPLAY->pinmux.b2.pad, DISPLAY->pinmux.b2.func, DISPLAY->pinmux.b2.flags, 1); - HAL_PIN_Set(DISPLAY->pinmux.vcom_frp.pad, DISPLAY->pinmux.vcom_frp.func, DISPLAY->pinmux.vcom_frp.flags, 1); + HAL_PIN_Set(DISPLAY->pinmux.vcom_frp.pad, DISPLAY->pinmux.vcom_frp.func, + DISPLAY->pinmux.vcom_frp.flags, 1); HAL_PIN_Set(DISPLAY->pinmux.xfrp.pad, DISPLAY->pinmux.xfrp.func, DISPLAY->pinmux.xfrp.flags, 1); HAL_LCDC_Init(&state->hlcdc); @@ -386,7 +382,6 @@ void display_set_rotated(bool rotated) { s_rotated_180 = rotated; #endif HAL_LCDC_LayerVMirror(&state->hlcdc, HAL_LCDC_LAYER_DEFAULT, s_rotated_180); - } void display_update(NextRowCallback nrcb, UpdateCompleteCallback uccb) { @@ -455,8 +450,8 @@ void display_update(NextRowCallback nrcb, UpdateCompleteCallback uccb) { // isn't yet armed. prv_display_update_terminate stops it on the normal // completion path; the kickoff-failure path below stops it via the same // terminate call. - new_timer_start(s_silent_loss_timer, DISPLAY_SILENT_LOSS_TIMEOUT_MS, - prv_silent_loss_handler, NULL, 0); + new_timer_start(s_silent_loss_timer, DISPLAY_SILENT_LOSS_TIMEOUT_MS, prv_silent_loss_handler, + NULL, 0); HAL_StatusTypeDef status = prv_display_update_start(); if (status != HAL_OK) { prv_handle_send_failure("update", status); @@ -493,7 +488,8 @@ void display_update_boot_frame(uint8_t *framebuffer) { soc_sf32lb_sleep_release(SOC_SF32LB_DEEPWFI); } -void display_clear(void) {} +void display_clear(void) { +} #ifndef CONFIG_RELEASE void display_jdi_test_drop_next_complete(void) { diff --git a/src/fw/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01_nrf5.c b/src/fw/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01_nrf5.c index c11ccd4b5e..fbe9faada0 100644 --- a/src/fw/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01_nrf5.c +++ b/src/fw/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01_nrf5.c @@ -116,17 +116,15 @@ static void prv_spim_evt_handler(nrfx_spim_evt_t const *evt, void *ctx) { if (s_updating) { PebbleEvent e = { .type = PEBBLE_CALLBACK_EVENT, - .callback = - { - .callback = prv_terminate_transfer, - }, + .callback = { + .callback = prv_terminate_transfer, + }, }; event_put_isr(&e); } else { pbl_sem_give(&s_sem); } - } void display_init(void) { @@ -146,7 +144,6 @@ void display_init(void) { gpio_output_set(&BOARD_CONFIG_DISPLAY.on_ctrl, true); prv_extcomin_init(); - } void display_clear(void) { @@ -220,4 +217,5 @@ bool display_update_in_progress(void) { /* stubs */ -void display_update_boot_frame(uint8_t *framebuffer) {} +void display_update_boot_frame(uint8_t *framebuffer) { +} diff --git a/src/fw/drivers/exti/nrf5.c b/src/fw/drivers/exti/nrf5.c index ff2ecb81e7..57e48347b0 100644 --- a/src/fw/drivers/exti/nrf5.c +++ b/src/fw/drivers/exti/nrf5.c @@ -13,9 +13,10 @@ // NRF5 emulates EXTI using GPIOTE -static void prv_exti_handler(nrfx_gpiote_pin_t pin, nrfx_gpiote_trigger_t trigger, void *p_context) { - ExtiHandlerCallback cb = (ExtiHandlerCallback) p_context; - +static void prv_exti_handler(nrfx_gpiote_pin_t pin, nrfx_gpiote_trigger_t trigger, + void *p_context) { + ExtiHandlerCallback cb = (ExtiHandlerCallback)p_context; + bool should_context_switch = false; cb(&should_context_switch); } @@ -28,25 +29,22 @@ void exti_configure_pin(ExtiConfig cfg, ExtiTrigger trigger, ExtiHandlerCallback } uint8_t channel = cfg.channel; nrfx_gpiote_trigger_config_t tcfg = { - .trigger = trigger == ExtiTrigger_Rising ? NRFX_GPIOTE_TRIGGER_LOTOHI : - trigger == ExtiTrigger_Falling ? NRFX_GPIOTE_TRIGGER_HITOLO : - trigger == ExtiTrigger_RisingFalling ? NRFX_GPIOTE_TRIGGER_TOGGLE : - NRFX_GPIOTE_TRIGGER_NONE, - .p_in_channel = &channel - }; - nrfx_gpiote_handler_config_t hcfg = { - .handler = prv_exti_handler, - .p_context = cb + .trigger = trigger == ExtiTrigger_Rising ? NRFX_GPIOTE_TRIGGER_LOTOHI + : trigger == ExtiTrigger_Falling ? NRFX_GPIOTE_TRIGGER_HITOLO + : trigger == ExtiTrigger_RisingFalling ? NRFX_GPIOTE_TRIGGER_TOGGLE + : NRFX_GPIOTE_TRIGGER_NONE, + .p_in_channel = &channel }; + nrfx_gpiote_handler_config_t hcfg = {.handler = prv_exti_handler, .p_context = cb}; nrfx_gpiote_input_pin_config_t pcfg = { - .p_pull_config = NULL, - .p_trigger_config = &tcfg, - .p_handler_config = &hcfg + .p_pull_config = NULL, + .p_trigger_config = &tcfg, + .p_handler_config = &hcfg }; - + err = nrfx_gpiote_input_configure(&cfg.peripheral, cfg.gpio_pin, &pcfg); PBL_ASSERTN(err == NRFX_SUCCESS); - + nrfx_gpiote_trigger_disable(&cfg.peripheral, cfg.gpio_pin); } @@ -57,4 +55,3 @@ void exti_enable(ExtiConfig cfg) { void exti_disable(ExtiConfig cfg) { nrfx_gpiote_trigger_disable(&cfg.peripheral, cfg.gpio_pin); } - diff --git a/src/fw/drivers/exti/sf32lb.c b/src/fw/drivers/exti/sf32lb.c index 04d057357e..57810af8b9 100644 --- a/src/fw/drivers/exti/sf32lb.c +++ b/src/fw/drivers/exti/sf32lb.c @@ -31,7 +31,8 @@ static GPIO_TypeDef *prv_gpio_get_instance(GPIO_TypeDef *hgpio, uint16_t gpio_pi return (GPIO_TypeDef *)NULL; } - // There are many groups of similar registers in the GPIO, and because of register length limitations, up to 32 gpio can be operated in each group. + // There are many groups of similar registers in the GPIO, and because of register length + // limitations, up to 32 gpio can be operated in each group. inst_idx = gpio_pin >> 5; *offset = gpio_pin & 31; @@ -43,8 +44,7 @@ static GPIO_TypeDef *prv_gpio_get_instance(GPIO_TypeDef *hgpio, uint16_t gpio_pi static void prv_insert_handler(GPIO_TypeDef *hgpio, uint8_t gpio_pin, ExtiHandlerCallback cb) { // Find the handler index for this pin uint8_t index = 0; - while (index < EXTI_MAX_GPIO1_PIN_NUM && - s_exti_gpio1_handler_configs[index].callback != NULL) { + while (index < EXTI_MAX_GPIO1_PIN_NUM && s_exti_gpio1_handler_configs[index].callback != NULL) { index++; } if (index >= EXTI_MAX_GPIO1_PIN_NUM) { diff --git a/src/fw/drivers/flash/cd_flash_driver.c b/src/fw/drivers/flash/cd_flash_driver.c index 5e3cd47314..85cd5fe6d1 100644 --- a/src/fw/drivers/flash/cd_flash_driver.c +++ b/src/fw/drivers/flash/cd_flash_driver.c @@ -21,9 +21,8 @@ void cd_flash_init(void) { flash_impl_init(true /* coredump_mode */); // Protect the PRF region from writes - flash_impl_write_protect( - FLASH_REGION_SAFE_FIRMWARE_BEGIN, - (FLASH_REGION_SAFE_FIRMWARE_END - SECTOR_SIZE_BYTES)); + flash_impl_write_protect(FLASH_REGION_SAFE_FIRMWARE_BEGIN, + (FLASH_REGION_SAFE_FIRMWARE_END - SECTOR_SIZE_BYTES)); s_active = true; } @@ -40,8 +39,7 @@ void cd_flash_erase_region(uint32_t start_addr, uint32_t total_bytes) { watchdog_feed(); uint32_t erase_size = 0; - if (((start_addr & SECTOR_ADDR_MASK) == start_addr) && - (total_bytes >= SECTOR_SIZE_BYTES)) { + if (((start_addr & SECTOR_ADDR_MASK) == start_addr) && (total_bytes >= SECTOR_SIZE_BYTES)) { erase_size = SECTOR_SIZE_BYTES; flash_impl_erase_sector_begin(start_addr); } else if ((start_addr & SUBSECTOR_ADDR_MASK) == start_addr && @@ -54,7 +52,8 @@ void cd_flash_erase_region(uint32_t start_addr, uint32_t total_bytes) { } status_t status; - while ((status = flash_impl_get_erase_status()) == E_BUSY) delay_us(100); + while ((status = flash_impl_get_erase_status()) == E_BUSY) + delay_us(100); CD_ASSERTN(status == S_SUCCESS); total_bytes -= erase_size; @@ -67,7 +66,7 @@ void cd_flash_erase_region(uint32_t start_addr, uint32_t total_bytes) { uint32_t cd_flash_write_bytes(const void *buffer_ptr, uint32_t start_addr, const uint32_t buffer_size) { CD_ASSERTN(((start_addr + buffer_size) <= CORE_DUMP_FLASH_END) && - (int)start_addr >= CORE_DUMP_FLASH_START); + (int)start_addr >= CORE_DUMP_FLASH_START); const uint8_t *buffer = buffer_ptr; uint32_t remaining = buffer_size; @@ -87,8 +86,7 @@ uint32_t cd_flash_write_bytes(const void *buffer_ptr, uint32_t start_addr, return buffer_size; } -void cd_flash_read_bytes(void* buffer_ptr, uint32_t start_addr, - uint32_t buffer_size) { +void cd_flash_read_bytes(void *buffer_ptr, uint32_t start_addr, uint32_t buffer_size) { flash_impl_read_sync(buffer_ptr, start_addr, buffer_size); } diff --git a/src/fw/drivers/flash/flash_api.c b/src/fw/drivers/flash/flash_api.c index b260870ad3..3c0eba4252 100644 --- a/src/fw/drivers/flash/flash_api.c +++ b/src/fw/drivers/flash/flash_api.c @@ -40,7 +40,7 @@ static struct FlashEraseContext { FlashOperationCompleteCb on_complete_cb; void *cb_context; uint32_t expected_duration; -} s_erase = { 0 }; +} s_erase = {0}; static TimerID s_erase_poll_timer; static TimerID s_erase_suspend_timer; @@ -58,7 +58,7 @@ void flash_init(void) { #if UNITTEST void flash_api_reset_for_test(void) { - s_erase = (struct FlashEraseContext) {0}; + s_erase = (struct FlashEraseContext){0}; s_flash_initialized = false; } @@ -100,8 +100,7 @@ static void prv_erase_suspend_timer_cb(void *unused) { pbl_mutex_unlock(&s_flash_lock); } -void flash_read_bytes(uint8_t* buffer, uint32_t start_addr, - uint32_t buffer_size) { +void flash_read_bytes(uint8_t *buffer, uint32_t start_addr, uint32_t buffer_size) { pbl_mutex_lock(&s_flash_lock, PBL_FOREVER); // TODO: use DMA when possible // TODO: be smarter about pausing erases. Some flash chips allow concurrent @@ -122,8 +121,7 @@ void flash_expect_program_failure(bool expect_failure) { } #endif -void flash_write_bytes(const uint8_t *buffer, uint32_t start_addr, - uint32_t buffer_size) { +void flash_write_bytes(const uint8_t *buffer, uint32_t start_addr, uint32_t buffer_size) { pbl_mutex_lock(&s_flash_lock, PBL_FOREVER); prv_erase_pause(); if (s_erase.suspended) { @@ -138,7 +136,7 @@ void flash_write_bytes(const uint8_t *buffer, uint32_t start_addr, #ifdef TEST_FLASH_LOCK_PROTECTION s_assert_write_error || #endif - PASSED(written), + PASSED(written), "flash_impl_write_page_begin failed: %d", written); status_t status; while ((status = flash_impl_get_write_status()) == E_BUSY) { @@ -146,12 +144,10 @@ void flash_write_bytes(const uint8_t *buffer, uint32_t start_addr, } #ifdef TEST_FLASH_LOCK_PROTECTION if (s_assert_write_error) { - PBL_ASSERT(FAILED(status), "flash write unexpectedly succeeded: %" PRId32, - status); + PBL_ASSERT(FAILED(status), "flash write unexpectedly succeeded: %" PRId32, status); } else { #endif - PBL_ASSERT(PASSED(status), "flash_impl_get_write_status returned %" PRId32, - status); + PBL_ASSERT(PASSED(status), "flash_impl_get_write_status returned %" PRId32, status); #ifdef TEST_FLASH_LOCK_PROTECTION } #endif @@ -173,33 +169,29 @@ void flash_write_bytes(const uint8_t *buffer, uint32_t start_addr, // ms) if not. If the erase has not finished (non-zero has been returned), the // caller is responsible for calling the prv_flash_erase_poll() method until // the erase completes. -static uint32_t prv_flash_erase_start(uint32_t addr, - FlashOperationCompleteCb on_complete_cb, - void *context, - bool is_subsector, - uint8_t retries) { +static uint32_t prv_flash_erase_start(uint32_t addr, FlashOperationCompleteCb on_complete_cb, + void *context, bool is_subsector, uint8_t retries) { pbl_sem_take(&s_erase_semphr, PBL_FOREVER); pbl_mutex_lock(&s_flash_lock, PBL_FOREVER); PBL_ASSERTN(s_erase.in_progress == false); - s_erase = (struct FlashEraseContext) { - .in_progress = true, - .task = pebble_task_get_current(), - .retries = retries, - // FIXME: We should just assert that the address is already aligned. If - // someone is depending on this behaviour without already knowing the range - // that's being erased they're going to have a bad time. This will probably - // cause some client fallout though, so tackle this later. - .is_subsector = is_subsector, - .address = is_subsector? flash_impl_get_subsector_base_address(addr) - : flash_impl_get_sector_base_address(addr), - .on_complete_cb = on_complete_cb, - .cb_context = context, - .expected_duration = is_subsector? - flash_impl_get_typical_subsector_erase_duration_ms() : - flash_impl_get_typical_sector_erase_duration_ms(), + s_erase = (struct FlashEraseContext){ + .in_progress = true, + .task = pebble_task_get_current(), + .retries = retries, + // FIXME: We should just assert that the address is already aligned. If + // someone is depending on this behaviour without already knowing the range + // that's being erased they're going to have a bad time. This will probably + // cause some client fallout though, so tackle this later. + .is_subsector = is_subsector, + .address = is_subsector ? flash_impl_get_subsector_base_address(addr) + : flash_impl_get_sector_base_address(addr), + .on_complete_cb = on_complete_cb, + .cb_context = context, + .expected_duration = is_subsector ? flash_impl_get_typical_subsector_erase_duration_ms() + : flash_impl_get_typical_sector_erase_duration_ms(), }; - status_t status = is_subsector? flash_impl_blank_check_subsector(addr) - : flash_impl_blank_check_sector(addr); + status_t status = + is_subsector ? flash_impl_blank_check_subsector(addr) : flash_impl_blank_check_sector(addr); PBL_ASSERT(PASSED(status), "Blank check error: %" PRId32, status); if (status != S_FALSE) { s_erase.in_progress = false; @@ -211,8 +203,8 @@ static uint32_t prv_flash_erase_start(uint32_t addr, return 0; } - status = is_subsector? flash_impl_erase_subsector_begin(addr) - : flash_impl_erase_sector_begin(addr); + status = + is_subsector ? flash_impl_erase_subsector_begin(addr) : flash_impl_erase_sector_begin(addr); if (PASSED(status)) { pbl_mutex_unlock(&s_flash_lock); @@ -260,11 +252,12 @@ static uint32_t prv_flash_erase_poll(void) { pbl_sem_give(&s_erase_semphr); if (status == E_ERROR && saved_ctx.retries < MAX_ERASE_RETRIES) { // Try issuing the erase again. It might succeed this time around. - PBL_LOG_DBG("Erase of 0x%"PRIx32" failed (attempt %d)." - " Trying again...", saved_ctx.address, saved_ctx.retries); - return prv_flash_erase_start( - saved_ctx.address, saved_ctx.on_complete_cb, saved_ctx.cb_context, - saved_ctx.is_subsector, saved_ctx.retries + 1); + PBL_LOG_DBG("Erase of 0x%" PRIx32 + " failed (attempt %d)." + " Trying again...", + saved_ctx.address, saved_ctx.retries); + return prv_flash_erase_start(saved_ctx.address, saved_ctx.on_complete_cb, saved_ctx.cb_context, + saved_ctx.is_subsector, saved_ctx.retries + 1); } else { if (status == S_SUCCESS) { PBL_ANALYTICS_ADD(flash_spi_erase_bytes, @@ -287,11 +280,10 @@ static void prv_flash_erase_timer_cb(void *context) { } } -static void prv_flash_erase_async( - uint32_t sector_addr, bool is_subsector, FlashOperationCompleteCb on_complete_cb, - void *context) { - uint32_t remaining_ms = prv_flash_erase_start(sector_addr, on_complete_cb, - context, is_subsector, 0); +static void prv_flash_erase_async(uint32_t sector_addr, bool is_subsector, + FlashOperationCompleteCb on_complete_cb, void *context) { + uint32_t remaining_ms = + prv_flash_erase_start(sector_addr, on_complete_cb, context, is_subsector, 0); if (remaining_ms) { // Start timer that will periodically check for the erase to complete new_timer_start(s_erase_poll_timer, remaining_ms, prv_flash_erase_timer_cb, NULL, 0); @@ -305,8 +297,8 @@ static void prv_blocking_erase_complete(void *context, status_t status) { static void prv_flash_erase_blocking(uint32_t sector_addr, bool is_subsector) { uint32_t total_time_spent_waiting_ms = 0; - uint32_t remaining_ms = prv_flash_erase_start( - sector_addr, prv_blocking_erase_complete, NULL, is_subsector, 0); + uint32_t remaining_ms = + prv_flash_erase_start(sector_addr, prv_blocking_erase_complete, NULL, is_subsector, 0); while (remaining_ms) { psleep(remaining_ms); total_time_spent_waiting_ms += remaining_ms; @@ -349,14 +341,12 @@ static void prv_flash_erase_blocking(uint32_t sector_addr, bool is_subsector) { } } -void flash_erase_sector(uint32_t sector_addr, - FlashOperationCompleteCb on_complete_cb, +void flash_erase_sector(uint32_t sector_addr, FlashOperationCompleteCb on_complete_cb, void *context) { prv_flash_erase_async(sector_addr, false /* is_subsector */, on_complete_cb, context); } -void flash_erase_subsector(uint32_t sector_addr, - FlashOperationCompleteCb on_complete_cb, +void flash_erase_subsector(uint32_t sector_addr, FlashOperationCompleteCb on_complete_cb, void *context) { prv_flash_erase_async(sector_addr, true /* is_subsector */, on_complete_cb, context); } @@ -377,9 +367,8 @@ void flash_prf_set_protection(bool do_protect) { status_t status; pbl_mutex_lock(&s_flash_lock, PBL_FOREVER); if (do_protect) { - status = flash_impl_write_protect( - FLASH_REGION_SAFE_FIRMWARE_BEGIN, - (FLASH_REGION_SAFE_FIRMWARE_END - SECTOR_SIZE_BYTES)); + status = flash_impl_write_protect(FLASH_REGION_SAFE_FIRMWARE_BEGIN, + (FLASH_REGION_SAFE_FIRMWARE_END - SECTOR_SIZE_BYTES)); } else { status = flash_impl_unprotect(); } @@ -523,7 +512,7 @@ status_t flash_lock_security_register(uint32_t addr) { return status; } -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW #include "console/prompt.h" void command_flash_unprotect(void) { diff --git a/src/fw/drivers/flash/flash_crc.c b/src/fw/drivers/flash/flash_crc.c index 8aadb65c94..fe395f5f52 100644 --- a/src/fw/drivers/flash/flash_crc.c +++ b/src/fw/drivers/flash/flash_crc.c @@ -47,8 +47,7 @@ uint32_t flash_crc32(uint32_t flash_addr, uint32_t num_bytes) { return crc; } -uint32_t flash_calculate_legacy_defective_checksum(uint32_t flash_addr, - uint32_t num_bytes) { +uint32_t flash_calculate_legacy_defective_checksum(uint32_t flash_addr, uint32_t num_bytes) { void *buffer; unsigned int chunk_size = prv_allocate_crc_buffer(&buffer); diff --git a/src/fw/drivers/flash/flash_erase.c b/src/fw/drivers/flash/flash_erase.c index 08e4f4d229..1f66427c37 100644 --- a/src/fw/drivers/flash/flash_erase.c +++ b/src/fw/drivers/flash/flash_erase.c @@ -42,8 +42,7 @@ static void prv_unlock_erase_mutex(void) { #endif static void prv_async_erase_done_cb(void *ignored, status_t result) { - if (PASSED(result) && - s_erase_state.next_erase_addr < s_erase_state.end_addr) { + if (PASSED(result) && s_erase_state.next_erase_addr < s_erase_state.end_addr) { // Chain the next erase from a new callback to prevent recursion (and the // potential for a stack overflow) if the flash_erase_sector calls the // completion callback asynchronously. @@ -60,8 +59,7 @@ static void prv_async_erase_done_cb(void *ignored, status_t result) { static void prv_erase_next_async(void *ignored) { uint32_t addr = s_erase_state.next_erase_addr; - if ((addr & ~SECTOR_ADDR_MASK) == 0 && - addr + SECTOR_SIZE_BYTES <= s_erase_state.end_addr) { + if ((addr & ~SECTOR_ADDR_MASK) == 0 && addr + SECTOR_SIZE_BYTES <= s_erase_state.end_addr) { s_erase_state.next_erase_addr += SECTOR_SIZE_BYTES; flash_erase_sector(addr, prv_async_erase_done_cb, NULL); } else { @@ -72,21 +70,19 @@ static void prv_erase_next_async(void *ignored) { } } -void flash_erase_optimal_range( - uint32_t min_start, uint32_t max_start, uint32_t min_end, uint32_t max_end, - FlashOperationCompleteCb on_complete, void *context) { +void flash_erase_optimal_range(uint32_t min_start, uint32_t max_start, uint32_t min_end, + uint32_t max_end, FlashOperationCompleteCb on_complete, + void *context) { PBL_ASSERTN(((min_start & (~SUBSECTOR_ADDR_MASK)) == 0) && - ((max_end & (~SUBSECTOR_ADDR_MASK)) == 0) && - (min_start <= max_start) && - (max_start <= min_end) && - (min_end <= max_end)); + ((max_end & (~SUBSECTOR_ADDR_MASK)) == 0) && (min_start <= max_start) && + (max_start <= min_end) && (min_end <= max_end)); // We want to erase the sector that starts immediately below max_start but // after min_start. If no sector boundary exists between the two, we need to // start erasing sectors after min_start and backfill with subsector erases. int32_t sector_start = (max_start & SECTOR_ADDR_MASK); int32_t subsector_start = (max_start & SUBSECTOR_ADDR_MASK); - if (sector_start < (int32_t) min_start) { + if (sector_start < (int32_t)min_start) { sector_start += SECTOR_SIZE_BYTES; } @@ -94,9 +90,8 @@ void flash_erase_optimal_range( // running past the end of max_end, we need to erase starting with the sector // before and fill in with subsector erases. int32_t sector_end = ((min_end - 1) & SECTOR_ADDR_MASK) + SECTOR_SIZE_BYTES; - int32_t subsector_end = - ((min_end - 1) & SUBSECTOR_ADDR_MASK) + SUBSECTOR_SIZE_BYTES; - if (sector_end > (int32_t) max_end) { + int32_t subsector_end = ((min_end - 1) & SUBSECTOR_ADDR_MASK) + SUBSECTOR_SIZE_BYTES; + if (sector_end > (int32_t)max_end) { sector_end -= SECTOR_SIZE_BYTES; } @@ -117,11 +112,11 @@ void flash_erase_optimal_range( prv_lock_erase_mutex(); - s_erase_state = (struct FlashRegionEraseState) { - .next_erase_addr = start_addr, - .end_addr = end_addr, - .on_complete = on_complete, - .on_complete_context = context, + s_erase_state = (struct FlashRegionEraseState){ + .next_erase_addr = start_addr, + .end_addr = end_addr, + .on_complete = on_complete, + .on_complete_context = context, }; prv_erase_next_async(NULL); diff --git a/src/fw/drivers/flash/gd25lq255e.c b/src/fw/drivers/flash/gd25lq255e.c index d7f75b0b03..7e6e1d85d1 100644 --- a/src/fw/drivers/flash/gd25lq255e.c +++ b/src/fw/drivers/flash/gd25lq255e.c @@ -15,8 +15,8 @@ static FlashAddress s_protected_start; static FlashAddress s_protected_end; static const uint32_t prv_sec_regs[] = { - 0x00002000, - 0x00003000, + 0x00002000, + 0x00003000, }; static QSPIFlashPart QSPI_FLASH_PART = { @@ -57,17 +57,18 @@ static QSPIFlashPart QSPI_FLASH_PART = { .flag_status_bit_masks = { .sec_lock = (1 << 5) | (1 << 4), /* SR2, page 12 */ - .erase_suspend = 1 << 7, /* SR2 SUS1, page 14 */ + .erase_suspend = 1 << 7, /* SR2 SUS1, page 14 */ }, .dummy_cycles = { .fast_read = 4, }, - .sec_registers = { - .sec_regs = prv_sec_regs, - .num_sec_regs = ARRAY_LENGTH(prv_sec_regs), - .sec_reg_size = 1024, - }, + .sec_registers = + { + .sec_regs = prv_sec_regs, + .num_sec_regs = ARRAY_LENGTH(prv_sec_regs), + .sec_reg_size = 1024, + }, .supports_block_lock = false, .reset_latency_ms = 12, .suspend_to_read_latency_us = 20, @@ -100,7 +101,8 @@ FlashAddress flash_impl_get_subsector_base_address(FlashAddress addr) { return (addr & SUBSECTOR_ADDR_MASK); } -void flash_impl_enable_write_protection(void) {} +void flash_impl_enable_write_protection(void) { +} status_t flash_impl_write_protect(FlashAddress start_sector, FlashAddress end_sector) { if (s_protected) { @@ -129,7 +131,9 @@ status_t flash_impl_init(bool coredump_mode) { return S_SUCCESS; } -status_t flash_impl_get_erase_status(void) { return qspi_flash_is_erase_complete(QSPI_FLASH); } +status_t flash_impl_get_erase_status(void) { + return qspi_flash_is_erase_complete(QSPI_FLASH); +} status_t flash_impl_erase_subsector_begin(FlashAddress subsector_addr) { status_t status; @@ -178,7 +182,9 @@ int flash_impl_write_page_begin(const void *buffer, const FlashAddress start_add return qspi_flash_write_page_begin(QSPI_FLASH, buffer, start_addr, len); } -status_t flash_impl_get_write_status(void) { return qspi_flash_get_write_status(QSPI_FLASH); } +status_t flash_impl_get_write_status(void) { + return qspi_flash_get_write_status(QSPI_FLASH); +} status_t flash_impl_enter_low_power_mode(void) { qspi_flash_set_lower_power_mode(QSPI_FLASH, true); @@ -201,9 +207,13 @@ status_t flash_impl_blank_check_subsector(FlashAddress addr) { return qspi_flash_blank_check(QSPI_FLASH, addr, true /* is_subsector */); } -uint32_t flash_impl_get_typical_sector_erase_duration_ms(void) { return 150; } +uint32_t flash_impl_get_typical_sector_erase_duration_ms(void) { + return 150; +} -uint32_t flash_impl_get_typical_subsector_erase_duration_ms(void) { return 50; } +uint32_t flash_impl_get_typical_subsector_erase_duration_ms(void) { + return 50; +} status_t flash_impl_read_security_register(uint32_t addr, uint8_t *val) { return qspi_flash_read_security_register(QSPI_FLASH, addr, val); diff --git a/src/fw/drivers/flash/gd25q256e.c b/src/fw/drivers/flash/gd25q256e.c index 950b4d0c67..f4b96f9062 100644 --- a/src/fw/drivers/flash/gd25q256e.c +++ b/src/fw/drivers/flash/gd25q256e.c @@ -15,9 +15,9 @@ static FlashAddress s_protected_start; static FlashAddress s_protected_end; static const uint32_t prv_sec_regs[] = { - 0x00001000, - 0x00002000, - 0x00003000, + 0x00001000, + 0x00002000, + 0x00003000, }; static QSPIFlashPart QSPI_FLASH_PART = { @@ -57,17 +57,18 @@ static QSPIFlashPart QSPI_FLASH_PART = { .flag_status_bit_masks = { .sec_lock = (1 << 5) | (1 << 4) | (1 << 3), /* SR2, page 12 */ - .erase_suspend = 1 << 7, /* SR2 SUS1, page 14 */ + .erase_suspend = 1 << 7, /* SR2 SUS1, page 14 */ }, .dummy_cycles = { .fast_read = 4, }, - .sec_registers = { - .sec_regs = prv_sec_regs, - .num_sec_regs = ARRAY_LENGTH(prv_sec_regs), - .sec_reg_size = 1024, - }, + .sec_registers = + { + .sec_regs = prv_sec_regs, + .num_sec_regs = ARRAY_LENGTH(prv_sec_regs), + .sec_reg_size = 1024, + }, .supports_block_lock = false, .reset_latency_ms = 12, .suspend_to_read_latency_us = 20, @@ -100,7 +101,8 @@ FlashAddress flash_impl_get_subsector_base_address(FlashAddress addr) { return (addr & SUBSECTOR_ADDR_MASK); } -void flash_impl_enable_write_protection(void) {} +void flash_impl_enable_write_protection(void) { +} status_t flash_impl_write_protect(FlashAddress start_sector, FlashAddress end_sector) { if (s_protected) { @@ -129,7 +131,9 @@ status_t flash_impl_init(bool coredump_mode) { return S_SUCCESS; } -status_t flash_impl_get_erase_status(void) { return qspi_flash_is_erase_complete(QSPI_FLASH); } +status_t flash_impl_get_erase_status(void) { + return qspi_flash_is_erase_complete(QSPI_FLASH); +} status_t flash_impl_erase_subsector_begin(FlashAddress subsector_addr) { status_t status; @@ -178,7 +182,9 @@ int flash_impl_write_page_begin(const void *buffer, const FlashAddress start_add return qspi_flash_write_page_begin(QSPI_FLASH, buffer, start_addr, len); } -status_t flash_impl_get_write_status(void) { return qspi_flash_get_write_status(QSPI_FLASH); } +status_t flash_impl_get_write_status(void) { + return qspi_flash_get_write_status(QSPI_FLASH); +} status_t flash_impl_enter_low_power_mode(void) { qspi_flash_set_lower_power_mode(QSPI_FLASH, true); @@ -201,9 +207,13 @@ status_t flash_impl_blank_check_subsector(FlashAddress addr) { return qspi_flash_blank_check(QSPI_FLASH, addr, true /* is_subsector */); } -uint32_t flash_impl_get_typical_sector_erase_duration_ms(void) { return 150; } +uint32_t flash_impl_get_typical_sector_erase_duration_ms(void) { + return 150; +} -uint32_t flash_impl_get_typical_subsector_erase_duration_ms(void) { return 50; } +uint32_t flash_impl_get_typical_subsector_erase_duration_ms(void) { + return 50; +} status_t flash_impl_read_security_register(uint32_t addr, uint8_t *val) { return qspi_flash_read_security_register(QSPI_FLASH, addr, val); diff --git a/src/fw/drivers/flash/py25q128ha.c b/src/fw/drivers/flash/py25q128ha.c index b708b8a02a..c35df7d8f6 100644 --- a/src/fw/drivers/flash/py25q128ha.c +++ b/src/fw/drivers/flash/py25q128ha.c @@ -11,9 +11,9 @@ #include "pbl/util/size.h" static const uint32_t prv_sec_regs[] = { - 0x00001000, - 0x00002000, - 0x00003000, + 0x00001000, + 0x00002000, + 0x00003000, }; static QSPIFlashPart QSPI_FLASH_PART = { @@ -60,11 +60,12 @@ static QSPIFlashPart QSPI_FLASH_PART = { { .fast_read = 4, }, - .sec_registers = { - .sec_regs = prv_sec_regs, - .num_sec_regs = ARRAY_LENGTH(prv_sec_regs), - .sec_reg_size = 1024, - }, + .sec_registers = + { + .sec_regs = prv_sec_regs, + .num_sec_regs = ARRAY_LENGTH(prv_sec_regs), + .sec_reg_size = 1024, + }, .supports_block_lock = false, .reset_latency_ms = 12, .suspend_to_read_latency_us = 20, @@ -85,7 +86,8 @@ FlashAddress flash_impl_get_subsector_base_address(FlashAddress addr) { return (addr & SUBSECTOR_ADDR_MASK); } -void flash_impl_enable_write_protection(void) {} +void flash_impl_enable_write_protection(void) { +} status_t flash_impl_write_protect(FlashAddress start_sector, FlashAddress end_sector) { return S_SUCCESS; @@ -100,7 +102,9 @@ status_t flash_impl_init(bool coredump_mode) { return S_SUCCESS; } -status_t flash_impl_get_erase_status(void) { return qspi_flash_is_erase_complete(QSPI_FLASH); } +status_t flash_impl_get_erase_status(void) { + return qspi_flash_is_erase_complete(QSPI_FLASH); +} status_t flash_impl_erase_subsector_begin(FlashAddress subsector_addr) { return qspi_flash_erase_begin(QSPI_FLASH, subsector_addr, true /* is_subsector */); @@ -128,7 +132,9 @@ int flash_impl_write_page_begin(const void *buffer, const FlashAddress start_add return qspi_flash_write_page_begin(QSPI_FLASH, buffer, start_addr, len); } -status_t flash_impl_get_write_status(void) { return qspi_flash_get_write_status(QSPI_FLASH); } +status_t flash_impl_get_write_status(void) { + return qspi_flash_get_write_status(QSPI_FLASH); +} status_t flash_impl_enter_low_power_mode(void) { qspi_flash_set_lower_power_mode(QSPI_FLASH, true); @@ -151,9 +157,13 @@ status_t flash_impl_blank_check_subsector(FlashAddress addr) { return qspi_flash_blank_check(QSPI_FLASH, addr, true /* is_subsector */); } -uint32_t flash_impl_get_typical_sector_erase_duration_ms(void) { return 150; } +uint32_t flash_impl_get_typical_sector_erase_duration_ms(void) { + return 150; +} -uint32_t flash_impl_get_typical_subsector_erase_duration_ms(void) { return 50; } +uint32_t flash_impl_get_typical_subsector_erase_duration_ms(void) { + return 50; +} status_t flash_impl_read_security_register(uint32_t addr, uint8_t *val) { return qspi_flash_read_security_register(QSPI_FLASH, addr, val); diff --git a/src/fw/drivers/gpio/nrf5.c b/src/fw/drivers/gpio/nrf5.c index db764a2040..791d4823a0 100644 --- a/src/fw/drivers/gpio/nrf5.c +++ b/src/fw/drivers/gpio/nrf5.c @@ -18,7 +18,8 @@ void gpio_output_init(const OutputConfig *pin_config, GPIOOType_TypeDef otype) { if (otype == GPIO_OType_OD) WTF; - nrf_gpio_cfg(pin_config->gpio_pin, NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_S0S1, NRF_GPIO_PIN_NOSENSE); + nrf_gpio_cfg(pin_config->gpio_pin, NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, + NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_S0S1, NRF_GPIO_PIN_NOSENSE); } void gpio_output_set(const OutputConfig *pin_config, bool asserted) { diff --git a/src/fw/drivers/gpio/sf32lb.c b/src/fw/drivers/gpio/sf32lb.c index 83404e7696..aef1d9f507 100644 --- a/src/fw/drivers/gpio/sf32lb.c +++ b/src/fw/drivers/gpio/sf32lb.c @@ -18,7 +18,7 @@ void gpio_output_init(const OutputConfig *pin_config, GPIOOType_TypeDef otype) { } else { WTF; } - HAL_PIN_Set(PAD_PA00 + pin_config->gpio_pin, GPIO_A0 + pin_config->gpio_pin, PIN_NOPULL, 1); + HAL_PIN_Set(PAD_PA00 + pin_config->gpio_pin, GPIO_A0 + pin_config->gpio_pin, PIN_NOPULL, 1); GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(pin_config->gpio, &GPIO_InitStruct); diff --git a/src/fw/drivers/hrm/gh3x2x.c b/src/fw/drivers/hrm/gh3x2x.c index c8913a981e..76499c67d8 100644 --- a/src/fw/drivers/hrm/gh3x2x.c +++ b/src/fw/drivers/hrm/gh3x2x.c @@ -18,7 +18,7 @@ #include "gh_demo.h" #include "gh_demo_inner.h" #include "gh3x2x_demo_mp.h" -#endif // CONFIG_GH3X2X_ALGO +#endif // CONFIG_GH3X2X_ALGO PBL_LOG_MODULE_DEFINE(driver_hrm_gh3x2x, CONFIG_DRIVER_HRM_LOG_LEVEL); @@ -42,9 +42,11 @@ static volatile uint32_t s_hrm_timer_flag = false; // GH3X2X library glue code -void gh3026_reset_pin_init(void) {} +void gh3026_reset_pin_init(void) { +} -void gh3026_i2c_init(void) {} +void gh3026_i2c_init(void) { +} void gh3026_i2c_write(uint8_t device_id, const uint8_t write_buffer[], uint16_t length) { i2c_use(HRM->i2c); @@ -60,17 +62,18 @@ void gh3026_i2c_read(uint8_t device_id, const uint8_t write_buffer[], uint16_t w i2c_release(HRM->i2c); } -static void prv_conv_fs4g_mg_to_lsb512(AccelRawData* data) { - //hrm use 512lsb/g, so convert the mg data to lsb by coef 1.953f(1000/512) - data->x = (int16_t)data->x/1.953f; - data->y = (int16_t)data->y/1.953f; - data->z = (int16_t)data->z/1.953f; +static void prv_conv_fs4g_mg_to_lsb512(AccelRawData *data) { + // hrm use 512lsb/g, so convert the mg data to lsb by coef 1.953f(1000/512) + data->x = (int16_t)data->x / 1.953f; + data->y = (int16_t)data->y / 1.953f; + data->z = (int16_t)data->z / 1.953f; } void gh3026_gsensor_data_get(STGsensorRawdata gsensor_buffer[], GU16 *gsensor_buffer_index) { - HRMAccelData* acc = hrm_manager_get_accel_data(); + HRMAccelData *acc = hrm_manager_get_accel_data(); GU16 count = *gsensor_buffer_index = acc->num_samples; - if(count > __GSENSOR_DATA_BUFFER_SIZE__) count = __GSENSOR_DATA_BUFFER_SIZE__; + if (count > __GSENSOR_DATA_BUFFER_SIZE__) + count = __GSENSOR_DATA_BUFFER_SIZE__; for (uint16_t i = 0; i < count; ++i) { prv_conv_fs4g_mg_to_lsb512(&acc->data[i]); memcpy(&gsensor_buffer[i], &acc->data[i], sizeof(STGsensorRawdata)); @@ -115,7 +118,8 @@ void gh3x2x_print_fmt(const char *fmt, ...) { void gh3x2x_hr_result_report(uint8_t bpm, uint8_t quality) { HRMData hrm_data = {0}; - PBL_LOG_DBG("GH3X2X BPM %" PRIu8 " (quality=%" PRIu8 ", wear=%u)", bpm, quality, HRM->state->is_wear); + PBL_LOG_DBG("GH3X2X BPM %" PRIu8 " (quality=%" PRIu8 ", wear=%u)", bpm, quality, + HRM->state->is_wear); hrm_data.features = HRMFeature_BPM; @@ -143,7 +147,8 @@ void gh3x2x_hr_result_report(uint8_t bpm, uint8_t quality) { void gh3x2x_spo2_result_report(uint8_t pct, uint8_t quality) { HRMData hrm_data = {0}; - PBL_LOG_DBG("GH3X2X SpO2 %" PRIu8 " (quality=%" PRIu8 ", wear=%u)", pct, quality, HRM->state->is_wear); + PBL_LOG_DBG("GH3X2X SpO2 %" PRIu8 " (quality=%" PRIu8 ", wear=%u)", pct, quality, + HRM->state->is_wear); hrm_data.features = HRMFeature_SpO2; @@ -169,8 +174,8 @@ void gh3x2x_spo2_result_report(uint8_t pct, uint8_t quality) { } #ifdef CONFIG_HRM_HRV void gh3x2x_hrv_result_report(const int32_t *rri, int32_t confidence, int32_t valid_num) { - PBL_LOG_DBG("GH3X2X HRV n=%" PRId32 " (conf=%" PRId32 ", wear=%u)", - valid_num, confidence, HRM->state->is_wear); + PBL_LOG_DBG("GH3X2X HRV n=%" PRId32 " (conf=%" PRId32 ", wear=%u)", valid_num, confidence, + HRM->state->is_wear); if (!HRM->state->is_wear) { HRMData hrm_data = {0}; hrm_data.features = HRMFeature_HRV; @@ -218,12 +223,12 @@ void gh3x2x_timer_init(uint32_t period_ms) { } } -static void gh3x2x_timer_callback(void* data) { +static void gh3x2x_timer_callback(void *data) { uint32_t param = (uint32_t)data; if (param != 0x87965421) { // Coalesce repeated timer firings - only queue one callback at a time if (s_hrm_timer_flag == false) { - if (system_task_add_callback(gh3x2x_timer_callback, (void*)0x87965421)) { + if (system_task_add_callback(gh3x2x_timer_callback, (void *)0x87965421)) { s_hrm_timer_flag = true; } } @@ -233,17 +238,18 @@ static void gh3x2x_timer_callback(void* data) { Gh3x2xSerialSendTimerHandle(); } -static void gh3x2x_timer_start_handle(void* arg) { +static void gh3x2x_timer_start_handle(void *arg) { if (HRM == NULL || HRM->state->timer != NULL) { return; } if (HRM->state->timer_period_ms == 0) { return; } - HRM->state->timer = app_timer_register_repeatable(HRM->state->timer_period_ms, gh3x2x_timer_callback, NULL, true); + HRM->state->timer = + app_timer_register_repeatable(HRM->state->timer_period_ms, gh3x2x_timer_callback, NULL, true); } -static void gh3x2x_timer_stop_handle(void* arg) { +static void gh3x2x_timer_stop_handle(void *arg) { if (HRM && HRM->state->timer) { app_timer_cancel(HRM->state->timer); HRM->state->timer = NULL; @@ -253,8 +259,8 @@ static void gh3x2x_timer_stop_handle(void* arg) { void gh3x2x_timer_start(void) { return; PebbleEvent e = { - .type = PEBBLE_CALLBACK_EVENT, - .callback.callback = gh3x2x_timer_start_handle, + .type = PEBBLE_CALLBACK_EVENT, + .callback.callback = gh3x2x_timer_start_handle, }; event_put(&e); } @@ -262,8 +268,8 @@ void gh3x2x_timer_start(void) { void gh3x2x_timer_stop(void) { return; PebbleEvent e = { - .type = PEBBLE_CALLBACK_EVENT, - .callback.callback = gh3x2x_timer_stop_handle, + .type = PEBBLE_CALLBACK_EVENT, + .callback.callback = gh3x2x_timer_stop_handle, }; event_put(&e); } @@ -274,14 +280,14 @@ static void gh3x2x_ble_data_recv_handle(void *context) { } uint32_t data_len; - uint8_t *p_data = (uint8_t*)context; + uint8_t *p_data = (uint8_t *)context; memcpy(&data_len, p_data, sizeof(uint32_t)); p_data += sizeof(uint32_t); - Gh3x2xDemoProtocolProcess((GU8*)p_data, data_len); + Gh3x2xDemoProtocolProcess((GU8 *)p_data, data_len); free(context); } -bool gh3x2x_ble_data_recv(void* context) { +bool gh3x2x_ble_data_recv(void *context) { if (context == NULL) { return false; } @@ -297,12 +303,12 @@ bool gh3x2x_ble_data_recv(void* context) { void gh3x2x_rawdata_notify(uint32_t *p_rawdata, uint32_t data_count) { #ifdef CONFIG_MFG - HRMDevice* p_dev = HRM; + HRMDevice *p_dev = HRM; if (p_dev == NULL || p_dev->state->enabled == false) { return; } - GH3x2xFTData* p_factory = p_dev->state->factory; + GH3x2xFTData *p_factory = p_dev->state->factory; if (p_factory == NULL) { return; } @@ -322,10 +328,10 @@ void gh3x2x_rawdata_notify(uint32_t *p_rawdata, uint32_t data_count) { if (p_factory->wpos >= HRM_PPG_FACTORY_TEST_FIFO_LEN) { p_factory->wpos = 0; } - for (idx=0; idxppg_array[idx][p_factory->wpos] = *p_rawdata++; } - + p_factory->wpos++; if (p_factory->count < HRM_PPG_FACTORY_TEST_FIFO_LEN) { p_factory->count++; @@ -341,37 +347,37 @@ void gh3x2x_rawdata_notify(uint32_t *p_rawdata, uint32_t data_count) { uint64_t total[HRM_PPG_CH_NUM]; HRMData hrm_data = {0}; memset(total, 0, sizeof(total)); - for (idx=0; idxcount; ++i) { + for (i = 0; i < p_factory->count; ++i) { total[idx] += p_factory->ppg_array[idx][i]; } // calcu avr for each channel ppg_avg[idx] = total[idx] / p_factory->count; } - - //let keep the factory test data report 2hz + + // let keep the factory test data report 2hz static int cnt = 0; - if (cnt++ % 25) return; + if (cnt++ % 25) + return; if (mode == GH3X2X_FUNCTION_TEST1) { hrm_data.features = HRMFeature_CTR; // calcu CTR: result = ((ppg_avg-2^23))*1800*1000/(20*10*2*(2^23)); // Green >= 28; IR >= 36; Red >= 36 - for (i=0; iresult[i] = ((double)(ppg_avg[i] - (1<<23)) * 4500) / (1<<23); + for (i = 0; i < HRM_PPG_CH_NUM; ++i) { + p_factory->result[i] = ((double)(ppg_avg[i] - (1 << 23)) * 4500) / (1 << 23); hrm_data.ctr[i] = p_factory->result[i]; } hrm_manager_new_data_cb(&hrm_data); } else if (mode == GH3X2X_FUNCTION_TEST2) { - hrm_data.features = HRMFeature_Leakage; + hrm_data.features = HRMFeature_Leakage; // calcu leakage: result = (ppg_avg-(2^23))*1800*1000/(20*100*2*(2^23)); - for (i=0; iresult[i] = ((double)(ppg_avg[i] - (1<<23)) * 450) / (1<<23); + for (i = 0; i < HRM_PPG_CH_NUM; ++i) { + p_factory->result[i] = ((double)(ppg_avg[i] - (1 << 23)) * 450) / (1 << 23); hrm_data.leakage[i] = p_factory->result[i]; } hrm_manager_new_data_cb(&hrm_data); } else { - ; } #endif @@ -380,18 +386,19 @@ void gh3x2x_rawdata_notify(uint32_t *p_rawdata, uint32_t data_count) { #ifdef CONFIG_MFG void gh3x2x_factory_test_enable(HRMDevice *dev, GH3x2xFTType test_type) { uint32_t mode = 0; - if (test_type == HRM_FACTORY_TEST_CTR) { // CTR + if (test_type == HRM_FACTORY_TEST_CTR) { // CTR mode = GH3X2X_FUNCTION_TEST1; - } else if (test_type == HRM_FACTORY_TEST_LIGHT_LEAK) { // leakage + } else if (test_type == HRM_FACTORY_TEST_LIGHT_LEAK) { // leakage mode = GH3X2X_FUNCTION_TEST2; - } else if (test_type == HRM_FACTORY_TEST_HSM) { // noise + } else if (test_type == HRM_FACTORY_TEST_HSM) { // noise mode = GH3X2X_FUNCTION_HSM; } else { return; } - uint32_t* ppg_data; - GH3x2xFTData* p_factory = (GH3x2xFTData*)malloc(sizeof(GH3x2xFTData) + sizeof(uint32_t)*HRM_PPG_FACTORY_TEST_FIFO_LEN*HRM_PPG_CH_NUM); + uint32_t *ppg_data; + GH3x2xFTData *p_factory = (GH3x2xFTData *)malloc( + sizeof(GH3x2xFTData) + sizeof(uint32_t) * HRM_PPG_FACTORY_TEST_FIFO_LEN * HRM_PPG_CH_NUM); if (p_factory == NULL) { PBL_LOG_ERR("malloc failed."); return; @@ -402,9 +409,9 @@ void gh3x2x_factory_test_enable(HRMDevice *dev, GH3x2xFTType test_type) { if (dev->state->factory != NULL) { free(dev->state->factory); } - ppg_data = (uint32_t*)(p_factory + 1); - for (uint32_t i=0; ippg_array[i] = ppg_data + HRM_PPG_FACTORY_TEST_FIFO_LEN*i; + ppg_data = (uint32_t *)(p_factory + 1); + for (uint32_t i = 0; i < HRM_PPG_CH_NUM; ++i) { + p_factory->ppg_array[i] = ppg_data + HRM_PPG_FACTORY_TEST_FIFO_LEN * i; } dev->state->factory = p_factory; @@ -414,8 +421,8 @@ void gh3x2x_factory_test_enable(HRMDevice *dev, GH3x2xFTType test_type) { Gh3x2xDemoStartSamplingWithCfgSwitch(mode, 1); } -//shoud be called in system task -static void gh3x2x_ft_ctr_start_handle(void* data) { +// shoud be called in system task +static void gh3x2x_ft_ctr_start_handle(void *data) { gh3x2x_factory_test_enable(HRM, HRM_FACTORY_TEST_CTR); } @@ -423,8 +430,8 @@ void gh3x2x_start_ft_ctr(void) { system_task_add_callback(gh3x2x_ft_ctr_start_handle, NULL); } -//shoud be called in system task -static void gh3x2x_ft_leakage_start_handle(void* data) { +// shoud be called in system task +static void gh3x2x_ft_leakage_start_handle(void *data) { gh3x2x_factory_test_enable(HRM, HRM_FACTORY_TEST_LIGHT_LEAK); } @@ -432,7 +439,7 @@ void gh3x2x_start_ft_leakage(void) { system_task_add_callback(gh3x2x_ft_leakage_start_handle, NULL); } -//shoud be called in system task +// shoud be called in system task static void gh3x2x_factory_test_disable_handle(void *data) { HRMDevice *dev = (HRMDevice *)data; dev->state->enabled = false; @@ -444,16 +451,15 @@ static void gh3x2x_factory_test_disable_handle(void *data) { } void gh3x2x_factory_test_disable(void) { - system_task_add_callback(gh3x2x_factory_test_disable_handle, (void*)HRM); + system_task_add_callback(gh3x2x_factory_test_disable_handle, (void *)HRM); } -uint8_t gh3x2x_factory_result_get(float* p_result) -{ - HRMDevice* p_dev = HRM; +uint8_t gh3x2x_factory_result_get(float *p_result) { + HRMDevice *p_dev = HRM; if (p_result) { - GH3x2xFTData* p_factory = p_dev->state->factory; + GH3x2xFTData *p_factory = p_dev->state->factory; if (p_factory != NULL && p_factory->count >= HRM_PPG_FACTORY_TEST_FIFO_LEN) { - memcpy(p_result, p_factory->result, sizeof(float)*HRM_PPG_FACTORY_TEST_FIFO_LEN); + memcpy(p_result, p_factory->result, sizeof(float) * HRM_PPG_FACTORY_TEST_FIFO_LEN); return HRM_PPG_FACTORY_TEST_FIFO_LEN; } } @@ -461,13 +467,13 @@ uint8_t gh3x2x_factory_result_get(float* p_result) } void gh3x2x_set_work_mode(int32_t mode) { - HRMDeviceState* state = HRM->state; - //always enable soft adt + HRMDeviceState *state = HRM->state; + // always enable soft adt state->work_mode = mode | GH3X2X_FUNCTION_SOFT_ADT_IR; } -#endif // CONFIG_MFG +#endif // CONFIG_MFG -#endif // CONFIG_GH3X2X_ALGO +#endif // CONFIG_GH3X2X_ALGO // HRM interface diff --git a/src/fw/drivers/hrm/stub.c b/src/fw/drivers/hrm/stub.c index 0c54cfe29d..fbd97341b2 100644 --- a/src/fw/drivers/hrm/stub.c +++ b/src/fw/drivers/hrm/stub.c @@ -7,14 +7,14 @@ void hrm_init(HRMDevice *dev) { } bool hrm_enable(HRMDevice *dev, HRMFeature features) { - dev->state->enabled = true; - return true; + dev->state->enabled = true; + return true; } void hrm_disable(HRMDevice *dev) { - dev->state->enabled = false; + dev->state->enabled = false; } bool hrm_is_enabled(HRMDevice *dev) { - return dev->state->enabled; + return dev->state->enabled; } diff --git a/src/fw/drivers/i2c/common.c b/src/fw/drivers/i2c/common.c index 065da268b6..84fdac3cd1 100644 --- a/src/fw/drivers/i2c/common.c +++ b/src/fw/drivers/i2c/common.c @@ -22,13 +22,13 @@ PBL_LOG_MODULE_DEFINE(driver_i2c, CONFIG_DRIVER_I2C_LOG_LEVEL); -#define I2C_ERROR_TIMEOUT_MS (1000) +#define I2C_ERROR_TIMEOUT_MS (1000) #define I2C_TIMEOUT_ATTEMPTS_MAX (2 * 1000 * 1000) // MFI NACKs while busy. We delay ~1ms between retries so this is approximately a 1000ms timeout. // The longest operation of the MFi chip is "start signature generation", which seems to take // 223-224 NACKs, but sometimes for unknown reasons it can take much longer. -#define I2C_NACK_COUNT_MAX (1000) +#define I2C_NACK_COUNT_MAX (1000) #define Read I2CTransferDirection_Read #define Write I2CTransferDirection_Write @@ -90,7 +90,7 @@ static void prv_bus_reset(I2CBus *bus) { void i2c_init(I2CBus *bus) { PBL_ASSERTN(bus); - *bus->state = (I2CBusState) { 0 }; + *bus->state = (I2CBusState){0}; pbl_sem_init(&bus->state->event_semaphore, 0, 1); pbl_mutex_init(&bus->state->bus_mutex); @@ -137,8 +137,10 @@ void i2c_reset(I2CSlavePort *slave) { pbl_mutex_lock(&slave->bus->state->bus_mutex, PBL_FOREVER); if (slave->bus->state->user_count == 0) { - PBL_LOG_ERR("Attempted reset of disabled bus %s when still in use by " - "another bus", slave->bus->name); + PBL_LOG_ERR( + "Attempted reset of disabled bus %s when still in use by " + "another bus", + slave->bus->name); pbl_mutex_unlock(&slave->bus->state->bus_mutex); return; } @@ -167,7 +169,7 @@ bool i2c_bitbang_recovery(I2CSlavePort *slave) { //! Wait a short amount of time for busy bit to clear static bool prv_wait_for_not_busy(I2CBus *bus) { - static const int WAIT_DELAY = 10; // milliseconds + static const int WAIT_DELAY = 10; // milliseconds if (i2c_hal_is_busy(bus)) { psleep(WAIT_DELAY); @@ -183,9 +185,9 @@ static bool prv_wait_for_not_busy(I2CBus *bus) { //! Set up and start a transfer to a bus, wait for it to finish and clean up after the transfer //! has completed //! Caller must hold bus mutex -static bool prv_do_transfer_locked(I2CBus *bus, I2CTransferDirection direction, uint16_t device_address, - uint8_t register_address, uint32_t size, uint8_t *data, - I2CTransferType type) { +static bool prv_do_transfer_locked(I2CBus *bus, I2CTransferDirection direction, + uint16_t device_address, uint8_t register_address, uint32_t size, + uint8_t *data, I2CTransferType type) { if (bus->state->user_count == 0) { PBL_LOG_ERR("Attempted access to disabled bus %s", bus->name); return false; @@ -208,14 +210,14 @@ static bool prv_do_transfer_locked(I2CBus *bus, I2CTransferDirection direction, PBL_ASSERT(prv_semaphore_take(bus->state), "Could not acquire semaphore token"); // Set up transfer - bus->state->transfer = (I2CTransfer) { - .device_address = device_address, - .register_address = register_address, - .direction = direction, - .type = type, - .size = size, - .idx = 0, - .data = data, + bus->state->transfer = (I2CTransfer){ + .device_address = device_address, + .register_address = register_address, + .direction = direction, + .type = type, + .size = size, + .idx = 0, + .data = data, }; i2c_hal_init_transfer(bus); @@ -288,8 +290,8 @@ static bool prv_do_transfer(I2CBus *bus, I2CTransferDirection direction, uint16_ I2CTransferType type) { pbl_mutex_lock(&bus->state->bus_mutex, PBL_FOREVER); - bool result = prv_do_transfer_locked(bus, direction, device_address, register_address, size, - data, type); + bool result = + prv_do_transfer_locked(bus, direction, device_address, register_address, size, data, type); pbl_mutex_unlock(&bus->state->bus_mutex); @@ -300,8 +302,8 @@ bool i2c_read_register(I2CSlavePort *slave, uint8_t register_address, uint8_t *r return i2c_read_register_block(slave, register_address, 1, result); } -bool i2c_read_register_block(I2CSlavePort *slave, uint8_t register_address_start, - uint32_t read_size, uint8_t* result_buffer) { +bool i2c_read_register_block(I2CSlavePort *slave, uint8_t register_address_start, + uint32_t read_size, uint8_t *result_buffer) { PBL_ASSERTN(slave); PBL_ASSERTN(result_buffer); // Do transfer locks the bus @@ -315,12 +317,12 @@ bool i2c_read_register_block(I2CSlavePort *slave, uint8_t register_address_star return result; } -bool i2c_read_block(I2CSlavePort *slave, uint32_t read_size, uint8_t* result_buffer) { +bool i2c_read_block(I2CSlavePort *slave, uint32_t read_size, uint8_t *result_buffer) { PBL_ASSERTN(slave); PBL_ASSERTN(result_buffer); bool result = prv_do_transfer(slave->bus, Read, slave->address, 0, read_size, result_buffer, - NoRegisterAddress); + NoRegisterAddress); if (!result) { PBL_LOG_ERR("Block read failed on bus %s", slave->bus->name); @@ -334,12 +336,12 @@ bool i2c_write_register(I2CSlavePort *slave, uint8_t register_address, uint8_t v } bool i2c_write_register_block(I2CSlavePort *slave, uint8_t register_address_start, - uint32_t write_size, const uint8_t* buffer) { + uint32_t write_size, const uint8_t *buffer) { PBL_ASSERTN(slave); PBL_ASSERTN(buffer); // Do transfer locks the bus bool result = prv_do_transfer(slave->bus, Write, slave->address, register_address_start, - write_size, (uint8_t*)buffer, SendRegisterAddress); + write_size, (uint8_t *)buffer, SendRegisterAddress); if (!result) { PBL_LOG_ERR("Write failed on bus %s", slave->bus->name); @@ -348,12 +350,12 @@ bool i2c_write_register_block(I2CSlavePort *slave, uint8_t register_address_star return result; } -bool i2c_write_block(I2CSlavePort *slave, uint32_t write_size, const uint8_t* buffer) { +bool i2c_write_block(I2CSlavePort *slave, uint32_t write_size, const uint8_t *buffer) { PBL_ASSERTN(slave); PBL_ASSERTN(buffer); // Do transfer locks the bus - bool result = prv_do_transfer(slave->bus, Write, slave->address, 0, write_size, (uint8_t*)buffer, + bool result = prv_do_transfer(slave->bus, Write, slave->address, 0, write_size, (uint8_t *)buffer, NoRegisterAddress); if (!result) { @@ -363,8 +365,8 @@ bool i2c_write_block(I2CSlavePort *slave, uint32_t write_size, const uint8_t* bu return result; } -bool i2c_write_read_block(I2CSlavePort *slave, uint32_t write_size, const uint8_t* write_buffer, - uint32_t read_size, uint8_t* read_buffer) { +bool i2c_write_read_block(I2CSlavePort *slave, uint32_t write_size, const uint8_t *write_buffer, + uint32_t read_size, uint8_t *read_buffer) { PBL_ASSERTN(slave); PBL_ASSERTN(write_buffer); PBL_ASSERTN(read_buffer); @@ -376,12 +378,12 @@ bool i2c_write_read_block(I2CSlavePort *slave, uint32_t write_size, const uint8_ // Perform write transfer bool result = prv_do_transfer_locked(bus, Write, slave->address, 0, write_size, - (uint8_t*)write_buffer, NoRegisterAddress); + (uint8_t *)write_buffer, NoRegisterAddress); // Only proceed with read if write succeeded if (result) { - result = prv_do_transfer_locked(bus, Read, slave->address, 0, read_size, - read_buffer, NoRegisterAddress); + result = prv_do_transfer_locked(bus, Read, slave->address, 0, read_size, read_buffer, + NoRegisterAddress); } pbl_mutex_unlock(&bus->state->bus_mutex); diff --git a/src/fw/drivers/i2c/nrf5.c b/src/fw/drivers/i2c/nrf5.c index 93640f010a..483c333fb2 100644 --- a/src/fw/drivers/i2c/nrf5.c +++ b/src/fw/drivers/i2c/nrf5.c @@ -14,8 +14,8 @@ #include #define I2C_IRQ_PRIORITY (0xc) -#define I2C_NORMAL_MODE_CLOCK_SPEED_MAX (100000) -#define I2C_READ_WRITE_BIT (0x01) +#define I2C_NORMAL_MODE_CLOCK_SPEED_MAX (100000) +#define I2C_READ_WRITE_BIT (0x01) // Register address + payload buffered for single-transfer register writes. // Register writes are small; a larger payload fails the transfer. @@ -23,29 +23,29 @@ static uint8_t s_reg_write_buf[NRFX_TWIM_ENABLED_COUNT][I2C_REG_WRITE_BUF_SIZE]; static void prv_twim_evt_handler(nrfx_twim_evt_t const *evt, void *ctx) { - I2CBus *bus = (I2CBus *) ctx; + I2CBus *bus = (I2CBus *)ctx; bool success = evt->type == NRFX_TWIM_EVT_DONE; I2CTransferEvent event = success ? I2CTransferEvent_TransferComplete : I2CTransferEvent_Error; i2c_handle_transfer_event(bus, event); } static void prv_twim_init(I2CBus *bus) { - nrfx_twim_config_t config = NRFX_TWIM_DEFAULT_CONFIG( - bus->scl_gpio.gpio_pin, bus->sda_gpio.gpio_pin); + nrfx_twim_config_t config = + NRFX_TWIM_DEFAULT_CONFIG(bus->scl_gpio.gpio_pin, bus->sda_gpio.gpio_pin); config.frequency = bus->hal->frequency; config.hold_bus_uninit = true; - + nrfx_err_t err = nrfx_twim_init(&bus->hal->twim, &config, prv_twim_evt_handler, (void *)bus); PBL_ASSERTN(err == NRFX_SUCCESS); } void i2c_hal_init(I2CBus *bus) { - prv_twim_init(bus); + prv_twim_init(bus); nrfx_twim_uninit(&bus->hal->twim); } void i2c_hal_enable(I2CBus *bus) { - prv_twim_init(bus); + prv_twim_init(bus); nrfx_twim_enable(&bus->hal->twim); } @@ -106,7 +106,7 @@ void i2c_hal_start_transfer(I2CBus *bus) { desc.p_primary_buf = transfer->data; desc.secondary_length = 0; } - + nrfx_err_t rv = nrfx_twim_xfer(&bus->hal->twim, &desc, 0); PBL_ASSERTN(rv == NRFX_SUCCESS); } diff --git a/src/fw/drivers/imu/lis2dw12/lis2dw12.c b/src/fw/drivers/imu/lis2dw12/lis2dw12.c index f681e61f0e..02e9b5e9e6 100644 --- a/src/fw/drivers/imu/lis2dw12/lis2dw12.c +++ b/src/fw/drivers/imu/lis2dw12/lis2dw12.c @@ -39,7 +39,7 @@ PBL_LOG_MODULE_DEFINE(driver_accel_lis2dw12, CONFIG_DRIVER_IMU_LOG_LEVEL); #define LIS2DW12_RESET_TIME_US 5 // DRDY polling parameters for accel_peek single-shot mode -#define LIS2DW12_DRDY_POLL_DELAY_MS (5) /* ms between data-ready polls */ +#define LIS2DW12_DRDY_POLL_DELAY_MS (5) /* ms between data-ready polls */ #define LIS2DW12_DRDY_POLL_TIMEOUT_MS (100) /* max wait (~5x 20ms at 50Hz ODR) */ // FIFO threshold periods without a FIFO read before the stream is considered @@ -230,20 +230,24 @@ static void prv_lis2dw12_process_samples(uint8_t num_samples, uint64_t timestamp // raw word equals the 12-bit value << 4; scale the denominator by 16 to match. int8_t rotate = LIS2DW12->state->rotated ? -1 : 1; AccelRawBatch batch = { - .data = LIS2DW12->state->raw_sample_buf, - .num_samples = num_samples, - .stride = LIS2DW12_SAMPLE_SIZE_BYTES, - .axis = { - [AXIS_X] = {.offset = LIS2DW12->axis_map[AXIS_X] * 2U, - .sign = (int8_t)(LIS2DW12->axis_dir[AXIS_X] * rotate)}, - [AXIS_Y] = {.offset = LIS2DW12->axis_map[AXIS_Y] * 2U, - .sign = (int8_t)(LIS2DW12->axis_dir[AXIS_Y] * rotate)}, - [AXIS_Z] = {.offset = LIS2DW12->axis_map[AXIS_Z] * 2U, .sign = LIS2DW12->axis_dir[AXIS_Z]}, - }, - .scale_num = CONFIG_ACCEL_LIS2DW12_SCALE_MG, - .scale_den = LIS2DW12_S12_SCALE_RANGE << 4U, - .first_timestamp_us = timestamp_us, - .sampling_interval_us = LIS2DW12->state->sampling_interval_us, + .data = LIS2DW12->state->raw_sample_buf, + .num_samples = num_samples, + .stride = LIS2DW12_SAMPLE_SIZE_BYTES, + .axis = + { + [AXIS_X] = + {.offset = LIS2DW12->axis_map[AXIS_X] * 2U, + .sign = (int8_t)(LIS2DW12->axis_dir[AXIS_X] * rotate)}, + [AXIS_Y] = + {.offset = LIS2DW12->axis_map[AXIS_Y] * 2U, + .sign = (int8_t)(LIS2DW12->axis_dir[AXIS_Y] * rotate)}, + [AXIS_Z] = + {.offset = LIS2DW12->axis_map[AXIS_Z] * 2U, .sign = LIS2DW12->axis_dir[AXIS_Z]}, + }, + .scale_num = CONFIG_ACCEL_LIS2DW12_SCALE_MG, + .scale_den = LIS2DW12_S12_SCALE_RANGE << 4U, + .first_timestamp_us = timestamp_us, + .sampling_interval_us = LIS2DW12->state->sampling_interval_us, }; accel_cb_new_samples(&batch); @@ -442,9 +446,8 @@ static bool prv_configure_odr(uint32_t sampling_interval_us, bool shake_detectio sampling_interval_us = 5000UL; } - PBL_LOG_DBG("Configuring ODR to %" PRIu32 " ms (%" PRIu32 " mHz)", - sampling_interval_us / 1000UL, - sampling_interval_us > 0UL ? 1000000000UL / sampling_interval_us : 0UL); + PBL_LOG_DBG("Configuring ODR to %" PRIu32 " ms (%" PRIu32 " mHz)", sampling_interval_us / 1000UL, + sampling_interval_us > 0UL ? 1000000000UL / sampling_interval_us : 0UL); ret = prv_lis2dw12_write(LIS2DW12_CTRL1, &val, 1); if (!ret) { @@ -511,8 +514,7 @@ static void prv_lis2dw12_recover(void) { LIS2DW12->state->num_recoveries++; PBL_ANALYTICS_ADD(accel_stream_recovery_count, 1); - PBL_LOG_WRN("Recovering accel stream (count %" PRIu32 ")", - LIS2DW12->state->num_recoveries); + PBL_LOG_WRN("Recovering accel stream (count %" PRIu32 ")", LIS2DW12->state->num_recoveries); if (!prv_configure_int1(false, false)) { return; @@ -556,8 +558,7 @@ static uint32_t prv_ms_since_last_fifo_read(void) { } static uint32_t prv_stall_threshold_ms(void) { - return MAX(LIS2DW12_STALL_MARGIN * LIS2DW12->state->int1_period_ms, - LIS2DW12_STALL_MIN_MS); + return MAX(LIS2DW12_STALL_MARGIN * LIS2DW12->state->int1_period_ms, LIS2DW12_STALL_MIN_MS); } //! Arm/disarm the INT1 stall watchdog to match the active INT1 sources. @@ -591,8 +592,7 @@ static void prv_stall_check_work_cb(void) { // Shake-only mode: re-run the servicing pass if the pad is stuck high // (reading the INT source clears the latch); escalate to a full recovery // after consecutive passes that never release it. - if (LIS2DW12->state->shake_detection_enabled && - gpio_input_read(&LIS2DW12->int1_in)) { + if (LIS2DW12->state->shake_detection_enabled && gpio_input_read(&LIS2DW12->int1_in)) { prv_lis2dw12_int1_work_handler(); // A pad released by the pass is healthy; count only a still-high pad if (!gpio_input_read(&LIS2DW12->int1_in)) { @@ -755,8 +755,7 @@ uint32_t accel_set_sampling_interval(uint32_t interval_us) { } } - PBL_LOG_DBG("Set sampling interval to %" PRIu32 " us", - LIS2DW12->state->sampling_interval_us); + PBL_LOG_DBG("Set sampling interval to %" PRIu32 " us", LIS2DW12->state->sampling_interval_us); return LIS2DW12->state->sampling_interval_us; } @@ -986,8 +985,7 @@ void accel_set_shake_sensitivity_high(bool sensitivity_high) { return; } - PBL_LOG_DBG("Configured shake sensitivity to %s", - sensitivity_high ? "high" : "normal"); + PBL_LOG_DBG("Configured shake sensitivity to %s", sensitivity_high ? "high" : "normal"); } void accel_set_shake_sensitivity_percent(uint8_t percent) { diff --git a/src/fw/drivers/imu/lsm6dso/lsm6dso.c b/src/fw/drivers/imu/lsm6dso/lsm6dso.c index 3d5434a13b..d7c368dc54 100644 --- a/src/fw/drivers/imu/lsm6dso/lsm6dso.c +++ b/src/fw/drivers/imu/lsm6dso/lsm6dso.c @@ -43,7 +43,7 @@ PBL_LOG_MODULE_DEFINE(driver_accel_lsm6dso, CONFIG_DRIVER_IMU_LOG_LEVEL); #define LSM6DSO_RESET_TIME_US 5 // DRDY polling parameters for accel_peek single-shot mode -#define LSM6DSO_DRDY_POLL_DELAY_MS (5) /* ms between data-ready polls */ +#define LSM6DSO_DRDY_POLL_DELAY_MS (5) /* ms between data-ready polls */ #define LSM6DSO_DRDY_POLL_TIMEOUT_MS (100) /* max wait (~5x 20ms at 52Hz ODR) */ // FIFO threshold periods without a FIFO read before the stream is considered @@ -216,10 +216,9 @@ static int16_t prv_axis_raw_mg(IMUCoordinateAxis axis, const uint8_t *raw) { offset = LSM6DSO->axis_map[axis]; - val = LSM6DSO->axis_dir[axis] * - (int16_t)(((int32_t)prv_raw_to_s16(&raw[offset * 2U]) * - (int32_t)CONFIG_ACCEL_LSM6DSO_SCALE_MG) / - (int32_t)LSM6DSO_S16_SCALE_RANGE); + val = LSM6DSO->axis_dir[axis] * (int16_t)(((int32_t)prv_raw_to_s16(&raw[offset * 2U]) * + (int32_t)CONFIG_ACCEL_LSM6DSO_SCALE_MG) / + (int32_t)LSM6DSO_S16_SCALE_RANGE); if (LSM6DSO->state->rotated && (axis == AXIS_X || axis == AXIS_Y)) { val *= -1; @@ -250,20 +249,24 @@ static void prv_lsm6dso_process_samples(uint16_t num_samples, uint64_t timestamp // first data byte and let the service step over the tags via the stride. int8_t rotate = LSM6DSO->state->rotated ? -1 : 1; AccelRawBatch batch = { - .data = &LSM6DSO->state->raw_sample_buf[1], - .num_samples = num_samples, - .stride = LSM6DSO_FIFO_WORD_SIZE_BYTES, - .axis = { - [AXIS_X] = {.offset = LSM6DSO->axis_map[AXIS_X] * 2U, - .sign = (int8_t)(LSM6DSO->axis_dir[AXIS_X] * rotate)}, - [AXIS_Y] = {.offset = LSM6DSO->axis_map[AXIS_Y] * 2U, - .sign = (int8_t)(LSM6DSO->axis_dir[AXIS_Y] * rotate)}, - [AXIS_Z] = {.offset = LSM6DSO->axis_map[AXIS_Z] * 2U, .sign = LSM6DSO->axis_dir[AXIS_Z]}, - }, - .scale_num = CONFIG_ACCEL_LSM6DSO_SCALE_MG, - .scale_den = LSM6DSO_S16_SCALE_RANGE, - .first_timestamp_us = timestamp_us, - .sampling_interval_us = LSM6DSO->state->sampling_interval_us, + .data = &LSM6DSO->state->raw_sample_buf[1], + .num_samples = num_samples, + .stride = LSM6DSO_FIFO_WORD_SIZE_BYTES, + .axis = + { + [AXIS_X] = + {.offset = LSM6DSO->axis_map[AXIS_X] * 2U, + .sign = (int8_t)(LSM6DSO->axis_dir[AXIS_X] * rotate)}, + [AXIS_Y] = + {.offset = LSM6DSO->axis_map[AXIS_Y] * 2U, + .sign = (int8_t)(LSM6DSO->axis_dir[AXIS_Y] * rotate)}, + [AXIS_Z] = + {.offset = LSM6DSO->axis_map[AXIS_Z] * 2U, .sign = LSM6DSO->axis_dir[AXIS_Z]}, + }, + .scale_num = CONFIG_ACCEL_LSM6DSO_SCALE_MG, + .scale_den = LSM6DSO_S16_SCALE_RANGE, + .first_timestamp_us = timestamp_us, + .sampling_interval_us = LSM6DSO->state->sampling_interval_us, }; accel_cb_new_samples(&batch); @@ -398,8 +401,8 @@ static bool prv_lsm6dso_service_int1(Lsm6dsoInt1Pass pass, bool *fifo_progress) if ((fifo_status[1] & LSM6DSO_FIFO_STATUS2_FIFO_OVR_IA) != 0U) { fifo_overrun = true; } else if ((fifo_status[1] & LSM6DSO_FIFO_STATUS2_FIFO_WTM_IA) != 0U) { - samples = (((uint16_t)(fifo_status[1] & LSM6DSO_FIFO_STATUS2_DIFF_HI_MASK)) << 8U) | - fifo_status[0]; + samples = + (((uint16_t)(fifo_status[1] & LSM6DSO_FIFO_STATUS2_DIFF_HI_MASK)) << 8U) | fifo_status[0]; if (samples > LSM6DSO_FIFO_SIZE) { samples = LSM6DSO_FIFO_SIZE; } @@ -453,7 +456,8 @@ static bool prv_lsm6dso_service_int1(Lsm6dsoInt1Pass pass, bool *fifo_progress) if (!action_taken) { // Registers not read this pass (gated on num_samples/shake state) log as 0 PBL_LOG_WRN("INT1 triggered but no action taken (FIFO_STATUS2 0x%02" PRIx8 - " ALL_INT_SRC 0x%02" PRIx8 " num_samples %" PRIu16 " shake_en %d pass %u" + " ALL_INT_SRC 0x%02" PRIx8 " num_samples %" PRIu16 + " shake_en %d pass %u" " last_read %" PRIu32 "ms ago)", fifo_status[1], all_int_src, LSM6DSO->state->num_samples, LSM6DSO->state->shake_detection_enabled, (unsigned int)pass, @@ -544,9 +548,8 @@ static bool prv_configure_odr(uint32_t sampling_interval_us, bool shake_detectio val |= prv_fs_bits(); - PBL_LOG_DBG("Configuring ODR to %" PRIu32 " ms (%" PRIu32 " mHz)", - sampling_interval_us / 1000UL, - sampling_interval_us > 0UL ? 1000000000UL / sampling_interval_us : 0UL); + PBL_LOG_DBG("Configuring ODR to %" PRIu32 " ms (%" PRIu32 " mHz)", sampling_interval_us / 1000UL, + sampling_interval_us > 0UL ? 1000000000UL / sampling_interval_us : 0UL); ret = prv_lsm6dso_write(LSM6DSO_CTRL1_XL, &val, 1); if (!ret) { @@ -614,8 +617,7 @@ static void prv_lsm6dso_recover(void) { LSM6DSO->state->num_recoveries++; PBL_ANALYTICS_ADD(accel_stream_recovery_count, 1); - PBL_LOG_WRN("Recovering accel stream (count %" PRIu32 ")", - LSM6DSO->state->num_recoveries); + PBL_LOG_WRN("Recovering accel stream (count %" PRIu32 ")", LSM6DSO->state->num_recoveries); if (!prv_configure_int1(false, false)) { return; @@ -663,8 +665,7 @@ static uint32_t prv_ms_since_last_fifo_read(void) { } static uint32_t prv_stall_threshold_ms(void) { - return MAX(LSM6DSO_STALL_MARGIN * LSM6DSO->state->int1_period_ms, - LSM6DSO_STALL_MIN_MS); + return MAX(LSM6DSO_STALL_MARGIN * LSM6DSO->state->int1_period_ms, LSM6DSO_STALL_MIN_MS); } //! Arm/disarm the INT1 stall watchdog to match the active INT1 sources. @@ -698,8 +699,7 @@ static void prv_stall_check_work_cb(void) { // Shake-only mode: re-run the servicing pass if the pad is stuck high // (reading the INT source clears the latch); escalate to a full recovery // after consecutive passes that never release it. - if (LSM6DSO->state->shake_detection_enabled && - gpio_input_read(&LSM6DSO->int1_in)) { + if (LSM6DSO->state->shake_detection_enabled && gpio_input_read(&LSM6DSO->int1_in)) { prv_lsm6dso_int1_work_handler(); // A pad released by the pass is healthy; count only a still-high pad if (!gpio_input_read(&LSM6DSO->int1_in)) { @@ -853,8 +853,7 @@ uint32_t accel_set_sampling_interval(uint32_t interval_us) { } } - PBL_LOG_DBG("Set sampling interval to %" PRIu32 " us", - LSM6DSO->state->sampling_interval_us); + PBL_LOG_DBG("Set sampling interval to %" PRIu32 " us", LSM6DSO->state->sampling_interval_us); return LSM6DSO->state->sampling_interval_us; } @@ -1068,8 +1067,7 @@ void accel_set_shake_sensitivity_high(bool sensitivity_high) { return; } - PBL_LOG_DBG("Configured shake sensitivity to %s", - sensitivity_high ? "high" : "normal"); + PBL_LOG_DBG("Configured shake sensitivity to %s", sensitivity_high ? "high" : "normal"); } void accel_set_shake_sensitivity_percent(uint8_t percent) { diff --git a/src/fw/drivers/mic/nrf5/pdm.c b/src/fw/drivers/mic/nrf5/pdm.c index 351b5b4db7..35ae47d15e 100644 --- a/src/fw/drivers/mic/nrf5/pdm.c +++ b/src/fw/drivers/mic/nrf5/pdm.c @@ -82,10 +82,10 @@ static bool prv_allocate_buffers(MicDeviceState *state) { // Clear the buffer memset(state->pdm_buffers[i], 0, buffer_size); } - + // Initialize circular buffer with allocated storage circular_buffer_init(&state->circ_buffer, state->circ_buffer_storage, try_size); - + return true; } @@ -96,7 +96,7 @@ static void prv_free_buffers(MicDeviceState *state) { state->circ_buffer_storage = NULL; } state->circ_buffer_size = 0; - + // Free PDM buffers for (int i = 0; i < PDM_BUFFER_COUNT; i++) { if (state->pdm_buffers[i]) { @@ -112,25 +112,24 @@ static void prv_process_pdm_buffer(MicDeviceState *state, int16_t *pdm_data) { PBL_LOG_DBG("prv_process_pdm_buffer: Not running, ignoring data"); return; } - + // Ensure circular buffer storage is allocated if (!state->circ_buffer_storage) { PBL_LOG_DBG("prv_process_pdm_buffer: No circular buffer storage, ignoring data"); return; } - + // Ensure we have valid audio buffer info if (!state->audio_buffer || state->audio_buffer_len == 0) { PBL_LOG_DBG("prv_process_pdm_buffer: No audio buffer configured, ignoring data"); return; } - + // Write samples to circular buffer uint32_t samples_written = 0; for (int i = 0; i < PDM_BUFFER_SIZE_SAMPLES; i++) { - if (!circular_buffer_write(&state->circ_buffer, - (const uint8_t *)&pdm_data[i], - sizeof(int16_t))) { + if (!circular_buffer_write(&state->circ_buffer, (const uint8_t *)&pdm_data[i], + sizeof(int16_t))) { break; // Buffer is full, drop remaining samples } samples_written++; @@ -149,24 +148,26 @@ static void prv_process_pdm_buffer(MicDeviceState *state, int16_t *pdm_data) { // Log dropout statistics periodically static uint32_t log_counter = 0; - if (++log_counter >= 100) { // Every 100 buffers (~2 seconds) + if (++log_counter >= 100) { // Every 100 buffers (~2 seconds) if (dropped_samples > 0) { // Calculate percentage using integer arithmetic (x10 for one decimal place) uint32_t percent_x10 = (dropped_samples * 1000) / total_samples; - PBL_LOG_DBG("Audio dropouts: %"PRIu32"/%"PRIu32" samples dropped (%"PRIu32".%"PRIu32" percent), buffer util: %"PRIu16, - dropped_samples, total_samples, percent_x10 / 10, percent_x10 % 10, buffer_utilization); + PBL_LOG_DBG("Audio dropouts: %" PRIu32 "/%" PRIu32 " samples dropped (%" PRIu32 ".%" PRIu32 + " percent), buffer util: %" PRIu16, + dropped_samples, total_samples, percent_x10 / 10, percent_x10 % 10, + buffer_utilization); } else { - PBL_LOG_DBG("Audio buffer utilization: %"PRIu16" (%"PRIu16"/%"PRIu16" bytes)", - buffer_utilization, buffer_used, buffer_total); + PBL_LOG_DBG("Audio buffer utilization: %" PRIu16 " (%" PRIu16 "/%" PRIu16 " bytes)", + buffer_utilization, buffer_used, buffer_total); } log_counter = 0; - total_samples = dropped_samples = 0; // Reset counters + total_samples = dropped_samples = 0; // Reset counters } - + // Check if we have enough data for a complete frame size_t frame_size_bytes = state->audio_buffer_len * sizeof(int16_t); uint16_t available_data = circular_buffer_get_read_space_remaining(&state->circ_buffer); - + if (available_data >= frame_size_bytes && !state->main_pending) { state->main_pending = true; @@ -183,30 +184,29 @@ static void prv_process_pdm_buffer(MicDeviceState *state, int16_t *pdm_data) { static void prv_pdm_event_handler(nrfx_pdm_evt_t const *p_evt) { MicDeviceState *state = MIC->state; - + PBL_ASSERTN(state->is_initialized); - + // Don't assert on is_running during shutdown - the PDM might send final events if (!state->is_running) { PBL_LOG_DBG("prv_pdm_event_handler: Microphone stopped, ignoring event"); return; } - + PBL_ASSERTN(p_evt->error == NRFX_PDM_NO_ERROR); - + if (p_evt->buffer_requested) { uint8_t next_buffer_idx = (state->current_buffer_idx + 1) % PDM_BUFFER_COUNT; - nrfx_err_t err = nrfx_pdm_buffer_set(&MIC->pdm_instance, - state->pdm_buffers[next_buffer_idx], - PDM_BUFFER_SIZE_SAMPLES); + nrfx_err_t err = nrfx_pdm_buffer_set(&MIC->pdm_instance, state->pdm_buffers[next_buffer_idx], + PDM_BUFFER_SIZE_SAMPLES); if (err == NRFX_SUCCESS) { state->current_buffer_idx = next_buffer_idx; } } - + if (p_evt->buffer_released) { int16_t *pdm_data = (int16_t *)p_evt->buffer_released; - + if (pdm_data && prv_is_valid_buffer(state, pdm_data)) { prv_process_pdm_buffer(state, pdm_data); } @@ -215,31 +215,31 @@ static void prv_pdm_event_handler(nrfx_pdm_evt_t const *p_evt) { void mic_init(const MicDevice *this) { PBL_ASSERTN(this); - + MicDeviceState *state = this->state; - + if (state && state->is_initialized) { return; } memset(state, 0, sizeof(MicDeviceState)); - + // Initialize PDM configuration state->pdm_config = (nrfx_pdm_config_t)NRFX_PDM_DEFAULT_CONFIG(this->clk_pin, this->data_pin); state->pdm_config.clock_freq = NRF_PDM_FREQ_1280K; state->pdm_config.ratio = NRF_PDM_RATIO_80X; state->pdm_config.gain_l = BOARD_CONFIG.mic_config.gain; state->pdm_config.gain_r = BOARD_CONFIG.mic_config.gain; - + pbl_mutex_init(&state->mutex); - + // Initialize PDM driver once during init nrfx_err_t err = nrfx_pdm_init(&this->pdm_instance, &state->pdm_config, prv_pdm_event_handler); if (err != NRFX_SUCCESS) { PBL_LOG_ERR("Failed to initialize PDM: %d", err); return; } - + state->is_initialized = true; } @@ -261,12 +261,13 @@ static void prv_dispatch_samples_system_task(void *data) { // Process a limited number of frames to provide backpressure // This prevents overwhelming the Bluetooth send buffer - if (state->is_running && state->data_handler && state->audio_buffer && state->circ_buffer_storage) { - + if (state->is_running && state->data_handler && state->audio_buffer && + state->circ_buffer_storage) { size_t frame_size_bytes = state->audio_buffer_len * sizeof(int16_t); int frames_processed = 0; - while (state->is_running && state->data_handler && frames_processed < MAX_FRAMES_PER_SYSTEM_TASK_CALLBACK) { + while (state->is_running && state->data_handler && + frames_processed < MAX_FRAMES_PER_SYSTEM_TASK_CALLBACK) { // Check if we have enough data for a complete frame uint16_t available_data = circular_buffer_get_read_space_remaining(&state->circ_buffer); @@ -275,9 +276,8 @@ static void prv_dispatch_samples_system_task(void *data) { } // Copy one frame - uint16_t bytes_copied = circular_buffer_copy(&state->circ_buffer, - (uint8_t *)state->audio_buffer, - frame_size_bytes); + uint16_t bytes_copied = circular_buffer_copy( + &state->circ_buffer, (uint8_t *)state->audio_buffer, frame_size_bytes); if (bytes_copied == frame_size_bytes) { // Call callback with the frame @@ -318,14 +318,14 @@ static void prv_dispatch_samples_system_task(void *data) { void mic_set_volume(const MicDevice *this, uint16_t volume) { PBL_ASSERTN(this); PBL_ASSERTN(this->state); - + MicDeviceState *state = this->state; - + if (state->is_running) { PBL_LOG_WRN("Cannot set volume while microphone is running"); return; } - + // Scale volume from 0-1024 range to nRF PDM gain range (0-80) // Volume 0 = minimum gain, 1024 = maximum gain uint16_t nrf_gain; @@ -335,16 +335,17 @@ void mic_set_volume(const MicDevice *this, uint16_t volume) { nrf_gain = NRF_PDM_GAIN_MAXIMUM; } else { // Linear scaling: volume * (max - min) / 1024 + min - nrf_gain = (volume * (NRF_PDM_GAIN_MAXIMUM - NRF_PDM_GAIN_MINIMUM)) / 1024 + NRF_PDM_GAIN_MINIMUM; + nrf_gain = + (volume * (NRF_PDM_GAIN_MAXIMUM - NRF_PDM_GAIN_MINIMUM)) / 1024 + NRF_PDM_GAIN_MINIMUM; } - + state->pdm_config.gain_l = nrf_gain; state->pdm_config.gain_r = nrf_gain; } static bool prv_start_pdm_capture(const MicDevice *this) { MicDeviceState *state = this->state; - + // Clear buffers and set initial buffer for (int i = 0; i < PDM_BUFFER_COUNT; i++) { if (state->pdm_buffers[i]) { @@ -352,21 +353,20 @@ static bool prv_start_pdm_capture(const MicDevice *this) { } } state->current_buffer_idx = 0; - + // Check if buffers are valid if (!state->pdm_buffers[0] || !state->pdm_buffers[1]) { - PBL_LOG_ERR("Invalid PDM buffers: [0]=%p [1]=%p", - state->pdm_buffers[0], state->pdm_buffers[1]); + PBL_LOG_ERR("Invalid PDM buffers: [0]=%p [1]=%p", state->pdm_buffers[0], state->pdm_buffers[1]); return false; } - + // Try starting PDM first, then set buffer in event handler nrfx_err_t err = nrfx_pdm_start(&this->pdm_instance); if (err != NRFX_SUCCESS) { PBL_LOG_ERR("Failed to start PDM: %d", err); return false; } - + return true; } @@ -377,23 +377,23 @@ bool mic_start(const MicDevice *this, MicDataHandlerCB data_handler, void *conte PBL_ASSERTN(data_handler); PBL_ASSERTN(audio_buffer); PBL_ASSERTN(audio_buffer_len > 0); - + MicDeviceState *state = this->state; - + pbl_mutex_lock(&state->mutex, PBL_FOREVER); - + if (state->is_running) { PBL_LOG_WRN("Microphone is already running"); pbl_mutex_unlock(&state->mutex); return false; } - + if (!state->is_initialized) { PBL_LOG_ERR("Microphone not initialized"); pbl_mutex_unlock(&state->mutex); return false; } - + // Allocate buffers dynamically. prv_allocate_buffers also initializes the // circular buffer with the actual (possibly shrunk) size. if (!prv_allocate_buffers(state)) { @@ -401,22 +401,22 @@ bool mic_start(const MicDevice *this, MicDataHandlerCB data_handler, void *conte pbl_mutex_unlock(&state->mutex); return false; } - + state->data_handler = data_handler; state->handler_context = context; state->audio_buffer = audio_buffer; state->audio_buffer_len = audio_buffer_len; state->main_pending = false; - + // Request high frequency crystal oscillator clocksource_hfxo_request(); - + // Set is_running to true BEFORE starting PDM, since the event handler will be called immediately state->is_running = true; - + // Start PDM capture if (!prv_start_pdm_capture(this)) { - state->is_running = false; // Reset on failure + state->is_running = false; // Reset on failure clocksource_hfxo_release(); prv_free_buffers(state); pbl_mutex_unlock(&state->mutex); @@ -430,32 +430,32 @@ bool mic_start(const MicDevice *this, MicDataHandlerCB data_handler, void *conte void mic_stop(const MicDevice *this) { PBL_ASSERTN(this); PBL_ASSERTN(this->state); - + MicDeviceState *state = this->state; - + pbl_mutex_lock(&state->mutex, PBL_FOREVER); - + if (!state->is_running) { pbl_mutex_unlock(&state->mutex); return; } - + // Mark as stopped first to prevent new buffer requests state->is_running = false; - + // Stop PDM capture nrfx_pdm_stop(&this->pdm_instance); - + // Give the PDM hardware a moment to finish any pending operations // This helps ensure no DMA operations are still accessing our buffers - psleep(1); // 1ms delay to let hardware settle - + psleep(1); // 1ms delay to let hardware settle + // Release high frequency oscillator clocksource_hfxo_release(); - + // Free dynamically allocated buffers prv_free_buffers(state); - + // Clear state state->data_handler = NULL; state->handler_context = NULL; @@ -472,7 +472,8 @@ void mic_stop(const MicDevice *this) { // These commands are defined in the console command table but Asterix doesn't need // the full accessory-based microphone streaming functionality -void command_mic_start(char *timeout_str, char *sample_size_str, char *sample_rate_str, char *format_str) { +void command_mic_start(char *timeout_str, char *sample_size_str, char *sample_rate_str, + char *format_str) { prompt_send_response("Microphone console commands not supported on Asterix"); prompt_send_response("Use the standard microphone API instead"); } @@ -485,7 +486,7 @@ void command_mic_read(void) { bool mic_is_running(const MicDevice *this) { PBL_ASSERTN(this); PBL_ASSERTN(this->state); - + return this->state->is_running; } diff --git a/src/fw/drivers/mic/qemu/mic.c b/src/fw/drivers/mic/qemu/mic.c index 566142efb3..5784e83865 100644 --- a/src/fw/drivers/mic/qemu/mic.c +++ b/src/fw/drivers/mic/qemu/mic.c @@ -46,8 +46,8 @@ void mic_set_volume(MicDevice *this, uint16_t volume) { // No gain stage to tweak on the QEMU stub. } -bool mic_start(MicDevice *this, MicDataHandlerCB data_handler, void *context, - int16_t *audio_buffer, size_t audio_buffer_len) { +bool mic_start(MicDevice *this, MicDataHandlerCB data_handler, void *context, int16_t *audio_buffer, + size_t audio_buffer_len) { PBL_ASSERTN(this); PBL_ASSERTN(this->state); PBL_ASSERTN(data_handler); @@ -113,7 +113,7 @@ uint32_t mic_get_channels(MicDevice *this) { } void command_mic_start(char *timeout_str, char *sample_size_str, char *sample_rate_str, - char *format_str) { + char *format_str) { prompt_send_response("Microphone console commands not supported on QEMU"); } diff --git a/src/fw/drivers/mic/sf32lb52/pdm.c b/src/fw/drivers/mic/sf32lb52/pdm.c index 59448397c6..574ae9a821 100644 --- a/src/fw/drivers/mic/sf32lb52/pdm.c +++ b/src/fw/drivers/mic/sf32lb52/pdm.c @@ -23,35 +23,34 @@ PBL_LOG_MODULE_DEFINE(driver_mic_sf32lb, CONFIG_DRIVER_MIC_LOG_LEVEL); #define PDM_POWER_NPM1300_LDO2 1 #endif -#define PDM_AUDIO_RECORD_PIPE_SIZE (288) -#define PDM_AUDIO_RECORD_GAIN_DEFAULT (90) -#define PDM_AUDIO_RECORD_GAIN_MAX (120) +#define PDM_AUDIO_RECORD_PIPE_SIZE (288) +#define PDM_AUDIO_RECORD_GAIN_DEFAULT (90) +#define PDM_AUDIO_RECORD_GAIN_MAX (120) // PDM Configuration -#define PDM_BUFFER_SIZE_SAMPLES (320) +#define PDM_BUFFER_SIZE_SAMPLES (320) // Circular buffer configuration -#define PDM_CIRCULAR_BUF_SIZE_MS (320) -#define PDM_CIRCULAR_BUF_SIZE_SAMPLES ((MIC_SAMPLE_RATE * PDM_CIRCULAR_BUF_SIZE_MS) / 1000) +#define PDM_CIRCULAR_BUF_SIZE_MS (320) +#define PDM_CIRCULAR_BUF_SIZE_SAMPLES ((MIC_SAMPLE_RATE * PDM_CIRCULAR_BUF_SIZE_MS) / 1000) // Minimum fallback size // If it is any smaller than this, the transcription wont work well -#define PDM_CIRCULAR_BUF_MIN_SIZE_MS (128) -#define PDM_CIRCULAR_BUF_MIN_SIZE_SAMPLES ((MIC_SAMPLE_RATE * PDM_CIRCULAR_BUF_MIN_SIZE_MS) / 1000) +#define PDM_CIRCULAR_BUF_MIN_SIZE_MS (128) +#define PDM_CIRCULAR_BUF_MIN_SIZE_SAMPLES ((MIC_SAMPLE_RATE * PDM_CIRCULAR_BUF_MIN_SIZE_MS) / 1000) // Fallback step. 32 ms shrink per retry gives us ~7 attempts between 320 ms and 128 ms -#define PDM_CIRCULAR_BUF_STEP_MS (32) -#define PDM_CIRCULAR_BUF_STEP_SAMPLES ((MIC_SAMPLE_RATE * PDM_CIRCULAR_BUF_STEP_MS) / 1000) +#define PDM_CIRCULAR_BUF_STEP_MS (32) +#define PDM_CIRCULAR_BUF_STEP_SAMPLES ((MIC_SAMPLE_RATE * PDM_CIRCULAR_BUF_STEP_MS) / 1000) -#define PDM_CIRCULAR_BUF_BYTES(samples, channels) \ - ((size_t)(samples) * sizeof(int16_t) * (channels)) +#define PDM_CIRCULAR_BUF_BYTES(samples, channels) ((size_t)(samples) * sizeof(int16_t) * (channels)) static PDM_HandleTypeDef s_hpdm; -static MicDeviceState* s_state; +static MicDeviceState *s_state; void mic_init(const MicDevice *this) { PBL_ASSERTN(this); - + MicDeviceState *state = this->state; s_state = this->state; if (state && state->is_initialized) { @@ -64,14 +63,14 @@ void mic_init(const MicDevice *this) { pbl_mutex_init(&state->mutex); state->volume = PDM_AUDIO_RECORD_GAIN_DEFAULT; - - //Pinmux configuration + + // Pinmux configuration HAL_PIN_Set(this->clk_gpio.pad, this->clk_gpio.func, this->clk_gpio.flags, 1); HAL_PIN_Set(this->data_gpio.pad, this->data_gpio.func, this->data_gpio.flags, 1); this->state->hpdm = &s_hpdm; - PDM_HandleTypeDef* hpdm = this->state->hpdm; - //HPDM configuration + PDM_HandleTypeDef *hpdm = this->state->hpdm; + // HPDM configuration hpdm->Instance = this->pdm_instance; hpdm->hdmarx = &state->hdma; hpdm->Init.Mode = PDM_MODE_LOOP; @@ -84,19 +83,20 @@ void mic_init(const MicDevice *this) { state->is_initialized = true; } -//volume from 0~100 +// volume from 0~100 void mic_set_volume(const MicDevice *this, uint16_t volume) { PBL_ASSERTN(this); PBL_ASSERTN(this->state); - + MicDeviceState *state = this->state; if (state->is_running) { PBL_LOG_WRN("Cannot set volume while microphone is running"); return; } - volume = volume * PDM_AUDIO_RECORD_GAIN_MAX/100; + volume = volume * PDM_AUDIO_RECORD_GAIN_MAX / 100; // volume form 0~120 on HAL - if(volume > PDM_AUDIO_RECORD_GAIN_MAX) volume = PDM_AUDIO_RECORD_GAIN_MAX; + if (volume > PDM_AUDIO_RECORD_GAIN_MAX) + volume = PDM_AUDIO_RECORD_GAIN_MAX; state->volume = volume; } @@ -121,8 +121,8 @@ static bool prv_allocate_buffers(const MicDevice *this) { if (!storage) { unsigned int used, free_bytes, max_free; heap_calc_totals(kernel_heap_get(), &used, &free_bytes, &max_free); - PBL_LOG_ERR("Failed to allocate PDM circular buffer (min %u B, max_free %u B)", - (unsigned)floor, max_free); + PBL_LOG_ERR("Failed to allocate PDM circular buffer (min %u B, max_free %u B)", (unsigned)floor, + max_free); return false; } @@ -150,49 +150,50 @@ static void prv_free_buffers(MicDeviceState *state) { // other tasks (especially Bluetooth) to run and prevent send buffer overflow #define MAX_FRAMES_PER_SYSTEM_TASK_CALLBACK 5 -static void prv_dispatch_samples_system_task(void *data) { +static void prv_dispatch_samples_system_task(void *data) { // Defensive check if (!s_state || !s_state->is_initialized) { return; } - + pbl_mutex_lock(&s_state->mutex, PBL_FOREVER); // Process a limited number of frames to provide backpressure - if (s_state->is_running && s_state->data_handler && s_state->audio_buffer && s_state->circ_buffer_storage) { - + if (s_state->is_running && s_state->data_handler && s_state->audio_buffer && + s_state->circ_buffer_storage) { size_t frame_size_bytes = s_state->audio_buffer_len * sizeof(int16_t); int frames_processed = 0; - - while (s_state->is_running && s_state->data_handler && frames_processed < MAX_FRAMES_PER_SYSTEM_TASK_CALLBACK) { + + while (s_state->is_running && s_state->data_handler && + frames_processed < MAX_FRAMES_PER_SYSTEM_TASK_CALLBACK) { // Check if we have enough data for a complete frame uint16_t available_data = circular_buffer_get_read_space_remaining(&s_state->circ_buffer); - + if (available_data < frame_size_bytes) { break; // Not enough data for another frame } // Copy one frame - uint16_t bytes_copied = circular_buffer_copy(&s_state->circ_buffer, - (uint8_t *)s_state->audio_buffer, - frame_size_bytes); + uint16_t bytes_copied = circular_buffer_copy( + &s_state->circ_buffer, (uint8_t *)s_state->audio_buffer, frame_size_bytes); if (bytes_copied == frame_size_bytes) { // Call callback with the frame - s_state->data_handler(s_state->audio_buffer, s_state->audio_buffer_len, s_state->handler_context); - + s_state->data_handler(s_state->audio_buffer, s_state->audio_buffer_len, + s_state->handler_context); + // Consume the frame we processed circular_buffer_consume(&s_state->circ_buffer, bytes_copied); - + frames_processed++; - + // Feed the system task watchdog periodically during long processing system_task_watchdog_feed(); } else { break; // Failed to copy, stop processing } } - + // If we still have data available after processing, reschedule immediately uint16_t remaining_data = circular_buffer_get_read_space_remaining(&s_state->circ_buffer); if (remaining_data >= frame_size_bytes && s_state->is_running && !s_state->main_pending) { @@ -208,20 +209,19 @@ static void prv_dispatch_samples_system_task(void *data) { // Clear pending flag if we can't process s_state->main_pending = false; } - + pbl_mutex_unlock(&s_state->mutex); } -static void prv_dma_data_processing(uint8_t* data, uint16_t size) -{ +static void prv_dma_data_processing(uint8_t *data, uint16_t size) { // Don't assert on is_running during shutdown - the PDM might send final events if (!s_state->is_running) { PBL_LOG_ERR("Microphone stopped, ignoring event"); return; } - // Ensure circular buffer storage is allocated - if (!s_state->circ_buffer_storage) { + // Ensure circular buffer storage is allocated + if (!s_state->circ_buffer_storage) { PBL_LOG_ERR("No circular buffer storage, ignoring data"); return; } @@ -252,9 +252,9 @@ static void prv_dma_data_processing(uint8_t* data, uint16_t size) // Check if we have enough data for a complete frame size_t frame_size_bytes = s_state->audio_buffer_len * sizeof(int16_t); uint16_t available_data = circular_buffer_get_read_space_remaining(&s_state->circ_buffer); - if (available_data >= frame_size_bytes && !s_state->main_pending) { + if (available_data >= frame_size_bytes && !s_state->main_pending) { s_state->main_pending = true; - + // Dispatch to system task instead of kernel event queue (matches asterix behavior). // A drop is retried on the next PDM buffer event; losing samples beats // resetting the system over a full queue. @@ -266,46 +266,40 @@ static void prv_dma_data_processing(uint8_t* data, uint16_t size) } } -void HAL_PDM_RxCpltCallback(PDM_HandleTypeDef *hpdm) -{ +void HAL_PDM_RxCpltCallback(PDM_HandleTypeDef *hpdm) { prv_dma_data_processing(hpdm->pRxBuffPtr + (hpdm->RxXferSize / 2), hpdm->RxXferSize / 2); } -void HAL_PDM_RxHalfCpltCallback(PDM_HandleTypeDef *hpdm) -{ +void HAL_PDM_RxHalfCpltCallback(PDM_HandleTypeDef *hpdm) { prv_dma_data_processing(hpdm->pRxBuffPtr, hpdm->RxXferSize / 2); } -void pdm1_data_handler(MicDevice *this) -{ +void pdm1_data_handler(MicDevice *this) { HAL_PDM_IRQHandler(this->state->hpdm); } -void pdm1_l_dma_handler(MicDevice *this) -{ +void pdm1_l_dma_handler(MicDevice *this) { HAL_DMA_IRQHandler(this->state->hpdm->hdmarx); } -static bool prv_start_pdm_capture(const MicDevice *this) -{ - PDM_HandleTypeDef* hpdm = this->state->hpdm; +static bool prv_start_pdm_capture(const MicDevice *this) { + PDM_HandleTypeDef *hpdm = this->state->hpdm; HAL_StatusTypeDef res; HAL_RCC_EnableModule(RCC_MOD_PDM1); res = HAL_PDM_Init(hpdm); - if (this->channels ==1) { + if (this->channels == 1) { hpdm->Init.Channels = PDM_CHANNEL_LEFT_ONLY; } else { hpdm->Init.Channels = PDM_CHANNEL_STEREO; } hpdm->Init.SampleRate = this->sample_rate; - hpdm->Init.ChannelDepth = (uint32_t) this->channel_depth; + hpdm->Init.ChannelDepth = (uint32_t)this->channel_depth; HAL_PDM_Config(hpdm, PDM_CFG_CHANNEL | PDM_CFG_SAMPLERATE | PDM_CFG_DEPTH); HAL_PDM_Set_Gain(hpdm, PDM_CHANNEL_STEREO, this->state->volume); // 3.072M = 49.152M(audpll)/16, 96k sampling use 3.072M as clock. - if (hpdm->Init.clkSrc == 3072000 || hpdm->Init.SampleRate == PDM_SAMPLE_96KHZ) - { + if (hpdm->Init.clkSrc == 3072000 || hpdm->Init.SampleRate == PDM_SAMPLE_96KHZ) { bf0_enable_pll(hpdm->Init.SampleRate, 0); } HAL_NVIC_EnableIRQ(this->pdm_dma_irq); @@ -322,12 +316,12 @@ bool mic_start(const MicDevice *this, MicDataHandlerCB data_handler, void *conte PBL_ASSERTN(data_handler); PBL_ASSERTN(audio_buffer); PBL_ASSERTN(audio_buffer_len > 0); - + MicDeviceState *state = this->state; - PDM_HandleTypeDef* hpdm = this->state->hpdm; - + PDM_HandleTypeDef *hpdm = this->state->hpdm; + pbl_mutex_lock(&state->mutex, PBL_FOREVER); - + if (state->is_running) { pbl_mutex_unlock(&state->mutex); return false; @@ -358,7 +352,7 @@ bool mic_start(const MicDevice *this, MicDataHandlerCB data_handler, void *conte state->audio_buffer = audio_buffer; state->audio_buffer_len = audio_buffer_len; state->main_pending = false; - + #if PDM_POWER_NPM1300_LDO2 (void)NPM1300_OPS.ldo2_set_enabled(true); #endif @@ -383,7 +377,7 @@ bool mic_start(const MicDevice *this, MicDataHandlerCB data_handler, void *conte soc_sf32lb_sleep_release(SOC_SF32LB_DEEPWFI); state->is_running = false; // Reset on failure #if PDM_POWER_NPM1300_LDO2 - (void)NPM1300_OPS.ldo2_set_enabled(false); + (void)NPM1300_OPS.ldo2_set_enabled(false); #endif prv_free_buffers(state); pbl_mutex_unlock(&state->mutex); @@ -397,20 +391,20 @@ bool mic_start(const MicDevice *this, MicDataHandlerCB data_handler, void *conte void mic_stop(const MicDevice *this) { PBL_ASSERTN(this); PBL_ASSERTN(this->state); - + MicDeviceState *state = this->state; - PDM_HandleTypeDef* hpdm = this->state->hpdm; - + PDM_HandleTypeDef *hpdm = this->state->hpdm; + pbl_mutex_lock(&state->mutex, PBL_FOREVER); - + if (!state->is_running) { pbl_mutex_unlock(&state->mutex); return; } - + // Mark as stopped first to prevent new buffer requests state->is_running = false; - + HAL_NVIC_DisableIRQ(this->pdm_dma_irq); HAL_NVIC_DisableIRQ(this->pdm_irq); HAL_PDM_DMAStop(hpdm); @@ -441,7 +435,8 @@ void mic_stop(const MicDevice *this) { #include "console/prompt.h" -void command_mic_start(char *timeout_str, char *sample_size_str, char *sample_rate_str, char *format_str) { +void command_mic_start(char *timeout_str, char *sample_size_str, char *sample_rate_str, + char *format_str) { prompt_send_response("Microphone console commands not supported"); prompt_send_response("Use the standard microphone API instead"); } @@ -454,7 +449,7 @@ void command_mic_read(void) { bool mic_is_running(const MicDevice *this) { PBL_ASSERTN(this); PBL_ASSERTN(this->state); - + return this->state->is_running; } diff --git a/src/fw/drivers/mpu.c b/src/fw/drivers/mpu.c index 00c2e72bcd..ab9c1c0310 100644 --- a/src/fw/drivers/mpu.c +++ b/src/fw/drivers/mpu.c @@ -6,7 +6,6 @@ #include "pbl/mcu/cache.h" #include "system/passert.h" - #include extern const uint32_t __SRAM_size__[]; @@ -39,6 +38,5 @@ void mpu_init_region_from_region(MpuRegion *copy, const MpuRegion *from, bool al // Toggle user RW based on which task is about to run. PBL_ASSERTN(from->permissions == MpuPermissions_PrivRW); *copy = *from; - copy->permissions = allow_user_access ? MpuPermissions_PrivRW_UserRW - : MpuPermissions_PrivRW; + copy->permissions = allow_user_access ? MpuPermissions_PrivRW_UserRW : MpuPermissions_PrivRW; } diff --git a/src/fw/drivers/mpu/mpu_armv7m.c b/src/fw/drivers/mpu/mpu_armv7m.c index 4c786ea659..4fd36585b8 100644 --- a/src/fw/drivers/mpu/mpu_armv7m.c +++ b/src/fw/drivers/mpu/mpu_armv7m.c @@ -14,24 +14,20 @@ // unique encoding (0x4 is reserved; 0x6/0x7 both decode to "RO any priv", // the table picks 0x6 canonically and mpu_get_region() accepts either). static const uint8_t s_permission_to_ap[MpuPermissionsCount] = { - [MpuPermissions_NoAccess] = 0x0, - [MpuPermissions_PrivRW] = 0x1, - [MpuPermissions_PrivRW_UserRO] = 0x2, - [MpuPermissions_PrivRW_UserRW] = 0x3, - [MpuPermissions_PrivRO] = 0x5, - [MpuPermissions_PrivRO_UserRO] = 0x6, + [MpuPermissions_NoAccess] = 0x0, [MpuPermissions_PrivRW] = 0x1, + [MpuPermissions_PrivRW_UserRO] = 0x2, [MpuPermissions_PrivRW_UserRW] = 0x3, + [MpuPermissions_PrivRO] = 0x5, [MpuPermissions_PrivRO_UserRO] = 0x6, }; static const uint32_t s_cache_settings[] = { - [MpuCachePolicy_NotCacheable] = (0x1 << MPU_RASR_TEX_Pos) | (MPU_RASR_S_Msk), - [MpuCachePolicy_WriteThrough] = (MPU_RASR_S_Msk | MPU_RASR_C_Msk), - [MpuCachePolicy_WriteBackWriteAllocate] = - (0x1 << MPU_RASR_TEX_Pos) | (MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk), - [MpuCachePolicy_WriteBackNoWriteAllocate] = - (MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk), + [MpuCachePolicy_NotCacheable] = (0x1 << MPU_RASR_TEX_Pos) | (MPU_RASR_S_Msk), + [MpuCachePolicy_WriteThrough] = (MPU_RASR_S_Msk | MPU_RASR_C_Msk), + [MpuCachePolicy_WriteBackWriteAllocate] = + (0x1 << MPU_RASR_TEX_Pos) | (MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk), + [MpuCachePolicy_WriteBackNoWriteAllocate] = (MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk), }; -static uint8_t get_permission_value(const MpuRegion* region) { +static uint8_t get_permission_value(const MpuRegion *region) { PBL_ASSERTN(region->permissions < MpuPermissionsCount); return s_permission_to_ap[region->permissions]; } @@ -39,14 +35,21 @@ static uint8_t get_permission_value(const MpuRegion* region) { static MpuPermissions decode_permission_value(uint8_t ap) { // 0x4 is reserved; 0x7 aliases 0x6 (PrivRO_UserRO). switch (ap & 0x7) { - case 0x0: return MpuPermissions_NoAccess; - case 0x1: return MpuPermissions_PrivRW; - case 0x2: return MpuPermissions_PrivRW_UserRO; - case 0x3: return MpuPermissions_PrivRW_UserRW; - case 0x5: return MpuPermissions_PrivRO; + case 0x0: + return MpuPermissions_NoAccess; + case 0x1: + return MpuPermissions_PrivRW; + case 0x2: + return MpuPermissions_PrivRW_UserRO; + case 0x3: + return MpuPermissions_PrivRW_UserRW; + case 0x5: + return MpuPermissions_PrivRO; case 0x6: - case 0x7: return MpuPermissions_PrivRO_UserRO; - default: return MpuPermissions_NoAccess; + case 0x7: + return MpuPermissions_PrivRO_UserRO; + default: + return MpuPermissions_NoAccess; } } @@ -59,9 +62,9 @@ static MpuPermissions decode_permission_value(uint8_t ap) { // (subregion = block/8). // The 8-bit subregion-disable mask then masks off the parts of the block // that fall outside [base, base+size). -#define MPU_ARMV7M_MIN_REGION_SIZE 32u -#define MPU_ARMV7M_MAX_REGION_SIZE (4u * 1024u * 1024u) -#define MPU_ARMV7M_NUM_SUBREGIONS 8u +#define MPU_ARMV7M_MIN_REGION_SIZE 32u +#define MPU_ARMV7M_MAX_REGION_SIZE (4u * 1024u * 1024u) +#define MPU_ARMV7M_NUM_SUBREGIONS 8u typedef struct { uintptr_t block_base; @@ -70,7 +73,7 @@ typedef struct { } BlockLayout; static BlockLayout compute_block_layout(uintptr_t base, uint32_t size) { - PBL_ASSERT(size >= MPU_ARMV7M_MIN_REGION_SIZE, "MPU region too small: %"PRIu32, size); + PBL_ASSERT(size >= MPU_ARMV7M_MIN_REGION_SIZE, "MPU region too small: %" PRIu32, size); uint32_t block = MPU_ARMV7M_MIN_REGION_SIZE; while (block < size) { @@ -80,8 +83,7 @@ static BlockLayout compute_block_layout(uintptr_t base, uint32_t size) { const uint32_t subregion = block / MPU_ARMV7M_NUM_SUBREGIONS; const uintptr_t start_in_block = base & (block - 1); const uintptr_t end_in_block = start_in_block + size; - if ((start_in_block & (subregion - 1)) == 0 && - (end_in_block & (subregion - 1)) == 0 && + if ((start_in_block & (subregion - 1)) == 0 && (end_in_block & (subregion - 1)) == 0 && end_in_block <= block) { const unsigned start_sub = start_in_block / subregion; const unsigned end_sub = end_in_block / subregion; @@ -89,15 +91,15 @@ static BlockLayout compute_block_layout(uintptr_t base, uint32_t size) { for (unsigned i = start_sub; i < end_sub; i++) { mask &= (uint8_t)~(1u << i); } - return (BlockLayout) { - .block_base = base - start_in_block, - .block_size = block, - .disabled_subregions = mask, + return (BlockLayout){ + .block_base = base - start_in_block, + .block_size = block, + .disabled_subregions = mask, }; } block <<= 1; } - PBL_CROAK("MPU region cannot fit subregion alignment: base=0x%08"PRIxPTR" size=0x%"PRIx32, + PBL_CROAK("MPU region cannot fit subregion alignment: base=0x%08" PRIxPTR " size=0x%" PRIx32, base, size); } @@ -118,7 +120,7 @@ void mpu_enable(void) { // Get the required region base address and region attribute register settings for the given region. // These are the values which should written to the RBAR and RASR registers to configure that // region. -void mpu_get_register_settings(const MpuRegion* region, uint32_t *base_address_reg, +void mpu_get_register_settings(const MpuRegion *region, uint32_t *base_address_reg, uint32_t *attributes_reg) { PBL_ASSERTN(region); PBL_ASSERTN((region->base_address & 0x1f) == 0); @@ -131,9 +133,7 @@ void mpu_get_register_settings(const MpuRegion* region, uint32_t *base_address_r // | Addr (27 bits) | Region Valid Bit | Region Num (4 bits) | // The address is unshifted, we take the top bits of the address and assume everything below // is zero, since the address must be power of 2 size aligned. - *base_address_reg = layout.block_base | - 0x1 << 4 | - region->region_num; + *base_address_reg = layout.block_base | 0x1 << 4 | region->region_num; // MPU Region Attribute and Size Register // A lot of stuff here! Split into bytes... @@ -141,15 +141,12 @@ void mpu_get_register_settings(const MpuRegion* region, uint32_t *base_address_r // | Reserved (2 bits) | TEX (3 bits) | S | C | B | // | Subregion Disable Byte | // | Reserved (2 bits) | Size Field (5 bits) | Enable Bit | - *attributes_reg = ((region->executable ? 0u : 1u) << 28) | - (get_permission_value(region) << 24) | - s_cache_settings[region->cache_policy] | - layout.disabled_subregions << 8 | - (get_size_field(layout.block_size) << 1) | - region->enabled; + *attributes_reg = ((region->executable ? 0u : 1u) << 28) | (get_permission_value(region) << 24) | + s_cache_settings[region->cache_policy] | layout.disabled_subregions << 8 | + (get_size_field(layout.block_size) << 1) | region->enabled; } -void mpu_set_region(const MpuRegion* region) { +void mpu_set_region(const MpuRegion *region) { uint32_t base_reg, attr_reg; mpu_get_register_settings(region, &base_reg, &attr_reg); @@ -159,7 +156,7 @@ void mpu_set_region(const MpuRegion* region) { } MpuRegion mpu_get_region(int region_num) { - MpuRegion region = { .region_num = region_num }; + MpuRegion region = {.region_num = region_num}; MPU->RNR = region_num; diff --git a/src/fw/drivers/mpu/mpu_armv8m.c b/src/fw/drivers/mpu/mpu_armv8m.c index e8789b8169..57e12305c4 100644 --- a/src/fw/drivers/mpu/mpu_armv8m.c +++ b/src/fw/drivers/mpu/mpu_armv8m.c @@ -31,26 +31,23 @@ static inline uint8_t mair_index(uint32_t cache_policy) { // We pick AP=0b01 (R/W any privilege level), which gives the user // write access too. See the MpuPermissions doc in drivers/mpu.h. static const uint8_t s_permission_to_ap[MpuPermissionsCount] = { - [MpuPermissions_NoAccess] = 0x2, - [MpuPermissions_PrivRW] = 0x0, - [MpuPermissions_PrivRW_UserRO] = 0x1, - [MpuPermissions_PrivRW_UserRW] = 0x1, - [MpuPermissions_PrivRO] = 0x2, - [MpuPermissions_PrivRO_UserRO] = 0x3, + [MpuPermissions_NoAccess] = 0x2, [MpuPermissions_PrivRW] = 0x0, + [MpuPermissions_PrivRW_UserRO] = 0x1, [MpuPermissions_PrivRW_UserRW] = 0x1, + [MpuPermissions_PrivRO] = 0x2, [MpuPermissions_PrivRO_UserRO] = 0x3, }; static const uint32_t s_cache_settings[] = { - [MpuCachePolicy_NotCacheable] = ARM_MPU_ATTR(ARM_MPU_ATTR_NON_CACHEABLE, - ARM_MPU_ATTR_NON_CACHEABLE), - [MpuCachePolicy_WriteThrough] = ARM_MPU_ATTR(ARM_MPU_ATTR_MEMORY_(1, 0, 1, 0), - ARM_MPU_ATTR_MEMORY_(1, 0, 1, 0)), - [MpuCachePolicy_WriteBackWriteAllocate] = ARM_MPU_ATTR(ARM_MPU_ATTR_MEMORY_(1, 1, 1, 1), - ARM_MPU_ATTR_MEMORY_(1, 1, 1, 1)), - [MpuCachePolicy_WriteBackNoWriteAllocate] = ARM_MPU_ATTR(ARM_MPU_ATTR_MEMORY_(1, 1, 0, 1), - ARM_MPU_ATTR_MEMORY_(1, 1, 0, 1)), + [MpuCachePolicy_NotCacheable] = + ARM_MPU_ATTR(ARM_MPU_ATTR_NON_CACHEABLE, ARM_MPU_ATTR_NON_CACHEABLE), + [MpuCachePolicy_WriteThrough] = + ARM_MPU_ATTR(ARM_MPU_ATTR_MEMORY_(1, 0, 1, 0), ARM_MPU_ATTR_MEMORY_(1, 0, 1, 0)), + [MpuCachePolicy_WriteBackWriteAllocate] = + ARM_MPU_ATTR(ARM_MPU_ATTR_MEMORY_(1, 1, 1, 1), ARM_MPU_ATTR_MEMORY_(1, 1, 1, 1)), + [MpuCachePolicy_WriteBackNoWriteAllocate] = + ARM_MPU_ATTR(ARM_MPU_ATTR_MEMORY_(1, 1, 0, 1), ARM_MPU_ATTR_MEMORY_(1, 1, 0, 1)), }; -static uint8_t get_permission_value(const MpuRegion* region) { +static uint8_t get_permission_value(const MpuRegion *region) { PBL_ASSERTN(region->permissions < MpuPermissionsCount); return s_permission_to_ap[region->permissions]; } @@ -59,11 +56,16 @@ static MpuPermissions decode_permission_value(uint8_t ap) { // ARMv8-M's two-bit AP loses information: AP=0b10 could have been set // for either NoAccess or PrivRO. Decode to PrivRO canonically. switch (ap & 0x3) { - case 0x0: return MpuPermissions_PrivRW; - case 0x1: return MpuPermissions_PrivRW_UserRW; - case 0x2: return MpuPermissions_PrivRO; - case 0x3: return MpuPermissions_PrivRO_UserRO; - default: return MpuPermissions_NoAccess; + case 0x0: + return MpuPermissions_PrivRW; + case 0x1: + return MpuPermissions_PrivRW_UserRW; + case 0x2: + return MpuPermissions_PrivRO; + case 0x3: + return MpuPermissions_PrivRO_UserRO; + default: + return MpuPermissions_NoAccess; } } @@ -88,7 +90,7 @@ void mpu_enable(void) { } } -void mpu_get_register_settings(const MpuRegion* region, uint32_t *base_address_reg, +void mpu_get_register_settings(const MpuRegion *region, uint32_t *base_address_reg, uint32_t *attributes_reg) { PBL_ASSERTN(region); PBL_ASSERTN((region->base_address & 0x1f) == 0); @@ -100,13 +102,13 @@ void mpu_get_register_settings(const MpuRegion* region, uint32_t *base_address_r ((ARM_MPU_SH_INNER << MPU_RBAR_SH_Pos) & MPU_RBAR_SH_Msk) | ((get_permission_value(region) << MPU_RBAR_AP_Pos) & MPU_RBAR_AP_Msk) | ((region->executable ? 0u : 1u) << MPU_RBAR_XN_Pos)); - *attributes_reg = (((region->base_address + region->size - 1U) & MPU_RLAR_LIMIT_Msk) | - ((mair_index(region->cache_policy) << MPU_RLAR_AttrIndx_Pos) & - MPU_RLAR_AttrIndx_Msk) | - ((region->enabled << MPU_RLAR_EN_Pos) & MPU_RLAR_EN_Msk)); + *attributes_reg = + (((region->base_address + region->size - 1U) & MPU_RLAR_LIMIT_Msk) | + ((mair_index(region->cache_policy) << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | + ((region->enabled << MPU_RLAR_EN_Pos) & MPU_RLAR_EN_Msk)); } -void mpu_set_region(const MpuRegion* region) { +void mpu_set_region(const MpuRegion *region) { uint32_t base_reg, attr_reg; mpu_get_register_settings(region, &base_reg, &attr_reg); diff --git a/src/fw/drivers/nrf5/button.c b/src/fw/drivers/nrf5/button.c index 976aa5a941..0304d18064 100644 --- a/src/fw/drivers/nrf5/button.c +++ b/src/fw/drivers/nrf5/button.c @@ -20,7 +20,7 @@ bool button_is_pressed(ButtonId id) { } const ButtonConfig *button_config = &BOARD_CONFIG_BUTTON.buttons[id]; - + uint32_t bit = nrf_gpio_pin_read(button_config->gpiote.gpio_pin); return (BOARD_CONFIG_BUTTON.active_high) ? bit : !bit; } @@ -35,14 +35,15 @@ uint8_t button_get_state_bits(void) { void button_init(void) { if (BOARD_CONFIG_BUTTON.button_com.gpio_pin) - WTF; // NYI + WTF; // NYI for (int i = 0; i < NUM_BUTTONS; ++i) { - nrf_gpio_cfg_input(BOARD_CONFIG_BUTTON.buttons[i].gpiote.gpio_pin, BOARD_CONFIG_BUTTON.buttons[i].pull); + nrf_gpio_cfg_input(BOARD_CONFIG_BUTTON.buttons[i].gpiote.gpio_pin, + BOARD_CONFIG_BUTTON.buttons[i].pull); } } -void command_button_read(const char* button_id_str) { +void command_button_read(const char *button_id_str) { int button = atoi(button_id_str); if (button < 0 || button >= NUM_BUTTONS) { diff --git a/src/fw/drivers/nrf5/debounced_button.c b/src/fw/drivers/nrf5/debounced_button.c index 8e6c198f81..df37749ecb 100644 --- a/src/fw/drivers/nrf5/debounced_button.c +++ b/src/fw/drivers/nrf5/debounced_button.c @@ -34,13 +34,14 @@ static void prv_timer_handler(nrf_timer_event_t evt, void *ctx); static void initialize_button_timer(void) { nrfx_timer_config_t config = { - .frequency = TIMER_FREQUENCY_HZ, - .mode = NRF_TIMER_MODE_TIMER, - .bit_width = NRF_TIMER_BIT_WIDTH_32, - .interrupt_priority = NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY, + .frequency = TIMER_FREQUENCY_HZ, + .mode = NRF_TIMER_MODE_TIMER, + .bit_width = NRF_TIMER_BIT_WIDTH_32, + .interrupt_priority = NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY, }; nrfx_timer_init(&BOARD_CONFIG_BUTTON.timer, &config, prv_timer_handler); - nrfx_timer_extended_compare(&BOARD_CONFIG_BUTTON.timer, NRF_TIMER_CC_CHANNEL0, TIMER_PERIOD_TICKS, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true /* enable interrupt */); + nrfx_timer_extended_compare(&BOARD_CONFIG_BUTTON.timer, NRF_TIMER_CC_CHANNEL0, TIMER_PERIOD_TICKS, + NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true /* enable interrupt */); } static bool prv_check_timer_enabled(void) { @@ -96,7 +97,7 @@ void debounced_button_init(void) { // If someone is holding down a button, we need to start up the timer immediately ourselves as // we won't get a button down interrupt to start it. if (button_get_state_bits() != 0) { - prv_enable_button_timer(); + prv_enable_button_timer(); } } @@ -143,16 +144,16 @@ static void prv_timer_handler(nrf_timer_event_t evt, void *ctx) { } PebbleEvent e = { - .type = (is_pressed) ? PEBBLE_BUTTON_DOWN_EVENT : PEBBLE_BUTTON_UP_EVENT, - .button.button_id = i + .type = (is_pressed) ? PEBBLE_BUTTON_DOWN_EVENT : PEBBLE_BUTTON_UP_EVENT, + .button.button_id = i }; event_put_isr(&e); } } #if !defined(CONFIG_MFG) - // Now that s_debounced_button_state is updated, check to see if the user is holding down the reset - // combination. + // Now that s_debounced_button_state is updated, check to see if the user is holding down the + // reset combination. static uint32_t s_hard_reset_timer = 0; if ((s_debounced_button_state & RESET_BUTTONS) == RESET_BUTTONS) { s_hard_reset_timer += 1; @@ -168,8 +169,8 @@ static void prv_timer_handler(nrf_timer_event_t evt, void *ctx) { } RebootReason reason = { - .code = force_prf ? RebootReasonCode_PrfResetButtonsHeld : - RebootReasonCode_ResetButtonsHeld + .code = + force_prf ? RebootReasonCode_PrfResetButtonsHeld : RebootReasonCode_ResetButtonsHeld }; reboot_reason_set(&reason); @@ -186,12 +187,11 @@ static void prv_timer_handler(nrf_timer_event_t evt, void *ctx) { disable_button_timer(); __enable_irq(); } - } // Serial commands /////////////////////////////////////////////////////////// -void command_put_raw_button_event(const char* button_index, const char* is_button_down_event) { +void command_put_raw_button_event(const char *button_index, const char *is_button_down_event) { PebbleEvent e; int is_down = atoi(is_button_down_event); int button = atoi(button_index); diff --git a/src/fw/drivers/otp/otp_flash.c b/src/fw/drivers/otp/otp_flash.c index 27e37c227b..6911fb246b 100644 --- a/src/fw/drivers/otp/otp_flash.c +++ b/src/fw/drivers/otp/otp_flash.c @@ -16,7 +16,7 @@ status_t cd_flash_security_register_is_locked(uint32_t addr, bool *locked); static char s_slot[NUM_OTP_SLOTS][OTP_SLOT_SIZE]; -char * otp_get_slot(const uint8_t index) { +char *otp_get_slot(const uint8_t index) { const FlashSecurityRegisters *info; status_t ret; @@ -45,7 +45,7 @@ char * otp_get_slot(const uint8_t index) { return s_slot[index]; } -uint8_t * otp_get_lock(const uint8_t index) { +uint8_t *otp_get_lock(const uint8_t index) { return NULL; } diff --git a/src/fw/drivers/pmic/npm1300.c b/src/fw/drivers/pmic/npm1300.c index b5c2a257d7..43d5e721ed 100644 --- a/src/fw/drivers/pmic/npm1300.c +++ b/src/fw/drivers/pmic/npm1300.c @@ -23,8 +23,8 @@ PBL_LOG_MODULE_DEFINE(driver_pmic_npm1300, CONFIG_DRIVER_PMIC_LOG_LEVEL); #define CHARGER_DEBOUNCE_MS 400 -#define ADC_POLL_DELAY_MS 5 // Delay between ADC poll iterations to reduce I2C traffic -#define ADC_POLL_TIMEOUT_MS 100 // Max time to wait for ADC measurement +#define ADC_POLL_DELAY_MS 5 // Delay between ADC poll iterations to reduce I2C traffic +#define ADC_POLL_TIMEOUT_MS 100 // Max time to wait for ADC measurement static TimerID s_debounce_charger_timer = TIMER_INVALID_ID; static uint32_t s_dischg_limit_ma; @@ -79,10 +79,10 @@ typedef enum { PmicRegisters_BCHARGER_BCHGDEBUG = 0x0346, PmicRegisters_BCHARGER_BCHGDEBUG__DISABLEBATTERYDETECT = 0x04, PmicRegisters_BCHARGER_BCHGVBATLOWCHARGE = 0x0350, - PmicRegisters_ADC_TASKVBATMEASURE = 0x0500, - PmicRegisters_ADC_TASKNTCMEASURE = 0x0501, - PmicRegisters_ADC_TASKVSYSMEASURE = 0x0503, - PmicRegisters_ADC_TASKIBATMEASURE = 0x0506, + PmicRegisters_ADC_TASKVBATMEASURE = 0x0500, + PmicRegisters_ADC_TASKNTCMEASURE = 0x0501, + PmicRegisters_ADC_TASKVSYSMEASURE = 0x0503, + PmicRegisters_ADC_TASKIBATMEASURE = 0x0506, PmicRegisters_ADC_TASKVBUS7MEASURE = 0x0507, PmicRegisters_ADC_ADCIBATMEASSTATUS = 0x0510, PmicRegisters_ADC_ADCIBATMEASSTATUS__BCHARGERMODE_MASK = 0x0C, @@ -167,8 +167,7 @@ static bool dischg_limit_ma_set(uint32_t dischg_limit_ma); static uint16_t prv_ntc_threshold_code(uint8_t celsius) { // Ref: PS v1.1 Section 6.2.5: K_NTCTEMP = round(1024 * R_T / (R_T + R_B)) float t_k = (float)celsius + 273.15f; - float exponent = (float)NPM1300_CONFIG.thermistor_beta * - ((1.f / 298.15f) - (1.f / t_k)); + float exponent = (float)NPM1300_CONFIG.thermistor_beta * ((1.f / 298.15f) - (1.f / t_k)); return (uint16_t)((1024.0f / (1.0f + exp(exponent))) + 0.5f); } @@ -177,7 +176,7 @@ void battery_init(void) { static bool prv_read_register(uint16_t register_address, uint8_t *result) { i2c_use(I2C_NPM1300); - uint8_t regad[2] = { register_address >> 8, register_address & 0xFF }; + uint8_t regad[2] = {register_address >> 8, register_address & 0xFF}; bool rv = i2c_write_read_block(I2C_NPM1300, 2, regad, 1, result); i2c_release(I2C_NPM1300); return rv; @@ -185,7 +184,7 @@ static bool prv_read_register(uint16_t register_address, uint8_t *result) { static bool prv_write_register(uint16_t register_address, uint8_t datum) { i2c_use(I2C_NPM1300); - uint8_t d[3] = { register_address >> 8, register_address & 0xFF, datum }; + uint8_t d[3] = {register_address >> 8, register_address & 0xFF, datum}; bool rv = i2c_write_block(I2C_NPM1300, 3, d); i2c_release(I2C_NPM1300); return rv; @@ -224,37 +223,40 @@ static bool prv_buck_set_sw_ctrl(uint16_t normvout_reg, uint16_t voutstatus_reg, static void prv_handle_charge_state_change(void *null) { const bool is_charging = pmic_is_charging(); const bool is_connected = pmic_is_usb_connected(); - PBL_LOG_DBG("nPM1300 Interrupt: Charging? %s Plugged? %s", - is_charging ? "YES" : "NO", is_connected ? "YES" : "NO"); + PBL_LOG_DBG("nPM1300 Interrupt: Charging? %s Plugged? %s", is_charging ? "YES" : "NO", + is_connected ? "YES" : "NO"); if (is_connected && NPM1300_CONFIG.vbus_current_lim0 != 0) { bool ok = prv_write_register(PmicRegisters_VBUSIN_VBUSINILIM0, - NPM1300_CONFIG.vbus_current_lim0/NPM1300_VBUS_CURRENT_DIVISOR); + NPM1300_CONFIG.vbus_current_lim0 / NPM1300_VBUS_CURRENT_DIVISOR); ok &= prv_write_register(PmicRegisters_VBUSIN_TASKUPDATELIMSW, - PmicRegisters_VBUSIN_TASKUPDATELIMSW__EN); + PmicRegisters_VBUSIN_TASKUPDATELIMSW__EN); if (!ok) { PBL_LOG_ERR("config vbus limite0 failed"); } } PebbleEvent event = { - .type = PEBBLE_BATTERY_CONNECTION_EVENT, - .battery_connection = { - .is_connected = battery_is_usb_connected(), - }, + .type = PEBBLE_BATTERY_CONNECTION_EVENT, + .battery_connection = { + .is_connected = battery_is_usb_connected(), + }, }; event_put(&event); } static void prv_clear_pending_interrupts() { - prv_write_register(PmicRegisters_MAIN_EVENTSBCHARGER1CLR, PmicRegisters_MAIN_EVENTSBCHARGER1__EVENTCHGCOMPLETED); - prv_write_register(PmicRegisters_MAIN_EVENTSVBUSIN0CLR, PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSDETECTED | PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSREMOVED); + prv_write_register(PmicRegisters_MAIN_EVENTSBCHARGER1CLR, + PmicRegisters_MAIN_EVENTSBCHARGER1__EVENTCHGCOMPLETED); + prv_write_register(PmicRegisters_MAIN_EVENTSVBUSIN0CLR, + PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSDETECTED | + PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSREMOVED); } static void prv_pmic_state_change_cb(void *null) { prv_clear_pending_interrupts(); - new_timer_start(s_debounce_charger_timer, CHARGER_DEBOUNCE_MS, - prv_handle_charge_state_change, NULL, 0 /*flags*/); + new_timer_start(s_debounce_charger_timer, CHARGER_DEBOUNCE_MS, prv_handle_charge_state_change, + NULL, 0 /*flags*/); } static void prv_npm1300_interrupt_handler(bool *should_context_switch) { @@ -264,7 +266,8 @@ static void prv_npm1300_interrupt_handler(bool *should_context_switch) { static void prv_configure_interrupts(void) { prv_clear_pending_interrupts(); - exti_configure_pin(BOARD_CONFIG_POWER.pmic_int, ExtiTrigger_Rising, prv_npm1300_interrupt_handler); + exti_configure_pin(BOARD_CONFIG_POWER.pmic_int, ExtiTrigger_Rising, + prv_npm1300_interrupt_handler); exti_enable(BOARD_CONFIG_POWER.pmic_int); } @@ -277,15 +280,12 @@ bool pmic_init(void) { // TODO(NPM1300): This needs to be configurable at board level #ifdef CONFIG_BOARD_ASTERIX // Anomaly 27: set BUCK1/BUCK2 to SW control with workaround - ok &= prv_buck_set_sw_ctrl(PmicRegisters_BUCK_BUCK1NORMVOUT, - PmicRegisters_BUCK_BUCK1VOUTSTATUS, - PmicRegisters_BUCK_BUCKSWCTRLSEL__BUCK1SWCTRLSEL_SWCTRL, - 8 /* 1.8V */); - ok &= prv_buck_set_sw_ctrl(PmicRegisters_BUCK_BUCK2NORMVOUT, - PmicRegisters_BUCK_BUCK2VOUTSTATUS, - PmicRegisters_BUCK_BUCKSWCTRLSEL__BUCK2SWCTRLSEL_SWCTRL, - 20 /* 3.0V */); - + ok &= prv_buck_set_sw_ctrl(PmicRegisters_BUCK_BUCK1NORMVOUT, PmicRegisters_BUCK_BUCK1VOUTSTATUS, + PmicRegisters_BUCK_BUCKSWCTRLSEL__BUCK1SWCTRLSEL_SWCTRL, 8 /* 1.8V */); + ok &= + prv_buck_set_sw_ctrl(PmicRegisters_BUCK_BUCK2NORMVOUT, PmicRegisters_BUCK_BUCK2VOUTSTATUS, + PmicRegisters_BUCK_BUCKSWCTRLSEL__BUCK2SWCTRLSEL_SWCTRL, 20 /* 3.0V */); + if (!prv_read_register(PmicRegisters_LDSW_LDSWSTATUS, &val)) { PBL_LOG_ERR("failed to read LDSWSTATUS"); return false; @@ -304,25 +304,30 @@ bool pmic_init(void) { // FIXME(OBELIX,GETAFIX): Needs to be configurable at board level #if defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_GETAFIX) // Anomaly 27: set BUCK1 to SW control with workaround, then disable it - ok &= prv_buck_set_sw_ctrl(PmicRegisters_BUCK_BUCK1NORMVOUT, - PmicRegisters_BUCK_BUCK1VOUTSTATUS, - PmicRegisters_BUCK_BUCKSWCTRLSEL__BUCK1SWCTRLSEL_SWCTRL, - 8 /* 1.8V */); + ok &= prv_buck_set_sw_ctrl(PmicRegisters_BUCK_BUCK1NORMVOUT, PmicRegisters_BUCK_BUCK1VOUTSTATUS, + PmicRegisters_BUCK_BUCKSWCTRLSEL__BUCK1SWCTRLSEL_SWCTRL, 8 /* 1.8V */); ok &= prv_write_register(PmicRegisters_BUCK_BUCK1ENACLR, 1); - //enable 1.8V@LDO1 - ok &= prv_write_register(PmicRegisters_LDSW_LDSW1LDOSEL, 1); //LDO - ok &= prv_write_register(PmicRegisters_LDSW_LDSW1VOUTSEL, 8); //1.8V - ok &= prv_write_register(PmicRegisters_LDSW_TASKLDSW1SET, 1); //enable + // enable 1.8V@LDO1 + ok &= prv_write_register(PmicRegisters_LDSW_LDSW1LDOSEL, 1); // LDO + ok &= prv_write_register(PmicRegisters_LDSW_LDSW1VOUTSEL, 8); // 1.8V + ok &= prv_write_register(PmicRegisters_LDSW_TASKLDSW1SET, 1); // enable #endif - ok &= prv_write_register(PmicRegisters_MAIN_EVENTSBCHARGER1CLR, PmicRegisters_MAIN_EVENTSBCHARGER1__EVENTCHGCOMPLETED); - ok &= prv_write_register(PmicRegisters_MAIN_INTENEVENTSBCHARGER1SET, PmicRegisters_MAIN_EVENTSBCHARGER1__EVENTCHGCOMPLETED); - ok &= prv_write_register(PmicRegisters_MAIN_EVENTSVBUSIN0CLR, PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSDETECTED | PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSREMOVED); - ok &= prv_write_register(PmicRegisters_MAIN_INTENEVENTSVBUSIN0SET, PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSDETECTED | PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSREMOVED); + ok &= prv_write_register(PmicRegisters_MAIN_EVENTSBCHARGER1CLR, + PmicRegisters_MAIN_EVENTSBCHARGER1__EVENTCHGCOMPLETED); + ok &= prv_write_register(PmicRegisters_MAIN_INTENEVENTSBCHARGER1SET, + PmicRegisters_MAIN_EVENTSBCHARGER1__EVENTCHGCOMPLETED); + ok &= prv_write_register(PmicRegisters_MAIN_EVENTSVBUSIN0CLR, + PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSDETECTED | + PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSREMOVED); + ok &= prv_write_register(PmicRegisters_MAIN_INTENEVENTSVBUSIN0SET, + PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSDETECTED | + PmicRegisters_MAIN_EVENTSVBUSIN0__EVENTVBUSREMOVED); ok &= prv_write_register(PmicRegisters_GPIOS_GPIOMODE1, PmicRegisters_GPIOS_GPIOMODE__GPOIRQ); ok &= prv_write_register(PmicRegisters_GPIOS_GPIOOPENDRAIN1, 0); - ok &= prv_write_register(PmicRegisters_SHIP_SHPHLDCONFIG, PmicRegisters_SHIP_SHPHLDCONFIG__SHPHLDTIM_96MS); + ok &= prv_write_register(PmicRegisters_SHIP_SHPHLDCONFIG, + PmicRegisters_SHIP_SHPHLDCONFIG__SHPHLDTIM_96MS); ok &= prv_write_register(PmicRegisters_SHIP_TASKSHPHLDCFGSTROBE, 1); // automatic IBAT measurement after VBAT @@ -341,20 +346,29 @@ bool pmic_init(void) { // FIXME: this needs to be configurable at board level #ifdef CONFIG_BOARD_OBELIX - ok &= prv_write_register(PmicRegisters_ADC_ADCNTCRSEL, PmicRegisters_ADC_ADCNTCRSEL__ADCNTCRSEL_10K); + ok &= prv_write_register(PmicRegisters_ADC_ADCNTCRSEL, + PmicRegisters_ADC_ADCNTCRSEL__ADCNTCRSEL_10K); - ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERM, PmicRegisters_BCHARGER_BCHGVTERM__BCHGVTERMNORM_4V35); - ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERMR, PmicRegisters_BCHARGER_BCHGVTERMR__BCHGVTERMREDUCED_4V00); + ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERM, + PmicRegisters_BCHARGER_BCHGVTERM__BCHGVTERMNORM_4V35); + ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERMR, + PmicRegisters_BCHARGER_BCHGVTERMR__BCHGVTERMREDUCED_4V00); #elif defined(CONFIG_BOARD_GETAFIX) - ok &= prv_write_register(PmicRegisters_ADC_ADCNTCRSEL, PmicRegisters_ADC_ADCNTCRSEL__ADCNTCRSEL_10K); + ok &= prv_write_register(PmicRegisters_ADC_ADCNTCRSEL, + PmicRegisters_ADC_ADCNTCRSEL__ADCNTCRSEL_10K); - ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERM, PmicRegisters_BCHARGER_BCHGVTERM__BCHGVTERMNORM_4V45); - ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERMR, PmicRegisters_BCHARGER_BCHGVTERMR__BCHGVTERMREDUCED_4V00); + ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERM, + PmicRegisters_BCHARGER_BCHGVTERM__BCHGVTERMNORM_4V45); + ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERMR, + PmicRegisters_BCHARGER_BCHGVTERMR__BCHGVTERMREDUCED_4V00); #elif defined(CONFIG_BOARD_ASTERIX) - ok &= prv_write_register(PmicRegisters_ADC_ADCNTCRSEL, PmicRegisters_ADC_ADCNTCRSEL__ADCNTCRSEL_10K); + ok &= prv_write_register(PmicRegisters_ADC_ADCNTCRSEL, + PmicRegisters_ADC_ADCNTCRSEL__ADCNTCRSEL_10K); - ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERM, PmicRegisters_BCHARGER_BCHGVTERM__BCHGVTERMNORM_4V20); - ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERMR, PmicRegisters_BCHARGER_BCHGVTERMR__BCHGVTERMREDUCED_4V00); + ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERM, + PmicRegisters_BCHARGER_BCHGVTERM__BCHGVTERMNORM_4V20); + ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGVTERMR, + PmicRegisters_BCHARGER_BCHGVTERMR__BCHGVTERMREDUCED_4V00); #endif { @@ -365,13 +379,15 @@ bool pmic_init(void) { // FIXME: this needs to be configurable at board level #ifdef CONFIG_BOARD_OBELIX - //3.3V @ LDO2 - ok &= prv_write_register(PmicRegisters_LDSW_LDSW2LDOSEL, PmicRegisters_LDSW_LDSW2LDOSEL__LDO_MODE); + // 3.3V @ LDO2 + ok &= + prv_write_register(PmicRegisters_LDSW_LDSW2LDOSEL, PmicRegisters_LDSW_LDSW2LDOSEL__LDO_MODE); ok &= prv_write_register(PmicRegisters_LDSW_LDSW2VOUTSEL, PmicRegisters_LDSW_LDSW2VOUTSEL__3V3); ok &= prv_write_register(PmicRegisters_LDSW_TASKLDSW2CLR, 1); #elif defined(CONFIG_BOARD_GETAFIX) // LDSW2 (3.3V for PDM) - ok &= prv_write_register(PmicRegisters_LDSW_LDSW2LDOSEL, PmicRegisters_LDSW_LDSW2LDOSEL__LDSW_MODE); + ok &= + prv_write_register(PmicRegisters_LDSW_LDSW2LDOSEL, PmicRegisters_LDSW_LDSW2LDOSEL__LDSW_MODE); ok &= prv_write_register(PmicRegisters_LDSW_TASKLDSW2CLR, 1); #endif @@ -384,13 +400,13 @@ bool pmic_init(void) { if (NPM1300_CONFIG.vbus_current_startup != 0) { ok &= prv_write_register(PmicRegisters_VBUSIN_VBUSINILIMSTARTUP, - NPM1300_CONFIG.vbus_current_startup/NPM1300_VBUS_CURRENT_DIVISOR); + NPM1300_CONFIG.vbus_current_startup / NPM1300_VBUS_CURRENT_DIVISOR); } if (NPM1300_CONFIG.term_current_pct == 10U) { ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGITERMSEL, PmicRegisters_BCHARGER_BCHGITERMSEL__SEL10); - } else if(NPM1300_CONFIG.term_current_pct == 20U) { + } else if (NPM1300_CONFIG.term_current_pct == 20U) { ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGITERMSEL, PmicRegisters_BCHARGER_BCHGITERMSEL__SEL20); } else { @@ -398,14 +414,10 @@ bool pmic_init(void) { return false; } - ok &= prv_write_register(PmicRegisters_SYSTEM_TESTACCESS, - PmicRegisters_SYSTEM_TESTACCESS__VAL0); - ok &= prv_write_register(PmicRegisters_SYSTEM_TESTACCESS, - PmicRegisters_SYSTEM_TESTACCESS__VAL1); - ok &= prv_write_register(PmicRegisters_SYSTEM_TESTACCESS, - PmicRegisters_SYSTEM_TESTACCESS__VAL2); - ok &= prv_write_register(PmicRegisters_SYSTEM_TESTACCESS, - PmicRegisters_SYSTEM_TESTACCESS__VAL3); + ok &= prv_write_register(PmicRegisters_SYSTEM_TESTACCESS, PmicRegisters_SYSTEM_TESTACCESS__VAL0); + ok &= prv_write_register(PmicRegisters_SYSTEM_TESTACCESS, PmicRegisters_SYSTEM_TESTACCESS__VAL1); + ok &= prv_write_register(PmicRegisters_SYSTEM_TESTACCESS, PmicRegisters_SYSTEM_TESTACCESS__VAL2); + ok &= prv_write_register(PmicRegisters_SYSTEM_TESTACCESS, PmicRegisters_SYSTEM_TESTACCESS__VAL3); ok &= prv_write_register(PmicRegisters_BCHARGER_BCHGDEBUG, PmicRegisters_BCHARGER_BCHGDEBUG__DISABLEBATTERYDETECT); @@ -466,7 +478,7 @@ uint16_t pmic_get_vsys(void) { elapsed += ADC_POLL_DELAY_MS; } } - + uint8_t vsys_msb; uint8_t lsbs; if (!prv_read_register(PmicRegisters_ADC_ADCVSYSRESULTMSB, &vsys_msb)) { @@ -477,7 +489,7 @@ uint16_t pmic_get_vsys(void) { } uint16_t vsys_raw = (vsys_msb << 2) | (lsbs >> 6); uint32_t vsys = vsys_raw * 6375 / 1023; - + return vsys; } @@ -502,7 +514,7 @@ int battery_get_millivolts(void) { elapsed += ADC_POLL_DELAY_MS; } } - + uint8_t vbat_msb; uint8_t lsbs; if (!prv_read_register(PmicRegisters_ADC_ADCVBATRESULTMSB, &vbat_msb)) { @@ -513,7 +525,7 @@ int battery_get_millivolts(void) { } uint16_t vbat_raw = (vbat_msb << 2) | (lsbs & 3); uint32_t vbat = vbat_raw * 5000 / 1023; - + return vbat; } @@ -536,16 +548,15 @@ int battery_get_constants(BatteryConstants *constants) { ((int32_t)NPM1300_CONFIG.chg_current_ma * 1000 * NPM1300_BCHARGER_ADC_CALC_CHARGE_MUL) / NPM1300_BCHARGER_ADC_CALC_CHARGE_DIV; } else { - full_scale_ua = - ((int32_t)s_dischg_limit_ma * 1000 * NPM1300_BCHARGER_ADC_CALC_DISCHARGE_MUL) / - NPM1300_BCHARGER_ADC_CALC_DISCHARGE_DIV; + full_scale_ua = ((int32_t)s_dischg_limit_ma * 1000 * NPM1300_BCHARGER_ADC_CALC_DISCHARGE_MUL) / + NPM1300_BCHARGER_ADC_CALC_DISCHARGE_DIV; } // Clear the ADC ready events for VBAT, IBAT, and NTC if (!prv_write_register(PmicRegisters_MAIN_EVENTSADCCLR, PmicRegisters_MAIN_EVENTSADCCLR__EVENTADCVBATRDY | - PmicRegisters_MAIN_EVENTSADCCLR__EVENTADCIBATRDY | - PmicRegisters_MAIN_EVENTSADCCLR__EVENTADCNTCRDY)) { + PmicRegisters_MAIN_EVENTSADCCLR__EVENTADCIBATRDY | + PmicRegisters_MAIN_EVENTSADCCLR__EVENTADCNTCRDY)) { return -1; } @@ -655,7 +666,8 @@ int battery_get_constants(BatteryConstants *constants) { } bool pmic_set_charger_state(bool enable) { - return prv_write_register(enable ? PmicRegisters_BCHARGER_BCHGENABLESET : PmicRegisters_BCHARGER_BCHGENABLECLR, 1); + return prv_write_register( + enable ? PmicRegisters_BCHARGER_BCHGENABLESET : PmicRegisters_BCHARGER_BCHGENABLECLR, 1); } void battery_set_charge_enable(bool charging_enabled) { @@ -672,7 +684,9 @@ bool pmic_is_charging(void) { return false; } - return (status & (PmicRegisters_BCHARGER_BCHGCHARGESTATUS__TRICKLECHARGE | PmicRegisters_BCHARGER_BCHGCHARGESTATUS__CONSTANTCURRENT | PmicRegisters_BCHARGER_BCHGCHARGESTATUS__CONSTANTVOLTAGE)) != 0; + return (status & (PmicRegisters_BCHARGER_BCHGCHARGESTATUS__TRICKLECHARGE | + PmicRegisters_BCHARGER_BCHGCHARGESTATUS__CONSTANTCURRENT | + PmicRegisters_BCHARGER_BCHGCHARGESTATUS__CONSTANTVOLTAGE)) != 0; } bool battery_charge_controller_thinks_we_are_charging_impl(void) { @@ -745,7 +759,12 @@ int battery_charge_status_get(BatteryChargeStatus *status) { void command_pmic_read_registers(void) { char buffer[64]; -#define SAY(x) do { uint8_t reg; int rv = prv_read_register(PmicRegisters_##x, ®); prompt_send_response_fmt(buffer, sizeof(buffer), "PMIC: " #x " = %02x (rv %d)", reg, rv); } while(0) +#define SAY(x) \ + do { \ + uint8_t reg; \ + int rv = prv_read_register(PmicRegisters_##x, ®); \ + prompt_send_response_fmt(buffer, sizeof(buffer), "PMIC: " #x " = %02x (rv %d)", reg, rv); \ + } while (0) SAY(ERRLOG_SCRATCH0); SAY(ERRLOG_SCRATCH1); SAY(BUCK_BUCK1NORMVOUT); @@ -769,15 +788,19 @@ static bool gpio_set(Npm1300GpioId_t id, bool is_high) { bool rv = false; switch (id) { case Npm1300_Gpio2: - rv = prv_write_register(PmicRegisters_GPIOS_GPIOMODE2, - is_high ? PmicRegisters_GPIOS_GPIOMODE__OUTPUT_HIGH : PmicRegisters_GPIOS_GPIOMODE__OUTPUT_LOW); - rv &= prv_write_register(PmicRegisters_GPIOS_GPIOPUEN2, + rv = prv_write_register(PmicRegisters_GPIOS_GPIOMODE2, + is_high ? PmicRegisters_GPIOS_GPIOMODE__OUTPUT_HIGH + : PmicRegisters_GPIOS_GPIOMODE__OUTPUT_LOW); + rv &= prv_write_register( + PmicRegisters_GPIOS_GPIOPUEN2, is_high ? PmicRegisters_GPIOS_GPIOPUEN__EN : PmicRegisters_GPIOS_GPIOPUEN__DIS); break; case Npm1300_Gpio3: { - rv = prv_write_register(PmicRegisters_GPIOS_GPIOMODE3, - is_high ? PmicRegisters_GPIOS_GPIOMODE__OUTPUT_HIGH : PmicRegisters_GPIOS_GPIOMODE__OUTPUT_LOW); - rv &= prv_write_register(PmicRegisters_GPIOS_GPIOPUEN3, + rv = prv_write_register(PmicRegisters_GPIOS_GPIOMODE3, + is_high ? PmicRegisters_GPIOS_GPIOMODE__OUTPUT_HIGH + : PmicRegisters_GPIOS_GPIOMODE__OUTPUT_LOW); + rv &= prv_write_register( + PmicRegisters_GPIOS_GPIOPUEN3, is_high ? PmicRegisters_GPIOS_GPIOPUEN__EN : PmicRegisters_GPIOS_GPIOPUEN__DIS); break; } @@ -838,7 +861,7 @@ static bool dischg_limit_ma_set(uint32_t dischg_limit_ma) { } Npm1300Ops_t NPM1300_OPS = { - .gpio_set = gpio_set, - .ldo2_set_enabled = ldo2_set_enabled, - .dischg_limit_ma_set = dischg_limit_ma_set, + .gpio_set = gpio_set, + .ldo2_set_enabled = ldo2_set_enabled, + .dischg_limit_ma_set = dischg_limit_ma_set, }; diff --git a/src/fw/drivers/pressure/bmp390.c b/src/fw/drivers/pressure/bmp390.c index f46e488255..4f53ad675d 100644 --- a/src/fw/drivers/pressure/bmp390.c +++ b/src/fw/drivers/pressure/bmp390.c @@ -12,7 +12,6 @@ PBL_LOG_MODULE_DEFINE(driver_pressure_bmp390, CONFIG_DRIVER_PRESSURE_LOG_LEVEL); #define BMP390_CHIP_ID_VALUE 0x60 #define BMP390_PWR_CTRL 0x1B - static bool prv_read_register(I2CSlavePort *i2c, uint8_t register_address, uint8_t *result) { i2c_use(i2c); bool rv = i2c_write_block(i2c, 1, ®ister_address); @@ -24,7 +23,7 @@ static bool prv_read_register(I2CSlavePort *i2c, uint8_t register_address, uint8 static bool prv_write_register(I2CSlavePort *i2c, uint8_t register_address, uint8_t datum) { i2c_use(i2c); - uint8_t d[2] = { register_address, datum }; + uint8_t d[2] = {register_address, datum}; bool rv = i2c_write_block(i2c, 2, d); i2c_release(i2c); return rv; @@ -39,6 +38,6 @@ void pressure_init(void) { PBL_LOG_DBG("BMP390 probe failed; rv %d, result 0x%02x", rv, result); } else { PBL_LOG_DBG("found the BMP390, setting to low power"); - (void) prv_write_register(I2C_BMP390, BMP390_PWR_CTRL, 0); + (void)prv_write_register(I2C_BMP390, BMP390_PWR_CTRL, 0); } } diff --git a/src/fw/drivers/pwm/nrf5.c b/src/fw/drivers/pwm/nrf5.c index f19d1a057e..642a446802 100644 --- a/src/fw/drivers/pwm/nrf5.c +++ b/src/fw/drivers/pwm/nrf5.c @@ -7,32 +7,44 @@ #include void pwm_init(const PwmConfig *pwm, uint32_t resolution, uint32_t frequency) { - nrfx_pwm_config_t config = NRFX_PWM_DEFAULT_CONFIG( - pwm->output.gpio_pin, - NRF_PWM_PIN_NOT_CONNECTED, - NRF_PWM_PIN_NOT_CONNECTED, - NRF_PWM_PIN_NOT_CONNECTED); + nrfx_pwm_config_t config = + NRFX_PWM_DEFAULT_CONFIG(pwm->output.gpio_pin, NRF_PWM_PIN_NOT_CONNECTED, + NRF_PWM_PIN_NOT_CONNECTED, NRF_PWM_PIN_NOT_CONNECTED); // this is hokey and imprecise, but oh well - if (frequency >= 16000000) config.base_clock = NRF_PWM_CLK_16MHz; - else if (frequency >= 8000000) config.base_clock = NRF_PWM_CLK_8MHz; - else if (frequency >= 4000000) config.base_clock = NRF_PWM_CLK_4MHz; - else if (frequency >= 2000000) config.base_clock = NRF_PWM_CLK_2MHz; - else if (frequency >= 1000000) config.base_clock = NRF_PWM_CLK_1MHz; - else if (frequency >= 500000) config.base_clock = NRF_PWM_CLK_500kHz; - else if (frequency >= 250000) config.base_clock = NRF_PWM_CLK_250kHz; - else if (frequency >= 125000) config.base_clock = NRF_PWM_CLK_125kHz; - else WTF; + if (frequency >= 16000000) + config.base_clock = NRF_PWM_CLK_16MHz; + else if (frequency >= 8000000) + config.base_clock = NRF_PWM_CLK_8MHz; + else if (frequency >= 4000000) + config.base_clock = NRF_PWM_CLK_4MHz; + else if (frequency >= 2000000) + config.base_clock = NRF_PWM_CLK_2MHz; + else if (frequency >= 1000000) + config.base_clock = NRF_PWM_CLK_1MHz; + else if (frequency >= 500000) + config.base_clock = NRF_PWM_CLK_500kHz; + else if (frequency >= 250000) + config.base_clock = NRF_PWM_CLK_250kHz; + else if (frequency >= 125000) + config.base_clock = NRF_PWM_CLK_125kHz; + else + WTF; config.count_mode = NRF_PWM_MODE_UP; config.top_value = resolution; config.load_mode = NRF_PWM_LOAD_COMMON; config.step_mode = NRF_PWM_STEP_TRIGGERED; - + nrfx_err_t rv = nrfx_pwm_init(&pwm->peripheral, &config, NULL, NULL); PBL_ASSERTN(rv == NRFX_SUCCESS); - + pwm->state->enabled = 0; pwm->state->value = 0; - pwm->state->seq = (nrf_pwm_sequence_t) { .values = { .p_common = &pwm->state->value }, .length = 1, .repeats = 0, .end_delay = 0 }; + pwm->state->seq = (nrf_pwm_sequence_t){ + .values = {.p_common = &pwm->state->value}, + .length = 1, + .repeats = 0, + .end_delay = 0 + }; pwm->state->resolution = resolution; } diff --git a/src/fw/drivers/pwm/sf32lb.c b/src/fw/drivers/pwm/sf32lb.c index cc60c844d8..e72b38ddbe 100644 --- a/src/fw/drivers/pwm/sf32lb.c +++ b/src/fw/drivers/pwm/sf32lb.c @@ -114,7 +114,7 @@ void pwm_init(const PwmConfig *pwm, uint32_t resolution, uint32_t frequency) { pwm->state->resolution = resolution; pwm->state->value = 1000000000UL / (frequency); - + HAL_PIN_Set(pwm->pwm_pin.pad, pwm->pwm_pin.func, pwm->pwm_pin.flags, 1); ret = HAL_GPT_Base_Init(htim); diff --git a/src/fw/drivers/qemu/qemu_accel.c b/src/fw/drivers/qemu/qemu_accel.c index dbbe82bd7c..76be339598 100644 --- a/src/fw/drivers/qemu/qemu_accel.c +++ b/src/fw/drivers/qemu/qemu_accel.c @@ -57,28 +57,23 @@ static bool s_initialized; static PBL_MUTEX_DEFINE(s_accel_mutex); static uint32_t s_sampling_interval_ms = 0; -static const AccelRawData s_default_sample = { - .x = 0, - .y = 0, - .z = -1000 -}; +static const AccelRawData s_default_sample = {.x = 0, .y = 0, .z = -1000}; // We copy accel data received over the QEMU serial connection into this buffer. // This data gets moved into s_latest_reading when the s_timer_id timer callback // executes. #define QEMU_ACCEL_RCV_BUFFER_SAMPLES 256 static AccelRawData s_rcv_buffer[QEMU_ACCEL_RCV_BUFFER_SAMPLES]; -static uint16_t s_num_rcv_samples; -static uint16_t s_current_rcv_sample; +static uint16_t s_num_rcv_samples; +static uint16_t s_current_rcv_sample; static AccelRawData s_latest_reading; -static uint32_t s_num_fifo_samples; // # of samples in the fifo +static uint32_t s_num_fifo_samples; // # of samples in the fifo // This timer is used to feed the FIFO -static bool s_timer_running; -static TimerID s_timer_id; // timer used to copy data from s_rcv_samples into - // s_latest_reading. - +static bool s_timer_running; +static TimerID s_timer_id; // timer used to copy data from s_rcv_samples into + // s_latest_reading. static void prv_construct_driver_sample(AccelDriverSample *sample) { time_t time_s; @@ -86,21 +81,19 @@ static void prv_construct_driver_sample(AccelDriverSample *sample) { rtc_get_time_ms(&time_s, &time_ms); uint64_t timestamp_ms = ((uint64_t)time_s) * 1000 + time_ms; - *sample = (AccelDriverSample) { - .timestamp_us = timestamp_ms * 1000, - .x = s_latest_reading.x, - .y = s_latest_reading.y, - .z = s_latest_reading.z, + *sample = (AccelDriverSample){ + .timestamp_us = timestamp_ms * 1000, + .x = s_latest_reading.x, + .y = s_latest_reading.y, + .z = s_latest_reading.z, }; } - static void prv_stop_timer(void) { new_timer_stop(s_timer_id); s_timer_running = false; } - // This timer runs as long as we have samples in our s_rcv_buffer or there is // any subscription to the accel that expects samples to arrive at a given // frequency. It feeds samples at the right rate into the s_latest_reading @@ -127,18 +120,15 @@ static void prv_timer_cb(void *data) { pbl_mutex_unlock(&s_accel_mutex); } - // Start/reschedule the timer that feeds the FIFO/s_latest_reading out of the // samples received from the host static void prv_reschedule_timer(void) { - bool success = new_timer_start(s_timer_id, s_sampling_interval_ms, - prv_timer_cb, NULL, + bool success = new_timer_start(s_timer_id, s_sampling_interval_ms, prv_timer_cb, NULL, TIMER_START_FLAG_REPEATING); PBL_ASSERTN(success); s_timer_running = true; } - // Called by the qemu_serial driver when we receive an accel packet from the // remote side. This copies the received data into our s_rcv_buffer buffer. It // will gradually be pulled out of that and replayed by the timer callback. @@ -155,20 +145,19 @@ void qemu_accel_msg_callback(const uint8_t *data, uint32_t len) { // Copy the received samples into the s_rcv_buffer #if QEMU_ACCEL_RCV_BUFFER_SAMPLES < 256 - s_num_rcv_samples = MIN(hdr->num_samples, - QEMU_ACCEL_RCV_BUFFER_SAMPLES); + s_num_rcv_samples = MIN(hdr->num_samples, QEMU_ACCEL_RCV_BUFFER_SAMPLES); #else s_num_rcv_samples = hdr->num_samples; #endif s_current_rcv_sample = 0; pbl_mutex_lock(&s_accel_mutex, PBL_FOREVER); { - for (uint32_t i=0; i < s_num_rcv_samples; ++i) { + for (uint32_t i = 0; i < s_num_rcv_samples; ++i) { s_rcv_buffer[i].x = ntohs(hdr->samples[i].x); s_rcv_buffer[i].y = ntohs(hdr->samples[i].y); s_rcv_buffer[i].z = ntohs(hdr->samples[i].z); - PBL_LOG_VERBOSE(" x,y,z from host: %d, %d, %d", s_rcv_buffer[i].x, - s_rcv_buffer[i].y, s_rcv_buffer[i].z); + PBL_LOG_VERBOSE(" x,y,z from host: %d, %d, %d", s_rcv_buffer[i].x, s_rcv_buffer[i].y, + s_rcv_buffer[i].z); } // If we have any samples at all, make sure the timer is running. This is @@ -186,7 +175,6 @@ void qemu_accel_msg_callback(const uint8_t *data, uint32_t len) { qemu_serial_send(QemuProtocol_Accel, (uint8_t *)&resp, sizeof(resp)); } - void accel_init(void) { PBL_ASSERTN(!s_initialized); s_initialized = true; @@ -212,12 +200,10 @@ uint32_t accel_get_sampling_interval(void) { return s_sampling_interval_ms * 1000; } - uint32_t accel_get_max_num_samples(void) { return QEMU_ACCEL_RCV_BUFFER_SAMPLES; } - void accel_set_num_samples(uint32_t num_samples) { pbl_mutex_lock(&s_accel_mutex, PBL_FOREVER); { @@ -235,35 +221,28 @@ void accel_set_num_samples(uint32_t num_samples) { pbl_mutex_unlock(&s_accel_mutex); } - int accel_peek(AccelDriverSample *data) { prv_construct_driver_sample(data); return 0; } - void accel_enable_shake_detection(bool on) { } - bool accel_get_shake_detection_enabled(void) { return false; } - void accel_enable_double_tap_detection(bool on) { } - bool accel_get_double_tap_detection_enabled(void) { return false; } - void accel_set_shake_sensitivity_high(bool sensitivity_high) { } - void accel_set_shake_sensitivity_percent(uint8_t percent) { (void)percent; } \ No newline at end of file diff --git a/src/fw/drivers/qemu/qemu_battery.c b/src/fw/drivers/qemu/qemu_battery.c index c9a4662ad6..d9aa6bfd35 100644 --- a/src/fw/drivers/qemu/qemu_battery.c +++ b/src/fw/drivers/qemu/qemu_battery.c @@ -51,7 +51,6 @@ void battery_set_charge_enable(bool charging_enabled) { void battery_set_fast_charge(bool fast_charge_enabled) { } - uint8_t qemu_battery_get_percent(void) { return s_percent; } @@ -63,8 +62,8 @@ void qemu_battery_msg_callback(const uint8_t *data, uint32_t len) { return; } - PBL_LOG_DBG("Got battery msg: pct: %d, charger_connected:%d", - hdr->battery_pct, hdr->charger_connected); + PBL_LOG_DBG("Got battery msg: pct: %d, charger_connected:%d", hdr->battery_pct, + hdr->charger_connected); s_percent = MIN(100, hdr->battery_pct); s_usb_connected = hdr->charger_connected; @@ -76,5 +75,3 @@ void qemu_battery_msg_callback(const uint8_t *data, uint32_t len) { // Force a state machine update battery_state_handle_connection_event(s_usb_connected); } - - diff --git a/src/fw/drivers/qemu/qemu_button.c b/src/fw/drivers/qemu/qemu_button.c index 06de0532d6..61861e82b8 100644 --- a/src/fw/drivers/qemu/qemu_button.c +++ b/src/fw/drivers/qemu/qemu_button.c @@ -15,22 +15,22 @@ #define REG32(addr) (*(volatile uint32_t *)(addr)) // QEMU GPIO register offsets (must match pebble-gpio device) -#define GPIO_BTN_STATE 0x00 -#define GPIO_BTN_EDGE 0x04 -#define GPIO_INTCTRL 0x08 -#define GPIO_INTSTAT 0x0C +#define GPIO_BTN_STATE 0x00 +#define GPIO_BTN_EDGE 0x04 +#define GPIO_INTCTRL 0x08 +#define GPIO_INTSTAT 0x0C // Button bit positions (must match QEMU pebble-gpio device) -#define BTN_BIT_BACK (1 << 0) -#define BTN_BIT_UP (1 << 1) -#define BTN_BIT_SELECT (1 << 2) -#define BTN_BIT_DOWN (1 << 3) +#define BTN_BIT_BACK (1 << 0) +#define BTN_BIT_UP (1 << 1) +#define BTN_BIT_SELECT (1 << 2) +#define BTN_BIT_DOWN (1 << 3) static const uint32_t s_button_bits[NUM_BUTTONS] = { - [BUTTON_ID_BACK] = BTN_BIT_BACK, - [BUTTON_ID_UP] = BTN_BIT_UP, - [BUTTON_ID_SELECT] = BTN_BIT_SELECT, - [BUTTON_ID_DOWN] = BTN_BIT_DOWN, + [BUTTON_ID_BACK] = BTN_BIT_BACK, + [BUTTON_ID_UP] = BTN_BIT_UP, + [BUTTON_ID_SELECT] = BTN_BIT_SELECT, + [BUTTON_ID_DOWN] = BTN_BIT_DOWN, }; static uint32_t s_last_state; @@ -53,8 +53,8 @@ static void prv_gpio_irq_handler(void) { if (changed & s_button_bits[i]) { bool is_pressed = (state & s_button_bits[i]) != 0; PebbleEvent e = { - .type = is_pressed ? PEBBLE_BUTTON_DOWN_EVENT : PEBBLE_BUTTON_UP_EVENT, - .button.button_id = i, + .type = is_pressed ? PEBBLE_BUTTON_DOWN_EVENT : PEBBLE_BUTTON_UP_EVENT, + .button.button_id = i, }; event_put_isr(&e); } @@ -124,8 +124,8 @@ void command_put_raw_button_event(const char *button_index, const char *is_butto return; } PebbleEvent e = { - .type = is_down ? PEBBLE_BUTTON_DOWN_EVENT : PEBBLE_BUTTON_UP_EVENT, - .button.button_id = button, + .type = is_down ? PEBBLE_BUTTON_DOWN_EVENT : PEBBLE_BUTTON_UP_EVENT, + .button.button_id = button, }; event_put(&e); } diff --git a/src/fw/drivers/qemu/qemu_display_hal.c b/src/fw/drivers/qemu/qemu_display_hal.c index c836b51f6d..d29dffeaee 100644 --- a/src/fw/drivers/qemu/qemu_display_hal.c +++ b/src/fw/drivers/qemu/qemu_display_hal.c @@ -11,26 +11,26 @@ #define REG32(addr) (*(volatile uint32_t *)(addr)) // Display MMIO register offsets (must match QEMU pebble-display device) -#define DISP_CTRL 0x000 -#define DISP_STATUS 0x004 -#define DISP_WIDTH 0x008 -#define DISP_HEIGHT 0x00C -#define DISP_FORMAT 0x010 -#define DISP_FLAGS 0x014 -#define DISP_BRIGHTNESS 0x018 -#define DISP_INT_STATUS 0x01C -#define DISP_INT_CTRL 0x020 +#define DISP_CTRL 0x000 +#define DISP_STATUS 0x004 +#define DISP_WIDTH 0x008 +#define DISP_HEIGHT 0x00C +#define DISP_FORMAT 0x010 +#define DISP_FLAGS 0x014 +#define DISP_BRIGHTNESS 0x018 +#define DISP_INT_STATUS 0x01C +#define DISP_INT_CTRL 0x020 // CTRL register bits -#define CTRL_ENABLE (1 << 0) -#define CTRL_UPDATE_REQUEST (1 << 1) +#define CTRL_ENABLE (1 << 0) +#define CTRL_UPDATE_REQUEST (1 << 1) // STATUS register bits -#define STATUS_BUSY (1 << 0) -#define STATUS_UPDATE_DONE (1 << 1) +#define STATUS_BUSY (1 << 0) +#define STATUS_UPDATE_DONE (1 << 1) // INT bits -#define INT_UPDATE_DONE_IE (1 << 0) +#define INT_UPDATE_DONE_IE (1 << 0) #define INT_UPDATE_DONE_PENDING (1 << 0) static bool s_enabled; diff --git a/src/fw/drivers/qemu/qemu_flash_hal.c b/src/fw/drivers/qemu/qemu_flash_hal.c index 8152eab622..e9034e2bc9 100644 --- a/src/fw/drivers/qemu/qemu_flash_hal.c +++ b/src/fw/drivers/qemu/qemu_flash_hal.c @@ -13,12 +13,12 @@ #define REG32(addr) (*(volatile uint32_t *)(addr)) // External flash controller MMIO register offsets -#define FLASH_CMD 0x00 -#define FLASH_ADDR 0x04 -#define FLASH_STATUS 0x08 -#define FLASH_INT_CTRL 0x0C -#define FLASH_INT_STATUS 0x10 -#define FLASH_SIZE 0x14 +#define FLASH_CMD 0x00 +#define FLASH_ADDR 0x04 +#define FLASH_STATUS 0x08 +#define FLASH_INT_CTRL 0x0C +#define FLASH_INT_STATUS 0x10 +#define FLASH_SIZE 0x14 // Range-based persistence handshake with the QEMU pebble-extflash device. // The device used to auto-flush its in-RAM XIP storage on SIGTERM, but that // captured torn writes (flash_logging journal mid-update, PFS OVERWRITE_STARTED @@ -29,22 +29,22 @@ // QEMU then blk_pwrite()s just that range to the backing file. Erases are // auto-flushed in QEMU (the geometry is implicit in FLASH_ADDR + CMD), so we // don't need to SYNC them from here. -#define FLASH_SYNC_LEN 0x18 -#define FLASH_SYNC 0x1C +#define FLASH_SYNC_LEN 0x18 +#define FLASH_SYNC 0x1C // CMD values -#define CMD_ERASE_SUBSECTOR 1 -#define CMD_ERASE_SECTOR 2 -#define CMD_WRITE_ENABLE 3 +#define CMD_ERASE_SUBSECTOR 1 +#define CMD_ERASE_SECTOR 2 +#define CMD_WRITE_ENABLE 3 // STATUS bits -#define STATUS_BUSY (1 << 0) -#define STATUS_COMPLETE (1 << 1) +#define STATUS_BUSY (1 << 0) +#define STATUS_COMPLETE (1 << 1) // Standard flash geometry -#define QEMU_SECTOR_SIZE 0x10000 // 64 KB -#define QEMU_SUBSECTOR_SIZE 0x1000 // 4 KB -#define QEMU_PAGE_SIZE 256 +#define QEMU_SECTOR_SIZE 0x10000 // 64 KB +#define QEMU_SUBSECTOR_SIZE 0x1000 // 4 KB +#define QEMU_PAGE_SIZE 256 static bool s_initialized; @@ -255,9 +255,9 @@ status_t flash_impl_write_security_register(uint32_t addr, uint8_t val) { } static const FlashSecurityRegisters s_security_regs = { - .sec_regs = NULL, - .num_sec_regs = 0, - .sec_reg_size = 0, + .sec_regs = NULL, + .num_sec_regs = 0, + .sec_reg_size = 0, }; const FlashSecurityRegisters *flash_impl_security_registers_info(void) { diff --git a/src/fw/drivers/qemu/qemu_gpio_hal.c b/src/fw/drivers/qemu/qemu_gpio_hal.c index e23a6482af..3c3f492586 100644 --- a/src/fw/drivers/qemu/qemu_gpio_hal.c +++ b/src/fw/drivers/qemu/qemu_gpio_hal.c @@ -10,8 +10,8 @@ #define REG32(addr) (*(volatile uint32_t *)(addr)) // GPIO MMIO register offsets -#define GPIO_STATE 0x00 // r: bit per button -#define GPIO_OUTPUT 0x04 // w: output state bits +#define GPIO_STATE 0x00 // r: bit per button +#define GPIO_OUTPUT 0x04 // w: output state bits void gpio_output_init(const OutputConfig *pin_config, GPIOOType_TypeDef otype) { (void)pin_config; diff --git a/src/fw/drivers/qemu/qemu_pwm_hal.c b/src/fw/drivers/qemu/qemu_pwm_hal.c index a192faa266..ee04248817 100644 --- a/src/fw/drivers/qemu/qemu_pwm_hal.c +++ b/src/fw/drivers/qemu/qemu_pwm_hal.c @@ -8,12 +8,12 @@ #define REG32(addr) (*(volatile uint32_t *)(addr)) // Display brightness register offset (must match QEMU pebble-display) -#define DISP_BRIGHTNESS 0x018 -#define DISP_CTRL 0x000 -#define CTRL_UPDATE (1 << 1) +#define DISP_BRIGHTNESS 0x018 +#define DISP_CTRL 0x000 +#define CTRL_UPDATE (1 << 1) // Minimum brightness when backlight is "off" - simulates ambient visibility -#define BACKLIGHT_OFF_BRIGHTNESS 40 +#define BACKLIGHT_OFF_BRIGHTNESS 40 static uint32_t s_resolution = 1024; diff --git a/src/fw/drivers/qemu/qemu_rtc_hal.c b/src/fw/drivers/qemu/qemu_rtc_hal.c index 060e72dcaf..83601eb5a8 100644 --- a/src/fw/drivers/qemu/qemu_rtc_hal.c +++ b/src/fw/drivers/qemu/qemu_rtc_hal.c @@ -11,15 +11,15 @@ #define REG32(addr) (*(volatile uint32_t *)(addr)) // RTC MMIO register offsets (must match QEMU pebble-rtc device) -#define RTC_TIME_LO 0x00 // Unix timestamp low 32 bits (r/w) -#define RTC_TIME_HI 0x04 // Unix timestamp high 32 bits (r) -#define RTC_ALARM 0x08 -#define RTC_CTRL 0x0C -#define RTC_TICKS_REG 0x10 // Monotonic 1000Hz tick counter (r) +#define RTC_TIME_LO 0x00 // Unix timestamp low 32 bits (r/w) +#define RTC_TIME_HI 0x04 // Unix timestamp high 32 bits (r) +#define RTC_ALARM 0x08 +#define RTC_CTRL 0x0C +#define RTC_TICKS_REG 0x10 // Monotonic 1000Hz tick counter (r) #define RTC_BACKUP_BASE 0x40 // CTRL bits -#define CTRL_ALARM_IE (1 << 0) +#define CTRL_ALARM_IE (1 << 0) // STATUS bits #define STATUS_ALARM_PENDING (1 << 0) @@ -136,7 +136,7 @@ bool rtc_alarm_is_initialized(void) { void rtc_set_timezone(TimezoneInfo *tzinfo) { uint32_t *raw = (uint32_t *)tzinfo; _Static_assert(sizeof(TimezoneInfo) <= 5 * sizeof(uint32_t), - "RTC Set Timezone invalid data size"); + "RTC Set Timezone invalid data size"); RTC_WriteBackupRegister(TZ_BACKUP_BASE + 0, raw[0]); RTC_WriteBackupRegister(TZ_BACKUP_BASE + 1, raw[1]); diff --git a/src/fw/drivers/qemu/qemu_serial.c b/src/fw/drivers/qemu/qemu_serial.c index a3a951e1c1..a0b76a46f4 100644 --- a/src/fw/drivers/qemu/qemu_serial.c +++ b/src/fw/drivers/qemu/qemu_serial.c @@ -29,7 +29,6 @@ static bool prv_uart_irq_handler(UARTDevice *dev, uint8_t byte, const UARTRXErro // Our globals static QemuSerialGlobals s_qemu_state; - // ----------------------------------------------------------------------------------------- // Handle incoming Tap packet data (QemuProtocol_Tap) static void prv_tap_msg_callback(const uint8_t *data, uint32_t len) { @@ -41,17 +40,16 @@ static void prv_tap_msg_callback(const uint8_t *data, uint32_t len) { PBL_LOG_DBG("Got tap msg: axis: %d, direction: %d", hdr->axis, hdr->direction); PebbleEvent e = { - .type = PEBBLE_ACCEL_SHAKE_EVENT, - .accel_tap = { - .axis = hdr->axis, - .direction = hdr->direction, - }, + .type = PEBBLE_ACCEL_SHAKE_EVENT, + .accel_tap = { + .axis = hdr->axis, + .direction = hdr->direction, + }, }; event_put(&e); } - // ----------------------------------------------------------------------------------------- // Handle incoming Bluetooth connection packet data (QemuProtocol_BluetoothConnection) static void prv_bluetooth_connection_msg_callback(const uint8_t *data, uint32_t len) { @@ -65,15 +63,12 @@ static void prv_bluetooth_connection_msg_callback(const uint8_t *data, uint32_t bool current_status = qemu_transport_is_connected(); bool new_status = (hdr->connected != 0); - if (new_status != current_status && !bt_ctl_is_airplane_mode_on()) { // Change to new status if we're not in airplane mode qemu_transport_set_connected(new_status); } - } - // ----------------------------------------------------------------------------------------- // Handle incoming compass packet data (QemuProtocol_Compass) static void prv_compass_msg_callback(const uint8_t *data, uint32_t len) { @@ -83,20 +78,19 @@ static void prv_compass_msg_callback(const uint8_t *data, uint32_t len) { return; } - PBL_LOG_DBG("Got compass msg: magnetic_heading: %"PRId32", calib_status:%u", - ntohl(hdr->magnetic_heading), hdr->calib_status); + PBL_LOG_DBG("Got compass msg: magnetic_heading: %" PRId32 ", calib_status:%u", + ntohl(hdr->magnetic_heading), hdr->calib_status); PebbleEvent e = { - .type = PEBBLE_COMPASS_DATA_EVENT, - .compass_data = { - .magnetic_heading = ntohl(hdr->magnetic_heading), - .calib_status = hdr->calib_status - } + .type = PEBBLE_COMPASS_DATA_EVENT, + .compass_data = { + .magnetic_heading = ntohl(hdr->magnetic_heading), + .calib_status = hdr->calib_status + } }; event_put(&e); } - // ----------------------------------------------------------------------------------------- // Handle incoming time format data (QemuProtocol_TimeFormat) static void prv_time_format_msg_callback(const uint8_t *data, uint32_t len) { @@ -110,7 +104,6 @@ static void prv_time_format_msg_callback(const uint8_t *data, uint32_t len) { clock_set_24h_style(hdr->is_24_hour); } - // ----------------------------------------------------------------------------------------- // Handle incoming timeline peek format data (QemuProtocol_TimelinePeek) static void prv_timeline_peek_msg_callback(const uint8_t *data, uint32_t len) { @@ -126,7 +119,6 @@ static void prv_timeline_peek_msg_callback(const uint8_t *data, uint32_t len) { #endif } - static void prv_content_size_msg_callback(const uint8_t *data, uint32_t len) { QemuProtocolContentSizeHeader *hdr = (QemuProtocolContentSizeHeader *)data; if (len != sizeof(*hdr)) { @@ -145,7 +137,6 @@ static void prv_content_size_msg_callback(const uint8_t *data, uint32_t len) { #endif } - // ----------------------------------------------------------------------------------------- // Handle incoming health metric data (QemuProtocol_HealthMetric) static void prv_health_metric_msg_callback(const uint8_t *data, uint32_t len) { @@ -156,18 +147,32 @@ static void prv_health_metric_msg_callback(const uint8_t *data, uint32_t len) { } const int32_t value = (int32_t)ntohl(hdr->value); - PBL_LOG_DBG("Got health metric msg: metric: %d, value: %"PRId32, hdr->metric, value); + PBL_LOG_DBG("Got health metric msg: metric: %d, value: %" PRId32, hdr->metric, value); #if !defined(CONFIG_RECOVERY_FW) ActivityMetric metric; switch (hdr->metric) { - case QemuHealthMetric_Steps: metric = ActivityMetricStepCount; break; - case QemuHealthMetric_ActiveSeconds: metric = ActivityMetricActiveSeconds; break; - case QemuHealthMetric_RestingCalories: metric = ActivityMetricRestingKCalories; break; - case QemuHealthMetric_ActiveCalories: metric = ActivityMetricActiveKCalories; break; - case QemuHealthMetric_DistanceMeters: metric = ActivityMetricDistanceMeters; break; - case QemuHealthMetric_SleepTotalSeconds: metric = ActivityMetricSleepTotalSeconds; break; - case QemuHealthMetric_SleepRestfulSeconds: metric = ActivityMetricSleepRestfulSeconds; break; + case QemuHealthMetric_Steps: + metric = ActivityMetricStepCount; + break; + case QemuHealthMetric_ActiveSeconds: + metric = ActivityMetricActiveSeconds; + break; + case QemuHealthMetric_RestingCalories: + metric = ActivityMetricRestingKCalories; + break; + case QemuHealthMetric_ActiveCalories: + metric = ActivityMetricActiveKCalories; + break; + case QemuHealthMetric_DistanceMeters: + metric = ActivityMetricDistanceMeters; + break; + case QemuHealthMetric_SleepTotalSeconds: + metric = ActivityMetricSleepTotalSeconds; + break; + case QemuHealthMetric_SleepRestfulSeconds: + metric = ActivityMetricSleepRestfulSeconds; + break; default: PBL_LOG_WRN("Unknown health metric: %d", hdr->metric); return; @@ -176,7 +181,6 @@ static void prv_health_metric_msg_callback(const uint8_t *data, uint32_t len) { #endif } - // ----------------------------------------------------------------------------------------- // Handle incoming heart rate data (QemuProtocol_HeartRate) static void prv_heart_rate_msg_callback(const uint8_t *data, uint32_t len) { @@ -189,9 +193,9 @@ static void prv_heart_rate_msg_callback(const uint8_t *data, uint32_t len) { PBL_LOG_DBG("Got heart rate msg: bpm: %d, quality: %d", hdr->bpm, hdr->quality); #if defined(CONFIG_HRM) HRMData hrm_data = { - .features = HRMFeature_BPM, - .hrm_bpm = hdr->bpm, - .hrm_quality = (HRMQuality)hdr->quality, + .features = HRMFeature_BPM, + .hrm_bpm = hdr->bpm, + .hrm_quality = (HRMQuality)hdr->quality, }; hrm_manager_new_data_cb(&hrm_data); #else @@ -199,31 +203,29 @@ static void prv_heart_rate_msg_callback(const uint8_t *data, uint32_t len) { #endif } - // ----------------------------------------------------------------------------------------- // List of incoming message handlers static const QemuMessageHandler s_qemu_endpoints[] = { - // IMPORTANT: These must be in sorted order!! - { QemuProtocol_SPP, qemu_transport_handle_received_data }, - { QemuProtocol_Tap, prv_tap_msg_callback }, - { QemuProtocol_BluetoothConnection, prv_bluetooth_connection_msg_callback }, - { QemuProtocol_Compass, prv_compass_msg_callback }, - { QemuProtocol_Battery, qemu_battery_msg_callback }, - { QemuProtocol_Accel, qemu_accel_msg_callback }, - { QemuProtocol_TimeFormat, prv_time_format_msg_callback }, - { QemuProtocol_TimelinePeek, prv_timeline_peek_msg_callback }, - { QemuProtocol_ContentSize, prv_content_size_msg_callback }, - { QemuProtocol_HealthMetric, prv_health_metric_msg_callback }, - { QemuProtocol_HeartRate, prv_heart_rate_msg_callback }, - // Button messages are handled by QEMU directly + // IMPORTANT: These must be in sorted order!! + {QemuProtocol_SPP, qemu_transport_handle_received_data}, + {QemuProtocol_Tap, prv_tap_msg_callback}, + {QemuProtocol_BluetoothConnection, prv_bluetooth_connection_msg_callback}, + {QemuProtocol_Compass, prv_compass_msg_callback}, + {QemuProtocol_Battery, qemu_battery_msg_callback}, + {QemuProtocol_Accel, qemu_accel_msg_callback}, + {QemuProtocol_TimeFormat, prv_time_format_msg_callback}, + {QemuProtocol_TimelinePeek, prv_timeline_peek_msg_callback}, + {QemuProtocol_ContentSize, prv_content_size_msg_callback}, + {QemuProtocol_HealthMetric, prv_health_metric_msg_callback}, + {QemuProtocol_HeartRate, prv_heart_rate_msg_callback}, + // Button messages are handled by QEMU directly }; - // ----------------------------------------------------------------------------------------- // Find handler from s_qemu_endpoints for a given protocol -static const QemuMessageHandler* prv_find_handler(uint16_t protocol_id) { +static const QemuMessageHandler *prv_find_handler(uint16_t protocol_id) { for (size_t i = 0; i < ARRAY_LENGTH(s_qemu_endpoints); ++i) { - const QemuMessageHandler* handler = &s_qemu_endpoints[i]; + const QemuMessageHandler *handler = &s_qemu_endpoints[i]; if (!handler || handler->protocol_id > protocol_id) { break; } @@ -236,7 +238,6 @@ static const QemuMessageHandler* prv_find_handler(uint16_t protocol_id) { return NULL; } - // ----------------------------------------------------------------------------------------- void qemu_serial_init(void) { // Init our state variables @@ -251,7 +252,6 @@ void qemu_serial_init(void) { uart_set_rx_interrupt_enabled(QEMU_UART, true); } - // ----------------------------------------------------------------------------------------- // KernelMain callback triggered by our ISR handler when we detect a high water mark on our // receive buffer or a footer signature @@ -279,9 +279,8 @@ static void prv_process_receive_buffer(void *context) { } // Dispatch the received message - PBL_LOG_DBG("Dispatching msg of len %"PRIu32" for protocol %d", msg_bytes, - protocol); - const QemuMessageHandler* handler = prv_find_handler(protocol); + PBL_LOG_DBG("Dispatching msg of len %" PRIu32 " for protocol %d", msg_bytes, protocol); + const QemuMessageHandler *handler = prv_find_handler(protocol); if (!handler) { PBL_LOG_WRN("No handler for protocol: %d", protocol); } else { @@ -290,7 +289,6 @@ static void prv_process_receive_buffer(void *context) { } } - // ----------------------------------------------------------------------------------------- static bool prv_uart_irq_handler(UARTDevice *dev, uint8_t byte, const UARTRXErrorFlags *err_flags) { // The interrupt triggers when a byte has been read from the UART. QEMU's @@ -302,8 +300,8 @@ static bool prv_uart_irq_handler(UARTDevice *dev, uint8_t byte, const UARTRXErro // Add to circular buffer. It's safe to assume that the buffer has space // remaining as the RX interrupt will be disabled from the time the buffer // fills up until when the buffer is drained. - bool success = shared_circular_buffer_write(&s_qemu_state.isr_buffer, &byte, 1, - false/*advance_slackers*/); + bool success = + shared_circular_buffer_write(&s_qemu_state.isr_buffer, &byte, 1, false /*advance_slackers*/); if (!success) { PBL_LOG_ERR("ISR buf too small 0x%x", byte); s_qemu_state.recv_error_count++; @@ -326,11 +324,8 @@ static bool prv_uart_irq_handler(UARTDevice *dev, uint8_t byte, const UARTRXErro if (!s_qemu_state.callback_pending) { s_qemu_state.callback_pending = true; PebbleEvent e = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = prv_process_receive_buffer, - .data = NULL - } + .type = PEBBLE_CALLBACK_EVENT, + .callback = {.callback = prv_process_receive_buffer, .data = NULL} }; should_context_switch = event_put_isr(&e); } @@ -341,7 +336,6 @@ static bool prv_uart_irq_handler(UARTDevice *dev, uint8_t byte, const UARTRXErro return should_context_switch; } - // ----------------------------------------------------------------------------------------- static void prv_send(const uint8_t *data, uint32_t len) { PBL_LOG_VERBOSE("Sending data:"); @@ -353,7 +347,6 @@ static void prv_send(const uint8_t *data, uint32_t len) { uart_wait_for_tx_complete(QEMU_UART); } - // ----------------------------------------------------------------------------------------- void qemu_serial_send(QemuProtocol protocol, const uint8_t *data, uint32_t len) { if (!s_qemu_state.initialized) { @@ -363,10 +356,10 @@ void qemu_serial_send(QemuProtocol protocol, const uint8_t *data, uint32_t len) pbl_mutex_lock(&s_qemu_state.qemu_comm_lock, PBL_FOREVER); // Send the header - QemuCommChannelHdr hdr = (QemuCommChannelHdr) { - .signature = htons(QEMU_HEADER_SIGNATURE), - .protocol = htons(protocol), - .len = htons(len) + QemuCommChannelHdr hdr = (QemuCommChannelHdr){ + .signature = htons(QEMU_HEADER_SIGNATURE), + .protocol = htons(protocol), + .len = htons(len) }; prv_send((uint8_t *)&hdr, sizeof(hdr)); @@ -374,9 +367,7 @@ void qemu_serial_send(QemuProtocol protocol, const uint8_t *data, uint32_t len) prv_send(data, len); // Send the footer - QemuCommChannelFooter footer = (QemuCommChannelFooter) { - .signature = htons(QEMU_FOOTER_SIGNATURE) - }; + QemuCommChannelFooter footer = (QemuCommChannelFooter){.signature = htons(QEMU_FOOTER_SIGNATURE)}; prv_send((uint8_t *)&footer, sizeof(footer)); pbl_mutex_unlock(&s_qemu_state.qemu_comm_lock); diff --git a/src/fw/drivers/qemu/qemu_serial_util.c b/src/fw/drivers/qemu/qemu_serial_util.c index 520ce60029..5367e13042 100644 --- a/src/fw/drivers/qemu/qemu_serial_util.c +++ b/src/fw/drivers/qemu/qemu_serial_util.c @@ -13,9 +13,7 @@ #include "util/net.h" // ----------------------------------------------------------------------------------------- -void qemu_serial_private_init_state(QemuSerialGlobals *state) -{ - +void qemu_serial_private_init_state(QemuSerialGlobals *state) { // Create our mutex pbl_mutex_init(&state->qemu_comm_lock); state->initialized = true; @@ -23,16 +21,14 @@ void qemu_serial_private_init_state(QemuSerialGlobals *state) // Allocate buffer for received characters from the ISR uint32_t buffer_size = QEMU_ISR_RECV_BUFFER_SIZE; uint8_t *buffer_data = kernel_malloc_check(buffer_size); - shared_circular_buffer_init(&state->isr_buffer, buffer_data, buffer_size); + shared_circular_buffer_init(&state->isr_buffer, buffer_data, buffer_size); shared_circular_buffer_add_client(&state->isr_buffer, &state->isr_buffer_client); // Allocate buffer for the received message state->msg_buffer = kernel_malloc_check(QEMU_MAX_DATA_LEN); state->msg_buffer_bytes = 0; - } - // ----------------------------------------------------------------------------------------- // Helper function triggered by our ISR handler when we detect a high water mark on our receive // buffer or a footer signature. @@ -47,16 +43,16 @@ void qemu_serial_private_init_state(QemuSerialGlobals *state) // @param[out] *protocol protocol for the message // @return pointer to message, or NULL if no message available yet uint8_t *qemu_serial_private_assemble_message(QemuSerialGlobals *state, uint32_t *msg_bytes, - uint16_t *protocol) { + uint16_t *protocol) { uint16_t bytes_read; uint8_t byte; bool exit = false; bool got_msg = false; - time_t cur_time = rtc_get_time(); + time_t cur_time = rtc_get_time(); // Reset our state if too much time has passed since we detected start of a packet - if (state->recv_state != QemuRecvState_WaitingHdrSignatureMSB - && cur_time > state->start_recv_packet_time + QEMU_RECV_PACKET_TIMEOUT_SEC) { + if (state->recv_state != QemuRecvState_WaitingHdrSignatureMSB && + cur_time > state->start_recv_packet_time + QEMU_RECV_PACKET_TIMEOUT_SEC) { state->recv_state = QemuRecvState_WaitingHdrSignatureMSB; PBL_LOG_WRN("Resetting receive state - max packet time expired"); } @@ -64,34 +60,32 @@ uint8_t *qemu_serial_private_assemble_message(QemuSerialGlobals *state, uint32_t state->callback_pending = false; uint16_t bytes_avail = shared_circular_buffer_get_read_space_remaining(&state->isr_buffer, - &state->isr_buffer_client); - PBL_LOG_VERBOSE("prv_assemble_packet, state:%d, bytes:%d", state->recv_state, - bytes_avail); + &state->isr_buffer_client); + PBL_LOG_VERBOSE("prv_assemble_packet, state:%d, bytes:%d", state->recv_state, bytes_avail); // Log message if we detected any receive errors if (state->recv_error_count) { - PBL_LOG_ERR("%"PRIu32" receive errors detected", state->recv_error_count); + PBL_LOG_ERR("%" PRIu32 " receive errors detected", state->recv_error_count); state->recv_error_count = 0; } while (!exit && bytes_avail) { switch (state->recv_state) { - case QemuRecvState_WaitingHdrSignatureMSB: { + case QemuRecvState_WaitingHdrSignatureMSB: { state->msg_buffer_bytes = 0; shared_circular_buffer_read_consume(&state->isr_buffer, &state->isr_buffer_client, 1, &byte, - &bytes_read); + &bytes_read); bytes_avail -= bytes_read; if (byte == QEMU_HEADER_MSB) { PBL_LOG_VERBOSE("got header signature MSB"); state->recv_state = QemuRecvState_WaitingHdrSignatureLSB; state->start_recv_packet_time = cur_time; } - } - break; + } break; - case QemuRecvState_WaitingHdrSignatureLSB: { + case QemuRecvState_WaitingHdrSignatureLSB: { shared_circular_buffer_read_consume(&state->isr_buffer, &state->isr_buffer_client, 1, &byte, - &bytes_read); + &bytes_read); bytes_avail -= bytes_read; if (byte == QEMU_HEADER_LSB) { state->recv_state = QemuRecvState_WaitingHdr; @@ -99,10 +93,9 @@ uint8_t *qemu_serial_private_assemble_message(QemuSerialGlobals *state, uint32_t } else { state->recv_state = QemuRecvState_WaitingHdr; } - } - break; + } break; - case QemuRecvState_WaitingHdr: { + case QemuRecvState_WaitingHdr: { // We already read in the header signature uint16_t req_bytes = sizeof(state->hdr) - sizeof(state->hdr.signature); if (bytes_avail < req_bytes) { @@ -110,7 +103,8 @@ uint8_t *qemu_serial_private_assemble_message(QemuSerialGlobals *state, uint32_t break; } shared_circular_buffer_read_consume(&state->isr_buffer, &state->isr_buffer_client, - req_bytes, (uint8_t *)&state->hdr.protocol, &bytes_read); + req_bytes, (uint8_t *)&state->hdr.protocol, + &bytes_read); bytes_avail -= bytes_read; // Do byte swapping @@ -126,14 +120,13 @@ uint8_t *qemu_serial_private_assemble_message(QemuSerialGlobals *state, uint32_t PBL_LOG_VERBOSE("got header: protocol: %d, len: %d", state->hdr.protocol, state->hdr.len); state->recv_state = QemuRecvState_WaitingData; } - } - break; + } break; case QemuRecvState_WaitingData: { uint16_t bytes_needed = state->hdr.len - state->msg_buffer_bytes; - shared_circular_buffer_read_consume(&state->isr_buffer, &state->isr_buffer_client, - MIN(bytes_avail, bytes_needed), state->msg_buffer + state->msg_buffer_bytes, - &bytes_read); + shared_circular_buffer_read_consume( + &state->isr_buffer, &state->isr_buffer_client, MIN(bytes_avail, bytes_needed), + state->msg_buffer + state->msg_buffer_bytes, &bytes_read); state->msg_buffer_bytes += bytes_read; bytes_avail -= bytes_read; @@ -146,8 +139,7 @@ uint8_t *qemu_serial_private_assemble_message(QemuSerialGlobals *state, uint32_t got_msg = true; exit = true; } - } - break; + } break; case QemuRecvState_WaitingFooter: { QemuCommChannelFooter footer; @@ -155,7 +147,7 @@ uint8_t *qemu_serial_private_assemble_message(QemuSerialGlobals *state, uint32_t exit = true; } else { shared_circular_buffer_read_consume(&state->isr_buffer, &state->isr_buffer_client, - sizeof(footer), (uint8_t *)&footer, &bytes_read); + sizeof(footer), (uint8_t *)&footer, &bytes_read); bytes_avail -= bytes_read; footer.signature = ntohs(footer.signature); if (footer.signature != QEMU_FOOTER_SIGNATURE) { @@ -163,14 +155,13 @@ uint8_t *qemu_serial_private_assemble_message(QemuSerialGlobals *state, uint32_t } state->recv_state = QemuRecvState_WaitingHdrSignatureMSB; } - } - break; - } // switch() - } // while (!exit && bytes_avail) + } break; + } // switch() + } // while (!exit && bytes_avail) // Return pointer if we got a complete message if (got_msg) { - *msg_bytes= state->msg_buffer_bytes; + *msg_bytes = state->msg_buffer_bytes; *protocol = state->hdr.protocol; return state->msg_buffer; } else { @@ -178,8 +169,6 @@ uint8_t *qemu_serial_private_assemble_message(QemuSerialGlobals *state, uint32_t } } - - // ------------------------------------------------------------------------------------------ // Unit test support diff --git a/src/fw/drivers/qemu/qemu_settings.c b/src/fw/drivers/qemu/qemu_settings.c index a22ce29b2c..49f63ed7f9 100644 --- a/src/fw/drivers/qemu/qemu_settings.c +++ b/src/fw/drivers/qemu/qemu_settings.c @@ -14,9 +14,9 @@ // QEMU backup registers and bit indices. These are also defined in the qemu project in // hw/arm/pebble.c -#define QEMU_REG_0_FIRST_BOOT_LOGIC_ENABLE 0x00000001 -#define QEMU_REG_0_DEFAULT_CONNECTED 0x00000002 -#define QEMU_REG_0_DEFAULT_PLUGGED_IN 0x00000004 +#define QEMU_REG_0_FIRST_BOOT_LOGIC_ENABLE 0x00000001 +#define QEMU_REG_0_DEFAULT_CONNECTED 0x00000002 +#define QEMU_REG_0_DEFAULT_PLUGGED_IN 0x00000004 // ------------------------------------------------------------------------------------- // Read a QEMU specific register from the RTC backup register area @@ -27,7 +27,7 @@ static uint32_t prv_rtc_read_qemu_register(uint32_t qemu_register) { __IO uint32_t tmp = 0; // The first qemu_register (0) starts 1 past the implemented registers in the STM - uint32_t backup_reg = RTC_BKP_DR19 + 1 + qemu_register; + uint32_t backup_reg = RTC_BKP_DR19 + 1 + qemu_register; tmp = RTC_BASE + 0x50; tmp += (backup_reg * 4); @@ -37,7 +37,6 @@ static uint32_t prv_rtc_read_qemu_register(uint32_t qemu_register) { #endif } - // ------------------------------------------------------------------------------------- // Return the value of a QEMU setting. QEMU communicates these by setting values into an // unused area of the RTC registers, what would be RTC_BKP20R on up. diff --git a/src/fw/drivers/qemu/qemu_touch.c b/src/fw/drivers/qemu/qemu_touch.c index 33efe1be7a..efdae4160b 100644 --- a/src/fw/drivers/qemu/qemu_touch.c +++ b/src/fw/drivers/qemu/qemu_touch.c @@ -13,11 +13,11 @@ #define REG32(addr) (*(volatile uint32_t *)(addr)) // QEMU touch register offsets (must match pebble-touch device) -#define TOUCH_STATE 0x00 -#define TOUCH_X 0x04 -#define TOUCH_Y 0x08 -#define TOUCH_INTCTRL 0x0C -#define TOUCH_INTSTAT 0x10 +#define TOUCH_STATE 0x00 +#define TOUCH_X 0x04 +#define TOUCH_Y 0x08 +#define TOUCH_INTCTRL 0x0C +#define TOUCH_INTSTAT 0x10 #define INT_TOUCH_EVENT (1u << 0) @@ -43,8 +43,7 @@ void TOUCH_IRQHandler(void) { bool should_context_switch = false; if (!s_callback_scheduled) { - if (system_task_add_callback_from_isr(prv_process_touch_update, NULL, - &should_context_switch)) { + if (system_task_add_callback_from_isr(prv_process_touch_update, NULL, &should_context_switch)) { s_callback_scheduled = true; } } diff --git a/src/fw/drivers/qemu/qemu_vibe.c b/src/fw/drivers/qemu/qemu_vibe.c index b268bcd4d1..e08f3d4ce0 100644 --- a/src/fw/drivers/qemu/qemu_vibe.c +++ b/src/fw/drivers/qemu/qemu_vibe.c @@ -26,11 +26,9 @@ void vibe_ctl(bool on) { // Notify QEMU host of vibration state change QemuProtocolVibrationNotificationHeader notification = { - .on = on ? 1 : 0, + .on = on ? 1 : 0, }; - qemu_serial_send(QemuProtocol_Vibration, - (const uint8_t *)¬ification, - sizeof(notification)); + qemu_serial_send(QemuProtocol_Vibration, (const uint8_t *)¬ification, sizeof(notification)); } void vibe_force_off(void) { diff --git a/src/fw/drivers/rtc/nrf5.c b/src/fw/drivers/rtc/nrf5.c index 0eb09ca307..6a24ebf136 100644 --- a/src/fw/drivers/rtc/nrf5.c +++ b/src/fw/drivers/rtc/nrf5.c @@ -72,7 +72,7 @@ static void prv_check_and_handle_rollover(RtcIntervalTicks rtc_ticks) { // nRF5, this is 0xFFFFFF; that's only 4.5 hours (at 1.024 kHz), // compared to STM32's available SECONDS_IN_A_DAY. Sucks for us; oh // well. - + s_coarse_ticks += TICKS_IN_AN_INTERVAL; save_needed = true; @@ -113,12 +113,13 @@ RtcTicks rtc_get_ticks(void) { * Logic associated with converting extended RTC ticks to wall clock time. */ -//! This variable is a UNIX timestamp of what the current wall clock time was at tick s_time_tick_base. +//! This variable is a UNIX timestamp of what the current wall clock time was at tick +//! s_time_tick_base. static time_t s_time_base = 0; -//! This variable is the tick where the wall clock time was equal to s_time_base. If you subtract this variable -//! from the current tick count, you'll get the number of ticks that have elapsed since s_time_base, which will -//! allow you to calculate the current wall clock time. Note that this value may be negative on startup, see -//! prv_restore_rtc_time_state +//! This variable is the tick where the wall clock time was equal to s_time_base. If you subtract +//! this variable from the current tick count, you'll get the number of ticks that have elapsed +//! since s_time_base, which will allow you to calculate the current wall clock time. Note that this +//! value may be negative on startup, see prv_restore_rtc_time_state static int64_t s_time_tick_base = 0; static time_t prv_ticks_to_time(RtcTicks ticks) { @@ -136,7 +137,7 @@ time_t rtc_get_time(void) { return prv_ticks_to_time(rtc_get_ticks()); } -void rtc_get_time_ms(time_t* out_seconds, uint16_t* out_ms) { +void rtc_get_time_ms(time_t *out_seconds, uint16_t *out_ms) { RtcTicks ticks = rtc_get_ticks(); RtcTicks ticks_since_time_base = (ticks - s_time_tick_base); @@ -163,7 +164,8 @@ static void prv_restore_rtc_time_state(void) { s_time_tick_base = 0; } else { RtcIntervalTicks current_ticks = prv_get_rtc_interval_ticks(); - const int32_t ticks_since_last_save = prv_elapsed_ticks(last_save_time_ticks * RTC_TICKS_HZ, current_ticks); + const int32_t ticks_since_last_save = + prv_elapsed_ticks(last_save_time_ticks * RTC_TICKS_HZ, current_ticks); s_time_base = last_save_time + (ticks_since_last_save / RTC_TICKS_HZ); s_time_tick_base = -(((int64_t)current_ticks) % RTC_TICKS_HZ); } @@ -184,9 +186,11 @@ static void prv_save_rtc_time_state(RtcIntervalTicks current_rtc_ticks) { } // Floor it to the latest second - const RtcIntervalTicks current_rtc_ticks_at_second = (current_rtc_ticks / RTC_TICKS_HZ) * RTC_TICKS_HZ; + const RtcIntervalTicks current_rtc_ticks_at_second = + (current_rtc_ticks / RTC_TICKS_HZ) * RTC_TICKS_HZ; - prv_save_rtc_time_state_exact(current_rtc_ticks_at_second, prv_ticks_to_time(s_coarse_ticks + current_rtc_ticks)); + prv_save_rtc_time_state_exact(current_rtc_ticks_at_second, + prv_ticks_to_time(s_coarse_ticks + current_rtc_ticks)); } /*** Logic that ought be refactored into rtc_common, were it not stm32-only. ***/ @@ -217,7 +221,7 @@ bool rtc_sanitize_time_t(time_t *t) { return result; } -void rtc_get_time_tm(struct tm* time_tm) { +void rtc_get_time_tm(struct tm *time_tm) { time_t t = rtc_get_time(); localtime_r(&t, time_tm); } @@ -238,9 +242,9 @@ const char *time_t_to_string(char *buffer, time_t t) { //! We attempt to save registers by placing both the timezone abbreviation //! timezone index and the daylight_savings_time into the same register set void rtc_set_timezone(TimezoneInfo *tzinfo) { - uint32_t *raw = (uint32_t*)tzinfo; + uint32_t *raw = (uint32_t *)tzinfo; _Static_assert(sizeof(TimezoneInfo) <= 5 * sizeof(uint32_t), - "RTC Set Timezone invalid data size"); + "RTC Set Timezone invalid data size"); retained_write(RTC_TIMEZONE_ABBR_START, raw[0]); retained_write(RTC_TIMEZONE_ABBR_END_TZID_DSTID, raw[1]); @@ -250,7 +254,7 @@ void rtc_set_timezone(TimezoneInfo *tzinfo) { } void rtc_get_timezone(TimezoneInfo *tzinfo) { - uint32_t *raw = (uint32_t*)tzinfo; + uint32_t *raw = (uint32_t *)tzinfo; raw[0] = retained_read(RTC_TIMEZONE_ABBR_START); raw[1] = retained_read(RTC_TIMEZONE_ABBR_END_TZID_DSTID); @@ -329,7 +333,7 @@ void rtc_init(void) { uint32_t iters = 0; while (nrf_rtc_counter_get(BOARD_RTC_INST) != ctr0) iters++; - PBL_LOG_INFO("RTC: 100 RTC ticks took %"PRIu32" iters", iters); + PBL_LOG_INFO("RTC: 100 RTC ticks took %" PRIu32 " iters", iters); } #endif } @@ -367,7 +371,10 @@ static void prv_rtc_resync_timer_callback() { } void rtc_init_timers(void) { - static RegularTimerInfo rtc_sync_timer = { .list_node = { 0, 0 }, .cb = prv_rtc_resync_timer_callback}; + static RegularTimerInfo rtc_sync_timer = { + .list_node = {0, 0}, + .cb = prv_rtc_resync_timer_callback + }; regular_timer_add_minutes_callback(&rtc_sync_timer); } @@ -385,19 +392,19 @@ void rtc_alarm_init(void) { void rtc_alarm_set(RtcTicks num_ticks) { PBL_ASSERTN(s_tick_alarm_initialized); - + nrf_rtc_event_disable(BOARD_RTC_INST, NRF_RTC_EVENT_COMPARE_0); nrf_rtc_event_clear(BOARD_RTC_INST, NRF_RTC_EVENT_COMPARE_0); - + s_alarm_set_time = rtc_get_ticks(); s_alarm_expiry_time = s_alarm_set_time + num_ticks - 1; - + /* We're bounded by the regular_timer_add_minutes_callback for the * rtc_alarm_set, so we're not going to wrap around more than once -- one * minute is always less than 4.5 hours. */ nrf_rtc_cc_set(BOARD_RTC_INST, 0, s_alarm_expiry_time & RTC_COUNTER_COUNTER_Msk); - + nrf_rtc_event_enable(BOARD_RTC_INST, NRF_RTC_EVENT_COMPARE_0); nrf_rtc_int_enable(BOARD_RTC_INST, NRF_RTC_INT_COMPARE0_MASK); } diff --git a/src/fw/drivers/rtc/sf32lb.c b/src/fw/drivers/rtc/sf32lb.c index b6631b18fc..5e723125ea 100644 --- a/src/fw/drivers/rtc/sf32lb.c +++ b/src/fw/drivers/rtc/sf32lb.c @@ -69,14 +69,13 @@ static void prv_rtc_set_time_no_cal_reset(time_t time); #endif static RTC_HandleTypeDef RTC_Handler = { - .Instance = (RTC_TypeDef*)RTC_BASE, - .Init = - { - .HourFormat = RTC_HOURFORMAT_24, - .DivAInt = DIV_A_INT, - .DivAFrac = DIV_A_FRAC, - .DivB = DIV_B, - }, + .Instance = (RTC_TypeDef *)RTC_BASE, + .Init = { + .HourFormat = RTC_HOURFORMAT_24, + .DivAInt = DIV_A_INT, + .DivAFrac = DIV_A_FRAC, + .DivB = DIV_B, + }, }; static bool s_initialized = false; @@ -95,7 +94,7 @@ static uint32_t prv_rtc_get_lpcycle() { return value; } -void prv_rtc_rc10_calculate_div(RTC_HandleTypeDef* hdl, uint32_t value) { +void prv_rtc_rc10_calculate_div(RTC_HandleTypeDef *hdl, uint32_t value) { hdl->Init.DivB = RC10K_SUB_SEC_DIVB; // 1 seconds has total 1/(x/(48*8))/256=1.5M/x cycles, times 2^14 for DIVA @@ -115,7 +114,7 @@ static void prv_rtc_reconfig() { PBL_ASSERTN(ret == HAL_OK); } -static void prv_rtc_cal_timer_cb(void* data) { +static void prv_rtc_cal_timer_cb(void *data) { if (s_rtc_cycle_count_init == 0) { uint16_t sub; time_t t; @@ -155,7 +154,7 @@ static void prv_rtc_cal_timer_cb(void* data) { if (s_delta_total > MAX_REASONABLE_CORRECTION_SECS || s_delta_total < -MAX_REASONABLE_CORRECTION_SECS) { PBL_LOG_WRN("RTC calibration: delta_sum=%d exceeds max, resetting calibration state", - (int)(s_delta_total * 1000)); + (int)(s_delta_total * 1000)); prv_reset_calibration_state(); return; } @@ -182,11 +181,10 @@ static void prv_rtc_cal_timer_cb(void* data) { } PBL_LOG_DBG("origin: f=%dHz,cycle=%d avr: f=%dHz cycle_ave=%d delta=%d, delta_sum=%d\n", - (int)(48000000ULL * HAL_RC_CAL_GetLPCycle() / s_rtc_cycle_count_init), - (int)s_rtc_cycle_count_init, - (int)(48000000ULL * HAL_RC_CAL_GetLPCycle() / ref_cycle), - (int)ref_cycle, - (int)(delta * 1000), (int)(s_delta_total * 1000)); + (int)(48000000ULL * HAL_RC_CAL_GetLPCycle() / s_rtc_cycle_count_init), + (int)s_rtc_cycle_count_init, + (int)(48000000ULL * HAL_RC_CAL_GetLPCycle() / ref_cycle), (int)ref_cycle, + (int)(delta * 1000), (int)(s_delta_total * 1000)); } } #endif @@ -207,7 +205,8 @@ void rtc_init(void) { s_initialized = true; } -void rtc_init_timers(void) {} +void rtc_init_timers(void) { +} static RtcTicks get_ticks(void) { static pbl_tick_t s_last_freertos_tick_count = 0; @@ -261,12 +260,12 @@ static void prv_rtc_set_time_no_cal_reset(time_t time) { int32_t time_delta = (int32_t)(time - old_time); if (time_delta != 0) { PebbleEvent e = { - .type = PEBBLE_SET_TIME_EVENT, - .set_time_info = { - .utc_time_delta = time_delta, - .gmt_offset_delta = 0, - .dst_changed = false, - } + .type = PEBBLE_SET_TIME_EVENT, + .set_time_info = { + .utc_time_delta = time_delta, + .gmt_offset_delta = 0, + .dst_changed = false, + } }; event_put(&e); } @@ -282,12 +281,12 @@ void rtc_set_time(time_t time) { prv_rtc_set_time_no_cal_reset(time); } -void rtc_get_time_ms(time_t* out_seconds, uint16_t* out_ms) { +void rtc_get_time_ms(time_t *out_seconds, uint16_t *out_ms) { RTC_DateTypeDef rtc_date; RTC_TimeTypeDef rtc_time; if (s_initialized) { - while((RTC_Handler.Instance->ISR & RTC_ISR_RSF) == (uint32_t)RESET) { + while ((RTC_Handler.Instance->ISR & RTC_ISR_RSF) == (uint32_t)RESET) { // Wait for RTC registers to synchronize } } @@ -327,9 +326,11 @@ RtcTicks rtc_get_ticks(void) { return get_ticks(); } -void rtc_alarm_init(void) {} +void rtc_alarm_init(void) { +} -void rtc_alarm_set(RtcTicks num_ticks) {} +void rtc_alarm_set(RtcTicks num_ticks) { +} RtcTicks rtc_alarm_get_elapsed_ticks(void) { return 0; @@ -339,7 +340,7 @@ bool rtc_alarm_is_initialized(void) { return true; } -bool rtc_sanitize_struct_tm(struct tm* t) { +bool rtc_sanitize_struct_tm(struct tm *t) { // These values come from time_t (which suffers from the 2038 problem) and our hardware which // only stores a 2 digit year, so we only represent values after 2000. @@ -355,7 +356,7 @@ bool rtc_sanitize_struct_tm(struct tm* t) { return false; } -bool rtc_sanitize_time_t(time_t* t) { +bool rtc_sanitize_time_t(time_t *t) { struct tm time_struct; gmtime_r(t, &time_struct); @@ -365,16 +366,16 @@ bool rtc_sanitize_time_t(time_t* t) { return result; } -void rtc_get_time_tm(struct tm* time_tm) { +void rtc_get_time_tm(struct tm *time_tm) { time_t t = rtc_get_time(); localtime_r(&t, time_tm); } -const char* rtc_get_time_string(char* buffer) { +const char *rtc_get_time_string(char *buffer) { return time_t_to_string(buffer, rtc_get_time()); } -const char* time_t_to_string(char* buffer, time_t t) { +const char *time_t_to_string(char *buffer, time_t t) { struct tm time; localtime_r(&t, &time); @@ -388,40 +389,41 @@ const char* time_t_to_string(char* buffer, time_t t) { //! Versioned storage structure for timezone info in flash //! This allows for future migrations and avoids struct alignment issues typedef struct __attribute__((packed)) { - uint8_t version; // Version number for future migrations - char tm_zone[TZ_LEN - 1]; // Up to 5 character timezone abbreviation - uint8_t dst_id; // Daylight savings time zone index - int16_t timezone_id; // Olson index of timezone - int32_t tm_gmtoff; // GMT time offset - time_t dst_start; // Timestamp of start of DST period (0 if none) - time_t dst_end; // Timestamp of end of DST period (0 if none) + uint8_t version; // Version number for future migrations + char tm_zone[TZ_LEN - 1]; // Up to 5 character timezone abbreviation + uint8_t dst_id; // Daylight savings time zone index + int16_t timezone_id; // Olson index of timezone + int32_t tm_gmtoff; // GMT time offset + time_t dst_start; // Timestamp of start of DST period (0 if none) + time_t dst_end; // Timestamp of end of DST period (0 if none) } TzinfoFlashStorage; #define TZINFO_VERSION 1 -void rtc_set_timezone(TimezoneInfo* tzinfo) { +void rtc_set_timezone(TimezoneInfo *tzinfo) { _Static_assert(sizeof(TzinfoFlashStorage) <= SUBSECTOR_SIZE_BYTES, - "TzinfoFlashStorage must fit in TZINFO flash region (4KB)"); + "TzinfoFlashStorage must fit in TZINFO flash region (4KB)"); // Copy to versioned buffer TzinfoFlashStorage storage = { - .version = TZINFO_VERSION, - .dst_id = tzinfo->dst_id, - .timezone_id = tzinfo->timezone_id, - .tm_gmtoff = tzinfo->tm_gmtoff, - .dst_start = tzinfo->dst_start, - .dst_end = tzinfo->dst_end, + .version = TZINFO_VERSION, + .dst_id = tzinfo->dst_id, + .timezone_id = tzinfo->timezone_id, + .tm_gmtoff = tzinfo->tm_gmtoff, + .dst_start = tzinfo->dst_start, + .dst_end = tzinfo->dst_end, }; memcpy(storage.tm_zone, tzinfo->tm_zone, TZ_LEN - 1); flash_erase_subsector_blocking(FLASH_REGION_TZINFO_BEGIN); - flash_write_bytes((const uint8_t*)&storage, FLASH_REGION_TZINFO_BEGIN, sizeof(TzinfoFlashStorage)); + flash_write_bytes((const uint8_t *)&storage, FLASH_REGION_TZINFO_BEGIN, + sizeof(TzinfoFlashStorage)); } -void rtc_get_timezone(TimezoneInfo* tzinfo) { +void rtc_get_timezone(TimezoneInfo *tzinfo) { TzinfoFlashStorage storage; - flash_read_bytes((uint8_t*)&storage, FLASH_REGION_TZINFO_BEGIN, sizeof(TzinfoFlashStorage)); + flash_read_bytes((uint8_t *)&storage, FLASH_REGION_TZINFO_BEGIN, sizeof(TzinfoFlashStorage)); if (storage.version != TZINFO_VERSION) { // Future versions can handle migrations here @@ -453,12 +455,13 @@ uint16_t rtc_get_timezone_id(void) { bool rtc_is_timezone_set(void) { uint8_t version; - flash_read_bytes((uint8_t*)&version, FLASH_REGION_TZINFO_BEGIN, sizeof(version)); + flash_read_bytes((uint8_t *)&version, FLASH_REGION_TZINFO_BEGIN, sizeof(version)); return version == TZINFO_VERSION; } -void rtc_enable_backup_regs(void) {} +void rtc_enable_backup_regs(void) { +} void rtc_calibrate_frequency(uint32_t frequency) { #ifndef SF32LB52_USE_LXT @@ -467,8 +470,7 @@ void rtc_calibrate_frequency(uint32_t frequency) { s_rtc_cal_timer = new_timer_create(); PBL_ASSERTN(s_rtc_cal_timer != TIMER_INVALID_ID); - bool success = new_timer_start(s_rtc_cal_timer, RTC_CAL_PERIOD_MS, - prv_rtc_cal_timer_cb, NULL, + bool success = new_timer_start(s_rtc_cal_timer, RTC_CAL_PERIOD_MS, prv_rtc_cal_timer_cb, NULL, TIMER_START_FLAG_REPEATING); PBL_ASSERTN(success); #endif diff --git a/src/fw/drivers/sf32lb52/button.c b/src/fw/drivers/sf32lb52/button.c index 28da24514f..8a4e75a573 100644 --- a/src/fw/drivers/sf32lb52/button.c +++ b/src/fw/drivers/sf32lb52/button.c @@ -23,8 +23,8 @@ bool button_is_pressed(ButtonId id) { } const InputConfig config = { - .gpio = BOARD_CONFIG_BUTTON.buttons[id].port, - .gpio_pin = BOARD_CONFIG_BUTTON.buttons[id].pin, + .gpio = BOARD_CONFIG_BUTTON.buttons[id].port, + .gpio_pin = BOARD_CONFIG_BUTTON.buttons[id].pin, }; uint32_t bit = gpio_input_read(&config); return (BOARD_CONFIG_BUTTON.buttons[id].active_high) ? bit : !bit; @@ -41,14 +41,14 @@ uint8_t button_get_state_bits(void) { void button_init(void) { for (int i = 0; i < NUM_BUTTONS; ++i) { const InputConfig config = { - .gpio = BOARD_CONFIG_BUTTON.buttons[i].port, - .gpio_pin = BOARD_CONFIG_BUTTON.buttons[i].pin, + .gpio = BOARD_CONFIG_BUTTON.buttons[i].port, + .gpio_pin = BOARD_CONFIG_BUTTON.buttons[i].pin, }; gpio_input_init_pull_up_down(&config, BOARD_CONFIG_BUTTON.buttons[i].pull); } } -void command_button_read(const char* button_id_str) { +void command_button_read(const char *button_id_str) { int button = atoi(button_id_str); if (button < 0 || button >= NUM_BUTTONS) { diff --git a/src/fw/drivers/sf32lb52/debounced_button.c b/src/fw/drivers/sf32lb52/debounced_button.c index e168642c4e..37c060b0fc 100644 --- a/src/fw/drivers/sf32lb52/debounced_button.c +++ b/src/fw/drivers/sf32lb52/debounced_button.c @@ -14,8 +14,8 @@ #include "bf0_hal_tim.h" /* Timer period 100us, auto reload is 2ms. */ -#define TIMER_FREQUENCY_HZ 10000 -#define TIMER_PERIOD_TICKS 20 +#define TIMER_FREQUENCY_HZ 10000 +#define TIMER_PERIOD_TICKS 20 #define RESET_BUTTONS ((1 << BUTTON_ID_SELECT) | (1 << BUTTON_ID_BACK)) @@ -36,7 +36,7 @@ static void prv_timer_handler(void); static void initialize_button_timer(void) { s_tim_hdl.Instance = BOARD_CONFIG_BUTTON.timer; - s_tim_hdl.Init.Prescaler = 24000000U / (TIMER_FREQUENCY_HZ - 1); // GPTIM2 clock is 24MHz + s_tim_hdl.Init.Prescaler = 24000000U / (TIMER_FREQUENCY_HZ - 1); // GPTIM2 clock is 24MHz s_tim_hdl.core = CORE_ID_HCPU; s_tim_hdl.Init.CounterMode = GPT_COUNTERMODE_UP; s_tim_hdl.Init.RepetitionCounter = 0; @@ -46,7 +46,7 @@ static void initialize_button_timer(void) { HAL_NVIC_SetPriority(BOARD_CONFIG_BUTTON.timer_irqn, 7, 0); HAL_NVIC_EnableIRQ(BOARD_CONFIG_BUTTON.timer_irqn); - __HAL_GPT_CLEAR_FLAG(&s_tim_hdl, GPT_FLAG_UPDATE); + __HAL_GPT_CLEAR_FLAG(&s_tim_hdl, GPT_FLAG_UPDATE); __HAL_GPT_URS_ENABLE(&s_tim_hdl); __HAL_GPT_SET_MODE(&s_tim_hdl, GPT_OPMODE_REPETITIVE); } @@ -78,9 +78,9 @@ void debounced_button_init(void) { for (int i = 0; i < NUM_BUTTONS; ++i) { const ExtiConfig config = { - .peripheral = BOARD_CONFIG_BUTTON.buttons[i].port, - .gpio_pin = BOARD_CONFIG_BUTTON.buttons[i].pin, - .pull = BOARD_CONFIG_BUTTON.buttons[i].pull, + .peripheral = BOARD_CONFIG_BUTTON.buttons[i].port, + .gpio_pin = BOARD_CONFIG_BUTTON.buttons[i].pin, + .pull = BOARD_CONFIG_BUTTON.buttons[i].pull, }; exti_configure_pin(config, ExtiTrigger_RisingFalling, prv_button_interrupt_handler); exti_enable(config); @@ -93,8 +93,7 @@ void debounced_button_init(void) { } } -void debounced_button_irq_handler(GPT_TypeDef *timer) -{ +void debounced_button_irq_handler(GPT_TypeDef *timer) { if (__HAL_GPT_GET_FLAG(&s_tim_hdl, GPT_FLAG_UPDATE) != RESET) { if (__HAL_GPT_GET_IT_SOURCE(&s_tim_hdl, GPT_IT_UPDATE) != RESET) { __HAL_GPT_CLEAR_IT(&s_tim_hdl, GPT_IT_UPDATE); @@ -128,16 +127,16 @@ static void prv_timer_handler(void) { bitset32_update(&s_debounced_button_state, i, is_pressed); PebbleEvent e = { - .type = (is_pressed) ? PEBBLE_BUTTON_DOWN_EVENT : PEBBLE_BUTTON_UP_EVENT, - .button.button_id = i + .type = (is_pressed) ? PEBBLE_BUTTON_DOWN_EVENT : PEBBLE_BUTTON_UP_EVENT, + .button.button_id = i }; event_put_isr(&e); } } #if !defined(CONFIG_MFG) - // Now that s_debounced_button_state is updated, check to see if the user is holding down the reset - // combination. + // Now that s_debounced_button_state is updated, check to see if the user is holding down the + // reset combination. static uint32_t s_hard_reset_timer = 0; if ((s_debounced_button_state & RESET_BUTTONS) == RESET_BUTTONS) { s_hard_reset_timer += 1; @@ -153,8 +152,8 @@ static void prv_timer_handler(void) { } RebootReason reason = { - .code = force_prf ? RebootReasonCode_PrfResetButtonsHeld : - RebootReasonCode_ResetButtonsHeld + .code = + force_prf ? RebootReasonCode_PrfResetButtonsHeld : RebootReasonCode_ResetButtonsHeld }; reboot_reason_set(&reason); @@ -171,12 +170,11 @@ static void prv_timer_handler(void) { disable_button_timer(); __enable_irq(); } - } // Serial commands /////////////////////////////////////////////////////////// -void command_put_raw_button_event(const char* button_index, const char* is_button_down_event) { +void command_put_raw_button_event(const char *button_index, const char *is_button_down_event) { PebbleEvent e; int is_down = atoi(is_button_down_event); int button = atoi(button_index); diff --git a/src/fw/drivers/sf32lb52/mcu.c b/src/fw/drivers/sf32lb52/mcu.c index 71db2f912a..eb19d1f8b7 100644 --- a/src/fw/drivers/sf32lb52/mcu.c +++ b/src/fw/drivers/sf32lb52/mcu.c @@ -6,7 +6,7 @@ #include #define EFUSE_UID_OFFSET 0 -#define EFUSE_UID_SIZE 16 +#define EFUSE_UID_SIZE 16 StatusCode mcu_get_serial(void *buf, size_t *buf_sz) { if (*buf_sz < EFUSE_UID_SIZE) { diff --git a/src/fw/drivers/sf32lb52/qspi.c b/src/fw/drivers/sf32lb52/qspi.c index a2f66dcb13..3b67bd6e3e 100644 --- a/src/fw/drivers/sf32lb52/qspi.c +++ b/src/fw/drivers/sf32lb52/qspi.c @@ -165,7 +165,7 @@ static int prv_write_nor(QSPIFlash *dev, uint32_t addr, uint8_t *buf, uint32_t s return res; } -bool qspi_flash_check_whoami(QSPIFlash *dev) { +bool qspi_flash_check_whoami(QSPIFlash *dev) { QSPI_FLASH_CTX_T *ctx = &dev->qspi->state->ctx; uint32_t id = ctx->dev_id; @@ -173,17 +173,22 @@ bool qspi_flash_check_whoami(QSPIFlash *dev) { PBL_LOG_DBG("Flash is %s", dev->state->part->name); return true; } else { - PBL_LOG_ERR("Flash isn't expected %s (whoami: 0x%" PRIx32 ")", - dev->state->part->name, id); + PBL_LOG_ERR("Flash isn't expected %s (whoami: 0x%" PRIx32 ")", dev->state->part->name, id); return false; } } -status_t qspi_flash_write_protection_enable(QSPIFlash *dev) { return S_NO_ACTION_REQUIRED; } +status_t qspi_flash_write_protection_enable(QSPIFlash *dev) { + return S_NO_ACTION_REQUIRED; +} -status_t qspi_flash_lock_sector(QSPIFlash *dev, uint32_t addr) { return S_SUCCESS; } +status_t qspi_flash_lock_sector(QSPIFlash *dev, uint32_t addr) { + return S_SUCCESS; +} -status_t qspi_flash_unlock_all(QSPIFlash *dev) { return S_SUCCESS; } +status_t qspi_flash_unlock_all(QSPIFlash *dev) { + return S_SUCCESS; +} void qspi_flash_init(QSPIFlash *dev, QSPIFlashPart *part, bool coredump_mode) { HAL_StatusTypeDef res; @@ -201,9 +206,8 @@ void qspi_flash_init(QSPIFlash *dev, QSPIFlashPart *part, bool coredump_mode) { dev->state->part = part; dev->qspi->state->ctx.dual_mode = 1; - res = HAL_FLASH_Init(&dev->qspi->state->ctx, &dev->qspi->state->cfg, - &dev->qspi->state->hdma, &dev->qspi->state->dma, - dev->qspi->clk_div); + res = HAL_FLASH_Init(&dev->qspi->state->ctx, &dev->qspi->state->cfg, &dev->qspi->state->hdma, + &dev->qspi->state->dma, dev->qspi->clk_div); PBL_ASSERT(res == HAL_OK, "HAL_FLASH_Init failed"); @@ -271,7 +275,7 @@ status_t prv_qspi_security_register_check(QSPIFlash *dev, uint32_t addr) { for (uint8_t i = 0U; i < dev->state->part->sec_registers.num_sec_regs; ++i) { if (addr >= dev->state->part->sec_registers.sec_regs[i] && addr < dev->state->part->sec_registers.sec_regs[i] + - dev->state->part->sec_registers.sec_reg_size) { + dev->state->part->sec_registers.sec_reg_size) { addr_valid = true; break; } @@ -398,4 +402,4 @@ status_t qspi_flash_lock_security_register(QSPIFlash *dev, uint32_t addr) { return S_SUCCESS; } -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW diff --git a/src/fw/drivers/sf32lb52/rc10k.c b/src/fw/drivers/sf32lb52/rc10k.c index 11a3cd35ea..13217013bf 100644 --- a/src/fw/drivers/sf32lb52/rc10k.c +++ b/src/fw/drivers/sf32lb52/rc10k.c @@ -41,7 +41,7 @@ void rc10k_init(void) { uint32_t rc10k_get_freq_hz(void) { uint32_t hxt48_cyc; - + hxt48_cyc = HAL_RC_CAL_get_average_cycle_on_48M(); if (hxt48_cyc == 0UL) { return RC10K_DEFAULT_FREQ_HZ; @@ -57,6 +57,7 @@ uint32_t rc10k_cyc_to_milli_ticks(uint32_t rc10k_cyc) { if (hxt48_cyc == 0UL) { return (1000ULL * RTC_TICKS_HZ * rc10k_cyc) / RC10K_DEFAULT_FREQ_HZ; } else { - return (1000ULL * RTC_TICKS_HZ * rc10k_cyc * hxt48_cyc) / (48000000ULL * HAL_RC_CAL_GetLPCycle()); + return (1000ULL * RTC_TICKS_HZ * rc10k_cyc * hxt48_cyc) / + (48000000ULL * HAL_RC_CAL_GetLPCycle()); } } \ No newline at end of file diff --git a/src/fw/drivers/speaker/nrf5/da7212.c b/src/fw/drivers/speaker/nrf5/da7212.c index 1450f631d0..d22d9c7200 100644 --- a/src/fw/drivers/speaker/nrf5/da7212.c +++ b/src/fw/drivers/speaker/nrf5/da7212.c @@ -44,40 +44,40 @@ static void prv_idle_shutdown(void *data); // --------------------------------------------------------------------------- // DA7212 codec registers used by the driver. // --------------------------------------------------------------------------- -#define DA7212_PLL_STATUS 0x03 -#define DA7212_CIF_CTRL 0x1D -#define DA7212_DIG_ROUTING_DAI 0x21 -#define DA7212_SR 0x22 -#define DA7212_REFERENCES 0x23 -#define DA7212_PLL_FRAC_TOP 0x24 -#define DA7212_PLL_FRAC_BOT 0x25 -#define DA7212_PLL_INTEGER 0x26 -#define DA7212_PLL_CTRL 0x27 -#define DA7212_DAI_CLK_MODE 0x28 -#define DA7212_DAI_CTRL 0x29 -#define DA7212_DIG_ROUTING_DAC 0x2A -#define DA7212_DAC_FILTERS5 0x40 -#define DA7212_DAC_R_GAIN 0x46 -#define DA7212_LINE_GAIN 0x4A -#define DA7212_MIXOUT_R_SELECT 0x4C -#define DA7212_SYSTEM_MODES_OUTPUT 0x51 -#define DA7212_DAC_R_CTRL 0x6A -#define DA7212_LINE_CTRL 0x6D -#define DA7212_MIXOUT_R_CTRL 0x6F -#define DA7212_LDO_CTRL 0x90 -#define DA7212_GAIN_RAMP_CTRL 0x92 -#define DA7212_SYSTEM_ACTIVE 0xFD +#define DA7212_PLL_STATUS 0x03 +#define DA7212_CIF_CTRL 0x1D +#define DA7212_DIG_ROUTING_DAI 0x21 +#define DA7212_SR 0x22 +#define DA7212_REFERENCES 0x23 +#define DA7212_PLL_FRAC_TOP 0x24 +#define DA7212_PLL_FRAC_BOT 0x25 +#define DA7212_PLL_INTEGER 0x26 +#define DA7212_PLL_CTRL 0x27 +#define DA7212_DAI_CLK_MODE 0x28 +#define DA7212_DAI_CTRL 0x29 +#define DA7212_DIG_ROUTING_DAC 0x2A +#define DA7212_DAC_FILTERS5 0x40 +#define DA7212_DAC_R_GAIN 0x46 +#define DA7212_LINE_GAIN 0x4A +#define DA7212_MIXOUT_R_SELECT 0x4C +#define DA7212_SYSTEM_MODES_OUTPUT 0x51 +#define DA7212_DAC_R_CTRL 0x6A +#define DA7212_LINE_CTRL 0x6D +#define DA7212_MIXOUT_R_CTRL 0x6F +#define DA7212_LDO_CTRL 0x90 +#define DA7212_GAIN_RAMP_CTRL 0x92 +#define DA7212_SYSTEM_ACTIVE 0xFD // DAC_R_GAIN value corresponding to 0 dB per DA7212 datasheet. -#define DA7212_DAC_R_GAIN_0DB 0x6f +#define DA7212_DAC_R_GAIN_0DB 0x6f // Attenuation span, in 0.75 dB DAC_R_GAIN steps, that volume 1..100 maps // onto (64 steps = 48 dB). #define DA7212_DAC_GAIN_VOL_RANGE_STEPS 64 -#define I2S_BUF_SAMPLES_STEREO (NRF5_AUDIO_I2S_BUF_SAMPLES_MONO * 2) -#define I2S_BUF_SIZE_BYTES (I2S_BUF_SAMPLES_STEREO * sizeof(int16_t)) +#define I2S_BUF_SAMPLES_STEREO (NRF5_AUDIO_I2S_BUF_SAMPLES_MONO * 2) +#define I2S_BUF_SIZE_BYTES (I2S_BUF_SAMPLES_STEREO * sizeof(int16_t)) // nrfx_i2s buffer_size is counted in 32-bit words. -#define I2S_BUF_SIZE_WORDS (I2S_BUF_SIZE_BYTES / sizeof(uint32_t)) +#define I2S_BUF_SIZE_WORDS (I2S_BUF_SIZE_BYTES / sizeof(uint32_t)) static void prv_i2s_data_handler(nrfx_i2s_buffers_t const *p_released, uint32_t status); @@ -86,7 +86,7 @@ static void prv_i2s_data_handler(nrfx_i2s_buffers_t const *p_released, uint32_t // --------------------------------------------------------------------------- static void prv_codec_write(AudioDevice *dev, uint8_t reg, uint8_t value) { - uint8_t data[2] = { reg, value }; + uint8_t data[2] = {reg, value}; i2c_use(dev->codec); bool ok = i2c_write_block(dev->codec, sizeof(data), data); i2c_release(dev->codec); @@ -157,8 +157,7 @@ static void prv_codec_prepare(AudioDevice *dev) { prv_codec_write(dev, 0xF0, 0x00); psleep(40); - PBL_ASSERT(prv_codec_read(dev, DA7212_PLL_STATUS) == 0x07, - "DA7212 PLL not locked"); + PBL_ASSERT(prv_codec_read(dev, DA7212_PLL_STATUS) == 0x07, "DA7212 PLL not locked"); // Gain ramp off: the mfg test uses a multi-second ramp for smooth // mic-capture playback, but for the speaker service we want audio as soon @@ -407,9 +406,9 @@ void audio_start(AudioDevice *audio_device, AudioTransCB cb) { // lock it. HFXO is also needed by the I2S peripheral for MCK generation. clocksource_hfxo_request(); - nrfx_i2s_config_t cfg = NRFX_I2S_DEFAULT_CONFIG( - audio_device->sck_pin, audio_device->lrck_pin, audio_device->mck_pin, - audio_device->sdout_pin, audio_device->sdin_pin); + nrfx_i2s_config_t cfg = + NRFX_I2S_DEFAULT_CONFIG(audio_device->sck_pin, audio_device->lrck_pin, audio_device->mck_pin, + audio_device->sdout_pin, audio_device->sdin_pin); cfg.irq_priority = audio_device->irq_priority; cfg.channels = NRF_I2S_CHANNELS_STEREO; cfg.sample_width = NRF_I2S_SWIDTH_16BIT; @@ -425,8 +424,7 @@ void audio_start(AudioDevice *audio_device, AudioTransCB cb) { // for 16-bit stereo (validate_config only enforces this in master mode). cfg.ratio = NRF_I2S_RATIO_256X; - nrfx_err_t err = nrfx_i2s_init(&audio_device->i2s_instance, &cfg, - prv_i2s_data_handler); + nrfx_err_t err = nrfx_i2s_init(&audio_device->i2s_instance, &cfg, prv_i2s_data_handler); PBL_ASSERT(err == NRFX_SUCCESS, "nrfx_i2s_init failed: %d", err); // Prime the first buffer with silence; real samples arrive via audio_write. diff --git a/src/fw/drivers/speaker/qemu/audio.c b/src/fw/drivers/speaker/qemu/audio.c index a522b9ac31..bc3be448dc 100644 --- a/src/fw/drivers/speaker/qemu/audio.c +++ b/src/fw/drivers/speaker/qemu/audio.c @@ -9,17 +9,17 @@ #include // QEMU audio device register offsets (must match pebble-audio QEMU device) -#define AUDIO_CTRL 0x00 -#define AUDIO_STATUS 0x04 +#define AUDIO_CTRL 0x00 +#define AUDIO_STATUS 0x04 #define AUDIO_SAMPLERATE 0x08 -#define AUDIO_DATA 0x0C -#define AUDIO_INTCTRL 0x10 -#define AUDIO_INTSTAT 0x14 -#define AUDIO_BUFAVAIL 0x18 -#define AUDIO_VOLUME 0x1C +#define AUDIO_DATA 0x0C +#define AUDIO_INTCTRL 0x10 +#define AUDIO_INTSTAT 0x14 +#define AUDIO_BUFAVAIL 0x18 +#define AUDIO_VOLUME 0x1C // Interrupt bits -#define INT_BUFAVAIL (1 << 0) +#define INT_BUFAVAIL (1 << 0) #define REG32(addr) (*(volatile uint32_t *)(addr)) @@ -47,9 +47,9 @@ void audio_start(AudioDevice *dev, AudioTransCB cb) { // Set sample rate and enable the device REG32(dev->base_addr + AUDIO_SAMPLERATE) = 16000; - REG32(dev->base_addr + AUDIO_INTSTAT) = INT_BUFAVAIL; // clear pending - REG32(dev->base_addr + AUDIO_INTCTRL) = INT_BUFAVAIL; // enable IRQ - REG32(dev->base_addr + AUDIO_CTRL) = 1; // enable + REG32(dev->base_addr + AUDIO_INTSTAT) = INT_BUFAVAIL; // clear pending + REG32(dev->base_addr + AUDIO_INTCTRL) = INT_BUFAVAIL; // enable IRQ + REG32(dev->base_addr + AUDIO_CTRL) = 1; // enable // Enable NVIC IRQ NVIC_SetPriority(dev->irqn, 5); @@ -89,8 +89,7 @@ void qemu_audio_irq_handler(AudioDevice *dev) { // Schedule callback on system task; a drop is retried on the next interrupt if (dev->state->trans_cb) { bool should_context_switch = false; - system_task_add_callback_from_isr_droppable(prv_audio_system_task_cb, - (void *)dev->state, + system_task_add_callback_from_isr_droppable(prv_audio_system_task_cb, (void *)dev->state, &should_context_switch); } } diff --git a/src/fw/drivers/speaker/sf32lb52/audec.c b/src/fw/drivers/speaker/sf32lb52/audec.c index 002638f23a..cc644ba574 100644 --- a/src/fw/drivers/speaker/sf32lb52/audec.c +++ b/src/fw/drivers/speaker/sf32lb52/audec.c @@ -12,503 +12,462 @@ PBL_LOG_MODULE_DEFINE(driver_speaker_sf32lb, CONFIG_DRIVER_SPEAKER_LOG_LEVEL); -//AVDD 3V3 for obelix -#define BSP_AVDD_V18_ENABLE 0 +// AVDD 3V3 for obelix +#define BSP_AVDD_V18_ENABLE 0 #if BSP_AVDD_V18_ENABLE - #define SINC_GAIN 0xa0 +#define SINC_GAIN 0xa0 #else - #define SINC_GAIN 0x14D +#define SINC_GAIN 0x14D #endif -#define MIN_VOLUME 0 -#define MAX_VOLUME 100 +#define MIN_VOLUME 0 +#define MAX_VOLUME 100 -static const AUDCODE_DAC_CLK_CONFIG_TYPE codec_dac_clk_config[9] = -{ +static const AUDCODE_DAC_CLK_CONFIG_TYPE codec_dac_clk_config[9] = { #if ALL_CLK_USING_PLL - {48000, 1, 1, 0, SINC_GAIN, 1, 5, 4, 2, 20, 20, 0}, - {32000, 1, 1, 1, SINC_GAIN, 1, 5, 4, 2, 20, 20, 0}, + {48000, 1, 1, 0, SINC_GAIN, 1, 5, 4, 2, 20, 20, 0}, + {32000, 1, 1, 1, SINC_GAIN, 1, 5, 4, 2, 20, 20, 0}, {24000, 1, 1, 5, SINC_GAIN, 1, 10, 2, 2, 10, 10, 1}, - {16000, 1, 1, 4, SINC_GAIN, 1, 5, 4, 2, 20, 20, 0}, - {12000, 1, 1, 7, SINC_GAIN, 1, 20, 2, 1, 5, 5, 1}, - { 8000, 1, 1, 8, SINC_GAIN, 1, 10, 2, 2, 10, 10, 1}, + {16000, 1, 1, 4, SINC_GAIN, 1, 5, 4, 2, 20, 20, 0}, + {12000, 1, 1, 7, SINC_GAIN, 1, 20, 2, 1, 5, 5, 1}, + {8000, 1, 1, 8, SINC_GAIN, 1, 10, 2, 2, 10, 10, 1}, #else - {48000, 0, 1, 0, SINC_GAIN, 0, 5, 4, 2, 20, 20, 0}, - {32000, 0, 1, 1, SINC_GAIN, 0, 5, 4, 2, 20, 20, 0}, + {48000, 0, 1, 0, SINC_GAIN, 0, 5, 4, 2, 20, 20, 0}, + {32000, 0, 1, 1, SINC_GAIN, 0, 5, 4, 2, 20, 20, 0}, {24000, 0, 1, 5, SINC_GAIN, 0, 10, 2, 2, 10, 10, 1}, - {16000, 0, 1, 4, SINC_GAIN, 0, 5, 4, 2, 20, 20, 0}, - {12000, 0, 1, 7, SINC_GAIN, 0, 20, 2, 1, 5, 5, 1}, - { 8000, 0, 1, 8, SINC_GAIN, 0, 10, 2, 2, 10, 10, 1}, + {16000, 0, 1, 4, SINC_GAIN, 0, 5, 4, 2, 20, 20, 0}, + {12000, 0, 1, 7, SINC_GAIN, 0, 20, 2, 1, 5, 5, 1}, + {8000, 0, 1, 8, SINC_GAIN, 0, 10, 2, 2, 10, 10, 1}, #endif - {44100, 1, 1, 0, SINC_GAIN, 1, 5, 4, 2, 20, 20, 0}, + {44100, 1, 1, 0, SINC_GAIN, 1, 5, 4, 2, 20, 20, 0}, {22050, 1, 1, 5, SINC_GAIN, 1, 10, 2, 2, 10, 10, 1}, - {11025, 1, 1, 7, SINC_GAIN, 1, 20, 2, 1, 5, 5, 1}, + {11025, 1, 1, 7, SINC_GAIN, 1, 20, 2, 1, 5, 5, 1}, }; -#define DAC_CLK_CONFIG_SIZE (sizeof(codec_dac_clk_config)/sizeof(AUDCODE_DAC_CLK_CONFIG_TYPE)) +#define DAC_CLK_CONFIG_SIZE (sizeof(codec_dac_clk_config) / sizeof(AUDCODE_DAC_CLK_CONFIG_TYPE)) -typedef struct pll_vco -{ - uint32_t freq; - uint32_t vco_value; - uint32_t target_cnt; +typedef struct pll_vco { + uint32_t freq; + uint32_t vco_value; + uint32_t target_cnt; } pll_vco_t; -static pll_vco_t g_pll_vco_tab[2] = -{ +static pll_vco_t g_pll_vco_tab[2] = { {48, 0, 2001}, {44, 0, 1834}, }; -static void prv_bf0_disable_pll(AudioDeviceState* state) -{ - HAL_TURN_OFF_PLL(); - state->pll_state = AUDIO_PLL_CLOSED; +static void prv_bf0_disable_pll(AudioDeviceState *state) { + HAL_TURN_OFF_PLL(); + state->pll_state = AUDIO_PLL_CLOSED; } -static int prv_bf0_pll_calibration() -{ - uint32_t pll_cnt; - uint32_t fc_vco; - uint32_t fc_vco_min; - uint32_t fc_vco_max; - uint32_t delta_cnt = 0; - uint32_t delta_cnt_min = 0; - uint32_t delta_cnt_max = 0; - uint32_t delta_fc_vco; - uint32_t target_cnt; - - HAL_PMU_EnableAudio(1); - HAL_RCC_EnableModule(RCC_MOD_AUDCODEC_HP); - HAL_RCC_EnableModule(RCC_MOD_AUDCODEC_LP); - - HAL_TURN_ON_PLL(); - - // VCO freq calibration - hwp_audcodec->PLL_CFG0 |= AUDCODEC_PLL_CFG0_OPEN; - hwp_audcodec->PLL_CFG2 |= AUDCODEC_PLL_CFG2_EN_LF_VCIN; - hwp_audcodec->PLL_CAL_CFG = (0 << AUDCODEC_PLL_CAL_CFG_EN_Pos) | - (2000 << AUDCODEC_PLL_CAL_CFG_LEN_Pos); - for (uint8_t i = 0; i < sizeof(g_pll_vco_tab) / sizeof(g_pll_vco_tab[0]); i++) - { - target_cnt = g_pll_vco_tab[i].target_cnt; - fc_vco = 16; - delta_fc_vco = 8; - /* setup calibration and run - ** target pll_cnt = ceil(46MHz/48MHz*2000)+1 = 1918 - ** target difference between pll_cnt and xtal_cnt should be less than 1 */ - while (delta_fc_vco != 0) - { - hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_FC_VCO; - hwp_audcodec->PLL_CFG0 |= (fc_vco << AUDCODEC_PLL_CFG0_FC_VCO_Pos); - hwp_audcodec->PLL_CAL_CFG |= AUDCODEC_PLL_CAL_CFG_EN; - while (!(hwp_audcodec->PLL_CAL_CFG & AUDCODEC_PLL_CAL_CFG_DONE_Msk)); - pll_cnt = (hwp_audcodec->PLL_CAL_RESULT >> AUDCODEC_PLL_CAL_RESULT_PLL_CNT_Pos); - hwp_audcodec->PLL_CAL_CFG &= ~AUDCODEC_PLL_CAL_CFG_EN; - if (pll_cnt < target_cnt) - { - fc_vco = fc_vco + delta_fc_vco; - delta_cnt = target_cnt - pll_cnt; - } - else if (pll_cnt > target_cnt) - { - fc_vco = fc_vco - delta_fc_vco; - delta_cnt = pll_cnt - target_cnt; - } - delta_fc_vco = delta_fc_vco >> 1; - } - - if (fc_vco == 0) - { - fc_vco_min = 0; - } - else - { - fc_vco_min = fc_vco - 1; - } - if (fc_vco == 31) - { - fc_vco_max = fc_vco; - } - else - { - fc_vco_max = fc_vco + 1; - } - - hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_FC_VCO; - hwp_audcodec->PLL_CFG0 |= (fc_vco_min << AUDCODEC_PLL_CFG0_FC_VCO_Pos); - hwp_audcodec->PLL_CAL_CFG |= AUDCODEC_PLL_CAL_CFG_EN; - - while (!(hwp_audcodec->PLL_CAL_CFG & AUDCODEC_PLL_CAL_CFG_DONE_Msk)); - pll_cnt = (hwp_audcodec->PLL_CAL_RESULT >> AUDCODEC_PLL_CAL_RESULT_PLL_CNT_Pos); - hwp_audcodec->PLL_CAL_CFG &= ~AUDCODEC_PLL_CAL_CFG_EN; - if (pll_cnt < target_cnt) - { - delta_cnt_min = target_cnt - pll_cnt; - } - else if (pll_cnt > target_cnt) - { - delta_cnt_min = pll_cnt - target_cnt; - } - - hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_FC_VCO; - hwp_audcodec->PLL_CFG0 |= (fc_vco_max << AUDCODEC_PLL_CFG0_FC_VCO_Pos); - hwp_audcodec->PLL_CAL_CFG |= AUDCODEC_PLL_CAL_CFG_EN; - while (!(hwp_audcodec->PLL_CAL_CFG & AUDCODEC_PLL_CAL_CFG_DONE_Msk)); - pll_cnt = (hwp_audcodec->PLL_CAL_RESULT >> AUDCODEC_PLL_CAL_RESULT_PLL_CNT_Pos); - hwp_audcodec->PLL_CAL_CFG &= ~AUDCODEC_PLL_CAL_CFG_EN; - if (pll_cnt < target_cnt) - { - delta_cnt_max = target_cnt - pll_cnt; - } - else if (pll_cnt > target_cnt) - { - delta_cnt_max = pll_cnt - target_cnt; - } - - if (delta_cnt_min <= delta_cnt && delta_cnt_min <= delta_cnt_max) - { - g_pll_vco_tab[i].vco_value = fc_vco_min; - } - else if (delta_cnt_max <= delta_cnt && delta_cnt_max <= delta_cnt_min) - { - g_pll_vco_tab[i].vco_value = fc_vco_max; - } - else - { - g_pll_vco_tab[i].vco_value = fc_vco; - } +static int prv_bf0_pll_calibration() { + uint32_t pll_cnt; + uint32_t fc_vco; + uint32_t fc_vco_min; + uint32_t fc_vco_max; + uint32_t delta_cnt = 0; + uint32_t delta_cnt_min = 0; + uint32_t delta_cnt_max = 0; + uint32_t delta_fc_vco; + uint32_t target_cnt; + + HAL_PMU_EnableAudio(1); + HAL_RCC_EnableModule(RCC_MOD_AUDCODEC_HP); + HAL_RCC_EnableModule(RCC_MOD_AUDCODEC_LP); + + HAL_TURN_ON_PLL(); + + // VCO freq calibration + hwp_audcodec->PLL_CFG0 |= AUDCODEC_PLL_CFG0_OPEN; + hwp_audcodec->PLL_CFG2 |= AUDCODEC_PLL_CFG2_EN_LF_VCIN; + hwp_audcodec->PLL_CAL_CFG = + (0 << AUDCODEC_PLL_CAL_CFG_EN_Pos) | (2000 << AUDCODEC_PLL_CAL_CFG_LEN_Pos); + for (uint8_t i = 0; i < sizeof(g_pll_vco_tab) / sizeof(g_pll_vco_tab[0]); i++) { + target_cnt = g_pll_vco_tab[i].target_cnt; + fc_vco = 16; + delta_fc_vco = 8; + /* setup calibration and run + ** target pll_cnt = ceil(46MHz/48MHz*2000)+1 = 1918 + ** target difference between pll_cnt and xtal_cnt should be less than 1 */ + while (delta_fc_vco != 0) { + hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_FC_VCO; + hwp_audcodec->PLL_CFG0 |= (fc_vco << AUDCODEC_PLL_CFG0_FC_VCO_Pos); + hwp_audcodec->PLL_CAL_CFG |= AUDCODEC_PLL_CAL_CFG_EN; + while (!(hwp_audcodec->PLL_CAL_CFG & AUDCODEC_PLL_CAL_CFG_DONE_Msk)) + ; + pll_cnt = (hwp_audcodec->PLL_CAL_RESULT >> AUDCODEC_PLL_CAL_RESULT_PLL_CNT_Pos); + hwp_audcodec->PLL_CAL_CFG &= ~AUDCODEC_PLL_CAL_CFG_EN; + if (pll_cnt < target_cnt) { + fc_vco = fc_vco + delta_fc_vco; + delta_cnt = target_cnt - pll_cnt; + } else if (pll_cnt > target_cnt) { + fc_vco = fc_vco - delta_fc_vco; + delta_cnt = pll_cnt - target_cnt; + } + delta_fc_vco = delta_fc_vco >> 1; } - hwp_audcodec->PLL_CFG2 &= ~AUDCODEC_PLL_CFG2_EN_LF_VCIN; - hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_OPEN; - HAL_TURN_OFF_PLL(); - - return 0; -} - -static int prv_bf0_enable_pll(uint32_t freq, uint8_t type) -{ - uint8_t freq_type; - uint8_t test_result = -1; - uint8_t vco_index = 0; - - freq_type = type << 1; - if ((freq == 44100) || (freq == 22050) || (freq == 11025)) - { - vco_index = 1; - freq_type += 1; + if (fc_vco == 0) { + fc_vco_min = 0; + } else { + fc_vco_min = fc_vco - 1; + } + if (fc_vco == 31) { + fc_vco_max = fc_vco; + } else { + fc_vco_max = fc_vco + 1; } - HAL_TURN_ON_PLL(); + hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_FC_VCO; + hwp_audcodec->PLL_CFG0 |= (fc_vco_min << AUDCODEC_PLL_CFG0_FC_VCO_Pos); + hwp_audcodec->PLL_CAL_CFG |= AUDCODEC_PLL_CAL_CFG_EN; + + while (!(hwp_audcodec->PLL_CAL_CFG & AUDCODEC_PLL_CAL_CFG_DONE_Msk)) + ; + pll_cnt = (hwp_audcodec->PLL_CAL_RESULT >> AUDCODEC_PLL_CAL_RESULT_PLL_CNT_Pos); + hwp_audcodec->PLL_CAL_CFG &= ~AUDCODEC_PLL_CAL_CFG_EN; + if (pll_cnt < target_cnt) { + delta_cnt_min = target_cnt - pll_cnt; + } else if (pll_cnt > target_cnt) { + delta_cnt_min = pll_cnt - target_cnt; + } hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_FC_VCO; - hwp_audcodec->PLL_CFG0 |= (g_pll_vco_tab[vco_index].vco_value << AUDCODEC_PLL_CFG0_FC_VCO_Pos); + hwp_audcodec->PLL_CFG0 |= (fc_vco_max << AUDCODEC_PLL_CFG0_FC_VCO_Pos); + hwp_audcodec->PLL_CAL_CFG |= AUDCODEC_PLL_CAL_CFG_EN; + while (!(hwp_audcodec->PLL_CAL_CFG & AUDCODEC_PLL_CAL_CFG_DONE_Msk)) + ; + pll_cnt = (hwp_audcodec->PLL_CAL_RESULT >> AUDCODEC_PLL_CAL_RESULT_PLL_CNT_Pos); + hwp_audcodec->PLL_CAL_CFG &= ~AUDCODEC_PLL_CAL_CFG_EN; + if (pll_cnt < target_cnt) { + delta_cnt_max = target_cnt - pll_cnt; + } else if (pll_cnt > target_cnt) { + delta_cnt_max = pll_cnt - target_cnt; + } - do - { - test_result = updata_pll_freq(freq_type); + if (delta_cnt_min <= delta_cnt && delta_cnt_min <= delta_cnt_max) { + g_pll_vco_tab[i].vco_value = fc_vco_min; + } else if (delta_cnt_max <= delta_cnt && delta_cnt_max <= delta_cnt_min) { + g_pll_vco_tab[i].vco_value = fc_vco_max; + } else { + g_pll_vco_tab[i].vco_value = fc_vco; } - while (test_result != 0); + } + hwp_audcodec->PLL_CFG2 &= ~AUDCODEC_PLL_CFG2_EN_LF_VCIN; + hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_OPEN; + + HAL_TURN_OFF_PLL(); - return test_result; + return 0; } -static int prv_bf0_update_pll(uint32_t freq, uint8_t type) -{ - uint8_t freq_type; - uint8_t test_result = -1; - uint8_t vco_index = 0; - - freq_type = type << 1; - if ((freq == 44100) || (freq == 22050) || (freq == 11025)) - { - vco_index = 1; - freq_type += 1; - } +static int prv_bf0_enable_pll(uint32_t freq, uint8_t type) { + uint8_t freq_type; + uint8_t test_result = -1; + uint8_t vco_index = 0; - hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_FC_VCO; - hwp_audcodec->PLL_CFG0 |= (g_pll_vco_tab[vco_index].vco_value << AUDCODEC_PLL_CFG0_FC_VCO_Pos); + freq_type = type << 1; + if ((freq == 44100) || (freq == 22050) || (freq == 11025)) { + vco_index = 1; + freq_type += 1; + } - do - { - test_result = updata_pll_freq(freq_type); - } - while (test_result != 0); + HAL_TURN_ON_PLL(); - return test_result; -} + hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_FC_VCO; + hwp_audcodec->PLL_CFG0 |= (g_pll_vco_tab[vco_index].vco_value << AUDCODEC_PLL_CFG0_FC_VCO_Pos); -static void prv_bf0_audio_pll_config(AudioDevice* audio_device, const AUDCODE_DAC_CLK_CONFIG_TYPE *dac_cfg) { - AudioDeviceState* state = audio_device->state; - if (dac_cfg->clk_src_sel) //pll - { - if (state->pll_state == AUDIO_PLL_CLOSED) - { - prv_bf0_enable_pll(dac_cfg->samplerate, 1); - state->pll_state = AUDIO_PLL_ENABLE; - state->pll_samplerate = dac_cfg->samplerate; - } - else - { - prv_bf0_update_pll(dac_cfg->samplerate, 1); - state->pll_state = AUDIO_PLL_ENABLE; - state->pll_samplerate = dac_cfg->samplerate; - } - } - else //xtal - { - if (state->pll_state == AUDIO_PLL_CLOSED) - { - HAL_TURN_ON_PLL(); - state->pll_state = AUDIO_PLL_OPEN; - } - } + do { + test_result = updata_pll_freq(freq_type); + } while (test_result != 0); + + return test_result; } -static void prv_apply_volume(AudioDevice* audio_device) { - AudioDeviceState* state = audio_device->state; - AUDCODEC_HandleTypeDef *haudcodec = &state->audcodec; +static int prv_bf0_update_pll(uint32_t freq, uint8_t type) { + uint8_t freq_type; + uint8_t test_result = -1; + uint8_t vco_index = 0; - if (state->volume == 0) { - HAL_AUDCODEC_Mute_DACPath(haudcodec, 1); - return; - } + freq_type = type << 1; + if ((freq == 44100) || (freq == 22050) || (freq == 11025)) { + vco_index = 1; + freq_type += 1; + } + + hwp_audcodec->PLL_CFG0 &= ~AUDCODEC_PLL_CFG0_FC_VCO; + hwp_audcodec->PLL_CFG0 |= (g_pll_vco_tab[vco_index].vco_value << AUDCODEC_PLL_CFG0_FC_VCO_Pos); - HAL_AUDCODEC_Mute_DACPath(haudcodec, 0); - // Map 1..100 to -36..0 dB in the HAL's 0.5 dB units. Never apply positive - // digital gain: it clips full-scale content and overdrives the speaker. - int atten_half_db = ((MAX_VOLUME - (int)state->volume) * 72) / MAX_VOLUME; - if ((HAL_AUDCODEC_Config_DACPath_Volume(haudcodec, 0, -atten_half_db) != HAL_OK) || - (HAL_AUDCODEC_Config_DACPath_Volume(haudcodec, 1, -atten_half_db) != HAL_OK)) { - PBL_LOG_WRN("Failed to apply DAC volume (%d half-dB)", -atten_half_db); + do { + test_result = updata_pll_freq(freq_type); + } while (test_result != 0); + + return test_result; +} + +static void prv_bf0_audio_pll_config(AudioDevice *audio_device, + const AUDCODE_DAC_CLK_CONFIG_TYPE *dac_cfg) { + AudioDeviceState *state = audio_device->state; + if (dac_cfg->clk_src_sel) // pll + { + if (state->pll_state == AUDIO_PLL_CLOSED) { + prv_bf0_enable_pll(dac_cfg->samplerate, 1); + state->pll_state = AUDIO_PLL_ENABLE; + state->pll_samplerate = dac_cfg->samplerate; + } else { + prv_bf0_update_pll(dac_cfg->samplerate, 1); + state->pll_state = AUDIO_PLL_ENABLE; + state->pll_samplerate = dac_cfg->samplerate; + } + } else // xtal + { + if (state->pll_state == AUDIO_PLL_CLOSED) { + HAL_TURN_ON_PLL(); + state->pll_state = AUDIO_PLL_OPEN; } + } +} + +static void prv_apply_volume(AudioDevice *audio_device) { + AudioDeviceState *state = audio_device->state; + AUDCODEC_HandleTypeDef *haudcodec = &state->audcodec; + + if (state->volume == 0) { + HAL_AUDCODEC_Mute_DACPath(haudcodec, 1); + return; + } + + HAL_AUDCODEC_Mute_DACPath(haudcodec, 0); + // Map 1..100 to -36..0 dB in the HAL's 0.5 dB units. Never apply positive + // digital gain: it clips full-scale content and overdrives the speaker. + int atten_half_db = ((MAX_VOLUME - (int)state->volume) * 72) / MAX_VOLUME; + if ((HAL_AUDCODEC_Config_DACPath_Volume(haudcodec, 0, -atten_half_db) != HAL_OK) || + (HAL_AUDCODEC_Config_DACPath_Volume(haudcodec, 1, -atten_half_db) != HAL_OK)) { + PBL_LOG_WRN("Failed to apply DAC volume (%d half-dB)", -atten_half_db); + } } static bool prv_allocate_buffers(AudioDeviceState *state) { - // Allocate circular buffer storage - state->circ_buffer_storage = kernel_malloc(CIRCULAR_BUF_SIZE_BYTES); - if (!state->circ_buffer_storage) { - PBL_LOG_ERR("Failed to allocate circular buffer storage"); - return false; - } + // Allocate circular buffer storage + state->circ_buffer_storage = kernel_malloc(CIRCULAR_BUF_SIZE_BYTES); + if (!state->circ_buffer_storage) { + PBL_LOG_ERR("Failed to allocate circular buffer storage"); + return false; + } - // Initialize circular buffer with allocated storage - circular_buffer_init(&state->circ_buffer, state->circ_buffer_storage, CIRCULAR_BUF_SIZE_BYTES); + // Initialize circular buffer with allocated storage + circular_buffer_init(&state->circ_buffer, state->circ_buffer_storage, CIRCULAR_BUF_SIZE_BYTES); - return true; + return true; } static void prv_free_buffers(AudioDeviceState *state) { - // Free circular buffer storage - if (state->circ_buffer_storage) { - kernel_free(state->circ_buffer_storage); - state->circ_buffer_storage = NULL; - } + // Free circular buffer storage + if (state->circ_buffer_storage) { + kernel_free(state->circ_buffer_storage); + state->circ_buffer_storage = NULL; + } } -bool audec_init(AudioDevice* audio_device) { - AudioDeviceState* state = audio_device->state; - AUDCODEC_HandleTypeDef *haudcodec = &state->audcodec; - haudcodec->Instance = hwp_audcodec; - memset(&state->dac_dma_handle, 0, sizeof(state->dac_dma_handle)); - haudcodec->hdma[HAL_AUDCODEC_DAC_CH0] = &state->dac_dma_handle; - - haudcodec->hdma[HAL_AUDCODEC_DAC_CH0]->Instance = audio_device->audec_dma_channel; - haudcodec->hdma[HAL_AUDCODEC_DAC_CH0]->Init.Request = audio_device->audec_dma_request; - haudcodec->hdma[HAL_AUDCODEC_DAC_CH0]->Init.IrqPrio = audio_device->irq_priority; - - haudcodec->Init.en_dly_sel = 0; - haudcodec->Init.dac_cfg.opmode = 1; - haudcodec->Init.adc_cfg.opmode = 1; - haudcodec->bufSize = CFG_AUDIO_PLAYBACK_PIPE_SIZE * 2; - state->audec_queue_buf[HAL_AUDCODEC_DAC_CH0] = NULL; - state->volume = MAX_VOLUME; - - HAL_PMU_EnableAudio(1); - HAL_RCC_EnableModule(RCC_MOD_AUDCODEC_HP); - HAL_RCC_EnableModule(RCC_MOD_AUDCODEC_LP); - HAL_AUDCODEC_Init(haudcodec); - - for (uint8_t i = 0; i < DAC_CLK_CONFIG_SIZE; i++) - { - if (audio_device->samplerate == codec_dac_clk_config[i].samplerate) - { - haudcodec->Init.samplerate_index = i; - haudcodec->Init.dac_cfg.dac_clk = (AUDCODE_DAC_CLK_CONFIG_TYPE *)&codec_dac_clk_config[i]; - break; - } - } - - if (haudcodec->buf[HAL_AUDCODEC_DAC_CH0] == NULL) - { - // Over-allocate so the DMA buffer can start on a cache-line boundary. - // Each half is consumed by DMA while the CPU fills the other half; - // dcache_flush() of one half must not touch lines that belong to the - // half currently being DMA'd, so both halves need to be aligned. - const size_t cache_align = dcache_line_size(); - state->raw_dac_buffer = kernel_malloc(haudcodec->bufSize + cache_align - 1U); - PBL_ASSERT(state->raw_dac_buffer, "allocated mem error"); - haudcodec->buf[HAL_AUDCODEC_DAC_CH0] = - (uint8_t *)(((uintptr_t)state->raw_dac_buffer + cache_align - 1U) & - ~(uintptr_t)(cache_align - 1U)); - memset(haudcodec->buf[HAL_AUDCODEC_DAC_CH0], 0, haudcodec->bufSize); +bool audec_init(AudioDevice *audio_device) { + AudioDeviceState *state = audio_device->state; + AUDCODEC_HandleTypeDef *haudcodec = &state->audcodec; + haudcodec->Instance = hwp_audcodec; + memset(&state->dac_dma_handle, 0, sizeof(state->dac_dma_handle)); + haudcodec->hdma[HAL_AUDCODEC_DAC_CH0] = &state->dac_dma_handle; + + haudcodec->hdma[HAL_AUDCODEC_DAC_CH0]->Instance = audio_device->audec_dma_channel; + haudcodec->hdma[HAL_AUDCODEC_DAC_CH0]->Init.Request = audio_device->audec_dma_request; + haudcodec->hdma[HAL_AUDCODEC_DAC_CH0]->Init.IrqPrio = audio_device->irq_priority; + + haudcodec->Init.en_dly_sel = 0; + haudcodec->Init.dac_cfg.opmode = 1; + haudcodec->Init.adc_cfg.opmode = 1; + haudcodec->bufSize = CFG_AUDIO_PLAYBACK_PIPE_SIZE * 2; + state->audec_queue_buf[HAL_AUDCODEC_DAC_CH0] = NULL; + state->volume = MAX_VOLUME; + + HAL_PMU_EnableAudio(1); + HAL_RCC_EnableModule(RCC_MOD_AUDCODEC_HP); + HAL_RCC_EnableModule(RCC_MOD_AUDCODEC_LP); + HAL_AUDCODEC_Init(haudcodec); + + for (uint8_t i = 0; i < DAC_CLK_CONFIG_SIZE; i++) { + if (audio_device->samplerate == codec_dac_clk_config[i].samplerate) { + haudcodec->Init.samplerate_index = i; + haudcodec->Init.dac_cfg.dac_clk = (AUDCODE_DAC_CLK_CONFIG_TYPE *)&codec_dac_clk_config[i]; + break; } - state->queue_buf[HAL_AUDCODEC_DAC_CH0] = haudcodec->buf[HAL_AUDCODEC_DAC_CH0]; - HAL_AUDCODEC_Config_TChanel(haudcodec, 0, &haudcodec->Init.dac_cfg); - state->tx_instanc = HAL_AUDCODEC_DAC_CH0; + } + + if (haudcodec->buf[HAL_AUDCODEC_DAC_CH0] == NULL) { + // Over-allocate so the DMA buffer can start on a cache-line boundary. + // Each half is consumed by DMA while the CPU fills the other half; + // dcache_flush() of one half must not touch lines that belong to the + // half currently being DMA'd, so both halves need to be aligned. + const size_t cache_align = dcache_line_size(); + state->raw_dac_buffer = kernel_malloc(haudcodec->bufSize + cache_align - 1U); + PBL_ASSERT(state->raw_dac_buffer, "allocated mem error"); + haudcodec->buf[HAL_AUDCODEC_DAC_CH0] = + (uint8_t *)(((uintptr_t)state->raw_dac_buffer + cache_align - 1U) & + ~(uintptr_t)(cache_align - 1U)); + memset(haudcodec->buf[HAL_AUDCODEC_DAC_CH0], 0, haudcodec->bufSize); + } + state->queue_buf[HAL_AUDCODEC_DAC_CH0] = haudcodec->buf[HAL_AUDCODEC_DAC_CH0]; + HAL_AUDCODEC_Config_TChanel(haudcodec, 0, &haudcodec->Init.dac_cfg); + state->tx_instanc = HAL_AUDCODEC_DAC_CH0; - prv_bf0_pll_calibration(); + prv_bf0_pll_calibration(); - return true; + return true; } -void audec_start(AudioDevice* audio_device, AudioTransCB cb) { - AudioDeviceState* state = audio_device->state; - AUDCODEC_HandleTypeDef *haudcodec = &state->audcodec; - state->trans_cb = cb; - state->callback_pending = false; - - soc_sf32lb_sleep_block(SOC_SF32LB_DEEPWFI); - - prv_allocate_buffers(state); - - prv_bf0_audio_pll_config(audio_device, &codec_dac_clk_config[haudcodec->Init.samplerate_index]); - HAL_AUDCODEC_Config_TChanel(haudcodec, 0, &haudcodec->Init.dac_cfg); - HAL_NVIC_SetPriority(audio_device->audec_dma_irq, audio_device->irq_priority, 0); - // The buffer was memset() to zero by the CPU at init and is again at stop; - // those writes may still be sitting in D-cache. Push them to RAM so the - // codec DMA reads silence on the first transfer instead of stale memory. - dcache_flush(haudcodec->buf[HAL_AUDCODEC_DAC_CH0], haudcodec->bufSize); - HAL_AUDCODEC_Transmit_DMA(haudcodec, haudcodec->buf[HAL_AUDCODEC_DAC_CH0], haudcodec->bufSize, HAL_AUDCODEC_DAC_CH0); - HAL_NVIC_EnableIRQ(audio_device->audec_dma_irq); - state->tx_instanc = HAL_AUDCODEC_DAC_CH0; - - // Digital gain must be programmed before the DAC path opens, otherwise - // startup transients escape at the codec's default 0 dB gain. - prv_apply_volume(audio_device); - - /* enable AUDCODEC at last*/ - __HAL_AUDCODEC_DAC_ENABLE(haudcodec); - - HAL_AUDCODEC_Config_DACPath(haudcodec, 1); - HAL_AUDCODEC_Config_Analog_DACPath(haudcodec->Init.dac_cfg.dac_clk); - // Volume 0 muted the path in prv_apply_volume(); don't reopen it. - if (state->volume != 0) { - HAL_AUDCODEC_Config_DACPath(haudcodec, 0); - } - - hwp_audcodec->DAC_CH0_CFG_EXT &= ~AUDCODEC_DAC_CH0_CFG_EXT_RAMP_EN_Msk; - hwp_audcodec->DAC_CH1_CFG_EXT &= ~AUDCODEC_DAC_CH1_CFG_EXT_RAMP_EN_Msk; +void audec_start(AudioDevice *audio_device, AudioTransCB cb) { + AudioDeviceState *state = audio_device->state; + AUDCODEC_HandleTypeDef *haudcodec = &state->audcodec; + state->trans_cb = cb; + state->callback_pending = false; + + soc_sf32lb_sleep_block(SOC_SF32LB_DEEPWFI); + + prv_allocate_buffers(state); + + prv_bf0_audio_pll_config(audio_device, &codec_dac_clk_config[haudcodec->Init.samplerate_index]); + HAL_AUDCODEC_Config_TChanel(haudcodec, 0, &haudcodec->Init.dac_cfg); + HAL_NVIC_SetPriority(audio_device->audec_dma_irq, audio_device->irq_priority, 0); + // The buffer was memset() to zero by the CPU at init and is again at stop; + // those writes may still be sitting in D-cache. Push them to RAM so the + // codec DMA reads silence on the first transfer instead of stale memory. + dcache_flush(haudcodec->buf[HAL_AUDCODEC_DAC_CH0], haudcodec->bufSize); + HAL_AUDCODEC_Transmit_DMA(haudcodec, haudcodec->buf[HAL_AUDCODEC_DAC_CH0], haudcodec->bufSize, + HAL_AUDCODEC_DAC_CH0); + HAL_NVIC_EnableIRQ(audio_device->audec_dma_irq); + state->tx_instanc = HAL_AUDCODEC_DAC_CH0; + + // Digital gain must be programmed before the DAC path opens, otherwise + // startup transients escape at the codec's default 0 dB gain. + prv_apply_volume(audio_device); + + /* enable AUDCODEC at last*/ + __HAL_AUDCODEC_DAC_ENABLE(haudcodec); + + HAL_AUDCODEC_Config_DACPath(haudcodec, 1); + HAL_AUDCODEC_Config_Analog_DACPath(haudcodec->Init.dac_cfg.dac_clk); + // Volume 0 muted the path in prv_apply_volume(); don't reopen it. + if (state->volume != 0) { + HAL_AUDCODEC_Config_DACPath(haudcodec, 0); + } + + hwp_audcodec->DAC_CH0_CFG_EXT &= ~AUDCODEC_DAC_CH0_CFG_EXT_RAMP_EN_Msk; + hwp_audcodec->DAC_CH1_CFG_EXT &= ~AUDCODEC_DAC_CH1_CFG_EXT_RAMP_EN_Msk; } -uint32_t audec_write(AudioDevice* audio_device, void *writeBuf, uint32_t size) { - AudioDeviceState* state = audio_device->state; - if (state->circ_buffer_storage) { - uint32_t free_size = circular_buffer_get_write_space_remaining(&state->circ_buffer); - uint16_t to_write = (size > free_size) ? (uint16_t)free_size : (uint16_t)size; - if (to_write > 0) { - circular_buffer_write(&state->circ_buffer, writeBuf, to_write); - } - return circular_buffer_get_write_space_remaining(&state->circ_buffer); +uint32_t audec_write(AudioDevice *audio_device, void *writeBuf, uint32_t size) { + AudioDeviceState *state = audio_device->state; + if (state->circ_buffer_storage) { + uint32_t free_size = circular_buffer_get_write_space_remaining(&state->circ_buffer); + uint16_t to_write = (size > free_size) ? (uint16_t)free_size : (uint16_t)size; + if (to_write > 0) { + circular_buffer_write(&state->circ_buffer, writeBuf, to_write); } + return circular_buffer_get_write_space_remaining(&state->circ_buffer); + } - return 0; + return 0; } -void audec_set_vol(AudioDevice* audio_device, int volume) { - if (volume > MAX_VOLUME) - volume = MAX_VOLUME; - if (volume < MIN_VOLUME) - volume = MIN_VOLUME; +void audec_set_vol(AudioDevice *audio_device, int volume) { + if (volume > MAX_VOLUME) + volume = MAX_VOLUME; + if (volume < MIN_VOLUME) + volume = MIN_VOLUME; - audio_device->state->volume = (uint8_t)volume; - prv_apply_volume(audio_device); + audio_device->state->volume = (uint8_t)volume; + prv_apply_volume(audio_device); } -void audec_stop(AudioDevice* audio_device) { - AudioDeviceState* state = audio_device->state; - AUDCODEC_HandleTypeDef *haudcodec = &state->audcodec; +void audec_stop(AudioDevice *audio_device) { + AudioDeviceState *state = audio_device->state; + AUDCODEC_HandleTypeDef *haudcodec = &state->audcodec; - prv_bf0_disable_pll(state); + prv_bf0_disable_pll(state); - HAL_NVIC_DisableIRQ(audio_device->audec_dma_irq); - HAL_AUDCODEC_DMAStop(haudcodec, HAL_AUDCODEC_DAC_CH0); - haudcodec->channel_ref &= ~(1 << HAL_AUDCODEC_DAC_CH0); - haudcodec->State[HAL_AUDCODEC_DAC_CH0] = HAL_AUDCODEC_STATE_READY; + HAL_NVIC_DisableIRQ(audio_device->audec_dma_irq); + HAL_AUDCODEC_DMAStop(haudcodec, HAL_AUDCODEC_DAC_CH0); + haudcodec->channel_ref &= ~(1 << HAL_AUDCODEC_DAC_CH0); + haudcodec->State[HAL_AUDCODEC_DAC_CH0] = HAL_AUDCODEC_STATE_READY; - HAL_AUDCODEC_Config_DACPath(haudcodec, 1); - HAL_AUDCODEC_Close_Analog_DACPath(); - __HAL_AUDCODEC_DAC_DISABLE(haudcodec); - HAL_AUDCODEC_Clear_All_Channel(haudcodec, 1); + HAL_AUDCODEC_Config_DACPath(haudcodec, 1); + HAL_AUDCODEC_Close_Analog_DACPath(); + __HAL_AUDCODEC_DAC_DISABLE(haudcodec); + HAL_AUDCODEC_Clear_All_Channel(haudcodec, 1); - prv_free_buffers(state); - memset(haudcodec->buf[HAL_AUDCODEC_DAC_CH0], 0, haudcodec->bufSize); + prv_free_buffers(state); + memset(haudcodec->buf[HAL_AUDCODEC_DAC_CH0], 0, haudcodec->bufSize); - soc_sf32lb_sleep_release(SOC_SF32LB_DEEPWFI); + soc_sf32lb_sleep_release(SOC_SF32LB_DEEPWFI); } -void audec_dac0_dma_irq_handler(AudioDevice* audio_device) -{ - HAL_DMA_IRQHandler(audio_device->state->audcodec.hdma[0]); +void audec_dac0_dma_irq_handler(AudioDevice *audio_device) { + HAL_DMA_IRQHandler(audio_device->state->audcodec.hdma[0]); } -static void prv_audio_trans_bg(void* data) { - AudioDeviceState* state = (AudioDeviceState*) data; - state->callback_pending = false; - uint32_t free_size = circular_buffer_get_write_space_remaining(&state->circ_buffer); - state->trans_cb(&free_size); +static void prv_audio_trans_bg(void *data) { + AudioDeviceState *state = (AudioDeviceState *)data; + state->callback_pending = false; + uint32_t free_size = circular_buffer_get_write_space_remaining(&state->circ_buffer); + state->trans_cb(&free_size); } -static void prv_dma_request_processing(AudioDeviceState* state) { - if (!state->circ_buffer_storage) return; - - uint32_t available_data = circular_buffer_get_read_space_remaining(&state->circ_buffer); - uint32_t trans_size = CFG_AUDIO_PLAYBACK_PIPE_SIZE; - if (available_data < CFG_AUDIO_PLAYBACK_PIPE_SIZE) { - PBL_LOG_DBG("audio data not enough remain:%" PRIu32 "", available_data); - memset(state->queue_buf[HAL_AUDCODEC_DAC_CH0], 0, CFG_AUDIO_PLAYBACK_PIPE_SIZE); - trans_size = available_data; - } - if (trans_size > 0) { - uint16_t bytes_copied = circular_buffer_copy(&state->circ_buffer, - state->queue_buf[HAL_AUDCODEC_DAC_CH0], trans_size); - PBL_ASSERT(bytes_copied == trans_size, "circ buffer read err"); - circular_buffer_consume(&state->circ_buffer, bytes_copied); - } - // Codec DMA reads this half-buffer next time it wraps; flush the CPU-side - // writes (memset for underrun and circular_buffer_copy above) so the DAC - // doesn't replay stale RAM contents. We always flush a full half because - // any bytes we didn't touch were already memset() to silence. - dcache_flush(state->queue_buf[HAL_AUDCODEC_DAC_CH0], CFG_AUDIO_PLAYBACK_PIPE_SIZE); - uint32_t free_size = circular_buffer_get_write_space_remaining(&state->circ_buffer); - // Only one refill callback may be in flight: this ISR fires every half - // buffer, and enqueueing on each one floods the system task queue when - // KernelBG is starved, tripping the Event Queue Full reset. - // A dropped refill is retried on the next half-buffer IRQ; a momentary - // underrun beats resetting the system over a full queue. - if(state->trans_cb && !state->callback_pending && - free_size >= CFG_AUDIO_PLAYBACK_PIPE_SIZE) { - bool system_task_switch_context = false; - state->callback_pending = true; - if (!system_task_add_callback_from_isr_droppable(prv_audio_trans_bg, (void*)state, - &system_task_switch_context)) { - state->callback_pending = false; - } +static void prv_dma_request_processing(AudioDeviceState *state) { + if (!state->circ_buffer_storage) + return; + + uint32_t available_data = circular_buffer_get_read_space_remaining(&state->circ_buffer); + uint32_t trans_size = CFG_AUDIO_PLAYBACK_PIPE_SIZE; + if (available_data < CFG_AUDIO_PLAYBACK_PIPE_SIZE) { + PBL_LOG_DBG("audio data not enough remain:%" PRIu32 "", available_data); + memset(state->queue_buf[HAL_AUDCODEC_DAC_CH0], 0, CFG_AUDIO_PLAYBACK_PIPE_SIZE); + trans_size = available_data; + } + if (trans_size > 0) { + uint16_t bytes_copied = circular_buffer_copy( + &state->circ_buffer, state->queue_buf[HAL_AUDCODEC_DAC_CH0], trans_size); + PBL_ASSERT(bytes_copied == trans_size, "circ buffer read err"); + circular_buffer_consume(&state->circ_buffer, bytes_copied); + } + // Codec DMA reads this half-buffer next time it wraps; flush the CPU-side + // writes (memset for underrun and circular_buffer_copy above) so the DAC + // doesn't replay stale RAM contents. We always flush a full half because + // any bytes we didn't touch were already memset() to silence. + dcache_flush(state->queue_buf[HAL_AUDCODEC_DAC_CH0], CFG_AUDIO_PLAYBACK_PIPE_SIZE); + uint32_t free_size = circular_buffer_get_write_space_remaining(&state->circ_buffer); + // Only one refill callback may be in flight: this ISR fires every half + // buffer, and enqueueing on each one floods the system task queue when + // KernelBG is starved, tripping the Event Queue Full reset. + // A dropped refill is retried on the next half-buffer IRQ; a momentary + // underrun beats resetting the system over a full queue. + if (state->trans_cb && !state->callback_pending && free_size >= CFG_AUDIO_PLAYBACK_PIPE_SIZE) { + bool system_task_switch_context = false; + state->callback_pending = true; + if (!system_task_add_callback_from_isr_droppable(prv_audio_trans_bg, (void *)state, + &system_task_switch_context)) { + state->callback_pending = false; } + } } -void HAL_AUDCODEC_TxCpltCallback(AUDCODEC_HandleTypeDef *haprc, int cid) -{ - AudioDeviceState* state = container_of(haprc, struct AudioState, audcodec); +void HAL_AUDCODEC_TxCpltCallback(AUDCODEC_HandleTypeDef *haprc, int cid) { + AudioDeviceState *state = container_of(haprc, struct AudioState, audcodec); - state->queue_buf[HAL_AUDCODEC_DAC_CH0] = haprc->buf[HAL_AUDCODEC_DAC_CH0] + haprc->bufSize/2; - prv_dma_request_processing(state); + state->queue_buf[HAL_AUDCODEC_DAC_CH0] = haprc->buf[HAL_AUDCODEC_DAC_CH0] + haprc->bufSize / 2; + prv_dma_request_processing(state); } -void HAL_AUDCODEC_TxHalfCpltCallback(AUDCODEC_HandleTypeDef *haprc, int cid) -{ - AudioDeviceState* state = container_of(haprc, struct AudioState, audcodec); +void HAL_AUDCODEC_TxHalfCpltCallback(AUDCODEC_HandleTypeDef *haprc, int cid) { + AudioDeviceState *state = container_of(haprc, struct AudioState, audcodec); - state->queue_buf[HAL_AUDCODEC_DAC_CH0] = haprc->buf[HAL_AUDCODEC_DAC_CH0]; - prv_dma_request_processing(state); + state->queue_buf[HAL_AUDCODEC_DAC_CH0] = haprc->buf[HAL_AUDCODEC_DAC_CH0]; + prv_dma_request_processing(state); } diff --git a/src/fw/drivers/speaker/sf32lb52/audio.c b/src/fw/drivers/speaker/sf32lb52/audio.c index 47e75386c9..0d55be0121 100644 --- a/src/fw/drivers/speaker/sf32lb52/audio.c +++ b/src/fw/drivers/speaker/sf32lb52/audio.c @@ -7,41 +7,41 @@ #include #include -#define PA_POWER_DELAY_TIME (200) /* us */ +#define PA_POWER_DELAY_TIME (200) /* us */ -void audio_init(AudioDevice* audio_device) { - gpio_output_init(&audio_device->pa_ctrl, GPIO_OType_PP); - gpio_output_set(&audio_device->pa_ctrl, false); - delay_us(PA_POWER_DELAY_TIME*10); - audec_init(audio_device); +void audio_init(AudioDevice *audio_device) { + gpio_output_init(&audio_device->pa_ctrl, GPIO_OType_PP); + gpio_output_set(&audio_device->pa_ctrl, false); + delay_us(PA_POWER_DELAY_TIME * 10); + audec_init(audio_device); } -void audio_start(AudioDevice* audio_device, AudioTransCB cb) { - if (audio_device->power_ops && audio_device->power_ops->power_up) { - audio_device->power_ops->power_up(); - } - - gpio_output_set(&audio_device->pa_ctrl, true); - delay_us(PA_POWER_DELAY_TIME); - gpio_output_set(&audio_device->pa_ctrl, false); - delay_us(PA_POWER_DELAY_TIME); - gpio_output_set(&audio_device->pa_ctrl, true); - audec_start(audio_device, cb); +void audio_start(AudioDevice *audio_device, AudioTransCB cb) { + if (audio_device->power_ops && audio_device->power_ops->power_up) { + audio_device->power_ops->power_up(); + } + + gpio_output_set(&audio_device->pa_ctrl, true); + delay_us(PA_POWER_DELAY_TIME); + gpio_output_set(&audio_device->pa_ctrl, false); + delay_us(PA_POWER_DELAY_TIME); + gpio_output_set(&audio_device->pa_ctrl, true); + audec_start(audio_device, cb); } -uint32_t audio_write(AudioDevice* audio_device, void *writeBuf, uint32_t size) { - return audec_write(audio_device, writeBuf, size); +uint32_t audio_write(AudioDevice *audio_device, void *writeBuf, uint32_t size) { + return audec_write(audio_device, writeBuf, size); } -void audio_set_volume(AudioDevice* audio_device, int volume) { - audec_set_vol(audio_device, volume); +void audio_set_volume(AudioDevice *audio_device, int volume) { + audec_set_vol(audio_device, volume); } -void audio_stop(AudioDevice* audio_device) { - audec_stop(audio_device); - gpio_output_set(&audio_device->pa_ctrl, false); +void audio_stop(AudioDevice *audio_device) { + audec_stop(audio_device); + gpio_output_set(&audio_device->pa_ctrl, false); - if (audio_device->power_ops && audio_device->power_ops->power_down) { - audio_device->power_ops->power_down(); - } + if (audio_device->power_ops && audio_device->power_ops->power_down) { + audio_device->power_ops->power_down(); + } } diff --git a/src/fw/drivers/stubs/ambient_light.c b/src/fw/drivers/stubs/ambient_light.c index f1f95f079a..6eccd96e75 100644 --- a/src/fw/drivers/stubs/ambient_light.c +++ b/src/fw/drivers/stubs/ambient_light.c @@ -24,7 +24,7 @@ uint32_t ambient_light_get_light_level(void) { void command_als_read(void) { char buffer[16]; - prompt_send_response_fmt(buffer, sizeof(buffer), "%"PRIu32"", ambient_light_get_light_level()); + prompt_send_response_fmt(buffer, sizeof(buffer), "%" PRIu32 "", ambient_light_get_light_level()); } uint32_t ambient_light_get_dark_threshold(void) { diff --git a/src/fw/drivers/stubs/otp.c b/src/fw/drivers/stubs/otp.c index cb66dbb7b9..cdde8868a0 100644 --- a/src/fw/drivers/stubs/otp.c +++ b/src/fw/drivers/stubs/otp.c @@ -2,11 +2,11 @@ static char slot[32]; -char * otp_get_slot(const uint8_t index) { +char *otp_get_slot(const uint8_t index) { return slot; } -uint8_t * otp_get_lock(const uint8_t index) { +uint8_t *otp_get_lock(const uint8_t index) { return (uint8_t *)slot; } diff --git a/src/fw/drivers/stubs/watchdog.c b/src/fw/drivers/stubs/watchdog.c index 73bf9defaf..a30a0a3ecb 100644 --- a/src/fw/drivers/stubs/watchdog.c +++ b/src/fw/drivers/stubs/watchdog.c @@ -23,13 +23,13 @@ static McuRebootReason s_cached_reset_flag; McuRebootReason watchdog_clear_reset_flag(void) { s_cached_reset_flag = (McuRebootReason){ - .brown_out_reset = 0, - .pin_reset = 0, - .power_on_reset = 1, - .software_reset = 0, - .independent_watchdog_reset = 0, - .window_watchdog_reset = 0, - .low_power_manager_reset = 0, + .brown_out_reset = 0, + .pin_reset = 0, + .power_on_reset = 1, + .software_reset = 0, + .independent_watchdog_reset = 0, + .window_watchdog_reset = 0, + .low_power_manager_reset = 0, }; return s_cached_reset_flag; diff --git a/src/fw/drivers/task_watchdog.c b/src/fw/drivers/task_watchdog.c index 7d6920455e..84a146d68b 100644 --- a/src/fw/drivers/task_watchdog.c +++ b/src/fw/drivers/task_watchdog.c @@ -31,10 +31,11 @@ #define APP_THROTTLE_TIME_MS 300 -// These bits get set by calls to task_watchdog_bit_set and checked and cleared periodically by our watchdog feed +// These bits get set by calls to task_watchdog_bit_set and checked and cleared periodically by our +// watchdog feed static PebbleTaskBitset s_watchdog_bits = 0; -#define DEFAULT_TASK_WATCHDOG_MASK ( 1 << PebbleTask_NewTimers ) +#define DEFAULT_TASK_WATCHDOG_MASK (1 << PebbleTask_NewTimers) static PebbleTaskBitset s_watchdog_mask = DEFAULT_TASK_WATCHDOG_MASK; _Static_assert(sizeof(s_watchdog_bits) == sizeof(s_watchdog_mask), @@ -45,7 +46,7 @@ _Static_assert(sizeof(s_watchdog_bits) == sizeof(s_watchdog_mask), static TimerID s_throttle_timer_id = TIMER_INVALID_ID; // How often we want the interrupt to fire -#define TIMER_INTERRUPT_HZ (1000 / TASK_WATCHDOG_FEED_PERIOD_MS) +#define TIMER_INTERRUPT_HZ (1000 / TASK_WATCHDOG_FEED_PERIOD_MS) // How many ticks have elapsed since we fed the HW watchdog static uint8_t s_ticks_since_successful_feed = 0; @@ -55,23 +56,23 @@ static uint32_t s_pause_ticks_remaining = 0; // We use this interrupt vector for our lower priority interrupts #ifdef CONFIG_SOC_NRF52 -#define WATCHDOG_FREERTOS_IRQn QDEC_IRQn -#define WATCHDOG_FREERTOS_IRQHandler QDEC_IRQHandler +#define WATCHDOG_FREERTOS_IRQn QDEC_IRQn +#define WATCHDOG_FREERTOS_IRQHandler QDEC_IRQHandler #elif defined(CONFIG_SOC_SF32LB52) -#define WATCHDOG_FREERTOS_IRQn USART5_IRQn -#define WATCHDOG_FREERTOS_IRQHandler USART5_IRQHandler +#define WATCHDOG_FREERTOS_IRQn USART5_IRQn +#define WATCHDOG_FREERTOS_IRQHandler USART5_IRQHandler #elif defined(CONFIG_QEMU) -#define WATCHDOG_FREERTOS_IRQn WATCHDOG_IRQn -#define WATCHDOG_FREERTOS_IRQHandler WATCHDOG_IRQHandler +#define WATCHDOG_FREERTOS_IRQn WATCHDOG_IRQn +#define WATCHDOG_FREERTOS_IRQHandler WATCHDOG_IRQHandler #else -#define WATCHDOG_FREERTOS_IRQn CAN2_SCE_IRQn -#define WATCHDOG_FREERTOS_IRQHandler CAN2_SCE_IRQHandler +#define WATCHDOG_FREERTOS_IRQn CAN2_SCE_IRQn +#define WATCHDOG_FREERTOS_IRQHandler CAN2_SCE_IRQHandler #endif static void prv_task_watchdog_feed(void); static void prv_log_stuck_timer_task(RebootReason *reboot_reason) { - void* current_cb = new_timer_debug_get_current_callback(); + void *current_cb = new_timer_debug_get_current_callback(); if (!current_cb) { PBL_LOG_SYNC_WRN("No timer in progress."); @@ -95,7 +96,7 @@ static void prv_log_stuck_system_task(RebootReason *reboot_reason) { } static void prv_log_stuck_task(RebootReason *reboot_reason, PebbleTask task) { - struct pbl_thread_saved_regs regs = { 0 }; + struct pbl_thread_saved_regs regs = {0}; struct pbl_thread *thread = pebble_task_get_thread(task); if (thread) { pbl_thread_saved_regs(thread, ®s); @@ -103,7 +104,8 @@ static void prv_log_stuck_task(RebootReason *reboot_reason, PebbleTask task) { void *current_lr = (void *)regs.lr; void *current_pc = (void *)regs.pc; - PBL_LOG_SYNC_WRN("Task <%s> stuck: LR: %p PC: %p", pebble_task_get_name(task), current_lr, current_pc); + PBL_LOG_SYNC_WRN("Task <%s> stuck: LR: %p PC: %p", pebble_task_get_name(task), current_lr, + current_pc); reboot_reason->watchdog.stuck_task_pc = (uint32_t)current_pc; reboot_reason->watchdog.stuck_task_lr = (uint32_t)current_lr; } @@ -113,10 +115,7 @@ static void prv_log_stuck_task(RebootReason *reboot_reason, PebbleTask task) { // so it's safe from above PBL_IRQ_PRIO_MAX_SYSCALL. static void prv_capture_stuck_task_info(RebootReason *reboot_reason) { const PebbleTask tasks_in_reverse_priority[] = { - PebbleTask_KernelBackground, - PebbleTask_KernelMain, - PebbleTask_PULSE, - PebbleTask_NewTimers + PebbleTask_KernelBackground, PebbleTask_KernelMain, PebbleTask_PULSE, PebbleTask_NewTimers }; for (unsigned int i = 0; i < ARRAY_LENGTH(tasks_in_reverse_priority); ++i) { @@ -136,20 +135,19 @@ static void prv_capture_stuck_task_info(RebootReason *reboot_reason) { #endif static void prv_log_failed_message(RebootReason *reboot_reason) { - PBL_LOG_SYNC_WRN("Watchdog feed failed, last feed %dms ago, current status 0x%"PRIx16" mask 0x%"PRIx16, - (s_ticks_since_successful_feed * 1000) / TIMER_INTERRUPT_HZ, - s_watchdog_bits, s_watchdog_mask); - - // Log about the tasks in reverse priority order. If we have multiple tasks stuck, this might just be because the - // highest priority of the stuck tasks is preventing the other tasks from getting scheduled. This way, the most - // suspicious task will get logged about last and will have it's values stored in the RTC backup registers. - // We'll have to remember to update this list whenever we add additional tasks to the mask. For now this is all - // the ones that the task_watchdog service watches over. + PBL_LOG_SYNC_WRN("Watchdog feed failed, last feed %dms ago, current status 0x%" PRIx16 + " mask 0x%" PRIx16, + (s_ticks_since_successful_feed * 1000) / TIMER_INTERRUPT_HZ, s_watchdog_bits, + s_watchdog_mask); + + // Log about the tasks in reverse priority order. If we have multiple tasks stuck, this might just + // be because the highest priority of the stuck tasks is preventing the other tasks from getting + // scheduled. This way, the most suspicious task will get logged about last and will have it's + // values stored in the RTC backup registers. We'll have to remember to update this list whenever + // we add additional tasks to the mask. For now this is all the ones that the task_watchdog + // service watches over. const PebbleTask tasks_in_reverse_priority[] = { - PebbleTask_KernelBackground, - PebbleTask_KernelMain, - PebbleTask_PULSE, - PebbleTask_NewTimers + PebbleTask_KernelBackground, PebbleTask_KernelMain, PebbleTask_PULSE, PebbleTask_NewTimers }; for (unsigned int i = 0; i < ARRAY_LENGTH(tasks_in_reverse_priority); ++i) { @@ -212,16 +210,15 @@ void WATCHDOG_FREERTOS_IRQHandler(void) { reboot_reason_get(&reason); if (reason.code == RebootReasonCode_Watchdog) { // Check if system task is the one triggering the watchdog - PebbleTaskBitset new_mask = - s_watchdog_mask & ~(1 << PebbleTask_KernelBackground); + PebbleTaskBitset new_mask = s_watchdog_mask & ~(1 << PebbleTask_KernelBackground); if ((new_mask & s_watchdog_bits) == new_mask) { // Put system task callback using from ISR variant PebbleEvent event = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = prv_system_task_starved_callback, - .data = NULL, - }, + .type = PEBBLE_CALLBACK_EVENT, + .callback = { + .callback = prv_system_task_starved_callback, + .data = NULL, + }, }; event_put_isr(&event); } @@ -248,12 +245,13 @@ void WATCHDOG_FREERTOS_IRQHandler(void) { // Public functions // ------------------------------------------------------------------------------------------------- -// Setup a very high priority interrupt to fire periodically. This ISR will call task_watchdog_feed() -// which resets the watchdog timer if it detects that none of our watchable tasks are stuck. +// Setup a very high priority interrupt to fire periodically. This ISR will call +// task_watchdog_feed() which resets the watchdog timer if it detects that none of our watchable +// tasks are stuck. void task_watchdog_init(void) { - // Setup another unused interrupt vector to handle our low priority interrupts. When we need to do higher - // level functions (like PBL_LOG), we trigger this lower-priority interrupt to fire. Since it runs at - // PBL_IRQ_PRIO_MAX_SYSCALL or lower, it can at least call FreeRTOS ISR functions. + // Setup another unused interrupt vector to handle our low priority interrupts. When we need to do + // higher level functions (like PBL_LOG), we trigger this lower-priority interrupt to fire. Since + // it runs at PBL_IRQ_PRIO_MAX_SYSCALL or lower, it can at least call FreeRTOS ISR functions. NVIC_SetPriority(WATCHDOG_FREERTOS_IRQn, PBL_IRQ_PRIO_MAX_SYSCALL); NVIC_EnableIRQ(WATCHDOG_FREERTOS_IRQn); @@ -321,21 +319,22 @@ void task_watchdog_step_elapsed_time_ms(uint32_t elapsed_ms) { prv_task_watchdog_feed(); } -#define WATCHDOG_WARN_TICK_CNT (5 * TIMER_INTERRUPT_HZ) /* 5s */ -#define WATCHDOG_COREDUMP_TICK_CNT ((65 * TIMER_INTERRUPT_HZ) / 10) /* 6.5 s */ +#define WATCHDOG_WARN_TICK_CNT (5 * TIMER_INTERRUPT_HZ) /* 5s */ +#define WATCHDOG_COREDUMP_TICK_CNT ((65 * TIMER_INTERRUPT_HZ) / 10) /* 6.5 s */ //! Test to see if all the bits are set. If so, feed the hardware watchdog. //! Note: Should only ever be called upon exit from stop mode and from our //! high priority software watchdog timer. To actually prevent a particular //! task from triggering a watchdog you can call task_watchdog_bit_set to feed it static void prv_task_watchdog_feed(void) { - // NOTE! This function runs from a timer interrupt setup by the watchdog_feed_timer driver that is at a priority - // higher than PBL_IRQ_PRIO_MAX_SYSCALL. This means you can't call ANY FreeRTOS functions. - // Careful what you put here. + // NOTE! This function runs from a timer interrupt setup by the watchdog_feed_timer driver that is + // at a priority higher than PBL_IRQ_PRIO_MAX_SYSCALL. This means you can't call ANY FreeRTOS + // functions. Careful what you put here. - // We do want to log watchdog actions, since it's really important for debugging watchdog stalls either on - // bigboards through serial or using flash logging. To accomplish this trigger a lower priority interrupt to fire, - // which is at or below PBL_IRQ_PRIO_MAX_SYSCALL and make our logging calls from there. + // We do want to log watchdog actions, since it's really important for debugging watchdog stalls + // either on bigboards through serial or using flash logging. To accomplish this trigger a lower + // priority interrupt to fire, which is at or below PBL_IRQ_PRIO_MAX_SYSCALL and make our logging + // calls from there. // Handle pause state if (s_pause_ticks_remaining > 0) { @@ -345,7 +344,7 @@ static void prv_task_watchdog_feed(void) { return; } - static int s_last_warning_message_tick_time = 0; //!< Used to rate limit the warning message + static int s_last_warning_message_tick_time = 0; //!< Used to rate limit the warning message if ((s_watchdog_bits & s_watchdog_mask) == s_watchdog_mask) { // All tasks have checked in, feed the actual watchdog and clear any state. @@ -357,7 +356,8 @@ static void prv_task_watchdog_feed(void) { // We logged a warning message, clear this state as we apparently recovered. reboot_reason_clear(); - // Trigger our lower priority interrupt to fire. If it fires when reboot reason is not RebootReasonCode_Watchdog, + // Trigger our lower priority interrupt to fire. If it fires when reboot reason is not + // RebootReasonCode_Watchdog, // it simply logs a message that the we recovered from a watchdog stall NVIC_SetPendingIRQ(WATCHDOG_FREERTOS_IRQn); @@ -371,12 +371,11 @@ static void prv_task_watchdog_feed(void) { if (s_ticks_since_successful_feed >= WATCHDOG_WARN_TICK_CNT && ((s_ticks_since_successful_feed - s_last_warning_message_tick_time) > 0)) { - // FIXME PBL-39328: Truncate s_watchdog_bits and s_watchdog mask // to eight bits each. RebootReason reboot_reason = { - .code = RebootReasonCode_Watchdog, - .data8 = { (uint8_t)s_watchdog_bits, (uint8_t)s_watchdog_mask } + .code = RebootReasonCode_Watchdog, + .data8 = {(uint8_t)s_watchdog_bits, (uint8_t)s_watchdog_mask} }; reboot_reason_set(&reboot_reason); diff --git a/src/fw/drivers/temperature/stubs.c b/src/fw/drivers/temperature/stubs.c index 73a0f465ed..f73c8c076c 100644 --- a/src/fw/drivers/temperature/stubs.c +++ b/src/fw/drivers/temperature/stubs.c @@ -7,7 +7,6 @@ #include "console/prompt.h" void temperature_init(void) { - } int32_t temperature_read(void) { @@ -16,5 +15,5 @@ int32_t temperature_read(void) { void command_temperature_read(void) { char buffer[32]; - prompt_send_response_fmt(buffer, sizeof(buffer), "%"PRId32" ", temperature_read()); + prompt_send_response_fmt(buffer, sizeof(buffer), "%" PRId32 " ", temperature_read()); } diff --git a/src/fw/drivers/touch/cst816/cst816.c b/src/fw/drivers/touch/cst816/cst816.c index 8db72cf7ec..52d284a600 100644 --- a/src/fw/drivers/touch/cst816/cst816.c +++ b/src/fw/drivers/touch/cst816/cst816.c @@ -21,50 +21,50 @@ PBL_LOG_MODULE_DEFINE(driver_touch_cst816, CONFIG_DRIVER_TOUCH_LOG_LEVEL); -#define CST816_RESET_CYCLE_TIME 10 /* ms */ -#define CST816_POR_DELAY_TIME 110 /* ms */ -#define CST816_REG_WR_DELAY_TIME 2 /* ms */ -#define CST816_FW_CHECKSUM_CAL_TIME 500 /* ms */ - -#define CST816_POWER_MODE_REG 0xE5 -#define CST816_POWER_MODE_SLEEP 0x03 -#define CST816_CHIP_ID_REG 0xA7 -#define CST816_FW_VERSION_REG 0xA9 -#define CST816_TOUCH_DATA_REG 0x02 -#define CST816_TOUCH_DATA_SIZE 5 -#define CST816_GESTURE_ID 0x01 -#define CST816_GESTURE_NONE 0x00 -#define CST816_GESTURE_RIGHT 0x01 -#define CST816_GESTURE_LEFT 0x02 -#define CST816_GESTURE_DOWN 0x03 -#define CST816_GESTURE_UP 0x04 -#define CST816_GESTURE_CLICK 0x05 -#define CST816_GESTURE_DOUBLE_CLICK 0x0B -#define CST816_GESTURE_LONG_PRESS 0x0C - -#define CST816_BOOT_MODE_REG 0xA001 -#define CST816_BOOT_MODE_CMD 0xAB -#define CST816_BOOT_FLAG_REG 0xA003 -#define CST816_BOOT_FLAG_VAL 0xC1 -#define CST816_FW_START_ADDR_REG 0xA014 -#define CST816_FW_PAGE_REG 0xA018 -#define CST816_FW_PAGE_SIZE 512 -#define CST816_FW_PAGE_DONE 0xA004 -#define CST816_FW_PAGE_STATE 0xA005 -#define CST816_BOOT_EXIT_REG 0xA006 -#define CST816_BOOT_EXIT_VAL 0xEE -#define CST816_FW_PAGE_READY 0x55 -#define CST816_FW_WR_TIME 100 /* ms */ -#define CST816_FW_CHECKSUM_REG 0xA008 -#define CST816_FW_VER_INFO_INDEX (-11) +#define CST816_RESET_CYCLE_TIME 10 /* ms */ +#define CST816_POR_DELAY_TIME 110 /* ms */ +#define CST816_REG_WR_DELAY_TIME 2 /* ms */ +#define CST816_FW_CHECKSUM_CAL_TIME 500 /* ms */ + +#define CST816_POWER_MODE_REG 0xE5 +#define CST816_POWER_MODE_SLEEP 0x03 +#define CST816_CHIP_ID_REG 0xA7 +#define CST816_FW_VERSION_REG 0xA9 +#define CST816_TOUCH_DATA_REG 0x02 +#define CST816_TOUCH_DATA_SIZE 5 +#define CST816_GESTURE_ID 0x01 +#define CST816_GESTURE_NONE 0x00 +#define CST816_GESTURE_RIGHT 0x01 +#define CST816_GESTURE_LEFT 0x02 +#define CST816_GESTURE_DOWN 0x03 +#define CST816_GESTURE_UP 0x04 +#define CST816_GESTURE_CLICK 0x05 +#define CST816_GESTURE_DOUBLE_CLICK 0x0B +#define CST816_GESTURE_LONG_PRESS 0x0C + +#define CST816_BOOT_MODE_REG 0xA001 +#define CST816_BOOT_MODE_CMD 0xAB +#define CST816_BOOT_FLAG_REG 0xA003 +#define CST816_BOOT_FLAG_VAL 0xC1 +#define CST816_FW_START_ADDR_REG 0xA014 +#define CST816_FW_PAGE_REG 0xA018 +#define CST816_FW_PAGE_SIZE 512 +#define CST816_FW_PAGE_DONE 0xA004 +#define CST816_FW_PAGE_STATE 0xA005 +#define CST816_BOOT_EXIT_REG 0xA006 +#define CST816_BOOT_EXIT_VAL 0xEE +#define CST816_FW_PAGE_READY 0x55 +#define CST816_FW_WR_TIME 100 /* ms */ +#define CST816_FW_CHECKSUM_REG 0xA008 +#define CST816_FW_VER_INFO_INDEX (-11) /* Workaround: the CST816 occasionally wedges and stops asserting its INT line. * If no touch activity is seen between two watchdog checks, hard-reset it. */ -#define CST816_WATCHDOG_PERIOD_MIN 30 +#define CST816_WATCHDOG_PERIOD_MIN 30 /* The chip stays awake for 2s after a wake; an interrupt seen >=2s after the * previous one therefore marks a fresh sleep->awake transition. */ -#define CST816_WAKE_SPACING_MS 2000 +#define CST816_WAKE_SPACING_MS 2000 static bool s_callback_scheduled = false; static bool s_enabled = false; @@ -78,20 +78,21 @@ static void cst816_hw_reset(void); static void prv_watchdog_cb(void *data); static RegularTimerInfo s_watchdog_timer = { - .cb = prv_watchdog_cb, + .cb = prv_watchdog_cb, }; -static bool prv_read_data(uint16_t register_address, uint8_t *result, uint16_t size, bool is_work_mode) { +static bool prv_read_data(uint16_t register_address, uint8_t *result, uint16_t size, + bool is_work_mode) { pbl_mutex_lock(&s_i2c_lock, PBL_FOREVER); - I2CSlavePort* port = CST816->i2c; + I2CSlavePort *port = CST816->i2c; uint8_t addr_size = 1; - if(!is_work_mode) { + if (!is_work_mode) { port = CST816->i2c_boot; addr_size = 2; } i2c_use(port); - uint8_t regad[2] = { register_address >> 8, register_address & 0xFF }; - bool rv = i2c_write_block(port, addr_size, is_work_mode?regad+1:regad); + uint8_t regad[2] = {register_address >> 8, register_address & 0xFF}; + bool rv = i2c_write_block(port, addr_size, is_work_mode ? regad + 1 : regad); if (rv) { rv = i2c_read_block(port, size, result); } @@ -100,11 +101,12 @@ static bool prv_read_data(uint16_t register_address, uint8_t *result, uint16_t s return rv; } -static bool prv_write_data(uint16_t register_address, const uint8_t *datum, uint16_t size, bool is_work_mode) { +static bool prv_write_data(uint16_t register_address, const uint8_t *datum, uint16_t size, + bool is_work_mode) { pbl_mutex_lock(&s_i2c_lock, PBL_FOREVER); - I2CSlavePort* port = CST816->i2c; + I2CSlavePort *port = CST816->i2c; uint8_t addr_size = 1; - if(!is_work_mode) { + if (!is_work_mode) { port = CST816->i2c_boot; addr_size = 2; } @@ -112,8 +114,8 @@ static bool prv_write_data(uint16_t register_address, const uint8_t *datum, uint uint8_t data[size + sizeof(register_address)]; data[0] = register_address >> 8; data[1] = register_address & 0xFF; - memcpy(data+sizeof(register_address), datum, size); - bool rv = i2c_write_block(port, size+addr_size, is_work_mode?data+1:data); + memcpy(data + sizeof(register_address), datum, size); + bool rv = i2c_write_block(port, size + addr_size, is_work_mode ? data + 1 : data); i2c_release(port); pbl_mutex_unlock(&s_i2c_lock); return rv; @@ -148,8 +150,7 @@ static bool cst816_enter_bootmode(void) { return false; } -static uint16_t cst816_read_checksum(void) -{ +static uint16_t cst816_read_checksum(void) { uint8_t cmd = 0; bool rv = prv_write_data(CST816_BOOT_FLAG_REG, &cmd, 1, 0); psleep(CST816_FW_CHECKSUM_CAL_TIME); @@ -168,14 +169,14 @@ static bool cst816_fw_update(void) { uint16_t length = (((uint16_t)(app_bin[3] & 0xFF)) << 8) | app_bin[2]; uint16_t checksum = (((uint16_t)(app_bin[5] & 0xFF)) << 8) | app_bin[4]; uint16_t fw_offset = 6; - + while (length) { PBL_LOG_DBG("fw start_addr:%d length:%d", start_addr, length); - uint8_t addr[2] = {start_addr&0xff, start_addr>>8}; + uint8_t addr[2] = {start_addr & 0xff, start_addr >> 8}; bool rv = prv_write_data(CST816_FW_START_ADDR_REG, addr, 2, 0); psleep(CST816_REG_WR_DELAY_TIME); - if(!prv_write_data(CST816_FW_PAGE_REG, app_bin+fw_offset, - length>=CST816_FW_PAGE_SIZE?CST816_FW_PAGE_SIZE:length , 0)) { + if (!prv_write_data(CST816_FW_PAGE_REG, app_bin + fw_offset, + length >= CST816_FW_PAGE_SIZE ? CST816_FW_PAGE_SIZE : length, 0)) { PBL_LOG_ERR("cst816 update fw error by iic"); return false; } @@ -183,8 +184,8 @@ static bool cst816_fw_update(void) { uint8_t cmd = 0xEE; rv = prv_write_data(CST816_FW_PAGE_DONE, &cmd, 1, 0); psleep(CST816_FW_WR_TIME); - for (int t=0;; t++) { - if(t > 50) { + for (int t = 0;; t++) { + if (t > 50) { PBL_LOG_ERR("cst816 update fw error by writing timeout"); return false; } @@ -197,7 +198,7 @@ static bool cst816_fw_update(void) { } fw_offset += CST816_FW_PAGE_SIZE; start_addr += CST816_FW_PAGE_SIZE; - length -= length>=CST816_FW_PAGE_SIZE?CST816_FW_PAGE_SIZE:length; + length -= length >= CST816_FW_PAGE_SIZE ? CST816_FW_PAGE_SIZE : length; } uint16_t checksum_read = cst816_read_checksum(); @@ -242,7 +243,6 @@ void touch_sensor_init(void) { uint8_t fw_version; bool rv; - #ifndef RESET_PIN_CTRLBY_NPM1300 gpio_output_init(&CST816->reset, GPIO_OType_PP); #endif @@ -283,7 +283,7 @@ void touch_sensor_init(void) { touch_sensor_set_enabled(false); } -static void prv_process_pending_messages(void* context) { +static void prv_process_pending_messages(void *context) { bool rv; s_callback_scheduled = false; @@ -319,8 +319,8 @@ static void prv_process_pending_messages(void* context) { uint8_t press = data[0] & 0x0F; GPoint point = { - .x = (((uint16_t)(data[1] & 0x0F)) << 8) | data[2], - .y = (((uint16_t)(data[3] & 0X0F)) << 8) | data[4], + .x = (((uint16_t)(data[1] & 0x0F)) << 8) | data[2], + .y = (((uint16_t)(data[3] & 0X0F)) << 8) | data[4], }; if (CST816->invert_x_axis) { diff --git a/src/fw/drivers/uart/nrf5.c b/src/fw/drivers/uart/nrf5.c index 0d1f0c9be9..671b9167a0 100644 --- a/src/fw/drivers/uart/nrf5.c +++ b/src/fw/drivers/uart/nrf5.c @@ -20,53 +20,61 @@ PBL_LOG_MODULE_DEFINE(driver_uart_nrf5, CONFIG_DRIVER_UART_LOG_LEVEL); static void _uart_event_handler(const nrfx_uarte_event_t *event, void *ctx); -static void _timer_event_handler(nrf_timer_event_t event_type, void *ctx) { } +static void _timer_event_handler(nrf_timer_event_t event_type, void *ctx) { +} void uart_init(UARTDevice *dev) { nrfx_uarte_config_t config = { - .txd_pin = dev->tx_gpio, - .rxd_pin = dev->rx_gpio, - .rts_pin = dev->rts_gpio, - .cts_pin = dev->cts_gpio, - .p_context = (void *)dev, - .tx_cache = { .p_buffer = (uint8_t *) dev->state->tx_cache_buffer, .length = sizeof(dev->state->tx_cache_buffer) }, - .rx_cache = { .p_buffer = (uint8_t *) dev->state->rx_cache_buffer, .length = sizeof(dev->state->rx_cache_buffer) }, - .baudrate = NRF_UARTE_BAUDRATE_1000000, - .config = { - .hwfc = NRF_UARTE_HWFC_DISABLED, - .parity = NRF_UARTE_PARITY_EXCLUDED, - .stop = NRF_UARTE_STOP_ONE - }, - .interrupt_priority = NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY, + .txd_pin = dev->tx_gpio, + .rxd_pin = dev->rx_gpio, + .rts_pin = dev->rts_gpio, + .cts_pin = dev->cts_gpio, + .p_context = (void *)dev, + .tx_cache = + {.p_buffer = (uint8_t *)dev->state->tx_cache_buffer, + .length = sizeof(dev->state->tx_cache_buffer)}, + .rx_cache = + {.p_buffer = (uint8_t *)dev->state->rx_cache_buffer, + .length = sizeof(dev->state->rx_cache_buffer)}, + .baudrate = NRF_UARTE_BAUDRATE_1000000, + .config = + {.hwfc = NRF_UARTE_HWFC_DISABLED, + .parity = NRF_UARTE_PARITY_EXCLUDED, + .stop = NRF_UARTE_STOP_ONE}, + .interrupt_priority = NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY, }; nrfx_err_t err = nrfx_uarte_init(&dev->periph, &config, _uart_event_handler); PBL_ASSERTN(err == NRFX_SUCCESS); - - /* Roughly patterned off of https://devzone.nordicsemi.com/f/nordic-q-a/28420/uarte-in-circular-mode */ + + /* Roughly patterned off of + * https://devzone.nordicsemi.com/f/nordic-q-a/28420/uarte-in-circular-mode */ nrfx_timer_config_t tconfig = { - .frequency = 1000000, /* dummy */ - .mode = NRF_TIMER_MODE_COUNTER, - .bit_width = NRF_TIMER_BIT_WIDTH_32, - .interrupt_priority = NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY, - .p_context = NULL, + .frequency = 1000000, /* dummy */ + .mode = NRF_TIMER_MODE_COUNTER, + .bit_width = NRF_TIMER_BIT_WIDTH_32, + .interrupt_priority = NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY, + .p_context = NULL, }; err = nrfx_timer_init(&dev->counter, &tconfig, _timer_event_handler); PBL_ASSERTN(err == NRFX_SUCCESS); - - + #ifdef NRF_PPI_BASE nrf_ppi_channel_t rxdrdy_count_channel; nrf_ppi_channel_t endrx_clear_channel; err = nrfx_ppi_channel_alloc(&rxdrdy_count_channel); PBL_ASSERTN(err == NRFX_SUCCESS); - nrfx_ppi_channel_assign(rxdrdy_count_channel, nrfx_uarte_event_address_get(&dev->periph, NRF_UARTE_EVENT_RXDRDY), nrfx_timer_task_address_get(&dev->counter, NRF_TIMER_TASK_COUNT)); + nrfx_ppi_channel_assign(rxdrdy_count_channel, + nrfx_uarte_event_address_get(&dev->periph, NRF_UARTE_EVENT_RXDRDY), + nrfx_timer_task_address_get(&dev->counter, NRF_TIMER_TASK_COUNT)); nrfx_ppi_channel_enable(rxdrdy_count_channel); err = nrfx_ppi_channel_alloc(&endrx_clear_channel); PBL_ASSERTN(err == NRFX_SUCCESS); - nrfx_ppi_channel_assign(endrx_clear_channel, nrfx_uarte_event_address_get(&dev->periph, NRF_UARTE_EVENT_ENDRX), nrfx_timer_task_address_get(&dev->counter, NRF_TIMER_TASK_CLEAR)); + nrfx_ppi_channel_assign(endrx_clear_channel, + nrfx_uarte_event_address_get(&dev->periph, NRF_UARTE_EVENT_ENDRX), + nrfx_timer_task_address_get(&dev->counter, NRF_TIMER_TASK_CLEAR)); nrfx_ppi_channel_enable(endrx_clear_channel); #else uint8_t rxdrdy_count_channel; @@ -74,17 +82,20 @@ void uart_init(UARTDevice *dev) { err = nrfx_dppi_channel_alloc(&rxdrdy_count_channel); PBL_ASSERTN(err == NRFX_SUCCESS); - NRF_DPPI_ENDPOINT_SETUP(nrfx_uarte_event_address_get(&dev->periph, NRF_UARTE_EVENT_RXDRDY), rxdrdy_count_channel); - NRF_DPPI_ENDPOINT_SETUP(nrfx_timer_task_address_get(&dev->counter, NRF_TIMER_TASK_COUNT), rxdrdy_count_channel); + NRF_DPPI_ENDPOINT_SETUP(nrfx_uarte_event_address_get(&dev->periph, NRF_UARTE_EVENT_RXDRDY), + rxdrdy_count_channel); + NRF_DPPI_ENDPOINT_SETUP(nrfx_timer_task_address_get(&dev->counter, NRF_TIMER_TASK_COUNT), + rxdrdy_count_channel); nrfx_dppi_channel_enable(rxdrdy_count_channel); err = nrfx_dppi_channel_alloc(&endrx_clear_channel); PBL_ASSERTN(err == NRFX_SUCCESS); - NRF_DPPI_ENDPOINT_SETUP(nrfx_uarte_event_address_get(&dev->periph, NRF_UARTE_EVENT_ENDRX), endrx_clear_channel); - NRF_DPPI_ENDPOINT_SETUP(nrfx_timer_task_address_get(&dev->counter, NRF_TIMER_TASK_CLEAR), endrx_clear_channel); + NRF_DPPI_ENDPOINT_SETUP(nrfx_uarte_event_address_get(&dev->periph, NRF_UARTE_EVENT_ENDRX), + endrx_clear_channel); + NRF_DPPI_ENDPOINT_SETUP(nrfx_timer_task_address_get(&dev->counter, NRF_TIMER_TASK_CLEAR), + endrx_clear_channel); nrfx_dppi_channel_enable(endrx_clear_channel); #endif - dev->state->initialized = true; } @@ -95,19 +106,20 @@ void uart_init_open_drain(UARTDevice *dev) { void uart_init_tx_only(UARTDevice *dev) { nrfx_uarte_config_t config = { - .txd_pin = dev->tx_gpio, - .rxd_pin = NRF_UARTE_PSEL_DISCONNECTED, - .rts_pin = NRF_UARTE_PSEL_DISCONNECTED, - .cts_pin = NRF_UARTE_PSEL_DISCONNECTED, - .p_context = (void *)dev, - .tx_cache = { .p_buffer = (uint8_t *) dev->state->tx_cache_buffer, .length = sizeof(dev->state->tx_cache_buffer) }, - .baudrate = NRF_UARTE_BAUDRATE_1000000, - .config = { - .hwfc = NRF_UARTE_HWFC_DISABLED, - .parity = NRF_UARTE_PARITY_EXCLUDED, - .stop = NRF_UARTE_STOP_ONE - }, - .interrupt_priority = NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY, + .txd_pin = dev->tx_gpio, + .rxd_pin = NRF_UARTE_PSEL_DISCONNECTED, + .rts_pin = NRF_UARTE_PSEL_DISCONNECTED, + .cts_pin = NRF_UARTE_PSEL_DISCONNECTED, + .p_context = (void *)dev, + .tx_cache = + {.p_buffer = (uint8_t *)dev->state->tx_cache_buffer, + .length = sizeof(dev->state->tx_cache_buffer)}, + .baudrate = NRF_UARTE_BAUDRATE_1000000, + .config = + {.hwfc = NRF_UARTE_HWFC_DISABLED, + .parity = NRF_UARTE_PARITY_EXCLUDED, + .stop = NRF_UARTE_STOP_ONE}, + .interrupt_priority = NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY, }; nrfx_err_t err = nrfx_uarte_init(&dev->periph, &config, _uart_event_handler); @@ -126,43 +138,30 @@ void uart_deinit(UARTDevice *dev) { void uart_set_baud_rate(UARTDevice *dev, uint32_t baud_rate) { nrf_uarte_baudrate_t baud_cfg = -#define MKBAUD(b) (baud_rate == b) ? NRF_UARTE_BAUDRATE_##b : - MKBAUD(1200) - MKBAUD(2400) - MKBAUD(4800) - MKBAUD(9600) - MKBAUD(14400) - MKBAUD(19200) - MKBAUD(28800) - MKBAUD(31250) - MKBAUD(38400) - MKBAUD(56000) - MKBAUD(57600) - MKBAUD(76800) - MKBAUD(115200) - MKBAUD(230400) - MKBAUD(250000) - MKBAUD(460800) - MKBAUD(921600) - MKBAUD(1000000) - -1; +#define MKBAUD(b) (baud_rate == b) ? NRF_UARTE_BAUDRATE_##b: + MKBAUD(1200) MKBAUD(2400) MKBAUD(4800) MKBAUD(9600) MKBAUD(14400) MKBAUD(19200) MKBAUD(28800) + MKBAUD(31250) MKBAUD(38400) MKBAUD(56000) MKBAUD(57600) MKBAUD(76800) MKBAUD(115200) + MKBAUD(230400) MKBAUD(250000) MKBAUD(460800) MKBAUD(921600) MKBAUD(1000000) - + 1; if (baud_cfg == (nrf_uarte_baudrate_t)-1) WTF; nrfx_uarte_config_t config = { - .txd_pin = dev->tx_gpio, - .rxd_pin = dev->rx_gpio, - .rts_pin = dev->rts_gpio, - .cts_pin = dev->cts_gpio, - .p_context = (void *)dev, - .tx_cache = { .p_buffer = (uint8_t *) dev->state->tx_cache_buffer, .length = sizeof(dev->state->tx_cache_buffer) }, - //.rx_cache = { .p_buffer = (uint8_t *) dev->state->rx_cache_buffer, .length = sizeof(dev->state->rx_cache_buffer) }, - .baudrate = baud_cfg, - .config = { - .hwfc = NRF_UARTE_HWFC_DISABLED, - .parity = NRF_UARTE_PARITY_EXCLUDED, - .stop = NRF_UARTE_STOP_ONE - }, - .interrupt_priority = NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY, + .txd_pin = dev->tx_gpio, + .rxd_pin = dev->rx_gpio, + .rts_pin = dev->rts_gpio, + .cts_pin = dev->cts_gpio, + .p_context = (void *)dev, + .tx_cache = + {.p_buffer = (uint8_t *)dev->state->tx_cache_buffer, + .length = sizeof(dev->state->tx_cache_buffer)}, + //.rx_cache = { .p_buffer = (uint8_t *) dev->state->rx_cache_buffer, .length = + // sizeof(dev->state->rx_cache_buffer) }, + .baudrate = baud_cfg, + .config = + {.hwfc = NRF_UARTE_HWFC_DISABLED, + .parity = NRF_UARTE_PARITY_EXCLUDED, + .stop = NRF_UARTE_STOP_ONE}, + .interrupt_priority = NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY, }; nrfx_err_t err = nrfx_uarte_reconfigure(&dev->periph, &config); @@ -229,11 +228,12 @@ bool uart_is_tx_ready(UARTDevice *dev) { bool uart_is_tx_complete(UARTDevice *dev) { return true; - //return nrfx_uarte_tx_in_progress(&dev->periph); + // return nrfx_uarte_tx_in_progress(&dev->periph); } void uart_wait_for_tx_complete(UARTDevice *dev) { - while (!uart_is_tx_complete(dev)) continue; + while (!uart_is_tx_complete(dev)) + continue; } void uart_set_rx_interrupt_handler(UARTDevice *dev, UARTRXInterruptHandler irq_handler) { @@ -272,23 +272,25 @@ static void _uart_event_handler(const nrfx_uarte_event_t *event, void *ctx) { UARTDevice *dev = (UARTDevice *)ctx; switch (event->type) { - case NRFX_UARTE_EVT_RX_BUF_REQUEST: - dev->state->rx_dma_index = (dev->state->rx_dma_index + 1) % DMA_BUFFERS; - nrfx_uarte_rx_buffer_set(&dev->periph, GET_SUBBUF_P(dev, dev->state->rx_dma_index), dev->state->rx_dma_length); - break; - case NRFX_UARTE_EVT_RX_BYTE: - /* we'll catch this up in the ring buffer catchup below */ - break; - case NRFX_UARTE_EVT_RX_DONE: { - dev->state->rx_prod_index = (dev->state->rx_prod_index + 1) % DMA_BUFFERS; - break; - } - default: - break; + case NRFX_UARTE_EVT_RX_BUF_REQUEST: + dev->state->rx_dma_index = (dev->state->rx_dma_index + 1) % DMA_BUFFERS; + nrfx_uarte_rx_buffer_set(&dev->periph, GET_SUBBUF_P(dev, dev->state->rx_dma_index), + dev->state->rx_dma_length); + break; + case NRFX_UARTE_EVT_RX_BYTE: + /* we'll catch this up in the ring buffer catchup below */ + break; + case NRFX_UARTE_EVT_RX_DONE: { + dev->state->rx_prod_index = (dev->state->rx_prod_index + 1) % DMA_BUFFERS; + break; + } + default: + break; } /* catch up on any completed buffers */ - for (; dev->state->rx_cons_index != dev->state->rx_prod_index; dev->state->rx_cons_index = (dev->state->rx_cons_index + 1) % DMA_BUFFERS) { + for (; dev->state->rx_cons_index != dev->state->rx_prod_index; + dev->state->rx_cons_index = (dev->state->rx_cons_index + 1) % DMA_BUFFERS) { uint8_t *buf = GET_SUBBUF_P(dev, dev->state->rx_cons_index); size_t ofs = dev->state->rx_cons_pos; dev->state->rx_cons_pos = 0; @@ -303,9 +305,10 @@ static void _uart_event_handler(const nrfx_uarte_event_t *event, void *ctx) { } } } - + uint32_t curpos = nrfx_timer_capture(&dev->counter, NRF_TIMER_CC_CHANNEL0); - if (dev->state->rx_cons_pos < curpos) { /* if it is greater, then we have wrapped and we will catch it on the completed buffer irq later */ + if (dev->state->rx_cons_pos < curpos) { /* if it is greater, then we have wrapped and we will + catch it on the completed buffer irq later */ uint8_t *buf = GET_SUBBUF_P(dev, dev->state->rx_cons_index); const UARTRXErrorFlags err_flags = {}; /* ignored, for now */ @@ -323,7 +326,7 @@ void uart_start_rx_dma(UARTDevice *dev, void *buffer, uint32_t length) { * triggering the RXSTOP -> RXSTART shortcut; every time we get a RXDRDY, * we trigger a RXSTOP, eat the old buffer, and open the new buffer. ugh! */ - PBL_ASSERTN((((uint32_t) buffer) & 3) == 0); + PBL_ASSERTN((((uint32_t)buffer) & 3) == 0); dev->state->rx_dma_buffer = buffer; dev->state->rx_dma_length = length / DMA_BUFFERS; if (dev->state->rx_dma_length % 4) @@ -335,10 +338,11 @@ void uart_start_rx_dma(UARTDevice *dev, void *buffer, uint32_t length) { nrfx_timer_enable(&dev->counter); nrfx_timer_clear(&dev->counter); - + nrfx_uarte_rxdrdy_enable(&dev->periph); nrfx_uarte_rx_buffer_set(&dev->periph, dev->state->rx_dma_buffer, dev->state->rx_dma_length); - nrfx_uarte_rx_enable(&dev->periph, NRFX_UARTE_RX_ENABLE_CONT | NRFX_UARTE_RX_ENABLE_KEEP_FIFO_CONTENT); + nrfx_uarte_rx_enable(&dev->periph, + NRFX_UARTE_RX_ENABLE_CONT | NRFX_UARTE_RX_ENABLE_KEEP_FIFO_CONTENT); } void uart_stop_rx_dma(UARTDevice *dev) { diff --git a/src/fw/drivers/uart/qemu.c b/src/fw/drivers/uart/qemu.c index 6eb0192dfc..595dc36b54 100644 --- a/src/fw/drivers/uart/qemu.c +++ b/src/fw/drivers/uart/qemu.c @@ -10,22 +10,22 @@ #define REG32(addr) (*(volatile uint32_t *)(addr)) // QEMU pebble-simple-uart register offsets -#define UART_DATA 0x00 -#define UART_STATE 0x04 -#define UART_CTRL 0x08 -#define UART_INT 0x0C +#define UART_DATA 0x00 +#define UART_STATE 0x04 +#define UART_CTRL 0x08 +#define UART_INT 0x0C // STATE register bits -#define STATE_TX_READY (1 << 0) -#define STATE_RX_READY (1 << 1) +#define STATE_TX_READY (1 << 0) +#define STATE_RX_READY (1 << 1) // CTRL register bits (must match QEMU pebble-simple-uart) -#define CTRL_TX_IE (1 << 0) -#define CTRL_RX_IE (1 << 1) +#define CTRL_TX_IE (1 << 0) +#define CTRL_RX_IE (1 << 1) // INT register bits (must match QEMU pebble-simple-uart) -#define INT_TX_PENDING (1 << 0) -#define INT_RX_PENDING (1 << 1) +#define INT_TX_PENDING (1 << 0) +#define INT_RX_PENDING (1 << 1) void uart_init(UARTDevice *dev) { // Clear any pending interrupts @@ -177,8 +177,7 @@ void uart_irq_handler(UARTDevice *dev) { if (dev->state->rx_irq_handler && dev->state->rx_int_enabled) { // Stop if the handler disables RX interrupts (e.g. ISR buffer full); // remaining bytes stay in the UART FIFO for the next interrupt. - while (dev->state->rx_int_enabled && - (REG32(dev->base_addr + UART_STATE) & STATE_RX_READY)) { + while (dev->state->rx_int_enabled && (REG32(dev->base_addr + UART_STATE) & STATE_RX_READY)) { uint8_t byte = (uint8_t)(REG32(dev->base_addr + UART_DATA) & 0xFF); UARTRXErrorFlags err = {}; dev->state->rx_irq_handler(dev, byte, &err); @@ -192,5 +191,4 @@ void uart_irq_handler(UARTDevice *dev) { dev->state->tx_irq_handler(dev); } } - } diff --git a/src/fw/drivers/uart/sf32lb.c b/src/fw/drivers/uart/sf32lb.c index 22ecc4077d..5a0f08e05b 100644 --- a/src/fw/drivers/uart/sf32lb.c +++ b/src/fw/drivers/uart/sf32lb.c @@ -49,13 +49,21 @@ static void prv_init(UARTDevice *dev, uint32_t mode) { } } -void uart_init(UARTDevice *dev) { prv_init(dev, UART_MODE_TX_RX); } +void uart_init(UARTDevice *dev) { + prv_init(dev, UART_MODE_TX_RX); +} -void uart_init_open_drain(UARTDevice *dev) { WTF; } +void uart_init_open_drain(UARTDevice *dev) { + WTF; +} -void uart_init_tx_only(UARTDevice *dev) { prv_init(dev, UART_MODE_TX); } +void uart_init_tx_only(UARTDevice *dev) { + prv_init(dev, UART_MODE_TX); +} -void uart_init_rx_only(UARTDevice *dev) { prv_init(dev, UART_MODE_RX); } +void uart_init_rx_only(UARTDevice *dev) { + prv_init(dev, UART_MODE_RX); +} void uart_deinit(UARTDevice *dev) { HAL_UART_DeInit(&dev->state->huart); @@ -105,7 +113,8 @@ bool uart_is_tx_complete(UARTDevice *dev) { } void uart_wait_for_tx_complete(UARTDevice *dev) { - while (!uart_is_tx_complete(dev)) continue; + while (!uart_is_tx_complete(dev)) + continue; } // Interrupts @@ -171,7 +180,8 @@ void uart_irq_handler(UARTDevice *dev) { .framing_error = uart_has_rx_framing_error(dev), }; // DMA - if (dev->state->rx_dma_buffer && (__HAL_UART_GET_FLAG(&dev->state->huart, UART_FLAG_IDLE) != RESET) && + if (dev->state->rx_dma_buffer && + (__HAL_UART_GET_FLAG(&dev->state->huart, UART_FLAG_IDLE) != RESET) && (__HAL_UART_GET_IT_SOURCE(&dev->state->huart, UART_IT_IDLE) != RESET)) { // process bytes from the DMA buffer const uint32_t dma_length = dev->state->rx_dma_length; @@ -243,7 +253,7 @@ void HAL_UART_RxHalfCpltCallback(UART_HandleTypeDef *huart) { else recv_len = recv_total_index - state->rx_dma_index; - idx = state->rx_dma_index; + idx = state->rx_dma_index; state->rx_dma_index = recv_total_index; if (recv_len) { for (size_t i = 0; i < recv_len; i++) { @@ -252,7 +262,7 @@ void HAL_UART_RxHalfCpltCallback(UART_HandleTypeDef *huart) { state->rx_irq_handler(dev, data, NULL); idx++; if (idx >= state->rx_dma_length) { - idx = 0; + idx = 0; } } } diff --git a/src/fw/drivers/vibe/vibe_aw86225.c b/src/fw/drivers/vibe/vibe_aw86225.c index ca74427c79..b88a3bf5b2 100644 --- a/src/fw/drivers/vibe/vibe_aw86225.c +++ b/src/fw/drivers/vibe/vibe_aw86225.c @@ -13,104 +13,106 @@ PBL_LOG_MODULE_DEFINE(driver_vibe_aw86225, CONFIG_DRIVER_VIBE_LOG_LEVEL); -#define AW862XX_REG_SRST (0x00) -#define AW862XX_REG_PLAYCFG2 (0x07) -#define AW862XX_REG_PLAYCFG3 (0x08) -#define AW862XX_REG_PLAYCFG4 (0x09) -#define AW862XX_REG_WAVCFG1 (0x0A) -#define AW862XX_REG_WAVCFG2 (0x0B) -#define AW862XX_REG_WAVCFG9 (0x12) -#define AW862XX_REG_CONTCFG1 (0x18) -#define AW862XX_REG_CONTCFG2 (0x19) -#define AW862XX_REG_CONTCFG3 (0x1A) -#define AW862XX_REG_CONTCFG6 (0x1D) -#define AW862XX_REG_CONTCFG7 (0x1E) -#define AW862XX_REG_CONTCFG8 (0x1F) -#define AW862XX_REG_CONTCFG9 (0x20) -#define AW862XX_REG_CONTCFG10 (0x21) -#define AW862XX_REG_CONTCFG11 (0x22) -#define AW862XX_REG_CONTRD14 (0x25) -#define AW862XX_REG_CONTRD15 (0x26) -#define AW862XX_REG_CONTRD16 (0x27) -#define AW862XX_REG_CONTRD17 (0x28) -#define AW862XX_REG_RTPCFG1 (0x2D) -#define AW862XX_REG_RTPCFG2 (0x2E) -#define AW862XX_REG_RTPCFG3 (0x2F) -#define AW862XX_REG_GLBRD5 (0x3F) -#define AW862XX_REG_RAMADDRH (0x40) -#define AW862XX_REG_RAMDATA (0x42) -#define AW862XX_REG_SYSCTRL1 (0x43) -#define AW862XX_REG_SYSCTRL2 (0x44) -#define AW862XX_REG_SYSCTRL7 (0x49) -#define AW862XX_REG_DETCFG2 (0x52) -#define AW862XX_REG_DET_VBAT (0x55) -#define AW862XX_REG_DET_LO (0x57) -#define AW862XX_REG_TRIMCFG3 (0x5A) -#define AW862XX_REG_CHIPID (0x64) - -#define AW862XX_BIT_PLAYCFG3_BRK_EN_MASK (~(1<<2)) -#define AW862XX_BIT_PLAYCFG3_BRK_ENABLE (1<<2) -#define AW862XX_BIT_PLAYCFG3_PLAY_MODE_MASK (~(3<<0)) -#define AW862XX_BIT_PLAYCFG3_PLAY_MODE_RAM (0<<0) -#define AW862XX_BIT_PLAYCFG3_PLAY_MODE_CONT (2<<0) -#define AW862XX_BIT_PLAYCFG3_PLAY_MODE_STOP (3<<0) +#define AW862XX_REG_SRST (0x00) +#define AW862XX_REG_PLAYCFG2 (0x07) +#define AW862XX_REG_PLAYCFG3 (0x08) +#define AW862XX_REG_PLAYCFG4 (0x09) +#define AW862XX_REG_WAVCFG1 (0x0A) +#define AW862XX_REG_WAVCFG2 (0x0B) +#define AW862XX_REG_WAVCFG9 (0x12) +#define AW862XX_REG_CONTCFG1 (0x18) +#define AW862XX_REG_CONTCFG2 (0x19) +#define AW862XX_REG_CONTCFG3 (0x1A) +#define AW862XX_REG_CONTCFG6 (0x1D) +#define AW862XX_REG_CONTCFG7 (0x1E) +#define AW862XX_REG_CONTCFG8 (0x1F) +#define AW862XX_REG_CONTCFG9 (0x20) +#define AW862XX_REG_CONTCFG10 (0x21) +#define AW862XX_REG_CONTCFG11 (0x22) +#define AW862XX_REG_CONTRD14 (0x25) +#define AW862XX_REG_CONTRD15 (0x26) +#define AW862XX_REG_CONTRD16 (0x27) +#define AW862XX_REG_CONTRD17 (0x28) +#define AW862XX_REG_RTPCFG1 (0x2D) +#define AW862XX_REG_RTPCFG2 (0x2E) +#define AW862XX_REG_RTPCFG3 (0x2F) +#define AW862XX_REG_GLBRD5 (0x3F) +#define AW862XX_REG_RAMADDRH (0x40) +#define AW862XX_REG_RAMDATA (0x42) +#define AW862XX_REG_SYSCTRL1 (0x43) +#define AW862XX_REG_SYSCTRL2 (0x44) +#define AW862XX_REG_SYSCTRL7 (0x49) +#define AW862XX_REG_DETCFG2 (0x52) +#define AW862XX_REG_DET_VBAT (0x55) +#define AW862XX_REG_DET_LO (0x57) +#define AW862XX_REG_TRIMCFG3 (0x5A) +#define AW862XX_REG_CHIPID (0x64) + +#define AW862XX_BIT_PLAYCFG3_BRK_EN_MASK (~(1 << 2)) +#define AW862XX_BIT_PLAYCFG3_BRK_ENABLE (1 << 2) +#define AW862XX_BIT_PLAYCFG3_PLAY_MODE_MASK (~(3 << 0)) +#define AW862XX_BIT_PLAYCFG3_PLAY_MODE_RAM (0 << 0) +#define AW862XX_BIT_PLAYCFG3_PLAY_MODE_CONT (2 << 0) +#define AW862XX_BIT_PLAYCFG3_PLAY_MODE_STOP (3 << 0) /* PLAYCFG4: reg 0x09 RW */ -#define AW862XX_BIT_PLAYCFG4_STOP_ON (1<<1) -#define AW862XX_BIT_PLAYCFG4_GO_ON (1<<0) - -#define AW862XX_F0_CALI_LSB_PERMYRIAD (24) -#define AW862XX_CONTCFG1_EDGE_FREQ_NONE (0x00) -#define AW862XX_CONTCFG1_SIN_MODE_COS (1<<0) -#define AW862XX_CONTCFG1_EN_F0_DET (1<<3) -#define AW862XX_CONTCFG2_CONF_F0 (24000U / CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ) -#define AW862XX_CONTCFG3_F0_DET_DRV_WIDTH (24000U / CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ - 8U - 8U - 15U) -#define AW862XX_CONTCFG7_FULL_SCALE (0x7FL) -#define AW862XX_CONTCFG8_F0_DET_DRV1_TIME (0x04U) -#define AW862XX_CONTCFG9_F0_DET_DRV2_TIME (0x14U) -#define AW862XX_CONTCFG10_BRK_TIME (0x08U) -#define AW862XX_CONTCFG11_TRACK_MARGIN (0x0FU) -#define AW862XX_CONTCFG6_TRACK_EN (1<<7) -#define AW862XX_RAM_BASE_ADDR (0x0800U) -#define AW862XX_RAM_HEADER_VERSION (0x01U) -#define AW862XX_RAM_HEADER_LEN (1U + 4U) -#define AW862XX_RAM_WAVEFORM (1U) -#define AW862XX_WAVCFG_END (0U) -#define AW862XX_WAVCFG9_LOOP_INFINITE (0x0FU) -#define AW862XX_PLAYCFG2_GAIN_UNITY (0x80U) -#define AW862XX_RMS_TO_PEAK_MILLI (1414U) -#define AW862XX_VBAT_REFER_MV (4200U) -#define AW862XX_VBAT_MIN_MV (3000U) -#define AW862XX_VBAT_MAX_MV (4500U) -#define AW862XX_VBAT_FULL_SCALE_MV (6100U) -#define AW862XX_VBAT_CODE_MAX (1024U) -#define AW862XX_PLAYCFG2_GAIN_LIMIT (AW862XX_PLAYCFG2_GAIN_UNITY * AW862XX_VBAT_REFER_MV / AW862XX_VBAT_MIN_MV) -#define AW862XX_RTPCFG1_ADDRH_MASK (~(0x0F<<0)) -#define AW862XX_GLBRD5_STATE_MASK (0x0F) -#define AW862XX_GLBRD5_STATE_STANDBY (0x00) -#define AW862XX_TRIMCFG3_TRIM_LRA_MASK (~(0x3F)) -#define AW862XX_SYSCTRL1_RAMINIT_MASK (~(1<<3)) -#define AW862XX_SYSCTRL1_RAMINIT_ON (1<<3) -#define AW862XX_SYSCTRL1_RAMINIT_OFF (0<<3) -#define AW862XX_SYSCTRL2_STANDBY_MASK (~(1<<6)) -#define AW862XX_SYSCTRL2_STANDBY_ON (1<<6) -#define AW862XX_SYSCTRL2_STANDBY_OFF (0<<6) -#define AW862XX_SYSCTRL2_WAVDAT_MODE_MASK (~(3<<0)) -#define AW862XX_SYSCTRL2_RATE_12K (2<<0) -#define AW862XX_SYSCTRL7_GAIN_BYPASS_MASK (~(1<<6)) -#define AW862XX_SYSCTRL7_GAIN_CHANGEABLE (1<<6) -#define AW862XX_DETCFG2_VBAT_GO (1<<1) -#define AW862XX_DET_LO_VBAT_MASK (0x30) -#define AW862XX_DET_LO_VBAT_SHIFT (4) - -#define AW862XX_PWR_OFF_TIME (2) /* ms */ -#define AW862XX_PWR_ON_TIME (8) /* ms */ -#define AW862XX_VBAT_DET_TIME (3) /* ms */ -#define AW862XX_STOP_STANDBY_RETRIES (40) -#define AW862XX_STOP_STANDBY_POLL_MS (2) -#define AW862XX_F0_DET_STANDBY_RETRIES (200) -#define AW862XX_F0_DET_STANDBY_POLL_MS (10) -#define AW862XX_TRIM_LRA_INVALID (0xFF) +#define AW862XX_BIT_PLAYCFG4_STOP_ON (1 << 1) +#define AW862XX_BIT_PLAYCFG4_GO_ON (1 << 0) + +#define AW862XX_F0_CALI_LSB_PERMYRIAD (24) +#define AW862XX_CONTCFG1_EDGE_FREQ_NONE (0x00) +#define AW862XX_CONTCFG1_SIN_MODE_COS (1 << 0) +#define AW862XX_CONTCFG1_EN_F0_DET (1 << 3) +#define AW862XX_CONTCFG2_CONF_F0 (24000U / CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ) +#define AW862XX_CONTCFG3_F0_DET_DRV_WIDTH \ + (24000U / CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ - 8U - 8U - 15U) +#define AW862XX_CONTCFG7_FULL_SCALE (0x7FL) +#define AW862XX_CONTCFG8_F0_DET_DRV1_TIME (0x04U) +#define AW862XX_CONTCFG9_F0_DET_DRV2_TIME (0x14U) +#define AW862XX_CONTCFG10_BRK_TIME (0x08U) +#define AW862XX_CONTCFG11_TRACK_MARGIN (0x0FU) +#define AW862XX_CONTCFG6_TRACK_EN (1 << 7) +#define AW862XX_RAM_BASE_ADDR (0x0800U) +#define AW862XX_RAM_HEADER_VERSION (0x01U) +#define AW862XX_RAM_HEADER_LEN (1U + 4U) +#define AW862XX_RAM_WAVEFORM (1U) +#define AW862XX_WAVCFG_END (0U) +#define AW862XX_WAVCFG9_LOOP_INFINITE (0x0FU) +#define AW862XX_PLAYCFG2_GAIN_UNITY (0x80U) +#define AW862XX_RMS_TO_PEAK_MILLI (1414U) +#define AW862XX_VBAT_REFER_MV (4200U) +#define AW862XX_VBAT_MIN_MV (3000U) +#define AW862XX_VBAT_MAX_MV (4500U) +#define AW862XX_VBAT_FULL_SCALE_MV (6100U) +#define AW862XX_VBAT_CODE_MAX (1024U) +#define AW862XX_PLAYCFG2_GAIN_LIMIT \ + (AW862XX_PLAYCFG2_GAIN_UNITY * AW862XX_VBAT_REFER_MV / AW862XX_VBAT_MIN_MV) +#define AW862XX_RTPCFG1_ADDRH_MASK (~(0x0F << 0)) +#define AW862XX_GLBRD5_STATE_MASK (0x0F) +#define AW862XX_GLBRD5_STATE_STANDBY (0x00) +#define AW862XX_TRIMCFG3_TRIM_LRA_MASK (~(0x3F)) +#define AW862XX_SYSCTRL1_RAMINIT_MASK (~(1 << 3)) +#define AW862XX_SYSCTRL1_RAMINIT_ON (1 << 3) +#define AW862XX_SYSCTRL1_RAMINIT_OFF (0 << 3) +#define AW862XX_SYSCTRL2_STANDBY_MASK (~(1 << 6)) +#define AW862XX_SYSCTRL2_STANDBY_ON (1 << 6) +#define AW862XX_SYSCTRL2_STANDBY_OFF (0 << 6) +#define AW862XX_SYSCTRL2_WAVDAT_MODE_MASK (~(3 << 0)) +#define AW862XX_SYSCTRL2_RATE_12K (2 << 0) +#define AW862XX_SYSCTRL7_GAIN_BYPASS_MASK (~(1 << 6)) +#define AW862XX_SYSCTRL7_GAIN_CHANGEABLE (1 << 6) +#define AW862XX_DETCFG2_VBAT_GO (1 << 1) +#define AW862XX_DET_LO_VBAT_MASK (0x30) +#define AW862XX_DET_LO_VBAT_SHIFT (4) + +#define AW862XX_PWR_OFF_TIME (2) /* ms */ +#define AW862XX_PWR_ON_TIME (8) /* ms */ +#define AW862XX_VBAT_DET_TIME (3) /* ms */ +#define AW862XX_STOP_STANDBY_RETRIES (40) +#define AW862XX_STOP_STANDBY_POLL_MS (2) +#define AW862XX_F0_DET_STANDBY_RETRIES (200) +#define AW862XX_F0_DET_STANDBY_POLL_MS (10) +#define AW862XX_TRIM_LRA_INVALID (0xFF) static bool s_initialized = false; static int8_t s_target_strength = VIBE_STRENGTH_MAX; @@ -121,61 +123,58 @@ static bool s_playing = false; #define AW862XX_OUTPUT_FULL_SCALE_MV \ (AW862XX_VBAT_REFER_MV * CONFIG_VIBE_AW86225_OUTPUT_GAIN_PERCENT / 100U) -_Static_assert(CONFIG_VIBE_AW86225_RATED_VOLTAGE_MV * AW862XX_RMS_TO_PEAK_MILLI / 1000U <= +_Static_assert(CONFIG_VIBE_AW86225_RATED_VOLTAGE_MV *AW862XX_RMS_TO_PEAK_MILLI / 1000U <= AW862XX_OUTPUT_FULL_SCALE_MV, "rated voltage exceeds the full-scale output"); //! One full-scale LRA cycle at 12 kS/s. static const uint8_t s_sine_cycle[] = { - 0x00, 0x10, 0x20, 0x2f, 0x3d, 0x4b, 0x57, 0x62, 0x6b, 0x73, - 0x79, 0x7d, 0x7f, 0x7f, 0x7d, 0x79, 0x73, 0x6b, 0x62, 0x57, - 0x4b, 0x3d, 0x2f, 0x20, 0x10, 0x00, 0xf0, 0xe0, 0xd1, 0xc3, - 0xb5, 0xa9, 0x9e, 0x95, 0x8d, 0x87, 0x83, 0x81, 0x81, 0x83, - 0x87, 0x8d, 0x95, 0x9e, 0xa9, 0xb5, 0xc3, 0xd1, 0xe0, 0xf0, + 0x00, 0x10, 0x20, 0x2f, 0x3d, 0x4b, 0x57, 0x62, 0x6b, 0x73, 0x79, 0x7d, 0x7f, + 0x7f, 0x7d, 0x79, 0x73, 0x6b, 0x62, 0x57, 0x4b, 0x3d, 0x2f, 0x20, 0x10, 0x00, + 0xf0, 0xe0, 0xd1, 0xc3, 0xb5, 0xa9, 0x9e, 0x95, 0x8d, 0x87, 0x83, 0x81, 0x81, + 0x83, 0x87, 0x8d, 0x95, 0x9e, 0xa9, 0xb5, 0xc3, 0xd1, 0xe0, 0xf0, }; static uint8_t s_ram_image[AW862XX_RAM_HEADER_LEN + sizeof(s_sine_cycle)]; -static bool prv_read_register(uint8_t register_address, uint8_t* data) { - i2c_use(I2C_AW86225); - bool rv = i2c_read_register_block(I2C_AW86225, register_address, 1, data); - i2c_release(I2C_AW86225); - return rv; +static bool prv_read_register(uint8_t register_address, uint8_t *data) { + i2c_use(I2C_AW86225); + bool rv = i2c_read_register_block(I2C_AW86225, register_address, 1, data); + i2c_release(I2C_AW86225); + return rv; } - + static bool prv_write_register(uint8_t register_address, uint8_t datum) { - i2c_use(I2C_AW86225); - bool rv = i2c_write_register_block(I2C_AW86225, register_address, 1, &datum); - i2c_release(I2C_AW86225); - return rv; + i2c_use(I2C_AW86225); + bool rv = i2c_write_register_block(I2C_AW86225, register_address, 1, &datum); + i2c_release(I2C_AW86225); + return rv; } static bool prv_write_register_block(uint8_t register_address, const uint8_t *data, size_t length) { - i2c_use(I2C_AW86225); - bool rv = i2c_write_register_block(I2C_AW86225, register_address, length, data); - i2c_release(I2C_AW86225); - return rv; + i2c_use(I2C_AW86225); + bool rv = i2c_write_register_block(I2C_AW86225, register_address, length, data); + i2c_release(I2C_AW86225); + return rv; } -bool prv_modify_reg(uint8_t reg_addr, uint32_t mask, uint8_t reg_data) -{ - uint8_t reg_val = 0; - uint8_t reg_mask = (uint8_t)mask; - - if (!prv_read_register(reg_addr, ®_val)) { - return false; - } - reg_val &= reg_mask; - reg_val |= (reg_data & (~reg_mask)); - return prv_write_register(reg_addr, reg_val); +bool prv_modify_reg(uint8_t reg_addr, uint32_t mask, uint8_t reg_data) { + uint8_t reg_val = 0; + uint8_t reg_mask = (uint8_t)mask; + + if (!prv_read_register(reg_addr, ®_val)) { + return false; + } + reg_val &= reg_mask; + reg_val |= (reg_data & (~reg_mask)); + return prv_write_register(reg_addr, reg_val); } //! Start (flag=true) or stop (flag=false) playback. Returns true when the //! command was written successfully; for stop, additionally requires the chip //! to have reached standby. The waveform is an infinite hardware loop, so //! a stop that silently fails leaves the motor running. -static bool prv_aw862xx_play_go(bool flag) -{ +static bool prv_aw862xx_play_go(bool flag) { uint8_t val; if (flag) { @@ -222,8 +221,8 @@ static void prv_stop(void) { } static uint8_t prv_gain_for_strength(uint8_t strength) { - uint32_t gain = (uint32_t)strength * AW862XX_PLAYCFG2_GAIN_UNITY * AW862XX_VBAT_REFER_MV / - (100U * s_vbat_mv); + uint32_t gain = + (uint32_t)strength * AW862XX_PLAYCFG2_GAIN_UNITY * AW862XX_VBAT_REFER_MV / (100U * s_vbat_mv); if (gain > AW862XX_PLAYCFG2_GAIN_LIMIT) { gain = AW862XX_PLAYCFG2_GAIN_LIMIT; } @@ -247,8 +246,8 @@ static void prv_update_vbat(void) { return; } - uint32_t code = ((uint32_t)hi << 2) | - ((lo & AW862XX_DET_LO_VBAT_MASK) >> AW862XX_DET_LO_VBAT_SHIFT); + uint32_t code = + ((uint32_t)hi << 2) | ((lo & AW862XX_DET_LO_VBAT_MASK) >> AW862XX_DET_LO_VBAT_SHIFT); uint32_t vbat_mv = code * AW862XX_VBAT_FULL_SCALE_MV / AW862XX_VBAT_CODE_MAX; if (vbat_mv < AW862XX_VBAT_MIN_MV) { vbat_mv = AW862XX_VBAT_MIN_MV; @@ -287,11 +286,11 @@ static void prv_build_ram_image(void) { static bool prv_load_ram_image(void) { const uint16_t base = AW862XX_RAM_BASE_ADDR; - uint8_t addr[] = { base >> 8, base & 0xFF }; + uint8_t addr[] = {base >> 8, base & 0xFF}; uint8_t fifo[] = { - (((base >> 1) >> 4) & 0xF0) | (((base - (base >> 2)) >> 8) & 0x0F), - (base >> 1) & 0xFF, - (base - (base >> 2)) & 0xFF, + (((base >> 1) >> 4) & 0xF0) | (((base - (base >> 2)) >> 8) & 0x0F), + (base >> 1) & 0xFF, + (base - (base >> 2)) & 0xFF, }; prv_aw862xx_play_go(false); @@ -325,8 +324,7 @@ static bool prv_config_ram_playback(void) { return ret; } -static int prv_f0_detection(void) -{ +static int prv_f0_detection(void) { int f0 = 0; uint8_t reg_val = 0; uint16_t f0_reg = 0; @@ -335,14 +333,13 @@ static int prv_f0_detection(void) prv_modify_reg(AW862XX_REG_PLAYCFG3, AW862XX_BIT_PLAYCFG3_PLAY_MODE_MASK, AW862XX_BIT_PLAYCFG3_PLAY_MODE_CONT); - prv_write_register(AW862XX_REG_CONTCFG1, - AW862XX_CONTCFG1_EDGE_FREQ_NONE | AW862XX_CONTCFG1_SIN_MODE_COS | - AW862XX_CONTCFG1_EN_F0_DET); + prv_write_register(AW862XX_REG_CONTCFG1, AW862XX_CONTCFG1_EDGE_FREQ_NONE | + AW862XX_CONTCFG1_SIN_MODE_COS | + AW862XX_CONTCFG1_EN_F0_DET); prv_modify_reg(AW862XX_REG_CONTCFG6, ~AW862XX_CONTCFG6_TRACK_EN, AW862XX_CONTCFG6_TRACK_EN); prv_modify_reg(AW862XX_REG_PLAYCFG3, AW862XX_BIT_PLAYCFG3_BRK_EN_MASK, AW862XX_BIT_PLAYCFG3_BRK_ENABLE); - prv_modify_reg(AW862XX_REG_CONTCFG6, ~AW862XX_CONTCFG7_FULL_SCALE, - AW862XX_CONTCFG7_FULL_SCALE); + prv_modify_reg(AW862XX_REG_CONTCFG6, ~AW862XX_CONTCFG7_FULL_SCALE, AW862XX_CONTCFG7_FULL_SCALE); prv_write_register(AW862XX_REG_CONTCFG7, AW862XX_CONTCFG7_FULL_SCALE); prv_write_register(AW862XX_REG_CONTCFG2, AW862XX_CONTCFG2_CONF_F0); prv_write_register(AW862XX_REG_CONTCFG8, AW862XX_CONTCFG8_F0_DET_DRV1_TIME); @@ -384,8 +381,8 @@ static int prv_f0_detection(void) f0_reg = cont_f0_reg; } if (!ret || f0_reg == 0) { - PBL_LOG_ERR("AW86225: F0 readback failed (i2c=%d, det=0x%04x, cont=0x%04x)", ret, - f0_reg, cont_f0_reg); + PBL_LOG_ERR("AW86225: F0 readback failed (i2c=%d, det=0x%04x, cont=0x%04x)", ret, f0_reg, + cont_f0_reg); prv_modify_reg(AW862XX_REG_CONTCFG1, ~AW862XX_CONTCFG1_EN_F0_DET, 0); prv_modify_reg(AW862XX_REG_PLAYCFG3, AW862XX_BIT_PLAYCFG3_BRK_EN_MASK, 0); return -1; @@ -488,7 +485,7 @@ status_t vibe_calibrate(void) { int f0_cali_min = 0; int f0_cali_max = 0; int f0; - + if (!s_initialized) { return E_INVALID_OPERATION; } @@ -510,11 +507,14 @@ status_t vibe_calibrate(void) { * * Below code calibrate the f0 to match f0_pre as possible. */ - f0_cali_min = CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ - CONFIG_VIBE_AW86225_LRA_FREQUENCY_TOLERANCE_HZ; - f0_cali_max = CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ + CONFIG_VIBE_AW86225_LRA_FREQUENCY_TOLERANCE_HZ; + f0_cali_min = + CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ - CONFIG_VIBE_AW86225_LRA_FREQUENCY_TOLERANCE_HZ; + f0_cali_max = + CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ + CONFIG_VIBE_AW86225_LRA_FREQUENCY_TOLERANCE_HZ; if (f0 < f0_cali_min || f0 > f0_cali_max) { PBL_LOG_ERR("AW86225: F0 out of range (measured %d Hz, expected %d +/- %d Hz)", f0, - CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ, CONFIG_VIBE_AW86225_LRA_FREQUENCY_TOLERANCE_HZ); + CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ, + CONFIG_VIBE_AW86225_LRA_FREQUENCY_TOLERANCE_HZ); return E_ERROR; } @@ -557,7 +557,8 @@ uint8_t vibe_get_calibration(void) { //! LRA's F0 tolerance so a bad calibration cannot detune the drive. static bool prv_trim_in_range(uint8_t trim) { int steps = (trim < 32) ? (int)trim : (int)trim - 64; - int offset_hz = (int)CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ * steps * AW862XX_F0_CALI_LSB_PERMYRIAD / 10000; + int offset_hz = + (int)CONFIG_VIBE_AW86225_LRA_FREQUENCY_HZ * steps * AW862XX_F0_CALI_LSB_PERMYRIAD / 10000; return (offset_hz >= -(int)CONFIG_VIBE_AW86225_LRA_FREQUENCY_TOLERANCE_HZ) && (offset_hz <= (int)CONFIG_VIBE_AW86225_LRA_FREQUENCY_TOLERANCE_HZ); } diff --git a/src/fw/drivers/vibe/vibe_drv2604.c b/src/fw/drivers/vibe/vibe_drv2604.c index 9e0ed64fc5..50f8f12b76 100644 --- a/src/fw/drivers/vibe/vibe_drv2604.c +++ b/src/fw/drivers/vibe/vibe_drv2604.c @@ -15,33 +15,33 @@ PBL_LOG_MODULE_DEFINE(driver_vibe_drv2604, CONFIG_DRIVER_VIBE_LOG_LEVEL); /* XXX: tune RATED_VOLTAGE? / OD_CLAMP? */ -#define DRV2604_STATUS 0x00 -#define DRV2604_MODE 0x01 +#define DRV2604_STATUS 0x00 +#define DRV2604_MODE 0x01 #define DRV2604_MODE_TRIGGER 0x00 -#define DRV2604_MODE_RTP 0x05 +#define DRV2604_MODE_RTP 0x05 #define DRV2604_MODE_AUTOCAL 0x07 #define DRV2604_MODE_STANDBY 0x40 -#define DRV2604_RTP_INPUT 0x02 -#define DRV2604_GO 0x0C +#define DRV2604_RTP_INPUT 0x02 +#define DRV2604_GO 0x0C #define DRV2604_RATED_VOLTAGE 0x16 -#define DRV2604_OD_CLAMP 0x17 -#define DRV2604_A_CAL_COMP 0x18 -#define DRV2604_A_CAL_BEMF 0x19 -#define DRV2604_FBCTL 0x1A -#define DRV2604_FBCTL_LRA 0x80 +#define DRV2604_OD_CLAMP 0x17 +#define DRV2604_A_CAL_COMP 0x18 +#define DRV2604_A_CAL_BEMF 0x19 +#define DRV2604_FBCTL 0x1A +#define DRV2604_FBCTL_LRA 0x80 #define DRV2604_FBCTL_FB_BRAKE_FACTOR(n) ((n) << 4) -#define DRV2604_FBCTL_LOOP_GAIN(n) ((n) << 2) -#define DRV2604_FBCTL_BEMF_GAIN(n) ((n) << 0) -#define DRV2604_CONTROL1 0x1B +#define DRV2604_FBCTL_LOOP_GAIN(n) ((n) << 2) +#define DRV2604_FBCTL_BEMF_GAIN(n) ((n) << 0) +#define DRV2604_CONTROL1 0x1B #define DRV2604_CONTROL1_STARTUP_BOOST 0x80 #define DRV2604_CONTROL1_DRIVE_TIME(n) ((n) << 0) -#define DRV2604_CONTROL2 0x1C -#define DRV2604_CONTROL2_BIDIR_INPUT 0x80 +#define DRV2604_CONTROL2 0x1C +#define DRV2604_CONTROL2_BIDIR_INPUT 0x80 #define DRV2604_CONTROL2_BRAKE_STABILIZER 0x40 -#define DRV2604_CONTROL2_SAMPLE_TIME(n) ((n) << 4) +#define DRV2604_CONTROL2_SAMPLE_TIME(n) ((n) << 4) #define DRV2604_CONTROL2_BLANKING_TIME(n) ((n) << 2) #define DRV2604_CONTROL2_IDISS_TIME(n) ((n) << 0) -#define DRV2604_CONTROL4 0x1E +#define DRV2604_CONTROL4 0x1E #define DRV2604_CONTROL4_AUTO_CAL_TIME(n) ((n) << 4) static bool s_initialized = false; @@ -55,7 +55,7 @@ static bool prv_read_register(uint8_t register_address, uint8_t *result) { static bool prv_write_register(uint8_t register_address, uint8_t datum) { i2c_use(I2C_DRV2604); - uint8_t block[2] = { register_address, datum }; + uint8_t block[2] = {register_address, datum}; bool rv = i2c_write_block(I2C_DRV2604, 2, block); i2c_release(I2C_DRV2604); return rv; @@ -70,18 +70,22 @@ void vibe_init(void) { PBL_LOG_ERR("Failed to read the STATUS register"); return; } - + /* calibration table maybe should live in the board file? */ const uint8_t regs[][2] = { - { DRV2604_MODE, DRV2604_MODE_TRIGGER }, - { DRV2604_FBCTL, DRV2604_FBCTL_LRA | DRV2604_FBCTL_FB_BRAKE_FACTOR(2) | DRV2604_FBCTL_LOOP_GAIN(2) | DRV2604_FBCTL_BEMF_GAIN(2) }, - { DRV2604_RATED_VOLTAGE, 0x3F /* default */ }, - { DRV2604_OD_CLAMP, 0x89 /* default */ }, - { DRV2604_A_CAL_COMP, 0x0D }, - { DRV2604_A_CAL_BEMF, 0x80 }, - { DRV2604_CONTROL1, DRV2604_CONTROL1_STARTUP_BOOST | DRV2604_CONTROL1_DRIVE_TIME(0x10 /* 2.1 ms */) }, - { DRV2604_CONTROL2, DRV2604_CONTROL2_BIDIR_INPUT | DRV2604_CONTROL2_BRAKE_STABILIZER | DRV2604_CONTROL2_SAMPLE_TIME(3) | DRV2604_CONTROL2_BLANKING_TIME(1) | DRV2604_CONTROL2_IDISS_TIME(1) }, - { DRV2604_MODE, DRV2604_MODE_STANDBY | DRV2604_MODE_TRIGGER }, + {DRV2604_MODE, DRV2604_MODE_TRIGGER}, + {DRV2604_FBCTL, DRV2604_FBCTL_LRA | DRV2604_FBCTL_FB_BRAKE_FACTOR(2) | + DRV2604_FBCTL_LOOP_GAIN(2) | DRV2604_FBCTL_BEMF_GAIN(2)}, + {DRV2604_RATED_VOLTAGE, 0x3F /* default */}, + {DRV2604_OD_CLAMP, 0x89 /* default */}, + {DRV2604_A_CAL_COMP, 0x0D}, + {DRV2604_A_CAL_BEMF, 0x80}, + {DRV2604_CONTROL1, + DRV2604_CONTROL1_STARTUP_BOOST | DRV2604_CONTROL1_DRIVE_TIME(0x10 /* 2.1 ms */)}, + {DRV2604_CONTROL2, DRV2604_CONTROL2_BIDIR_INPUT | DRV2604_CONTROL2_BRAKE_STABILIZER | + DRV2604_CONTROL2_SAMPLE_TIME(3) | DRV2604_CONTROL2_BLANKING_TIME(1) | + DRV2604_CONTROL2_IDISS_TIME(1)}, + {DRV2604_MODE, DRV2604_MODE_STANDBY | DRV2604_MODE_TRIGGER}, }; for (size_t i = 0; i < sizeof(regs) / sizeof(regs[0]); i++) { @@ -95,7 +99,7 @@ void vibe_init(void) { // DRV2604 does not get its registers reset by disabling EN, so it's ok to // do that gpio_output_set(&BOARD_CONFIG_VIBE.ctl, false); - + s_initialized = true; } @@ -120,7 +124,10 @@ void vibe_ctl(bool on) { PBL_LOG_DBG("Vibe status <%s>", on ? "on" : "off"); if (!on) { - prv_write_register(DRV2604_MODE, DRV2604_MODE_STANDBY | DRV2604_MODE_RTP); /* enter standby even if the enable GPIO is not hooked up */ + prv_write_register( + DRV2604_MODE, + DRV2604_MODE_STANDBY | + DRV2604_MODE_RTP); /* enter standby even if the enable GPIO is not hooked up */ } gpio_output_set(&BOARD_CONFIG_VIBE.ctl, on); s_vibe_ctl_on = on; @@ -133,7 +140,10 @@ void vibe_force_off(void) { if (!s_initialized) { return; } - prv_write_register(DRV2604_MODE, DRV2604_MODE_STANDBY | DRV2604_MODE_RTP); /* enter standby even if the enable GPIO is not hooked up */ + prv_write_register( + DRV2604_MODE, + DRV2604_MODE_STANDBY | + DRV2604_MODE_RTP); /* enter standby even if the enable GPIO is not hooked up */ gpio_output_set(&BOARD_CONFIG_VIBE.ctl, false); s_vibe_ctl_on = false; } @@ -146,11 +156,16 @@ int8_t vibe_get_braking_strength(void) { status_t vibe_calibrate(void) { bool bad = false; bad |= !prv_write_register(DRV2604_MODE, DRV2604_MODE_AUTOCAL); - bad |= !prv_write_register(DRV2604_FBCTL, DRV2604_FBCTL_LRA | DRV2604_FBCTL_FB_BRAKE_FACTOR(2) | DRV2604_FBCTL_LOOP_GAIN(2)); + bad |= !prv_write_register(DRV2604_FBCTL, DRV2604_FBCTL_LRA | DRV2604_FBCTL_FB_BRAKE_FACTOR(2) | + DRV2604_FBCTL_LOOP_GAIN(2)); bad |= !prv_write_register(DRV2604_RATED_VOLTAGE, 0x3F); /* default value */ - bad |= !prv_write_register(DRV2604_OD_CLAMP, 0x89); /* default value */ - bad |= !prv_write_register(DRV2604_CONTROL1, DRV2604_CONTROL1_STARTUP_BOOST | DRV2604_CONTROL1_DRIVE_TIME(0x10 /* 2.1 ms */)); - bad |= !prv_write_register(DRV2604_CONTROL2, DRV2604_CONTROL2_BIDIR_INPUT | DRV2604_CONTROL2_BRAKE_STABILIZER | DRV2604_CONTROL2_SAMPLE_TIME(3) | DRV2604_CONTROL2_BLANKING_TIME(1) | DRV2604_CONTROL2_IDISS_TIME(1)); + bad |= !prv_write_register(DRV2604_OD_CLAMP, 0x89); /* default value */ + bad |= !prv_write_register(DRV2604_CONTROL1, DRV2604_CONTROL1_STARTUP_BOOST | + DRV2604_CONTROL1_DRIVE_TIME(0x10 /* 2.1 ms */)); + bad |= !prv_write_register( + DRV2604_CONTROL2, DRV2604_CONTROL2_BIDIR_INPUT | DRV2604_CONTROL2_BRAKE_STABILIZER | + DRV2604_CONTROL2_SAMPLE_TIME(3) | DRV2604_CONTROL2_BLANKING_TIME(1) | + DRV2604_CONTROL2_IDISS_TIME(1)); bad |= !prv_write_register(DRV2604_CONTROL4, DRV2604_CONTROL4_AUTO_CAL_TIME(3)); bad |= !prv_write_register(DRV2604_GO, 1); /* GO */ @@ -180,7 +195,7 @@ void command_vibe_ctl(const char *arg) { return; } - + if (!strcmp(arg, "reg")) { prompt_send_response("vibe regs:"); for (int i = 0; i <= 0x22; i++) { diff --git a/src/fw/drivers/watchdog/nrf5.c b/src/fw/drivers/watchdog/nrf5.c index 0cdac0e4f4..401bf59370 100644 --- a/src/fw/drivers/watchdog/nrf5.c +++ b/src/fw/drivers/watchdog/nrf5.c @@ -34,13 +34,13 @@ McuRebootReason watchdog_clear_reset_flag(void) { nrfx_reset_reason_clear(0xFFFFFFFF); s_cached_reset_flag = (McuRebootReason){ - .brown_out_reset = 0, - .pin_reset = (reason & NRFX_RESET_REASON_RESETPIN_MASK) != 0, - .power_on_reset = (reason & NRFX_RESET_REASON_VBUS_MASK) != 0, - .software_reset = (reason & NRFX_RESET_REASON_SREQ_MASK) != 0, - .independent_watchdog_reset = (reason & NRFX_RESET_REASON_DOG_MASK) != 0, - .window_watchdog_reset = 0, - .low_power_manager_reset = 0, + .brown_out_reset = 0, + .pin_reset = (reason & NRFX_RESET_REASON_RESETPIN_MASK) != 0, + .power_on_reset = (reason & NRFX_RESET_REASON_VBUS_MASK) != 0, + .software_reset = (reason & NRFX_RESET_REASON_SREQ_MASK) != 0, + .independent_watchdog_reset = (reason & NRFX_RESET_REASON_DOG_MASK) != 0, + .window_watchdog_reset = 0, + .low_power_manager_reset = 0, }; return s_cached_reset_flag; diff --git a/src/fw/flash_region/filesystem_regions.h b/src/fw/flash_region/filesystem_regions.h index 5c0aef6a0d..1a09161f9f 100644 --- a/src/fw/flash_region/filesystem_regions.h +++ b/src/fw/flash_region/filesystem_regions.h @@ -28,7 +28,7 @@ typedef struct FSRegion { // header included below. // Typical single region filesystem layout -#define FILE_SYSTEM_REGIONS(MACRO_OPERATOR) \ +#define FILE_SYSTEM_REGIONS(MACRO_OPERATOR) \ MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_BEGIN, FLASH_REGION_FILESYSTEM_END) // Notes: @@ -47,19 +47,18 @@ typedef struct FSRegion { // Bonus Fun fact: 'analytics_metric_table.h' uses this same strategy to turn our analytics list // into an enum, switch case statement, and AnalyticsMetricDataType array. -#define FILE_SYSTEM_LAYOUT_CHECK(s, e) \ +#define FILE_SYSTEM_LAYOUT_CHECK(s, e) \ _Static_assert((s % SECTOR_SIZE_BYTES) == 0, "Filesystem region start not sector aligned"); \ - _Static_assert((e % SECTOR_SIZE_BYTES) == 0, "Filesystem end region not sector aligned"); \ + _Static_assert((e % SECTOR_SIZE_BYTES) == 0, "Filesystem end region not sector aligned"); -#define FILE_SYSTEM_FS_REGION_ENTRY_CONSTRUCTOR(s, e) { .start = s, .end = e }, +#define FILE_SYSTEM_FS_REGION_ENTRY_CONSTRUCTOR(s, e) {.start = s, .end = e}, // Make sure all the filesystem regions are flash sector aligned FILE_SYSTEM_REGIONS(FILE_SYSTEM_LAYOUT_CHECK) // Build the flash region list -static const FSRegion s_region_list[] = { - FILE_SYSTEM_REGIONS(FILE_SYSTEM_FS_REGION_ENTRY_CONSTRUCTOR) -}; +static const FSRegion s_region_list[] = {FILE_SYSTEM_REGIONS( + FILE_SYSTEM_FS_REGION_ENTRY_CONSTRUCTOR)}; //! Erase all the regions that belong to our filesystem. Note that this is just a flash erase, //! if you want to leave behind a fully erased and initialized filesystem you should be using diff --git a/src/fw/flash_region/filesystem_regions_n25q.h b/src/fw/flash_region/filesystem_regions_n25q.h index 90f8afd9c2..41d80b9d98 100644 --- a/src/fw/flash_region/filesystem_regions_n25q.h +++ b/src/fw/flash_region/filesystem_regions_n25q.h @@ -9,20 +9,20 @@ //! Tintin/Bianca. Only included by core/flash_region/filesystem_regions.c #if !defined(CONFIG_RECOVERY_FW) -#define FILE_SYSTEM_REGIONS(MACRO_OPERATOR) \ - MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_BEGIN, FLASH_REGION_FILESYSTEM_END) \ - MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_2_BEGIN, FLASH_REGION_FILESYSTEM_2_END) \ - MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_3_BEGIN, FLASH_REGION_FILESYSTEM_3_END) \ - MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_4_BEGIN, FLASH_REGION_FILESYSTEM_4_END) \ - MACRO_OPERATOR(FLASH_REGION_EXTRA_FILESYSTEM_BEGIN, FLASH_REGION_EXTRA_FILESYSTEM_END) \ +#define FILE_SYSTEM_REGIONS(MACRO_OPERATOR) \ + MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_BEGIN, FLASH_REGION_FILESYSTEM_END) \ + MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_2_BEGIN, FLASH_REGION_FILESYSTEM_2_END) \ + MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_3_BEGIN, FLASH_REGION_FILESYSTEM_3_END) \ + MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_4_BEGIN, FLASH_REGION_FILESYSTEM_4_END) \ + MACRO_OPERATOR(FLASH_REGION_EXTRA_FILESYSTEM_BEGIN, FLASH_REGION_EXTRA_FILESYSTEM_END) \ MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_5_BEGIN, FLASH_REGION_FILESYSTEM_5_END) -#else // Same as normal fw except there is one extra region to erase -#define FILE_SYSTEM_REGIONS(MACRO_OPERATOR) \ - MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_BEGIN, FLASH_REGION_FILESYSTEM_END) \ - MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_2_BEGIN, FLASH_REGION_FILESYSTEM_2_END) \ - MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_3_BEGIN, FLASH_REGION_FILESYSTEM_3_END) \ - MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_4_BEGIN, FLASH_REGION_FILESYSTEM_4_END) \ - MACRO_OPERATOR(FLASH_REGION_EXTRA_FILESYSTEM_BEGIN, FLASH_REGION_EXTRA_FILESYSTEM_END) \ - MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_5_BEGIN, FLASH_REGION_FILESYSTEM_5_END) \ +#else // Same as normal fw except there is one extra region to erase +#define FILE_SYSTEM_REGIONS(MACRO_OPERATOR) \ + MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_BEGIN, FLASH_REGION_FILESYSTEM_END) \ + MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_2_BEGIN, FLASH_REGION_FILESYSTEM_2_END) \ + MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_3_BEGIN, FLASH_REGION_FILESYSTEM_3_END) \ + MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_4_BEGIN, FLASH_REGION_FILESYSTEM_4_END) \ + MACRO_OPERATOR(FLASH_REGION_EXTRA_FILESYSTEM_BEGIN, FLASH_REGION_EXTRA_FILESYSTEM_END) \ + MACRO_OPERATOR(FLASH_REGION_FILESYSTEM_5_BEGIN, FLASH_REGION_FILESYSTEM_5_END) \ MACRO_OPERATOR(FLASH_REGION_UNUSED0_BEGIN, FLASH_REGION_UNUSED0_END) #endif diff --git a/src/fw/flash_region/flash_region.c b/src/fw/flash_region/flash_region.c index bf6b16f777..fd877c8c5a 100644 --- a/src/fw/flash_region/flash_region.c +++ b/src/fw/flash_region/flash_region.c @@ -32,31 +32,30 @@ static void prv_erase_upkeep(int *erase_count, bool feed_watchdog) { } } -static void prv_erase_optimal_range(uint32_t min_start, uint32_t max_start, - uint32_t min_end, uint32_t max_end, bool feed_watchdog) { - PBL_LOG_DBG("flash_region_erase_optimal_range, 0x%"PRIx32" 0x%"PRIx32" 0x%"PRIx32" 0x%"PRIx32, - min_start, max_start, min_end, max_end); +static void prv_erase_optimal_range(uint32_t min_start, uint32_t max_start, uint32_t min_end, + uint32_t max_end, bool feed_watchdog) { + PBL_LOG_DBG("flash_region_erase_optimal_range, 0x%" PRIx32 " 0x%" PRIx32 " 0x%" PRIx32 + " 0x%" PRIx32, + min_start, max_start, min_end, max_end); PBL_ASSERTN(((min_start & (~SUBSECTOR_ADDR_MASK)) == 0) && - ((max_end & (~SUBSECTOR_ADDR_MASK)) == 0) && - (min_start <= max_start) && - (max_start <= min_end) && - (min_end <= max_end)); - - // We want to erase the sector that starts immediately below max_start but after min_start. If no sector - // boundary exists between the two, we need to start erasing sectors after min_start and backfill with - // subsector erases. + ((max_end & (~SUBSECTOR_ADDR_MASK)) == 0) && (min_start <= max_start) && + (max_start <= min_end) && (min_end <= max_end)); + + // We want to erase the sector that starts immediately below max_start but after min_start. If no + // sector boundary exists between the two, we need to start erasing sectors after min_start and + // backfill with subsector erases. int32_t sector_start = (max_start & SECTOR_ADDR_MASK); int32_t subsector_start = (max_start & SUBSECTOR_ADDR_MASK); - if (sector_start < (int32_t) min_start) { + if (sector_start < (int32_t)min_start) { sector_start += SECTOR_SIZE_BYTES; } - // We want to erase ending after min_end but before max_end. If that ends running past the end of max_end, - // we need to erase starting with the sector before and fill in with subsector erases. + // We want to erase ending after min_end but before max_end. If that ends running past the end of + // max_end, we need to erase starting with the sector before and fill in with subsector erases. int32_t sector_end = ((min_end - 1) & SECTOR_ADDR_MASK) + SECTOR_SIZE_BYTES; int32_t subsector_end = ((min_end - 1) & SUBSECTOR_ADDR_MASK) + SUBSECTOR_SIZE_BYTES; - if (sector_end > (int32_t) max_end) { + if (sector_end > (int32_t)max_end) { sector_end -= SECTOR_SIZE_BYTES; } @@ -93,8 +92,8 @@ static void prv_erase_optimal_range(uint32_t min_start, uint32_t max_start, } } -void flash_region_erase_optimal_range(uint32_t min_start, uint32_t max_start, - uint32_t min_end, uint32_t max_end) { +void flash_region_erase_optimal_range(uint32_t min_start, uint32_t max_start, uint32_t min_end, + uint32_t max_end) { prv_erase_optimal_range(min_start, max_start, min_end, max_end, false /* feed_watchdog */); } diff --git a/src/fw/flash_region/flash_region_def_helper.h b/src/fw/flash_region/flash_region_def_helper.h index 80716f5293..10e3d9ad9a 100644 --- a/src/fw/flash_region/flash_region_def_helper.h +++ b/src/fw/flash_region/flash_region_def_helper.h @@ -3,12 +3,10 @@ enum { #define FLASH_REGION_LIST(name, size, arg) FlashRegion_##name, - FLASH_REGION_DEF(FLASH_REGION_LIST, NULL) - FlashRegion__COUNT + FLASH_REGION_DEF(FLASH_REGION_LIST, NULL) FlashRegion__COUNT }; -#define FLASH_REGION_ADDR_HELPER(name, size, tgt) \ - + (FlashRegion_##name < (tgt) ? (size) : 0) +#define FLASH_REGION_ADDR_HELPER(name, size, tgt) +(FlashRegion_##name < (tgt) ? (size) : 0) #ifndef FLASH_REGION_BASE_ADDRESS #define FLASH_REGION_BASE_ADDRESS 0 @@ -16,13 +14,16 @@ enum { // These macros add up all the sizes of the flash regions that come before (and including in the // case of the _END_ADDR macro) the specified one to determine the proper flash address value. -#define FLASH_REGION_START_ADDR(region) \ - (((0) FLASH_REGION_DEF(FLASH_REGION_ADDR_HELPER, FlashRegion_##region)) + FLASH_REGION_BASE_ADDRESS) -#define FLASH_REGION_END_ADDR(region) \ - (((0) FLASH_REGION_DEF(FLASH_REGION_ADDR_HELPER, FlashRegion_##region + 1)) + FLASH_REGION_BASE_ADDRESS) +#define FLASH_REGION_START_ADDR(region) \ + (((0)FLASH_REGION_DEF(FLASH_REGION_ADDR_HELPER, FlashRegion_##region)) + \ + FLASH_REGION_BASE_ADDRESS) +#define FLASH_REGION_END_ADDR(region) \ + (((0)FLASH_REGION_DEF(FLASH_REGION_ADDR_HELPER, FlashRegion_##region + 1)) + \ + FLASH_REGION_BASE_ADDRESS) // Checks that all regions are a multiple of the specified size (usually sector or subsector size) -#define FLASH_REGION_SIZE_CHECK_HELPER(name, size, arg) \ - && ((size) % (arg) == 0) -#define FLASH_REGION_SIZE_CHECK(size) \ - _Static_assert((1) FLASH_REGION_DEF(FLASH_REGION_SIZE_CHECK_HELPER, size), "Invalid region size"); +#define FLASH_REGION_SIZE_CHECK_HELPER(name, size, arg) &&((size) % (arg) == 0) +#define FLASH_REGION_SIZE_CHECK(size) \ + _Static_assert((1)FLASH_REGION_DEF(FLASH_REGION_SIZE_CHECK_HELPER, size), \ + "Invalid region " \ + "size"); diff --git a/src/fw/flash_region/flash_region_gd25lq255e.h b/src/fw/flash_region/flash_region_gd25lq255e.h index f92b39a562..2a21e2806b 100644 --- a/src/fw/flash_region/flash_region_gd25lq255e.h +++ b/src/fw/flash_region/flash_region_gd25lq255e.h @@ -16,20 +16,20 @@ #define FLASH_REGION_DEF(MACRO, arg) \ /* Protectable region (1M, lower 1/32) BP4-0=10101 */ \ - MACRO(SAFE_FIRMWARE, 0x0080000 /* 512K */, arg) /* 0x0000000 - 0x007FFFF */ \ - MACRO(RSVD1, 0x007F000 /* 508K */, arg) /* 0x0080000 - 0x00FEFFF */ \ - MACRO(MFG_INFO, 0x0001000 /* 4K */, arg) /* 0x00FF000 - 0x00FFFFF */ \ + MACRO(SAFE_FIRMWARE, 0x0080000 /* 512K */, arg) /* 0x0000000 - 0x007FFFF */ \ + MACRO(RSVD1, 0x007F000 /* 508K */, arg) /* 0x0080000 - 0x00FEFFF */ \ + MACRO(MFG_INFO, 0x0001000 /* 4K */, arg) /* 0x00FF000 - 0x00FFFFF */ \ /* Non-protectable region (31MB) */ \ - MACRO(FIRMWARE_SLOT_1, 0x0100000 /* 1024K */, arg) /* 0x0100000 - 0x01FFFFF */ \ + MACRO(FIRMWARE_SLOT_1, 0x0100000 /* 1024K */, arg) /* 0x0100000 - 0x01FFFFF */ \ MACRO(SYSTEM_RESOURCES_BANK_0, 0x0100000 /* 1024K */, arg) /* 0x0200000 - 0x02FFFFF */ \ MACRO(SYSTEM_RESOURCES_BANK_1, 0x0100000 /* 1024K */, arg) /* 0x0300000 - 0x03FFFFF */ \ - MACRO(FILESYSTEM, 0x19D0000 /* 26432K */, arg) /* 0x0400000 - 0x1DCFFFF */ \ - MACRO(RSVD2, 0x0200000 /* 2048K */, arg) /* 0x1DD0000 - 0x1FCFFFF */ \ - MACRO(DEBUG_DB, 0x0020000 /* 128K */, arg) /* 0x1FD0000 - 0x1FEFFFF */ \ - MACRO(RSVD3, 0x000D000 /* 52K */, arg) /* 0x1FF0000 - 0x1FFCFFF */ \ - MACRO(MFG_RESULTS, 0x0001000 /* 4K */, arg) /* 0x1FFD000 - 0x1FFDFFF */ \ - MACRO(MFG_BATTERY_STATE, 0x0001000 /* 4K */, arg) /* 0x1FFE000 - 0x1FFEFFF */ \ - MACRO(SHARED_PRF_STORAGE, 0x0001000 /* 4K */, arg) /* 0x1FFF000 - 0x1FFFFFF */ + MACRO(FILESYSTEM, 0x19D0000 /* 26432K */, arg) /* 0x0400000 - 0x1DCFFFF */ \ + MACRO(RSVD2, 0x0200000 /* 2048K */, arg) /* 0x1DD0000 - 0x1FCFFFF */ \ + MACRO(DEBUG_DB, 0x0020000 /* 128K */, arg) /* 0x1FD0000 - 0x1FEFFFF */ \ + MACRO(RSVD3, 0x000D000 /* 52K */, arg) /* 0x1FF0000 - 0x1FFCFFF */ \ + MACRO(MFG_RESULTS, 0x0001000 /* 4K */, arg) /* 0x1FFD000 - 0x1FFDFFF */ \ + MACRO(MFG_BATTERY_STATE, 0x0001000 /* 4K */, arg) /* 0x1FFE000 - 0x1FFEFFF */ \ + MACRO(SHARED_PRF_STORAGE, 0x0001000 /* 4K */, arg) /* 0x1FFF000 - 0x1FFFFFF */ #include "flash_region_def_helper.h" diff --git a/src/fw/flash_region/flash_region_gd25q256e.h b/src/fw/flash_region/flash_region_gd25q256e.h index dedcf61bdb..748ee7ac39 100644 --- a/src/fw/flash_region/flash_region_gd25q256e.h +++ b/src/fw/flash_region/flash_region_gd25q256e.h @@ -17,23 +17,23 @@ ////////////////////////////////////////////////////////////////////////////// #define FLASH_REGION_DEF(MACRO, arg) \ - MACRO(PTABLE, 0x0010000 /* 64K */, arg) /* 0x12000000 - 0x1200FFFF */ \ - MACRO(BOOTLOADER, 0x0010000 /* 64K */, arg) /* 0x12010000 - 0x1201FFFF */ \ - MACRO(FIRMWARE_SLOT_0, 0x0300000 /* 3072K */, arg) /* 0x12020000 - 0x1231FFFF */ \ - MACRO(FIRMWARE_SLOT_1, 0x0300000 /* 3072K */, arg) /* 0x12320000 - 0x1261FFFF */ \ + MACRO(PTABLE, 0x0010000 /* 64K */, arg) /* 0x12000000 - 0x1200FFFF */ \ + MACRO(BOOTLOADER, 0x0010000 /* 64K */, arg) /* 0x12010000 - 0x1201FFFF */ \ + MACRO(FIRMWARE_SLOT_0, 0x0300000 /* 3072K */, arg) /* 0x12020000 - 0x1231FFFF */ \ + MACRO(FIRMWARE_SLOT_1, 0x0300000 /* 3072K */, arg) /* 0x12320000 - 0x1261FFFF */ \ MACRO(SYSTEM_RESOURCES_BANK_0, 0x0200000 /* 2048K */, arg) /* 0x12620000 - 0x1281FFFF */ \ MACRO(SYSTEM_RESOURCES_BANK_1, 0x0200000 /* 2048K */, arg) /* 0x12820000 - 0x12A1FFFF */ \ - MACRO(SAFE_FIRMWARE, 0x0090000 /* 576K */, arg) /* 0x12A20000 - 0x12AAFFFF */ \ - MACRO(FILESYSTEM, 0x1490000 /* 21056K */, arg) /* 0x12AB0000 - 0x13F3FFFF */ \ - MACRO(CD, 0x0080000 /* 512K */, arg) /* 0x12A40000 - 0x13FBFFFF */ \ - MACRO(RSVD1, 0x000F000 /* 60K */, arg) /* 0x13FC0000 - 0x13FCEFFF */ \ - MACRO(DEBUG_DB, 0x0020000 /* 128K */, arg) /* 0x13FCF000 - 0x13FEEFFF */ \ - MACRO(RSVD2, 0x000C000 /* 48K */, arg) /* 0x13FEF000 - 0x13FFAFFF */ \ - MACRO(MFG_RESULTS, 0x0001000 /* 4K */, arg) /* 0x13FFB000 - 0x13FFBFFF */ \ - MACRO(MFG_BATTERY_STATE, 0x0001000 /* 4K */, arg) /* 0x13FFC000 - 0x13FFCFFF */ \ - MACRO(TZINFO, 0x0001000 /* 4K */, arg) /* 0x13FFD000 - 0x13FFDFFF */ \ - MACRO(MFG_INFO, 0x0001000 /* 4K */, arg) /* 0x13FFE000 - 0x13FFEFFF */ \ - MACRO(SHARED_PRF_STORAGE, 0x0001000 /* 4K */, arg) /* 0x13FFF000 - 0x13FFFFFF */ + MACRO(SAFE_FIRMWARE, 0x0090000 /* 576K */, arg) /* 0x12A20000 - 0x12AAFFFF */ \ + MACRO(FILESYSTEM, 0x1490000 /* 21056K */, arg) /* 0x12AB0000 - 0x13F3FFFF */ \ + MACRO(CD, 0x0080000 /* 512K */, arg) /* 0x12A40000 - 0x13FBFFFF */ \ + MACRO(RSVD1, 0x000F000 /* 60K */, arg) /* 0x13FC0000 - 0x13FCEFFF */ \ + MACRO(DEBUG_DB, 0x0020000 /* 128K */, arg) /* 0x13FCF000 - 0x13FEEFFF */ \ + MACRO(RSVD2, 0x000C000 /* 48K */, arg) /* 0x13FEF000 - 0x13FFAFFF */ \ + MACRO(MFG_RESULTS, 0x0001000 /* 4K */, arg) /* 0x13FFB000 - 0x13FFBFFF */ \ + MACRO(MFG_BATTERY_STATE, 0x0001000 /* 4K */, arg) /* 0x13FFC000 - 0x13FFCFFF */ \ + MACRO(TZINFO, 0x0001000 /* 4K */, arg) /* 0x13FFD000 - 0x13FFDFFF */ \ + MACRO(MFG_INFO, 0x0001000 /* 4K */, arg) /* 0x13FFE000 - 0x13FFEFFF */ \ + MACRO(SHARED_PRF_STORAGE, 0x0001000 /* 4K */, arg) /* 0x13FFF000 - 0x13FFFFFF */ #include "flash_region_def_helper.h" diff --git a/src/fw/flash_region/flash_region_n25q.h b/src/fw/flash_region/flash_region_n25q.h index 980689fb6b..728c1f304d 100644 --- a/src/fw/flash_region/flash_region_n25q.h +++ b/src/fw/flash_region/flash_region_n25q.h @@ -16,55 +16,54 @@ // Scratch space for firmware images (normal and recovery). // We assume this is 64k aligned... #define FLASH_REGION_FIRMWARE_SLOT_1_BEGIN 0x0 -#define FLASH_REGION_FIRMWARE_SLOT_1_END 0x80000 // 512k +#define FLASH_REGION_FIRMWARE_SLOT_1_END 0x80000 // 512k // Formerly FLASH_REGION_APP_BEGIN #define FLASH_REGION_FILESYSTEM_3_BEGIN 0x80000 -#define FLASH_REGION_FILESYSTEM_3_END 0x100000 // 512k +#define FLASH_REGION_FILESYSTEM_3_END 0x100000 // 512k // Formerly REGISTRY_FLASH // Use one sector for the shared prf storage #define FLASH_REGION_SHARED_PRF_STORAGE_BEGIN 0x100000 -#define FLASH_REGION_SHARED_PRF_STORAGE_END 0x110000 // 64k +#define FLASH_REGION_SHARED_PRF_STORAGE_END 0x110000 // 64k // Use one sector to store the factory settings registry -#define FACTORY_REGISTRY_FLASH_BEGIN 0x110000 // -#define FACTORY_REGISTRY_FLASH_END 0x120000 // 64k +#define FACTORY_REGISTRY_FLASH_BEGIN 0x110000 // +#define FACTORY_REGISTRY_FLASH_END 0x120000 // 64k #define FLASH_REGION_SYSTEM_RESOURCES_BANK_0_BEGIN 0x120000 -#define FLASH_REGION_SYSTEM_RESOURCES_BANK_0_END 0x160000 // 256k +#define FLASH_REGION_SYSTEM_RESOURCES_BANK_0_END 0x160000 // 256k // Formerly part of the 640k of data-logging, which was added to the filesystem as FILESYSTEM_5 // Reserved a couple sectors because it's always nice to have a couple free. #define FLASH_REGION_UNUSED0_BEGIN 0x160000 -#define FLASH_REGION_UNUSED0_END 0x180000 // 128k +#define FLASH_REGION_UNUSED0_END 0x180000 // 128k #define FLASH_REGION_FILESYSTEM_5_BEGIN 0x180000 -#define FLASH_REGION_FILESYSTEM_5_END 0x200000 // 512k +#define FLASH_REGION_FILESYSTEM_5_END 0x200000 // 512k #define FLASH_REGION_SAFE_FIRMWARE_BEGIN 0x200000 -#define FLASH_REGION_SAFE_FIRMWARE_END 0x280000 // 512k +#define FLASH_REGION_SAFE_FIRMWARE_END 0x280000 // 512k #define FLASH_REGION_SYSTEM_RESOURCES_BANK_1_BEGIN 0x280000 -#define FLASH_REGION_SYSTEM_RESOURCES_BANK_1_END 0x2c0000 // 256k +#define FLASH_REGION_SYSTEM_RESOURCES_BANK_1_END 0x2c0000 // 256k // Formerly FLASH_REGION_RESERVED_BEGIN -#define FLASH_REGION_FILESYSTEM_2_BEGIN 0x2c0000 //64k +#define FLASH_REGION_FILESYSTEM_2_BEGIN 0x2c0000 // 64k #define FLASH_REGION_FILESYSTEM_2_END 0x2d0000 #define FLASH_REGION_FILESYSTEM_BEGIN 0x2d0000 -#define FLASH_REGION_FILESYSTEM_END 0x320000 // 320k +#define FLASH_REGION_FILESYSTEM_END 0x320000 // 320k // Formerly FLASH_REGION_APP_RESOURCES_BEGIN #define FLASH_REGION_FILESYSTEM_4_BEGIN 0x320000 -#define FLASH_REGION_FILESYSTEM_4_END 0x3e0000 // 768k +#define FLASH_REGION_FILESYSTEM_4_END 0x3e0000 // 768k #define FLASH_REGION_DEBUG_DB_BEGIN 0x3e0000 -#define FLASH_REGION_DEBUG_DB_END 0x400000 // 128k +#define FLASH_REGION_DEBUG_DB_END 0x400000 // 128k #define FLASH_DEBUG_DB_BLOCK_SIZE SECTOR_SIZE_BYTES #define FLASH_REGION_EXTRA_FILESYSTEM_BEGIN 0x400000 #define FLASH_REGION_EXTRA_FILESYSTEM_END BOARD_NOR_FLASH_SIZE // 0x400000 is the end of the SPI flash address space. - diff --git a/src/fw/flash_region/flash_region_py25q128ha.h b/src/fw/flash_region/flash_region_py25q128ha.h index 8dc388bcff..4f5d982d70 100644 --- a/src/fw/flash_region/flash_region_py25q128ha.h +++ b/src/fw/flash_region/flash_region_py25q128ha.h @@ -17,19 +17,19 @@ ////////////////////////////////////////////////////////////////////////////// #define FLASH_REGION_DEF(MACRO, arg) \ - MACRO(PTABLE, 0x0010000 /* 64K */, arg) /* 0x12000000 - 0x1200FFFF */ \ - MACRO(BOOTLOADER, 0x0010000 /* 64K */, arg) /* 0x12010000 - 0x1201FFFF */ \ - MACRO(FIRMWARE_SLOT_0, 0x0300000 /* 3072K */, arg) /* 0x12020000 - 0x1231FFFF */ \ - MACRO(FIRMWARE_SLOT_1, 0x0300000 /* 3072K */, arg) /* 0x12320000 - 0x1261FFFF */ \ + MACRO(PTABLE, 0x0010000 /* 64K */, arg) /* 0x12000000 - 0x1200FFFF */ \ + MACRO(BOOTLOADER, 0x0010000 /* 64K */, arg) /* 0x12010000 - 0x1201FFFF */ \ + MACRO(FIRMWARE_SLOT_0, 0x0300000 /* 3072K */, arg) /* 0x12020000 - 0x1231FFFF */ \ + MACRO(FIRMWARE_SLOT_1, 0x0300000 /* 3072K */, arg) /* 0x12320000 - 0x1261FFFF */ \ MACRO(SYSTEM_RESOURCES_BANK_0, 0x0200000 /* 2048K */, arg) /* 0x12620000 - 0x1281FFFF */ \ MACRO(SYSTEM_RESOURCES_BANK_1, 0x0200000 /* 2048K */, arg) /* 0x12820000 - 0x12A1FFFF */ \ - MACRO(SAFE_FIRMWARE, 0x0080000 /* 512K */, arg) /* 0x12A20000 - 0x12A9FFFF */ \ - MACRO(FILESYSTEM, 0x0520000 /* 5248K */, arg) /* 0x12AA0000 - 0x12FBFFFF */ \ - MACRO(RSVD1, 0x000F000 /* 60K */, arg) /* 0x12FC0000 - 0x12FCEFFF */ \ - MACRO(DEBUG_DB, 0x0020000 /* 128K */, arg) /* 0x12FCF000 - 0x12FEEFFF */ \ - MACRO(RSVD2, 0x000F000 /* 58K */, arg) /* 0x12FEF000 - 0x12FFDFFF */ \ - MACRO(MFG_INFO, 0x0001000 /* 4K */, arg) /* 0x12FFE000 - 0x12FFEFFF */ \ - MACRO(SHARED_PRF_STORAGE, 0x0001000 /* 4K */, arg) /* 0x12FFF000 - 0x12FFFFFF */ + MACRO(SAFE_FIRMWARE, 0x0080000 /* 512K */, arg) /* 0x12A20000 - 0x12A9FFFF */ \ + MACRO(FILESYSTEM, 0x0520000 /* 5248K */, arg) /* 0x12AA0000 - 0x12FBFFFF */ \ + MACRO(RSVD1, 0x000F000 /* 60K */, arg) /* 0x12FC0000 - 0x12FCEFFF */ \ + MACRO(DEBUG_DB, 0x0020000 /* 128K */, arg) /* 0x12FCF000 - 0x12FEEFFF */ \ + MACRO(RSVD2, 0x000F000 /* 58K */, arg) /* 0x12FEF000 - 0x12FFDFFF */ \ + MACRO(MFG_INFO, 0x0001000 /* 4K */, arg) /* 0x12FFE000 - 0x12FFEFFF */ \ + MACRO(SHARED_PRF_STORAGE, 0x0001000 /* 4K */, arg) /* 0x12FFF000 - 0x12FFFFFF */ #include "flash_region_def_helper.h" diff --git a/src/fw/flash_region/flash_region_qemu.h b/src/fw/flash_region/flash_region_qemu.h index e523ce1697..33b119073a 100644 --- a/src/fw/flash_region/flash_region_qemu.h +++ b/src/fw/flash_region/flash_region_qemu.h @@ -16,23 +16,23 @@ // Flash layout for QEMU (32MB external flash, same layout as obelix/gd25q256e) #define FLASH_REGION_DEF(MACRO, arg) \ - MACRO(PTABLE, 0x0010000 /* 64K */, arg) /* 0x10000000 - 0x1000FFFF */ \ - MACRO(BOOTLOADER, 0x0010000 /* 64K */, arg) /* 0x10010000 - 0x1001FFFF */ \ - MACRO(FIRMWARE_SLOT_0, 0x0300000 /* 3072K */, arg) /* 0x10020000 - 0x1031FFFF */ \ - MACRO(FIRMWARE_SLOT_1, 0x0300000 /* 3072K */, arg) /* 0x10320000 - 0x1061FFFF */ \ + MACRO(PTABLE, 0x0010000 /* 64K */, arg) /* 0x10000000 - 0x1000FFFF */ \ + MACRO(BOOTLOADER, 0x0010000 /* 64K */, arg) /* 0x10010000 - 0x1001FFFF */ \ + MACRO(FIRMWARE_SLOT_0, 0x0300000 /* 3072K */, arg) /* 0x10020000 - 0x1031FFFF */ \ + MACRO(FIRMWARE_SLOT_1, 0x0300000 /* 3072K */, arg) /* 0x10320000 - 0x1061FFFF */ \ MACRO(SYSTEM_RESOURCES_BANK_0, 0x0200000 /* 2048K */, arg) /* 0x10620000 - 0x1081FFFF */ \ MACRO(SYSTEM_RESOURCES_BANK_1, 0x0200000 /* 2048K */, arg) /* 0x10820000 - 0x10A1FFFF */ \ - MACRO(SAFE_FIRMWARE, 0x0090000 /* 576K */, arg) /* 0x10A20000 - 0x10AAFFFF */ \ - MACRO(FILESYSTEM, 0x1490000 /* 21056K */, arg) /* 0x10AB0000 - 0x11F3FFFF */ \ - MACRO(CD, 0x0080000 /* 512K */, arg) /* 0x11F40000 - 0x11FBFFFF */ \ - MACRO(RSVD1, 0x000F000 /* 60K */, arg) /* 0x11FC0000 - 0x11FCEFFF */ \ - MACRO(DEBUG_DB, 0x0020000 /* 128K */, arg) /* 0x11FCF000 - 0x11FEEFFF */ \ - MACRO(RSVD2, 0x000C000 /* 48K */, arg) /* 0x11FEF000 - 0x11FFAFFF */ \ - MACRO(MFG_RESULTS, 0x0001000 /* 4K */, arg) /* 0x11FFB000 - 0x11FFBFFF */ \ - MACRO(MFG_BATTERY_STATE, 0x0001000 /* 4K */, arg) /* 0x11FFC000 - 0x11FFCFFF */ \ - MACRO(TZINFO, 0x0001000 /* 4K */, arg) /* 0x11FFD000 - 0x11FFDFFF */ \ - MACRO(MFG_INFO, 0x0001000 /* 4K */, arg) /* 0x11FFE000 - 0x11FFEFFF */ \ - MACRO(SHARED_PRF_STORAGE, 0x0001000 /* 4K */, arg) /* 0x11FFF000 - 0x11FFFFFF */ + MACRO(SAFE_FIRMWARE, 0x0090000 /* 576K */, arg) /* 0x10A20000 - 0x10AAFFFF */ \ + MACRO(FILESYSTEM, 0x1490000 /* 21056K */, arg) /* 0x10AB0000 - 0x11F3FFFF */ \ + MACRO(CD, 0x0080000 /* 512K */, arg) /* 0x11F40000 - 0x11FBFFFF */ \ + MACRO(RSVD1, 0x000F000 /* 60K */, arg) /* 0x11FC0000 - 0x11FCEFFF */ \ + MACRO(DEBUG_DB, 0x0020000 /* 128K */, arg) /* 0x11FCF000 - 0x11FEEFFF */ \ + MACRO(RSVD2, 0x000C000 /* 48K */, arg) /* 0x11FEF000 - 0x11FFAFFF */ \ + MACRO(MFG_RESULTS, 0x0001000 /* 4K */, arg) /* 0x11FFB000 - 0x11FFBFFF */ \ + MACRO(MFG_BATTERY_STATE, 0x0001000 /* 4K */, arg) /* 0x11FFC000 - 0x11FFCFFF */ \ + MACRO(TZINFO, 0x0001000 /* 4K */, arg) /* 0x11FFD000 - 0x11FFDFFF */ \ + MACRO(MFG_INFO, 0x0001000 /* 4K */, arg) /* 0x11FFE000 - 0x11FFEFFF */ \ + MACRO(SHARED_PRF_STORAGE, 0x0001000 /* 4K */, arg) /* 0x11FFF000 - 0x11FFFFFF */ #include "flash_region_def_helper.h" diff --git a/src/fw/hardfault_handler.c b/src/fw/hardfault_handler.c index 0ec47018b1..8781e42e57 100644 --- a/src/fw/hardfault_handler.c +++ b/src/fw/hardfault_handler.c @@ -14,16 +14,16 @@ #include "kernel/pebble_tasks.h" -void fault_handler_dump_stacked_args(char buffer[80], unsigned int* stacked_args) { - unsigned int stacked_r0 = ((unsigned long) stacked_args[0]); - unsigned int stacked_r1 = ((unsigned long) stacked_args[1]); - unsigned int stacked_r2 = ((unsigned long) stacked_args[2]); - unsigned int stacked_r3 = ((unsigned long) stacked_args[3]); +void fault_handler_dump_stacked_args(char buffer[80], unsigned int *stacked_args) { + unsigned int stacked_r0 = ((unsigned long)stacked_args[0]); + unsigned int stacked_r1 = ((unsigned long)stacked_args[1]); + unsigned int stacked_r2 = ((unsigned long)stacked_args[2]); + unsigned int stacked_r3 = ((unsigned long)stacked_args[3]); - unsigned int stacked_r12 = ((unsigned long) stacked_args[4]); - unsigned int stacked_lr = ((unsigned long) stacked_args[5]); - unsigned int stacked_pc = ((unsigned long) stacked_args[6]); - unsigned int stacked_psr = ((unsigned long) stacked_args[7]); + unsigned int stacked_r12 = ((unsigned long)stacked_args[4]); + unsigned int stacked_lr = ((unsigned long)stacked_args[5]); + unsigned int stacked_pc = ((unsigned long)stacked_args[6]); + unsigned int stacked_psr = ((unsigned long)stacked_args[7]); PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "R0 = 0x%x", stacked_r0); PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "R1 = 0x%x", stacked_r1); @@ -31,16 +31,15 @@ void fault_handler_dump_stacked_args(char buffer[80], unsigned int* stacked_args PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "R3 = 0x%x", stacked_r3); PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "R12 = 0x%x", stacked_r12); PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "SP = %p", &stacked_args[8]); - PBL_LOG_FROM_FAULT_HANDLER_FMT( - buffer, 80, "LR [R14] = 0x%x subroutine call return address", stacked_lr); - PBL_LOG_FROM_FAULT_HANDLER_FMT( - buffer, 80, "PC [R15] = 0x%x program counter", stacked_pc); + PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "LR [R14] = 0x%x subroutine call return address", + stacked_lr); + PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "PC [R15] = 0x%x program counter", stacked_pc); PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "PSR = 0x%x", stacked_psr); - //BREAKPOINT; + // BREAKPOINT; - // NOTE: If you want to get a stack trace at this point. Set a breakpoint here (you can compile in the above - // BREAKPOINT call if you want) and issue the following commands in gdb: + // NOTE: If you want to get a stack trace at this point. Set a breakpoint here (you can compile in + // the above BREAKPOINT call if you want) and issue the following commands in gdb: // set var $sp= // set var $lr= // set var $pc= @@ -52,7 +51,8 @@ typedef struct IndexToName { const char *name; } IndexToName; -static void print_set_indexes(char buffer[80], const uint8_t *bitset, const IndexToName *mappings, unsigned int num_mappings) { +static void print_set_indexes(char buffer[80], const uint8_t *bitset, const IndexToName *mappings, + unsigned int num_mappings) { for (unsigned int i = 0; i < num_mappings; ++i) { if (bitset8_get(bitset, mappings[i].index)) { PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, " %s = yes", mappings[i].name); @@ -61,41 +61,32 @@ static void print_set_indexes(char buffer[80], const uint8_t *bitset, const Inde } void fault_handler_dump_cfsr(char buffer[80]) { - // See http://infocenter.arm.com/help/topic/com.arm.doc.dui0552a/DUI0552A_cortex_m3_dgug.pdf for the register - // definition. + // See http://infocenter.arm.com/help/topic/com.arm.doc.dui0552a/DUI0552A_cortex_m3_dgug.pdf for + // the register definition. const uint32_t cfsr = SCB->CFSR; - PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "CFSR (Configurable Fault) = 0x%"PRIx32, cfsr); + PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "CFSR (Configurable Fault) = 0x%" PRIx32, cfsr); // Usage Fault Status Register const uint16_t ufsr = (cfsr >> 16) & 0xffff; - static const IndexToName ufsr_mappings[] = { - { 9, "DIVBYZERO" }, - { 8, "UNALIGNED" }, - { 3, "NOCP" }, - { 2, "INVPC" }, - { 1, "INVSTATE" }, - { 0, "UNDEFINSTR" } - }; + static const IndexToName ufsr_mappings[] = {{9, "DIVBYZERO"}, {8, "UNALIGNED"}, + {3, "NOCP"}, {2, "INVPC"}, + {1, "INVSTATE"}, {0, "UNDEFINSTR"}}; if (ufsr != 0) { PBL_LOG_FROM_FAULT_HANDLER(" Usage Fault Status Register:"); - print_set_indexes(buffer, (const uint8_t*) &ufsr, ufsr_mappings, ARRAY_LENGTH(ufsr_mappings)); + print_set_indexes(buffer, (const uint8_t *)&ufsr, ufsr_mappings, ARRAY_LENGTH(ufsr_mappings)); } // Bus Fault Status Register const uint8_t bfsr = (cfsr >> 8) & 0xff; static const IndexToName bfsr_mappings[] = { - { 4, "STKERR" }, - { 3, "UNSTKERR" }, - { 2, "IMPRECISERR" }, - { 1, "PRECISERR" }, - { 0, "IBUSERR" }, + {4, "STKERR"}, {3, "UNSTKERR"}, {2, "IMPRECISERR"}, {1, "PRECISERR"}, {0, "IBUSERR"}, }; if (bfsr != 0) { PBL_LOG_FROM_FAULT_HANDLER(" Bus Fault Status Register:"); if (bfsr & (1 << 7)) { - PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, " BFARVALID = yes 0x%"PRIx32, SCB->BFAR); + PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, " BFARVALID = yes 0x%" PRIx32, SCB->BFAR); } print_set_indexes(buffer, &bfsr, bfsr_mappings, ARRAY_LENGTH(bfsr_mappings)); @@ -103,17 +94,13 @@ void fault_handler_dump_cfsr(char buffer[80]) { // Memory Management Fault Status Register const uint8_t mmfsr = cfsr & 0xff; - static const IndexToName mmfsr_mappings[] = { - { 4, "MSTKERR" }, - { 3, "MUNSTKERR" }, - { 1, "DACCVIOL" }, - { 0, "IACCVIOL" } - }; + static const IndexToName mmfsr_mappings[] = + {{4, "MSTKERR"}, {3, "MUNSTKERR"}, {1, "DACCVIOL"}, {0, "IACCVIOL"}}; if (mmfsr != 0) { PBL_LOG_FROM_FAULT_HANDLER(" Memory Management Fault Status Register:"); if (mmfsr & (1 << 7)) { - PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, " MMFARVALID = yes 0x%"PRIx32, SCB->MMFAR); + PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, " MMFARVALID = yes 0x%" PRIx32, SCB->MMFAR); } print_set_indexes(buffer, &mmfsr, mmfsr_mappings, ARRAY_LENGTH(mmfsr_mappings)); @@ -123,17 +110,17 @@ void fault_handler_dump_cfsr(char buffer[80]) { void fault_handler_dump(char buffer[80], unsigned int *stacked_args) { fault_handler_dump_stacked_args(buffer, stacked_args); fault_handler_dump_cfsr(buffer); - PBL_LOG_FROM_FAULT_HANDLER_FMT( - buffer, 80, "Task: %s", pebble_task_get_name(pebble_task_get_current())); + PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "Task: %s", + pebble_task_get_name(pebble_task_get_current())); } -static void hard_fault_handler_c(unsigned int* hardfault_args) { +static void hard_fault_handler_c(unsigned int *hardfault_args) { // Prefer LR (PC is often madness on a hardfault). Fall back through PC, // BFAR, MMFAR so crash reports always have a non-zero address to // fingerprint on. - unsigned int stacked_lr = ((unsigned long) hardfault_args[5]); + unsigned int stacked_lr = ((unsigned long)hardfault_args[5]); if (stacked_lr == 0) { - stacked_lr = ((unsigned long) hardfault_args[6]); + stacked_lr = ((unsigned long)hardfault_args[6]); } if (stacked_lr == 0 && (SCB->CFSR & (1 << 15))) { // BFARVALID stacked_lr = SCB->BFAR; @@ -141,7 +128,7 @@ static void hard_fault_handler_c(unsigned int* hardfault_args) { if (stacked_lr == 0 && (SCB->CFSR & (1 << 7))) { // MMFARVALID stacked_lr = SCB->MMFAR; } - RebootReason reason = { .code = RebootReasonCode_HardFault, .extra = { .value = stacked_lr } }; + RebootReason reason = {.code = RebootReasonCode_HardFault, .extra = {.value = stacked_lr}}; reboot_reason_set(&reason); // Yay, ripping stuff from the internet! @@ -152,12 +139,10 @@ static void hard_fault_handler_c(unsigned int* hardfault_args) { PBL_LOG_FROM_FAULT_HANDLER("\r\n\r\n[Hard fault handler - You dun goofed]"); - PBL_LOG_FROM_FAULT_HANDLER_FMT( - buffer, 80, "SHCSR (System Handler) = 0x%"PRIx32, SCB->SHCSR); - PBL_LOG_FROM_FAULT_HANDLER_FMT( - buffer, 80, "HFSR (Hard Fault) = 0x%"PRIx32, SCB->HFSR); - PBL_LOG_FROM_FAULT_HANDLER_FMT( - buffer, 80, " Forced = %s", bool_to_str(SCB->HFSR & SCB_HFSR_FORCED_Msk)); + PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "SHCSR (System Handler) = 0x%" PRIx32, SCB->SHCSR); + PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, "HFSR (Hard Fault) = 0x%" PRIx32, SCB->HFSR); + PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, 80, " Forced = %s", + bool_to_str(SCB->HFSR & SCB_HFSR_FORCED_Msk)); fault_handler_dump(buffer, hardfault_args); @@ -167,9 +152,10 @@ static void hard_fault_handler_c(unsigned int* hardfault_args) { void HardFault_Handler(void) { // Grab the stack pointer, shove it into a register and call // the c function above. - __asm("tst lr, #4\n" - "ite eq\n" - "mrseq r0, msp\n" - "mrsne r0, psp\n" - "b %0\n" :: "i" (hard_fault_handler_c)); + __asm( + "tst lr, #4\n" + "ite eq\n" + "mrseq r0, msp\n" + "mrsne r0, psp\n" + "b %0\n" ::"i"(hard_fault_handler_c)); } diff --git a/src/fw/kernel/core_dump.c b/src/fw/kernel/core_dump.c index 0da4471b2b..2d789e3ad6 100644 --- a/src/fw/kernel/core_dump.c +++ b/src/fw/kernel/core_dump.c @@ -71,49 +71,49 @@ extern const uint32_t __CCM_RAM_size__[]; extern const uint32_t __DTCM_RAM_size__[]; void cd_flash_init(void); -uint32_t cd_flash_write_bytes(const void* buffer_ptr, uint32_t start_addr, uint32_t buffer_size); +uint32_t cd_flash_write_bytes(const void *buffer_ptr, uint32_t start_addr, uint32_t buffer_size); void cd_flash_erase_region(uint32_t start_addr, uint32_t total_bytes); -void cd_flash_read_bytes(void* buffer_ptr, uint32_t start_addr, uint32_t buffer_size); +void cd_flash_read_bytes(void *buffer_ptr, uint32_t start_addr, uint32_t buffer_size); // ---------------------------------------------------------------------------------------- // Private globals -static uint32_t s_flash_addr; // next address in flash to write to +static uint32_t s_flash_addr; // next address in flash to write to // Saved registers before we trigger our interrupt: [r0-r12, sp, lr, pc, xpsr] static ALIGN(4) CoreDumpSavedRegisters s_saved_registers; static uint32_t s_time_stamp; static bool s_core_dump_initiated = false; static bool s_core_dump_is_forced = false; -static bool s_test_force_bus_fault = false; // Used for unit testing -static bool s_test_force_inf_loop = false; // Used for unit testing -static bool s_test_force_assert = false; // Used for unit testing - +static bool s_test_force_bus_fault = false; // Used for unit testing +static bool s_test_force_inf_loop = false; // Used for unit testing +static bool s_test_force_assert = false; // Used for unit testing // List of memory regions to include in the core dump typedef struct { - void* start; + void *start; uint32_t length; - bool word_reads_only; // Some peripherals can only be read 32 bits at a - // time, or you BusFault (maybe). Set this to true - // for memory regions where reads smaller than 32 - // bits will fail. The start pointer must also be - // word-aligned. + bool word_reads_only; // Some peripherals can only be read 32 bits at a + // time, or you BusFault (maybe). Set this to true + // for memory regions where reads smaller than 32 + // bits will fail. The start pointer must also be + // word-aligned. } MemoryRegion; // Memory regions to dump static const MemoryRegion MEMORY_REGIONS_DUMP[] = { #if CONFIG_SOC_NRF52 || CONFIG_SOC_SF32LB52 || CONFIG_QEMU - { .start = (void *)0x20000000, .length = COREDUMP_RAM_SIZE }, + {.start = (void *)0x20000000, .length = COREDUMP_RAM_SIZE}, #endif - { .start = (void *)&NVIC->ISER, .length = sizeof(NVIC->ISER) }, // Enabled interrupts - { .start = (void *)&NVIC->ISPR, .length = sizeof(NVIC->ISPR) }, // Pending interrupts - { .start = (void *)&NVIC->IABR, .length = sizeof(NVIC->IABR) }, // Active interrupts + {.start = (void *)&NVIC->ISER, .length = sizeof(NVIC->ISER)}, // Enabled interrupts + {.start = (void *)&NVIC->ISPR, .length = sizeof(NVIC->ISPR)}, // Pending interrupts + {.start = (void *)&NVIC->IABR, .length = sizeof(NVIC->IABR)}, // Active interrupts }; #if defined(CONFIG_SOC_SF32LB52) // LCPU RAM is dumped last and only when its domain is up; see prv_dump_lcpu_ram(). static const MemoryRegion LCPU_MEMORY_REGION = { - .start = (void *)COREDUMP_LCPU_RAM_START, .length = COREDUMP_LCPU_RAM_SIZE, + .start = (void *)COREDUMP_LCPU_RAM_START, + .length = COREDUMP_LCPU_RAM_SIZE, }; #endif @@ -121,8 +121,8 @@ static const MemoryRegion LCPU_MEMORY_REGION = { // Flash driver dual-API. static bool s_use_cd_flash_driver = true; -static uint32_t prv_flash_write_bytes(const void* buffer_ptr, - uint32_t start_addr, uint32_t buffer_size) { +static uint32_t prv_flash_write_bytes(const void *buffer_ptr, uint32_t start_addr, + uint32_t buffer_size) { if (s_use_cd_flash_driver) { return cd_flash_write_bytes(buffer_ptr, start_addr, buffer_size); } else { @@ -140,7 +140,7 @@ static void prv_flash_erase_region(uint32_t start_addr, uint32_t total_bytes) { } } -static void prv_flash_read_bytes(void* buffer_ptr, uint32_t start_addr, uint32_t buffer_size) { +static void prv_flash_read_bytes(void *buffer_ptr, uint32_t start_addr, uint32_t buffer_size) { if (s_use_cd_flash_driver) { cd_flash_read_bytes(buffer_ptr, start_addr, buffer_size); } else { @@ -151,15 +151,14 @@ static void prv_flash_read_bytes(void* buffer_ptr, uint32_t start_addr, uint32_t // ------------------------------------------------------------------------------------------------- // NOTE: We are explicitly avoiding use of vsniprintf and cohorts to reduce our stack // requirements -static void prv_debug_str(const char* msg) { +static void prv_debug_str(const char *msg) { kernel_pbl_log_from_fault_handler(__FILE_NAME__, 0, msg); } - // ------------------------------------------------------------------------------------------------- // NOTE: We are explicitly avoiding use of vsniprintf and cohorts to reduce our stack // requirements -static void prv_debug_str_str(const char* msg, const char* s) { +static void prv_debug_str_str(const char *msg, const char *s) { #ifdef CONFIG_PULSE_EVERYWHERE void *ctx = pulse_logging_log_sync_begin(LOG_LEVEL_ALWAYS, __FILE_NAME__, 0); pulse_logging_log_sync_append(ctx, msg); @@ -175,11 +174,10 @@ static void prv_debug_str_str(const char* msg, const char* s) { #endif } - // ------------------------------------------------------------------------------------------------- // NOTE: We are explicitly avoiding use of vsniprintf and cohorts to reduce our stack // requirements -static void prv_debug_str_int(const char* msg, uint32_t i, int base) { +static void prv_debug_str_int(const char *msg, uint32_t i, int base) { char buffer[12]; if (base == 16) { @@ -218,8 +216,8 @@ void coredump_assert(int line) { } // ----------------------------------------------------------------------------------------------- -// Return the start address of the flash region containing the core dump image. We write the core image to -// different regions in flash to avoid premature burnout of any particular region. +// Return the start address of the flash region containing the core dump image. We write the core +// image to different regions in flash to avoid premature burnout of any particular region. // @param[in] new If true, then return a pointer to a region where a new image can be stored. // If false, then return the region containing the most recent stored image or // CORE_DUMP_FLASH_INVALID_ADDR if no image has been written. @@ -227,19 +225,18 @@ void coredump_assert(int line) { static uint32_t prv_flash_start_address(bool new) { CoreDumpFlashHeader flash_hdr; CoreDumpFlashRegionHeader region_hdr; - uint32_t base_address; + uint32_t base_address; unsigned int i; - // ---------------------------------------------------------------------------------- // First, see if the flash header has been put in place prv_flash_read_bytes(&flash_hdr, CORE_DUMP_FLASH_START, sizeof(flash_hdr)); if (flash_hdr.magic != CORE_DUMP_FLASH_HDR_MAGIC) { prv_flash_erase_region(CORE_DUMP_FLASH_START, SUBSECTOR_SIZE_BYTES); - flash_hdr = (CoreDumpFlashHeader) { - .magic = CORE_DUMP_FLASH_HDR_MAGIC, - .unformatted = CORE_DUMP_ALL_UNFORMATTED, + flash_hdr = (CoreDumpFlashHeader){ + .magic = CORE_DUMP_FLASH_HDR_MAGIC, + .unformatted = CORE_DUMP_ALL_UNFORMATTED, }; prv_flash_write_bytes(&flash_hdr, CORE_DUMP_FLASH_START, sizeof(flash_hdr)); } @@ -254,7 +251,7 @@ static uint32_t prv_flash_start_address(bool new) { uint32_t max_last_used = 0; int last_used_idx = -1; - for (i=0; iname, CORE_DUMP_THREAD_NAME_SIZE); + strncpy((char *)packed_info.name, task_info->name, CORE_DUMP_THREAD_NAME_SIZE); packed_info.id = (uint32_t)task_info->id; packed_info.running = task_info->current; for (int i = 0; i < PBL_THREAD_REG_COUNT; i++) { @@ -389,18 +386,15 @@ static void prv_thread_info_cb(const struct pbl_thread_info *task_info, void *da packed_info.registers[i] = s_saved_registers.core_reg[i]; } // Set sp to the saved psp so that GDB can unwind the task's stack. - packed_info.registers[PBL_THREAD_REG_SP] = - s_saved_registers.extra_reg.psp; + packed_info.registers[PBL_THREAD_REG_SP] = s_saved_registers.extra_reg.psp; } } // Write out this thread info chunk_hdr.key = CORE_DUMP_CHUNK_KEY_THREAD; chunk_hdr.size = sizeof(packed_info); - s_flash_addr += prv_flash_write_bytes(&chunk_hdr, s_flash_addr, - sizeof(chunk_hdr)); - s_flash_addr += prv_flash_write_bytes(&packed_info, s_flash_addr, - chunk_hdr.size); + s_flash_addr += prv_flash_write_bytes(&chunk_hdr, s_flash_addr, sizeof(chunk_hdr)); + s_flash_addr += prv_flash_write_bytes(&packed_info, s_flash_addr, chunk_hdr.size); } static void prv_write_memory_regions(const MemoryRegion *regions, unsigned int count, @@ -411,32 +405,26 @@ static void prv_write_memory_regions(const MemoryRegion *regions, unsigned int c for (unsigned int i = 0; i < count; i++) { chunk_hdr.size = regions[i].length + sizeof(CoreDumpMemoryHeader); CD_ASSERTN(s_flash_addr + chunk_hdr.size - flash_base < CORE_DUMP_MAX_SIZE); - s_flash_addr += prv_flash_write_bytes(&chunk_hdr, s_flash_addr, - sizeof(chunk_hdr)); + s_flash_addr += prv_flash_write_bytes(&chunk_hdr, s_flash_addr, sizeof(chunk_hdr)); CoreDumpMemoryHeader mem_hdr; mem_hdr.start = (uint32_t)regions[i].start; - s_flash_addr += prv_flash_write_bytes(&mem_hdr, s_flash_addr, - sizeof(mem_hdr)); + s_flash_addr += prv_flash_write_bytes(&mem_hdr, s_flash_addr, sizeof(mem_hdr)); if (regions[i].word_reads_only) { // Copy the memory into a temporary buffer before writing it to flash so // that we can be sure that the memory is only being accessed by word. uint32_t temp; - for (uint32_t offset = 0; - offset < regions[i].length; - offset += sizeof(temp)) { - temp = *(volatile uint32_t*)((char *)regions[i].start + offset); - s_flash_addr += prv_flash_write_bytes(&temp, s_flash_addr, - sizeof(temp)); + for (uint32_t offset = 0; offset < regions[i].length; offset += sizeof(temp)) { + temp = *(volatile uint32_t *)((char *)regions[i].start + offset); + s_flash_addr += prv_flash_write_bytes(&temp, s_flash_addr, sizeof(temp)); watchdog_feed(); } } else { uint32_t bytes_remaining = regions[i].length; for (uint32_t offset = 0; offset < regions[i].length; offset += SECTOR_SIZE_BYTES) { uint32_t bytes_to_write = MIN(bytes_remaining, SECTOR_SIZE_BYTES); - s_flash_addr += prv_flash_write_bytes( - (void *) ((uint32_t)regions[i].start + offset), - s_flash_addr, bytes_to_write); + s_flash_addr += prv_flash_write_bytes((void *)((uint32_t)regions[i].start + offset), + s_flash_addr, bytes_to_write); bytes_remaining -= bytes_to_write; watchdog_feed(); } @@ -461,15 +449,15 @@ static void prv_dump_lcpu_ram(uint32_t flash_base) { static uint32_t prv_write_image_header(uint32_t flash_addr, uint8_t core_number, const ElfExternalNote *build_id, uint32_t timestamp) { CoreDumpImageHeader hdr = { - .magic = CORE_DUMP_MAGIC, - .core_number = core_number, - .version = CORE_DUMP_VERSION, - .time_stamp = timestamp, + .magic = CORE_DUMP_MAGIC, + .core_number = core_number, + .version = CORE_DUMP_VERSION, + .time_stamp = timestamp, }; strncpy((char *)hdr.serial_number, mfg_get_serial_number(), sizeof(hdr.serial_number)); - hdr.serial_number[sizeof(hdr.serial_number)-1] = 0; + hdr.serial_number[sizeof(hdr.serial_number) - 1] = 0; version_copy_build_id_hex_string((char *)hdr.build_id, sizeof(hdr.build_id), build_id); - hdr.build_id[sizeof(hdr.build_id)-1] = 0; + hdr.build_id[sizeof(hdr.build_id) - 1] = 0; return prv_flash_write_bytes(&hdr, flash_addr, sizeof(hdr)); } @@ -490,7 +478,7 @@ NORETURN core_dump_reset(bool is_forced) { s_core_dump_is_forced = is_forced; if (is_forced) { - RebootReason reason = { RebootReasonCode_ForcedCoreDump, 0}; + RebootReason reason = {RebootReasonCode_ForcedCoreDump, 0}; reboot_reason_set(&reason); } @@ -499,7 +487,7 @@ NORETURN core_dump_reset(bool is_forced) { __DSB(); __ISB(); // Shouldn't get here - RebootReason reason = { RebootReasonCode_CoreDumpEntryFailed, 0 }; + RebootReason reason = {RebootReasonCode_CoreDumpEntryFailed, 0}; reboot_reason_set(&reason); prv_reset(); } @@ -510,31 +498,29 @@ void __attribute__((naked)) NMI_Handler(void) { // // Save the processor state which is not automatically stacked during // exception entry before any C code can clobber it. - __asm volatile ( - " ldr r0, =%[s_saved_registers]\n" - " stmia r0!, {r4-r11} \n" - " str sp, [r0, #4]! \n" // sp, skipping r12 - " str lr, [r0, #4]! \n" // lr - " mrs r1, xpsr \n" - " mrs r2, msp \n" - " mrs r3, psp \n" - " adds r0, #8 \n" // skip pc - " stmia r0!, {r1-r3} \n" // xpsr, msp, psp - " b core_dump_handler_c \n" - : - : [s_saved_registers] "i" - (&s_saved_registers.core_reg[PBL_THREAD_REG_R4]) - : "r0", "r1", "r2", "r3", "cc" - ); + __asm volatile( + " ldr r0, =%[s_saved_registers]\n" + " stmia r0!, {r4-r11} \n" + " str sp, [r0, #4]! \n" // sp, skipping r12 + " str lr, [r0, #4]! \n" // lr + " mrs r1, xpsr \n" + " mrs r2, msp \n" + " mrs r3, psp \n" + " adds r0, #8 \n" // skip pc + " stmia r0!, {r1-r3} \n" // xpsr, msp, psp + " b core_dump_handler_c \n" + : + : [s_saved_registers] "i"(&s_saved_registers.core_reg[PBL_THREAD_REG_R4]) + : "r0", "r1", "r2", "r3", "cc"); } EXTERNALLY_VISIBLE void core_dump_handler_c(void) { // Locate the stack pointer where the processor state was stacked before the // NMI handler was executed so that the saved state can be copied into // s_saved_registers. - uint32_t *process_sp = (uint32_t *)( - RETURNS_TO_PSP(s_saved_registers.core_reg[PBL_THREAD_REG_LR])? - s_saved_registers.extra_reg.psp : s_saved_registers.extra_reg.msp); + uint32_t *process_sp = (uint32_t *)(RETURNS_TO_PSP(s_saved_registers.core_reg[PBL_THREAD_REG_LR]) + ? s_saved_registers.extra_reg.psp + : s_saved_registers.extra_reg.msp); s_saved_registers.core_reg[PBL_THREAD_REG_R0] = process_sp[0]; s_saved_registers.core_reg[PBL_THREAD_REG_R1] = process_sp[1]; s_saved_registers.core_reg[PBL_THREAD_REG_R2] = process_sp[2]; @@ -563,7 +549,7 @@ EXTERNALLY_VISIBLE void core_dump_handler_c(void) { RebootReason reason; reboot_reason_get(&reason); if (reason.code == RebootReasonCode_Unknown) { - reason = (RebootReason) { RebootReasonCode_CoreDump, 0 }; + reason = (RebootReason){RebootReasonCode_CoreDump, 0}; reboot_reason_set(&reason); } @@ -581,8 +567,8 @@ EXTERNALLY_VISIBLE void core_dump_handler_c(void) { s_use_cd_flash_driver = true; cd_flash_init(); - // If there is a fairly recent unread core image already present, don't replace it. Once it is read through - // the get_bytes_protocol_msg_callback(), the unread flag gets cleared out. + // If there is a fairly recent unread core image already present, don't replace it. Once it is + // read through the get_bytes_protocol_msg_callback(), the unread flag gets cleared out. uint32_t flash_base; flash_base = prv_flash_start_address(false /*new*/); if (!s_core_dump_is_forced && flash_base != CORE_DUMP_FLASH_INVALID_ADDR) { @@ -592,14 +578,14 @@ EXTERNALLY_VISIBLE void core_dump_handler_c(void) { prv_flash_read_bytes(®ion_hdr, flash_base, sizeof(region_hdr)); prv_flash_read_bytes(&image_hdr, flash_base + sizeof(region_hdr), sizeof(image_hdr)); - if ((image_hdr.magic == CORE_DUMP_MAGIC) && region_hdr.unread - && ((s_time_stamp - image_hdr.time_stamp) < CORE_DUMP_MIN_AGE_SECONDS)) { + if ((image_hdr.magic == CORE_DUMP_MAGIC) && region_hdr.unread && + ((s_time_stamp - image_hdr.time_stamp) < CORE_DUMP_MIN_AGE_SECONDS)) { prv_debug_str("CD: Still fresh"); - #ifndef CONFIG_IS_BIGBOARD +#ifndef CONFIG_IS_BIGBOARD prv_reset(); - #else +#else prv_debug_str("CD: BigBoard, forcing dump"); - #endif +#endif } } @@ -610,12 +596,13 @@ EXTERNALLY_VISIBLE void core_dump_handler_c(void) { // --------------------------------------------------------------------------------------- // Dump RAM and thread info into flash. We store data in flash using the following format: // - // CoreDumpImageHeader image_header // includes magic signature, version, time stamp, serial number + // CoreDumpImageHeader image_header // includes magic signature, version, time stamp, + // serial number // // and build id. // - // uint32_t chunk_key // CORE_DUMP_CHUNK_KEY_MEMORY, CORE_DUMP_CHUNK_KEY_THREAD, etc. - // uint32_t chunk_size // # of bytes of data that follow - // uint8_t chunk[chunk_size] // data for the above chunk + // uint32_t chunk_key // CORE_DUMP_CHUNK_KEY_MEMORY, + // CORE_DUMP_CHUNK_KEY_THREAD, etc. uint32_t chunk_size // # of bytes of data + // that follow uint8_t chunk[chunk_size] // data for the above chunk // // uint32_t chunk_key // uint32_t chunk_size @@ -636,37 +623,34 @@ EXTERNALLY_VISIBLE void core_dump_handler_c(void) { s_flash_addr = flash_base + sizeof(CoreDumpFlashRegionHeader); // Write out the core dump header ----------------------------------- - s_flash_addr += prv_write_image_header(s_flash_addr, CORE_ID_MAIN_MCU, &TINTIN_BUILD_ID, - s_time_stamp); + s_flash_addr += + prv_write_image_header(s_flash_addr, CORE_ID_MAIN_MCU, &TINTIN_BUILD_ID, s_time_stamp); // Write out the memory chunks ---------------------------------------- - prv_write_memory_regions(MEMORY_REGIONS_DUMP, ARRAY_LENGTH(MEMORY_REGIONS_DUMP), - flash_base); + prv_write_memory_regions(MEMORY_REGIONS_DUMP, ARRAY_LENGTH(MEMORY_REGIONS_DUMP), flash_base); // Write out the extra registers chunk -------------------------------------------- CoreDumpChunkHeader chunk_hdr; chunk_hdr.key = CORE_DUMP_CHUNK_KEY_EXTRA_REG; chunk_hdr.size = sizeof(CoreDumpExtraRegInfo); CD_ASSERTN(s_flash_addr + chunk_hdr.size - flash_base < CORE_DUMP_MAX_SIZE); - s_flash_addr += prv_flash_write_bytes(&chunk_hdr, s_flash_addr, - sizeof(chunk_hdr)); - s_flash_addr += prv_flash_write_bytes(&s_saved_registers.extra_reg, - s_flash_addr, chunk_hdr.size); + s_flash_addr += prv_flash_write_bytes(&chunk_hdr, s_flash_addr, sizeof(chunk_hdr)); + s_flash_addr += prv_flash_write_bytes(&s_saved_registers.extra_reg, s_flash_addr, chunk_hdr.size); // Write out each of the thread chunks ---------------------------------- - // Note that we leave the threads for last just in case we encounter corrupted FreeRTOS structures. - // In that case, the core dump will at least contain the RAM and registers info and perhaps some of the - // threads. The format of the binary core dump is streamable and is read until we reach a chunk key - // of 0xFFFFFFFF (what gets placed into flash after an erase). + // Note that we leave the threads for last just in case we encounter corrupted FreeRTOS + // structures. In that case, the core dump will at least contain the RAM and registers info and + // perhaps some of the threads. The format of the binary core dump is streamable and is read until + // we reach a chunk key of 0xFFFFFFFF (what gets placed into flash after an erase). pbl_thread_foreach(prv_thread_info_cb, NULL); // If we core dumped from an ISR, we make up a special "ISR" thread to hold the registers if (!RETURNS_TO_PSP(s_saved_registers.core_reg[PBL_THREAD_REG_LR])) { // Another exception invoked the core dump handler struct pbl_thread_info task_info = { - .name = "ISR", - .id = 1, - .current = false, + .name = "ISR", + .id = 1, + .current = false, }; for (int i = 0; i < PBL_THREAD_REG_COUNT; i++) { // registers [r0-r12, sp, lr, pc, sr] @@ -683,8 +667,7 @@ EXTERNALLY_VISIBLE void core_dump_handler_c(void) { // Write out chunk terminator chunk_hdr.key = CORE_DUMP_CHUNK_KEY_TERMINATOR; chunk_hdr.size = 0; - s_flash_addr += prv_flash_write_bytes(&chunk_hdr, s_flash_addr, - sizeof(chunk_hdr)); + s_flash_addr += prv_flash_write_bytes(&chunk_hdr, s_flash_addr, sizeof(chunk_hdr)); // Reset! uint32_t total_size = s_flash_addr - flash_base; @@ -705,10 +688,10 @@ status_t core_dump_size(uint32_t flash_base, uint32_t *size) { if (chunk_hdr.key == CORE_DUMP_CHUNK_KEY_TERMINATOR) { current_offset += sizeof(chunk_hdr); break; - } else if (chunk_hdr.key == CORE_DUMP_CHUNK_KEY_RAM - || chunk_hdr.key == CORE_DUMP_CHUNK_KEY_THREAD - || chunk_hdr.key == CORE_DUMP_CHUNK_KEY_EXTRA_REG - || chunk_hdr.key == CORE_DUMP_CHUNK_KEY_MEMORY) { + } else if (chunk_hdr.key == CORE_DUMP_CHUNK_KEY_RAM || + chunk_hdr.key == CORE_DUMP_CHUNK_KEY_THREAD || + chunk_hdr.key == CORE_DUMP_CHUNK_KEY_EXTRA_REG || + chunk_hdr.key == CORE_DUMP_CHUNK_KEY_MEMORY) { current_offset += sizeof(chunk_hdr) + chunk_hdr.size; } else { return E_INTERNAL; @@ -732,12 +715,11 @@ void core_dump_mark_read(uint32_t flash_base) { } bool core_dump_is_unread_available(uint32_t flash_base) { - if (flash_base != CORE_DUMP_FLASH_INVALID_ADDR) { // a coredump is on flash + if (flash_base != CORE_DUMP_FLASH_INVALID_ADDR) { // a coredump is on flash CoreDumpFlashRegionHeader region_hdr; CoreDumpImageHeader image_hdr; flash_read_bytes((uint8_t *)®ion_hdr, flash_base, sizeof(region_hdr)); - flash_read_bytes((uint8_t *)&image_hdr, flash_base + sizeof(region_hdr), - sizeof(image_hdr)); + flash_read_bytes((uint8_t *)&image_hdr, flash_base + sizeof(region_hdr), sizeof(image_hdr)); return ((image_hdr.magic == CORE_DUMP_MAGIC) && (region_hdr.unread != 0)); } @@ -775,7 +757,8 @@ bool core_dump_reserve_ble_slot(uint32_t *flash_base, uint32_t *max_size, } // -------------------------------------------------------------------------------------------------- -// Used by unit tests in to cause fw/apps/demo/test_core_dump_app to encounter a bus fault during the core dump +// Used by unit tests in to cause fw/apps/demo/test_core_dump_app to encounter a bus fault during +// the core dump void core_dump_test_force_bus_fault(void) { s_test_force_bus_fault = true; } diff --git a/src/fw/kernel/core_dump.h b/src/fw/kernel/core_dump.h index e117e68ad0..5f5ce8974c 100644 --- a/src/fw/kernel/core_dump.h +++ b/src/fw/kernel/core_dump.h @@ -19,7 +19,6 @@ void core_dump_test_force_bus_fault(void); void core_dump_test_force_inf_loop(void); void core_dump_test_force_assert(void); - // Warning: these functions use the normal flash driver status_t core_dump_size(uint32_t flash_base, uint32_t *size); void core_dump_mark_read(uint32_t flash_base); diff --git a/src/fw/kernel/core_dump_private.h b/src/fw/kernel/core_dump_private.h index 8a2e744e5b..a0d50f1819 100644 --- a/src/fw/kernel/core_dump_private.h +++ b/src/fw/kernel/core_dump_private.h @@ -29,9 +29,9 @@ #endif // Max number of core dump images we can fit in our allocated space -#define CORE_DUMP_FLASH_START FLASH_REGION_CD_BEGIN -#define CORE_DUMP_FLASH_END FLASH_REGION_CD_END -#define CORE_DUMP_FLASH_SIZE (CORE_DUMP_FLASH_END - CORE_DUMP_FLASH_START) +#define CORE_DUMP_FLASH_START FLASH_REGION_CD_BEGIN +#define CORE_DUMP_FLASH_END FLASH_REGION_CD_END +#define CORE_DUMP_FLASH_SIZE (CORE_DUMP_FLASH_END - CORE_DUMP_FLASH_START) #if defined(CONFIG_SOC_NRF52) #define CORE_DUMP_MAX_IMAGES 2 #elif defined(CONFIG_SOC_SF32LB52) @@ -44,80 +44,81 @@ // Max size of a core dump image. The first image is found at CORE_DUMP_FLASH_START + // SUBSECTOR_SIZE_BYTES. -#define CORE_DUMP_MAX_SIZE (((CORE_DUMP_FLASH_SIZE - SUBSECTOR_SIZE_BYTES) \ - / CORE_DUMP_MAX_IMAGES) & SUBSECTOR_ADDR_MASK) +#define CORE_DUMP_MAX_SIZE \ + (((CORE_DUMP_FLASH_SIZE - SUBSECTOR_SIZE_BYTES) / CORE_DUMP_MAX_IMAGES) & SUBSECTOR_ADDR_MASK) // Returned from prv_flash_start_address() if no valid region found #define CORE_DUMP_FLASH_INVALID_ADDR 0xFFFFFFFF -// We don't overwrite an unread core-dump if it's less than CORE_DUMP_MIN_AGE seconds old and hasn't been +// We don't overwrite an unread core-dump if it's less than CORE_DUMP_MIN_AGE seconds old and hasn't +// been // fetched from the watch yet. -#define CORE_DUMP_MIN_AGE_SECONDS (60 * 60 * 24 * 1) // 1 day +#define CORE_DUMP_MIN_AGE_SECONDS (60 * 60 * 24 * 1) // 1 day // -------------------------------------------------------------------------------------------- -// Core dump flash storage structures. The first thing at CORE_DUMP_FLASH_START is a CoreDumpFlashHeader. -// SUBSECTOR_SIZE_BYTES after that is the CoreDumpFlashRegionHeader for the first region. -// Every CORE_DUMP_MAX_SIZE after the first region header is another CoreDumpFlashRegionHeader, up to a -// max of CORE_DUMP_MAX_IMAGES. -// Each of the bits in the 'unformatted' field start out at 1, they get cleared as we use up to -// CORE_DUMP_MAX_IMAGES regions. When all CORE_DUMP_MAX_IMAGES have been used at least once, we rotate and -// set the active one to have the highest last_used value. +// Core dump flash storage structures. The first thing at CORE_DUMP_FLASH_START is a +// CoreDumpFlashHeader. SUBSECTOR_SIZE_BYTES after that is the CoreDumpFlashRegionHeader for the +// first region. Every CORE_DUMP_MAX_SIZE after the first region header is another +// CoreDumpFlashRegionHeader, up to a max of CORE_DUMP_MAX_IMAGES. Each of the bits in the +// 'unformatted' field start out at 1, they get cleared as we use up to CORE_DUMP_MAX_IMAGES +// regions. When all CORE_DUMP_MAX_IMAGES have been used at least once, we rotate and set the active +// one to have the highest last_used value. // This comes first in flash, at CORE_DUMP_FLASH_START. It is NOT returned as part of the core dump // binary image -#define CORE_DUMP_FLASH_HDR_MAGIC 0x464C5300 -#define CORE_DUMP_ALL_UNFORMATTED ((uint32_t)(~0)) +#define CORE_DUMP_FLASH_HDR_MAGIC 0x464C5300 +#define CORE_DUMP_ALL_UNFORMATTED ((uint32_t)(~0)) typedef struct { - uint32_t magic; // Set to CORE_DUMP_FLASH_HDR_MAGIC - uint32_t unformatted; // set of 1 bit flags, bit n set means region n is still unformatted + uint32_t magic; // Set to CORE_DUMP_FLASH_HDR_MAGIC + uint32_t unformatted; // set of 1 bit flags, bit n set means region n is still unformatted } CoreDumpFlashHeader; -// This comes first in the front of each possible flash region. It is NOT returned as part of the core dump -// image. +// This comes first in the front of each possible flash region. It is NOT returned as part of the +// core dump image. typedef struct { - uint32_t magic; // set to CORE_DUMP_FLASH_HDR_MAGIC - uint32_t last_used; // The region with the highest last_used count was the most recently used. + uint32_t magic; // set to CORE_DUMP_FLASH_HDR_MAGIC + uint32_t last_used; // The region with the highest last_used count was the most recently used. // This value is always >= 1 - uint8_t unread; // non-zero if this core dump has not been read out yet + uint8_t unread; // non-zero if this core dump has not been read out yet } CoreDumpFlashRegionHeader; // The first item in a core dump image is a CoreDumpImageHeader. That is followed by one or more // CoreDumpChunkHeader's, terminated by one with a key of CORE_DUMP_CHUNK_KEY_TERMINATOR -#define CORE_DUMP_MAGIC 0xF00DCAFE -#define CORE_DUMP_VERSION 1 // Current version +#define CORE_DUMP_MAGIC 0xF00DCAFE +#define CORE_DUMP_VERSION 1 // Current version typedef struct PACKED { - uint32_t magic; // Set to CORE_DUMP_MAGIC + uint32_t magic; // Set to CORE_DUMP_MAGIC - uint32_t core_number:8; // See include/pebbleos/core_id.h - uint32_t version:24; // Set to CORE_DUMP_VERSION + uint32_t core_number : 8; // See include/pebbleos/core_id.h + uint32_t version : 24; // Set to CORE_DUMP_VERSION - uint32_t time_stamp; // rtc_get_time() when core dump was created - uint8_t serial_number[16]; // null terminated watch serial number string - uint8_t build_id[64]; // null terminated build ID of firmware string + uint32_t time_stamp; // rtc_get_time() when core dump was created + uint8_t serial_number[16]; // null terminated watch serial number string + uint8_t build_id[64]; // null terminated build ID of firmware string } CoreDumpImageHeader; // Chunk header for each chunk within the core dump -#define CORE_DUMP_CHUNK_KEY_TERMINATOR 0xFFFFFFFF -#define CORE_DUMP_CHUNK_KEY_RAM 1 // Deprecated -#define CORE_DUMP_CHUNK_KEY_THREAD 2 -#define CORE_DUMP_CHUNK_KEY_EXTRA_REG 3 -#define CORE_DUMP_CHUNK_KEY_MEMORY 4 +#define CORE_DUMP_CHUNK_KEY_TERMINATOR 0xFFFFFFFF +#define CORE_DUMP_CHUNK_KEY_RAM 1 // Deprecated +#define CORE_DUMP_CHUNK_KEY_THREAD 2 +#define CORE_DUMP_CHUNK_KEY_EXTRA_REG 3 +#define CORE_DUMP_CHUNK_KEY_MEMORY 4 typedef struct PACKED { - uint32_t key; // CORE_DUMP_CHUNK_KEY_.* - uint32_t size; + uint32_t key; // CORE_DUMP_CHUNK_KEY_.* + uint32_t size; // uint8_t data[size]; } CoreDumpChunkHeader; // Header for dumped segments of memory, whether from RAM or peripheral space. typedef struct PACKED { - uint32_t start; // start address of the chunk of dumped memory + uint32_t start; // start address of the chunk of dumped memory // uint8_t data[size - sizeof(CoreDumpMemoryHeader)]; } CoreDumpMemoryHeader; void coredump_assert(int line); -#define CD_ASSERTN(expr) \ - do { \ - if (!(expr)) { \ +#define CD_ASSERTN(expr) \ + do { \ + if (!(expr)) { \ coredump_assert(__LINE__); \ - } \ + } \ } while (0) diff --git a/src/fw/kernel/event_loop.c b/src/fw/kernel/event_loop.c index b9ef4836ba..f0e33dae41 100644 --- a/src/fw/kernel/event_loop.c +++ b/src/fw/kernel/event_loop.c @@ -78,11 +78,11 @@ static int s_back_quickpress_count = 0; void launcher_task_add_callback(void (*callback)(void *data), void *data) { PebbleEvent event = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = callback, - .data = data, - }, + .type = PEBBLE_CALLBACK_EVENT, + .callback = { + .callback = callback, + .data = data, + }, }; event_put(&event); } @@ -93,7 +93,7 @@ bool launcher_task_is_current_task(void) { //! Return true if event could cause pop-up //! Used in getting started and during firmware update -static bool launcher_is_popup_event(PebbleEvent* e) { +static bool launcher_is_popup_event(PebbleEvent *e) { switch (e->type) { case PEBBLE_SYS_NOTIFICATION_EVENT: case PEBBLE_ALARM_CLOCK_EVENT: @@ -136,7 +136,9 @@ static void launcher_force_quit_app(void *data) { if (s_force_quit_was_cancelled) { // If you see this in logs after FIRM-556 (general system sluggishness) // is fixed, please file a bug! - PBL_LOG_ERR("NewTimer event fired for force quit, but the back button was released before we went to deal with it! Wow, we must have been really slow! Please file a bug!"); + PBL_LOG_ERR( + "NewTimer event fired for force quit, but the back button was released before we went to " + "deal with it! Wow, we must have been really slow! Please file a bug!"); return; } @@ -156,7 +158,7 @@ static void back_button_force_quit_handler(void *data) { launcher_task_add_callback(launcher_force_quit_app, NULL); } -static void launcher_handle_button_event(PebbleEvent* e) { +static void launcher_handle_button_event(PebbleEvent *e) { ButtonId button_id = e->button.button_id; const bool watchface_running = app_manager_is_watchface_running(); @@ -165,15 +167,15 @@ static void launcher_handle_button_event(PebbleEvent* e) { PBL_ANALYTICS_ADD(button_pressed_count, 1); if (button_id == BUTTON_ID_BACK && !watchface_running && - process_metadata_get_run_level( - app_manager_get_current_app_md()) == ProcessAppRunLevelNormal) { + process_metadata_get_run_level(app_manager_get_current_app_md()) == + ProcessAppRunLevelNormal) { // Start timer for force-quitting app s_force_quit_was_cancelled = false; - bool success = new_timer_start(s_back_hold_timer, FORCE_QUIT_HOLD_MS, back_button_force_quit_handler, NULL, - 0 /*flags*/); + bool success = new_timer_start(s_back_hold_timer, FORCE_QUIT_HOLD_MS, + back_button_force_quit_handler, NULL, 0 /*flags*/); PBL_ASSERTN(success); } - + #ifndef CONFIG_SHELL_SDK // 10 quick-presses of the back button triggers a manual coredump, if // that feature is enabled in system settings. @@ -184,11 +186,12 @@ static void launcher_handle_button_event(PebbleEvent* e) { } s_back_quickpress_last = now; s_back_quickpress_count++; - if (s_back_quickpress_count >= BACK_QUICKPRESS_COREDUMP_PRESSES && shell_prefs_can_coredump_on_request()) { + if (s_back_quickpress_count >= BACK_QUICKPRESS_COREDUMP_PRESSES && + shell_prefs_can_coredump_on_request()) { core_dump_reset(true /* is_forced */); } } -#endif // !defined(CONFIG_SHELL_SDK) +#endif // !defined(CONFIG_SHELL_SDK) #ifdef CONFIG_TOUCH // Deliberate interaction: open the touch session so touch may navigate. @@ -210,8 +213,8 @@ static void launcher_handle_button_event(PebbleEvent* e) { return; } - const bool is_modal_focused = (modal_manager_get_enabled() && - !(modal_manager_get_properties() & ModalProperty_Unfocused)); + const bool is_modal_focused = + (modal_manager_get_enabled() && !(modal_manager_get_properties() & ModalProperty_Unfocused)); if (is_modal_focused) { // mask the app task if a modal is on top e->task_mask |= 1 << PebbleTask_App; @@ -228,7 +231,7 @@ static void launcher_handle_button_event(PebbleEvent* e) { // This function should handle very basic events (Button clicks, app launching, battery events, // crashes, etc. -static NOINLINE void prv_minimal_event_handler(PebbleEvent* e) { +static NOINLINE void prv_minimal_event_handler(PebbleEvent *e) { switch (e->type) { case PEBBLE_BUTTON_DOWN_EVENT: case PEBBLE_BUTTON_UP_EVENT: @@ -241,7 +244,7 @@ static NOINLINE void prv_minimal_event_handler(PebbleEvent* e) { if (is_connected) { light_enable_interaction(); } else { - } + } #if STATIONARY_MODE stationary_handle_battery_connection_change_event(); #endif @@ -262,8 +265,8 @@ static NOINLINE void prv_minimal_event_handler(PebbleEvent* e) { case PEBBLE_ACCEL_SHAKE_EVENT: if (backlight_is_motion_enabled()) { #ifndef CONFIG_RECOVERY_FW - const bool dnd_suppresses_backlight = do_not_disturb_is_active() && - !alerts_preferences_dnd_get_motion_backlight(); + const bool dnd_suppresses_backlight = + do_not_disturb_is_active() && !alerts_preferences_dnd_get_motion_backlight(); if (!dnd_suppresses_backlight) #endif { @@ -279,9 +282,8 @@ static NOINLINE void prv_minimal_event_handler(PebbleEvent* e) { // stays fully inert. Release on liftoff ungated so the refcount can't // leak if the session expired or touch was disabled mid-touch. TouchWakeGateResult gate = {0}; - const bool is_modal_focused = - (modal_manager_get_enabled() && - !(modal_manager_get_properties() & ModalProperty_Unfocused)); + const bool is_modal_focused = (modal_manager_get_enabled() && + !(modal_manager_get_properties() & ModalProperty_Unfocused)); if (e->touch.event.type == TouchEvent_Touchdown) { const bool armed = touch_session_is_active(); // Light follows touch only where something consumes the touch: the @@ -290,8 +292,7 @@ static NOINLINE void prv_minimal_event_handler(PebbleEvent* e) { // (so touch keeps the woken screen lit). A third-party app that never // subscribed to touch gets no touchdown light. const bool backlight_driven = - (touch_nav_enabled() && - (is_modal_focused || app_manager_is_watchface_running())) || + (touch_nav_enabled() && (is_modal_focused || app_manager_is_watchface_running())) || touch_app_nav_active() || touch_has_app_subscribers(); bool dnd_suppresses_backlight = false; #ifndef CONFIG_RECOVERY_FW @@ -355,8 +356,8 @@ static NOINLINE void prv_minimal_event_handler(PebbleEvent* e) { touch_session_arm(TouchSessionArmSource_WakeGesture); #endif #ifndef CONFIG_RECOVERY_FW - const bool dnd_suppresses_backlight = do_not_disturb_is_active() && - !alerts_preferences_dnd_get_touch_backlight(); + const bool dnd_suppresses_backlight = + do_not_disturb_is_active() && !alerts_preferences_dnd_get_touch_backlight(); if (!dnd_suppresses_backlight) #endif { @@ -373,19 +374,19 @@ static NOINLINE void prv_minimal_event_handler(PebbleEvent* e) { case PEBBLE_APP_LAUNCH_EVENT: if (!app_install_is_app_running(e->launch_app.id)) { const LaunchConfigCommon common = - NULL_SAFE_FIELD_ACCESS(e->launch_app.data, common, (LaunchConfigCommon) {}); - process_manager_launch_process(&(ProcessLaunchConfig) { - .id = e->launch_app.id, - .common = common, + NULL_SAFE_FIELD_ACCESS(e->launch_app.data, common, (LaunchConfigCommon){}); + process_manager_launch_process(&(ProcessLaunchConfig){ + .id = e->launch_app.id, + .common = common, #ifdef CONFIG_SHELL_SDK - // Dev iteration: when the phone sends AppRunStateStart (typically - // `pebble install` over pypkjs), force-kill the current app instead - // of waiting up to 3s for graceful deinit. Misbehaving third-party - // watchfaces that don't promptly dequeue DEINIT (e.g. blocked inside - // a PEBBLE_SET_TIME_EVENT handler triggered by pypkjs's SetUTC right - // before install) otherwise stall the install until the dev manually - // toggles to the launcher. Real-user normal shell keeps graceful. - .forcefully = (common.reason == APP_LAUNCH_PHONE), + // Dev iteration: when the phone sends AppRunStateStart (typically + // `pebble install` over pypkjs), force-kill the current app instead + // of waiting up to 3s for graceful deinit. Misbehaving third-party + // watchfaces that don't promptly dequeue DEINIT (e.g. blocked inside + // a PEBBLE_SET_TIME_EVENT handler triggered by pypkjs's SetUTC right + // before install) otherwise stall the install until the dev manually + // toggles to the launcher. Real-user normal shell keeps graceful. + .forcefully = (common.reason == APP_LAUNCH_PHONE), #endif }); } @@ -393,10 +394,10 @@ static NOINLINE void prv_minimal_event_handler(PebbleEvent* e) { case PEBBLE_WORKER_LAUNCH_EVENT: if (!app_install_is_worker_running(e->launch_app.id)) { - process_manager_launch_process(&(ProcessLaunchConfig) { - .id = e->launch_app.id, - .common = NULL_SAFE_FIELD_ACCESS(e->launch_app.data, common, (LaunchConfigCommon) {}), - .worker = true, + process_manager_launch_process(&(ProcessLaunchConfig){ + .id = e->launch_app.id, + .common = NULL_SAFE_FIELD_ACCESS(e->launch_app.data, common, (LaunchConfigCommon){}), + .worker = true, }); } return; @@ -427,7 +428,7 @@ static NOINLINE void prv_handle_app_fetch_request_event(PebbleEvent *e) { app_fetch_binaries(&entry.uuid, e->app_fetch_request.id, has_worker); } -static NOINLINE void prv_extended_event_handler(PebbleEvent* e) { +static NOINLINE void prv_extended_event_handler(PebbleEvent *e) { switch (e->type) { case PEBBLE_APP_OUTBOX_MSG_EVENT: e->app_outbox_msg.callback(e->app_outbox_msg.data); @@ -455,8 +456,7 @@ static NOINLINE void prv_extended_event_handler(PebbleEvent* e) { #endif return; - case PEBBLE_SET_TIME_EVENT: - { + case PEBBLE_SET_TIME_EVENT: { #ifndef CONFIG_RECOVERY_FW PebbleSetTimeEvent *set_time_info = &e->set_time_info; @@ -465,8 +465,7 @@ static NOINLINE void prv_extended_event_handler(PebbleEvent* e) { // time to propagate to the watch). Thus only update our alarm time if // the timezone has changed or a 'substantial' time has passed, or DST // state has changed. - if (set_time_info->gmt_offset_delta != 0 || - set_time_info->dst_changed || + if (set_time_info->gmt_offset_delta != 0 || set_time_info->dst_changed || ABS(set_time_info->utc_time_delta) > 15) { alarm_handle_clock_change(); wakeup_handle_significant_clock_change(); @@ -569,8 +568,8 @@ static NOINLINE void prv_launcher_main_loop_init(void) { task_watchdog_bit_set(PebbleTask_KernelMain); // if we are in launcher panic, don't turn on any extra services. - const RunLevel run_level = launcher_panic_get_current_error() ? RunLevel_BareMinimum - : RunLevel_Normal; + const RunLevel run_level = + launcher_panic_get_current_error() ? RunLevel_BareMinimum : RunLevel_Normal; services_set_runlevel(run_level); // emulate a button press-and-release to turn on/off the backlight @@ -592,9 +591,9 @@ static NOINLINE void prv_launcher_main_loop_init(void) { } else if (boot_bit_test(BOOT_BIT_FW_START_FAIL_STRIKE_TWO)) { PBL_LOG_WRN("Not launching worker because of 2 strikes"); } else { - process_manager_launch_process(&(ProcessLaunchConfig) { - .id = worker_manager_get_default_install_id(), - .worker = true, + process_manager_launch_process(&(ProcessLaunchConfig){ + .id = worker_manager_get_default_install_id(), + .worker = true, }); } #endif diff --git a/src/fw/kernel/events.c b/src/fw/kernel/events.c index 02bd07e21b..e0897358d6 100644 --- a/src/fw/kernel/events.c +++ b/src/fw/kernel/events.c @@ -26,16 +26,19 @@ static PBL_MSGQ_DEFINE(s_kernel_event_queue, sizeof(PebbleEvent), MAX_KERNEL_EVE static PBL_MSGQ_DEFINE(s_from_app_event_queue, sizeof(PebbleEvent), MAX_FROM_APP_EVENTS); static PBL_MSGQ_DEFINE(s_from_worker_event_queue, sizeof(PebbleEvent), MAX_FROM_WORKER_EVENTS); -// The following conventions insure that the s_from_kernel_event_queue queue will always have sufficient space and that -// KernelMain will never deadlock trying to send an event to itself: -// 1.) KernelMain must never enqueue more than MAX_FROM_KERNEL_MAIN_EVENTS events to itself while processing another +// The following conventions insure that the s_from_kernel_event_queue queue will always have +// sufficient space and that KernelMain will never deadlock trying to send an event to itself: 1.) +// KernelMain must never enqueue more than MAX_FROM_KERNEL_MAIN_EVENTS events to itself while +// processing another // event. // 2.) The ONLY task that posts events to s_from_kernel_event_queue is the KernelMain task. // 3.) Whenever KernelMain wants to post an event to itself, it MUST use this queue. -// 4.) The KernelMain task will always service this queue first, before servicing the kernel or from_app queues. +// 4.) The KernelMain task will always service this queue first, before servicing the kernel or +// from_app queues. static PBL_MSGQ_DEFINE(s_from_kernel_event_queue, sizeof(PebbleEvent), MAX_FROM_KERNEL_MAIN_EVENTS); -// This queue set contains the s_kernel_event_queue, s_from_app_event_queue, and s_from_worker_event_queue queues +// This queue set contains the s_kernel_event_queue, s_from_app_event_queue, and +// s_from_worker_event_queue queues static PBL_POLL_GROUP_DEFINE(s_system_event_queue_set); uint32_t s_current_event; @@ -88,14 +91,16 @@ static void prv_queue_dump(struct pbl_msgq *queue) { while (pbl_msgq_get(queue, &event, PBL_NO_WAIT) == 0) { PBL_LOG_DBG("Event type: %u", event.type); } - for(;;); + for (;;) + ; } #endif void events_init(void) { - // This assert is to make sure we don't accidentally bloat our PebbleEvent unnecessarily. If you hit this - // assert and you have a good reason for making the event bigger, feel free to relax the restriction. - //PBL_LOG_DBG("PebbleEvent size is %u", sizeof(PebbleEvent)); + // This assert is to make sure we don't accidentally bloat our PebbleEvent unnecessarily. If you + // hit this assert and you have a good reason for making the event bigger, feel free to relax the + // restriction. + // PBL_LOG_DBG("PebbleEvent size is %u", sizeof(PebbleEvent)); // FIXME: _Static_assert(sizeof(PebbleEvent) <= 12, "You made the PebbleEvent bigger! It should be no more than 12"); @@ -121,11 +126,10 @@ struct pbl_msgq *event_get_to_kernel_queue(PebbleTask task) { } } - //! Decode a bit more information out about an event and pack it into a uint32_t static uint32_t prv_get_fancy_type_from_event(const PebbleEvent *event) { if (event->type == PEBBLE_CALLBACK_EVENT) { - return (uint32_t) event->callback.callback; + return (uint32_t)event->callback.callback; } return event->type; } @@ -139,30 +143,32 @@ static void prv_log_kernel_queue_contents(void) { } } -static void prv_log_event_put_failure(const char *queue_name, uintptr_t saved_lr, const PebbleEvent *event) { +static void prv_log_event_put_failure(const char *queue_name, uintptr_t saved_lr, + const PebbleEvent *event) { PBL_LOG_ERR("Error, %s queue full. Type %u", queue_name, event->type); prv_log_kernel_queue_contents(); RebootReason reason = { - .code = RebootReasonCode_EventQueueFull, - .event_queue = { - .push_lr = saved_lr, - .current_event = s_current_event, - .dropped_event = prv_get_fancy_type_from_event(event) - } + .code = RebootReasonCode_EventQueueFull, + .event_queue = { + .push_lr = saved_lr, + .current_event = s_current_event, + .dropped_event = prv_get_fancy_type_from_event(event) + } }; reboot_reason_set(&reason); } -static bool prv_event_put_isr(struct pbl_msgq *queue, const char* queue_type, uintptr_t saved_lr, - PebbleEvent* event) { +static bool prv_event_put_isr(struct pbl_msgq *queue, const char *queue_type, uintptr_t saved_lr, + PebbleEvent *event) { PBL_ASSERTN(queue); if (pbl_msgq_put(queue, event, PBL_NO_WAIT) != 0) { prv_log_event_put_failure(queue_type, saved_lr, event); #ifdef CONFIG_NO_WATCHDOG - while (1); + while (1) + ; #endif reset_due_to_software_failure(); @@ -184,17 +190,15 @@ static bool prv_try_event_put(struct pbl_msgq *queue, PebbleEvent *event) { return success; } -static void prv_event_put(struct pbl_msgq *queue, - const char* queue_type, - uintptr_t saved_lr, - PebbleEvent* event) { +static void prv_event_put(struct pbl_msgq *queue, const char *queue_type, uintptr_t saved_lr, + PebbleEvent *event) { PBL_ASSERTN(queue); if (pbl_msgq_put(queue, event, PBL_MSEC(3000)) != 0) { - // We waited a reasonable amount of time here before failing. We don't want to wait too long because - // if the queue really is stuck we'll just get a watchdog reset, which will be harder to debug than - // just dieing here. However, we want to wait a non-zero amount of time to provide for a little bit - // of backup to occur before killing ourselves. + // We waited a reasonable amount of time here before failing. We don't want to wait too long + // because if the queue really is stuck we'll just get a watchdog reset, which will be harder to + // debug than just dieing here. However, we want to wait a non-zero amount of time to provide + // for a little bit of backup to occur before killing ourselves. prv_log_event_put_failure(queue_type, saved_lr, event); @@ -210,7 +214,7 @@ static void prv_event_put(struct pbl_msgq *queue, } } -void event_deinit(PebbleEvent* event) { +void event_deinit(PebbleEvent *event) { void **buffer = event_get_buffer(event); if (buffer && *buffer) { kernel_free(*buffer); @@ -218,11 +222,11 @@ void event_deinit(PebbleEvent* event) { } } -void event_put(PebbleEvent* event) { +void event_put(PebbleEvent *event) { // Caller LR; more reliable than reading lr register from a deeper helper. uintptr_t saved_lr = (uintptr_t)__builtin_return_address(0); - // If we are posting from the KernelMain task, use the dedicated s_from_kernel_event_queue queue for that - // See comments above where s_from_kernel_event_queue is declared. + // If we are posting from the KernelMain task, use the dedicated s_from_kernel_event_queue queue + // for that See comments above where s_from_kernel_event_queue is declared. if (pebble_task_get_current() == PebbleTask_KernelMain) { return prv_event_put(&s_from_kernel_event_queue, "from_kernel", saved_lr, event); } else { @@ -230,29 +234,30 @@ void event_put(PebbleEvent* event) { } } -bool event_put_isr(PebbleEvent* event) { +bool event_put_isr(PebbleEvent *event) { uintptr_t saved_lr = (uintptr_t)__builtin_return_address(0); return prv_event_put_isr(&s_kernel_event_queue, "kernel", saved_lr, event); } -void event_put_from_process(PebbleTask task, PebbleEvent* event) { +void event_put_from_process(PebbleTask task, PebbleEvent *event) { uintptr_t saved_lr = (uintptr_t)__builtin_return_address(0); struct pbl_msgq *queue = event_get_to_kernel_queue(task); prv_event_put(queue, "from app", saved_lr, event); } -bool event_try_put_from_process(PebbleTask task, PebbleEvent* event) { +bool event_try_put_from_process(PebbleTask task, PebbleEvent *event) { struct pbl_msgq *queue = event_get_to_kernel_queue(task); return prv_try_event_put(queue, event); } -bool event_take_timeout(PebbleEvent* event, int timeout_ms) { +bool event_take_timeout(PebbleEvent *event, int timeout_ms) { s_current_event = 0; - // We must prioritize the from_kernel queue and always empty that first in order to avoid deadlocks in - // KernelMain. See comments at top of file where s_from_kernel_event_queue is declared. + // We must prioritize the from_kernel queue and always empty that first in order to avoid + // deadlocks in KernelMain. See comments at top of file where s_from_kernel_event_queue is + // declared. // Check the from_kernel queue first to see if we posted any events to ourself. bool result = (pbl_msgq_get(&s_from_kernel_event_queue, event, PBL_NO_WAIT) == 0); @@ -262,23 +267,25 @@ bool event_take_timeout(PebbleEvent* event, int timeout_ms) { } // Wait for either the from_app, from_worker, or kernel queue to be ready. - struct pbl_msgq *activated_queue = pbl_poll_group_wait(&s_system_event_queue_set, - PBL_MSEC(timeout_ms)); + struct pbl_msgq *activated_queue = + pbl_poll_group_wait(&s_system_event_queue_set, PBL_MSEC(timeout_ms)); if (!activated_queue) { return false; } // Always service the kernel queue first. This prevents a misbehaving app from starving us. - // If we're a little lazy servicing the app, the app will just block itself when the queue gets full. + // If we're a little lazy servicing the app, the app will just block itself when the queue gets + // full. if (pbl_msgq_get(&s_kernel_event_queue, event, PBL_NO_WAIT) == 0) { if (event->type == PEBBLE_CALLBACK_EVENT) { prv_callback_tracker_pop((uintptr_t)event->callback.callback); } } else { - // Process the activated queue. This insures that events are handled in FIFO order from the app and worker - // tasks. Note that sometimes the activated_queue can be the s_kernel_event_queue, even though - // the above receive returned no event - if (activated_queue == &s_from_app_event_queue || activated_queue == &s_from_worker_event_queue) { + // Process the activated queue. This insures that events are handled in FIFO order from the app + // and worker tasks. Note that sometimes the activated_queue can be the s_kernel_event_queue, + // even though the above receive returned no event + if (activated_queue == &s_from_app_event_queue || + activated_queue == &s_from_worker_event_queue) { result = (pbl_msgq_get(activated_queue, event, PBL_NO_WAIT) == 0); } if (!result) { @@ -288,7 +295,8 @@ bool event_take_timeout(PebbleEvent* event, int timeout_ms) { result = (pbl_msgq_get(&s_from_worker_event_queue, event, PBL_NO_WAIT) == 0); } - // If there was nothing in the queue, return false. We are misusing the poll group by pulling events out + // If there was nothing in the queue, return false. We are misusing the poll group by pulling + // events out // from the s_kernel_event_queue queue before it's activated so likely, the activated queue was // s_kernel_event_queue. if (!result) { @@ -316,8 +324,7 @@ void **event_get_buffer(PebbleEvent *event) { return (void **)&event->blob_db.key; case PEBBLE_BT_PAIRING_EVENT: - if (event->bluetooth.pair.type == - PebbleBluetoothPairEventTypePairingUserConfirmation) { + if (event->bluetooth.pair.type == PebbleBluetoothPairEventTypePairingUserConfirmation) { return (void **)&event->bluetooth.pair.confirmation_info; } break; @@ -352,13 +359,13 @@ void **event_get_buffer(PebbleEvent *event) { return (void **)&event->timeline_peek.item_id; default: - break; // Nothing to do! + break; // Nothing to do! } return NULL; } -void event_cleanup(PebbleEvent* event) { +void event_cleanup(PebbleEvent *event) { event_deinit(event); #ifndef CONFIG_RELEASE diff --git a/src/fw/kernel/events.h b/src/fw/kernel/events.h index e92e6dc7c0..a437f9a2ef 100644 --- a/src/fw/kernel/events.h +++ b/src/fw/kernel/events.h @@ -60,7 +60,7 @@ typedef enum { PEBBLE_RENDER_READY_EVENT, //! From kernel to app, notification that render was completed PEBBLE_RENDER_FINISHED_EVENT, - PEBBLE_BATTERY_CONNECTION_EVENT, // TODO: this has a poor name + PEBBLE_BATTERY_CONNECTION_EVENT, // TODO: this has a poor name PEBBLE_PUT_BYTES_EVENT, PEBBLE_BT_PAIRING_EVENT, // Emitted when the Pebble mobile app or third party app is (dis)connected @@ -132,21 +132,21 @@ typedef enum { PEBBLE_NUM_EVENTS } PebbleEventType; -typedef struct PACKED { // 9 bytes +typedef struct PACKED { // 9 bytes AppOutboxSentHandler sent_handler; void *cb_ctx; - AppOutboxStatus status:8; + AppOutboxStatus status : 8; } PebbleAppOutboxSentEvent; -typedef struct PACKED { // 1 byte - bool is_active; //= PebbleBLEGATTClientEventTypeNum, "Not enough bits to represent all PebbleBLEGATTClientEventTypes"); #ifdef __arm__ -_Static_assert(sizeof(PebbleBLEGATTClientServiceEvent) == sizeof(PebbleBLEGATTClientServiceEvent), - "PebbleBLEGATTClientEvent and PebbleBLEGATTClientServiceEvent must be the same size"); +_Static_assert( + sizeof(PebbleBLEGATTClientServiceEvent) == sizeof(PebbleBLEGATTClientServiceEvent), + "PebbleBLEGATTClientEvent and PebbleBLEGATTClientServiceEvent must be the same size"); #endif -#define PebbleEventToBTDeviceInternal(e) ((const BTDeviceInternal) { \ - .opaque = { \ - .opaque_64 = (e)->bt_device_bits \ - } \ -}) +#define PebbleEventToBTDeviceInternal(e) \ + ((const BTDeviceInternal){.opaque = {.opaque_64 = (e)->bt_device_bits}}) -typedef struct PACKED { // 3 byte? +typedef struct PACKED { // 3 byte? bool airplane; bool enabled; BtCtlModeOverride override; @@ -362,47 +360,47 @@ typedef enum { PebblePutBytesEventTypeInitTimeout, } PebblePutBytesEventType; -typedef struct PACKED { // 8 bytes - PebblePutBytesEventType type:8; - uint8_t progress_percent; // the percent complete for the current PB transfer - PutBytesObjectType object_type:7; - bool has_cookie:1; +typedef struct PACKED { // 8 bytes + PebblePutBytesEventType type : 8; + uint8_t progress_percent; // the percent complete for the current PB transfer + PutBytesObjectType object_type : 7; + bool has_cookie : 1; bool failed; union { // if type != PebblePutBytesEventTypeCleanup, populated with: - uint32_t bytes_transferred; // the number of bytes transferred since the last event + uint32_t bytes_transferred; // the number of bytes transferred since the last event // else populated with: uint32_t total_size; }; } PebblePutBytesEvent; -typedef struct PACKED { // 1 bytes +typedef struct PACKED { // 1 bytes PreciseBatteryChargeState new_state; } PebbleBatteryStateChangeEvent; -typedef struct PACKED { // 1 byte +typedef struct PACKED { // 1 byte bool is_connected; } PebbleBatteryConnectionEvent; -typedef struct PACKED { // 5 bytes +typedef struct PACKED { // 5 bytes int32_t magnetic_heading; uint8_t calib_status; } PebbleCompassDataEvent; -typedef struct PACKED { // 5 bytes +typedef struct PACKED { // 5 bytes IMUCoordinateAxis axis; int32_t direction; } PebbleAccelTapEvent; //! This is fired when a PP comm session is opened or closed -typedef struct PACKED PebbleCommSessionEvent { // 1 byte +typedef struct PACKED PebbleCommSessionEvent { // 1 byte //! indicates whether the we are connecting or disconnecting - bool is_open:1; + bool is_open : 1; //! True if the pebble app has connected & false if a third-party app has connected - bool is_system:1; + bool is_system : 1; } PebbleCommSessionEvent; -typedef struct PACKED { // 1 bytes +typedef struct PACKED { // 1 bytes RemoteOS os; } PebbleRemoteAppInfoEvent; @@ -415,7 +413,7 @@ typedef enum { PebbleSystemMessageFirmwareOutOfDate, } PebbleSystemMessageEventType; -typedef struct PACKED { // 1 byte +typedef struct PACKED { // 1 byte PebbleSystemMessageEventType type; uint32_t bytes_transferred; uint32_t total_transfer_size; @@ -428,75 +426,75 @@ typedef struct { WakeupInfo wakeup; } PebbleLaunchAppEventExtended; -typedef struct PACKED { // 8 bytes +typedef struct PACKED { // 8 bytes AppInstallId id; PebbleLaunchAppEventExtended *data; } PebbleLaunchAppEvent; -typedef struct PACKED { // 8 bytes - time_t alarm_time; //!< Needs to be converted to 'struct tm' in the event service handler +typedef struct PACKED { // 8 bytes + time_t alarm_time; //!< Needs to be converted to 'struct tm' in the event service handler const char *alarm_label; } PebbleAlarmClockEvent; typedef void (*CallbackEventCallback)(void *data); -typedef struct PACKED { // 8 bytes +typedef struct PACKED { // 8 bytes CallbackEventCallback callback; void *data; } PebbleCallbackEvent; -typedef struct PACKED { // 4 bytes - void* data; +typedef struct PACKED { // 4 bytes + void *data; } PebbleNewAppMessageEvent; -typedef struct PACKED { // 7 bytes +typedef struct PACKED { // 7 bytes bool subscribe; - PebbleTask task:8; + PebbleTask task : 8; PebbleEventType event_type; void *event_queue; } PebbleSubscriptionEvent; -typedef struct PACKED { // 2 bytes +typedef struct PACKED { // 2 bytes bool gracefully; PebbleTask task; } PebbleKillEvent; -typedef struct PACKED { // 1 byte +typedef struct PACKED { // 1 byte bool in_focus; } PebbleAppFocusEvent; -typedef struct PACKED { // 9 bytes - uint8_t type; // service event type - uint16_t service_index; // service index +typedef struct PACKED { // 9 bytes + uint8_t type; // service event type + uint16_t service_index; // service index PluginEventData data; } PebblePluginServiceEvent; -typedef struct PACKED { // 8 bytes +typedef struct PACKED { // 8 bytes WakeupInfo wakeup_info; } PebbleWakeupEvent; -typedef struct PACKED { // 7 bytes +typedef struct PACKED { // 7 bytes BlobDBId db_id; BlobDBEventType type; uint8_t *key; uint8_t key_len; } PebbleBlobDBEvent; -typedef struct PACKED { // 5 bytes - const char *key; //!< The preference key that changed (null-terminated) - uint8_t key_len; //!< Length of the key including null terminator +typedef struct PACKED { // 5 bytes + const char *key; //!< The preference key that changed (null-terminated) + uint8_t key_len; //!< Length of the key including null terminator } PebblePrefChangeEvent; typedef enum { SpeakerEventFinished = 0, } SpeakerEventType; -typedef struct PACKED { // 2 bytes - SpeakerEventType type:8; +typedef struct PACKED { // 2 bytes + SpeakerEventType type : 8; uint8_t finish_reason; // SpeakerFinishReason } PebbleSpeakerEvent; -typedef struct PACKED { // 1 byte +typedef struct PACKED { // 1 byte bool is_on; } PebbleBacklightEvent; @@ -512,13 +510,13 @@ typedef struct { char sentence[]; } PebbleVoiceServiceEventData; -typedef struct PACKED { // 6 bytes - VoiceEventType type:8; - VoiceStatus status:8; +typedef struct PACKED { // 6 bytes + VoiceEventType type : 8; + VoiceStatus status : 8; PebbleVoiceServiceEventData *data; } PebbleVoiceServiceEvent; -typedef struct PACKED { // 9 bytes +typedef struct PACKED { // 9 bytes DictationSessionStatus result; time_t timestamp; char *text; @@ -532,7 +530,7 @@ typedef enum { AppFetchEventTypeError, } AppFetchEventType; -typedef struct PACKED { // 6 bytes +typedef struct PACKED { // 6 bytes AppFetchEventType type; AppInstallId id; union { @@ -541,10 +539,10 @@ typedef struct PACKED { // 6 bytes }; } PebbleAppFetchEvent; -typedef struct PACKED { // 9 bytes +typedef struct PACKED { // 9 bytes AppInstallId id; bool with_ui; - AppFetchUIArgs *fetch_args; //! NULL when with_ui is false, required otherwise + AppFetchUIArgs *fetch_args; //! NULL when with_ui is false, required otherwise } PebbleAppFetchRequestEvent; typedef enum { @@ -557,7 +555,7 @@ typedef enum { DebugInfoStateFinished, } DebugInfoEventState; -typedef struct PACKED { // 2 bytes +typedef struct PACKED { // 2 bytes DebugInfoEventSource source; DebugInfoEventState state; } PebbleGatherDebugInfoEvent; @@ -568,35 +566,35 @@ typedef enum { ReminderUpdated, } ReminderEventType; -typedef struct PACKED { // 4 bytes +typedef struct PACKED { // 4 bytes ReminderEventType type; ReminderId *reminder_id; } PebbleReminderEvent; -typedef struct PACKED { // 9 bytes +typedef struct PACKED { // 9 bytes HealthEventData data; - HealthEventType type:8; // At the end so that data is word aligned. + HealthEventType type : 8; // At the end so that data is word aligned. } PebbleHealthEvent; -typedef struct PACKED { // 1 byte +typedef struct PACKED { // 1 byte bool is_event_ongoing; } PebbleCalendarEvent; -typedef struct PACKED { // 9 bytes +typedef struct PACKED { // 9 bytes int utc_time_delta; int gmt_offset_delta; bool dst_changed; } PebbleSetTimeEvent; -typedef struct PACKED { // 6 bytes +typedef struct PACKED { // 6 bytes TouchEvent event; } PebbleTouchEvent; -typedef struct PACKED { // 6 bytes +typedef struct PACKED { // 6 bytes GestureEvent event; } PebbleGestureEvent; -typedef struct PACKED { // 8 bytes +typedef struct PACKED { // 8 bytes PebbleProtocolCapabilities flags_diff; } PebbleCapabilitiesChangedEvent; @@ -607,35 +605,35 @@ typedef enum WeatherEventType { } WeatherEventType; typedef struct PACKED PebbleWeatherEvent { - WeatherEventType type:8; + WeatherEventType type : 8; } PebbleWeatherEvent; -typedef struct HRMBPMData { // 2 bytes +typedef struct HRMBPMData { // 2 bytes uint8_t bpm; - HRMQuality quality:8; + HRMQuality quality : 8; } HRMBPMData; -typedef struct HRMHRVData { // 3 bytes - uint16_t ppi_ms; //!< Peak-to-peak interval (ms) - HRMQuality quality:8; +typedef struct HRMHRVData { // 3 bytes + uint16_t ppi_ms; //!< Peak-to-peak interval (ms) + HRMQuality quality : 8; } HRMHRVData; -typedef struct HRMSpO2Data { // 2 bytes +typedef struct HRMSpO2Data { // 2 bytes uint8_t percent; - HRMQuality quality:8; + HRMQuality quality : 8; } HRMSpO2Data; #ifdef CONFIG_MFG -typedef struct HRMCTRData { // 6 bytes +typedef struct HRMCTRData { // 6 bytes double ctr[6]; } HRMCTRData; -typedef struct HRMLeakageData { // 6 bytes +typedef struct HRMLeakageData { // 6 bytes double leakage[6]; } HRMLeakageData; #endif -typedef struct HRMSubscriptionExpiringData { // 4 bytes +typedef struct HRMSubscriptionExpiringData { // 4 bytes HRMSessionRef session_ref; } HRMSubscriptionExpiringData; @@ -650,15 +648,15 @@ typedef enum HRMEventType { HRMEvent_SubscriptionExpiring } HRMEventType; -typedef struct PACKED PebbleHRMEvent { // 5 bytes +typedef struct PACKED PebbleHRMEvent { // 5 bytes HRMEventType event_type; union { HRMBPMData bpm; HRMHRVData hrv; HRMSpO2Data spo2; #ifdef CONFIG_MFG - HRMCTRData* ctr; - HRMLeakageData* leakage; + HRMCTRData *ctr; + HRMLeakageData *leakage; #endif HRMSubscriptionExpiringData expiring; }; @@ -672,7 +670,7 @@ typedef enum UnobstructedAreaEventType { typedef struct UnobstructedAreaEventData { GRect area; - GRect final_area; //!< The final unobstructed area. Empty for events other than will-change. + GRect final_area; //!< The final unobstructed area. Empty for events other than will-change. AnimationProgress progress; } UnobstructedAreaEventData; @@ -680,7 +678,7 @@ typedef struct PACKED { int16_t current_y; int16_t final_y; AnimationProgress progress; - UnobstructedAreaEventType type:8; //!< At the end for alignment. + UnobstructedAreaEventType type : 8; //!< At the end for alignment. } PebbleUnobstructedAreaEvent; #if !__clang__ @@ -694,15 +692,14 @@ typedef struct PACKED PebbleAppGlanceEvent { typedef struct PACKED { TimelineItemId *item_id; - TimelinePeekTimeType time_type:8; + TimelinePeekTimeType time_type : 8; uint8_t num_concurrent; bool is_first_event; bool is_future_empty; } PebbleTimelinePeekEvent; #if !__clang__ -_Static_assert(sizeof(PebbleTimelinePeekEvent) == 8, - "PebbleTimelinePeekEvent size mismatch."); +_Static_assert(sizeof(PebbleTimelinePeekEvent) == 8, "PebbleTimelinePeekEvent size mismatch."); #endif typedef enum PebbleAppCacheEventType { @@ -712,13 +709,12 @@ typedef enum PebbleAppCacheEventType { } PebbleAppCacheEventType; typedef struct PACKED PebbleAppCacheEvent { - PebbleAppCacheEventType cache_event_type:8; + PebbleAppCacheEventType cache_event_type : 8; AppInstallId install_id; } PebbleAppCacheEvent; #if !__clang__ -_Static_assert(sizeof(PebbleAppCacheEvent) == 5, - "PebbleTimelinePeekEvent size mismatch."); +_Static_assert(sizeof(PebbleAppCacheEvent) == 5, "PebbleTimelinePeekEvent size mismatch."); #endif typedef enum PebbleActivityEventType { @@ -729,7 +725,7 @@ typedef enum PebbleActivityEventType { } PebbleActivityEventType; typedef struct PACKED PebbleActivityEvent { - PebbleActivityEventType type:8; + PebbleActivityEventType type : 8; } PebbleActivityEvent; typedef enum PebbleWorkoutEventType { @@ -813,7 +809,7 @@ typedef struct PACKED { PebbleTaskBitset task_mask; // 1 == filter out, 0 == leave in // NOTE: we put this 8 bit field at the end so that we can pack this structure and still keep the // event data unions word aligned (and avoid unaligned access exceptions). - PebbleEventType type:8; + PebbleEventType type : 8; } PebbleEvent; // Guard the on-target size. The bound assumes 4-byte pointers, so it only @@ -824,14 +820,14 @@ _Static_assert(sizeof(PebbleEvent) <= 12, "PebbleEvent grew; check the event uni void events_init(void); -void event_put(PebbleEvent* event); -bool event_put_isr(PebbleEvent* event); -void event_put_from_process(PebbleTask task, PebbleEvent* event); +void event_put(PebbleEvent *event); +bool event_put_isr(PebbleEvent *event); +void event_put_from_process(PebbleTask task, PebbleEvent *event); //! Like event_put_from_app but it's allowed to fail. -bool event_try_put_from_process(PebbleTask task, PebbleEvent* event); +bool event_try_put_from_process(PebbleTask task, PebbleEvent *event); -bool event_take_timeout(PebbleEvent* event, int timeout_ms); +bool event_take_timeout(PebbleEvent *event, int timeout_ms); //! Return a reference to the allocated buffer within an event, if applicable void **event_get_buffer(PebbleEvent *event); @@ -840,7 +836,7 @@ void **event_get_buffer(PebbleEvent *event); void event_deinit(PebbleEvent *event); //! Call to clean up after an event that has been dequeued using event_take. -void event_cleanup(PebbleEvent* event); +void event_cleanup(PebbleEvent *event); void event_reset_from_process_queue(PebbleTask task); diff --git a/src/fw/kernel/fault_handling.c b/src/fw/kernel/fault_handling.c index e6a754e51e..cd78f317ad 100644 --- a/src/fw/kernel/fault_handling.c +++ b/src/fw/kernel/fault_handling.c @@ -63,33 +63,32 @@ typedef struct CrashInfo { } CrashInfo; CrashInfo make_crash_info_pc(uintptr_t pc) { - return (CrashInfo) { .pc = pc, .pc_known = true }; + return (CrashInfo){.pc = pc, .pc_known = true}; } CrashInfo make_crash_info_pc_lr(uintptr_t pc, uintptr_t lr) { - return (CrashInfo) { .pc = pc, .pc_known = true, - .lr = lr, .lr_known = true }; + return (CrashInfo){.pc = pc, .pc_known = true, .lr = lr, .lr_known = true}; } -static void prv_save_debug_registers(unsigned int* stacked_args) { +static void prv_save_debug_registers(unsigned int *stacked_args) { s_fault_saved_lr = (uint32_t)stacked_args[5]; s_fault_saved_pc = (uint32_t)stacked_args[6]; s_fault_saved_sp = (uint32_t)&stacked_args[8]; } static void prv_log_app_lr_and_pc_system_task(void *data) { - CrashInfo* crash_info = (CrashInfo*) data; + CrashInfo *crash_info = (CrashInfo *)data; char lr_str[16]; if (crash_info->lr_known) { - sniprintf(lr_str, sizeof(lr_str), "%p", (void*) crash_info->lr); + sniprintf(lr_str, sizeof(lr_str), "%p", (void *)crash_info->lr); } else { strncpy(lr_str, "???", sizeof(lr_str)); } char pc_str[16]; if (crash_info->pc_known) { - sniprintf(pc_str, sizeof(pc_str), "%p", (void*) crash_info->pc); + sniprintf(pc_str, sizeof(pc_str), "%p", (void *)crash_info->pc); } else { strncpy(pc_str, "???", sizeof(pc_str)); } @@ -99,25 +98,26 @@ static void prv_log_app_lr_and_pc_system_task(void *data) { char *process_string = (crash_info->task == PebbleTask_Worker) ? "Worker" : "App"; - APP_LOG(APP_LOG_LEVEL_ERROR, "%s fault! %s PC: %s LR: %s", process_string, buffer, pc_str, lr_str); + APP_LOG(APP_LOG_LEVEL_ERROR, "%s fault! %s PC: %s LR: %s", process_string, buffer, pc_str, + lr_str); PBL_LOG_ERR("%s fault! %s", process_string, buffer); PBL_LOG_ERR(" --> PC: %s LR: %s", pc_str, lr_str); - } -//! Converts an address from an absolute address in our memory space to one that's relative to the start -//! of the loaded app/worker -static void convert_to_process_offset(bool known, uintptr_t* pc, PebbleTask task) { +//! Converts an address from an absolute address in our memory space to one that's relative to the +//! start of the loaded app/worker +static void convert_to_process_offset(bool known, uintptr_t *pc, PebbleTask task) { if (known) { - *pc = (uintptr_t) process_manager_address_to_offset(task, (void*) *pc); + *pc = (uintptr_t)process_manager_address_to_offset(task, (void *)*pc); } } static CrashInfo s_current_app_crash_info; static void setup_log_app_crash_info(CrashInfo crash_info) { - // Write the information out into a global variable so it can be logged out at a less critical time. + // Write the information out into a global variable so it can be logged out at a less critical + // time. s_current_app_crash_info = crash_info; const PebbleProcessMd *md = sys_process_manager_get_current_process_md(); @@ -135,7 +135,7 @@ static void setup_log_app_crash_info(CrashInfo crash_info) { } static NORETURN kernel_fault(RebootReasonCode reason_code, uint32_t lr) { - RebootReason reason = { .code = reason_code, .extra = { .value = lr } }; + RebootReason reason = {.code = reason_code, .extra = {.value = lr}}; reboot_reason_set(&reason); if (reason_code == RebootReasonCode_Assert) { prepare_for_software_failure(); @@ -161,14 +161,12 @@ NORETURN trigger_oom_fault(size_t bytes, uint32_t lr, Heap *heap_ptr) { // that process even when privileged (Moddable apps run privileged inside the // moddable_createMachine syscall). Only kernel-heap OOM reboots. PebbleTask task = pebble_task_get_current(); - bool process_heap_oom = - (task == PebbleTask_App && heap_ptr == app_state_get_heap()) || - (task == PebbleTask_Worker && heap_ptr == worker_state_get_heap()); + bool process_heap_oom = (task == PebbleTask_App && heap_ptr == app_state_get_heap()) || + (task == PebbleTask_Worker && heap_ptr == worker_state_get_heap()); // sys_app_fault suspends this task for KernelMain to reap; only safe with the // scheduler running and outside an ISR, else reboot. - bool can_kill_safely = - !mcu_state_is_isr() && (pbl_kernel_is_running()); + bool can_kill_safely = !mcu_state_is_isr() && (pbl_kernel_is_running()); if (!mcu_state_is_privileged() || (process_heap_oom && can_kill_safely)) { sys_app_fault(lr); @@ -176,11 +174,11 @@ NORETURN trigger_oom_fault(size_t bytes, uint32_t lr, Heap *heap_ptr) { // Kernel-heap OOM (or OOM on a kernel task): unrecoverable, reboot. RebootReason reason = { - .code = RebootReasonCode_OutOfMemory, - .heap_data = { - .heap_alloc_lr = lr, - .heap_ptr = (uint32_t)heap_ptr, - } + .code = RebootReasonCode_OutOfMemory, + .heap_data = { + .heap_alloc_lr = lr, + .heap_ptr = (uint32_t)heap_ptr, + } }; reboot_reason_set(&reason); reset_due_to_software_failure(); @@ -225,7 +223,8 @@ DEFINE_SYSCALL(NORETURN, sys_app_fault, uint32_t stashed_lr) { system_task_add_callback(prv_log_app_lr_and_pc_system_task, &s_current_app_crash_info); prv_kill_user_process(stashed_lr); - for (;;) {} // Not Reached + for (;;) { + } // Not Reached } static void hardware_fault_landing_zone(void) { @@ -242,33 +241,34 @@ static void hardware_fault_landing_zone(void) { prv_kill_user_process(lr); } -static void prv_return_to_landing_zone(uintptr_t stacked_pc, uintptr_t stacked_lr, unsigned int* stacked_args) { +static void prv_return_to_landing_zone(uintptr_t stacked_pc, uintptr_t stacked_lr, + unsigned int *stacked_args) { // We got this! Let's redirect this task to a spin function and tell the app manager to kill us. // Log about the terrible thing that just happened. CrashInfo crash_info = make_crash_info_pc_lr(stacked_pc, stacked_lr); setup_log_app_crash_info(crash_info); - // Alright, now to neuter the current task. We're going to do some work to make it so when we return from - // this fault handler we'll end up in a perfectly safe place while we wait to die. + // Alright, now to neuter the current task. We're going to do some work to make it so when we + // return from this fault handler we'll end up in a perfectly safe place while we wait to die. - SCB->BFAR &= 1 << 7; // Clear Bus Fault Address Register "address is valid" bit - SCB->MMFAR &= 1 << 7; // Clear Memory Manage Address Register "address is valid" bit - SCB->CFSR &= ~0; // Clear the complete status register + SCB->BFAR &= 1 << 7; // Clear Bus Fault Address Register "address is valid" bit + SCB->MMFAR &= 1 << 7; // Clear Memory Manage Address Register "address is valid" bit + SCB->CFSR &= ~0; // Clear the complete status register // Redirect this task to nowhere by changing the stacked PC register. // We can't let this task resume to where it crashed or else it will just crash again. - // The kernel should come by and kill the task soon, but if it's busy doing something else just spin. - // We don't want to just spin in the fault handler because that will prevent other tasks from being - // executed, as we're currently in a higher priority interrupt. - stacked_args[6] = (int) hardware_fault_landing_zone; - - // Clear the ICI bits in the Program Status Register. These bits refer to microprocessor state if we - // get interrupted during a certain set of instructions. Since we're returning to a different place, we need - // to clean up this state or else we'll just hit an INVSTATE UsageFault immediately. The only bit we leave - // set is the bit that says we're in thumb state, which must always be set on Cortex-M3, since the micro doesn't - // even support non-thumb instructions. - // See: https://pebbletech.campfirenow.com/room/508662/transcript/message/1111369053#message_1111369053 + // The kernel should come by and kill the task soon, but if it's busy doing something else just + // spin. We don't want to just spin in the fault handler because that will prevent other tasks + // from being executed, as we're currently in a higher priority interrupt. + stacked_args[6] = (int)hardware_fault_landing_zone; + + // Clear the ICI bits in the Program Status Register. These bits refer to microprocessor state if + // we get interrupted during a certain set of instructions. Since we're returning to a different + // place, we need to clean up this state or else we'll just hit an INVSTATE UsageFault + // immediately. The only bit we leave set is the bit that says we're in thumb state, which must + // always be set on Cortex-M3, since the micro doesn't even support non-thumb instructions. See: + // https://pebbletech.campfirenow.com/room/508662/transcript/message/1111369053#message_1111369053 // http://stackoverflow.com/a/9538628/1546 stacked_args[7] = 1 << 24; @@ -277,16 +277,16 @@ static void prv_return_to_landing_zone(uintptr_t stacked_pc, uintptr_t stacked_l // Now return to hardware_fault_landing_zone... } -static void attempt_handle_stack_overflow(unsigned int* stacked_args, uintptr_t fault_pc) { +static void attempt_handle_stack_overflow(unsigned int *stacked_args, uintptr_t fault_pc) { PebbleTask task = pebble_task_get_current(); PBL_LOG_SYNC_ERR("Stack overflow [task: %s]", pebble_task_get_name(task)); if (mcu_state_is_thread_privileged()) { // We're hosed! We can't recover so just reboot everything. RebootReason reason = { - .code = RebootReasonCode_StackOverflow, - .data8[0] = task, - .extra = { .value = fault_pc }, + .code = RebootReasonCode_StackOverflow, + .data8[0] = task, + .extra = {.value = fault_pc}, }; reboot_reason_set(&reason); reset_due_to_software_failure(); @@ -294,12 +294,15 @@ static void attempt_handle_stack_overflow(unsigned int* stacked_args, uintptr_t } // We got this! Let's redirect this task to a spin function and tell the app manager to kill us. - prv_return_to_landing_zone(0, 0, stacked_args); // We can't get LR or PC, so just set to 0's. + prv_return_to_landing_zone(0, 0, stacked_args); // We can't get LR or PC, so just set to 0's. } -static void attempt_handle_generic_fault(unsigned int* stacked_args) { - uintptr_t stacked_lr = (uintptr_t) stacked_args[5];; - uintptr_t stacked_pc = (uintptr_t) stacked_args[6];;; +static void attempt_handle_generic_fault(unsigned int *stacked_args) { + uintptr_t stacked_lr = (uintptr_t)stacked_args[5]; + ; + uintptr_t stacked_pc = (uintptr_t)stacked_args[6]; + ; + ; if (mcu_state_is_thread_privileged()) { // We're hosed! We can't recover so just reboot everything. @@ -308,15 +311,16 @@ static void attempt_handle_generic_fault(unsigned int* stacked_args) { } // We got this! Let's redirect this task to a spin function and tell the app manager to kill us. - prv_return_to_landing_zone(stacked_pc, stacked_lr, stacked_args); // We can't get LR or PC, so just set to 0's. + prv_return_to_landing_zone(stacked_pc, stacked_lr, + stacked_args); // We can't get LR or PC, so just set to 0's. } // Hardware Fault Handlers /////////////////////////////////////////////////////////// -extern void fault_handler_dump(char buffer[80], unsigned int* stacked_args); +extern void fault_handler_dump(char buffer[80], unsigned int *stacked_args); extern void fault_handler_dump_cfsr(char buffer[80]); -static void mem_manage_handler_c(unsigned int* stacked_args, unsigned int lr) { +static void mem_manage_handler_c(unsigned int *stacked_args, unsigned int lr) { // Be very careful about touching stacked_args in this function. We can end up in the // memfault handler because we hit the stack guard, which indicates that we've run out of stack // space and therefore won't have any room to stack the args. Accessing stacked_args in this @@ -355,8 +359,8 @@ static void mem_manage_handler_c(unsigned int* stacked_args, unsigned int lr) { s_fault_saved_pc = 0; s_fault_saved_sp = 0; - // We can't call fault_handler_dump because stacked_args isn't going to be valid, but we can at least dump - // the cfsr. + // We can't call fault_handler_dump because stacked_args isn't going to be valid, but we can at + // least dump the cfsr. fault_handler_dump_cfsr(buffer); // Read user PC before moving SP up; only safe if MMSTKERR is clear @@ -369,7 +373,8 @@ static void mem_manage_handler_c(unsigned int* stacked_args, unsigned int lr) { fault_pc = SCB->MMFAR; } - stacked_args += 256; // Should be enough to get above the guard region and execute hardware_fault_landing_zone + stacked_args += 256; // Should be enough to get above the guard region and execute + // hardware_fault_landing_zone if (lr & 0x04) { __set_PSP((uint32_t)stacked_args); } else { @@ -383,8 +388,8 @@ static void mem_manage_handler_c(unsigned int* stacked_args, unsigned int lr) { fault_handler_dump(buffer, stacked_args); // BREAKPOINT; - // NOTE: If you want to get a stack trace at this point. Set a breakpoint here (you can compile in the above - // BREAKPOINT call if you want) and issue the following commands in gdb: + // NOTE: If you want to get a stack trace at this point. Set a breakpoint here (you can compile + // in the above BREAKPOINT call if you want) and issue the following commands in gdb: // set var $sp= // set var $lr= // set var $pc= @@ -396,15 +401,16 @@ static void mem_manage_handler_c(unsigned int* stacked_args, unsigned int lr) { void MemManage_Handler(void) { // Grab the stack pointer, shove it into a register and call // the c function above. - __asm("tst lr, #4\n" - "ite eq\n" - "mrseq r0, msp\n" - "mrsne r0, psp\n" - "mov r1, lr\n" - "b %0\n" :: "i" (mem_manage_handler_c)); + __asm( + "tst lr, #4\n" + "ite eq\n" + "mrseq r0, msp\n" + "mrsne r0, psp\n" + "mov r1, lr\n" + "b %0\n" ::"i"(mem_manage_handler_c)); } -static void busfault_handler_c(unsigned int* stacked_args) { +static void busfault_handler_c(unsigned int *stacked_args) { PBL_LOG_FROM_FAULT_HANDLER("\r\n\r\n[BusFault_Handler!]"); prv_save_debug_registers(stacked_args); @@ -417,11 +423,12 @@ static void busfault_handler_c(unsigned int* stacked_args) { } void BusFault_Handler(void) { - __asm("tst lr, #4\n" - "ite eq\n" - "mrseq r0, msp\n" - "mrsne r0, psp\n" - "b %0\n" :: "i" (busfault_handler_c)); + __asm( + "tst lr, #4\n" + "ite eq\n" + "mrseq r0, msp\n" + "mrsne r0, psp\n" + "b %0\n" ::"i"(busfault_handler_c)); } // STKOF = bit 4 of UFSR = bit 20 of CFSR (ARMv8-M only, reads as 0 on CM3/CM4) @@ -429,7 +436,7 @@ void BusFault_Handler(void) { #define SCB_CFSR_STKOF_Msk (1UL << 20) #endif -static void usagefault_handler_c(unsigned int* stacked_args, unsigned int lr) { +static void usagefault_handler_c(unsigned int *stacked_args, unsigned int lr) { PBL_LOG_FROM_FAULT_HANDLER("\r\n\r\n[UsageFault_Handler!]"); const uint32_t cfsr = SCB->CFSR; @@ -460,11 +467,11 @@ static void usagefault_handler_c(unsigned int* stacked_args, unsigned int lr) { } void UsageFault_Handler(void) { - __asm("tst lr, #4\n" - "ite eq\n" - "mrseq r0, msp\n" - "mrsne r0, psp\n" - "mov r1, lr\n" - "b %0\n" :: "i" (usagefault_handler_c)); + __asm( + "tst lr, #4\n" + "ite eq\n" + "mrseq r0, msp\n" + "mrsne r0, psp\n" + "mov r1, lr\n" + "b %0\n" ::"i"(usagefault_handler_c)); } - diff --git a/src/fw/kernel/fault_handling.h b/src/fw/kernel/fault_handling.h index dd9317f545..b2cea0a95c 100644 --- a/src/fw/kernel/fault_handling.h +++ b/src/fw/kernel/fault_handling.h @@ -9,4 +9,3 @@ typedef struct Heap Heap; NORETURN trigger_oom_fault(size_t bytes, uint32_t lr, Heap *heap_ptr); NORETURN trigger_fault(RebootReasonCode reason_code, uint32_t lr); void enable_fault_handlers(void); - diff --git a/src/fw/kernel/kernel_applib_state.c b/src/fw/kernel/kernel_applib_state.c index 2f90a9bf46..8de9319b89 100644 --- a/src/fw/kernel/kernel_applib_state.c +++ b/src/fw/kernel/kernel_applib_state.c @@ -11,7 +11,7 @@ static PBL_MUTEX_DEFINE(s_log_state_mutex); static bool s_log_state_mutex_ready; -static bool s_log_state_task_entered[NumPebbleTask]; // which tasks have entered +static bool s_log_state_task_entered[NumPebbleTask]; // which tasks have entered // --------------------------------------------------------------------------------------------- CompassServiceConfig **kernel_applib_get_compass_config(void) { @@ -20,7 +20,7 @@ CompassServiceConfig **kernel_applib_get_compass_config(void) { } // -------------------------------------------------------------------------------------------- -AnimationState* kernel_applib_get_animation_state(void) { +AnimationState *kernel_applib_get_animation_state(void) { static AnimationState s_kernel_animation_state; return &s_kernel_animation_state; } @@ -46,7 +46,7 @@ LogState *kernel_applib_get_log_state(void) { // trying to grab the s_log_state_mutex mutex below and tried to log an error. PebbleTask task = prv_get_current_task(); if (s_log_state_task_entered[task]) { - return NULL; + return NULL; } s_log_state_task_entered[task] = true; @@ -59,8 +59,8 @@ LogState *kernel_applib_get_log_state(void) { // possibly multiple tasks using logging without mutex support // In phase 3, we log after locking the mutex only. // Note, if we are in an ISR or critical section in any of these phases, we cannot use a mutex - if ((pebble_task_get_thread(PebbleTask_KernelMain) == NULL) || mcu_state_is_isr() - || pbl_irq_is_locked() || (!pbl_kernel_is_running())) { + if ((pebble_task_get_thread(PebbleTask_KernelMain) == NULL) || mcu_state_is_isr() || + pbl_irq_is_locked() || (!pbl_kernel_is_running())) { // phase 1 || in an ISR || in a critical section use_mutex = false; } else if (!s_log_state_mutex_ready) { @@ -106,8 +106,7 @@ void kernel_applib_release_log_state(LogState *state) { state->in_progress = false; // For phase 1 & when in an ISR, there is no mutex available - if (!pbl_irq_is_locked() && !mcu_state_is_isr() && - (pbl_kernel_is_running()) && + if (!pbl_irq_is_locked() && !mcu_state_is_isr() && (pbl_kernel_is_running()) && s_log_state_mutex_ready) { pbl_mutex_unlock(&s_log_state_mutex); } @@ -118,37 +117,37 @@ void kernel_applib_release_log_state(LogState *state) { } // --------------------------------------------------------------------------------------------- -EventServiceInfo* kernel_applib_get_event_service_state(void) { +EventServiceInfo *kernel_applib_get_event_service_state(void) { static EventServiceInfo s_event_service_state; return &s_event_service_state; } // -------------------------------------------------------------------------------------------- -TickTimerServiceState* kernel_applib_get_tick_timer_service_state(void) { +TickTimerServiceState *kernel_applib_get_tick_timer_service_state(void) { static TickTimerServiceState s_tick_timer_service_state; return &s_tick_timer_service_state; } // -------------------------------------------------------------------------------------------- -TouchServiceState* kernel_applib_get_touch_service_state(void) { +TouchServiceState *kernel_applib_get_touch_service_state(void) { static TouchServiceState s_touch_service_state; return &s_touch_service_state; } // ----------------------------------------------------------------------------------------------------------- -ConnectionServiceState* kernel_applib_get_connection_service_state(void) { +ConnectionServiceState *kernel_applib_get_connection_service_state(void) { static ConnectionServiceState s_connection_service_state; return &s_connection_service_state; } // ----------------------------------------------------------------------------------------------------------- -BatteryStateServiceState* kernel_applib_get_battery_state_service_state(void) { +BatteryStateServiceState *kernel_applib_get_battery_state_service_state(void) { static BatteryStateServiceState s_battery_state_service_state; return &s_battery_state_service_state; } -Layer** kernel_applib_get_layer_tree_stack(void) { - static Layer* layer_tree_stack[LAYER_TREE_STACK_SIZE]; +Layer **kernel_applib_get_layer_tree_stack(void) { + static Layer *layer_tree_stack[LAYER_TREE_STACK_SIZE]; return layer_tree_stack; } @@ -158,4 +157,3 @@ void kernel_applib_init(void) { connection_service_state_init(kernel_applib_get_connection_service_state()); battery_state_service_state_init(kernel_applib_get_battery_state_service_state()); } - diff --git a/src/fw/kernel/kernel_applib_state.h b/src/fw/kernel/kernel_applib_state.h index d59d2ef748..e2a72ea102 100644 --- a/src/fw/kernel/kernel_applib_state.h +++ b/src/fw/kernel/kernel_applib_state.h @@ -21,17 +21,17 @@ void kernel_applib_release_log_state(LogState *state); CompassServiceConfig **kernel_applib_get_compass_config(void); -EventServiceInfo* kernel_applib_get_event_service_state(void); +EventServiceInfo *kernel_applib_get_event_service_state(void); TickTimerServiceState *kernel_applib_get_tick_timer_service_state(void); TouchServiceState *kernel_applib_get_touch_service_state(void); -ConnectionServiceState* kernel_applib_get_connection_service_state(void); +ConnectionServiceState *kernel_applib_get_connection_service_state(void); -BatteryStateServiceState* kernel_applib_get_battery_state_service_state(void); +BatteryStateServiceState *kernel_applib_get_battery_state_service_state(void); struct Layer; typedef struct Layer Layer; -Layer** kernel_applib_get_layer_tree_stack(void); +Layer **kernel_applib_get_layer_tree_stack(void); diff --git a/src/fw/kernel/kernel_heap.c b/src/fw/kernel/kernel_heap.c index abd3ce7d5d..b628fdc169 100644 --- a/src/fw/kernel/kernel_heap.c +++ b/src/fw/kernel/kernel_heap.c @@ -11,7 +11,7 @@ static Heap s_kernel_heap; static bool s_interrupts_disabled_by_heap; -static uint32_t s_pri_mask; // cache basepri mask we restore to in heap_unlock +static uint32_t s_pri_mask; // cache basepri mask we restore to in heap_unlock // Locking callbacks for our kernel heap. // FIXME: Note that we use __set_BASEPRI() instead of a mutex because our heap @@ -39,10 +39,9 @@ void kernel_heap_init(void) { extern int _heap_end; heap_init(&s_kernel_heap, &_heap_start, &_heap_end, true); - heap_set_lock_impl(&s_kernel_heap, (HeapLockImpl) { - .lock_function = prv_heap_lock, - .unlock_function = prv_heap_unlock - }); + heap_set_lock_impl( + &s_kernel_heap, + (HeapLockImpl){.lock_function = prv_heap_lock, .unlock_function = prv_heap_unlock}); } void pbl_analytics_external_collect_kernel_heap_stats(void) { @@ -63,7 +62,7 @@ void pbl_analytics_external_collect_kernel_heap_stats(void) { s_kernel_heap.high_water_mark = s_kernel_heap.current_size; } -Heap* kernel_heap_get(void) { +Heap *kernel_heap_get(void) { return &s_kernel_heap; } diff --git a/src/fw/kernel/kernel_heap.h b/src/fw/kernel/kernel_heap.h index de9845462c..105184ad1b 100644 --- a/src/fw/kernel/kernel_heap.h +++ b/src/fw/kernel/kernel_heap.h @@ -7,5 +7,4 @@ void kernel_heap_init(void); -Heap* kernel_heap_get(void); - +Heap *kernel_heap_get(void); diff --git a/src/fw/kernel/low_power.c b/src/fw/kernel/low_power.c index 89fc132581..db303ee8d6 100644 --- a/src/fw/kernel/low_power.c +++ b/src/fw/kernel/low_power.c @@ -37,7 +37,7 @@ static void prv_low_power_launcher_task_callback(void *unused) { s_prev_low_power_active = s_low_power_active; } -static void prv_low_power_toggle_timer_callback(void* data) { +static void prv_low_power_toggle_timer_callback(void *data) { launcher_task_add_callback(prv_low_power_launcher_task_callback, data); } @@ -50,14 +50,13 @@ static void prv_low_power_transition(bool active) { // will cause repeated low power on/off requests. Require that a few seconds // elapse without further transitions before acting upon it to give us some // time to settle on one state or the other. - new_timer_start(s_toggle_timer, 3000, prv_low_power_toggle_timer_callback, - NULL, 0 /*flags*/); + new_timer_start(s_toggle_timer, 3000, prv_low_power_toggle_timer_callback, NULL, 0 /*flags*/); // FIXME PBL-XXXXX: This should be in a shell/prf/battery_ui_fsm.c #ifdef CONFIG_RECOVERY_FW if (active) { - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = prf_low_power_app_get_info(), + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = prf_low_power_app_get_info(), }); } else { // In MFG mode, disable low power mode above but don't close the app. diff --git a/src/fw/kernel/memory_layout.c b/src/fw/kernel/memory_layout.c index a3cb563893..3d09a1b831 100644 --- a/src/fw/kernel/memory_layout.c +++ b/src/fw/kernel/memory_layout.c @@ -11,38 +11,34 @@ #include #include - -static const char* const MEMORY_REGION_NAMES[] = { - // Keep the four RESERVED entries in lockstep with MemoryRegion_Reserved* - // in memory_layout.h. SiFli's fifth region (mailbox) overlaps with the - // "UNPRIV_FLASH" slot at index 4 -- Pebble never programs that index on - // SF32LB52, so the cosmetic label is the only casualty. +static const char *const MEMORY_REGION_NAMES[] = { +// Keep the four RESERVED entries in lockstep with MemoryRegion_Reserved* +// in memory_layout.h. SiFli's fifth region (mailbox) overlaps with the +// "UNPRIV_FLASH" slot at index 4 -- Pebble never programs that index on +// SF32LB52, so the cosmetic label is the only casualty. #ifdef CONFIG_SOC_SF32LB52 - "RESERVED0", - "RESERVED1", - "RESERVED2", - "RESERVED3", + "RESERVED0", "RESERVED1", "RESERVED2", "RESERVED3", #endif - "UNPRIV_FLASH", - "UNPRIV_RO_BSS", - "UNPRIV_RO_DATA", - "ISR_STACK_GUARD", - "Task Specific 1", - "Task Specific 2", - "Task Specific 3", - "Task Specific 4" + "UNPRIV_FLASH", "UNPRIV_RO_BSS", "UNPRIV_RO_DATA", "ISR_STACK_GUARD", + "Task Specific 1", "Task Specific 2", "Task Specific 3", "Task Specific 4" }; - static const char *prv_permissions_str(MpuPermissions p) { switch (p) { - case MpuPermissions_NoAccess: return "NoAccess"; - case MpuPermissions_PrivRW: return "PrivRW"; - case MpuPermissions_PrivRW_UserRO: return "PrivRW_UserRO"; - case MpuPermissions_PrivRW_UserRW: return "PrivRW_UserRW"; - case MpuPermissions_PrivRO: return "PrivRO"; - case MpuPermissions_PrivRO_UserRO: return "PrivRO_UserRO"; - case MpuPermissionsCount: break; + case MpuPermissions_NoAccess: + return "NoAccess"; + case MpuPermissions_PrivRW: + return "PrivRW"; + case MpuPermissions_PrivRW_UserRO: + return "PrivRW_UserRO"; + case MpuPermissions_PrivRW_UserRW: + return "PrivRW_UserRW"; + case MpuPermissions_PrivRO: + return "PrivRO"; + case MpuPermissions_PrivRO_UserRO: + return "PrivRO_UserRO"; + case MpuPermissionsCount: + break; } return "?"; } @@ -59,9 +55,8 @@ void memory_layout_dump_mpu_regions_to_dbgserial(void) { } PBL_LOG_FROM_FAULT_HANDLER_FMT( - buffer, sizeof(buffer), - "%u < %-22s>: Addr %p Size 0x%08"PRIx32" %s Perms: %s", - i, MEMORY_REGION_NAMES[i], (void*) region.base_address, region.size, + buffer, sizeof(buffer), "%u < %-22s>: Addr %p Size 0x%08" PRIx32 " %s Perms: %s", i, + MEMORY_REGION_NAMES[i], (void *)region.base_address, region.size, region.executable ? "X" : "-", prv_permissions_str(region.permissions)); } } @@ -106,94 +101,94 @@ extern const uint32_t __kernel_bg_stack_start__[]; // Kernel read only RAM. Parts of RAM that it's kosher for unprivileged apps to read static const MpuRegion s_readonly_bss_region = { - .region_num = MemoryRegion_ReadOnlyBss, - .enabled = true, - .base_address = (uint32_t) __unpriv_ro_bss_start__, - .size = (uint32_t) __unpriv_ro_bss_size__, - .cache_policy = MpuCachePolicy_WriteBackWriteAllocate, - .permissions = MpuPermissions_PrivRW_UserRO, + .region_num = MemoryRegion_ReadOnlyBss, + .enabled = true, + .base_address = (uint32_t)__unpriv_ro_bss_start__, + .size = (uint32_t)__unpriv_ro_bss_size__, + .cache_policy = MpuCachePolicy_WriteBackWriteAllocate, + .permissions = MpuPermissions_PrivRW_UserRO, }; #ifndef CONFIG_SOC_SF32LB52 // ISR stack guard static const MpuRegion s_isr_stack_guard_region = { - .region_num = MemoryRegion_IsrStackGuard, - .enabled = true, - .base_address = (uint32_t) __isr_stack_start__, - .size = (uint32_t) __stack_guard_size__, - .cache_policy = MpuCachePolicy_NotCacheable, - .permissions = MpuPermissions_NoAccess, + .region_num = MemoryRegion_IsrStackGuard, + .enabled = true, + .base_address = (uint32_t)__isr_stack_start__, + .size = (uint32_t)__stack_guard_size__, + .cache_policy = MpuCachePolicy_NotCacheable, + .permissions = MpuPermissions_NoAccess, }; #endif static const MpuRegion s_app_stack_guard_region = { - .region_num = MemoryRegion_TaskStackGuard, - .enabled = true, - .base_address = (uint32_t) __APP_RAM__, - .size = (uint32_t) __stack_guard_size__, - .cache_policy = MpuCachePolicy_NotCacheable, - .permissions = MpuPermissions_NoAccess, + .region_num = MemoryRegion_TaskStackGuard, + .enabled = true, + .base_address = (uint32_t)__APP_RAM__, + .size = (uint32_t)__stack_guard_size__, + .cache_policy = MpuCachePolicy_NotCacheable, + .permissions = MpuPermissions_NoAccess, }; static const MpuRegion s_worker_stack_guard_region = { - .region_num = MemoryRegion_TaskStackGuard, - .enabled = true, - .base_address = (uint32_t) __WORKER_RAM__, - .size = (uint32_t) __stack_guard_size__, - .cache_policy = MpuCachePolicy_NotCacheable, - .permissions = MpuPermissions_NoAccess, + .region_num = MemoryRegion_TaskStackGuard, + .enabled = true, + .base_address = (uint32_t)__WORKER_RAM__, + .size = (uint32_t)__stack_guard_size__, + .cache_policy = MpuCachePolicy_NotCacheable, + .permissions = MpuPermissions_NoAccess, }; static const MpuRegion s_app_region = { - .region_num = MemoryRegion_AppRAM, - .enabled = true, - // App process .text is relocated into App RAM, so the App task needs - // to be able to execute from this region. - .executable = true, - .base_address = (uintptr_t) __APP_RAM__, - .size = (uint32_t) __APP_RAM_size__, - .cache_policy = MpuCachePolicy_WriteBackWriteAllocate, - .permissions = MpuPermissions_PrivRW, + .region_num = MemoryRegion_AppRAM, + .enabled = true, + // App process .text is relocated into App RAM, so the App task needs + // to be able to execute from this region. + .executable = true, + .base_address = (uintptr_t)__APP_RAM__, + .size = (uint32_t)__APP_RAM_size__, + .cache_policy = MpuCachePolicy_WriteBackWriteAllocate, + .permissions = MpuPermissions_PrivRW, }; static const MpuRegion s_worker_region = { - .region_num = MemoryRegion_WorkerRAM, - .enabled = true, - // Worker process .text is relocated into Worker RAM. - .executable = true, - .base_address = (uintptr_t) __WORKER_RAM__, - .size = (uint32_t) __WORKER_RAM_size__, - .cache_policy = MpuCachePolicy_WriteBackWriteAllocate, - .permissions = MpuPermissions_PrivRW, + .region_num = MemoryRegion_WorkerRAM, + .enabled = true, + // Worker process .text is relocated into Worker RAM. + .executable = true, + .base_address = (uintptr_t)__WORKER_RAM__, + .size = (uint32_t)__WORKER_RAM_size__, + .cache_policy = MpuCachePolicy_WriteBackWriteAllocate, + .permissions = MpuPermissions_PrivRW, }; static const MpuRegion s_microflash_region = { - .region_num = MemoryRegion_Flash, - .enabled = true, - // The firmware itself runs from flash. - .executable = true, - .base_address = (uint32_t) __FLASH_start__, - .size = (uint32_t) __FLASH_size__, - .cache_policy = MpuCachePolicy_WriteThrough, - .permissions = MpuPermissions_PrivRO_UserRO, + .region_num = MemoryRegion_Flash, + .enabled = true, + // The firmware itself runs from flash. + .executable = true, + .base_address = (uint32_t)__FLASH_start__, + .size = (uint32_t)__FLASH_size__, + .cache_policy = MpuCachePolicy_WriteThrough, + .permissions = MpuPermissions_PrivRO_UserRO, }; static const MpuRegion s_kernel_main_stack_guard_region = { - .region_num = MemoryRegion_TaskStackGuard, - .enabled = true, - .base_address = (uint32_t) __kernel_main_stack_start__, - .size = (uint32_t) __stack_guard_size__, - .cache_policy = MpuCachePolicy_NotCacheable, - .permissions = MpuPermissions_NoAccess, + .region_num = MemoryRegion_TaskStackGuard, + .enabled = true, + .base_address = (uint32_t)__kernel_main_stack_start__, + .size = (uint32_t)__stack_guard_size__, + .cache_policy = MpuCachePolicy_NotCacheable, + .permissions = MpuPermissions_NoAccess, }; static const MpuRegion s_kernel_bg_stack_guard_region = { - .region_num = MemoryRegion_TaskStackGuard, - .enabled = true, - .base_address = (uint32_t) __kernel_bg_stack_start__, - .size = (uint32_t) __stack_guard_size__, - .cache_policy = MpuCachePolicy_NotCacheable, - .permissions = MpuPermissions_NoAccess, + .region_num = MemoryRegion_TaskStackGuard, + .enabled = true, + .base_address = (uint32_t)__kernel_bg_stack_start__, + .size = (uint32_t)__stack_guard_size__, + .cache_policy = MpuCachePolicy_NotCacheable, + .permissions = MpuPermissions_NoAccess, }; void memory_layout_setup_mpu(void) { @@ -224,55 +219,57 @@ void memory_layout_setup_mpu(void) { mpu_enable(); } -const MpuRegion* memory_layout_get_app_region(void) { +const MpuRegion *memory_layout_get_app_region(void) { return &s_app_region; } -const MpuRegion* memory_layout_get_readonly_bss_region(void) { +const MpuRegion *memory_layout_get_readonly_bss_region(void) { return &s_readonly_bss_region; } -const MpuRegion* memory_layout_get_app_stack_guard_region(void) { +const MpuRegion *memory_layout_get_app_stack_guard_region(void) { return &s_app_stack_guard_region; } -const MpuRegion* memory_layout_get_worker_region(void) { +const MpuRegion *memory_layout_get_worker_region(void) { return &s_worker_region; } -const MpuRegion* memory_layout_get_worker_stack_guard_region(void) { +const MpuRegion *memory_layout_get_worker_stack_guard_region(void) { return &s_worker_stack_guard_region; } -const MpuRegion* memory_layout_get_microflash_region(void) { +const MpuRegion *memory_layout_get_microflash_region(void) { return &s_microflash_region; } -const MpuRegion* memory_layout_get_kernel_main_stack_guard_region(void) { +const MpuRegion *memory_layout_get_kernel_main_stack_guard_region(void) { return &s_kernel_main_stack_guard_region; } -const MpuRegion* memory_layout_get_kernel_bg_stack_guard_region(void) { +const MpuRegion *memory_layout_get_kernel_bg_stack_guard_region(void) { return &s_kernel_bg_stack_guard_region; } bool memory_layout_is_pointer_in_region(const MpuRegion *region, const void *ptr) { - uintptr_t p = (uintptr_t) ptr; + uintptr_t p = (uintptr_t)ptr; return (p >= region->base_address && p < (region->base_address + region->size)); } bool memory_layout_is_buffer_in_region(const MpuRegion *region, const void *buf, size_t length) { - return memory_layout_is_pointer_in_region(region, buf) && memory_layout_is_pointer_in_region(region, (char *)buf + length - 1); + return memory_layout_is_pointer_in_region(region, buf) && + memory_layout_is_pointer_in_region(region, (char *)buf + length - 1); } -bool memory_layout_is_cstring_in_region(const MpuRegion *region, const char *str, size_t max_length) { +bool memory_layout_is_cstring_in_region(const MpuRegion *region, const char *str, + size_t max_length) { uintptr_t region_end = region->base_address + region->size; - if ((uintptr_t) str < region->base_address || (uintptr_t) str >= region_end) { + if ((uintptr_t)str < region->base_address || (uintptr_t)str >= region_end) { return false; } - const char *str_max_end = MIN((const char*) region_end, str + max_length); + const char *str_max_end = MIN((const char *)region_end, str + max_length); size_t str_len = strnlen(str, str_max_end - str); diff --git a/src/fw/kernel/memory_layout.h b/src/fw/kernel/memory_layout.h index 5cbad3a454..df8f98328c 100644 --- a/src/fw/kernel/memory_layout.h +++ b/src/fw/kernel/memory_layout.h @@ -10,14 +10,14 @@ #define KERNEL_READONLY_DATA SECTION(".kernel_unpriv_ro_bss") enum MemoryRegionAssignments { - // SF32LB52: SiFli's system_bf0_ap.c programs MPU regions 0..4 in - // SystemInit() (flash, peripherals, .ramfunc, LPSYS RAM, HCPU<->LCPU - // mailbox). Reserve four slots here so the per-task configurable - // regions still land at indices 8..11 -- matching the FreeRTOS port's - // FREERTOS_FIRST_MPU_REGION=8. SiFli's fifth region (mailbox at index - // 4) shares its slot with the unused-on-SF32LB52 MemoryRegion_Flash - // value; Pebble never programs region 4, so SiFli's mailbox config - // stays intact. +// SF32LB52: SiFli's system_bf0_ap.c programs MPU regions 0..4 in +// SystemInit() (flash, peripherals, .ramfunc, LPSYS RAM, HCPU<->LCPU +// mailbox). Reserve four slots here so the per-task configurable +// regions still land at indices 8..11 -- matching the FreeRTOS port's +// FREERTOS_FIRST_MPU_REGION=8. SiFli's fifth region (mailbox at index +// 4) shares its slot with the unused-on-SF32LB52 MemoryRegion_Flash +// value; Pebble never programs region 4, so SiFli's mailbox config +// stays intact. #ifdef CONFIG_SOC_SF32LB52 MemoryRegion_Reserved0, MemoryRegion_Reserved1, @@ -38,18 +38,19 @@ void memory_layout_dump_mpu_regions_to_dbgserial(void); void memory_layout_setup_mpu(void); -const MpuRegion* memory_layout_get_app_region(void); -const MpuRegion* memory_layout_get_app_stack_guard_region(void); +const MpuRegion *memory_layout_get_app_region(void); +const MpuRegion *memory_layout_get_app_stack_guard_region(void); -const MpuRegion* memory_layout_get_readonly_bss_region(void); -const MpuRegion* memory_layout_get_microflash_region(void); +const MpuRegion *memory_layout_get_readonly_bss_region(void); +const MpuRegion *memory_layout_get_microflash_region(void); -const MpuRegion* memory_layout_get_worker_region(void); -const MpuRegion* memory_layout_get_worker_stack_guard_region(void); +const MpuRegion *memory_layout_get_worker_region(void); +const MpuRegion *memory_layout_get_worker_stack_guard_region(void); -const MpuRegion* memory_layout_get_kernel_main_stack_guard_region(void); -const MpuRegion* memory_layout_get_kernel_bg_stack_guard_region(void); +const MpuRegion *memory_layout_get_kernel_main_stack_guard_region(void); +const MpuRegion *memory_layout_get_kernel_bg_stack_guard_region(void); bool memory_layout_is_pointer_in_region(const MpuRegion *region, const void *ptr); bool memory_layout_is_buffer_in_region(const MpuRegion *region, const void *buf, size_t length); -bool memory_layout_is_cstring_in_region(const MpuRegion *region, const char *str, size_t max_length); +bool memory_layout_is_cstring_in_region(const MpuRegion *region, const char *str, + size_t max_length); diff --git a/src/fw/kernel/panic.c b/src/fw/kernel/panic.c index 1dfbaba1c1..963f7fac82 100644 --- a/src/fw/kernel/panic.c +++ b/src/fw/kernel/panic.c @@ -16,7 +16,7 @@ void launcher_panic(uint32_t error_code) { s_current_error = error_code; - PBL_LOG_ERR("!!!SAD WATCH 0x%"PRIX32" SAD WATCH!!!", error_code); + PBL_LOG_ERR("!!!SAD WATCH 0x%" PRIX32 " SAD WATCH!!!", error_code); if (modal_manager_get_top_window()) { modal_manager_pop_all(); @@ -31,12 +31,12 @@ uint32_t launcher_panic_get_current_error(void) { return s_current_error; } -void command_sim_panic_cb(void* data) { +void command_sim_panic_cb(void *data) { PebbleEvent event = { - .type = PEBBLE_PANIC_EVENT, - .panic = { - .error_code = (uint32_t)data, - }, + .type = PEBBLE_PANIC_EVENT, + .panic = { + .error_code = (uint32_t)data, + }, }; event_put(&event); } @@ -44,5 +44,5 @@ void command_sim_panic_cb(void* data) { extern void command_sim_panic(const char *error_code_str) { uint32_t error_code = atoi(error_code_str); - launcher_task_add_callback(command_sim_panic_cb, (void*) error_code); + launcher_task_add_callback(command_sim_panic_cb, (void *)error_code); } diff --git a/src/fw/kernel/panic.h b/src/fw/kernel/panic.h index dd6daa785a..7bb5cf40be 100644 --- a/src/fw/kernel/panic.h +++ b/src/fw/kernel/panic.h @@ -8,4 +8,3 @@ void launcher_panic(uint32_t error_code); uint32_t launcher_panic_get_current_error(void); - diff --git a/src/fw/kernel/pbl_malloc.c b/src/fw/kernel/pbl_malloc.c index fdb75538da..aaddb2958a 100644 --- a/src/fw/kernel/pbl_malloc.c +++ b/src/fw/kernel/pbl_malloc.c @@ -23,7 +23,7 @@ Heap *task_heap_get_for_current_task(void) { return kernel_heap_get(); } -static char* prv_strdup(Heap *heap, const char* s, uintptr_t lr) { +static char *prv_strdup(Heap *heap, const char *s, uintptr_t lr) { char *dup = heap_zalloc(heap, strlen(s) + 1, lr); if (dup) { strcpy(dup, s); @@ -65,14 +65,14 @@ void task_free_with_pc(void *ptr, uintptr_t client_pc) { } #endif -void task_free(void* ptr) { +void task_free(void *ptr) { register uintptr_t lr __asm("lr"); uintptr_t saved_lr = lr; heap_free(task_heap_get_for_current_task(), ptr, saved_lr); } -void *task_realloc(void* ptr, size_t size) { +void *task_realloc(void *ptr, size_t size) { register uintptr_t lr __asm("lr"); uintptr_t saved_lr = lr; @@ -337,4 +337,3 @@ void *__wrap_calloc(size_t count, size_t size) { return heap_calloc(task_heap_get_for_current_task(), count, size, saved_lr); } - diff --git a/src/fw/kernel/pbl_malloc.h b/src/fw/kernel/pbl_malloc.h index 2dfb4ffb89..37620a3759 100644 --- a/src/fw/kernel/pbl_malloc.h +++ b/src/fw/kernel/pbl_malloc.h @@ -31,7 +31,7 @@ void task_free(void *ptr); #if defined(CONFIG_MALLOC_INSTRUMENTATION) void task_free_with_pc(void *ptr, uintptr_t client_pc); #endif -char* task_strdup(const char* s); +char *task_strdup(const char *s); void *app_malloc(size_t bytes); void *app_malloc_check(size_t bytes); @@ -41,7 +41,7 @@ void *app_zalloc_check(size_t size); void *app_calloc(size_t count, size_t size); void *app_calloc_check(size_t count, size_t size); void app_free(void *ptr); -char* app_strdup(const char* s); +char *app_strdup(const char *s); void *kernel_malloc(size_t bytes); void *kernel_malloc_check(size_t bytes); diff --git a/src/fw/kernel/pebble_tasks.c b/src/fw/kernel/pebble_tasks.c index 19891ad808..bdaf9d2fee 100644 --- a/src/fw/kernel/pebble_tasks.c +++ b/src/fw/kernel/pebble_tasks.c @@ -18,7 +18,7 @@ #include "pbl/kernel/debug.h" static struct pbl_thread s_threads[NumPebbleTask]; -struct pbl_thread *g_task_threads[NumPebbleTask] KERNEL_READONLY_DATA = { 0 }; +struct pbl_thread *g_task_threads[NumPebbleTask] KERNEL_READONLY_DATA = {0}; // Cycles consumed by tasks that have already been destroyed in each slot. // Captured at unregister time so the analytics heartbeat can keep accounting @@ -53,7 +53,7 @@ void pebble_task_unregister(PebbleTask task) { s_dead_task_cycles[task] += cycles; } -const char* pebble_task_get_name(PebbleTask task) { +const char *pebble_task_get_name(PebbleTask task) { if (task >= NumPebbleTask) { if (task == PebbleTask_Unknown) { return "Unknown"; @@ -68,31 +68,31 @@ const char* pebble_task_get_name(PebbleTask task) { return pbl_thread_name(thread); } -// NOTE: The logging support calls toupper() this character if the task is currently running privileged, so -// these identifiers should be all lower case and case-insensitive. +// NOTE: The logging support calls toupper() this character if the task is currently running +// privileged, so +// these identifiers should be all lower case and case-insensitive. char pebble_task_get_char(PebbleTask task) { switch (task) { - case PebbleTask_KernelMain: - return 'm'; - case PebbleTask_KernelBackground: - return 's'; - case PebbleTask_Worker: - return 'w'; - case PebbleTask_App: - return 'a'; - case PebbleTask_BTHost: - return 'b'; - case PebbleTask_BTController: - return 'c'; - case PebbleTask_BTHCI: - return 'd'; - case PebbleTask_NewTimers: - return 't'; - case PebbleTask_PULSE: - return 'p'; - case NumPebbleTask: - case PebbleTask_Unknown: - ; + case PebbleTask_KernelMain: + return 'm'; + case PebbleTask_KernelBackground: + return 's'; + case PebbleTask_Worker: + return 'w'; + case PebbleTask_App: + return 'a'; + case PebbleTask_BTHost: + return 'b'; + case PebbleTask_BTController: + return 'c'; + case PebbleTask_BTHCI: + return 'd'; + case PebbleTask_NewTimers: + return 't'; + case PebbleTask_PULSE: + return 'p'; + case NumPebbleTask: + case PebbleTask_Unknown:; } return '?'; @@ -106,7 +106,7 @@ PebbleTask pebble_task_get_task_for_thread(const struct pbl_thread *thread) { if (thread == NULL) { return PebbleTask_Unknown; } - for (int i = 0; i < (int) ARRAY_LENGTH(g_task_threads); ++i) { + for (int i = 0; i < (int)ARRAY_LENGTH(g_task_threads); ++i) { if (g_task_threads[i] == thread) { return i; } @@ -134,9 +134,12 @@ void pebble_task_suspend(PebbleTask task) { } void pbl_analytics_external_collect_stack_free(void) { - PBL_ANALYTICS_SET_UNSIGNED(stack_free_kernel_main_bytes, prv_task_get_stack_free(PebbleTask_KernelMain)); - PBL_ANALYTICS_SET_UNSIGNED(stack_free_kernel_background_bytes, prv_task_get_stack_free(PebbleTask_KernelBackground)); - PBL_ANALYTICS_SET_UNSIGNED(stack_free_newtimers_bytes, prv_task_get_stack_free(PebbleTask_NewTimers)); + PBL_ANALYTICS_SET_UNSIGNED(stack_free_kernel_main_bytes, + prv_task_get_stack_free(PebbleTask_KernelMain)); + PBL_ANALYTICS_SET_UNSIGNED(stack_free_kernel_background_bytes, + prv_task_get_stack_free(PebbleTask_KernelBackground)); + PBL_ANALYTICS_SET_UNSIGNED(stack_free_newtimers_bytes, + prv_task_get_stack_free(PebbleTask_NewTimers)); PBL_ANALYTICS_SET_UNSIGNED(stack_free_app_syscall_bytes, syscall_app_stack_free_bytes()); PBL_ANALYTICS_SET_UNSIGNED(stack_free_worker_syscall_bytes, syscall_worker_stack_free_bytes()); } @@ -200,8 +203,7 @@ void pbl_analytics_external_collect_task_cpu_stats(void) { uint32_t idle_delta = curr_idle_run_time - s_prev_idle_run_time; s_prev_idle_run_time = curr_idle_run_time; - uint32_t idle_pct = - delta_total ? (uint32_t)(((uint64_t)idle_delta * 10000U) / delta_total) : 0; + uint32_t idle_pct = delta_total ? (uint32_t)(((uint64_t)idle_delta * 10000U) / delta_total) : 0; PBL_ANALYTICS_SET_UNSIGNED(task_cpu_idle_pct, idle_pct); } @@ -316,12 +318,7 @@ void pebble_task_configure_idle_task(void) { false /* allow_user_access */); mpu_init_region_from_region(&worker_region, memory_layout_get_worker_region(), false /* allow_user_access */); - const MpuRegion *regions[PBL_THREAD_MAX_MEM_REGIONS] = { - &app_region, - &worker_region, - NULL, - NULL - }; + const MpuRegion *regions[PBL_THREAD_MAX_MEM_REGIONS] = {&app_region, &worker_region, NULL, NULL}; pbl_thread_regions_set(pbl_thread_idle(), regions); } @@ -334,10 +331,7 @@ void pbl_thread_stack_overflow(struct pbl_thread *thread, const char *name) { // a reboot. if ((task != PebbleTask_App) && (task != PebbleTask_Worker)) { PBL_LOG_SYNC_ERR("Stack overflow [task: %s]", name); - RebootReason reason = { - .code = RebootReasonCode_StackOverflow, - .data8[0] = task - }; + RebootReason reason = {.code = RebootReasonCode_StackOverflow, .data8[0] = task}; reboot_reason_set(&reason); reset_due_to_software_failure(); diff --git a/src/fw/kernel/pebble_tasks.h b/src/fw/kernel/pebble_tasks.h index 2b59986ff0..977da36a5c 100644 --- a/src/fw/kernel/pebble_tasks.h +++ b/src/fw/kernel/pebble_tasks.h @@ -34,14 +34,14 @@ typedef enum PebbleTask { typedef uint16_t PebbleTaskBitset; -_Static_assert((1 << (8*sizeof(PebbleTaskBitset))) >= (1 << NumPebbleTask), +_Static_assert((1 << (8 * sizeof(PebbleTaskBitset))) >= (1 << NumPebbleTask), "The type of PebbleTaskBitset is not wide enough to " "track all tasks in the PebbleTask enum"); void pebble_task_register(PebbleTask task, struct pbl_thread *thread); void pebble_task_unregister(PebbleTask task); -const char* pebble_task_get_name(PebbleTask task); +const char *pebble_task_get_name(PebbleTask task); //! @return a single character that indicates the task char pebble_task_get_char(PebbleTask task); diff --git a/src/fw/kernel/remote_input.c b/src/fw/kernel/remote_input.c index 89337cc34a..2d50997f75 100644 --- a/src/fw/kernel/remote_input.c +++ b/src/fw/kernel/remote_input.c @@ -56,11 +56,10 @@ static void prv_comm_session_event_handler(PebbleEvent *e, void *context) { } void remote_input_init(void) { - static EventServiceInfo s_comm_session_event_info; s_comm_session_event_info = (EventServiceInfo){ - .type = PEBBLE_COMM_SESSION_EVENT, - .handler = prv_comm_session_event_handler, + .type = PEBBLE_COMM_SESSION_EVENT, + .handler = prv_comm_session_event_handler, }; event_service_client_subscribe(&s_comm_session_event_info); } @@ -110,8 +109,8 @@ static RemoteInputResult prv_start_sequence(NewTimerCallback cb, void *context) static void prv_put_button_event(ButtonId button, bool down) { PebbleEvent event = { - .type = down ? PEBBLE_BUTTON_DOWN_EVENT : PEBBLE_BUTTON_UP_EVENT, - .button.button_id = button, + .type = down ? PEBBLE_BUTTON_DOWN_EVENT : PEBBLE_BUTTON_UP_EVENT, + .button.button_id = button, }; event_put(&event); } @@ -163,11 +162,11 @@ RemoteInputResult remote_input_button_press(ButtonId button, uint32_t presses, u return RemoteInputResult_Invalid; } *context = (ButtonPressContext){ - .button_id = button, - .button_is_held_down = false, - .presses_remaining = presses, - .hold_ms = hold_ms, - .gap_ms = gap_ms, + .button_id = button, + .button_is_held_down = false, + .presses_remaining = presses, + .hold_ms = hold_ms, + .gap_ms = gap_ms, }; // Drive the whole sequence from timer callbacks so the button events can't race the timers that @@ -227,7 +226,8 @@ RemoteInputResult remote_input_button_set(uint8_t buttons) { #define REMOTE_INPUT_SWIPE_TRAVEL_DEN 5 _Static_assert((MIN(DISP_COLS, DISP_ROWS) * REMOTE_INPUT_SWIPE_TRAVEL_NUM) / - REMOTE_INPUT_SWIPE_TRAVEL_DEN >= SWIPE_MIN_LENGTH_PX, + REMOTE_INPUT_SWIPE_TRAVEL_DEN >= + SWIPE_MIN_LENGTH_PX, "swipe travel is below the swipe recognizer's minimum length"); typedef struct SwipeContext { @@ -300,32 +300,32 @@ RemoteInputResult remote_input_swipe(RemoteInputSwipeDirection direction, uint16 const int16_t travel = (int16_t)((axis * REMOTE_INPUT_SWIPE_TRAVEL_NUM) / REMOTE_INPUT_SWIPE_TRAVEL_DEN); // The finger starts on the far side of centre and travels towards the named direction. - const int16_t sign = ((direction == RemoteInputSwipeDirection_Up) || - (direction == RemoteInputSwipeDirection_Left)) - ? -1 - : 1; + const int16_t sign = + ((direction == RemoteInputSwipeDirection_Up) || (direction == RemoteInputSwipeDirection_Left)) + ? -1 + : 1; const int16_t half = (int16_t)(travel / 2); // Round the per-step delta away from zero so the accumulated path never falls short of `travel`. - const int16_t step = (int16_t)(sign * ((travel + REMOTE_INPUT_SWIPE_STEPS - 1) / - REMOTE_INPUT_SWIPE_STEPS)); + const int16_t step = + (int16_t)(sign * ((travel + REMOTE_INPUT_SWIPE_STEPS - 1) / REMOTE_INPUT_SWIPE_STEPS)); SwipeContext *context = kernel_malloc(sizeof(SwipeContext)); if (!context) { return RemoteInputResult_Invalid; } *context = (SwipeContext){ - .x = (int16_t)(DISP_COLS / 2 - (vertical ? 0 : sign * half)), - .y = (int16_t)(DISP_ROWS / 2 - (vertical ? sign * half : 0)), - .step_dx = vertical ? 0 : step, - .step_dy = vertical ? step : 0, - .steps_remaining = REMOTE_INPUT_SWIPE_STEPS, - // The touchdown-to-liftoff time covers the position updates plus the liftoff that follows - // them. One divisor step beyond that count keeps the scheduled path strictly inside the - // requested duration: the recognizer measures the gesture in wall-clock time, so a path - // timed to land exactly on SWIPE_MAX_DURATION_MS would be rejected by any dispatch latency - // at all. At least 1ms per step, or the chained timers never separate the velocity samples. - .step_ms = MAX(1, duration_ms / (REMOTE_INPUT_SWIPE_STEPS + 2)), - .finger_down = false, + .x = (int16_t)(DISP_COLS / 2 - (vertical ? 0 : sign * half)), + .y = (int16_t)(DISP_ROWS / 2 - (vertical ? sign * half : 0)), + .step_dx = vertical ? 0 : step, + .step_dy = vertical ? step : 0, + .steps_remaining = REMOTE_INPUT_SWIPE_STEPS, + // The touchdown-to-liftoff time covers the position updates plus the liftoff that follows + // them. One divisor step beyond that count keeps the scheduled path strictly inside the + // requested duration: the recognizer measures the gesture in wall-clock time, so a path + // timed to land exactly on SWIPE_MAX_DURATION_MS would be rejected by any dispatch latency + // at all. At least 1ms per step, or the chained timers never separate the velocity samples. + .step_ms = MAX(1, duration_ms / (REMOTE_INPUT_SWIPE_STEPS + 2)), + .finger_down = false, }; const RemoteInputResult result = prv_start_sequence(prv_swipe_timer_cb, context); @@ -413,8 +413,8 @@ void remote_input_protocol_msg_callback(CommSession *session, const uint8_t *dat PBL_LOG_DBG("Remote input: cmd %u -> %u", command, result); const RemoteInputAck ack = { - .command = command, - .status = (uint8_t)result, + .command = command, + .status = (uint8_t)result, }; comm_session_send_data(session, REMOTE_INPUT_ENDPOINT, (const uint8_t *)&ack, sizeof(ack), COMM_SESSION_DEFAULT_TIMEOUT); diff --git a/src/fw/kernel/reset.c b/src/fw/kernel/reset.c index bf470a89b0..67028a4b4a 100644 --- a/src/fw/kernel/reset.c +++ b/src/fw/kernel/reset.c @@ -34,8 +34,7 @@ NORETURN system_reset(void) { // Skip safe teardown if doing so the first time already caused a second reset attempt; or // if we're in a critical section, interrupt or if the scheduler has been suspended - if (!already_failed && !mcu_state_is_isr() && !pbl_irq_is_locked() && - (pbl_kernel_is_running())) { + if (!already_failed && !mcu_state_is_isr() && !pbl_irq_is_locked() && (pbl_kernel_is_running())) { system_reset_prepare(); reboot_reason_set_restarted_safely(); } @@ -65,4 +64,3 @@ NORETURN system_hard_reset(void) { __builtin_unreachable(); } - diff --git a/src/fw/kernel/system_message.c b/src/fw/kernel/system_message.c index c5c80bbce2..1406b8c9e4 100644 --- a/src/fw/kernel/system_message.c +++ b/src/fw/kernel/system_message.c @@ -22,15 +22,16 @@ static const uint16_t ENDPOINT_ID = 0x12; void system_message_send(SystemMessageType type) { - uint8_t buffer[2] = { 0x00, type }; + uint8_t buffer[2] = {0x00, type}; CommSession *system_session = comm_session_get_system_session(); - comm_session_send_data(system_session, ENDPOINT_ID, buffer, sizeof(buffer), COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(system_session, ENDPOINT_ID, buffer, sizeof(buffer), + COMM_SESSION_DEFAULT_TIMEOUT); PBL_LOG_DBG("Sending sysmsg: %u", type); } static void prv_reset_kernel_bg_cb(void *unused) { PBL_LOG_ALWAYS("Rebooting to install firmware..."); - RebootReason reason = { RebootReasonCode_SoftwareUpdate, 0 }; + RebootReason reason = {RebootReasonCode_SoftwareUpdate, 0}; reboot_reason_set(&reason); system_reset(); } @@ -54,18 +55,18 @@ static void prv_handle_firmware_complete_msg(void) { extern bool pb_storage_get_status(PutBytesObjectType obj_type, PbInstallStatus *status); static void prv_handle_firmware_status_request(CommSession *session) { struct PACKED { - uint8_t deprecated; - uint8_t type; - uint8_t rsvd[2]; + uint8_t deprecated; + uint8_t type; + uint8_t rsvd[2]; uint32_t resource_bytes_written; uint32_t resource_crc; uint32_t firmware_bytes_written; uint32_t firmware_crc; } fw_status_resp = { - .type = SysMsgFirmwareStatusResponse, + .type = SysMsgFirmwareStatusResponse, }; - PbInstallStatus status = { }; + PbInstallStatus status = {}; if (pb_storage_get_status(ObjectFirmware, &status)) { fw_status_resp.firmware_bytes_written = status.num_bytes_written; fw_status_resp.firmware_crc = status.crc_of_bytes; @@ -76,15 +77,15 @@ static void prv_handle_firmware_status_request(CommSession *session) { fw_status_resp.resource_crc = status.crc_of_bytes; } - PBL_LOG_DBG("FW Status Resp: res %"PRIu32" : 0x%x fw %"PRIu32" : 0x%x", - fw_status_resp.resource_bytes_written, (int)fw_status_resp.resource_crc, - fw_status_resp.firmware_bytes_written, (int)fw_status_resp.firmware_crc); + PBL_LOG_DBG("FW Status Resp: res %" PRIu32 " : 0x%x fw %" PRIu32 " : 0x%x", + fw_status_resp.resource_bytes_written, (int)fw_status_resp.resource_crc, + fw_status_resp.firmware_bytes_written, (int)fw_status_resp.firmware_crc); comm_session_send_data(session, ENDPOINT_ID, (uint8_t *)&fw_status_resp, sizeof(fw_status_resp), COMM_SESSION_DEFAULT_TIMEOUT); } -void sys_msg_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length) { +void sys_msg_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length) { PBL_ASSERT_RUNNING_FROM_EXPECTED_TASK(PebbleTask_KernelBackground); SystemMessageType t = data[1]; @@ -92,80 +93,80 @@ void sys_msg_protocol_msg_callback(CommSession *session, const uint8_t* data, si PBL_LOG_DBG("Received sysmsg: %u", t); switch (t) { - case SysMsgFirmwareAvailable_Deprecated: { - PBL_LOG_DBG("Deprecated available message received."); - break; - } + case SysMsgFirmwareAvailable_Deprecated: { + PBL_LOG_DBG("Deprecated available message received."); + break; + } - case SysMsgFirmwareStart: { - PBL_LOG_VERBOSE("About to receive new firmware!"); + case SysMsgFirmwareStart: { + PBL_LOG_VERBOSE("About to receive new firmware!"); - uint32_t bytes_transferred = 0; - uint32_t total_size = 0; + uint32_t bytes_transferred = 0; + uint32_t total_size = 0; - bool smooth_progress_supported = - comm_session_has_capability(session, CommSessionSmoothFwInstallProgressSupport) && - (length >= sizeof(SysMsgSmoothFirmwareStartPayload)); + bool smooth_progress_supported = + comm_session_has_capability(session, CommSessionSmoothFwInstallProgressSupport) && + (length >= sizeof(SysMsgSmoothFirmwareStartPayload)); - if (smooth_progress_supported) { - SysMsgSmoothFirmwareStartPayload *payload = (SysMsgSmoothFirmwareStartPayload *)data; - bytes_transferred = payload->bytes_already_transferred; - total_size = bytes_transferred + payload->bytes_to_transfer; - PBL_LOG_INFO("Starting FW update, %"PRIu32" of %"PRIu32" bytes already transferred", - bytes_transferred, total_size); - } - - PebbleEvent e = { - .type = PEBBLE_SYSTEM_MESSAGE_EVENT, - .firmware_update = { - .type = smooth_progress_supported ? - PebbleSystemMessageFirmwareUpdateStart : PebbleSystemMessageFirmwareUpdateStartLegacy, - .bytes_transferred = bytes_transferred, - .total_transfer_size = total_size, + if (smooth_progress_supported) { + SysMsgSmoothFirmwareStartPayload *payload = (SysMsgSmoothFirmwareStartPayload *)data; + bytes_transferred = payload->bytes_already_transferred; + total_size = bytes_transferred + payload->bytes_to_transfer; + PBL_LOG_INFO("Starting FW update, %" PRIu32 " of %" PRIu32 " bytes already transferred", + bytes_transferred, total_size); } - }; - event_put(&e); - break; - } - case SysMsgFirmwareStatus: - prv_handle_firmware_status_request(session); - break; - - case SysMsgFirmwareComplete: { - PBL_LOG_VERBOSE("Firmware transfer succeeded, okay to restart!"); - PebbleEvent e = { - .type = PEBBLE_SYSTEM_MESSAGE_EVENT, - .firmware_update.type = PebbleSystemMessageFirmwareUpdateComplete, - }; - event_put(&e); - prv_handle_firmware_complete_msg(); - break; - } + PebbleEvent e = { + .type = PEBBLE_SYSTEM_MESSAGE_EVENT, + .firmware_update = { + .type = smooth_progress_supported ? PebbleSystemMessageFirmwareUpdateStart + : PebbleSystemMessageFirmwareUpdateStartLegacy, + .bytes_transferred = bytes_transferred, + .total_transfer_size = total_size, + } + }; + event_put(&e); + break; + } - case SysMsgFirmwareFail: { - PBL_LOG_VERBOSE("Firmware transfer failed, time to clean up!"); - PebbleEvent e = { - .type = PEBBLE_SYSTEM_MESSAGE_EVENT, - .firmware_update.type = PebbleSystemMessageFirmwareUpdateFailed, - }; - event_put(&e); - break; - } + case SysMsgFirmwareStatus: + prv_handle_firmware_status_request(session); + break; + + case SysMsgFirmwareComplete: { + PBL_LOG_VERBOSE("Firmware transfer succeeded, okay to restart!"); + PebbleEvent e = { + .type = PEBBLE_SYSTEM_MESSAGE_EVENT, + .firmware_update.type = PebbleSystemMessageFirmwareUpdateComplete, + }; + event_put(&e); + prv_handle_firmware_complete_msg(); + break; + } - case SysMsgFirmwareUpToDate: { - PBL_LOG_VERBOSE("Firmware is up to date!"); - PebbleEvent e = { - .type = PEBBLE_SYSTEM_MESSAGE_EVENT, - .firmware_update.type = PebbleSystemMessageFirmwareUpToDate, - }; - event_put(&e); - break; - } + case SysMsgFirmwareFail: { + PBL_LOG_VERBOSE("Firmware transfer failed, time to clean up!"); + PebbleEvent e = { + .type = PEBBLE_SYSTEM_MESSAGE_EVENT, + .firmware_update.type = PebbleSystemMessageFirmwareUpdateFailed, + }; + event_put(&e); + break; + } - default: - PBL_LOG_ERR("Invalid message received, type is %u", data[1]); - break; + case SysMsgFirmwareUpToDate: { + PBL_LOG_VERBOSE("Firmware is up to date!"); + PebbleEvent e = { + .type = PEBBLE_SYSTEM_MESSAGE_EVENT, + .firmware_update.type = PebbleSystemMessageFirmwareUpToDate, + }; + event_put(&e); + break; + } + + default: + PBL_LOG_ERR("Invalid message received, type is %u", data[1]); + break; } } @@ -174,12 +175,9 @@ void system_message_send_firmware_start_response(FirmwareUpdateStatus status) { uint8_t zero; uint8_t type; uint8_t status; - } msg = { - .zero = 0x00, - .type = SysMsgFirmwareStartResponse, - .status = status - }; + } msg = {.zero = 0x00, .type = SysMsgFirmwareStartResponse, .status = status}; CommSession *session = comm_session_get_system_session(); - comm_session_send_data(session, ENDPOINT_ID, (const uint8_t*) &msg, sizeof(msg), COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(session, ENDPOINT_ID, (const uint8_t *)&msg, sizeof(msg), + COMM_SESSION_DEFAULT_TIMEOUT); } diff --git a/src/fw/kernel/system_message.h b/src/fw/kernel/system_message.h index 187de5b257..e8dcca12bb 100644 --- a/src/fw/kernel/system_message.h +++ b/src/fw/kernel/system_message.h @@ -16,16 +16,16 @@ typedef enum SystemMessageType { // SysMsgFirmWareOutOfDate = 0x05, DEPRECATED SysMsgReconnectRequestStop = 0x06, SysMsgReconnectRequestStart = 0x07, - SysMsgMAPRetry = 0x08, // MAP is no longer used + SysMsgMAPRetry = 0x08, // MAP is no longer used SysMsgMAPConnected = 0x09, // MAP is no longer used SysMsgFirmwareStartResponse = 0x0a, - SysMsgFirmwareStatus = 0x0b, // Phone -> Watch request for partial fw install info - SysMsgFirmwareStatusResponse = 0x0c, // Watch -> Phone response of what fw is partially installed + SysMsgFirmwareStatus = 0x0b, // Phone -> Watch request for partial fw install info + SysMsgFirmwareStatusResponse = 0x0c, // Watch -> Phone response of what fw is partially installed } SystemMessageType; typedef struct PACKED SysMsgSmoothFirmwareStartPayload { - uint8_t deprecated; // not used anymore but all messages start with 0x0 - SystemMessageType type:8; // == SysMsgFirmwareStart + uint8_t deprecated; // not used anymore but all messages start with 0x0 + SystemMessageType type : 8; // == SysMsgFirmwareStart // The number of bytes the phone has transferred in a previous operation uint32_t bytes_already_transferred; // The total number of bytes the phone needs to transfer to complete the firmware update @@ -39,4 +39,3 @@ void system_message_init(void); void system_message_send(SystemMessageType type); void system_message_send_firmware_start_response(FirmwareUpdateStatus status); - diff --git a/src/fw/kernel/system_versions.c b/src/fw/kernel/system_versions.c index a556484fe7..ed300d138f 100644 --- a/src/fw/kernel/system_versions.c +++ b/src/fw/kernel/system_versions.c @@ -52,7 +52,7 @@ struct PACKED VersionsMessage { net16 javascript_bytecode_version; }; -static void fixup_string(char* str, unsigned int length) { +static void fixup_string(char *str, unsigned int length) { if (memchr(str, 0, length) == NULL) { memset(str, 0, length); } @@ -84,14 +84,14 @@ static void resource_version_to_network_endian(ResourceVersion *resources_versio static void prv_send_watch_versions(CommSession *session) { struct VersionsMessage versions_msg = { - .command = VERSION_RESPONSE, - .boot_version = htonl(boot_version_read()), + .command = VERSION_RESPONSE, + .boot_version = htonl(boot_version_read()), }; _Static_assert(sizeof(struct VersionsMessage) >= - 126 /* pre-v1.5 version info */ + - 24 /* v1.5 version info or later, added system_resources_version */, - ""); + 126 /* pre-v1.5 version info */ + + 24 /* v1.5 version info or later, added system_resources_version */, + ""); version_copy_running_fw_metadata(&versions_msg.running_fw_metadata); prv_fixup_running_firmware_metadata(&versions_msg.running_fw_metadata); @@ -99,7 +99,8 @@ static void prv_send_watch_versions(CommSession *session) { version_copy_recovery_fw_metadata(&versions_msg.recovery_fw_metadata); prv_fixup_firmware_metadata(&versions_msg.recovery_fw_metadata); - // Note: Don't worry about the null terminator if it doesn't fit, the other side should deal with it. + // Note: Don't worry about the null terminator if it doesn't fit, the other side should deal with + // it. mfg_info_get_hw_version(versions_msg.hw_version, sizeof(versions_msg.hw_version)); mfg_info_get_serialnumber(versions_msg.serial_number, sizeof(versions_msg.serial_number)); @@ -151,19 +152,20 @@ static void prv_send_watch_versions(CommSession *session) { versions_msg.activity_insights_version = hton16(activity_insights_settings_get_version()); #endif - comm_session_send_data(session, s_endpoint_id, (uint8_t*) &versions_msg, sizeof(versions_msg), + comm_session_send_data(session, s_endpoint_id, (uint8_t *)&versions_msg, sizeof(versions_msg), COMM_SESSION_DEFAULT_TIMEOUT); } -void system_version_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length) { +void system_version_protocol_msg_callback(CommSession *session, const uint8_t *data, + size_t length) { switch (data[0]) { - case VERSION_REQUEST: { - prv_send_watch_versions(session); - break; - } - default: - PBL_LOG_ERR("Invalid message received. First byte is %u", data[0]); - break; + case VERSION_REQUEST: { + prv_send_watch_versions(session); + break; + } + default: + PBL_LOG_ERR("Invalid message received. First byte is %u", data[0]); + break; } } @@ -172,8 +174,8 @@ void command_version_info(void) { prompt_send_response("MANUFACTURING FW"); #endif - bool (*fun_ptr[2])(FirmwareMetadata*) = { version_copy_running_fw_metadata, - version_copy_recovery_fw_metadata}; + bool (*fun_ptr[2])( + FirmwareMetadata *) = {version_copy_running_fw_metadata, version_copy_recovery_fw_metadata}; const char *label[2] = {"Running", "Recovery"}; FirmwareMetadata fw_metadata; @@ -183,9 +185,9 @@ void command_version_info(void) { if (success) { prompt_send_response_fmt( buffer, sizeof(buffer), - "%s FW:\n ts:%"PRIu32"\n tag:%s\n short:%s\n recov:%u\n platform:%u", - label[i], fw_metadata.version_timestamp, fw_metadata.version_tag, - fw_metadata.version_short, fw_metadata.is_recovery_firmware, fw_metadata.hw_platform); + "%s FW:\n ts:%" PRIu32 "\n tag:%s\n short:%s\n recov:%u\n platform:%u", label[i], + fw_metadata.version_timestamp, fw_metadata.version_tag, fw_metadata.version_short, + fw_metadata.is_recovery_firmware, fw_metadata.hw_platform); if ((i == 0) && fw_metadata.is_dual_slot) { prompt_send_response_fmt(buffer, sizeof(buffer), " dual slot"); @@ -214,19 +216,18 @@ void command_version_info(void) { size_t mcu_serial_size = sizeof(mcu_serial); StatusCode err = mcu_get_serial(mcu_serial, &mcu_serial_size); if (err != S_SUCCESS) { - prompt_send_response_fmt(buffer, sizeof(buffer), - "MCU Serial: N/A (%d)", err); + prompt_send_response_fmt(buffer, sizeof(buffer), "MCU Serial: N/A (%d)", err); } else { char serial_str[sizeof(mcu_serial) * 2 + 1]; byte_stream_to_hex_string(serial_str, sizeof(serial_str), mcu_serial, mcu_serial_size, false); prompt_send_response_fmt(buffer, sizeof(buffer), "MCU Serial: %s", serial_str); } - prompt_send_response_fmt(buffer, sizeof(buffer), "Boot:0x%08"PRIx32"\nHW:%s\nSN:%s", + prompt_send_response_fmt(buffer, sizeof(buffer), "Boot:0x%08" PRIx32 "\nHW:%s\nSN:%s", boot_version_read(), hw_version, serial_number); ResourceVersion system_resources_version = resource_get_system_version(); prompt_send_response_fmt(buffer, sizeof(buffer), - "System Resources:\n CRC:0x%"PRIx32"\n Valid:%s", + "System Resources:\n CRC:0x%" PRIx32 "\n Valid:%s", system_resources_version.crc, bool_to_str(system_resource_is_valid())); } diff --git a/src/fw/kernel/task_timer.c b/src/fw/kernel/task_timer.c index b152d23a1c..0555d44aeb 100644 --- a/src/fw/kernel/task_timer.c +++ b/src/fw/kernel/task_timer.c @@ -14,7 +14,6 @@ #include "pbl/kernel/sem.h" - // Structure of a timer typedef struct TaskTimer { //! Entry into either the running timers (manager->running_timers) list or the idle timers @@ -27,21 +26,21 @@ typedef struct TaskTimer { RtcTicks period_ticks; - TaskTimerID id; // b), positive for an ascending value (b > a), // 0 for equal -static int prv_timer_expire_compare_func(void* a, void* b) { - if (((TaskTimer*)b)->expire_time < ((TaskTimer*)a)->expire_time) { +static int prv_timer_expire_compare_func(void *a, void *b) { + if (((TaskTimer *)b)->expire_time < ((TaskTimer *)a)->expire_time) { return -1; - } else if (((TaskTimer*)b)->expire_time > ((TaskTimer*)a)->expire_time) { + } else if (((TaskTimer *)b)->expire_time > ((TaskTimer *)a)->expire_time) { return 1; } else { return 0; } } - // ------------------------------------------------------------------------------------ // Find timer by id -static bool prv_id_list_filter(ListNode* node, void* data) { - TaskTimer* timer = (TaskTimer*)node; - return timer->id == (uint32_t) data; +static bool prv_id_list_filter(ListNode *node, void *data) { + TaskTimer *timer = (TaskTimer *)node; + return timer->id == (uint32_t)data; } -static TaskTimer* prv_find_timer(TaskTimerManager *manager, TaskTimerID timer_id) { +static TaskTimer *prv_find_timer(TaskTimerManager *manager, TaskTimerID timer_id) { PBL_ASSERTN(timer_id != TASK_TIMER_INVALID_ID); // Look for this timer in either the running or idle list - ListNode* node = list_find(manager->running_timers, prv_id_list_filter, (void*)timer_id); + ListNode *node = list_find(manager->running_timers, prv_id_list_filter, (void *)timer_id); if (!node) { - node = list_find(manager->idle_timers, prv_id_list_filter, (void*)timer_id); + node = list_find(manager->idle_timers, prv_id_list_filter, (void *)timer_id); } PBL_ASSERTN(node); return (TaskTimer *)node; } - // ======================================================================================= // Client-side Implementation @@ -129,8 +126,8 @@ TaskTimerID task_timer_create(TaskTimerManager *manager) { // Grab lock on timer structures, create a unique ID for this timer and put it into our idle // timers list pbl_mutex_lock(&manager->mutex, PBL_FOREVER); - *timer = (TaskTimer) { - .id = manager->next_id++, + *timer = (TaskTimer){ + .id = manager->next_id++, }; // We don't expect to wrap around, this would take over 100 years if we allocated a timer every @@ -143,11 +140,10 @@ TaskTimerID task_timer_create(TaskTimerManager *manager) { return timer->id; } - // -------------------------------------------------------------------------------- // Schedule a timer to run. -bool task_timer_start(TaskTimerManager *manager, TaskTimerID timer_id, - uint32_t timeout_ms, TaskTimerCallback cb, void *cb_data, uint32_t flags) { +bool task_timer_start(TaskTimerManager *manager, TaskTimerID timer_id, uint32_t timeout_ms, + TaskTimerCallback cb, void *cb_data, uint32_t flags) { pbl_tick_t timeout_ticks = pbl_ms_to_ticks(timeout_ms); RtcTicks current_time = rtc_get_ticks(); @@ -155,7 +151,7 @@ bool task_timer_start(TaskTimerManager *manager, TaskTimerID timer_id, pbl_mutex_lock(&manager->mutex, PBL_FOREVER); // Find this timer - TaskTimer* timer = prv_find_timer(manager, timer_id); + TaskTimer *timer = prv_find_timer(manager, timer_id); PBL_ASSERTN(!timer->defer_delete); // If this timer is currently executing it's callback, return false if @@ -199,14 +195,13 @@ bool task_timer_start(TaskTimerManager *manager, TaskTimerID timer_id, return true; } - // -------------------------------------------------------------------------------- // Return scheduled status bool task_timer_scheduled(TaskTimerManager *manager, TaskTimerID timer_id, uint32_t *expire_ms_p) { pbl_mutex_lock(&manager->mutex, PBL_FOREVER); // Find this timer in our list - TaskTimer* timer = prv_find_timer(manager, timer_id); + TaskTimer *timer = prv_find_timer(manager, timer_id); PBL_ASSERTN(!timer->defer_delete); // If expire timer is not 0, it means we are scheduled @@ -216,7 +211,7 @@ bool task_timer_scheduled(TaskTimerManager *manager, TaskTimerID timer_id, uint3 if (expire_ms_p != NULL && retval) { RtcTicks current_ticks = rtc_get_ticks(); if (timer->expire_time > current_ticks) { - *expire_ms_p = ((timer->expire_time - current_ticks) * 1000) / PBL_TICK_HZ; + *expire_ms_p = ((timer->expire_time - current_ticks) * 1000) / PBL_TICK_HZ; } else { *expire_ms_p = 0; } @@ -226,14 +221,13 @@ bool task_timer_scheduled(TaskTimerManager *manager, TaskTimerID timer_id, uint3 return retval; } - // -------------------------------------------------------------------------------- // Stop a timer. If the timer callback is currently executing, return false, else return true. bool task_timer_stop(TaskTimerManager *manager, TaskTimerID timer_id) { pbl_mutex_lock(&manager->mutex, PBL_FOREVER); // Find this timer in our list - TaskTimer* timer = prv_find_timer(manager, timer_id); + TaskTimer *timer = prv_find_timer(manager, timer_id); PBL_ASSERTN(!timer->defer_delete); // Move it to the idle list if it's currently running @@ -252,14 +246,13 @@ bool task_timer_stop(TaskTimerManager *manager, TaskTimerID timer_id) { return (!timer->executing); } - // -------------------------------------------------------------------------------- // Delete a timer void task_timer_delete(TaskTimerManager *manager, TaskTimerID timer_id) { pbl_mutex_lock(&manager->mutex, PBL_FOREVER); // Find this timer in our list - TaskTimer* timer = prv_find_timer(manager, timer_id); + TaskTimer *timer = prv_find_timer(manager, timer_id); // If it's already marked for deletion return if (timer->defer_delete) { @@ -274,7 +267,7 @@ void task_timer_delete(TaskTimerManager *manager, TaskTimerID timer_id) { list_remove(&timer->list_node, &manager->running_timers /* &head */, NULL /* &tail */); manager->idle_timers = list_insert_before(manager->idle_timers, &timer->list_node); } - timer->repeating = false; // In case it's currently executing, make sure we don't reschedule it + timer->repeating = false; // In case it's currently executing, make sure we don't reschedule it // If it's currently executing, defer the delete till after the callback returns. The next call // to task_timer_manager_execute_expired_timers service loop will take care of this for us. @@ -289,22 +282,20 @@ void task_timer_delete(TaskTimerManager *manager, TaskTimerID timer_id) { } } - void task_timer_manager_init(TaskTimerManager *manager, struct pbl_sem *semaphore) { prv_pool_init(); - *manager = (TaskTimerManager) { - // Initialize next id to be a number that's theoretically unique per-task - .next_id = (pebble_task_get_current() << 28) + 1, - .semaphore = semaphore + *manager = (TaskTimerManager){ + // Initialize next id to be a number that's theoretically unique per-task + .next_id = (pebble_task_get_current() << 28) + 1, + .semaphore = semaphore }; pbl_mutex_init(&manager->mutex); // The above shift assumes next_id is a 32-bit int and there are fewer than 16 tasks. - _Static_assert(sizeof(((TaskTimerManager*)0)->next_id) == 4, "next_id is not the right width"); + _Static_assert(sizeof(((TaskTimerManager *)0)->next_id) == 4, "next_id is not the right width"); _Static_assert(NumPebbleTask < 16, "Too many tasks"); } - pbl_tick_t task_timer_manager_execute_expired_timers(TaskTimerManager *manager) { while (1) { pbl_tick_t ticks_to_wait = 0; @@ -315,7 +306,7 @@ pbl_tick_t task_timer_manager_execute_expired_timers(TaskTimerManager *manager) // If no timer is ready yet, then ticks_to_wait will be > 0. pbl_mutex_lock(&manager->mutex, PBL_FOREVER); - TaskTimer *next_timer = (TaskTimer*) manager->running_timers; + TaskTimer *next_timer = (TaskTimer *)manager->running_timers; if (next_timer != NULL) { next_expiry_time = next_timer->expire_time; RtcTicks current_time = rtc_get_ticks(); @@ -332,11 +323,10 @@ pbl_tick_t task_timer_manager_execute_expired_timers(TaskTimerManager *manager) // If we fell way behind (at least 1 timer period + 5 seconds) on a repeating timer // (presumably because we were in the debugger) advance next_expiry_time so that we don't // need to call this callback more than twice in a row in order to catch up. - if (next_timer->repeating - && (int64_t)next_expiry_time < (int64_t)(current_time - next_timer->period_ticks - - 5 * RTC_TICKS_HZ)) { - PBL_LOG_WRN("NT: Skipping some callbacks for %p because we fell behind", - next_timer->cb); + if (next_timer->repeating && + (int64_t)next_expiry_time < + (int64_t)(current_time - next_timer->period_ticks - 5 * RTC_TICKS_HZ)) { + PBL_LOG_WRN("NT: Skipping some callbacks for %p because we fell behind", next_timer->cb); } } else { // The next timer hasn't expired yet. Update @@ -385,6 +375,6 @@ pbl_tick_t task_timer_manager_execute_expired_timers(TaskTimerManager *manager) } } -void* task_timer_manager_get_current_cb(const TaskTimerManager *manager) { +void *task_timer_manager_get_current_cb(const TaskTimerManager *manager) { return manager->current_cb; } diff --git a/src/fw/kernel/task_timer.h b/src/fw/kernel/task_timer.h index d2c475794d..d01415f351 100644 --- a/src/fw/kernel/task_timer.h +++ b/src/fw/kernel/task_timer.h @@ -33,9 +33,9 @@ typedef void (*TaskTimerCallback)(void *data); //! //! TIMER_START_FLAG_FAIL_IF_SCHEDULED If the timer is already scheduled, do not reschedule it and //! return false from task_timer_start. -#define TIMER_START_FLAG_REPEATING 0x01 -#define TIMER_START_FLAG_FAIL_IF_EXECUTING 0x02 -#define TIMER_START_FLAG_FAIL_IF_SCHEDULED 0x04 +#define TIMER_START_FLAG_REPEATING 0x01 +#define TIMER_START_FLAG_FAIL_IF_EXECUTING 0x02 +#define TIMER_START_FLAG_FAIL_IF_SCHEDULED 0x04 //! Creates a new timer object. This timer will start out in the stopped state. //! @return the non-zero timer id or TIMER_INVALID_ID if OOM diff --git a/src/fw/kernel/task_timer_manager.h b/src/fw/kernel/task_timer_manager.h index 4c6599e6cd..c49b939b4f 100644 --- a/src/fw/kernel/task_timer_manager.h +++ b/src/fw/kernel/task_timer_manager.h @@ -28,7 +28,6 @@ typedef struct TaskTimerManager { void *current_cb; } TaskTimerManager; - //! Initialize a passed in manager object. //! @param[in] manager The manager object to initialize //! @param[in] semaphore a semaphore the TaskTimerManager should give if the next expiring timer @@ -45,4 +44,4 @@ pbl_tick_t task_timer_manager_execute_expired_timers(TaskTimerManager *manager); //! its stuck on. //! @return A pointer to the current callback that's running, NULL if no callback //! is currently running. -void* task_timer_manager_get_current_cb(const TaskTimerManager *manager); +void *task_timer_manager_get_current_cb(const TaskTimerManager *manager); diff --git a/src/fw/kernel/ui/kernel_ui.c b/src/fw/kernel/ui/kernel_ui.c index 38a4dd9a74..b822bc31ee 100644 --- a/src/fw/kernel/ui/kernel_ui.c +++ b/src/fw/kernel/ui/kernel_ui.c @@ -25,7 +25,7 @@ void kernel_ui_init(void) { s_kernel_current_timeline_item_action_source = TimelineItemActionSourceModalNotification; } -GContext* kernel_ui_get_graphics_context(void) { +GContext *kernel_ui_get_graphics_context(void) { PBL_ASSERT_TASK(PebbleTask_KernelMain); return &s_kernel_graphics_context; diff --git a/src/fw/kernel/ui/kernel_ui.h b/src/fw/kernel/ui/kernel_ui.h index 30b2c721c1..11e9555f2d 100644 --- a/src/fw/kernel/ui/kernel_ui.h +++ b/src/fw/kernel/ui/kernel_ui.h @@ -9,7 +9,7 @@ void kernel_ui_init(void); -GContext* kernel_ui_get_graphics_context(void); +GContext *kernel_ui_get_graphics_context(void); GContext *graphics_context_get_current_context(void); diff --git a/src/fw/kernel/ui/modals/modal_manager.c b/src/fw/kernel/ui/modals/modal_manager.c index 62365e28df..b9408edf67 100644 --- a/src/fw/kernel/ui/modals/modal_manager.c +++ b/src/fw/kernel/ui/modals/modal_manager.c @@ -97,10 +97,10 @@ static void prv_send_will_focus_event(bool in_focus) { s_focus_lost = in_focus; PebbleEvent event = { - .type = PEBBLE_APP_WILL_CHANGE_FOCUS_EVENT, - .app_focus = { - .in_focus = in_focus, - } + .type = PEBBLE_APP_WILL_CHANGE_FOCUS_EVENT, + .app_focus = { + .in_focus = in_focus, + } }; event_put(&event); } @@ -154,13 +154,13 @@ static void prv_modal_touch_nav_idle_refresh(void *ctx) { } static const TouchNavOps s_modal_touch_nav_ops = { - .is_animating = prv_modal_touch_nav_is_animating, - .top_overrides_back = prv_modal_touch_nav_top_overrides_back, - .top_tap_requires_action_bar = prv_modal_touch_nav_top_tap_requires_action_bar, - .top_bridge_disabled = prv_modal_touch_nav_top_bridge_disabled, - .pop_top = prv_modal_touch_nav_pop_top, - .emit_button = prv_modal_touch_nav_emit_button, - .idle_refresh = prv_modal_touch_nav_idle_refresh, + .is_animating = prv_modal_touch_nav_is_animating, + .top_overrides_back = prv_modal_touch_nav_top_overrides_back, + .top_tap_requires_action_bar = prv_modal_touch_nav_top_tap_requires_action_bar, + .top_bridge_disabled = prv_modal_touch_nav_top_bridge_disabled, + .pop_top = prv_modal_touch_nav_pop_top, + .emit_button = prv_modal_touch_nav_emit_button, + .idle_refresh = prv_modal_touch_nav_idle_refresh, }; RecognizerManager *modal_manager_get_recognizer_manager(void) { @@ -175,13 +175,12 @@ TouchNavState *modal_manager_get_touch_nav_state(void) { // predicate the button path uses in the kernel event loop to decide whether to route input to the // modal twin instead of the app. static bool prv_modal_is_focused(void) { - return modal_manager_get_enabled() && - !(modal_manager_get_properties() & ModalProperty_Unfocused); + return modal_manager_get_enabled() && !(modal_manager_get_properties() & ModalProperty_Unfocused); } -// Point the kernel recognizer manager at \a window (NULL to unbind), dropping any in-flight gesture. -// Mirrors window_became_input_focus / window_lost_input_focus for the app manager. Used for the -// cross-stack modal focus changes that bypass the per-stack window transitions. +// Point the kernel recognizer manager at \a window (NULL to unbind), dropping any in-flight +// gesture. Mirrors window_became_input_focus / window_lost_input_focus for the app manager. Used +// for the cross-stack modal focus changes that bypass the per-stack window transitions. static void prv_modal_recognizer_focus(Window *window) { recognizer_manager_cancel_and_reset(&s_modal_recognizer_manager); recognizer_manager_set_window(&s_modal_recognizer_manager, window); @@ -272,8 +271,7 @@ Window *modal_manager_get_top_window(void) { static void prv_pop_stacks_in_range(ModalPriority low, ModalPriority high) { // Discreet modals are transparent and unfocusable, they are not meant to be popped when // requesting opaque focusable modals to pop. - for (ModalPriority priority = MAX(low, ModalPriorityDiscreet + 1); priority <= high; - priority++) { + for (ModalPriority priority = MAX(low, ModalPriorityDiscreet + 1); priority <= high; priority++) { ModalContext *m_context = &s_modal_window_stacks[priority]; window_stack_pop_all(&m_context->window_stack, true /* animated */); } @@ -409,10 +407,10 @@ typedef bool (*ModalContextIterCallback)(ModalContext *modal, IterContext *iter, static void prv_each_modal_stack(ModalContextIterCallback callback, void *data) { IterContext iter = { - .first_visible_idx = ModalPriorityInvalid, - .first_transition_idx = ModalPriorityInvalid, - .first_focus_idx = ModalPriorityInvalid, - .first_opaque_idx = ModalPriorityInvalid, + .first_visible_idx = ModalPriorityInvalid, + .first_transition_idx = ModalPriorityInvalid, + .first_focus_idx = ModalPriorityInvalid, + .first_opaque_idx = ModalPriorityInvalid, }; for (ModalPriority idx = NumModalPriorities - 1; idx >= ModalPriorityMin; idx--) { ModalContext *context = &s_modal_window_stacks[idx]; @@ -524,8 +522,7 @@ static bool prv_render_modal_stack_callback(ModalContext *modal, IterContext *it WindowStack *stack = &modal->window_stack; Window *window = iter->current_top_window; - if (window_stack_is_animating(stack) && - stack->transition_context.implementation && + if (window_stack_is_animating(stack) && stack->transition_context.implementation && stack->transition_context.implementation->render) { // a lot of safety guards to make sure the transition can do render by its own WindowTransitioningContext *const transition_context = &stack->transition_context; @@ -570,7 +567,7 @@ static bool prv_is_window_visible_callback(ModalContext *modal, IterContext *ite } bool modal_manager_is_window_visible(Window *window) { - VisibleContext context = { .window = window }; + VisibleContext context = {.window = window}; prv_each_modal_stack(prv_is_window_visible_callback, &context); return context.visible; } @@ -582,13 +579,13 @@ typedef struct FocusedContext { static bool prv_is_window_focused_callback(ModalContext *modal, IterContext *iter, void *data) { FocusedContext *ctx = data; - ctx->focused = ((iter->current_top_window == ctx->window) && - (iter->current_idx == iter->first_focus_idx)); + ctx->focused = + ((iter->current_top_window == ctx->window) && (iter->current_idx == iter->first_focus_idx)); return !ctx->focused; } bool modal_manager_is_window_focused(Window *window) { - FocusedContext context = { .window = window }; + FocusedContext context = {.window = window}; prv_each_modal_stack(prv_is_window_focused_callback, &context); return context.focused; } @@ -645,12 +642,9 @@ typedef struct WindowStackInfoContext { static void prv_modal_window_stack_info_cb(void *ctx) { WindowStackInfoContext *info = ctx; if (modal_manager_get_enabled()) { - for (ModalPriority priority = 0; - priority < NumModalPriorities; - ++priority) { + for (ModalPriority priority = 0; priority < NumModalPriorities; ++priority) { WindowStack *window_stack = modal_manager_get_window_stack(priority); - info->counts[priority] = window_stack_dump(window_stack, - &info->dumps[priority]); + info->counts[priority] = window_stack_dump(window_stack, &info->dumps[priority]); } } else { info->disabled = true; @@ -659,7 +653,7 @@ static void prv_modal_window_stack_info_cb(void *ctx) { } void command_modal_stack_info(void) { - WindowStackInfoContext info = { 0 }; + WindowStackInfoContext info = {0}; pbl_sem_init(&info.interlock, 0, 1); launcher_task_add_callback(prv_modal_window_stack_info_cb, &info); @@ -669,18 +663,16 @@ void command_modal_stack_info(void) { prompt_send_response("Modal Stack, top to bottom:"); char buffer[128]; - for (ModalPriority priority = NumModalPriorities - 1; - priority > ModalPriorityInvalid; + for (ModalPriority priority = NumModalPriorities - 1; priority > ModalPriorityInvalid; --priority) { - prompt_send_response_fmt(buffer, sizeof(buffer), "Priority: %d (%zu)", - priority, info.counts[priority]); + prompt_send_response_fmt(buffer, sizeof(buffer), "Priority: %d (%zu)", priority, + info.counts[priority]); if (info.counts[priority] > 0 && !info.dumps[priority]) { prompt_send_response("Couldn't allocate buffers for modal stack data"); } else { for (size_t i = 0; i < info.counts[priority]; ++i) { prompt_send_response_fmt(buffer, sizeof(buffer), "window %p <%s>", - info.dumps[priority][i].addr, - info.dumps[priority][i].name); + info.dumps[priority][i].addr, info.dumps[priority][i].name); } } kernel_free(info.dumps[priority]); diff --git a/src/fw/kernel/ui/modals/modal_manager.h b/src/fw/kernel/ui/modals/modal_manager.h index 7e018885ea..937c07abb0 100644 --- a/src/fw/kernel/ui/modals/modal_manager.h +++ b/src/fw/kernel/ui/modals/modal_manager.h @@ -104,7 +104,8 @@ struct TouchNavState *modal_manager_get_touch_nav_state(void); //! Subscribe the kernel touch slot to the nav dispatcher. Runs on KernelMain. void modal_touch_nav_subscribe(void); -//! Unsubscribe the kernel nav dispatcher and cancel any in-flight modal gesture. Runs on KernelMain. +//! Unsubscribe the kernel nav dispatcher and cancel any in-flight modal gesture. Runs on +//! KernelMain. void modal_touch_nav_unsubscribe(void); #endif diff --git a/src/fw/kernel/ui/modals/modal_manager_private.h b/src/fw/kernel/ui/modals/modal_manager_private.h index 3d2c02c466..a996e92320 100644 --- a/src/fw/kernel/ui/modals/modal_manager_private.h +++ b/src/fw/kernel/ui/modals/modal_manager_private.h @@ -2,4 +2,3 @@ /* SPDX-License-Identifier: Apache-2.0 */ #pragma once - diff --git a/src/fw/kernel/ui/system_icons.h b/src/fw/kernel/ui/system_icons.h index e0a227fc53..334a2914bb 100644 --- a/src/fw/kernel/ui/system_icons.h +++ b/src/fw/kernel/ui/system_icons.h @@ -10,358 +10,409 @@ /** Status Bar Icons */ static const uint8_t s_status_icon_launcher_pixels[] = { - 0xdf, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, /* bytes 0 - 16 */ - 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x04, 0x00, 0x00, 0x71, 0x04, 0x00, 0x00, /* bytes 16 - 32 */ - 0x71, 0x04, 0x00, 0x00, 0x71, 0x04, 0x00, 0x00, + 0xdf, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, + 0x07, 0x07, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, /* bytes 0 - 16 */ + 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x71, 0x04, 0x00, 0x00, 0x71, 0x04, 0x00, 0x00, /* bytes 16 - 32 */ + 0x71, 0x04, 0x00, 0x00, 0x71, 0x04, 0x00, 0x00, }; static const GBitmap s_status_icon_launcher_bitmap = { - .addr = (void*) &s_status_icon_launcher_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 11, .h = 10 }, - }, + .addr = (void *)&s_status_icon_launcher_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 11, .h = 10}, + }, }; static const uint8_t s_status_icon_sms_pixels[] = { - 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0xc7, 0x03, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, /* bytes 16 - 32 */ - 0xf7, 0x03, 0x00, 0x00, + 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, + 0xc7, 0x03, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, /* bytes 16 - 32 */ + 0xf7, 0x03, 0x00, 0x00, }; static const GBitmap s_status_icon_sms_bitmap = { - .addr = (void*) &s_status_icon_sms_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 10, .h = 9 }, - }, + .addr = (void *)&s_status_icon_sms_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 10, .h = 9}, + }, }; static const uint8_t s_status_icon_bluetooth_pixels[] = { - 0x77, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x55, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ - 0x57, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x77, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x55, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ + 0x57, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, }; static const GBitmap s_status_icon_bluetooth_bitmap = { - .addr = (void*) &s_status_icon_bluetooth_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 7, .h = 11 }, - }, + .addr = (void *)&s_status_icon_bluetooth_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 7, .h = 11}, + }, }; static const uint8_t s_status_icon_settings_pixels[] = { - 0x3f, 0x03, 0x00, 0x00, 0xbf, 0x03, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x8f, 0x03, 0x00, 0x00, 0xc7, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xf2, 0x03, 0x00, 0x00, /* bytes 16 - 32 */ - 0xf7, 0x03, 0x00, 0x00, 0xf3, 0x03, 0x00, 0x00, + 0x3f, 0x03, 0x00, 0x00, 0xbf, 0x03, 0x00, 0x00, + 0x3f, 0x01, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x8f, 0x03, 0x00, 0x00, 0xc7, 0x03, 0x00, 0x00, + 0xe0, 0x03, 0x00, 0x00, 0xf2, 0x03, 0x00, 0x00, /* bytes 16 - 32 */ + 0xf7, 0x03, 0x00, 0x00, 0xf3, 0x03, 0x00, 0x00, }; static const GBitmap s_status_icon_settings_bitmap = { - .addr = (void*) &s_status_icon_settings_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 10, .h = 10 }, - }, + .addr = (void *)&s_status_icon_settings_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 10, .h = 10}, + }, }; static const uint8_t s_status_icon_phone_pixels[] = { - 0xfd, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, /* bytes 0 - 16 */ - 0xf9, 0x07, 0x00, 0x00, 0xf1, 0x07, 0x00, 0x00, 0xe3, 0x07, 0x00, 0x00, 0xc7, 0x06, 0x00, 0x00, /* bytes 16 - 32 */ - 0x0f, 0x04, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x7f, 0x04, 0x00, 0x00, + 0xfd, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, + 0xf8, 0x07, 0x00, 0x00, /* bytes 0 - 16 */ + 0xf9, 0x07, 0x00, 0x00, 0xf1, 0x07, 0x00, 0x00, 0xe3, 0x07, 0x00, 0x00, + 0xc7, 0x06, 0x00, 0x00, /* bytes 16 - 32 */ + 0x0f, 0x04, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x7f, 0x04, 0x00, 0x00, }; static const GBitmap s_status_icon_phone_bitmap = { - .addr = (void*) &s_status_icon_phone_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 11, .h = 11 }, - }, + .addr = (void *)&s_status_icon_phone_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 11, .h = 11}, + }, }; static const uint8_t s_status_icon_music_pixels[] = { - 0x3f, 0x00, 0x00, 0x00, 0xc7, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0xf7, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ - 0x10, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0xc7, 0x00, 0x00, 0x00, + 0xf7, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0xf7, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ + 0x10, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, }; static const GBitmap s_status_icon_music_bitmap = { - .addr = (void*) &s_status_icon_music_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 9, .h = 10 }, - }, + .addr = (void *)&s_status_icon_music_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 9, .h = 10}, + }, }; static const uint8_t s_status_icon_silent_pixels[] = { - 0x7f, 0x03, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0x9f, 0x04, 0x00, 0x00, 0x43, 0x06, 0x00, 0x00, /* bytes 0 - 16 */ - 0x23, 0x07, 0x00, 0x00, 0x93, 0x07, 0x00, 0x00, 0x4b, 0x07, 0x00, 0x00, 0x27, 0x07, 0x00, 0x00, /* bytes 16 - 32 */ - 0x13, 0x07, 0x00, 0x00, 0x39, 0x07, 0x00, 0x00, 0x7c, 0x07, 0x00, 0x00, + 0x7f, 0x03, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0x9f, 0x04, 0x00, 0x00, + 0x43, 0x06, 0x00, 0x00, /* bytes 0 - 16 */ + 0x23, 0x07, 0x00, 0x00, 0x93, 0x07, 0x00, 0x00, 0x4b, 0x07, 0x00, 0x00, + 0x27, 0x07, 0x00, 0x00, /* bytes 16 - 32 */ + 0x13, 0x07, 0x00, 0x00, 0x39, 0x07, 0x00, 0x00, 0x7c, 0x07, 0x00, 0x00, }; static const GBitmap s_status_icon_silent_bitmap = { - .addr = (void*) &s_status_icon_silent_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 11, .h = 11 }, - }, + .addr = (void *)&s_status_icon_silent_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 11, .h = 11}, + }, }; static const uint8_t s_quiet_time_status_icon_pixels[] = { - 0x03, 0x03, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ + 0x03, 0x03, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ 0x01, 0x02, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, }; static const GBitmap s_quiet_time_status_icon_bitmap = { - .addr = (void*) &s_quiet_time_status_icon_pixels, + .addr = (void *)&s_quiet_time_status_icon_pixels, .row_size_bytes = 4, .info_flags = 0x1000, .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 10, .h = 10 }, + .origin = {.x = 0, .y = 0}, + .size = {.w = 10, .h = 10}, }, }; /** Action Bar Icons */ static const uint8_t s_bar_icon_actions_pixels[] = { - 0xff, 0xf7, 0x00, 0x00, 0xff, 0xe7, 0x00, 0x00, 0x83, 0xc7, 0x00, 0x00, 0xfd, 0x81, 0x00, 0x00, /* bytes 0 - 16 */ - 0x7d, 0x00, 0x00, 0x00, 0x1d, 0x80, 0x00, 0x00, 0x9d, 0xc7, 0x00, 0x00, 0xed, 0xe7, 0x00, 0x00, /* bytes 16 - 32 */ - 0xed, 0xf7, 0x00, 0x00, 0xfd, 0xbf, 0x00, 0x00, 0xfd, 0xbf, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, + 0xff, 0xf7, 0x00, 0x00, 0xff, 0xe7, 0x00, 0x00, + 0x83, 0xc7, 0x00, 0x00, 0xfd, 0x81, 0x00, 0x00, /* bytes 0 - 16 */ + 0x7d, 0x00, 0x00, 0x00, 0x1d, 0x80, 0x00, 0x00, + 0x9d, 0xc7, 0x00, 0x00, 0xed, 0xe7, 0x00, 0x00, /* bytes 16 - 32 */ + 0xed, 0xf7, 0x00, 0x00, 0xfd, 0xbf, 0x00, 0x00, + 0xfd, 0xbf, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, }; static const GBitmap s_bar_icon_actions_bitmap = { - .addr = (void*) &s_bar_icon_actions_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 16, .h = 12 }, - }, + .addr = (void *)&s_bar_icon_actions_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 16, .h = 12}, + }, }; static const uint8_t s_bar_icon_phone_pixels[] = { - 0xf3, 0x7f, 0x00, 0x00, 0xe1, 0x7f, 0x00, 0x00, 0xc1, 0x7f, 0x00, 0x00, 0xc1, 0x7f, 0x00, 0x00, /* bytes 0 - 16 */ - 0xe1, 0x7f, 0x00, 0x00, 0xe3, 0x7f, 0x00, 0x00, 0xe3, 0x7f, 0x00, 0x00, 0xc7, 0x7f, 0x00, 0x00, /* bytes 16 - 32 */ - 0x87, 0x7f, 0x00, 0x00, 0x0f, 0x67, 0x00, 0x00, 0x1f, 0x40, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ - 0xff, 0x00, 0x00, 0x00, 0xff, 0x43, 0x00, 0x00, + 0xf3, 0x7f, 0x00, 0x00, 0xe1, 0x7f, 0x00, 0x00, + 0xc1, 0x7f, 0x00, 0x00, 0xc1, 0x7f, 0x00, 0x00, /* bytes 0 - 16 */ + 0xe1, 0x7f, 0x00, 0x00, 0xe3, 0x7f, 0x00, 0x00, + 0xe3, 0x7f, 0x00, 0x00, 0xc7, 0x7f, 0x00, 0x00, /* bytes 16 - 32 */ + 0x87, 0x7f, 0x00, 0x00, 0x0f, 0x67, 0x00, 0x00, + 0x1f, 0x40, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ + 0xff, 0x00, 0x00, 0x00, 0xff, 0x43, 0x00, 0x00, }; static const GBitmap s_bar_icon_phone_bitmap = { - .addr = (void*) &s_bar_icon_phone_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 15, .h = 14 }, - }, + .addr = (void *)&s_bar_icon_phone_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 15, .h = 14}, + }, }; static const uint8_t s_bar_icon_x_pixels[] = { - 0xfb, 0x0d, 0x00, 0x00, 0xf1, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, /* bytes 0 - 16 */ - 0x03, 0x0c, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, /* bytes 16 - 32 */ - 0x01, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf1, 0x08, 0x00, 0x00, 0xfb, 0x0d, 0x00, 0x00, + 0xfb, 0x0d, 0x00, 0x00, 0xf1, 0x08, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, /* bytes 0 - 16 */ + 0x03, 0x0c, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x00, + 0x07, 0x0e, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, /* bytes 16 - 32 */ + 0x01, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xf1, 0x08, 0x00, 0x00, 0xfb, 0x0d, 0x00, 0x00, }; static const GBitmap s_bar_icon_x_bitmap = { - .addr = (void*) &s_bar_icon_x_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 12, .h = 12 }, - }, + .addr = (void *)&s_bar_icon_x_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 12, .h = 12}, + }, }; static const uint8_t s_bar_icon_check_pixels[] = { - 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, /* bytes 0 - 16 */ - 0x00, 0xf8, 0x00, 0x00, 0x04, 0x7c, 0x00, 0x00, 0x0e, 0x3e, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, /* bytes 16 - 32 */ - 0xbe, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, /* bytes 32 - 48 */ - 0xe0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, + 0x00, 0xe0, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, /* bytes 0 - 16 */ + 0x00, 0xf8, 0x00, 0x00, 0x04, 0x7c, 0x00, 0x00, + 0x0e, 0x3e, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, /* bytes 16 - 32 */ + 0xbe, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, + 0xf8, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, /* bytes 32 - 48 */ + 0xe0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, }; static const GBitmap s_bar_icon_check_bitmap = { - .addr = (void*) &s_bar_icon_check_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 18, .h = 14 }, - }, + .addr = (void *)&s_bar_icon_check_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 18, .h = 14}, + }, }; static const uint8_t s_bar_icon_up_pixels[] = { - 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, /* bytes 0 - 16 */ - 0xfc, 0x03, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, + 0xf8, 0x01, 0x00, 0x00, /* bytes 0 - 16 */ + 0xfc, 0x03, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, }; static const GBitmap s_bar_icon_up_bitmap = { - .addr = (void*) &s_bar_icon_up_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 12, .h = 7 }, - }, + .addr = (void *)&s_bar_icon_up_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 12, .h = 7}, + }, }; static const uint8_t s_bar_icon_down_pixels[] = { - 0xff, 0x0f, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, /* bytes 0 - 16 */ - 0xf0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0x0f, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, + 0xf8, 0x01, 0x00, 0x00, /* bytes 0 - 16 */ + 0xf0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; static const GBitmap s_bar_icon_down_bitmap = { - .addr = (void*) &s_bar_icon_down_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 12, .h = 7 }, - }, + .addr = (void *)&s_bar_icon_down_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 12, .h = 7}, + }, }; static const uint8_t s_bar_icon_yes_pixels[] = { - 0xf8, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x71, 0x04, 0x00, 0x00, /* bytes 0 - 16 */ - 0x71, 0x04, 0x00, 0x00, 0x71, 0x04, 0x00, 0x00, 0x23, 0x06, 0x00, 0x00, 0x23, 0x06, 0x00, 0x00, /* bytes 16 - 32 */ - 0x27, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, /* bytes 32 - 48 */ - 0x8f, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, /* bytes 48 - 64 */ - 0x8f, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, + 0xf8, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, + 0xf8, 0x00, 0x00, 0x00, 0x71, 0x04, 0x00, 0x00, /* bytes 0 - 16 */ + 0x71, 0x04, 0x00, 0x00, 0x71, 0x04, 0x00, 0x00, + 0x23, 0x06, 0x00, 0x00, 0x23, 0x06, 0x00, 0x00, /* bytes 16 - 32 */ + 0x27, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, + 0x07, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, /* bytes 32 - 48 */ + 0x8f, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, + 0x8f, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, /* bytes 48 - 64 */ + 0x8f, 0x07, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x00, }; static const GBitmap s_bar_icon_yes_bitmap = { - .addr = (void*) &s_bar_icon_yes_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 11, .h = 18 }, - }, + .addr = (void *)&s_bar_icon_yes_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 11, .h = 18}, + }, }; static const uint8_t s_bar_icon_no_pixels[] = { - 0x78, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ - 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ - 0x18, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, /* bytes 48 - 64 */ - 0x78, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x70, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* bytes 16 - 32 */ + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, /* bytes 32 - 48 */ + 0x18, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, /* bytes 48 - 64 */ + 0x78, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, }; static const GBitmap s_bar_icon_no_bitmap = { - .addr = (void*) &s_bar_icon_no_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 10, .h = 18 }, - }, + .addr = (void *)&s_bar_icon_no_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 10, .h = 18}, + }, }; static const uint8_t s_bar_icon_snooze_pixels[] = { - 0x3f, 0x00, 0x00, 0x00, 0xff, 0x0b, 0x00, 0x00, 0xff, 0x0d, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, /* bytes 0 - 16 */ - 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc7, 0x0f, 0x00, 0x00, 0xe3, 0x0f, 0x00, 0x00, /* bytes 16 - 32 */ - 0xf1, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0xff, 0x0b, 0x00, 0x00, + 0xff, 0x0d, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, /* bytes 0 - 16 */ + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, + 0xc7, 0x0f, 0x00, 0x00, 0xe3, 0x0f, 0x00, 0x00, /* bytes 16 - 32 */ + 0xf1, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, + 0x80, 0x0f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, }; static const GBitmap s_bar_icon_snooze_bitmap = { - .addr = (void*) &s_bar_icon_snooze_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 12, .h = 12 }, - }, + .addr = (void *)&s_bar_icon_snooze_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 12, .h = 12}, + }, }; // Battery Icons //////////////////////////////////////////////////////////// static const uint8_t s_status_battery_empty_pixels[] = { - 0xff, 0x3f, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x01, 0x60, 0x00, 0x00, 0x01, 0x60, 0x00, 0x00, /* bytes 0 - 16 */ - 0x01, 0x60, 0x00, 0x00, 0x01, 0x60, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, + 0xff, 0x3f, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, + 0x01, 0x60, 0x00, 0x00, 0x01, 0x60, 0x00, 0x00, /* bytes 0 - 16 */ + 0x01, 0x60, 0x00, 0x00, 0x01, 0x60, 0x00, 0x00, + 0x01, 0x20, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, }; static const GBitmap s_status_battery_empty_bitmap = { - .addr = (void*) &s_status_battery_empty_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 15, .h = 8 }, - }, + .addr = (void *)&s_status_battery_empty_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 15, .h = 8}, + }, }; static const uint8_t s_status_battery_charging_pixels[] = { - 0x88, 0xff, 0x1f, 0x00, 0x8c, 0x00, 0x10, 0x00, 0x86, 0x00, 0x30, 0x00, 0x87, 0x00, 0x30, 0x00, /* bytes 0 - 16 */ - 0x9c, 0x00, 0x30, 0x00, 0x8c, 0x00, 0x30, 0x00, 0x86, 0x00, 0x10, 0x00, 0x82, 0xff, 0x1f, 0x00, + 0x88, 0xff, 0x1f, 0x00, 0x8c, 0x00, 0x10, 0x00, + 0x86, 0x00, 0x30, 0x00, 0x87, 0x00, 0x30, 0x00, /* bytes 0 - 16 */ + 0x9c, 0x00, 0x30, 0x00, 0x8c, 0x00, 0x30, 0x00, + 0x86, 0x00, 0x10, 0x00, 0x82, 0xff, 0x1f, 0x00, }; static const GBitmap s_status_battery_charging_bitmap = { - .addr = (void*) &s_status_battery_charging_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 22, .h = 8 }, - }, + .addr = (void *)&s_status_battery_charging_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 22, .h = 8}, + }, }; static const uint8_t s_status_battery_charged_pixels[] = { - 0x0f, 0x3c, 0x00, 0x00, 0xc1, 0x21, 0x00, 0x00, 0xe1, 0x67, 0x00, 0x00, 0xfd, 0x61, 0x00, 0x00, /* bytes 0 - 16 */ - 0xfd, 0x61, 0x00, 0x00, 0xe1, 0x67, 0x00, 0x00, 0xc1, 0x21, 0x00, 0x00, 0x0f, 0x3c, 0x00, 0x00, + 0x0f, 0x3c, 0x00, 0x00, 0xc1, 0x21, 0x00, 0x00, + 0xe1, 0x67, 0x00, 0x00, 0xfd, 0x61, 0x00, 0x00, /* bytes 0 - 16 */ + 0xfd, 0x61, 0x00, 0x00, 0xe1, 0x67, 0x00, 0x00, + 0xc1, 0x21, 0x00, 0x00, 0x0f, 0x3c, 0x00, 0x00, }; static const GBitmap s_status_battery_charged_bitmap = { - .addr = (void*) &s_status_battery_charged_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 15, .h = 8 }, - }, + .addr = (void *)&s_status_battery_charged_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 15, .h = 8}, + }, }; static const uint8_t s_status_icon_phone_only_pixels[] = { - 0x41, 0x02, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ - 0x24, 0x00, 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0xc9, 0x03, 0x00, 0x00, 0xe4, 0x03, 0x00, 0x00, /* bytes 16 - 32 */ - 0xf6, 0x03, 0x00, 0x00, + 0x41, 0x02, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, + 0x90, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, /* bytes 0 - 16 */ + 0x24, 0x00, 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, + 0xc9, 0x03, 0x00, 0x00, 0xe4, 0x03, 0x00, 0x00, /* bytes 16 - 32 */ + 0xf6, 0x03, 0x00, 0x00, }; static const GBitmap s_status_icon_phone_only_bitmap = { - .addr = (void*) &s_status_icon_phone_only_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 10, .h = 9 }, - }, + .addr = (void *)&s_status_icon_phone_only_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 10, .h = 9}, + }, }; static const uint8_t s_status_icon_airplane_mode_pixels[] = { - 0xcf, 0x0f, 0x00, 0x00, 0x9f, 0x0f, 0x00, 0x00, 0x1c, 0x0f, 0x00, 0x00, 0x39, 0x0e, 0x00, 0x00, /* bytes 0 - 16 */ - 0x01, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x39, 0x0e, 0x00, 0x00, /* bytes 16 - 32 */ - 0x1c, 0x0f, 0x00, 0x00, 0x9f, 0x0f, 0x00, 0x00, 0xcf, 0x0f, 0x00, 0x00, + 0xcf, 0x0f, 0x00, 0x00, 0x9f, 0x0f, 0x00, 0x00, 0x1c, 0x0f, 0x00, 0x00, + 0x39, 0x0e, 0x00, 0x00, /* bytes 0 - 16 */ + 0x01, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, + 0x39, 0x0e, 0x00, 0x00, /* bytes 16 - 32 */ + 0x1c, 0x0f, 0x00, 0x00, 0x9f, 0x0f, 0x00, 0x00, 0xcf, 0x0f, 0x00, 0x00, }; static const GBitmap s_status_icon_airplane_mode_bitmap = { - .addr = (void*) &s_status_icon_airplane_mode_pixels, - .row_size_bytes = 4, - .info_flags = 0x1000, - .bounds = { - .origin = { .x = 0, .y = 0 }, - .size = { .w = 12, .h = 11 }, - }, + .addr = (void *)&s_status_icon_airplane_mode_pixels, + .row_size_bytes = 4, + .info_flags = 0x1000, + .bounds = { + .origin = {.x = 0, .y = 0}, + .size = {.w = 12, .h = 11}, + }, }; diff --git a/src/fw/kernel/util/delay.c b/src/fw/kernel/util/delay.c index 66ebdbb408..ad15a5c5d0 100644 --- a/src/fw/kernel/util/delay.c +++ b/src/fw/kernel/util/delay.c @@ -34,7 +34,8 @@ void NOINLINE delay_us(uint32_t us) { // Use DWT cycle counter for accurate delays uint32_t cycles = us * (SystemCoreClock / 1000000); uint32_t start = DWT->CYCCNT; - while ((DWT->CYCCNT - start) < cycles) {} + while ((DWT->CYCCNT - start) < cycles) { + } } void delay_init(void) { diff --git a/src/fw/kernel/util/factory_reset.c b/src/fw/kernel/util/factory_reset.c index 9ab7f9e5c3..b4007e8c7b 100644 --- a/src/fw/kernel/util/factory_reset.c +++ b/src/fw/kernel/util/factory_reset.c @@ -55,7 +55,7 @@ static void prv_factory_reset_non_pfs_data() { } void factory_reset_set_reason_and_reset(void) { - RebootReason reason = { RebootReasonCode_FactoryResetReset, 0 }; + RebootReason reason = {RebootReasonCode_FactoryResetReset, 0}; reboot_reason_set(&reason); system_reset(); } @@ -117,7 +117,7 @@ void factory_reset_fast(void *unused) { prv_factory_reset_post(false /* should_shutdown */); } -#endif // !defined(CONFIG_RECOVERY_FW) +#endif // !defined(CONFIG_RECOVERY_FW) //! Used by the mfg flow to kick us out the MFG firmware and into the consumer PRF that's stored //! on the external flash. diff --git a/src/fw/kernel/util/fw_reset.c b/src/fw/kernel/util/fw_reset.c index f917d0214b..1731d4ea0b 100644 --- a/src/fw/kernel/util/fw_reset.c +++ b/src/fw/kernel/util/fw_reset.c @@ -18,7 +18,7 @@ #include "system/reset.h" static void prv_reset_into_prf(void) { - RebootReason reason = { RebootReasonCode_PrfReset, 0 }; + RebootReason reason = {RebootReasonCode_PrfReset, 0}; reboot_reason_set(&reason); boot_bit_set(BOOT_BIT_FORCE_PRF); services_set_runlevel(RunLevel_BareMinimum); @@ -47,16 +47,16 @@ static void prv_launch_factory_reset_app(void *unused) { modal_manager_pop_all(); static const ProgressUIAppArgs s_factory_reset_args = { - .progress_source = PROGRESS_UI_SOURCE_FACTORY_RESET, + .progress_source = PROGRESS_UI_SOURCE_FACTORY_RESET, }; - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = progress_ui_app_get_info(), - .common.args = &s_factory_reset_args, - .restart = true, + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = progress_ui_app_get_info(), + .common.args = &s_factory_reset_args, + .restart = true, }); } -void reset_protocol_msg_callback(CommSession *session, const uint8_t* data, unsigned int length) { +void reset_protocol_msg_callback(CommSession *session, const uint8_t *data, unsigned int length) { PBL_ASSERT_RUNNING_FROM_EXPECTED_TASK(PebbleTask_KernelBackground); const uint8_t cmd = data[0]; @@ -95,4 +95,3 @@ void fw_prepare_for_reset(void) { pulse_end(); #endif } - diff --git a/src/fw/kernel/util/idle.h b/src/fw/kernel/util/idle.h index 6ca7fa9c4d..4e8bdd1e25 100644 --- a/src/fw/kernel/util/idle.h +++ b/src/fw/kernel/util/idle.h @@ -10,4 +10,3 @@ void idle_set_enabled(bool enable); //! Check whether we are permitted to go idle. bool idle_is_allowed(void); - diff --git a/src/fw/kernel/util/interval_timer.c b/src/fw/kernel/util/interval_timer.c index 4f798daa95..60da95ba8a 100644 --- a/src/fw/kernel/util/interval_timer.c +++ b/src/fw/kernel/util/interval_timer.c @@ -16,12 +16,12 @@ static uint64_t prv_get_curr_system_time_ms(void) { void interval_timer_init(IntervalTimer *timer, uint32_t min_expected_ms, uint32_t max_expected_ms, uint32_t weighting_factor_inverted) { - PBL_ASSERTN(weighting_factor_inverted != 0); // Divide by zero is not awesome + PBL_ASSERTN(weighting_factor_inverted != 0); // Divide by zero is not awesome - *timer = (IntervalTimer) { - .min_expected_ms = min_expected_ms, - .max_expected_ms = max_expected_ms, - .weighting_factor_inverted = weighting_factor_inverted + *timer = (IntervalTimer){ + .min_expected_ms = min_expected_ms, + .max_expected_ms = max_expected_ms, + .weighting_factor_inverted = weighting_factor_inverted }; } @@ -40,9 +40,7 @@ void interval_timer_take_sample(IntervalTimer *timer) { const int64_t last_interval = current_time - timer->last_sample_timestamp_ms; // Make sure this interval is valid - if (last_interval >= timer->min_expected_ms && - last_interval <= timer->max_expected_ms) { - + if (last_interval >= timer->min_expected_ms && last_interval <= timer->max_expected_ms) { // It's valid! Let's roll it into our moving average // This is an exponential moving average. @@ -55,8 +53,8 @@ void interval_timer_take_sample(IntervalTimer *timer) { // Initialize the average to the first sample we have timer->average_ms = last_interval; } else { - timer->average_ms = timer->average_ms + - ((last_interval - timer->average_ms) / timer->weighting_factor_inverted); + timer->average_ms = timer->average_ms + ((last_interval - timer->average_ms) / + timer->weighting_factor_inverted); } timer->num_samples++; diff --git a/src/fw/kernel/util/segment.c b/src/fw/kernel/util/segment.c index 6dd5a7d5a0..464c9ac5da 100644 --- a/src/fw/kernel/util/segment.c +++ b/src/fw/kernel/util/segment.c @@ -14,17 +14,15 @@ typedef long double max_align_t; #endif static void prv_assert_sane_segment(MemorySegment *segment) { - PBL_ASSERT(segment->start <= segment->end, - "Segment end points before segment start"); + PBL_ASSERT(segment->start <= segment->end, "Segment end points before segment start"); } -static void * prv_align(void *ptr) { +static void *prv_align(void *ptr) { uintptr_t c = (uintptr_t)ptr; // Advance the pointer to the next alignment boundary. return (void *)((c + alignof(max_align_t) - 1) & ~(alignof(max_align_t) - 1)); } - size_t memory_segment_get_size(MemorySegment *segment) { prv_assert_sane_segment(segment); return (size_t)((uintptr_t)segment->end - (uintptr_t)segment->start); @@ -35,8 +33,8 @@ void memory_segment_align(MemorySegment *segment) { prv_assert_sane_segment(segment); } -void * memory_segment_split(MemorySegment * restrict parent, - MemorySegment * restrict child, size_t size) { +void *memory_segment_split(MemorySegment *restrict parent, MemorySegment *restrict child, + size_t size) { prv_assert_sane_segment(parent); char *child_start = prv_align(parent->start); void *child_end = child_start + size; @@ -52,9 +50,9 @@ void * memory_segment_split(MemorySegment * restrict parent, parent->start = adjusted_parent_start; if (child) { - *child = (MemorySegment) { - .start = child_start, - .end = child_end, + *child = (MemorySegment){ + .start = child_start, + .end = child_end, }; } return child_start; diff --git a/src/fw/kernel/util/segment.h b/src/fw/kernel/util/segment.h index 3abd80f90e..a53c018606 100644 --- a/src/fw/kernel/util/segment.h +++ b/src/fw/kernel/util/segment.h @@ -13,13 +13,11 @@ #include - typedef struct MemorySegment { void *start; //!< The lowest address of the segment void *end; //!< One past the highest address of the segment } MemorySegment; - //! Returns the size of the largest object that the segment can contain. size_t memory_segment_get_size(MemorySegment *segment); @@ -42,5 +40,5 @@ void memory_segment_align(MemorySegment *segment); //! @return start of child memory segment if successful, or NULL if //! there is not enough space in the parent segment to split //! with the requested size. -void * memory_segment_split(MemorySegment * restrict parent, - MemorySegment * restrict child, size_t size); +void *memory_segment_split(MemorySegment *restrict parent, MemorySegment *restrict child, + size_t size); diff --git a/src/fw/kernel/util/sleep.c b/src/fw/kernel/util/sleep.c index 3b22b69125..9636995d13 100644 --- a/src/fw/kernel/util/sleep.c +++ b/src/fw/kernel/util/sleep.c @@ -6,4 +6,3 @@ void psleep(int millis) { sys_psleep(millis); } - diff --git a/src/fw/kernel/util/sleep.h b/src/fw/kernel/util/sleep.h index c0c59ee07c..1bb8624d9b 100644 --- a/src/fw/kernel/util/sleep.h +++ b/src/fw/kernel/util/sleep.h @@ -18,4 +18,3 @@ //! //! @param millis The number of milliseconds to wait for void psleep(int millis); - diff --git a/src/fw/kernel/util/stack_info.c b/src/fw/kernel/util/stack_info.c index 73d623dadf..2b02c81529 100644 --- a/src/fw/kernel/util/stack_info.c +++ b/src/fw/kernel/util/stack_info.c @@ -8,13 +8,12 @@ extern uint32_t __isr_stack_start__[]; uint32_t stack_free_bytes(void) { - // Get the current SP - register uint32_t SP __asm ("sp"); + register uint32_t SP __asm("sp"); uint32_t cur_sp = SP; // Default stack - uint32_t start = (uint32_t) __isr_stack_start__; + uint32_t start = (uint32_t)__isr_stack_start__; // On ISR stack? if (!mcu_state_is_isr()) { diff --git a/src/fw/kernel/util/standby.c b/src/fw/kernel/util/standby.c index 1ce445248a..0dc8f9b375 100644 --- a/src/fw/kernel/util/standby.c +++ b/src/fw/kernel/util/standby.c @@ -26,7 +26,7 @@ static NORETURN prv_enter_standby(void) { NORETURN enter_standby(RebootReasonCode reason) { PBL_LOG_ALWAYS("Preparing to enter standby mode (reason %u).", (unsigned)reason); - RebootReason reboot_reason = { reason, 0 }; + RebootReason reboot_reason = {reason, 0}; reboot_reason_set(&reboot_reason); display_clear(); diff --git a/src/fw/kernel/util/task_init.c b/src/fw/kernel/util/task_init.c index 2acd00ca72..db65ce596c 100644 --- a/src/fw/kernel/util/task_init.c +++ b/src/fw/kernel/util/task_init.c @@ -12,7 +12,7 @@ void task_init(void) { uint32_t seed; if (!rng_rand(&seed)) { // Fallback, time XOR'd with an approximation of the current stack pointer: - seed = rtc_get_time() ^ (uintptr_t) &seed; + seed = rtc_get_time() ^ (uintptr_t)&seed; } srand(seed); } diff --git a/src/fw/main.c b/src/fw/main.c index cbb092c84f..eb6133537b 100644 --- a/src/fw/main.c +++ b/src/fw/main.c @@ -84,9 +84,7 @@ static TimerID s_uptime_timer = TIMER_INVALID_ID; #endif static void main_task(void *parameter); -static void print_splash_screen(void) -{ - +static void print_splash_screen(void) { #if defined(CONFIG_MFG) PBL_LOG_ALWAYS("PebbleOS - MANUFACTURING MODE"); #elif defined(CONFIG_RECOVERY_FW) @@ -94,11 +92,10 @@ static void print_splash_screen(void) #else PBL_LOG_ALWAYS("PebbleOS"); #endif - PBL_LOG_ALWAYS("%s%s", - TINTIN_METADATA.version_tag, - (TINTIN_METADATA.is_dual_slot && !TINTIN_METADATA.is_recovery_firmware) ? - (TINTIN_METADATA.is_slot_0 ? " (slot0)" : " (slot1)") : - ""); + PBL_LOG_ALWAYS("%s%s", TINTIN_METADATA.version_tag, + (TINTIN_METADATA.is_dual_slot && !TINTIN_METADATA.is_recovery_firmware) + ? (TINTIN_METADATA.is_slot_0 ? " (slot0)" : " (slot1)") + : ""); PBL_LOG_ALWAYS("(c) 2013-2026 The PebbleOS contributors"); PBL_LOG_ALWAYS(" "); } @@ -106,10 +103,10 @@ static void print_splash_screen(void) int main(void) { soc_early_init(); - extern void * __ISR_VECTOR_TABLE__; // Defined in linker script + extern void *__ISR_VECTOR_TABLE__; // Defined in linker script SCB->VTOR = (uint32_t)&__ISR_VECTOR_TABLE__; - NVIC_SetPriorityGrouping(3); // 4 bits for group priority; 0 bits for subpriority + NVIC_SetPriorityGrouping(3); // 4 bits for group priority; 0 bits for subpriority enable_fault_handlers(); @@ -131,12 +128,12 @@ int main(void) { extern uint32_t __kernel_main_stack_size__[]; extern uint32_t __stack_guard_size__[]; struct pbl_thread_attr attr = { - .name = "KernelMain", - .entry = main_task, - .prio = PBL_PRIO_IDLE + 3, - .privileged = true, - .stack = (void *)((uintptr_t)__kernel_main_stack_start__ + (uintptr_t)__stack_guard_size__), - .stack_size = (uintptr_t)__kernel_main_stack_size__ - (uintptr_t)__stack_guard_size__, + .name = "KernelMain", + .entry = main_task, + .prio = PBL_PRIO_IDLE + 3, + .privileged = true, + .stack = (void *)((uintptr_t)__kernel_main_stack_start__ + (uintptr_t)__stack_guard_size__), + .stack_size = (uintptr_t)__kernel_main_stack_size__ - (uintptr_t)__stack_guard_size__, }; pebble_task_create(PebbleTask_KernelMain, &attr); @@ -144,12 +141,12 @@ int main(void) { pbl_kernel_start(); } -static void watchdog_timer_callback(void* data) { +static void watchdog_timer_callback(void *data) { task_watchdog_bit_set(PebbleTask_NewTimers); } static void register_system_timers(void) { - static RegularTimerInfo watchdog_timer = { .list_node = { 0, 0 }, .cb = watchdog_timer_callback }; + static RegularTimerInfo watchdog_timer = {.list_node = {0, 0}, .cb = watchdog_timer_callback}; regular_timer_add_seconds_callback(&watchdog_timer); } @@ -217,14 +214,14 @@ static void clear_reset_loop_detection_bits(void) { } #ifndef CONFIG_MFG -static void uptime_callback(void* data) { +static void uptime_callback(void *data) { PBL_LOG_VERBOSE("Uptime reached 15 minutes, set stable bit."); new_timer_delete(s_uptime_timer); boot_bit_set(BOOT_BIT_FW_STABLE); } #endif -static void prv_low_power_debug_config_callback(void* data) { +static void prv_low_power_debug_config_callback(void *data) { new_timer_delete(s_lowpower_timer); } @@ -338,8 +335,8 @@ static NOINLINE void prv_main_task_init(void) { // seconds to give OpenOCD time to start and still able to connect when it is // ready to flash in the new image via JTAG s_lowpower_timer = new_timer_create(); - new_timer_start(s_lowpower_timer, - 10 * 1000, prv_low_power_debug_config_callback, NULL, 0 /*flags*/); + new_timer_start(s_lowpower_timer, 10 * 1000, prv_low_power_debug_config_callback, NULL, + 0 /*flags*/); #ifndef CONFIG_MFG s_uptime_timer = new_timer_create(); diff --git a/src/fw/mfg/asterix/mfg_info.c b/src/fw/mfg/asterix/mfg_info.c index 59e0486566..107c94ae31 100644 --- a/src/fw/mfg/asterix/mfg_info.c +++ b/src/fw/mfg/asterix/mfg_info.c @@ -11,27 +11,27 @@ typedef struct { uint32_t data_version; uint32_t color; - char model[MFG_INFO_MODEL_STRING_LENGTH]; //!< Null terminated model string - uint8_t vibe_cali; //!< Vibration motor trim, MFG_INFO_VIBE_CALI_INVALID if unset + char model[MFG_INFO_MODEL_STRING_LENGTH]; //!< Null terminated model string + uint8_t vibe_cali; //!< Vibration motor trim, MFG_INFO_VIBE_CALI_INVALID if unset } MfgData; static void prv_update_struct(const MfgData *data) { flash_erase_subsector_blocking(FLASH_REGION_MFG_INFO_BEGIN); - flash_write_bytes((const uint8_t*) data, FLASH_REGION_MFG_INFO_BEGIN, sizeof(*data)); + flash_write_bytes((const uint8_t *)data, FLASH_REGION_MFG_INFO_BEGIN, sizeof(*data)); } static MfgData prv_fetch_struct(void) { MfgData result; - flash_read_bytes((uint8_t*) &result, FLASH_REGION_MFG_INFO_BEGIN, sizeof(result)); + flash_read_bytes((uint8_t *)&result, FLASH_REGION_MFG_INFO_BEGIN, sizeof(result)); // Fallback data if not available if (result.data_version != CURRENT_DATA_VERSION) { - result.data_version = CURRENT_DATA_VERSION; - result.color = WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK; - strncpy(result.model, "asterix", sizeof(result.model)); - result.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; - result.vibe_cali = MFG_INFO_VIBE_CALI_INVALID; + result.data_version = CURRENT_DATA_VERSION; + result.color = WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK; + strncpy(result.model, "asterix", sizeof(result.model)); + result.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; + result.vibe_cali = MFG_INFO_VIBE_CALI_INVALID; } return result; @@ -47,12 +47,12 @@ void mfg_info_set_watch_color(WatchInfoColor color) { prv_update_struct(&data); } -void mfg_info_get_model(char* buffer) { +void mfg_info_get_model(char *buffer) { MfgData data = prv_fetch_struct(); strcpy(buffer, data.model); } -void mfg_info_set_model(const char* model) { +void mfg_info_set_model(const char *model) { MfgData data = prv_fetch_struct(); strncpy(data.model, model, sizeof(data.model)); data.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; diff --git a/src/fw/mfg/getafix/mfg_info.c b/src/fw/mfg/getafix/mfg_info.c index a9908aa644..73f244d837 100644 --- a/src/fw/mfg/getafix/mfg_info.c +++ b/src/fw/mfg/getafix/mfg_info.c @@ -11,27 +11,27 @@ typedef struct { uint32_t data_version; uint32_t color; - char model[MFG_INFO_MODEL_STRING_LENGTH]; //!< Null terminated model string - uint8_t vibe_cali; //!< Vibration motor trim, MFG_INFO_VIBE_CALI_INVALID if unset + char model[MFG_INFO_MODEL_STRING_LENGTH]; //!< Null terminated model string + uint8_t vibe_cali; //!< Vibration motor trim, MFG_INFO_VIBE_CALI_INVALID if unset } MfgData; static void prv_update_struct(const MfgData *data) { flash_erase_subsector_blocking(FLASH_REGION_MFG_INFO_BEGIN); - flash_write_bytes((const uint8_t*) data, FLASH_REGION_MFG_INFO_BEGIN, sizeof(*data)); + flash_write_bytes((const uint8_t *)data, FLASH_REGION_MFG_INFO_BEGIN, sizeof(*data)); } static MfgData prv_fetch_struct(void) { MfgData result; - flash_read_bytes((uint8_t*) &result, FLASH_REGION_MFG_INFO_BEGIN, sizeof(result)); + flash_read_bytes((uint8_t *)&result, FLASH_REGION_MFG_INFO_BEGIN, sizeof(result)); // Fallback data if not available if (result.data_version != CURRENT_DATA_VERSION) { - result.data_version = CURRENT_DATA_VERSION; - result.color = WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20; - strncpy(result.model, "getafix", sizeof(result.model)); - result.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; - result.vibe_cali = MFG_INFO_VIBE_CALI_INVALID; + result.data_version = CURRENT_DATA_VERSION; + result.color = WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20; + strncpy(result.model, "getafix", sizeof(result.model)); + result.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; + result.vibe_cali = MFG_INFO_VIBE_CALI_INVALID; } return result; @@ -47,12 +47,12 @@ void mfg_info_set_watch_color(WatchInfoColor color) { prv_update_struct(&data); } -void mfg_info_get_model(char* buffer) { +void mfg_info_get_model(char *buffer) { MfgData data = prv_fetch_struct(); strcpy(buffer, data.model); } -void mfg_info_set_model(const char* model) { +void mfg_info_set_model(const char *model) { MfgData data = prv_fetch_struct(); strncpy(data.model, model, sizeof(data.model)); data.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; diff --git a/src/fw/mfg/mfg_command.c b/src/fw/mfg/mfg_command.c index ed8a72e31d..a2406740f4 100644 --- a/src/fw/mfg/mfg_command.c +++ b/src/fw/mfg/mfg_command.c @@ -18,7 +18,7 @@ void command_color_read(void) { prompt_send_response_fmt(buffer, sizeof(buffer), "%d", mfg_info_get_watch_color()); } -void command_color_write(const char* color_num) { +void command_color_write(const char *color_num) { char *end; int color = strtol(color_num, &end, 10); @@ -39,10 +39,10 @@ void command_color_write(const char* color_num) { void command_rtcfreq_read(void) { char buffer[10]; - prompt_send_response_fmt(buffer, sizeof(buffer), "%"PRIu32, mfg_info_get_rtc_freq()); + prompt_send_response_fmt(buffer, sizeof(buffer), "%" PRIu32, mfg_info_get_rtc_freq()); } -void command_rtcfreq_write(const char* rtc_freq_string) { +void command_rtcfreq_write(const char *rtc_freq_string) { char *end; uint32_t rtc_freq = strtol(rtc_freq_string, &end, 10); @@ -62,7 +62,7 @@ void command_model_read(void) { prompt_send_response(model_buffer); } -void command_model_write(const char* model) { +void command_model_write(const char *model) { // mfg_info_set_model will truncate if the string is too long, so no need to check mfg_info_set_model(model); char written_model[MFG_INFO_MODEL_STRING_LENGTH]; @@ -73,4 +73,3 @@ void command_model_write(const char* model) { prompt_send_response("ERROR"); } } - diff --git a/src/fw/mfg/mfg_info.c b/src/fw/mfg/mfg_info.c index be703f6824..6daa24f617 100644 --- a/src/fw/mfg/mfg_info.c +++ b/src/fw/mfg/mfg_info.c @@ -15,7 +15,8 @@ void mfg_info_get_serialnumber(char *serial_number, size_t serial_number_size) { // strncpy should pad the end of strings with nulls if there is space, but // everywhere that seems to use OTP or registry strings seems to pad the end // with a null-term. - // Note: making an assumption here that the serial number is always going to the MFG_SERIAL_NUMBER_SIZE characters + // Note: making an assumption here that the serial number is always going to the + // MFG_SERIAL_NUMBER_SIZE characters serial_number[MFG_SERIAL_NUMBER_SIZE] = '\0'; } } @@ -35,4 +36,3 @@ void mfg_info_get_hw_version(char *hw_version, size_t hw_version_size) { hw_version[MFG_HW_VERSION_SIZE] = '\0'; } } - diff --git a/src/fw/mfg/mfg_info.h b/src/fw/mfg/mfg_info.h index 6185862dc1..f3df1aa10c 100644 --- a/src/fw/mfg/mfg_info.h +++ b/src/fw/mfg/mfg_info.h @@ -45,12 +45,12 @@ void mfg_info_set_rtc_freq(uint32_t rtc_freq); //! Get the model string. Populates a supplied buffer with a null-terminated string. //! @param buffer a character array that's at least MFG_INFO_MODEL_STRING_LENGTH in size -void mfg_info_get_model(char* buffer); +void mfg_info_get_model(char *buffer); //! Set the model string to a new value. //! @param model A null-terminated string that's at most MFG_INFO_MODEL_STRING_LENGTH bytes in //! length including the null-terminator. Longer strings will be truncated to fit. -void mfg_info_set_model(const char* model); +void mfg_info_set_model(const char *model); //! Set or update any constant data that needs to be written at manufacturing //! time but which is not customized to the individual unit. diff --git a/src/fw/mfg/mfg_mode/mfg_factory_mode.c b/src/fw/mfg/mfg_mode/mfg_factory_mode.c index eb039999c4..fb750c5dc2 100644 --- a/src/fw/mfg/mfg_mode/mfg_factory_mode.c +++ b/src/fw/mfg/mfg_mode/mfg_factory_mode.c @@ -14,8 +14,8 @@ static bool s_mfg_mode = false; static void prv_launch_mfg_app(void *data) { // Make sure we can launch our MFG app and subsequent apps. app_manager_set_minimum_run_level(ProcessAppRunLevelNormal); - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = mfg_menu_app_get_info(), + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = mfg_menu_app_get_info(), }); } @@ -41,4 +41,3 @@ bool mfg_is_mfg_mode(void) { void command_enter_mfg(void) { mfg_enter_mfg_mode_and_launch_app(); } - diff --git a/src/fw/mfg/mfg_mode/mfg_factory_mode.h b/src/fw/mfg/mfg_mode/mfg_factory_mode.h index 3a4c381e20..c0c923dd45 100644 --- a/src/fw/mfg/mfg_mode/mfg_factory_mode.h +++ b/src/fw/mfg/mfg_mode/mfg_factory_mode.h @@ -12,4 +12,3 @@ void mfg_enter_mfg_mode(void); void mfg_enter_mfg_mode_and_launch_app(void); bool mfg_is_mfg_mode(void); - diff --git a/src/fw/mfg/mfg_serials.c b/src/fw/mfg/mfg_serials.c index e6d099c61e..acc0739ccd 100644 --- a/src/fw/mfg/mfg_serials.c +++ b/src/fw/mfg/mfg_serials.c @@ -9,23 +9,20 @@ #include "pbl/util/size.h" static const uint8_t OTP_SERIAL_SLOT_INDICES[] = { - OTP_SERIAL, -}; -static const uint8_t OTP_PCBA_SLOT_INDICES[] = { - OTP_PCBA_SERIAL -}; -static const uint8_t OTP_HWVER_SLOT_INDICES[] = { - OTP_HWVER + OTP_SERIAL, }; +static const uint8_t OTP_PCBA_SLOT_INDICES[] = {OTP_PCBA_SERIAL}; +static const uint8_t OTP_HWVER_SLOT_INDICES[] = {OTP_HWVER}; static const char DUMMY_SERIAL[MFG_SERIAL_NUMBER_SIZE + 1] = "XXXXXXXXXXXX"; // FIXME: shouldn't the dummy HWVER be 9 X's? static const char DUMMY_HWVER[MFG_HW_VERSION_SIZE + 1] = "XXXXXXXX"; static const char DUMMY_PCBA_SERIAL[MFG_PCBA_SERIAL_NUMBER_SIZE + 1] = "XXXXXXXXXXXX"; -static void mfg_print_feedback(const MfgSerialsResult result, const uint8_t index, const char *value, const char *name); +static void mfg_print_feedback(const MfgSerialsResult result, const uint8_t index, + const char *value, const char *name); -const char* mfg_get_serial_number(void) { +const char *mfg_get_serial_number(void) { // Trying from "most recent" slot to "least recent": for (int i = ARRAY_LENGTH(OTP_SERIAL_SLOT_INDICES) - 1; i >= 0; --i) { const uint8_t index = OTP_SERIAL_SLOT_INDICES[i]; @@ -36,7 +33,7 @@ const char* mfg_get_serial_number(void) { return DUMMY_SERIAL; } -const char* mfg_get_hw_version(void) { +const char *mfg_get_hw_version(void) { // Trying from "most recent" slot to "least recent": for (int i = ARRAY_LENGTH(OTP_HWVER_SLOT_INDICES) - 1; i >= 0; --i) { const uint8_t index = OTP_HWVER_SLOT_INDICES[i]; @@ -47,7 +44,7 @@ const char* mfg_get_hw_version(void) { return DUMMY_HWVER; } -const char* mfg_get_pcba_serial_number(void) { +const char *mfg_get_pcba_serial_number(void) { // Trying from "most recent" slot to "least recent": for (int i = ARRAY_LENGTH(OTP_PCBA_SLOT_INDICES) - 1; i >= 0; --i) { const uint8_t index = OTP_PCBA_SLOT_INDICES[i]; @@ -75,9 +72,8 @@ static MfgSerialsResult prv_mfg_write_data_to_slot(const uint8_t *slot_indices, return MfgSerialsResultFailNoMoreSpace; } -MfgSerialsResult mfg_write_serial_number(const char* serial, size_t serial_size, +MfgSerialsResult mfg_write_serial_number(const char *serial, size_t serial_size, uint8_t *out_index) { - if ((serial_size != (MFG_SERIAL_NUMBER_SIZE)) || (serial[serial_size] != '\0')) { return MfgSerialsResultFailIncorrectLength; } @@ -86,9 +82,8 @@ MfgSerialsResult mfg_write_serial_number(const char* serial, size_t serial_size, serial, serial_size, out_index); } -MfgSerialsResult mfg_write_pcba_serial_number(const char* serial, size_t serial_size, +MfgSerialsResult mfg_write_pcba_serial_number(const char *serial, size_t serial_size, uint8_t *out_index) { - if ((serial_size > MFG_PCBA_SERIAL_NUMBER_SIZE) || (serial[serial_size] != '\0')) { return MfgSerialsResultFailIncorrectLength; } @@ -97,7 +92,7 @@ MfgSerialsResult mfg_write_pcba_serial_number(const char* serial, size_t serial_ serial, serial_size, out_index); } -static MfgSerialsResult prv_mfg_write_hw_version(const char* hwver, size_t hwver_size, +static MfgSerialsResult prv_mfg_write_hw_version(const char *hwver, size_t hwver_size, uint8_t *out_index) { if ((hwver_size > MFG_HW_VERSION_SIZE) || hwver[hwver_size] != '\0') { return MfgSerialsResultFailIncorrectLength; @@ -165,7 +160,7 @@ static void mfg_print_feedback(const MfgSerialsResult result, const uint8_t inde switch (result) { case MfgSerialsResultAlreadyWritten: { char buffer[48]; - const char * const field = otp_get_slot(index); + const char *const field = otp_get_slot(index); prompt_send_response_fmt(buffer, sizeof(buffer), "%s already present! %s", name, field); break; } @@ -199,7 +194,7 @@ static void mfg_print_feedback(const MfgSerialsResult result, const uint8_t inde #ifndef CONFIG_SOC_NRF52 static void prv_get_not_so_unique_serial(char *serial_number) { // Contains 96 bits (12 bytes) that uniquely identify the STM32F2/F4 MCUs: - const uint8_t *DEVICE_ID_REGISTER = (const uint8_t *) 0x1FFF7A10; + const uint8_t *DEVICE_ID_REGISTER = (const uint8_t *)0x1FFF7A10; // BBs used the first bytes of the ID registers, which happened to be not very unique... for (int i = 2, r = 7; i < MFG_SERIAL_NUMBER_SIZE; i += 2, ++r) { sniprintf(&serial_number[i], 3 /* 2 hex digits + zero terminator */, "%02X", @@ -229,9 +224,8 @@ void mfg_write_bigboard_serial_number(void) { prv_get_not_so_unique_serial(serial_number); #endif const char *current_serial_number = mfg_get_serial_number(); - - if (strcmp(current_serial_number, serial_number) && - strcmp(current_serial_number, DUMMY_SERIAL)) { + + if (strcmp(current_serial_number, serial_number) && strcmp(current_serial_number, DUMMY_SERIAL)) { return; } @@ -241,4 +235,3 @@ void mfg_write_bigboard_serial_number(void) { } } #endif - diff --git a/src/fw/mfg/mfg_serials.h b/src/fw/mfg/mfg_serials.h index 7d8ed5bb1e..5727f6755a 100644 --- a/src/fw/mfg/mfg_serials.h +++ b/src/fw/mfg/mfg_serials.h @@ -17,9 +17,9 @@ //! @return The last written final assembly serial number or "XXXXXXXXXXXX" if //! no serial number has been written. -const char* mfg_get_serial_number(void); -const char* mfg_get_hw_version(void); -const char* mfg_get_pcba_serial_number(void); +const char *mfg_get_serial_number(void); +const char *mfg_get_hw_version(void); +const char *mfg_get_pcba_serial_number(void); typedef enum MfgSerialsResult { MfgSerialsResultSuccess = OtpWriteSuccess, @@ -40,7 +40,8 @@ typedef enum MfgSerialsResult { //! @return OtpWriteSuccess if the write was successful or //! MfgSerialsResultFailNoMoreSpace if all 3 slots were taken already, or //! MfgSerialsResultFailIncorrectLength if the serial_size was not 13. -MfgSerialsResult mfg_write_serial_number(const char* serial, size_t serial_size, uint8_t *out_index); +MfgSerialsResult mfg_write_serial_number(const char *serial, size_t serial_size, + uint8_t *out_index); #if defined(CONFIG_IS_BIGBOARD) //! Writes a fake serial number based on the unique identifier of the MCU diff --git a/src/fw/mfg/obelix/mfg_info.c b/src/fw/mfg/obelix/mfg_info.c index ab94e5bc33..70974dfc60 100644 --- a/src/fw/mfg/obelix/mfg_info.c +++ b/src/fw/mfg/obelix/mfg_info.c @@ -11,27 +11,27 @@ typedef struct { uint32_t data_version; uint32_t color; - char model[MFG_INFO_MODEL_STRING_LENGTH]; //!< Null terminated model string - uint8_t vibe_cali; //!< Vibration motor trim, MFG_INFO_VIBE_CALI_INVALID if unset + char model[MFG_INFO_MODEL_STRING_LENGTH]; //!< Null terminated model string + uint8_t vibe_cali; //!< Vibration motor trim, MFG_INFO_VIBE_CALI_INVALID if unset } MfgData; static void prv_update_struct(const MfgData *data) { flash_erase_subsector_blocking(FLASH_REGION_MFG_INFO_BEGIN); - flash_write_bytes((const uint8_t*) data, FLASH_REGION_MFG_INFO_BEGIN, sizeof(*data)); + flash_write_bytes((const uint8_t *)data, FLASH_REGION_MFG_INFO_BEGIN, sizeof(*data)); } static MfgData prv_fetch_struct(void) { MfgData result; - flash_read_bytes((uint8_t*) &result, FLASH_REGION_MFG_INFO_BEGIN, sizeof(result)); + flash_read_bytes((uint8_t *)&result, FLASH_REGION_MFG_INFO_BEGIN, sizeof(result)); // Fallback data if not available if (result.data_version != CURRENT_DATA_VERSION) { - result.data_version = CURRENT_DATA_VERSION; - result.color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY; - strncpy(result.model, "obelix", sizeof(result.model)); - result.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; - result.vibe_cali = MFG_INFO_VIBE_CALI_INVALID; + result.data_version = CURRENT_DATA_VERSION; + result.color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY; + strncpy(result.model, "obelix", sizeof(result.model)); + result.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; + result.vibe_cali = MFG_INFO_VIBE_CALI_INVALID; } return result; @@ -47,12 +47,12 @@ void mfg_info_set_watch_color(WatchInfoColor color) { prv_update_struct(&data); } -void mfg_info_get_model(char* buffer) { +void mfg_info_get_model(char *buffer) { MfgData data = prv_fetch_struct(); strcpy(buffer, data.model); } -void mfg_info_set_model(const char* model) { +void mfg_info_set_model(const char *model) { MfgData data = prv_fetch_struct(); strncpy(data.model, model, sizeof(data.model)); data.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; diff --git a/src/fw/mfg/qemu/mfg_info.c b/src/fw/mfg/qemu/mfg_info.c index c2c3a0a150..15f994e110 100644 --- a/src/fw/mfg/qemu/mfg_info.c +++ b/src/fw/mfg/qemu/mfg_info.c @@ -11,49 +11,49 @@ typedef struct { uint32_t data_version; uint32_t color; - char model[MFG_INFO_MODEL_STRING_LENGTH]; //!< Null terminated model string - uint8_t vibe_cali; //!< Vibration motor trim, MFG_INFO_VIBE_CALI_INVALID if unset + char model[MFG_INFO_MODEL_STRING_LENGTH]; //!< Null terminated model string + uint8_t vibe_cali; //!< Vibration motor trim, MFG_INFO_VIBE_CALI_INVALID if unset } MfgData; static void prv_update_struct(const MfgData *data) { flash_erase_subsector_blocking(FLASH_REGION_MFG_INFO_BEGIN); - flash_write_bytes((const uint8_t*) data, FLASH_REGION_MFG_INFO_BEGIN, sizeof(*data)); + flash_write_bytes((const uint8_t *)data, FLASH_REGION_MFG_INFO_BEGIN, sizeof(*data)); } static MfgData prv_fetch_struct(void) { MfgData result; - flash_read_bytes((uint8_t*) &result, FLASH_REGION_MFG_INFO_BEGIN, sizeof(result)); + flash_read_bytes((uint8_t *)&result, FLASH_REGION_MFG_INFO_BEGIN, sizeof(result)); // Fallback data if not available if (result.data_version != CURRENT_DATA_VERSION) { - result.data_version = CURRENT_DATA_VERSION; + result.data_version = CURRENT_DATA_VERSION; #if defined(CONFIG_QEMU_WATCH_COLOR_PR2_BLACK_20) - result.color = WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20; + result.color = WATCH_INFO_COLOR_COREDEVICES_PR2_BLACK_20; #elif defined(CONFIG_QEMU_WATCH_COLOR_PR2_SILVER_14) - result.color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14; + result.color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_14; #elif defined(CONFIG_QEMU_WATCH_COLOR_PR2_SILVER_20) - result.color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20; + result.color = WATCH_INFO_COLOR_COREDEVICES_PR2_SILVER_20; #elif defined(CONFIG_QEMU_WATCH_COLOR_PR2_GOLD_14) - result.color = WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14; + result.color = WATCH_INFO_COLOR_COREDEVICES_PR2_GOLD_14; #elif defined(CONFIG_QEMU_WATCH_COLOR_PT2_BLACK_GREY) - result.color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY; + result.color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_GREY; #elif defined(CONFIG_QEMU_WATCH_COLOR_PT2_BLACK_RED) - result.color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_RED; + result.color = WATCH_INFO_COLOR_COREDEVICES_PT2_BLACK_RED; #elif defined(CONFIG_QEMU_WATCH_COLOR_PT2_SILVER_BLUE) - result.color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_BLUE; + result.color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_BLUE; #elif defined(CONFIG_QEMU_WATCH_COLOR_PT2_SILVER_GREY) - result.color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_GREY; + result.color = WATCH_INFO_COLOR_COREDEVICES_PT2_SILVER_GREY; #elif defined(CONFIG_QEMU_WATCH_COLOR_P2D_BLACK) - result.color = WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK; + result.color = WATCH_INFO_COLOR_COREDEVICES_P2D_BLACK; #elif defined(CONFIG_QEMU_WATCH_COLOR_P2D_WHITE) - result.color = WATCH_INFO_COLOR_COREDEVICES_P2D_WHITE; + result.color = WATCH_INFO_COLOR_COREDEVICES_P2D_WHITE; #else - result.color = WATCH_INFO_COLOR_UNKNOWN; + result.color = WATCH_INFO_COLOR_UNKNOWN; #endif - strncpy(result.model, "qemu", sizeof(result.model)); - result.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; - result.vibe_cali = MFG_INFO_VIBE_CALI_INVALID; + strncpy(result.model, "qemu", sizeof(result.model)); + result.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; + result.vibe_cali = MFG_INFO_VIBE_CALI_INVALID; } return result; @@ -69,12 +69,12 @@ void mfg_info_set_watch_color(WatchInfoColor color) { prv_update_struct(&data); } -void mfg_info_get_model(char* buffer) { +void mfg_info_get_model(char *buffer) { MfgData data = prv_fetch_struct(); strcpy(buffer, data.model); } -void mfg_info_set_model(const char* model) { +void mfg_info_set_model(const char *model) { MfgData data = prv_fetch_struct(); strncpy(data.model, model, sizeof(data.model)); data.model[MFG_INFO_MODEL_STRING_LENGTH - 1] = '\0'; diff --git a/src/fw/popups/alarm_popup.c b/src/fw/popups/alarm_popup.c index da0ed208ae..dbd93681c2 100644 --- a/src/fw/popups/alarm_popup.c +++ b/src/fw/popups/alarm_popup.c @@ -106,10 +106,9 @@ typedef struct { AlarmPopupData *s_alarm_popup_data = NULL; - static void prv_stop_animation_kernel_main_cb(void *callback_context) { if (s_alarm_popup_data) { - dialog_set_icon((Dialog *) s_alarm_popup_data->alarm_popup, + dialog_set_icon((Dialog *)s_alarm_popup_data->alarm_popup, RESOURCE_ID_ALARM_CLOCK_LARGE_STATIC); } } @@ -129,8 +128,7 @@ static void prv_stop_vibes(void) { #ifdef CONFIG_SPEAKER static void prv_play_sound_loop_iteration(void) { - speaker_service_play_note_seq(s_alarm_popup_data->sound_notes, - s_alarm_popup_data->sound_count, + speaker_service_play_note_seq(s_alarm_popup_data->sound_notes, s_alarm_popup_data->sound_count, SpeakerPriorityCritical, ALARM_SPEAKER_VOLUME); } @@ -166,9 +164,9 @@ static void prv_start_sound(AlarmId id, bool vibe_driving_loop) { return; } - s_alarm_popup_data->speaker_event_info = (EventServiceInfo) { - .type = PEBBLE_SPEAKER_EVENT, - .handler = prv_handle_speaker_event, + s_alarm_popup_data->speaker_event_info = (EventServiceInfo){ + .type = PEBBLE_SPEAKER_EVENT, + .handler = prv_handle_speaker_event, }; event_service_client_subscribe(&s_alarm_popup_data->speaker_event_info); speaker_service_register_finish(PebbleTask_KernelMain); @@ -178,9 +176,9 @@ static void prv_start_sound(AlarmId id, bool vibe_driving_loop) { // paired_vibe column in s_tones[]). For any other combination the cycle // lengths and beats won't line up, so each side loops on its own cadence. const VibeScoreId paired = alarm_tones_get_paired_vibe(info.tone); - const bool tones_match = vibe_driving_loop && - paired != VibeScoreId_Invalid && - paired == alerts_preferences_get_vibe_score_for_client(VibeClient_Alarms); + const bool tones_match = + vibe_driving_loop && paired != VibeScoreId_Invalid && + paired == alerts_preferences_get_vibe_score_for_client(VibeClient_Alarms); s_alarm_popup_data->sound_active = true; s_alarm_popup_data->sound_driven_by_vibe_timer = tones_match; if (!tones_match) { @@ -206,7 +204,7 @@ static void prv_stop_sound(void) { // ---------------------------------------------------------------------------------------------- //! Vibe Timer #define TINTIN_VIBE_REPEAT_INTERVAL_MS (1000) -#define TINTIN_MAX_VIBES (10 * 60) // 10 minutes at 1 vibe a second +#define TINTIN_MAX_VIBES (10 * 60) // 10 minutes at 1 vibe a second #define TINTIN_LPM_VIBES_PER_MINUTE (10) #define VIBE_DURATION (10 * SECONDS_PER_MINUTE * MS_PER_SECOND) static void prv_vibe_kernel_main_cb(void *callback_context) { @@ -220,13 +218,11 @@ static void prv_vibe_kernel_main_cb(void *callback_context) { vibes_long_pulse(); } #ifdef CONFIG_SPEAKER - if (s_alarm_popup_data->sound_active && - s_alarm_popup_data->sound_driven_by_vibe_timer) { + if (s_alarm_popup_data->sound_active && s_alarm_popup_data->sound_driven_by_vibe_timer) { prv_play_sound_loop_iteration(); } #endif - } - else { + } else { prv_stop_vibes(); launcher_task_add_callback(prv_stop_animation_kernel_main_cb, NULL); // Auto-dismiss the alarm after the vibration period ends @@ -252,7 +248,7 @@ static void prv_start_vibes(void) { unsigned int vibe_repeat_interval_ms = 0; if (s_alarm_popup_data->vibe_score) { vibe_repeat_interval_ms = vibe_score_get_duration_ms(s_alarm_popup_data->vibe_score) + - vibe_score_get_repeat_delay_ms(s_alarm_popup_data->vibe_score); + vibe_score_get_repeat_delay_ms(s_alarm_popup_data->vibe_score); } if (vibe_repeat_interval_ms == 0) { // Missing (e.g. resource load failure under memory pressure) or empty @@ -262,15 +258,15 @@ static void prv_start_vibes(void) { vibe_score_destroy(s_alarm_popup_data->vibe_score); s_alarm_popup_data->vibe_score = NULL; } - vibe_repeat_interval_ms = low_power_is_active() - ? (SECONDS_PER_MINUTE * MS_PER_SECOND / TINTIN_LPM_VIBES_PER_MINUTE) - : TINTIN_VIBE_REPEAT_INTERVAL_MS; + vibe_repeat_interval_ms = + low_power_is_active() ? (SECONDS_PER_MINUTE * MS_PER_SECOND / TINTIN_LPM_VIBES_PER_MINUTE) + : TINTIN_VIBE_REPEAT_INTERVAL_MS; } s_alarm_popup_data->max_vibes = DIVIDE_CEIL(VIBE_DURATION, vibe_repeat_interval_ms); s_alarm_popup_data->vibe_timer = new_timer_create(); prv_vibe(NULL); - new_timer_start(s_alarm_popup_data->vibe_timer, vibe_repeat_interval_ms, prv_vibe, - NULL, TIMER_START_FLAG_REPEATING); + new_timer_start(s_alarm_popup_data->vibe_timer, vibe_repeat_interval_ms, prv_vibe, NULL, + TIMER_START_FLAG_REPEATING); } // ---------------------------------------------------------------------------------------------- @@ -344,7 +340,7 @@ void alarm_popup_push_window(PebbleAlarmClockEvent *event) { s_alarm_popup_data->alarm_popup = actionable_dialog_create("Alarm Popup"); actionable_dialog_set_action_bar_type(s_alarm_popup_data->alarm_popup, DialogActionBarCustom, - &s_alarm_popup_data->action_bar); + &s_alarm_popup_data->action_bar); Dialog *dialog = actionable_dialog_get_dialog(s_alarm_popup_data->alarm_popup); char display_time[16]; @@ -359,7 +355,7 @@ void alarm_popup_push_window(PebbleAlarmClockEvent *event) { dialog_set_icon(dialog, RESOURCE_ID_ALARM_CLOCK_LARGE); dialog_set_background_color(dialog, GColorJaegerGreen); DialogCallbacks callback = { - .unload = prv_cleanup_alarm_popup, + .unload = prv_cleanup_alarm_popup, }; dialog_set_callbacks(dialog, &callback, NULL); actionable_dialog_push(s_alarm_popup_data->alarm_popup, prv_get_window_stack()); @@ -370,8 +366,7 @@ void alarm_popup_push_window(PebbleAlarmClockEvent *event) { // get ALARM_INVALID_ID and skip the per-alarm config lookup. const AlarmId alarm_id = alarm_get_most_recent_id(); AlarmInfo info; - const bool have_info = (alarm_id != ALARM_INVALID_ID) && - alarm_get_info(alarm_id, &info); + const bool have_info = (alarm_id != ALARM_INVALID_ID) && alarm_get_info(alarm_id, &info); const bool vibe_on = !have_info || info.vibrate_enabled; if (vibe_on) { prv_start_vibes(); diff --git a/src/fw/popups/alarm_popup.h b/src/fw/popups/alarm_popup.h index 10a532af6b..f76776f1df 100644 --- a/src/fw/popups/alarm_popup.h +++ b/src/fw/popups/alarm_popup.h @@ -11,4 +11,4 @@ #define ALARM_SPEAKER_VOLUME 100 #endif -void alarm_popup_push_window(PebbleAlarmClockEvent* e); +void alarm_popup_push_window(PebbleAlarmClockEvent *e); diff --git a/src/fw/popups/ble_hrm/ble_hrm_reminder_popup.c b/src/fw/popups/ble_hrm/ble_hrm_reminder_popup.c index 362d07d847..66aa50d10f 100644 --- a/src/fw/popups/ble_hrm/ble_hrm_reminder_popup.c +++ b/src/fw/popups/ble_hrm/ble_hrm_reminder_popup.c @@ -11,12 +11,12 @@ void ble_hrm_push_reminder_popup(void) { AttributeList attr_list = {}; - const char *body = i18n_get("Your heart rate has been shared with an app on your phone for " - "several hours. This could affect your battery. Stop sharing now?", - &attr_list); + const char *body = i18n_get( + "Your heart rate has been shared with an app on your phone for " + "several hours. This could affect your battery. Stop sharing now?", + &attr_list); attribute_list_add_cstring(&attr_list, AttributeIdBody, body); - attribute_list_add_uint32(&attr_list, AttributeIdIconTiny, - TIMELINE_RESOURCE_BLE_HRM_SHARING); + attribute_list_add_uint32(&attr_list, AttributeIdIconTiny, TIMELINE_RESOURCE_BLE_HRM_SHARING); attribute_list_add_uint8(&attr_list, AttributeIdBgColor, GColorOrangeARGB8); AttributeList dismiss_action_attr_list = {}; @@ -28,25 +28,24 @@ void ble_hrm_push_reminder_popup(void) { i18n_get("Stop Sharing Heart Rate", &attr_list)); TimelineItemActionGroup action_group = { - .num_actions = 2, - .actions = (TimelineItemAction[]) { - { - .id = 0, - .type = TimelineItemActionTypeDismiss, - .attr_list = dismiss_action_attr_list, + .num_actions = 2, + .actions = (TimelineItemAction[]){ + { + .id = 0, + .type = TimelineItemActionTypeDismiss, + .attr_list = dismiss_action_attr_list, + }, + { + .id = 1, + .type = TimelineItemActionTypeBLEHRMStopSharing, + .attr_list = stop_action_attr_list, + }, }, - { - .id = 1, - .type = TimelineItemActionTypeBLEHRMStopSharing, - .attr_list = stop_action_attr_list, - }, - }, }; - TimelineItem *item = timeline_item_create_with_attributes(rtc_get_time(), 0, - TimelineItemTypeNotification, - LayoutIdNotification, &attr_list, - &action_group); + TimelineItem *item = + timeline_item_create_with_attributes(rtc_get_time(), 0, TimelineItemTypeNotification, + LayoutIdNotification, &attr_list, &action_group); i18n_free_all(&attr_list); attribute_list_destroy_list(&attr_list); attribute_list_destroy_list(&dismiss_action_attr_list); diff --git a/src/fw/popups/ble_hrm/ble_hrm_sharing_popup.c b/src/fw/popups/ble_hrm/ble_hrm_sharing_popup.c index 88627df0b1..a7630a14d5 100644 --- a/src/fw/popups/ble_hrm/ble_hrm_sharing_popup.c +++ b/src/fw/popups/ble_hrm/ble_hrm_sharing_popup.c @@ -68,10 +68,10 @@ void ble_hrm_push_sharing_request_window(BLEHRMSharingRequest *sharing_request) actionable_dialog_push(a_dialog, modal_manager_get_window_stack(ModalPriorityGeneric)); - const uint32_t heart_beat_durations[] = { 100, 100, 150, 600, 100, 100, 150 }; + const uint32_t heart_beat_durations[] = {100, 100, 150, 600, 100, 100, 150}; VibePattern heart_beat_pattern = { - .durations = heart_beat_durations, - .num_segments = ARRAY_LENGTH(heart_beat_durations), + .durations = heart_beat_durations, + .num_segments = ARRAY_LENGTH(heart_beat_durations), }; vibes_enqueue_custom_pattern(heart_beat_pattern); } diff --git a/src/fw/popups/bluetooth_pairing_ui.c b/src/fw/popups/bluetooth_pairing_ui.c index 0ac7cd0291..904b56b5a2 100644 --- a/src/fw/popups/bluetooth_pairing_ui.c +++ b/src/fw/popups/bluetooth_pairing_ui.c @@ -32,7 +32,7 @@ #define MAX_PAIR_STR_LEN 16 typedef enum { - BTPairingUIStateAwaitingUserConfirmation, // It's possible to go from here straight to Failed + BTPairingUIStateAwaitingUserConfirmation, // It's possible to go from here straight to Failed BTPairingUIStateAwaitingResult, BTPairingUIStateSuccess, BTPairingUIStateFailed, @@ -99,7 +99,6 @@ static void prv_cleanup_prf_animations(BTPairingUIData *data) { layer_set_hidden(&data->info_text_layer2.layer, true); } - typedef struct { const char *string; const char *font_key; @@ -119,16 +118,16 @@ static void prv_update_prf_info_text_layers_text(BTPairingUIData *data) { const char *font_key_default = FONT_KEY_GOTHIC_24_BOLD; const char *font_key_japanese = FONT_KEY_MINCHO_20_PAIR; #endif - const Translation english_translation = { "Pair?", font_key_default }; + const Translation english_translation = {"Pair?", font_key_default}; const Translation translations[] = { - { "Koppeln?", font_key_default }, // German - { "Jumeler?", font_key_default }, // French - { "¿Enlazar?", font_key_default }, // Spanish - { "Associare?", font_key_default }, // Italian - { "Emparelhar?", font_key_default }, // Portuguese - { "ペアリング", font_key_japanese }, // Japanese - { "配对", font_key_default }, // Chinese (traditional?) - { "配對", font_key_default } // Chinese (simplified?) + {"Koppeln?", font_key_default}, // German + {"Jumeler?", font_key_default}, // French + {"¿Enlazar?", font_key_default}, // Spanish + {"Associare?", font_key_default}, // Italian + {"Emparelhar?", font_key_default}, // Portuguese + {"ペアリング", font_key_japanese}, // Japanese + {"配对", font_key_default}, // Chinese (traditional?) + {"配對", font_key_default} // Chinese (simplified?) }; // The strings should be displayed in the following pattern: @@ -166,11 +165,9 @@ static void prv_add_prf_layers(GRect pair_text_area, BTPairingUIData *data) { data->above_pair_text_area = above_pair_text; TextLayer *info_text_layer2 = &data->info_text_layer2; - text_layer_init_with_parameters(info_text_layer2, - &above_pair_text, - data->info_text_layer2_buffer, - fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), - GColorBlack, GColorClear, GTextAlignmentCenter, + text_layer_init_with_parameters(info_text_layer2, &above_pair_text, data->info_text_layer2_buffer, + fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), GColorBlack, + GColorClear, GTextAlignmentCenter, GTextOverflowModeTrailingEllipsis); layer_add_child(&data->info_text_mask_layer, &info_text_layer2->layer); @@ -181,9 +178,8 @@ static void prv_add_prf_layers(GRect pair_text_area, BTPairingUIData *data) { const int animation_delay_ms = 1700; // This is the text that is currently not visible and animates into view - data->info_text_in_animation = - property_animation_create_layer_frame(&data->info_text_layer2.layer, - &above_pair_text, &pair_text_area); + data->info_text_in_animation = property_animation_create_layer_frame( + &data->info_text_layer2.layer, &above_pair_text, &pair_text_area); PBL_ASSERTN(data->info_text_in_animation); Animation *animation = property_animation_get_animation(data->info_text_in_animation); animation_set_auto_destroy(animation, false); @@ -191,9 +187,8 @@ static void prv_add_prf_layers(GRect pair_text_area, BTPairingUIData *data) { animation_set_delay(animation, animation_delay_ms); // This is the text that is currently visible and animates out of view - data->info_text_out_animation = - property_animation_create_layer_frame(&data->info_text_layer.layer, - &pair_text_area, &below_pair_text); + data->info_text_out_animation = property_animation_create_layer_frame( + &data->info_text_layer.layer, &pair_text_area, &below_pair_text); PBL_ASSERTN(data->info_text_out_animation); animation = property_animation_get_animation(data->info_text_out_animation); animation_set_auto_destroy(animation, false); @@ -202,7 +197,7 @@ static void prv_add_prf_layers(GRect pair_text_area, BTPairingUIData *data) { // We only need a stop handler for one of the animations as they should finish at the same time AnimationHandlers handlers = { - .stopped = prv_info_text_animation_stopped, + .stopped = prv_info_text_animation_stopped, }; animation_set_handlers(animation, handlers, NULL); } @@ -231,7 +226,6 @@ static void prv_deinitialize_info_text(BTPairingUIData *data) { #endif - static uint32_t prv_resource_id_for_state(BTPairingUIState state) { switch (state) { case BTPairingUIStateAwaitingUserConfirmation: @@ -341,7 +335,7 @@ static void prv_exit_awaiting_user_confirmation(BTPairingUIData *data) { } static void prv_confirm_click_handler(ClickRecognizerRef recognizer, void *ctx) { - Window *window = (Window *) ctx; + Window *window = (Window *)ctx; BTPairingUIData *data = window_get_user_data(window); PBL_ASSERTN(data->ui_state == BTPairingUIStateAwaitingUserConfirmation); prv_exit_awaiting_user_confirmation(data); @@ -351,7 +345,7 @@ static void prv_confirm_click_handler(ClickRecognizerRef recognizer, void *ctx) } static void prv_decline_click_handler(ClickRecognizerRef recognizer, void *ctx) { - Window *window = (Window *) ctx; + Window *window = (Window *)ctx; BTPairingUIData *data = window_get_user_data(window); PBL_ASSERTN(data->ui_state == BTPairingUIStateAwaitingUserConfirmation); prv_send_response(false /* is_confirmed */); @@ -373,8 +367,7 @@ static void prv_window_load(Window *window) { const int32_t width = window->layer.bounds.size.w - width_of_action_bar_with_padding; #if PBL_DISPLAY_HEIGHT >= 200 // On large round displays center the text layers on the full window width - const int32_t x_offset = - PBL_IF_RECT_ELSE(0, (window->layer.bounds.size.w - width) / 2); + const int32_t x_offset = PBL_IF_RECT_ELSE(0, (window->layer.bounds.size.w - width) / 2); const int32_t info_text_y_offset = 36; #else const int32_t x_offset = PBL_IF_RECT_ELSE(0, 22); @@ -400,9 +393,7 @@ static void prv_window_load(Window *window) { layer_add_child(&window->layer, &data->info_text_mask_layer); TextLayer *info_text_layer = &data->info_text_layer; - text_layer_init_with_parameters(info_text_layer, - &pair_text_area, - data->info_text_layer_buffer, + text_layer_init_with_parameters(info_text_layer, &pair_text_area, data->info_text_layer_buffer, #if PBL_DISPLAY_HEIGHT >= 200 fonts_get_system_font(FONT_KEY_GOTHIC_28_BOLD), #else @@ -438,23 +429,19 @@ static void prv_window_load(Window *window) { const int32_t device_name_width = width - x_offset; #endif TextLayer *device_name_layer = &data->device_name_text_layer; - text_layer_init_with_parameters(device_name_layer, - &GRect(x_offset, 122 + y_offset, device_name_width, 30), - data->device_name_layer_buffer, - fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), - GColorBlack, GColorClear, GTextAlignmentCenter, - GTextOverflowModeTrailingEllipsis); + text_layer_init_with_parameters( + device_name_layer, &GRect(x_offset, 122 + y_offset, device_name_width, 30), + data->device_name_layer_buffer, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD), GColorBlack, + GColorClear, GTextAlignmentCenter, GTextOverflowModeTrailingEllipsis); layer_add_child(&window->layer, &device_name_layer->layer); } // Confirmation token: if (prv_has_confirmation_token(data)) { TextLayer *code_text_layer = &data->code_text_layer; - text_layer_init_with_parameters(code_text_layer, - &GRect(x_offset, 148 + y_offset, width, 30), - data->code_text_layer_buffer, - fonts_get_system_font(FONT_KEY_GOTHIC_14), - GColorBlack, GColorClear, GTextAlignmentCenter, - GTextOverflowModeTrailingEllipsis); + text_layer_init_with_parameters( + code_text_layer, &GRect(x_offset, 148 + y_offset, width, 30), data->code_text_layer_buffer, + fonts_get_system_font(FONT_KEY_GOTHIC_14), GColorBlack, GColorClear, GTextAlignmentCenter, + GTextOverflowModeTrailingEllipsis); layer_add_child(&window->layer, &code_text_layer->layer); } @@ -501,7 +488,7 @@ static void prv_pop_window(void) { } } -static void prv_pop_window_kernel_main_cb(void* unused) { +static void prv_pop_window_kernel_main_cb(void *unused) { prv_pop_window(); } @@ -513,10 +500,10 @@ static void prv_push_pairing_window(void) { BTPairingUIData *data = s_data_ptr; Window *window = &data->window; window_init(window, WINDOW_NAME("Bluetooth SSP")); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_window_load, - .unload = prv_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_window_load, + .unload = prv_window_unload, + }); window_set_user_data(window, data); window_set_overrides_back_button(window, true); @@ -617,8 +604,8 @@ void bluetooth_pairing_ui_handle_event(PebbleBluetoothPairEvent *event) { if (s_data_ptr && s_data_ptr->ctx == event->ctx) { prv_handle_pairing_complete(event->success); } else { - PBL_LOG_ERR("Got complete event for unknown process %p vs %p", - (void *)event->ctx, s_data_ptr ? (void *)s_data_ptr->ctx : NULL); + PBL_LOG_ERR("Got complete event for unknown process %p vs %p", (void *)event->ctx, + s_data_ptr ? (void *)s_data_ptr->ctx : NULL); } break; @@ -632,8 +619,8 @@ void bluetooth_pairing_ui_handle_event(PebbleBluetoothPairEvent *event) { static void prv_put_pairing_event(const PebbleBluetoothPairEvent *pair_event) { PebbleEvent event = { - .type = PEBBLE_BT_PAIRING_EVENT, - .bluetooth.pair = *pair_event, + .type = PEBBLE_BT_PAIRING_EVENT, + .bluetooth.pair = *pair_event, }; event_put(&event); } @@ -644,7 +631,7 @@ static void prv_copy_string_and_move_cursor(const char *in_str, char **out_str, } size_t str_size_bytes = strlen(in_str) + 1; strncpy((char *)*cursor, in_str, str_size_bytes); - *out_str = (char *) *cursor; + *out_str = (char *)*cursor; *cursor += str_size_bytes; } @@ -668,25 +655,24 @@ void bt_driver_cb_pairing_confirm_handle_request(const PairingUserConfirmationCt char *confirmation_token_copy = NULL; prv_copy_string_and_move_cursor(confirmation_token, &confirmation_token_copy, &cursor); - *confirmation_info = (PebbleBluetoothPairingConfirmationInfo) { - .device_name = device_name_copy, - .confirmation_token = confirmation_token_copy, + *confirmation_info = (PebbleBluetoothPairingConfirmationInfo){ + .device_name = device_name_copy, + .confirmation_token = confirmation_token_copy, }; PebbleBluetoothPairEvent pair_event = { - .type = PebbleBluetoothPairEventTypePairingUserConfirmation, - .ctx = ctx, - .confirmation_info = confirmation_info, + .type = PebbleBluetoothPairEventTypePairingUserConfirmation, + .ctx = ctx, + .confirmation_info = confirmation_info, }; prv_put_pairing_event(&pair_event); } void bt_driver_cb_pairing_confirm_handle_completed(const PairingUserConfirmationCtx *ctx, bool success) { - PebbleBluetoothPairEvent pair_event = { - .type = PebbleBluetoothPairEventTypePairingComplete, - .ctx = ctx, - .success = success, + .type = PebbleBluetoothPairEventTypePairingComplete, + .ctx = ctx, + .success = success, }; prv_put_pairing_event(&pair_event); } diff --git a/src/fw/popups/crashed_ui.c b/src/fw/popups/crashed_ui.c index 150f9b942c..985eca5bd5 100644 --- a/src/fw/popups/crashed_ui.c +++ b/src/fw/popups/crashed_ui.c @@ -43,8 +43,8 @@ static void prv_worker_crash_button_up_handler(ClickRecognizerRef recognizer, vo WorkerCrashDialogData *data = context; // Push an event to launch the app for the worker that crashed - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = data->app_install_id, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = data->app_install_id, }); // Pop the worker crash dialog @@ -90,17 +90,14 @@ static char *prv_create_worker_crash_reason_string(AppInstallId app_install_id) const uint8_t CRASH_REASON_BUFFER_SIZE = 7 + 1 + MAX_APP_NAME_STRING_LENGTH + 32 + 1; char *crash_reason = kernel_zalloc_check(CRASH_REASON_BUFFER_SIZE); const char *crash_str = i18n_noop("%s%.*s is not responding.\n\nOpen app?"); - sniprintf(crash_reason, CRASH_REASON_BUFFER_SIZE, - i18n_get(crash_str, crash_reason), - app_found ? " " : "", - MAX_APP_NAME_STRING_LENGTH, - app_found ? entry.name : ""); + sniprintf(crash_reason, CRASH_REASON_BUFFER_SIZE, i18n_get(crash_str, crash_reason), + app_found ? " " : "", MAX_APP_NAME_STRING_LENGTH, app_found ? entry.name : ""); i18n_free(crash_str, crash_reason); return crash_reason; } static void prv_push_worker_crash_dialog(void *context) { - const AppInstallId app_install_id = (AppInstallId) context; + const AppInstallId app_install_id = (AppInstallId)context; WorkerCrashDialogData *data = kernel_zalloc_check(sizeof(WorkerCrashDialogData)); data->app_install_id = app_install_id; @@ -131,12 +128,8 @@ static void prv_push_worker_crash_dialog(void *context) { Dialog *dialog = actionable_dialog_get_dialog(data->actionable_dialog); prv_configure_crash_dialog(dialog, crash_reason); kernel_free(crash_reason); - actionable_dialog_set_action_bar_type(data->actionable_dialog, - DialogActionBarCustom, - action_bar); - DialogCallbacks callbacks = (DialogCallbacks) { - .unload = prv_worker_crash_dialog_unload - }; + actionable_dialog_set_action_bar_type(data->actionable_dialog, DialogActionBarCustom, action_bar); + DialogCallbacks callbacks = (DialogCallbacks){.unload = prv_worker_crash_dialog_unload}; dialog_set_callbacks(dialog, &callbacks, data); // Push the worker crash actionable dialog @@ -146,13 +139,14 @@ static void prv_push_worker_crash_dialog(void *context) { } void crashed_ui_show_worker_crash(const AppInstallId install_id) { - launcher_task_add_callback(prv_push_worker_crash_dialog, (void *) install_id); + launcher_task_add_callback(prv_push_worker_crash_dialog, (void *)install_id); } // --------------------------------------------------------------------------- -#define CORE_DUMP_COMPLETE \ - i18n_noop("A bug report has been captured. " \ - "Please finish uploading the bug report using the Pebble phone app.") +#define CORE_DUMP_COMPLETE \ + i18n_noop( \ + "A bug report has been captured. " \ + "Please finish uploading the bug report using the Pebble phone app.") //! Display a dialog for watch reset or bluetooth being stuck. static void prv_push_reset_dialog(void *context) { diff --git a/src/fw/popups/health_tracking_ui.c b/src/fw/popups/health_tracking_ui.c index 19103289d3..5cf76d5080 100644 --- a/src/fw/popups/health_tracking_ui.c +++ b/src/fw/popups/health_tracking_ui.c @@ -17,7 +17,7 @@ typedef struct HealthTrackingUIData { bool show_action_bar; } HealthTrackingUIData; -static AppInstallId s_last_app_id; +static AppInstallId s_last_app_id; // --------------------------------------------------------------------------- static WindowStack *prv_get_window_stack(void) { @@ -60,9 +60,9 @@ static void prv_push_enable_in_mobile_dialog(void *context) { void health_tracking_ui_show_message(uint32_t res_id, const char *text, bool show_action_bar) { HealthTrackingUIData *data = kernel_malloc(sizeof(HealthTrackingUIData)); *data = (HealthTrackingUIData){ - .res_id = res_id, - .text = text, - .show_action_bar = show_action_bar, + .res_id = res_id, + .text = text, + .show_action_bar = show_action_bar, }; launcher_task_add_callback(prv_push_enable_in_mobile_dialog, data); @@ -71,9 +71,9 @@ void health_tracking_ui_show_message(uint32_t res_id, const char *text, bool sho // --------------------------------------------------------------------------- void health_tracking_ui_feature_show_disabled(void) { /// Feature requires health dialog - static const char *msg = - i18n_noop("This feature requires Pebble Health to work. Enable Health in the Pebble" - " mobile app to continue."); + static const char *msg = i18n_noop( + "This feature requires Pebble Health to work. Enable Health in the Pebble" + " mobile app to continue."); health_tracking_ui_show_message(RESOURCE_ID_GENERIC_WARNING_TINY, msg, false); } diff --git a/src/fw/popups/notifications/notification_window.c b/src/fw/popups/notifications/notification_window.c index 30b058ec14..adb2d373f9 100644 --- a/src/fw/popups/notifications/notification_window.c +++ b/src/fw/popups/notifications/notification_window.c @@ -107,8 +107,7 @@ static void prv_toggle_dnd_from_back_click(ClickRecognizerRef recognizer, void * do_not_disturb_manual_toggle_with_dialog(); } -static void prv_toggle_dnd_from_action_menu(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_toggle_dnd_from_action_menu(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { // This function handles first-time use tutorial logic do_not_disturb_toggle_manually_enabled(ManualDNDFirstUseSourceActionMenu); @@ -147,8 +146,7 @@ static void prv_update_status_layer(NotificationWindowData *data) { } else { // if more than one, then show the current index in relation to the total number status_bar_layer_set_info_progress(&data->status_layer, - notifications_presented_list_current_idx() + 1, - notif_count); + notifications_presented_list_current_idx() + 1, notif_count); } } @@ -181,8 +179,8 @@ static void prv_pop_notification_window(NotificationWindowData *data) { } static int prv_reminders_on_top_comparator(void *a, void *b) { - NotifList *notif_a = (NotifList*) a; - NotifList *notif_b = (NotifList*) b; + NotifList *notif_a = (NotifList *)a; + NotifList *notif_b = (NotifList *)b; NotificationType type_a = notif_a->notif.type; NotificationType type_b = notif_b->notif.type; @@ -223,7 +221,7 @@ static void prv_reload_swap_layer(NotificationWindowData *data) { ///////////////////// static void prv_handle_dismiss_all_complete(bool succeeded, void *cb_data) { - NotificationWindowData *window_data = (NotificationWindowData*) cb_data; + NotificationWindowData *window_data = (NotificationWindowData *)cb_data; window_data->window_frozen = false; if (s_in_use && succeeded) { prv_pop_notification_window(window_data); @@ -231,7 +229,7 @@ static void prv_handle_dismiss_all_complete(bool succeeded, void *cb_data) { } static void prv_dismiss_all(void *data, ActionMenu *action_menu) { - NotificationWindowData *window_data = (NotificationWindowData*) data; + NotificationWindowData *window_data = (NotificationWindowData *)data; const int num_notifications = notifications_presented_list_count(); if (num_notifications == 0) { @@ -250,19 +248,15 @@ static void prv_dismiss_all(void *data, ActionMenu *action_menu) { PBL_LOG_DBG("Dismissing %d notifications", num_notifications); window_data->window_frozen = true; - timeline_actions_dismiss_all(notif_list, - num_notifications, - action_menu, - prv_handle_dismiss_all_complete, - data); + timeline_actions_dismiss_all(notif_list, num_notifications, action_menu, + prv_handle_dismiss_all_complete, data); kernel_free(notif_list); } -static void prv_dismiss_all_action_cb(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_dismiss_all_action_cb(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { - NotificationWindowData *window_data = (NotificationWindowData*) item->action_data; + NotificationWindowData *window_data = (NotificationWindowData *)item->action_data; prv_dismiss_all(window_data, action_menu); } @@ -348,14 +342,14 @@ static void prv_hide_peek_layer(void *context) { const int16_t peek_circle_vertical_offset = (BANNER_CIRCLE_RADIUS - (DISP_ROWS / 2)) / 2; peek_frame_animation_dy -= peek_circle_vertical_offset; #endif - Animation *peek_up = prv_create_anim_frame((Layer *)data->peek_layer, peek_frame_animation_dy, - false /* scroll */); - Animation *swap_up = prv_create_anim_frame((Layer *)&data->swap_layer, swap_frame_animation_dy, - true /* scroll */); + Animation *peek_up = + prv_create_anim_frame((Layer *)data->peek_layer, peek_frame_animation_dy, false /* scroll */); + Animation *swap_up = + prv_create_anim_frame((Layer *)&data->swap_layer, swap_frame_animation_dy, true /* scroll */); Animation *spawn = animation_spawn_create(peek_up, swap_up, NULL); AnimationHandlers anim_handlers = { - .started = NULL, - .stopped = prv_peek_anim_stopped, + .started = NULL, + .stopped = prv_peek_anim_stopped, }; animation_set_handlers(spawn, anim_handlers, data); @@ -378,16 +372,13 @@ static void prv_hide_peek_layer(void *context) { animation_schedule(spawn); } - static void prv_play_peek_layer(void *context) { NotificationWindowData *data = context; // play the peek layer unfold sequence peek_layer_play(data->peek_layer); const uint16_t PEEK_LAYER_HIDE_DELAY = PBL_IF_RECT_ELSE(500, 400); - data->peek_layer_timer = evented_timer_register_or_reschedule(data->peek_layer_timer, - PEEK_LAYER_HIDE_DELAY, - prv_hide_peek_layer, - data); + data->peek_layer_timer = evented_timer_register_or_reschedule( + data->peek_layer_timer, PEEK_LAYER_HIDE_DELAY, prv_hide_peek_layer, data); } static void prv_show_peek_for_notification(NotificationWindowData *data, Uuid *id, @@ -426,15 +417,14 @@ static void prv_show_peek_for_notification(NotificationWindowData *data, Uuid *i const LayoutColors *colors = layout_get_notification_colors(layout); TimelineItem *item = prv_get_current_notification(data); TimelineResourceId timeline_res_id; - const TimelineResourceId fallback_icon_id = notification_layout_get_fallback_icon_id( - item->header.type); - timeline_res_id = attribute_get_uint32(&item->attr_list, AttributeIdIconTiny, - fallback_icon_id); - - data->peek_icon_info = (TimelineResourceInfo) { - .res_id = timeline_res_id, - .app_id = &data->notification_app_id, // This is set earlier when we reload the layout - .fallback_id = fallback_icon_id, + const TimelineResourceId fallback_icon_id = + notification_layout_get_fallback_icon_id(item->header.type); + timeline_res_id = attribute_get_uint32(&item->attr_list, AttributeIdIconTiny, fallback_icon_id); + + data->peek_icon_info = (TimelineResourceInfo){ + .res_id = timeline_res_id, + .app_id = &data->notification_app_id, // This is set earlier when we reload the layout + .fallback_id = fallback_icon_id, }; #if PBL_BW const bool use_alternative_design = alerts_preferences_get_notification_alternative_design(); @@ -447,16 +437,14 @@ static void prv_show_peek_for_notification(NotificationWindowData *data, Uuid *i // This is so that only the banner of the swap_layer is sticking out from the bottom GRect swap_frame = ((Layer *)&data->swap_layer)->frame; swap_frame.origin.y = swap_frame.origin.y + swap_frame.size.h - - PBL_IF_RECT_ELSE(LAYOUT_BANNER_HEIGHT_RECT, LAYOUT_TOP_BANNER_HEIGHT_ROUND); + PBL_IF_RECT_ELSE(LAYOUT_BANNER_HEIGHT_RECT, LAYOUT_TOP_BANNER_HEIGHT_ROUND); layer_set_frame((Layer *)&data->swap_layer, &swap_frame); // play the peek layer after the delay, more delay for the first notification // because we're coming from the compositor modal transition const uint16_t peek_layer_play_delay = is_first_notification ? FIRST_PEEK_DELAY : 100; - data->peek_layer_timer = evented_timer_register_or_reschedule(data->peek_layer_timer, - peek_layer_play_delay, - prv_play_peek_layer, - data); + data->peek_layer_timer = evented_timer_register_or_reschedule( + data->peek_layer_timer, peek_layer_play_delay, prv_play_peek_layer, data); // insert below status bar but above everything else. Window *window = &data->window; @@ -483,7 +471,7 @@ static void prv_remove_notification(NotificationWindowData *data, Uuid *notif_id // Setting the next ID is handled by the service notifications_presented_list_remove(notif_id); - if ((notifications_presented_list_current_idx() < 0) && s_in_use) { + if ((notifications_presented_list_current_idx() < 0) && s_in_use) { prv_pop_notification_window(data); return; } @@ -500,8 +488,8 @@ static void prv_layout_removed_handler(SwapLayer *swap_layer, LayoutLayer *layou T_STATIC LayoutLayer *prv_get_layout_handler(SwapLayer *swap_layer, int8_t rel_position, void *context) { NotificationWindowData *data = context; - Uuid *id = notifications_presented_list_relative( - notifications_presented_list_current(), rel_position); + Uuid *id = + notifications_presented_list_relative(notifications_presented_list_current(), rel_position); // if no layers, don't return one if (uuid_is_invalid(id)) { @@ -527,8 +515,8 @@ T_STATIC LayoutLayer *prv_get_layout_handler(SwapLayer *swap_layer, int8_t rel_p } // Determine if the icon isn't a system resource (meaning we have to load its associated app id) - TimelineResourceId icon = attribute_get_uint32(&item->attr_list, AttributeIdIconTiny, - TIMELINE_RESOURCE_INVALID); + TimelineResourceId icon = + attribute_get_uint32(&item->attr_list, AttributeIdIconTiny, TIMELINE_RESOURCE_INVALID); TimelineItem pin; if (timeline_resources_is_system(icon) || pin_db_read_item_header(&pin, &item->header.parent_id) != S_SUCCESS) { @@ -538,16 +526,16 @@ T_STATIC LayoutLayer *prv_get_layout_handler(SwapLayer *swap_layer, int8_t rel_p } const LayoutId layout_id = (type == NotificationMobile) ? LayoutIdNotification : LayoutIdReminder; - NotificationLayoutInfo layout_info = (NotificationLayoutInfo) { - .item = item, - .show_notification_timestamp = !prv_should_pop_due_to_inactivity() + NotificationLayoutInfo layout_info = (NotificationLayoutInfo){ + .item = item, + .show_notification_timestamp = !prv_should_pop_due_to_inactivity() }; const LayoutLayerConfig config = { - .frame = &data->window.layer.bounds, - .attributes = &item->attr_list, - .mode = LayoutLayerModeCard, - .app_id = &data->notification_app_id, - .context = &layout_info + .frame = &data->window.layer.bounds, + .attributes = &item->attr_list, + .mode = LayoutLayerModeCard, + .app_id = &data->notification_app_id, + .context = &layout_info }; NotificationLayout *notification_layout = (NotificationLayout *)layout_create(layout_id, &config); return ¬ification_layout->layout; @@ -660,9 +648,9 @@ static void prv_setup_reminder_watchdog(NotificationWindowData *data) { return; } - data->reminder_watchdog_timer_id = (const RegularTimerInfo) { - .cb = prv_clear_stale_reminders_timer_cb, - .cb_data = data, + data->reminder_watchdog_timer_id = (const RegularTimerInfo){ + .cb = prv_clear_stale_reminders_timer_cb, + .cb_data = data, }; regular_timer_add_minutes_callback(&data->reminder_watchdog_timer_id); @@ -687,13 +675,12 @@ static bool prv_should_show_action_in_action_menu(NotificationWindowData *data, // and only show non ANCS actions. Once iOS9 is more widespread we can look at updating this return !timeline_item_action_is_ancs(action); } - } else { // Android + } else { // Android // Show all actions unless the item has already been acted upon, in which case show none - return (!item->header.actioned && - !item->header.dismissed && - (data->is_modal || - comm_session_has_capability(comm_session_get_system_session(), - CommSessionExtendedNotificationService))); + return ( + !item->header.actioned && !item->header.dismissed && + (data->is_modal || comm_session_has_capability(comm_session_get_system_session(), + CommSessionExtendedNotificationService))); } } @@ -729,15 +716,14 @@ static void prv_push_snooze_dialog(void) { simple_dialog_push(simple_dialog, prv_get_window_stack()); } -static void prv_snooze_reminder_cb(ActionMenu *action_menu, - const ActionMenuItem *action_menu_item, +static void prv_snooze_reminder_cb(ActionMenu *action_menu, const ActionMenuItem *action_menu_item, void *context) { - NotificationWindowData *window_data = (NotificationWindowData *) action_menu_item->action_data; + NotificationWindowData *window_data = (NotificationWindowData *)action_menu_item->action_data; TimelineItem *item = prv_get_current_notification(window_data); // Snooze reminder. // It's highly unlikely we'll get E_INVALID_OPERATION based on the snooze logic parameters. - if (reminders_snooze((Reminder *) item) == S_SUCCESS) { + if (reminders_snooze((Reminder *)item) == S_SUCCESS) { prv_push_snooze_dialog(); } @@ -760,8 +746,7 @@ static void prv_push_muted_dialog(void) { simple_dialog_push(simple_dialog, prv_get_window_stack()); } -static void prv_mute_notification(const ActionMenuItem *action_menu_item, - uint8_t muted_bitfield) { +static void prv_mute_notification(const ActionMenuItem *action_menu_item, uint8_t muted_bitfield) { NotificationWindowData *window_data = action_menu_item->action_data; TimelineItem *item = prv_get_current_notification(window_data); @@ -775,8 +760,8 @@ static void prv_mute_notification(const ActionMenuItem *action_menu_item, iOSNotifPrefs *notif_prefs = ios_notif_pref_db_get_prefs((uint8_t *)app_id, app_id_len); if (notif_prefs && attribute_find(¬if_prefs->attr_list, AttributeIdMuteDayOfWeek)) { attribute_list_add_uint8(¬if_prefs->attr_list, AttributeIdMuteDayOfWeek, muted_bitfield); - ios_notif_pref_db_store_prefs((uint8_t *)app_id, app_id_len, - ¬if_prefs->attr_list, ¬if_prefs->action_group); + ios_notif_pref_db_store_prefs((uint8_t *)app_id, app_id_len, ¬if_prefs->attr_list, + ¬if_prefs->action_group); TimelineItemAction *dismiss = timeline_item_find_dismiss_action(item); if (dismiss) { @@ -794,24 +779,22 @@ static void prv_mute_notification(const ActionMenuItem *action_menu_item, } static void prv_mute_notification_always(ActionMenu *action_menu, - const ActionMenuItem *action_menu_item, - void *context) { + const ActionMenuItem *action_menu_item, void *context) { prv_mute_notification(action_menu_item, MuteBitfield_Always); } static void prv_mute_notification_weekdays(ActionMenu *action_menu, - const ActionMenuItem *action_menu_item, - void *context) { + const ActionMenuItem *action_menu_item, void *context) { prv_mute_notification(action_menu_item, MuteBitfield_Weekdays); } static void prv_mute_notification_weekends(ActionMenu *action_menu, - const ActionMenuItem *action_menu_item, - void *context) { + const ActionMenuItem *action_menu_item, void *context) { prv_mute_notification(action_menu_item, MuteBitfield_Weekends); } -static void prv_mute_notification_timed(const ActionMenuItem *action_menu_item, int duration_seconds) { +static void prv_mute_notification_timed(const ActionMenuItem *action_menu_item, + int duration_seconds) { NotificationWindowData *window_data = action_menu_item->action_data; TimelineItem *item = prv_get_current_notification(window_data); @@ -823,14 +806,14 @@ static void prv_mute_notification_timed(const ActionMenuItem *action_menu_item, const int app_id_len = strlen(app_id); iOSNotifPrefs *notif_prefs = ios_notif_pref_db_get_prefs((uint8_t *)app_id, app_id_len); - Attribute *expiration_attr = notif_prefs ? - attribute_find(¬if_prefs->attr_list, AttributeIdMuteExpiration) : NULL; + Attribute *expiration_attr = + notif_prefs ? attribute_find(¬if_prefs->attr_list, AttributeIdMuteExpiration) : NULL; if (notif_prefs && expiration_attr) { const uint32_t expiration_time = rtc_get_time() + duration_seconds; expiration_attr->uint32 = expiration_time; - ios_notif_pref_db_store_prefs((uint8_t *)app_id, app_id_len, - ¬if_prefs->attr_list, ¬if_prefs->action_group); + ios_notif_pref_db_store_prefs((uint8_t *)app_id, app_id_len, ¬if_prefs->attr_list, + ¬if_prefs->action_group); TimelineItemAction *dismiss = timeline_item_find_dismiss_action(item); if (dismiss) { @@ -845,18 +828,17 @@ static void prv_mute_notification_timed(const ActionMenuItem *action_menu_item, } static void prv_mute_notification_1_hour(ActionMenu *action_menu, - const ActionMenuItem *action_menu_item, - void *context) { + const ActionMenuItem *action_menu_item, void *context) { prv_mute_notification_timed(action_menu_item, 3600); } static void prv_mute_notification_today(ActionMenu *action_menu, - const ActionMenuItem *action_menu_item, - void *context) { + const ActionMenuItem *action_menu_item, void *context) { time_t now = rtc_get_time(); struct tm now_tm; localtime_r(&now, &now_tm); - const int seconds_until_midnight = (24 * 3600) - (now_tm.tm_hour * 3600 + now_tm.tm_min * 60 + now_tm.tm_sec); + const int seconds_until_midnight = + (24 * 3600) - (now_tm.tm_hour * 3600 + now_tm.tm_min * 60 + now_tm.tm_sec); prv_mute_notification_timed(action_menu_item, seconds_until_midnight); } @@ -887,13 +869,14 @@ static ActionMenuLevel *prv_create_action_menu_for_item(TimelineItem *item, // Snooze is not needed for Reminders App items Uuid items_originator_id; timeline_get_originator_id(item, &items_originator_id); - const bool has_snooze_action = ((item->header.type == TimelineItemTypeReminder) && - !uuid_equal(&(Uuid)UUID_REMINDERS_DATA_SOURCE, &items_originator_id) && - reminders_can_snooze(item)); - - const bool has_dismiss_all_action = ((dismiss_action) && - (notifications_presented_list_count() > 1)); - const bool has_quiet_time_action = true; // Always true + const bool has_snooze_action = + ((item->header.type == TimelineItemTypeReminder) && + !uuid_equal(&(Uuid)UUID_REMINDERS_DATA_SOURCE, &items_originator_id) && + reminders_can_snooze(item)); + + const bool has_dismiss_all_action = + ((dismiss_action) && (notifications_presented_list_count() > 1)); + const bool has_quiet_time_action = true; // Always true const bool has_ancs_mute_action = prv_has_mute_action(item); uint8_t num_local_actions = 0; @@ -909,9 +892,8 @@ static ActionMenuLevel *prv_create_action_menu_for_item(TimelineItem *item, // Create root level uint8_t num_actions = num_timeline_actions + num_local_actions; uint8_t separator_index = num_actions > num_item_specific_actions ? num_item_specific_actions : 0; - ActionMenuLevel *root_level = timeline_actions_create_action_menu_root_level(num_actions, - separator_index, - source); + ActionMenuLevel *root_level = + timeline_actions_create_action_menu_root_level(num_actions, separator_index, source); // Add actions in order // [0] Dismiss (if applicable) @@ -926,9 +908,7 @@ static ActionMenuLevel *prv_create_action_menu_for_item(TimelineItem *item, timeline_actions_add_action_to_root_level(dismiss_action, root_level); } if (has_snooze_action) { - action_menu_level_add_action(root_level, - i18n_get("Snooze", root_level), - prv_snooze_reminder_cb, + action_menu_level_add_action(root_level, i18n_get("Snooze", root_level), prv_snooze_reminder_cb, window_data); } for (int i = 0; i < item->action_group.num_actions; i++) { @@ -948,68 +928,51 @@ static ActionMenuLevel *prv_create_action_menu_for_item(TimelineItem *item, const char *mute_label = i18n_noop("Mute %s"); static char mute_label_buf[32]; - snprintf(mute_label_buf, sizeof(mute_label_buf), - i18n_get(mute_label, root_level), display_name); + snprintf(mute_label_buf, sizeof(mute_label_buf), i18n_get(mute_label, root_level), + display_name); const uint8_t mute_option = ancs_filtering_get_mute_type(notif_prefs); const bool is_mute_weekdays = mute_option == MuteBitfield_Weekdays; const bool is_mute_weekends = mute_option == MuteBitfield_Weekends; if (is_mute_weekdays || is_mute_weekends) { - action_menu_level_add_action(root_level, - mute_label_buf, - prv_mute_notification_always, + action_menu_level_add_action(root_level, mute_label_buf, prv_mute_notification_always, window_data); } else { const uint8_t number_mute_actions = 5; ActionMenuLevel *mute_level = action_menu_level_create(number_mute_actions); - action_menu_level_add_child(root_level, - mute_level, - mute_label_buf); + action_menu_level_add_child(root_level, mute_level, mute_label_buf); - action_menu_level_add_action(mute_level, - i18n_get("Mute 1 Hour", root_level), - prv_mute_notification_1_hour, - window_data); + action_menu_level_add_action(mute_level, i18n_get("Mute 1 Hour", root_level), + prv_mute_notification_1_hour, window_data); - action_menu_level_add_action(mute_level, - i18n_get("Mute Today", root_level), - prv_mute_notification_today, - window_data); + action_menu_level_add_action(mute_level, i18n_get("Mute Today", root_level), + prv_mute_notification_today, window_data); - action_menu_level_add_action(mute_level, - i18n_get("Mute Always", root_level), - prv_mute_notification_always, - window_data); + action_menu_level_add_action(mute_level, i18n_get("Mute Always", root_level), + prv_mute_notification_always, window_data); - action_menu_level_add_action(mute_level, - i18n_get("Mute Weekends", root_level), - prv_mute_notification_weekends, - window_data); + action_menu_level_add_action(mute_level, i18n_get("Mute Weekends", root_level), + prv_mute_notification_weekends, window_data); - action_menu_level_add_action(mute_level, - i18n_get("Mute Weekdays", root_level), - prv_mute_notification_weekdays, - window_data); + action_menu_level_add_action(mute_level, i18n_get("Mute Weekdays", root_level), + prv_mute_notification_weekdays, window_data); } ios_notif_pref_db_free_prefs(notif_prefs); } if (has_dismiss_all_action) { - action_menu_level_add_action(root_level, - i18n_get("Dismiss All", root_level), - prv_dismiss_all_action_cb, - window_data); + action_menu_level_add_action(root_level, i18n_get("Dismiss All", root_level), + prv_dismiss_all_action_cb, window_data); } if (has_quiet_time_action) { action_menu_level_add_action(root_level, - do_not_disturb_is_active() ? - i18n_get("End Quiet Time", root_level) : - i18n_get("Start Quiet Time", root_level), - prv_toggle_dnd_from_action_menu, - window_data); + do_not_disturb_is_active() + ? i18n_get("End Quiet Time", root_level) + : i18n_get("Start Quiet Time", root_level), + prv_toggle_dnd_from_action_menu, window_data); } return root_level; @@ -1033,13 +996,14 @@ static void prv_select_single_click_handler(ClickRecognizerRef recognizer, void const LayoutColors *colors = layout_get_notification_colors(layout); ActionMenuConfig config = { - .context = item, - .colors.background = colors->bg_color, - .did_close = prv_action_menu_did_close, + .context = item, + .colors.background = colors->bg_color, + .did_close = prv_action_menu_did_close, }; - TimelineItemActionSource source = (window_data->is_modal ? - TimelineItemActionSourceModalNotification : TimelineItemActionSourceNotificationApp); + TimelineItemActionSource source = + (window_data->is_modal ? TimelineItemActionSourceModalNotification + : TimelineItemActionSourceNotificationApp); config.root_level = prv_create_action_menu_for_item(item, window_data, source); if (config.root_level == NULL) { @@ -1114,8 +1078,8 @@ static void prv_window_disappear(Window *window) { prv_cleanup_timer(&data->pop_timer_id); #ifdef CONFIG_TOUCH // A higher modal (e.g. the action menu opened via SELECT) has covered this window. Release the - // swap layer's touch participation so the now-focused modal owns touch and events cannot leak into - // this hidden notification body. The click-config-provider re-registers it on re-show. + // swap layer's touch participation so the now-focused modal owns touch and events cannot leak + // into this hidden notification body. The click-config-provider re-registers it on re-show. swap_layer_touch_release(&data->swap_layer); #endif } @@ -1226,7 +1190,7 @@ static void prv_update_colors_handler(SwapLayer *swap_layer, GColor bg_color, status_bar_layer_set_colors(&data->status_layer, PBL_IF_ROUND_ELSE(GColorClear, status_color), gcolor_legible_over(status_color)); } -#endif // PBL_COLOR +#endif // PBL_COLOR static void prv_interaction_handler(SwapLayer *swap_layer, void *context) { NotificationWindowData *data = context; @@ -1257,11 +1221,11 @@ static void prv_set_dnd_icon_visible(bool is_visible) { #endif const uint16_t icon_layer_x_offset = PBL_IF_ROUND_ELSE(new_icon_layer_x_offset, 6); const GRect status_frame = data->status_layer.layer.frame; - const int16_t icon_layer_y_offset = status_frame.origin.y + - MAX((status_frame.size.h - icon_rect.size.h) / 2, 0); - const GRect dnd_frame = (GRect) { - .origin = GPoint(icon_layer_x_offset, icon_layer_y_offset), - .size = icon_rect.size, + const int16_t icon_layer_y_offset = + status_frame.origin.y + MAX((status_frame.size.h - icon_rect.size.h) / 2, 0); + const GRect dnd_frame = (GRect){ + .origin = GPoint(icon_layer_x_offset, icon_layer_y_offset), + .size = icon_rect.size, }; layer_set_frame(&data->dnd_icon_layer, &dnd_frame); @@ -1317,10 +1281,10 @@ static void prv_init_notification_window(bool is_modal) { data->peek_layer_timer = EVENTED_TIMER_INVALID_ID; data->peek_animation = NULL; data->peek_layer = NULL; - data->peek_icon_info = (TimelineResourceInfo) { - .res_id = TIMELINE_RESOURCE_INVALID, - .app_id = NULL, - .fallback_id = TIMELINE_RESOURCE_INVALID + data->peek_icon_info = (TimelineResourceInfo){ + .res_id = TIMELINE_RESOURCE_INVALID, + .app_id = NULL, + .fallback_id = TIMELINE_RESOURCE_INVALID }; data->action_menu = NULL; data->dnd_icon_visible = false; @@ -1328,11 +1292,11 @@ static void prv_init_notification_window(bool is_modal) { Window *window = &data->window; window_init(window, "Notification Window"); - window_set_window_handlers(window, &(WindowHandlers) { - .appear = prv_window_appear, - .disappear = prv_window_disappear, - .unload = prv_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .appear = prv_window_appear, + .disappear = prv_window_disappear, + .unload = prv_window_unload, + }); window_set_user_data(window, data); #ifdef CONFIG_TOUCH @@ -1360,21 +1324,22 @@ static void prv_init_notification_window(bool is_modal) { const int16_t status_bar_height = status_layer->layer.frame.size.h; // prepare the swap layer frame using notification_layout values including the status bar - const GRect swap_frame = GRect(0, status_bar_height, window_frame->size.w, - LAYOUT_HEIGHT + LAYOUT_ARROW_HEIGHT); + const GRect swap_frame = + GRect(0, status_bar_height, window_frame->size.w, LAYOUT_HEIGHT + LAYOUT_ARROW_HEIGHT); SwapLayer *swap_layer = &data->swap_layer; swap_layer_init(swap_layer, &swap_frame); - swap_layer_set_callbacks(swap_layer, data, (SwapLayerCallbacks) { - .get_layout_handler = prv_get_layout_handler, - .layout_removed_handler = prv_layout_removed_handler, - .layout_did_appear_handler = prv_layout_did_appear_handler, + swap_layer_set_callbacks(swap_layer, data, + (SwapLayerCallbacks){ + .get_layout_handler = prv_get_layout_handler, + .layout_removed_handler = prv_layout_removed_handler, + .layout_did_appear_handler = prv_layout_did_appear_handler, #if PBL_COLOR - .update_colors_handler = prv_update_colors_handler, + .update_colors_handler = prv_update_colors_handler, #endif - .interaction_handler = prv_interaction_handler, - .click_config_provider = prv_click_config_provider, - }); + .interaction_handler = prv_interaction_handler, + .click_config_provider = prv_click_config_provider, + }); swap_layer_set_click_config_onto_window(swap_layer, window); layer_add_child(root_layer, swap_layer_get_layer(swap_layer)); @@ -1386,7 +1351,8 @@ static void prv_init_notification_window(bool is_modal) { data->action_button_layer.update_proc = action_button_update_proc; layer_add_child(root_layer, &data->action_button_layer); #ifdef CONFIG_TOUCH - layer_set_contains_point_override(&data->action_button_layer, prv_action_button_touch_transparent); + layer_set_contains_point_override(&data->action_button_layer, + prv_action_button_touch_transparent); #endif layer_set_hidden((Layer *)&data->action_button_layer, true); @@ -1413,8 +1379,8 @@ void notification_window_init(bool is_modal) { if (is_modal && notification_window_is_modal()) { // If we didn't ask for a modal window, it means some other task already created it, // so no need to push it - modal_window_push(&s_notification_window_data.window, - NOTIFICATION_PRIORITY, true /* animated */); + modal_window_push(&s_notification_window_data.window, NOTIFICATION_PRIORITY, + true /* animated */); } } @@ -1441,8 +1407,8 @@ void notification_window_focus_notification(Uuid *id, bool animated) { if (animated) { #if PBL_RECT - Uuid *second_id = notifications_presented_list_relative( - notifications_presented_list_first(), +1); + Uuid *second_id = + notifications_presented_list_relative(notifications_presented_list_first(), +1); if (second_id) { // On rectangular displays, get the notification below the one we want to focus, // set it as the current notification, then swap up. This allows us @@ -1478,7 +1444,6 @@ void notification_window_service_init(void) { #endif } - ////////////////// // Event Handlers ////////////////// @@ -1533,7 +1498,8 @@ static void prv_do_notification_vibe(NotificationWindowData *data, Uuid *id) { return; } bool did_vibrate = false; - Uint32List *vibeDurations = attribute_get_uint32_list(&item->attr_list, AttributeIdVibrationPattern); + Uint32List *vibeDurations = + attribute_get_uint32_list(&item->attr_list, AttributeIdVibrationPattern); if (vibeDurations && vibeDurations->num_values > 0) { VibePattern patt; @@ -1548,8 +1514,8 @@ static void prv_do_notification_vibe(NotificationWindowData *data, Uuid *id) { VibeScore *score = vibe_client_get_score(VibeClient_Notifications); if (score) { VibeScoreId id = alerts_preferences_get_vibe_score_for_client(VibeClient_Notifications); - PBL_LOG_DBG("Notification vibe: using alerts preferences (%d, %s)", - (int)id, vibe_score_info_get_name(id)); + PBL_LOG_DBG("Notification vibe: using alerts preferences (%d, %s)", (int)id, + vibe_score_info_get_name(id)); vibe_score_do_vibe(score); vibe_score_destroy(score); @@ -1572,7 +1538,7 @@ static void prv_handle_notification_added_common(Uuid *id, NotificationType type alerts_incoming_alert_analytics(); - if (do_not_disturb_is_active() && + if (do_not_disturb_is_active() && alerts_preferences_dnd_get_show_notifications() == DndNotificationModeHide) { return; } diff --git a/src/fw/popups/notifications/notification_window_private.h b/src/fw/popups/notifications/notification_window_private.h index c43400b4af..7f0ebfd2e7 100644 --- a/src/fw/popups/notifications/notification_window_private.h +++ b/src/fw/popups/notifications/notification_window_private.h @@ -12,13 +12,14 @@ typedef struct NotificationWindowData { Window window; - RegularTimerInfo reminder_watchdog_timer_id; // Clear stale reminders once a minute + RegularTimerInfo reminder_watchdog_timer_id; // Clear stale reminders once a minute - EventedTimerID pop_timer_id; //!< Timer that automatically pops us in case of inactivity. - bool pop_timer_is_final; // true, if pop_timer_id cannot be rescheduled anymore + EventedTimerID pop_timer_id; //!< Timer that automatically pops us in case of inactivity. + bool pop_timer_is_final; // true, if pop_timer_id cannot be rescheduled anymore bool is_modal; - bool window_frozen; // Don't pop when performing an action via a hotkey until the action completes + bool + window_frozen; // Don't pop when performing an action via a hotkey until the action completes bool first_notif_loaded; // Used to keep track of when a notification is modified from a different (event) @@ -28,7 +29,7 @@ typedef struct NotificationWindowData { // nothing but rendering the action button Layer action_button_layer; - Uuid notification_app_id; //!< app id for loading custom notification icons + Uuid notification_app_id; //!< app id for loading custom notification icons PeekLayer *peek_layer; TimelineResourceInfo peek_icon_info; diff --git a/src/fw/popups/notifications/notifications_presented_list.c b/src/fw/popups/notifications/notifications_presented_list.c index c1ebe7cedd..b72a06881f 100644 --- a/src/fw/popups/notifications/notifications_presented_list.c +++ b/src/fw/popups/notifications/notifications_presented_list.c @@ -15,23 +15,22 @@ static NotifList *s_current_notif; // The UI can access only notifications of this list static NotifList *s_presented_notifs; - static bool prv_filter_presented_notification_by_id(ListNode *found_node, void *data) { - return uuid_equal(&((NotifList*)found_node)->notif.id, (Uuid *)data); + return uuid_equal(&((NotifList *)found_node)->notif.id, (Uuid *)data); } static NotifList *prv_find_listnode_for_notif(Uuid *id) { - return (NotifList*) list_find((ListNode *) s_presented_notifs, + return (NotifList *)list_find((ListNode *)s_presented_notifs, prv_filter_presented_notification_by_id, id); } Uuid *notifications_presented_list_first(void) { - NotifList * node = (NotifList *)list_get_head((ListNode*)s_presented_notifs); + NotifList *node = (NotifList *)list_get_head((ListNode *)s_presented_notifs); return node ? &node->notif.id : NULL; } Uuid *notifications_presented_list_last(void) { - NotifList * node = (NotifList *)list_get_tail((ListNode*)s_presented_notifs); + NotifList *node = (NotifList *)list_get_tail((ListNode *)s_presented_notifs); return node ? &node->notif.id : NULL; } @@ -43,7 +42,7 @@ Uuid *notifications_presented_list_relative(Uuid *id, int offset) { } int notifications_presented_list_count(void) { - return list_count((ListNode*)s_presented_notifs); + return list_count((ListNode *)s_presented_notifs); } void notifications_presented_list_remove(Uuid *id) { @@ -65,15 +64,15 @@ void notifications_presented_list_remove(Uuid *id) { } } - list_remove((ListNode*)node, (ListNode**)&s_presented_notifs, NULL); + list_remove((ListNode *)node, (ListNode **)&s_presented_notifs, NULL); task_free(node); } -static NotifList* prv_add_notification_common(Uuid *id, NotificationType type) { +static NotifList *prv_add_notification_common(Uuid *id, NotificationType type) { notifications_presented_list_remove(id); NotifList *new_entry = task_malloc_check(sizeof(NotifList)); - list_init((ListNode*)new_entry); + list_init((ListNode *)new_entry); new_entry->notif.type = type; new_entry->notif.id = *id; @@ -82,15 +81,15 @@ static NotifList* prv_add_notification_common(Uuid *id, NotificationType type) { void notifications_presented_list_add(Uuid *id, NotificationType type) { NotifList *new_entry = prv_add_notification_common(id, type); - s_presented_notifs = (NotifList *) - list_prepend(&s_presented_notifs->list_node, &new_entry->list_node); + s_presented_notifs = + (NotifList *)list_prepend(&s_presented_notifs->list_node, &new_entry->list_node); } -void notifications_presented_list_add_sorted(Uuid *id, NotificationType type, - Comparator comparator, bool ascending) { +void notifications_presented_list_add_sorted(Uuid *id, NotificationType type, Comparator comparator, + bool ascending) { NotifList *new_entry = prv_add_notification_common(id, type); - s_presented_notifs = (NotifList *) list_sorted_add(&s_presented_notifs->list_node, - &new_entry->list_node, comparator, ascending); + s_presented_notifs = (NotifList *)list_sorted_add(&s_presented_notifs->list_node, + &new_entry->list_node, comparator, ascending); } NotificationType notifications_presented_list_get_type(Uuid *id) { @@ -131,7 +130,7 @@ int notifications_presented_list_current_idx(void) { if (uuid_is_invalid(id)) { return -1; } - return list_count_to_head_from((ListNode*) prv_find_listnode_for_notif(id)) - 1; + return list_count_to_head_from((ListNode *)prv_find_listnode_for_notif(id)) - 1; } void notifications_presented_list_init(void) { diff --git a/src/fw/popups/notifications/notifications_presented_list.h b/src/fw/popups/notifications/notifications_presented_list.h index 5528cae60b..ea461d49ba 100644 --- a/src/fw/popups/notifications/notifications_presented_list.h +++ b/src/fw/popups/notifications/notifications_presented_list.h @@ -10,7 +10,7 @@ //! //! \brief File that manages a list of presented notifications. -typedef struct { +typedef struct { ListNode list_node; NotificationInfo notif; } NotifList; @@ -41,8 +41,8 @@ void notifications_presented_list_add(Uuid *id, NotificationType type); //! Add the given notification to the presented list //! The comparator will have to compare two NotifList* -void notifications_presented_list_add_sorted(Uuid *id, NotificationType type, - Comparator comparator, bool ascending); +void notifications_presented_list_add_sorted(Uuid *id, NotificationType type, Comparator comparator, + bool ascending); //! Get the type of the given notification NotificationType notifications_presented_list_get_type(Uuid *id); diff --git a/src/fw/popups/phone_formatting.c b/src/fw/popups/phone_formatting.c index 765ee0cc16..4385ef57be 100644 --- a/src/fw/popups/phone_formatting.c +++ b/src/fw/popups/phone_formatting.c @@ -40,10 +40,10 @@ void phone_format_caller_name(const char *full_name, char *destination, size_t l destination[pos++] = ' '; size_t initial_size = utf8_copy_character((utf8_t *)&destination[pos], (utf8_t *)space, - length - pos - 2); // 2 = ".\0" + length - pos - 2); // 2 = ".\0" // If we couldn't fit anything, stop here. if (initial_size == 0) { - pos--; // the space we previously added should be omitted from our string. + pos--; // the space we previously added should be omitted from our string. break; } pos += initial_size; @@ -82,8 +82,8 @@ void phone_format_phone_number(const char *phone_number, char *formatted_phone_n (phone_number[region_length - 1] == ' ')) { region_length--; } - snprintf(formatted_phone_number, length, "%.*s\n%.*s", - region_length, phone_number, local_number_length, local_number); + snprintf(formatted_phone_number, length, "%.*s\n%.*s", region_length, phone_number, + local_number_length, local_number); return; } } diff --git a/src/fw/popups/phone_ui.c b/src/fw/popups/phone_ui.c index 0677aedc0d..eb10739932 100644 --- a/src/fw/popups/phone_ui.c +++ b/src/fw/popups/phone_ui.c @@ -72,7 +72,7 @@ PBL_IF_RECT_ELSE(ACTION_BAR_WIDTH, ACTION_BAR_WIDTH + RIGHTSIDE_PADDING - TEXT_MARGIN_WIDTH) #define ICON_WIDTH 80 // Center icon horizontally in content area (display width minus action bar) -#define ICON_POSITION_X \ +#define ICON_POSITION_X \ PBL_IF_RECT_ELSE(((DISP_COLS - ACTION_BAR_WIDTH - ICON_WIDTH) / 2), \ DISP_ROWS - (ACTION_BAR_WIDTH + RIGHTSIDE_PADDING) - ICON_WIDTH) @@ -195,29 +195,29 @@ typedef struct { #define PHONE_STATUS_POS_Y_LARGE PBL_IF_RECT_ELSE((138 + PHONE_EXTRA_HEIGHT * 3 / 4), 144) static const PhoneStyle s_phone_style_default = { - .icon_size = TimelineResourceSizeLarge, - .icon_pos = { ICON_POSITION_X, PHONE_ICON_POS_Y_DEFAULT }, - .caller_id_pos_y = PHONE_CALLER_ID_POS_Y_DEFAULT, - .caller_id_height = 50, - .status_pos_y = PHONE_STATUS_POS_Y_DEFAULT, - .status_height = 20, + .icon_size = TimelineResourceSizeLarge, + .icon_pos = {ICON_POSITION_X, PHONE_ICON_POS_Y_DEFAULT}, + .caller_id_pos_y = PHONE_CALLER_ID_POS_Y_DEFAULT, + .caller_id_height = 50, + .status_pos_y = PHONE_STATUS_POS_Y_DEFAULT, + .status_height = 20, }; static const PhoneStyle s_phone_style_large = { - .icon_size = TimelineResourceSizeLarge, - .icon_pos = { ICON_POSITION_X, PHONE_ICON_POS_Y_LARGE }, - .caller_id_pos_y = PHONE_CALLER_ID_POS_Y_LARGE, - .caller_id_height = 60, - .status_pos_y = PHONE_STATUS_POS_Y_LARGE, - .status_height = 20, - .large_caller_id = true, + .icon_size = TimelineResourceSizeLarge, + .icon_pos = {ICON_POSITION_X, PHONE_ICON_POS_Y_LARGE}, + .caller_id_pos_y = PHONE_CALLER_ID_POS_Y_LARGE, + .caller_id_height = 60, + .status_pos_y = PHONE_STATUS_POS_Y_LARGE, + .status_height = 20, + .large_caller_id = true, }; static const PhoneStyle *s_phone_styles[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = &s_phone_style_default, - [PreferredContentSizeMedium] = &s_phone_style_default, - [PreferredContentSizeLarge] = &s_phone_style_large, - [PreferredContentSizeExtraLarge] = &s_phone_style_large, + [PreferredContentSizeSmall] = &s_phone_style_default, + [PreferredContentSizeMedium] = &s_phone_style_default, + [PreferredContentSizeLarge] = &s_phone_style_large, + [PreferredContentSizeExtraLarge] = &s_phone_style_large, }; static PhoneUIData *s_phone_ui_data; @@ -238,7 +238,7 @@ static void prv_set_reply_window(void) { // The final icon set must still be destroyed alongside the reel. static void prv_set_icon_resource(TimelineResourceId timeline_res_id) { TimelineResourceInfo timeline_res = { - .res_id = timeline_res_id, + .res_id = timeline_res_id, }; AppResourceInfo icon_res_info; timeline_resources_get_id(&timeline_res, s_phone_ui_data->style->icon_size, &icon_res_info); @@ -267,7 +267,7 @@ static void prv_set_icon_resource(TimelineResourceId timeline_res_id) { // coordinate scheme being offset. static void prv_unfold_icon_resource(TimelineResourceId timeline_res_id) { TimelineResourceInfo timeline_res = { - .res_id = timeline_res_id, + .res_id = timeline_res_id, }; AppResourceInfo icon_res_info; timeline_resources_get_id(&timeline_res, s_phone_ui_data->style->icon_size, &icon_res_info); @@ -279,16 +279,15 @@ static void prv_unfold_icon_resource(TimelineResourceId timeline_res_id) { GRect icon_from = { .origin.x = layer_frame.origin.x + (layer_frame.size.w - DOT_SIZE) / 2, .origin.y = layer_frame.origin.y + (layer_frame.size.h - DOT_SIZE) / 2, - .size = { DOT_SIZE, DOT_SIZE }, + .size = {DOT_SIZE, DOT_SIZE}, }; GRect icon_to = { .origin.x = layer_frame.origin.x + (layer_frame.size.w - size.w) / 2, .origin.y = layer_frame.origin.y + (layer_frame.size.h - size.h) / 2, .size = size, }; - KinoReel *kino_reel = kino_reel_unfold_create(image, false, layer_frame, 0, - UNFOLD_DEFAULT_NUM_DELAY_GROUPS, - UNFOLD_DEFAULT_GROUP_DELAY); + KinoReel *kino_reel = kino_reel_unfold_create( + image, false, layer_frame, 0, UNFOLD_DEFAULT_NUM_DELAY_GROUPS, UNFOLD_DEFAULT_GROUP_DELAY); kino_reel_transform_set_from_frame(kino_reel, icon_from); kino_reel_transform_set_to_frame(kino_reel, icon_to); kino_reel_transform_set_transform_duration(kino_reel, UNFOLD_DURATION); @@ -309,12 +308,15 @@ static int16_t prv_get_color_boundary(void *subject) { } static const PropertyAnimationImplementation s_color_slide_animation_impl = { - .base = { - .update = (AnimationUpdateImplementation)property_animation_update_int16, - }, + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_int16, + }, .accessors = { - .getter = { .int16 = (const Int16Getter)prv_get_color_boundary }, - .setter = { .int16 = (const Int16Setter)prv_update_color_boundary, }, + .getter = {.int16 = (const Int16Getter)prv_get_color_boundary}, + .setter = { + .int16 = (const Int16Setter)prv_update_color_boundary, + }, }, }; @@ -361,8 +363,8 @@ static bool prv_is_string_a_phone_number(const char *name) { for (size_t i = 0; i < length; ++i) { unsigned char chr = name[i]; - if ((chr != '(') && (chr != ')') && (chr != '+') && (chr != ' ') && (chr != '-') && (chr != '.') - && !isdigit(chr)) { + if ((chr != '(') && (chr != ')') && (chr != '+') && (chr != ' ') && (chr != '-') && + (chr != '.') && !isdigit(chr)) { return false; } } @@ -374,17 +376,14 @@ static bool prv_has_long_name(GFont font) { // (i.e. one that won't fit a single line at the default font size). const int16_t fudge_some_pixels = 30; const bool line_contains_newline = (strchr(s_phone_ui_data->caller_id_text_buf, '\n') != NULL); - int16_t test_width = s_phone_ui_data->caller_id_text_layer.layer.bounds.size.w - + fudge_some_pixels; + int16_t test_width = + s_phone_ui_data->caller_id_text_layer.layer.bounds.size.w + fudge_some_pixels; GSize text_size = graphics_text_layout_get_max_used_size( - kernel_ui_get_graphics_context(), - s_phone_ui_data->caller_id_text_buf, - font, + kernel_ui_get_graphics_context(), s_phone_ui_data->caller_id_text_buf, font, GRect(0, 0, test_width, SINGLE_LINE_BOUND_HEIGHT), - s_phone_ui_data->caller_id_text_layer.overflow_mode, - GTextAlignmentLeft, NULL); + s_phone_ui_data->caller_id_text_layer.overflow_mode, GTextAlignmentLeft, NULL); return (text_size.w > s_phone_ui_data->caller_id_text_layer.layer.bounds.size.w) || - line_contains_newline; + line_contains_newline; } //! Text setters @@ -467,8 +466,8 @@ static void prv_ring(void *unused) { static void prv_start_ringing(void) { alerts_incoming_alert_analytics(); - s_phone_ui_data->ring_timer = (const RegularTimerInfo) { - .cb = prv_ring, + s_phone_ui_data->ring_timer = (const RegularTimerInfo){ + .cb = prv_ring, }; s_phone_ui_data->ring_start_time = rtc_get_time(); unsigned int vibe_repeat_interval_sec; @@ -477,7 +476,7 @@ static void prv_start_ringing(void) { return; } unsigned int vibe_interval_ms = vibe_score_get_duration_ms(s_phone_ui_data->vibe_score) + - vibe_score_get_repeat_delay_ms(s_phone_ui_data->vibe_score); + vibe_score_get_repeat_delay_ms(s_phone_ui_data->vibe_score); vibe_repeat_interval_sec = DIVIDE_CEIL(vibe_interval_ms, MS_PER_SECOND); prv_ring(NULL); regular_timer_add_multisecond_callback(&s_phone_ui_data->ring_timer, vibe_repeat_interval_sec); @@ -492,22 +491,19 @@ static void prv_stop_ringing(void) { vibes_cancel(); } - //! Call duration related functions static void prv_show_call_status(void) { layer_set_hidden(&s_phone_ui_data->call_status_text_layer.layer, false); s_phone_ui_data->call_status_text_layer.layer.bounds.origin.y = DURATION_ANIMATION_START_OFFSET; - Animation *upward = property_animation_get_animation( - property_animation_create_bounds_origin(&s_phone_ui_data->call_status_text_layer.layer, - &GPoint(0, DURATION_ANIMATION_START_OFFSET), - &GPoint(0, -BOUNCEBACK_DISTANCE))); + Animation *upward = property_animation_get_animation(property_animation_create_bounds_origin( + &s_phone_ui_data->call_status_text_layer.layer, &GPoint(0, DURATION_ANIMATION_START_OFFSET), + &GPoint(0, -BOUNCEBACK_DISTANCE))); animation_set_curve(upward, AnimationCurveEaseIn); animation_set_duration(upward, DURATION_APPEAR_ANIMATION_FRAMES * ANIMATION_FRAME_MS); Animation *bounceback = property_animation_get_animation( property_animation_create_bounds_origin(&s_phone_ui_data->call_status_text_layer.layer, - &GPoint(0, -BOUNCEBACK_DISTANCE), - &GPointZero)); + &GPoint(0, -BOUNCEBACK_DISTANCE), &GPointZero)); animation_set_curve(bounceback, AnimationCurveEaseOut); animation_set_duration(bounceback, BOUNCEBACK_ANIMATION_FRAMES * ANIMATION_FRAME_MS); @@ -533,11 +529,11 @@ static void prv_update_call_time(void *unused) { if (minutes >= MINUTES_PER_HOUR) { const int hours = minutes / MINUTES_PER_HOUR; minutes = minutes % MINUTES_PER_HOUR; - sniprintf(s_phone_ui_data->call_status_text_buf, CALL_STATUS_BUFFER_LENGTH, - "%u:%02u:%02u", hours, minutes, seconds); + sniprintf(s_phone_ui_data->call_status_text_buf, CALL_STATUS_BUFFER_LENGTH, "%u:%02u:%02u", + hours, minutes, seconds); } else { - sniprintf(s_phone_ui_data->call_status_text_buf, CALL_STATUS_BUFFER_LENGTH, - "%u:%02u", minutes, seconds); + sniprintf(s_phone_ui_data->call_status_text_buf, CALL_STATUS_BUFFER_LENGTH, "%u:%02u", minutes, + seconds); } text_layer_set_text(&s_phone_ui_data->call_status_text_layer, s_phone_ui_data->call_status_text_buf); @@ -548,8 +544,8 @@ static void prv_start_call_duration_timer(void) { s_phone_ui_data->call_start_time = rtc_get_time(); } - s_phone_ui_data->call_duration_timer = evented_timer_register( - 1000, true /* repeating */, prv_update_call_time, NULL); + s_phone_ui_data->call_duration_timer = + evented_timer_register(1000, true /* repeating */, prv_update_call_time, NULL); // Update call time immediately prv_update_call_time(NULL); @@ -614,11 +610,10 @@ static void prv_open_reply_action_menu(void *unused) { switch (reply_action->type) { case TimelineItemActionTypeResponse: - timeline_actions_push_response_menu(item, reply_action, SMS_REPLY_COLOR, - prv_action_menu_did_close, - modal_manager_get_window_stack(ModalPriorityNotification), - TimelineItemActionSourcePhoneUi, - true /* standalone_reply */); + timeline_actions_push_response_menu( + item, reply_action, SMS_REPLY_COLOR, prv_action_menu_did_close, + modal_manager_get_window_stack(ModalPriorityNotification), + TimelineItemActionSourcePhoneUi, true /* standalone_reply */); break; case TimelineItemActionTypeAncsResponse: // Mark this window so we know to pop it when we get a response @@ -687,8 +682,8 @@ static void prv_sms_reply_click_handler(ClickRecognizerRef recognizer, void *unu case TimelineItemActionTypeAncsResponse: // On iOS, show the "Call Declined" animation and send the AncsResponse message shortly after // We hold the phone UI up until timeline_actions responds or another call comes in - s_phone_ui_data->window_pop_timer = evented_timer_register(SMS_REPLY_IOS_DELAY_MS, - false /* repeating */, prv_open_reply_action_menu, NULL); + s_phone_ui_data->window_pop_timer = evented_timer_register( + SMS_REPLY_IOS_DELAY_MS, false /* repeating */, prv_open_reply_action_menu, NULL); break; default: break; @@ -708,23 +703,22 @@ static void prv_hide_action_bar(void) { s_phone_ui_data->hid_action_bar = true; const GRect window_bounds = s_phone_ui_data->window.layer.bounds; - GRect offscreen = GRect(window_bounds.size.w, 0, PBL_IF_RECT_ELSE(ACTION_BAR_WIDTH, 0), - window_bounds.size.h); + GRect offscreen = + GRect(window_bounds.size.w, 0, PBL_IF_RECT_ELSE(ACTION_BAR_WIDTH, 0), window_bounds.size.h); Animation *action_bar_animation = property_animation_get_animation( property_animation_create_layer_frame(&s_phone_ui_data->action_bar.layer, NULL, &offscreen)); - animation_set_duration(action_bar_animation, ACTION_BAR_DISAPPEAR_ANIMATION_FRAMES - * ANIMATION_FRAME_MS); + animation_set_duration(action_bar_animation, + ACTION_BAR_DISAPPEAR_ANIMATION_FRAMES * ANIMATION_FRAME_MS); animation_set_curve(action_bar_animation, AnimationCurveEaseIn); GPoint overshoot = GPoint(PBL_IF_RECT_ELSE(ACTION_BAR_WIDTH / 2, 0) + BOUNCEBACK_DISTANCE, 0); - Animation *ui_movement = property_animation_get_animation( - property_animation_create_bounds_origin(&s_phone_ui_data->core_ui_container, NULL, - &overshoot)); + Animation *ui_movement = property_animation_get_animation(property_animation_create_bounds_origin( + &s_phone_ui_data->core_ui_container, NULL, &overshoot)); animation_set_curve(ui_movement, AnimationCurveEaseIn); animation_set_duration(ui_movement, 3 * ANIMATION_FRAME_MS); - Animation *ui_bounceback = property_animation_get_animation( - property_animation_create_bounds_origin( - &s_phone_ui_data->core_ui_container, &overshoot, - &GPoint(PBL_IF_RECT_ELSE(ACTION_BAR_WIDTH / 2, 0), 0))); + Animation *ui_bounceback = + property_animation_get_animation(property_animation_create_bounds_origin( + &s_phone_ui_data->core_ui_container, &overshoot, + &GPoint(PBL_IF_RECT_ELSE(ACTION_BAR_WIDTH / 2, 0), 0))); animation_set_curve(ui_bounceback, AnimationCurveEaseOut); animation_set_duration(ui_bounceback, 2 * ANIMATION_FRAME_MS); Animation *ui_animation = animation_sequence_create(ui_movement, ui_bounceback, NULL); @@ -798,10 +792,8 @@ static bool prv_load_sms_reply_action(const char *number, PhoneCallSource source attribute_list_add_cstring(&attributes, AttributeIdSender, number); attribute_list_add_cstring(&attributes, AttributeIdiOSAppIdentifier, app_id); - TimelineItem *item = timeline_item_create_with_attributes(0, 0, TimelineItemTypeNotification, - LayoutIdUnknown, - &attributes, - ¬if_prefs->action_group); + TimelineItem *item = timeline_item_create_with_attributes( + 0, 0, TimelineItemTypeNotification, LayoutIdUnknown, &attributes, ¬if_prefs->action_group); bool rv = false; // Make sure we have a reply action (this properly handles NULL items) @@ -939,8 +931,8 @@ static void prv_handle_window_unload(Window *window) { static void prv_window_pop(void) { if (s_phone_ui_data == NULL) { // Check to make sure we didn't get popped already. - // There could possibly be 2 of these callback in the queue at time if this is called right after - // a prv_pop_with_delay + // There could possibly be 2 of these callback in the queue at time if this is called right + // after a prv_pop_with_delay return; } @@ -963,8 +955,8 @@ static void prv_window_pop_cb(void *unused) { } static void prv_window_pop_with_delay(uint32_t delay_ms) { - s_phone_ui_data->window_pop_timer = evented_timer_register( - delay_ms, false /* repeating */, prv_window_pop_cb, NULL); + s_phone_ui_data->window_pop_timer = + evented_timer_register(delay_ms, false /* repeating */, prv_window_pop_cb, NULL); } //! Window setup @@ -981,18 +973,17 @@ static void prv_phone_ui_init(void) { s_phone_ui_data->name_font = system_theme_get_font(TextStyleFont_Title); s_phone_ui_data->long_name_font = system_theme_get_font(PBL_IF_RECT_ELSE(TextStyleFont_Header, TextStyleFont_Title)); - s_phone_ui_data->status_font = - PBL_IF_RECT_ELSE(system_theme_get_font(TextStyleFont_Header), - fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD)); + s_phone_ui_data->status_font = PBL_IF_RECT_ELSE(system_theme_get_font(TextStyleFont_Header), + fonts_get_system_font(FONT_KEY_GOTHIC_18_BOLD)); Window *window = &s_phone_ui_data->window; window_init(window, WINDOW_NAME("Phone")); - window_set_status_bar_icon(window, (GBitmap*)&s_status_icon_phone_bitmap); + window_set_status_bar_icon(window, (GBitmap *)&s_status_icon_phone_bitmap); layer_set_update_proc(&window->layer, prv_window_update_proc); - window_set_window_handlers(&s_phone_ui_data->window, &(WindowHandlers) { - .unload = prv_handle_window_unload, - }); + window_set_window_handlers(&s_phone_ui_data->window, &(WindowHandlers){ + .unload = prv_handle_window_unload, + }); window_set_overrides_back_button(window, true); s_phone_ui_data->bg_color.left = DEFAULT_COLOR; s_phone_ui_data->bg_color.right = DEFAULT_COLOR; @@ -1010,22 +1001,20 @@ static void prv_phone_ui_init(void) { &GRect(0, 0, window->layer.bounds.size.w - PBL_IF_RECT_ELSE(ACTION_BAR_WIDTH, 0), STATUS_BAR_LAYER_HEIGHT)); status_bar_layer_set_colors(&s_phone_ui_data->status_bar, - PBL_IF_COLOR_ELSE(GColorClear, GColorWhite), - GColorBlack); + PBL_IF_COLOR_ELSE(GColorClear, GColorWhite), GColorBlack); layer_add_child(&s_phone_ui_data->core_ui_container, &s_phone_ui_data->status_bar.layer); // Icon kino_layer_init(&s_phone_ui_data->icon_layer, - &(GRect){ style->icon_pos, { ICON_WIDTH, ICON_WIDTH } }); + &(GRect){style->icon_pos, {ICON_WIDTH, ICON_WIDTH}}); kino_layer_set_alignment(&s_phone_ui_data->icon_layer, GAlignCenter); layer_add_child(&s_phone_ui_data->core_ui_container, &s_phone_ui_data->icon_layer.layer); // Caller ID text - const GRect caller_id_text_rect = GRect(TEXT_MARGIN_WIDTH, style->caller_id_pos_y, - width, style->caller_id_height); - text_layer_init_with_parameters(&s_phone_ui_data->caller_id_text_layer, - &caller_id_text_rect, NULL, NULL, - GColorBlack, + const GRect caller_id_text_rect = + GRect(TEXT_MARGIN_WIDTH, style->caller_id_pos_y, width, style->caller_id_height); + text_layer_init_with_parameters(&s_phone_ui_data->caller_id_text_layer, &caller_id_text_rect, + NULL, NULL, GColorBlack, PBL_IF_COLOR_ELSE(GColorClear, GColorWhite), PBL_IF_RECT_ELSE(GTextAlignmentCenter, GTextAlignmentRight), GTextOverflowModeTrailingEllipsis); @@ -1035,11 +1024,10 @@ static void prv_phone_ui_init(void) { s_phone_ui_data->caller_id_text_layer.layer.bounds.size.w = width - TEXT_RIGHTSIDE_PADDING; // Status text - const GRect call_status_text_rect = GRect(TEXT_MARGIN_WIDTH, style->status_pos_y, - width, style->status_height); - text_layer_init_with_parameters(&s_phone_ui_data->call_status_text_layer, - &call_status_text_rect, NULL, s_phone_ui_data->status_font, - GColorBlack, + const GRect call_status_text_rect = + GRect(TEXT_MARGIN_WIDTH, style->status_pos_y, width, style->status_height); + text_layer_init_with_parameters(&s_phone_ui_data->call_status_text_layer, &call_status_text_rect, + NULL, s_phone_ui_data->status_font, GColorBlack, PBL_IF_COLOR_ELSE(GColorClear, GColorWhite), PBL_IF_RECT_ELSE(GTextAlignmentCenter, GTextAlignmentRight), GTextOverflowModeTrailingEllipsis); @@ -1149,8 +1137,8 @@ void phone_ui_handle_call_start(bool can_decline) { prv_set_icon_resource(TIMELINE_RESOURCE_DURING_PHONE_CALL); #else // action bar requires right-aligned icon, otherwise centered icon - prv_set_icon_resource((can_decline) ? TIMELINE_RESOURCE_DURING_PHONE_CALL : - TIMELINE_RESOURCE_DURING_PHONE_CALL_CENTERED); + prv_set_icon_resource((can_decline) ? TIMELINE_RESOURCE_DURING_PHONE_CALL + : TIMELINE_RESOURCE_DURING_PHONE_CALL_CENTERED); #endif prv_set_window_color(ACCEPT_COLOR, false); diff --git a/src/fw/popups/switch_worker_ui.c b/src/fw/popups/switch_worker_ui.c index c86d1740f6..d44c08ab64 100644 --- a/src/fw/popups/switch_worker_ui.c +++ b/src/fw/popups/switch_worker_ui.c @@ -22,14 +22,13 @@ typedef struct { static bool s_is_on_screen = false; - static void prv_click_confirm_decline_callback(ClickRecognizerRef recognizer, void *context) { // TODO: Currently set_as_default does nothing. This will be corrected later on to allow // launching of a worker while an app is open, then returning to the default worker after // the application has been exited. The likely UI flow would prompt the user to set the // worker as the default (if the flag is false) after they've confirmed enabling activity // tracking using the launch application, to which they can decline. - SwitchWorkerUIArgs *args = (SwitchWorkerUIArgs *) context; + SwitchWorkerUIArgs *args = (SwitchWorkerUIArgs *)context; ConfirmationDialog *confirmation_dialog = args->confirmation_dialog; confirmation_dialog_pop(confirmation_dialog); @@ -105,7 +104,7 @@ void switch_worker_confirm(AppInstallId new_worker_id, bool set_as_default, i18n_free_all(confirmation_dialog); SwitchWorkerUIArgs *args = task_malloc_check(sizeof(SwitchWorkerUIArgs)); - *args = (SwitchWorkerUIArgs) { + *args = (SwitchWorkerUIArgs){ .new_worker_id = new_worker_id, .set_as_default = set_as_default, .confirmation_dialog = confirmation_dialog, diff --git a/src/fw/popups/switch_worker_ui.h b/src/fw/popups/switch_worker_ui.h index 1afbee6643..f5676f2f8a 100644 --- a/src/fw/popups/switch_worker_ui.h +++ b/src/fw/popups/switch_worker_ui.h @@ -10,4 +10,3 @@ //! @param window_stack Which window stack to push the dialog to void switch_worker_confirm(AppInstallId new_worker_id, bool set_as_default, WindowStack *window_stack); - diff --git a/src/fw/popups/timeline/peek.c b/src/fw/popups/timeline/peek.c index 440486a64b..5aee558509 100644 --- a/src/fw/popups/timeline/peek.c +++ b/src/fw/popups/timeline/peek.c @@ -28,9 +28,9 @@ static TimelinePeek s_peek; static unsigned int prv_get_concurrent_height(unsigned int num_concurrent) { // Height of the border and other concurrent contents - return (TIMELINE_PEEK_OUTER_BORDER_WIDTH + - (num_concurrent * (TIMELINE_PEEK_MULTI_BORDER_WIDTH + - TIMELINE_PEEK_MULTI_CONTENT_HEIGHT))); + return ( + TIMELINE_PEEK_OUTER_BORDER_WIDTH + + (num_concurrent * (TIMELINE_PEEK_MULTI_BORDER_WIDTH + TIMELINE_PEEK_MULTI_CONTENT_HEIGHT))); } unsigned int timeline_peek_get_concurrent_height(unsigned int num_concurrent) { @@ -62,9 +62,9 @@ static void prv_draw_background(GContext *ctx, const GRect *frame_orig, for (unsigned int type = 0; type < (has_content ? 2 : 1); type++) { const bool is_outer = (i == 0); const bool is_border = (type == 0); - const int height = (is_outer && is_border) ? TIMELINE_PEEK_OUTER_BORDER_WIDTH : - is_border ? TIMELINE_PEEK_MULTI_BORDER_WIDTH : - TIMELINE_PEEK_MULTI_CONTENT_HEIGHT; + const int height = (is_outer && is_border) ? TIMELINE_PEEK_OUTER_BORDER_WIDTH + : is_border ? TIMELINE_PEEK_MULTI_BORDER_WIDTH + : TIMELINE_PEEK_MULTI_CONTENT_HEIGHT; frame.size.h = height; graphics_context_set_fill_color(ctx, is_border ? border_color : background_color); graphics_fill_rect(ctx, &frame); @@ -82,15 +82,15 @@ static void prv_draw_background(GContext *ctx, const GRect *frame_orig, #endif } -void timeline_peek_draw_background(GContext *ctx, const GRect *frame, - unsigned int num_concurrent) { +void timeline_peek_draw_background(GContext *ctx, const GRect *frame, unsigned int num_concurrent) { prv_draw_background(ctx, frame, num_concurrent); } static void prv_timeline_peek_update_proc(Layer *layer, GContext *ctx) { TimelinePeek *peek = (TimelinePeek *)layer; - const unsigned int num_concurrent = peek->peek_layout ? - MIN(peek->peek_layout->info.num_concurrent, TIMELINE_PEEK_MAX_CONCURRENT) : 0; + const unsigned int num_concurrent = + peek->peek_layout ? MIN(peek->peek_layout->info.num_concurrent, TIMELINE_PEEK_MAX_CONCURRENT) + : 0; if (peek->removing_concurrent && (num_concurrent > 0)) { prv_draw_background(ctx, &TIMELINE_PEEK_FRAME_VISIBLE, num_concurrent - 1); } @@ -108,11 +108,11 @@ static void prv_cron_callback(CronJob *job, void *PBL_UNUSED data) { } static CronJob s_timeline_peek_job = { - .minute = CRON_MINUTE_ANY, - .hour = CRON_HOUR_ANY, - .mday = CRON_MDAY_ANY, - .month = CRON_MONTH_ANY, - .cb = prv_cron_callback, + .minute = CRON_MINUTE_ANY, + .hour = CRON_HOUR_ANY, + .mday = CRON_MDAY_ANY, + .month = CRON_MONTH_ANY, + .cb = prv_cron_callback, }; static void prv_destroy_layout(void) { @@ -134,11 +134,11 @@ static PeekLayout *prv_create_layout(TimelineItem *item, unsigned int num_concur timeline_layout_init_info(&layout->info, item, time_util_get_midnight_of(rtc_get_time())); layout->info.num_concurrent = num_concurrent; const LayoutLayerConfig config = { - .frame = &GRect(0, 0, DISP_COLS, TIMELINE_PEEK_HEIGHT), - .attributes = &item->attr_list, - .mode = LayoutLayerModePeek, - .app_id = &item->header.parent_id, - .context = &layout->info, + .frame = &GRect(0, 0, DISP_COLS, TIMELINE_PEEK_HEIGHT), + .attributes = &item->attr_list, + .mode = LayoutLayerModePeek, + .app_id = &item->header.parent_id, + .context = &layout->info, }; layout->timeline_layout = (TimelineLayout *)layout_create(item->header.layout, &config); return layout; @@ -217,10 +217,8 @@ static void prv_peek_frame_update(Animation *animation, AnimationProgress progre GRect to_frame; property_animation_get_to_grect(prop_anim, &to_frame); if (prv_should_use_unobstructed_area()) { - unobstructed_area_service_change( - prv_scale_y_to_framebuffer(peek->layout_layer.frame.origin.y), - prv_scale_y_to_framebuffer(to_frame.origin.y), - progress); + unobstructed_area_service_change(prv_scale_y_to_framebuffer(peek->layout_layer.frame.origin.y), + prv_scale_y_to_framebuffer(to_frame.origin.y), progress); } } @@ -246,15 +244,16 @@ static void prv_peek_frame_setter(void *subject, GRect frame) { } static const PropertyAnimationImplementation s_peek_prop_impl = { - .base = { - .setup = prv_peek_frame_setup, - .update = prv_peek_frame_update, - .teardown = prv_peek_frame_teardown, - }, - .accessors = { - .getter.grect = prv_peek_frame_getter, - .setter.grect = prv_peek_frame_setter, - }, + .base = + { + .setup = prv_peek_frame_setup, + .update = prv_peek_frame_update, + .teardown = prv_peek_frame_teardown, + }, + .accessors = { + .getter.grect = prv_peek_frame_getter, + .setter.grect = prv_peek_frame_setter, + }, }; static void prv_peek_anim_stopped(Animation *animation, bool finished, void *context) { @@ -273,7 +272,7 @@ static void prv_peek_anim_stopped(Animation *animation, bool finished, void *con } static const AnimationHandlers s_peek_anim_handlers = { - .stopped = prv_peek_anim_stopped, + .stopped = prv_peek_anim_stopped, }; static void prv_transition_frame(TimelinePeek *peek, bool visible, bool animated) { @@ -306,12 +305,13 @@ static void prv_transition_frame(TimelinePeek *peek, bool visible, bool animated #define EXTENDED_BOUNCE_BACK (2 * INTERPOLATE_MOOOK_BOUNCE_BACK) -static const int32_t s_extended_moook_out[] = - {EXTENDED_BOUNCE_BACK, INTERPOLATE_MOOOK_BOUNCE_BACK, 2, 1, 0}; +static const int32_t s_extended_moook_out[] = { + EXTENDED_BOUNCE_BACK, INTERPOLATE_MOOOK_BOUNCE_BACK, 2, 1, 0 +}; static const MoookConfig s_extended_moook_out_config = { - .frames_out = s_extended_moook_out, - .num_frames_out = ARRAY_LENGTH(s_extended_moook_out), - .no_bounce_back = true, + .frames_out = s_extended_moook_out, + .num_frames_out = ARRAY_LENGTH(s_extended_moook_out), + .no_bounce_back = true, }; static int64_t prv_interpolate_extended_moook_out(AnimationProgress progress, int64_t from, @@ -319,22 +319,20 @@ static int64_t prv_interpolate_extended_moook_out(AnimationProgress progress, in return interpolate_moook_custom(progress, from, to, &s_extended_moook_out_config); } -static Animation *prv_create_transition_adding_concurrent( - TimelinePeek *peek, PeekLayout *layout) { +static Animation *prv_create_transition_adding_concurrent(TimelinePeek *peek, PeekLayout *layout) { const int height_shrink = 20; GRect frame_normal = TIMELINE_PEEK_FRAME_VISIBLE; GRect frame_shrink = grect_inset(frame_normal, GEdgeInsets(0, 0, height_shrink, 0)); // Starting with shrink instead of ending with it will flash white - PropertyAnimation *white_prop_anim = property_animation_create_layer_frame( - &peek->layout_layer, &frame_shrink, &frame_normal); + PropertyAnimation *white_prop_anim = + property_animation_create_layer_frame(&peek->layout_layer, &frame_shrink, &frame_normal); Animation *white_animation = property_animation_get_animation(white_prop_anim); animation_set_duration(white_animation, ANIMATION_TARGET_FRAME_INTERVAL_MS); animation_set_handlers(white_animation, s_peek_anim_handlers, layout); - GRect frame_bounce = - grect_inset(frame_normal, GEdgeInsets(-EXTENDED_BOUNCE_BACK, 0, 0, 0)); - PropertyAnimation *bounce_prop_anim = property_animation_create_layer_frame( - &peek->layout_layer, &frame_bounce, &frame_normal); + GRect frame_bounce = grect_inset(frame_normal, GEdgeInsets(-EXTENDED_BOUNCE_BACK, 0, 0, 0)); + PropertyAnimation *bounce_prop_anim = + property_animation_create_layer_frame(&peek->layout_layer, &frame_bounce, &frame_normal); Animation *bounce_animation = property_animation_get_animation(bounce_prop_anim); animation_set_duration(bounce_animation, interpolate_moook_custom_duration(&s_extended_moook_out_config)); @@ -344,8 +342,8 @@ static Animation *prv_create_transition_adding_concurrent( static const int32_t s_custom_moook_in[] = {0, 1, INTERPOLATE_MOOOK_BOUNCE_BACK}; static const MoookConfig s_custom_moook_in_config = { - .frames_in = s_custom_moook_in, - .num_frames_in = ARRAY_LENGTH(s_custom_moook_in), + .frames_in = s_custom_moook_in, + .num_frames_in = ARRAY_LENGTH(s_custom_moook_in), }; static int64_t prv_interpolate_custom_moook_in(AnimationProgress progress, int64_t from, @@ -358,8 +356,8 @@ static int64_t prv_interpolate_moook_out(AnimationProgress progress, int64_t fro false /* bounce_back */); } -static Animation *prv_create_transition_removing_concurrent( - TimelinePeek *peek, PeekLayout *layout) { +static Animation *prv_create_transition_removing_concurrent(TimelinePeek *peek, + PeekLayout *layout) { PropertyAnimation *remove_prop_anim = property_animation_create_layer_frame( &peek->layout_layer, &TIMELINE_PEEK_FRAME_VISIBLE, &TIMELINE_PEEK_FRAME_HIDDEN); Animation *remove_animation = property_animation_get_animation(remove_prop_anim); @@ -369,10 +367,10 @@ static Animation *prv_create_transition_removing_concurrent( animation_set_custom_interpolation(remove_animation, prv_interpolate_custom_moook_in); animation_set_handlers(remove_animation, s_peek_anim_handlers, layout); - GRect bounds_normal = { .size = TIMELINE_PEEK_FRAME_VISIBLE.size }; - GRect bounds_bounce = { .origin.y = TIMELINE_PEEK_HEIGHT, .size = bounds_normal.size }; - PropertyAnimation *bounce_prop_anim = property_animation_create_layer_bounds( - &peek->layout_layer, &bounds_bounce, &bounds_normal); + GRect bounds_normal = {.size = TIMELINE_PEEK_FRAME_VISIBLE.size}; + GRect bounds_bounce = {.origin.y = TIMELINE_PEEK_HEIGHT, .size = bounds_normal.size}; + PropertyAnimation *bounce_prop_anim = + property_animation_create_layer_bounds(&peek->layout_layer, &bounds_bounce, &bounds_normal); Animation *bounce_animation = property_animation_get_animation(bounce_prop_anim); animation_set_duration(bounce_animation, interpolate_moook_out_duration()); animation_set_custom_interpolation(bounce_animation, prv_interpolate_moook_out); @@ -409,9 +407,9 @@ static void prv_push_timeline_peek(void *unused) { void timeline_peek_init(void) { TimelinePeek *peek = &s_peek; - *peek = (TimelinePeek) { + *peek = (TimelinePeek){ #ifndef CONFIG_SHELL_SDK - .enabled = timeline_peek_prefs_get_enabled(), + .enabled = timeline_peek_prefs_get_enabled(), #endif }; window_init(&peek->window, WINDOW_NAME("Timeline Peek")); @@ -488,8 +486,7 @@ void timeline_peek_dismiss(void) { } else { char uuid_buffer[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(&item->header.id, uuid_buffer); - PBL_LOG_WRN("Failed to dismiss Timeline Peek event %s (status: %"PRIi32")", - uuid_buffer, rv); + PBL_LOG_WRN("Failed to dismiss Timeline Peek event %s (status: %" PRIi32 ")", uuid_buffer, rv); } } @@ -511,7 +508,8 @@ int16_t timeline_peek_get_obstruction_origin_y(void) { void timeline_peek_get_item_id(TimelineItemId *item_id_out) { TimelinePeek *peek = &s_peek; *item_id_out = (peek->enabled && peek->visible && peek->exists && peek->peek_layout) - ? peek->peek_layout->item->header.id : UUID_INVALID; + ? peek->peek_layout->item->header.id + : UUID_INVALID; } bool timeline_peek_is_first_event(void) { @@ -568,8 +566,8 @@ void timeline_peek_handle_peek_event(PebbleTimelinePeekEvent *event) { show = (rv == S_SUCCESS); } if (show) { - timeline_peek_set_item(&item, started, event->num_concurrent, - event->is_first_event, true /* animated */); + timeline_peek_set_item(&item, started, event->num_concurrent, event->is_first_event, + true /* animated */); } else { timeline_peek_set_item(NULL, false /* started */, 0 /* num_concurrent */, false /* is_first_event */, true /* animated */); diff --git a/src/fw/popups/timeline/peek.h b/src/fw/popups/timeline/peek.h index 0bb2b56503..c4434084b1 100644 --- a/src/fw/popups/timeline/peek.h +++ b/src/fw/popups/timeline/peek.h @@ -8,25 +8,19 @@ #include "applib/ui/window.h" #include "kernel/events.h" -#define TIMELINE_PEEK_HEIGHT \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ PBL_IF_RECT_ELSE(51, 45), \ - /* medium */ PBL_IF_RECT_ELSE(51, 45), \ - /* large */ 59, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* x-large */ 59 \ - ) - -#define TIMELINE_PEEK_ICON_BOX_WIDTH \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ PBL_IF_RECT_ELSE(30, 51), \ - /* medium */ PBL_IF_RECT_ELSE(30, 51), \ - /* large */ PBL_IF_RECT_ELSE(34, 51), \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* x-large */ PBL_IF_RECT_ELSE(34, 51) \ - ) +#define TIMELINE_PEEK_HEIGHT \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ PBL_IF_RECT_ELSE(51, 45), /* medium */ PBL_IF_RECT_ELSE(51, 45), /* large */ \ + 59, /* This is the same as Large until ExtraLarge is designed */ /* x-large */ 59) + +#define TIMELINE_PEEK_ICON_BOX_WIDTH \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ PBL_IF_RECT_ELSE(30, 51), /* medium */ PBL_IF_RECT_ELSE(30, 51), \ + /* large */ PBL_IF_RECT_ELSE(34, 51), /* This is the same as Large until ExtraLarge is \ + designed */ \ + /* x-large */ PBL_IF_RECT_ELSE(34, 51)) #define TIMELINE_PEEK_MARGIN (5) @@ -42,8 +36,8 @@ #define TIMELINE_PEEK_ORIGIN_Y_VISIBLE (DISP_ROWS - TIMELINE_PEEK_HEIGHT) #endif -#define TIMELINE_PEEK_FRAME_VISIBLE GRect(0, TIMELINE_PEEK_ORIGIN_Y_VISIBLE, DISP_COLS, \ - TIMELINE_PEEK_HEIGHT) +#define TIMELINE_PEEK_FRAME_VISIBLE \ + GRect(0, TIMELINE_PEEK_ORIGIN_Y_VISIBLE, DISP_COLS, TIMELINE_PEEK_HEIGHT) //! Gets the concurrent height needed to render for the number of concurrent events. //! @return The concurrent height @@ -53,8 +47,7 @@ unsigned int timeline_peek_get_concurrent_height(unsigned int num_concurrent); //! @param ctx Graphics context to draw with. //! @param frame The rectangle of the peek to draw. //! @param num_concurrent The number of events to indicate. -void timeline_peek_draw_background(GContext *ctx, const GRect *frame, - unsigned int num_concurrent); +void timeline_peek_draw_background(GContext *ctx, const GRect *frame, unsigned int num_concurrent); //! Initializes a TimelinePeek overlay (transparent, unfocusable modal window) void timeline_peek_init(void); diff --git a/src/fw/popups/timeline/peek_animations.c b/src/fw/popups/timeline/peek_animations.c index 2f47bcad63..3c13e920f5 100644 --- a/src/fw/popups/timeline/peek_animations.c +++ b/src/fw/popups/timeline/peek_animations.c @@ -15,40 +15,40 @@ static void prv_draw_vertical_lines(GContext *ctx, unsigned int num_lines, unsigned int width, unsigned int spacing, GPoint offset) { for (int i = 0; i < (int)num_lines; i++) { GRect box = { - .origin = gpoint_add(GPoint((spacing + width) * i - width, - offsets_y ? offsets_y[i] : 0), offset), - .size = { width, heights[i] }, + .origin = + gpoint_add(GPoint((spacing + width) * i - width, offsets_y ? offsets_y[i] : 0), offset), + .size = {width, heights[i]}, }; graphics_fill_rect(ctx, &box); } } void peek_animations_draw_compositor_foreground_speed_lines(GContext *ctx, GPoint offset) { - static const uint16_t s_upper_heights[] = { 48, 73, 78, 48, 48, 48, 61, 48 }; - prv_draw_vertical_lines(ctx, ARRAY_LENGTH(s_upper_heights), NULL /* offsets_y */, - s_upper_heights, LINE_WIDTH, LINE_SPACING, offset); + static const uint16_t s_upper_heights[] = {48, 73, 78, 48, 48, 48, 61, 48}; + prv_draw_vertical_lines(ctx, ARRAY_LENGTH(s_upper_heights), NULL /* offsets_y */, s_upper_heights, + LINE_WIDTH, LINE_SPACING, offset); - static const uint16_t s_lower_offsets_y[] = { 24, 24, 0, 19, 7, 0, 0, 24 }; - static const uint16_t s_lower_heights[] = { 48, 48, 72, 53, 65, 72, 72, 48 }; + static const uint16_t s_lower_offsets_y[] = {24, 24, 0, 19, 7, 0, 0, 24}; + static const uint16_t s_lower_heights[] = {48, 48, 72, 53, 65, 72, 72, 48}; offset.y += 90; prv_draw_vertical_lines(ctx, ARRAY_LENGTH(s_lower_heights), s_lower_offsets_y, s_lower_heights, LINE_WIDTH, LINE_SPACING, offset); } void peek_animations_draw_compositor_background_speed_lines(GContext *ctx, GPoint offset) { - static const uint16_t s_heights[] = { 0, DISP_ROWS, DISP_ROWS, 0, 0, 0, DISP_ROWS }; - prv_draw_vertical_lines(ctx, ARRAY_LENGTH(s_heights), NULL /* offsets_y */, s_heights, - LINE_WIDTH, LINE_SPACING, offset); + static const uint16_t s_heights[] = {0, DISP_ROWS, DISP_ROWS, 0, 0, 0, DISP_ROWS}; + prv_draw_vertical_lines(ctx, ARRAY_LENGTH(s_heights), NULL /* offsets_y */, s_heights, LINE_WIDTH, + LINE_SPACING, offset); } void peek_animations_draw_timeline_speed_lines(GContext *ctx, GPoint offset) { - static const uint16_t s_upper_offsets_y[] = { 12, 0, 0, 12, 12, 12, 12, 12 }; - static const uint16_t s_upper_heights[] = { 53, 65, 65, 53, 53, 53, 53, 53 }; + static const uint16_t s_upper_offsets_y[] = {12, 0, 0, 12, 12, 12, 12, 12}; + static const uint16_t s_upper_heights[] = {53, 65, 65, 53, 53, 53, 53, 53}; prv_draw_vertical_lines(ctx, ARRAY_LENGTH(s_upper_heights), s_upper_offsets_y, s_upper_heights, LINE_WIDTH, LINE_SPACING, offset); - static const uint16_t s_lower_offsets_y[] = { 5, 5, 0, 0, 5, 5, 5, 5 }; - static const uint16_t s_lower_heights[] = { 53, 87, 87, 53, 53, 53, 53, 53 }; + static const uint16_t s_lower_offsets_y[] = {5, 5, 0, 0, 5, 5, 5, 5}; + static const uint16_t s_lower_heights[] = {53, 87, 87, 53, 53, 53, 53, 53}; offset.y += 65; prv_draw_vertical_lines(ctx, ARRAY_LENGTH(s_lower_heights), s_lower_offsets_y, s_lower_heights, LINE_WIDTH, LINE_SPACING, offset); diff --git a/src/fw/popups/timeline/peek_private.h b/src/fw/popups/timeline/peek_private.h index c78bd13f87..f0a8f76a53 100644 --- a/src/fw/popups/timeline/peek_private.h +++ b/src/fw/popups/timeline/peek_private.h @@ -19,14 +19,14 @@ typedef struct TimelinePeek { Window window; Layer layout_layer; PeekLayout *peek_layout; - Animation *animation; //!< Currently running animation - bool exists; //!< Whether there exists an item to show in peek. - bool started; //!< Whether the item has started. - bool enabled; //!< Whether to persistently show or hide the peek. - bool visible; //!< Whether the peek is visible or not. - bool first; //!< Whether the item is the first item in Timeline. - bool removing_concurrent; //!< Whether the removing concurrent animation is occurring. - bool future_empty; //!< Whether Timeline future is empty. + Animation *animation; //!< Currently running animation + bool exists; //!< Whether there exists an item to show in peek. + bool started; //!< Whether the item has started. + bool enabled; //!< Whether to persistently show or hide the peek. + bool visible; //!< Whether the peek is visible or not. + bool first; //!< Whether the item is the first item in Timeline. + bool removing_concurrent; //!< Whether the removing concurrent animation is occurring. + bool future_empty; //!< Whether Timeline future is empty. } TimelinePeek; #if UNITTEST diff --git a/src/fw/popups/timeline/timeline_item_layer.c b/src/fw/popups/timeline/timeline_item_layer.c index 7d133d00ec..a5283fb90a 100644 --- a/src/fw/popups/timeline/timeline_item_layer.c +++ b/src/fw/popups/timeline/timeline_item_layer.c @@ -83,13 +83,17 @@ static int16_t prv_scroll_offset_getter(TimelineItemLayer *item_layer) { static void prv_update_scroll_offset(TimelineItemLayer *item_layer, int16_t new_offset, bool is_first_scroll) { static const PropertyAnimationImplementation implementation = { - .base = { - .update = (AnimationUpdateImplementation) property_animation_update_int16, - }, - .accessors = { - .setter = { .int16 = (const Int16Setter) prv_scroll_offset_setter, }, - .getter = { .int16 = (const Int16Getter) prv_scroll_offset_getter}, - }, + .base = + { + .update = (AnimationUpdateImplementation)property_animation_update_int16, + }, + .accessors = { + .setter = + { + .int16 = (const Int16Setter)prv_scroll_offset_setter, + }, + .getter = {.int16 = (const Int16Getter)prv_scroll_offset_getter}, + }, }; // If we're already at that position, don't bother scheduling an animation @@ -97,8 +101,8 @@ static void prv_update_scroll_offset(TimelineItemLayer *item_layer, int16_t new_ return; } - if (item_layer->animation - && animation_is_scheduled(property_animation_get_animation(item_layer->animation))) { + if (item_layer->animation && + animation_is_scheduled(property_animation_get_animation(item_layer->animation))) { // Don't do anything if we're already animating to this position from our current position int16_t offset; property_animation_get_to_int16(item_layer->animation, &offset); @@ -111,8 +115,8 @@ static void prv_update_scroll_offset(TimelineItemLayer *item_layer, int16_t new_ if (item_layer->animation) { property_animation_init(item_layer->animation, &implementation, item_layer, NULL, &new_offset); } else { - item_layer->animation = property_animation_create(&implementation, - item_layer, NULL, &new_offset); + item_layer->animation = + property_animation_create(&implementation, item_layer, NULL, &new_offset); PBL_ASSERTN(item_layer->animation); animation_set_auto_destroy(property_animation_get_animation(item_layer->animation), false); } @@ -168,13 +172,13 @@ static void prv_handle_select_click(ClickRecognizerRef recognizer, void *context } const LayoutColors *colors = layout_get_colors((LayoutLayer *)item_layer->timeline_layout); ActionMenuConfig config = { - .root_level = root_level, - .context = item_layer->item, - .colors.background = colors->bg_color, - .colors.foreground = colors->primary_color, + .root_level = root_level, + .context = item_layer->item, + .colors.background = colors->bg_color, + .colors.foreground = colors->primary_color, }; - timeline_actions_push_action_menu( - &config, window_manager_get_window_stack(ModalPriorityNotification)); + timeline_actions_push_action_menu(&config, + window_manager_get_window_stack(ModalPriorityNotification)); } static void prv_handle_up_click(ClickRecognizerRef recognizer, void *context) { @@ -218,9 +222,8 @@ static void timeline_item_layer_click_config_provider(void *context) { } void timeline_item_layer_set_click_config_onto_window(TimelineItemLayer *item_layer, - struct Window *window) { - window_set_click_config_provider_with_context(window, - timeline_item_layer_click_config_provider, + struct Window *window) { + window_set_click_config_provider_with_context(window, timeline_item_layer_click_config_provider, item_layer); } @@ -228,9 +231,9 @@ void timeline_item_layer_set_click_config_onto_window(TimelineItemLayer *item_la // Public functions ///////////////////////////////////////// -void timeline_item_layer_update_proc(Layer* layer, GContext* ctx) { +void timeline_item_layer_update_proc(Layer *layer, GContext *ctx) { //! Fill background with white to hide layers below - TimelineItemLayer* item_layer = (TimelineItemLayer *)layer; + TimelineItemLayer *item_layer = (TimelineItemLayer *)layer; const LayoutColors *colors = layout_get_colors((LayoutLayer *)item_layer->timeline_layout); graphics_context_set_fill_color(ctx, colors->bg_color); graphics_fill_rect(ctx, &layer->bounds); @@ -254,18 +257,18 @@ void timeline_item_layer_deinit(TimelineItemLayer *item_layer) { } void timeline_item_layer_set_item(TimelineItemLayer *item_layer, TimelineItem *item, - TimelineLayoutInfo *info) { + TimelineLayoutInfo *info) { item_layer->item = item; if (item_layer->timeline_layout) { layer_remove_from_parent((Layer *)item_layer->timeline_layout); layout_destroy((LayoutLayer *)item_layer->timeline_layout); } const LayoutLayerConfig config = { - .frame = &(GRect) { GPointZero, item_layer->layer.frame.size }, - .attributes = &item_layer->item->attr_list, - .mode = LayoutLayerModeCard, - .app_id = &item->header.parent_id, - .context = info, + .frame = &(GRect){GPointZero, item_layer->layer.frame.size}, + .attributes = &item_layer->item->attr_list, + .mode = LayoutLayerModeCard, + .app_id = &item->header.parent_id, + .context = info, }; item_layer->timeline_layout = (TimelineLayout *)layout_create(item_layer->item->header.layout, &config); diff --git a/src/fw/popups/timeline/timeline_item_layer.h b/src/fw/popups/timeline/timeline_item_layer.h index 64df0aac0e..36f2d6da31 100644 --- a/src/fw/popups/timeline/timeline_item_layer.h +++ b/src/fw/popups/timeline/timeline_item_layer.h @@ -24,7 +24,7 @@ typedef struct { } TimelineItemLayer; //! The layer update proc for the TimelineItemLayer -void timeline_item_layer_update_proc(Layer* layer, GContext* ctx); +void timeline_item_layer_update_proc(Layer *layer, GContext *ctx); //! Initialize a timeline item layer //! @param item_layer a pointer to the TimelineItemLayer to initialize @@ -39,7 +39,7 @@ void timeline_item_layer_deinit(TimelineItemLayer *item_layer); //! @param item a pointer to the item to use //! @param info a pointer to the TimelineLayoutInfo to use for the item void timeline_item_layer_set_item(TimelineItemLayer *item_layer, TimelineItem *item, - TimelineLayoutInfo *info); + TimelineLayoutInfo *info); //! Down click handler for the TimelineItemLayer void timeline_item_layer_down_click_handler(ClickRecognizerRef recognizer, void *context); @@ -51,4 +51,4 @@ void timeline_item_layer_up_click_handler(ClickRecognizerRef recognizer, void *c //! given window to menu layer's internal click config provider. This internal //! click configuration provider, will set up the default UP & DOWN handlers void timeline_item_layer_set_click_config_onto_window(TimelineItemLayer *item_layer, - struct Window *window); + struct Window *window); diff --git a/src/fw/popups/wakeup_ui.c b/src/fw/popups/wakeup_ui.c index 1c06a0a89c..b5c04bead8 100644 --- a/src/fw/popups/wakeup_ui.c +++ b/src/fw/popups/wakeup_ui.c @@ -48,9 +48,9 @@ typedef struct { static void prv_show_dialog(void *context) { WakeupUICbData *data = context; - const char* missed_text_raw = + const char *missed_text_raw = i18n_noop("While your Pebble was off wakeup events occurred for:\n"); - const char* missed_text = i18n_get(missed_text_raw, data); + const char *missed_text = i18n_get(missed_text_raw, data); // Find the size of all of the missed_apps names (no max length defined) int16_t missed_app_titles_len = 0; @@ -70,7 +70,7 @@ static void prv_show_dialog(void *context) { kernel_free(data->app_ids); kernel_free(data); - ExpandableDialog * ex_dialog = expandable_dialog_create(NULL); + ExpandableDialog *ex_dialog = expandable_dialog_create(NULL); Dialog *dialog = expandable_dialog_get_dialog(ex_dialog); dialog_set_text_buffer(dialog, missed_message, true); dialog_set_icon(dialog, RESOURCE_ID_GENERIC_WARNING_TINY); @@ -83,9 +83,9 @@ static void prv_show_dialog(void *context) { void wakeup_popup_window(uint8_t missed_apps_count, AppInstallId *missed_app_ids) { WakeupUICbData *data = kernel_malloc(sizeof(WakeupUICbData)); if (data) { - *data = (WakeupUICbData) { - .count = missed_apps_count, - .app_ids = missed_app_ids, + *data = (WakeupUICbData){ + .count = missed_apps_count, + .app_ids = missed_app_ids, }; launcher_task_add_callback(prv_show_dialog, data); } diff --git a/src/fw/popups/wakeup_ui.h b/src/fw/popups/wakeup_ui.h index 551447b009..63c442f5f1 100644 --- a/src/fw/popups/wakeup_ui.h +++ b/src/fw/popups/wakeup_ui.h @@ -13,4 +13,3 @@ //! @param missed_apps_count number of app names to display //! @param missed_app_ids an array of AppInstallIds of the app names to display void wakeup_popup_window(uint8_t missed_apps_count, AppInstallId *missed_app_ids); - diff --git a/src/fw/process_management/app_custom_icon.c b/src/fw/process_management/app_custom_icon.c index 4718c0b3e9..e017088643 100644 --- a/src/fw/process_management/app_custom_icon.c +++ b/src/fw/process_management/app_custom_icon.c @@ -35,14 +35,15 @@ typedef enum { } FieldId; typedef struct PACKED { - //! OR'ed value of (CustomizableAppType | FieldId). No C bitfields here, because order is compiler-specific. + //! OR'ed value of (CustomizableAppType | FieldId). No C bitfields here, because order is + //! compiler-specific. uint8_t app_type_and_field_bits; union { char name[0]; struct { uint16_t row_size_bytes; - uint16_t info_flags; //image_data && - memcmp(info->image_data, image_data, available_size) == 0 && + if (info->image_data && memcmp(info->image_data, image_data, available_size) == 0 && info->icon.bounds.origin.x == bounds.origin.x && - info->icon.bounds.origin.y == bounds.origin.y && - info->icon.bounds.size.w == bounds.size.w && - info->icon.bounds.size.h == bounds.size.h && - info->icon.info_flags == info_flags && + info->icon.bounds.origin.y == bounds.origin.y && info->icon.bounds.size.w == bounds.size.w && + info->icon.bounds.size.h == bounds.size.h && info->icon.info_flags == info_flags && info->icon.row_size_bytes == row_size_bytes) { // Already equal to current icon return; @@ -89,7 +86,7 @@ static void set_icon(const CustomizableAppType app_type, const uint16_t row_size if (info->image_data) { kernel_free(info->image_data); } - info->image_data = (uint8_t *) kernel_malloc(available_size); + info->image_data = (uint8_t *)kernel_malloc(available_size); memcpy(info->image_data, image_data, available_size); info->icon.addr = info->image_data; info->icon.bounds = bounds; @@ -101,23 +98,22 @@ static void set_icon(const CustomizableAppType app_type, const uint16_t row_size static void set_name(const CustomizableAppType app_type, const char *name, const uint16_t length) { AppCustomizeInfo *info = &s_info[app_type]; - if (info->name && - strlen(info->name) == length && - strncmp(info->name, name, length) == 0) { + if (info->name && strlen(info->name) == length && strncmp(info->name, name, length) == 0) { // Already equal to current name return; } if (info->name) { kernel_free(info->name); } - info->name = (char *) kernel_malloc(length + 1); + info->name = (char *)kernel_malloc(length + 1); memcpy(info->name, name, length); info->name[length] = 0; do_callbacks(app_type); } -void customizable_app_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length) { - AppCustomizeMessage *message = (AppCustomizeMessage *) data; +void customizable_app_protocol_msg_callback(CommSession *session, const uint8_t *data, + size_t length) { + AppCustomizeMessage *message = (AppCustomizeMessage *)data; const FieldId field_id = message->app_type_and_field_bits & FIELD_MASK; const CustomizableAppType app_type = message->app_type_and_field_bits & APP_TYPE_MASK; switch (field_id) { @@ -129,11 +125,13 @@ void customizable_app_protocol_msg_callback(CommSession *session, const uint8_t* #if ALLOW_SET_ICON case ICON_FIELD: { const uint16_t image_data_length = length - offsetof(AppCustomizeMessage, icon.image_data); - set_icon(app_type, message->icon.row_size_bytes, message->icon.info_flags, message->icon.bounds, message->icon.image_data, image_data_length); + set_icon(app_type, message->icon.row_size_bytes, message->icon.info_flags, + message->icon.bounds, message->icon.image_data, image_data_length); break; } #endif - default: return; + default: + return; } (void)session; } diff --git a/src/fw/process_management/app_install_manager.c b/src/fw/process_management/app_install_manager.c index 5a9549d5a2..f307297f1a 100644 --- a/src/fw/process_management/app_install_manager.c +++ b/src/fw/process_management/app_install_manager.c @@ -99,8 +99,8 @@ AppInstallId app_get_install_id_for_uuid_from_registry(const Uuid *uuid) { if (md && uuid_equal(&md->uuid, uuid)) { return reg_entry->id; } - } else if ((reg_entry->type == AppInstallStorageResources) - && uuid_equal(®_entry->uuid, uuid)) { + } else if ((reg_entry->type == AppInstallStorageResources) && + uuid_equal(®_entry->uuid, uuid)) { return reg_entry->id; } } @@ -160,9 +160,9 @@ void app_install_mark_prioritized(AppInstallId install_id, bool can_expire) { app->can_expire = can_expire; } else { RecentApp app = { - .id = install_id, - .last_activity = cur_time, - .can_expire = can_expire, + .id = install_id, + .last_activity = cur_time, + .can_expire = can_expire, }; circular_cache_push(&s_recent_apps.cache, &app); } @@ -223,29 +223,29 @@ void app_install_register_callback(struct AppInstallCallbackNode *callback_node) } void app_install_deregister_callback(struct AppInstallCallbackNode *callback_node) { - PBL_ASSERTN(callback_node->node.next != NULL - || callback_node->node.prev != NULL - || s_head_callback_node_list == &callback_node->node); + PBL_ASSERTN(callback_node->node.next != NULL || callback_node->node.prev != NULL || + s_head_callback_node_list == &callback_node->node); list_remove(&callback_node->node, &(s_head_callback_node_list), NULL); } void app_install_cleanup_registered_app_callbacks(void) { - struct AppInstallCallbackNode *iter = (struct AppInstallCallbackNode *) s_head_callback_node_list; + struct AppInstallCallbackNode *iter = (struct AppInstallCallbackNode *)s_head_callback_node_list; while (iter) { if (iter->registered_by == PebbleTask_App) { list_remove((ListNode *)&iter->node, &s_head_callback_node_list, NULL); } - iter = (struct AppInstallCallbackNode *) list_get_next(&iter->node); + iter = (struct AppInstallCallbackNode *)list_get_next(&iter->node); } } static void app_install_invoke_callbacks(InstallEventType event_type, AppInstallId install_id) { - struct AppInstallCallbackNode *callback_node = (struct AppInstallCallbackNode *) s_head_callback_node_list; + struct AppInstallCallbackNode *callback_node = + (struct AppInstallCallbackNode *)s_head_callback_node_list; while (callback_node) { if (callback_node->callbacks[event_type]) { callback_node->callbacks[event_type](install_id, callback_node->data); } - callback_node = (struct AppInstallCallbackNode *) list_get_next(&callback_node->node); + callback_node = (struct AppInstallCallbackNode *)list_get_next(&callback_node->node); } } @@ -256,7 +256,7 @@ typedef struct { } EnumerateData; static void prv_app_install_enumerate_app_db(AppInstallId install_id, AppDBEntry *db_entry, - void *data) { + void *data) { EnumerateData *cb_data = (EnumerateData *)data; prv_app_install_entry_from_app_db_entry(install_id, db_entry, cb_data->entry_buf); @@ -280,9 +280,9 @@ void app_install_enumerate_entries(AppInstallEnumerateCb cb, void *data) { // Iterate over AppDB applications EnumerateData cb_data = { - .cb = cb, - .data = data, - .entry_buf = entry, + .cb = cb, + .data = data, + .entry_buf = entry, }; app_db_enumerate_entries(prv_app_install_enumerate_app_db, &cb_data); @@ -320,7 +320,7 @@ static void prv_app_install_delete(AppInstallId id, Uuid *uuid, bool app_upgrade if (delete_cache) { // only log when we actually delete the cache entry. This is so we don't print out 100 logs // during an app cache clear - PBL_LOG_DBG("Deleting app with id %"PRId32"", id); + PBL_LOG_DBG("Deleting app with id %" PRId32 "", id); app_cache_remove_entry(id); } } @@ -344,8 +344,8 @@ typedef struct InstallCallbackData { //! if this is false. bool callback_in_progress; - //! We may have to pause doing callbacks to wait for the app or worker to close. If so, this is set to - //! true. + //! We may have to pause doing callbacks to wait for the app or worker to close. If so, this is + //! set to true. bool callback_paused_for_app; bool callback_paused_for_worker; @@ -357,7 +357,7 @@ typedef struct InstallCallbackData { //! Callback to call when we're doing issuing this callback. InstallCallbackDoneCallback done_callback; - void* callback_data; + void *callback_data; } InstallCallbackData; InstallCallbackData s_install_callback_data; @@ -374,7 +374,6 @@ static void app_install_launcher_task_callback(void *context) { if (s_install_callback_data.install_type == APP_UPGRADED || s_install_callback_data.install_type == APP_REMOVED || s_install_callback_data.install_type == APP_DB_CLEARED) { - const AppInstallId to_kill = s_install_callback_data.install_id; // Close the current app if it is the one we are trying to remove/upgrade @@ -383,8 +382,8 @@ static void app_install_launcher_task_callback(void *context) { // also clear it. const AppInstallId cur_app_id = app_manager_get_current_app_id(); if (prv_ids_equal(cur_app_id, to_kill) || - ((s_install_callback_data.install_type == APP_DB_CLEARED) && - (app_install_id_from_app_db(cur_app_id)))) { + ((s_install_callback_data.install_type == APP_DB_CLEARED) && + (app_install_id_from_app_db(cur_app_id)))) { PBL_LOG_DBG("close and delay callbacks for app closing"); s_install_callback_data.callback_paused_for_app = true; @@ -429,7 +428,7 @@ static void app_install_launcher_task_callback(void *context) { /* fallthrough */ case APP_REMOVED: prv_app_install_delete(s_install_callback_data.install_id, s_install_callback_data.uuid, - app_upgrade, true /* delete cache entry */); + app_upgrade, true /* delete cache entry */); // Only delete the app's persist file when the user explicitly removes the // app, not during an AppDB clear. if (!app_upgrade) { @@ -454,25 +453,23 @@ static void app_install_launcher_task_callback(void *context) { kernel_free(s_install_callback_data.uuid); } - s_install_callback_data = (InstallCallbackData) { - .callback_in_progress = false - }; + s_install_callback_data = (InstallCallbackData){.callback_in_progress = false}; } -bool app_install_do_callbacks(InstallEventType event_type, AppInstallId install_id, - Uuid *uuid, InstallCallbackDoneCallback done_callback, void* callback_data) { +bool app_install_do_callbacks(InstallEventType event_type, AppInstallId install_id, Uuid *uuid, + InstallCallbackDoneCallback done_callback, void *callback_data) { if (s_install_callback_data.callback_in_progress) { PBL_LOG_ERR("Failed to do app callbacks, already in progress"); return false; } - s_install_callback_data = (InstallCallbackData) { - .callback_in_progress = true, - .install_id = install_id, - .uuid = uuid, - .install_type = event_type, - .done_callback = done_callback, - .callback_data = callback_data + s_install_callback_data = (InstallCallbackData){ + .callback_in_progress = true, + .install_id = install_id, + .uuid = uuid, + .install_type = event_type, + .done_callback = done_callback, + .callback_data = callback_data }; launcher_task_add_callback(app_install_launcher_task_callback, NULL); @@ -514,7 +511,7 @@ void app_install_notify_app_closed(void) { // If we've previously paused doing app callbacks to wait for the app to close, resume them // now if the worker is also done if (s_install_callback_data.callback_paused_for_app) { - if (!s_install_callback_data.callback_paused_for_worker) { + if (!s_install_callback_data.callback_paused_for_worker) { app_install_launcher_task_callback(NULL); } else { s_install_callback_data.callback_paused_for_app = false; @@ -527,7 +524,7 @@ void app_install_notify_worker_closed(void) { // If we've previously paused doing app callbacks to wait for the app to close, resume them // now if the worker is also done if (s_install_callback_data.callback_paused_for_worker) { - if (!s_install_callback_data.callback_paused_for_app) { + if (!s_install_callback_data.callback_paused_for_app) { app_install_launcher_task_callback(NULL); } else { s_install_callback_data.callback_paused_for_worker = false; @@ -568,9 +565,9 @@ void app_install_manager_init(void) { // PBL-31769: This should be moved to send_text.c #if defined(APP_ID_SEND_TEXT) - s_capabilities_event_info = (EventServiceInfo) { - .type = PEBBLE_CAPABILITIES_CHANGED_EVENT, - .handler = prv_capabilities_changed_event_handler, + s_capabilities_event_info = (EventServiceInfo){ + .type = PEBBLE_CAPABILITIES_CHANGED_EVENT, + .handler = prv_capabilities_changed_event_handler, }; event_service_client_subscribe(&s_capabilities_event_info); #endif @@ -585,7 +582,6 @@ bool app_install_id_from_app_db(AppInstallId id) { } static GColor prv_hard_coded_color_for_3rd_party_apps(Uuid *uuid) { - // Remove this from Recovery FW for code size savings. #if !defined(CONFIG_RECOVERY_FW) @@ -597,7 +593,7 @@ static GColor prv_hard_coded_color_for_3rd_party_apps(Uuid *uuid) { } ColorMapping; static const ColorMapping mappings[] = { - #include "app_install_manager_known_apps.h" +#include "app_install_manager_known_apps.h" }; for (size_t i = 0; i < ARRAY_LENGTH(mappings); i++) { @@ -611,7 +607,6 @@ static GColor prv_hard_coded_color_for_3rd_party_apps(Uuid *uuid) { return GColorClear; } - static GColor prv_valid_color_from_uuid(GColor color, Uuid *uuid) { #ifdef CONFIG_BOARD_ASTERIX return GColorClear; @@ -628,8 +623,10 @@ static GColor prv_valid_color_from_uuid(GColor color, Uuid *uuid) { } // if color isn't provided, build hash over uuid and pick from selected fall-back colors - GColor fall_back_colors[] = {GColorFromHEX(0x0000aa), GColorFromHEX(0x005500), - GColorFromHEX(0x550055), GColorFromHEX(0xff0055), GColorFromHEX(0xaa0000)}; + GColor fall_back_colors[] = { + GColorFromHEX(0x0000aa), GColorFromHEX(0x005500), GColorFromHEX(0x550055), + GColorFromHEX(0xff0055), GColorFromHEX(0xaa0000) + }; uint8_t uuid_byte_sum = 0; for (uint8_t *b = &uuid->byte0; b <= &uuid->byte15; b++) { uuid_byte_sum += *b; @@ -639,19 +636,18 @@ static GColor prv_valid_color_from_uuid(GColor color, Uuid *uuid) { static bool prv_app_install_entry_from_app_db_entry(AppInstallId id, AppDBEntry *db_entry, AppInstallEntry *entry) { - - *entry = (AppInstallEntry) { - .install_id = id, - .type = AppInstallStorageFlash, - .visibility = process_metadata_flags_visibility(db_entry->info_flags), - // PebbleTask_App because the flag parsing function needs it, and we can assume all - // applications registered with the manager are applications, not workers. - .process_type = process_metadata_flags_process_type(db_entry->info_flags, PebbleTask_App), - .has_worker = process_metadata_flags_has_worker(db_entry->info_flags), - .icon_resource_id = db_entry->icon_resource_id, - .uuid = db_entry->uuid, - .color = prv_valid_color_from_uuid(db_entry->app_face_bg_color, (Uuid *)&db_entry->uuid), - .sdk_version = db_entry->sdk_version, + *entry = (AppInstallEntry){ + .install_id = id, + .type = AppInstallStorageFlash, + .visibility = process_metadata_flags_visibility(db_entry->info_flags), + // PebbleTask_App because the flag parsing function needs it, and we can assume all + // applications registered with the manager are applications, not workers. + .process_type = process_metadata_flags_process_type(db_entry->info_flags, PebbleTask_App), + .has_worker = process_metadata_flags_has_worker(db_entry->info_flags), + .icon_resource_id = db_entry->icon_resource_id, + .uuid = db_entry->uuid, + .color = prv_valid_color_from_uuid(db_entry->app_face_bg_color, (Uuid *)&db_entry->uuid), + .sdk_version = db_entry->sdk_version, }; strncpy(entry->name, db_entry->name, APP_NAME_SIZE_BYTES); @@ -659,28 +655,29 @@ static bool prv_app_install_entry_from_app_db_entry(AppInstallId id, AppDBEntry } static bool prv_app_install_entry_from_resource_registry_entry(const AppRegistryEntry *reg_entry, - AppInstallEntry *entry) { + AppInstallEntry *entry) { PebbleProcessInfo *app_header = kernel_malloc_check(sizeof(PebbleProcessInfo)); bool rv = false; if (resource_load_byte_range_system(SYSTEM_APP, reg_entry->bin_resource_id, 0, - (uint8_t *)app_header, sizeof(*app_header)) != sizeof(*app_header)) { + (uint8_t *)app_header, + sizeof(*app_header)) != sizeof(*app_header)) { PBL_LOG_WRN("Stored app with resource id %d not found in resources", - reg_entry->bin_resource_id); + reg_entry->bin_resource_id); goto done; } - *entry = (AppInstallEntry) { - .install_id = reg_entry->id, - .type = AppInstallStorageResources, - .visibility = process_metadata_flags_visibility(app_header->flags), - // PebbleTask_App because the flag parsing function needs it, and we can assume all - // applications registered with the manager are applications, not workers. - .process_type = process_metadata_flags_process_type(app_header->flags, PebbleTask_App), - .has_worker = process_metadata_flags_has_worker(app_header->flags), - .icon_resource_id = reg_entry->icon_resource_id, - .uuid = reg_entry->uuid, - .color = prv_valid_color_from_uuid(reg_entry->color, (Uuid *) ®_entry->uuid), - .sdk_version = app_header->sdk_version, + *entry = (AppInstallEntry){ + .install_id = reg_entry->id, + .type = AppInstallStorageResources, + .visibility = process_metadata_flags_visibility(app_header->flags), + // PebbleTask_App because the flag parsing function needs it, and we can assume all + // applications registered with the manager are applications, not workers. + .process_type = process_metadata_flags_process_type(app_header->flags, PebbleTask_App), + .has_worker = process_metadata_flags_has_worker(app_header->flags), + .icon_resource_id = reg_entry->icon_resource_id, + .uuid = reg_entry->uuid, + .color = prv_valid_color_from_uuid(reg_entry->color, (Uuid *)®_entry->uuid), + .sdk_version = app_header->sdk_version, }; i18n_get_with_buffer(reg_entry->name, entry->name, APP_NAME_SIZE_BYTES); @@ -691,24 +688,23 @@ static bool prv_app_install_entry_from_resource_registry_entry(const AppRegistry } bool prv_app_install_entry_from_fw_registry_entry(const AppRegistryEntry *reg_entry, - AppInstallEntry *entry) { - - const PebbleProcessMdSystem *md = (PebbleProcessMdSystem *) reg_entry->md_fn(); + AppInstallEntry *entry) { + const PebbleProcessMdSystem *md = (PebbleProcessMdSystem *)reg_entry->md_fn(); if (!md) { return false; } - *entry = (AppInstallEntry) { - .install_id = reg_entry->id, - .type = AppInstallStorageFw, - .visibility = md->common.visibility, - .process_type = md->common.process_type, - .has_worker = md->common.has_worker, - .icon_resource_id = md->icon_resource_id, - .uuid = md->common.uuid, - .color = prv_valid_color_from_uuid(reg_entry->color, (Uuid *) &md->common.uuid), - .sdk_version = process_metadata_get_sdk_version((PebbleProcessMd *)md), + *entry = (AppInstallEntry){ + .install_id = reg_entry->id, + .type = AppInstallStorageFw, + .visibility = md->common.visibility, + .process_type = md->common.process_type, + .has_worker = md->common.has_worker, + .icon_resource_id = md->icon_resource_id, + .uuid = md->common.uuid, + .color = prv_valid_color_from_uuid(reg_entry->color, (Uuid *)&md->common.uuid), + .sdk_version = process_metadata_get_sdk_version((PebbleProcessMd *)md), }; i18n_get_with_buffer(md->name, entry->name, APP_NAME_SIZE_BYTES); @@ -751,7 +747,7 @@ bool app_install_get_entry_for_install_id(AppInstallId install_id, AppInstallEnt return rv; } - PBL_LOG_ERR("Failed to get entry for id %"PRId32, install_id); + PBL_LOG_ERR("Failed to get entry for id %" PRId32, install_id); return false; } @@ -784,9 +780,10 @@ static const PebbleProcessMd *prv_get_md_for_reg_entry(const AppRegistryEntry *r // If its a RESOURCE app, we much read from the resource pack and populate an Md PebbleProcessInfo app_header; if (resource_load_byte_range_system(SYSTEM_APP, reg_entry->bin_resource_id, 0, - (uint8_t *)&app_header, sizeof(app_header)) != sizeof(app_header)) { + (uint8_t *)&app_header, + sizeof(app_header)) != sizeof(app_header)) { PBL_LOG_WRN("Stored app with resource id %d not found in resources", - reg_entry->bin_resource_id); + reg_entry->bin_resource_id); return NULL; } @@ -795,7 +792,7 @@ static const PebbleProcessMd *prv_get_md_for_reg_entry(const AppRegistryEntry *r // freed in process_manager.c PebbleProcessMdResource *md = kernel_malloc_check(sizeof(PebbleProcessMdResource)); process_metadata_init_with_resource_header(md, &app_header, reg_entry->bin_resource_id, - PebbleTask_App); + PebbleTask_App); const PebbleProcessMd *const_md = (PebbleProcessMd *)md; return const_md; } @@ -814,7 +811,7 @@ static const PebbleProcessMd *prv_get_md_for_flash_id(AppInstallId id, bool work const PebbleTask task = worker ? PebbleTask_Worker : PebbleTask_App; if (GET_APP_INFO_SUCCESS != app_storage_get_process_info(&app_header, build_id_buffer, id, task)) { - PBL_LOG_WRN("Failed to get app from flash with id %"PRIu32, id); + PBL_LOG_WRN("Failed to get app from flash with id %" PRIu32, id); return NULL; } @@ -825,7 +822,6 @@ static const PebbleProcessMd *prv_get_md_for_flash_id(AppInstallId id, bool work return const_md; } - // PebbleProcessMd is freed in process_manager.c when the application quits const PebbleProcessMd *app_install_get_md(AppInstallId id, bool worker) { const AppRegistryEntry *reg_entry = prv_get_registry_list_entry(id, NULL /* record_order */); @@ -836,7 +832,7 @@ const PebbleProcessMd *app_install_get_md(AppInstallId id, bool worker) { } // Not a registered app, fail. - PBL_LOG_ERR("Can't get PebbleProcessMd for app id %"PRId32, id); + PBL_LOG_ERR("Can't get PebbleProcessMd for app id %" PRId32, id); return NULL; } @@ -846,16 +842,15 @@ void app_install_release_md(const PebbleProcessMd *md) { } switch (md->process_storage) { - case ProcessStorageBuiltin: - break; - case ProcessStorageFlash: - case ProcessStorageResource: - kernel_free((PebbleProcessMd*) md); + case ProcessStorageBuiltin: + break; + case ProcessStorageFlash: + case ProcessStorageResource: + kernel_free((PebbleProcessMd *)md); } } -static void prv_enumerate_app_db_delete(AppInstallId install_id, AppDBEntry *db_entry, - void *data) { +static void prv_enumerate_app_db_delete(AppInstallId install_id, AppDBEntry *db_entry, void *data) { PBL_ASSERTN(app_install_id_from_app_db(install_id)); task_watchdog_bit_set(pebble_task_get_current()); diff --git a/src/fw/process_management/app_install_manager.h b/src/fw/process_management/app_install_manager.h index 974d27719c..18e5909ba8 100644 --- a/src/fw/process_management/app_install_manager.h +++ b/src/fw/process_management/app_install_manager.h @@ -63,8 +63,8 @@ //! 2. Call app_install_get_entry_for_install_id and get the entry data structure //! 3. Use the getter functions for the entry to retrieve individual fields within the struct. - -#define TIMESTAMP_INVALID ((RtcTicks)0) //!< for most_recent_communication_timestamp in AppInstallEntry +#define TIMESTAMP_INVALID \ + ((RtcTicks)0) //!< for most_recent_communication_timestamp in AppInstallEntry //! Max number of bytes for an application. #define APP_NAME_SIZE_BYTES 96 @@ -78,29 +78,29 @@ typedef enum { typedef struct { AppInstallId install_id; - AppInstallStorage type:2; // SYSTEM/RESOURCE/FLASH + AppInstallStorage type : 2; // SYSTEM/RESOURCE/FLASH ProcessVisibility visibility; - ProcessType process_type; // WATCHFACE/APP + ProcessType process_type; // WATCHFACE/APP bool has_worker; Uuid uuid; GColor color; char name[APP_NAME_SIZE_BYTES]; int icon_resource_id; Version sdk_version; - unsigned int record_order; //!< 0 means not in the app registry + unsigned int record_order; //!< 0 means not in the app registry } AppInstallEntry; typedef enum { - APP_AVAILABLE = 0, //< occurs on app installation - APP_REMOVED = 1, //< occurs on app removal - APP_ICON_NAME_UPDATED = 2, //< occurs when app (metadata) has been updated - APP_UPGRADED = 3, //< occurs when app is getting removed prior to upgrade - APP_DB_CLEARED = 4, //< occurs when app is getting removed prior to upgrade + APP_AVAILABLE = 0, //< occurs on app installation + APP_REMOVED = 1, //< occurs on app removal + APP_ICON_NAME_UPDATED = 2, //< occurs when app (metadata) has been updated + APP_UPGRADED = 3, //< occurs when app is getting removed prior to upgrade + APP_DB_CLEARED = 4, //< occurs when app is getting removed prior to upgrade NUM_INSTALL_EVENT_TYPES, } InstallEventType; //! Used for the static application entries in the app registry -typedef const PebbleProcessMd* (*MdFunc) (void); +typedef const PebbleProcessMd *(*MdFunc)(void); //! Used for apps listed in the system app registry typedef struct { @@ -197,7 +197,7 @@ bool app_install_entry_is_quick_launch_visible_only(const AppInstallEntry *entry //! @param entry AppInstallEntry to check the parameters of bool app_install_entry_is_SDK_compatible(const AppInstallEntry *entry); -typedef bool(*AppInstallEnumerateCb)(AppInstallEntry *entry, void *data); +typedef bool (*AppInstallEnumerateCb)(AppInstallEntry *entry, void *data); //! Enumerates all active install ids for non-hidden apps and calls the given function for each //! install id. diff --git a/src/fw/process_management/app_install_manager_known_apps.h b/src/fw/process_management/app_install_manager_known_apps.h index 3d3e1be63e..a046fd6f80 100644 --- a/src/fw/process_management/app_install_manager_known_apps.h +++ b/src/fw/process_management/app_install_manager_known_apps.h @@ -5,66 +5,255 @@ // please don't change these values manually, they are derived from the spreadsheet // "2015 Partner Planning - list of color for apps" from the bizdev team -{.uuid = {0xe0, 0x89, 0x86, 0x19, 0xec, 0xcd, 0x43, 0x70, 0x91, 0x41, 0x2c, 0xe1, 0x9b, 0x91, 0xc4, 0x32}, .color_argb = GColorRedARGB8}, // Yelp -{.uuid = {0xd6, 0xdb, 0xcb, 0x9f, 0x06, 0x14, 0x48, 0x98, 0x99, 0x8c, 0xb7, 0xb6, 0x3e, 0x7c, 0xe5, 0x7c}, .color_argb = GColorRajahARGB8}, // Swarm -{.uuid = {0xe0, 0x89, 0x86, 0x19, 0xec, 0xcd, 0x43, 0x70, 0x91, 0x41, 0x2c, 0xe1, 0x9b, 0x91, 0xc4, 0x32}, .color_argb = GColorIslamicGreenARGB8}, // Evernote -{.uuid = {0xc5, 0xfb, 0xbd, 0x64, 0x9a, 0xae, 0x43, 0x5a, 0xa2, 0x9c, 0x1c, 0x99, 0xf0, 0x72, 0xa8, 0xf3}, .color_argb = GColorBlueMoonARGB8}, // eBay -{.uuid = {0x7b, 0x3f, 0x56, 0x49, 0xf0, 0x3a, 0x42, 0xf9, 0x9d, 0x86, 0xbe, 0x21, 0xb0, 0x47, 0x49, 0xa5}, .color_argb = GColorCobaltBlueARGB8}, // Pandora -{.uuid = {0x0b, 0x73, 0xb7, 0x6a, 0xcd, 0x65, 0x4d, 0xc2, 0x95, 0x85, 0xaa, 0xa2, 0x13, 0x32, 0x08, 0x58}, .color_argb = GColorBlackARGB8}, // Misfit -{.uuid = {0x7f, 0x97, 0x08, 0xf8, 0x9b, 0x15, 0x47, 0x57, 0x99, 0x18, 0xea, 0x3a, 0x4c, 0x85, 0x63, 0xa5}, .color_argb = GColorPictonBlueARGB8}, // Swim.com -{.uuid = {0x80, 0x89, 0x03, 0xcb, 0xfa, 0x37, 0x42, 0x47, 0xb0, 0x12, 0x7d, 0xfe, 0x5c, 0x92, 0x69, 0xe1}, .color_argb = GColorOrangeARGB8}, // Pixel Miner -{.uuid = {0x2e, 0xdf, 0xf9, 0xdf, 0x4d, 0x60, 0x47, 0xdb, 0x99, 0x62, 0x43, 0x7d, 0x40, 0xc5, 0xf1, 0xe2}, .color_argb = GColorLibertyARGB8}, // Tiny Bird -{.uuid = {0x17, 0xb3, 0x32, 0x24, 0x31, 0x7d, 0x44, 0xd7, 0x9e, 0x70, 0x62, 0x80, 0xd4, 0x2f, 0xb9, 0x39}, .color_argb = GColorMidnightGreenARGB8}, // PinyWings -{.uuid = {0x43, 0x6f, 0xe4, 0x62, 0x4a, 0xa0, 0x4c, 0xa3, 0xbd, 0x2c, 0x2c, 0x8e, 0x72, 0xb0, 0x32, 0x81}, .color_argb = GColorOrangeARGB8}, // Cards for Pebble -{.uuid = {0xdc, 0x36, 0x23, 0xce, 0xc8, 0x04, 0x4a, 0xba, 0x8b, 0xe4, 0xf0, 0x52, 0x73, 0xee, 0x87, 0x74}, .color_argb = GColorDarkGrayARGB8}, // Smartwatch+ -{.uuid = {0x4b, 0x76, 0x00, 0x64, 0x14, 0x88, 0x40, 0x44, 0x96, 0x7a, 0x1b, 0x1d, 0x3a, 0xb3, 0x05, 0x74}, .color_argb = GColorDarkGrayARGB8}, // Glance -{.uuid = {0x24, 0xb0, 0xa1, 0xe5, 0xf0, 0xb1, 0x44, 0x0d, 0x8e, 0x53, 0x8f, 0x26, 0x68, 0x8a, 0x3f, 0x07}, .color_argb = GColorKellyGreenARGB8}, // Sleep as Android -{.uuid = {0xe3, 0x06, 0x00, 0x14, 0xbf, 0xe9, 0x4d, 0x03, 0xb7, 0x5e, 0x37, 0x4c, 0xc4, 0xdc, 0xa9, 0x7b}, .color_argb = GColorRajahARGB8}, // Alarms++ -{.uuid = {0x54, 0x3e, 0xc8, 0xb0, 0xa9, 0x4b, 0x4f, 0xbb, 0x95, 0x31, 0x63, 0x47, 0x84, 0x2f, 0xcd, 0xb1}, .color_argb = GColorVividCeruleanARGB8}, // Timer (3rd party) -{.uuid = {0x1b, 0xdf, 0xe4, 0x35, 0x6a, 0x34, 0x42, 0xd5, 0xae, 0xd7, 0xac, 0xe2, 0x9f, 0xec, 0x12, 0x59}, .color_argb = GColorCadetBlueARGB8}, // NavMe -{.uuid = {0x4e, 0x81, 0x8f, 0xcd, 0x7d, 0xaf, 0x4d, 0x09, 0xba, 0x51, 0x60, 0x8a, 0x2a, 0x44, 0x98, 0x11}, .color_argb = GColorElectricUltramarineARGB8}, // LetsMuv -{.uuid = {0x7e, 0x4b, 0x6a, 0x11, 0xd4, 0x20, 0x46, 0x01, 0xa5, 0xd3, 0xeb, 0x44, 0x09, 0x39, 0x6a, 0x6f}, .color_argb = GColorKellyGreenARGB8}, // Endomondo -{.uuid = {0xf3, 0x8e, 0x8e, 0xf7, 0xf2, 0x10, 0x4b, 0x9a, 0xbf, 0xb3, 0x67, 0x26, 0xe2, 0x93, 0x4e, 0x09}, .color_argb = GColorPictonBlueARGB8}, // Movable -{.uuid = {0x58, 0x5f, 0x47, 0xed, 0x99, 0x97, 0x4e, 0x32, 0xbd, 0x94, 0x67, 0xb9, 0xc3, 0x64, 0xa5, 0xec}, .color_argb = GColorBlackARGB8}, // Mr Runner - Up -{.uuid = {0x09, 0x33, 0x25, 0xba, 0x1b, 0xe9, 0x4f, 0x5f, 0xba, 0x80, 0xb4, 0x75, 0x04, 0x75, 0x41, 0x91}, .color_argb = GColorSunsetOrangeARGB8}, // WW - Weather Watch -{.uuid = {0xfb, 0x53, 0x38, 0xd6, 0x75, 0x1c, 0x4d, 0x4f, 0x90, 0x74, 0x70, 0xd4, 0xba, 0xd0, 0x21, 0xa0}, .color_argb = GColorLightGrayARGB8}, // SmartStatus -{.uuid = {0x5b, 0xe4, 0x4f, 0x1d, 0xd2, 0x62, 0x4e, 0xa6, 0xaa, 0x30, 0xdd, 0xbe, 0xc1, 0xe3, 0xca, 0xb2}, .color_argb = GColorDukeBlueARGB8}, // Morpheuz -{.uuid = {0x5f, 0xac, 0x58, 0x89, 0x26, 0x70, 0x46, 0x43, 0x82, 0x57, 0xb0, 0x73, 0x87, 0x7d, 0x63, 0xce}, .color_argb = GColorIndigoARGB8}, // Awear -{.uuid = {0x48, 0x18, 0xa8, 0xbd, 0x6e, 0x53, 0x49, 0x1a, 0xb6, 0xb5, 0x63, 0x02, 0xb3, 0x36, 0x3d, 0x9b}, .color_argb = GColorSpringBudARGB8}, // Battery Lifetime -{.uuid = {0xe4, 0x16, 0x8f, 0x6c, 0xb4, 0x85, 0x4b, 0x6f, 0x99, 0xc4, 0x94, 0xaa, 0x95, 0x7e, 0x86, 0xd5}, .color_argb = GColorMalachiteARGB8}, // Music Boss -{.uuid = {0x0d, 0xb6, 0xa5, 0x5e, 0xb3, 0x2a, 0x4b, 0x03, 0xb0, 0x37, 0x95, 0x63, 0x7b, 0xf3, 0x06, 0xff}, .color_argb = GColorBlackARGB8}, // MultiTimer -{.uuid = {0x4d, 0x6e, 0xa3, 0xee, 0x0f, 0x2a, 0x4c, 0x33, 0xb0, 0x42, 0xe2, 0xe5, 0x6c, 0xe8, 0x0c, 0xd4}, .color_argb = GColorPurpleARGB8}, // Yo -{.uuid = {0x93, 0x6a, 0x77, 0x26, 0x4c, 0x8f, 0x41, 0x67, 0x8c, 0x25, 0x46, 0x68, 0x36, 0x82, 0xb0, 0x6e}, .color_argb = GColorDarkGrayARGB8}, // Pebtris -{.uuid = {0x22, 0xe5, 0x53, 0x87, 0x92, 0x3b, 0x41, 0x9f, 0xae, 0x03, 0xad, 0x09, 0xff, 0x7e, 0xa2, 0x95}, .color_argb = GColorMelonARGB8}, // Calendar -{.uuid = {0x86, 0x5a, 0xd5, 0x5a, 0xe0, 0x18, 0x40, 0x70, 0x97, 0x07, 0x98, 0x22, 0x5b, 0x5a, 0x6a, 0x34}, .color_argb = GColorLightGrayARGB8}, // Asteriod -{.uuid = {0x7f, 0xb1, 0xc6, 0x61, 0x04, 0x50, 0x40, 0x92, 0xb4, 0x13, 0x5c, 0xc8, 0x40, 0xfa, 0x09, 0x45}, .color_argb = GColorBlackARGB8}, // 3 Calendar -{.uuid = {0x4c, 0x9b, 0x88, 0x5b, 0x40, 0x0d, 0x4f, 0x1c, 0x8e, 0x99, 0x4d, 0x38, 0xa1, 0xb7, 0x96, 0xb4}, .color_argb = GColorBlackARGB8}, // GoPro -{.uuid = {0x5c, 0xc7, 0xeb, 0xd1, 0xea, 0x97, 0x49, 0x4c, 0xae, 0x7c, 0xec, 0xd0, 0x5d, 0xd3, 0x3a, 0x5a}, .color_argb = GColorRedARGB8}, // Email to SMS -{.uuid = {0x6f, 0x93, 0x02, 0xfc, 0xed, 0x64, 0x43, 0x5a, 0xae, 0x1a, 0x83, 0x30, 0x8f, 0xe1, 0x18, 0x02}, .color_argb = GColorDarkCandyAppleRedARGB8}, // Pebble Snap -{.uuid = {0x12, 0x10, 0xb1, 0x65, 0x10, 0x52, 0x44, 0x7d, 0x80, 0xb1, 0x55, 0xce, 0x6e, 0x5d, 0x1b, 0x20}, .color_argb = GColorCobaltBlueARGB8}, // Dominos -{.uuid = {0xee, 0x54, 0x11, 0x34, 0x3b, 0x52, 0x4f, 0x7c, 0xbd, 0x88, 0x08, 0xc3, 0x27, 0x6c, 0xa1, 0x4b}, .color_argb = GColorRedARGB8}, // Telepizza -{.uuid = {0x5e, 0x6f, 0xa6, 0x42, 0x51, 0xe9, 0x4e, 0xaf, 0xae, 0x07, 0x7c, 0xdc, 0x27, 0x33, 0x0f, 0xf1}, .color_argb = GColorFollyARGB8}, // AirBerlin -{.uuid = {0xc9, 0x80, 0x84, 0x49, 0x03, 0x00, 0x4e, 0x33, 0x9a, 0xe4, 0xb1, 0x26, 0x5b, 0xaf, 0x42, 0xab}, .color_argb = GColorDarkGrayARGB8}, // Mercedes Benz -{.uuid = {0x58, 0x78, 0x14, 0xd7, 0x79, 0x15, 0x4e, 0x70, 0x8d, 0x77, 0xd5, 0x07, 0x18, 0x7c, 0xb4, 0x4e}, .color_argb = GColorPictonBlueARGB8}, // Gym Timer -{.uuid = {0x2c, 0x4a, 0x34, 0x23, 0x2e, 0x3e, 0x46, 0x0a, 0x8f, 0x6d, 0xbc, 0xdb, 0x4b, 0x46, 0x21, 0xb3}, .color_argb = GColorBlueMoonARGB8}, // Bart on Time -{.uuid = {0x00, 0xe9, 0xde, 0xeb, 0x16, 0xb4, 0x47, 0x52, 0xae, 0x35, 0x2c, 0xc0, 0x88, 0xfc, 0x6c, 0xa9}, .color_argb = GColorOxfordBlueARGB8}, // UK Transport -{.uuid = {0x43, 0xa4, 0xb4, 0xd6, 0x94, 0x04, 0x4f, 0x39, 0x86, 0x8c, 0x59, 0x48, 0x01, 0xa7, 0xb6, 0xb0}, .color_argb = GColorPictonBlueARGB8}, // Twebble -{.uuid = {0x7c, 0x62, 0xa8, 0x0d, 0xbf, 0x8f, 0x4c, 0xd0, 0x87, 0x9c, 0x14, 0xb7, 0x2f, 0x41, 0x07, 0x9d}, .color_argb = GColorWindsorTanARGB8}, // JavaPay -{.uuid = {0x98, 0xa1, 0xc9, 0x95, 0x74, 0x82, 0x48, 0x61, 0xbf, 0xcf, 0xb4, 0x44, 0x75, 0x6b, 0x77, 0xa3}, .color_argb = GColorLightGrayARGB8}, // PebbDrive -{.uuid = {0xf6, 0xf1, 0xa8, 0xdf, 0x4d, 0x06, 0x4e, 0x8a, 0xbe, 0x7c, 0x52, 0xfb, 0x32, 0xf5, 0x3f, 0x98}, .color_argb = GColorRedARGB8}, // PebbleCN -{.uuid = {0x03, 0xa8, 0x3a, 0x53, 0x94, 0x33, 0x49, 0xde, 0x89, 0xde, 0xa3, 0x0e, 0xed, 0x2b, 0xd5, 0x89}, .color_argb = GColorRedARGB8}, // PebbleCC -{.uuid = {0x1a, 0x1a, 0x0e, 0xa3, 0x15, 0x9b, 0x41, 0x97, 0x94, 0x37, 0x16, 0x24, 0xdd, 0x2f, 0xb0, 0x65}, .color_argb = GColorLimerickARGB8}, // PebbGPS -{.uuid = {0x49, 0x82, 0x77, 0x22, 0x4f, 0x3b, 0x4e, 0x3f, 0x9e, 0x96, 0xd6, 0x60, 0x08, 0x9f, 0x50, 0xc1}, .color_argb = GColorMidnightGreenARGB8}, // Compass -{.uuid = {0x3a, 0xc7, 0x96, 0xc0, 0x47, 0x5b, 0x4c, 0xdf, 0x99, 0x77, 0x86, 0x8f, 0xfd, 0x5d, 0x22, 0x25}, .color_argb = GColorDarkGrayARGB8}, // Pebblets -{.uuid = {0x17, 0xbf, 0x83, 0xaa, 0x88, 0xa9, 0x45, 0x9a, 0xa6, 0xe5, 0x60, 0xaa, 0x60, 0xe1, 0xdc, 0x07}, .color_argb = GColorWindsorTanARGB8}, // Timer+ -{.uuid = {0xd9, 0x48, 0x17, 0x9c, 0x88, 0xf9, 0x4b, 0x15, 0xa8, 0x4a, 0x35, 0x64, 0x8e, 0x2a, 0x56, 0x10}, .color_argb = GColorVividCeruleanARGB8}, // Leaf -{.uuid = {0xd6, 0x2b, 0xc4, 0x67, 0x84, 0x99, 0x4a, 0xb5, 0x8b, 0xf1, 0x35, 0xeb, 0xf1, 0xee, 0x8f, 0x08}, .color_argb = GColorCadetBlueARGB8}, // Wrist Presenter -{.uuid = {0xe6, 0x0b, 0x30, 0x32, 0x3d, 0x91, 0x4c, 0xb8, 0x8f, 0xa7, 0x27, 0x49, 0x00, 0x0b, 0x7c, 0xa5}, .color_argb = GColorBlackARGB8}, // Kronos -{.uuid = {0x06, 0x0d, 0x81, 0x97, 0x9c, 0xf9, 0x49, 0xd4, 0xab, 0x1d, 0x03, 0x07, 0x4d, 0x0a, 0x6d, 0x50}, .color_argb = GColorOrangeARGB8}, // Grill Timer -{.uuid = {0x07, 0xd8, 0x78, 0x11, 0x51, 0x0f, 0x48, 0xf2, 0xb7, 0x23, 0x6b, 0xcf, 0xc4, 0xdb, 0x9a, 0x40}, .color_argb = GColorTiffanyBlueARGB8}, // Pedemeter -{.uuid = {0x0f, 0xca, 0x4e, 0x5c, 0xda, 0xf2, 0x4a, 0x9b, 0xa2, 0xbd, 0x53, 0xa7, 0x3f, 0x4b, 0x02, 0x1a}, .color_argb = GColorMayGreenARGB8}, // Swing by Swing -{.uuid = {0x73, 0x8f, 0xf8, 0x50, 0xe6, 0x64, 0x44, 0x38, 0x85, 0x34, 0x7f, 0x82, 0x9a, 0x3a, 0x07, 0x1d}, .color_argb = GColorOxfordBlueARGB8}, // Glympse -{.uuid = {0x40, 0xdf, 0x22, 0x7e, 0x47, 0x15, 0x43, 0x69, 0x82, 0xca, 0xec, 0x9d, 0xe5, 0x88, 0x89, 0xea}, .color_argb = GColorDarkCandyAppleRedARGB8}, // CalTrain -{.uuid = {0x1b, 0x35, 0x6b, 0xed, 0xdb, 0xbc, 0x41, 0xd5, 0xa0, 0xf3, 0xec, 0x60, 0xbd, 0x75, 0x1b, 0x15}, .color_argb = GColorDarkCandyAppleRedARGB8}, // ESPN -{.uuid = {0xc6, 0x4a, 0xae, 0x42, 0xb8, 0x22, 0x4d, 0x6d, 0x99, 0x5b, 0xbc, 0x7c, 0x38, 0xe8, 0x43, 0xf4}, .color_argb = GColorCelesteARGB8}, // Timer (1st party) -{.uuid = {0x14, 0xbd, 0x9c, 0xd3, 0x14, 0xdc, 0x4b, 0x81, 0xbd, 0x58, 0x2f, 0x1f, 0xb9, 0xb5, 0x79, 0x78}, .color_argb = GColorYellowARGB8}, // Stopwatch +{.uuid = + {0xe0, 0x89, 0x86, 0x19, 0xec, 0xcd, 0x43, 0x70, 0x91, 0x41, 0x2c, 0xe1, 0x9b, 0x91, 0xc4, + 0x32}, + .color_argb = GColorRedARGB8}, // Yelp + {.uuid = + {0xd6, 0xdb, 0xcb, 0x9f, 0x06, 0x14, 0x48, 0x98, 0x99, 0x8c, 0xb7, 0xb6, 0x3e, 0x7c, 0xe5, + 0x7c}, + .color_argb = GColorRajahARGB8}, // Swarm + {.uuid = + {0xe0, 0x89, 0x86, 0x19, 0xec, 0xcd, 0x43, 0x70, 0x91, 0x41, 0x2c, 0xe1, 0x9b, 0x91, 0xc4, + 0x32}, + .color_argb = GColorIslamicGreenARGB8}, // Evernote + {.uuid = + {0xc5, 0xfb, 0xbd, 0x64, 0x9a, 0xae, 0x43, 0x5a, 0xa2, 0x9c, 0x1c, 0x99, 0xf0, 0x72, 0xa8, + 0xf3}, + .color_argb = GColorBlueMoonARGB8}, // eBay + {.uuid = + {0x7b, 0x3f, 0x56, 0x49, 0xf0, 0x3a, 0x42, 0xf9, 0x9d, 0x86, 0xbe, 0x21, 0xb0, 0x47, 0x49, + 0xa5}, + .color_argb = GColorCobaltBlueARGB8}, // Pandora + {.uuid = + {0x0b, 0x73, 0xb7, 0x6a, 0xcd, 0x65, 0x4d, 0xc2, 0x95, 0x85, 0xaa, 0xa2, 0x13, 0x32, 0x08, + 0x58}, + .color_argb = GColorBlackARGB8}, // Misfit + {.uuid = + {0x7f, 0x97, 0x08, 0xf8, 0x9b, 0x15, 0x47, 0x57, 0x99, 0x18, 0xea, 0x3a, 0x4c, 0x85, 0x63, + 0xa5}, + .color_argb = GColorPictonBlueARGB8}, // Swim.com + {.uuid = + {0x80, 0x89, 0x03, 0xcb, 0xfa, 0x37, 0x42, 0x47, 0xb0, 0x12, 0x7d, 0xfe, 0x5c, 0x92, 0x69, + 0xe1}, + .color_argb = GColorOrangeARGB8}, // Pixel Miner + {.uuid = + {0x2e, 0xdf, 0xf9, 0xdf, 0x4d, 0x60, 0x47, 0xdb, 0x99, 0x62, 0x43, 0x7d, 0x40, 0xc5, 0xf1, + 0xe2}, + .color_argb = GColorLibertyARGB8}, // Tiny Bird + {.uuid = + {0x17, 0xb3, 0x32, 0x24, 0x31, 0x7d, 0x44, 0xd7, 0x9e, 0x70, 0x62, 0x80, 0xd4, 0x2f, 0xb9, + 0x39}, + .color_argb = GColorMidnightGreenARGB8}, // PinyWings + {.uuid = + {0x43, 0x6f, 0xe4, 0x62, 0x4a, 0xa0, 0x4c, 0xa3, 0xbd, 0x2c, 0x2c, 0x8e, 0x72, 0xb0, 0x32, + 0x81}, + .color_argb = GColorOrangeARGB8}, // Cards for Pebble + {.uuid = + {0xdc, 0x36, 0x23, 0xce, 0xc8, 0x04, 0x4a, 0xba, 0x8b, 0xe4, 0xf0, 0x52, 0x73, 0xee, 0x87, + 0x74}, + .color_argb = GColorDarkGrayARGB8}, // Smartwatch+ + {.uuid = + {0x4b, 0x76, 0x00, 0x64, 0x14, 0x88, 0x40, 0x44, 0x96, 0x7a, 0x1b, 0x1d, 0x3a, 0xb3, 0x05, + 0x74}, + .color_argb = GColorDarkGrayARGB8}, // Glance + {.uuid = + {0x24, 0xb0, 0xa1, 0xe5, 0xf0, 0xb1, 0x44, 0x0d, 0x8e, 0x53, 0x8f, 0x26, 0x68, 0x8a, 0x3f, + 0x07}, + .color_argb = GColorKellyGreenARGB8}, // Sleep as Android + {.uuid = + {0xe3, 0x06, 0x00, 0x14, 0xbf, 0xe9, 0x4d, 0x03, 0xb7, 0x5e, 0x37, 0x4c, 0xc4, 0xdc, 0xa9, + 0x7b}, + .color_argb = GColorRajahARGB8}, // Alarms++ + {.uuid = + {0x54, 0x3e, 0xc8, 0xb0, 0xa9, 0x4b, 0x4f, 0xbb, 0x95, 0x31, 0x63, 0x47, 0x84, 0x2f, 0xcd, + 0xb1}, + .color_argb = GColorVividCeruleanARGB8}, // Timer (3rd party) + {.uuid = + {0x1b, 0xdf, 0xe4, 0x35, 0x6a, 0x34, 0x42, 0xd5, 0xae, 0xd7, 0xac, 0xe2, 0x9f, 0xec, 0x12, + 0x59}, + .color_argb = GColorCadetBlueARGB8}, // NavMe + {.uuid = + {0x4e, 0x81, 0x8f, 0xcd, 0x7d, 0xaf, 0x4d, 0x09, 0xba, 0x51, 0x60, 0x8a, 0x2a, 0x44, 0x98, + 0x11}, + .color_argb = GColorElectricUltramarineARGB8}, // LetsMuv + {.uuid = + {0x7e, 0x4b, 0x6a, 0x11, 0xd4, 0x20, 0x46, 0x01, 0xa5, 0xd3, 0xeb, 0x44, 0x09, 0x39, 0x6a, + 0x6f}, + .color_argb = GColorKellyGreenARGB8}, // Endomondo + {.uuid = + {0xf3, 0x8e, 0x8e, 0xf7, 0xf2, 0x10, 0x4b, 0x9a, 0xbf, 0xb3, 0x67, 0x26, 0xe2, 0x93, 0x4e, + 0x09}, + .color_argb = GColorPictonBlueARGB8}, // Movable + {.uuid = + {0x58, 0x5f, 0x47, 0xed, 0x99, 0x97, 0x4e, 0x32, 0xbd, 0x94, 0x67, 0xb9, 0xc3, 0x64, 0xa5, + 0xec}, + .color_argb = GColorBlackARGB8}, // Mr Runner - Up + {.uuid = + {0x09, 0x33, 0x25, 0xba, 0x1b, 0xe9, 0x4f, 0x5f, 0xba, 0x80, 0xb4, 0x75, 0x04, 0x75, 0x41, + 0x91}, + .color_argb = GColorSunsetOrangeARGB8}, // WW - Weather Watch + {.uuid = + {0xfb, 0x53, 0x38, 0xd6, 0x75, 0x1c, 0x4d, 0x4f, 0x90, 0x74, 0x70, 0xd4, 0xba, 0xd0, 0x21, + 0xa0}, + .color_argb = GColorLightGrayARGB8}, // SmartStatus + {.uuid = + {0x5b, 0xe4, 0x4f, 0x1d, 0xd2, 0x62, 0x4e, 0xa6, 0xaa, 0x30, 0xdd, 0xbe, 0xc1, 0xe3, 0xca, + 0xb2}, + .color_argb = GColorDukeBlueARGB8}, // Morpheuz + {.uuid = + {0x5f, 0xac, 0x58, 0x89, 0x26, 0x70, 0x46, 0x43, 0x82, 0x57, 0xb0, 0x73, 0x87, 0x7d, 0x63, + 0xce}, + .color_argb = GColorIndigoARGB8}, // Awear + {.uuid = + {0x48, 0x18, 0xa8, 0xbd, 0x6e, 0x53, 0x49, 0x1a, 0xb6, 0xb5, 0x63, 0x02, 0xb3, 0x36, 0x3d, + 0x9b}, + .color_argb = GColorSpringBudARGB8}, // Battery Lifetime + {.uuid = + {0xe4, 0x16, 0x8f, 0x6c, 0xb4, 0x85, 0x4b, 0x6f, 0x99, 0xc4, 0x94, 0xaa, 0x95, 0x7e, 0x86, + 0xd5}, + .color_argb = GColorMalachiteARGB8}, // Music Boss + {.uuid = + {0x0d, 0xb6, 0xa5, 0x5e, 0xb3, 0x2a, 0x4b, 0x03, 0xb0, 0x37, 0x95, 0x63, 0x7b, 0xf3, 0x06, + 0xff}, + .color_argb = GColorBlackARGB8}, // MultiTimer + {.uuid = + {0x4d, 0x6e, 0xa3, 0xee, 0x0f, 0x2a, 0x4c, 0x33, 0xb0, 0x42, 0xe2, 0xe5, 0x6c, 0xe8, 0x0c, + 0xd4}, + .color_argb = GColorPurpleARGB8}, // Yo + {.uuid = + {0x93, 0x6a, 0x77, 0x26, 0x4c, 0x8f, 0x41, 0x67, 0x8c, 0x25, 0x46, 0x68, 0x36, 0x82, 0xb0, + 0x6e}, + .color_argb = GColorDarkGrayARGB8}, // Pebtris + {.uuid = + {0x22, 0xe5, 0x53, 0x87, 0x92, 0x3b, 0x41, 0x9f, 0xae, 0x03, 0xad, 0x09, 0xff, 0x7e, 0xa2, + 0x95}, + .color_argb = GColorMelonARGB8}, // Calendar + {.uuid = + {0x86, 0x5a, 0xd5, 0x5a, 0xe0, 0x18, 0x40, 0x70, 0x97, 0x07, 0x98, 0x22, 0x5b, 0x5a, 0x6a, + 0x34}, + .color_argb = GColorLightGrayARGB8}, // Asteriod + {.uuid = + {0x7f, 0xb1, 0xc6, 0x61, 0x04, 0x50, 0x40, 0x92, 0xb4, 0x13, 0x5c, 0xc8, 0x40, 0xfa, 0x09, + 0x45}, + .color_argb = GColorBlackARGB8}, // 3 Calendar + {.uuid = + {0x4c, 0x9b, 0x88, 0x5b, 0x40, 0x0d, 0x4f, 0x1c, 0x8e, 0x99, 0x4d, 0x38, 0xa1, 0xb7, 0x96, + 0xb4}, + .color_argb = GColorBlackARGB8}, // GoPro + {.uuid = + {0x5c, 0xc7, 0xeb, 0xd1, 0xea, 0x97, 0x49, 0x4c, 0xae, 0x7c, 0xec, 0xd0, 0x5d, 0xd3, 0x3a, + 0x5a}, + .color_argb = GColorRedARGB8}, // Email to SMS + {.uuid = + {0x6f, 0x93, 0x02, 0xfc, 0xed, 0x64, 0x43, 0x5a, 0xae, 0x1a, 0x83, 0x30, 0x8f, 0xe1, 0x18, + 0x02}, + .color_argb = GColorDarkCandyAppleRedARGB8}, // Pebble Snap + {.uuid = + {0x12, 0x10, 0xb1, 0x65, 0x10, 0x52, 0x44, 0x7d, 0x80, 0xb1, 0x55, 0xce, 0x6e, 0x5d, 0x1b, + 0x20}, + .color_argb = GColorCobaltBlueARGB8}, // Dominos + {.uuid = + {0xee, 0x54, 0x11, 0x34, 0x3b, 0x52, 0x4f, 0x7c, 0xbd, 0x88, 0x08, 0xc3, 0x27, 0x6c, 0xa1, + 0x4b}, + .color_argb = GColorRedARGB8}, // Telepizza + {.uuid = + {0x5e, 0x6f, 0xa6, 0x42, 0x51, 0xe9, 0x4e, 0xaf, 0xae, 0x07, 0x7c, 0xdc, 0x27, 0x33, 0x0f, + 0xf1}, + .color_argb = GColorFollyARGB8}, // AirBerlin + {.uuid = + {0xc9, 0x80, 0x84, 0x49, 0x03, 0x00, 0x4e, 0x33, 0x9a, 0xe4, 0xb1, 0x26, 0x5b, 0xaf, 0x42, + 0xab}, + .color_argb = GColorDarkGrayARGB8}, // Mercedes Benz + {.uuid = + {0x58, 0x78, 0x14, 0xd7, 0x79, 0x15, 0x4e, 0x70, 0x8d, 0x77, 0xd5, 0x07, 0x18, 0x7c, 0xb4, + 0x4e}, + .color_argb = GColorPictonBlueARGB8}, // Gym Timer + {.uuid = + {0x2c, 0x4a, 0x34, 0x23, 0x2e, 0x3e, 0x46, 0x0a, 0x8f, 0x6d, 0xbc, 0xdb, 0x4b, 0x46, 0x21, + 0xb3}, + .color_argb = GColorBlueMoonARGB8}, // Bart on Time + {.uuid = + {0x00, 0xe9, 0xde, 0xeb, 0x16, 0xb4, 0x47, 0x52, 0xae, 0x35, 0x2c, 0xc0, 0x88, 0xfc, 0x6c, + 0xa9}, + .color_argb = GColorOxfordBlueARGB8}, // UK Transport + {.uuid = + {0x43, 0xa4, 0xb4, 0xd6, 0x94, 0x04, 0x4f, 0x39, 0x86, 0x8c, 0x59, 0x48, 0x01, 0xa7, 0xb6, + 0xb0}, + .color_argb = GColorPictonBlueARGB8}, // Twebble + {.uuid = + {0x7c, 0x62, 0xa8, 0x0d, 0xbf, 0x8f, 0x4c, 0xd0, 0x87, 0x9c, 0x14, 0xb7, 0x2f, 0x41, 0x07, + 0x9d}, + .color_argb = GColorWindsorTanARGB8}, // JavaPay + {.uuid = + {0x98, 0xa1, 0xc9, 0x95, 0x74, 0x82, 0x48, 0x61, 0xbf, 0xcf, 0xb4, 0x44, 0x75, 0x6b, 0x77, + 0xa3}, + .color_argb = GColorLightGrayARGB8}, // PebbDrive + {.uuid = + {0xf6, 0xf1, 0xa8, 0xdf, 0x4d, 0x06, 0x4e, 0x8a, 0xbe, 0x7c, 0x52, 0xfb, 0x32, 0xf5, 0x3f, + 0x98}, + .color_argb = GColorRedARGB8}, // PebbleCN + {.uuid = + {0x03, 0xa8, 0x3a, 0x53, 0x94, 0x33, 0x49, 0xde, 0x89, 0xde, 0xa3, 0x0e, 0xed, 0x2b, 0xd5, + 0x89}, + .color_argb = GColorRedARGB8}, // PebbleCC + {.uuid = + {0x1a, 0x1a, 0x0e, 0xa3, 0x15, 0x9b, 0x41, 0x97, 0x94, 0x37, 0x16, 0x24, 0xdd, 0x2f, 0xb0, + 0x65}, + .color_argb = GColorLimerickARGB8}, // PebbGPS + {.uuid = + {0x49, 0x82, 0x77, 0x22, 0x4f, 0x3b, 0x4e, 0x3f, 0x9e, 0x96, 0xd6, 0x60, 0x08, 0x9f, 0x50, + 0xc1}, + .color_argb = GColorMidnightGreenARGB8}, // Compass + {.uuid = + {0x3a, 0xc7, 0x96, 0xc0, 0x47, 0x5b, 0x4c, 0xdf, 0x99, 0x77, 0x86, 0x8f, 0xfd, 0x5d, 0x22, + 0x25}, + .color_argb = GColorDarkGrayARGB8}, // Pebblets + {.uuid = + {0x17, 0xbf, 0x83, 0xaa, 0x88, 0xa9, 0x45, 0x9a, 0xa6, 0xe5, 0x60, 0xaa, 0x60, 0xe1, 0xdc, + 0x07}, + .color_argb = GColorWindsorTanARGB8}, // Timer+ + {.uuid = + {0xd9, 0x48, 0x17, 0x9c, 0x88, 0xf9, 0x4b, 0x15, 0xa8, 0x4a, 0x35, 0x64, 0x8e, 0x2a, 0x56, + 0x10}, + .color_argb = GColorVividCeruleanARGB8}, // Leaf + {.uuid = + {0xd6, 0x2b, 0xc4, 0x67, 0x84, 0x99, 0x4a, 0xb5, 0x8b, 0xf1, 0x35, 0xeb, 0xf1, 0xee, 0x8f, + 0x08}, + .color_argb = GColorCadetBlueARGB8}, // Wrist Presenter + {.uuid = + {0xe6, 0x0b, 0x30, 0x32, 0x3d, 0x91, 0x4c, 0xb8, 0x8f, 0xa7, 0x27, 0x49, 0x00, 0x0b, 0x7c, + 0xa5}, + .color_argb = GColorBlackARGB8}, // Kronos + {.uuid = + {0x06, 0x0d, 0x81, 0x97, 0x9c, 0xf9, 0x49, 0xd4, 0xab, 0x1d, 0x03, 0x07, 0x4d, 0x0a, 0x6d, + 0x50}, + .color_argb = GColorOrangeARGB8}, // Grill Timer + {.uuid = + {0x07, 0xd8, 0x78, 0x11, 0x51, 0x0f, 0x48, 0xf2, 0xb7, 0x23, 0x6b, 0xcf, 0xc4, 0xdb, 0x9a, + 0x40}, + .color_argb = GColorTiffanyBlueARGB8}, // Pedemeter + {.uuid = + {0x0f, 0xca, 0x4e, 0x5c, 0xda, 0xf2, 0x4a, 0x9b, 0xa2, 0xbd, 0x53, 0xa7, 0x3f, 0x4b, 0x02, + 0x1a}, + .color_argb = GColorMayGreenARGB8}, // Swing by Swing + {.uuid = + {0x73, 0x8f, 0xf8, 0x50, 0xe6, 0x64, 0x44, 0x38, 0x85, 0x34, 0x7f, 0x82, 0x9a, 0x3a, 0x07, + 0x1d}, + .color_argb = GColorOxfordBlueARGB8}, // Glympse + {.uuid = + {0x40, 0xdf, 0x22, 0x7e, 0x47, 0x15, 0x43, 0x69, 0x82, 0xca, 0xec, 0x9d, 0xe5, 0x88, 0x89, + 0xea}, + .color_argb = GColorDarkCandyAppleRedARGB8}, // CalTrain + {.uuid = + {0x1b, 0x35, 0x6b, 0xed, 0xdb, 0xbc, 0x41, 0xd5, 0xa0, 0xf3, 0xec, 0x60, 0xbd, 0x75, 0x1b, + 0x15}, + .color_argb = GColorDarkCandyAppleRedARGB8}, // ESPN + {.uuid = + {0xc6, 0x4a, 0xae, 0x42, 0xb8, 0x22, 0x4d, 0x6d, 0x99, 0x5b, 0xbc, 0x7c, 0x38, 0xe8, 0x43, + 0xf4}, + .color_argb = GColorCelesteARGB8}, // Timer (1st party) + {.uuid = + {0x14, 0xbd, 0x9c, 0xd3, 0x14, 0xdc, 0x4b, 0x81, 0xbd, 0x58, 0x2f, 0x1f, 0xb9, 0xb5, 0x79, + 0x78}, + .color_argb = GColorYellowARGB8}, // Stopwatch diff --git a/src/fw/process_management/app_install_manager_private.h b/src/fw/process_management/app_install_manager_private.h index 182d10de30..105198d19b 100644 --- a/src/fw/process_management/app_install_manager_private.h +++ b/src/fw/process_management/app_install_manager_private.h @@ -7,11 +7,11 @@ //! @file app_install_manager_private.h //! These are the "private" functions used by submodules of app_install_manager. -typedef void (*InstallCallbackDoneCallback)(void*); +typedef void (*InstallCallbackDoneCallback)(void *); //! Used by app_custom_icon and app_db, so invoke add/remove/update/app_db_clear callbacks. //! This function takes care of calling the callbacks on the proper task, so this function //! can be called from any task. //! @return false if a callback is already in progress bool app_install_do_callbacks(InstallEventType event_type, AppInstallId install_id, Uuid *uuid, - InstallCallbackDoneCallback done_callback, void* done_callback_data); + InstallCallbackDoneCallback done_callback, void *done_callback_data); diff --git a/src/fw/process_management/app_manager.c b/src/fw/process_management/app_manager.c index f7586a8623..26d6adb0bf 100644 --- a/src/fw/process_management/app_manager.c +++ b/src/fw/process_management/app_manager.c @@ -53,12 +53,12 @@ #include #include -#define RETURN_CRASH_TIMEOUT_TICKS (60 * RTC_TICKS_HZ) +#define RETURN_CRASH_TIMEOUT_TICKS (60 * RTC_TICKS_HZ) //! Behold! The file that manages applications! //! -//! The code in this file applies to all apps, whether they're third party apps (stored in SPI flash) or first -//! party apps stored inside our firmware. +//! The code in this file applies to all apps, whether they're third party apps (stored in SPI +//! flash) or first party apps stored inside our firmware. //! //! Apps are only started and stopped on the launcher task (aka kernel main). @@ -67,7 +67,7 @@ extern char __APP_RAM_end__[]; extern char __stack_guard_size__[]; //! Used by the "pebble gdb" command to locate the loaded app in memory. -void * volatile g_app_load_address; +void *volatile g_app_load_address; #define MAX_TO_APP_EVENTS 32 static PBL_MSGQ_DEFINE(s_to_app_event_queue, sizeof(PebbleEvent), MAX_TO_APP_EVENTS); @@ -91,7 +91,7 @@ static NextApp s_next_app; // --------------------------------------------------------------------------------------------- void app_manager_init(void) { s_initialized = true; - s_app_task_context = (ProcessContext) { 0 }; + s_app_task_context = (ProcessContext){0}; } // --------------------------------------------------------------------------------------------- @@ -144,7 +144,7 @@ static void prv_app_task_main(void *entry_point) { //! have to be locked because they're the sole property of the process and no //! other tasks should be touching it. All this function does is verify that //! this condition is met before continuing without locking. -static void prv_heap_lock(void* unused) { +static void prv_heap_lock(void *unused) { PBL_ASSERT_TASK(PebbleTask_App); } @@ -220,7 +220,7 @@ static size_t prv_get_app_stack_size(const PebbleProcessMd *app_md) { } T_STATIC MemorySegment prv_get_app_ram_segment(void) { - return (MemorySegment) { __APP_RAM__, __APP_RAM_end__ }; + return (MemorySegment){__APP_RAM__, __APP_RAM_end__}; } T_STATIC size_t prv_get_stack_guard_size(void) { @@ -237,7 +237,7 @@ T_STATIC size_t prv_get_stack_guard_size(void) { //! - The app's task handle or event queue aren't null //! - The app's metadata is null static bool prv_app_start(const PebbleProcessMd *app_md, const void *args, - const AppLaunchReason launch_reason) { + const AppLaunchReason launch_reason) { PBL_ASSERT_TASK(PebbleTask_KernelMain); PBL_ASSERTN(app_md); @@ -274,7 +274,7 @@ static bool prv_app_start(const PebbleProcessMd *app_md, const void *args, s_app_task_context.load_end = app_segment.start; if (!entry_point) { PBL_LOG_WRN("Tried to launch an invalid app in bank %u!", - process_metadata_get_code_bank_num(app_md)); + process_metadata_get_code_bank_num(app_md)); return false; } @@ -283,8 +283,7 @@ static bool prv_app_start(const PebbleProcessMd *app_md, const void *args, const ResourceVersion res_version = process_metadata_get_res_version(app_md); if (!resource_init_app(res_bank_num, &res_version)) { // The resources are busted! Abort starting this app. - APP_LOG(APP_LOG_LEVEL_ERROR, - "Checksum for resources differs."); + APP_LOG(APP_LOG_LEVEL_ERROR, "Checksum for resources differs."); return false; } } @@ -306,12 +305,11 @@ static bool prv_app_start(const PebbleProcessMd *app_md, const void *args, // Don't fuzz 3rd party app heaps because likely many of them rely on accessing free'd memory bool enable_heap_fuzzing = (sdk_type == ProcessAppSDKType_System); Heap *app_heap = app_state_get_heap(); - PBL_LOG_DBG("App heap init %p %p", - app_segment.start, app_segment.end); + PBL_LOG_DBG("App heap init %p %p", app_segment.start, app_segment.end); heap_init(app_heap, app_segment.start, app_segment.end, enable_heap_fuzzing); - heap_set_lock_impl(app_heap, (HeapLockImpl) { - .lock_function = prv_heap_lock, - }); + heap_set_lock_impl(app_heap, (HeapLockImpl){ + .lock_function = prv_heap_lock, + }); process_heap_set_exception_handlers(app_heap, app_md); // We're now going to start the app. We can't abort the app now without calling prv_app_cleanup. @@ -322,7 +320,7 @@ static bool prv_app_start(const PebbleProcessMd *app_md, const void *args, AppInstallEntry entry; if (!app_install_get_entry_for_install_id(s_app_task_context.install_id, &entry)) { // cant retrieve app install entry for id - PBL_LOG_ERR("Failed to get entry for id %"PRId32, s_app_task_context.install_id); + PBL_LOG_ERR("Failed to get entry for id %" PRId32, s_app_task_context.install_id); return false; } if (app_install_entry_is_watchface(&entry) && !app_install_entry_is_hidden(&entry)) { @@ -339,24 +337,25 @@ static bool prv_app_start(const PebbleProcessMd *app_md, const void *args, process_manager_process_setup(PebbleTask_App); char task_name[PBL_THREAD_NAME_LEN]; - snprintf(task_name, sizeof(task_name), "App <%s>", process_metadata_get_name(s_app_task_context.app_md)); + snprintf(task_name, sizeof(task_name), "App <%s>", + process_metadata_get_name(s_app_task_context.app_md)); struct pbl_thread_attr attr = { - .name = task_name, - .entry = prv_app_task_main, - .arg = entry_point, - .prio = APP_TASK_PRIORITY, - .privileged = true, - .stack = stack, - .stack_size = stack_size, + .name = task_name, + .entry = prv_app_task_main, + .arg = entry_point, + .prio = APP_TASK_PRIORITY, + .privileged = true, + .stack = stack, + .stack_size = stack_size, }; PBL_LOG_DBG("Starting %s", task_name); // Store slot of launched app for reboot support (flash apps only) - reboot_set_slot_of_last_launched_app( - (app_md->process_storage == ProcessStorageFlash) ? - process_metadata_get_code_bank_num(app_md) : SYSTEM_APP_BANK_ID); + reboot_set_slot_of_last_launched_app((app_md->process_storage == ProcessStorageFlash) + ? process_metadata_get_code_bank_num(app_md) + : SYSTEM_APP_BANK_ID); s_app_task_context.task_handle = pebble_task_create(PebbleTask_App, &attr); @@ -439,19 +438,16 @@ static void prv_app_show_crash_ui(AppInstallId install_id) { } #if !defined(CONFIG_RECOVERY_FW) - static AppCrashInfo crash_info = { 0 }; + static AppCrashInfo crash_info = {0}; // If the same watchface crashes twice in one minute, then we show a dialog informing // the user that the watchface has crashed. Any button press will dismiss // the dialog and show us the default system watch face. PBL_ASSERTN(install_id != INSTALL_ID_INVALID); if (crash_info.install_id != install_id || (crash_info.crash_ticks + RETURN_CRASH_TIMEOUT_TICKS) < rtc_get_ticks()) { - PBL_LOG_ERR("Watchface crashed (id=%"PRId32"); relaunching", install_id); + PBL_LOG_ERR("Watchface crashed (id=%" PRId32 "); relaunching", install_id); PBL_ANALYTICS_ADD(watchface_crash_count, 1); - crash_info = (AppCrashInfo) { - .install_id = install_id, - .crash_ticks = rtc_get_ticks() - }; + crash_info = (AppCrashInfo){.install_id = install_id, .crash_ticks = rtc_get_ticks()}; // Re-launch immediately watchface_launch_default(NULL); return; @@ -495,15 +491,15 @@ static void prv_app_show_crash_ui(AppInstallId install_id) { i18n_free_all(crash_dialog); - const uint32_t elapsed_ms = - (rtc_get_ticks() - crash_info.crash_ticks) * 1000 / RTC_TICKS_HZ; - PBL_LOG_WRN("Watchface crashed twice in %"PRIu32"ms (id=%"PRId32"); " - "reverting to default", - elapsed_ms, install_id); + const uint32_t elapsed_ms = (rtc_get_ticks() - crash_info.crash_ticks) * 1000 / RTC_TICKS_HZ; + PBL_LOG_WRN("Watchface crashed twice in %" PRIu32 "ms (id=%" PRId32 + "); " + "reverting to default", + elapsed_ms, install_id); PBL_ANALYTICS_ADD(watchface_crash_count, 1); PBL_ANALYTICS_ADD(watchface_crash_revert_count, 1); - crash_info = (AppCrashInfo) { 0 }; + crash_info = (AppCrashInfo){0}; watchface_set_default_install_id(INSTALL_ID_INVALID); watchface_launch_default(NULL); @@ -511,25 +507,25 @@ static void prv_app_show_crash_ui(AppInstallId install_id) { } // --------------------------------------------------------------------------------------------- -//! Switch to the app stored in the s_next_app global. The gracefully flag tells us whether to attempt a graceful -//! exit or not. +//! Switch to the app stored in the s_next_app global. The gracefully flag tells us whether to +//! attempt a graceful exit or not. //! -//! For a graceful exit, if the app has not already finished it's de-init, we post a de_init event to the app, set -//! a 3 second timer, and return immediately to the caller. If/when the app finally finishes deinit, it will post a -//! PEBBLE_PROCESS_KILL_EVENT (graceful=true), which results in this method being again with graceful=true. We will then -//! see that the de_init already finished in that second invocation. +//! For a graceful exit, if the app has not already finished it's de-init, we post a de_init event +//! to the app, set a 3 second timer, and return immediately to the caller. If/when the app finally +//! finishes deinit, it will post a PEBBLE_PROCESS_KILL_EVENT (graceful=true), which results in this +//! method being again with graceful=true. We will then see that the de_init already finished in +//! that second invocation. //! -//! If the app has finished its de-init, or graceful is false, we proceed to kill the app task and launch the next -//! app as stored in the s_next_app global. +//! If the app has finished its de-init, or graceful is false, we proceed to kill the app task and +//! launch the next app as stored in the s_next_app global. //! //! Returns true if new app was just switched in. static bool prv_app_switch(bool gracefully) { ProcessContext *app_task_ctx = &s_app_task_context; PBL_LOG_DBG("Switching from '%s' to '%s', graceful=%d...", - process_metadata_get_name(app_task_ctx->app_md), - process_metadata_get_name(s_next_app.md), - (int)gracefully); + process_metadata_get_name(app_task_ctx->app_md), + process_metadata_get_name(s_next_app.md), (int)gracefully); // Shouldn't be called from app. Use app_manager_put_kill_app_event() instead. PBL_ASSERT_TASK(PebbleTask_KernelMain); @@ -539,7 +535,8 @@ static bool prv_app_switch(bool gracefully) { // to exit, causing the app we land on to be killed when it shouldn't be. launcher_cancel_force_quit(); - // Make sure the process is safe to kill. If this method returns false, it will have set a timer to post + // Make sure the process is safe to kill. If this method returns false, it will have set a timer + // to post // another KILL event in a few seconds, thus giving the process a chance to clean up. if (!process_manager_make_process_safe_to_kill(PebbleTask_App, gracefully)) { // Maybe next time... @@ -554,16 +551,16 @@ static bool prv_app_switch(bool gracefully) { // If we had to ungracefully kill the current app, switch to the launcher app if (!gracefully) { app_install_release_md(s_next_app.md); - s_next_app = (NextApp) { - .md = system_app_state_machine_get_default_app(), + s_next_app = (NextApp){ + .md = system_app_state_machine_get_default_app(), }; } else { // Get the next app to launch if (!s_next_app.md) { // There is no next app to launch? We're starting up, let's launch the startup app. app_install_release_md(s_next_app.md); - s_next_app = (NextApp) { - .md = system_app_state_machine_system_start(), + s_next_app = (NextApp){ + .md = system_app_state_machine_system_start(), }; } } @@ -574,7 +571,7 @@ static bool prv_app_switch(bool gracefully) { PBL_CROAK("Failed to start system app <%s>!", process_metadata_get_name(s_next_app.md)); } PBL_LOG_WRN("Failed to start app <%s>! Restarting launcher", - process_metadata_get_name(s_next_app.md)); + process_metadata_get_name(s_next_app.md)); prv_app_start(system_app_state_machine_system_start(), NULL, APP_LAUNCH_SYSTEM); } @@ -587,14 +584,14 @@ static bool prv_app_switch(bool gracefully) { } // Clear for next time. - s_next_app = (NextApp) {}; + s_next_app = (NextApp){}; return true; } // --------------------------------------------------------------------------------------------- void app_manager_start_first_app(void) { - const PebbleProcessMd* app_md = system_app_state_machine_system_start(); + const PebbleProcessMd *app_md = system_app_state_machine_system_start(); #ifdef CONFIG_SHELL_SDK // SDK shell's system_start returns the default watchface (a flash app) when one is set. // If an install crashed partway through PutBytes, BlobDB has the entry and @@ -622,8 +619,9 @@ void app_manager_start_first_app(void) { static const CompositorTransition *prv_get_transition(const LaunchConfigCommon *config, AppInstallId new_app_id) { - return config->transition ?: shell_get_open_compositor_animation(s_app_task_context.install_id, - new_app_id, config); + return config->transition + ?: shell_get_open_compositor_animation(s_app_task_context.install_id, new_app_id, + config); } // --------------------------------------------------------------------------------------------- @@ -631,17 +629,12 @@ void app_manager_put_launch_app_event(const AppLaunchEventConfig *config) { PBL_ASSERTN(config->id != INSTALL_ID_INVALID); PebbleLaunchAppEventExtended *data = kernel_malloc_check(sizeof(PebbleLaunchAppEventExtended)); - *data = (PebbleLaunchAppEventExtended) { - .common = config->common - }; + *data = (PebbleLaunchAppEventExtended){.common = config->common}; data->common.transition = prv_get_transition(&config->common, config->id); PebbleEvent e = { - .type = PEBBLE_APP_LAUNCH_EVENT, - .launch_app = { - .id = config->id, - .data = data - }, + .type = PEBBLE_APP_LAUNCH_EVENT, + .launch_app = {.id = config->id, .data = data}, }; event_put(&e); @@ -657,7 +650,7 @@ bool app_manager_launch_new_app(const AppLaunchConfig *config) { if (!config->restart && uuid_equal(&(app_md->uuid), &(s_app_task_context.app_md->uuid))) { PBL_LOG_WRN("Ignoring launch for app <%s>, app is already running", - process_metadata_get_name(app_md)); + process_metadata_get_name(app_md)); app_install_release_md(app_md); return false; @@ -665,16 +658,16 @@ bool app_manager_launch_new_app(const AppLaunchConfig *config) { if (process_metadata_get_run_level(app_md) < s_minimum_run_level) { PBL_LOG_WRN("Ignoring launch for app <%s>, minimum run level %d, app run level %d", - process_metadata_get_name(app_md), s_minimum_run_level, - process_metadata_get_run_level(app_md)); + process_metadata_get_name(app_md), s_minimum_run_level, + process_metadata_get_run_level(app_md)); app_install_release_md(app_md); return false; } - s_next_app = (NextApp) { - .md = app_md, - .common = config->common, + s_next_app = (NextApp){ + .md = app_md, + .common = config->common, }; s_next_app.common.transition = prv_get_transition(&config->common, new_app_id); @@ -697,11 +690,11 @@ void app_manager_handle_app_fetch_request_event(const PebbleAppFetchRequestEvent return; } const AppFetchUIArgs *const fetch_args = evt->fetch_args; - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = app_fetch_ui_get_app_info(), - .common.args = fetch_args, - .common.transition = fetch_args->common.transition, - .forcefully = fetch_args->forcefully, + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = app_fetch_ui_get_app_info(), + .common.args = fetch_args, + .common.transition = fetch_args->common.transition, + .forcefully = fetch_args->forcefully, }); } @@ -749,10 +742,10 @@ void app_manager_close_current_app(bool gracefully) { } app_manager_set_minimum_run_level(ProcessAppRunLevelNormal); - process_manager_launch_process(&(ProcessLaunchConfig) { - .id = destination_app_id, - .common.transition = shell_get_close_compositor_animation(current_app_id, destination_app_id), - .forcefully = !gracefully, + process_manager_launch_process(&(ProcessLaunchConfig){ + .id = destination_app_id, + .common.transition = shell_get_close_compositor_animation(current_app_id, destination_app_id), + .forcefully = !gracefully, }); } @@ -766,15 +759,15 @@ void app_manager_force_quit_to_launcher(void) { const PebbleProcessMd *default_process = system_app_state_machine_get_default_app(); const AppInstallId current_app_id = s_app_task_context.install_id; const AppInstallId new_app_id = app_install_get_id_for_uuid(&default_process->uuid); - s_next_app = (NextApp) { - .md = default_process, + s_next_app = (NextApp){ + .md = default_process, }; s_next_app.common.transition = shell_get_close_compositor_animation(current_app_id, new_app_id); prv_app_switch(true /*gracefully*/); } -const PebbleProcessMd* app_manager_get_current_app_md(void) { +const PebbleProcessMd *app_manager_get_current_app_md(void) { return s_app_task_context.app_md; } @@ -782,7 +775,7 @@ AppInstallId app_manager_get_current_app_id(void) { return s_app_task_context.install_id; } -ProcessContext* app_manager_get_task_context(void) { +ProcessContext *app_manager_get_task_context(void) { return &s_app_task_context; } @@ -815,7 +808,7 @@ void app_manager_get_framebuffer_size(GSize *size) { // Platform matches current platform const PlatformType sdk_platform = - process_metadata_get_app_sdk_platform(s_app_task_context.app_md); + process_metadata_get_app_sdk_platform(s_app_task_context.app_md); if (sdk_platform == PBL_PLATFORM_TYPE_CURRENT) { *size = GSize(DISP_COLS, DISP_ROWS); @@ -857,7 +850,7 @@ bool app_manager_is_app_supported(const PebbleProcessMd *md) { void command_get_active_app_metadata(void) { char buffer[32]; - const PebbleProcessMd* app_metadata = app_manager_get_current_app_md(); + const PebbleProcessMd *app_metadata = app_manager_get_current_app_md(); if (app_metadata != NULL) { prompt_send_response_fmt(buffer, sizeof(buffer), "app name: %s", process_metadata_get_name(app_metadata)); @@ -865,7 +858,7 @@ void command_get_active_app_metadata(void) { (app_metadata->process_type == ProcessTypeWatchface)); prompt_send_response_fmt(buffer, sizeof(buffer), "visibility: %u", app_metadata->visibility); prompt_send_response_fmt(buffer, sizeof(buffer), "bank: %d", - (uint8_t) process_metadata_get_res_bank_num(app_metadata)); + (uint8_t)process_metadata_get_res_bank_num(app_metadata)); } else { prompt_send_response("metadata lookup failed: no app running"); } @@ -901,7 +894,6 @@ DEFINE_SYSCALL(bool, sys_app_is_watchface, void) { } DEFINE_SYSCALL(ResAppNum, sys_get_current_resource_num, void) { - if (pebble_task_get_current() == PebbleTask_KernelMain) { return SYSTEM_APP; } diff --git a/src/fw/process_management/app_manager.h b/src/fw/process_management/app_manager.h index 833e406cd4..8d0a319046 100644 --- a/src/fw/process_management/app_manager.h +++ b/src/fw/process_management/app_manager.h @@ -26,8 +26,8 @@ typedef enum { typedef struct AppLaunchConfig { LaunchConfigCommon common; const PebbleProcessMd *md; - bool restart; //!< Allows the current app to be restarted - bool forcefully; //!< Causes the current app to be forcefully closed + bool restart; //!< Allows the current app to be restarted + bool forcefully; //!< Causes the current app to be forcefully closed } AppLaunchConfig; typedef struct AppLaunchEventConfig { @@ -35,7 +35,6 @@ typedef struct AppLaunchEventConfig { AppInstallId id; } AppLaunchEventConfig; - // App management functions void app_manager_init(void); @@ -45,7 +44,6 @@ void app_manager_start_first_app(void); bool app_manager_is_first_app_launched(void); - //! Start up a new application with the given metadata. This will kill the currently running app. //! May only be called from the KernelMain task bool app_manager_launch_new_app(const AppLaunchConfig *config); @@ -62,10 +60,10 @@ void app_manager_close_current_app(bool gracefully); //! Stop the current app, and bring up the launcher. void app_manager_force_quit_to_launcher(void); -//! Sets a minimum run level for app launches that interrupt the current running app. Any app below the specified -//! will be ignored when trying to launch. -//! The minimum run level will be reset to the incoming app whenever an app is launched. This function just allows -//! an app to modify the minimum level between app changes. +//! Sets a minimum run level for app launches that interrupt the current running app. Any app below +//! the specified will be ignored when trying to launch. The minimum run level will be reset to the +//! incoming app whenever an app is launched. This function just allows an app to modify the minimum +//! level between app changes. void app_manager_set_minimum_run_level(ProcessAppRunLevel run_level); //! Gets the wakeup info from the PebbleEvent sent to app_manager @@ -84,13 +82,13 @@ void app_manager_put_launch_app_event(const AppLaunchEventConfig *config); // Getters For App Management State /////////////////////////////////////////////////////////////////////////////// -const PebbleProcessMd* app_manager_get_current_app_md(void); +const PebbleProcessMd *app_manager_get_current_app_md(void); AppInstallId app_manager_get_current_app_id(void); -const PebbleProcessMd* app_manager_get_current_worker(void); +const PebbleProcessMd *app_manager_get_current_worker(void); -ProcessContext* app_manager_get_task_context(void); +ProcessContext *app_manager_get_task_context(void); bool app_manager_is_watchface_running(void); @@ -102,8 +100,6 @@ ButtonId app_manager_get_launch_button(void); void app_manager_get_framebuffer_size(GSize *size); - //! Exit the application. Do some cleanup to make sure things close nicely. //! Called from the app task NORETURN app_task_exit(void); - diff --git a/src/fw/process_management/app_menu_data_source.c b/src/fw/process_management/app_menu_data_source.c index ef377a4d7e..3e08140625 100644 --- a/src/fw/process_management/app_menu_data_source.c +++ b/src/fw/process_management/app_menu_data_source.c @@ -16,15 +16,15 @@ static void add_app_with_install_id(const AppInstallEntry *entry, AppMenuDataSource *source); static bool remove_app_with_install_id(const AppInstallId install_id, AppMenuDataSource *source); -static AppMenuNode * prv_find_node_with_install_id(const AppInstallId install_id, - const AppMenuDataSource * const source); +static AppMenuNode *prv_find_node_with_install_id(const AppInstallId install_id, + const AppMenuDataSource *const source); static void prv_unload_node(const AppMenuDataSource *source, AppMenuNode *node); //////////////////////////////// // List helper functions //////////////////////////////// -static bool prv_is_app_filtered_out(AppInstallEntry *entry, AppMenuDataSource * const source) { +static bool prv_is_app_filtered_out(AppInstallEntry *entry, AppMenuDataSource *const source) { return (source->callbacks.filter && (source->callbacks.filter(source, entry) == false)); } @@ -40,12 +40,12 @@ static const struct { AppInstallId install_id; bool move_on_activity; } s_override_table[] = { - { APP_ID_SPORTS, false }, - { APP_ID_GOLF, false }, + {APP_ID_SPORTS, false}, + {APP_ID_GOLF, false}, #ifdef APP_ID_WORKOUT - { APP_ID_WORKOUT, true }, + {APP_ID_WORKOUT, true}, #endif - { APP_ID_MUSIC, true }, + {APP_ID_MUSIC, true}, }; // Returns 0 if not in table. Otherwise, returns the rank in `s_override_table`. Rank is @@ -55,8 +55,8 @@ static int prv_override_index(AppInstallId app_id) { for (uint32_t i = 0; i < num_overrides; i++) { AppInstallId cur_id = s_override_table[i].install_id; if (cur_id == app_id) { - const bool should_move = (!s_override_table[i].move_on_activity || - app_install_is_prioritized(cur_id)); + const bool should_move = + (!s_override_table[i].move_on_activity || app_install_is_prioritized(cur_id)); return (should_move) ? (num_overrides - i + 1) : 0; } } @@ -68,8 +68,8 @@ static int prv_app_override_comparator(AppInstallId app_id, AppInstallId new_id) } static int prv_comparator_ascending_zero_last(unsigned int a, unsigned int b) { - return ((a != 0) && (b != 0)) ? (b - a) : // Sort in ascending order - (a - b); // 0 should be sorted last so invert the sort + return ((a != 0) && (b != 0)) ? (b - a) : // Sort in ascending order + (a - b); // 0 should be sorted last so invert the sort } T_STATIC int prv_app_node_comparator(void *app_node_ref, void *new_node_ref) { @@ -78,8 +78,8 @@ T_STATIC int prv_app_node_comparator(void *app_node_ref, void *new_node_ref) { const bool is_app_quick_launch = (app_node->visibility == ProcessVisibilityQuickLaunch); const bool is_new_quick_launch = (new_node->visibility == ProcessVisibilityQuickLaunch); - const int override_cmp_rv = prv_app_override_comparator(app_node->install_id, - new_node->install_id); + const int override_cmp_rv = + prv_app_override_comparator(app_node->install_id, new_node->install_id); if (is_app_quick_launch != is_new_quick_launch) { // Quick Launch only apps are first return (is_app_quick_launch ? 1 : 0) - (is_new_quick_launch ? 1 : 0); @@ -201,13 +201,12 @@ void prv_handle_app_event(void *data) { void prv_send_callback_to_app(AppMenuDataSource *data_source, AppInstallId install_id, InstallEventType event_type) { InstallData *install_data = kernel_malloc_check(sizeof(InstallData)); - *install_data = (InstallData) { - .id = install_id, - .source = data_source, - .event_type = event_type, + *install_data = (InstallData){ + .id = install_id, + .source = data_source, + .event_type = event_type, }; - process_manager_send_callback_event_to_process(PebbleTask_App, - prv_handle_app_event, + process_manager_send_callback_event_to_process(PebbleTask_App, prv_handle_app_event, install_data); } @@ -296,10 +295,10 @@ static void prv_app_db_cleared_callback(const AppInstallId install_id, void *dat static bool prv_app_enumerate_callback(AppInstallEntry *entry, void *data) { if (prv_is_app_filtered_out(entry, (AppMenuDataSource *)data)) { - return true; // continue + return true; // continue } add_app_with_install_id(entry, data); - return true; // continue + return true; // continue } //////////////////// @@ -355,7 +354,7 @@ static void prv_load_list_if_needed(AppMenuDataSource *source) { static void prv_unload_node(const AppMenuDataSource *source, AppMenuNode *node) { prv_unload_list_item_icon(source, node); - list_remove((ListNode*)node, (ListNode**)&source->list, NULL); + list_remove((ListNode *)node, (ListNode **)&source->list, NULL); app_free(node->name); app_free(node); } @@ -366,15 +365,15 @@ static void add_app_with_install_id(const AppInstallEntry *entry, AppMenuDataSou } AppMenuNode *node = app_malloc_check(sizeof(AppMenuNode)); - *node = (AppMenuNode) { - .install_id = entry->install_id, - .app_num = app_install_get_app_icon_bank(entry), - .icon_resource_id = app_install_entry_get_icon_resource_id(entry), - .uuid = entry->uuid, - .color = entry->color, - .visibility = entry->visibility, - .sdk_version = entry->sdk_version, - .record_order = entry->record_order, + *node = (AppMenuNode){ + .install_id = entry->install_id, + .app_num = app_install_get_app_icon_bank(entry), + .icon_resource_id = app_install_entry_get_icon_resource_id(entry), + .uuid = entry->uuid, + .color = entry->color, + .visibility = entry->visibility, + .sdk_version = entry->sdk_version, + .record_order = entry->record_order, }; uint8_t len; @@ -390,14 +389,14 @@ static void add_app_with_install_id(const AppInstallEntry *entry, AppMenuDataSou prv_sorted_add(source, node); } -static AppMenuNode * prv_find_node_with_install_id(const AppInstallId install_id, - const AppMenuDataSource * const source) { +static AppMenuNode *prv_find_node_with_install_id(const AppInstallId install_id, + const AppMenuDataSource *const source) { AppMenuNode *node = source->list; while (node != NULL) { if (node->install_id == install_id) { return node; } else { - node = (AppMenuNode*)list_get_next((ListNode*)node); + node = (AppMenuNode *)list_get_next((ListNode *)node); } } return NULL; @@ -425,8 +424,8 @@ void app_menu_data_source_init(AppMenuDataSource *source, const AppMenuDataSourceCallbacks *callbacks, void *callback_context) { PBL_ASSERTN(source != NULL); - *source = (AppMenuDataSource) { - .callback_context = callback_context, + *source = (AppMenuDataSource){ + .callback_context = callback_context, }; if (callbacks) { source->callbacks = *callbacks; @@ -434,15 +433,15 @@ void app_menu_data_source_init(AppMenuDataSource *source, // Register callbacks for app_install_manager updates: static const AppInstallCallback s_app_install_callbacks[NUM_INSTALL_EVENT_TYPES] = { - [APP_AVAILABLE] = prv_app_added_callback, - [APP_REMOVED] = prv_app_removed_callback, - [APP_UPGRADED] = prv_app_removed_callback, - [APP_ICON_NAME_UPDATED] = prv_app_icon_name_updated_callback, - [APP_DB_CLEARED] = prv_app_db_cleared_callback, + [APP_AVAILABLE] = prv_app_added_callback, + [APP_REMOVED] = prv_app_removed_callback, + [APP_UPGRADED] = prv_app_removed_callback, + [APP_ICON_NAME_UPDATED] = prv_app_icon_name_updated_callback, + [APP_DB_CLEARED] = prv_app_db_cleared_callback, }; - source->app_install_callback_node = (struct AppInstallCallbackNode) { - .data = source, - .callbacks = s_app_install_callbacks, + source->app_install_callback_node = (struct AppInstallCallbackNode){ + .data = source, + .callbacks = s_app_install_callbacks, }; app_install_register_callback(&source->app_install_callback_node); } @@ -452,7 +451,7 @@ void app_menu_data_source_deinit(AppMenuDataSource *source) { // Free the AppMenuNodes: AppMenuNode *node = source->list; while (node != NULL) { - AppMenuNode * const next = (AppMenuNode*)list_get_next((ListNode*)node); + AppMenuNode *const next = (AppMenuNode *)list_get_next((ListNode *)node); prv_unload_node(source, node); node = next; } @@ -482,15 +481,15 @@ static uint16_t prv_transform_index(AppMenuDataSource *source, uint16_t index) { return index; } -AppMenuNode* app_menu_data_source_get_node_at_index(AppMenuDataSource *source, uint16_t row_index) { +AppMenuNode *app_menu_data_source_get_node_at_index(AppMenuDataSource *source, uint16_t row_index) { prv_load_list_if_needed(source); - return (AppMenuNode*)list_get_at((ListNode*)source->list, - prv_transform_index(source, row_index)); + return (AppMenuNode *)list_get_at((ListNode *)source->list, + prv_transform_index(source, row_index)); } uint16_t app_menu_data_source_get_count(AppMenuDataSource *source) { prv_load_list_if_needed(source); - return list_count((ListNode*)source->list); + return list_count((ListNode *)source->list); } uint16_t app_menu_data_source_get_index_of_app_with_install_id(AppMenuDataSource *source, @@ -502,7 +501,7 @@ uint16_t app_menu_data_source_get_index_of_app_with_install_id(AppMenuDataSource if (node->install_id == install_id) { return prv_transform_index(source, index); } - node = (AppMenuNode*)list_get_next((ListNode*)node); + node = (AppMenuNode *)list_get_next((ListNode *)node); ++index; } return MENU_INDEX_NOT_FOUND; diff --git a/src/fw/process_management/app_menu_data_source.h b/src/fw/process_management/app_menu_data_source.h index fc13066997..f4972b075c 100644 --- a/src/fw/process_management/app_menu_data_source.h +++ b/src/fw/process_management/app_menu_data_source.h @@ -5,9 +5,9 @@ //!@file app_menu_data_source.h //! -//! This file provides a utility for populating a MenuLayer with the apps that are currently installed. This should -//! only be used by system apps such as the Launcher or the Watchface Selector apps, as it integrates tightly with -//! app_install_manager. +//! This file provides a utility for populating a MenuLayer with the apps that are currently +//! installed. This should only be used by system apps such as the Launcher or the Watchface +//! Selector apps, as it integrates tightly with app_install_manager. #include "applib/ui/kino/kino_reel.h" #include "applib/ui/menu_layer.h" @@ -40,8 +40,8 @@ typedef struct PACKED AppMenuNode { char *name; ProcessVisibility visibility; Version sdk_version; - unsigned int storage_order; //!< See \ref AppMenuStorageOrder for special values of this field - unsigned int record_order; //!< 0 means not in the app registry + unsigned int storage_order; //!< See \ref AppMenuStorageOrder for special values of this field + unsigned int record_order; //!< 0 means not in the app registry } AppMenuNode; // Clang makes the size of enums like AppMenuStorageOrder larger than the minimum size needed to @@ -81,8 +81,7 @@ typedef struct AppMenuDataSource { //! Initialize the AppMenuDataSource void app_menu_data_source_init(AppMenuDataSource *source, - const AppMenuDataSourceCallbacks *handlers, - void *callback_context); + const AppMenuDataSourceCallbacks *handlers, void *callback_context); //! Deinitialize the AppMenuDataSource void app_menu_data_source_deinit(AppMenuDataSource *source); @@ -95,7 +94,7 @@ void app_menu_data_source_deinit(AppMenuDataSource *source); void app_menu_data_source_enable_icons(AppMenuDataSource *source, uint32_t fallback_icon_id); //! Returns the AppMenuNode at the given index. -AppMenuNode* app_menu_data_source_get_node_at_index(AppMenuDataSource *source, uint16_t row_index); +AppMenuNode *app_menu_data_source_get_node_at_index(AppMenuDataSource *source, uint16_t row_index); //! Returns the AppMenuNode with the given AppInstallId. uint16_t app_menu_data_source_get_index_of_app_with_install_id(AppMenuDataSource *source, diff --git a/src/fw/process_management/app_run_state.c b/src/fw/process_management/app_run_state.c index f02d00236e..e8163de3c2 100644 --- a/src/fw/process_management/app_run_state.c +++ b/src/fw/process_management/app_run_state.c @@ -13,28 +13,27 @@ #include #include "pbl/util/attributes.h" -#define PB_APP_STATE_ENDPOINT_ID 0x34 +#define PB_APP_STATE_ENDPOINT_ID 0x34 typedef struct PACKED { - AppState state:8; + AppState state : 8; Uuid uuid; } AppRunState; - static void prv_send_response(void *data) { - AppRunState *app_run_state = (AppRunState*)data; + AppRunState *app_run_state = (AppRunState *)data; CommSession *session = comm_session_get_system_session(); if (session) { if (comm_session_has_capability(session, CommSessionRunState)) { char uuid_buffer[UUID_STRING_BUFFER_LENGTH]; - bool success = comm_session_send_data(session, PB_APP_STATE_ENDPOINT_ID, - (uint8_t*)app_run_state, sizeof(*app_run_state), - COMM_SESSION_DEFAULT_TIMEOUT); + bool success = + comm_session_send_data(session, PB_APP_STATE_ENDPOINT_ID, (uint8_t *)app_run_state, + sizeof(*app_run_state), COMM_SESSION_DEFAULT_TIMEOUT); uuid_to_string(&app_run_state->uuid, uuid_buffer); - PBL_LOG_DBG("AppRunState(0x34) %s sending status: %s - %u", - (success ? "success" : "failed"), uuid_buffer, app_run_state->state); + PBL_LOG_DBG("AppRunState(0x34) %s sending status: %s - %u", (success ? "success" : "failed"), + uuid_buffer, app_run_state->state); } else { PBL_LOG_DBG("Using deprecated launcher_app_message"); const bool is_running = ((app_run_state->state == RUNNING) ? true : false); @@ -61,9 +60,9 @@ void app_run_state_command(CommSession *session, AppRunStateCommand cmd, const U switch (cmd) { case APP_RUN_STATE_RUN_COMMAND: // Launch the application provided it isn't running, otherwise this is a noop - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = install_id, - .common.reason = APP_LAUNCH_PHONE, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = install_id, + .common.reason = APP_LAUNCH_PHONE, }); break; case APP_RUN_STATE_STOP_COMMAND: @@ -99,12 +98,12 @@ void app_run_state_protocol_msg_callback(CommSession *session, const uint8_t *da Uuid uuid; } AppStateMessage; - const AppStateMessage *msg = (const AppStateMessage*)data; + const AppStateMessage *msg = (const AppStateMessage *)data; if (msg->command != APP_RUN_STATE_STATUS_COMMAND) { if (length < sizeof(AppStateMessage)) { - PBL_LOG_ERR("length mismatch, expected %"PRIu32" byte(s), got %"PRIu32" bytes", - (uint32_t) sizeof(AppStateMessage), (uint32_t) length); + PBL_LOG_ERR("length mismatch, expected %" PRIu32 " byte(s), got %" PRIu32 " bytes", + (uint32_t)sizeof(AppStateMessage), (uint32_t)length); return; } } diff --git a/src/fw/process_management/app_run_state.h b/src/fw/process_management/app_run_state.h index 8c98dec097..81459cb77b 100644 --- a/src/fw/process_management/app_run_state.h +++ b/src/fw/process_management/app_run_state.h @@ -19,10 +19,10 @@ typedef enum { //! These keys (with accompanying UUID values self FETCH) can be pushed from the phone to //! the watch to launch/kill an app on the watch or query which application is running. //! Backwards compatible for support of deprecated 0x31 - APP_RUN_STATE_INVALID_COMMAND = 0x00, // Invalid state key, used as a default value - APP_RUN_STATE_RUN_COMMAND = 0x01, // Watch -> Phone: App is running, Phone -> Watch: Start app - APP_RUN_STATE_STOP_COMMAND = 0x02, // Watch -> Phone: App is stopped, Phone -> Watch: Stop app - APP_RUN_STATE_STATUS_COMMAND = 0x03 // Phone -> Watch: Request current app UUID + APP_RUN_STATE_INVALID_COMMAND = 0x00, // Invalid state key, used as a default value + APP_RUN_STATE_RUN_COMMAND = 0x01, // Watch -> Phone: App is running, Phone -> Watch: Start app + APP_RUN_STATE_STOP_COMMAND = 0x02, // Watch -> Phone: App is stopped, Phone -> Watch: Stop app + APP_RUN_STATE_STATUS_COMMAND = 0x03 // Phone -> Watch: Request current app UUID } AppRunStateCommand; void app_run_state_send_update(const Uuid *uuid, AppState app_state); diff --git a/src/fw/process_management/launcher_app_message.c b/src/fw/process_management/launcher_app_message.c index 07c9904688..f8b508dc2a 100644 --- a/src/fw/process_management/launcher_app_message.c +++ b/src/fw/process_management/launcher_app_message.c @@ -11,7 +11,7 @@ #include "util/dict.h" -#define LAUNCHER_MESSAGE_ENDPOINT_ID (0x31) +#define LAUNCHER_MESSAGE_ENDPOINT_ID (0x31) typedef enum { //! Used as reply from the watch to the phone, to indicate the app is not running. @@ -25,8 +25,8 @@ typedef enum { enum { //! This key/value can be pushed from the phone to the watch to launch //! or kill an app on the watch. - RUN_STATE_KEY = 0x01, // TUPLE_UINT8 - STATE_FETCH_KEY = 0x02, // TUPLE_UINT8 + RUN_STATE_KEY = 0x01, // TUPLE_UINT8 + STATE_FETCH_KEY = 0x02, // TUPLE_UINT8 }; static uint8_t s_transaction_id; @@ -43,18 +43,19 @@ void launcher_app_message_send_app_state_deprecated(const Uuid *uuid, bool runni uint8_t buffer[sizeof(AppMessagePush) + sizeof(Tuple) + sizeof(uint32_t)]; AppMessagePush *push_message = (AppMessagePush *)buffer; - *push_message = (const AppMessagePush) { - .header = { - .command = CMD_PUSH, - .transaction_id = s_transaction_id++, - }, - .uuid = *uuid, + *push_message = (const AppMessagePush){ + .header = + { + .command = CMD_PUSH, + .transaction_id = s_transaction_id++, + }, + .uuid = *uuid, }; uint32_t size = sizeof(Dictionary) + sizeof(Tuple) + sizeof(uint32_t); - const Tuplet tuplet = TupletInteger(RUN_STATE_KEY, (uint32_t) app_state); + const Tuplet tuplet = TupletInteger(RUN_STATE_KEY, (uint32_t)app_state); PBL_ASSERTN(DICT_OK == dict_serialize_tuplets_to_buffer( - &tuplet, 1, (uint8_t *)&push_message->dictionary, &size)); + &tuplet, 1, (uint8_t *)&push_message->dictionary, &size)); comm_session_send_data(comm_session_get_system_session(), LAUNCHER_MESSAGE_ENDPOINT_ID, (const uint8_t *)buffer, sizeof(buffer), COMM_SESSION_DEFAULT_TIMEOUT); @@ -68,8 +69,8 @@ static bool prv_has_invalid_length(size_t expected, size_t actual) { return false; } -static bool prv_receive_push_cmd(CommSession *session, - AppMessagePush *push_message, size_t length) { +static bool prv_receive_push_cmd(CommSession *session, AppMessagePush *push_message, + size_t length) { if (prv_has_invalid_length(sizeof(AppMessagePush), length)) { return false; } @@ -79,9 +80,8 @@ static bool prv_receive_push_cmd(CommSession *session, // Scan the dictionary: const size_t dict_size = length - sizeof(AppMessagePush) + sizeof(Dictionary); DictionaryIterator iter; - const Tuple *tuple = dict_read_begin_from_buffer(&iter, - (const uint8_t *) &push_message->dictionary, - dict_size); + const Tuple *tuple = + dict_read_begin_from_buffer(&iter, (const uint8_t *)&push_message->dictionary, dict_size); while (tuple) { uint8_t cmd = tuple->key; switch (cmd) { @@ -112,28 +112,27 @@ static bool prv_receive_push_cmd(CommSession *session, static void prv_send_ack_nack_reply(CommSession *session, const uint8_t transaction_id, bool ack) { const AppMessageAck nack_message = { - .header = { - .command = ack ? CMD_ACK : CMD_NACK, - .transaction_id = transaction_id, - }, + .header = { + .command = ack ? CMD_ACK : CMD_NACK, + .transaction_id = transaction_id, + }, }; - comm_session_send_data(session, LAUNCHER_MESSAGE_ENDPOINT_ID, - (const uint8_t *) &nack_message, sizeof(nack_message), - COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(session, LAUNCHER_MESSAGE_ENDPOINT_ID, (const uint8_t *)&nack_message, + sizeof(nack_message), COMM_SESSION_DEFAULT_TIMEOUT); } void launcher_app_message_protocol_msg_callback_deprecated(CommSession *session, - const uint8_t* data, size_t length) { + const uint8_t *data, size_t length) { if (prv_has_invalid_length(sizeof(AppMessageHeader), length)) { return; } - AppMessageHeader *message = (AppMessageHeader *) data; + AppMessageHeader *message = (AppMessageHeader *)data; bool ack = false; switch (message->command) { case CMD_PUSH: { // Incoming message: - ack = prv_receive_push_cmd(session, (AppMessagePush *) message, length); + ack = prv_receive_push_cmd(session, (AppMessagePush *)message, length); break; } diff --git a/src/fw/process_management/pebble_process_info.c b/src/fw/process_management/pebble_process_info.c index 2a12c4b526..ef10e41527 100644 --- a/src/fw/process_management/pebble_process_info.c +++ b/src/fw/process_management/pebble_process_info.c @@ -9,4 +9,3 @@ int version_compare(Version a, Version b) { } return a.minor - b.minor; } - diff --git a/src/fw/process_management/pebble_process_info.h b/src/fw/process_management/pebble_process_info.h index c177406480..69108f0830 100644 --- a/src/fw/process_management/pebble_process_info.h +++ b/src/fw/process_management/pebble_process_info.h @@ -33,21 +33,21 @@ typedef enum { PROCESS_INFO_ROCKY_APP = 1 << 5, //! Bitmask, to store compile time platform - PROCESS_INFO_PLATFORM_MASK = 0xf << 6, - + PROCESS_INFO_PLATFORM_MASK = 0xf << 6, + //! True, if process uses Moddable XS APIs PROCESS_INFO_MODDABLE_APP = 1 << 10, //! SDK older than 4.2 doesn't store any value PROCESS_INFO_PLATFORM_UNKNOWN = 0x0 << 6, - PROCESS_INFO_PLATFORM_APLITE = 0x1 << 6, + PROCESS_INFO_PLATFORM_APLITE = 0x1 << 6, //! Values that are actually added by SDK 4.2+ - PROCESS_INFO_PLATFORM_BASALT = 0x2 << 6, - PROCESS_INFO_PLATFORM_CHALK = 0x3 << 6, + PROCESS_INFO_PLATFORM_BASALT = 0x2 << 6, + PROCESS_INFO_PLATFORM_CHALK = 0x3 << 6, PROCESS_INFO_PLATFORM_DIORITE = 0x4 << 6, - PROCESS_INFO_PLATFORM_EMERY = 0x5 << 6, + PROCESS_INFO_PLATFORM_EMERY = 0x5 << 6, //! Values that are actually added by SDK 4.9+ - PROCESS_INFO_PLATFORM_FLINT = 0x6 << 6, - PROCESS_INFO_PLATFORM_GABBRO = 0x7 << 6, + PROCESS_INFO_PLATFORM_FLINT = 0x6 << 6, + PROCESS_INFO_PLATFORM_GABBRO = 0x7 << 6, } PebbleProcessInfoFlags; //! @} // group App @@ -57,8 +57,8 @@ typedef enum { // ================================ // struct_version (little endian): // 0x0800 -- sdk_version and process_version uint16_t fields added (Grand Slam / 1.7) -// .major:0x08 .minor:0x01 -- all version fields split up into minor/major; uuid field appended (Junior Whopper / 2.0?) -// .major:0x08 .minor:0x02 -- 2.0, added resource crc and resource timestamp +// .major:0x08 .minor:0x01 -- all version fields split up into minor/major; uuid field appended +// (Junior Whopper / 2.0?) .major:0x08 .minor:0x02 -- 2.0, added resource crc and resource timestamp // .major:0x09 .minor:0x00 -- 2.0, no more reloc_list_start // .major:0x10 .minor:0x00 -- 2.0, added virtual_size #define PROCESS_INFO_CURRENT_STRUCT_VERSION_MAJOR 0x10 @@ -73,11 +73,11 @@ typedef enum { // SDK change log // ================================ // sdk.major:0x4 .minor:0x0 -- Bump the SDK version to make 1.x and 2.x apps distinguishable -// sdk.major:0x5 .minor:0x0 -- Bump the SDK version for breaking AppMessage changes b/t 2.x alpha and beta releases -// sdk.major:0x5 .minor:0x1 -- Added additional API functions (MenuLayer callbacks) -// sdk.major:0x5 .minor:0x2 -- Changed app heap double free behaviour. -// sdk.major:0x5 .minor:0x3 -- Added number_window_get_window (API v2.0 revision 12) -// sdk.major:0x5 .minor:0x4 -- Added gbitmap_create_blank (API v2.0 revision 13) and click_recognizer_is_repeating (rev 14) +// sdk.major:0x5 .minor:0x0 -- Bump the SDK version for breaking AppMessage changes b/t 2.x alpha +// and beta releases sdk.major:0x5 .minor:0x1 -- Added additional API functions (MenuLayer +// callbacks) sdk.major:0x5 .minor:0x2 -- Changed app heap double free behaviour. sdk.major:0x5 +// .minor:0x3 -- Added number_window_get_window (API v2.0 revision 12) sdk.major:0x5 .minor:0x4 -- +// Added gbitmap_create_blank (API v2.0 revision 13) and click_recognizer_is_repeating (rev 14) // sdk.major:0x5 .minor:0x5 -- Added accel_raw_data_service_subscribe and related types (rev 15) // sdk.major:0x5 .minor:0x6 -- Added background worker APIs (rev 16) // sdk.major:0x5 .minor:0x7 -- Added heap_bytes_free / heap_bytes_used (rev 17) @@ -88,37 +88,34 @@ typedef enum { // sdk.major:0x5 .minor:0xc -- Added API for model, color and firmware version of watch (rev 22) // sdk.major:0x5 .minor:0xd -- Added direct access to frame buffer (rev 23) // sdk.major:0x5 .minor:0xe -- Added wakeup API, app_launch_reason (rev 24) -// sdk.major:0x5 .minor:0xf -- Added clock_is_timezone_set in preparation for timezone support (rev 25) -// sdk.major:0x5 .minor:0x10 -- Added the first i18n API: get_locale (rev 26) -// sdk.major:0x5 .minor:0x11 -- Added second i18n API: setlocale (rev 27) -// sdk.major:0x5 .minor:0x13 -- Export mktime (rev 29) -// sdk.major:0x5 .minor:0x14 -- Rev 30 was a move of several color APIs as to not conflict with release 2.9 sdk. Several of these functions were removed after rev 55 for 3.0-beta10 -// sdk.major:0x5 .minor:0x15 -- Added timezone APIs (rev 31) -// sdk.major:0x5 .minor:0x16 -- Added 3.0 animation API (rev 32) -// sdk.major:0x5 .minor:0x17 -- Export new gbitmap accessors (rev 33) -// sdk.major:0x5 .minor:0x18 -- Export gbitmap_sequence API (rev 34) +// sdk.major:0x5 .minor:0xf -- Added clock_is_timezone_set in preparation for timezone support (rev +// 25) sdk.major:0x5 .minor:0x10 -- Added the first i18n API: get_locale (rev 26) sdk.major:0x5 +// .minor:0x11 -- Added second i18n API: setlocale (rev 27) sdk.major:0x5 .minor:0x13 -- Export +// mktime (rev 29) sdk.major:0x5 .minor:0x14 -- Rev 30 was a move of several color APIs as to not +// conflict with release 2.9 sdk. Several of these functions were removed after rev 55 +// for 3.0-beta10 sdk.major:0x5 .minor:0x15 -- Added timezone APIs (rev 31) sdk.major:0x5 +// .minor:0x16 -- Added 3.0 animation API (rev 32) sdk.major:0x5 .minor:0x17 -- Export new gbitmap +// accessors (rev 33) sdk.major:0x5 .minor:0x18 -- Export gbitmap_sequence API (rev 34) // sdk.major:0x5 .minor:0x19 -- Export gbitmap_create_from_png_data API (rev 35) // sdk.major:0x5 .minor:0x20 -- Export new complex animations API (rev 36) // sdk.major:0x5 .minor:0x21 -- Export missing accessors animations APIs (rev 37) // sdk.major:0x5 .minor:0x22 -- Export launch_get_args() API (rev 38) -// sdk.major:0x5 .minor:0x23 -- Export 3.0 menu_layer_create() and menu_layer_shadow_enable() (rev 39) -// sdk.major:0x5 .minor:0x24 -- Added additional calls to gbitmap_sequence (rev 40) +// sdk.major:0x5 .minor:0x23 -- Export 3.0 menu_layer_create() and menu_layer_shadow_enable() (rev +// 39) sdk.major:0x5 .minor:0x24 -- Added additional calls to gbitmap_sequence (rev 40) // sdk.major:0x5 .minor:0x25 -- Export antialiased flag and stroke width in GContext (rev 41) // sdk.major:0x5 .minor:0x26 -- Added 3.0 ActionBar (rev 42) // sdk.major:0x5 .minor:0x27 -- Added gbitmap_sequence_update_bitmap_by_elapsed (rev 43) -// sdk.major:0x5 .minor:0x28 -- Export menu_layer_cell_is_highlighted() and gbitmap_create_palettized_from_1bit() (rev 44) -// sdk.major:0x5 .minor:0x29 -- Export graphics_draw_rotated_bitmap() API (rev 45) -// sdk.major:0x5 .minor:0x2a -- Added action_bar_layer_set_icon_press_animation (rev 46) -// sdk.major:0x5 .minor:0x2b -- Created TextLayerLegacy2 (rev 47) -// sdk.major:0x5 .minor:0x2c -- Added GDrawCommand (rev 48) -// sdk.major:0x5 .minor:0x2d -- Added property_animation_update_uint32 (rev 49) -// sdk.major:0x5 .minor:0x2e -- Added gpath_draw_outline_open (rev 50) -// sdk.major:0x5 .minor:0x2f -- Fixed legacy time() support (rev 51) -// sdk.major:0x5 .minor:0x30 -- Deprecate inverter layer (rev 52) -// sdk.major:0x5 .minor:0x31 -- Added default menu layer colors (rev 53) -// sdk.major:0x5 .minor:0x32 -- Added menu_layer_set_callbacks (rev 54) -// sdk.major:0x5 .minor:0x33 -- API cleanup, loop_count --> play_count (rev 55) -// sdk.major:0x5 .minor:0x34 -- Added menu_layer_pad_bottom_enable (rev 56) +// sdk.major:0x5 .minor:0x28 -- Export menu_layer_cell_is_highlighted() and +// gbitmap_create_palettized_from_1bit() (rev 44) sdk.major:0x5 .minor:0x29 -- Export +// graphics_draw_rotated_bitmap() API (rev 45) sdk.major:0x5 .minor:0x2a -- Added +// action_bar_layer_set_icon_press_animation (rev 46) sdk.major:0x5 .minor:0x2b -- Created +// TextLayerLegacy2 (rev 47) sdk.major:0x5 .minor:0x2c -- Added GDrawCommand (rev 48) sdk.major:0x5 +// .minor:0x2d -- Added property_animation_update_uint32 (rev 49) sdk.major:0x5 .minor:0x2e -- Added +// gpath_draw_outline_open (rev 50) sdk.major:0x5 .minor:0x2f -- Fixed legacy time() support (rev +// 51) sdk.major:0x5 .minor:0x30 -- Deprecate inverter layer (rev 52) sdk.major:0x5 .minor:0x31 -- +// Added default menu layer colors (rev 53) sdk.major:0x5 .minor:0x32 -- Added +// menu_layer_set_callbacks (rev 54) sdk.major:0x5 .minor:0x33 -- API cleanup, loop_count --> +// play_count (rev 55) sdk.major:0x5 .minor:0x34 -- Added menu_layer_pad_bottom_enable (rev 56) // sdk.major:0x5 .minor:0x35 -- Export initial version of StatusBarLayer (rev 57) // sdk.major:0x5 .minor:0x36 -- Export difftime (rev 58) // sdk.major:0x5 .minor:0x37 -- Fixed legacy time_ms() support (rev 59) @@ -137,41 +134,40 @@ typedef enum { // sdk.major:0x5 .minor:0x45 -- Export grect_inset (rev 73) // sdk.major:0x5 .minor:0x46 -- Export fill_radial, draw_arc, etc. (rev 74) // sdk.major:0x5 .minor:0x47 -- Text flow and scroll layer pagination (rev 75) -// sdk.major:0x5 .minor:0x48 -- Export menu_layer_is_index_selected and round menu layer cell heights (rev 76) -// sdk.major:0x5 .minor:0x49 -- Added font v3 (no API changes) (rev 76) +// sdk.major:0x5 .minor:0x48 -- Export menu_layer_is_index_selected and round menu layer cell +// heights (rev 76) sdk.major:0x5 .minor:0x49 -- Added font v3 (no API changes) (rev 76) // sdk.major:0x5 .minor:0x4a -- HealthAPI (rev 77) // sdk.major:0x5 .minor:0x4b -- More time utility functions (rev 78) // sdk.major:0x5 .minor:0x4c -- More Health service API calls (rev 79) // sdk.major:0x5 .minor:0x4d -- Add health_service_get_measurement_system_for_display() (rev 80) // sdk.major:0x5 .minor:0x4e -- Export gdraw_command_frame_get_command_list() (rev 81) // sdk.major:0x5 .minor:0x4f -- Add new version of gcolor_equal() and deprecate old version (rev 82) -// sdk.major:0x5 .minor:0x50 -- 4.0: Add health service expansion, UnobstructedArea, AppGlance, AppExitReason, result duration (rev 83) -// sdk.major:0x5 .minor:0x51 -- Add memory_cache_flush() (rev 84) -// sdk.major:0x5 .minor:0x52 -- rocky_event_loop_with_resource (rev. 85) -// sdk.major:0x5 .minor:0x53 -- Add health_service heart rate sampling period support (rev 86) -// sdk.major:0x5 .minor:0x54 -- Add PlatformType enum and defines (rev 87) -// sdk.major:0x5 .minor:0x55 -- Preferred Content Size (rev 88) -// sdk.major:0x5 .minor:0x56 -- Add PlatformType enum and defines (rev 89) +// sdk.major:0x5 .minor:0x50 -- 4.0: Add health service expansion, UnobstructedArea, AppGlance, +// AppExitReason, result duration (rev 83) sdk.major:0x5 .minor:0x51 -- Add memory_cache_flush() +// (rev 84) sdk.major:0x5 .minor:0x52 -- rocky_event_loop_with_resource (rev. 85) sdk.major:0x5 +// .minor:0x53 -- Add health_service heart rate sampling period support (rev 86) sdk.major:0x5 +// .minor:0x54 -- Add PlatformType enum and defines (rev 87) sdk.major:0x5 .minor:0x55 -- Preferred +// Content Size (rev 88) sdk.major:0x5 .minor:0x56 -- Add PlatformType enum and defines (rev 89) // sdk.major:0x5 .minor:0x57 -- Add moddable_createMachine (rev 90) // sdk.major:0x5 .minor:0x58 -- Add size 60 LECO font (rev 91) // sdk.major:0x5 .minor:0x59 -- Add flags to ModdableCreationRecord (rev 92) // sdk.major:0x5 .minor:0x5a -- Add rot_bitmap_layer_get_layer() and AppGlanceSliceLayout (rev 93) // sdk.major:0x5 .minor:0x5b -- Add app_light_set_color() and app_light_set_system_color() (rev 94) -// sdk.major:0x5 .minor:0x5c -- Add light_is_on() and expose touch_service_subscribe/unsubscribe to apps (rev 95) -// sdk.major:0x5 .minor:0x5d -- Add app_light_set_color_rgb888() for 8-bit-per-channel backlight tint (rev 96) -// sdk.major:0x5 .minor:0x5e -- Add Speaker API (rev 97) -// sdk.major:0x5 .minor:0x5f -- speaker_play_tone() now plays the exact frequency (rev 98) -// sdk.major:0x5 .minor:0x60 -- Add persist_get_max_size() for runtime persist storage capacity (rev 99) +// sdk.major:0x5 .minor:0x5c -- Add light_is_on() and expose touch_service_subscribe/unsubscribe to +// apps (rev 95) sdk.major:0x5 .minor:0x5d -- Add app_light_set_color_rgb888() for 8-bit-per-channel +// backlight tint (rev 96) sdk.major:0x5 .minor:0x5e -- Add Speaker API (rev 97) sdk.major:0x5 +// .minor:0x5f -- speaker_play_tone() now plays the exact frequency (rev 98) sdk.major:0x5 +// .minor:0x60 -- Add persist_get_max_size() for runtime persist storage capacity (rev 99) // sdk.major:0x5 .minor:0x61 -- Add speaker_is_muted() for system-wide speaker mute query (rev 100) -// sdk.major:0x5 .minor:0x62 -- Add backlight_service_subscribe/unsubscribe for backlight on/off events (rev 101) -// sdk.major:0x5 .minor:0x63 -- Export launch_button() (rev 102) -// sdk.major:0x5 .minor:0x64 -- Add kModdableCreationFlagDebug (rev 103) -// sdk.major:0x5 .minor:0x65 -- Expose speaker playback limits (rev 104) -// sdk.major:0x5 .minor:0x66 -- Expose alarm service (alarm_service_peek_next) to apps (rev 105) -// sdk.major:0x5 .minor:0x67 -- Explicit Resource Management in Moddable (rev 106) -// sdk.major:0x5 .minor:0x68 -- Expose gesture recognizer API (tap/pan/swipe + window attach/detach) to apps (rev 107) -// sdk.major:0x5 .minor:0x69 -- Add app_touch_navigation_enable() opt-in for third-party touch nav (rev 108) -// sdk.major:0x5 .minor:0x6a -- Add HRV sampling API (health_service_set_hrv_sample_period) (rev 109) +// sdk.major:0x5 .minor:0x62 -- Add backlight_service_subscribe/unsubscribe for backlight on/off +// events (rev 101) sdk.major:0x5 .minor:0x63 -- Export launch_button() (rev 102) sdk.major:0x5 +// .minor:0x64 -- Add kModdableCreationFlagDebug (rev 103) sdk.major:0x5 .minor:0x65 -- Expose +// speaker playback limits (rev 104) sdk.major:0x5 .minor:0x66 -- Expose alarm service +// (alarm_service_peek_next) to apps (rev 105) sdk.major:0x5 .minor:0x67 -- Explicit Resource +// Management in Moddable (rev 106) sdk.major:0x5 .minor:0x68 -- Expose gesture recognizer API +// (tap/pan/swipe + window attach/detach) to apps (rev 107) sdk.major:0x5 .minor:0x69 -- Add +// app_touch_navigation_enable() opt-in for third-party touch nav (rev 108) sdk.major:0x5 +// .minor:0x6a -- Add HRV sampling API (health_service_set_hrv_sample_period) (rev 109) #define PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR 0x5 #define PROCESS_INFO_CURRENT_SDK_VERSION_MINOR 0x6a @@ -196,11 +192,12 @@ typedef enum { #define COMPANY_NAME_BYTES 32 //! @internal -//! Version data structure with minor & major versions: When making non-backwards-compatible changes, -//! the major version should get bumped. When making a change (e.g. to the PebbleProcessInfo struct) that is backwards -//! compatible (e.g. adding a field at the end), you should only bump the minor version. +//! Version data structure with minor & major versions: When making non-backwards-compatible +//! changes, the major version should get bumped. When making a change (e.g. to the +//! PebbleProcessInfo struct) that is backwards compatible (e.g. adding a field at the end), you +//! should only bump the minor version. typedef struct __attribute__((__packed__)) { - uint8_t major; //!< "compatibility" version number + uint8_t major; //!< "compatibility" version number uint8_t minor; } Version; @@ -212,19 +209,22 @@ int version_compare(Version a, Version b); // - tintin/waftools/inject_metadata.py // - iOS/PebblePrivateKit/PebblePrivateKit/PBBundle.m typedef struct __attribute__((__packed__)) { - char header[8]; //!< Sentinal value, should always be 'PBLAPP' - Version struct_version; //!< version of this structure's format - Version sdk_version; //!< version of the SDK used to build this process - Version process_version; //!< version of the process. Note this omits any semver "patch" version. - uint16_t load_size; //!< size of the binary in flash, including this metadata but not the reloc table - uint32_t offset; //!< The entry point of this executable - uint32_t crc; //!< CRC of the data only, ie, not including this struct or the reloc table at the end - char name[PROCESS_NAME_BYTES]; //!< Name to display on the menu - char company[COMPANY_NAME_BYTES]; //!< Name of the maker of this process - uint32_t icon_resource_id; //!< Resource ID within this bank to use as a 32x32 icon - uint32_t sym_table_addr; //!< The system will poke the sdk's symbol table address into this field on load - uint32_t flags; //!< Bitwise OR of PebbleProcessInfoFlags - uint32_t num_reloc_entries; //!< The number of entries in the address relocation list + char header[8]; //!< Sentinal value, should always be 'PBLAPP' + Version struct_version; //!< version of this structure's format + Version sdk_version; //!< version of the SDK used to build this process + Version process_version; //!< version of the process. Note this omits any semver "patch" version. + uint16_t + load_size; //!< size of the binary in flash, including this metadata but not the reloc table + uint32_t offset; //!< The entry point of this executable + uint32_t + crc; //!< CRC of the data only, ie, not including this struct or the reloc table at the end + char name[PROCESS_NAME_BYTES]; //!< Name to display on the menu + char company[COMPANY_NAME_BYTES]; //!< Name of the maker of this process + uint32_t icon_resource_id; //!< Resource ID within this bank to use as a 32x32 icon + uint32_t sym_table_addr; //!< The system will poke the sdk's symbol table address into this field + //!< on load + uint32_t flags; //!< Bitwise OR of PebbleProcessInfoFlags + uint32_t num_reloc_entries; //!< The number of entries in the address relocation list struct __attribute__((__packed__)) { uint8_t byte0; uint8_t byte1; @@ -242,28 +242,31 @@ typedef struct __attribute__((__packed__)) { uint8_t byte13; uint8_t byte14; uint8_t byte15; - } uuid; //!< The process's UUID - uint32_t resource_crc; //!< CRC of the resource data only - uint32_t resource_timestamp; //!< timestamp of the resource data - uint16_t virtual_size; //!< The total amount of memory used by the process (.text + .data + .bss) + } uuid; //!< The process's UUID + uint32_t resource_crc; //!< CRC of the resource data only + uint32_t resource_timestamp; //!< timestamp of the resource data + uint16_t virtual_size; //!< The total amount of memory used by the process (.text + .data + .bss) } PebbleProcessInfo; //! @internal typedef struct __attribute__((__packed__)) { - char header[8]; //!< Sentinal value, should always be 'PBLAPP' - Version struct_version; //!< version of this structure's format - Version sdk_version; //!< version of the SDK used to build this process - Version process_version; //!< version of the process - uint16_t load_size; //!< size of the binary in flash, including this metadata but not the reloc table - uint32_t offset; //!< The entry point of this executable - uint32_t crc; //!< CRC of the data only, ie, not including this struct or the reloc table at the end - char name[PROCESS_NAME_BYTES]; //!< Name to display on the menu - char company[COMPANY_NAME_BYTES]; //!< Name of the maker of this process - uint32_t icon_resource_id; //!< Resource ID within this process's bank to use as a 32x32 icon - uint32_t sym_table_addr; //!< The system will poke the sdk's symbol table address into this field on load - uint32_t flags; //!< Bitwise OR of PebbleProcessInfoFlags - uint32_t reloc_list_start; //!< The offset of the address relocation list - uint32_t num_reloc_entries; //!< The number of entries in the address relocation list + char header[8]; //!< Sentinal value, should always be 'PBLAPP' + Version struct_version; //!< version of this structure's format + Version sdk_version; //!< version of the SDK used to build this process + Version process_version; //!< version of the process + uint16_t + load_size; //!< size of the binary in flash, including this metadata but not the reloc table + uint32_t offset; //!< The entry point of this executable + uint32_t + crc; //!< CRC of the data only, ie, not including this struct or the reloc table at the end + char name[PROCESS_NAME_BYTES]; //!< Name to display on the menu + char company[COMPANY_NAME_BYTES]; //!< Name of the maker of this process + uint32_t icon_resource_id; //!< Resource ID within this process's bank to use as a 32x32 icon + uint32_t sym_table_addr; //!< The system will poke the sdk's symbol table address into this field + //!< on load + uint32_t flags; //!< Bitwise OR of PebbleProcessInfoFlags + uint32_t reloc_list_start; //!< The offset of the address relocation list + uint32_t num_reloc_entries; //!< The number of entries in the address relocation list struct __attribute__((__packed__)) { uint8_t byte0; uint8_t byte1; @@ -281,7 +284,5 @@ typedef struct __attribute__((__packed__)) { uint8_t byte13; uint8_t byte14; uint8_t byte15; - } uuid; //!< The process's UUID + } uuid; //!< The process's UUID } LegacyPebbleAppInfo; - - diff --git a/src/fw/process_management/pebble_process_md.c b/src/fw/process_management/pebble_process_md.c index 32a4161c1d..ff9cbe35ba 100644 --- a/src/fw/process_management/pebble_process_md.c +++ b/src/fw/process_management/pebble_process_md.c @@ -10,36 +10,36 @@ // Md Field Accessors ////////////////////// -const char* process_metadata_get_name(const PebbleProcessMd *md) { +const char *process_metadata_get_name(const PebbleProcessMd *md) { if (md->process_storage == ProcessStorageFlash) { - return ((const PebbleProcessMdFlash*) md)->name; + return ((const PebbleProcessMdFlash *)md)->name; } else if (md->process_storage == ProcessStorageResource) { - return ((const PebbleProcessMdResource*) md)->name; + return ((const PebbleProcessMdResource *)md)->name; } - return ((const PebbleProcessMdSystem*) md)->name; + return ((const PebbleProcessMdSystem *)md)->name; } uint32_t process_metadata_get_size_bytes(const PebbleProcessMd *md) { if (md->process_storage == ProcessStorageFlash) { - return ((const PebbleProcessMdFlash*) md)->size_bytes; + return ((const PebbleProcessMdFlash *)md)->size_bytes; } else if (md->process_storage == ProcessStorageResource) { - return ((const PebbleProcessMdResource*) md)->size_bytes; + return ((const PebbleProcessMdResource *)md)->size_bytes; } return 0; } Version process_metadata_get_process_version(const PebbleProcessMd *md) { if (md->process_storage == ProcessStorageFlash) { - return ((const PebbleProcessMdFlash*) md)->process_version; + return ((const PebbleProcessMdFlash *)md)->process_version; } - return (Version) { 0, 0 }; + return (Version){0, 0}; } Version process_metadata_get_sdk_version(const PebbleProcessMd *md) { if (md->process_storage == ProcessStorageFlash) { - return ((const PebbleProcessMdFlash*) md)->sdk_version; + return ((const PebbleProcessMdFlash *)md)->sdk_version; } - return (Version) { PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, PROCESS_INFO_CURRENT_SDK_VERSION_MINOR }; + return (Version){PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, PROCESS_INFO_CURRENT_SDK_VERSION_MINOR}; } ProcessAppRunLevel process_metadata_get_run_level(const PebbleProcessMd *md) { @@ -48,33 +48,33 @@ ProcessAppRunLevel process_metadata_get_run_level(const PebbleProcessMd *md) { } else if (md->process_storage == ProcessStorageResource) { return ProcessAppRunLevelNormal; } - return ((const PebbleProcessMdSystem*) md)->run_level; + return ((const PebbleProcessMdSystem *)md)->run_level; } int process_metadata_get_code_bank_num(const PebbleProcessMd *md) { if (md->process_storage == ProcessStorageFlash) { - return ((const PebbleProcessMdFlash*) md)->code_bank_num; + return ((const PebbleProcessMdFlash *)md)->code_bank_num; } return 0; } int process_metadata_get_res_bank_num(const PebbleProcessMd *md) { if (md->process_storage == ProcessStorageFlash) { - return ((const PebbleProcessMdFlash*) md)->res_bank_num; + return ((const PebbleProcessMdFlash *)md)->res_bank_num; } return 0; } ResourceVersion process_metadata_get_res_version(const PebbleProcessMd *md) { if (md->process_storage == ProcessStorageFlash) { - return ((const PebbleProcessMdFlash*) md)->res_version; + return ((const PebbleProcessMdFlash *)md)->res_version; } - return (ResourceVersion) { 0, 0 } ; + return (ResourceVersion){0, 0}; } const uint8_t *process_metadata_get_build_id(const PebbleProcessMd *md) { if (md->process_storage == ProcessStorageFlash) { - return ((const PebbleProcessMdFlash*) md)->build_id; + return ((const PebbleProcessMdFlash *)md)->build_id; } return NULL; } @@ -84,8 +84,7 @@ const uint8_t *process_metadata_get_build_id(const PebbleProcessMd *md) { ////////////////////// static void prv_init_from_info_common(PebbleProcessMd *common, const PebbleProcessInfo *info, - PebbleTask task, ProcessStorage process_storage) { - + PebbleTask task, ProcessStorage process_storage) { memcpy(&common->uuid, &info->uuid, sizeof(Uuid)); common->process_storage = process_storage; @@ -109,10 +108,9 @@ static void prv_init_from_info_common(PebbleProcessMd *common, const PebbleProce common->main_func = (void *)(uintptr_t)info->offset; } - -void process_metadata_init_with_flash_header(PebbleProcessMdFlash *md, - const PebbleProcessInfo *info, int code_bank_num, PebbleTask task, uint8_t *build_id_buffer) { - +void process_metadata_init_with_flash_header(PebbleProcessMdFlash *md, + const PebbleProcessInfo *info, int code_bank_num, + PebbleTask task, uint8_t *build_id_buffer) { *md = (PebbleProcessMdFlash){}; prv_init_from_info_common(&md->common, info, task, ProcessStorageFlash); @@ -128,10 +126,8 @@ void process_metadata_init_with_flash_header(PebbleProcessMdFlash *md, md->code_bank_num = code_bank_num; md->res_bank_num = code_bank_num; - md->res_version = (ResourceVersion) { - .crc = info->resource_crc, - .timestamp = info->resource_timestamp - }; + md->res_version = + (ResourceVersion){.crc = info->resource_crc, .timestamp = info->resource_timestamp}; if (build_id_buffer) { memcpy(md->build_id, build_id_buffer, BUILD_ID_EXPECTED_LEN); @@ -139,8 +135,8 @@ void process_metadata_init_with_flash_header(PebbleProcessMdFlash *md, } void process_metadata_init_with_resource_header(PebbleProcessMdResource *md, - const PebbleProcessInfo *info, int bin_resource_id, PebbleTask task) { - + const PebbleProcessInfo *info, int bin_resource_id, + PebbleTask task) { *md = (PebbleProcessMdResource){}; prv_init_from_info_common(&md->common, info, task, ProcessStorageResource); @@ -201,19 +197,18 @@ uint16_t process_metadata_flags_stored_sdk_platform(PebbleProcessInfoFlags flags } static const Version first_3x_version = { - PROCESS_INFO_FIRST_3X_SDK_VERSION_MAJOR, - PROCESS_INFO_FIRST_3X_SDK_VERSION_MINOR, + PROCESS_INFO_FIRST_3X_SDK_VERSION_MAJOR, + PROCESS_INFO_FIRST_3X_SDK_VERSION_MINOR, }; static const Version first_4x_version = { - PROCESS_INFO_FIRST_4X_SDK_VERSION_MAJOR, - PROCESS_INFO_FIRST_4X_SDK_VERSION_MINOR, + PROCESS_INFO_FIRST_4X_SDK_VERSION_MAJOR, + PROCESS_INFO_FIRST_4X_SDK_VERSION_MINOR, }; static const Version first_4_2_version = { - PROCESS_INFO_FIRST_4_2_X_SDK_VERSION_MAJOR, - PROCESS_INFO_FIRST_4_2_X_SDK_VERSION_MINOR, + PROCESS_INFO_FIRST_4_2_X_SDK_VERSION_MAJOR, + PROCESS_INFO_FIRST_4_2_X_SDK_VERSION_MINOR, }; - PlatformType process_metadata_get_app_sdk_platform(const PebbleProcessMd *md) { if (!md->is_unprivileged) { return PBL_PLATFORM_TYPE_CURRENT; @@ -228,25 +223,27 @@ PlatformType process_metadata_get_app_sdk_platform(const PebbleProcessMd *md) { } // 3.0 <= SDK < 4.0 if (version_compare(app_sdk_version, first_4x_version) < 0) { - return PBL_PLATFORM_SWITCH(PBL_PLATFORM_TYPE_CURRENT, - /* aplite */ PlatformTypeAplite, // unreachable, since we don't build for Tintin anymore - /* basalt */ PlatformTypeBasalt, - /* chalk */ PlatformTypeChalk, - /* diorite */ PlatformTypeAplite, // there's was no Diorite SDK prior to 4.0 - /* emery */ PlatformTypeBasalt, - /* flint */ PlatformTypeAplite, - /* gabbro */ PlatformTypeChalk); + return PBL_PLATFORM_SWITCH( + PBL_PLATFORM_TYPE_CURRENT, + /* aplite */ PlatformTypeAplite, // unreachable, since we don't build for Tintin anymore + /* basalt */ PlatformTypeBasalt, + /* chalk */ PlatformTypeChalk, + /* diorite */ PlatformTypeAplite, // there's was no Diorite SDK prior to 4.0 + /* emery */ PlatformTypeBasalt, + /* flint */ PlatformTypeAplite, + /* gabbro */ PlatformTypeChalk); } // 4.0 <= SDK < 4.2 if (version_compare(app_sdk_version, first_4_2_version) < 0) { - return PBL_PLATFORM_SWITCH(PBL_PLATFORM_TYPE_CURRENT, - /* aplite */ PlatformTypeAplite, // unreachable, since we don't build for Tintin anymore - /* basalt */ PlatformTypeBasalt, - /* chalk */ PlatformTypeChalk, - /* diorite */ PlatformTypeDiorite, // there's was no Aplite SDK after 4.0 - /* emery */ PlatformTypeBasalt, - /* flint */ PlatformTypeDiorite, - /* gabbro */ PlatformTypeChalk); + return PBL_PLATFORM_SWITCH( + PBL_PLATFORM_TYPE_CURRENT, + /* aplite */ PlatformTypeAplite, // unreachable, since we don't build for Tintin anymore + /* basalt */ PlatformTypeBasalt, + /* chalk */ PlatformTypeChalk, + /* diorite */ PlatformTypeDiorite, // there's was no Aplite SDK after 4.0 + /* emery */ PlatformTypeBasalt, + /* flint */ PlatformTypeDiorite, + /* gabbro */ PlatformTypeChalk); } // 4.2 <= SDK --> the flags should be filled correctly. diff --git a/src/fw/process_management/pebble_process_md.h b/src/fw/process_management/pebble_process_md.h index 426a0b41b4..2fd69df7ff 100644 --- a/src/fw/process_management/pebble_process_md.h +++ b/src/fw/process_management/pebble_process_md.h @@ -48,15 +48,16 @@ typedef enum { ProcessAppSDKType_4x } ProcessAppSDKType; -//! This structure is used internally to describe the process. This struct here is actually a polymorphic base -//! class, and can be casted to either \ref PebbleProcessMdSystem or \ref PebbleProcessMdFlash depending on the value -//! of @c process_storage. Clients shouldn't do this casting themselves though, and instead should use the -//! process_metadata_get_* functions to safely retrieve values from this struct. +//! This structure is used internally to describe the process. This struct here is actually a +//! polymorphic base class, and can be casted to either \ref PebbleProcessMdSystem or \ref +//! PebbleProcessMdFlash depending on the value of @c process_storage. Clients shouldn't do this +//! casting themselves though, and instead should use the process_metadata_get_* functions to safely +//! retrieve values from this struct. typedef struct PebbleProcessMd { Uuid uuid; - //! The address of the main function of the process. This will be inside the firmware for firmware processes and - //! will be inside the process's RAM region for 3rd party processes. + //! The address of the main function of the process. This will be inside the firmware for firmware + //! processes and will be inside the process's RAM region for 3rd party processes. PebbleMain main_func; //! The type of process @@ -91,12 +92,13 @@ typedef struct PebbleProcessMd { typedef struct PebbleProcessMdSystem { PebbleProcessMd common; - const char* name; + const char *name; uint32_t icon_resource_id; - //! The level at which the process runs. Any processes that try to start but they have a lower level than what's - //! set using the \ref app_manager_set_minimum_run_level() function will not be launched. + //! The level at which the process runs. Any processes that try to start but they have a lower + //! level than what's set using the \ref app_manager_set_minimum_run_level() function will not be + //! launched. ProcessAppRunLevel run_level; } PebbleProcessMdSystem; @@ -130,7 +132,6 @@ typedef struct PebbleProcessMdFlash { uint8_t build_id[BUILD_ID_EXPECTED_LEN]; } PebbleProcessMdFlash; - //! Metadata for processes that are dynamically loaded from a system resource. typedef struct { PebbleProcessMd common; @@ -138,7 +139,7 @@ typedef struct { char name[PROCESS_NAME_BYTES]; //! Size in bytes of the app region that is occupied when this app is loaded - //! Used when sizing the app heap. + //! Used when sizing the app heap. uint16_t size_bytes; //! The resource number of the app binary @@ -146,8 +147,7 @@ typedef struct { } PebbleProcessMdResource; - -const char* process_metadata_get_name(const PebbleProcessMd *md); +const char *process_metadata_get_name(const PebbleProcessMd *md); uint32_t process_metadata_get_size_bytes(const PebbleProcessMd *md); Version process_metadata_get_process_version(const PebbleProcessMd *md); Version process_metadata_get_sdk_version(const PebbleProcessMd *md); @@ -163,15 +163,17 @@ const uint8_t *process_metadata_get_build_id(const PebbleProcessMd *md); //! @param task The task the process will run as //! @param build_id_buffer Optional buffer holding the build id to copy, may be NULL void process_metadata_init_with_flash_header(PebbleProcessMdFlash *md, - const PebbleProcessInfo *flash_header, int process_bank_num, PebbleTask task, - uint8_t *build_id_buffer); + const PebbleProcessInfo *flash_header, + int process_bank_num, PebbleTask task, + uint8_t *build_id_buffer); //! @param[out] md //! @param info The process info header //! @param bin_resource_id The resource id of the process binary //! @param task The task the process will run as void process_metadata_init_with_resource_header(PebbleProcessMdResource *md, - const PebbleProcessInfo *info, int bin_resource_id, PebbleTask task); + const PebbleProcessInfo *info, int bin_resource_id, + PebbleTask task); ProcessVisibility process_metadata_flags_visibility(PebbleProcessInfoFlags flags); diff --git a/src/fw/process_management/process_heap.c b/src/fw/process_management/process_heap.c index 5ba25de71a..5c6ba40c1b 100644 --- a/src/fw/process_management/process_heap.c +++ b/src/fw/process_management/process_heap.c @@ -31,8 +31,7 @@ static void prv_croak_on_heap_corruption(void *ptr) { PBL_CROAK("Error: Heap corrupt around <%p>", ptr); } -void process_heap_set_exception_handlers(Heap *heap, - const PebbleProcessMd *app_md) { +void process_heap_set_exception_handlers(Heap *heap, const PebbleProcessMd *app_md) { // prior to version 2.1 of the firmware (app sdk version 5.2), we never had // double free detection in our heap and we would just silently ignore someone // trying to free an invalid pointer. going forward we want to let our @@ -40,10 +39,9 @@ void process_heap_set_exception_handlers(Heap *heap, // compiled with the old sdk, yell at them through a log message so we don't // break any existing apps. if the app is compiled with a new sdk after we // made this change, just crash their app. - static const Version old_style_double_free_handling_version = { 5, 1 }; + static const Version old_style_double_free_handling_version = {5, 1}; const Version app_sdk_version = process_metadata_get_sdk_version(app_md); - if (version_compare(app_sdk_version, - old_style_double_free_handling_version) <= 0) { + if (version_compare(app_sdk_version, old_style_double_free_handling_version) <= 0) { heap_set_double_free_handler(heap, prv_warn_on_double_free); } else { heap_set_double_free_handler(heap, prv_croak_on_double_free); @@ -67,7 +65,7 @@ void process_heap_set_exception_handlers(Heap *heap, // Since some apps can continue to run without issue, rather than tearing // everything down and create a bad user experience, let's hope that // developers read the logs and fix their apps. - static const Version old_style_heap_corruption_version = { 5, 0x38 }; + static const Version old_style_heap_corruption_version = {5, 0x38}; if (version_compare(app_sdk_version, old_style_heap_corruption_version) < 0) { // They're using 3.2 SDK or older, just let them off with a log message. diff --git a/src/fw/process_management/process_heap.h b/src/fw/process_management/process_heap.h index 013e6e6d94..96154f3df3 100644 --- a/src/fw/process_management/process_heap.h +++ b/src/fw/process_management/process_heap.h @@ -8,5 +8,4 @@ typedef struct PebbleProcessMd PebbleProcessMd; //! Configure exception handlers (corruption and double-free) for //! app and worker heaps. -void process_heap_set_exception_handlers(Heap *heap, - const PebbleProcessMd *app_md); +void process_heap_set_exception_handlers(Heap *heap, const PebbleProcessMd *app_md); diff --git a/src/fw/process_management/process_loader.h b/src/fw/process_management/process_loader.h index 92d48cc099..3f968f2069 100644 --- a/src/fw/process_management/process_loader.h +++ b/src/fw/process_management/process_loader.h @@ -20,5 +20,5 @@ typedef struct PebbleProcessMd PebbleProcessMd; //! //! @return pointer to process's entry point function, or NULL if the //! process loading failed. -void * process_loader_load(const PebbleProcessMd *app_md, PebbleTask task, - MemorySegment *destination); +void *process_loader_load(const PebbleProcessMd *app_md, PebbleTask task, + MemorySegment *destination); diff --git a/src/fw/process_management/process_manager.c b/src/fw/process_management/process_manager.c index ef6e33e53d..56f21d7263 100644 --- a/src/fw/process_management/process_manager.c +++ b/src/fw/process_management/process_manager.c @@ -63,9 +63,9 @@ static ProcessContext *prv_get_context(void) { } // -------------------------------------------------------------------------------------------------- -// This timer callback gets called if the process doesn't finish it's deinit within the required timeout (currently -// 3 seconds). -static void prv_graceful_close_timer_callback(void* data) { +// This timer callback gets called if the process doesn't finish it's deinit within the required +// timeout (currently 3 seconds). +static void prv_graceful_close_timer_callback(void *data) { PBL_LOG_DBG("deinit timeout expired, killing app forcefully"); PebbleTask task = (PebbleTask)data; @@ -89,7 +89,7 @@ static bool prv_force_stop_task_if_unprivileged(ProcessContext *context) { } // -------------------------------------------------------------------------------------------------- -static void prv_force_close_timer_callback(void* data) { +static void prv_force_close_timer_callback(void *data) { PebbleTask task = (PebbleTask)data; ProcessContext *context = prv_get_context_for_task(task); @@ -121,11 +121,11 @@ void process_manager_init(void) { // ----------------------------------------------------------------------------------------------------------- void process_manager_put_kill_process_event(PebbleTask task, bool gracefully) { PebbleEvent event = { - .type = PEBBLE_PROCESS_KILL_EVENT, - .kill = { - .gracefully = gracefully, - .task = task, - }, + .type = PEBBLE_PROCESS_KILL_EVENT, + .kill = { + .gracefully = gracefully, + .task = task, + }, }; // When we have decided to exit the app, @@ -146,8 +146,8 @@ void process_manager_put_kill_process_event(PebbleTask task, bool gracefully) { // --------------------------------------------------------------------------------------------- //! Init the context variables for a task. -void process_manager_init_context(ProcessContext* context, - const PebbleProcessMd *app_md, const void *args) { +void process_manager_init_context(ProcessContext *context, const PebbleProcessMd *app_md, + const void *args) { PBL_ASSERT_TASK(PebbleTask_KernelMain); PBL_ASSERTN(context->task_handle == NULL); @@ -184,11 +184,12 @@ bool process_manager_check_SDK_compatible(const AppInstallId id) { return true; } - PBL_LOG_WRN("App requires support for SDK version (%"PRIu8".%"PRIu8"), " - "we only support version (%"PRIu8".%"PRIu8").", - entry.sdk_version.major, entry.sdk_version.minor, - (uint8_t) PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, - (uint8_t) PROCESS_INFO_CURRENT_SDK_VERSION_MINOR); + PBL_LOG_WRN("App requires support for SDK version (%" PRIu8 ".%" PRIu8 + "), " + "we only support version (%" PRIu8 ".%" PRIu8 ").", + entry.sdk_version.major, entry.sdk_version.minor, + (uint8_t)PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, + (uint8_t)PROCESS_INFO_CURRENT_SDK_VERSION_MINOR); ExpandableDialog *expandable_dialog = expandable_dialog_create("Incompatible SDK"); Dialog *dialog = expandable_dialog_get_dialog(expandable_dialog); @@ -227,8 +228,8 @@ static bool prv_needs_fetch(AppInstallId id, const PebbleProcessMd **md, bool is char expected_uuid[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(&(*md)->uuid, cached_uuid); uuid_to_string(&entry.uuid, expected_uuid); - PBL_LOG_WRN("Stale app cache entry for id %" PRId32 ": cached %s, expected %s. Refetching.", - id, cached_uuid, expected_uuid); + PBL_LOG_WRN("Stale app cache entry for id %" PRId32 ": cached %s, expected %s. Refetching.", id, + cached_uuid, expected_uuid); app_install_release_md(*md); *md = NULL; app_cache_remove_entry(id); @@ -253,9 +254,9 @@ void process_manager_launch_process(const ProcessLaunchConfig *config) { const PebbleProcessMd *md = NULL; #if !defined(CONFIG_RECOVERY_FW) if (app_install_id_from_app_db(id)) { - if (!process_manager_check_SDK_compatible(id)) { - return; - } + if (!process_manager_check_SDK_compatible(id)) { + return; + } // This is a third party flash 3.0 app install if (prv_needs_fetch(id, &md, is_worker)) { @@ -275,12 +276,12 @@ void process_manager_launch_process(const ProcessLaunchConfig *config) { } PebbleEvent e = { - .type = PEBBLE_APP_FETCH_REQUEST_EVENT, - .app_fetch_request = { - .id = id, - .with_ui = true, - .fetch_args = fetch_args, - }, + .type = PEBBLE_APP_FETCH_REQUEST_EVENT, + .app_fetch_request = { + .id = id, + .with_ui = true, + .fetch_args = fetch_args, + }, }; event_put(&e); return; @@ -309,7 +310,7 @@ void process_manager_launch_process(const ProcessLaunchConfig *config) { AppInstallEntry entry; if (!app_install_get_entry_for_install_id(id, &entry)) { // can't retrieve app install entry for id - PBL_LOG_ERR("Failed to get entry for id %"PRId32, id); + PBL_LOG_ERR("Failed to get entry for id %" PRId32, id); } else if (app_install_entry_is_watchface(&entry)) { // If the watchface is for an unsupported SDK version, we need to switch the default // watchface back to tictoc. Otherwise, we will be stuck in the launcher forever. @@ -336,8 +337,7 @@ void process_manager_launch_process(const ProcessLaunchConfig *config) { ExpandableDialog *expandable_dialog = expandable_dialog_create("Unsupported App"); Dialog *dialog = expandable_dialog_get_dialog(expandable_dialog); - const char *error_text = - i18n_noop("This app uses RockyJS which is no longer supported."); + const char *error_text = i18n_noop("This app uses RockyJS which is no longer supported."); dialog_set_text(dialog, i18n_get(error_text, expandable_dialog)); dialog_set_icon(dialog, RESOURCE_ID_GENERIC_WARNING_SMALL); i18n_free(error_text, expandable_dialog); @@ -354,35 +354,37 @@ void process_manager_launch_process(const ProcessLaunchConfig *config) { if (is_worker) { worker_manager_launch_new_worker_with_args(md, NULL); } else { - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = md, - .common = config->common, - .forcefully = config->forcefully, + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = md, + .common = config->common, + .forcefully = config->forcefully, }); } } // --------------------------------------------------------------------------------------------- -//! This method returns true if the process is safe to kill (it has exited out of it's main function). If the -//! the process is not already safe to kill, it will "prod" it to exit, set a timer, and return false. +//! This method returns true if the process is safe to kill (it has exited out of it's main +//! function). If the the process is not already safe to kill, it will "prod" it to exit, set a +//! timer, and return false. //! -//! The app manager and worker manager MUST call this before they call the code to kill the task and clean it up -//! (most of that work is done by process_manager_process_cleanup()). If it returns false, they should abort the -//! current process exit operation and wait for another KILL event to get posted. +//! The app manager and worker manager MUST call this before they call the code to kill the task and +//! clean it up (most of that work is done by process_manager_process_cleanup()). If it returns +//! false, they should abort the current process exit operation and wait for another KILL event to +//! get posted. //! -//! If the task does eventually fall through it's main function, the exit handling code will set the safe to kill -//! boolean and post another KILL event to the KernelMain which will result in this method being called again, and -//! this time it will see the safe to kill is set and return true +//! If the task does eventually fall through it's main function, the exit handling code will set the +//! safe to kill boolean and post another KILL event to the KernelMain which will result in this +//! method being called again, and this time it will see the safe to kill is set and return true //! -//! If the task does not exit by itself before the timer expires, then the timer will post another KILL event -//! with graceful set to false. This will result in this method being called again with gracefully = false. When -//! we see this, we just try and make sure the app is not stuck in privilege code. If it's not, we return true -//! and allow the caller to kill the task. +//! If the task does not exit by itself before the timer expires, then the timer will post another +//! KILL event with graceful set to false. This will result in this method being called again with +//! gracefully = false. When we see this, we just try and make sure the app is not stuck in +//! privilege code. If it's not, we return true and allow the caller to kill the task. //! -//! If however, the task is in privilege mode, we tell the syscall machinery to set the safe to kill boolean as -//! soon as the current syscall returns and set another timer. Once that timer expires, if the task is no longer -//! in privilege mode we post another KILL event (graceful = false). If the task is still in privilege mode then, -//! we croak. +//! If however, the task is in privilege mode, we tell the syscall machinery to set the safe to kill +//! boolean as soon as the current syscall returns and set another timer. Once that timer expires, +//! if the task is no longer in privilege mode we post another KILL event (graceful = false). If the +//! task is still in privilege mode then, we croak. bool process_manager_make_process_safe_to_kill(PebbleTask task, bool gracefully) { PBL_ASSERT_TASK(PebbleTask_KernelMain); ProcessContext *context = prv_get_context_for_task(task); @@ -400,7 +402,7 @@ bool process_manager_make_process_safe_to_kill(PebbleTask task, bool gracefully) } PBL_LOG_DBG("make %s process safe to kill: state %u", pebble_task_get_name(task), - context->closing_state); + context->closing_state); if (gracefully) { if (context->closing_state == ProcessRunState_Running) { @@ -410,15 +412,16 @@ bool process_manager_make_process_safe_to_kill(PebbleTask task, bool gracefully) // Send deinit event to app: PebbleEvent deinit_event = { - .type = PEBBLE_PROCESS_DEINIT_EVENT, + .type = PEBBLE_PROCESS_DEINIT_EVENT, }; process_manager_send_event_to_process(task, &deinit_event); - // Set a timer to forcefully close the app in 3 seconds if it doesn't respond by then. The app can respond - // within 3 seconds by posting a PEBBLE_APP_KILL_EVENT (graceful=true), which will result in - // app_manager_close_current_app() being called, which in turn calls this method with graceful = true. - bool success = new_timer_start(s_deinit_timer_id, 3 * 1000, prv_graceful_close_timer_callback, (void*)task, - 0 /*flags*/); + // Set a timer to forcefully close the app in 3 seconds if it doesn't respond by then. The app + // can respond within 3 seconds by posting a PEBBLE_APP_KILL_EVENT (graceful=true), which will + // result in app_manager_close_current_app() being called, which in turn calls this method + // with graceful = true. + bool success = new_timer_start(s_deinit_timer_id, 3 * 1000, prv_graceful_close_timer_callback, + (void *)task, 0 /*flags*/); PBL_ASSERTN(success); } // Else we're already in the gracefully closing state, just let the timer run out or the @@ -455,15 +458,14 @@ bool process_manager_make_process_safe_to_kill(PebbleTask task, bool gracefully) // (e.g., in sys_get_pebble_event). This allows the syscall to return and // trigger process_manager_handle_syscall_exit() which will mark the process // as safe to kill. - PBL_LOG_DBG("Sending DEINIT event to wake %s from syscall", - pebble_task_get_name(task)); + PBL_LOG_DBG("Sending DEINIT event to wake %s from syscall", pebble_task_get_name(task)); PebbleEvent deinit_event = { - .type = PEBBLE_PROCESS_DEINIT_EVENT, + .type = PEBBLE_PROCESS_DEINIT_EVENT, }; process_manager_send_event_to_process(task, &deinit_event); - bool success = new_timer_start(s_deinit_timer_id, 3 * 1000, prv_force_close_timer_callback, (void*)task, - 0 /*flags*/); + bool success = new_timer_start(s_deinit_timer_id, 3 * 1000, prv_force_close_timer_callback, + (void *)task, 0 /*flags*/); PBL_ASSERTN(success); } } @@ -471,8 +473,8 @@ bool process_manager_make_process_safe_to_kill(PebbleTask task, bool gracefully) } // ----------------------------------------------------------------------------------------------------------- -// This is designed to be called from the task itself, in privilege mode, after it exits. It is called from -// app_task_exit for app tasks and worker_task_exit from worker tasks +// This is designed to be called from the task itself, in privilege mode, after it exits. It is +// called from app_task_exit for app tasks and worker_task_exit from worker tasks NORETURN process_manager_task_exit(void) { PebbleTask task = pebble_task_get_current(); ProcessContext *context = prv_get_context_for_task(task); @@ -490,16 +492,18 @@ NORETURN process_manager_task_exit(void) { // FIXME: We cast heap_size's size_t result to int because for some reason our printf doesn't // like the %zd formatter - APP_LOG(APP_LOG_LEVEL_INFO, "Heap Usage for %s: Total Size <%dB> Used <%uB> Still allocated <%uB>", - pebble_task_get_name(task), (int) heap_size(heap), heap->high_water_mark, heap->current_size); + APP_LOG(APP_LOG_LEVEL_INFO, + "Heap Usage for %s: Total Size <%dB> Used <%uB> Still allocated <%uB>", + pebble_task_get_name(task), (int)heap_size(heap), heap->high_water_mark, + heap->current_size); } // Let the task manager know we're done cleaning up. context->safe_to_kill = true; - // Tell the task manager that we want to be killed. This may be redundant if we're responding to a DEINIT - // message, but just in case we're exiting on our own (someone found the sys_exit syscall and called in when - // we weren't expecting it?) we should let the app manager know. + // Tell the task manager that we want to be killed. This may be redundant if we're responding to a + // DEINIT message, but just in case we're exiting on our own (someone found the sys_exit syscall + // and called in when we weren't expecting it?) we should let the app manager know. process_manager_put_kill_process_event(task, true); // Better to die in our sleep ... @@ -507,7 +511,6 @@ NORETURN process_manager_task_exit(void) { // We don't expect someone to resume us. PBL_CROAK(""); - } // --------------------------------------------------------------------------------------------- @@ -525,9 +528,10 @@ void process_manager_process_setup(PebbleTask task) { } // --------------------------------------------------------------------------------------------- -//! Kills the process, giving it no chance to clean things up or exit gracefully. The process must already be in a -//! state where it's safe to exit, so the caller must call process_manager_make_process_safe_to_kill() first and only -//! call this method if process_manager_make_process_safe_to_kill() returns true; +//! Kills the process, giving it no chance to clean things up or exit gracefully. The process must +//! already be in a state where it's safe to exit, so the caller must call +//! process_manager_make_process_safe_to_kill() first and only call this method if +//! process_manager_make_process_safe_to_kill() returns true; void process_manager_process_cleanup(PebbleTask task) { PBL_ASSERT_TASK(PebbleTask_KernelMain); @@ -557,7 +561,7 @@ void process_manager_process_cleanup(PebbleTask task) { if (task == PebbleTask_App) { } -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW // Unregister the task pebble_task_unregister(task); @@ -597,7 +601,7 @@ void process_manager_close_process(PebbleTask task, bool gracefully) { } // ---------------------------------------------------------------------------------------------- -bool process_manager_send_event_to_process(PebbleTask task, PebbleEvent* e) { +bool process_manager_send_event_to_process(PebbleTask task, PebbleEvent *e) { ProcessContext *context = prv_get_context_for_task(task); if (context->to_process_event_queue == 0) { @@ -630,15 +634,15 @@ uint32_t process_manager_process_events_waiting(PebbleTask task) { } // ---------------------------------------------------------------------------------------------- -void process_manager_send_callback_event_to_process(PebbleTask task, void (*callback)(void *data), void *data) { - +void process_manager_send_callback_event_to_process(PebbleTask task, void (*callback)(void *data), + void *data) { PBL_ASSERTN(callback != NULL); PebbleEvent event = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = callback, - .data = data, - }, + .type = PEBBLE_CALLBACK_EVENT, + .callback = { + .callback = callback, + .data = data, + }, }; process_manager_send_event_to_process(task, &event); } @@ -646,9 +650,8 @@ void process_manager_send_callback_event_to_process(PebbleTask task, void (*call // ---------------------------------------------------------------------------------------------- void *process_manager_address_to_offset(PebbleTask task, void *system_address) { ProcessContext *context = prv_get_context_for_task(task); - if (system_address >= context->load_start && - system_address < context->load_end) { - return (void*)((uintptr_t) system_address - (uintptr_t)context->load_start); + if (system_address >= context->load_start && system_address < context->load_end) { + return (void *)((uintptr_t)system_address - (uintptr_t)context->load_start); } // Not in app space: return system_address; @@ -704,7 +707,7 @@ DEFINE_SYSCALL(uint32_t, sys_process_get_launch_args, void) { if (sys_process_get_launch_reason() != APP_LAUNCH_TIMELINE_ACTION) { return 0; } else { - return (uint32_t) process_manager_get_current_process_args(); + return (uint32_t)process_manager_get_current_process_args(); } } @@ -713,7 +716,7 @@ DEFINE_SYSCALL(AppQuickLaunchAction, sys_process_get_quick_launch_action, void) if (sys_process_get_launch_reason() != APP_LAUNCH_QUICK_LAUNCH) { return APP_QUICK_LAUNCH_ACTION_NONE; } - return (AppQuickLaunchAction)(uintptr_t) process_manager_get_current_process_args(); + return (AppQuickLaunchAction)(uintptr_t)process_manager_get_current_process_args(); } // ------------------------------------------------------------------------------------------- @@ -739,7 +742,7 @@ DEFINE_SYSCALL(void, sys_process_get_wakeup_info, WakeupInfo *info) { } // ------------------------------------------------------------------------------------------- -DEFINE_SYSCALL(const PebbleProcessMd*, sys_process_manager_get_current_process_md, void) { +DEFINE_SYSCALL(const PebbleProcessMd *, sys_process_manager_get_current_process_md, void) { return prv_get_context()->app_md; } @@ -749,7 +752,7 @@ DEFINE_SYSCALL(bool, sys_process_manager_get_current_process_uuid, Uuid *uuid_ou syscall_assert_userspace_buffer(uuid_out, sizeof(*uuid_out)); } - const PebbleProcessMd* app_md = prv_get_context()->app_md; + const PebbleProcessMd *app_md = prv_get_context()->app_md; if (!app_md) { return false; } diff --git a/src/fw/process_management/process_manager.h b/src/fw/process_management/process_manager.h index 34e9ee74b7..57202cc2cc 100644 --- a/src/fw/process_management/process_manager.h +++ b/src/fw/process_management/process_manager.h @@ -28,9 +28,9 @@ typedef enum ProcessRunState { } ProcessRunState; typedef struct ProcessContext { - //! The app metadata structure if this process represents a running application (NULL otherwise). Describes the - //! static information about the currently running app. - const PebbleProcessMd* app_md; + //! The app metadata structure if this process represents a running application (NULL otherwise). + //! Describes the static information about the currently running app. + const PebbleProcessMd *app_md; //! The app install id for this process if it represents an application. AppInstallId install_id; @@ -71,14 +71,14 @@ typedef struct ProcessContext { //! Arguments passed to the process'. This is a pointer to a struct //! that is defined by the application. - const void* args; + const void *args; //! Pointer to a piece of data that we hold on behalf of the process. This makes it so //! our first party apps don't have to keep declaring their own statics to hold a pointer //! to a struct to represent their app data. Third party apps don't have this issue as their //! globals are loaded and unloaded when they start and stop, where the globals for our first //! party apps are always present. See app_state_get_user_data/app_state_set_user_data - void* user_data; + void *user_data; } ProcessContext; typedef struct ProcessLaunchConfig { @@ -90,13 +90,12 @@ typedef struct ProcessLaunchConfig { bool forcefully; } ProcessLaunchConfig; - //! Init the process manager void process_manager_init(void); //! Init the context variables -void process_manager_init_context(ProcessContext* context, - const PebbleProcessMd *app_md, const void *args); +void process_manager_init_context(ProcessContext *context, const PebbleProcessMd *app_md, + const void *args); //! Checks if the app referred to by the given AppInstallId is SDK compatible //! Returns true if it is compatible, false otherwise @@ -108,38 +107,40 @@ bool process_manager_check_SDK_compatible(const AppInstallId id); //! be cached void process_manager_launch_process(const ProcessLaunchConfig *config); -//! Close the given process. This is the highest level call which transfers control to the manager of that type of -//! task. That manager will in turn call process_manager_make_process_safe_to_kill/process_manager_process_cleanup -//! If it's an app, this will cause the next app in the system app state machine to automatically get launched. -//! May only be called from the KernelMain task +//! Close the given process. This is the highest level call which transfers control to the manager +//! of that type of task. That manager will in turn call +//! process_manager_make_process_safe_to_kill/process_manager_process_cleanup If it's an app, this +//! will cause the next app in the system app state machine to automatically get launched. May only +//! be called from the KernelMain task void process_manager_close_process(PebbleTask task, bool gracefully); //! Called from the task itself, as it exits and reenters privileged mode NORETURN process_manager_task_exit(void); -//! Prod the given process into exiting. Returns true if it is safe to kill that task and clean it up using +//! Prod the given process into exiting. Returns true if it is safe to kill that task and clean it +//! up using //! process_manager_process_cleanup bool process_manager_make_process_safe_to_kill(PebbleTask task, bool gracefully); - //! Setup some required state for processes void process_manager_process_setup(PebbleTask task); -//! Kills the task and cleans it up. Must only be called if process_manager_make_process_safe_to_kill() returns -//! true. +//! Kills the task and cleans it up. Must only be called if +//! process_manager_make_process_safe_to_kill() returns true. void process_manager_process_cleanup(PebbleTask task); //! Get the args for the current process -const void* process_manager_get_current_process_args(void); +const void *process_manager_get_current_process_args(void); //! Send an event to the process' event loop -bool process_manager_send_event_to_process(PebbleTask task, PebbleEvent* e); +bool process_manager_send_event_to_process(PebbleTask task, PebbleEvent *e); //! Get the number of messages currently waiting to be processed by the process uint32_t process_manager_process_events_waiting(PebbleTask task); //! Wrapper for \ref process_manager_send_event_to_process to send callback events to the app -void process_manager_send_callback_event_to_process(PebbleTask task, void (*callback)(void *), void *data); +void process_manager_send_callback_event_to_process(PebbleTask task, void (*callback)(void *), + void *data); //! Send a kill event for the given process to KernelMain void process_manager_put_kill_process_event(PebbleTask task, bool gracefully); diff --git a/src/fw/process_management/sdk_shims.c b/src/fw/process_management/sdk_shims.c index eea1690a1b..bdd4692622 100644 --- a/src/fw/process_management/sdk_shims.c +++ b/src/fw/process_management/sdk_shims.c @@ -3,7 +3,6 @@ #include "process_state/app_state/app_state.h" -GContext* app_get_current_graphics_context(void) { +GContext *app_get_current_graphics_context(void) { return app_state_get_graphics_context(); } - diff --git a/src/fw/process_management/sdk_shims.h b/src/fw/process_management/sdk_shims.h index b4dfc6c4af..eda1bd43b2 100644 --- a/src/fw/process_management/sdk_shims.h +++ b/src/fw/process_management/sdk_shims.h @@ -15,8 +15,7 @@ typedef struct GContext GContext; //! @see \ref Drawing //! @see \ref LayerUpdateProc -GContext* app_get_current_graphics_context(void); +GContext *app_get_current_graphics_context(void); //! @} // end addtogroup App //! @} // end addtogroup Foundation - diff --git a/src/fw/process_management/sdk_version.c b/src/fw/process_management/sdk_version.c index 840cdd32ec..e9ddb1a3b3 100644 --- a/src/fw/process_management/sdk_version.c +++ b/src/fw/process_management/sdk_version.c @@ -3,7 +3,6 @@ #include "sdk_version.h" -bool sdk_version_is_app_messaging_supported(const Version * const sdk_version) { - return ((sdk_version->major == 3 && sdk_version->minor >= 1) || - sdk_version->major > 3); +bool sdk_version_is_app_messaging_supported(const Version *const sdk_version) { + return ((sdk_version->major == 3 && sdk_version->minor >= 1) || sdk_version->major > 3); } diff --git a/src/fw/process_management/sdk_version.h b/src/fw/process_management/sdk_version.h index 5d9fdec47c..8afdf016ba 100644 --- a/src/fw/process_management/sdk_version.h +++ b/src/fw/process_management/sdk_version.h @@ -8,4 +8,4 @@ //! Inspects the app metadata whether the app supports app messaging. //! Only if this returns true, the .messaging_info field of PebbleAppHandlers can be used. //! @return true if the app is built with an SDK that supports app messaging or not -bool sdk_version_is_app_messaging_supported(const Version * const sdk_version); +bool sdk_version_is_app_messaging_supported(const Version *const sdk_version); diff --git a/src/fw/process_management/worker_manager.c b/src/fw/process_management/worker_manager.c index 28e36772ce..e3a2330691 100644 --- a/src/fw/process_management/worker_manager.c +++ b/src/fw/process_management/worker_manager.c @@ -38,7 +38,7 @@ extern char __WORKER_RAM_end__[]; extern char __stack_guard_size__[]; //! Used by the "pebble gdb" command to locate the loaded worker in memory. -void * volatile g_worker_load_address; +void *volatile g_worker_load_address; typedef struct NextWorker { const PebbleProcessMd *md; @@ -58,8 +58,8 @@ void worker_manager_init(void) { } // --------------------------------------------------------------------------------------------- -// This is the wrapper function for the worker. It's not allowed to return as it's the top frame on the stack -// created for the application. +// This is the wrapper function for the worker. It's not allowed to return as it's the top frame on +// the stack created for the application. static void prv_worker_task_main(void *entry_point) { // Init worker state variables worker_state_init(); @@ -90,7 +90,7 @@ static void prv_worker_task_main(void *entry_point) { //! have to be locked because they're the sole property of the process and no //! other tasks should be touching it. All this function does is verify that //! this condition is met before continuing without locking. -static void prv_heap_lock(void* unused) { +static void prv_heap_lock(void *unused) { PBL_ASSERT_TASK(PebbleTask_Worker); } @@ -121,19 +121,19 @@ bool worker_manager_launch_new_worker_with_args(const PebbleProcessMd *app_md, c // if we are trying to start another worker, then we want to enable relaunches on crashes. s_worker_crash_relaunches_disabled = false; - // If there is a different worker currently running, tell it to quit first. When it sees s_next_worker - // set, it will call us again once it finishes closing the current worker - if (s_worker_task_context.app_md != NULL && s_worker_task_context.app_md != app_md) { - s_next_worker = (NextWorker) { - .md = app_md, - .args = args, + // If there is a different worker currently running, tell it to quit first. When it sees + // s_next_worker set, it will call us again once it finishes closing the current worker + if (s_worker_task_context.app_md != NULL && s_worker_task_context.app_md != app_md) { + s_next_worker = (NextWorker){ + .md = app_md, + .args = args, }; worker_manager_close_current_worker(true /*graceful*/); return true; } // Clear the next worker settings - s_next_worker = (NextWorker) {}; + s_next_worker = (NextWorker){}; // Error if a worker already launched if (pebble_task_get_thread(PebbleTask_Worker) != NULL) { @@ -149,16 +149,14 @@ bool worker_manager_launch_new_worker_with_args(const PebbleProcessMd *app_md, c // The stack guard is counted as part of the app segment size... const size_t stack_guard_size = (uintptr_t)__stack_guard_size__; // ...and is carved out of the stack. - const size_t stack_size = - prv_get_worker_stack_size(app_md) - stack_guard_size; + const size_t stack_size = prv_get_worker_stack_size(app_md) - stack_guard_size; - MemorySegment worker_ram = { __WORKER_RAM__, __WORKER_RAM_end__ }; + MemorySegment worker_ram = {__WORKER_RAM__, __WORKER_RAM_end__}; memset((char *)worker_ram.start + stack_guard_size, 0, memory_segment_get_size(&worker_ram) - stack_guard_size); MemorySegment worker_segment; - PBL_ASSERTN(memory_segment_split(&worker_ram, &worker_segment, - worker_segment_size)); + PBL_ASSERTN(memory_segment_split(&worker_ram, &worker_segment, worker_segment_size)); PBL_ASSERTN(memory_segment_split(&worker_segment, NULL, stack_guard_size)); // No (accessible) memory segments can be placed between the top of WORKER_RAM // and the end of stack. Stacks always grow towards lower memory addresses, so @@ -170,12 +168,11 @@ bool worker_manager_launch_new_worker_with_args(const PebbleProcessMd *app_md, c PBL_ASSERTN(stack); s_worker_task_context.load_start = worker_segment.start; g_worker_load_address = worker_segment.start; - void *entry_point = process_loader_load(app_md, PebbleTask_Worker, - &worker_segment); + void *entry_point = process_loader_load(app_md, PebbleTask_Worker, &worker_segment); s_worker_task_context.load_end = worker_segment.start; if (!entry_point) { PBL_LOG_WRN("Tried to launch an invalid worker in bank %u!", - process_metadata_get_code_bank_num(app_md)); + process_metadata_get_code_bank_num(app_md)); return false; } @@ -188,29 +185,29 @@ bool worker_manager_launch_new_worker_with_args(const PebbleProcessMd *app_md, c // heap. Worker state needs to be configured before initializing the // heap as the WorkerState struct holds the worker heap's Heap object. Heap *worker_heap = worker_state_get_heap(); - PBL_LOG_DBG("Worker heap init %p %p", - worker_segment.start, worker_segment.end); + PBL_LOG_DBG("Worker heap init %p %p", worker_segment.start, worker_segment.end); heap_init(worker_heap, worker_segment.start, worker_segment.end, /* enable_heap_fuzzing */ false); - heap_set_lock_impl(worker_heap, (HeapLockImpl) { - .lock_function = prv_heap_lock, - }); + heap_set_lock_impl(worker_heap, (HeapLockImpl){ + .lock_function = prv_heap_lock, + }); process_heap_set_exception_handlers(worker_heap, app_md); // Init services required for this process before it starts to execute process_manager_process_setup(PebbleTask_Worker); char task_name[PBL_THREAD_NAME_LEN]; - snprintf(task_name, sizeof(task_name), "Worker <%s>", process_metadata_get_name(s_worker_task_context.app_md)); + snprintf(task_name, sizeof(task_name), "Worker <%s>", + process_metadata_get_name(s_worker_task_context.app_md)); struct pbl_thread_attr attr = { - .name = task_name, - .entry = prv_worker_task_main, - .arg = entry_point, - .prio = PBL_PRIO_IDLE + 1, - .privileged = true, - .stack = stack, - .stack_size = stack_size, + .name = task_name, + .entry = prv_worker_task_main, + .arg = entry_point, + .prio = PBL_PRIO_IDLE + 1, + .privileged = true, + .stack = stack, + .stack_size = stack_size, }; PBL_LOG_DBG("Starting %s", task_name); @@ -255,7 +252,6 @@ void worker_manager_handle_remove_current_worker(void) { } // ------------------------------------------------------------------------------------------------ void worker_manager_close_current_worker(bool gracefully) { - // This method can be called as a result of receiving a PEBBLE_PROCESS_KILL_EVENT notification // from an app, telling us that it just finished it's deinit. @@ -319,7 +315,7 @@ void worker_manager_close_current_worker(bool gracefully) { } // ------------------------------------------------------------------------------------------------ -const PebbleProcessMd* worker_manager_get_current_worker_md(void) { +const PebbleProcessMd *worker_manager_get_current_worker_md(void) { return s_worker_task_context.app_md; } @@ -329,7 +325,7 @@ AppInstallId worker_manager_get_current_worker_id(void) { } // ------------------------------------------------------------------------------------------------ -ProcessContext* worker_manager_get_task_context(void) { +ProcessContext *worker_manager_get_task_context(void) { return &s_worker_task_context; } @@ -338,10 +334,10 @@ void worker_manager_put_launch_worker_event(AppInstallId id) { PBL_ASSERTN(id != INSTALL_ID_INVALID); PebbleEvent e = { - .type = PEBBLE_WORKER_LAUNCH_EVENT, - .launch_app = { - .id = id, - }, + .type = PEBBLE_WORKER_LAUNCH_EVENT, + .launch_app = { + .id = id, + }, }; event_put(&e); @@ -385,4 +381,3 @@ void command_worker_kill(void) { DEFINE_SYSCALL(AppInstallId, sys_worker_manager_get_current_worker_id, void) { return worker_manager_get_current_worker_id(); } - diff --git a/src/fw/process_management/worker_manager.h b/src/fw/process_management/worker_manager.h index fcce0055e8..bb823b66d7 100644 --- a/src/fw/process_management/worker_manager.h +++ b/src/fw/process_management/worker_manager.h @@ -19,11 +19,11 @@ void worker_manager_handle_remove_current_worker(void); void worker_manager_close_current_worker(bool gracefully); -const PebbleProcessMd* worker_manager_get_current_worker_md(void); +const PebbleProcessMd *worker_manager_get_current_worker_md(void); AppInstallId worker_manager_get_current_worker_id(void); -ProcessContext* worker_manager_get_task_context(void); +ProcessContext *worker_manager_get_task_context(void); //! Exit the worker. Do some cleanup to make sure things close nicely. //! Called from the worker task diff --git a/src/fw/process_state/app_state/app_state.c b/src/fw/process_state/app_state/app_state.c index d5db4a9b8c..42499d8c5d 100644 --- a/src/fw/process_state/app_state/app_state.c +++ b/src/fw/process_state/app_state/app_state.c @@ -67,7 +67,7 @@ typedef struct { PluginServiceState plugin_service_state; - void* user_data; + void *user_data; LogState log_state; @@ -93,7 +93,7 @@ typedef struct { UnobstructedAreaState unobstructed_area_service_state; - Layer* layer_tree_stack[LAYER_TREE_STACK_SIZE]; + Layer *layer_tree_stack[LAYER_TREE_STACK_SIZE]; WakeupHandler wakeup_handler; @@ -134,8 +134,7 @@ typedef struct { KERNEL_READONLY_DATA static AppState *s_app_state_ptr; -bool app_state_configure(MemorySegment *app_state_ram, - ProcessAppSDKType sdk_type, +bool app_state_configure(MemorySegment *app_state_ram, ProcessAppSDKType sdk_type, int16_t obstruction_origin_y) { s_app_state_ptr = memory_segment_split(app_state_ram, NULL, sizeof(AppState)); if (!s_app_state_ptr) { @@ -145,8 +144,7 @@ bool app_state_configure(MemorySegment *app_state_ram, s_app_state_ptr->sdk_type = sdk_type; s_app_state_ptr->initial_obstruction_origin_y = obstruction_origin_y; - if (GBITMAP_NATIVE_FORMAT != GBitmapFormat1Bit && - sdk_type == ProcessAppSDKType_Legacy2x) { + if (GBITMAP_NATIVE_FORMAT != GBitmapFormat1Bit && sdk_type == ProcessAppSDKType_Legacy2x) { // When running legacy2 aplite apps on basalt we actually have some space // after AppState that we don't need, because legacy2 aplite apps need to // support running on the smaller platform anyway. We can use this space for @@ -154,27 +152,25 @@ bool app_state_configure(MemorySegment *app_state_ram, // about 3.x aplite here because we don't support running 3.x aplite apps on // 3.x basalt platforms. - s_app_state_ptr->legacy2_framebuffer = memory_segment_split( - app_state_ram, NULL, sizeof(GBitmap)); + s_app_state_ptr->legacy2_framebuffer = + memory_segment_split(app_state_ram, NULL, sizeof(GBitmap)); if (!s_app_state_ptr->legacy2_framebuffer) { return false; } - uint16_t row_size = gbitmap_format_get_row_size_bytes( - LEGACY_2X_DISP_COLS, GBitmapFormat1Bit); - void *fb_data = memory_segment_split(app_state_ram, NULL, - row_size * LEGACY_2X_DISP_ROWS); + uint16_t row_size = gbitmap_format_get_row_size_bytes(LEGACY_2X_DISP_COLS, GBitmapFormat1Bit); + void *fb_data = memory_segment_split(app_state_ram, NULL, row_size * LEGACY_2X_DISP_ROWS); if (!fb_data) { return false; } - *s_app_state_ptr->legacy2_framebuffer = (GBitmap) { - .addr = fb_data, - .row_size_bytes = row_size, - .info.is_bitmap_heap_allocated = false, - .info.format = GBitmapFormat1Bit, - .info.version = GBITMAP_VERSION_0, - .bounds = { { 0, 0 }, { LEGACY_2X_DISP_COLS, LEGACY_2X_DISP_ROWS } } + *s_app_state_ptr->legacy2_framebuffer = (GBitmap){ + .addr = fb_data, + .row_size_bytes = row_size, + .info.is_bitmap_heap_allocated = false, + .info.format = GBitmapFormat1Bit, + .info.version = GBITMAP_VERSION_0, + .bounds = {{0, 0}, {LEGACY_2X_DISP_COLS, LEGACY_2X_DISP_ROWS}} }; } return true; @@ -219,13 +215,13 @@ static void prv_app_touch_nav_emit_button(void *ctx, ButtonId button) { } static const TouchNavOps s_app_touch_nav_ops = { - .is_animating = prv_app_touch_nav_is_animating, - .top_overrides_back = prv_app_touch_nav_top_overrides_back, - .top_tap_requires_action_bar = prv_app_touch_nav_top_tap_requires_action_bar, - .top_bridge_disabled = prv_app_touch_nav_top_bridge_disabled, - .pop_top = prv_app_touch_nav_pop_top, - .emit_button = prv_app_touch_nav_emit_button, - .idle_refresh = NULL, // the app task has no idle-timeout refresh; that is the kernel's job + .is_animating = prv_app_touch_nav_is_animating, + .top_overrides_back = prv_app_touch_nav_top_overrides_back, + .top_tap_requires_action_bar = prv_app_touch_nav_top_tap_requires_action_bar, + .top_bridge_disabled = prv_app_touch_nav_top_bridge_disabled, + .pop_top = prv_app_touch_nav_pop_top, + .emit_button = prv_app_touch_nav_emit_button, + .idle_refresh = NULL, // the app task has no idle-timeout refresh; that is the kernel's job }; // Twin subscription effects for the app task. The subscribe/reconcile state machine lives in @@ -254,15 +250,15 @@ static void prv_app_twin_remove_handler(void *ctx) { } static const TouchNavTwinOps s_app_twin_ops = { - .pref_enabled = prv_app_twin_pref_enabled, - .master_enabled = prv_app_twin_master_enabled, - .install_handler = prv_app_twin_install_handler, - .remove_handler = prv_app_twin_remove_handler, + .pref_enabled = prv_app_twin_pref_enabled, + .master_enabled = prv_app_twin_master_enabled, + .install_handler = prv_app_twin_install_handler, + .remove_handler = prv_app_twin_remove_handler, }; #endif NOINLINE void app_state_init(void) { - s_app_state_ptr->rand_seed.mat1 = 0; // Uninitialized + s_app_state_ptr->rand_seed.mat1 = 0; // Uninitialized click_manager_init(&s_app_state_ptr->click_manager); @@ -271,9 +267,10 @@ NOINLINE void app_state_init(void) { s_app_state_ptr->recognizer_manager.global_list = &s_app_state_ptr->recognizer_list; touch_nav_state_init(&s_app_state_ptr->touch_nav_state, &s_app_state_ptr->recognizer_manager, &s_app_touch_nav_ops); - // Participate only when this is positively a system/built-in app (negative install id). Third-party - // app-DB apps (positive id) and unresolved/INSTALL_ID_INVALID (0) are inert by default and must opt - // in via app_touch_navigation_enable(), so the unsafe direction (unknown -> on) cannot happen. + // Participate only when this is positively a system/built-in app (negative install id). + // Third-party app-DB apps (positive id) and unresolved/INSTALL_ID_INVALID (0) are inert by + // default and must opt in via app_touch_navigation_enable(), so the unsafe direction (unknown -> + // on) cannot happen. s_app_state_ptr->touch_nav_participating = app_install_id_from_system(app_manager_get_current_app_id()); s_app_state_ptr->touch_nav_opted_in = false; @@ -293,11 +290,10 @@ NOINLINE void app_state_init(void) { framebuffer_clear(&s_app_state_ptr->framebuffer); const GContextInitializationMode init_mode = - (s_app_state_ptr->sdk_type == ProcessAppSDKType_System) ? GContextInitializationMode_System : - GContextInitializationMode_App; - graphics_context_init(&s_app_state_ptr->graphics_context, - &s_app_state_ptr->framebuffer, init_mode); - + (s_app_state_ptr->sdk_type == ProcessAppSDKType_System) ? GContextInitializationMode_System + : GContextInitializationMode_App; + graphics_context_init(&s_app_state_ptr->graphics_context, &s_app_state_ptr->framebuffer, + init_mode); ble_init_app_state(); @@ -368,7 +364,7 @@ EventServiceInfo *app_state_get_app_outbox_subscription_info(void) { return &s_app_state_ptr->app_outbox_subscription_info; } -AnimationState* app_state_get_animation_state() { +AnimationState *app_state_get_animation_state() { return &s_app_state_ptr->animation_state; } @@ -376,27 +372,27 @@ AppMessageCtx *app_state_get_app_message_ctx(void) { return &s_app_state_ptr->app_message_ctx; } -BLEAppState* app_state_get_ble_app_state(void) { +BLEAppState *app_state_get_ble_app_state(void) { return &s_app_state_ptr->ble_app_state; } -ClickManager* app_state_get_click_manager() { +ClickManager *app_state_get_click_manager() { return &s_app_state_ptr->click_manager; } -WindowStack* app_state_get_window_stack() { +WindowStack *app_state_get_window_stack() { return &s_app_state_ptr->window_stack; } -FrameBuffer* app_state_get_framebuffer() { +FrameBuffer *app_state_get_framebuffer() { return &s_app_state_ptr->framebuffer; } -GContext* app_state_get_graphics_context() { +GContext *app_state_get_graphics_context() { return &s_app_state_ptr->graphics_context; } -EventServiceInfo* app_state_get_event_service_state(void) { +EventServiceInfo *app_state_get_event_service_state(void) { return &s_app_state_ptr->event_service_state; } @@ -404,11 +400,11 @@ void app_state_set_user_data(void *data) { s_app_state_ptr->user_data = data; } -void* app_state_get_user_data(void) { +void *app_state_get_user_data(void) { return s_app_state_ptr->user_data; } -AccelServiceState* app_state_get_accel_state(void) { +AccelServiceState *app_state_get_accel_state(void) { return &s_app_state_ptr->accel_state; } @@ -460,7 +456,7 @@ bool *app_state_get_framebuffer_render_pending() { return &s_app_state_ptr->app_framebuffer_render_pending; } -Layer** app_state_get_layer_tree_stack(void) { +Layer **app_state_get_layer_tree_stack(void) { return s_app_state_ptr->layer_tree_stack; } @@ -508,7 +504,7 @@ EventServiceInfo *app_state_get_speaker_finish_event_info(void) { return &s_app_state_ptr->speaker_finish_event_info; } -GBitmap* app_state_legacy2_get_2bit_framebuffer(void) { +GBitmap *app_state_legacy2_get_2bit_framebuffer(void) { PBL_ASSERTN(s_app_state_ptr->legacy2_framebuffer); return s_app_state_ptr->legacy2_framebuffer; } @@ -563,7 +559,7 @@ uint8_t *app_state_get_js_runtime_context_buffer(void) { } void app_state_set_js_runtime_context(uint8_t *unaligned_buffer, - JsRuntimeContext *js_runtime_context) { + JsRuntimeContext *js_runtime_context) { s_app_state_ptr->js_runtime_context_buffer = unaligned_buffer; s_app_state_ptr->js_runtime_context = js_runtime_context; } diff --git a/src/fw/process_state/app_state/app_state.h b/src/fw/process_state/app_state/app_state.h index 382c5bcc81..c5cec4a515 100644 --- a/src/fw/process_state/app_state/app_state.h +++ b/src/fw/process_state/app_state/app_state.h @@ -53,13 +53,11 @@ typedef struct TextRenderState { void *special_codepoint_handler_context; } TextRenderState; - typedef struct AppStateInitParams { ProcessAppSDKType sdk_type; int16_t obstruction_origin_y; } AppStateInitParams; - typedef struct MemorySegment MemorySegment; typedef struct JsRuntimeContext JsRuntimeContext; @@ -67,8 +65,7 @@ typedef struct JsMemoryAPIContext JsMemoryAPIContext; //! Allocate memory in the process' address space for AppState data and //! perform initial configuration. -bool app_state_configure(MemorySegment *app_state_ram, - ProcessAppSDKType sdk_type, +bool app_state_configure(MemorySegment *app_state_ram, ProcessAppSDKType sdk_type, int16_t obstruction_origin_y); //! Finish initializing AppState from within the running app task. @@ -77,7 +74,7 @@ void app_state_init(void); //! Clean up after ourselves nicely. Note that this may not be called if the app crashes. void app_state_deinit(void); -Heap* app_state_get_heap(void); +Heap *app_state_get_heap(void); AppInbox **app_state_get_app_message_inbox(void); @@ -85,23 +82,23 @@ EventServiceInfo *app_state_get_app_outbox_subscription_info(void); ApplibInternalEventsInfo *app_state_get_applib_internal_events_info(void); -AnimationState* app_state_get_animation_state(void); +AnimationState *app_state_get_animation_state(void); AppMessageCtx *app_state_get_app_message_ctx(void); -BLEAppState* app_state_get_ble_app_state(void); +BLEAppState *app_state_get_ble_app_state(void); -ClickManager* app_state_get_click_manager(void); +ClickManager *app_state_get_click_manager(void); -WindowStack* app_state_get_window_stack(void); +WindowStack *app_state_get_window_stack(void); -FrameBuffer* app_state_get_framebuffer(void); +FrameBuffer *app_state_get_framebuffer(void); -GContext* app_state_get_graphics_context(void); +GContext *app_state_get_graphics_context(void); -EventServiceInfo* app_state_get_event_service_state(void); +EventServiceInfo *app_state_get_event_service_state(void); -AccelServiceState* app_state_get_accel_state(void); +AccelServiceState *app_state_get_accel_state(void); CompassServiceConfig **app_state_get_compass_config(void); @@ -135,7 +132,8 @@ struct TouchNavState *app_state_get_touch_nav_state(void); //! master nav pref is on). Runs on the app task. void app_touch_nav_subscribe(void); -//! Unsubscribe the app task's nav dispatcher and cancel any in-flight gesture. Runs on the app task. +//! Unsubscribe the app task's nav dispatcher and cancel any in-flight gesture. Runs on the app +//! task. void app_touch_nav_unsubscribe(void); //! Re-evaluate the app twin's gate for the running app after a pref flip and install or remove the @@ -154,7 +152,7 @@ JsRuntimeContext *app_state_get_js_runtime_context(void); uint8_t *app_state_get_js_runtime_context_buffer(void); void app_state_set_js_runtime_context(uint8_t *unaligned_buffer, - JsRuntimeContext *js_runtime_context); + JsRuntimeContext *js_runtime_context); JsMemoryAPIContext *app_state_get_js_memory_api_context(void); @@ -163,7 +161,7 @@ void app_state_set_js_memory_api_context(JsMemoryAPIContext *context); bool *app_state_get_framebuffer_render_pending(); void app_state_set_user_data(void *data); -void* app_state_get_user_data(void); +void *app_state_get_user_data(void); AppFocusState *app_state_get_app_focus_state(void); @@ -174,7 +172,7 @@ AppGlance *app_state_get_glance(void); struct Layer; typedef struct Layer Layer; -Layer** app_state_get_layer_tree_stack(void); +Layer **app_state_get_layer_tree_stack(void); WakeupHandler app_state_get_wakeup_handler(void); void app_state_set_wakeup_handler(WakeupHandler handler); @@ -189,7 +187,7 @@ EventServiceInfo *app_state_get_speaker_finish_event_info(void); //! Retrieve a preallocated full screen 2bit framebuffer for use with 2.x apps that want to use the //! capture_frame_buffer API. Note this memory is only valid when used with 2.x apps. -GBitmap* app_state_legacy2_get_2bit_framebuffer(void); +GBitmap *app_state_legacy2_get_2bit_framebuffer(void); struct tm *app_state_get_gmtime_tm(void); struct tm *app_state_get_localtime_tm(void); diff --git a/src/fw/process_state/worker_state/worker_state.c b/src/fw/process_state/worker_state/worker_state.c index 99b8845771..1f55febb63 100644 --- a/src/fw/process_state/worker_state/worker_state.c +++ b/src/fw/process_state/worker_state/worker_state.c @@ -42,13 +42,12 @@ typedef struct { KERNEL_READONLY_DATA static WorkerState *s_worker_state_ptr; bool worker_state_configure(MemorySegment *worker_state_ram) { - s_worker_state_ptr = memory_segment_split(worker_state_ram, NULL, - sizeof(WorkerState)); + s_worker_state_ptr = memory_segment_split(worker_state_ram, NULL, sizeof(WorkerState)); return s_worker_state_ptr != NULL; } void worker_state_init(void) { - s_worker_state_ptr->rand_seed.mat1 = 0; // Uninitialized + s_worker_state_ptr->rand_seed.mat1 = 0; // Uninitialized accel_service_state_init(worker_state_get_accel_state()); @@ -126,8 +125,6 @@ HealthServiceState *worker_state_get_health_service_state(void) { return &s_worker_state_ptr->health_service_state; } - - // =================================================================================================== // Serial Commands #ifdef CONFIG_MALLOC_INSTRUMENTATION @@ -135,6 +132,3 @@ void command_dump_malloc_worker(void) { heap_dump_malloc_instrumentation_to_dbgserial(worker_state_get_heap()); } #endif - - - diff --git a/src/fw/resource/font_resource_table.h b/src/fw/resource/font_resource_table.h index 048fbf9513..884ea99393 100644 --- a/src/fw/resource/font_resource_table.h +++ b/src/fw/resource/font_resource_table.h @@ -1,3 +1,2 @@ /* SPDX-FileCopyrightText: 2024 Google LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - diff --git a/src/fw/resource/resource.c b/src/fw/resource/resource.c index 81bada3fa8..8f6c56ed21 100644 --- a/src/fw/resource/resource.c +++ b/src/fw/resource/resource.c @@ -53,7 +53,7 @@ static void prv_get_resource(ResAppNum app_num, uint32_t id, ResourceStoreEntry ListNode *node; if (app_num == SYSTEM_APP && - (node = list_find((ListNode *)s_resource_list, prv_resource_filter, (void *)(uintptr_t)id))) { + (node = list_find((ListNode *)s_resource_list, prv_resource_filter, (void *)(uintptr_t)id))) { pbl_mutex_unlock(&s_resource_mutex); *entry = ((CachedResource *)node)->stored_resource; return; @@ -73,7 +73,10 @@ static void prv_get_resource(ResAppNum app_num, uint32_t id, ResourceStoreEntry if (app_num != SYSTEM_APP && entry->id >= 1) { s_app_resource_cache = (AppResourceCache){ - .valid = true, .app_num = app_num, .id = id, .entry = *entry, + .valid = true, + .app_num = app_num, + .id = id, + .entry = *entry, }; } @@ -110,14 +113,14 @@ uint32_t resource_get_and_cache(ResAppNum app_num, uint32_t resource_id) { } // check if we already have something in cache for this resource - CachedResource *cached_resource = (CachedResource *)list_find((ListNode *)s_resource_list, - prv_resource_filter, (void *)(uintptr_t)resource_id); + CachedResource *cached_resource = (CachedResource *)list_find( + (ListNode *)s_resource_list, prv_resource_filter, (void *)(uintptr_t)resource_id); if (cached_resource == NULL) { cached_resource = kernel_malloc_check(sizeof(CachedResource)); *cached_resource = (CachedResource){}; cached_resource->id = resource_id; - s_resource_list = (CachedResource *)list_prepend((ListNode *)s_resource_list, - (ListNode *)cached_resource); + s_resource_list = + (CachedResource *)list_prepend((ListNode *)s_resource_list, (ListNode *)cached_resource); } cached_resource->stored_resource = res; @@ -125,8 +128,8 @@ uint32_t resource_get_and_cache(ResAppNum app_num, uint32_t resource_id) { return resource_id; } -size_t resource_load_byte_range_system(ResAppNum app_num, uint32_t resource_id, - uint32_t offset, uint8_t *buffer, size_t num_bytes) { +size_t resource_load_byte_range_system(ResAppNum app_num, uint32_t resource_id, uint32_t offset, + uint8_t *buffer, size_t num_bytes) { PBL_ASSERTN(buffer); if (!num_bytes) { @@ -150,8 +153,7 @@ size_t resource_load_byte_range_system(ResAppNum app_num, uint32_t resource_id, // We want to stop the FW from doing this, so we added an assert // but in the name of backwards compatibility, we let the app misbehave num_bytes = resource.length - offset; - PBL_LOG_DBG("Tried to read past end of resource, reading %d bytes", - (int)num_bytes); + PBL_LOG_DBG("Tried to read past end of resource, reading %d bytes", (int)num_bytes); } size_t bytes_read = resource_storage_read(&resource, offset, buffer, num_bytes); @@ -221,4 +223,3 @@ bool resource_is_valid(ResAppNum app_num, uint32_t resource_id) { bool resource_version_matches(const ResourceVersion *v1, const ResourceVersion *v2) { return (v1->crc == v2->crc); } - diff --git a/src/fw/resource/resource.h b/src/fw/resource/resource.h index cbaaaf415f..fc4ea9f6fe 100644 --- a/src/fw/resource/resource.h +++ b/src/fw/resource/resource.h @@ -23,18 +23,17 @@ typedef uint32_t ResAppNum; //! The version information baked into every binary resource pack. typedef struct PACKED { - //! The crc of the resource pack between content_start and last_used. See check_bank_crc for how this is calculated. + //! The crc of the resource pack between content_start and last_used. See check_bank_crc for how + //! this is calculated. uint32_t crc; //! Just an identifier, not actually compared to anything. uint32_t timestamp; } ResourceVersion; - //! Types used by pfs_watch_resource() typedef void (*ResourceChangedCallback)(void *data); typedef void *ResourceCallbackHandle; - // inits system resources, and sets app resources to an unloaded state void resource_init(void); @@ -84,7 +83,7 @@ bool resource_version_matches(const ResourceVersion *v1, const ResourceVersion * //! NOTE: This currently only supports file-based resources. If the resource is not //! file based, then a NULL PFSCallbackHandle will be returned. ResourceCallbackHandle resource_watch(ResAppNum app_num, uint32_t resource_id, - ResourceChangedCallback callback, void* data); + ResourceChangedCallback callback, void *data); //! Stop watching a resource. void resource_unwatch(ResourceCallbackHandle cb_handle); diff --git a/src/fw/resource/resource_storage.c b/src/fw/resource/resource_storage.c index c8380312da..5449c47408 100644 --- a/src/fw/resource/resource_storage.c +++ b/src/fw/resource/resource_storage.c @@ -114,15 +114,14 @@ static bool prv_validate_store(ResourceManifest *manifest, ResourceStoreEntry *e uint32_t calculated_crc = prv_get_crc(entry, num_bytes, 0); if (calculated_crc != manifest->version.crc) { - PBL_LOG_WRN("Resource crc mismatch for app %"PRIu32".", app_num); - PBL_LOG_WRN("0x%"PRIx32" != 0x%"PRIx32, calculated_crc, manifest->version.crc); - + PBL_LOG_WRN("Resource crc mismatch for app %" PRIu32 ".", app_num); + PBL_LOG_WRN("0x%" PRIx32 " != 0x%" PRIx32, calculated_crc, manifest->version.crc); PBL_LOG_WRN("PBL-28517: If you see this please let Brad know"); const uint32_t calculated_crc_again = prv_get_crc(entry, num_bytes, 0); - PBL_LOG_WRN("Num bytes is %"PRIu32, num_bytes); - PBL_LOG_WRN("Calculated the CRC again, got 0x%"PRIx32, calculated_crc_again); + PBL_LOG_WRN("Num bytes is %" PRIu32, num_bytes); + PBL_LOG_WRN("Calculated the CRC again, got 0x%" PRIx32, calculated_crc_again); return calculated_crc_again == manifest->version.crc; } @@ -133,8 +132,8 @@ static bool prv_validate_store(ResourceManifest *manifest, ResourceStoreEntry *e static void prv_get_store_entry(ResAppNum app_num, uint32_t resource_id, ResourceStoreEntry *entry) { *entry = (ResourceStoreEntry){ - .id = resource_id, - .length = ENTRY_LENGTH_UNSET, + .id = resource_id, + .length = ENTRY_LENGTH_UNSET, }; for (unsigned int i = 0; i < ARRAY_LENGTH(s_resource_store_impls); i++) { entry->impl = s_resource_store_impls[i]; @@ -143,16 +142,16 @@ static void prv_get_store_entry(ResAppNum app_num, uint32_t resource_id, return; } } - PBL_LOG_WRN("get_store_entry(%"PRIu32",%"PRIu32") failed to find appropriate store", - app_num, resource_id); + PBL_LOG_WRN("get_store_entry(%" PRIu32 ",%" PRIu32 ") failed to find appropriate store", app_num, + resource_id); entry->impl = NULL; } static bool prv_validate_entry(ResourceStoreEntry *entry, ResourceManifest *manifest, uint32_t resource_id) { if (entry->id > manifest->num_resources) { - PBL_LOG_DBG("Out of bound resource %"PRId32" vs %"PRId32, - entry->id, manifest->num_resources); + PBL_LOG_DBG("Out of bound resource %" PRId32 " vs %" PRId32, entry->id, + manifest->num_resources); return false; } @@ -162,15 +161,17 @@ static bool prv_validate_entry(ResourceStoreEntry *entry, ResourceManifest *mani } if (entry->id != table_entry.resource_id) { - PBL_LOG_ERR("Resource table entry for %" PRIx32 " is corrupt!" - "(%"PRIx32" != %"PRIx32")", resource_id, entry->id, table_entry.resource_id); + PBL_LOG_ERR("Resource table entry for %" PRIx32 + " is corrupt!" + "(%" PRIx32 " != %" PRIx32 ")", + resource_id, entry->id, table_entry.resource_id); return false; } const uint32_t resource_crc = prv_get_crc(entry, table_entry.length, table_entry.offset); if (resource_crc != table_entry.crc) { - PBL_LOG_DBG("Bad resource CRC for %" PRIx32 ", %" PRIx32 - " vs %" PRIx32, resource_id, resource_crc, table_entry.crc); + PBL_LOG_DBG("Bad resource CRC for %" PRIx32 ", %" PRIx32 " vs %" PRIx32, resource_id, + resource_crc, table_entry.crc); return false; } @@ -203,7 +204,7 @@ static bool prv_get_manifest_by_id(ResAppNum app_num, uint32_t resource_id, ResourceVersion resource_storage_get_version(ResAppNum app_num, uint32_t resource_id) { ResourceManifest manifest; if (!prv_get_manifest_by_id(app_num, resource_id, &manifest)) { - return (ResourceVersion) {0}; + return (ResourceVersion){0}; } return manifest.version; } @@ -257,7 +258,7 @@ void resource_storage_get_resource(ResAppNum app_num, uint32_t resource_id, } ResourceCallbackHandle resource_watch(ResAppNum app_num, uint32_t resource_id, - ResourceChangedCallback callback, void* data) { + ResourceChangedCallback callback, void *data) { ResourceStoreEntry entry; prv_get_store_entry(app_num, resource_id, &entry); if (!entry.impl) { @@ -278,7 +279,6 @@ void resource_storage_get_file_name(char *name, size_t buf_length, ResAppNum res strlen(APP_RESOURCES_FILENAME_SUFFIX)); } - void resource_storage_generic_init(void) { } @@ -291,10 +291,10 @@ bool resource_storage_generic_check(ResAppNum app_num, uint32_t resource_id, ResourceManifest manifest; prv_get_manifest(entry, &manifest); if (expected_version && !resource_version_matches(&manifest.version, expected_version)) { - PBL_LOG_DBG("expected version <%#010"PRIx32", %"PRIu32">,", - expected_version->crc, expected_version->timestamp); - PBL_LOG_DBG("got <%#010"PRIx32", %"PRIu32">,", - manifest.version.crc, manifest.version.timestamp); + PBL_LOG_DBG("expected version <%#010" PRIx32 ", %" PRIu32 ">,", expected_version->crc, + expected_version->timestamp); + PBL_LOG_DBG("got <%#010" PRIx32 ", %" PRIu32 ">,", manifest.version.crc, + manifest.version.timestamp); return false; } @@ -306,8 +306,7 @@ bool resource_storage_generic_check(ResAppNum app_num, uint32_t resource_id, if (resource_id == 0) { return (prv_validate_store(&manifest, entry, app_num)); } else if (!prv_validate_entry(entry, &manifest, resource_id)) { - PBL_LOG_WRN("Resource %"PRId32" check for App %"PRIu32" failed", - resource_id, app_num); + PBL_LOG_WRN("Resource %" PRId32 " check for App %" PRIu32 " failed", resource_id, app_num); return false; } @@ -329,8 +328,7 @@ bool resource_storage_generic_get_resource(ResourceStoreEntry *entry) { if (!prv_read_res_table_entry(&table_entry, entry, entry->id - 1)) { return false; } - if ((table_entry.resource_id != entry->id) || - (table_entry.length == 0)) { + if ((table_entry.resource_id != entry->id) || (table_entry.length == 0)) { // empty resource return false; } @@ -355,9 +353,8 @@ uint32_t resource_storage_generic_write(ResourceStoreEntry *entry, uint32_t offs ResourceCallbackHandle resource_storage_generic_watch(ResourceStoreEntry *entry, ResourceChangedCallback callback, - void* data) { - PBL_LOG_WRN("resource_watch not supported for resource type %d.", - entry->impl->type); + void *data) { + PBL_LOG_WRN("resource_watch not supported for resource type %d.", entry->impl->type); return NULL; } diff --git a/src/fw/resource/resource_storage.h b/src/fw/resource/resource_storage.h index fdb1e5bb39..d5128af23d 100644 --- a/src/fw/resource/resource_storage.h +++ b/src/fw/resource/resource_storage.h @@ -23,7 +23,7 @@ typedef enum { struct ResourceStoreImplementation; typedef struct { - uint32_t id; // Used when the store implementation needs to permute the resource_id + uint32_t id; // Used when the store implementation needs to permute the resource_id const struct ResourceStoreImplementation *impl; uint32_t offset; uint32_t length; @@ -59,7 +59,7 @@ typedef struct ResourceStoreImplementation { const uint8_t *(*readonly_bytes)(ResourceStoreEntry *entry, bool has_privileged_access); ResourceCallbackHandle (*watch)(ResourceStoreEntry *entry, ResourceChangedCallback callback, - void* data); + void *data); bool (*unwatch)(ResourceCallbackHandle cb_handle); } ResourceStoreImplementation; diff --git a/src/fw/resource/resource_storage_builtin.c b/src/fw/resource/resource_storage_builtin.c index 4d35558b88..f7b4ae8246 100644 --- a/src/fw/resource/resource_storage_builtin.c +++ b/src/fw/resource/resource_storage_builtin.c @@ -85,22 +85,22 @@ bool resource_storage_builtin_check(ResAppNum app_num, uint32_t resource_id, } const ResourceStoreImplementation g_builtin_impl = { - .type = ResourceStoreTypeBuiltIn, + .type = ResourceStoreTypeBuiltIn, - .init = resource_storage_generic_init, - .clear = resource_storage_generic_clear, - .check = resource_storage_builtin_check, + .init = resource_storage_generic_init, + .clear = resource_storage_generic_clear, + .check = resource_storage_builtin_check, - .metadata_size = resource_storage_generic_metadata_size, - .find_resource = resource_storage_builtin_find_resource, - .get_resource = resource_storage_builtin_get_resource, + .metadata_size = resource_storage_generic_metadata_size, + .find_resource = resource_storage_builtin_find_resource, + .get_resource = resource_storage_builtin_get_resource, - .get_length = resource_storage_generic_get_length, - .get_crc = resource_storage_generic_get_crc, - .write = resource_storage_generic_write, - .read = resource_storage_builtin_read, - .readonly_bytes = resource_storage_builtin_readonly_bytes, + .get_length = resource_storage_generic_get_length, + .get_crc = resource_storage_generic_get_crc, + .write = resource_storage_generic_write, + .read = resource_storage_builtin_read, + .readonly_bytes = resource_storage_builtin_readonly_bytes, - .watch = resource_storage_generic_watch, - .unwatch = resource_storage_generic_unwatch, + .watch = resource_storage_generic_watch, + .unwatch = resource_storage_generic_unwatch, }; diff --git a/src/fw/resource/resource_storage_file.c b/src/fw/resource/resource_storage_file.c index e8d2d2cc98..2fa2c50914 100644 --- a/src/fw/resource/resource_storage_file.c +++ b/src/fw/resource/resource_storage_file.c @@ -31,8 +31,8 @@ static uint32_t prv_file_common_get_crc(int fd, uint32_t num_bytes, uint32_t ent if (fd < 0) { return 0xFFFFFFFF; } - uint32_t crc = pfs_crc_calculate_file(fd, RESOURCE_STORE_METADATA_BYTES + entry_offset, - num_bytes); + uint32_t crc = + pfs_crc_calculate_file(fd, RESOURCE_STORE_METADATA_BYTES + entry_offset, num_bytes); pfs_close(fd); return crc; } @@ -71,7 +71,7 @@ static int prv_file_open_by_name(const char *name, uint8_t op_flags) { } static int prv_file_open(ResourceStoreEntry *entry, uint8_t op_flags) { - return prv_file_open_by_name(((FileResourceData *) entry->store_data)->name, op_flags); + return prv_file_open_by_name(((FileResourceData *)entry->store_data)->name, op_flags); } static uint32_t resource_storage_file_get_length(ResourceStoreEntry *entry) { @@ -117,7 +117,7 @@ static bool resource_storage_file_find_resource(ResourceStoreEntry *entry, ResAp static ResourceCallbackHandle resource_storage_file_watch(ResourceStoreEntry *entry, ResourceChangedCallback callback, - void* data) { + void *data) { const FileResourceData *file = entry->store_data; if (!file) { return NULL; @@ -149,7 +149,7 @@ static void resource_storage_file_init(void) { resource_id <= g_file_resource_stores[i].last_resource_id; resource_id++) { // TODO PBL-21402 if (!resource_storage_check(SYSTEM_APP, resource_id, NULL)) { - PBL_LOG_ERR("System resource file %"PRIu32" corrupt!!!", resource_id); + PBL_LOG_ERR("System resource file %" PRIu32 " corrupt!!!", resource_id); } const uint32_t large_file_size_threshold = 200 * 1024; @@ -164,24 +164,24 @@ static void resource_storage_file_init(void) { } const ResourceStoreImplementation g_file_impl = { - .type = ResourceStoreTypeFile, + .type = ResourceStoreTypeFile, - .init = resource_storage_file_init, - .clear = resource_storage_generic_clear, - .check = resource_storage_generic_check, + .init = resource_storage_file_init, + .clear = resource_storage_generic_clear, + .check = resource_storage_generic_check, - .metadata_size = resource_storage_generic_metadata_size, - .find_resource = resource_storage_file_find_resource, - .get_resource = resource_storage_generic_get_resource, + .metadata_size = resource_storage_generic_metadata_size, + .find_resource = resource_storage_file_find_resource, + .get_resource = resource_storage_generic_get_resource, - .get_length = resource_storage_file_get_length, - .get_crc = resource_storage_file_get_crc, - .write = resource_storage_generic_write, - .read = resource_storage_file_read, - .readonly_bytes = resource_storage_file_readonly_bytes_unsupported, + .get_length = resource_storage_file_get_length, + .get_crc = resource_storage_file_get_crc, + .write = resource_storage_generic_write, + .read = resource_storage_file_read, + .readonly_bytes = resource_storage_file_readonly_bytes_unsupported, - .watch = resource_storage_file_watch, - .unwatch = resource_storage_file_unwatch, + .watch = resource_storage_file_watch, + .unwatch = resource_storage_file_unwatch, }; /////////////////////////////////////////////////////////////////////////////// @@ -192,7 +192,7 @@ static int prv_app_file_open(ResourceStoreEntry *entry, uint8_t op_flags) { if (app_num == SYSTEM_APP) { return -1; } - char filename[APP_RESOURCE_FILENAME_MAX_LENGTH + 1]; // extra for null terminator + char filename[APP_RESOURCE_FILENAME_MAX_LENGTH + 1]; // extra for null terminator resource_storage_get_file_name(filename, sizeof(filename), app_num); int fd = pfs_open(filename, op_flags, FILE_TYPE_STATIC, 0); @@ -209,7 +209,7 @@ static bool resource_storage_app_file_find_resource(ResourceStoreEntry *entry, R return false; } // Need to cast to uintptr_t first to make test compiling on 64-bit happy - entry->store_data = (void*)(uintptr_t)app_num; + entry->store_data = (void *)(uintptr_t)app_num; return true; } @@ -218,7 +218,7 @@ static void resource_storage_app_file_clear(ResourceStoreEntry *entry) { if (app_num == SYSTEM_APP) { return; } - char filename[APP_RESOURCE_FILENAME_MAX_LENGTH + 1]; // extra for null terminator + char filename[APP_RESOURCE_FILENAME_MAX_LENGTH + 1]; // extra for null terminator resource_storage_get_file_name(filename, sizeof(filename), app_num); pfs_remove(filename); } @@ -241,22 +241,22 @@ static uint32_t resource_storage_app_file_read(ResourceStoreEntry *entry, uint32 } const ResourceStoreImplementation g_app_file_impl = { - .type = ResourceStoreTypeAppFile, + .type = ResourceStoreTypeAppFile, - .init = resource_storage_generic_init, - .clear = resource_storage_app_file_clear, - .check = resource_storage_generic_check, + .init = resource_storage_generic_init, + .clear = resource_storage_app_file_clear, + .check = resource_storage_generic_check, - .metadata_size = resource_storage_generic_metadata_size, - .find_resource = resource_storage_app_file_find_resource, - .get_resource = resource_storage_generic_get_resource, + .metadata_size = resource_storage_generic_metadata_size, + .find_resource = resource_storage_app_file_find_resource, + .get_resource = resource_storage_generic_get_resource, - .get_length = resource_storage_app_file_get_length, - .get_crc = resource_storage_app_file_get_crc, - .write = resource_storage_generic_write, - .read = resource_storage_app_file_read, - .readonly_bytes = resource_storage_file_readonly_bytes_unsupported, + .get_length = resource_storage_app_file_get_length, + .get_crc = resource_storage_app_file_get_crc, + .write = resource_storage_generic_write, + .read = resource_storage_app_file_read, + .readonly_bytes = resource_storage_file_readonly_bytes_unsupported, - .watch = resource_storage_generic_watch, - .unwatch = resource_storage_generic_unwatch, + .watch = resource_storage_generic_watch, + .unwatch = resource_storage_generic_unwatch, }; diff --git a/src/fw/resource/resource_storage_flash.c b/src/fw/resource/resource_storage_flash.c index fa64fdcc83..1a5428ef33 100644 --- a/src/fw/resource/resource_storage_flash.c +++ b/src/fw/resource/resource_storage_flash.c @@ -14,14 +14,14 @@ #include static const SystemResourceBank s_resource_banks[] = { - { - .begin = FLASH_REGION_SYSTEM_RESOURCES_BANK_0_BEGIN, - .end = FLASH_REGION_SYSTEM_RESOURCES_BANK_0_END, - }, - { - .begin = FLASH_REGION_SYSTEM_RESOURCES_BANK_1_BEGIN, - .end = FLASH_REGION_SYSTEM_RESOURCES_BANK_1_END, - }, + { + .begin = FLASH_REGION_SYSTEM_RESOURCES_BANK_0_BEGIN, + .end = FLASH_REGION_SYSTEM_RESOURCES_BANK_0_END, + }, + { + .begin = FLASH_REGION_SYSTEM_RESOURCES_BANK_1_BEGIN, + .end = FLASH_REGION_SYSTEM_RESOURCES_BANK_1_END, + }, }; //! Index into s_resource_banks @@ -38,9 +38,9 @@ static void resource_storage_system_bank_init(void) { boot_bit_clear(BOOT_BIT_NEW_SYSTEM_RESOURCES_AVAILABLE); ResourceStoreEntry entry = { - .id = 0, // resource id 0 means the store itself - .impl = &g_system_bank_impl, - .length = ENTRY_LENGTH_UNSET + .id = 0, // resource id 0 means the store itself + .impl = &g_system_bank_impl, + .length = ENTRY_LENGTH_UNSET }; // Increment s_active_bank and call resource_storage_generic_check for each value to find @@ -88,8 +88,7 @@ static uint32_t resource_storage_system_bank_metadata_size(ResourceStoreEntry *e static uint32_t resource_storage_system_bank_get_crc(ResourceStoreEntry *entry, uint32_t num_bytes, uint32_t entry_offset) { uint32_t start_offset = resource_store_get_metadata_size(entry) + entry_offset; - return flash_calculate_legacy_defective_checksum( - BANK.begin + start_offset, num_bytes); + return flash_calculate_legacy_defective_checksum(BANK.begin + start_offset, num_bytes); } static uint32_t resource_storage_system_bank_read(ResourceStoreEntry *entry, uint32_t offset, @@ -130,7 +129,6 @@ static void resource_storage_system_bank_clear(ResourceStoreEntry *entry) { flash_write_bytes(buffer, BANK.begin, MANIFEST_SIZE); } - bool resource_storage_system_bank_check(ResAppNum app_num, uint32_t resource_id, ResourceStoreEntry *entry, const ResourceVersion *expected_version) { @@ -149,28 +147,28 @@ bool resource_storage_system_bank_check(ResAppNum app_num, uint32_t resource_id, return resource_storage_generic_check(app_num, resource_id, entry, expected_version); } -static bool resource_storage_system_bank_find_resource(ResourceStoreEntry *entry, - ResAppNum app_num, uint32_t resource_id) { +static bool resource_storage_system_bank_find_resource(ResourceStoreEntry *entry, ResAppNum app_num, + uint32_t resource_id) { return app_num == SYSTEM_APP && s_valid_resources_found; } const ResourceStoreImplementation g_system_bank_impl = { - .type = ResourceStoreTypeSystemBank, + .type = ResourceStoreTypeSystemBank, - .init = resource_storage_system_bank_init, - .clear = resource_storage_system_bank_clear, - .check = resource_storage_system_bank_check, + .init = resource_storage_system_bank_init, + .clear = resource_storage_system_bank_clear, + .check = resource_storage_system_bank_check, - .metadata_size = resource_storage_system_bank_metadata_size, - .find_resource = resource_storage_system_bank_find_resource, - .get_resource = resource_storage_generic_get_resource, + .metadata_size = resource_storage_system_bank_metadata_size, + .find_resource = resource_storage_system_bank_find_resource, + .get_resource = resource_storage_generic_get_resource, - .get_length = resource_storage_generic_get_length, - .get_crc = resource_storage_system_bank_get_crc, - .write = resource_storage_generic_write, - .read = resource_storage_system_bank_read, - .readonly_bytes = resource_storage_system_bank_readonly_bytes, + .get_length = resource_storage_generic_get_length, + .get_crc = resource_storage_system_bank_get_crc, + .write = resource_storage_generic_write, + .read = resource_storage_system_bank_read, + .readonly_bytes = resource_storage_system_bank_readonly_bytes, - .watch = resource_storage_generic_watch, - .unwatch = resource_storage_generic_unwatch, + .watch = resource_storage_generic_watch, + .unwatch = resource_storage_generic_unwatch, }; diff --git a/src/fw/resource/resource_storage_impl.h b/src/fw/resource/resource_storage_impl.h index 657ce8242e..fac9653d92 100644 --- a/src/fw/resource/resource_storage_impl.h +++ b/src/fw/resource/resource_storage_impl.h @@ -47,10 +47,9 @@ typedef struct PACKED { #define MAX_RESOURCES_FOR_SYSTEM_STORE 768 #define MANIFEST_SIZE (sizeof(ResourceManifest)) #define TABLE_ENTRY_SIZE (sizeof(ResTableEntry)) -#define RESOURCE_STORE_METADATA_BYTES \ - (MANIFEST_SIZE + MAX_RESOURCES_PER_STORE * TABLE_ENTRY_SIZE) +#define RESOURCE_STORE_METADATA_BYTES (MANIFEST_SIZE + MAX_RESOURCES_PER_STORE * TABLE_ENTRY_SIZE) #define SYSTEM_STORE_METADATA_BYTES \ - (MANIFEST_SIZE + MAX_RESOURCES_FOR_SYSTEM_STORE * TABLE_ENTRY_SIZE) + (MANIFEST_SIZE + MAX_RESOURCES_FOR_SYSTEM_STORE * TABLE_ENTRY_SIZE) void resource_storage_generic_init(void); void resource_storage_generic_clear(ResourceStoreEntry *entry); @@ -65,8 +64,7 @@ uint32_t resource_storage_generic_get_crc(ResourceStoreEntry *entry, uint32_t nu uint32_t resource_storage_generic_write(ResourceStoreEntry *entry, uint32_t offset, void *data, size_t num_bytes); ResourceCallbackHandle resource_storage_generic_watch(ResourceStoreEntry *entry, - ResourceChangedCallback callback, - void* data); + ResourceChangedCallback callback, void *data); bool resource_storage_generic_unwatch(ResourceCallbackHandle cb_handle); #define RESOURCE_IMPL(impl) extern const ResourceStoreImplementation impl; diff --git a/src/fw/resource/resource_syscalls.c b/src/fw/resource/resource_syscalls.c index 75b74e7e79..1462d3a193 100644 --- a/src/fw/resource/resource_syscalls.c +++ b/src/fw/resource/resource_syscalls.c @@ -21,9 +21,8 @@ DEFINE_SYSCALL(size_t, sys_resource_size, ResAppNum app_num, uint32_t resource_i return resource_size(app_num, resource_id); } -DEFINE_SYSCALL(size_t, sys_resource_load_range, ResAppNum app_num, - uint32_t id, uint32_t start_offset, uint8_t *data, size_t num_bytes) { - +DEFINE_SYSCALL(size_t, sys_resource_load_range, ResAppNum app_num, uint32_t id, + uint32_t start_offset, uint8_t *data, size_t num_bytes) { if (PRIVILEGE_WAS_ELEVATED) { if (pebble_task_get_current() == PebbleTask_Worker) { // Not allowed from workers @@ -40,8 +39,8 @@ DEFINE_SYSCALL(bool, sys_resource_bytes_are_readonly, void *ptr) { return resource_bytes_are_readonly(ptr); } -DEFINE_SYSCALL(const uint8_t *, sys_resource_read_only_bytes, ResAppNum app_num, uint32_t - resource_id, size_t *num_bytes_out) { +DEFINE_SYSCALL(const uint8_t *, sys_resource_read_only_bytes, ResAppNum app_num, + uint32_t resource_id, size_t *num_bytes_out) { bool caller_is_privileged = true; if (PRIVILEGE_WAS_ELEVATED) { caller_is_privileged = false; diff --git a/src/fw/resource/system_resource.c b/src/fw/resource/system_resource.c index 026b15fe7a..ea5eb3a027 100644 --- a/src/fw/resource/system_resource.c +++ b/src/fw/resource/system_resource.c @@ -26,7 +26,7 @@ void system_resource_init(void) { #if defined(CONFIG_IS_BIGBOARD) static const uint32_t ERROR_BAD_RESOURCES = 0xfe504505; pbl_log(LOG_LEVEL_ERROR, __FILE_NAME__, __LINE__, - "System resources are missing or corrupt, time to sad watch"); + "System resources are missing or corrupt, time to sad watch"); launcher_panic(ERROR_BAD_RESOURCES); #else PBL_LOG_ERR("System resources are missing or corrupt! Going to PRF"); @@ -50,20 +50,20 @@ static GFont prv_load_system_font(const char *font_key) { // load fallback font if (!s_system_fonts_info_table[NUM_SYSTEM_FONTS].loaded) { PBL_ASSERTN(text_resources_init_font(SYSTEM_APP, RESOURCE_ID_FONT_FALLBACK_INTERNAL, 0, - &s_system_fonts_info_table[NUM_SYSTEM_FONTS])); + &s_system_fonts_info_table[NUM_SYSTEM_FONTS])); } return &s_system_fonts_info_table[NUM_SYSTEM_FONTS]; } - for (int i = 0; i < (int) NUM_SYSTEM_FONTS; ++i) { + for (int i = 0; i < (int)NUM_SYSTEM_FONTS; ++i) { if (0 == strcmp(font_key, s_font_resource_keys[i].key_name)) { FontInfo *fontinfo = &s_system_fonts_info_table[i]; uint32_t resource = s_font_resource_keys[i].resource_id; uint32_t extension = s_font_resource_keys[i].extension_id; // if the font has not been initialized yet if (!fontinfo->loaded) { - if (!text_resources_init_font(SYSTEM_APP, - resource, extension, &s_system_fonts_info_table[i])) { + if (!text_resources_init_font(SYSTEM_APP, resource, extension, + &s_system_fonts_info_table[i])) { // Can't initialize the font for some reason return NULL; } @@ -103,6 +103,5 @@ DEFINE_SYSCALL(void, sys_font_reload_font, FontInfo *fontinfo) { } text_resources_init_font(fontinfo->base.app_num, fontinfo->base.resource_id, - fontinfo->extension.resource_id, fontinfo); + fontinfo->extension.resource_id, fontinfo); } - diff --git a/src/fw/resource/system_resource.h b/src/fw/resource/system_resource.h index 7b5d83df5c..ba54f9a6b7 100644 --- a/src/fw/resource/system_resource.h +++ b/src/fw/resource/system_resource.h @@ -10,4 +10,3 @@ void system_resource_init(void); bool system_resource_is_valid(void); GFont system_resource_get_font(const char *font_key); - diff --git a/src/fw/services/accel_manager/service.c b/src/fw/services/accel_manager/service.c index 715984fcc7..7c6c1fa715 100644 --- a/src/fw/services/accel_manager/service.c +++ b/src/fw/services/accel_manager/service.c @@ -35,7 +35,7 @@ typedef void (*ProcessDataHandler)(CallbackEventCallback *cb, void *data); // We create one of these for each data service subscriber typedef struct AccelManagerState { - ListNode list_node; // Entry into the s_data_subscribers linked list + ListNode list_node; // Entry into the s_data_subscribers linked list //! Client pointing into s_buffer SubsampledSharedCircularBufferClient buffer_client; @@ -47,12 +47,12 @@ typedef struct AccelManagerState { //! Which task we should call the data_cb_handler on PebbleTask task; CallbackEventCallback data_cb_handler; - void* data_cb_context; + void *data_cb_context; - uint64_t timestamp_ms; // timestamp of first item in the buffer - AccelRawData *raw_buffer; // raw buffer allocated by subscriber - uint8_t num_samples; // number of samples in raw_buffer - bool event_posted; // True if we've posted a "data ready" callback event + uint64_t timestamp_ms; // timestamp of first item in the buffer + AccelRawData *raw_buffer; // raw buffer allocated by subscriber + uint8_t num_samples; // number of samples in raw_buffer + bool event_posted; // True if we've posted a "data ready" callback event } AccelManagerState; typedef struct { @@ -62,7 +62,7 @@ typedef struct { uint16_t timestamp_delta_ms; } AccelManagerBufferData; _Static_assert(offsetof(AccelManagerBufferData, rawdata) == 0, - "AccelRawData must be first entry in AccelManagerBufferData struct"); + "AccelRawData must be first entry in AccelManagerBufferData struct"); // Statics //! List of all registered consumers of accel data. Points to AccelManagerState objects. @@ -200,14 +200,14 @@ static void prv_setup_subsampling(uint32_t sampling_interval) { // Setup the subsampling numerator and denominators AccelManagerState *state = (AccelManagerState *)s_data_subscribers; while (state) { - uint32_t interval_gcd = gcd(sampling_interval, - state->sampling_interval_us); + uint32_t interval_gcd = gcd(sampling_interval, state->sampling_interval_us); // Protect against divide-by-zero if gcd returns 0 (when either input is 0) // This can happen if the accelerometer driver is not initialized properly if (interval_gcd == 0) { - PBL_LOG_ERR("Invalid sampling interval (sampling_interval=%" PRIu32 ", state->sampling_interval_us=%" PRIu32 "), skipping session %p", - sampling_interval, state->sampling_interval_us, state); + PBL_LOG_ERR("Invalid sampling interval (sampling_interval=%" PRIu32 + ", state->sampling_interval_us=%" PRIu32 "), skipping session %p", + sampling_interval, state->sampling_interval_us, state); state = (AccelManagerState *)state->list_node.next; continue; } @@ -215,10 +215,10 @@ static void prv_setup_subsampling(uint32_t sampling_interval) { uint32_t numerator = sampling_interval / interval_gcd; uint32_t denominator = state->sampling_interval_us / interval_gcd; - PBL_LOG_DBG("set subsampling for session %p to %" PRIu32 "/%" PRIu32, - state, numerator, denominator); - subsampled_shared_circular_buffer_client_set_ratio( - &state->buffer_client, numerator, denominator); + PBL_LOG_DBG("set subsampling for session %p to %" PRIu32 "/%" PRIu32, state, numerator, + denominator); + subsampled_shared_circular_buffer_client_set_ratio(&state->buffer_client, numerator, + denominator); state = (AccelManagerState *)state->list_node.next; } } @@ -239,8 +239,8 @@ static void prv_update_driver_config(void) { prv_setup_subsampling(interval_us); - PBL_LOG_DBG("setting accel rate:%"PRIu32", num_samples:%"PRIu32, - US_PER_SECOND / interval_us, max_batch); + PBL_LOG_DBG("setting accel rate:%" PRIu32 ", num_samples:%" PRIu32, US_PER_SECOND / interval_us, + max_batch); accel_set_num_samples(max_batch); } @@ -251,11 +251,11 @@ static bool prv_call_data_callback(AccelManagerState *state) { case PebbleTask_Worker: case PebbleTask_KernelMain: { PebbleEvent event = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = state->data_cb_handler, - .data = state->data_cb_context, - }, + .type = PEBBLE_CALLBACK_EVENT, + .callback = { + .callback = state->data_cb_handler, + .data = state->data_cb_context, + }, }; struct pbl_msgq *queue = pebble_task_get_to_queue(state->task); @@ -268,7 +268,7 @@ static bool prv_call_data_callback(AccelManagerState *state) { case PebbleTask_NewTimers: return new_timer_add_work_callback(state->data_cb_handler, state->data_cb_context); default: - WTF; // Unsupported task for the accel manager + WTF; // Unsupported task for the accel manager } } @@ -280,7 +280,7 @@ static bool prv_call_data_callback(AccelManagerState *state) { static void prv_dispatch_data(bool post_event) { pbl_mutex_lock(&s_accel_manager_mutex, PBL_FOREVER); - AccelManagerState * state = (AccelManagerState *)s_data_subscribers; + AccelManagerState *state = (AccelManagerState *)s_data_subscribers; while (state) { if (!state->raw_buffer) { state = (AccelManagerState *)state->list_node.next; @@ -291,8 +291,7 @@ static void prv_dispatch_data(bool post_event) { if (state->samples_per_update == 0) { uint16_t len = shared_circular_buffer_get_read_space_remaining( &s_buffer, &state->buffer_client.buffer_client); - shared_circular_buffer_consume( - &s_buffer, &state->buffer_client.buffer_client, len); + shared_circular_buffer_consume(&s_buffer, &state->buffer_client.buffer_client, len); state = (AccelManagerState *)state->list_node.next; continue; } @@ -302,8 +301,8 @@ static void prv_dispatch_data(bool post_event) { while (state->num_samples < state->samples_per_update) { // Read available data. AccelManagerBufferData data; - if (!shared_circular_buffer_read_subsampled( - &s_buffer, &state->buffer_client, sizeof(data), &data, 1)) { + if (!shared_circular_buffer_read_subsampled(&s_buffer, &state->buffer_client, sizeof(data), + &data, 1)) { // we have drained all available samples break; } @@ -319,22 +318,20 @@ static void prv_dispatch_data(bool post_event) { state->timestamp_ms = s_last_empty_timestamp_ms + data.timestamp_delta_ms; } - memcpy(state->raw_buffer + state->num_samples, &data, - sizeof(AccelRawData)); - state->num_samples++; - samples_drained++; + memcpy(state->raw_buffer + state->num_samples, &data, sizeof(AccelRawData)); + state->num_samples++; + samples_drained++; } // If buffer is full, notify subscriber to process it - if (post_event && !state->event_posted && - state->num_samples >= state->samples_per_update) { + if (post_event && !state->event_posted && state->num_samples >= state->samples_per_update) { // Notify the subscriber that data is available state->event_posted = prv_call_data_callback(state); PBL_LOG_VERBOSE("full set of %d samples for session %p", state->num_samples, state); if (!state->event_posted) { - PBL_LOG_ERR("Failed to post accel event to task: 0x%x", (int) state->task); + PBL_LOG_ERR("Failed to post accel event to task: 0x%x", (int)state->task); } } state = (AccelManagerState *)state->list_node.next; @@ -375,44 +372,42 @@ void accel_manager_update_sensitivity(uint8_t sensitivity_percent) { // - Higher threshold = less sensitive (requires larger movements to trigger) // // We'll map the user's percentage to a threshold multiplier: - // - 100% (most sensitive) = use Low threshold + // - 100% (most sensitive) = use Low threshold // - 50% (medium) = use mid-range // - 0% (least sensitive) = use High threshold - + pbl_mutex_lock(&s_accel_manager_mutex, PBL_FOREVER); accel_set_shake_sensitivity_percent(sensitivity_percent); - pbl_mutex_unlock(&s_accel_manager_mutex); + pbl_mutex_unlock(&s_accel_manager_mutex); } void accel_manager_init(void) { - - shared_circular_buffer_init(&s_buffer, s_buffer_storage, - sizeof(s_buffer_storage)); + shared_circular_buffer_init(&s_buffer, s_buffer_storage, sizeof(s_buffer_storage)); event_service_init(PEBBLE_ACCEL_SHAKE_EVENT, &prv_shake_add_subscriber_cb, - &prv_shake_remove_subscriber_cb); + &prv_shake_remove_subscriber_cb); event_service_init(PEBBLE_ACCEL_DOUBLE_TAP_EVENT, &prv_double_tap_add_subscriber_cb, - &prv_double_tap_remove_subscriber_cb); + &prv_double_tap_remove_subscriber_cb); - // Apply saved motion sensitivity preference for Asterix/Obelix - // Only available in normal shell (not PRF) - #if defined(CONFIG_ACCEL_SENSITIVITY) && !defined(CONFIG_RECOVERY_FW) +// Apply saved motion sensitivity preference for Asterix/Obelix +// Only available in normal shell (not PRF) +#if defined(CONFIG_ACCEL_SENSITIVITY) && !defined(CONFIG_RECOVERY_FW) extern uint8_t shell_prefs_get_motion_sensitivity(void); uint8_t saved_sensitivity = shell_prefs_get_motion_sensitivity(); accel_manager_update_sensitivity(saved_sensitivity); PBL_LOG_DBG("Initialized motion sensitivity to %u percent", saved_sensitivity); - #endif +#endif } static void prv_copy_accel_sample_to_accel_data(AccelDriverSample const *accel_sample, AccelData *accel_data) { - *accel_data = (AccelData) { - .x = accel_sample->x, - .y = accel_sample->y, - .z = accel_sample->z, - .timestamp /* ms */ = (accel_sample->timestamp_us / 1000), - .did_vibrate = (sys_vibe_get_vibe_strength() != VIBE_STRENGTH_OFF) + *accel_data = (AccelData){ + .x = accel_sample->x, + .y = accel_sample->y, + .z = accel_sample->z, + .timestamp /* ms */ = (accel_sample->timestamp_us / 1000), + .did_vibrate = (sys_vibe_get_vibe_strength() != VIBE_STRENGTH_OFF) }; } @@ -441,9 +436,8 @@ DEFINE_SYSCALL(int, sys_accel_manager_peek, AccelData *accel_data) { return result; } -DEFINE_SYSCALL(AccelManagerState*, sys_accel_manager_data_subscribe, - AccelSamplingRate rate, AccelDataReadyCallback data_cb, void* context, - PebbleTask handler_task) { +DEFINE_SYSCALL(AccelManagerState *, sys_accel_manager_data_subscribe, AccelSamplingRate rate, + AccelDataReadyCallback data_cb, void *context, PebbleTask handler_task) { AccelManagerState *state; // `handler_task` decides where prv_call_data_callback() dispatches the @@ -463,12 +457,12 @@ DEFINE_SYSCALL(AccelManagerState*, sys_accel_manager_data_subscribe, pbl_mutex_lock(&s_accel_manager_mutex, PBL_FOREVER); { state = kernel_malloc_check(sizeof(AccelManagerState)); - *state = (AccelManagerState) { - .task = handler_task, - .data_cb_handler = data_cb, - .data_cb_context = context, - .sampling_interval_us = (US_PER_SECOND / rate), - .samples_per_update = accel_get_max_num_samples(), + *state = (AccelManagerState){ + .task = handler_task, + .data_cb_handler = data_cb, + .data_cb_context = context, + .sampling_interval_us = (US_PER_SECOND / rate), + .samples_per_update = accel_get_max_num_samples(), }; bool no_subscribers_before = (s_data_subscribers == NULL); @@ -478,8 +472,7 @@ DEFINE_SYSCALL(AccelManagerState*, sys_accel_manager_data_subscribe, } // Add as a consumer to the accel buffer - shared_circular_buffer_add_subsampled_client( - &s_buffer, &state->buffer_client, 1, 1); + shared_circular_buffer_add_subsampled_client(&s_buffer, &state->buffer_client, 1, 1); // Update the sampling rate and num samples of the driver considering the new // subscriber's request @@ -528,8 +521,7 @@ DEFINE_SYSCALL(bool, sys_accel_manager_data_unsubscribe, AccelManagerState *stat { event_outstanding = state->event_posted; // Remove this subscriber and free up its state variables - shared_circular_buffer_remove_subsampled_client( - &s_buffer, &state->buffer_client); + shared_circular_buffer_remove_subsampled_client(&s_buffer, &state->buffer_client); list_remove(&state->list_node, &s_data_subscribers /* &head */, NULL /* &tail */); kernel_free(state); @@ -545,8 +537,8 @@ DEFINE_SYSCALL(bool, sys_accel_manager_data_unsubscribe, AccelManagerState *stat return event_outstanding; } -DEFINE_SYSCALL(int, sys_accel_manager_set_sampling_rate, - AccelManagerState *state, AccelSamplingRate rate) { +DEFINE_SYSCALL(int, sys_accel_manager_set_sampling_rate, AccelManagerState *state, + AccelSamplingRate rate) { prv_assert_state_from_user(state); // Make sure the rate is one of our externally supported fixed rates @@ -591,8 +583,8 @@ uint32_t accel_manager_set_jitterfree_sampling_rate(AccelManagerState *state, return ONLY_SUPPORTED_JITTERFREE_RATE_MILLIHZ; } -DEFINE_SYSCALL(int, sys_accel_manager_set_sample_buffer, - AccelManagerState *state, AccelRawData *buffer, uint32_t samples_per_update) { +DEFINE_SYSCALL(int, sys_accel_manager_set_sample_buffer, AccelManagerState *state, + AccelRawData *buffer, uint32_t samples_per_update) { prv_assert_state_from_user(state); if (samples_per_update > accel_get_max_num_samples()) { return -1; @@ -618,8 +610,8 @@ DEFINE_SYSCALL(uint32_t, sys_accel_manager_get_max_samples_per_update, void) { return accel_get_max_num_samples(); } -DEFINE_SYSCALL(uint32_t, sys_accel_manager_get_num_samples, - AccelManagerState *state, uint64_t *timestamp_ms) { +DEFINE_SYSCALL(uint32_t, sys_accel_manager_get_num_samples, AccelManagerState *state, + uint64_t *timestamp_ms) { prv_assert_state_from_user(state); if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(timestamp_ms, sizeof(*timestamp_ms)); @@ -634,15 +626,15 @@ DEFINE_SYSCALL(uint32_t, sys_accel_manager_get_num_samples, return result; } -DEFINE_SYSCALL(bool, sys_accel_manager_consume_samples, - AccelManagerState *state, uint32_t samples) { +DEFINE_SYSCALL(bool, sys_accel_manager_consume_samples, AccelManagerState *state, + uint32_t samples) { prv_assert_state_from_user(state); bool success = true; pbl_mutex_lock(&s_accel_manager_mutex, PBL_FOREVER); if (samples > state->num_samples) { - PBL_LOG_ERR("Consuming more samples than exist %d vs %d!", - (int)samples, (int)state->num_samples); + PBL_LOG_ERR("Consuming more samples than exist %d vs %d!", (int)samples, + (int)state->num_samples); success = false; } else if (samples != state->num_samples) { PBL_LOG_DBG("Dropping %d accel samples", (int)(state->num_samples - samples)); @@ -683,15 +675,16 @@ void accel_manager_enable(bool on) { pbl_mutex_unlock(&s_accel_manager_mutex); } -void accel_manager_exit_low_power_mode(void) { } +void accel_manager_exit_low_power_mode(void) { +} // Return true if we are "idle", defined as seeing no movement in the last hour. bool accel_is_idle(void) { // It was idle recently, see if it's still idle. Note we avoid reading the accel hardware // again here to keep this call as lightweight as possible. Instead we are just comparing the last // read value with the value last captured by analytics (which does so on an hourly heartbeat). - return (prv_compute_delta_pos(&s_last_accel_data, &s_last_analytics_position) - < ACCEL_MAX_IDLE_DELTA); + return (prv_compute_delta_pos(&s_last_accel_data, &s_last_analytics_position) < + ACCEL_MAX_IDLE_DELTA); } // The accelerometer should issue a shake/tap event with any slight movements when stationary. @@ -736,7 +729,7 @@ void accel_cb_new_sample(AccelDriverSample const *data) { PBL_ANALYTICS_ADD(accel_sample_count, 1); if (!s_buffer.clients) { - return; // no clients so don't buffer any data + return; // no clients so don't buffer any data } AccelManagerBufferData accel_buffer_data; @@ -750,8 +743,7 @@ void accel_cb_new_sample(AccelDriverSample const *data) { // Note: the delta value overflows if the s_buffer is not drained for ~65s, // but there should be more than enough time for it to drain in that window - accel_buffer_data.timestamp_delta_ms = ((data->timestamp_us / 1000) - - s_last_empty_timestamp_ms); + accel_buffer_data.timestamp_delta_ms = ((data->timestamp_us / 1000) - s_last_empty_timestamp_ms); // if we have one or more clients who fell behind reading out of the buffer, // we will advance them until there is enough space available for the new data @@ -783,18 +775,18 @@ void accel_cb_new_samples(AccelRawBatch const *batch) { // The most recent sample is the last one in the batch. const uint8_t *last = batch->data + (batch->num_samples - 1) * batch->stride; AccelDriverSample last_sample = { - .x = prv_scale_raw_axis(last, batch, AXIS_X), - .y = prv_scale_raw_axis(last, batch, AXIS_Y), - .z = prv_scale_raw_axis(last, batch, AXIS_Z), - .timestamp_us = batch->first_timestamp_us + - (uint64_t)(batch->num_samples - 1) * batch->sampling_interval_us, + .x = prv_scale_raw_axis(last, batch, AXIS_X), + .y = prv_scale_raw_axis(last, batch, AXIS_Y), + .z = prv_scale_raw_axis(last, batch, AXIS_Z), + .timestamp_us = batch->first_timestamp_us + + (uint64_t)(batch->num_samples - 1) * batch->sampling_interval_us, }; prv_update_last_accel_data(&last_sample); PBL_ANALYTICS_ADD(accel_sample_count, batch->num_samples); if (!s_buffer.clients) { - return; // no clients so don't buffer any data + return; // no clients so don't buffer any data } if (prv_shared_buffer_empty()) { @@ -810,8 +802,8 @@ void accel_cb_new_samples(AccelRawBatch const *batch) { &seg1, &seg1_length, &seg2); if (!rv) { PBL_LOG_WRN("Accel subscriber fell behind, truncating data"); - rv = shared_circular_buffer_write_reserve(&s_buffer, total, true /*advance_slackers*/, - &seg1, &seg1_length, &seg2); + rv = shared_circular_buffer_write_reserve(&s_buffer, total, true /*advance_slackers*/, &seg1, + &seg1_length, &seg2); } PBL_ASSERTN(rv); @@ -824,8 +816,7 @@ void accel_cb_new_samples(AccelRawBatch const *batch) { dst = (AccelManagerBufferData *)seg2; } const uint8_t *s = batch->data + i * batch->stride; - uint64_t ts_ms = (batch->first_timestamp_us + - (uint64_t)i * batch->sampling_interval_us) / 1000; + uint64_t ts_ms = (batch->first_timestamp_us + (uint64_t)i * batch->sampling_interval_us) / 1000; dst->rawdata.x = prv_scale_raw_axis(s, batch, AXIS_X); dst->rawdata.y = prv_scale_raw_axis(s, batch, AXIS_Y); dst->rawdata.z = prv_scale_raw_axis(s, batch, AXIS_Z); @@ -877,11 +868,11 @@ void accel_cb_shake_detected(IMUCoordinateAxis axis, int32_t direction) { #endif PebbleEvent e = { - .type = PEBBLE_ACCEL_SHAKE_EVENT, - .accel_tap = { - .axis = axis, - .direction = direction, - }, + .type = PEBBLE_ACCEL_SHAKE_EVENT, + .accel_tap = { + .axis = axis, + .direction = direction, + }, }; event_put(&e); @@ -900,11 +891,11 @@ void accel_cb_double_tap_detected(IMUCoordinateAxis axis, int32_t direction) { } PebbleEvent e = { - .type = PEBBLE_ACCEL_DOUBLE_TAP_EVENT, - .accel_tap = { - .axis = axis, - .direction = direction, - }, + .type = PEBBLE_ACCEL_DOUBLE_TAP_EVENT, + .accel_tap = { + .axis = axis, + .direction = direction, + }, }; event_put(&e); @@ -938,9 +929,9 @@ void command_accel_peek(void) { PBL_LOG_DBG("result: %d", result); char buffer[20]; - prompt_send_response_fmt(buffer, sizeof(buffer), "X: %"PRId16, data.x); - prompt_send_response_fmt(buffer, sizeof(buffer), "Y: %"PRId16, data.y); - prompt_send_response_fmt(buffer, sizeof(buffer), "Z: %"PRId16, data.z); + prompt_send_response_fmt(buffer, sizeof(buffer), "X: %" PRId16, data.x); + prompt_send_response_fmt(buffer, sizeof(buffer), "Y: %" PRId16, data.y); + prompt_send_response_fmt(buffer, sizeof(buffer), "Z: %" PRId16, data.z); } void command_accel_num_samples(char *num_samples) { diff --git a/src/fw/services/activity/activity.c b/src/fw/services/activity/activity.c index 3f85c40274..156b0e529a 100644 --- a/src/fw/services/activity/activity.c +++ b/src/fw/services/activity/activity.c @@ -107,10 +107,10 @@ static void prv_heart_rate_subscription_update(uint32_t now_ts) { // - We get ACTIVITY_MIN_NUM_GOOD_SAMPLES_SHORT_CIRCUIT good quality samples // - We get ACTIVITY_MIN_NUM_EXCELLENT_SAMPLES_SHORT_CIRCUIT excellent quality samples const uint32_t turn_off_at = last_toggled_ts + ACTIVITY_DEFAULT_HR_ON_TIME_SEC; - const bool good_samples_req_met = - (s_activity_state.hr.num_good_quality_samples >= ACTIVITY_MIN_NUM_GOOD_SAMPLES_SHORT_CIRCUIT); - const bool excellent_samples_req_met = - (s_activity_state.hr.num_excellent_samples >= ACTIVITY_MIN_NUM_EXCELLENT_SAMPLES_SHORT_CIRCUIT); + const bool good_samples_req_met = (s_activity_state.hr.num_good_quality_samples >= + ACTIVITY_MIN_NUM_GOOD_SAMPLES_SHORT_CIRCUIT); + const bool excellent_samples_req_met = (s_activity_state.hr.num_excellent_samples >= + ACTIVITY_MIN_NUM_EXCELLENT_SAMPLES_SHORT_CIRCUIT); if ((turn_off_at <= now_ts) || good_samples_req_met || excellent_samples_req_met) { should_toggle = true; } @@ -135,28 +135,28 @@ static void prv_heart_rate_subscription_update(uint32_t now_ts) { // Pick the subscription rate (essentially ON and OFF) const uint32_t desired_interval_sec = (should_be_sampling) - ? ACTIVITY_HRM_SUBSCRIPTION_ON_PERIOD_SEC - : ACTIVITY_HRM_SUBSCRIPTION_OFF_PERIOD_SEC; + ? ACTIVITY_HRM_SUBSCRIPTION_ON_PERIOD_SEC + : ACTIVITY_HRM_SUBSCRIPTION_OFF_PERIOD_SEC; bool success = sys_hrm_manager_set_update_interval(s_activity_state.hr.hrm_session, - desired_interval_sec , 0 /*expire_sec*/); + desired_interval_sec, 0 /*expire_sec*/); PBL_ASSERTN(success); // Update history s_activity_state.hr.currently_sampling = should_be_sampling; s_activity_state.hr.toggled_sampling_at_ts = now_ts; - PBL_LOG_DBG("Changed HR sampling period to %"PRIu32" sec", desired_interval_sec); + PBL_LOG_DBG("Changed HR sampling period to %" PRIu32 " sec", desired_interval_sec); } -#endif // CONFIG_HRM +#endif // CONFIG_HRM } // ------------------------------------------------------------------------------------------------ // Kernel BG callback called by the Heart Rate Manager when new data arrives #ifdef CONFIG_HRM T_STATIC void prv_hrm_subscription_cb(PebbleHRMEvent *hrm_event, void *context) { - ACTIVITY_LOG_DEBUG("Got HR event: %d", (int) hrm_event->event_type); + ACTIVITY_LOG_DEBUG("Got HR event: %d", (int)hrm_event->event_type); if (hrm_event->event_type == HRMEvent_BPM) { - ACTIVITY_LOG_DEBUG("HR bpm: %"PRIu8", qual: %"PRId8" ", hrm_event->bpm.bpm, - (int8_t) hrm_event->bpm.quality); + ACTIVITY_LOG_DEBUG("HR bpm: %" PRIu8 ", qual: %" PRId8 " ", hrm_event->bpm.bpm, + (int8_t)hrm_event->bpm.quality); // Perform a basic validity check so we only proceed with reasonable data // TODO: Use quality to filter out some readings, @@ -172,16 +172,16 @@ T_STATIC void prv_hrm_subscription_cb(PebbleHRMEvent *hrm_event, void *context) // Cache the worn-status from this event so sleep tracking can use it as a strong off-wrist // signal (PPG off-wrist detection is far more reliable than the accel-only heuristics). - activity_metrics_prv_set_hrm_worn_status( - now_utc, hrm_event->bpm.quality == HRMQuality_OffWrist); + activity_metrics_prv_set_hrm_worn_status(now_utc, + hrm_event->bpm.quality == HRMQuality_OffWrist); if (valid_hr_reading) { // Update the heart rate metrics activity_metrics_prv_add_median_hr_sample(hrm_event, now_utc, now_uptime_ts); // Log it to the mobile - protobuf_log_hr_add_sample(s_activity_state.hr.log_session, now_utc, - hrm_event->bpm.bpm, hrm_event->bpm.quality); + protobuf_log_hr_add_sample(s_activity_state.hr.log_session, now_utc, hrm_event->bpm.bpm, + hrm_event->bpm.quality); } if (valid_hr_reading || hrm_event->bpm.quality == HRMQuality_OffWrist) { @@ -189,17 +189,17 @@ T_STATIC void prv_hrm_subscription_cb(PebbleHRMEvent *hrm_event, void *context) { // Post a health service heart rate changed event PebbleEvent event = { - .type = PEBBLE_HEALTH_SERVICE_EVENT, - .health_event = { - .type = HealthEventHeartRateUpdate, - .data.heart_rate_update = { - .current_bpm = (hrm_event->bpm.quality == HRMQuality_OffWrist) ? 0 - : hrm_event->bpm.bpm, - .resting_bpm = s_activity_state.hr.metrics.resting_bpm, - .quality = hrm_event->bpm.quality, - .is_filtered = false, + .type = PEBBLE_HEALTH_SERVICE_EVENT, + .health_event = { + .type = HealthEventHeartRateUpdate, + .data.heart_rate_update = { + .current_bpm = + (hrm_event->bpm.quality == HRMQuality_OffWrist) ? 0 : hrm_event->bpm.bpm, + .resting_bpm = s_activity_state.hr.metrics.resting_bpm, + .quality = hrm_event->bpm.quality, + .is_filtered = false, + }, }, - }, }; event_put(&event); } @@ -212,7 +212,7 @@ T_STATIC void prv_hrm_subscription_cb(PebbleHRMEvent *hrm_event, void *context) prv_heart_rate_subscription_update(now_uptime_ts); } } -#endif // CONFIG_HRM +#endif // CONFIG_HRM // --------------------------------------------------------------------------------------- // Init heart rate support @@ -228,7 +228,7 @@ static void prv_heart_rate_init(void) { s_activity_state.hr.log_session = protobuf_log_hr_create(NULL); PBL_ASSERTN(s_activity_state.hr.log_session != NULL); -#endif // CONFIG_HRM +#endif // CONFIG_HRM } // --------------------------------------------------------------------------------------- @@ -238,15 +238,15 @@ static void prv_heart_rate_deinit(void) { sys_hrm_manager_unsubscribe(s_activity_state.hr.hrm_session); protobuf_log_session_delete(s_activity_state.hr.log_session); activity_metrics_prv_reset_hr_stats(); -#endif // CONFIG_HRM +#endif // CONFIG_HRM } // ---------------------------------------------------------------------------------------------- // Open the settings file and malloc space for the file struct SettingsFile *activity_private_settings_open(void) { SettingsFile *file = kernel_malloc_check(sizeof(SettingsFile)); - if (settings_file_open(file, ACTIVITY_SETTINGS_FILE_NAME, - ACTIVITY_SETTINGS_FILE_LEN) != S_SUCCESS) { + if (settings_file_open(file, ACTIVITY_SETTINGS_FILE_NAME, ACTIVITY_SETTINGS_FILE_LEN) != + S_SUCCESS) { kernel_free(file); PBL_LOG_ERR("No settings file"); return NULL; @@ -310,7 +310,7 @@ static bool prv_settings_key_is_metric_scalar(ActivitySettingsKey key) { static void prv_settings_rewrite_cb(SettingsFile *old_file, SettingsFile *new_file, SettingsRecordInfo *info, void *context) { if (info->key_len != sizeof(ActivitySettingsKey)) { - PBL_LOG_WRN("Unexpected key len: %"PRIu32" ", (uint32_t)info->key_len); + PBL_LOG_WRN("Unexpected key len: %" PRIu32 " ", (uint32_t)info->key_len); return; } @@ -323,7 +323,7 @@ static void prv_settings_rewrite_cb(SettingsFile *old_file, SettingsFile *new_fi info->get_val(old_file, &old_history, sizeof(old_history)); ActivitySettingsValueHistory new_history = { - .utc_sec = old_history.utc_sec, + .utc_sec = old_history.utc_sec, }; for (int i = 0; i < ACTIVITY_HISTORY_DAYS; i++) { new_history.values[i] = old_history.values[i]; @@ -342,7 +342,7 @@ static void prv_settings_rewrite_cb(SettingsFile *old_file, SettingsFile *new_fi } // rewrite this entry unmodified - void *data = kernel_malloc_check(info->val_len); + void *data = kernel_malloc_check(info->val_len); info->get_val(old_file, data, info->val_len); settings_file_set(new_file, &key, info->key_len, data, info->val_len); @@ -375,7 +375,7 @@ static SettingsFile *prv_settings_migrate(SettingsFile *file, uint16_t *written_ return file; } - PBL_LOG_INFO("Performing settings file migration from version %"PRIu16"", version); + PBL_LOG_INFO("Performing settings file migration from version %" PRIu16 "", version); // Perform migration if ((version == 1) || (version == 2)) { @@ -383,11 +383,11 @@ static SettingsFile *prv_settings_migrate(SettingsFile *file, uint16_t *written_ // bigger size in the version 1 case) while widening metric records to uint32_t. result = settings_file_rewrite(file, prv_settings_rewrite_cb, NULL); if (result != S_SUCCESS) { - PBL_LOG_ERR("Failure %"PRIi32" while re-writing setting file", (int32_t)result); + PBL_LOG_ERR("Failure %" PRIi32 " while re-writing setting file", (int32_t)result); } } else { // If the version is totally unexpected, remove the file and create a new one - PBL_LOG_ERR("Unknown settings file version %"PRIu16"", version); + PBL_LOG_ERR("Unknown settings file version %" PRIu16 "", version); } if (result != S_SUCCESS) { @@ -479,8 +479,8 @@ static void NOINLINE prv_process_minute_data_tail(time_t utc_sec) { // If we are starting a new day, reset all metrics if (cur_day_index != s_activity_state.cur_day_index) { - s_activity_state.step_data = (ActivityStepData) { 0 }; - s_activity_state.sleep_data = (ActivitySleepData) { 0 }; + s_activity_state.step_data = (ActivityStepData){0}; + s_activity_state.sleep_data = (ActivitySleepData){0}; memset(&s_activity_state.hr.metrics.minutes_in_zone, 0, sizeof(s_activity_state.hr.metrics.minutes_in_zone)); s_activity_state.steps_per_minute_last_steps = 0; @@ -505,13 +505,13 @@ static void NOINLINE prv_process_minute_data_tail(time_t utc_sec) { if (need_history_update_event) { PBL_LOG_DBG("Sending history update event"); PebbleEvent e = { - .type = PEBBLE_HEALTH_SERVICE_EVENT, - .health_event = { - .type = HealthEventSignificantUpdate, - .data.significant_update = { - .day_id = cur_day_index, + .type = PEBBLE_HEALTH_SERVICE_EVENT, + .health_event = { + .type = HealthEventSignificantUpdate, + .data.significant_update = { + .day_id = cur_day_index, + }, }, - }, }; event_put(&e); } @@ -576,26 +576,25 @@ static void prv_minute_cb(CronJob *job, void *data) { } static CronJob s_activity_job = { - .minute = CRON_MINUTE_ANY, - .hour = CRON_HOUR_ANY, - .mday = CRON_MDAY_ANY, - .month = CRON_MONTH_ANY, - .cb = prv_minute_cb, + .minute = CRON_MINUTE_ANY, + .hour = CRON_HOUR_ANY, + .mday = CRON_MDAY_ANY, + .month = CRON_MONTH_ANY, + .cb = prv_minute_cb, }; // ------------------------------------------------------------------------------------------------ // Capture raw accel data // If finish is true, we will close out the current partially formed record and log it. -static void prv_collect_raw_samples(AccelRawData *accel_data, uint32_t num_samples, - bool finish) { +static void prv_collect_raw_samples(AccelRawData *accel_data, uint32_t num_samples, bool finish) { ActivitySampleCollectionData *data = s_activity_state.sample_collection_data; // Create the data logging session now, if needed if (data->dls_session == NULL) { Uuid system_uuid = UUID_SYSTEM; - data->dls_session = dls_create( - DlsSystemTagActivityAccelSamples, DATA_LOGGING_BYTE_ARRAY, sizeof(ActivityRawSamplesRecord), - true /*buffered*/, false /*resume*/, &system_uuid); + data->dls_session = dls_create(DlsSystemTagActivityAccelSamples, DATA_LOGGING_BYTE_ARRAY, + sizeof(ActivityRawSamplesRecord), true /*buffered*/, + false /*resume*/, &system_uuid); if (data->dls_session == NULL) { PBL_LOG_ERR("Unable to create DLS session"); return; @@ -610,12 +609,12 @@ static void prv_collect_raw_samples(AccelRawData *accel_data, uint32_t num_sampl for (uint32_t i = 0; finish || i < num_samples; i++, accel_data++) { // Init the record header now if necessary if (data->record.num_samples == 0) { - data->record = (ActivityRawSamplesRecord) { - .version = ACTIVITY_RAW_SAMPLES_VERSION, - .session_id = s_activity_state.sample_collection_session_id, - .len = sizeof(ActivityRawSamplesRecord), - .time_local = time_utc_to_local(rtc_get_time()), - .num_samples = data->run_size, + data->record = (ActivityRawSamplesRecord){ + .version = ACTIVITY_RAW_SAMPLES_VERSION, + .session_id = s_activity_state.sample_collection_session_id, + .len = sizeof(ActivityRawSamplesRecord), + .time_local = time_utc_to_local(rtc_get_time()), + .num_samples = data->run_size, }; if (data->first_record) { data->record.flags |= ACTIVITY_RAW_SAMPLE_FLAG_FIRST_RECORD; @@ -671,8 +670,7 @@ static void prv_collect_raw_samples(AccelRawData *accel_data, uint32_t num_sampl } DataLoggingResult result = dls_log(data->dls_session, &data->record, 1); if (result != DATA_LOGGING_SUCCESS) { - PBL_LOG_WRN("Error %"PRIi32" while logging raw sample data", - (int32_t)result); + PBL_LOG_WRN("Error %" PRIi32 " while logging raw sample data", (int32_t)result); } // Generate a log message as well. This is temporary until we have better support to @@ -681,8 +679,8 @@ static void prv_collect_raw_samples(AccelRawData *accel_data, uint32_t num_sampl // to fit in a single log line, so we split it into 2. uint32_t chunk_size = sizeof(data->record) / 2; uint8_t *binary_data = (uint8_t *)&data->record; - int32_t num_chars = base64_encode(data->base64_buf, sizeof(data->base64_buf), - binary_data, chunk_size); + int32_t num_chars = + base64_encode(data->base64_buf, sizeof(data->base64_buf), binary_data, chunk_size); PBL_ASSERTN(num_chars + 1 < (int)sizeof(data->base64_buf)); pbl_log(LOG_LEVEL_INFO, __FILE_NAME__, __LINE__, "RAW: %s", data->base64_buf); num_chars = base64_encode(data->base64_buf, sizeof(data->base64_buf), @@ -746,13 +744,13 @@ static void prv_accel_cb(AccelRawData *data, uint32_t num_samples, uint64_t time if (s_activity_state.step_data.steps != prev_steps) { // Post a steps changed event PebbleEvent e = { - .type = PEBBLE_HEALTH_SERVICE_EVENT, - .health_event = { - .type = HealthEventMovementUpdate, - .data.movement_update = { - .steps = s_activity_state.step_data.steps, + .type = PEBBLE_HEALTH_SERVICE_EVENT, + .health_event = { + .type = HealthEventMovementUpdate, + .data.movement_update = { + .steps = s_activity_state.step_data.steps, + }, }, - }, }; event_put(&e); } @@ -828,10 +826,7 @@ static void prv_start_tracking_cb(void *context) { uint16_t weight_dag = activity_prefs_get_weight_dag(); uint16_t height_mm = activity_prefs_get_height_mm(); uint8_t age_years = activity_prefs_get_age_years(); - activity_algorithm_set_user(height_mm, - weight_dag * 10, - gender, - age_years); + activity_algorithm_set_user(height_mm, weight_dag * 10, gender, age_years); activity_algorithm_metrics_changed_notification(); // Register our minutes callback @@ -840,10 +835,10 @@ static void prv_start_tracking_cb(void *context) { PBL_LOG_INFO("Activity tracking started"); PebbleEvent event = { - .type = PEBBLE_ACTIVITY_EVENT, - .activity_event = { - .type = PebbleActivityEvent_TrackingStarted, - }, + .type = PEBBLE_ACTIVITY_EVENT, + .activity_event = { + .type = PebbleActivityEvent_TrackingStarted, + }, }; event_put(&event); } @@ -872,10 +867,10 @@ static void prv_stop_tracking_cb(void *context) { PBL_LOG_INFO("activity tracking stopped"); PebbleEvent event = { - .type = PEBBLE_ACTIVITY_EVENT, - .activity_event = { - .type = PebbleActivityEvent_TrackingStopped, - }, + .type = PEBBLE_ACTIVITY_EVENT, + .activity_event = { + .type = PebbleActivityEvent_TrackingStopped, + }, }; event_put(&event); } @@ -960,7 +955,7 @@ static bool prv_wait_system_task(SystemTaskEventCallback cb, void *context, bool // NOTE: we use while (!completed) and wait in 1 second chunks just in case the semaphore was // left set from an earlier call that timed out. if (rtc_get_ticks() > end_ticks) { - return false; // Timed out + return false; // Timed out } const pbl_tick_t k_timeout = PBL_TICK_HZ; pbl_sem_take(&s_activity_state.bg_wait_semaphore, PBL_TICKS(k_timeout)); @@ -972,7 +967,7 @@ static bool prv_wait_system_task(SystemTaskEventCallback cb, void *context, bool // ------------------------------------------------------------------------------------------------ bool activity_init(void) { ACTIVITY_LOG_DEBUG("init"); - s_activity_state = (ActivityState) {}; + s_activity_state = (ActivityState){}; pbl_mutex_init(&s_activity_state.mutex); s_activity_initialized = true; @@ -980,7 +975,7 @@ bool activity_init(void) { // handle a request pbl_sem_init(&s_activity_state.bg_wait_semaphore, 0, 1); - // Open up our settings file so that we can init our state + // Open up our settings file so that we can init our state SettingsFile *file = activity_private_settings_open(); if (!file) { return false; @@ -1013,14 +1008,13 @@ bool activity_init(void) { // Init variables used to compute the derived metrics s_activity_state.steps_per_minute_last_steps = s_activity_state.step_data.steps; s_activity_state.distance_mm = s_activity_state.step_data.distance_meters * MM_PER_METER; - s_activity_state.active_calories = s_activity_state.step_data.active_kcalories - * ACTIVITY_CALORIES_PER_KCAL; + s_activity_state.active_calories = + s_activity_state.step_data.active_kcalories * ACTIVITY_CALORIES_PER_KCAL; int minute_of_day = time_util_get_minute_of_day(utc_now); s_activity_state.resting_calories = activity_private_compute_resting_calories(minute_of_day); key = ActivitySettingsKeyLastSleepActivityUTC; - settings_file_get(file, &key, sizeof(key), - &s_activity_state.logged_sleep_activity_exit_at_utc, + settings_file_get(file, &key, sizeof(key), &s_activity_state.logged_sleep_activity_exit_at_utc, sizeof(s_activity_state.logged_sleep_activity_exit_at_utc)); key = ActivitySettingsKeyLastRestfulSleepActivityUTC; @@ -1029,8 +1023,7 @@ bool activity_init(void) { sizeof(s_activity_state.logged_restful_sleep_activity_exit_at_utc)); key = ActivitySettingsKeyLastStepActivityUTC; - settings_file_get(file, &key, sizeof(key), - &s_activity_state.logged_step_activity_exit_at_utc, + settings_file_get(file, &key, sizeof(key), &s_activity_state.logged_step_activity_exit_at_utc, sizeof(s_activity_state.logged_step_activity_exit_at_utc)); // Clean up @@ -1040,9 +1033,9 @@ bool activity_init(void) { activity_insights_init(utc_now); // Set up charger subscription and check right now if charger is connected - s_activity_state.charger_subscription = (EventServiceInfo) { - .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, - .handler = prv_charger_event_cb, + s_activity_state.charger_subscription = (EventServiceInfo){ + .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, + .handler = prv_charger_event_cb, }; event_service_client_subscribe(&s_activity_state.charger_subscription); #ifdef CONFIG_IS_BIGBOARD @@ -1117,8 +1110,8 @@ bool activity_get_sessions(uint32_t *session_entries, ActivitySession *sessions) } pbl_mutex_lock(&s_activity_state.mutex, PBL_FOREVER); { - uint32_t num_sessions_to_return = MIN(*session_entries, - s_activity_state.activity_sessions_count); + uint32_t num_sessions_to_return = + MIN(*session_entries, s_activity_state.activity_sessions_count); memcpy(sessions, s_activity_state.activity_sessions, num_sessions_to_return * sizeof(ActivitySession)); @@ -1182,9 +1175,8 @@ static void prv_get_minute_history_system_cb(void *context_param) { // Get the minute history if (s_activity_state.started) { - context->success = activity_algorithm_get_minute_history(context->minute_data, - context->num_records, - context->utc_start); + context->success = activity_algorithm_get_minute_history( + context->minute_data, context->num_records, context->utc_start); } else { context->success = false; } @@ -1200,10 +1192,10 @@ bool activity_get_minute_history(HealthMinuteData *minute_data, uint32_t *num_re return false; } // Fill in the context - ActivityGetMinuteHistoryContext context = (ActivityGetMinuteHistoryContext) { - .minute_data = minute_data, - .num_records = num_records, - .utc_start = utc_start, + ActivityGetMinuteHistoryContext context = (ActivityGetMinuteHistoryContext){ + .minute_data = minute_data, + .num_records = num_records, + .utc_start = utc_start, }; // Enqueue it for KernelBG to process @@ -1280,9 +1272,8 @@ bool activity_get_metric_monthly_avg(ActivityMetric metric, int32_t *value_out) } // ------------------------------------------------------------------------------------------------ -bool activity_raw_sample_collection(bool enable, bool disable, bool *enabled, - uint32_t *session_id, uint32_t *num_samples, - uint32_t *seconds) { +bool activity_raw_sample_collection(bool enable, bool disable, bool *enabled, uint32_t *session_id, + uint32_t *num_samples, uint32_t *seconds) { if (!s_activity_initialized) { return false; } @@ -1290,8 +1281,8 @@ bool activity_raw_sample_collection(bool enable, bool disable, bool *enabled, pbl_mutex_lock(&s_activity_state.mutex, PBL_FOREVER); { if (enable && !s_activity_state.sample_collection_enabled) { - ActivitySampleCollectionData *data = kernel_zalloc_check( - sizeof(ActivitySampleCollectionData)); + ActivitySampleCollectionData *data = + kernel_zalloc_check(sizeof(ActivitySampleCollectionData)); s_activity_state.sample_collection_data = data; data->first_record = true; s_activity_state.sample_collection_session_id++; @@ -1309,8 +1300,8 @@ bool activity_raw_sample_collection(bool enable, bool disable, bool *enabled, } kernel_free(data); s_activity_state.sample_collection_data = NULL; - s_activity_state.sample_collection_seconds = rtc_get_time() - - s_activity_state.sample_collection_seconds; + s_activity_state.sample_collection_seconds = + rtc_get_time() - s_activity_state.sample_collection_seconds; } *enabled = s_activity_state.sample_collection_enabled; *session_id = s_activity_state.sample_collection_session_id; @@ -1352,7 +1343,7 @@ bool activity_dump_sleep_log(void) { return false; } // Fill in the context - ActivityDumpSleepLogContext context = (ActivityDumpSleepLogContext) { }; + ActivityDumpSleepLogContext context = (ActivityDumpSleepLogContext){}; // Enqueue it for KernelBG to process bool success = prv_wait_system_task(prv_dump_sleep_log_system_cb, &context, &context.success, @@ -1374,7 +1365,7 @@ bool activity_test_feed_samples(AccelRawData *data, uint32_t num_samples) { while (num_samples) { while (s_activity_state.pending_test_cb) { - sys_psleep(1); // Wait for kernelBG to process prior data + sys_psleep(1); // Wait for kernelBG to process prior data } uint32_t chunk_size = MIN(CONFIG_SERVICE_ACTIVITY_BATCH_SAMPLES, num_samples); @@ -1475,7 +1466,7 @@ static void prv_sleep_file_info_system_cb(void *context_param) { // Get the sleep info if (s_activity_state.started) { context->success = activity_algorithm_minute_file_info( - context->compact_first, &context->num_records, &context->data_bytes, &context->minutes); + context->compact_first, &context->num_records, &context->data_bytes, &context->minutes); } else { context->success = false; } @@ -1491,8 +1482,8 @@ bool activity_test_minute_file_info(bool compact_first, uint32_t *num_records, u return false; } // Fill in the context - ActivitySleepFileInfoContext context = (ActivitySleepFileInfoContext) { - .compact_first = compact_first, + ActivitySleepFileInfoContext context = (ActivitySleepFileInfoContext){ + .compact_first = compact_first, }; // Enqueue it for KernelBG to process @@ -1537,7 +1528,7 @@ bool activity_test_fill_minute_file(void) { return false; } // Fill in the context - ActivitySleepFileInfoContext context = (ActivitySleepFileInfoContext) { }; + ActivitySleepFileInfoContext context = (ActivitySleepFileInfoContext){}; // Enqueue it for KernelBG to process bool success = prv_wait_system_task(prv_fill_minute_file_system_cb, &context, &context.success, @@ -1556,9 +1547,9 @@ static void prv_send_fake_dls_records_system_cb(void *context_param) { for (ActivitySessionType activity = ActivitySessionType_Sleep; activity < ActivitySessionTypeCount; activity++) { ActivitySession session = { - .start_utc = session_start_utc, - .length_min = 10, - .type = activity, + .start_utc = session_start_utc, + .length_min = 10, + .type = activity, }; activity_sessions_prv_send_activity_session_to_data_logging(&session); session_start_utc += 20 * SECONDS_PER_MINUTE; @@ -1603,9 +1594,7 @@ void activity_test_set_steps_and_avg(int32_t new_steps, int32_t current_avg, int step_avg_array[0] = current_avg; step_avg_array[ACTIVITY_STEP_AVERAGES_PER_KEY - 1] = daily_avg - current_avg; - health_db_set_typical_values(ActivityMetricStepCount, - day_of_week, - step_avg_array, + health_db_set_typical_values(ActivityMetricStepCount, day_of_week, step_avg_array, ACTIVITY_STEP_AVERAGES_PER_KEY); } pbl_mutex_unlock(&s_activity_state.mutex); @@ -1617,16 +1606,11 @@ void activity_test_set_steps_history() { return; } ActivitySettingsValueHistory step_history = { - .utc_sec = rtc_get_time(), - .values = { - 0, // This ends up overwritten anyway by the current sleep value - 1000, - 750, - 1250, - 500, - 2000, - 3000 - } + .utc_sec = rtc_get_time(), + .values = { + 0, // This ends up overwritten anyway by the current sleep value + 1000, 750, 1250, 500, 2000, 3000 + } }; prv_write_metric_history(ActivitySettingsKeyStepCountHistory, &step_history); @@ -1638,16 +1622,16 @@ void activity_test_set_sleep_history() { return; } ActivitySettingsValueHistory sleep_history = { - .utc_sec = rtc_get_time(), - .values = { - 0, // This ends up overwritten anyway by the current sleep value - 400, - 500, - 400, - 500, - 400, - 500, - } + .utc_sec = rtc_get_time(), + .values = { + 0, // This ends up overwritten anyway by the current sleep value + 400, + 500, + 400, + 500, + 400, + 500, + } }; prv_write_metric_history(ActivitySettingsKeySleepTotalMinutesHistory, &sleep_history); diff --git a/src/fw/services/activity/activity_calculators.c b/src/fw/services/activity/activity_calculators.c index 61f22e7d2e..d98a8db9af 100644 --- a/src/fw/services/activity/activity_calculators.c +++ b/src/fw/services/activity/activity_calculators.c @@ -12,7 +12,6 @@ #include #include - // ------------------------------------------------------------------------------------------------ // Compute distance (in millimeters) covered by the taking the given number of steps in the given // amount of time. @@ -63,19 +62,18 @@ uint32_t activity_private_compute_distance_mm(uint32_t steps, uint32_t ms) { // Since we have cadence in steps and milliseconds, this becomes: // stride_len = (a * steps * 1000 * 60 / milliseconds + b) * height // Compute the "(a * steps * 1000 * 60 / milliseconds + b)" component: - uint64_t stride_len_component = ROUND(k_a_x10000 * steps_64 * MS_PER_SECOND * SECONDS_PER_MINUTE, - ms_64) + k_b_x10000; + uint64_t stride_len_component = + ROUND(k_a_x10000 * steps_64 * MS_PER_SECOND * SECONDS_PER_MINUTE, ms_64) + k_b_x10000; // Multiply by height to get stride_len, then by steps to get distance, then factor out our // constant multiplier at the very end to minimize rounding errors. uint32_t distance_mm = ROUND(stride_len_component * height_mm_64 * steps, k_x10000); // Return distance in mm - ACTIVITY_LOG_DEBUG("Got delta distance of %"PRIu32" mm", distance_mm); + ACTIVITY_LOG_DEBUG("Got delta distance of %" PRIu32 " mm", distance_mm); return distance_mm; } - // ------------------------------------------------------------------------------------------------ // Compute active calories (in calories, not kcalories) covered by going the given distance in // the given amount of time. @@ -134,11 +132,10 @@ uint32_t activity_private_compute_active_calories(uint32_t distance_mm, uint32_t 1000 * MM_PER_METER * ACTIVITY_DAG_PER_KG); // Return calories - ACTIVITY_LOG_DEBUG("Got delta active calories of %"PRIu32" ", calories); + ACTIVITY_LOG_DEBUG("Got delta active calories of %" PRIu32 " ", calories); return calories; } - // -------------------------------------------------------------------------------------------- uint32_t activity_private_compute_resting_calories(uint32_t elapsed_minutes) { // This computes resting metabolic rate in calories based on the MD Mifflin and ST St jeor @@ -151,9 +148,7 @@ uint32_t activity_private_compute_resting_calories(uint32_t elapsed_minutes) { // For men: kcalories = 10 * weight(kg) + 6.25 * height(cm) - 5 * age(y) + 5 // For women: kcalories = 10 * weight(kg) + 6.25 * height(cm) - 5 * age(y) - 161 - calories_per_day = (100 * weight_dag) - + (625 * height_mm) - - (5000 * age_years); + calories_per_day = (100 * weight_dag) + (625 * height_mm) - (5000 * age_years); if (gender == ActivityGenderMale) { calories_per_day += 5000; } else if (gender == ActivityGenderFemale) { @@ -165,6 +160,6 @@ uint32_t activity_private_compute_resting_calories(uint32_t elapsed_minutes) { // Scale by the requested number of minutes uint32_t resting_calories = ROUND(calories_per_day * elapsed_minutes, MINUTES_PER_DAY); - ACTIVITY_LOG_DEBUG("resting_calories: %"PRIu32"", resting_calories); + ACTIVITY_LOG_DEBUG("resting_calories: %" PRIu32 "", resting_calories); return resting_calories; } diff --git a/src/fw/services/activity/activity_insights.c b/src/fw/services/activity/activity_insights.c index 7e710b9a06..ac7f37fba7 100644 --- a/src/fw/services/activity/activity_insights.c +++ b/src/fw/services/activity/activity_insights.c @@ -30,8 +30,7 @@ PBL_LOG_MODULE_DECLARE(service_activity, CONFIG_SERVICE_ACTIVITY_LOG_LEVEL); -#define INSIGHTS_LOG_DEBUG(fmt, args...) \ - PBL_LOG_D_DBG(LOG_DOMAIN_ACTIVITY_INSIGHTS, fmt, ## args) +#define INSIGHTS_LOG_DEBUG(fmt, args...) PBL_LOG_D_DBG(LOG_DOMAIN_ACTIVITY_INSIGHTS, fmt, ##args) #define SUBTITLE_BUFFER_LENGTH 18 #define TIME_BUFFER_LENGTH 9 @@ -79,8 +78,8 @@ typedef struct InsightCopyVariants { // ----------------------------------------------------------------------------------------- // Globals typedef struct InsightStateCommon { - bool history_valid; // True if history requirements were met for the associated reward - time_t last_triggered_utc; // Last time reward was triggered, saved to flash + bool history_valid; // True if history requirements were met for the associated reward + time_t last_triggered_utc; // Last time reward was triggered, saved to flash } InsightStateCommon; static struct { @@ -99,8 +98,8 @@ static ActivityInsightSettings s_activity_reward_settings; static ActivityInsightSettings s_activity_summary_settings; static ActivityInsightSettings s_activity_session_settings; -static PFSCallbackHandle s_pfs_cb_handle = NULL; // Required for handling settings file changes -static EventServiceInfo s_blobdb_event_info; // Used to detect pin deletion events +static PFSCallbackHandle s_pfs_cb_handle = NULL; // Required for handling settings file changes +static EventServiceInfo s_blobdb_event_info; // Used to detect pin deletion events // Timestamp and UUID of the last time we added a new summary pin - stored to flash to allow // us to continue to update the pin across reboots @@ -165,39 +164,39 @@ typedef struct RewardNotifConfig { } RewardNotifConfig; static const RewardNotifConfig SLEEP_REWARD_NOTIF_CONFIG = { - .state = &s_sleep_reward_state.common, - .insight_type = ActivityInsightType_SleepReward, - .settings_key = ActivitySettingsKeyInsightSleepRewardTime, - .icon = TIMELINE_RESOURCE_SLEEP, - .text_body = i18n_noop("How are you feeling? Have you noticed extra focus, better mood or " - "extra energy? You have been sleeping great this week! Keep it up!"), - .text_positive_action = i18n_noop("I feel fabulous!"), - .text_neutral_action = i18n_noop("About average"), - .text_negative_action = i18n_noop("I'm still tired"), - .text_positive_response = i18n_noop("Awesome!"), - .text_neutral_response = i18n_noop("Keep it up!"), - .text_negative_response = i18n_noop("We'll get there!"), - .icon_positive_response = TIMELINE_RESOURCE_REWARD_GOOD, - .icon_neutral_response = TIMELINE_RESOURCE_REWARD_AVERAGE, - .icon_negative_response = TIMELINE_RESOURCE_REWARD_BAD, + .state = &s_sleep_reward_state.common, + .insight_type = ActivityInsightType_SleepReward, + .settings_key = ActivitySettingsKeyInsightSleepRewardTime, + .icon = TIMELINE_RESOURCE_SLEEP, + .text_body = i18n_noop("How are you feeling? Have you noticed extra focus, better mood or " + "extra energy? You have been sleeping great this week! Keep it up!"), + .text_positive_action = i18n_noop("I feel fabulous!"), + .text_neutral_action = i18n_noop("About average"), + .text_negative_action = i18n_noop("I'm still tired"), + .text_positive_response = i18n_noop("Awesome!"), + .text_neutral_response = i18n_noop("Keep it up!"), + .text_negative_response = i18n_noop("We'll get there!"), + .icon_positive_response = TIMELINE_RESOURCE_REWARD_GOOD, + .icon_neutral_response = TIMELINE_RESOURCE_REWARD_AVERAGE, + .icon_negative_response = TIMELINE_RESOURCE_REWARD_BAD, }; static const RewardNotifConfig ACTIVITY_REWARD_NOTIF_CONFIG = { - .state = &s_activity_reward_state.common, - .insight_type = ActivityInsightType_ActivityReward, - .settings_key = ActivitySettingsKeyInsightActivityRewardTime, - .icon = TIMELINE_RESOURCE_ACTIVITY, - .text_body = i18n_noop("Congratulations - you're having a super active day! Activity " - "makes you more focused and creative. How do you feel?"), - .text_positive_action = i18n_noop("I feel great!"), - .text_neutral_action = i18n_noop("About the same"), - .text_negative_action = i18n_noop("Not feeling it"), - .text_positive_response = i18n_noop("Awesome!"), - .text_neutral_response = i18n_noop("Keep it up!"), - .text_negative_response = i18n_noop("We'll get there!"), - .icon_positive_response = TIMELINE_RESOURCE_REWARD_GOOD, - .icon_neutral_response = TIMELINE_RESOURCE_REWARD_AVERAGE, - .icon_negative_response = TIMELINE_RESOURCE_REWARD_BAD, + .state = &s_activity_reward_state.common, + .insight_type = ActivityInsightType_ActivityReward, + .settings_key = ActivitySettingsKeyInsightActivityRewardTime, + .icon = TIMELINE_RESOURCE_ACTIVITY, + .text_body = i18n_noop("Congratulations - you're having a super active day! Activity " + "makes you more focused and creative. How do you feel?"), + .text_positive_action = i18n_noop("I feel great!"), + .text_neutral_action = i18n_noop("About the same"), + .text_negative_action = i18n_noop("Not feeling it"), + .text_positive_response = i18n_noop("Awesome!"), + .text_neutral_response = i18n_noop("Keep it up!"), + .text_negative_response = i18n_noop("We'll get there!"), + .icon_positive_response = TIMELINE_RESOURCE_REWARD_GOOD, + .icon_neutral_response = TIMELINE_RESOURCE_REWARD_AVERAGE, + .icon_negative_response = TIMELINE_RESOURCE_REWARD_BAD, }; // ----------------------------------------------------------------------------------------- @@ -205,70 +204,81 @@ static const RewardNotifConfig ACTIVITY_REWARD_NOTIF_CONFIG = { typedef struct SummaryPinPercentageConfig { const char *body; - const char *detail_text; // Overrides common value (automatically localized) + const char *detail_text; // Overrides common value (automatically localized) } SummaryPinPercentageConfig; typedef struct SummaryPinConfig { ActivityInsightSettings *insight_settings; const char *short_title; char *short_subtitle; - char *detail_text; // Note: this is not automatically localized + char *detail_text; // Note: this is not automatically localized HealthCardType health_card_type; - TimelineResourceId icon; // Icon which is shown in the timeline list view + TimelineResourceId icon; // Icon which is shown in the timeline list view SummaryPinPercentageConfig percent_config[PercentTierCount]; } SummaryPinConfig; static char s_pin_subtitle_buffer[SUBTITLE_BUFFER_LENGTH] = ""; static const SummaryPinConfig ACTIVITY_SUMMARY_PIN_CONFIG = { - .insight_settings = &s_activity_summary_settings, - .short_title = i18n_noop("Activity Summary"), - .short_subtitle = s_pin_subtitle_buffer, - .health_card_type = HealthCardType_Activity, - .icon = TIMELINE_RESOURCE_ACTIVITY, - - .percent_config = { - { // PercentTier_AboveAverage - .body = i18n_noop("Do you feel more energetic, sharper or optimistic? Being active helps!"), - .detail_text = i18n_noop("GREAT DAY TODAY"), - }, - { // PercentTier_OnAverage - .body = i18n_noop("You're being consistent and that's important, keep at it!"), - .detail_text = i18n_noop("CONSISTENT!"), - }, - { // PercentTier_BelowAverage - .body = i18n_noop("Resting is fine, but try to recover and step it up tomorrow!"), - .detail_text = i18n_noop("NOT VERY ACTIVE"), - }, - { // PercentTier_Fail - .body = i18n_noop("Resting is fine, but try to recover and step it up tomorrow!"), - .detail_text = i18n_noop("NOT VERY ACTIVE"), - }, - } + .insight_settings = &s_activity_summary_settings, + .short_title = i18n_noop("Activity Summary"), + .short_subtitle = s_pin_subtitle_buffer, + .health_card_type = HealthCardType_Activity, + .icon = TIMELINE_RESOURCE_ACTIVITY, + + .percent_config = { + { + // PercentTier_AboveAverage + .body = + i18n_noop("Do you feel more energetic, sharper or optimistic? Being active helps!"), + .detail_text = i18n_noop("GREAT DAY TODAY"), + }, + { + // PercentTier_OnAverage + .body = i18n_noop("You're being consistent and that's important, keep at it!"), + .detail_text = i18n_noop("CONSISTENT!"), + }, + { + // PercentTier_BelowAverage + .body = i18n_noop("Resting is fine, but try to recover and step it up tomorrow!"), + .detail_text = i18n_noop("NOT VERY ACTIVE"), + }, + { + // PercentTier_Fail + .body = i18n_noop("Resting is fine, but try to recover and step it up tomorrow!"), + .detail_text = i18n_noop("NOT VERY ACTIVE"), + }, + } }; static char s_sleep_period_buffer[SUBTITLE_BUFFER_LENGTH] = ""; static const SummaryPinConfig SLEEP_SUMMARY_PIN_CONFIG = { - .insight_settings = &s_sleep_summary_settings, - .short_title = i18n_noop("Sleep Summary"), - .short_subtitle = s_pin_subtitle_buffer, - .detail_text = s_sleep_period_buffer, - .health_card_type = HealthCardType_Sleep, - .icon = TIMELINE_RESOURCE_SLEEP, - - .percent_config = { - { // PercentTier_AboveAverage - .body = i18n_noop("You had a good night! Feel the energy 😃"), - }, - { // PercentTier_OnAverage - .body = i18n_noop("It's great that you're keeping a consistent sleep routine!"), - }, - { // PercentTier_BelowAverage - .body = i18n_noop("A good night's sleep goes a long way! Try to get more hours tonight."), - }, - { // PercentTier_Fail - .body = i18n_noop("A good night's sleep goes a long way! Try to get more hours tonight."), - }, - } + .insight_settings = &s_sleep_summary_settings, + .short_title = i18n_noop("Sleep Summary"), + .short_subtitle = s_pin_subtitle_buffer, + .detail_text = s_sleep_period_buffer, + .health_card_type = HealthCardType_Sleep, + .icon = TIMELINE_RESOURCE_SLEEP, + + .percent_config = { + { + // PercentTier_AboveAverage + .body = i18n_noop("You had a good night! Feel the energy 😃"), + }, + { + // PercentTier_OnAverage + .body = i18n_noop("It's great that you're keeping a consistent sleep routine!"), + }, + { + // PercentTier_BelowAverage + .body = + i18n_noop("A good night's sleep goes a long way! Try to get more hours tonight."), + }, + { + // PercentTier_Fail + .body = + i18n_noop("A good night's sleep goes a long way! Try to get more hours tonight."), + }, + } }; static void prv_create_and_push_notification(const NotificationConfig *config); @@ -322,14 +332,12 @@ static void prv_build_notification_attr_list(AttributeList *attr_list, const cha // ------------------------------------------------------------------------------------------------ // Generates a new timeline item for a reward notification -static NOINLINE TimelineItem *prv_create_reward_notification(time_t notif_time, - const RewardNotifConfig *notif_config) { +static NOINLINE TimelineItem *prv_create_reward_notification( + time_t notif_time, const RewardNotifConfig *notif_config) { AttributeList notif_attr_list = {0}; - prv_build_notification_attr_list(¬if_attr_list, - i18n_get(notif_config->text_body, ¬if_attr_list), - notif_config->icon, - notif_config->insight_type, - ActivitySessionType_None); + prv_build_notification_attr_list( + ¬if_attr_list, i18n_get(notif_config->text_body, ¬if_attr_list), notif_config->icon, + notif_config->insight_type, ActivitySessionType_None); AttributeList positive_attr_list = {0}; attribute_list_add_cstring(&positive_attr_list, AttributeIdTitle, @@ -357,31 +365,30 @@ static NOINLINE TimelineItem *prv_create_reward_notification(time_t notif_time, const int num_actions = 3; TimelineItemActionGroup action_group = { - .num_actions = num_actions, - .actions = (TimelineItemAction[]) { - { - .id = ActivityInsightResponseTypePositive, - .type = TimelineItemActionTypeInsightResponse, - .attr_list = positive_attr_list, - }, - { - .id = ActivityInsightResponseTypeNeutral, - .type = TimelineItemActionTypeInsightResponse, - .attr_list = neutral_attr_list, + .num_actions = num_actions, + .actions = (TimelineItemAction[]){ + { + .id = ActivityInsightResponseTypePositive, + .type = TimelineItemActionTypeInsightResponse, + .attr_list = positive_attr_list, + }, + { + .id = ActivityInsightResponseTypeNeutral, + .type = TimelineItemActionTypeInsightResponse, + .attr_list = neutral_attr_list, + }, + { + .id = ActivityInsightResponseTypeNegative, + .type = TimelineItemActionTypeInsightResponse, + .attr_list = negative_attr_list, + } }, - { - .id = ActivityInsightResponseTypeNegative, - .type = TimelineItemActionTypeInsightResponse, - .attr_list = negative_attr_list, - } - }, }; // Note: it's fine if this returns null, since the parent functions will check for a null pointer - TimelineItem *item = timeline_item_create_with_attributes(notif_time, 0, - TimelineItemTypeNotification, - LayoutIdNotification, ¬if_attr_list, - &action_group); + TimelineItem *item = + timeline_item_create_with_attributes(notif_time, 0, TimelineItemTypeNotification, + LayoutIdNotification, ¬if_attr_list, &action_group); i18n_free_all(¬if_attr_list); attribute_list_destroy_list(¬if_attr_list); @@ -421,7 +428,7 @@ static void prv_set_open_app_action(AttributeList *action_attr_list, HealthCardT attribute_list_add_cstring(action_attr_list, AttributeIdTitle, i18n_get("Open App", i18n_owner)); // Set the launch args to open the correct health app card HealthLaunchArgs launch_args = { - .card_type = card_type, + .card_type = card_type, }; attribute_list_add_uint32(action_attr_list, AttributeIdLaunchCode, launch_args.args); } @@ -435,40 +442,39 @@ static NOINLINE TimelineItem *prv_create_pin_with_response_items( prv_set_open_app_action(&open_attr_list, health_card_type, pin_attr_list); AttributeList remove_attr_list = {0}; - attribute_list_add_cstring(&remove_attr_list, AttributeIdTitle, i18n_get("Remove", - pin_attr_list)); + attribute_list_add_cstring(&remove_attr_list, AttributeIdTitle, + i18n_get("Remove", pin_attr_list)); const int num_actions = 2 + num_responses; TimelineItemActionGroup action_group = { - .num_actions = num_actions, - // Malloc the actions in order to save stack space - .actions = kernel_zalloc_check(sizeof(TimelineItemAction) * num_actions), + .num_actions = num_actions, + // Malloc the actions in order to save stack space + .actions = kernel_zalloc_check(sizeof(TimelineItemAction) * num_actions), }; - action_group.actions[0] = (TimelineItemAction) { - .id = 0, - .type = TimelineItemActionTypeOpenWatchApp, - .attr_list = open_attr_list, + action_group.actions[0] = (TimelineItemAction){ + .id = 0, + .type = TimelineItemActionTypeOpenWatchApp, + .attr_list = open_attr_list, }; for (int i = 0; i < num_responses; i++) { ResponseItem *response_item = &response_items[i]; attribute_list_add_cstring(&response_item->attr_list, AttributeIdTitle, i18n_get(response_item->text, pin_attr_list)); - action_group.actions[i + 1] = (TimelineItemAction) { - .id = response_items->type, - .type = TimelineItemActionTypeInsightResponse, - .attr_list = response_item->attr_list, + action_group.actions[i + 1] = (TimelineItemAction){ + .id = response_items->type, + .type = TimelineItemActionTypeInsightResponse, + .attr_list = response_item->attr_list, }; } - action_group.actions[num_responses + 1] = (TimelineItemAction) { - .id = 1, - .type = TimelineItemActionTypeRemove, - .attr_list = remove_attr_list, + action_group.actions[num_responses + 1] = (TimelineItemAction){ + .id = 1, + .type = TimelineItemActionTypeRemove, + .attr_list = remove_attr_list, }; // Note: it's fine if this returns null, since the parent functions will check for a null pointer - TimelineItem *item = timeline_item_create_with_attributes(pin_time_utc, duration_m, - TimelineItemTypePin, layout_id, - pin_attr_list, &action_group); + TimelineItem *item = timeline_item_create_with_attributes( + pin_time_utc, duration_m, TimelineItemTypePin, layout_id, pin_attr_list, &action_group); for (int i = 0; i < num_responses; i++) { ResponseItem *response_item = &response_items[i]; @@ -522,26 +528,29 @@ static NOINLINE TimelineItem *prv_create_summary_pin(time_t pin_time_utc, time_t uint8_t bg_color; TimelineResourceId card_icon; } s_tier_config[PercentTierCount] = { - [PercentTier_Fail] = { - .avg_relation = PBL_IF_RECT_ELSE(i18n_noop("BELOW AVG"), i18n_noop("Below avg")), - .bg_color = GColorOrangeARGB8, - .card_icon = TIMELINE_RESOURCE_ARROW_DOWN, - }, - [PercentTier_BelowAverage] = { - .avg_relation = PBL_IF_RECT_ELSE(i18n_noop("BELOW AVG"), i18n_noop("Below avg")), - .bg_color = GColorOrangeARGB8, - .card_icon = TIMELINE_RESOURCE_ARROW_DOWN, - }, - [PercentTier_OnAverage] = { - .avg_relation = PBL_IF_RECT_ELSE(i18n_noop("ON AVG"), i18n_noop("On avg")), - .bg_color = GColorVividCeruleanARGB8, - .card_icon = TIMELINE_RESOURCE_THUMBS_UP, - }, - [PercentTier_AboveAverage] = { - .avg_relation = PBL_IF_RECT_ELSE(i18n_noop("ABOVE AVG"), i18n_noop("Above avg")), - .bg_color = GColorIslamicGreenARGB8, - .card_icon = TIMELINE_RESOURCE_ARROW_UP, - }, + [PercentTier_Fail] = + { + .avg_relation = PBL_IF_RECT_ELSE(i18n_noop("BELOW AVG"), i18n_noop("Below avg")), + .bg_color = GColorOrangeARGB8, + .card_icon = TIMELINE_RESOURCE_ARROW_DOWN, + }, + [PercentTier_BelowAverage] = + { + .avg_relation = PBL_IF_RECT_ELSE(i18n_noop("BELOW AVG"), i18n_noop("Below avg")), + .bg_color = GColorOrangeARGB8, + .card_icon = TIMELINE_RESOURCE_ARROW_DOWN, + }, + [PercentTier_OnAverage] = + { + .avg_relation = PBL_IF_RECT_ELSE(i18n_noop("ON AVG"), i18n_noop("On avg")), + .bg_color = GColorVividCeruleanARGB8, + .card_icon = TIMELINE_RESOURCE_THUMBS_UP, + }, + [PercentTier_AboveAverage] = { + .avg_relation = PBL_IF_RECT_ELSE(i18n_noop("ABOVE AVG"), i18n_noop("Above avg")), + .bg_color = GColorIslamicGreenARGB8, + .card_icon = TIMELINE_RESOURCE_ARROW_UP, + }, }; // Determine percentage of target @@ -563,9 +572,8 @@ static NOINLINE TimelineItem *prv_create_summary_pin(time_t pin_time_utc, time_t } else { detail_text = config->detail_text; } - attribute_list_add_cstring(&pin_attr_list, - PBL_IF_RECT_ELSE(AttributeIdLocationName, AttributeIdTitle), - detail_text); + attribute_list_add_cstring( + &pin_attr_list, PBL_IF_RECT_ELSE(AttributeIdLocationName, AttributeIdTitle), detail_text); attribute_list_add_cstring(&pin_attr_list, AttributeIdBody, i18n_get(percent_config->body, &pin_attr_list)); @@ -632,8 +640,7 @@ static void prv_push_reward(time_t now_utc, const RewardNotifConfig *notif_confi notif_config->state->last_triggered_utc = time_util_get_midnight_of(now_utc); // Save out the trigger time - prv_save_state(notif_config->settings_key, - ¬if_config->state->last_triggered_utc, + prv_save_state(notif_config->settings_key, ¬if_config->state->last_triggered_utc, sizeof(notif_config->state->last_triggered_utc)); INSIGHTS_LOG_DEBUG("Saved reward state: %ld", notif_config->state->last_triggered_utc); @@ -653,9 +660,8 @@ T_STATIC void prv_calculate_metric_history_stats(ActivityMetric metric, int32_t *history = kernel_malloc_check(sizeof(int32_t[ACTIVITY_HISTORY_DAYS])); activity_get_metric(metric, ACTIVITY_HISTORY_DAYS, history); - const StatsBasicOp op = - (StatsBasicOp_Average | StatsBasicOp_Count | StatsBasicOp_ConsecutiveFirst | - StatsBasicOp_Median); + const StatsBasicOp op = (StatsBasicOp_Average | StatsBasicOp_Count | + StatsBasicOp_ConsecutiveFirst | StatsBasicOp_Median); struct { int32_t mean; int32_t count; @@ -667,19 +673,19 @@ T_STATIC void prv_calculate_metric_history_stats(ActivityMetric metric, stats_calculate_basic(op, &history[1], ACTIVITY_HISTORY_DAYS - 1, prv_stats_filter, NULL, &result.mean); - *stats = (ActivityInsightMetricHistoryStats) { - .metric = metric, - .mean = result.mean, - .total_days = result.count, - .consecutive_days = result.first_streak, - .median = result.median, + *stats = (ActivityInsightMetricHistoryStats){ + .metric = metric, + .mean = result.mean, + .total_days = result.count, + .consecutive_days = result.first_streak, + .median = result.median, }; kernel_free(history); - INSIGHTS_LOG_DEBUG("Metric history stats - med: %"PRIu32" mean: %"PRIu32" tot: %"PRIu8 - " cons: %"PRIu8, stats->median, stats->mean, stats->total_days, - stats->consecutive_days); + INSIGHTS_LOG_DEBUG("Metric history stats - med: %" PRIu32 " mean: %" PRIu32 " tot: %" PRIu8 + " cons: %" PRIu8, + stats->median, stats->mean, stats->total_days, stats->consecutive_days); } // ----------------------------------------------------------------------------------------------- @@ -689,16 +695,17 @@ static bool prv_validate_history_stats(const ActivityInsightMetricHistoryStats * // Make sure we have enough history if ((stats->total_days < insight_settings->reward.min_days_data) || (stats->consecutive_days < insight_settings->reward.continuous_min_days_data)) { - INSIGHTS_LOG_DEBUG("History validation failed - total/consecutive days didn't match: " - "%"PRIu8" %"PRIu8, stats->total_days, stats->consecutive_days); + INSIGHTS_LOG_DEBUG( + "History validation failed - total/consecutive days didn't match: " + "%" PRIu8 " %" PRIu8, + stats->total_days, stats->consecutive_days); return false; } // We want to look at the x days before today (which is always index 0), so add 1 uint32_t history_len = insight_settings->reward.target_qualifying_days + 1; if (history_len > ACTIVITY_HISTORY_DAYS) { - PBL_LOG_ERR("Insight qualifying history length is too long: %"PRIu32, - history_len); + PBL_LOG_ERR("Insight qualifying history length is too long: %" PRIu32, history_len); return false; } @@ -712,8 +719,9 @@ static bool prv_validate_history_stats(const ActivityInsightMetricHistoryStats * // (start at 1 since we don't care about today's metric) for (uint32_t i = 1; i < history_len; ++i) { if (history[i] < (int32_t)target) { - INSIGHTS_LOG_DEBUG("History validation failed - not above target on day %"PRIu32 - ": %"PRIi32, i, history[i]); + INSIGHTS_LOG_DEBUG("History validation failed - not above target on day %" PRIu32 + ": %" PRIi32, + i, history[i]); return false; } } @@ -721,8 +729,6 @@ static bool prv_validate_history_stats(const ActivityInsightMetricHistoryStats * return true; } - - // ------------------------------------------------------------------------------------------------ // This is called during init and midnight rollover in order to update our stats for the sleep // and activity metrics to include the previous day's history @@ -739,9 +745,7 @@ void activity_insights_recalculate_stats(void) { s_activity_reward_state.active_minutes = 0; // Reset summary pin data - s_activity_pin_state = (ActivityPinState) { - .uuid = UUID_INVALID - }; + s_activity_pin_state = (ActivityPinState){.uuid = UUID_INVALID}; } static ActivitySleepState prv_get_sleep_state(void) { @@ -766,8 +770,8 @@ static bool prv_reward_check_common(const ActivityInsightSettings *insight_setti return false; } - time_t time_next_trigger = insight_state->last_triggered_utc + - insight_settings->reward.notif_min_interval_seconds; + time_t time_next_trigger = + insight_state->last_triggered_utc + insight_settings->reward.notif_min_interval_seconds; if (time_next_trigger > now_utc) { // Stop here if not enough time has passed to trigger this reward INSIGHTS_LOG_DEBUG("Not triggering activity reward - too soon to trigger"); @@ -781,14 +785,13 @@ static bool prv_reward_check_common(const ActivityInsightSettings *insight_setti } // Finally, make sure the current metric value is over the target - ActivityScalarStore target = ((uint32_t)(metric_stats->median * - insight_settings->reward.target_percent_of_median)) / 100; + ActivityScalarStore target = + ((uint32_t)(metric_stats->median * insight_settings->reward.target_percent_of_median)) / 100; int32_t cur_metric; activity_get_metric(metric_stats->metric, 1, &cur_metric); if (cur_metric < (int32_t)target) { - INSIGHTS_LOG_DEBUG("Not triggering reward - not over target: %"PRIi32, - cur_metric); + INSIGHTS_LOG_DEBUG("Not triggering reward - not over target: %" PRIi32, cur_metric); return false; } @@ -807,7 +810,7 @@ static void prv_do_sleep_reward(time_t now_utc) { int32_t sleep_state_seconds; activity_get_metric(ActivityMetricSleepStateSeconds, 1, &sleep_state_seconds); if (sleep_state_seconds < s_sleep_reward_settings.reward.sleep.trigger_after_wakeup_seconds) { - INSIGHTS_LOG_DEBUG("Not triggering sleep reward - haven't been awake long enough: %"PRId32, + INSIGHTS_LOG_DEBUG("Not triggering sleep reward - haven't been awake long enough: %" PRId32, sleep_state_seconds); return; } @@ -820,13 +823,13 @@ static void prv_do_sleep_reward(time_t now_utc) { // Format a time given in seconds after midnight static void prv_strcat_formatted_time(int32_t time_seconds, char *out_buf, size_t buf_length, const void *i18n_owner) { - struct tm time = (struct tm) { - .tm_hour = time_seconds / SECONDS_PER_HOUR, - .tm_min = (time_seconds % SECONDS_PER_HOUR) / SECONDS_PER_MINUTE + struct tm time = (struct tm){ + .tm_hour = time_seconds / SECONDS_PER_HOUR, + .tm_min = (time_seconds % SECONDS_PER_HOUR) / SECONDS_PER_MINUTE }; - const char *format = clock_is_24h_style() ? - i18n_get("%H:%M", i18n_owner) : i18n_get("%l:%M%p", i18n_owner); + const char *format = + clock_is_24h_style() ? i18n_get("%H:%M", i18n_owner) : i18n_get("%l:%M%p", i18n_owner); char time_str_buf[TIME_BUFFER_LENGTH]; strftime(time_str_buf, TIME_BUFFER_LENGTH, format, &time); @@ -835,8 +838,7 @@ static void prv_strcat_formatted_time(int32_t time_seconds, char *out_buf, size_ // ----------------------------------------------------------------------------------------- // Generates the sleep enter/exit time and total time strings -static void prv_generate_sleep_pin_strings(int32_t sleep_enter_seconds, - int32_t sleep_exit_seconds, +static void prv_generate_sleep_pin_strings(int32_t sleep_enter_seconds, int32_t sleep_exit_seconds, int32_t sleep_total_seconds) { SLEEP_SUMMARY_PIN_CONFIG.detail_text[0] = '\0'; prv_strcat_formatted_time(sleep_enter_seconds, SLEEP_SUMMARY_PIN_CONFIG.detail_text, @@ -861,7 +863,6 @@ static bool prv_push_sleep_summary_pin(time_t now_utc, time_t pin_time_utc, int32_t sleep_enter_seconds, int32_t sleep_exit_seconds, int32_t sleep_total_seconds, ActivityScalarStore sleep_average_seconds, Uuid *uuid) { - prv_generate_sleep_pin_strings(sleep_enter_seconds, sleep_exit_seconds, sleep_total_seconds); // Insert or update the pin @@ -869,7 +870,6 @@ static bool prv_push_sleep_summary_pin(time_t now_utc, time_t pin_time_utc, sleep_average_seconds, &SLEEP_SUMMARY_PIN_CONFIG); } - // ----------------------------------------------------------------------------------------- static NOINLINE TimelineItem *prv_create_nap_pin(time_t now_utc, ActivitySession *session) { AttributeList pin_attr_list = {}; @@ -877,8 +877,7 @@ static NOINLINE TimelineItem *prv_create_nap_pin(time_t now_utc, ActivitySession attribute_list_add_resource_id(&pin_attr_list, AttributeIdIconPin, TIMELINE_RESOURCE_SLEEP); attribute_list_add_uint8(&pin_attr_list, AttributeIdHealthInsightType, ActivityInsightType_ActivitySessionNap); - attribute_list_add_uint8(&pin_attr_list, AttributeIdHealthActivityType, - ActivitySessionType_Nap); + attribute_list_add_uint8(&pin_attr_list, AttributeIdHealthActivityType, ActivitySessionType_Nap); attribute_list_add_uint32(&pin_attr_list, AttributeIdTimestamp, session->start_utc); attribute_list_add_cstring(&pin_attr_list, AttributeIdShortTitle, @@ -890,13 +889,12 @@ static NOINLINE TimelineItem *prv_create_nap_pin(time_t now_utc, ActivitySession char *short_subtitle = kernel_zalloc_check(max_attr_length); const uint32_t duration_s = session->length_min * SECONDS_PER_MINUTE; health_util_format_hours_and_minutes(elapsed, max_attr_length, duration_s, &pin_attr_list); - const char *short_subtitle_fmt = i18n_get("%s of sleep", &pin_attr_list); /// "10H 30M of sleep" + const char *short_subtitle_fmt = i18n_get("%s of sleep", &pin_attr_list); /// "10H 30M of sleep" snprintf(short_subtitle, max_attr_length, short_subtitle_fmt, elapsed); attribute_list_add_cstring(&pin_attr_list, AttributeIdShortSubtitle, short_subtitle); attribute_list_add_cstring(&pin_attr_list, AttributeIdSubtitle, elapsed); - const char *title_i18n = PBL_IF_RECT_ELSE(i18n_noop("YOU NAPPED"), - i18n_noop("Of napping")); + const char *title_i18n = PBL_IF_RECT_ELSE(i18n_noop("YOU NAPPED"), i18n_noop("Of napping")); attribute_list_add_cstring(&pin_attr_list, PBL_IF_RECT_ELSE(AttributeIdTitle, AttributeIdLocationName), i18n_get(title_i18n, &pin_attr_list)); @@ -904,14 +902,13 @@ static NOINLINE TimelineItem *prv_create_nap_pin(time_t now_utc, ActivitySession char *start_time = kernel_zalloc_check(TIME_STRING_TIME_LENGTH); char *end_time = kernel_zalloc_check(TIME_STRING_TIME_LENGTH); char *time_range = kernel_zalloc_check(max_attr_length); - const char *time_range_fmt = i18n_get("%s - %s", &pin_attr_list); /// "10:00AM - 11:00PM" + const char *time_range_fmt = i18n_get("%s - %s", &pin_attr_list); /// "10:00AM - 11:00PM" clock_copy_time_string_timestamp(start_time, TIME_STRING_TIME_LENGTH, session->start_utc); clock_copy_time_string_timestamp(end_time, TIME_STRING_TIME_LENGTH, session->start_utc + duration_s); snprintf(time_range, max_attr_length, time_range_fmt, start_time, end_time); - attribute_list_add_cstring(&pin_attr_list, - PBL_IF_RECT_ELSE(AttributeIdLocationName, AttributeIdTitle), - time_range); + attribute_list_add_cstring( + &pin_attr_list, PBL_IF_RECT_ELSE(AttributeIdLocationName, AttributeIdTitle), time_range); // Don't display the time in the title attribute_list_add_uint8(&pin_attr_list, AttributeIdDisplayTime, WeatherTimeType_None); @@ -920,13 +917,13 @@ static NOINLINE TimelineItem *prv_create_nap_pin(time_t now_utc, ActivitySession const int num_responses = 2; ResponseItem *response_items = kernel_zalloc_check(num_responses * sizeof(ResponseItem)); - response_items[0] = (ResponseItem) { - .type = ActivityInsightResponseTypePositive, - .text = i18n_noop("I feel great!"), + response_items[0] = (ResponseItem){ + .type = ActivityInsightResponseTypePositive, + .text = i18n_noop("I feel great!"), }; - response_items[1] = (ResponseItem) { - .type = ActivityInsightResponseTypeNegative, - .text = i18n_noop("I need more"), + response_items[1] = (ResponseItem){ + .type = ActivityInsightResponseTypeNegative, + .text = i18n_noop("I need more"), }; TimelineItem *item = prv_create_pin_with_response_items( @@ -956,36 +953,34 @@ static void prv_push_nap_session_notification(time_t notif_time, ActivitySession const int max_notif_length = 128; char *body = kernel_malloc_check(max_notif_length); snprintf(body, max_notif_length, - i18n_get("Aren't naps great? You knocked out for %dH %dM!", body), - hours, minutes); + i18n_get("Aren't naps great? You knocked out for %dH %dM!", body), hours, minutes); i18n_free_all(body); const NotificationConfig config = { - .notif_time = notif_time, - .session = session, - .insight_type = ActivityInsightType_ActivitySessionNap, - .icon_id = TIMELINE_RESOURCE_SLEEP, - .body = body, - .open_pin = { - .enabled = true, - .uuid = pin_uuid, - }, - .response = { - .enabled = true, - .type = ActivityInsightResponseTypeMisclassified, - .title = i18n_noop("I didn't nap!?"), - }, + .notif_time = notif_time, + .session = session, + .insight_type = ActivityInsightType_ActivitySessionNap, + .icon_id = TIMELINE_RESOURCE_SLEEP, + .body = body, + .open_pin = + { + .enabled = true, + .uuid = pin_uuid, + }, + .response = { + .enabled = true, + .type = ActivityInsightResponseTypeMisclassified, + .title = i18n_noop("I didn't nap!?"), + }, }; prv_create_and_push_notification(&config); kernel_free(body); } - // ----------------------------------------------------------------------------------------- static void prv_push_nap_session(time_t now_utc, ActivitySession *session) { Uuid pin_uuid = UUID_INVALID; TimelineItem *pin_item = prv_create_nap_pin(now_utc, session); - if (prv_push_pin(pin_item, &pin_uuid) && - activity_prefs_sleep_insights_are_enabled()) { + if (prv_push_pin(pin_item, &pin_uuid) && activity_prefs_sleep_insights_are_enabled()) { prv_push_nap_session_notification(now_utc, session, &pin_uuid); } } @@ -1070,16 +1065,16 @@ static void prv_do_sleep_summary(time_t now_utc) { // Bounds changes within one window (merged sessions, evening extensions) update the pin // below without re-arming the notification. const time_t window_utc = activity_sessions_prv_get_sleep_window_start_utc(now_utc); - if (window_utc != s_sleep_pin_state.window_utc - || now_utc < s_sleep_pin_state.last_triggered_utc) { + if (window_utc != s_sleep_pin_state.window_utc || + now_utc < s_sleep_pin_state.last_triggered_utc) { // Checking "now_utc < s_sleep_pin_state.last_triggered_utc" catches cases where // the activity_test integration test might have created a pin in the future (because it // mucks with the real time clock) INSIGHTS_LOG_DEBUG("Starting pin for new sleep window"); - s_sleep_pin_state = (SleepPinState) { - .uuid = UUID_INVALID, - .first_enter_utc = sleep_enter_utc, - .window_utc = window_utc, + s_sleep_pin_state = (SleepPinState){ + .uuid = UUID_INVALID, + .first_enter_utc = sleep_enter_utc, + .window_utc = window_utc, }; } @@ -1099,8 +1094,8 @@ static void prv_do_sleep_summary(time_t now_utc) { // If the bounds haven't changed since we last pushed the pin, send the notification for it // now if we haven't already. - if (sleep_exit_utc <= s_sleep_pin_state.last_triggered_utc - && sleep_enter_utc == s_sleep_pin_state.first_enter_utc) { + if (sleep_exit_utc <= s_sleep_pin_state.last_triggered_utc && + sleep_enter_utc == s_sleep_pin_state.first_enter_utc) { // Notify about the sleep pin prv_do_sleep_notification(now_utc, sleep_exit_utc, sleep_total_seconds); INSIGHTS_LOG_DEBUG("Not adding sleep pin - already checked session %ld", sleep_exit_utc); @@ -1111,8 +1106,7 @@ static void prv_do_sleep_summary(time_t now_utc) { // sleep window the notification fires at most once, however often the bounds extend. INSIGHTS_LOG_DEBUG("Adding sleep pin"); prv_push_sleep_summary_pin(now_utc, sleep_exit_utc, sleep_enter_seconds, sleep_exit_seconds, - sleep_total_seconds, s_sleep_stats.mean, - &s_sleep_pin_state.uuid); + sleep_total_seconds, s_sleep_stats.mean, &s_sleep_pin_state.uuid); // Update sleep pin state s_sleep_pin_state.last_triggered_utc = sleep_exit_utc; @@ -1145,9 +1139,11 @@ static NOINLINE void prv_do_activity_reward(time_t now_utc) { // Make sure the user is currently active if (s_activity_reward_state.active_minutes < s_activity_reward_settings.reward.activity.trigger_active_minutes) { - INSIGHTS_LOG_DEBUG("Not showing activity reward - have only been currently active for " - "%"PRIu32" minutes out of %"PRIu8, s_activity_reward_state.active_minutes, - s_activity_reward_settings.reward.activity.trigger_active_minutes); + INSIGHTS_LOG_DEBUG( + "Not showing activity reward - have only been currently active for " + "%" PRIu32 " minutes out of %" PRIu8, + s_activity_reward_state.active_minutes, + s_activity_reward_settings.reward.activity.trigger_active_minutes); return; } @@ -1219,45 +1215,44 @@ static NOINLINE TimelineItem *prv_create_notification(const NotificationConfig * i18n_get(config->response.title, ¬if_attr_list)); } - const int max_num_actions = 4; // dismiss, open app, open pin, response + const int max_num_actions = 4; // dismiss, open app, open pin, response int num_actions = 0; int action_id = 0; TimelineItemAction actions[max_num_actions]; - actions[num_actions++] = (TimelineItemAction) { - .id = action_id++, - .type = TimelineItemActionTypeDismiss, - .attr_list = dismiss_action_attr_list, + actions[num_actions++] = (TimelineItemAction){ + .id = action_id++, + .type = TimelineItemActionTypeDismiss, + .attr_list = dismiss_action_attr_list, }; if (config->open_pin.enabled) { - actions[num_actions++] = (TimelineItemAction) { - .id = action_id++, - .type = TimelineItemActionTypeOpenPin, - .attr_list = open_pin_action_attr_list, + actions[num_actions++] = (TimelineItemAction){ + .id = action_id++, + .type = TimelineItemActionTypeOpenPin, + .attr_list = open_pin_action_attr_list, }; } else if (config->open_app.enabled) { - actions[num_actions++] = (TimelineItemAction) { - .id = action_id++, - .type = TimelineItemActionTypeOpenWatchApp, - .attr_list = open_app_action_attr_list, + actions[num_actions++] = (TimelineItemAction){ + .id = action_id++, + .type = TimelineItemActionTypeOpenWatchApp, + .attr_list = open_app_action_attr_list, }; } if (config->response.enabled) { - actions[num_actions++] = (TimelineItemAction) { - .id = config->response.type, - .type = TimelineItemActionTypeInsightResponse, - .attr_list = response_action_attr_list, + actions[num_actions++] = (TimelineItemAction){ + .id = config->response.type, + .type = TimelineItemActionTypeInsightResponse, + .attr_list = response_action_attr_list, }; } TimelineItemActionGroup action_group = { - .num_actions = num_actions, - .actions = actions, + .num_actions = num_actions, + .actions = actions, }; // Note: it's fine if this returns null, since the parent functions will check for a null pointer - TimelineItem *item = timeline_item_create_with_attributes(config->notif_time, 0, - TimelineItemTypeNotification, - LayoutIdNotification, ¬if_attr_list, - &action_group); + TimelineItem *item = + timeline_item_create_with_attributes(config->notif_time, 0, TimelineItemTypeNotification, + LayoutIdNotification, ¬if_attr_list, &action_group); i18n_free_all(¬if_attr_list); attribute_list_destroy_list(¬if_attr_list); attribute_list_destroy_list(&dismiss_action_attr_list); @@ -1271,8 +1266,8 @@ static NOINLINE TimelineItem *prv_create_notification(const NotificationConfig * // Creates a notification to notify the user of a new pin with a response action static void prv_create_and_push_notification(const NotificationConfig *config) { TimelineItem *item = prv_create_notification(config); - prv_push_notification(item, (config->open_pin.enabled && config->open_pin.uuid ? - config->open_pin.uuid : NULL)); + prv_push_notification( + item, (config->open_pin.enabled && config->open_pin.uuid ? config->open_pin.uuid : NULL)); } // ------------------------------------------------------------------------------------------------ @@ -1285,67 +1280,76 @@ static int32_t prv_get_step_count(void) { // ------------------------------------------------------------------------------------------------ // Creates a notification to notify the user of the activity summary -static void prv_push_activity_summary_notification( - time_t notif_time, int32_t steps_total, int32_t steps_average, int variant) { +static void prv_push_activity_summary_notification(time_t notif_time, int32_t steps_total, + int32_t steps_average, int variant) { static InsightCopyVariants s_tier_config[PercentTierCount] = { - [PercentTier_AboveAverage] = { - .num_variants = 5, - .variants = { - i18n_noop("Killer job! You've walked %d steps today which is %d%% above your typical. " - "Do it again tomorrow and you'll be on top of the world!"), - i18n_noop("Nice moves! You've walked %d steps today which is %d%% above your typical. " - "Crush it again tomorrow 😀"), - i18n_noop("Hey rockstar 🎤 You've walked %d steps today " - "which is %d%% above your typical. Nothing can stop you!"), - i18n_noop("We can barely keep up! " - "You walked %d steps today which is %d%% above your typical. " - "You're on 🔥"), - i18n_noop("You walked %d steps today which is %d%% above your typical. " - "You just outstepped YOURSELF. Mic drop."), - }, - }, - [PercentTier_OnAverage] = { - .num_variants = 4, - .variants = { - i18n_noop("You walked %d steps today; keep it up! " - "Being active is the key to feeling like a million bucks. " - "Try to beat your typical tomorrow."), - i18n_noop("Good job! You walked %d steps today–do it again tomorrow."), - i18n_noop("Someone's on the move 👊 You walked %d steps today; " - "keep doing what you're doing!"), - i18n_noop("You keep moving, we'll keep counting! You've clocked in %d steps today. " - "Keep it rolling, hot stuff."), + [PercentTier_AboveAverage] = + { + .num_variants = 5, + .variants = + { + i18n_noop("Killer job! You've walked %d steps today which is %d%% above your " + "typical. " + "Do it again tomorrow and you'll be on top of the world!"), + i18n_noop("Nice moves! You've walked %d steps today which is %d%% above your " + "typical. " + "Crush it again tomorrow 😀"), + i18n_noop("Hey rockstar 🎤 You've walked %d steps today " + "which is %d%% above your typical. Nothing can stop you!"), + i18n_noop("We can barely keep up! " + "You walked %d steps today which is %d%% above your typical. " + "You're on 🔥"), + i18n_noop("You walked %d steps today which is %d%% above your typical. " + "You just outstepped YOURSELF. Mic drop."), + }, + }, + [PercentTier_OnAverage] = + { + .num_variants = 4, + .variants = + { + i18n_noop("You walked %d steps today; keep it up! " + "Being active is the key to feeling like a million bucks. " + "Try to beat your typical tomorrow."), + i18n_noop("Good job! You walked %d steps today–do it again tomorrow."), + i18n_noop("Someone's on the move 👊 You walked %d steps today; " + "keep doing what you're doing!"), + i18n_noop( + "You keep moving, we'll keep counting! You've clocked in %d steps today. " + "Keep it rolling, hot stuff."), + }, + }, + [PercentTier_BelowAverage] = + { + .num_variants = 4, + .variants = + { + i18n_noop("You walked %d steps today which is %d%% below your typical. " + "Try to be more active tomorrow–you can do it!"), + i18n_noop("You walked %d steps which is %d%% below your typical. " + "Being active makes you feel amaaaazing–try to get back on track " + "tomorrow."), + i18n_noop("You walked %d steps today which is %d%% below your typical. " + "Don't worry, tomorrow is just around the corner 😀"), + i18n_noop("You walked %d steps which is %d%% below your typical, " + "but don't stress. You'll crush it tomorrow 😉"), + }, + }, + [PercentTier_Fail] = { + .num_variants = 3, + .variants = { + i18n_noop("You walked %d steps today. " + "Don't fret, you can get back on track in no time 😉"), + i18n_noop("You walked %d steps today. Good news is the sky's the limit!"), + i18n_noop("You walked %d steps today. " + "Try to take even more steps tomorrow–show us what you're made of!"), + }, }, - }, - [PercentTier_BelowAverage] = { - .num_variants = 4, - .variants = { - i18n_noop("You walked %d steps today which is %d%% below your typical. " - "Try to be more active tomorrow–you can do it!"), - i18n_noop("You walked %d steps which is %d%% below your typical. " - "Being active makes you feel amaaaazing–try to get back on track tomorrow."), - i18n_noop("You walked %d steps today which is %d%% below your typical. " - "Don't worry, tomorrow is just around the corner 😀"), - i18n_noop("You walked %d steps which is %d%% below your typical, " - "but don't stress. You'll crush it tomorrow 😉"), - }, - }, - [PercentTier_Fail] = { - .num_variants = 3, - .variants = { - i18n_noop("You walked %d steps today. " - "Don't fret, you can get back on track in no time 😉"), - i18n_noop("You walked %d steps today. Good news is the sky's the limit!"), - i18n_noop("You walked %d steps today. " - "Try to take even more steps tomorrow–show us what you're made of!"), - }, - }, }; int percentage; - PercentTier tier = prv_calc_percent_tier(&ACTIVITY_SUMMARY_PIN_CONFIG, - steps_total, - steps_average, &percentage); + PercentTier tier = + prv_calc_percent_tier(&ACTIVITY_SUMMARY_PIN_CONFIG, steps_total, steps_average, &percentage); const bool above_fail_threshold = steps_total >= ACTIVITY_SUMMARY_PIN_CONFIG.insight_settings->summary.activity.max_fail_steps; if ((tier == PercentTier_BelowAverage || tier == PercentTier_Fail) && above_fail_threshold) { @@ -1365,91 +1369,106 @@ static void prv_push_activity_summary_notification( i18n_free_all(body); const NotificationConfig config = { - .notif_time = notif_time, - .insight_type = ActivityInsightType_ActivitySummary, - .icon_id = TIMELINE_RESOURCE_ACTIVITY, - .body = body, - .open_app = { - .enabled = true, - .health_card_type = HealthCardType_Activity, - }, + .notif_time = notif_time, + .insight_type = ActivityInsightType_ActivitySummary, + .icon_id = TIMELINE_RESOURCE_ACTIVITY, + .body = body, + .open_app = { + .enabled = true, + .health_card_type = HealthCardType_Activity, + }, }; prv_create_and_push_notification(&config); kernel_free(body); } - // ------------------------------------------------------------------------------------------------ // Creates a notification to notify the user of the sleep summary static void prv_push_sleep_summary_notification(time_t notif_time, int32_t sleep_total_seconds, int32_t sleep_average_seconds, int variant) { static InsightCopyVariants s_tier_config[PercentTierCount] = { - [PercentTier_AboveAverage] = { - .num_variants = 5, - .variants = { - /// Sleep notification on wake up, slept above their typical sleep duration - i18n_noop("Refreshed? You slept for %dH %dM which is %d%% above your typical. " - "Go tackle your day 😃."), - i18n_noop("You caught some killer zzz’s! You slept for %dH %dM which is %d%% above " - "your typical. Keep it up."), - i18n_noop("Rise and shine! You slept for %dH %dM which is %d%% above your typical. " - "Do it again tonight, sleep master."), - i18n_noop("Mmmm...what a night. You slept for %dH %dM which is %d%% above your typical. " - "That's gotta feel good!"), - i18n_noop("That's a lot of sheep you just counted! " - "You slept for %dH %dM which is %d%% above your typical. Boom shakalaka."), - }, - }, - [PercentTier_OnAverage] = { - .num_variants = 4, - .variants = { - /// Sleep notification on wake up, slept similar to their typical sleep duration - i18n_noop("Good mornin’. You slept for %dH %dM. " - "Every good day begins with a solid night’s sleep..." - "kinda like that one 😉 Keep it up!"), - i18n_noop("Good morning! You slept for %dH %dM. Consistency is key; " - "keep doing what you're doing 😃."), - i18n_noop("You're rockin' the shut eye! You slept for %dH %dM. Make it a nightly ritual. " - "You deserve it."), - i18n_noop("Feelin' good? You slept for %dH %dM. Nothing can stop you now 👊"), - }, - }, - [PercentTier_BelowAverage] = { - .num_variants = 4, - .variants = { - /// Sleep notification on wake up, slept below their typical sleep duration - i18n_noop("Hey sleepy head. You slept for %dH %dM which " - "is %d%% below your typical. Try to get more tonight!"), - i18n_noop("Groggy? You slept for %dH %dM which is %d%% below your typical. Sleep " - "is important for everything you do-try getting more shut eye tonight!"), - i18n_noop("It's a new day! You slept for %dH %dM which is %d%% below your typical. " - "It's not your best, but there's always tonight."), - i18n_noop("Goooood morning! You slept for %dH %dM which is %d%% below your typical. " - "Go crush your day and then get back in bed 😉"), - }, - }, - [PercentTier_Fail] = { - .num_variants = 3, - .variants = { - i18n_noop("You slept for %dH %dM which is %d%% below your typical. " - "Sleep is vital for all your great ideas–how 'bout getting more tonight?"), - i18n_noop("You only slept for %dH %dM which is %d%% below your typical. " - "We know you're busy, but try getting more tonight. We believe in you 😉"), - i18n_noop("You slept for %dH %dM which is %d%% below your typical. " - "We know stuff happens; take another crack at it tonight."), + [PercentTier_AboveAverage] = + { + .num_variants = 5, + .variants = + { + /// Sleep notification on wake up, slept above their typical sleep duration + i18n_noop( + "Refreshed? You slept for %dH %dM which is %d%% above your typical. " + "Go tackle your day 😃."), + i18n_noop( + "You caught some killer zzz’s! You slept for %dH %dM which is %d%% above " + "your typical. Keep it up."), + i18n_noop( + "Rise and shine! You slept for %dH %dM which is %d%% above your typical. " + "Do it again tonight, sleep master."), + i18n_noop("Mmmm...what a night. You slept for %dH %dM which is %d%% above " + "your typical. " + "That's gotta feel good!"), + i18n_noop("That's a lot of sheep you just counted! " + "You slept for %dH %dM which is %d%% above your typical. Boom " + "shakalaka."), + }, + }, + [PercentTier_OnAverage] = + { + .num_variants = 4, + .variants = + { + /// Sleep notification on wake up, slept similar to their typical sleep + /// duration + i18n_noop("Good mornin’. You slept for %dH %dM. " + "Every good day begins with a solid night’s sleep..." + "kinda like that one 😉 Keep it up!"), + i18n_noop("Good morning! You slept for %dH %dM. Consistency is key; " + "keep doing what you're doing 😃."), + i18n_noop("You're rockin' the shut eye! You slept for %dH %dM. Make it a " + "nightly ritual. " + "You deserve it."), + i18n_noop("Feelin' good? You slept for %dH %dM. Nothing can stop you now 👊"), + }, + }, + [PercentTier_BelowAverage] = + { + .num_variants = 4, + .variants = + { + /// Sleep notification on wake up, slept below their typical sleep duration + i18n_noop("Hey sleepy head. You slept for %dH %dM which " + "is %d%% below your typical. Try to get more tonight!"), + i18n_noop( + "Groggy? You slept for %dH %dM which is %d%% below your typical. Sleep " + "is important for everything you do-try getting more shut eye tonight!"), + i18n_noop( + "It's a new day! You slept for %dH %dM which is %d%% below your typical. " + "It's not your best, but there's always tonight."), + i18n_noop("Goooood morning! You slept for %dH %dM which is %d%% below your " + "typical. " + "Go crush your day and then get back in bed 😉"), + }, + }, + [PercentTier_Fail] = { + .num_variants = 3, + .variants = { + i18n_noop("You slept for %dH %dM which is %d%% below your typical. " + "Sleep is vital for all your great ideas–how 'bout getting more tonight?"), + i18n_noop("You only slept for %dH %dM which is %d%% below your typical. " + "We know you're busy, but try getting more tonight. We believe in you 😉"), + i18n_noop("You slept for %dH %dM which is %d%% below your typical. " + "We know stuff happens; take another crack at it tonight."), + }, }, - }, }; const int hours = sleep_total_seconds / SECONDS_PER_HOUR; const int minutes = (sleep_total_seconds / SECONDS_PER_MINUTE) % MINUTES_PER_HOUR; int percentage; - PercentTier tier = prv_calc_percent_tier(&SLEEP_SUMMARY_PIN_CONFIG , sleep_total_seconds, - sleep_average_seconds, &percentage); + PercentTier tier = prv_calc_percent_tier(&SLEEP_SUMMARY_PIN_CONFIG, sleep_total_seconds, + sleep_average_seconds, &percentage); if ((tier == PercentTier_BelowAverage || tier == PercentTier_Fail) && sleep_total_seconds / SECONDS_PER_MINUTE >= - SLEEP_SUMMARY_PIN_CONFIG.insight_settings->summary.sleep.max_fail_minutes) { + SLEEP_SUMMARY_PIN_CONFIG.insight_settings->summary.sleep.max_fail_minutes) { // we don't want to show a negative insights if you've slept 7 hours tier = PercentTier_OnAverage; } @@ -1467,14 +1486,14 @@ static void prv_push_sleep_summary_notification(time_t notif_time, int32_t sleep i18n_free_all(body); const NotificationConfig config = { - .notif_time = notif_time, - .insight_type = ActivityInsightType_SleepSummary, - .icon_id = TIMELINE_RESOURCE_SLEEP, - .body = body, - .open_app = { - .enabled = true, - .health_card_type = HealthCardType_Sleep, - }, + .notif_time = notif_time, + .insight_type = ActivityInsightType_SleepSummary, + .icon_id = TIMELINE_RESOURCE_SLEEP, + .body = body, + .open_app = { + .enabled = true, + .health_card_type = HealthCardType_Sleep, + }, }; prv_create_and_push_notification(&config); @@ -1484,8 +1503,7 @@ static void prv_push_sleep_summary_notification(time_t notif_time, int32_t sleep // ------------------------------------------------------------------------------------------------ static bool prv_push_activity_summary_pin(time_t now_utc, time_t pin_time_utc, int minute_of_day, ActivityScalarStore steps, - ActivityScalarStore total_steps_avg, - Uuid *uuid) { + ActivityScalarStore total_steps_avg, Uuid *uuid) { sniprintf(ACTIVITY_SUMMARY_PIN_CONFIG.short_subtitle, SUBTITLE_BUFFER_LENGTH, i18n_get("%u Steps", &ACTIVITY_SUMMARY_PIN_CONFIG), steps); @@ -1540,21 +1558,22 @@ static NOINLINE void prv_do_activity_summary(time_t now_utc) { // Determine the average for today ActivityScalarStore total_steps_avg = prv_cur_step_avg(now_utc, minute_of_day); - const time_t pin_time_utc = time_util_get_midnight_of(now_utc) + - (s_activity_summary_settings.summary.activity.trigger_minute * SECONDS_PER_MINUTE); + const time_t pin_time_utc = + time_util_get_midnight_of(now_utc) + + (s_activity_summary_settings.summary.activity.trigger_minute * SECONDS_PER_MINUTE); if (prv_push_activity_summary_pin(now_utc, pin_time_utc, minute_of_day, steps, total_steps_avg, &s_activity_pin_state.uuid)) { SummaryPinLastState activity_pin_last_state = { - .uuid = s_activity_pin_state.uuid, - .last_triggered_utc = now_utc, + .uuid = s_activity_pin_state.uuid, + .last_triggered_utc = now_utc, }; prv_save_state(ActivitySettingsKeyInsightActivitySummaryState, &activity_pin_last_state, sizeof(activity_pin_last_state)); // Trigger a notification to go with the new pin (only if we're at the trigger time) if (activity_prefs_activity_insights_are_enabled() && - (minute_of_day == s_activity_summary_settings.summary.activity.trigger_minute) && + (minute_of_day == s_activity_summary_settings.summary.activity.trigger_minute) && s_activity_summary_settings.summary.activity.show_notification) { prv_push_activity_summary_notification(pin_time_utc, steps, total_steps_avg, VARIANT_RANDOM); } @@ -1562,45 +1581,45 @@ static NOINLINE void prv_do_activity_summary(time_t now_utc) { } // ------------------------------------------------------------------------------------------------ -static const char* prv_get_intro_str_for_activity(ActivitySession *session) { +static const char *prv_get_intro_str_for_activity(ActivitySession *session) { switch (session->type) { case ActivitySessionType_Walk: { static const InsightCopyVariants s_walking_intros = { - .num_variants = 4, - .variants = { - i18n_noop("Didn’t that walk feel good?"), - i18n_noop("Way to keep it active!"), - i18n_noop("You got the moves!"), - i18n_noop("Gettin' your step on?"), - }, + .num_variants = 4, + .variants = { + i18n_noop("Didn’t that walk feel good?"), + i18n_noop("Way to keep it active!"), + i18n_noop("You got the moves!"), + i18n_noop("Gettin' your step on?"), + }, }; return prv_get_variant(&s_walking_intros, VARIANT_RANDOM); } case ActivitySessionType_Run: { static const InsightCopyVariants s_running_intros = { - .num_variants = 5, - .variants = { - i18n_noop("Feelin' hot? Cause you're on 🔥"), - i18n_noop("Hey lightning bolt, way to go!"), - i18n_noop("You're a machine!"), - i18n_noop("Hey speedster, we can barely keep up!"), - i18n_noop("Way to show us what you're made of 👊"), - }, + .num_variants = 5, + .variants = { + i18n_noop("Feelin' hot? Cause you're on 🔥"), + i18n_noop("Hey lightning bolt, way to go!"), + i18n_noop("You're a machine!"), + i18n_noop("Hey speedster, we can barely keep up!"), + i18n_noop("Way to show us what you're made of 👊"), + }, }; return prv_get_variant(&s_running_intros, VARIANT_RANDOM); } case ActivitySessionType_Open: { static const InsightCopyVariants s_open_intros = { - .num_variants = 5, - .variants = { - i18n_noop("Workin' up a sweat?"), - i18n_noop("Well done 💪"), - i18n_noop("Endorphin rush?"), - i18n_noop("Can't stop, won't stop 👊"), - i18n_noop("Keepin' that heart healthy! ❤"), - }, + .num_variants = 5, + .variants = { + i18n_noop("Workin' up a sweat?"), + i18n_noop("Well done 💪"), + i18n_noop("Endorphin rush?"), + i18n_noop("Can't stop, won't stop 👊"), + i18n_noop("Keepin' that heart healthy! ❤"), + }, }; return prv_get_variant(&s_open_intros, VARIANT_RANDOM); } @@ -1629,8 +1648,7 @@ static void prv_add_metric_duration_info(StringList *headings, int headings_buf_ if (duration_m <= MINUTES_PER_HOUR) { snprintf(duration_str, duration_buffer_size, i18n_get("%d Min", headings), duration_m); } else { - health_util_format_hours_and_minutes(duration_str, duration_buffer_size, - duration_s, headings); + health_util_format_hours_and_minutes(duration_str, duration_buffer_size, duration_s, headings); } const char *activity_label; @@ -1652,13 +1670,13 @@ static void prv_add_avg_pace_metric_info(StringList *headings, int headings_buf_ char pace_str[pace_buf_size]; const int pace_s = health_util_get_pace(session->length_min * SECONDS_PER_MINUTE, session->step_data.distance_meters); - int offset = health_util_format_hours_minutes_seconds(pace_str, pace_buf_size, pace_s, - false, headings); + int offset = + health_util_format_hours_minutes_seconds(pace_str, pace_buf_size, pace_s, false, headings); snprintf(pace_str + offset, pace_buf_size - offset, " /%s", prv_get_distance_unit(headings)); - string_list_add_string(headings, headings_buf_size, - i18n_get("Avg Pace", headings), headings_buf_size); + string_list_add_string(headings, headings_buf_size, i18n_get("Avg Pace", headings), + headings_buf_size); string_list_add_string(values, values_buf_size, pace_str, values_buf_size); } @@ -1670,11 +1688,11 @@ static void prv_add_distance_metric_info(StringList *headings, int headings_buf_ int offset = health_util_format_distance(distance_str, distance_buf_size, session->step_data.distance_meters); - snprintf(distance_str + offset, distance_buf_size - offset, - " %s", prv_get_distance_unit(headings)); + snprintf(distance_str + offset, distance_buf_size - offset, " %s", + prv_get_distance_unit(headings)); - string_list_add_string(headings, headings_buf_size, - i18n_get("Distance", headings), headings_buf_size); + string_list_add_string(headings, headings_buf_size, i18n_get("Distance", headings), + headings_buf_size); string_list_add_string(values, values_buf_size, distance_str, values_buf_size); } @@ -1685,8 +1703,8 @@ static void prv_add_step_metric_info(StringList *headings, int headings_buf_size char step_str[step_buf_size]; snprintf(step_str, step_buf_size, "%d", session->step_data.steps); - string_list_add_string(headings, headings_buf_size, - i18n_get("Steps", headings), headings_buf_size); + string_list_add_string(headings, headings_buf_size, i18n_get("Steps", headings), + headings_buf_size); string_list_add_string(values, values_buf_size, step_str, values_buf_size); } @@ -1698,21 +1716,20 @@ static void prv_add_active_calories_metric_info(StringList *headings, int headin const int active_calories = session->step_data.active_kcalories; snprintf(calories_str, calories_buf_size, "%d", active_calories); - string_list_add_string(headings, headings_buf_size, - i18n_get("Active Calories", headings), headings_buf_size); + string_list_add_string(headings, headings_buf_size, i18n_get("Active Calories", headings), + headings_buf_size); string_list_add_string(values, values_buf_size, calories_str, values_buf_size); } -static void prv_add_hr_metric_info(StringList *headings, int headings_buf_size, - StringList *values, int values_buf_size, - int32_t avg_hr, int32_t *hr_zone_time_s) { +static void prv_add_hr_metric_info(StringList *headings, int headings_buf_size, StringList *values, + int values_buf_size, int32_t avg_hr, int32_t *hr_zone_time_s) { const size_t hr_buf_size = 8; char hr_str[hr_buf_size]; if (avg_hr) { - snprintf(hr_str, hr_buf_size, "%"PRIi32"", avg_hr); - string_list_add_string(headings, headings_buf_size, - i18n_get("Avg HR", headings), headings_buf_size); + snprintf(hr_str, hr_buf_size, "%" PRIi32 "", avg_hr); + string_list_add_string(headings, headings_buf_size, i18n_get("Avg HR", headings), + headings_buf_size); string_list_add_string(values, values_buf_size, hr_str, values_buf_size); } @@ -1720,22 +1737,22 @@ static void prv_add_hr_metric_info(StringList *headings, int headings_buf_size, const int zone_1_minutes = ROUND(hr_zone_time_s[HRZone_Zone1], SECONDS_PER_MINUTE); if (zone_1_minutes) { snprintf(hr_str, hr_buf_size, i18n_get("%d Min", headings), zone_1_minutes); - string_list_add_string(headings, headings_buf_size, - i18n_get("Fat Burn", headings), headings_buf_size); + string_list_add_string(headings, headings_buf_size, i18n_get("Fat Burn", headings), + headings_buf_size); string_list_add_string(values, values_buf_size, hr_str, values_buf_size); } const int zone_2_minutes = ROUND(hr_zone_time_s[HRZone_Zone2], SECONDS_PER_MINUTE); if (zone_2_minutes) { snprintf(hr_str, hr_buf_size, i18n_get("%d Min", headings), zone_2_minutes); - string_list_add_string(headings, headings_buf_size, - i18n_get("Endurance", headings), headings_buf_size); + string_list_add_string(headings, headings_buf_size, i18n_get("Endurance", headings), + headings_buf_size); string_list_add_string(values, values_buf_size, hr_str, values_buf_size); } const int zone_3_minutes = ROUND(hr_zone_time_s[HRZone_Zone3], SECONDS_PER_MINUTE); if (zone_3_minutes) { snprintf(hr_str, hr_buf_size, i18n_get("%d Min", headings), zone_3_minutes); - string_list_add_string(headings, headings_buf_size, - i18n_get("Performance", headings), headings_buf_size); + string_list_add_string(headings, headings_buf_size, i18n_get("Performance", headings), + headings_buf_size); string_list_add_string(values, values_buf_size, hr_str, values_buf_size); } } @@ -1744,8 +1761,7 @@ static void prv_add_hr_metric_info(StringList *headings, int headings_buf_size, // ------------------------------------------------------------------------------------------------ // Creates a notification to notify the user of the activity session void activity_insights_push_activity_session_notification(time_t notif_time, - ActivitySession *session, - int32_t avg_hr, + ActivitySession *session, int32_t avg_hr, int32_t *hr_zone_time_s) { if (session->length_min <= 0) { return; @@ -1765,7 +1781,6 @@ void activity_insights_push_activity_session_notification(time_t notif_time, const int values_buf_size = 128; StringList *values = kernel_zalloc_check(values_buf_size); - if (session->type == ActivitySessionType_Run) { type = ActivityInsightType_ActivitySessionRun; icon = TIMELINE_RESOURCE_RUN; @@ -1773,10 +1788,10 @@ void activity_insights_push_activity_session_notification(time_t notif_time, prv_add_metric_duration_info(headings, headings_buf_size, values, values_buf_size, session); prv_add_avg_pace_metric_info(headings, headings_buf_size, values, values_buf_size, session); prv_add_distance_metric_info(headings, headings_buf_size, values, values_buf_size, session); - prv_add_active_calories_metric_info(headings, headings_buf_size, - values, values_buf_size, session); - prv_add_hr_metric_info(headings, headings_buf_size, values, values_buf_size, - avg_hr, hr_zone_time_s); + prv_add_active_calories_metric_info(headings, headings_buf_size, values, values_buf_size, + session); + prv_add_hr_metric_info(headings, headings_buf_size, values, values_buf_size, avg_hr, + hr_zone_time_s); } else if (session->type == ActivitySessionType_Walk) { type = ActivityInsightType_ActivitySessionWalk; icon = TIMELINE_RESOURCE_ACTIVITY; @@ -1785,34 +1800,33 @@ void activity_insights_push_activity_session_notification(time_t notif_time, prv_add_avg_pace_metric_info(headings, headings_buf_size, values, values_buf_size, session); prv_add_distance_metric_info(headings, headings_buf_size, values, values_buf_size, session); prv_add_step_metric_info(headings, headings_buf_size, values, values_buf_size, session); - prv_add_active_calories_metric_info(headings, headings_buf_size, - values, values_buf_size, session); - prv_add_hr_metric_info(headings, headings_buf_size, values, values_buf_size, - avg_hr, hr_zone_time_s); + prv_add_active_calories_metric_info(headings, headings_buf_size, values, values_buf_size, + session); + prv_add_hr_metric_info(headings, headings_buf_size, values, values_buf_size, avg_hr, + hr_zone_time_s); } else if (session->type == ActivitySessionType_Open) { type = ActivityInsightType_ActivitySessionOpen; icon = TIMELINE_RESOURCE_HEART; prv_add_metric_duration_info(headings, headings_buf_size, values, values_buf_size, session); - prv_add_hr_metric_info(headings, headings_buf_size, values, values_buf_size, - avg_hr, hr_zone_time_s); + prv_add_hr_metric_info(headings, headings_buf_size, values, values_buf_size, avg_hr, + hr_zone_time_s); } else { // Unsupported activity type goto cleanup; } - const NotificationConfig config = { - .notif_time = notif_time, - .insight_type = type, - .icon_id = icon, - .body = body, - .headings = headings, - .values = values, - .open_app = { - .enabled = true, - .health_card_type = HealthCardType_Activity, - }, + .notif_time = notif_time, + .insight_type = type, + .icon_id = icon, + .body = body, + .headings = headings, + .values = values, + .open_app = { + .enabled = true, + .health_card_type = HealthCardType_Activity, + }, }; prv_create_and_push_notification(&config); @@ -1853,7 +1867,7 @@ static void prv_do_activity_session(time_t now_utc, ActivitySession *session) { } if (session->length_min < s_activity_session_settings.session.activity.trigger_elapsed_minutes) { - INSIGHTS_LOG_DEBUG("Not adding session pin - not long enough (%"PRIu16" < %"PRIu16")", + INSIGHTS_LOG_DEBUG("Not adding session pin - not long enough (%" PRIu16 " < %" PRIu16 ")", session->length_min, s_activity_session_settings.session.activity.trigger_elapsed_minutes); return; @@ -1866,8 +1880,7 @@ static void prv_do_activity_session(time_t now_utc, ActivitySession *session) { s_session_pin_state.start_utc = session->start_utc; - prv_save_state(ActivitySettingsKeyInsightActivitySessionTime, - &s_session_pin_state.start_utc, + prv_save_state(ActivitySettingsKeyInsightActivitySessionTime, &s_session_pin_state.start_utc, sizeof(s_session_pin_state.start_utc)); if (s_activity_session_settings.session.show_notification) { @@ -1944,27 +1957,27 @@ static void prv_reload_settings(void *not_used) { if (!activity_insights_settings_read(ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_REWARD, &s_activity_reward_settings)) { - s_activity_reward_settings.enabled = false; // worst-case, we disable the insight + s_activity_reward_settings.enabled = false; // worst-case, we disable the insight } if (!activity_insights_settings_read(ACTIVITY_INSIGHTS_SETTINGS_SLEEP_REWARD, &s_sleep_reward_settings)) { - s_sleep_reward_settings.enabled = false; // worst-case, we disable the insight + s_sleep_reward_settings.enabled = false; // worst-case, we disable the insight } if (!activity_insights_settings_read(ACTIVITY_INSIGHTS_SETTINGS_SLEEP_SUMMARY, &s_sleep_summary_settings)) { - s_sleep_summary_settings.enabled = false; // worst-case, we disable the insight + s_sleep_summary_settings.enabled = false; // worst-case, we disable the insight } if (!activity_insights_settings_read(ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SUMMARY, &s_activity_summary_settings)) { - s_activity_summary_settings.enabled = false; // worst-case, we disable the insight + s_activity_summary_settings.enabled = false; // worst-case, we disable the insight } if (!activity_insights_settings_read(ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SESSION, &s_activity_session_settings)) { - s_activity_session_settings.enabled = false; // worst-case, we disable the insight + s_activity_session_settings.enabled = false; // worst-case, we disable the insight } s_pfs_cb_handle = activity_insights_settings_watch(prv_settings_file_changed_cb); @@ -2001,9 +2014,9 @@ void activity_insights_init(time_t now_utc) { prv_reload_settings(NULL); // Subscribe to pin removal events - s_blobdb_event_info = (EventServiceInfo) { - .type = PEBBLE_BLOBDB_EVENT, - .handler = prv_blobdb_event_handler, + s_blobdb_event_info = (EventServiceInfo){ + .type = PEBBLE_BLOBDB_EVENT, + .handler = prv_blobdb_event_handler, }; event_service_client_subscribe(&s_blobdb_event_info); @@ -2016,18 +2029,17 @@ void activity_insights_init(time_t now_utc) { &s_sleep_reward_state.common.last_triggered_utc, sizeof(s_sleep_reward_state.common.last_triggered_utc)); prv_restore_state(file, ActivitySettingsKeyInsightActivityRewardTime, - &s_activity_reward_state.common.last_triggered_utc, - sizeof(s_activity_reward_state.common.last_triggered_utc)); + &s_activity_reward_state.common.last_triggered_utc, + sizeof(s_activity_reward_state.common.last_triggered_utc)); prv_restore_state(file, ActivitySettingsKeyInsightActivitySummaryState, &activity_pin_last_state, sizeof(activity_pin_last_state)); - prv_restore_state(file, ActivitySettingsKeyInsightSleepSummaryState, - &s_sleep_pin_state, sizeof(s_sleep_pin_state)); + prv_restore_state(file, ActivitySettingsKeyInsightSleepSummaryState, &s_sleep_pin_state, + sizeof(s_sleep_pin_state)); prv_restore_state(file, ActivitySettingsKeyInsightNapSessionTime, &s_nap_pin_state.last_triggered_utc, sizeof(s_nap_pin_state.last_triggered_utc)); prv_restore_state(file, ActivitySettingsKeyInsightActivitySessionTime, - &s_session_pin_state.start_utc, - sizeof(s_session_pin_state.start_utc)); + &s_session_pin_state.start_utc, sizeof(s_session_pin_state.start_utc)); activity_private_settings_close(file); } @@ -2063,7 +2075,7 @@ void activity_insights_init(time_t now_utc) { // QA Testing functions static void prv_test_push_summary_pins(void *unused) { time_t now_utc = rtc_get_time(); - int minute_of_day = (20 * MINUTES_PER_HOUR) + 30; // Activity pins only trigger after 8:30 + int minute_of_day = (20 * MINUTES_PER_HOUR) + 30; // Activity pins only trigger after 8:30 Uuid uuid_way_below = UUID_INVALID; Uuid uuid_below = UUID_INVALID; @@ -2088,8 +2100,8 @@ static void prv_test_push_summary_pins(void *unused) { } time_t midnight = time_util_get_midnight_of(now_utc); - int32_t enter_seconds = (23 * SECONDS_PER_HOUR); // 11 pm the day before - int32_t exit_seconds = (7 * SECONDS_PER_HOUR); // 7 am today + int32_t enter_seconds = (23 * SECONDS_PER_HOUR); // 11 pm the day before + int32_t exit_seconds = (7 * SECONDS_PER_HOUR); // 7 am today int32_t total_seconds = (8 * SECONDS_PER_HOUR); int32_t deviate_seconds = (2 * SECONDS_PER_HOUR); time_t exit_utc = midnight + exit_seconds; @@ -2097,8 +2109,8 @@ static void prv_test_push_summary_pins(void *unused) { prv_push_sleep_summary_pin(now_utc, exit_utc, enter_seconds, exit_seconds, total_seconds + deviate_seconds, total_seconds, &uuid); uuid = UUID_INVALID; - prv_push_sleep_summary_pin(now_utc, exit_utc, enter_seconds, exit_seconds, - total_seconds, total_seconds, &uuid); + prv_push_sleep_summary_pin(now_utc, exit_utc, enter_seconds, exit_seconds, total_seconds, + total_seconds, &uuid); uuid = UUID_INVALID; prv_push_sleep_summary_pin(now_utc, exit_utc, enter_seconds, exit_seconds, total_seconds - deviate_seconds, total_seconds, &uuid); @@ -2107,13 +2119,12 @@ static void prv_test_push_summary_pins(void *unused) { total_seconds - 3 * deviate_seconds, total_seconds, &uuid); if (activity_prefs_sleep_insights_are_enabled()) { for (int i = 0; i < NUM_COPY_VARIANTS; i++) { - prv_push_sleep_summary_notification(now_utc, total_seconds + deviate_seconds, - total_seconds, i); + prv_push_sleep_summary_notification(now_utc, total_seconds + deviate_seconds, total_seconds, + i); prv_push_sleep_summary_notification(now_utc, total_seconds, total_seconds, i); - prv_push_sleep_summary_notification(now_utc, total_seconds - deviate_seconds, - total_seconds, i); - prv_push_sleep_summary_notification(now_utc, deviate_seconds, - total_seconds, i); + prv_push_sleep_summary_notification(now_utc, total_seconds - deviate_seconds, total_seconds, + i); + prv_push_sleep_summary_notification(now_utc, deviate_seconds, total_seconds, i); } } } @@ -2133,67 +2144,67 @@ static void prv_test_push_rewards(void *unused) { static void prv_test_push_walk_run_session(void *unused) { const time_t now_utc = rtc_get_time(); ActivitySession walk_session = { - .type = ActivitySessionType_Walk, - .start_utc = now_utc - 30 * SECONDS_PER_MINUTE - 15 * SECONDS_PER_MINUTE, - .length_min = 30, - .step_data = { - .steps = 2400, - .active_kcalories = 150, - .distance_meters = 2000, - }, + .type = ActivitySessionType_Walk, + .start_utc = now_utc - 30 * SECONDS_PER_MINUTE - 15 * SECONDS_PER_MINUTE, + .length_min = 30, + .step_data = { + .steps = 2400, + .active_kcalories = 150, + .distance_meters = 2000, + }, }; int32_t avg_walk_hr = 120; - int32_t walk_hr_zone_time_s[HRZoneCount] = {10 * SECONDS_PER_MINUTE, - 15 * SECONDS_PER_MINUTE, - 10 * SECONDS_PER_MINUTE, - 0 * SECONDS_PER_MINUTE}; - activity_insights_push_activity_session_notification(now_utc, &walk_session, - avg_walk_hr, walk_hr_zone_time_s); + int32_t walk_hr_zone_time_s[HRZoneCount] = { + 10 * SECONDS_PER_MINUTE, 15 * SECONDS_PER_MINUTE, 10 * SECONDS_PER_MINUTE, + 0 * SECONDS_PER_MINUTE + }; + activity_insights_push_activity_session_notification(now_utc, &walk_session, avg_walk_hr, + walk_hr_zone_time_s); ActivitySession run_session = { - .type = ActivitySessionType_Run, - .start_utc = now_utc - 30 * SECONDS_PER_MINUTE - 12 * SECONDS_PER_MINUTE, - .length_min = 30, - .step_data = { - .steps = 4200, - .active_kcalories = 300, - .distance_meters = 4828, - }, + .type = ActivitySessionType_Run, + .start_utc = now_utc - 30 * SECONDS_PER_MINUTE - 12 * SECONDS_PER_MINUTE, + .length_min = 30, + .step_data = { + .steps = 4200, + .active_kcalories = 300, + .distance_meters = 4828, + }, }; int32_t avg_run_hr = 150; - int32_t run_hr_zone_time_s[HRZoneCount] = {5 * SECONDS_PER_MINUTE, - 10 * SECONDS_PER_MINUTE, - 10 * SECONDS_PER_MINUTE, - 15 * SECONDS_PER_MINUTE}; - activity_insights_push_activity_session_notification(now_utc, &run_session, - avg_run_hr, run_hr_zone_time_s); + int32_t run_hr_zone_time_s[HRZoneCount] = { + 5 * SECONDS_PER_MINUTE, 10 * SECONDS_PER_MINUTE, 10 * SECONDS_PER_MINUTE, + 15 * SECONDS_PER_MINUTE + }; + activity_insights_push_activity_session_notification(now_utc, &run_session, avg_run_hr, + run_hr_zone_time_s); ActivitySession open_session = { - .type = ActivitySessionType_Open, - .start_utc = now_utc - 30 * SECONDS_PER_MINUTE - 12 * SECONDS_PER_MINUTE, - .length_min = 30, - .step_data = { - .steps = 0, - .active_kcalories = 200, - .distance_meters = 0, - }, + .type = ActivitySessionType_Open, + .start_utc = now_utc - 30 * SECONDS_PER_MINUTE - 12 * SECONDS_PER_MINUTE, + .length_min = 30, + .step_data = { + .steps = 0, + .active_kcalories = 200, + .distance_meters = 0, + }, }; int32_t avg_open_hr = 130; - int32_t open_hr_zone_time_s[HRZoneCount] = {2 * SECONDS_PER_MINUTE, - 0 * SECONDS_PER_MINUTE, - 18 * SECONDS_PER_MINUTE, - 10 * SECONDS_PER_MINUTE}; - activity_insights_push_activity_session_notification(now_utc, &open_session, - avg_open_hr, open_hr_zone_time_s); + int32_t open_hr_zone_time_s[HRZoneCount] = { + 2 * SECONDS_PER_MINUTE, 0 * SECONDS_PER_MINUTE, 18 * SECONDS_PER_MINUTE, + 10 * SECONDS_PER_MINUTE + }; + activity_insights_push_activity_session_notification(now_utc, &open_session, avg_open_hr, + open_hr_zone_time_s); } static void prv_test_push_nap_session(void *unused) { const time_t now_utc = rtc_get_time(); const int length_min = MINUTES_PER_HOUR + MINUTES_PER_HOUR / 2; ActivitySession session = { - .type = ActivitySessionType_Nap, - .start_utc = now_utc - length_min * SECONDS_PER_MINUTE, - .length_min = length_min, + .type = ActivitySessionType_Nap, + .start_utc = now_utc - length_min * SECONDS_PER_MINUTE, + .length_min = length_min, }; prv_push_nap_session(now_utc, &session); } diff --git a/src/fw/services/activity/activity_metrics.c b/src/fw/services/activity/activity_metrics.c index adfdf17302..a547a02a21 100644 --- a/src/fw/services/activity/activity_metrics.c +++ b/src/fw/services/activity/activity_metrics.c @@ -23,7 +23,6 @@ PBL_LOG_MODULE_DECLARE(service_activity, CONFIG_SERVICE_ACTIVITY_LOG_LEVEL); - // --------------------------------------------------------------------------------------- // Storage converters. These convert metrics from their storage type (ActivityScalarStore, // which is only 16-bits) into the uint32_t value returned by activity_get_metric. For example, @@ -36,13 +35,12 @@ static uint32_t prv_convert_minutes_to_seconds(ActivityScalarStore in) { return (uint32_t)in * SECONDS_PER_MINUTE; } - // ------------------------------------------------------------------------------------------------ // Returns info about each metric we capture void activity_metrics_prv_get_metric_info(ActivityMetric metric, ActivityMetricInfo *info) { ActivityState *state = activity_private_state(); - *info = (ActivityMetricInfo) { - .converter = prv_convert_none, + *info = (ActivityMetricInfo){ + .converter = prv_convert_none, }; switch (metric) { case ActivityMetricStepCount: @@ -144,7 +142,6 @@ void activity_metrics_prv_get_metric_info(ActivityMetric metric, ActivityMetricI } } - // ---------------------------------------------------------------------------------------------- // Set the value of a given metric. // For the current day the cached value is only overridden when `force` is true or the new value is @@ -192,15 +189,15 @@ static void prv_set_metric(ActivityMetric metric, DayInWeek wday, int32_t value, goto unlock; } ActivitySettingsValueHistory history; - settings_file_get(file, &m_info.settings_key, sizeof(m_info.settings_key), - &history, sizeof(history)); + settings_file_get(file, &m_info.settings_key, sizeof(m_info.settings_key), &history, + sizeof(history)); int day = positive_modulo(cur_wday - wday, DAYS_PER_WEEK); if ((int32_t)history.values[day] != value) { history.values[day] = value; - settings_file_set(file, &m_info.settings_key, sizeof(m_info.settings_key), - &history, sizeof(history)); + settings_file_set(file, &m_info.settings_key, sizeof(m_info.settings_key), &history, + sizeof(history)); } activity_private_settings_close(file); } @@ -208,13 +205,13 @@ static void prv_set_metric(ActivityMetric metric, DayInWeek wday, int32_t value, if (current_value_updated) { if (metric == ActivityMetricStepCount) { PebbleEvent e = { - .type = PEBBLE_HEALTH_SERVICE_EVENT, - .health_event = { - .type = HealthEventMovementUpdate, - .data.movement_update = { - .steps = value, + .type = PEBBLE_HEALTH_SERVICE_EVENT, + .health_event = { + .type = HealthEventMovementUpdate, + .data.movement_update = { + .steps = value, + }, }, - }, }; event_put(&e); } else if (metric == ActivityMetricDistanceMeters) { @@ -231,7 +228,6 @@ static void prv_set_metric(ActivityMetric metric, DayInWeek wday, int32_t value, pbl_mutex_unlock(&state->mutex); } - // ---------------------------------------------------------------------------------------------- // Set the value of a given metric. The current day's value is only overridden if the new value is // higher; historical values can be overridden with any value. @@ -239,7 +235,6 @@ void activity_metrics_prv_set_metric(ActivityMetric metric, DayInWeek wday, int3 prv_set_metric(metric, wday, value, false /* force */); } - // ---------------------------------------------------------------------------------------------- // Force the current day's value of a metric to an exact value (may also decrease it). Intended for // QEMU/test injection of health data. @@ -247,7 +242,6 @@ void activity_metrics_set_metric_exact(ActivityMetric metric, int32_t value) { prv_set_metric(metric, time_util_get_day_in_week(rtc_get_time()), value, true /* force */); } - // ---------------------------------------------------------------------------------------------- // Shift the history back one day and reset the current day's stats. // We use NOINLINE to reduce the stack requirements during the minute handler (see PBL-38130) @@ -263,8 +257,7 @@ static void NOINLINE prv_shift_history(time_t utc_now) { ActivitySettingsValueHistory history; ActivityMetricInfo m_info; - for (ActivityMetric metric = ActivityMetricFirst; metric < ActivityMetricNumMetrics; - metric++) { + for (ActivityMetric metric = ActivityMetricFirst; metric < ActivityMetricNumMetrics; metric++) { activity_metrics_prv_get_metric_info(metric, &m_info); // Shift the history @@ -293,7 +286,6 @@ static void NOINLINE prv_shift_history(time_t utc_now) { pbl_mutex_unlock(&state->mutex); } - // -------------------------------------------------------------------------------------------- // Called from activity_get_metric() every time a client asks for a metric. Also called // periodically from the minute handler before we save current metrics to setting. @@ -301,18 +293,15 @@ static void prv_update_real_time_derived_metrics(void) { ActivityState *state = activity_private_state(); pbl_mutex_lock(&state->mutex, PBL_FOREVER); { - state->step_data.distance_meters = ROUND(state->distance_mm, - MM_PER_METER); - ACTIVITY_LOG_DEBUG("new distance: %"PRIu32"", state->step_data.distance_meters); + state->step_data.distance_meters = ROUND(state->distance_mm, MM_PER_METER); + ACTIVITY_LOG_DEBUG("new distance: %" PRIu32 "", state->step_data.distance_meters); - state->step_data.active_kcalories = ROUND(state->active_calories, - ACTIVITY_CALORIES_PER_KCAL); - ACTIVITY_LOG_DEBUG("new active kcal: %"PRIu32"", state->step_data.active_kcalories); + state->step_data.active_kcalories = ROUND(state->active_calories, ACTIVITY_CALORIES_PER_KCAL); + ACTIVITY_LOG_DEBUG("new active kcal: %" PRIu32 "", state->step_data.active_kcalories); } pbl_mutex_unlock(&state->mutex); } - // -------------------------------------------------------------------------------------------- // Called periodically from the minute handler to update step derived metrics that do not have to // be updated in real time. @@ -326,55 +315,50 @@ static void NOINLINE prv_update_step_derived_metrics(time_t utc_sec) { // negative steps to 0 when computing the metrics below uint16_t steps_in_minute = 0; if (state->step_data.steps >= state->steps_per_minute_last_steps) { - steps_in_minute = state->step_data.steps - - state->steps_per_minute_last_steps; + steps_in_minute = state->step_data.steps - state->steps_per_minute_last_steps; } // Update the walking rate state->steps_per_minute = steps_in_minute; state->steps_per_minute_last_steps = state->step_data.steps; - ACTIVITY_LOG_DEBUG("new steps/minute: %"PRIu32"", state->steps_per_minute); + ACTIVITY_LOG_DEBUG("new steps/minute: %" PRIu32 "", state->steps_per_minute); // Update the number of stepping minutes and the last active minute if (state->steps_per_minute >= ACTIVITY_ACTIVE_MINUTE_MIN_STEPS) { state->step_data.step_minutes++; - ACTIVITY_LOG_DEBUG("new step minutes: %"PRIu32"", state->step_data.step_minutes); + ACTIVITY_LOG_DEBUG("new step minutes: %" PRIu32 "", state->step_data.step_minutes); // The prior minute was the most recent active one state->last_active_minute = time_util_minute_of_day_adjust(minute_of_day, -1); - ACTIVITY_LOG_DEBUG("last active minute: %"PRIu16"", state->last_active_minute); + ACTIVITY_LOG_DEBUG("last active minute: %" PRIu16 "", state->last_active_minute); } // Update the resting calories state->resting_calories = activity_private_compute_resting_calories(minute_of_day); - state->step_data.resting_kcalories = ROUND(state->resting_calories, - ACTIVITY_CALORIES_PER_KCAL); - ACTIVITY_LOG_DEBUG("resting kcalories: %"PRIu32"", - state->step_data.resting_kcalories); + state->step_data.resting_kcalories = ROUND(state->resting_calories, ACTIVITY_CALORIES_PER_KCAL); + ACTIVITY_LOG_DEBUG("resting kcalories: %" PRIu32 "", state->step_data.resting_kcalories); } pbl_mutex_unlock(&state->mutex); } - // ------------------------------------------------------------------------------------------ // Pushes an HR Median/Filtered/LastStable event. static void prv_push_median_hr_event(uint8_t median_hr) { if (median_hr > 0) { PebbleEvent event = { - .type = PEBBLE_HEALTH_SERVICE_EVENT, - .health_event = { - .type = HealthEventHeartRateUpdate, - .data.heart_rate_update = { - .current_bpm = median_hr, - .is_filtered = true, + .type = PEBBLE_HEALTH_SERVICE_EVENT, + .health_event = { + .type = HealthEventHeartRateUpdate, + .data.heart_rate_update = { + .current_bpm = median_hr, + .is_filtered = true, + } } - } }; event_put(&event); } } - // ------------------------------------------------------------------------------------------ // Calculates and stores the most recent minutes median heart rate value. // Used for the health_service and the minute level data. @@ -394,8 +378,7 @@ static void prv_update_median_hr_bpm(ActivityState *state) { } // Calculate the total weight - stats_calculate_basic(StatsBasicOp_Sum, weight_buf, hr->num_samples, NULL, NULL, - &total_weight); + stats_calculate_basic(StatsBasicOp_Sum, weight_buf, hr->num_samples, NULL, NULL, &total_weight); // Calculate the weighted median median = stats_calculate_weighted_median(sample_buf, weight_buf, num_hr_samples); @@ -432,8 +415,8 @@ static void prv_write_hr_zone_info_to_flash(HRZone zone) { ActivityMetricInfo m_info; activity_metrics_prv_get_metric_info(metric, &m_info); - settings_file_set(file, &m_info.settings_key, sizeof(m_info.settings_key), - m_info.value_p, sizeof(*m_info.value_p)); + settings_file_set(file, &m_info.settings_key, sizeof(m_info.settings_key), m_info.value_p, + sizeof(*m_info.value_p)); activity_private_settings_close(file); } @@ -503,35 +486,30 @@ void activity_metrics_prv_minute_handler(time_t utc_sec) { prv_update_hr_derived_metrics(); } - // -------------------------------------------------------------------------------------------- ActivityScalarStore activity_metrics_prv_steps_per_minute(void) { ActivityState *state = activity_private_state(); return state->steps_per_minute; } - // -------------------------------------------------------------------------------------------- uint32_t activity_metrics_prv_get_distance_mm(void) { ActivityState *state = activity_private_state(); return state->distance_mm; } - // -------------------------------------------------------------------------------------------- uint32_t activity_metrics_prv_get_resting_calories(void) { ActivityState *state = activity_private_state(); return state->resting_calories; } - // -------------------------------------------------------------------------------------------- uint32_t activity_metrics_prv_get_active_calories(void) { ActivityState *state = activity_private_state(); return state->active_calories; } - // -------------------------------------------------------------------------------------------- uint32_t activity_metrics_prv_get_steps(void) { ActivityState *state = activity_private_state(); @@ -543,12 +521,8 @@ static uint8_t prv_get_hr_quality_weight(HRMQuality quality) { HRMQuality quality; uint8_t weight_x100; } s_hr_quality_weights_x100[] = { - {HRMQuality_OffWrist, 0 }, - {HRMQuality_Worst, 1 }, - {HRMQuality_Poor, 1 }, - {HRMQuality_Acceptable, 60 }, - {HRMQuality_Good, 65 }, - {HRMQuality_Excellent, 85 }, + {HRMQuality_OffWrist, 0}, {HRMQuality_Worst, 1}, {HRMQuality_Poor, 1}, + {HRMQuality_Acceptable, 60}, {HRMQuality_Good, 65}, {HRMQuality_Excellent, 85}, }; for (size_t i = 0; i < ARRAY_LENGTH(s_hr_quality_weights_x100); i++) { @@ -613,8 +587,7 @@ bool activity_metrics_prv_is_hrm_offwrist(time_t now_utc) { bool offwrist = false; pbl_mutex_lock(&state->mutex, PBL_FOREVER); { - if (state->hr.last_quality_event_utc != 0 && - state->hr.last_quality_was_offwrist && + if (state->hr.last_quality_event_utc != 0 && state->hr.last_quality_was_offwrist && (now_utc - state->hr.last_quality_event_utc) <= ACTIVITY_HRM_OFFWRIST_STALE_SEC) { offwrist = true; } @@ -635,8 +608,7 @@ void activity_metrics_prv_add_median_hr_sample(PebbleHRMEvent *hrm_event, time_t // is terribly wrong. PBL_ASSERT(state->hr.num_samples <= ACTIVITY_MAX_HR_SAMPLES, "Too many samples"); state->hr.samples[state->hr.num_samples] = hrm_event->bpm.bpm; - state->hr.weights[state->hr.num_samples] = - prv_get_hr_quality_weight(hrm_event->bpm.quality); + state->hr.weights[state->hr.num_samples] = prv_get_hr_quality_weight(hrm_event->bpm.quality); if (hrm_event->bpm.quality >= HRMQuality_Good) { state->hr.num_good_quality_samples++; } @@ -663,19 +635,18 @@ void activity_metrics_prv_add_median_hr_sample(PebbleHRMEvent *hrm_event, time_t void activity_metrics_prv_init(SettingsFile *file, time_t utc_now) { ActivityState *state = activity_private_state(); // Roll back the history if needed and init each of the metrics for today - for (ActivityMetric metric = ActivityMetricFirst; metric < ActivityMetricNumMetrics; - metric++) { + for (ActivityMetric metric = ActivityMetricFirst; metric < ActivityMetricNumMetrics; metric++) { ActivityMetricInfo m_info; activity_metrics_prv_get_metric_info(metric, &m_info); if (m_info.has_history) { PBL_ASSERTN(m_info.value_p); - ActivitySettingsValueHistory old_history = { 0 }; - ActivitySettingsValueHistory new_history = { 0 }; + ActivitySettingsValueHistory old_history = {0}; + ActivitySettingsValueHistory new_history = {0}; // In case we change the length of the history, fetch the old size int fetch_size = sizeof(old_history); fetch_size = MIN(fetch_size, settings_file_get_len(file, &m_info.settings_key, - sizeof(m_info.settings_key))); + sizeof(m_info.settings_key))); settings_file_get(file, &m_info.settings_key, sizeof(m_info.settings_key), &old_history, fetch_size); @@ -714,8 +685,8 @@ void activity_metrics_prv_init(SettingsFile *file, time_t utc_now) { *m_info.value_p = new_history.values[0]; // Only write to flash if the values change or this is a new day (to update the timestamp) - if (memcmp(old_history.values, new_history.values, sizeof(old_history.values)) != 0 - || old_age != 0) { + if (memcmp(old_history.values, new_history.values, sizeof(old_history.values)) != 0 || + old_age != 0) { // Write out the updated history settings_file_set(file, &m_info.settings_key, sizeof(m_info.settings_key), &new_history, sizeof(new_history)); @@ -730,7 +701,6 @@ void activity_metrics_prv_init(SettingsFile *file, time_t utc_now) { } } - // ------------------------------------------------------------------------------------------------ bool activity_get_metric(ActivityMetric metric, uint32_t history_len, int32_t *history) { ActivityState *state = activity_private_state(); @@ -766,7 +736,7 @@ bool activity_get_metric(ActivityMetric metric, uint32_t history_len, int32_t *h PBL_ASSERTN(m_info.value_u32p && (m_info.converter == prv_convert_none)); history[0] = *m_info.value_u32p; } - ACTIVITY_LOG_DEBUG("get current metric %"PRIi32" : %"PRIi32"", (int32_t)metric, history[0]); + ACTIVITY_LOG_DEBUG("get current metric %" PRIi32 " : %" PRIi32 "", (int32_t)metric, history[0]); // Look up historical values if (history_len > 1) { @@ -782,8 +752,8 @@ bool activity_get_metric(ActivityMetric metric, uint32_t history_len, int32_t *h sizeof(setting_history)); for (uint32_t i = 1; i < history_len; i++) { history[i] = m_info.converter(setting_history.values[i]); - ACTIVITY_LOG_DEBUG("get metric %"PRIi32" %"PRIu32" days ago: %"PRIi32"", (int32_t)metric, - i, history[i]); + ACTIVITY_LOG_DEBUG("get metric %" PRIi32 " %" PRIu32 " days ago: %" PRIi32 "", + (int32_t)metric, i, history[i]); } activity_private_settings_close(file); } @@ -793,10 +763,9 @@ bool activity_get_metric(ActivityMetric metric, uint32_t history_len, int32_t *h return success; } - // ------------------------------------------------------------------------------------------------ -DEFINE_SYSCALL(bool, sys_activity_get_metric, ActivityMetric metric, - uint32_t history_len, int32_t *history) { +DEFINE_SYSCALL(bool, sys_activity_get_metric, ActivityMetric metric, uint32_t history_len, + int32_t *history) { if (PRIVILEGE_WAS_ELEVATED) { // activity_get_metric() unconditionally writes history_len int32_t entries // to `history` before later clamping to ACTIVITY_HISTORY_DAYS. A huge diff --git a/src/fw/services/activity/activity_sessions.c b/src/fw/services/activity/activity_sessions.c index a7df2c11bd..d692b71fe5 100644 --- a/src/fw/services/activity/activity_sessions.c +++ b/src/fw/services/activity/activity_sessions.c @@ -19,7 +19,6 @@ PBL_LOG_MODULE_DECLARE(service_activity, CONFIG_SERVICE_ACTIVITY_LOG_LEVEL); - // ------------------------------------------------------------------------------------ // Figure out the cutoff times for sleep and step activities for today given the current time static void prv_get_earliest_end_times_utc(time_t utc_sec, time_t *sleep_earliest_end_utc, @@ -30,7 +29,6 @@ static void prv_get_earliest_end_times_utc(time_t utc_sec, time_t *sleep_earlies *step_earliest_end_utc = start_of_today_utc; } - // ------------------------------------------------------------------------------------ // Remove all activity sessions that are older than "today", those that are invalid because they // are in the future, and optionally those that are still ongoing. @@ -56,8 +54,8 @@ void activity_sessions_prv_remove_out_of_range_activity_sessions(time_t utc_sec, // See if we should keep this activity time_t end_time = sessions[i].start_utc + (sessions[i].length_min * SECONDS_PER_MINUTE); - if ((end_time >= end_utc) && (end_time <= utc_sec) - && (!remove_ongoing || !sessions[i].ongoing)) { + if ((end_time >= end_utc) && (end_time <= utc_sec) && + (!remove_ongoing || !sessions[i].ongoing)) { // Keep it continue; } @@ -75,7 +73,6 @@ void activity_sessions_prv_remove_out_of_range_activity_sessions(time_t utc_sec, memset(&sessions[*session_entries], 0, num_sessions_to_clear * sizeof(ActivitySession)); } - // ------------------------------------------------------------------------------------ // Return true if the given activity type is a sleep activity bool activity_sessions_prv_is_sleep_activity(ActivitySessionType activity_type) { @@ -96,7 +93,6 @@ bool activity_sessions_prv_is_sleep_activity(ActivitySessionType activity_type) WTF; } - // ------------------------------------------------------------------------------------ // Return true if this is a valid activity session static bool prv_is_valid_activity_session(ActivitySession *session) { @@ -118,7 +114,7 @@ static bool prv_is_valid_activity_session(ActivitySession *session) { // The length must be reasonable if (session->length_min > ACTIVITY_SESSION_MAX_LENGTH_MIN) { - PBL_LOG_WRN("Invalid duration: %"PRIu16" ", session->length_min); + PBL_LOG_WRN("Invalid duration: %" PRIu16 " ", session->length_min); return false; } @@ -131,7 +127,6 @@ static bool prv_is_valid_activity_session(ActivitySession *session) { return true; } - // ------------------------------------------------------------------------------------ // Return true if two activity sessions are equal in their type and start time // @param[in] session_a ptr to first session @@ -154,7 +149,6 @@ static bool prv_activity_sessions_equal(ActivitySession *session_a, ActivitySess return type_matches && (session_a->start_utc == session_b->start_utc); } - // ------------------------------------------------------------------------------------ // Register a new activity. Called by the algorithm code when it detects a new activity. // If we already have this activity registered, it is updated. @@ -187,15 +181,14 @@ void activity_sessions_prv_add_activity_session(ActivitySession *session) { } // Add this activity in - PBL_LOG_INFO("Adding activity session %d, start_time: %"PRIu32, - (int)session->type, (uint32_t)session->start_utc); + PBL_LOG_INFO("Adding activity session %d, start_time: %" PRIu32, (int)session->type, + (uint32_t)session->start_utc); state->activity_sessions[state->activity_sessions_count++] = *session; } unlock: pbl_mutex_unlock(&state->mutex); } - // ------------------------------------------------------------------------------------ // Delete an ongoing activity. Called by the algorithm code when it decides that an activity // that was previously ongoing should not be registered after all. @@ -244,12 +237,12 @@ void activity_sessions_prv_send_activity_session_to_data_logging(ActivitySession ActivityState *state = activity_private_state(); time_t start_local = time_utc_to_local(session->start_utc); ActivitySessionDataLoggingRecord dls_record = { - .version = ACTIVITY_SESSION_LOGGING_VERSION, - .size = sizeof(ActivitySessionDataLoggingRecord), - .activity = session->type, - .utc_to_local = start_local - session->start_utc, - .start_utc = (uint32_t)session->start_utc, - .elapsed_sec = session->length_min * SECONDS_PER_MINUTE, + .version = ACTIVITY_SESSION_LOGGING_VERSION, + .size = sizeof(ActivitySessionDataLoggingRecord), + .activity = session->type, + .utc_to_local = start_local - session->start_utc, + .start_utc = (uint32_t)session->start_utc, + .elapsed_sec = session->length_min * SECONDS_PER_MINUTE, }; if (activity_sessions_prv_is_sleep_activity(session->type)) { dls_record.sleep_data = session->sleep_data; @@ -263,9 +256,8 @@ void activity_sessions_prv_send_activity_session_to_data_logging(ActivitySession const bool buffered = false; const bool resume = false; Uuid system_uuid = UUID_SYSTEM; - state->activity_dls_session = dls_create( - DlsSystemTagActivitySession, DATA_LOGGING_BYTE_ARRAY, sizeof(dls_record), - buffered, resume, &system_uuid); + state->activity_dls_session = dls_create(DlsSystemTagActivitySession, DATA_LOGGING_BYTE_ARRAY, + sizeof(dls_record), buffered, resume, &system_uuid); if (!state->activity_dls_session) { PBL_LOG_WRN("Error creating activity DLS session"); return; @@ -275,15 +267,15 @@ void activity_sessions_prv_send_activity_session_to_data_logging(ActivitySession // Log the record DataLoggingResult result = dls_log(state->activity_dls_session, &dls_record, 1); if (result != DATA_LOGGING_SUCCESS) { - PBL_LOG_WRN("Error %"PRIi32" while logging activity to DLS", (int32_t)result); + PBL_LOG_WRN("Error %" PRIi32 " while logging activity to DLS", (int32_t)result); } - PBL_LOG_INFO("Logging activity event %d, start_time: %"PRIu32", " - "elapsed_min: %"PRIu16", end_time: %"PRIu32" ", - (int)session->type, (uint32_t)session->start_utc, session->length_min, - (uint32_t)session->start_utc + (session->length_min * SECONDS_PER_MINUTE)); + PBL_LOG_INFO("Logging activity event %d, start_time: %" PRIu32 + ", " + "elapsed_min: %" PRIu16 ", end_time: %" PRIu32 " ", + (int)session->type, (uint32_t)session->start_utc, session->length_min, + (uint32_t)session->start_utc + (session->length_min * SECONDS_PER_MINUTE)); } - // This structure holds stats we collected from going through a list of sleep sessions. It is // filled in by prv_compute_sleep_stats typedef struct { @@ -308,7 +300,7 @@ typedef struct { static bool prv_compute_sleep_stats(time_t now_utc, time_t min_end_utc, time_t max_end_utc, ActivitySleepStats *stats) { ActivityState *state = activity_private_state(); - *stats = (ActivitySleepStats) { }; + *stats = (ActivitySleepStats){}; bool rv = false; @@ -325,8 +317,8 @@ static bool prv_compute_sleep_stats(time_t now_utc, time_t min_end_utc, time_t m continue; } - if ((session->type == ActivitySessionType_Sleep) - || (session->type == ActivitySessionType_Nap)) { + if ((session->type == ActivitySessionType_Sleep) || + (session->type == ActivitySessionType_Nap)) { rv = true; // Accumulate sleep container stats if (session_exit_utc <= max_end_utc) { @@ -341,8 +333,8 @@ static bool prv_compute_sleep_stats(time_t now_utc, time_t min_end_utc, time_t m } } stats->last_exit_utc = MAX(session_exit_utc, stats->last_exit_utc); - } else if ((session->type == ActivitySessionType_RestfulSleep) - || (session->type == ActivitySessionType_RestfulNap)) { + } else if ((session->type == ActivitySessionType_RestfulSleep) || + (session->type == ActivitySessionType_RestfulNap)) { if (session_exit_utc <= max_end_utc) { // Accumulate restful sleep stats stats->restful_minutes += session->length_min; @@ -354,7 +346,6 @@ static bool prv_compute_sleep_stats(time_t now_utc, time_t min_end_utc, time_t m return rv; } - // -------------------------------------------------------------------------------------------- // Goes through a list of activity sessions and updates our sleep totals in the metrics // accordingly. We also take this opportunity to post a sleep metric changed event for the SDK @@ -395,16 +386,16 @@ static void prv_update_sleep_metrics(time_t now_utc, time_t max_end_utc, // Fill in the rest of the sleep data metrics: the current state, and how long we have been // in the current state - uint32_t delta_min = abs((int32_t)(last_processed_utc - stats.last_exit_utc)) - / SECONDS_PER_MINUTE; + uint32_t delta_min = + abs((int32_t)(last_processed_utc - stats.last_exit_utc)) / SECONDS_PER_MINUTE; // Figure out our current state if (delta_min > 1) { // We are awake sleep_data->cur_state = ActivitySleepStateAwake; if (stats.last_exit_utc != 0) { - sleep_data->cur_state_elapsed_minutes = (now_utc - stats.last_exit_utc) - / SECONDS_PER_MINUTE; + sleep_data->cur_state_elapsed_minutes = + (now_utc - stats.last_exit_utc) / SECONDS_PER_MINUTE; } else { sleep_data->cur_state_elapsed_minutes = MINUTES_PER_DAY; } @@ -415,42 +406,40 @@ static void prv_update_sleep_metrics(time_t now_utc, time_t max_end_utc, } else { sleep_data->cur_state = ActivitySleepStateLightSleep; } - sleep_data->cur_state_elapsed_minutes = (stats.last_session_len_sec + now_utc - - stats.last_exit_utc) / SECONDS_PER_MINUTE; + sleep_data->cur_state_elapsed_minutes = + (stats.last_session_len_sec + now_utc - stats.last_exit_utc) / SECONDS_PER_MINUTE; } // If the info that is part of a health sleep event has changed, send out a notification event - if ((sleep_data->total_minutes != prev_sleep_data.total_minutes) - || (sleep_data->restful_minutes != prev_sleep_data.restful_minutes)) { + if ((sleep_data->total_minutes != prev_sleep_data.total_minutes) || + (sleep_data->restful_minutes != prev_sleep_data.restful_minutes)) { // Post a sleep changed event PebbleEvent e = { - .type = PEBBLE_HEALTH_SERVICE_EVENT, - .health_event = { - .type = HealthEventSleepUpdate, - .data.sleep_update = { - .total_seconds = sleep_data->total_minutes * SECONDS_PER_MINUTE, - .total_restful_seconds = sleep_data->restful_minutes * SECONDS_PER_MINUTE, + .type = PEBBLE_HEALTH_SERVICE_EVENT, + .health_event = { + .type = HealthEventSleepUpdate, + .data.sleep_update = { + .total_seconds = sleep_data->total_minutes * SECONDS_PER_MINUTE, + .total_restful_seconds = sleep_data->restful_minutes * SECONDS_PER_MINUTE, + }, }, - }, }; event_put(&e); } if (sleep_data->cur_state != prev_sleep_data.cur_state) { // Debug logging - ACTIVITY_LOG_DEBUG("total_min: %"PRIu32", deep_min: %"PRIu32", state: %"PRIu32", " - "state_min: %"PRIu32"", - sleep_data->total_minutes, - sleep_data->restful_minutes, - sleep_data->cur_state, - sleep_data->cur_state_elapsed_minutes); + ACTIVITY_LOG_DEBUG("total_min: %" PRIu32 ", deep_min: %" PRIu32 ", state: %" PRIu32 + ", " + "state_min: %" PRIu32 "", + sleep_data->total_minutes, sleep_data->restful_minutes, + sleep_data->cur_state, sleep_data->cur_state_elapsed_minutes); } } unlock: pbl_mutex_unlock(&state->mutex); } - // -------------------------------------------------------------------------------------------- time_t activity_sessions_prv_get_sleep_window_start_utc(time_t now_utc) { time_t start_of_today_utc = time_util_get_midnight_of(now_utc); @@ -479,7 +468,6 @@ void activity_sessions_prv_get_sleep_bounds_utc(time_t now_utc, time_t *enter_ut *exit_utc = stats.today_exit_utc; } - // -------------------------------------------------------------------------------------------- // Goes through a list of activity sessions and logs new ones to data logging static void prv_log_activities(time_t now_utc) { @@ -506,14 +494,12 @@ static void prv_log_activities(time_t now_utc) { } ActivityClassParams; ActivityClassParams class_settings[ActivityClassCount] = { - {ActivitySettingsKeyLastSleepActivityUTC, - &state->logged_sleep_activity_exit_at_utc, false}, + {ActivitySettingsKeyLastSleepActivityUTC, &state->logged_sleep_activity_exit_at_utc, false}, - {ActivitySettingsKeyLastRestfulSleepActivityUTC, - &state->logged_restful_sleep_activity_exit_at_utc, false}, + {ActivitySettingsKeyLastRestfulSleepActivityUTC, + &state->logged_restful_sleep_activity_exit_at_utc, false}, - {ActivitySettingsKeyLastStepActivityUTC, - &state->logged_step_activity_exit_at_utc, false}, + {ActivitySettingsKeyLastStepActivityUTC, &state->logged_step_activity_exit_at_utc, false}, }; bool logged_event = false; @@ -587,7 +573,6 @@ static void prv_log_activities(time_t now_utc) { } } - // ------------------------------------------------------------------------------------------------ // Load in the stored activities from our settings file void activity_sessions_prv_init(SettingsFile *file, time_t utc_now) { @@ -633,7 +618,7 @@ void activity_sessions_prv_init(SettingsFile *file, time_t utc_now) { // Zero out flash so that we don't get into a reboot loop memset(state->activity_sessions, 0, sizeof(state->activity_sessions)); settings_file_set(file, &key, sizeof(key), state->activity_sessions, - sizeof(state->activity_sessions)); + sizeof(state->activity_sessions)); WTF; } state->activity_sessions_count++; @@ -642,11 +627,9 @@ void activity_sessions_prv_init(SettingsFile *file, time_t utc_now) { // Remove any activities that don't belong to "today" or that are ongoing activity_sessions_prv_remove_out_of_range_activity_sessions(utc_now, true /*remove_ongoing*/); - PBL_LOG_INFO("Restored %"PRIu16" activities from storage", - state->activity_sessions_count); + PBL_LOG_INFO("Restored %" PRIu16 " activities from storage", state->activity_sessions_count); } - // -------------------------------------------------------------------------------------- void NOINLINE activity_sessions_prv_minute_handler(time_t utc_sec) { ActivityState *state = activity_private_state(); @@ -667,16 +650,14 @@ void NOINLINE activity_sessions_prv_minute_handler(time_t utc_sec) { // today. activity_algorithm_get_activity_sessions() insures that we only get sessions // that end after ACTIVITY_LAST_SLEEP_MINUTE_OF_DAY the previous day, so we just need to insure // that the end BEFORE ACTIVITY_LAST_SLEEP_MINUTE_OF_DAY today. - int last_sleep_utc_of_day = time_util_get_midnight_of(utc_sec) - + ACTIVITY_LAST_SLEEP_MINUTE_OF_DAY * SECONDS_PER_MINUTE; - prv_update_sleep_metrics(utc_sec, last_sleep_utc_of_day, - last_sleep_processed_utc); + int last_sleep_utc_of_day = + time_util_get_midnight_of(utc_sec) + ACTIVITY_LAST_SLEEP_MINUTE_OF_DAY * SECONDS_PER_MINUTE; + prv_update_sleep_metrics(utc_sec, last_sleep_utc_of_day, last_sleep_processed_utc); // Log any new activities we detected to the phone prv_log_activities(utc_sec); } - // ------------------------------------------------------------------------------------------------ bool activity_sessions_is_session_type_ongoing(ActivitySessionType type) { ActivityState *state = activity_private_state(); diff --git a/src/fw/services/activity/health_util.c b/src/fw/services/activity/health_util.c index 21f3014a94..9506cc262f 100644 --- a/src/fw/services/activity/health_util.c +++ b/src/fw/services/activity/health_util.c @@ -87,9 +87,9 @@ void health_util_duration_to_hours_and_minutes_text_node(int duration_s, void *i const int units_offset_y = fonts_get_font_height(number_font) - fonts_get_font_height(units_font); const int hours_and_minutes_buffer_size = sizeof("00"); if (hours != INT_MIN) { - GTextNodeText *hours_text_node = health_util_create_text_node(hours_and_minutes_buffer_size, - number_font, color, container); - snprintf((char *) hours_text_node->text, hours_and_minutes_buffer_size, + GTextNodeText *hours_text_node = + health_util_create_text_node(hours_and_minutes_buffer_size, number_font, color, container); + snprintf((char *)hours_text_node->text, hours_and_minutes_buffer_size, i18n_get("%d", i18n_owner), hours); GTextNodeText *hours_units_text_node = health_util_create_text_node_with_text( @@ -103,9 +103,9 @@ void health_util_duration_to_hours_and_minutes_text_node(int duration_s, void *i } if (minutes != INT_MIN) { - GTextNodeText *minutes_text_node = health_util_create_text_node(hours_and_minutes_buffer_size, - number_font, color, container); - snprintf((char *) minutes_text_node->text, hours_and_minutes_buffer_size, + GTextNodeText *minutes_text_node = + health_util_create_text_node(hours_and_minutes_buffer_size, number_font, color, container); + snprintf((char *)minutes_text_node->text, hours_and_minutes_buffer_size, i18n_get("%d", i18n_owner), minutes); GTextNodeText *minutes_units_text_node = health_util_create_text_node_with_text( @@ -115,7 +115,7 @@ void health_util_duration_to_hours_and_minutes_text_node(int duration_s, void *i } void health_util_convert_fraction_to_whole_and_decimal_part(int numerator, int denominator, - int* whole_part, int *decimal_part) { + int *whole_part, int *decimal_part) { const int figure = ROUND(numerator * 100, denominator * 10); *whole_part = figure / 10; *decimal_part = figure % 10; @@ -125,9 +125,8 @@ int health_util_format_whole_and_decimal(char *buffer, size_t buffer_size, int n int denominator) { int converted_distance_whole_part = 0; int converted_distance_decimal_part = 0; - health_util_convert_fraction_to_whole_and_decimal_part(numerator, denominator, - &converted_distance_whole_part, - &converted_distance_decimal_part); + health_util_convert_fraction_to_whole_and_decimal_part( + numerator, denominator, &converted_distance_whole_part, &converted_distance_decimal_part); const char *fmt_i18n = i18n_noop("%d.%d"); const int rv = snprintf(buffer, buffer_size, i18n_get(fmt_i18n, buffer), converted_distance_whole_part, converted_distance_decimal_part); @@ -167,8 +166,8 @@ int health_util_format_distance(char *buffer, size_t buffer_size, uint32_t dista void health_util_convert_distance_to_whole_and_decimal_part(int distance_m, int *whole_part, int *decimal_part) { const int conversion_factor = health_util_get_distance_factor(); - health_util_convert_fraction_to_whole_and_decimal_part(distance_m, conversion_factor, - whole_part, decimal_part); + health_util_convert_fraction_to_whole_and_decimal_part(distance_m, conversion_factor, whole_part, + decimal_part); } time_t health_util_get_pace(int time_s, int distance_meter) { diff --git a/src/fw/services/activity/hr_util.c b/src/fw/services/activity/hr_util.c index ea48cf9549..1f2580f757 100644 --- a/src/fw/services/activity/hr_util.c +++ b/src/fw/services/activity/hr_util.c @@ -8,9 +8,9 @@ // ------------------------------------------------------------------------------------------------ HRZone hr_util_get_hr_zone(int bpm) { const int zone_thresholds[HRZone_Max] = { - activity_prefs_heart_get_zone1_threshold(), - activity_prefs_heart_get_zone2_threshold(), - activity_prefs_heart_get_zone3_threshold(), + activity_prefs_heart_get_zone1_threshold(), + activity_prefs_heart_get_zone2_threshold(), + activity_prefs_heart_get_zone3_threshold(), }; HRZone zone; diff --git a/src/fw/services/activity/insights_settings.c b/src/fw/services/activity/insights_settings.c index 3255c985f4..c87b07b05a 100644 --- a/src/fw/services/activity/insights_settings.c +++ b/src/fw/services/activity/insights_settings.c @@ -17,7 +17,6 @@ PBL_LOG_MODULE_DECLARE(service_activity, CONFIG_SERVICE_ACTIVITY_LOG_LEVEL); #define ACTIVITY_INSIGHTS_SETTINGS_FILENAME "insights" #define ACTIVITY_INSIGHTS_SETTINGS_DEFAULT_FILE_SIZE 4096 - #define ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY "version" #define ACTIVITY_INSIGHTS_SETTINGS_DEFAULT_VERSION 0 @@ -25,79 +24,71 @@ PBL_LOG_MODULE_DECLARE(service_activity, CONFIG_SERVICE_ACTIVITY_LOG_LEVEL); static PBL_MUTEX_DEFINE(s_insight_settings_mutex); -#define ACTIVITY_INSIGHTS_SETTINGS_SLEEP_REWARD_DEFAULT { \ - .version = ACTIVITY_INSIGHTS_SETTINGS_CURRENT_STRUCT_VERSION, \ - .enabled = false, \ - .reward = { \ - .min_days_data = 6, \ - .continuous_min_days_data = 2, \ - .target_qualifying_days = 2, \ - .target_percent_of_median = 120, \ - .notif_min_interval_seconds = 7 * SECONDS_PER_DAY, \ - .sleep.trigger_after_wakeup_seconds = 2 * SECONDS_PER_HOUR \ - } \ -} +#define ACTIVITY_INSIGHTS_SETTINGS_SLEEP_REWARD_DEFAULT \ + { \ + .version = ACTIVITY_INSIGHTS_SETTINGS_CURRENT_STRUCT_VERSION, .enabled = false, .reward = { \ + .min_days_data = 6, \ + .continuous_min_days_data = 2, \ + .target_qualifying_days = 2, \ + .target_percent_of_median = 120, \ + .notif_min_interval_seconds = 7 * SECONDS_PER_DAY, \ + .sleep.trigger_after_wakeup_seconds = 2 * SECONDS_PER_HOUR \ + } \ + } -#define ACTIVITY_INSIGHTS_SETTINGS_SLEEP_SUMMARY_DEFAULT { \ - .version = ACTIVITY_INSIGHTS_SETTINGS_CURRENT_STRUCT_VERSION, \ - .enabled = true, \ - .summary = { \ - .above_avg_threshold = 10, \ - .below_avg_threshold = -10, \ - .fail_threshold = -50, \ - .sleep = { \ - .max_fail_minutes = 7 * MINUTES_PER_HOUR, \ - .trigger_notif_seconds = 30 * SECONDS_PER_MINUTE, \ - .trigger_notif_activity = 10, \ - .trigger_notif_active_minutes = 2 \ - } \ - } \ -} +#define ACTIVITY_INSIGHTS_SETTINGS_SLEEP_SUMMARY_DEFAULT \ + { \ + .version = ACTIVITY_INSIGHTS_SETTINGS_CURRENT_STRUCT_VERSION, .enabled = true, .summary = { \ + .above_avg_threshold = 10, \ + .below_avg_threshold = -10, \ + .fail_threshold = -50, \ + .sleep = { \ + .max_fail_minutes = 7 * MINUTES_PER_HOUR, \ + .trigger_notif_seconds = 30 * SECONDS_PER_MINUTE, \ + .trigger_notif_activity = 10, \ + .trigger_notif_active_minutes = 2 \ + } \ + } \ + } -#define ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_REWARD_DEFAULT { \ - .version = ACTIVITY_INSIGHTS_SETTINGS_CURRENT_STRUCT_VERSION, \ - .enabled = false, \ - .reward = {\ - .min_days_data = 6, \ - .continuous_min_days_data = 0, \ - .target_qualifying_days = 0, \ - .target_percent_of_median = 150, \ - .notif_min_interval_seconds = 1 * SECONDS_PER_DAY, \ - .activity = { \ - .trigger_active_minutes = 2, \ - .trigger_steps_per_minute = 50 \ - } \ - } \ -} +#define ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_REWARD_DEFAULT \ + { \ + .version = ACTIVITY_INSIGHTS_SETTINGS_CURRENT_STRUCT_VERSION, .enabled = false, .reward = { \ + .min_days_data = 6, \ + .continuous_min_days_data = 0, \ + .target_qualifying_days = 0, \ + .target_percent_of_median = 150, \ + .notif_min_interval_seconds = 1 * SECONDS_PER_DAY, \ + .activity = {.trigger_active_minutes = 2, .trigger_steps_per_minute = 50} \ + } \ + } -#define ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SUMMARY_DEFAULT { \ - .version = ACTIVITY_INSIGHTS_SETTINGS_CURRENT_STRUCT_VERSION, \ - .enabled = true, \ - .summary = { \ - .above_avg_threshold = 10, \ - .below_avg_threshold = -10, \ - .fail_threshold = -50, \ - .activity = { \ - .trigger_minute = (20 * MINUTES_PER_HOUR) + 30, \ - .update_threshold_steps = 1000, \ - .update_max_interval_seconds = 30 * SECONDS_PER_MINUTE, \ - .show_notification = true, \ - .max_fail_steps = 10000, \ - } \ - } \ -} +#define ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SUMMARY_DEFAULT \ + { \ + .version = ACTIVITY_INSIGHTS_SETTINGS_CURRENT_STRUCT_VERSION, .enabled = true, .summary = { \ + .above_avg_threshold = 10, \ + .below_avg_threshold = -10, \ + .fail_threshold = -50, \ + .activity = { \ + .trigger_minute = (20 * MINUTES_PER_HOUR) + 30, \ + .update_threshold_steps = 1000, \ + .update_max_interval_seconds = 30 * SECONDS_PER_MINUTE, \ + .show_notification = true, \ + .max_fail_steps = 10000, \ + } \ + } \ + } -#define ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SESSION_DEFAULT { \ - .version = ACTIVITY_INSIGHTS_SETTINGS_CURRENT_STRUCT_VERSION, \ - .enabled = true, \ - .session = { \ - .show_notification = true, \ - .activity = { \ - .trigger_elapsed_minutes = 20, \ - .trigger_cooldown_minutes = 10, \ - }, \ - } \ -} +#define ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SESSION_DEFAULT \ + { \ + .version = ACTIVITY_INSIGHTS_SETTINGS_CURRENT_STRUCT_VERSION, .enabled = true, .session = { \ + .show_notification = true, \ + .activity = { \ + .trigger_elapsed_minutes = 20, \ + .trigger_cooldown_minutes = 10, \ + }, \ + } \ + } typedef struct { const char *key; @@ -105,26 +96,16 @@ typedef struct { } AISDefault; static const AISDefault AIS_DEFAULTS[] = { - { - .key = ACTIVITY_INSIGHTS_SETTINGS_SLEEP_REWARD, - .default_val = ACTIVITY_INSIGHTS_SETTINGS_SLEEP_REWARD_DEFAULT - }, - { - .key = ACTIVITY_INSIGHTS_SETTINGS_SLEEP_SUMMARY, - .default_val = ACTIVITY_INSIGHTS_SETTINGS_SLEEP_SUMMARY_DEFAULT - }, - { - .key = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_REWARD, - .default_val = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_REWARD_DEFAULT - }, - { - .key = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SUMMARY, - .default_val = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SUMMARY_DEFAULT - }, - { - .key = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SESSION, - .default_val = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SESSION_DEFAULT - }, + {.key = ACTIVITY_INSIGHTS_SETTINGS_SLEEP_REWARD, + .default_val = ACTIVITY_INSIGHTS_SETTINGS_SLEEP_REWARD_DEFAULT}, + {.key = ACTIVITY_INSIGHTS_SETTINGS_SLEEP_SUMMARY, + .default_val = ACTIVITY_INSIGHTS_SETTINGS_SLEEP_SUMMARY_DEFAULT}, + {.key = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_REWARD, + .default_val = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_REWARD_DEFAULT}, + {.key = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SUMMARY, + .default_val = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SUMMARY_DEFAULT}, + {.key = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SESSION, + .default_val = ACTIVITY_INSIGHTS_SETTINGS_ACTIVITY_SESSION_DEFAULT}, }; // Return true if we successfully opened the file @@ -152,19 +133,15 @@ void activity_insights_settings_init(void) { // Create our mutex SettingsFile file; - if (settings_file_open(&file, - ACTIVITY_INSIGHTS_SETTINGS_FILENAME, + if (settings_file_open(&file, ACTIVITY_INSIGHTS_SETTINGS_FILENAME, ACTIVITY_INSIGHTS_SETTINGS_DEFAULT_FILE_SIZE) == S_SUCCESS) { - if (!settings_file_exists(&file, - ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY, + if (!settings_file_exists(&file, ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY, strlen(ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY))) { // init version to 0 const uint16_t default_version = ACTIVITY_INSIGHTS_SETTINGS_DEFAULT_VERSION; - settings_file_set(&file, - ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY, - strlen(ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY), - &default_version, - sizeof(uint16_t)); + settings_file_set(&file, ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY, + strlen(ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY), &default_version, + sizeof(uint16_t)); } settings_file_close(&file); @@ -181,11 +158,8 @@ uint16_t activity_insights_settings_get_version(void) { uint16_t version = ACTIVITY_INSIGHTS_SETTINGS_DEFAULT_VERSION; SettingsFile file; if (prv_open_settings_and_lock(&file)) { - settings_file_get(&file, - ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY, - strlen(ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY), - &version, - sizeof(uint16_t)); + settings_file_get(&file, ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY, + strlen(ACTIVITY_INSIGHTS_SETTINGS_VERSION_KEY), &version, sizeof(uint16_t)); prv_close_settings_and_unlock(&file); } return version; @@ -197,13 +171,12 @@ bool activity_insights_settings_read(const char *insight_name, return false; } bool rv = false; - *settings_out = (ActivityInsightSettings) {}; + *settings_out = (ActivityInsightSettings){}; SettingsFile file; if (prv_open_settings_and_lock(&file)) { - if (settings_file_get(&file, - insight_name, strlen(insight_name), - settings_out, sizeof(*settings_out)) != S_SUCCESS) { + if (settings_file_get(&file, insight_name, strlen(insight_name), settings_out, + sizeof(*settings_out)) != S_SUCCESS) { PBL_LOG_DBG("Didn't find insight with key %s", insight_name); goto close; } @@ -215,7 +188,7 @@ bool activity_insights_settings_read(const char *insight_name, } rv = true; -close: + close: prv_close_settings_and_unlock(&file); } @@ -232,8 +205,7 @@ bool activity_insights_settings_read(const char *insight_name, return rv; } -bool activity_insights_settings_write(const char *insight_name, - ActivityInsightSettings *settings) { +bool activity_insights_settings_write(const char *insight_name, ActivityInsightSettings *settings) { if (!activity_is_initialized()) { return false; } @@ -241,9 +213,8 @@ bool activity_insights_settings_write(const char *insight_name, SettingsFile file; if (prv_open_settings_and_lock(&file)) { - if (settings_file_set(&file, - insight_name, strlen(insight_name), - settings, sizeof(*settings)) != S_SUCCESS) { + if (settings_file_set(&file, insight_name, strlen(insight_name), settings, sizeof(*settings)) != + S_SUCCESS) { PBL_LOG_WRN("Unable to save insight setting with key %s", insight_name); } else { rv = true; @@ -255,7 +226,7 @@ bool activity_insights_settings_write(const char *insight_name, PFSCallbackHandle activity_insights_settings_watch(PFSFileChangedCallback callback) { if (!activity_is_initialized()) { - return 0; // Return invalid handle + return 0; // Return invalid handle } return pfs_watch_file(ACTIVITY_INSIGHTS_SETTINGS_FILENAME, callback, FILE_CHANGED_EVENT_CLOSED, NULL); diff --git a/src/fw/services/activity/kraepelin/activity_algorithm_kraepelin.c b/src/fw/services/activity/kraepelin/activity_algorithm_kraepelin.c index 18c2688711..cd772afb62 100644 --- a/src/fw/services/activity/kraepelin/activity_algorithm_kraepelin.c +++ b/src/fw/services/activity/kraepelin/activity_algorithm_kraepelin.c @@ -31,13 +31,12 @@ PBL_LOG_MODULE_DECLARE(service_activity, CONFIG_SERVICE_ACTIVITY_LOG_LEVEL); // NOTE: This file is called "activity_sleep" for legacy reasons. A better name now would be // something like "activity_minute_data", but we want to maintain compatibility with prior // releases that only used it for sleep data. -#define ALG_MINUTE_DATA_FILE_NAME "activity_sleep" - +#define ALG_MINUTE_DATA_FILE_NAME "activity_sleep" // How many records we need to store in our circular buffer // +1 for mgmt overhead -#define ALG_MINUTE_CBUF_NUM_RECORDS (MAX(ALG_MINUTES_PER_DLS_RECORD, ALG_MINUTES_PER_FILE_RECORD) \ - + KALG_MAX_UNCERTAIN_SLEEP_M + 1) +#define ALG_MINUTE_CBUF_NUM_RECORDS \ + (MAX(ALG_MINUTES_PER_DLS_RECORD, ALG_MINUTES_PER_FILE_RECORD) + KALG_MAX_UNCERTAIN_SLEEP_M + 1) // --------------------------------------------------------------------------------------------- // Globals @@ -52,7 +51,7 @@ typedef struct { // Last computed step rate information uint8_t rate_steps; uint16_t rate_elapsed_ms; - time_t rate_computed_time_s; + time_t rate_computed_time_s; // Minute data uint16_t minute_steps; @@ -83,7 +82,6 @@ typedef struct { } AlgState; static AlgState *s_alg_state = NULL; - // ---------------------------------------------------------------------------------------------- static bool prv_lock(void) { if (!s_alg_state) { @@ -114,7 +112,6 @@ static NOINLINE SettingsFile *prv_minute_data_file_open(void) { return file; } - // ------------------------------------------------------------------------------------------------ // Close the settings file and free the file struct static void prv_minute_data_file_close(SettingsFile *file) { @@ -122,7 +119,6 @@ static void prv_minute_data_file_close(SettingsFile *file) { kernel_free(file); } - // -------------------------------------------------------------------------------------------- // Return the settings file key associated with a particular UTC timestamp. Each entry // holds ALG_MINUTES_PER_RECORD minutes of data. To get the key index, we divide the UTC @@ -132,7 +128,6 @@ static uint32_t prv_minute_file_get_settings_key(time_t utc) { return utc / seconds_per_key; } - // ---------------------------------------------------------------------------------------------- // Callback provided to kalg_activities_update to create activity sessions. static void prv_create_activity_session_cb(void *context, KAlgActivityType kalg_activity, @@ -161,16 +156,16 @@ static void prv_create_activity_session_cb(void *context, KAlgActivityType kalg_ PBL_ASSERTN(activity != ActivitySessionTypeCount); ActivitySession session = { - .type = activity, - .start_utc = start_utc, - .length_min = len_sec / SECONDS_PER_MINUTE, - .ongoing = ongoing, - .step_data = { - .steps = steps, - .active_kcalories = ROUND(active_calories, ACTIVITY_CALORIES_PER_KCAL), - .resting_kcalories = ROUND(resting_calories, ACTIVITY_CALORIES_PER_KCAL), - .distance_meters = ROUND(distance_mm, MM_PER_METER), - }, + .type = activity, + .start_utc = start_utc, + .length_min = len_sec / SECONDS_PER_MINUTE, + .ongoing = ongoing, + .step_data = { + .steps = steps, + .active_kcalories = ROUND(active_calories, ACTIVITY_CALORIES_PER_KCAL), + .resting_kcalories = ROUND(resting_calories, ACTIVITY_CALORIES_PER_KCAL), + .distance_meters = ROUND(distance_mm, MM_PER_METER), + }, }; if (delete) { activity_sessions_prv_delete_activity_session(&session); @@ -179,7 +174,6 @@ static void prv_create_activity_session_cb(void *context, KAlgActivityType kalg_ } } - // ------------------------------------------------------------------------------------------ // Used from settings_file_each() callback to read in a chunk based on the SettingsRecordInfo // given to the callback. Returns true if the chunk is within the designated key range and @@ -208,7 +202,6 @@ static bool prv_read_minute_file_record(SettingsFile *file, SettingsRecordInfo * return true; } - // ---------------------------------------------------------------------------------------------- // The callback we give to settings_file_each to send the minute data to the logs typedef struct { @@ -220,7 +213,7 @@ typedef struct { } AlgLogMinuteFileContext; static bool prv_log_minute_file_minutes_cb(SettingsFile *file, SettingsRecordInfo *info, - void *context_param) { + void *context_param) { AlgLogMinuteFileContext *context = (AlgLogMinuteFileContext *)context_param; AlgMinuteFileRecord chunk; @@ -229,8 +222,8 @@ static bool prv_log_minute_file_minutes_cb(SettingsFile *file, SettingsRecordInf } // if in the wrong time range, skip it - if (chunk.hdr.time_utc < (uint32_t)context->oldest_valid_utc - || chunk.hdr.time_utc > (uint32_t)context->newest_valid_utc) { + if (chunk.hdr.time_utc < (uint32_t)context->oldest_valid_utc || + chunk.hdr.time_utc > (uint32_t)context->newest_valid_utc) { ACTIVITY_LOG_DEBUG("Minute chunk time out of range, skipping it"); return true; } @@ -255,7 +248,6 @@ static bool prv_log_minute_file_minutes_cb(SettingsFile *file, SettingsRecordInf return true; } - // ---------------------------------------------------------------------------------------------- // Log minute data to PBL_LOG // @param earliest_wake_time ignore any sleep cycles that end before this time. @@ -275,15 +267,14 @@ bool activity_algorithm_dump_minute_data_to_log(void) { // Figure out the oldest and newest possible time stamp for chunks that go into these buffers time_t now = rtc_get_time(); - const time_t k_oldest_valid_utc = now - - ALG_SLEEP_HISTORY_HOURS_FOR_TODAY * SECONDS_PER_HOUR; + const time_t k_oldest_valid_utc = now - ALG_SLEEP_HISTORY_HOURS_FOR_TODAY * SECONDS_PER_HOUR; const time_t k_newest_valid_utc = now; - AlgLogMinuteFileContext context = (AlgLogMinuteFileContext) { - .oldest_key = prv_minute_file_get_settings_key(k_oldest_valid_utc) - 1, - .newest_key = prv_minute_file_get_settings_key(k_newest_valid_utc) + 1, - .oldest_valid_utc = k_oldest_valid_utc, - .newest_valid_utc = k_newest_valid_utc, + AlgLogMinuteFileContext context = (AlgLogMinuteFileContext){ + .oldest_key = prv_minute_file_get_settings_key(k_oldest_valid_utc) - 1, + .newest_key = prv_minute_file_get_settings_key(k_newest_valid_utc) + 1, + .oldest_valid_utc = k_oldest_valid_utc, + .newest_valid_utc = k_newest_valid_utc, }; // Feed in the saved data, reading chunks out of the saved minute data and compressing @@ -299,7 +290,6 @@ bool activity_algorithm_dump_minute_data_to_log(void) { return success; } - // ---------------------------------------------------------------------------------------------- // Settings file rewrite callback used by prv_validate_and_trim_minute_file() when trimming off // old keys @@ -317,13 +307,13 @@ static bool prv_minute_file_rewrite_cb(void *key_arg, size_t key_len, void *val_ uint32_t key = *(uint32_t *)key_arg; if (val->hdr.version != ALG_MINUTE_FILE_RECORD_VERSION) { - ACTIVITY_LOG_DEBUG("Dropping key %"PRIu32", invalid version of %"PRIu16"", key, + ACTIVITY_LOG_DEBUG("Dropping key %" PRIu32 ", invalid version of %" PRIu16 "", key, val->hdr.version); return false; } if (key < context->oldest_valid_key || key > context->newest_valid_key) { - ACTIVITY_LOG_DEBUG("Dropping key %"PRIu32", record UTC of %"PRIu32"", key, + ACTIVITY_LOG_DEBUG("Dropping key %" PRIu32 ", record UTC of %" PRIu32 "", key, val->hdr.time_utc); return false; } @@ -340,7 +330,6 @@ static bool prv_minute_file_rewrite_cb(void *key_arg, size_t key_len, void *val_ return true; } - // ---------------------------------------------------------------------------------------------- // Scan the existing minute file, validate it, keep only the most recent 'max_records' records // If the file handle is not NULL, it will be used. Otherwise, the file will be opened and then @@ -366,27 +355,26 @@ static SettingsFile *prv_validate_and_trim_minute_file(SettingsFile *file, uint1 uint32_t newest_valid_key = prv_minute_file_get_settings_key(utc) + 1; int32_t oldest_valid_key = (int32_t)newest_valid_key - max_records; oldest_valid_key = MAX(0, oldest_valid_key); - AlgMinuteFileRewriteContext context = (AlgMinuteFileRewriteContext) { - .oldest_valid_key = oldest_valid_key, - .newest_valid_key = newest_valid_key, - .watchdog_kicks_left = max_records, + AlgMinuteFileRewriteContext context = (AlgMinuteFileRewriteContext){ + .oldest_valid_key = oldest_valid_key, + .newest_valid_key = newest_valid_key, + .watchdog_kicks_left = max_records, }; // Rewrite the settings file, keeping only the keys we need - PBL_LOG_DBG("Compacting minute file down to %"PRIu16" records", max_records); + PBL_LOG_DBG("Compacting minute file down to %" PRIu16 " records", max_records); status_t status = settings_file_rewrite_filtered(file, prv_minute_file_rewrite_cb, &context); // Error re-writing? if (status != S_SUCCESS) { - PBL_LOG_ERR("Encountered error %"PRIi32" rewriting settings file", - (int32_t)status); + PBL_LOG_ERR("Encountered error %" PRIi32 " rewriting settings file", (int32_t)status); nuke_file = true; } else { s_alg_state->num_minute_records = context.num_keys_kept; } - PBL_LOG_DBG("Compaction done, ended up with %"PRIu16" records", - s_alg_state->num_minute_records); + PBL_LOG_DBG("Compaction done, ended up with %" PRIu16 " records", + s_alg_state->num_minute_records); exit: if (file && (need_close || nuke_file)) { @@ -401,26 +389,24 @@ static SettingsFile *prv_validate_and_trim_minute_file(SettingsFile *file, uint1 return file; } - // ------------------------------------------------------------------------------------- static void prv_init_minute_record(AlgMinuteRecordHdr *hdr, time_t utc_sec, bool for_file) { time_t local_time = time_utc_to_local(utc_sec); int16_t local_time_offset_15_min = (local_time - utc_sec) / (15 * SECONDS_PER_MINUTE); - *hdr = (AlgMinuteRecordHdr) { - .version = for_file ? ALG_MINUTE_FILE_RECORD_VERSION : ALG_DLS_MINUTES_RECORD_VERSION, - .time_utc = utc_sec, - .time_local_offset_15_min = local_time_offset_15_min, - .sample_size = for_file ? sizeof(AlgMinuteFileSample) : sizeof(AlgMinuteDLSSample), + *hdr = (AlgMinuteRecordHdr){ + .version = for_file ? ALG_MINUTE_FILE_RECORD_VERSION : ALG_DLS_MINUTES_RECORD_VERSION, + .time_utc = utc_sec, + .time_local_offset_15_min = local_time_offset_15_min, + .sample_size = for_file ? sizeof(AlgMinuteFileSample) : sizeof(AlgMinuteDLSSample), }; } - // ------------------------------------------------------------------------------------- // We use NOINLINE to reduce the stack requirements during the minute handler (see PBL-38130) static void NOINLINE prv_set_file_minute_record_entry(AlgMinuteFileRecord *file_record, - AlgMinuteDLSSample *data, uint16_t sample_idx, - time_t sample_utc, bool was_sleeping) { + AlgMinuteDLSSample *data, uint16_t sample_idx, + time_t sample_utc, bool was_sleeping) { if (sample_idx == 0) { // If first record, init the header prv_init_minute_record(&file_record->hdr, sample_utc, true /*to_file*/); @@ -438,7 +424,6 @@ static void NOINLINE prv_set_file_minute_record_entry(AlgMinuteFileRecord *file_ } } - // ------------------------------------------------------------------------------------ // Add a record to the minute file static bool prv_write_minute_file_record(AlgMinuteFileRecord *file_record) { @@ -451,12 +436,12 @@ static bool prv_write_minute_file_record(AlgMinuteFileRecord *file_record) { } uint32_t key = prv_minute_file_get_settings_key(file_record->hdr.time_utc); - status_t status = settings_file_set(minute_file, &key, sizeof(key), file_record, - sizeof(*file_record)); + status_t status = + settings_file_set(minute_file, &key, sizeof(key), file_record, sizeof(*file_record)); if (status == E_OUT_OF_STORAGE) { uint16_t max_records = s_alg_state->num_minute_records / 2; - PBL_LOG_INFO("Compacting minute file from %"PRIu16" records to %"PRIu16"", - s_alg_state->num_minute_records, max_records); + PBL_LOG_INFO("Compacting minute file from %" PRIu16 " records to %" PRIu16 "", + s_alg_state->num_minute_records, max_records); minute_file = prv_validate_and_trim_minute_file(minute_file, max_records); if (!minute_file) { goto exit; @@ -467,8 +452,7 @@ static bool prv_write_minute_file_record(AlgMinuteFileRecord *file_record) { // Was there an error writing the value out? if (status != S_SUCCESS) { - PBL_LOG_ERR("Error %"PRIi32" writing out minute data to minute file", - (int32_t)status); + PBL_LOG_ERR("Error %" PRIi32 " writing out minute data to minute file", (int32_t)status); } else { s_alg_state->num_minute_records++; success = true; @@ -481,7 +465,6 @@ static bool prv_write_minute_file_record(AlgMinuteFileRecord *file_record) { return success; } - // ------------------------------------------------------------------------------------- static DataLoggingSession *prv_get_dls_minute_session(void) { // Open up the data logging session if we don't have one @@ -491,9 +474,9 @@ static DataLoggingSession *prv_get_dls_minute_session(void) { const bool buffered = false; const bool resume = false; Uuid system_uuid = UUID_SYSTEM; - s_alg_state->dls_session = dls_create(DlsSystemTagActivityMinuteData, DATA_LOGGING_BYTE_ARRAY, - sizeof(AlgMinuteDLSRecord), buffered, resume, - &system_uuid); + s_alg_state->dls_session = + dls_create(DlsSystemTagActivityMinuteData, DATA_LOGGING_BYTE_ARRAY, + sizeof(AlgMinuteDLSRecord), buffered, resume, &system_uuid); if (!s_alg_state->dls_session) { // This can happen when you are not connected to the phone and have rebooted a number of // times because each time you reboot, you get new sessions created and reach the limit @@ -505,12 +488,11 @@ static DataLoggingSession *prv_get_dls_minute_session(void) { return s_alg_state->dls_session; } - // ------------------------------------------------------------------------------------- // We use NOINLINE to reduce the stack requirements during the minute handler (see PBL-38130) static void NOINLINE prv_set_dls_minute_record_entry(AlgMinuteDLSRecord *dls_record, - AlgMinuteDLSSample *data, uint16_t sample_idx, - time_t sample_utc, bool was_sleeping) { + AlgMinuteDLSSample *data, uint16_t sample_idx, + time_t sample_utc, bool was_sleeping) { if (sample_idx == 0) { // If first record, init the header prv_init_minute_record(&dls_record->hdr, sample_utc, false /*to_file*/); @@ -522,8 +504,8 @@ static void NOINLINE prv_set_dls_minute_record_entry(AlgMinuteDLSRecord *dls_rec if (was_sleeping && (dls_record->samples[sample_idx].base.steps != 0)) { // Subtract from our total steps since we decided we were definitely sleeping during // this minute - PBL_LOG_DBG("Subtracting %"PRIu8" steps that occurred during sleep", - dls_record->samples[sample_idx].base.steps); + PBL_LOG_DBG("Subtracting %" PRIu8 " steps that occurred during sleep", + dls_record->samples[sample_idx].base.steps); s_alg_state->steps -= dls_record->samples[sample_idx].base.steps; s_alg_state->steps = MAX(0, s_alg_state->steps); dls_record->samples[sample_idx].base.steps = 0; @@ -533,7 +515,6 @@ static void NOINLINE prv_set_dls_minute_record_entry(AlgMinuteDLSRecord *dls_rec } } - // ------------------------------------------------------------------------------------- // Prepare a minute record for writing. Either file_record or dls_record should be non-NULL, // never both. @@ -543,16 +524,18 @@ static bool NOINLINE prv_prepare_minute_data(uint16_t uncertain_m, time_t sleep_ uint16_t sleep_len_m, AlgMinuteFileRecord *file_record, AlgMinuteDLSRecord *dls_record, bool force_send) { // Get the circular buffer client we are working with - SharedCircularBufferClient *cbuf_client = file_record ? &s_alg_state->file_minute_data_client - : &s_alg_state->dls_minute_data_client; - const int16_t minutes_per_record = file_record ? ALG_MINUTES_PER_FILE_RECORD : - ALG_MINUTES_PER_DLS_RECORD; + SharedCircularBufferClient *cbuf_client = + file_record ? &s_alg_state->file_minute_data_client : &s_alg_state->dls_minute_data_client; + const int16_t minutes_per_record = + file_record ? ALG_MINUTES_PER_FILE_RECORD : ALG_MINUTES_PER_DLS_RECORD; // Empty the circular buffer while we have enough for a record time_t sleep_end_utc = sleep_start_utc + (sleep_len_m * SECONDS_PER_MINUTE); int16_t certain_m = (shared_circular_buffer_get_read_space_remaining( - &s_alg_state->minute_data_cbuf, cbuf_client) / sizeof(AlgMinuteRecord)) - uncertain_m; + &s_alg_state->minute_data_cbuf, cbuf_client) / + sizeof(AlgMinuteRecord)) - + uncertain_m; int minutes_this_record = MIN(certain_m, minutes_per_record); if (minutes_this_record == 0) { // nothing to send, even if we really wanted to @@ -566,17 +549,17 @@ static bool NOINLINE prv_prepare_minute_data(uint16_t uncertain_m, time_t sleep_ AlgMinuteRecord *cbuf_record = &s_alg_state->cbuf_record; for (int i = 0; i < minutes_this_record; i++) { uint16_t length_out; - bool success = shared_circular_buffer_read_consume( - &s_alg_state->minute_data_cbuf, cbuf_client, sizeof(*cbuf_record), (uint8_t *)cbuf_record, - &length_out); + bool success = shared_circular_buffer_read_consume(&s_alg_state->minute_data_cbuf, cbuf_client, + sizeof(*cbuf_record), (uint8_t *)cbuf_record, + &length_out); PBL_ASSERTN(success); // See if we need to zero out steps in this record. We check that the start of the minute // is within the sleep bounds. The WITHIN macro returns true if the test value is // <= end_value, so we need to subtract one minute from the end to see if the start of this // test minute is entirely within the sleep range. - bool was_sleeping = WITHIN(cbuf_record->utc_sec, sleep_start_utc, - sleep_end_utc - SECONDS_PER_MINUTE); + bool was_sleeping = + WITHIN(cbuf_record->utc_sec, sleep_start_utc, sleep_end_utc - SECONDS_PER_MINUTE); // Handle writing the record out to PFS if (file_record) { @@ -592,13 +575,11 @@ static bool NOINLINE prv_prepare_minute_data(uint16_t uncertain_m, time_t sleep_ return true; } - - // ------------------------------------------------------------------------------------- // If we have enough minute data in our circular buffer, write it out to either the minute // file or to data logging -static void prv_send_minute_data(uint16_t uncertain_m, time_t sleep_start_utc, - uint16_t sleep_len_m, bool to_file, bool force_send) { +static void prv_send_minute_data(uint16_t uncertain_m, time_t sleep_start_utc, uint16_t sleep_len_m, + bool to_file, bool force_send) { // If writing to DLS, make sure we can open up the session we need first DataLoggingSession *dls_session = NULL; AlgMinuteFileRecord *file_record = NULL; @@ -617,11 +598,7 @@ static void prv_send_minute_data(uint16_t uncertain_m, time_t sleep_start_utc, } // While we have whole minute records available for sending, send them. - while (prv_prepare_minute_data(uncertain_m, - sleep_start_utc, - sleep_len_m, - file_record, - dls_record, + while (prv_prepare_minute_data(uncertain_m, sleep_start_utc, sleep_len_m, file_record, dls_record, force_send)) { PBL_ASSERTN((file_record == NULL) != (dls_record == NULL)); if (file_record) { @@ -632,17 +609,16 @@ static void prv_send_minute_data(uint16_t uncertain_m, time_t sleep_start_utc, // Handle writing the record out to data logging DataLoggingResult result = dls_log(dls_session, dls_record, 1); // PBL-43622: Will revert later - PBL_LOG_DBG("Logging %"PRIu8" MLD Records, First UTC: %"PRIu32, - dls_record->hdr.num_samples, dls_record->hdr.time_utc); + PBL_LOG_DBG("Logging %" PRIu8 " MLD Records, First UTC: %" PRIu32, + dls_record->hdr.num_samples, dls_record->hdr.time_utc); if (result != DATA_LOGGING_SUCCESS) { - PBL_LOG_WRN("Error %"PRIi32" while logging activity data", (int32_t) result); + PBL_LOG_WRN("Error %" PRIi32 " while logging activity data", (int32_t)result); return; } } } } - // ------------------------------------------------------------------------------------------- // Handle storage and logging of the minute data static void prv_log_minute_data(time_t utc_now, AlgMinuteRecord *minute_rec) { @@ -686,7 +662,6 @@ static void prv_log_minute_data(time_t utc_now, AlgMinuteRecord *minute_rec) { true /*to_file*/, false /*force_send*/); } - // ------------------------------------------------------------------------------------ void activity_algorithm_send_minutes(void) { if (!prv_lock()) { @@ -701,7 +676,6 @@ void activity_algorithm_send_minutes(void) { prv_unlock(); } - // ------------------------------------------------------------------------------------ time_t activity_algorithm_get_last_sleep_utc(void) { if (!prv_lock()) { @@ -712,7 +686,6 @@ time_t activity_algorithm_get_last_sleep_utc(void) { return rv; } - // ------------------------------------------------------------------------------------ // Post-process the passed in sleep sessions. This function identifies which sleep sessions are // nap sessions and labels them as such @@ -736,7 +709,7 @@ void activity_algorithm_post_process_sleep_sessions(uint16_t num_input_sessions, const time_t end_utc = session->start_utc + (session->length_min * SECONDS_PER_MINUTE); const unsigned end_minute = time_util_get_minute_of_day(end_utc); - ACTIVITY_LOG_DEBUG("processing activity %d, start_min: %u, len: %"PRIu16"", + ACTIVITY_LOG_DEBUG("processing activity %d, start_min: %u, len: %" PRIu16 "", (int)session->type, start_minute, session->length_min); // Skip if not a sleep session @@ -752,8 +725,8 @@ void activity_algorithm_post_process_sleep_sessions(uint16_t num_input_sessions, } // Skip if already labeled as a nap session - if ((session->type == ActivitySessionType_Nap) - || (session->type == ActivitySessionType_RestfulNap)) { + if ((session->type == ActivitySessionType_Nap) || + (session->type == ActivitySessionType_RestfulNap)) { if (session->type == ActivitySessionType_Nap) { most_recent_nap_session = session; } @@ -761,9 +734,9 @@ void activity_algorithm_post_process_sleep_sessions(uint16_t num_input_sessions, continue; } - if ((session->length_min > ALG_MAX_NAP_MINUTES) - || !WITHIN(start_minute, ALG_PRIMARY_MORNING_MINUTE, ALG_PRIMARY_EVENING_MINUTE) - || !WITHIN(end_minute, ALG_PRIMARY_MORNING_MINUTE, ALG_PRIMARY_EVENING_MINUTE)) { + if ((session->length_min > ALG_MAX_NAP_MINUTES) || + !WITHIN(start_minute, ALG_PRIMARY_MORNING_MINUTE, ALG_PRIMARY_EVENING_MINUTE) || + !WITHIN(end_minute, ALG_PRIMARY_MORNING_MINUTE, ALG_PRIMARY_EVENING_MINUTE)) { // If too long, or not within the primary sleep range, can't be a nap ACTIVITY_LOG_DEBUG("Not within nap time bounds or duration"); continue; @@ -777,29 +750,28 @@ void activity_algorithm_post_process_sleep_sessions(uint16_t num_input_sessions, if (most_recent_nap_session == NULL) { continue; } - if ((session->start_utc < most_recent_nap_session->start_utc) - || (session->start_utc > (most_recent_nap_session->start_utc - + (most_recent_nap_session->length_min * SECONDS_PER_MINUTE)))) { + if ((session->start_utc < most_recent_nap_session->start_utc) || + (session->start_utc > (most_recent_nap_session->start_utc + + (most_recent_nap_session->length_min * SECONDS_PER_MINUTE)))) { continue; } } // Label it as a nap if (session->type == ActivitySessionType_Sleep) { - PBL_LOG_DBG("Found nap - start_utc: %d, start_min: %u, len: %"PRIu16" ", - (int)session->start_utc, start_minute, session->length_min); + PBL_LOG_DBG("Found nap - start_utc: %d, start_min: %u, len: %" PRIu16 " ", + (int)session->start_utc, start_minute, session->length_min); session->type = ActivitySessionType_Nap; most_recent_nap_session = session; } else if (session->type == ActivitySessionType_RestfulSleep) { - PBL_LOG_DBG("Found restful nap - start_utc: %d, start_min: %u, len: %"PRIu16" ", - (int)session->start_utc, start_minute, session->length_min); + PBL_LOG_DBG("Found restful nap - start_utc: %d, start_min: %u, len: %" PRIu16 " ", + (int)session->start_utc, start_minute, session->length_min); session->type = ActivitySessionType_RestfulNap; } } prv_unlock(); } - // ------------------------------------------------------------------------------------ bool activity_algorithm_init(AccelSamplingRate *sampling_rate) { // Allocate kraepelin state and our globals @@ -815,8 +787,8 @@ bool activity_algorithm_init(AccelSamplingRate *sampling_rate) { } // Init globals - *s_alg_state = (AlgState) { - .k_state = k_state, + *s_alg_state = (AlgState){ + .k_state = k_state, }; pbl_mutex_init(&s_alg_state->mutex); shared_circular_buffer_init(&s_alg_state->minute_data_cbuf, @@ -837,8 +809,7 @@ bool activity_algorithm_init(AccelSamplingRate *sampling_rate) { activity_algorithm_minute_file_info(false /*compact_first*/, &num_records, &data_bytes, &minutes); s_alg_state->num_minute_records = num_records; - PBL_LOG_DBG("Found %"PRIu16" records in minute file", - s_alg_state->num_minute_records); + PBL_LOG_DBG("Found %" PRIu16 " records in minute file", s_alg_state->num_minute_records); // Reset all metrics activity_algorithm_metrics_changed_notification(); @@ -881,14 +852,12 @@ bool activity_algorithm_deinit(void) { return true; } - // ------------------------------------------------------------------------------------ bool activity_algorithm_set_user(uint32_t height_mm, uint32_t weight_g, ActivityGender gender, uint32_t age_years) { return true; } - // ------------------------------------------------------------------------------------ void activity_algorithm_handle_accel(AccelRawData *data, uint32_t num_samples, uint64_t timestamp_ms) { @@ -896,28 +865,26 @@ void activity_algorithm_handle_accel(AccelRawData *data, uint32_t num_samples, return; } uint32_t consumed_samples; - uint16_t new_steps = kalg_analyze_samples(s_alg_state->k_state, data, num_samples, - &consumed_samples); + uint16_t new_steps = + kalg_analyze_samples(s_alg_state->k_state, data, num_samples, &consumed_samples); s_alg_state->steps += new_steps; s_alg_state->minute_steps += new_steps; // Update our stepping rate if the algorithm just consumed samples if (consumed_samples != 0) { s_alg_state->rate_steps = new_steps; - s_alg_state->rate_elapsed_ms = (consumed_samples * MS_PER_SECOND) / KALG_SAMPLE_HZ; + s_alg_state->rate_elapsed_ms = (consumed_samples * MS_PER_SECOND) / KALG_SAMPLE_HZ; s_alg_state->rate_computed_time_s = timestamp_ms / MS_PER_SECOND; } prv_unlock(); } - // ------------------------------------------------------------------------------------ // We use NOINLINE to reduce the stack requirements during the minute handler (see PBL-38130) // Returns distance we traveled in the last minute, in mm. static uint32_t NOINLINE prv_fill_minute_record(time_t utc_sec, AlgMinuteDLSSample *m_rec) { bool still; - kalg_minute_stats(s_alg_state->k_state, &m_rec->base.vmc, - &m_rec->base.orientation, &still); + kalg_minute_stats(s_alg_state->k_state, &m_rec->base.vmc, &m_rec->base.orientation, &still); m_rec->base.steps = MIN(s_alg_state->minute_steps, UINT8_MAX); @@ -958,10 +925,10 @@ static uint32_t NOINLINE prv_fill_minute_record(time_t utc_sec, AlgMinuteDLSSamp } static void NOINLINE prv_reset_state_minute_handler(const AlgMinuteDLSSample *m_rec) { - s_alg_state->prev_resting_calories = activity_metrics_prv_get_resting_calories(); - s_alg_state->prev_active_calories = activity_metrics_prv_get_active_calories(); - s_alg_state->prev_distance_mm = activity_metrics_prv_get_distance_mm(); - activity_metrics_prv_reset_hr_stats(); + s_alg_state->prev_resting_calories = activity_metrics_prv_get_resting_calories(); + s_alg_state->prev_active_calories = activity_metrics_prv_get_active_calories(); + s_alg_state->prev_distance_mm = activity_metrics_prv_get_distance_mm(); + activity_metrics_prv_reset_hr_stats(); } static void prv_activity_update_states(time_t utc_sec, AlgMinuteRecord *record_out, @@ -984,10 +951,11 @@ static void prv_activity_update_states(time_t utc_sec, AlgMinuteRecord *record_o const bool hrm_offwrist = activity_metrics_prv_is_hrm_offwrist(utc_sec); const bool not_worn = m_rec->base.plugged_in || hrm_offwrist; - ACTIVITY_LOG_DEBUG("minute handler: steps: %"PRIu8", orientation: 0x%"PRIx8", vmc: %"PRIu16", " - "light: %"PRIu8", plugged_in: %d, hrm_offwrist: %d", - m_rec->base.steps, m_rec->base.orientation, m_rec->base.vmc, - m_rec->base.light, (int) m_rec->base.plugged_in, (int) hrm_offwrist); + ACTIVITY_LOG_DEBUG("minute handler: steps: %" PRIu8 ", orientation: 0x%" PRIx8 ", vmc: %" PRIu16 + ", " + "light: %" PRIu8 ", plugged_in: %d, hrm_offwrist: %d", + m_rec->base.steps, m_rec->base.orientation, m_rec->base.vmc, m_rec->base.light, + (int)m_rec->base.plugged_in, (int)hrm_offwrist); // Pass the minute data onto the activity detection logic kalg_activities_update(s_alg_state->k_state, utc_sec, m_rec->base.steps, m_rec->base.vmc, @@ -1012,7 +980,6 @@ void activity_algorithm_minute_handler(time_t utc_sec, AlgMinuteRecord *record_o prv_unlock(); } - // ------------------------------------------------------------------------------------ bool activity_algorithm_get_steps(uint32_t *steps) { if (!prv_lock()) { @@ -1023,7 +990,6 @@ bool activity_algorithm_get_steps(uint32_t *steps) { return true; } - // ------------------------------------------------------------------------------------ bool activity_algorithm_get_step_rate(uint16_t *steps, uint32_t *elapsed_ms, time_t *end_sec) { if (!prv_lock()) { @@ -1036,7 +1002,6 @@ bool activity_algorithm_get_step_rate(uint16_t *steps, uint32_t *elapsed_ms, tim return true; } - // ------------------------------------------------------------------------------------ bool activity_algorithm_metrics_changed_notification(void) { if (!prv_lock()) { @@ -1080,7 +1045,6 @@ typedef struct { int32_t last_record_idx_written; } AlgReadMinutesContext; - // ---------------------------------------------------------------------------------------------- // Insert a HealthMinuteRecord into the correct place in the activity_algorithm_get_minute_history // caller's array. Returns true if we don't need to insert any more records (this one is already @@ -1122,11 +1086,11 @@ static bool prv_insert_health_minute_record(AlgReadMinutesContext *context, time uint32_t raw_light = base_fields->light * ALG_RAW_LIGHT_SENSOR_DIVIDE_BY; AmbientLightLevel health_light_level = ambient_light_level_to_enum(raw_light); HealthMinuteData record = { - .steps = base_fields->steps, - .orientation = base_fields->orientation, - .vmc = base_fields->vmc, - .light = health_light_level, - .heart_rate_bpm = heart_rate_bpm, + .steps = base_fields->steps, + .orientation = base_fields->orientation, + .vmc = base_fields->vmc, + .light = health_light_level, + .heart_rate_bpm = heart_rate_bpm, }; context->minute_data[dst_index] = record; @@ -1134,7 +1098,6 @@ static bool prv_insert_health_minute_record(AlgReadMinutesContext *context, time return false; } - // ---------------------------------------------------------------------------------------------- // The callback we give to settings_file_each to read in the minute data for // activity_algorithm_get_minute_history() @@ -1152,7 +1115,8 @@ static bool prv_read_minute_history_file_cb(SettingsFile *file, SettingsRecordIn const uint32_t k_seconds_per_chunk = ALG_MINUTES_PER_FILE_RECORD * SECONDS_PER_MINUTE; if (chunk.hdr.time_utc + k_seconds_per_chunk < (uint32_t)context->oldest_requested_utc) { ACTIVITY_LOG_DEBUG("Minute chunk time out of range, skipping it"); - return true;; + return true; + ; } // Insert each of the minutes from this chunk into the caller's array @@ -1170,7 +1134,6 @@ static bool prv_read_minute_history_file_cb(SettingsFile *file, SettingsRecordIn return true; } - // ---------------------------------------------------------------------------------------------- // Fetch whatever records we have in our minute history circular buffer (i.e. not yet written // to flash) to satisfy a get_minute_history() request. The passed in context contains the info on @@ -1182,20 +1145,21 @@ static void prv_read_minute_history_buffer(AlgReadMinutesContext *context) { AlgMinuteRecord *cbuf_record = &s_alg_state->cbuf_record; int16_t avail_minutes = (shared_circular_buffer_get_read_space_remaining( - &s_alg_state->minute_data_cbuf, cbuf_client) / sizeof(*cbuf_record)); + &s_alg_state->minute_data_cbuf, cbuf_client) / + sizeof(*cbuf_record)); // Insert data from ram into the caller's minute buffer while (avail_minutes--) { // Read the next minute out of the buffer uint16_t length_out; - bool success = shared_circular_buffer_read_consume( - &s_alg_state->minute_data_cbuf, cbuf_client, sizeof(*cbuf_record), (uint8_t *)cbuf_record, - &length_out); + bool success = shared_circular_buffer_read_consume(&s_alg_state->minute_data_cbuf, cbuf_client, + sizeof(*cbuf_record), (uint8_t *)cbuf_record, + &length_out); PBL_ASSERTN(success); time_t record_utc = cbuf_record->utc_sec; bool done = prv_insert_health_minute_record(context, record_utc, &cbuf_record->data.base, - cbuf_record->data.heart_rate_bpm); + cbuf_record->data.heart_rate_bpm); if (done) { // we are done goto exit; @@ -1219,7 +1183,6 @@ static void prv_read_minute_history_buffer(AlgReadMinutesContext *context) { *cbuf_client = cbuf_client_bck; } - // ------------------------------------------------------------------------------- bool activity_algorithm_get_minute_history(HealthMinuteData *minute_data, uint32_t *num_records, time_t *utc_start) { @@ -1243,20 +1206,20 @@ bool activity_algorithm_get_minute_history(HealthMinuteData *minute_data, uint32 // Figure out the lowest key value for for chunks that go into this buffer time_t utc_now = rtc_get_time(); - const time_t oldest_possible = utc_now - - ALG_MINUTE_FILE_MAX_ENTRIES * ALG_MINUTES_PER_FILE_RECORD * SECONDS_PER_MINUTE; + const time_t oldest_possible = + utc_now - ALG_MINUTE_FILE_MAX_ENTRIES * ALG_MINUTES_PER_FILE_RECORD * SECONDS_PER_MINUTE; time_t oldest_requested_utc = *utc_start; oldest_requested_utc = MAX(oldest_possible, oldest_requested_utc); // Create the context - AlgReadMinutesContext context = (AlgReadMinutesContext) { - .minute_data = minute_data, - .array_size = array_size, - .oldest_key = prv_minute_file_get_settings_key(oldest_requested_utc) - 1, - .newest_key = prv_minute_file_get_settings_key(utc_now) + 1, - .utc_start = 0, - .oldest_requested_utc = oldest_requested_utc, - .last_record_idx_written = -1, + AlgReadMinutesContext context = (AlgReadMinutesContext){ + .minute_data = minute_data, + .array_size = array_size, + .oldest_key = prv_minute_file_get_settings_key(oldest_requested_utc) - 1, + .newest_key = prv_minute_file_get_settings_key(utc_now) + 1, + .utc_start = 0, + .oldest_requested_utc = oldest_requested_utc, + .last_record_idx_written = -1, }; // Read the minute data from flash @@ -1286,7 +1249,6 @@ bool activity_algorithm_get_minute_history(HealthMinuteData *minute_data, uint32 return success; } - // ------------------------------------------------------------------------------- // Get info on the minute data file typedef struct { @@ -1317,7 +1279,7 @@ bool activity_algorithm_minute_file_info(bool compact_first, uint32_t *num_recor } // Count # of records in minute file - AlgMinuteFileInfoContext context = (AlgMinuteFileInfoContext) {}; + AlgMinuteFileInfoContext context = (AlgMinuteFileInfoContext){}; status_t status = settings_file_each(file, prv_read_minute_file_info_cb, &context); if (status != S_SUCCESS) { @@ -1343,13 +1305,12 @@ bool activity_algorithm_minute_file_info(bool compact_first, uint32_t *num_recor return success; } - // ------------------------------------------------------------------------------- bool activity_algorithm_test_fill_minute_file(void) { bool success = false; time_t utc_sec = rtc_get_time() - SECONDS_PER_MINUTE; - AlgMinuteFileRecord record = { }; + AlgMinuteFileRecord record = {}; prv_init_minute_record(&record.hdr, utc_sec, true /*for_file*/); // Delete old file so this doesn't take forever, in case it's already got a lot of data in it @@ -1359,7 +1320,7 @@ bool activity_algorithm_test_fill_minute_file(void) { uint32_t secs_per_record = ALG_MINUTES_PER_FILE_RECORD * SECONDS_PER_MINUTE; time_t start_utc = utc_sec - ALG_MINUTE_FILE_MAX_ENTRIES * secs_per_record; - PBL_LOG_DBG("Writing %"PRIu32" records", (uint32_t) ALG_MINUTE_FILE_MAX_ENTRIES); + PBL_LOG_DBG("Writing %" PRIu32 " records", (uint32_t)ALG_MINUTE_FILE_MAX_ENTRIES); // Fill up the minute file to capacity, starting from back in time uint8_t heart_rate = 50; @@ -1374,8 +1335,7 @@ bool activity_algorithm_test_fill_minute_file(void) { if (heart_rate > 150) { heart_rate = 50; } - } - else { + } else { record.samples[j].heart_rate_bpm = 0; } record.samples[j].v5_fields.steps = i + 10; @@ -1386,39 +1346,39 @@ bool activity_algorithm_test_fill_minute_file(void) { } system_task_watchdog_feed(); if ((i % 25) == 0) { - PBL_LOG_DBG("wrote %"PRIu32" records...", i); + PBL_LOG_DBG("wrote %" PRIu32 " records...", i); } } - PBL_LOG_DBG("Done. End # of records: %"PRIu16, s_alg_state->num_minute_records); + PBL_LOG_DBG("Done. End # of records: %" PRIu16, s_alg_state->num_minute_records); return success; } - // ------------------------------------------------------------------------------- // Immediately send a fake logging record to data logging. This aids in testing the mobile // app bool activity_algorithm_test_send_fake_minute_data_dls_record(void) { - AlgMinuteDLSRecord record = { }; + AlgMinuteDLSRecord record = {}; prv_init_minute_record(&record.hdr, rtc_get_time() - (ALG_MINUTES_PER_DLS_RECORD * SECONDS_PER_MINUTE), false /*for_file*/); // Fill in fake data for (uint32_t i = 0; i < ALG_MINUTES_PER_FILE_RECORD; i++) { - record.samples[i] = (AlgMinuteDLSSample) { - .base = { - .steps = i, - .orientation = 20 + i, - .vmc = 40 + i, - .light = 60 + i, - }, - .resting_calories = 1000 + i, - .active_calories = 2000 + i, - .distance_cm = 100 + i, - .heart_rate_bpm = 60 + i, - .heart_rate_total_weight_x100 = 100 + i, - .heart_rate_zone = hr_util_get_hr_zone(60 + i), + record.samples[i] = (AlgMinuteDLSSample){ + .base = + { + .steps = i, + .orientation = 20 + i, + .vmc = 40 + i, + .light = 60 + i, + }, + .resting_calories = 1000 + i, + .active_calories = 2000 + i, + .distance_cm = 100 + i, + .heart_rate_bpm = 60 + i, + .heart_rate_total_weight_x100 = 100 + i, + .heart_rate_zone = hr_util_get_hr_zone(60 + i), }; } diff --git a/src/fw/services/activity/kraepelin/kraepelin_algorithm.c b/src/fw/services/activity/kraepelin/kraepelin_algorithm.c index 3139194390..c1b02016c8 100644 --- a/src/fw/services/activity/kraepelin/kraepelin_algorithm.c +++ b/src/fw/services/activity/kraepelin/kraepelin_algorithm.c @@ -44,8 +44,7 @@ Pebble App project. PBL_LOG_MODULE_DECLARE(service_activity, CONFIG_SERVICE_ACTIVITY_LOG_LEVEL); -#define KALG_LOG_DEBUG(fmt, args...) \ - PBL_LOG_D_DBG(LOG_DOMAIN_ACTIVITY, fmt, ## args) +#define KALG_LOG_DEBUG(fmt, args...) PBL_LOG_D_DBG(LOG_DOMAIN_ACTIVITY, fmt, ##args) // Set this to 1 to get text graphs of the overall FFT magnitudes #define KALG_LOG_OVERALL_MAGNITUDES 0 @@ -57,11 +56,11 @@ PBL_LOG_MODULE_DECLARE(service_activity, CONFIG_SERVICE_ACTIVITY_LOG_LEVEL); // Internal equates // 5*25 = 125 samples recorded, 5 seconds for step count -#define KALG_N_SAMPLES_EPOCH (5 * 25) +#define KALG_N_SAMPLES_EPOCH (5 * 25) // We drop these LS bits from each accel sample -#define KALG_ACCEL_SAMPLE_DIV 8 -#define KALG_ACCEL_SAMPLE_SHIFT 3 +#define KALG_ACCEL_SAMPLE_DIV 8 +#define KALG_ACCEL_SAMPLE_SHIFT 3 // Axes #define KALG_N_AXES 3 @@ -70,11 +69,11 @@ PBL_LOG_MODULE_DECLARE(service_activity, CONFIG_SERVICE_ACTIVITY_LOG_LEVEL); #define KALG_AXIS_Z 2 // For each minute, take a weighted integral of the N minutes before and after it. -#define KALG_SLEEP_HALF_WIDTH 4 -#define KALG_SLEEP_FILTER_WIDTH (2 * KALG_SLEEP_HALF_WIDTH + 1) +#define KALG_SLEEP_HALF_WIDTH 4 +#define KALG_SLEEP_FILTER_WIDTH (2 * KALG_SLEEP_HALF_WIDTH + 1) // 2^7 = 128 elements > 125 to allow fft -#define KALG_FFT_WIDTH 128 +#define KALG_FFT_WIDTH 128 // 2^7 = 128 elements > 125 to allow fft static const int16_t KALG_FFT_WIDTH_PWR_TWO = 7; @@ -87,7 +86,7 @@ static const int16_t KALG_FFT_SCALE = 2; // convert the raw pim cpm to the actigraph vmcpm // used for both VMCPM and CPM (cause a linear relation) -static const uint32_t KALG_x100_RAW_1G_PIM_CPM_TO_REAL_CPM = 2408; +static const uint32_t KALG_x100_RAW_1G_PIM_CPM_TO_REAL_CPM = 2408; // How much we quantize the angle when returning orientation static const uint32_t KALG_NUM_ANGLES = 16; @@ -104,15 +103,15 @@ static const int KALG_MAX_STEP_FREQ = 20; // State information for the walk activity detection typedef struct { - time_t start_time; // potential start time of the activity - // default: KALG_START_TIME_NONE - int inactive_minute_count; // how many inactive minutes in a row we have detected - uint16_t steps; // summed steps - uint32_t resting_calories; // summed resting calories - uint32_t active_calories; // summed active calories - uint32_t distance_mm; // summed distance - - HRMSessionRef hrm_session; // current hrm session + time_t start_time; // potential start time of the activity + // default: KALG_START_TIME_NONE + int inactive_minute_count; // how many inactive minutes in a row we have detected + uint16_t steps; // summed steps + uint32_t resting_calories; // summed resting calories + uint32_t active_calories; // summed active calories + uint32_t distance_mm; // summed distance + + HRMSessionRef hrm_session; // current hrm session } KAlgStepActivityState; // Returned by prv_get_step_activity_attributes() and used for classifying activities @@ -121,7 +120,6 @@ typedef struct { uint16_t max_steps_per_min; } KAlgActivityAttributes; - // ---------------------------------------------------------------------------------------- // Sleep detection structures // The data for each minute that we use for computing sleep @@ -133,7 +131,7 @@ typedef struct { // State information for sleep detection typedef struct { - time_t start_time; // KALG_START_TIME_NONE if no start detected yet + time_t start_time; // KALG_START_TIME_NONE if no start detected yet uint16_t num_non_zero_minutes; uint32_t vmc_sum; uint16_t consecutive_sleep_minutes; @@ -143,7 +141,7 @@ typedef struct { typedef struct { // We do a convolution of encoded VMC values to get a score. This convolution requires // the KALG_SLEEP_HALF_WIDTH entries that come before and after the center point. - uint8_t num_history_entries; // how many entries are in vmc_history and orientation + uint8_t num_history_entries; // how many entries are in vmc_history and orientation KAlgSleepMinute minute_history[KALG_SLEEP_FILTER_WIDTH]; KAlgSleepActivityStats current_stats; @@ -192,72 +190,70 @@ typedef struct { uint16_t min_sleep_len_for_active_pct_check; } KAlgSleepParams; - // Set the sleep parameters #if defined(CONFIG_BOARD_ASTERIX) static const KAlgSleepParams KALG_SLEEP_PARAMS = { - .max_sleep_minute_score = 500, // Increased significantly for asterix - much stricter - .force_wake_minute_score = 8000, - .force_wake_minute_vmc = 10000, - .min_sleep_minutes = 5, - - .max_wake_minute_early_offset = 60, - .max_wake_minutes_early = 14, - .max_wake_minutes_late = 11, - - .min_sleep_cycle_len_minutes = 60, - .min_valid_vmc = 30, // Increased significantly for asterix - .max_active_minutes_pct = 89, - .max_avg_vmc = 250, // Increased significantly for asterix - .vmc_clip = 1000, - .min_sleep_len_for_active_pct_check = 39, + .max_sleep_minute_score = 500, // Increased significantly for asterix - much stricter + .force_wake_minute_score = 8000, + .force_wake_minute_vmc = 10000, + .min_sleep_minutes = 5, + + .max_wake_minute_early_offset = 60, + .max_wake_minutes_early = 14, + .max_wake_minutes_late = 11, + + .min_sleep_cycle_len_minutes = 60, + .min_valid_vmc = 30, // Increased significantly for asterix + .max_active_minutes_pct = 89, + .max_avg_vmc = 250, // Increased significantly for asterix + .vmc_clip = 1000, + .min_sleep_len_for_active_pct_check = 39, }; #else static const KAlgSleepParams KALG_SLEEP_PARAMS = { - .max_sleep_minute_score = 330, - .force_wake_minute_score = 8000, - .force_wake_minute_vmc = 10000, - .min_sleep_minutes = 5, - - .max_wake_minute_early_offset = 60, - .max_wake_minutes_early = 14, - .max_wake_minutes_late = 11, - - .min_sleep_cycle_len_minutes = 60, - .min_valid_vmc = 20, - .max_active_minutes_pct = 89, - .max_avg_vmc = 180, - .vmc_clip = 1000, - .min_sleep_len_for_active_pct_check = 39, + .max_sleep_minute_score = 330, + .force_wake_minute_score = 8000, + .force_wake_minute_vmc = 10000, + .min_sleep_minutes = 5, + + .max_wake_minute_early_offset = 60, + .max_wake_minutes_early = 14, + .max_wake_minutes_late = 11, + + .min_sleep_cycle_len_minutes = 60, + .min_valid_vmc = 20, + .max_active_minutes_pct = 89, + .max_avg_vmc = 180, + .vmc_clip = 1000, + .min_sleep_len_for_active_pct_check = 39, }; #endif - // ---------------------------------------------------------------------------------------- // Deep Sleep detection structures // State information for deep sleep detection -#define KALG_MAX_DEEP_SLEEP_SESSIONS 8 // Max number of deep sleep sessions per sleep session +#define KALG_MAX_DEEP_SLEEP_SESSIONS 8 // Max number of deep sleep sessions per sleep session typedef struct { - time_t sleep_start_time; // KALG_START_TIME_NONE if no KAlgDeepSleepAction_Start yet - time_t deep_start_time; // start of current deep sleep session - uint16_t deep_score_count; // how many deep sleep minutes in a row we've seen - uint16_t non_deep_score_count; // how many non-deep sleep minutes in a row we've seen - bool ok_to_register; // if true, OK to register deep sleep session + time_t sleep_start_time; // KALG_START_TIME_NONE if no KAlgDeepSleepAction_Start yet + time_t deep_start_time; // start of current deep sleep session + uint16_t deep_score_count; // how many deep sleep minutes in a row we've seen + uint16_t non_deep_score_count; // how many non-deep sleep minutes in a row we've seen + bool ok_to_register; // if true, OK to register deep sleep session // List of deep sleep sessions we have detected. We don't actually register them until // we get notified by the sleep state machine that the current sleep session has ended // and is valid; - uint8_t num_sessions; // number of sessions we have detected + uint8_t num_sessions; // number of sessions we have detected uint16_t start_delta_sec[KALG_MAX_DEEP_SLEEP_SESSIONS]; // delta from sleep_start_time uint16_t len_m[KALG_MAX_DEEP_SLEEP_SESSIONS]; } KAlgDeepSleepActivityState; // Actions that can be sent to the deep sleep state machine (prv_deep_sleep_update) typedef enum { - KAlgDeepSleepAction_Start, // started a new sleep session - KAlgDeepSleepAction_Continue, // new sample for current sleep session - KAlgDeepSleepAction_End, // ended the current sleep session - KAlgDeepSleepAction_Abort, // aborted the current sleep session + KAlgDeepSleepAction_Start, // started a new sleep session + KAlgDeepSleepAction_Continue, // new sample for current sleep session + KAlgDeepSleepAction_End, // ended the current sleep session + KAlgDeepSleepAction_Abort, // aborted the current sleep session } KAlgDeepSleepAction; // Params used for deep sleep detection @@ -271,21 +267,19 @@ typedef struct { uint16_t min_minutes_after_sleep_entry; } KAlgDeepSleepParams; - // Set the deep sleep parameters static const KAlgDeepSleepParams KALG_DEEP_SLEEP_PARAMS = { - .max_deep_score = 160, - .min_deep_score_count = 20, - .min_minutes_after_sleep_entry = 10, + .max_deep_score = 160, + .min_deep_score_count = 20, + .min_minutes_after_sleep_entry = 10, }; - // ---------------------------------------------------------------------------------------- // Not-worn detection structures // State information for not-worn detection -#define KALG_NUM_NOT_WORN_SECTIONS 3 +#define KALG_NUM_NOT_WORN_SECTIONS 3 typedef struct { - uint16_t maybe_not_worn_count; // how many -"maybe" worn minutes in a row we've seen + uint16_t maybe_not_worn_count; // how many -"maybe" worn minutes in a row we've seen uint8_t prev_orientation; uint16_t prev_vmc; @@ -307,23 +301,22 @@ typedef struct { uint16_t max_low_vmc_run_m; } KAlgNotWornParams; - // Set the not-worn parameters #if defined(CONFIG_BOARD_ASTERIX) static const KAlgNotWornParams KALG_NOT_WORN_PARAMS = { - .max_non_worn_vmc = 2500, - .min_worn_vmc = 15, // Increased significantly for asterix - much higher baseline noise - .max_low_vmc_run_m = 120, // Allow longer stillness during deep sleep while still catching desk time + .max_non_worn_vmc = 2500, + .min_worn_vmc = 15, // Increased significantly for asterix - much higher baseline noise + .max_low_vmc_run_m = + 120, // Allow longer stillness during deep sleep while still catching desk time }; #else static const KAlgNotWornParams KALG_NOT_WORN_PARAMS = { - .max_non_worn_vmc = 2500, - .min_worn_vmc = 4, - .max_low_vmc_run_m = 180, + .max_non_worn_vmc = 2500, + .min_worn_vmc = 4, + .max_low_vmc_run_m = 180, }; #endif - // --------------------------------------------------------------------------------------------- // State variables. Must be allocated by caller and initialized by kalg_init() typedef struct KAlgState { @@ -355,7 +348,7 @@ typedef struct KAlgState { // Butterworth filter state used in prv_pim_filter. Fixed_S64_32 yt[KALG_N_AXES][KALG_BUTTERWORTH_NUM_COEFFICIENTS - 1]; Fixed_S64_32 xt[KALG_N_AXES][KALG_BUTTERWORTH_NUM_COEFFICIENTS]; - bool pim_filter_primed; // Right after init, we need to "prime" the filter + bool pim_filter_primed; // Right after init, we need to "prime" the filter // State for the activity detectors KAlgStepActivityState walk_state; @@ -367,14 +360,13 @@ typedef struct KAlgState { // Timestamp of the last minute of data passed to kalg_activities_update() time_t last_activity_update_utc; - bool disable_activity_session_tracking; // If true don't automatically track activities + bool disable_activity_session_tracking; // If true don't automatically track activities } KAlgState; - // ---------------------------------------------------------------------------------------- // Print a timestamp in a format useful for log messages (for debugging). This only prints // the hour and minute: HH:MM -static const char* prv_log_time(KAlgState *alg_state, time_t utc) { +static const char *prv_log_time(KAlgState *alg_state, time_t utc) { int minutes = (utc / SECONDS_PER_MINUTE) % MINUTES_PER_HOUR; int hours = (utc / SECONDS_PER_HOUR) % HOURS_PER_DAY; @@ -397,7 +389,7 @@ static void prv_release_step_activity_hrm(KAlgStepActivityState *state) { // ---------------------------------------------------------------------------------------- static void prv_reset_step_activity_state(KAlgStepActivityState *state) { prv_release_step_activity_hrm(state); - *state = (KAlgStepActivityState) { }; + *state = (KAlgStepActivityState){}; } // ---------------------------------------------------------------------------------------- @@ -432,7 +424,6 @@ static int32_t prv_mean(int16_t *d, int16_t dlen, int16_t scale) { return mean * scale / dlen; } - // ----------------------------------------------------------------------------------------- static uint32_t prv_isqrt(uint32_t x) { uint32_t op, res, one; @@ -442,7 +433,8 @@ static uint32_t prv_isqrt(uint32_t x) { // "one" starts at the highest power of four <= than the argument. one = 1 << 30; // second-to-top bit set - while (one > op) one >>= 2; + while (one > op) + one >>= 2; while (one != 0) { if (op >= res + one) { @@ -455,7 +447,6 @@ static uint32_t prv_isqrt(uint32_t x) { return res; } - // ------------------------------------------------------------------------------------------- // Integrate the abs(d) between given start and end index static int32_t prv_integral_abs(int16_t *d, int16_t start, int16_t end) { @@ -473,16 +464,18 @@ static uint32_t prv_pim_filter(KAlgState *state, int16_t *d, int16_t dlen, int16 // We use a butterworth second order digital filter with a bandpass // design of 0.25 to 1.75 hz static const Fixed_S64_32 cb[KALG_BUTTERWORTH_NUM_COEFFICIENTS] = { - {0x000000000721d150LL}, // 0.027859766117136 - {0x0000000000000000LL}, // 0.0 - {0xfffffffff1bc5d60LL}, // -0.055719532234272 - {0x0000000000000000LL}, // 0.0 - {0x000000000721d150LL}}; // 0.027859766117136 + {0x000000000721d150LL}, // 0.027859766117136 + {0x0000000000000000LL}, // 0.0 + {0xfffffffff1bc5d60LL}, // -0.055719532234272 + {0x0000000000000000LL}, // 0.0 + {0x000000000721d150LL} + }; // 0.027859766117136 static const Fixed_S64_32 ca[KALG_BUTTERWORTH_NUM_COEFFICIENTS - 1] = { - {0xfffffffc92b0910cLL}, // -3.426993307709624 - {0x0000000473f9a693LL}, // 4.453028117259779 - {0xfffffffd633c7d23LL}, // -2.612358264068663 - {0x0000000096405b5cLL}}; // 0.586919508061190 + {0xfffffffc92b0910cLL}, // -3.426993307709624 + {0x0000000473f9a693LL}, // 4.453028117259779 + {0xfffffffd633c7d23LL}, // -2.612358264068663 + {0x0000000096405b5cLL} + }; // 0.586919508061190 int32_t pim = 0; for (int16_t i = 0; i < dlen; i++) { @@ -494,13 +487,12 @@ static uint32_t prv_pim_filter(KAlgState *state, int16_t *d, int16_t dlen, int16 // REMEMBER, the scoring is done on the 1 SECOND level, so we // ONLY do thresholding at the 1 second level. - const int32_t k_x1000_thres = 3750; // this is calibrated to pebble, 125 = 1G - return (uint32_t) (((pim - (k_x1000_thres * dlen) / 1000) > 0) - ? (pim - (k_x1000_thres * dlen) / 1000) - : 0); + const int32_t k_x1000_thres = 3750; // this is calibrated to pebble, 125 = 1G + return (uint32_t)(((pim - (k_x1000_thres * dlen) / 1000) > 0) + ? (pim - (k_x1000_thres * dlen) / 1000) + : 0); } - // ----------------------------------------------------------------------------------------- // Prime the butterworth filter used in the pim filter. This helps reduce the high VMC // produced from the first set of samples fed in right after the algorithm has been initialized. @@ -530,7 +522,6 @@ static void prv_pim_filter_prime(KAlgState *state, int16_t *d, int16_t dlen, int prv_pim_filter(state, prime_data, n - 1, axis); } - // ----------------------------------------------------------------------------------------- // Compute real counts from our internal raw counts static uint32_t prv_real_counts_from_raw(uint32_t raw) { @@ -545,7 +536,6 @@ static uint32_t prv_real_counts_from_raw(uint32_t raw) { return real_counts; } - // ----------------------------------------------------------------------------------------- // Real-valued, in-place, 2-radix Fourier transform // @@ -570,16 +560,16 @@ static uint32_t prv_real_counts_from_raw(uint32_t raw) { static void prv_fft_2radix_real(int16_t *d, int16_t width, int16_t width_log_2) { int16_t n = width; int16_t j = 1; - int16_t n1 = n -1; + int16_t n1 = n - 1; int16_t k, dt; for (int16_t i = 1; i <= n1; i++) { if (i < j) { - dt = d[j-1]; - d[j-1] = d[i-1]; - d[i-1] = dt; + dt = d[j - 1]; + d[j - 1] = d[i - 1]; + d[i - 1] = dt; } - k = n/2; + k = n / 2; while (k < j) { j = j - k; k = k / 2; @@ -588,8 +578,8 @@ static void prv_fft_2radix_real(int16_t *d, int16_t width, int16_t width_log_2) } for (int16_t i = 1; i <= n; i += 2) { - dt = d[i-1]; - d[i-1] = dt + d[i]; + dt = d[i - 1]; + d[i - 1] = dt + d[i]; d[i] = dt - d[i]; } @@ -597,19 +587,19 @@ static void prv_fft_2radix_real(int16_t *d, int16_t width, int16_t width_log_2) int16_t n4, i1, i2, i3, i4, t1, t2; int32_t E, A, ss, cc; - for (int16_t k = 2; k <= width_log_2 ; k++) { + for (int16_t k = 2; k <= width_log_2; k++) { n4 = n2; n2 = 2 * n4; n1 = 2 * n2; E = TRIG_MAX_ANGLE / n1; - for (int16_t i = 1; i<= n; i+=n1) { - dt = d[i-1]; - d[i-1] = dt + d[i+n2-1]; - d[i+n2-1] = dt - d[i+n2-1]; - d[i+n4+n2-1] = -1 * d[i+n4+n2-1]; + for (int16_t i = 1; i <= n; i += n1) { + dt = d[i - 1]; + d[i - 1] = dt + d[i + n2 - 1]; + d[i + n2 - 1] = dt - d[i + n2 - 1]; + d[i + n4 + n2 - 1] = -1 * d[i + n4 + n2 - 1]; A = E; - for (int16_t j = 1; j <= (n4-1); j++) { + for (int16_t j = 1; j <= (n4 - 1); j++) { i1 = i + j; i2 = i - j + n2; i3 = i + j + n2; @@ -620,19 +610,18 @@ static void prv_fft_2radix_real(int16_t *d, int16_t width, int16_t width_log_2) A = A + E; - t1 = (int16_t) ((d[i3-1] * cc + d[i4-1] * ss) / TRIG_MAX_ANGLE); - t2 = (int16_t) ((d[i3-1] * ss - d[i4-1] * cc) / TRIG_MAX_ANGLE); + t1 = (int16_t)((d[i3 - 1] * cc + d[i4 - 1] * ss) / TRIG_MAX_ANGLE); + t2 = (int16_t)((d[i3 - 1] * ss - d[i4 - 1] * cc) / TRIG_MAX_ANGLE); - d[i4-1] = d[i2-1] - t2; - d[i3-1] = -d[i2-1] - t2; - d[i2-1] = d[i1-1] - t1; - d[i1-1] = d[i1-1] + t1; + d[i4 - 1] = d[i2 - 1] - t2; + d[i3 - 1] = -d[i2 - 1] - t2; + d[i2 - 1] = d[i1 - 1] - t1; + d[i1 - 1] = d[i1 - 1] + t1; } } } } - // ----------------------------------------------------------------------------------------- // Evaluate the magnitude of the FFT coefficients and write back to the first width/2 elements // NOTE! this function modifies the input array in place @@ -646,7 +635,6 @@ static void prv_fft_mag(int16_t *d, int16_t width) { } } - #if LOG_DOMAIN_ACTIVITY && KALG_LOG_AXIS_MAGNITUDES // ------------------------------------------------------------------------------------------- // Print a text graph of the values in the d array @@ -682,13 +670,12 @@ static void prv_text_graph(const char *type_str, int16_t *d, int16_t start, int1 } num_stars = MIN(num_stars, k_max_stars); stars_str[num_stars] = 0; - KALG_LOG_DEBUG("%s: %3"PRIi16": mag: %+3"PRIi16": %s", type_str, i, d[i], stars_str); + KALG_LOG_DEBUG("%s: %3" PRIi16 ": mag: %+3" PRIi16 ": %s", type_str, i, d[i], stars_str); stars_str[num_stars] = '*'; } } #endif - // ------------------------------------------------------------------------------------------- // Log all magnitudes of the overall FFT static void prv_log_overall_magnitudes(const char *type_str, int16_t *d, int16_t start, @@ -698,7 +685,6 @@ static void prv_log_overall_magnitudes(const char *type_str, int16_t *d, int16_t #endif } - // ------------------------------------------------------------------------------------------- // Used to Log magnitudes of a specific axis static void prv_log_axis_magnitudes(const char *type_str, int16_t *d, int16_t start, int16_t end) { @@ -707,7 +693,6 @@ static void prv_log_axis_magnitudes(const char *type_str, int16_t *d, int16_t st #endif } - // ----------------------------------------------------------------------------------------- static void prv_get_fftmag_0pad_mean0(int16_t *d, int16_t num_samples, int16_t fft_width, int16_t fft_width_log_2, int16_t input_scale) { @@ -718,10 +703,10 @@ static void prv_get_fftmag_0pad_mean0(int16_t *d, int16_t num_samples, int16_t f // set the last few elements to the mean of the first elements int16_t mean = prv_mean(d, num_samples, 1); - for (int16_t i = 0 ; i < num_samples; i++) { + for (int16_t i = 0; i < num_samples; i++) { d[i] = d[i] - mean; } - for (int16_t i = num_samples ; i < fft_width; i++) { + for (int16_t i = num_samples; i < fft_width; i++) { d[i] = 0; } @@ -733,7 +718,6 @@ static void prv_get_fftmag_0pad_mean0(int16_t *d, int16_t num_samples, int16_t f prv_fft_mag(d, fft_width); } - // ----------------------------------------------------------------------------------------- // Apply a cosine filter to the given data array. This is often used before taking an FFT. // Taking an FFT of a finite length sequence is mathematically like stacking the sequence end to @@ -745,12 +729,11 @@ static void prv_filt_cosine_win_mean0(int16_t *d, int16_t width, int32_t g_facto int32_t d_mean = prv_mean(d, width, 1); for (uint16_t i = 0; i < width; i++) { - d[i] = (int16_t) (((d[i] - d_mean) * g_factor * - sin_lookup((TRIG_MAX_ANGLE * i) / (2 * width))) / (TRIG_MAX_RATIO)); + d[i] = (int16_t)(((d[i] - d_mean) * g_factor * sin_lookup((TRIG_MAX_ANGLE * i) / (2 * width))) / + (TRIG_MAX_RATIO)); } } - // ----------------------------------------------------------------------------------------- // Find the frequency with the maximum magnitude between lhz and hhz. If favor_low is set, then // apply a dampening function to slightly favor lower frequencies over higher ones. Also, return @@ -780,7 +763,7 @@ static int16_t prv_max_mag(int16_t *d, int16_t lhz, int16_t hhz, bool favor_low, int32_t test_energy = val0 + val1; int32_t test_val = test_energy; if (favor_low) { - const int k_dampening = 100; // lower values dampen the high frequencies. + const int k_dampening = 100; // lower values dampen the high frequencies. // In this formula, the higher the frequency, the more it is dampened. A frequency of // 0 has no damping. test_val = test_val * (k_dampening - test_hz) / k_dampening; @@ -798,7 +781,6 @@ static int16_t prv_max_mag(int16_t *d, int16_t lhz, int16_t hhz, bool favor_low, return max_hz_i; } - // ----------------------------------------------------------------------------------------- // Compute scaled Vector Magnitude Counts (vmc) // This function calculates the vector magnitude counts from the proportional integral mode array. @@ -819,12 +801,11 @@ static uint32_t prv_calc_raw_vmc(uint32_t *pims) { } // calculate VMCPM, then take sqrt to compress - return KALG_VECTOR_MAG_COUNTS_SCALE * prv_isqrt(d[KALG_AXIS_X] * d[KALG_AXIS_X] - + d[KALG_AXIS_Y] * d[KALG_AXIS_Y] - + d[KALG_AXIS_Z] * d[KALG_AXIS_Z]); + return KALG_VECTOR_MAG_COUNTS_SCALE * + prv_isqrt(d[KALG_AXIS_X] * d[KALG_AXIS_X] + d[KALG_AXIS_Y] * d[KALG_AXIS_Y] + + d[KALG_AXIS_Z] * d[KALG_AXIS_Z]); } - // ----------------------------------------------------------------------------------------- // Compute the magnitude of the signal based on the given walking frequency. This sums // the energy of the walking frequency, the arm frequency, and each of their harmonics. @@ -853,8 +834,8 @@ static uint32_t prv_compute_signal_energy(int16_t *d, int16_t d_len, uint16_t wa // Include the 2nd harmonic of the walking frequency uint32_t walk_2_energy; - uint16_t walk_2_hz = prv_max_mag(d, (walk_hz * 2) - 1, (walk_hz * 2) + 1, - false /*favor_low*/, false /*inc_adjacent*/, &walk_2_energy); + uint16_t walk_2_hz = prv_max_mag(d, (walk_hz * 2) - 1, (walk_hz * 2) + 1, false /*favor_low*/, + false /*inc_adjacent*/, &walk_2_energy); // Include the 5th harmonic of the arm uint32_t arm_5_energy = 0; @@ -883,23 +864,22 @@ static uint32_t prv_compute_signal_energy(int16_t *d, int16_t d_len, uint16_t wa } // Compute the total energy of this signal - uint32_t max_mag_energy = walk_energy + arm_energy + arm_3_energy + walk_2_energy + arm_5_energy - + walk_3_energy + walk_4_energy + walk_5_energy; + uint32_t max_mag_energy = walk_energy + arm_energy + arm_3_energy + walk_2_energy + arm_5_energy + + walk_3_energy + walk_4_energy + walk_5_energy; if (log) { - KALG_LOG_DEBUG( - "walk:%"PRIu16",%"PRIu32" arm: %"PRIu16",%"PRIu32" ", - walk_hz, walk_energy, arm_hz, arm_energy); - KALG_LOG_DEBUG("arm3:%"PRIu16",%"PRIu32" walk2:%"PRIu16",%"PRIu32" arm5:%"PRIu16",%"PRIu32 - " ", arm_3_hz, arm_3_energy, walk_2_hz, walk_2_energy, arm_5_hz, arm_5_energy); - KALG_LOG_DEBUG( - "walk3:%"PRIu16",%"PRIu32" walk4:%"PRIu16",%"PRIu32" walk5:%"PRIu16",%"PRIu32" ", - walk_3_hz, walk_3_energy, walk_4_hz, walk_4_energy, walk_5_hz, walk_5_energy); + KALG_LOG_DEBUG("walk:%" PRIu16 ",%" PRIu32 " arm: %" PRIu16 ",%" PRIu32 " ", walk_hz, + walk_energy, arm_hz, arm_energy); + KALG_LOG_DEBUG("arm3:%" PRIu16 ",%" PRIu32 " walk2:%" PRIu16 ",%" PRIu32 " arm5:%" PRIu16 + ",%" PRIu32 " ", + arm_3_hz, arm_3_energy, walk_2_hz, walk_2_energy, arm_5_hz, arm_5_energy); + KALG_LOG_DEBUG("walk3:%" PRIu16 ",%" PRIu32 " walk4:%" PRIu16 ",%" PRIu32 " walk5:%" PRIu16 + ",%" PRIu32 " ", + walk_3_hz, walk_3_energy, walk_4_hz, walk_4_energy, walk_5_hz, walk_5_energy); } return max_mag_energy; } - // ----------------------------------------------------------------------------------------- // Compute the most likely walking frequency and its score for this epoch. This searches for the // max magnitude among the possible walking frequencies and computes the energy of the walking @@ -955,8 +935,8 @@ static uint16_t prv_compute_scores(int16_t *d, uint32_t real_vmc_5s, int16_t d_l max_allowed_hz = KALG_MAX_STEP_FREQ; } uint32_t walk_energy; - uint16_t center_hz = prv_max_mag(d, min_allowed_hz, max_allowed_hz, - false /*favor_low*/, false /*inc_adjacent*/, &walk_energy); + uint16_t center_hz = prv_max_mag(d, min_allowed_hz, max_allowed_hz, false /*favor_low*/, + false /*inc_adjacent*/, &walk_energy); // Most runs will be in the high VMC range, but there is a chance that a run will show up in // the "medium" VMC range and we only latched onto the arm-swing signal. If we are in the @@ -964,8 +944,8 @@ static uint16_t prv_compute_scores(int16_t *d, uint32_t real_vmc_5s, int16_t d_l // which would indicate a run. if ((real_vmc_5s >= k_min_run_vmc) && (max_allowed_hz < KALG_MAX_STEP_FREQ)) { uint32_t test_energy; - uint16_t higher_hz = prv_max_mag(d, max_allowed_hz, KALG_MAX_STEP_FREQ, - false /*favor_low*/, false /*inc_adjacent*/, &test_energy); + uint16_t higher_hz = prv_max_mag(d, max_allowed_hz, KALG_MAX_STEP_FREQ, false /*favor_low*/, + false /*inc_adjacent*/, &test_energy); if (test_energy > (walk_energy * 3 / 2)) { center_hz = higher_hz; max_allowed_hz = KALG_MAX_STEP_FREQ; @@ -1001,7 +981,7 @@ static uint16_t prv_compute_scores(int16_t *d, uint32_t real_vmc_5s, int16_t d_l // driving in the car (which we want to ignore). int16_t score_high_freq = 0; if (max_mag_energy > 0) { - score_high_freq = 100 * prv_integral_abs(d, k_high_freq_min, d_len - 1) / max_mag_energy; + score_high_freq = 100 * prv_integral_abs(d, k_high_freq_min, d_len - 1) / max_mag_energy; } // Get the percent energy at low frequencies. A high amount here is a good indication of @@ -1011,9 +991,10 @@ static uint16_t prv_compute_scores(int16_t *d, uint32_t real_vmc_5s, int16_t d_l score_low_freq = 100 * prv_integral_abs(d, 0, k_low_freq_max) / max_mag_energy; } - KALG_LOG_DEBUG("max_mag_energy: %"PRIu32", total: %"PRIi32", score_0: %"PRIu16", " - "score_hf: %"PRIu16", score_lf: %"PRIu16"", max_mag_energy, total_energy, - score_0, score_high_freq, score_low_freq); + KALG_LOG_DEBUG("max_mag_energy: %" PRIu32 ", total: %" PRIi32 ", score_0: %" PRIu16 + ", " + "score_hf: %" PRIu16 ", score_lf: %" PRIu16 "", + max_mag_energy, total_energy, score_0, score_high_freq, score_low_freq); *score_0_ret = score_0; *score_hf_ret = score_high_freq; @@ -1022,13 +1003,11 @@ static uint16_t prv_compute_scores(int16_t *d, uint32_t real_vmc_5s, int16_t d_l return walk_hz; } - - // ----------------------------------------------------------------------------------------- // Return true if the score and vmc combination indicate that the user is stepping static bool prv_is_stepping(KAlgState *state, uint16_t max_mag_hz, uint16_t score_0, - uint16_t score_high_freq, uint16_t score_low_freq, - uint32_t real_vmc_5s, int32_t total_energy, bool *partial_steps) { + uint16_t score_high_freq, uint16_t score_low_freq, uint32_t real_vmc_5s, + int32_t total_energy, bool *partial_steps) { *partial_steps = false; // ------------------------------------------------------------------- @@ -1087,8 +1066,8 @@ static bool prv_is_stepping(KAlgState *state, uint16_t max_mag_hz, uint16_t scor // Treatment of epochs that include the start or stop of a walk // If step_count is 0, see if this epoch could counts as a start/stop of walking - if (!is_stepping && (max_mag_hz >= KALG_MIN_STEP_FREQ - 1) - && (max_mag_hz <= KALG_MAX_STEP_FREQ)) { + if (!is_stepping && (max_mag_hz >= KALG_MIN_STEP_FREQ - 1) && + (max_mag_hz <= KALG_MAX_STEP_FREQ)) { if ((score_0 >= k_partial_min_score) && (real_vmc_5s >= k_partial_min_vmc)) { *partial_steps = true; } @@ -1097,11 +1076,11 @@ static bool prv_is_stepping(KAlgState *state, uint16_t max_mag_hz, uint16_t scor return is_stepping; } - // ----------------------------------------------------------------------------------------- // On entry the first fft_width/2 elements of state->work contain the FFT magnitudes static uint16_t prv_calc_steps_in_epoch(KAlgState *state, int16_t num_samples, int16_t fft_width, - int16_t fft_width_log_2, uint32_t *pim_epoch, int16_t fft_scale) { + int16_t fft_width_log_2, uint32_t *pim_epoch, + int16_t fft_scale) { // The Pebble's raw accel readings have 1000 = 1G. We divide each reading by 8 though, so // 125 = 1G. We have empirically determined that scaling the VMC by // KALG_x100_RAW_1G_PIM_CPM_TO_REAL_CPM / 100 produces values equivalent to the Actigraph values. @@ -1140,17 +1119,18 @@ static uint16_t prv_calc_steps_in_epoch(KAlgState *state, int16_t num_samples, i // ---------------------------------------- // Logging output for algorithm debugging const char *type_str = stepping ? "STEP" : (partial_steps ? "HALF" : "----"); - KALG_LOG_DEBUG("%s steps: %2"PRIu16", freq: %2"PRIu16", vmc: %4"PRIu32", score0: %"PRIu16", ", + KALG_LOG_DEBUG("%s steps: %2" PRIu16 ", freq: %2" PRIu16 ", vmc: %4" PRIu32 ", score0: %" PRIu16 + ", ", type_str, return_steps, max_mag_hz, real_vmc_5s, score_0); - KALG_LOG_DEBUG("score_hf: %"PRIi16", score_lf: %"PRIi16", total_energy: %"PRIi32" ", + KALG_LOG_DEBUG("score_hf: %" PRIi16 ", score_lf: %" PRIi16 ", total_energy: %" PRIi32 " ", score_hf, score_lf, total_energy); prv_log_overall_magnitudes("freq", state->work, 0, (fft_width / 2) - 1 /*index of last element*/); // Are we collecting statistics? if (state->stats_cb) { const char *names[] = {"steps", "freq", "vmc", "score_0", "score_hf", "score_lf", "total"}; - int32_t values[] = {return_steps, max_mag_hz, real_vmc_5s, score_0, score_hf, score_lf, - total_energy}; + int32_t values[] = {return_steps, max_mag_hz, real_vmc_5s, score_0, + score_hf, score_lf, total_energy}; state->stats_cb(ARRAY_LENGTH(names), names, values); } @@ -1162,7 +1142,6 @@ static uint16_t prv_calc_steps_in_epoch(KAlgState *state, int16_t num_samples, i return return_steps; } - // ----------------------------------------------------------------------------------------- // Return an encoding of an angle, quantized into num_angles possible values static uint8_t prv_get_angle_encoding(int16_t x, int16_t y, uint8_t num_angles) { @@ -1185,10 +1164,9 @@ static uint8_t prv_get_angle_encoding(int16_t x, int16_t y, uint8_t num_angles) // We need to make sure that in all cases that the returned index is at MOST one less that // n_ang, because 0-15 shifted by (ang_res/2) so rounds int, not floor int32_t result = (atan + (ang_res / 2)) / ang_res; - return (uint8_t) result < num_angles ? result : 0; + return (uint8_t)result < num_angles ? result : 0; } - // ----------------------------------------------------------------------------------------- // Analyze and return the # of steps from this epoch. static uint32_t prv_analyze_epoch(KAlgState *state) { @@ -1219,8 +1197,8 @@ static uint32_t prv_analyze_epoch(KAlgState *state) { // The proportional integral mode is roughly the sum of the absolute value of all elements // after subtracing the mean, then run through a filter uint32_t pim; - pim = prv_pim_filter(state, &state->accel_samples[axis][sec * KALG_SAMPLE_HZ], - KALG_SAMPLE_HZ, axis); + pim = prv_pim_filter(state, &state->accel_samples[axis][sec * KALG_SAMPLE_HZ], KALG_SAMPLE_HZ, + axis); // Thresholded integral for the VMCPM calculation, Actigraph equivalent state->summary_pim[axis] += pim; @@ -1253,20 +1231,18 @@ static uint32_t prv_analyze_epoch(KAlgState *state) { // The first KALG_FFT_WIDTH/2 elements of the FFT output are the magnitudes. The latter half are // the phase for (int16_t i = 0; i < KALG_FFT_WIDTH / 2; i++) { - state->work[i] = (int16_t) prv_isqrt(state->accel_samples[0][i] * state->accel_samples[0][i] - + state->accel_samples[1][i] * state->accel_samples[1][i] - + state->accel_samples[2][i] * state->accel_samples[2][i]); + state->work[i] = (int16_t)prv_isqrt(state->accel_samples[0][i] * state->accel_samples[0][i] + + state->accel_samples[1][i] * state->accel_samples[1][i] + + state->accel_samples[2][i] * state->accel_samples[2][i]); } // Calculate the step count for this epoch - uint16_t steps = prv_calc_steps_in_epoch( - state, state->num_samples, KALG_FFT_WIDTH, KALG_FFT_WIDTH_PWR_TWO, - pim_epoch, KALG_FFT_SCALE); + uint16_t steps = prv_calc_steps_in_epoch(state, state->num_samples, KALG_FFT_WIDTH, + KALG_FFT_WIDTH_PWR_TWO, pim_epoch, KALG_FFT_SCALE); return steps; } - // ----------------------------------------------------------------------------------- // Compute the sleep score by convolving the VMCs around index i. The caller is responsible // for insuring that i is at least half the filter width from either end. @@ -1284,28 +1260,26 @@ static uint32_t prv_compute_sleep_score(KAlgSleepMinute *samples, int i) { return score; } - // ----------------------------------------------------------------------------------------- // Return the size required for the state variables uint32_t kalg_state_size(void) { return sizeof(KAlgState); } - // ----------------------------------------------------------------------------------------- // Init the state, return true on success bool kalg_init(KAlgState *state, KAlgStatsCallback stats_cb) { PBL_ASSERTN(state != NULL); - *state = (KAlgState) { - .stats_cb = stats_cb, + *state = (KAlgState){ + .stats_cb = stats_cb, }; - PBL_ASSERT((KALG_SLEEP_PARAMS.max_wake_minutes_early + KALG_SLEEP_HALF_WIDTH + 1) - == KALG_MAX_UNCERTAIN_SLEEP_M, "Invalid value for KALG_MAX_UNCERTAIN_SLEEP_M"); + PBL_ASSERT((KALG_SLEEP_PARAMS.max_wake_minutes_early + KALG_SLEEP_HALF_WIDTH + 1) == + KALG_MAX_UNCERTAIN_SLEEP_M, + "Invalid value for KALG_MAX_UNCERTAIN_SLEEP_M"); return true; } - // ----------------------------------------------------------------------------------------- // Release resources held by the state. Must be called before the caller frees it, otherwise the // HRM subscriptions outlive the only references to them and pin the sensor on until reboot. @@ -1315,7 +1289,6 @@ void kalg_deinit(KAlgState *state) { prv_release_step_activity_hrm(&state->run_state); } - // ------------------------------------------------------------------------------------ uint32_t kalg_analyze_samples(KAlgState *state, AccelRawData *data, uint32_t num_samples, uint32_t *consumed_samples) { @@ -1328,12 +1301,12 @@ uint32_t kalg_analyze_samples(KAlgState *state, AccelRawData *data, uint32_t num // Format the accel data for the algorithm - it wants the x, y and z values in separate arrays for (uint32_t i = 0; i < num_samples; i++) { - state->accel_samples[KALG_AXIS_X][state->num_samples] - = (data[i].x + KALG_ACCEL_SAMPLE_DIV / 2) >> KALG_ACCEL_SAMPLE_SHIFT; - state->accel_samples[KALG_AXIS_Y][state->num_samples] - = (data[i].y + KALG_ACCEL_SAMPLE_DIV / 2) >> KALG_ACCEL_SAMPLE_SHIFT; - state->accel_samples[KALG_AXIS_Z][state->num_samples] - = (data[i].z + KALG_ACCEL_SAMPLE_DIV / 2) >> KALG_ACCEL_SAMPLE_SHIFT; + state->accel_samples[KALG_AXIS_X][state->num_samples] = + (data[i].x + KALG_ACCEL_SAMPLE_DIV / 2) >> KALG_ACCEL_SAMPLE_SHIFT; + state->accel_samples[KALG_AXIS_Y][state->num_samples] = + (data[i].y + KALG_ACCEL_SAMPLE_DIV / 2) >> KALG_ACCEL_SAMPLE_SHIFT; + state->accel_samples[KALG_AXIS_Z][state->num_samples] = + (data[i].z + KALG_ACCEL_SAMPLE_DIV / 2) >> KALG_ACCEL_SAMPLE_SHIFT; state->num_samples++; if (state->num_samples >= KALG_N_SAMPLES_EPOCH) { @@ -1346,7 +1319,6 @@ uint32_t kalg_analyze_samples(KAlgState *state, AccelRawData *data, uint32_t num return new_steps; } - // ------------------------------------------------------------------------------------ void kalg_minute_stats(KAlgState *state, uint16_t *vmc, uint8_t *orientation, bool *still) { PBL_ASSERTN(state != NULL); @@ -1356,18 +1328,17 @@ void kalg_minute_stats(KAlgState *state, uint16_t *vmc, uint8_t *orientation, bo // MAX num_angles is 16, as 16*15 + 15 = 255 // The range of the theta_i and phi_i is 0 to (n_ang-1) // get theta, in the x-y plane. theta relative to +x-axis - uint8_t theta = prv_get_angle_encoding(state->summary_mean[0], state->summary_mean[1], - KALG_NUM_ANGLES); + uint8_t theta = + prv_get_angle_encoding(state->summary_mean[0], state->summary_mean[1], KALG_NUM_ANGLES); // get phi, in the xy_vm-z plane - int16_t xy_vm = prv_isqrt(state->summary_mean[0] * state->summary_mean[0] - + state->summary_mean[1] * state->summary_mean[1]); + int16_t xy_vm = prv_isqrt(state->summary_mean[0] * state->summary_mean[0] + + state->summary_mean[1] * state->summary_mean[1]); // phi rel to +z-axis, so z is on hoz-axis and xy_vm is vert-axis uint8_t phi_i = prv_get_angle_encoding(state->summary_mean[2], xy_vm, KALG_NUM_ANGLES); *orientation = KALG_NUM_ANGLES * phi_i + theta; - uint32_t real_vmc = prv_real_counts_from_raw(prv_calc_raw_vmc(state->summary_pim)); // Clip to a max of uint16_t *vmc = MIN(real_vmc, UINT16_MAX); @@ -1384,7 +1355,6 @@ void kalg_minute_stats(KAlgState *state, uint16_t *vmc, uint8_t *orientation, bo memset(&state->summary_pim, 0, sizeof(state->summary_pim)); } - // ------------------------------------------------------------------------------------ uint32_t kalg_analyze_finish_epoch(KAlgState *state) { PBL_ASSERTN(state != NULL); @@ -1397,9 +1367,6 @@ uint32_t kalg_analyze_finish_epoch(KAlgState *state) { return new_steps; } - - - // ------------------------------------------------------------------------------------------ // Update the not-worn detection state machine. This state machine gets called on every minute // update. It returns true if it determines the watch was not worn @@ -1410,8 +1377,9 @@ static bool prv_not_worn_update(KAlgState *alg_state, time_t utc_now, uint16_t v KAlgNotWornState *state = &alg_state->not_worn_state; // Determine if this is a "maybe-not-worn" sample - bool maybe_not_worn = ((orientation == state->prev_orientation) - || ((vmc < params->min_worn_vmc) && (state->prev_vmc < params->min_worn_vmc))); + bool maybe_not_worn = + ((orientation == state->prev_orientation) || + ((vmc < params->min_worn_vmc) && (state->prev_vmc < params->min_worn_vmc))); // The upper 4 bits of orientation encode the angle to the Z axis. If this value is 0x0 or 0x8 // the watch is sitting flat on a table, so it's more probable that it's not being worn @@ -1437,8 +1405,8 @@ static bool prv_not_worn_update(KAlgState *alg_state, time_t utc_now, uint16_t v state->potential_not_worn_start[0] = utc_now; } state->maybe_not_worn_count++; - state->potential_not_worn_len_m[0] - = ((utc_now - state->potential_not_worn_start[0]) / SECONDS_PER_MINUTE) + 1; + state->potential_not_worn_len_m[0] = + ((utc_now - state->potential_not_worn_start[0]) / SECONDS_PER_MINUTE) + 1; } else { // We just encountered a "definitely worn" minute @@ -1457,14 +1425,14 @@ static bool prv_not_worn_update(KAlgState *alg_state, time_t utc_now, uint16_t v state->prev_vmc = vmc; // Compute result - bool result = definite_not_worn || (state->maybe_not_worn_count >= params->max_low_vmc_run_m); - KALG_LOG_DEBUG(" NW: vmc: %"PRIu16", orient: 0x%"PRIx8", not_worn: %d, " - "mnw_min:%d, mnw_count:%"PRIu16"", vmc, orientation, result, maybe_not_worn, - state->maybe_not_worn_count); + bool result = definite_not_worn || (state->maybe_not_worn_count >= params->max_low_vmc_run_m); + KALG_LOG_DEBUG(" NW: vmc: %" PRIu16 ", orient: 0x%" PRIx8 + ", not_worn: %d, " + "mnw_min:%d, mnw_count:%" PRIu16 "", + vmc, orientation, result, maybe_not_worn, state->maybe_not_worn_count); return result; } - // ------------------------------------------------------------------------------------------ // Decide if a potential sleep session should be rejected based on the not-worn state. // Even if the current "not-worn" status is false, as returned by prv_not_worn_update(), we @@ -1486,16 +1454,16 @@ static bool prv_not_worn_during_session(KAlgState *alg_state, time_t session_sta // Compute the boundary locations time_t not_worn_start_boundary = session_start_utc + (k_max_start_margin_m * SECONDS_PER_MINUTE); - time_t not_worn_end_boundary = session_start_utc - + ((session_len_m - k_min_end_margin_m) * SECONDS_PER_MINUTE); + time_t not_worn_end_boundary = + session_start_utc + ((session_len_m - k_min_end_margin_m) * SECONDS_PER_MINUTE); time_t session_end = session_start_utc + (session_len_m * SECONDS_PER_MINUTE); for (int i = 0; i < KALG_NUM_NOT_WORN_SECTIONS; i++) { if (state->potential_not_worn_len_m[i] == 0) { continue; } - time_t not_worn_end = state->potential_not_worn_start[i] - + (state->potential_not_worn_len_m[i] * SECONDS_PER_MINUTE); + time_t not_worn_end = state->potential_not_worn_start[i] + + (state->potential_not_worn_len_m[i] * SECONDS_PER_MINUTE); // If this sleep session overlaps a very long section of potential not worn, it is not-worn time_t overlap_start = MAX(state->potential_not_worn_start[i], session_start_utc); @@ -1509,9 +1477,9 @@ static bool prv_not_worn_during_session(KAlgState *alg_state, time_t session_sta continue; } - if ((state->potential_not_worn_start[i] <= not_worn_start_boundary) - && (not_worn_end >= not_worn_end_boundary)) { - KALG_LOG_DEBUG("detected not worn from %s for %"PRIu16" minutes", + if ((state->potential_not_worn_start[i] <= not_worn_start_boundary) && + (not_worn_end >= not_worn_end_boundary)) { + KALG_LOG_DEBUG("detected not worn from %s for %" PRIu16 " minutes", prv_log_time(alg_state, state->potential_not_worn_start[i]), state->potential_not_worn_len_m[i]); return true; @@ -1520,12 +1488,10 @@ static bool prv_not_worn_during_session(KAlgState *alg_state, time_t session_sta return false; } - // ------------------------------------------------------------------------------------------ // Register the deep sleep sessions we've found -static void prv_deep_sleep_register_sessions(KAlgState *alg_state, time_t sample_time, - bool abort, bool ongoing, - KAlgActivitySessionCallback sessions_cb, +static void prv_deep_sleep_register_sessions(KAlgState *alg_state, time_t sample_time, bool abort, + bool ongoing, KAlgActivitySessionCallback sessions_cb, void *context) { // Handy access to some variables KAlgDeepSleepActivityState *state = &alg_state->deep_sleep_state; @@ -1538,16 +1504,16 @@ static void prv_deep_sleep_register_sessions(KAlgState *alg_state, time_t sample for (uint8_t i = 0; i < state->num_sessions; i++) { time_t start_utc = state->sleep_start_time + state->start_delta_sec[i]; sessions_cb(context, KAlgActivityType_RestfulSleep, start_utc, - state->len_m[i] * SECONDS_PER_MINUTE, ongoing, abort /*delete*/, - 0 /*steps*/, 0 /*resting calories*/, 0 /*active_calories*/, 0 /*distance_mm*/); + state->len_m[i] * SECONDS_PER_MINUTE, ongoing, abort /*delete*/, 0 /*steps*/, + 0 /*resting calories*/, 0 /*active_calories*/, 0 /*distance_mm*/); } // update/delete the session that might still be in progress if (state->deep_start_time != KALG_START_TIME_NONE) { int len_sec = sample_time - state->deep_start_time; - sessions_cb(context, KAlgActivityType_RestfulSleep, state->deep_start_time, - len_sec, ongoing, abort /*delete*/, 0 /*steps*/, - 0 /*resting calories*/, 0 /*active_calories*/, 0 /*distance_mm*/); + sessions_cb(context, KAlgActivityType_RestfulSleep, state->deep_start_time, len_sec, ongoing, + abort /*delete*/, 0 /*steps*/, 0 /*resting calories*/, 0 /*active_calories*/, + 0 /*distance_mm*/); } } @@ -1584,9 +1550,9 @@ static void prv_deep_sleep_update(KAlgState *alg_state, time_t sample_time, uint KALG_LOG_DEBUG("DS: time: %s, rcv start of new sleep", prv_log_time(alg_state, sample_time)); // Start of a new sleep session PBL_ASSERT(state->sleep_start_time == KALG_START_TIME_NONE, "Unexpected start"); - *state = (KAlgDeepSleepActivityState) { - .sleep_start_time = sample_time, - }; + *state = (KAlgDeepSleepActivityState){ + .sleep_start_time = sample_time, + }; return; case KAlgDeepSleepAction_Continue: @@ -1608,22 +1574,23 @@ static void prv_deep_sleep_update(KAlgState *alg_state, time_t sample_time, uint prv_deep_sleep_register_sessions(alg_state, sample_time, true /*abort*/, false /*ongoing*/, sessions_cb, context); // No longer in sleep - *state = (KAlgDeepSleepActivityState) { }; + *state = (KAlgDeepSleepActivityState){}; return; case KAlgDeepSleepAction_End: prv_deep_sleep_register_sessions(alg_state, sample_time, false /*abort*/, false /*ongoing*/, sessions_cb, context); // No longer in sleep - *state = (KAlgDeepSleepActivityState) { }; + *state = (KAlgDeepSleepActivityState){}; return; } // Handle continuation of sleep bool is_deep_minute = (score <= params->max_deep_score); - KALG_LOG_DEBUG(" DS: is_deep_min:%"PRIu8", consecutive_deep_min:%"PRIu16", " - "consecutive_non_deep_min: %"PRIu16"", (uint8_t)is_deep_minute, - state->deep_score_count, state->non_deep_score_count); + KALG_LOG_DEBUG(" DS: is_deep_min:%" PRIu8 ", consecutive_deep_min:%" PRIu16 + ", " + "consecutive_non_deep_min: %" PRIu16 "", + (uint8_t)is_deep_minute, state->deep_score_count, state->non_deep_score_count); // Update counts uint16_t last_deep_run_size = state->deep_score_count; @@ -1653,10 +1620,8 @@ static void prv_deep_sleep_update(KAlgState *alg_state, time_t sample_time, uint // We reached the end of it last_deep_run_size minutes ago end_time = sample_time - (last_deep_run_size * SECONDS_PER_MINUTE); uint16_t len_m = MAX((end_time - start_time) / SECONDS_PER_MINUTE, 0); - PBL_LOG_DBG("Detected deep sleep of %" - PRIu16 - " minutes starting at %s ", - len_m, prv_log_time(alg_state, start_time)); + PBL_LOG_DBG("Detected deep sleep of %" PRIu16 " minutes starting at %s ", len_m, + prv_log_time(alg_state, start_time)); // Store the session we just found as a complete one now that we have the end if (state->num_sessions < ARRAY_LENGTH(state->start_delta_sec)) { @@ -1672,14 +1637,13 @@ static void prv_deep_sleep_update(KAlgState *alg_state, time_t sample_time, uint } // Register/update it as ongoing if (state->ok_to_register) { - sessions_cb(context, KAlgActivityType_RestfulSleep, start_time, - end_time - start_time, true /*ongoing*/, false /*delete*/, 0 /*steps*/, - 0 /*resting calories*/, 0 /*active_calories*/, 0 /*distance_mm*/); + sessions_cb(context, KAlgActivityType_RestfulSleep, start_time, end_time - start_time, + true /*ongoing*/, false /*delete*/, 0 /*steps*/, 0 /*resting calories*/, + 0 /*active_calories*/, 0 /*distance_mm*/); } } } - // ------------------------------------------------------------------------------------------ // Collect minute data and update the statistics we need for a sleep update. This gets // called at the beginning of prv_sleep_activity_update(). @@ -1699,10 +1663,10 @@ static bool prv_sleep_activity_update_stats(KAlgState *alg_state, time_t utc_now (history_capacity - 1) * sizeof(KAlgSleepMinute)); state->num_history_entries--; } - state->minute_history[state->num_history_entries++] = (KAlgSleepMinute) { - .vmc = vmc, - .orientation = orientation, - .definitely_not_worn = definitely_not_worn, + state->minute_history[state->num_history_entries++] = (KAlgSleepMinute){ + .vmc = vmc, + .orientation = orientation, + .definitely_not_worn = definitely_not_worn, }; // Get the not-worn status @@ -1745,14 +1709,13 @@ static bool prv_sleep_activity_update_stats(KAlgState *alg_state, time_t utc_now return true; } - // ------------------------------------------------------------------------------------------ // See if we should start a new sleep session or end the current one static void prv_sleep_activity_update_session_state( KAlgState *alg_state, time_t sample_utc, uint16_t vmc, uint32_t score, bool is_sleep_minute, unsigned minutes_since_sleep_started, bool shutting_down, - KAlgActivitySessionCallback sessions_cb, void *context, - time_t *sleep_end_time, bool *reject_session) { + KAlgActivitySessionCallback sessions_cb, void *context, time_t *sleep_end_time, + bool *reject_session) { // Handy access to some variables const KAlgSleepParams *params = &KALG_SLEEP_PARAMS; KAlgSleepActivityState *state = &alg_state->sleep_state; @@ -1772,19 +1735,18 @@ static void prv_sleep_activity_update_session_state( // This gets set to non-zero if we detected the end of the current sleep session *sleep_end_time = KALG_START_TIME_NONE; - // ---------------------------------------------------------------------------------- // See if we should start a new session or end the current one if (state->current_stats.start_time == KALG_START_TIME_NONE) { // We haven't detected bedtime yet, see if we should start sleep if (state->current_stats.consecutive_sleep_minutes >= params->min_sleep_minutes) { - state->current_stats.start_time = sample_utc - - (state->current_stats.consecutive_sleep_minutes * SECONDS_PER_MINUTE); + state->current_stats.start_time = + sample_utc - (state->current_stats.consecutive_sleep_minutes * SECONDS_PER_MINUTE); state->current_stats.num_non_zero_minutes = 0; state->current_stats.vmc_sum = 0; - KALG_LOG_DEBUG("Detected bedtime at %s", prv_log_time(alg_state, - state->current_stats.start_time)); + KALG_LOG_DEBUG("Detected bedtime at %s", + prv_log_time(alg_state, state->current_stats.start_time)); // Inform the deep sleep detection logic that a new sleep session just started prv_deep_sleep_update(alg_state, state->current_stats.start_time, score, @@ -1795,9 +1757,9 @@ static void prv_sleep_activity_update_session_state( } else { // We have detected a bedtime, see if we should wake yet. uint32_t wake_minutes_threshold = - (minutes_since_sleep_started < params->max_wake_minute_early_offset) - ? params->max_wake_minutes_early - : params->max_wake_minutes_late; + (minutes_since_sleep_started < params->max_wake_minute_early_offset) + ? params->max_wake_minutes_early + : params->max_wake_minutes_late; if (prv_not_worn_during_session(alg_state, state->current_stats.start_time, minutes_since_sleep_started, true /*ongoing*/)) { @@ -1808,8 +1770,8 @@ static void prv_sleep_activity_update_session_state( } else if (state->current_stats.consecutive_awake_minutes >= wake_minutes_threshold) { // Too many awake minutes in a row - *sleep_end_time = sample_utc - - (state->current_stats.consecutive_awake_minutes * SECONDS_PER_MINUTE); + *sleep_end_time = + sample_utc - (state->current_stats.consecutive_awake_minutes * SECONDS_PER_MINUTE); } else if (vmc > params->force_wake_minute_vmc) { // VMC for this minute is way too high @@ -1821,22 +1783,21 @@ static void prv_sleep_activity_update_session_state( *sleep_end_time = sample_utc; KALG_LOG_DEBUG("Cycle ended because score was too high for this minute"); - } else if ((minutes_since_sleep_started > params->min_sleep_len_for_active_pct_check) - && (pct_non_zero > params->max_active_minutes_pct)) { + } else if ((minutes_since_sleep_started > params->min_sleep_len_for_active_pct_check) && + (pct_non_zero > params->max_active_minutes_pct)) { // Too high a percent of awake minutes // If the percentage of non-zero minutes is too high, reject this cycle. *sleep_end_time = sample_utc; *reject_session = true; - KALG_LOG_DEBUG("Cycle rejected because too many non-zero minutes (%d pct)", - pct_non_zero); + KALG_LOG_DEBUG("Cycle rejected because too many non-zero minutes (%d pct)", pct_non_zero); - } else if ((minutes_since_sleep_started > params->min_sleep_len_for_active_pct_check) - && (avg_vmc > params->max_avg_vmc)) { + } else if ((minutes_since_sleep_started > params->min_sleep_len_for_active_pct_check) && + (avg_vmc > params->max_avg_vmc)) { // Too high an average VMC, reject this cycle // If the percentage of non-zero minutes is too high, reject this cycle. *sleep_end_time = sample_utc; *reject_session = true; - KALG_LOG_DEBUG("Cycle rejected because avg vmc is too high (%"PRIu16")", avg_vmc); + KALG_LOG_DEBUG("Cycle rejected because avg vmc is too high (%" PRIu16 ")", avg_vmc); } else if (shutting_down) { KALG_LOG_DEBUG("Cycle ended because we are shutting down"); *sleep_end_time = sample_utc; @@ -1844,20 +1805,20 @@ static void prv_sleep_activity_update_session_state( } // Print state - KALG_LOG_DEBUG("%s: score:%5"PRIu32", is_sleep_min:%"PRIi8", cons_sleep_min:%"PRIi16", " - "cons_awake_min: %"PRIi16", pct_non_zero: %u, avg_vmc: %"PRIu16" ", + KALG_LOG_DEBUG("%s: score:%5" PRIu32 ", is_sleep_min:%" PRIi8 ", cons_sleep_min:%" PRIi16 + ", " + "cons_awake_min: %" PRIi16 ", pct_non_zero: %u, avg_vmc: %" PRIu16 " ", prv_log_time(alg_state, sample_utc), score, (int8_t)is_sleep_minute, state->current_stats.consecutive_sleep_minutes, state->current_stats.consecutive_awake_minutes, pct_non_zero, avg_vmc); } - // ------------------------------------------------------------------------------------------ // Process the minute data for sleep detection static void prv_sleep_activity_update(KAlgState *alg_state, time_t utc_now, uint16_t vmc, uint8_t orientation, bool definitely_not_worn, - bool shutting_down, - KAlgActivitySessionCallback sessions_cb, void *context) { + bool shutting_down, KAlgActivitySessionCallback sessions_cb, + void *context) { // Handy access to some variables const KAlgSleepParams *params = &KALG_SLEEP_PARAMS; KAlgSleepActivityState *state = &alg_state->sleep_state; @@ -1881,8 +1842,8 @@ static void prv_sleep_activity_update(KAlgState *alg_state, time_t utc_now, uint // How many minutes since sleep started? unsigned minutes_since_sleep_started = 0; if (state->current_stats.start_time != KALG_START_TIME_NONE) { - minutes_since_sleep_started = (sample_utc - state->current_stats.start_time) - / SECONDS_PER_MINUTE; + minutes_since_sleep_started = + (sample_utc - state->current_stats.start_time) / SECONDS_PER_MINUTE; } // Determine if the current session (if any) should end or if we should start a new one @@ -1894,15 +1855,14 @@ static void prv_sleep_activity_update(KAlgState *alg_state, time_t utc_now, uint minutes_since_sleep_started, shutting_down, sessions_cb, context, &sleep_end_time, &reject_session); - // ------------------------------------------------------------------------------- // If we've reached the end of a sleep cycle, validate the constraints of the session now // to see if we should accept it. if (sleep_end_time != KALG_START_TIME_NONE) { - uint16_t session_len_m = (sleep_end_time - state->current_stats.start_time) - / SECONDS_PER_MINUTE; + uint16_t session_len_m = + (sleep_end_time - state->current_stats.start_time) / SECONDS_PER_MINUTE; // Detected waking up. Validate the other constraints of a sleep cycle - KALG_LOG_DEBUG("Detected wake at %s, cycle_len: %u", prv_log_time(alg_state, sleep_end_time), + KALG_LOG_DEBUG("Detected wake at %s, cycle_len: %u", prv_log_time(alg_state, sleep_end_time), session_len_m); // Reject if the session is too short @@ -1920,8 +1880,8 @@ static void prv_sleep_activity_update(KAlgState *alg_state, time_t utc_now, uint // If we got a valid sleep cycle, add it to the totals if (!reject_session) { - PBL_LOG_DBG("Detected valid sleep cycle of len %d, starting at %s", - session_len_m, prv_log_time(alg_state, state->current_stats.start_time)); + PBL_LOG_DBG("Detected valid sleep cycle of len %d, starting at %s", session_len_m, + prv_log_time(alg_state, state->current_stats.start_time)); sessions_cb(context, KAlgActivityType_Sleep, state->current_stats.start_time, session_len_m * SECONDS_PER_MINUTE, false /*ongoing*/, false /*delete*/, @@ -1931,10 +1891,10 @@ static void prv_sleep_activity_update(KAlgState *alg_state, time_t utc_now, uint prv_deep_sleep_update(alg_state, sample_utc, score, KAlgDeepSleepAction_End, true /*ok_to_register*/, sessions_cb, context); // Update summary stats - state->summary_stats = (KAlgOngoingSleepStats) { - .sleep_start_utc = state->current_stats.start_time, - .uncertain_start_utc = 0, - .sleep_len_m = session_len_m, + state->summary_stats = (KAlgOngoingSleepStats){ + .sleep_start_utc = state->current_stats.start_time, + .uncertain_start_utc = 0, + .sleep_len_m = session_len_m, }; } else { @@ -1950,11 +1910,11 @@ static void prv_sleep_activity_update(KAlgState *alg_state, time_t utc_now, uint // Clear summary stats if they included this rejected session if (state->summary_stats.sleep_start_utc == state->current_stats.start_time) { - state->summary_stats = (KAlgOngoingSleepStats) {}; + state->summary_stats = (KAlgOngoingSleepStats){}; } } // No current session anymore - state->current_stats = (KAlgSleepActivityStats) { }; + state->current_stats = (KAlgSleepActivityStats){}; } else { // Sleep has not ended yet @@ -1968,10 +1928,11 @@ static void prv_sleep_activity_update(KAlgState *alg_state, time_t utc_now, uint // Update summary stats state->summary_stats.sleep_start_utc = state->current_stats.start_time; - state->summary_stats.uncertain_start_utc = utc_now - - (KALG_MAX_UNCERTAIN_SLEEP_M * SECONDS_PER_MINUTE); - state->summary_stats.sleep_len_m = (state->summary_stats.uncertain_start_utc - - state->summary_stats.sleep_start_utc) / SECONDS_PER_MINUTE; + state->summary_stats.uncertain_start_utc = + utc_now - (KALG_MAX_UNCERTAIN_SLEEP_M * SECONDS_PER_MINUTE); + state->summary_stats.sleep_len_m = + (state->summary_stats.uncertain_start_utc - state->summary_stats.sleep_start_utc) / + SECONDS_PER_MINUTE; } // Inform deep sleep state machine of the new sample @@ -1982,16 +1943,15 @@ static void prv_sleep_activity_update(KAlgState *alg_state, time_t utc_now, uint } } - // ------------------------------------------------------------------------------------------ // Return activity attributes for the given activity static const KAlgActivityAttributes *prv_get_step_activity_attributes(KAlgActivityType activity) { static const KAlgActivityAttributes k_attributes[KAlgActivityTypeCount] = { - // min_steps_per_min, max_steps_per_min - {0, 0}, // KAlgActivityType_Sleep - {0, 0}, // KAlgActivityType_RestfulSleep - {40, 130}, // KAlgActivityType_Walk - {130, 255}, // KAlgActivityType_Run + // min_steps_per_min, max_steps_per_min + {0, 0}, // KAlgActivityType_Sleep + {0, 0}, // KAlgActivityType_RestfulSleep + {40, 130}, // KAlgActivityType_Walk + {130, 255}, // KAlgActivityType_Run }; PBL_ASSERTN(activity < KAlgActivityTypeCount); @@ -2057,17 +2017,19 @@ static void prv_step_activity_update(KAlgState *alg_state, KAlgStepActivityState hrm_expire_s); } else if (duration_secs >= min_duration_for_hrm && activity_prefs_hrm_activity_tracking_is_enabled()) { - state->hrm_session = hrm_manager_subscribe_with_callback(INSTALL_ID_INVALID, - 1 /* update interval */, hrm_expire_s, HRMFeature_BPM, prv_hrm_subscription_cb, NULL); + state->hrm_session = hrm_manager_subscribe_with_callback( + INSTALL_ID_INVALID, 1 /* update interval */, hrm_expire_s, HRMFeature_BPM, + prv_hrm_subscription_cb, NULL); } #endif // If we've reached the minimum activity length, register/update it if (duration_secs >= k_min_activity_secs) { - KALG_LOG_DEBUG("Updating activity %d: steps: %"PRIu16", rest_cal: %"PRIu32", " - "active_cal: %"PRIu32", distance: %"PRIu32" ", (int)activity_type, - state->steps, state->resting_calories, state->active_calories, - state->distance_mm); + KALG_LOG_DEBUG("Updating activity %d: steps: %" PRIu16 ", rest_cal: %" PRIu32 + ", " + "active_cal: %" PRIu32 ", distance: %" PRIu32 " ", + (int)activity_type, state->steps, state->resting_calories, + state->active_calories, state->distance_mm); sessions_cb(context, activity_type, state->start_time, duration_secs, true /*ongoing*/, false /*delete*/, state->steps, state->resting_calories, state->active_calories, @@ -2083,20 +2045,21 @@ static void prv_step_activity_update(KAlgState *alg_state, KAlgStepActivityState // We can either end activity by reaching enough inactive minutes in a row or by forcefully // ending all activities by the `shutting_down` variable. - const bool activity_ended = (shutting_down) - ? true - : (state->inactive_minute_count++ > k_max_inactive_minutes); + const bool activity_ended = + (shutting_down) ? true : (state->inactive_minute_count++ > k_max_inactive_minutes); if (activity_ended) { // This activity has ended - int32_t duration_secs = utc_now - state->start_time - - (state->inactive_minute_count * SECONDS_PER_MINUTE); + int32_t duration_secs = + utc_now - state->start_time - (state->inactive_minute_count * SECONDS_PER_MINUTE); duration_secs = MAX(0, duration_secs); if ((uint32_t)duration_secs >= k_min_activity_secs) { - KALG_LOG_DEBUG("Ending activity %d: steps: %"PRIu16", rest_cal: %"PRIu32", ""active_cal: " - "%"PRIu32", distance: %"PRIu32" ", (int) activity_type, - state->steps, state->resting_calories, state->active_calories, - state->distance_mm); + KALG_LOG_DEBUG("Ending activity %d: steps: %" PRIu16 ", rest_cal: %" PRIu32 + ", " + "active_cal: " + "%" PRIu32 ", distance: %" PRIu32 " ", + (int)activity_type, state->steps, state->resting_calories, + state->active_calories, state->distance_mm); sessions_cb(context, activity_type, state->start_time, duration_secs, false /*ongoing*/, false /*delete*/, state->steps, state->resting_calories, state->active_calories, state->distance_mm); @@ -2113,20 +2076,19 @@ static void prv_step_activity_update(KAlgState *alg_state, KAlgStepActivityState } } - // --------------------------------------------------------------------------------------- // Feed new minute data into the activity detection state machine. This logic looks for non-sleep // activities, like walks, runs, etc. void kalg_activities_update(KAlgState *state, time_t utc_now, uint16_t steps, uint16_t vmc, uint8_t orientation, bool definitely_not_worn, - uint32_t resting_calories, - uint32_t active_calories, uint32_t distance_mm, bool shutting_down, + uint32_t resting_calories, uint32_t active_calories, + uint32_t distance_mm, bool shutting_down, KAlgActivitySessionCallback sessions_cb, void *context) { // If we've encountered a significant change in UTC time (connecting to a new phone, factory // reset, etc.) it could wreak havoc with our activity state machines, so we need to reset // state - if ((utc_now < state->last_activity_update_utc) - || (utc_now > (state->last_activity_update_utc + (5 * SECONDS_PER_MINUTE)))) { + if ((utc_now < state->last_activity_update_utc) || + (utc_now > (state->last_activity_update_utc + (5 * SECONDS_PER_MINUTE)))) { PBL_LOG_WRN("Resetting state due to time travel"); prv_reset_state(state); }; @@ -2144,12 +2106,11 @@ void kalg_activities_update(KAlgState *state, time_t utc_now, uint16_t steps, ui KAlgActivityType_Run); // Pass onto the sleep detector - prv_sleep_activity_update(state, utc_now, vmc, orientation, definitely_not_worn, - shutting_down, sessions_cb, context); + prv_sleep_activity_update(state, utc_now, vmc, orientation, definitely_not_worn, shutting_down, + sessions_cb, context); } } - // --------------------------------------------------------------------------------------- time_t kalg_activity_last_processed_time(KAlgState *state, KAlgActivityType activity) { switch (activity) { @@ -2167,7 +2128,6 @@ time_t kalg_activity_last_processed_time(KAlgState *state, KAlgActivityType acti return 0; } - // --------------------------------------------------------------------------------------- // Get sleep summary stats void kalg_get_sleep_stats(KAlgState *alg_state, KAlgOngoingSleepStats *stats) { diff --git a/src/fw/services/activity/workout_service.c b/src/fw/services/activity/workout_service.c index 447ff19108..4a721fdc8b 100644 --- a/src/fw/services/activity/workout_service.c +++ b/src/fw/services/activity/workout_service.c @@ -45,7 +45,7 @@ typedef struct CurrentWorkoutData { // Pace int32_t active_calories; int32_t current_bpm; - time_t current_bpm_timestamp_ts; // Time since boot + time_t current_bpm_timestamp_ts; // Time since boot HRZone current_hr_zone; int32_t hr_zone_time_s[HRZoneCount]; int32_t hr_samples_sum; @@ -84,10 +84,10 @@ static void prv_unlock(void) { static void prv_put_event(PebbleWorkoutEventType e_type) { PebbleEvent event = { - .type = PEBBLE_WORKOUT_EVENT, - .workout = { - .type = e_type, - } + .type = PEBBLE_WORKOUT_EVENT, + .workout = { + .type = e_type, + } }; event_put(&event); } @@ -151,8 +151,8 @@ static void prv_handle_movement_update(HealthEventMovementUpdateData *event) { wrkt_data->distance_m += (delta_distance_mm / MM_PER_METER); // Calculate active calories - const int32_t active_calories = activity_private_compute_active_calories(delta_distance_mm, - delta_ms); + const int32_t active_calories = + activity_private_compute_active_calories(delta_distance_mm, delta_ms); wrkt_data->active_calories += active_calories; } @@ -192,8 +192,7 @@ static void prv_handle_heart_rate_update(HealthEventHeartRateUpdateData *event) // --------------------------------------------------------------------------------------- bool workout_service_is_workout_type_supported(ActivitySessionType type) { - return type == ActivitySessionType_Walk || - type == ActivitySessionType_Run || + return type == ActivitySessionType_Walk || type == ActivitySessionType_Run || type == ActivitySessionType_Open; } @@ -206,9 +205,8 @@ T_STATIC void prv_abandon_workout_timer_callback(void *unused) { T_STATIC void prv_abandoned_notification_timer_callback(void *unused) { workout_utils_send_abandoned_workout_notification(); - s_workout_data.current_workout->workout_abandoned_timer = - evented_timer_register(WORKOUT_ABANDON_WORKOUT_TIMEOUT_MS, false, - prv_abandon_workout_timer_callback, NULL); + s_workout_data.current_workout->workout_abandoned_timer = evented_timer_register( + WORKOUT_ABANDON_WORKOUT_TIMEOUT_MS, false, prv_abandon_workout_timer_callback, NULL); } // --------------------------------------------------------------------------------------- @@ -295,14 +293,13 @@ void workout_service_frontend_opened(void) { #ifdef CONFIG_HRM s_workout_data.hrm_session = sys_hrm_manager_app_subscribe(app_get_app_id(), 1, 0, HRMFeature_BPM); -#endif // CONFIG_HRM +#endif // CONFIG_HRM s_workout_data.frontend_last_opened_ts = time_get_uptime_seconds(); prv_put_event(PebbleWorkoutEvent_FrontendOpened); } prv_unlock(); } - // --------------------------------------------------------------------------------------- // FIXME: We should probably handle this on KernelBG and not use the official app subscription void workout_service_frontend_closed(void) { @@ -343,14 +340,13 @@ void workout_service_frontend_closed(void) { // No time left. Kill the subscription sys_hrm_manager_unsubscribe(s_workout_data.hrm_session); } -#endif // CONFIG_HRM +#endif // CONFIG_HRM prv_put_event(PebbleWorkoutEvent_FrontendClosed); } prv_unlock(); } - // --------------------------------------------------------------------------------------- bool workout_service_start_workout(ActivitySessionType type) { bool rv = true; @@ -369,8 +365,8 @@ bool workout_service_start_workout(ActivitySessionType type) { // Before starting this new session we need to deal with any in progress sessions uint32_t num_sessions = 0; - ActivitySession *sessions = kernel_zalloc_check(sizeof(ActivitySession) * - ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT); + ActivitySession *sessions = + kernel_zalloc_check(sizeof(ActivitySession) * ACTIVITY_MAX_ACTIVITY_SESSIONS_COUNT); activity_get_sessions(&num_sessions, sessions); for (unsigned i = 0; i < num_sessions; i++) { // End and save any automatically detected ongoing sessions @@ -387,8 +383,8 @@ bool workout_service_start_workout(ActivitySessionType type) { s_workout_data.current_workout->current_bpm_timestamp_ts = time_get_uptime_seconds(); // FIXME: This probably doesn't need to be on a timer. We can just flush out a new time on each // API function call - s_workout_data.second_timer = (RegularTimerInfo) { - .cb = prv_workout_timer_cb, + s_workout_data.second_timer = (RegularTimerInfo){ + .cb = prv_workout_timer_cb, }; // Initialize all of our initial values for keeping track of metrics @@ -469,20 +465,19 @@ bool workout_service_stop_workout(void) { // workout mutex. activity_insights_push_activity_session_notification // creates a notification (blob_db flash write) that can take long enough if (wrkt->duration_s >= SECONDS_PER_MINUTE) { - const time_t len_min = MIN(ACTIVITY_SESSION_MAX_LENGTH_MIN, - wrkt->duration_s / SECONDS_PER_MINUTE); - session_to_save = (ActivitySession) { - .type = wrkt->type, - .start_utc = wrkt->start_utc, - .length_min = len_min, - .ongoing = false, - .manual = true, - .step_data.steps = wrkt->steps, - .step_data.distance_meters = wrkt->distance_m, - .step_data.active_kcalories = ROUND(wrkt->active_calories, - ACTIVITY_CALORIES_PER_KCAL), - .step_data.resting_kcalories = ROUND(activity_private_compute_resting_calories(len_min), - ACTIVITY_CALORIES_PER_KCAL), + const time_t len_min = + MIN(ACTIVITY_SESSION_MAX_LENGTH_MIN, wrkt->duration_s / SECONDS_PER_MINUTE); + session_to_save = (ActivitySession){ + .type = wrkt->type, + .start_utc = wrkt->start_utc, + .length_min = len_min, + .ongoing = false, + .manual = true, + .step_data.steps = wrkt->steps, + .step_data.distance_meters = wrkt->distance_m, + .step_data.active_kcalories = ROUND(wrkt->active_calories, ACTIVITY_CALORIES_PER_KCAL), + .step_data.resting_kcalories = + ROUND(activity_private_compute_resting_calories(len_min), ACTIVITY_CALORIES_PER_KCAL), }; avg_hr_to_save = prv_get_avg_hr(); memcpy(hr_zone_time_s_to_save, wrkt->hr_zone_time_s, sizeof(hr_zone_time_s_to_save)); @@ -501,7 +496,7 @@ bool workout_service_stop_workout(void) { // the user's preferred rate within a bounded window, regardless of when the app actually exits. sys_hrm_manager_set_update_interval(s_workout_data.hrm_session, 1, WORKOUT_ENDED_HR_SUBSCRIPTION_TS_EXPIRE); -#endif // CONFIG_HRM +#endif // CONFIG_HRM PBL_LOG_INFO("Stopping a workout with type: %d", wrkt->type); prv_put_event(PebbleWorkoutEvent_Stopped); @@ -570,7 +565,6 @@ bool workout_service_is_paused(void) { return rv; } - // --------------------------------------------------------------------------------------- bool workout_service_get_current_workout_type(ActivitySessionType *type_out) { bool rv = true; @@ -653,6 +647,6 @@ void workout_service_reset(void) { if (s_workout_data.current_workout) { kernel_free(s_workout_data.current_workout); } - s_workout_data = (WorkoutServiceData) {}; + s_workout_data = (WorkoutServiceData){}; } #endif diff --git a/src/fw/services/alarms/alarm.c b/src/fw/services/alarms/alarm.c index 43386b429b..9131a33680 100644 --- a/src/fw/services/alarms/alarm.c +++ b/src/fw/services/alarms/alarm.c @@ -33,7 +33,7 @@ PBL_LOG_MODULE_DEFINE(service_alarms, CONFIG_SERVICE_ALARMS_LOG_LEVEL); #define MAX_CONFIGURED_ALARMS (10) #define ALARM_FILE_NAME "alarms" -#define ALARM_MAX_FILE_SIZE KiBYTES(1) // ~50 alarms or so +#define ALARM_MAX_FILE_SIZE KiBYTES(1) // ~50 alarms or so #define NUM_ALARM_PINS_PER_ALARM (3) #define ALARM_ENTRY_SIZE (UUID_SIZE * NUM_ALARM_PINS_PER_ALARM) @@ -70,11 +70,11 @@ typedef enum AlarmDataType { // so that programmatic construction of a key is straightforward. typedef struct PACKED AlarmStorageKey { AlarmId id; - AlarmDataType type:8; + AlarmDataType type : 8; } AlarmStorageKey; typedef struct PACKED { - AlarmKind kind:8; + AlarmKind kind : 8; //! Whether the alarm is disabled or not. This field cannot be updated to a bitfield because the //! compiler sets arbitrary bits to indicate true as an optimization. bool is_disabled; @@ -88,16 +88,16 @@ typedef struct PACKED { struct { //! Whether the alarm is a smart alarm or not. Smart alarms attempt to wake the user the //! first moment the user is not in deep sleep in the time range T-30min to T every 5 min. - bool is_smart:1; + bool is_smart : 1; //! Whether the alarm should play a tone on speaker hardware. Default 0 (off) so legacy //! alarms loaded from older firmware stay silent. - bool sound_enabled:1; + bool sound_enabled : 1; //! Whether vibration is *disabled* for this alarm. Default 0 (vibration on) so legacy //! alarms loaded from older firmware keep vibrating. - bool vibrate_disabled:1; + bool vibrate_disabled : 1; //! Selected tone (AlarmTone enum value). Default 0 (Reveille). Irrelevant when //! sound_enabled is 0. - uint8_t tone:3; + uint8_t tone : 3; }; uint8_t flags; }; @@ -113,9 +113,9 @@ typedef bool (*AlarmOperationCallback)(AlarmId id, AlarmConfig *config, void *co // Forward declarations static void prv_alarm_operation(AlarmId id, AlarmOperationCallback callback, void *context); static bool prv_reload_alarms(SettingsFile *file); -static bool prv_alarm_get_config(SettingsFile *file, AlarmId id, AlarmConfig* config_out); -static void prv_alarm_set_config(SettingsFile *file, AlarmId id, const AlarmConfig* config); -static void prv_cron_callback(CronJob *job, void* data); +static bool prv_alarm_get_config(SettingsFile *file, AlarmId id, AlarmConfig *config_out); +static void prv_alarm_set_config(SettingsFile *file, AlarmId id, const AlarmConfig *config); +static void prv_cron_callback(CronJob *job, void *data); static void prv_snooze_alarm(int snooze_delay_s, bool user_initiated); static bool prv_set_alarm_kind_op(AlarmId id, AlarmConfig *config, void *context); static bool prv_set_alarm_custom_op(AlarmId id, AlarmConfig *config, void *context); @@ -143,7 +143,7 @@ static bool s_user_snoozed; static int s_smart_snooze_counter; //! Mirrors what ALARM_PREF_KEY_ARMED holds, so it is only rewritten when it changes. -static AlarmArmedRecord s_armed_record = { .id = ALARM_INVALID_ID }; +static AlarmArmedRecord s_armed_record = {.id = ALARM_INVALID_ID}; //! Alarm which should have fired while the watch was down. Fired once alarms are enabled. static AlarmId s_missed_alarm_id = ALARM_INVALID_ID; @@ -209,19 +209,19 @@ static bool prv_should_smart_alarm_trigger(const AlarmConfig *config) { //! @return true if an alarm pin was removed static bool prv_timeline_remove_alarm(SettingsFile *fd, AlarmId id) { bool success = false; - AlarmStorageKey key = { .id = id, .type = ALARM_DATA_PINS }; + AlarmStorageKey key = {.id = id, .type = ALARM_DATA_PINS}; int size = settings_file_get_len(fd, &key, sizeof(key)); - if (size == 0) { // empty (likely deleted) entry + if (size == 0) { // empty (likely deleted) entry return false; - } else if (size > ALARM_ENTRY_SIZE) { // malformed data + } else if (size > ALARM_ENTRY_SIZE) { // malformed data settings_file_delete(fd, &key, sizeof(key)); return false; - } else { // size <= ALARM_ENTRY_SIZE + } else { // size <= ALARM_ENTRY_SIZE uint8_t buffer[size]; if (settings_file_get(fd, &key, sizeof(key), buffer, size) == S_SUCCESS) { for (int i = 0; i < size / UUID_SIZE; i++) { - Uuid *pinid = (Uuid *) &buffer[UUID_SIZE * i]; + Uuid *pinid = (Uuid *)&buffer[UUID_SIZE * i]; if (uuid_is_invalid(pinid)) { continue; } @@ -253,8 +253,8 @@ static void prv_add_pin(AlarmId id, const AlarmConfig *config, time_t alarm_time // ---------------------------------------------------------------------------------------------- //! Pins alarm in the timeline for the next three days -static void prv_timeline_add_alarm(SettingsFile *file, const Alarm *alarm, - const CronJob *cron, const time_t current_time) { +static void prv_timeline_add_alarm(SettingsFile *file, const Alarm *alarm, const CronJob *cron, + const time_t current_time) { // If an alarm was updated then remove all the pins with stale information // If an alarm was added then this has no effect bool updated = prv_timeline_remove_alarm(file, alarm->id); @@ -288,9 +288,8 @@ static void prv_timeline_add_alarm(SettingsFile *file, const Alarm *alarm, alarm, cron_job_get_execute_time_from_epoch(cron, current_time + (i * SECONDS_PER_DAY))); } - AlarmStorageKey key = { .id = alarm->id, .type = ALARM_DATA_PINS }; - settings_file_set(file, &key, sizeof(key), - settings_file_buffer, UUID_SIZE * num_pin_adds); + AlarmStorageKey key = {.id = alarm->id, .type = ALARM_DATA_PINS}; + settings_file_set(file, &key, sizeof(key), settings_file_buffer, UUID_SIZE * num_pin_adds); cleanup: kernel_free(settings_file_buffer); @@ -300,19 +299,19 @@ static void prv_timeline_add_alarm(SettingsFile *file, const Alarm *alarm, // ---------------------------------------------------------------------------------------------- static time_t prv_build_cron(AlarmConfig *config, CronJob *cron) { - *cron = (CronJob) { - .cb = prv_cron_callback, - .cb_data = (void*)0, + *cron = (CronJob){ + .cb = prv_cron_callback, + .cb_data = (void *)0, - .minute = config->minute, - .hour = config->hour, - .mday = CRON_MDAY_ANY, - .month = CRON_MONTH_ANY, + .minute = config->minute, + .hour = config->hour, + .mday = CRON_MDAY_ANY, + .month = CRON_MONTH_ANY, - .offset_seconds = config->is_smart ? -SMART_ALARM_RANGE_S : 0, + .offset_seconds = config->is_smart ? -SMART_ALARM_RANGE_S : 0, - // Tolerate up to a 15 minute clock change before recalculating. - .clock_change_tolerance = 15 * SECONDS_PER_MINUTE, + // Tolerate up to a 15 minute clock change before recalculating. + .clock_change_tolerance = 15 * SECONDS_PER_MINUTE, }; for (int i = 0; i < DAYS_PER_WEEK; i++) { cron->wday |= config->scheduled_days[i] ? (1 << i) : 0; @@ -324,12 +323,11 @@ static time_t prv_build_cron(AlarmConfig *config, CronJob *cron) { static void prv_assign_alarm(Alarm *alarm, CronJob *cron) { cron_job_unschedule(&s_next_alarm_cron); s_next_alarm_cron = *cron; - s_next_alarm_cron.cb_data = (void*)(intptr_t)alarm->id; + s_next_alarm_cron.cb_data = (void *)(intptr_t)alarm->id; s_next_alarm = *alarm; s_next_alarm_time = cron_job_schedule(&s_next_alarm_cron); - PBL_LOG_INFO("Scheduling alarm %u to go off at %d:%d (%ld) (smart:%d)", - alarm->id, alarm->config.hour, alarm->config.minute, s_next_alarm_time, - alarm->config.is_smart); + PBL_LOG_INFO("Scheduling alarm %u to go off at %d:%d (%ld) (smart:%d)", alarm->id, + alarm->config.hour, alarm->config.minute, s_next_alarm_time, alarm->config.is_smart); } // ---------------------------------------------------------------------------------------------- @@ -362,14 +360,14 @@ static void prv_check_and_schedule_alarm(SettingsFile *fd, Alarm *alarm, bool re //! firing was missed while the watch was down. static void prv_persist_armed_alarm(SettingsFile *file) { const AlarmArmedRecord record = { - .time = s_next_alarm_time, - .id = (s_next_alarm_time != 0) ? s_next_alarm.id : ALARM_INVALID_ID, + .time = s_next_alarm_time, + .id = (s_next_alarm_time != 0) ? s_next_alarm.id : ALARM_INVALID_ID, }; if (memcmp(&record, &s_armed_record, sizeof(record)) == 0) { return; } - if (settings_file_set(file, ALARM_PREF_KEY_ARMED, strlen(ALARM_PREF_KEY_ARMED), - &record, sizeof(record)) == S_SUCCESS) { + if (settings_file_set(file, ALARM_PREF_KEY_ARMED, strlen(ALARM_PREF_KEY_ARMED), &record, + sizeof(record)) == S_SUCCESS) { s_armed_record = record; } } @@ -386,7 +384,7 @@ static bool prv_reload_alarms(SettingsFile *file) { for (int i = 0; i < MAX_CONFIGURED_ALARMS; ++i) { AlarmConfig config; if (prv_alarm_get_config(file, i, &config)) { - Alarm alarm = { .id = i, .config = config }; + Alarm alarm = {.id = i, .config = config}; prv_check_and_schedule_alarm(file, &alarm, false /* refresh */); alarm_found = true; } @@ -404,15 +402,15 @@ static void prv_put_alarm_event(void) { return; } - AlarmConfig *config = s_most_recent_alarm_id != ALARM_INVALID_ID ? &s_most_recent_alarm_config : - NULL; + AlarmConfig *config = + s_most_recent_alarm_id != ALARM_INVALID_ID ? &s_most_recent_alarm_config : NULL; const bool is_smart = (config && config->is_smart && activity_tracking_on()); - PebbleEvent e = (PebbleEvent) { - .type = PEBBLE_ALARM_CLOCK_EVENT, - .alarm_clock = { - .alarm_time = rtc_get_time(), - .alarm_label = is_smart ? i18n_noop("Smart Alarm") : i18n_noop("Alarm") - } + PebbleEvent e = (PebbleEvent){ + .type = PEBBLE_ALARM_CLOCK_EVENT, + .alarm_clock = { + .alarm_time = rtc_get_time(), + .alarm_label = is_smart ? i18n_noop("Smart Alarm") : i18n_noop("Alarm") + } }; event_put(&e); @@ -436,8 +434,8 @@ static void prv_clear_snooze_timer(void) { // Put a trigger event if applicable based on the type of alarm. static void prv_process_most_recent_alarm(void) { // Only processes the most recent alarm since it modifies the alarm config - AlarmConfig *config = s_most_recent_alarm_id != ALARM_INVALID_ID ? &s_most_recent_alarm_config : - NULL; + AlarmConfig *config = + s_most_recent_alarm_id != ALARM_INVALID_ID ? &s_most_recent_alarm_config : NULL; const bool user_snoozed = s_user_snoozed; s_user_snoozed = false; bool trigger = true; @@ -478,7 +476,7 @@ static void prv_snooze_timer_callback(void *unused) { // ---------------------------------------------------------------------------------------------- T_STATIC void prv_timer_kernel_bg_callback(void *data) { - AlarmId id = (intptr_t) data; + AlarmId id = (intptr_t)data; if (id == ALARM_INVALID_ID) { return; } @@ -498,7 +496,7 @@ T_STATIC void prv_timer_kernel_bg_callback(void *data) { // If this is a just once alarm, then disable it. if (rv && config->kind == ALARM_KIND_JUST_ONCE) { config->is_disabled = true; - prv_alarm_set_config(file, id, config); // This will reload the alarms + prv_alarm_set_config(file, id, config); // This will reload the alarms } else { prv_reload_alarms(file); } @@ -507,7 +505,6 @@ T_STATIC void prv_timer_kernel_bg_callback(void *data) { prv_file_close_and_unlock(file); kernel_free(file); - PBL_LOG_INFO("Alarm %u timeout", id); s_most_recent_alarm_recorded = false; s_most_recent_alarm_id = rv ? id : ALARM_INVALID_ID; @@ -523,16 +520,16 @@ static void prv_cron_callback(CronJob *job, void *data) { static void prv_persist_alarm(SettingsFile *fd, Alarm *alarm) { PBL_ASSERT(alarm->id >= 0 && alarm->id < MAX_CONFIGURED_ALARMS, "Invalid id %d", alarm->id); - AlarmStorageKey key = { .id = alarm->id, .type = ALARM_DATA_CONFIG }; + AlarmStorageKey key = {.id = alarm->id, .type = ALARM_DATA_CONFIG}; AlarmConfig config = { - .kind = alarm->config.kind, - .is_disabled = alarm->config.is_disabled, - .hour = alarm->config.hour, - .minute = alarm->config.minute, - .is_smart = alarm->config.is_smart, - .sound_enabled = alarm->config.sound_enabled, - .vibrate_disabled = alarm->config.vibrate_disabled, - .tone = alarm->config.tone, + .kind = alarm->config.kind, + .is_disabled = alarm->config.is_disabled, + .hour = alarm->config.hour, + .minute = alarm->config.minute, + .is_smart = alarm->config.is_smart, + .sound_enabled = alarm->config.sound_enabled, + .vibrate_disabled = alarm->config.vibrate_disabled, + .tone = alarm->config.tone, }; memcpy(&config.scheduled_days, alarm->config.scheduled_days, sizeof(config.scheduled_days)); settings_file_set(fd, &key, sizeof(key), &config, sizeof(config)); @@ -546,8 +543,8 @@ static void prv_add_and_schedule_alarm(SettingsFile *file, Alarm *alarm) { } // ---------------------------------------------------------------------------------------------- -static bool prv_alarm_get_config(SettingsFile *file, AlarmId id, AlarmConfig* config_out) { - AlarmStorageKey key = { .id = id, .type = ALARM_DATA_CONFIG }; +static bool prv_alarm_get_config(SettingsFile *file, AlarmId id, AlarmConfig *config_out) { + AlarmStorageKey key = {.id = id, .type = ALARM_DATA_CONFIG}; const int size = settings_file_get_len(file, &key, sizeof(key)); if (size <= 0) { return false; @@ -557,22 +554,23 @@ static bool prv_alarm_get_config(SettingsFile *file, AlarmId id, AlarmConfig* co const int load_size = MIN(size, (int)sizeof(config)); if (settings_file_get(file, &key, sizeof(key), &config, load_size) == S_SUCCESS) { if (config.hour > 23 || config.minute > 59) { - PBL_LOG_DBG("Invalid config for id %u! Blowing it out! " - "Hours %u Minutes %u Kind %u", id, config.hour, config.minute, - config.kind); + PBL_LOG_DBG( + "Invalid config for id %u! Blowing it out! " + "Hours %u Minutes %u Kind %u", + id, config.hour, config.minute, config.kind); settings_file_delete(file, &key, sizeof(key)); return false; } - *config_out = (AlarmConfig) { - .hour = config.hour, - .minute = config.minute, - .is_disabled = config.is_disabled, - .kind = config.kind, - .is_smart = config.is_smart, - .sound_enabled = config.sound_enabled, - .vibrate_disabled = config.vibrate_disabled, - .tone = config.tone, + *config_out = (AlarmConfig){ + .hour = config.hour, + .minute = config.minute, + .is_disabled = config.is_disabled, + .kind = config.kind, + .is_smart = config.is_smart, + .sound_enabled = config.sound_enabled, + .vibrate_disabled = config.vibrate_disabled, + .tone = config.tone, }; memcpy(&config_out->scheduled_days, config.scheduled_days, sizeof(config.scheduled_days)); return true; @@ -582,10 +580,10 @@ static bool prv_alarm_get_config(SettingsFile *file, AlarmId id, AlarmConfig* co } // ---------------------------------------------------------------------------------------------- -static void prv_alarm_set_config(SettingsFile *file, AlarmId id, const AlarmConfig* config) { +static void prv_alarm_set_config(SettingsFile *file, AlarmId id, const AlarmConfig *config) { PBL_ASSERTN(id >= 0 && id < MAX_CONFIGURED_ALARMS); - Alarm alarm = { .id = id, .config = *config }; + Alarm alarm = {.id = id, .config = *config}; prv_persist_alarm(file, &alarm); prv_reload_alarms(file); @@ -596,7 +594,7 @@ static AlarmId prv_get_next_free_alarm_id(SettingsFile *file) { AlarmId id_out = ALARM_INVALID_ID; for (int i = 0; i < MAX_CONFIGURED_ALARMS; ++i) { - AlarmStorageKey key = { .id = i, .type = ALARM_DATA_CONFIG }; + AlarmStorageKey key = {.id = i, .type = ALARM_DATA_CONFIG}; if (settings_file_get_len(file, &key, sizeof(key)) == 0) { id_out = i; break; @@ -649,7 +647,7 @@ static void prv_refresh_just_once_alarm_days(SettingsFile *file) { continue; } - Alarm alarm = { .id = i, .config = config }; + Alarm alarm = {.id = i, .config = config}; prv_persist_alarm(file, &alarm); } } @@ -681,14 +679,14 @@ AlarmId alarm_create(const AlarmInfo *info) { AlarmId id = prv_get_next_free_alarm_id(&file); AlarmConfig config = { - .hour = info->hour, - .minute = info->minute, - .kind = info->kind, - .is_disabled = false, - .is_smart = info->is_smart, - .sound_enabled = info->sound_enabled, - .vibrate_disabled = !info->vibrate_enabled, - .tone = info->tone, + .hour = info->hour, + .minute = info->minute, + .kind = info->kind, + .is_disabled = false, + .is_smart = info->is_smart, + .sound_enabled = info->sound_enabled, + .vibrate_disabled = !info->vibrate_enabled, + .tone = info->tone, }; if (info->kind == ALARM_KIND_CUSTOM && info->scheduled_days) { prv_set_alarm_custom_op(id, &config, (void *)info->scheduled_days); @@ -696,11 +694,10 @@ AlarmId alarm_create(const AlarmInfo *info) { prv_set_alarm_kind_op(id, &config, (void *)(uintptr_t)info->kind); } - Alarm alarm = { .id = id, .config = config }; + Alarm alarm = {.id = id, .config = config}; prv_add_and_schedule_alarm(&file, &alarm); prv_file_close_and_unlock(&file); - return id; } @@ -749,7 +746,7 @@ static bool prv_set_alarm_time_op(AlarmId id, AlarmConfig *config, void *context void alarm_set_time(AlarmId id, int hour, int minute) { prv_assert_alarm_params(hour, minute); - prv_alarm_operation(id, prv_set_alarm_time_op, &(SetAlarmTimeContext) { hour, minute }); + prv_alarm_operation(id, prv_set_alarm_time_op, &(SetAlarmTimeContext){hour, minute}); } // ---------------------------------------------------------------------------------------------- @@ -798,22 +795,22 @@ static bool prv_set_alarm_kind_op(AlarmId id, AlarmConfig *config, void *context switch (type) { case ALARM_KIND_EVERYDAY: config->kind = ALARM_KIND_EVERYDAY; - const bool everyday[DAYS_PER_WEEK] = { true, true, true, true, true, true, true }; + const bool everyday[DAYS_PER_WEEK] = {true, true, true, true, true, true, true}; memcpy(&config->scheduled_days, everyday, sizeof(everyday)); break; case ALARM_KIND_WEEKENDS: config->kind = ALARM_KIND_WEEKENDS; - const bool weekends[DAYS_PER_WEEK] = { true, false, false, false, false, false, true }; + const bool weekends[DAYS_PER_WEEK] = {true, false, false, false, false, false, true}; memcpy(&config->scheduled_days, weekends, sizeof(weekends)); break; case ALARM_KIND_WEEKDAYS: config->kind = ALARM_KIND_WEEKDAYS; - const bool weekdays[DAYS_PER_WEEK] = { false, true, true, true, true, true, false }; + const bool weekdays[DAYS_PER_WEEK] = {false, true, true, true, true, true, false}; memcpy(&config->scheduled_days, weekdays, sizeof(weekdays)); break; case ALARM_KIND_JUST_ONCE: config->kind = ALARM_KIND_JUST_ONCE; - const bool no_day[DAYS_PER_WEEK] = { false, false, false, false, false, false, false }; + const bool no_day[DAYS_PER_WEEK] = {false, false, false, false, false, false, false}; memcpy(&config->scheduled_days, no_day, sizeof(no_day)); prv_set_day_for_just_once_alarm(config, config->hour, config->minute); break; @@ -900,7 +897,7 @@ void alarm_delete(AlarmId id) { s_smart_snooze_counter = 0; } - AlarmStorageKey key = { .id = id, .type = ALARM_DATA_CONFIG }; + AlarmStorageKey key = {.id = id, .type = ALARM_DATA_CONFIG}; settings_file_delete(&file, &key, sizeof(key)); prv_timeline_remove_alarm(&file, id); prv_reload_alarms(&file); @@ -1054,16 +1051,16 @@ bool alarm_get_info(AlarmId id, AlarmInfo *info_out) { goto cleanup; } - *info_out = (AlarmInfo) { - .hour = config.hour, - .minute = config.minute, - .kind = config.kind, - .enabled = !config.is_disabled, - .is_smart = config.is_smart, - .sound_enabled = config.sound_enabled, - .vibrate_enabled = !config.vibrate_disabled, - .tone = config.tone, - .scheduled_days = NULL, + *info_out = (AlarmInfo){ + .hour = config.hour, + .minute = config.minute, + .kind = config.kind, + .enabled = !config.is_disabled, + .is_smart = config.is_smart, + .sound_enabled = config.sound_enabled, + .vibrate_enabled = !config.vibrate_disabled, + .tone = config.tone, + .scheduled_days = NULL, }; cleanup: @@ -1101,17 +1098,14 @@ void alarm_set_snooze_delay(uint16_t delay_m) { s_snooze_delay_m = delay_m; - settings_file_set(&file, ALARM_PREF_KEY_SNOOZE_DELAY, - strlen(ALARM_PREF_KEY_SNOOZE_DELAY), + settings_file_set(&file, ALARM_PREF_KEY_SNOOZE_DELAY, strlen(ALARM_PREF_KEY_SNOOZE_DELAY), &s_snooze_delay_m, sizeof(s_snooze_delay_m)); prv_file_close_and_unlock(&file); } - void alarm_dismiss_alarm(void) { prv_clear_snooze_timer(); - } // ---------------------------------------------------------------------------------------------- @@ -1123,13 +1117,13 @@ typedef struct { static bool alarm_for_each_itr(SettingsFile *file, SettingsRecordInfo *info, void *context) { // check entry is valid if (info->val_len == 0 || info->key_len != sizeof(AlarmStorageKey)) { - return true; // continue iterating + return true; // continue iterating } - ForEachAlarmItrData *itr_data = (ForEachAlarmItrData*) context; + ForEachAlarmItrData *itr_data = (ForEachAlarmItrData *)context; AlarmStorageKey key; - info->get_key(file, (uint8_t*) &key, info->key_len); + info->get_key(file, (uint8_t *)&key, info->key_len); if (key.type != ALARM_DATA_CONFIG) { return true; @@ -1142,15 +1136,15 @@ static bool alarm_for_each_itr(SettingsFile *file, SettingsRecordInfo *info, voi } AlarmInfo alarm_info = { - .hour = config.hour, - .minute = config.minute, - .kind = config.kind, - .enabled = !config.is_disabled, - .is_smart = config.is_smart, - .sound_enabled = config.sound_enabled, - .vibrate_enabled = !config.vibrate_disabled, - .tone = config.tone, - .scheduled_days = &config.scheduled_days, + .hour = config.hour, + .minute = config.minute, + .kind = config.kind, + .enabled = !config.is_disabled, + .is_smart = config.is_smart, + .sound_enabled = config.sound_enabled, + .vibrate_enabled = !config.vibrate_disabled, + .tone = config.tone, + .scheduled_days = &config.scheduled_days, }; itr_data->cb(key.id, &alarm_info, itr_data->cb_data); @@ -1163,8 +1157,8 @@ void alarm_for_each(AlarmForEach cb, void *context) { return; } ForEachAlarmItrData itr_data = { - .cb = cb, - .cb_data = context, + .cb = cb, + .cb_data = context, }; settings_file_each(&file, alarm_for_each_itr, &itr_data); @@ -1215,7 +1209,7 @@ void alarm_handle_clock_change(void) { if (s_smart_snooze_counter >= (SMART_ALARM_MAX_SMART_SNOOZE - 2)) { should_force_trigger = true; PBL_LOG_INFO("Smart alarm %u at counter %d near deadline, forcing trigger", - s_most_recent_alarm_id, s_smart_snooze_counter); + s_most_recent_alarm_id, s_smart_snooze_counter); } else { // Also check if current time is within the smart alarm window past the deadline // This handles cases where counter < 28 but we're legitimately past the alarm time @@ -1223,7 +1217,8 @@ void alarm_handle_clock_change(void) { struct tm now_tm; localtime_r(&now, &now_tm); int current_minutes = now_tm.tm_hour * 60 + now_tm.tm_min; - int alarm_minutes = s_most_recent_alarm_config.hour * 60 + s_most_recent_alarm_config.minute; + int alarm_minutes = + s_most_recent_alarm_config.hour * 60 + s_most_recent_alarm_config.minute; int time_diff_minutes = current_minutes - alarm_minutes; // Only trigger if we're 0-30 minutes past the alarm time (the smart window) @@ -1232,7 +1227,7 @@ void alarm_handle_clock_change(void) { if (time_diff_minutes >= 0 && time_diff_minutes <= (SMART_ALARM_RANGE_S / 60)) { should_force_trigger = true; PBL_LOG_INFO("Smart alarm %u in window, %d min past deadline, forcing trigger", - s_most_recent_alarm_id, time_diff_minutes); + s_most_recent_alarm_id, time_diff_minutes); } } } @@ -1255,7 +1250,7 @@ void alarm_handle_clock_change(void) { // change such as a periodic phone time sync must not cancel it, or the // smart alarm silently never goes off while basic alarms keep working. PBL_LOG_INFO("Clock change during alarm %u, leaving snooze loop intact", - s_most_recent_alarm_id); + s_most_recent_alarm_id); } } @@ -1281,16 +1276,14 @@ void alarm_init(void) { } uint16_t snooze_delay_value; - if (settings_file_get(&file, ALARM_PREF_KEY_SNOOZE_DELAY, - strlen(ALARM_PREF_KEY_SNOOZE_DELAY), - &snooze_delay_value, - sizeof(snooze_delay_value)) == S_SUCCESS) { + if (settings_file_get(&file, ALARM_PREF_KEY_SNOOZE_DELAY, strlen(ALARM_PREF_KEY_SNOOZE_DELAY), + &snooze_delay_value, sizeof(snooze_delay_value)) == S_SUCCESS) { s_snooze_delay_m = snooze_delay_value; } AlarmArmedRecord armed; - if (settings_file_get(&file, ALARM_PREF_KEY_ARMED, strlen(ALARM_PREF_KEY_ARMED), - &armed, sizeof(armed)) == S_SUCCESS) { + if (settings_file_get(&file, ALARM_PREF_KEY_ARMED, strlen(ALARM_PREF_KEY_ARMED), &armed, + sizeof(armed)) == S_SUCCESS) { s_armed_record = armed; // An alarm which was armed for a time we have already passed never got the chance to fire: @@ -1301,7 +1294,7 @@ void alarm_init(void) { s_missed_alarm_id = armed.id; s_missed_alarm_time = armed.time; PBL_LOG_INFO("Alarm %d missed by %lds, firing once alarms are enabled", armed.id, - (long)(now - armed.time)); + (long)(now - armed.time)); } } @@ -1330,57 +1323,61 @@ void alarm_service_enable_alarms(bool enable) { system_task_add_callback(prv_timer_kernel_bg_callback, (void *)(intptr_t)id); } - // ---------------------------------------------------------------------------------------------- const char *alarm_get_string_for_kind(AlarmKind kind, bool all_caps) { const char *alarm_day_text = NULL; switch (kind) { case ALARM_KIND_EVERYDAY: alarm_day_text = all_caps ? - /// A frequency option for alarms, i.e. the alarm would go off every day. Respect - /// capitalization! - i18n_noop("EVERY DAY") : - /// A frequency option for alarms, i.e. the alarm would go off every day. Respect - /// capitalization! - i18n_noop("Every Day"); + /// A frequency option for alarms, i.e. the alarm would go off every + /// day. Respect capitalization! + i18n_noop("EVERY DAY") + : + /// A frequency option for alarms, i.e. the alarm would go off every + /// day. Respect capitalization! + i18n_noop("Every Day"); break; case ALARM_KIND_WEEKDAYS: alarm_day_text = all_caps ? - /// A frequency option for alarms, i.e. the alarm would only go off every weekday. Respect - /// capitalization! - i18n_noop("WEEKDAYS") : - /// A frequency option for alarms, i.e. the alarm would only go off every weekday. Respect - /// capitalization! - i18n_noop("Weekdays"); + /// A frequency option for alarms, i.e. the alarm would only go off + /// every weekday. Respect capitalization! + i18n_noop("WEEKDAYS") + : + /// A frequency option for alarms, i.e. the alarm would only go off + /// every weekday. Respect capitalization! + i18n_noop("Weekdays"); break; case ALARM_KIND_WEEKENDS: alarm_day_text = all_caps ? - /// A frequency option for alarms, i.e. the alarm would only go off each day on the weekend. - /// Respect capitalization! - i18n_noop("WEEKENDS") : - /// A frequency option for alarms, i.e. the alarm would only go off each day on the weekend. - /// Respect capitalization! - i18n_noop("Weekends"); + /// A frequency option for alarms, i.e. the alarm would only go off + /// each day on the weekend. Respect capitalization! + i18n_noop("WEEKENDS") + : + /// A frequency option for alarms, i.e. the alarm would only go off + /// each day on the weekend. Respect capitalization! + i18n_noop("Weekends"); break; case ALARM_KIND_JUST_ONCE: alarm_day_text = all_caps ? - /// A frequency option for alarms, i.e. the alarm would only go off one time ever. Respect - /// capitalization! - i18n_noop("ONCE") : - /// A frequency option for alarms, i.e. the alarm would only go off one time ever. Respect - /// capitalization! - i18n_noop("Once"); + /// A frequency option for alarms, i.e. the alarm would only go off + /// one time ever. Respect capitalization! + i18n_noop("ONCE") + : + /// A frequency option for alarms, i.e. the alarm would only go off + /// one time ever. Respect capitalization! + i18n_noop("Once"); break; case ALARM_KIND_CUSTOM: // TODO: Use selected days as the string alarm_day_text = all_caps ? - /// A frequency option for alarms, i.e. the alarm would only go off on a custom choice of - /// days. Respect capitalization! - i18n_noop("CUSTOM") : - /// A frequency option for alarms, i.e. the alarm would only go off on a custom choice of - /// days. Respect capitalization! - i18n_noop("Custom"); + /// A frequency option for alarms, i.e. the alarm would only go off + /// on a custom choice of days. Respect capitalization! + i18n_noop("CUSTOM") + : + /// A frequency option for alarms, i.e. the alarm would only go off + /// on a custom choice of days. Respect capitalization! + i18n_noop("Custom"); break; default: alarm_day_text = ""; @@ -1393,23 +1390,13 @@ const char *alarm_get_string_for_kind(AlarmKind kind, bool all_caps) { void alarm_get_string_for_custom(bool scheduled_days[DAYS_PER_WEEK], char *alarm_day_text) { // 4 chars per day, 3 for letters and 1 for comma // max length = 7 days in a week * 4 chars per day = 28 - static const char *day_strings[7] = { i18n_noop("Sun"), - i18n_noop("Mon"), - i18n_noop("Tue"), - i18n_noop("Wed"), - i18n_noop("Thu"), - i18n_noop("Fri"), - i18n_noop("Sat") - }; - static const char *full_day_strings[7] = { - i18n_noop("Sundays"), - i18n_noop("Mondays"), - i18n_noop("Tuesdays"), - i18n_noop("Wednesdays"), - i18n_noop("Thursdays"), - i18n_noop("Fridays"), - i18n_noop("Saturdays") - }; + static const char *day_strings[7] = {i18n_noop("Sun"), i18n_noop("Mon"), i18n_noop("Tue"), + i18n_noop("Wed"), i18n_noop("Thu"), i18n_noop("Fri"), + i18n_noop("Sat")}; + static const char *full_day_strings[7] = {i18n_noop("Sundays"), i18n_noop("Mondays"), + i18n_noop("Tuesdays"), i18n_noop("Wednesdays"), + i18n_noop("Thursdays"), i18n_noop("Fridays"), + i18n_noop("Saturdays")}; uint8_t num_days_scheduled = 0, latest_day_scheduled = 0; // Monday should come first in the list @@ -1420,15 +1407,15 @@ void alarm_get_string_for_custom(bool scheduled_days[DAYS_PER_WEEK], char *alarm const char *day_string = i18n_get(day_strings[i % 7], day_strings); strcat(alarm_day_text, day_string); strcat(alarm_day_text, ","); - i18n_free(day_strings[i % 7], day_strings); // copied in by strcat. We can free it + i18n_free(day_strings[i % 7], day_strings); // copied in by strcat. We can free it } } if (num_days_scheduled == 1) { // Write the full day string - const char *full_day_string = i18n_get(full_day_strings[latest_day_scheduled], - full_day_strings); + const char *full_day_string = + i18n_get(full_day_strings[latest_day_scheduled], full_day_strings); strcpy(alarm_day_text, full_day_string); - i18n_free(full_day_strings[latest_day_scheduled], full_day_strings); // copied in above. + i18n_free(full_day_strings[latest_day_scheduled], full_day_strings); // copied in above. } else if (num_days_scheduled > 1) { // Write the shortened day strings, remove last ',' alarm_day_text[strnlen(alarm_day_text, 28) - 1] = 0; diff --git a/src/fw/services/alarms/alarm_pin.c b/src/fw/services/alarms/alarm_pin.c index db5f2f26aa..4e4e0aab7b 100644 --- a/src/fw/services/alarms/alarm_pin.c +++ b/src/fw/services/alarms/alarm_pin.c @@ -10,16 +10,15 @@ #include "pbl/services/timeline/timeline.h" #include "pbl/services/timeline/timeline_resources.h" - // ---------------------------------------------------------------------------------------------- //! Sets attributes for an alarm pin static void prv_set_pin_attributes(AttributeList *list, AlarmType type, AlarmKind kind) { const bool is_smart = (type == AlarmType_Smart); attribute_list_add_cstring(list, AttributeIdTitle, - is_smart ? i18n_get("Smart Alarm", list) : i18n_get("Alarm", list)); - attribute_list_add_resource_id(list, AttributeIdIconPin, - is_smart ? TIMELINE_RESOURCE_SMART_ALARM : - TIMELINE_RESOURCE_ALARM_CLOCK); + is_smart ? i18n_get("Smart Alarm", list) : i18n_get("Alarm", list)); + attribute_list_add_resource_id( + list, AttributeIdIconPin, + is_smart ? TIMELINE_RESOURCE_SMART_ALARM : TIMELINE_RESOURCE_ALARM_CLOCK); attribute_list_add_resource_id(list, AttributeIdIconTiny, TIMELINE_RESOURCE_ALARM_CLOCK); const bool all_caps = false; const char *alarm_string = i18n_get(alarm_get_string_for_kind(kind, all_caps), list); @@ -30,29 +29,29 @@ static void prv_set_pin_attributes(AttributeList *list, AlarmType type, AlarmKin // ---------------------------------------------------------------------------------------------- static void prv_set_edit_action_attributes(AttributeList *list, AlarmId id) { attribute_list_add_cstring(list, AttributeIdTitle, i18n_get("Edit", list)); - attribute_list_add_uint32(list, AttributeIdLaunchCode, (uint32_t) id); + attribute_list_add_uint32(list, AttributeIdLaunchCode, (uint32_t)id); } // ---------------------------------------------------------------------------------------------- void alarm_pin_add(time_t alarm_time, AlarmId id, AlarmType type, AlarmKind kind, Uuid *uuid_out) { - const unsigned num_actions = 1; // We are just supporting "edit" for now + const unsigned num_actions = 1; // We are just supporting "edit" for now TimelineItemActionGroup action_group = { - .num_actions = num_actions, - .actions = task_zalloc_check(sizeof(TimelineItemAction) * num_actions), + .num_actions = num_actions, + .actions = task_zalloc_check(sizeof(TimelineItemAction) * num_actions), }; AttributeList edit_attr_list = {0}; prv_set_edit_action_attributes(&edit_attr_list, id); - action_group.actions[0] = (TimelineItemAction) { - .id = (uint8_t) id, // id is guaranteed to be valid here, and we only support 10 alarms - .type = TimelineItemActionTypeOpenWatchApp, - .attr_list = edit_attr_list, + action_group.actions[0] = (TimelineItemAction){ + .id = (uint8_t)id, // id is guaranteed to be valid here, and we only support 10 alarms + .type = TimelineItemActionTypeOpenWatchApp, + .attr_list = edit_attr_list, }; AttributeList pin_attr_list = {0}; prv_set_pin_attributes(&pin_attr_list, type, kind); - TimelineItem *item = timeline_item_create_with_attributes(alarm_time, 0, TimelineItemTypePin, - LayoutIdAlarm, &pin_attr_list, &action_group); + TimelineItem *item = timeline_item_create_with_attributes( + alarm_time, 0, TimelineItemTypePin, LayoutIdAlarm, &pin_attr_list, &action_group); item->header.from_watch = true; item->header.parent_id = (Uuid)UUID_ALARMS_DATA_SOURCE; diff --git a/src/fw/services/alarms/alarm_tones.c b/src/fw/services/alarms/alarm_tones.c index b5ca8e1293..e22d43bdba 100644 --- a/src/fw/services/alarms/alarm_tones.c +++ b/src/fw/services/alarms/alarm_tones.c @@ -8,114 +8,166 @@ #define ALARM_TONE_COUNT 4 #define NOTE(midi, wave, ms) \ - { .midi_note = (midi), .waveform = (wave), .duration_ms = (ms), .velocity = 0, .reserved = 0 } + {.midi_note = (midi), .waveform = (wave), .duration_ms = (ms), .velocity = 0, .reserved = 0} // MIDI: C4=60, D4=62, E4=64, F4=65, G4=67, A4=69, B4=71, // C5=72, D5=74, E5=76, F5=77, G5=79, A5=81, C6=84. // Reveille — beat-for-beat with the Reveille vibe score static const SpeakerNote s_reveille[] = { - // note_1, _ - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_6, _, note_10, note_6, note_1, _, note_10, _ - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(72, SpeakerWaveformSquare, 120), - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // (repeat) - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(72, SpeakerWaveformSquare, 120), - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_6, _, note_10, note_6, note_1, _, note_6, _ - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(72, SpeakerWaveformSquare, 120), - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_10_ (held), _, _, note_6, _, note_1, _ - NOTE(76, SpeakerWaveformSquare, 240), NOTE(0, SpeakerWaveformSquare, 240), - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_6, _, note_10, note_6, note_1, _, note_10, _ - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(72, SpeakerWaveformSquare, 120), - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // (repeat) - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(72, SpeakerWaveformSquare, 120), - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_6, _, note_10, note_6, note_1, _, note_1, _ - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(72, SpeakerWaveformSquare, 120), - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_6___ (long held), _, _, note_10, _ - NOTE(72, SpeakerWaveformSquare, 480), NOTE(0, SpeakerWaveformSquare, 240), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_10 × 4 - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_13_ (apex G5), _, _, note_10, _, note_10, _ - NOTE(79, SpeakerWaveformSquare, 240), NOTE(0, SpeakerWaveformSquare, 240), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_10, _, note_6, _, note_10, _, note_6, _ - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_10___ (long E5), _, _, note_10, _ - NOTE(76, SpeakerWaveformSquare, 480), NOTE(0, SpeakerWaveformSquare, 240), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_10 × 4 - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_13_ (apex G5), _, _, note_10, _, note_10, _ - NOTE(79, SpeakerWaveformSquare, 240), NOTE(0, SpeakerWaveformSquare, 240), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_6, _, note_10, note_6, note_1, _, note_1, _ - NOTE(72, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(76, SpeakerWaveformSquare, 120), NOTE(72, SpeakerWaveformSquare, 120), - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - NOTE(67, SpeakerWaveformSquare, 120), NOTE(0, SpeakerWaveformSquare, 120), - // note_6___ (final C5), then the 480ms of trailing rests inside the score. - NOTE(72, SpeakerWaveformSquare, 480), NOTE(0, SpeakerWaveformSquare, 480), + // note_1, _ + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_6, _, note_10, note_6, note_1, _, note_10, _ + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // (repeat) + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_6, _, note_10, note_6, note_1, _, note_6, _ + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_10_ (held), _, _, note_6, _, note_1, _ + NOTE(76, SpeakerWaveformSquare, 240), + NOTE(0, SpeakerWaveformSquare, 240), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_6, _, note_10, note_6, note_1, _, note_10, _ + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // (repeat) + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_6, _, note_10, note_6, note_1, _, note_1, _ + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_6___ (long held), _, _, note_10, _ + NOTE(72, SpeakerWaveformSquare, 480), + NOTE(0, SpeakerWaveformSquare, 240), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_10 × 4 + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_13_ (apex G5), _, _, note_10, _, note_10, _ + NOTE(79, SpeakerWaveformSquare, 240), + NOTE(0, SpeakerWaveformSquare, 240), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_10, _, note_6, _, note_10, _, note_6, _ + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_10___ (long E5), _, _, note_10, _ + NOTE(76, SpeakerWaveformSquare, 480), + NOTE(0, SpeakerWaveformSquare, 240), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_10 × 4 + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_13_ (apex G5), _, _, note_10, _, note_10, _ + NOTE(79, SpeakerWaveformSquare, 240), + NOTE(0, SpeakerWaveformSquare, 240), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_6, _, note_10, note_6, note_1, _, note_1, _ + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(76, SpeakerWaveformSquare, 120), + NOTE(72, SpeakerWaveformSquare, 120), + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + NOTE(67, SpeakerWaveformSquare, 120), + NOTE(0, SpeakerWaveformSquare, 120), + // note_6___ (final C5), then the 480ms of trailing rests inside the score. + NOTE(72, SpeakerWaveformSquare, 480), + NOTE(0, SpeakerWaveformSquare, 480), }; // Beacon — alternating C5/G5 squares, six cycles. Insistent and unambiguous. static const SpeakerNote s_beacon[] = { - NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), - NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), - NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), - NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), - NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), - NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), + NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), + NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), + NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), + NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), + NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), + NOTE(72, SpeakerWaveformSquare, 200), NOTE(79, SpeakerWaveformSquare, 200), }; // Bell — sine wave descending, gentler than Reveille. static const SpeakerNote s_bell[] = { - NOTE(81, SpeakerWaveformSine, 500), // A5 - NOTE(77, SpeakerWaveformSine, 500), // F5 - NOTE(74, SpeakerWaveformSine, 500), // D5 - NOTE(69, SpeakerWaveformSine, 700), // A4 + NOTE(81, SpeakerWaveformSine, 500), // A5 + NOTE(77, SpeakerWaveformSine, 500), // F5 + NOTE(74, SpeakerWaveformSine, 500), // D5 + NOTE(69, SpeakerWaveformSine, 700), // A4 }; // Chime — triangle ascending with brief rests, light and pleasant. static const SpeakerNote s_chime[] = { - NOTE(72, SpeakerWaveformTriangle, 250), // C5 - NOTE(0, SpeakerWaveformTriangle, 50), - NOTE(76, SpeakerWaveformTriangle, 250), // E5 - NOTE(0, SpeakerWaveformTriangle, 50), - NOTE(79, SpeakerWaveformTriangle, 250), // G5 - NOTE(0, SpeakerWaveformTriangle, 50), - NOTE(84, SpeakerWaveformTriangle, 500), // C6 + NOTE(72, SpeakerWaveformTriangle, 250), // C5 + NOTE(0, SpeakerWaveformTriangle, 50), NOTE(76, SpeakerWaveformTriangle, 250), // E5 + NOTE(0, SpeakerWaveformTriangle, 50), NOTE(79, SpeakerWaveformTriangle, 250), // G5 + NOTE(0, SpeakerWaveformTriangle, 50), NOTE(84, SpeakerWaveformTriangle, 500), // C6 }; #undef NOTE @@ -131,14 +183,17 @@ static const struct { const char *name; VibeScoreId paired_vibe; } s_tones[ALARM_TONE_COUNT] = { - [AlarmTone_Reveille] = { s_reveille, sizeof(s_reveille) / sizeof(s_reveille[0]), - i18n_noop("Reveille"), VibeScoreId_Reveille }, - [AlarmTone_Beacon] = { s_beacon, sizeof(s_beacon) / sizeof(s_beacon[0]), - i18n_noop("Beacon"), VibeScoreId_Invalid }, - [AlarmTone_Bell] = { s_bell, sizeof(s_bell) / sizeof(s_bell[0]), - i18n_noop("Bell"), VibeScoreId_Invalid }, - [AlarmTone_Chime] = { s_chime, sizeof(s_chime) / sizeof(s_chime[0]), - i18n_noop("Chime"), VibeScoreId_Invalid }, + [AlarmTone_Reveille] = + {s_reveille, sizeof(s_reveille) / sizeof(s_reveille[0]), i18n_noop("Reveille"), + VibeScoreId_Reveille}, + [AlarmTone_Beacon] = + {s_beacon, sizeof(s_beacon) / sizeof(s_beacon[0]), i18n_noop("Beacon"), + VibeScoreId_Invalid}, + [AlarmTone_Bell] = + {s_bell, sizeof(s_bell) / sizeof(s_bell[0]), i18n_noop("Bell"), VibeScoreId_Invalid}, + [AlarmTone_Chime] = { + s_chime, sizeof(s_chime) / sizeof(s_chime[0]), i18n_noop("Chime"), VibeScoreId_Invalid + }, }; _Static_assert(AlarmTone_Chime + 1 == ALARM_TONE_COUNT, diff --git a/src/fw/services/analytics/analytics.c b/src/fw/services/analytics/analytics.c index 2a679232cb..206d03f9ce 100644 --- a/src/fw/services/analytics/analytics.c +++ b/src/fw/services/analytics/analytics.c @@ -125,14 +125,13 @@ DEFINE_SYSCALL(void, sys_pbl_analytics_set_unsigned, enum pbl_analytics_key key, } } -DEFINE_SYSCALL(void, sys_pbl_analytics_set_string, enum pbl_analytics_key key, - const char *value) { +DEFINE_SYSCALL(void, sys_pbl_analytics_set_string, enum pbl_analytics_key key, const char *value) { if (!prv_analytics_key_in_range(key)) { return; } if (PRIVILEGE_WAS_ELEVATED) { - if (!memory_layout_is_cstring_in_region( - memory_layout_get_app_region(), value, ANALYTICS_STRING_MAX_LEN)) { + if (!memory_layout_is_cstring_in_region(memory_layout_get_app_region(), value, + ANALYTICS_STRING_MAX_LEN)) { syscall_failed(); } } @@ -175,16 +174,23 @@ void command_analytics_heartbeat(void) { #else // No analytics backend: provide no-op stubs. -void pbl_analytics_init(void) {} +void pbl_analytics_init(void) { +} DEFINE_SYSCALL(void, sys_pbl_analytics_set_signed, enum pbl_analytics_key key, - int32_t signed_value) {} + int32_t signed_value) { +} DEFINE_SYSCALL(void, sys_pbl_analytics_set_unsigned, enum pbl_analytics_key key, - uint32_t unsigned_value) {} -DEFINE_SYSCALL(void, sys_pbl_analytics_set_string, enum pbl_analytics_key key, - const char *value) {} -DEFINE_SYSCALL(void, sys_pbl_analytics_timer_start, enum pbl_analytics_key key) {} -DEFINE_SYSCALL(void, sys_pbl_analytics_timer_stop, enum pbl_analytics_key key) {} -DEFINE_SYSCALL(void, sys_pbl_analytics_add, enum pbl_analytics_key key, int32_t amount) {} -void command_analytics_heartbeat(void) {} + uint32_t unsigned_value) { +} +DEFINE_SYSCALL(void, sys_pbl_analytics_set_string, enum pbl_analytics_key key, const char *value) { +} +DEFINE_SYSCALL(void, sys_pbl_analytics_timer_start, enum pbl_analytics_key key) { +} +DEFINE_SYSCALL(void, sys_pbl_analytics_timer_stop, enum pbl_analytics_key key) { +} +DEFINE_SYSCALL(void, sys_pbl_analytics_add, enum pbl_analytics_key key, int32_t amount) { +} +void command_analytics_heartbeat(void) { +} #endif \ No newline at end of file diff --git a/src/fw/services/analytics/native.c b/src/fw/services/analytics/native.c index 7753c0ccf6..a81b18cc8e 100644 --- a/src/fw/services/analytics/native.c +++ b/src/fw/services/analytics/native.c @@ -44,9 +44,8 @@ struct PACKED native_heartbeat_record { }; /* The record is logged as a raw byte blob, so it must have no padding. */ -_Static_assert( - sizeof(struct native_heartbeat_record) == - sizeof(uint8_t) + sizeof(uint64_t) + BUILD_ID_EXPECTED_LEN +_Static_assert(sizeof(struct native_heartbeat_record) == + sizeof(uint8_t) + sizeof(uint64_t) + BUILD_ID_EXPECTED_LEN #define PBL_ANALYTICS_METRIC_DEFINE_UNSIGNED(key) +sizeof(uint32_t) #define PBL_ANALYTICS_METRIC_DEFINE_SIGNED(key) +sizeof(int32_t) #define PBL_ANALYTICS_METRIC_DEFINE_SCALED_UNSIGNED(key, scale) +sizeof(uint32_t) + sizeof(uint16_t) @@ -60,8 +59,8 @@ _Static_assert( #undef PBL_ANALYTICS_METRIC_DEFINE_SCALED_SIGNED #undef PBL_ANALYTICS_METRIC_DEFINE_TIMER #undef PBL_ANALYTICS_METRIC_DEFINE_STRING - , - "native_heartbeat_record must be packed (no padding)"); + , + "native_heartbeat_record must be packed (no padding)"); /* Type-specific internal index enums (dense, no gaps) */ diff --git a/src/fw/services/animation_service/service.c b/src/fw/services/animation_service/service.c index 7031115ef0..640cc60808 100644 --- a/src/fw/services/animation_service/service.c +++ b/src/fw/services/animation_service/service.c @@ -16,7 +16,6 @@ #include "syscall/syscall_internal.h" - // The timer ID used for each task that we support static TimerID s_kernel_main_timer_id = TIMER_INVALID_ID; static TimerID s_app_timer_id = TIMER_INVALID_ID; @@ -43,16 +42,13 @@ void animation_service_cleanup(PebbleTask task) { } } - // ------------------------------------------------------------------------------------------ -static void prv_timer_callback(void * context) { +static void prv_timer_callback(void *context) { PebbleTask task = (PebbleTask)context; PebbleEvent e = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = animation_private_timer_callback - } + .type = PEBBLE_CALLBACK_EVENT, + .callback = {.callback = animation_private_timer_callback} }; switch (task) { @@ -71,10 +67,9 @@ static void prv_timer_callback(void * context) { break; default: PBL_CROAK("Invalid task %s", pebble_task_get_name(pebble_task_get_current())); - } + } } - // ------------------------------------------------------------------------------------------ DEFINE_SYSCALL(void, animation_service_timer_event_received, void) { PebbleTask task = pebble_task_get_current(); @@ -91,7 +86,6 @@ DEFINE_SYSCALL(void, animation_service_timer_event_received, void) { } } - // ------------------------------------------------------------------------------------------ DEFINE_SYSCALL(void, animation_service_timer_schedule, uint32_t ms) { PebbleTask task = pebble_task_get_current(); @@ -116,15 +110,14 @@ DEFINE_SYSCALL(void, animation_service_timer_schedule, uint32_t ms) { // Schedule/reschedule it if (*timer_id != TIMER_INVALID_ID) { - success = new_timer_start(*timer_id, ms, prv_timer_callback, (void *)(uintptr_t)task, - 0 /*flags */); + success = + new_timer_start(*timer_id, ms, prv_timer_callback, (void *)(uintptr_t)task, 0 /*flags */); } if (!success) { APP_LOG(APP_LOG_LEVEL_ERROR, "Error scheduling timer"); } } - // --------------------------------------------------------------------------- // Used for unit tests only TimerID animation_service_test_get_timer_id(void) { diff --git a/src/fw/services/app_cache/service.c b/src/fw/services/app_cache/service.c index 9885993fa6..591968089c 100644 --- a/src/fw/services/app_cache/service.c +++ b/src/fw/services/app_cache/service.c @@ -66,10 +66,10 @@ static PBL_MUTEX_DEFINE(s_app_cache_mutex); //! Actual data structure stored in flash about an app cache entry typedef struct PACKED { - time_t install_date; - time_t last_launch; - uint32_t total_size; - uint16_t launch_count; + time_t install_date; + time_t last_launch; + uint32_t total_size; + uint16_t launch_count; } AppCacheEntry; typedef struct { @@ -91,7 +91,7 @@ typedef struct { //! Policy rules: //! 1. App that has least recently launched or been installed app is evicted. static uint32_t prv_calculate_priority(AppCacheEntry *entry) { - return (uint32_t) MAX(entry->last_launch, entry->install_date); + return (uint32_t)MAX(entry->last_launch, entry->install_date); } //! Comparator for EvictListNode @@ -117,7 +117,7 @@ static int evict_node_comparator(void *a, void *b) { //! Trim the applications with highest priority while still keeping (bytes_in_list > bytes_needed) static void prv_trim_top_priorities(EvictListNode **list_node, uint32_t *bytes_in_list, - uint32_t bytes_needed) { + uint32_t bytes_needed) { EvictListNode *node = *list_node; while (node) { EvictListNode *temp = node; @@ -138,8 +138,8 @@ static void prv_cleanup_app_cache_if_needed(void *data) { if (pfs_space < APP_SPACE_BUFFER) { const uint32_t to_free = (APP_SPACE_BUFFER - pfs_space); - PBL_LOG_DBG("Cache OOS: Need to free %"PRIu32" bytes, PFS avail space: %"PRIu32"", - to_free, pfs_space); + PBL_LOG_DBG("Cache OOS: Need to free %" PRIu32 " bytes, PFS avail space: %" PRIu32 "", to_free, + pfs_space); app_cache_free_up_space(to_free); } } @@ -169,10 +169,10 @@ static bool prv_is_in_list(AppInstallId id, const AppInstallId list[], uint8_t l static bool prv_each_free_up_space(SettingsFile *file, SettingsRecordInfo *info, void *context) { // check entry is valid if ((info->key_len != sizeof(AppInstallId)) || (info->val_len != sizeof(AppCacheEntry))) { - PBL_LOG_WRN("Invalid cache entry with key_len: %u and val_len: %u, flushing", - info->key_len, info->val_len); + PBL_LOG_WRN("Invalid cache entry with key_len: %u and val_len: %u, flushing", info->key_len, + info->val_len); system_task_add_callback(prv_delete_cache_callback, NULL); - return false; // stop iterating, delete the file and binaries + return false; // stop iterating, delete the file and binaries } EachEvictData *data = (EachEvictData *)context; @@ -194,21 +194,21 @@ static bool prv_each_free_up_space(SettingsFile *file, SettingsRecordInfo *info, priority = MAX_PRIORITY; } - *node = (EvictListNode) { - .id = id, - .size = entry.total_size, - .priority = MAX(priority, prv_calculate_priority(&entry)), + *node = (EvictListNode){ + .id = id, + .size = entry.total_size, + .priority = MAX(priority, prv_calculate_priority(&entry)), }; data->list = (EvictListNode *)list_sorted_add((ListNode *)data->list, (ListNode *)node, - evict_node_comparator, false); + evict_node_comparator, false); data->bytes_in_list += node->size; if (data->bytes_in_list > data->bytes_needed) { prv_trim_top_priorities(&data->list, &data->bytes_in_list, data->bytes_needed); } - return true; // continue iterating + return true; // continue iterating } ////////////////////////// @@ -227,16 +227,16 @@ status_t app_cache_app_launched(AppInstallId app_id) { goto unlock; } - AppCacheEntry entry = { 0 }; - rv = settings_file_get(&file, (uint8_t *)&app_id, sizeof(AppInstallId), - (uint8_t *)&entry, sizeof(AppCacheEntry)); + AppCacheEntry entry = {0}; + rv = settings_file_get(&file, (uint8_t *)&app_id, sizeof(AppInstallId), (uint8_t *)&entry, + sizeof(AppCacheEntry)); if (rv == S_SUCCESS) { entry.last_launch = rtc_get_time(); entry.launch_count += 1; - rv = settings_file_set(&file, (uint8_t *)&app_id, sizeof(AppInstallId), - (uint8_t *)&entry, sizeof(AppCacheEntry)); + rv = settings_file_set(&file, (uint8_t *)&app_id, sizeof(AppInstallId), (uint8_t *)&entry, + sizeof(AppCacheEntry)); } else { app_storage_delete_app(app_id); settings_file_delete(&file, (uint8_t *)&app_id, sizeof(AppInstallId)); @@ -266,22 +266,22 @@ status_t app_cache_free_up_space(uint32_t bytes_needed) { } // we don't want to remove any default apps or quick launch apps, so keep them in a list. - EachEvictData evict_data = (EachEvictData) { - .bytes_needed = bytes_needed, - .do_not_evict = { + EachEvictData evict_data = (EachEvictData){ + .bytes_needed = bytes_needed, + .do_not_evict = { #ifndef CONFIG_SHELL_SDK - quick_launch_get_app(BUTTON_ID_UP), - quick_launch_get_app(BUTTON_ID_SELECT), - quick_launch_get_app(BUTTON_ID_DOWN), - quick_launch_get_app(BUTTON_ID_BACK), - quick_launch_single_click_get_app(BUTTON_ID_UP), - quick_launch_single_click_get_app(BUTTON_ID_DOWN), - quick_launch_combo_back_up_get_app(), - quick_launch_combo_up_down_get_app(), + quick_launch_get_app(BUTTON_ID_UP), + quick_launch_get_app(BUTTON_ID_SELECT), + quick_launch_get_app(BUTTON_ID_DOWN), + quick_launch_get_app(BUTTON_ID_BACK), + quick_launch_single_click_get_app(BUTTON_ID_UP), + quick_launch_single_click_get_app(BUTTON_ID_DOWN), + quick_launch_combo_back_up_get_app(), + quick_launch_combo_up_down_get_app(), #endif - watchface_get_default_install_id(), - worker_preferences_get_default_worker(), - }, + watchface_get_default_install_id(), + worker_preferences_get_default_worker(), + }, }; settings_file_each(&file, prv_each_free_up_space, &evict_data); @@ -291,8 +291,8 @@ status_t app_cache_free_up_space(uint32_t bytes_needed) { EvictListNode *node = evict_data.list; while (node) { EvictListNode *temp = node; - PBL_LOG_DBG("Deleting application binaries for app id: %"PRIu32", size: %"PRIu32, - node->id, node->size); + PBL_LOG_DBG("Deleting application binaries for app id: %" PRIu32 ", size: %" PRIu32, node->id, + node->size); app_cache_remove_entry(node->id); node = (EvictListNode *)list_pop_head((ListNode *)node); kernel_free(temp); @@ -309,8 +309,7 @@ status_t app_cache_free_up_space(uint32_t bytes_needed) { // Remove the filename entry in the PFSFileList (via context) that corresponds to the // app install id passed in via info -static bool prv_remove_matching_resource_file_callback(SettingsFile *file, - SettingsRecordInfo *info, +static bool prv_remove_matching_resource_file_callback(SettingsFile *file, SettingsRecordInfo *info, void *context) { AppInstallId id; // examine the SettingsRecordInfo and extract the AppInstallId from it @@ -325,9 +324,9 @@ static bool prv_remove_matching_resource_file_callback(SettingsFile *file, // the AppInstallId of the file matches the one in the cache so we can remove this // entry from the resource_list (since we don't want to delete it) // note: resource_list may be updated if we happen to remove the first entry in the list - list_remove(&(iter->list_node), (ListNode**)resource_list, NULL); + list_remove(&(iter->list_node), (ListNode **)resource_list, NULL); kernel_free(iter); // free up the memory for the node we just removed - break; // we can quit now that we've found a match for this id + break; // we can quit now that we've found a match for this id } iter = next; } @@ -382,7 +381,6 @@ static void prv_purge_orphaned_resource_files(void) { //! Set up the app cache void app_cache_init(void) { - pbl_mutex_lock(&s_app_cache_mutex, PBL_FOREVER); { // if no cache file exists, then we should go ahead and clean up any files that are left over @@ -412,14 +410,14 @@ status_t app_cache_add_entry(AppInstallId app_id, uint32_t total_size) { } AppCacheEntry entry = { - .install_date = rtc_get_time(), - .last_launch = 0, - .launch_count = 0, - .total_size = total_size, + .install_date = rtc_get_time(), + .last_launch = 0, + .launch_count = 0, + .total_size = total_size, }; - rv = settings_file_set(&file, (uint8_t *)&app_id, sizeof(AppInstallId), - (uint8_t *)&entry, sizeof(AppCacheEntry)); + rv = settings_file_set(&file, (uint8_t *)&app_id, sizeof(AppInstallId), (uint8_t *)&entry, + sizeof(AppCacheEntry)); settings_file_close(&file); @@ -478,11 +476,11 @@ status_t app_cache_remove_entry(AppInstallId app_id) { if (rv == S_SUCCESS) { PebbleEvent e = { - .type = PEBBLE_APP_CACHE_EVENT, - .app_cache_event = { - .cache_event_type = PebbleAppCacheEvent_Removed, - .install_id = app_id, - }, + .type = PEBBLE_APP_CACHE_EVENT, + .app_cache_event = { + .cache_event_type = PebbleAppCacheEvent_Removed, + .install_id = app_id, + }, }; event_put(&e); } @@ -508,7 +506,7 @@ void app_cache_flush(void) { static bool prv_each_get_size(SettingsFile *file, SettingsRecordInfo *info, void *context) { if ((info->key_len != sizeof(AppInstallId)) || (info->val_len != sizeof(AppCacheEntry))) { - return true; // continue iterating + return true; // continue iterating } uint32_t *cache_size = (uint32_t *)context; @@ -516,7 +514,7 @@ static bool prv_each_get_size(SettingsFile *file, SettingsRecordInfo *info, void info->get_val(file, (uint8_t *)&entry, info->val_len); *cache_size += entry.total_size; - return true; // continue iterating + return true; // continue iterating } uint32_t app_cache_get_size(void) { @@ -546,7 +544,7 @@ typedef struct { static bool prv_each_min_priority(SettingsFile *file, SettingsRecordInfo *info, void *context) { // check entry is valid if ((info->key_len != sizeof(AppInstallId)) || (info->val_len != sizeof(AppCacheEntry))) { - return true; // continue iterating + return true; // continue iterating } AppCacheEachData *to_evict = (AppCacheEachData *)context; @@ -563,7 +561,7 @@ static bool prv_each_min_priority(SettingsFile *file, SettingsRecordInfo *info, to_evict->priority = entry_priority; } - return true; // continue iterating + return true; // continue iterating } //! Find the entry in the app cache with the lowest calculated priority @@ -579,8 +577,8 @@ AppInstallId app_cache_get_next_eviction(void) { // set max so that any application will have a lower priority. AppCacheEachData to_evict = { - .id = INSTALL_ID_INVALID, - .priority = MAX_PRIORITY, + .id = INSTALL_ID_INVALID, + .priority = MAX_PRIORITY, }; settings_file_each(&file, prv_each_min_priority, (void *)&to_evict); diff --git a/src/fw/services/app_fetch_endpoint/service.c b/src/fw/services/app_fetch_endpoint/service.c index 68e67acdd6..bf875ac120 100644 --- a/src/fw/services/app_fetch_endpoint/service.c +++ b/src/fw/services/app_fetch_endpoint/service.c @@ -76,12 +76,12 @@ static const uint16_t APP_FETCH_ENDPOINT_ID = 6001; static void prv_put_event_error(uint8_t error_code) { s_fetch_state.prev_error = error_code; PebbleEvent event = { - .type = PEBBLE_APP_FETCH_EVENT, - .app_fetch = { - .type = AppFetchEventTypeError, - .id = s_fetch_state.app_id, - .error_code = error_code, - } + .type = PEBBLE_APP_FETCH_EVENT, + .app_fetch = { + .type = AppFetchEventTypeError, + .id = s_fetch_state.app_id, + .error_code = error_code, + } }; event_put(&event); } @@ -89,12 +89,12 @@ static void prv_put_event_error(uint8_t error_code) { //! Puts an event with the given progress static void prv_put_event_progress(uint8_t percent) { PebbleEvent event = { - .type = PEBBLE_APP_FETCH_EVENT, - .app_fetch = { - .type = AppFetchEventTypeProgress, - .id = s_fetch_state.app_id, - .progress_percent = percent, - } + .type = PEBBLE_APP_FETCH_EVENT, + .app_fetch = { + .type = AppFetchEventTypeProgress, + .id = s_fetch_state.app_id, + .progress_percent = percent, + } }; event_put(&event); } @@ -102,16 +102,15 @@ static void prv_put_event_progress(uint8_t percent) { //! Simply posts the type of event given. static void prv_put_event_simple(AppFetchEventType type) { PebbleEvent event = { - .type = PEBBLE_APP_FETCH_EVENT, - .app_fetch = { - .type = type, - .id = s_fetch_state.app_id, - } + .type = PEBBLE_APP_FETCH_EVENT, + .app_fetch = { + .type = type, + .id = s_fetch_state.app_id, + } }; event_put(&event); } - //! Recomputes and saves the progress percent for the current application fetch session static uint8_t prv_compute_progress_percent(PutBytesObjectType type, unsigned int type_percent) { // Add 33(34) percent for each piece that has finished (or is unneeded) @@ -212,8 +211,8 @@ void prv_put_bytes_event_system_task_cb(void *data) { if (s_fetch_state.app && s_fetch_state.worker && s_fetch_state.resources) { // if everything has finished being transferred - PBL_LOG_DBG("All pieces (%"PRIu32" bytes) have been sent over put_bytes", - s_fetch_state.total_size); + PBL_LOG_DBG("All pieces (%" PRIu32 " bytes) have been sent over put_bytes", + s_fetch_state.total_size); // signify in the app cache that the app binaries are now loaded status_t added = app_cache_add_entry(s_fetch_state.app_id, s_fetch_state.total_size); @@ -222,7 +221,7 @@ void prv_put_bytes_event_system_task_cb(void *data) { s_fetch_state.prev_error = AppFetchResultSuccess; prv_put_event_simple(AppFetchEventTypeFinish); } else { - PBL_LOG_ERR("Failed to insert into app cache: %"PRId32, added); + PBL_LOG_ERR("Failed to insert into app cache: %" PRId32, added); prv_put_event_error(AppFetchResultGeneralFailure); } prv_cleanup(AppFetchResultSuccess); @@ -260,13 +259,14 @@ static void prv_app_fetch_binaries_system_task_cb(void *data) { // check if Bluetooth is active. If so, this will send. bool successful = comm_session_send_data(comm_session_get_system_session(), APP_FETCH_ENDPOINT_ID, - (uint8_t*)request, sizeof(AppFetchInstallRequest), COMM_SESSION_DEFAULT_TIMEOUT); + (uint8_t *)request, sizeof(AppFetchInstallRequest), + COMM_SESSION_DEFAULT_TIMEOUT); // log it char uuid_buffer[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(&request->uuid, uuid_buffer); - PBL_LOG_INFO("%s request for app with uuid: %s and app_id: %"PRIu32"", - successful ? "Sent" : "Failed to send", uuid_buffer, request->app_id); + PBL_LOG_INFO("%s request for app with uuid: %s and app_id: %" PRIu32 "", + successful ? "Sent" : "Failed to send", uuid_buffer, request->app_id); // free before error checking kernel_free(request); @@ -330,8 +330,8 @@ void app_fetch_binaries(const Uuid *uuid, AppInstallId app_id, bool has_worker) // populate fields request->command = APP_FETCH_INSTALL_COMMAND; - request->uuid = *uuid; - request->app_id = app_id; + request->uuid = *uuid; + request->app_id = app_id; // Start "warming up" the connection, this will cause the low-latency period to start ~1s sooner. // Put bytes will extend the low-latency period after this: @@ -343,8 +343,8 @@ void app_fetch_binaries(const Uuid *uuid, AppInstallId app_id, bool has_worker) AppFetchError app_fetch_get_previous_error(void) { AppFetchError error = { - .error = s_fetch_state.prev_error, - .id = s_fetch_state.app_id, + .error = s_fetch_state.prev_error, + .id = s_fetch_state.app_id, }; return error; @@ -355,8 +355,10 @@ static void prv_cancel_fetch_from_system_task(void *data) { if ((!s_fetch_state.in_progress) || ((s_fetch_state.app_id != app_id) && (app_id != INSTALL_ID_INVALID))) { - PBL_LOG_DBG("Attempted to cancel an app that is currently not being" - " fetched: %"PRId32, app_id); + PBL_LOG_DBG( + "Attempted to cancel an app that is currently not being" + " fetched: %" PRId32, + app_id); return; } @@ -391,14 +393,13 @@ typedef struct __attribute__((__packed__)) { //! System task callback triggered by app_fetch_protocol_msg_callback(). static void prv_app_fetch_protocol_handle_msg(AppFetchResponseData *response_data) { - switch (response_data->command) { case APP_FETCH_INSTALL_RESPONSE: prv_handle_app_fetch_install_response(response_data->result_code); break; default: - PBL_LOG_ERR("Invalid message received, command: %u result: %u", - response_data->command, response_data->result_code); + PBL_LOG_ERR("Invalid message received, command: %u result: %u", response_data->command, + response_data->result_code); prv_cleanup(AppFetchResultGeneralFailure); break; } @@ -408,7 +409,7 @@ static void prv_app_fetch_protocol_handle_msg(AppFetchResponseData *response_dat //! callback as all commands are originally sent to the phone. void app_fetch_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length) { if (length < sizeof(AppFetchResponseData)) { - PBL_LOG_ERR("Invalid message length %"PRIu32"", (uint32_t)length); + PBL_LOG_ERR("Invalid message length %" PRIu32 "", (uint32_t)length); prv_cleanup(AppFetchResultGeneralFailure); return; } diff --git a/src/fw/services/app_glances/app_glance_service.c b/src/fw/services/app_glances/app_glance_service.c index 85353e478b..218d7ba34e 100644 --- a/src/fw/services/app_glances/app_glance_service.c +++ b/src/fw/services/app_glances/app_glance_service.c @@ -87,11 +87,11 @@ static void prv_glance_event_put(const Uuid *app_uuid) { Uuid *app_uuid_copy = kernel_zalloc_check(sizeof(Uuid)); *app_uuid_copy = *app_uuid; - PebbleEvent e = (PebbleEvent) { - .type = PEBBLE_APP_GLANCE_EVENT, - .app_glance = (PebbleAppGlanceEvent) { - .app_uuid = app_uuid_copy, - }, + PebbleEvent e = (PebbleEvent){ + .type = PEBBLE_APP_GLANCE_EVENT, + .app_glance = (PebbleAppGlanceEvent){ + .app_uuid = app_uuid_copy, + }, }; event_put(&e); @@ -131,20 +131,19 @@ void app_glance_service_init_glance(AppGlance *glance) { if (!glance) { return; } - *glance = (AppGlance) {}; + *glance = (AppGlance){}; } void app_glance_service_init(void) { - static EventServiceInfo s_blob_db_event_info = { - .type = PEBBLE_BLOBDB_EVENT, - .handler = prv_blob_db_event_handler, + .type = PEBBLE_BLOBDB_EVENT, + .handler = prv_blob_db_event_handler, }; event_service_client_subscribe(&s_blob_db_event_info); static EventServiceInfo s_app_cache_event_info = { - .type = PEBBLE_APP_CACHE_EVENT, - .handler = prv_handle_app_cache_event, + .type = PEBBLE_APP_CACHE_EVENT, + .handler = prv_handle_app_cache_event, }; event_service_client_subscribe(&s_app_cache_event_info); } @@ -165,8 +164,8 @@ bool app_glance_service_get_current_slice(const Uuid *app_uuid, AppGlanceSliceIn // Iterate over the slices to find the current slice (which might be NULL if there aren't any // slices or if all of the slices have expired) - FindCurrentSliceData find_current_slice_data = (FindCurrentSliceData) { - .current_time = rtc_get_time(), + FindCurrentSliceData find_current_slice_data = (FindCurrentSliceData){ + .current_time = rtc_get_time(), }; prv_slice_for_each(app_glance, prv_find_current_glance, &find_current_slice_data); if (!find_current_slice_data.current_slice) { diff --git a/src/fw/services/app_inbox_service/service.c b/src/fw/services/app_inbox_service/service.c index 0c48dd6073..ff056d82f4 100644 --- a/src/fw/services/app_inbox_service/service.c +++ b/src/fw/services/app_inbox_service/service.c @@ -57,7 +57,6 @@ typedef struct AppInboxConsumerInfo { uint8_t *end; } AppInboxConsumerInfo; - _Static_assert(sizeof(AppInboxServiceTag) <= sizeof(void *), "AppInboxServiceTag should fit inside a void *"); @@ -90,19 +89,21 @@ static AppInboxServiceTag prv_tag_for_event_handlers(const AppInboxMessageHandle AppInboxMessageHandler message_handler; AppInboxDroppedHandler dropped_handler; } s_event_handler_map[] = { - [AppInboxServiceTagAppMessageReceiver] = { - .message_handler = app_message_receiver_message_handler, - .dropped_handler = app_message_receiver_dropped_handler, - }, + [AppInboxServiceTagAppMessageReceiver] = + { + .message_handler = app_message_receiver_message_handler, + .dropped_handler = app_message_receiver_dropped_handler, + }, #ifdef UNITTEST - [AppInboxServiceTagUnitTest] = { - .message_handler = test_message_handler, - .dropped_handler = test_dropped_handler, - }, - [AppInboxServiceTagUnitTestAlt] = { - .message_handler = test_alt_message_handler, - .dropped_handler = test_alt_dropped_handler, - } + [AppInboxServiceTagUnitTest] = + { + .message_handler = test_message_handler, + .dropped_handler = test_dropped_handler, + }, + [AppInboxServiceTagUnitTestAlt] = { + .message_handler = test_alt_message_handler, + .dropped_handler = test_alt_dropped_handler, + } #endif }; for (AppInboxServiceTag tag = 0; tag < NumAppInboxServiceTag; ++tag) { @@ -119,17 +120,17 @@ DEFINE_SYSCALL(bool, sys_app_inbox_service_register, uint8_t *storage, size_t st if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(storage, storage_size); } - const AppInboxServiceTag service_tag = prv_tag_for_event_handlers(message_handler, - dropped_handler); + const AppInboxServiceTag service_tag = + prv_tag_for_event_handlers(message_handler, dropped_handler); if (AppInboxServiceTagInvalid == service_tag) { - PBL_LOG_ERR("AppInbox event handlers not allowed <0x%"PRIx32", 0x%"PRIx32">", - // Ugh.. no more format signature slots free for %p %p... - (uint32_t)(uintptr_t)message_handler, (uint32_t)(uintptr_t)dropped_handler); + PBL_LOG_ERR("AppInbox event handlers not allowed <0x%" PRIx32 ", 0x%" PRIx32 ">", + // Ugh.. no more format signature slots free for %p %p... + (uint32_t)(uintptr_t)message_handler, (uint32_t)(uintptr_t)dropped_handler); syscall_failed(); } - return app_inbox_service_register(storage, storage_size, - message_handler, dropped_handler, service_tag); + return app_inbox_service_register(storage, storage_size, message_handler, dropped_handler, + service_tag); } DEFINE_SYSCALL(uint32_t, sys_app_inbox_service_unregister, uint8_t *storage) { @@ -139,8 +140,8 @@ DEFINE_SYSCALL(uint32_t, sys_app_inbox_service_unregister, uint8_t *storage) { static bool prv_get_consumer_info(AppInboxServiceTag tag, AppInboxConsumerInfo *info_in_out); -DEFINE_SYSCALL(bool, sys_app_inbox_service_get_consumer_info, - AppInboxServiceTag tag, AppInboxConsumerInfo *info_out) { +DEFINE_SYSCALL(bool, sys_app_inbox_service_get_consumer_info, AppInboxServiceTag tag, + AppInboxConsumerInfo *info_out) { if (PRIVILEGE_WAS_ELEVATED) { if (info_out) { syscall_assert_userspace_buffer(info_out, sizeof(*info_out)); @@ -175,8 +176,8 @@ static bool prv_list_filter_by_storage(ListNode *found_node, void *data) { } static AppInboxNode *prv_find_inbox_by_storage(uint8_t *storage) { - return (AppInboxNode *) list_find((ListNode *)s_app_inbox_head, - prv_list_filter_by_storage, storage); + return (AppInboxNode *)list_find((ListNode *)s_app_inbox_head, prv_list_filter_by_storage, + storage); } static bool prv_list_filter_by_tag(ListNode *found_node, void *data) { @@ -184,8 +185,8 @@ static bool prv_list_filter_by_tag(ListNode *found_node, void *data) { } static AppInboxNode *prv_find_inbox_by_tag(AppInboxServiceTag tag) { - return (AppInboxNode *) list_find((ListNode *)s_app_inbox_head, - prv_list_filter_by_tag, (void *)(uintptr_t)tag); + return (AppInboxNode *)list_find((ListNode *)s_app_inbox_head, prv_list_filter_by_tag, + (void *)(uintptr_t)tag); } static AppInboxNode *prv_find_inbox_by_tag_and_log_if_not_found(AppInboxServiceTag tag) { @@ -209,9 +210,8 @@ static void prv_consume(AppInboxConsumerInfo *consumer_info) { goto unlock; } uint8_t *const consumed_up_to_ptr = consumer_info->it; - uint8_t * const completed_messages_end = (inbox->buffer.storage + inbox->buffer.write_index); - if (consumed_up_to_ptr < inbox->buffer.storage || - consumed_up_to_ptr > completed_messages_end) { + uint8_t *const completed_messages_end = (inbox->buffer.storage + inbox->buffer.write_index); + if (consumed_up_to_ptr < inbox->buffer.storage || consumed_up_to_ptr > completed_messages_end) { PBL_LOG_ERR("Out of bounds"); goto unlock; } @@ -219,7 +219,7 @@ static void prv_consume(AppInboxConsumerInfo *consumer_info) { if (0 == bytes_consumed) { goto unlock; } - uint8_t * const partial_message_end = completed_messages_end + inbox->buffer.current_offset; + uint8_t *const partial_message_end = completed_messages_end + inbox->buffer.current_offset; const size_t remaining_size = partial_message_end - consumed_up_to_ptr; consumer_info->it = inbox->buffer.storage; consumer_info->end = inbox->buffer.storage + remaining_size; @@ -245,14 +245,14 @@ static bool prv_get_consumer_info(AppInboxServiceTag tag, AppInboxConsumerInfo * goto unlock; } - *info_out = (const AppInboxConsumerInfo) { - .tag = tag, - .message_handler = inbox->message_handler, - .dropped_handler = inbox->dropped_handler, - .num_failed = inbox->num_failed, - .num_success = inbox->num_success, - .it = inbox->buffer.storage, - .end = inbox->buffer.storage + inbox->buffer.write_index, + *info_out = (const AppInboxConsumerInfo){ + .tag = tag, + .message_handler = inbox->message_handler, + .dropped_handler = inbox->dropped_handler, + .num_failed = inbox->num_failed, + .num_success = inbox->num_success, + .it = inbox->buffer.storage, + .end = inbox->buffer.storage + inbox->buffer.write_index, }; // Also mark that there is no event pending any more: @@ -310,8 +310,7 @@ static void prv_callback_event_handler(void *ctx) { if (info.dropped_handler) { info.dropped_handler(info.num_failed); } else { - PBL_LOG_ERR("Dropped %"PRIu32" messages but no dropped_handler", - info.num_failed); + PBL_LOG_ERR("Dropped %" PRIu32 " messages but no dropped_handler", info.num_failed); } } @@ -354,8 +353,8 @@ bool app_inbox_service_register(uint8_t *storage, size_t storage_size, new_node->event_handler_task = pebble_task_get_current(); new_node->buffer.storage = storage; new_node->buffer.size = storage_size; - s_app_inbox_head = (AppInboxNode *)list_prepend((ListNode *)s_app_inbox_head, - (ListNode *)new_node); + s_app_inbox_head = + (AppInboxNode *)list_prepend((ListNode *)s_app_inbox_head, (ListNode *)new_node); } } prv_unlock(); @@ -383,7 +382,7 @@ void app_inbox_service_unregister_all(void) { { AppInboxNode *node = s_app_inbox_head; while (node) { - AppInboxNode *next = (AppInboxNode *) node->node.next; + AppInboxNode *next = (AppInboxNode *)node->node.next; kernel_free(node); node = next; } @@ -403,8 +402,8 @@ static size_t prv_get_space_remaining(AppInboxNode *inbox) { bool prv_check_space_remaining(AppInboxNode *inbox, size_t required_free_length) { const size_t space_remaining = prv_get_space_remaining(inbox); if (required_free_length > space_remaining) { - PBL_LOG_ERR("Dropping data, not enough space %"PRIu32" vs %"PRIu32, - (uint32_t)required_free_length, (uint32_t)space_remaining); + PBL_LOG_ERR("Dropping data, not enough space %" PRIu32 " vs %" PRIu32, + (uint32_t)required_free_length, (uint32_t)space_remaining); return false; } return true; @@ -415,14 +414,14 @@ static void prv_send_event_if_needed(AppInboxNode *inbox) { return; } PebbleEvent event = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = prv_callback_event_handler, - .data = (void *)(uintptr_t) inbox->tag, - }, + .type = PEBBLE_CALLBACK_EVENT, + .callback = { + .callback = prv_callback_event_handler, + .data = (void *)(uintptr_t)inbox->tag, + }, }; - const bool is_event_enqueued = process_manager_send_event_to_process(inbox->event_handler_task, - &event); + const bool is_event_enqueued = + process_manager_send_event_to_process(inbox->event_handler_task, &event); if (!is_event_enqueued) { PBL_LOG_ERR("Event queue full"); } @@ -489,8 +488,8 @@ bool app_inbox_service_write(AppInboxServiceTag tag, const uint8_t *data, size_t inbox->write_failed = true; goto unlock; } - memcpy(inbox->buffer.storage + inbox->buffer.write_index + inbox->buffer.current_offset, - data, length); + memcpy(inbox->buffer.storage + inbox->buffer.write_index + inbox->buffer.current_offset, data, + length); inbox->buffer.current_offset += length; success = true; } @@ -519,10 +518,10 @@ bool app_inbox_service_end(AppInboxServiceTag tag) { if (inbox->write_failed) { ++inbox->num_failed; } else { - const AppInboxMessageHeader header = (const AppInboxMessageHeader) { - .length = inbox->buffer.current_offset - sizeof(AppInboxMessageHeader), - // Fill with something that might aid debugging one day: - .padding = { 0xaa, 0xaa, 0xaa, 0xaa }, + const AppInboxMessageHeader header = (const AppInboxMessageHeader){ + .length = inbox->buffer.current_offset - sizeof(AppInboxMessageHeader), + // Fill with something that might aid debugging one day: + .padding = {0xaa, 0xaa, 0xaa, 0xaa}, }; memcpy(inbox->buffer.storage + inbox->buffer.write_index, &header, sizeof(header)); inbox->buffer.write_index += inbox->buffer.current_offset; diff --git a/src/fw/services/app_message/app_message_receiver.c b/src/fw/services/app_message/app_message_receiver.c index 4e4d83ca72..8e6b0ebeb3 100644 --- a/src/fw/services/app_message/app_message_receiver.c +++ b/src/fw/services/app_message/app_message_receiver.c @@ -49,15 +49,14 @@ static bool prv_fwd_prepare(AppMessageReceiver *rcv, CommSession *session, // Try to set up a forward to the default system receiver that will send a nack back, based // on the header of the message: static const PebbleProtocolEndpoint kernel_nack_endpoint = { - .endpoint_id = APP_MESSAGE_ENDPOINT_ID, - .handler = app_message_app_protocol_system_nack_callback, - .access_mask = PebbleProtocolAccessAny, - .receiver_imp = &g_default_kernel_receiver_implementation, - .receiver_opt = NULL, + .endpoint_id = APP_MESSAGE_ENDPOINT_ID, + .handler = app_message_app_protocol_system_nack_callback, + .access_mask = PebbleProtocolAccessAny, + .receiver_imp = &g_default_kernel_receiver_implementation, + .receiver_opt = NULL, }; - Receiver *kernel_receiver = g_default_kernel_receiver_implementation.prepare(session, - &kernel_nack_endpoint, - header_bytes_remaining); + Receiver *kernel_receiver = g_default_kernel_receiver_implementation.prepare( + session, &kernel_nack_endpoint, header_bytes_remaining); if (!kernel_receiver) { PBL_LOG_ERR("System receiver wasn't able to prepare"); return false; @@ -110,8 +109,8 @@ static Receiver *prv_app_message_receiver_prepare(CommSession *session, app_install_mark_prioritized(app_id, true /* can_expire */); // Write the header, this info is needed for the app to handle the message and reply: - const AppMessageReceiverHeader header = (const AppMessageReceiverHeader) { - .session = session, + const AppMessageReceiverHeader header = (const AppMessageReceiverHeader){ + .session = session, }; prv_write((const uint8_t *)&header, sizeof(header)); } @@ -129,8 +128,8 @@ static void prv_app_message_receiver_write(Receiver *receiver, const uint8_t *da if (rcv->header_bytes_remaining > 0) { const size_t header_bytes_to_write = MIN(rcv->header_bytes_remaining, length); - g_default_kernel_receiver_implementation.write(rcv->kernel_receiver, - data, header_bytes_to_write); + g_default_kernel_receiver_implementation.write(rcv->kernel_receiver, data, + header_bytes_to_write); rcv->header_bytes_remaining -= header_bytes_to_write; } @@ -174,8 +173,8 @@ static void prv_app_message_receiver_cleanup(Receiver *receiver) { } const ReceiverImplementation g_app_message_receiver_implementation = { - .prepare = prv_app_message_receiver_prepare, - .write = prv_app_message_receiver_write, - .finish = prv_app_message_receiver_finish, - .cleanup = prv_app_message_receiver_cleanup, + .prepare = prv_app_message_receiver_prepare, + .write = prv_app_message_receiver_write, + .finish = prv_app_message_receiver_finish, + .cleanup = prv_app_message_receiver_cleanup, }; diff --git a/src/fw/services/app_message/app_message_sender.c b/src/fw/services/app_message/app_message_sender.c index 7976846b4f..a686b5cf4b 100644 --- a/src/fw/services/app_message/app_message_sender.c +++ b/src/fw/services/app_message/app_message_sender.c @@ -24,7 +24,7 @@ static void prv_request_fast_connection(CommSession *session) { } static AppOutboxMessage *prv_outbox_message_from_app_message_send_job( - AppMessageSendJob *app_message_send_job) { + AppMessageSendJob *app_message_send_job) { const size_t offset = offsetof(AppOutboxMessage, consumer_data); return (AppOutboxMessage *)(((uint8_t *)app_message_send_job) - offset); } @@ -33,7 +33,6 @@ static AppOutboxMessage *prv_outbox_message_from_send_job(SessionSendQueueJob *s return prv_outbox_message_from_app_message_send_job((AppMessageSendJob *)send_job); } - // ------------------------------------------------------------------------------------------------- // Interfaces towards Send Queue: @@ -48,8 +47,8 @@ static bool prv_is_header_consumed_for_offset(uint32_t offset) { return (offset >= sizeof(PebbleProtocolHeader)); } -static size_t prv_get_read_pointer(AppMessageSendJob *app_message_send_job, - uint32_t offset, const uint8_t **data_out) { +static size_t prv_get_read_pointer(AppMessageSendJob *app_message_send_job, uint32_t offset, + const uint8_t **data_out) { const uint8_t *read_pointer; size_t num_bytes_available; if (prv_is_header_consumed_for_offset(offset)) { @@ -87,7 +86,7 @@ static size_t prv_send_job_impl_get_length(const SessionSendQueueJob *send_job) } static size_t prv_send_job_impl_copy(const SessionSendQueueJob *send_job, int start_offset, - size_t length, uint8_t *data_out) { + size_t length, uint8_t *data_out) { AppMessageSendJob *app_message_send_job = (AppMessageSendJob *)send_job; prv_request_fast_connection(app_message_send_job->session); @@ -99,10 +98,9 @@ static size_t prv_send_job_impl_copy(const SessionSendQueueJob *send_job, int st while (length_remaining) { const uint8_t *part_data; uint32_t data_out_pos = (length_to_copy - length_remaining); - size_t part_length = - prv_get_read_pointer(app_message_send_job, - app_message_send_job->consumed_length + start_offset + data_out_pos, - &part_data); + size_t part_length = prv_get_read_pointer( + app_message_send_job, app_message_send_job->consumed_length + start_offset + data_out_pos, + &part_data); part_length = MIN(part_length, length_remaining); memcpy(data_out + data_out_pos, part_data, part_length); length_remaining -= part_length; @@ -116,8 +114,8 @@ static size_t prv_send_job_impl_get_read_pointer(const SessionSendQueueJob *send AppMessageSendJob *app_message_send_job = (AppMessageSendJob *)send_job; prv_request_fast_connection(app_message_send_job->session); - return prv_get_read_pointer(app_message_send_job, - app_message_send_job->consumed_length, data_out); + return prv_get_read_pointer(app_message_send_job, app_message_send_job->consumed_length, + data_out); } static void prv_send_job_impl_consume(const SessionSendQueueJob *send_job, size_t length) { @@ -135,21 +133,19 @@ static void prv_send_job_impl_free(SessionSendQueueJob *send_job) { PBL_ANALYTICS_ADD(app_message_sent_count, 1); } // The outbox_message is owned by app_outbox_service, calling consume will free it as well: - const AppOutboxStatus status = - (const AppOutboxStatus) (is_completed ? AppMessageSenderErrorSuccess : - AppMessageSenderErrorDisconnected); + const AppOutboxStatus status = (const AppOutboxStatus)( + is_completed ? AppMessageSenderErrorSuccess : AppMessageSenderErrorDisconnected); app_outbox_service_consume_message(outbox_message, status); } T_STATIC const SessionSendJobImpl s_app_message_send_job_impl = { - .get_length = prv_send_job_impl_get_length, - .copy = prv_send_job_impl_copy, - .get_read_pointer = prv_send_job_impl_get_read_pointer, - .consume = prv_send_job_impl_consume, - .free = prv_send_job_impl_free, + .get_length = prv_send_job_impl_get_length, + .copy = prv_send_job_impl_copy, + .get_read_pointer = prv_send_job_impl_get_read_pointer, + .consume = prv_send_job_impl_consume, + .free = prv_send_job_impl_free, }; - // ------------------------------------------------------------------------------------------------- // Interfaces towards App Outbox service: @@ -171,9 +167,9 @@ static AppMessageSenderError prv_sanity_check_msg_and_fill_header(const AppOutbo const size_t pp_payload_length = (message->length - offsetof(AppMessageAppOutboxData, payload)); AppMessageSendJob *app_message_send_job = (AppMessageSendJob *)message->consumer_data; - app_message_send_job->header = (const PebbleProtocolHeader) { - .endpoint_id = htons(endpoint_id), - .length = htons(pp_payload_length), + app_message_send_job->header = (const PebbleProtocolHeader){ + .endpoint_id = htons(endpoint_id), + .length = htons(pp_payload_length), }; return AppMessageSenderErrorSuccess; @@ -181,11 +177,12 @@ static AppMessageSenderError prv_sanity_check_msg_and_fill_header(const AppOutbo static void prv_handle_outbox_message(AppOutboxMessage *message) { AppMessageSendJob *app_message_send_job = (AppMessageSendJob *)message->consumer_data; - *app_message_send_job = (const AppMessageSendJob) { - .send_queue_job = { - .impl = &s_app_message_send_job_impl, - }, - .consumed_length = 0, + *app_message_send_job = (const AppMessageSendJob){ + .send_queue_job = + { + .impl = &s_app_message_send_job_impl, + }, + .consumed_length = 0, }; const AppMessageSenderError err = prv_sanity_check_msg_and_fill_header(message); @@ -195,8 +192,7 @@ static void prv_handle_outbox_message(AppOutboxMessage *message) { return; } - const AppMessageAppOutboxData *outbox_data = - (const AppMessageAppOutboxData *)message->data; + const AppMessageAppOutboxData *outbox_data = (const AppMessageAppOutboxData *)message->data; app_message_send_job->session = outbox_data->session; comm_session_sanitize_app_session(&app_message_send_job->session); @@ -216,6 +212,6 @@ static void prv_handle_outbox_message(AppOutboxMessage *message) { void app_message_sender_init(void) { const size_t consumer_data_size = sizeof(AppMessageSendJob); // Make prv_handle_outbox_message() execute on KernelMain: - app_outbox_service_register(AppOutboxServiceTagAppMessageSender, - prv_handle_outbox_message, PebbleTask_KernelMain, consumer_data_size); + app_outbox_service_register(AppOutboxServiceTagAppMessageSender, prv_handle_outbox_message, + PebbleTask_KernelMain, consumer_data_size); } diff --git a/src/fw/services/app_order_endpoint/service.c b/src/fw/services/app_order_endpoint/service.c index 72db4d9e52..bcca464964 100644 --- a/src/fw/services/app_order_endpoint/service.c +++ b/src/fw/services/app_order_endpoint/service.c @@ -41,7 +41,7 @@ typedef struct { static void prv_send_result(CommSession *session, uint8_t result) { PBL_LOG_DBG("Sending result of %d", result); - comm_session_send_data(session, APP_ORDER_ENDPOINT_ID, (uint8_t*)&result, sizeof(result), + comm_session_send_data(session, APP_ORDER_ENDPOINT_ID, (uint8_t *)&result, sizeof(result), COMM_SESSION_DEFAULT_TIMEOUT); } @@ -59,7 +59,7 @@ static void prv_handle_app_order_msg(CommSession *session, const uint8_t *data, prv_send_result(session, APP_ORDER_RES_SUCCESS); } -void app_order_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length) { +void app_order_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length) { // header includes APP_ORDER_CMD and a num_uuids uint8_t const uint8_t header_len = sizeof(AppOrderCommand) + sizeof(uint8_t); diff --git a/src/fw/services/app_outbox_service/service.c b/src/fw/services/app_outbox_service/service.c index 16ea059c82..4a790988d9 100644 --- a/src/fw/services/app_outbox_service/service.c +++ b/src/fw/services/app_outbox_service/service.c @@ -44,17 +44,19 @@ extern void test_app_outbox_sent_handler(AppOutboxStatus status, void *cb_ctx); //! Constant array defining the allowed handlers and their restrictions: static const AppOutboxSenderDef s_app_outbox_sender_defs[] = { - [AppOutboxServiceTagAppMessageSender] = { - .sent_handler = app_message_outbox_handle_app_outbox_message_sent, - .max_length = (sizeof(AppMessageAppOutboxData) + APP_MSG_HDR_OVRHD_SIZE + APP_MSG_8K_DICT_SIZE), - .max_pending_messages = 1, - }, + [AppOutboxServiceTagAppMessageSender] = + { + .sent_handler = app_message_outbox_handle_app_outbox_message_sent, + .max_length = + (sizeof(AppMessageAppOutboxData) + APP_MSG_HDR_OVRHD_SIZE + APP_MSG_8K_DICT_SIZE), + .max_pending_messages = 1, + }, #ifdef UNITTEST - [AppOutboxServiceTagUnitTest] = { - .sent_handler = test_app_outbox_sent_handler, - .max_length = 1, - .max_pending_messages = 2, - }, + [AppOutboxServiceTagUnitTest] = { + .sent_handler = test_app_outbox_sent_handler, + .max_length = 1, + .max_pending_messages = 2, + }, #endif }; @@ -95,8 +97,8 @@ DEFINE_SYSCALL(void, sys_app_outbox_send, const uint8_t *data, size_t length, const size_t max_length = def->max_length; if (length > max_length) { - PBL_LOG_ERR("AppOutbox max_length exceeded %"PRIu32" vs %"PRIu32, - (uint32_t)length, (uint32_t)max_length); + PBL_LOG_ERR("AppOutbox max_length exceeded %" PRIu32 " vs %" PRIu32, (uint32_t)length, + (uint32_t)max_length); syscall_failed(); } app_outbox_service_send(data, length, sent_handler, cb_ctx); @@ -126,18 +128,18 @@ static AppOutboxConsumer *prv_consumer_for_tag(AppOutboxServiceTag tag) { return consumer; } -static void prv_schedule_sent_handler(AppOutboxSentHandler sent_handler, - void *cb_ctx, AppOutboxStatus status) { +static void prv_schedule_sent_handler(AppOutboxSentHandler sent_handler, void *cb_ctx, + AppOutboxStatus status) { if (!sent_handler) { return; } PebbleEvent event = { - .type = PEBBLE_APP_OUTBOX_SENT_EVENT, - .app_outbox_sent = { - .sent_handler = sent_handler, - .cb_ctx = cb_ctx, - .status = status, - }, + .type = PEBBLE_APP_OUTBOX_SENT_EVENT, + .app_outbox_sent = { + .sent_handler = sent_handler, + .cb_ctx = cb_ctx, + .status = status, + }, }; process_manager_send_event_to_process(PebbleTask_App, &event); } @@ -147,11 +149,11 @@ static void prv_schedule_consumer_message_handler(AppOutboxConsumer *consumer, AppOutboxMessage *message) { void (*callback)(void *) = (__typeof__(callback))consumer->message_handler; PebbleEvent event = { - .type = PEBBLE_APP_OUTBOX_MSG_EVENT, - .app_outbox_msg = { - .callback = callback, - .data = message, - }, + .type = PEBBLE_APP_OUTBOX_MSG_EVENT, + .app_outbox_msg = { + .callback = callback, + .data = message, + }, }; sys_send_pebble_event_to_kernel(&event); } @@ -176,11 +178,11 @@ void prv_cleanup_pending_messages(AppOutboxConsumer *consumer, bool should_call_ while (message) { if (should_call_sent_handler) { prv_schedule_sent_handler(message->sent_handler, message->cb_ctx, - AppOutboxStatusConsumerDoesNotExist); + AppOutboxStatusConsumerDoesNotExist); } AppOutboxMessage *next = (AppOutboxMessage *)message->node.next; - message->node = (ListNode) {}; + message->node = (ListNode){}; // Don't free it, it's the responsibility of the consumer to eventually call // app_outbox_service_consume_message(), which will free the message! message = next; @@ -190,10 +192,8 @@ void prv_cleanup_pending_messages(AppOutboxConsumer *consumer, bool should_call_ //////////////////////////////////////////////////////////////////////////////////////////////////// // Exported functions -void app_outbox_service_register(AppOutboxServiceTag tag, - AppOutboxMessageHandler message_handler, - PebbleTask consumer_task, - size_t consumer_data_length) { +void app_outbox_service_register(AppOutboxServiceTag tag, AppOutboxMessageHandler message_handler, + PebbleTask consumer_task, size_t consumer_data_length) { prv_lock(); { PBL_ASSERTN(!prv_consumer_for_tag(tag)); @@ -209,7 +209,7 @@ void app_outbox_service_unregister(AppOutboxServiceTag service_tag) { prv_lock(); { prv_cleanup_pending_messages(&s_app_outbox_consumer[service_tag], - true /* should_call_sent_handler */); + true /* should_call_sent_handler */); s_app_outbox_consumer[service_tag].message_handler = NULL; } prv_unlock(); @@ -243,15 +243,15 @@ static void app_outbox_service_send(const uint8_t *data, size_t length, goto finally; } - *message = (AppOutboxMessage) { - .data = data, - .length = length, - .sent_handler = sent_handler, - .cb_ctx = cb_ctx, + *message = (AppOutboxMessage){ + .data = data, + .length = length, + .sent_handler = sent_handler, + .cb_ctx = cb_ctx, }; - consumer->head = (AppOutboxMessage *)list_prepend((ListNode *)consumer->head, - (ListNode *)message); + consumer->head = + (AppOutboxMessage *)list_prepend((ListNode *)consumer->head, (ListNode *)message); prv_schedule_consumer_message_handler(consumer, message); } diff --git a/src/fw/services/audio_endpoint/service.c b/src/fw/services/audio_endpoint/service.c index 92f752246b..5558d0c8f6 100644 --- a/src/fw/services/audio_endpoint/service.c +++ b/src/fw/services/audio_endpoint/service.c @@ -16,11 +16,11 @@ PBL_LOG_MODULE_DEFINE(service_audio_endpoint, CONFIG_SERVICE_AUDIO_ENDPOINT_LOG_ #define AUDIO_ENDPOINT (10000) -#define ACTIVE_MODE_TIMEOUT (10000) +#define ACTIVE_MODE_TIMEOUT (10000) #define ACTIVE_MODE_START_BUFFER (100) _Static_assert(ACTIVE_MODE_TIMEOUT > ACTIVE_MODE_START_BUFFER, - "ACTIVE_MODE_TIMEOUT must be greater than ACTIVE_MODE_START_BUFFER"); + "ACTIVE_MODE_TIMEOUT must be greater than ACTIVE_MODE_START_BUFFER"); typedef struct { AudioEndpointSessionId id; @@ -42,8 +42,7 @@ static void prv_session_deinit(bool call_stop_handler) { new_timer_delete(s_session.active_mode_trigger); s_session.active_mode_trigger = TIMER_INVALID_ID; CommSession *comm_session = comm_session_get_system_session(); - comm_session_set_responsiveness( - comm_session, BtConsumerPpAudioEndpoint, ResponseTimeMax, 0); + comm_session_set_responsiveness(comm_session, BtConsumerPpAudioEndpoint, ResponseTimeMax, 0); } s_session.id = AUDIO_ENDPOINT_SESSION_INVALID_ID; @@ -51,11 +50,11 @@ static void prv_session_deinit(bool call_stop_handler) { bt_unlock(); if (s_dropped_frames > 0) { - PBL_LOG_WRN("Dropped %"PRIu32" frames during audio transfer", s_dropped_frames); + PBL_LOG_WRN("Dropped %" PRIu32 " frames during audio transfer", s_dropped_frames); } } -void audio_endpoint_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t size) { +void audio_endpoint_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t size) { MsgId msg_id = data[0]; if (size >= sizeof(StopTransferMsg) && msg_id == MsgIdStopTransfer) { StopTransferMsg *msg = (StopTransferMsg *)data; @@ -63,8 +62,7 @@ void audio_endpoint_protocol_msg_callback(CommSession *session, const uint8_t* d if (msg->session_id == s_session.id) { prv_session_deinit(true /* call_stop_handler */); } else { - PBL_LOG_WRN("Received mismatching session id: %u vs %u", - msg->session_id, s_session.id); + PBL_LOG_WRN("Received mismatching session id: %u vs %u", msg->session_id, s_session.id); } } } @@ -82,8 +80,8 @@ static void prv_active_mode_timer_cb(void *data) { system_task_add_callback(prv_start_active_mode, NULL); } -AudioEndpointSessionId audio_endpoint_setup_transfer(AudioEndpointStopTransferCallback stop_transfer) { - +AudioEndpointSessionId audio_endpoint_setup_transfer( + AudioEndpointStopTransferCallback stop_transfer) { if (s_session.id != AUDIO_ENDPOINT_SESSION_INVALID_ID) { return AUDIO_ENDPOINT_SESSION_INVALID_ID; } @@ -97,7 +95,7 @@ AudioEndpointSessionId audio_endpoint_setup_transfer(AudioEndpointStopTransferCa // restart active mode before it expires, this way it will never be off during the transfer new_timer_start(s_session.active_mode_trigger, ACTIVE_MODE_TIMEOUT - ACTIVE_MODE_START_BUFFER, - prv_active_mode_timer_cb, NULL, TIMER_START_FLAG_REPEATING); + prv_active_mode_timer_cb, NULL, TIMER_START_FLAG_REPEATING); bt_unlock(); @@ -107,7 +105,7 @@ AudioEndpointSessionId audio_endpoint_setup_transfer(AudioEndpointStopTransferCa } void audio_endpoint_add_frame(AudioEndpointSessionId session_id, uint8_t *frame, - uint8_t frame_size) { + uint8_t frame_size) { PBL_ASSERTN(session_id != AUDIO_ENDPOINT_SESSION_INVALID_ID); if (s_session.id != session_id) { @@ -125,11 +123,11 @@ void audio_endpoint_add_frame(AudioEndpointSessionId session_id, uint8_t *frame, } uint8_t header[sizeof(DataTransferMsg) + sizeof(uint8_t) /* frame_size */]; - DataTransferMsg *msg = (DataTransferMsg *) header; - *msg = (const DataTransferMsg) { - .msg_id = MsgIdDataTransfer, - .session_id = session_id, - .frame_count = 1, + DataTransferMsg *msg = (DataTransferMsg *)header; + *msg = (const DataTransferMsg){ + .msg_id = MsgIdDataTransfer, + .session_id = session_id, + .frame_count = 1, }; msg->frames[0] = frame_size; @@ -155,13 +153,13 @@ void audio_endpoint_stop_transfer(AudioEndpointSessionId session_id) { return; } - StopTransferMsg msg = (const StopTransferMsg) { - .msg_id = MsgIdStopTransfer, - .session_id = session_id, + StopTransferMsg msg = (const StopTransferMsg){ + .msg_id = MsgIdStopTransfer, + .session_id = session_id, }; prv_session_deinit(false /* call_stop_handler */); - comm_session_send_data(comm_session_get_system_session(), AUDIO_ENDPOINT, (const uint8_t *) &msg, + comm_session_send_data(comm_session_get_system_session(), AUDIO_ENDPOINT, (const uint8_t *)&msg, sizeof(msg), COMM_SESSION_DEFAULT_TIMEOUT); } diff --git a/src/fw/services/battery/battery_monitor.c b/src/fw/services/battery/battery_monitor.c index 55b6a52bb5..96188f58c2 100644 --- a/src/fw/services/battery/battery_monitor.c +++ b/src/fw/services/battery/battery_monitor.c @@ -40,11 +40,11 @@ static void prv_enter_standby(void); static void prv_exit_critical(void); static const PowerState power_states[] = { - [PowerStateGood] = { 0 }, - [PowerStateLowPower] = { .enter = prv_enter_lpm, .exit = prv_exit_lpm }, - [PowerStateCritical] = { .enter = prv_begin_standby_timer, .exit = prv_exit_critical }, - [PowerStatePluggedIn] = { 0 }, - [PowerStateStandby] = { .enter = prv_enter_standby } + [PowerStateGood] = {0}, + [PowerStateLowPower] = {.enter = prv_enter_lpm, .exit = prv_exit_lpm}, + [PowerStateCritical] = {.enter = prv_begin_standby_timer, .exit = prv_exit_critical}, + [PowerStatePluggedIn] = {0}, + [PowerStateStandby] = {.enter = prv_enter_standby} }; //////////////////////// @@ -102,7 +102,7 @@ static void prv_exit_lpm(void) { } } -static void prv_standby_timer_callback(void* data) { +static void prv_standby_timer_callback(void *data) { // FIXME This is so broken: battery_state_force_update schedules a new timer callback to execute // immediately, which then pends a background task callback to perform the update, so this will // never update before we check the power_state. @@ -116,12 +116,12 @@ static void prv_standby_timer_callback(void* data) { static void prv_begin_standby_timer(void) { PBL_LOG_INFO("Battery critical: begin standby timer"); // If the watch was already running, give them 30s, otherwise just 2s. - uint32_t standby_timeout = (s_first_run) ? 2000: 30000; - new_timer_start(s_standby_timer_id, standby_timeout, - prv_standby_timer_callback, NULL, 0 /*flags*/); + uint32_t standby_timeout = (s_first_run) ? 2000 : 30000; + new_timer_start(s_standby_timer_id, standby_timeout, prv_standby_timer_callback, NULL, + 0 /*flags*/); } -static void system_task_handle_battery_critical(void* data) { +static void system_task_handle_battery_critical(void *data) { PBL_LOG_INFO("Battery critical: go to standby mode"); if (low_power_is_active()) { low_power_standby(); @@ -138,27 +138,26 @@ static void prv_log_battery_state(PreciseBatteryChargeState state) { const uint16_t k_min_percent_diff = 5; const uint16_t percent = ratio32_to_percent(state.charge_percent); - union LoggingBattState{ + union LoggingBattState { struct { - uint16_t is_charging:1; - uint16_t is_plugged:1; - uint16_t percent:14; + uint16_t is_charging : 1; + uint16_t is_plugged : 1; + uint16_t percent : 14; }; uint16_t all; }; static union LoggingBattState s_prev_batt_state; union LoggingBattState new_batt_state = { - .percent = percent / k_min_percent_diff, - .is_charging = state.is_charging, - .is_plugged = state.is_plugged, + .percent = percent / k_min_percent_diff, + .is_charging = state.is_charging, + .is_plugged = state.is_plugged, }; if ((percent < BOARD_CONFIG_POWER.low_power_threshold) || - (s_prev_batt_state.all != new_batt_state.all) || - s_first_run) { - s_prev_batt_state.all = new_batt_state.all; - } + (s_prev_batt_state.all != new_batt_state.all) || s_first_run) { + s_prev_batt_state.all = new_batt_state.all; + } } void battery_monitor_handle_state_change_event(PreciseBatteryChargeState state) { diff --git a/src/fw/services/battery/nrf_fuel_gauge/battery_curve.c b/src/fw/services/battery/nrf_fuel_gauge/battery_curve.c index 5864b05f47..28feb8da75 100644 --- a/src/fw/services/battery/nrf_fuel_gauge/battery_curve.c +++ b/src/fw/services/battery/nrf_fuel_gauge/battery_curve.c @@ -6,7 +6,7 @@ uint32_t battery_curve_get_percent_remaining(uint32_t hours) { return ((hours * 100) / BOARD_CONFIG_POWER.battery_capacity_hours) + - BOARD_CONFIG_POWER.low_power_threshold; + BOARD_CONFIG_POWER.low_power_threshold; } // TODO: nRF Fuel gauge lib provides TTE estimation @@ -21,10 +21,9 @@ uint32_t battery_curve_get_hours_remaining(uint32_t percent_remaining) { return ((BOARD_CONFIG_POWER.battery_capacity_hours * percent_remaining) / 100); } - // Stubs for tests (need fixing/test adjustments) -int32_t battery_curve_lookup_percent_with_scaling_factor( - int battery_mv, bool is_charging, uint32_t scaling_factor) { +int32_t battery_curve_lookup_percent_with_scaling_factor(int battery_mv, bool is_charging, + uint32_t scaling_factor) { return 0U; } diff --git a/src/fw/services/battery/nrf_fuel_gauge/battery_state.c b/src/fw/services/battery/nrf_fuel_gauge/battery_state.c index 910682d111..fa5f5f76c3 100644 --- a/src/fw/services/battery/nrf_fuel_gauge/battery_state.c +++ b/src/fw/services/battery/nrf_fuel_gauge/battery_state.c @@ -154,8 +154,7 @@ static void prv_erase_state(void) { SettingsFile file; status_t ret; - ret = settings_file_open(&file, FUEL_GAUGE_SETTINGS_FILE_NAME, - FUEL_GAUGE_SETTINGS_MAX_SIZE); + ret = settings_file_open(&file, FUEL_GAUGE_SETTINGS_FILE_NAME, FUEL_GAUGE_SETTINGS_MAX_SIZE); if (ret != S_SUCCESS) { return; } @@ -170,21 +169,18 @@ static bool prv_load_state(void *state, size_t size) { SettingsFile file; status_t ret; - ret = settings_file_open(&file, FUEL_GAUGE_SETTINGS_FILE_NAME, - FUEL_GAUGE_SETTINGS_MAX_SIZE); + ret = settings_file_open(&file, FUEL_GAUGE_SETTINGS_FILE_NAME, FUEL_GAUGE_SETTINGS_MAX_SIZE); if (ret != S_SUCCESS) { return false; } - int len = settings_file_get_len(&file, &FUEL_GAUGE_STATE_KEY, - sizeof(FUEL_GAUGE_STATE_KEY)); + int len = settings_file_get_len(&file, &FUEL_GAUGE_STATE_KEY, sizeof(FUEL_GAUGE_STATE_KEY)); if (len != (int)size) { settings_file_close(&file); return false; } - ret = settings_file_get(&file, &FUEL_GAUGE_STATE_KEY, - sizeof(FUEL_GAUGE_STATE_KEY), state, size); + ret = settings_file_get(&file, &FUEL_GAUGE_STATE_KEY, sizeof(FUEL_GAUGE_STATE_KEY), state, size); settings_file_close(&file); if (ret != S_SUCCESS) { @@ -206,15 +202,14 @@ static void prv_save_state(void) { return; } - ret = settings_file_open(&file, FUEL_GAUGE_SETTINGS_FILE_NAME, - FUEL_GAUGE_SETTINGS_MAX_SIZE); + ret = settings_file_open(&file, FUEL_GAUGE_SETTINGS_FILE_NAME, FUEL_GAUGE_SETTINGS_MAX_SIZE); if (ret != S_SUCCESS) { PBL_LOG_ERR("Failed to open fuel gauge settings file"); return; } - ret = settings_file_set(&file, &FUEL_GAUGE_STATE_KEY, - sizeof(FUEL_GAUGE_STATE_KEY), buf, sizeof(buf)); + ret = settings_file_set(&file, &FUEL_GAUGE_STATE_KEY, sizeof(FUEL_GAUGE_STATE_KEY), buf, + sizeof(buf)); settings_file_close(&file); if (ret != S_SUCCESS) { @@ -223,8 +218,8 @@ static void prv_save_state(void) { PBL_LOG_DBG("Fuel gauge state saved"); } } -#endif // CONFIG_MFG -#endif // FUEL_GAUGE_STATEFUL +#endif // CONFIG_MFG +#endif // FUEL_GAUGE_STATEFUL static void prv_schedule_update(uint32_t delay, bool force_update); @@ -292,10 +287,9 @@ static void prv_charge_status_inform(BatteryChargeStatus chg_status) { static void prv_battery_state_put_change_event(PreciseBatteryChargeState state) { PebbleEvent e = { .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, - .battery_state = - { - .new_state = state, - }, + .battery_state = { + .new_state = state, + }, }; event_put(&e); } @@ -406,17 +400,19 @@ static void prv_update_state(void *force_update) { } #endif - PBL_LOG_VERBOSE("Battery state: v_mv: %ld, i_ua: %ld, t_mc: %ld, td: %lu, soc: %u, tte: %lu, ttf: %lu", - constants.v_mv, constants.i_ua, constants.t_mc, (uint32_t)delta, - s_last_battery_charge_state.pct, s_last_tte, s_last_ttf); + PBL_LOG_VERBOSE( + "Battery state: v_mv: %ld, i_ua: %ld, t_mc: %ld, td: %lu, soc: %u, tte: %lu, ttf: %lu", + constants.v_mv, constants.i_ua, constants.t_mc, (uint32_t)delta, + s_last_battery_charge_state.pct, s_last_tte, s_last_ttf); if (update || (((now - s_last_log) / RTC_TICKS_HZ > LOG_MIN_SEC) && (s_last_battery_charge_state.is_charging || (pct < ALWAYS_UPDATE_PCT)))) { - PBL_LOG_INFO("Percent: %" PRIu8 ", V: %" PRId32 " mV, I: %" PRId32 " uA, " - "T: %" PRId32 " mC, charging: %s, plugged: %s", - s_last_battery_charge_state.pct, constants.v_mv, constants.i_ua, constants.t_mc, - s_last_battery_charge_state.is_charging ? "yes" : "no", - s_last_battery_charge_state.is_plugged ? "yes" : "no"); + PBL_LOG_INFO("Percent: %" PRIu8 ", V: %" PRId32 " mV, I: %" PRId32 + " uA, " + "T: %" PRId32 " mC, charging: %s, plugged: %s", + s_last_battery_charge_state.pct, constants.v_mv, constants.i_ua, constants.t_mc, + s_last_battery_charge_state.is_charging ? "yes" : "no", + s_last_battery_charge_state.is_plugged ? "yes" : "no"); prv_battery_state_put_change_event(s_last_battery_charge_state); s_last_log = now; } @@ -456,7 +452,9 @@ static void prv_schedule_update(uint32_t delay, bool force_update) { PBL_ASSERTN(success); } -void battery_state_force_update(void) { prv_schedule_update(0, true); } +void battery_state_force_update(void) { + prv_schedule_update(0, true); +} void battery_state_init(void) { int ret; @@ -474,7 +472,8 @@ void battery_state_init(void) { ret = nrf_fuel_gauge_ext_state_update( NRF_FUEL_GAUGE_EXT_STATE_INFO_CHARGE_CURRENT_LIMIT, &(union nrf_fuel_gauge_ext_state_info_data){ - .charge_current_limit = (float)NPM1300_CONFIG.chg_current_ma / 1000.0f}); + .charge_current_limit = (float)NPM1300_CONFIG.chg_current_ma / 1000.0f + }); PBL_ASSERTN(ret == 0); ret = nrf_fuel_gauge_ext_state_update( @@ -482,7 +481,8 @@ void battery_state_init(void) { &(union nrf_fuel_gauge_ext_state_info_data){ .charge_term_current = (float)(NPM1300_CONFIG.chg_current_ma * NPM1300_CONFIG.term_current_pct / 100U) / - 1000.0f}); + 1000.0f + }); PBL_ASSERTN(ret == 0); runtime_parameters.a = NAN; @@ -503,18 +503,18 @@ void battery_state_init(void) { !(s_last_chg_status == BatteryChargeStatusComplete || s_last_chg_status == BatteryChargeStatusUnknown); - float pct = nrf_fuel_gauge_process((float)constants.v_mv / 1000.0f, - (float)constants.i_ua / 1000000.0f, - (float)constants.t_mc / 1000.0f, 0.0f, NULL); + float pct = + nrf_fuel_gauge_process((float)constants.v_mv / 1000.0f, (float)constants.i_ua / 1000000.0f, + (float)constants.t_mc / 1000.0f, 0.0f, NULL); #if FUEL_GAUGE_STATEFUL if ((uint8_t)ceilf(pct) == 0 && constants.v_mv >= BATTERY_MIN_VALID_VOLTAGE_MV) { PBL_LOG_WRN("Invalid state detected, reloading without state"); prv_erase_state(); ret = prv_fuel_gauge_init_common(&constants, false); PBL_ASSERTN(ret == 0); - pct = nrf_fuel_gauge_process((float)constants.v_mv / 1000.0f, - (float)constants.i_ua / 1000000.0f, - (float)constants.t_mc / 1000.0f, 0.0f, NULL); + pct = + nrf_fuel_gauge_process((float)constants.v_mv / 1000.0f, (float)constants.i_ua / 1000000.0f, + (float)constants.t_mc / 1000.0f, 0.0f, NULL); } #endif @@ -535,9 +535,7 @@ void battery_state_init(void) { battery_state_force_update(); - static RegularTimerInfo battery_regular_timer = { - .cb = prv_callback_from_regular_timer - }; + static RegularTimerInfo battery_regular_timer = {.cb = prv_callback_from_regular_timer}; regular_timer_add_multiminute_callback(&battery_regular_timer, BATTERY_SAMPLE_RATE_MIN); s_analytics_last_voltage_mv = s_last_voltage_mv; @@ -563,11 +561,17 @@ BatteryChargeState battery_get_charge_state(void) { } // For unit tests -TimerID battery_state_get_periodic_timer_id(void) { return s_periodic_timer_id; } +TimerID battery_state_get_periodic_timer_id(void) { + return s_periodic_timer_id; +} -uint16_t battery_state_get_voltage(void) { return (uint16_t)s_last_voltage_mv; } +uint16_t battery_state_get_voltage(void) { + return (uint16_t)s_last_voltage_mv; +} -int32_t battery_state_get_temperature(void) { return s_last_temp_mc; } +int32_t battery_state_get_temperature(void) { + return s_last_temp_mc; +} #include "console/prompt.h" void command_print_battery_status(void) { @@ -608,8 +612,7 @@ void pbl_analytics_external_collect_battery(void) { PBL_ANALYTICS_SET_SIGNED(battery_voltage_delta, d_mv); PBL_ANALYTICS_SET_SIGNED(battery_temp_c, s_last_temp_mc); PBL_ANALYTICS_SET_UNSIGNED(battery_soc_pct_min, - s_soc_cpct_min < battery_soc_cpct ? s_soc_cpct_min - : battery_soc_cpct); + s_soc_cpct_min < battery_soc_cpct ? s_soc_cpct_min : battery_soc_cpct); s_soc_cpct_min = battery_soc_cpct; s_analytics_last_voltage_mv = battery_mv; diff --git a/src/fw/services/battery/voltage/battery_curve.c b/src/fw/services/battery/voltage/battery_curve.c index cea6550369..8402f78fb0 100644 --- a/src/fw/services/battery/voltage/battery_curve.c +++ b/src/fw/services/battery/voltage/battery_curve.c @@ -17,41 +17,43 @@ typedef struct VoltagePoint { // TODO: Move these curves somewhere else. Related: PBL-21049 // TODO(ASTERIX,OBELIX): Needs customization for Asterix/Obelix -#if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) || defined(CONFIG_BOARD_QEMU_EMERY) || defined(CONFIG_BOARD_QEMU_FLINT) || defined(CONFIG_BOARD_QEMU_GABBRO) +#if defined(CONFIG_BOARD_ASTERIX) || defined(CONFIG_BOARD_OBELIX) || \ + defined(CONFIG_BOARD_QEMU_EMERY) || defined(CONFIG_BOARD_QEMU_FLINT) || \ + defined(CONFIG_BOARD_QEMU_GABBRO) // When the voltage drops below these (mV), the watch will start heading for standby (after delay) #define BATTERY_CRITICAL_VOLTAGE_CHARGING 3550 #define BATTERY_CRITICAL_VOLTAGE_DISCHARGING 3300 // Battery Tables for Silk static VoltagePoint discharge_curve[] = { - {0, BATTERY_CRITICAL_VOLTAGE_DISCHARGING}, - {2, 3490}, - {5, 3615}, - {10, 3655}, - {20, 3700}, - {30, 3735}, - {40, 3760}, - {50, 3800}, - {60, 3855}, - {70, 3935}, - {80, 4025}, - {90, 4120}, - {100, 4230} + {0, BATTERY_CRITICAL_VOLTAGE_DISCHARGING}, + {2, 3490}, + {5, 3615}, + {10, 3655}, + {20, 3700}, + {30, 3735}, + {40, 3760}, + {50, 3800}, + {60, 3855}, + {70, 3935}, + {80, 4025}, + {90, 4120}, + {100, 4230} }; static const VoltagePoint charge_curve[] = { - {0, BATTERY_CRITICAL_VOLTAGE_CHARGING}, - {2, 3570}, - {5, 3600}, - {10, 3645}, - {20, 3730}, - {30, 3800}, - {40, 3860}, - {50, 3915}, - {60, 3970}, - {70, 4030}, - {80, 4095}, - {90, 4175}, - {100, 4260} + {0, BATTERY_CRITICAL_VOLTAGE_CHARGING}, + {2, 3570}, + {5, 3600}, + {10, 3645}, + {20, 3730}, + {30, 3800}, + {40, 3860}, + {50, 3915}, + {60, 3970}, + {70, 4030}, + {80, 4095}, + {90, 4175}, + {100, 4260} }; #else @@ -71,10 +73,10 @@ static uint16_t s_discharge_full_voltage_default; // doesn't drop below the next highest point. void battery_curve_set_full_voltage(uint16_t voltage) { if (s_discharge_full_voltage_default == 0) { - s_discharge_full_voltage_default = discharge_curve[NUM_DISCHARGE_POINTS-1].voltage; + s_discharge_full_voltage_default = discharge_curve[NUM_DISCHARGE_POINTS - 1].voltage; } - voltage = MAX(voltage, discharge_curve[NUM_DISCHARGE_POINTS-2].voltage + 1); - discharge_curve[NUM_DISCHARGE_POINTS-1].voltage = voltage; + voltage = MAX(voltage, discharge_curve[NUM_DISCHARGE_POINTS - 2].voltage + 1); + discharge_curve[NUM_DISCHARGE_POINTS - 1].voltage = voltage; } #if UNITTEST @@ -82,36 +84,35 @@ void battery_curve_set_full_voltage(uint16_t voltage) { // run in isolation. Not built into production firmware (tests only). void battery_curve_reset_for_tests(void) { if (s_discharge_full_voltage_default != 0) { - discharge_curve[NUM_DISCHARGE_POINTS-1].voltage = s_discharge_full_voltage_default; + discharge_curve[NUM_DISCHARGE_POINTS - 1].voltage = s_discharge_full_voltage_default; } } #endif -static uint32_t prv_lookup_percent_by_voltage( - int battery_mv, bool is_charging, uint32_t scaling_factor) { - VoltagePoint const * const battery_curve = (is_charging) ? charge_curve : discharge_curve; +static uint32_t prv_lookup_percent_by_voltage(int battery_mv, bool is_charging, + uint32_t scaling_factor) { + VoltagePoint const *const battery_curve = (is_charging) ? charge_curve : discharge_curve; uint8_t const num_curve_points = (is_charging) ? NUM_CHARGE_POINTS : NUM_DISCHARGE_POINTS; // Constrain the voltage between the min and max points of the curve if (battery_mv <= battery_curve[0].voltage) { return battery_curve[0].percent * scaling_factor; - } else if (battery_mv >= battery_curve[num_curve_points-1].voltage) { - return battery_curve[num_curve_points-1].percent * scaling_factor; + } else if (battery_mv >= battery_curve[num_curve_points - 1].voltage) { + return battery_curve[num_curve_points - 1].percent * scaling_factor; } // search through the curves for the next charge level... uint32_t charge_index; - for (charge_index = num_curve_points-2; - (charge_index > 0) && (battery_mv < battery_curve[charge_index].voltage); - --charge_index) { + for (charge_index = num_curve_points - 2; + (charge_index > 0) && (battery_mv < battery_curve[charge_index].voltage); --charge_index) { } // linearly interpolate between battery_curve[charge_index] and battery_curve[charge_index+1] uint32_t delta_mv = (battery_mv - battery_curve[charge_index].voltage); - uint32_t delta_next_mv = (battery_curve[charge_index + 1].voltage - - battery_curve[charge_index].voltage); - uint32_t delta_next_percent = (battery_curve[charge_index + 1].percent - - battery_curve[charge_index].percent); + uint32_t delta_next_mv = + (battery_curve[charge_index + 1].voltage - battery_curve[charge_index].voltage); + uint32_t delta_next_percent = + (battery_curve[charge_index + 1].percent - battery_curve[charge_index].percent); uint32_t start_percent = battery_curve[charge_index].percent * scaling_factor; delta_next_percent *= scaling_factor; @@ -121,8 +122,8 @@ static uint32_t prv_lookup_percent_by_voltage( return charge_percent; } -static uint32_t prv_sample_scaled_charge_percent( - uint32_t battery_mv, bool is_charging, uint32_t scaling_factor) { +static uint32_t prv_sample_scaled_charge_percent(uint32_t battery_mv, bool is_charging, + uint32_t scaling_factor) { int compensate = 0; // We compensate 5% during rounding, so don't do here for (int i = 0; i < BATTERY_CURVE_COMPENSATE_COUNT; ++i) { @@ -143,29 +144,28 @@ void battery_curve_set_compensation(BatteryCurveVoltageCompensationKey key, int // This is used by unit tests and QEMU uint32_t battery_curve_lookup_voltage_by_percent(uint32_t percent, bool is_charging) { - VoltagePoint const * const battery_curve = (is_charging) ? charge_curve : discharge_curve; + VoltagePoint const *const battery_curve = (is_charging) ? charge_curve : discharge_curve; uint32_t const num_curve_points = (is_charging) ? NUM_CHARGE_POINTS : NUM_DISCHARGE_POINTS; // Clip if above curve upper bound - if (percent > battery_curve[num_curve_points-1].percent) { - return battery_curve[num_curve_points-1].voltage; + if (percent > battery_curve[num_curve_points - 1].percent) { + return battery_curve[num_curve_points - 1].voltage; } // search through the curves for the next charge level... uint32_t charge_index; - for (charge_index = num_curve_points-2; - (charge_index > 0) && (percent < battery_curve[charge_index].percent); - --charge_index) { + for (charge_index = num_curve_points - 2; + (charge_index > 0) && (percent < battery_curve[charge_index].percent); --charge_index) { } // linearly interpolate between battery_curve[charge_index] and battery_curve[charge_index+1] - uint32_t delta_next_mv = (battery_curve[charge_index+1].voltage - - battery_curve[charge_index].voltage); - uint32_t delta_next_percent = (battery_curve[charge_index+1].percent - - battery_curve[charge_index].percent); - uint32_t battery_mv = battery_curve[charge_index].voltage + - ((percent - battery_curve[charge_index].percent) * delta_next_mv) / - delta_next_percent; + uint32_t delta_next_mv = + (battery_curve[charge_index + 1].voltage - battery_curve[charge_index].voltage); + uint32_t delta_next_percent = + (battery_curve[charge_index + 1].percent - battery_curve[charge_index].percent); + uint32_t battery_mv = + battery_curve[charge_index].voltage + + ((percent - battery_curve[charge_index].percent) * delta_next_mv) / delta_next_percent; return battery_mv; } @@ -185,11 +185,11 @@ uint32_t battery_curve_get_hours_remaining(uint32_t percent_remaining) { //! PreciseBatteryChargeState (which includes low_power_mode) uint32_t battery_curve_get_percent_remaining(uint32_t hours) { return ((hours * 100) / BOARD_CONFIG_POWER.battery_capacity_hours) + - BOARD_CONFIG_POWER.low_power_threshold; + BOARD_CONFIG_POWER.low_power_threshold; } // for unit tests and analytics -int32_t battery_curve_lookup_percent_with_scaling_factor( - int battery_mv, bool is_charging, uint32_t scaling_factor) { +int32_t battery_curve_lookup_percent_with_scaling_factor(int battery_mv, bool is_charging, + uint32_t scaling_factor) { return (prv_lookup_percent_by_voltage(battery_mv, is_charging, scaling_factor)); } diff --git a/src/fw/services/battery/voltage/battery_state.c b/src/fw/services/battery/voltage/battery_state.c index 771959b047..7bd7445028 100644 --- a/src/fw/services/battery/voltage/battery_state.c +++ b/src/fw/services/battery/voltage/battery_state.c @@ -46,9 +46,9 @@ static void prv_update_plugged_change(void); static void prv_update_done_charging(void); static const ConnectionState s_transitions[] = { - [ConnectionStateChargingPlugged] = { .enter = prv_update_plugged_change }, - [ConnectionStateDischargingPlugged] = { .enter = prv_update_done_charging }, - [ConnectionStateDischargingUnplugged] = { .enter = prv_update_plugged_change } + [ConnectionStateChargingPlugged] = {.enter = prv_update_plugged_change}, + [ConnectionStateDischargingPlugged] = {.enter = prv_update_done_charging}, + [ConnectionStateDischargingUnplugged] = {.enter = prv_update_plugged_change} }; typedef struct BatteryState { @@ -105,10 +105,10 @@ static void prv_update_done_charging(void) { static void battery_state_put_change_event(PreciseBatteryChargeState state) { PebbleEvent e = { - .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, - .battery_state = { - .new_state = state, - }, + .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, + .battery_state = { + .new_state = state, + }, }; event_put(&e); } @@ -173,8 +173,8 @@ static void prv_update_state(void *force_update) { } } - s_last_battery_state.voltage = prv_filter_voltage(s_last_battery_state.voltage, - battery_get_millivolts()); + s_last_battery_state.voltage = + prv_filter_voltage(s_last_battery_state.voltage, battery_get_millivolts()); bool charging = (s_last_battery_state.connection == ConnectionStateChargingPlugged); // Update Percent & Filtering @@ -190,8 +190,7 @@ static void prv_update_state(void *force_update) { // - The readings have stabilized and the battery percent did not go up // - The readings have not yet stabilized // TL;DR: Allow updates unless we're stable and discharging but the % went up. - if (!charging && likely_stable && - new_charge_percent > s_last_battery_state.percent) { + if (!charging && likely_stable && new_charge_percent > s_last_battery_state.percent) { // It's okay to return early since any connection/plugged changes will reset the filter, // so we won't catch those. return; @@ -199,9 +198,9 @@ static void prv_update_state(void *force_update) { s_last_battery_state.percent = new_charge_percent; - PBL_LOG_DBG("mV Raw: %"PRIu16" Ratio: %"PRIu32" Percent: %"PRIu32, - s_last_battery_state.voltage, s_last_battery_state.percent, - ratio32_to_percent(s_last_battery_state.percent)); + PBL_LOG_DBG("mV Raw: %" PRIu16 " Ratio: %" PRIu32 " Percent: %" PRIu32, + s_last_battery_state.voltage, s_last_battery_state.percent, + ratio32_to_percent(s_last_battery_state.percent)); PWR_TRACK_BATT(charging ? "CHARGING" : "DISCHARGING", s_last_battery_state.voltage); @@ -223,7 +222,7 @@ static void prv_update_callback(void *data) { static void prv_schedule_update(uint32_t delay, bool force_update) { bool success = new_timer_start(s_periodic_timer_id, delay, prv_update_callback, - (void *)force_update, 0 /*flags*/); + (void *)force_update, 0 /*flags*/); PBL_ASSERTN(success); } @@ -239,7 +238,7 @@ void battery_state_force_update(void) { void battery_state_init(void) { s_periodic_timer_id = new_timer_create(); - s_last_battery_state = (BatteryState) { .connection = ConnectionStateDischargingUnplugged }; + s_last_battery_state = (BatteryState){.connection = ConnectionStateDischargingUnplugged}; battery_state_reset_filter(); battery_state_force_update(); @@ -259,10 +258,10 @@ void battery_state_handle_connection_event(bool is_connected) { PreciseBatteryChargeState prv_get_precise_charge_state(const BatteryState *state) { PreciseBatteryChargeState event_state = { - .charge_percent = state->percent, - .pct = ratio32_to_percent(state->percent), - .is_charging = (s_last_battery_state.connection == ConnectionStateChargingPlugged), - .is_plugged = (s_last_battery_state.connection != ConnectionStateDischargingUnplugged) + .charge_percent = state->percent, + .pct = ratio32_to_percent(state->percent), + .is_charging = (s_last_battery_state.connection == ConnectionStateChargingPlugged), + .is_plugged = (s_last_battery_state.connection != ConnectionStateDischargingUnplugged) }; return event_state; } @@ -285,8 +284,9 @@ BatteryChargeState battery_get_charge_state(void) { int32_t percent = ratio32_to_percent(s_last_battery_state.percent); // subtract low power reserve, so developer will see 0% when we're approaching low power mode - int32_t percent_normalized = MAX((percent - BOARD_CONFIG_POWER.low_power_threshold - + percent / (100 / BOARD_CONFIG_POWER.low_power_threshold)), 0); + int32_t percent_normalized = MAX((percent - BOARD_CONFIG_POWER.low_power_threshold + + percent / (100 / BOARD_CONFIG_POWER.low_power_threshold)), + 0); // massage rounding factor so that between 100% to 50% charge the SOC reported is biased to a // higher charge percent bin. @@ -294,9 +294,9 @@ BatteryChargeState battery_get_charge_state(void) { uint8_t charge_percent = MIN(10 * ((percent_normalized + rounding_factor) / 10), 100); #endif BatteryChargeState state = { - .charge_percent = charge_percent, - .is_charging = is_plugged && percent_normalized < 100, - .is_plugged = is_plugged, + .charge_percent = charge_percent, + .is_charging = is_plugged && percent_normalized < 100, + .is_plugged = is_plugged, }; return state; } @@ -318,9 +318,9 @@ int32_t battery_state_get_temp(void) { void command_print_battery_status(void) { char buffer[32]; PreciseBatteryChargeState state = prv_get_precise_charge_state(&s_last_battery_state); - prompt_send_response_fmt(buffer, 32, "%"PRIu16" mV", s_last_battery_state.voltage); - prompt_send_response_fmt(buffer, 32, - "batt_percent: %"PRIu32"%%", ratio32_to_percent(state.charge_percent)); + prompt_send_response_fmt(buffer, 32, "%" PRIu16 " mV", s_last_battery_state.voltage); + prompt_send_response_fmt(buffer, 32, "batt_percent: %" PRIu32 "%%", + ratio32_to_percent(state.charge_percent)); prompt_send_response_fmt(buffer, 32, "plugged: %s", state.is_plugged ? "YES" : "NO"); prompt_send_response_fmt(buffer, 32, "charging: %s", state.is_charging ? "YES" : "NO"); } @@ -353,7 +353,7 @@ static void prv_set_forced_charge_state(bool is_charging) { battery_state_force_update(); } -void command_battery_charge_option(const char* option) { +void command_battery_charge_option(const char *option) { if (!strcmp("disable", option)) { prv_set_forced_charge_state(false); } else if (!strcmp("enable", option)) { diff --git a/src/fw/services/blob_db/api.c b/src/fw/services/blob_db/api.c index 1a51ea316e..5d96271f6f 100644 --- a/src/fw/services/blob_db/api.c +++ b/src/fw/services/blob_db/api.c @@ -43,140 +43,150 @@ typedef struct { } BlobDB; static const BlobDB s_blob_dbs[NumBlobDBs] = { - [BlobDBIdPins] = { - .init = pin_db_init, - .insert = pin_db_insert, - .get_len = pin_db_get_len, - .read = pin_db_read, - .del = pin_db_delete, - .flush = pin_db_flush, - .is_dirty = pin_db_is_dirty, - .get_dirty_list = pin_db_get_dirty_list, - .mark_synced = pin_db_mark_synced, - .compact = pin_db_compact, - .name = "pin_db", - }, - [BlobDBIdApps] = { - .init = app_db_init, - .insert = app_db_insert, - .get_len = app_db_get_len, - .read = app_db_read, - .del = app_db_delete, - .flush = app_db_flush, - .compact = app_db_compact, - .name = "app_db", - }, - [BlobDBIdReminders] = { - .init = reminder_db_init, - .insert = reminder_db_insert, - .get_len = reminder_db_get_len, - .read = reminder_db_read, - .del = reminder_db_delete, - .flush = reminder_db_flush, - .is_dirty = reminder_db_is_dirty, - .get_dirty_list = reminder_db_get_dirty_list, - .mark_synced = reminder_db_mark_synced, - .compact = reminder_db_compact, - .name = "reminder_db", - }, - [BlobDBIdNotifs] = { - .init = notif_db_init, - .insert = notif_db_insert, - .get_len = notif_db_get_len, - .read = notif_db_read, - .del = notif_db_delete, - .flush = notif_db_flush, - .name = "notif_db", - }, - [BlobDBIdWeather] = { - .init = weather_db_init, - .insert = weather_db_insert, - .get_len = weather_db_get_len, - .read = weather_db_read, - .del = weather_db_delete, - .flush = weather_db_flush, - .compact = weather_db_compact, - .name = "weather_db", - }, - [BlobDBIdiOSNotifPref] = { - .init = ios_notif_pref_db_init, - .insert = ios_notif_pref_db_insert, - .get_len = ios_notif_pref_db_get_len, - .read = ios_notif_pref_db_read, - .del = ios_notif_pref_db_delete, - .flush = ios_notif_pref_db_flush, - .is_dirty = ios_notif_pref_db_is_dirty, - .get_dirty_list = ios_notif_pref_db_get_dirty_list, - .mark_synced = ios_notif_pref_db_mark_synced, - .compact = ios_notif_pref_db_compact, - .name = "ios_notif_pref_db", - }, - [BlobDBIdPrefs] = { - .init = prefs_db_init, - .insert = prefs_db_insert, - .get_len = prefs_db_get_len, - .read = prefs_db_read, - .del = prefs_db_delete, - .flush = prefs_db_flush, - .name = "prefs_db", - }, - [BlobDBIdContacts] = { - .init = contacts_db_init, - .insert = contacts_db_insert, - .get_len = contacts_db_get_len, - .read = contacts_db_read, - .del = contacts_db_delete, - .flush = contacts_db_flush, - .compact = contacts_db_compact, - .name = "contacts_db", - }, - [BlobDBIdWatchAppPrefs] = { - .init = watch_app_prefs_db_init, - .insert = watch_app_prefs_db_insert, - .get_len = watch_app_prefs_db_get_len, - .read = watch_app_prefs_db_read, - .del = watch_app_prefs_db_delete, - .flush = watch_app_prefs_db_flush, - .compact = watch_app_prefs_db_compact, - .name = "watch_app_prefs_db", - }, - [BlobDBIdHealth] = { - .init = health_db_init, - .insert = health_db_insert, - .get_len = health_db_get_len, - .read = health_db_read, - .del = health_db_delete, - .flush = health_db_flush, - .compact = health_db_compact, - .name = "health_db", - }, - [BlobDBIdAppGlance] = { - .init = app_glance_db_init, - .insert = app_glance_db_insert, - .get_len = app_glance_db_get_len, - .read = app_glance_db_read, - .del = app_glance_db_delete, - .flush = app_glance_db_flush, - .compact = app_glance_db_compact, - .name = "app_glance_db", - }, - [BlobDBIdSettings] = { - .init = settings_blob_db_init, - .insert = settings_blob_db_insert, - .get_len = settings_blob_db_get_len, - .read = settings_blob_db_read, - .del = settings_blob_db_delete, - .flush = settings_blob_db_flush, - .is_dirty = settings_blob_db_is_dirty, - .get_dirty_list = settings_blob_db_get_dirty_list, - .mark_synced = settings_blob_db_mark_synced, - .name = "settings_blob_db", - }, + [BlobDBIdPins] = + { + .init = pin_db_init, + .insert = pin_db_insert, + .get_len = pin_db_get_len, + .read = pin_db_read, + .del = pin_db_delete, + .flush = pin_db_flush, + .is_dirty = pin_db_is_dirty, + .get_dirty_list = pin_db_get_dirty_list, + .mark_synced = pin_db_mark_synced, + .compact = pin_db_compact, + .name = "pin_db", + }, + [BlobDBIdApps] = + { + .init = app_db_init, + .insert = app_db_insert, + .get_len = app_db_get_len, + .read = app_db_read, + .del = app_db_delete, + .flush = app_db_flush, + .compact = app_db_compact, + .name = "app_db", + }, + [BlobDBIdReminders] = + { + .init = reminder_db_init, + .insert = reminder_db_insert, + .get_len = reminder_db_get_len, + .read = reminder_db_read, + .del = reminder_db_delete, + .flush = reminder_db_flush, + .is_dirty = reminder_db_is_dirty, + .get_dirty_list = reminder_db_get_dirty_list, + .mark_synced = reminder_db_mark_synced, + .compact = reminder_db_compact, + .name = "reminder_db", + }, + [BlobDBIdNotifs] = + { + .init = notif_db_init, + .insert = notif_db_insert, + .get_len = notif_db_get_len, + .read = notif_db_read, + .del = notif_db_delete, + .flush = notif_db_flush, + .name = "notif_db", + }, + [BlobDBIdWeather] = + { + .init = weather_db_init, + .insert = weather_db_insert, + .get_len = weather_db_get_len, + .read = weather_db_read, + .del = weather_db_delete, + .flush = weather_db_flush, + .compact = weather_db_compact, + .name = "weather_db", + }, + [BlobDBIdiOSNotifPref] = + { + .init = ios_notif_pref_db_init, + .insert = ios_notif_pref_db_insert, + .get_len = ios_notif_pref_db_get_len, + .read = ios_notif_pref_db_read, + .del = ios_notif_pref_db_delete, + .flush = ios_notif_pref_db_flush, + .is_dirty = ios_notif_pref_db_is_dirty, + .get_dirty_list = ios_notif_pref_db_get_dirty_list, + .mark_synced = ios_notif_pref_db_mark_synced, + .compact = ios_notif_pref_db_compact, + .name = "ios_notif_pref_db", + }, + [BlobDBIdPrefs] = + { + .init = prefs_db_init, + .insert = prefs_db_insert, + .get_len = prefs_db_get_len, + .read = prefs_db_read, + .del = prefs_db_delete, + .flush = prefs_db_flush, + .name = "prefs_db", + }, + [BlobDBIdContacts] = + { + .init = contacts_db_init, + .insert = contacts_db_insert, + .get_len = contacts_db_get_len, + .read = contacts_db_read, + .del = contacts_db_delete, + .flush = contacts_db_flush, + .compact = contacts_db_compact, + .name = "contacts_db", + }, + [BlobDBIdWatchAppPrefs] = + { + .init = watch_app_prefs_db_init, + .insert = watch_app_prefs_db_insert, + .get_len = watch_app_prefs_db_get_len, + .read = watch_app_prefs_db_read, + .del = watch_app_prefs_db_delete, + .flush = watch_app_prefs_db_flush, + .compact = watch_app_prefs_db_compact, + .name = "watch_app_prefs_db", + }, + [BlobDBIdHealth] = + { + .init = health_db_init, + .insert = health_db_insert, + .get_len = health_db_get_len, + .read = health_db_read, + .del = health_db_delete, + .flush = health_db_flush, + .compact = health_db_compact, + .name = "health_db", + }, + [BlobDBIdAppGlance] = + { + .init = app_glance_db_init, + .insert = app_glance_db_insert, + .get_len = app_glance_db_get_len, + .read = app_glance_db_read, + .del = app_glance_db_delete, + .flush = app_glance_db_flush, + .compact = app_glance_db_compact, + .name = "app_glance_db", + }, + [BlobDBIdSettings] = { + .init = settings_blob_db_init, + .insert = settings_blob_db_insert, + .get_len = settings_blob_db_get_len, + .read = settings_blob_db_read, + .del = settings_blob_db_delete, + .flush = settings_blob_db_flush, + .is_dirty = settings_blob_db_is_dirty, + .get_dirty_list = settings_blob_db_get_dirty_list, + .mark_synced = settings_blob_db_mark_synced, + .name = "settings_blob_db", + }, }; static bool prv_db_valid(BlobDBId db_id) { return (db_id < NumBlobDBs) && (!s_blob_dbs[db_id].disabled); - } void blob_db_event_put(BlobDBEventType type, BlobDBId db_id, const uint8_t *key, int key_len) { @@ -188,13 +198,13 @@ void blob_db_event_put(BlobDBEventType type, BlobDBId db_id, const uint8_t *key, } PebbleEvent e = { - .type = PEBBLE_BLOBDB_EVENT, - .blob_db = { - .db_id = db_id, - .type = type, - .key = key_bytes, - .key_len = (uint8_t)key_len, - } + .type = PEBBLE_BLOBDB_EVENT, + .blob_db = { + .db_id = db_id, + .type = type, + .key = key_bytes, + .key_len = (uint8_t)key_len, + } }; event_put(&e); } @@ -216,8 +226,7 @@ void blob_db_compact_growable_dbs(void) { continue; } const status_t rv = db->compact(); - PBL_LOG_INFO("blob_db_compact_growable_dbs: %s -> %"PRIi32, - db->name ? db->name : "?", rv); + PBL_LOG_INFO("blob_db_compact_growable_dbs: %s -> %" PRIi32, db->name ? db->name : "?", rv); } PBL_LOG_INFO("blob_db_compact_growable_dbs: done"); } @@ -234,8 +243,8 @@ void blob_db_get_dirty_dbs(uint8_t *ids, uint8_t *num_ids) { } } -status_t blob_db_insert(BlobDBId db_id, - const uint8_t *key, int key_len, const uint8_t *val, int val_len) { +status_t blob_db_insert(BlobDBId db_id, const uint8_t *key, int key_len, const uint8_t *val, + int val_len) { if (!prv_db_valid(db_id)) { return E_RANGE; } @@ -253,8 +262,7 @@ status_t blob_db_insert(BlobDBId db_id, return E_INVALID_OPERATION; } -int blob_db_get_len(BlobDBId db_id, - const uint8_t *key, int key_len) { +int blob_db_get_len(BlobDBId db_id, const uint8_t *key, int key_len) { if (!prv_db_valid(db_id)) { return E_RANGE; } @@ -267,8 +275,8 @@ int blob_db_get_len(BlobDBId db_id, return E_INVALID_OPERATION; } -status_t blob_db_read(BlobDBId db_id, - const uint8_t *key, int key_len, uint8_t *val_out, int val_len) { +status_t blob_db_read(BlobDBId db_id, const uint8_t *key, int key_len, uint8_t *val_out, + int val_len) { if (!prv_db_valid(db_id)) { return E_RANGE; } @@ -281,8 +289,7 @@ status_t blob_db_read(BlobDBId db_id, return E_INVALID_OPERATION; } -status_t blob_db_delete(BlobDBId db_id, - const uint8_t *key, int key_len) { +status_t blob_db_delete(BlobDBId db_id, const uint8_t *key, int key_len) { if (!prv_db_valid(db_id)) { return E_RANGE; } diff --git a/src/fw/services/blob_db/app_db.c b/src/fw/services/blob_db/app_db.c index e136c83bb7..e2fb3b9fda 100644 --- a/src/fw/services/blob_db/app_db.c +++ b/src/fw/services/blob_db/app_db.c @@ -18,7 +18,7 @@ PBL_LOG_MODULE_DECLARE(service_blob_db, CONFIG_SERVICE_BLOB_DB_LOG_LEVEL); -#define SETTINGS_FILE_NAME "appdb" +#define SETTINGS_FILE_NAME "appdb" // Holds about ~150 app metadata blobs #define SETTINGS_FILE_SIZE KiBYTES(20) @@ -42,10 +42,8 @@ struct AppDBInitData { static status_t prv_lock_mutex_and_open_file(void) { pbl_mutex_lock(&s_app_db.mutex, PBL_FOREVER); - status_t rv = settings_file_open_growable(&s_app_db.settings_file, - SETTINGS_FILE_NAME, - SETTINGS_FILE_SIZE, - KiBYTES(4)); + status_t rv = settings_file_open_growable(&s_app_db.settings_file, SETTINGS_FILE_NAME, + SETTINGS_FILE_SIZE, KiBYTES(4)); if (rv != S_SUCCESS) { pbl_mutex_unlock(&s_app_db.mutex); } @@ -73,7 +71,7 @@ static status_t prv_cancel_app_fetch(AppInstallId app_id) { static bool prv_each_inspect_ids(SettingsFile *file, SettingsRecordInfo *info, void *context) { // check entry is valid if ((info->val_len == 0) || (info->key_len != sizeof(AppInstallId))) { - return true; // continue iterating + return true; // continue iterating } struct AppDBInitData *data = context; @@ -84,12 +82,12 @@ static bool prv_each_inspect_ids(SettingsFile *file, SettingsRecordInfo *info, v data->max_id = MAX(data->max_id, app_id); data->num_apps++; - return true; // continue iterating + return true; // continue iterating } struct UuidFilterData { - Uuid uuid; - AppInstallId found_id; + Uuid uuid; + AppInstallId found_id; }; //! SettingsFileEachCallback function is used to iterate over all entries and search for @@ -98,7 +96,7 @@ struct UuidFilterData { static bool prv_db_filter_app_id(SettingsFile *file, SettingsRecordInfo *info, void *context) { // check entry is valid if ((info->val_len == 0) || (info->key_len != sizeof(AppInstallId))) { - return true; // continue iterating + return true; // continue iterating } struct UuidFilterData *uuid_data = (struct UuidFilterData *)context; @@ -110,9 +108,9 @@ static bool prv_db_filter_app_id(SettingsFile *file, SettingsRecordInfo *info, v if (uuid_equal(&uuid_data->uuid, &entry.uuid)) { uuid_data->found_id = app_id; - return false; // stop iterating + return false; // stop iterating } - return true; // continue iterating + return true; // continue iterating } //! Retrieves the AppInstallId for a given UUID using the SettingsFile that is already open. @@ -120,8 +118,8 @@ static bool prv_db_filter_app_id(SettingsFile *file, SettingsRecordInfo *info, v static AppInstallId prv_find_install_id_for_uuid(SettingsFile *file, const Uuid *uuid) { // used when iterating through all entries in our database. struct UuidFilterData filter_data = { - .found_id = INSTALL_ID_INVALID, - .uuid = *uuid, + .found_id = INSTALL_ID_INVALID, + .uuid = *uuid, }; settings_file_each(file, prv_db_filter_app_id, (void *)&filter_data); @@ -148,7 +146,6 @@ AppInstallId app_db_get_install_id_for_uuid(const Uuid *uuid) { // App DB API /////////////////////////// - //! Fills an AppDBEntry for a given UUID. This is a wrapper around app_db_read to keep it uniform //! with `app_db_get_app_entry_for_install_id` status_t app_db_get_app_entry_for_uuid(const Uuid *uuid, AppDBEntry *entry) { @@ -162,7 +159,7 @@ status_t app_db_get_app_entry_for_install_id(AppInstallId app_id, AppDBEntry *en } rv = settings_file_get(&s_app_db.settings_file, (uint8_t *)&app_id, sizeof(AppInstallId), - (uint8_t *)entry, sizeof(AppDBEntry)); + (uint8_t *)entry, sizeof(AppDBEntry)); prv_close_file_and_unlock_mutex(); return rv; @@ -174,8 +171,8 @@ bool app_db_exists_install_id(AppInstallId app_id) { return rv; } - bool exists = settings_file_exists(&s_app_db.settings_file, (uint8_t *)&app_id, - sizeof(AppInstallId)); + bool exists = + settings_file_exists(&s_app_db.settings_file, (uint8_t *)&app_id, sizeof(AppInstallId)); prv_close_file_and_unlock_mutex(); return exists; @@ -190,7 +187,7 @@ typedef struct { static bool prv_enumerate_entries(SettingsFile *file, SettingsRecordInfo *info, void *context) { // check entry is valid if ((info->val_len == 0) || (info->key_len != sizeof(AppInstallId))) { - return true; // continue iteration + return true; // continue iteration } EnumerateData *cb_data = (EnumerateData *)context; @@ -202,7 +199,7 @@ static bool prv_enumerate_entries(SettingsFile *file, SettingsRecordInfo *info, // check return value cb_data->cb(id, cb_data->entry_buf, cb_data->data); - return true; // continue iteration + return true; // continue iteration } void app_db_enumerate_entries(AppDBEnumerateCb cb, void *data) { @@ -214,9 +211,9 @@ void app_db_enumerate_entries(AppDBEnumerateCb cb, void *data) { AppDBEntry *db_entry = kernel_malloc_check(sizeof(AppDBEntry)); EnumerateData cb_data = { - .cb = cb, - .data = data, - .entry_buf = db_entry, + .cb = cb, + .data = data, + .entry_buf = db_entry, }; settings_file_each(&s_app_db.settings_file, prv_enumerate_entries, &cb_data); @@ -243,7 +240,7 @@ void app_db_init(void) { WTF; } - struct AppDBInitData data = { 0 }; + struct AppDBInitData data = {0}; settings_file_each(&s_app_db.settings_file, prv_each_inspect_ids, &data); @@ -253,15 +250,14 @@ void app_db_init(void) { s_next_unique_flash_app_id = (data.max_id + 1); } - PBL_LOG_INFO("Found %"PRIu32" apps. Next ID: %"PRIu32" ", data.num_apps, - s_next_unique_flash_app_id); + PBL_LOG_INFO("Found %" PRIu32 " apps. Next ID: %" PRIu32 " ", data.num_apps, + s_next_unique_flash_app_id); prv_close_file_and_unlock_mutex(); } status_t app_db_insert(const uint8_t *key, int key_len, const uint8_t *val, int val_len) { - if (key_len != UUID_SIZE || - val_len != sizeof(AppDBEntry)) { + if (key_len != UUID_SIZE || val_len != sizeof(AppDBEntry)) { return E_INVALID_ARGUMENT; } @@ -279,14 +275,13 @@ status_t app_db_insert(const uint8_t *key, int key_len, const uint8_t *val, int new_install = true; app_id = s_next_unique_flash_app_id++; } else if (app_fetch_in_progress()) { - PBL_LOG_WRN("Got an insert for an app that is currently being fetched, %"PRId32, - app_id); + PBL_LOG_WRN("Got an insert for an app that is currently being fetched, %" PRId32, app_id); rv = prv_cancel_app_fetch(app_id); } if (rv == S_SUCCESS) { - rv = settings_file_set(&s_app_db.settings_file, (uint8_t *)&app_id, - sizeof(AppInstallId), val, val_len); + rv = settings_file_set(&s_app_db.settings_file, (uint8_t *)&app_id, sizeof(AppInstallId), val, + val_len); } prv_close_file_and_unlock_mutex(); @@ -332,8 +327,8 @@ status_t app_db_read(const uint8_t *key, int key_len, uint8_t *val_out, int val_ if (app_id == INSTALL_ID_INVALID) { rv = E_DOES_NOT_EXIST; } else { - rv = settings_file_get(&s_app_db.settings_file, (uint8_t *)&app_id, - sizeof(AppInstallId), val_out, val_len); + rv = settings_file_get(&s_app_db.settings_file, (uint8_t *)&app_id, sizeof(AppInstallId), + val_out, val_len); } prv_close_file_and_unlock_mutex(); @@ -357,8 +352,7 @@ status_t app_db_delete(const uint8_t *key, int key_len) { if (app_id == INSTALL_ID_INVALID) { rv = E_DOES_NOT_EXIST; } else if (app_fetch_in_progress()) { - PBL_LOG_WRN("Tried to delete an app that is currently being fetched, %"PRId32, - app_id); + PBL_LOG_WRN("Tried to delete an app that is currently being fetched, %" PRId32, app_id); rv = prv_cancel_app_fetch(app_id); } @@ -366,7 +360,6 @@ status_t app_db_delete(const uint8_t *key, int key_len) { rv = settings_file_delete(&s_app_db.settings_file, (uint8_t *)&app_id, sizeof(AppInstallId)); } - prv_close_file_and_unlock_mutex(); if (rv == S_SUCCESS) { diff --git a/src/fw/services/blob_db/app_glance_db.c b/src/fw/services/blob_db/app_glance_db.c index 69c1c340f7..2f53f5d80c 100644 --- a/src/fw/services/blob_db/app_glance_db.c +++ b/src/fw/services/blob_db/app_glance_db.c @@ -29,11 +29,11 @@ PBL_LOG_MODULE_DECLARE(service_blob_db, CONFIG_SERVICE_BLOB_DB_LOG_LEVEL); //! for some safety margin and easy future expansion, and thus use 80KB for the settings file size. #define SETTINGS_FILE_SIZE (KiBYTES(80)) -#define APP_GLANCE_DB_GLANCE_MAX_SIZE \ - (sizeof(SerializedAppGlanceHeader) + \ - (APP_GLANCE_DB_SLICE_MAX_SIZE * APP_GLANCE_DB_MAX_SLICES_PER_GLANCE)) +#define APP_GLANCE_DB_GLANCE_MAX_SIZE \ + (sizeof(SerializedAppGlanceHeader) + \ + (APP_GLANCE_DB_SLICE_MAX_SIZE * APP_GLANCE_DB_MAX_SLICES_PER_GLANCE)) #define APP_GLANCE_DB_MAX_USED_SIZE \ - (APP_GLANCE_DB_GLANCE_MAX_SIZE * APP_GLANCE_DB_MAX_NUM_APP_GLANCES) + (APP_GLANCE_DB_GLANCE_MAX_SIZE * APP_GLANCE_DB_MAX_NUM_APP_GLANCES) _Static_assert(APP_GLANCE_DB_MAX_USED_SIZE <= SETTINGS_FILE_SIZE, "AppGlanceDB is too small!"); @@ -79,9 +79,8 @@ static bool prv_is_icon_and_subtitle_slice_attribute_list_valid(const AttributeL static void prv_init_icon_and_subtitle_slice_from_attr_list(const AttributeList *attr_list, AppGlanceSliceInternal *slice_out) { - slice_out->icon_and_subtitle.icon_resource_id = attribute_get_uint32(attr_list, - AttributeIdIcon, - INVALID_RESOURCE); + slice_out->icon_and_subtitle.icon_resource_id = + attribute_get_uint32(attr_list, AttributeIdIcon, INVALID_RESOURCE); strncpy(slice_out->icon_and_subtitle.template_string, attribute_get_string(attr_list, AttributeIdSubtitleTemplateString, NULL), ATTRIBUTE_APP_GLANCE_SUBTITLE_MAX_LEN + 1); @@ -101,11 +100,11 @@ static void prv_init_attribute_list_from_icon_and_subtitle_slice( //! Add new entries to this array as we introduce new slice types static const SliceTypeImplementation s_slice_type_impls[AppGlanceSliceTypeCount] = { - [AppGlanceSliceType_IconAndSubtitle] = { - .is_attr_list_valid = prv_is_icon_and_subtitle_slice_attribute_list_valid, - .init_slice_from_attr_list = prv_init_icon_and_subtitle_slice_from_attr_list, - .init_attr_list_from_slice = prv_init_attribute_list_from_icon_and_subtitle_slice, - }, + [AppGlanceSliceType_IconAndSubtitle] = { + .is_attr_list_valid = prv_is_icon_and_subtitle_slice_attribute_list_valid, + .init_slice_from_attr_list = prv_init_icon_and_subtitle_slice_from_attr_list, + .init_attr_list_from_slice = prv_init_attribute_list_from_icon_and_subtitle_slice, + }, }; ////////////////////////////////// @@ -196,23 +195,23 @@ static bool prv_deserialize_attribute_list(const SerializedAppGlanceSliceHeader // If there aren't any attributes, set `attr_list_out` to be an empty AttributeList and return // true because technically we did successfully deserialize the AttributeList if (!num_attributes) { - *attr_list_out = (AttributeList) {}; + *attr_list_out = (AttributeList){}; *attr_list_data_buffer_out = NULL; return true; } - const uint8_t * const serialized_attr_list_start = serialized_slice->data; - const uint8_t * const serialized_attr_list_end = + const uint8_t *const serialized_attr_list_start = serialized_slice->data; + const uint8_t *const serialized_attr_list_end = serialized_attr_list_start + serialized_slice->total_size; // Get the buffer size needed for the attributes we're going to deserialize const uint8_t *buffer_size_cursor = serialized_attr_list_start; - const int32_t buffer_size = - attribute_get_buffer_size_for_serialized_attributes(num_attributes, &buffer_size_cursor, - serialized_attr_list_end); + const int32_t buffer_size = attribute_get_buffer_size_for_serialized_attributes( + num_attributes, &buffer_size_cursor, serialized_attr_list_end); if (buffer_size < 0) { - PBL_LOG_WRN("Failed to measure the buffer size required for deserializing an AttributeList from a " - "serialized slice"); + PBL_LOG_WRN( + "Failed to measure the buffer size required for deserializing an AttributeList from a " + "serialized slice"); return false; } @@ -220,8 +219,9 @@ static bool prv_deserialize_attribute_list(const SerializedAppGlanceSliceHeader // Allocate buffer for the data attached to the attributes *attr_list_data_buffer_out = kernel_zalloc(buffer_size); if (!*attr_list_data_buffer_out) { - PBL_LOG_ERR("Failed to alloc memory for the Attributes' data buffer while deserializing an " - "AttributeList from a serialized slice"); + PBL_LOG_ERR( + "Failed to alloc memory for the Attributes' data buffer while deserializing an " + "AttributeList from a serialized slice"); return false; } } else { @@ -235,8 +235,9 @@ static bool prv_deserialize_attribute_list(const SerializedAppGlanceSliceHeader // client calling `attribute_list_destroy_list()` on `attr_list_out` Attribute *attribute_buffer = kernel_zalloc(num_attributes * sizeof(*attribute_buffer)); if (!attribute_buffer) { - PBL_LOG_ERR("Failed to alloc memory for the buffer of Attribute's while deserializing an " - "AttributeList from a serialized slice"); + PBL_LOG_ERR( + "Failed to alloc memory for the buffer of Attribute's while deserializing an " + "AttributeList from a serialized slice"); // Free the `*attr_list_data_buffer_out` we might have allocated above kernel_free(*attr_list_data_buffer_out); return false; @@ -244,19 +245,17 @@ static bool prv_deserialize_attribute_list(const SerializedAppGlanceSliceHeader // Setup the arguments for `attribute_deserialize_list()` char *attribute_data_buffer_pointer = *attr_list_data_buffer_out; - char * const attribute_data_buffer_end = attribute_data_buffer_pointer + buffer_size; - *attr_list_out = (AttributeList) { - .num_attributes = num_attributes, - .attributes = attribute_buffer, + char *const attribute_data_buffer_end = attribute_data_buffer_pointer + buffer_size; + *attr_list_out = (AttributeList){ + .num_attributes = num_attributes, + .attributes = attribute_buffer, }; const uint8_t *deserialization_cursor = serialized_attr_list_start; // Try to deserialize the AttributeList - const bool was_attr_list_deserialized = attribute_deserialize_list(&attribute_data_buffer_pointer, - attribute_data_buffer_end, - &deserialization_cursor, - serialized_attr_list_end, - *attr_list_out); + const bool was_attr_list_deserialized = + attribute_deserialize_list(&attribute_data_buffer_pointer, attribute_data_buffer_end, + &deserialization_cursor, serialized_attr_list_end, *attr_list_out); if (!was_attr_list_deserialized) { kernel_free(attribute_buffer); kernel_free(*attr_list_data_buffer_out); @@ -293,10 +292,10 @@ static bool prv_deserialize_slice(SerializedAppGlanceSliceHeader *serialized_sli const unsigned int current_slice_index = glance_out->num_slices; AppGlanceSliceInternal *current_slice_out = &glance_out->slices[current_slice_index]; // Note that we default the expiration time to "never expire" if one was not provided - *current_slice_out = (AppGlanceSliceInternal) { - .expiration_time = attribute_get_uint32(&attr_list, AttributeIdTimestamp, - APP_GLANCE_SLICE_NO_EXPIRATION), - .type = (AppGlanceSliceType)serialized_slice->type, + *current_slice_out = (AppGlanceSliceInternal){ + .expiration_time = + attribute_get_uint32(&attr_list, AttributeIdTimestamp, APP_GLANCE_SLICE_NO_EXPIRATION), + .type = (AppGlanceSliceType)serialized_slice->type, }; // Copy type-specific fields from the serialized slice to the output glance's slice s_slice_type_impls[serialized_slice->type].init_slice_from_attr_list(&attr_list, @@ -319,14 +318,14 @@ static status_t prv_deserialize_glance(SerializedAppGlanceHeader *serialized_gla } // Zero out the output glance - *glance_out = (AppGlance) {}; + *glance_out = (AppGlance){}; // Iterate over the slices to deserialize them - SliceDeserializationIteratorContext context = (SliceDeserializationIteratorContext) { - .glance_out = glance_out, + SliceDeserializationIteratorContext context = (SliceDeserializationIteratorContext){ + .glance_out = glance_out, }; - if (!prv_slice_for_each(serialized_glance, serialized_glance_size, - prv_deserialize_slice, &context) || + if (!prv_slice_for_each(serialized_glance, serialized_glance_size, prv_deserialize_slice, + &context) || context.deserialization_failed) { return E_ERROR; } @@ -377,7 +376,7 @@ static status_t prv_serialize_glance(const AppGlance *glance, // Check the slice's type, fail the entire serialization if it's invalid if (!prv_is_slice_type_valid(current_slice->type)) { PBL_LOG_WRN("Tried to serialize a glance containing a slice with invalid type: %d", - current_slice->type); + current_slice->type); rv = E_INVALID_ARGUMENT; goto cleanup; } @@ -404,9 +403,9 @@ static status_t prv_serialize_glance(const AppGlance *glance, } // Populate the header of the serialized glance - *serialized_glance = (SerializedAppGlanceHeader) { - .version = APP_GLANCE_DB_CURRENT_VERSION, - .creation_time = (uint32_t)rtc_get_time(), + *serialized_glance = (SerializedAppGlanceHeader){ + .version = APP_GLANCE_DB_CURRENT_VERSION, + .creation_time = (uint32_t)rtc_get_time(), }; uint8_t *glance_buffer_start = (uint8_t *)serialized_glance; @@ -429,10 +428,10 @@ static status_t prv_serialize_glance(const AppGlance *glance, // Populate the serialized slice header SerializedAppGlanceSliceHeader *serialized_slice_header = (SerializedAppGlanceSliceHeader *)glance_buffer_cursor; - *serialized_slice_header = (SerializedAppGlanceSliceHeader) { - .type = current_slice->type, - .total_size = serialized_slice_total_size, - .num_attributes = attr_list->num_attributes, + *serialized_slice_header = (SerializedAppGlanceSliceHeader){ + .type = current_slice->type, + .total_size = serialized_slice_total_size, + .num_attributes = attr_list->num_attributes, }; // Serialize the slice's attribute list @@ -467,8 +466,7 @@ static status_t prv_serialize_glance(const AppGlance *glance, ////////////////////////////////// static bool prv_is_serialized_slice_valid(const SerializedAppGlanceSliceHeader *serialized_slice) { - if (!serialized_slice || - !prv_is_slice_type_valid(serialized_slice->type) || + if (!serialized_slice || !prv_is_slice_type_valid(serialized_slice->type) || !WITHIN(serialized_slice->total_size, APP_GLANCE_DB_SLICE_MIN_SIZE, APP_GLANCE_DB_SLICE_MAX_SIZE)) { return false; @@ -483,8 +481,8 @@ static bool prv_is_serialized_slice_valid(const SerializedAppGlanceSliceHeader * } // Check if the AttributeList has the attributes required for the slice - const bool is_attr_list_valid = prv_is_slice_attribute_list_valid(serialized_slice->type, - &attr_list); + const bool is_attr_list_valid = + prv_is_slice_attribute_list_valid(serialized_slice->type, &attr_list); if (!is_attr_list_valid) { PBL_LOG_WRN("Serialized slice AttributeList is invalid"); } @@ -510,9 +508,9 @@ static bool prv_validate_slice(SerializedAppGlanceSliceHeader *serialized_slice, PBL_ASSERTN(validation_context); if (!prv_is_serialized_slice_valid(serialized_slice)) { - *validation_context = (SliceValidationIteratorContext) { - .is_at_least_one_slice_invalid = true, - .validated_size = 0, + *validation_context = (SliceValidationIteratorContext){ + .is_at_least_one_slice_invalid = true, + .validated_size = 0, }; return false; } @@ -583,9 +581,9 @@ status_t app_glance_db_read_creation_time(const Uuid *uuid, time_t *time_out) { } SerializedAppGlanceHeader serialized_glance_header = {}; - const status_t rv = app_glance_db_read((uint8_t *)uuid, UUID_SIZE, - (uint8_t *)&serialized_glance_header, - sizeof(serialized_glance_header)); + const status_t rv = + app_glance_db_read((uint8_t *)uuid, UUID_SIZE, (uint8_t *)&serialized_glance_header, + sizeof(serialized_glance_header)); if (rv == S_SUCCESS) { *time_out = serialized_glance_header.creation_time; } @@ -604,9 +602,8 @@ status_t app_glance_db_delete_glance(const Uuid *uuid) { static status_t prv_lock_mutex_and_open_file(void) { pbl_mutex_lock(&s_app_glance_db.mutex, PBL_FOREVER); - const status_t rv = settings_file_open_growable(&s_app_glance_db.settings_file, - SETTINGS_FILE_NAME, SETTINGS_FILE_SIZE, - KiBYTES(4)); + const status_t rv = settings_file_open_growable( + &s_app_glance_db.settings_file, SETTINGS_FILE_NAME, SETTINGS_FILE_SIZE, KiBYTES(4)); if (rv != S_SUCCESS) { pbl_mutex_unlock(&s_app_glance_db.mutex); } @@ -645,13 +642,15 @@ status_t app_glance_db_compact(void) { } static status_t prv_validate_glance(const Uuid *app_uuid, - const SerializedAppGlanceHeader *serialized_glance, size_t *len) { + const SerializedAppGlanceHeader *serialized_glance, + size_t *len) { // Change this block if we support multiple app glance versions in the future // For now report an error if the glance's version isn't the current database version if (serialized_glance->version != APP_GLANCE_DB_CURRENT_VERSION) { - PBL_LOG_WRN("Tried to insert AppGlanceDB entry with invalid version!" - " Entry version: %"PRIu8", AppGlanceDB version: %u", - serialized_glance->version, APP_GLANCE_DB_CURRENT_VERSION); + PBL_LOG_WRN( + "Tried to insert AppGlanceDB entry with invalid version!" + " Entry version: %" PRIu8 ", AppGlanceDB version: %u", + serialized_glance->version, APP_GLANCE_DB_CURRENT_VERSION); return E_INVALID_ARGUMENT; } @@ -660,23 +659,25 @@ static status_t prv_validate_glance(const Uuid *app_uuid, status_t rv = app_glance_db_read((uint8_t *)app_uuid, UUID_SIZE, (uint8_t *)&existing_glance, sizeof(existing_glance)); if ((rv == S_SUCCESS) && (serialized_glance->creation_time <= existing_glance.creation_time)) { - PBL_LOG_WRN("Tried to insert AppGlanceDB entry with older creation_time (%"PRIu32")" - " than existing entry (%"PRIu32")", serialized_glance->creation_time, - existing_glance.creation_time); + PBL_LOG_WRN("Tried to insert AppGlanceDB entry with older creation_time (%" PRIu32 + ")" + " than existing entry (%" PRIu32 ")", + serialized_glance->creation_time, existing_glance.creation_time); return E_INVALID_ARGUMENT; } // Validate the slices (which also records a `validated_size` we'll use to trim excess slices) SliceValidationIteratorContext validation_context = { - // Start by taking into account the header of the serialized glance - .validated_size = sizeof(SerializedAppGlanceHeader), + // Start by taking into account the header of the serialized glance + .validated_size = sizeof(SerializedAppGlanceHeader), }; // Iteration will fail if the slices report `total_size` values that const bool iteration_succeeded = - prv_slice_for_each((SerializedAppGlanceHeader *)serialized_glance, *len, - prv_validate_slice, &validation_context); + prv_slice_for_each((SerializedAppGlanceHeader *)serialized_glance, *len, prv_validate_slice, + &validation_context); if (!iteration_succeeded) { - PBL_LOG_WRN("Tried to insert AppGlanceDB entry but failed to iterate over the serialized slices"); + PBL_LOG_WRN( + "Tried to insert AppGlanceDB entry but failed to iterate over the serialized slices"); return E_INVALID_ARGUMENT; } else if (validation_context.is_at_least_one_slice_invalid) { PBL_LOG_WRN("Tried to insert AppGlanceDB entry with at least one invalid slice"); @@ -720,15 +721,15 @@ status_t app_glance_db_insert(const uint8_t *key, int key_len, const uint8_t *va } else { // The app isn't cached. Fetch it! PebbleEvent e = { - .type = PEBBLE_APP_FETCH_REQUEST_EVENT, - .app_fetch_request = { - .id = app_id, - .with_ui = false, - .fetch_args = NULL, - }, + .type = PEBBLE_APP_FETCH_REQUEST_EVENT, + .app_fetch_request = { + .id = app_id, + .with_ui = false, + .fetch_args = NULL, + }, }; event_put(&e); - } + } } else if (!app_install_id_from_system(app_id)) { // App is not installed (not in app db and not a system app). Do not insert the glance @@ -736,7 +737,7 @@ status_t app_glance_db_insert(const uint8_t *key, int key_len, const uint8_t *va char *app_uuid_string = kernel_malloc_check(UUID_STRING_BUFFER_LENGTH); uuid_to_string(app_uuid, app_uuid_string); PBL_LOG_WRN("Attempted app glance insert for an app that's not installed. UUID: %s", - app_uuid_string); + app_uuid_string); kernel_free(app_uuid_string); return E_DOES_NOT_EXIST; } @@ -816,7 +817,6 @@ status_t app_glance_db_delete(const uint8_t *key, int key_len) { rv = S_SUCCESS; } - prv_close_file_and_unlock_mutex(); return rv; diff --git a/src/fw/services/blob_db/contacts_db.c b/src/fw/services/blob_db/contacts_db.c index 77cf63c070..31939f0b4d 100644 --- a/src/fw/services/blob_db/contacts_db.c +++ b/src/fw/services/blob_db/contacts_db.c @@ -27,10 +27,8 @@ static struct { static status_t prv_lock_mutex_and_open_file(void) { pbl_mutex_lock(&s_contacts_db.mutex, PBL_FOREVER); - status_t rv = settings_file_open_growable(&s_contacts_db.settings_file, - SETTINGS_FILE_NAME, - SETTINGS_FILE_SIZE, - KiBYTES(4)); + status_t rv = settings_file_open_growable(&s_contacts_db.settings_file, SETTINGS_FILE_NAME, + SETTINGS_FILE_SIZE, KiBYTES(4)); if (rv != S_SUCCESS) { pbl_mutex_unlock(&s_contacts_db.mutex); } @@ -54,8 +52,8 @@ int contacts_db_get_serialized_contact(const Uuid *uuid, SerializedContact **con return 0; } - const unsigned contact_len = settings_file_get_len(&s_contacts_db.settings_file, - (uint8_t *)uuid, UUID_SIZE); + const unsigned contact_len = + settings_file_get_len(&s_contacts_db.settings_file, (uint8_t *)uuid, UUID_SIZE); if (contact_len < sizeof(SerializedContact)) { prv_close_file_and_unlock_mutex(); return 0; @@ -68,7 +66,7 @@ int contacts_db_get_serialized_contact(const Uuid *uuid, SerializedContact **con } rv = settings_file_get(&s_contacts_db.settings_file, (uint8_t *)uuid, UUID_SIZE, - (void *) *contact_out, contact_len); + (void *)*contact_out, contact_len); prv_close_file_and_unlock_mutex(); if (rv != S_SUCCESS) { task_free(*contact_out); @@ -92,7 +90,7 @@ void contacts_db_init(void) { } status_t contacts_db_insert(const uint8_t *key, int key_len, const uint8_t *val, int val_len) { - if (key_len != UUID_SIZE || val_len < (int) sizeof(SerializedContact)) { + if (key_len != UUID_SIZE || val_len < (int)sizeof(SerializedContact)) { return E_INVALID_ARGUMENT; } diff --git a/src/fw/services/blob_db/endpoint.c b/src/fw/services/blob_db/endpoint.c index 1b04a87e48..22f176ea03 100644 --- a/src/fw/services/blob_db/endpoint.c +++ b/src/fw/services/blob_db/endpoint.c @@ -61,9 +61,9 @@ static const uint8_t VALUE_DATA_LENGTH = (sizeof(uint16_t) + sizeof(uint8_t)); //! Message Length Constants static const uint8_t MIN_INSERT_LENGTH = 8; -static const uint8_t MIN_INSERT_WITH_TIMESTAMP_LENGTH = 12; // + 4 bytes for timestamp +static const uint8_t MIN_INSERT_WITH_TIMESTAMP_LENGTH = 12; // + 4 bytes for timestamp static const uint8_t MIN_DELETE_LENGTH = 5; -static const uint8_t MIN_CLEAR_LENGTH = 3; +static const uint8_t MIN_CLEAR_LENGTH = 3; static bool s_bdb_accepting_messages; @@ -72,11 +72,11 @@ static void prv_send_response(CommSession *session, BlobDBToken token, BlobDBRes BlobDBToken token; BlobDBResponse result; } response = { - .token = token, - .result = result, + .token = token, + .result = result, }; - comm_session_send_data(session, BLOB_DB_ENDPOINT_ID, (uint8_t*)&response, sizeof(response), + comm_session_send_data(session, BLOB_DB_ENDPOINT_ID, (uint8_t *)&response, sizeof(response), COMM_SESSION_DEFAULT_TIMEOUT); } @@ -102,7 +102,6 @@ static BlobDBResponse prv_interpret_db_ret_val(status_t ret_val) { static const uint8_t *prv_read_ptr(const uint8_t *iter, const uint8_t *iter_end, const uint8_t **out_buf, uint16_t buf_len) { - // >= because we will be reading more bytes after this point if ((buf_len == 0) || ((iter + buf_len) > iter_end)) { PBL_LOG_WRN("BlobDB: read invalid length"); @@ -110,7 +109,7 @@ static const uint8_t *prv_read_ptr(const uint8_t *iter, const uint8_t *iter_end, } // grab pointer to start of buf - *out_buf = (uint8_t*)iter; + *out_buf = (uint8_t *)iter; iter += buf_len; return iter; @@ -118,7 +117,6 @@ static const uint8_t *prv_read_ptr(const uint8_t *iter, const uint8_t *iter_end, static const uint8_t *prv_read_key_size(const uint8_t *iter, const uint8_t *iter_end, uint8_t *out_int) { - // copy length from iter to out_len, then save a local copy of the length *out_int = *iter++; return iter; @@ -126,9 +124,8 @@ static const uint8_t *prv_read_key_size(const uint8_t *iter, const uint8_t *iter static const uint8_t *prv_read_value_size(const uint8_t *iter, const uint8_t *iter_end, uint16_t *out_int) { - // copy length from iter to out_len, then save a local copy of the length - *out_int = *(uint16_t*)iter; + *out_int = *(uint16_t *)iter; iter += sizeof(uint16_t); return iter; } @@ -138,7 +135,7 @@ static BlobDBToken prv_try_read_token(const uint8_t *data, uint32_t length) { return 0; } - return *(BlobDBToken*)data; + return *(BlobDBToken *)data; } static void prv_handle_database_insert(CommSession *session, const uint8_t *data, uint32_t length) { @@ -183,7 +180,6 @@ static void prv_handle_database_insert(CommSession *session, const uint8_t *data prv_send_response(session, token, prv_interpret_db_ret_val(ret)); } - static void prv_handle_database_insert_with_timestamp(CommSession *session, const uint8_t *data, uint32_t length) { if (length < MIN_INSERT_WITH_TIMESTAMP_LENGTH) { @@ -235,13 +231,11 @@ static void prv_handle_database_insert_with_timestamp(CommSession *session, cons } // Use timestamped insert for Settings - will reject if watch data is newer - status_t ret = settings_blob_db_insert_with_timestamp(key_bytes, key_size, - value_bytes, value_size, - (time_t)timestamp); + status_t ret = settings_blob_db_insert_with_timestamp(key_bytes, key_size, value_bytes, + value_size, (time_t)timestamp); prv_send_response(session, token, prv_interpret_db_ret_val(ret)); } - static void prv_handle_database_delete(CommSession *session, const uint8_t *data, uint32_t length) { if (length < MIN_DELETE_LENGTH) { prv_send_response(session, prv_try_read_token(data, length), BLOB_DB_INVALID_DATA); @@ -272,7 +266,6 @@ static void prv_handle_database_delete(CommSession *session, const uint8_t *data prv_send_response(session, token, prv_interpret_db_ret_val(ret)); } - static void prv_handle_database_clear(CommSession *session, const uint8_t *data, uint32_t length) { if (length < MIN_CLEAR_LENGTH) { prv_send_response(session, prv_try_read_token(data, length), BLOB_DB_INVALID_DATA); @@ -295,8 +288,8 @@ static void prv_handle_database_clear(CommSession *session, const uint8_t *data, } } -static void prv_blob_db_msg_decode_and_handle( - CommSession *session, BlobDBCommand cmd, const uint8_t *data, size_t data_length) { +static void prv_blob_db_msg_decode_and_handle(CommSession *session, BlobDBCommand cmd, + const uint8_t *data, size_t data_length) { switch (cmd) { case BLOB_DB_COMMAND_INSERT: PBL_LOG_DBG("Got INSERT"); @@ -326,7 +319,7 @@ static void prv_blob_db_msg_decode_and_handle( } } -void blob_db_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length) { +void blob_db_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length) { PBL_ASSERT_TASK(PebbleTask_KernelBackground); PBL_HEXDUMP_D(LOG_DOMAIN_BLOBDB, LOG_LEVEL_DEBUG, data, length); @@ -340,7 +333,7 @@ void blob_db_protocol_msg_callback(CommSession *session, const uint8_t* data, si } const BlobDBCommand cmd = *data; - data += sizeof(BlobDBCommand); // fwd to message contents + data += sizeof(BlobDBCommand); // fwd to message contents const size_t data_length = length - sizeof(BlobDBCommand); if (!s_bdb_accepting_messages) { diff --git a/src/fw/services/blob_db/endpoint2.c b/src/fw/services/blob_db/endpoint2.c index 30f89921d5..6a6cc60ac9 100644 --- a/src/fw/services/blob_db/endpoint2.c +++ b/src/fw/services/blob_db/endpoint2.c @@ -36,7 +36,7 @@ static const uint8_t SYNC_DONE_RESPONSE_LENGTH = 3; static bool s_b2db_accepting_messages; T_STATIC BlobDBToken prv_new_token(void) { - static BlobDBToken next_token = 1; // 0 token should be avoided + static BlobDBToken next_token = 1; // 0 token should be avoided return next_token++; } @@ -50,17 +50,15 @@ static const uint8_t *prv_read_token_and_response(const uint8_t *iter, BlobDBTok return iter; } -T_STATIC void prv_send_response(CommSession *session, uint8_t *response, - uint8_t response_length) { +T_STATIC void prv_send_response(CommSession *session, uint8_t *response, uint8_t response_length) { comm_session_send_data(session, BLOB_DB2_ENDPOINT_ID, response, response_length, COMM_SESSION_DEFAULT_TIMEOUT); } -static void prv_handle_get_dirty_databases(CommSession *session, - const uint8_t *data, +static void prv_handle_get_dirty_databases(CommSession *session, const uint8_t *data, uint32_t length) { if (length < DIRTY_DATABASES_LENGTH) { - PBL_LOG_ERR("Got a dirty databases with an invalid length: %"PRIu32"", length); + PBL_LOG_ERR("Got a dirty databases with an invalid length: %" PRIu32 "", length); return; } @@ -71,24 +69,21 @@ static void prv_handle_get_dirty_databases(CommSession *session, uint8_t num_ids; BlobDBId db_ids[NumBlobDBs]; } response = { - .cmd = BLOB_DB_COMMAND_DIRTY_DBS_RESPONSE, - .token = *(BlobDBToken *)data, - .result = BLOB_DB_SUCCESS, + .cmd = BLOB_DB_COMMAND_DIRTY_DBS_RESPONSE, + .token = *(BlobDBToken *)data, + .result = BLOB_DB_SUCCESS, }; - blob_db_get_dirty_dbs(response.db_ids, &response.num_ids); // we don't want to send the extra bytes in response.db_ids int num_empty_ids = NumBlobDBs - response.num_ids; - prv_send_response(session, (uint8_t *) &response, sizeof(response) - num_empty_ids); + prv_send_response(session, (uint8_t *)&response, sizeof(response) - num_empty_ids); } -static void prv_handle_start_sync(CommSession *session, - const uint8_t *data, - uint32_t length) { +static void prv_handle_start_sync(CommSession *session, const uint8_t *data, uint32_t length) { if (length < START_SYNC_LENGTH) { - PBL_LOG_ERR("Got a start sync with an invalid length: %"PRIu32"", length); + PBL_LOG_ERR("Got a start sync with an invalid length: %" PRIu32 "", length); return; } @@ -97,7 +92,7 @@ static void prv_handle_start_sync(CommSession *session, BlobDBToken token; BlobDBResponse result; } response = { - .cmd = BLOB_DB_COMMAND_START_SYNC_RESPONSE, + .cmd = BLOB_DB_COMMAND_START_SYNC_RESPONSE, }; BlobDBId db_id; @@ -123,8 +118,7 @@ static void prv_handle_start_sync(CommSession *session, prv_send_response(session, (uint8_t *)&response, sizeof(response)); } -static void prv_handle_wb_write_response(const uint8_t *data, - uint32_t length) { +static void prv_handle_wb_write_response(const uint8_t *data, uint32_t length) { // read token and response code BlobDBToken token; BlobDBResponse response_code; @@ -136,8 +130,8 @@ static void prv_handle_wb_write_response(const uint8_t *data, // Log rejected items but still mark synced to avoid spamming phone on every sync BlobDBDirtyItem *dirty_item = sync_session->dirty_list; char key_str[32]; - int copy_len = (dirty_item->key_len < (int)sizeof(key_str) - 1) ? - dirty_item->key_len : (int)sizeof(key_str) - 1; + int copy_len = (dirty_item->key_len < (int)sizeof(key_str) - 1) ? dirty_item->key_len + : (int)sizeof(key_str) - 1; memcpy(key_str, dirty_item->key, copy_len); key_str[copy_len] = '\0'; PBL_LOG_WRN("Writeback rejected: key=%s response=%d", key_str, response_code); @@ -149,33 +143,28 @@ static void prv_handle_wb_write_response(const uint8_t *data, } } -static void prv_handle_write_response(CommSession *session, - const uint8_t *data, - uint32_t length) { +static void prv_handle_write_response(CommSession *session, const uint8_t *data, uint32_t length) { if (length < WRITE_RESPONSE_LENGTH) { - PBL_LOG_ERR("Got a write response with an invalid length: %"PRIu32"", length); + PBL_LOG_ERR("Got a write response with an invalid length: %" PRIu32 "", length); return; } prv_handle_wb_write_response(data, length); } -static void prv_handle_wb_response(CommSession *session, - const uint8_t *data, - uint32_t length) { +static void prv_handle_wb_response(CommSession *session, const uint8_t *data, uint32_t length) { if (length < WRITEBACK_RESPONSE_LENGTH) { - PBL_LOG_ERR("Got a writeback response with an invalid length: %"PRIu32"", length); + PBL_LOG_ERR("Got a writeback response with an invalid length: %" PRIu32 "", length); return; } prv_handle_wb_write_response(data, length); } -static void prv_handle_sync_done_response(CommSession *session, - const uint8_t *data, +static void prv_handle_sync_done_response(CommSession *session, const uint8_t *data, uint32_t length) { if (length < SYNC_DONE_RESPONSE_LENGTH) { - PBL_LOG_ERR("Got a sync done response with an invalid length: %"PRIu32"", length); + PBL_LOG_ERR("Got a sync done response with an invalid length: %" PRIu32 "", length); return; } @@ -198,21 +187,20 @@ static void prv_handle_version(CommSession *session, const uint8_t *data, uint32 BlobDBResponse result; uint8_t version; } response = { - .command = BLOB_DB_COMMAND_VERSION_RESPONSE, - .token = token, - .result = BLOB_DB_SUCCESS, - .version = BLOB_DB_PROTOCOL_VERSION, + .command = BLOB_DB_COMMAND_VERSION_RESPONSE, + .token = token, + .result = BLOB_DB_SUCCESS, + .version = BLOB_DB_PROTOCOL_VERSION, }; prv_send_response(session, (uint8_t *)&response, sizeof(response)); } - static void prv_handle_dirty_all(CommSession *session, const uint8_t *data, uint32_t length) { // Message format: [token (2 bytes)] [db_id (1 byte)] static const uint8_t MIN_DIRTY_ALL_LENGTH = sizeof(BlobDBToken) + sizeof(BlobDBId); if (length < MIN_DIRTY_ALL_LENGTH) { - PBL_LOG_ERR("Got a dirty_all with an invalid length: %"PRIu32"", length); + PBL_LOG_ERR("Got a dirty_all with an invalid length: %" PRIu32 "", length); return; } @@ -225,8 +213,8 @@ static void prv_handle_dirty_all(CommSession *session, const uint8_t *data, uint BlobDBToken token; BlobDBResponse result; } response = { - .cmd = BLOB_DB_COMMAND_DIRTY_ALL | RESPONSE_MASK, - .token = token, + .cmd = BLOB_DB_COMMAND_DIRTY_ALL | RESPONSE_MASK, + .token = token, }; // Currently only Settings BlobDB supports mark_all_dirty @@ -241,26 +229,23 @@ static void prv_handle_dirty_all(CommSession *session, const uint8_t *data, uint prv_send_response(session, (uint8_t *)&response, sizeof(response)); } - -static void prv_send_error_response(CommSession *session, - BlobDBCommand cmd, - const uint8_t *data, +static void prv_send_error_response(CommSession *session, BlobDBCommand cmd, const uint8_t *data, BlobDBResponse response_code) { struct PACKED ErrorResponseMsg { BlobDBCommand cmd; BlobDBToken token; BlobDBResponse result; } response = { - .cmd = cmd | RESPONSE_MASK, - .token = *(BlobDBToken *)data, - .result = response_code, + .cmd = cmd | RESPONSE_MASK, + .token = *(BlobDBToken *)data, + .result = response_code, }; prv_send_response(session, (uint8_t *)&response, sizeof(response)); } -static void prv_blob_db_msg_decode_and_handle( - CommSession *session, BlobDBCommand cmd, const uint8_t *data, size_t data_length) { +static void prv_blob_db_msg_decode_and_handle(CommSession *session, BlobDBCommand cmd, + const uint8_t *data, size_t data_length) { switch (cmd) { case BLOB_DB_COMMAND_DIRTY_DBS: PBL_LOG_DBG("Got DIRTY DBs"); @@ -297,12 +282,8 @@ static void prv_blob_db_msg_decode_and_handle( } } -static uint16_t prv_send_write_writeback(BlobDBCommand cmd, - BlobDBId db_id, - time_t last_updated, - const uint8_t *key, - int key_len, - const uint8_t *val, +static uint16_t prv_send_write_writeback(BlobDBCommand cmd, BlobDBId db_id, time_t last_updated, + const uint8_t *key, int key_len, const uint8_t *val, int val_len) { struct PACKED WritebackMetadata { BlobDBCommand cmd; @@ -310,22 +291,18 @@ static uint16_t prv_send_write_writeback(BlobDBCommand cmd, BlobDBId db_id; uint32_t last_updated; } writeback_metadata = { - .cmd = cmd, - .token = prv_new_token(), - .db_id = db_id, - .last_updated = last_updated, + .cmd = cmd, + .token = prv_new_token(), + .db_id = db_id, + .last_updated = last_updated, }; - size_t writeback_length = sizeof(writeback_metadata) + - sizeof(uint8_t) /* key length size*/ + - key_len + - sizeof(uint16_t) /* val length size */ + - val_len; + size_t writeback_length = sizeof(writeback_metadata) + sizeof(uint8_t) /* key length size*/ + + key_len + sizeof(uint16_t) /* val length size */ + val_len; - SendBuffer *sb = comm_session_send_buffer_begin_write(comm_session_get_system_session(), - BLOB_DB2_ENDPOINT_ID, - writeback_length, - COMM_SESSION_DEFAULT_TIMEOUT); + SendBuffer *sb = + comm_session_send_buffer_begin_write(comm_session_get_system_session(), BLOB_DB2_ENDPOINT_ID, + writeback_length, COMM_SESSION_DEFAULT_TIMEOUT); if (sb) { comm_session_send_buffer_write(sb, (uint8_t *)&writeback_metadata, sizeof(writeback_metadata)); comm_session_send_buffer_write(sb, (uint8_t *)&key_len, sizeof(uint8_t)); @@ -338,26 +315,18 @@ static uint16_t prv_send_write_writeback(BlobDBCommand cmd, return writeback_metadata.token; } -BlobDBToken blob_db_endpoint_send_write(BlobDBId db_id, - time_t last_updated, - const void *key, - int key_len, - const void *val, - int val_len) { - BlobDBToken token = prv_send_write_writeback(BLOB_DB_COMMAND_WRITE, db_id, last_updated, - key, key_len, val, val_len); +BlobDBToken blob_db_endpoint_send_write(BlobDBId db_id, time_t last_updated, const void *key, + int key_len, const void *val, int val_len) { + BlobDBToken token = prv_send_write_writeback(BLOB_DB_COMMAND_WRITE, db_id, last_updated, key, + key_len, val, val_len); return token; } -BlobDBToken blob_db_endpoint_send_writeback(BlobDBId db_id, - time_t last_updated, - const void *key, - int key_len, - const void *val, - int val_len) { - BlobDBToken token = prv_send_write_writeback(BLOB_DB_COMMAND_WRITEBACK, db_id, last_updated, - key, key_len, val, val_len); +BlobDBToken blob_db_endpoint_send_writeback(BlobDBId db_id, time_t last_updated, const void *key, + int key_len, const void *val, int val_len) { + BlobDBToken token = prv_send_write_writeback(BLOB_DB_COMMAND_WRITEBACK, db_id, last_updated, key, + key_len, val, val_len); return token; } @@ -368,21 +337,18 @@ void blob_db_endpoint_send_sync_done(BlobDBId db_id) { BlobDBToken token; BlobDBId db_id; } msg = { - .cmd = BLOB_DB_COMMAND_SYNC_DONE, - .token = prv_new_token(), - .db_id = db_id, + .cmd = BLOB_DB_COMMAND_SYNC_DONE, + .token = prv_new_token(), + .db_id = db_id, }; PBL_LOG_DBG("Sending sync done for db: %d", db_id); - comm_session_send_data(comm_session_get_system_session(), - BLOB_DB2_ENDPOINT_ID, - (uint8_t *)&msg, - sizeof(msg), - COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(comm_session_get_system_session(), BLOB_DB2_ENDPOINT_ID, (uint8_t *)&msg, + sizeof(msg), COMM_SESSION_DEFAULT_TIMEOUT); } -void blob_db2_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length) { +void blob_db2_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length) { PBL_ASSERT_TASK(PebbleTask_KernelBackground); // Each BlobDB message is required to have at least a Command and a Token @@ -394,7 +360,7 @@ void blob_db2_protocol_msg_callback(CommSession *session, const uint8_t* data, s } const BlobDBCommand cmd = *data; - data += sizeof(BlobDBCommand); // fwd to message contents + data += sizeof(BlobDBCommand); // fwd to message contents const size_t data_length = length - sizeof(BlobDBCommand); if (!s_b2db_accepting_messages) { diff --git a/src/fw/services/blob_db/endpoint_private.c b/src/fw/services/blob_db/endpoint_private.c index cb563b4c35..7572bfa760 100644 --- a/src/fw/services/blob_db/endpoint_private.c +++ b/src/fw/services/blob_db/endpoint_private.c @@ -16,7 +16,7 @@ void blob_db_enabled(bool enabled) { const uint8_t *endpoint_private_read_token_db_id(const uint8_t *iter, BlobDBToken *out_token, BlobDBId *out_db_id) { // read token - *out_token = *(BlobDBToken*)iter; + *out_token = *(BlobDBToken *)iter; iter += sizeof(BlobDBToken); // read database id *out_db_id = *iter; diff --git a/src/fw/services/blob_db/health_db.c b/src/fw/services/blob_db/health_db.c index aa421dee13..f596b1866c 100644 --- a/src/fw/services/blob_db/health_db.c +++ b/src/fw/services/blob_db/health_db.c @@ -29,19 +29,15 @@ static PBL_MUTEX_DEFINE(s_mutex); #define MOVEMENT_DATA_KEY_SUFFIX "_movementData" #define SLEEP_DATA_KEY_SUFFIX "_sleepData" -#define STEP_TYPICALS_KEY_SUFFIX "_steps" // Not the best suffix, but we are stuck with it now... +#define STEP_TYPICALS_KEY_SUFFIX "_steps" // Not the best suffix, but we are stuck with it now... #define STEP_AVERAGE_KEY_SUFFIX "_dailySteps" #define SLEEP_AVERAGE_KEY_SUFFIX "_sleepDuration" #define HR_ZONE_DATA_KEY_SUFFIX "_heartRateZoneData" static const char *WEEKDAY_NAMES[] = { - [Sunday] = "sunday", - [Monday] = "monday", - [Tuesday] = "tuesday", - [Wednesday] = "wednesday", - [Thursday] = "thursday", - [Friday] = "friday", - [Saturday] = "saturday", + [Sunday] = "sunday", [Monday] = "monday", [Tuesday] = "tuesday", + [Wednesday] = "wednesday", [Thursday] = "thursday", [Friday] = "friday", + [Saturday] = "saturday", }; #define CURRENT_MOVEMENT_DATA_VERSION 1 @@ -87,12 +83,11 @@ _Static_assert(offsetof(HeartRateZoneData, version) == 0, _Static_assert(sizeof(HeartRateZoneData) % sizeof(uint32_t) == 0, "HeartRateZoneData size is invalid"); - static status_t prv_file_open_and_lock(SettingsFile *file) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); - status_t rv = settings_file_open_growable(file, HEALTH_DB_FILE_NAME, HEALTH_DB_MAX_SIZE, - KiBYTES(8)); + status_t rv = + settings_file_open_growable(file, HEALTH_DB_FILE_NAME, HEALTH_DB_MAX_SIZE, KiBYTES(8)); if (rv != S_SUCCESS) { PBL_LOG_ERR("Failed to open settings file"); pbl_mutex_unlock(&s_mutex); @@ -107,14 +102,11 @@ static void prv_file_close_and_unlock(SettingsFile *file) { } static bool prv_key_is_valid(const uint8_t *key, int key_len) { - return key_len != 0 && // invalid length - strchr((const char *)key, '_') != NULL; // invalid key + return key_len != 0 && // invalid length + strchr((const char *)key, '_') != NULL; // invalid key } -static bool prv_value_is_valid(const uint8_t *key, - int key_len, - const uint8_t *val, - int val_len) { +static bool prv_value_is_valid(const uint8_t *key, int key_len, const uint8_t *val, int val_len) { return val_len && val_len % sizeof(uint32_t) == 0; } @@ -131,11 +123,8 @@ static bool prv_is_last_processed_timestamp_valid(time_t timestamp) { return true; } - //! Tell the activity service that it needs to update its "current" values (non typicals / averages) -static void prv_notify_health_listeners(const char *key, - int key_len, - const uint8_t *val, +static void prv_notify_health_listeners(const char *key, int key_len, const uint8_t *val, int val_len) { DayInWeek wday; for (wday = 0; wday < DAYS_PER_WEEK; wday++) { @@ -151,8 +140,8 @@ static void prv_notify_health_listeners(const char *key, if (!prv_is_last_processed_timestamp_valid(data->last_processed_timestamp)) { return; } - PBL_LOG_DBG("Got MovementData for wday: %d, cur_wday: %d, steps: %"PRIu32"", - wday, cur_wday, data->steps); + PBL_LOG_DBG("Got MovementData for wday: %d, cur_wday: %d, steps: %" PRIu32 "", wday, cur_wday, + data->steps); activity_metrics_prv_set_metric(ActivityMetricStepCount, wday, data->steps); activity_metrics_prv_set_metric(ActivityMetricActiveSeconds, wday, data->active_seconds); activity_metrics_prv_set_metric(ActivityMetricRestingKCalories, wday, data->resting_kcalories); @@ -163,8 +152,8 @@ static void prv_notify_health_listeners(const char *key, if (!prv_is_last_processed_timestamp_valid(data->last_processed_timestamp)) { return; } - PBL_LOG_DBG("Got SleepData for wday: %d, cur_wday: %d, sleep: %"PRIu32"", - wday, cur_wday, data->sleep_duration); + PBL_LOG_DBG("Got SleepData for wday: %d, cur_wday: %d, sleep: %" PRIu32 "", wday, cur_wday, + data->sleep_duration); activity_metrics_prv_set_metric(ActivityMetricSleepTotalSeconds, wday, data->sleep_duration); activity_metrics_prv_set_metric(ActivityMetricSleepRestfulSeconds, wday, data->deep_sleep_duration); @@ -179,8 +168,8 @@ static void prv_notify_health_listeners(const char *key, if (data->num_zones != HRZone_Max) { return; } - PBL_LOG_DBG("Got HeartRateZoneData for wday: %d, cur_wday: %d, zone1: %"PRIu32"", - wday, cur_wday, data->minutes_in_zone[0]); + PBL_LOG_DBG("Got HeartRateZoneData for wday: %d, cur_wday: %d, zone1: %" PRIu32 "", wday, + cur_wday, data->minutes_in_zone[0]); activity_metrics_prv_set_metric(ActivityMetricHeartRateZone1Minutes, wday, data->minutes_in_zone[0]); activity_metrics_prv_set_metric(ActivityMetricHeartRateZone2Minutes, wday, @@ -190,19 +179,15 @@ static void prv_notify_health_listeners(const char *key, } } - ///////////////////////// // Public API ///////////////////////// -bool health_db_get_typical_value(ActivityMetric metric, - DayInWeek day, - int32_t *value_out) { +bool health_db_get_typical_value(ActivityMetric metric, DayInWeek day, int32_t *value_out) { char key[HEALTH_DB_MAX_KEY_LEN]; snprintf(key, HEALTH_DB_MAX_KEY_LEN, "%s%s", WEEKDAY_NAMES[day], SLEEP_DATA_KEY_SUFFIX); const int key_len = strlen(key); - SettingsFile file; if (prv_file_open_and_lock(&file) != S_SUCCESS) { return false; @@ -255,8 +240,7 @@ bool health_db_get_typical_value(ActivityMetric metric, return true; } -bool health_db_get_monthly_average_value(ActivityMetric metric, - int32_t *value_out) { +bool health_db_get_monthly_average_value(ActivityMetric metric, int32_t *value_out) { if (metric != ActivityMetricStepCount && metric != ActivityMetricSleepTotalSeconds) { PBL_LOG_WRN("Health DB doesn't store an average for metric %d", metric); return false; @@ -268,8 +252,9 @@ bool health_db_get_monthly_average_value(ActivityMetric metric, } char key[HEALTH_DB_MAX_KEY_LEN]; - snprintf(key, HEALTH_DB_MAX_KEY_LEN, "average%s", (metric == ActivityMetricStepCount) ? - STEP_AVERAGE_KEY_SUFFIX : SLEEP_AVERAGE_KEY_SUFFIX); + snprintf( + key, HEALTH_DB_MAX_KEY_LEN, "average%s", + (metric == ActivityMetricStepCount) ? STEP_AVERAGE_KEY_SUFFIX : SLEEP_AVERAGE_KEY_SUFFIX); const int key_len = strlen(key); status_t s = settings_file_get(&file, key, key_len, value_out, sizeof(uint32_t)); @@ -284,8 +269,9 @@ bool health_db_get_typical_step_averages(DayInWeek day, ActivityMetricAverages * } // Default results - _Static_assert(((ACTIVITY_METRIC_AVERAGES_UNKNOWN >> 8) & 0xFF) - == (ACTIVITY_METRIC_AVERAGES_UNKNOWN & 0xFF), "Cannot use memset"); + _Static_assert( + ((ACTIVITY_METRIC_AVERAGES_UNKNOWN >> 8) & 0xFF) == (ACTIVITY_METRIC_AVERAGES_UNKNOWN & 0xFF), + "Cannot use memset"); memset(averages->average, ACTIVITY_METRIC_AVERAGES_UNKNOWN & 0xFF, sizeof(averages->average)); SettingsFile file; @@ -304,15 +290,14 @@ bool health_db_get_typical_step_averages(DayInWeek day, ActivityMetricAverages * } //! For test / debug purposes only -bool health_db_set_typical_values(ActivityMetric metric, - DayInWeek day, - uint16_t *values, +bool health_db_set_typical_values(ActivityMetric metric, DayInWeek day, uint16_t *values, int num_values) { char key[HEALTH_DB_MAX_KEY_LEN]; snprintf(key, HEALTH_DB_MAX_KEY_LEN, "%s%s", WEEKDAY_NAMES[day], STEP_TYPICALS_KEY_SUFFIX); const int key_len = strlen(key); - return health_db_insert((uint8_t *)key, key_len, (uint8_t*)values, num_values * sizeof(uint16_t)); + return health_db_insert((uint8_t *)key, key_len, (uint8_t *)values, + num_values * sizeof(uint16_t)); } ///////////////////////// @@ -431,4 +416,3 @@ status_t health_db_compact(void) { prv_file_close_and_unlock(&file); return rv; } - diff --git a/src/fw/services/blob_db/ios_notif_pref_db.c b/src/fw/services/blob_db/ios_notif_pref_db.c index 28e5ce583b..9aa460cd83 100644 --- a/src/fw/services/blob_db/ios_notif_pref_db.c +++ b/src/fw/services/blob_db/ios_notif_pref_db.c @@ -22,12 +22,11 @@ PBL_LOG_MODULE_DECLARE(service_blob_db, CONFIG_SERVICE_BLOB_DB_LOG_LEVEL); T_STATIC const char *iOS_NOTIF_PREF_DB_FILE_NAME = "iosnotifprefdb"; T_STATIC const int iOS_NOTIF_PREF_MAX_SIZE = KiBYTES(32); - typedef struct PACKED { uint32_t flags; uint8_t num_attributes; uint8_t num_actions; - uint8_t data[]; // Serialized attributes followed by serialized actions + uint8_t data[]; // Serialized attributes followed by serialized actions } SerializedNotifPrefs; static PBL_MUTEX_DEFINE(s_mutex); @@ -61,7 +60,6 @@ static status_t prv_save_serialized_prefs(SettingsFile *file, const void *key, s //! Assumes the file is opened and locked static status_t prv_read_serialized_prefs(SettingsFile *file, const void *key, size_t key_len, void *val_out, size_t val_out_len) { - status_t rv = settings_file_get(file, key, key_len, val_out, val_out_len); // The flags for inverted before writing, revert them back @@ -84,7 +82,7 @@ static int prv_get_serialized_prefs(SettingsFile *file, const uint8_t *app_id, i return 0; } - status_t rv = prv_read_serialized_prefs(file, app_id, key_len, (void *) *prefs_out, prefs_len); + status_t rv = prv_read_serialized_prefs(file, app_id, key_len, (void *)*prefs_out, prefs_len); if (rv != S_SUCCESS) { kernel_free(*prefs_out); return 0; @@ -97,7 +95,7 @@ static void prv_free_serialized_prefs(SerializedNotifPrefs *prefs) { kernel_free(prefs); } -iOSNotifPrefs* ios_notif_pref_db_get_prefs(const uint8_t *app_id, int key_len) { +iOSNotifPrefs *ios_notif_pref_db_get_prefs(const uint8_t *app_id, int key_len) { SettingsFile file; status_t rv = prv_file_open_and_lock(&file); if (rv != S_SUCCESS) { @@ -114,8 +112,8 @@ iOSNotifPrefs* ios_notif_pref_db_get_prefs(const uint8_t *app_id, int key_len) { } SerializedNotifPrefs *serialized_prefs = NULL; - const int serialized_prefs_data_len = prv_get_serialized_prefs(&file, app_id, key_len, - &serialized_prefs); + const int serialized_prefs_data_len = + prv_get_serialized_prefs(&file, app_id, key_len, &serialized_prefs); prv_file_close_and_unlock(&file); if (!serialized_prefs) { @@ -125,12 +123,9 @@ iOSNotifPrefs* ios_notif_pref_db_get_prefs(const uint8_t *app_id, int key_len) { size_t string_alloc_size; uint8_t attributes_per_action[serialized_prefs->num_actions]; - bool r = attributes_actions_parse_serial_data(serialized_prefs->num_attributes, - serialized_prefs->num_actions, - serialized_prefs->data, - serialized_prefs_data_len, - &string_alloc_size, - attributes_per_action); + bool r = attributes_actions_parse_serial_data( + serialized_prefs->num_attributes, serialized_prefs->num_actions, serialized_prefs->data, + serialized_prefs_data_len, &string_alloc_size, attributes_per_action); if (!r) { char buffer[key_len + 1]; strncpy(buffer, (const char *)app_id, key_len); @@ -140,27 +135,21 @@ iOSNotifPrefs* ios_notif_pref_db_get_prefs(const uint8_t *app_id, int key_len) { return NULL; } - const size_t alloc_size = - attributes_actions_get_required_buffer_size(serialized_prefs->num_attributes, - serialized_prefs->num_actions, - attributes_per_action, - string_alloc_size); + const size_t alloc_size = attributes_actions_get_required_buffer_size( + serialized_prefs->num_attributes, serialized_prefs->num_actions, attributes_per_action, + string_alloc_size); iOSNotifPrefs *notif_prefs = kernel_zalloc_check(sizeof(iOSNotifPrefs) + alloc_size); uint8_t *buffer = (uint8_t *)notif_prefs + sizeof(iOSNotifPrefs); uint8_t *const buf_end = buffer + alloc_size; - attributes_actions_init(¬if_prefs->attr_list, ¬if_prefs->action_group, - &buffer, serialized_prefs->num_attributes, serialized_prefs->num_actions, + attributes_actions_init(¬if_prefs->attr_list, ¬if_prefs->action_group, &buffer, + serialized_prefs->num_attributes, serialized_prefs->num_actions, attributes_per_action); - if (!attributes_actions_deserialize(¬if_prefs->attr_list, - ¬if_prefs->action_group, - buffer, - buf_end, - serialized_prefs->data, - serialized_prefs_data_len)) { + if (!attributes_actions_deserialize(¬if_prefs->attr_list, ¬if_prefs->action_group, buffer, + buf_end, serialized_prefs->data, serialized_prefs_data_len)) { char buffer[key_len + 1]; strncpy(buffer, (const char *)app_id, key_len); buffer[key_len] = '\0'; @@ -189,9 +178,9 @@ status_t ios_notif_pref_db_store_prefs(const uint8_t *app_id, int length, Attrib size_t payload_size = attributes_actions_get_serialized_payload_size(attr_list, action_group); size_t serialized_prefs_size = sizeof(SerializedNotifPrefs) + payload_size; SerializedNotifPrefs *new_prefs = kernel_zalloc_check(serialized_prefs_size); - *new_prefs = (SerializedNotifPrefs) { - .num_attributes = attr_list ? attr_list->num_attributes : 0, - .num_actions = action_group ? action_group->num_actions : 0, + *new_prefs = (SerializedNotifPrefs){ + .num_attributes = attr_list ? attr_list->num_attributes : 0, + .num_actions = action_group ? action_group->num_actions : 0, }; attributes_actions_serialize_payload(attr_list, action_group, new_prefs->data, payload_size); @@ -214,9 +203,9 @@ status_t ios_notif_pref_db_store_prefs(const uint8_t *app_id, int length, Attrib void ios_notif_pref_db_init(void) { } -status_t ios_notif_pref_db_insert(const uint8_t *key, int key_len, - const uint8_t *val, int val_len) { - if (key_len == 0 || val_len == 0 || val_len < (int) sizeof(SerializedNotifPrefs)) { +status_t ios_notif_pref_db_insert(const uint8_t *key, int key_len, const uint8_t *val, + int val_len) { + if (key_len == 0 || val_len == 0 || val_len < (int)sizeof(SerializedNotifPrefs)) { return E_INVALID_ARGUMENT; } @@ -260,8 +249,8 @@ int ios_notif_pref_db_get_len(const uint8_t *key, int key_len) { return length; } -status_t ios_notif_pref_db_read(const uint8_t *key, int key_len, - uint8_t *val_out, int val_out_len) { +status_t ios_notif_pref_db_read(const uint8_t *key, int key_len, uint8_t *val_out, + int val_out_len) { SettingsFile file; status_t rv = prv_file_open_and_lock(&file); if (rv != S_SUCCESS) { @@ -326,7 +315,7 @@ status_t ios_notif_pref_db_is_dirty(bool *is_dirty_out) { return rv; } -BlobDBDirtyItem* ios_notif_pref_db_get_dirty_list(void) { +BlobDBDirtyItem *ios_notif_pref_db_get_dirty_list(void) { SettingsFile file; if (S_SUCCESS != prv_file_open_and_lock(&file)) { return NULL; @@ -385,7 +374,8 @@ static bool prv_print_notif_pref_db(SettingsFile *file, SettingsRecordInfo *info char buffer[64]; prompt_send_response_fmt(buffer, sizeof(buffer), "Dirty: %s", info->dirty ? "Yes" : "No"); - prompt_send_response_fmt(buffer, sizeof(buffer), "Last modified: %"PRIu32"", info->last_modified); + prompt_send_response_fmt(buffer, sizeof(buffer), "Last modified: %" PRIu32 "", + info->last_modified); SerializedNotifPrefs *serialized_prefs = NULL; prv_get_serialized_prefs(file, (uint8_t *)app_id, info->key_len, &serialized_prefs); @@ -395,7 +385,7 @@ static bool prv_print_notif_pref_db(SettingsFile *file, SettingsRecordInfo *info return true; } prompt_send_response_fmt(buffer, sizeof(buffer), "Attributes: %d, Actions: %d", - serialized_prefs->num_attributes, serialized_prefs->num_actions); + serialized_prefs->num_attributes, serialized_prefs->num_actions); // TODO: Print the attributes and actions diff --git a/src/fw/services/blob_db/notif_db.c b/src/fw/services/blob_db/notif_db.c index 9ca8621ab4..5ae1cc92ae 100644 --- a/src/fw/services/blob_db/notif_db.c +++ b/src/fw/services/blob_db/notif_db.c @@ -13,8 +13,7 @@ void notif_db_init(void) { } status_t notif_db_insert(const uint8_t *key, int key_len, const uint8_t *val, int val_len) { - if (key_len != UUID_SIZE || - val_len < (int)sizeof(SerializedTimelineItemHeader)) { + if (key_len != UUID_SIZE || val_len < (int)sizeof(SerializedTimelineItemHeader)) { return E_INVALID_ARGUMENT; } diff --git a/src/fw/services/blob_db/pin_db.c b/src/fw/services/blob_db/pin_db.c index 1c1d537b91..3db850f314 100644 --- a/src/fw/services/blob_db/pin_db.c +++ b/src/fw/services/blob_db/pin_db.c @@ -19,9 +19,9 @@ PBL_LOG_MODULE_DECLARE(service_blob_db, CONFIG_SERVICE_BLOB_DB_LOG_LEVEL); -#define PIN_DB_MAX_AGE (3 * SECONDS_PER_DAY) // so we get at two full past days in there +#define PIN_DB_MAX_AGE (3 * SECONDS_PER_DAY) // so we get at two full past days in there #define PIN_DB_FILE_NAME "pindb" -#define PIN_DB_MAX_SIZE KiBYTES(40) // TODO [FBO] variable size / reasonable value +#define PIN_DB_MAX_SIZE KiBYTES(40) // TODO [FBO] variable size / reasonable value static TimelineItemStorage s_pin_db_storage; @@ -46,8 +46,8 @@ static status_t prv_insert_serialized_item(const uint8_t *key, int key_len, cons return E_INVALID_ARGUMENT; } - status_t rv = timeline_item_storage_insert(&s_pin_db_storage, key, key_len, - val, val_len, mark_synced); + status_t rv = + timeline_item_storage_insert(&s_pin_db_storage, key, key_len, val, val_len, mark_synced); if (rv == S_SUCCESS) { TimelineItemId parent_id = ((CommonTimelineItemHeader *)val)->parent_id; @@ -61,8 +61,7 @@ static status_t prv_insert_serialized_item(const uint8_t *key, int key_len, cons // String initialized on the heap to reduce stack usage char *parent_id_string = kernel_malloc_check(UUID_STRING_BUFFER_LENGTH); uuid_to_string(&parent_id, parent_id_string); - PBL_LOG_ERR("Pin insert for a pin with no app installed, parent id: %s", - parent_id_string); + PBL_LOG_ERR("Pin insert for a pin with no app installed, parent id: %s", parent_id_string); kernel_free(parent_id_string); goto done; } @@ -77,12 +76,12 @@ static status_t prv_insert_serialized_item(const uint8_t *key, int key_len, cons } // The app isn't cached. Fetch it! PebbleEvent e = { - .type = PEBBLE_APP_FETCH_REQUEST_EVENT, - .app_fetch_request = { - .id = install_id, - .with_ui = false, - .fetch_args = NULL, - }, + .type = PEBBLE_APP_FETCH_REQUEST_EVENT, + .app_fetch_request = { + .id = install_id, + .with_ui = false, + .fetch_args = NULL, + }, }; event_put(&e); } @@ -102,7 +101,7 @@ static status_t prv_insert_item(TimelineItem *item, bool emit_event) { uint8_t *write_ptr = buffer; // serialize the header - timeline_item_serialize_header(item, (SerializedTimelineItemHeader *) write_ptr); + timeline_item_serialize_header(item, (SerializedTimelineItemHeader *)write_ptr); write_ptr += sizeof(SerializedTimelineItemHeader); // serialize the attributes / actions @@ -116,9 +115,8 @@ static status_t prv_insert_item(TimelineItem *item, bool emit_event) { // Only pins from the reminders app should be dirty and synced to the phone Uuid reminders_data_source_uuid = UUID_REMINDERS_DATA_SOURCE; const bool mark_synced = !uuid_equal(&item->header.parent_id, &reminders_data_source_uuid); - rv = prv_insert_serialized_item( - (uint8_t *)&item->header.id, sizeof(TimelineItemId), - buffer, sizeof(SerializedTimelineItemHeader) + payload_size, mark_synced); + rv = prv_insert_serialized_item((uint8_t *)&item->header.id, sizeof(TimelineItemId), buffer, + sizeof(SerializedTimelineItemHeader) + payload_size, mark_synced); if (rv == S_SUCCESS && emit_event) { blob_db_event_put(BlobDBEventTypeInsert, BlobDBIdPins, (uint8_t *)&item->header.id, sizeof(TimelineItemId)); @@ -179,7 +177,7 @@ bool pin_db_exists_with_parent(const TimelineItemId *parent_id) { status_t pin_db_read_item_header(TimelineItem *item_out, TimelineItemId *id) { SerializedTimelineItemHeader hdr = {{{0}}}; status_t rv = pin_db_read((uint8_t *)id, sizeof(TimelineItemId), (uint8_t *)&hdr, - sizeof(SerializedTimelineItemHeader)); + sizeof(SerializedTimelineItemHeader)); timeline_item_deserialize_header(item_out, &hdr); return rv; } @@ -201,10 +199,7 @@ status_t pin_db_next_item_header(TimelineItem *next_item_out, void pin_db_init(void) { s_pin_db_storage = (TimelineItemStorage){}; - timeline_item_storage_init(&s_pin_db_storage, - PIN_DB_FILE_NAME, - PIN_DB_MAX_SIZE, - PIN_DB_MAX_AGE); + timeline_item_storage_init(&s_pin_db_storage, PIN_DB_FILE_NAME, PIN_DB_MAX_SIZE, PIN_DB_MAX_AGE); } void pin_db_deinit(void) { @@ -252,7 +247,7 @@ status_t pin_db_is_dirty(bool *is_dirty_out) { return timeline_item_storage_each(&s_pin_db_storage, sync_util_is_dirty_cb, is_dirty_out); } -BlobDBDirtyItem* pin_db_get_dirty_list(void) { +BlobDBDirtyItem *pin_db_get_dirty_list(void) { BlobDBDirtyItem *dirty_list = NULL; timeline_item_storage_each(&s_pin_db_storage, sync_util_build_dirty_list_cb, &dirty_list); diff --git a/src/fw/services/blob_db/reminder_db.c b/src/fw/services/blob_db/reminder_db.c index f4717b6674..3219c88984 100644 --- a/src/fw/services/blob_db/reminder_db.c +++ b/src/fw/services/blob_db/reminder_db.c @@ -33,7 +33,7 @@ static TimelineItemStorage s_storage; static status_t prv_read_item_header(TimelineItem *item_out, TimelineItemId *id) { SerializedTimelineItemHeader hdr = {{{0}}}; status_t rv = reminder_db_read((uint8_t *)id, sizeof(TimelineItemId), (uint8_t *)&hdr, - sizeof(SerializedTimelineItemHeader)); + sizeof(SerializedTimelineItemHeader)); timeline_item_deserialize_header(item_out, &hdr); return rv; } @@ -93,7 +93,7 @@ static bool prv_timestamp_title_compare_func(SettingsFile *file, SettingsRecordI void *context) { // Check entry is valid if (info->key_len != UUID_SIZE || info->val_len == 0) { - return true; // continue iteration + return true; // continue iteration } // Compare timestamps (this should omit most reminders) @@ -101,28 +101,28 @@ static bool prv_timestamp_title_compare_func(SettingsFile *file, SettingsRecordI SerializedTimelineItemHeader header; info->get_val(file, (uint8_t *)&header, sizeof(SerializedTimelineItemHeader)); if (reminder_info->timestamp != header.common.timestamp) { - return true; // continue iteration + return true; // continue iteration } // Read the full reminder to compare text TimelineItem *reminder = reminder_info->reminder_out; if (timeline_item_storage_get_from_settings_record(file, info, reminder) != S_SUCCESS) { - return true; // continue iteration + return true; // continue iteration } const char *title = attribute_get_string(&reminder->attr_list, AttributeIdTitle, ""); if (strcmp(title, reminder_info->title) != 0) { timeline_item_free_allocated_buffer(reminder); - return true; // continue iteration + return true; // continue iteration } if (reminder_info->filter_cb && !reminder_info->filter_cb(&header, context)) { timeline_item_free_allocated_buffer(reminder); - return true; // continue iteration + return true; // continue iteration } reminder_info->match = true; - return false; // stop iteration + return false; // stop iteration } bool reminder_db_find_by_timestamp_title(time_t timestamp, const char *title, @@ -131,11 +131,11 @@ bool reminder_db_find_by_timestamp_title(time_t timestamp, const char *title, PBL_ASSERTN(reminder_out); ReminderInfo reminder_info = { - .filter_cb = filter_cb, - .timestamp = timestamp, - .title = title, - .reminder_out = reminder_out, - .match = false + .filter_cb = filter_cb, + .timestamp = timestamp, + .title = title, + .reminder_out = reminder_out, + .match = false }; timeline_item_storage_each(&s_storage, prv_timestamp_title_compare_func, &reminder_info); @@ -143,8 +143,8 @@ bool reminder_db_find_by_timestamp_title(time_t timestamp, const char *title, return reminder_info.match; } -static status_t prv_insert_reminder(const uint8_t *key, int key_len, - const uint8_t *val, int val_len, bool mark_synced) { +static status_t prv_insert_reminder(const uint8_t *key, int key_len, const uint8_t *val, + int val_len, bool mark_synced) { const SerializedTimelineItemHeader *hdr = (const SerializedTimelineItemHeader *)val; const bool has_reminded = hdr->common.reminded; @@ -171,15 +171,16 @@ status_t reminder_db_insert_item(TimelineItem *item) { size_t payload_size = timeline_item_get_serialized_payload_size(item); uint8_t *buffer = kernel_malloc_check(sizeof(SerializedTimelineItemHeader) + payload_size); - timeline_item_serialize_header(item, (SerializedTimelineItemHeader *) buffer); + timeline_item_serialize_header(item, (SerializedTimelineItemHeader *)buffer); timeline_item_serialize_payload(item, buffer + sizeof(SerializedTimelineItemHeader), - payload_size); + payload_size); // only for items without attributes as of right now // Records inserted by the watch are dirty and need to be synced to the phone const bool mark_synced = false; - status_t rv = prv_insert_reminder((uint8_t *)&item->header.id, sizeof(TimelineItemId), - buffer, sizeof(SerializedTimelineItemHeader) + payload_size, mark_synced); + status_t rv = + prv_insert_reminder((uint8_t *)&item->header.id, sizeof(TimelineItemId), buffer, + sizeof(SerializedTimelineItemHeader) + payload_size, mark_synced); blob_db_sync_record(BlobDBIdReminders, (uint8_t *)&item->header.id, sizeof(TimelineItemId), rtc_get_time()); @@ -198,8 +199,8 @@ static status_t prv_reminder_db_delete_common(const uint8_t *key, int key_len) { } status_t reminder_db_delete_item(const TimelineItemId *id, bool send_event) { - return (send_event ? reminder_db_delete : - prv_reminder_db_delete_common)((uint8_t *)id, sizeof(TimelineItemId)); + return (send_event ? reminder_db_delete : prv_reminder_db_delete_common)((uint8_t *)id, + sizeof(TimelineItemId)); } bool reminder_db_is_empty(void) { @@ -207,8 +208,8 @@ bool reminder_db_is_empty(void) { } status_t reminder_db_set_status_bits(const TimelineItemId *id, uint8_t status) { - return timeline_item_storage_set_status_bits(&s_storage, (uint8_t *)id, - sizeof(ReminderId), status); + return timeline_item_storage_set_status_bits(&s_storage, (uint8_t *)id, sizeof(ReminderId), + status); } ///////////////////////// @@ -216,9 +217,7 @@ status_t reminder_db_set_status_bits(const TimelineItemId *id, uint8_t status) { ///////////////////////// void reminder_db_init(void) { - timeline_item_storage_init(&s_storage, - REMINDER_DB_FILE_NAME, - REMINDER_DB_MAX_SIZE, + timeline_item_storage_init(&s_storage, REMINDER_DB_FILE_NAME, REMINDER_DB_MAX_SIZE, MAX_REMINDER_AGE); reminders_init(); } @@ -247,7 +246,7 @@ status_t reminder_db_read(const uint8_t *key, int key_len, uint8_t *val_out, int status_t reminder_db_delete(const uint8_t *key, int key_len) { status_t rv = prv_reminder_db_delete_common(key, key_len); - reminders_handle_reminder_removed((Uuid *) key); + reminders_handle_reminder_removed((Uuid *)key); return rv; } @@ -261,7 +260,7 @@ status_t reminder_db_is_dirty(bool *is_dirty_out) { return timeline_item_storage_each(&s_storage, sync_util_is_dirty_cb, is_dirty_out); } -BlobDBDirtyItem* reminder_db_get_dirty_list(void) { +BlobDBDirtyItem *reminder_db_get_dirty_list(void) { BlobDBDirtyItem *dirty_list = NULL; timeline_item_storage_each(&s_storage, sync_util_build_dirty_list_cb, &dirty_list); diff --git a/src/fw/services/blob_db/settings_blob_db.c b/src/fw/services/blob_db/settings_blob_db.c index 7509863a45..173c534b33 100644 --- a/src/fw/services/blob_db/settings_blob_db.c +++ b/src/fw/services/blob_db/settings_blob_db.c @@ -38,113 +38,113 @@ static bool s_sync_callback_pending = false; //! Only these settings will be synced via BlobDB. //! This prevents sensitive data (Bluetooth pairing, debug flags, etc.) from syncing. static const char *s_syncable_settings[] = { - // Clock preferences - "clock24h", - "timezoneSource", - "automaticTimezoneID", - - // Display preferences - "unitsDistance", - "unitsWind", - "textStyle", - "stationaryMode", + // Clock preferences + "clock24h", + "timezoneSource", + "automaticTimezoneID", + + // Display preferences + "unitsDistance", + "unitsWind", + "textStyle", + "stationaryMode", #ifdef CONFIG_ORIENTATION_MANAGER - "displayOrientationLeftHanded", + "displayOrientationLeftHanded", #endif - // Motion preferences +// Motion preferences #ifdef CONFIG_ACCEL_SENSITIVITY - "motionSensitivity", + "motionSensitivity", #endif - // Backlight preferences - "lightEnabled", - "lightAmbientSensorEnabled", - "lightTimeoutMs", - "lightIntensity", - "lightMotion", - "lightTouch", - "lightAmbientThreshold", + // Backlight preferences + "lightEnabled", + "lightAmbientSensorEnabled", + "lightTimeoutMs", + "lightIntensity", + "lightMotion", + "lightTouch", + "lightAmbientThreshold", #ifdef CONFIG_DYNAMIC_BACKLIGHT - "lightDynamicMode", + "lightDynamicMode", #endif - "lightPreset", + "lightPreset", #ifdef CONFIG_BACKLIGHT_HAS_COLOR - "lightColor", + "lightColor", #endif - // Language preferences - "langEnglish", - "language", - - // App preferences - "qlUp", - "qlDown", - "qlSelect", - "qlBack", - "qlSetupOpened", - "qlSingleClickUp", - "qlSingleClickDown", - "qlComboBackUp", - "qlComboUpDown", - - // UI theming - "settingsMenuHighlightColor", - "appsMenuHighlightColor", - - // Timeline preferences - "timelineQuickViewEnabled", - "timelineQuickViewBeforeTimeMin", + // Language preferences + "langEnglish", + "language", + + // App preferences + "qlUp", + "qlDown", + "qlSelect", + "qlBack", + "qlSetupOpened", + "qlSingleClickUp", + "qlSingleClickDown", + "qlComboBackUp", + "qlComboUpDown", + + // UI theming + "settingsMenuHighlightColor", + "appsMenuHighlightColor", + + // Timeline preferences + "timelineQuickViewEnabled", + "timelineQuickViewBeforeTimeMin", #if TIMELINE_PEEK_WATCHFACE_FIT_SUPPORTED - "timelineQuickViewWatchfaceFit", + "timelineQuickViewWatchfaceFit", #endif - "timelineSettingsOpened", - - // Activity preferences - "activityPreferences", - "activityHealthAppOpened", - "activityWorkoutAppOpened", - "alarmsAppOpened", - "hrmPreferences", - "heartRatePreferences", - - // Menu wrap around preferences - "menuScrollWrapAround", - "menuScrollVibeBehavior", - - // Worker preferences - "workerId", - - // Music preferences - "musicShowVolumeControls", - "musicShowProgressBar", - "musicShowAlbumArt", + "timelineSettingsOpened", + + // Activity preferences + "activityPreferences", + "activityHealthAppOpened", + "activityWorkoutAppOpened", + "alarmsAppOpened", + "hrmPreferences", + "heartRatePreferences", + + // Menu wrap around preferences + "menuScrollWrapAround", + "menuScrollVibeBehavior", + + // Worker preferences + "workerId", + + // Music preferences + "musicShowVolumeControls", + "musicShowProgressBar", + "musicShowAlbumArt", }; static const size_t s_num_syncable_settings = ARRAY_LENGTH(s_syncable_settings); //! Notification preferences from notifpref file that should be synced static const char *s_syncable_notif_prefs[] = { - "mask", - "dndInterruptionsMask", - "dndShowNotifications", - "vibeIntensity", - "vibeScoreNotifications", - "vibeScoreIncomingCalls", - "vibeScoreAlarms", - "dndManuallyEnabled", - "dndSmartEnabled", - "dndWeekdaySchedule", - "dndWeekdayScheduleEnabled", - "dndWeekendSchedule", - "dndWeekendScheduleEnabled", - "notifWindowTimeout", - "notifDesignStyle", - "notifVibeDelay", - "notifBacklight", - "dndMotionBacklight", - "dndTouchBacklight", - "dndAutoDismiss", + "mask", + "dndInterruptionsMask", + "dndShowNotifications", + "vibeIntensity", + "vibeScoreNotifications", + "vibeScoreIncomingCalls", + "vibeScoreAlarms", + "dndManuallyEnabled", + "dndSmartEnabled", + "dndWeekdaySchedule", + "dndWeekdayScheduleEnabled", + "dndWeekendSchedule", + "dndWeekendScheduleEnabled", + "notifWindowTimeout", + "notifDesignStyle", + "notifVibeDelay", + "notifBacklight", + "dndMotionBacklight", + "dndTouchBacklight", + "dndAutoDismiss", }; static const size_t s_num_syncable_notif_prefs = ARRAY_LENGTH(s_syncable_notif_prefs); @@ -161,8 +161,8 @@ bool settings_blob_db_phone_supports_sync(void) { //! Find a key's canonical whitelist entry, or NULL if it isn't in the list. //! Handles both key_len with null terminator (strlen+1) and without (strlen) -static const char *prv_find_in_list(const uint8_t *key, int key_len, - const char **list, size_t list_len) { +static const char *prv_find_in_list(const uint8_t *key, int key_len, const char **list, + size_t list_len) { for (size_t i = 0; i < list_len; i++) { const char *list_key = list[i]; size_t list_key_strlen = strlen(list_key); @@ -176,8 +176,8 @@ static const char *prv_find_in_list(const uint8_t *key, int key_len, } //! Check if a key matches an entry in a given list -static bool prv_is_key_in_list(const uint8_t *key, int key_len, - const char **list, size_t list_len) { +static bool prv_is_key_in_list(const uint8_t *key, int key_len, const char **list, + size_t list_len) { return prv_find_in_list(key, key_len, list, list_len) != NULL; } @@ -188,8 +188,8 @@ static bool prv_is_key_in_list(const uint8_t *key, int key_len, //! setting silently fails to apply. Points the caller at the whitelist's own string so the null //! byte is guaranteed to be present. Returns false if the key isn't a whitelisted shell pref. static bool prv_canonical_shell_key(const uint8_t **key, int *key_len) { - const char *canonical = prv_find_in_list(*key, *key_len, s_syncable_settings, - s_num_syncable_settings); + const char *canonical = + prv_find_in_list(*key, *key_len, s_syncable_settings, s_num_syncable_settings); if (!canonical) { return false; } @@ -308,11 +308,10 @@ void settings_blob_db_init(void) { s_initialized = true; PBL_LOG_DBG("Settings BlobDB initialized (%u whitelisted settings)", - (unsigned int) s_num_syncable_settings); + (unsigned int)s_num_syncable_settings); } -status_t settings_blob_db_insert(const uint8_t *key, int key_len, - const uint8_t *val, int val_len) { +status_t settings_blob_db_insert(const uint8_t *key, int key_len, const uint8_t *val, int val_len) { if (!s_initialized) { return E_INTERNAL; } @@ -331,8 +330,8 @@ status_t settings_blob_db_insert(const uint8_t *key, int key_len, file_len = SHELL_PREFS_FILE_LEN; } else { char key_str[128]; - size_t copy_len = (key_len > 0 && (size_t)key_len < sizeof(key_str)) ? - (size_t)key_len : sizeof(key_str) - 1; + size_t copy_len = + (key_len > 0 && (size_t)key_len < sizeof(key_str)) ? (size_t)key_len : sizeof(key_str) - 1; memcpy(key_str, key, copy_len); key_str[copy_len] = '\0'; PBL_LOG_WRN("Rejecting non-whitelisted setting: %s", key_str); @@ -366,10 +365,10 @@ status_t settings_blob_db_insert(const uint8_t *key, int key_len, // Update the in-memory prefs state after successful write if (PASSED(status)) { PebbleBlobDBEvent event = { - .db_id = BlobDBIdSettings, - .type = BlobDBEventTypeInsert, - .key = (uint8_t *)key, - .key_len = key_len, + .db_id = BlobDBIdSettings, + .type = BlobDBEventTypeInsert, + .key = (uint8_t *)key, + .key_len = key_len, }; if (is_notif_pref) { alerts_preferences_handle_blob_db_event(&event); @@ -417,8 +416,7 @@ int settings_blob_db_get_len(const uint8_t *key, int key_len) { return len; } -status_t settings_blob_db_read(const uint8_t *key, int key_len, - uint8_t *val_out, int val_len) { +status_t settings_blob_db_read(const uint8_t *key, int key_len, uint8_t *val_out, int val_len) { if (!s_initialized) { return E_INTERNAL; } @@ -497,8 +495,7 @@ typedef struct { BlobDBDirtyItem *dirty_list_tail; } BuildDirtyListContext; -static bool prv_build_dirty_list_callback(SettingsFile *file, - SettingsRecordInfo *info, +static bool prv_build_dirty_list_callback(SettingsFile *file, SettingsRecordInfo *info, void *context) { BuildDirtyListContext *ctx = (BuildDirtyListContext *)context; @@ -513,7 +510,7 @@ static bool prv_build_dirty_list_callback(SettingsFile *file, // Only include whitelisted settings if (!prv_is_syncable(key_buf, info->key_len)) { - return true; // Skip, continue iteration + return true; // Skip, continue iteration } // Allocate dirty item @@ -528,11 +525,11 @@ static bool prv_build_dirty_list_callback(SettingsFile *file, ctx->dirty_list = item; ctx->dirty_list_tail = item; } else { - ctx->dirty_list_tail = (BlobDBDirtyItem *)list_append( - (ListNode *)ctx->dirty_list_tail, (ListNode *)item); + ctx->dirty_list_tail = + (BlobDBDirtyItem *)list_append((ListNode *)ctx->dirty_list_tail, (ListNode *)item); } - return true; // Continue iteration + return true; // Continue iteration } BlobDBDirtyItem *settings_blob_db_get_dirty_list(void) { @@ -540,7 +537,7 @@ BlobDBDirtyItem *settings_blob_db_get_dirty_list(void) { return NULL; } - BuildDirtyListContext ctx = { .dirty_list = NULL, .dirty_list_tail = NULL }; + BuildDirtyListContext ctx = {.dirty_list = NULL, .dirty_list_tail = NULL}; // Iterate shell prefs file prefs_private_lock(); @@ -607,11 +604,11 @@ status_t settings_blob_db_is_dirty(bool *is_dirty_out) { bool found_dirty; } IsDirtyContext; - bool is_dirty_callback(SettingsFile *file, SettingsRecordInfo *info, void *context) { + bool is_dirty_callback(SettingsFile * file, SettingsRecordInfo * info, void *context) { IsDirtyContext *ctx = (IsDirtyContext *)context; if (!info->dirty) { - return true; // Continue + return true; // Continue } // Check if whitelisted @@ -620,13 +617,13 @@ status_t settings_blob_db_is_dirty(bool *is_dirty_out) { if (prv_is_syncable(key_buf, info->key_len)) { ctx->found_dirty = true; - return false; // Stop iteration + return false; // Stop iteration } - return true; // Continue + return true; // Continue } - IsDirtyContext ctx = { .found_dirty = false }; + IsDirtyContext ctx = {.found_dirty = false}; // Check shell prefs file prefs_private_lock(); @@ -715,7 +712,7 @@ static bool prv_get_timestamp_callback(SettingsFile *file, SettingsRecordInfo *i GetTimestampContext *ctx = (GetTimestampContext *)context; if (info->key_len != ctx->search_key_len) { - return true; // Continue + return true; // Continue } uint8_t key_buf[SETTINGS_KEY_MAX_LEN]; @@ -724,15 +721,14 @@ static bool prv_get_timestamp_callback(SettingsFile *file, SettingsRecordInfo *i if (memcmp(key_buf, ctx->search_key, info->key_len) == 0) { ctx->last_modified = (time_t)info->last_modified; ctx->found = true; - return false; // Stop iteration + return false; // Stop iteration } - return true; // Continue + return true; // Continue } -status_t settings_blob_db_insert_with_timestamp(const uint8_t *key, int key_len, - const uint8_t *val, int val_len, - time_t timestamp) { +status_t settings_blob_db_insert_with_timestamp(const uint8_t *key, int key_len, const uint8_t *val, + int val_len, time_t timestamp) { if (!s_initialized) { return E_INTERNAL; } @@ -764,10 +760,10 @@ status_t settings_blob_db_insert_with_timestamp(const uint8_t *key, int key_len, // Check if existing value has a newer timestamp GetTimestampContext ctx = { - .search_key = key, - .search_key_len = key_len, - .last_modified = 0, - .found = false, + .search_key = key, + .search_key_len = key_len, + .last_modified = 0, + .found = false, }; settings_file_each(&file, prv_get_timestamp_callback, &ctx); @@ -775,8 +771,8 @@ status_t settings_blob_db_insert_with_timestamp(const uint8_t *key, int key_len, // Watch data is newer - reject the insert settings_file_close(&file); prv_unlock_for_file(is_notif_pref); - PBL_LOG_DBG("Rejecting stale data: watch=%lu phone=%lu", - (unsigned long)ctx.last_modified, (unsigned long)timestamp); + PBL_LOG_DBG("Rejecting stale data: watch=%lu phone=%lu", (unsigned long)ctx.last_modified, + (unsigned long)timestamp); return E_INVALID_OPERATION; } @@ -799,10 +795,10 @@ status_t settings_blob_db_insert_with_timestamp(const uint8_t *key, int key_len, // Update the in-memory prefs state after successful write if (PASSED(status)) { PebbleBlobDBEvent event = { - .db_id = BlobDBIdSettings, - .type = BlobDBEventTypeInsert, - .key = (uint8_t *)key, - .key_len = key_len, + .db_id = BlobDBIdSettings, + .type = BlobDBEventTypeInsert, + .key = (uint8_t *)key, + .key_len = key_len, }; if (is_notif_pref) { alerts_preferences_handle_blob_db_event(&event); diff --git a/src/fw/services/blob_db/sync.c b/src/fw/services/blob_db/sync.c index e11034971c..f2ad3d8f12 100644 --- a/src/fw/services/blob_db/sync.c +++ b/src/fw/services/blob_db/sync.c @@ -13,7 +13,6 @@ PBL_LOG_MODULE_DECLARE(service_blob_db, CONFIG_SERVICE_BLOB_DB_LOG_LEVEL); - #define SYNC_TIMEOUT_SECONDS 30 #define SYNC_ABANDON_TIMEOUT_SECONDS (5 * 60) // 5 minutes to fully abandon @@ -35,8 +34,7 @@ static bool prv_session_uid_filter_callback(ListNode *node, void *data) { //! Resolve the id against the live list instead of trusting a raw pointer. static BlobDBSyncSession *prv_find_live_session(void *session_id) { return (BlobDBSyncSession *)list_find((ListNode *)s_sync_sessions, - prv_session_uid_filter_callback, - session_id); + prv_session_uid_filter_callback, session_id); } static bool prv_session_id_filter_callback(ListNode *node, void *data) { @@ -107,10 +105,8 @@ static void prv_send_writeback(BlobDBSyncSession *session) { // read item into a temporary buffer void *item_buf = kernel_malloc_check(item_size); - status_t status = blob_db_read(session->db_id, - dirty_item->key, - dirty_item->key_len, - item_buf, item_size); + status_t status = + blob_db_read(session->db_id, dirty_item->key, dirty_item->key_len, item_buf, item_size); // Both blob_db_sync_next() and blob_db_sync_cancel() can free the session, so // neither it nor dirty_item may be touched after calling them. if (status == E_DOES_NOT_EXIST) { @@ -120,7 +116,7 @@ static void prv_send_writeback(BlobDBSyncSession *session) { return; } else if (!PASSED(status)) { // something went terribly wrong - PBL_LOG_ERR("Failed to read blob DB during sync. Error code: 0x%"PRIx32, status); + PBL_LOG_ERR("Failed to read blob DB during sync. Error code: 0x%" PRIx32, status); kernel_free(item_buf); blob_db_sync_cancel(session); return; @@ -131,27 +127,20 @@ static void prv_send_writeback(BlobDBSyncSession *session) { // only one writeback in flight at a time session->state = BlobDBSyncSessionStateWaitingForAck; - if (session->session_type == BlobDBSyncSessionTypeDB) { - session->current_token = blob_db_endpoint_send_writeback(session->db_id, - dirty_item->last_updated, - dirty_item->key, - dirty_item->key_len, - item_buf, - item_size); + session->current_token = + blob_db_endpoint_send_writeback(session->db_id, dirty_item->last_updated, dirty_item->key, + dirty_item->key_len, item_buf, item_size); } else { - session->current_token = blob_db_endpoint_send_write(session->db_id, - dirty_item->last_updated, - dirty_item->key, - dirty_item->key_len, - item_buf, - item_size); + session->current_token = + blob_db_endpoint_send_write(session->db_id, dirty_item->last_updated, dirty_item->key, + dirty_item->key_len, item_buf, item_size); } kernel_free(item_buf); } -BlobDBSyncSession* prv_create_sync_session(BlobDBId db_id, BlobDBDirtyItem *dirty_list, +BlobDBSyncSession *prv_create_sync_session(BlobDBId db_id, BlobDBDirtyItem *dirty_list, BlobDBSyncSessionType session_type) { BlobDBSyncSession *session = kernel_zalloc_check(sizeof(BlobDBSyncSession)); session->state = BlobDBSyncSessionStateIdle; @@ -163,31 +152,29 @@ BlobDBSyncSession* prv_create_sync_session(BlobDBId db_id, BlobDBDirtyItem *dirt s_next_session_id = 1; // 0 is reserved as "no session" } void *session_id_data = (void *)(uintptr_t)session->session_id; - session->timeout_timer = (const RegularTimerInfo) { - .cb = prv_timeout_timer_callback, - .cb_data = session_id_data, + session->timeout_timer = (const RegularTimerInfo){ + .cb = prv_timeout_timer_callback, + .cb_data = session_id_data, }; - session->abandon_timer = (const RegularTimerInfo) { - .cb = prv_abandon_timer_callback, - .cb_data = session_id_data, + session->abandon_timer = (const RegularTimerInfo){ + .cb = prv_abandon_timer_callback, + .cb_data = session_id_data, }; - s_sync_sessions = (BlobDBSyncSession *)list_prepend((ListNode *)s_sync_sessions, - (ListNode *)session); + s_sync_sessions = + (BlobDBSyncSession *)list_prepend((ListNode *)s_sync_sessions, (ListNode *)session); return session; } //! Will not return sessions for individual records BlobDBSyncSession *blob_db_sync_get_session_for_id(BlobDBId db_id) { - return (BlobDBSyncSession *)list_find((ListNode *)s_sync_sessions, - prv_session_id_filter_callback, + return (BlobDBSyncSession *)list_find((ListNode *)s_sync_sessions, prv_session_id_filter_callback, (void *)(uintptr_t)db_id); } BlobDBSyncSession *blob_db_sync_get_session_for_token(uint16_t token) { - return (BlobDBSyncSession *)list_find((ListNode *)s_sync_sessions, - prv_session_token_filter_callback, - (void *)(uintptr_t)token); + return (BlobDBSyncSession *)list_find( + (ListNode *)s_sync_sessions, prv_session_token_filter_callback, (void *)(uintptr_t)token); } status_t blob_db_sync_db(BlobDBId db_id) { @@ -283,7 +270,7 @@ void blob_db_sync_next(BlobDBSyncSession *session) { prv_send_writeback(session); } else { PBL_LOG_DBG("Finished syncing db %d, session type: %d", session->db_id, - session->session_type); + session->session_type); if (regular_timer_is_scheduled(&session->timeout_timer)) { regular_timer_remove_callback(&session->timeout_timer); } @@ -299,4 +286,3 @@ void blob_db_sync_next(BlobDBSyncSession *session) { } } } - diff --git a/src/fw/services/blob_db/sync_util.c b/src/fw/services/blob_db/sync_util.c index d0c380d3dd..a83fc9cf2d 100644 --- a/src/fw/services/blob_db/sync_util.c +++ b/src/fw/services/blob_db/sync_util.c @@ -12,7 +12,6 @@ PBL_LOG_MODULE_DECLARE(service_blob_db, CONFIG_SERVICE_BLOB_DB_LOG_LEVEL); // by the underlying db API. If .flags or .status is used from a CommonTimelineItemHeader below, // be very careful - bool sync_util_is_dirty_cb(SettingsFile *file, SettingsRecordInfo *info, void *context) { // If there is a single dirty record, update the out bool to dirty and stop iterating if (info->dirty) { @@ -38,7 +37,7 @@ bool sync_util_build_dirty_list_cb(SettingsFile *file, SettingsRecordInfo *info, info->get_key(file, new_node->key, new_node->key_len); *(BlobDBDirtyItem **)context = - (BlobDBDirtyItem *)list_prepend((ListNode *) dirty_list, (ListNode *)new_node); + (BlobDBDirtyItem *)list_prepend((ListNode *)dirty_list, (ListNode *)new_node); } return true; diff --git a/src/fw/services/blob_db/timeline_item_storage.c b/src/fw/services/blob_db/timeline_item_storage.c index c30cfa18cf..3eeb2af255 100644 --- a/src/fw/services/blob_db/timeline_item_storage.c +++ b/src/fw/services/blob_db/timeline_item_storage.c @@ -25,20 +25,16 @@ static RtcTicks prv_storage_lock(TimelineItemStorage *storage, const char *op) { RtcTicks after = rtc_get_ticks(); uint32_t wait_ms = (uint32_t)(((after - before) * 1000) / RTC_TICKS_HZ); if (wait_ms >= FIRM_1649_MUTEX_WARN_MS) { - PBL_LOG_WRN("FIRM-1649: %s waited %"PRIu32"ms for %s mutex", - op, wait_ms, storage->name); + PBL_LOG_WRN("FIRM-1649: %s waited %" PRIu32 "ms for %s mutex", op, wait_ms, storage->name); } return after; } -static void prv_storage_unlock(TimelineItemStorage *storage, RtcTicks lock_ticks, - const char *op) { - uint32_t hold_ms = - (uint32_t)(((rtc_get_ticks() - lock_ticks) * 1000) / RTC_TICKS_HZ); +static void prv_storage_unlock(TimelineItemStorage *storage, RtcTicks lock_ticks, const char *op) { + uint32_t hold_ms = (uint32_t)(((rtc_get_ticks() - lock_ticks) * 1000) / RTC_TICKS_HZ); pbl_mutex_unlock(&storage->mutex); if (hold_ms >= FIRM_1649_MUTEX_WARN_MS) { - PBL_LOG_WRN("FIRM-1649: %s held %s mutex for %"PRIu32"ms", - op, storage->name, hold_ms); + PBL_LOG_WRN("FIRM-1649: %s held %s mutex for %" PRIu32 "ms", op, storage->name, hold_ms); } } @@ -67,13 +63,11 @@ typedef struct { } AnyInfo; // callback for settings_file_each that finds the first item by timestamp -static bool prv_each_first_item(SettingsFile *file, SettingsRecordInfo *info, - void *context) { +static bool prv_each_first_item(SettingsFile *file, SettingsRecordInfo *info, void *context) { if (info->val_len < (int)sizeof(SerializedTimelineItemHeader) || - info->key_len != UUID_SIZE) { // deleted or malformed values + info->key_len != UUID_SIZE) { // deleted or malformed values if (info->key_len != UUID_SIZE) { - PBL_LOG_WRN("Found reminder with invalid key size %d; ignoring.", - info->key_len); + PBL_LOG_WRN("Found reminder with invalid key size %d; ignoring.", info->key_len); } return true; } @@ -93,34 +87,30 @@ static bool prv_each_first_item(SettingsFile *file, SettingsRecordInfo *info, filtered_out = true; } - if (!filtered_out && - (timestamp < next_info->best || !next_info->found) && + if (!filtered_out && (timestamp < next_info->best || !next_info->found) && (timestamp >= (int)(next_info->current - next_info->max_age))) { next_info->found = true; next_info->best = timestamp; info->get_key(file, (uint8_t *)&next_info->id, sizeof(Uuid)); } - return true; // continue iterating + return true; // continue iterating } static bool prv_each_any_item(SettingsFile *file, SettingsRecordInfo *info, void *context) { - if (info->val_len < (int)sizeof(SerializedTimelineItemHeader) || - info->key_len != UUID_SIZE) { - return true; // continue looking + if (info->val_len < (int)sizeof(SerializedTimelineItemHeader) || info->key_len != UUID_SIZE) { + return true; // continue looking } AnyInfo *anyinfo = context; anyinfo->empty = false; - return false; // we found a valid entry + return false; // we found a valid entry } -static bool prv_each_find_children(SettingsFile *file, SettingsRecordInfo *info, - void *context) { +static bool prv_each_find_children(SettingsFile *file, SettingsRecordInfo *info, void *context) { FindChildrenInfo *find_info = (FindChildrenInfo *)context; - if (info->val_len < (int)sizeof(SerializedTimelineItemHeader) || - info->key_len != UUID_SIZE) { + if (info->val_len < (int)sizeof(SerializedTimelineItemHeader) || info->key_len != UUID_SIZE) { // malformed values; deleted values have their lengths set to 0 if (info->key_len != UUID_SIZE) { PBL_LOG_WRN("Found malformed item with invalid key/val sizes; ignoring."); @@ -150,7 +140,7 @@ bool timeline_item_storage_is_empty(TimelineItemStorage *storage) { RtcTicks lock_ticks = prv_storage_lock(storage, __func__); - AnyInfo any_info = { .empty = true }; + AnyInfo any_info = {.empty = true}; status_t status = settings_file_each(&storage->file, prv_each_any_item, &any_info); if (status) { goto cleanup; @@ -164,7 +154,7 @@ bool timeline_item_storage_is_empty(TimelineItemStorage *storage) { } status_t timeline_item_storage_next_item(TimelineItemStorage *storage, Uuid *id_out, - TimelineItemStorageFilterCallback filter_cb) { + TimelineItemStorageFilterCallback filter_cb) { RtcTicks lock_ticks = prv_storage_lock(storage, __func__); NextInfo next_info = {0}; @@ -190,14 +180,13 @@ status_t timeline_item_storage_next_item(TimelineItemStorage *storage, Uuid *id_ return rv; } - bool timeline_item_storage_exists_with_parent(TimelineItemStorage *storage, const Uuid *parent_id) { RtcTicks lock_ticks = prv_storage_lock(storage, __func__); FindChildrenInfo info = { - .parent_id = *parent_id, - .num_children = 0, - .find_all = false, + .parent_id = *parent_id, + .num_children = 0, + .find_all = false, }; status_t rv = settings_file_each(&storage->file, prv_each_find_children, &info); if (rv) { @@ -216,15 +205,14 @@ bool timeline_item_storage_exists_with_parent(TimelineItemStorage *storage, cons } status_t timeline_item_storage_delete_with_parent( - TimelineItemStorage *storage, - const Uuid *parent_id, + TimelineItemStorage *storage, const Uuid *parent_id, TimelineItemStorageChildDeleteCallback child_delete_cb) { RtcTicks lock_ticks = prv_storage_lock(storage, __func__); FindChildrenInfo info = { - .parent_id = *parent_id, - .num_children = 0, - .find_all = true, + .parent_id = *parent_id, + .num_children = 0, + .find_all = true, }; status_t rv = settings_file_each(&storage->file, prv_each_find_children, &info); if (rv) { @@ -251,26 +239,25 @@ status_t timeline_item_storage_delete_with_parent( //! Caution: CommonTimelineItemHeader .flags & .status are stored inverted and not auto-restored status_t timeline_item_storage_each(TimelineItemStorage *storage, - TimelineItemStorageEachCallback each, void *data) { + TimelineItemStorageEachCallback each, void *data) { RtcTicks lock_ticks = prv_storage_lock(storage, __func__); status_t rv = settings_file_each(&storage->file, each, data); prv_storage_unlock(storage, lock_ticks, __func__); return rv; } -void timeline_item_storage_init(TimelineItemStorage *storage, - char *filename, uint32_t max_size, uint32_t max_age) { +void timeline_item_storage_init(TimelineItemStorage *storage, char *filename, uint32_t max_size, + uint32_t max_age) { *storage = (TimelineItemStorage){ - .name = filename, - .max_size = max_size, - .max_item_age = max_age, + .name = filename, + .max_size = max_size, + .max_item_age = max_age, }; pbl_mutex_init(&storage->mutex); - status_t rv = settings_file_open_growable(&storage->file, storage->name, - storage->max_size, KiBYTES(8)); + status_t rv = + settings_file_open_growable(&storage->file, storage->name, storage->max_size, KiBYTES(8)); if (FAILED(rv)) { - PBL_LOG_ERR("Unable to create settings file %s, rv = %"PRId32 "!", - filename, rv); + PBL_LOG_ERR("Unable to create settings file %s, rv = %" PRId32 "!", filename, rv); } } @@ -285,10 +272,9 @@ status_t timeline_item_storage_compact(TimelineItemStorage *storage) { return rv; } -status_t timeline_item_storage_insert(TimelineItemStorage *storage, - const uint8_t *key, int key_len, const uint8_t *val, int val_len, bool mark_as_synced) { - if (key_len != UUID_SIZE || - val_len > SETTINGS_VAL_MAX_LEN || +status_t timeline_item_storage_insert(TimelineItemStorage *storage, const uint8_t *key, int key_len, + const uint8_t *val, int val_len, bool mark_as_synced) { + if (key_len != UUID_SIZE || val_len > SETTINGS_VAL_MAX_LEN || val_len < (int)sizeof(SerializedTimelineItemHeader)) { return E_INVALID_ARGUMENT; } @@ -305,8 +291,7 @@ status_t timeline_item_storage_insert(TimelineItemStorage *storage, time_t timestamp = timeline_item_get_tz_timestamp(&hdr->common); time_t end_timestamp = timestamp + hdr->common.duration * SECONDS_PER_MINUTE; if (end_timestamp < (int)(now - storage->max_item_age)) { - PBL_LOG_WRN("Rejecting stale timeline item %ld seconds old", - now - timestamp); + PBL_LOG_WRN("Rejecting stale timeline item %ld seconds old", now - timestamp); return E_INVALID_OPERATION; } @@ -330,8 +315,7 @@ status_t timeline_item_storage_insert(TimelineItemStorage *storage, return rv; } -int timeline_item_storage_get_len(TimelineItemStorage *storage, - const uint8_t *key, int key_len) { +int timeline_item_storage_get_len(TimelineItemStorage *storage, const uint8_t *key, int key_len) { RtcTicks lock_ticks = prv_storage_lock(storage, __func__); status_t rv = settings_file_get_len(&storage->file, key, key_len); @@ -340,8 +324,8 @@ int timeline_item_storage_get_len(TimelineItemStorage *storage, return rv; } -status_t timeline_item_storage_read(TimelineItemStorage *storage, - const uint8_t *key, int key_len, uint8_t *val_out, int val_len) { +status_t timeline_item_storage_read(TimelineItemStorage *storage, const uint8_t *key, int key_len, + uint8_t *val_out, int val_len) { if (key_len != UUID_SIZE) { return E_INVALID_ARGUMENT; } @@ -376,8 +360,8 @@ status_t timeline_item_storage_get_from_settings_record(SettingsFile *file, return rv; } -status_t timeline_item_storage_set_status_bits(TimelineItemStorage *storage, - const uint8_t *key, int key_len, uint8_t status) { +status_t timeline_item_storage_set_status_bits(TimelineItemStorage *storage, const uint8_t *key, + int key_len, uint8_t status) { if (key_len != UUID_SIZE) { return E_INVALID_ARGUMENT; } @@ -393,8 +377,8 @@ status_t timeline_item_storage_set_status_bits(TimelineItemStorage *storage, return rv; } -status_t timeline_item_storage_delete(TimelineItemStorage *storage, - const uint8_t *key, int key_len) { +status_t timeline_item_storage_delete(TimelineItemStorage *storage, const uint8_t *key, + int key_len) { if (key_len != UUID_SIZE) { return E_INVALID_ARGUMENT; } @@ -407,8 +391,8 @@ status_t timeline_item_storage_delete(TimelineItemStorage *storage, return rv; } -status_t timeline_item_storage_mark_synced(TimelineItemStorage *storage, - const uint8_t *key, int key_len) { +status_t timeline_item_storage_mark_synced(TimelineItemStorage *storage, const uint8_t *key, + int key_len) { if (key_len == 0) { return E_INVALID_ARGUMENT; } @@ -421,9 +405,7 @@ status_t timeline_item_storage_mark_synced(TimelineItemStorage *storage, return rv; } -static void prv_flush_rewrite_cb(SettingsFile *old, - SettingsFile *new, - SettingsRecordInfo *info, +static void prv_flush_rewrite_cb(SettingsFile *old, SettingsFile *new, SettingsRecordInfo *info, void *context) { if ((unsigned)info->key_len != sizeof(Uuid) || (unsigned)info->val_len < sizeof(SerializedTimelineItemHeader)) { diff --git a/src/fw/services/blob_db/watch_app_prefs_db.c b/src/fw/services/blob_db/watch_app_prefs_db.c index 1db5535d56..95194cefad 100644 --- a/src/fw/services/blob_db/watch_app_prefs_db.c +++ b/src/fw/services/blob_db/watch_app_prefs_db.c @@ -34,10 +34,8 @@ T_STATIC const char *PREF_KEY_SEND_TEXT_APP = "sendTextApp"; static status_t prv_lock_mutex_and_open_file(void) { pbl_mutex_lock(&s_watch_app_prefs_db.mutex, PBL_FOREVER); - status_t rv = settings_file_open_growable(&s_watch_app_prefs_db.settings_file, - SETTINGS_FILE_NAME, - SETTINGS_FILE_SIZE, - KiBYTES(4)); + status_t rv = settings_file_open_growable(&s_watch_app_prefs_db.settings_file, SETTINGS_FILE_NAME, + SETTINGS_FILE_SIZE, KiBYTES(4)); if (rv != S_SUCCESS) { pbl_mutex_unlock(&s_watch_app_prefs_db.mutex); } @@ -58,13 +56,13 @@ static void *prv_get_prefs(const char *pref_key) { return NULL; } - const int len = settings_file_get_len(&s_watch_app_prefs_db.settings_file, pref_key, - strlen(pref_key)); + const int len = + settings_file_get_len(&s_watch_app_prefs_db.settings_file, pref_key, strlen(pref_key)); void *prefs = task_zalloc(len); if (prefs) { - rv = settings_file_get(&s_watch_app_prefs_db.settings_file, pref_key, - strlen(pref_key), prefs, len); + rv = settings_file_get(&s_watch_app_prefs_db.settings_file, pref_key, strlen(pref_key), prefs, + len); if (rv != S_SUCCESS) { task_free(prefs); prefs = NULL; @@ -94,8 +92,8 @@ SerializedReminderAppPrefs *watch_app_prefs_get_reminder(void) { } else { result = prv_get_prefs(PREF_KEY_REMINDER_APP); s_watch_app_prefs_db.is_cached_reminder_app_prefs_valid = true; - s_watch_app_prefs_db.cached_reminder_app_prefs = result ? *result : - (SerializedReminderAppPrefs) {}; + s_watch_app_prefs_db.cached_reminder_app_prefs = + result ? *result : (SerializedReminderAppPrefs){}; } pbl_mutex_unlock(&s_watch_app_prefs_db.mutex); return result; @@ -164,8 +162,7 @@ status_t watch_app_prefs_db_insert(const uint8_t *key, int key_len, const uint8_ // Cache the data we just set if it was for the Reminders app const int expected_reminder_app_prefs_size = sizeof(SerializedReminderAppPrefs); - if ((rv == S_SUCCESS) && - is_valid_reminder_key && + if ((rv == S_SUCCESS) && is_valid_reminder_key && (val_len == expected_reminder_app_prefs_size)) { s_watch_app_prefs_db.is_cached_reminder_app_prefs_valid = true; memcpy(&s_watch_app_prefs_db.cached_reminder_app_prefs, val, diff --git a/src/fw/services/blob_db/weather_db.c b/src/fw/services/blob_db/weather_db.c index 1366cdd8a1..e5aab4c8a4 100644 --- a/src/fw/services/blob_db/weather_db.c +++ b/src/fw/services/blob_db/weather_db.c @@ -34,10 +34,8 @@ typedef struct WeatherDBIteratorData { static status_t prv_lock_mutex_and_open_file(void) { pbl_mutex_lock(&s_weather_db.mutex, PBL_FOREVER); - status_t rv = settings_file_open_growable(&s_weather_db.settings_file, - SETTINGS_FILE_NAME, - SETTINGS_FILE_SIZE, - KiBYTES(4)); + status_t rv = settings_file_open_growable(&s_weather_db.settings_file, SETTINGS_FILE_NAME, + SETTINGS_FILE_SIZE, KiBYTES(4)); if (rv != S_SUCCESS) { pbl_mutex_unlock(&s_weather_db.mutex); } @@ -54,8 +52,7 @@ static void prv_close_file_and_unlock_mutex(void) { // SerializedArray header, its data_size, and every pstring16 a reader can be // handed. The walk mirrors pstring.c (traversal advances by the LOW byte of a // pstring's length; the full uint16 length is what gets read back out). -static bool prv_strings_block_is_valid(const uint8_t *val, size_t val_len, - size_t strings_offset) { +static bool prv_strings_block_is_valid(const uint8_t *val, size_t val_len, size_t strings_offset) { if (strings_offset + sizeof(SerializedArray) > val_len) { return false; } @@ -109,14 +106,9 @@ status_t weather_db_for_each(WeatherDBIteratorCallback callback, void *context) return rv; } - WeatherDBIteratorData data = (WeatherDBIteratorData) { - .cb = callback, - .cb_ctx = context - }; + WeatherDBIteratorData data = (WeatherDBIteratorData){.cb = callback, .cb_ctx = context}; - settings_file_each(&s_weather_db.settings_file, - prv_weather_db_for_each_cb, - &data); + settings_file_each(&s_weather_db.settings_file, prv_weather_db_for_each_cb, &data); prv_close_file_and_unlock_mutex(); return S_SUCCESS; @@ -159,9 +151,8 @@ status_t weather_db_insert(const uint8_t *key, int key_len, const uint8_t *val, if (!weather_service_supported_by_phone()) { return E_RANGE; } - if (key_len != sizeof(WeatherDBKey) || - val_len < (int) MIN_ENTRY_SIZE || - val_len > (int) MAX_ENTRY_SIZE) { + if (key_len != sizeof(WeatherDBKey) || val_len < (int)MIN_ENTRY_SIZE || + val_len > (int)MAX_ENTRY_SIZE) { return E_INVALID_ARGUMENT; } @@ -174,12 +165,11 @@ status_t weather_db_insert(const uint8_t *key, int key_len, const uint8_t *val, // "the newest": demanding the current minor's size rejects every record from a // phone that has not shipped the latest block yet), and the trailing string block // must lie fully inside val_len. - const uint8_t minor = - (entry->version >= WEATHER_DB_CURRENT_VERSION) ? entry->minor_version : 0; + const uint8_t minor = (entry->version >= WEATHER_DB_CURRENT_VERSION) ? entry->minor_version : 0; const size_t strings_offset = weather_db_entry_strings_offset(entry->version, minor); if (!prv_strings_block_is_valid(val, (size_t)val_len, strings_offset)) { - PBL_LOG_WRN("Malformed v%" PRIu8 ".%" PRIu8 " weather record (len %d)", - entry->version, minor, val_len); + PBL_LOG_WRN("Malformed v%" PRIu8 ".%" PRIu8 " weather record (len %d)", entry->version, minor, + val_len); return E_INVALID_ARGUMENT; } @@ -287,8 +277,8 @@ status_t weather_db_get_num_keys(uint16_t *val_out) { } SettingsFileEachKeyHelper key_helper = { - .key_count = 0, - .keys = NULL, + .key_count = 0, + .keys = NULL, }; settings_file_each(&s_weather_db.settings_file, prv_each_inspect_keys, &key_helper); *val_out = key_helper.key_count; @@ -304,8 +294,8 @@ status_t weather_db_get_keys(WeatherDBKey *keys) { } SettingsFileEachKeyHelper key_helper = { - .key_count = 0, - .keys = keys, + .key_count = 0, + .keys = keys, }; settings_file_each(&s_weather_db.settings_file, prv_each_inspect_keys, &key_helper); diff --git a/src/fw/services/bluetooth/ble_bas.c b/src/fw/services/bluetooth/ble_bas.c index 29627142ff..8eff84403d 100644 --- a/src/fw/services/bluetooth/ble_bas.c +++ b/src/fw/services/bluetooth/ble_bas.c @@ -29,9 +29,9 @@ static void prv_start_ble_bas_kernel_main(void *unused) { battery_state = sys_battery_get_charge_state(); bt_driver_bas_handle_update(battery_state.charge_percent); - s_bas_evt = (EventServiceInfo) { - .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, - .handler = prv_ble_bas_handle_event, + s_bas_evt = (EventServiceInfo){ + .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, + .handler = prv_ble_bas_handle_event, }; event_service_client_subscribe(&s_bas_evt); diff --git a/src/fw/services/bluetooth/ble_hrm.c b/src/fw/services/bluetooth/ble_hrm.c index cba637cbb3..a7d1267e88 100644 --- a/src/fw/services/bluetooth/ble_hrm.c +++ b/src/fw/services/bluetooth/ble_hrm.c @@ -59,13 +59,11 @@ typedef struct BLEHRMSharingPermission { static BLEHRMSharingPermission *s_permissions_head; static bool prv_hw_and_sw_supports_hrm(void) { - return (bt_driver_is_hrm_service_supported() && - sys_hrm_manager_is_hrm_present()); + return (bt_driver_is_hrm_service_supported() && sys_hrm_manager_is_hrm_present()); } bool ble_hrm_is_supported_and_enabled(void) { - return (prv_hw_and_sw_supports_hrm() && - activity_prefs_heart_rate_is_enabled()); + return (prv_hw_and_sw_supports_hrm() && activity_prefs_heart_rate_is_enabled()); } static void prv_reset_subscriptions(void); @@ -87,9 +85,8 @@ static bool prv_find_permission_by_device_filter_cb(ListNode *found_node, void * } static BLEHRMSharingPermission *prv_find_permission_by_device(const BTDeviceInternal *device) { - return (BLEHRMSharingPermission *)list_find((ListNode *)s_permissions_head, - prv_find_permission_by_device_filter_cb, - (void *)device); + return (BLEHRMSharingPermission *)list_find( + (ListNode *)s_permissions_head, prv_find_permission_by_device_filter_cb, (void *)device); } static void prv_upsert_permission(const BTDeviceInternal *device, HrmSharingPermission permission) { @@ -97,8 +94,8 @@ static void prv_upsert_permission(const BTDeviceInternal *device, HrmSharingPerm if (!p) { p = kernel_zalloc_check(sizeof(*p)); p->device = *device; - s_permissions_head = (BLEHRMSharingPermission *)list_prepend((ListNode *)s_permissions_head, - (ListNode *)p); + s_permissions_head = + (BLEHRMSharingPermission *)list_prepend((ListNode *)s_permissions_head, (ListNode *)p); } p->permission = permission; } @@ -146,7 +143,7 @@ typedef struct { } CopySharingDevicesCtx; static void prv_copy_sharing_devices_for_each_connection_cb(GAPLEConnection *connection, - void *data) { + void *data) { CopySharingDevicesCtx *ctx = data; if (ctx->slots_left && prv_is_sharing(connection)) { *ctx->next_permitted_device = connection->device; @@ -155,12 +152,11 @@ static void prv_copy_sharing_devices_for_each_connection_cb(GAPLEConnection *con } } -static size_t prv_copy_sharing_devices(BTDeviceInternal *devices_out, - size_t max_devices) { +static size_t prv_copy_sharing_devices(BTDeviceInternal *devices_out, size_t max_devices) { bt_lock(); CopySharingDevicesCtx ctx = { - .next_permitted_device = devices_out, - .slots_left = max_devices, + .next_permitted_device = devices_out, + .slots_left = max_devices, }; gap_le_connection_for_each(prv_copy_sharing_devices_for_each_connection_cb, &ctx); bt_unlock(); @@ -180,34 +176,31 @@ static void prv_ble_hrm_handle_hrm_data(PebbleEvent *e, void *context) { return; } const BleHrmServiceMeasurement measurement = { - .bpm = hrm_event->bpm.bpm, - .is_on_wrist = (hrm_event->bpm.quality >= HRMQuality_Worst), + .bpm = hrm_event->bpm.bpm, + .is_on_wrist = (hrm_event->bpm.quality >= HRMQuality_Worst), }; BTDeviceInternal sharing_to_devices[4]; - const size_t num_devices = prv_copy_sharing_devices(sharing_to_devices, - ARRAY_LENGTH(sharing_to_devices)); + const size_t num_devices = + prv_copy_sharing_devices(sharing_to_devices, ARRAY_LENGTH(sharing_to_devices)); bt_driver_hrm_service_handle_measurement(&measurement, sharing_to_devices, num_devices); } static void prv_start_hrm_kernel_main(void *unused) { PBL_LOG_INFO("BLE HRM sharing started"); - s_ble_hrm_session.service_info = (EventServiceInfo) { - .type = PEBBLE_HRM_EVENT, - .handler = prv_ble_hrm_handle_hrm_data, + s_ble_hrm_session.service_info = (EventServiceInfo){ + .type = PEBBLE_HRM_EVENT, + .handler = prv_ble_hrm_handle_hrm_data, }; event_service_client_subscribe(&s_ble_hrm_session.service_info); - s_ble_hrm_session.manager_session = - hrm_manager_subscribe_with_callback(INSTALL_ID_INVALID, 1 /*update_interval_s*/, - 0 /*expire_s*/, HRMFeature_BPM, NULL, NULL); - + s_ble_hrm_session.manager_session = hrm_manager_subscribe_with_callback( + INSTALL_ID_INVALID, 1 /*update_interval_s*/, 0 /*expire_s*/, HRMFeature_BPM, NULL, NULL); } static void prv_stop_hrm_kernel_main(void *unused) { PBL_LOG_INFO("BLE HRM sharing stopped"); sys_hrm_manager_unsubscribe(s_ble_hrm_session.manager_session); event_service_client_unsubscribe(&s_ble_hrm_session.service_info); - } static void prv_execute_on_kernel_main(CallbackEventCallback cb) { @@ -234,14 +227,14 @@ static void prv_put_sharing_state_updated_event(int subscription_count) { // - refresh the Settings/Bluetooth UI whenever a device (un)subscribes. // - present a "Sharing HRM" icon in the Settings app glance. PebbleEvent e = { - .type = PEBBLE_BLE_HRM_SHARING_STATE_UPDATED_EVENT, - .bluetooth = { - .le = { - .hrm_sharing_state = { - .subscription_count = subscription_count, - }, + .type = PEBBLE_BLE_HRM_SHARING_STATE_UPDATED_EVENT, + .bluetooth = { + .le = { + .hrm_sharing_state = { + .subscription_count = subscription_count, + }, + }, }, - }, }; event_put(&e); } @@ -274,8 +267,8 @@ static void prv_stop_popup_timer(void) { static void prv_reschedule_popup_timer(void) { prv_stop_popup_timer(); - s_ble_hrm_timer = (RegularTimerInfo) { - .cb = prv_reminder_popup_timer_cb, + s_ble_hrm_timer = (RegularTimerInfo){ + .cb = prv_reminder_popup_timer_cb, }; regular_timer_add_multiminute_callback(&s_ble_hrm_timer, BLE_HRM_REMINDER_POPUP_DELAY_MINS); } @@ -334,7 +327,6 @@ void ble_hrm_revoke_sharing_permission_for_connection(GAPLEConnection *connectio prv_disconnect_to_kill_subscription(connection); } bt_unlock(); - } static void prv_revoke_gap_le_connection_for_each_cb(GAPLEConnection *connection, void *unused) { @@ -407,7 +399,6 @@ void ble_hrm_handle_sharing_request_response(bool is_granted, bt_unlock(); kernel_free(sharing_request); - } void bt_driver_cb_hrm_service_update_subscription(const BTDeviceInternal *device, @@ -443,7 +434,7 @@ void ble_hrm_handle_disconnection(GAPLEConnection *connection) { void ble_hrm_init(void) { s_ble_hrm_is_inited = true; - s_ble_hrm_timer = (RegularTimerInfo) {}; + s_ble_hrm_timer = (RegularTimerInfo){}; } void ble_hrm_deinit(void) { diff --git a/src/fw/services/bluetooth/bluetooth_ctl.c b/src/fw/services/bluetooth/bluetooth_ctl.c index 06a476083b..3d4994feca 100644 --- a/src/fw/services/bluetooth/bluetooth_ctl.c +++ b/src/fw/services/bluetooth/bluetooth_ctl.c @@ -33,7 +33,9 @@ static bool s_comm_state_change_eval_is_scheduled; static BtCtlModeOverride s_comm_override = BtCtlModeOverrideNone; static PBL_MUTEX_DEFINE(s_comm_state_change_mutex); -bool bt_ctl_is_airplane_mode_on(void) { return s_comm_airplane_mode_on; } +bool bt_ctl_is_airplane_mode_on(void) { + return s_comm_airplane_mode_on; +} bool bt_ctl_is_bluetooth_active(void) { if (s_comm_enabled) { @@ -46,14 +48,18 @@ bool bt_ctl_is_bluetooth_active(void) { return false; } -bool bt_ctl_is_bluetooth_running(void) { return s_comm_is_running; } +bool bt_ctl_is_bluetooth_running(void) { + return s_comm_is_running; +} static void prv_put_disconnection_event(void) { - PebbleEvent event = (PebbleEvent){.type = PEBBLE_BT_CONNECTION_EVENT, - .bluetooth.connection = { - .is_ble = true, - .state = PebbleBluetoothConnectionEventStateDisconnected, - }}; + PebbleEvent event = (PebbleEvent){ + .type = PEBBLE_BT_CONNECTION_EVENT, + .bluetooth.connection = { + .is_ble = true, + .state = PebbleBluetoothConnectionEventStateDisconnected, + } + }; PBL_LOG_DBG("New BT Conn change event, We are now disconnected"); event_put(&event); } @@ -67,8 +73,7 @@ static void prv_comm_start(void) { dis_get_info(&config->dis_info); #if defined(CONFIG_HRM) && !defined(CONFIG_RECOVERY_FW) config->is_hrm_supported_and_enabled = ble_hrm_is_supported_and_enabled(); - PBL_LOG_INFO("BLE HRM sharing prefs: is_enabled=%u", - config->is_hrm_supported_and_enabled); + PBL_LOG_INFO("BLE HRM sharing prefs: is_enabled=%u", config->is_hrm_supported_and_enabled); #endif // Register existing bondings before bringing the connection up: NimBLE // restores them before the link is established. The other backends use @@ -115,15 +120,13 @@ static void prv_send_state_change_event(void) { PBL_LOG_DBG("----> Sending a BT state event"); PebbleEvent event = { .type = PEBBLE_BT_STATE_EVENT, - .bluetooth = - { - .state = - { - .airplane = s_comm_airplane_mode_on, - .enabled = s_comm_enabled, - .override = s_comm_override, - }, + .bluetooth = { + .state = { + .airplane = s_comm_airplane_mode_on, + .enabled = s_comm_enabled, + .override = s_comm_override, }, + }, }; event_put(&event); if (s_comm_airplane_mode_on) { @@ -213,7 +216,6 @@ void bt_ctl_set_airplane_mode_async(bool enabled) { } void bt_ctl_init(void) { - s_comm_airplane_mode_on = bt_persistent_storage_get_airplane_mode_enabled(); s_comm_initialized = true; diff --git a/src/fw/services/bluetooth/bluetooth_persistent_storage_debug.c b/src/fw/services/bluetooth/bluetooth_persistent_storage_debug.c index 8ffaa89389..2ba585162c 100644 --- a/src/fw/services/bluetooth/bluetooth_persistent_storage_debug.c +++ b/src/fw/services/bluetooth/bluetooth_persistent_storage_debug.c @@ -18,58 +18,51 @@ // in the gap bonding db and shared PRF. // -void bluetooth_persistent_storage_debug_dump_ble_pairing_info( - char *display_buf, const SMPairingInfo *info) { +void bluetooth_persistent_storage_debug_dump_ble_pairing_info(char *display_buf, + const SMPairingInfo *info) { prompt_send_response(" Local Encryption Info: "); - PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, - (uint8_t *)&info->local_encryption_info, + PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, (uint8_t *)&info->local_encryption_info, sizeof(info->local_encryption_info)); prompt_send_response(" Remote Encryption Info: "); - PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, - (uint8_t *)&info->remote_encryption_info, + PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, (uint8_t *)&info->remote_encryption_info, sizeof(info->remote_encryption_info)); prompt_send_response(" SMIdentityResolvingKey: "); - PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, - (uint8_t *)&info->irk, - sizeof(info->irk)); + PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, (uint8_t *)&info->irk, sizeof(info->irk)); prompt_send_response(" BTDeviceInternal: "); - PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, - (uint8_t *)&info->identity, - sizeof(BTDeviceInternal)); + PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, (uint8_t *)&info->identity, sizeof(BTDeviceInternal)); prompt_send_response(" SMConnectionSignatureResolvingKey: "); - PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, - (uint8_t *)&info->csrk, + PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, (uint8_t *)&info->csrk, sizeof(SMConnectionSignatureResolvingKey)); prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, - " local encryption valid: %s\n" - " remote encryption valid: %s\n" - " remote identity valid: %s\n" - " remote signature valid: %s\n", - bool_to_str(info->is_local_encryption_info_valid), - bool_to_str(info->is_remote_encryption_info_valid), - bool_to_str(info->is_remote_encryption_info_valid), - bool_to_str(info->is_remote_signing_info_valid)); + " local encryption valid: %s\n" + " remote encryption valid: %s\n" + " remote identity valid: %s\n" + " remote signature valid: %s\n", + bool_to_str(info->is_local_encryption_info_valid), + bool_to_str(info->is_remote_encryption_info_valid), + bool_to_str(info->is_remote_encryption_info_valid), + bool_to_str(info->is_remote_signing_info_valid)); } -void bluetooth_persistent_storage_debug_dump_classic_pairing_info( - char *display_buf, BTDeviceAddress *addr, char *device_name, SM128BitKey *link_key, - uint8_t platform_bits) { +void bluetooth_persistent_storage_debug_dump_classic_pairing_info(char *display_buf, + BTDeviceAddress *addr, + char *device_name, + SM128BitKey *link_key, + uint8_t platform_bits) { prompt_send_response(" Link Key:"); PBL_HEXDUMP_D_PROMPT(LOG_LEVEL_DEBUG, (uint8_t *)link_key, sizeof(SM128BitKey)); prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " BT ADDR: " BD_ADDR_FMT, - BT_DEVICE_ADDRESS_XPLODE(*addr)); - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Name: %s", - device_name); + BT_DEVICE_ADDRESS_XPLODE(*addr)); + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Name: %s", device_name); prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Platform Bits: 0x%x", - (int)platform_bits); + (int)platform_bits); } - void bluetooth_persistent_storage_debug_dump_root_keys(SM128BitKey *irk, SM128BitKey *erk) { prompt_send_response("Root Key hexdumps:"); diff --git a/src/fw/services/bluetooth/bluetooth_persistent_storage_normal.c b/src/fw/services/bluetooth/bluetooth_persistent_storage_normal.c index a9c109fa4d..e20780e425 100644 --- a/src/fw/services/bluetooth/bluetooth_persistent_storage_normal.c +++ b/src/fw/services/bluetooth/bluetooth_persistent_storage_normal.c @@ -30,9 +30,9 @@ PBL_LOG_MODULE_DECLARE(service_bluetooth, CONFIG_SERVICE_BLUETOOTH_LOG_LEVEL); #ifdef UNITTEST // Let the unittest define this using a header override: -# include "pbl/services/bluetooth/bluetooth_persistent_storage_unittest_impl.h" +#include "pbl/services/bluetooth/bluetooth_persistent_storage_unittest_impl.h" #else -# include "pbl/services/bluetooth/bluetooth_persistent_storage_v2_impl.h" +#include "pbl/services/bluetooth/bluetooth_persistent_storage_v2_impl.h" #endif //! The BtPersistBonding*Data structs can never shrink, only grow @@ -48,16 +48,16 @@ typedef struct PACKED { //! Stores data about a remote BLE device typedef struct PACKED { - bool supports_ancs:1; - bool is_gateway:1; - bool requires_address_pinning:1; - uint8_t flags:5; + bool supports_ancs : 1; + bool is_gateway : 1; + bool requires_address_pinning : 1; + uint8_t flags : 5; char name[BT_DEVICE_NAME_BUFFER_SIZE]; BtPersistLEPairingInfo pairing_info; } BtPersistBondingBLEData; typedef struct PACKED { - BtPersistBondingType type:8; + BtPersistBondingType type : 8; union PACKED { BtPersistBondingBTClassicData bt_classic_data; @@ -69,7 +69,7 @@ typedef struct PACKED { BTDeviceInternal peer; uint16_t chr_val_handle; uint16_t flags; - unsigned value_changed:1; + unsigned value_changed : 1; } BtPersistCCCDData; typedef struct PACKED { @@ -121,9 +121,11 @@ static void prv_unlock(void) { pbl_mutex_unlock(&s_db_mutex); } -static bool prv_bt_persistent_storage_get_ble_smpairinginfo_by_id( - BTBondingID bonding, SMPairingInfo *info_out, char *name_out, bool *requires_address_pinning, - uint8_t *flags); +static bool prv_bt_persistent_storage_get_ble_smpairinginfo_by_id(BTBondingID bonding, + SMPairingInfo *info_out, + char *name_out, + bool *requires_address_pinning, + uint8_t *flags); static void prv_update_bondings(BTBondingID id, BtPersistBondingType type) { if (id == BT_BONDING_ID_INVALID) { @@ -132,16 +134,15 @@ static void prv_update_bondings(BTBondingID id, BtPersistBondingType type) { if (type == BtPersistBondingTypeBLE) { SMPairingInfo pairing_info; - char ble_name[BT_DEVICE_NAME_BUFFER_SIZE] = { }; + char ble_name[BT_DEVICE_NAME_BUFFER_SIZE] = {}; bool requires_address_pinning = false; uint8_t flags = 0; - if (prv_bt_persistent_storage_get_ble_smpairinginfo_by_id( - id, &pairing_info, ble_name, &requires_address_pinning, - &flags)) { + if (prv_bt_persistent_storage_get_ble_smpairinginfo_by_id(id, &pairing_info, ble_name, + &requires_address_pinning, &flags)) { // only send the ble_name if we have a name to send! char *ble_name_ptr = (strlen(ble_name) == 0) ? NULL : &ble_name[0]; - shared_prf_storage_store_ble_pairing_data( - &pairing_info, ble_name_ptr, requires_address_pinning, flags); + shared_prf_storage_store_ble_pairing_data(&pairing_info, ble_name_ptr, + requires_address_pinning, flags); } } } @@ -155,8 +156,8 @@ static int prv_file_get(const void *key, size_t key_len, void *data_out, size_t prv_lock(); { SettingsFile fd; - status_t rv = settings_file_open(&fd, BT_PERSISTENT_STORAGE_FILE_NAME, - BT_PERSISTENT_STORAGE_FILE_SIZE); + status_t rv = + settings_file_open(&fd, BT_PERSISTENT_STORAGE_FILE_NAME, BT_PERSISTENT_STORAGE_FILE_SIZE); if (rv != S_SUCCESS) { goto cleanup; } @@ -179,9 +180,8 @@ static int prv_file_get(const void *key, size_t key_len, void *data_out, size_t //! or if the stored data has been corrupted. static bool prv_file_get_bool(const void *key, size_t key_len, bool default_value) { uint8_t bool_data; - int read_size = prv_file_get(key, key_len, (void*)&bool_data, sizeof(bool_data)); - if (!read_size || - ((bool_data != (uint8_t)true) && (bool_data != (uint8_t)false))) { + int read_size = prv_file_get(key, key_len, (void *)&bool_data, sizeof(bool_data)); + if (!read_size || ((bool_data != (uint8_t)true) && (bool_data != (uint8_t)false))) { return default_value; } // Default to false in the case of data corruption (anything other than 0x1 or 0x0). @@ -195,8 +195,8 @@ typedef enum { GapBondingFileSetNoUpdateNeeded, } GapBondingFileSetStatus; -static GapBondingFileSetStatus prv_file_set( - const void *key, size_t key_len, const void *data_in, size_t data_len) { +static GapBondingFileSetStatus prv_file_set(const void *key, size_t key_len, const void *data_in, + size_t data_len) { status_t rv; bool do_perform_update = true; prv_lock(); @@ -226,7 +226,7 @@ static GapBondingFileSetStatus prv_file_set( PBL_LOG_D_DBG(LOG_DOMAIN_BT_PAIRING_INFO, "Updating GAP Bonding DB Value !"); PBL_HEXDUMP_D(LOG_DOMAIN_BT_PAIRING_INFO, LOG_LEVEL_DEBUG, (uint8_t *)key, key_len); PBL_HEXDUMP_D(LOG_DOMAIN_BT_PAIRING_INFO, LOG_LEVEL_DEBUG, (uint8_t *)data_in, data_len); - rv = settings_file_set(&fd, key, key_len, (uint8_t*) data_in, data_len); + rv = settings_file_set(&fd, key, key_len, (uint8_t *)data_in, data_len); } } else { rv = settings_file_delete(&fd, key, key_len); @@ -236,7 +236,7 @@ static GapBondingFileSetStatus prv_file_set( cleanup: prv_unlock(); if (rv != S_SUCCESS) { - PBL_LOG_ERR("Failed to update gap bonding db, rv = %"PRId32, rv); + PBL_LOG_ERR("Failed to update gap bonding db, rv = %" PRId32, rv); return GapBondingFileSetFail; } @@ -262,7 +262,6 @@ static bool prv_file_each(SettingsFileEachCallback itr_cb, void *itr_data) { return (rv == S_SUCCESS); } - //! Get the next available BondingID //! This function re-uses bonding ids as they are freed. This could be a problem with 3rd party //! apps. https://pebbletechnology.atlassian.net/browse/PBL-8391 @@ -271,22 +270,21 @@ static BTBondingID prv_get_free_key() { prv_lock(); { - SettingsFile fd; - status_t rv = settings_file_open(&fd, BT_PERSISTENT_STORAGE_FILE_NAME, - BT_PERSISTENT_STORAGE_FILE_SIZE); - if (rv) { - goto cleanup; - } - - for (BTBondingID id = 0; id < BT_BONDING_ID_INVALID; id++) { - if (!settings_file_exists(&fd, &id, sizeof(id))) { - free_key = id; - break; + SettingsFile fd; + status_t rv = + settings_file_open(&fd, BT_PERSISTENT_STORAGE_FILE_NAME, BT_PERSISTENT_STORAGE_FILE_SIZE); + if (rv) { + goto cleanup; } - } - settings_file_close(&fd); + for (BTBondingID id = 0; id < BT_BONDING_ID_INVALID; id++) { + if (!settings_file_exists(&fd, &id, sizeof(id))) { + free_key = id; + break; + } + } + settings_file_close(&fd); } cleanup: prv_unlock(); @@ -299,30 +297,28 @@ static BTCCCDID prv_get_free_cccd() { prv_lock(); { - SettingsFile fd; - status_t rv = settings_file_open(&fd, BT_PERSISTENT_STORAGE_FILE_NAME, - BT_PERSISTENT_STORAGE_FILE_SIZE); - if (rv) { - goto cleanup; - } - - for (BTCCCDID id = 0U; id < BT_CCCD_ID_INVALID; id++) { - if (!settings_file_exists(&fd, &id, sizeof(id))) { - free_cccd = id; - break; + SettingsFile fd; + status_t rv = + settings_file_open(&fd, BT_PERSISTENT_STORAGE_FILE_NAME, BT_PERSISTENT_STORAGE_FILE_SIZE); + if (rv) { + goto cleanup; } - } - settings_file_close(&fd); + for (BTCCCDID id = 0U; id < BT_CCCD_ID_INVALID; id++) { + if (!settings_file_exists(&fd, &id, sizeof(id))) { + free_cccd = id; + break; + } + } + settings_file_close(&fd); } cleanup: prv_unlock(); return free_cccd; } -static bool prv_any_pinned_ble_pairings_itr(SettingsFile *file, - SettingsRecordInfo *info, +static bool prv_any_pinned_ble_pairings_itr(SettingsFile *file, SettingsRecordInfo *info, void *context) { if (info->key_len != sizeof(BTBondingID)) { return true; @@ -332,7 +328,7 @@ static bool prv_any_pinned_ble_pairings_itr(SettingsFile *file, } BTBondingID key; - info->get_key(file, (uint8_t*) &key, info->key_len); + info->get_key(file, (uint8_t *)&key, info->key_len); BtPersistBondingData data = {}; info->get_val(file, &data, MIN((unsigned)info->val_len, sizeof(data))); @@ -351,7 +347,6 @@ bool bt_persistent_storage_has_pinned_ble_pairings(void) { return has_pinned_ble_pairings; } - /////////////////////////////////////////////////////////////////////////////////////////////////// //! Shared PRF Storage @@ -381,7 +376,7 @@ static void prv_load_local_data_from_prf(void) { shared_prf_storage_get_root_key(SMRootKeyTypeIdentity, &keys[SMRootKeyTypeIdentity])) { #if !defined(CONFIG_RELEASE) PBL_LOG_INFO("Loading Root Keys from PRF storage:"); - PBL_HEXDUMP(LOG_LEVEL_INFO, (const uint8_t *) keys, sizeof(keys)); + PBL_HEXDUMP(LOG_LEVEL_INFO, (const uint8_t *)keys, sizeof(keys)); #endif bt_persistent_storage_set_root_keys(keys); return; @@ -411,8 +406,7 @@ static void prv_load_ble_pairing_from_prf(void) { bool requires_address_pinning; uint8_t flags; if (!shared_prf_storage_get_ble_pairing_data(&prf_pairing_info, device_name, - &requires_address_pinning, - &flags)) { + &requires_address_pinning, &flags)) { // No pairing available, check to see if we have a pairing in the gapDB prv_push_ble_persist_to_shared_prf(); return; @@ -489,7 +483,6 @@ static void prv_call_common_bonding_change_handlers(BTBondingID bonding, BtPersi bt_pairability_update_due_to_bonding_change(); } - /////////////////////////////////////////////////////////////////////////////////////////////////// //! BLE Pairing Info void gap_le_connection_handle_bonding_change(BTBondingID bonding, BtPersistBondingOp op); @@ -498,8 +491,7 @@ typedef struct { BtPersistBondingOp op; } BleBondingChangeContext; -static void prv_call_ble_bonding_change_handlers_impl(BTBondingID bonding, - BtPersistBondingOp op) { +static void prv_call_ble_bonding_change_handlers_impl(BTBondingID bonding, BtPersistBondingOp op) { prv_update_active_gateway_if_needed(bonding, op); if (!bt_ctl_is_bluetooth_running()) { @@ -518,8 +510,7 @@ static void prv_call_ble_bonding_change_handlers_cb(void *data) { kernel_free(context); } -static void prv_call_ble_bonding_change_handlers(BTBondingID bonding, - BtPersistBondingOp op) { +static void prv_call_ble_bonding_change_handlers(BTBondingID bonding, BtPersistBondingOp op) { if (launcher_task_is_current_task()) { prv_call_ble_bonding_change_handlers_impl(bonding, op); return; @@ -527,9 +518,9 @@ static void prv_call_ble_bonding_change_handlers(BTBondingID bonding, BleBondingChangeContext *context = kernel_malloc_check(sizeof(*context)); - *context = (BleBondingChangeContext) { - .bonding = bonding, - .op = op, + *context = (BleBondingChangeContext){ + .bonding = bonding, + .op = op, }; launcher_task_add_callback(prv_call_ble_bonding_change_handlers_cb, context); } @@ -541,32 +532,31 @@ typedef struct { static bool prv_is_pairing_info_equal_identity(const BtPersistLEPairingInfo *a, const SMPairingInfo *b) { - return (a->is_remote_identity_info_valid && - b->is_remote_identity_info_valid && + return (a->is_remote_identity_info_valid && b->is_remote_identity_info_valid && bt_device_equal(&a->identity.opaque, &b->identity.opaque) && memcmp(&a->irk, &b->irk, sizeof(SMIdentityResolvingKey)) == 0); } -static bool prv_get_key_for_sm_pairing_info_itr(SettingsFile *file, - SettingsRecordInfo *info, void *context) { +static bool prv_get_key_for_sm_pairing_info_itr(SettingsFile *file, SettingsRecordInfo *info, + void *context) { // check entry is valid if (info->val_len == 0 || info->key_len != sizeof(BTBondingID)) { - return true; // continue iterating + return true; // continue iterating } - KeyForSMPairingItrData *itr_data = (KeyForSMPairingItrData*) context; + KeyForSMPairingItrData *itr_data = (KeyForSMPairingItrData *)context; BTBondingID key; - info->get_key(file, (uint8_t*) &key, info->key_len); + info->get_key(file, (uint8_t *)&key, info->key_len); BtPersistBondingData stored_data; - info->get_val(file, (uint8_t*) &stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); + info->get_val(file, (uint8_t *)&stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); if (stored_data.type == BtPersistBondingTypeBLE && prv_is_pairing_info_equal_identity(&stored_data.ble_data.pairing_info, &itr_data->pairing_info)) { itr_data->key_out = key; - return false; // stop iterating + return false; // stop iterating } return true; @@ -574,8 +564,8 @@ static bool prv_get_key_for_sm_pairing_info_itr(SettingsFile *file, static BTBondingID prv_get_key_for_sm_pairing_info(const SMPairingInfo *pairing_info) { KeyForSMPairingItrData itr_data = { - .pairing_info = *pairing_info, - .key_out = BT_BONDING_ID_INVALID, + .pairing_info = *pairing_info, + .key_out = BT_BONDING_ID_INVALID, }; prv_file_each(prv_get_key_for_sm_pairing_info_itr, &itr_data); @@ -629,8 +619,8 @@ static bool prv_collect_other_ble_bondings_itr(SettingsFile *file, SettingsRecor //! entry is the one that should remain reflected in PRF storage. static void prv_delete_other_ble_bondings(BTBondingID keep_id) { CollectOtherBleItrData itr_data = { - .keep_id = keep_id, - .count = 0, + .keep_id = keep_id, + .count = 0, }; prv_file_each(prv_collect_other_ble_bondings_itr, &itr_data); @@ -677,9 +667,9 @@ static bool prv_find_most_recent_ble_bonding_itr(SettingsFile *file, SettingsRec //! recently modified entry and drop the rest. static void prv_prune_stale_ble_bondings(void) { MostRecentBleItrData itr_data = { - .key_out = BT_BONDING_ID_INVALID, - .last_modified_out = 0, - .ble_count = 0, + .key_out = BT_BONDING_ID_INVALID, + .last_modified_out = 0, + .ble_count = 0, }; prv_file_each(prv_find_most_recent_ble_bonding_itr, &itr_data); @@ -687,14 +677,14 @@ static void prv_prune_stale_ble_bondings(void) { return; } - PBL_LOG_INFO("Found %u BLE bondings at boot, keeping most recent (id %d)", - itr_data.ble_count, itr_data.key_out); + PBL_LOG_INFO("Found %u BLE bondings at boot, keeping most recent (id %d)", itr_data.ble_count, + itr_data.key_out); prv_delete_other_ble_bondings(itr_data.key_out); } //! For unit testing -int bt_persistent_storage_get_raw_data(const void *key, size_t key_len, - void *data_out, size_t buf_len) { +int bt_persistent_storage_get_raw_data(const void *key, size_t key_len, void *data_out, + size_t buf_len) { return prv_file_get(key, key_len, data_out, buf_len); } @@ -712,8 +702,7 @@ bool bt_persistent_storage_set_ble_pinned_address(const BTDeviceAddress *addr) { BTBondingID bt_persistent_storage_store_ble_pairing(const SMPairingInfo *new_pairing_info, bool is_gateway, const char *device_name, - bool requires_address_pinning, - uint8_t flags) { + bool requires_address_pinning, uint8_t flags) { if (!new_pairing_info || sm_is_pairing_info_empty(new_pairing_info)) { return BT_BONDING_ID_INVALID; } @@ -735,17 +724,17 @@ BTBondingID bt_persistent_storage_store_ble_pairing(const SMPairingInfo *new_pai } BtPersistBondingData new_data; - new_data = (BtPersistBondingData) { - .type = BtPersistBondingTypeBLE, - .ble_data.is_gateway = is_gateway, - .ble_data.flags = flags, - // This is defaulting to "is_gateway" for now because it is currently being used as the flag - // for the pairing that we want to reconnect/connect to. If this isn't set then - // we don't register an intent for the device and thus don't connect. - // Currently only 1 ble pairing is really supported so this works for now - // FIXME: https://pebbletechnology.atlassian.net/browse/PBL-15277 - .ble_data.supports_ancs = is_gateway, - .ble_data.requires_address_pinning = requires_address_pinning, + new_data = (BtPersistBondingData){ + .type = BtPersistBondingTypeBLE, + .ble_data.is_gateway = is_gateway, + .ble_data.flags = flags, + // This is defaulting to "is_gateway" for now because it is currently being used as the flag + // for the pairing that we want to reconnect/connect to. If this isn't set then + // we don't register an intent for the device and thus don't connect. + // Currently only 1 ble pairing is really supported so this works for now + // FIXME: https://pebbletechnology.atlassian.net/browse/PBL-15277 + .ble_data.supports_ancs = is_gateway, + .ble_data.requires_address_pinning = requires_address_pinning, }; bt_persistent_storage_assign_persist_pairing_info(&new_data.ble_data.pairing_info, new_pairing_info); @@ -829,42 +818,40 @@ status_t prv_delete_all_cccd_for_addr(const BTDeviceInternal *dev) { prv_lock(); { - SettingsFile fd; - rv = settings_file_open(&fd, BT_PERSISTENT_STORAGE_FILE_NAME, - BT_PERSISTENT_STORAGE_FILE_SIZE); - if (rv) { - goto cleanup; - } + SettingsFile fd; + rv = settings_file_open(&fd, BT_PERSISTENT_STORAGE_FILE_NAME, BT_PERSISTENT_STORAGE_FILE_SIZE); + if (rv) { + goto cleanup; + } - for (BTCCCDID id = 0U; id < BT_CCCD_ID_INVALID; id++) { - if (settings_file_exists(&fd, &id, sizeof(id))) { - BtPersistCCCDData stored_data; + for (BTCCCDID id = 0U; id < BT_CCCD_ID_INVALID; id++) { + if (settings_file_exists(&fd, &id, sizeof(id))) { + BtPersistCCCDData stored_data; - rv = settings_file_get(&fd, &id, sizeof(id), &stored_data, sizeof(stored_data)); - if (rv) { - goto cleanup; - } + rv = settings_file_get(&fd, &id, sizeof(id), &stored_data, sizeof(stored_data)); + if (rv) { + goto cleanup; + } - if (bt_device_internal_equal(dev, &stored_data.peer)) { - BleCCCD cccd_to_delete = { - .peer = *dev, - .chr_val_handle = stored_data.chr_val_handle, - .flags = stored_data.flags, - .value_changed = stored_data.value_changed, - }; + if (bt_device_internal_equal(dev, &stored_data.peer)) { + BleCCCD cccd_to_delete = { + .peer = *dev, + .chr_val_handle = stored_data.chr_val_handle, + .flags = stored_data.flags, + .value_changed = stored_data.value_changed, + }; - bt_driver_handle_host_removed_cccd(&cccd_to_delete); + bt_driver_handle_host_removed_cccd(&cccd_to_delete); - rv = settings_file_delete(&fd, &id, sizeof(id)); - if (rv) { - goto cleanup; + rv = settings_file_delete(&fd, &id, sizeof(id)); + if (rv) { + goto cleanup; + } } } } - } - - settings_file_close(&fd); + settings_file_close(&fd); } cleanup: prv_unlock(); @@ -903,20 +890,19 @@ typedef struct { bool found; } FindByAddrItrData; -static bool prv_find_by_addr_itr(SettingsFile *file, - SettingsRecordInfo *info, void *context) { +static bool prv_find_by_addr_itr(SettingsFile *file, SettingsRecordInfo *info, void *context) { // check entry is valid if (info->val_len == 0 || info->key_len != sizeof(BTBondingID)) { - return true; // continue iterating + return true; // continue iterating } - FindByAddrItrData *itr_data = (FindByAddrItrData *) context; + FindByAddrItrData *itr_data = (FindByAddrItrData *)context; BTBondingID key; - info->get_key(file, (uint8_t*) &key, info->key_len); + info->get_key(file, (uint8_t *)&key, info->key_len); BtPersistBondingData stored_data; - info->get_val(file, (uint8_t*) &stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); + info->get_val(file, (uint8_t *)&stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); if (stored_data.type == BtPersistBondingTypeBLE && bt_device_equal(&itr_data->device.opaque, @@ -925,16 +911,16 @@ static bool prv_find_by_addr_itr(SettingsFile *file, strncpy(itr_data->name_out, stored_data.ble_data.name, BT_DEVICE_NAME_BUFFER_SIZE); itr_data->id_out = key; itr_data->found = true; - return false; // stop iterating + return false; // stop iterating } - return true; // continue iterating + return true; // continue iterating } void bt_persistent_storage_delete_ble_pairing_by_addr(const BTDeviceInternal *device) { FindByAddrItrData itr_data = { - .device = *device, - .found = false, + .device = *device, + .found = false, }; prv_file_each(prv_find_by_addr_itr, &itr_data); @@ -945,12 +931,9 @@ void bt_persistent_storage_delete_ble_pairing_by_addr(const BTDeviceInternal *de bt_persistent_storage_delete_ble_pairing_by_id(itr_data.id_out); } -static void prv_fill_ble_data(SMIdentityResolvingKey *irk_in, - BTDeviceInternal *device_in, - char *name_in, - SMIdentityResolvingKey *irk_out, - BTDeviceInternal *device_out, - char *name_out) { +static void prv_fill_ble_data(SMIdentityResolvingKey *irk_in, BTDeviceInternal *device_in, + char *name_in, SMIdentityResolvingKey *irk_out, + BTDeviceInternal *device_out, char *name_out) { if (irk_out && irk_in) { *irk_out = *irk_in; } @@ -965,9 +948,8 @@ static void prv_fill_ble_data(SMIdentityResolvingKey *irk_in, } bool bt_persistent_storage_get_ble_pairing_by_id(BTBondingID bonding, - SMIdentityResolvingKey *irk_out, - BTDeviceInternal *device_out, - char *name_out) { + SMIdentityResolvingKey *irk_out, + BTDeviceInternal *device_out, char *name_out) { BtPersistBondingData data; if (!prv_file_get(&bonding, sizeof(bonding), &data, sizeof(data))) { return false; @@ -984,9 +966,11 @@ bool bt_persistent_storage_get_ble_pairing_by_id(BTBondingID bonding, return true; } -static bool prv_bt_persistent_storage_get_ble_smpairinginfo_by_id( - BTBondingID bonding, SMPairingInfo *info_out, char *name_out, bool *requires_address_pinning, - uint8_t *flags) { +static bool prv_bt_persistent_storage_get_ble_smpairinginfo_by_id(BTBondingID bonding, + SMPairingInfo *info_out, + char *name_out, + bool *requires_address_pinning, + uint8_t *flags) { BtPersistBondingData data; if (!prv_file_get(&bonding, sizeof(bonding), &data, sizeof(data))) { return false; @@ -1004,8 +988,7 @@ static bool prv_bt_persistent_storage_get_ble_smpairinginfo_by_id( *requires_address_pinning = data.ble_data.requires_address_pinning; *flags = data.ble_data.flags; - prv_fill_ble_data( - NULL, NULL, data.ble_data.name, NULL, NULL, name_out); + prv_fill_ble_data(NULL, NULL, data.ble_data.name, NULL, NULL, name_out); return true; } @@ -1013,8 +996,8 @@ bool bt_persistent_storage_get_ble_pairing_by_addr(const BTDeviceInternal *devic SMIdentityResolvingKey *irk_out, char name_out[BT_DEVICE_NAME_BUFFER_SIZE]) { FindByAddrItrData itr_data = { - .device = *device, - .found = false, + .device = *device, + .found = false, }; prv_file_each(prv_find_by_addr_itr, &itr_data); @@ -1022,16 +1005,15 @@ bool bt_persistent_storage_get_ble_pairing_by_addr(const BTDeviceInternal *devic return false; } - prv_fill_ble_data(&itr_data.irk_out, NULL, itr_data.name_out, - irk_out, NULL, name_out); + prv_fill_ble_data(&itr_data.irk_out, NULL, itr_data.name_out, irk_out, NULL, name_out); return true; } bool bt_persistent_storage_get_ble_pinned_address(BTDeviceAddress *address_out) { BTDeviceAddress address; - int read_size = prv_file_get(&BLE_PINNED_ADDRESS_KEY, sizeof(BLE_PINNED_ADDRESS_KEY), - &address, sizeof(address)); + int read_size = prv_file_get(&BLE_PINNED_ADDRESS_KEY, sizeof(BLE_PINNED_ADDRESS_KEY), &address, + sizeof(address)); if (!read_size) { return false; } @@ -1041,24 +1023,24 @@ bool bt_persistent_storage_get_ble_pinned_address(BTDeviceAddress *address_out) return true; } -static bool prv_get_first_ancs_bonding_itr(SettingsFile *file, - SettingsRecordInfo *info, void *context) { +static bool prv_get_first_ancs_bonding_itr(SettingsFile *file, SettingsRecordInfo *info, + void *context) { // check entry is valid if (info->val_len == 0 || info->key_len != sizeof(BTBondingID)) { - return true; // continue iterating + return true; // continue iterating } - BTBondingID *first_ancs_supported_bonding_found = (BTBondingID *) context; + BTBondingID *first_ancs_supported_bonding_found = (BTBondingID *)context; BTBondingID key; - info->get_key(file, (uint8_t*) &key, info->key_len); + info->get_key(file, (uint8_t *)&key, info->key_len); BtPersistBondingData stored_data; - info->get_val(file, (uint8_t*) &stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); + info->get_val(file, (uint8_t *)&stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); if (stored_data.type == BtPersistBondingTypeBLE && stored_data.ble_data.supports_ancs) { *first_ancs_supported_bonding_found = key; - return false; // stop iterating + return false; // stop iterating } return true; @@ -1097,8 +1079,8 @@ typedef struct { void *cb_data; } ForEachBLEPairingInternalData; -typedef void (*BtPersistCCCDDBEachBLEInternal)(BTCCCDID key, - BtPersistCCCDData *stored_data, void *ctx); +typedef void (*BtPersistCCCDDBEachBLEInternal)(BTCCCDID key, BtPersistCCCDData *stored_data, + void *ctx); typedef struct { BtPersistCCCDDBEachBLEInternal cb; @@ -1110,28 +1092,28 @@ typedef struct { void *cb_data; } ForEachBLEPairingData; -static void prv_public_for_each_ble_cb(BTBondingID key, - BtPersistBondingData *stored_data, void *context) { +static void prv_public_for_each_ble_cb(BTBondingID key, BtPersistBondingData *stored_data, + void *context) { ForEachBLEPairingData *itr_data = (ForEachBLEPairingData *)context; itr_data->cb(&stored_data->ble_data.pairing_info.identity, - &stored_data->ble_data.pairing_info.irk, - stored_data->ble_data.name, &key, itr_data->cb_data); + &stored_data->ble_data.pairing_info.irk, stored_data->ble_data.name, &key, + itr_data->cb_data); } -static bool prv_ble_pairing_internal_for_each_itr(SettingsFile *file, - SettingsRecordInfo *info, void *context) { +static bool prv_ble_pairing_internal_for_each_itr(SettingsFile *file, SettingsRecordInfo *info, + void *context) { // check entry is valid if (info->val_len == 0 || info->key_len != sizeof(BTBondingID)) { - return true; // continue iterating + return true; // continue iterating } - ForEachBLEPairingInternalData *internal_itr_data = (ForEachBLEPairingInternalData*) context; + ForEachBLEPairingInternalData *internal_itr_data = (ForEachBLEPairingInternalData *)context; BTBondingID key; - info->get_key(file, (uint8_t*) &key, info->key_len); + info->get_key(file, (uint8_t *)&key, info->key_len); BtPersistBondingData stored_data; - info->get_val(file, (uint8_t*) &stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); + info->get_val(file, (uint8_t *)&stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); if (stored_data.type == BtPersistBondingTypeBLE) { internal_itr_data->cb(key, &stored_data, internal_itr_data->cb_data); @@ -1140,20 +1122,20 @@ static bool prv_ble_pairing_internal_for_each_itr(SettingsFile *file, return true; } -static bool prv_ble_cccd_internal_for_each_itr(SettingsFile *file, - SettingsRecordInfo *info, void *context) { +static bool prv_ble_cccd_internal_for_each_itr(SettingsFile *file, SettingsRecordInfo *info, + void *context) { // check entry is valid if (info->val_len == 0 || info->key_len != sizeof(BTCCCDID)) { - return true; // continue iterating + return true; // continue iterating } - ForEachBLECCCDInternalData *internal_itr_data = (ForEachBLECCCDInternalData*) context; + ForEachBLECCCDInternalData *internal_itr_data = (ForEachBLECCCDInternalData *)context; BTCCCDID key; - info->get_key(file, (uint8_t*) &key, info->key_len); + info->get_key(file, (uint8_t *)&key, info->key_len); BtPersistCCCDData stored_data; - info->get_val(file, (uint8_t*) &stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); + info->get_val(file, (uint8_t *)&stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); internal_itr_data->cb(key, &stored_data, internal_itr_data->cb_data); @@ -1162,12 +1144,12 @@ static bool prv_ble_cccd_internal_for_each_itr(SettingsFile *file, void bt_persistent_storage_for_each_ble_pairing(BtPersistBondingDBEachBLE cb, void *context) { ForEachBLEPairingData itr_data = { - .cb = cb, - .cb_data = context, + .cb = cb, + .cb_data = context, }; ForEachBLEPairingInternalData internal_itr_data = { - .cb = prv_public_for_each_ble_cb, - .cb_data = &itr_data, + .cb = prv_public_for_each_ble_cb, + .cb_data = &itr_data, }; prv_file_each(prv_ble_pairing_internal_for_each_itr, &internal_itr_data); } @@ -1182,14 +1164,13 @@ static void prv_register_bondings_for_each_ble_cb(BTBondingID key, bt_driver_handle_host_added_bonding(&bonding); } -static void prv_register_cccd_for_each_ble_cb(BTCCCDID key, - BtPersistCCCDData *stored_data, +static void prv_register_cccd_for_each_ble_cb(BTCCCDID key, BtPersistCCCDData *stored_data, void *context) { BleCCCD cccd = { - .peer = stored_data->peer, - .chr_val_handle = stored_data->chr_val_handle, - .flags = stored_data->flags, - .value_changed = stored_data->value_changed, + .peer = stored_data->peer, + .chr_val_handle = stored_data->chr_val_handle, + .flags = stored_data->flags, + .value_changed = stored_data->value_changed, }; bt_driver_handle_host_added_cccd(&cccd); @@ -1197,12 +1178,12 @@ static void prv_register_cccd_for_each_ble_cb(BTCCCDID key, void bt_persistent_storage_register_existing_ble_bondings(void) { ForEachBLEPairingInternalData internal_itr_data_bonding = { - .cb = prv_register_bondings_for_each_ble_cb, + .cb = prv_register_bondings_for_each_ble_cb, }; prv_file_each(prv_ble_pairing_internal_for_each_itr, &internal_itr_data_bonding); ForEachBLECCCDInternalData internal_itr_data_cccd = { - .cb = prv_register_cccd_for_each_ble_cb, + .cb = prv_register_cccd_for_each_ble_cb, }; prv_file_each(prv_ble_cccd_internal_for_each_itr, &internal_itr_data_cccd); } @@ -1213,24 +1194,23 @@ typedef struct { BTCCCDID id; } FindCCCDItrData; -static bool prv_find_cccd_itr(SettingsFile *file, - SettingsRecordInfo *info, void *context) { +static bool prv_find_cccd_itr(SettingsFile *file, SettingsRecordInfo *info, void *context) { if (info->val_len == 0 || info->key_len != sizeof(BTCCCDID)) { - return true; // continue iterating + return true; // continue iterating } - FindCCCDItrData *itr_data = (FindCCCDItrData *) context; + FindCCCDItrData *itr_data = (FindCCCDItrData *)context; BTCCCDID key; - info->get_key(file, (uint8_t*) &key, info->key_len); + info->get_key(file, (uint8_t *)&key, info->key_len); BtPersistCCCDData stored_data; - info->get_val(file, (uint8_t*) &stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); + info->get_val(file, (uint8_t *)&stored_data, MIN((unsigned)info->val_len, sizeof(stored_data))); - if (bt_device_internal_equal(itr_data->peer, &stored_data.peer) && + if (bt_device_internal_equal(itr_data->peer, &stored_data.peer) && stored_data.chr_val_handle == itr_data->chr_val_handle) { itr_data->id = key; - return false; // stop iterating + return false; // stop iterating } return true; @@ -1240,9 +1220,9 @@ BTCCCDID bt_persistent_storage_store_cccd(const BleCCCD *cccd) { PBL_ASSERTN(cccd != NULL); FindCCCDItrData itr_data = { - .peer = &cccd->peer, - .chr_val_handle = cccd->chr_val_handle, - .id = BT_CCCD_ID_INVALID, + .peer = &cccd->peer, + .chr_val_handle = cccd->chr_val_handle, + .id = BT_CCCD_ID_INVALID, }; prv_file_each(prv_find_cccd_itr, &itr_data); @@ -1250,20 +1230,20 @@ BTCCCDID bt_persistent_storage_store_cccd(const BleCCCD *cccd) { if (cccd_id == BT_CCCD_ID_INVALID) { cccd_id = prv_get_free_cccd(); if (cccd_id == BT_CCCD_ID_INVALID) { - return BT_CCCD_ID_INVALID; + return BT_CCCD_ID_INVALID; } } BtPersistCCCDData stored_data = { - .peer = cccd->peer, - .chr_val_handle = cccd->chr_val_handle, - .flags = cccd->flags, - .value_changed = cccd->value_changed, + .peer = cccd->peer, + .chr_val_handle = cccd->chr_val_handle, + .flags = cccd->flags, + .value_changed = cccd->value_changed, }; BtPersistCCCD stored_cccd = { - .id = cccd_id, - .data = stored_data, + .id = cccd_id, + .data = stored_data, }; GapBondingFileSetStatus status = prv_file_set(&stored_cccd.id, sizeof(stored_cccd.id), @@ -1279,9 +1259,9 @@ bool bt_persistent_storage_delete_cccd(const BTDeviceInternal *peer, uint16_t ch BTCCCDID cccd_id; FindCCCDItrData itr_data = { - .peer = peer, - .chr_val_handle = chr_val_handle, - .id = BT_CCCD_ID_INVALID + .peer = peer, + .chr_val_handle = chr_val_handle, + .id = BT_CCCD_ID_INVALID }; prv_file_each(prv_find_cccd_itr, &itr_data); @@ -1302,8 +1282,8 @@ bool bt_persistent_storage_delete_cccd(const BTDeviceInternal *peer, uint16_t ch void bt_persistent_storage_set_active_gateway(BTBondingID bonding) { BTBondingID old_active_gateway; - int read_size = prv_file_get(&ACTIVE_GATEWAY_KEY, sizeof(ACTIVE_GATEWAY_KEY), - &old_active_gateway, sizeof(old_active_gateway)); + int read_size = prv_file_get(&ACTIVE_GATEWAY_KEY, sizeof(ACTIVE_GATEWAY_KEY), &old_active_gateway, + sizeof(old_active_gateway)); if (!read_size || old_active_gateway != bonding) { prv_file_set(&ACTIVE_GATEWAY_KEY, sizeof(ACTIVE_GATEWAY_KEY), &bonding, sizeof(bonding)); @@ -1315,8 +1295,8 @@ void bt_persistent_storage_set_active_gateway(BTBondingID bonding) { bool bt_persistent_storage_get_active_gateway(BTBondingID *bonding_out, BtPersistBondingType *type_out) { BTBondingID active_gateway; - int read_size = prv_file_get(&ACTIVE_GATEWAY_KEY, sizeof(ACTIVE_GATEWAY_KEY), - &active_gateway, sizeof(active_gateway)); + int read_size = prv_file_get(&ACTIVE_GATEWAY_KEY, sizeof(ACTIVE_GATEWAY_KEY), &active_gateway, + sizeof(active_gateway)); if (!read_size || active_gateway == BT_BONDING_ID_INVALID) { return false; @@ -1338,14 +1318,13 @@ bool bt_persistent_storage_is_unfaithful(void) { void bt_persistent_storage_set_unfaithful(bool is_unfaithful) { PBL_LOG_INFO("Marking the watch as %s", is_unfaithful ? "unfaithful" : "faithful"); - prv_file_set(&IS_UNFAITHFUL_KEY, sizeof(IS_UNFAITHFUL_KEY), - &is_unfaithful, sizeof(is_unfaithful)); + prv_file_set(&IS_UNFAITHFUL_KEY, sizeof(IS_UNFAITHFUL_KEY), &is_unfaithful, + sizeof(is_unfaithful)); } bool bt_persistent_storage_get_root_key(SMRootKeyType key_type, SM128BitKey *key_out) { SM128BitKey keys[SMRootKeyTypeNum]; - int read_size = prv_file_get(&ROOT_KEYS_KEY, sizeof(ROOT_KEYS_KEY), - &keys, sizeof(keys)); + int read_size = prv_file_get(&ROOT_KEYS_KEY, sizeof(ROOT_KEYS_KEY), &keys, sizeof(keys)); if (!read_size) { return false; } @@ -1367,13 +1346,13 @@ void bt_persistent_storage_set_root_keys(SM128BitKey *keys_in) { } shared_prf_storage_set_root_keys(keys_in); - prv_file_set(&ROOT_KEYS_KEY, sizeof(ROOT_KEYS_KEY), - keys_in, SMRootKeyTypeNum * sizeof(SM128BitKey)); + prv_file_set(&ROOT_KEYS_KEY, sizeof(ROOT_KEYS_KEY), keys_in, + SMRootKeyTypeNum * sizeof(SM128BitKey)); } bool bt_persistent_storage_get_local_device_name(char *local_device_name_out, size_t max_size) { - int read_size = prv_file_get(&DEVICE_NAME_KEY, sizeof(DEVICE_NAME_KEY), - local_device_name_out, max_size); + int read_size = + prv_file_get(&DEVICE_NAME_KEY, sizeof(DEVICE_NAME_KEY), local_device_name_out, max_size); if (!read_size) { return false; } @@ -1386,8 +1365,7 @@ void bt_persistent_storage_set_local_device_name(char *local_device_name, size_t } shared_prf_storage_set_local_device_name(local_device_name); - prv_file_set(&DEVICE_NAME_KEY, sizeof(DEVICE_NAME_KEY), - local_device_name, size); + prv_file_set(&DEVICE_NAME_KEY, sizeof(DEVICE_NAME_KEY), local_device_name, size); } bool bt_persistent_storage_get_airplane_mode_enabled(void) { @@ -1395,8 +1373,7 @@ bool bt_persistent_storage_get_airplane_mode_enabled(void) { } void bt_persistent_storage_set_airplane_mode_enabled(bool new_state) { - prv_file_set(&AIRPLANE_MODE_KEY, sizeof(AIRPLANE_MODE_KEY), - &new_state, sizeof(bool)); + prv_file_set(&AIRPLANE_MODE_KEY, sizeof(AIRPLANE_MODE_KEY), &new_state, sizeof(bool)); } /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1411,7 +1388,7 @@ static void prv_load_cached_system_capabilities(PebbleProtocolCapabilities *capa capabilities_out, sizeof(PebbleProtocolCapabilities)); // Default to zero capabilities if no entry found if (!read_size) { - *capabilities_out = (PebbleProtocolCapabilities) {}; + *capabilities_out = (PebbleProtocolCapabilities){}; } } @@ -1440,19 +1417,19 @@ void bt_persistent_storage_set_cached_system_capabilities( s_cached_system_capabilities = *capabilities; } else { diff.flags = s_cached_system_capabilities.flags; - s_cached_system_capabilities = (PebbleProtocolCapabilities) {}; + s_cached_system_capabilities = (PebbleProtocolCapabilities){}; } } prv_unlock(); // Only update the cache if the capability flags changed if (diff.flags) { - prv_file_set(&SYSTEM_CAPABILITIES_KEY, sizeof(SYSTEM_CAPABILITIES_KEY), - capabilities, sizeof(PebbleProtocolCapabilities)); + prv_file_set(&SYSTEM_CAPABILITIES_KEY, sizeof(SYSTEM_CAPABILITIES_KEY), capabilities, + sizeof(PebbleProtocolCapabilities)); PebbleEvent event = { - .type = PEBBLE_CAPABILITIES_CHANGED_EVENT, - .capabilities.flags_diff = diff, + .type = PEBBLE_CAPABILITIES_CHANGED_EVENT, + .capabilities.flags_diff = diff, }; event_put(&event); } @@ -1486,7 +1463,7 @@ static void prv_delete_all_pairings_itr(SettingsFile *old_file, SettingsFile *ne void *key = kernel_zalloc_check(info->key_len); info->get_key(old_file, key, info->key_len); - void *data = kernel_malloc_check(info->val_len); + void *data = kernel_malloc_check(info->val_len); info->get_val(old_file, data, info->val_len); settings_file_set(new_file, key, info->key_len, &data, info->val_len); @@ -1499,8 +1476,8 @@ void bt_persistent_storage_delete_all_pairings(void) { prv_lock(); { SettingsFile fd; - status_t rv = settings_file_open(&fd, BT_PERSISTENT_STORAGE_FILE_NAME, - BT_PERSISTENT_STORAGE_FILE_SIZE); + status_t rv = + settings_file_open(&fd, BT_PERSISTENT_STORAGE_FILE_NAME, BT_PERSISTENT_STORAGE_FILE_SIZE); if (rv) { return; } @@ -1513,24 +1490,20 @@ void bt_persistent_storage_delete_all_pairings(void) { shared_prf_storage_erase_ble_pairing_data(); } -static void prv_dump_bonding_db_data(char display_buf[DISPLAY_BUF_LEN], - BTBondingID bond_id, BtPersistBondingData *data) { +static void prv_dump_bonding_db_data(char display_buf[DISPLAY_BUF_LEN], BTBondingID bond_id, + BtPersistBondingData *data) { bool matches_prf; if (data->type == BtPersistBondingTypeBTClassic) { - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "Classic Key %d (legacy)", - (int)bond_id); + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "Classic Key %d (legacy)", (int)bond_id); } else if (data->type == BtPersistBondingTypeBLE) { - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "LE Key %d", - (int)bond_id); + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "LE Key %d", (int)bond_id); prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " ANCS: %d Gateway: %d Req Pin: %d", - (int)data->ble_data.supports_ancs, - (int)data->ble_data.is_gateway, - (int)data->ble_data.requires_address_pinning); + (int)data->ble_data.supports_ancs, (int)data->ble_data.is_gateway, + (int)data->ble_data.requires_address_pinning); - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Name: %s", - data->ble_data.name); + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Name: %s", data->ble_data.name); SMPairingInfo info = {}; bt_persistent_storage_assign_sm_pairing_info(&info, &data->ble_data.pairing_info); @@ -1540,13 +1513,11 @@ static void prv_dump_bonding_db_data(char display_buf[DISPLAY_BUF_LEN], SMPairingInfo sprf_info = {}; bool requires_address_pinning; uint8_t flags; - shared_prf_storage_get_ble_pairing_data(&sprf_info, NULL, &requires_address_pinning, - &flags); + shared_prf_storage_get_ble_pairing_data(&sprf_info, NULL, &requires_address_pinning, &flags); matches_prf = (memcmp(&sprf_info, &info, sizeof(sprf_info)) == 0); matches_prf &= (requires_address_pinning == data->ble_data.requires_address_pinning); matches_prf &= (flags == data->ble_data.flags); - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, - " SMPairingInfo matches Shared PRF: %s", + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " SMPairingInfo matches Shared PRF: %s", bool_to_str(matches_prf)); } else { prompt_send_response("Unhandled type of GapBondingDB Data!"); @@ -1554,21 +1525,21 @@ static void prv_dump_bonding_db_data(char display_buf[DISPLAY_BUF_LEN], } } -static void prv_dump_cccd_db_data(char display_buf[DISPLAY_BUF_LEN], - BTCCCDID cccd_id, BtPersistCCCDData *data) { +static void prv_dump_cccd_db_data(char display_buf[DISPLAY_BUF_LEN], BTCCCDID cccd_id, + BtPersistCCCDData *data) { prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "CCCD Key %d", (int)cccd_id); - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Peer Address: "BT_DEVICE_ADDRESS_FMT, + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Peer Address: " BT_DEVICE_ADDRESS_FMT, BT_DEVICE_ADDRESS_XPLODE_PTR(&data->peer.address)); - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Handle: 0x%" PRIx16, + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Handle: 0x%" PRIx16, data->chr_val_handle); prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Flags: 0x%" PRIx16, data->flags); prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Value Changed: %s", bool_to_str(data->value_changed)); } -static bool prv_dump_bt_persistent_storage_contents( - SettingsFile *file, SettingsRecordInfo *info, void *context) { +static bool prv_dump_bt_persistent_storage_contents(SettingsFile *file, SettingsRecordInfo *info, + void *context) { if (info->key_len == 0 || info->val_len == 0) { prompt_send_response("key or val of 0 length"); return true; @@ -1592,15 +1563,14 @@ static bool prv_dump_bt_persistent_storage_contents( PBL_ASSERTN(info->val_len == sizeof(BTBondingID)); BTBondingID id; memcpy(&id, val, sizeof(BTBondingID)); - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "%s : %d", - ACTIVE_GATEWAY_KEY, (int)id); + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "%s : %d", ACTIVE_GATEWAY_KEY, (int)id); } else if (memcmp(key, IS_UNFAITHFUL_KEY, info->key_len) == 0) { PBL_ASSERTN(info->val_len == sizeof(bool)); bool is_unfaithful; memcpy(&is_unfaithful, val, sizeof(bool)); - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "%s : %d", - IS_UNFAITHFUL_KEY, (int)is_unfaithful); + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "%s : %d", IS_UNFAITHFUL_KEY, + (int)is_unfaithful); } else if (memcmp(key, ROOT_KEYS_KEY, info->key_len) == 0) { SM128BitKey root_keys[SMRootKeyTypeNum], sprf_root_keys[SMRootKeyTypeNum]; @@ -1610,26 +1580,24 @@ static bool prv_dump_bt_persistent_storage_contents( bluetooth_persistent_storage_debug_dump_root_keys(&root_keys[SMRootKeyTypeEncryption], &root_keys[SMRootKeyTypeIdentity]); - if (shared_prf_storage_get_root_key( - SMRootKeyTypeEncryption, &sprf_root_keys[SMRootKeyTypeEncryption]) && - shared_prf_storage_get_root_key( - SMRootKeyTypeIdentity, &sprf_root_keys[SMRootKeyTypeIdentity])) { + if (shared_prf_storage_get_root_key(SMRootKeyTypeEncryption, + &sprf_root_keys[SMRootKeyTypeEncryption]) && + shared_prf_storage_get_root_key(SMRootKeyTypeIdentity, + &sprf_root_keys[SMRootKeyTypeIdentity])) { bool root_keys_match = - memcmp(&root_keys, &sprf_root_keys, sizeof(SM128BitKey) * SMRootKeyTypeNum) == 0; - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, - " Root keys match shared prf: %s", - bool_to_str(root_keys_match)); + memcmp(&root_keys, &sprf_root_keys, sizeof(SM128BitKey) * SMRootKeyTypeNum) == 0; + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, " Root keys match shared prf: %s", + bool_to_str(root_keys_match)); } } else if (memcmp(key, DEVICE_NAME_KEY, info->key_len) == 0) { char dev_name[info->val_len + 1]; memcpy(&dev_name, val, info->val_len); - prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "Device Name: %s", - dev_name); + prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, "Device Name: %s", dev_name); } else if (memcmp(key, BLE_PINNED_ADDRESS_KEY, info->key_len) == 0) { if (info->val_len == sizeof(BTDeviceAddress)) { const BTDeviceAddress *address = (const BTDeviceAddress *)val; prompt_send_response_fmt(display_buf, DISPLAY_BUF_LEN, - "Pinned address: "BT_DEVICE_ADDRESS_FMT, + "Pinned address: " BT_DEVICE_ADDRESS_FMT, BT_DEVICE_ADDRESS_XPLODE_PTR(address)); } } else if (info->key_len == sizeof(BTBondingID)) { diff --git a/src/fw/services/bluetooth/bluetooth_persistent_storage_prf.c b/src/fw/services/bluetooth/bluetooth_persistent_storage_prf.c index 5c59759204..eadfd27df9 100644 --- a/src/fw/services/bluetooth/bluetooth_persistent_storage_prf.c +++ b/src/fw/services/bluetooth/bluetooth_persistent_storage_prf.c @@ -20,10 +20,8 @@ PBL_LOG_MODULE_DECLARE(service_bluetooth, CONFIG_SERVICE_BLUETOOTH_LOG_LEVEL); - //! This is just an interface for the shared PRF storage - //! These don't matter at all #define BLE_BONDING_ID (0) @@ -50,8 +48,7 @@ static BTBondingID prv_bt_persistent_storage_store_ble_pairing( new_pairing_info->is_remote_encryption_info_valid, new_pairing_info->is_local_encryption_info_valid); shared_prf_storage_store_ble_pairing_data(new_pairing_info, device_name, - requires_address_pinning, - flags); + requires_address_pinning, flags); prv_call_ble_bonding_change_handlers(BLE_BONDING_ID, op); return BLE_BONDING_ID; } @@ -77,8 +74,7 @@ bool bt_persistent_storage_get_ble_pinned_address(BTDeviceAddress *address_out) BTBondingID bt_persistent_storage_store_ble_pairing(const SMPairingInfo *new_pairing_info, bool is_gateway, const char *device_name, - bool requires_address_pinning, - uint8_t flags) { + bool requires_address_pinning, uint8_t flags) { // We only have one slot in PRF and all pairing info (except the device // name) will arrive in one-shot so anytime this routine gets called it // means we have 'added' a new pairing @@ -101,9 +97,8 @@ BTBondingID bt_persistent_storage_store_ble_pairing(const SMPairingInfo *new_pai BtPersistBondingOp pairing_op = is_updating_existing ? BtPersistBondingOpDidChange : BtPersistBondingOpDidAdd; - return (prv_bt_persistent_storage_store_ble_pairing(new_pairing_info, is_gateway, - requires_address_pinning, - flags, device_name, pairing_op)); + return (prv_bt_persistent_storage_store_ble_pairing( + new_pairing_info, is_gateway, requires_address_pinning, flags, device_name, pairing_op)); } bool bt_persistent_storage_update_ble_device_name(BTBondingID bonding, const char *device_name) { @@ -125,10 +120,9 @@ bool bt_persistent_storage_update_ble_device_name(BTBondingID bonding, const cha return true; } // In PRF, only the gateway should get paired, so default to "true": - return (BT_BONDING_ID_INVALID != - prv_bt_persistent_storage_store_ble_pairing(&data, true /* is_gateway */, - requires_address_pinning, flags, - device_name, BtPersistBondingOpDidChange)); + return (BT_BONDING_ID_INVALID != prv_bt_persistent_storage_store_ble_pairing( + &data, true /* is_gateway */, requires_address_pinning, + flags, device_name, BtPersistBondingOpDidChange)); } static void prv_remove_ble_bonding_from_bt_driver(void) { @@ -136,7 +130,7 @@ static void prv_remove_ble_bonding_from_bt_driver(void) { return; } BleBonding bonding = { - .is_gateway = true, + .is_gateway = true, }; if (!shared_prf_storage_get_ble_pairing_data(&bonding.pairing_info, NULL, NULL, NULL)) { return; @@ -156,9 +150,8 @@ void bt_persistent_storage_delete_ble_pairing_by_addr(const BTDeviceInternal *de } bool bt_persistent_storage_get_ble_pairing_by_id(BTBondingID bonding, - SMIdentityResolvingKey *IRK_out, - BTDeviceInternal *device_out, - char *name_out) { + SMIdentityResolvingKey *IRK_out, + BTDeviceInternal *device_out, char *name_out) { SMPairingInfo data; char name[BT_DEVICE_NAME_BUFFER_SIZE]; if (!shared_prf_storage_get_ble_pairing_data(&data, name, NULL, NULL)) { @@ -180,8 +173,8 @@ bool bt_persistent_storage_get_ble_pairing_by_id(BTBondingID bonding, } bool bt_persistent_storage_get_ble_pairing_by_addr(const BTDeviceInternal *device, - SMIdentityResolvingKey *IRK_out, - char name[BT_DEVICE_NAME_BUFFER_SIZE]) { + SMIdentityResolvingKey *IRK_out, + char name[BT_DEVICE_NAME_BUFFER_SIZE]) { BTDeviceInternal device_out = {}; bool rv = bt_persistent_storage_get_ble_pairing_by_id(BLE_BONDING_ID, IRK_out, &device_out, name); return (rv && bt_device_equal(&device->opaque, &device_out.opaque)); diff --git a/src/fw/services/bluetooth/bluetooth_prompt.c b/src/fw/services/bluetooth/bluetooth_prompt.c index be812213a9..0844779795 100644 --- a/src/fw/services/bluetooth/bluetooth_prompt.c +++ b/src/fw/services/bluetooth/bluetooth_prompt.c @@ -20,7 +20,6 @@ void command_bt_print_mac(void) { prompt_send_response(addr_hex_str); } - //! @param bt_name A custom Bluetooth device name. void command_bt_set_name(const char *bt_name) { bt_local_id_set_device_name(bt_name); @@ -49,8 +48,7 @@ void command_bt_status(void) { const char *prefix = "BT Chip Info: "; size_t prefix_length = strlen(prefix); strncpy(buffer, prefix, sizeof(buffer)); - bt_driver_id_copy_chip_info_string(buffer + prefix_length, - sizeof(buffer) - prefix_length); + bt_driver_id_copy_chip_info_string(buffer + prefix_length, sizeof(buffer) - prefix_length); prompt_send_response(buffer); char name[BT_DEVICE_NAME_BUFFER_SIZE]; @@ -70,4 +68,4 @@ void command_bt_status(void) { prompt_send_response_fmt(buffer, sizeof(buffer), "Device: %s", name); } } -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW diff --git a/src/fw/services/bluetooth/bonding.c b/src/fw/services/bluetooth/bonding.c index fd868542af..7f73df8e50 100644 --- a/src/fw/services/bluetooth/bonding.c +++ b/src/fw/services/bluetooth/bonding.c @@ -22,8 +22,7 @@ typedef struct { bool is_gateway; } CreateBondingContext; -static void prv_finalize_create_bonding(BTBondingID bonding_id, - const BTDeviceAddress *addr, +static void prv_finalize_create_bonding(BTBondingID bonding_id, const BTDeviceAddress *addr, bool is_gateway) { bt_lock(); GAPLEConnection *connection = gap_le_connection_by_addr(addr); @@ -48,10 +47,9 @@ static void prv_finalize_create_bonding_cb(void *data) { kernel_free(context); } -void bt_driver_cb_handle_create_bonding(const BleBonding *bonding, - const BTDeviceAddress *addr) { - PBL_LOG_INFO("Creating new bonding for "BT_DEVICE_ADDRESS_FMT, - BT_DEVICE_ADDRESS_XPLODE(bonding->pairing_info.identity.address)); +void bt_driver_cb_handle_create_bonding(const BleBonding *bonding, const BTDeviceAddress *addr) { + PBL_LOG_INFO("Creating new bonding for " BT_DEVICE_ADDRESS_FMT, + BT_DEVICE_ADDRESS_XPLODE(bonding->pairing_info.identity.address)); const bool should_pin_address = bonding->should_pin_address; if (should_pin_address) { bt_local_addr_pin(&bonding->pinned_address); @@ -60,10 +58,8 @@ void bt_driver_cb_handle_create_bonding(const BleBonding *bonding, if (flags) { PBL_LOG_INFO("flags: 0x02%x", flags); } - BTBondingID bonding_id = bt_persistent_storage_store_ble_pairing(&bonding->pairing_info, - bonding->is_gateway, NULL, - should_pin_address, - flags); + BTBondingID bonding_id = bt_persistent_storage_store_ble_pairing( + &bonding->pairing_info, bonding->is_gateway, NULL, should_pin_address, flags); if (bonding_id == BT_BONDING_ID_INVALID) { PBL_LOG_ERR("Failed to persist new bonding"); return; @@ -76,10 +72,10 @@ void bt_driver_cb_handle_create_bonding(const BleBonding *bonding, CreateBondingContext *context = kernel_malloc_check(sizeof(*context)); - *context = (CreateBondingContext) { - .bonding_id = bonding_id, - .addr = *addr, - .is_gateway = bonding->is_gateway, + *context = (CreateBondingContext){ + .bonding_id = bonding_id, + .addr = *addr, + .is_gateway = bonding->is_gateway, }; launcher_task_add_callback(prv_finalize_create_bonding_cb, context); } diff --git a/src/fw/services/bluetooth/dis.c b/src/fw/services/bluetooth/dis.c index c136f611bd..535860c860 100644 --- a/src/fw/services/bluetooth/dis.c +++ b/src/fw/services/bluetooth/dis.c @@ -13,10 +13,10 @@ #include "mfg/mfg_serials.h" #include "system/version.h" -_Static_assert(MODEL_NUMBER_LEN >= MFG_HW_VERSION_SIZE + 1, "Size mismatch"); -_Static_assert(MANUFACTURER_LEN >= sizeof(BT_VENDOR_NAME), "Size mismatch"); +_Static_assert(MODEL_NUMBER_LEN >= MFG_HW_VERSION_SIZE + 1, "Size mismatch"); +_Static_assert(MANUFACTURER_LEN >= sizeof(BT_VENDOR_NAME), "Size mismatch"); _Static_assert(SERIAL_NUMBER_LEN >= MFG_SERIAL_NUMBER_SIZE + 1, "Size mismatch"); -_Static_assert(FW_REVISION_LEN >= sizeof(TINTIN_METADATA.version_tag), "Size mismatch"); +_Static_assert(FW_REVISION_LEN >= sizeof(TINTIN_METADATA.version_tag), "Size mismatch"); static void prv_set_model_number(DisInfo *info) { mfg_info_get_hw_version(info->model_number, MODEL_NUMBER_LEN); @@ -31,14 +31,13 @@ static void prv_set_serial_number(DisInfo *info) { } static void prv_set_firmware_revision(DisInfo *info) { - strncpy(info->fw_revision, (char*)TINTIN_METADATA.version_tag, FW_REVISION_LEN); + strncpy(info->fw_revision, (char *)TINTIN_METADATA.version_tag, FW_REVISION_LEN); } static void prv_set_software_revision(DisInfo *info) { // Fmt: xx.xx\0 char sdk_version[SW_REVISION_LEN]; - sniprintf(sdk_version, SW_REVISION_LEN, "%2u.%02u", - PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, + sniprintf(sdk_version, SW_REVISION_LEN, "%2u.%02u", PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, PROCESS_INFO_CURRENT_SDK_VERSION_MINOR); strncpy(info->sw_revision, sdk_version, SW_REVISION_LEN); } diff --git a/src/fw/services/bluetooth/local_addr.c b/src/fw/services/bluetooth/local_addr.c index 9f3b323cb7..e41c9cdc27 100644 --- a/src/fw/services/bluetooth/local_addr.c +++ b/src/fw/services/bluetooth/local_addr.c @@ -25,8 +25,8 @@ void bt_local_addr_pause_cycling(void) { bt_lock(); { if (s_pra_cycling_pause_count == 0) { - PBL_LOG_INFO("Pausing address cycling (pinned_addr="BT_DEVICE_ADDRESS_FMT")", - BT_DEVICE_ADDRESS_XPLODE(s_pinned_addr)); + PBL_LOG_INFO("Pausing address cycling (pinned_addr=" BT_DEVICE_ADDRESS_FMT ")", + BT_DEVICE_ADDRESS_XPLODE(s_pinned_addr)); prv_allow_cycling(false); } ++s_pra_cycling_pause_count; @@ -40,8 +40,8 @@ void bt_local_addr_resume_cycling(void) { PBL_ASSERTN(s_pra_cycling_pause_count); --s_pra_cycling_pause_count; if (s_pra_cycling_pause_count == 0) { - PBL_LOG_INFO("Resuming address cycling (pinned_addr="BT_DEVICE_ADDRESS_FMT")", - BT_DEVICE_ADDRESS_XPLODE(s_pinned_addr)); + PBL_LOG_INFO("Resuming address cycling (pinned_addr=" BT_DEVICE_ADDRESS_FMT ")", + BT_DEVICE_ADDRESS_XPLODE(s_pinned_addr)); prv_allow_cycling(true); } } @@ -68,8 +68,8 @@ void bt_local_addr_pin(const BTDeviceAddress *addr) { bool addresses_match = bt_device_address_equal(addr, &s_pinned_addr); bt_unlock(); - PBL_LOG_INFO("Requested to pin address to "BT_DEVICE_ADDRESS_FMT " match=%u", - BT_DEVICE_ADDRESS_XPLODE_PTR(addr), addresses_match); + PBL_LOG_INFO("Requested to pin address to " BT_DEVICE_ADDRESS_FMT " match=%u", + BT_DEVICE_ADDRESS_XPLODE_PTR(addr), addresses_match); } void bt_local_addr_handle_bonding_change(BTBondingID bonding, BtPersistBondingOp op) { @@ -96,8 +96,7 @@ void bt_local_addr_init(void) { PBL_LOG_ERR("Failed to generate PRA... :("); } } - PBL_LOG_INFO("Pinned address: " BT_DEVICE_ADDRESS_FMT, - BT_DEVICE_ADDRESS_XPLODE(s_pinned_addr)); + PBL_LOG_INFO("Pinned address: " BT_DEVICE_ADDRESS_FMT, BT_DEVICE_ADDRESS_XPLODE(s_pinned_addr)); if (bt_persistent_storage_has_pinned_ble_pairings()) { PBL_LOG_INFO("Bonding that requires address pinning exists, applying pinned addr!"); diff --git a/src/fw/services/bluetooth/local_id.c b/src/fw/services/bluetooth/local_id.c index 57262660a3..e968d6a0d5 100644 --- a/src/fw/services/bluetooth/local_id.c +++ b/src/fw/services/bluetooth/local_id.c @@ -73,16 +73,16 @@ void bt_local_id_copy_address(BTDeviceAddress *addr_out) { void bt_local_id_copy_address_hex_string(char addr_hex_str_out[BT_ADDR_FMT_BUFFER_SIZE_BYTES]) { static const BTDeviceAddress null_addr = {}; if (0 != memcmp(&null_addr, &s_local_address, sizeof(s_local_address))) { - sniprintf(addr_hex_str_out, BT_DEVICE_ADDRESS_FMT_BUFFER_SIZE, - BD_ADDR_FMT, BT_DEVICE_ADDRESS_XPLODE(s_local_address)); + sniprintf(addr_hex_str_out, BT_DEVICE_ADDRESS_FMT_BUFFER_SIZE, BD_ADDR_FMT, + BT_DEVICE_ADDRESS_XPLODE(s_local_address)); } else { sniprintf(addr_hex_str_out, BT_DEVICE_ADDRESS_FMT_BUFFER_SIZE, "Unknown"); } } void bt_local_id_copy_address_mac_string(char addr_mac_str_out[BT_DEVICE_ADDRESS_FMT_BUFFER_SIZE]) { - sniprintf(addr_mac_str_out, BT_DEVICE_ADDRESS_FMT_BUFFER_SIZE, - BT_DEVICE_ADDRESS_FMT, BT_DEVICE_ADDRESS_XPLODE(s_local_address)); + sniprintf(addr_mac_str_out, BT_DEVICE_ADDRESS_FMT_BUFFER_SIZE, BT_DEVICE_ADDRESS_FMT, + BT_DEVICE_ADDRESS_XPLODE(s_local_address)); } T_STATIC void prv_generate_address(BTDeviceAddress *addr_out) { @@ -107,8 +107,8 @@ T_STATIC void prv_generate_address(BTDeviceAddress *addr_out) { }; }; } addr = { - .a = (uint16_t) reverse_hash, - .b = (serial_hash ^ reverse_hash), + .a = (uint16_t)reverse_hash, + .b = (serial_hash ^ reverse_hash), }; *addr_out = addr.bt_addr; @@ -119,15 +119,15 @@ void bt_local_id_generate_address_from_serial(BTDeviceAddress *addr_out) { addr_out->octets[ARRAY_LENGTH(addr_out->octets) - 1] |= 0b11000000; // Addresses with all 0's or 1's - const BTDeviceAddress zero_addr = {.octets = {0x00, 0x00, 0x00, 0x00, 0x00, 0xC0}}; - const BTDeviceAddress one_addr = {.octets = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}; + const BTDeviceAddress zero_addr = {.octets = {0x00, 0x00, 0x00, 0x00, 0x00, 0xC0}}; + const BTDeviceAddress one_addr = {.octets = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}; // NOTE: It already has the two most sig. bits set. const BTDeviceAddress fallback_addr = {.octets = {0x3c, 0x08, 0x55, 0xaf, 0xd3, 0xc4}}; // Compare (the first 5 bytes) the generated one with the invalid ones. If they are equal, // fall back to this address. - if (!memcmp(addr_out, &zero_addr, sizeof(BTDeviceAddress)) - || !memcmp(addr_out, &one_addr, sizeof(BTDeviceAddress))) { + if (!memcmp(addr_out, &zero_addr, sizeof(BTDeviceAddress)) || + !memcmp(addr_out, &one_addr, sizeof(BTDeviceAddress))) { *addr_out = fallback_addr; } diff --git a/src/fw/services/bluetooth/pairability.c b/src/fw/services/bluetooth/pairability.c index db70681c39..c5b35b68e7 100644 --- a/src/fw/services/bluetooth/pairability.c +++ b/src/fw/services/bluetooth/pairability.c @@ -23,7 +23,7 @@ static int s_allow_ble_pairing_refcount = 0; static bool s_last_ble_discoverable_state = false; static RegularTimerInfo s_pairability_timer_info = { - .cb = prv_pairability_timer_cb, + .cb = prv_pairability_timer_cb, }; static void evaluate_pairing_refcount(void *data) { diff --git a/src/fw/services/bluetooth/pebble_pairing_service.c b/src/fw/services/bluetooth/pebble_pairing_service.c index 067bbc792b..97d33b40c4 100644 --- a/src/fw/services/bluetooth/pebble_pairing_service.c +++ b/src/fw/services/bluetooth/pebble_pairing_service.c @@ -32,8 +32,9 @@ static void prv_convert_pps_request_params(const PebblePairingServiceConnParamSe params_out->supervision_timeout_10ms = pps_params_in->supervision_timeout_30ms * 3; } -static void prv_handle_set_remote_param_mgmt_settings(GAPLEConnection *connection, - const PebblePairingServiceRemoteParamMgmtSettings *settings, size_t settings_length) { +static void prv_handle_set_remote_param_mgmt_settings( + GAPLEConnection *connection, const PebblePairingServiceRemoteParamMgmtSettings *settings, + size_t settings_length) { bool is_remote_device_managing_connection_parameters = settings->is_remote_device_managing_connection_parameters; connection->is_remote_device_managing_connection_parameters = @@ -43,11 +44,10 @@ static void prv_handle_set_remote_param_mgmt_settings(GAPLEConnection *connectio if (!connection->connection_parameter_sets) { const size_t size = sizeof(GAPLEConnectRequestParams) * NumResponseTimeState; connection->connection_parameter_sets = - (GAPLEConnectRequestParams *) kernel_zalloc_check(size); + (GAPLEConnectRequestParams *)kernel_zalloc_check(size); } for (ResponseTimeState s = ResponseTimeMax; s < NumResponseTimeState; ++s) { - const PebblePairingServiceConnParamSet *pps_params = - &settings->connection_parameter_sets[s]; + const PebblePairingServiceConnParamSet *pps_params = &settings->connection_parameter_sets[s]; GAPLEConnectRequestParams *params = &connection->connection_parameter_sets[s]; prv_convert_pps_request_params(pps_params, params); } @@ -57,8 +57,8 @@ static void prv_handle_set_remote_param_mgmt_settings(GAPLEConnection *connectio gap_le_connect_params_re_evaluate(connection); } -static void prv_handle_set_remote_desired_state(GAPLEConnection *connection, - const PebblePairingServiceRemoteDesiredState *desired_state) { +static void prv_handle_set_remote_desired_state( + GAPLEConnection *connection, const PebblePairingServiceRemoteDesiredState *desired_state) { const ResponseTimeState remote_desired_state = (ResponseTimeState)desired_state->state; PBL_LOG_DBG("PPS: desired_state=%u", remote_desired_state); @@ -69,8 +69,7 @@ static void prv_handle_set_remote_desired_state(GAPLEConnection *connection, } void bt_driver_cb_pebble_pairing_service_handle_connection_parameter_write( - const BTDeviceInternal *device, - const PebblePairingServiceConnParamsWrite *conn_params, + const BTDeviceInternal *device, const PebblePairingServiceConnParamsWrite *conn_params, size_t conn_params_length) { bt_lock(); { @@ -78,8 +77,8 @@ void bt_driver_cb_pebble_pairing_service_handle_connection_parameter_write( if (!connection) { goto unlock; } - const size_t length = (conn_params_length - offsetof(PebblePairingServiceConnParamsWrite, - remote_desired_state)); + const size_t length = + (conn_params_length - offsetof(PebblePairingServiceConnParamsWrite, remote_desired_state)); switch (conn_params->cmd) { case PebblePairingServiceConnParamsWriteCmd_SetRemoteParamMgmtSettings: prv_handle_set_remote_param_mgmt_settings(connection, diff --git a/src/fw/services/bluetooth/pp_ble_control.c b/src/fw/services/bluetooth/pp_ble_control.c index 4580166ae6..76abf8423f 100644 --- a/src/fw/services/bluetooth/pp_ble_control.c +++ b/src/fw/services/bluetooth/pp_ble_control.c @@ -25,14 +25,14 @@ typedef struct PACKED { static void prv_handle_set_discoverable_pairable( BLEControlCommandSetDiscoverablePairable *cmd_data) { bt_pairability_use_ble_for_period(cmd_data->duration); - PBL_LOG_DBG("Set Discoverable Pairable: %u, %u", - cmd_data->discoverable_pairable, cmd_data->duration); + PBL_LOG_DBG("Set Discoverable Pairable: %u, %u", cmd_data->discoverable_pairable, + cmd_data->duration); } // ----------------------------------------------------------------------------- //! Pebble protocol handler for the BLE control endpoint -void pp_ble_control_protocol_msg_callback( - CommSession* session, const uint8_t *data, unsigned int length) { +void pp_ble_control_protocol_msg_callback(CommSession *session, const uint8_t *data, + unsigned int length) { PBL_ASSERT_RUNNING_FROM_EXPECTED_TASK(PebbleTask_KernelBackground); if (length < sizeof(BLEControlCommandSetDiscoverablePairable)) { @@ -40,7 +40,7 @@ void pp_ble_control_protocol_msg_callback( return; } - const uint8_t opcode = *(const uint8_t *) data; + const uint8_t opcode = *(const uint8_t *)data; switch (opcode) { case 0 ... 3: PBL_LOG_WRN("Deprecated & unsupported opcode: %u", opcode); diff --git a/src/fw/services/boot_splash/service.c b/src/fw/services/boot_splash/service.c index 65fc52ff6e..62c6110fec 100644 --- a/src/fw/services/boot_splash/service.c +++ b/src/fw/services/boot_splash/service.c @@ -17,29 +17,29 @@ // Platform-specific colors: PebbleOS uses ARGB2222 (GColor8), not raw RGB332 #ifdef CONFIG_QEMU // QEMU display natively renders ARGB2222 -#define SPLASH_COLOR_WHITE 0xFF // A=3, R=3, G=3, B=3 -#define SPLASH_COLOR_BLACK 0xC0 // A=3, R=0, G=0, B=0 -#define SPLASH_COLOR_LGRAY 0xEA // A=3, R=2, G=2, B=2 +#define SPLASH_COLOR_WHITE 0xFF // A=3, R=3, G=3, B=3 +#define SPLASH_COLOR_BLACK 0xC0 // A=3, R=0, G=0, B=0 +#define SPLASH_COLOR_LGRAY 0xEA // A=3, R=2, G=2, B=2 // QEMU boot splash always uses 8bpp framebuffer regardless of platform bit depth #define BOOT_SPLASH_FB_BYTES (PBL_DISPLAY_WIDTH * PBL_DISPLAY_HEIGHT) #else // Hardware displays: the compositor handles GColor8 → native conversion, // but boot_splash writes raw pixels before the compositor is initialized. // On obelix/getafix the LCDC accepts RGB332 directly. -#define SPLASH_COLOR_WHITE 0xFF -#define SPLASH_COLOR_BLACK 0x00 -#define SPLASH_COLOR_LGRAY 0xB6 +#define SPLASH_COLOR_WHITE 0xFF +#define SPLASH_COLOR_BLACK 0x00 +#define SPLASH_COLOR_LGRAY 0xB6 #define BOOT_SPLASH_FB_BYTES DISPLAY_FRAMEBUFFER_BYTES #endif // Progress bar configuration -#define PROGRESS_BAR_WIDTH 80 -#define PROGRESS_BAR_HEIGHT 4 +#define PROGRESS_BAR_WIDTH 80 +#define PROGRESS_BAR_HEIGHT 4 #define PROGRESS_INDICATOR_WIDTH 20 #define PROGRESS_FRAME_DELAY_MS 100 -#define PROGRESS_TOTAL_FRAMES 20 +#define PROGRESS_TOTAL_FRAMES 20 #define BOOT_SPLASH_TASK_STACK_SIZE 2048 -#define BOOT_SPLASH_TASK_PRIORITY (PBL_PRIO_MAX - 1) +#define BOOT_SPLASH_TASK_PRIORITY (PBL_PRIO_MAX - 1) // Boot splash state static struct pbl_thread s_boot_splash_thread; @@ -49,8 +49,8 @@ static volatile bool s_boot_splash_running; static uint8_t *s_boot_splash_fb; // Draw a filled rectangle -static void prv_draw_filled_rect(uint8_t *fb, int16_t x0, int16_t y0, - int16_t width, int16_t height, uint8_t color) { +static void prv_draw_filled_rect(uint8_t *fb, int16_t x0, int16_t y0, int16_t width, int16_t height, + uint8_t color) { for (int16_t y = y0; y < y0 + height; y++) { for (int16_t x = x0; x < x0 + width; x++) { if (x >= 0 && x < PBL_DISPLAY_WIDTH && y >= 0 && y < PBL_DISPLAY_HEIGHT) { @@ -61,8 +61,7 @@ static void prv_draw_filled_rect(uint8_t *fb, int16_t x0, int16_t y0, } // Draw progress bar with animated indicator -static void prv_draw_progress_bar(uint8_t *fb, int16_t center_x, int16_t center_y, - uint16_t frame) { +static void prv_draw_progress_bar(uint8_t *fb, int16_t center_x, int16_t center_y, uint16_t frame) { const uint8_t COLOR_TRACK = SPLASH_COLOR_LGRAY; const uint8_t COLOR_INDICATOR = SPLASH_COLOR_BLACK; @@ -87,8 +86,8 @@ static void prv_draw_progress_bar(uint8_t *fb, int16_t center_x, int16_t center_ } // Draw indicator - prv_draw_filled_rect(fb, bar_x0 + indicator_offset, bar_y0, - PROGRESS_INDICATOR_WIDTH, PROGRESS_BAR_HEIGHT, COLOR_INDICATOR); + prv_draw_filled_rect(fb, bar_x0 + indicator_offset, bar_y0, PROGRESS_INDICATOR_WIDTH, + PROGRESS_BAR_HEIGHT, COLOR_INDICATOR); } // Boot splash task - runs until stopped @@ -157,12 +156,12 @@ void boot_splash_start(void) { // Start the boot splash task s_boot_splash_running = true; struct pbl_thread_attr attr = { - .name = "BootSplash", - .entry = prv_boot_splash_task, - .prio = BOOT_SPLASH_TASK_PRIORITY, - .privileged = true, - .stack = s_boot_splash_stack, - .stack_size = sizeof(s_boot_splash_stack), + .name = "BootSplash", + .entry = prv_boot_splash_task, + .prio = BOOT_SPLASH_TASK_PRIORITY, + .privileged = true, + .stack = s_boot_splash_stack, + .stack_size = sizeof(s_boot_splash_stack), }; if (pbl_thread_create(&s_boot_splash_thread, &attr) == 0) { s_boot_splash_task = &s_boot_splash_thread; @@ -206,7 +205,7 @@ void boot_splash_stop(void) { } } -#else // Everything else +#else // Everything else void boot_splash_start(void) { // No-op on platforms where the bootloader handles the splash diff --git a/src/fw/services/clock/service.c b/src/fw/services/clock/service.c index 578ba97917..8e979b5985 100644 --- a/src/fw/services/clock/service.c +++ b/src/fw/services/clock/service.c @@ -59,15 +59,14 @@ static void prv_handle_timezone_set(TimezoneInfo *tz_info) { // Update the RTC registers with the latest timezone info rtc_set_timezone(tz_info); - } typedef struct PACKED { -// This struct is packed because it mirrors the endpoint definition: -// https://pebbletechnology.atlassian.net/wiki/pages/viewpage.action?pageId=491698#PebbleProtocol(BluetoothSerial)-0xb(11)-Time/Clock(bigendian) - time_t utc_time; // UTC timestamp - int16_t utc_offset_min; // local timestamp - UTC timestamp in mins - int8_t region_name_len; // timezone name length + // This struct is packed because it mirrors the endpoint definition: + // https://pebbletechnology.atlassian.net/wiki/pages/viewpage.action?pageId=491698#PebbleProtocol(BluetoothSerial)-0xb(11)-Time/Clock(bigendian) + time_t utc_time; // UTC timestamp + int16_t utc_offset_min; // local timestamp - UTC timestamp in mins + int8_t region_name_len; // timezone name length char region_name[TIMEZONE_NAME_LENGTH]; // timezone name string } TimezoneCBData; @@ -76,17 +75,16 @@ _Static_assert(sizeof(time_t) == 4, "Sizeof time_t does not match endpoint defin #endif #if !defined(CONFIG_RECOVERY_FW) -static time_t prv_clock_dstrule_to_timestamp( - bool is_end, const TimezoneInfo *tz_info, const TimezoneDSTRule *rule, int year) { - +static time_t prv_clock_dstrule_to_timestamp(bool is_end, const TimezoneInfo *tz_info, + const TimezoneDSTRule *rule, int year) { struct tm time_tm = { - .tm_min = rule->minute, - .tm_hour = rule->hour, - .tm_mday = rule->mday, - .tm_mon = rule->month, - .tm_year = year, - .tm_gmtoff = 0, - .tm_isdst = 0, + .tm_min = rule->minute, + .tm_hour = rule->hour, + .tm_mday = rule->mday, + .tm_mon = rule->month, + .tm_year = year, + .tm_gmtoff = 0, + .tm_isdst = 0, }; // A few countries actually have their DST rule on the midnight AFTER a day // This is subtly different from the midnight OF a day. @@ -100,7 +98,7 @@ static time_t prv_clock_dstrule_to_timestamp( time_t uxtime = mktime(&time_tm); gmtime_r(&uxtime, &time_tm); - for (int i = 0; i < DAYS_PER_WEEK; i++) { // max is DAYS_PER_WEEK to find a day_of_week + for (int i = 0; i < DAYS_PER_WEEK; i++) { // max is DAYS_PER_WEEK to find a day_of_week // we also have to check month here, as leap-year case puts us 1 day past feb #define DSTRULE_WDAY_ANY (255) if ((time_tm.tm_wday == rule->wday || rule->wday == DSTRULE_WDAY_ANY) && @@ -118,13 +116,13 @@ static time_t prv_clock_dstrule_to_timestamp( gmtime_r(&uxtime, &time_tm); } - if (rule->flag & TIMEZONE_FLAG_STANDARD_TIME) { // Standard time (not wall time) + if (rule->flag & TIMEZONE_FLAG_STANDARD_TIME) { // Standard time (not wall time) time_tm.tm_gmtoff = tz_info->tm_gmtoff; time_tm.tm_isdst = 0; - } else if (rule->flag & TIMEZONE_FLAG_UTC_TIME) { // UTC + } else if (rule->flag & TIMEZONE_FLAG_UTC_TIME) { // UTC time_tm.tm_gmtoff = 0; time_tm.tm_isdst = 0; - } else { // Wall time + } else { // Wall time time_tm.tm_gmtoff = tz_info->tm_gmtoff; time_tm.tm_isdst = is_end; } @@ -137,7 +135,7 @@ static time_t prv_clock_dstrule_to_timestamp( uxtime -= time_tm.tm_gmtoff; return uxtime; } -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW T_STATIC void prv_update_dstrule_timestamps_by_dstzone_id(TimezoneInfo *tz_info, time_t utc_time) { if (tz_info->dst_id == 0) { @@ -175,10 +173,8 @@ T_STATIC void prv_update_dstrule_timestamps_by_dstzone_id(TimezoneInfo *tz_info, for (int i = 0; i < DST_YEARS_RANGE; i++) { const int year = current_tm.tm_year + (i - DST_YEARS_OFFSET); - dst_start_stamps[i] = - prv_clock_dstrule_to_timestamp(false, tz_info, &dst_rule_begin, year); - dst_end_stamps[i] = - prv_clock_dstrule_to_timestamp(true, tz_info, &dst_rule_end, year); + dst_start_stamps[i] = prv_clock_dstrule_to_timestamp(false, tz_info, &dst_rule_begin, year); + dst_end_stamps[i] = prv_clock_dstrule_to_timestamp(true, tz_info, &dst_rule_end, year); } // Figure out which timestamps are relevant to us @@ -198,14 +194,13 @@ T_STATIC void prv_update_dstrule_timestamps_by_dstzone_id(TimezoneInfo *tz_info, tz_info->dst_start = dst_start_stamps[start_idx]; tz_info->dst_end = dst_end_stamps[end_idx]; -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW } -static void prv_clock_get_timezone_info_from_region_id( - int16_t region_id, time_t utc_time, TimezoneInfo *tz_info) { - +static void prv_clock_get_timezone_info_from_region_id(int16_t region_id, time_t utc_time, + TimezoneInfo *tz_info) { #ifdef CONFIG_RECOVERY_FW - *tz_info = (TimezoneInfo) { .dst_id = 0 }; + *tz_info = (TimezoneInfo){.dst_id = 0}; #else timezone_database_load_region_info(region_id, tz_info); prv_update_dstrule_timestamps_by_dstzone_id(tz_info, utc_time); @@ -216,8 +211,8 @@ static TimezoneInfo prv_get_timezone_info_from_data(TimezoneCBData *tz_data) { int region_id = -1; if (tz_data->region_name_len) { - region_id = timezone_database_find_region_by_name(tz_data->region_name, - tz_data->region_name_len); + region_id = + timezone_database_find_region_by_name(tz_data->region_name, tz_data->region_name_len); } if (region_id != -1) { @@ -230,18 +225,18 @@ static TimezoneInfo prv_get_timezone_info_from_data(TimezoneCBData *tz_data) { // Else, we couldn't find find the specified timezone. #ifndef CONFIG_RECOVERY_FW TimezoneInfo tz_info = { - .dst_id = 0, - .timezone_id = UNKNOWN_TIMEZONE_ID, - .tm_gmtoff = tz_data->utc_offset_min * SECONDS_PER_MINUTE, - .dst_start = 0, - .dst_end = 0, + .dst_id = 0, + .timezone_id = UNKNOWN_TIMEZONE_ID, + .tm_gmtoff = tz_data->utc_offset_min * SECONDS_PER_MINUTE, + .dst_start = 0, + .dst_end = 0, }; // I was hoping to fill the name with something like UTC-10 or UTC+4.25 but we only get 5 chars strncpy(tz_info.tm_zone, "N/A", TZ_LEN - 1); return tz_info; #else - return (TimezoneInfo) {}; + return (TimezoneInfo){}; #endif } @@ -253,7 +248,7 @@ T_STATIC void prv_update_time_info_and_generate_event(time_t *t, TimezoneInfo *t time_t orig_utc_time = rtc_get_time(); TimezoneInfo tz_adjust_info = {{0}}; - if (clock_is_timezone_set()) { // We'll need to update timezone stamps. + if (clock_is_timezone_set()) { // We'll need to update timezone stamps. time_t tz_adjust_time; // Get the time that we need to adjust for. if (t) { @@ -261,13 +256,13 @@ T_STATIC void prv_update_time_info_and_generate_event(time_t *t, TimezoneInfo *t } else { tz_adjust_time = orig_utc_time; } - if (tz_info) { // Adjust the DST rule timestamps of the provided tz_info + if (tz_info) { // Adjust the DST rule timestamps of the provided tz_info prv_update_dstrule_timestamps_by_dstzone_id(tz_info, tz_adjust_time); } else if (clock_get_timezone_region_id() != UNKNOWN_TIMEZONE_ID) { // If we have a timezone _actually_ set, update our own. int region_id = clock_get_timezone_region_id(); prv_clock_get_timezone_info_from_region_id(region_id, tz_adjust_time, &tz_adjust_info); - tz_info = &tz_adjust_info; // We need to set timezone info so point to the new info. + tz_info = &tz_adjust_info; // We need to set timezone info so point to the new info. } } @@ -290,12 +285,12 @@ T_STATIC void prv_update_time_info_and_generate_event(time_t *t, TimezoneInfo *t PBL_ANALYTICS_SET_SIGNED(utc_offset_s, new_gmt_offset); PebbleEvent e = { - .type = PEBBLE_SET_TIME_EVENT, - .set_time_info = { - .utc_time_delta = new_utc_time - orig_utc_time, - .gmt_offset_delta = new_gmt_offset - orig_gmt_offset, - .dst_changed = false, - } + .type = PEBBLE_SET_TIME_EVENT, + .set_time_info = { + .utc_time_delta = new_utc_time - orig_utc_time, + .gmt_offset_delta = new_gmt_offset - orig_gmt_offset, + .dst_changed = false, + } }; event_put(&e); } @@ -318,8 +313,7 @@ static void prv_handle_set_utc_and_timezone_msg(TimezoneCBData *tz_data) { } static void prv_handle_set_time_msg(time_t new_time) { - PBL_LOG_WRN("Mobile app calling deprecated API, time = %d", - (int)new_time); + PBL_LOG_WRN("Mobile app calling deprecated API, time = %d", (int)new_time); if (clock_time_source_is_manual()) { // Manual time mode: ignore time set from phone return; @@ -331,7 +325,7 @@ static void prv_handle_set_time_msg(time_t new_time) { prv_update_time_info_and_generate_event(&new_time, NULL); } -void clock_protocol_msg_callback(CommSession *session, const uint8_t* data, unsigned int length) { +void clock_protocol_msg_callback(CommSession *session, const uint8_t *data, unsigned int length) { char sub_command = *data++; switch (sub_command) { @@ -345,17 +339,17 @@ void clock_protocol_msg_callback(CommSession *session, const uint8_t* data, unsi response_buffer[0] = 0x01; - *(uint32_t*)(response_buffer + 1) = htonl(t); + *(uint32_t *)(response_buffer + 1) = htonl(t); comm_session_send_data(session, protocol_time_endpoint_id, response_buffer, response_buffer_length, COMM_SESSION_DEFAULT_TIMEOUT); - PBL_LOG_VERBOSE("protocol_time_callback called, responding with current time: %"PRIu32, + PBL_LOG_VERBOSE("protocol_time_callback called, responding with current time: %" PRIu32, (uint32_t)t); break; } // Set time: case 0x02: { - time_t new_time = ntohl(*(uint32_t*)data); + time_t new_time = ntohl(*(uint32_t *)data); prv_handle_set_time_msg(new_time); break; } @@ -388,7 +382,7 @@ void clock_protocol_msg_callback(CommSession *session, const uint8_t* data, unsi //! Runs once a minute from the regular_timer minutes list. DST transitions and //! the top of the hour both land on minute boundaries, so minute granularity //! detects them at the same instant the old per-second poll did. -T_STATIC void prv_watch_dst(void* user) { +T_STATIC void prv_watch_dst(void *user) { const bool was_dst = (bool)user; const bool is_dst = time_get_isdst(rtc_get_time()); @@ -408,20 +402,20 @@ T_STATIC void prv_watch_dst(void* user) { if (is_dst != was_dst) { PebbleEvent e = { - .type = PEBBLE_SET_TIME_EVENT, - .set_time_info = { - .utc_time_delta = 0, - .gmt_offset_delta = 0, - .dst_changed = true, - } + .type = PEBBLE_SET_TIME_EVENT, + .set_time_info = { + .utc_time_delta = 0, + .gmt_offset_delta = 0, + .dst_changed = true, + } }; event_put(&e); - s_dst_checker.cb_data = (void*)is_dst; + s_dst_checker.cb_data = (void *)is_dst; } } // Minimum valid time: January 1, 2010 00:00:00 UTC -// On RTC loss, Asterix boots to 1970 and Obelix to 2000 +// On RTC loss, Asterix boots to 1970 and Obelix to 2000 // Snap forward so time isnt *that* off #define MIN_VALID_BOOT_TIMESTAMP 1262304000 @@ -436,9 +430,9 @@ void clock_init(void) { time_util_update_timezone(&tz_info); } // TODO: Using a regular timer is pretty gross... - s_dst_checker = (RegularTimerInfo) { - .cb = prv_watch_dst, - .cb_data = (void*)time_get_isdst(rtc_get_time()), + s_dst_checker = (RegularTimerInfo){ + .cb = prv_watch_dst, + .cb_data = (void *)time_get_isdst(rtc_get_time()), }; #ifndef CONFIG_RECOVERY_FW s_hourly_chime_armed = false; @@ -452,7 +446,7 @@ void clock_hourly_chime_arm(void) { } #endif -void clock_get_time_tm(struct tm* time_tm) { +void clock_get_time_tm(struct tm *time_tm) { rtc_get_time_tm(time_tm); } @@ -508,8 +502,7 @@ size_t clock_get_time_number(char *number_buffer, size_t number_buffer_size, tim prv_format_time(number_buffer, number_buffer_size, (clock_is_24h_style() ? i18n_noop("%R") : i18n_noop("%l:%M")), timestamp); const char *number_buffer_ptr = string_strip_leading_whitespace(number_buffer); - memmove(number_buffer, - number_buffer_ptr, + memmove(number_buffer, number_buffer_ptr, number_buffer_size - (number_buffer_ptr - number_buffer)); return written - (number_buffer_ptr - number_buffer); } @@ -524,7 +517,8 @@ size_t clock_get_time_word(char *buffer, size_t buffer_size, time_t timestamp) { } static void prv_copy_time_string_timestamp(char *number_buffer, uint8_t number_buffer_size, - char *word_buffer, uint8_t word_buffer_size, time_t timestamp) { + char *word_buffer, uint8_t word_buffer_size, + time_t timestamp) { clock_get_time_number(number_buffer, number_buffer_size, timestamp); clock_get_time_word(word_buffer, word_buffer_size, timestamp); } @@ -539,11 +533,12 @@ static void prv_get_relative_all_day_string(char *buffer, int buffer_size, time_ } static void prv_copy_relative_time_string(char *number_buffer, uint8_t number_buffer_size, - char *word_buffer, uint8_t word_buffer_size, time_t timestamp, time_t end_time) { + char *word_buffer, uint8_t word_buffer_size, + time_t timestamp, time_t end_time) { time_t now = rtc_get_time(); // average without overflows since time_t might be signed and now ~1.4 billion, so 2*now > INT_MAX time_t midtime = timestamp / 2 + end_time / 2; - if (midtime > now) { // future + if (midtime > now) { // future time_t difference = timestamp - now; if (timestamp < now || difference < SECONDS_PER_MINUTE) { i18n_get_with_buffer("Now", word_buffer, word_buffer_size); @@ -551,18 +546,18 @@ static void prv_copy_relative_time_string(char *number_buffer, uint8_t number_bu } else if (difference <= SECONDS_PER_HOUR) { snprintf(number_buffer, number_buffer_size, "%ld", difference / SECONDS_PER_MINUTE); i18n_get_with_buffer(" MIN. TO", word_buffer, word_buffer_size); - } else { + } else { prv_copy_time_string_timestamp(number_buffer, number_buffer_size, word_buffer, - word_buffer_size, timestamp); + word_buffer_size, timestamp); } - } else { // past + } else { // past time_t difference = now - timestamp; if (now < timestamp || difference < SECONDS_PER_MINUTE) { i18n_get_with_buffer("Now", word_buffer, word_buffer_size); strncpy(number_buffer, "", number_buffer_size); } else { prv_copy_time_string_timestamp(number_buffer, number_buffer_size, word_buffer, - word_buffer_size, timestamp); + word_buffer_size, timestamp); } } } @@ -570,8 +565,8 @@ static void prv_copy_relative_time_string(char *number_buffer, uint8_t number_bu // number: 10 // word: min to void clock_get_event_relative_time_string(char *number_buffer, int number_buffer_size, - char *word_buffer, int word_buffer_size, time_t timestamp, uint16_t duration, - time_t current_day, bool all_day) { + char *word_buffer, int word_buffer_size, time_t timestamp, + uint16_t duration, time_t current_day, bool all_day) { time_t end_time = timestamp + duration * SECONDS_PER_MINUTE; if (all_day) { // all day event, multiday or single day @@ -579,12 +574,12 @@ void clock_get_event_relative_time_string(char *number_buffer, int number_buffer strncpy(number_buffer, "", number_buffer_size); } else if (time_util_get_midnight_of(timestamp) == current_day) { // first day of multiday event or only day - prv_copy_relative_time_string(number_buffer, number_buffer_size, word_buffer, - word_buffer_size, timestamp, end_time); + prv_copy_relative_time_string(number_buffer, number_buffer_size, word_buffer, word_buffer_size, + timestamp, end_time); } else if (time_util_get_midnight_of(end_time) == current_day) { // last day of multiday event - prv_copy_relative_time_string(number_buffer, number_buffer_size, word_buffer, - word_buffer_size, end_time, end_time); + prv_copy_relative_time_string(number_buffer, number_buffer_size, word_buffer, word_buffer_size, + end_time, end_time); } else { // middle day of non-all day multiday event prv_get_relative_all_day_string(word_buffer, word_buffer_size, current_day); @@ -629,9 +624,9 @@ void clock_request_time_from_phone(void) { // Send sub-command 0x04 (request time) to the phone. // The phone should respond with a 0x03 (set UTC + timezone) message. - const uint8_t request[] = { 0x04 }; - comm_session_send_data(session, protocol_time_endpoint_id, request, - sizeof(request), COMM_SESSION_DEFAULT_TIMEOUT); + const uint8_t request[] = {0x04}; + comm_session_send_data(session, protocol_time_endpoint_id, request, sizeof(request), + COMM_SESSION_DEFAULT_TIMEOUT); } DEFINE_SYSCALL(time_t, clock_to_timestamp, WeekDay day, int hour, int minute) { @@ -644,10 +639,10 @@ DEFINE_SYSCALL(time_t, clock_to_timestamp, WeekDay day, int hour, int minute) { day -= 1; // cal_wday is 0-6 int day_offset = (day > cal.tm_wday) ? (day - cal.tm_wday) : (day - cal.tm_wday + 7); cal.tm_mday += day_offset; // normalized by mktime - } else if ((hour < cal.tm_hour) || (hour == cal.tm_hour && minute <= cal.tm_min)){ + } else if ((hour < cal.tm_hour) || (hour == cal.tm_hour && minute <= cal.tm_min)) { // Always return a future timestamp, so if day was today, and // minutes and hours already occurred, just make it tomorrow - cal.tm_mday++; // normalized by mktime + cal.tm_mday++; // normalized by mktime } cal.tm_hour = hour; @@ -691,7 +686,7 @@ void command_set_time(const char *arg) { prompt_send_response_fmt(buffer, 80, "Time is now <%s>", rtc_get_time_string(time_buffer)); } -void clock_get_timezone_region(char* region_name, const size_t buffer_size) { +void clock_get_timezone_region(char *region_name, const size_t buffer_size) { if (!region_name) { return; } @@ -893,8 +888,7 @@ static void prv_clock_get_relative_time_string(char *buffer, int buf_size, time_ prv_clock_get_full_relative_time(buffer, buf_size, timestamp, capitalized, with_fulltime); } else if (difference >= SECONDS_PER_HOUR) { - const int num_hrs = - prv_round(difference, SECONDS_PER_HOUR, RoundTypeHalfUp) / SECONDS_PER_HOUR; + const int num_hrs = prv_round(difference, SECONDS_PER_HOUR, RoundTypeHalfUp) / SECONDS_PER_HOUR; const char *str_fmt; if (capitalized) { @@ -998,8 +992,7 @@ void clock_get_since_time(char *buffer, int buf_size, time_t timestamp) { true); } -void clock_get_until_time(char *buffer, int buf_size, time_t timestamp, - int max_relative_hrs) { +void clock_get_until_time(char *buffer, int buf_size, time_t timestamp, int max_relative_hrs) { prv_clock_get_relative_time_string(buffer, buf_size, timestamp, false, max_relative_hrs, true); } @@ -1022,21 +1015,21 @@ DEFINE_SYSCALL(void, sys_clock_get_timezone, char *timezone, const size_t buffer typedef struct daypart_message { const uint32_t hour_offset; // hours from 12am of current day - const char* const message; // text containing daypart + const char *const message; // text containing daypart } daypart_message; static const daypart_message daypart_messages[] = { - {0, i18n_noop("this morning")}, // anything before 12pm of the current day - {12, i18n_noop("this afternoon")}, // 12pm today - {18, i18n_noop("this evening")}, // 6pm today - {21, i18n_noop("tonight")}, // 9pm today - {33, i18n_noop("tomorrow morning")}, // 9am tomorrow - {36, i18n_noop("tomorrow afternoon")}, // 12pm tomorrow - {42, i18n_noop("tomorrow evening")}, // 6pm tomorrow - {45, i18n_noop("tomorrow night")}, // 9pm tomorrow - {57, i18n_noop("the day after tomorrow")}, // starting 9am 2 days from now - {72, i18n_noop("the day after tomorrow")}, // ends midnight 2 days from now - {73, i18n_noop("the foreseeable future")}, // Catchall for beyond 3 days + {0, i18n_noop("this morning")}, // anything before 12pm of the current day + {12, i18n_noop("this afternoon")}, // 12pm today + {18, i18n_noop("this evening")}, // 6pm today + {21, i18n_noop("tonight")}, // 9pm today + {33, i18n_noop("tomorrow morning")}, // 9am tomorrow + {36, i18n_noop("tomorrow afternoon")}, // 12pm tomorrow + {42, i18n_noop("tomorrow evening")}, // 6pm tomorrow + {45, i18n_noop("tomorrow night")}, // 9pm tomorrow + {57, i18n_noop("the day after tomorrow")}, // starting 9am 2 days from now + {72, i18n_noop("the day after tomorrow")}, // ends midnight 2 days from now + {73, i18n_noop("the foreseeable future")}, // Catchall for beyond 3 days }; //! Daypart string is used internally for battery popups @@ -1058,8 +1051,8 @@ const char *clock_get_relative_daypart_string(time_t current_timestamp, } void clock_hour_and_minute_add(int *hour, int *minute, int delta_minutes) { - const int new_minutes = positive_modulo(*hour * MINUTES_PER_HOUR + *minute + delta_minutes, - MINUTES_PER_DAY); + const int new_minutes = + positive_modulo(*hour * MINUTES_PER_HOUR + *minute + delta_minutes, MINUTES_PER_DAY); *hour = new_minutes / MINUTES_PER_HOUR; *minute = new_minutes % MINUTES_PER_HOUR; } diff --git a/src/fw/services/comm_session/app_session_capabilities.c b/src/fw/services/comm_session/app_session_capabilities.c index fcde76c646..9132a82fc7 100644 --- a/src/fw/services/comm_session/app_session_capabilities.c +++ b/src/fw/services/comm_session/app_session_capabilities.c @@ -45,9 +45,8 @@ bool comm_session_current_app_session_cache_has_capability(CommSessionCapability uint64_t cached_capabilities = 0; if (file_open) { - settings_file_get(&settings_file, - &app_uuid, sizeof(app_uuid), - &cached_capabilities, sizeof(cached_capabilities)); + settings_file_get(&settings_file, &app_uuid, sizeof(app_uuid), &cached_capabilities, + sizeof(cached_capabilities)); } uint64_t new_capabilities = cached_capabilities; @@ -56,9 +55,8 @@ bool comm_session_current_app_session_cache_has_capability(CommSessionCapability new_capabilities = comm_session_get_capabilities(app_session); if (file_open && (new_capabilities != cached_capabilities)) { - settings_file_set(&settings_file, - &app_uuid, sizeof(app_uuid), - &new_capabilities, sizeof(new_capabilities)); + settings_file_set(&settings_file, &app_uuid, sizeof(app_uuid), &new_capabilities, + sizeof(new_capabilities)); } } @@ -69,12 +67,10 @@ bool comm_session_current_app_session_cache_has_capability(CommSessionCapability return ((new_capabilities & capability) != 0); } -static void prv_rewrite_cb(SettingsFile *old_file, - SettingsFile *new_file, - SettingsRecordInfo *info, +static void prv_rewrite_cb(SettingsFile *old_file, SettingsFile *new_file, SettingsRecordInfo *info, void *context) { if (!info->val_len) { - return; // Cache for this app has been deleted, don't rewrite it + return; // Cache for this app has been deleted, don't rewrite it } Uuid key; uint64_t val; diff --git a/src/fw/services/comm_session/default_kernel_receiver.c b/src/fw/services/comm_session/default_kernel_receiver.c index b9708c0004..dcbf9ce0dc 100644 --- a/src/fw/services/comm_session/default_kernel_receiver.c +++ b/src/fw/services/comm_session/default_kernel_receiver.c @@ -57,9 +57,9 @@ static bool s_bg_callback_pending; static SingleListNode *s_pending_main_head; static bool s_main_callback_pending; -static Receiver *prv_default_kernel_receiver_prepare( - CommSession *session, const PebbleProtocolEndpoint *endpoint, - size_t total_payload_size) { +static Receiver *prv_default_kernel_receiver_prepare(CommSession *session, + const PebbleProtocolEndpoint *endpoint, + size_t total_payload_size) { if (total_payload_size == 0) { return NULL; // Ignore zero-length messages } @@ -68,26 +68,26 @@ static Receiver *prv_default_kernel_receiver_prepare( DefaultReceiverImpl *receiver = kernel_zalloc(size_needed); if (!receiver) { - PBL_LOG_WRN("Could not allocate receiver, handler:%p size:%d", - endpoint->handler, (int)size_needed); + PBL_LOG_WRN("Could not allocate receiver, handler:%p size:%d", endpoint->handler, + (int)size_needed); return NULL; } const bool should_use_kernel_main = (endpoint->receiver_opt == &g_default_kernel_receiver_opt_main); - *receiver = (DefaultReceiverImpl) { - .session = session, - .endpoint = endpoint, - .total_payload_size = total_payload_size, - .should_use_kernel_main = should_use_kernel_main, - .curr_pos = 0 + *receiver = (DefaultReceiverImpl){ + .session = session, + .endpoint = endpoint, + .total_payload_size = total_payload_size, + .should_use_kernel_main = should_use_kernel_main, + .curr_pos = 0 }; return (Receiver *)receiver; } -static void prv_default_kernel_receiver_write( - Receiver *receiver, const uint8_t *data, size_t length) { +static void prv_default_kernel_receiver_write(Receiver *receiver, const uint8_t *data, + size_t length) { DefaultReceiverImpl *impl = (DefaultReceiverImpl *)receiver; PBL_ASSERTN((impl->curr_pos + length) <= impl->total_payload_size); @@ -97,11 +97,10 @@ static void prv_default_kernel_receiver_write( } static void prv_wipe_receiver_data(DefaultReceiverImpl *receiver) { - *receiver = (DefaultReceiverImpl) { }; + *receiver = (DefaultReceiverImpl){}; } -static void prv_append_to_pending_list(DefaultReceiverImpl *impl, - SingleListNode **head) { +static void prv_append_to_pending_list(DefaultReceiverImpl *impl, SingleListNode **head) { slist_init(&impl->node); if (*head) { slist_append(*head, &impl->node); @@ -161,8 +160,7 @@ static void prv_default_kernel_receiver_finish(Receiver *receiver) { impl->handler_scheduled = true; if ((int)impl->total_payload_size != impl->curr_pos) { - PBL_LOG_WRN("Got fewer bytes than expected for handler %p", - impl->endpoint->handler); + PBL_LOG_WRN("Got fewer bytes than expected for handler %p", impl->endpoint->handler); } // Coalesce callbacks: append to the pending list and only schedule a new @@ -187,15 +185,15 @@ static void prv_default_kernel_receiver_finish(Receiver *receiver) { static void prv_default_kernel_receiver_cleanup(Receiver *receiver) { DefaultReceiverImpl *impl = (DefaultReceiverImpl *)receiver; if (impl->handler_scheduled) { - return; // the kernel BG/main callback will free the data + return; // the kernel BG/main callback will free the data } prv_wipe_receiver_data(impl); kernel_free(impl); } const ReceiverImplementation g_default_kernel_receiver_implementation = { - .prepare = prv_default_kernel_receiver_prepare, - .write = prv_default_kernel_receiver_write, - .finish = prv_default_kernel_receiver_finish, - .cleanup = prv_default_kernel_receiver_cleanup, + .prepare = prv_default_kernel_receiver_prepare, + .write = prv_default_kernel_receiver_write, + .finish = prv_default_kernel_receiver_finish, + .cleanup = prv_default_kernel_receiver_cleanup, }; diff --git a/src/fw/services/comm_session/default_kernel_sender.c b/src/fw/services/comm_session/default_kernel_sender.c index c164e494c8..d9f417c9a5 100644 --- a/src/fw/services/comm_session/default_kernel_sender.c +++ b/src/fw/services/comm_session/default_kernel_sender.c @@ -109,22 +109,22 @@ static SendBuffer *prv_create_send_buffer(CommSession *session, uint16_t endpoin // Use ...alloc_check() here. If this appears to be an issue, we could consider giving this // module its own Heap: SendBuffer *sb = (SendBuffer *)kernel_zalloc_check(allocation_size); - *sb = (const SendBuffer) { - .payload_buffer_length = payload_buffer_length, - .consumed_length = 0, - .session = session, - .header = { - .endpoint_id = htons(endpoint_id), - .length = 0, - }, + *sb = (const SendBuffer){ + .payload_buffer_length = payload_buffer_length, + .consumed_length = 0, + .session = session, + .header = { + .endpoint_id = htons(endpoint_id), + .length = 0, + }, }; return sb; } static void prv_destroy_send_buffer(SendBuffer *sb) { bt_lock_assert_held(true /* assert_is_held */); - s_default_kernel_sender_bytes_allocated -= (sizeof(PebbleProtocolHeader) - + sb->payload_buffer_length); + s_default_kernel_sender_bytes_allocated -= + (sizeof(PebbleProtocolHeader) + sb->payload_buffer_length); kernel_free(sb); pbl_sem_give(&s_default_kernel_sender_write_semaphore); } @@ -171,11 +171,11 @@ static void prv_send_job_impl_free(SessionSendQueueJob *send_job) { } T_STATIC const SessionSendJobImpl s_default_kernel_send_job_impl = { - .get_length = prv_send_job_impl_get_length, - .copy = prv_send_job_impl_copy, - .get_read_pointer = prv_send_job_impl_get_read_pointer, - .consume = prv_send_job_impl_consume, - .free = prv_send_job_impl_free, + .get_length = prv_send_job_impl_get_length, + .copy = prv_send_job_impl_copy, + .get_read_pointer = prv_send_job_impl_get_read_pointer, + .consume = prv_send_job_impl_consume, + .free = prv_send_job_impl_free, }; // ------------------------------------------------------------------------------------------------- @@ -193,15 +193,15 @@ size_t comm_session_send_buffer_get_max_payload_length(const CommSession *sessio return max_length; } -SendBuffer * comm_session_send_buffer_begin_write(CommSession *session, uint16_t endpoint_id, - size_t required_payload_length, - uint32_t timeout_ms) { +SendBuffer *comm_session_send_buffer_begin_write(CommSession *session, uint16_t endpoint_id, + size_t required_payload_length, + uint32_t timeout_ms) { if (!session) { return NULL; } if (required_payload_length > DEFAULT_KERNEL_SENDER_MAX_PAYLOAD_SIZE) { - PBL_LOG_WRN("Message for endpoint_id %u exceeds maximum length (length=%"PRIu32")", - endpoint_id, (uint32_t)required_payload_length); + PBL_LOG_WRN("Message for endpoint_id %u exceeds maximum length (length=%" PRIu32 ")", + endpoint_id, (uint32_t)required_payload_length); return NULL; } @@ -239,13 +239,15 @@ SendBuffer * comm_session_send_buffer_begin_write(CommSession *session, uint16_t comm_session_send_next_immediately(session); } else { // Wait for the sending process to free up some space in the send buffer: - is_timeout = ((pbl_sem_take(&s_default_kernel_sender_write_semaphore, PBL_TICKS(remaining_ms)) != 0)); + is_timeout = (( + pbl_sem_take(&s_default_kernel_sender_write_semaphore, PBL_TICKS(remaining_ms)) != 0)); } } if (is_timeout) { - PBL_LOG_WRN("Failed to get send buffer (bytes=%"PRIu32", endpoint_id=%"PRIu16", to=%"PRIu32")", - (uint32_t)required_payload_length, endpoint_id, (uint32_t)is_timeout); + PBL_LOG_WRN("Failed to get send buffer (bytes=%" PRIu32 ", endpoint_id=%" PRIu16 + ", to=%" PRIu32 ")", + (uint32_t)required_payload_length, endpoint_id, (uint32_t)is_timeout); return NULL; } } // while(true) @@ -263,8 +265,8 @@ bool comm_session_send_buffer_write(SendBuffer *sb, const uint8_t *data, size_t void comm_session_send_buffer_end_write(SendBuffer *sb) { CommSession *session = sb->session; // Clear out the ListNode and set impl: - sb->queue_job = (const SessionSendQueueJob) { - .impl = &s_default_kernel_send_job_impl, + sb->queue_job = (const SessionSendQueueJob){ + .impl = &s_default_kernel_send_job_impl, }; sb->header.length = ntohs(sb->written_length); comm_session_send_queue_add_job(session, (SessionSendQueueJob **)&sb); @@ -273,7 +275,7 @@ void comm_session_send_buffer_end_write(SendBuffer *sb) { // ------------------------------------------------------------------------------------------------- // Interfaces for testing -struct pbl_sem * comm_session_send_buffer_write_semaphore(void) { +struct pbl_sem *comm_session_send_buffer_write_semaphore(void) { return &s_default_kernel_sender_write_semaphore; } diff --git a/src/fw/services/comm_session/meta_endpoint.c b/src/fw/services/comm_session/meta_endpoint.c index 7f07409e69..d134c39346 100644 --- a/src/fw/services/comm_session/meta_endpoint.c +++ b/src/fw/services/comm_session/meta_endpoint.c @@ -17,7 +17,7 @@ static void prv_send_meta_response_kernelbg_cb(void *data) { // Swap endpoint_id bytes to be Big-Endian: meta_response_info_heap_copy->payload.endpoint_id = - htons(meta_response_info_heap_copy->payload.endpoint_id); + htons(meta_response_info_heap_copy->payload.endpoint_id); uint16_t payload_size; if (meta_response_info_heap_copy->payload.error_code == MetaResponseCodeCorruptedMessage) { @@ -27,21 +27,21 @@ static void prv_send_meta_response_kernelbg_cb(void *data) { } comm_session_send_data(meta_response_info_heap_copy->session, META_ENDPOINT_ID, - (const uint8_t *)&meta_response_info_heap_copy->payload, - payload_size, COMM_SESSION_DEFAULT_TIMEOUT); + (const uint8_t *)&meta_response_info_heap_copy->payload, payload_size, + COMM_SESSION_DEFAULT_TIMEOUT); kernel_free(meta_response_info_heap_copy); } void meta_endpoint_send_response_async(const MetaResponseInfo *meta_response_info) { - PBL_LOG_ERR("Meta protocol error: 0x%x (endpoint=%u)", - meta_response_info->payload.error_code, meta_response_info->payload.endpoint_id); + PBL_LOG_ERR("Meta protocol error: 0x%x (endpoint=%u)", meta_response_info->payload.error_code, + meta_response_info->payload.endpoint_id); MetaResponseInfo *meta_response_info_heap_copy = kernel_zalloc_check(sizeof(*meta_response_info)); memcpy(meta_response_info_heap_copy, meta_response_info, sizeof(*meta_response_info)); system_task_add_callback(prv_send_meta_response_kernelbg_cb, meta_response_info_heap_copy); } -void meta_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length) { +void meta_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length) { PBL_LOG_DBG("Meta endpoint callback called"); } diff --git a/src/fw/services/comm_session/session.c b/src/fw/services/comm_session/session.c index b0b0f4194c..bcec38f6de 100644 --- a/src/fw/services/comm_session/session.c +++ b/src/fw/services/comm_session/session.c @@ -41,7 +41,7 @@ static CommSession *s_session_head; // ------------------------------------------------------------------------------------------------- // Defined in session_send_buffer.c -extern SendBuffer * comm_session_send_buffer_create(TransportDestination destination); +extern SendBuffer *comm_session_send_buffer_create(TransportDestination destination); extern void comm_session_send_buffer_destroy(SendBuffer *sb); // ------------------------------------------------------------------------------------------------- @@ -56,10 +56,9 @@ extern void comm_session_send_queue_cleanup(CommSession *session); static void prv_put_comm_session_event(bool is_open, bool is_system) { PebbleEvent event = { - .type = PEBBLE_COMM_SESSION_EVENT, - .bluetooth.comm_session_event.is_open = is_open, - .bluetooth.comm_session_event - .is_system = is_system, + .type = PEBBLE_COMM_SESSION_EVENT, + .bluetooth.comm_session_event.is_open = is_open, + .bluetooth.comm_session_event.is_system = is_system, }; event_put(&event); } @@ -70,7 +69,7 @@ static void prv_put_comm_session_event(bool is_open, bool is_system) { //! bt_lock() is expected to be taken by the caller! bool comm_session_is_valid(const CommSession *session) { - return list_contains((ListNode *) s_session_head, &session->node); + return list_contains((ListNode *)s_session_head, &session->node); } // ------------------------------------------------------------------------------------------------- @@ -106,12 +105,11 @@ void comm_session_set_capabilities(CommSession *session, CommSessionCapability c bt_unlock(); if (comm_session_is_system(session)) { - const PebbleProtocolCapabilities capabilities = { .flags = capability_flags }; + const PebbleProtocolCapabilities capabilities = {.flags = capability_flags}; bt_persistent_storage_set_cached_system_capabilities(&capabilities); } } - //! Resets the session (close and attempt re-opening the session) //! @note If the underlying transport is iAP, this will end up closing all the sessions on top of //! the transport, since we don't really have the ability to close a single iAP session. @@ -141,9 +139,12 @@ static const Uuid *prv_get_uuid(const CommSession *session) { static const char *prv_string_for_destination(TransportDestination destination) { switch (destination) { - case TransportDestinationSystem: return "S"; - case TransportDestinationApp: return "A"; - case TransportDestinationHybrid: return "H"; + case TransportDestinationSystem: + return "S"; + case TransportDestinationApp: + return "A"; + case TransportDestinationHybrid: + return "H"; default: WTF; return NULL; @@ -153,8 +154,8 @@ static const char *prv_string_for_destination(TransportDestination destination) static void prv_log_session_event(CommSession *session, bool is_open) { char uuid_string[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(prv_get_uuid(session), uuid_string); - PBL_LOG_INFO("Session event: is_open=%d, destination=%s, app_uuid=%s", - is_open, prv_string_for_destination(session->destination), uuid_string); + PBL_LOG_INFO("Session event: is_open=%d, destination=%s, app_uuid=%s", is_open, + prv_string_for_destination(session->destination), uuid_string); } static bool prv_is_transport_type(Transport *transport, @@ -165,9 +166,8 @@ static bool prv_is_transport_type(Transport *transport, } //! bt_lock() is expected to be taken by the caller! -CommSession * comm_session_open(Transport *transport, const TransportImplementation *implementation, - TransportDestination destination) { - +CommSession *comm_session_open(Transport *transport, const TransportImplementation *implementation, + TransportDestination destination) { const bool is_system = (destination != TransportDestinationApp); if (is_system) { CommSession *existing_system_session = comm_session_get_system_session(); @@ -176,20 +176,21 @@ CommSession * comm_session_open(Transport *transport, const TransportImplementat // Actually using PULSE at the same time as another transport may cause // undesirable behaviour however. if (!prv_is_transport_type(existing_system_session->transport, - existing_system_session->transport_imp, - CommSessionTransportType_PULSE) - && !prv_is_transport_type(transport, implementation, CommSessionTransportType_PULSE)) { + existing_system_session->transport_imp, + CommSessionTransportType_PULSE) && + !prv_is_transport_type(transport, implementation, CommSessionTransportType_PULSE)) { if (!existing_system_session->transport_imp->close) { // iAP sessions cannot be closed from the watch' side :( PBL_LOG_ERR("System session already exists and cannot be closed"); return NULL; } // Last system session to connect wins: - // This is to work-around a race condition that happens when iOS still has the PPoGATT service - // registered (the app has crashed / jettisoned) and iSPP is connected but the system session - // is running over PPoGATT. If the app launches again, it will have no state of what was the - // previously used transport was, prior to getting killed. Often, iAP ends up winning. - // However, to the firmware, PPoGATT still appears connected, so we'd end up here. + // This is to work-around a race condition that happens when iOS still has the PPoGATT + // service registered (the app has crashed / jettisoned) and iSPP is connected but the + // system session is running over PPoGATT. If the app launches again, it will have no state + // of what was the previously used transport was, prior to getting killed. Often, iAP ends + // up winning. However, to the firmware, PPoGATT still appears connected, so we'd end up + // here. PBL_LOG_INFO("System session already exists, closing it now"); existing_system_session->transport_imp->close(existing_system_session->transport); } @@ -201,13 +202,13 @@ CommSession * comm_session_open(Transport *transport, const TransportImplementat PBL_LOG_ERR("Not enough memory for new CommSession"); return NULL; } - *session = (const CommSession) { - .transport = transport, - .transport_imp = implementation, - .destination = destination, + *session = (const CommSession){ + .transport = transport, + .transport_imp = implementation, + .destination = destination, }; - s_session_head = (CommSession *) list_prepend((ListNode *) s_session_head, &session->node); + s_session_head = (CommSession *)list_prepend((ListNode *)s_session_head, &session->node); prv_log_session_event(session, true /* is_open */); @@ -239,7 +240,6 @@ void comm_session_close(CommSession *session, CommSessionCloseReason reason) { const bool is_system = (session->destination != TransportDestinationApp); if (is_system) { - // Only relevant for iOS + BLE, otherwise this is a no-op: app_launch_trigger(); @@ -258,13 +258,12 @@ void comm_session_close(CommSession *session, CommSessionCloseReason reason) { // Cleanup: comm_session_receive_router_cleanup(session); comm_session_send_queue_cleanup(session); - list_remove(&session->node, (ListNode **) &s_session_head, NULL); + list_remove(&session->node, (ListNode **)&s_session_head, NULL); kernel_free(session); } -void comm_session_set_responsiveness( - CommSession *session, BtConsumer consumer, ResponseTimeState state, - uint16_t max_period_secs) { +void comm_session_set_responsiveness(CommSession *session, BtConsumer consumer, + ResponseTimeState state, uint16_t max_period_secs) { comm_session_set_responsiveness_ext(session, consumer, state, max_period_secs, NULL); } @@ -274,9 +273,8 @@ void comm_session_set_responsiveness_ext(CommSession *session, BtConsumer consum if (session) { bt_lock(); if (comm_session_is_valid(session)) { - session->transport_imp->set_connection_responsiveness(session->transport, consumer, - state, max_period_secs, - granted_handler); + session->transport_imp->set_connection_responsiveness(session->transport, consumer, state, + max_period_secs, granted_handler); } bt_unlock(); } @@ -351,8 +349,8 @@ bool comm_session_send_next_is_scheduled(CommSession *session) { // Interface towards the system / subsystems that need to receive and send data // ------------------------------------------------------------------------------------------------- -bool comm_session_send_data(CommSession *session, uint16_t endpoint_id, - const uint8_t *data, size_t length, uint32_t timeout_ms) { +bool comm_session_send_data(CommSession *session, uint16_t endpoint_id, const uint8_t *data, + size_t length, uint32_t timeout_ms) { if (!session) { return false; } @@ -383,8 +381,8 @@ static bool prv_find_session_by_app_uuid_comparator(ListNode *found_node, void * } // If there is no valid UUID, it means we don't know what app UUID is associated with the // transport, consider it as a fallback option: - const bool is_unknown_app_session = (session->destination == TransportDestinationApp && - uuid_is_invalid(session_uuid)); + const bool is_unknown_app_session = + (session->destination == TransportDestinationApp && uuid_is_invalid(session_uuid)); const bool is_hybrid_session = (session->destination == TransportDestinationHybrid); if (is_hybrid_session || is_unknown_app_session) { // On Android + SPP, we can expect one Hybrid session, so we assume that the found session is @@ -404,12 +402,12 @@ static CommSession *prv_get_app_session(void) { if (uuid_is_system(app_uuid) || uuid_is_invalid(app_uuid)) { return NULL; } - FindByAppUUIDContext ctx = (FindByAppUUIDContext) { - .app_uuid = app_uuid, + FindByAppUUIDContext ctx = (FindByAppUUIDContext){ + .app_uuid = app_uuid, }; // Try most specific first: - CommSession *session = (CommSession *) list_find((ListNode *) s_session_head, - prv_find_session_by_app_uuid_comparator, &ctx); + CommSession *session = (CommSession *)list_find((ListNode *)s_session_head, + prv_find_session_by_app_uuid_comparator, &ctx); if (!session) { return ctx.fallback_session; } @@ -417,30 +415,30 @@ static CommSession *prv_get_app_session(void) { } static bool prv_find_session_is_system_filter(ListNode *found_node, void *data) { - CommSession *session = (CommSession *) found_node; + CommSession *session = (CommSession *)found_node; const TransportDestination destination = session->destination; - return (destination == TransportDestinationSystem || destination == TransportDestinationHybrid) - && !prv_is_transport_type(session->transport, session->transport_imp, - CommSessionTransportType_QEMU) - && !prv_is_transport_type(session->transport, session->transport_imp, - CommSessionTransportType_PULSE); + return (destination == TransportDestinationSystem || destination == TransportDestinationHybrid) && + !prv_is_transport_type(session->transport, session->transport_imp, + CommSessionTransportType_QEMU) && + !prv_is_transport_type(session->transport, session->transport_imp, + CommSessionTransportType_PULSE); } static bool prv_find_session_is_type_filter(ListNode *found_node, void *data) { - CommSession *session = (CommSession *) found_node; - CommSessionTransportType required_session_type = (CommSessionTransportType) data; + CommSession *session = (CommSession *)found_node; + CommSessionTransportType required_session_type = (CommSessionTransportType)data; return prv_is_transport_type(session->transport, session->transport_imp, required_session_type); } static CommSession *prv_find_session_by_type(CommSessionTransportType session_type) { - return (CommSession *) list_find((ListNode *) s_session_head, - prv_find_session_is_type_filter, (void*)session_type); + return (CommSession *)list_find((ListNode *)s_session_head, prv_find_session_is_type_filter, + (void *)session_type); } static CommSession *prv_get_system_session(void) { // Attempt to explicitly find and return a session that isn't QEMU or PULSE - CommSession *session = (CommSession *) list_find((ListNode *) s_session_head, - prv_find_session_is_system_filter, NULL); + CommSession *session = + (CommSession *)list_find((ListNode *)s_session_head, prv_find_session_is_system_filter, NULL); if (session) { return session; } @@ -520,15 +518,15 @@ CommSessionType comm_session_get_type(const CommSession *session) { bt_lock(); { if (comm_session_is_valid(session)) { - type = (session->destination == TransportDestinationApp) ? CommSessionTypeApp : - CommSessionTypeSystem; + type = (session->destination == TransportDestinationApp) ? CommSessionTypeApp + : CommSessionTypeSystem; } } bt_unlock(); return type; } -bool comm_session_is_system(CommSession* session) { +bool comm_session_is_system(CommSession *session) { return (comm_session_get_type(session) == CommSessionTypeSystem); } @@ -547,16 +545,14 @@ void comm_session_deinit(void) { } DEFINE_SYSCALL(void, sys_app_comm_set_responsiveness, SniffInterval interval) { - CommSession *comm_session = comm_session_get_current_app_session(); switch (interval) { case SNIFF_INTERVAL_REDUCED: - comm_session_set_responsiveness(comm_session, BtConsumerApp, - ResponseTimeMiddle, MAX_PERIOD_RUN_FOREVER); + comm_session_set_responsiveness(comm_session, BtConsumerApp, ResponseTimeMiddle, + MAX_PERIOD_RUN_FOREVER); return; case SNIFF_INTERVAL_NORMAL: - comm_session_set_responsiveness(comm_session, BtConsumerApp, - ResponseTimeMax, 0); + comm_session_set_responsiveness(comm_session, BtConsumerApp, ResponseTimeMax, 0); return; } PBL_LOG_WRN("Invalid sniff interval"); diff --git a/src/fw/services/comm_session/session_analytics.c b/src/fw/services/comm_session/session_analytics.c index fd78af0333..cf3acbe473 100644 --- a/src/fw/services/comm_session/session_analytics.c +++ b/src/fw/services/comm_session/session_analytics.c @@ -27,5 +27,4 @@ void comm_session_analytics_close_session(CommSession *session, CommSessionClose PBL_ANALYTICS_TIMER_START(connectivity_expected_time_ms); PBL_ANALYTICS_TIMER_STOP(connectivity_connected_time_ms); } - } \ No newline at end of file diff --git a/src/fw/services/comm_session/session_receive_router.c b/src/fw/services/comm_session/session_receive_router.c index a8e2eed33a..6f07835970 100644 --- a/src/fw/services/comm_session/session_receive_router.c +++ b/src/fw/services/comm_session/session_receive_router.c @@ -20,9 +20,9 @@ PBL_LOG_MODULE_DECLARE(service_comm_session, CONFIG_SERVICE_COMM_SESSION_LOG_LEV //////////////////////////////////////////////////////////////////////////////////////////////////// // Static helper functions -static const PebbleProtocolEndpoint* prv_find_endpoint(uint16_t endpoint_id) { +static const PebbleProtocolEndpoint *prv_find_endpoint(uint16_t endpoint_id) { for (size_t i = 0; i < ARRAY_LENGTH(s_protocol_endpoints); ++i) { - const PebbleProtocolEndpoint* endpoint = &s_protocol_endpoints[i]; + const PebbleProtocolEndpoint *endpoint = &s_protocol_endpoints[i]; if (!endpoint || endpoint->endpoint_id > endpoint_id) { break; } @@ -33,15 +33,15 @@ static const PebbleProtocolEndpoint* prv_find_endpoint(uint16_t endpoint_id) { return NULL; } -static bool prv_is_endpoint_allowed_with_session(const PebbleProtocolEndpoint* endpoint, +static bool prv_is_endpoint_allowed_with_session(const PebbleProtocolEndpoint *endpoint, CommSession *session) { PebbleProtocolAccess granted_access_bitset = PebbleProtocolAccessNone; switch (comm_session_get_type(session)) { case CommSessionTypeSystem: - granted_access_bitset = PebbleProtocolAccessPrivate; // Pebble app + granted_access_bitset = PebbleProtocolAccessPrivate; // Pebble app break; case CommSessionTypeApp: - granted_access_bitset = PebbleProtocolAccessPublic; // 3rd party PebbleKit app + granted_access_bitset = PebbleProtocolAccessPublic; // 3rd party PebbleKit app break; default: break; @@ -49,7 +49,7 @@ static bool prv_is_endpoint_allowed_with_session(const PebbleProtocolEndpoint* e return (endpoint->access_mask & granted_access_bitset); } -static MetaResponseCode prv_error_for_endpoint(const PebbleProtocolEndpoint* endpoint, +static MetaResponseCode prv_error_for_endpoint(const PebbleProtocolEndpoint *endpoint, CommSession *session) { if (!endpoint) { return MetaResponseCodeUnhandled; @@ -81,9 +81,8 @@ static bool prv_copy_header(ReceiveRouter *rtr, size_t *data_size_p, const uint8 return false; } -static bool prv_handle_endpoint_error_and_skip_message_if_needed(CommSession *session, - const PebbleProtocolEndpoint *endpoint, - const uint16_t endpoint_id) { +static bool prv_handle_endpoint_error_and_skip_message_if_needed( + CommSession *session, const PebbleProtocolEndpoint *endpoint, const uint16_t endpoint_id) { MetaResponseInfo meta_response_info; meta_response_info.payload.error_code = prv_error_for_endpoint(endpoint, session); if (MetaResponseCodeNoError != meta_response_info.payload.error_code) { @@ -118,8 +117,7 @@ static bool prv_ignore_skipped_message_if_needed(const uint8_t **data_p, size_t static bool prv_prepare_receiver(const uint32_t payload_length, const PebbleProtocolEndpoint *endpoint, const uint16_t endpoint_id, CommSession *session, ReceiveRouter *rtr) { - Receiver *receiver = endpoint->receiver_imp->prepare(session, endpoint, - payload_length); + Receiver *receiver = endpoint->receiver_imp->prepare(session, endpoint, payload_length); if (!receiver) { // If no receiver could be provided (buffers full?), ignore the message: @@ -127,8 +125,7 @@ static bool prv_prepare_receiver(const uint32_t payload_length, // - Look into SPP flow control // - With PPoGATT: drop packet and rely on automatic retransmission? - PBL_LOG_ERR("No receiver for endpoint=%"PRIu16" len=%"PRIu32, - endpoint_id, payload_length); + PBL_LOG_ERR("No receiver for endpoint=%" PRIu16 " len=%" PRIu32, endpoint_id, payload_length); prv_skip_message(rtr, payload_length); return true; } @@ -144,7 +141,7 @@ static void prv_write_payload_to_receiver(ReceiveRouter *rtr, size_t *data_size_ const uint8_t **data_p) { // Write the (partial) payload bytes to the Receiver: const uint32_t num_payload_bytes_left_to_receive = - rtr->msg_payload_length + sizeof(PebbleProtocolHeader) - rtr->bytes_received; + rtr->msg_payload_length + sizeof(PebbleProtocolHeader) - rtr->bytes_received; const uint32_t num_payload_bytes_received = MIN(*data_size_p, num_payload_bytes_left_to_receive); rtr->bytes_received += num_payload_bytes_received; rtr->receiver_imp->write(rtr->receiver, *data_p, num_payload_bytes_received); @@ -155,8 +152,8 @@ static void prv_write_payload_to_receiver(ReceiveRouter *rtr, size_t *data_size_ //////////////////////////////////////////////////////////////////////////////////////////////////// // Exported functions -void comm_session_receive_router_write(CommSession *session, - const uint8_t *data, size_t data_size) { +void comm_session_receive_router_write(CommSession *session, const uint8_t *data, + size_t data_size) { PBL_LOG_D_VERBOSE(LOG_DOMAIN_COMM, "Received packet from BT"); PBL_HEXDUMP_D(LOG_DOMAIN_COMM, LOG_LEVEL_DEBUG_VERBOSE, data, data_size); @@ -177,7 +174,7 @@ void comm_session_receive_router_write(CommSession *session, const PebbleProtocolHeader *header_big_endian = (PebbleProtocolHeader *)rtr->header_buffer; const uint16_t endpoint_id = ntohs(header_big_endian->endpoint_id); - const PebbleProtocolEndpoint* endpoint = prv_find_endpoint(endpoint_id); + const PebbleProtocolEndpoint *endpoint = prv_find_endpoint(endpoint_id); const uint32_t payload_length = ntohs(header_big_endian->length); if (prv_handle_endpoint_error_and_skip_message_if_needed(session, endpoint, endpoint_id)) { @@ -185,8 +182,10 @@ void comm_session_receive_router_write(CommSession *session, continue; // while (data_size) } - PBL_LOG_D_DBG(LOG_DOMAIN_COMM, "Receiving message: endpoint_id 0x%"PRIx16" (%"PRIu16"), payload_length %"PRIu32, - endpoint_id, endpoint_id, payload_length); + PBL_LOG_D_DBG(LOG_DOMAIN_COMM, + "Receiving message: endpoint_id 0x%" PRIx16 " (%" PRIu16 + "), payload_length %" PRIu32, + endpoint_id, endpoint_id, payload_length); if (prv_prepare_receiver(payload_length, endpoint, endpoint_id, session, rtr)) { continue; // while (data_size) diff --git a/src/fw/services/comm_session/session_remote_version.c b/src/fw/services/comm_session/session_remote_version.c index f11437a4fc..3f17076b94 100644 --- a/src/fw/services/comm_session/session_remote_version.c +++ b/src/fw/services/comm_session/session_remote_version.c @@ -17,14 +17,13 @@ PBL_LOG_MODULE_DECLARE(service_comm_session, CONFIG_SERVICE_COMM_SESSION_LOG_LEVEL); - extern bool comm_session_is_valid(const CommSession *session); #define MAX_REQUEST_RETRIES (3) //! Defined in session.c. We should only be setting the capabilities here -extern void comm_session_set_capabilities( - CommSession *session, CommSessionCapability capability_flags); +extern void comm_session_set_capabilities(CommSession *session, + CommSessionCapability capability_flags); typedef enum { CommSessionVersionCommandRequest = 0x00, @@ -43,21 +42,21 @@ struct PACKED VersionsPhoneResponseV2 { uint32_t pebble_library_version; uint32_t session_capabilities_bitfield; uint32_t platform_bitfield; - uint8_t response_version; // Set to 2 in this format of the response. - uint8_t major_version; // major version number of the mobile app, i.e. 2 - uint8_t minor_version; // minfo version number of the mobile app, i.e. 0 - uint8_t bugfix_version; // bugfix version number of the mobile app, i.e. 1 + uint8_t response_version; // Set to 2 in this format of the response. + uint8_t major_version; // major version number of the mobile app, i.e. 2 + uint8_t minor_version; // minfo version number of the mobile app, i.e. 0 + uint8_t bugfix_version; // bugfix version number of the mobile app, i.e. 1 }; // The 3.x mobile apps return a longer response than the 2.x apps do struct PACKED VersionsPhoneResponseV3 { - uint32_t pebble_library_version_deprecated; // Deprecated as of v3.x - uint32_t session_capabilities_bitfield; // Deprecated as of v3.x + uint32_t pebble_library_version_deprecated; // Deprecated as of v3.x + uint32_t session_capabilities_bitfield; // Deprecated as of v3.x uint32_t platform_bitfield; - uint8_t response_version; // Set to 2 in this format of the response. - uint8_t major_version; // major version number of the mobile app, i.e. 2 - uint8_t minor_version; // minfo version number of the mobile app, i.e. 0 - uint8_t bugfix_version; // bugfix version number of the mobile app, i.e. 1 + uint8_t response_version; // Set to 2 in this format of the response. + uint8_t major_version; // major version number of the mobile app, i.e. 2 + uint8_t minor_version; // minfo version number of the mobile app, i.e. 0 + uint8_t bugfix_version; // bugfix version number of the mobile app, i.e. 1 //! Pebble Protocol capabilities that the other side supports CommSessionCapability protocol_capabilities; @@ -66,11 +65,11 @@ struct PACKED VersionsPhoneResponseV3 { static const uint16_t SESSION_REMOTE_VERSION_ENDPOINT_ID = 0x0011; static void prv_comm_session_perform_version_request_bg_cb(void *data) { - CommSession *session = (CommSession *) data; + CommSession *session = (CommSession *)data; const uint8_t command = CommSessionVersionCommandRequest; // No need to check validity of session here, comm_session_send_data already does this - comm_session_send_data(session, SESSION_REMOTE_VERSION_ENDPOINT_ID, - &command, sizeof(command), COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(session, SESSION_REMOTE_VERSION_ENDPOINT_ID, &command, sizeof(command), + COMM_SESSION_DEFAULT_TIMEOUT); } static void prv_schedule_request(CommSession *session) { @@ -87,8 +86,8 @@ static void prv_schedule_request(CommSession *session) { } } -static void prv_handle_phone_versions_response(CommSession *session, - const uint8_t *data, size_t length) { +static void prv_handle_phone_versions_response(CommSession *session, const uint8_t *data, + size_t length) { int request_version = 0; // Check which version of the response we are being given based on the length of the @@ -115,8 +114,8 @@ static void prv_handle_phone_versions_response(CommSession *session, // response_version field. That is why we only accept when this field is exactly 2, otherwise we // treat it as a V1 response. if (request_version >= 2) { - PBL_LOG_DBG("Connected to Mobile App %"PRIu8 ".%"PRIu8 "-%"PRIu8, - response->major_version, response->minor_version, response->bugfix_version); + PBL_LOG_DBG("Connected to Mobile App %" PRIu8 ".%" PRIu8 "-%" PRIu8, response->major_version, + response->minor_version, response->bugfix_version); // For 3.X mobile applications, they will return additional bits in their response to correspond // to supporting certain endpoints over their deprecated counterparts, so assign them here after @@ -130,23 +129,23 @@ static void prv_handle_phone_versions_response(CommSession *session, const uint32_t platform_bits = ntohl(response->platform_bitfield); const bool is_system = comm_session_is_system(session); - PBL_LOG_INFO("Phone app: is_system=%u, plf=0x%"PRIx32", capabilities=0x%"PRIx32, - is_system, platform_bits, (uint32_t)capability_flags); + PBL_LOG_INFO("Phone app: is_system=%u, plf=0x%" PRIx32 ", capabilities=0x%" PRIx32, is_system, + platform_bits, (uint32_t)capability_flags); // Only emit for the Pebble app, not 3rd party companion apps: if (is_system) { PebbleEvent event = { - .type = PEBBLE_REMOTE_APP_INFO_EVENT, - .bluetooth.app_info_event = { - .os = (platform_bits & RemoteBitmaskOS), - }, + .type = PEBBLE_REMOTE_APP_INFO_EVENT, + .bluetooth.app_info_event = { + .os = (platform_bits & RemoteBitmaskOS), + }, }; event_put(&event); } } -void session_remote_version_protocol_msg_callback(CommSession *session_ref, - const uint8_t *data, size_t length) { +void session_remote_version_protocol_msg_callback(CommSession *session_ref, const uint8_t *data, + size_t length) { switch (data[0]) { case CommSessionVersionCommandResponse: { prv_handle_phone_versions_response(session_ref, data + 1, length - 1); diff --git a/src/fw/services/comm_session/session_send_queue.c b/src/fw/services/comm_session/session_send_queue.c index 7dbcb478af..ac85f33058 100644 --- a/src/fw/services/comm_session/session_send_queue.c +++ b/src/fw/services/comm_session/session_send_queue.c @@ -18,7 +18,7 @@ extern bool comm_session_is_valid(const CommSession *session); void comm_session_send_queue_cleanup(CommSession *session) { SessionSendQueueJob *job = session->send_queue_head; while (job) { - SessionSendQueueJob *next = (SessionSendQueueJob *) job->node.next; + SessionSendQueueJob *next = (SessionSendQueueJob *)job->node.next; job->impl->free(job); job = next; } @@ -65,8 +65,8 @@ size_t comm_session_send_queue_get_length(const CommSession *session) { return length; } -size_t comm_session_send_queue_copy(CommSession *session, uint32_t start_offset, - size_t length, uint8_t *data_out) { +size_t comm_session_send_queue_copy(CommSession *session, uint32_t start_offset, size_t length, + uint8_t *data_out) { size_t remaining_length = length; const SessionSendQueueJob *job = session->send_queue_head; while (job && remaining_length) { diff --git a/src/fw/services/compositor/compositor.c b/src/fw/services/compositor/compositor.c index 11026ad5fb..71a12cdd30 100644 --- a/src/fw/services/compositor/compositor.c +++ b/src/fw/services/compositor/compositor.c @@ -93,12 +93,9 @@ void compositor_init(void) { s_state = CompositorState_App; - s_deferred_render = (DeferredRender) { - .animation.pending = false, - .app.pending = false - }; + s_deferred_render = (DeferredRender){.animation.pending = false, .app.pending = false}; - s_animation_state = (CompositorTransitionState) { 0 }; + s_animation_state = (CompositorTransitionState){0}; s_framebuffer_frozen = false; } @@ -106,11 +103,10 @@ void compositor_init(void) { // Helper functions to make implementing transitions easier /////////////////////////////////////////////////////////// -void compositor_app_framebuffer_fill_callback(GContext *ctx, int16_t y, - Fixed_S16_3 x_range_begin, Fixed_S16_3 x_range_end, - Fixed_S16_3 delta_begin, Fixed_S16_3 delta_end, - void *user_data) { - const GPoint *offset = user_data ?: &GPointZero; // User data has left the building +void compositor_app_framebuffer_fill_callback(GContext *ctx, int16_t y, Fixed_S16_3 x_range_begin, + Fixed_S16_3 x_range_end, Fixed_S16_3 delta_begin, + Fixed_S16_3 delta_end, void *user_data) { + const GPoint *offset = user_data ?: &GPointZero; // User data has left the building GBitmap app_framebuffer = compositor_get_app_framebuffer_as_bitmap(); const int16_t fb_width = app_framebuffer.bounds.size.w; const int16_t fb_height = app_framebuffer.bounds.size.h; @@ -119,13 +115,10 @@ void compositor_app_framebuffer_fill_callback(GContext *ctx, int16_t y, const int16_t clipped_y = CLIP(y - offset->y, 0, fb_height); const int16_t x2 = CLIP(x_range_end.integer - offset->x, 0, fb_width); - compositor_scaled_app_fb_copy( - GRect(x1, clipped_y, x2 - x1, 1), - true /* copy_relative_to_origin */ + compositor_scaled_app_fb_copy(GRect(x1, clipped_y, x2 - x1, 1), true /* copy_relative_to_origin */ ); } - void compositor_set_modal_transition_offset(GPoint modal_offset) { s_animation_state.modal_offset = modal_offset; } @@ -139,12 +132,12 @@ void compositor_render_app(void) { GSize app_framebuffer_size; app_manager_get_framebuffer_size(&app_framebuffer_size); - // Fill entire framebuffer with black first to avoid artifacts GBitmap dest_bitmap = compositor_get_framebuffer_as_bitmap(); memset(dest_bitmap.addr, GColorBlack.argb, framebuffer_get_size_bytes(&s_framebuffer)); - compositor_scaled_app_fb_copy(GRect(0, 0, DISP_COLS, DISP_ROWS), false /* copy_relative_to_origin */); + compositor_scaled_app_fb_copy(GRect(0, 0, DISP_COLS, DISP_ROWS), + false /* copy_relative_to_origin */); if (s_state == CompositorState_AppAndModal) { compositor_render_modal(); @@ -205,10 +198,10 @@ static void prv_compositor_flush(void) { static void prv_send_did_focus_event(bool in_focus) { PebbleEvent event = { - .type = PEBBLE_APP_DID_CHANGE_FOCUS_EVENT, - .app_focus = { - .in_focus = in_focus, - }, + .type = PEBBLE_APP_DID_CHANGE_FOCUS_EVENT, + .app_focus = { + .in_focus = in_focus, + }, }; event_put(&event); } @@ -220,7 +213,7 @@ static bool prv_should_render(void) { static void prv_release_app_framebuffer(void) { // Inform the app that the render is complete and it is safe to write into its framebuffer again. PebbleEvent event = { - .type = PEBBLE_RENDER_FINISHED_EVENT, + .type = PEBBLE_RENDER_FINISHED_EVENT, }; process_manager_send_event_to_process(PebbleTask_App, &event); } @@ -244,8 +237,9 @@ void compositor_app_render_ready(void) { } else { // No animation was used, immediately say that the app is now fully focused. const ModalProperty properties = modal_manager_get_properties(); - s_state = ((properties & ModalProperty_Exists) && (properties & ModalProperty_Transparent)) ? - CompositorState_AppAndModal : CompositorState_App; + s_state = ((properties & ModalProperty_Exists) && (properties & ModalProperty_Transparent)) + ? CompositorState_AppAndModal + : CompositorState_App; prv_send_did_focus_event(true); } } @@ -269,7 +263,7 @@ void compositor_app_render_ready(void) { static void prv_send_app_render_request(void) { PebbleEvent event = { - .type = PEBBLE_RENDER_REQUEST_EVENT, + .type = PEBBLE_RENDER_REQUEST_EVENT, }; process_manager_send_event_to_process(PebbleTask_App, &event); } @@ -341,8 +335,8 @@ static void prv_animation_update(Animation *animation, static void prv_finish_transition(void) { const ModalProperty properties = modal_manager_get_properties(); if (properties & ModalProperty_Exists) { - s_state = (properties & ModalProperty_Transparent) ? CompositorState_AppAndModal : - CompositorState_Modal; + s_state = (properties & ModalProperty_Transparent) ? CompositorState_AppAndModal + : CompositorState_Modal; compositor_modal_render_ready(); // Force the app framebuffer to be released. We hold it during transitions to keep the app @@ -362,7 +356,7 @@ static void prv_animation_teardown(Animation *animation) { if (s_animation_state.impl->teardown) { s_animation_state.impl->teardown(animation); } - s_animation_state = (CompositorTransitionState) { 0 }; + s_animation_state = (CompositorTransitionState){0}; s_deferred_render.animation.pending = false; if (!prv_should_render()) { @@ -375,11 +369,10 @@ static void prv_animation_teardown(Animation *animation) { void compositor_transition(const CompositorTransition *compositor_animation) { if (s_animation_state.animation != NULL) { - PBL_LOG_DBG("Animation <%u> in progress, cancelling", - (int) s_animation_state.animation); + PBL_LOG_DBG("Animation <%u> in progress, cancelling", (int)s_animation_state.animation); animation_destroy(s_animation_state.animation); - s_animation_state = (CompositorTransitionState) { 0 }; + s_animation_state = (CompositorTransitionState){0}; s_deferred_render.animation.pending = false; s_deferred_render.transition_complete.pending = false; @@ -399,14 +392,12 @@ void compositor_transition(const CompositorTransition *compositor_animation) { if (compositor_animation) { // Set up our animation state and schedule it - s_animation_state = (CompositorTransitionState) { - .animation = animation_create(), - .impl = compositor_animation - }; + s_animation_state = + (CompositorTransitionState){.animation = animation_create(), .impl = compositor_animation}; static const AnimationImplementation s_compositor_animation_impl = { - .update = prv_animation_update, - .teardown = prv_animation_teardown, + .update = prv_animation_update, + .teardown = prv_animation_teardown, }; animation_set_implementation(s_animation_state.animation, &s_compositor_animation_impl); @@ -428,7 +419,7 @@ void compositor_transition(const CompositorTransition *compositor_animation) { // Now wait for the ready event. s_state = CompositorState_AppTransitionPending; - } else if (is_modal_existing && !is_modal_transparent) { + } else if (is_modal_existing && !is_modal_transparent) { // Modal to Modal or App to Modal // We can start animating immediately if we're going to a modal window. This is because @@ -509,8 +500,7 @@ uint16_t prv_scale_coordinate(const uint32_t scale_factor, uint16_t val) { #if TIMELINE_PEEK_WATCHFACE_FIT_SUPPORTED && !defined(CONFIG_RECOVERY_FW) static TimelinePeekUnsupportedFaceMode prv_get_unsupported_face_mode_for_timeline_peek(void) { - const TimelinePeekUnsupportedFaceMode mode = - timeline_peek_prefs_get_unsupported_face_mode(); + const TimelinePeekUnsupportedFaceMode mode = timeline_peek_prefs_get_unsupported_face_mode(); const PebbleProcessMd *app_md = app_manager_get_current_app_md(); if (mode == TimelinePeekUnsupportedFaceMode_None || !app_md || app_md->process_type != ProcessTypeWatchface) { @@ -524,8 +514,9 @@ static TimelinePeekUnsupportedFaceMode prv_get_unsupported_face_mode_for_timelin } const int16_t obstruction_y = timeline_peek_get_origin_y(); - return ((obstruction_y > 0) && (obstruction_y < DISP_ROWS)) ? - mode : TimelinePeekUnsupportedFaceMode_None; + return ((obstruction_y > 0) && (obstruction_y < DISP_ROWS)) + ? mode + : TimelinePeekUnsupportedFaceMode_None; } #endif @@ -568,16 +559,16 @@ void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_rel const int16_t disp_height = dst_bitmap.bounds.size.h; // Check if we should use scaling mode for legacy apps const LegacyAppRenderMode render_mode = shell_prefs_get_legacy_app_render_mode(); - const bool should_scale_app = - (render_mode >= LegacyAppRenderMode_ScalingNearest) || squish_watchface_for_peek || - (shift_watchface_for_peek && prv_app_framebuffer_matches_display()); + const bool should_scale_app = (render_mode >= LegacyAppRenderMode_ScalingNearest) || + squish_watchface_for_peek || + (shift_watchface_for_peek && prv_app_framebuffer_matches_display()); if (should_scale_app) { const bool bilinear = (render_mode == LegacyAppRenderMode_ScalingBilinear); const bool shift_scaled_watchface_for_peek = shift_watchface_for_peek && !squish_watchface_for_peek; const GRect scale_to = squish_watchface_for_peek - ? GRect(0, 0, disp_width, timeline_peek_get_origin_y()) - : GRect(0, 0, disp_width, disp_height); + ? GRect(0, 0, disp_width, timeline_peek_get_origin_y()) + : GRect(0, 0, disp_width, disp_height); if (shift_scaled_watchface_for_peek) { int16_t first_row = CLIP(update_rect.origin.y, 0, DISP_ROWS - 1); @@ -585,8 +576,8 @@ void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_rel for (int16_t y = first_row; y < last_row; y++) { GBitmapDataRowInfo dst_row_info = gbitmap_get_data_row_info(&dst_bitmap, y); const int16_t start_x = MAX(update_rect.origin.x, dst_row_info.min_x); - const int16_t end_x = MIN(update_rect.origin.x + update_rect.size.w, - dst_row_info.max_x + 1); + const int16_t end_x = + MIN(update_rect.origin.x + update_rect.size.w, dst_row_info.max_x + 1); memset(&dst_row_info.data[start_x], GColorBlack.argb, end_x - start_x); } } @@ -599,12 +590,11 @@ void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_rel for (int16_t dst_y = 0; dst_y < update_rect.size.h; dst_y++) { const int16_t dst_y_offset = dst_y + update_rect.origin.y + offset_y; - if (dst_y_offset < 0 || dst_y_offset >= disp_height) continue; - if ((squish_watchface_for_peek && - (dst_y_offset < scale_to.origin.y || - dst_y_offset >= scale_to.origin.y + scale_to.size.h)) || - (shift_scaled_watchface_for_peek && - (dst_y_offset >= timeline_peek_get_origin_y()))) { + if (dst_y_offset < 0 || dst_y_offset >= disp_height) + continue; + if ((squish_watchface_for_peek && (dst_y_offset < scale_to.origin.y || + dst_y_offset >= scale_to.origin.y + scale_to.size.h)) || + (shift_scaled_watchface_for_peek && (dst_y_offset >= timeline_peek_get_origin_y()))) { continue; } @@ -623,7 +613,8 @@ void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_rel const uint32_t src_y_fixed = (uint32_t)dst_y_coord * scale_y; const int16_t src_y = src_y_fixed >> 16; - if (src_y < 0 || src_y >= app_height) continue; + if (src_y < 0 || src_y >= app_height) + continue; GBitmapDataRowInfo dst_row_info = gbitmap_get_data_row_info(&dst_bitmap, dst_y_offset); GBitmapDataRowInfo src_row_info = gbitmap_get_data_row_info(&src_bitmap, src_y); @@ -647,15 +638,15 @@ void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_rel if (dst_x_offset < dst_row_info.min_x || dst_x_offset > dst_row_info.max_x) { continue; } - if (squish_watchface_for_peek && - (dst_x_offset < scale_to.origin.x || - dst_x_offset >= scale_to.origin.x + scale_to.size.w)) { + if (squish_watchface_for_peek && (dst_x_offset < scale_to.origin.x || + dst_x_offset >= scale_to.origin.x + scale_to.size.w)) { continue; } - const uint16_t dst_x_coord = squish_watchface_for_peek - ? (dst_x_offset - scale_to.origin.x) - : copy_relative_to_origin ? CLIP(dst_x_offset, 0, disp_width - 1) : dst_x; + const uint16_t dst_x_coord = squish_watchface_for_peek ? (dst_x_offset - scale_to.origin.x) + : copy_relative_to_origin + ? CLIP(dst_x_offset, 0, disp_width - 1) + : dst_x; const uint32_t src_x_fixed = (uint32_t)dst_x_coord * scale_x; const int16_t src_x = src_x_fixed >> 16; @@ -672,14 +663,15 @@ void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_rel // Sample 2x2 neighborhood const uint8_t p00 = src_row_info.data[src_x]; - const uint8_t p10 = (src_x1 <= src_row_info.max_x) ? - src_row_info.data[src_x1] : p00; + const uint8_t p10 = (src_x1 <= src_row_info.max_x) ? src_row_info.data[src_x1] : p00; const uint8_t p01 = (src_y1 != src_y && src_x >= src_row_info_next.min_x && - src_x <= src_row_info_next.max_x) ? - src_row_info_next.data[src_x] : p00; + src_x <= src_row_info_next.max_x) + ? src_row_info_next.data[src_x] + : p00; const uint8_t p11 = (src_y1 != src_y && src_x1 >= src_row_info_next.min_x && - src_x1 <= src_row_info_next.max_x) ? - src_row_info_next.data[src_x1] : p10; + src_x1 <= src_row_info_next.max_x) + ? src_row_info_next.data[src_x1] + : p10; // Fractional X weight (0-16 range, using 4 bits from fixed-point) const uint8_t fx = (src_x_fixed >> 12) & 0xF; @@ -687,7 +679,7 @@ void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_rel // Interpolate each 2-bit channel (b, g, r) using 16-bit intermediates // Channel layout: [b1:b0 g1:g0 r1:r0 a1:a0] // Using 4-bit fractional weights so we can divide by shift (16*16=256) - uint8_t result = 0xC0; // Alpha = 3 (fully opaque) + uint8_t result = 0xC0; // Alpha = 3 (fully opaque) for (int shift = 0; shift < 6; shift += 2) { const uint16_t c00 = (p00 >> shift) & 0x3; const uint16_t c10 = (p10 >> shift) & 0x3; @@ -695,9 +687,9 @@ void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_rel const uint16_t c11 = (p11 >> shift) & 0x3; // Bilinear: lerp in X for both rows, then lerp in Y - const uint16_t top = c00 * (16 - fx) + c10 * fx; // 0..48 - const uint16_t bot = c01 * (16 - fx) + c11 * fx; // 0..48 - const uint16_t val = top * (16 - fy) + bot * fy; // 0..768 + const uint16_t top = c00 * (16 - fx) + c10 * fx; // 0..48 + const uint16_t bot = c01 * (16 - fx) + c11 * fx; // 0..48 + const uint16_t val = top * (16 - fy) + bot * fy; // 0..768 // Scale back to 2-bit: divide by 256 with rounding const uint8_t channel = (val + 128) >> 8; @@ -728,12 +720,9 @@ void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_rel grect_clip(&clipped_update_region, &shifted_region); if (clipped_update_region.size.w > 0 && clipped_update_region.size.h > 0) { GBitmap sub_bitmap; - const GRect src_rect = GRect( - clipped_update_region.origin.x - app_offset_x, - clipped_update_region.origin.y - app_offset_y + offset_y, - clipped_update_region.size.w, - clipped_update_region.size.h - ); + const GRect src_rect = GRect(clipped_update_region.origin.x - app_offset_x, + clipped_update_region.origin.y - app_offset_y + offset_y, + clipped_update_region.size.w, clipped_update_region.size.h); gbitmap_init_as_sub_bitmap(&sub_bitmap, &src_bitmap, src_rect); bitblt_bitmap_into_bitmap(&dst_bitmap, &sub_bitmap, clipped_update_region.origin, GCompOpAssign, GColorWhite); @@ -767,20 +756,13 @@ void compositor_scaled_app_fb_copy_offset(const GRect update_rect, bool copy_rel GRect clipped_update_region = update_rect; grect_clip(&clipped_update_region, ¢ered_region); - src_rect = GRect( - clipped_update_region.origin.x - bezel_width, - clipped_update_region.origin.y - app_offset_y + offset_y, - clipped_update_region.size.w, - clipped_update_region.size.h - ); + src_rect = GRect(clipped_update_region.origin.x - bezel_width, + clipped_update_region.origin.y - app_offset_y + offset_y, + clipped_update_region.size.w, clipped_update_region.size.h); dst_offset = clipped_update_region.origin; } else { - src_rect = GRect( - 0, - offset_y, - update_rect.size.w - bezel_width, - update_rect.size.h - app_offset_y - ); + src_rect = + GRect(0, offset_y, update_rect.size.w - bezel_width, update_rect.size.h - app_offset_y); dst_offset = GPoint(bezel_width + update_rect.origin.x, app_offset_y + update_rect.origin.y); } diff --git a/src/fw/services/compositor/compositor_display.c b/src/fw/services/compositor/compositor_display.c index d8fd471848..e02f80538e 100644 --- a/src/fw/services/compositor/compositor_display.c +++ b/src/fw/services/compositor/compositor_display.c @@ -19,7 +19,7 @@ static uint16_t s_current_flush_line; static void (*s_update_complete_handler)(void); #ifdef CONFIG_BOARD_ASTERIX -static const uint8_t s_corner_shape[] = { 3, 1, 1 }; +static const uint8_t s_corner_shape[] = {3, 1, 1}; static uint8_t s_line_buffer[FRAMEBUFFER_BYTES_PER_ROW]; #endif @@ -27,20 +27,21 @@ static uint8_t s_line_buffer[FRAMEBUFFER_BYTES_PER_ROW]; // Rounded corner mask for Obelix — radius 3 quarter-circle. // Each entry is the number of pixels to mask from the left/right edge. // Shape follows a quarter-circle: at row y, mask pixels where x < sqrt(r² - y²) -static const uint8_t s_corner_shape[] = { 3, 3, 2, 1 }; +static const uint8_t s_corner_shape[] = {3, 3, 2, 1}; // For Obelix, we modify the framebuffer directly because the display driver // does in-place pixel format conversion and expects row.data to point into // the compositor's framebuffer. We save original corner pixels here to restore later. #define CORNER_SAVE_ROWS ARRAY_LENGTH(s_corner_shape) #define CORNER_MAX_WIDTH 3 -static uint8_t s_saved_corners[CORNER_SAVE_ROWS * 2][CORNER_MAX_WIDTH * 2]; // [row][left+right pixels] +static uint8_t s_saved_corners[CORNER_SAVE_ROWS * 2] + [CORNER_MAX_WIDTH * 2]; // [row][left+right pixels] static uint8_t s_dirty_y0; static uint8_t s_dirty_y1; #endif //! display_update get next line callback -static bool prv_flush_get_next_line_cb(DisplayRow* row) { +static bool prv_flush_get_next_line_cb(DisplayRow *row) { FrameBuffer *fb = compositor_get_framebuffer(); s_current_flush_line = MAX(s_current_flush_line, fb->dirty_rect.origin.y); @@ -54,9 +55,9 @@ static bool prv_flush_get_next_line_cb(DisplayRow* row) { if (s_current_flush_line < ARRAY_LENGTH(s_corner_shape) || s_current_flush_line >= DISP_ROWS - ARRAY_LENGTH(s_corner_shape)) { memcpy(s_line_buffer, fb_line, FRAMEBUFFER_BYTES_PER_ROW); - uint8_t corner_idx = - (s_current_flush_line < ARRAY_LENGTH(s_corner_shape))? - s_current_flush_line : DISP_ROWS - s_current_flush_line - 1; + uint8_t corner_idx = (s_current_flush_line < ARRAY_LENGTH(s_corner_shape)) + ? s_current_flush_line + : DISP_ROWS - s_current_flush_line - 1; uint8_t corner_width = s_corner_shape[corner_idx]; for (uint8_t pixel = 0; pixel < corner_width; ++pixel) { bitset8_clear(s_line_buffer, pixel); @@ -72,12 +73,12 @@ static bool prv_flush_get_next_line_cb(DisplayRow* row) { // to point into the compositor's framebuffer. We save and restore corners. if (s_current_flush_line < ARRAY_LENGTH(s_corner_shape) || s_current_flush_line >= DISP_ROWS - ARRAY_LENGTH(s_corner_shape)) { - uint8_t corner_idx = - (s_current_flush_line < ARRAY_LENGTH(s_corner_shape))? - s_current_flush_line : DISP_ROWS - s_current_flush_line - 1; - uint8_t save_idx = - (s_current_flush_line < ARRAY_LENGTH(s_corner_shape))? - s_current_flush_line : CORNER_SAVE_ROWS + corner_idx; + uint8_t corner_idx = (s_current_flush_line < ARRAY_LENGTH(s_corner_shape)) + ? s_current_flush_line + : DISP_ROWS - s_current_flush_line - 1; + uint8_t save_idx = (s_current_flush_line < ARRAY_LENGTH(s_corner_shape)) + ? s_current_flush_line + : CORNER_SAVE_ROWS + corner_idx; uint8_t corner_width = s_corner_shape[corner_idx]; uint8_t *line = fb_line; // Save original corner pixels @@ -123,7 +124,8 @@ static void prv_flush_complete_cb(void) { uint8_t *bottom_line = framebuffer_get_line(fb, bottom_row); for (uint8_t pixel = 0; pixel < corner_width; ++pixel) { bottom_line[pixel] = s_saved_corners[CORNER_SAVE_ROWS + i][pixel]; - bottom_line[DISP_COLS - pixel - 1] = s_saved_corners[CORNER_SAVE_ROWS + i][CORNER_MAX_WIDTH + pixel]; + bottom_line[DISP_COLS - pixel - 1] = + s_saved_corners[CORNER_SAVE_ROWS + i][CORNER_MAX_WIDTH + pixel]; } } } @@ -144,7 +146,7 @@ void compositor_display_update(void (*handle_update_complete_cb)(void)) { } #ifdef CONFIG_BOARD_GETAFIX // Force full screen updates - partial ROI causes animation issues on getafix display - fb->dirty_rect = (GRect){ GPointZero, fb->size }; + fb->dirty_rect = (GRect){GPointZero, fb->size}; #endif #ifdef CONFIG_BOARD_OBELIX // Capture dirty region bounds for corner restoration later diff --git a/src/fw/services/compositor/compositor_transitions.c b/src/fw/services/compositor/compositor_transitions.c index d9185a1758..3a658c2e5a 100644 --- a/src/fw/services/compositor/compositor_transitions.c +++ b/src/fw/services/compositor/compositor_transitions.c @@ -21,17 +21,17 @@ bool compositor_transition_app_to_app_should_be_skipped(void) { typedef struct { GDrawCommandProcessor draw_command_processor; GContext *ctx; - GColor stroke_color; // replace red to this - GColor key_color; // replace this color with overdraw_color - GColor overdraw_color; // replace key_color with this - GColor app_fb_key_color; // replace with app framebuffer, use GColorClear to skip - GPoint framebuffer_offset; // displacement for the app framebuffer when drawing + GColor stroke_color; // replace red to this + GColor key_color; // replace this color with overdraw_color + GColor overdraw_color; // replace key_color with this + GColor app_fb_key_color; // replace with app framebuffer, use GColorClear to skip + GPoint framebuffer_offset; // displacement for the app framebuffer when drawing } CompositorColorReplacementProcessor; static void prv_compositor_replace_colors_processor(GDrawCommandProcessor *processor, GDrawCommand *processed_command, size_t processed_command_max_size, - const GDrawCommandList* list, + const GDrawCommandList *list, const GDrawCommand *command) { CompositorColorReplacementProcessor *p = (CompositorColorReplacementProcessor *)processor; const GColor8 key_stroke_color = GColorRed; @@ -42,12 +42,8 @@ static void prv_compositor_replace_colors_processor(GDrawCommandProcessor *proce const uint16_t num_points = gdraw_command_get_num_points(processed_command); GPoint points[num_points]; if (sizeof(points) == gdraw_command_copy_points(processed_command, points, sizeof(points))) { - GPath path = { - .num_points = num_points, - .points = points - }; - gpath_draw_filled_with_cb(p->ctx, &path, - compositor_app_framebuffer_fill_callback, + GPath path = {.num_points = num_points, .points = points}; + gpath_draw_filled_with_cb(p->ctx, &path, compositor_app_framebuffer_fill_callback, &p->framebuffer_offset); } @@ -62,10 +58,11 @@ static void prv_compositor_replace_colors_processor(GDrawCommandProcessor *proce } } -void compositor_transition_pdcs_animation_update( - GContext *ctx, GDrawCommandSequence *sequence, uint32_t distance_normalized, - GColor chroma_key_color, GColor stroke_color, GColor overdraw_color, bool inner, - const GPoint *framebuffer_offset) { +void compositor_transition_pdcs_animation_update(GContext *ctx, GDrawCommandSequence *sequence, + uint32_t distance_normalized, + GColor chroma_key_color, GColor stroke_color, + GColor overdraw_color, bool inner, + const GPoint *framebuffer_offset) { if (!sequence) { return; } @@ -84,12 +81,12 @@ void compositor_transition_pdcs_animation_update( // it's a bit weird but just they way how these SVGs have been designed const GColor8 key_color = inner ? GColorIslamicGreen : GColorGreen; CompositorColorReplacementProcessor processor = { - .draw_command_processor.command = prv_compositor_replace_colors_processor, - .ctx = ctx, - .stroke_color = stroke_color, - .key_color = key_color, - .overdraw_color = overdraw_color, - .app_fb_key_color = inner ? chroma_key_color : GColorClear, + .draw_command_processor.command = prv_compositor_replace_colors_processor, + .ctx = ctx, + .stroke_color = stroke_color, + .key_color = key_color, + .overdraw_color = overdraw_color, + .app_fb_key_color = inner ? chroma_key_color : GColorClear, }; gdraw_command_frame_draw_processed(ctx, sequence, frame, GPointZero, @@ -136,7 +133,7 @@ void prv_app_fb_fill_assign_horizontal_line(GContext *ctx, int16_t y, Fixed_S16_ // First pixel with blending if fraction is different than 0 const uint16_t data_row_offset = - (uint16_t)(destination_data_row_info.data - (uint8_t *)framebuffer->addr); + (uint16_t)(destination_data_row_info.data - (uint8_t *)framebuffer->addr); if (x1.fraction != 0) { graphics_private_raw_blend_color_factor(ctx, output, data_row_offset, *input, x1.integer, (uint8_t)(FIXED_S16_3_ONE.raw_value - x1.fraction)); @@ -162,8 +159,8 @@ void prv_app_fb_fill_assign_horizontal_line(GContext *ctx, int16_t y, Fixed_S16_ //! Copy vertical lines from the app framebuffer to the provided framebuffer //! This is basically duplicated from prv_assign_vertical_line_raw() in graphics_private_raw.c -void prv_app_fb_fill_assign_vertical_line(GContext *ctx, int16_t x, Fixed_S16_3 y1, - Fixed_S16_3 y2, GColor color) { +void prv_app_fb_fill_assign_vertical_line(GContext *ctx, int16_t x, Fixed_S16_3 y1, Fixed_S16_3 y2, + GColor color) { PBL_ASSERTN(ctx); GBitmap *framebuffer = &ctx->dest_bitmap; PBL_ASSERTN(framebuffer->bounds.origin.x == 0 && framebuffer->bounds.origin.y == 0); @@ -192,7 +189,7 @@ void prv_app_fb_fill_assign_vertical_line(GContext *ctx, int16_t x, Fixed_S16_3 // first pixel with blending const uint16_t data_row_offset = - (uint16_t)(destination_data_row_info.data - (uint8_t *)framebuffer->addr); + (uint16_t)(destination_data_row_info.data - (uint8_t *)framebuffer->addr); if (y1.fraction != 0) { // Only draw the pixel if its within the bitmap data row range if (WITHIN(x, destination_data_row_info.min_x, destination_data_row_info.max_x)) { @@ -230,8 +227,8 @@ void prv_app_fb_fill_assign_vertical_line(GContext *ctx, int16_t x, Fixed_S16_3 } const GDrawRawImplementation g_compositor_transitions_app_fb_draw_implementation = { - .assign_horizontal_line = prv_app_fb_fill_assign_horizontal_line, - .assign_vertical_line = prv_app_fb_fill_assign_vertical_line, - // If you ever experience a crash during compositor transitions (e.g. in an integration tests) - // then it's likely that you need to provide additional draw handlers here + .assign_horizontal_line = prv_app_fb_fill_assign_horizontal_line, + .assign_vertical_line = prv_app_fb_fill_assign_vertical_line, + // If you ever experience a crash during compositor transitions (e.g. in an integration tests) + // then it's likely that you need to provide additional draw handlers here }; diff --git a/src/fw/services/compositor/default/compositor_dot_transitions.c b/src/fw/services/compositor/default/compositor_dot_transitions.c index dd27499b71..89b188c18d 100644 --- a/src/fw/services/compositor/default/compositor_dot_transitions.c +++ b/src/fw/services/compositor/default/compositor_dot_transitions.c @@ -20,7 +20,7 @@ #include "pbl/util/size.h" static CompositorTransitionDirection prv_flip_transition_direction( - CompositorTransitionDirection direction) { + CompositorTransitionDirection direction) { switch (direction) { case CompositorTransitionDirectionUp: return CompositorTransitionDirectionDown; @@ -38,8 +38,8 @@ static CompositorTransitionDirection prv_flip_transition_direction( #if PBL_RECT //! linear interpolation between two GPoints, supports delay and clamping //! @param delay value to postpone interpolation (in range 0..ANIMATION_NORMALIZED_MAX) -static GPoint prv_gpoint_interpolate(int32_t delay, int32_t normalized, - const GPoint from, const GPoint to) { +static GPoint prv_gpoint_interpolate(int32_t delay, int32_t normalized, const GPoint from, + const GPoint to) { normalized = CLIP(normalized - delay, 0, ANIMATION_NORMALIZED_MAX); normalized = animation_timing_curve(normalized, AnimationCurveEaseInOut); GPoint result; @@ -57,7 +57,6 @@ static GPoint prv_gpoint_mid(const GPoint a, const GPoint b) { //! This behaviour is configured by the inner bool. static void prv_collapse_animation(GContext *ctx, uint32_t distance_normalized, bool inner, GPathDrawFilledCallback ring_fill_cb) { - const GRect bounds = ctx->draw_state.clip_box; PBL_ASSERTN(bounds.origin.x == 0 && bounds.origin.y == 0); @@ -93,27 +92,23 @@ static void prv_collapse_animation(GContext *ctx, uint32_t distance_normalized, if (inner) { // gpath that creates the inner section - GPoint path_points[] = { scaled_bl, scaled_br, scaled_tr, scaled_tl, }; - - GPath path = { - .num_points = ARRAY_LENGTH(path_points), - .points = path_points + GPoint path_points[] = { + scaled_bl, + scaled_br, + scaled_tr, + scaled_tl, }; + GPath path = {.num_points = ARRAY_LENGTH(path_points), .points = path_points}; + gpath_draw_filled_with_cb(ctx, &path, ring_fill_cb, NULL); } else { // gpath that creates a solid "ring" GPoint path_points[] = { - tl, tr, br, bl, - l, scaled_l, - scaled_bl, scaled_br, scaled_tr, scaled_tl, - scaled_l, l, + tl, tr, br, bl, l, scaled_l, scaled_bl, scaled_br, scaled_tr, scaled_tl, scaled_l, l, }; - GPath path = { - .num_points = ARRAY_LENGTH(path_points), - .points = path_points - }; + GPath path = {.num_points = ARRAY_LENGTH(path_points), .points = path_points}; gpath_draw_filled_with_cb(ctx, &path, ring_fill_cb, NULL); } @@ -127,16 +122,14 @@ static void prv_collapse_animation(GContext *ctx, uint32_t distance_normalized, } //! Callback to be used with prv_collapse_animation to fill with the current fill_color -static void prv_gpath_draw_filled_cb(GContext *ctx, int16_t y, - Fixed_S16_3 x_range_begin, Fixed_S16_3 x_range_end, - Fixed_S16_3 delta_begin, Fixed_S16_3 delta_end, - void *user_data) { - - const GRect fill_rect = GRect(x_range_begin.integer + 1, y, - x_range_end.integer - x_range_begin.integer - 1, 1); +static void prv_gpath_draw_filled_cb(GContext *ctx, int16_t y, Fixed_S16_3 x_range_begin, + Fixed_S16_3 x_range_end, Fixed_S16_3 delta_begin, + Fixed_S16_3 delta_end, void *user_data) { + const GRect fill_rect = + GRect(x_range_begin.integer + 1, y, x_range_end.integer - x_range_begin.integer - 1, 1); graphics_fill_rect(ctx, &fill_rect); } -#endif // PBL_RECT +#endif // PBL_RECT //! Draw a dumb dot at the supplied position with the supplied color static void prv_draw_dot(GContext *ctx, GPoint pos, GColor color) { @@ -150,9 +143,9 @@ typedef struct PACKED { union { struct { //! Whether or not to collapse the starting screen of the animation to a dot - bool collapse_starting_animation:1; + bool collapse_starting_animation : 1; //! The direction the animation is moving - CompositorTransitionDirection direction:3; + CompositorTransitionDirection direction : 3; //! The animation's dot color after collapsing GColor collapse_dot_color; //! The animation's final dot color @@ -211,8 +204,8 @@ void compositor_dot_transitions_collapsing_ring_animation_update(GContext *ctx, const int16_t outer_radial_outer_radius = (bounds.size.w / 2) + (dot_radius * 2); const int16_t outer_radial_inner_radius_from = (bounds.size.w / 2) + dot_radius; const int16_t outer_radial_inner_radius_to = dot_radius; - const int16_t interpolated_outer_radial_inner_radius = interpolate_int16(distance_normalized, - outer_radial_inner_radius_from, outer_radial_inner_radius_to); + const int16_t interpolated_outer_radial_inner_radius = interpolate_int16( + distance_normalized, outer_radial_inner_radius_from, outer_radial_inner_radius_to); const int16_t inner_radial_outer_radius = interpolated_outer_radial_inner_radius; const int16_t inner_radial_inner_radius = inner_radial_outer_radius - dot_radius; @@ -227,8 +220,7 @@ void compositor_dot_transitions_collapsing_ring_animation_update(GContext *ctx, graphics_context_set_stroke_color(ctx, inner_ring_color); graphics_context_set_fill_color(ctx, inner_ring_color); graphics_fill_radial_internal(ctx, center, inner_radial_inner_radius, inner_radial_outer_radius, - 0, - TRIG_MAX_ANGLE); + 0, TRIG_MAX_ANGLE); } #if PBL_ROUND @@ -237,46 +229,40 @@ static void prv_collapse_animation_update_round(GContext *ctx, uint32_t distance_normalized) { // If we're expanding, blit the app framebuffer into the system framebuffer (so below the ring) if (!config.collapse_starting_animation) { - compositor_scaled_app_fb_copy(GRect(0, 0, DISP_COLS, DISP_ROWS), false /* copy_relative_to_origin */); + compositor_scaled_app_fb_copy(GRect(0, 0, DISP_COLS, DISP_ROWS), + false /* copy_relative_to_origin */); } - compositor_dot_transitions_collapsing_ring_animation_update(ctx, distance_normalized, - config.background_color, - config.collapse_dot_color); + compositor_dot_transitions_collapsing_ring_animation_update( + ctx, distance_normalized, config.background_color, config.collapse_dot_color); } #endif -static void prv_collapse_animation_update(GContext *ctx, - DotTransitionAnimationConfiguration config, +static void prv_collapse_animation_update(GContext *ctx, DotTransitionAnimationConfiguration config, uint32_t distance_normalized) { - PBL_IF_RECT_ELSE(prv_collapse_animation_update_rect, - prv_collapse_animation_update_round)(ctx, config, distance_normalized); + PBL_IF_RECT_ELSE(prv_collapse_animation_update_rect, prv_collapse_animation_update_round)( + ctx, config, distance_normalized); } -static void prv_static_dot_transition_animation_update( - GContext *ctx, Animation *animation, uint32_t distance_normalized) { - DotTransitionAnimationConfiguration config = { - .data = animation_get_context(animation) - }; +static void prv_static_dot_transition_animation_update(GContext *ctx, Animation *animation, + uint32_t distance_normalized) { + DotTransitionAnimationConfiguration config = {.data = animation_get_context(animation)}; const uint32_t COLLAPSE_END_DISTANCE = 7 * (ANIMATION_NORMALIZED_MAX / 8); const GRect bounds = ctx->draw_state.clip_box; const GPoint center = grect_center_point(&bounds); if (distance_normalized < COLLAPSE_END_DISTANCE) { - const uint32_t local_distance = animation_timing_scaled(distance_normalized, - 0, - COLLAPSE_END_DISTANCE); + const uint32_t local_distance = + animation_timing_scaled(distance_normalized, 0, COLLAPSE_END_DISTANCE); prv_collapse_animation_update(ctx, config, local_distance); } else { prv_draw_dot(ctx, center, config.collapse_dot_color); } } -static void prv_configure_dot_transition_animation(Animation *animation, - GColor collapse_dot_color, - GColor final_dot_color, - GColor background_color, +static void prv_configure_dot_transition_animation(Animation *animation, GColor collapse_dot_color, + GColor final_dot_color, GColor background_color, CompositorTransitionDirection direction, uint32_t duration, bool collapse_starting_animation) { @@ -291,56 +277,50 @@ static void prv_configure_dot_transition_animation(Animation *animation, } DotTransitionAnimationConfiguration config = { - .collapse_starting_animation = collapse_starting_animation, - .collapse_dot_color = collapse_dot_color, - .final_dot_color = final_dot_color, - .background_color = background_color, - .direction = direction + .collapse_starting_animation = collapse_starting_animation, + .collapse_dot_color = collapse_dot_color, + .final_dot_color = final_dot_color, + .background_color = background_color, + .direction = direction }; animation_set_curve(animation, AnimationCurveLinear); animation_set_duration(animation, duration); - animation_set_handlers(animation, (AnimationHandlers) { 0 }, config.data); + animation_set_handlers(animation, (AnimationHandlers){0}, config.data); animation_set_reverse(animation, !collapse_starting_animation); } static void prv_dot_transition_to_timeline_past_animation_init(Animation *animation) { - prv_configure_dot_transition_animation(animation, TIMELINE_DOT_COLOR, - TIMELINE_DOT_COLOR, TIMELINE_PAST_COLOR, - CompositorTransitionDirectionUp, + prv_configure_dot_transition_animation(animation, TIMELINE_DOT_COLOR, TIMELINE_DOT_COLOR, + TIMELINE_PAST_COLOR, CompositorTransitionDirectionUp, STATIC_DOT_ANIMATION_DURATION_MS, false); } static void prv_dot_transition_from_timeline_past_animation_init(Animation *animation) { - prv_configure_dot_transition_animation(animation, TIMELINE_DOT_COLOR, - TIMELINE_DOT_COLOR, TIMELINE_PAST_COLOR, - CompositorTransitionDirectionDown, + prv_configure_dot_transition_animation(animation, TIMELINE_DOT_COLOR, TIMELINE_DOT_COLOR, + TIMELINE_PAST_COLOR, CompositorTransitionDirectionDown, STATIC_DOT_ANIMATION_DURATION_MS, true); } static void prv_dot_transition_to_timeline_future_animation_init(Animation *animation) { - prv_configure_dot_transition_animation(animation, TIMELINE_DOT_COLOR, - TIMELINE_DOT_COLOR, TIMELINE_FUTURE_COLOR, - CompositorTransitionDirectionUp, + prv_configure_dot_transition_animation(animation, TIMELINE_DOT_COLOR, TIMELINE_DOT_COLOR, + TIMELINE_FUTURE_COLOR, CompositorTransitionDirectionUp, STATIC_DOT_ANIMATION_DURATION_MS, true); } static void prv_dot_transition_from_timeline_future_animation_init(Animation *animation) { - prv_configure_dot_transition_animation(animation, TIMELINE_DOT_COLOR, - TIMELINE_DOT_COLOR, TIMELINE_FUTURE_COLOR, - CompositorTransitionDirectionDown, + prv_configure_dot_transition_animation(animation, TIMELINE_DOT_COLOR, TIMELINE_DOT_COLOR, + TIMELINE_FUTURE_COLOR, CompositorTransitionDirectionDown, STATIC_DOT_ANIMATION_DURATION_MS, false); } static void prv_dot_transition_from_app_fetch_animation_init(Animation *animation) { - prv_configure_dot_transition_animation(animation, GColorWhite, - GColorWhite, GColorLightGray, + prv_configure_dot_transition_animation(animation, GColorWhite, GColorWhite, GColorLightGray, CompositorTransitionDirectionNone, STATIC_DOT_ANIMATION_DURATION_MS, false); } - -const CompositorTransition* compositor_dot_transition_timeline_get(bool timeline_is_future, +const CompositorTransition *compositor_dot_transition_timeline_get(bool timeline_is_future, bool timeline_is_destination) { if (compositor_transition_app_to_app_should_be_skipped()) { return NULL; @@ -349,42 +329,42 @@ const CompositorTransition* compositor_dot_transition_timeline_get(bool timeline if (timeline_is_future) { if (timeline_is_destination) { static const CompositorTransition s_impl = { - .init = prv_dot_transition_to_timeline_future_animation_init, - .update = prv_static_dot_transition_animation_update, + .init = prv_dot_transition_to_timeline_future_animation_init, + .update = prv_static_dot_transition_animation_update, }; return &s_impl; } else { static const CompositorTransition s_impl = { - .init = prv_dot_transition_from_timeline_future_animation_init, - .update = prv_static_dot_transition_animation_update, + .init = prv_dot_transition_from_timeline_future_animation_init, + .update = prv_static_dot_transition_animation_update, }; return &s_impl; } } else { if (timeline_is_destination) { static const CompositorTransition s_impl = { - .init = prv_dot_transition_from_timeline_past_animation_init, - .update = prv_static_dot_transition_animation_update, + .init = prv_dot_transition_from_timeline_past_animation_init, + .update = prv_static_dot_transition_animation_update, }; return &s_impl; } else { static const CompositorTransition s_impl = { - .init = prv_dot_transition_to_timeline_past_animation_init, - .update = prv_static_dot_transition_animation_update, + .init = prv_dot_transition_to_timeline_past_animation_init, + .update = prv_static_dot_transition_animation_update, }; return &s_impl; } } } -const CompositorTransition* compositor_dot_transition_app_fetch_get(void) { +const CompositorTransition *compositor_dot_transition_app_fetch_get(void) { if (compositor_transition_app_to_app_should_be_skipped()) { return NULL; } static const CompositorTransition s_impl = { - .init = prv_dot_transition_from_app_fetch_animation_init, - .update = prv_static_dot_transition_animation_update, + .init = prv_dot_transition_from_app_fetch_animation_init, + .update = prv_static_dot_transition_animation_update, }; return &s_impl; } diff --git a/src/fw/services/compositor/default/compositor_launcher_app_transitions.c b/src/fw/services/compositor/default/compositor_launcher_app_transitions.c index 613735a158..e1257f866e 100644 --- a/src/fw/services/compositor/default/compositor_launcher_app_transitions.c +++ b/src/fw/services/compositor/default/compositor_launcher_app_transitions.c @@ -25,10 +25,10 @@ static CompositorLauncherAppTransitionData s_data; static const int32_t s_custom_moook_frames_in[] = {0, 1, 2, 4, 12, 24, 48}; static const int32_t s_custom_moook_frames_out[] = {12, 6, 3, 2, 1, 0}; static const MoookConfig s_custom_moook_config = { - .frames_in = s_custom_moook_frames_in, - .num_frames_in = ARRAY_LENGTH(s_custom_moook_frames_in), - .frames_out = s_custom_moook_frames_out, - .num_frames_out = ARRAY_LENGTH(s_custom_moook_frames_out), + .frames_in = s_custom_moook_frames_in, + .num_frames_in = ARRAY_LENGTH(s_custom_moook_frames_in), + .frames_out = s_custom_moook_frames_out, + .num_frames_out = ARRAY_LENGTH(s_custom_moook_frames_out), }; static void prv_move_region_of_bitmap_horizontally(GBitmap *bitmap, const GRect *region, @@ -41,12 +41,13 @@ static void prv_move_region_of_bitmap_horizontally(GBitmap *bitmap, const GRect graphics_private_move_pixels_horizontally(®ion_sub_bitmap, delta_x, true /* patch_garbage */); } -static void prv_duplicate_framebuffer_cols(GBitmap *bitmap, int16_t start_col, int16_t end_col, int16_t dupe_col) { +static void prv_duplicate_framebuffer_cols(GBitmap *bitmap, int16_t start_col, int16_t end_col, + int16_t dupe_col) { const int16_t delta = start_col > end_col ? -1 : 1; for (int16_t dest_col = start_col; dest_col != end_col; dest_col += delta) { - bitmap->bounds = (GRect) { - .origin.x = (dupe_col >= 0 ? dupe_col : dest_col), - .size = { 1, DISP_ROWS }, + bitmap->bounds = (GRect){ + .origin.x = (dupe_col >= 0 ? dupe_col : dest_col), + .size = {1, DISP_ROWS}, }; bitblt_bitmap_into_bitmap(bitmap, bitmap, GPoint(dest_col, 0), GCompOpAssign, GColorWhite); } @@ -55,7 +56,8 @@ static void prv_duplicate_framebuffer_cols(GBitmap *bitmap, int16_t start_col, i static void prv_copy_app_fb_patching_garbage(int16_t dest_origin_x) { GBitmap dest_bitmap = compositor_get_framebuffer_as_bitmap(); - compositor_scaled_app_fb_copy(GRect(dest_origin_x, 0, DISP_COLS - dest_origin_x, DISP_ROWS), false /* copy_relative_to_origin */); + compositor_scaled_app_fb_copy(GRect(dest_origin_x, 0, DISP_COLS - dest_origin_x, DISP_ROWS), + false /* copy_relative_to_origin */); // Patch garbage pixels using the first/last column, if necessary if (dest_origin_x != 0) { @@ -85,8 +87,8 @@ static void prv_manipulate_launcher_in_system_framebuffer(GContext *ctx, // color up const int16_t area_above_selection_rect_height = selection_rect->origin.y; if (area_above_selection_rect_height > 0) { - const GRect area_above_selection_rect = GRect(-selection_rect->origin.x, 0, DISP_COLS, - area_above_selection_rect_height); + const GRect area_above_selection_rect = + GRect(-selection_rect->origin.x, 0, DISP_COLS, area_above_selection_rect_height); prv_move_region_of_bitmap_horizontally(&ctx->dest_bitmap, &area_above_selection_rect, -delta); const GRect stretch_rect_above_selection_rect = @@ -101,19 +103,20 @@ static void prv_manipulate_launcher_in_system_framebuffer(GContext *ctx, const int16_t area_below_selection_rect_height = (int16_t)DISP_ROWS - row_below_selection_rect_bottom; if (area_below_selection_rect_height > 0) { - const GRect area_below_selection_rect = GRect(-selection_rect->origin.x, - row_below_selection_rect_bottom, DISP_COLS, - area_below_selection_rect_height); + const GRect area_below_selection_rect = + GRect(-selection_rect->origin.x, row_below_selection_rect_bottom, DISP_COLS, + area_below_selection_rect_height); prv_move_region_of_bitmap_horizontally(&ctx->dest_bitmap, &area_below_selection_rect, -delta); - const GRect stretch_rect_below_selection_rect = GRect(0, row_below_selection_rect_bottom, - DISP_COLS, abs_delta); + const GRect stretch_rect_below_selection_rect = + GRect(0, row_below_selection_rect_bottom, DISP_COLS, abs_delta); graphics_context_set_fill_color(ctx, selection_color); graphics_fill_rect(ctx, &stretch_rect_below_selection_rect); } } -static void prv_launcher_app_transition_animation_update(GContext *ctx, Animation *PBL_UNUSED animation, +static void prv_launcher_app_transition_animation_update(GContext *ctx, + Animation *PBL_UNUSED animation, uint32_t distance_normalized) { const bool is_right = s_data.app_is_destination; const GRangeVertical selection_vertical_range = @@ -127,9 +130,9 @@ static void prv_launcher_app_transition_animation_update(GContext *ctx, Animatio const int16_t delta_x_after_cut = interpolate_int16(distance_normalized, -end, start); // This rect specifies where the launcher's selected row currently is in the system framebuffer - const GRect selection_rect = GRect((is_right ? s_data.prev_delta_x_before_cut : start), - selection_vertical_range.origin_y, DISP_COLS, - selection_vertical_range.size_h); + const GRect selection_rect = + GRect((is_right ? s_data.prev_delta_x_before_cut : start), selection_vertical_range.origin_y, + DISP_COLS, selection_vertical_range.size_h); // We know we're before the moook cut if our delta for after the cut hasn't "moooked" beyond // where we will finish the animation @@ -191,13 +194,13 @@ const CompositorTransition *compositor_launcher_app_transition_get(bool app_is_d return NULL; } - s_data = (CompositorLauncherAppTransitionData) { - .app_is_destination = app_is_destination, + s_data = (CompositorLauncherAppTransitionData){ + .app_is_destination = app_is_destination, }; static const CompositorTransition s_impl = { - .init = prv_launcher_app_transition_animation_init, - .update = prv_launcher_app_transition_animation_update, + .init = prv_launcher_app_transition_animation_init, + .update = prv_launcher_app_transition_animation_update, }; return &s_impl; } diff --git a/src/fw/services/compositor/default/compositor_modal_transitions.c b/src/fw/services/compositor/default/compositor_modal_transitions.c index 509de6ef8a..9faf12eafc 100644 --- a/src/fw/services/compositor/default/compositor_modal_transitions.c +++ b/src/fw/services/compositor/default/compositor_modal_transitions.c @@ -14,7 +14,6 @@ #include "kernel/ui/kernel_ui.h" #include "resource/resource_ids.auto.h" - // No animations will be shown on the following platforms #if defined(CONFIG_RECOVERY_FW) #define MODAL_CONTRACT_TO_MODAL_ANIMATION (RESOURCE_ID_INVALID) @@ -42,14 +41,13 @@ static void prv_modal_transition_animation_init_sequence(const uint32_t resource s_data.animation_sequence = gdraw_command_sequence_create_with_resource(resource_id); } -static void prv_modal_transition_fill_update(GContext *ctx, - uint32_t distance_normalized, +static void prv_modal_transition_fill_update(GContext *ctx, uint32_t distance_normalized, bool inner) { const GColor replace_color = GColorGreen; const GColor stroke_color = TIMELINE_DOT_COLOR; - compositor_transition_pdcs_animation_update( - ctx, s_data.animation_sequence, distance_normalized, replace_color, stroke_color, - s_data.outer_color /* overdraw color */, inner, NULL); + compositor_transition_pdcs_animation_update(ctx, s_data.animation_sequence, distance_normalized, + replace_color, stroke_color, + s_data.outer_color /* overdraw color */, inner, NULL); } void prv_render_modal_if_necessary(void) { @@ -81,9 +79,7 @@ static NOINLINE void prv_render_transition_rect(GContext *ctx, Animation *animat prv_modal_transition_animation_init_sequence(MODAL_CONTRACT_FROM_MODAL_ANIMATION); s_data.expanding = false; } - distance_normalized = animation_timing_scaled(distance_normalized, - 0, - contract_to_dot_distance); + distance_normalized = animation_timing_scaled(distance_normalized, 0, contract_to_dot_distance); prv_modal_transition_fill_update(ctx, distance_normalized, false /* fill outer */); } else { // For the second half of the animation where the app is the destination, draw the "expand to @@ -93,8 +89,7 @@ static NOINLINE void prv_render_transition_rect(GContext *ctx, Animation *animat prv_modal_transition_animation_init_sequence(MODAL_EXPAND_TO_APP_ANIMATION); s_data.expanding = true; } - distance_normalized = animation_timing_scaled(distance_normalized, - contract_to_dot_distance, + distance_normalized = animation_timing_scaled(distance_normalized, contract_to_dot_distance, ANIMATION_NORMALIZED_MAX); prv_modal_transition_fill_update(ctx, distance_normalized, true /* fill inner */); } @@ -115,9 +110,8 @@ static NOINLINE void prv_render_transition_round(GContext *ctx, Animation *anima // Calculate the inner/outer radii for the colored radial and the dot radial const int16_t dot_ring_outer_radius_from = (display_bounds.size.w / 2) + (dot_radius * 2); const int16_t dot_ring_outer_radius_to = dot_radius; - const int16_t interpolated_dot_ring_outer_radius = interpolate_int16(distance_normalized, - dot_ring_outer_radius_from, - dot_ring_outer_radius_to); + const int16_t interpolated_dot_ring_outer_radius = + interpolate_int16(distance_normalized, dot_ring_outer_radius_from, dot_ring_outer_radius_to); const int16_t dot_ring_inner_radius = interpolated_dot_ring_outer_radius - dot_radius; // Draw the dot ring @@ -145,9 +139,8 @@ static void prv_modal_push_transition_animation_update_round(GContext *ctx, Anim } static void prv_modal_transition_animation_init_rect(Animation *animation) { - const uint32_t resource_id = s_data.modal_is_destination ? - MODAL_CONTRACT_TO_MODAL_ANIMATION : - MODAL_CONTRACT_FROM_MODAL_ANIMATION; + const uint32_t resource_id = s_data.modal_is_destination ? MODAL_CONTRACT_TO_MODAL_ANIMATION + : MODAL_CONTRACT_FROM_MODAL_ANIMATION; prv_modal_transition_animation_init_sequence(resource_id); // Tweaked from observations by the design team @@ -173,43 +166,43 @@ static void prv_modal_transition_animation_teardown_rect(Animation *animation) { const CompositorTransition *prv_modal_transition_get_rect(bool modal_is_destination) { // NOTE: This initialization will set .expanding to false so we default to contracting to a dot - s_data = (CompositorModalTransitionData) { - .modal_is_destination = modal_is_destination, - // TODO: PBL-19849 - // Decide on the logistics of the background color of the modal pop animation, including - // providing a setter for it that apps can use - .outer_color = GColorLightGray, + s_data = (CompositorModalTransitionData){ + .modal_is_destination = modal_is_destination, + // TODO: PBL-19849 + // Decide on the logistics of the background color of the modal pop animation, including + // providing a setter for it that apps can use + .outer_color = GColorLightGray, }; static const CompositorTransition s_impl = { - .init = prv_modal_transition_animation_init_rect, - .update = prv_modal_transition_animation_update_rect, - .teardown = prv_modal_transition_animation_teardown_rect, - .skip_modal_render_after_update = true, // This transition renders the modal itself + .init = prv_modal_transition_animation_init_rect, + .update = prv_modal_transition_animation_update_rect, + .teardown = prv_modal_transition_animation_teardown_rect, + .skip_modal_render_after_update = true, // This transition renders the modal itself }; return &s_impl; } const CompositorTransition *prv_modal_transition_get_round(bool modal_is_destination) { - s_data = (CompositorModalTransitionData) { - .modal_is_destination = modal_is_destination, + s_data = (CompositorModalTransitionData){ + .modal_is_destination = modal_is_destination, }; if (!modal_is_destination) { return compositor_round_flip_transition_get(false /* flip_to_the_right */); } else { static const CompositorTransition s_impl = { - .init = prv_modal_push_transition_animation_init_round, - .update = prv_modal_push_transition_animation_update_round, - .skip_modal_render_after_update = true, // This transition renders the modal itself + .init = prv_modal_push_transition_animation_init_round, + .update = prv_modal_push_transition_animation_update_round, + .skip_modal_render_after_update = true, // This transition renders the modal itself }; return &s_impl; } } -const CompositorTransition* compositor_modal_transition_to_modal_get(bool modal_is_destination) { +const CompositorTransition *compositor_modal_transition_to_modal_get(bool modal_is_destination) { return PBL_IF_RECT_ELSE(prv_modal_transition_get_rect, prv_modal_transition_get_round)(modal_is_destination); } diff --git a/src/fw/services/compositor/default/compositor_peek_transitions.c b/src/fw/services/compositor/default/compositor_peek_transitions.c index f8c228fdf9..a2d77e5e74 100644 --- a/src/fw/services/compositor/default/compositor_peek_transitions.c +++ b/src/fw/services/compositor/default/compositor_peek_transitions.c @@ -49,10 +49,10 @@ static void prv_init_peek_transition_animation(Animation *animation) { } const CompositorTransition *compositor_peek_transition_timeline_get(void) { - s_data = (CompositorPeekTransitionData) {}; + s_data = (CompositorPeekTransitionData){}; static const CompositorTransition s_impl = { - .init = prv_init_peek_transition_animation, - .update = prv_update_peek_transition_animation, + .init = prv_init_peek_transition_animation, + .update = prv_update_peek_transition_animation, }; return &s_impl; } diff --git a/src/fw/services/compositor/default/compositor_port_hole_transitions.c b/src/fw/services/compositor/default/compositor_port_hole_transitions.c index 175db463c4..3fa6450444 100644 --- a/src/fw/services/compositor/default/compositor_port_hole_transitions.c +++ b/src/fw/services/compositor/default/compositor_port_hole_transitions.c @@ -21,11 +21,11 @@ static CompositorPortHoleTransitionData s_data; void compositor_port_hole_transition_draw_outer_ring(GContext *ctx, int16_t thickness, GColor ring_color) { const uint16_t overdraw = 2; - const GRect frame = (GRect) { .origin = GPointZero, - .size = graphics_context_get_framebuffer_size(ctx) }; + const GRect frame = + (GRect){.origin = GPointZero, .size = graphics_context_get_framebuffer_size(ctx)}; graphics_context_set_fill_color(ctx, ring_color); - graphics_fill_radial(ctx, grect_inset(frame, GEdgeInsets(-overdraw)), - GOvalScaleModeFitCircle, thickness + overdraw, 0, TRIG_MAX_ANGLE); + graphics_fill_radial(ctx, grect_inset(frame, GEdgeInsets(-overdraw)), GOvalScaleModeFitCircle, + thickness + overdraw, 0, TRIG_MAX_ANGLE); } // piecewise interpolator between 0 and to for the first half of ANIMATION_NORMALIZED_MAX @@ -33,11 +33,12 @@ void compositor_port_hole_transition_draw_outer_ring(GContext *ctx, int16_t thic static int16_t prv_interpolate_two_ways_int16(AnimationProgress normalized_progress, int32_t discontinuity_progress, int16_t to) { if (normalized_progress < discontinuity_progress) { - return interpolate_int16(animation_timing_scaled(normalized_progress, 0, - discontinuity_progress), 0, to); + return interpolate_int16( + animation_timing_scaled(normalized_progress, 0, discontinuity_progress), 0, to); } else { return interpolate_int16(animation_timing_scaled(normalized_progress, discontinuity_progress, - ANIMATION_NORMALIZED_MAX), -to, 0); + ANIMATION_NORMALIZED_MAX), + -to, 0); } } @@ -46,8 +47,7 @@ static void prv_port_hole_transition_animation_init(Animation *animation) { s_data.animation_offset_px = 0; } -static void prv_port_hole_transition_animation_update(GContext *ctx, - Animation *animation, +static void prv_port_hole_transition_animation_update(GContext *ctx, Animation *animation, uint32_t distance_normalized) { const uint32_t transition_progress_threshold = ANIMATION_NORMALIZED_MAX / 2; const int32_t ring_max_thickness = 40; @@ -58,13 +58,13 @@ static void prv_port_hole_transition_animation_update(GContext *ctx, const int16_t current_offset_px = prv_interpolate_two_ways_int16(distance_normalized, transition_progress_threshold, - direction_negative ? ring_max_thickness : - -ring_max_thickness); + direction_negative ? ring_max_thickness : -ring_max_thickness); if (distance_normalized > transition_progress_threshold) { // Second half of the transition - const GRect rect = direction_vertical ? GRect(0, -current_offset_px, DISP_COLS, DISP_ROWS - current_offset_px) : - GRect(-current_offset_px, 0, DISP_COLS - current_offset_px, DISP_ROWS); + const GRect rect = direction_vertical + ? GRect(0, -current_offset_px, DISP_COLS, DISP_ROWS - current_offset_px) + : GRect(-current_offset_px, 0, DISP_COLS - current_offset_px, DISP_ROWS); compositor_scaled_app_fb_copy(rect, false /* copy_relative_to_origin */); } else { @@ -73,8 +73,7 @@ static void prv_port_hole_transition_animation_update(GContext *ctx, if (direction_vertical) { graphics_private_move_pixels_vertically(&ctx->dest_bitmap, diff); } else { - graphics_private_move_pixels_horizontally(&ctx->dest_bitmap, diff, - false /* patch_garbage */); + graphics_private_move_pixels_horizontally(&ctx->dest_bitmap, diff, false /* patch_garbage */); } } @@ -91,8 +90,8 @@ const CompositorTransition *compositor_port_hole_transition_app_get( s_data.direction = direction; static const CompositorTransition s_impl = { - .init = prv_port_hole_transition_animation_init, - .update = prv_port_hole_transition_animation_update, + .init = prv_port_hole_transition_animation_init, + .update = prv_port_hole_transition_animation_update, }; return &s_impl; diff --git a/src/fw/services/compositor/default/compositor_round_flip_transitions.c b/src/fw/services/compositor/default/compositor_round_flip_transitions.c index 13ab1a6a50..b220546804 100644 --- a/src/fw/services/compositor/default/compositor_round_flip_transitions.c +++ b/src/fw/services/compositor/default/compositor_round_flip_transitions.c @@ -15,7 +15,7 @@ typedef struct PACKED { union { struct { //! The direction of the animation of the visual elements - CompositorTransitionDirection direction:3; + CompositorTransitionDirection direction : 3; }; void *data; }; @@ -39,12 +39,11 @@ void compositor_round_flip_transitions_flip_animation_update(GContext *ctx, if (distance_normalized < flip_distance) { const int16_t flip_boundary_from_x = DISP_COLS; const int16_t flip_boundary_to_x = display_center.x - (flip_overlap_region_width / 2); - const int16_t current_flip_boundary_x = interpolate_int16(distance_normalized, - flip_boundary_from_x, - flip_boundary_to_x); + const int16_t current_flip_boundary_x = + interpolate_int16(distance_normalized, flip_boundary_from_x, flip_boundary_to_x); - const GPoint circle_center = GPoint(current_flip_boundary_x - circle_radius + 1, - display_center.y); + const GPoint circle_center = + GPoint(current_flip_boundary_x - circle_radius + 1, display_center.y); if (dir == CompositorTransitionDirectionLeft) { graphics_fill_radial_internal(ctx, circle_center, circle_radius, DISP_COLS - circle_center.x + 1, 0, TRIG_MAX_ANGLE); @@ -54,11 +53,10 @@ void compositor_round_flip_transitions_flip_animation_update(GContext *ctx, } else { const int16_t flip_boundary_from_x = display_center.x + (flip_overlap_region_width / 2); const int16_t flip_boundary_to_x = 0; - const int16_t current_flip_boundary_x = interpolate_int16(distance_normalized, - flip_boundary_from_x, - flip_boundary_to_x); - const GPoint circle_center = GPoint(current_flip_boundary_x + circle_radius - 1, - display_center.y); + const int16_t current_flip_boundary_x = + interpolate_int16(distance_normalized, flip_boundary_from_x, flip_boundary_to_x); + const GPoint circle_center = + GPoint(current_flip_boundary_x + circle_radius - 1, display_center.y); if (dir == CompositorTransitionDirectionLeft) { graphics_fill_circle(ctx, circle_center, circle_radius); } else { @@ -71,9 +69,7 @@ void compositor_round_flip_transitions_flip_animation_update(GContext *ctx, static void prv_round_flip_transition_animation_update(GContext *ctx, Animation *animation, uint32_t distance_normalized) { // Unwrap our animation configuration from the context - RoundFlipTransitionAnimationConfiguration config = { - .data = animation_get_context(animation) - }; + RoundFlipTransitionAnimationConfiguration config = {.data = animation_get_context(animation)}; // Save a reference to the existing draw implementation const GDrawRawImplementation *saved_draw_implementation = ctx->draw_state.draw_implementation; @@ -83,9 +79,8 @@ static void prv_round_flip_transition_animation_update(GContext *ctx, Animation // Note that the flip_lid_color here doesn't matter because we've replaced the draw implementation // However, we do have to specify a color that isn't invisible, otherwise nothing will be drawn - compositor_round_flip_transitions_flip_animation_update(ctx, distance_normalized, - config.direction, - GColorBlack /* flip_lid_color */); + compositor_round_flip_transitions_flip_animation_update( + ctx, distance_normalized, config.direction, GColorBlack /* flip_lid_color */); // Restore the saved draw implementation ctx->draw_state.draw_implementation = saved_draw_implementation; @@ -95,12 +90,12 @@ static void prv_round_flip_transition_animation_update(GContext *ctx, Animation static void prv_configure_round_flip_transition_animation(Animation *animation, CompositorTransitionDirection direction) { RoundFlipTransitionAnimationConfiguration config = { - .direction = direction, + .direction = direction, }; animation_set_curve(animation, AnimationCurveLinear); animation_set_duration(animation, ROUND_FLIP_ANIMATION_DURATION_MS); - animation_set_handlers(animation, (AnimationHandlers) { 0 }, config.data); + animation_set_handlers(animation, (AnimationHandlers){0}, config.data); // If the visual elements will move to the right, we will just play the left animation backwards const bool should_animate_backwards = (direction == CompositorTransitionDirectionRight); animation_set_reverse(animation, should_animate_backwards); @@ -121,14 +116,14 @@ const CompositorTransition *compositor_round_flip_transition_get(bool flip_to_th if (flip_to_the_right) { static const CompositorTransition s_impl = { - .init = prv_round_flip_transition_to_launcher_animation_init, - .update = prv_round_flip_transition_animation_update, + .init = prv_round_flip_transition_to_launcher_animation_init, + .update = prv_round_flip_transition_animation_update, }; return &s_impl; } else { static const CompositorTransition s_impl = { - .init = prv_round_flip_transition_from_launcher_animation_init, - .update = prv_round_flip_transition_animation_update, + .init = prv_round_flip_transition_from_launcher_animation_init, + .update = prv_round_flip_transition_animation_update, }; return &s_impl; } diff --git a/src/fw/services/compositor/default/compositor_shutter_transitions.c b/src/fw/services/compositor/default/compositor_shutter_transitions.c index 1a0915d99a..05bce07684 100644 --- a/src/fw/services/compositor/default/compositor_shutter_transitions.c +++ b/src/fw/services/compositor/default/compositor_shutter_transitions.c @@ -28,21 +28,26 @@ static CompositorShutterTransitionData s_data; #define PATH_QUAD_POINTS 4 static GPathInfo s_path_wedge = { - .num_points = PATH_WEDGE_POINTS, - .points = (GPoint[PATH_WEDGE_POINTS]) { - // These are just placeholders to allocate the needed space. - // They will be set to the proper values during the animation. - {0, 0}, {0, 0}, {0, 0}, - }, + .num_points = PATH_WEDGE_POINTS, + .points = (GPoint[PATH_WEDGE_POINTS]){ + // These are just placeholders to allocate the needed space. + // They will be set to the proper values during the animation. + {0, 0}, + {0, 0}, + {0, 0}, + }, }; static GPathInfo s_path_quad = { - .num_points = PATH_QUAD_POINTS, - .points = (GPoint[PATH_QUAD_POINTS]) { - // These are just placeholders to allocate the needed space. - // They will be set to the proper values during the animation. - {0, 0}, {0, 0}, {0, 0}, {0, 0}, - }, + .num_points = PATH_QUAD_POINTS, + .points = (GPoint[PATH_QUAD_POINTS]){ + // These are just placeholders to allocate the needed space. + // They will be set to the proper values during the animation. + {0, 0}, + {0, 0}, + {0, 0}, + {0, 0}, + }, }; typedef struct PathInterpDefinition { @@ -55,88 +60,126 @@ typedef struct PathDefinition { } PathDefinition; #define PATH_INTERP_DEF_TL_CORNER \ - { { 0, 0 }, \ - { 0, 0 }, } + { \ + {0, 0}, \ + {0, 0}, \ + } #define PATH_INTERP_DEF_TR_CORNER \ - { { DISP_COLS, 0 }, \ - { DISP_COLS, 0 }, } + { \ + {DISP_COLS, 0}, \ + {DISP_COLS, 0}, \ + } #define PATH_INTERP_DEF_BL_CORNER \ - { { 0, DISP_ROWS }, \ - { 0, DISP_ROWS }, } + { \ + {0, DISP_ROWS}, \ + {0, DISP_ROWS}, \ + } #define PATH_INTERP_DEF_BR_CORNER \ - { { DISP_COLS, DISP_ROWS }, \ - { DISP_COLS, DISP_ROWS }, } - + { \ + {DISP_COLS, DISP_ROWS}, \ + {DISP_COLS, DISP_ROWS}, \ + } // These factors are based on getting pixel coordinates from the videos, then dividing them by // the designed screen size (144x168). By being ratios instead of pixel counts, these can work // out of the box on Robert. static const PathDefinition s_path_defs[4] = { - [CompositorTransitionDirectionUp] = { - .wedge_verts = { - // BL: 0,M -> 0,109 (0.65) - { { 0, DISP_ROWS }, - { 0, DISP_ROWS * 0.65 }, }, - // BM: 72,M (0.5) -> 115,M (0.8) - { { DISP_COLS * 0.5, DISP_ROWS }, - { DISP_COLS * 0.8, DISP_ROWS }, }, - PATH_INTERP_DEF_BL_CORNER, - }, - .quad_verts = { - // TR: M,0 -> M,52 (0.31) - { { DISP_COLS, 0 }, - { DISP_COLS, DISP_ROWS * 0.31 }, }, - // TL: 0,0 -> 0,30 (0.18) - { { 0, 0 }, - { 0, DISP_ROWS * 0.18 }, }, - PATH_INTERP_DEF_TL_CORNER, - PATH_INTERP_DEF_TR_CORNER, - }, - }, - [CompositorTransitionDirectionDown] = { - // Vertical mirror of Up - .wedge_verts = { - // TL: 0,0 -> 0,59 (0.35) - { { 0, 0 }, - { 0, DISP_ROWS * 0.35 }, }, - // TM: 72,0 (0.5) -> 115,0 (0.8) - { { DISP_COLS * 0.5, 0 }, - { DISP_COLS * 0.8, 0 }, }, - PATH_INTERP_DEF_TL_CORNER, - }, - .quad_verts = { - // BR: M,M -> M,116 (0.69) - { { DISP_COLS, DISP_ROWS }, - { DISP_COLS, DISP_ROWS * 0.69 }, }, - // BL: 0,M -> 0,138 (0.82) - { { 0, DISP_ROWS }, - { 0, DISP_ROWS * 0.82 }, }, - PATH_INTERP_DEF_BL_CORNER, - PATH_INTERP_DEF_BR_CORNER, - }, - }, - // We don't have one for Left because the shutter will not be drawn on it. - [CompositorTransitionDirectionRight] = { - .wedge_verts = { - // TL: 0,0 -> 50,0 (0.35) - { { 0, 0 }, - { DISP_COLS * 0.35, 0 }, }, - // ML: 0,50 (0.3) -> 0,117 (0.7) - { { 0, DISP_ROWS * 0.3 }, - { 0, DISP_ROWS * 0.7 }, }, - PATH_INTERP_DEF_TL_CORNER, - }, - .quad_verts = { - // BR: M,M -> 93,M (0.65) - { { DISP_COLS, DISP_ROWS }, - { DISP_COLS * 0.65, DISP_ROWS }, }, - // TR: M,0 -> 119,0 (0.83) - { { DISP_COLS, 0 }, - { DISP_COLS * 0.83, 0 }, }, - PATH_INTERP_DEF_TR_CORNER, - PATH_INTERP_DEF_BR_CORNER, + [CompositorTransitionDirectionUp] = + { + .wedge_verts = + { + // BL: 0,M -> 0,109 (0.65) + { + {0, DISP_ROWS}, + {0, DISP_ROWS * 0.65}, + }, + // BM: 72,M (0.5) -> 115,M (0.8) + { + {DISP_COLS * 0.5, DISP_ROWS}, + {DISP_COLS * 0.8, DISP_ROWS}, + }, + PATH_INTERP_DEF_BL_CORNER, + }, + .quad_verts = + { + // TR: M,0 -> M,52 (0.31) + { + {DISP_COLS, 0}, + {DISP_COLS, DISP_ROWS * 0.31}, + }, + // TL: 0,0 -> 0,30 (0.18) + { + {0, 0}, + {0, DISP_ROWS * 0.18}, + }, + PATH_INTERP_DEF_TL_CORNER, + PATH_INTERP_DEF_TR_CORNER, + }, + }, + [CompositorTransitionDirectionDown] = + { + // Vertical mirror of Up + .wedge_verts = + { + // TL: 0,0 -> 0,59 (0.35) + { + {0, 0}, + {0, DISP_ROWS * 0.35}, + }, + // TM: 72,0 (0.5) -> 115,0 (0.8) + { + {DISP_COLS * 0.5, 0}, + {DISP_COLS * 0.8, 0}, + }, + PATH_INTERP_DEF_TL_CORNER, + }, + .quad_verts = + { + // BR: M,M -> M,116 (0.69) + { + {DISP_COLS, DISP_ROWS}, + {DISP_COLS, DISP_ROWS * 0.69}, + }, + // BL: 0,M -> 0,138 (0.82) + { + {0, DISP_ROWS}, + {0, DISP_ROWS * 0.82}, + }, + PATH_INTERP_DEF_BL_CORNER, + PATH_INTERP_DEF_BR_CORNER, + }, + }, + // We don't have one for Left because the shutter will not be drawn on it. + [CompositorTransitionDirectionRight] = { + .wedge_verts = + { + // TL: 0,0 -> 50,0 (0.35) + { + {0, 0}, + {DISP_COLS * 0.35, 0}, + }, + // ML: 0,50 (0.3) -> 0,117 (0.7) + { + {0, DISP_ROWS * 0.3}, + {0, DISP_ROWS * 0.7}, + }, + PATH_INTERP_DEF_TL_CORNER, + }, + .quad_verts = { + // BR: M,M -> 93,M (0.65) + { + {DISP_COLS, DISP_ROWS}, + {DISP_COLS * 0.65, DISP_ROWS}, + }, + // TR: M,0 -> 119,0 (0.83) + { + {DISP_COLS, 0}, + {DISP_COLS * 0.83, 0}, + }, + PATH_INTERP_DEF_TR_CORNER, + PATH_INTERP_DEF_BR_CORNER, + }, }, - }, }; // Creates a gpoint from a PathInterpDefinition and animation progress. @@ -163,7 +206,7 @@ static void prv_draw_shutter(GContext *ctx, uint32_t distance, bool vertical) { for (int i = 0; i < PATH_WEDGE_POINTS; i++) { prv_gpoint_interpolate(&s_path_wedge.points[i], distance, - &s_path_defs[s_data.direction].wedge_verts[i]); + &s_path_defs[s_data.direction].wedge_verts[i]); } gpath_init(&s_data.path, &s_path_wedge); gpath_draw_outline(ctx, &s_data.path); @@ -171,7 +214,7 @@ static void prv_draw_shutter(GContext *ctx, uint32_t distance, bool vertical) { for (int i = 0; i < PATH_QUAD_POINTS; i++) { prv_gpoint_interpolate(&s_path_quad.points[i], distance, - &s_path_defs[s_data.direction].quad_verts[i]); + &s_path_defs[s_data.direction].quad_verts[i]); } gpath_init(&s_data.path, &s_path_quad); gpath_draw_outline(ctx, &s_data.path); @@ -195,16 +238,16 @@ static int16_t prv_move_in(GContext *ctx, int move_size, uint32_t distance, bool // Draws in the new application's framebuffer and any transparent modal static void prv_draw_in(GContext *ctx, int move_size, uint32_t distance, bool vertical, bool invert) { - const int16_t current_offset_px = prv_interpolate_two_ways(distance, invert ? -move_size : - move_size); - const GPoint point = vertical ? GPoint(0, -current_offset_px) : - GPoint(-current_offset_px, 0); + const int16_t current_offset_px = + prv_interpolate_two_ways(distance, invert ? -move_size : move_size); + const GPoint point = vertical ? GPoint(0, -current_offset_px) : GPoint(-current_offset_px, 0); // Make sure the undrawn areas are the shutter color graphics_context_set_fill_color(ctx, s_data.sampled_color); graphics_fill_rect(ctx, &DISP_FRAME); - compositor_scaled_app_fb_copy(GRect(point.x, point.y, DISP_COLS, DISP_ROWS), false /* copy_relative_to_origin */); + compositor_scaled_app_fb_copy(GRect(point.x, point.y, DISP_COLS, DISP_ROWS), + false /* copy_relative_to_origin */); const GPoint drawing_box_origin = ctx->draw_state.drawing_box.origin; gpoint_add_eq(&ctx->draw_state.drawing_box.origin, point); @@ -212,9 +255,9 @@ static void prv_draw_in(GContext *ctx, int move_size, uint32_t distance, bool ve ctx->draw_state.drawing_box.origin = drawing_box_origin; } -const int32_t s_small_movement_size = DISP_COLS * 0.042; // 6 on snowy -const int32_t s_large_movement_size = DISP_COLS * 0.14; // 20 on snowy -const int32_t s_vertical_movement_size = DISP_ROWS * 0.18; // 30 on snowy +const int32_t s_small_movement_size = DISP_COLS * 0.042; // 6 on snowy +const int32_t s_large_movement_size = DISP_COLS * 0.14; // 20 on snowy +const int32_t s_vertical_movement_size = DISP_ROWS * 0.18; // 30 on snowy static void prv_transition_animation_update(GContext *ctx, Animation *animation, uint32_t progress) { @@ -230,8 +273,8 @@ static void prv_transition_animation_update(GContext *ctx, Animation *animation, prev_state = ctx->draw_state; if (s_data.is_first_half) { - const int32_t movement_size = direction_vertical ? s_vertical_movement_size - : s_large_movement_size; + const int32_t movement_size = + direction_vertical ? s_vertical_movement_size : s_large_movement_size; prv_move_in(ctx, direction_negative ? movement_size : -movement_size, progress, direction_vertical); if (direction_has_shutter) { @@ -248,20 +291,19 @@ static void prv_transition_animation_update(GContext *ctx, Animation *animation, } static void prv_transition_animation_first_update(Animation *animation, - const AnimationProgress progress) { + const AnimationProgress progress) { s_data.is_first_half = true; compositor_transition_render(prv_transition_animation_update, animation, progress); } static void prv_transition_animation_second_update(Animation *animation, - const AnimationProgress progress) { + const AnimationProgress progress) { if (s_data.is_first_half) { // This needs to be sampled here instead of in init because apparently the app framebuffer // hasn't been drawn at all during init. const GBitmap app_bitmap = compositor_get_app_framebuffer_as_bitmap(); - s_data.sampled_color = graphics_private_sample_line_color(&app_bitmap, - (GColorSampleEdge)s_data.direction, - GColorBlack); + s_data.sampled_color = graphics_private_sample_line_color( + &app_bitmap, (GColorSampleEdge)s_data.direction, GColorBlack); // Force the sampled color to be completely opaque, because we're using this to fill the // framebuffer background when moving the new app into focus. s_data.sampled_color.a = 3; @@ -279,7 +321,7 @@ static void prv_transition_animation_init(Animation *animation) { if (s_data.first_anim) { anim_array[anim_count++] = s_data.first_anim; static const AnimationImplementation s_first_animation_impl = { - .update = prv_transition_animation_first_update, + .update = prv_transition_animation_first_update, }; animation_set_implementation(s_data.first_anim, &s_first_animation_impl); animation_set_duration(s_data.first_anim, SHUTTER_TRANSITION_FIRST_DURATION_MS); @@ -291,7 +333,7 @@ static void prv_transition_animation_init(Animation *animation) { if (s_data.second_anim) { anim_array[anim_count++] = s_data.second_anim; static const AnimationImplementation s_second_animation_impl = { - .update = prv_transition_animation_second_update, + .update = prv_transition_animation_second_update, }; animation_set_implementation(s_data.second_anim, &s_second_animation_impl); animation_set_duration(s_data.second_anim, SHUTTER_TRANSITION_SECOND_DURATION_MS); @@ -306,8 +348,7 @@ static void prv_transition_animation_init(Animation *animation) { s_data.animation_offset_px = 0; } -static void prv_transition_animation_update_stub(GContext *ctx, - Animation *animation, +static void prv_transition_animation_update_stub(GContext *ctx, Animation *animation, uint32_t progress) { } @@ -322,9 +363,9 @@ const CompositorTransition *compositor_shutter_transition_get( s_data.direction = direction; static const CompositorTransition s_impl = { - .init = prv_transition_animation_init, - .update = prv_transition_animation_update_stub, - .skip_modal_render_after_update = true, + .init = prv_transition_animation_init, + .update = prv_transition_animation_update_stub, + .skip_modal_render_after_update = true, }; return &s_impl; } diff --git a/src/fw/services/compositor/default/compositor_slide_transitions.c b/src/fw/services/compositor/default/compositor_slide_transitions.c index f25fc857d2..c4bc0aaccf 100644 --- a/src/fw/services/compositor/default/compositor_slide_transitions.c +++ b/src/fw/services/compositor/default/compositor_slide_transitions.c @@ -32,9 +32,9 @@ static void prv_copy_framebuffer_rows(GBitmap *dest_bitmap, GBitmap *src_bitmap, int16_t end_row, int16_t dupe_row, int16_t shift_amount) { const int16_t delta = start_row > end_row ? -1 : 1; for (int16_t dest_row = start_row; dest_row != end_row; dest_row += delta) { - src_bitmap->bounds = (GRect) { - .origin.y = (dupe_row >= 0 ? dupe_row : dest_row) - shift_amount, - .size = { DISP_COLS, 1 }, + src_bitmap->bounds = (GRect){ + .origin.y = (dupe_row >= 0 ? dupe_row : dest_row) - shift_amount, + .size = {DISP_COLS, 1}, }; bitblt_bitmap_into_bitmap(dest_bitmap, src_bitmap, GPoint(0, dest_row), GCompOpAssign, GColorWhite); @@ -52,7 +52,8 @@ static void prv_duplicate_framebuffer_row(GBitmap *dest_bitmap, int16_t start_ro const int16_t delta = start_row > end_row ? -1 : 1; for (int16_t dest_row = start_row; dest_row != end_row; dest_row += delta) { int16_t offset_y = (dupe_row >= 0 ? dupe_row : dest_row) - dest_row; - compositor_scaled_app_fb_copy_offset(GRect(0, dest_row, DISP_COLS, 1), false /* copy_relative_to_origin */, offset_y); + compositor_scaled_app_fb_copy_offset(GRect(0, dest_row, DISP_COLS, 1), + false /* copy_relative_to_origin */, offset_y); } } @@ -112,14 +113,15 @@ static void prv_slide_transition_animation_update(GContext *ctx, Animation *anim const int content_width = DISP_COLS - TIMELINE_PEEK_ICON_BOX_WIDTH; graphics_fill_rect(ctx, &GRect(0, fill_offset_y, content_width, fill_height)); graphics_context_set_fill_color(ctx, s_data.fill_color); - graphics_fill_rect(ctx, &GRect(content_width, fill_offset_y, TIMELINE_PEEK_ICON_BOX_WIDTH, - fill_height)); + graphics_fill_rect( + ctx, &GRect(content_width, fill_offset_y, TIMELINE_PEEK_ICON_BOX_WIDTH, fill_height)); } else { graphics_context_set_fill_color(ctx, s_data.fill_color); graphics_fill_rect(ctx, &GRect(0, fill_offset_y, DISP_COLS, fill_height)); } } else { - compositor_scaled_app_fb_copy(GRect(0, app_offset_y, DISP_COLS, DISP_ROWS), false /* copy_relative_to_origin */); + compositor_scaled_app_fb_copy(GRect(0, app_offset_y, DISP_COLS, DISP_ROWS), + false /* copy_relative_to_origin */); if (app_should_dupe) { GBitmap app_bitmap = compositor_get_app_framebuffer_as_bitmap(); prv_duplicate_framebuffer_row(&dest_bitmap, app_dupe_row, app_offset_y + app_dupe_row, @@ -134,8 +136,8 @@ static void prv_slide_transition_animation_update(GContext *ctx, Animation *anim static void prv_slide_transition_animation_init(Animation *animation) { // Give a regular moook more time to stretch the anticipation - const uint32_t duration = s_data.timeline_is_destination ? interpolate_moook_in_duration() : - interpolate_moook_duration(); + const uint32_t duration = s_data.timeline_is_destination ? interpolate_moook_in_duration() + : interpolate_moook_duration(); const InterpolateInt64Function interpolation = s_data.timeline_is_destination ? interpolate_moook_in_only : interpolate_moook; animation_set_duration(animation, duration); @@ -144,19 +146,20 @@ static void prv_slide_transition_animation_init(Animation *animation) { const CompositorTransition *prv_slide_transition_get(void) { static const CompositorTransition s_impl = { - .init = prv_slide_transition_animation_init, - .update = prv_slide_transition_animation_update, + .init = prv_slide_transition_animation_init, + .update = prv_slide_transition_animation_update, }; return &s_impl; } -const CompositorTransition *compositor_slide_transition_timeline_get( - bool timeline_is_future, bool timeline_is_destination, bool timeline_is_empty) { - s_data = (CompositorSlideTransitionData) { - .slide_up = timeline_is_future ^ !timeline_is_destination, - .fill_color = timeline_is_future ? TIMELINE_FUTURE_COLOR : TIMELINE_PAST_COLOR, - .timeline_is_destination = timeline_is_destination, - .timeline_is_empty = timeline_is_empty, +const CompositorTransition *compositor_slide_transition_timeline_get(bool timeline_is_future, + bool timeline_is_destination, + bool timeline_is_empty) { + s_data = (CompositorSlideTransitionData){ + .slide_up = timeline_is_future ^ !timeline_is_destination, + .fill_color = timeline_is_future ? TIMELINE_FUTURE_COLOR : TIMELINE_PAST_COLOR, + .timeline_is_destination = timeline_is_destination, + .timeline_is_empty = timeline_is_empty, }; return prv_slide_transition_get(); } @@ -164,8 +167,8 @@ const CompositorTransition *compositor_slide_transition_timeline_get( const CompositorTransition *compositor_slide_transition_app_get(bool slide_up) { // timeline_is_destination unset: the incoming app framebuffer is drawn sliding in, // pushing the current framebuffer out. - s_data = (CompositorSlideTransitionData) { - .slide_up = slide_up, + s_data = (CompositorSlideTransitionData){ + .slide_up = slide_up, }; return prv_slide_transition_get(); } diff --git a/src/fw/services/compositor/legacy/compositor_app_slide_transitions.c b/src/fw/services/compositor/legacy/compositor_app_slide_transitions.c index f3030c0e43..f375963220 100644 --- a/src/fw/services/compositor/legacy/compositor_app_slide_transitions.c +++ b/src/fw/services/compositor/legacy/compositor_app_slide_transitions.c @@ -21,8 +21,7 @@ typedef struct { _Static_assert(sizeof(AppSlideTransitionAnimationConfiguration) == sizeof(void *), ""); -void compositor_app_slide_transition_animation_update(GContext *ctx, - uint32_t distance_normalized, +void compositor_app_slide_transition_animation_update(GContext *ctx, uint32_t distance_normalized, CompositorTransitionDirection dir) { const bool is_right = (dir == CompositorTransitionDirectionRight); const int16_t from = (int16_t)((is_right) ? -DISP_COLS : DISP_COLS); @@ -48,27 +47,22 @@ void compositor_app_slide_transition_animation_update(GContext *ctx, compositor_set_modal_transition_offset(dest_bitmap_blit_offset); } -static void prv_transition_animation_update(GContext *ctx, - Animation *animation, +static void prv_transition_animation_update(GContext *ctx, Animation *animation, uint32_t distance_normalized) { // Unwrap our animation configuration from the context - AppSlideTransitionAnimationConfiguration config = { - .data = animation_get_context(animation) - }; + AppSlideTransitionAnimationConfiguration config = {.data = animation_get_context(animation)}; - compositor_app_slide_transition_animation_update(ctx, - distance_normalized, - config.direction); + compositor_app_slide_transition_animation_update(ctx, distance_normalized, config.direction); } //! The transition direction here is the direction of the visual elements, not the motion static void prv_configure_transition_animation(Animation *animation, CompositorTransitionDirection direction) { AppSlideTransitionAnimationConfiguration config = { - .direction = direction, + .direction = direction, }; - animation_set_handlers(animation, (AnimationHandlers) { 0 }, config.data); + animation_set_handlers(animation, (AnimationHandlers){0}, config.data); animation_set_custom_interpolation(animation, interpolate_moook); animation_set_duration(animation, interpolate_moook_duration()); } @@ -88,14 +82,14 @@ const CompositorTransition *compositor_app_slide_transition_get(bool flip_to_the if (flip_to_the_right) { static const CompositorTransition s_impl = { - .init = prv_transition_to_launcher_animation_init, - .update = prv_transition_animation_update, + .init = prv_transition_to_launcher_animation_init, + .update = prv_transition_animation_update, }; return &s_impl; } else { static const CompositorTransition s_impl = { - .init = prv_transition_from_launcher_animation_init, - .update = prv_transition_animation_update, + .init = prv_transition_from_launcher_animation_init, + .update = prv_transition_animation_update, }; return &s_impl; } diff --git a/src/fw/services/compositor/legacy/compositor_modal_slide_transitions.c b/src/fw/services/compositor/legacy/compositor_modal_slide_transitions.c index 391737632f..8be5692797 100644 --- a/src/fw/services/compositor/legacy/compositor_modal_slide_transitions.c +++ b/src/fw/services/compositor/legacy/compositor_modal_slide_transitions.c @@ -24,15 +24,14 @@ static CompositorModalSlideTransitionData s_data; static const int32_t DISP_ROWS_LAST_INDEX = DISP_ROWS - 1; static void prv_modal_transition_push_update(GContext *ctx, uint32_t distance_normalized) { - const int16_t new_modal_offset_y = interpolate_int16(distance_normalized, - DISP_ROWS_LAST_INDEX, - 0); + const int16_t new_modal_offset_y = + interpolate_int16(distance_normalized, DISP_ROWS_LAST_INDEX, 0); // The modal overshoots its destination by a few pixels. When this happens, fill in the pixels // at the bottom of the screen with black. if (new_modal_offset_y < 0) { - graphics_fill_rect( - ctx, &GRect(0, DISP_ROWS + new_modal_offset_y, DISP_COLS, -new_modal_offset_y)); + graphics_fill_rect(ctx, + &GRect(0, DISP_ROWS + new_modal_offset_y, DISP_COLS, -new_modal_offset_y)); } gpoint_add_eq(&ctx->draw_state.drawing_box.origin, GPoint(0, new_modal_offset_y)); @@ -45,10 +44,8 @@ static void prv_modal_transition_pop_update(GContext *ctx, uint32_t distance_nor // This is the offset where the modal is to be drawn after the operations below. // NOTE: It has to be clipped since our moook interpolate function goes past the destination // and would cause us to write into an invalid memory address in the framebuffer. - const int32_t new_modal_offset_y = MIN(DISP_ROWS_LAST_INDEX, - interpolate_int16(distance_normalized, - 0, - DISP_ROWS_LAST_INDEX)); + const int32_t new_modal_offset_y = + MIN(DISP_ROWS_LAST_INDEX, interpolate_int16(distance_normalized, 0, DISP_ROWS_LAST_INDEX)); // This is the delta between the new offset and the previous offset. const int32_t modal_offset_delta_y = new_modal_offset_y - s_data.cur_modal_offset_y; @@ -111,16 +108,16 @@ static void prv_transition_animation_init(Animation *animation) { animation_set_duration(animation, interpolate_moook_soft_duration(NUM_MOOOK_FRAMES_MID)); } -const CompositorTransition* compositor_modal_transition_to_modal_get(bool modal_is_destination) { +const CompositorTransition *compositor_modal_transition_to_modal_get(bool modal_is_destination) { // Performs different operations on whether the modal is being pushed or popped. - s_data = (CompositorModalSlideTransitionData) { - .modal_is_destination = modal_is_destination, + s_data = (CompositorModalSlideTransitionData){ + .modal_is_destination = modal_is_destination, }; static const CompositorTransition s_impl = { - .init = prv_transition_animation_init, - .update = prv_transition_animation_update, - .skip_modal_render_after_update = true, // This transition renders the modal itself + .init = prv_transition_animation_init, + .update = prv_transition_animation_update, + .skip_modal_render_after_update = true, // This transition renders the modal itself }; return &s_impl; diff --git a/src/fw/services/compositor/screenshot_pp.c b/src/fw/services/compositor/screenshot_pp.c index 63e1ff7273..59cd3730a5 100644 --- a/src/fw/services/compositor/screenshot_pp.c +++ b/src/fw/services/compositor/screenshot_pp.c @@ -42,7 +42,7 @@ typedef struct ScreenshotState { static ScreenshotState s_screenshot_state; typedef struct PACKED { - uint8_t response_code; + uint8_t response_code; uint32_t version; uint32_t width; uint32_t height; @@ -54,20 +54,19 @@ typedef struct ScreenshotErrorResponseData { } ScreenshotErrorResponseData; static void prv_send_error_response(CommSession *session, uint8_t response) { - ScreenshotErrorResponseData error_response = (ScreenshotErrorResponseData) { - .session = session, - .header = { - .response_code = response, - .version = htonl(1), - .width = htonl(0), - .height = htonl(0), - }, + ScreenshotErrorResponseData error_response = (ScreenshotErrorResponseData){ + .session = session, + .header = { + .response_code = response, + .version = htonl(1), + .width = htonl(0), + .height = htonl(0), + }, }; - comm_session_send_data( - error_response.session, SCREENSHOT_ENDPOINT_ID, - (const uint8_t *) &error_response.header, sizeof(error_response.header), - COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(error_response.session, SCREENSHOT_ENDPOINT_ID, + (const uint8_t *)&error_response.header, sizeof(error_response.header), + COMM_SESSION_DEFAULT_TIMEOUT); } static void prv_finish(ScreenshotState *state) { @@ -90,12 +89,12 @@ static uint32_t prv_framebuffer_next_chunk(FrameBufferState *restrict state, uint8_t *output_buffer_with_offset = output_buffer; while (remaining_chunk_bytes > 0 && state->row < state->height) { - const uint8_t *restrict framebuffer_row_data = (uint8_t *)framebuffer_get_line(state->fb, - state->row); + const uint8_t *restrict framebuffer_row_data = + (uint8_t *)framebuffer_get_line(state->fb, state->row); const uint16_t framebuffer_current_column = state->col / cols_per_byte; uint16_t remaining_framebuffer_row_bytes = bytes_per_row - framebuffer_current_column; const bool framebuffer_row_is_larger_than_chunk = - (remaining_framebuffer_row_bytes > remaining_chunk_bytes); + (remaining_framebuffer_row_bytes > remaining_chunk_bytes); if (framebuffer_row_is_larger_than_chunk) { remaining_framebuffer_row_bytes = remaining_chunk_bytes; } @@ -130,8 +129,8 @@ static uint32_t prv_framebuffer_next_chunk(FrameBufferState *restrict state, return max_chunk_bytes - remaining_chunk_bytes; } -void screenshot_send_next_chunk(void* raw_state) { - ScreenshotState* state = (ScreenshotState*)raw_state; +void screenshot_send_next_chunk(void *raw_state) { + ScreenshotState *state = (ScreenshotState *)raw_state; CommSession *session = state->session; uint32_t max_buf_len = comm_session_send_buffer_get_max_payload_length(session); @@ -159,9 +158,9 @@ void screenshot_send_next_chunk(void* raw_state) { SendBuffer *sb; if (max_buf_len == 0 /* disconnected */ || - !(sb = comm_session_send_buffer_begin_write(session, SCREENSHOT_ENDPOINT_ID, - session_len, COMM_SESSION_DEFAULT_TIMEOUT))) { - PBL_LOG_WRN("Terminating screenshot send early: %"PRIu32, max_buf_len); + !(sb = comm_session_send_buffer_begin_write(session, SCREENSHOT_ENDPOINT_ID, session_len, + COMM_SESSION_DEFAULT_TIMEOUT))) { + PBL_LOG_WRN("Terminating screenshot send early: %" PRIu32, max_buf_len); prv_finish(state); return; } @@ -169,19 +168,19 @@ void screenshot_send_next_chunk(void* raw_state) { if (state->sent_header) { comm_session_send_buffer_write(sb, buffer, len); } else { - const ScreenshotHeader header = (const ScreenshotHeader) { - .response_code = SCREENSHOT_OK, + const ScreenshotHeader header = (const ScreenshotHeader){ + .response_code = SCREENSHOT_OK, #if CONFIG_SCREEN_COLOR_DEPTH_BITS == 1 - .version = htonl(1), + .version = htonl(1), #elif CONFIG_SCREEN_COLOR_DEPTH_BITS == 8 - .version = htonl(2), + .version = htonl(2), #else #warning "Need CONFIG_SCREEN_COLOR_DEPTH_BITS for screenshot version." #endif - .width = htonl(state->framebuffer.width), - .height = htonl(state->framebuffer.height), + .width = htonl(state->framebuffer.width), + .height = htonl(state->framebuffer.height), }; - comm_session_send_buffer_write(sb, (const uint8_t *) &header, sizeof(header)); + comm_session_send_buffer_write(sb, (const uint8_t *)&header, sizeof(header)); // Fill the rest of this packet with image data. comm_session_send_buffer_write(sb, buffer, len); @@ -196,7 +195,8 @@ void screenshot_send_next_chunk(void* raw_state) { system_task_add_callback(screenshot_send_next_chunk, state); } -void screenshot_protocol_msg_callback(CommSession *session, const uint8_t* msg_data, unsigned int msg_len) { +void screenshot_protocol_msg_callback(CommSession *session, const uint8_t *msg_data, + unsigned int msg_len) { uint8_t sub_command = msg_data[0]; if (sub_command != 0x00) { PBL_LOG_ERR("first byte can't be %u", sub_command); @@ -206,8 +206,9 @@ void screenshot_protocol_msg_callback(CommSession *session, const uint8_t* msg_d if (s_screenshot_in_progress) { PBL_LOG_ERR("Screenshot already in progress."); - // Use a low timeout, if we are already in screenshot_send_next_chunk with the send buffer locked, then this - // would block for a long time, causing the comm_protocol_dispatch_message()'s 150ms max timeout to trip. + // Use a low timeout, if we are already in screenshot_send_next_chunk with the send buffer + // locked, then this would block for a long time, causing the comm_protocol_dispatch_message()'s + // 150ms max timeout to trip. prv_send_error_response(session, SCREENSHOT_ALREADY_IN_PROGRESS); return; } @@ -217,16 +218,17 @@ void screenshot_protocol_msg_callback(CommSession *session, const uint8_t* msg_d compositor_freeze(); - s_screenshot_state = (ScreenshotState) { - .session = session, - .framebuffer = (FrameBufferState) { - .fb = compositor_get_framebuffer(), - .row = 0, - .col = 0, - .width = DISP_COLS, - .height = DISP_ROWS, - }, - .sent_header = false, + s_screenshot_state = (ScreenshotState){ + .session = session, + .framebuffer = + (FrameBufferState){ + .fb = compositor_get_framebuffer(), + .row = 0, + .col = 0, + .width = DISP_COLS, + .height = DISP_ROWS, + }, + .sent_header = false, }; screenshot_send_next_chunk(&s_screenshot_state); diff --git a/src/fw/services/contacts/attributes_address.c b/src/fw/services/contacts/attributes_address.c index e1017a755c..21ef22aee8 100644 --- a/src/fw/services/contacts/attributes_address.c +++ b/src/fw/services/contacts/attributes_address.c @@ -5,83 +5,43 @@ #include "pbl/services/timeline/attribute_group.h" - #define GROUP_TYPE AttributeGroupType_Address -bool attributes_address_parse_serial_data(uint8_t num_attributes, - uint8_t num_addresses, - const uint8_t *data, - size_t size, +bool attributes_address_parse_serial_data(uint8_t num_attributes, uint8_t num_addresses, + const uint8_t *data, size_t size, size_t *string_alloc_size_out, uint8_t *attributes_per_address_out) { - - return attribute_group_parse_serial_data(GROUP_TYPE, - num_attributes, - num_addresses, - data, - size, - string_alloc_size_out, - attributes_per_address_out); + return attribute_group_parse_serial_data(GROUP_TYPE, num_attributes, num_addresses, data, size, + string_alloc_size_out, attributes_per_address_out); } -size_t attributes_address_get_buffer_size(uint8_t num_attributes, - uint8_t num_addresses, +size_t attributes_address_get_buffer_size(uint8_t num_attributes, uint8_t num_addresses, const uint8_t *attributes_per_address, size_t required_size_for_strings) { - - return attribute_group_get_required_buffer_size(GROUP_TYPE, - num_attributes, - num_addresses, - attributes_per_address, - required_size_for_strings); + return attribute_group_get_required_buffer_size( + GROUP_TYPE, num_attributes, num_addresses, attributes_per_address, required_size_for_strings); } -void attributes_address_init(AttributeList *attr_list, - AddressList *addr_list, - uint8_t **buffer, - uint8_t num_attributes, - uint8_t num_addresses, +void attributes_address_init(AttributeList *attr_list, AddressList *addr_list, uint8_t **buffer, + uint8_t num_attributes, uint8_t num_addresses, const uint8_t *attributes_per_address) { - - attribute_group_init(GROUP_TYPE, - attr_list, - addr_list, - buffer, - num_attributes, - num_addresses, + attribute_group_init(GROUP_TYPE, attr_list, addr_list, buffer, num_attributes, num_addresses, attributes_per_address); } -bool attributes_address_deserialize(AttributeList *attr_list, - AddressList *addr_list, - uint8_t *buffer, - uint8_t *buf_end, - const uint8_t *payload, +bool attributes_address_deserialize(AttributeList *attr_list, AddressList *addr_list, + uint8_t *buffer, uint8_t *buf_end, const uint8_t *payload, size_t payload_size) { - - return attribute_group_deserialize(GROUP_TYPE, - attr_list, - addr_list, - buffer, - buf_end, - payload, + return attribute_group_deserialize(GROUP_TYPE, attr_list, addr_list, buffer, buf_end, payload, payload_size); } size_t attributes_address_get_serialized_payload_size(AttributeList *attr_list, AddressList *addr_list) { - return attribute_group_get_serialized_payload_size(GROUP_TYPE, - attr_list, - addr_list); + return attribute_group_get_serialized_payload_size(GROUP_TYPE, attr_list, addr_list); } -size_t attributes_address_serialize_payload(AttributeList *attr_list, - AddressList *addr_list, - uint8_t *buffer, - size_t buffer_size) { - return attribute_group_serialize_payload(GROUP_TYPE, - attr_list, - addr_list, - buffer, - buffer_size); +size_t attributes_address_serialize_payload(AttributeList *attr_list, AddressList *addr_list, + uint8_t *buffer, size_t buffer_size) { + return attribute_group_serialize_payload(GROUP_TYPE, attr_list, addr_list, buffer, buffer_size); } diff --git a/src/fw/services/contacts/contacts.c b/src/fw/services/contacts/contacts.c index 0584ef17fe..41351f08bb 100644 --- a/src/fw/services/contacts/contacts.c +++ b/src/fw/services/contacts/contacts.c @@ -7,7 +7,7 @@ #include "pbl/services/blob_db/contacts_db.h" #include -static Contact* prv_deserialize_contact(SerializedContact *serialized_contact, +static Contact *prv_deserialize_contact(SerializedContact *serialized_contact, const size_t serialized_contact_data_len) { if (serialized_contact_data_len == 0 || serialized_contact == NULL) { return NULL; @@ -15,39 +15,29 @@ static Contact* prv_deserialize_contact(SerializedContact *serialized_contact, size_t string_alloc_size; uint8_t attributes_per_address[serialized_contact->num_addresses]; - bool r = attributes_address_parse_serial_data(serialized_contact->num_attributes, - serialized_contact->num_addresses, - serialized_contact->data, - serialized_contact_data_len, - &string_alloc_size, - attributes_per_address); + bool r = attributes_address_parse_serial_data( + serialized_contact->num_attributes, serialized_contact->num_addresses, + serialized_contact->data, serialized_contact_data_len, &string_alloc_size, + attributes_per_address); if (!r) { return NULL; } - const size_t alloc_size = attributes_address_get_buffer_size(serialized_contact->num_attributes, - serialized_contact->num_addresses, - attributes_per_address, - string_alloc_size); + const size_t alloc_size = attributes_address_get_buffer_size( + serialized_contact->num_attributes, serialized_contact->num_addresses, attributes_per_address, + string_alloc_size); Contact *contact = kernel_zalloc_check(sizeof(Contact) + alloc_size); uint8_t *buffer = (uint8_t *)contact + sizeof(Contact); uint8_t *const buf_end = buffer + alloc_size; - attributes_address_init(&contact->attr_list, - &contact->addr_list, - &buffer, - serialized_contact->num_attributes, - serialized_contact->num_addresses, + attributes_address_init(&contact->attr_list, &contact->addr_list, &buffer, + serialized_contact->num_attributes, serialized_contact->num_addresses, attributes_per_address); - if (!attributes_address_deserialize(&contact->attr_list, - &contact->addr_list, - buffer, - buf_end, - serialized_contact->data, - serialized_contact_data_len)) { + if (!attributes_address_deserialize(&contact->attr_list, &contact->addr_list, buffer, buf_end, + serialized_contact->data, serialized_contact_data_len)) { kernel_free(contact); return NULL; } @@ -57,10 +47,10 @@ static Contact* prv_deserialize_contact(SerializedContact *serialized_contact, return contact; } -Contact* contacts_get_contact_by_uuid(const Uuid *uuid) { +Contact *contacts_get_contact_by_uuid(const Uuid *uuid) { SerializedContact *serialized_contact = NULL; - const int serialized_contact_data_len = contacts_db_get_serialized_contact(uuid, - &serialized_contact); + const int serialized_contact_data_len = + contacts_db_get_serialized_contact(uuid, &serialized_contact); Contact *contact = prv_deserialize_contact(serialized_contact, serialized_contact_data_len); diff --git a/src/fw/services/cron/service.c b/src/fw/services/cron/service.c index 88b7d1d6ce..56a2bbbc88 100644 --- a/src/fw/services/cron/service.c +++ b/src/fw/services/cron/service.c @@ -19,7 +19,7 @@ static PBL_MUTEX_DEFINE(s_list_mutex); // List of jobs sorted from soonest to farthest. static ListNode *s_scheduled_jobs; -static void prv_timer_callback(void* data); +static void prv_timer_callback(void *data); //! One-shot timer armed for the next job's execute time. Re-armed after every //! list mutation and every firing; stopped when no jobs are scheduled. Capped @@ -54,17 +54,17 @@ static bool prv_is_scheduled(CronJob *job) { } static int prv_sort(void *a, void *b) { - CronJob *job_a = (CronJob*)a; - CronJob *job_b = (CronJob*)b; + CronJob *job_a = (CronJob *)a; + CronJob *job_b = (CronJob *)b; return job_b->cached_execute_time - job_a->cached_execute_time; } // ------------------------------------------------------------------------------------------- -static void prv_timer_callback(void* data) { +static void prv_timer_callback(void *data) { pbl_mutex_lock(&s_list_mutex, PBL_FOREVER); while (s_scheduled_jobs != NULL && - ((CronJob*)s_scheduled_jobs)->cached_execute_time <= rtc_get_time()) { - CronJob *job = (CronJob*)s_scheduled_jobs; + ((CronJob *)s_scheduled_jobs)->cached_execute_time <= rtc_get_time()) { + CronJob *job = (CronJob *)s_scheduled_jobs; // Remove the job from the list, it's done. s_scheduled_jobs = list_pop_head(s_scheduled_jobs); @@ -87,7 +87,7 @@ void cron_service_handle_clock_change(PebbleSetTimeEvent *set_time_info) { // Need to re-build the list somewhere else ListNode *newlist = NULL; while (s_scheduled_jobs != NULL) { - CronJob* job = (CronJob*)s_scheduled_jobs; + CronJob *job = (CronJob *)s_scheduled_jobs; s_scheduled_jobs = list_pop_head(s_scheduled_jobs); // Re-calculate the execute time. // See the notes in the API header on how this works. @@ -128,7 +128,7 @@ time_t cron_job_schedule(CronJob *job) { s_scheduled_jobs = list_sorted_add(s_scheduled_jobs, &job->list_node, prv_sort, true); } PBL_LOG_DBG("Cron job scheduled for %ld (%+ld)", job->cached_execute_time, - (job->cached_execute_time - now)); + (job->cached_execute_time - now)); prv_arm_wakeup(); pbl_mutex_unlock(&s_list_mutex); @@ -186,7 +186,6 @@ bool cron_job_unschedule(CronJob *job) { return removed; } - // --------------------------------------------------------------------------------------- // For Testing: @@ -194,8 +193,8 @@ void cron_clear_all_jobs(void) { pbl_mutex_lock(&s_list_mutex, PBL_FOREVER); // Iterate over all the jobs to remove them all. - for (ListNode* iter = s_scheduled_jobs; iter != NULL; ) { - CronJob* job = (CronJob*)iter; + for (ListNode *iter = s_scheduled_jobs; iter != NULL;) { + CronJob *job = (CronJob *)iter; iter = list_get_next(iter); // Remove the job from the list. list_remove(&job->list_node, NULL, NULL); @@ -227,8 +226,8 @@ void cron_service_wakeup(void) { // --------------------------------------------------------------------------------------- // The brains. typedef enum { - CronAssignMode_LocalEpoch, // 'any' uses local epoch's value - CronAssignMode_Zero, // 'any' uses 0 + CronAssignMode_LocalEpoch, // 'any' uses local epoch's value + CronAssignMode_Zero, // 'any' uses 0 } CronAssignMode; // Indices for the access arrays @@ -272,7 +271,7 @@ static bool prv_adjust_for_wday_spec(const CronJob *cron, struct tm *cron_tm) { bool adjusted = false; // We need to update cron_tm's tm_wday for proper checking. - cron_tm->tm_mday += 1; // Adjustment because struct tm has mday 1-indexed for whatever reason + cron_tm->tm_mday += 1; // Adjustment because struct tm has mday 1-indexed for whatever reason mktime(cron_tm); cron_tm->tm_mday -= 1; // We have 1 week to find a fitting date @@ -310,50 +309,42 @@ static time_t prv_get_execute_time_from_epoch(const CronJob *job, time_t local_e // Access everything as arrays because it's way easier that way. int *dest_arr[CRON_INDEX_COUNT] = { - &cron_tm.tm_year, - &cron_tm.tm_mon, - &cron_tm.tm_mday, - &cron_tm.tm_hour, - &cron_tm.tm_min, - &cron_tm.tm_sec, + &cron_tm.tm_year, &cron_tm.tm_mon, &cron_tm.tm_mday, + &cron_tm.tm_hour, &cron_tm.tm_min, &cron_tm.tm_sec, }; const int curr_arr[CRON_INDEX_COUNT] = { - current_tm.tm_year, - current_tm.tm_mon, - current_tm.tm_mday, - current_tm.tm_hour, - current_tm.tm_min, - current_tm.tm_sec, + current_tm.tm_year, current_tm.tm_mon, current_tm.tm_mday, + current_tm.tm_hour, current_tm.tm_min, current_tm.tm_sec, }; const int spec_arr[CRON_INDEX_COUNT] = { - CRON_YEAR_ANY, // year should always default - job->month, - job->mday, - job->hour, - job->minute, - // If can be instant, second should default. - // If it can't, use 0 because it's less than 1. - job->may_be_instant ? CRON_SECOND_ANY : 0, + CRON_YEAR_ANY, // year should always default + job->month, + job->mday, + job->hour, + job->minute, + // If can be instant, second should default. + // If it can't, use 0 because it's less than 1. + job->may_be_instant ? CRON_SECOND_ANY : 0, }; -/* -This is where the actual date finding is done. Essentially, we start with setting the result to -the local epoch, and modify from there. + /* + This is where the actual date finding is done. Essentially, we start with setting the result to + the local epoch, and modify from there. -We iterate over the fields from most significant to least significant. The reasoning for this is -that we will only know how to properly adjust a less significant field based on the value of the -more significant fields. + We iterate over the fields from most significant to least significant. The reasoning for this is + that we will only know how to properly adjust a less significant field based on the value of the + more significant fields. -When a field in the spec is marked as ANY (-1), we need to decide what to put in the result: - - If all values so far are still the same as the local epoch, we will use the local epoch's - value. - - Otherwise, the value stored will be 0, because the result is in the future, so a value of 0 - will definitely be the soonest time that matches. + When a field in the spec is marked as ANY (-1), we need to decide what to put in the result: + - If all values so far are still the same as the local epoch, we will use the local epoch's + value. + - Otherwise, the value stored will be 0, because the result is in the future, so a value of 0 + will definitely be the soonest time that matches. -Now, if the result is behind the local epoch, we step through higher order fields for a field -that was not specified. When we find one, we increase the value by 1. Since this is a higher -order field, this is guaranteed to put the result ahead of the local epoch. -*/ + Now, if the result is behind the local epoch, we step through higher order fields for a field + that was not specified. When we find one, we increase the value by 1. Since this is a higher + order field, this is guaranteed to put the result ahead of the local epoch. + */ // 'any' assignment defaults to using the local epoch's values. CronAssignMode assign_mode = CronAssignMode_LocalEpoch; @@ -370,7 +361,7 @@ order field, this is guaranteed to put the result ahead of the local epoch. *(dest_arr[i]) = 0; break; } - } else { // Otherwise, use the spec's value. + } else { // Otherwise, use the spec's value. *(dest_arr[i]) = spec_arr[i]; } @@ -416,7 +407,7 @@ order field, this is guaranteed to put the result ahead of the local epoch. // Decide the DSTny (Adjust for DST transitions) cron_tm.tm_gmtoff = time_get_gmtoffset(); - cron_tm.tm_isdst = 0; // We'll do the DST adjust ourselves + cron_tm.tm_isdst = 0; // We'll do the DST adjust ourselves time_t t = mktime(&cron_tm); // Apply offset seconds @@ -466,7 +457,6 @@ time_t cron_job_get_execute_time_from_epoch(const CronJob *job, time_t local_epo return t; } - time_t cron_job_get_execute_time(const CronJob *job) { return cron_job_get_execute_time_from_epoch(job, rtc_get_time()); } diff --git a/src/fw/services/data_logging/dls_command.c b/src/fw/services/data_logging/dls_command.c index 081a8025b0..8c846911d1 100644 --- a/src/fw/services/data_logging/dls_command.c +++ b/src/fw/services/data_logging/dls_command.c @@ -11,9 +11,10 @@ static bool command_dls_list_cb(DataLoggingSession *session, void *data) { char buffer[80]; prompt_send_response_fmt(buffer, sizeof(buffer), - "session_id : %"PRIu8", tag: %"PRIu32", bytes: %"PRIu32", write_offset: %"PRIu32, - session->comm.session_id, session->tag, session->storage.num_bytes, - session->storage.write_offset); + "session_id : %" PRIu8 ", tag: %" PRIu32 ", bytes: %" PRIu32 + ", write_offset: %" PRIu32, + session->comm.session_id, session->tag, session->storage.num_bytes, + session->storage.write_offset); return true; } @@ -38,8 +39,7 @@ void command_dls_show(const char *id) { char buffer[80]; -#define WRITE_LINE(fmt, arg) \ - prompt_send_response_fmt(buffer, sizeof(buffer), fmt, arg) +#define WRITE_LINE(fmt, arg) prompt_send_response_fmt(buffer, sizeof(buffer), fmt, arg) WRITE_LINE("session_id %u", logging_session->comm.session_id); WRITE_LINE("uuid %s", uuid_b); diff --git a/src/fw/services/data_logging/dls_endpoint.c b/src/fw/services/data_logging/dls_endpoint.c index b25f52cb60..93bed6490f 100644 --- a/src/fw/services/data_logging/dls_endpoint.c +++ b/src/fw/services/data_logging/dls_endpoint.c @@ -46,13 +46,13 @@ typedef struct PACKED { } DataLoggingCloseSessionMessage; typedef struct PACKED { - uint8_t command; - uint8_t session_id; - Uuid app_uuid; - uint32_t timestamp; - uint32_t logging_session_tag; - DataLoggingItemType data_item_type:8; - uint16_t data_item_size; + uint8_t command; + uint8_t session_id; + Uuid app_uuid; + uint32_t timestamp; + uint32_t logging_session_tag; + DataLoggingItemType data_item_type : 8; + uint16_t data_item_size; } DataLoggingOpenSessionMessage; static const uint16_t ENDPOINT_ID_DATA_LOGGING = 0x1a7a; @@ -72,18 +72,18 @@ static uint8_t s_unexpected_nacks = 0; static void reschedule_ack_timeout(void); static void update_session_state(DataLoggingSession *session, DataLoggingSessionCommState new_state, - bool reschedule) { + bool reschedule) { session->comm.state = new_state; switch (new_state) { - case DataLoggingSessionCommStateOpening: - case DataLoggingSessionCommStateSending: - // These states need an ack from the phone. - session->comm.ack_timeout = rtc_get_ticks() + ACK_NACK_TIMEOUT_TICKS; - break; - case DataLoggingSessionCommStateIdle: - session->comm.ack_timeout = 0; - break; + case DataLoggingSessionCommStateOpening: + case DataLoggingSessionCommStateSending: + // These states need an ack from the phone. + session->comm.ack_timeout = rtc_get_ticks() + ACK_NACK_TIMEOUT_TICKS; + break; + case DataLoggingSessionCommStateIdle: + session->comm.ack_timeout = 0; + break; } if (reschedule) { @@ -105,23 +105,23 @@ static void send_timeout_msg(void *session_id_param) { uint8_t command; uint8_t session_id; } msg = { - .command = DataLoggingEndpointCmdTimeout, - .session_id = logging_session->comm.session_id, + .command = DataLoggingEndpointCmdTimeout, + .session_id = logging_session->comm.session_id, }; - comm_session_send_data(session, ENDPOINT_ID_DATA_LOGGING, (uint8_t *)&msg, - sizeof(msg), COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(session, ENDPOINT_ID_DATA_LOGGING, (uint8_t *)&msg, sizeof(msg), + COMM_SESSION_DEFAULT_TIMEOUT); } static bool check_ack_timeout_for_session(DataLoggingSession *session, void *data) { - RtcTicks *current_ticks = (RtcTicks*) data; + RtcTicks *current_ticks = (RtcTicks *)data; if (session->comm.ack_timeout != 0 && session->comm.ack_timeout <= *current_ticks) { - PBL_LOG_DBG("session %"PRIu8" timeout", session->comm.session_id); + PBL_LOG_DBG("session %" PRIu8 " timeout", session->comm.session_id); // Send timeout msg from system task because it could take a while and also require // more stack space than provided by the timer task. - system_task_add_callback(send_timeout_msg, (void*)(uintptr_t)(session->comm.session_id)); + system_task_add_callback(send_timeout_msg, (void *)(uintptr_t)(session->comm.session_id)); // Set reschedule to false because: 1.) we don't need to reschedule the timer since all // we did was process one that already expired, 2.) it can cause an infinite recursion @@ -154,9 +154,9 @@ static void ack_timer_cb(void *cb_data) { } static bool find_soonest_ack_timeout_cb(DataLoggingSession *session, void *data) { - RtcTicks *soonest_ack_timeout = (RtcTicks*) data; - if (session->comm.ack_timeout != 0 - && (session->comm.ack_timeout < *soonest_ack_timeout || *soonest_ack_timeout == 0)) { + RtcTicks *soonest_ack_timeout = (RtcTicks *)data; + if (session->comm.ack_timeout != 0 && + (session->comm.ack_timeout < *soonest_ack_timeout || *soonest_ack_timeout == 0)) { *soonest_ack_timeout = session->comm.ack_timeout; } return true; @@ -174,17 +174,18 @@ static void reschedule_ack_timeout(void) { RtcTicks current_ticks = rtc_get_ticks(); if (soonest_ack_timeout < current_ticks) { - // Handle the timeout immediately. This will result the in the timer being rescheduled if we're still - // waiting for an ack. + // Handle the timeout immediately. This will result the in the timer being rescheduled if we're + // still waiting for an ack. check_ack_timeout(); return; } // Convert from ticks to ms for the timer RtcTicks ticks_until_timeout = soonest_ack_timeout - current_ticks; - uint32_t ms_until_timeout = ((uint64_t) ticks_until_timeout * 1000) / RTC_TICKS_HZ; + uint32_t ms_until_timeout = ((uint64_t)ticks_until_timeout * 1000) / RTC_TICKS_HZ; - bool success = new_timer_start(s_endpoint_data.ack_timer, ms_until_timeout, ack_timer_cb, NULL, 0 /*flags*/); + bool success = + new_timer_start(s_endpoint_data.ack_timer, ms_until_timeout, ack_timer_cb, NULL, 0 /*flags*/); PBL_ASSERTN(success); } @@ -192,24 +193,24 @@ static void dls_endpoint_print_message(uint8_t *message, int num_bytes) { PBL_ASSERTN(message != NULL); switch (message[0]) { - case DataLoggingEndpointCmdClose: - { + case DataLoggingEndpointCmdClose: { DataLoggingCloseSessionMessage *msg = (DataLoggingCloseSessionMessage *)message; PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Closing session %d", msg->session_id); break; } - case DataLoggingEndpointCmdOpen: - { + case DataLoggingEndpointCmdOpen: { DataLoggingOpenSessionMessage *msg = (DataLoggingOpenSessionMessage *)message; - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Opening session %u with tag %"PRIu32", type %u, size %hu", - msg->session_id, msg->logging_session_tag, msg->data_item_type, msg->data_item_size); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, + "Opening session %u with tag %" PRIu32 ", type %u, size %hu", msg->session_id, + msg->logging_session_tag, msg->data_item_type, msg->data_item_size); break; } - case DataLoggingEndpointCmdData: - { + case DataLoggingEndpointCmdData: { DataLoggingSendDataMessage *msg = (DataLoggingSendDataMessage *)message; - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Sending data with session_id %"PRIu8", items remaining %"PRIu32", crc 0x%"PRIx32", num_bytes %d", - msg->session_id, msg->items_left_hereafter, msg->crc32, num_bytes); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, + "Sending data with session_id %" PRIu8 ", items remaining %" PRIu32 + ", crc 0x%" PRIx32 ", num_bytes %d", + msg->session_id, msg->items_left_hereafter, msg->crc32, num_bytes); break; } default: @@ -224,21 +225,21 @@ bool dls_endpoint_open_session(DataLoggingSession *session) { } DataLoggingOpenSessionMessage msg = { - .command = DataLoggingEndpointCmdOpen, - .session_id = session->comm.session_id, - .app_uuid = session->app_uuid, - .timestamp = session->session_created_timestamp, - .logging_session_tag = session->tag, - .data_item_type = session->item_type, - .data_item_size = session->item_size, + .command = DataLoggingEndpointCmdOpen, + .session_id = session->comm.session_id, + .app_uuid = session->app_uuid, + .timestamp = session->session_created_timestamp, + .logging_session_tag = session->tag, + .data_item_type = session->item_type, + .data_item_size = session->item_size, }; dls_endpoint_print_message((uint8_t *)&msg, 0); update_session_state(session, DataLoggingSessionCommStateOpening, true /*reschedule*/); - return (comm_session_send_data(comm_session, ENDPOINT_ID_DATA_LOGGING, - (uint8_t *)&msg, sizeof(DataLoggingOpenSessionMessage), + return (comm_session_send_data(comm_session, ENDPOINT_ID_DATA_LOGGING, (uint8_t *)&msg, + sizeof(DataLoggingOpenSessionMessage), COMM_SESSION_DEFAULT_TIMEOUT)); } @@ -249,15 +250,14 @@ void dls_endpoint_close_session(uint8_t session_id) { } DataLoggingCloseSessionMessage msg = { - .command = DataLoggingEndpointCmdClose, - .session_id = session_id, + .command = DataLoggingEndpointCmdClose, + .session_id = session_id, }; dls_endpoint_print_message((uint8_t *)&msg, 0); - comm_session_send_data(session, ENDPOINT_ID_DATA_LOGGING, - (uint8_t *)&msg, sizeof(DataLoggingCloseSessionMessage), - COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(session, ENDPOINT_ID_DATA_LOGGING, (uint8_t *)&msg, + sizeof(DataLoggingCloseSessionMessage), COMM_SESSION_DEFAULT_TIMEOUT); } bool dls_endpoint_send_data(DataLoggingSession *logging_session, const uint8_t *data, @@ -289,17 +289,17 @@ bool dls_endpoint_send_data(DataLoggingSession *logging_session, const uint8_t * return false; } - const DataLoggingSendDataMessage header = (const DataLoggingSendDataMessage) { - .command = DataLoggingEndpointCmdData, - .session_id = logging_session->comm.session_id, - .items_left_hereafter = 0xffff, // FIXME: logging_session->storage.num_bytes - num_bytes, - .crc32 = legacy_defective_checksum_memory(data, num_bytes), + const DataLoggingSendDataMessage header = (const DataLoggingSendDataMessage){ + .command = DataLoggingEndpointCmdData, + .session_id = logging_session->comm.session_id, + .items_left_hereafter = 0xffff, // FIXME: logging_session->storage.num_bytes - num_bytes, + .crc32 = legacy_defective_checksum_memory(data, num_bytes), }; - comm_session_send_buffer_write(sb, (const uint8_t *) &header, sizeof(header)); + comm_session_send_buffer_write(sb, (const uint8_t *)&header, sizeof(header)); comm_session_send_buffer_write(sb, data, num_bytes); comm_session_send_buffer_end_write(sb); - dls_endpoint_print_message((uint8_t *) &header, num_bytes); + dls_endpoint_print_message((uint8_t *)&header, num_bytes); DLS_HEXDUMP(data, MIN(num_bytes, 64)); logging_session->comm.num_bytes_pending = num_bytes; @@ -314,13 +314,15 @@ bool dls_endpoint_send_data(DataLoggingSession *logging_session, const uint8_t * static void prv_dls_endpoint_handle_ack(uint8_t session_id) { DataLoggingSession *session = dls_list_find_by_session_id(session_id); if (session == NULL) { - PBL_LOG_D_WRN(LOG_DOMAIN_DATA_LOGGING, "Received ack for non-existent session id: %"PRIu8, session_id); + PBL_LOG_D_WRN(LOG_DOMAIN_DATA_LOGGING, "Received ack for non-existent session id: %" PRIu8, + session_id); return; } pbl_mutex_lock(&s_endpoint_data.mutex, PBL_FOREVER); - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Received ACK for id: %"PRIu8" state: %u", session->comm.session_id, session->comm.state); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Received ACK for id: %" PRIu8 " state: %u", + session->comm.session_id, session->comm.state); switch (session->comm.state) { case DataLoggingSessionCommStateIdle: @@ -350,11 +352,12 @@ static void prv_dls_endpoint_handle_ack(uint8_t session_id) { } static void prv_dls_endpoint_handle_nack(uint8_t session_id) { - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Received NACK for id: %"PRIu8, session_id); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Received NACK for id: %" PRIu8, session_id); DataLoggingSession *logging_session = dls_list_find_by_session_id(session_id); if (!logging_session) { - PBL_LOG_D_WRN(LOG_DOMAIN_DATA_LOGGING, "Received nack for non-existent session id: %"PRIu8, session_id); + PBL_LOG_D_WRN(LOG_DOMAIN_DATA_LOGGING, "Received nack for non-existent session id: %" PRIu8, + session_id); return; } @@ -362,7 +365,7 @@ static void prv_dls_endpoint_handle_nack(uint8_t session_id) { switch (logging_session->comm.state) { case DataLoggingSessionCommStateIdle: case DataLoggingSessionCommStateOpening: - //Currently, these messages never get NACK'd + // Currently, these messages never get NACK'd PBL_LOG_ERR("Unexpected NACK"); if (s_unexpected_nacks < MAX_UNEXPECTED_NACK_COUNT) { s_unexpected_nacks++; @@ -372,7 +375,7 @@ static void prv_dls_endpoint_handle_nack(uint8_t session_id) { } break; case DataLoggingSessionCommStateSending: - //Maybe queue a resend + // Maybe queue a resend logging_session->comm.num_bytes_pending = 0; if (++logging_session->comm.nack_count > MAX_NACK_COUNT) { PBL_LOG_ERR("Too many nacks. Flushing..."); @@ -392,8 +395,9 @@ static void prv_dls_endpoint_handle_nack(uint8_t session_id) { } } -//! System task callback executed which reopens the next session in the list built up by report_cmd_system_task_cb -static void prv_reopen_next_session_system_task_cb(void* data) { +//! System task callback executed which reopens the next session in the list built up by +//! report_cmd_system_task_cb +static void prv_reopen_next_session_system_task_cb(void *data) { DataLoggingReopenEntry *entry = (DataLoggingReopenEntry *)data; if (!entry) { s_endpoint_data.report_in_progress = false; @@ -407,10 +411,9 @@ static void prv_reopen_next_session_system_task_cb(void* data) { uuid_equal(&entry->app_uuid, &entry->session->app_uuid) && entry->timestamp == entry->session->session_created_timestamp && entry->tag == entry->session->tag) { - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Reopening session %d", - entry->session->comm.session_id); - success = (dls_endpoint_open_session(entry->session) - && dls_private_send_session(entry->session, false)); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Reopening session %d", entry->session->comm.session_id); + success = (dls_endpoint_open_session(entry->session) && + dls_private_send_session(entry->session, false)); } else { // Session has disappeared between the time that the reopen list was // created and now. This ideally shouldn't happen, but there's a lot @@ -439,19 +442,21 @@ static void prv_reopen_next_session_system_task_cb(void* data) { } } -//! For use with dls_list_for_each_session. Appends this session to our list of sessions we need to open. -//! On entry, 'data' points to the variable holding the head of the list. +//! For use with dls_list_for_each_session. Appends this session to our list of sessions we need to +//! open. On entry, 'data' points to the variable holding the head of the list. static bool dls_endpoint_add_reopen_sessions_cb(DataLoggingSession *session, void *data) { DataLoggingReopenEntry **head_ptr = (DataLoggingReopenEntry **)data; DataLoggingReopenEntry *entry = kernel_malloc_check(sizeof(DataLoggingReopenEntry)); - *entry = (DataLoggingReopenEntry) { - .session = session, - .app_uuid = session->app_uuid, - .timestamp = session->session_created_timestamp, - .tag = session->tag, + *entry = (DataLoggingReopenEntry){ + .session = session, + .app_uuid = session->app_uuid, + .timestamp = session->session_created_timestamp, + .tag = session->tag, }; - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "adding session %d to reopen list", session->comm.session_id); - *head_ptr = (DataLoggingReopenEntry *)list_insert_before((ListNode *)(*head_ptr), &entry->list_node); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "adding session %d to reopen list", + session->comm.session_id); + *head_ptr = + (DataLoggingReopenEntry *)list_insert_before((ListNode *)(*head_ptr), &entry->list_node); return true; } @@ -469,8 +474,9 @@ static void prv_handle_report_cmd(const uint8_t *session_ids, size_t num_session } } - // If the bluetooth connection is flaky, a session reopen could take a few seconds, so we will chain them - // and only do 1 re-open per system callback so that we don't trigger a watchdog timeout. + // If the bluetooth connection is flaky, a session reopen could take a few seconds, so we will + // chain them and only do 1 re-open per system callback so that we don't trigger a watchdog + // timeout. DataLoggingReopenEntry *head = NULL; dls_list_for_each_session(dls_endpoint_add_reopen_sessions_cb, (void *)&head); @@ -480,8 +486,7 @@ static void prv_handle_report_cmd(const uint8_t *session_ids, size_t num_session //! Empty a session by session id static void prv_empty_session(uint8_t session_id) { - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Phone requested empty of session %u", - session_id); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Phone requested empty of session %u", session_id); DataLoggingSession *logging_session = dls_list_find_by_session_id(session_id); if (logging_session) { dls_private_send_session(logging_session, true /*empty_all_data*/); @@ -493,7 +498,7 @@ void data_logging_protocol_msg_callback(CommSession *session, const uint8_t *dat // consume the first byte to read the command uint8_t command = data[0]; - --length; // the length now reflects the sizeof the payload + --length; // the length now reflects the sizeof the payload // All commands from the phone have their high bit set. if ((command & ~DLS_ENDPOINT_CMD_MASK) == 0) { @@ -524,21 +529,19 @@ void data_logging_protocol_msg_callback(CommSession *session, const uint8_t *dat prv_empty_session(data[1]); break; - case (DataLoggingEndpointCmdGetSendEnableReq): - { - bool enabled = dls_get_send_enable(); - struct PACKED { - uint8_t command; - uint8_t enabled; - } msg = { + case (DataLoggingEndpointCmdGetSendEnableReq): { + bool enabled = dls_get_send_enable(); + struct PACKED { + uint8_t command; + uint8_t enabled; + } msg = { .command = DataLoggingEndpointCmdGetSendEnableRsp, .enabled = enabled, - }; + }; - comm_session_send_data(session, ENDPOINT_ID_DATA_LOGGING, (uint8_t *)&msg, - sizeof(msg), COMM_SESSION_DEFAULT_TIMEOUT); - } - break; + comm_session_send_data(session, ENDPOINT_ID_DATA_LOGGING, (uint8_t *)&msg, sizeof(msg), + COMM_SESSION_DEFAULT_TIMEOUT); + } break; case (DataLoggingEndpointCmdSetSendEnable): dls_set_send_enable_pp(data[1]); diff --git a/src/fw/services/data_logging/dls_list.c b/src/fw/services/data_logging/dls_list.c index 19cf1db7de..b36160def1 100644 --- a/src/fw/services/data_logging/dls_list.c +++ b/src/fw/services/data_logging/dls_list.c @@ -19,7 +19,6 @@ PBL_LOG_MODULE_DECLARE(service_data_logging, CONFIG_SERVICE_DATA_LOGGING_LOG_LEV static DataLoggingSession *s_logging_sessions; static PBL_MUTEX_DEFINE(s_list_mutex); - // --------------------------------------------------------------------------------------- // Assert that the current task owns the list mutex void dls_assert_own_list_mutex(void) { @@ -57,7 +56,6 @@ bool dls_lock_session(DataLoggingSession *session) { return true; } - // --------------------------------------------------------------------------------------- // Callback used to free a storage buffer from unprivileged mode. static void prv_free_storage_buffer_cb(void *p) { @@ -65,7 +63,6 @@ static void prv_free_storage_buffer_cb(void *p) { task_free(p); } - // --------------------------------------------------------------------------------------- static void prv_free_storage_buffer(DataLoggingSession *session) { if (!session->data->buffer_storage) { @@ -81,18 +78,14 @@ static void prv_free_storage_buffer(DataLoggingSession *session) { // watch. We will post a callback event to the process's event handler which is executed // in unprivileged mode. PebbleEvent e = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = prv_free_storage_buffer_cb, - .data = session->data->buffer_storage - } + .type = PEBBLE_CALLBACK_EVENT, + .callback = {.callback = prv_free_storage_buffer_cb, .data = session->data->buffer_storage} }; PebbleTask task = pebble_task_get_current(); process_manager_send_event_to_process(task, &e); } } - // --------------------------------------------------------------------------------------- // Unlock a session previous locked by dls_lock_session(). If inactive is true, this also marks // the session inactive and frees the memory used for maintaining the active state. See the @@ -130,7 +123,6 @@ DataLoggingStatus dls_get_session_status(DataLoggingSession *session) { return status; } - DataLoggingSession *dls_list_find_by_session_id(uint8_t session_id) { pbl_mutex_lock(&s_list_mutex, PBL_FOREVER); DataLoggingSession *iter = s_logging_sessions; @@ -153,8 +145,8 @@ DataLoggingSession *dls_list_find_active_session(uint32_t tag, const Uuid *app_u pbl_mutex_lock(&s_list_mutex, PBL_FOREVER); DataLoggingSession *iter = s_logging_sessions; while (iter != NULL) { - if (iter->tag == tag && uuid_equal(&(iter->app_uuid), app_uuid) - && iter->status == DataLoggingStatusActive) { + if (iter->tag == tag && uuid_equal(&(iter->app_uuid), app_uuid) && + iter->status == DataLoggingStatusActive) { pbl_mutex_unlock(&s_list_mutex); return (iter); } @@ -167,8 +159,7 @@ DataLoggingSession *dls_list_find_active_session(uint32_t tag, const Uuid *app_u void dls_list_remove_session(DataLoggingSession *logging_session) { if (uuid_is_system(&logging_session->app_uuid)) { - PBL_LOG_WRN("Deleting the system data logging session with tag %"PRIu32, - logging_session->tag); + PBL_LOG_WRN("Deleting the system data logging session with tag %" PRIu32, logging_session->tag); } pbl_mutex_lock(&s_list_mutex, PBL_FOREVER); @@ -228,8 +219,8 @@ void dls_list_insert_session(DataLoggingSession *logging_session) { logging_session->next = *iter; *iter = logging_session; - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Created session: %p id %"PRIu8 - " tag %"PRIu32, logging_session, logging_session->comm.session_id, logging_session->tag); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Created session: %p id %" PRIu8 " tag %" PRIu32, + logging_session, logging_session->comm.session_id, logging_session->tag); pbl_mutex_unlock(&s_list_mutex); } @@ -257,7 +248,7 @@ uint8_t dls_list_add_new_session(DataLoggingSession *logging_session) { } static bool count_session_cb(DataLoggingSession *session, void *data) { - uint32_t *counter = (uint32_t *) data; + uint32_t *counter = (uint32_t *)data; ++(*counter); return true; } @@ -269,8 +260,8 @@ static uint32_t prv_get_num_sessions(void) { } DataLoggingSession *dls_list_create_session(uint32_t tag, DataLoggingItemType type, uint16_t size, - const Uuid *app_uuid, time_t timestamp, DataLoggingStatus status) { - + const Uuid *app_uuid, time_t timestamp, + DataLoggingStatus status) { uint32_t num_sessions = prv_get_num_sessions(); if (num_sessions >= DLS_MAX_NUM_SESSIONS) { PBL_LOG_WRN("Could not allocate additional DataLoggingSession objects"); @@ -280,14 +271,14 @@ DataLoggingSession *dls_list_create_session(uint32_t tag, DataLoggingItemType ty DataLoggingSession *logging_session = kernel_malloc_check(sizeof(DataLoggingSession)); *logging_session = (DataLoggingSession){ - .status = status, - .app_uuid = *app_uuid, - .tag = tag, - .task = pebble_task_get_current(), - .item_type = type, - .item_size = size, - .session_created_timestamp = timestamp, - .storage.fd = DLS_INVALID_FILE + .status = status, + .app_uuid = *app_uuid, + .tag = tag, + .task = pebble_task_get_current(), + .item_type = type, + .item_size = size, + .session_created_timestamp = timestamp, + .storage.fd = DLS_INVALID_FILE }; if (status == DataLoggingStatusActive) { @@ -321,7 +312,7 @@ void dls_list_unlock(void) { pbl_mutex_unlock(&s_list_mutex); } -bool dls_list_for_each_session(bool (callback(DataLoggingSession*, void*)), void *data) { +bool dls_list_for_each_session(bool(callback(DataLoggingSession *, void *)), void *data) { pbl_mutex_lock(&s_list_mutex, PBL_FOREVER); DataLoggingSession *logging_session = s_logging_sessions; @@ -359,4 +350,3 @@ bool dls_list_is_session_valid(DataLoggingSession *logging_session) { return false; } - diff --git a/src/fw/services/data_logging/dls_main.c b/src/fw/services/data_logging/dls_main.c index 2344a0b8d8..304712cf77 100644 --- a/src/fw/services/data_logging/dls_main.c +++ b/src/fw/services/data_logging/dls_main.c @@ -37,7 +37,6 @@ static bool s_sends_enabled_run_level = true; #define DATALOGGING_DO_FLUSH_CHECK_INTERVAL_MINUTES 5 - static bool prv_sends_enabled(void) { return (s_sends_enabled_run_level && s_sends_enabled_pp); } @@ -73,15 +72,14 @@ static bool prv_add_send_entry_cb(DataLoggingSession *session, void *data) { PBL_LOG_WRN("OOM building DLS flush list; truncating pass"); return false; } - *entry = (DataLoggingSendEntry) { - .session = session, - .app_uuid = session->app_uuid, - .timestamp = session->session_created_timestamp, - .tag = session->tag, - .empty = ctx->empty, + *entry = (DataLoggingSendEntry){ + .session = session, + .app_uuid = session->app_uuid, + .timestamp = session->session_created_timestamp, + .tag = session->tag, + .empty = ctx->empty, }; - ctx->head = (DataLoggingSendEntry *)list_insert_before((ListNode *)ctx->head, - &entry->list_node); + ctx->head = (DataLoggingSendEntry *)list_insert_before((ListNode *)ctx->head, &entry->list_node); return true; } @@ -100,8 +98,7 @@ static void prv_send_next_session_system_task_cb(void *data) { return; } - DataLoggingSendEntry *new_head = - (DataLoggingSendEntry *)list_pop_head((ListNode *)entry); + DataLoggingSendEntry *new_head = (DataLoggingSendEntry *)list_pop_head((ListNode *)entry); // The session may have been freed between snapshot and now; the identity // tuple guards against the pointer being reused for a different session. @@ -132,8 +129,8 @@ static void prv_send_all_sessions_system_task_cb(void *empty_all_data) { } DataLoggingSendBuildCtx ctx = { - .head = NULL, - .empty = (bool)(uintptr_t)empty_all_data, + .head = NULL, + .empty = (bool)(uintptr_t)empty_all_data, }; dls_list_for_each_session(prv_add_send_entry_cb, &ctx); @@ -145,7 +142,6 @@ static void prv_send_all_sessions_system_task_cb(void *empty_all_data) { prv_send_next_session_system_task_cb(ctx.head); } - // ---------------------------------------------------------------------------------------- //! @param data unused static void prv_check_all_sessions_timer_cb(void *data) { @@ -162,12 +158,11 @@ static void prv_check_all_sessions_timer_cb(void *data) { static int check_counter = 0; PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "send all sessions: empty %s connected %s counter %u", - bool_to_str(check_counter == 0), - bool_to_str(comm_session_get_system_session() != NULL), - check_counter); + bool_to_str(check_counter == 0), + bool_to_str(comm_session_get_system_session() != NULL), check_counter); system_task_add_callback(prv_send_all_sessions_system_task_cb, - (void*)(uintptr_t)(check_counter == 0)); + (void *)(uintptr_t)(check_counter == 0)); // force a flush every 15 minutes static const int EMPTY_ALL_SESSIONS_INTERVAL_MINUTES = @@ -175,19 +170,14 @@ static void prv_check_all_sessions_timer_cb(void *data) { check_counter = (check_counter + 1) % EMPTY_ALL_SESSIONS_INTERVAL_MINUTES; } - // ---------------------------------------------------------------------------------------- -static RegularTimerInfo prv_check_all_sessions_timer_info = { - .cb = prv_check_all_sessions_timer_cb -}; - +static RegularTimerInfo prv_check_all_sessions_timer_info = {.cb = prv_check_all_sessions_timer_cb}; // ---------------------------------------------------------------------------------------- static void prv_remove_logging_session(DataLoggingSession *data) { DataLoggingSession *logging_session = (DataLoggingSession *)data; - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Removing session %d.", - logging_session->comm.session_id); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Removing session %d.", logging_session->comm.session_id); dls_endpoint_close_session(logging_session->comm.session_id); dls_storage_delete_logging_storage(logging_session); @@ -214,16 +204,17 @@ bool dls_private_send_session(DataLoggingSession *logging_session, bool empty) { int32_t total_bytes = logging_session->storage.num_bytes; bool inactive = (dls_get_session_status(logging_session) == DataLoggingStatusInactive); - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "de-logging session %"PRIu8", tag %"PRIu32 - " (inactive %s tot_bytes %"PRIu32" empty %s)", - logging_session->comm.session_id, logging_session->tag, - bool_to_str(inactive), total_bytes, bool_to_str(empty)); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, + "de-logging session %" PRIu8 ", tag %" PRIu32 " (inactive %s tot_bytes %" PRIu32 + " empty %s)", + logging_session->comm.session_id, logging_session->tag, bool_to_str(inactive), + total_bytes, bool_to_str(empty)); if (inactive && (total_bytes == 0)) { prv_remove_logging_session(logging_session); return true; } else if (!empty && !inactive && (total_bytes < 8000)) { - return true; // nothing to flush yet + return true; // nothing to flush yet } bool success = false; @@ -254,20 +245,17 @@ bool dls_private_send_session(DataLoggingSession *logging_session, bool empty) { return (success); } - // ---------------------------------------------------------------------------------------- void dls_pause(void) { regular_timer_remove_callback(&prv_check_all_sessions_timer_info); } - // ---------------------------------------------------------------------------------------- void dls_resume(void) { regular_timer_add_multiminute_callback(&prv_check_all_sessions_timer_info, DATALOGGING_DO_FLUSH_CHECK_INTERVAL_MINUTES); } - // ---------------------------------------------------------------------------------------- void dls_init(void) { dls_endpoint_init(); @@ -281,27 +269,23 @@ void dls_init(void) { s_initialized = true; } - // ---------------------------------------------------------------------------------------- bool dls_initialized(void) { return s_initialized; } - // ---------------------------------------------------------------------------------------- void dls_clear(void) { dls_list_remove_all(); dls_storage_invalidate_all(); } - // ---------------------------------------------------------------------------------------- // Get the send_enable setting bool dls_get_send_enable(void) { return prv_sends_enabled(); } - // ---------------------------------------------------------------------------------------- // Set the send_enable setting void dls_set_send_enable_pp(bool setting) { @@ -314,7 +298,6 @@ void dls_set_send_enable_run_level(bool setting) { s_sends_enabled_run_level = setting; } - // ---------------------------------------------------------------------------------------- // Callback used by dls_inactivate_sessions. static bool prv_inactivate_sessions_each_cb(DataLoggingSession *session, void *data) { @@ -333,8 +316,8 @@ static bool prv_inactivate_sessions_each_cb(DataLoggingSession *session, void *d Uuid system_uuid = UUID_SYSTEM; if (!uuid_equal(&session->app_uuid, &system_uuid)) { if (task == session->task) { - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Inactivating session: %"PRIu8, - session->comm.session_id); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Inactivating session: %" PRIu8, + session->comm.session_id); // Free the buffer if it's in kernel heap. If not in kernel heap we are intentionally not // freeing the data->buffer_storage because it was allocated on the client's heap, and the @@ -358,7 +341,6 @@ static bool prv_inactivate_sessions_each_cb(DataLoggingSession *session, void *d return true; } - // ---------------------------------------------------------------------------------------- void dls_send_all_sessions(void) { // If sends are not enabled, do nothing @@ -366,10 +348,9 @@ void dls_send_all_sessions(void) { PBL_LOG_INFO("Not sending sessions because sending is disabled"); return; } - system_task_add_callback(prv_send_all_sessions_system_task_cb, (void*) true); + system_task_add_callback(prv_send_all_sessions_system_task_cb, (void *)true); } - // ---------------------------------------------------------------------------------------- // Mark all sessions belonging to 'task' as inactive so that no more data can be added to them. // They will only be deleted after the endpoint finishes sending the data to the mobile. @@ -377,14 +358,13 @@ void dls_inactivate_sessions(PebbleTask task) { dls_list_for_each_session(prv_inactivate_sessions_each_cb, (void *)(uintptr_t)task); } - // ---------------------------------------------------------------------------------------- static DataLoggingSession *prv_dls_create(uint32_t tag, DataLoggingItemType item_type, uint16_t item_size, bool buffered, void *buffer, - bool resume, const Uuid* uuid) { + bool resume, const Uuid *uuid) { // validate size parameter - if (item_size == 0 || (buffered && item_size > DLS_SESSION_MAX_BUFFERED_ITEM_SIZE) - || (!buffered && item_size > DLS_ENDPOINT_MAX_PAYLOAD)) { + if (item_size == 0 || (buffered && item_size > DLS_SESSION_MAX_BUFFERED_ITEM_SIZE) || + (!buffered && item_size > DLS_ENDPOINT_MAX_PAYLOAD)) { PBL_LOG_ERR("invalid logging_session item size, %d", item_size); return (NULL); } else if (item_type == DATA_LOGGING_UINT || item_type == DATA_LOGGING_INT) { @@ -443,22 +423,19 @@ static DataLoggingSession *prv_dls_create(uint32_t tag, DataLoggingItemType item return (logging_session); } - // ---------------------------------------------------------------------------------------- -DataLoggingSession* dls_create(uint32_t tag, DataLoggingItemType item_type, uint16_t item_size, - bool buffered, bool resume, const Uuid* uuid) { +DataLoggingSession *dls_create(uint32_t tag, DataLoggingItemType item_type, uint16_t item_size, + bool buffered, bool resume, const Uuid *uuid) { return prv_dls_create(tag, item_type, item_size, buffered, NULL /*buffer*/, resume, uuid); } - // ---------------------------------------------------------------------------------------- -DataLoggingSession* dls_create_current_process(uint32_t tag, DataLoggingItemType item_type, - uint16_t item_size, void* buffer, bool resume) { +DataLoggingSession *dls_create_current_process(uint32_t tag, DataLoggingItemType item_type, + uint16_t item_size, void *buffer, bool resume) { const PebbleProcessMd *md = sys_process_manager_get_current_process_md(); return prv_dls_create(tag, item_type, item_size, true, buffer, resume, &md->uuid); } - // ---------------------------------------------------------------------------------------- void dls_finish(DataLoggingSession *logging_session) { PBL_ASSERTN(logging_session != NULL); @@ -473,10 +450,10 @@ void dls_finish(DataLoggingSession *logging_session) { } // Wait for write buffer to empty - int timeout = 1000; // 1 second + int timeout = 1000; // 1 second while (logging_session->data->buffer_storage != NULL && timeout) { int bytes_pending = shared_circular_buffer_get_read_space_remaining( - &logging_session->data->buffer, &logging_session->data->buffer_client); + &logging_session->data->buffer, &logging_session->data->buffer_client); if (bytes_pending == 0) { break; } @@ -500,9 +477,8 @@ void dls_finish(DataLoggingSession *logging_session) { dls_send_all_sessions(); } - // ---------------------------------------------------------------------------------------- -static bool prv_write_session_to_flash(DataLoggingSession* session, void *data) { +static bool prv_write_session_to_flash(DataLoggingSession *session, void *data) { dls_storage_write_session(session); return true; } @@ -511,9 +487,8 @@ static void prv_write_all_sessions_to_flash(void *data) { dls_list_for_each_session(prv_write_session_to_flash, NULL); } - // ---------------------------------------------------------------------------------------- -DataLoggingResult dls_log(DataLoggingSession *session, const void* data, uint32_t num_items) { +DataLoggingResult dls_log(DataLoggingSession *session, const void *data, uint32_t num_items) { #ifndef CONFIG_RELEASE // TODO: We should be able to remove this requirement once PBL-23925 is fixed // @@ -543,7 +518,7 @@ DataLoggingResult dls_log(DataLoggingSession *session, const void* data, uint32_ } PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "logging %d items of size %d to session %d", - (int)num_items, (int)session->item_size, session->comm.session_id); + (int)num_items, (int)session->item_size, session->comm.session_id); if (!session->data->buffer_storage) { // Unbuffered, we can write to storage immediately @@ -560,8 +535,7 @@ DataLoggingResult dls_log(DataLoggingSession *session, const void* data, uint32_ goto unlock_and_exit; } - shared_circular_buffer_write(&session->data->buffer, data, num_bytes, - false /*advance_slackers*/); + shared_circular_buffer_write(&session->data->buffer, data, num_bytes, false /*advance_slackers*/); // Only enqueue work on the system_task if we're not already waiting on the system task to handle // previously enqueued work for this session. @@ -578,13 +552,11 @@ DataLoggingResult dls_log(DataLoggingSession *session, const void* data, uint32_ return (result); } - // ---------------------------------------------------------------------------------------- bool dls_is_session_valid(DataLoggingSession *logging_session) { return dls_list_is_session_valid(logging_session); } - // ---------------------------------------------------------------------------------------- // These methods provided for unit tests int dls_test_read(DataLoggingSession *logging_session, uint8_t *buffer, int num_bytes) { diff --git a/src/fw/services/data_logging/dls_storage.c b/src/fw/services/data_logging/dls_storage.c index 43787798c7..b1ec6483f8 100644 --- a/src/fw/services/data_logging/dls_storage.c +++ b/src/fw/services/data_logging/dls_storage.c @@ -21,7 +21,6 @@ PBL_LOG_MODULE_DECLARE(service_data_logging, CONFIG_SERVICE_DATA_LOGGING_LOG_LEVEL); - typedef enum { DLS_VERSION_0 = 0x20, } DLSFileHeaderVersion; @@ -35,41 +34,39 @@ static bool s_initializing_storage = false; // Each session stores data in a separate pfs file with this data in the front. The file name // is constructed as ("%s%d", DLS_FILE_NAME_PREFIX, comm_session_id) typedef struct PACKED { - DLSFileHeaderVersion version:8; + DLSFileHeaderVersion version : 8; uint8_t comm_session_id; uint32_t timestamp; uint32_t tag; Uuid app_uuid; - DataLoggingItemType item_type:8; + DataLoggingItemType item_type : 8; uint16_t item_size; } DLSFileHeader; - // We organize data in the file into chunks with this header at the front of each chunk. // This allows us to mark chunks as already read by setting the valid bit to 0 after we // successfully read it out. This is necessary to keep track of read chunks in the file system // so that we can recover our read position after a reboot. -#define DLS_CHUNK_HDR_NUM_BYTES_UNINITIALIZED 0x7f +#define DLS_CHUNK_HDR_NUM_BYTES_UNINITIALIZED 0x7f typedef struct PACKED { //! The number of data bytes after this header, not including this header. If this value //! is DLS_CHUNK_HDR_NUM_BYTES_UNINITIALIZED (all bits set), it means no data follows. - uint8_t num_bytes:7; - bool valid:1; // Set to false after chunk is consumed. + uint8_t num_bytes : 7; + bool valid : 1; // Set to false after chunk is consumed. } DLSChunkHeader; // The most we try to fit into a data chunk. This value must be small enough to fit within the 7 // bytes reserved for it within the DLSChunkHeader. -#define DLS_MAX_CHUNK_SIZE_BYTES 100 +#define DLS_MAX_CHUNK_SIZE_BYTES 100 _Static_assert(DLS_MAX_CHUNK_SIZE_BYTES < DLS_CHUNK_HDR_NUM_BYTES_UNINITIALIZED, - "DLS_MAX_CHUNK_SIZE_BYTES must be less than DLS_CHUNK_HDR_NUM_BYTES_UNINITIALIZED"); + "DLS_MAX_CHUNK_SIZE_BYTES must be less than DLS_CHUNK_HDR_NUM_BYTES_UNINITIALIZED"); // Forward declarations static bool prv_realloc_storage(DataLoggingSession *session, uint32_t new_size); static bool prv_get_session_file(DataLoggingSession *session, uint32_t space_needed); static void prv_release_session_file(DataLoggingSession *session); - // ---------------------------------------------------------------------------------------- static void prv_assert_valid_task(void) { if (!s_initializing_storage) { @@ -80,13 +77,11 @@ static void prv_assert_valid_task(void) { } } - // ----------------------------------------------------------------------------------------- static void prv_get_filename(char *name, DataLoggingSession *session) { concat_str_int(DLS_FILE_NAME_PREFIX, session->comm.session_id, name, DLS_FILE_NAME_MAX_LEN); } - // ---------------------------------------------------------------------------------------- // Logs if an error occurs, returns true on success static bool prv_pfs_read(int fd, void *buf, size_t size) { @@ -102,7 +97,6 @@ static bool prv_pfs_read(int fd, void *buf, size_t size) { return true; } - // ---------------------------------------------------------------------------------------- // Logs if an error occurs, returns true on success static bool prv_pfs_write(int fd, void *buf, size_t size) { @@ -117,7 +111,6 @@ static bool prv_pfs_write(int fd, void *buf, size_t size) { return true; } - // ---------------------------------------------------------------------------------------- // Logs if an error occurs, returns true on success static bool prv_pfs_seek(int fd, int offset, FSeekType seek_type) { @@ -130,7 +123,6 @@ static bool prv_pfs_seek(int fd, int offset, FSeekType seek_type) { return true; } - // ---------------------------------------------------------------------------------------- // Logs if an error occurs, returns true on success static size_t prv_pfs_get_file_size(int fd) { @@ -141,7 +133,6 @@ static size_t prv_pfs_get_file_size(int fd) { return result; } - // ----------------------------------------------------------------------------------------- // Callback passed to pfs_iterate_files. Used to find data logging files by name static bool prv_filename_filter_cb(const char *name) { @@ -149,7 +140,6 @@ static bool prv_filename_filter_cb(const char *name) { return (strncmp(name, DLS_FILE_NAME_PREFIX, prefix_len) == 0); } - // ----------------------------------------------------------------------------------------- // Given a session pointer, return how much larger we want to grow the file for it if/when // we decide to reallocate it @@ -162,9 +152,8 @@ static uint32_t prv_get_desired_free_bytes(DataLoggingSession *session) { return free_bytes; } - // ---------------------------------------------------------------------------------------- -static bool prv_accumulate_size_cb(DataLoggingSession* session, void *data) { +static bool prv_accumulate_size_cb(DataLoggingSession *session, void *data) { uint32_t *size_p = (uint32_t *)data; if (session->storage.write_offset != 0) { if (prv_get_session_file(session, 0)) { @@ -175,7 +164,6 @@ static bool prv_accumulate_size_cb(DataLoggingSession* session, void *data) { return true; } - // ---------------------------------------------------------------------------------------- // Get total amount of space we have allocated from the file system. This is the sum of the // file sizes of all the DLS files. @@ -186,10 +174,9 @@ static uint32_t prv_get_total_file_system_bytes(void) { return size; } - // ---------------------------------------------------------------------------------------- // Compact all storage files. Used to free up space for new data. -static bool prv_compact_session_cb(DataLoggingSession* session, void *data) { +static bool prv_compact_session_cb(DataLoggingSession *session, void *data) { if (session->storage.write_offset == 0) { // The write offset is 0 if we've never created storage for this session. return true; @@ -218,7 +205,6 @@ static bool prv_compact_session_cb(DataLoggingSession* session, void *data) { return true; } - // ----------------------------------------------------------------------------------------- // Make sure there is at least 'needed' bytes available in our file system space // allowed for data logging @@ -236,12 +222,11 @@ static bool prv_make_file_system_space(uint32_t needed) { return true; } - // ----------------------------------------------------------------------------------------- // Open an existing or create a new storage file. If the write_offset in the storage structure // is 0, then write a new file header based on the info from the given session. -static bool prv_open_file(DataLoggingSessionStorage *storage, uint8_t op_flags, - int32_t size, DataLoggingSession *session) { +static bool prv_open_file(DataLoggingSessionStorage *storage, uint8_t op_flags, int32_t size, + DataLoggingSession *session) { // Open/Create the file char name[DLS_FILE_NAME_MAX_LEN]; prv_get_filename(name, session); @@ -257,14 +242,14 @@ static bool prv_open_file(DataLoggingSessionStorage *storage, uint8_t op_flags, return true; } - DLSFileHeader hdr = (DLSFileHeader) { - .version = DLS_CURRENT_VERSION, - .comm_session_id = session->comm.session_id, - .timestamp = session->session_created_timestamp, - .tag = session->tag, - .app_uuid = session->app_uuid, - .item_type = session->item_type, - .item_size = session->item_size + DLSFileHeader hdr = (DLSFileHeader){ + .version = DLS_CURRENT_VERSION, + .comm_session_id = session->comm.session_id, + .timestamp = session->session_created_timestamp, + .tag = session->tag, + .app_uuid = session->app_uuid, + .item_type = session->item_type, + .item_size = session->item_size }; // Write the header @@ -274,19 +259,19 @@ static bool prv_open_file(DataLoggingSessionStorage *storage, uint8_t op_flags, } // Init the storage struct - *storage = (DataLoggingSessionStorage) { - .fd = fd, - .write_offset = sizeof(hdr), - .read_offset = sizeof(hdr) + *storage = (DataLoggingSessionStorage){ + .fd = fd, + .write_offset = sizeof(hdr), + .read_offset = sizeof(hdr) }; - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Created session-storage: " - "id %"PRIu8", filename: %s, fd: %d, size: %d", session->comm.session_id, name, fd, - (int)size); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, + "Created session-storage: " + "id %" PRIu8 ", filename: %s, fd: %d, size: %d", + session->comm.session_id, name, fd, (int)size); return true; } - // ----------------------------------------------------------------------------------------- // Close the session file static void prv_release_session_file(DataLoggingSession *session) { @@ -294,13 +279,11 @@ static void prv_release_session_file(DataLoggingSession *session) { status_t status = pfs_close(session->storage.fd); if (status != S_SUCCESS) { - PBL_LOG_ERR("Error %d closing file for session %d", (int)status, - session->comm.session_id); + PBL_LOG_ERR("Error %d closing file for session %d", (int)status, session->comm.session_id); } session->storage.fd = DLS_INVALID_FILE; } - // ----------------------------------------------------------------------------------------- // Open the session file, creating it if necessary. If space_needed is > 0, then make sure there is // enough space in the file to add 'space_needed' more bytes, compacting, growing, or lopping off @@ -350,8 +333,8 @@ static bool prv_get_session_file(DataLoggingSession *session, uint32_t space_nee // If we can free up space by reallocating this file, try that next. Since we are // reallocating anyways, take this chance to optimize the amount of free space in the file. - uint32_t target_file_size = session->storage.num_bytes + space_needed - + prv_get_desired_free_bytes(session); + uint32_t target_file_size = + session->storage.num_bytes + space_needed + prv_get_desired_free_bytes(session); target_file_size = MAX(target_file_size, DLS_FILE_INIT_SIZE_BYTES); uint32_t optimum_delta_size = target_file_size - file_size; @@ -384,7 +367,7 @@ static bool prv_get_session_file(DataLoggingSession *session, uint32_t space_nee // Lopping off the used bytes won't satisfy space_needed goto exit; } - uint32_t consume_bytes = MAX(session->storage.num_bytes/2, min_delta_size); + uint32_t consume_bytes = MAX(session->storage.num_bytes / 2, min_delta_size); if (dls_storage_consume(session, consume_bytes) < 0) { // We failed to lop off the used bytes goto exit; @@ -407,7 +390,6 @@ static bool prv_get_session_file(DataLoggingSession *session, uint32_t space_nee return success; } - // ----------------------------------------------------------------------------------------- static bool prv_write_data(DataLoggingSessionStorage *storage, const void *data, uint32_t remaining_bytes) { @@ -429,7 +411,7 @@ static bool prv_write_data(DataLoggingSessionStorage *storage, const void *data, if (!prv_pfs_seek(storage->fd, storage->write_offset, FSeekSet)) { return false; } - DLSChunkHeader data_hdr = { .num_bytes = data_chunk_length, .valid = true }; + DLSChunkHeader data_hdr = {.num_bytes = data_chunk_length, .valid = true}; if (!prv_pfs_write(storage->fd, &data_hdr, sizeof(DLSChunkHeader))) { return false; } @@ -444,7 +426,6 @@ static bool prv_write_data(DataLoggingSessionStorage *storage, const void *data, return true; } - // ----------------------------------------------------------------------------------------- // Migrate a session's data to a new file, removing already consumed bytes from the front static bool prv_realloc_storage(DataLoggingSession *session, uint32_t new_size) { @@ -455,15 +436,15 @@ static bool prv_realloc_storage(DataLoggingSession *session, uint32_t new_size) PBL_ASSERTN(session->storage.fd == DLS_INVALID_FILE); PBL_LOG_INFO("Compacting storage for session %d", session->comm.session_id); - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Before compaction: num_bytes: %"PRIu32", write_offset:%"PRIu32, - session->storage.num_bytes, session->storage.write_offset); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, + "Before compaction: num_bytes: %" PRIu32 ", write_offset:%" PRIu32, + session->storage.num_bytes, session->storage.write_offset); // Init a storage struct and create a new file for the compacted data DataLoggingSessionStorage new_storage = { - .fd = DLS_INVALID_FILE, + .fd = DLS_INVALID_FILE, }; - success = prv_open_file(&new_storage, OP_FLAG_OVERWRITE | OP_FLAG_READ, new_size, - session); + success = prv_open_file(&new_storage, OP_FLAG_OVERWRITE | OP_FLAG_READ, new_size, session); if (!success) { PBL_LOG_ERR("Could not create temporary file to migrate storage file"); goto exit; @@ -493,8 +474,8 @@ static bool prv_realloc_storage(DataLoggingSession *session, uint32_t new_size) int32_t bytes_to_copy = session->storage.num_bytes; while (bytes_to_copy) { uint32_t new_read_offset; - int32_t bytes_read = dls_storage_read(session, tmp_buf, MIN(max_chunk_size, bytes_to_copy), - &new_read_offset); + int32_t bytes_read = + dls_storage_read(session, tmp_buf, MIN(max_chunk_size, bytes_to_copy), &new_read_offset); if (bytes_read <= 0) { goto exit; } @@ -523,8 +504,9 @@ static bool prv_realloc_storage(DataLoggingSession *session, uint32_t new_size) // Plug in the new storage info into the session session->storage = new_storage; - PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "After compaction: size: %d, num_bytes: %d, write_offset:%d", - (int)new_size, (int)session->storage.num_bytes, (int)session->storage.write_offset); + PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, + "After compaction: size: %d, num_bytes: %d, write_offset:%d", (int)new_size, + (int)session->storage.num_bytes, (int)session->storage.write_offset); success = true; exit: @@ -540,7 +522,6 @@ static bool prv_realloc_storage(DataLoggingSession *session, uint32_t new_size) return success; } - // ----------------------------------------------------------------------------------------- void dls_storage_invalidate_all(void) { // Iterate through all files in the file system, looking for all DLS storage files and @@ -548,7 +529,6 @@ void dls_storage_invalidate_all(void) { pfs_remove_files(prv_filename_filter_cb); } - // ----------------------------------------------------------------------------------------- void dls_storage_delete_logging_storage(DataLoggingSession *session) { prv_assert_valid_task(); @@ -558,16 +538,15 @@ void dls_storage_delete_logging_storage(DataLoggingSession *session) { prv_get_filename(name, session); status_t status = pfs_remove(name); if (status != S_SUCCESS) { - PBL_LOG_ERR("Error %d removing file", (int) status); + PBL_LOG_ERR("Error %d removing file", (int)status); } // Clear out storage info - session->storage = (DataLoggingSessionStorage) { - .fd = DLS_INVALID_FILE, + session->storage = (DataLoggingSessionStorage){ + .fd = DLS_INVALID_FILE, }; } - // ----------------------------------------------------------------------------------------- // Write data directly to flash. Called from dls_log() when the session is // unbuffered. Assumes the caller has already locked the session using dls_lock_session(). @@ -594,7 +573,6 @@ bool dls_storage_write_data(DataLoggingSession *session, const void *data, uint3 return success; } - // ----------------------------------------------------------------------------------------- // Copy data out of a session's circular buffer and write it to flash. Called from a KernelBG // system task callback triggered by dls_log() after data is added to a buffered session. @@ -633,10 +611,9 @@ bool dls_storage_write_session(DataLoggingSession *session) { } while (bytes_remaining > 0) { - const uint8_t* read_ptr; + const uint8_t *read_ptr; uint16_t bytes_read; - success = shared_circular_buffer_read(&session->data->buffer, - &session->data->buffer_client, + success = shared_circular_buffer_read(&session->data->buffer, &session->data->buffer_client, bytes_remaining, &read_ptr, &bytes_read); PBL_ASSERTN(success); success = prv_write_data(&session->storage, read_ptr, bytes_read); @@ -660,7 +637,6 @@ bool dls_storage_write_session(DataLoggingSession *session) { return success; } - // ----------------------------------------------------------------------------------------- // Special case: if buffer is NULL, just doesn't perform any reads, it just returns the # of bytes // of data available for reading. Returns -1 on error. @@ -680,7 +656,7 @@ int32_t dls_storage_read(DataLoggingSession *logging_session, uint8_t *buffer, i got_session_file = prv_get_session_file(logging_session, 0); if (!got_session_file) { - last_whole_items_read_bytes = -1; // error + last_whole_items_read_bytes = -1; // error goto exit; } @@ -754,7 +730,6 @@ int32_t dls_storage_read(DataLoggingSession *logging_session, uint8_t *buffer, i return last_whole_items_read_bytes; } - // ----------------------------------------------------------------------------------------- // Consume num_bytes of data. As a special case, if num_bytes is 0, this simply advances the // internal storage.read_offset to match the # of bytes already consumed without consuming any more. @@ -773,7 +748,7 @@ int32_t dls_storage_consume(DataLoggingSession *logging_session, int32_t num_byt got_session_file = prv_get_session_file(logging_session, 0); if (!got_session_file) { - consumed_bytes = -1; // error + consumed_bytes = -1; // error goto exit; } @@ -788,11 +763,11 @@ int32_t dls_storage_consume(DataLoggingSession *logging_session, int32_t num_byt if (!prv_pfs_seek(logging_session->storage.fd, logging_session->storage.read_offset, FSeekSet)) { - consumed_bytes = -1; // error + consumed_bytes = -1; // error goto exit; } if (!prv_pfs_read(logging_session->storage.fd, &chunk_hdr, sizeof(chunk_hdr))) { - consumed_bytes = -1; // error + consumed_bytes = -1; // error goto exit; } @@ -815,16 +790,16 @@ int32_t dls_storage_consume(DataLoggingSession *logging_session, int32_t num_byt chunk_hdr.valid = false; if (!prv_pfs_seek(logging_session->storage.fd, logging_session->storage.read_offset, FSeekSet)) { - consumed_bytes = -1; // error + consumed_bytes = -1; // error goto exit; } if (!prv_pfs_write(logging_session->storage.fd, &chunk_hdr, sizeof(chunk_hdr))) { - consumed_bytes = -1; // error + consumed_bytes = -1; // error goto exit; } if (logging_session->storage.num_bytes < chunk_hdr.num_bytes) { PBL_LOG_ERR("Inconsistent tracking of num_bytes"); - consumed_bytes = -1; // error + consumed_bytes = -1; // error goto exit; } logging_session->storage.num_bytes -= chunk_hdr.num_bytes; @@ -837,7 +812,7 @@ int32_t dls_storage_consume(DataLoggingSession *logging_session, int32_t num_byt exit: if (consumed_bytes > 0) { PBL_LOG_D_DBG(LOG_DOMAIN_DATA_LOGGING, "Consumed %d bytes from session %d", (int)consumed_bytes, - logging_session->comm.session_id); + logging_session->comm.session_id); } if (got_session_file) { @@ -851,7 +826,6 @@ int32_t dls_storage_consume(DataLoggingSession *logging_session, int32_t num_byt return consumed_bytes; } - // ----------------------------------------------------------------------------------------- // Called from dls_init() during boot time to scan for existing DLS storage files in the file // system and recreate sessions from them. @@ -894,10 +868,10 @@ void dls_storage_rebuild(void) { goto bad_session; } session->comm.session_id = hdr.comm_session_id; - session->storage = (DataLoggingSessionStorage) { - .fd = DLS_INVALID_FILE, - .write_offset = sizeof(hdr), - .read_offset = sizeof(hdr) + session->storage = (DataLoggingSessionStorage){ + .fd = DLS_INVALID_FILE, + .write_offset = sizeof(hdr), + .read_offset = sizeof(hdr) }; // Make sure the filename is what we expect @@ -924,10 +898,10 @@ void dls_storage_rebuild(void) { goto bad_session; } - PBL_LOG_DBG("Restored session %"PRIu8 - " num_bytes:%"PRIu32", read_offset:%"PRIu32", write_offset:%"PRIu32, - session->comm.session_id, session->storage.num_bytes, - session->storage.read_offset, session->storage.write_offset); + PBL_LOG_DBG("Restored session %" PRIu8 " num_bytes:%" PRIu32 ", read_offset:%" PRIu32 + ", write_offset:%" PRIu32, + session->comm.session_id, session->storage.num_bytes, session->storage.read_offset, + session->storage.write_offset); // Insert this session into our list dls_list_insert_session(session); @@ -946,14 +920,14 @@ void dls_storage_rebuild(void) { num_sessions_restored++; continue; -bad_session: + bad_session: pfs_remove(head->name); kernel_free(session); head = (PFSFileListEntry *)head->list_node.next; } - PBL_LOG_DBG("Restored %d sessions. Total %"PRIu32" bytes allocated", - num_sessions_restored, prv_get_total_file_system_bytes()); + PBL_LOG_DBG("Restored %d sessions. Total %" PRIu32 " bytes allocated", num_sessions_restored, + prv_get_total_file_system_bytes()); // Free the directory list pfs_delete_file_list(dir_list); diff --git a/src/fw/services/data_logging/dls_syscalls.c b/src/fw/services/data_logging/dls_syscalls.c index 0209d17701..34ee0cfe58 100644 --- a/src/fw/services/data_logging/dls_syscalls.c +++ b/src/fw/services/data_logging/dls_syscalls.c @@ -10,8 +10,7 @@ PBL_LOG_MODULE_DECLARE(service_data_logging, CONFIG_SERVICE_DATA_LOGGING_LOG_LEVEL); DEFINE_SYSCALL(DataLoggingSessionRef, sys_data_logging_create, uint32_t tag, - DataLoggingItemType item_type, uint16_t item_size, - void *buffer, bool resume) { + DataLoggingItemType item_type, uint16_t item_size, void *buffer, bool resume) { // Apps allocate the circular buffer themselves in their own heap and hand the // pointer to the kernel via this syscall. Without validation, a malicious app // could point at kernel memory and turn dls_log into an arbitrary kernel write. @@ -25,19 +24,19 @@ DEFINE_SYSCALL(void, sys_data_logging_finish, DataLoggingSessionRef session_ref) // dls_is_session_valid() (below) walks the kernel-owned s_logging_sessions // list to confirm the session pointer is one we handed out, so a forged // session_ref simply returns invalid and never reaches dls_finish(). - DataLoggingSession* session = (DataLoggingSession*)session_ref; + DataLoggingSession *session = (DataLoggingSession *)session_ref; if (!dls_is_session_valid(session)) { PBL_LOG_WRN("finish: Invalid session %p", session); - return; // TODO: Return error code? + return; // TODO: Return error code? } dls_finish(session); } -DEFINE_SYSCALL(DataLoggingResult, sys_data_logging_log, - DataLoggingSessionRef session_ref, void* data, uint32_t num_items) { - DataLoggingSession* session = (DataLoggingSession*)session_ref; +DEFINE_SYSCALL(DataLoggingResult, sys_data_logging_log, DataLoggingSessionRef session_ref, + void *data, uint32_t num_items) { + DataLoggingSession *session = (DataLoggingSession *)session_ref; if (!dls_is_session_valid(session)) { PBL_LOG_WRN("log: Invalid session %p", session); diff --git a/src/fw/services/debounced_connection_service/service.c b/src/fw/services/debounced_connection_service/service.c index 1e166480b9..2a83d8746a 100644 --- a/src/fw/services/debounced_connection_service/service.c +++ b/src/fw/services/debounced_connection_service/service.c @@ -39,9 +39,9 @@ static bool s_debounced_state_is_connected[NumConnectionsToDebounce]; static void prv_put_debounced_connection_event(DebounceConnection conn_id) { PebbleEvent event = { - .type = PEBBLE_BT_CONNECTION_DEBOUNCED_EVENT, - .bluetooth.comm_session_event.is_open = s_debounced_state_is_connected[conn_id], - .bluetooth.comm_session_event.is_system = (conn_id == MobileAppDebounce), + .type = PEBBLE_BT_CONNECTION_DEBOUNCED_EVENT, + .bluetooth.comm_session_event.is_open = s_debounced_state_is_connected[conn_id], + .bluetooth.comm_session_event.is_system = (conn_id == MobileAppDebounce), }; event_put(&event); } @@ -92,8 +92,8 @@ void debounced_connection_service_handle_event(PebbleCommSessionEvent *e) { // If we become disconnected don't update apps until we have had a chance // to recover the connection. This will make our BT connection seem more // reliable. - regular_timer_add_multisecond_callback( - &s_debounce_timers[conn_id], DISCONNECT_HIDE_DURATION_SECS); + regular_timer_add_multisecond_callback(&s_debounce_timers[conn_id], + DISCONNECT_HIDE_DURATION_SECS); return; } diff --git a/src/fw/services/ecompass/correction.c b/src/fw/services/ecompass/correction.c index 3004227a30..720648614e 100644 --- a/src/fw/services/ecompass/correction.c +++ b/src/fw/services/ecompass/correction.c @@ -11,8 +11,8 @@ PBL_LOG_MODULE_DECLARE(service_ecompass, CONFIG_SERVICE_ECOMPASS_LOG_LEVEL); -#define N_SAMPS 4 // four points define a unique sphere -#define N_AXIS 3 +#define N_SAMPS 4 // four points define a unique sphere +#define N_AXIS 3 static int16_t s_samples[N_SAMPS][N_AXIS]; // @@ -82,7 +82,7 @@ static int32_t sphere_determinant4x4(int32_t **m, int32_t down_samp) { if ((skip_row % 2) == 0) { res += det; } else { - res -=det; + res -= det; } } @@ -99,7 +99,7 @@ static bool sphere_fit(int16_t *solution) { // determine average value of x, y, & z coordinates // and shift by this factor to prevent overflow. - int32_t shift_factor[N_AXIS] = { 0 }; + int32_t shift_factor[N_AXIS] = {0}; for (int j = 0; j < N_AXIS; j++) { for (int i = 0; i < N_SAMPS; i++) { shift_factor[j] += s_samples[i][j]; @@ -117,9 +117,8 @@ static bool sphere_fit(int16_t *solution) { int32_t r[N_SAMPS]; for (int i = 0; i < N_SAMPS; i++) { - r[i] = raw_data[i][0] * raw_data[i][0] + - raw_data[i][1] * raw_data[i][1] + - raw_data[i][2] * raw_data[i][2]; + r[i] = raw_data[i][0] * raw_data[i][0] + raw_data[i][1] * raw_data[i][1] + + raw_data[i][2] * raw_data[i][2]; } // We now find the origin by solving the linear equation discussed above @@ -136,19 +135,19 @@ static bool sphere_fit(int16_t *solution) { // compute cofactor01 to solve for x0 for (int i = 0; i < N_SAMPS; i++) { - matrix[i][0] = r[i]; // m[i][1] = y, m[i][2] = z + matrix[i][0] = r[i]; // m[i][1] = y, m[i][2] = z } solution[0] = shift_factor[0] + sphere_determinant4x4(matrix, c00 * 2); // compute cofactor02 to solve for y0 for (int i = 0; i < N_SAMPS; i++) { - matrix[i][1] = raw_data[i][0]; // m[i][0] = r^2, m[i][2] = z + matrix[i][1] = raw_data[i][0]; // m[i][0] = r^2, m[i][2] = z } solution[1] = shift_factor[1] - sphere_determinant4x4(matrix, c00 * 2); // compute cofactor03 to solve for z0 for (int i = 0; i < N_SAMPS; i++) { - matrix[i][2] = raw_data[i][1]; // m[i][0] = r^2, m[i][1] = x + matrix[i][2] = raw_data[i][1]; // m[i][0] = r^2, m[i][1] = x } solution[2] = shift_factor[2] + sphere_determinant4x4(matrix, c00 * 2); @@ -199,52 +198,47 @@ static bool sphere_fit(int16_t *solution) { static bool pt_to_pt_dist_under_thresh(int idx_a, int idx_b, int32_t thresh) { int32_t v_ab[3] = { - s_samples[idx_b][0] - s_samples[idx_a][0], - s_samples[idx_b][1] - s_samples[idx_a][1], - s_samples[idx_b][2] - s_samples[idx_a][2] + s_samples[idx_b][0] - s_samples[idx_a][0], s_samples[idx_b][1] - s_samples[idx_a][1], + s_samples[idx_b][2] - s_samples[idx_a][2] }; - int32_t dist_sq = v_ab[0] * v_ab[0] + v_ab[1] * v_ab[1] + - v_ab[2] * v_ab[2]; + int32_t dist_sq = v_ab[0] * v_ab[0] + v_ab[1] * v_ab[1] + v_ab[2] * v_ab[2]; return (dist_sq > (thresh * thresh)); } -static bool pt_to_line_dist_under_thresh(int idx_line_a, int idx_line_b, - int idx_pt, int32_t thresh) { - +static bool pt_to_line_dist_under_thresh(int idx_line_a, int idx_line_b, int idx_pt, + int32_t thresh) { int32_t s[3] = { - s_samples[idx_line_b][0] - s_samples[idx_line_a][0], - s_samples[idx_line_b][1] - s_samples[idx_line_a][1], - s_samples[idx_line_b][2] - s_samples[idx_line_a][2] + s_samples[idx_line_b][0] - s_samples[idx_line_a][0], + s_samples[idx_line_b][1] - s_samples[idx_line_a][1], + s_samples[idx_line_b][2] - s_samples[idx_line_a][2] }; int32_t m1[3] = { - s_samples[idx_line_a][0] - s_samples[idx_pt][0], - s_samples[idx_line_a][1] - s_samples[idx_pt][1], - s_samples[idx_line_a][2] - s_samples[idx_pt][2] + s_samples[idx_line_a][0] - s_samples[idx_pt][0], + s_samples[idx_line_a][1] - s_samples[idx_pt][1], + s_samples[idx_line_a][2] - s_samples[idx_pt][2] }; int32_t m1xs[3] = { - m1[1] * s[2] - m1[2] *s[1], - -(m1[0] * s[2] - m1[2] * s[0]), - m1[0]*s[1] - m1[1] * s[0] + m1[1] * s[2] - m1[2] * s[1], -(m1[0] * s[2] - m1[2] * s[0]), m1[0] * s[1] - m1[1] * s[0] }; - int64_t dist_sq = ((int64_t)m1xs[0]*m1xs[0] + (int64_t)m1xs[1]*m1xs[1] + - (int64_t)m1xs[2]*m1xs[2]) / (s[0]*s[0] + s[1]*s[1] + s[2]*s[2]); + int64_t dist_sq = + ((int64_t)m1xs[0] * m1xs[0] + (int64_t)m1xs[1] * m1xs[1] + (int64_t)m1xs[2] * m1xs[2]) / + (s[0] * s[0] + s[1] * s[1] + s[2] * s[2]); return (dist_sq > (thresh * thresh)); } -static bool pt_to_plane_dist_under_thresh(int idx_pln_a, int idx_pln_b, - int idx_pln_c, int idx_pt, int32_t thresh) { - +static bool pt_to_plane_dist_under_thresh(int idx_pln_a, int idx_pln_b, int idx_pln_c, int idx_pt, + int32_t thresh) { int32_t v_ab[3]; int32_t v_ac[3]; for (int i = 0; i < 3; i++) { - v_ab[i] = s_samples[idx_pln_b][i] - s_samples[idx_pln_a][i]; - v_ac[i] = s_samples[idx_pln_c][i] - s_samples[idx_pln_a][i]; + v_ab[i] = s_samples[idx_pln_b][i] - s_samples[idx_pln_a][i]; + v_ac[i] = s_samples[idx_pln_c][i] - s_samples[idx_pln_a][i]; } int64_t plane_eq[4]; @@ -253,16 +247,14 @@ static bool pt_to_plane_dist_under_thresh(int idx_pln_a, int idx_pln_b, plane_eq[2] = v_ab[0] * v_ac[1] - v_ab[1] * v_ac[0]; // solve for d - plane_eq[3] = -(plane_eq[0] * s_samples[0][0] + - plane_eq[1] * s_samples[0][1] + plane_eq[2] * s_samples[0][2]); + plane_eq[3] = -(plane_eq[0] * s_samples[0][0] + plane_eq[1] * s_samples[0][1] + + plane_eq[2] * s_samples[0][2]); // Distance^2 = (a * xo + b * yo + c * zo + d) / (a^2 + b^2 + c^2) - int64_t distance = ABS((plane_eq[0] * s_samples[idx_pt][0] + - plane_eq[1] * s_samples[idx_pt][1] + plane_eq[2] * s_samples[idx_pt][2] + - plane_eq[3])); - int32_t r = integer_sqrt(plane_eq[0] * plane_eq[0] + plane_eq[1] * plane_eq[1] - + plane_eq[2] * plane_eq[2]); - + int64_t distance = ABS((plane_eq[0] * s_samples[idx_pt][0] + plane_eq[1] * s_samples[idx_pt][1] + + plane_eq[2] * s_samples[idx_pt][2] + plane_eq[3])); + int32_t r = integer_sqrt(plane_eq[0] * plane_eq[0] + plane_eq[1] * plane_eq[1] + + plane_eq[2] * plane_eq[2]); return ((distance / r) > thresh); } @@ -290,8 +282,7 @@ static int16_t s_calib_idx = 0; static int16_t s_calib_val[N_AXIS][N_COMP_SAMPS]; static int s_saved_sample_match = 0; -static MagCalStatus check_correction_value(int16_t *solution, - int16_t *saved_solution) { +static MagCalStatus check_correction_value(int16_t *solution, int16_t *saved_solution) { const int max_delta_thresh = 50; s_calib_val[0][s_calib_idx % 3] = solution[0]; @@ -313,7 +304,7 @@ static MagCalStatus check_correction_value(int16_t *solution, s_saved_sample_match = 0; s_calib_idx = 0; PBL_LOG_DBG("Persisting previous values!"); - return (MagCalStatusSavedSampleMatch); // locked + return (MagCalStatusSavedSampleMatch); // locked } } } @@ -325,7 +316,7 @@ static MagCalStatus check_correction_value(int16_t *solution, z_delta = min_max_diff(s_calib_val[2], 3); if ((x_delta < max_delta_thresh) && (y_delta < max_delta_thresh) && (z_delta < max_delta_thresh)) { - int corrs[N_AXIS] = { 0 }; + int corrs[N_AXIS] = {0}; for (int i = 0; i < N_AXIS; i++) { for (int j = 0; j < N_COMP_SAMPS; j++) { corrs[i] += s_calib_val[i][j]; @@ -345,15 +336,15 @@ static int s_samples_collected_for_fit = 0; static int32_t s_thresh = THRESH_MAX; void ecomp_corr_reset(void) { - s_samples_collected_for_fit = 0; - s_sample_idx = 0; - s_thresh = THRESH_MAX; - s_calib_idx = 0; - s_saved_sample_match = 0; + s_samples_collected_for_fit = 0; + s_sample_idx = 0; + s_thresh = THRESH_MAX; + s_calib_idx = 0; + s_saved_sample_match = 0; } -MagCalStatus ecomp_corr_add_raw_mag_sample(int16_t *sample, - int16_t *saved_corr, int16_t *solution) { +MagCalStatus ecomp_corr_add_raw_mag_sample(int16_t *sample, int16_t *saved_corr, + int16_t *solution) { s_samples_collected_for_fit++; // no complete point set in 15s @ 20Hz (60s @ 5Hz): relax the gates so @@ -361,8 +352,7 @@ MagCalStatus ecomp_corr_add_raw_mag_sample(int16_t *sample, if (s_samples_collected_for_fit > 300) { if (s_thresh > THRESH_MIN) { s_thresh = MAX(s_thresh - THRESH_STEP, THRESH_MIN); - PBL_LOG_DBG("Lowering magnetometer distance threshold to %d", - (int)s_thresh); + PBL_LOG_DBG("Lowering magnetometer distance threshold to %d", (int)s_thresh); } s_samples_collected_for_fit = 0; @@ -388,12 +378,12 @@ MagCalStatus ecomp_corr_add_raw_mag_sample(int16_t *sample, } // the sample has passed its distance threshold check so add it - PBL_LOG_DBG("---> [%d] Adding %d %d %d \n", - s_sample_idx, (int)sample[0], (int)sample[1], (int)sample[2]); + PBL_LOG_DBG("---> [%d] Adding %d %d %d \n", s_sample_idx, (int)sample[0], (int)sample[1], + (int)sample[2]); s_sample_idx++; if (s_sample_idx != 4) { - return (MagCalStatusNoSolution); // we need 4 pts before we can do a fit + return (MagCalStatusNoSolution); // we need 4 pts before we can do a fit } // reset vars for next potential sphere fit diff --git a/src/fw/services/ecompass/service.c b/src/fw/services/ecompass/service.c index ae09ee76d5..56debed24f 100644 --- a/src/fw/services/ecompass/service.c +++ b/src/fw/services/ecompass/service.c @@ -27,52 +27,47 @@ PBL_LOG_MODULE_DEFINE(service_ecompass, CONFIG_SERVICE_ECOMPASS_LOG_LEVEL); #define ECOMPASS_CALIBRATION_FAST_MINUTES 2 #endif -#define VALID_CORR_MARKER 0x5644 -#define BITS_PER_CORRECTION_VAL 16 -#define CORRECTION_VAL_MASK ((1 << BITS_PER_CORRECTION_VAL) - 1) - +#define VALID_CORR_MARKER 0x5644 +#define BITS_PER_CORRECTION_VAL 16 +#define CORRECTION_VAL_MASK ((1 << BITS_PER_CORRECTION_VAL) - 1) static CompassStatus s_current_cal_status = CompassStatusDataInvalid; -static int16_t s_active_corr[3] = { 0 }; +static int16_t s_active_corr[3] = {0}; static bool s_service_init = false; static bool s_saved_corr_present = false; -static int16_t s_saved_corr[3] = { 0 }; +static int16_t s_saved_corr[3] = {0}; -static int32_t s_last_heading = -1; // the last heading we found +static int32_t s_last_heading = -1; // the last heading we found #ifdef CONFIG_RECOVERY_FW -static MagData s_last_mag_sample = { 0 }; +static MagData s_last_mag_sample = {0}; #endif ////////////////////////////////////////////////////////////////////////////////// // Calibration state variables -static void prv_calibration_time_expired_cb(void* data); +static void prv_calibration_time_expired_cb(void *data); static bool s_high_freq_calib_active = false; static bool s_calib_run = false; -static RegularTimerInfo s_cb_info = { .cb = prv_calibration_time_expired_cb }; - +static RegularTimerInfo s_cb_info = {.cb = prv_calibration_time_expired_cb}; ////////////////////////////////////////////////////////////////////////////////// // Compass subscription state variables static uint8_t s_compass_subscribers_count = 0; -static bool s_compass_subscribers[NumPebbleTask] = { 0 }; - +static bool s_compass_subscribers[NumPebbleTask] = {0}; ////////////////////////////////////////////////////////////////////////////////// // Accel service state variables static AccelServiceState *s_accel_session = NULL; static bool s_charger_plugged = false; -static AccelRawData s_accel_data = { 0 }; - +static AccelRawData s_accel_data = {0}; ////////////////////////////////////////////////////////////////////////////////// // Private calibration handlers -static void prv_get_roll_and_pitch(AccelRawData *d, int32_t *rollp, - int32_t *pitchp) { +static void prv_get_roll_and_pitch(AccelRawData *d, int32_t *rollp, int32_t *pitchp) { if ((d->x == 0) && (d->y == 0) && (d->z == 0)) { *rollp = *pitchp = 0; return; @@ -85,11 +80,11 @@ static void prv_get_roll_and_pitch(AccelRawData *d, int32_t *rollp, roll = roll - TRIG_MAX_ANGLE; } - int32_t pitch = atan2_lookup(-d->x, - (d->y * sin_lookup(roll) + d->z * cos_lookup(roll)) / TRIG_MAX_RATIO); + int32_t pitch = + atan2_lookup(-d->x, (d->y * sin_lookup(roll) + d->z * cos_lookup(roll)) / TRIG_MAX_RATIO); // solution repeats every 180 degrees - if (pitch > (TRIG_MAX_ANGLE / 4)) { // > 90 degrees + if (pitch > (TRIG_MAX_ANGLE / 4)) { // > 90 degrees if (pitch < ((270 * TRIG_MAX_ANGLE) / 360)) { pitch -= (TRIG_MAX_ANGLE / 2); } else { @@ -101,8 +96,8 @@ static void prv_get_roll_and_pitch(AccelRawData *d, int32_t *rollp, *pitchp = pitch; } -static int32_t prv_correct_for_roll_and_pitch(AccelRawData *accel_data, - MagData *mag_data, int32_t roll, int32_t pitch) { +static int32_t prv_correct_for_roll_and_pitch(AccelRawData *accel_data, MagData *mag_data, + int32_t roll, int32_t pitch) { int32_t mx = mag_data->x - s_active_corr[0]; int32_t my = mag_data->y - s_active_corr[1]; int32_t mz = mag_data->z - s_active_corr[2]; @@ -123,10 +118,8 @@ static int32_t prv_correct_for_roll_and_pitch(AccelRawData *accel_data, } mx_rot = (mx * cos_lookup(pitch)) / TRIG_MAX_RATIO; - mx_rot += (((my * sin_lookup(pitch)) / TRIG_MAX_RATIO) * sin_lookup(roll)) / - TRIG_MAX_RATIO; - mx_rot += (((mz * sin_lookup(pitch)) / TRIG_MAX_RATIO) * cos_lookup(roll)) / - TRIG_MAX_RATIO; + mx_rot += (((my * sin_lookup(pitch)) / TRIG_MAX_RATIO) * sin_lookup(roll)) / TRIG_MAX_RATIO; + mx_rot += (((mz * sin_lookup(pitch)) / TRIG_MAX_RATIO) * cos_lookup(roll)) / TRIG_MAX_RATIO; my_rot = mz * sin_lookup(roll) - my * cos_lookup(roll); my_rot /= TRIG_MAX_RATIO; @@ -135,13 +128,13 @@ static int32_t prv_correct_for_roll_and_pitch(AccelRawData *accel_data, return (heading); } - ////////////////////////////////////////////////////////////////////////////////// // Private handlers for compass service -static void prv_calibration_time_expired_cb(void* data) { - PBL_LOG_DBG("Calibration time expired, complete, or app exit, " - "dropping back to low frequency"); +static void prv_calibration_time_expired_cb(void *data) { + PBL_LOG_DBG( + "Calibration time expired, complete, or app exit, " + "dropping back to low frequency"); if (!mag_change_sample_rate(MagSampleRate5Hz)) { PBL_LOG_WRN("Forcing reset to enter low freq mode"); @@ -154,7 +147,7 @@ static void prv_calibration_time_expired_cb(void* data) { } static void prv_accel_for_compass_handler(AccelRawData *d, uint32_t num_samples, - uint64_t timestamp) { + uint64_t timestamp) { int32_t x = 0, y = 0, z = 0; // 1st order butterworth filter with a cutoff freq of 0.02Fs @@ -165,7 +158,9 @@ static void prv_accel_for_compass_handler(AccelRawData *d, uint32_t num_samples, xr = (305 * d[i].x + 305 * xp + 9391 * xr) / 10000; yr = (305 * d[i].y + 305 * yp + 9391 * yr) / 10000; zr = (305 * d[i].z + 305 * zp + 9391 * zr) / 10000; - xp = d[i].x; yp = d[i].y; zp = d[i].z; + xp = d[i].x; + yp = d[i].y; + zp = d[i].z; x += xr; y += yr; z += zr; @@ -199,7 +194,7 @@ static void prv_compass_data_service_stop(PebbleTask task) { mag_release(); } } - PBL_LOG_DBG("subscribers %"PRIu8, s_compass_subscribers_count); + PBL_LOG_DBG("subscribers %" PRIu8, s_compass_subscribers_count); } static void prv_compass_data_service_start(PebbleTask task) { @@ -215,7 +210,7 @@ static void prv_compass_data_service_start(PebbleTask task) { mag_start_sampling(); } - PBL_LOG_DBG("subscribers %"PRIu8, s_compass_subscribers_count); + PBL_LOG_DBG("subscribers %" PRIu8, s_compass_subscribers_count); } ////////////////////////////////////////////////////////////////////////////////// @@ -230,7 +225,7 @@ void ecompass_handle_battery_state_change_event(PreciseBatteryChargeState new_st } else if (s_charger_plugged) { // we have unplugged the charger, initiate recalibration s_charger_plugged = false; - s_calib_run = false; // trigger a rerun of fast compass calibration + s_calib_run = false; // trigger a rerun of fast compass calibration PBL_LOG_DBG("Restarting calibration after charge event"); } } @@ -239,7 +234,7 @@ void ecompass_service_init(void) { s_service_init = true; event_service_init(PEBBLE_COMPASS_DATA_EVENT, &prv_compass_data_service_start, - &prv_compass_data_service_stop); + &prv_compass_data_service_stop); } void ecompass_service_handle(void) { @@ -252,8 +247,10 @@ void ecompass_service_handle(void) { if (rv == MagReadCommunicationFail) { // heavy hammer fix for now // FIXME: move the restart logic to driver - PBL_LOG_WRN("Read after %d samples failed, " - "restarting compass", samples_collected); + PBL_LOG_WRN( + "Read after %d samples failed, " + "restarting compass", + samples_collected); mag_release(); mag_start_sampling(); } @@ -285,25 +282,24 @@ void ecompass_service_handle(void) { s_calib_run = true; s_high_freq_calib_active = true; samples_collected = 0; - return; // if we are switching to high freq mode, don't use 1st sample + return; // if we are switching to high freq mode, don't use 1st sample } if (samples_collected < 5) { - return; // wait a few samples for ramp up error to stabilize + return; // wait a few samples for ramp up error to stabilize } int16_t new_corr[3]; - MagCalStatus cal_status = ecomp_corr_add_raw_mag_sample((int16_t *)&mag_data, - (s_saved_corr_present) ? s_saved_corr : NULL, new_corr); + MagCalStatus cal_status = ecomp_corr_add_raw_mag_sample( + (int16_t *)&mag_data, (s_saved_corr_present) ? s_saved_corr : NULL, new_corr); if (cal_status != MagCalStatusNoSolution) { - PBL_LOG_INFO("%s : %d %d %d (type = %d)", "Mag Corr", - (int)new_corr[0], (int)new_corr[1], (int)new_corr[2], (int)cal_status); + PBL_LOG_INFO("%s : %d %d %d (type = %d)", "Mag Corr", (int)new_corr[0], (int)new_corr[1], + (int)new_corr[2], (int)cal_status); } bool locked_sol = (cal_status == MagCalStatusNewLockedSolutionAvail); - if (locked_sol || ((cal_status == MagCalStatusNewSolutionAvail) && - !s_saved_corr_present)) { + if (locked_sol || ((cal_status == MagCalStatusNewSolutionAvail) && !s_saved_corr_present)) { s_current_cal_status = CompassStatusCalibrating; for (int i = 0; i < 3; i++) { if ((s_active_corr[i] == 0) || locked_sol) { @@ -312,7 +308,7 @@ void ecompass_service_handle(void) { } // smooth out noise from solutions while we wait for a locked set - const int alpha = 30; // greater alpha leads to less smoothing + const int alpha = 30; // greater alpha leads to less smoothing new_corr[i] = ((new_corr[i] - s_active_corr[i]) * alpha) / 100; s_active_corr[i] += new_corr[i]; } @@ -320,7 +316,7 @@ void ecompass_service_handle(void) { if (s_high_freq_calib_active && (cal_status == MagCalStatusNoSolution) && ((samples_collected % 4) != 0)) { - return; // only bubble up every 4th sample to app land with high samp rate + return; // only bubble up every 4th sample to app land with high samp rate } if ((cal_status == MagCalStatusNewLockedSolutionAvail) || @@ -329,7 +325,7 @@ void ecompass_service_handle(void) { prv_calibration_time_expired_cb(NULL); } s_current_cal_status = CompassStatusCalibrated; - for (int i = 0; i < 3; i++) { + for (int i = 0; i < 3; i++) { s_active_corr[i] = new_corr[i]; } s_saved_corr_present = true; @@ -342,12 +338,11 @@ void ecompass_service_handle(void) { prv_get_roll_and_pitch(&accel_data, &roll, &pitch); PebbleEvent e = { - .type = PEBBLE_COMPASS_DATA_EVENT, - .compass_data = { - .magnetic_heading = prv_correct_for_roll_and_pitch(&accel_data, &mag_data, - roll, pitch), - .calib_status = s_current_cal_status - } + .type = PEBBLE_COMPASS_DATA_EVENT, + .compass_data = { + .magnetic_heading = prv_correct_for_roll_and_pitch(&accel_data, &mag_data, roll, pitch), + .calib_status = s_current_cal_status + } }; s_last_heading = e.compass_data.magnetic_heading; @@ -367,11 +362,11 @@ DEFINE_SYSCALL(void, sys_ecompass_get_last_heading, CompassHeadingData *data) { syscall_assert_userspace_buffer(data, sizeof(*data)); } - *data = (CompassHeadingData) { - .magnetic_heading = s_last_heading, - .true_heading = s_last_heading, - .compass_status = s_current_cal_status, - .is_declination_valid = false + *data = (CompassHeadingData){ + .magnetic_heading = s_last_heading, + .true_heading = s_last_heading, + .compass_status = s_current_cal_status, + .is_declination_valid = false }; } @@ -399,19 +394,19 @@ void command_compass_peek(void) { launcher_task_add_callback(prv_ecompass_start_callback, NULL); // wait for last heading to be updated - int retries = 50; // 5 seconds should be ample time + int retries = 50; // 5 seconds should be ample time while ((prev_heading == s_last_heading) && retries-- > 0) { psleep(100); } launcher_task_add_callback(prv_ecompass_stop_callback, NULL); - psleep(5); // give the compass some time to stop + psleep(5); // give the compass some time to stop char buffer[40]; - prompt_send_response_fmt(buffer, sizeof(buffer), "%"PRId32" degrees", - (s_last_heading * 360) / TRIG_MAX_ANGLE); + prompt_send_response_fmt(buffer, sizeof(buffer), "%" PRId32 " degrees", + (s_last_heading * 360) / TRIG_MAX_ANGLE); - prompt_send_response_fmt(buffer, sizeof(buffer), "Mx=%d, My=%d, Mz=%d", - s_last_mag_sample.x, s_last_mag_sample.y, s_last_mag_sample.z); + prompt_send_response_fmt(buffer, sizeof(buffer), "Mx=%d, My=%d, Mz=%d", s_last_mag_sample.x, + s_last_mag_sample.y, s_last_mag_sample.z); } -#endif // CONFIG_RECOVERY_FW +#endif // CONFIG_RECOVERY_FW diff --git a/src/fw/services/event_service/service.c b/src/fw/services/event_service/service.c index 0d6f11967a..3ef43def60 100644 --- a/src/fw/services/event_service/service.c +++ b/src/fw/services/event_service/service.c @@ -35,12 +35,12 @@ static const uint16_t CLAIMED_BIT = (1 << NumPebbleTask); static EventServiceBuffer *s_event_service_buffers = NULL; -// We dynamically allocate one of these for every service UUID that either a client subscribes to or a service -// publishes an event to. +// We dynamically allocate one of these for every service UUID that either a client subscribes to or +// a service publishes an event to. typedef struct { - ListNode list_node; - uint16_t service_index; // index of the service - Uuid uuid; // UUID + ListNode list_node; + uint16_t service_index; // index of the service + Uuid uuid; // UUID } EventPluginUUIDEntry; static uint16_t s_next_service_index = 0; @@ -57,15 +57,13 @@ static void prv_event_service_unsubscribe(PebbleSubscriptionEvent *subscription) if (s_event_services[subscription->event_type] == NULL) { // service does not exist - PBL_LOG_WRN("Attempted to unsubscribe from %d, no service found", - subscription->event_type); + PBL_LOG_WRN("Attempted to unsubscribe from %d, no service found", subscription->event_type); return; } if (service->subscribers[subscription->task] == NULL) { // not subscribed - PBL_LOG_WRN("Attempted to unsubscribe from %d, not subscribed", - subscription->event_type); + PBL_LOG_WRN("Attempted to unsubscribe from %d, not subscribed", subscription->event_type); return; } @@ -131,9 +129,9 @@ void event_service_clear_process_subscriptions(PebbleTask task) { } PebbleSubscriptionEvent event = { - .subscribe = false, - .task = task, - .event_type = i, + .subscribe = false, + .task = task, + .event_type = i, }; prv_event_service_unsubscribe(&event); } @@ -142,9 +140,10 @@ void event_service_clear_process_subscriptions(PebbleTask task) { void event_service_system_init(void) { } -void event_service_init(PebbleEventType type, EventServiceAddSubscriberCallback add_subscriber_callback, - EventServiceRemoveSubscriberCallback remove_subscriber_callback) { - if(s_event_services[type] != NULL) { +void event_service_init(PebbleEventType type, + EventServiceAddSubscriberCallback add_subscriber_callback, + EventServiceRemoveSubscriberCallback remove_subscriber_callback) { + if (s_event_services[type] != NULL) { // an event service was already inited, free it kernel_free(s_event_services[type]); } @@ -172,7 +171,7 @@ static bool prv_task_is_masked_out(PebbleEvent *e, PebbleTask task) { } static bool prv_steal_buffer(void *buf, EventServiceEntry *service, PebbleEvent *e) { - uint16_t intents_pending = 0; + uint16_t intents_pending = 0; for (int i = 0; i < NumPebbleTask; i++) { if (!prv_task_is_masked_out(e, i) && service->subscribers[i]) { @@ -186,9 +185,9 @@ static bool prv_steal_buffer(void *buf, EventServiceEntry *service, PebbleEvent esb->ptr = buf; esb->intents_pending = intents_pending; list_init(&esb->list_node); - s_event_service_buffers = (EventServiceBuffer *)list_prepend( - (ListNode *)s_event_service_buffers, (ListNode *)esb); - return true; // we stole the buffer + s_event_service_buffers = + (EventServiceBuffer *)list_prepend((ListNode *)s_event_service_buffers, (ListNode *)esb); + return true; // we stole the buffer } else { return false; } @@ -203,7 +202,7 @@ void event_service_handle_event(PebbleEvent *e) { bool stolen = false; void **buf_ptr = event_get_buffer(e); if (buf_ptr && *buf_ptr) { - stolen = prv_steal_buffer(*buf_ptr, service, e); // FIXME arguments? + stolen = prv_steal_buffer(*buf_ptr, service, e); // FIXME arguments? } PebbleTask cur_task = pebble_task_get_current(); @@ -215,8 +214,7 @@ void event_service_handle_event(PebbleEvent *e) { continue; } else { if (!prv_event_service_send_event(service->subscribers[i], e)) { - PBL_LOG_ERR("Queue full! %d not delivered to task %d!", - (int)e->type, (int)i); + PBL_LOG_ERR("Queue full! %d not delivered to task %d!", (int)e->type, (int)i); #ifndef CONFIG_RELEASE // For 3rd party apps, just close them. For a 1st party app or other task, reboot // the watch @@ -256,22 +254,20 @@ bool event_service_is_known_buffer(const void *buf) { return false; } // Cast away const for list_find's callback signature; prv_buffer_find only compares. - return list_find((ListNode *)s_event_service_buffers, prv_buffer_find, - (void *)buf) != NULL; + return list_find((ListNode *)s_event_service_buffers, prv_buffer_find, (void *)buf) != NULL; } -static EventServiceBuffer* prv_get_esb_for_event(PebbleEvent *e) { +static EventServiceBuffer *prv_get_esb_for_event(PebbleEvent *e) { void **buf_ptr = event_get_buffer(e); EventServiceBuffer *esb = NULL; if (buf_ptr && *buf_ptr) { - esb = (EventServiceBuffer *)list_find((ListNode *)s_event_service_buffers, - prv_buffer_find, + esb = (EventServiceBuffer *)list_find((ListNode *)s_event_service_buffers, prv_buffer_find, *buf_ptr); } return esb; } -void* event_service_claim_buffer(PebbleEvent *e) { +void *event_service_claim_buffer(PebbleEvent *e) { EventServiceBuffer *esb = prv_get_esb_for_event(e); if (esb) { if (esb->intents_pending & CLAIMED_BIT) { @@ -296,7 +292,7 @@ void event_service_free_claimed_buffer(void *ref) { if (esb->intents_pending & CLAIMED_BIT) { // If other events still need the buffer removing the claim marker will make things // get cleaned up as usual. - uint16_t intents_pending = __sync_and_and_fetch(&esb->intents_pending, ~CLAIMED_BIT); + uint16_t intents_pending = __sync_and_and_fetch(&esb->intents_pending, ~CLAIMED_BIT); if (!intents_pending) { list_remove((ListNode *)esb, (ListNode **)&s_event_service_buffers, NULL); @@ -317,7 +313,8 @@ static bool prv_service_filter(ListNode *node, void *tp) { // --------------------------------------------------------------------------------------------------------------- // TODO: We need to prune out entries from this list when they are no longer needed -// TODO: The applib should force a restriction on the number of plugin service UUIDs that an app can subscribe +// TODO: The applib should force a restriction on the number of plugin service UUIDs that an app can +// subscribe // to at once. static int16_t prv_get_plugin_index(const Uuid *uuid) { int16_t result = -1; @@ -327,7 +324,7 @@ static int16_t prv_get_plugin_index(const Uuid *uuid) { // Look for this service UUID ListNode *found; ListNode *list = &s_plugin_list; - found = list_find(list, prv_service_filter, (void*)uuid); + found = list_find(list, prv_service_filter, (void *)uuid); if (found) { result = ((EventPluginUUIDEntry *)found)->service_index; goto unlock; @@ -350,7 +347,7 @@ static int16_t prv_get_plugin_index(const Uuid *uuid) { //! @param uuid the UUID of the plugin service, or NULL to use uuid of the current process //! @return non-negative service index, or -1 if error -DEFINE_SYSCALL(int16_t, sys_event_service_get_plugin_service_index, const Uuid * uuid) { +DEFINE_SYSCALL(int16_t, sys_event_service_get_plugin_service_index, const Uuid *uuid) { if (PRIVILEGE_WAS_ELEVATED && uuid != NULL) { syscall_assert_userspace_buffer(uuid, sizeof(*uuid)); } @@ -369,7 +366,7 @@ DEFINE_SYSCALL(void, sys_event_service_cleanup, PebbleEvent *e) { if (esb) { uint16_t task_bit = 1 << pebble_task_get_current(); - uint16_t intents_pending = __sync_and_and_fetch(&esb->intents_pending, ~task_bit); + uint16_t intents_pending = __sync_and_and_fetch(&esb->intents_pending, ~task_bit); if (intents_pending) { // zero out buf_ptr so it won't be freed by cleanup. Other tasks are still waiting to use it void **buf_ptr = event_get_buffer(e); diff --git a/src/fw/services/evented_timer/service.c b/src/fw/services/evented_timer/service.c index f4de463e0e..7602b4c821 100644 --- a/src/fw/services/evented_timer/service.c +++ b/src/fw/services/evented_timer/service.c @@ -18,52 +18,51 @@ PBL_LOG_MODULE_DEFINE(service_evented_timer, CONFIG_SERVICE_EVENTED_TIMER_LOG_LE typedef struct EventedTimer { ListNode list_node; - //! The TimerID type used for sys_timers is a non-repeating integer that we also use as our key for finding + //! The TimerID type used for sys_timers is a non-repeating integer that we also use as our key + //! for finding //! EventedTimers by id. TimerID sys_timer_id; EventedTimerCallback callback; - void* callback_data; + void *callback_data; PebbleTask target_task; - bool expired; // This gets set when the timer's callback runs + bool expired; // This gets set when the timer's callback runs bool repeating; } EventedTimer; //! The list of all the timers that have been created. -static ListNode* s_timer_list_head; +static ListNode *s_timer_list_head; static PBL_MUTEX_DEFINE(s_mutex); // ------------------------------------------------------------------------------------ // Find timer by id -static bool prv_id_list_filter(ListNode* node, void* data) { - EventedTimer* timer = (EventedTimer*)node; +static bool prv_id_list_filter(ListNode *node, void *data) { + EventedTimer *timer = (EventedTimer *)node; return timer->sys_timer_id == (TimerID)data; } -static EventedTimer* prv_find_timer(TimerID timer_id) -{ +static EventedTimer *prv_find_timer(TimerID timer_id) { if (timer_id == EVENTED_TIMER_INVALID_ID) { return NULL; } // Look for this timer in our linked list - ListNode* node = list_find(s_timer_list_head, prv_id_list_filter, (void*)(intptr_t)timer_id); + ListNode *node = list_find(s_timer_list_head, prv_id_list_filter, (void *)(intptr_t)timer_id); return (EventedTimer *)node; } - //! Retrieves details for a given timer handle and copies them out to user supplied memory. //! This gets executed on the client's task and is called directly from the callback we put onto the //! client task's event queue. //! It accesses the privileged contents of the timer from the client's unprivileged task. //! This call deletes the system timer and removes it from the timer list before returning unless //! it is a repeating timer. -DEFINE_SYSCALL(void, sys_evented_timer_consume, TimerID timer_id, EventedTimerCallback* out_cb, - void** out_cb_data) { +DEFINE_SYSCALL(void, sys_evented_timer_consume, TimerID timer_id, EventedTimerCallback *out_cb, + void **out_cb_data) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(out_cb, sizeof(*out_cb)); syscall_assert_userspace_buffer(out_cb_data, sizeof(*out_cb_data)); @@ -106,16 +105,16 @@ DEFINE_SYSCALL(void, sys_evented_timer_consume, TimerID timer_id, EventedTimerCa } } +//! Wrapper for the user supplied callback. We installed this callback by posting a +//! PEBBLE_CALLBACK_EVENT to the client's event queue. This gets executed on the target task. +static void prv_evented_timer_event_callback(void *data) { + // Note this may be running on the app task, so we have to jump through hoops to read kernel + // memory. -//! Wrapper for the user supplied callback. We installed this callback by posting a PEBBLE_CALLBACK_EVENT -//! to the client's event queue. This gets executed on the target task. -static void prv_evented_timer_event_callback(void* data) { - // Note this may be running on the app task, so we have to jump through hoops to read kernel memory. - - TimerID timer_id = (TimerID) data; + TimerID timer_id = (TimerID)data; EventedTimerCallback timer_cb; - void* timer_cb_data; + void *timer_cb_data; // Get the user supplied callback pointer and data, remove the timer from our list, and delete it. sys_evented_timer_consume(timer_id, &timer_cb, &timer_cb_data); @@ -128,9 +127,8 @@ static void prv_evented_timer_event_callback(void* data) { timer_cb(timer_cb_data); } - //! Called on the timer task. From here we need to generate a callback on the client's task. -static void prv_sys_timer_callback(void* cb_data) { +static void prv_sys_timer_callback(void *cb_data) { PBL_ASSERT_TASK(PebbleTask_NewTimers); TimerID id = (TimerID)cb_data; @@ -155,11 +153,11 @@ static void prv_sys_timer_callback(void* cb_data) { pbl_mutex_unlock(&s_mutex); PebbleEvent e = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = prv_evented_timer_event_callback, - .data = (void*)(intptr_t)id, - } + .type = PEBBLE_CALLBACK_EVENT, + .callback = { + .callback = prv_evented_timer_event_callback, + .data = (void *)(intptr_t)id, + } }; switch (timer->target_task) { @@ -172,10 +170,9 @@ static void prv_sys_timer_callback(void* cb_data) { break; default: PBL_CROAK("Invalid task %s", pebble_task_get_name(pebble_task_get_current())); - } + } } - // ======================================================================================================== // External API @@ -187,10 +184,10 @@ void evented_timer_clear_process_timers(PebbleTask task) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); - ListNode* iter = s_timer_list_head; + ListNode *iter = s_timer_list_head; while (iter) { - EventedTimer* timer = (EventedTimer*) iter; - ListNode* next = list_get_next(iter); + EventedTimer *timer = (EventedTimer *)iter; + ListNode *next = list_get_next(iter); if (timer->target_task == task) { list_remove(iter, &s_timer_list_head, NULL); @@ -206,21 +203,19 @@ void evented_timer_clear_process_timers(PebbleTask task) { } EventedTimerID evented_timer_register_or_reschedule(EventedTimerID timer_id, uint32_t timeout_ms, - EventedTimerCallback callback, void *data) { + EventedTimerCallback callback, void *data) { if (timer_id != EVENTED_TIMER_INVALID_ID && evented_timer_reschedule(timer_id, timeout_ms)) { return timer_id; } return evented_timer_register(timeout_ms, false, callback, data); } -EventedTimerID evented_timer_register(uint32_t timeout_ms, - bool repeating, - EventedTimerCallback callback, - void* data) { +EventedTimerID evented_timer_register(uint32_t timeout_ms, bool repeating, + EventedTimerCallback callback, void *data) { PebbleTask current_task = pebble_task_get_current(); - PBL_ASSERT(current_task == PebbleTask_KernelMain || current_task == PebbleTask_App - || current_task == PebbleTask_Worker, - "Invalid task: %s", pebble_task_get_name(current_task)); + PBL_ASSERT(current_task == PebbleTask_KernelMain || current_task == PebbleTask_App || + current_task == PebbleTask_Worker, + "Invalid task: %s", pebble_task_get_name(current_task)); // Handle a lazy client. Timers are useful for handling things "not right now, but soon". if (timeout_ms == 0) { @@ -229,16 +224,16 @@ EventedTimerID evented_timer_register(uint32_t timeout_ms, pbl_mutex_lock(&s_mutex, PBL_FOREVER); - EventedTimer* new_timer = kernel_malloc_check(sizeof(EventedTimer)); + EventedTimer *new_timer = kernel_malloc_check(sizeof(EventedTimer)); - *new_timer = (EventedTimer) { - .list_node = { 0 }, - .sys_timer_id = TIMER_INVALID_ID, // We set this below - .callback = callback, - .callback_data = data, - .target_task = current_task, - .repeating = repeating, - .expired = false + *new_timer = (EventedTimer){ + .list_node = {0}, + .sys_timer_id = TIMER_INVALID_ID, // We set this below + .callback = callback, + .callback_data = data, + .target_task = current_task, + .repeating = repeating, + .expired = false }; new_timer->sys_timer_id = new_timer_create(); @@ -248,32 +243,31 @@ EventedTimerID evented_timer_register(uint32_t timeout_ms, uint32_t flags = repeating ? TIMER_START_FLAG_REPEATING : 0; bool success = new_timer_start(new_timer->sys_timer_id, timeout_ms, prv_sys_timer_callback, - (void*)(intptr_t)new_timer->sys_timer_id, flags); + (void *)(intptr_t)new_timer->sys_timer_id, flags); PBL_ASSERTN(success); pbl_mutex_unlock(&s_mutex); return new_timer->sys_timer_id; } - bool evented_timer_reschedule(EventedTimerID timer_id, uint32_t timeout_ms) { if (timeout_ms == 0) { timeout_ms = 1; } pbl_mutex_lock(&s_mutex, PBL_FOREVER); - // This will detect an invalid timer ID, or one that already ran on the client's task and got deleted + // This will detect an invalid timer ID, or one that already ran on the client's task and got + // deleted // already - EventedTimer* timer = prv_find_timer(timer_id); + EventedTimer *timer = prv_find_timer(timer_id); if (!timer) { - PBL_LOG_DBG("Attempting to reschedule an invalid timer (id=%u)", - (unsigned)timer_id); + PBL_LOG_DBG("Attempting to reschedule an invalid timer (id=%u)", (unsigned)timer_id); pbl_mutex_unlock(&s_mutex); return false; } - PBL_ASSERT(timer->target_task == pebble_task_get_current(), "%u vs %u", - timer->target_task, pebble_task_get_current()); + PBL_ASSERT(timer->target_task == pebble_task_get_current(), "%u vs %u", timer->target_task, + pebble_task_get_current()); // This will detect if the timer callback has already executed on the timer task. // If the timer is still in our timer's list but is expired, @@ -289,16 +283,15 @@ bool evented_timer_reschedule(EventedTimerID timer_id, uint32_t timeout_ms) { // new_timer_start() will reliably tell us if it was able to reschedule // the timer before the callback got entered. // If it returns false, it means the callback was entered before it was able to reschedule it. - uint32_t flags = timer->repeating ? TIMER_START_FLAG_REPEATING : - TIMER_START_FLAG_FAIL_IF_EXECUTING; + uint32_t flags = + timer->repeating ? TIMER_START_FLAG_REPEATING : TIMER_START_FLAG_FAIL_IF_EXECUTING; bool success = new_timer_start(timer->sys_timer_id, timeout_ms, prv_sys_timer_callback, - (void*)(intptr_t)timer->sys_timer_id, flags); + (void *)(intptr_t)timer->sys_timer_id, flags); pbl_mutex_unlock(&s_mutex); return success; } - void evented_timer_cancel(EventedTimerID timer_id) { if (timer_id == EVENTED_TIMER_INVALID_ID) { return; @@ -307,26 +300,26 @@ void evented_timer_cancel(EventedTimerID timer_id) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); // Find this timer and validate it - EventedTimer* timer = prv_find_timer(timer_id); + EventedTimer *timer = prv_find_timer(timer_id); if (!timer) { PBL_LOG_DBG("Attempting to cancel an invalid timer (id=%u)", (unsigned)timer_id); pbl_mutex_unlock(&s_mutex); return; } - new_timer_delete(timer->sys_timer_id); // This automatically stops the timer for us first + new_timer_delete(timer->sys_timer_id); // This automatically stops the timer for us first list_remove(&timer->list_node, &s_timer_list_head, NULL); kernel_free(timer); pbl_mutex_unlock(&s_mutex); } -bool evented_timer_exists(EventedTimerID timer_id){ +bool evented_timer_exists(EventedTimerID timer_id) { return prv_find_timer(timer_id) != NULL; } -bool evented_timer_is_current_task(EventedTimerID timer_id){ - EventedTimer* timer = prv_find_timer(timer_id); +bool evented_timer_is_current_task(EventedTimerID timer_id) { + EventedTimer *timer = prv_find_timer(timer_id); PBL_ASSERTN(timer); return timer->target_task == pebble_task_get_current(); } @@ -336,7 +329,7 @@ void evented_timer_reset(void) { } void *evented_timer_get_data(EventedTimerID timer_id) { - EventedTimer* timer = prv_find_timer(timer_id); + EventedTimer *timer = prv_find_timer(timer_id); if (timer) { return timer->callback_data; } else { diff --git a/src/fw/services/filesystem/app_file.c b/src/fw/services/filesystem/app_file.c index 220f686243..510269c725 100644 --- a/src/fw/services/filesystem/app_file.c +++ b/src/fw/services/filesystem/app_file.c @@ -8,9 +8,8 @@ #include "system/passert.h" #include "resource/resource_storage.h" -void app_file_name_make(char * restrict buffer, size_t buffer_len, - AppInstallId app_id, const char * restrict suffix, - size_t suffix_len) { +void app_file_name_make(char *restrict buffer, size_t buffer_len, AppInstallId app_id, + const char *restrict suffix, size_t suffix_len) { PBL_ASSERTN(buffer_len > APP_FILE_NAME_PREFIX_LENGTH + suffix_len); buffer[0] = '@'; @@ -53,7 +52,7 @@ bool is_app_resource_file_name(const char *filename) { //! Parses an app-file name to get the AppInstallId. //! Assumes the file is indeed an app-file AppInstallId app_file_parse_app_id(const char *filename) { - return (AppInstallId)strtol(filename + 1, NULL, 16); // + 1 to skip the initial '@' + return (AppInstallId)strtol(filename + 1, NULL, 16); // + 1 to skip the initial '@' } //! Parses an app-file name to get the AppInstallId. diff --git a/src/fw/services/filesystem/flash_translation.c b/src/fw/services/filesystem/flash_translation.c index b317a56cd4..69dc629554 100644 --- a/src/fw/services/filesystem/flash_translation.c +++ b/src/fw/services/filesystem/flash_translation.c @@ -54,7 +54,7 @@ static void prv_layout_version_add_all_regions(bool revert) { s_ftl_size += prv_region_size(i); } - PBL_LOG_DBG("Filesystem: Temporary size - %"PRId32" Kb", (s_ftl_size / 1024)); + PBL_LOG_DBG("Filesystem: Temporary size - %" PRId32 " Kb", (s_ftl_size / 1024)); pfs_set_size(s_ftl_size, false /* don't erase regions */); } @@ -70,7 +70,7 @@ static uint8_t prv_ftl_get_layout_version(void) { // flash version. for (uint8_t i = flash_version; i < TOTAL_NUM_FLASH_REGIONS; i++) { if ((prv_region_size(i) == 0) || - pfs_active_in_region(known_size, known_size + prv_region_size(i))) { + pfs_active_in_region(known_size, known_size + prv_region_size(i))) { // if active, increment known flash version and increase size to check next region flash_version = i + 1; known_size += prv_region_size(i); @@ -93,17 +93,18 @@ void ftl_add_region(uint32_t region_start, uint32_t region_end, bool erase_new_r (region_start == s_region_list[s_next_region_idx].start) && (region_end == s_region_list[s_next_region_idx].end)) { s_next_region_idx++; - // failure, should never happen + // failure, should never happen } else { - PBL_LOG_WRN("Filesystem: Uh oh, we somehow added regions in the wrong order, %"PRIu32" %"PRIu32, - region_start, region_end); + PBL_LOG_WRN("Filesystem: Uh oh, we somehow added regions in the wrong order, %" PRIu32 + " %" PRIu32, + region_start, region_end); return; } // erase if asked to if (erase_new_region) { - flash_region_erase_optimal_range_no_watchdog(region_start, region_start, - region_end, region_end); + flash_region_erase_optimal_range_no_watchdog(region_start, region_start, region_end, + region_end); } s_ftl_size += (region_end - region_start); @@ -128,7 +129,7 @@ void ftl_populate_region_list(void) { ftl_add_region(s_region_list[i].start, s_region_list[i].end, true); } - PBL_LOG_DBG("Filesystem: New size - %"PRId32" Kb", (s_ftl_size / 1024)); + PBL_LOG_DBG("Filesystem: New size - %" PRId32 " Kb", (s_ftl_size / 1024)); } uint32_t ftl_get_size(void) { @@ -136,12 +137,10 @@ uint32_t ftl_get_size(void) { } static void prv_ftl_operation(uint8_t *buffer, uint32_t size, uint32_t offset, - FTLOperation operation) { - + FTLOperation operation) { uint32_t curr_virt_offset_begin = 0; uint32_t curr_virt_offset_end = 0; - // iterate through all regions and perform read, write, or erase for (unsigned int idx = 0; (idx < s_next_region_idx) && (size != 0); idx++) { curr_virt_offset_end += prv_region_size(idx); @@ -149,19 +148,16 @@ static void prv_ftl_operation(uint8_t *buffer, uint32_t size, uint32_t offset, uint32_t bytes = MIN(curr_virt_offset_end - offset, size); if (operation == FTLRead) { - flash_read_bytes( - buffer, s_region_list[idx].start + offset - curr_virt_offset_begin, bytes); - } else if (operation == FTLWrite ) { - flash_write_bytes( - buffer, s_region_list[idx].start + offset - curr_virt_offset_begin, bytes); + flash_read_bytes(buffer, s_region_list[idx].start + offset - curr_virt_offset_begin, bytes); + } else if (operation == FTLWrite) { + flash_write_bytes(buffer, s_region_list[idx].start + offset - curr_virt_offset_begin, + bytes); } else if (operation == FTLEraseSubsector) { PBL_ASSERTN(size == SUBSECTOR_SIZE_BYTES); - flash_erase_subsector_blocking( - s_region_list[idx].start + offset - curr_virt_offset_begin); + flash_erase_subsector_blocking(s_region_list[idx].start + offset - curr_virt_offset_begin); } else if (operation == FTLEraseSector) { PBL_ASSERTN(size == SECTOR_SIZE_BYTES); - flash_erase_sector_blocking( - s_region_list[idx].start + offset - curr_virt_offset_begin); + flash_erase_sector_blocking(s_region_list[idx].start + offset - curr_virt_offset_begin); } size -= bytes; diff --git a/src/fw/services/filesystem/pfs.c b/src/fw/services/filesystem/pfs.c index 6ad767ed94..98e91332a1 100644 --- a/src/fw/services/filesystem/pfs.c +++ b/src/fw/services/filesystem/pfs.c @@ -32,23 +32,23 @@ PBL_LOG_MODULE_DEFINE(service_filesystem, CONFIG_SERVICE_FILESYSTEM_LOG_LEVEL); static PBL_MUTEX_DEFINE(s_pfs_mutex); -#define IS_FILE_TYPE(file_type, type) ((file_type) == (type)) +#define IS_FILE_TYPE(file_type, type) ((file_type) == (type)) -#define PFS_PAGE_SIZE FLASH_FILESYSTEM_BLOCK_SIZE +#define PFS_PAGE_SIZE FLASH_FILESYSTEM_BLOCK_SIZE #define PFS_PAGES_PER_ERASE_SECTOR (SECTOR_SIZE_BYTES / PFS_PAGE_SIZE) -#define GC_REGION_SIZE SECTOR_SIZE_BYTES +#define GC_REGION_SIZE SECTOR_SIZE_BYTES // The filesystem is broken into discrete blocks called 'pages'. Each page has // a header that describes the contents contained within it. Static fields are // CRC protected and are verified each time a file is opened. Convenience // defines and the struct are defined below. -#define PAGE_FLAG_ERASED_PAGE (1 << 0) // page erase completed -#define PAGE_FLAG_DELETED_PAGE (1 << 1) // page was deleted -#define PAGE_FLAG_START_PAGE (1 << 2) // first page of file -#define PAGE_FLAG_CONT_PAGE (1 << 3) // continuation page of file +#define PAGE_FLAG_ERASED_PAGE (1 << 0) // page erase completed +#define PAGE_FLAG_DELETED_PAGE (1 << 1) // page was deleted +#define PAGE_FLAG_START_PAGE (1 << 2) // first page of file +#define PAGE_FLAG_CONT_PAGE (1 << 3) // continuation page of file -#define PAGE_FLAGS_BIT_SET(page_flags, type) ((~(page_flags) & (type)) != 0) +#define PAGE_FLAGS_BIT_SET(page_flags, type) ((~(page_flags) & (type)) != 0) #define DELETED_START_PAGE_MASK \ (PAGE_FLAG_ERASED_PAGE | PAGE_FLAG_DELETED_PAGE | PAGE_FLAG_START_PAGE) @@ -61,65 +61,64 @@ static PBL_MUTEX_DEFINE(s_pfs_mutex); // Continuation Pages: // | PageHeader | File Data -#define IS_PAGE_TYPE(page_flags, type) \ - (PAGE_FLAGS_BIT_SET(page_flags, type) && \ - !PAGE_FLAGS_BIT_SET(page_flags, PAGE_FLAG_DELETED_PAGE)) +#define IS_PAGE_TYPE(page_flags, type) \ + (PAGE_FLAGS_BIT_SET(page_flags, type) && !PAGE_FLAGS_BIT_SET(page_flags, PAGE_FLAG_DELETED_PAGE)) #define SET_PAGE_FLAGS(page_flags, type) ((page_flags) &= ~(type)) -#define PFS_MAGIC 0x50 -#define PFS_VERS 0x01 +#define PFS_MAGIC 0x50 +#define PFS_VERS 0x01 #define PFS_CUR_VERSION ((PFS_MAGIC << 8) | PFS_VERS) -#define LAST_WRITTEN_TAG 0xfe -#define LAST_WRITTEN_UNMARK 0xfc +#define LAST_WRITTEN_TAG 0xfe +#define LAST_WRITTEN_UNMARK 0xfc typedef struct PACKED PageHeader { - uint16_t version; - uint8_t last_written; //!< used by wear leveling algo - uint8_t page_flags; - uint8_t rsvd0[4]; - uint32_t erase_count; - uint8_t rsvd1[9]; //!< for future extensions - uint8_t next_page_crc; - uint16_t next_page; - uint32_t hdr_crc; //!< a crc for all data that comes before it + uint16_t version; + uint8_t last_written; //!< used by wear leveling algo + uint8_t page_flags; + uint8_t rsvd0[4]; + uint32_t erase_count; + uint8_t rsvd1[9]; //!< for future extensions + uint8_t next_page_crc; + uint16_t next_page; + uint32_t hdr_crc; //!< a crc for all data that comes before it } PageHeader; typedef struct PACKED FileHeader { - uint32_t file_size; - uint8_t file_type; - uint8_t file_namelen; - uint8_t rsvd[6]; - uint32_t hdr_crc; + uint32_t file_size; + uint8_t file_type; + uint8_t file_namelen; + uint8_t rsvd[6]; + uint32_t hdr_crc; } FileHeader; // File metadata stored immediately after the header in the first page typedef struct PACKED FileMetaData { - uint16_t tmp_state; - uint16_t create_state; - uint16_t delete_state; - uint8_t rsvd[10]; - uint8_t uuid[16]; //!< rsvd for UUIDs in the future - char name[0]; + uint16_t tmp_state; + uint16_t create_state; + uint16_t delete_state; + uint8_t rsvd[10]; + uint8_t uuid[16]; //!< rsvd for UUIDs in the future + char name[0]; } FileMetaData; -#define TMP_STATE_DONE 0x0 -#define CREATE_STATE_DONE 0x0 -#define DELETE_STATE_DONE 0x0 +#define TMP_STATE_DONE 0x0 +#define CREATE_STATE_DONE 0x0 +#define DELETE_STATE_DONE 0x0 -#define TMP_STATE_OFFSET (offsetof(FileMetaData, tmp_state)) -#define CREATE_STATE_OFFSET (offsetof(FileMetaData, create_state)) -#define DELETE_STATE_OFFSET (offsetof(FileMetaData, delete_state)) +#define TMP_STATE_OFFSET (offsetof(FileMetaData, tmp_state)) +#define CREATE_STATE_OFFSET (offsetof(FileMetaData, create_state)) +#define DELETE_STATE_OFFSET (offsetof(FileMetaData, delete_state)) -#define AVAIL_BYTES_OFFSET (sizeof(PageHeader)) -#define FILEHEADER_OFFSET (sizeof(PageHeader)) -#define METADATA_OFFSET (FILEHEADER_OFFSET + sizeof(FileHeader)) -#define FILEDATA_LEN (sizeof(FileHeader) + sizeof(FileMetaData)) -#define FILE_NAME_OFFSET (FILEHEADER_OFFSET + FILEDATA_LEN) +#define AVAIL_BYTES_OFFSET (sizeof(PageHeader)) +#define FILEHEADER_OFFSET (sizeof(PageHeader)) +#define METADATA_OFFSET (FILEHEADER_OFFSET + sizeof(FileHeader)) +#define FILEDATA_LEN (sizeof(FileHeader) + sizeof(FileMetaData)) +#define FILE_NAME_OFFSET (FILEHEADER_OFFSET + FILEDATA_LEN) // defines & struct for data that needs to be tracked once a file is opened -#define INVALID_PAGE ((uint16_t)~0) +#define INVALID_PAGE ((uint16_t)~0) #define GC_FILE_NAME "GC" #define GC_DATA_VALID (0x1) @@ -142,53 +141,53 @@ typedef struct { typedef struct File { // file specifics loaded from header - char *name; - uint8_t namelen; - uint32_t file_size; - uint16_t start_page; //!< the physical page at which the file begins - uint16_t start_offset; //!< offset at which file data begins - uint8_t file_type; + char *name; + uint8_t namelen; + uint32_t file_size; + uint16_t start_page; //!< the physical page at which the file begins + uint16_t start_offset; //!< offset at which file data begins + uint8_t file_type; // items dynamically changing - uint8_t op_flags; - bool is_tmp; - uint32_t offset; // the current offset within the file - uint16_t curr_page; // the current page the offset is on + uint8_t op_flags; + bool is_tmp; + uint32_t offset; // the current offset within the file + uint16_t curr_page; // the current page the offset is on FilePageCache *pg_cache; - uint8_t pg_cache_len; + uint8_t pg_cache_len; } File; // The backing information tracked using the handle returned to callers -#define FD_STATUS_IN_USE 0x0 // A caller is using this fd -#define FD_STATUS_UNREFERENCED 0x1 // Valid data, no one using -#define FD_STATUS_FREE 0x2 // No data in the fd +#define FD_STATUS_IN_USE 0x0 // A caller is using this fd +#define FD_STATUS_UNREFERENCED 0x1 // Valid data, no one using +#define FD_STATUS_FREE 0x2 // No data in the fd // max number of files (cache size) that can be opened at any given time -#define PFS_FD_SET_SIZE 8 +#define PFS_FD_SET_SIZE 8 // 1 fd dedicated for GC (we always want an FD available for this operation!) -#define GC_FD_HANDLE_ID (FD_INDEX_OFFSET + PFS_FD_SET_SIZE) -#define GC_FD_SET_SIZE 1 -#define MAX_FD_HANDLES (PFS_FD_SET_SIZE + GC_FD_SET_SIZE) +#define GC_FD_HANDLE_ID (FD_INDEX_OFFSET + PFS_FD_SET_SIZE) +#define GC_FD_SET_SIZE 1 +#define MAX_FD_HANDLES (PFS_FD_SET_SIZE + GC_FD_SET_SIZE) // Offset for FD numbers so that zero can't be a valid FD. This makes it much // less likely for a file descriptor in an uninitialized object to reference a // valid open file. -#define FD_INDEX_OFFSET 1001 +#define FD_INDEX_OFFSET 1001 static uint16_t time_closed_counter = 0; typedef struct FileDesc { - File file; - uint16_t time_closed; //!< used for fd caching scheme - uint8_t fd_status; + File file; + uint16_t time_closed; //!< used for fd caching scheme + uint8_t fd_status; } FileDesc; static FileDesc s_pfs_avail_fd[MAX_FD_HANDLES]; // All accesses to s_pfs_avail_fd should be handled through the PFS_FD macro. -#define PFS_FD(fd) s_pfs_avail_fd[(fd)-FD_INDEX_OFFSET] +#define PFS_FD(fd) s_pfs_avail_fd[(fd) - FD_INDEX_OFFSET] typedef struct GCBlock { - bool block_valid; - uint8_t block_writes; + bool block_valid; + uint8_t block_writes; uint16_t gc_start_page; } GCBlock; @@ -201,16 +200,16 @@ void pfs_reset_all_state(void) { time_closed_counter = 0; } -#define FD_VALID(fd) ((((fd) >= FD_INDEX_OFFSET) && \ - ((fd) < (FD_INDEX_OFFSET+MAX_FD_HANDLES))) && \ - (PFS_FD(fd).fd_status == FD_STATUS_IN_USE)) +#define FD_VALID(fd) \ + ((((fd) >= FD_INDEX_OFFSET) && ((fd) < (FD_INDEX_OFFSET + MAX_FD_HANDLES))) && \ + (PFS_FD(fd).fd_status == FD_STATUS_IN_USE)) #define VALID_TYPE(type) ((type) == FILE_TYPE_STATIC) typedef struct { ListNode list_node; //! Name of the file to watch - const char* name; + const char *name; //! Which events will invoke callbacks (see FILE_CHANGED_EVENT_ flags in pfs.h) uint8_t event_flags; //! Caller provided data pointer @@ -292,7 +291,7 @@ static bool page_type_bits_set(uint8_t page_flags, uint8_t type_mask) { static bool page_is_deleted(uint8_t page_flags) { return (page_type_bits_set(page_flags, DELETED_START_PAGE_MASK) || - page_type_bits_set(page_flags, DELETED_CONT_PAGE_MASK)); + page_type_bits_set(page_flags, DELETED_CONT_PAGE_MASK)); } static bool page_is_erased(uint8_t page_flags) { @@ -300,8 +299,7 @@ static bool page_is_erased(uint8_t page_flags) { } static bool page_is_unallocated(uint8_t page_flags) { - return (page_is_deleted(page_flags) || page_is_erased(page_flags) || - (page_flags == 0xff)); + return (page_is_deleted(page_flags) || page_is_erased(page_flags) || (page_flags == 0xff)); } static uint8_t prv_get_page_flags(uint16_t pg) { @@ -341,14 +339,12 @@ static void prv_build_page_flags_cache(void) { prv_invalidate_page_flags_cache_all(); } -static void update_curr_state(uint16_t start_page, uint32_t offset, - uint16_t state) { +static void update_curr_state(uint16_t start_page, uint32_t offset, uint16_t state) { offset += prv_page_to_flash_offset(start_page) + METADATA_OFFSET; prv_flash_write((uint8_t *)&state, sizeof(state), offset); } -static bool get_curr_state(uint16_t start_page, uint32_t offset, - uint16_t state) { +static bool get_curr_state(uint16_t start_page, uint32_t offset, uint16_t state) { uint16_t curr_state; offset += prv_page_to_flash_offset(start_page) + METADATA_OFFSET; prv_flash_read((uint8_t *)&curr_state, sizeof(state), offset); @@ -372,8 +368,7 @@ static uint32_t compute_pg_header_crc(PageHeader *hdr) { // don't factor fields which can change after file write into crc calc crc_hdr.last_written = 0xff; - return legacy_defective_checksum_memory(&crc_hdr, - offsetof(PageHeader, hdr_crc)); + return legacy_defective_checksum_memory(&crc_hdr, offsetof(PageHeader, hdr_crc)); } static uint32_t compute_file_header_crc(FileHeader *hdr) { @@ -381,8 +376,7 @@ static uint32_t compute_file_header_crc(FileHeader *hdr) { } // the start page is written to, the end page is not written to. -static void prv_write_erased_header_on_page_range(uint16_t start, uint16_t end, - int erase_count) { +static void prv_write_erased_header_on_page_range(uint16_t start, uint16_t end, int erase_count) { // create a header representing an erase header PageHeader pg_hdr; memset(&pg_hdr, 0xff, sizeof(pg_hdr)); @@ -393,7 +387,7 @@ static void prv_write_erased_header_on_page_range(uint16_t start, uint16_t end, // write that header to each region in pfs uint8_t erased_header_size = offsetof(PageHeader, erase_count) + sizeof(pg_hdr.erase_count); for (uint16_t i = start; i < end; i++) { - prv_flash_write((uint8_t*)&pg_hdr, erased_header_size, prv_page_to_flash_offset(i)); + prv_flash_write((uint8_t *)&pg_hdr, erased_header_size, prv_page_to_flash_offset(i)); } } @@ -404,8 +398,7 @@ typedef enum { HdrVersionCheckFail = -2 } ReadHeaderStatus; -static ReadHeaderStatus read_header(uint16_t page, PageHeader *pg_hdr, - FileHeader *file_hdr) { +static ReadHeaderStatus read_header(uint16_t page, PageHeader *pg_hdr, FileHeader *file_hdr) { prv_flash_read((uint8_t *)pg_hdr, sizeof(*pg_hdr), prv_page_to_flash_offset(page)); if (compute_pg_header_crc(pg_hdr) != pg_hdr->hdr_crc) { @@ -413,17 +406,16 @@ static ReadHeaderStatus read_header(uint16_t page, PageHeader *pg_hdr, } if (pg_hdr->version > PFS_CUR_VERSION) { - PBL_LOG_ERR("Unexpected Version Header, 0x%x", - (int)pg_hdr->version); - return (HdrVersionCheckFail); // let caller handle + PBL_LOG_ERR("Unexpected Version Header, 0x%x", (int)pg_hdr->version); + return (HdrVersionCheckFail); // let caller handle } if (!IS_PAGE_TYPE(pg_hdr->page_flags, PAGE_FLAG_START_PAGE)) { return (PageHdrValid); } - prv_flash_read((uint8_t *)file_hdr, sizeof(*file_hdr), FILEHEADER_OFFSET + - prv_page_to_flash_offset(page)); + prv_flash_read((uint8_t *)file_hdr, sizeof(*file_hdr), + FILEHEADER_OFFSET + prv_page_to_flash_offset(page)); if (compute_file_header_crc(file_hdr) != file_hdr->hdr_crc) { return (HdrCrcCorrupt); @@ -434,17 +426,16 @@ static ReadHeaderStatus read_header(uint16_t page, PageHeader *pg_hdr, static status_t write_file_header(FileHeader *hdr, uint16_t pg) { hdr->hdr_crc = compute_file_header_crc(hdr); - prv_flash_write((uint8_t *)hdr, sizeof(*hdr), prv_page_to_flash_offset(pg) + - FILEHEADER_OFFSET); + prv_flash_write((uint8_t *)hdr, sizeof(*hdr), prv_page_to_flash_offset(pg) + FILEHEADER_OFFSET); return (S_SUCCESS); } static status_t write_pg_header(PageHeader *hdr, uint16_t pg) { // recover current erase count which is updated in erase routine prv_flash_read((uint8_t *)&hdr->erase_count, sizeof(hdr->erase_count), - prv_page_to_flash_offset(pg) + offsetof(PageHeader, erase_count)); + prv_page_to_flash_offset(pg) + offsetof(PageHeader, erase_count)); prv_flash_read((uint8_t *)&hdr->last_written, sizeof(hdr->last_written), - prv_page_to_flash_offset(pg) + offsetof(PageHeader, last_written)); + prv_page_to_flash_offset(pg) + offsetof(PageHeader, last_written)); hdr->hdr_crc = compute_pg_header_crc(hdr); prv_flash_write((uint8_t *)hdr, sizeof(*hdr), prv_page_to_flash_offset(pg)); @@ -457,8 +448,7 @@ static status_t unlink_flash_file(uint16_t page); // note: the goal here is to do as few flash reads as possible // while scanning the flash to find a given file. static status_t locate_flash_file(const char *name, uint16_t *page) { - const int file_namelen_offset = FILEHEADER_OFFSET + - offsetof(FileHeader, file_namelen); + const int file_namelen_offset = FILEHEADER_OFFSET + offsetof(FileHeader, file_namelen); uint8_t namelen = strlen(name); uint16_t corrupt_pg = INVALID_PAGE; @@ -468,20 +458,19 @@ static status_t locate_flash_file(const char *name, uint16_t *page) { pg_hdr.page_flags = prv_get_page_flags(pg); if (!IS_PAGE_TYPE(pg_hdr.page_flags, PAGE_FLAG_START_PAGE)) { - continue; // only start pages contain file name info + continue; // only start pages contain file name info } prv_flash_read((uint8_t *)&file_hdr.file_namelen, sizeof(file_hdr.file_namelen), - prv_page_to_flash_offset(pg) + file_namelen_offset); + prv_page_to_flash_offset(pg) + file_namelen_offset); if (file_hdr.file_namelen == namelen) { char file_name[namelen]; - prv_flash_read((uint8_t *)file_name, namelen, prv_page_to_flash_offset(pg) + - FILE_NAME_OFFSET); + prv_flash_read((uint8_t *)file_name, namelen, + prv_page_to_flash_offset(pg) + FILE_NAME_OFFSET); if ((memcmp(name, file_name, namelen) == 0) && (!is_tmp_file(pg))) { - if (read_header(pg, &pg_hdr, &file_hdr) == HdrCrcCorrupt) { PBL_LOG_WRN("CRC corrupt for page %d", pg); if (corrupt_pg == INVALID_PAGE) { @@ -514,9 +503,9 @@ static int get_updated_erase_hdr(PageHeader *hdr, uint16_t page) { // before wiping a page, get its erase_count. This is not currently used but // enables future wear leveling improvements / analysis prv_flash_read((uint8_t *)&hdr->erase_count, sizeof(hdr->erase_count), - prv_page_to_flash_offset(page) + offsetof(PageHeader, erase_count)); + prv_page_to_flash_offset(page) + offsetof(PageHeader, erase_count)); prv_flash_read((uint8_t *)&hdr->last_written, sizeof(hdr->last_written), - prv_page_to_flash_offset(page) + offsetof(PageHeader, last_written)); + prv_page_to_flash_offset(page) + offsetof(PageHeader, last_written)); // feed watchdog since erases can take a while & give lower priority tasks // a little time in case we are calling this from a high priority task and @@ -536,7 +525,7 @@ static int get_updated_erase_hdr(PageHeader *hdr, uint16_t page) { hdr->version = PFS_CUR_VERSION; if (hdr->last_written != LAST_WRITTEN_TAG) { - hdr->last_written = 0xff; // reset last written tag + hdr->last_written = 0xff; // reset last written tag } return (S_SUCCESS); @@ -551,7 +540,7 @@ static void update_last_written_page(void) { for (uint16_t pg = 0; pg < s_pfs_page_count; pg++) { PageHeader hdr; prv_flash_read((uint8_t *)&hdr.last_written, sizeof(hdr.last_written), - prv_page_to_flash_offset(pg) + offsetof(PageHeader, last_written)); + prv_page_to_flash_offset(pg) + offsetof(PageHeader, last_written)); if (hdr.last_written == LAST_WRITTEN_TAG) { s_last_page_written = pg; PBL_LOG_DBG("Last written page %d", (int)s_last_page_written); @@ -575,12 +564,10 @@ static void update_last_written_page(void) { //! @return A bitmask indicating which pages in the sector are occupied. //! For example, 0b1001 would indicate page 0 and page 3 within the sector //! are in use -static uint32_t prv_get_sector_page_status(uint16_t region, - uint16_t *first_free_page) { - +static uint32_t prv_get_sector_page_status(uint16_t region, uint16_t *first_free_page) { // our bitmask needs to be large enough to describe all the pages in a sector _Static_assert((sizeof(uint32_t) * 8) >= PFS_PAGES_PER_ERASE_SECTOR, - "Number of PFS pages is larger than bitmask"); + "Number of PFS pages is larger than bitmask"); *first_free_page = INVALID_PAGE; @@ -632,31 +619,30 @@ static int prv_find_free_erase_region(bool skip_gc_region) { return (-1); } -static status_t garbage_collect_sector(uint16_t *free_page, - uint16_t sector_start_page, uint32_t sectors_active); +static status_t garbage_collect_sector(uint16_t *free_page, uint16_t sector_start_page, + uint32_t sectors_active); //! Updates the last written page to point to next_page static NOINLINE void prv_update_last_written_page(uint16_t next_page) { - PageHeader hdr = { 0 }; + PageHeader hdr = {0}; uint16_t prev_written_page = s_last_page_written; // unmark the previous page as last written (should only have one pg // marked as written at any given time). prv_flash_read((uint8_t *)&hdr.last_written, sizeof(hdr.last_written), - prv_page_to_flash_offset(prev_written_page) + - offsetof(PageHeader, last_written)); + prv_page_to_flash_offset(prev_written_page) + offsetof(PageHeader, last_written)); if (hdr.last_written == LAST_WRITTEN_TAG) { hdr.last_written = LAST_WRITTEN_UNMARK; - prv_flash_write((uint8_t *)&hdr.last_written, sizeof(hdr.last_written), - prv_page_to_flash_offset(prev_written_page) + - offsetof(PageHeader, last_written)); + prv_flash_write( + (uint8_t *)&hdr.last_written, sizeof(hdr.last_written), + prv_page_to_flash_offset(prev_written_page) + offsetof(PageHeader, last_written)); } hdr.last_written = LAST_WRITTEN_TAG; prv_flash_write((uint8_t *)&hdr.last_written, sizeof(hdr.last_written), - prv_page_to_flash_offset(next_page) + offsetof(PageHeader, last_written)); + prv_page_to_flash_offset(next_page) + offsetof(PageHeader, last_written)); } //! The wear leveling strategy deployed is as follows: @@ -676,24 +662,21 @@ static NOINLINE void prv_update_last_written_page(uint16_t next_page) { //! @param use_gc_allocator - should be true iff the page should be allocated //! from the region dedicated for garbage collection handling //! @param use_page - should be true iff the page is about to be used in a file. -static status_t find_free_page(uint16_t *free_page, bool use_gc_allocator, - bool use_page) { - +static status_t find_free_page(uint16_t *free_page, bool use_gc_allocator, bool use_page) { // if we are allocating a file from the garbage collection region, // we don't need to search for free pages since we know what ones to use if (use_gc_allocator) { - uint16_t next_page = (*free_page == INVALID_PAGE) ? s_gc_block.gc_start_page : - (*free_page + 1); + uint16_t next_page = (*free_page == INVALID_PAGE) ? s_gc_block.gc_start_page : (*free_page + 1); PBL_ASSERTN(s_gc_block.block_valid && (next_page >= s_gc_block.gc_start_page) && - (next_page < (s_gc_block.gc_start_page + PFS_PAGES_PER_ERASE_SECTOR))); + (next_page < (s_gc_block.gc_start_page + PFS_PAGES_PER_ERASE_SECTOR))); *free_page = next_page; return (S_SUCCESS); } uint16_t next_page = INVALID_PAGE; uint16_t start_pg = (s_last_page_written + 1) % s_pfs_page_count; - uint16_t remaining_pgs_in_block = PFS_PAGES_PER_ERASE_SECTOR - - (start_pg % PFS_PAGES_PER_ERASE_SECTOR); + uint16_t remaining_pgs_in_block = + PFS_PAGES_PER_ERASE_SECTOR - (start_pg % PFS_PAGES_PER_ERASE_SECTOR); uint16_t gc_erase_region = s_gc_block.gc_start_page / PFS_PAGES_PER_ERASE_SECTOR; bool in_gc_region = (gc_erase_region == (start_pg / PFS_PAGES_PER_ERASE_SECTOR)); @@ -745,7 +728,7 @@ static status_t find_free_page(uint16_t *free_page, bool use_gc_allocator, } } - if (next_page != INVALID_PAGE) { // a free page was found + if (next_page != INVALID_PAGE) { // a free page was found if (use_page) { prv_update_last_written_page(next_page); } @@ -765,8 +748,7 @@ static status_t find_free_page(uint16_t *free_page, bool use_gc_allocator, //! @param file_size - The amount of file space to erase //! @param max_elapsed_ticks - The max amount of time to spend attempting to //! find / create the free space. If 0, then there is no timeout -static void pfs_prepare_for_file_creation(uint32_t file_size, - uint32_t max_elapsed_ticks) { +static void pfs_prepare_for_file_creation(uint32_t file_size, uint32_t max_elapsed_ticks) { uint16_t pages_to_find = (file_size + PFS_PAGE_SIZE) / PFS_PAGE_SIZE; uint16_t free_page = 0; @@ -791,21 +773,20 @@ static void pfs_prepare_for_file_creation(uint32_t file_size, } pbl_mutex_lock(&s_pfs_mutex, PBL_FOREVER); - s_last_page_written = last_written_page; // reset our tracker + s_last_page_written = last_written_page; // reset our tracker pbl_mutex_unlock(&s_pfs_mutex); } // In the future, the next_page field may be updated dynamically (i.e to resize // a file). Use a CRC to catch corruption issues in this field. static uint8_t crc8_next_page(uint16_t next_page) { - return crc8_calculate_bytes((uint8_t*)&next_page, sizeof(next_page), true /* big_endian */); + return crc8_calculate_bytes((uint8_t *)&next_page, sizeof(next_page), true /* big_endian */); } static status_t get_next_page(uint16_t curr_page, uint16_t *next_page) { PageHeader hdr; - prv_flash_read((uint8_t *)&hdr.next_page_crc, sizeof(hdr.next_page_crc) + - sizeof(hdr.next_page), prv_page_to_flash_offset(curr_page) + - offsetof(PageHeader, next_page_crc)); + prv_flash_read((uint8_t *)&hdr.next_page_crc, sizeof(hdr.next_page_crc) + sizeof(hdr.next_page), + prv_page_to_flash_offset(curr_page) + offsetof(PageHeader, next_page_crc)); *next_page = hdr.next_page; if (*next_page == INVALID_PAGE) { @@ -818,12 +799,12 @@ static status_t get_next_page(uint16_t curr_page, uint16_t *next_page) { } } - return (E_INTERNAL); // the next page pointer is corrupt + return (E_INTERNAL); // the next page pointer is corrupt } static status_t unlink_flash_file(uint16_t page) { uint16_t first_page = page; - if (page > s_pfs_page_count) { // should never happen + if (page > s_pfs_page_count) { // should never happen return (E_INTERNAL); } @@ -835,11 +816,11 @@ static status_t unlink_flash_file(uint16_t page) { int unlink_count = 0; do { if ((page > s_pfs_page_count) || (unlink_count > s_pfs_page_count)) { - rv = E_INTERNAL; // should never happen + rv = E_INTERNAL; // should never happen break; } prv_flash_write((uint8_t *)&hdr.page_flags, sizeof(hdr.page_flags), - prv_page_to_flash_offset(page) + offsetof(PageHeader, page_flags)); + prv_page_to_flash_offset(page) + offsetof(PageHeader, page_flags)); unlink_count++; } while (get_next_page(page, &page) == S_SUCCESS); @@ -865,24 +846,23 @@ static status_t create_flash_file(File *f) { } pg_hdr.version = PFS_CUR_VERSION; - SET_PAGE_FLAGS(pg_hdr.page_flags, - PAGE_FLAG_START_PAGE | PAGE_FLAG_ERASED_PAGE); + SET_PAGE_FLAGS(pg_hdr.page_flags, PAGE_FLAG_START_PAGE | PAGE_FLAG_ERASED_PAGE); // Note: We have already allocated 1 pg so just subtract 1 to roundup // We assume all pages are the same size - int pgs_needed = (f->file_size + FILEDATA_LEN + strlen(f->name) - 1) / - free_bytes_in_page(start_page); + int pgs_needed = + (f->file_size + FILEDATA_LEN + strlen(f->name) - 1) / free_bytes_in_page(start_page); uint16_t curr_page = start_page; uint16_t next_page = start_page; for (; pgs_needed >= 0; pgs_needed--) { // flag the page as in use prv_flash_write((uint8_t *)&pg_hdr.page_flags, sizeof(pg_hdr.page_flags), - prv_page_to_flash_offset(curr_page) + offsetof(PageHeader, page_flags)); + prv_page_to_flash_offset(curr_page) + offsetof(PageHeader, page_flags)); - if (pgs_needed > 0) { // do we need to find a free page + if (pgs_needed > 0) { // do we need to find a free page if ((rv = find_free_page(&next_page, use_gc_allocator, true)) != S_SUCCESS) { - unlink_flash_file(start_page); // on failure, unallocate + unlink_flash_file(start_page); // on failure, unallocate return (rv); } pg_hdr.next_page_crc = crc8_next_page(next_page); @@ -893,11 +873,10 @@ static status_t create_flash_file(File *f) { // continuation page header settings memset(&pg_hdr, 0xff, sizeof(PageHeader)); pg_hdr.version = PFS_CUR_VERSION; - SET_PAGE_FLAGS(pg_hdr.page_flags, - PAGE_FLAG_CONT_PAGE | PAGE_FLAG_ERASED_PAGE); + SET_PAGE_FLAGS(pg_hdr.page_flags, PAGE_FLAG_CONT_PAGE | PAGE_FLAG_ERASED_PAGE); } else { write_pg_header(&pg_hdr, curr_page); - break; // we are done + break; // we are done } } @@ -912,7 +891,7 @@ static status_t create_flash_file(File *f) { write_file_header(&file_hdr, start_page); prv_flash_write((uint8_t *)f->name, strlen(f->name), - prv_page_to_flash_offset(start_page) + FILE_NAME_OFFSET); + prv_page_to_flash_offset(start_page) + FILE_NAME_OFFSET); if (!f->is_tmp) { update_curr_state(f->start_page, TMP_STATE_OFFSET, TMP_STATE_DONE); @@ -928,14 +907,12 @@ static status_t scan_to_offset(File *f, uint32_t *pg_offset) { uint32_t data_offset = f->offset + f->start_offset; // a read or write could have ended at a page boundary so check for that - if ((f->curr_page == INVALID_PAGE) || - ((data_offset % free_bytes_in_page(f->curr_page)) == 0)) { + if ((f->curr_page == INVALID_PAGE) || ((data_offset % free_bytes_in_page(f->curr_page)) == 0)) { uint16_t next_page = f->start_page; int pages_to_seek = (data_offset / free_bytes_in_page(f->start_page)); int closest_match = -1; if (((f->op_flags & OP_FLAG_USE_PAGE_CACHE) != 0) && (f->pg_cache != NULL)) { - // Flash pages are singly linked together with the next pointer located // on the current flash page. This means the optimal page to find in the // cache is the one closest to what we are looking for without going past @@ -945,7 +922,7 @@ static status_t scan_to_offset(File *f, uint32_t *pg_offset) { if (pgc->virtual_pg > pages_to_seek) { continue; } else if ((closest_match == -1) || - (f->pg_cache[closest_match].virtual_pg < pgc->virtual_pg)) { + (f->pg_cache[closest_match].virtual_pg < pgc->virtual_pg)) { closest_match = i; } } @@ -1007,7 +984,7 @@ typedef enum { //! a tmp file static AvailFdStatus get_avail_fd(const char *name, int *fdp, bool is_tmp) { // First search to see if the fd has already been located - for (int fd = FD_INDEX_OFFSET; fd < FD_INDEX_OFFSET+MAX_FD_HANDLES; fd++) { + for (int fd = FD_INDEX_OFFSET; fd < FD_INDEX_OFFSET + MAX_FD_HANDLES; fd++) { File *f = &PFS_FD(fd).file; if ((f->is_tmp == is_tmp) && (f->name != NULL)) { if (strcmp(f->name, name) == 0) { @@ -1022,7 +999,7 @@ static AvailFdStatus get_avail_fd(const char *name, int *fdp, bool is_tmp) { int unref = -1; uint16_t curr_time_closed = 0; - for (int fd = FD_INDEX_OFFSET; fd < FD_INDEX_OFFSET+PFS_FD_SET_SIZE; fd++) { + for (int fd = FD_INDEX_OFFSET; fd < FD_INDEX_OFFSET + PFS_FD_SET_SIZE; fd++) { if (PFS_FD(fd).fd_status == FD_STATUS_FREE) { *fdp = fd; return (FDAvail); @@ -1037,7 +1014,7 @@ static AvailFdStatus get_avail_fd(const char *name, int *fdp, bool is_tmp) { *fdp = unref; if (unref != -1) { - mark_fd_free(unref); // clean up previous file state + mark_fd_free(unref); // clean up previous file state } return ((*fdp != -1) ? FDAvail : NoFDAvail); @@ -1077,8 +1054,7 @@ int pfs_read(int fd, void *buf_ptr, size_t size) { } if ((file->offset + size) > file->file_size) { - PBL_LOG_DBG("Out of bound read at %d", - (int)(file->offset + size)); + PBL_LOG_DBG("Out of bound read at %d", (int)(file->offset + size)); res = E_RANGE; goto cleanup; } @@ -1092,23 +1068,21 @@ int pfs_read(int fd, void *buf_ptr, size_t size) { // we have found the page from which to start reading data from size_t bytes_read = 0; while (bytes_read < size) { - size_t bytes_to_read = MIN(free_bytes_in_page(file->curr_page) - pg_offset, - size - bytes_read); + size_t bytes_to_read = MIN(free_bytes_in_page(file->curr_page) - pg_offset, size - bytes_read); prv_flash_read(buf + bytes_read, bytes_to_read, - prv_page_to_flash_offset(file->curr_page) + AVAIL_BYTES_OFFSET + pg_offset); + prv_page_to_flash_offset(file->curr_page) + AVAIL_BYTES_OFFSET + pg_offset); bytes_read += bytes_to_read; file->offset += bytes_to_read; if (bytes_read == size) { - break; // we are done + break; // we are done } - pg_offset = 0; // first usable byte next page + pg_offset = 0; // first usable byte next page if (get_next_page(file->curr_page, &file->curr_page) != S_SUCCESS) { - PBL_LOG_WRN("R:Couldn't find next page for %d", - file->curr_page); + PBL_LOG_WRN("R:Couldn't find next page for %d", file->curr_page); res = E_INTERNAL; goto cleanup; } @@ -1136,9 +1110,7 @@ int pfs_seek(int fd, int offset, FSeekType seek_type) { } // allow one to seek to very EOF - if ((new_offset >= 0) && - (new_offset <= (int)PFS_FD(fd).file.file_size)) { - + if ((new_offset >= 0) && (new_offset <= (int)PFS_FD(fd).file.file_size)) { if (PFS_FD(fd).file.offset != (uint32_t)new_offset) { PFS_FD(fd).file.offset = (uint32_t)new_offset; PFS_FD(fd).file.curr_page = INVALID_PAGE; @@ -1182,11 +1154,11 @@ int pfs_write(int fd, const void *buf_ptr, size_t size) { size_t bytes_written = 0; while (bytes_written < size) { - size_t bytes_to_write = MIN(free_bytes_in_page(file->curr_page) - pg_offset, - size - bytes_written); + size_t bytes_to_write = + MIN(free_bytes_in_page(file->curr_page) - pg_offset, size - bytes_written); prv_flash_write(buf + bytes_written, bytes_to_write, - prv_page_to_flash_offset(file->curr_page) + AVAIL_BYTES_OFFSET + pg_offset); + prv_page_to_flash_offset(file->curr_page) + AVAIL_BYTES_OFFSET + pg_offset); bytes_written += bytes_to_write; file->offset += bytes_to_write; @@ -1195,10 +1167,9 @@ int pfs_write(int fd, const void *buf_ptr, size_t size) { break; } - pg_offset = 0; // first usable byte next page + pg_offset = 0; // first usable byte next page if (get_next_page(file->curr_page, &file->curr_page) != S_SUCCESS) { - PBL_LOG_WRN("W:Couldn't find next page for %d", - file->curr_page); + PBL_LOG_WRN("W:Couldn't find next page for %d", file->curr_page); res = E_INTERNAL; goto cleanup; } @@ -1224,8 +1195,8 @@ void pfs_set_size(uint32_t new_size, bool new_region_erased) { prv_build_page_flags_cache(); if (new_region_erased) { - prv_write_erased_header_on_page_range((prev_size/PFS_PAGE_SIZE), - (new_size/PFS_PAGE_SIZE), 1); + prv_write_erased_header_on_page_range((prev_size / PFS_PAGE_SIZE), (new_size / PFS_PAGE_SIZE), + 1); } update_last_written_page(); @@ -1236,20 +1207,18 @@ bool pfs_active_in_region(uint32_t start_address, uint32_t ending_address) { uint16_t ending_page = (ending_address) / PFS_PAGE_SIZE; for (uint16_t pg = starting_page; pg < ending_page; pg++) { - PageHeader hdr; // read version first, check magic, then check version and make sure it makes sense prv_flash_read((uint8_t *)&hdr.version, sizeof(hdr.version), - prv_page_to_flash_offset(pg) + offsetof(PageHeader, version)); + prv_page_to_flash_offset(pg) + offsetof(PageHeader, version)); if ((hdr.version >> 8) != PFS_MAGIC) { continue; } if (hdr.version > PFS_CUR_VERSION) { - PBL_LOG_WRN("Incompatible version of PFS active, 0x%x", - hdr.version); + PBL_LOG_WRN("Incompatible version of PFS active, 0x%x", hdr.version); // pfs filesystem is a newer version than we support return (false); @@ -1257,11 +1226,9 @@ bool pfs_active_in_region(uint32_t start_address, uint32_t ending_address) { hdr.page_flags = prv_get_page_flags(pg); // read the header flags to see if the page is a file start page or an erased page - if (IS_PAGE_TYPE(hdr.page_flags, PAGE_FLAG_ERASED_PAGE) - || IS_PAGE_TYPE(hdr.page_flags, PAGE_FLAG_START_PAGE) - || IS_PAGE_TYPE(hdr.page_flags, PAGE_FLAG_CONT_PAGE) - || page_is_deleted(hdr.page_flags)) { - + if (IS_PAGE_TYPE(hdr.page_flags, PAGE_FLAG_ERASED_PAGE) || + IS_PAGE_TYPE(hdr.page_flags, PAGE_FLAG_START_PAGE) || + IS_PAGE_TYPE(hdr.page_flags, PAGE_FLAG_CONT_PAGE) || page_is_deleted(hdr.page_flags)) { return (true); } } @@ -1285,16 +1252,15 @@ void pfs_reboot_cleanup(void) { uint8_t page_flags = prv_get_page_flags(curr_pg); if (IS_PAGE_TYPE(page_flags, PAGE_FLAG_START_PAGE)) { - if (!is_create_complete(curr_pg)) { // make sure file creation completed - PBL_LOG_WRN("File at %d creation did not complete ", - curr_pg); + if (!is_create_complete(curr_pg)) { // make sure file creation completed + PBL_LOG_WRN("File at %d creation did not complete ", curr_pg); unlink_flash_file(curr_pg); - } else if (is_tmp_file(curr_pg)) { // make sure this isn't a temp file + } else if (is_tmp_file(curr_pg)) { // make sure this isn't a temp file PBL_LOG_WRN("Removing temp file at %d", curr_pg); unlink_flash_file(curr_pg); } } else if (page_type_bits_set(page_flags, DELETED_START_PAGE_MASK) && - !is_delete_complete(curr_pg)) { + !is_delete_complete(curr_pg)) { PBL_LOG_WRN("Delete of %d did not complete", curr_pg); unlink_flash_file(curr_pg); } @@ -1324,14 +1290,13 @@ static void prv_handle_sector_erase(uint16_t start_page, bool update_erase_count } prv_flash_erase_sector(start_page); - prv_write_erased_header_on_page_range(start_page, - start_page + PFS_PAGES_PER_ERASE_SECTOR, max_erase); + prv_write_erased_header_on_page_range(start_page, start_page + PFS_PAGES_PER_ERASE_SECTOR, + max_erase); if (last_written_pg != INVALID_PAGE) { hdr.last_written = LAST_WRITTEN_TAG; prv_flash_write((uint8_t *)&hdr.last_written, sizeof(hdr.last_written), - prv_page_to_flash_offset(last_written_pg) + - offsetof(PageHeader, last_written)); + prv_page_to_flash_offset(last_written_pg) + offsetof(PageHeader, last_written)); } } @@ -1340,11 +1305,8 @@ static bool prv_update_gc_reserved_region(void) { int free_region_start = prv_find_free_erase_region(s_gc_block.block_valid); if (free_region_start >= 0) { - s_gc_block = (GCBlock) { - .block_valid = true, - .block_writes = 0, - .gc_start_page = free_region_start - }; + s_gc_block = + (GCBlock){.block_valid = true, .block_writes = 0, .gc_start_page = free_region_start}; PBL_LOG_DBG("New Erase Region: %d", s_gc_block.gc_start_page); return (true); } @@ -1352,7 +1314,7 @@ static bool prv_update_gc_reserved_region(void) { return (false); } - return (true); // gc block must be valid to get here + return (true); // gc block must be valid to get here } static bool watch_list_find_str(ListNode *node, void *data) { @@ -1360,16 +1322,13 @@ static bool watch_list_find_str(ListNode *node, void *data) { return (strcmp(filechg_node->name, (char *)data) == 0); } -PFSCallbackHandle pfs_watch_file(const char* filename, PFSFileChangedCallback callback, - uint8_t event_flags, void* data) { +PFSCallbackHandle pfs_watch_file(const char *filename, PFSFileChangedCallback callback, + uint8_t event_flags, void *data) { pbl_mutex_lock(&s_pfs_mutex, PBL_FOREVER); PFSFileChangedCallbackNode *node = kernel_malloc_check(sizeof(PFSFileChangedCallbackNode)); - *node = (PFSFileChangedCallbackNode) { - .callback = callback, - .event_flags = event_flags, - .data = data - }; + *node = + (PFSFileChangedCallbackNode){.callback = callback, .event_flags = event_flags, .data = data}; // find out if we already have a string for this particular filename ListNode *find_str = list_find(s_head_callback_node_list, watch_list_find_str, (char *)filename); @@ -1390,14 +1349,14 @@ void pfs_unwatch_file(PFSCallbackHandle cb_handle) { PFSFileChangedCallbackNode *callback_node = (PFSFileChangedCallbackNode *)cb_handle; - PBL_ASSERTN(callback_node->list_node.next != NULL || callback_node->list_node.prev != NULL - || s_head_callback_node_list == &callback_node->list_node); + PBL_ASSERTN(callback_node->list_node.next != NULL || callback_node->list_node.prev != NULL || + s_head_callback_node_list == &callback_node->list_node); PBL_ASSERTN(list_contains(s_head_callback_node_list, &callback_node->list_node)); list_remove(&callback_node->list_node, &(s_head_callback_node_list), NULL); // if no one is watching the file anymore, free the string - ListNode *find_str = list_find(s_head_callback_node_list, watch_list_find_str, - (char *)callback_node->name); + ListNode *find_str = + list_find(s_head_callback_node_list, watch_list_find_str, (char *)callback_node->name); if (find_str == NULL) { kernel_free((void *)(callback_node->name)); } @@ -1408,9 +1367,9 @@ void pfs_unwatch_file(PFSCallbackHandle cb_handle) { } // IMPORTANT: This call assumes that the caller has already grabbed s_pfs_mutex -static void prv_invoke_watch_file_callbacks(const char* file_name, uint8_t event) { +static void prv_invoke_watch_file_callbacks(const char *file_name, uint8_t event) { PFSFileChangedCallbackNode *callback_node = - (PFSFileChangedCallbackNode *)s_head_callback_node_list; + (PFSFileChangedCallbackNode *)s_head_callback_node_list; while (callback_node) { if (!strcmp(callback_node->name, file_name) && (callback_node->event_flags & event)) { callback_node->callback(callback_node->data); @@ -1436,8 +1395,7 @@ status_t pfs_close(int fd) { // we handle it gracefully here rather than crashing. int orig_fd; if (get_avail_fd(f->name, &orig_fd, false) == FDBusy) { - PBL_LOG_ERR("Original file %s still open when closing temp, force-evicting", - f->name); + PBL_LOG_ERR("Original file %s still open when closing temp, force-evicting", f->name); PFS_FD(orig_fd).fd_status = FD_STATUS_UNREFERENCED; PFS_FD(orig_fd).time_closed = time_closed_counter++; } @@ -1503,15 +1461,14 @@ status_t pfs_remove(const char *name) { uint16_t page = 0; int fd; status_t rv = get_avail_fd(name, &fd, false); - if (rv >= FDAlreadyLoaded) { // the file is in the cache + if (rv >= FDAlreadyLoaded) { // the file is in the cache if (rv == FDBusy) { - PBL_CROAK("Cannot delete %s, it is currently in use", - PFS_FD(fd).file.name); + PBL_CROAK("Cannot delete %s, it is currently in use", PFS_FD(fd).file.name); } page = PFS_FD(fd).file.start_page; mark_fd_free(fd); } else if ((rv = locate_flash_file(name, &page)) != S_SUCCESS) { - goto cleanup; // could not find the file on flash + goto cleanup; // could not find the file on flash } rv = unlink_flash_file(page); @@ -1534,7 +1491,7 @@ PFSFileListEntry *pfs_create_file_list(PFSFilenameTestCallback callback) { pg_hdr.page_flags = prv_get_page_flags(pg); if (!IS_PAGE_TYPE(pg_hdr.page_flags, PAGE_FLAG_START_PAGE)) { - continue; // only start pages contain file name info + continue; // only start pages contain file name info } FileHeader file_hdr; @@ -1560,9 +1517,9 @@ PFSFileListEntry *pfs_create_file_list(PFSFilenameTestCallback callback) { } // Add a new entry - PFSFileListEntry *entry = kernel_malloc_check(sizeof(PFSFileListEntry) - + file_hdr.file_namelen + 1); - *entry = (PFSFileListEntry) {}; + PFSFileListEntry *entry = + kernel_malloc_check(sizeof(PFSFileListEntry) + file_hdr.file_namelen + 1); + *entry = (PFSFileListEntry){}; strcpy(entry->name, file_name); head = list_insert_before(head, &entry->list_node); } @@ -1591,7 +1548,7 @@ void pfs_remove_files(PFSFilenameTestCallback callback) { pg_hdr.page_flags = prv_get_page_flags(pg); if (!IS_PAGE_TYPE(pg_hdr.page_flags, PAGE_FLAG_START_PAGE)) { - continue; // only start pages contain file name info + continue; // only start pages contain file name info } FileHeader file_hdr; @@ -1618,10 +1575,9 @@ void pfs_remove_files(PFSFilenameTestCallback callback) { int fd; status_t rv = get_avail_fd(file_name, &fd, false); - if (rv >= FDAlreadyLoaded) { // the file is in the cache + if (rv >= FDAlreadyLoaded) { // the file is in the cache if (rv == FDBusy) { - PBL_CROAK("Cannot delete %s, it is currently in use", - PFS_FD(fd).file.name); + PBL_CROAK("Cannot delete %s, it is currently in use", PFS_FD(fd).file.name); } mark_fd_free(fd); } @@ -1633,10 +1589,8 @@ void pfs_remove_files(PFSFilenameTestCallback callback) { pbl_mutex_unlock(&s_pfs_mutex); } -#define MAX_PAGE_CACHE_ENTRIES 10 // 6 bytes per entry -static void update_page_cache(FilePageCache *fpc, int *cur_idx, - FilePageCache *toadd) { - +#define MAX_PAGE_CACHE_ENTRIES 10 // 6 bytes per entry +static void update_page_cache(FilePageCache *fpc, int *cur_idx, FilePageCache *toadd) { int optimal_idx = *cur_idx; if ((*cur_idx) == MAX_PAGE_CACHE_ENTRIES) { // default index to overwrite if nothing better is found @@ -1659,7 +1613,7 @@ static void update_page_cache(FilePageCache *fpc, int *cur_idx, return; } } else { - (*cur_idx)++; // we are adding a new entry + (*cur_idx)++; // we are adding a new entry } fpc[optimal_idx] = *toadd; @@ -1673,13 +1627,12 @@ static NOINLINE void allocate_page_cache(int fd) { } if ((f->file_size / free_bytes_in_page(f->start_page)) < 1) { - return; // only one page in use so we don't need to cache anything + return; // only one page in use so we don't need to cache anything } // Note: If there was more space for statics or stack space we could // put this temporary buffer there - FilePageCache *fpc = - kernel_malloc_check(sizeof(FilePageCache) * MAX_PAGE_CACHE_ENTRIES); + FilePageCache *fpc = kernel_malloc_check(sizeof(FilePageCache) * MAX_PAGE_CACHE_ENTRIES); memset(fpc, 0x00, sizeof(FilePageCache) * MAX_PAGE_CACHE_ENTRIES); uint16_t virtual_pg = 0; @@ -1687,11 +1640,7 @@ static NOINLINE void allocate_page_cache(int fd) { uint16_t next_page; int cur_idx = 0; - FilePageCache curr = { - .virtual_pg = 0, - .physical_pg = f->start_page, - .contiguous_pgs = 0 - }; + FilePageCache curr = {.virtual_pg = 0, .physical_pg = f->start_page, .contiguous_pgs = 0}; while (get_next_page(curr_page, &next_page) == S_SUCCESS) { if (next_page == (curr_page + 1)) { @@ -1715,7 +1664,7 @@ static NOINLINE void allocate_page_cache(int fd) { // The cache is likely to be around for a while and there is no reason to // burn up more memory than necessary for a long duration f->pg_cache = kernel_malloc(sizeof(FilePageCache) * cur_idx); - if (f->pg_cache != NULL) { // if we are not OOM + if (f->pg_cache != NULL) { // if we are not OOM memcpy(f->pg_cache, fpc, sizeof(FilePageCache) * cur_idx); f->pg_cache_len = cur_idx; } @@ -1739,7 +1688,7 @@ static NOINLINE bool file_found_in_cache(const char *name, uint8_t op_flags, int res = E_OUT_OF_RESOURCES; goto cleanup; } else if (res == FDBusy) { - res = E_BUSY; // the file is already open + res = E_BUSY; // the file is already open goto cleanup; } @@ -1747,10 +1696,10 @@ static NOINLINE bool file_found_in_cache(const char *name, uint8_t op_flags, int // settings for cached & new fds file->op_flags = op_flags; - file->offset = 0; // (re)set seek position + file->offset = 0; // (re)set seek position file->is_tmp = is_tmp; - if (res == FDAlreadyLoaded) { // we found the FD in cache! + if (res == FDAlreadyLoaded) { // we found the FD in cache! file->curr_page = file->start_page; bool perform_crc_check = (op_flags & OP_FLAG_SKIP_HDR_CRC_CHECK) == 0; @@ -1762,8 +1711,8 @@ static NOINLINE bool file_found_in_cache(const char *name, uint8_t op_flags, int // Evict the entry and fall back to the flash scan (res stays >= 0 so // the caller reuses this fd slot): the check may have hit a transient // read glitch, and the scan can still find a valid copy. - PBL_LOG_WRN("Cached header check failed for '%s' (page %u), rescanning", - name, file->start_page); + PBL_LOG_WRN("Cached header check failed for '%s' (page %u), rescanning", name, + file->start_page); mark_fd_free(fd); goto cleanup; } @@ -1780,8 +1729,7 @@ static NOINLINE bool file_found_in_cache(const char *name, uint8_t op_flags, int // handles the creation of a file which was not previously on the FS static NOINLINE status_t pfs_open_handle_create_request(int fd, uint8_t file_type, - size_t start_size) { - + size_t start_size) { if (!VALID_TYPE(file_type) || (start_size == 0)) { return (E_INVALID_ARGUMENT); } @@ -1825,19 +1773,18 @@ static NOINLINE status_t pfs_open_handle_read_request(int fd, uint16_t page) { return (E_INTERNAL); } -static int file_found_or_added_to_pfs(int fd, const char *name, - uint8_t op_flags, uint8_t file_type, size_t start_size) { - +static int file_found_or_added_to_pfs(int fd, const char *name, uint8_t op_flags, uint8_t file_type, + size_t start_size) { uint16_t page = 0; int res = locate_flash_file(name, &page); - if ((res != S_SUCCESS) && (res != E_DOES_NOT_EXIST)) { // unexpected error + if ((res != S_SUCCESS) && (res != E_DOES_NOT_EXIST)) { // unexpected error goto cleanup; } // check to see if we are trying to read the file and it doesn't exist - bool is_read_only = (op_flags & (OP_FLAG_READ | OP_FLAG_WRITE | - OP_FLAG_OVERWRITE)) == OP_FLAG_READ; + bool is_read_only = + (op_flags & (OP_FLAG_READ | OP_FLAG_WRITE | OP_FLAG_OVERWRITE)) == OP_FLAG_READ; bool is_tmp = ((op_flags & OP_FLAG_OVERWRITE) != 0); if ((is_read_only || is_tmp) && (res == E_DOES_NOT_EXIST)) { goto cleanup; @@ -1847,7 +1794,7 @@ static int file_found_or_added_to_pfs(int fd, const char *name, FileDesc *file_desc = &PFS_FD(fd); File *file = &PFS_FD(fd).file; - file_desc->fd_status = FD_STATUS_UNREFERENCED; // set to IN_USE on success + file_desc->fd_status = FD_STATUS_UNREFERENCED; // set to IN_USE on success if ((file->name = kernel_strdup(name)) == NULL) { res = E_OUT_OF_MEMORY; goto cleanup; @@ -1859,7 +1806,7 @@ static int file_found_or_added_to_pfs(int fd, const char *name, res = pfs_open_handle_create_request(fd, file_type, start_size); } else if ((op_flags & OP_FLAG_READ) != 0) { res = pfs_open_handle_read_request(fd, page); - } else { // unexpected situation + } else { // unexpected situation res = E_INTERNAL; } @@ -1872,9 +1819,7 @@ static int file_found_or_added_to_pfs(int fd, const char *name, return (res); } -int pfs_open(const char *name, uint8_t op_flags, uint8_t file_type, - size_t start_size) { - +int pfs_open(const char *name, uint8_t op_flags, uint8_t file_type, size_t start_size) { size_t namelen = (name == NULL) ? 0 : strlen(name); if ((namelen < 1) || (namelen > FILE_MAX_NAME_LEN)) { return (E_INVALID_ARGUMENT); @@ -1889,9 +1834,8 @@ int pfs_open(const char *name, uint8_t op_flags, uint8_t file_type, // The file is not in the cache, let's see if it's on the filesystem int fd = res; - if ((res = file_found_or_added_to_pfs(fd, name, op_flags, file_type, - start_size)) >= S_SUCCESS) { - res = fd; // success so return the fd + if ((res = file_found_or_added_to_pfs(fd, name, op_flags, file_type, start_size)) >= S_SUCCESS) { + res = fd; // success so return the fd } cleanup: @@ -1899,7 +1843,7 @@ int pfs_open(const char *name, uint8_t op_flags, uint8_t file_type, // we are returning a valid file handle so if the user has asked for the // page translations to be cached let's do that now if ((op_flags & OP_FLAG_USE_PAGE_CACHE) != 0) { - allocate_page_cache(res); + allocate_page_cache(res); } // check to see if we should update the gc block prv_update_gc_reserved_region(); @@ -1910,7 +1854,7 @@ int pfs_open(const char *name, uint8_t op_flags, uint8_t file_type, } static int pfs_open_gc_file(uint32_t space_needed, bool create) { - int fd = GC_FD_HANDLE_ID; // the gc fd follows the avail fd + int fd = GC_FD_HANDLE_ID; // the gc fd follows the avail fd File *file = &PFS_FD(fd).file; // settings for cached & new fds @@ -1918,17 +1862,17 @@ static int pfs_open_gc_file(uint32_t space_needed, bool create) { if (create) { file->op_flags |= OP_FLAG_WRITE; } - file->offset = 0; // (re)set seek position + file->offset = 0; // (re)set seek position file->is_tmp = false; if (s_gc_block.block_valid && create) { prv_flash_erase_sector(s_gc_block.gc_start_page); } - int res = file_found_or_added_to_pfs(fd, GC_FILE_NAME, file->op_flags, - FILE_TYPE_STATIC, space_needed); + int res = + file_found_or_added_to_pfs(fd, GC_FILE_NAME, file->op_flags, FILE_TYPE_STATIC, space_needed); - PBL_ASSERTN(!create || res >= 0); // we are toast if we cannot create the file + PBL_ASSERTN(!create || res >= 0); // we are toast if we cannot create the file return (res >= 0) ? fd : res; } @@ -1959,8 +1903,7 @@ static status_t copy_or_recover_gc_data(int fd, GCData *gcdata, bool do_copy) { PageHeader hdr; if (do_copy) { // if the sector is not active we only need to copy the page header info - data_len = (((sectors_active >> pg) & 0x1) == 0) ? - 0 : PFS_PAGE_SIZE - sizeof(PageHeader); + data_len = (((sectors_active >> pg) & 0x1) == 0) ? 0 : PFS_PAGE_SIZE - sizeof(PageHeader); if (data_len == 0) { get_updated_erase_hdr(&hdr, sector_start_page + pg); } else { @@ -1972,7 +1915,7 @@ static status_t copy_or_recover_gc_data(int fd, GCData *gcdata, bool do_copy) { if (do_copy) { pfs_write(fd, &hdr, sizeof(hdr)); pfs_write(fd, &data_len, sizeof(data_len)); - } else { // recover + } else { // recover pfs_read(fd, &hdr, sizeof(hdr)); pfs_read(fd, &data_len, sizeof(data_len)); prv_flash_write(&hdr, sizeof(hdr), base_addr); @@ -2015,8 +1958,8 @@ static void recover_region_from_file(int fd) { pfs_close_and_remove(fd); } -static int prv_copy_sector_to_gc_file(uint16_t *free_page, - uint16_t sector_start_page, uint32_t sectors_active) { +static int prv_copy_sector_to_gc_file(uint16_t *free_page, uint16_t sector_start_page, + uint32_t sectors_active) { size_t num_entries = __builtin_popcount(sectors_active); // We need space to store all the data for active pages, the @@ -2029,16 +1972,17 @@ static int prv_copy_sector_to_gc_file(uint16_t *free_page, // we rely on having 1 page to store some metadata so make sure // we always have enough space based on our block & erase size _Static_assert((PFS_PAGES_PER_ERASE_SECTOR * (sizeof(PageHeader) + 4)) < - (PFS_PAGE_SIZE - AVAIL_BYTES_OFFSET), "Too many pages per Erase sector"); + (PFS_PAGE_SIZE - AVAIL_BYTES_OFFSET), + "Too many pages per Erase sector"); PBL_ASSERTN(num_entries < PFS_PAGES_PER_ERASE_SECTOR); int fd = pfs_open_gc_file(space_needed, true); GCData gcdata = { - .version = 0, // Version 0 for now, bump if we change - .flags = 0xff, - .gc_start_page = sector_start_page, - .num_entries = num_entries, - .page_mask = sectors_active + .version = 0, // Version 0 for now, bump if we change + .flags = 0xff, + .gc_start_page = sector_start_page, + .num_entries = num_entries, + .page_mask = sectors_active }; // write out the GCData to the file @@ -2055,17 +1999,15 @@ static int prv_copy_sector_to_gc_file(uint16_t *free_page, return (fd); } -static NOINLINE status_t garbage_collect_sector(uint16_t *free_page, - uint16_t sector_start_page, uint32_t sectors_active) { - +static NOINLINE status_t garbage_collect_sector(uint16_t *free_page, uint16_t sector_start_page, + uint32_t sectors_active) { // if no sectors are active in the region, just erase it! if (sectors_active == 0) { prv_handle_sector_erase(sector_start_page, true); goto done; } - int fd = prv_copy_sector_to_gc_file(free_page, sector_start_page, - sectors_active); + int fd = prv_copy_sector_to_gc_file(free_page, sector_start_page, sectors_active); recover_region_from_file(fd); @@ -2084,8 +2026,8 @@ static NOINLINE status_t garbage_collect_sector(uint16_t *free_page, } status_t pfs_init(bool run_filesystem_check) { - for (int fd = FD_INDEX_OFFSET; fd < FD_INDEX_OFFSET+MAX_FD_HANDLES; fd++) { - PFS_FD(fd) = (FileDesc) { .fd_status = FD_STATUS_FREE }; + for (int fd = FD_INDEX_OFFSET; fd < FD_INDEX_OFFSET + MAX_FD_HANDLES; fd++) { + PFS_FD(fd) = (FileDesc){.fd_status = FD_STATUS_FREE}; } ftl_populate_region_list(); @@ -2122,8 +2064,7 @@ status_t pfs_init(bool run_filesystem_check) { // the filesystem. We do a lot of initialization from different threads early // during boot flow. This prevents those threads from blocking each other uint32_t bytes_to_free = ((s_pfs_page_count * PFS_PAGE_SIZE) * 4) / 100; - PBL_LOG_DBG("Preparing %"PRIu32" bytes of flash for filesystem use", - bytes_to_free); + PBL_LOG_DBG("Preparing %" PRIu32 " bytes of flash for filesystem use", bytes_to_free); pfs_prepare_for_file_creation(bytes_to_free, 15 * RTC_TICKS_HZ); @@ -2134,7 +2075,7 @@ void pfs_format(bool write_erase_headers) { PBL_LOG_INFO("FS-Format Start"); pbl_mutex_lock(&s_pfs_mutex, PBL_FOREVER); - for (int i = FD_INDEX_OFFSET; i < FD_INDEX_OFFSET+PFS_FD_SET_SIZE; i++) { + for (int i = FD_INDEX_OFFSET; i < FD_INDEX_OFFSET + PFS_FD_SET_SIZE; i++) { mark_fd_free(i); } @@ -2150,7 +2091,6 @@ void pfs_format(bool write_erase_headers) { PBL_LOG_INFO("FS-Format Done"); } - int pfs_sector_optimal_size(int min_size, int namelen) { min_size += sizeof(FileHeader); min_size += sizeof(FileMetaData); @@ -2187,8 +2127,7 @@ uint32_t get_available_pfs_space(void) { // routine before allocating large files uint32_t tot_capacity = (pfs_get_size() * 8) / 10; - return ((allocated_space >= tot_capacity) ? - 0 : (tot_capacity - allocated_space)); + return ((allocated_space >= tot_capacity) ? 0 : (tot_capacity - allocated_space)); } uint32_t pfs_crc_calculate_file(int fd, uint32_t offset, uint32_t num_bytes) { @@ -2228,7 +2167,7 @@ void pbl_analytics_external_collect_pfs_stats(void) { */ // TODO: Remove once we figure out PBL-20973 -void pfs_collect_diagnostic_data(int fd, void *diagnostic_buf, size_t diagnostic_buf_len) { +void pfs_collect_diagnostic_data(int fd, void *diagnostic_buf, size_t diagnostic_buf_len) { pbl_mutex_lock(&s_pfs_mutex, PBL_FOREVER); memcpy(diagnostic_buf, &PFS_FD(fd), MIN(diagnostic_buf_len, sizeof(FileDesc))); pbl_mutex_unlock(&s_pfs_mutex); @@ -2245,7 +2184,7 @@ void pfs_command_fs_format(const char *erase_headers) { } void pfs_command_dump_hdr(const char *page) { - uint16_t pg = (uint16_t) atoi(page); + uint16_t pg = (uint16_t)atoi(page); if (pg > s_pfs_page_count) { prompt_send_response("ERROR"); return; @@ -2269,9 +2208,8 @@ void pfs_command_fs_ls(void) { pg_hdr.page_flags = prv_get_page_flags(pg); if (!IS_PAGE_TYPE(pg_hdr.page_flags, PAGE_FLAG_START_PAGE)) { - pages_in_use += IS_PAGE_TYPE(pg_hdr.page_flags, - PAGE_FLAG_CONT_PAGE) ? 1 : 0; - continue; // only start pages contain file name info + pages_in_use += IS_PAGE_TYPE(pg_hdr.page_flags, PAGE_FLAG_CONT_PAGE) ? 1 : 0; + continue; // only start pages contain file name info } pages_in_use++; @@ -2284,17 +2222,18 @@ void pfs_command_fs_ls(void) { file_name[file_hdr.file_namelen] = '\0'; prv_flash_read((uint8_t *)file_name, file_hdr.file_namelen, - prv_page_to_flash_offset(pg) + FILE_NAME_OFFSET); + prv_page_to_flash_offset(pg) + FILE_NAME_OFFSET); - snprintf(display_buf, sizeof(display_buf), "%3d:\t%8s%s\t%5d\t\t0x%x\t%15d", - pg, file_name, is_tmp_file(pg) ? "(tmp)" : "", (int)file_hdr.file_size, - file_hdr.file_type, (int)pg_hdr.erase_count); + snprintf(display_buf, sizeof(display_buf), "%3d:\t%8s%s\t%5d\t\t0x%x\t%15d", pg, file_name, + is_tmp_file(pg) ? "(tmp)" : "", (int)file_hdr.file_size, file_hdr.file_type, + (int)pg_hdr.erase_count); prompt_send_response(display_buf); } - snprintf(display_buf, sizeof(display_buf), "\n---\n%d / %d pages in use " - "(%"PRIu32" kB available)", pages_in_use, s_pfs_page_count, - get_available_pfs_space() / 1024); + snprintf(display_buf, sizeof(display_buf), + "\n---\n%d / %d pages in use " + "(%" PRIu32 " kB available)", + pages_in_use, s_pfs_page_count, get_available_pfs_space() / 1024); prompt_send_response(display_buf); } @@ -2343,7 +2282,7 @@ void pfs_command_crc(const char *filename) { size_t num_bytes = pfs_get_file_size(fd); uint32_t crc = pfs_crc_calculate_file(fd, 0, num_bytes); pfs_close(fd); - prompt_send_response_fmt(buffer, sizeof(buffer), "CRC: %"PRIx32, crc); + prompt_send_response_fmt(buffer, sizeof(buffer), "CRC: %" PRIx32, crc); } /* @@ -2355,11 +2294,11 @@ uint16_t test_get_file_start_page(int fd) { } void test_force_garbage_collection(uint16_t start_page) { - start_page = (start_page / PFS_PAGES_PER_ERASE_SECTOR) * PFS_PAGES_PER_ERASE_SECTOR; + start_page = (start_page / PFS_PAGES_PER_ERASE_SECTOR) * PFS_PAGES_PER_ERASE_SECTOR; uint16_t free_page; uint32_t active_sectors = - prv_get_sector_page_status(start_page / PFS_PAGES_PER_ERASE_SECTOR , &free_page); + prv_get_sector_page_status(start_page / PFS_PAGES_PER_ERASE_SECTOR, &free_page); garbage_collect_sector(&free_page, start_page, active_sectors); } @@ -2368,7 +2307,7 @@ status_t test_scan_for_last_written(void) { for (uint16_t pg = 0; pg < s_pfs_page_count; pg++) { PageHeader hdr; prv_flash_read((uint8_t *)&hdr.last_written, sizeof(hdr.last_written), - prv_page_to_flash_offset(pg) + offsetof(PageHeader, last_written)); + prv_page_to_flash_offset(pg) + offsetof(PageHeader, last_written)); if (hdr.last_written == LAST_WRITTEN_TAG) { return (pg); } @@ -2383,8 +2322,7 @@ void test_force_recalc_of_gc_region(void) { } void test_force_reboot_during_garbage_collection(uint16_t start_page) { - start_page = - (start_page / PFS_PAGES_PER_ERASE_SECTOR) * PFS_PAGES_PER_ERASE_SECTOR; + start_page = (start_page / PFS_PAGES_PER_ERASE_SECTOR) * PFS_PAGES_PER_ERASE_SECTOR; uint16_t free_page; uint32_t active_sectors = prv_get_sector_page_status(start_page, &free_page); diff --git a/src/fw/services/firmware_update/service.c b/src/fw/services/firmware_update/service.c index 4b0d76013d..39c2cc4d23 100644 --- a/src/fw/services/firmware_update/service.c +++ b/src/fw/services/firmware_update/service.c @@ -51,7 +51,7 @@ typedef struct { }; } FwUpdateCurrentCompletionStatus; -static FwUpdateCurrentCompletionStatus s_current_completion_status = { 0 }; +static FwUpdateCurrentCompletionStatus s_current_completion_status = {0}; // // Start handlers for legacy percentage status handling. Someday, we can hopefully @@ -107,13 +107,12 @@ static bool prv_legacy_completion_status_init(PebbleSystemMessageEvent *event) { } s_current_completion_status.use_legacy_mode = true; - LegacyFwUpdateCompletionStatus *status = - &s_current_completion_status.legacy_status; + LegacyFwUpdateCompletionStatus *status = &s_current_completion_status.legacy_status; - *status = (LegacyFwUpdateCompletionStatus) { - .recovery_percent_completion = 0, - .resource_percent_completion = 0, - .firmware_percent_completion = 0 + *status = (LegacyFwUpdateCompletionStatus){ + .recovery_percent_completion = 0, + .resource_percent_completion = 0, + .firmware_percent_completion = 0 }; return true; @@ -139,9 +138,9 @@ static void prv_initialize_completion_status(PebbleSystemMessageEvent *event) { s_current_completion_status.use_legacy_mode = false; FwUpdateCompletionStatus *status = &s_current_completion_status.status; - *status = (FwUpdateCompletionStatus) { - .bytes_transferred = event->bytes_transferred, - .total_size = event->total_transfer_size + *status = (FwUpdateCompletionStatus){ + .bytes_transferred = event->bytes_transferred, + .total_size = event->total_transfer_size }; } @@ -167,12 +166,12 @@ static FirmwareUpdateStatus prv_firmware_update_start(PebbleSystemMessageEvent * modal_manager_pop_all(); static const ProgressUIAppArgs s_update_args = { - .progress_source = PROGRESS_UI_SOURCE_FW_UPDATE, + .progress_source = PROGRESS_UI_SOURCE_FW_UPDATE, }; - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = progress_ui_app_get_info(), - .common.args = &s_update_args, - .restart = true, + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = progress_ui_app_get_info(), + .common.args = &s_update_args, + .restart = true, }); put_bytes_expect_init(FIRMWARE_TIMEOUT_MS); result = FirmwareUpdateRunning; @@ -185,8 +184,7 @@ static FirmwareUpdateStatus prv_firmware_update_start(PebbleSystemMessageEvent * static void prv_handle_firmware_update_start_msg(PebbleSystemMessageEvent *event) { FirmwareUpdateStatus result = prv_firmware_update_start(event); s_update_status = result; - PBL_ASSERTN((result == FirmwareUpdateRunning) || - (result == FirmwareUpdateStopped) || + PBL_ASSERTN((result == FirmwareUpdateRunning) || (result == FirmwareUpdateStopped) || (result == FirmwareUpdateCancelled)); system_message_send_firmware_start_response(result); } @@ -221,7 +219,7 @@ unsigned int firmware_update_get_percent_progress(void) { return (status->bytes_transferred * 100) / status->total_size; } -void firmware_update_event_handler(PebbleSystemMessageEvent* event) { +void firmware_update_event_handler(PebbleSystemMessageEvent *event) { switch (event->type) { case PebbleSystemMessageFirmwareUpdateStartLegacy: case PebbleSystemMessageFirmwareUpdateStart: @@ -247,7 +245,7 @@ static void prv_handle_progress(PebblePutBytesEvent *event) { } if (event->type != PebblePutBytesEventTypeProgress) { - return; // Only progress events report bytes_transferred updates + return; // Only progress events report bytes_transferred updates } FwUpdateCompletionStatus *status = &s_current_completion_status.status; @@ -256,7 +254,7 @@ static void prv_handle_progress(PebblePutBytesEvent *event) { void firmware_update_pb_event_handler(PebblePutBytesEvent *event) { if (!firmware_update_is_in_progress()) { - return; // not my pb transfer + return; // not my pb transfer } switch (event->type) { diff --git a/src/fw/services/get_bytes/get_bytes.c b/src/fw/services/get_bytes/get_bytes.c index 8699205817..c152a77aff 100644 --- a/src/fw/services/get_bytes/get_bytes.c +++ b/src/fw/services/get_bytes/get_bytes.c @@ -36,19 +36,17 @@ typedef struct { SlaveConnEventStats conn_event_stats; } GetBytesState; - // ---------------------------------------------------------------------------------------- // Private globals static bool s_get_bytes_in_progress = false; - static void prv_put_status_event(DebugInfoEventState state) { PebbleEvent event = { - .type = PEBBLE_GATHER_DEBUG_INFO_EVENT, - .debug_info = { - .source = DebugInfoSourceGetBytes, - .state = state, - }, + .type = PEBBLE_GATHER_DEBUG_INFO_EVENT, + .debug_info = { + .source = DebugInfoSourceGetBytes, + .state = state, + }, }; event_put(&event); } @@ -56,18 +54,15 @@ static void prv_put_status_event(DebugInfoEventState state) { // ----------------------------------------------------------------------------------------------- static bool prv_protocol_send_err_response(CommSession *session, int8_t transaction_id, GetBytesInfoErrorCode result) { - const GetBytesRspObjectInfo rsp = (const GetBytesRspObjectInfo) { - .hdr.cmd_id = GET_BYTES_CMD_OBJECT_INFO, - .hdr.transaction_id = transaction_id, - .error_code = result, - .num_bytes = htonl(0), + const GetBytesRspObjectInfo rsp = (const GetBytesRspObjectInfo){ + .hdr.cmd_id = GET_BYTES_CMD_OBJECT_INFO, + .hdr.transaction_id = transaction_id, + .error_code = result, + .num_bytes = htonl(0), }; - bool success = comm_session_send_data(session, - GET_BYTES_ENDPOINT_ID, - (const uint8_t *) &rsp, - sizeof(rsp), - COMM_SESSION_DEFAULT_TIMEOUT); + bool success = comm_session_send_data(session, GET_BYTES_ENDPOINT_ID, (const uint8_t *)&rsp, + sizeof(rsp), COMM_SESSION_DEFAULT_TIMEOUT); if (!success) { PBL_LOG_ERR("GET_BYTES: aborted"); s_get_bytes_in_progress = false; @@ -86,15 +81,14 @@ static bool prv_protocol_send_err_response(CommSession *session, int8_t transact static void prv_gather_and_record_stats(GetBytesState *state) { uint32_t elapsed_time_ms = pbl_ticks_to_ms(rtc_get_ticks() - state->start_ticks); uint32_t bytes_per_sec = ((state->num_bytes * MS_PER_SECOND) / elapsed_time_ms); - PBL_LOG_DBG("GET_BYTES: Done sending data. Pushed %"PRIu32" bytes/sec", - bytes_per_sec); - bluetooth_analytics_handle_get_bytes_stats( - state->object_type, state->num_bytes, elapsed_time_ms, &state->conn_event_stats); + PBL_LOG_DBG("GET_BYTES: Done sending data. Pushed %" PRIu32 " bytes/sec", bytes_per_sec); + bluetooth_analytics_handle_get_bytes_stats(state->object_type, state->num_bytes, elapsed_time_ms, + &state->conn_event_stats); } // ----------------------------------------------------------------------------------------------- -static void prv_protocol_send_next_chunk(void* raw_state) { - GetBytesState* state = (GetBytesState*)raw_state; +static void prv_protocol_send_next_chunk(void *raw_state) { + GetBytesState *state = (GetBytesState *)raw_state; // ------------------------------------------------------------------------------------------- // Did we fetch the total size yet? If not, walk through all the chunks getting the total size @@ -141,29 +135,29 @@ static void prv_protocol_send_next_chunk(void* raw_state) { if (state->sent_header) { // Send next chunk of data - GetBytesRspObjectData* rsp = (GetBytesRspObjectData *) kernel_zalloc_check(packet_len); - *rsp = (GetBytesRspObjectData) { - .hdr.cmd_id = GET_BYTES_CMD_OBJECT_DATA, - .hdr.transaction_id = state->transaction_id, - .byte_offset = htonl(state->storage.current_offset), + GetBytesRspObjectData *rsp = (GetBytesRspObjectData *)kernel_zalloc_check(packet_len); + *rsp = (GetBytesRspObjectData){ + .hdr.cmd_id = GET_BYTES_CMD_OBJECT_DATA, + .hdr.transaction_id = state->transaction_id, + .byte_offset = htonl(state->storage.current_offset), }; // read the next chunk from storage gb_storage_read_next_chunk(&state->storage, rsp->data, data_len); - comm_session_send_buffer_write(sb, (const uint8_t *) rsp, packet_len); + comm_session_send_buffer_write(sb, (const uint8_t *)rsp, packet_len); kernel_free(rsp); PBL_LOG_DBG("GET_BYTES: sending next %d bytes. %d remaining", (int)data_len, - (int)(remaining_bytes-data_len)); + (int)(remaining_bytes - data_len)); } else { // Send image info response - const GetBytesRspObjectInfo rsp = (const GetBytesRspObjectInfo) { - .hdr.cmd_id = GET_BYTES_CMD_OBJECT_INFO, - .hdr.transaction_id = state->transaction_id, - .error_code = htonl(GET_BYTES_OK), - .num_bytes = htonl(state->num_bytes), + const GetBytesRspObjectInfo rsp = (const GetBytesRspObjectInfo){ + .hdr.cmd_id = GET_BYTES_CMD_OBJECT_INFO, + .hdr.transaction_id = state->transaction_id, + .error_code = htonl(GET_BYTES_OK), + .num_bytes = htonl(state->num_bytes), }; - comm_session_send_buffer_write(sb, (const uint8_t *) &rsp, sizeof(rsp)); + comm_session_send_buffer_write(sb, (const uint8_t *)&rsp, sizeof(rsp)); state->sent_header = true; } comm_session_send_buffer_end_write(sb); @@ -196,9 +190,9 @@ static void prv_protocol_send_next_chunk(void* raw_state) { //! Sets up the storage for the given GetBytes command. Will return whether the command //! was successful. -bool prv_setup_state_for_command(GetBytesCmd cmd, GetBytesState *state, - const uint8_t* data, uint32_t len) { - GetBytesStorageInfo info = { 0 }; +bool prv_setup_state_for_command(GetBytesCmd cmd, GetBytesState *state, const uint8_t *data, + uint32_t len) { + GetBytesStorageInfo info = {0}; switch (cmd) { case GET_BYTES_CMD_GET_NEW_COREDUMP: @@ -215,8 +209,7 @@ bool prv_setup_state_for_command(GetBytesCmd cmd, GetBytesState *state, // copy the filename GetBytesFileHeader *hdr = (GetBytesFileHeader *)data; if ((hdr->filename_len + sizeof(GetBytesFileHeader) + 1) < len) { - PBL_LOG_ERR("Filename len does not match message length %d", - hdr->filename_len); + PBL_LOG_ERR("Filename len does not match message length %d", hdr->filename_len); return false; } if (hdr->filename[hdr->filename_len] != '\0') { @@ -233,7 +226,7 @@ bool prv_setup_state_for_command(GetBytesCmd cmd, GetBytesState *state, info.flash_start_addr = ntohl(hdr->start_addr); info.flash_len = ntohl(hdr->len); PBL_LOG_DBG("Fetching %d bytes starting at %d", (int)info.flash_len, - (int)info.flash_start_addr); + (int)info.flash_start_addr); bool rv = gb_storage_setup(&state->storage, state->object_type, &info); return rv; } @@ -244,13 +237,12 @@ bool prv_setup_state_for_command(GetBytesCmd cmd, GetBytesState *state, } } -void get_bytes_protocol_msg_callback(CommSession *session, const uint8_t* msg_data, - uint32_t msg_len) { +void get_bytes_protocol_msg_callback(CommSession *session, const uint8_t *msg_data, + uint32_t msg_len) { // at least have a cmd and a transaction_id if (msg_len < 2) { - PBL_LOG_ERR("Invalid length %"PRIu32, msg_len); - prv_protocol_send_err_response(session, 0 /*transaction_id*/, - GET_BYTES_MALFORMED_COMMAND); + PBL_LOG_ERR("Invalid length %" PRIu32, msg_len); + prv_protocol_send_err_response(session, 0 /*transaction_id*/, GET_BYTES_MALFORMED_COMMAND); return; } @@ -263,22 +255,20 @@ void get_bytes_protocol_msg_callback(CommSession *session, const uint8_t* msg_da break; default: PBL_LOG_ERR("first byte can't be %u", hdr->cmd_id); - prv_protocol_send_err_response(session, hdr->transaction_id, - GET_BYTES_MALFORMED_COMMAND); + prv_protocol_send_err_response(session, hdr->transaction_id, GET_BYTES_MALFORMED_COMMAND); return; } if (s_get_bytes_in_progress == true) { PBL_LOG_ERR("already in progress."); - prv_protocol_send_err_response(session, hdr->transaction_id, - GET_BYTES_ALREADY_IN_PROGRESS); + prv_protocol_send_err_response(session, hdr->transaction_id, GET_BYTES_ALREADY_IN_PROGRESS); return; } - GetBytesState* state = kernel_zalloc_check(sizeof(*state)); - *state = (GetBytesState) { - .session = session, - .transaction_id = hdr->transaction_id, + GetBytesState *state = kernel_zalloc_check(sizeof(*state)); + *state = (GetBytesState){ + .session = session, + .transaction_id = hdr->transaction_id, }; // let the other types of pushes setup the state. diff --git a/src/fw/services/get_bytes/get_bytes_storage.c b/src/fw/services/get_bytes/get_bytes_storage.c index 9d69c2f006..205c3a8f15 100644 --- a/src/fw/services/get_bytes/get_bytes_storage.c +++ b/src/fw/services/get_bytes/get_bytes_storage.c @@ -25,31 +25,28 @@ typedef struct GetBytesStorageImplementation { #include "pbl/services/get_bytes/get_bytes_storage_flash.h" static const GetBytesStorageImplementation s_get_bytes_impls[] = { - { - // Coredump Storage - .type = GetBytesStorageTypeCoredump, - .setup = gb_storage_coredump_setup, - .get_size = gb_storage_coredump_get_size, - .read_next_chunk = gb_storage_coredump_read_next_chunk, - .cleanup = gb_storage_coredump_cleanup - }, + {// Coredump Storage + .type = GetBytesStorageTypeCoredump, + .setup = gb_storage_coredump_setup, + .get_size = gb_storage_coredump_get_size, + .read_next_chunk = gb_storage_coredump_read_next_chunk, + .cleanup = gb_storage_coredump_cleanup + }, #if !defined(CONFIG_RECOVERY_FW) && !defined(CONFIG_RELEASE) - { - // Filesystem File Storage - .type = GetBytesStorageTypeFile, - .setup = gb_storage_file_setup, - .get_size = gb_storage_file_get_size, - .read_next_chunk = gb_storage_file_read_next_chunk, - .cleanup = gb_storage_file_cleanup - }, - { - // Flash Storage - .type = GetBytesStorageTypeFlash, - .setup = gb_storage_flash_setup, - .get_size = gb_storage_flash_get_size, - .read_next_chunk = gb_storage_flash_read_next_chunk, - .cleanup = gb_storage_flash_cleanup - }, + {// Filesystem File Storage + .type = GetBytesStorageTypeFile, + .setup = gb_storage_file_setup, + .get_size = gb_storage_file_get_size, + .read_next_chunk = gb_storage_file_read_next_chunk, + .cleanup = gb_storage_file_cleanup + }, + {// Flash Storage + .type = GetBytesStorageTypeFlash, + .setup = gb_storage_flash_setup, + .get_size = gb_storage_flash_get_size, + .read_next_chunk = gb_storage_flash_read_next_chunk, + .cleanup = gb_storage_flash_cleanup + }, #endif /* !defined(CONFIG_RECOVERY_FW) && !defined(CONFIG_RELEASE) */ }; @@ -69,7 +66,7 @@ GetBytesStorageType prv_get_storage_type_for_object(GetBytesObjectType object_ty } bool gb_storage_setup(GetBytesStorage *storage, GetBytesObjectType object_type, - GetBytesStorageInfo *info) { + GetBytesStorageInfo *info) { for (unsigned int i = 0; i < ARRAY_LENGTH(s_get_bytes_impls); i++) { if (s_get_bytes_impls[i].type == prv_get_storage_type_for_object(object_type)) { storage->impl = &s_get_bytes_impls[i]; diff --git a/src/fw/services/get_bytes/get_bytes_storage_coredump.c b/src/fw/services/get_bytes/get_bytes_storage_coredump.c index 153de9b2ed..2bd25334b0 100644 --- a/src/fw/services/get_bytes/get_bytes_storage_coredump.c +++ b/src/fw/services/get_bytes/get_bytes_storage_coredump.c @@ -27,20 +27,20 @@ static uint32_t prv_coredump_flash_base(bool unread_only) { CoreDumpFlashHeader flash_hdr; CoreDumpFlashRegionHeader region_hdr; uint32_t max_last_used = 0; - uint32_t base_address; + uint32_t base_address; uint32_t last_used_idx = 0; // ---------------------------------------------------------------------------------- // First, see if the flash header has been put in place flash_read_bytes((uint8_t *)&flash_hdr, CORE_DUMP_FLASH_START, sizeof(flash_hdr)); - if (flash_hdr.magic != CORE_DUMP_FLASH_HDR_MAGIC - || flash_hdr.unformatted == CORE_DUMP_ALL_UNFORMATTED) { + if (flash_hdr.magic != CORE_DUMP_FLASH_HDR_MAGIC || + flash_hdr.unformatted == CORE_DUMP_ALL_UNFORMATTED) { return CORE_DUMP_FLASH_INVALID_ADDR; } // Find the region with the highest last_used count - for (unsigned int i=0; iimpl_data = kernel_zalloc_check(sizeof(GBCoredumpData)); ((GBCoredumpData *)storage->impl_data)->only_get_new_coredump = info->only_get_new_coredump; return true; diff --git a/src/fw/services/get_bytes/get_bytes_storage_file.c b/src/fw/services/get_bytes/get_bytes_storage_file.c index 7897cbe898..7ed23ee678 100644 --- a/src/fw/services/get_bytes/get_bytes_storage_file.c +++ b/src/fw/services/get_bytes/get_bytes_storage_file.c @@ -6,25 +6,25 @@ #include "pbl/services/filesystem/pfs.h" bool gb_storage_file_setup(GetBytesStorage *storage, GetBytesObjectType object_type, - GetBytesStorageInfo *info) { + GetBytesStorageInfo *info) { const int fd = pfs_open(info->filename, OP_FLAG_READ, FILE_TYPE_STATIC, 0); - storage->impl_data = (void*)(uintptr_t) fd; + storage->impl_data = (void *)(uintptr_t)fd; return fd >= 0; } GetBytesInfoErrorCode gb_storage_file_get_size(GetBytesStorage *storage, uint32_t *size) { - const int fd = (int) storage->impl_data; + const int fd = (int)storage->impl_data; *size = pfs_get_file_size(fd); return GET_BYTES_OK; } bool gb_storage_file_read_next_chunk(GetBytesStorage *storage, uint8_t *buffer, uint32_t len) { - const int fd = (int) storage->impl_data; + const int fd = (int)storage->impl_data; storage->current_offset += len; return (pfs_read(fd, buffer, len) > 0); } void gb_storage_file_cleanup(GetBytesStorage *storage, bool successful) { - const int fd = (int) storage->impl_data; + const int fd = (int)storage->impl_data; pfs_close(fd); } diff --git a/src/fw/services/get_bytes/get_bytes_storage_flash.c b/src/fw/services/get_bytes/get_bytes_storage_flash.c index 388bf664ed..4621d0476e 100644 --- a/src/fw/services/get_bytes/get_bytes_storage_flash.c +++ b/src/fw/services/get_bytes/get_bytes_storage_flash.c @@ -6,9 +6,8 @@ #include "kernel/pbl_malloc.h" #include "flash_region/flash_region.h" - -bool gb_storage_flash_setup( - GetBytesStorage *storage, GetBytesObjectType object_type, GetBytesStorageInfo *info) { +bool gb_storage_flash_setup(GetBytesStorage *storage, GetBytesObjectType object_type, + GetBytesStorageInfo *info) { if (!info->flash_len || (info->flash_start_addr + info->flash_len) > BOARD_NOR_FLASH_SIZE) { return false; } @@ -24,7 +23,7 @@ GetBytesInfoErrorCode gb_storage_flash_get_size(GetBytesStorage *storage, uint32 } bool gb_storage_flash_read_next_chunk(GetBytesStorage *storage, uint8_t *buffer, uint32_t len) { - uint32_t start_offset = ((GetBytesStorageInfo *)storage->impl_data)->flash_start_addr; + uint32_t start_offset = ((GetBytesStorageInfo *)storage->impl_data)->flash_start_addr; flash_read_bytes(buffer, storage->current_offset + start_offset, len); storage->current_offset += len; return true; diff --git a/src/fw/services/health_sync_endpoint/service.c b/src/fw/services/health_sync_endpoint/service.c index 3f184b25a8..aba21a127c 100644 --- a/src/fw/services/health_sync_endpoint/service.c +++ b/src/fw/services/health_sync_endpoint/service.c @@ -30,14 +30,12 @@ typedef struct PACKED HealthSyncEndpointAckMsg { static void prv_send_ack_nack(bool ok) { const HealthSyncEndpointAckMsg msg = { - .cmd = HealthSyncEndpointCmd_Ack, - .ack_nack = ok ? ACK : NACK, + .cmd = HealthSyncEndpointCmd_Ack, + .ack_nack = ok ? ACK : NACK, }; - comm_session_send_data(comm_session_get_system_session(), - HEALTH_SYNC_ENDPOINT_ID, - (uint8_t*)&msg, - sizeof(HealthSyncEndpointAckMsg), + comm_session_send_data(comm_session_get_system_session(), HEALTH_SYNC_ENDPOINT_ID, + (uint8_t *)&msg, sizeof(HealthSyncEndpointAckMsg), COMM_SESSION_DEFAULT_TIMEOUT); } diff --git a/src/fw/services/hrm/hrm_manager.c b/src/fw/services/hrm/hrm_manager.c index 12ae80aba7..1276d8f4c2 100644 --- a/src/fw/services/hrm/hrm_manager.c +++ b/src/fw/services/hrm/hrm_manager.c @@ -28,12 +28,12 @@ PBL_LOG_MODULE_DEFINE(service_hrm, CONFIG_SERVICE_HRM_LOG_LEVEL); #define HRM_DEBUG 0 #if HRM_DEBUG -#define HRM_LOG(fmt, ...) \ - do { \ - PBL_LOG_DBG(fmt, ## __VA_ARGS__); \ +#define HRM_LOG(fmt, ...) \ + do { \ + PBL_LOG_DBG(fmt, ##__VA_ARGS__); \ } while (0) -#define HRM_HEXDUMP(data, length) \ - do { \ +#define HRM_HEXDUMP(data, length) \ + do { \ PBL_HEXDUMP(LOG_LEVEL_DEBUG, (uint8_t *)data, length); \ } while (0) #else @@ -51,14 +51,14 @@ static bool prv_match_session_ref(ListNode *found_node, void *data) { return (state->session_ref == (HRMSessionRef)data); } -T_STATIC HRMSubscriberState * prv_get_subscriber_state_from_ref(HRMSessionRef session) { - ListNode *node = list_find(s_manager_state.subscribers, prv_match_session_ref, - (void *)(uintptr_t)session); +T_STATIC HRMSubscriberState *prv_get_subscriber_state_from_ref(HRMSessionRef session) { + ListNode *node = + list_find(s_manager_state.subscribers, prv_match_session_ref, (void *)(uintptr_t)session); return (HRMSubscriberState *)node; } typedef struct { - AppInstallId app_id; + AppInstallId app_id; PebbleTask task; } HRMAppIdAndTask; @@ -68,11 +68,11 @@ static bool prv_match_app_id(ListNode *found_node, void *data) { return ((state->app_id == context->app_id) && (state->task == context->task)); } -T_STATIC HRMSubscriberState * prv_get_subscriber_state_from_app_id(PebbleTask task, - AppInstallId app_id) { +T_STATIC HRMSubscriberState *prv_get_subscriber_state_from_app_id(PebbleTask task, + AppInstallId app_id) { HRMAppIdAndTask context = { - .app_id = app_id, - .task = task, + .app_id = app_id, + .task = task, }; ListNode *node = list_find(s_manager_state.subscribers, prv_match_app_id, &context); @@ -84,8 +84,9 @@ static bool prv_needs_expiring_event(HRMSubscriberState *state, time_t utc_now) if (state->sent_expiration_event) { return false; } - return (state->expire_utc && (utc_now >= state->expire_utc - - MAX(HRM_SUBSCRIPTION_EXPIRING_WARNING_SEC, (int)state->update_interval_s))); + return (state->expire_utc && + (utc_now >= state->expire_utc - MAX(HRM_SUBSCRIPTION_EXPIRING_WARNING_SEC, + (int)state->update_interval_s))); } T_STATIC void prv_read_event_from_buffer_and_consume(CircularBuffer *buffer, @@ -122,8 +123,8 @@ T_STATIC TimerID prv_get_timer_id(void) { // Used by unit tests T_STATIC uint32_t prv_num_system_task_events_queued(void) { - uint16_t avail_bytes = circular_buffer_get_read_space_remaining( - &s_manager_state.system_task_event_buffer); + uint16_t avail_bytes = + circular_buffer_get_read_space_remaining(&s_manager_state.system_task_event_buffer); return avail_bytes / sizeof(PebbleHRMEvent); } @@ -133,12 +134,12 @@ T_STATIC uint32_t prv_get_dropped_events_count(void) { } #endif -static void prv_handle_accel_data(void * data) { +static void prv_handle_accel_data(void *data) { PBL_ASSERT_RUNNING_FROM_EXPECTED_TASK(PebbleTask_NewTimers); uint64_t timestamp_ms; - uint32_t num_new_samples = sys_accel_manager_get_num_samples( - s_manager_state.accel_state, ×tamp_ms); + uint32_t num_new_samples = + sys_accel_manager_get_num_samples(s_manager_state.accel_state, ×tamp_ms); pbl_mutex_lock(&s_manager_state.accel_data_lock, PBL_FOREVER); @@ -150,7 +151,8 @@ static void prv_handle_accel_data(void * data) { } void *write_ptr = &s_manager_state.accel_data.data[s_manager_state.accel_data.num_samples]; - memcpy(write_ptr, s_manager_state.accel_manager_buffer, num_samples_to_copy * sizeof(AccelRawData)); + memcpy(write_ptr, s_manager_state.accel_manager_buffer, + num_samples_to_copy * sizeof(AccelRawData)); s_manager_state.accel_data.num_samples += num_samples_to_copy; @@ -165,8 +167,7 @@ T_STATIC bool prv_can_turn_sensor_on(void) { return true; #endif - return s_manager_state.enabled_run_level && - s_manager_state.enabled_charging_state && + return s_manager_state.enabled_run_level && s_manager_state.enabled_charging_state && activity_prefs_heart_rate_is_enabled(); } @@ -186,10 +187,10 @@ static void prv_update_hrm_enable_system_cb(void *unused) { if (prv_can_turn_sensor_on()) { RtcTicks cur_ticks = rtc_get_ticks(); int32_t remaining_ticks = INT32_MAX; - const int32_t spin_up_ticks = (int32_t)pbl_ms_to_ticks( - HRM_SENSOR_SPIN_UP_SEC * MS_PER_SECOND); - const int64_t unserved_timeout_ticks = pbl_ms_to_ticks( - HRM_MAX_UNSERVED_TIME_SEC * MS_PER_SECOND); + const int32_t spin_up_ticks = + (int32_t)pbl_ms_to_ticks(HRM_SENSOR_SPIN_UP_SEC * MS_PER_SECOND); + const int64_t unserved_timeout_ticks = + pbl_ms_to_ticks(HRM_MAX_UNSERVED_TIME_SEC * MS_PER_SECOND); // True once the sensor has been on a full serve window without satisfying every // subscriber. Only counts continuous on-time, so subscribers that went overdue while the // sensor was forced off (charging, run level) still get served first. @@ -198,8 +199,8 @@ static void prv_update_hrm_enable_system_cb(void *unused) { ((int64_t)(cur_ticks - s_manager_state.sensor_on_since_ticks) > unserved_timeout_ticks); // Loop through each of the subscribers and figure out when the next one needs an update - HRMSubscriberState *state = (HRMSubscriberState *) s_manager_state.subscribers; - for (; state != NULL; state = (HRMSubscriberState *) state->list_node.next) { + HRMSubscriberState *state = (HRMSubscriberState *)s_manager_state.subscribers; + for (; state != NULL; state = (HRMSubscriberState *)state->list_node.next) { if (state->expire_utc && (utc_now >= state->expire_utc)) { // Ignore expired subscriptions continue; @@ -228,8 +229,7 @@ static void prv_update_hrm_enable_system_cb(void *unused) { state->last_valid_bpm_ticks = cur_ticks; subscriber_age_ticks = 0; } - int64_t subscriber_remaining_ticks = - interval_ticks - subscriber_age_ticks - spin_up_ticks; + int64_t subscriber_remaining_ticks = interval_ticks - subscriber_age_ticks - spin_up_ticks; subscriber_remaining_ticks = MAX(0, subscriber_remaining_ticks); remaining_ticks = MIN(remaining_ticks, subscriber_remaining_ticks); @@ -237,7 +237,7 @@ static void prv_update_hrm_enable_system_cb(void *unused) { // How many milliseconds till we need to send the next sensor reading remaining_ms = pbl_ticks_to_ms(remaining_ticks); - HRM_LOG("Need sensor on again in %"PRIu32" sec", remaining_ms / MS_PER_SECOND); + HRM_LOG("Need sensor on again in %" PRIu32 " sec", remaining_ms / MS_PER_SECOND); turn_sensor_on = (remaining_ms <= 0); } @@ -268,20 +268,20 @@ static void prv_update_hrm_enable_system_cb(void *unused) { s_manager_state.accel_state = sys_accel_manager_data_subscribe( ACCEL_SAMPLING_25HZ, prv_handle_accel_data, NULL, PebbleTask_NewTimers); - - sys_accel_manager_set_sample_buffer( - s_manager_state.accel_state, s_manager_state.accel_manager_buffer, - HRM_MANAGER_ACCEL_MANAGER_SAMPLES_PER_UPDATE); + + sys_accel_manager_set_sample_buffer(s_manager_state.accel_state, + s_manager_state.accel_manager_buffer, + HRM_MANAGER_ACCEL_MANAGER_SAMPLES_PER_UPDATE); if (!hrm_enable(HRM, needed_features)) { // HRM failed to enable, clean up the accel subscription s_manager_state.enable_failure_count++; if (s_manager_state.enable_failure_count >= HRM_MAX_ENABLE_FAILURES) { PBL_LOG_ERR("HRM failed to enable %d times, giving up until reboot", - HRM_MAX_ENABLE_FAILURES); + HRM_MAX_ENABLE_FAILURES); } else { - PBL_LOG_ERR("HRM failed to enable (attempt %d/%d)", - s_manager_state.enable_failure_count, HRM_MAX_ENABLE_FAILURES); + PBL_LOG_ERR("HRM failed to enable (attempt %d/%d)", s_manager_state.enable_failure_count, + HRM_MAX_ENABLE_FAILURES); } sys_accel_manager_data_unsubscribe(s_manager_state.accel_state); s_manager_state.accel_state = NULL; @@ -339,14 +339,16 @@ static void prv_system_task_hrm_handler(void *context) { if (available_bytes < sizeof(PebbleHRMEvent)) { // No event available to read - this can happen if system task callbacks are queued // without corresponding events, or during concurrent access. - PBL_LOG_WRN("HRM: system task handler called with no event in buffer " - "(available=%u, needed=%u)", available_bytes, sizeof(PebbleHRMEvent)); + PBL_LOG_WRN( + "HRM: system task handler called with no event in buffer " + "(available=%u, needed=%u)", + available_bytes, sizeof(PebbleHRMEvent)); pbl_mutex_unlock(&s_manager_state.lock); return; } PebbleHRMEvent event; - prv_read_event_from_buffer_and_consume(&s_manager_state.system_task_event_buffer, &event); + prv_read_event_from_buffer_and_consume(&s_manager_state.system_task_event_buffer, &event); // Send event to all KernelBG subscribers that asked for this feature HRMSubscriberState *state = (HRMSubscriberState *)s_manager_state.subscribers; @@ -358,9 +360,9 @@ static void prv_system_task_hrm_handler(void *context) { // If this subscription is ready to expire, send an "expiring" event if (prv_needs_expiring_event(state, utc_now)) { - PebbleHRMEvent expiring_event = (PebbleHRMEvent) { - .event_type = HRMEvent_SubscriptionExpiring, - .expiring.session_ref = state->session_ref, + PebbleHRMEvent expiring_event = (PebbleHRMEvent){ + .event_type = HRMEvent_SubscriptionExpiring, + .expiring.session_ref = state->session_ref, }; state->callback_handler(&expiring_event, state->callback_context); state->sent_expiration_event = true; @@ -413,57 +415,55 @@ static void prv_queue_system_task_event(const PebbleHRMEvent *event) { circular_buffer_consume(&s_manager_state.system_task_event_buffer, sizeof(PebbleHRMEvent)); ++s_manager_state.dropped_events; } - circular_buffer_write(&s_manager_state.system_task_event_buffer, - (const uint8_t *)event, sizeof(PebbleHRMEvent)); + circular_buffer_write(&s_manager_state.system_task_event_buffer, (const uint8_t *)event, + sizeof(PebbleHRMEvent)); } static void prv_populate_hrm_event(PebbleHRMEvent *event, HRMFeature feature, const HRMData *data) { switch (feature) { case HRMFeature_BPM: - *event = (PebbleHRMEvent) { - .event_type = HRMEvent_BPM, - .bpm = { - .bpm = data->hrm_bpm, - .quality = data->hrm_quality, - }, + *event = (PebbleHRMEvent){ + .event_type = HRMEvent_BPM, + .bpm = { + .bpm = data->hrm_bpm, + .quality = data->hrm_quality, + }, }; break; case HRMFeature_HRV: - *event = (PebbleHRMEvent) { - .event_type = HRMEvent_HRV, - .hrv = { - .ppi_ms = data->hrv_ppi_ms, - .quality = data->hrv_quality, - }, + *event = (PebbleHRMEvent){ + .event_type = HRMEvent_HRV, + .hrv = { + .ppi_ms = data->hrv_ppi_ms, + .quality = data->hrv_quality, + }, }; break; case HRMFeature_SpO2: - *event = (PebbleHRMEvent) { - .event_type = HRMEvent_SpO2, - .spo2 = { - .percent = data->spo2_percent, - .quality = data->spo2_quality, - }, + *event = (PebbleHRMEvent){ + .event_type = HRMEvent_SpO2, + .spo2 = { + .percent = data->spo2_percent, + .quality = data->spo2_quality, + }, }; break; #ifdef CONFIG_MFG - case HRMFeature_CTR: - { + case HRMFeature_CTR: { HRMCTRData *ctr_data = kernel_zalloc_check(sizeof(HRMCTRData)); - memcpy(ctr_data->ctr, data->ctr, sizeof(HRMCTRData)); - *event = (PebbleHRMEvent) { - .event_type = HRMEvent_CTR, - .ctr = ctr_data, + memcpy(ctr_data->ctr, data->ctr, sizeof(HRMCTRData)); + *event = (PebbleHRMEvent){ + .event_type = HRMEvent_CTR, + .ctr = ctr_data, }; break; } - case HRMFeature_Leakage: - { + case HRMFeature_Leakage: { HRMLeakageData *leakage_data = kernel_zalloc_check(sizeof(HRMLeakageData)); memcpy(leakage_data->leakage, data->leakage, sizeof(HRMLeakageData)); - *event = (PebbleHRMEvent) { - .event_type = HRMEvent_Leakage, - .leakage = leakage_data, + *event = (PebbleHRMEvent){ + .event_type = HRMEvent_Leakage, + .leakage = leakage_data, }; break; } @@ -474,18 +474,18 @@ static void prv_populate_hrm_event(PebbleHRMEvent *event, HRMFeature feature, co } static bool prv_event_put(HRMSubscriberState *state, PebbleHRMEvent *event) { - bool success; - if (state->queue) { - PebbleEvent e = { + bool success; + if (state->queue) { + PebbleEvent e = { .type = PEBBLE_HRM_EVENT, .hrm = *event, - }; - success = (pbl_msgq_put(state->queue, &e, PBL_NO_WAIT) == 0); - } else { - prv_queue_system_task_event(event); - success = system_task_add_callback(prv_system_task_hrm_handler, NULL); - } - return success; + }; + success = (pbl_msgq_put(state->queue, &e, PBL_NO_WAIT) == 0); + } else { + prv_queue_system_task_event(event); + success = system_task_add_callback(prv_system_task_hrm_handler, NULL); + } + return success; } T_STATIC void prv_charger_event_cb(PebbleEvent *e, void *context) { @@ -509,13 +509,13 @@ void hrm_manager_new_data_cb(const HRMData *data) { HRM_LOG("HRM Data:"); if (data->features & HRMFeature_BPM) { - HRM_LOG(" BPM: %"PRIu8", Quality: %d", data->hrm_bpm, data->hrm_quality); + HRM_LOG(" BPM: %" PRIu8 ", Quality: %d", data->hrm_bpm, data->hrm_quality); } if (data->features & HRMFeature_HRV) { - HRM_LOG(" HRV PPI: %"PRIu16"ms, Quality: %d", data->hrv_ppi_ms, data->hrv_quality); + HRM_LOG(" HRV PPI: %" PRIu16 "ms, Quality: %d", data->hrv_ppi_ms, data->hrv_quality); } if (data->features & HRMFeature_SpO2) { - HRM_LOG(" SpO2: %"PRIu8", Quality: %d", data->spo2_percent, data->spo2_quality); + HRM_LOG(" SpO2: %" PRIu8 ", Quality: %d", data->spo2_percent, data->spo2_quality); } #ifdef CONFIG_HRM_HRV @@ -523,14 +523,14 @@ void hrm_manager_new_data_cb(const HRMData *data) { // Broadcast HRV updates as a health service event so apps subscribed through health_service // receive them without needing to consume raw HRM events. PebbleEvent health_event = { - .type = PEBBLE_HEALTH_SERVICE_EVENT, - .health_event = { - .type = HealthEventHRVUpdate, - .data.hrv_update = { - .ppi_ms = data->hrv_ppi_ms, - .quality = data->hrv_quality, + .type = PEBBLE_HEALTH_SERVICE_EVENT, + .health_event = { + .type = HealthEventHRVUpdate, + .data.hrv_update = { + .ppi_ms = data->hrv_ppi_ms, + .quality = data->hrv_quality, + }, }, - }, }; event_put(&health_event); } @@ -546,8 +546,7 @@ void hrm_manager_new_data_cb(const HRMData *data) { // Only count Good+ or OffWrist as "served" for sensor power cycling if ((data->features & HRMFeature_BPM) && - (data->hrm_quality >= HRMQuality_Good || - data->hrm_quality == HRMQuality_OffWrist)) { + (data->hrm_quality >= HRMQuality_Good || data->hrm_quality == HRMQuality_OffWrist)) { state->last_valid_bpm_ticks = cur_ticks; } @@ -576,9 +575,9 @@ void hrm_manager_new_data_cb(const HRMData *data) { // If this is an app subscription, see if we need to send an "expiring" event. We check // KernelBG subscribers from the system callback function (prv_system_task_hrm_handler). if (!state->callback_handler && prv_needs_expiring_event(state, utc_now)) { - hrm_event = (PebbleHRMEvent) { - .event_type = HRMEvent_SubscriptionExpiring, - .expiring.session_ref = state->session_ref, + hrm_event = (PebbleHRMEvent){ + .event_type = HRMEvent_SubscriptionExpiring, + .expiring.session_ref = state->session_ref, }; if (prv_event_put(state, &hrm_event)) { state->sent_expiration_event = true; @@ -596,7 +595,7 @@ void hrm_manager_new_data_cb(const HRMData *data) { // If the prior subscription expired, remove it now if (expired_state) { - PBL_LOG_DBG("Subscription %"PRIu32" expired", expired_state->session_ref); + PBL_LOG_DBG("Subscription %" PRIu32 " expired", expired_state->session_ref); prv_remove_and_free_subscription(expired_state); } } @@ -617,19 +616,18 @@ void hrm_manager_handle_prefs_changed(void) { } void hrm_manager_init(void) { - s_manager_state = (struct HRMManagerState) { - .update_enable_timer_id = new_timer_create(), - .enabled_charging_state = !battery_is_usb_connected(), - .charger_subscription = (EventServiceInfo) { - .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, - .handler = prv_charger_event_cb, - }, + s_manager_state = (struct HRMManagerState){ + .update_enable_timer_id = new_timer_create(), + .enabled_charging_state = !battery_is_usb_connected(), + .charger_subscription = (EventServiceInfo){ + .type = PEBBLE_BATTERY_STATE_CHANGE_EVENT, + .handler = prv_charger_event_cb, + }, }; pbl_mutex_init(&s_manager_state.lock); pbl_mutex_init(&s_manager_state.accel_data_lock); circular_buffer_init(&s_manager_state.system_task_event_buffer, - s_manager_state.system_task_event_storage, - EVENT_STORAGE_SIZE); + s_manager_state.system_task_event_storage, EVENT_STORAGE_SIZE); event_service_client_subscribe(&s_manager_state.charger_subscription); } @@ -654,7 +652,7 @@ HRMSessionRef hrm_manager_subscribe_with_callback(AppInstallId app_id, uint32_t // If there is already an existing subscription for this app, remove the old one before we // add another subscription for this app. if (is_app_subscription) { - HRMSubscriberState * state = prv_get_subscriber_state_from_app_id(current_task, app_id); + HRMSubscriberState *state = prv_get_subscriber_state_from_app_id(current_task, app_id); if (state != NULL) { session_ref = state->session_ref; PBL_LOG_DBG("Removing existing subscription for this app"); @@ -668,19 +666,18 @@ HRMSessionRef hrm_manager_subscribe_with_callback(AppInstallId app_id, uint32_t } HRMSubscriberState *state = kernel_malloc_check(sizeof(*state)); - *state = (HRMSubscriberState) { - .session_ref = session_ref, - .app_id = app_id, - .task = current_task, - .queue = pebble_task_get_to_queue(current_task), - .callback_handler = callback, - .callback_context = context, - .update_interval_s = update_interval_s, - .expire_utc = (expire_s != 0) ? (rtc_get_time() + expire_s) : 0, - .features = features, + *state = (HRMSubscriberState){ + .session_ref = session_ref, + .app_id = app_id, + .task = current_task, + .queue = pebble_task_get_to_queue(current_task), + .callback_handler = callback, + .callback_context = context, + .update_interval_s = update_interval_s, + .expire_utc = (expire_s != 0) ? (rtc_get_time() + expire_s) : 0, + .features = features, }; - s_manager_state.subscribers = - list_insert_before(s_manager_state.subscribers, &state->list_node); + s_manager_state.subscribers = list_insert_before(s_manager_state.subscribers, &state->list_node); // Update the HR enablement state system_task_add_callback(prv_update_hrm_enable_system_cb, NULL); @@ -689,8 +686,8 @@ HRMSessionRef hrm_manager_subscribe_with_callback(AppInstallId app_id, uint32_t return state->session_ref; } -DEFINE_SYSCALL(HRMSessionRef, sys_hrm_manager_app_subscribe, - AppInstallId app_id, uint32_t update_interval_s, uint16_t expire_sec, HRMFeature features) { +DEFINE_SYSCALL(HRMSessionRef, sys_hrm_manager_app_subscribe, AppInstallId app_id, + uint32_t update_interval_s, uint16_t expire_sec, HRMFeature features) { return hrm_manager_subscribe_with_callback(app_id, update_interval_s, expire_sec, features, NULL, NULL); } @@ -714,8 +711,8 @@ DEFINE_SYSCALL(bool, sys_hrm_manager_unsubscribe, HRMSessionRef session) { DEFINE_SYSCALL(HRMSessionRef, sys_hrm_manager_get_app_subscription, AppInstallId app_id) { pbl_mutex_lock(&s_manager_state.lock, PBL_FOREVER); HRMSessionRef ref = HRM_INVALID_SESSION_REF; - HRMSubscriberState *state = prv_get_subscriber_state_from_app_id(pebble_task_get_current(), - app_id); + HRMSubscriberState *state = + prv_get_subscriber_state_from_app_id(pebble_task_get_current(), app_id); if (state) { ref = state->session_ref; } @@ -815,7 +812,8 @@ static void prv_console_read_callback(PebbleHRMEvent *event, void *context) { if (event->event_type == HRMEvent_BPM) { system_task_add_callback(prv_console_unsubscribe_callback, NULL); char buf[32]; - prompt_send_response_fmt(buf, 32, "BPM: %"PRIu8 " quality: %"PRIu8, event->bpm.bpm, event->bpm.quality); + prompt_send_response_fmt(buf, 32, "BPM: %" PRIu8 " quality: %" PRIu8, event->bpm.bpm, + event->bpm.quality); } } @@ -827,13 +825,13 @@ void command_hrm_read(void) { prompt_command_continues_after_returning(); } -HRMAccelData * hrm_manager_get_accel_data(void) { +HRMAccelData *hrm_manager_get_accel_data(void) { pbl_mutex_lock(&s_manager_state.accel_data_lock, PBL_FOREVER); return &s_manager_state.accel_data; } void hrm_manager_release_accel_data(void) { - s_manager_state.accel_data.num_samples = 0; // Reset buffer + s_manager_state.accel_data.num_samples = 0; // Reset buffer pbl_mutex_unlock(&s_manager_state.accel_data_lock); } diff --git a/src/fw/services/i18n/i18n.c b/src/fw/services/i18n/i18n.c index 0ff04d608f..10556b7f22 100644 --- a/src/fw/services/i18n/i18n.c +++ b/src/fw/services/i18n/i18n.c @@ -102,8 +102,8 @@ static uint32_t prv_next_index(uint32_t curidx, uint32_t hashsize, uint32_t step //! @param[out] rstring Can be NULL. If non-null this buffer will be populated with the translated //! string. This buffer will be null-terminated. //! @param rstring_len The length of the rstring buffer. -static void prv_lookup(const char *msgid, struct DomainBinding *db, - size_t *rlen, char *rstring, size_t rstring_len) { +static void prv_lookup(const char *msgid, struct DomainBinding *db, size_t *rlen, char *rstring, + size_t rstring_len) { MoHandle *mohandle = &db->mohandle; *rlen = 0; @@ -122,15 +122,16 @@ static void prv_lookup(const char *msgid, struct DomainBinding *db, return; } MoEntry oentry; - if (resource_load_byte_range_system(0, db->resource_id, mohandle->mo.hdr.mo_otable - + sizeof(MoEntry) * strno, (uint8_t *)&oentry, sizeof(MoEntry)) != sizeof(MoEntry)) { + if (resource_load_byte_range_system(0, db->resource_id, + mohandle->mo.hdr.mo_otable + sizeof(MoEntry) * strno, + (uint8_t *)&oentry, sizeof(MoEntry)) != sizeof(MoEntry)) { return; } if (len == oentry.len) { // Length of original matches, compare the contents char key[oentry.len + 1]; if (resource_load_byte_range_system(0, db->resource_id, oentry.off, (uint8_t *)key, - oentry.len) != oentry.len) { + oentry.len) != oentry.len) { return; } key[oentry.len] = '\0'; @@ -138,23 +139,24 @@ static void prv_lookup(const char *msgid, struct DomainBinding *db, if (!strcmp(msgid, key)) { // Contents of original string matches, get the translated string MoEntry tentry; - if (resource_load_byte_range_system(0, db->resource_id, mohandle->mo.hdr.mo_ttable - + sizeof(MoEntry) * strno, (uint8_t *)&tentry, sizeof(MoEntry)) != sizeof(MoEntry)) { + if (resource_load_byte_range_system( + 0, db->resource_id, mohandle->mo.hdr.mo_ttable + sizeof(MoEntry) * strno, + (uint8_t *)&tentry, sizeof(MoEntry)) != sizeof(MoEntry)) { return; } - if (rstring) { // If we want the translated string, copy it out. + if (rstring) { // If we want the translated string, copy it out. // Make sure we don't read out more than the length of the buffer we're reading into. // Leave space for the null-terminator as well. const size_t read_length = MIN(tentry.len, rstring_len - 1); - if (resource_load_byte_range_system(0, db->resource_id, tentry.off, - (uint8_t *)rstring, read_length) != read_length) { + if (resource_load_byte_range_system(0, db->resource_id, tentry.off, (uint8_t *)rstring, + read_length) != read_length) { return; } rstring[read_length] = '\0'; } - if (rlen) { // If we want the translated string length, copy it out. + if (rlen) { // If we want the translated string length, copy it out. *rlen = tentry.len; } return; @@ -170,14 +172,14 @@ static void prv_lookup(const char *msgid, struct DomainBinding *db, static bool prv_get_property(const char *header, const char *name, char *buffer, size_t size) { // Isolate the language name char *str = strstr(header, name); - if (str == NULL) { // strstr failed + if (str == NULL) { // strstr failed return false; } str += strlen(name); char *end = strchr(str, '\n'); unsigned int length = end - str; - if (end == NULL || length > size) { // strchr failed + if (end == NULL || length > size) { // strchr failed return false; } @@ -269,8 +271,8 @@ static bool prv_mapit(const uint32_t resource_id, struct DomainBinding *db) { } MoHandle *mohandle = &db->mohandle; - if (resource_load_byte_range_system(SYSTEM_APP, resource_id, 0, - (uint8_t *)&mohandle->mo.hdr, sizeof(MoHeader)) == 0) { + if (resource_load_byte_range_system(SYSTEM_APP, resource_id, 0, (uint8_t *)&mohandle->mo.hdr, + sizeof(MoHeader)) == 0) { goto fail; } if (mohandle->mo.hdr.mo_magic != MO_MAGIC) { @@ -278,7 +280,7 @@ static bool prv_mapit(const uint32_t resource_id, struct DomainBinding *db) { } mohandle->len = size; - /* validate htable */ + /* validate htable */ if (mohandle->mo.hdr.mo_hsize < 2) { goto fail; } @@ -287,7 +289,7 @@ static bool prv_mapit(const uint32_t resource_id, struct DomainBinding *db) { uint32_t *htable = kernel_malloc_check(htable_size); mohandle->mo.mo_htable = htable; if (resource_load_byte_range_system(SYSTEM_APP, resource_id, mohandle->mo.hdr.mo_hoffset, - (uint8_t *)htable, htable_size) == 0) { + (uint8_t *)htable, htable_size) == 0) { prv_unmapit(db); goto fail; } @@ -301,8 +303,8 @@ static bool prv_mapit(const uint32_t resource_id, struct DomainBinding *db) { } if (!prv_get_metadata(db)) { - prv_unmapit(db); - goto fail; + prv_unmapit(db); + goto fail; } return true; @@ -327,8 +329,7 @@ void prv_list_flush(void) { static bool prv_list_string_filter_callback(ListNode *found_node, void *data) { I18nString *i18n_string = (I18nString *)found_node; StringLookupInfo *lookup_info = data; - if (i18n_string->original_hash == lookup_info->hash && - lookup_info->owner == i18n_string->owner && + if (i18n_string->original_hash == lookup_info->hash && lookup_info->owner == i18n_string->owner && strcmp(i18n_string->original_string, lookup_info->string) == 0) { return true; } else { @@ -348,23 +349,22 @@ static bool prv_list_owner_filter_callback(ListNode *found_node, void *owner) { // Not static because we call this from unit test code I18nString *prv_list_find_string(const char *string, const void *owner) { StringLookupInfo lookup_info = { - .string = string, - .hash = prv_gettext_hash(string), - .owner = owner + .string = string, + .hash = prv_gettext_hash(string), + .owner = owner }; return (I18nString *)list_find((ListNode *)s_system_domain.strings_list, - prv_list_string_filter_callback, (void *)&lookup_info); + prv_list_string_filter_callback, (void *)&lookup_info); } - static const char *prv_list_add_string(const char *original_string, const char *translated_string, const void *owner) { uint32_t translated_len = strlen(translated_string); // Allocate enough space to hold the original and translated strings. The translated string // is stored at i18n_string->translated and the original string immediately after that. - I18nString *i18n_string = kernel_malloc_check(sizeof(I18nString) + translated_len + 1 - + strlen(original_string) + 1); + I18nString *i18n_string = + kernel_malloc_check(sizeof(I18nString) + translated_len + 1 + strlen(original_string) + 1); list_init(&i18n_string->node); i18n_string->owner = owner; @@ -372,7 +372,7 @@ static const char *prv_list_add_string(const char *original_string, const char * strcpy(i18n_string->translated_string, translated_string); i18n_string->original_hash = prv_gettext_hash(original_string); - // Store the original string immediately after the translated one in memory. + // Store the original string immediately after the translated one in memory. i18n_string->original_string = &i18n_string->translated_string[translated_len + 1]; strcpy(i18n_string->original_string, original_string); @@ -498,7 +498,7 @@ size_t i18n_get_length(const char *msgid) { size_t len = 0; prv_lookup(msgid, db, &len, NULL, 0); - if (len) { // String was found + if (len) { // String was found return len; } @@ -518,10 +518,10 @@ void i18n_free(const char *original, const void *owner) { void i18n_free_all(const void *owner) { I18nString *cur_string = (I18nString *)list_find((ListNode *)s_system_domain.strings_list, - prv_list_owner_filter_callback, (void*)owner); + prv_list_owner_filter_callback, (void *)owner); while (cur_string) { - I18nString *next_string = (I18nString *)list_find_next(&cur_string->node, - prv_list_owner_filter_callback, false, (void*)owner); + I18nString *next_string = (I18nString *)list_find_next( + &cur_string->node, prv_list_owner_filter_callback, false, (void *)owner); prv_list_remove_string(cur_string); cur_string = next_string; } @@ -560,8 +560,8 @@ void i18n_set_resource(uint32_t resource_id) { } s_system_domain.resource_id = resource_id; - s_system_domain.watch_handle = resource_watch(SYSTEM_APP, resource_id, - prv_resource_changed_callback, &s_system_domain); + s_system_domain.watch_handle = + resource_watch(SYSTEM_APP, resource_id, prv_resource_changed_callback, &s_system_domain); if (shell_prefs_get_language_english()) { prv_unset(); @@ -599,4 +599,3 @@ void command_i18n_resource(const char *arg) { uint32_t resource_id = atoi(arg); i18n_set_resource(resource_id); } - diff --git a/src/fw/services/i18n/syscalls.c b/src/fw/services/i18n/syscalls.c index 8dbfd8f4e7..bccd09284d 100644 --- a/src/fw/services/i18n/syscalls.c +++ b/src/fw/services/i18n/syscalls.c @@ -25,8 +25,7 @@ DEFINE_SYSCALL(void, sys_i18n_get_locale, char *buf) { strncpy(buf, i18n_get_locale(), ISO_LOCALE_LENGTH); } -DEFINE_SYSCALL(void, sys_i18n_get_with_buffer, const char *string, - char *buffer, size_t length) { +DEFINE_SYSCALL(void, sys_i18n_get_with_buffer, const char *string, char *buffer, size_t length) { if (PRIVILEGE_WAS_ELEVATED) { if (pebble_task_get_current() == PebbleTask_Worker) { // not allowed from workers diff --git a/src/fw/services/idle_watchdog/service.c b/src/fw/services/idle_watchdog/service.c index 2cb447eb22..cf56ec9c66 100644 --- a/src/fw/services/idle_watchdog/service.c +++ b/src/fw/services/idle_watchdog/service.c @@ -45,28 +45,28 @@ static void prv_watchdog_feed(PebbleEvent *e, void *context) { } void prf_idle_watchdog_init(void) { - s_bt_event_info = (EventServiceInfo) { - .type = PEBBLE_BT_CONNECTION_EVENT, - .handler = prv_watchdog_feed, + s_bt_event_info = (EventServiceInfo){ + .type = PEBBLE_BT_CONNECTION_EVENT, + .handler = prv_watchdog_feed, }; event_service_client_subscribe(&s_bt_event_info); - s_battery_event_info = (EventServiceInfo) { - .type = PEBBLE_BATTERY_CONNECTION_EVENT, - .handler = prv_watchdog_feed, + s_battery_event_info = (EventServiceInfo){ + .type = PEBBLE_BATTERY_CONNECTION_EVENT, + .handler = prv_watchdog_feed, }; event_service_client_subscribe(&s_battery_event_info); - s_button_event_info = (EventServiceInfo) { - .type = PEBBLE_BUTTON_DOWN_EVENT, - .handler = prv_watchdog_feed, + s_button_event_info = (EventServiceInfo){ + .type = PEBBLE_BUTTON_DOWN_EVENT, + .handler = prv_watchdog_feed, }; event_service_client_subscribe(&s_button_event_info); } void prf_idle_watchdog_start(void) { - s_is_idle_timer = (RegularTimerInfo) { - .cb = prv_handle_watchdog_timeout, + s_is_idle_timer = (RegularTimerInfo){ + .cb = prv_handle_watchdog_timeout, }; regular_timer_add_multiminute_callback(&s_is_idle_timer, PRF_IDLE_TIMEOUT_MINUTES); __atomic_store_n(&s_running, true, __ATOMIC_RELAXED); diff --git a/src/fw/services/imaging/imaging.c b/src/fw/services/imaging/imaging.c index 6730f795e7..7f25d0d93c 100644 --- a/src/fw/services/imaging/imaging.c +++ b/src/fw/services/imaging/imaging.c @@ -49,7 +49,7 @@ static struct { static void prv_rx_reset(void) { kernel_free(s_rx.pixels); kernel_free(s_rx.palette); - s_rx = (__typeof__(s_rx)) { 0 }; + s_rx = (__typeof__(s_rx)){0}; } void imaging_register_handler(ImagingImageType image_type, ImagingReceivedHandler handler) { @@ -89,8 +89,7 @@ static bool prv_type_latched_unsupported(CommSession *session, ImagingImageType bool imaging_is_type_supported(ImagingImageType image_type) { CommSession *session = comm_session_get_system_session(); - if (!session || - !comm_session_has_capability(session, CommSessionImagingSupport)) { + if (!session || !comm_session_has_capability(session, CommSessionImagingSupport)) { return false; } pbl_mutex_lock(&s_lock, PBL_FOREVER); @@ -232,7 +231,7 @@ void imaging_protocol_msg_callback(CommSession *session, const uint8_t *msg, siz return; } for (uint8_t i = 0; i < palette_count; ++i) { - s_rx.palette[i] = (GColor) { .argb = cursor[i] }; + s_rx.palette[i] = (GColor){.argb = cursor[i]}; } cursor += palette_count; } @@ -277,7 +276,7 @@ void imaging_protocol_msg_callback(CommSession *session, const uint8_t *msg, siz bmp->row_size_bytes = s_rx.row_size_bytes; bmp->info.format = s_rx.format; bmp->info.version = GBITMAP_VERSION_CURRENT; - bmp->bounds = (GRect) { { 0, 0 }, { s_rx.width, s_rx.height } }; + bmp->bounds = (GRect){{0, 0}, {s_rx.width, s_rx.height}}; bmp->palette = s_rx.palette; // Ownership of the pixel and palette buffers moves into the bitmap. const uint8_t token = s_rx.token; diff --git a/src/fw/services/light/als_screen_compensation.h b/src/fw/services/light/als_screen_compensation.h index 649e669b26..cd565947fc 100644 --- a/src/fw/services/light/als_screen_compensation.h +++ b/src/fw/services/light/als_screen_compensation.h @@ -27,8 +27,8 @@ uint32_t als_compensation_apply(uint32_t raw_level, uint16_t avg_luminance_q8, //! Average front-pixel luminance over a framebuffer region, Q8 (0..256). //! Clamps the region to the bitmap bounds and each row's valid pixel range. //! Returns 256 (no-op gain) for an empty/zero-area region. -uint16_t als_compensation_region_luminance(const struct GBitmap *fb, int16_t rx, - int16_t ry, int16_t rw, int16_t rh); +uint16_t als_compensation_region_luminance(const struct GBitmap *fb, int16_t rx, int16_t ry, + int16_t rw, int16_t rh); //! Sample the live system framebuffer over the board's sensor region and return //! the average front-pixel luminance, Q8 (0..256). KernelMain-only (reads the diff --git a/src/fw/services/light/als_screen_compensation_region.c b/src/fw/services/light/als_screen_compensation_region.c index cc6e7bd8c8..dd36747cbe 100644 --- a/src/fw/services/light/als_screen_compensation_region.c +++ b/src/fw/services/light/als_screen_compensation_region.c @@ -13,8 +13,8 @@ // gcolor_get_luminance() returns a 2-bit value (0..3); scale to 0..255. #define ALS_COMP_LUM_TO_255(l) ((uint32_t)(l) * 85u) -uint16_t als_compensation_region_luminance(const GBitmap *fb, int16_t rx, int16_t ry, - int16_t rw, int16_t rh) { +uint16_t als_compensation_region_luminance(const GBitmap *fb, int16_t rx, int16_t ry, int16_t rw, + int16_t rh) { if (fb == NULL || rw <= 0 || rh <= 0) { return 256; // empty/unmeasured region -> unity gain } @@ -40,8 +40,8 @@ uint16_t als_compensation_region_luminance(const GBitmap *fb, int16_t rx, int16_ if (count == 0) { return 256; } - const uint32_t avg255 = sum / count; // 0..255 - return (uint16_t)((avg255 * 256u) / 255u); // 0..256 (white -> 256) + const uint32_t avg255 = sum / count; // 0..255 + return (uint16_t)((avg255 * 256u) / 255u); // 0..256 (white -> 256) } #endif // CONFIG_ALS_SCREEN_COMPENSATION diff --git a/src/fw/services/light/console.c b/src/fw/services/light/console.c index 46be145795..b50864cf2a 100644 --- a/src/fw/services/light/console.c +++ b/src/fw/services/light/console.c @@ -33,8 +33,8 @@ void command_light_test(void) { const uint16_t lum_q8 = als_compensation_sample_luminance(); const uint32_t corr = als_compensation_apply(raw, lum_q8, CONFIG_ALS_BLACK_SCALE_Q8); prompt_send_response_fmt(buffer, sizeof(buffer), - "als raw: %" PRIu32 " lum_q8: %" PRIu16 " corr: %" PRIu32, - raw, lum_q8, corr); + "als raw: %" PRIu32 " lum_q8: %" PRIu16 " corr: %" PRIu32, raw, lum_q8, + corr); #else prompt_send_response_fmt(buffer, sizeof(buffer), "als: %" PRIu32, ambient_light_get_light_level()); @@ -148,11 +148,10 @@ void command_als_curve(void) { raw_white = (raw > 0) ? raw : 1; } const uint32_t gain_x100 = (raw > 0) ? (raw_white * 100u / raw) : 0; - prompt_send_response_fmt(buf, sizeof(buf), - "als curve: %s lum_q8=%" PRIu16 " raw=%" PRIu32 - " gain=%" PRIu32 ".%02" PRIu32 "x", - levels[i].name, levels[i].lum_q8, raw, - gain_x100 / 100u, gain_x100 % 100u); + prompt_send_response_fmt( + buf, sizeof(buf), + "als curve: %s lum_q8=%" PRIu16 " raw=%" PRIu32 " gain=%" PRIu32 ".%02" PRIu32 "x", + levels[i].name, levels[i].lum_q8, raw, gain_x100 / 100u, gain_x100 % 100u); } compositor_unfreeze(); diff --git a/src/fw/services/light/service.c b/src/fw/services/light/service.c index c0511e4c7e..8bb2ec446f 100644 --- a/src/fw/services/light/service.c +++ b/src/fw/services/light/service.c @@ -23,10 +23,10 @@ PBL_LOG_MODULE_DEFINE(service_light, CONFIG_SERVICE_LIGHT_LOG_LEVEL); typedef enum { - LIGHT_STATE_ON = 1, // backlight on, no timeouts - LIGHT_STATE_ON_TIMED = 2, // backlight on, will start fading after a period - LIGHT_STATE_ON_FADING = 3, // backlight in the process of fading out - LIGHT_STATE_OFF = 4, // backlight off; idle state + LIGHT_STATE_ON = 1, // backlight on, no timeouts + LIGHT_STATE_ON_TIMED = 2, // backlight on, will start fading after a period + LIGHT_STATE_ON_FADING = 3, // backlight in the process of fading out + LIGHT_STATE_OFF = 4, // backlight off; idle state } BacklightState; // the time duration of a fade out from full intensity @@ -102,21 +102,21 @@ static uint8_t s_fade_level_idx = 0; //! LIGHT_FADE_TIME_MS static uint32_t s_fade_step_ms = 0; -//! Mutex to guard all the above state. We have a pattern of taking the lock in the public functions and assuming -//! it's already taken in the prv_ functions. +//! Mutex to guard all the above state. We have a pattern of taking the lock in the public functions +//! and assuming it's already taken in the prv_ functions. static PBL_MUTEX_DEFINE(s_mutex); //! Analytics: Track time-weighted average intensity -static uint64_t s_intensity_time_product_sum; // Sum of (intensity_pct × time_ms) -static RtcTicks s_last_intensity_sample_ticks; // Timestamp of last sample -static uint8_t s_last_sampled_intensity_pct; // Last intensity percentage sampled -static uint32_t s_total_on_time_ms; // Total backlight on time tracked internally +static uint64_t s_intensity_time_product_sum; // Sum of (intensity_pct × time_ms) +static RtcTicks s_last_intensity_sample_ticks; // Timestamp of last sample +static uint8_t s_last_sampled_intensity_pct; // Last intensity percentage sampled +static uint32_t s_total_on_time_ms; // Total backlight on time tracked internally //! Short-lived cache so back-to-back ALS consumers in the same wake path //! (prv_light_allowed → prv_backlight_get_intensity, plus a button release //! that follows the press within the TTL) skip the ~200 ms I2C poll. static uint32_t s_als_cached_level; -static RtcTicks s_als_cached_ticks; // 0 = invalid +static RtcTicks s_als_cached_ticks; // 0 = invalid #define ALS_CACHE_TTL_TICKS (RTC_TICKS_HZ) // 1 second //! Event-gated continuous ALS: @@ -235,11 +235,11 @@ static void light_timer_callback(void *data) { static uint8_t prv_backlight_get_intensity(void) { // low_power_mode backlight intensity (25% of max brightness) const uint8_t backlight_low_power_intensity = 25; - + if (low_power_is_active()) { return backlight_low_power_intensity; } - + #if defined(CONFIG_DYNAMIC_BACKLIGHT) && !defined(CONFIG_RECOVERY_FW) // Dynamic backlight: linear ramp from the mode's floor intensity at 0 lux up // to 100% at the mode's full-brightness lux level, then clamped to user_max. @@ -266,7 +266,7 @@ static uint8_t prv_backlight_get_intensity(void) { return (ramped > user_max) ? user_max : (uint8_t)ramped; } #endif - + return backlight_get_intensity(); } @@ -297,9 +297,8 @@ static void prv_update_intensity_analytics(uint8_t new_intensity_pct) { //! user's stored backlight-color preference, defaulting to BACKLIGHT_COLOR_WARM_WHITE. static void prv_apply_rgb_color(void) { const bool preempted = (s_color_preempt_refcount > 0); - const uint32_t color = (preempted || !s_app_rgb_override_valid) - ? backlight_get_default_color() - : s_app_rgb_override; + const uint32_t color = + (preempted || !s_app_rgb_override_valid) ? backlight_get_default_color() : s_app_rgb_override; backlight_set_color(color); } #endif @@ -389,8 +388,8 @@ static void prv_change_state(BacklightState new_state) { new_brightness = prv_backlight_get_intensity(); // Schedule the timer to move us from the ON_TIMED state to the ON_FADING state - new_timer_start(s_timer_id, backlight_get_timeout_ms(), - light_timer_callback, NULL, 0 /* flags */); + new_timer_start(s_timer_id, backlight_get_timeout_ms(), light_timer_callback, NULL, + 0 /* flags */); break; case LIGHT_STATE_ON_FADING: // Build the fade ladder only when we first enter fading state. Pacing @@ -434,10 +433,10 @@ static void prv_change_state(BacklightState new_state) { const bool is_on = (s_light_state != LIGHT_STATE_OFF); if (was_on != is_on) { PebbleEvent event = { - .type = PEBBLE_BACKLIGHT_EVENT, - .backlight = { - .is_on = is_on, - }, + .type = PEBBLE_BACKLIGHT_EVENT, + .backlight = { + .is_on = is_on, + }, }; event_put(&event); } @@ -447,7 +446,7 @@ static bool prv_light_allowed(void) { if (!s_backlight_allowed) { return false; } - + if (backlight_is_enabled()) { if (backlight_is_ambient_sensor_enabled()) { // If the light is off and it's bright outside, don't allow the light to turn on @@ -517,9 +516,7 @@ void light_button_released(void) { s_num_buttons_down = 0; } - if (s_num_buttons_down == 0 && - s_light_state == LIGHT_STATE_ON && - !s_user_controlled_state) { + if (s_num_buttons_down == 0 && s_light_state == LIGHT_STATE_ON && !s_user_controlled_state) { // no more buttons pressed: wait for a bit and then start the fade-out timer prv_change_state(LIGHT_STATE_ON_TIMED); } @@ -547,7 +544,7 @@ void light_touch_up(void) { void light_enable_interaction(void) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); - //if some buttons are held or light_enable is asserted, do nothing + // if some buttons are held or light_enable is asserted, do nothing if (s_num_buttons_down > 0 || s_light_state == LIGHT_STATE_ON) { pbl_mutex_unlock(&s_mutex); return; diff --git a/src/fw/services/music/endpoint.c b/src/fw/services/music/endpoint.c index 128ca7f493..9c6927c5e8 100644 --- a/src/fw/services/music/endpoint.c +++ b/src/fw/services/music/endpoint.c @@ -24,20 +24,20 @@ static void prv_send_music_command_to_handset(MusicEndpointCmdID cmd) { PBL_LOG_ERR("No system session"); return; } - comm_session_send_data(session, MUSIC_CTRL_ENDPOINT, - (const uint8_t *)&cmd, 1, COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(session, MUSIC_CTRL_ENDPOINT, (const uint8_t *)&cmd, 1, + COMM_SESSION_DEFAULT_TIMEOUT); } -static const uint8_t* prv_read_ptr_and_length_from_buffer(const uint8_t *iter, +static const uint8_t *prv_read_ptr_and_length_from_buffer(const uint8_t *iter, const uint8_t *iter_end, - const char** out_str, + const char **out_str, size_t *out_length) { if (!out_str || !out_length) { return NULL; } *out_length = *iter; - *out_str = (const char*) iter + 1; + *out_str = (const char *)iter + 1; iter += 1 + *out_length; if (iter > iter_end) { @@ -47,37 +47,36 @@ static const uint8_t* prv_read_ptr_and_length_from_buffer(const uint8_t *iter, return iter; } -static void prv_update_now_playing_info(CommSession *session, const uint8_t* msg, size_t length) { +static void prv_update_now_playing_info(CommSession *session, const uint8_t *msg, size_t length) { // Read all the lengths from the message so we know how to break it up. - const uint8_t* read_iter = msg; - const char* artist_ptr; + const uint8_t *read_iter = msg; + const char *artist_ptr; size_t artist_length; - read_iter = prv_read_ptr_and_length_from_buffer(read_iter, msg + length, - &artist_ptr, &artist_length); + read_iter = + prv_read_ptr_and_length_from_buffer(read_iter, msg + length, &artist_ptr, &artist_length); if (!read_iter) { return; } - const char* album_ptr; + const char *album_ptr; size_t album_length; - read_iter = prv_read_ptr_and_length_from_buffer(read_iter, msg + length, - &album_ptr, &album_length); + read_iter = + prv_read_ptr_and_length_from_buffer(read_iter, msg + length, &album_ptr, &album_length); if (!read_iter) { return; } - const char* title_ptr; + const char *title_ptr; size_t title_length; - read_iter = prv_read_ptr_and_length_from_buffer(read_iter, msg + length, - &title_ptr, &title_length); + read_iter = + prv_read_ptr_and_length_from_buffer(read_iter, msg + length, &title_ptr, &title_length); if (!read_iter) { return; } - music_update_now_playing(title_ptr, title_length, - artist_ptr, artist_length, - album_ptr, album_length); + music_update_now_playing(title_ptr, title_length, artist_ptr, artist_length, album_ptr, + album_length); if (comm_session_has_capability(session, CommSessionExtendedMusicService)) { if (read_iter + sizeof(uint32_t) <= msg + length) { @@ -98,11 +97,11 @@ static void prv_update_now_playing_info(CommSession *session, const uint8_t* msg } } -static void prv_update_play_state_info(CommSession *session, const uint8_t* msg, size_t length) { +static void prv_update_play_state_info(CommSession *session, const uint8_t *msg, size_t length) { if (length < sizeof(MusicEndpointPlayStateInfo)) { return; } - MusicEndpointPlayStateInfo *play_state_info = (MusicEndpointPlayStateInfo*) msg; + MusicEndpointPlayStateInfo *play_state_info = (MusicEndpointPlayStateInfo *)msg; MusicPlayerStateUpdate player_state_update; switch (play_state_info->play_state) { @@ -125,8 +124,8 @@ static void prv_update_play_state_info(CommSession *session, const uint8_t* msg, player_state_update.playback_state = MusicPlayStateInvalid; } player_state_update.playback_rate_percent = play_state_info->play_rate; - const uint8_t skip_seeks = (length > sizeof(MusicEndpointPlayStateInfo)) ? - msg[sizeof(MusicEndpointPlayStateInfo)] : 0; + const uint8_t skip_seeks = + (length > sizeof(MusicEndpointPlayStateInfo)) ? msg[sizeof(MusicEndpointPlayStateInfo)] : 0; player_state_update.skip_seeks_within_track = (skip_seeks & MusicEndpointSkipSeeksWithinTrack); s_progress_reporting_supported = (play_state_info->track_pos_ms >= 0); player_state_update.elapsed_time_ms = MAX(play_state_info->track_pos_ms, 0); @@ -137,29 +136,29 @@ static void prv_update_play_state_info(CommSession *session, const uint8_t* msg, music_update_player_playback_state(&player_state_update); } -static void prv_update_volume_info(CommSession *session, const uint8_t* msg, size_t length) { +static void prv_update_volume_info(CommSession *session, const uint8_t *msg, size_t length) { if (length < sizeof(uint8_t)) { return; } music_update_player_volume_percent((uint8_t)*msg); } -static void prv_update_player_info(CommSession *session, const uint8_t* msg, size_t length) { +static void prv_update_player_info(CommSession *session, const uint8_t *msg, size_t length) { // Read all the lengths from the message so we know how to break it up. - const uint8_t* read_iter = msg; + const uint8_t *read_iter = msg; - const char* player_package_ptr; + const char *player_package_ptr; size_t player_package_length; - read_iter = prv_read_ptr_and_length_from_buffer(read_iter, msg + length, - &player_package_ptr, &player_package_length); + read_iter = prv_read_ptr_and_length_from_buffer(read_iter, msg + length, &player_package_ptr, + &player_package_length); if (!read_iter) { return; } - const char* player_name_ptr; + const char *player_name_ptr; size_t player_name_length; - read_iter = prv_read_ptr_and_length_from_buffer(read_iter, msg + length, - &player_name_ptr, &player_name_length); + read_iter = prv_read_ptr_and_length_from_buffer(read_iter, msg + length, &player_name_ptr, + &player_name_length); if (!read_iter) { return; } @@ -167,7 +166,7 @@ static void prv_update_player_info(CommSession *session, const uint8_t* msg, siz music_update_player_name(player_name_ptr, player_name_length); } -void music_protocol_msg_callback(CommSession *session, const uint8_t* msg, size_t length) { +void music_protocol_msg_callback(CommSession *session, const uint8_t *msg, size_t length) { if (!s_connected) { return; } @@ -187,7 +186,7 @@ void music_protocol_msg_callback(CommSession *session, const uint8_t* msg, size_ prv_update_player_info(session, msg, length); break; default: - PBL_LOG_DBG("Invalid command 0x%"PRIx8, msg[0]); + PBL_LOG_DBG("Invalid command 0x%" PRIx8, msg[0]); } } @@ -237,8 +236,7 @@ static MusicServerCapability prv_music_get_capability_bitset(void) { if (comm_session_has_capability(comm_session_get_system_session(), CommSessionExtendedMusicService)) { if (s_progress_reporting_supported) { - return (MusicServerCapabilityPlaybackStateReporting | - MusicServerCapabilityProgressReporting | + return (MusicServerCapabilityPlaybackStateReporting | MusicServerCapabilityProgressReporting | MusicServerCapabilityVolumeReporting); } else { return (MusicServerCapabilityPlaybackStateReporting | MusicServerCapabilityVolumeReporting); @@ -255,25 +253,23 @@ static bool prv_music_needs_user_to_start_playback_on_phone(void) { static void prv_music_request_reduced_latency(bool reduced_latency) { const ResponseTimeState state = reduced_latency ? ResponseTimeMiddle : ResponseTimeMax; comm_session_set_responsiveness(comm_session_get_system_session(), - BtConsumerMusicServiceIndefinite, state, - MAX_PERIOD_RUN_FOREVER); + BtConsumerMusicServiceIndefinite, state, MAX_PERIOD_RUN_FOREVER); } static void prv_music_request_low_latency_for_period(uint32_t period_ms) { comm_session_set_responsiveness(comm_session_get_system_session(), - BtConsumerMusicServiceMomentary, - ResponseTimeMin, + BtConsumerMusicServiceMomentary, ResponseTimeMin, period_ms / MS_PER_SECOND); } static const MusicServerImplementation s_pp_music_implementation = { - .debug_name = "PP", - .is_command_supported = &prv_music_is_command_supported, - .command_send = &prv_music_command_send, - .needs_user_to_start_playback_on_phone = prv_music_needs_user_to_start_playback_on_phone, - .get_capability_bitset = prv_music_get_capability_bitset, - .request_reduced_latency = prv_music_request_reduced_latency, - .request_low_latency_for_period = prv_music_request_low_latency_for_period, + .debug_name = "PP", + .is_command_supported = &prv_music_is_command_supported, + .command_send = &prv_music_command_send, + .needs_user_to_start_playback_on_phone = prv_music_needs_user_to_start_playback_on_phone, + .get_capability_bitset = prv_music_get_capability_bitset, + .request_reduced_latency = prv_music_request_reduced_latency, + .request_low_latency_for_period = prv_music_request_low_latency_for_period, }; //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/fw/services/music/service.c b/src/fw/services/music/service.c index 76d7335d97..7dfb432c3c 100644 --- a/src/fw/services/music/service.c +++ b/src/fw/services/music/service.c @@ -24,7 +24,7 @@ PBL_LOG_MODULE_DEFINE(service_music, CONFIG_SERVICE_MUSIC_LOG_LEVEL); //! @note Only one underlying backend is supported at a time. If a second backend tries to "connect" //! it is ignored. -#define MUSIC_NORMAL_PLAYBACK_RATE_PERCENT ((int32_t) 100) +#define MUSIC_NORMAL_PLAYBACK_RATE_PERCENT ((int32_t)100) //! Cache of the most recently received now playing data. Note that this is read and written from //! multiple threads, so access is protected by the mutex member. @@ -133,10 +133,7 @@ static void prv_free_album_art_locked(void) { } static void prv_put_now_playing_changed_event(void) { - PebbleEvent e = { - .type = PEBBLE_MEDIA_EVENT, - .media.type = PebbleMediaEventTypeNowPlayingChanged - }; + PebbleEvent e = {.type = PEBBLE_MEDIA_EVENT, .media.type = PebbleMediaEventTypeNowPlayingChanged}; event_put(&e); } @@ -156,7 +153,7 @@ bool music_set_connected_server(const MusicServerImplementation *implementation, PBL_LOG_INFO("Music server connected: %s", implementation->debug_name); } else { PBL_LOG_ERR("Server <0x%p> connected, but another <0x%p> is already registered", - implementation, s_music_ctx.implementation); + implementation, s_music_ctx.implementation); } } else { @@ -183,18 +180,18 @@ bool music_set_connected_server(const MusicServerImplementation *implementation, music_update_now_playing(NULL, 0, NULL, 0, NULL, 0); music_update_track_duration(0); const MusicPlayerStateUpdate state = { - .playback_state = MusicPlayStateUnknown, - .playback_rate_percent = 0, - .elapsed_time_ms = 0, + .playback_state = MusicPlayStateUnknown, + .playback_rate_percent = 0, + .elapsed_time_ms = 0, }; music_update_player_playback_state(&state); PebbleEvent event = { - .type = PEBBLE_MEDIA_EVENT, - .media = { - .type = (change_type == Connected) ? PebbleMediaEventTypeServerConnected : - PebbleMediaEventTypeServerDisconnected, - }, + .type = PEBBLE_MEDIA_EVENT, + .media = { + .type = (change_type == Connected) ? PebbleMediaEventTypeServerConnected + : PebbleMediaEventTypeServerDisconnected, + }, }; event_put(&event); } @@ -204,7 +201,7 @@ bool music_set_connected_server(const MusicServerImplementation *implementation, return (change_type != None); } -const char * music_get_connected_server_debug_name(void) { +const char *music_get_connected_server_debug_name(void) { const char *debug_name = NULL; pbl_mutex_lock(&s_music_ctx.mutex, PBL_FOREVER); if (s_music_ctx.implementation) { @@ -214,9 +211,8 @@ const char * music_get_connected_server_debug_name(void) { return debug_name; } -void music_update_now_playing(const char *title, size_t title_length, - const char *artist, size_t artist_length, - const char *album, size_t album_length) { +void music_update_now_playing(const char *title, size_t title_length, const char *artist, + size_t artist_length, const char *album, size_t album_length) { pbl_mutex_lock(&s_music_ctx.mutex, PBL_FOREVER); // A change to the title, artist or album means we're on a different track, so any album art we're @@ -246,7 +242,7 @@ void music_update_now_playing(const char *title, size_t title_length, static void prv_update_string_and_put_event(const char *value, size_t value_length, off_t offset) { pbl_mutex_lock(&s_music_ctx.mutex, PBL_FOREVER); - char *buffer = ((char *) &s_music_ctx) + offset; + char *buffer = ((char *)&s_music_ctx) + offset; copy_and_truncate(buffer, value, value_length); pbl_mutex_unlock(&s_music_ctx.mutex); prv_put_now_playing_changed_event(); @@ -275,8 +271,8 @@ void music_update_track_album(const char *album, size_t album_length) { static void prv_put_pos_changed_event(void) { PebbleEvent e = { - .type = PEBBLE_MEDIA_EVENT, - .media.type = PebbleMediaEventTypeTrackPosChanged, + .type = PEBBLE_MEDIA_EVENT, + .media.type = PebbleMediaEventTypeTrackPosChanged, }; event_put(&e); } @@ -335,8 +331,7 @@ bool music_get_player_name(char *player_name_out) { bool music_has_now_playing(void) { bool has_now_playing = false; pbl_mutex_lock(&s_music_ctx.mutex, PBL_FOREVER); - if (s_music_ctx.title[0] != 0 || - s_music_ctx.artist[0] != 0) { + if (s_music_ctx.title[0] != 0 || s_music_ctx.artist[0] != 0) { has_now_playing = true; } pbl_mutex_unlock(&s_music_ctx.mutex); @@ -382,11 +377,11 @@ uint8_t music_get_volume_percent(void) { static void prv_put_state_changed_event(MusicPlayState playback_state) { PebbleEvent event = { - .type = PEBBLE_MEDIA_EVENT, - .media = { - .type = PebbleMediaEventTypePlaybackStateChanged, - .playback_state = playback_state, - }, + .type = PEBBLE_MEDIA_EVENT, + .media = { + .type = PebbleMediaEventTypePlaybackStateChanged, + .playback_state = playback_state, + }, }; event_put(&event); } @@ -410,11 +405,11 @@ void music_update_player_volume_percent(uint8_t volume_percent) { pbl_mutex_unlock(&s_music_ctx.mutex); PebbleEvent event = { - .type = PEBBLE_MEDIA_EVENT, - .media = { - .type = PebbleMediaEventTypeVolumeChanged, - .volume_percent = volume_percent, - }, + .type = PEBBLE_MEDIA_EVENT, + .media = { + .type = PebbleMediaEventTypeVolumeChanged, + .volume_percent = volume_percent, + }, }; event_put(&event); } @@ -430,12 +425,12 @@ MusicPlayState music_get_playback_state(void) { return result; } -static void * prv_implementation_function_for_offset(off_t offset) { +static void *prv_implementation_function_for_offset(off_t offset) { typedef void (*FuncPtr)(void); FuncPtr func_ptr = NULL; pbl_mutex_lock(&s_music_ctx.mutex, PBL_FOREVER); if (s_music_ctx.implementation) { - func_ptr = *(FuncPtr *) (((const uint8_t *)s_music_ctx.implementation) + offset); + func_ptr = *(FuncPtr *)(((const uint8_t *)s_music_ctx.implementation) + offset); } pbl_mutex_unlock(&s_music_ctx.mutex); return func_ptr; @@ -473,8 +468,7 @@ bool music_skip_seeks_within_track(void) { } bool music_is_command_supported(MusicCommand command) { - const off_t o = offsetof(__typeof__(*s_music_ctx.implementation), - is_command_supported); + const off_t o = offsetof(__typeof__(*s_music_ctx.implementation), is_command_supported); bool (*func_ptr)(MusicCommand) = prv_implementation_function_for_offset(o); if (!func_ptr) { return false; @@ -491,8 +485,8 @@ static bool prv_call_implementation_bool_return_void_args(off_t offset) { } bool music_needs_user_to_start_playback_on_phone(void) { - const off_t o = offsetof(__typeof__(*s_music_ctx.implementation), - needs_user_to_start_playback_on_phone); + const off_t o = + offsetof(__typeof__(*s_music_ctx.implementation), needs_user_to_start_playback_on_phone); return prv_call_implementation_bool_return_void_args(o); } @@ -531,8 +525,8 @@ uint8_t music_get_now_playing_generation(void) { static void prv_put_album_art_updated_event(void) { PebbleEvent e = { - .type = PEBBLE_MEDIA_EVENT, - .media.type = PebbleMediaEventTypeAlbumArtUpdated, + .type = PEBBLE_MEDIA_EVENT, + .media.type = PebbleMediaEventTypeAlbumArtUpdated, }; event_put(&e); } @@ -590,4 +584,3 @@ void command_print_now_playing(void) { char buffer[128]; dbgserial_putstr_fmt(buffer, 128, "title=%s; artist=%s; album=%s", title, artist, album); } - diff --git a/src/fw/services/new_timer/new_timer.c b/src/fw/services/new_timer/new_timer.c index 91dcd1555b..ae14e1bd5f 100644 --- a/src/fw/services/new_timer/new_timer.c +++ b/src/fw/services/new_timer/new_timer.c @@ -47,7 +47,7 @@ TimerID new_timer_create(void) { } // -------------------------------------------------------------------------------- -// Schedule a timer to run. +// Schedule a timer to run. bool new_timer_start(TimerID timer_id, uint32_t timeout_ms, NewTimerCallback cb, void *cb_data, uint32_t flags) { return task_timer_start(&s_task_timer_manager, timer_id, timeout_ms, cb, cb_data, flags); @@ -93,7 +93,7 @@ static void new_timer_service_loop(void *data) { // ----------------------------------------------------------------------------------------------- // Used by the watchdog timer logic -void* new_timer_debug_get_current_callback(void) { +void *new_timer_debug_get_current_callback(void) { void *timer_cb = task_timer_manager_get_current_cb(&s_task_timer_manager); if (timer_cb) { return timer_cb; @@ -109,12 +109,12 @@ void new_timer_service_init(void) { task_timer_manager_init(&s_task_timer_manager, &s_wake_srv_loop); struct pbl_thread_attr attr = { - .name = "NewTimer", - .entry = new_timer_service_loop, - .prio = PBL_PRIO_MAX, - .privileged = true, - .stack = s_new_timer_stack, - .stack_size = sizeof(s_new_timer_stack), + .name = "NewTimer", + .entry = new_timer_service_loop, + .prio = PBL_PRIO_MAX, + .privileged = true, + .stack = s_new_timer_stack, + .stack_size = sizeof(s_new_timer_stack), }; pebble_task_create(PebbleTask_NewTimers, &attr); @@ -123,7 +123,7 @@ void new_timer_service_init(void) { // ----------------------------------------------------------------------------------------------------- // Used by the console command to list timers bool new_timer_add_work_callback_from_isr(NewTimerWorkCallback cb, void *data) { - NewTimerWorkItem work = { cb, data }; + NewTimerWorkItem work = {cb, data}; pbl_msgq_put(&s_work_queue, &work, PBL_NO_WAIT); // Wake up the thread to process the work item we just added. @@ -135,7 +135,7 @@ bool new_timer_add_work_callback_from_isr(NewTimerWorkCallback cb, void *data) { bool new_timer_add_work_callback(NewTimerWorkCallback cb, void *data) { pbl_tick_t TICKS_TO_WAIT = 50; - NewTimerWorkItem work = { cb, data }; + NewTimerWorkItem work = {cb, data}; if (pbl_msgq_put(&s_work_queue, &work, PBL_TICKS(TICKS_TO_WAIT)) == 0) { // Wake up the thread to process the work item we just added. pbl_sem_give(&s_wake_srv_loop); diff --git a/src/fw/services/notifications/action_chaining_window.c b/src/fw/services/notifications/action_chaining_window.c index d814f9d3c7..6c06716dfc 100644 --- a/src/fw/services/notifications/action_chaining_window.c +++ b/src/fw/services/notifications/action_chaining_window.c @@ -20,20 +20,17 @@ typedef struct { } ChainingWindowData; #if PBL_ROUND -static int16_t prv_get_header_height(struct MenuLayer *menu_layer, - uint16_t section_index, +static int16_t prv_get_header_height(struct MenuLayer *menu_layer, uint16_t section_index, void *callback_context) { return MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT; } -static void prv_draw_header(GContext *ctx, - const Layer *cell_layer, - uint16_t section_index, +static void prv_draw_header(GContext *ctx, const Layer *cell_layer, uint16_t section_index, void *callback_context) { ChainingWindowData *data = callback_context; const GFont font = fonts_get_system_font(FONT_KEY_GOTHIC_18); - menu_cell_basic_draw_custom(ctx, cell_layer, font, data->title, font, NULL, font, - NULL, NULL, false, GTextOverflowModeWordWrap); + menu_cell_basic_draw_custom(ctx, cell_layer, font, data->title, font, NULL, font, NULL, NULL, + false, GTextOverflowModeWordWrap); } #endif @@ -43,21 +40,20 @@ static uint16_t prv_get_num_rows(MenuLayer *menu_layer, uint16_t section_index, return data->action_group->num_actions; } -static int16_t prv_get_cell_height(struct MenuLayer *menu_layer, - MenuIndex *cell_index, +static int16_t prv_get_cell_height(struct MenuLayer *menu_layer, MenuIndex *cell_index, void *callback_context) { #if PBL_ROUND MenuIndex selected_index = menu_layer_get_selected_index(menu_layer); bool is_selected = menu_index_compare(cell_index, &selected_index) == 0; - return is_selected ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT : - MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT; + return is_selected ? MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT + : MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT; #else return menu_cell_basic_cell_height(); #endif } -static void prv_draw_row(GContext *ctx, const Layer *cell_layer, - MenuIndex *cell_index, void *callback_context) { +static void prv_draw_row(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, + void *callback_context) { ChainingWindowData *data = callback_context; AttributeList *attrs = &data->action_group->actions[cell_index->row].attr_list; @@ -96,26 +92,27 @@ static void prv_chaining_window_unload(Window *window) { static void prv_chaining_window_load(Window *window) { ChainingWindowData *data = window_get_user_data(window); - const GRect bounds = grect_inset(data->window.layer.bounds, (GEdgeInsets) { - .top = STATUS_BAR_LAYER_HEIGHT, + const GRect bounds = grect_inset(data->window.layer.bounds, (GEdgeInsets){ + .top = STATUS_BAR_LAYER_HEIGHT, #if PBL_ROUND - .bottom = STATUS_BAR_LAYER_HEIGHT + .bottom = STATUS_BAR_LAYER_HEIGHT #endif - }); + }); menu_layer_init(&data->menu_layer, &bounds); - menu_layer_set_callbacks(&data->menu_layer, data, &(MenuLayerCallbacks) { + menu_layer_set_callbacks(&data->menu_layer, data, + &(MenuLayerCallbacks){ #if PBL_ROUND - .get_header_height = prv_get_header_height, - .draw_header = prv_draw_header, + .get_header_height = prv_get_header_height, + .draw_header = prv_draw_header, #endif - .get_num_rows = prv_get_num_rows, - .get_cell_height = prv_get_cell_height, - .draw_row = prv_draw_row, - .select_click = prv_select_callback, - }); - - menu_layer_set_highlight_colors( - &data->menu_layer, PBL_IF_COLOR_ELSE(GColorIslamicGreen, GColorBlack), GColorWhite); + .get_num_rows = prv_get_num_rows, + .get_cell_height = prv_get_cell_height, + .draw_row = prv_draw_row, + .select_click = prv_select_callback, + }); + + menu_layer_set_highlight_colors(&data->menu_layer, + PBL_IF_COLOR_ELSE(GColorIslamicGreen, GColorBlack), GColorWhite); menu_layer_set_click_config_onto_window(&data->menu_layer, &data->window); layer_add_child(&data->window.layer, menu_layer_get_layer(&data->menu_layer)); @@ -123,38 +120,35 @@ static void prv_chaining_window_load(Window *window) { status_bar_layer_init(&data->status_layer); status_bar_layer_set_colors(&data->status_layer, PBL_IF_COLOR_ELSE(GColorWhite, GColorBlack), PBL_IF_COLOR_ELSE(GColorBlack, GColorWhite)); - status_bar_layer_set_title(&data->status_layer, data->title, - false /* revert */, false /* animated */); + status_bar_layer_set_title(&data->status_layer, data->title, false /* revert */, + false /* animated */); status_bar_layer_set_separator_mode(&data->status_layer, StatusBarLayerSeparatorModeDotted); layer_add_child(&data->window.layer, status_bar_layer_get_layer(&data->status_layer)); #endif } - void action_chaining_window_push(WindowStack *window_stack, const char *title, TimelineItemActionGroup *action_group, - ActionChainingMenuSelectCb select_cb, - void *select_cb_context, - ActionChainingMenuClosedCb closed_cb, - void *closed_cb_context) { + ActionChainingMenuSelectCb select_cb, void *select_cb_context, + ActionChainingMenuClosedCb closed_cb, void *closed_cb_context) { ChainingWindowData *data = kernel_zalloc_check(sizeof(ChainingWindowData)); - *data = (ChainingWindowData) { - .title = title, - .action_group = action_group, - .select_cb = select_cb, - .select_cb_context = select_cb_context, - .closed_cb = closed_cb, - .closed_cb_context = closed_cb_context, + *data = (ChainingWindowData){ + .title = title, + .action_group = action_group, + .select_cb = select_cb, + .select_cb_context = select_cb_context, + .closed_cb = closed_cb, + .closed_cb_context = closed_cb_context, }; Window *window = &data->window; window_init(window, WINDOW_NAME("Action Chaining")); window_set_user_data(window, data); - window_set_window_handlers(window, &(WindowHandlers) { - .load = prv_chaining_window_load, - .unload = prv_chaining_window_unload, - }); + window_set_window_handlers(window, &(WindowHandlers){ + .load = prv_chaining_window_load, + .unload = prv_chaining_window_unload, + }); window_stack_push(window_stack, window, true); } diff --git a/src/fw/services/notifications/alerts.c b/src/fw/services/notifications/alerts.c index 3d3d12ce96..4a3760374c 100644 --- a/src/fw/services/notifications/alerts.c +++ b/src/fw/services/notifications/alerts.c @@ -22,7 +22,7 @@ static RtcTicks s_notification_vibe_tick_timestamp = 0; static int64_t prv_get_ms_since_last_notification_vibe(void) { RtcTicks current_ticks = rtc_get_ticks(); int64_t millis_since_last_vibe = - (current_ticks - s_notification_vibe_tick_timestamp) * 1000 / RTC_TICKS_HZ; // x1000 for ms + (current_ticks - s_notification_vibe_tick_timestamp) * 1000 / RTC_TICKS_HZ; // x1000 for ms return millis_since_last_vibe; } diff --git a/src/fw/services/notifications/alerts_preferences.c b/src/fw/services/notifications/alerts_preferences.c index a712263035..6dcedc3034 100644 --- a/src/fw/services/notifications/alerts_preferences.c +++ b/src/fw/services/notifications/alerts_preferences.c @@ -83,16 +83,20 @@ static uint32_t s_first_use_complete = 0; static uint32_t s_notif_window_timeout_ms = NOTIF_WINDOW_TIMEOUT_DEFAULT; #define PREF_KEY_NOTIF_DESIGN_STYLE "notifDesignStyle" -static bool s_notification_alternative_design = false; // true = alternative (black banner), false = standard (default) +static bool s_notification_alternative_design = + false; // true = alternative (black banner), false = standard (default) #define PREF_KEY_NOTIF_VIBE_DELAY "notifVibeDelay" -static bool s_notification_vibe_delay = true; // true = vibe at end of animation (default), false = vibe immediately +static bool s_notification_vibe_delay = + true; // true = vibe at end of animation (default), false = vibe immediately #define PREF_KEY_NOTIF_BACKLIGHT "notifBacklight" -static bool s_notification_backlight = true; // true = enable backlight (default), false = disable backlight +static bool s_notification_backlight = + true; // true = enable backlight (default), false = disable backlight #define PREF_KEY_NOTIF_STATUS_BAR_STYLE "notifStatusBarStyle" -static NotificationStatusBarStyle s_notification_status_bar_style = NotificationStatusBarStyle_Default; +static NotificationStatusBarStyle s_notification_status_bar_style = + NotificationStatusBarStyle_Default; /////////////////////////////////// //! Legacy preference keys @@ -100,8 +104,8 @@ static NotificationStatusBarStyle s_notification_status_bar_style = Notification #define PREF_KEY_LEGACY_DND_SCHEDULE "dndSchedule" static DoNotDisturbSchedule s_legacy_dnd_schedule = { - .from_hour = 0, - .to_hour = 6, + .from_hour = 0, + .to_hour = 6, }; #define PREF_KEY_LEGACY_DND_SCHEDULE_ENABLED "dndEnabled" @@ -127,23 +131,24 @@ typedef struct DoNotDisturbScheduleConfigKeys { static DoNotDisturbScheduleConfig s_dnd_schedule[NumDNDSchedules]; static const DoNotDisturbScheduleConfigKeys s_dnd_schedule_keys[NumDNDSchedules] = { - [WeekdaySchedule] = { - .schedule_pref_key = "dndWeekdaySchedule", - .enabled_pref_key = "dndWeekdayScheduleEnabled", - }, - [WeekendSchedule] = { - .schedule_pref_key = "dndWeekendSchedule", - .enabled_pref_key = "dndWeekendScheduleEnabled", - } + [WeekdaySchedule] = + { + .schedule_pref_key = "dndWeekdaySchedule", + .enabled_pref_key = "dndWeekdayScheduleEnabled", + }, + [WeekendSchedule] = { + .schedule_pref_key = "dndWeekendSchedule", + .enabled_pref_key = "dndWeekendScheduleEnabled", + } }; static void prv_migrate_legacy_dnd_schedule(SettingsFile *file) { // If Weekday schedule does not exist, assume that the other 3 settings files are missing as well // Set the new schedules to the legacy schedule and delete the legacy schedule if (!settings_file_exists(file, s_dnd_schedule_keys[WeekdaySchedule].schedule_pref_key, - strlen(s_dnd_schedule_keys[WeekdaySchedule].schedule_pref_key))) { + strlen(s_dnd_schedule_keys[WeekdaySchedule].schedule_pref_key))) { #define SET_PREF_ALREADY_OPEN(key, value) \ - settings_file_set(file, key, strlen(key), value, sizeof(value)); + settings_file_set(file, key, strlen(key), value, sizeof(value)); s_dnd_schedule[WeekdaySchedule].schedule = s_legacy_dnd_schedule; SET_PREF_ALREADY_OPEN(s_dnd_schedule_keys[WeekdaySchedule].schedule_pref_key, @@ -159,12 +164,12 @@ static void prv_migrate_legacy_dnd_schedule(SettingsFile *file) { &s_dnd_schedule[WeekendSchedule].enabled); #undef SET_PREF_ALREADY_OPEN -#define DELETE_PREF(key) \ - do { \ - if (settings_file_exists(file, key, strlen(key))) { \ - settings_file_delete(file, key, strlen(key)); \ - } \ - } while (0) +#define DELETE_PREF(key) \ + do { \ + if (settings_file_exists(file, key, strlen(key))) { \ + settings_file_delete(file, key, strlen(key)); \ + } \ + } while (0) DELETE_PREF(PREF_KEY_LEGACY_DND_SCHEDULE); DELETE_PREF(PREF_KEY_LEGACY_DND_SCHEDULE_ENABLED); @@ -178,11 +183,11 @@ static void prv_migrate_legacy_first_use_settings(SettingsFile *file) { bool smart_dnd_first_use_complete; // Migrate the old first use dialog prefs -#define RESTORE_AND_DELETE_PREF(key, var) \ - do { \ +#define RESTORE_AND_DELETE_PREF(key, var) \ + do { \ if (settings_file_get(file, key, strlen(key), &var, sizeof(var)) == S_SUCCESS) { \ - settings_file_delete(file, key, strlen(key)); \ - } \ + settings_file_delete(file, key, strlen(key)); \ + } \ } while (0) RESTORE_AND_DELETE_PREF(PREF_KEY_LEGACY_DND_MANUAL_FIRST_USE, manual_dnd_first_use_complete); @@ -199,17 +204,15 @@ static void prv_migrate_legacy_first_use_settings(SettingsFile *file) { // which would otherwise make the watch win every sync conflict against the // phone and leave settings_blob_db's INSERT_WITH_TIMESTAMP path permanently // rejecting the user's chosen value. -static void prv_save_changed_vibe_scores_to_file(SettingsFile *file, - VibeScoreId orig_notifications, +static void prv_save_changed_vibe_scores_to_file(SettingsFile *file, VibeScoreId orig_notifications, VibeScoreId orig_incoming_calls, - VibeScoreId orig_alarms, - VibeScoreId orig_hourly, + VibeScoreId orig_alarms, VibeScoreId orig_hourly, VibeScoreId orig_on_disconnect) { -#define SET_PREF_IF_CHANGED(key, value, orig) \ - do { \ - if ((value) != (orig)) { \ +#define SET_PREF_IF_CHANGED(key, value, orig) \ + do { \ + if ((value) != (orig)) { \ settings_file_set(file, key, strlen(key), &(value), sizeof(value)); \ - } \ + } \ } while (0) SET_PREF_IF_CHANGED(PREF_KEY_VIBE_SCORE_NOTIFICATIONS, s_vibe_score_notifications, @@ -218,7 +221,7 @@ static void prv_save_changed_vibe_scores_to_file(SettingsFile *file, orig_incoming_calls); SET_PREF_IF_CHANGED(PREF_KEY_VIBE_SCORE_ALARMS, s_vibe_score_alarms, orig_alarms); SET_PREF_IF_CHANGED(PREF_KEY_VIBE_SCORE_HOURLY, s_vibe_score_hourly, orig_hourly); - SET_PREF_IF_CHANGED(PREF_KEY_VIBE_SCORE_ON_DISCONNECT, s_vibe_score_on_disconnect, + SET_PREF_IF_CHANGED(PREF_KEY_VIBE_SCORE_ON_DISCONNECT, s_vibe_score_on_disconnect, orig_on_disconnect); #undef SET_PREF_IF_CHANGED } @@ -229,16 +232,16 @@ static VibeScoreId prv_return_default_if_invalid(VibeScoreId id, VibeScoreId def // Uses the default vibe pattern id if the given score isn't valid static void prv_ensure_valid_vibe_scores(void) { - s_vibe_score_notifications = prv_return_default_if_invalid(s_vibe_score_notifications, - DEFAULT_VIBE_SCORE_NOTIFS); - s_vibe_score_incoming_calls = prv_return_default_if_invalid(s_vibe_score_incoming_calls, - DEFAULT_VIBE_SCORE_INCOMING_CALLS); - s_vibe_score_alarms = prv_return_default_if_invalid(s_vibe_score_alarms, - DEFAULT_VIBE_SCORE_ALARMS); - s_vibe_score_hourly = prv_return_default_if_invalid(s_vibe_score_hourly, - DEFAULT_VIBE_SCORE_HOURLY); - s_vibe_score_on_disconnect = prv_return_default_if_invalid(s_vibe_score_on_disconnect, - DEFAULT_VIBE_SCORE_ON_DISCONNECT); + s_vibe_score_notifications = + prv_return_default_if_invalid(s_vibe_score_notifications, DEFAULT_VIBE_SCORE_NOTIFS); + s_vibe_score_incoming_calls = + prv_return_default_if_invalid(s_vibe_score_incoming_calls, DEFAULT_VIBE_SCORE_INCOMING_CALLS); + s_vibe_score_alarms = + prv_return_default_if_invalid(s_vibe_score_alarms, DEFAULT_VIBE_SCORE_ALARMS); + s_vibe_score_hourly = + prv_return_default_if_invalid(s_vibe_score_hourly, DEFAULT_VIBE_SCORE_HOURLY); + s_vibe_score_on_disconnect = + prv_return_default_if_invalid(s_vibe_score_on_disconnect, DEFAULT_VIBE_SCORE_ON_DISCONNECT); } static void prv_set_vibe_scores_based_on_legacy_intensity(VibeIntensity intensity) { @@ -256,9 +259,8 @@ static void prv_set_vibe_scores_based_on_legacy_intensity(VibeIntensity intensit static void prv_migrate_vibe_intensity_to_vibe_scores(SettingsFile *file) { // We use the existence of the notifications vibe score pref as a shallow measurement of whether // or not the user has migrated to vibe scores - const bool user_has_migrated_to_vibe_scores = - settings_file_exists(file, PREF_KEY_VIBE_SCORE_NOTIFICATIONS, - strlen(PREF_KEY_VIBE_SCORE_NOTIFICATIONS)); + const bool user_has_migrated_to_vibe_scores = settings_file_exists( + file, PREF_KEY_VIBE_SCORE_NOTIFICATIONS, strlen(PREF_KEY_VIBE_SCORE_NOTIFICATIONS)); if (!user_has_migrated_to_vibe_scores) { // If the user previously set a vibration intensity, set the vibe scores based on that intensity @@ -286,7 +288,6 @@ static void prv_migrate_vibe_intensity_to_vibe_scores(SettingsFile *file) { } void alerts_preferences_init(void) { - SettingsFile file = {{0}}; if (settings_file_open(&file, FILE_NAME, FILE_LEN) != S_SUCCESS) { return; @@ -297,15 +298,13 @@ void alerts_preferences_init(void) { // canonicalised the key length). Settings file lookups match key_len exactly, // so probe both lengths to remain backwards compatible with records written // by older firmware. -#define RESTORE_PREF(key, var) \ - do { \ - __typeof__(var) _tmp; \ - if (settings_file_get( \ - &file, key, strlen(key), &_tmp, sizeof(_tmp)) == S_SUCCESS || \ - settings_file_get( \ - &file, key, strlen(key) + 1, &_tmp, sizeof(_tmp)) == S_SUCCESS) { \ - var = _tmp; \ - } \ +#define RESTORE_PREF(key, var) \ + do { \ + __typeof__(var) _tmp; \ + if (settings_file_get(&file, key, strlen(key), &_tmp, sizeof(_tmp)) == S_SUCCESS || \ + settings_file_get(&file, key, strlen(key) + 1, &_tmp, sizeof(_tmp)) == S_SUCCESS) { \ + var = _tmp; \ + } \ } while (0) RESTORE_PREF(PREF_KEY_MASK, s_mask); @@ -361,19 +360,15 @@ void alerts_preferences_init(void) { s_speaker_volume = 100; } prv_save_changed_vibe_scores_to_file(&file, orig_vibe_score_notifications, - orig_vibe_score_incoming_calls, - orig_vibe_score_alarms, - orig_vibe_score_hourly, - orig_vibe_score_on_disconnect); + orig_vibe_score_incoming_calls, orig_vibe_score_alarms, + orig_vibe_score_hourly, orig_vibe_score_on_disconnect); settings_file_close(&file); } // Convenience macro for setting a string key to a non-pointer value. -#define SET_PREF(key, value) \ - prv_set_pref(key, strlen(key), &value, sizeof(value)) -static void prv_set_pref(const void *key, size_t key_len, const void *value, - size_t value_len) { +#define SET_PREF(key, value) prv_set_pref(key, strlen(key), &value, sizeof(value)) +static void prv_set_pref(const void *key, size_t key_len, const void *value, size_t value_len) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); SettingsFile file = {{0}}; if (settings_file_open(&file, FILE_NAME, FILE_LEN) != S_SUCCESS) { @@ -687,18 +682,18 @@ void alerts_preferences_handle_blob_db_event(PebbleBlobDBEvent *event) { // key_len may or may not include the null terminator depending on BlobDB protocol // IMPORTANT: settings_file_get uses exact key_len matching, so we must use the same // key_len that was used when writing the record (i.e., key_len from the event) -#define RELOAD_IF_MATCH(pref_key, var) \ - do { \ - size_t _pref_strlen = strlen(pref_key); \ - if ((key_len == (int)_pref_strlen || key_len == (int)(_pref_strlen + 1)) && \ - memcmp(key, pref_key, _pref_strlen) == 0) { \ - __typeof__(var) _tmp; \ +#define RELOAD_IF_MATCH(pref_key, var) \ + do { \ + size_t _pref_strlen = strlen(pref_key); \ + if ((key_len == (int)_pref_strlen || key_len == (int)(_pref_strlen + 1)) && \ + memcmp(key, pref_key, _pref_strlen) == 0) { \ + __typeof__(var) _tmp; \ if (settings_file_get(&file, key, key_len, &_tmp, sizeof(_tmp)) == S_SUCCESS) { \ - var = _tmp; \ - matched_key = pref_key; \ - } \ - goto done; \ - } \ + var = _tmp; \ + matched_key = pref_key; \ + } \ + goto done; \ + } \ } while (0) RELOAD_IF_MATCH(PREF_KEY_MASK, s_mask); @@ -743,11 +738,11 @@ void alerts_preferences_handle_blob_db_event(PebbleBlobDBEvent *event) { do_not_disturb_handle_pref_synced(); } PebbleEvent pref_event = { - .type = PEBBLE_PREF_CHANGE_EVENT, - .pref_change = { - .key = matched_key, - .key_len = strlen(matched_key) + 1, - }, + .type = PEBBLE_PREF_CHANGE_EVENT, + .pref_change = { + .key = matched_key, + .key_len = strlen(matched_key) + 1, + }, }; event_put(&pref_event); } diff --git a/src/fw/services/notifications/ancs/ancs_filtering.c b/src/fw/services/notifications/ancs/ancs_filtering.c index b5e3ab085e..7522a2e7a4 100644 --- a/src/fw/services/notifications/ancs/ancs_filtering.c +++ b/src/fw/services/notifications/ancs/ancs_filtering.c @@ -103,8 +103,8 @@ static bool prv_match_rule(uint8_t match_type, uint8_t match_field, bool case_se // both attributes. return ((match_title && (prv_match_contains(title, title_len, pattern, pattern_len, case_sensitive) || - prv_match_contains(subtitle, subtitle_len, pattern, pattern_len, case_sensitive))) - || (match_body && prv_match_contains(body, body_len, pattern, pattern_len, case_sensitive))); + prv_match_contains(subtitle, subtitle_len, pattern, pattern_len, case_sensitive))) || + (match_body && prv_match_contains(body, body_len, pattern, pattern_len, case_sensitive))); } bool ancs_filtering_matches_rules(const iOSNotifPrefs *app_notif_prefs, @@ -115,8 +115,8 @@ bool ancs_filtering_matches_rules(const iOSNotifPrefs *app_notif_prefs, return false; } - StringList *rules = attribute_get_string_list(&app_notif_prefs->attr_list, - AttributeIdNotificationFilteringRules); + StringList *rules = + attribute_get_string_list(&app_notif_prefs->attr_list, AttributeIdNotificationFilteringRules); if (!rules || (rules->serialized_byte_length == 0)) { return false; } @@ -154,9 +154,9 @@ bool ancs_filtering_matches_rules(const iOSNotifPrefs *app_notif_prefs, } const size_t pattern_len = (size_t)(terminator - pattern); - matched = prv_match_rule(rule->match_type, rule->match_field, (rule->case_sensitive != 0), - pattern, pattern_len, title, title_len, subtitle, subtitle_len, - body, body_len); + matched = + prv_match_rule(rule->match_type, rule->match_field, (rule->case_sensitive != 0), pattern, + pattern_len, title, title_len, subtitle, subtitle_len, body, body_len); cursor = (const uint8_t *)(terminator + 1); remaining -= (pattern_len + 1); @@ -172,10 +172,8 @@ bool ancs_filtering_matches_rules(const iOSNotifPrefs *app_notif_prefs, return matched; } -void ancs_filtering_record_app(iOSNotifPrefs **notif_prefs, - const ANCSAttribute *app_id, - const ANCSAttribute *display_name, - const ANCSAttribute *title) { +void ancs_filtering_record_app(iOSNotifPrefs **notif_prefs, const ANCSAttribute *app_id, + const ANCSAttribute *display_name, const ANCSAttribute *title) { // When we receive a notification, information about the app that sent us the notification // is recorded in the notif_pref_db. We sync this DB with the phone which allows us to // do things like add non ANCS actions, or filter notifications by app @@ -185,8 +183,8 @@ void ancs_filtering_record_app(iOSNotifPrefs **notif_prefs, // stored. iOSNotifPrefs *app_notif_prefs = *notif_prefs; - const int num_existing_attributes = app_notif_prefs ? app_notif_prefs->attr_list.num_attributes : - 0; + const int num_existing_attributes = + app_notif_prefs ? app_notif_prefs->attr_list.num_attributes : 0; AttributeList new_attr_list; attribute_list_init_list(num_existing_attributes, &new_attr_list); @@ -239,7 +237,8 @@ void ancs_filtering_record_app(iOSNotifPrefs **notif_prefs, if (!attribute_find(&new_attr_list, AttributeIdMuteExpiration)) { uint32_t expiration_value = 0; if (app_notif_prefs) { - expiration_value = attribute_get_uint32(&app_notif_prefs->attr_list, AttributeIdMuteExpiration, 0); + expiration_value = + attribute_get_uint32(&app_notif_prefs->attr_list, AttributeIdMuteExpiration, 0); } attribute_list_add_uint32(&new_attr_list, AttributeIdMuteExpiration, expiration_value); list_dirty = true; @@ -254,7 +253,7 @@ void ancs_filtering_record_app(iOSNotifPrefs **notif_prefs, if (!rules_attr) { default_rules = kernel_zalloc_check(sizeof(StringList) + sizeof(uint8_t)); default_rules->serialized_byte_length = sizeof(uint8_t); - default_rules->data[0] = 0; // zero filtering rules by default + default_rules->data[0] = 0; // zero filtering rules by default attribute_list_add_string_list(&new_attr_list, AttributeIdNotificationFilteringRules, default_rules); list_dirty = true; @@ -267,8 +266,7 @@ void ancs_filtering_record_app(iOSNotifPrefs **notif_prefs, } uint32_t now = rtc_get_time(); // Only perform an update if there is no timestamp or the current timestamp is more than a day old - if (!last_updated || - (last_updated && now > (last_updated->uint32 + SECONDS_PER_DAY))) { + if (!last_updated || (last_updated && now > (last_updated->uint32 + SECONDS_PER_DAY))) { attribute_list_add_uint32(&new_attr_list, AttributeIdLastUpdated, now); list_dirty = true; PBL_LOG_INFO("Updating / adding timestamp to app prefs"); @@ -281,20 +279,18 @@ void ancs_filtering_record_app(iOSNotifPrefs **notif_prefs, new_action_group = &app_notif_prefs->action_group; } - ios_notif_pref_db_store_prefs(app_id->value, app_id->length, - &new_attr_list, new_action_group); + ios_notif_pref_db_store_prefs(app_id->value, app_id->length, &new_attr_list, new_action_group); // Update our copy of the prefs with the new data const size_t buf_size = attributes_actions_get_buffer_size(&new_attr_list, new_action_group); *notif_prefs = kernel_zalloc_check(sizeof(iOSNotifPrefs) + buf_size); - uint8_t *buffer = (uint8_t*)*notif_prefs + sizeof(iOSNotifPrefs); + uint8_t *buffer = (uint8_t *)*notif_prefs + sizeof(iOSNotifPrefs); attributes_actions_deep_copy(&new_attr_list, &(*notif_prefs)->attr_list, new_action_group, &(*notif_prefs)->action_group, buffer, buffer + buf_size); ios_notif_pref_db_free_prefs(app_notif_prefs); } - kernel_free(app_name_buff); kernel_free(default_rules); attribute_list_destroy_list(&new_attr_list); @@ -302,8 +298,7 @@ void ancs_filtering_record_app(iOSNotifPrefs **notif_prefs, uint8_t ancs_filtering_get_mute_type(const iOSNotifPrefs *app_notif_prefs) { if (app_notif_prefs) { - return attribute_get_uint8(&app_notif_prefs->attr_list, - AttributeIdMuteDayOfWeek, + return attribute_get_uint8(&app_notif_prefs->attr_list, AttributeIdMuteDayOfWeek, MuteBitfield_None); } @@ -312,8 +307,7 @@ uint8_t ancs_filtering_get_mute_type(const iOSNotifPrefs *app_notif_prefs) { uint32_t ancs_filtering_get_mute_expiration(const iOSNotifPrefs *app_notif_prefs) { if (app_notif_prefs) { - return attribute_get_uint32(&app_notif_prefs->attr_list, - AttributeIdMuteExpiration, 0); + return attribute_get_uint32(&app_notif_prefs->attr_list, AttributeIdMuteExpiration, 0); } return 0; diff --git a/src/fw/services/notifications/ancs/ancs_item.c b/src/fw/services/notifications/ancs/ancs_item.c index 450d7a3100..54b18495bc 100644 --- a/src/fw/services/notifications/ancs/ancs_item.c +++ b/src/fw/services/notifications/ancs/ancs_item.c @@ -61,7 +61,7 @@ static size_t prv_max_ellipsified_cstring_size(const ANCSAttribute *attr) { if ((attr == NULL) || (attr->length == 0)) { return 0; } - return (size_t) attr->length + strlen(s_utf8_ellipsis) + 1 /* zero terminator */; + return (size_t)attr->length + strlen(s_utf8_ellipsis) + 1 /* zero terminator */; } static uint8_t *prv_add_pstring_to_attribute(uint8_t *buffer, const ANCSAttribute *ancs_attr, @@ -72,10 +72,10 @@ static uint8_t *prv_add_pstring_to_attribute(uint8_t *buffer, const ANCSAttribut (ancs_attr->length == max_length)); } -static uint8_t *prv_add_action_msg_to_attribute( - uint8_t *buffer, const ANCSAttribute *sender, int sender_max_length, - const ANCSAttribute *caption, int caption_max_length, const char *action_msg, - Attribute *attribute, AttributeId attribute_id) { +static uint8_t *prv_add_action_msg_to_attribute(uint8_t *buffer, const ANCSAttribute *sender, + int sender_max_length, const ANCSAttribute *caption, + int caption_max_length, const char *action_msg, + Attribute *attribute, AttributeId attribute_id) { // Sets an attribute to ' ' ( '\n' '"' '"' ) // For example, sender="Huy Tran", action_msg="sent an attachment", caption="Check this out!" // The attribute becomes 'Huy Tran sent an attachment\n"Check this out!"' @@ -89,17 +89,15 @@ static uint8_t *prv_add_action_msg_to_attribute( stripped_caption = string_strip_leading_whitespace(caption_buf); } - const size_t max_msg_length = - sender->length + (stripped_caption ? strlen(stripped_caption) : 0) + - MULTIMEDIA_INDICATOR_LENGTH + strlen(s_utf8_ellipsis) + 1; + const size_t max_msg_length = sender->length + (stripped_caption ? strlen(stripped_caption) : 0) + + MULTIMEDIA_INDICATOR_LENGTH + strlen(s_utf8_ellipsis) + 1; // Sender and action message - int pos = snprintf((char *)buffer, max_msg_length, "%.*s %s", - sender->length, (char *)sender->value, action_msg); + int pos = snprintf((char *)buffer, max_msg_length, "%.*s %s", sender->length, + (char *)sender->value, action_msg); if (pos < (int)max_msg_length && stripped_caption && !IS_EMPTY_STRING(stripped_caption)) { // Quoted caption - pos += snprintf((char *)buffer + pos, max_msg_length - pos, "\n\"%s\"", - stripped_caption); + pos += snprintf((char *)buffer + pos, max_msg_length - pos, "\n\"%s\"", stripped_caption); if (caption->length == caption_max_length) { // Overwrite the last quote with ellipsis const size_t quote_len = 1; @@ -111,8 +109,7 @@ static uint8_t *prv_add_action_msg_to_attribute( static int prv_set_multimedia_action_msg(char *buffer, size_t length) { const char *emoji_str = PBL_IF_RECT_ELSE(" " MULTIMEDIA_EMOJI, "\n" MULTIMEDIA_EMOJI); - return snprintf(buffer, length, "%s%s", i18n_get("sent an attachment", __FILE__), - emoji_str); + return snprintf(buffer, length, "%s%s", i18n_get("sent an attachment", __FILE__), emoji_str); } //! @param buffer Pointer to a buffer large enough to hold all attribute strings required by @@ -123,20 +120,17 @@ static int prv_set_multimedia_action_msg(char *buffer, size_t length) { //! @param app_id The ANCS app id attribute of the notification //! @param properties The ANCS properties of the notification //! @return Pointer to the end of the buffer (*buffer + size of strings) -static uint8_t *prv_fill_native_ancs_action(uint8_t **buffer, - TimelineItemAction *action, - ActionId ancs_action_id, - const ANCSAttribute *title, - const ANCSAttribute *app_id, - ANCSProperty properties) { +static uint8_t *prv_fill_native_ancs_action(uint8_t **buffer, TimelineItemAction *action, + ActionId ancs_action_id, const ANCSAttribute *title, + const ANCSAttribute *app_id, ANCSProperty properties) { const bool is_phone_app = ancs_notifications_util_is_phone(app_id); const bool is_voice_mail = (is_phone_app && (properties & ANCSProperty_VoiceMail)); if (ancs_action_id == ActionIDNegative) { - action->type = is_voice_mail ? TimelineItemActionTypeAncsDelete : - TimelineItemActionTypeAncsNegative; + action->type = + is_voice_mail ? TimelineItemActionTypeAncsDelete : TimelineItemActionTypeAncsNegative; } else { - action->type = is_phone_app ? TimelineItemActionTypeAncsDial : - TimelineItemActionTypeAncsPositive; + action->type = + is_phone_app ? TimelineItemActionTypeAncsDial : TimelineItemActionTypeAncsPositive; } action->attr_list.attributes[0].id = AttributeIdAncsAction; @@ -155,7 +149,7 @@ static uint8_t *prv_fill_native_ancs_action(uint8_t **buffer, // TODO: PBL-23915 // We leak this i18n'd string because not leaking it is really hard. // We make sure we only ever allocate it once though, so it's not the end of the world. - action->attr_list.attributes[1].cstring = (char*)i18n_get("Dismiss", __FILE__); + action->attr_list.attributes[1].cstring = (char *)i18n_get("Dismiss", __FILE__); } // We want to rename the "Dial" action to "Call Back" @@ -163,14 +157,13 @@ static uint8_t *prv_fill_native_ancs_action(uint8_t **buffer, // TODO: PBL-23915 // We leak this i18n'd string because not leaking it is really hard. // We make sure we only ever allocate it once though, so it's not the end of the world. - action->attr_list.attributes[1].cstring = (char*)i18n_get("Call Back", __FILE__); + action->attr_list.attributes[1].cstring = (char *)i18n_get("Call Back", __FILE__); } return rv; } -static uint8_t *prv_fill_pebble_ancs_action(uint8_t **buffer, - uint8_t *buf_end, +static uint8_t *prv_fill_pebble_ancs_action(uint8_t **buffer, uint8_t *buf_end, TimelineItemAction *action, TimelineItemAction *pbl_action) { action->type = pbl_action->type; @@ -185,23 +178,18 @@ static uint8_t *prv_fill_pebble_ancs_action(uint8_t **buffer, return *buffer; } -static void prv_populate_attributes(TimelineItem *item, - uint8_t **buffer, - const ANCSAttribute *title, - const ANCSAttribute *display_name, - const ANCSAttribute *subtitle, - const ANCSAttribute *message, +static void prv_populate_attributes(TimelineItem *item, uint8_t **buffer, + const ANCSAttribute *title, const ANCSAttribute *display_name, + const ANCSAttribute *subtitle, const ANCSAttribute *message, const ANCSAttribute *app_id, const ANCSAppMetadata *app_metadata, - const iOSNotifPrefs *notif_prefs, - bool has_multimedia) { + const iOSNotifPrefs *notif_prefs, bool has_multimedia) { int attr_idx = 0; if (prv_should_add_sender_attr(app_id, title)) { // Copy the title into the sender attribute so we don't lose it in the multimedia case - *buffer = prv_add_pstring_to_attribute(*buffer, title, TITLE_MAX_LENGTH, - &item->attr_list.attributes[attr_idx], - AttributeIdSender); + *buffer = prv_add_pstring_to_attribute( + *buffer, title, TITLE_MAX_LENGTH, &item->attr_list.attributes[attr_idx], AttributeIdSender); attr_idx++; } @@ -220,34 +208,31 @@ static void prv_populate_attributes(TimelineItem *item, if (title && title->length > 0) { *buffer = prv_add_pstring_to_attribute(*buffer, title, TITLE_MAX_LENGTH, - &item->attr_list.attributes[attr_idx], - AttributeIdTitle); + &item->attr_list.attributes[attr_idx], AttributeIdTitle); attr_idx++; } if (display_name && display_name->length > 0) { - *buffer = prv_add_pstring_to_attribute(*buffer, display_name, TITLE_MAX_LENGTH, - &item->attr_list.attributes[attr_idx], - AttributeIdAppName); + *buffer = + prv_add_pstring_to_attribute(*buffer, display_name, TITLE_MAX_LENGTH, + &item->attr_list.attributes[attr_idx], AttributeIdAppName); attr_idx++; } if (subtitle && subtitle->length > 0) { - *buffer = prv_add_pstring_to_attribute(*buffer, subtitle, SUBTITLE_MAX_LENGTH, - &item->attr_list.attributes[attr_idx], - AttributeIdSubtitle); + *buffer = + prv_add_pstring_to_attribute(*buffer, subtitle, SUBTITLE_MAX_LENGTH, + &item->attr_list.attributes[attr_idx], AttributeIdSubtitle); attr_idx++; } if (sender && sender->length > 0 && has_multimedia) { char action_msg[MULTIMEDIA_INDICATOR_LENGTH]; prv_set_multimedia_action_msg(action_msg, sizeof(action_msg)); - *buffer = prv_add_action_msg_to_attribute(*buffer, sender, TITLE_MAX_LENGTH, - message, MESSAGE_MAX_LENGTH, - action_msg, &item->attr_list.attributes[attr_idx], - AttributeIdBody); + *buffer = prv_add_action_msg_to_attribute( + *buffer, sender, TITLE_MAX_LENGTH, message, MESSAGE_MAX_LENGTH, action_msg, + &item->attr_list.attributes[attr_idx], AttributeIdBody); attr_idx++; } else if (message && message->length > 0) { *buffer = prv_add_pstring_to_attribute(*buffer, message, MESSAGE_MAX_LENGTH, - &item->attr_list.attributes[attr_idx], - AttributeIdBody); + &item->attr_list.attributes[attr_idx], AttributeIdBody); attr_idx++; } if (app_id && app_id->length > 0) { @@ -316,26 +301,23 @@ static bool prv_should_hide_reply_because_group_sms(const TimelineItemAction *ac return ancs_notifications_util_is_group_sms(app_id, subtitle); } -static void prv_populate_actions(TimelineItem *item, - uint8_t **buffer, - uint8_t *buf_end, +static void prv_populate_actions(TimelineItem *item, uint8_t **buffer, uint8_t *buf_end, const ANCSAttribute *positive_action, const ANCSAttribute *negative_action, - const ANCSAttribute *subtitle, - const ANCSAttribute *app_id, + const ANCSAttribute *subtitle, const ANCSAttribute *app_id, const TimelineItemActionGroup *pebble_actions, ANCSProperty properties) { TimelineItemAction *action = item->action_group.actions; // The order the actions get filled is important. See comment in ancs_item_create_and_populate if (positive_action) { - *buffer = prv_fill_native_ancs_action(buffer, action, ActionIDPositive, - positive_action, app_id, properties); + *buffer = prv_fill_native_ancs_action(buffer, action, ActionIDPositive, positive_action, app_id, + properties); action++; } if (negative_action) { - *buffer = prv_fill_native_ancs_action(buffer, action, ActionIDNegative, - negative_action, app_id, properties); + *buffer = prv_fill_native_ancs_action(buffer, action, ActionIDNegative, negative_action, app_id, + properties); action++; } if (pebble_actions) { @@ -354,14 +336,13 @@ static void prv_populate_actions(TimelineItem *item, TimelineItem *ancs_item_create_and_populate(ANCSAttribute *notif_attributes[], ANCSAttribute *app_attributes[], const ANCSAppMetadata *app_metadata, - iOSNotifPrefs *notif_prefs, - time_t timestamp, + iOSNotifPrefs *notif_prefs, time_t timestamp, ANCSProperty properties) { const ANCSAttribute *app_id = notif_attributes[FetchedNotifAttributeIndexAppID]; const ANCSAttribute *display_name = app_attributes[FetchedAppAttributeIndexDisplayName]; const ANCSAttribute *title = notif_attributes[FetchedNotifAttributeIndexTitle]; - const bool has_multimedia = (ancs_notifications_util_is_sms(app_id) && - (properties & ANCSProperty_MultiMedia)); + const bool has_multimedia = + (ancs_notifications_util_is_sms(app_id) && (properties & ANCSProperty_MultiMedia)); if (display_name) { // dedupe title & display name, they often are the same @@ -440,7 +421,7 @@ TimelineItem *ancs_item_create_and_populate(ANCSAttribute *notif_attributes[], int num_native_actions = (positive_action ? 1 : 0) + (negative_action ? 1 : 0); int num_actions = num_native_actions + num_pebble_actions; - const int max_num_actions = 8; // Arbitrarily chosen + const int max_num_actions = 8; // Arbitrarily chosen uint8_t attributes_per_action[max_num_actions]; int action_idx = 0; @@ -465,11 +446,9 @@ TimelineItem *ancs_item_create_and_populate(ANCSAttribute *notif_attributes[], int num_attr = ((title && title->length > 0 && !has_multimedia) ? 1 : 0) + ((display_name && display_name->length > 0) ? 1 : 0) + - ((subtitle->length > 0) ? 1 : 0) + - ((app_id->length > 0) ? 1 : 0) + + ((subtitle->length > 0) ? 1 : 0) + ((app_id->length > 0) ? 1 : 0) + ((message->length > 0 || has_multimedia) ? 1 : 0) + - (prv_should_add_sender_attr(app_id, title) ? 1 : 0) + - 1; // for icon + (prv_should_add_sender_attr(app_id, title) ? 1 : 0) + 1; // for icon #if PBL_COLOR bool has_bg_color = (app_metadata->app_color != 0); @@ -482,8 +461,10 @@ TimelineItem *ancs_item_create_and_populate(ANCSAttribute *notif_attributes[], has_primary_color = true; } } - if (has_bg_color) num_attr++; - if (has_primary_color) num_attr++; + if (has_bg_color) + num_attr++; + if (has_primary_color) + num_attr++; #else #endif @@ -507,23 +488,23 @@ TimelineItem *ancs_item_create_and_populate(ANCSAttribute *notif_attributes[], app_metadata, notif_prefs, has_multimedia); uint8_t *buf_end = buffer + required_space_for_strings; - prv_populate_actions(item, &buffer, buf_end, positive_action, negative_action, subtitle, - app_id, notif_prefs ? ¬if_prefs->action_group : NULL, properties); + prv_populate_actions(item, &buffer, buf_end, positive_action, negative_action, subtitle, app_id, + notif_prefs ? ¬if_prefs->action_group : NULL, properties); return item; } // Replace the dismiss action of a timeline item with the ancs negative action void ancs_item_update_dismiss_action(TimelineItem *item, uint32_t uid, - const ANCSAttribute *attr_action_neg) { + const ANCSAttribute *attr_action_neg) { TimelineItemAction *dismiss = timeline_item_find_dismiss_action(item); if (dismiss) { attribute_list_init_list(NUM_NATIVE_ANCS_ACTION_ATTRS + 1, &dismiss->attr_list); uint8_t *string_buffer = NULL; - prv_fill_native_ancs_action(&string_buffer, dismiss, ActionIDNegative, attr_action_neg, - NULL, ANCSProperty_None); + prv_fill_native_ancs_action(&string_buffer, dismiss, ActionIDNegative, attr_action_neg, NULL, + ANCSProperty_None); // Add ancs ID as attribute since reminder's parent needs to be the associated pin dismiss->attr_list.attributes[NUM_NATIVE_ANCS_ACTION_ATTRS].id = AttributeIdAncsId; diff --git a/src/fw/services/notifications/ancs/ancs_notifications.c b/src/fw/services/notifications/ancs/ancs_notifications.c index 47df9bdfd2..cc36352584 100644 --- a/src/fw/services/notifications/ancs/ancs_notifications.c +++ b/src/fw/services/notifications/ancs/ancs_notifications.c @@ -49,8 +49,8 @@ static void prv_handle_ancs_update(TimelineItem *notification, CommonTimelineItemHeader *existing_header) { if (existing_header->dismissed) { // this should be dismissed from iOS. Dismiss it again - PBL_LOG_DBG("ANCS notification already dismissed, dismissing again: %"PRIu32, - notification->header.ancs_uid); + PBL_LOG_DBG("ANCS notification already dismissed, dismissing again: %" PRIu32, + notification->header.ancs_uid); prv_dismiss_notification(notification); } @@ -112,8 +112,8 @@ static bool prv_should_ignore_because_calendar_reminder(const ANCSAttribute *app TimelineItem reminder; // Check if we have a matching reminder for this calendar event - if (reminder_db_find_by_timestamp_title(timestamp, calendar_title_buffer, prv_calendar_reminder_filter, - &reminder)) { + if (reminder_db_find_by_timestamp_title(timestamp, calendar_title_buffer, + prv_calendar_reminder_filter, &reminder)) { timeline_item_free_allocated_buffer(&reminder); return true; } @@ -131,10 +131,8 @@ static bool prv_reminder_filter(SerializedTimelineItemHeader *hdr, void *context return false; } -static bool prv_should_ignore_because_time_reminder(const ANCSAttribute *app_id, - time_t timestamp, - const ANCSAttribute *title, - uint32_t uid, +static bool prv_should_ignore_because_time_reminder(const ANCSAttribute *app_id, time_t timestamp, + const ANCSAttribute *title, uint32_t uid, const ANCSAttribute *attr_action_neg) { if (!pstring_equal_cstring(&app_id->pstr, IOS_REMINDERS_APP_ID)) { return false; @@ -204,7 +202,7 @@ static bool prv_should_ignore_because_apple_mail_dot_app_bug(const ANCSAttribute } static bool prv_should_ignore_because_stale(time_t timestamp) { - static const time_t MAXIMUM_NOTIFY_TIME = 2 * 60 * 60; // 2 hours + static const time_t MAXIMUM_NOTIFY_TIME = 2 * 60 * 60; // 2 hours static const time_t INVALID_TIME = ~0; const time_t now = rtc_get_time(); @@ -225,8 +223,7 @@ static bool prv_should_ignore_because_muted(const iOSNotifPrefs *app_notif_prefs return ancs_filtering_is_muted(app_notif_prefs); } -static bool prv_should_ignore_notification(uint32_t uid, - time_t timestamp, +static bool prv_should_ignore_notification(uint32_t uid, time_t timestamp, ANCSAttribute **notif_attributes, iOSNotifPrefs *app_notif_prefs) { const ANCSAttribute *app_id = notif_attributes[FetchedNotifAttributeIndexAppID]; @@ -269,10 +266,10 @@ static bool prv_should_ignore_notification(uint32_t uid, } // filter out time based reminder notifications - if (prv_should_ignore_because_time_reminder(app_id, timestamp, title, uid, - negative_action)) { - PBL_LOG_DBG("Ignoring ANCS reminders notification because existing " - "time-based reminder was found in db"); + if (prv_should_ignore_because_time_reminder(app_id, timestamp, title, uid, negative_action)) { + PBL_LOG_DBG( + "Ignoring ANCS reminders notification because existing " + "time-based reminder was found in db"); return true; } @@ -284,8 +281,7 @@ static bool prv_should_ignore_notification(uint32_t uid, return false; } -void ancs_notifications_handle_message(uint32_t uid, - ANCSProperty properties, +void ancs_notifications_handle_message(uint32_t uid, ANCSProperty properties, ANCSAttribute **notif_attributes, ANCSAttribute **app_attributes) { PBL_ASSERTN(notif_attributes && app_attributes); @@ -336,11 +332,12 @@ void ancs_notifications_handle_message(uint32_t uid, } // add a notification - const ANCSAppMetadata* app_metadata = ancs_notifications_util_get_app_metadata(app_id); - TimelineItem *notification = ancs_item_create_and_populate(notif_attributes, app_attributes, - app_metadata, app_notif_prefs, - timestamp, properties); - if (!notification) { goto cleanup; } + const ANCSAppMetadata *app_metadata = ancs_notifications_util_get_app_metadata(app_id); + TimelineItem *notification = ancs_item_create_and_populate( + notif_attributes, app_attributes, app_metadata, app_notif_prefs, timestamp, properties); + if (!notification) { + goto cleanup; + } notification->header.ancs_uid = uid; notification->header.type = TimelineItemTypeNotification; notification->header.layout = LayoutIdNotification; @@ -351,15 +348,15 @@ void ancs_notifications_handle_message(uint32_t uid, CommonTimelineItemHeader existing_header; if (prv_find_existing_notification(notification, &existing_header)) { if (prv_should_ignore_because_duplicate(notification, &existing_header)) { - PBL_LOG_DBG("Duplicate ANCS notification: %"PRIu32, uid); + PBL_LOG_DBG("Duplicate ANCS notification: %" PRIu32, uid); timeline_item_destroy(notification); notification_storage_unlock(); goto cleanup; } - PBL_LOG_DBG("Updating ANCS notification: %"PRIu32, uid); + PBL_LOG_DBG("Updating ANCS notification: %" PRIu32, uid); prv_handle_ancs_update(notification, &existing_header); } else { - PBL_LOG_DBG("New ANCS notification: %"PRIu32, uid); + PBL_LOG_DBG("New ANCS notification: %" PRIu32, uid); prv_handle_new_ancs_notif(notification); } @@ -367,10 +364,11 @@ void ancs_notifications_handle_message(uint32_t uid, // if missed call, also add a pin if (is_notification_from_phone_app && has_missed_call_property) { - TimelineItem *missed_call_pin = - ancs_item_create_and_populate(notif_attributes, app_attributes, app_metadata, - app_notif_prefs, timestamp, properties); - if (missed_call_pin == NULL) { goto cleanup; } + TimelineItem *missed_call_pin = ancs_item_create_and_populate( + notif_attributes, app_attributes, app_metadata, app_notif_prefs, timestamp, properties); + if (missed_call_pin == NULL) { + goto cleanup; + } timeline_add_missed_call_pin(missed_call_pin, uid); timeline_item_destroy(missed_call_pin); } @@ -390,8 +388,7 @@ void ancs_notifications_handle_notification_removed(uint32_t ancs_uid, ANCSPrope Uuid *notification_id = kernel_malloc_check(sizeof(Uuid)); if (notification_storage_find_ancs_notification_id(ancs_uid, notification_id)) { - PBL_LOG_DBG("Notification removed from notification centre: (UID: %"PRIu32")", - ancs_uid); + PBL_LOG_DBG("Notification removed from notification centre: (UID: %" PRIu32 ")", ancs_uid); notification_storage_set_status(notification_id, TimelineItemStatusDismissed); notifications_handle_notification_acted_upon(notification_id); diff --git a/src/fw/services/notifications/ancs/ancs_notifications_util.c b/src/fw/services/notifications/ancs/ancs_notifications_util.c index 2051cacc78..b7baec50a3 100644 --- a/src/fw/services/notifications/ancs/ancs_notifications_util.c +++ b/src/fw/services/notifications/ancs/ancs_notifications_util.c @@ -12,12 +12,12 @@ #include "pbl/util/size.h" #include "pbl/util/string.h" -const ANCSAppMetadata* ancs_notifications_util_get_app_metadata(const ANCSAttribute *app_id) { +const ANCSAppMetadata *ancs_notifications_util_get_app_metadata(const ANCSAttribute *app_id) { static const ANCSAppMetadata s_generic_app = { #if PBL_COLOR - .app_color = GColorClearARGB8, + .app_color = GColorClearARGB8, #endif - .icon_id = TIMELINE_RESOURCE_NOTIFICATION_GENERIC, + .icon_id = TIMELINE_RESOURCE_NOTIFICATION_GENERIC, }; static const struct ANCSAppMetadata map[] = { @@ -64,7 +64,7 @@ time_t ancs_notifications_util_parse_timestamp(const ANCSAttribute *timestamp_at return 0; } - struct tm time_tm = { 0 }; + struct tm time_tm = {0}; time_tm.tm_sec = atoi(timestamp.second); timestamp.second[0] = '\0'; time_tm.tm_min = atoi(timestamp.minute); diff --git a/src/fw/services/notifications/ancs/ancs_phone_call.c b/src/fw/services/notifications/ancs/ancs_phone_call.c index 531e47a6de..cf642ec041 100644 --- a/src/fw/services/notifications/ancs/ancs_phone_call.c +++ b/src/fw/services/notifications/ancs/ancs_phone_call.c @@ -17,13 +17,13 @@ static RegularTimerInfo s_missed_call_timer_id; static void prv_put_call_event(PhoneEventType type, uint32_t call_identifier, PebblePhoneCaller *caller, bool ios_9) { PebbleEvent event = { - .type = PEBBLE_PHONE_EVENT, - .phone = { - .type = type, - .source = ios_9 ? PhoneCallSource_ANCS : PhoneCallSource_ANCS_Legacy, - .call_identifier = call_identifier, - .caller = caller, - } + .type = PEBBLE_PHONE_EVENT, + .phone = { + .type = type, + .source = ios_9 ? PhoneCallSource_ANCS : PhoneCallSource_ANCS_Legacy, + .call_identifier = call_identifier, + .caller = caller, + } }; event_put(&event); @@ -77,7 +77,7 @@ bool ancs_phone_call_should_ignore_missed_calls(void) { } static void prv_handle_missed_call_timer_timeout(void *not_used) { -if (regular_timer_is_scheduled(&s_missed_call_timer_id)) { + if (regular_timer_is_scheduled(&s_missed_call_timer_id)) { regular_timer_remove_callback(&s_missed_call_timer_id); } } @@ -88,8 +88,8 @@ void ancs_phone_call_temporarily_block_missed_calls(void) { regular_timer_remove_callback(&s_missed_call_timer_id); } - s_missed_call_timer_id = (const RegularTimerInfo) { - .cb = prv_handle_missed_call_timer_timeout, + s_missed_call_timer_id = (const RegularTimerInfo){ + .cb = prv_handle_missed_call_timer_timeout, }; regular_timer_add_multisecond_callback(&s_missed_call_timer_id, BLOCK_MISS_CALL_TIME_S); } diff --git a/src/fw/services/notifications/ancs/nexmo.c b/src/fw/services/notifications/ancs/nexmo.c index 926607f43d..0a1fb972a9 100644 --- a/src/fw/services/notifications/ancs/nexmo.c +++ b/src/fw/services/notifications/ancs/nexmo.c @@ -11,7 +11,7 @@ PBL_LOG_MODULE_DECLARE(service_notifications, CONFIG_SERVICE_NOTIFICATIONS_LOG_LEVEL); -T_STATIC char* NEXMO_REAUTH_STRING = "Pebble check-in code:"; +T_STATIC char *NEXMO_REAUTH_STRING = "Pebble check-in code:"; bool nexmo_is_reauth_sms(const ANCSAttribute *app_id, const ANCSAttribute *message) { if (ancs_notifications_util_is_sms(app_id)) { @@ -23,12 +23,10 @@ bool nexmo_is_reauth_sms(const ANCSAttribute *app_id, const ANCSAttribute *messa return false; } -void nexmo_handle_reauth_sms(uint32_t uid, - const ANCSAttribute *app_id, - const ANCSAttribute *message, - iOSNotifPrefs *existing_notif_prefs) { - const int num_existing_attributes = existing_notif_prefs ? - existing_notif_prefs->attr_list.num_attributes : 0; +void nexmo_handle_reauth_sms(uint32_t uid, const ANCSAttribute *app_id, + const ANCSAttribute *message, iOSNotifPrefs *existing_notif_prefs) { + const int num_existing_attributes = + existing_notif_prefs ? existing_notif_prefs->attr_list.num_attributes : 0; AttributeList new_attr_list; attribute_list_init_list(num_existing_attributes, &new_attr_list); @@ -46,8 +44,8 @@ void nexmo_handle_reauth_sms(uint32_t uid, attribute_list_add_cstring(&new_attr_list, AttributeIdAuthCode, msg_buffer); // This will trigger a sync sending the auth code to the phone - ios_notif_pref_db_store_prefs(app_id->value, app_id->length, - &new_attr_list, &existing_notif_prefs->action_group); + ios_notif_pref_db_store_prefs(app_id->value, app_id->length, &new_attr_list, + &existing_notif_prefs->action_group); // Dismiss the notification so the user is oblivious to this process ancs_perform_action(uid, ActionIDNegative); diff --git a/src/fw/services/notifications/do_not_disturb.c b/src/fw/services/notifications/do_not_disturb.c index 284f386a76..c9d13a4ec8 100644 --- a/src/fw/services/notifications/do_not_disturb.c +++ b/src/fw/services/notifications/do_not_disturb.c @@ -51,11 +51,11 @@ static void prv_update_active_time(bool is_active) { } static void prv_put_dnd_event(bool is_active) { - PebbleEvent e = (PebbleEvent) { - .type = PEBBLE_DO_NOT_DISTURB_EVENT, - .do_not_disturb = { - .is_active = is_active, - } + PebbleEvent e = (PebbleEvent){ + .type = PEBBLE_DO_NOT_DISTURB_EVENT, + .do_not_disturb = { + .is_active = is_active, + } }; event_put(&e); @@ -92,26 +92,29 @@ static void prv_toggle_manual_dnd_from_settings_menu(void *e_dialog) { do_not_disturb_set_manually_enabled(!do_not_disturb_is_manually_enabled()); } -static void prv_push_first_use_dialog(const char* msg, - DialogCallback dialog_close_cb) { - DialogCallbacks callbacks = { .unload = dialog_close_cb }; +static void prv_push_first_use_dialog(const char *msg, DialogCallback dialog_close_cb) { + DialogCallbacks callbacks = {.unload = dialog_close_cb}; ExpandableDialog *first_use_dialog = expandable_dialog_create_with_params( - "DNDFirstUse", RESOURCE_ID_QUIET_TIME, msg, GColorBlack, GColorMediumAquamarine, - &callbacks, RESOURCE_ID_ACTION_BAR_ICON_CHECK, expandable_dialog_close_cb); + "DNDFirstUse", RESOURCE_ID_QUIET_TIME, msg, GColorBlack, GColorMediumAquamarine, &callbacks, + RESOURCE_ID_ACTION_BAR_ICON_CHECK, expandable_dialog_close_cb); i18n_free(msg, &s_data); expandable_dialog_push(first_use_dialog, window_manager_get_window_stack(ModalPriorityNotification)); } static void prv_push_smart_dnd_first_use_dialog(void) { - const char *msg = i18n_get("Calendar Aware enables Quiet Time automatically during " \ - "calendar events.", &s_data); + const char *msg = i18n_get( + "Calendar Aware enables Quiet Time automatically during " + "calendar events.", + &s_data); prv_push_first_use_dialog(msg, prv_toggle_smart_dnd); } static void prv_push_manual_dnd_first_use_dialog(ManualDNDFirstUseSource source) { - const char *msg = i18n_get("Press and hold the Back button from a notification to turn " \ - "Quiet Time on or off.", &s_data); + const char *msg = i18n_get( + "Press and hold the Back button from a notification to turn " + "Quiet Time on or off.", + &s_data); if (source == ManualDNDFirstUseSourceActionMenu) { prv_push_first_use_dialog(msg, prv_toggle_manual_dnd_from_action_menu); } else { @@ -120,7 +123,7 @@ static void prv_push_manual_dnd_first_use_dialog(ManualDNDFirstUseSource source) } static void prv_try_update_schedule_mode(void *data) { - const bool clear_override = (bool) (uintptr_t) data; + const bool clear_override = (bool)(uintptr_t)data; if (clear_override) { s_data.manually_override_dnd = false; } @@ -136,18 +139,17 @@ static void prv_try_update_schedule_mode(void *data) { } static void prv_try_update_schedule_mode_callback(bool clear_manual_override) { - system_task_add_callback(prv_try_update_schedule_mode, (void*)(uintptr_t) clear_manual_override); + system_task_add_callback(prv_try_update_schedule_mode, (void *)(uintptr_t)clear_manual_override); } -static void prv_update_schedule_mode_timer_callback(void* not_used) { +static void prv_update_schedule_mode_timer_callback(void *not_used) { prv_try_update_schedule_mode_callback(true); } static DoNotDisturbScheduleType prv_current_schedule_type(void) { struct tm time; rtc_get_time_tm(&time); - return ((time.tm_wday == Saturday || time.tm_wday == Sunday) ? - WeekendSchedule : WeekdaySchedule); + return ((time.tm_wday == Saturday || time.tm_wday == Sunday) ? WeekendSchedule : WeekdaySchedule); } // Updates the timer for scheduled DND check @@ -164,16 +166,16 @@ static void prv_set_schedule_mode_timer() { time_t seconds_until_update; bool is_enable_next; int curr_day = time.tm_wday; - if (!curr_schedule_enabled) { // Only next schedule is enabled + if (!curr_schedule_enabled) { // Only next schedule is enabled is_enable_next = true; // Depending on the current schedule, determine the first day index of the next schedule int next_schedule_day = (curr_schedule_type == WeekdaySchedule) ? Saturday : Monday; // Count the number of full days until next schedule (Sunday = 0) int num_full_days = ((next_schedule_day - curr_day + DAYS_PER_WEEK) % DAYS_PER_WEEK) - 1; // Calculate the number of seconds until the start of the next schedule, update then - seconds_until_update = time_util_get_seconds_until_daily_time(&time, 0, 0) + - (num_full_days * SECONDS_PER_DAY); - } else { // Current schedule is enabled + seconds_until_update = + time_util_get_seconds_until_daily_time(&time, 0, 0) + (num_full_days * SECONDS_PER_DAY); + } else { // Current schedule is enabled const time_t seconds_until_start = time_util_get_seconds_until_daily_time( &time, curr_schedule.from_hour, curr_schedule.from_minute); const time_t seconds_until_end = time_util_get_seconds_until_daily_time( @@ -196,7 +198,7 @@ static void prv_set_schedule_mode_timer() { } PBL_LOG_INFO("%s scheduled period. %u seconds until update", - s_data.is_in_schedule_period ? "In" : "Out of", (unsigned int) seconds_until_update); + s_data.is_in_schedule_period ? "In" : "Out of", (unsigned int)seconds_until_update); bool success = new_timer_start(s_data.update_timer_id, seconds_until_update * 1000, prv_update_schedule_mode_timer_callback, NULL, 0 /*flags*/); @@ -213,8 +215,7 @@ static bool prv_is_schedule_active(void) { } static bool prv_is_smart_dnd_active(void) { - return (calendar_event_is_ongoing() && - do_not_disturb_is_smart_dnd_enabled() && + return (calendar_event_is_ongoing() && do_not_disturb_is_smart_dnd_enabled() && !s_data.manually_override_dnd); } @@ -227,8 +228,7 @@ DEFINE_SYSCALL(bool, sys_do_not_disturb_is_active, void) { } bool do_not_disturb_is_active(void) { - if (do_not_disturb_is_manually_enabled() || - prv_is_schedule_active() || + if (do_not_disturb_is_manually_enabled() || prv_is_schedule_active() || prv_is_smart_dnd_active()) { return true; } @@ -240,8 +240,8 @@ bool do_not_disturb_is_manually_enabled(void) { } void do_not_disturb_set_manually_enabled(bool enable) { - const bool is_auto_dnd = prv_is_current_schedule_enabled() || - do_not_disturb_is_smart_dnd_enabled(); + const bool is_auto_dnd = + prv_is_current_schedule_enabled() || do_not_disturb_is_smart_dnd_enabled(); const bool was_active = do_not_disturb_is_active(); alerts_preferences_dnd_set_manually_enabled(enable); @@ -303,11 +303,11 @@ void do_not_disturb_toggle_scheduled(DoNotDisturbScheduleType type) { } void do_not_disturb_init(void) { - s_data = (DoNotDisturbData) { - .update_timer_id = new_timer_create(), - .was_active = false, + s_data = (DoNotDisturbData){ + .update_timer_id = new_timer_create(), + .was_active = false, }; - prv_try_update_schedule_mode((void*) true); + prv_try_update_schedule_mode((void *)true); } void do_not_disturb_handle_clock_change(void) { diff --git a/src/fw/services/notifications/do_not_disturb_toggle.c b/src/fw/services/notifications/do_not_disturb_toggle.c index 703e818e4c..10cd05ca7a 100644 --- a/src/fw/services/notifications/do_not_disturb_toggle.c +++ b/src/fw/services/notifications/do_not_disturb_toggle.c @@ -22,24 +22,24 @@ static void prv_set_state(bool enabled, void *context) { } static const ActionToggleImpl s_dnd_action_toggle_impl = { - .window_name = "DNDManualToggle", - .prompt_icon = PBL_IF_RECT_ELSE(RESOURCE_ID_QUIET_TIME_MOUSE, - RESOURCE_ID_QUIET_TIME_MOUSE_RIGHT_ALIGNED), - .result_icon = RESOURCE_ID_QUIET_TIME_MOUSE, - .prompt_enable_message = i18n_noop("Start Quiet Time?"), - .prompt_disable_message = i18n_noop("End Quiet Time?"), - .result_enable_message = i18n_noop("Quiet Time\nStarted"), - .result_disable_message = i18n_noop("Quiet Time\nEnded"), - .callbacks = { - .get_state = prv_get_state, - .set_state = prv_set_state, - }, + .window_name = "DNDManualToggle", + .prompt_icon = + PBL_IF_RECT_ELSE(RESOURCE_ID_QUIET_TIME_MOUSE, RESOURCE_ID_QUIET_TIME_MOUSE_RIGHT_ALIGNED), + .result_icon = RESOURCE_ID_QUIET_TIME_MOUSE, + .prompt_enable_message = i18n_noop("Start Quiet Time?"), + .prompt_disable_message = i18n_noop("End Quiet Time?"), + .result_enable_message = i18n_noop("Quiet Time\nStarted"), + .result_disable_message = i18n_noop("Quiet Time\nEnded"), + .callbacks = { + .get_state = prv_get_state, + .set_state = prv_set_state, + }, }; void do_not_disturb_toggle_push(ActionTogglePrompt prompt, bool set_exit_reason) { - action_toggle_push(&(ActionToggleConfig) { - .impl = &s_dnd_action_toggle_impl, - .prompt = prompt, - .set_exit_reason = set_exit_reason, + action_toggle_push(&(ActionToggleConfig){ + .impl = &s_dnd_action_toggle_impl, + .prompt = prompt, + .set_exit_reason = set_exit_reason, }); } diff --git a/src/fw/services/notifications/notification_image.c b/src/fw/services/notifications/notification_image.c index c59c778655..06796f5248 100644 --- a/src/fw/services/notifications/notification_image.c +++ b/src/fw/services/notifications/notification_image.c @@ -64,8 +64,7 @@ void notification_image_unlock(void) { bool notification_image_is_pending(const Uuid *item_id) { pbl_mutex_lock(&s_lock, PBL_FOREVER); - const bool pending = - s_pending && s_claimed && item_id && uuid_equal(&s_item_id, item_id); + const bool pending = s_pending && s_claimed && item_id && uuid_equal(&s_item_id, item_id); pbl_mutex_unlock(&s_lock); return pending; } diff --git a/src/fw/services/notifications/notification_storage.c b/src/fw/services/notifications/notification_storage.c index 264bf58d83..d442c56e85 100644 --- a/src/fw/services/notifications/notification_storage.c +++ b/src/fw/services/notifications/notification_storage.c @@ -25,19 +25,19 @@ typedef struct NotificationIterState { TimelineItem notification; } NotificationIterState; -static const char *FILENAME = "notifstr"; //The filename should not be changed +static const char *FILENAME = "notifstr"; // The filename should not be changed static PBL_MUTEX_DEFINE(s_notif_storage_mutex); static uint32_t s_write_offset; static bool prv_iter_next(NotificationIterState *iter_state); -static bool prv_get_notification(TimelineItem *notification, - SerializedTimelineItemHeader *header, int fd); +static bool prv_get_notification(TimelineItem *notification, SerializedTimelineItemHeader *header, + int fd); static void prv_set_header_status(SerializedTimelineItemHeader *header, uint8_t status, int fd); void notification_storage_init(void) { - //Clear notifications storage on reset + // Clear notifications storage on reset pfs_remove(FILENAME); // Create a new file and close it (removes delay when receiving first notification after boot) int fd = pfs_open(FILENAME, OP_FLAG_WRITE, FILE_TYPE_STATIC, NOTIFICATION_STORAGE_FILE_SIZE); @@ -80,15 +80,15 @@ static void prv_file_close(int fd) { notification_storage_unlock(); } -static int prv_write_notification(TimelineItem *notification, - SerializedTimelineItemHeader *header, int fd) { +static int prv_write_notification(TimelineItem *notification, SerializedTimelineItemHeader *header, + int fd) { int bytes_written = 0; // Invert flags & status to store on flash header->common.flags = ~header->common.flags; header->common.status = ~header->common.status; - int result = pfs_write(fd, (uint8_t *) header, sizeof(*header)); + int result = pfs_write(fd, (uint8_t *)header, sizeof(*header)); // Restore flags & status header->common.flags = ~header->common.flags; @@ -124,7 +124,7 @@ static int prv_write_notification(TimelineItem *notification, //! enough space available static void prv_reclaim_space(size_t size_needed, int fd) { size_needed = ((size_needed / NOTIFICATION_STORAGE_MINIMUM_INCREMENT_SIZE) + 1) * - NOTIFICATION_STORAGE_MINIMUM_INCREMENT_SIZE; // Free up space size in blocks + NOTIFICATION_STORAGE_MINIMUM_INCREMENT_SIZE; // Free up space size in blocks size_t size_available = 0; NotificationIterState iter_state = { .fd = fd, @@ -137,8 +137,8 @@ static void prv_reclaim_space(size_t size_needed, int fd) { // Mark for deletion char uuid_buffer[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(&iter_state.header.common.id, uuid_buffer); - PBL_LOG_WRN("Storage full: marking notification %s as deleted (ANCS UID: %"PRIu32")", - uuid_buffer, iter_state.header.common.ancs_uid); + PBL_LOG_WRN("Storage full: marking notification %s as deleted (ANCS UID: %" PRIu32 ")", + uuid_buffer, iter_state.header.common.ancs_uid); prv_set_header_status(&iter_state.header, TimelineItemStatusDeleted, fd); size_available += sizeof(SerializedTimelineItemHeader) + iter_state.header.payload_length; if (size_needed <= size_available) { @@ -180,9 +180,9 @@ static bool prv_is_storage_full(size_t size_needed, size_t *size_available, int static bool prv_compress(size_t size_needed, int *fd) { pfs_seek(*fd, 0, FSeekSet); - //Open file for overwrite - int new_fd = pfs_open(FILENAME, OP_FLAG_OVERWRITE, FILE_TYPE_STATIC, - NOTIFICATION_STORAGE_FILE_SIZE); + // Open file for overwrite + int new_fd = + pfs_open(FILENAME, OP_FLAG_OVERWRITE, FILE_TYPE_STATIC, NOTIFICATION_STORAGE_FILE_SIZE); if (new_fd < 0) { PBL_LOG_ERR("Error opening new file for compression %d", new_fd); return false; @@ -218,7 +218,8 @@ static bool prv_compress(size_t size_needed, int *fd) { // Error occurred char uuid_buffer[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(&iter_state.header.common.id, uuid_buffer); - PBL_LOG_ERR("Failed to read notification %s during compression. Resetting all notifications.", uuid_buffer); + PBL_LOG_ERR("Failed to read notification %s during compression. Resetting all notifications.", + uuid_buffer); goto cleanup; } int result = prv_write_notification(¬ification, &iter_state.header, new_fd); @@ -226,7 +227,10 @@ static bool prv_compress(size_t size_needed, int *fd) { // Error occurred char uuid_buffer[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(&iter_state.header.common.id, uuid_buffer); - PBL_LOG_ERR("Failed to write notification %s during compression (error %d). Resetting all notifications.", uuid_buffer, result); + PBL_LOG_ERR( + "Failed to write notification %s during compression (error %d). Resetting all " + "notifications.", + uuid_buffer, result); // The buffer comes from the calling task's heap (timeline_item_deserialize_item), so it // must not be freed with kernel_free: compression can run on the app task, e.g. when a // workout summary notification is stored while storage is full. @@ -243,7 +247,7 @@ static bool prv_compress(size_t size_needed, int *fd) { pfs_close(new_fd); *fd = pfs_open(FILENAME, OP_FLAG_READ | OP_FLAG_WRITE, FILE_TYPE_STATIC, - NOTIFICATION_STORAGE_FILE_SIZE); + NOTIFICATION_STORAGE_FILE_SIZE); if (*fd < 0) { PBL_LOG_ERR("Error re-opening after compression %d", new_fd); return false; @@ -257,10 +261,10 @@ static bool prv_compress(size_t size_needed, int *fd) { return false; } -void notification_storage_store(TimelineItem* notification) { +void notification_storage_store(TimelineItem *notification) { PBL_ASSERTN(notification != NULL); - SerializedTimelineItemHeader header = { .common.id = UUID_INVALID }; + SerializedTimelineItemHeader header = {.common.id = UUID_INVALID}; timeline_item_serialize_header(notification, &header); int fd = prv_file_open(OP_FLAG_WRITE | OP_FLAG_READ); @@ -283,7 +287,8 @@ void notification_storage_store(TimelineItem* notification) { // [AS] TODO: Write failure: reset storage, compression or reset watch? char uuid_buffer[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(¬ification->header.id, uuid_buffer); - PBL_LOG_ERR("Failed to write notification %s (error %d). Resetting all notifications.", uuid_buffer, result); + PBL_LOG_ERR("Failed to write notification %s (error %d). Resetting all notifications.", + uuid_buffer, result); goto reset_storage; } @@ -299,8 +304,10 @@ void notification_storage_store(TimelineItem* notification) { // Finds the next match in the notification storage file from the current position // Position in file will be at the start of notification payload if return value is true -static bool prv_find_next_notification(SerializedTimelineItemHeader* header, - bool (*compare_func)(SerializedTimelineItemHeader* header, void* data), void* data, int fd) { +static bool prv_find_next_notification(SerializedTimelineItemHeader *header, + bool (*compare_func)(SerializedTimelineItemHeader *header, + void *data), + void *data, int fd) { for (;;) { int result = pfs_read(fd, (uint8_t *)header, sizeof(*header)); @@ -343,8 +350,8 @@ static bool prv_uuid_equal_func(SerializedTimelineItemHeader *header, void *data return uuid_equal(&header->common.id, uuid); } -static bool prv_ancs_id_compare_func(SerializedTimelineItemHeader* header, void* data) { - uint32_t ancs_uid = (uint32_t) data; +static bool prv_ancs_id_compare_func(SerializedTimelineItemHeader *header, void *data) { + uint32_t ancs_uid = (uint32_t)data; return header->common.ancs_uid == ancs_uid; } @@ -354,7 +361,7 @@ bool notification_storage_notification_exists(const Uuid *id) { return false; } - SerializedTimelineItemHeader header = { .common.id = UUID_INVALID }; + SerializedTimelineItemHeader header = {.common.id = UUID_INVALID}; bool found = prv_find_next_notification(&header, prv_uuid_equal_func, (void *)id, fd); prv_file_close(fd); @@ -362,10 +369,9 @@ bool notification_storage_notification_exists(const Uuid *id) { return found; } -static bool prv_get_notification(TimelineItem *notification, - SerializedTimelineItemHeader* header, int fd) { - - notification->allocated_buffer = NULL; // Must be initialized in case this goes to cleanup +static bool prv_get_notification(TimelineItem *notification, SerializedTimelineItemHeader *header, + int fd) { + notification->allocated_buffer = NULL; // Must be initialized in case this goes to cleanup // Read notification to temporary buffer uint8_t *read_buffer = task_zalloc_check(header->payload_length); @@ -393,8 +399,8 @@ size_t notification_storage_get_len(const Uuid *uuid) { } size_t size = 0; - SerializedTimelineItemHeader header = { .common.id = UUID_INVALID }; - if (prv_find_next_notification(&header, prv_uuid_equal_func, (void *) uuid, fd)) { + SerializedTimelineItemHeader header = {.common.id = UUID_INVALID}; + if (prv_find_next_notification(&header, prv_uuid_equal_func, (void *)uuid, fd)) { size = header.payload_length + sizeof(SerializedTimelineItemHeader); } else { PBL_LOG_DBG("notification not found"); @@ -414,17 +420,16 @@ bool notification_storage_get(const Uuid *id, TimelineItem *item_out) { bool rv = true; - SerializedTimelineItemHeader header = { .common.id = UUID_INVALID }; + SerializedTimelineItemHeader header = {.common.id = UUID_INVALID}; char uuid_string[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(id, uuid_string); - if (!prv_find_next_notification(&header, prv_uuid_equal_func, (void *) id, fd)) { + if (!prv_find_next_notification(&header, prv_uuid_equal_func, (void *)id, fd)) { PBL_LOG_DBG("notification not found, %s", uuid_string); rv = false; } else { - if (!prv_get_notification(item_out, &header, fd)) { - PBL_LOG_ERR("Could not retrieve notification with id %s and size %u", - uuid_string, header.payload_length); + PBL_LOG_ERR("Could not retrieve notification with id %s and size %u", uuid_string, + header.payload_length); rv = false; } } @@ -436,7 +441,6 @@ bool notification_storage_get(const Uuid *id, TimelineItem *item_out) { //! @return is_advanced static bool prv_iter_next(NotificationIterState *iter_state) { - int result = pfs_read(iter_state->fd, (uint8_t *)&iter_state->header, sizeof(iter_state->header)); // Restore flags & status @@ -444,7 +448,8 @@ static bool prv_iter_next(NotificationIterState *iter_state) { iter_state->header.common.status = ~iter_state->header.common.status; if ((result == E_RANGE) || (uuid_is_invalid(&iter_state->header.common.id))) { - //End iteration if we have reached the end of the file or the header ID is invalid (erased flash) + // End iteration if we have reached the end of the file or the header ID is invalid (erased + // flash) return false; } else if (result < 0) { PBL_LOG_ERR("Error reading notification header while iterating %d", result); @@ -457,7 +462,7 @@ static bool prv_iter_next(NotificationIterState *iter_state) { static bool prv_rewrite_iter_next(NotificationIterState *iter_state) { int result = 0; - result = pfs_read(iter_state->fd, (uint8_t*)&iter_state->header, sizeof(iter_state->header)); + result = pfs_read(iter_state->fd, (uint8_t *)&iter_state->header, sizeof(iter_state->header)); // Restore flags & status iter_state->header.common.flags = ~iter_state->header.common.flags; @@ -480,9 +485,7 @@ static bool prv_rewrite_iter_next(NotificationIterState *iter_state) { static void prv_set_header_status(SerializedTimelineItemHeader *header, uint8_t status, int fd) { // Seek to the status field - pfs_seek(fd, (-(int)sizeof(*header) + - (int)offsetof(CommonTimelineItemHeader, status)), - FSeekCur); + pfs_seek(fd, (-(int)sizeof(*header) + (int)offsetof(CommonTimelineItemHeader, status)), FSeekCur); // Invert flags & status to store on flash status = ~status; @@ -493,8 +496,10 @@ static void prv_set_header_status(SerializedTimelineItemHeader *header, uint8_t } // Seek to the end of the header - pfs_seek(fd, ((int)sizeof(*header) - (int)offsetof(CommonTimelineItemHeader, status) - - sizeof(header->common.status)), FSeekCur); + pfs_seek(fd, + ((int)sizeof(*header) - (int)offsetof(CommonTimelineItemHeader, status) - + sizeof(header->common.status)), + FSeekCur); } bool notification_storage_get_status(const Uuid *id, uint8_t *status) { @@ -504,8 +509,8 @@ bool notification_storage_get_status(const Uuid *id, uint8_t *status) { return rv; } - SerializedTimelineItemHeader header = { .common.id = UUID_INVALID }; - if (prv_find_next_notification(&header, prv_uuid_equal_func, (void *) id, fd)) { + SerializedTimelineItemHeader header = {.common.id = UUID_INVALID}; + if (prv_find_next_notification(&header, prv_uuid_equal_func, (void *)id, fd)) { *status = header.common.status; rv = true; } @@ -515,15 +520,14 @@ bool notification_storage_get_status(const Uuid *id, uint8_t *status) { } void notification_storage_set_status(const Uuid *id, uint8_t status) { - - SerializedTimelineItemHeader header = { .common.id = UUID_INVALID }; + SerializedTimelineItemHeader header = {.common.id = UUID_INVALID}; int fd = prv_file_open(OP_FLAG_READ | OP_FLAG_WRITE); if (fd < 0) { return; } - if (prv_find_next_notification(&header, prv_uuid_equal_func, (void *) id, fd)) { + if (prv_find_next_notification(&header, prv_uuid_equal_func, (void *)id, fd)) { prv_set_header_status(&header, status, fd); } @@ -535,19 +539,18 @@ void notification_storage_remove(const Uuid *id) { } bool notification_storage_find_ancs_notification_id(uint32_t ancs_uid, Uuid *uuid_out) { - int fd = prv_file_open(OP_FLAG_READ); if (fd < 0) { return false; } - SerializedTimelineItemHeader header = { .common.id = UUID_INVALID }; + SerializedTimelineItemHeader header = {.common.id = UUID_INVALID}; // Find the most recent notification which matches this ANCS UID - this will be the last entry in // the db. iOS can reset ANCS UIDs on reconnect, so we want to avoid finding an old notification bool found = false; - while (prv_find_next_notification(&header, prv_ancs_id_compare_func, - (void *)(uintptr_t) ancs_uid, fd)) { + while (prv_find_next_notification(&header, prv_ancs_id_compare_func, (void *)(uintptr_t)ancs_uid, + fd)) { found = true; *uuid_out = header.common.id; @@ -563,8 +566,8 @@ bool notification_storage_find_ancs_notification_id(uint32_t ancs_uid, Uuid *uui } static bool prv_compare_ancs_notifications(TimelineItem *notification, const uint8_t *payload, - size_t payload_size, SerializedTimelineItemHeader *header, int fd) { - + size_t payload_size, + SerializedTimelineItemHeader *header, int fd) { if ((notification->header.timestamp != header->common.timestamp) || (notification->header.layout != header->common.layout) || (header->payload_length != payload_size)) { @@ -581,7 +584,7 @@ static bool prv_compare_ancs_notifications(TimelineItem *notification, const uin return false; } - //Seek back to the end of the header so that the next iterator seek finds the next record + // Seek back to the end of the header so that the next iterator seek finds the next record pfs_seek(fd, -payload_size, FSeekCur); found = (memcmp(payload, read_buffer, payload_size) == 0); @@ -592,7 +595,6 @@ static bool prv_compare_ancs_notifications(TimelineItem *notification, const uin bool notification_storage_find_ancs_notification_by_timestamp( TimelineItem *notification, CommonTimelineItemHeader *header_out) { - PBL_ASSERTN(notification && header_out); int fd = prv_file_open(OP_FLAG_READ); @@ -600,12 +602,12 @@ bool notification_storage_find_ancs_notification_by_timestamp( return false; } - //Serialize notification attributes and actions for easy comparison + // Serialize notification attributes and actions for easy comparison size_t payload_size = timeline_item_get_serialized_payload_size(notification); uint8_t *payload = kernel_malloc_check(payload_size); timeline_item_serialize_payload(notification, payload, payload_size); - //Iterate over all records until a match is found + // Iterate over all records until a match is found bool rv = false; NotificationIterState iter_state = { .fd = fd, @@ -617,7 +619,7 @@ bool notification_storage_find_ancs_notification_by_timestamp( uint8_t status = iter_state.header.common.status; if (!(status & TimelineItemStatusDeleted)) { if (prv_compare_ancs_notifications(notification, payload, payload_size, &iter_state.header, - fd)) { + fd)) { *header_out = iter_state.header.common; rv = true; break; @@ -637,9 +639,9 @@ bool notification_storage_find_ancs_notification_by_timestamp( } void notification_storage_rewrite(void (*iter_callback)(TimelineItem *notification, - SerializedTimelineItemHeader *header, void *data), void *data) { - - + SerializedTimelineItemHeader *header, + void *data), + void *data) { if (iter_callback == NULL) { return; } @@ -650,16 +652,14 @@ void notification_storage_rewrite(void (*iter_callback)(TimelineItem *notificati } int new_fd = pfs_open(FILENAME, OP_FLAG_OVERWRITE | OP_FLAG_READ, FILE_TYPE_STATIC, - NOTIFICATION_STORAGE_FILE_SIZE); + NOTIFICATION_STORAGE_FILE_SIZE); if (new_fd < 0) { prv_file_close(fd); return; } Iterator iter; - NotificationIterState iter_state = { - .fd = fd - }; + NotificationIterState iter_state = {.fd = fd}; iter_init(&iter, (IteratorCallback)prv_rewrite_iter_next, NULL, &iter_state); int write_offset = 0; @@ -692,9 +692,8 @@ void notification_storage_rewrite(void (*iter_callback)(TimelineItem *notificati } void notification_storage_iterate(bool (*iter_callback)(void *data, - SerializedTimelineItemHeader *header), void *data) { - - + SerializedTimelineItemHeader *header), + void *data) { if (iter_callback == NULL) { return; } @@ -705,9 +704,7 @@ void notification_storage_iterate(bool (*iter_callback)(void *data, } Iterator iter; - NotificationIterState iter_state = { - .fd = fd - }; + NotificationIterState iter_state = {.fd = fd}; iter_init(&iter, (IteratorCallback)prv_iter_next, NULL, &iter_state); diff --git a/src/fw/services/notifications/notifications.c b/src/fw/services/notifications/notifications.c index 92b3af8962..65ed7c2bf0 100644 --- a/src/fw/services/notifications/notifications.c +++ b/src/fw/services/notifications/notifications.c @@ -14,19 +14,20 @@ #include "pbl/services/vibes/vibe_intensity.h" static void prv_notification_migration_iterator_callback(TimelineItem *notification, - SerializedTimelineItemHeader *header, void *data) { - header->common.timestamp -= *((int*)data); + SerializedTimelineItemHeader *header, + void *data) { + header->common.timestamp -= *((int *)data); notification->header.timestamp = header->common.timestamp; } void notifications_handle_notification_action_result( PebbleSysNotificationActionResult *action_result) { PebbleEvent launcher_event = { - .type = PEBBLE_SYS_NOTIFICATION_EVENT, - .sys_notification = { - .type = NotificationActionResult, - .action_result = action_result, - } + .type = PEBBLE_SYS_NOTIFICATION_EVENT, + .sys_notification = { + .type = NotificationActionResult, + .action_result = action_result, + } }; // event loop will free memory of action_result event_put(&launcher_event); @@ -36,22 +37,19 @@ void notifications_handle_notification_removed(Uuid *notification_id) { Uuid *removed_id = kernel_malloc_check(sizeof(Uuid)); *removed_id = *notification_id; PebbleEvent launcher_event = { - .type = PEBBLE_SYS_NOTIFICATION_EVENT, - .sys_notification = { - .type = NotificationRemoved, - .notification_id = removed_id, - } + .type = PEBBLE_SYS_NOTIFICATION_EVENT, + .sys_notification = { + .type = NotificationRemoved, + .notification_id = removed_id, + } }; event_put(&launcher_event); } void notifications_handle_notification_added(Uuid *notification_id) { PebbleEvent launcher_event = { - .type = PEBBLE_SYS_NOTIFICATION_EVENT, - .sys_notification = { - .type = NotificationAdded, - .notification_id = notification_id - } + .type = PEBBLE_SYS_NOTIFICATION_EVENT, + .sys_notification = {.type = NotificationAdded, .notification_id = notification_id} }; event_put(&launcher_event); PBL_ANALYTICS_ADD(notification_received_count, 1); @@ -59,17 +57,14 @@ void notifications_handle_notification_added(Uuid *notification_id) { void notifications_handle_notification_acted_upon(Uuid *notification_id) { PebbleEvent launcher_event = { - .type = PEBBLE_SYS_NOTIFICATION_EVENT, - .sys_notification = { - .type = NotificationActedUpon, - .notification_id = notification_id - } + .type = PEBBLE_SYS_NOTIFICATION_EVENT, + .sys_notification = {.type = NotificationActedUpon, .notification_id = notification_id} }; event_put(&launcher_event); } void notifications_migrate_timezone(const int tz_diff) { - notification_storage_rewrite(prv_notification_migration_iterator_callback, (void*)&tz_diff); + notification_storage_rewrite(prv_notification_migration_iterator_callback, (void *)&tz_diff); } void notification_storage_init(void); diff --git a/src/fw/services/orientation_manager/service.c b/src/fw/services/orientation_manager/service.c index 9e7f8ec7f0..8a7e32a59c 100644 --- a/src/fw/services/orientation_manager/service.c +++ b/src/fw/services/orientation_manager/service.c @@ -15,7 +15,6 @@ #include "pbl/services/touch/touch.h" #endif - void prv_change_orientation(bool rotated) { display_set_rotated(rotated); button_set_rotated(rotated); @@ -33,7 +32,7 @@ void orientation_handle_prefs_changed(void) { // Without this, phone-originated orientation changes (via settings blob DB sync) would not // be visible until the next natural redraw (e.g. button press or watchface tick). PebbleEvent event = { - .type = PEBBLE_RENDER_REQUEST_EVENT, + .type = PEBBLE_RENDER_REQUEST_EVENT, }; process_manager_send_event_to_process(PebbleTask_App, &event); } diff --git a/src/fw/services/persist/service.c b/src/fw/services/persist/service.c index 0fd0f61a2a..78e9d571f0 100644 --- a/src/fw/services/persist/service.c +++ b/src/fw/services/persist/service.c @@ -26,11 +26,11 @@ PBL_LOG_MODULE_DEFINE(service_persist, CONFIG_SERVICE_PERSIST_LOG_LEVEL); #define PERSIST_STORAGE_INITIAL_ALLOC KiBYTES(4) typedef struct PersistStore { - ListNode list_node; + ListNode list_node; Uuid uuid; SettingsFile file; bool file_open; - uint8_t usage_count; //!< How many clients are using this store + uint8_t usage_count; //!< How many clients are using this store } PersistStore; // Each open client has a PersistStore structure linked into this list. If both @@ -39,16 +39,14 @@ typedef struct PersistStore { static ListNode *s_client_stores; static PBL_MUTEX_DEFINE(s_mutex); - -static bool prv_uuid_list_filter(ListNode* node, void* data) { +static bool prv_uuid_list_filter(ListNode *node, void *data) { const Uuid *uuid = data; - PersistStore* store = (PersistStore*)node; + PersistStore *store = (PersistStore *)node; return uuid_equal(&store->uuid, uuid); } -static PersistStore * prv_find_open_store(const Uuid *uuid) { - return (PersistStore *)list_find(s_client_stores, prv_uuid_list_filter, - (void *)uuid); +static PersistStore *prv_find_open_store(const Uuid *uuid) { + return (PersistStore *)list_find(s_client_stores, prv_uuid_list_filter, (void *)uuid); } static ALWAYS_INLINE void prv_lock(void) { @@ -70,8 +68,8 @@ static status_t prv_get_file_name(char *name, size_t buf_len, const Uuid *uuid) return snprintf(name, buf_len, "ps%02x%02x%02x%02x%02x%02x%02x%02x" "%02x%02x%02x%02x%02x%02x%02x%02x", - b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], - b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15]); + b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], b[12], + b[13], b[14], b[15]); } status_t persist_service_delete_file(const Uuid *uuid) { @@ -186,7 +184,6 @@ static void prv_migrate_legacy_persist_files(void) { // Designed to be called once during reset void persist_service_init(void) { - prv_migrate_legacy_persist_files(); // Find and delete any AppInstallId-indexed persist files. Due to PBL-16663 @@ -195,8 +192,7 @@ void persist_service_init(void) { // we can't be sure that the persist files correspond to the current // AppInstallId, the safest thing to do is to simply blow them away. // TODO: remove this code before FW 3.0-golden. - PFSFileListEntry *bad_file_list = pfs_create_file_list( - prv_bad_persist_file_filter); + PFSFileListEntry *bad_file_list = pfs_create_file_list(prv_bad_persist_file_filter); PFSFileListEntry *iter = bad_file_list; while (iter) { pfs_remove(iter->name); @@ -216,16 +212,15 @@ void persist_service_init(void) { // only be unlocked after a call to persist_service_unlock(). While the global // persist service mutex is currently used, the API is designed such that a // per-file mutex could be used without altering the callers. -SettingsFile * persist_service_lock_and_get_store(const Uuid *uuid) { +SettingsFile *persist_service_lock_and_get_store(const Uuid *uuid) { prv_lock(); PersistStore *store = prv_find_open_store(uuid); PBL_ASSERTN(store); if (!store->file_open) { char filename[PERSIST_FILE_NAME_MAX_LENGTH]; PBL_ASSERTN(PASSED(prv_get_file_name(filename, sizeof(filename), uuid))); - PBL_ASSERTN(PASSED(settings_file_open_growable(&store->file, filename, - PERSIST_STORAGE_MAX_SPACE, - PERSIST_STORAGE_INITIAL_ALLOC))); + PBL_ASSERTN(PASSED(settings_file_open_growable( + &store->file, filename, PERSIST_STORAGE_MAX_SPACE, PERSIST_STORAGE_INITIAL_ALLOC))); store->file_open = true; } return &store->file; @@ -247,10 +242,10 @@ void persist_service_client_open(const Uuid *uuid) { store->usage_count++; } else { store = kernel_malloc_check(sizeof(*store)); - *store = (PersistStore) { - .uuid = *uuid, - .usage_count = 1, - .file_open = false, + *store = (PersistStore){ + .uuid = *uuid, + .usage_count = 1, + .file_open = false, }; s_client_stores = list_insert_before(s_client_stores, &store->list_node); } @@ -265,16 +260,14 @@ void persist_service_client_close(const Uuid *uuid) { prv_lock(); { PersistStore *store = prv_find_open_store(uuid); - PBL_ASSERTN(store && - list_contains(s_client_stores, &store->list_node) && + PBL_ASSERTN(store && list_contains(s_client_stores, &store->list_node) && store->usage_count >= 1); if (--store->usage_count == 0) { if (store->file_open) { settings_file_close(&store->file); } - list_remove(&store->list_node, - &s_client_stores /* &head */, NULL /* &tail */); + list_remove(&store->list_node, &s_client_stores /* &head */, NULL /* &tail */); kernel_free(store); } } diff --git a/src/fw/services/phone_call/service.c b/src/fw/services/phone_call/service.c index bc8d0ab09a..1a235fd269 100644 --- a/src/fw/services/phone_call/service.c +++ b/src/fw/services/phone_call/service.c @@ -30,7 +30,6 @@ PBL_LOG_MODULE_DEFINE(service_phone_call, CONFIG_SERVICE_PHONE_CALL_LOG_LEVEL); //! call ends, which consumes a lot of battery especially for longer calls. On iOS 9, we only //! know when the phone stops ringing, we don't know what happens after the user accepts/rejects - static bool s_call_in_progress = false; static PhoneCallSource s_call_source; @@ -45,7 +44,6 @@ static bool s_mobile_app_is_connected; // status of the phone call static TimerID s_call_watchdog = TIMER_INVALID_ID; - static void prv_handle_call_end(bool disconnected); static bool prv_call_is_ancs(void) { @@ -69,8 +67,8 @@ static void prv_schedule_call_watchdog(int poll_interval_ms) { // iOS 9 since we can rely on ANCS to tell us when the phone stops ringing if (s_call_source == PhoneCallSource_ANCS_Legacy) { // Schedule/reschedule the watchdog - if (!new_timer_start(s_call_watchdog, poll_interval_ms, prv_timer_callback, - NULL, TIMER_START_FLAG_REPEATING)) { + if (!new_timer_start(s_call_watchdog, poll_interval_ms, prv_timer_callback, NULL, + TIMER_START_FLAG_REPEATING)) { PBL_LOG_ERR("Could not start the phone call watchdog timer"); prv_handle_call_end(true /* Treat this as a disconnection */); } else { @@ -78,8 +76,7 @@ static void prv_schedule_call_watchdog(int poll_interval_ms) { pp_get_phone_state_set_enabled(true); } } else { - PBL_LOG_DBG("Not starting phone call watchdog, this isn't iOS 8: %d", - s_call_source); + PBL_LOG_DBG("Not starting phone call watchdog, this isn't iOS 8: %d", s_call_source); } } @@ -123,7 +120,7 @@ static void prv_handle_incoming_call(const PebblePhoneEvent *event) { // the phone has stopped ringing if ((event->source != PhoneCallSource_ANCS) && !s_mobile_app_is_connected) { PBL_LOG_DBG("Ignoring incoming call. Mobile app is not connected. Call source: %d ", - event->source); + event->source); return; } @@ -133,8 +130,7 @@ static void prv_handle_incoming_call(const PebblePhoneEvent *event) { prv_schedule_call_watchdog(600); - phone_ui_handle_incoming_call(event->caller, prv_should_show_ongoing_call_ui(), - s_call_source); + phone_ui_handle_incoming_call(event->caller, prv_should_show_ongoing_call_ui(), s_call_source); PBL_ANALYTICS_ADD(phone_call_incoming_count, 1); PBL_ANALYTICS_TIMER_START(phone_call_time_ms); } @@ -181,8 +177,8 @@ static void prv_handle_call_hide(PebblePhoneEvent *event) { // Make sure this wasn't caused due to an unrelated ANCS removal if (prv_call_is_ancs() && (s_call_identifier != event->call_identifier)) { - PBL_LOG_DBG("Ignoring hide call. Call identifier %"PRIu32" doesn't match %"PRIu32, - s_call_identifier, event->call_identifier); + PBL_LOG_DBG("Ignoring hide call. Call identifier %" PRIu32 " doesn't match %" PRIu32, + s_call_identifier, event->call_identifier); return; } @@ -208,7 +204,7 @@ static void prv_handle_caller_id(PebblePhoneEvent *event) { } T_STATIC void prv_handle_phone_event(PebbleEvent *e, void *context) { - PebblePhoneEvent event = (PebblePhoneEvent) e->phone; + PebblePhoneEvent event = (PebblePhoneEvent)e->phone; if (!alerts_should_notify_for_type(AlertPhoneCall)) { prv_handle_call_end(true /* disconnected */); @@ -218,8 +214,8 @@ T_STATIC void prv_handle_phone_event(PebbleEvent *e, void *context) { if (!(event.type == PhoneEventType_Incoming && new_timer_scheduled(s_call_watchdog, NULL))) { // Be careful not to spam the logs with the new iOS polling implementation - PBL_LOG_DBG("PebblePhoneEvent: %d, Call in progress: %s, Connected: %s", - event.type, s_call_in_progress ? "T": "F", s_mobile_app_is_connected ? "T": "F"); + PBL_LOG_DBG("PebblePhoneEvent: %d, Call in progress: %s, Connected: %s", event.type, + s_call_in_progress ? "T" : "F", s_mobile_app_is_connected ? "T" : "F"); } switch (event.type) { @@ -279,23 +275,23 @@ T_STATIC void prv_handle_ancs_disconnected_event(PebbleEvent *e, void *context) //! void phone_call_service_init() { static EventServiceInfo phone_event_info; - phone_event_info = (EventServiceInfo) { - .type = PEBBLE_PHONE_EVENT, - .handler = prv_handle_phone_event, + phone_event_info = (EventServiceInfo){ + .type = PEBBLE_PHONE_EVENT, + .handler = prv_handle_phone_event, }; event_service_client_subscribe(&phone_event_info); static EventServiceInfo mobile_app_event_info; - mobile_app_event_info = (EventServiceInfo) { - .type = PEBBLE_COMM_SESSION_EVENT, - .handler = prv_handle_mobile_app_event, + mobile_app_event_info = (EventServiceInfo){ + .type = PEBBLE_COMM_SESSION_EVENT, + .handler = prv_handle_mobile_app_event, }; event_service_client_subscribe(&mobile_app_event_info); static EventServiceInfo ancs_disconnected_event_info; - ancs_disconnected_event_info = (EventServiceInfo) { - .type = PEBBLE_ANCS_DISCONNECTED_EVENT, - .handler = prv_handle_ancs_disconnected_event, + ancs_disconnected_event_info = (EventServiceInfo){ + .type = PEBBLE_ANCS_DISCONNECTED_EVENT, + .handler = prv_handle_ancs_disconnected_event, }; event_service_client_subscribe(&ancs_disconnected_event_info); diff --git a/src/fw/services/phone_call/util.c b/src/fw/services/phone_call/util.c index 6690358ce2..73098f864b 100644 --- a/src/fw/services/phone_call/util.c +++ b/src/fw/services/phone_call/util.c @@ -8,7 +8,7 @@ #include -PebblePhoneCaller* phone_call_util_create_caller(const char *number, const char *name) { +PebblePhoneCaller *phone_call_util_create_caller(const char *number, const char *name) { PebblePhoneCaller *caller = kernel_zalloc(sizeof(PebblePhoneCaller)); if (!caller) { return NULL; diff --git a/src/fw/services/phone_pp/service.c b/src/fw/services/phone_pp/service.c index a27eef99b7..8a51731d0a 100644 --- a/src/fw/services/phone_pp/service.c +++ b/src/fw/services/phone_pp/service.c @@ -30,16 +30,16 @@ typedef enum PhoneCallState { } PhoneCallState; enum PhoneCmd { - PhoneCmdAnswer = 0x01, - PhoneCmdHangup = 0x02, - PhoneCmdGetStateRequest = 0x03, + PhoneCmdAnswer = 0x01, + PhoneCmdHangup = 0x02, + PhoneCmdGetStateRequest = 0x03, PhoneCmdGetStateResponse = 0x83, - PhoneCmdIncoming = 0x04, - PhoneCmdOutgoing = 0x05, - PhoneCmdMissed = 0x06, - PhoneCmdRing = 0x07, - PhoneCmdStart = 0x08, - PhoneCmdEnd = 0x09 + PhoneCmdIncoming = 0x04, + PhoneCmdOutgoing = 0x05, + PhoneCmdMissed = 0x06, + PhoneCmdRing = 0x07, + PhoneCmdStart = 0x08, + PhoneCmdEnd = 0x09 }; typedef struct { @@ -48,23 +48,19 @@ typedef struct { char caller_name[CALLER_BUFFER_LENGTH]; } PebbleCallInfo; - -static bool get_call_info_from_msg(const uint8_t* msg, unsigned int length, - PebbleCallInfo* info) { +static bool get_call_info_from_msg(const uint8_t *msg, unsigned int length, PebbleCallInfo *info) { unsigned int msg_length = 0; - info->cookie = *((uint32_t*) msg); + info->cookie = *((uint32_t *)msg); msg += 4; msg_length += 4; uint8_t caller_number_size = *msg++; - memcpy(&info->caller_number, msg, - MIN(caller_number_size, sizeof(info->caller_number))); + memcpy(&info->caller_number, msg, MIN(caller_number_size, sizeof(info->caller_number))); msg += caller_number_size; msg_length += caller_number_size + 1; uint8_t caller_name_size = *msg++; - memcpy(&info->caller_name, msg, - MIN(caller_name_size, sizeof(info->caller_name))); + memcpy(&info->caller_name, msg, MIN(caller_name_size, sizeof(info->caller_name))); msg_length += caller_name_size + 1; // Ensure that we haven't run off the end of our buffer @@ -79,29 +75,28 @@ static bool get_call_info_from_msg(const uint8_t* msg, unsigned int length, static void prv_put_call_disconnect_event(void) { PebbleEvent e = { - .type = PEBBLE_PHONE_EVENT, - .phone = { - .type = PhoneEventType_Disconnect, - .source = PhoneCallSource_PP, - .call_identifier = 0, // Cookie is not yet implemented / used - } + .type = PEBBLE_PHONE_EVENT, + .phone = { + .type = PhoneEventType_Disconnect, + .source = PhoneCallSource_PP, + .call_identifier = 0, // Cookie is not yet implemented / used + } }; event_put(&e); } static void prv_put_call_end_event(void) { PebbleEvent e = { - .type = PEBBLE_PHONE_EVENT, - .phone = { - .type = PhoneEventType_End, - .source = PhoneCallSource_PP, - .call_identifier = 0, // Cookie is not yet implemented / used - } + .type = PEBBLE_PHONE_EVENT, + .phone = { + .type = PhoneEventType_End, + .source = PhoneCallSource_PP, + .call_identifier = 0, // Cookie is not yet implemented / used + } }; event_put(&e); } - static void prv_send_phone_command_to_handset(uint8_t cmd, uint8_t *data, unsigned length) { static uint8_t buffer[5]; PBL_ASSERTN(length <= sizeof(buffer) - sizeof(cmd)); @@ -116,17 +111,17 @@ static void prv_send_phone_command_to_handset(uint8_t cmd, uint8_t *data, unsign PBL_LOG_ERR("No CommSession for phone command, ending call"); prv_put_call_disconnect_event(); } else { - comm_session_send_data(session, PHONE_CTRL_ENDPOINT, buffer, - length + sizeof(cmd), COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(session, PHONE_CTRL_ENDPOINT, buffer, length + sizeof(cmd), + COMM_SESSION_DEFAULT_TIMEOUT); } } void pp_answer_call(uint32_t cookie) { - prv_send_phone_command_to_handset(PhoneCmdAnswer, (uint8_t*)&cookie, sizeof(cookie)); + prv_send_phone_command_to_handset(PhoneCmdAnswer, (uint8_t *)&cookie, sizeof(cookie)); } void pp_decline_call(uint32_t cookie) { - prv_send_phone_command_to_handset(PhoneCmdHangup, (uint8_t*)&cookie, sizeof(cookie)); + prv_send_phone_command_to_handset(PhoneCmdHangup, (uint8_t *)&cookie, sizeof(cookie)); } void pp_get_phone_state(void) { @@ -137,8 +132,8 @@ void pp_get_phone_state_set_enabled(bool enabled) { s_get_phone_state_enabled = enabled; } -static bool prv_parse_msg_to_event(const uint8_t *iter, size_t length, - PebbleEvent *event_out, bool is_state_response) { +static bool prv_parse_msg_to_event(const uint8_t *iter, size_t length, PebbleEvent *event_out, + bool is_state_response) { uint8_t msg_type = *iter++; --length; @@ -171,14 +166,14 @@ static bool prv_parse_msg_to_event(const uint8_t *iter, size_t length, case PhoneCmdStart: { type = PhoneEventType_Start; - call_info.cookie = *((uint32_t*) iter); + call_info.cookie = *((uint32_t *)iter); did_parse = true; break; } case PhoneCmdEnd: { type = PhoneEventType_End; - call_info.cookie = *((uint32_t*) iter); + call_info.cookie = *((uint32_t *)iter); did_parse = true; break; } @@ -199,14 +194,14 @@ static bool prv_parse_msg_to_event(const uint8_t *iter, size_t length, } if (did_parse) { - *event_out = (const PebbleEvent) { - .type = PEBBLE_PHONE_EVENT, - .phone = { - .type = type, - .source = PhoneCallSource_PP, - .call_identifier = call_info.cookie, - .caller = caller, - } + *event_out = (const PebbleEvent){ + .type = PEBBLE_PHONE_EVENT, + .phone = { + .type = type, + .source = PhoneCallSource_PP, + .call_identifier = call_info.cookie, + .caller = caller, + } }; } else { // Try to catch potentially malformed messages. @@ -225,7 +220,7 @@ static void prv_parse_msg_and_emit_event(const uint8_t *msg, size_t length, } } -void phone_protocol_msg_callback(CommSession *session, const uint8_t* iter, size_t length) { +void phone_protocol_msg_callback(CommSession *session, const uint8_t *iter, size_t length) { PBL_HEXDUMP(LOG_LEVEL_DEBUG, iter, length); // Get State Response is basically a list representing the state of current calls. It's diff --git a/src/fw/services/ping/service.c b/src/fw/services/ping/service.c index a8c7c54bb5..ddeab01ea4 100644 --- a/src/fw/services/ping/service.c +++ b/src/fw/services/ping/service.c @@ -18,16 +18,15 @@ PBL_LOG_MODULE_DEFINE(service_ping, CONFIG_SERVICE_PING_LOG_LEVEL); #define PING_ENDPOINT 2001 -#define PING_MIN_PERIOD_SECS (60 * 60) // 1 hour +#define PING_MIN_PERIOD_SECS (60 * 60) // 1 hour static time_t s_last_send_time; static bool s_is_ping_kernel_bg_callback_scheduled; - // --------------------------------------------------------------------------------------------------------- // Ping Pong structures typedef struct PACKED { - uint8_t cmd; + uint8_t cmd; uint32_t cookie; } PingMsgHeader; @@ -37,30 +36,22 @@ typedef struct PACKED { typedef struct PACKED { PingMsgHeader hdr; - uint8_t idle; // Optional + uint8_t idle; // Optional } PingMsgV2; typedef struct PACKED { PingMsgHeader hdr; } PongMsg; - static void prv_send_ping_kernel_bg_cb(void *unused) { CommSession *system_session = comm_session_get_system_session(); if (system_session) { // Are we idle? bool idle = (battery_is_usb_connected() || accel_is_idle()); - PingMsgV2 ping_msg = (PingMsgV2) { - .hdr = { - .cmd = 0, - .cookie = htonl(42) - }, - .idle = idle - }; - bool success = comm_session_send_data(system_session, PING_ENDPOINT, - (const uint8_t *) &ping_msg, sizeof(ping_msg), - COMM_SESSION_DEFAULT_TIMEOUT); + PingMsgV2 ping_msg = (PingMsgV2){.hdr = {.cmd = 0, .cookie = htonl(42)}, .idle = idle}; + bool success = comm_session_send_data(system_session, PING_ENDPOINT, (const uint8_t *)&ping_msg, + sizeof(ping_msg), COMM_SESSION_DEFAULT_TIMEOUT); if (success) { s_last_send_time = rtc_get_time(); } @@ -101,49 +92,44 @@ static void prv_push_window(void *data) { simple_dialog_push(s_dialog, stack); } -void ping_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length) { +void ping_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t length) { PingMsgV1 *ping = (PingMsgV1 *)data; switch (ping->hdr.cmd) { - case 0: - { - if (length != sizeof(PingMsgV1) && length != sizeof(PingMsgV2) /* idle boolean is optional */) { - PBL_LOG_ERR("Invalid Ping, l=%u", length); - return; - } - - // Ping message - uint32_t cookie = ntohl(ping->hdr.cookie); - PBL_LOG_DBG("Ping c=%"PRIu32"", cookie); - launcher_task_add_callback(prv_push_window, NULL); - - // Send the pong response - PongMsg pong = { - .hdr = { - .cmd = 1, - .cookie = htonl(cookie) + case 0: { + if (length != sizeof(PingMsgV1) && + length != sizeof(PingMsgV2) /* idle boolean is optional */) { + PBL_LOG_ERR("Invalid Ping, l=%u", length); + return; } - }; - comm_session_send_data(session, PING_ENDPOINT, (uint8_t *)&pong, sizeof(pong), COMM_SESSION_DEFAULT_TIMEOUT); - break; - } - case 1: - if (length != sizeof(PongMsg)) { - PBL_LOG_ERR("Invalid Pong, l=%u", length); - return; + // Ping message + uint32_t cookie = ntohl(ping->hdr.cookie); + PBL_LOG_DBG("Ping c=%" PRIu32 "", cookie); + launcher_task_add_callback(prv_push_window, NULL); + + // Send the pong response + PongMsg pong = {.hdr = {.cmd = 1, .cookie = htonl(cookie)}}; + comm_session_send_data(session, PING_ENDPOINT, (uint8_t *)&pong, sizeof(pong), + COMM_SESSION_DEFAULT_TIMEOUT); + break; } - PongMsg *pong = (PongMsg *)data; - PBL_LOG_DBG("Pong c=%"PRIu32, ntohl(pong->hdr.cookie)); - break; + case 1: + if (length != sizeof(PongMsg)) { + PBL_LOG_ERR("Invalid Pong, l=%u", length); + return; + } + + PongMsg *pong = (PongMsg *)data; + PBL_LOG_DBG("Pong c=%" PRIu32, ntohl(pong->hdr.cookie)); + break; - default: - PBL_LOG_ERR("Invalid message received. First byte is %u", ping->hdr.cmd); - break; + default: + PBL_LOG_ERR("Invalid message received. First byte is %u", ping->hdr.cmd); + break; } } - // Serial Commands ////////////////////////////////////////////////////////////////////// void command_ping_send(void) { @@ -151,4 +137,3 @@ void command_ping_send(void) { s_last_send_time = 0; ping_send_if_due(); } - diff --git a/src/fw/services/poll_remote/service.c b/src/fw/services/poll_remote/service.c index 2e978717a0..1cd9ddcd6c 100644 --- a/src/fw/services/poll_remote/service.c +++ b/src/fw/services/poll_remote/service.c @@ -20,8 +20,8 @@ static const uint16_t ENDPOINT_ID = 0xcafe; static bool s_running = false; typedef enum { - CMD_POLL = 0x0, // Formerly command poll mail - LEGACY_CMD_REQUEST_INTERVAL = 0x1, // for backwards compatibility + CMD_POLL = 0x0, // Formerly command poll mail + LEGACY_CMD_REQUEST_INTERVAL = 0x1, // for backwards compatibility CMD_SET_INTERVAL = 0x2, CMD_REQUEST_POLL = 0x3, } PollRemoteCommand; @@ -54,21 +54,22 @@ typedef struct PACKED { typedef struct { PollRemoteService service; //! The minimum interval between two "poll services" requests. - //! Calls to poll_remote_send_request() will be no-ops if min_interval_minutes has not been reached. + //! Calls to poll_remote_send_request() will be no-ops if min_interval_minutes has not been + //! reached. uint8_t min_interval_minutes; //! The maximum interval between two "poll services" requests. //! The automatic sending of poll requests will only occur when max_interval_minutes is reached. uint8_t max_interval_minutes; - uint8_t counted_minutes; //!< Number of minutes passed since the last request + uint8_t counted_minutes; //!< Number of minutes passed since the last request } PollRemoteContext; static void poll_service_timer_callback(); static RegularTimerInfo s_poll_timer = { - .cb = poll_service_timer_callback, - .cb_data = NULL, + .cb = poll_service_timer_callback, + .cb_data = NULL, }; static PollRemoteContext s_poll_remote_contexts[NUM_POLL_REMOTE_SERVICES]; @@ -99,10 +100,7 @@ static void prv_send_request(PollRemoteContext *ctx) { // [MT]: comm_session_send_data() doesn't make the link active, // which is what we want here. If this this changes in the future // we need to take measures here to make sure we don't pull the link active. - const PollRemoteMessage msg = { - .cmd = CMD_POLL, - .service = ctx->service - }; + const PollRemoteMessage msg = {.cmd = CMD_POLL, .service = ctx->service}; comm_session_send_data(session, ENDPOINT_ID, (const uint8_t *)&msg, sizeof(PollRemoteMessage), COMM_SESSION_DEFAULT_TIMEOUT); ctx->counted_minutes = 0; @@ -120,34 +118,40 @@ static void context_interval_check(PollRemoteContext *ctx) { } } - static void start(PollRemoteContext *ctx) { ctx->counted_minutes = 0; } -static void set_intervals(PollRemoteContext *ctx, const uint8_t min_interval_minutes, const uint8_t max_interval_minutes) { +static void set_intervals(PollRemoteContext *ctx, const uint8_t min_interval_minutes, + const uint8_t max_interval_minutes) { ctx->min_interval_minutes = min_interval_minutes; ctx->max_interval_minutes = max_interval_minutes; } -void comm_poll_remote_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length) { +void comm_poll_remote_protocol_msg_callback(CommSession *session, const uint8_t *data, + size_t length) { PollRemoteCommand cmd = data[0]; switch (cmd) { case CMD_REQUEST_POLL: { PollRequestMessage *msg = (PollRequestMessage *)data; - if (msg->service >= NUM_POLL_REMOTE_SERVICES) { return; } + if (msg->service >= NUM_POLL_REMOTE_SERVICES) { + return; + } prv_send_request(&s_poll_remote_contexts[msg->service]); break; } case LEGACY_CMD_REQUEST_INTERVAL: { PollLegacySetIntervalMessage *msg = (PollLegacySetIntervalMessage *)data; - poll_remote_set_intervals(POLL_REMOTE_SERVICE_MAIL, MIN_INTERVAL_MINUTES, msg->interval_minutes); + poll_remote_set_intervals(POLL_REMOTE_SERVICE_MAIL, MIN_INTERVAL_MINUTES, + msg->interval_minutes); break; } case CMD_SET_INTERVAL: { PollSetIntervalMessage *msg = (PollSetIntervalMessage *)data; - if (msg->service >= NUM_POLL_REMOTE_SERVICES) { return; } + if (msg->service >= NUM_POLL_REMOTE_SERVICES) { + return; + } poll_remote_set_intervals(msg->service, MIN_INTERVAL_MINUTES, msg->interval_minutes); break; } @@ -200,7 +204,8 @@ void poll_remote_stop(void) { regular_timer_remove_callback(&s_poll_timer); } -void poll_remote_set_intervals(PollRemoteService service, const uint8_t min_interval_minutes, const uint8_t max_interval_minutes) { +void poll_remote_set_intervals(PollRemoteService service, const uint8_t min_interval_minutes, + const uint8_t max_interval_minutes) { set_intervals(&s_poll_remote_contexts[service], min_interval_minutes, max_interval_minutes); (max_interval_minutes == 0) ? poll_remote_stop() : poll_remote_start(); } diff --git a/src/fw/services/prf_update/service.c b/src/fw/services/prf_update/service.c index e0fc76392b..2c27d430fb 100644 --- a/src/fw/services/prf_update/service.c +++ b/src/fw/services/prf_update/service.c @@ -31,10 +31,8 @@ static void prv_do_update(void) { const uint32_t total_length = description.description_length + description.firmware_length; #else - FirmwareHeader header = - firmware_storage_read_firmware_header(FLASH_REGION_FIRMWARE_DEST_BEGIN); - if (!firmware_storage_check_valid_firmware_header(FLASH_REGION_FIRMWARE_DEST_BEGIN, - &header)) { + FirmwareHeader header = firmware_storage_read_firmware_header(FLASH_REGION_FIRMWARE_DEST_BEGIN); + if (!firmware_storage_check_valid_firmware_header(FLASH_REGION_FIRMWARE_DEST_BEGIN, &header)) { PBL_LOG_WRN("Invalid recovery firmware CRC in SPI flash!"); goto done; } @@ -43,10 +41,9 @@ static void prv_do_update(void) { #endif PBL_LOG_DBG("Erasing previous PRF..."); - flash_region_erase_optimal_range(FLASH_REGION_SAFE_FIRMWARE_BEGIN, - FLASH_REGION_SAFE_FIRMWARE_BEGIN, - FLASH_REGION_SAFE_FIRMWARE_BEGIN + total_length, - FLASH_REGION_SAFE_FIRMWARE_END); + flash_region_erase_optimal_range( + FLASH_REGION_SAFE_FIRMWARE_BEGIN, FLASH_REGION_SAFE_FIRMWARE_BEGIN, + FLASH_REGION_SAFE_FIRMWARE_BEGIN + total_length, FLASH_REGION_SAFE_FIRMWARE_END); PBL_LOG_DBG("Copying PRF from scratch to the PRF slot"); uint8_t buffer[512]; diff --git a/src/fw/services/process_management/app_order_storage.c b/src/fw/services/process_management/app_order_storage.c index c6b9ab223b..5ce9f22214 100644 --- a/src/fw/services/process_management/app_order_storage.c +++ b/src/fw/services/process_management/app_order_storage.c @@ -78,8 +78,7 @@ AppMenuOrderStorage *app_order_read_order(void) { const int read_size = list_length * sizeof(AppInstallId); int rd_sz; if ((rd_sz = pfs_read(fd, (uint8_t *)storage->id_list, read_size)) != read_size) { - PBL_LOG_ERR("Corrupted ordered install_id list (Rd %d of %d bytes)", - rd_sz, read_size); + PBL_LOG_ERR("Corrupted ordered install_id list (Rd %d of %d bytes)", rd_sz, read_size); app_free(storage); storage = NULL; delete_file = true; @@ -153,19 +152,18 @@ int prv_uuid_search(const Uuid *find_me, const Uuid *uuid_list, uint8_t count) { // if an entry appears in the UUID list, place it's install_id in the correct index of // storage->id_list bool prv_enumerate_apps(AppInstallEntry *entry, void *data) { - UuidTranslateData *my_data = (UuidTranslateData *) data; + UuidTranslateData *my_data = (UuidTranslateData *)data; int idx = prv_uuid_search(&entry->uuid, my_data->uuid_list, my_data->count); if (idx < 0) { - return true; // continue iterating + return true; // continue iterating } my_data->storage->id_list[idx] = entry->install_id; - return true; // continue iterating + return true; // continue iterating } - //! Should be called on system task. void write_uuid_list_to_file(const Uuid *uuid_list, uint8_t count) { PBL_ASSERT_TASK(PebbleTask_KernelBackground); @@ -175,9 +173,9 @@ void write_uuid_list_to_file(const Uuid *uuid_list, uint8_t count) { memset(storage, 0, storage_size); UuidTranslateData data = { - .uuid_list = uuid_list, - .count = count, - .storage = storage, + .uuid_list = uuid_list, + .count = count, + .storage = storage, }; // go through all install entries diff --git a/src/fw/services/process_management/app_storage.c b/src/fw/services/process_management/app_storage.c index a430fe30d1..2f9f6a4057 100644 --- a/src/fw/services/process_management/app_storage.c +++ b/src/fw/services/process_management/app_storage.c @@ -23,18 +23,15 @@ PBL_LOG_MODULE_DECLARE(service_process_management, CONFIG_SERVICE_PROCESS_MANAGE // though there isn't enough memory for load more than 24k in practice on tintin. static const uint32_t APP_MAX_SIZE = 0x10000; -bool app_storage_get_process_load_size(const PebbleProcessInfo *info, - size_t *load_size_out) { +bool app_storage_get_process_load_size(const PebbleProcessInfo *info, size_t *load_size_out) { if (info->num_reloc_entries > (SIZE_MAX / sizeof(uint32_t))) { - PBL_LOG_WRN("App relocation table size overflows: entries=%"PRIu32, - info->num_reloc_entries); + PBL_LOG_WRN("App relocation table size overflows: entries=%" PRIu32, info->num_reloc_entries); return false; } const size_t reloc_size = info->num_reloc_entries * sizeof(uint32_t); if (info->load_size > (SIZE_MAX - reloc_size)) { - PBL_LOG_WRN("App load size overflows: load=%"PRIu16" reloc=%zu", - info->load_size, reloc_size); + PBL_LOG_WRN("App load size overflows: load=%" PRIu16 " reloc=%zu", info->load_size, reloc_size); return false; } @@ -42,9 +39,9 @@ bool app_storage_get_process_load_size(const PebbleProcessInfo *info, return true; } -AppStorageGetAppInfoResult app_storage_get_process_info(PebbleProcessInfo* app_info, - uint8_t *build_id_out, AppInstallId app_id, PebbleTask task_type) { - +AppStorageGetAppInfoResult app_storage_get_process_info(PebbleProcessInfo *app_info, + uint8_t *build_id_out, AppInstallId app_id, + PebbleTask task_type) { char process_name[APP_FILENAME_MAX_LENGTH]; app_storage_get_file_name(process_name, sizeof(process_name), app_id, task_type); int fd; @@ -59,10 +56,9 @@ AppStorageGetAppInfoResult app_storage_get_process_info(PebbleProcessInfo* app_i const uint8_t padding_size = sizeof(PebbleProcessInfo) % 4; // The note.gnu.build-id section seems to have a hard-coded word-alignment requirement... uint8_t note_buffer[BUILD_ID_TOTAL_EXPECTED_LEN + padding_size]; - const ElfExternalNote *note = (const ElfExternalNote *) (note_buffer + padding_size); + const ElfExternalNote *note = (const ElfExternalNote *)(note_buffer + padding_size); int result = pfs_read(fd, note_buffer, sizeof(note_buffer)); - if ((result == (int) sizeof(note_buffer)) && - build_id_contains_gnu_build_id(note)) { + if ((result == (int)sizeof(note_buffer)) && build_id_contains_gnu_build_id(note)) { memcpy(build_id_out, note->data + note->name_length, BUILD_ID_EXPECTED_LEN); } else { memset(build_id_out, 0, BUILD_ID_EXPECTED_LEN); @@ -81,8 +77,8 @@ AppStorageGetAppInfoResult app_storage_get_process_info(PebbleProcessInfo* app_i if (is_sdk_compatible == false) { PBL_LOG_WRN("App requires support for SDK version (%u.%u), we only support version (%u.%u).", - app_info->sdk_version.major, app_info->sdk_version.minor, - PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, PROCESS_INFO_CURRENT_SDK_VERSION_MINOR); + app_info->sdk_version.major, app_info->sdk_version.minor, + PROCESS_INFO_CURRENT_SDK_VERSION_MAJOR, PROCESS_INFO_CURRENT_SDK_VERSION_MINOR); // The app's is built with an SDK that is incompatible with the running fw return GET_APP_INFO_INCOMPATIBLE_SDK; @@ -129,10 +125,8 @@ bool app_storage_app_exists(AppInstallId id) { void app_storage_get_file_name(char *name, size_t buf_length, AppInstallId app_id, PebbleTask task) { - const char *task_str = (task == PebbleTask_App) ? APP_FILE_NAME_SUFFIX - : WORKER_FILE_NAME_SUFFIX; + const char *task_str = (task == PebbleTask_App) ? APP_FILE_NAME_SUFFIX : WORKER_FILE_NAME_SUFFIX; size_t task_str_len = - (task == PebbleTask_App) ? strlen(APP_FILE_NAME_SUFFIX) - : strlen(WORKER_FILE_NAME_SUFFIX); + (task == PebbleTask_App) ? strlen(APP_FILE_NAME_SUFFIX) : strlen(WORKER_FILE_NAME_SUFFIX); app_file_name_make(name, buf_length, app_id, task_str, task_str_len); } diff --git a/src/fw/services/process_management/process_commands.c b/src/fw/services/process_management/process_commands.c index c1a0d60fe0..4800d3d306 100644 --- a/src/fw/services/process_management/process_commands.c +++ b/src/fw/services/process_management/process_commands.c @@ -40,8 +40,8 @@ bool prv_print_app_info(AppInstallEntry *entry, void *data) { char uuid_buffer[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(&entry->uuid, uuid_buffer); - prompt_send_response_fmt(buffer, sizeof(buffer), "%"PRIi32": %s %s", entry->install_id, - entry->name, uuid_buffer); + prompt_send_response_fmt(buffer, sizeof(buffer), "%" PRIi32 ": %s %s", entry->install_id, + entry->name, uuid_buffer); return true; } @@ -60,7 +60,7 @@ void command_app_launch(const char *id_str) { bool success = app_install_get_entry_for_install_id(id, &entry); if (success) { - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { .id = id }); + app_manager_put_launch_app_event(&(AppLaunchEventConfig){.id = id}); prompt_send_response("OK"); } else { prompt_send_response("No app with id"); @@ -78,7 +78,7 @@ void command_worker_launch(const char *id_str) { bool success = app_install_get_entry_for_install_id(id, &entry); if (success && app_install_entry_has_worker(&entry)) { - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { .id = id }); + app_manager_put_launch_app_event(&(AppLaunchEventConfig){.id = id}); prompt_send_response("OK"); } else { prompt_send_response("No worker with id"); diff --git a/src/fw/services/process_management/process_loader_storage.c b/src/fw/services/process_management/process_loader_storage.c index 7f0b5441df..fa7f994b74 100644 --- a/src/fw/services/process_management/process_loader_storage.c +++ b/src/fw/services/process_management/process_loader_storage.c @@ -19,27 +19,26 @@ PBL_LOG_MODULE_DECLARE(service_process_management, CONFIG_SERVICE_PROCESS_MANAGEMENT_LOG_LEVEL); //! This comes from the generated pebble.auto.c with all the exported functions in it. -extern const void* const g_pbl_system_tbl[]; +extern const void *const g_pbl_system_tbl[]; // ---------------------------------------------------------------------------------------------- -static bool prv_verify_checksum(const PebbleProcessInfo* app_info, const uint8_t* data) { +static bool prv_verify_checksum(const PebbleProcessInfo *app_info, const uint8_t *data) { const size_t header_size = sizeof(PebbleProcessInfo); const uint8_t *crc_data = data + header_size; const uint32_t app_size = app_info->load_size - header_size; - uint32_t calculated_crc = legacy_defective_checksum_memory(crc_data, - app_size); + uint32_t calculated_crc = legacy_defective_checksum_memory(crc_data, app_size); if (app_info->crc != calculated_crc) { - PBL_LOG_WRN("Calculated App CRC is 0x%"PRIx32", expected 0x%"PRIx32"!", - calculated_crc, app_info->crc); + PBL_LOG_WRN("Calculated App CRC is 0x%" PRIx32 ", expected 0x%" PRIx32 "!", calculated_crc, + app_info->crc); return false; } else { return true; } } -static void * prv_offset_to_address(MemorySegment *segment, size_t offset) { +static void *prv_offset_to_address(MemorySegment *segment, size_t offset) { return (char *)segment->start + offset; } @@ -55,8 +54,7 @@ static bool prv_offset_is_halfword_aligned(size_t offset) { return ((offset & (sizeof(uint16_t) - 1)) == 0); } -static bool prv_validate_process_info(const PebbleProcessInfo *info, - MemorySegment *destination, +static bool prv_validate_process_info(const PebbleProcessInfo *info, MemorySegment *destination, size_t *load_size_out) { if (strncmp("PBLAPP", info->header, sizeof(info->header)) != 0) { PBL_LOG_WRN("Invalid app header"); @@ -74,25 +72,23 @@ static bool prv_validate_process_info(const PebbleProcessInfo *info, } if (image_size < header_size) { - PBL_LOG_WRN("App image smaller than header: image=%zu header=%zu", - image_size, header_size); + PBL_LOG_WRN("App image smaller than header: image=%zu header=%zu", image_size, header_size); return false; } if (image_size > virtual_size) { - PBL_LOG_WRN("App image exceeds virtual size: image=%zu virtual=%zu", - image_size, virtual_size); + PBL_LOG_WRN("App image exceeds virtual size: image=%zu virtual=%zu", image_size, virtual_size); return false; } if (virtual_size > segment_size) { - PBL_LOG_WRN("App virtual size exceeds segment: virtual=%zu segment=%zu", - virtual_size, segment_size); + PBL_LOG_WRN("App virtual size exceeds segment: virtual=%zu segment=%zu", virtual_size, + segment_size); return false; } if (load_size > segment_size) { - PBL_LOG_ERR("App/Worker exceeds available program space: %"PRIu16" + (%"PRIu32" * 4) = %zu", + PBL_LOG_ERR("App/Worker exceeds available program space: %" PRIu16 " + (%" PRIu32 " * 4) = %zu", info->load_size, info->num_reloc_entries, load_size); return false; } @@ -100,16 +96,14 @@ static bool prv_validate_process_info(const PebbleProcessInfo *info, if (!prv_offset_is_halfword_aligned(info->offset) || !prv_offset_range_fits(info->offset, sizeof(uint16_t), image_size) || (info->offset < header_size)) { - PBL_LOG_WRN("Invalid app entry point offset: 0x%"PRIx32, - info->offset); + PBL_LOG_WRN("Invalid app entry point offset: 0x%" PRIx32, info->offset); return false; } if (!prv_offset_is_word_aligned(info->sym_table_addr) || !prv_offset_range_fits(info->sym_table_addr, sizeof(uint32_t), virtual_size) || (info->sym_table_addr < header_size)) { - PBL_LOG_WRN("Invalid app jump table offset: 0x%"PRIx32, - info->sym_table_addr); + PBL_LOG_WRN("Invalid app jump table offset: 0x%" PRIx32, info->sym_table_addr); return false; } @@ -120,13 +114,13 @@ static bool prv_validate_process_info(const PebbleProcessInfo *info, static bool prv_process_info_matches_md(const PebbleProcessInfo *info, const PebbleProcessMd *app_md) { if (process_metadata_get_size_bytes(app_md) != info->virtual_size) { - PBL_LOG_WRN("App metadata virtual size mismatch: md=%"PRIu32" info=%"PRIu16, + PBL_LOG_WRN("App metadata virtual size mismatch: md=%" PRIu32 " info=%" PRIu16, process_metadata_get_size_bytes(app_md), info->virtual_size); return false; } if ((uint32_t)(uintptr_t)app_md->main_func != info->offset) { - PBL_LOG_WRN("App metadata entry point mismatch: md=0x%"PRIx32" info=0x%"PRIx32, + PBL_LOG_WRN("App metadata entry point mismatch: md=0x%" PRIx32 " info=0x%" PRIx32, (uint32_t)(uintptr_t)app_md->main_func, info->offset); return false; } @@ -143,8 +137,7 @@ static bool prv_verify_loaded_header(const PebbleProcessInfo *info, const uint8_ return false; } -static bool prv_apply_relocations(const PebbleProcessInfo *info, - MemorySegment *destination) { +static bool prv_apply_relocations(const PebbleProcessInfo *info, MemorySegment *destination) { // Relocation entries point to uint32_t slots in the loaded image // Slot values are still relative to the app image // Legacy SDK apps can have a non-word-aligned image size, which places the @@ -160,8 +153,7 @@ static bool prv_apply_relocations(const PebbleProcessInfo *info, memcpy(&reloc_offset, &reloc_table[i * sizeof(uint32_t)], sizeof(reloc_offset)); if (!prv_offset_range_fits(reloc_offset, sizeof(uint32_t), info->load_size) || (reloc_offset < sizeof(PebbleProcessInfo))) { - PBL_LOG_WRN("Invalid app relocation target[%"PRIu32"]: 0x%"PRIx32, - i, reloc_offset); + PBL_LOG_WRN("Invalid app relocation target[%" PRIu32 "]: 0x%" PRIx32, i, reloc_offset); return false; } @@ -171,8 +163,7 @@ static bool prv_apply_relocations(const PebbleProcessInfo *info, // One past the end of an object is a valid pointer in C, you just cannot deref it // A value of exactly virtual_size points there, which is safe here since we never do if (app_relative_value > info->virtual_size) { - PBL_LOG_WRN("Invalid app relocation value[%"PRIu32"]: 0x%"PRIx32, - i, app_relative_value); + PBL_LOG_WRN("Invalid app relocation value[%" PRIu32 "]: 0x%" PRIx32, i, app_relative_value); return false; } @@ -181,7 +172,8 @@ static bool prv_apply_relocations(const PebbleProcessInfo *info, memcpy(addr_to_change, &relocated_value, sizeof(relocated_value)); } - // The reloc table is loaded over the start of .bss, so we have to restore the zeros the app expects + // The reloc table is loaded over the start of .bss, so we have to restore the zeros the app + // expects if (info->num_reloc_entries != 0) { memset(reloc_table, 0, info->num_reloc_entries * sizeof(uint32_t)); } @@ -190,7 +182,7 @@ static bool prv_apply_relocations(const PebbleProcessInfo *info, // --------------------------------------------------------------------------------------------- static bool prv_initialize_sdk_process(PebbleTask task, const PebbleProcessInfo *info, - MemorySegment *destination) { + MemorySegment *destination) { if (!prv_verify_loaded_header(info, destination->start)) { return false; } @@ -255,12 +247,11 @@ static bool prv_load_from_flash(const PebbleProcessMd *app_md, PebbleTask task, } // ---------------------------------------------------------------------------------------------- -static bool prv_load_from_resource(const PebbleProcessMdResource *app_md, - PebbleTask task, +static bool prv_load_from_resource(const PebbleProcessMdResource *app_md, PebbleTask task, MemorySegment *destination) { PebbleProcessInfo info; PBL_ASSERTN(resource_load_byte_range_system(SYSTEM_APP, app_md->bin_resource_id, 0, - (uint8_t *)&info, sizeof(info)) == sizeof(info)); + (uint8_t *)&info, sizeof(info)) == sizeof(info)); // We load the full binary (.text + .data) into ram as well as the relocation entries. These // relocation entries will overlap with the .bss section of the loaded app, but we'll fix that @@ -273,15 +264,14 @@ static bool prv_load_from_resource(const PebbleProcessMdResource *app_md, // load the process from the resource PBL_ASSERTN(resource_load_byte_range_system(SYSTEM_APP, app_md->bin_resource_id, 0, - destination->start, load_size) == load_size); + destination->start, load_size) == load_size); // Process the relocation entries return prv_initialize_sdk_process(task, &info, destination); } -void * process_loader_load(const PebbleProcessMd *app_md, PebbleTask task, - MemorySegment *destination) { - +void *process_loader_load(const PebbleProcessMd *app_md, PebbleTask task, + MemorySegment *destination) { if (app_md->process_storage == ProcessStorageFlash) { if (!prv_load_from_flash(app_md, task, destination)) { return NULL; @@ -299,8 +289,7 @@ void * process_loader_load(const PebbleProcessMd *app_md, PebbleTask task, // memory segment is split only after loading completes. size_t loaded_size = process_metadata_get_size_bytes(app_md); if (loaded_size) { - void *main_func = prv_offset_to_address( - destination, (uintptr_t)app_md->main_func); + void *main_func = prv_offset_to_address(destination, (uintptr_t)app_md->main_func); if (!memory_segment_split(destination, NULL, loaded_size)) { return NULL; } diff --git a/src/fw/services/protobuf_log/protobuf_log.c b/src/fw/services/protobuf_log/protobuf_log.c index 8491d489f8..17809fc820 100644 --- a/src/fw/services/protobuf_log/protobuf_log.c +++ b/src/fw/services/protobuf_log/protobuf_log.c @@ -30,8 +30,7 @@ PBL_LOG_MODULE_DEFINE(service_protobuf_log, CONFIG_SERVICE_PROTOBUF_LOG_LOG_LEVEL); -#define PROTOBUF_LOG_DEBUG(fmt, args...) \ - PBL_LOG_D_DBG(LOG_DOMAIN_PROTOBUF, fmt, ## args) +#define PROTOBUF_LOG_DEBUG(fmt, args...) PBL_LOG_D_DBG(LOG_DOMAIN_PROTOBUF, fmt, ##args) #define MLOG_MAX_VARINT_ENCODED_SIZE 5 @@ -42,7 +41,6 @@ typedef struct PLogState { } PLogState; static PLogState s_plog_state; - // --------------------------------------------------------------------------------------- // Get the data logging session. Creating it if not already created static DataLoggingSession *prv_get_dls_session(void) { @@ -50,9 +48,8 @@ static DataLoggingSession *prv_get_dls_session(void) { const bool buffered = true; const bool resume = false; Uuid system_uuid = UUID_SYSTEM; - s_plog_state.dls_session = dls_create(DlsSystemTagProtobufLogSession, - DATA_LOGGING_BYTE_ARRAY, PLOG_DLS_RECORD_SIZE, buffered, - resume, &system_uuid); + s_plog_state.dls_session = dls_create(DlsSystemTagProtobufLogSession, DATA_LOGGING_BYTE_ARRAY, + PLOG_DLS_RECORD_SIZE, buffered, resume, &system_uuid); if (!s_plog_state.dls_session) { // This can happen when you are not connected to the phone and have rebooted a number of // times because each time you reboot, you get new sessions created and reach the limit @@ -64,7 +61,6 @@ static DataLoggingSession *prv_get_dls_session(void) { return s_plog_state.dls_session; } - // --------------------------------------------------------------------------------------------- // Our default transport, which sends the data over data logging static bool prv_dls_transport(uint8_t *buffer, size_t buf_size) { @@ -92,11 +88,10 @@ static bool prv_dls_transport(uint8_t *buffer, size_t buf_size) { return success; } - // ----------------------------------------------------------------------------------------- // Encode a struct `msg` with the field number and fields passed. static bool prv_encode_struct(pb_ostream_t *stream, uint32_t field_number, - const pb_msgdesc_t * fields, const void *msg) { + const pb_msgdesc_t *fields, const void *msg) { // Encode the field tag and data type if (!pb_encode_tag(stream, PB_WT_STRING, field_number)) { return false; @@ -104,14 +99,13 @@ static bool prv_encode_struct(pb_ostream_t *stream, uint32_t field_number, return pb_encode_submessage(stream, fields, msg); } - // ----------------------------------------------------------------------------------------- // Encode a payload containing the data blob passed in static bool prv_populate_payload(ProtobufLogConfig *config, size_t buffer_len, uint8_t *buffer, pb_ostream_t *stream) { PLogBufferEncoderArg ms_encoder_arg = { - .len = buffer_len, - .buffer = buffer, + .len = buffer_len, + .buffer = buffer, }; // Version and Patch @@ -123,26 +117,31 @@ static bool prv_populate_payload(ProtobufLogConfig *config, size_t buffer_len, u const char *watch_serial = mfg_get_serial_number(); pebble_pipeline_Payload payload = { - .sender = { - .type = { - .funcs.encode = protobuf_log_util_encode_string, - .arg = (void *)PLOG_PAYLOAD_SENDER_TYPE, - }, - .id = { - .funcs.encode = protobuf_log_util_encode_string, - .arg = (void *)watch_serial, - }, - .has_version = true, - .version = { - .major = v_major, - .minor = v_minor, - .patch = { - .funcs.encode = protobuf_log_util_encode_string, - .arg = (void *)version_patch_ptr, - }, - }, - }, - .send_time_utc = rtc_get_time(), + .sender = + { + .type = + { + .funcs.encode = protobuf_log_util_encode_string, + .arg = (void *)PLOG_PAYLOAD_SENDER_TYPE, + }, + .id = + { + .funcs.encode = protobuf_log_util_encode_string, + .arg = (void *)watch_serial, + }, + .has_version = true, + .version = + { + .major = v_major, + .minor = v_minor, + .patch = + { + .funcs.encode = protobuf_log_util_encode_string, + .arg = (void *)version_patch_ptr, + }, + }, + }, + .send_time_utc = rtc_get_time(), }; // NOTE: A Payload is the master protobuf struct that we send to the phone. @@ -157,9 +156,9 @@ static bool prv_populate_payload(ProtobufLogConfig *config, size_t buffer_len, u pb_write(stream, ms_encoder_arg.buffer, ms_encoder_arg.len); break; case ProtobufLogType_Measurements: - payload.measurement_sets = (pb_callback_t) { - .funcs.encode = protobuf_log_util_encode_buffer, - .arg = &ms_encoder_arg, + payload.measurement_sets = (pb_callback_t){ + .funcs.encode = protobuf_log_util_encode_buffer, + .arg = &ms_encoder_arg, }; break; } @@ -172,7 +171,6 @@ static bool prv_populate_payload(ProtobufLogConfig *config, size_t buffer_len, u return success; } - // ----------------------------------------------------------------------------------------- // Free all memory associated with a session static void prv_session_free(PLogSession *session) { @@ -181,7 +179,6 @@ static void prv_session_free(PLogSession *session) { kernel_free(session); } - bool protobuf_log_init(void) { pbl_mutex_init(&s_plog_state.mutex); return true; @@ -200,14 +197,13 @@ static size_t prv_session_extra_space_needed(const ProtobufLogConfig *config) { return 0; } - // --------------------------------------------------------------------------------------- // Starts/restarts a measurement session. static bool prv_session_measurement_encode_start(PLogSession *session) { const ProtobufLogConfig *config = &session->config; // Set the types pointer to the space allocated right after the PLogSession - ProtobufLogMeasurementType *types_copy = (ProtobufLogMeasurementType *) (session + 1); + ProtobufLogMeasurementType *types_copy = (ProtobufLogMeasurementType *)(session + 1); const size_t extra_space = prv_session_extra_space_needed(config); // Copy the types array directly after the Session bytes. memcpy(types_copy, config->measurements.types, extra_space); @@ -217,21 +213,22 @@ static bool prv_session_measurement_encode_start(PLogSession *session) { uuid_generate(&uuid); PLogTypesEncoderArg types_encoder_arg = { - .num_types = session->config.measurements.num_types, - .types = session->config.measurements.types, + .num_types = session->config.measurements.num_types, + .types = session->config.measurements.types, }; pebble_pipeline_MeasurementSet msg = { - .uuid = { - .funcs.encode = protobuf_log_util_encode_uuid, - .arg = &uuid, - }, - .time_utc = session->start_utc, - .utc_to_local = time_util_utc_to_local_offset(), - .types = { - .funcs.encode = protobuf_log_util_encode_measurement_types, - .arg = &types_encoder_arg, - }, + .uuid = + { + .funcs.encode = protobuf_log_util_encode_uuid, + .arg = &uuid, + }, + .time_utc = session->start_utc, + .utc_to_local = time_util_utc_to_local_offset(), + .types = { + .funcs.encode = protobuf_log_util_encode_measurement_types, + .arg = &types_encoder_arg, + }, }; return pb_encode(&session->data_stream, &pebble_pipeline_MeasurementSet_msg, &msg); @@ -272,9 +269,7 @@ static uint32_t prv_get_hdr_reserved_size(ProtobufLogConfig *config) { return substream.bytes_written + MLOG_MAX_VARINT_ENCODED_SIZE; } - -ProtobufLogRef protobuf_log_create(ProtobufLogConfig *config, - ProtobufLogTransportCB transport, +ProtobufLogRef protobuf_log_create(ProtobufLogConfig *config, ProtobufLogTransportCB transport, size_t max_msg_size) { // Error check the passed in max encoded message size PBL_ASSERTN(max_msg_size <= PLOG_DLS_RECORD_SIZE); @@ -297,13 +292,13 @@ ProtobufLogRef protobuf_log_create(ProtobufLogConfig *config, // Number of bytes that are needed to encode the payload structure // (not including the data blob) const uint32_t payload_hdr_size = prv_get_hdr_reserved_size(config); - PROTOBUF_LOG_DEBUG("Creating payload session with hdr size of %"PRIu32, payload_hdr_size); + PROTOBUF_LOG_DEBUG("Creating payload session with hdr size of %" PRIu32, payload_hdr_size); // Create a buffer for the encoded data blob. We form this first as the caller calls // protobuf_log_session_add_* repeatedly. Once it's filled up, we grab it as the // data blob portion of the payload that's formed in msg_buffer. uint32_t max_data_size = max_msg_size - payload_hdr_size - sizeof(PLogMessageHdr); - PROTOBUF_LOG_DEBUG("Max data buffer size: %"PRIu32, max_data_size); + PROTOBUF_LOG_DEBUG("Max data buffer size: %" PRIu32, max_data_size); uint8_t *data_buffer = kernel_zalloc(max_data_size); if (!data_buffer) { kernel_free(msg_buffer); @@ -320,13 +315,13 @@ ProtobufLogRef protobuf_log_create(ProtobufLogConfig *config, return NULL; } - *session = (PLogSession) { - .config = *config, - .msg_buffer = msg_buffer, - .data_buffer = data_buffer, - .max_msg_size = max_msg_size, - .max_data_size = max_data_size, - .transport = transport, + *session = (PLogSession){ + .config = *config, + .msg_buffer = msg_buffer, + .data_buffer = data_buffer, + .max_msg_size = max_msg_size, + .max_data_size = max_data_size, + .transport = transport, }; // Start a new encoding @@ -340,22 +335,20 @@ ProtobufLogRef protobuf_log_create(ProtobufLogConfig *config, return session; } - // --------------------------------------------------------------------------------------- // Sets the stream to PB_OSTREAM_SIZING and calculates the size of the protobuf structs -static uint32_t prv_get_encoded_struct_size(uint32_t field_number, const pb_msgdesc_t * fields, +static uint32_t prv_get_encoded_struct_size(uint32_t field_number, const pb_msgdesc_t *fields, const void *msg) { pb_ostream_t stream = PB_OSTREAM_SIZING; prv_encode_struct(&stream, field_number, fields, msg); return stream.bytes_written; } - // --------------------------------------------------------------------------------------- // Takes a generic protobuf struct, calculates the size, and writes it out to the internal buffer. // If it is full, flush then log it. -static bool prv_log_struct(PLogSession *session, uint32_t field_number, - const pb_msgdesc_t * fields, const void *msg) { +static bool prv_log_struct(PLogSession *session, uint32_t field_number, const pb_msgdesc_t *fields, + const void *msg) { // Calculate the size of our struct encoded on wire const uint32_t calc_size = prv_get_encoded_struct_size(field_number, fields, msg); // Calculate our data blob buffer size if we add this struct to it @@ -364,7 +357,7 @@ static bool prv_log_struct(PLogSession *session, uint32_t field_number, // If it fits, add it. If it doesn't, flush first. if (size_if_added > session->max_data_size) { // We would be over capacity if we added this message. Let's flush first. - PROTOBUF_LOG_DEBUG("Session: 0x%x - Would have been over limit at size %"PRIu32", flushing", + PROTOBUF_LOG_DEBUG("Session: 0x%x - Would have been over limit at size %" PRIu32 ", flushing", (int)session, size_if_added); protobuf_log_session_flush(session); } @@ -379,9 +372,8 @@ static bool prv_log_struct(PLogSession *session, uint32_t field_number, return true; } - bool protobuf_log_session_add_measurements(ProtobufLogRef session_ref, time_t sample_utc, - uint32_t num_values, uint32_t *values) { + uint32_t num_values, uint32_t *values) { PBL_ASSERTN(session_ref != NULL); PLogSession *session = (PLogSession *)session_ref; PBL_ASSERTN(session->config.type == ProtobufLogType_Measurements); @@ -391,30 +383,27 @@ bool protobuf_log_session_add_measurements(ProtobufLogRef session_ref, time_t sa // error check PBL_ASSERT(num_values == session->config.measurements.num_types, "Wrong number of values passed"); - PROTOBUF_LOG_DEBUG("Session: 0x%x - Adding measurement sample with %"PRIu32" values", + PROTOBUF_LOG_DEBUG("Session: 0x%x - Adding measurement sample with %" PRIu32 " values", (int)session_ref, num_values); // Encode the Measurement PLogPackedVarintsEncoderArg packed_varint_encoder_arg = { - .num_values = num_values, - .values = values, + .num_values = num_values, + .values = values, }; pebble_pipeline_Measurement msg = { - .offset_sec = offset_sec, - .data = { - .funcs.encode = protobuf_log_util_encode_packed_varints, - .arg = &packed_varint_encoder_arg, - }, + .offset_sec = offset_sec, + .data = { + .funcs.encode = protobuf_log_util_encode_packed_varints, + .arg = &packed_varint_encoder_arg, + }, }; - bool success = prv_log_struct(session, - pebble_pipeline_MeasurementSet_measurements_tag, - &pebble_pipeline_Measurement_msg, - &msg); + bool success = prv_log_struct(session, pebble_pipeline_MeasurementSet_measurements_tag, + &pebble_pipeline_Measurement_msg, &msg); return success; } - bool protobuf_log_session_add_event(ProtobufLogRef session_ref, pebble_pipeline_Event *event) { PBL_ASSERTN(session_ref != NULL); PLogSession *session = (PLogSession *)session_ref; @@ -429,21 +418,18 @@ bool protobuf_log_session_add_event(ProtobufLogRef session_ref, pebble_pipeline_ event->created_time_utc = rtc_get_time(); event->has_created_time_utc = true; event->utc_to_local = time_util_utc_to_local_offset(); - event->uuid = (pb_callback_t) { - .funcs.encode = protobuf_log_util_encode_uuid, - .arg = &uuid, + event->uuid = (pb_callback_t){ + .funcs.encode = protobuf_log_util_encode_uuid, + .arg = &uuid, }; PROTOBUF_LOG_DEBUG("Session: 0x%x - Adding event with type: %d", (int)session_ref, event->type); - bool success = prv_log_struct(session, - pebble_pipeline_Payload_events_tag, - &pebble_pipeline_Event_msg, - event); + bool success = prv_log_struct(session, pebble_pipeline_Payload_events_tag, + &pebble_pipeline_Event_msg, event); return success; } - bool protobuf_log_session_flush(ProtobufLogRef session_ref) { PBL_ASSERTN(session_ref != NULL); PLogSession *session = (PLogSession *)session_ref; @@ -451,8 +437,8 @@ bool protobuf_log_session_flush(ProtobufLogRef session_ref) { // Encode the buffer into a Payload const size_t hdr_size = sizeof(PLogMessageHdr); - pb_ostream_t stream = pb_ostream_from_buffer(session->msg_buffer + hdr_size, - session->max_msg_size - hdr_size); + pb_ostream_t stream = + pb_ostream_from_buffer(session->msg_buffer + hdr_size, session->max_msg_size - hdr_size); bool success = prv_populate_payload(&session->config, session->data_stream.bytes_written, session->data_buffer, &stream); @@ -463,8 +449,8 @@ bool protobuf_log_session_flush(ProtobufLogRef session_ref) { // Fill in the message header now PLogMessageHdr *hdr = (PLogMessageHdr *)session->msg_buffer; - *hdr = (PLogMessageHdr) { - .msg_size = stream.bytes_written, + *hdr = (PLogMessageHdr){ + .msg_size = stream.bytes_written, }; // Send it out now @@ -482,7 +468,6 @@ bool protobuf_log_session_flush(ProtobufLogRef session_ref) { return (success && encode_success); } - bool protobuf_log_session_delete(ProtobufLogRef session_ref) { PROTOBUF_LOG_DEBUG("Session: 0x%x - Deleting", (int)session_ref); diff --git a/src/fw/services/protobuf_log/protobuf_log_activity_sessions.c b/src/fw/services/protobuf_log/protobuf_log_activity_sessions.c index 4a80e488cf..26327edd6c 100644 --- a/src/fw/services/protobuf_log/protobuf_log_activity_sessions.c +++ b/src/fw/services/protobuf_log/protobuf_log_activity_sessions.c @@ -12,7 +12,6 @@ #include - // ----------------------------------------------------------------------------------------- // Convert ActivitySessionType to the internal protobuf representation. static ActivitySessionType prv_proto_type_to_activity_type(ProtobufLogActivityType type) { @@ -84,10 +83,7 @@ static bool prv_encode_intervals(pb_ostream_t *stream, const pb_field_t *field, */ ProtobufLogRef protobuf_log_activity_sessions_create(void) { - ProtobufLogConfig log_config = { - .type = ProtobufLogType_Events, - .events = {} - }; + ProtobufLogConfig log_config = {.type = ProtobufLogType_Events, .events = {}}; return protobuf_log_create(&log_config, NULL /*transport*/, 0 /*max_encoded_msg_size*/); } @@ -127,11 +123,11 @@ bool protobuf_log_activity_sessions_decode(pebble_pipeline_Event *event_in, ActivitySession *session_out) { pebble_pipeline_ActivitySession *activity = &event_in->activity_session; - *session_out = (ActivitySession) { - .start_utc = event_in->time_utc, - .type = prv_proto_type_to_activity_type(activity->type.type.internal_type), - .length_min = event_in->duration, - .manual = (activity->start_reason == pebble_pipeline_ActivitySession_StartReason_Manual), + *session_out = (ActivitySession){ + .start_utc = event_in->time_utc, + .type = prv_proto_type_to_activity_type(activity->type.type.internal_type), + .length_min = event_in->duration, + .manual = (activity->start_reason == pebble_pipeline_ActivitySession_StartReason_Manual), }; return true; diff --git a/src/fw/services/protobuf_log/protobuf_log_hr.c b/src/fw/services/protobuf_log/protobuf_log_hr.c index ba69f0ec2d..a23e5e879e 100644 --- a/src/fw/services/protobuf_log/protobuf_log_hr.c +++ b/src/fw/services/protobuf_log/protobuf_log_hr.c @@ -31,23 +31,23 @@ T_STATIC uint32_t prv_hr_quality_int(HRMQuality quality) { case HRMQuality_Excellent: return pebble_pipeline_MeasurementSet_HeartRateQuality_Excellent; } - WTF; // Should never get here + WTF; // Should never get here return 0; } ProtobufLogRef protobuf_log_hr_create(ProtobufLogTransportCB transport) { // Create a measure log session, which we use to send heart rate readings to the phone ProtobufLogMeasurementType measure_types[] = { - ProtobufLogMeasurementType_BPM, - ProtobufLogMeasurementType_HRQuality, + ProtobufLogMeasurementType_BPM, + ProtobufLogMeasurementType_HRQuality, }; ProtobufLogConfig log_config = { - .type = ProtobufLogType_Measurements, - .measurements = { - .types = measure_types, - .num_types = ARRAY_LENGTH(measure_types), - }, + .type = ProtobufLogType_Measurements, + .measurements = { + .types = measure_types, + .num_types = ARRAY_LENGTH(measure_types), + }, }; return protobuf_log_create(&log_config, transport, 0 /*max_encoded_msg_size*/); diff --git a/src/fw/services/protobuf_log/protobuf_log_test.c b/src/fw/services/protobuf_log/protobuf_log_test.c index 7e46162bb2..a018059602 100644 --- a/src/fw/services/protobuf_log/protobuf_log_test.c +++ b/src/fw/services/protobuf_log/protobuf_log_test.c @@ -44,7 +44,6 @@ static bool prv_decode_types(pb_istream_t *stream, const pb_field_t *field, void return success; } - typedef struct PLogMeasurementsDecoderArg { uint32_t max_num_samples; uint32_t *num_samples; @@ -72,17 +71,16 @@ static bool prv_decode_packed_measurement_data(pb_istream_t *stream, const pb_fi return true; } - // ----------------------------------------------------------------------------------------- // Callback used to decode measurements. Called once for each measurement static bool prv_decode_measurements(pb_istream_t *stream, const pb_field_t *field, void **arg) { PLogMeasurementsDecoderArg *decoder_info = *(PLogMeasurementsDecoderArg **)arg; pebble_pipeline_Measurement msg = { - .data = { - .funcs.decode = prv_decode_packed_measurement_data, - .arg = decoder_info, - } + .data = { + .funcs.decode = prv_decode_packed_measurement_data, + .arg = decoder_info, + } }; if (!pb_decode(stream, pebble_pipeline_Measurement_fields, &msg)) { @@ -103,25 +101,26 @@ typedef struct PLogMeasurementSetDecoderArg { int32_t *utc_to_local; } PLogMeasurementSetDecoderArg; - // ----------------------------------------------------------------------------------------- // Callback used to decode a MeasurementSet. Called once for each MeasurementSet static bool prv_decode_measurement_set(pb_istream_t *stream, const pb_field_t *field, void **arg) { PLogMeasurementSetDecoderArg *decoder_info = *(PLogMeasurementSetDecoderArg **)arg; pebble_pipeline_MeasurementSet mset = { - .uuid = { - .funcs.decode = prv_decode_uuid, - .arg = decoder_info->uuid, - }, - .types = { - .funcs.decode = prv_decode_types, - .arg = decoder_info->types_decoder_arg, - }, - .measurements = { - .funcs.decode = prv_decode_measurements, - .arg = decoder_info->measurements_decoder_arg, - }, + .uuid = + { + .funcs.decode = prv_decode_uuid, + .arg = decoder_info->uuid, + }, + .types = + { + .funcs.decode = prv_decode_types, + .arg = decoder_info->types_decoder_arg, + }, + .measurements = { + .funcs.decode = prv_decode_measurements, + .arg = decoder_info->measurements_decoder_arg, + }, }; bool success = pb_decode(stream, pebble_pipeline_MeasurementSet_fields, &mset); @@ -131,7 +130,6 @@ static bool prv_decode_measurement_set(pb_istream_t *stream, const pb_field_t *f return success; } - typedef struct PLogEventsDecoderArg { uint32_t max_num_events; uint32_t *num_events; @@ -142,8 +140,6 @@ typedef struct PLogEventsDecoderArg { ActivitySession *sessions; } PLogEventsDecoderArg; - - // ----------------------------------------------------------------------------------------- // Callback used to decode a pebble_pipeline_Event. Called once for each Event static bool prv_decode_events(pb_istream_t *stream, const pb_field_t *field, void **arg) { @@ -153,10 +149,10 @@ static bool prv_decode_events(pb_istream_t *stream, const pb_field_t *field, voi bool success; pebble_pipeline_Event event = { - .uuid = { - .funcs.decode = prv_decode_uuid, - .arg = &decoder_info->event_uuids[event_idx], - }, + .uuid = { + .funcs.decode = prv_decode_uuid, + .arg = &decoder_info->event_uuids[event_idx], + }, }; success = pb_decode(stream, pebble_pipeline_Event_fields, &event); @@ -172,9 +168,6 @@ static bool prv_decode_events(pb_istream_t *stream, const pb_field_t *field, voi return true; } - - - // ----------------------------------------------------------------------------------------- // Callback used to decode the payload sender type static bool prv_decode_sender_type(pb_istream_t *stream, const pb_field_t *field, void **arg) { @@ -208,25 +201,15 @@ static bool prv_decode_sender_version_patch(pb_istream_t *stream, const pb_field // --------------------------------------------------------------------------------------------- // Decode an encoded message. Used for debugging and unit tests. -bool protobuf_log_private_mset_decode(ProtobufLogType *type, - void *encoded_buf, - uint32_t encoded_buf_size, - char payload_sender_type[PLOG_MAX_SENDER_TYPE_LEN], - char payload_sender_id[PLOG_MAX_SENDER_ID_LEN], - char payload_sender_version_patch[FW_METADATA_VERSION_TAG_BYTES], - uint32_t *payload_send_time, - uint32_t *payload_sender_v_major, - uint32_t *payload_sender_v_minor, - Uuid *uuid, - uint32_t *time_utc, - uint32_t *time_end_utc, - int32_t *utc_to_local, - uint32_t *num_types, - ProtobufLogMeasurementType *types, - uint32_t *num_samples, - uint32_t *offset_sec, - uint32_t *num_values, - uint32_t *values) { +bool protobuf_log_private_mset_decode( + ProtobufLogType *type, void *encoded_buf, uint32_t encoded_buf_size, + char payload_sender_type[PLOG_MAX_SENDER_TYPE_LEN], + char payload_sender_id[PLOG_MAX_SENDER_ID_LEN], + char payload_sender_version_patch[FW_METADATA_VERSION_TAG_BYTES], uint32_t *payload_send_time, + uint32_t *payload_sender_v_major, uint32_t *payload_sender_v_minor, Uuid *uuid, + uint32_t *time_utc, uint32_t *time_end_utc, int32_t *utc_to_local, uint32_t *num_types, + ProtobufLogMeasurementType *types, uint32_t *num_samples, uint32_t *offset_sec, + uint32_t *num_values, uint32_t *values) { pb_istream_t stream = pb_istream_from_buffer(encoded_buf, encoded_buf_size); const uint32_t max_num_types = *num_types; @@ -238,50 +221,55 @@ bool protobuf_log_private_mset_decode(ProtobufLogType *type, *num_types = 0; PLogTypesDecoderArg types_decoder_arg = { - .max_num_types = max_num_types, - .num_types = num_types, - .types = types, + .max_num_types = max_num_types, + .num_types = num_types, + .types = types, }; PLogMeasurementsDecoderArg measurements_decoder_arg = { - .max_num_samples = max_num_samples, - .num_samples = num_samples, - .offset_sec = offset_sec, - .max_num_values = max_num_values, - .num_values = num_values, - .values = values, + .max_num_samples = max_num_samples, + .num_samples = num_samples, + .offset_sec = offset_sec, + .max_num_values = max_num_values, + .num_values = num_values, + .values = values, }; PLogMeasurementSetDecoderArg mset_decoder_arg = { - .uuid = uuid, - .types_decoder_arg = &types_decoder_arg, - .measurements_decoder_arg = &measurements_decoder_arg, - .time_utc = time_utc, - .time_end_utc = time_end_utc, - .utc_to_local = utc_to_local, + .uuid = uuid, + .types_decoder_arg = &types_decoder_arg, + .measurements_decoder_arg = &measurements_decoder_arg, + .time_utc = time_utc, + .time_end_utc = time_end_utc, + .utc_to_local = utc_to_local, }; pebble_pipeline_Payload payload = { - .sender = { - .type = { - .funcs.decode = prv_decode_sender_type, - .arg = payload_sender_type, - }, - .id = { - .funcs.decode = prv_decode_sender_id, - .arg = payload_sender_id, - }, - .version = { - .patch = { - .funcs.decode = prv_decode_sender_version_patch, - .arg = payload_sender_version_patch, - }, - }, - }, - .measurement_sets = { - .funcs.decode = prv_decode_measurement_set, - .arg = &mset_decoder_arg, - } + .sender = + { + .type = + { + .funcs.decode = prv_decode_sender_type, + .arg = payload_sender_type, + }, + .id = + { + .funcs.decode = prv_decode_sender_id, + .arg = payload_sender_id, + }, + .version = + { + .patch = + { + .funcs.decode = prv_decode_sender_version_patch, + .arg = payload_sender_version_patch, + }, + }, + }, + .measurement_sets = { + .funcs.decode = prv_decode_measurement_set, + .arg = &mset_decoder_arg, + } }; bool success = pb_decode(&stream, pebble_pipeline_Payload_fields, &payload); @@ -295,20 +283,14 @@ bool protobuf_log_private_mset_decode(ProtobufLogType *type, } // --------------------------------------------------------------------------------------------- -bool protobuf_log_private_events_decode(ProtobufLogType *type, - void *encoded_buf, - uint32_t encoded_buf_size, - char payload_sender_type[PLOG_MAX_SENDER_TYPE_LEN], - char payload_sender_id[PLOG_MAX_SENDER_ID_LEN], - char payload_sender_version_patch[FW_METADATA_VERSION_TAG_BYTES], - uint32_t *payload_send_time, - uint32_t *payload_sender_v_major, - uint32_t *payload_sender_v_minor, - uint32_t *num_events, - pebble_pipeline_Event *events, - Uuid *event_uuids, - uint32_t *num_sessions, - ActivitySession *sessions) { +bool protobuf_log_private_events_decode( + ProtobufLogType *type, void *encoded_buf, uint32_t encoded_buf_size, + char payload_sender_type[PLOG_MAX_SENDER_TYPE_LEN], + char payload_sender_id[PLOG_MAX_SENDER_ID_LEN], + char payload_sender_version_patch[FW_METADATA_VERSION_TAG_BYTES], uint32_t *payload_send_time, + uint32_t *payload_sender_v_major, uint32_t *payload_sender_v_minor, uint32_t *num_events, + pebble_pipeline_Event *events, Uuid *event_uuids, uint32_t *num_sessions, + ActivitySession *sessions) { pb_istream_t stream = pb_istream_from_buffer(encoded_buf, encoded_buf_size); const uint32_t max_num_events = *num_events; @@ -318,36 +300,38 @@ bool protobuf_log_private_events_decode(ProtobufLogType *type, *num_sessions = 0; PLogEventsDecoderArg event_arg = { - .max_num_events = max_num_events, - .num_events = num_events, - .events = events, - .event_uuids = event_uuids, - .max_num_sessions = max_num_sessions, - .num_sessions = num_sessions, - .sessions = sessions, + .max_num_events = max_num_events, + .num_events = num_events, + .events = events, + .event_uuids = event_uuids, + .max_num_sessions = max_num_sessions, + .num_sessions = num_sessions, + .sessions = sessions, }; pebble_pipeline_Payload payload = { - .sender = { - .type = { - .funcs.decode = prv_decode_sender_type, - .arg = payload_sender_type, - }, - .id = { - .funcs.decode = prv_decode_sender_id, - .arg = payload_sender_id, - }, - .version = { - .patch = { - .funcs.decode = prv_decode_sender_version_patch, - .arg = payload_sender_version_patch, - }, - }, - }, - .events = { - .funcs.decode = prv_decode_events, - .arg = &event_arg - } + .sender = + { + .type = + { + .funcs.decode = prv_decode_sender_type, + .arg = payload_sender_type, + }, + .id = + { + .funcs.decode = prv_decode_sender_id, + .arg = payload_sender_id, + }, + .version = + { + .patch = + { + .funcs.decode = prv_decode_sender_version_patch, + .arg = payload_sender_version_patch, + }, + }, + }, + .events = {.funcs.decode = prv_decode_events, .arg = &event_arg} }; bool success = pb_decode(&stream, pebble_pipeline_Payload_fields, &payload); diff --git a/src/fw/services/protobuf_log/protobuf_log_util.c b/src/fw/services/protobuf_log/protobuf_log_util.c index 880faca88b..bac2b16f95 100644 --- a/src/fw/services/protobuf_log/protobuf_log_util.c +++ b/src/fw/services/protobuf_log/protobuf_log_util.c @@ -8,10 +8,8 @@ #include - - bool protobuf_log_util_encode_uuid(pb_ostream_t *stream, const pb_field_t *field, - void * const *arg) { + void *const *arg) { if (!pb_encode_tag_for_field(stream, field)) { return false; } @@ -20,7 +18,7 @@ bool protobuf_log_util_encode_uuid(pb_ostream_t *stream, const pb_field_t *field } bool protobuf_log_util_encode_string(pb_ostream_t *stream, const pb_field_t *field, - void * const *arg) { + void *const *arg) { if (!pb_encode_tag_for_field(stream, field)) { return false; } @@ -30,7 +28,7 @@ bool protobuf_log_util_encode_string(pb_ostream_t *stream, const pb_field_t *fie } bool protobuf_log_util_encode_packed_varints(pb_ostream_t *stream, const pb_field_t *field, - void * const *arg) { + void *const *arg) { PLogPackedVarintsEncoderArg *encoder_arg = *(PLogPackedVarintsEncoderArg **)arg; // We need to figure out the size of the packed array of varints first @@ -69,7 +67,7 @@ bool protobuf_log_util_encode_packed_varints(pb_ostream_t *stream, const pb_fiel } bool protobuf_log_util_encode_measurement_types(pb_ostream_t *stream, const pb_field_t *field, - void * const *arg) { + void *const *arg) { PLogTypesEncoderArg *encoder_arg = *(PLogTypesEncoderArg **)arg; for (unsigned i = 0; i < encoder_arg->num_types; i++) { if (!pb_encode_tag_for_field(stream, field)) { @@ -83,7 +81,7 @@ bool protobuf_log_util_encode_measurement_types(pb_ostream_t *stream, const pb_f } bool protobuf_log_util_encode_buffer(pb_ostream_t *stream, const pb_field_t *field, - void * const *arg) { + void *const *arg) { PLogBufferEncoderArg *encoder_arg = *(PLogBufferEncoderArg **)arg; if (!pb_encode_tag_for_field(stream, field)) { return false; diff --git a/src/fw/services/put_bytes/put_bytes.c b/src/fw/services/put_bytes/put_bytes.c index 21189224bb..9564e8b7f2 100644 --- a/src/fw/services/put_bytes/put_bytes.c +++ b/src/fw/services/put_bytes/put_bytes.c @@ -48,13 +48,13 @@ typedef struct PACKED { } InitRequestExtraInfo; typedef struct PACKED { - PutBytesCommand cmd:8; + PutBytesCommand cmd : 8; uint32_t total_size; - PutBytesObjectType type:7; - bool has_cookie:1; + PutBytesObjectType type : 7; + bool has_cookie : 1; union { struct { - const uint8_t index; ///< The 0-indexed position for 'banked' objects. + const uint8_t index; ///< The 0-indexed position for 'banked' objects. char filename[]; }; uint32_t cookie; @@ -65,7 +65,7 @@ typedef struct PACKED { } InitRequest; typedef struct PACKED { - PutBytesCommand cmd:8; + PutBytesCommand cmd : 8; uint32_t token; } SharedHeader; @@ -208,7 +208,7 @@ static uint8_t *prv_get_next_pb_job_buffer(void) { } if (jobs_pending == put_jobs->num_allocated_pb_jobs) { - return NULL; // Remote has sent data without us ACKing the previous payload! + return NULL; // Remote has sent data without us ACKing the previous payload! } return put_jobs->job[write_idx].buffer; @@ -222,8 +222,8 @@ static void prv_finalize_pb_job(void) { prv_lock_pb_job_state(); { PBL_ASSERTN(put_jobs->num_ops_pending != put_jobs->num_allocated_pb_jobs); - uint8_t write_idx = (put_jobs->read_idx + put_jobs->num_ops_pending) % - put_jobs->num_allocated_pb_jobs; + uint8_t write_idx = + (put_jobs->read_idx + put_jobs->num_ops_pending) % put_jobs->num_allocated_pb_jobs; job = &put_jobs->job[write_idx]; job->request_length = s_pb_state.receiver.length; put_jobs->num_ops_pending++; @@ -289,13 +289,14 @@ static bool prv_init_put_job_queue_if_necessary(void) { for (i = 0; i < MAX_BATCHED_PB_PUT_OPS; i++) { // Note: If heap pressure becomes an issue, we could also consider only // using pre-acking if there is a certain amount of space free in the heap - uint8_t *buffer = (uint8_t *) kernel_zalloc(PUT_BYTES_PP_BUFFER_SIZE); + uint8_t *buffer = (uint8_t *)kernel_zalloc(PUT_BYTES_PP_BUFFER_SIZE); if (!buffer) { if (i == 0) { PBL_LOG_ERR("Not enough memory to service PB request, abort!"); prv_deinit_put_job_queue(); return false; - } if (i == 1) { + } + if (i == 1) { PBL_LOG_DBG("Not enough memory for PB pre-ack, falling back to legacy mode"); put_jobs->enable_preack = false; break; @@ -310,8 +311,8 @@ static bool prv_init_put_job_queue_if_necessary(void) { } static void prv_set_responsiveness(ResponseTimeState state, uint16_t timeout_secs) { - comm_session_set_responsiveness(comm_session_get_system_session(), - BtConsumerPpPutBytes, state, timeout_secs); + comm_session_set_responsiveness(comm_session_get_system_session(), BtConsumerPpPutBytes, state, + timeout_secs); } static void prv_send_nack_from_system_task(void *data) { @@ -328,10 +329,10 @@ static void prv_add_nack_no_token_system_callback(void) { } static void prv_cleanup(void) { - PBL_LOG_DBG("Put bytes cleanup. Tok: %"PRIu32, s_pb_state.token); + PBL_LOG_DBG("Put bytes cleanup. Tok: %" PRIu32, s_pb_state.token); prv_deinit_put_job_queue(); - s_pb_state.receiver = (__typeof__(s_pb_state.receiver)) {}; + s_pb_state.receiver = (__typeof__(s_pb_state.receiver)){}; if (s_pb_state.timer_id) { new_timer_delete(s_pb_state.timer_id); @@ -349,15 +350,15 @@ static void prv_cleanup(void) { prv_set_responsiveness(ResponseTimeMin, 10); PebbleEvent event = { - .type = PEBBLE_PUT_BYTES_EVENT, - .put_bytes = { - .type = PebblePutBytesEventTypeCleanup, - .object_type = s_pb_state.type, - .has_cookie = s_pb_state.has_cookie, - .progress_percent = 0, - .total_size = s_pb_state.total_size, - .failed = !s_pb_state.is_success, - }, + .type = PEBBLE_PUT_BYTES_EVENT, + .put_bytes = { + .type = PebblePutBytesEventTypeCleanup, + .object_type = s_pb_state.type, + .has_cookie = s_pb_state.has_cookie, + .progress_percent = 0, + .total_size = s_pb_state.total_size, + .failed = !s_pb_state.is_success, + }, }; event_put(&event); @@ -365,12 +366,10 @@ static void prv_cleanup(void) { // NOTE: Preserve the type field because that is checked by the install handler after we // cleanup (cleanup is called after a commit). PutBytesObjectType type = s_pb_state.type; - s_pb_state = (PutBytesState) { - .type = type - }; + s_pb_state = (PutBytesState){.type = type}; } -static void prv_cleanup_from_system_task(void* data) { +static void prv_cleanup_from_system_task(void *data) { pbl_sem_take(&s_pb_semaphore, PBL_FOREVER); prv_cleanup(); pbl_sem_give(&s_pb_semaphore); @@ -385,32 +384,30 @@ static void prv_fail(uint32_t token) { prv_add_nack_system_callback(token); } -static void prv_timer_callback(void* data) { - PBL_LOG_WRN("Put bytes Tok: %"PRIu32" timed out after %"PRIu32"ms, cleaning up.", - s_pb_state.token, PUT_TIMEOUT_MS); +static void prv_timer_callback(void *data) { + PBL_LOG_WRN("Put bytes Tok: %" PRIu32 " timed out after %" PRIu32 "ms, cleaning up.", + s_pb_state.token, PUT_TIMEOUT_MS); prv_cleanup_async(); } static bool prv_has_valid_fw_update_state_for_object_type(PutBytesObjectType type) { #ifndef CONFIG_RECOVERY_FW if (!firmware_update_is_in_progress()) { - bool is_fw_update_object = (type == ObjectFirmware || - type == ObjectRecovery || - type == ObjectSysResources); + bool is_fw_update_object = + (type == ObjectFirmware || type == ObjectRecovery || type == ObjectSysResources); if (is_fw_update_object) { PBL_LOG_ERR("Cannot handle object type=<0x%x> when not in FW update mode", type); return false; } } return true; -#else // safe mode FW +#else // safe mode FW return true; #endif } static bool prv_has_invalid_fw_update_state(const PutBytesCommand command) { - if (command == PutBytesAbort || - command == PutBytesInit) { + if (command == PutBytesAbort || command == PutBytesInit) { return false; } // Check only for Put, Commit, Install @@ -425,13 +422,10 @@ static void prv_send_response(ResponseCode code, uint32_t token) { struct { uint8_t response_code; uint32_t token; - } PACKED msg = { - .response_code = code, - .token = htonl(token) - }; + } PACKED msg = {.response_code = code, .token = htonl(token)}; bool success = comm_session_send_data(comm_session_get_system_session(), PB_ENDPOINT_ID, - (uint8_t*) &msg, sizeof(msg), COMM_SESSION_DEFAULT_TIMEOUT); + (uint8_t *)&msg, sizeof(msg), COMM_SESSION_DEFAULT_TIMEOUT); if (!success) { PBL_LOG_WRN("PutBytes timeout sending response"); } @@ -450,9 +444,9 @@ static void prv_commit_object(uint32_t crc) { #ifndef CONFIG_PBLBOOT if (s_pb_state.type == ObjectFirmware || s_pb_state.type == ObjectRecovery) { FirmwareDescription fw_descr = { - .description_length = sizeof(FirmwareDescription), - .firmware_length = s_pb_state.total_size + s_pb_state.append_offset, - .checksum = crc + .description_length = sizeof(FirmwareDescription), + .firmware_length = s_pb_state.total_size + s_pb_state.append_offset, + .checksum = crc }; fw_descr.checksum = pb_storage_calculate_crc(&s_pb_state.storage, PutBytesCrcType_CRC32); @@ -460,7 +454,7 @@ static void prv_commit_object(uint32_t crc) { } #endif - struct InstallableObject* o = s_ready_to_install + (s_pb_state.type - 1); + struct InstallableObject *o = s_ready_to_install + (s_pb_state.type - 1); o->token = s_pb_state.token; o->type = s_pb_state.type; o->index = s_pb_state.index; @@ -486,7 +480,7 @@ static void prv_finish_fw_update_if_completed(void) { } static void prv_do_install(uint32_t token) { - struct InstallableObject* o = NULL; + struct InstallableObject *o = NULL; for (int i = 0; i < NumObjects; ++i) { if (s_ready_to_install[i].token == token) { o = &s_ready_to_install[i]; @@ -500,18 +494,18 @@ static void prv_do_install(uint32_t token) { return; } - PBL_LOG_DBG("PutBytes install CB. Tok: %"PRIu32", type: %d", token, o->type); + PBL_LOG_DBG("PutBytes install CB. Tok: %" PRIu32 ", type: %d", token, o->type); switch (o->type) { - case ObjectFirmware: - case ObjectSysResources: - prv_finish_fw_update_if_completed(); - break; - case ObjectRecovery: - boot_bit_set(BOOT_BIT_NEW_PRF_AVAILABLE); - // >>> Fall-through! <<< - default: - break; + case ObjectFirmware: + case ObjectSysResources: + prv_finish_fw_update_if_completed(); + break; + case ObjectRecovery: + boot_bit_set(BOOT_BIT_NEW_PRF_AVAILABLE); + // >>> Fall-through! <<< + default: + break; } o->token = 0; @@ -524,19 +518,18 @@ static void prv_do_install(uint32_t token) { } static void prv_do_abort(void) { - PBL_LOG_DBG("PutBytes abort CB. Tok: %"PRIu32".", s_pb_state.token); + PBL_LOG_DBG("PutBytes abort CB. Tok: %" PRIu32 ".", s_pb_state.token); prv_mark_pb_jobs_complete(1); prv_cleanup_and_send_response(ResponseAck); } static bool prv_has_invalid_token(const PutBytesCommand command, uint32_t request_token) { - if (command == PutBytesInit || - command == PutBytesInstall) { + if (command == PutBytesInit || command == PutBytesInstall) { return false; } if (s_pb_state.token != request_token) { - PBL_LOG_ERR("%d: Token does not match; got 0x%" PRIx32 ", expected 0x%" PRIx32, - command, request_token, s_pb_state.token); + PBL_LOG_ERR("%d: Token does not match; got 0x%" PRIx32 ", expected 0x%" PRIx32, command, + request_token, s_pb_state.token); return true; } return false; @@ -563,8 +556,9 @@ static bool prv_has_invalid_request_length(const PutBytesCommand command, uint32 const size_t expected_length = prv_expected_minimum_length_by_command(command); const bool has_invalid_length = (actual_length < expected_length); if (has_invalid_length) { - PBL_LOG_ERR("Invalid message length for command %"PRIu32"; expected=%"PRIu32", actual=%"PRIu32, - (uint32_t)command, (uint32_t)expected_length, (uint32_t)actual_length); + PBL_LOG_ERR("Invalid message length for command %" PRIu32 "; expected=%" PRIu32 + ", actual=%" PRIu32, + (uint32_t)command, (uint32_t)expected_length, (uint32_t)actual_length); } return has_invalid_length; } @@ -632,8 +626,8 @@ static bool prv_setup_storage_for_init_request(const InitRequest *request, uint3 switch (request->type) { #ifndef CONFIG_RECOVERY_FW case ObjectFile: { - storage_info = kernel_malloc_check(sizeof(PutBytesStorageInfo) + - strlen(request->filename) + 1); + storage_info = + kernel_malloc_check(sizeof(PutBytesStorageInfo) + strlen(request->filename) + 1); strcpy(storage_info->filename, request->filename); break; } @@ -682,7 +676,7 @@ static bool prv_setup_storage_for_init_request(const InitRequest *request, uint3 static void prv_do_init(void) { bool success = false; - InitRequest* request = (InitRequest*) s_pb_state.receiver.buffer; + InitRequest *request = (InitRequest *)s_pb_state.receiver.buffer; if (prv_is_init_object_type_invalid(request->type)) { goto exit; @@ -704,7 +698,7 @@ static void prv_do_init(void) { const uint32_t append_offset_magic = 0xBE4354EF; if (ntohl(info->init_req_magic) == append_offset_magic) { append_offset = ntohl(info->append_offset); - PBL_LOG_INFO("Restarting FW Update at offset %"PRIu32, append_offset); + PBL_LOG_INFO("Restarting FW Update at offset %" PRIu32, append_offset); } } @@ -723,9 +717,8 @@ static void prv_do_init(void) { const uint32_t r = rand(); s_pb_state.token = MAX(1, r); - PBL_LOG_DBG("PutBytes Init CB. Type: %d, Idx: %"PRIu32", Size: %"PRIu32" Tok: %"PRIu32, - (int) s_pb_state.type, s_pb_state.index, - s_pb_state.total_size, s_pb_state.token); + PBL_LOG_DBG("PutBytes Init CB. Type: %d, Idx: %" PRIu32 ", Size: %" PRIu32 " Tok: %" PRIu32, + (int)s_pb_state.type, s_pb_state.index, s_pb_state.total_size, s_pb_state.token); success = prv_setup_storage_for_init_request(request, index); @@ -737,15 +730,15 @@ static void prv_do_init(void) { } PebbleEvent event = { - .type = PEBBLE_PUT_BYTES_EVENT, - .put_bytes = { - .type = PebblePutBytesEventTypeStart, - .object_type = s_pb_state.type, - .has_cookie = s_pb_state.has_cookie, - .progress_percent = 0, - .total_size = s_pb_state.total_size, - .failed = false - }, + .type = PEBBLE_PUT_BYTES_EVENT, + .put_bytes = { + .type = PebblePutBytesEventTypeStart, + .object_type = s_pb_state.type, + .has_cookie = s_pb_state.has_cookie, + .progress_percent = 0, + .total_size = s_pb_state.total_size, + .failed = false + }, }; event_put(&event); @@ -755,8 +748,7 @@ static void prv_do_init(void) { exit: prv_mark_pb_jobs_complete(1); - prv_send_response(success ? ResponseAck : ResponseNack, - success ? s_pb_state.token : 0); + prv_send_response(success ? ResponseAck : ResponseNack, success ? s_pb_state.token : 0); if (!success) { prv_cleanup(); @@ -773,14 +765,13 @@ static bool prv_do_put(const PutRequest *request, uint32_t request_size, uint32_ uint32_t remaining_bytes = s_pb_state.remaining_bytes; pbl_sem_give(&s_pb_semaphore); - if (prv_check_putrequest_for_errors(request, request_size) || - (data_length > remaining_bytes)) { + if (prv_check_putrequest_for_errors(request, request_size) || (data_length > remaining_bytes)) { prv_fail(token); return false; } - PBL_LOG_DBG("PutBytes put CB. type: %"PRIu32", length: %"PRIu32, - (uint32_t)s_pb_state.type, data_length); + PBL_LOG_DBG("PutBytes put CB. type: %" PRIu32 ", length: %" PRIu32, (uint32_t)s_pb_state.type, + data_length); pb_storage_append(&s_pb_state.storage, request->data, data_length); @@ -805,18 +796,19 @@ static void prv_do_commit(void) { PBL_LOG_DBG("PutBytes pushed %d bytes/sec", bytes_per_sec); } - bluetooth_analytics_handle_put_bytes_stats( - commit_succeeded, s_pb_state.type, - s_pb_state.total_size, elapsed_time_ms, &s_pb_state.conn_event_stats); + bluetooth_analytics_handle_put_bytes_stats(commit_succeeded, s_pb_state.type, + s_pb_state.total_size, elapsed_time_ms, + &s_pb_state.conn_event_stats); if (commit_succeeded) { s_pb_state.is_success = true; - PBL_LOG_DBG("PutBytes commit CB. CRC matches! Calculated CRC is 0x%"PRIx32 - " expected 0x%"PRIx32, calculated_crc, crc); + PBL_LOG_DBG("PutBytes commit CB. CRC matches! Calculated CRC is 0x%" PRIx32 + " expected 0x%" PRIx32, + calculated_crc, crc); prv_commit_object(crc); } else { - PBL_LOG_ERR("PutBytes commit CB. Calculated CRC is 0x%"PRIx32" expected 0x%"PRIx32, - calculated_crc, crc); + PBL_LOG_ERR("PutBytes commit CB. Calculated CRC is 0x%" PRIx32 " expected 0x%" PRIx32, + calculated_crc, crc); } s_pb_state.is_success &= commit_succeeded; @@ -826,24 +818,24 @@ static void prv_do_commit(void) { static bool prv_is_valid_command_for_current_state(PutBytesCommand command) { switch (s_pb_state.current_command) { - case PutBytesIdle: - return (command == PutBytesInit || command == PutBytesInstall); - case PutBytesInit: - return (command == PutBytesPut || command == PutBytesAbort); - case PutBytesPut: - return (command == PutBytesPut || command == PutBytesCommit || command == PutBytesAbort); - case PutBytesCommit: - case PutBytesAbort: - case PutBytesInstall: - default: - return false; + case PutBytesIdle: + return (command == PutBytesInit || command == PutBytesInstall); + case PutBytesInit: + return (command == PutBytesPut || command == PutBytesAbort); + case PutBytesPut: + return (command == PutBytesPut || command == PutBytesCommit || command == PutBytesAbort); + case PutBytesCommit: + case PutBytesAbort: + case PutBytesInstall: + default: + return false; } } static bool prv_is_invalid_command_for_current_state(PutBytesCommand command) { if (!prv_is_valid_command_for_current_state(command)) { - PBL_LOG_ERR("PutBytes command 0x%x not permitted in current state 0x%x", - command, s_pb_state.current_command); + PBL_LOG_ERR("PutBytes command 0x%x not permitted in current state 0x%x", command, + s_pb_state.current_command); return true; } return false; @@ -857,10 +849,10 @@ static uint32_t prv_parse_token(const PutBytesCommand command, const SharedHeade } static bool prv_check_for_state_error(PutBytesCommand cmd, uint32_t token, uint32_t req_length) { - const bool has_error = (prv_is_invalid_command_for_current_state(cmd) || - prv_has_invalid_request_length(cmd, req_length) || - prv_has_invalid_token(cmd, token) || - prv_has_invalid_fw_update_state(cmd)); + const bool has_error = + (prv_is_invalid_command_for_current_state(cmd) || + prv_has_invalid_request_length(cmd, req_length) || prv_has_invalid_token(cmd, token) || + prv_has_invalid_fw_update_state(cmd)); return has_error; } @@ -924,23 +916,23 @@ static void prv_process_put_requests_system_task_cb(void *unused) { uint32_t bytes_transferred = initial_remaining_bytes - s_pb_state.remaining_bytes; PebbleEvent event = { - .type = PEBBLE_PUT_BYTES_EVENT, - .put_bytes = { - .type = PebblePutBytesEventTypeProgress, - .object_type = s_pb_state.type, - .has_cookie = s_pb_state.has_cookie, - .progress_percent = prv_get_progress_percent(), - .bytes_transferred = bytes_transferred, - .failed = false, - }, + .type = PEBBLE_PUT_BYTES_EVENT, + .put_bytes = { + .type = PebblePutBytesEventTypeProgress, + .object_type = s_pb_state.type, + .has_cookie = s_pb_state.has_cookie, + .progress_percent = prv_get_progress_percent(), + .bytes_transferred = bytes_transferred, + .failed = false, + }, }; event_put(&event); } pbl_sem_give(&s_pb_semaphore); // (re)start timer for next event - PBL_ASSERTN(new_timer_start(s_pb_state.timer_id, PUT_TIMEOUT_MS, prv_timer_callback, - &s_pb_state, 0 /*flags*/)); + PBL_ASSERTN(new_timer_start(s_pb_state.timer_id, PUT_TIMEOUT_MS, prv_timer_callback, &s_pb_state, + 0 /*flags*/)); prv_mark_pb_jobs_complete(num_put_jobs); @@ -954,7 +946,7 @@ static void prv_process_put_requests_system_task_cb(void *unused) { } prv_unlock_pb_job_state(); - if (do_ack) { // If we did not pre-ack, we need to ack the packet now! + if (do_ack) { // If we did not pre-ack, we need to ack the packet now! prv_send_response(ResponseAck, token); } } @@ -962,8 +954,7 @@ static void prv_process_put_requests_system_task_cb(void *unused) { static void prv_process_msg_system_task_callback(void *unused) { pbl_sem_take(&s_pb_semaphore, PBL_FOREVER); - if (!s_pb_state.receiver.buffer || - s_pb_state.receiver.length == 0) { + if (!s_pb_state.receiver.buffer || s_pb_state.receiver.length == 0) { PBL_LOG_WRN("No message pending, PutBytes cancelled in the mean time?"); prv_send_response(ResponseNack, s_pb_state.token); goto finally; @@ -988,7 +979,7 @@ static void prv_process_msg_system_task_callback(void *unused) { prv_do_init(); break; case PutBytesPut: - WTF; // Put Requests have their own handler + WTF; // Put Requests have their own handler break; case PutBytesCommit: prv_do_commit(); @@ -1021,16 +1012,13 @@ void put_bytes_cancel(void) { } if (s_pb_state.current_command == PutBytesIdle) { - PBL_LOG_DBG("Attempted to cancel put_bytes while idle, %d", - s_pb_state.current_command); - } else if (s_pb_state.type == ObjectWatchApp || - s_pb_state.type == ObjectAppResources || + PBL_LOG_DBG("Attempted to cancel put_bytes while idle, %d", s_pb_state.current_command); + } else if (s_pb_state.type == ObjectWatchApp || s_pb_state.type == ObjectAppResources || s_pb_state.type == ObjectWatchWorker) { PBL_LOG_DBG("Forcefully cancelling put_bytes transfer of app binaries"); prv_cleanup(); } else { - PBL_LOG_DBG("Attempted to cancel put_bytes with a non desired type, %d", - s_pb_state.type); + PBL_LOG_DBG("Attempted to cancel put_bytes with a non desired type, %d", s_pb_state.type); } pbl_sem_give(&s_pb_semaphore); @@ -1059,15 +1047,15 @@ static void prv_expect_init_timeout_cb(void *data) { } PebbleEvent event = { - .type = PEBBLE_PUT_BYTES_EVENT, - .put_bytes = { - .type = PebblePutBytesEventTypeInitTimeout, - .object_type = ObjectUnknown, - .has_cookie = false, - .progress_percent = 0, - .total_size = 0, - .failed = true, - }, + .type = PEBBLE_PUT_BYTES_EVENT, + .put_bytes = { + .type = PebblePutBytesEventTypeInitTimeout, + .object_type = ObjectUnknown, + .has_cookie = false, + .progress_percent = 0, + .total_size = 0, + .failed = true, + }, }; event_put(&event); @@ -1091,8 +1079,7 @@ void put_bytes_expect_init(uint32_t timeout_ms) { pbl_sem_give(&s_pb_semaphore); } -void put_bytes_handle_comm_session_event(const PebbleCommSessionEvent * - comm_session_event) { +void put_bytes_handle_comm_session_event(const PebbleCommSessionEvent *comm_session_event) { if (comm_session_event->is_system) { prv_cleanup_async(); } @@ -1133,7 +1120,7 @@ static bool prv_prepare(size_t total_payload_length) { if (!s_pb_state.receiver.buffer) { if (!prv_init_put_job_queue_if_necessary()) { - return false; // OOM + return false; // OOM } s_pb_state.receiver.buffer = prv_get_next_pb_job_buffer(); s_pb_state.receiver.length = 0; @@ -1175,14 +1162,15 @@ Receiver *prv_receiver_prepare(CommSession *session, const PebbleProtocolEndpoin } static void prv_validate_and_preack_request_if_needed(const uint8_t *rcvd_data, uint8_t length) { - if (prv_receiver_contains_put_request()) { // beginning of a PutRequest msg? + if (prv_receiver_contains_put_request()) { // beginning of a PutRequest msg? PutRequest *request = (PutRequest *)rcvd_data; uint32_t tot_payload_size = s_pb_state.receiver.length; // We only need the PutRequest Header to do some sanity checking so perform the check // now so we don't pre-ACK malformed packets - if ((tot_payload_size < sizeof(PutRequest)) || ((length >= sizeof(PutRequest)) && - prv_check_putrequest_for_errors(request, tot_payload_size))) { + if ((tot_payload_size < sizeof(PutRequest)) || + ((length >= sizeof(PutRequest)) && + prv_check_putrequest_for_errors(request, tot_payload_size))) { s_pb_state.receiver.should_nack = true; } @@ -1203,7 +1191,7 @@ void prv_receiver_write(Receiver *receiver, const uint8_t *data, size_t length) s_pb_state.receiver.should_nack = true; goto finally; } - PBL_ASSERTN(s_pb_state.receiver.buffer && + PBL_ASSERTN(s_pb_state.receiver.buffer && s_pb_state.receiver.pos + length <= PUT_BYTES_PP_BUFFER_SIZE); memcpy(s_pb_state.receiver.buffer + s_pb_state.receiver.pos, data, length); @@ -1250,16 +1238,16 @@ void prv_receiver_finish(Receiver *receiver) { } const ReceiverImplementation g_put_bytes_receiver_impl = { - .prepare = prv_receiver_prepare, - .write = prv_receiver_write, - .finish = prv_receiver_finish, - .cleanup = prv_receiver_cleanup, + .prepare = prv_receiver_prepare, + .write = prv_receiver_write, + .finish = prv_receiver_finish, + .cleanup = prv_receiver_cleanup, }; //////////////////////////////////////////////////////////////////////////////////////////////////// // For Unit Testing -struct pbl_sem * put_bytes_get_semaphore(void) { +struct pbl_sem *put_bytes_get_semaphore(void) { return &s_pb_semaphore; } diff --git a/src/fw/services/put_bytes/put_bytes_storage.c b/src/fw/services/put_bytes/put_bytes_storage.c index f0f8c7fe94..3c571b41ca 100644 --- a/src/fw/services/put_bytes/put_bytes_storage.c +++ b/src/fw/services/put_bytes/put_bytes_storage.c @@ -10,7 +10,6 @@ PBL_LOG_MODULE_DECLARE(service_put_bytes, CONFIG_SERVICE_PUT_BYTES_LOG_LEVEL); - #ifdef UNITTEST extern const PutBytesStorageImplementation s_raw_implementation; extern const PutBytesStorageImplementation s_file_implementation; @@ -18,27 +17,26 @@ extern const PutBytesStorageImplementation s_file_implementation; #include "pbl/services/put_bytes/put_bytes_storage_raw.h" static const PutBytesStorageImplementation s_raw_implementation = { - .init = pb_storage_raw_init, - .get_max_size = pb_storage_raw_get_max_size, - .write = pb_storage_raw_write, - .calculate_crc = pb_storage_raw_calculate_crc, - .deinit = pb_storage_raw_deinit + .init = pb_storage_raw_init, + .get_max_size = pb_storage_raw_get_max_size, + .write = pb_storage_raw_write, + .calculate_crc = pb_storage_raw_calculate_crc, + .deinit = pb_storage_raw_deinit }; #ifndef CONFIG_RECOVERY_FW #include "pbl/services/put_bytes/put_bytes_storage_file.h" static const PutBytesStorageImplementation s_file_implementation = { - .init = pb_storage_file_init, - .get_max_size = pb_storage_file_get_max_size, - .write = pb_storage_file_write, - .calculate_crc = pb_storage_file_calculate_crc, - .deinit = pb_storage_file_deinit + .init = pb_storage_file_init, + .get_max_size = pb_storage_file_get_max_size, + .write = pb_storage_file_write, + .calculate_crc = pb_storage_file_calculate_crc, + .deinit = pb_storage_file_deinit }; #endif // #ifndef CONFIG_RECOVERY_FW #endif // #ifdef UNITTEST - void pb_storage_write(PutBytesStorage *storage, uint32_t offset, const uint8_t *buffer, uint32_t length) { storage->impl->write(storage, offset, buffer, length); @@ -53,17 +51,17 @@ uint32_t pb_storage_calculate_crc(PutBytesStorage *storage, PutBytesCrcType crc_ return storage->impl->calculate_crc(storage, crc_type); } -bool pb_storage_init(PutBytesStorage *storage, PutBytesObjectType object_type, - uint32_t total_size, PutBytesStorageInfo *info, uint32_t append_offset) { - static const PutBytesStorageImplementation* IMPL_FOR_OBJECT_TYPE[] = { - [ObjectFirmware] = &s_raw_implementation, - [ObjectRecovery] = &s_raw_implementation, - [ObjectSysResources] = &s_raw_implementation, +bool pb_storage_init(PutBytesStorage *storage, PutBytesObjectType object_type, uint32_t total_size, + PutBytesStorageInfo *info, uint32_t append_offset) { + static const PutBytesStorageImplementation *IMPL_FOR_OBJECT_TYPE[] = { + [ObjectFirmware] = &s_raw_implementation, + [ObjectRecovery] = &s_raw_implementation, + [ObjectSysResources] = &s_raw_implementation, #ifndef CONFIG_RECOVERY_FW - [ObjectAppResources] = &s_file_implementation, - [ObjectWatchApp] = &s_file_implementation, - [ObjectFile] = &s_file_implementation, - [ObjectWatchWorker] = &s_file_implementation + [ObjectAppResources] = &s_file_implementation, + [ObjectWatchApp] = &s_file_implementation, + [ObjectFile] = &s_file_implementation, + [ObjectWatchWorker] = &s_file_implementation #endif }; @@ -80,8 +78,8 @@ bool pb_storage_init(PutBytesStorage *storage, PutBytesObjectType object_type, uint32_t max_size = impl->get_max_size(object_type); if (total_size > max_size) { - PBL_LOG_WRN("Invalid size for type %u, size: %"PRIu32", max_size: %"PRIu32, - object_type, total_size, max_size); + PBL_LOG_WRN("Invalid size for type %u, size: %" PRIu32 ", max_size: %" PRIu32, object_type, + total_size, max_size); return false; } @@ -96,14 +94,14 @@ void pb_storage_deinit(PutBytesStorage *storage, bool is_success) { } } -extern bool pb_storage_raw_get_status(PutBytesObjectType obj_type, PbInstallStatus *status); +extern bool pb_storage_raw_get_status(PutBytesObjectType obj_type, PbInstallStatus *status); bool pb_storage_get_status(PutBytesObjectType obj_type, PbInstallStatus *status) { switch (obj_type) { case ObjectFirmware: case ObjectRecovery: case ObjectSysResources: return pb_storage_raw_get_status(obj_type, status); - default: // Partial installs not supported for othe object types today + default: // Partial installs not supported for othe object types today return false; } } diff --git a/src/fw/services/put_bytes/put_bytes_storage_file.c b/src/fw/services/put_bytes/put_bytes_storage_file.c index 4a039ed443..99d76f4794 100644 --- a/src/fw/services/put_bytes/put_bytes_storage_file.c +++ b/src/fw/services/put_bytes/put_bytes_storage_file.c @@ -16,7 +16,7 @@ bool pb_storage_file_init(PutBytesStorage *storage, PutBytesObjectType object_ty } int fd = pfs_open(info->filename, OP_FLAG_READ | OP_FLAG_WRITE, FILE_TYPE_STATIC, total_size); - storage->impl_data = (void*)(uintptr_t) fd; + storage->impl_data = (void *)(uintptr_t)fd; return fd >= 0; } @@ -26,23 +26,23 @@ uint32_t pb_storage_file_get_max_size(PutBytesObjectType object_type) { } void pb_storage_file_write(PutBytesStorage *storage, uint32_t offset, const uint8_t *buffer, - uint32_t length) { + uint32_t length) { // We don't support writing to arbitrary offsets in this implementation. PBL_ASSERTN(offset == storage->current_offset); - int fd = (int) storage->impl_data; + int fd = (int)storage->impl_data; pfs_write(fd, buffer, length); } uint32_t pb_storage_file_calculate_crc(PutBytesStorage *storage, PutBytesCrcType crc_type) { - PBL_ASSERTN(crc_type == PutBytesCrcType_Legacy); // PFS doesn't use new checksum at the moment + PBL_ASSERTN(crc_type == PutBytesCrcType_Legacy); // PFS doesn't use new checksum at the moment - int fd = (int) storage->impl_data; + int fd = (int)storage->impl_data; return pfs_crc_calculate_file(fd, 0, storage->current_offset); } void pb_storage_file_deinit(PutBytesStorage *storage, bool is_success) { - int fd = (int) storage->impl_data; + int fd = (int)storage->impl_data; if (!is_success) { pfs_close_and_remove(fd); diff --git a/src/fw/services/put_bytes/put_bytes_storage_raw.c b/src/fw/services/put_bytes/put_bytes_storage_raw.c index 1259c7f7a3..216c929fd4 100644 --- a/src/fw/services/put_bytes/put_bytes_storage_raw.c +++ b/src/fw/services/put_bytes/put_bytes_storage_raw.c @@ -25,18 +25,16 @@ typedef struct MemoryLayout { uint32_t start_offset; } MemoryLayout; -static const MemoryLayout* prv_get_layout_for_type(PutBytesObjectType object_type) { +static const MemoryLayout *prv_get_layout_for_type(PutBytesObjectType object_type) { static const MemoryLayout layouts[] = { #ifndef CONFIG_PBLBOOT - { FLASH_REGION_FIRMWARE_DEST_BEGIN, - FLASH_REGION_FIRMWARE_DEST_END, sizeof(FirmwareDescription) }, - { FLASH_REGION_FIRMWARE_DEST_BEGIN, - FLASH_REGION_FIRMWARE_DEST_END, sizeof(FirmwareDescription) }, + {FLASH_REGION_FIRMWARE_DEST_BEGIN, FLASH_REGION_FIRMWARE_DEST_END, + sizeof(FirmwareDescription)}, + {FLASH_REGION_FIRMWARE_DEST_BEGIN, FLASH_REGION_FIRMWARE_DEST_END, + sizeof(FirmwareDescription)}, #else - { FLASH_REGION_FIRMWARE_DEST_BEGIN, - FLASH_REGION_FIRMWARE_DEST_END, 0U }, - { FLASH_REGION_FIRMWARE_DEST_BEGIN, - FLASH_REGION_FIRMWARE_DEST_END, 0U }, + {FLASH_REGION_FIRMWARE_DEST_BEGIN, FLASH_REGION_FIRMWARE_DEST_END, 0U}, + {FLASH_REGION_FIRMWARE_DEST_BEGIN, FLASH_REGION_FIRMWARE_DEST_END, 0U}, #endif }; static MemoryLayout resource_layout; @@ -44,7 +42,7 @@ static const MemoryLayout* prv_get_layout_for_type(PutBytesObjectType object_typ // Our PutBytesObjectType values are 1 indexed instead of zero indexed and the first three // are the only raw ones, so we can get away with just subtracting 1. if (object_type == ObjectSysResources) { - resource_layout = (MemoryLayout) { + resource_layout = (MemoryLayout){ resource_storage_flash_get_unused_bank()->begin, resource_storage_flash_get_unused_bank()->end, 0, @@ -55,8 +53,8 @@ static const MemoryLayout* prv_get_layout_for_type(PutBytesObjectType object_typ } } -bool pb_storage_raw_get_status(PutBytesObjectType obj_type, PbInstallStatus *status) { - const MemoryLayout *layout = prv_get_layout_for_type(obj_type); +bool pb_storage_raw_get_status(PutBytesObjectType obj_type, PbInstallStatus *status) { + const MemoryLayout *layout = prv_get_layout_for_type(obj_type); const size_t read_buffer_size = 2048; uint8_t *read_buffer = kernel_zalloc(read_buffer_size); @@ -99,10 +97,7 @@ bool pb_storage_raw_get_status(PutBytesObjectType obj_type, PbInstallStatus *st // for the mobile apps to implement flash_crc32 uint32_t crc = flash_calculate_legacy_defective_checksum(stop_read_address, bytes_written); - *status = (PbInstallStatus) { - .num_bytes_written = bytes_written, - .crc_of_bytes = crc - }; + *status = (PbInstallStatus){.num_bytes_written = bytes_written, .crc_of_bytes = crc}; success = true; goto cleanup; @@ -118,7 +113,7 @@ bool pb_storage_raw_get_status(PutBytesObjectType obj_type, PbInstallStatus *st bool pb_storage_raw_init(PutBytesStorage *storage, PutBytesObjectType object_type, uint32_t total_size, PutBytesStorageInfo *info, uint32_t append_offset) { const MemoryLayout *layout = prv_get_layout_for_type(object_type); - storage->impl_data = (void*) layout; + storage->impl_data = (void *)layout; storage->current_offset = layout->start_offset; @@ -140,7 +135,7 @@ bool pb_storage_raw_init(PutBytesStorage *storage, PutBytesObjectType object_typ // By erasing the entire region we make it more likely for 'pb_storage_raw_get_status' to // recover the correct location. flash_region_erase_optimal_range(layout->start_address, layout->start_address, - layout->end_address, layout->end_address); + layout->end_address, layout->end_address); // Restore the fast interval so the init ACK isn't delayed by the slow connection parameters. comm_session_set_responsiveness(comm_session_get_system_session(), BtConsumerPpPutBytes, @@ -184,7 +179,6 @@ uint32_t pb_storage_raw_calculate_crc(PutBytesStorage *storage, PutBytesCrcType void pb_storage_raw_deinit(PutBytesStorage *storage, bool is_success) { // Restore normal BLE responsiveness that was reduced in pb_storage_raw_init - comm_session_set_responsiveness(comm_session_get_system_session(), - BtConsumerPpPutBytes, ResponseTimeMin, - MIN_LATENCY_MODE_TIMEOUT_PUT_BYTES_SECS); + comm_session_set_responsiveness(comm_session_get_system_session(), BtConsumerPpPutBytes, + ResponseTimeMin, MIN_LATENCY_MODE_TIMEOUT_PUT_BYTES_SECS); } diff --git a/src/fw/services/registry_endpoint/service.c b/src/fw/services/registry_endpoint/service.c index ed3132a89d..222b34dd82 100644 --- a/src/fw/services/registry_endpoint/service.c +++ b/src/fw/services/registry_endpoint/service.c @@ -11,12 +11,12 @@ #define FACTORY_REGISTRY_ENDPOINT 5001 static void prv_send_response(const uint8_t *data, unsigned int length) { - comm_session_send_data(comm_session_get_system_session(), FACTORY_REGISTRY_ENDPOINT, - data, length, COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(comm_session_get_system_session(), FACTORY_REGISTRY_ENDPOINT, data, length, + COMM_SESSION_DEFAULT_TIMEOUT); } static void prv_send_color_response(void) { - const uint8_t response[] = { 0x01, 0x04, 0x0, 0x0, 0x0, mfg_info_get_watch_color() }; + const uint8_t response[] = {0x01, 0x04, 0x0, 0x0, 0x0, mfg_info_get_watch_color()}; prv_send_response(response, sizeof(response)); } @@ -25,19 +25,17 @@ static void prv_send_fail_response(void) { prv_send_response(&error_response, sizeof(error_response)); } -void factory_registry_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t length_bytes) { +void factory_registry_protocol_msg_callback(CommSession *session, const uint8_t *data, + size_t length_bytes) { // Expected message is 0x0 (Read), 0x09 (Length of key), followed by the string "mfg_color". // All other messages just get an error response - if (length_bytes == 1 + 1 + strlen(MFG_COLOR_KEY) && - data[0] == 0x0 && + if (length_bytes == 1 + 1 + strlen(MFG_COLOR_KEY) && data[0] == 0x0 && data[1] == strlen(MFG_COLOR_KEY) && memcmp(data + 2, MFG_COLOR_KEY, strlen(MFG_COLOR_KEY)) == 0) { - prv_send_color_response(); return; } prv_send_fail_response(); } - diff --git a/src/fw/services/regular_timer/service.c b/src/fw/services/regular_timer/service.c index c8be5e9c38..a2131df727 100644 --- a/src/fw/services/regular_timer/service.c +++ b/src/fw/services/regular_timer/service.c @@ -25,8 +25,8 @@ static ListNode s_minutes_callbacks; // Set to 90 seconds because we do eventually drift. Make it in the middle of a minute so we can // be sure that it isn't due to drifting. #define MISSING_MINUTE_CB_LOG_THRESHOLD_S 90 -static time_t s_last_minute_fire_ts; // uses -static int s_last_minute_fired = -1; // Track which minute we last fired on +static time_t s_last_minute_fire_ts; // uses +static int s_last_minute_fired = -1; // Track which minute we last fired on // ------------------------------------------------------------------------------------------- // Passed to list_find() to determine if a callback is already registered or not @@ -35,11 +35,11 @@ static bool prv_callback_registered_filter(ListNode *found_node, void *data) { } // ------------------------------------------------------------------------------------------- -static void do_callbacks(ListNode* list) { +static void do_callbacks(ListNode *list) { pbl_mutex_lock(&s_callback_list_semaphore, PBL_FOREVER); - for (ListNode* iter = list_get_next(list); iter != 0; ) { - RegularTimerInfo* reg_timer = (RegularTimerInfo*) iter; + for (ListNode *iter = list_get_next(list); iter != 0;) { + RegularTimerInfo *reg_timer = (RegularTimerInfo *)iter; if (--reg_timer->private_count == 0) { reg_timer->private_count = reg_timer->private_reset_count; @@ -70,8 +70,8 @@ static void do_callbacks(ListNode* list) { } // ------------------------------------------------------------------------------------------- -static void timer_callback(void* data) { - (void) data; +static void timer_callback(void *data) { + (void)data; do_callbacks(&s_seconds_callbacks); @@ -95,8 +95,8 @@ static void timer_callback(void* data) { // Keep the logging to detect large time jumps (multiple minutes skipped) const time_t now_ts = rtc_get_ticks() / PBL_TICK_HZ; if ((now_ts - s_last_minute_fire_ts) > MISSING_MINUTE_CB_LOG_THRESHOLD_S) { - PBL_LOG_WRN("Large time jump detected. Previous ts: %lu, Now ts: %lu", - s_last_minute_fire_ts, now_ts); + PBL_LOG_WRN("Large time jump detected. Previous ts: %lu, Now ts: %lu", s_last_minute_fire_ts, + now_ts); } s_last_minute_fire_ts = now_ts; @@ -106,7 +106,7 @@ static void timer_callback(void* data) { // ------------------------------------------------------------------------------------------- //! Used only once when we first start up. This should be really close to the 0ms point. -static void timer_callback_initializing(void* data) { +static void timer_callback_initializing(void *data) { // FIXME: FreeRTOS timers are subject to skew if something else is running on the millisecond. // We'll need to continuously adjust our timer period in really annoying ways. new_timer_start(s_timer_id, 1000, timer_callback, NULL, TIMER_START_FLAG_REPEATING); @@ -116,18 +116,17 @@ static void timer_callback_initializing(void* data) { // -------------------------------------------------------------------------------------------- void regular_timer_init(void) { - time_t seconds; uint16_t milliseconds; rtc_get_time_ms(&seconds, &milliseconds); s_timer_id = new_timer_create(); - bool success = new_timer_start(s_timer_id, 1000-milliseconds, timer_callback_initializing, NULL, 0 /*flags*/); + bool success = new_timer_start(s_timer_id, 1000 - milliseconds, timer_callback_initializing, NULL, + 0 /*flags*/); PBL_ASSERTN(success); } // ------------------------------------------------------------------------------------------- -void regular_timer_add_multisecond_callback(RegularTimerInfo* cb, uint16_t seconds) { - +void regular_timer_add_multisecond_callback(RegularTimerInfo *cb, uint16_t seconds) { pbl_mutex_lock(&s_callback_list_semaphore, PBL_FOREVER); cb->private_reset_count = seconds; @@ -149,14 +148,13 @@ void regular_timer_add_multisecond_callback(RegularTimerInfo* cb, uint16_t secon } // -------------------------------------------------------------------------------------------- -void regular_timer_add_seconds_callback(RegularTimerInfo* cb) { +void regular_timer_add_seconds_callback(RegularTimerInfo *cb) { // special case for triggering each second regular_timer_add_multisecond_callback(cb, 1); } // -------------------------------------------------------------------------------------------- -void regular_timer_add_multiminute_callback(RegularTimerInfo* cb, uint16_t minutes) { - +void regular_timer_add_multiminute_callback(RegularTimerInfo *cb, uint16_t minutes) { pbl_mutex_lock(&s_callback_list_semaphore, PBL_FOREVER); cb->private_reset_count = minutes; @@ -177,7 +175,7 @@ void regular_timer_add_multiminute_callback(RegularTimerInfo* cb, uint16_t minut } // ----------------------------------------------------------------------------------------- -void regular_timer_add_minutes_callback(RegularTimerInfo* cb) { +void regular_timer_add_minutes_callback(RegularTimerInfo *cb) { // special case for triggering each minute regular_timer_add_multiminute_callback(cb, 1); } @@ -191,7 +189,6 @@ static bool prv_regular_timer_is_scheduled(RegularTimerInfo *cb) { // ------------------------------------------------------------------------------------------ bool regular_timer_is_scheduled(RegularTimerInfo *cb) { - pbl_mutex_lock(&s_callback_list_semaphore, PBL_FOREVER); bool rv = prv_regular_timer_is_scheduled(cb); pbl_mutex_unlock(&s_callback_list_semaphore); @@ -204,7 +201,7 @@ bool regular_timer_pending_deletion(RegularTimerInfo *cb) { } // ------------------------------------------------------------------------------------------ -bool regular_timer_remove_callback(RegularTimerInfo* cb) { +bool regular_timer_remove_callback(RegularTimerInfo *cb) { bool timer_removed = false; pbl_mutex_lock(&s_callback_list_semaphore, PBL_FOREVER); @@ -235,9 +232,9 @@ void regular_timer_deinit(void) { static void prv_fire_callbacks(ListNode *list, uint16_t mod) { pbl_mutex_lock(&s_callback_list_semaphore, PBL_FOREVER); - ListNode* iter = list_get_next(list); + ListNode *iter = list_get_next(list); while (iter) { - RegularTimerInfo* reg_timer = (RegularTimerInfo*) iter; + RegularTimerInfo *reg_timer = (RegularTimerInfo *)iter; if (reg_timer->private_reset_count % mod == 0) { // Last one. Will trigger callback when do_callbacks() is called: reg_timer->private_count = 1; diff --git a/src/fw/services/send_text_service/service.c b/src/fw/services/send_text_service/service.c index 9c7595bb2c..01a46efa74 100644 --- a/src/fw/services/send_text_service/service.c +++ b/src/fw/services/send_text_service/service.c @@ -9,7 +9,6 @@ #include "pbl/services/blob_db/ios_notif_pref_db.h" #include "pbl/services/notifications/notification_constants.h" - static bool s_has_send_text_reply_action = false; static bool prv_has_send_text_reply_action(void) { @@ -43,12 +42,13 @@ static void prv_blobdb_event_handler(PebbleEvent *event, void *context) { void send_text_service_init(void) { // Save the initial state - s_has_send_text_reply_action = prv_has_send_text_reply_action();; + s_has_send_text_reply_action = prv_has_send_text_reply_action(); + ; // Register for updates static EventServiceInfo s_blobdb_event_info = { - .type = PEBBLE_BLOBDB_EVENT, - .handler = prv_blobdb_event_handler, + .type = PEBBLE_BLOBDB_EVENT, + .handler = prv_blobdb_event_handler, }; event_service_client_subscribe(&s_blobdb_event_info); } diff --git a/src/fw/services/services_common/service.c b/src/fw/services/services_common/service.c index 3d1d4cca73..84afe6906c 100644 --- a/src/fw/services/services_common/service.c +++ b/src/fw/services/services_common/service.c @@ -64,35 +64,33 @@ void services_common_init(void) { } static struct ServiceRunLevelSetting s_runlevel_settings[] = { - { - .set_enable_fn = accel_manager_enable, - .enable_mask = R_Stationary | R_FirmwareUpdate | R_Normal, - }, - { - .set_enable_fn = light_allow, - .enable_mask = R_LowPower | R_FirmwareUpdate | R_Normal, - }, - { - .set_enable_fn = vibe_service_set_enabled, - .enable_mask = R_LowPower | R_FirmwareUpdate | R_Normal - }, - { - .set_enable_fn = bt_ctl_set_enabled, - .enable_mask = R_FirmwareUpdate | R_Normal, - }, + { + .set_enable_fn = accel_manager_enable, + .enable_mask = R_Stationary | R_FirmwareUpdate | R_Normal, + }, + { + .set_enable_fn = light_allow, + .enable_mask = R_LowPower | R_FirmwareUpdate | R_Normal, + }, + {.set_enable_fn = vibe_service_set_enabled, + .enable_mask = R_LowPower | R_FirmwareUpdate | R_Normal}, + { + .set_enable_fn = bt_ctl_set_enabled, + .enable_mask = R_FirmwareUpdate | R_Normal, + }, #if defined(CONFIG_TOUCH) && defined(CONFIG_RECOVERY_FW) - // Only keep touch enabled on recovery (and so manufacturing as well) - // Once supported in main firmware, this should be removed. - { - .set_enable_fn = touch_sensor_set_enabled, - .enable_mask = R_Normal, - }, + // Only keep touch enabled on recovery (and so manufacturing as well) + // Once supported in main firmware, this should be removed. + { + .set_enable_fn = touch_sensor_set_enabled, + .enable_mask = R_Normal, + }, #endif #ifdef CONFIG_HRM - { - .set_enable_fn = hrm_manager_enable, - .enable_mask = R_Normal, - }, + { + .set_enable_fn = hrm_manager_enable, + .enable_mask = R_Normal, + }, #endif }; @@ -102,4 +100,3 @@ void services_common_set_runlevel(RunLevel runlevel) { service->set_enable_fn(((1 << runlevel) & service->enable_mask) != 0); } } - diff --git a/src/fw/services/services_normal/service.c b/src/fw/services/services_normal/service.c index 943ea6fcbd..5a64ef6804 100644 --- a/src/fw/services/services_normal/service.c +++ b/src/fw/services/services_normal/service.c @@ -8,7 +8,7 @@ #include "applib/event_service_client.h" #include #include "kernel/events.h" -#include "process_management/app_install_manager.h" // FIXME: This should really be in services/ +#include "process_management/app_install_manager.h" // FIXME: This should really be in services/ #include "pbl/services/activity/activity.h" #include "pbl/services/alarms/alarm.h" #include "pbl/services/app_cache.h" @@ -54,10 +54,10 @@ static void prv_time_set_event_handler(PebbleEvent *e, void *context) { if (s_activity_init_deferred && rtc_get_time() >= MIN_VALID_TIME_TIMESTAMP) { // Time is now valid, initialize activity s_activity_init_deferred = false; - + // Unsubscribe from time events event_service_client_unsubscribe(&s_time_event_info); - + activity_init(); // If the user had tracking enabled before init was deferred, start tracking now so we // don't miss steps when initialization happens after boot. @@ -104,9 +104,9 @@ void services_normal_init(void) { s_activity_init_deferred = true; // Subscribe to time set events - s_time_event_info = (EventServiceInfo) { - .type = PEBBLE_SET_TIME_EVENT, - .handler = prv_time_set_event_handler, + s_time_event_info = (EventServiceInfo){ + .type = PEBBLE_SET_TIME_EVENT, + .handler = prv_time_set_event_handler, }; event_service_client_subscribe(&s_time_event_info); } @@ -128,35 +128,35 @@ void services_normal_init(void) { } static struct ServiceRunLevelSetting s_runlevel_settings[] = { - { - .set_enable_fn = wakeup_enable, - .enable_mask = R_Stationary | R_Normal, - }, - { - .set_enable_fn = alarm_service_enable_alarms, - .enable_mask = R_LowPower | R_Stationary | R_Normal, - }, - { - .set_enable_fn = activity_set_enabled, - .enable_mask = R_Stationary | R_Normal, - }, - { - .set_enable_fn = stationary_run_level_enable, - .enable_mask = R_Stationary | R_Normal, - }, - { - .set_enable_fn = dls_set_send_enable_run_level, - .enable_mask = R_Normal, - }, - { - .set_enable_fn = blob_db_enabled, - .enable_mask = R_Normal, - }, + { + .set_enable_fn = wakeup_enable, + .enable_mask = R_Stationary | R_Normal, + }, + { + .set_enable_fn = alarm_service_enable_alarms, + .enable_mask = R_LowPower | R_Stationary | R_Normal, + }, + { + .set_enable_fn = activity_set_enabled, + .enable_mask = R_Stationary | R_Normal, + }, + { + .set_enable_fn = stationary_run_level_enable, + .enable_mask = R_Stationary | R_Normal, + }, + { + .set_enable_fn = dls_set_send_enable_run_level, + .enable_mask = R_Normal, + }, + { + .set_enable_fn = blob_db_enabled, + .enable_mask = R_Normal, + }, #ifdef CONFIG_ORIENTATION_MANAGER - { - .set_enable_fn = orientation_manager_enable, - .enable_mask = R_LowPower | R_Stationary | R_Normal, - } + { + .set_enable_fn = orientation_manager_enable, + .enable_mask = R_LowPower | R_Stationary | R_Normal, + } #endif }; diff --git a/src/fw/services/settings/settings_file.c b/src/fw/services/settings/settings_file.c index f7974016c3..83dae2a5a7 100644 --- a/src/fw/services/settings/settings_file.c +++ b/src/fw/services/settings/settings_file.c @@ -24,13 +24,12 @@ static status_t bootup_check(SettingsFile *file); static void compute_stats(SettingsFile *file); static bool file_hdr_is_uninitialized(SettingsFileHeader *file_hdr) { - return (file_hdr->magic == 0xffffffff) && (file_hdr->version == 0xffff) - && (file_hdr->flags == 0xffff); + return (file_hdr->magic == 0xffffffff) && (file_hdr->version == 0xffff) && + (file_hdr->flags == 0xffff); } -static status_t prv_open(SettingsFile *file, const char *name, uint8_t flags, - int max_used_space, int alloc_used_space, - int min_alloc_used_space) { +static status_t prv_open(SettingsFile *file, const char *name, uint8_t flags, int max_used_space, + int alloc_used_space, int min_alloc_used_space) { // Making the max_space_total at least a little bit larger than the // alloc_used_space allows us to avoid thrashing. Without it, if // max_space_total == alloc_used_space, then if the file is full, changing a @@ -51,12 +50,12 @@ static status_t prv_open(SettingsFile *file, const char *name, uint8_t flags, return fd; } - *file = (SettingsFile) { - .name = kernel_strdup_check(name), - .max_used_space = max_used_space, - .alloc_used_space = alloc_used_space, - .min_alloc_used_space = min_alloc_used_space, - .max_space_total = max_space_total, + *file = (SettingsFile){ + .name = kernel_strdup_check(name), + .max_used_space = max_used_space, + .alloc_used_space = alloc_used_space, + .min_alloc_used_space = min_alloc_used_space, + .max_space_total = max_space_total, }; settings_raw_iter_init(&file->iter, fd, file->name); @@ -73,18 +72,17 @@ static status_t prv_open(SettingsFile *file, const char *name, uint8_t flags, PBL_LOG_ERR("Attempted to open %s, not a settings file. Removing and recreating.", name); status_t rv = pfs_close_and_remove(fd); if (rv < 0) { - PBL_LOG_ERR("Could not remove corrupt settings file %s: %"PRId32, name, rv); + PBL_LOG_ERR("Could not remove corrupt settings file %s: %" PRId32, name, rv); return rv; } return prv_open(file, name, flags, max_used_space, alloc_used_space, min_alloc_used_space); } if (file_hdr.version > SETTINGS_FILE_VERSION) { - PBL_LOG_WRN("Unrecognized version %d for file %s, removing...", - file_hdr.version, name); + PBL_LOG_WRN("Unrecognized version %d for file %s, removing...", file_hdr.version, name); status_t rv = pfs_close_and_remove(fd); if (rv < 0) { - PBL_LOG_ERR("Could not remove old-version settings file %s: %"PRId32, name, rv); + PBL_LOG_ERR("Could not remove old-version settings file %s: %" PRId32, name, rv); return rv; } return prv_open(file, name, flags, max_used_space, alloc_used_space, min_alloc_used_space); @@ -100,8 +98,10 @@ static status_t prv_open(SettingsFile *file, const char *name, uint8_t flags, status_t status = bootup_check(file); if (status < 0) { - PBL_LOG_ERR("Bootup check failed (%"PRId32"), not good. " - "Attempting to recover by deleting %s...", status, name); + PBL_LOG_ERR("Bootup check failed (%" PRId32 + "), not good. " + "Attempting to recover by deleting %s...", + status, name); pfs_close_and_remove(fd); return prv_open(file, name, flags, max_used_space, alloc_used_space, min_alloc_used_space); } @@ -111,12 +111,11 @@ static status_t prv_open(SettingsFile *file, const char *name, uint8_t flags, // firmware). If we detect that situation, let's re-write the file to the new larger requested // size. if (alloc_used_space >= max_used_space && actual_size < max_space_total) { - PBL_LOG_DBG("Re-writing settings file %s to increase its size from %d to %d.", - name, actual_size, max_space_total); + PBL_LOG_DBG("Re-writing settings file %s to increase its size from %d to %d.", name, + actual_size, max_space_total); status = settings_file_rewrite_filtered(file, NULL, NULL); if (status < 0) { - PBL_LOG_ERR("Could not resize file %s (error %"PRId32"). Creating new one", - name, status); + PBL_LOG_ERR("Could not resize file %s (error %" PRId32 "). Creating new one", name, status); return prv_open(file, name, flags, max_used_space, alloc_used_space, min_alloc_used_space); } } @@ -126,18 +125,17 @@ static status_t prv_open(SettingsFile *file, const char *name, uint8_t flags, return S_SUCCESS; } -status_t settings_file_open(SettingsFile *file, const char *name, - int max_used_space) { - return prv_open(file, name, OP_FLAG_READ | OP_FLAG_WRITE, - max_used_space, max_used_space, max_used_space); +status_t settings_file_open(SettingsFile *file, const char *name, int max_used_space) { + return prv_open(file, name, OP_FLAG_READ | OP_FLAG_WRITE, max_used_space, max_used_space, + max_used_space); } -status_t settings_file_open_growable(SettingsFile *file, const char *name, - int max_used_space, int initial_alloc_size) { +status_t settings_file_open_growable(SettingsFile *file, const char *name, int max_used_space, + int initial_alloc_size) { // prv_grow doubles alloc_used_space; a zero seed would loop forever. PBL_ASSERTN(initial_alloc_size > 0); - return prv_open(file, name, OP_FLAG_READ | OP_FLAG_WRITE, - max_used_space, initial_alloc_size, initial_alloc_size); + return prv_open(file, name, OP_FLAG_READ | OP_FLAG_WRITE, max_used_space, initial_alloc_size, + initial_alloc_size); } void settings_file_close(SettingsFile *file) { @@ -180,12 +178,12 @@ static bool partially_written(SettingsRecordHeader *hdr) { return !flag_is_set(hdr, SETTINGS_FLAG_WRITE_COMPLETE); } static bool partially_overwritten(SettingsRecordHeader *hdr) { - return flag_is_set(hdr, SETTINGS_FLAG_OVERWRITE_STARTED) - && !flag_is_set(hdr, SETTINGS_FLAG_OVERWRITE_COMPLETE); + return flag_is_set(hdr, SETTINGS_FLAG_OVERWRITE_STARTED) && + !flag_is_set(hdr, SETTINGS_FLAG_OVERWRITE_COMPLETE); } static bool overwritten(SettingsRecordHeader *hdr) { - return flag_is_set(hdr, SETTINGS_FLAG_OVERWRITE_STARTED) - && flag_is_set(hdr, SETTINGS_FLAG_OVERWRITE_COMPLETE); + return flag_is_set(hdr, SETTINGS_FLAG_OVERWRITE_STARTED) && + flag_is_set(hdr, SETTINGS_FLAG_OVERWRITE_COMPLETE); } static uint32_t utc_time() { @@ -193,8 +191,7 @@ static uint32_t utc_time() { } static bool deleted_and_expired(SettingsRecordHeader *hdr) { - return (hdr->val_len == 0) - && (hdr->last_modified <= (utc_time() - DELETED_LIFETIME)); + return (hdr->val_len == 0) && (hdr->last_modified <= (utc_time() - DELETED_LIFETIME)); } static void compute_stats(SettingsFile *file) { @@ -202,7 +199,7 @@ static void compute_stats(SettingsFile *file) { file->used_space = 0; file->last_modified = 0; file->used_space += sizeof(SettingsFileHeader); - file->used_space += sizeof(SettingsRecordHeader); // EOF Marker + file->used_space += sizeof(SettingsRecordHeader); // EOF Marker for (settings_raw_iter_begin(&file->iter); !settings_raw_iter_end(&file->iter); settings_raw_iter_next(&file->iter)) { if (overwritten(&file->iter.hdr) || deleted_and_expired(&file->iter.hdr)) { @@ -216,8 +213,9 @@ static void compute_stats(SettingsFile *file) { } } -status_t settings_file_rewrite_filtered( - SettingsFile *file, SettingsFileRewriteFilterCallback filter_cb, void *context) { +status_t settings_file_rewrite_filtered(SettingsFile *file, + SettingsFileRewriteFilterCallback filter_cb, + void *context) { // One reusable buffer for key+val per record; sized for the worst case. // Avoids two malloc/free pairs per record over what can be thousands of // records on a large persist file. @@ -235,12 +233,12 @@ status_t settings_file_rewrite_filtered( task_watchdog_pause(60); SettingsFile new_file; - status_t status = prv_open(&new_file, file->name, OP_FLAG_OVERWRITE | OP_FLAG_READ, - file->max_used_space, file->alloc_used_space, - file->min_alloc_used_space); + status_t status = + prv_open(&new_file, file->name, OP_FLAG_OVERWRITE | OP_FLAG_READ, file->max_used_space, + file->alloc_used_space, file->min_alloc_used_space); if (status < 0) { - PBL_LOG_ERR("Could not open temporary file to compact settings file. Error %"PRIi32".", - status); + PBL_LOG_ERR("Could not open temporary file to compact settings file. Error %" PRIi32 ".", + status); kernel_free(kv_buf); kernel_free(name); task_watchdog_resume(); @@ -250,7 +248,7 @@ status_t settings_file_rewrite_filtered( settings_raw_iter_begin(&new_file.iter); for (settings_raw_iter_begin(&file->iter); !settings_raw_iter_end(&file->iter); - settings_raw_iter_next(&file->iter)) { + settings_raw_iter_next(&file->iter)) { SettingsRecordHeader *hdr = &file->iter.hdr; if (partially_written(hdr)) { // This should only happen if we reboot in the middle of writing a new @@ -293,8 +291,8 @@ status_t settings_file_rewrite_filtered( int alloc_used_space = new_file.alloc_used_space; int min_alloc_used_space = new_file.min_alloc_used_space; settings_file_close(&new_file); - status = prv_open(file, name, OP_FLAG_READ | OP_FLAG_WRITE, - file->max_used_space, alloc_used_space, min_alloc_used_space); + status = prv_open(file, name, OP_FLAG_READ | OP_FLAG_WRITE, file->max_used_space, + alloc_used_space, min_alloc_used_space); kernel_free(name); task_watchdog_resume(); @@ -370,7 +368,7 @@ static bool search_forward(SettingsRawIter *iter, const uint8_t *key, int key_le // Wrap around to the beginning and search until we get to the `resumed_pos` settings_raw_iter_begin(iter); for (; settings_raw_iter_get_current_record_pos(iter) < resumed_pos; - settings_raw_iter_next(iter)) { + settings_raw_iter_next(iter)) { if (prv_is_desired_hdr(iter, key, key_len)) { return true; } @@ -382,8 +380,7 @@ static bool search_forward(SettingsRawIter *iter, const uint8_t *key, int key_le static status_t cleanup_partial_transactions(SettingsFile *file) { for (settings_raw_iter_begin(&file->iter); !settings_raw_iter_end(&file->iter); - settings_raw_iter_next(&file->iter)) { - + settings_raw_iter_next(&file->iter)) { if (partially_written(&file->iter.hdr)) { // Compact will remove partially written records. We could be smarter, // but this is something of an edge case. @@ -394,11 +391,10 @@ static status_t cleanup_partial_transactions(SettingsFile *file) { continue; } - int partially_overwritten_record_pos = - settings_raw_iter_get_current_record_pos(&file->iter); + int partially_overwritten_record_pos = settings_raw_iter_get_current_record_pos(&file->iter); uint8_t key[file->iter.hdr.key_len]; settings_raw_iter_read_key(&file->iter, key); - settings_raw_iter_next(&file->iter); // Skip the current record + settings_raw_iter_next(&file->iter); // Skip the current record bool found_another = search_forward(&file->iter, key, file->iter.hdr.key_len); if (!found_another) { @@ -413,15 +409,14 @@ static status_t cleanup_partial_transactions(SettingsFile *file) { // The overwrite completed, we just rebooted before getting a chance // to flip the completion bit on the previous record. Flip it now so // that we don't have to keep checking on every boot. - settings_raw_iter_set_current_record_pos(&file->iter, - partially_overwritten_record_pos); + settings_raw_iter_set_current_record_pos(&file->iter, partially_overwritten_record_pos); set_flag(&file->iter.hdr, SETTINGS_FLAG_OVERWRITE_COMPLETE); settings_raw_iter_write_header(&file->iter, &file->iter.hdr); } return S_SUCCESS; } -static status_t bootup_check(SettingsFile* file) { +static status_t bootup_check(SettingsFile *file) { return cleanup_partial_transactions(file); } @@ -438,8 +433,8 @@ bool settings_file_exists(SettingsFile *file, const void *key, size_t key_len) { return (settings_file_get_len(file, key, key_len) > 0); } -status_t settings_file_get(SettingsFile *file, const void *key, size_t key_len, - void *val_out, size_t val_out_len) { +status_t settings_file_get(SettingsFile *file, const void *key, size_t key_len, void *val_out, + size_t val_out_len) { settings_raw_iter_resume(&file->iter); if (!search_forward(&file->iter, key, key_len)) { memset(val_out, 0, val_out_len); @@ -458,16 +453,15 @@ status_t settings_file_get(SettingsFile *file, const void *key, size_t key_len, return S_SUCCESS; } -status_t settings_file_set_byte(SettingsFile *file, const void *key, - size_t key_len, size_t offset, uint8_t byte) { +status_t settings_file_set_byte(SettingsFile *file, const void *key, size_t key_len, size_t offset, + uint8_t byte) { if (key_len > SETTINGS_KEY_MAX_LEN) { return E_RANGE; } // Find the record settings_raw_iter_resume(&file->iter); - if (!search_forward(&file->iter, key, key_len) || - file->iter.hdr.val_len == 0) { + if (!search_forward(&file->iter, key, key_len) || file->iter.hdr.val_len == 0) { return E_DOES_NOT_EXIST; } @@ -584,8 +578,8 @@ static status_t prv_settings_file_set_internal(SettingsFile *file, const void *k return S_SUCCESS; } -status_t settings_file_set(SettingsFile *file, const void *key, size_t key_len, - const void *val, size_t val_len) { +status_t settings_file_set(SettingsFile *file, const void *key, size_t key_len, const void *val, + size_t val_len) { return prv_settings_file_set_internal(file, key, key_len, val, val_len, utc_time()); } @@ -620,7 +614,7 @@ static void prv_mark_all_dirty_rewrite_cb(SettingsFile *old_file, SettingsFile * uint8_t *val = kernel_malloc(info->val_len); if (!val) { - return; // Skip this record on OOM + return; // Skip this record on OOM } info->get_val(old_file, val, info->val_len); @@ -635,8 +629,7 @@ status_t settings_file_mark_all_dirty(SettingsFile *file) { return settings_file_rewrite(file, prv_mark_all_dirty_rewrite_cb, NULL); } -status_t settings_file_delete(SettingsFile *file, - const void *key, size_t key_len) { +status_t settings_file_delete(SettingsFile *file, const void *key, size_t key_len) { return settings_file_set(file, key, key_len, NULL, 0); } @@ -650,23 +643,22 @@ static void prv_get_val(SettingsFile *file, void *val, size_t val_len) { settings_raw_iter_set_current_record_pos(&file->iter, file->cur_record_pos); settings_raw_iter_read_val(&file->iter, val, val_len); } -status_t settings_file_each(SettingsFile *file, SettingsFileEachCallback cb, - void *context) { +status_t settings_file_each(SettingsFile *file, SettingsFileEachCallback cb, void *context) { // Cannot set keys while iterating PBL_ASSERTN(file->cur_record_pos == 0); SettingsRecordInfo info; for (settings_raw_iter_begin(&file->iter); !settings_raw_iter_end(&file->iter); - settings_raw_iter_next(&file->iter)) { + settings_raw_iter_next(&file->iter)) { if (overwritten(&file->iter.hdr) || deleted_and_expired(&file->iter.hdr)) { continue; } - info = (SettingsRecordInfo) { - .last_modified = file->iter.hdr.last_modified, - .get_key = prv_get_key, - .key_len = file->iter.hdr.key_len, - .get_val = prv_get_val, - .val_len = file->iter.hdr.val_len, - .dirty = !flag_is_set(&file->iter.hdr, SETTINGS_FLAG_SYNCED), + info = (SettingsRecordInfo){ + .last_modified = file->iter.hdr.last_modified, + .get_key = prv_get_key, + .key_len = file->iter.hdr.key_len, + .get_val = prv_get_val, + .val_len = file->iter.hdr.val_len, + .dirty = !flag_is_set(&file->iter.hdr, SETTINGS_FLAG_SYNCED), }; file->cur_record_pos = settings_raw_iter_get_current_record_pos(&file->iter); // if the callback returns false, stop iterating. @@ -686,32 +678,29 @@ typedef struct { SettingsFile *new_file; void *user_context; } RewriteCbContext; -static bool prv_rewrite_cb(SettingsFile *file, SettingsRecordInfo *info, - void *context) { - RewriteCbContext *cb_ctx = (RewriteCbContext*)context; +static bool prv_rewrite_cb(SettingsFile *file, SettingsRecordInfo *info, void *context) { + RewriteCbContext *cb_ctx = (RewriteCbContext *)context; cb_ctx->cb(file, cb_ctx->new_file, info, cb_ctx->user_context); - return true; // continue iterating + return true; // continue iterating } -status_t settings_file_rewrite(SettingsFile *file, - SettingsFileRewriteCallback cb, void *context) { +status_t settings_file_rewrite(SettingsFile *file, SettingsFileRewriteCallback cb, void *context) { char *name = kernel_strdup(file->name); if (!name) { PBL_LOG_ERR("Could not allocate name to rewrite settings file %s", file->name); return E_OUT_OF_MEMORY; } SettingsFile new_file; - status_t status = prv_open(&new_file, file->name, - OP_FLAG_OVERWRITE | OP_FLAG_READ, - file->max_used_space, file->alloc_used_space, - file->min_alloc_used_space); + status_t status = + prv_open(&new_file, file->name, OP_FLAG_OVERWRITE | OP_FLAG_READ, file->max_used_space, + file->alloc_used_space, file->min_alloc_used_space); if (status < 0) { kernel_free(name); return status; } - RewriteCbContext cb_ctx = (RewriteCbContext) { - .cb = cb, - .new_file = &new_file, - .user_context = context, + RewriteCbContext cb_ctx = (RewriteCbContext){ + .cb = cb, + .new_file = &new_file, + .user_context = context, }; settings_file_each(file, prv_rewrite_cb, &cb_ctx); settings_file_close(file); @@ -722,8 +711,8 @@ status_t settings_file_rewrite(SettingsFile *file, int alloc_used_space = new_file.alloc_used_space; int min_alloc_used_space = new_file.min_alloc_used_space; settings_file_close(&new_file); - status = prv_open(file, name, OP_FLAG_READ | OP_FLAG_WRITE, - file->max_used_space, alloc_used_space, min_alloc_used_space); + status = prv_open(file, name, OP_FLAG_READ | OP_FLAG_WRITE, file->max_used_space, + alloc_used_space, min_alloc_used_space); kernel_free(name); return status; diff --git a/src/fw/services/settings/settings_raw_iter.c b/src/fw/services/settings/settings_raw_iter.c index 9f49863149..3150426899 100644 --- a/src/fw/services/settings/settings_raw_iter.c +++ b/src/fw/services/settings/settings_raw_iter.c @@ -11,8 +11,8 @@ PBL_LOG_MODULE_DECLARE(service_settings, CONFIG_SERVICE_SETTINGS_LOG_LEVEL); - /////////////////////////////////////////////////// - // Helper functions for handling internal errors // +/////////////////////////////////////////////////// +// Helper functions for handling internal errors // /////////////////////////////////////////////////// #if UNITTEST @@ -34,14 +34,13 @@ static uint8_t *read_file_into_ram(SettingsRawIter *iter) { contents = kernel_calloc(1, read_size); } if (contents == NULL) { - PBL_LOG_ERR("Could not allocate %d bytes for corrupt file of size %d.", - read_size, file_size); + PBL_LOG_ERR("Could not allocate %d bytes for corrupt file of size %d.", read_size, file_size); return NULL; } // In case reading the whole file is not possible due to RAM limitations, // read the portions nearest the current seek position, as they are most // likely to be the culprit. - int end_offset = MIN(pos + read_size/2, file_size); + int end_offset = MIN(pos + read_size / 2, file_size); int start_offset = end_offset - read_size; int status = pfs_seek(iter->fd, start_offset, FSeekSet); if (status < 0) { @@ -51,13 +50,14 @@ static uint8_t *read_file_into_ram(SettingsRawIter *iter) { } int actual_read_size = pfs_read(iter->fd, contents, read_size); PBL_LOG_INFO("Read %d (expected %d) bytes of file %s (size %d), around offset %d.", - actual_read_size, read_size, iter->file_name, file_size, pos); + actual_read_size, read_size, iter->file_name, file_size, pos); return contents; } static NORETURN fatal_logic_error(SettingsRawIter *iter) { - PBL_LOG_ERR("settings_raw_iter logic error. " - "Attempting to read affected file into RAM for easier debugging..."); + PBL_LOG_ERR( + "settings_raw_iter logic error. " + "Attempting to read affected file into RAM for easier debugging..."); uint8_t *contents = read_file_into_ram(iter); PBL_LOG_ERR("Removing affected file %s...", iter->file_name); // Remove the file that caused us to get into this state before we reboot, @@ -74,8 +74,8 @@ static int sfs_seek(SettingsRawIter *iter, int amount, int whence) { } int pos = pfs_seek(iter->fd, 0, FSeekCur); - PBL_LOG_ERR("Could not seek by %d from whence %d at pos %d: %"PRId32, - amount, whence, pos, status); + PBL_LOG_ERR("Could not seek by %d from whence %d at pos %d: %" PRId32, amount, whence, pos, + status); fatal_logic_error(iter); } @@ -90,8 +90,8 @@ static int sfs_read(SettingsRawIter *iter, uint8_t *data, int data_len) { } int pos = pfs_seek(iter->fd, 0, FSeekCur); - PBL_LOG_ERR("Could not read data to %p of length %d at pos %d: %"PRId32, - data, data_len, pos, status); + PBL_LOG_ERR("Could not read data to %p of length %d at pos %d: %" PRId32, data, data_len, pos, + status); fatal_logic_error(iter); } @@ -102,13 +102,12 @@ static int sfs_write(SettingsRawIter *iter, const uint8_t *data, int data_len) { } int pos = pfs_seek(iter->fd, 0, FSeekCur); - PBL_LOG_ERR("Could not write from %p, %d bytes at pos %d: %"PRId32, - data, data_len, pos, status); + PBL_LOG_ERR("Could not write from %p, %d bytes at pos %d: %" PRId32, data, data_len, pos, status); fatal_logic_error(iter); } - /////////////////////////// - // Actual Iteration Code // +/////////////////////////// +// Actual Iteration Code // /////////////////////////// void settings_raw_iter_init(SettingsRawIter *iter, int fd, const char *file_name) { @@ -117,13 +116,13 @@ void settings_raw_iter_init(SettingsRawIter *iter, int fd, const char *file_name iter->file_name = file_name; sfs_seek(iter, 0, FSeekSet); - sfs_read(iter, (uint8_t*)&iter->file_hdr, sizeof(iter->file_hdr)); + sfs_read(iter, (uint8_t *)&iter->file_hdr, sizeof(iter->file_hdr)); iter->hdr_pos = -1; iter->resumed_pos = -1; } void settings_raw_iter_write_file_header(SettingsRawIter *iter, SettingsFileHeader *file_hdr) { sfs_seek(iter, 0, FSeekSet); - sfs_write(iter, (uint8_t*)file_hdr, sizeof(*file_hdr)); + sfs_write(iter, (uint8_t *)file_hdr, sizeof(*file_hdr)); iter->file_hdr = *file_hdr; iter->hdr_pos = -1; iter->resumed_pos = -1; @@ -135,7 +134,7 @@ void settings_raw_iter_begin(SettingsRawIter *iter) { // Read header for first record. iter->hdr_pos = sfs_pos(iter); iter->resumed_pos = iter->hdr_pos; - sfs_read(iter, (uint8_t*)&iter->hdr, sizeof(iter->hdr)); + sfs_read(iter, (uint8_t *)&iter->hdr, sizeof(iter->hdr)); } void settings_raw_iter_resume(SettingsRawIter *iter) { @@ -149,7 +148,7 @@ void settings_raw_iter_next(SettingsRawIter *iter) { // Read the next header iter->hdr_pos = sfs_pos(iter); - sfs_read(iter, (uint8_t*)&iter->hdr, sizeof(iter->hdr)); + sfs_read(iter, (uint8_t *)&iter->hdr, sizeof(iter->hdr)); #if UNITTEST s_num_record_changes++; @@ -157,9 +156,9 @@ void settings_raw_iter_next(SettingsRawIter *iter) { } bool settings_raw_iter_end(SettingsRawIter *iter) { SettingsRecordHeader *hdr = &iter->hdr; - return (hdr->last_modified == 0xffffffff) && (hdr->flags == ((1 << FLAGS_BITS) - 1) && - (hdr->key_hash == 0xff) && (hdr->key_len == ((1 << KEY_LEN_BITS) - 1)) && - (hdr->val_len == SETTINGS_EOF_MARKER)); + return (hdr->last_modified == 0xffffffff) && + (hdr->flags == ((1 << FLAGS_BITS) - 1) && (hdr->key_hash == 0xff) && + (hdr->key_len == ((1 << KEY_LEN_BITS) - 1)) && (hdr->val_len == SETTINGS_EOF_MARKER)); } int settings_raw_iter_get_current_record_pos(SettingsRawIter *iter) { @@ -173,24 +172,26 @@ int settings_raw_iter_get_resumed_record_pos(SettingsRawIter *iter) { void settings_raw_iter_set_current_record_pos(SettingsRawIter *iter, int pos) { sfs_seek(iter, pos, FSeekSet); iter->hdr_pos = pos; - sfs_read(iter, (uint8_t*)&iter->hdr, sizeof(iter->hdr)); + sfs_read(iter, (uint8_t *)&iter->hdr, sizeof(iter->hdr)); } void settings_raw_iter_read_key(SettingsRawIter *iter, uint8_t *key_out) { - if (iter->hdr.key_len == 0) return; + if (iter->hdr.key_len == 0) + return; sfs_seek(iter, iter->hdr_pos + sizeof(SettingsRecordHeader), FSeekSet); sfs_read(iter, key_out, iter->hdr.key_len); } void settings_raw_iter_read_val(SettingsRawIter *iter, uint8_t *val_out, int val_len) { - if (iter->hdr.val_len == 0) return; - sfs_seek(iter, iter->hdr_pos - + sizeof(SettingsRecordHeader) + iter->hdr.key_len, FSeekSet); + if (iter->hdr.val_len == 0) + return; + sfs_seek(iter, iter->hdr_pos + sizeof(SettingsRecordHeader) + iter->hdr.key_len, FSeekSet); sfs_read(iter, val_out, val_len); } void settings_raw_iter_read_key_val(SettingsRawIter *iter, uint8_t *key_val_out) { const int kv_len = iter->hdr.key_len + iter->hdr.val_len; - if (kv_len == 0) return; + if (kv_len == 0) + return; sfs_seek(iter, iter->hdr_pos + sizeof(SettingsRecordHeader), FSeekSet); sfs_read(iter, key_val_out, kv_len); } @@ -199,29 +200,32 @@ void settings_raw_iter_write_header(SettingsRawIter *iter, SettingsRecordHeader PBL_ASSERTN(hdr->key_len <= SETTINGS_KEY_MAX_LEN); PBL_ASSERTN(hdr->val_len <= SETTINGS_VAL_MAX_LEN); sfs_seek(iter, iter->hdr_pos, FSeekSet); - sfs_write(iter, (uint8_t*)hdr, sizeof(*hdr)); + sfs_write(iter, (uint8_t *)hdr, sizeof(*hdr)); iter->hdr = *hdr; } void settings_raw_iter_write_key(SettingsRawIter *iter, const uint8_t *key) { - if (iter->hdr.key_len == 0) return; + if (iter->hdr.key_len == 0) + return; sfs_seek(iter, iter->hdr_pos + sizeof(SettingsRecordHeader), FSeekSet); sfs_write(iter, key, iter->hdr.key_len); } void settings_raw_iter_write_val(SettingsRawIter *iter, const uint8_t *val) { - if (iter->hdr.val_len == 0) return; + if (iter->hdr.val_len == 0) + return; sfs_seek(iter, iter->hdr_pos + sizeof(SettingsRecordHeader) + iter->hdr.key_len, FSeekSet); sfs_write(iter, val, iter->hdr.val_len); } void settings_raw_iter_write_key_val(SettingsRawIter *iter, const uint8_t *key_val) { const int kv_len = iter->hdr.key_len + iter->hdr.val_len; - if (kv_len == 0) return; + if (kv_len == 0) + return; sfs_seek(iter, iter->hdr_pos + sizeof(SettingsRecordHeader), FSeekSet); sfs_write(iter, key_val, kv_len); } void settings_raw_iter_write_byte(SettingsRawIter *iter, int offset, uint8_t byte) { - sfs_seek(iter, iter->hdr_pos + - sizeof(SettingsRecordHeader) + iter->hdr.key_len + offset, FSeekSet); + sfs_seek(iter, iter->hdr_pos + sizeof(SettingsRecordHeader) + iter->hdr.key_len + offset, + FSeekSet); sfs_write(iter, &byte, 1); } diff --git a/src/fw/services/shared_prf_storage/shared_prf_storage.c b/src/fw/services/shared_prf_storage/shared_prf_storage.c index 7d92bb53e4..41bd21bafa 100644 --- a/src/fw/services/shared_prf_storage/shared_prf_storage.c +++ b/src/fw/services/shared_prf_storage/shared_prf_storage.c @@ -16,12 +16,12 @@ PBL_LOG_MODULE_DEFINE(service_shared_prf_storage, CONFIG_SERVICE_SHARED_PRF_STORAGE_LOG_LEVEL); -#define SPRF_REGION_SIZE (FLASH_REGION_SHARED_PRF_STORAGE_END - \ - FLASH_REGION_SHARED_PRF_STORAGE_BEGIN) +#define SPRF_REGION_SIZE \ + (FLASH_REGION_SHARED_PRF_STORAGE_END - FLASH_REGION_SHARED_PRF_STORAGE_BEGIN) #define SPRF_NUM_PAGES (SPRF_REGION_SIZE / sizeof(SharedPRFData)) -#define SPRF_PAGE_FLASH_ADDR(idx) (FLASH_REGION_SHARED_PRF_STORAGE_BEGIN + \ - (idx * sizeof(SharedPRFData))) +#define SPRF_PAGE_FLASH_ADDR(idx) \ + (FLASH_REGION_SHARED_PRF_STORAGE_BEGIN + (idx * sizeof(SharedPRFData))) // CRC Unwritten state and size #define SPRF_UNWRITTEN_CRC ((uint32_t)0xFFFFFFFF) #define SPRF_CRC_SIZE (sizeof(uint32_t)) @@ -93,9 +93,9 @@ static bool prv_field_valid(const uint8_t *field, size_t field_size) { return true; } - const uint32_t field_crc = *(uint32_t*)field; - const bool valid_crc = (field_crc == - crc32(CRC32_INIT, SPRF_FIELD_DATA(field), SPRF_FIELD_DATA_SIZE(field_size))); + const uint32_t field_crc = *(uint32_t *)field; + const bool valid_crc = + (field_crc == crc32(CRC32_INIT, SPRF_FIELD_DATA(field), SPRF_FIELD_DATA_SIZE(field_size))); return valid_crc; } @@ -137,16 +137,15 @@ static void prv_write_to_current_page(SharedPRFData *data, bool write_metadata) } static void prv_erase_region_and_save(SharedPRFData *data) { - flash_region_erase_optimal_range_no_watchdog(FLASH_REGION_SHARED_PRF_STORAGE_BEGIN, - FLASH_REGION_SHARED_PRF_STORAGE_BEGIN, - FLASH_REGION_SHARED_PRF_STORAGE_END, - FLASH_REGION_SHARED_PRF_STORAGE_END); + flash_region_erase_optimal_range_no_watchdog( + FLASH_REGION_SHARED_PRF_STORAGE_BEGIN, FLASH_REGION_SHARED_PRF_STORAGE_BEGIN, + FLASH_REGION_SHARED_PRF_STORAGE_END, FLASH_REGION_SHARED_PRF_STORAGE_END); s_valid_page_idx = 0; prv_write_to_current_page(data, false); } static void prv_invalidate_current_page(void) { - PBL_LOG_DBG("Invalidating current page: #%"PRIu32, s_valid_page_idx); + PBL_LOG_DBG("Invalidating current page: #%" PRIu32, s_valid_page_idx); // First, check if the page is Unpopulated SprfMagic magic = prv_get_magic_for_page(s_valid_page_idx); if (magic == SprfMagic_UnpopulatedEntry) { @@ -184,8 +183,10 @@ static void prv_fetch_struct(SharedPRFData *data_out) { flash_read_bytes((uint8_t *)data_out, prv_current_page_flash_addr(), sizeof(*data_out)); if (!prv_valid_struct(data_out)) { - PBL_LOG_WRN("Shared PRF Storage sector # %"PRIu32" is corrupted. Invalidating" - " and starting a new one", s_valid_page_idx); + PBL_LOG_WRN("Shared PRF Storage sector # %" PRIu32 + " is corrupted. Invalidating" + " and starting a new one", + s_valid_page_idx); prv_invalidate_current_page(); memset(data_out, 0xFF, sizeof(*data_out)); } @@ -206,8 +207,8 @@ static void prv_persist_field(uint8_t *field, size_t offset, size_t field_size, const size_t field_data_size = SPRF_FIELD_DATA_SIZE(field_size); const uint32_t old_crc = FIELD_CRC_FROM_DATA(data, offset); - const uint32_t new_crc = (calc_crc) ? crc32(CRC32_INIT, SPRF_FIELD_DATA(field), field_data_size) - : SPRF_UNWRITTEN_CRC; + const uint32_t new_crc = + (calc_crc) ? crc32(CRC32_INIT, SPRF_FIELD_DATA(field), field_data_size) : SPRF_UNWRITTEN_CRC; const bool same_data = (0 == memcmp(SPRF_FIELD_DATA(field), SPRF_FIELD_DATA(((uint8_t *)data) + offset), field_data_size)); @@ -227,8 +228,7 @@ static void prv_persist_field(uint8_t *field, size_t offset, size_t field_size, prv_write_to_current_page(data, true); } - PBL_LOG_DBG("Overwriting SPRF field at offset %d, size %d", - (int)offset, (int)field_size); + PBL_LOG_DBG("Overwriting SPRF field at offset %d, size %d", (int)offset, (int)field_size); // write the crc first so it's easier to detect a non empty field (we can just read if the CRC is // not 0xFFFFFFFF instead of comparing all bytes. @@ -252,8 +252,10 @@ static bool prv_fetch_field(uint8_t *field_out, size_t offset, size_t field_size flash_read_bytes(field_out, prv_current_page_flash_addr() + offset, field_size); if (!prv_field_valid(field_out, field_size)) { // If corrupted field, delete entire page - PBL_LOG_WRN("Shared PRF Storage sector # %"PRIu32" is corrupted. Invalidating" - " and starting a new one", s_valid_page_idx); + PBL_LOG_WRN("Shared PRF Storage sector # %" PRIu32 + " is corrupted. Invalidating" + " and starting a new one", + s_valid_page_idx); prv_invalidate_current_page(); return false; } @@ -268,11 +270,11 @@ static bool prv_fetch_field(uint8_t *field_out, size_t offset, size_t field_size } #define SPRF_PERSIST_FIELD(data, name) \ - prv_persist_field((uint8_t *)&data, offsetof(SharedPRFData, name), sizeof(data), true) + prv_persist_field((uint8_t *)&data, offsetof(SharedPRFData, name), sizeof(data), true) #define SPRF_ERASE_FIELD(name) \ - prv_erase_field(offsetof(SharedPRFData, name), sizeof(((SharedPRFData *)0)->name)) + prv_erase_field(offsetof(SharedPRFData, name), sizeof(((SharedPRFData *)0)->name)) #define SPRF_FETCH_FIELD(data, name) \ - prv_fetch_field((uint8_t *)&data, offsetof(SharedPRFData, name), sizeof(data)) + prv_fetch_field((uint8_t *)&data, offsetof(SharedPRFData, name), sizeof(data)) //! //! SharedPRFStorage API @@ -283,7 +285,6 @@ static bool prv_fetch_field(uint8_t *field_out, size_t offset, size_t field_size //! erase the sector and re-write the info at offset 0. We want to make the chance //! of blocking on an erase ~0, by doing this prep on init. void shared_prf_storage_init(void) { - prv_lock(); { s_valid_page_idx = SPRF_PAGE_IDX_INVALID; @@ -295,7 +296,7 @@ void shared_prf_storage_init(void) { page_magic = prv_get_magic_for_page(i); // Check the magic to see if we need to investigate further and read the entire contents. if (page_magic == SprfMagic_ValidEntry || page_magic == SprfMagic_UnpopulatedEntry) { - flash_read_bytes((uint8_t *) &data, SPRF_PAGE_FLASH_ADDR(i), sizeof(data)); + flash_read_bytes((uint8_t *)&data, SPRF_PAGE_FLASH_ADDR(i), sizeof(data)); if (prv_valid_struct(&data)) { s_valid_page_idx = i; break; @@ -410,8 +411,7 @@ void shared_prf_storage_set_root_keys(SM128BitKey *keys_in) { //! bool shared_prf_storage_get_ble_pairing_data(SMPairingInfo *pairing_info_out, char *name_out, - bool *requires_address_pinning_out, - uint8_t *flags) { + bool *requires_address_pinning_out, uint8_t *flags) { bool rv; prv_lock(); { @@ -428,29 +428,29 @@ bool shared_prf_storage_get_ble_pairing_data(SMPairingInfo *pairing_info_out, ch } if (pairing_info_out) { - *pairing_info_out = (SMPairingInfo) { - .local_encryption_info.ltk = data.l_ltk, - .local_encryption_info.ediv = data.l_ediv, - .local_encryption_info.rand = data.l_rand, - - .remote_encryption_info.ltk = data.r_ltk, - .remote_encryption_info.ediv = data.r_ediv, - .remote_encryption_info.rand = data.r_rand, - - .irk = data.irk, - .identity = data.identity, - .csrk = data.csrk, - - .is_mitm_protection_enabled = data.is_mitm_protection_enabled, - - .is_local_encryption_info_valid = - SPRF_FLAG_IS_SET(data.fields, SprfValidFields_LocalEncryptionInfoValid), - .is_remote_encryption_info_valid = - SPRF_FLAG_IS_SET(data.fields, SprfValidFields_RemoteEncryptionInfoValid), - .is_remote_identity_info_valid = - SPRF_FLAG_IS_SET(data.fields, SprfValidFields_RemoteIdentityInfoValid), - .is_remote_signing_info_valid = - SPRF_FLAG_IS_SET(data.fields, SprfValidFields_RemoteSigningInfoValid), + *pairing_info_out = (SMPairingInfo){ + .local_encryption_info.ltk = data.l_ltk, + .local_encryption_info.ediv = data.l_ediv, + .local_encryption_info.rand = data.l_rand, + + .remote_encryption_info.ltk = data.r_ltk, + .remote_encryption_info.ediv = data.r_ediv, + .remote_encryption_info.rand = data.r_rand, + + .irk = data.irk, + .identity = data.identity, + .csrk = data.csrk, + + .is_mitm_protection_enabled = data.is_mitm_protection_enabled, + + .is_local_encryption_info_valid = + SPRF_FLAG_IS_SET(data.fields, SprfValidFields_LocalEncryptionInfoValid), + .is_remote_encryption_info_valid = + SPRF_FLAG_IS_SET(data.fields, SprfValidFields_RemoteEncryptionInfoValid), + .is_remote_identity_info_valid = + SPRF_FLAG_IS_SET(data.fields, SprfValidFields_RemoteIdentityInfoValid), + .is_remote_signing_info_valid = + SPRF_FLAG_IS_SET(data.fields, SprfValidFields_RemoteSigningInfoValid), }; } @@ -479,9 +479,8 @@ bool shared_prf_storage_get_ble_pairing_data(SMPairingInfo *pairing_info_out, ch return rv; } -void shared_prf_storage_store_ble_pairing_data( - const SMPairingInfo *pairing_info, const char *name, bool requires_address_pinning, - uint8_t flags) { +void shared_prf_storage_store_ble_pairing_data(const SMPairingInfo *pairing_info, const char *name, + bool requires_address_pinning, uint8_t flags) { if (!pairing_info || sm_is_pairing_info_empty(pairing_info)) { PBL_LOG_WRN("PRF Storage: Attempting to store an NULL or empty pairing info"); return; @@ -489,34 +488,34 @@ void shared_prf_storage_store_ble_pairing_data( prv_lock(); { - SprfBlePairingData data = (SprfBlePairingData) { - .l_ediv = pairing_info->local_encryption_info.ediv, - .l_ltk = pairing_info->local_encryption_info.ltk, - .l_rand = pairing_info->local_encryption_info.rand, + SprfBlePairingData data = (SprfBlePairingData){ + .l_ediv = pairing_info->local_encryption_info.ediv, + .l_ltk = pairing_info->local_encryption_info.ltk, + .l_rand = pairing_info->local_encryption_info.rand, - .r_ediv = pairing_info->remote_encryption_info.ediv, - .r_ltk = pairing_info->remote_encryption_info.ltk, - .r_rand = pairing_info->remote_encryption_info.rand, + .r_ediv = pairing_info->remote_encryption_info.ediv, + .r_ltk = pairing_info->remote_encryption_info.ltk, + .r_rand = pairing_info->remote_encryption_info.rand, - .irk = pairing_info->irk, - .identity = pairing_info->identity, + .irk = pairing_info->irk, + .identity = pairing_info->identity, - .csrk = pairing_info->csrk, + .csrk = pairing_info->csrk, - .is_mitm_protection_enabled = pairing_info->is_mitm_protection_enabled, + .is_mitm_protection_enabled = pairing_info->is_mitm_protection_enabled, - .requires_address_pinning = requires_address_pinning, + .requires_address_pinning = requires_address_pinning, - .flags = flags, + .flags = flags, - .fields = SPRF_FLAG_GET_BIT(pairing_info->is_local_encryption_info_valid, - SprfValidFields_LocalEncryptionInfoValid) | - SPRF_FLAG_GET_BIT(pairing_info->is_remote_encryption_info_valid, - SprfValidFields_RemoteEncryptionInfoValid) | - SPRF_FLAG_GET_BIT(pairing_info->is_remote_identity_info_valid, - SprfValidFields_RemoteIdentityInfoValid) | - SPRF_FLAG_GET_BIT(pairing_info->is_remote_signing_info_valid, - SprfValidFields_RemoteSigningInfoValid), + .fields = SPRF_FLAG_GET_BIT(pairing_info->is_local_encryption_info_valid, + SprfValidFields_LocalEncryptionInfoValid) | + SPRF_FLAG_GET_BIT(pairing_info->is_remote_encryption_info_valid, + SprfValidFields_RemoteEncryptionInfoValid) | + SPRF_FLAG_GET_BIT(pairing_info->is_remote_identity_info_valid, + SprfValidFields_RemoteIdentityInfoValid) | + SPRF_FLAG_GET_BIT(pairing_info->is_remote_signing_info_valid, + SprfValidFields_RemoteSigningInfoValid), }; SPRF_PERSIST_FIELD(data, ble_pairing_data); @@ -572,7 +571,7 @@ void shared_prf_storage_set_ble_pinned_address(const BTDeviceAddress *address) { { if (address) { SprfPinnedAddress data = { - .pinned_address = *address, + .pinned_address = *address, }; SPRF_PERSIST_FIELD(data, pinned_address); } else { @@ -605,9 +604,7 @@ bool shared_prf_storage_get_getting_started_complete(void) { void shared_prf_storage_set_getting_started_complete(bool set) { prv_lock(); { - SprfGettingStarted data = { - .is_complete = set - }; + SprfGettingStarted data = {.is_complete = set}; SPRF_PERSIST_FIELD(data, getting_started); } prv_unlock(); @@ -617,15 +614,17 @@ void shared_prf_storage_set_getting_started_complete(bool set) { //! Legacy Stubs for BT Classic - Should never be called so assert if they are! //! -bool shared_prf_storage_get_bt_classic_pairing_data( - BTDeviceAddress *addr_out, char *device_name_out, SM128BitKey *link_key_out, - uint8_t *platform_bits) { +bool shared_prf_storage_get_bt_classic_pairing_data(BTDeviceAddress *addr_out, + char *device_name_out, + SM128BitKey *link_key_out, + uint8_t *platform_bits) { WTF; } -void shared_prf_storage_store_bt_classic_pairing_data( - BTDeviceAddress *addr, const char *device_name, SM128BitKey *link_key, - uint8_t platform_bits) { +void shared_prf_storage_store_bt_classic_pairing_data(BTDeviceAddress *addr, + const char *device_name, + SM128BitKey *link_key, + uint8_t platform_bits) { WTF; } @@ -637,16 +636,15 @@ void shared_prf_storage_erase_bt_classic_pairing_data(void) { WTF; } -void shared_prf_store_pairing_data( - SMPairingInfo *pairing_info, const char *device_name_ble, BTDeviceAddress *addr, - const char *device_name_classic, SM128BitKey *link_key, uint8_t platform_bits) { +void shared_prf_store_pairing_data(SMPairingInfo *pairing_info, const char *device_name_ble, + BTDeviceAddress *addr, const char *device_name_classic, + SM128BitKey *link_key, uint8_t platform_bits) { WTF; } void command_force_shared_prf_flush(void) { } - //! //! Unit test functions //! diff --git a/src/fw/services/shared_prf_storage/shared_prf_storage_debug.c b/src/fw/services/shared_prf_storage/shared_prf_storage_debug.c index 016d6951d0..f65e941aee 100644 --- a/src/fw/services/shared_prf_storage/shared_prf_storage_debug.c +++ b/src/fw/services/shared_prf_storage/shared_prf_storage_debug.c @@ -9,7 +9,6 @@ #include "pbl/services/shared_prf_storage/shared_prf_storage.h" #include "pbl/services/bluetooth/bluetooth_persistent_storage_debug.h" - #include #include #include @@ -25,8 +24,7 @@ void shared_prf_storage_dump_contents(void) { if (shared_prf_storage_get_ble_pairing_data(&pairing_info, name, &requires_address_pinning, &flags)) { bluetooth_persistent_storage_debug_dump_ble_pairing_info(&buf[0], &pairing_info); - prompt_send_response_fmt(buf, sizeof(buf), - "Req addr pin: %u, flags: %x, BLE Dev Name: %s", + prompt_send_response_fmt(buf, sizeof(buf), "Req addr pin: %u, flags: %x, BLE Dev Name: %s", requires_address_pinning, flags, name); } else { prompt_send_response("No BLE Data"); @@ -44,7 +42,7 @@ void shared_prf_storage_dump_contents(void) { BTDeviceAddress addr; if (shared_prf_storage_get_ble_pinned_address(&addr)) { - prompt_send_response_fmt(buf, DISPLAY_BUF_LEN, "\nPinned address: "BT_DEVICE_ADDRESS_FMT, + prompt_send_response_fmt(buf, DISPLAY_BUF_LEN, "\nPinned address: " BT_DEVICE_ADDRESS_FMT, BT_DEVICE_ADDRESS_XPLODE_PTR(&addr)); } @@ -55,5 +53,5 @@ void shared_prf_storage_dump_contents(void) { } prompt_send_response_fmt(buf, BT_DEVICE_NAME_BUFFER_SIZE, "Started Complete: %s", - bool_to_str(shared_prf_storage_get_getting_started_complete())); + bool_to_str(shared_prf_storage_get_getting_started_complete())); } diff --git a/src/fw/services/speaker/note_sequence.c b/src/fw/services/speaker/note_sequence.c index 0dc05eaad5..df2c6c221d 100644 --- a/src/fw/services/speaker/note_sequence.c +++ b/src/fw/services/speaker/note_sequence.c @@ -8,66 +8,47 @@ // 256-entry sine wave lookup table (one full cycle, 16-bit signed amplitude) // Values represent sin(2*pi*i/256) * 32767 static const int16_t s_sine_lut[256] = { - 0, 804, 1608, 2410, 3212, 4011, 4808, 5602, - 6393, 7179, 7962, 8739, 9512, 10278, 11039, 11793, - 12539, 13279, 14010, 14732, 15446, 16151, 16846, 17530, - 18204, 18868, 19519, 20159, 20787, 21403, 22005, 22594, - 23170, 23731, 24279, 24811, 25329, 25832, 26319, 26790, - 27245, 27683, 28105, 28510, 28898, 29268, 29621, 29956, - 30273, 30571, 30852, 31113, 31356, 31580, 31785, 31971, - 32137, 32285, 32412, 32521, 32609, 32678, 32728, 32757, - 32767, 32757, 32728, 32678, 32609, 32521, 32412, 32285, - 32137, 31971, 31785, 31580, 31356, 31113, 30852, 30571, - 30273, 29956, 29621, 29268, 28898, 28510, 28105, 27683, - 27245, 26790, 26319, 25832, 25329, 24811, 24279, 23731, - 23170, 22594, 22005, 21403, 20787, 20159, 19519, 18868, - 18204, 17530, 16846, 16151, 15446, 14732, 14010, 13279, - 12539, 11793, 11039, 10278, 9512, 8739, 7962, 7179, - 6393, 5602, 4808, 4011, 3212, 2410, 1608, 804, - 0, -804, -1608, -2410, -3212, -4011, -4808, -5602, - -6393, -7179, -7962, -8739, -9512, -10278, -11039, -11793, - -12539, -13279, -14010, -14732, -15446, -16151, -16846, -17530, - -18204, -18868, -19519, -20159, -20787, -21403, -22005, -22594, - -23170, -23731, -24279, -24811, -25329, -25832, -26319, -26790, - -27245, -27683, -28105, -28510, -28898, -29268, -29621, -29956, - -30273, -30571, -30852, -31113, -31356, -31580, -31785, -31971, - -32137, -32285, -32412, -32521, -32609, -32678, -32728, -32757, - -32767, -32757, -32728, -32678, -32609, -32521, -32412, -32285, - -32137, -31971, -31785, -31580, -31356, -31113, -30852, -30571, - -30273, -29956, -29621, -29268, -28898, -28510, -28105, -27683, - -27245, -26790, -26319, -25832, -25329, -24811, -24279, -23731, - -23170, -22594, -22005, -21403, -20787, -20159, -19519, -18868, - -18204, -17530, -16846, -16151, -15446, -14732, -14010, -13279, - -12539, -11793, -11039, -10278, -9512, -8739, -7962, -7179, - -6393, -5602, -4808, -4011, -3212, -2410, -1608, -804, + 0, 804, 1608, 2410, 3212, 4011, 4808, 5602, 6393, 7179, 7962, 8739, + 9512, 10278, 11039, 11793, 12539, 13279, 14010, 14732, 15446, 16151, 16846, 17530, + 18204, 18868, 19519, 20159, 20787, 21403, 22005, 22594, 23170, 23731, 24279, 24811, + 25329, 25832, 26319, 26790, 27245, 27683, 28105, 28510, 28898, 29268, 29621, 29956, + 30273, 30571, 30852, 31113, 31356, 31580, 31785, 31971, 32137, 32285, 32412, 32521, + 32609, 32678, 32728, 32757, 32767, 32757, 32728, 32678, 32609, 32521, 32412, 32285, + 32137, 31971, 31785, 31580, 31356, 31113, 30852, 30571, 30273, 29956, 29621, 29268, + 28898, 28510, 28105, 27683, 27245, 26790, 26319, 25832, 25329, 24811, 24279, 23731, + 23170, 22594, 22005, 21403, 20787, 20159, 19519, 18868, 18204, 17530, 16846, 16151, + 15446, 14732, 14010, 13279, 12539, 11793, 11039, 10278, 9512, 8739, 7962, 7179, + 6393, 5602, 4808, 4011, 3212, 2410, 1608, 804, 0, -804, -1608, -2410, + -3212, -4011, -4808, -5602, -6393, -7179, -7962, -8739, -9512, -10278, -11039, -11793, + -12539, -13279, -14010, -14732, -15446, -16151, -16846, -17530, -18204, -18868, -19519, -20159, + -20787, -21403, -22005, -22594, -23170, -23731, -24279, -24811, -25329, -25832, -26319, -26790, + -27245, -27683, -28105, -28510, -28898, -29268, -29621, -29956, -30273, -30571, -30852, -31113, + -31356, -31580, -31785, -31971, -32137, -32285, -32412, -32521, -32609, -32678, -32728, -32757, + -32767, -32757, -32728, -32678, -32609, -32521, -32412, -32285, -32137, -31971, -31785, -31580, + -31356, -31113, -30852, -30571, -30273, -29956, -29621, -29268, -28898, -28510, -28105, -27683, + -27245, -26790, -26319, -25832, -25329, -24811, -24279, -23731, -23170, -22594, -22005, -21403, + -20787, -20159, -19519, -18868, -18204, -17530, -16846, -16151, -15446, -14732, -14010, -13279, + -12539, -11793, -11039, -10278, -9512, -8739, -7962, -7179, -6393, -5602, -4808, -4011, + -3212, -2410, -1608, -804, }; // MIDI note number to frequency (Hz * 256) lookup table for notes 0-127 // Stored as 16.8 fixed-point: freq_hz_x256 = round(440 * 2^((note-69)/12) * 256) // We use uint32_t to hold values for higher notes static const uint32_t s_midi_freq_x256[128] = { - 2093, 2217, 2349, 2489, 2637, 2794, - 2960, 3136, 3322, 3520, 3729, 3951, - 4186, 4435, 4699, 4978, 5274, 5588, - 5920, 6272, 6645, 7040, 7459, 7902, - 8372, 8870, 9397, 9956, 10548, 11175, - 11840, 12544, 13290, 14080, 14917, 15804, - 16744, 17740, 18795, 19912, 21096, 22351, - 23680, 25088, 26580, 28160, 29834, 31609, - 33488, 35479, 37589, 39824, 42192, 44701, - 47359, 50175, 53159, 56320, 59669, 63217, - 66976, 70959, 75178, 79649, 84385, 89402, - 94719, 100351, 106318, 112640, 119338, 126434, - 133952, 141918, 150356, 159297, 168769, 178805, - 189437, 200702, 212636, 225280, 238676, 252868, - 267905, 283835, 300713, 318594, 337539, 357610, - 378874, 401403, 425272, 450560, 477352, 505737, - 535809, 567670, 601425, 637188, 675077, 715219, - 757749, 802807, 850544, 901120, 954703, 1011473, - 1071618, 1135340, 1202851, 1274376, 1350154, 1430439, - 1515497, 1605613, 1701088, 1802240, 1909407, 2022946, - 2143237, 2270680, 2405702, 2548752, 2700309, 2860878, - 3030994, 3211227, + 2093, 2217, 2349, 2489, 2637, 2794, 2960, 3136, 3322, 3520, + 3729, 3951, 4186, 4435, 4699, 4978, 5274, 5588, 5920, 6272, + 6645, 7040, 7459, 7902, 8372, 8870, 9397, 9956, 10548, 11175, + 11840, 12544, 13290, 14080, 14917, 15804, 16744, 17740, 18795, 19912, + 21096, 22351, 23680, 25088, 26580, 28160, 29834, 31609, 33488, 35479, + 37589, 39824, 42192, 44701, 47359, 50175, 53159, 56320, 59669, 63217, + 66976, 70959, 75178, 79649, 84385, 89402, 94719, 100351, 106318, 112640, + 119338, 126434, 133952, 141918, 150356, 159297, 168769, 178805, 189437, 200702, + 212636, 225280, 238676, 252868, 267905, 283835, 300713, 318594, 337539, 357610, + 378874, 401403, 425272, 450560, 477352, 505737, 535809, 567670, 601425, 637188, + 675077, 715219, 757749, 802807, 850544, 901120, 954703, 1011473, 1071618, 1135340, + 1202851, 1274376, 1350154, 1430439, 1515497, 1605613, 1701088, 1802240, 1909407, 2022946, + 2143237, 2270680, 2405702, 2548752, 2700309, 2860878, 3030994, 3211227, }; static uint32_t s_sample_rate; @@ -133,8 +114,10 @@ int16_t note_synth_sample(uint8_t waveform, uint32_t phase_acc, uint32_t phase_i if (dt > 0 && dt < 32768u) { sample += prv_polyblep_q15(t, dt); sample -= prv_polyblep_q15(t ^ 0x8000u, dt); - if (sample > 32767) sample = 32767; - else if (sample < -32768) sample = -32768; + if (sample > 32767) + sample = 32767; + else if (sample < -32768) + sample = -32768; } break; } @@ -165,8 +148,8 @@ int16_t note_synth_sample(uint8_t waveform, uint32_t phase_acc, uint32_t phase_i // Square loses 4.8 dB (1/sqrt(3)); sine loses 3 dB (sqrt(2/3)); // triangle and sawtooth are unchanged. static const uint16_t s_loudness_q15[SpeakerWaveformCount] = { - [SpeakerWaveformSine] = 26755, - [SpeakerWaveformSquare] = 18918, + [SpeakerWaveformSine] = 26755, + [SpeakerWaveformSquare] = 18918, [SpeakerWaveformTriangle] = 32768, [SpeakerWaveformSawtooth] = 32768, }; @@ -199,8 +182,8 @@ static int16_t prv_generate_sample(NoteSequenceState *s) { if (s->phase_inc == 0) { return 0; } - int16_t sample = note_synth_sample(s->current_waveform, s->phase_acc, - s->phase_inc, s->current_velocity); + int16_t sample = + note_synth_sample(s->current_waveform, s->phase_acc, s->phase_inc, s->current_velocity); s->phase_acc += s->phase_inc; return sample; } diff --git a/src/fw/services/speaker/pcm_stream.h b/src/fw/services/speaker/pcm_stream.h index 9f6d538b97..bf93eed6a0 100644 --- a/src/fw/services/speaker/pcm_stream.h +++ b/src/fw/services/speaker/pcm_stream.h @@ -10,11 +10,11 @@ typedef struct { uint8_t *buffer; - uint32_t size; // total capacity in bytes + uint32_t size; // total capacity in bytes uint32_t read_pos; uint32_t write_pos; - uint32_t count; // number of bytes currently buffered - bool closing; // no more writes expected, drain remaining + uint32_t count; // number of bytes currently buffered + bool closing; // no more writes expected, drain remaining } PcmStreamState; //! Initialize a PCM stream ring buffer. diff --git a/src/fw/services/speaker/speaker_service.c b/src/fw/services/speaker/speaker_service.c index aa2dcc0d56..180becc31e 100644 --- a/src/fw/services/speaker/speaker_service.c +++ b/src/fw/services/speaker/speaker_service.c @@ -52,8 +52,8 @@ typedef struct { // Single tone source (raw frequency, no MIDI quantization) uint32_t tone_samples_remaining; - uint32_t tone_phase_acc; // 16.16 fixed-point - uint32_t tone_phase_inc; // per-sample phase increment + uint32_t tone_phase_acc; // 16.16 fixed-point + uint32_t tone_phase_inc; // per-sample phase increment uint8_t tone_waveform; uint8_t tone_velocity; @@ -106,10 +106,10 @@ static PBL_MUTEX_DEFINE(s_lock); static uint8_t s_silence_reasons; //! Analytics: time-weighted average volume, reset on heartbeat. -static uint64_t s_volume_time_product_sum; // Sum of (volume_pct × time_ms) -static RtcTicks s_last_volume_sample_ticks; // Timestamp of last sample -static uint8_t s_last_sampled_volume_pct; // Last volume percentage sampled -static uint32_t s_total_speaker_on_time_ms; // Total speaker on-time tracked +static uint64_t s_volume_time_product_sum; // Sum of (volume_pct × time_ms) +static RtcTicks s_last_volume_sample_ticks; // Timestamp of last sample +static uint8_t s_last_sampled_volume_pct; // Last volume percentage sampled +static uint32_t s_total_speaker_on_time_ms; // Total speaker on-time tracked static void prv_stop_internal(SpeakerFinishReason reason); static void prv_audio_trans_cb(uint32_t *free_size); @@ -154,7 +154,6 @@ static void prv_update_volume_analytics(uint8_t new_volume_pct) { } void speaker_service_init(void) { - memset(&s_state, 0, sizeof(s_state)); s_state.state = SpeakerStateIdle; s_state.source_type = SpeakerSourceNone; @@ -190,9 +189,9 @@ static void prv_log_silence(uint8_t vol, uint8_t effective_vol) { s_silence_reasons = reasons; if (reasons != 0) { - PBL_LOG_INFO("Playing silently: vol=%"PRIu8" cap=%"PRIu8" mute=%d quiet_time_mute=%d", vol, - alerts_preferences_get_speaker_volume(), - (reasons & SPEAKER_SILENT_BY_MUTE) != 0, (reasons & SPEAKER_SILENT_BY_DND) != 0); + PBL_LOG_INFO("Playing silently: vol=%" PRIu8 " cap=%" PRIu8 " mute=%d quiet_time_mute=%d", vol, + alerts_preferences_get_speaker_volume(), (reasons & SPEAKER_SILENT_BY_MUTE) != 0, + (reasons & SPEAKER_SILENT_BY_DND) != 0); } } @@ -237,11 +236,11 @@ static void prv_post_finish_event(SpeakerFinishReason reason) { return; } PebbleEvent e = { - .type = PEBBLE_SPEAKER_EVENT, - .speaker = { - .type = SpeakerEventFinished, - .finish_reason = (uint8_t)reason, - }, + .type = PEBBLE_SPEAKER_EVENT, + .speaker = { + .type = SpeakerEventFinished, + .finish_reason = (uint8_t)reason, + }, }; event_put(&e); } @@ -321,8 +320,10 @@ static inline int16_t prv_cubic_midpoint(int16_t s0, int16_t s1, int16_t s2, int int32_t v = -(int32_t)s0 + 9 * (int32_t)s1 + 9 * (int32_t)s2 - (int32_t)s3; // Clamp to int16_t range before dividing v = (v + 8) >> 4; // divide by 16 with rounding - if (v > 32767) v = 32767; - if (v < -32768) v = -32768; + if (v > 32767) + v = 32767; + if (v < -32768) + v = -32768; return (int16_t)v; } @@ -350,8 +351,7 @@ static uint32_t prv_read_and_convert_pcm(int16_t *out, uint32_t max_out_samples) input_samples_needed = input_bytes_needed / bytes_per_sample; } - uint32_t bytes_read = pcm_stream_read(&s_state.pcm_stream, s_state.raw_buf, - input_bytes_needed); + uint32_t bytes_read = pcm_stream_read(&s_state.pcm_stream, s_state.raw_buf, input_bytes_needed); if (bytes_read == 0) { return 0; } @@ -378,15 +378,13 @@ static uint32_t prv_read_and_convert_pcm(int16_t *out, uint32_t max_out_samples) // midpoint using 4 surrounding points: s[i-1], s[i], s[i+1], s[i+2] // prev_samples[] provides the history across chunk boundaries. for (uint32_t i = 0; i < samples_read; i++) { - int16_t s_prev = (i >= 1) ? prv_decode_sample(s_state.raw_buf, i - 1, is_16bit) - : s_state.prev_samples[1]; + int16_t s_prev = + (i >= 1) ? prv_decode_sample(s_state.raw_buf, i - 1, is_16bit) : s_state.prev_samples[1]; int16_t s_curr = prv_decode_sample(s_state.raw_buf, i, is_16bit); - int16_t s_next = (i + 1 < samples_read) - ? prv_decode_sample(s_state.raw_buf, i + 1, is_16bit) - : s_curr; - int16_t s_next2 = (i + 2 < samples_read) - ? prv_decode_sample(s_state.raw_buf, i + 2, is_16bit) - : s_next; + int16_t s_next = + (i + 1 < samples_read) ? prv_decode_sample(s_state.raw_buf, i + 1, is_16bit) : s_curr; + int16_t s_next2 = + (i + 2 < samples_read) ? prv_decode_sample(s_state.raw_buf, i + 2, is_16bit) : s_next; out[out_pos++] = s_curr; out[out_pos++] = prv_cubic_midpoint(s_prev, s_curr, s_next, s_next2); @@ -394,10 +392,8 @@ static uint32_t prv_read_and_convert_pcm(int16_t *out, uint32_t max_out_samples) // Save last two decoded samples for next chunk's interpolation if (samples_read >= 2) { - s_state.prev_samples[0] = prv_decode_sample(s_state.raw_buf, samples_read - 2, - is_16bit); - s_state.prev_samples[1] = prv_decode_sample(s_state.raw_buf, samples_read - 1, - is_16bit); + s_state.prev_samples[0] = prv_decode_sample(s_state.raw_buf, samples_read - 2, is_16bit); + s_state.prev_samples[1] = prv_decode_sample(s_state.raw_buf, samples_read - 1, is_16bit); } else if (samples_read == 1) { s_state.prev_samples[0] = s_state.prev_samples[1]; s_state.prev_samples[1] = prv_decode_sample(s_state.raw_buf, 0, is_16bit); @@ -417,12 +413,11 @@ static void prv_refill_locked(void) { bool source_exhausted = false; if (s_state.source_type == SpeakerSourceNoteSeq) { - samples_generated = note_seq_fill(&s_state.note_seq, s_state.refill_buf, - SPEAKER_REFILL_SAMPLES); + samples_generated = + note_seq_fill(&s_state.note_seq, s_state.refill_buf, SPEAKER_REFILL_SAMPLES); source_exhausted = (samples_generated == 0); } else if (s_state.source_type == SpeakerSourceStream) { - samples_generated = prv_read_and_convert_pcm(s_state.refill_buf, - SPEAKER_REFILL_SAMPLES); + samples_generated = prv_read_and_convert_pcm(s_state.refill_buf, SPEAKER_REFILL_SAMPLES); if (samples_generated == 0 && pcm_stream_is_done(&s_state.pcm_stream)) { source_exhausted = true; } else if (samples_generated == 0) { @@ -442,10 +437,8 @@ static void prv_refill_locked(void) { memset(s_state.refill_buf, 0, to_gen * sizeof(int16_t)); } else { for (uint32_t i = 0; i < to_gen; i++) { - s_state.refill_buf[i] = note_synth_sample(s_state.tone_waveform, - s_state.tone_phase_acc, - s_state.tone_phase_inc, - s_state.tone_velocity); + s_state.refill_buf[i] = note_synth_sample(s_state.tone_waveform, s_state.tone_phase_acc, + s_state.tone_phase_inc, s_state.tone_velocity); s_state.tone_phase_acc += s_state.tone_phase_inc; } } @@ -455,8 +448,7 @@ static void prv_refill_locked(void) { memset(s_state.mix_buf, 0, sizeof(int32_t) * SPEAKER_REFILL_SAMPLES); uint32_t max_generated = 0; for (uint32_t i = 0; i < s_state.num_tracks; i++) { - uint32_t n = track_fill(&s_state.tracks[i], s_state.track_scratch, - SPEAKER_REFILL_SAMPLES); + uint32_t n = track_fill(&s_state.tracks[i], s_state.track_scratch, SPEAKER_REFILL_SAMPLES); for (uint32_t j = 0; j < n; j++) { s_state.mix_buf[j] += s_state.track_scratch[j]; } @@ -469,8 +461,10 @@ static void prv_refill_locked(void) { } for (uint32_t j = 0; j < max_generated; j++) { int32_t v = s_state.mix_buf[j]; - if (v > 32767) v = 32767; - else if (v < -32768) v = -32768; + if (v > 32767) + v = 32767; + else if (v < -32768) + v = -32768; s_state.refill_buf[j] = (int16_t)v; } samples_generated = max_generated; @@ -497,8 +491,7 @@ static void prv_refill_locked(void) { } if (samples_generated > 0) { - audio_write((AudioDevice *)AUDIO, s_state.refill_buf, - samples_generated * sizeof(int16_t)); + audio_write((AudioDevice *)AUDIO, s_state.refill_buf, samples_generated * sizeof(int16_t)); } } @@ -553,9 +546,8 @@ bool speaker_service_play_note_seq(const SpeakerNote *notes, uint32_t num_notes, return true; } -static bool prv_play_tone_internal(uint16_t freq_hz, uint16_t duration_ms, - uint8_t waveform, uint8_t velocity, - SpeakerPriority pri, uint8_t vol, +static bool prv_play_tone_internal(uint16_t freq_hz, uint16_t duration_ms, uint8_t waveform, + uint8_t velocity, SpeakerPriority pri, uint8_t vol, bool volume_absolute) { pbl_mutex_lock(&s_lock, PBL_FOREVER); @@ -573,12 +565,10 @@ static bool prv_play_tone_internal(uint16_t freq_hz, uint16_t duration_ms, prv_stop_internal(SpeakerFinishReasonPreempted); } - s_state.tone_samples_remaining = - ((uint32_t)duration_ms * SPEAKER_SAMPLE_RATE) / 1000; + s_state.tone_samples_remaining = ((uint32_t)duration_ms * SPEAKER_SAMPLE_RATE) / 1000; s_state.tone_phase_acc = 0; // phase_inc = freq_hz * 65536 / sample_rate (16.16 fixed-point per sample) - s_state.tone_phase_inc = (freq_hz != 0) - ? ((uint32_t)freq_hz * 65536u) / SPEAKER_SAMPLE_RATE : 0; + s_state.tone_phase_inc = (freq_hz != 0) ? ((uint32_t)freq_hz * 65536u) / SPEAKER_SAMPLE_RATE : 0; s_state.tone_waveform = waveform; s_state.tone_velocity = velocity; @@ -595,9 +585,8 @@ static bool prv_play_tone_internal(uint16_t freq_hz, uint16_t duration_ms, return true; } -bool speaker_service_play_tone(uint16_t freq_hz, uint16_t duration_ms, - uint8_t waveform, uint8_t velocity, - SpeakerPriority pri, uint8_t vol) { +bool speaker_service_play_tone(uint16_t freq_hz, uint16_t duration_ms, uint8_t waveform, + uint8_t velocity, SpeakerPriority pri, uint8_t vol) { return prv_play_tone_internal(freq_hz, duration_ms, waveform, velocity, pri, vol, false /* volume_absolute */); } @@ -607,16 +596,15 @@ bool speaker_service_play_volume_preview(uint8_t vol) { vol = 100; } return prv_play_tone_internal(VOLUME_PREVIEW_FREQ_HZ, VOLUME_PREVIEW_DURATION_MS, - SpeakerWaveformSquare, 0 /* velocity: full */, - SpeakerPriorityApp, vol, true /* volume_absolute */); + SpeakerWaveformSquare, 0 /* velocity: full */, SpeakerPriorityApp, + vol, true /* volume_absolute */); } bool speaker_service_play_tracks(const SpeakerTrack *tracks, uint32_t num_tracks, SpeakerPriority pri, uint8_t vol) { pbl_mutex_lock(&s_lock, PBL_FOREVER); - if (!s_state.initialized || !tracks || num_tracks == 0 || - num_tracks > SPEAKER_MAX_TRACKS) { + if (!s_state.initialized || !tracks || num_tracks == 0 || num_tracks > SPEAKER_MAX_TRACKS) { pbl_mutex_unlock(&s_lock); return false; } @@ -754,8 +742,7 @@ bool speaker_service_stream_open(SpeakerPriority pri, uint8_t vol, SpeakerPcmFor uint32_t speaker_service_stream_write(const void *data, uint32_t num_bytes) { pbl_mutex_lock(&s_lock, PBL_FOREVER); - if (s_state.state == SpeakerStateIdle || - s_state.source_type != SpeakerSourceStream) { + if (s_state.state == SpeakerStateIdle || s_state.source_type != SpeakerSourceStream) { pbl_mutex_unlock(&s_lock); return 0; } @@ -866,18 +853,18 @@ void pbl_analytics_external_collect_speaker_stats(void) { pbl_mutex_unlock(&s_lock); } -#else // !CONFIG_SPEAKER +#else // !CONFIG_SPEAKER -void speaker_service_init(void) {} +void speaker_service_init(void) { +} bool speaker_service_play_note_seq(const SpeakerNote *notes, uint32_t num_notes, SpeakerPriority pri, uint8_t vol) { return false; } -bool speaker_service_play_tone(uint16_t freq_hz, uint16_t duration_ms, - uint8_t waveform, uint8_t velocity, - SpeakerPriority pri, uint8_t vol) { +bool speaker_service_play_tone(uint16_t freq_hz, uint16_t duration_ms, uint8_t waveform, + uint8_t velocity, SpeakerPriority pri, uint8_t vol) { return false; } @@ -898,20 +885,30 @@ uint32_t speaker_service_stream_write(const void *data, uint32_t num_bytes) { return 0; } -void speaker_service_stream_close(void) {} -void speaker_service_stop(void) {} -void speaker_service_set_volume(uint8_t vol) {} +void speaker_service_stream_close(void) { +} +void speaker_service_stop(void) { +} +void speaker_service_set_volume(uint8_t vol) { +} SpeakerState speaker_service_get_state(void) { return SpeakerStateIdle; } -void speaker_service_stop_for_task(PebbleTask task) {} -void speaker_service_set_owner_task(PebbleTask task) {} -void speaker_service_register_finish(PebbleTask task) {} -void pbl_analytics_external_collect_speaker_stats(void) {} +void speaker_service_stop_for_task(PebbleTask task) { +} +void speaker_service_set_owner_task(PebbleTask task) { +} +void speaker_service_register_finish(PebbleTask task) { +} +void pbl_analytics_external_collect_speaker_stats(void) { +} -bool speaker_service_is_muted(void) { return false; } -void speaker_service_handle_audio_prefs_changed(void) {} +bool speaker_service_is_muted(void) { + return false; +} +void speaker_service_handle_audio_prefs_changed(void) { +} -#endif // CONFIG_SPEAKER +#endif // CONFIG_SPEAKER diff --git a/src/fw/services/speaker/track_player.c b/src/fw/services/speaker/track_player.c index 36ac646732..ebbcad7098 100644 --- a/src/fw/services/speaker/track_player.c +++ b/src/fw/services/speaker/track_player.c @@ -83,8 +83,7 @@ static int16_t prv_gen_sample_mode(TrackState *s) { } bool is_16bit = (s->sample->format & 2); - int16_t raw_sample = prv_decode_sample_at((const uint8_t *)s->sample->data, - idx, is_16bit); + int16_t raw_sample = prv_decode_sample_at((const uint8_t *)s->sample->data, idx, is_16bit); s->sample_pos_q32 += s->sample_stride_q32; @@ -99,8 +98,8 @@ static int16_t prv_gen_waveform_mode(TrackState *s) { if (s->phase_inc == 0) { return 0; } - int16_t v = note_synth_sample(s->current_waveform, s->phase_acc, s->phase_inc, - s->current_velocity); + int16_t v = + note_synth_sample(s->current_waveform, s->phase_acc, s->phase_inc, s->current_velocity); s->phase_acc += s->phase_inc; return v; } diff --git a/src/fw/services/speaker/track_player.h b/src/fw/services/speaker/track_player.h index 84d5f72168..ea4c3e7e00 100644 --- a/src/fw/services/speaker/track_player.h +++ b/src/fw/services/speaker/track_player.h @@ -17,17 +17,17 @@ typedef struct { const SpeakerSample *sample; uint32_t current_note; - uint32_t samples_remaining; // at output sample rate + uint32_t samples_remaining; // at output sample rate // Waveform-mode state (used when sample == NULL) - uint32_t phase_acc; // 16.16 - uint32_t phase_inc; // 16.16 + uint32_t phase_acc; // 16.16 + uint32_t phase_inc; // 16.16 // Sample-mode state (used when sample != NULL) - uint64_t sample_pos_q32; // 32.32 position within the PCM source - uint64_t sample_stride_q32; // advance per output sample (32.32) - uint32_t sample_num_input; // total input samples in sample->data - bool sample_exhausted; // reached end and loop=false + uint64_t sample_pos_q32; // 32.32 position within the PCM source + uint64_t sample_stride_q32; // advance per output sample (32.32) + uint32_t sample_num_input; // total input samples in sample->data + bool sample_exhausted; // reached end and loop=false uint8_t current_waveform; uint8_t current_velocity; diff --git a/src/fw/services/stationary/service.c b/src/fw/services/stationary/service.c index 3a7d1ed1da..53e29e1640 100644 --- a/src/fw/services/stationary/service.c +++ b/src/fw/services/stationary/service.c @@ -323,14 +323,13 @@ static void prv_handle_action(StationaryAction action) { // we need to be on kernel main so that we subscribe to event services // for kernel main PBL_ASSERT_TASK(PebbleTask_KernelMain); - PBL_LOG_D_DBG(DEBUG_STATIONARY, "Stationary: state %d action %d", - s_current_state, action); + PBL_LOG_D_DBG(DEBUG_STATIONARY, "Stationary: state %d action %d", s_current_state, action); static StationaryActionHandler const prv_action_jump_table[] = { - [StationaryStateAwake] = prv_handle_awake_action, - [StationaryStateStationary] = prv_handle_stationary_action, - [StationaryStatePeeking] = prv_handle_peeking_action, - [StationaryStateDisabled] = prv_handle_disabled_action + [StationaryStateAwake] = prv_handle_awake_action, + [StationaryStateStationary] = prv_handle_stationary_action, + [StationaryStatePeeking] = prv_handle_peeking_action, + [StationaryStateDisabled] = prv_handle_disabled_action }; PBL_ASSERTN(s_current_state < ARRAY_LENGTH(prv_action_jump_table)); prv_action_jump_table[s_current_state](action); @@ -338,14 +337,12 @@ static void prv_handle_action(StationaryAction action) { static void prv_setup_callback_info(void) { //! Timer callback to check whether the watch is stationary every minute - s_accel_stationary_timer_info = (RegularTimerInfo) { - .cb = prv_stationary_check_timer_cb - }; + s_accel_stationary_timer_info = (RegularTimerInfo){.cb = prv_stationary_check_timer_cb}; //! Button press events - s_button_event_info = (EventServiceInfo) { - .type = PEBBLE_BUTTON_DOWN_EVENT, - .handler = prv_button_down_handler, + s_button_event_info = (EventServiceInfo){ + .type = PEBBLE_BUTTON_DOWN_EVENT, + .handler = prv_button_down_handler, }; } diff --git a/src/fw/services/system_task/service.c b/src/fw/services/system_task/service.c index 590b8891fe..2e1749c1c8 100644 --- a/src/fw/services/system_task/service.c +++ b/src/fw/services/system_task/service.c @@ -43,13 +43,13 @@ static bool prv_is_accepting_callbacks() { return s_initialized && !s_should_block_callbacks; } -static void system_task_idle_timer_callback(void* data) { +static void system_task_idle_timer_callback(void *data) { if (s_system_task_idle && pbl_poll_group_is_empty(&s_system_task_queue_set)) { system_task_watchdog_feed(); } } -static void system_task_main(void* paramater) { +static void system_task_main(void *paramater) { task_watchdog_mask_set(PebbleTask_KernelBackground); task_init(); @@ -88,12 +88,12 @@ void system_task_init(void) { extern uint32_t __stack_guard_size__[]; struct pbl_thread_attr attr = { - .name = "KernelBG", - .entry = system_task_main, - .prio = SYSTEM_TASK_PRIORITY, - .privileged = true, - .stack = (void *)((uintptr_t)__kernel_bg_stack_start__ + (uintptr_t)__stack_guard_size__), - .stack_size = (uintptr_t)__kernel_bg_stack_size__ - (uintptr_t)__stack_guard_size__, + .name = "KernelBG", + .entry = system_task_main, + .prio = SYSTEM_TASK_PRIORITY, + .privileged = true, + .stack = (void *)((uintptr_t)__kernel_bg_stack_start__ + (uintptr_t)__stack_guard_size__), + .stack_size = (uintptr_t)__kernel_bg_stack_size__ - (uintptr_t)__stack_guard_size__, }; pebble_task_create(PebbleTask_KernelBackground, &attr); @@ -107,9 +107,7 @@ void system_task_timer_init(void) { // all the other regular tasks. Note that the system_task_idle_timer_callback only kicks // the watchdog if we're currently waiting for work to do on the system_task. If we're in the // middle of something we won't kick it. - static RegularTimerInfo idle_watchdog_timer = { - .cb = system_task_idle_timer_callback - }; + static RegularTimerInfo idle_watchdog_timer = {.cb = system_task_idle_timer_callback}; regular_timer_add_seconds_callback(&idle_watchdog_timer); } @@ -121,12 +119,12 @@ static void handle_system_task_send_failure(SystemTaskEventCallback cb, uintptr_ PBL_LOG_ERR("System task queue full. Dropped cb: %p, current cb: %p", cb, s_current_cb); RebootReason reason = { - .code = RebootReasonCode_EventQueueFull, - .event_queue = { - .push_lr = (uint32_t) caller_lr, - .current_event = (uint32_t) s_current_cb, - .dropped_event = (uint32_t) cb - } + .code = RebootReasonCode_EventQueueFull, + .event_queue = { + .push_lr = (uint32_t)caller_lr, + .current_event = (uint32_t)s_current_cb, + .dropped_event = (uint32_t)cb + } }; reboot_reason_set(&reason); @@ -136,8 +134,8 @@ static void handle_system_task_send_failure(SystemTaskEventCallback cb, uintptr_ static bool prv_send_to_queue_from_isr(SystemTaskEventCallback cb, void *data, bool *should_context_switch) { SystemTaskEvent event = { - .cb = cb, - .data = data, + .cb = cb, + .data = data, }; bool success = (pbl_msgq_put(&s_system_task_queue, &event, PBL_NO_WAIT) == 0); @@ -146,7 +144,8 @@ static bool prv_send_to_queue_from_isr(SystemTaskEventCallback cb, void *data, return success; } -bool system_task_add_callback_from_isr(SystemTaskEventCallback cb, void *data, bool* should_context_switch) { +bool system_task_add_callback_from_isr(SystemTaskEventCallback cb, void *data, + bool *should_context_switch) { // Capture caller LR at entry; reading from a deeper helper is unreliable. uintptr_t caller_lr = (uintptr_t)__builtin_return_address(0); if (!prv_is_accepting_callbacks()) { @@ -177,18 +176,20 @@ bool system_task_add_callback(SystemTaskEventCallback cb, void *data) { } SystemTaskEvent event = { - .cb = cb, - .data = data, + .cb = cb, + .data = data, }; if (pebble_task_get_current() == PebbleTask_App) { // If we're the app and we've filled up our system task, the app just gets to wait. - // FIXME: In the future when we want to bound the amount of time a syscall can take this will have to change. + // FIXME: In the future when we want to bound the amount of time a syscall can take this will + // have to change. pbl_msgq_put(&s_from_app_system_task_queue, &event, PBL_FOREVER); return true; } else { - // Back ourselves up and wait a reasonable amount of time before failing. If the queue is really backed up - // we want to fall through to the handle_system_task_send_failure and not just get killed by the watchdog. + // Back ourselves up and wait a reasonable amount of time before failing. If the queue is really + // backed up we want to fall through to the handle_system_task_send_failure and not just get + // killed by the watchdog. bool success = (pbl_msgq_put(&s_system_task_queue, &event, PBL_MSEC(3000)) == 0); if (!success) { handle_system_task_send_failure(cb, caller_lr); @@ -207,12 +208,12 @@ uint32_t system_task_get_available_space(void) { return pbl_msgq_num_free(is_app ? &s_from_app_system_task_queue : &s_system_task_queue); } -void* system_task_get_current_callback(void) { +void *system_task_get_current_callback(void) { return s_current_cb; } void system_task_enable_raised_priority(bool is_raised) { - const pbl_prio_t raised_priority_level = PBL_PRIO_IDLE + 3; // Same as KernelMain / BT tasks + const pbl_prio_t raised_priority_level = PBL_PRIO_IDLE + 3; // Same as KernelMain / BT tasks pbl_thread_prio_set(pebble_task_get_thread(PebbleTask_KernelBackground), is_raised ? raised_priority_level : SYSTEM_TASK_PRIORITY); } diff --git a/src/fw/services/tick_timer/service.c b/src/fw/services/tick_timer/service.c index 298480967c..a8d15f6ed8 100644 --- a/src/fw/services/tick_timer/service.c +++ b/src/fw/services/tick_timer/service.c @@ -13,18 +13,16 @@ PBL_LOG_MODULE_DEFINE(service_tick_timer, CONFIG_SERVICE_TICK_TIMER_LOG_LEVEL); static uint16_t s_num_subscribers; -static void timer_tick_event_publisher(void* data) { +static void timer_tick_event_publisher(void *data) { PebbleEvent e = { - .type = PEBBLE_TICK_EVENT, - .clock_tick.tick_time = rtc_get_time(), + .type = PEBBLE_TICK_EVENT, + .clock_tick.tick_time = rtc_get_time(), }; event_put(&e); } -static RegularTimerInfo s_tick_timer_info = { - .cb = &timer_tick_event_publisher -}; +static RegularTimerInfo s_tick_timer_info = {.cb = &timer_tick_event_publisher}; void tick_timer_add_subscriber(PebbleTask task) { ++s_num_subscribers; diff --git a/src/fw/services/timeline/actions_endpoint.c b/src/fw/services/timeline/actions_endpoint.c index 2f91425df6..f6f69256c5 100644 --- a/src/fw/services/timeline/actions_endpoint.c +++ b/src/fw/services/timeline/actions_endpoint.c @@ -37,9 +37,9 @@ typedef enum { } Response; typedef struct PACKED { - Command command:8; + Command command : 8; Uuid item_id; - Response response:8; + Response response : 8; } ResponseHeader; typedef struct PACKED { @@ -56,7 +56,7 @@ typedef struct PACKED { } PhoneActionResponseMsg; typedef struct PACKED { - Command command:8; + Command command : 8; Uuid item_id; uint8_t action_id; uint8_t num_attributes; @@ -70,17 +70,15 @@ typedef struct { T_STATIC const int TIMELINE_ACTION_ENDPOINT = 0x2cb0; - static void prv_action_system_task_callback(void *data) { InvokeActionMsgCbData *action = data; comm_session_send_data(comm_session_get_system_session(), TIMELINE_ACTION_ENDPOINT, - (uint8_t *)&action->msg, action->length, COMM_SESSION_DEFAULT_TIMEOUT); + (uint8_t *)&action->msg, action->length, COMM_SESSION_DEFAULT_TIMEOUT); kernel_free(action); } - static ActionResultType prv_get_action_result_type(ResponseHeader *header) { switch (header->response) { case ResponseACK: @@ -98,9 +96,8 @@ static ActionResultType prv_get_action_result_type(ResponseHeader *header) { } static PebbleSysNotificationActionResult *prv_action_result_create_from_serial_data( - ResponseHeader *header, uint8_t num_attributes, uint8_t num_actions, - const uint8_t *data, size_t size) { - + ResponseHeader *header, uint8_t num_attributes, uint8_t num_actions, const uint8_t *data, + size_t size) { size_t string_alloc_size; uint8_t attributes_per_action[num_actions]; bool r = attributes_actions_parse_serial_data(num_attributes, num_actions, data, size, @@ -109,9 +106,8 @@ static PebbleSysNotificationActionResult *prv_action_result_create_from_serial_d return NULL; } - const size_t alloc_size = attributes_actions_get_required_buffer_size(num_attributes, num_actions, - attributes_per_action, - string_alloc_size); + const size_t alloc_size = attributes_actions_get_required_buffer_size( + num_attributes, num_actions, attributes_per_action, string_alloc_size); PebbleSysNotificationActionResult *action_result = kernel_zalloc(sizeof(PebbleSysNotificationActionResult) + alloc_size); @@ -126,8 +122,8 @@ static PebbleSysNotificationActionResult *prv_action_result_create_from_serial_d action_result->id = header->item_id; action_result->type = prv_get_action_result_type(header); - attributes_actions_init(&action_result->attr_list, &action_result->action_group, - &buffer, num_attributes, num_actions, attributes_per_action); + attributes_actions_init(&action_result->attr_list, &action_result->action_group, &buffer, + num_attributes, num_actions, attributes_per_action); if (!attributes_actions_deserialize(&action_result->attr_list, &action_result->action_group, buffer, buf_end, data, size)) { @@ -158,8 +154,8 @@ void timeline_action_endpoint_invoke_action(const Uuid *id, TimelineItemActionTy invoke_action_data->msg.item_id = *id; if (attributes != NULL) { invoke_action_data->msg.num_attributes = attributes->num_attributes; - size_t added_data_size = attribute_list_serialize(attributes, invoke_action_data->msg.data, - invoke_action_data->msg.data + attr_data_size); + size_t added_data_size = attribute_list_serialize( + attributes, invoke_action_data->msg.data, invoke_action_data->msg.data + attr_data_size); PBL_ASSERTN(added_data_size == attr_data_size); } else { invoke_action_data->msg.num_attributes = 0; @@ -167,8 +163,7 @@ void timeline_action_endpoint_invoke_action(const Uuid *id, TimelineItemActionTy char uuid_string[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(id, uuid_string); - PBL_LOG_INFO("Send action to phone (Item ID: %s; Action ID: %d)", - uuid_string, action_id); + PBL_LOG_INFO("Send action to phone (Item ID: %s; Action ID: %d)", uuid_string, action_id); PBL_HEXDUMP(LOG_LEVEL_DEBUG, (uint8_t *)&invoke_action_data->msg, invoke_action_data->length); @@ -176,20 +171,20 @@ void timeline_action_endpoint_invoke_action(const Uuid *id, TimelineItemActionTy system_task_add_callback(prv_action_system_task_callback, invoke_action_data); } else { comm_session_send_data(comm_session_get_system_session(), TIMELINE_ACTION_ENDPOINT, - (uint8_t *)&invoke_action_data->msg, invoke_action_data->length, - COMM_SESSION_DEFAULT_TIMEOUT); + (uint8_t *)&invoke_action_data->msg, invoke_action_data->length, + COMM_SESSION_DEFAULT_TIMEOUT); kernel_free(invoke_action_data); } } -void timeline_action_endpoint_protocol_msg_callback(CommSession *session, - const uint8_t* data, size_t length) { +void timeline_action_endpoint_protocol_msg_callback(CommSession *session, const uint8_t *data, + size_t length) { if (length < sizeof(ResponseHeader)) { - PBL_LOG_WRN("Invalid phone response message length %d", (int) length); + PBL_LOG_WRN("Invalid phone response message length %d", (int)length); return; } - ResponseHeader *header = (ResponseHeader *) data; + ResponseHeader *header = (ResponseHeader *)data; if (header->command != CommandPhoneResponse && header->command != CommandPhoneActionResponse) { PBL_LOG_WRN("Invalid command id"); return; diff --git a/src/fw/services/timeline/alarm_layout.c b/src/fw/services/timeline/alarm_layout.c index e63c516110..61b90009f4 100644 --- a/src/fw/services/timeline/alarm_layout.c +++ b/src/fw/services/timeline/alarm_layout.c @@ -26,7 +26,7 @@ static void prv_until_time_update(const LayoutLayer *layout_ref, const LayoutNodeTextDynamicConfig *config, char *buffer, bool render) { const TimelineLayout *layout = (TimelineLayout *)layout_ref; - const int max_relative_hours = 24; // show up to "in 24 hours" + const int max_relative_hours = 24; // show up to "in 24 hours" clock_get_until_time_without_fulltime(buffer, config->buffer_size, layout->info->timestamp, max_relative_hours); } @@ -78,33 +78,34 @@ static void prv_time_am_pm_update(const LayoutLayer *layout_ref, clock_get_time_word(buffer, config->buffer_size, layout->info->timestamp); } -static GTextNode *prv_time_node_constructor( - const LayoutLayer *layout_ref, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_time_node_constructor(const LayoutLayer *layout_ref, + const LayoutNodeConstructorConfig *config) { static const LayoutNodeTextDynamicConfig s_time_default_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = timeline_layout_time_text_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.font_key = FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, - .text.alignment = LayoutTextAlignment_Center, + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = timeline_layout_time_text_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.font_key = FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, + .text.alignment = LayoutTextAlignment_Center, }; static const LayoutNodeTextDynamicConfig s_time_digits_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_time_digits_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.font_key = FONT_KEY_LECO_42_NUMBERS, - .text.alignment = LayoutTextAlignment_Left, - .text.extent.margin.w = 4, + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_time_digits_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.font_key = FONT_KEY_LECO_42_NUMBERS, + .text.alignment = LayoutTextAlignment_Left, + .text.extent.margin.w = 4, }; static const LayoutNodeTextDynamicConfig s_time_am_pm_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_time_am_pm_update, - .buffer_size = 4, - .text.font_key = FONT_KEY_GOTHIC_28_BOLD, - .text.alignment = LayoutTextAlignment_Left, - .text.extent.offset.y = 14, + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_time_am_pm_update, + .buffer_size = 4, + .text.font_key = FONT_KEY_GOTHIC_28_BOLD, + .text.alignment = LayoutTextAlignment_Left, + .text.extent.offset.y = 14, }; - const bool use_large_time = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + const bool use_large_time = PREFERRED_CONTENT_SIZE_SWITCH( + PreferredContentSizeDefault, /* small */ false, /* medium */ false, /* large */ true, /* extralarge */ true); if (!use_large_time) { @@ -113,10 +114,10 @@ static GTextNode *prv_time_node_constructor( GTextNodeHorizontal *horizontal_node = graphics_text_node_create_horizontal(2); horizontal_node->horizontal_alignment = GTextAlignmentCenter; - GTextNode *digits_node = layout_create_text_node_from_config( - layout_ref, &s_time_digits_config.text.extent.node); - GTextNode *am_pm_node = layout_create_text_node_from_config( - layout_ref, &s_time_am_pm_config.text.extent.node); + GTextNode *digits_node = + layout_create_text_node_from_config(layout_ref, &s_time_digits_config.text.extent.node); + GTextNode *am_pm_node = + layout_create_text_node_from_config(layout_ref, &s_time_am_pm_config.text.extent.node); graphics_text_node_container_add_child(&horizontal_node->container, digits_node); graphics_text_node_container_add_child(&horizontal_node->container, am_pm_node); return &horizontal_node->container.node; @@ -124,55 +125,56 @@ static GTextNode *prv_time_node_constructor( static GTextNode *prv_card_view_constructor(TimelineLayout *timeline_layout) { static const LayoutNodeTextDynamicConfig s_title_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_until_time_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, - .text.alignment = LayoutTextAlignment_Center, - .text.extent.margin.h = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* small */ PBL_IF_RECT_ELSE(2, 0), - /* medium */ PBL_IF_RECT_ELSE(2, 0), - /* large */ 2, - /* extralarge */ 2), // title margin height + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_until_time_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, + .text.alignment = LayoutTextAlignment_Center, + .text.extent.margin.h = + PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + /* small */ PBL_IF_RECT_ELSE(2, 0), + /* medium */ PBL_IF_RECT_ELSE(2, 0), + /* large */ 2, + /* extralarge */ 2), // title margin height }; static const LayoutNodeConstructorConfig s_time_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_time_node_constructor, - .extent.margin.h = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* small */ PBL_IF_RECT_ELSE(9, 1), - /* medium */ PBL_IF_RECT_ELSE(9, 1), - /* large */ 5, - /* extralarge */ 5), // time margin height + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_time_node_constructor, + .extent.margin.h = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + /* small */ PBL_IF_RECT_ELSE(9, 1), + /* medium */ PBL_IF_RECT_ELSE(9, 1), + /* large */ 5, + /* extralarge */ 5), // time margin height }; static const LayoutNodeExtentConfig s_icon_config = { - .node.type = LayoutNodeType_TimelineIcon, - .margin.h = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* small */ PBL_IF_RECT_ELSE(3, 1), - /* medium */ PBL_IF_RECT_ELSE(3, 1), - /* large */ 0, - /* extralarge */ 0), // icon margin height + .node.type = LayoutNodeType_TimelineIcon, + .margin.h = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + /* small */ PBL_IF_RECT_ELSE(3, 1), + /* medium */ PBL_IF_RECT_ELSE(3, 1), + /* large */ 0, + /* extralarge */ 0), // icon margin height }; static const LayoutNodeTextDynamicConfig s_subtitle_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_subtitle_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, - .text.alignment = LayoutTextAlignment_Center, + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_subtitle_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, + .text.alignment = LayoutTextAlignment_Center, }; - static const LayoutNodeConfig * const s_vertical_config_nodes[] = { - PBL_IF_RECT_ELSE(&s_title_config.text.extent.node, &s_icon_config.node), - PBL_IF_RECT_ELSE(&s_time_config.extent.node, &s_title_config.text.extent.node), - PBL_IF_RECT_ELSE(&s_icon_config.node, &s_time_config.extent.node), - &s_subtitle_config.text.extent.node, + static const LayoutNodeConfig *const s_vertical_config_nodes[] = { + PBL_IF_RECT_ELSE(&s_title_config.text.extent.node, &s_icon_config.node), + PBL_IF_RECT_ELSE(&s_time_config.extent.node, &s_title_config.text.extent.node), + PBL_IF_RECT_ELSE(&s_icon_config.node, &s_time_config.extent.node), + &s_subtitle_config.text.extent.node, }; static const LayoutNodeVerticalConfig s_vertical_config = { - .container.extent.node.type = LayoutNodeType_Vertical, - .container.num_nodes = ARRAY_LENGTH(s_vertical_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_vertical_config_nodes, - .container.extent.offset.y = CARD_MARGIN_TOP, - .container.extent.margin.h = CARD_MARGIN_TOP, + .container.extent.node.type = LayoutNodeType_Vertical, + .container.num_nodes = ARRAY_LENGTH(s_vertical_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_vertical_config_nodes, + .container.extent.offset.y = CARD_MARGIN_TOP, + .container.extent.margin.h = CARD_MARGIN_TOP, }; return layout_create_text_node_from_config(&timeline_layout->layout_layer, @@ -191,18 +193,19 @@ LayoutLayer *alarm_layout_create(const LayoutLayerConfig *config) { AlarmLayout *layout = task_zalloc_check(sizeof(AlarmLayout)); static const TimelineLayoutImpl s_timeline_layout_impl = { - .attributes = { AttributeIdTitle, AttributeIdSubtitle }, - .default_colors = { { .argb = GColorBlackARGB8 }, - { .argb = GColorClearARGB8 }, - { .argb = GColorJaegerGreenARGB8 } }, - .default_icon = TIMELINE_RESOURCE_ALARM_CLOCK, - .card_icon_align = GAlignCenter, - .card_icon_size = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* small */ TimelineResourceSizeSmall, - /* medium */ TimelineResourceSizeSmall, - /* large */ TimelineResourceSizeLarge, - /* extralarge */ TimelineResourceSizeLarge), - .card_view_constructor = prv_card_view_constructor, + .attributes = {AttributeIdTitle, AttributeIdSubtitle}, + .default_colors = + {{.argb = GColorBlackARGB8}, + {.argb = GColorClearARGB8}, + {.argb = GColorJaegerGreenARGB8}}, + .default_icon = TIMELINE_RESOURCE_ALARM_CLOCK, + .card_icon_align = GAlignCenter, + .card_icon_size = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + /* small */ TimelineResourceSizeSmall, + /* medium */ TimelineResourceSizeSmall, + /* large */ TimelineResourceSizeLarge, + /* extralarge */ TimelineResourceSizeLarge), + .card_view_constructor = prv_card_view_constructor, }; timeline_layout_init((TimelineLayout *)layout, config, &s_timeline_layout_impl); diff --git a/src/fw/services/timeline/attribute.c b/src/fw/services/timeline/attribute.c index 0b5da37942..3df03e01ca 100644 --- a/src/fw/services/timeline/attribute.c +++ b/src/fw/services/timeline/attribute.c @@ -18,8 +18,9 @@ PBL_LOG_MODULE_DECLARE(service_timeline, CONFIG_SERVICE_TIMELINE_LOG_LEVEL); #define MAX_LENGTH_ANCS_ACTION (1) #define MAX_LENGTH_CANNED_RESPONSES (512) -static const uint16_t MAX_ATTRIBUTE_LENGTHS[] = - {MAX_LENGTH_TITLE, MAX_LENGTH_SUBTITLE, MAX_LENGTH_BODY}; +static const uint16_t MAX_ATTRIBUTE_LENGTHS[] = { + MAX_LENGTH_TITLE, MAX_LENGTH_SUBTITLE, MAX_LENGTH_BODY +}; typedef enum { AttributeTypeUnknown, @@ -138,20 +139,20 @@ static bool prv_deserialize_attribute(char **buffer, char *const buf_end, const if (attribute->length != sizeof(uint32_t)) { return false; } - notif_attr->uint32 = *(uint32_t*)*cursor; + notif_attr->uint32 = *(uint32_t *)*cursor; break; case AttributeTypeResourceId: if (attribute->length != sizeof(uint32_t)) { return false; } - notif_attr->uint32 = *(uint32_t*)*cursor; + notif_attr->uint32 = *(uint32_t *)*cursor; break; case AttributeTypeStringList: { notif_attr->string_list = (StringList *)*buffer; - notif_attr->string_list->serialized_byte_length = MIN((uint16_t)MAX_LENGTH_CANNED_RESPONSES, - attribute->length); + notif_attr->string_list->serialized_byte_length = + MIN((uint16_t)MAX_LENGTH_CANNED_RESPONSES, attribute->length); uint16_t data_length = notif_attr->string_list->serialized_byte_length + - (uint16_t)sizeof(char); // terminator after last string + (uint16_t)sizeof(char); // terminator after last string *buffer += sizeof(StringList) + data_length; PBL_ASSERTN(*buffer <= buf_end); memcpy(notif_attr->string_list->data, *cursor, data_length - 1); @@ -175,7 +176,7 @@ static bool prv_deserialize_attribute(char **buffer, char *const buf_end, const } static int32_t prv_get_buffer_size_for_serialized_attribute(const uint8_t **cursor, - const uint8_t *end) { + const uint8_t *end) { SerializedAttributeHeader *attribute = (SerializedAttributeHeader *)*cursor; *cursor += sizeof(SerializedAttributeHeader); if ((*cursor + attribute->length) > end) { @@ -185,8 +186,7 @@ static int32_t prv_get_buffer_size_for_serialized_attribute(const uint8_t **curs switch (prv_attribute_type(attribute->id)) { case AttributeTypeString: if (attribute->id <= AttributeIdBody) { - string_alloc_size += - MIN(MAX_ATTRIBUTE_LENGTHS[attribute->id - 1], attribute->length) + 1; + string_alloc_size += MIN(MAX_ATTRIBUTE_LENGTHS[attribute->id - 1], attribute->length) + 1; } else if (attribute->id == AttributeIdSubtitleTemplateString) { string_alloc_size += MIN(ATTRIBUTE_APP_GLANCE_SUBTITLE_MAX_LEN, attribute->length) + 1; } else { @@ -194,8 +194,8 @@ static int32_t prv_get_buffer_size_for_serialized_attribute(const uint8_t **curs } break; case AttributeTypeStringList: - string_alloc_size += sizeof(StringList) - + MIN(MAX_LENGTH_CANNED_RESPONSES, attribute->length) + 1; + string_alloc_size += + sizeof(StringList) + MIN(MAX_LENGTH_CANNED_RESPONSES, attribute->length) + 1; break; case AttributeTypeUint32List: string_alloc_size += attribute->length; @@ -222,7 +222,8 @@ Attribute *prv_add_attribute(AttributeList *list, AttributeId id) { } int32_t attribute_get_buffer_size_for_serialized_attributes(uint8_t num_attributes, - const uint8_t **cursor, const uint8_t *end) { + const uint8_t **cursor, + const uint8_t *end) { int32_t size = 0; for (unsigned int i = 0; i < num_attributes; i++) { int32_t result = prv_get_buffer_size_for_serialized_attribute(cursor, end); @@ -243,31 +244,30 @@ size_t attribute_list_get_serialized_size(const AttributeList *attr_list) { size += (attr_list->num_attributes * sizeof(SerializedAttributeHeader)); for (int i = 0; i < attr_list->num_attributes; i++) { switch (prv_attribute_type(attr_list->attributes[i].id)) { - case AttributeTypeString: - size += strlen(attr_list->attributes[i].cstring); - break; - case AttributeTypeResourceId: - case AttributeTypeUint32: - size += sizeof(attr_list->attributes[i].uint32); - break; - case AttributeTypeUint8: - size += sizeof(attr_list->attributes[i].uint8); - break; - case AttributeTypeStringList: - size += attr_list->attributes[i].string_list->serialized_byte_length; - break; - case AttributeTypeUint32List: - size += Uint32ListSize(attr_list->attributes[i].uint32_list->num_values); - break; - default: - break; + case AttributeTypeString: + size += strlen(attr_list->attributes[i].cstring); + break; + case AttributeTypeResourceId: + case AttributeTypeUint32: + size += sizeof(attr_list->attributes[i].uint32); + break; + case AttributeTypeUint8: + size += sizeof(attr_list->attributes[i].uint8); + break; + case AttributeTypeStringList: + size += attr_list->attributes[i].string_list->serialized_byte_length; + break; + case AttributeTypeUint32List: + size += Uint32ListSize(attr_list->attributes[i].uint32_list->num_values); + break; + default: + break; } } return size; } size_t attribute_list_serialize(const AttributeList *attr_list, uint8_t *buffer, uint8_t *buf_end) { - PBL_ASSERTN(attr_list != NULL); PBL_ASSERTN(buffer != NULL); PBL_ASSERTN(buf_end != NULL); @@ -280,31 +280,31 @@ size_t attribute_list_serialize(const AttributeList *attr_list, uint8_t *buffer, PBL_ASSERTN(buffer <= buf_end); attribute->id = attr_list->attributes[i].id; switch (prv_attribute_type(attr_list->attributes[i].id)) { - case AttributeTypeString: - attribute->length = strlen(attr_list->attributes[i].cstring); - memcpy(buffer, attr_list->attributes[i].cstring, attribute->length); - break; - case AttributeTypeUint32: - case AttributeTypeResourceId: - attribute->length = sizeof(uint32_t); - memcpy(buffer, &attr_list->attributes[i].uint32, attribute->length); - break; - case AttributeTypeUint8: - attribute->length = sizeof(uint8_t); - memcpy(buffer, &attr_list->attributes[i].uint8, attribute->length); - break; - - case AttributeTypeStringList: - attribute->length = attr_list->attributes[i].string_list->serialized_byte_length; - memcpy(buffer, attr_list->attributes[i].string_list->data, attribute->length); - break; - case AttributeTypeUint32List: - attribute->length = Uint32ListSize(attr_list->attributes[i].uint32_list->num_values); - memcpy(buffer, attr_list->attributes[i].uint32_list, attribute->length); - break; - default: - attribute->length = 0; - break; + case AttributeTypeString: + attribute->length = strlen(attr_list->attributes[i].cstring); + memcpy(buffer, attr_list->attributes[i].cstring, attribute->length); + break; + case AttributeTypeUint32: + case AttributeTypeResourceId: + attribute->length = sizeof(uint32_t); + memcpy(buffer, &attr_list->attributes[i].uint32, attribute->length); + break; + case AttributeTypeUint8: + attribute->length = sizeof(uint8_t); + memcpy(buffer, &attr_list->attributes[i].uint8, attribute->length); + break; + + case AttributeTypeStringList: + attribute->length = attr_list->attributes[i].string_list->serialized_byte_length; + memcpy(buffer, attr_list->attributes[i].string_list->data, attribute->length); + break; + case AttributeTypeUint32List: + attribute->length = Uint32ListSize(attr_list->attributes[i].uint32_list->num_values); + memcpy(buffer, attr_list->attributes[i].uint32_list, attribute->length); + break; + default: + attribute->length = 0; + break; } buffer += attribute->length; PBL_ASSERTN(buffer <= buf_end); @@ -312,9 +312,8 @@ size_t attribute_list_serialize(const AttributeList *attr_list, uint8_t *buffer, return buffer - buf_start; } -bool attribute_deserialize_list(char **buffer, char *const buf_end, - const uint8_t **cursor, const uint8_t *payload_end, AttributeList attr_list) { - +bool attribute_deserialize_list(char **buffer, char *const buf_end, const uint8_t **cursor, + const uint8_t *payload_end, AttributeList attr_list) { for (int i = 0; i < attr_list.num_attributes; i++) { if (!prv_deserialize_attribute(buffer, buf_end, cursor, payload_end, &attr_list.attributes[i])) { @@ -328,9 +327,10 @@ bool attribute_deserialize_list(char **buffer, char *const buf_end, static size_t prv_get_attribute_length(const Attribute *attr) { switch (prv_attribute_type(attr->id)) { case AttributeTypeString: - return strlen(attr->cstring) + 1; // +1 for null char + return strlen(attr->cstring) + 1; // +1 for null char case AttributeTypeStringList: - return sizeof(StringList) + attr->string_list->serialized_byte_length + 1; // +1 for null char + return sizeof(StringList) + attr->string_list->serialized_byte_length + + 1; // +1 for null char case AttributeTypeUint32List: return Uint32ListSize(attr->uint32_list->num_values); default: @@ -399,8 +399,8 @@ bool attribute_list_copy(AttributeList *out, const AttributeList *in, uint8_t *b } for (int i = 0; i < in->num_attributes; i++) { - bool r = prv_deep_copy_attribute(&out->attributes[i], &in->attributes[i], - &write_ptr, buffer_end); + bool r = + prv_deep_copy_attribute(&out->attributes[i], &in->attributes[i], &write_ptr, buffer_end); if (!r) { return false; } @@ -425,7 +425,7 @@ void attribute_list_add_cstring(AttributeList *list, AttributeId id, const char if (prv_attribute_type(id) != AttributeTypeString) { PBL_LOG_WRN("Adding attribute with type cstring for non-cstring attribute"); } - prv_add_attribute(list, id)->cstring = (char*) cstring; + prv_add_attribute(list, id)->cstring = (char *)cstring; } void attribute_list_add_uint32(AttributeList *list, AttributeId id, uint32_t uint32) { @@ -435,11 +435,11 @@ void attribute_list_add_uint32(AttributeList *list, AttributeId id, uint32_t uin prv_add_attribute(list, id)->uint32 = uint32; } -void attribute_list_add_resource_id(AttributeList *list, AttributeId id, - uint32_t resource_id) { +void attribute_list_add_resource_id(AttributeList *list, AttributeId id, uint32_t resource_id) { if (prv_attribute_type(id) != AttributeTypeResourceId) { - PBL_LOG_WRN("Adding attribute with type ResourceId for non-ResourceId " \ - "attribute"); + PBL_LOG_WRN( + "Adding attribute with type ResourceId for non-ResourceId " + "attribute"); } prv_add_attribute(list, id)->uint32 = resource_id; } @@ -467,9 +467,9 @@ void attribute_list_add_attribute(AttributeList *list, const Attribute *new_attr } void attribute_list_init_list(uint8_t num_attributes, AttributeList *list_out) { - *list_out = (AttributeList) { - .num_attributes = num_attributes, - .attributes = kernel_zalloc_check(num_attributes * sizeof(Attribute)) + *list_out = (AttributeList){ + .num_attributes = num_attributes, + .attributes = kernel_zalloc_check(num_attributes * sizeof(Attribute)) }; } @@ -479,7 +479,7 @@ void attribute_list_destroy_list(AttributeList *list) { } bool attribute_check_serialized_list(const uint8_t *cursor, const uint8_t *val_end, - uint8_t num_attributes, bool has_attribute[]) { + uint8_t num_attributes, bool has_attribute[]) { for (int i = 0; i < num_attributes; i++) { SerializedAttributeHeader *attrib_hdr = (SerializedAttributeHeader *)cursor; cursor += sizeof(SerializedAttributeHeader); @@ -551,30 +551,26 @@ const char *attribute_get_string(const AttributeList *attr_list, AttributeId id, return attribute ? attribute->cstring : default_value; } -StringList *attribute_get_string_list( - const AttributeList *attr_list, AttributeId id) { +StringList *attribute_get_string_list(const AttributeList *attr_list, AttributeId id) { PBL_ASSERTN(attr_list != NULL); Attribute *attribute = attribute_find(attr_list, id); return attribute ? attribute->string_list : NULL; } -uint8_t attribute_get_uint8(const AttributeList *attr_list, - AttributeId id, uint8_t default_value) { - +uint8_t attribute_get_uint8(const AttributeList *attr_list, AttributeId id, uint8_t default_value) { PBL_ASSERTN(attr_list != NULL); -// HB TODO: test the type of id! + // HB TODO: test the type of id! Attribute *attribute = attribute_find(attr_list, id); return attribute ? attribute->uint8 : default_value; } -uint32_t attribute_get_uint32(const AttributeList *attr_list, - AttributeId id, uint32_t default_value) { - +uint32_t attribute_get_uint32(const AttributeList *attr_list, AttributeId id, + uint32_t default_value) { PBL_ASSERTN(attr_list != NULL); -// HB TODO: test the type of id! + // HB TODO: test the type of id! Attribute *attribute = attribute_find(attr_list, id); return attribute ? attribute->uint32 : default_value; } diff --git a/src/fw/services/timeline/attribute_group.c b/src/fw/services/timeline/attribute_group.c index a4db70db27..caa63a901d 100644 --- a/src/fw/services/timeline/attribute_group.c +++ b/src/fw/services/timeline/attribute_group.c @@ -19,10 +19,8 @@ typedef struct PACKED { uint8_t num_attributes; } SerializedAddressHeader; - // ----------------------------------------------------------------------------- -static bool prv_parse_serial_group_type_data(AttributeGroupType type, - const uint8_t *data, +static bool prv_parse_serial_group_type_data(AttributeGroupType type, const uint8_t *data, const uint8_t *end, const uint8_t num_group_type_elements, size_t *string_alloc_size_out, @@ -57,33 +55,24 @@ static bool prv_parse_serial_group_type_data(AttributeGroupType type, return true; } - -bool attribute_group_parse_serial_data(AttributeGroupType type, - uint8_t num_attributes, - uint8_t num_group_type_elements, - const uint8_t *data, - size_t size, - size_t *string_alloc_size_out, +bool attribute_group_parse_serial_data(AttributeGroupType type, uint8_t num_attributes, + uint8_t num_group_type_elements, const uint8_t *data, + size_t size, size_t *string_alloc_size_out, uint8_t *attributes_per_group_type_element_out) { - PBL_ASSERTN(data != NULL && string_alloc_size_out != NULL); *string_alloc_size_out = 0; const uint8_t *end = data + size; const uint8_t *cursor = data; - int32_t result = attribute_get_buffer_size_for_serialized_attributes(num_attributes, - &cursor, - end); + int32_t result = + attribute_get_buffer_size_for_serialized_attributes(num_attributes, &cursor, end); if (result < 0) { return false; } *string_alloc_size_out += result; - return prv_parse_serial_group_type_data(type, - cursor, - end, - num_group_type_elements, + return prv_parse_serial_group_type_data(type, cursor, end, num_group_type_elements, string_alloc_size_out, attributes_per_group_type_element_out); } @@ -107,8 +96,7 @@ static int prv_get_action_group_buffer_size(AttributeGroupType type, return size; } -size_t attribute_group_get_required_buffer_size(AttributeGroupType type, - uint8_t num_attributes, +size_t attribute_group_get_required_buffer_size(AttributeGroupType type, uint8_t num_attributes, uint8_t num_group_type_elements, const uint8_t *attributes_per_group_type_element, size_t required_size_for_strings) { @@ -119,8 +107,7 @@ size_t attribute_group_get_required_buffer_size(AttributeGroupType type, // 4. additional space for heap allocated strings size_t buffer_size = num_attributes * sizeof(Attribute); - buffer_size += prv_get_action_group_buffer_size(type, - num_group_type_elements, + buffer_size += prv_get_action_group_buffer_size(type, num_group_type_elements, attributes_per_group_type_element); buffer_size += required_size_for_strings; @@ -129,65 +116,53 @@ size_t attribute_group_get_required_buffer_size(AttributeGroupType type, } // ----------------------------------------------------------------------------- -static void prv_init_attribute_list(AttributeList *attr_list, - uint8_t **buffer, +static void prv_init_attribute_list(AttributeList *attr_list, uint8_t **buffer, const uint8_t attributes_per_group_type_element) { attr_list->num_attributes = attributes_per_group_type_element; attr_list->attributes = (Attribute *)*buffer; *buffer += attributes_per_group_type_element * sizeof(Attribute); } -static void prv_init_group_type(AttributeGroupType type, - void *group_ptr, - uint8_t **buffer, +static void prv_init_group_type(AttributeGroupType type, void *group_ptr, uint8_t **buffer, uint8_t num_group_type_elements, const uint8_t *attributes_per_group_type_element) { if (num_group_type_elements > 0) { if (type == AttributeGroupType_Action) { - ((TimelineItemActionGroup *) group_ptr)->num_actions = num_group_type_elements; - ((TimelineItemActionGroup *) group_ptr)->actions = (TimelineItemAction *)*buffer; + ((TimelineItemActionGroup *)group_ptr)->num_actions = num_group_type_elements; + ((TimelineItemActionGroup *)group_ptr)->actions = (TimelineItemAction *)*buffer; *buffer += num_group_type_elements * sizeof(TimelineItemAction); } else { - ((AddressList *) group_ptr)->num_addresses = num_group_type_elements; - ((AddressList *) group_ptr)->addresses = (Address *)*buffer; + ((AddressList *)group_ptr)->num_addresses = num_group_type_elements; + ((AddressList *)group_ptr)->addresses = (Address *)*buffer; *buffer += num_group_type_elements * sizeof(Address); } for (int i = 0; i < num_group_type_elements; i++) { AttributeList *attr_list; if (type == AttributeGroupType_Action) { - attr_list = &((TimelineItemActionGroup *) group_ptr)->actions[i].attr_list; + attr_list = &((TimelineItemActionGroup *)group_ptr)->actions[i].attr_list; } else { - attr_list = &((AddressList *) group_ptr)->addresses[i].attr_list; + attr_list = &((AddressList *)group_ptr)->addresses[i].attr_list; } prv_init_attribute_list(attr_list, buffer, attributes_per_group_type_element[i]); } } } -void attribute_group_init(AttributeGroupType type, - AttributeList *attr_list, - void *group_ptr, - uint8_t **buffer, - uint8_t num_attributes, - uint8_t num_group_type_elements, +void attribute_group_init(AttributeGroupType type, AttributeList *attr_list, void *group_ptr, + uint8_t **buffer, uint8_t num_attributes, uint8_t num_group_type_elements, const uint8_t *attributes_per_group_type_element) { attr_list->num_attributes = num_attributes; attr_list->attributes = (Attribute *)*buffer; *buffer += num_attributes * sizeof(Attribute); - prv_init_group_type(type, - group_ptr, - buffer, - num_group_type_elements, + prv_init_group_type(type, group_ptr, buffer, num_group_type_elements, attributes_per_group_type_element); } // ----------------------------------------------------------------------------- -static AttributeList *prv_deserialize_action(TimelineItemAction *action, - const uint8_t **cursor, - const uint8_t *payload_end, - const uint8_t *buffer, +static AttributeList *prv_deserialize_action(TimelineItemAction *action, const uint8_t **cursor, + const uint8_t *payload_end, const uint8_t *buffer, const uint8_t *buf_end) { if (*cursor + sizeof(SerializedActionHeader) > payload_end) { return NULL; @@ -201,10 +176,8 @@ static AttributeList *prv_deserialize_action(TimelineItemAction *action, return &action->attr_list; } -static AttributeList *prv_deserialize_address(Address *address, - const uint8_t **cursor, - const uint8_t *payload_end, - const uint8_t *buffer, +static AttributeList *prv_deserialize_address(Address *address, const uint8_t **cursor, + const uint8_t *payload_end, const uint8_t *buffer, const uint8_t *buf_end) { if (*cursor + sizeof(SerializedAddressHeader) > payload_end) { return NULL; @@ -218,12 +191,9 @@ static AttributeList *prv_deserialize_address(Address *address, return &address->attr_list; } -static bool prv_deserialize_group_element(AttributeGroupType type, - void *group_ptr, - const uint8_t *payload, - const uint8_t *payload_end, - const uint8_t *buffer, - const uint8_t *buf_end) { +static bool prv_deserialize_group_element(AttributeGroupType type, void *group_ptr, + const uint8_t *payload, const uint8_t *payload_end, + const uint8_t *buffer, const uint8_t *buf_end) { const uint8_t *cursor = payload; int num_group_type_elements; @@ -236,51 +206,40 @@ static bool prv_deserialize_group_element(AttributeGroupType type, for (int i = 0; i < num_group_type_elements; i++) { AttributeList *group_type_element_attribute_list; if (type == AttributeGroupType_Action) { - group_type_element_attribute_list = prv_deserialize_action( - &((TimelineItemActionGroup *)group_ptr)->actions[i], &cursor, payload_end, - buffer, buf_end); + group_type_element_attribute_list = + prv_deserialize_action(&((TimelineItemActionGroup *)group_ptr)->actions[i], &cursor, + payload_end, buffer, buf_end); } else { group_type_element_attribute_list = prv_deserialize_address( - &((AddressList *)group_ptr)->addresses[i], &cursor, payload_end, - buffer, buf_end); + &((AddressList *)group_ptr)->addresses[i], &cursor, payload_end, buffer, buf_end); } if (!group_type_element_attribute_list) { return false; } - if (!attribute_deserialize_list((char**)&buffer, (char *)buf_end, &cursor, - payload_end, *group_type_element_attribute_list)) { + if (!attribute_deserialize_list((char **)&buffer, (char *)buf_end, &cursor, payload_end, + *group_type_element_attribute_list)) { return false; } } return true; } -bool attribute_group_deserialize(AttributeGroupType type, - AttributeList *attr_list, - void *group_ptr, - uint8_t *buffer, - uint8_t *buf_end, - const uint8_t *payload, +bool attribute_group_deserialize(AttributeGroupType type, AttributeList *attr_list, void *group_ptr, + uint8_t *buffer, uint8_t *buf_end, const uint8_t *payload, size_t payload_size) { - PBL_ASSERTN(payload != NULL); const uint8_t *payload_end = payload + payload_size; const uint8_t *cursor = payload; - if (!attribute_deserialize_list((char**)&buffer, (char*)buf_end, - &cursor, payload_end, *attr_list)) { + if (!attribute_deserialize_list((char **)&buffer, (char *)buf_end, &cursor, payload_end, + *attr_list)) { return false; } - return prv_deserialize_group_element(type, - group_ptr, - cursor, - payload_end, - buffer, - buf_end); + return prv_deserialize_group_element(type, group_ptr, cursor, payload_end, buffer, buf_end); } // ----------------------------------------------------------------------------- @@ -303,8 +262,7 @@ static int prv_get_serialized_address_list_size(AddressList *addr_list) { } size_t attribute_group_get_serialized_payload_size(AttributeGroupType type, - AttributeList *attr_list, - void *group_ptr) { + AttributeList *attr_list, void *group_ptr) { size_t size = 0; if (attr_list) { size += attribute_list_get_serialized_size(attr_list); @@ -321,8 +279,7 @@ size_t attribute_group_get_serialized_payload_size(AttributeGroupType type, } // ----------------------------------------------------------------------------- -static AttributeList *prv_serialize_action(TimelineItemAction *action, - uint8_t **buffer) { +static AttributeList *prv_serialize_action(TimelineItemAction *action, uint8_t **buffer) { SerializedActionHeader *serialized_action = (SerializedActionHeader *)*buffer; *buffer += sizeof(SerializedActionHeader); @@ -333,8 +290,7 @@ static AttributeList *prv_serialize_action(TimelineItemAction *action, return &action->attr_list; } -static AttributeList *prv_serialize_address(Address *address, - uint8_t **buffer) { +static AttributeList *prv_serialize_address(Address *address, uint8_t **buffer) { SerializedAddressHeader *serialized_address = (SerializedAddressHeader *)*buffer; *buffer += sizeof(SerializedAddressHeader); @@ -345,10 +301,8 @@ static AttributeList *prv_serialize_address(Address *address, return &address->attr_list; } -static uint8_t* prv_serialize_group_element(AttributeGroupType type, - void *group_ptr, - uint8_t *buffer, - uint8_t *buf_end) { +static uint8_t *prv_serialize_group_element(AttributeGroupType type, void *group_ptr, + uint8_t *buffer, uint8_t *buf_end) { int num_group_type_elements; if (type == AttributeGroupType_Action) { num_group_type_elements = ((TimelineItemActionGroup *)group_ptr)->num_actions; @@ -359,26 +313,22 @@ static uint8_t* prv_serialize_group_element(AttributeGroupType type, for (int i = 0; i < num_group_type_elements; i++) { AttributeList *group_type_element_attribute_list; if (type == AttributeGroupType_Action) { - group_type_element_attribute_list = prv_serialize_action( - &((TimelineItemActionGroup *)group_ptr)->actions[i], &buffer); + group_type_element_attribute_list = + prv_serialize_action(&((TimelineItemActionGroup *)group_ptr)->actions[i], &buffer); } else { - group_type_element_attribute_list = prv_serialize_address( - &((AddressList *)group_ptr)->addresses[i], &buffer); + group_type_element_attribute_list = + prv_serialize_address(&((AddressList *)group_ptr)->addresses[i], &buffer); } PBL_ASSERTN(buffer <= buf_end); - buffer += attribute_list_serialize(group_type_element_attribute_list, - buffer, buf_end); + buffer += attribute_list_serialize(group_type_element_attribute_list, buffer, buf_end); } return buffer; } -size_t attribute_group_serialize_payload(AttributeGroupType type, - AttributeList *attr_list, - void *group_ptr, - uint8_t *buffer, - size_t buffer_size) { +size_t attribute_group_serialize_payload(AttributeGroupType type, AttributeList *attr_list, + void *group_ptr, uint8_t *buffer, size_t buffer_size) { PBL_ASSERTN(buffer != NULL); uint8_t *buf_start = buffer; diff --git a/src/fw/services/timeline/attributes_actions.c b/src/fw/services/timeline/attributes_actions.c index 872431076a..cd182daf08 100644 --- a/src/fw/services/timeline/attributes_actions.c +++ b/src/fw/services/timeline/attributes_actions.c @@ -9,84 +9,46 @@ PBL_LOG_MODULE_DECLARE(service_timeline, CONFIG_SERVICE_TIMELINE_LOG_LEVEL); - #define GROUP_TYPE AttributeGroupType_Action -bool attributes_actions_parse_serial_data(uint8_t num_attributes, - uint8_t num_actions, - const uint8_t *data, - size_t size, +bool attributes_actions_parse_serial_data(uint8_t num_attributes, uint8_t num_actions, + const uint8_t *data, size_t size, size_t *string_alloc_size_out, uint8_t *attributes_per_actions_out) { - - return attribute_group_parse_serial_data(GROUP_TYPE, - num_attributes, - num_actions, - data, - size, - string_alloc_size_out, - attributes_per_actions_out); + return attribute_group_parse_serial_data(GROUP_TYPE, num_attributes, num_actions, data, size, + string_alloc_size_out, attributes_per_actions_out); } -size_t attributes_actions_get_required_buffer_size(uint8_t num_attributes, - uint8_t num_actions, +size_t attributes_actions_get_required_buffer_size(uint8_t num_attributes, uint8_t num_actions, uint8_t *attributes_per_actions, size_t required_size_for_strings) { - - return attribute_group_get_required_buffer_size(GROUP_TYPE, - num_attributes, - num_actions, - attributes_per_actions, - required_size_for_strings); + return attribute_group_get_required_buffer_size( + GROUP_TYPE, num_attributes, num_actions, attributes_per_actions, required_size_for_strings); } -void attributes_actions_init(AttributeList *attr_list, - TimelineItemActionGroup *action_group, - uint8_t **buffer, - uint8_t num_attributes, - uint8_t num_actions, +void attributes_actions_init(AttributeList *attr_list, TimelineItemActionGroup *action_group, + uint8_t **buffer, uint8_t num_attributes, uint8_t num_actions, const uint8_t *attributes_per_actions) { - - attribute_group_init(GROUP_TYPE, - attr_list, - action_group, - buffer, - num_attributes, - num_actions, + attribute_group_init(GROUP_TYPE, attr_list, action_group, buffer, num_attributes, num_actions, attributes_per_actions); } -bool attributes_actions_deserialize(AttributeList *attr_list, - TimelineItemActionGroup *action_group, - uint8_t *buffer, - uint8_t *buf_end, - const uint8_t *payload, +bool attributes_actions_deserialize(AttributeList *attr_list, TimelineItemActionGroup *action_group, + uint8_t *buffer, uint8_t *buf_end, const uint8_t *payload, size_t payload_size) { - - return attribute_group_deserialize(GROUP_TYPE, - attr_list, - action_group, - buffer, - buf_end, - payload, + return attribute_group_deserialize(GROUP_TYPE, attr_list, action_group, buffer, buf_end, payload, payload_size); } size_t attributes_actions_get_serialized_payload_size(AttributeList *attr_list, TimelineItemActionGroup *action_group) { - return attribute_group_get_serialized_payload_size(GROUP_TYPE, - attr_list, - action_group); + return attribute_group_get_serialized_payload_size(GROUP_TYPE, attr_list, action_group); } size_t attributes_actions_serialize_payload(AttributeList *attr_list, - TimelineItemActionGroup *action_group, - uint8_t *buffer, + TimelineItemActionGroup *action_group, uint8_t *buffer, size_t buffer_size) { - return attribute_group_serialize_payload(GROUP_TYPE, - attr_list, - action_group, - buffer, + return attribute_group_serialize_payload(GROUP_TYPE, attr_list, action_group, buffer, buffer_size); } @@ -113,7 +75,7 @@ static bool prv_action_group_copy(TimelineItemActionGroup *dest, TimelineItemAct } dest->num_actions = source->num_actions; - dest->actions = (TimelineItemAction*) buffer; + dest->actions = (TimelineItemAction *)buffer; memcpy(dest->actions, source->actions, actions_size); size_t offset = actions_size; @@ -123,33 +85,32 @@ static bool prv_action_group_copy(TimelineItemActionGroup *dest, TimelineItemAct return false; } - attribute_list_copy(&dest->actions[i].attr_list, &source->actions[i].attr_list, - buffer + offset, buffer + offset + attr_size); + attribute_list_copy(&dest->actions[i].attr_list, &source->actions[i].attr_list, buffer + offset, + buffer + offset + attr_size); offset += attr_size; } return true; } -bool attributes_actions_deep_copy(AttributeList *src_attr_list, - AttributeList *dest_attr_list, +bool attributes_actions_deep_copy(AttributeList *src_attr_list, AttributeList *dest_attr_list, TimelineItemActionGroup *src_action_group, - TimelineItemActionGroup *dest_action_group, - uint8_t *buffer, uint8_t *buf_end) { + TimelineItemActionGroup *dest_action_group, uint8_t *buffer, + uint8_t *buf_end) { bool rv; const size_t attr_list_size = attribute_list_get_buffer_size(src_attr_list); if (src_attr_list && dest_attr_list) { - rv = attribute_list_copy(dest_attr_list, src_attr_list, - buffer, MIN(buffer + attr_list_size, buf_end)); + rv = attribute_list_copy(dest_attr_list, src_attr_list, buffer, + MIN(buffer + attr_list_size, buf_end)); if (!rv) { PBL_LOG_ERR("Error deep-copying pin attribute list"); return false; } } if (src_action_group && dest_action_group) { - rv = prv_action_group_copy(dest_action_group, src_action_group, - buffer + attr_list_size, buf_end); + rv = prv_action_group_copy(dest_action_group, src_action_group, buffer + attr_list_size, + buf_end); if (!rv) { PBL_LOG_ERR("Error deep-copying pin action group"); return false; diff --git a/src/fw/services/timeline/calendar.c b/src/fw/services/timeline/calendar.c index 64c1ccbb5c..c68a8f7511 100644 --- a/src/fw/services/timeline/calendar.c +++ b/src/fw/services/timeline/calendar.c @@ -12,10 +12,10 @@ static bool s_event_ongoing = false; static void prv_put_calendar_event(void) { PebbleEvent event = { - .type = PEBBLE_CALENDAR_EVENT, - .calendar = { - .is_event_ongoing = s_event_ongoing, - }, + .type = PEBBLE_CALENDAR_EVENT, + .calendar = { + .is_event_ongoing = s_event_ongoing, + }, }; event_put(&event); } @@ -38,8 +38,8 @@ static uint32_t prv_calendar_update(TimelineItem *item, void **context) { const TimelineEventImpl *calendar_get_event_service(void) { static const TimelineEventImpl s_event_impl = { - .filter = prv_calendar_filter, - .update = prv_calendar_update, + .filter = prv_calendar_filter, + .update = prv_calendar_update, }; return &s_event_impl; } diff --git a/src/fw/services/timeline/calendar_layout.c b/src/fw/services/timeline/calendar_layout.c index c6edb338bb..b2566d6302 100644 --- a/src/fw/services/timeline/calendar_layout.c +++ b/src/fw/services/timeline/calendar_layout.c @@ -23,47 +23,44 @@ ////////////////////////////////////////// #if PBL_RECT -#define CARD_ICON_OFFSET_Y \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* small */ 6, /* medium */ 6, /* large */ -3, /* extralarge */ -3) -#define CARD_ICON_MARGIN_W \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* small */ 3, /* medium */ 3, /* large */ 5, /* extralarge */ 5) -#define CARD_ICON_OFFSET { 0, CARD_ICON_OFFSET_Y } -#define CARD_ICON_MARGIN_H \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* small */ 2, /* medium */ 2, /* large */ 0, /* extralarge */ 0) -#define CARD_ICON_MARGIN { CARD_ICON_MARGIN_W, CARD_ICON_MARGIN_H } +#define CARD_ICON_OFFSET_Y \ + PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, /* small */ 6, /* medium */ 6, \ + /* large */ -3, /* extralarge */ -3) +#define CARD_ICON_MARGIN_W \ + PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, /* small */ 3, /* medium */ 3, \ + /* large */ 5, /* extralarge */ 5) +#define CARD_ICON_OFFSET {0, CARD_ICON_OFFSET_Y} +#define CARD_ICON_MARGIN_H \ + PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, /* small */ 2, /* medium */ 2, \ + /* large */ 0, /* extralarge */ 0) +#define CARD_ICON_MARGIN {CARD_ICON_MARGIN_W, CARD_ICON_MARGIN_H} #else -#define CARD_ICON_OFFSET { 0, 9 } -#define CARD_ICON_MARGIN { 0, 6 } +#define CARD_ICON_OFFSET {0, 9} +#define CARD_ICON_MARGIN {0, 6} #endif //! This offset only applies for TIMELINE_RESOURCE_TIMELINE_CALENDAR and variants #define CARD_ICON_CALENDAR_OFFSET_X PBL_IF_RECT_ELSE(-5, 0) -#define CARD_MARGIN_TOP \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* small */ -1, \ - /* medium */ -1, \ - /* large */ 6, \ - /* extralarge */ 6) +#define CARD_MARGIN_TOP \ + PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, /* small */ -1, /* medium */ -1, \ + /* large */ 6, /* extralarge */ 6) #define CARD_MARGIN_BOTTOM PBL_IF_RECT_ELSE(7, 0) #define CARD_NUM_TIME_DATE_SPACES 2 #define CARD_LINE_DELTA -2 -#define CALENDAR_TIME_LINE_LENGTH (TIME_STRING_TIME_LENGTH + CARD_NUM_TIME_DATE_SPACES + \ - TIME_STRING_DATE_LENGTH) +#define CALENDAR_TIME_LINE_LENGTH \ + (TIME_STRING_TIME_LENGTH + CARD_NUM_TIME_DATE_SPACES + TIME_STRING_DATE_LENGTH) #define DEFAULT_ICON_RESOURCE TIMELINE_RESOURCE_TIMELINE_CALENDAR typedef void (*CalendarLayoutBufferCallback)(const TimelineLayout *layout, char *buffer, size_t buffer_size); -TimelineResourceId prv_get_icon_resource( - LayoutLayerMode mode, const AttributeList *attributes, TimelineResourceSize icon_size) { - const TimelineResourceId resource = timeline_layout_get_icon_resource_id( - mode, attributes, icon_size, DEFAULT_ICON_RESOURCE); +TimelineResourceId prv_get_icon_resource(LayoutLayerMode mode, const AttributeList *attributes, + TimelineResourceSize icon_size) { + const TimelineResourceId resource = + timeline_layout_get_icon_resource_id(mode, attributes, icon_size, DEFAULT_ICON_RESOURCE); if (resource == DEFAULT_ICON_RESOURCE) { // Since calendar layout is using the default icon, it can be replaced with // the empty calendar icon for the date to be displayed within the icon @@ -79,13 +76,13 @@ TimelineResourceId prv_get_icon_resource_with_layout(const TimelineLayout *timel timeline_layout->impl->card_icon_size); } -static GTextNode *prv_icon_node_constructor( - const LayoutLayer *layout_ref, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_icon_node_constructor(const LayoutLayer *layout_ref, + const LayoutNodeConstructorConfig *config) { CalendarLayout *layout = (CalendarLayout *)layout_ref; static const LayoutNodeExtentConfig s_icon_config = { - .node.type = LayoutNodeType_TimelineIcon, - .offset = CARD_ICON_OFFSET, - .margin = CARD_ICON_MARGIN, + .node.type = LayoutNodeType_TimelineIcon, + .offset = CARD_ICON_OFFSET, + .margin = CARD_ICON_MARGIN, }; GTextNode *text_node = layout_create_text_node_from_config(layout_ref, &s_icon_config.node); const TimelineResourceId icon_resource = @@ -98,23 +95,24 @@ static GTextNode *prv_icon_node_constructor( } static void prv_day_node_callback(GContext *ctx, const GRect *box, - const GTextNodeDrawConfig *config, bool render, - GSize *size_out, void *user_data) { + const GTextNodeDrawConfig *config, bool render, GSize *size_out, + void *user_data) { CalendarLayout *layout = user_data; const GRect *icon_frame = &layout->timeline_layout.icon_layer.layer.frame; const GPoint date_offset = { - 1, PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* small */ 16, /* medium */ 16, /* large */ 16, /* extralarge */ 16) + 1, PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + /* small */ 16, /* medium */ 16, /* large */ 16, + /* extralarge */ 16) }; layer_set_frame((Layer *)&layout->date_layer, - &(GRect) { gpoint_add(icon_frame->origin, date_offset), icon_frame->size }); + &(GRect){gpoint_add(icon_frame->origin, date_offset), icon_frame->size}); clock_get_day_date(layout->day_date_buffer, sizeof(layout->day_date_buffer), layout->timeline_layout.info->timestamp); *size_out = GSizeZero; } -static GTextNode *prv_day_node_constructor( - const LayoutLayer *layout_ref, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_day_node_constructor(const LayoutLayer *layout_ref, + const LayoutNodeConstructorConfig *config) { CalendarLayout *layout = (CalendarLayout *)layout_ref; if (prv_get_icon_resource_with_layout(&layout->timeline_layout) != TIMELINE_RESOURCE_TIMELINE_EMPTY_CALENDAR) { @@ -167,7 +165,7 @@ static void prv_set_glance_time_line_round(const TimelineLayout *layout, char *b prv_format_glance_start_time(layout, buffer, buffer_size); size_t pos = strnlen(buffer, CALENDAR_TIME_LINE_LENGTH); if (pos) { - const char *delimiter = i18n_get(" - ", layout); // Freed in `timeline_layout_deinit` + const char *delimiter = i18n_get(" - ", layout); // Freed in `timeline_layout_deinit` const int max_delimiter_i18n_size = 16; const size_t delimiter_size = strnlen(delimiter, max_delimiter_i18n_size); strncpy(buffer + pos, delimiter, buffer_size - pos); @@ -179,8 +177,8 @@ static void prv_set_glance_time_line_round(const TimelineLayout *layout, char *b #endif static void prv_image_node_callback(GContext *ctx, const GRect *box, - const GTextNodeDrawConfig *config, bool render, - GSize *size_out, void *user_data) { + const GTextNodeDrawConfig *config, bool render, GSize *size_out, + void *user_data) { GDrawCommandImage *image = user_data; if (render) { gdraw_command_image_draw(ctx, image, box->origin); @@ -235,13 +233,13 @@ static void prv_format_end_time(const TimelineLayout *layout, char *buffer, size static bool prv_should_draw_recurring(const TimelineLayout *layout) { const AttributeList *attributes = layout->layout_layer.attributes; - const uint8_t recurring = attribute_get_uint8(attributes, AttributeIdDisplayRecurring, - CalendarRecurringTypeNone); + const uint8_t recurring = + attribute_get_uint8(attributes, AttributeIdDisplayRecurring, CalendarRecurringTypeNone); return (recurring != CalendarRecurringTypeNone); } -static GTextNode *prv_construct_if_recurring( - const LayoutLayer *layout, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_construct_if_recurring(const LayoutLayer *layout, + const LayoutNodeConstructorConfig *config) { if (prv_should_draw_recurring((const TimelineLayout *)layout)) { return layout_create_text_node_from_config(layout, config->context); } @@ -249,15 +247,15 @@ static GTextNode *prv_construct_if_recurring( } #if PBL_ROUND -#define CARD_GLANCE_TITLE_LINES \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* small */ 1, /* medium */ 1, /* large */ 3, /* extralarge */ 3) -#define CARD_GLANCE_TITLE_LINES_WITH_DETAILS \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* small */ 1, /* medium */ 1, /* large */ 2, /* extralarge */ 2) - -static GTextNode *prv_construct_glance_title( - const LayoutLayer *layout, const LayoutNodeConstructorConfig *config) { +#define CARD_GLANCE_TITLE_LINES \ + PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, /* small */ 1, /* medium */ 1, \ + /* large */ 3, /* extralarge */ 3) +#define CARD_GLANCE_TITLE_LINES_WITH_DETAILS \ + PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, /* small */ 1, /* medium */ 1, \ + /* large */ 2, /* extralarge */ 2) + +static GTextNode *prv_construct_glance_title(const LayoutLayer *layout, + const LayoutNodeConstructorConfig *config) { LayoutNodeTextAttributeConfig title_config = *(const LayoutNodeTextAttributeConfig *)config->context; const bool has_details = @@ -273,13 +271,16 @@ static void prv_not_recurring_spacer_callback(GContext *ctx, const GRect *box, const GTextNodeDrawConfig *config, bool render, GSize *size_out, void *user_data) { if (size_out) { - *size_out = (GSize) { 0, PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* small */ 0, /* medium */ 0, /* large */ 3, /* extralarge */ 3) }; + *size_out = (GSize){ + 0, PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + /* small */ 0, /* medium */ 0, /* large */ 3, + /* extralarge */ 3) + }; } } -static GTextNode *prv_construct_if_not_recurring( - const LayoutLayer *layout, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_construct_if_not_recurring(const LayoutLayer *layout, + const LayoutNodeConstructorConfig *config) { if (prv_should_draw_recurring((const TimelineLayout *)layout)) { return NULL; } @@ -292,22 +293,21 @@ typedef struct { size_t buffer_size; } IconLabelContext; -static GTextNode *prv_create_icon_label_node_rect( - const LayoutLayer *layout, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_create_icon_label_node_rect(const LayoutLayer *layout, + const LayoutNodeConstructorConfig *config) { const IconLabelContext *ctx = config->context; char buffer[ctx->buffer_size]; memset(buffer, 0, ctx->buffer_size); ctx->callback((const TimelineLayout *)layout, buffer, ctx->buffer_size); const int time_margin_h = PBL_IF_RECT_ELSE(-1, 0); const LayoutNodeTextBufferConfig time_config = { - .text.extent.node.type = LayoutNodeType_TextBuffer, - .str = buffer, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, - .text.extent.margin.h = time_margin_h, - }; - GTextNode *node = - layout_create_text_node_from_config(layout, &time_config.text.extent.node); + .text.extent.node.type = LayoutNodeType_TextBuffer, + .str = buffer, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, + .text.extent.margin.h = time_margin_h, + }; + GTextNode *node = layout_create_text_node_from_config(layout, &time_config.text.extent.node); if (PBL_IF_RECT_ELSE(!node, true)) { // Don't append the icon if there is no node or if on round return node; @@ -315,22 +315,23 @@ static GTextNode *prv_create_icon_label_node_rect( GTextNodeHorizontal *horizontal_node = graphics_text_node_create_horizontal(2); GTextNodeCustom *image_node = prv_create_image_node(ctx->image); image_node->node.offset.y = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* small */ 8, /* medium */ 8, /* large */ 11, /* extralarge */ 11); + /* small */ 8, /* medium */ 8, + /* large */ 11, /* extralarge */ 11); image_node->node.margin.w = 6; graphics_text_node_container_add_child(&horizontal_node->container, &image_node->node); graphics_text_node_container_add_child(&horizontal_node->container, node); return &horizontal_node->container.node; } -static GTextNode *prv_construct_all_day_or_node( - const LayoutLayer *layout_ref, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_construct_all_day_or_node(const LayoutLayer *layout_ref, + const LayoutNodeConstructorConfig *config) { const TimelineLayout *layout = (TimelineLayout *)layout_ref; static const LayoutNodeTextBufferConfig s_all_day_config = { - .text.extent.node.type = LayoutNodeType_TextBuffer, - .str = i18n_noop("All Day"), - .use_i18n = true, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, + .text.extent.node.type = LayoutNodeType_TextBuffer, + .str = i18n_noop("All Day"), + .use_i18n = true, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, }; return layout_create_text_node_from_config( layout_ref, layout->info->all_day ? &s_all_day_config.text.extent.node : config->context); @@ -338,194 +339,196 @@ static GTextNode *prv_construct_all_day_or_node( static GTextNode *prv_card_view_constructor(TimelineLayout *timeline_layout) { static const LayoutNodeConstructorConfig s_icon_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_icon_node_constructor, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_icon_node_constructor, }; static const IconLabelContext s_glance_start_icon_label_context = { - .image = &g_calendar_start_icon.image, - .callback = PBL_IF_RECT_ELSE(prv_format_glance_start_time, prv_set_glance_time_line_round), - .buffer_size = PBL_IF_RECT_ELSE(TIME_STRING_TIME_LENGTH, CALENDAR_TIME_LINE_LENGTH), + .image = &g_calendar_start_icon.image, + .callback = PBL_IF_RECT_ELSE(prv_format_glance_start_time, prv_set_glance_time_line_round), + .buffer_size = PBL_IF_RECT_ELSE(TIME_STRING_TIME_LENGTH, CALENDAR_TIME_LINE_LENGTH), }; static const LayoutNodeConstructorConfig s_glance_start_time_with_icon_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_create_icon_label_node_rect, - .context = (void *)&s_glance_start_icon_label_context, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_create_icon_label_node_rect, + .context = (void *)&s_glance_start_icon_label_context, }; static const LayoutNodeConstructorConfig s_glance_start_time_or_all_day_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_construct_all_day_or_node, - .context = (void *)&s_glance_start_time_with_icon_config, - .extent.margin.h = PBL_IF_ROUND_ELSE(-2, 0), // glance start time margin height + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_construct_all_day_or_node, + .context = (void *)&s_glance_start_time_with_icon_config, + .extent.margin.h = PBL_IF_ROUND_ELSE(-2, 0), // glance start time margin height }; static const IconLabelContext s_glance_end_icon_label_context = { - .image = &g_calendar_end_icon.image, - .callback = prv_format_glance_end_time, - .buffer_size = MAX(TIME_STRING_TIME_LENGTH, TIME_STRING_DATE_LENGTH), + .image = &g_calendar_end_icon.image, + .callback = prv_format_glance_end_time, + .buffer_size = MAX(TIME_STRING_TIME_LENGTH, TIME_STRING_DATE_LENGTH), }; PBL_UNUSED static const LayoutNodeConstructorConfig s_glance_end_time_with_icon_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_create_icon_label_node_rect, - .context = (void *)&s_glance_end_icon_label_context, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_create_icon_label_node_rect, + .context = (void *)&s_glance_end_icon_label_context, }; static const LayoutNodeTextBufferConfig s_recurring_config = { - .text.extent.node.type = LayoutNodeType_TextBuffer, - .str = i18n_noop("Recurring"), - .use_i18n = true, - .text.font_key = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* small */ PBL_IF_RECT_ELSE(FONT_KEY_GOTHIC_14, FONT_KEY_GOTHIC_14_BOLD), - /* medium */ PBL_IF_RECT_ELSE(FONT_KEY_GOTHIC_14, FONT_KEY_GOTHIC_14_BOLD), - /* large */ FONT_KEY_GOTHIC_18_BOLD, - /* extralarge */ FONT_KEY_GOTHIC_18_BOLD), - .text.extent.offset.y = PBL_IF_RECT_ELSE(4, 1), // recurring offset y - .text.extent.margin.h = PBL_IF_RECT_ELSE(4, 1), // recurring margin height + .text.extent.node.type = LayoutNodeType_TextBuffer, + .str = i18n_noop("Recurring"), + .use_i18n = true, + .text.font_key = PREFERRED_CONTENT_SIZE_SWITCH( + PreferredContentSizeDefault, + /* small */ PBL_IF_RECT_ELSE(FONT_KEY_GOTHIC_14, FONT_KEY_GOTHIC_14_BOLD), + /* medium */ PBL_IF_RECT_ELSE(FONT_KEY_GOTHIC_14, FONT_KEY_GOTHIC_14_BOLD), + /* large */ FONT_KEY_GOTHIC_18_BOLD, + /* extralarge */ FONT_KEY_GOTHIC_18_BOLD), + .text.extent.offset.y = PBL_IF_RECT_ELSE(4, 1), // recurring offset y + .text.extent.margin.h = PBL_IF_RECT_ELSE(4, 1), // recurring margin height }; PBL_UNUSED static const LayoutNodeConstructorConfig s_if_recurring_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_construct_if_recurring, - .context = (void *)&s_recurring_config, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_construct_if_recurring, + .context = (void *)&s_recurring_config, }; PBL_UNUSED static const LayoutNodeConstructorConfig s_if_not_recurring_spacer_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_construct_if_not_recurring, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_construct_if_not_recurring, }; static const LayoutNodeTextAttributeConfig s_glance_title_config = { - .attr_id = AttributeIdTitle, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Title, - .text.fixed_lines = 2, // glance title fixed lines - .text.line_spacing_delta = CARD_LINE_DELTA, - .text.extent.margin.h = PBL_IF_RECT_ELSE(6, 4), // glance title margin height + .attr_id = AttributeIdTitle, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Title, + .text.fixed_lines = 2, // glance title fixed lines + .text.line_spacing_delta = CARD_LINE_DELTA, + .text.extent.margin.h = PBL_IF_RECT_ELSE(6, 4), // glance title margin height }; #if PBL_ROUND static const LayoutNodeConstructorConfig s_glance_title_round_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_construct_glance_title, - .context = (void *)&s_glance_title_config, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_construct_glance_title, + .context = (void *)&s_glance_title_config, }; #endif static const LayoutNodeTextAttributeConfig s_glance_location_config = { - .attr_id = AttributeIdLocationName, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, - .text.fixed_lines = 1, // glance location fixed lines + .attr_id = AttributeIdLocationName, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, + .text.fixed_lines = 1, // glance location fixed lines }; static const LayoutNodeConstructorConfig s_digit_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_day_node_constructor, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_day_node_constructor, }; static const LayoutNodeConfig s_page_break_config = { - .type = LayoutNodeType_TimelinePageBreak, + .type = LayoutNodeType_TimelinePageBreak, }; static const LayoutNodeTextAttributeConfig s_title_config = { - .attr_id = AttributeIdTitle, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Title, - .text.line_spacing_delta = CARD_LINE_DELTA, - .text.extent.margin.h = 7, // title margin height + .attr_id = AttributeIdTitle, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Title, + .text.line_spacing_delta = CARD_LINE_DELTA, + .text.extent.margin.h = 7, // title margin height }; static const LayoutNodeTextAttributeConfig s_location_config = { - .attr_id = AttributeIdLocationName, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, - .text.extent.margin.h = 15, // location margin height + .attr_id = AttributeIdLocationName, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, + .text.extent.margin.h = 15, // location margin height }; static const IconLabelContext s_start_icon_label_context = { - .image = &g_calendar_start_icon.image, - .callback = prv_format_start_time, - .buffer_size = CALENDAR_TIME_LINE_LENGTH, + .image = &g_calendar_start_icon.image, + .callback = prv_format_start_time, + .buffer_size = CALENDAR_TIME_LINE_LENGTH, }; PBL_UNUSED static const LayoutNodeConstructorConfig s_start_time_with_icon_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_create_icon_label_node_rect, - .context = (void *)&s_start_icon_label_context, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_create_icon_label_node_rect, + .context = (void *)&s_start_icon_label_context, }; static const IconLabelContext s_end_icon_label_context = { - .image = &g_calendar_end_icon.image, - .callback = prv_format_end_time, - .buffer_size = CALENDAR_TIME_LINE_LENGTH, + .image = &g_calendar_end_icon.image, + .callback = prv_format_end_time, + .buffer_size = CALENDAR_TIME_LINE_LENGTH, }; PBL_UNUSED static const LayoutNodeConstructorConfig s_end_time_with_icon_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_create_icon_label_node_rect, - .context = (void *)&s_end_icon_label_context, - .extent.margin.h = 13, // end time margin height + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_create_icon_label_node_rect, + .context = (void *)&s_end_icon_label_context, + .extent.margin.h = 13, // end time margin height }; static const LayoutNodeTextAttributeConfig s_body_config = { - .attr_id = AttributeIdBody, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Body, - .text.line_spacing_delta = CARD_LINE_DELTA, - .text.extent.margin.h = 17, // body margin height + .attr_id = AttributeIdBody, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Body, + .text.line_spacing_delta = CARD_LINE_DELTA, + .text.extent.margin.h = 17, // body margin height }; static const LayoutNodeTextAttributeConfig s_sender_config = { - .attr_id = AttributeIdSender, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_PinSubtitle, - .text.line_spacing_delta = CARD_LINE_DELTA, - .text.extent.margin.h = 17, // sender margin height + .attr_id = AttributeIdSender, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_PinSubtitle, + .text.line_spacing_delta = CARD_LINE_DELTA, + .text.extent.margin.h = 17, // sender margin height }; #if PBL_RECT - static const LayoutNodeConfig * const s_metadata_config_nodes[] = { - &s_if_not_recurring_spacer_config.extent.node, - &s_glance_start_time_or_all_day_config.extent.node, - &s_glance_end_time_with_icon_config.extent.node, - &s_if_recurring_config.extent.node, + static const LayoutNodeConfig *const s_metadata_config_nodes[] = { + &s_if_not_recurring_spacer_config.extent.node, + &s_glance_start_time_or_all_day_config.extent.node, + &s_glance_end_time_with_icon_config.extent.node, + &s_if_recurring_config.extent.node, }; static const LayoutNodeVerticalConfig s_metadata_config = { - .container.extent.node.type = LayoutNodeType_Vertical, - .vertical_alignment = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* small */ LayoutVerticalAlignment_Center, - /* medium */ LayoutVerticalAlignment_Center, - /* large */ LayoutVerticalAlignment_Left, - /* extralarge */ LayoutVerticalAlignment_Left), - .container.num_nodes = ARRAY_LENGTH(s_metadata_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_metadata_config_nodes, - }; - static const LayoutNodeConfig * const s_horizontal_config_nodes[] = { - &s_icon_config.extent.node, - &s_metadata_config.container.extent.node, + .container.extent.node.type = LayoutNodeType_Vertical, + .vertical_alignment = + PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + /* small */ LayoutVerticalAlignment_Center, + /* medium */ LayoutVerticalAlignment_Center, + /* large */ LayoutVerticalAlignment_Left, + /* extralarge */ LayoutVerticalAlignment_Left), + .container.num_nodes = ARRAY_LENGTH(s_metadata_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_metadata_config_nodes, + }; + static const LayoutNodeConfig *const s_horizontal_config_nodes[] = { + &s_icon_config.extent.node, + &s_metadata_config.container.extent.node, }; static const LayoutNodeHorizontalConfig s_horizontal_config = { - .container.extent.node.type = LayoutNodeType_Horizontal, - .container.num_nodes = ARRAY_LENGTH(s_horizontal_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_horizontal_config_nodes, + .container.extent.node.type = LayoutNodeType_Horizontal, + .container.num_nodes = ARRAY_LENGTH(s_horizontal_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_horizontal_config_nodes, }; #endif - static const LayoutNodeConfig * const s_vertical_config_nodes[] = { + static const LayoutNodeConfig *const s_vertical_config_nodes[] = { #if PBL_RECT - &s_horizontal_config.container.extent.node, - &s_glance_title_config.text.extent.node, - &s_glance_location_config.text.extent.node, - &s_digit_config.extent.node, - &s_page_break_config, - &s_title_config.text.extent.node, - &s_location_config.text.extent.node, - &s_start_time_with_icon_config.extent.node, - &s_end_time_with_icon_config.extent.node, - &s_body_config.text.extent.node, - &s_sender_config.text.extent.node, + &s_horizontal_config.container.extent.node, + &s_glance_title_config.text.extent.node, + &s_glance_location_config.text.extent.node, + &s_digit_config.extent.node, + &s_page_break_config, + &s_title_config.text.extent.node, + &s_location_config.text.extent.node, + &s_start_time_with_icon_config.extent.node, + &s_end_time_with_icon_config.extent.node, + &s_body_config.text.extent.node, + &s_sender_config.text.extent.node, #else - &s_icon_config.extent.node, - &s_glance_start_time_or_all_day_config.extent.node, - &s_glance_title_round_config.extent.node, - &s_glance_location_config.text.extent.node, - &s_if_recurring_config.extent.node, - &s_digit_config.extent.node, - &s_page_break_config, - &s_title_config.text.extent.node, - &s_location_config.text.extent.node, - &s_body_config.text.extent.node, - &s_sender_config.text.extent.node, + &s_icon_config.extent.node, + &s_glance_start_time_or_all_day_config.extent.node, + &s_glance_title_round_config.extent.node, + &s_glance_location_config.text.extent.node, + &s_if_recurring_config.extent.node, + &s_digit_config.extent.node, + &s_page_break_config, + &s_title_config.text.extent.node, + &s_location_config.text.extent.node, + &s_body_config.text.extent.node, + &s_sender_config.text.extent.node, #endif }; static const LayoutNodeVerticalConfig s_vertical_config = { - .container.extent.node.type = LayoutNodeType_Vertical, - .container.num_nodes = ARRAY_LENGTH(s_vertical_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_vertical_config_nodes, - .container.extent.offset.y = CARD_MARGIN_TOP, - .container.extent.margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, + .container.extent.node.type = LayoutNodeType_Vertical, + .container.num_nodes = ARRAY_LENGTH(s_vertical_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_vertical_config_nodes, + .container.extent.offset.y = CARD_MARGIN_TOP, + .container.extent.margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, }; return timeline_layout_create_card_view_from_config(timeline_layout, @@ -544,23 +547,23 @@ LayoutLayer *calendar_layout_create(const LayoutLayerConfig *config) { CalendarLayout *layout = task_zalloc_check(sizeof(CalendarLayout)); static const TimelineLayoutImpl s_timeline_layout_impl = { - .attributes = { AttributeIdTitle, AttributeIdLocationName }, - .default_colors = { { .argb = GColorBlackARGB8 }, - { .argb = GColorWhiteARGB8 }, - { .argb = GColorSunsetOrangeARGB8 } }, - .default_icon = TIMELINE_RESOURCE_TIMELINE_CALENDAR, - .card_icon_align = PBL_IF_RECT_ELSE(GAlignLeft, GAlignCenter), - .card_icon_size = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* small */ TimelineResourceSizeSmall, - /* medium */ TimelineResourceSizeSmall, - /* large */ TimelineResourceSizeLarge, - /* extralarge */ TimelineResourceSizeLarge), - .card_view_constructor = prv_card_view_constructor, - }; - - const TimelineResourceId icon_resource = - prv_get_icon_resource(config->mode, config->attributes, - s_timeline_layout_impl.card_icon_size); + .attributes = {AttributeIdTitle, AttributeIdLocationName}, + .default_colors = + {{.argb = GColorBlackARGB8}, + {.argb = GColorWhiteARGB8}, + {.argb = GColorSunsetOrangeARGB8}}, + .default_icon = TIMELINE_RESOURCE_TIMELINE_CALENDAR, + .card_icon_align = PBL_IF_RECT_ELSE(GAlignLeft, GAlignCenter), + .card_icon_size = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + /* small */ TimelineResourceSizeSmall, + /* medium */ TimelineResourceSizeSmall, + /* large */ TimelineResourceSizeLarge, + /* extralarge */ TimelineResourceSizeLarge), + .card_view_constructor = prv_card_view_constructor, + }; + + const TimelineResourceId icon_resource = prv_get_icon_resource( + config->mode, config->attributes, s_timeline_layout_impl.card_icon_size); timeline_layout_init_with_icon_id((TimelineLayout *)layout, config, &s_timeline_layout_impl, icon_resource); diff --git a/src/fw/services/timeline/calendar_layout_resources.c b/src/fw/services/timeline/calendar_layout_resources.c index ee0cea0da6..6de2a4547b 100644 --- a/src/fw/services/timeline/calendar_layout_resources.c +++ b/src/fw/services/timeline/calendar_layout_resources.c @@ -10,33 +10,39 @@ // but when gpath filled is fixed to correctly match its coordinates, these MUST be updated. CalendarStartIcon g_calendar_start_icon = { - .image = { - .version = 1, - .size = { 9, 9 }, - .command_list = { - .num_commands = 1, - }, - }, - .command = { - .type = GDrawCommandTypePath, - .fill_color = { .argb = GColorBlackARGB8 }, - .num_points = STATIC_ARRAY_LENGTH(GPoint, START_ICON_POINTS), - }, - .points = START_ICON_POINTS, + .image = + { + .version = 1, + .size = {9, 9}, + .command_list = + { + .num_commands = 1, + }, + }, + .command = + { + .type = GDrawCommandTypePath, + .fill_color = {.argb = GColorBlackARGB8}, + .num_points = STATIC_ARRAY_LENGTH(GPoint, START_ICON_POINTS), + }, + .points = START_ICON_POINTS, }; CalendarEndIcon g_calendar_end_icon = { - .image = { - .version = 1, - .size = { 9, 9 }, - .command_list = { - .num_commands = 1, - }, - }, - .command = { - .type = GDrawCommandTypePath, - .fill_color = { .argb = GColorBlackARGB8 }, - .num_points = STATIC_ARRAY_LENGTH(GPoint, END_ICON_POINTS), - }, - .points = END_ICON_POINTS, + .image = + { + .version = 1, + .size = {9, 9}, + .command_list = + { + .num_commands = 1, + }, + }, + .command = + { + .type = GDrawCommandTypePath, + .fill_color = {.argb = GColorBlackARGB8}, + .num_points = STATIC_ARRAY_LENGTH(GPoint, END_ICON_POINTS), + }, + .points = END_ICON_POINTS, }; diff --git a/src/fw/services/timeline/event.c b/src/fw/services/timeline/event.c index e421fbe892..8cc239d1f6 100644 --- a/src/fw/services/timeline/event.c +++ b/src/fw/services/timeline/event.c @@ -26,8 +26,8 @@ typedef struct TimelineEventState { } TimelineEventState; static TimelineEventImplGetter s_services[TimelineEventServiceCount] = { - [TimelineEventService_Calendar] = calendar_get_event_service, - [TimelineEventService_Peek] = timeline_peek_get_event_service, + [TimelineEventService_Calendar] = calendar_get_event_service, + [TimelineEventService_Peek] = timeline_peek_get_event_service, }; // This mutex protects all state, but is only used for factory resetting synchronously, therefore @@ -50,7 +50,7 @@ static void prv_update_status_system_task_callback(void *unused) { static void prv_update_status_async(void) { if (__atomic_test_and_set(&s_cb_scheduled, __ATOMIC_RELAXED)) { - return; // we already have a cb scheduled + return; // we already have a cb scheduled } system_task_add_callback(prv_update_status_system_task_callback, NULL); @@ -83,10 +83,10 @@ static void prv_set_timer(unsigned int timeout_ms) { static bool prv_should_use_item(TimelineEventState *state, SerializedTimelineItemHeader *header) { // Use the new item if ... - return ((uuid_is_invalid(&state->filter_header->common.id)) || // There is no old item - (state->impl->comparator && // Or the comparator chooses the new item + return ((uuid_is_invalid(&state->filter_header->common.id)) || // There is no old item + (state->impl->comparator && // Or the comparator chooses the new item (state->impl->comparator(header, state->filter_header, &state->context) < 0)) || - (header->common.timestamp < state->filter_header->common.timestamp)); // Or it's earlier + (header->common.timestamp < state->filter_header->common.timestamp)); // Or it's earlier } static bool prv_item_header_filter(SerializedTimelineItemHeader *header, void *unused) { @@ -148,8 +148,7 @@ static void prv_update_status(void) { if (has_item) { timeline_item_deserialize_header(&item, state->filter_header); } - const uint32_t other_timeout_ms = - state->impl->update(has_item ? &item : NULL, &state->context); + const uint32_t other_timeout_ms = state->impl->update(has_item ? &item : NULL, &state->context); if (other_timeout_ms) { timeout_ms = timeout_ms ? MIN(timeout_ms, other_timeout_ms) : other_timeout_ms; } @@ -207,18 +206,18 @@ void timeline_event_refresh(void) { bool timeline_event_is_all_day(CommonTimelineItemHeader *common) { return (common->all_day || - (common->duration >= MINUTES_PER_DAY)); // Include >= 24 hour events. See PBL-23584 + (common->duration >= MINUTES_PER_DAY)); // Include >= 24 hour events. See PBL-23584 } bool timeline_event_is_ongoing(time_t now, time_t event_start, int event_duration_m) { return ((event_start <= now) && ((event_start + (SECONDS_PER_MINUTE * event_duration_m)) > now)); } -bool timeline_event_starts_within(CommonTimelineItemHeader *common, time_t now, - int delta_start_s, int delta_end_s) { - return ((common->type == TimelineItemTypePin) && // Ignore non-pins - (((delta_start_s == TIMELINE_EVENT_DELTA_INFINITE) || // Any past event or - (common->timestamp > (now + delta_start_s))) && // Begins after range start and - ((delta_end_s == TIMELINE_EVENT_DELTA_INFINITE) || // Any future event or - (common->timestamp < (now + delta_end_s))))); // Begins before range end +bool timeline_event_starts_within(CommonTimelineItemHeader *common, time_t now, int delta_start_s, + int delta_end_s) { + return ((common->type == TimelineItemTypePin) && // Ignore non-pins + (((delta_start_s == TIMELINE_EVENT_DELTA_INFINITE) || // Any past event or + (common->timestamp > (now + delta_start_s))) && // Begins after range start and + ((delta_end_s == TIMELINE_EVENT_DELTA_INFINITE) || // Any future event or + (common->timestamp < (now + delta_end_s))))); // Begins before range end } diff --git a/src/fw/services/timeline/generic_layout.c b/src/fw/services/timeline/generic_layout.c index e471aecc6f..c4e6512791 100644 --- a/src/fw/services/timeline/generic_layout.c +++ b/src/fw/services/timeline/generic_layout.c @@ -16,22 +16,18 @@ // Card Mode ////////////////////////////////////////// -#define CARD_MARGIN_TOP \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ PBL_IF_RECT_ELSE(8, 13), \ - /* medium */ PBL_IF_RECT_ELSE(8, 13), \ - /* large */ 2, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* extralarge */ 2 \ - ) +#define CARD_MARGIN_TOP \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ PBL_IF_RECT_ELSE(8, 13), /* medium */ PBL_IF_RECT_ELSE(8, 13), /* large */ \ + 2, /* This is the same as Large until ExtraLarge is designed */ /* extralarge */ 2) #define CARD_MARGIN_BOTTOM PBL_IF_RECT_ELSE(7, 0) #define CARD_LINE_DELTA -2 #if PBL_RECT static void prv_horizontal_rule_node_callback(GContext *ctx, const GRect *box, - const GTextNodeDrawConfig *config, - bool render, GSize *size_out, void *user_data) { + const GTextNodeDrawConfig *config, bool render, + GSize *size_out, void *user_data) { const LayoutLayer *layout = user_data; const int16_t horizontal_margin = 1; @@ -56,8 +52,8 @@ static void prv_horizontal_rule_node_callback(GContext *ctx, const GRect *box, static GTextNode *prv_horizontal_rule_constructor(const LayoutLayer *layout_ref, const LayoutNodeConstructorConfig *config) { - GTextNodeCustom *custom_node = graphics_text_node_create_custom(prv_horizontal_rule_node_callback, - (void *)layout_ref); + GTextNodeCustom *custom_node = + graphics_text_node_create_custom(prv_horizontal_rule_node_callback, (void *)layout_ref); if (custom_node) { custom_node->node.offset.y = 11; custom_node->node.margin.h = 12; @@ -66,105 +62,102 @@ static GTextNode *prv_horizontal_rule_constructor(const LayoutLayer *layout_ref, return NULL; } } -#endif // PBL_RECT +#endif // PBL_RECT static GTextNode *prv_card_view_constructor(TimelineLayout *timeline_layout) { static const LayoutNodeExtentConfig s_icon_config = { - .node.type = LayoutNodeType_TimelineIcon, + .node.type = LayoutNodeType_TimelineIcon, #if PBL_RECT - .offset.x = -1, // icon offset x - .margin.w = 9, // icon margin width + .offset.x = -1, // icon offset x + .margin.w = 9, // icon margin width #endif - .margin.h = PBL_IF_RECT_ELSE(-2, 2), // icon margin height + .margin.h = PBL_IF_RECT_ELSE(-2, 2), // icon margin height }; static const LayoutNodeTextDynamicConfig s_time_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = timeline_layout_time_text_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, - .text.alignment = PBL_IF_RECT_ELSE(LayoutTextAlignment_Right, LayoutTextAlignment_Center), - .text.extent.margin.h = PBL_IF_RECT_ELSE(0, -2), // time margin height + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = timeline_layout_time_text_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, + .text.alignment = PBL_IF_RECT_ELSE(LayoutTextAlignment_Right, LayoutTextAlignment_Center), + .text.extent.margin.h = PBL_IF_RECT_ELSE(0, -2), // time margin height }; static const LayoutNodeTextAttributeConfig s_title_config = { - .attr_id = AttributeIdTitle, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Title, - .text.line_spacing_delta = CARD_LINE_DELTA, - .text.extent.margin.h = 4, // title margin height + .attr_id = AttributeIdTitle, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Title, + .text.line_spacing_delta = CARD_LINE_DELTA, + .text.extent.margin.h = 4, // title margin height }; static const LayoutNodeTextAttributeConfig s_subtitle_config = { - .attr_id = AttributeIdSubtitle, - // This is spec'd to always be Gothic 24 Bold regardless of content size - .text.font_key = FONT_KEY_GOTHIC_24_BOLD, - .text.line_spacing_delta = CARD_LINE_DELTA, - .text.extent.margin.h = 10, // subtitle margin height + .attr_id = AttributeIdSubtitle, + // This is spec'd to always be Gothic 24 Bold regardless of content size + .text.font_key = FONT_KEY_GOTHIC_24_BOLD, + .text.line_spacing_delta = CARD_LINE_DELTA, + .text.extent.margin.h = 10, // subtitle margin height }; static const LayoutNodeTextAttributeConfig s_location_config = { - .attr_id = AttributeIdLocationName, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, - .text.extent.margin.h = 10, // location margin height + .attr_id = AttributeIdLocationName, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, + .text.extent.margin.h = 10, // location margin height }; static const LayoutNodeTextAttributeConfig s_body_config = { - .attr_id = AttributeIdBody, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Body, - .text.extent.margin.h = 12, // body margin height + .attr_id = AttributeIdBody, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Body, + .text.extent.margin.h = 12, // body margin height }; #if PBL_RECT static const LayoutNodeConstructorConfig s_horizontal_rule_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_horizontal_rule_constructor, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_horizontal_rule_constructor, }; - static const LayoutNodeConfig * const s_icon_vertical_config_nodes[] = { - &s_icon_config.node, + static const LayoutNodeConfig *const s_icon_vertical_config_nodes[] = { + &s_icon_config.node, }; static const LayoutNodeVerticalConfig s_icon_vertical_container_config = { - .vertical_alignment = LayoutVerticalAlignment_Center, - .container.extent.node.type = LayoutNodeType_Vertical, - .container.num_nodes = ARRAY_LENGTH(s_icon_vertical_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_icon_vertical_config_nodes, + .vertical_alignment = LayoutVerticalAlignment_Center, + .container.extent.node.type = LayoutNodeType_Vertical, + .container.num_nodes = ARRAY_LENGTH(s_icon_vertical_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_icon_vertical_config_nodes, }; - static const LayoutNodeConfig * const s_time_vertical_config_nodes[] = { - &s_time_config.text.extent.node, + static const LayoutNodeConfig *const s_time_vertical_config_nodes[] = { + &s_time_config.text.extent.node, }; static const LayoutNodeVerticalConfig s_time_vertical_container_config = { - .vertical_alignment = LayoutVerticalAlignment_Center, - .container.extent.node.type = LayoutNodeType_Vertical, - .container.num_nodes = ARRAY_LENGTH(s_time_vertical_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_time_vertical_config_nodes, + .vertical_alignment = LayoutVerticalAlignment_Center, + .container.extent.node.type = LayoutNodeType_Vertical, + .container.num_nodes = ARRAY_LENGTH(s_time_vertical_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_time_vertical_config_nodes, }; - static const LayoutNodeConfig * const s_horizontal_config_nodes[] = { - &s_icon_vertical_container_config.container.extent.node, - &s_time_vertical_container_config.container.extent.node, + static const LayoutNodeConfig *const s_horizontal_config_nodes[] = { + &s_icon_vertical_container_config.container.extent.node, + &s_time_vertical_container_config.container.extent.node, }; static const LayoutNodeHorizontalConfig s_horizontal_config = { - .container.extent.node.type = LayoutNodeType_Horizontal, - .container.num_nodes = ARRAY_LENGTH(s_horizontal_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_horizontal_config_nodes, + .container.extent.node.type = LayoutNodeType_Horizontal, + .container.num_nodes = ARRAY_LENGTH(s_horizontal_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_horizontal_config_nodes, }; #endif - static const LayoutNodeConfig * const s_vertical_config_nodes[] = { + static const LayoutNodeConfig *const s_vertical_config_nodes[] = { #if PBL_RECT - &s_horizontal_config.container.extent.node, - &s_horizontal_rule_config.extent.node, + &s_horizontal_config.container.extent.node, &s_horizontal_rule_config.extent.node, #else &s_icon_config.node, &s_time_config.text.extent.node, #endif - &s_title_config.text.extent.node, - &s_subtitle_config.text.extent.node, - &s_location_config.text.extent.node, - &s_body_config.text.extent.node, + &s_title_config.text.extent.node, &s_subtitle_config.text.extent.node, + &s_location_config.text.extent.node, &s_body_config.text.extent.node, }; static const LayoutNodeVerticalConfig s_vertical_config = { - .container.extent.node.type = LayoutNodeType_Vertical, - .container.num_nodes = ARRAY_LENGTH(s_vertical_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_vertical_config_nodes, - .container.extent.offset.y = CARD_MARGIN_TOP, - .container.extent.margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, + .container.extent.node.type = LayoutNodeType_Vertical, + .container.num_nodes = ARRAY_LENGTH(s_vertical_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_vertical_config_nodes, + .container.extent.offset.y = CARD_MARGIN_TOP, + .container.extent.margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, }; return timeline_layout_create_card_view_from_config(timeline_layout, @@ -183,20 +176,22 @@ LayoutLayer *generic_layout_create(const LayoutLayerConfig *config) { GenericLayout *layout = task_zalloc_check(sizeof(GenericLayout)); static const TimelineLayoutImpl s_timeline_layout_impl = { - .attributes = { AttributeIdTitle, AttributeIdSubtitle }, - .default_colors = { { .argb = GColorBlackARGB8 }, - { .argb = GColorWhiteARGB8 }, - { .argb = GColorSunsetOrangeARGB8 } }, - .default_icon = TIMELINE_RESOURCE_NOTIFICATION_FLAG, - .card_icon_align = PBL_IF_RECT_ELSE(GAlignLeft, GAlignCenter), - .card_icon_size = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - //! @note this is the same as Medium until Small is designed - /* small */ TimelineResourceSizeTiny, - /* medium */ TimelineResourceSizeTiny, - /* large */ TimelineResourceSizeSmall, - //! @note this is the same as Large until ExtraLarge is designed - /* extralarge */ TimelineResourceSizeSmall), - .card_view_constructor = prv_card_view_constructor, + .attributes = {AttributeIdTitle, AttributeIdSubtitle}, + .default_colors = + {{.argb = GColorBlackARGB8}, + {.argb = GColorWhiteARGB8}, + {.argb = GColorSunsetOrangeARGB8}}, + .default_icon = TIMELINE_RESOURCE_NOTIFICATION_FLAG, + .card_icon_align = PBL_IF_RECT_ELSE(GAlignLeft, GAlignCenter), + .card_icon_size = PREFERRED_CONTENT_SIZE_SWITCH( + PreferredContentSizeDefault, + //! @note this is the same as Medium until Small is designed + /* small */ TimelineResourceSizeTiny, + /* medium */ TimelineResourceSizeTiny, + /* large */ TimelineResourceSizeSmall, + //! @note this is the same as Large until ExtraLarge is designed + /* extralarge */ TimelineResourceSizeSmall), + .card_view_constructor = prv_card_view_constructor, }; timeline_layout_init((TimelineLayout *)layout, config, &s_timeline_layout_impl); diff --git a/src/fw/services/timeline/health_layout.c b/src/fw/services/timeline/health_layout.c index 1f323d3865..7c135505ab 100644 --- a/src/fw/services/timeline/health_layout.c +++ b/src/fw/services/timeline/health_layout.c @@ -16,9 +16,9 @@ static GTextNode *prv_card_view_constructor(TimelineLayout *timeline_layout) { const LayoutNodeExtentConfig s_metrics_config = { - .node.type = LayoutNodeType_TimelineMetrics, - .offset.y = CARD_MARGIN_TOP, - .margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, + .node.type = LayoutNodeType_TimelineMetrics, + .offset.y = CARD_MARGIN_TOP, + .margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, }; return layout_create_text_node_from_config(&timeline_layout->layout_layer, &s_metrics_config.node); @@ -36,14 +36,15 @@ LayoutLayer *health_layout_create(const LayoutLayerConfig *config) { HealthLayout *layout = task_zalloc_check(sizeof(HealthLayout)); static const TimelineLayoutImpl s_timeline_layout_impl = { - .attributes = { AttributeIdTitle, AttributeIdSubtitle }, - .default_colors = { { .argb = GColorBlackARGB8 }, - { .argb = GColorWhiteARGB8 }, - { .argb = GColorSunsetOrangeARGB8 } }, - .default_icon = TIMELINE_RESOURCE_ACTIVITY, - .card_icon_align = PBL_IF_ROUND_ELSE(GAlignCenter, GAlignLeft), - .card_icon_size = TimelineResourceSizeTiny, - .card_view_constructor = prv_card_view_constructor, + .attributes = {AttributeIdTitle, AttributeIdSubtitle}, + .default_colors = + {{.argb = GColorBlackARGB8}, + {.argb = GColorWhiteARGB8}, + {.argb = GColorSunsetOrangeARGB8}}, + .default_icon = TIMELINE_RESOURCE_ACTIVITY, + .card_icon_align = PBL_IF_ROUND_ELSE(GAlignCenter, GAlignLeft), + .card_icon_size = TimelineResourceSizeTiny, + .card_view_constructor = prv_card_view_constructor, }; timeline_layout_init((TimelineLayout *)layout, config, &s_timeline_layout_impl); diff --git a/src/fw/services/timeline/item.c b/src/fw/services/timeline/item.c index 674b8b0e5d..d848b7e856 100644 --- a/src/fw/services/timeline/item.c +++ b/src/fw/services/timeline/item.c @@ -14,17 +14,15 @@ static bool prv_is_valid_item(const TimelineItem *item) { return item && !uuid_is_invalid(&item->header.id); } -static bool prv_item_init(TimelineItem *item, int num_attributes, - int num_actions, uint8_t attributes_per_action[], size_t required_size_for_strings, - uint8_t **string_buffer) { - +static bool prv_item_init(TimelineItem *item, int num_attributes, int num_actions, + uint8_t attributes_per_action[], size_t required_size_for_strings, + uint8_t **string_buffer) { if (num_actions > 0) { PBL_ASSERTN(attributes_per_action != NULL); } - const size_t alloc_size = attributes_actions_get_required_buffer_size(num_attributes, num_actions, - attributes_per_action, - required_size_for_strings); + const size_t alloc_size = attributes_actions_get_required_buffer_size( + num_attributes, num_actions, attributes_per_action, required_size_for_strings); uint8_t *buffer = task_zalloc(alloc_size); if (buffer == NULL) { @@ -32,8 +30,8 @@ static bool prv_item_init(TimelineItem *item, int num_attributes, } item->allocated_buffer = buffer; - attributes_actions_init(&item->attr_list, &item->action_group, &buffer, - num_attributes, num_actions, attributes_per_action); + attributes_actions_init(&item->attr_list, &item->action_group, &buffer, num_attributes, + num_actions, attributes_per_action); if (string_buffer != NULL) { *string_buffer = buffer; @@ -52,9 +50,9 @@ T_STATIC bool prv_deep_copy_attributes_actions(AttributeList *attr_list, item_out->allocated_buffer = task_malloc_check(data_size); uint8_t *buf_end = item_out->allocated_buffer + data_size; - bool rv = attributes_actions_deep_copy(attr_list, &item_out->attr_list, action_group, - &item_out->action_group, item_out->allocated_buffer, - buf_end); + bool rv = + attributes_actions_deep_copy(attr_list, &item_out->attr_list, action_group, + &item_out->action_group, item_out->allocated_buffer, buf_end); if (!rv) { timeline_item_free_allocated_buffer(item_out); return false; @@ -64,10 +62,9 @@ T_STATIC bool prv_deep_copy_attributes_actions(AttributeList *attr_list, return true; } -bool timeline_item_create_from_serial_data(TimelineItem *item, - uint8_t num_attributes, uint8_t num_actions, const uint8_t *data, size_t size, - size_t *string_alloc_size, uint8_t **string_buffer) { - +bool timeline_item_create_from_serial_data(TimelineItem *item, uint8_t num_attributes, + uint8_t num_actions, const uint8_t *data, size_t size, + size_t *string_alloc_size, uint8_t **string_buffer) { PBL_ASSERTN(data != NULL); PBL_ASSERTN(string_alloc_size != NULL); @@ -79,8 +76,8 @@ bool timeline_item_create_from_serial_data(TimelineItem *item, return NULL; } - if (!prv_item_init(item, num_attributes, num_actions, attributes_per_action, - *string_alloc_size, string_buffer)) { + if (!prv_item_init(item, num_attributes, num_actions, attributes_per_action, *string_alloc_size, + string_buffer)) { return false; } @@ -108,15 +105,15 @@ TimelineItem *timeline_item_create_with_attributes(time_t timestamp, uint16_t du } TimelineItem *timeline_item_create(int num_attributes, int num_actions, - uint8_t attributes_per_action[], size_t required_size_for_strings, uint8_t **string_buffer) { - + uint8_t attributes_per_action[], + size_t required_size_for_strings, uint8_t **string_buffer) { TimelineItem *item = task_zalloc(sizeof(TimelineItem)); if (item == NULL) { return NULL; } if (!prv_item_init(item, num_attributes, num_actions, attributes_per_action, - required_size_for_strings, string_buffer)) { + required_size_for_strings, string_buffer)) { task_free(item); return NULL; } @@ -149,7 +146,7 @@ size_t timeline_item_get_serialized_payload_size(TimelineItem *item) { } bool timeline_item_deserialize_item(TimelineItem *item_out, - const SerializedTimelineItemHeader* header, + const SerializedTimelineItemHeader *header, const uint8_t *payload) { // If the creation / deserialization fails we need to clean up, and if the item contains garbage // data we will try to free a garbage allocated buffer field and crash. @@ -157,23 +154,16 @@ bool timeline_item_deserialize_item(TimelineItem *item_out, size_t string_alloc_size; char *buffer; - if (!timeline_item_create_from_serial_data(item_out, - header->num_attributes, - header->num_actions, - payload, - header->payload_length, - &string_alloc_size, - (uint8_t **) &buffer)) { + if (!timeline_item_create_from_serial_data(item_out, header->num_attributes, header->num_actions, + payload, header->payload_length, &string_alloc_size, + (uint8_t **)&buffer)) { PBL_LOG_ERR("Failed to get timeline item"); goto cleanup; } timeline_item_deserialize_header(item_out, header); - if (!timeline_item_deserialize_payload(item_out, - buffer, - string_alloc_size, - payload, + if (!timeline_item_deserialize_payload(item_out, buffer, string_alloc_size, payload, header->payload_length)) { PBL_LOG_ERR("Failed to deserialize payload"); goto cleanup; @@ -186,9 +176,7 @@ bool timeline_item_deserialize_item(TimelineItem *item_out, return false; } -void timeline_item_serialize_header(TimelineItem *item, - SerializedTimelineItemHeader *header) { - +void timeline_item_serialize_header(TimelineItem *item, SerializedTimelineItemHeader *header) { PBL_ASSERTN(item != NULL); PBL_ASSERTN(header != NULL); @@ -202,7 +190,6 @@ void timeline_item_serialize_header(TimelineItem *item, void timeline_item_deserialize_header(TimelineItem *item, const SerializedTimelineItemHeader *header) { - PBL_ASSERTN(item != NULL); PBL_ASSERTN(header != NULL); @@ -222,13 +209,11 @@ time_t timeline_item_get_tz_timestamp(CommonTimelineItemHeader *hdr) { return timestamp; } -size_t timeline_item_serialize_payload(TimelineItem *item, uint8_t *buffer, - size_t buffer_size) { - +size_t timeline_item_serialize_payload(TimelineItem *item, uint8_t *buffer, size_t buffer_size) { PBL_ASSERTN(item != NULL); - return attributes_actions_serialize_payload(&item->attr_list, &item->action_group, - buffer, buffer_size); + return attributes_actions_serialize_payload(&item->attr_list, &item->action_group, buffer, + buffer_size); } bool timeline_item_deserialize_payload(TimelineItem *item, char *string_buffer, @@ -241,10 +226,10 @@ bool timeline_item_deserialize_payload(TimelineItem *item, char *string_buffer, uint8_t *buf_end = (uint8_t *)string_buffer + string_buffer_size; return attributes_actions_deserialize(&item->attr_list, &item->action_group, - (uint8_t*) string_buffer, buf_end, payload, payload_size); + (uint8_t *)string_buffer, buf_end, payload, payload_size); } -void timeline_item_destroy(TimelineItem* item) { +void timeline_item_destroy(TimelineItem *item) { if (item != NULL) { timeline_item_free_allocated_buffer(item); task_free(item); @@ -276,8 +261,8 @@ bool timeline_item_verify_layout_serialized(const uint8_t *val, int val_len) { } bool timeline_item_action_is_dismiss(const TimelineItemAction *action) { - return (action->type == TimelineItemActionTypeAncsNegative || - action->type == TimelineItemActionTypeDismiss); + return (action->type == TimelineItemActionTypeAncsNegative || + action->type == TimelineItemActionTypeDismiss); } bool timeline_item_action_is_ancs(const TimelineItemAction *action) { @@ -293,11 +278,10 @@ bool timeline_item_is_ancs_notif(const TimelineItem *item) { // ------------------------------------------------------------------------------------------------ // Action finding functions -typedef bool (*ActionCompareFunc)(const TimelineItemAction *action, void* data); +typedef bool (*ActionCompareFunc)(const TimelineItemAction *action, void *data); static TimelineItemAction *prv_find_action(const TimelineItemActionGroup *action_group, - ActionCompareFunc compare_func, - void *data) { + ActionCompareFunc compare_func, void *data) { for (int i = 0; i < action_group->num_actions; i++) { TimelineItemAction *action = &action_group->actions[i]; if (compare_func(action, data)) { @@ -309,8 +293,7 @@ static TimelineItemAction *prv_find_action(const TimelineItemActionGroup *action } static TimelineItemAction *prv_item_find_action(const TimelineItem *item, - ActionCompareFunc compare_func, - void *data) { + ActionCompareFunc compare_func, void *data) { if (!prv_is_valid_item(item)) { return NULL; } @@ -318,7 +301,7 @@ static TimelineItemAction *prv_item_find_action(const TimelineItem *item, return prv_find_action(&item->action_group, compare_func, data); } -static bool prv_action_id_compare_func(const TimelineItemAction *action, void* data) { +static bool prv_action_id_compare_func(const TimelineItemAction *action, void *data) { uint8_t *action_id = data; return (action->id == *action_id); } @@ -328,7 +311,7 @@ const TimelineItemAction *timeline_item_find_action_with_id(const TimelineItem * return prv_item_find_action(item, prv_action_id_compare_func, &action_id); } -static bool prv_action_type_compare_func(const TimelineItemAction *action, void* data) { +static bool prv_action_type_compare_func(const TimelineItemAction *action, void *data) { TimelineItemActionType *type = data; return (action->type == *type); } @@ -338,7 +321,7 @@ TimelineItemAction *timeline_item_find_action_by_type(const TimelineItem *item, return prv_item_find_action(item, prv_action_type_compare_func, &type); } -static bool prv_action_dismiss_compare_func(const TimelineItemAction *action, void* data) { +static bool prv_action_dismiss_compare_func(const TimelineItemAction *action, void *data) { return timeline_item_action_is_dismiss(action); } @@ -346,9 +329,9 @@ TimelineItemAction *timeline_item_find_dismiss_action(const TimelineItem *item) return prv_item_find_action(item, prv_action_dismiss_compare_func, NULL); } -static bool prv_action_reply_compare_func(const TimelineItemAction *action, void* data) { +static bool prv_action_reply_compare_func(const TimelineItemAction *action, void *data) { return (action->type == TimelineItemActionTypeAncsResponse) || - (action->type == TimelineItemActionTypeResponse); + (action->type == TimelineItemActionTypeResponse); } TimelineItemAction *timeline_item_find_reply_action(const TimelineItem *item) { diff --git a/src/fw/services/timeline/layout_layer.c b/src/fw/services/timeline/layout_layer.c index 269a5ba802..fde965105e 100644 --- a/src/fw/services/timeline/layout_layer.c +++ b/src/fw/services/timeline/layout_layer.c @@ -16,31 +16,31 @@ #include "system/passert.h" static const LayoutLayerConstructor s_layout_constructors[NumLayoutIds] = { - [LayoutIdGeneric] = generic_layout_create, - [LayoutIdCalendar] = calendar_layout_create, - [LayoutIdReminder] = notification_layout_create, - [LayoutIdNotification] = notification_layout_create, - [LayoutIdWeather] = weather_layout_create, - [LayoutIdSports] = sports_layout_create, - [LayoutIdAlarm] = alarm_layout_create, - [LayoutIdHealth] = health_layout_create, + [LayoutIdGeneric] = generic_layout_create, + [LayoutIdCalendar] = calendar_layout_create, + [LayoutIdReminder] = notification_layout_create, + [LayoutIdNotification] = notification_layout_create, + [LayoutIdWeather] = weather_layout_create, + [LayoutIdSports] = sports_layout_create, + [LayoutIdAlarm] = alarm_layout_create, + [LayoutIdHealth] = health_layout_create, }; static const LayoutVerifier s_layout_verifiers[NumLayoutIds] = { - [LayoutIdGeneric] = generic_layout_verify, - [LayoutIdCalendar] = calendar_layout_verify, - [LayoutIdReminder] = notification_layout_verify, - [LayoutIdNotification] = notification_layout_verify, - [LayoutIdWeather] = weather_layout_verify, - [LayoutIdSports] = sports_layout_verify, - [LayoutIdAlarm] = alarm_layout_verify, - [LayoutIdHealth] = health_layout_verify, + [LayoutIdGeneric] = generic_layout_verify, + [LayoutIdCalendar] = calendar_layout_verify, + [LayoutIdReminder] = notification_layout_verify, + [LayoutIdNotification] = notification_layout_verify, + [LayoutIdWeather] = weather_layout_verify, + [LayoutIdSports] = sports_layout_verify, + [LayoutIdAlarm] = alarm_layout_verify, + [LayoutIdHealth] = health_layout_verify, }; static const LayoutColors s_default_colors = { - .primary_color = { .argb = GColorBlackARGB8 }, - .secondary_color = { .argb = GColorBlackARGB8 }, - .bg_color = { .argb = PBL_IF_COLOR_ELSE(GColorLightGrayARGB8, GColorWhiteARGB8) }, + .primary_color = {.argb = GColorBlackARGB8}, + .secondary_color = {.argb = GColorBlackARGB8}, + .bg_color = {.argb = PBL_IF_COLOR_ELSE(GColorLightGrayARGB8, GColorWhiteARGB8)}, }; #if !PBL_COLOR @@ -70,9 +70,9 @@ bool layout_verify(bool existing_attributes[], LayoutId id) { if (id == LayoutIdTest) { return true; } else if (id == LayoutIdUnknown || id >= NumLayoutIds) { - return false; // out of range + return false; // out of range } else if (id == LayoutIdCommNotification) { - return false; // NYI + return false; // NYI } else { return s_layout_verifiers[id](existing_attributes); } @@ -96,7 +96,8 @@ const LayoutColors *layout_get_notification_colors(const LayoutLayer *layout) { return layout_get_colors(layout); #else const bool use_alternative_design = alerts_preferences_get_notification_alternative_design(); - return use_alternative_design ? &s_default_notification_colors_alternative : &s_default_notification_colors_standard; + return use_alternative_design ? &s_default_notification_colors_alternative + : &s_default_notification_colors_standard; #endif } diff --git a/src/fw/services/timeline/layout_node.c b/src/fw/services/timeline/layout_node.c index 5df060f5a2..e9913dc13d 100644 --- a/src/fw/services/timeline/layout_node.c +++ b/src/fw/services/timeline/layout_node.c @@ -30,8 +30,7 @@ static GTextNodeText *prv_create_text_node_attribute(const LayoutLayer *layout, return text_node; } -static void prv_set_text_node_extent(GTextNode *node, - const LayoutNodeExtentConfig *config) { +static void prv_set_text_node_extent(GTextNode *node, const LayoutNodeExtentConfig *config) { // These are added instead of just set since in some cases, a node can have its extent influenced // twice. For example, a pre-configured node created by a Constructor Config with its own extent. node->offset.x += config->offset.x; @@ -45,19 +44,22 @@ static const char *prv_get_font_key(const LayoutNodeTextConfig *config) { return config->font_key; } const LayoutContentSize content_size = config->style; - return (content_size == LayoutContentSize_Auto) ? - system_theme_get_font_key(config->style_font) : - system_theme_get_font_key_for_size(ToPreferredContentSize(content_size), config->style_font); + return (content_size == LayoutContentSize_Auto) + ? system_theme_get_font_key(config->style_font) + : system_theme_get_font_key_for_size(ToPreferredContentSize(content_size), + config->style_font); } -static void prv_set_text_node_text_parameters_from_config( - GTextNodeText *text_node, const LayoutLayer *layout, const LayoutNodeTextConfig *config) { +static void prv_set_text_node_text_parameters_from_config(GTextNodeText *text_node, + const LayoutLayer *layout, + const LayoutNodeTextConfig *config) { text_node->font = fonts_get_system_font(prv_get_font_key(config)); const int fixed_lines = config->fixed_lines; const int line_spacing_delta = config->line_spacing_delta; - text_node->max_size.h = fixed_lines ? (fixed_lines * (fonts_get_font_height(text_node->font) + - line_spacing_delta) - line_spacing_delta) - : 0; + text_node->max_size.h = + fixed_lines ? (fixed_lines * (fonts_get_font_height(text_node->font) + line_spacing_delta) - + line_spacing_delta) + : 0; text_node->overflow = GTextOverflowModeTrailingEllipsis; text_node->alignment = PBL_IF_RECT_ELSE(GTextAlignmentLeft, GTextAlignmentCenter); text_node->line_spacing_delta = line_spacing_delta; @@ -128,9 +130,9 @@ static GTextNodeTextDynamic *prv_create_text_dynamic_node_from_config( sizeof(TextDynamicContext) + config->buffer_size, prv_text_dynamic_node_callback, NULL); if (text_node) { TextDynamicContext *context = (TextDynamicContext *)text_node->buffer; - *context = (TextDynamicContext) { - .layout = layout, - .config = *config, + *context = (TextDynamicContext){ + .layout = layout, + .config = *config, }; text_node->user_data = context; // graphics_text_node_create_text_dynamic() sets text_node->text.text to text_node->buffer, @@ -147,16 +149,16 @@ static GTextNodeTextDynamic *prv_create_text_dynamic_node_from_config( return text_node; } -static GTextNodeText *prv_create_text_node_from_config( - const LayoutLayer *layout, const LayoutNodeTextConfig *config) { +static GTextNodeText *prv_create_text_node_from_config(const LayoutLayer *layout, + const LayoutNodeTextConfig *config) { GTextNodeText *text_node = prv_create_text_node_buffer(NULL); prv_set_text_node_text_parameters_from_config(text_node, layout, config); return text_node; } -static void prv_setup_container_node_from_config( - GTextNodeContainer *container_node, const LayoutLayer *layout, - const LayoutNodeContainerConfig *config) { +static void prv_setup_container_node_from_config(GTextNodeContainer *container_node, + const LayoutLayer *layout, + const LayoutNodeContainerConfig *config) { const uint16_t num_nodes = config->num_nodes; for (int i = 0; i < num_nodes; i++) { GTextNode *node = layout_create_text_node_from_config(layout, config->nodes[i]); @@ -200,8 +202,8 @@ static GTextNode *prv_create_node_from_constructor_config( return node; } -static GTextNode *prv_create_timeline_icon_node_from_config( - const LayoutLayer *layout, const LayoutNodeExtentConfig *config) { +static GTextNode *prv_create_timeline_icon_node_from_config(const LayoutLayer *layout, + const LayoutNodeExtentConfig *config) { GTextNode *node = &timeline_layout_create_icon_node((const TimelineLayout *)layout)->node; prv_set_text_node_extent(node, config); return node; @@ -209,9 +211,9 @@ static GTextNode *prv_create_timeline_icon_node_from_config( static const char *prv_get_font_key_for_size(TextStyleFont style_font, LayoutContentSize content_size) { - return (content_size == LayoutContentSize_Auto) ? - system_theme_get_font_key(style_font) : - system_theme_get_font_key_for_size(ToPreferredContentSize(content_size), style_font); + return (content_size == LayoutContentSize_Auto) + ? system_theme_get_font_key(style_font) + : system_theme_get_font_key_for_size(ToPreferredContentSize(content_size), style_font); } GTextNodeVertical *layout_create_headings_paragraphs_node( @@ -225,14 +227,14 @@ GTextNodeVertical *layout_create_headings_paragraphs_node( } const LayoutNodeTextConfig s_heading_config = { - .extent.node.type = LayoutNodeType_Text, - .font_key = prv_get_font_key_for_size(config->heading_style_font, config->size), + .extent.node.type = LayoutNodeType_Text, + .font_key = prv_get_font_key_for_size(config->heading_style_font, config->size), }; const LayoutNodeTextConfig s_paragraph_config = { - .extent.node.type = LayoutNodeType_Text, - .font_key = prv_get_font_key_for_size(config->paragraph_style_font, config->size), - .line_spacing_delta = -2, - .extent.margin.h = 17, + .extent.node.type = LayoutNodeType_Text, + .font_key = prv_get_font_key_for_size(config->paragraph_style_font, config->size), + .line_spacing_delta = -2, + .extent.margin.h = 17, }; GTextNodeVertical *vertical_node = graphics_text_node_create_vertical(num_headings * 2); @@ -245,11 +247,9 @@ GTextNodeVertical *layout_create_headings_paragraphs_node( } GTextNodeText *heading_node = - (GTextNodeText *)layout_create_text_node_from_config( - layout, &s_heading_config.extent.node); - GTextNodeText *paragraph_node = - (GTextNodeText *)layout_create_text_node_from_config( - layout, &s_paragraph_config.extent.node); + (GTextNodeText *)layout_create_text_node_from_config(layout, &s_heading_config.extent.node); + GTextNodeText *paragraph_node = (GTextNodeText *)layout_create_text_node_from_config( + layout, &s_paragraph_config.extent.node); heading_node->text = (char *)heading; paragraph_node->text = (char *)paragraph; graphics_text_node_container_add_child(&vertical_node->container, &heading_node->node); @@ -278,63 +278,62 @@ typedef struct { int index; } MetricContext; -static GTextNode *prv_metric_constructor( - const LayoutLayer *layout, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_metric_constructor(const LayoutLayer *layout, + const LayoutNodeConstructorConfig *config) { MetricContext *context = config->context; const int icon_offset_x = PBL_IF_RECT_ELSE(-2, 0); const int icon_offset_y = PBL_IF_RECT_ELSE(4, 0); const int icon_margin_w = PBL_IF_RECT_ELSE(3, 0); const int icon_margin_h = PBL_IF_RECT_ELSE(0, -1); const LayoutNodeExtentConfig timeline_icon_config = { - .node.type = LayoutNodeType_TimelineIcon, - .offset.x = icon_offset_x, - .offset.y = icon_offset_y, - .margin.w = icon_margin_w, - .margin.h = icon_margin_h, + .node.type = LayoutNodeType_TimelineIcon, + .offset.x = icon_offset_x, + .offset.y = icon_offset_y, + .margin.w = icon_margin_w, + .margin.h = icon_margin_h, }; const LayoutNodeIconConfig icon_config = { - .extent.node.type = LayoutNodeType_Icon, - .res_info = context->icon_info, - .icon_layer = &context->icon_layer, - .align = PBL_IF_ROUND_ELSE(GAlignCenter, GAlignLeft), - .extent.offset.x = icon_offset_x, - .extent.offset.y = icon_offset_y, - .extent.margin.w = icon_margin_w, - .extent.margin.h = icon_margin_h, + .extent.node.type = LayoutNodeType_Icon, + .res_info = context->icon_info, + .icon_layer = &context->icon_layer, + .align = PBL_IF_ROUND_ELSE(GAlignCenter, GAlignLeft), + .extent.offset.x = icon_offset_x, + .extent.offset.y = icon_offset_y, + .extent.margin.w = icon_margin_w, + .extent.margin.h = icon_margin_h, }; const LayoutNodeTextBufferConfig name_config = { - .text.extent.node.type = LayoutNodeType_TextBuffer, - .str = context->name, - .text.font_key = FONT_KEY_GOTHIC_14, - .text.extent.margin.h = -1 // name margin height + .text.extent.node.type = LayoutNodeType_TextBuffer, + .str = context->name, + .text.font_key = FONT_KEY_GOTHIC_14, + .text.extent.margin.h = -1 // name margin height }; const LayoutNodeTextBufferConfig value_config = { - .text.extent.node.type = LayoutNodeType_TextBuffer, - .str = context->value, - .text.font_key = FONT_KEY_GOTHIC_18_BOLD, + .text.extent.node.type = LayoutNodeType_TextBuffer, + .str = context->value, + .text.font_key = FONT_KEY_GOTHIC_18_BOLD, }; - const LayoutNodeConfig * const icon_config_node = - (context->index == 0) ? &timeline_icon_config.node : - &icon_config.extent.node; - const LayoutNodeConfig * const vertical_config_nodes[] = { - PBL_IF_ROUND_ELSE(icon_config_node, NULL), - &name_config.text.extent.node, - &value_config.text.extent.node, + const LayoutNodeConfig *const icon_config_node = + (context->index == 0) ? &timeline_icon_config.node : &icon_config.extent.node; + const LayoutNodeConfig *const vertical_config_nodes[] = { + PBL_IF_ROUND_ELSE(icon_config_node, NULL), + &name_config.text.extent.node, + &value_config.text.extent.node, }; const LayoutNodeVerticalConfig vertical_config = { - .container.extent.node.type = LayoutNodeType_Vertical, - .container.num_nodes = ARRAY_LENGTH(vertical_config_nodes), - .container.nodes = (LayoutNodeConfig **)&vertical_config_nodes, + .container.extent.node.type = LayoutNodeType_Vertical, + .container.num_nodes = ARRAY_LENGTH(vertical_config_nodes), + .container.nodes = (LayoutNodeConfig **)&vertical_config_nodes, }; #if PBL_RECT - const LayoutNodeConfig * const horizontal_config_nodes[] = { - icon_config_node, - &vertical_config.container.extent.node, + const LayoutNodeConfig *const horizontal_config_nodes[] = { + icon_config_node, + &vertical_config.container.extent.node, }; const LayoutNodeHorizontalConfig horizontal_config = { - .container.extent.node.type = LayoutNodeType_Horizontal, - .container.num_nodes = ARRAY_LENGTH(horizontal_config_nodes), - .container.nodes = (LayoutNodeConfig **)&horizontal_config_nodes, + .container.extent.node.type = LayoutNodeType_Horizontal, + .container.num_nodes = ARRAY_LENGTH(horizontal_config_nodes), + .container.nodes = (LayoutNodeConfig **)&horizontal_config_nodes, }; #endif GTextNode *metric_node = (GTextNode *)layout_create_text_node_from_config( @@ -348,9 +347,9 @@ static GTextNode *prv_metric_constructor( const int metric_margin_h = PBL_IF_RECT_ELSE(metric_margin_h_rect, // special case for the first metric after a page break - (context->index == METRICS_PER_PAGE) ? metric_margin_top : - (context->index % METRICS_PER_PAGE) ? metric_margin_h_round_inner : - metric_margin_h_round_page); + (context->index == METRICS_PER_PAGE) ? metric_margin_top + : (context->index % METRICS_PER_PAGE) ? metric_margin_h_round_inner + : metric_margin_h_round_page); metric_node->offset.y += metric_margin_h; metric_node->margin.h += metric_margin_h; } @@ -398,7 +397,7 @@ GTextNodeVertical *layout_create_metrics_node(const LayoutLayer *layout_ref) { layout->metric_icon_layers = task_zalloc_check((num_metrics - 1) * sizeof(KinoLayer *)); } - const int num_nodes = PBL_IF_ROUND_ELSE(num_metrics + 1, // optional page break + const int num_nodes = PBL_IF_ROUND_ELSE(num_metrics + 1, // optional page break num_metrics); GTextNodeVertical *vertical_node = graphics_text_node_create_vertical(num_nodes); @@ -410,28 +409,26 @@ GTextNodeVertical *layout_create_metrics_node(const LayoutLayer *layout_ref) { } TimelineResourceInfo icon_info = { - .res_id = icons->values[i], - .app_id = &layout->info->app_id, + .res_id = icons->values[i], + .app_id = &layout->info->app_id, }; AppResourceInfo icon_res_info; timeline_resources_get_id(&icon_info, TimelineResourceSizeTiny, &icon_res_info); const LayoutNodeConstructorConfig metric_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_metric_constructor, - .context = &(MetricContext) { - .index = i, - .name = name, - .value = value, - .icon_info = &icon_res_info, - .icon_layer = i == 0 ? &layout->icon_layer : - layout->metric_icon_layers[i - 1], - }, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_metric_constructor, + .context = &(MetricContext){ + .index = i, + .name = name, + .value = value, + .icon_info = &icon_res_info, + .icon_layer = i == 0 ? &layout->icon_layer : layout->metric_icon_layers[i - 1], + }, }; - GTextNodeText *metric_node = - (GTextNodeText *)layout_create_text_node_from_config( - layout_ref, &metric_config.extent.node); + GTextNodeText *metric_node = (GTextNodeText *)layout_create_text_node_from_config( + layout_ref, &metric_config.extent.node); prv_add_metric(layout, vertical_node, i, &metric_node->node); } @@ -453,7 +450,7 @@ static GTextNode *prv_create_icon_node_from_config(const LayoutLayer *layout, return NULL; } - KinoLayer *icon_layer = kino_layer_create((GRect) { .size = kino_reel_get_size(icon_reel) }); + KinoLayer *icon_layer = kino_layer_create((GRect){.size = kino_reel_get_size(icon_reel)}); *config->icon_layer = icon_layer; kino_layer_set_alignment(icon_layer, config->align); kino_layer_set_reel(icon_layer, icon_reel, true /* take_ownership */); @@ -470,22 +467,26 @@ GTextNode *layout_create_text_node_from_config(const LayoutLayer *layout, } switch (config->type) { case LayoutNodeType_TextAttribute: - return &prv_create_text_attribute_node_from_config( - layout, (LayoutNodeTextAttributeConfig *)config)->node; + return &prv_create_text_attribute_node_from_config(layout, + (LayoutNodeTextAttributeConfig *)config) + ->node; case LayoutNodeType_TextBuffer: - return &prv_create_text_buffer_node_from_config( - layout, (LayoutNodeTextBufferConfig *)config)->node; + return &prv_create_text_buffer_node_from_config(layout, (LayoutNodeTextBufferConfig *)config) + ->node; case LayoutNodeType_TextDynamic: - return &prv_create_text_dynamic_node_from_config( - layout, (LayoutNodeTextDynamicConfig *)config)->text.node; + return &prv_create_text_dynamic_node_from_config(layout, + (LayoutNodeTextDynamicConfig *)config) + ->text.node; case LayoutNodeType_Text: return &prv_create_text_node_from_config(layout, (LayoutNodeTextConfig *)config)->node; case LayoutNodeType_Horizontal: - return &prv_create_horizontal_container_node_from_config( - layout, (LayoutNodeHorizontalConfig *)config)->container.node; + return &prv_create_horizontal_container_node_from_config(layout, + (LayoutNodeHorizontalConfig *)config) + ->container.node; case LayoutNodeType_Vertical: - return &prv_create_vertical_container_node_from_config( - layout, (LayoutNodeVerticalConfig *)config)->container.node; + return &prv_create_vertical_container_node_from_config(layout, + (LayoutNodeVerticalConfig *)config) + ->container.node; case LayoutNodeType_Constructor: return prv_create_node_from_constructor_config(layout, (LayoutNodeConstructorConfig *)config); case LayoutNodeType_Icon: @@ -497,8 +498,8 @@ GTextNode *layout_create_text_node_from_config(const LayoutLayer *layout, case LayoutNodeType_TimelineMetrics: return prv_create_metrics_node(layout, config); case LayoutNodeType_HeadingsParagraphs: - return prv_create_headings_paragraphs_node( - layout, (LayoutNodeHeadingsParagraphsConfig *)config); + return prv_create_headings_paragraphs_node(layout, + (LayoutNodeHeadingsParagraphsConfig *)config); } return NULL; } diff --git a/src/fw/services/timeline/metricgroup.c b/src/fw/services/timeline/metricgroup.c index f5b713f96d..af0f8ca496 100644 --- a/src/fw/services/timeline/metricgroup.c +++ b/src/fw/services/timeline/metricgroup.c @@ -10,12 +10,12 @@ MetricGroup *metric_group_create(int max_num_items, size_t max_item_string_size) { const size_t max_list_size = StringListSize(max_num_items, max_item_string_size); MetricGroup *metric = task_zalloc_check(sizeof(MetricGroup)); - *metric = (MetricGroup) { - .names = task_zalloc_check(max_list_size), - .values = task_zalloc_check(max_list_size), - .icons = task_zalloc_check(Uint32ListSize(max_num_items)), - .max_num_items = max_num_items, - .max_item_string_size = max_item_string_size, + *metric = (MetricGroup){ + .names = task_zalloc_check(max_list_size), + .values = task_zalloc_check(max_list_size), + .icons = task_zalloc_check(Uint32ListSize(max_num_items)), + .max_num_items = max_num_items, + .max_item_string_size = max_item_string_size, }; return metric; } @@ -35,8 +35,8 @@ bool metric_group_add_item(MetricGroup *metric_group, const char *name_i18n, con if (metric_group->num_items >= metric_group->max_num_items) { return false; } - const size_t max_list_size = StringListSize(metric_group->max_num_items, - metric_group->max_item_string_size); + const size_t max_list_size = + StringListSize(metric_group->max_num_items, metric_group->max_item_string_size); string_list_add_string(metric_group->names, max_list_size, i18n_get(name_i18n, i18n_owner), metric_group->max_item_string_size); string_list_add_string(metric_group->values, max_list_size, value, diff --git a/src/fw/services/timeline/notification_layout.c b/src/fw/services/timeline/notification_layout.c index eaf6c8826e..c2b54e12e2 100644 --- a/src/fw/services/timeline/notification_layout.c +++ b/src/fw/services/timeline/notification_layout.c @@ -55,75 +55,78 @@ static time_t prv_get_parent_timestamp(TimelineItem *reminder) { ////////////////////////////////////////// static const NotificationStyle s_notification_styles[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = { - .header_padding = 3, - .title_padding = 3, - .subtitle_upper_padding = PBL_IF_RECT_ELSE(1, 4), - .subtitle_lower_padding = PBL_IF_RECT_ELSE(2, 1), - .location_offset = PBL_IF_RECT_ELSE(3, 7), - .location_margin = PBL_IF_RECT_ELSE(5, 9), - .body_icon_offset = 3, - .body_icon_margin = -5, - .body_padding = PBL_IF_RECT_ELSE(1, 1), + [PreferredContentSizeSmall] = + { + .header_padding = 3, + .title_padding = 3, + .subtitle_upper_padding = PBL_IF_RECT_ELSE(1, 4), + .subtitle_lower_padding = PBL_IF_RECT_ELSE(2, 1), + .location_offset = PBL_IF_RECT_ELSE(3, 7), + .location_margin = PBL_IF_RECT_ELSE(5, 9), + .body_icon_offset = 3, + .body_icon_margin = -5, + .body_padding = PBL_IF_RECT_ELSE(1, 1), #if PBL_ROUND - .timestamp_upper_padding = 6, - .timestamp_lower_padding = -3, + .timestamp_upper_padding = 6, + .timestamp_lower_padding = -3, #else - .timestamp_upper_padding = 3, + .timestamp_upper_padding = 3, #endif - }, - [PreferredContentSizeMedium] = { + }, + [PreferredContentSizeMedium] = + { #if PBL_ROUND - .body_padding = 3, - .subtitle_upper_padding = 3, + .body_padding = 3, + .subtitle_upper_padding = 3, #endif - .header_padding = 3, - .title_padding = 3, - .title_line_delta = -1, - .subtitle_lower_padding = PBL_IF_RECT_ELSE(6, 2), - .subtitle_line_delta = -1, - .location_offset = PBL_IF_RECT_ELSE(-2, 6), - .location_margin = PBL_IF_RECT_ELSE(3, 10), - .body_icon_offset = 3, - .body_icon_margin = -5, - .body_line_delta = -1, + .header_padding = 3, + .title_padding = 3, + .title_line_delta = -1, + .subtitle_lower_padding = PBL_IF_RECT_ELSE(6, 2), + .subtitle_line_delta = -1, + .location_offset = PBL_IF_RECT_ELSE(-2, 6), + .location_margin = PBL_IF_RECT_ELSE(3, 10), + .body_icon_offset = 3, + .body_icon_margin = -5, + .body_line_delta = -1, #if PBL_ROUND - .timestamp_upper_padding = 6, - .timestamp_lower_padding = -3, + .timestamp_upper_padding = 6, + .timestamp_lower_padding = -3, #else - .timestamp_upper_padding = 3 + .timestamp_upper_padding = 3 #endif - }, - [PreferredContentSizeLarge] = { - .title_offset_if_body_icon = -2, - .subtitle_upper_padding = 2, - .subtitle_lower_padding = PBL_IF_RECT_ELSE(4, 2), - .subtitle_line_delta = -2, - .location_offset = 6, - .location_margin = 10, - .body_icon_margin = -10, - .body_padding = 2, - // Round: -3 makes the Gothic-24 body pitch 21px, fitting 10 lines per 224px page - // (9*21 + the 29px last-line reserve = 218 <= 224) instead of 9, shrinking the - // page-seam gap from more than a line pitch (26px) to a 14px modulo. - .body_line_delta = PBL_IF_RECT_ELSE(-2, -3), + }, + [PreferredContentSizeLarge] = + { + .title_offset_if_body_icon = -2, + .subtitle_upper_padding = 2, + .subtitle_lower_padding = PBL_IF_RECT_ELSE(4, 2), + .subtitle_line_delta = -2, + .location_offset = 6, + .location_margin = 10, + .body_icon_margin = -10, + .body_padding = 2, + // Round: -3 makes the Gothic-24 body pitch 21px, fitting 10 lines per 224px page + // (9*21 + the 29px last-line reserve = 218 <= 224) instead of 9, shrinking the + // page-seam gap from more than a line pitch (26px) to a 14px modulo. + .body_line_delta = PBL_IF_RECT_ELSE(-2, -3), #if PBL_ROUND - .timestamp_upper_padding = 6, + .timestamp_upper_padding = 6, #else - .timestamp_upper_padding = 3, + .timestamp_upper_padding = 3, #endif - }, - [PreferredContentSizeExtraLarge] = { - .subtitle_upper_padding = 2, - .subtitle_lower_padding = 4, - .subtitle_line_delta = -2, - .location_offset = 6, - .location_margin = 10, - .body_icon_offset = 6, - .body_icon_margin = -10, - .body_line_delta = -2, - .timestamp_upper_padding = 6, - }, + }, + [PreferredContentSizeExtraLarge] = { + .subtitle_upper_padding = 2, + .subtitle_lower_padding = 4, + .subtitle_line_delta = -2, + .location_offset = 6, + .location_margin = 10, + .body_icon_offset = 6, + .body_icon_margin = -10, + .body_line_delta = -2, + .timestamp_upper_padding = 6, + }, }; static bool prv_is_reminder(const NotificationLayout *layout) { @@ -143,8 +146,7 @@ static void prv_reminder_timestamp_update(const LayoutLayer *layout_ref, static void prv_notification_timestamp_update(const LayoutLayer *layout_ref, const LayoutNodeTextDynamicConfig *config, - char *buffer, - bool render) { + char *buffer, bool render) { const NotificationLayout *layout = (NotificationLayout *)layout_ref; clock_get_since_time(buffer, config->buffer_size, layout->info.item->header.timestamp); } @@ -153,12 +155,9 @@ static const EmojiEntry s_emoji_table[] = JUMBOJI_TABLE(EMOJI_ENTRY); static bool prv_each_emoji_codepoint(int index, Codepoint codepoint, void *context) { Codepoint *emoji_codepoint = context; - if (codepoint_is_end_of_word(codepoint) || - codepoint_is_formatting_indicator(codepoint) || - codepoint_is_skin_tone_modifier(codepoint) || - codepoint_is_special(codepoint) || - codepoint_is_zero_width(codepoint) || - codepoint_should_skip(codepoint)) { + if (codepoint_is_end_of_word(codepoint) || codepoint_is_formatting_indicator(codepoint) || + codepoint_is_skin_tone_modifier(codepoint) || codepoint_is_special(codepoint) || + codepoint_is_zero_width(codepoint) || codepoint_should_skip(codepoint)) { // Skip this codepoint return true; } else if (codepoint_is_emoji(codepoint)) { @@ -243,7 +242,7 @@ static uint8_t prv_image_aspect(const NotificationLayout *layout) { //! do — and so the requester and the renderer ask for the same thing. static GSize prv_image_size(const NotificationLayout *layout, int16_t width) { const uint8_t aspect = prv_image_aspect(layout); - GSize size = { width, (width * aspect) / 16 }; + GSize size = {width, (width * aspect) / 16}; #if PBL_ROUND // Shrink to the widest that still clears the bezel. Bounded by the content width, so this is a // few dozen integer comparisons at most, and the result is cached with the node's size. @@ -256,11 +255,11 @@ static GSize prv_image_size(const NotificationLayout *layout, int16_t width) { } static void prv_image_node_callback(GContext *ctx, const GRect *box, - const GTextNodeDrawConfig *config, bool render, - GSize *size_out, void *user_data) { + const GTextNodeDrawConfig *config, bool render, GSize *size_out, + void *user_data) { NotificationLayout *layout = user_data; const GSize image = prv_image_size(layout, box->size.w); - GSize band = { box->size.w, image.h }; + GSize band = {box->size.w, image.h}; GPoint origin = box->origin; #if PBL_ROUND @@ -268,8 +267,8 @@ static void prv_image_node_callback(GContext *ctx, const GRect *box, // sliced in half, since paging only knows how to break text. if (config && config->paging && config->page_frame->size.h > 0) { const int16_t page_h = config->page_frame->size.h; - const int16_t page_y = config->origin_on_screen->y + box->origin.y - - config->page_frame->origin.y; + const int16_t page_y = + config->origin_on_screen->y + box->origin.y - config->page_frame->origin.y; const int16_t into_page = (page_y > 0) ? (page_y % page_h) : 0; const int16_t skip = into_page ? (page_h - into_page) : 0; band.h = skip + page_h; @@ -284,16 +283,15 @@ static void prv_image_node_callback(GContext *ctx, const GRect *box, if (bitmap) { const GSize bitmap_size = bitmap->bounds.size; const GRect dest = { - { origin.x + (image.w - bitmap_size.w) / 2, - origin.y + (image.h - bitmap_size.h) / 2 }, - bitmap_size, + {origin.x + (image.w - bitmap_size.w) / 2, origin.y + (image.h - bitmap_size.h) / 2}, + bitmap_size, }; graphics_context_set_compositing_mode(ctx, GCompOpAssign); graphics_draw_bitmap_in_rect(ctx, bitmap, &dest); } else if (notification_image_is_pending(item_id)) { // Still transferring: fill the reserved area so the card doesn't look broken. Once the phone // answers NoImage this stops and the space is simply blank. - const GRect placeholder = { origin, image }; + const GRect placeholder = {origin, image}; graphics_context_set_fill_color(ctx, GColorLightGray); graphics_fill_round_rect(ctx, &placeholder, NOTIFICATION_IMAGE_CORNER_RADIUS, GCornersAll); } @@ -332,83 +330,83 @@ static NOINLINE GTextNode *prv_create_view(NotificationLayout *layout, bool use_ const bool is_reminder = prv_is_reminder(layout); const LayoutNodeTextAttributeConfig header_config = { - .attr_id = AttributeIdAppName, - .text.style_font = TextStyleFont_Header, - .text.extent.offset.y = style->header_padding, - .text.extent.margin.h = style->header_padding, + .attr_id = AttributeIdAppName, + .text.style_font = TextStyleFont_Header, + .text.extent.offset.y = style->header_padding, + .text.extent.margin.h = style->header_padding, }; const LayoutNodeTextDynamicConfig notification_timestamp_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_notification_timestamp_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.style_font = PBL_IF_RECT_ELSE(TextStyleFont_Footer, TextStyleFont_Caption), - .text.extent.offset.y = style->timestamp_upper_padding, - .text.extent.margin.h = style->timestamp_upper_padding + style->timestamp_lower_padding, + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_notification_timestamp_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.style_font = PBL_IF_RECT_ELSE(TextStyleFont_Footer, TextStyleFont_Caption), + .text.extent.offset.y = style->timestamp_upper_padding, + .text.extent.margin.h = style->timestamp_upper_padding + style->timestamp_lower_padding, }; const LayoutNodeTextDynamicConfig reminder_timestamp_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_reminder_timestamp_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.style_font = TextStyleFont_Header, - .text.extent.offset.y = style->header_padding, - .text.extent.margin.h = style->header_padding, + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_reminder_timestamp_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.style_font = TextStyleFont_Header, + .text.extent.offset.y = style->header_padding, + .text.extent.margin.h = style->header_padding, }; const LayoutNodeTextAttributeConfig title_config = { - .attr_id = is_reminder ? AttributeIdUnused : AttributeIdTitle, - .text.style_font = TextStyleFont_Header, - .text.line_spacing_delta = style->title_line_delta, - .text.alignment = use_body_icon ? LayoutTextAlignment_Center : LayoutTextAlignment_Auto, - .text.extent.offset.y = - style->title_padding + (use_body_icon ? style->title_offset_if_body_icon : 0), - .text.extent.margin.h = style->title_padding, + .attr_id = is_reminder ? AttributeIdUnused : AttributeIdTitle, + .text.style_font = TextStyleFont_Header, + .text.line_spacing_delta = style->title_line_delta, + .text.alignment = use_body_icon ? LayoutTextAlignment_Center : LayoutTextAlignment_Auto, + .text.extent.offset.y = + style->title_padding + (use_body_icon ? style->title_offset_if_body_icon : 0), + .text.extent.margin.h = style->title_padding, }; const LayoutNodeTextAttributeConfig subtitle_config = { - .attr_id = is_reminder ? AttributeIdTitle : AttributeIdSubtitle, - .text.style_font = TextStyleFont_Title, - .text.line_spacing_delta = style->subtitle_line_delta, - .text.alignment = use_body_icon ? LayoutTextAlignment_Center : LayoutTextAlignment_Auto, - .text.extent.offset.y = style->subtitle_upper_padding, - .text.extent.margin.h = style->subtitle_upper_padding + style->subtitle_lower_padding, + .attr_id = is_reminder ? AttributeIdTitle : AttributeIdSubtitle, + .text.style_font = TextStyleFont_Title, + .text.line_spacing_delta = style->subtitle_line_delta, + .text.alignment = use_body_icon ? LayoutTextAlignment_Center : LayoutTextAlignment_Auto, + .text.extent.offset.y = style->subtitle_upper_padding, + .text.extent.margin.h = style->subtitle_upper_padding + style->subtitle_lower_padding, }; const LayoutNodeIconConfig body_icon_config = { - .extent.node.type = LayoutNodeType_Icon, - .res_info = &(AppResourceInfo) { - .res_app_num = SYSTEM_APP, - .res_id = prv_get_emoji_icon(layout), - }, - .align = GAlignCenter, - .icon_layer = &layout->detail_icon_layer, - .extent.offset.y = style->body_icon_offset, - .extent.margin.h = style->body_icon_margin, + .extent.node.type = LayoutNodeType_Icon, + .res_info = + &(AppResourceInfo){ + .res_app_num = SYSTEM_APP, + .res_id = prv_get_emoji_icon(layout), + }, + .align = GAlignCenter, + .icon_layer = &layout->detail_icon_layer, + .extent.offset.y = style->body_icon_offset, + .extent.margin.h = style->body_icon_margin, }; const LayoutNodeTextAttributeConfig location_config = { - .attr_id = AttributeIdLocationName, - .text.style_font = TextStyleFont_Footer, - .text.extent.offset.y = style->location_offset, - .text.extent.margin.h = style->location_margin, + .attr_id = AttributeIdLocationName, + .text.style_font = TextStyleFont_Footer, + .text.extent.offset.y = style->location_offset, + .text.extent.margin.h = style->location_margin, }; const int reminder_body_line_delta = 0; const LayoutNodeTextAttributeConfig body_config = { - .attr_id = AttributeIdBody, - .text.style_font = is_reminder ? TextStyleFont_Caption : TextStyleFont_Body, - .text.line_spacing_delta = is_reminder ? reminder_body_line_delta : - style->body_line_delta, - .text.extent.offset.y = style->body_padding, - .text.extent.margin.h = style->body_padding, + .attr_id = AttributeIdBody, + .text.style_font = is_reminder ? TextStyleFont_Caption : TextStyleFont_Body, + .text.line_spacing_delta = is_reminder ? reminder_body_line_delta : style->body_line_delta, + .text.extent.offset.y = style->body_padding, + .text.extent.margin.h = style->body_padding, }; const LayoutNodeHeadingsParagraphsConfig headings_paragraphs_node = { - .extent.node.type = LayoutNodeType_HeadingsParagraphs, - .extent.offset.y = 12, - .extent.margin.h = 5, - .heading_style_font = TextStyleFont_Header, - .paragraph_style_font = TextStyleFont_Body, + .extent.node.type = LayoutNodeType_HeadingsParagraphs, + .extent.offset.y = 12, + .extent.margin.h = 5, + .heading_style_font = TextStyleFont_Header, + .paragraph_style_font = TextStyleFont_Body, }; #if NOTIFICATION_IMAGE_SUPPORTED const LayoutNodeConstructorConfig image_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_create_image_node, - .extent.offset.y = NOTIFICATION_IMAGE_PADDING, - .extent.margin.h = 2 * NOTIFICATION_IMAGE_PADDING, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_create_image_node, + .extent.offset.y = NOTIFICATION_IMAGE_PADDING, + .extent.margin.h = 2 * NOTIFICATION_IMAGE_PADDING, }; #endif const LayoutNodeConfig *reminder_timestamp_node_config = NULL; @@ -426,24 +424,23 @@ static NOINLINE GTextNode *prv_create_view(NotificationLayout *layout, bool use_ if (!layout->info.show_notification_timestamp && use_body_icon) { notification_timestamp_node_config = NULL; } - const LayoutNodeConfig * const vertical_config_nodes[] = { - reminder_timestamp_node_config, - header_node_config, - &title_config.text.extent.node, - &subtitle_config.text.extent.node, - &location_config.text.extent.node, - use_body_icon ? &body_icon_config.extent.node : - &body_config.text.extent.node, - &headings_paragraphs_node.extent.node, + const LayoutNodeConfig *const vertical_config_nodes[] = { + reminder_timestamp_node_config, + header_node_config, + &title_config.text.extent.node, + &subtitle_config.text.extent.node, + &location_config.text.extent.node, + use_body_icon ? &body_icon_config.extent.node : &body_config.text.extent.node, + &headings_paragraphs_node.extent.node, #if NOTIFICATION_IMAGE_SUPPORTED - &image_config.extent.node, + &image_config.extent.node, #endif - notification_timestamp_node_config, + notification_timestamp_node_config, }; const LayoutNodeVerticalConfig vertical_config = { - .container.extent.node.type = LayoutNodeType_Vertical, - .container.num_nodes = ARRAY_LENGTH(vertical_config_nodes), - .container.nodes = (LayoutNodeConfig **)&vertical_config_nodes, + .container.extent.node.type = LayoutNodeType_Vertical, + .container.num_nodes = ARRAY_LENGTH(vertical_config_nodes), + .container.nodes = (LayoutNodeConfig **)&vertical_config_nodes, }; return layout_create_text_node_from_config(&layout->layout, &vertical_config.container.extent.node); @@ -462,12 +459,12 @@ static void prv_card_init(NotificationLayout *layout, AttributeList *attributes, // init the icon const TimelineResourceId fallback_icon_id = notification_layout_get_fallback_icon_id(layout->info.item->header.type); - const uint32_t timeline_res_id = attribute_get_uint32(attributes, AttributeIdIconTiny, - fallback_icon_id); + const uint32_t timeline_res_id = + attribute_get_uint32(attributes, AttributeIdIconTiny, fallback_icon_id); const TimelineResourceInfo timeline_res = { - .res_id = timeline_res_id, - .app_id = app_id, - .fallback_id = fallback_icon_id + .res_id = timeline_res_id, + .app_id = app_id, + .fallback_id = fallback_icon_id }; timeline_resources_get_id(&timeline_res, TimelineResourceSizeTiny, &layout->icon_res_info); @@ -544,25 +541,21 @@ static void prv_draw_banner_round(NotificationLayout *notification_layout, GCont graphics_context_set_fill_color(ctx, colors.bg_color); const int32_t saved_clip_box_size_h = ctx->draw_state.clip_box.size.h; const int32_t saved_clip_box_origin_y = ctx->draw_state.clip_box.origin.y; - ctx->draw_state.clip_box.origin.y = - MAX(ctx->draw_state.clip_box.origin.y - status_bar_height, 0); + ctx->draw_state.clip_box.origin.y = MAX(ctx->draw_state.clip_box.origin.y - status_bar_height, 0); ctx->draw_state.clip_box.size.h = DISP_ROWS; grect_clip(&ctx->draw_state.clip_box, &DISP_FRAME); const int32_t banner_movement_raw_offset = - CLIP(banner_peek_static_y - notification_layout_frame->origin.y, - 0, banner_peek_static_y); - const int32_t banner_radius = prv_interpolate_linear(BOTTOM_BANNER_CIRCLE_RADIUS, - BANNER_CIRCLE_RADIUS, - 0, banner_peek_static_y, - banner_movement_raw_offset); + CLIP(banner_peek_static_y - notification_layout_frame->origin.y, 0, banner_peek_static_y); + const int32_t banner_radius = + prv_interpolate_linear(BOTTOM_BANNER_CIRCLE_RADIUS, BANNER_CIRCLE_RADIUS, 0, + banner_peek_static_y, banner_movement_raw_offset); const int32_t banner_diameter = banner_radius * 2; - const int32_t banner_center_y = prv_interpolate_linear(0, LAYOUT_TOP_BANNER_ORIGIN_Y, - 0, banner_peek_static_y, - banner_movement_raw_offset); - const GRect banner_frame = GRect(half_screen_width - banner_radius, - banner_center_y - banner_radius, - banner_diameter, banner_diameter); + const int32_t banner_center_y = prv_interpolate_linear( + 0, LAYOUT_TOP_BANNER_ORIGIN_Y, 0, banner_peek_static_y, banner_movement_raw_offset); + const GRect banner_frame = + GRect(half_screen_width - banner_radius, banner_center_y - banner_radius, banner_diameter, + banner_diameter); graphics_fill_oval(ctx, banner_frame, GOvalScaleModeFitCircle); ctx->draw_state.clip_box.origin.y = saved_clip_box_origin_y; ctx->draw_state.clip_box.size.h = saved_clip_box_size_h; @@ -587,7 +580,7 @@ static NOINLINE void prv_card_render_internal(NotificationLayout *layout, GConte // work around the clip box and smaller layout_height for circular text paging ctx->draw_state.clip_box.size.h = MIN(ctx->draw_state.clip_box.size.h, LAYOUT_HEIGHT); #else - static const GRect banner_box = { .size = { DISP_COLS, LAYOUT_BANNER_HEIGHT_RECT } }; + static const GRect banner_box = {.size = {DISP_COLS, LAYOUT_BANNER_HEIGHT_RECT}}; graphics_fill_rect(ctx, &banner_box); #endif } @@ -601,24 +594,23 @@ static NOINLINE void prv_card_render_internal(NotificationLayout *layout, GConte const bool text_visible = render; #endif static const GRect box = { - .origin = { CARD_MARGIN, LAYOUT_TOP_BANNER_HEIGHT }, - .size = { DISP_COLS - 2 * CARD_MARGIN, LAYOUT_MAX_HEIGHT }, + .origin = {CARD_MARGIN, LAYOUT_TOP_BANNER_HEIGHT}, + .size = {DISP_COLS - 2 * CARD_MARGIN, LAYOUT_MAX_HEIGHT}, }; static const GRect page_frame_on_screen = { - .origin = { 0, STATUS_BAR_LAYER_HEIGHT }, - .size = { DISP_COLS, DISP_ROWS - STATUS_BAR_LAYER_HEIGHT - LAYOUT_ARROW_HEIGHT } + .origin = {0, STATUS_BAR_LAYER_HEIGHT}, + .size = {DISP_COLS, DISP_ROWS - STATUS_BAR_LAYER_HEIGHT - LAYOUT_ARROW_HEIGHT} }; static const GTextNodeDrawConfig config = { - .page_frame = &page_frame_on_screen, - .origin_on_screen = &page_frame_on_screen.origin, - .content_inset = 8, // text flow inset - .text_flow = PBL_IF_ROUND_ELSE(true, false), - .paging = PBL_IF_ROUND_ELSE(true, false), + .page_frame = &page_frame_on_screen, + .origin_on_screen = &page_frame_on_screen.origin, + .content_inset = 8, // text flow inset + .text_flow = PBL_IF_ROUND_ELSE(true, false), + .paging = PBL_IF_ROUND_ELSE(true, false), }; graphics_context_set_text_color(ctx, GColorBlack); - (text_visible ? graphics_text_node_draw : - graphics_text_node_get_size)(layout->view_node, ctx, &box, &config, - &layout->view_size); + (text_visible ? graphics_text_node_draw : graphics_text_node_get_size)( + layout->view_node, ctx, &box, &config, &layout->view_size); #if PBL_ROUND if (render) { @@ -678,7 +670,7 @@ bool notification_layout_verify(bool existing_attributes[]) { static void prv_layout_init_colors(NotificationLayout *notification_layout) { LayoutColors *colors = ¬ification_layout->colors; - + #if PBL_BW const bool use_alternative_design = alerts_preferences_get_notification_alternative_design(); if (use_alternative_design) { @@ -705,14 +697,14 @@ static void prv_layout_init_colors(NotificationLayout *notification_layout) { #if PBL_COLOR const bool is_notification = (notification_layout->info.item->header.type == TimelineItemTypeNotification); - const GColor default_bg_color = is_notification ? DEFAULT_NOTIFICATION_COLOR : - DEFAULT_REMINDER_COLOR; + const GColor default_bg_color = + is_notification ? DEFAULT_NOTIFICATION_COLOR : DEFAULT_REMINDER_COLOR; LayoutLayer *layout = ¬ification_layout->layout; - colors->bg_color = (GColor) attribute_get_uint8(layout->attributes, AttributeIdBgColor, - default_bg_color.argb); - colors->primary_color = (GColor) attribute_get_uint8(layout->attributes, AttributeIdPrimaryColor, - GColorBlack.argb); + colors->bg_color = + (GColor)attribute_get_uint8(layout->attributes, AttributeIdBgColor, default_bg_color.argb); + colors->primary_color = + (GColor)attribute_get_uint8(layout->attributes, AttributeIdPrimaryColor, GColorBlack.argb); #endif } @@ -747,18 +739,18 @@ static void prv_layout_destroy(LayoutLayer *layout) { static void prv_layout_init(NotificationLayout *layout, const LayoutLayerConfig *config) { NotificationLayoutInfo *layout_info = config->context; static const LayoutLayerImpl s_layout_layer_impl = { - .size_getter = prv_layout_get_content_size, - .destructor = prv_layout_destroy, + .size_getter = prv_layout_get_content_size, + .destructor = prv_layout_destroy, #if PBL_COLOR - .color_getter = prv_layout_get_colors, + .color_getter = prv_layout_get_colors, #endif - .context_getter = prv_layout_get_context, + .context_getter = prv_layout_get_context, }; // init the layout struct - layout->layout = (LayoutLayer) { - .mode = config->mode, - .attributes = config->attributes, - .impl = &s_layout_layer_impl, + layout->layout = (LayoutLayer){ + .mode = config->mode, + .attributes = config->attributes, + .impl = &s_layout_layer_impl, }; layout->info = *layout_info; @@ -783,6 +775,5 @@ static void prv_layout_init(NotificationLayout *layout, const LayoutLayerConfig } TimelineResourceId notification_layout_get_fallback_icon_id(TimelineItemType item_type) { - return (item_type == TimelineItemTypeNotification) ? NOTIF_FALLBACK_ICON : - REMINDER_FALLBACK_ICON; + return (item_type == TimelineItemTypeNotification) ? NOTIF_FALLBACK_ICON : REMINDER_FALLBACK_ICON; } diff --git a/src/fw/services/timeline/peek.c b/src/fw/services/timeline/peek.c index 59297636c4..be00e8e9f7 100644 --- a/src/fw/services/timeline/peek.c +++ b/src/fw/services/timeline/peek.c @@ -17,7 +17,7 @@ typedef struct TimelinePeekEventData { } TimelinePeekEventData; static TimelinePeekEventData s_peek_event_data = { - .show_before_time_s = TIMELINE_PEEK_DEFAULT_SHOW_BEFORE_TIME_S, + .show_before_time_s = TIMELINE_PEEK_DEFAULT_SHOW_BEFORE_TIME_S, }; typedef struct PeekUpdateContext { @@ -41,14 +41,14 @@ static void prv_put_peek_event(PeekUpdateContext *update, TimelineItemId *item_i const bool is_first_event = (item_id && uuid_equal(item_id, &update->first_header.common.id)); PebbleEvent event = { - .type = PEBBLE_TIMELINE_PEEK_EVENT, - .timeline_peek = { - .time_type = time_type, - .item_id = item_id_copy, - .num_concurrent = MAX((int)update->num_peeking - 1, 0), - .is_first_event = (!is_all_day_event_visible && is_first_event), - .is_future_empty = (!is_all_day_event_visible && !update->future_has_event), - }, + .type = PEBBLE_TIMELINE_PEEK_EVENT, + .timeline_peek = { + .time_type = time_type, + .item_id = item_id_copy, + .num_concurrent = MAX((int)update->num_peeking - 1, 0), + .is_first_event = (!is_all_day_event_visible && is_first_event), + .is_future_empty = (!is_all_day_event_visible && !update->future_has_event), + }, }; event_put(&event); } @@ -67,20 +67,18 @@ static void prv_peek_did_update(void **context) { static bool prv_is_in_peeking_time_window(SerializedTimelineItemHeader *header, time_t now) { const unsigned int duration_s = header->common.duration * SECONDS_PER_MINUTE; const unsigned int show_duration_after_start_s = - header->common.persistent ? duration_s : - MIN(TIMELINE_PEEK_HIDE_AFTER_TIME_S, duration_s); + header->common.persistent ? duration_s : MIN(TIMELINE_PEEK_HIDE_AFTER_TIME_S, duration_s); // As soon as an event begins, it should peek, hence the show-before time being inclusive - return timeline_event_starts_within( - &header->common, now, -show_duration_after_start_s, - s_peek_event_data.show_before_time_s + 1 /* inclusive */); + return timeline_event_starts_within(&header->common, now, -show_duration_after_start_s, + s_peek_event_data.show_before_time_s + 1 /* inclusive */); } static bool prv_should_set_first_event(PeekUpdateContext *update, SerializedTimelineItemHeader *header) { // Use the new item if there is no item or it is an earlier item in the future direction return ((uuid_is_invalid(&update->first_header.common.id)) || - (timeline_item_time_comparator(&header->common, &update->first_header.common, - TimelineIterDirectionFuture) < 0)); + (timeline_item_time_comparator(&header->common, &update->first_header.common, + TimelineIterDirectionFuture) < 0)); } static bool prv_peek_filter(SerializedTimelineItemHeader *header, void **context) { @@ -134,8 +132,8 @@ static int prv_peek_comparator(SerializedTimelineItemHeader *new_header, } else { // When both items are peeking, newer items take priority (larger timestamp first) // Otherwise, older items take priority (smaller timestamp first) - return (old_is_peeking ? 1 : -1) * (old_header->common.timestamp - - new_header->common.timestamp); + return (old_is_peeking ? 1 : -1) * + (old_header->common.timestamp - new_header->common.timestamp); } } @@ -161,14 +159,14 @@ static uint32_t prv_calc_timeout(CommonTimelineItemHeader *item, const bool started_moments_ago = (now < into); timeout_s = ((started_moments_ago && !short_event) ? into : end) - now; // If it's persistent, it should be shown for the entire duration - time_type = (started_moments_ago || item->persistent) ? - TimelinePeekTimeType_ShowStarted : TimelinePeekTimeType_WillEnd; + time_type = (started_moments_ago || item->persistent) ? TimelinePeekTimeType_ShowStarted + : TimelinePeekTimeType_WillEnd; } else { const time_t before = start - s_peek_event_data.show_before_time_s; const bool some_time_next = (now < before); timeout_s = (some_time_next ? before : start) - now; - time_type = some_time_next ? TimelinePeekTimeType_SomeTimeNext : - TimelinePeekTimeType_ShowWillStart; + time_type = + some_time_next ? TimelinePeekTimeType_SomeTimeNext : TimelinePeekTimeType_ShowWillStart; } if (time_type_out) { *time_type_out = time_type; @@ -182,9 +180,9 @@ static uint32_t prv_calc_timeout(CommonTimelineItemHeader *item, return 0; } -static int prv_peek_compare_and_save_next_timeout( - SerializedTimelineItemHeader *new_header, SerializedTimelineItemHeader *old_header, - void **context) { +static int prv_peek_compare_and_save_next_timeout(SerializedTimelineItemHeader *new_header, + SerializedTimelineItemHeader *old_header, + void **context) { const int rv = prv_peek_comparator(new_header, old_header, context); CommonTimelineItemHeader *next_header = &((rv > 0) ? new_header : old_header)->common; PeekUpdateContext **update = (PeekUpdateContext **)context; @@ -207,11 +205,11 @@ static uint32_t prv_peek_update(TimelineItem *item, void **context) { const TimelineEventImpl *timeline_peek_get_event_service(void) { static const TimelineEventImpl s_event_impl = { - .will_update = prv_peek_will_update, - .filter = prv_peek_filter, - .comparator = prv_peek_compare_and_save_next_timeout, - .update = prv_peek_update, - .did_update = prv_peek_did_update, + .will_update = prv_peek_will_update, + .filter = prv_peek_filter, + .comparator = prv_peek_compare_and_save_next_timeout, + .update = prv_peek_update, + .did_update = prv_peek_did_update, }; if (!s_peek_event_data.initialized) { s_peek_event_data.initialized = true; diff --git a/src/fw/services/timeline/reminders.c b/src/fw/services/timeline/reminders.c index 65ad645167..3f6701a649 100644 --- a/src/fw/services/timeline/reminders.c +++ b/src/fw/services/timeline/reminders.c @@ -16,9 +16,9 @@ PBL_LOG_MODULE_DECLARE(service_timeline, CONFIG_SERVICE_TIMELINE_LOG_LEVEL); #define INVALID_SNOOZE_DELAY 0 -#define HALF_SNOOZE_END_MARK 30 // Seconds -#define CONSTANT_SNOOZE_DELAY (10 * SECONDS_PER_MINUTE) // Seconds -#define CONSTANT_SNOOZE_END_MARK (48 * MINUTES_PER_HOUR * SECONDS_PER_MINUTE) // Seconds +#define HALF_SNOOZE_END_MARK 30 // Seconds +#define CONSTANT_SNOOZE_DELAY (10 * SECONDS_PER_MINUTE) // Seconds +#define CONSTANT_SNOOZE_END_MARK (48 * MINUTES_PER_HOUR * SECONDS_PER_MINUTE) // Seconds static RegularTimerInfo s_reminder_timer; static bool s_reminder_armed; @@ -35,11 +35,11 @@ static void prv_put_reminder_event(ReminderId *reminder_id, ReminderEventType ty *removed_id = *reminder_id; PebbleEvent event = { - .type = PEBBLE_REMINDER_EVENT, - .reminder = { - .type = type, - .reminder_id = removed_id, - } + .type = PEBBLE_REMINDER_EVENT, + .reminder = { + .type = type, + .reminder_id = removed_id, + } }; event_put(&event); } @@ -73,8 +73,7 @@ static void prv_timer_callback(void *data) { if (s_next_reminder_timestamp > rtc_get_time()) { return; } - if (system_task_add_callback(prv_trigger_reminder_system_task_callback, - &s_next_reminder_id)) { + if (system_task_add_callback(prv_trigger_reminder_system_task_callback, &s_next_reminder_id)) { s_reminder_armed = false; } } @@ -172,8 +171,8 @@ status_t reminders_snooze(Reminder *reminder) { } // Modify reminder timestamp - TimelineItem *item = (TimelineItem*) reminder; - item->header.timestamp = rtc_get_time() + (time_t) snooze_delay; + TimelineItem *item = (TimelineItem *)reminder; + item->header.timestamp = rtc_get_time() + (time_t)snooze_delay; // Unset the reminded status item->header.reminded = false; diff --git a/src/fw/services/timeline/sports_layout.c b/src/fw/services/timeline/sports_layout.c index ed71e44622..7794a20f60 100644 --- a/src/fw/services/timeline/sports_layout.c +++ b/src/fw/services/timeline/sports_layout.c @@ -43,7 +43,7 @@ static void prv_get_until_time(const LayoutLayer *layout, char *buffer, int buff size_t starts_len = 0; if (difference <= SECONDS_PER_HOUR * max_relative_hrs && time_util_get_midnight_of(now) == time_util_get_midnight_of(timestamp)) { - const char *starts = i18n_get("STARTS ", layout); // Freed by `timeline_layout_deinit` + const char *starts = i18n_get("STARTS ", layout); // Freed by `timeline_layout_deinit` starts_len = strlen(starts); strncpy(buffer, starts, buffer_size); } @@ -58,28 +58,28 @@ static void prv_time_until_update(const LayoutLayer *layout_ref, prv_get_until_time(layout_ref, buffer, config->buffer_size, layout->info->timestamp); } -static GTextNode *prv_subtitle_constructor( - const LayoutLayer *layout_ref, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_subtitle_constructor(const LayoutLayer *layout_ref, + const LayoutNodeConstructorConfig *config) { const SportsLayout *layout = (const SportsLayout *)layout_ref; static const LayoutNodeTextDynamicConfig s_time_until_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_time_until_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.font_key = FONT_KEY_GOTHIC_18_BOLD, - .text.fixed_lines = 1, - .text.alignment = LayoutTextAlignment_Center, - .text.extent.margin.h = -1, + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_time_until_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.font_key = FONT_KEY_GOTHIC_18_BOLD, + .text.fixed_lines = 1, + .text.alignment = LayoutTextAlignment_Center, + .text.extent.margin.h = -1, }; static const LayoutNodeTextAttributeConfig s_term_config = { - .attr_id = AttributeIdSubtitle, - .text.font_key = FONT_KEY_GOTHIC_18_BOLD, - .text.fixed_lines = 1, - .text.alignment = LayoutTextAlignment_Center, - .text.extent.margin.h = 1, + .attr_id = AttributeIdSubtitle, + .text.font_key = FONT_KEY_GOTHIC_18_BOLD, + .text.fixed_lines = 1, + .text.alignment = LayoutTextAlignment_Center, + .text.extent.margin.h = 1, }; return layout_create_text_node_from_config( - layout_ref, (layout->state == GameStatePreGame ? &s_time_until_config.text.extent.node : - &s_term_config.text.extent.node)); + layout_ref, (layout->state == GameStatePreGame ? &s_time_until_config.text.extent.node + : &s_term_config.text.extent.node)); } static void prv_game_line_node_callback(GContext *ctx, const GRect *box, @@ -96,11 +96,11 @@ static void prv_game_line_node_callback(GContext *ctx, const GRect *box, *size_out = GSizeZero; } -static GTextNode *prv_game_constructor( - const LayoutLayer *layout_ref, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_game_constructor(const LayoutLayer *layout_ref, + const LayoutNodeConstructorConfig *config) { const SportsLayout *layout = (SportsLayout *)layout_ref; const int num_teams = 2; - const int num_nodes = num_teams + 1; // two team nodes and one line node + const int num_nodes = num_teams + 1; // two team nodes and one line node GTextNodeHorizontal *game_node = graphics_text_node_create_horizontal(num_nodes); graphics_text_node_container_add_child( &game_node->container, @@ -112,22 +112,22 @@ static GTextNode *prv_game_constructor( return &game_node->container.node; } -static GTextNode *prv_broadcaster_header_constructor( - const LayoutLayer *layout_ref, const LayoutNodeConstructorConfig *config) { +static GTextNode *prv_broadcaster_header_constructor(const LayoutLayer *layout_ref, + const LayoutNodeConstructorConfig *config) { const char *broadcaster = attribute_get_string(layout_ref->attributes, AttributeIdBroadcaster, ""); if (IS_EMPTY_STRING(broadcaster)) { return NULL; } static const LayoutNodeTextBufferConfig s_broadcaster_header_config = { - .text.extent.node.type = LayoutNodeType_TextBuffer, - .str = i18n_noop("Broadcaster"), - .use_i18n = true, - .text.font_key = FONT_KEY_GOTHIC_14, - .text.line_spacing_delta = CARD_LINE_DELTA, + .text.extent.node.type = LayoutNodeType_TextBuffer, + .str = i18n_noop("Broadcaster"), + .use_i18n = true, + .text.font_key = FONT_KEY_GOTHIC_14, + .text.line_spacing_delta = CARD_LINE_DELTA, }; - return layout_create_text_node_from_config( - layout_ref, &s_broadcaster_header_config.text.extent.node); + return layout_create_text_node_from_config(layout_ref, + &s_broadcaster_header_config.text.extent.node); } static GTextNode *prv_card_view_constructor(TimelineLayout *timeline_layout) { @@ -136,52 +136,52 @@ static GTextNode *prv_card_view_constructor(TimelineLayout *timeline_layout) { layout->state = attribute_get_uint8(attributes, AttributeIdSportsGameState, GameStatePreGame); static const LayoutNodeConstructorConfig s_subtitle_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_subtitle_constructor, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_subtitle_constructor, }; static const LayoutNodeConstructorConfig s_game_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_game_constructor, + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_game_constructor, }; static const LayoutNodeExtentConfig s_icon_config = { - .node.type = LayoutNodeType_TimelineIcon, - .offset.y = PBL_IF_RECT_ELSE(5, 11), // icon offset y - .margin.h = PBL_IF_RECT_ELSE(5, 11), // icon margin height + .node.type = LayoutNodeType_TimelineIcon, + .offset.y = PBL_IF_RECT_ELSE(5, 11), // icon offset y + .margin.h = PBL_IF_RECT_ELSE(5, 11), // icon margin height }; static const LayoutNodeConfig s_page_break_config = { - .type = LayoutNodeType_TimelinePageBreak, + .type = LayoutNodeType_TimelinePageBreak, }; static const LayoutNodeTextAttributeConfig s_body_config = { - .attr_id = AttributeIdBody, - .text.font_key = FONT_KEY_GOTHIC_24_BOLD, - .text.line_spacing_delta = CARD_LINE_DELTA, - .text.extent.margin.h = 14, // body margin height + .attr_id = AttributeIdBody, + .text.font_key = FONT_KEY_GOTHIC_24_BOLD, + .text.line_spacing_delta = CARD_LINE_DELTA, + .text.extent.margin.h = 14, // body margin height }; - static const LayoutNodeConstructorConfig s_broadcaster_header_config = { - .extent.node.type = LayoutNodeType_Constructor, - .constructor = prv_broadcaster_header_constructor, + static const LayoutNodeConstructorConfig s_broadcaster_header_config = { + .extent.node.type = LayoutNodeType_Constructor, + .constructor = prv_broadcaster_header_constructor, }; static const LayoutNodeTextAttributeConfig s_broadcaster_config = { - .attr_id = AttributeIdBroadcaster, - .text.font_key = FONT_KEY_GOTHIC_24_BOLD, - .text.line_spacing_delta = CARD_LINE_DELTA, - .text.extent.margin.h = 8, // broadcaster margin height + .attr_id = AttributeIdBroadcaster, + .text.font_key = FONT_KEY_GOTHIC_24_BOLD, + .text.line_spacing_delta = CARD_LINE_DELTA, + .text.extent.margin.h = 8, // broadcaster margin height }; - static const LayoutNodeConfig * const s_vertical_config_nodes[] = { - &s_subtitle_config.extent.node, - &s_game_config.extent.node, - &s_icon_config.node, - &s_page_break_config, - &s_body_config.text.extent.node, - &s_broadcaster_header_config.extent.node, - &s_broadcaster_config.text.extent.node, + static const LayoutNodeConfig *const s_vertical_config_nodes[] = { + &s_subtitle_config.extent.node, + &s_game_config.extent.node, + &s_icon_config.node, + &s_page_break_config, + &s_body_config.text.extent.node, + &s_broadcaster_header_config.extent.node, + &s_broadcaster_config.text.extent.node, }; static const LayoutNodeVerticalConfig s_vertical_config = { - .container.extent.node.type = LayoutNodeType_Vertical, - .container.num_nodes = ARRAY_LENGTH(s_vertical_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_vertical_config_nodes, - .container.extent.offset.y = CARD_MARGIN_TOP, - .container.extent.margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, + .container.extent.node.type = LayoutNodeType_Vertical, + .container.num_nodes = ARRAY_LENGTH(s_vertical_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_vertical_config_nodes, + .container.extent.offset.y = CARD_MARGIN_TOP, + .container.extent.margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, }; return timeline_layout_create_card_view_from_config(timeline_layout, @@ -195,49 +195,47 @@ static GTextNode *prv_create_team_node(const LayoutLayer *layout_ref, int team_o const bool is_pregame = (layout->state == GameStatePreGame); const bool has_record = (attribute_find(attributes, AttributeIdRecordAway + team_offset) != NULL); - const AttributeId large_attr = !is_pregame ? AttributeIdScoreAway : - AttributeIdNameAway; - const AttributeId small_attr = !is_pregame ? AttributeIdNameAway : - has_record ? AttributeIdRecordAway : - AttributeIdRankAway; - const char *large_font = is_pregame ? FONT_KEY_GOTHIC_28_BOLD : - FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM; + const AttributeId large_attr = !is_pregame ? AttributeIdScoreAway : AttributeIdNameAway; + const AttributeId small_attr = !is_pregame ? AttributeIdNameAway + : has_record ? AttributeIdRecordAway + : AttributeIdRankAway; + const char *large_font = + is_pregame ? FONT_KEY_GOTHIC_28_BOLD : FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM; const char *small_font = FONT_KEY_GOTHIC_18_BOLD; const LayoutNodeTextAttributeConfig large_config = { - .attr_id = large_attr + team_offset, - .text.font_key = large_font, + .attr_id = large_attr + team_offset, + .text.font_key = large_font, #if PBL_COLOR - .text.color = LayoutColor_Secondary, + .text.color = LayoutColor_Secondary, #endif - .text.fixed_lines = 1, // large fixed lines - .text.alignment = LayoutTextAlignment_Center, - .text.extent.margin.h = -2, // large margin height + .text.fixed_lines = 1, // large fixed lines + .text.alignment = LayoutTextAlignment_Center, + .text.extent.margin.h = -2, // large margin height }; const LayoutNodeTextAttributeConfig small_config = { - .attr_id = small_attr + team_offset, - .text.font_key = small_font, + .attr_id = small_attr + team_offset, + .text.font_key = small_font, #if PBL_COLOR - .text.color = LayoutColor_Secondary, + .text.color = LayoutColor_Secondary, #endif - .text.fixed_lines = 1, // small fixed lines - .text.alignment = LayoutTextAlignment_Center, + .text.fixed_lines = 1, // small fixed lines + .text.alignment = LayoutTextAlignment_Center, }; - const LayoutNodeConfig * const vertical_config_nodes[] = { - &large_config.text.extent.node, - &small_config.text.extent.node, + const LayoutNodeConfig *const vertical_config_nodes[] = { + &large_config.text.extent.node, + &small_config.text.extent.node, }; const LayoutNodeVerticalConfig vertical_config = { - .container.extent.node.type = LayoutNodeType_Vertical, - .container.num_nodes = ARRAY_LENGTH(vertical_config_nodes), - .container.nodes = (LayoutNodeConfig **)&vertical_config_nodes, - .container.extent.offset.y = CARD_MARGIN_TOP, - .container.extent.margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, + .container.extent.node.type = LayoutNodeType_Vertical, + .container.num_nodes = ARRAY_LENGTH(vertical_config_nodes), + .container.nodes = (LayoutNodeConfig **)&vertical_config_nodes, + .container.extent.offset.y = CARD_MARGIN_TOP, + .container.extent.margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, }; - GTextNodeVertical *vertical_node = - (GTextNodeVertical *)layout_create_text_node_from_config( - layout_ref, &vertical_config.container.extent.node); + GTextNodeVertical *vertical_node = (GTextNodeVertical *)layout_create_text_node_from_config( + layout_ref, &vertical_config.container.extent.node); const GRect *bounds = &((Layer *)layout)->bounds; const int16_t midwidth = bounds->size.w / 2 - TIMELINE_CARD_MARGIN; vertical_node->container.size.w = midwidth; @@ -256,14 +254,15 @@ LayoutLayer *sports_layout_create(const LayoutLayerConfig *config) { SportsLayout *layout = task_zalloc_check(sizeof(SportsLayout)); static const TimelineLayoutImpl s_timeline_layout_impl = { - .attributes = { AttributeIdTitle, AttributeIdSubtitle }, - .default_colors = { { .argb = GColorBlackARGB8 }, - { .argb = GColorWhiteARGB8 }, - { .argb = GColorVividCeruleanARGB8 } }, - .default_icon = TIMELINE_RESOURCE_TIMELINE_SPORTS, - .card_icon_align = GAlignCenter, - .card_icon_size = TimelineResourceSizeSmall, - .card_view_constructor = prv_card_view_constructor, + .attributes = {AttributeIdTitle, AttributeIdSubtitle}, + .default_colors = + {{.argb = GColorBlackARGB8}, + {.argb = GColorWhiteARGB8}, + {.argb = GColorVividCeruleanARGB8}}, + .default_icon = TIMELINE_RESOURCE_TIMELINE_SPORTS, + .card_icon_align = GAlignCenter, + .card_icon_size = TimelineResourceSizeSmall, + .card_view_constructor = prv_card_view_constructor, }; timeline_layout_init((TimelineLayout *)layout, config, &s_timeline_layout_impl); diff --git a/src/fw/services/timeline/swap_layer.c b/src/fw/services/timeline/swap_layer.c index 5c26ad4d3c..7b0ce42ad9 100644 --- a/src/fw/services/timeline/swap_layer.c +++ b/src/fw/services/timeline/swap_layer.c @@ -33,8 +33,8 @@ // Scroll animation speed // Same as the normal moook duration, but one frame shorter -#define SCROLL_MS PBL_IF_RECT_ELSE(200, interpolate_moook_duration() - \ - ANIMATION_TARGET_FRAME_INTERVAL_MS) +#define SCROLL_MS \ + PBL_IF_RECT_ELSE(200, interpolate_moook_duration() - ANIMATION_TARGET_FRAME_INTERVAL_MS) // Swap animation speed // Adding ANIMATION_TARGET_FRAME_INTERVAL_MS doesn't actually add a frame, because plain moook @@ -64,8 +64,12 @@ typedef enum { typedef struct { ScrollAnimationCurveKind swap_curve_kind; union { - struct { InterpolateInt64Function interpolator; }; - struct { AnimationCurve curve; }; + struct { + InterpolateInt64Function interpolator; + }; + struct { + AnimationCurve curve; + }; }; } ScrollAnimationCurve; @@ -105,8 +109,8 @@ static void prv_remove_old_layout(SwapLayer *swap_layer, LayoutLayer *layout) { //! current index (which is stored and kept track of by the client) static LayoutLayer *prv_fetch_next_layout(SwapLayer *swap_layer, int8_t rel_change) { if (swap_layer->callbacks.get_layout_handler) { - LayoutLayer *layout = swap_layer->callbacks.get_layout_handler(swap_layer, rel_change, - swap_layer->context); + LayoutLayer *layout = + swap_layer->callbacks.get_layout_handler(swap_layer, rel_change, swap_layer->context); // if there is no layout, we return NULL if (!layout) { return NULL; @@ -114,10 +118,10 @@ static LayoutLayer *prv_fetch_next_layout(SwapLayer *swap_layer, int8_t rel_chan // Calculate the size of the layout we were given and set the frame. GSize size = layout_get_size(graphics_context_get_current_context(), layout); - prv_layout_set_frame(layout, &(GRect) { - .size.w = MAX(swap_layer->layer.frame.size.w, size.w), - .size.h = MAX(swap_layer->layer.frame.size.h, size.h), - }); + prv_layout_set_frame(layout, &(GRect){ + .size.w = MAX(swap_layer->layer.frame.size.w, size.w), + .size.h = MAX(swap_layer->layer.frame.size.h, size.h), + }); return layout; } return NULL; @@ -136,12 +140,11 @@ static void prv_announce_layout_did_appear(SwapLayer *swap_layer, LayoutLayer *l swap_layer->swap_in_progress = false; if (swap_layer->callbacks.layout_did_appear_handler) { swap_layer->callbacks.layout_did_appear_handler(swap_layer, layout, rel_change, - swap_layer->context); + swap_layer->context); } } -static void prv_update_colors(SwapLayer *swap_layer, GColor bg_color, - bool status_bar_filled) { +static void prv_update_colors(SwapLayer *swap_layer, GColor bg_color, bool status_bar_filled) { if (swap_layer->callbacks.update_colors_handler) { swap_layer->callbacks.update_colors_handler(swap_layer, bg_color, status_bar_filled, swap_layer->context); @@ -186,7 +189,7 @@ static void prv_update_status_bar_color(SwapLayer *swap_layer) { const GRect *cur_frame = &swap_layer->current->layer.frame; #if PBL_RECT // PBL-23115 status_bar can be off, so detect within range, updated a frame later. - color_status_bar = WITHIN(cur_frame->origin.y, -(3 * LAYOUT_BANNER_HEIGHT_RECT/ 2) - 1, + color_status_bar = WITHIN(cur_frame->origin.y, -(3 * LAYOUT_BANNER_HEIGHT_RECT / 2) - 1, LAYOUT_BANNER_HEIGHT_RECT / 2 - 1); #else color_status_bar = WITHIN(cur_frame->origin.y, -96, 66) || swap_layer->swap_in_progress; @@ -237,7 +240,7 @@ static void prv_update_arrow(SwapLayer *swap_layer) { layer_set_hidden(&swap_layer->arrow_layer.layer, hide_it); } -static void prv_arrow_layer_update_proc(Layer *layer, GContext* ctx) { +static void prv_arrow_layer_update_proc(Layer *layer, GContext *ctx) { ArrowLayer *arrow_layer = (ArrowLayer *)layer; const GRect *layer_bounds = &layer->bounds; @@ -277,7 +280,7 @@ static void prv_arrow_layer_update_proc(Layer *layer, GContext* ctx) { static int16_t prv_get_current_notification_offset(SwapLayer *swap_layer) { Layer *current = (Layer *)swap_layer->current; // produce positive representation of the offset of the layer from the top of the frame. - int16_t offset = - current->frame.origin.y; + int16_t offset = -current->frame.origin.y; return offset; } @@ -301,11 +304,12 @@ static Animation *prv_create_anim_frame_scroll(Layer *layer, uint32_t duration, GRect to_origin = layer->frame; to_origin.origin.y += dy; - Animation *result = (Animation *) property_animation_create_layer_frame( - layer, NULL, &to_origin); - animation_set_handlers(result, (AnimationHandlers) { - .stopped = prv_frame_scroll_complete, - }, layer); + Animation *result = (Animation *)property_animation_create_layer_frame(layer, NULL, &to_origin); + animation_set_handlers(result, + (AnimationHandlers){ + .stopped = prv_frame_scroll_complete, + }, + layer); animation_set_duration(result, duration); #if PBL_ROUND if (curve) { @@ -328,7 +332,7 @@ static void prv_swap_up_start(Animation *animation, void *context) { } static void prv_swap_up_complete(Animation *animation, bool finished, void *context) { - SwapLayer *swap_layer = (SwapLayer *) context; + SwapLayer *swap_layer = (SwapLayer *)context; if (swap_layer->is_deiniting) { return; } @@ -360,12 +364,11 @@ static Animation *prv_create_swap_up_animation(SwapLayer *swap_layer, bool full_ dy = swap_layer->layer.frame.size.h - PEEK_PX; } - Animation *prev_down = prv_create_anim_frame_scroll((Layer *)swap_layer->previous, SWAP_MS, dy, - NULL); - Animation *current_down = prv_create_anim_frame_scroll((Layer *)swap_layer->current, SWAP_MS, dy, - NULL); - Animation *next_down = prv_create_anim_frame_scroll((Layer *)swap_layer->next, SWAP_MS, dy, - NULL); + Animation *prev_down = + prv_create_anim_frame_scroll((Layer *)swap_layer->previous, SWAP_MS, dy, NULL); + Animation *current_down = + prv_create_anim_frame_scroll((Layer *)swap_layer->current, SWAP_MS, dy, NULL); + Animation *next_down = prv_create_anim_frame_scroll((Layer *)swap_layer->next, SWAP_MS, dy, NULL); return animation_spawn_create(prev_down, current_down, next_down, NULL); } @@ -397,7 +400,7 @@ static void prv_swap_down_start(Animation *animation, void *context) { } static void prv_swap_down_complete(Animation *animation, bool finished, void *context) { - SwapLayer *swap_layer = (SwapLayer *) context; + SwapLayer *swap_layer = (SwapLayer *)context; if (swap_layer->is_deiniting) { return; } @@ -418,7 +421,7 @@ static Animation *prv_create_swap_down_animation(SwapLayer *swap_layer) { const GRect *prev_frame = &swap_layer->previous->layer.frame; int16_t dy = -(prev_frame->origin.y + prev_frame->size.h); - ScrollAnimationCurve swap_down_scroll_curve = (ScrollAnimationCurve) { + ScrollAnimationCurve swap_down_scroll_curve = (ScrollAnimationCurve){ .swap_curve_kind = ScrollAnimationCurveKind_Curve, .curve = AnimationCurveEaseOut }; @@ -428,8 +431,8 @@ static Animation *prv_create_swap_down_animation(SwapLayer *swap_layer) { &swap_down_scroll_curve); // next might return NULL if there is no next. That's OK since animation_spawn CAN take two NULL's // and perform the creation correctly. - Animation *next_up = prv_create_anim_frame_scroll((Layer *)swap_layer->next, SWAP_MS, dy, - &swap_down_scroll_curve); + Animation *next_up = + prv_create_anim_frame_scroll((Layer *)swap_layer->next, SWAP_MS, dy, &swap_down_scroll_curve); return animation_spawn_create(prev_up, current_up, next_up, NULL); } @@ -452,7 +455,7 @@ static void prv_scroll(SwapLayer *swap_layer, int16_t dy, AnimationCurve curve) if (dy == 0) { return; } - ScrollAnimationCurve moook_scroll_curve = (ScrollAnimationCurve) { + ScrollAnimationCurve moook_scroll_curve = (ScrollAnimationCurve){ .swap_curve_kind = ScrollAnimationCurveKind_Interpolator, .interpolator = interpolate_moook }; @@ -516,10 +519,14 @@ static bool prv_attempt_swap(SwapLayer *swap_layer, ScrollDirection direction, b animation = prv_create_swap_up_animation(swap_layer, full_swap); } - animation_set_handlers(animation, (AnimationHandlers) { - .started = (direction == ScrollDirectionDown) ? prv_swap_down_start : prv_swap_up_start, - .stopped = (direction == ScrollDirectionDown) ? prv_swap_down_complete : prv_swap_up_complete, - }, swap_layer); + animation_set_handlers( + animation, + (AnimationHandlers){ + .started = (direction == ScrollDirectionDown) ? prv_swap_down_start : prv_swap_up_start, + .stopped = + (direction == ScrollDirectionDown) ? prv_swap_down_complete : prv_swap_up_complete, + }, + swap_layer); swap_layer->animation = animation; animation_schedule(animation); #if PBL_ROUND @@ -577,8 +584,7 @@ T_STATIC void prv_attempt_scroll(SwapLayer *swap_layer, ScrollDirection directio // check if we are going to go off screen, if so get a new layer and set it up, then animate. switch (direction) { - case ScrollDirectionUp: - { + case ScrollDirectionUp: { if (offset == 0) { // we are at the topmost part of the notification, swap up prv_handle_swap_attempt(swap_layer, direction, is_repeating); @@ -592,8 +598,7 @@ T_STATIC void prv_attempt_scroll(SwapLayer *swap_layer, ScrollDirection directio } break; } - case ScrollDirectionDown: - { + case ScrollDirectionDown: { #if PBL_RECT if (max_dy == offset) { // if we have already scrolled our maximum amount for this notification, we should swap @@ -608,9 +613,7 @@ T_STATIC void prv_attempt_scroll(SwapLayer *swap_layer, ScrollDirection directio #endif // pause at the top of a notification - if ((offset == 0) && - (is_repeating) && - (swap_layer->swap_delay_remaining > 0)) { + if ((offset == 0) && (is_repeating) && (swap_layer->swap_delay_remaining > 0)) { swap_layer->swap_delay_remaining--; return; } @@ -701,8 +704,7 @@ static void prv_raw_click_handler(ClickRecognizerRef recognizer, void *context) static void prv_swap_layer_click_config_provider(void *context) { // Use raw clicks to avoid single click delay which results from having multi-click enabled window_raw_click_subscribe(BUTTON_ID_UP, prv_raw_click_handler, NULL, context); - window_single_repeating_click_subscribe(BUTTON_ID_UP, SCROLL_REPEAT_MS, - prv_single_click_handler); + window_single_repeating_click_subscribe(BUTTON_ID_UP, SCROLL_REPEAT_MS, prv_single_click_handler); window_multi_click_subscribe(BUTTON_ID_UP, 2, 2, 100, false, prv_up_multi_click_handler); // Use raw clicks to avoid single click delay which results from having multi-click enabled @@ -713,9 +715,9 @@ static void prv_swap_layer_click_config_provider(void *context) { SwapLayer *swap_layer = context; #ifdef CONFIG_TOUCH - // Re-registering here (idempotent) makes the click-config-provider the re-show hook: after a higher - // modal that released touch is dismissed and this window regains input focus, the swap layer is - // re-subscribed as the sole Tier-1 touch handler. + // Re-registering here (idempotent) makes the click-config-provider the re-show hook: after a + // higher modal that released touch is dismissed and this window regains input focus, the swap + // layer is re-subscribed as the sole Tier-1 touch handler. swap_layer_touch_register(swap_layer); #endif if (swap_layer->callbacks.click_config_provider) { @@ -727,7 +729,7 @@ static void prv_swap_layer_click_config_provider(void *context) { // MISC FUNCTIONS /////////////////////// -static void prv_swap_layer_update_proc(Layer *layer, GContext* ctx) { +static void prv_swap_layer_update_proc(Layer *layer, GContext *ctx) { SwapLayer *swap_layer = (SwapLayer *)layer; prv_update_arrow(swap_layer); prv_update_status_bar_color(swap_layer); @@ -755,7 +757,7 @@ void swap_layer_reload_data(SwapLayer *swap_layer) { } GRect current_frame = current->layer.frame; - current_frame.origin = (GPoint) {0, 0}; + current_frame.origin = (GPoint){0, 0}; prv_layout_set_frame(current, ¤t_frame); layer_add_child(&swap_layer->layer, (Layer *)current); layer_insert_below_sibling((Layer *)current, &swap_layer->arrow_layer.layer); @@ -786,11 +788,11 @@ bool swap_layer_attempt_layer_swap(SwapLayer *swap_layer, ScrollDirection direct // // A SwapLayer registers itself as a Tier-1 touch widget in swap_layer_init() / the // click-config-provider and deregisters in swap_layer_deinit() (and, while covered by a higher -// modal, in swap_layer_touch_release()). The recognizers and gesture state are not owned per-widget: -// the unified widget (tap, pan, swipe) set, owned by TouchNavState, drives whichever migrated widget -// the finger lands on through a per-node apply vtable. A SwapLayer supplies that vtable -// (s_swap_touch_nav_ops) at registration; the apply functions below stay the per-swap gesture -// surface (and the unit-test entry points). +// modal, in swap_layer_touch_release()). The recognizers and gesture state are not owned +// per-widget: the unified widget (tap, pan, swipe) set, owned by TouchNavState, drives whichever +// migrated widget the finger lands on through a per-node apply vtable. A SwapLayer supplies that +// vtable (s_swap_touch_nav_ops) at registration; the apply functions below stay the per-swap +// gesture surface (and the unit-test entry points). // // A pan drives the content offset live and 1:1 (base captured at pan Start, throttled by the core), // clamped to [0, max_scroll]. On liftoff a pull past the clamped edge by more than SWAP_OVERPULL_PX @@ -858,7 +860,8 @@ void swap_layer_touch_scroll_by(SwapLayer *swap_layer, int16_t dy) { prv_layout_set_frame(swap_layer->next, &next_frame); } - // Refresh the auto-close timer: without this a long notification closes under the finger mid-read. + // Refresh the auto-close timer: without this a long notification closes under the finger + // mid-read. prv_announce_interaction(swap_layer); } @@ -871,7 +874,8 @@ SwapTouchLiftoffAction swap_layer_touch_liftoff_action(int16_t base_offset, int1 // Content-scroll convention: finger up (delta_y < 0) scrolls into the content (offset increases). const int16_t requested_offset = base_offset - delta_y; if (requested_offset < -SWAP_OVERPULL_PX) { - return SwapTouchLiftoff_SwapPrev; // over-pull at the top (finger down) -> previous notification + return SwapTouchLiftoff_SwapPrev; // over-pull at the top (finger down) -> previous + // notification } if (requested_offset > max_dy + SWAP_OVERPULL_PX) { return SwapTouchLiftoff_SwapNext; // over-pull at the bottom (finger up) -> next notification @@ -896,7 +900,8 @@ int16_t swap_layer_touch_settle_offset(int16_t base_offset, int16_t delta_y, int // notification does not creep on a tap. static void prv_swap_touch_apply_drag(SwapLayer *swap_layer, int16_t base_offset, int16_t delta_y) { if (!swap_layer->current || ABS(delta_y) < DRAG_THRESHOLD_PX) { - // No notification loaded yet (registration can happen before the layout loads), or sub-threshold. + // No notification loaded yet (registration can happen before the layout loads), or + // sub-threshold. return; } const int16_t requested_offset = base_offset - delta_y; @@ -949,9 +954,9 @@ static void prv_swap_touch_emit(SwapLayer *swap_layer, ButtonId button) { if (ops->is_animating && ops->is_animating(ops->ctx)) { return; } - if (button == BUTTON_ID_BACK && - !(ops->top_overrides_back && ops->top_overrides_back(ops->ctx))) { - // BACK on a window with no back handler pops the stack rather than feeding the click recognizer. + if (button == BUTTON_ID_BACK && !(ops->top_overrides_back && ops->top_overrides_back(ops->ctx))) { + // BACK on a window with no back handler pops the stack rather than feeding the click + // recognizer. if (ops->pop_top) { ops->pop_top(ops->ctx); } @@ -965,8 +970,8 @@ static void prv_swap_touch_emit(SwapLayer *swap_layer, ButtonId button) { // Unified widget-set ops // // Thin void*->SwapLayer* wrappers over the apply functions above. The unified widget set (owned by -// TouchNavState) drives the swap layer through these; direct assignment of the apply functions would -// not compile because their first parameter is SwapLayer*, not void*. Swap's content axis is +// TouchNavState) drives the swap layer through these; direct assignment of the apply functions +// would not compile because their first parameter is SwapLayer*, not void*. Swap's content axis is // vertical, so the GPoint base/delta carried by the vtable use only the .y component. // The notification body may not be loaded yet (registration can happen before the layout loads) and @@ -978,9 +983,9 @@ static bool prv_swap_ops_can_start(void *w) { static void prv_swap_ops_pan_started(void *w) { SwapLayer *swap_layer = w; - // Stop any running swap/scroll animation so the finger takes over, and refresh the auto-close timer - // so a long notification cannot close under the finger while it is being dragged. The base offset - // is latched by the core via get_base_offset next. + // Stop any running swap/scroll animation so the finger takes over, and refresh the auto-close + // timer so a long notification cannot close under the finger while it is being dragged. The base + // offset is latched by the core via get_base_offset next. prv_finish_animation(swap_layer); prv_announce_interaction(swap_layer); } @@ -1003,8 +1008,9 @@ static void prv_swap_ops_pan_snap(void *w, GPoint base, GPoint final_delta, GPoi static void prv_swap_ops_pan_cancel(void *w) { // Settle to the clamped offset with no swap (the live drag already left it clamped). Per the pan - // engine this does not fire on pre-emption (the pan recognizer never emits Cancelled there), which - // preserves the pre-refactor behaviour; it is reached only on an explicit mid-gesture cancel. + // engine this does not fire on pre-emption (the pan recognizer never emits Cancelled there), + // which preserves the pre-refactor behaviour; it is reached only on an explicit mid-gesture + // cancel. SwapLayer *swap_layer = w; if (!swap_layer->current) { return; @@ -1012,8 +1018,8 @@ static void prv_swap_ops_pan_cancel(void *w) { const int16_t cur = prv_get_current_notification_offset(swap_layer); const int16_t max_dy = prv_get_max_scroll_dy(swap_layer); // Same page alignment as the liftoff settle: a cancelled pan must not rest off-grid on round. - const int16_t target = swap_layer_touch_settle_offset(cur, 0, max_dy, - PBL_IF_RECT_ELSE(0, LAYOUT_HEIGHT)); + const int16_t target = + swap_layer_touch_settle_offset(cur, 0, max_dy, PBL_IF_RECT_ELSE(0, LAYOUT_HEIGHT)); prv_scroll(swap_layer, cur - target, AnimationCurveEaseOut); } @@ -1042,14 +1048,14 @@ static void prv_swap_ops_swipe(void *w, SwipeDirection dir) { } static const TouchNavWidgetOps s_swap_touch_nav_ops = { - .can_start = prv_swap_ops_can_start, - .pan_started = prv_swap_ops_pan_started, - .get_base_offset = prv_swap_ops_get_base_offset, - .pan_update = prv_swap_ops_pan_update, - .pan_snap = prv_swap_ops_pan_snap, - .pan_cancel = prv_swap_ops_pan_cancel, - .tap = prv_swap_ops_tap, - .swipe = prv_swap_ops_swipe, + .can_start = prv_swap_ops_can_start, + .pan_started = prv_swap_ops_pan_started, + .get_base_offset = prv_swap_ops_get_base_offset, + .pan_update = prv_swap_ops_pan_update, + .pan_snap = prv_swap_ops_pan_snap, + .pan_cancel = prv_swap_ops_pan_cancel, + .tap = prv_swap_ops_tap, + .swipe = prv_swap_ops_swipe, }; // --------------------------------------------------------------------------------------------- @@ -1123,11 +1129,11 @@ void swap_layer_set_callbacks(SwapLayer *swap_layer, void *callback_context, swap_layer_reload_data(swap_layer); } -Layer* swap_layer_get_layer(const SwapLayer *swap_layer) { +Layer *swap_layer_get_layer(const SwapLayer *swap_layer) { return &((SwapLayer *)swap_layer)->layer; } -LayoutLayer* swap_layer_get_current_layout(const SwapLayer *swap_layer) { +LayoutLayer *swap_layer_get_current_layout(const SwapLayer *swap_layer) { return swap_layer->current; } @@ -1144,8 +1150,8 @@ void swap_layer_init(SwapLayer *swap_layer, const GRect *frame) { gbitmap_init_with_resource(&swap_layer->arrow_layer.arrow_bitmap, RESOURCE_ID_ARROW_DOWN); - const GRect arrow_frame = GRect( - 0, frame->size.h - LAYOUT_ARROW_HEIGHT, frame->size.w, LAYOUT_ARROW_HEIGHT); + const GRect arrow_frame = + GRect(0, frame->size.h - LAYOUT_ARROW_HEIGHT, frame->size.w, LAYOUT_ARROW_HEIGHT); layer_init(&swap_layer->arrow_layer.layer, &arrow_frame); layer_set_update_proc(&swap_layer->arrow_layer.layer, prv_arrow_layer_update_proc); layer_add_child(layer, &swap_layer->arrow_layer.layer); @@ -1169,7 +1175,7 @@ void swap_layer_deinit(SwapLayer *swap_layer) { layer_deinit(&swap_layer->layer); } -SwapLayer* swap_layer_create(GRect frame) { +SwapLayer *swap_layer_create(GRect frame) { // Note: Not yet exported for 3rd party apps so no padding is necessary SwapLayer *layer = applib_malloc(sizeof(SwapLayer)); if (layer) { diff --git a/src/fw/services/timeline/timeline.c b/src/fw/services/timeline/timeline.c index 5db60e2560..c2cc404f07 100644 --- a/src/fw/services/timeline/timeline.c +++ b/src/fw/services/timeline/timeline.c @@ -96,7 +96,7 @@ static bool prv_is_in_window(time_t node_timestamp, uint16_t node_duration, time } static bool prv_show_event(TimelineNode *node, time_t timestamp, time_t midnight, - TimelineIterDirection direction, bool show_all_day_events) { + TimelineIterDirection direction, bool show_all_day_events) { // hide events outside of the window if (!prv_is_in_window(node->timestamp, node->duration, timestamp)) { return false; @@ -109,7 +109,7 @@ static bool prv_show_event(TimelineNode *node, time_t timestamp, time_t midnight return show_all_day_events; } else if (direction == TimelineIterDirectionFuture) { return (node->timestamp >= timestamp - fudge_time); - } else { // direction == TimelineIterDirectionPast + } else { // direction == TimelineIterDirectionPast return (node->timestamp < timestamp - fudge_time); } } @@ -118,7 +118,7 @@ static bool prv_show_event(TimelineNode *node, time_t timestamp, time_t midnight // i.e. no events exist between midnight today and now // iterate and figure out if we had a timed event pass today static bool prv_should_show_all_day_events(TimelineNode *head, time_t now, time_t today_midnight, - TimelineIterDirection direction) { + TimelineIterDirection direction) { TimelineNode *current = head; // show in future / hide in past all day events unless we find a timed event // between midnight and now @@ -137,11 +137,11 @@ static bool prv_should_show_all_day_events(TimelineNode *head, time_t now, time_ } static TimelineNode *prv_find_first_past(TimelineNode *head, time_t timestamp, - time_t today_midnight, bool show_all_day_events) { + time_t today_midnight, bool show_all_day_events) { TimelineNode *current = (TimelineNode *)list_get_tail((ListNode *)head); while (current) { if (prv_show_event(current, timestamp, today_midnight, TimelineIterDirectionPast, - show_all_day_events)) { + show_all_day_events)) { break; } current = (TimelineNode *)current->node.prev; @@ -150,11 +150,11 @@ static TimelineNode *prv_find_first_past(TimelineNode *head, time_t timestamp, } static TimelineNode *prv_find_first_future(TimelineNode *head, time_t timestamp, - time_t today_midnight, bool show_all_day_events) { + time_t today_midnight, bool show_all_day_events) { TimelineNode *current = head; while (current) { if (prv_show_event(current, timestamp, today_midnight, TimelineIterDirectionFuture, - show_all_day_events)) { + show_all_day_events)) { break; } current = (TimelineNode *)current->node.next; @@ -163,7 +163,8 @@ static TimelineNode *prv_find_first_future(TimelineNode *head, time_t timestamp, } static TimelineNode *prv_find_first(TimelineNode *head, TimelineIterDirection direction, - time_t timestamp, time_t today_midnight, bool show_all_day_events) { + time_t timestamp, time_t today_midnight, + bool show_all_day_events) { if (direction == TimelineIterDirectionPast) { return prv_find_first_past(head, timestamp, today_midnight, show_all_day_events); } else { @@ -184,8 +185,8 @@ static int prv_num_nodes_for_serialized_item(CommonTimelineItemHeader *header) { // The span is the time between 0:00 on the first day of the event // and 24:00 on the last day of the event const time_t start_span = time_util_get_midnight_of(header->timestamp - SECONDS_PER_DAY + 1); - const time_t end_span = time_util_get_midnight_of(header->timestamp + header->duration * - SECONDS_PER_MINUTE - 1); + const time_t end_span = + time_util_get_midnight_of(header->timestamp + header->duration * SECONDS_PER_MINUTE - 1); const time_t full_span = end_span - start_span; num_days = full_span / SECONDS_PER_DAY; } @@ -215,8 +216,8 @@ static void prv_set_nodes(TimelineNode *nodes[], CommonTimelineItemHeader *heade nodes[num_nodes - 1]->duration = 0; nodes[num_nodes - 1]->all_day = false; } - nodes[0]->all_day = (nodes[0]->duration == MINUTES_PER_DAY && - nodes[0]->timestamp == midnight_first); + nodes[0]->all_day = + (nodes[0]->duration == MINUTES_PER_DAY && nodes[0]->timestamp == midnight_first); // middle days are all day events time_t midnight = time_util_get_midnight_of(header->timestamp); @@ -229,7 +230,7 @@ static void prv_set_nodes(TimelineNode *nodes[], CommonTimelineItemHeader *heade } static void prv_set_nodes_all_day(TimelineNode *nodes[], CommonTimelineItemHeader *header, - int num_nodes) { + int num_nodes) { // Multiday events: // Each day is an all day event @@ -250,7 +251,7 @@ static void prv_set_nodes_all_day(TimelineNode *nodes[], CommonTimelineItemHeade } static void prv_add_nodes_for_serialized_item(TimelineNode **list_head, - CommonTimelineItemHeader *header) { + CommonTimelineItemHeader *header) { int num_nodes = prv_num_nodes_for_serialized_item(header); TimelineNode *nodes[num_nodes]; @@ -270,14 +271,14 @@ static void prv_add_nodes_for_serialized_item(TimelineNode **list_head, for (int i = 0; i < num_nodes; i++) { *list_head = (TimelineNode *)list_sorted_add((ListNode *)*list_head, (ListNode *)nodes[i], - prv_time_comparator, true); + prv_time_comparator, true); } } static bool prv_each(SettingsFile *file, SettingsRecordInfo *info, void *context) { // check entry is valid if (info->key_len != UUID_SIZE || info->val_len == 0) { - return true; // continue iteration + return true; // continue iteration } TimelineNode **list_head = context; @@ -291,7 +292,7 @@ static bool prv_each(SettingsFile *file, SettingsRecordInfo *info, void *context prv_add_nodes_for_serialized_item(list_head, &header); - return true; // continue iteration + return true; // continue iteration } static void prv_set_indices(TimelineNode *timeline) { TimelineNode *node = timeline; @@ -318,7 +319,7 @@ static int prv_first_event_comparator(TimelineNode *new_node, TimelineNode *old_ } static void prv_set_node_from_header(CommonTimelineItemHeader *header, TimelineNode *node_out) { - prv_set_nodes(&(TimelineNode *) { node_out }, header, 1 /* num_nodes */); + prv_set_nodes(&(TimelineNode *){node_out}, header, 1 /* num_nodes */); } int timeline_item_time_comparator(CommonTimelineItemHeader *new_common, @@ -349,7 +350,7 @@ static void prv_debug_print_pins(TimelineNode *node0) { PBL_LOG_DBG("Index %d", node->index); PBL_LOG_DBG("Timestamp %ld", node->timestamp); PBL_LOG_DBG("Duration %hu", node->duration); - PBL_LOG_DBG("All day? %s", node->all_day ? "True": "False"); + PBL_LOG_DBG("All day? %s", node->all_day ? "True" : "False"); PBL_LOG_DBG("Address %p", node); node = (TimelineNode *)node->node.next; } @@ -377,16 +378,16 @@ static bool prv_iter_next(IteratorState state) { return false; } } while (!prv_show_event(timeline_iter_state->node, timeline_iter_state->start_time, - timeline_iter_state->midnight, timeline_iter_state->direction, - timeline_iter_state->show_all_day_events) || - !timeline_exists(&timeline_iter_state->node->id)); + timeline_iter_state->midnight, timeline_iter_state->direction, + timeline_iter_state->show_all_day_events) || + !timeline_exists(&timeline_iter_state->node->id)); timeline_item_free_allocated_buffer(&timeline_iter_state->pin); timeline_iter_state->pin = (TimelineItem){}; status_t rv = pin_db_get(&timeline_iter_state->node->id, &timeline_iter_state->pin); - timeline_iter_state->current_day = time_util_get_midnight_of( - timeline_iter_state->node->timestamp); + timeline_iter_state->current_day = + time_util_get_midnight_of(timeline_iter_state->node->timestamp); timeline_iter_state->index = timeline_iter_state->node->index; #ifdef TIMELINE_SERVICE_DEBUG prv_debug_print_pins(timeline_iter_state->node); @@ -408,16 +409,16 @@ static bool prv_iter_prev(IteratorState state) { return false; } } while (!prv_show_event(timeline_iter_state->node, timeline_iter_state->start_time, - timeline_iter_state->midnight, timeline_iter_state->direction, - timeline_iter_state->show_all_day_events) || - !timeline_exists(&timeline_iter_state->node->id)); + timeline_iter_state->midnight, timeline_iter_state->direction, + timeline_iter_state->show_all_day_events) || + !timeline_exists(&timeline_iter_state->node->id)); timeline_item_free_allocated_buffer(&timeline_iter_state->pin); timeline_iter_state->pin = (TimelineItem){}; status_t rv = pin_db_get(&timeline_iter_state->node->id, &timeline_iter_state->pin); - timeline_iter_state->current_day = time_util_get_midnight_of( - timeline_iter_state->node->timestamp); + timeline_iter_state->current_day = + time_util_get_midnight_of(timeline_iter_state->node->timestamp); timeline_iter_state->index = timeline_iter_state->node->index; #ifdef TIMELINE_SERVICE_DEBUG prv_debug_print_pins(timeline_iter_state->node); @@ -438,7 +439,7 @@ static void prv_prune_ordered_timeline_list(TimelineNode **head) { // remove the node from out list timeline_iter_remove_node(head, node); } else { - break; // the list is ordered so we are done + break; // the list is ordered so we are done } node = next_node; } @@ -446,13 +447,13 @@ static void prv_prune_ordered_timeline_list(TimelineNode **head) { static void prv_put_outgoing_call_event(uint32_t call_identifier, const char *caller_id) { PebbleEvent event = { - .type = PEBBLE_PHONE_EVENT, - .phone = { - .type = PhoneEventType_Outgoing, - .source = PhoneCallSource_ANCS_Legacy, - .call_identifier = call_identifier, - .caller = phone_call_util_create_caller(caller_id, NULL), - } + .type = PEBBLE_PHONE_EVENT, + .phone = { + .type = PhoneEventType_Outgoing, + .source = PhoneCallSource_ANCS_Legacy, + .call_identifier = call_identifier, + .caller = phone_call_util_create_caller(caller_id, NULL), + } }; event_put(&event); @@ -487,8 +488,8 @@ bool timeline_remove(const Uuid *id) { return (S_SUCCESS == blob_db_delete(BlobDBIdPins, (uint8_t *)id, UUID_SIZE)); } -TimelineIterDirection timeline_direction_for_item(TimelineItem *item, - TimelineNode *timeline, time_t now) { +TimelineIterDirection timeline_direction_for_item(TimelineItem *item, TimelineNode *timeline, + time_t now) { if (item->header.all_day) { time_t today_midnight = time_util_get_midnight_of(now); if (today_midnight > item->header.timestamp || @@ -546,7 +547,6 @@ bool timeline_get_originator_id(const TimelineItem *item, Uuid *uuid) { return true; } - // // Iter functions // @@ -570,15 +570,15 @@ bool timeline_iter_remove_node_with_id(TimelineNode **head, Uuid *key) { } status_t timeline_iter_init(Iterator *iter, TimelineIterState *iter_state, TimelineNode **head, - TimelineIterDirection direction, time_t timestamp) { + TimelineIterDirection direction, time_t timestamp) { iter_state->direction = direction; iter_state->start_time = timestamp; iter_state->midnight = time_util_get_midnight_of(timestamp); iter_state->current_day = iter_state->midnight; - iter_state->show_all_day_events = prv_should_show_all_day_events(*head, timestamp, - iter_state->midnight, direction); + iter_state->show_all_day_events = + prv_should_show_all_day_events(*head, timestamp, iter_state->midnight, direction); TimelineNode *node = prv_find_first(*head, direction, timestamp, iter_state->midnight, - iter_state->show_all_day_events); + iter_state->show_all_day_events); if (node == NULL) { iter_init(iter, prv_iter_dummy, prv_iter_dummy, iter_state); return S_NO_MORE_ITEMS; @@ -596,7 +596,7 @@ status_t timeline_iter_init(Iterator *iter, TimelineIterState *iter_state, Timel iter_state->index = iter_state->node->index; if (direction == TimelineIterDirectionPast) { iter_init(iter, prv_iter_prev, prv_iter_next, iter_state); - } else { // Future + } else { // Future iter_init(iter, prv_iter_next, prv_iter_prev, iter_state); } @@ -653,7 +653,7 @@ bool timeline_add_missed_call_pin(TimelineItem *pin, uint32_t uid) { // TODO: PBL-23915 // We leak this i18n'd string because not leaking it is really hard. // We make sure we only ever allocate it once though, so it's not the end of the world. - remove_action->attr_list.attributes[1].cstring = (char*)i18n_get("Remove", &i18n_key); + remove_action->attr_list.attributes[1].cstring = (char *)i18n_get("Remove", &i18n_key); remove_action->type = TimelineItemActionTypeRemove; return timeline_add(pin); @@ -667,28 +667,27 @@ static void prv_put_notification_action_result(const Uuid *id, const char *msg, uint32_t timeline_res_id, ActionResultType type) { // send action result event PebbleSysNotificationActionResult *action_result = - kernel_malloc_check(sizeof(PebbleSysNotificationActionResult) + 2 * sizeof(Attribute)); + kernel_malloc_check(sizeof(PebbleSysNotificationActionResult) + 2 * sizeof(Attribute)); AttributeList result_attributes = { - .num_attributes = 2, - .attributes = (Attribute *)(((uint8_t *)action_result) + sizeof(*action_result)), + .num_attributes = 2, + .attributes = (Attribute *)(((uint8_t *)action_result) + sizeof(*action_result)), }; result_attributes.attributes[0].id = AttributeIdSubtitle; result_attributes.attributes[0].cstring = (char *)msg; result_attributes.attributes[1].id = AttributeIdIconLarge; result_attributes.attributes[1].uint32 = timeline_res_id; - *action_result = (PebbleSysNotificationActionResult) { - .id = *id, - .type = type, - .attr_list = result_attributes, + *action_result = (PebbleSysNotificationActionResult){ + .id = *id, + .type = type, + .attr_list = result_attributes, }; notifications_handle_notification_action_result(action_result); } -static void prv_do_remote_action(const Uuid *id, TimelineItemActionType type, - uint8_t action_id, const AttributeList *attributes, - bool do_async) { +static void prv_do_remote_action(const Uuid *id, TimelineItemActionType type, uint8_t action_id, + const AttributeList *attributes, bool do_async) { if (comm_session_get_system_session()) { timeline_action_endpoint_invoke_action(id, type, action_id, attributes, do_async); } else { @@ -699,8 +698,7 @@ static void prv_do_remote_action(const Uuid *id, TimelineItemActionType type, } } -static void prv_remove_pin_action(const TimelineItem *item, - const TimelineItemAction *action, +static void prv_remove_pin_action(const TimelineItem *item, const TimelineItemAction *action, const AttributeList *attributes) { if (item->header.from_watch) { // remove it via BlobDB @@ -713,8 +711,7 @@ static void prv_remove_pin_action(const TimelineItem *item, TIMELINE_RESOURCE_RESULT_DELETED, ActionResultTypeSuccess); } else { const bool do_async = true; - prv_do_remote_action(&item->header.id, action->type, - action->id, attributes, do_async); + prv_do_remote_action(&item->header.id, action->type, action->id, attributes, do_async); } } @@ -728,16 +725,15 @@ static void prv_dismiss_local_notification_action(const TimelineItem *item) { static void prv_perform_ancs_negative_action(const TimelineItem *item, const TimelineItemAction *action) { - uint8_t action_id = attribute_get_uint8(&action->attr_list, AttributeIdAncsAction, - TIMELINE_INVALID_ACTION_ID); + uint8_t action_id = + attribute_get_uint8(&action->attr_list, AttributeIdAncsAction, TIMELINE_INVALID_ACTION_ID); // Try to load the ancs id from attributes first in case the item's parent id points to another // timeline item. If the attribute isn't found, we assume the ancs id is stored in the header - uint32_t ancs_uid = attribute_get_uint32(&action->attr_list, AttributeIdAncsId, - item->header.ancs_uid); + uint32_t ancs_uid = + attribute_get_uint32(&action->attr_list, AttributeIdAncsId, item->header.ancs_uid); - PBL_LOG_DBG("Perform ancs notification action (%"PRIu32", %"PRIu8")", ancs_uid, - action_id); + PBL_LOG_DBG("Perform ancs notification action (%" PRIu32 ", %" PRIu8 ")", ancs_uid, action_id); ancs_perform_action(ancs_uid, action_id); if (!timeline_is_bulk_ancs_action_mode_enabled()) { @@ -762,7 +758,7 @@ static void prv_perform_ancs_negative_action(const TimelineItem *item, static void prv_get_pin_and_push_pin_window(void *data) { Uuid *parent_id = data; - TimelineItem *pin = task_malloc(sizeof(TimelineItem)); // cleaned-up by the modal + TimelineItem *pin = task_malloc(sizeof(TimelineItem)); // cleaned-up by the modal if (pin && pin_db_get(parent_id, pin) == S_SUCCESS) { timeline_pin_window_push_modal(pin); } else { @@ -779,8 +775,8 @@ static void prv_perform_health_response_action(const TimelineItem *item, const char *message = attribute_get_string(&action->attr_list, AttributeIdBody, (char *)i18n_get("Thanks!", &i18n_key)); - const uint32_t timeline_res_id = attribute_get_uint32(&action->attr_list, AttributeIdIconLarge, - TIMELINE_RESOURCE_THUMBS_UP); + const uint32_t timeline_res_id = + attribute_get_uint32(&action->attr_list, AttributeIdIconLarge, TIMELINE_RESOURCE_THUMBS_UP); prv_put_notification_action_result(&item->header.id, message, timeline_res_id, ActionResultTypeSuccess); @@ -817,8 +813,7 @@ void timeline_invoke_action(const TimelineItem *item, const TimelineItemAction * uuid_to_string(&item->header.parent_id, uuid_buffer); switch (action->type) { - case TimelineItemActionTypeOpenWatchApp: - { + case TimelineItemActionTypeOpenWatchApp: { // find parent app AppInstallId install_id = app_install_get_id_for_uuid(&item->header.parent_id); if (install_id == INSTALL_ID_INVALID) { @@ -829,29 +824,29 @@ void timeline_invoke_action(const TimelineItem *item, const TimelineItemAction * // fetch the relevant attribute const uint32_t launch_code = attribute_get_uint32(&action->attr_list, AttributeIdLaunchCode, 0); - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = install_id, - .common.args = (void *)(uintptr_t)launch_code, - .common.reason = APP_LAUNCH_TIMELINE_ACTION, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = install_id, + .common.args = (void *)(uintptr_t)launch_code, + .common.reason = APP_LAUNCH_TIMELINE_ACTION, }); PBL_LOG_INFO("Opening watch app %s", uuid_buffer); // Wait for the app we just launched to have something to render before hiding all modals. // If we don't we'll end up with flashing in a blank framebuffer. OpenAppContext *ctx = kernel_malloc_check(sizeof(OpenAppContext)); - *ctx = (OpenAppContext) { - .event_info = { - .type = PEBBLE_RENDER_READY_EVENT, - .handler = prv_app_render_ready, - .context = ctx, - }, - .install_id = install_id, + *ctx = (OpenAppContext){ + .event_info = + { + .type = PEBBLE_RENDER_READY_EVENT, + .handler = prv_app_render_ready, + .context = ctx, + }, + .install_id = install_id, }; event_service_client_subscribe(&ctx->event_info); break; } - case TimelineItemActionTypeOpenPin: - { + case TimelineItemActionTypeOpenPin: { Uuid *parent_id = kernel_malloc(sizeof(Uuid)); if (parent_id) { *parent_id = item->header.parent_id; @@ -860,10 +855,8 @@ void timeline_invoke_action(const TimelineItem *item, const TimelineItemAction * } break; } - case TimelineItemActionTypeAncsDial: - { - const char *caller_id = attribute_get_string(&item->attr_list, - AttributeIdTitle, "Unknown"); + case TimelineItemActionTypeAncsDial: { + const char *caller_id = attribute_get_string(&item->attr_list, AttributeIdTitle, "Unknown"); prv_put_outgoing_call_event(item->header.ancs_uid, caller_id); notifications_handle_notification_action_result(NULL); ancs_perform_action(item->header.ancs_uid, ActionIDPositive); @@ -872,8 +865,7 @@ void timeline_invoke_action(const TimelineItem *item, const TimelineItemAction * // FIXME PBL-18673 this is not necessarily dismiss case TimelineItemActionTypeAncsPositive: case TimelineItemActionTypeAncsNegative: - case TimelineItemActionTypeAncsDelete: - { + case TimelineItemActionTypeAncsDelete: { prv_perform_ancs_negative_action(item, action); notification_storage_set_status(&item->header.id, TimelineItemStatusDismissed); break; @@ -883,7 +875,7 @@ void timeline_invoke_action(const TimelineItem *item, const TimelineItemAction * // about dismissing it. We just confirm and dismiss locally. if (item->header.from_watch || (((item->header.type == TimelineItemTypeNotification) || - (item->header.type == TimelineItemTypeReminder)) && + (item->header.type == TimelineItemTypeReminder)) && !timeline_get_private_data_source((Uuid *)&item->header.parent_id))) { prv_dismiss_local_notification_action(item); return; @@ -897,12 +889,10 @@ void timeline_invoke_action(const TimelineItem *item, const TimelineItemAction * case TimelineItemActionTypeHttp: case TimelineItemActionTypeComplete: case TimelineItemActionTypePostpone: - case TimelineItemActionTypeRemoteRemove: - { + case TimelineItemActionTypeRemoteRemove: { // remote action, send it to the phone const bool do_async = false; - prv_do_remote_action(&item->header.id, action->type, - action->id, attributes, do_async); + prv_do_remote_action(&item->header.id, action->type, action->id, attributes, do_async); break; } case TimelineItemActionTypeRemove: @@ -927,38 +917,38 @@ typedef struct { } PrivateDataSourceInfo; static const PrivateDataSourceInfo s_data_sources[] = { - { - .id = UUID_NOTIFICATIONS_DATA_SOURCE, - .name = i18n_noop("Notifications"), - }, - { - .id = UUID_CALENDAR_DATA_SOURCE, - .name = i18n_noop("Calendar"), - }, - { - .id = UUID_WEATHER_DATA_SOURCE, - .name = i18n_noop("Weather"), - }, - { - .id = UUID_REMINDERS_DATA_SOURCE, - .name = i18n_noop("Reminders"), - }, - { - .id = UUID_ALARMS_DATA_SOURCE, - .name = i18n_noop("Alarms"), - }, - { - .id = UUID_HEALTH_DATA_SOURCE, - .name = i18n_noop("Health"), - }, - { - .id = UUID_INTERCOM_DATA_SOURCE, - .name = i18n_noop("Intercom"), - }, + { + .id = UUID_NOTIFICATIONS_DATA_SOURCE, + .name = i18n_noop("Notifications"), + }, + { + .id = UUID_CALENDAR_DATA_SOURCE, + .name = i18n_noop("Calendar"), + }, + { + .id = UUID_WEATHER_DATA_SOURCE, + .name = i18n_noop("Weather"), + }, + { + .id = UUID_REMINDERS_DATA_SOURCE, + .name = i18n_noop("Reminders"), + }, + { + .id = UUID_ALARMS_DATA_SOURCE, + .name = i18n_noop("Alarms"), + }, + { + .id = UUID_HEALTH_DATA_SOURCE, + .name = i18n_noop("Health"), + }, + { + .id = UUID_INTERCOM_DATA_SOURCE, + .name = i18n_noop("Intercom"), + }, }; const char *timeline_get_private_data_source(Uuid *parent_id) { - for (int i = 0; i < (int) ARRAY_LENGTH(s_data_sources); i++) { + for (int i = 0; i < (int)ARRAY_LENGTH(s_data_sources); i++) { if (uuid_equal(parent_id, &s_data_sources[i].id)) { return s_data_sources[i].name; } diff --git a/src/fw/services/timeline/timeline_actions.c b/src/fw/services/timeline/timeline_actions.c index d73e8c41fe..989b7dc0b7 100644 --- a/src/fw/services/timeline/timeline_actions.c +++ b/src/fw/services/timeline/timeline_actions.c @@ -56,13 +56,13 @@ typedef struct { typedef struct ActionResultData { EventServiceInfo event_service_info; ActionMenu *action_menu; - ProgressWindow *progress_window; //!< For showing progress of long requests + ProgressWindow *progress_window; //!< For showing progress of long requests VoiceResponseData *voice_data; - bool standalone_action; //!< This action was performed without a previous action menu + bool standalone_action; //!< This action was performed without a previous action menu struct { - EventedTimerID timer; //!< For timing out requests - Attribute attribute; //!< used to persist the response value while waiting for result + EventedTimerID timer; //!< For timing out requests + Attribute attribute; //!< used to persist the response value while waiting for result bool ignore_failures; } response; @@ -95,19 +95,19 @@ static void prv_subscribe_to_action_results_and_timeouts(ActionResultData *data, static void prv_request_responsive_session(void) { // In anticipation of having to communicate with the phone, request the minimum latency for 10s: - comm_session_set_responsiveness(comm_session_get_system_session(), - BtConsumerTimelineActionMenu, ResponseTimeMin, + comm_session_set_responsiveness(comm_session_get_system_session(), BtConsumerTimelineActionMenu, + ResponseTimeMin, MIN_LATENCY_MODE_TIMEOUT_TIMELINE_ACTION_MENU_SECS); } static void prv_reset_session_responsiveness(void) { - comm_session_set_responsiveness(comm_session_get_system_session(), - BtConsumerTimelineActionMenu, ResponseTimeMax, 0); + comm_session_set_responsiveness(comm_session_get_system_session(), BtConsumerTimelineActionMenu, + ResponseTimeMax, 0); } static WindowStack *prv_get_window_stack(ActionResultData *data) { - return window_manager_get_window_stack(data->voice_data ? ModalPriorityVoice : - ModalPriorityNotification); + return window_manager_get_window_stack(data->voice_data ? ModalPriorityVoice + : ModalPriorityNotification); } static void prv_cleanup_voice_data(VoiceResponseData *data) { @@ -132,8 +132,7 @@ static void prv_cleanup_action_result(ActionResultData *data, bool succeeded) { } // report to analytics the result of the action - if (data->response.attribute.id == AttributeIdTitle && - data->response.attribute.cstring) { + if (data->response.attribute.id == AttributeIdTitle && data->response.attribute.cstring) { } if (data->action_complete.callback) { @@ -175,9 +174,8 @@ static void prv_show_result_window(ActionResultData *data, const TimelineResourc const char *msg, bool succeeded) { const GSize simple_dialog_icon_size = timeline_resources_get_gsize(TimelineResourceSizeLarge); const bool use_status_bar = true; - const bool use_simple_dialog = simple_dialog_does_text_fit(msg, DISP_FRAME.size, - simple_dialog_icon_size, - use_status_bar); + const bool use_simple_dialog = + simple_dialog_does_text_fit(msg, DISP_FRAME.size, simple_dialog_icon_size, use_status_bar); SimpleDialog *simple_dialog = NULL; ExpandableDialog *expandable_dialog = NULL; @@ -198,11 +196,10 @@ static void prv_show_result_window(ActionResultData *data, const TimelineResourc dialog = expandable_dialog_get_dialog(expandable_dialog); } - const TimelineResourceSize icon_format = use_simple_dialog ? - TimelineResourceSizeLarge : - TimelineResourceSizeTiny; + const TimelineResourceSize icon_format = + use_simple_dialog ? TimelineResourceSizeLarge : TimelineResourceSizeTiny; TimelineResourceInfo timeline_res = { - .res_id = timeline_res_id, + .res_id = timeline_res_id, }; AppResourceInfo icon_res_info; timeline_resources_get_id(&timeline_res, icon_format, &icon_res_info); @@ -212,8 +209,8 @@ static void prv_show_result_window(ActionResultData *data, const TimelineResourc i18n_free(msg, dialog); dialog_set_icon(dialog, icon_res_info.res_id); dialog_set_icon_animate_direction(dialog, DialogIconAnimationFromLeft); - const uint32_t dialog_timeout_ms = use_simple_dialog ? DIALOG_TIMEOUT_DEFAULT : - DIALOG_TIMEOUT_INFINITE; + const uint32_t dialog_timeout_ms = + use_simple_dialog ? DIALOG_TIMEOUT_DEFAULT : DIALOG_TIMEOUT_INFINITE; dialog_set_timeout(dialog, dialog_timeout_ms); if (data->action_menu) { @@ -250,8 +247,7 @@ static bool prv_show_result_window_with_progress(ActionResultData *data, progress_window_set_result_success(data->progress_window); } else { const uint32_t delay_ms = 100; - progress_window_set_result_failure(data->progress_window, timeline_res_id, message, - delay_ms); + progress_window_set_result_failure(data->progress_window, timeline_res_id, message, delay_ms); } } else { prv_show_result_window(data, timeline_res_id, message, success); @@ -288,27 +284,26 @@ static void prv_show_progress_window(void *data_ptr) { progress_window_init(data->progress_window); const int16_t max_fake_percent = 80; progress_window_set_max_fake_progress(data->progress_window, max_fake_percent); - progress_window_set_callbacks(data->progress_window, (ProgressWindowCallbacks) { - .finished = prv_progress_window_finished, - }, data); + progress_window_set_callbacks(data->progress_window, + (ProgressWindowCallbacks){ + .finished = prv_progress_window_finished, + }, + data); progress_window_set_back_disabled(data->progress_window, true); progress_window_push(data->progress_window, prv_get_window_stack(data)); const unsigned action_result_timeout_ms = 5 * MS_PER_SECOND; - data->response.timer = evented_timer_register(action_result_timeout_ms, - false, - prv_timeout_handler, - data); + data->response.timer = + evented_timer_register(action_result_timeout_ms, false, prv_timeout_handler, data); } -static void prv_handle_success_fail_response(ActionResultData *data, - AttributeList *attr_list, +static void prv_handle_success_fail_response(ActionResultData *data, AttributeList *attr_list, bool success) { - const char *msg = attribute_get_string(attr_list, AttributeIdSubtitle, - success ? "Success" : "Failed"); - const uint32_t icon = attribute_get_uint32(attr_list, AttributeIdIconLarge, - success ? TIMELINE_RESOURCE_RESULT_SENT - : TIMELINE_RESOURCE_GENERIC_WARNING); + const char *msg = + attribute_get_string(attr_list, AttributeIdSubtitle, success ? "Success" : "Failed"); + const uint32_t icon = attribute_get_uint32( + attr_list, AttributeIdIconLarge, + success ? TIMELINE_RESOURCE_RESULT_SENT : TIMELINE_RESOURCE_GENERIC_WARNING); if (!prv_show_result_window_with_progress(data, icon, msg, success)) { prv_cleanup_action_result(data, success); } @@ -327,8 +322,8 @@ static void prv_cleanup_chaining_action_menu(void *context) { applib_free(data); } -static void prv_invoke_chaining_action(Window *chaining_window, - TimelineItemAction *action, void *context) { +static void prv_invoke_chaining_action(Window *chaining_window, TimelineItemAction *action, + void *context) { ChainingWindowCBData *cb_data = context; ActionResultData *data = applib_zalloc(sizeof(ActionResultData)); @@ -361,12 +356,12 @@ static void prv_handle_chaining_response(ActionResultData *data, PebbleEvent *ev prv_cleanup_action_result(data, false /* succeeded */); return; } - *cb_data = (ChainingWindowCBData) { - .item = item, - // Claim the buffer so it doesn't get automatically free'd. - // The action group needs to stick around - .event_ref = event_service_claim_buffer(event), - .standalone_action = data->standalone_action, + *cb_data = (ChainingWindowCBData){ + .item = item, + // Claim the buffer so it doesn't get automatically free'd. + // The action group needs to stick around + .event_ref = event_service_claim_buffer(event), + .standalone_action = data->standalone_action, }; Attribute *title_attr = attribute_find(&action_result->attr_list, AttributeIdTitle); @@ -393,23 +388,23 @@ static void prv_handle_do_response_response(ActionResultData *data) { return; } - TimelineItemAction *reply_action = timeline_item_find_action_by_type( - item, TimelineItemActionTypeAncsResponse); + TimelineItemAction *reply_action = + timeline_item_find_action_by_type(item, TimelineItemActionTypeAncsResponse); // Update the type of the action to be of type TimelineItemActionTypeResponse. This will cause // us to send a slightly different message to the phone so it can tell the difference between // the start reply action and the send reply action. // This is okay because we are just modifying a copy of the original notification reply_action->type = TimelineItemActionTypeResponse; - GColor color = (GColor) attribute_get_uint8(&item->attr_list, AttributeIdBgColor, - SMS_REPLY_COLOR.argb); + GColor color = + (GColor)attribute_get_uint8(&item->attr_list, AttributeIdBgColor, SMS_REPLY_COLOR.argb); // Lack of an action menu means this was a standalone action, so adjust reply menu accordingly const TimelineItemActionSource current_item_source = kernel_ui_get_current_timeline_item_action_source(); - timeline_actions_push_response_menu(item, reply_action, color, - prv_cleanup_do_response_menu, prv_get_window_stack(data), - current_item_source, data->standalone_action); + timeline_actions_push_response_menu(item, reply_action, color, prv_cleanup_do_response_menu, + prv_get_window_stack(data), current_item_source, + data->standalone_action); prv_cleanup_action_result(data, true /* succeeded */); } @@ -433,8 +428,8 @@ static void prv_action_handle_response(PebbleEvent *e, void *context) { char uuid_string[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(&action_result->id, uuid_string); - PBL_LOG_INFO("Received action result: Item ID - %s; type - %" - PRIu8, uuid_string, (uint8_t)action_result->type); + PBL_LOG_INFO("Received action result: Item ID - %s; type - %" PRIu8, uuid_string, + (uint8_t)action_result->type); // Each action result can only service one response event event_service_client_unsubscribe(&data->event_service_info); @@ -445,8 +440,7 @@ static void prv_action_handle_response(PebbleEvent *e, void *context) { prv_handle_success_fail_response(data, &action_result->attr_list, (action_result->type == ActionResultTypeSuccess)); break; - case ActionResultTypeSuccessANCSDismiss: - { + case ActionResultTypeSuccessANCSDismiss: { bool should_perform_dismiss = false; uint32_t ancs_uid = data->chaining_data.notif->header.ancs_uid; @@ -486,19 +480,17 @@ static void prv_action_handle_response(PebbleEvent *e, void *context) { static void prv_subscribe_to_action_results_and_timeouts(ActionResultData *data, bool ignore_failures) { - data->event_service_info = (EventServiceInfo) { - .type = PEBBLE_SYS_NOTIFICATION_EVENT, - .handler = prv_action_handle_response, - .context = data, + data->event_service_info = (EventServiceInfo){ + .type = PEBBLE_SYS_NOTIFICATION_EVENT, + .handler = prv_action_handle_response, + .context = data, }; event_service_client_subscribe(&data->event_service_info); data->response.ignore_failures = ignore_failures; const unsigned show_progress_timeout_ms = 1 * MS_PER_SECOND; - data->response.timer = evented_timer_register(show_progress_timeout_ms, - false, - prv_show_progress_window, - data); + data->response.timer = + evented_timer_register(show_progress_timeout_ms, false, prv_show_progress_window, data); } static void prv_set_action_result(TimelineActionMenu *timeline_action_menu, @@ -510,8 +502,7 @@ static void prv_set_action_result(TimelineActionMenu *timeline_action_menu, // invoke actions that require a response from a connected remote static ActionResultData *prv_invoke_remote_action(ActionMenu *action_menu, const TimelineItemAction *action, - const TimelineItem *pin, - void *context) { + const TimelineItem *pin, void *context) { ActionResultData *data = applib_zalloc(sizeof(ActionResultData)); if (!data) { return NULL; @@ -542,17 +533,17 @@ static ActionResultData *prv_invoke_remote_action(ActionMenu *action_menu, const int num_extra_attributes = 1; const int num_attributes = pin->attr_list.num_attributes + num_extra_attributes; - AttributeList response_attributes = (AttributeList) { - .num_attributes = num_attributes, - .attributes = kernel_zalloc_check(sizeof(Attribute) * num_attributes), + AttributeList response_attributes = (AttributeList){ + .num_attributes = num_attributes, + .attributes = kernel_zalloc_check(sizeof(Attribute) * num_attributes), }; memcpy(response_attributes.attributes, pin->attr_list.attributes, sizeof(Attribute) * pin->attr_list.num_attributes); int cur_attribute = pin->attr_list.num_attributes; - response_attributes.attributes[cur_attribute++] = (Attribute) { - .id = AttributeIdTimestamp, - .uint32 = pin->header.timestamp, + response_attributes.attributes[cur_attribute++] = (Attribute){ + .id = AttributeIdTimestamp, + .uint32 = pin->header.timestamp, }; timeline_invoke_action(pin, action, &response_attributes); @@ -560,9 +551,9 @@ static ActionResultData *prv_invoke_remote_action(ActionMenu *action_menu, break; } case TimelineItemActionTypeResponse: { - data->response.attribute = (Attribute) { - .id = AttributeIdTitle, - .cstring = (char *)context, + data->response.attribute = (Attribute){ + .id = AttributeIdTitle, + .cstring = (char *)context, }; Attribute *sender_attr = attribute_find(&pin->attr_list, AttributeIdSender); const int16_t num_attributes = (sender_attr) ? 2 : 1; @@ -574,21 +565,21 @@ static ActionResultData *prv_invoke_remote_action(ActionMenu *action_menu, attributes[1] = *sender_attr; } AttributeList response_attributes = { - .num_attributes = num_attributes, - .attributes = attributes, + .num_attributes = num_attributes, + .attributes = attributes, }; timeline_invoke_action(pin, action, &response_attributes); break; } case TimelineItemActionTypePostpone: { Attribute timestamp_attr = { - .id = AttributeIdTimestamp, - .uint32 = (uint32_t)(uintptr_t)context, + .id = AttributeIdTimestamp, + .uint32 = (uint32_t)(uintptr_t)context, }; AttributeList response_attributes = { - .num_attributes = 1, - .attributes = ×tamp_attr, + .num_attributes = 1, + .attributes = ×tamp_attr, }; timeline_invoke_action(pin, action, &response_attributes); break; @@ -649,8 +640,7 @@ static void prv_invoke_ble_hrm_stop_sharing_action(ActionMenu *action_menu, T_STATIC ActionResultData *prv_invoke_action(ActionMenu *action_menu, const TimelineItemAction *action, - const TimelineItem *pin, - const char *label) { + const TimelineItem *pin, const char *label) { switch (action->type) { case TimelineItemActionTypeOpenPin: case TimelineItemActionTypeOpenWatchApp: @@ -715,9 +705,11 @@ static void prv_push_dismiss_first_use_dialog(ActionMenu *action_menu) { return; } - const char* tutorial_msg = i18n_get("Quickly dismiss all notifications by holding the " \ - "Select button for 2 seconds from any incoming " \ - "notification.", action_menu); + const char *tutorial_msg = i18n_get( + "Quickly dismiss all notifications by holding the " + "Select button for 2 seconds from any incoming " + "notification.", + action_menu); ExpandableDialog *first_use_dialog = expandable_dialog_create_with_params( "Dismiss First Use", RESOURCE_ID_QUICK_DISMISS, tutorial_msg, @@ -743,8 +735,7 @@ static void prv_action_menu_cb(ActionMenu *action_menu, const ActionMenuItem *it case TimelineItemTypeUnknown: case TimelineItemTypeOutOfRange: default: - PBL_LOG_ERR("Performing action on invalid TimelineItem with type: %d", - pin->header.type); + PBL_LOG_ERR("Performing action on invalid TimelineItem with type: %d", pin->header.type); action_menu_close(action_menu, true); return; } @@ -763,16 +754,14 @@ static void prv_invoke_voice_response(VoiceResponseData *voice_data, char *trans // This is a bit of a hack, but we need all the behaviour of timeline_actions_invoke_action and // this allows voice responses to be used for other types of responses (i.e. ANCS in the future) ActionMenuItem item = { - .label = transcription, - .action_data = voice_data->action_data, + .label = transcription, + .action_data = voice_data->action_data, }; prv_do_action_analytics(voice_data->context, &item); - ActionResultData *action_result = prv_invoke_remote_action(voice_data->action_menu, - voice_data->action_data, - voice_data->context, - transcription); + ActionResultData *action_result = prv_invoke_remote_action( + voice_data->action_menu, voice_data->action_data, voice_data->context, transcription); if (action_result) { action_result->voice_data = voice_data; } else { @@ -791,10 +780,8 @@ static ActionMenuLevel *prv_create_template_level_from_action(ActionMenuLevel *p TimelineItemAction *action, void *i18n_owner) { StringList *responses_list = - attribute_get_string_list(&action->attr_list, - AttributeIdCannedResponses); - uint16_t canned_responses_count = responses_list ? - string_list_count(responses_list) : 0; + attribute_get_string_list(&action->attr_list, AttributeIdCannedResponses); + uint16_t canned_responses_count = responses_list ? string_list_count(responses_list) : 0; ActionMenuLevel *template_level; if (canned_responses_count) { @@ -807,11 +794,11 @@ static ActionMenuLevel *prv_create_template_level_from_action(ActionMenuLevel *p } else { // hard-wired default responses in case the phone app doesn't provide any static char *strings[] = { - i18n_noop("Ok"), - i18n_noop("Yes"), - i18n_noop("No"), - i18n_noop("Call me"), - i18n_noop("Call you later"), + i18n_noop("Ok"), + i18n_noop("Yes"), + i18n_noop("No"), + i18n_noop("Call me"), + i18n_noop("Call you later"), }; template_level = prv_create_level(ARRAY_LENGTH(strings), parent_level); for (size_t i = 0; i < (int)ARRAY_LENGTH(strings); i++) { @@ -826,18 +813,16 @@ static ActionMenuLevel *prv_create_template_level_from_action(ActionMenuLevel *p static ActionMenuLevel *prv_create_emoji_level_from_action(ActionMenuLevel *parent_level, TimelineItemAction *action, void *i18n_owner) { - static const char *short_strings[] = { - "😃", "😉", "😂", "😍", "😘", "\xe2\x9d\xa4", - "😇", "😎", "😛", "😟", "😩", "😭", "😴", "😐", - "😯", "👍", "👎", "👌", "💩", "🎉", "🍺"}; + static const char *short_strings[] = {"😃", "😉", "😂", "😍", "😘", "\xe2\x9d\xa4", "😇", + "😎", "😛", "😟", "😩", "😭", "😴", "😐", + "😯", "👍", "👎", "👌", "💩", "🎉", "🍺"}; const uint16_t num_items = ARRAY_LENGTH(short_strings); ActionMenuLevel *emoji_level = prv_create_level(num_items, parent_level); emoji_level->display_mode = ActionMenuLevelDisplayModeThin; for (size_t i = 0; i < num_items; i++) { - action_menu_level_add_action(emoji_level, short_strings[i], prv_action_menu_cb, - action); + action_menu_level_add_action(emoji_level, short_strings[i], prv_action_menu_cb, action); } return emoji_level; @@ -860,8 +845,7 @@ static void prv_handle_voice_transcription_result(PebbleEvent *e, void *context) #endif #ifdef CONFIG_MIC -static void prv_start_voice_reply(ActionMenu *action_menu, - const ActionMenuItem *item, +static void prv_start_voice_reply(ActionMenu *action_menu, const ActionMenuItem *item, void *context) { TimelineActionMenu *timeline_action_menu = context; action_menu_freeze(action_menu); @@ -872,18 +856,18 @@ static void prv_start_voice_reply(ActionMenu *action_menu, PBL_ASSERTN(item_copy); VoiceResponseData *data = applib_malloc(sizeof(VoiceResponseData)); - *data = (VoiceResponseData) { - .action_data = item->action_data, - .context = item_copy, - .action_menu = action_menu, - .voice_window = voice_window_create(NULL, 0, VoiceEndpointSessionTypeDictation), + *data = (VoiceResponseData){ + .action_data = item->action_data, + .context = item_copy, + .action_menu = action_menu, + .voice_window = voice_window_create(NULL, 0, VoiceEndpointSessionTypeDictation), }; PBL_ASSERTN(data->voice_window); - data->event_service_info = (EventServiceInfo) { - .type = PEBBLE_DICTATION_EVENT, - .handler = prv_handle_voice_transcription_result, - .context = data, + data->event_service_info = (EventServiceInfo){ + .type = PEBBLE_DICTATION_EVENT, + .handler = prv_handle_voice_transcription_result, + .context = data, }; event_service_client_subscribe(&data->event_service_info); @@ -920,8 +904,7 @@ static bool prv_is_reply_option_supported(ReplyOption option, TimelineItemAction } static ActionMenuLevel *prv_create_responses_level(TimelineItemAction *action, - ActionMenuLevel *root_level, - bool reply_prefix) { + ActionMenuLevel *root_level, bool reply_prefix) { uint16_t num_items = 0; for (ReplyOption reply = 0; reply < ReplyOptionCount; reply++) { if (prv_is_reply_option_supported(reply, action)) { @@ -938,31 +921,31 @@ static ActionMenuLevel *prv_create_responses_level(TimelineItemAction *action, ActionMenuItem reply_options[ReplyOptionCount] = { #ifdef CONFIG_MIC - { - .label = (reply_prefix ? i18n_get("Reply with Voice", root_level) : - i18n_get("Voice", root_level)), - .perform_action = prv_start_voice_reply, - .action_data = action, - }, + { + .label = (reply_prefix ? i18n_get("Reply with Voice", root_level) + : i18n_get("Voice", root_level)), + .perform_action = prv_start_voice_reply, + .action_data = action, + }, #else - { - // This should never get used because prv_is_reply_option_supported() will return false - }, + { + // This should never get used because prv_is_reply_option_supported() will return false + }, #endif - { - .label = i18n_get("Canned messages", root_level), - .is_leaf = 0, - }, - { - .label = i18n_get("Emoji", root_level), - .is_leaf = 0, - }, + { + .label = i18n_get("Canned messages", root_level), + .is_leaf = 0, + }, + { + .label = i18n_get("Emoji", root_level), + .is_leaf = 0, + }, }; - ActionMenuLevel *(*level_getters[ReplyOptionCount]) - (ActionMenuLevel *, TimelineItemAction *, void *) = { - NULL, - prv_create_template_level_from_action, - prv_create_emoji_level_from_action, + ActionMenuLevel *(*level_getters[ReplyOptionCount])(ActionMenuLevel *, TimelineItemAction *, + void *) = { + NULL, + prv_create_template_level_from_action, + prv_create_emoji_level_from_action, }; unsigned int item = 0; @@ -982,8 +965,7 @@ static ActionMenuLevel *prv_create_responses_level(TimelineItemAction *action, return responses_level; } -static void prv_postpone_15_minutes(ActionMenu *action_menu, - const ActionMenuItem *action_menu_item, +static void prv_postpone_15_minutes(ActionMenu *action_menu, const ActionMenuItem *action_menu_item, void *context) { TimelineActionMenu *timeline_action_menu = context; const TimelineItem *pin = timeline_action_menu->item; @@ -994,8 +976,7 @@ static void prv_postpone_15_minutes(ActionMenu *action_menu, } static void prv_postpone_later_today(ActionMenu *action_menu, - const ActionMenuItem *action_menu_item, - void *context) { + const ActionMenuItem *action_menu_item, void *context) { TimelineActionMenu *timeline_action_menu = context; const TimelineItem *pin = timeline_action_menu->item; const TimelineItemAction *action = action_menu_item->action_data; @@ -1026,8 +1007,7 @@ static void prv_postpone_later_today(ActionMenu *action_menu, prv_invoke_remote_action(action_menu, action, pin, (void *)(uintptr_t)new_time); } -static void prv_postpone_tomorrow(ActionMenu *action_menu, - const ActionMenuItem *action_menu_item, +static void prv_postpone_tomorrow(ActionMenu *action_menu, const ActionMenuItem *action_menu_item, void *context) { TimelineActionMenu *timeline_action_menu = context; const TimelineItem *pin = timeline_action_menu->item; @@ -1061,23 +1041,16 @@ static ActionMenuLevel *prv_create_postpone_level(TimelineItemAction *action, root_level = postpone_level; } - - action_menu_level_add_action(postpone_level, - i18n_get("In 15 minutes", root_level), - prv_postpone_15_minutes, - action); + action_menu_level_add_action(postpone_level, i18n_get("In 15 minutes", root_level), + prv_postpone_15_minutes, action); if (show_later_today) { - action_menu_level_add_action(postpone_level, - i18n_get("Later today", root_level), - prv_postpone_later_today, - action); + action_menu_level_add_action(postpone_level, i18n_get("Later today", root_level), + prv_postpone_later_today, action); } - action_menu_level_add_action(postpone_level, - i18n_get("Tomorrow", root_level), - prv_postpone_tomorrow, - action); + action_menu_level_add_action(postpone_level, i18n_get("Tomorrow", root_level), + prv_postpone_tomorrow, action); return postpone_level; } @@ -1086,8 +1059,8 @@ void timeline_actions_add_action_to_root_level(TimelineItemAction *action, ActionMenuLevel *root_level) { const char *label = attribute_get_string(&action->attr_list, AttributeIdTitle, "[Action]"); if (action->type == TimelineItemActionTypeResponse) { - ActionMenuLevel *responses_level = prv_create_responses_level(action, root_level, - false /* reply_prefix */); + ActionMenuLevel *responses_level = + prv_create_responses_level(action, root_level, false /* reply_prefix */); action_menu_level_add_child(root_level, responses_level, label); } else if (action->type == TimelineItemActionTypePostpone) { ActionMenuLevel *responses_level = prv_create_postpone_level(action, root_level); @@ -1152,17 +1125,19 @@ ActionMenu *timeline_actions_push_action_menu(ActionMenuConfig *base_config, return timeline_action_menu->action_menu; } -ActionMenu *timeline_actions_push_response_menu( - TimelineItem *item, TimelineItemAction *reply_action, GColor bg_color, - ActionMenuDidCloseCb did_close_cb, WindowStack *window_stack, TimelineItemActionSource source, - bool standalone_reply) { +ActionMenu *timeline_actions_push_response_menu(TimelineItem *item, + TimelineItemAction *reply_action, GColor bg_color, + ActionMenuDidCloseCb did_close_cb, + WindowStack *window_stack, + TimelineItemActionSource source, + bool standalone_reply) { kernel_ui_set_current_timeline_item_action_source(source); prv_request_responsive_session(); ActionMenuConfig config = { - .context = item, - .colors.background = bg_color, - .did_close = did_close_cb, - .root_level = prv_create_responses_level(reply_action, NULL, standalone_reply), + .context = item, + .colors.background = bg_color, + .did_close = did_close_cb, + .root_level = prv_create_responses_level(reply_action, NULL, standalone_reply), }; return timeline_actions_push_action_menu(&config, window_stack); } diff --git a/src/fw/services/timeline/timeline_layout.c b/src/fw/services/timeline/timeline_layout.c index ac9eb6b43f..284af96a5b 100644 --- a/src/fw/services/timeline/timeline_layout.c +++ b/src/fw/services/timeline/timeline_layout.c @@ -18,35 +18,23 @@ #include "pbl/util/size.h" #include "pbl/util/string.h" -#define ARROW_SIZE_PX \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ PBL_IF_RECT_ELSE(8, 6), \ - /* medium */ PBL_IF_RECT_ELSE(8, 6), \ - /* large */ 6, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* x-large */ 6 \ - ) - -#define TIME_NUMBERS_MARGIN_W \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ 0, \ - /* medium */ 0, \ - /* large */ 2, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* x-large */ 2 \ - ) - -#define TIME_WORDS_OFFSET_Y \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ 0, \ - /* medium */ 0, \ - /* large */ 2, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* x-large */ 2 \ - ) +#define ARROW_SIZE_PX \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ PBL_IF_RECT_ELSE(8, 6), /* medium */ PBL_IF_RECT_ELSE(8, 6), /* large */ 6, \ + /* This is the same as Large until ExtraLarge is designed */ /* x-large */ 6) + +#define TIME_NUMBERS_MARGIN_W \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ 0, /* medium */ 0, /* large */ 2, \ + /* This is the same as Large until ExtraLarge is designed */ /* x-large */ 2) + +#define TIME_WORDS_OFFSET_Y \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ 0, /* medium */ 0, /* large */ 2, \ + /* This is the same as Large until ExtraLarge is designed */ /* x-large */ 2) typedef struct TimelineLayoutStyle { int16_t fat_time_margin_h; @@ -62,40 +50,40 @@ typedef struct TimelineLayoutStyle { } TimelineLayoutStyle; static const TimelineLayoutStyle s_style_medium = { - .fat_time_margin_h = -8, - .thin_time_margin_h = -8, - .primary_list_margin_h = 6, - .primary_line_spacing_delta = -2, - .fat_future_title_offset_y = 0, - .fat_past_title_offset_y = 0, - .thin_future_title_offset_y = 0, - .thin_past_title_offset_y = 0, + .fat_time_margin_h = -8, + .thin_time_margin_h = -8, + .primary_list_margin_h = 6, + .primary_line_spacing_delta = -2, + .fat_future_title_offset_y = 0, + .fat_past_title_offset_y = 0, + .thin_future_title_offset_y = 0, + .thin_past_title_offset_y = 0, }; static const TimelineLayoutStyle s_style_large = { - .fat_time_margin_h = -3, - .thin_time_margin_h = -6, - .primary_list_margin_h = 2, - // PBL-42540: This property is dependent on the screen size. Whether there can be a secondary - // depends on whether the remaining screen space after fat permits. - .primary_secondary_peek_margin_h = -5, - .thin_can_have_secondary = true, - .fat_future_title_offset_y = 25, - .fat_past_title_offset_y = -30, - .thin_future_title_offset_y = 45, - .thin_past_title_offset_y = 10, + .fat_time_margin_h = -3, + .thin_time_margin_h = -6, + .primary_list_margin_h = 2, + // PBL-42540: This property is dependent on the screen size. Whether there can be a secondary + // depends on whether the remaining screen space after fat permits. + .primary_secondary_peek_margin_h = -5, + .thin_can_have_secondary = true, + .fat_future_title_offset_y = 25, + .fat_past_title_offset_y = -30, + .thin_future_title_offset_y = 45, + .thin_past_title_offset_y = 10, }; -static const TimelineLayoutStyle * const s_styles[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = &s_style_medium, - [PreferredContentSizeMedium] = &s_style_medium, - [PreferredContentSizeLarge] = &s_style_large, - [PreferredContentSizeExtraLarge] = &s_style_large, +static const TimelineLayoutStyle *const s_styles[NumPreferredContentSizes] = { + [PreferredContentSizeSmall] = &s_style_medium, + [PreferredContentSizeMedium] = &s_style_medium, + [PreferredContentSizeLarge] = &s_style_large, + [PreferredContentSizeExtraLarge] = &s_style_large, }; static GPath s_page_break_arrow_path = { - .num_points = 3, - .points = (GPoint[]) {{-ARROW_SIZE_PX, 0}, {ARROW_SIZE_PX, 0}, {0, ARROW_SIZE_PX}} + .num_points = 3, + .points = (GPoint[]){{-ARROW_SIZE_PX, 0}, {ARROW_SIZE_PX, 0}, {0, ARROW_SIZE_PX}} }; static void prv_init_icon(TimelineLayout *layout, const GRect *icon_frame, @@ -110,9 +98,10 @@ static const TimelineLayoutStyle *prv_get_style(void) { return s_styles[PreferredContentSizeDefault]; } -TimelineResourceId timeline_layout_get_icon_resource_id( - LayoutLayerMode mode, const AttributeList *attributes, TimelineResourceSize card_icon_size, - TimelineResourceId fallback_resource) { +TimelineResourceId timeline_layout_get_icon_resource_id(LayoutLayerMode mode, + const AttributeList *attributes, + TimelineResourceSize card_icon_size, + TimelineResourceId fallback_resource) { AttributeId card_attr_id; switch (card_icon_size) { default: @@ -141,23 +130,24 @@ void timeline_layout_init_with_icon_id(TimelineLayout *layout, const LayoutLayer TimelineLayoutInfo *info = config->context; static const LayoutLayerImpl s_layout_layer_impl = { - .size_getter = timeline_layout_get_content_size, - .destructor = timeline_layout_destroy, - .mode_setter = timeline_layout_change_mode, + .size_getter = timeline_layout_get_content_size, + .destructor = timeline_layout_destroy, + .mode_setter = timeline_layout_change_mode, #if PBL_COLOR - .color_getter = timeline_layout_get_colors, + .color_getter = timeline_layout_get_colors, #endif }; - *layout = (TimelineLayout) { - .layout_layer = { - .mode = config->mode, - .attributes = config->attributes, - .impl = &s_layout_layer_impl, - }, - .impl = timeline_layout_impl, - .info = info, - .has_page_break = false, + *layout = (TimelineLayout){ + .layout_layer = + { + .mode = config->mode, + .attributes = config->attributes, + .impl = &s_layout_layer_impl, + }, + .impl = timeline_layout_impl, + .info = info, + .has_page_break = false, }; prv_init_colors(layout); @@ -167,10 +157,11 @@ void timeline_layout_init_with_icon_id(TimelineLayout *layout, const LayoutLayer layer_set_update_proc((Layer *)layout, prv_update_proc); GRect icon_frame; - timeline_layout_get_icon_frame(&(GRect) { GPointZero , config->frame->size }, - info->scroll_direction, &icon_frame); + timeline_layout_get_icon_frame(&(GRect){GPointZero, config->frame->size}, info->scroll_direction, + &icon_frame); const TimelineResourceSize icon_size = (config->mode == LayoutLayerModeCard) - ? layout->impl->card_icon_size : TimelineResourceSizeTiny; + ? layout->impl->card_icon_size + : TimelineResourceSizeTiny; prv_init_icon(layout, &icon_frame, icon_size, icon_resource, layout->impl->default_icon, config->app_id); timeline_layout_init_view(layout, layout->layout_layer.mode); @@ -201,11 +192,11 @@ void timeline_layout_deinit(TimelineLayout *timeline_layout) { } void timeline_layout_init_info(TimelineLayoutInfo *info, TimelineItem *item, time_t current_day) { - *info = (TimelineLayoutInfo) { - .timestamp = item->header.timestamp, - .duration_s = item->header.duration * SECONDS_PER_MINUTE, - .current_day = current_day, - .all_day = item->header.all_day, + *info = (TimelineLayoutInfo){ + .timestamp = item->header.timestamp, + .duration_s = item->header.duration * SECONDS_PER_MINUTE, + .current_day = current_day, + .all_day = item->header.all_day, }; info->end_time = info->timestamp + info->duration_s; @@ -219,7 +210,8 @@ void timeline_layout_init_info(TimelineLayoutInfo *info, TimelineItem *item, tim // Pins representing the last day of a multiday event use the end time info->pin_time = (!info->all_day && time_util_get_midnight_of(info->timestamp) != current_day && time_util_get_midnight_of(info->end_time) == current_day) - ? info->end_time : info->timestamp; + ? info->end_time + : info->timestamp; } void timeline_layout_get_icon_frame(const GRect *bounds, TimelineScrollDirection scroll_direction, @@ -231,22 +223,24 @@ void timeline_layout_get_icon_frame(const GRect *bounds, TimelineScrollDirection const bool use_large_style = (PreferredContentSizeDefault >= PreferredContentSizeLarge); // s_style_large: future_top_margin=39, past layout origin=117, icon_offset_y=3 // s_style_medium: future_top_margin=39, past layout origin=61, icon_offset_y=0 - PBL_UNUSED const int offset_y_round = use_large_style ? (is_future ? 76 : -2) - : (is_future ? 40 : 17); + PBL_UNUSED const int offset_y_round = + use_large_style ? (is_future ? 76 : -2) : (is_future ? 40 : 17); const GPoint origin = { - .x = bounds->size.w - size.w + 2, - .y = PBL_IF_RECT_ELSE(offset_y_rect, offset_y_round), + .x = bounds->size.w - size.w + 2, + .y = PBL_IF_RECT_ELSE(offset_y_rect, offset_y_round), }; - *frame = (GRect) { gpoint_add(bounds->origin, origin), size }; -} - -static KinoReel *prv_create_kino_reel_with_timeline_resource( - TimelineLayout *timeline_layout, TimelineResourceSize icon_res_size, - TimelineResourceId resource, TimelineResourceId fallback_resource, const Uuid *app_id) { - timeline_layout->icon_info = (TimelineResourceInfo) { - .res_id = resource, - .app_id = app_id, - .fallback_id = fallback_resource + *frame = (GRect){gpoint_add(bounds->origin, origin), size}; +} + +static KinoReel *prv_create_kino_reel_with_timeline_resource(TimelineLayout *timeline_layout, + TimelineResourceSize icon_res_size, + TimelineResourceId resource, + TimelineResourceId fallback_resource, + const Uuid *app_id) { + timeline_layout->icon_info = (TimelineResourceInfo){ + .res_id = resource, + .app_id = app_id, + .fallback_id = fallback_resource }; AppResourceInfo *res_info = &timeline_layout->icon_res_info; timeline_resources_get_id(&timeline_layout->icon_info, icon_res_size, res_info); @@ -277,10 +271,10 @@ static void prv_init_icon(TimelineLayout *timeline_layout, const GRect *icon_fra } if (timeline_layout->layout_layer.mode == LayoutLayerModePeek) { - icon_size = GSize(TIMELINE_PEEK_ICON_BOX_WIDTH, - timeline_layout->layout_layer.layer.frame.size.h); + icon_size = + GSize(TIMELINE_PEEK_ICON_BOX_WIDTH, timeline_layout->layout_layer.layer.frame.size.h); } - const GRect frame = { icon_frame->origin, icon_size }; + const GRect frame = {icon_frame->origin, icon_size}; // create the static reel timeline_layout->icon_size = frame.size; @@ -329,15 +323,12 @@ void prv_init_colors(TimelineLayout *timeline_layout) { LayoutLayer *layout = &timeline_layout->layout_layer; const LayoutColors *default_colors = &timeline_layout->impl->default_colors; LayoutColors *colors = &timeline_layout->colors; - colors->bg_color = - (GColor) attribute_get_uint8(layout->attributes, AttributeIdBgColor, - default_colors->bg_color.argb); - colors->primary_color = - (GColor) attribute_get_uint8(layout->attributes, AttributeIdPrimaryColor, - default_colors->primary_color.argb); - colors->secondary_color = - (GColor) attribute_get_uint8(layout->attributes, AttributeIdSecondaryColor, - default_colors->secondary_color.argb); + colors->bg_color = (GColor)attribute_get_uint8(layout->attributes, AttributeIdBgColor, + default_colors->bg_color.argb); + colors->primary_color = (GColor)attribute_get_uint8(layout->attributes, AttributeIdPrimaryColor, + default_colors->primary_color.argb); + colors->secondary_color = (GColor)attribute_get_uint8( + layout->attributes, AttributeIdSecondaryColor, default_colors->secondary_color.argb); } const LayoutColors *timeline_layout_get_colors(const LayoutLayer *layout_ref) { @@ -377,27 +368,27 @@ void timeline_layout_deinit_view(TimelineLayout *layout) { static GTextNode *prv_create_all_day_text_node(const TimelineLayout *layout) { static const LayoutNodeTextBufferConfig s_all_day_config = { - .text.extent.node.type = LayoutNodeType_TextBuffer, - .str = i18n_noop("All day"), - .use_i18n = true, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Title, - .text.fixed_lines = 1, - .text.alignment = PBL_IF_RECT_ELSE(LayoutTextAlignment_Left, LayoutTextAlignment_Right), - // The font leaves blank space above the text; this pulls the header back up. Large rect - // displays need less of a pull than the others. - .text.extent.offset.y = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - /* This is the same as Medium until Small is designed */ - /* small */ -13, - /* medium */ -13, - /* large */ PBL_IF_RECT_ELSE(-8, -13), - /* This is the same as Large until ExtraLarge is designed */ - /* extralarge */ PBL_IF_RECT_ELSE(-8, -13)), - .text.extent.margin.h = -7, + .text.extent.node.type = LayoutNodeType_TextBuffer, + .str = i18n_noop("All day"), + .use_i18n = true, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Title, + .text.fixed_lines = 1, + .text.alignment = PBL_IF_RECT_ELSE(LayoutTextAlignment_Left, LayoutTextAlignment_Right), + // The font leaves blank space above the text; this pulls the header back up. Large rect + // displays need less of a pull than the others. + .text.extent.offset.y = + PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, + /* This is the same as Medium until Small is designed */ + /* small */ -13, + /* medium */ -13, + /* large */ PBL_IF_RECT_ELSE(-8, -13), + /* This is the same as Large until ExtraLarge is designed */ + /* extralarge */ PBL_IF_RECT_ELSE(-8, -13)), + .text.extent.margin.h = -7, }; - GTextNodeText *text_node = - (GTextNodeText *)layout_create_text_node_from_config( - &layout->layout_layer, &s_all_day_config.text.extent.node); + GTextNodeText *text_node = (GTextNodeText *)layout_create_text_node_from_config( + &layout->layout_layer, &s_all_day_config.text.extent.node); // TODO: PBL-30522 Enable timeline list view text flow // Remove when text flow is enabled if (PBL_IF_ROUND_ELSE(layout->layout_layer.mode == LayoutLayerModePinnedThin, false)) { @@ -425,39 +416,38 @@ static void prv_time_word_update(const LayoutLayer *layout_ref, static GTextNode *prv_create_hour_text_node(const TimelineLayout *layout) { static const LayoutNodeTextDynamicConfig s_number_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_time_number_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_TimeHeaderNumbers, - .text.fixed_lines = 1, - .text.alignment = LayoutTextAlignment_Left, - .text.extent.offset.y = -6, - .text.extent.margin.w = TIME_NUMBERS_MARGIN_W, + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_time_number_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_TimeHeaderNumbers, + .text.fixed_lines = 1, + .text.alignment = LayoutTextAlignment_Left, + .text.extent.offset.y = -6, + .text.extent.margin.w = TIME_NUMBERS_MARGIN_W, }; static const LayoutNodeTextDynamicConfig s_word_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_time_word_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_TimeHeaderWords, - .text.fixed_lines = 1, - .text.alignment = LayoutTextAlignment_Left, - .text.extent.offset.y = TIME_WORDS_OFFSET_Y, + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_time_word_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_TimeHeaderWords, + .text.fixed_lines = 1, + .text.alignment = LayoutTextAlignment_Left, + .text.extent.offset.y = TIME_WORDS_OFFSET_Y, }; - static const LayoutNodeConfig * const s_horizontal_config_nodes[] = { - &s_number_config.text.extent.node, - &s_word_config.text.extent.node, + static const LayoutNodeConfig *const s_horizontal_config_nodes[] = { + &s_number_config.text.extent.node, + &s_word_config.text.extent.node, }; static const LayoutNodeHorizontalConfig s_horizontal_config = { - .container.extent.node.type = LayoutNodeType_Horizontal, - .container.num_nodes = ARRAY_LENGTH(s_horizontal_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_horizontal_config_nodes, + .container.extent.node.type = LayoutNodeType_Horizontal, + .container.num_nodes = ARRAY_LENGTH(s_horizontal_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_horizontal_config_nodes, }; - GTextNodeHorizontal *horizontal_node = - (GTextNodeHorizontal *)layout_create_text_node_from_config( - &layout->layout_layer, &s_horizontal_config.container.extent.node); + GTextNodeHorizontal *horizontal_node = (GTextNodeHorizontal *)layout_create_text_node_from_config( + &layout->layout_layer, &s_horizontal_config.container.extent.node); horizontal_node->horizontal_alignment = TIMELINE_LAYER_TEXT_ALIGNMENT; return &horizontal_node->container.node; } @@ -472,13 +462,13 @@ static GTextNode *prv_create_time_text_node(const TimelineLayout *layout) { static const char *prv_get_secondary_text(const TimelineLayout *layout) { const AttributeList *attributes = layout->layout_layer.attributes; - return attribute_get_string(attributes, AttributeIdShortSubtitle, NULL) ?: - attribute_get_string(attributes, layout->impl->attributes.secondary_id, ""); + return attribute_get_string(attributes, AttributeIdShortSubtitle, NULL) + ?: attribute_get_string(attributes, layout->impl->attributes.secondary_id, ""); } static void prv_peek_time_text_update(const LayoutLayer *layout_ref, - const LayoutNodeTextDynamicConfig *config, - char *buffer, bool render) { + const LayoutNodeTextDynamicConfig *config, char *buffer, + bool render) { const TimelineLayout *layout = (TimelineLayout *)layout_ref; if (rtc_get_time() < layout->info->timestamp) { clock_get_until_time(buffer, config->buffer_size, layout->info->timestamp, @@ -496,9 +486,10 @@ static GTextNode *prv_create_pin_view_node(TimelineLayout *layout) { GTextNodeVertical *vertical_node = graphics_text_node_create_vertical(num_vertical_nodes); const bool is_future = (layout->info->scroll_direction == TimelineScrollDirectionDown); const bool is_peek = (layout->layout_layer.mode == LayoutLayerModePeek); - vertical_node->vertical_alignment = is_peek ? GVerticalAlignmentCenter : - PBL_IF_ROUND_ELSE((is_future ? GVerticalAlignmentBottom : GVerticalAlignmentTop), - GVerticalAlignmentTop); + vertical_node->vertical_alignment = + is_peek ? GVerticalAlignmentCenter + : PBL_IF_ROUND_ELSE((is_future ? GVerticalAlignmentBottom : GVerticalAlignmentTop), + GVerticalAlignmentTop); GTextNode *time_text_node = !is_peek ? prv_create_time_text_node(layout) : NULL; if (time_text_node) { graphics_text_node_container_add_child(&vertical_node->container, time_text_node); @@ -512,8 +503,7 @@ static GTextNode *prv_create_pin_view_node(TimelineLayout *layout) { const bool has_secondary = (((is_peek || is_fat || thin_can_have_secondary) && !IS_EMPTY_STRING(secondary_text)) || (is_peek && (rtc_get_time() < layout->info->timestamp))); - const int peek_text_width = - DISP_COLS - TIMELINE_PEEK_ICON_BOX_WIDTH - (2 * TIMELINE_PEEK_MARGIN); + const int peek_text_width = DISP_COLS - TIMELINE_PEEK_ICON_BOX_WIDTH - (2 * TIMELINE_PEEK_MARGIN); const GPoint peek_text_offset = GPoint(TIMELINE_PEEK_MARGIN, PBL_IF_RECT_ELSE(-5, -6)); const GTextOverflowMode overflow = (has_secondary && !is_peek) ? GTextOverflowModeTrailingEllipsis : GTextOverflowModeFill; @@ -525,18 +515,17 @@ static GTextNode *prv_create_pin_view_node(TimelineLayout *layout) { } static const LayoutNodeTextConfig s_primary_config = { - .extent.node.type = LayoutNodeType_Text, - .style = LayoutContentSizeDefault, - .style_font = TextStyleFont_Title, - .alignment = ToLayoutTextAlignment(TIMELINE_LAYER_TEXT_ALIGNMENT), + .extent.node.type = LayoutNodeType_Text, + .style = LayoutContentSizeDefault, + .style_font = TextStyleFont_Title, + .alignment = ToLayoutTextAlignment(TIMELINE_LAYER_TEXT_ALIGNMENT), }; - GTextNodeText *primary_node = - (GTextNodeText *)layout_create_text_node_from_config( - &layout->layout_layer, &s_primary_config.extent.node); + GTextNodeText *primary_node = (GTextNodeText *)layout_create_text_node_from_config( + &layout->layout_layer, &s_primary_config.extent.node); primary_node->text = - attribute_get_string(attributes, AttributeIdShortTitle, NULL) ?: - attribute_get_string(attributes, layout->impl->attributes.primary_id, ""); + attribute_get_string(attributes, AttributeIdShortTitle, NULL) + ?: attribute_get_string(attributes, layout->impl->attributes.primary_id, ""); primary_node->line_spacing_delta = style->primary_line_spacing_delta; int num_primary_lines = is_fat ? 2 : 1; if (is_peek) { @@ -561,17 +550,16 @@ static GTextNode *prv_create_pin_view_node(TimelineLayout *layout) { if (has_secondary) { LayoutNodeTextDynamicConfig secondary_config = { - .text.extent.node.type = is_peek ? LayoutNodeType_TextDynamic : LayoutNodeType_Text, - .update = prv_peek_time_text_update, - .buffer_size = ATTRIBUTE_SUBTITLE_MAX_LEN, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_PinSubtitle, - .text.alignment = ToLayoutTextAlignment(TIMELINE_LAYER_TEXT_ALIGNMENT), + .text.extent.node.type = is_peek ? LayoutNodeType_TextDynamic : LayoutNodeType_Text, + .update = prv_peek_time_text_update, + .buffer_size = ATTRIBUTE_SUBTITLE_MAX_LEN, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_PinSubtitle, + .text.alignment = ToLayoutTextAlignment(TIMELINE_LAYER_TEXT_ALIGNMENT), }; - GTextNodeText *secondary_node = - (GTextNodeText *)layout_create_text_node_from_config( - &layout->layout_layer, &secondary_config.text.extent.node); + GTextNodeText *secondary_node = (GTextNodeText *)layout_create_text_node_from_config( + &layout->layout_layer, &secondary_config.text.extent.node); if (is_peek) { secondary_node->node.offset = peek_text_offset; secondary_node->max_size.w = peek_text_width; @@ -620,9 +608,9 @@ static GTextNode *prv_create_pin_view_node(TimelineLayout *layout) { GTextNodeCustom *icon_node = timeline_layout_create_icon_node(layout); const unsigned int num_concurrent = layout->info->num_concurrent; const unsigned int concurrent_height = timeline_peek_get_concurrent_height(num_concurrent); - gpoint_add_eq(&icon_node->node.offset, - GPoint(PBL_IF_RECT_ELSE(1, 2), - PBL_IF_RECT_ELSE(0, -1) - (concurrent_height / 2))); + gpoint_add_eq( + &icon_node->node.offset, + GPoint(PBL_IF_RECT_ELSE(1, 2), PBL_IF_RECT_ELSE(0, -1) - (concurrent_height / 2))); graphics_text_node_container_add_child(&vertical_icon_node->container, &icon_node->node); graphics_text_node_container_add_child(&horizontal_node->container, &horizontal_icon_node->container.node); @@ -633,7 +621,7 @@ static GTextNode *prv_create_pin_view_node(TimelineLayout *layout) { } static void prv_get_pin_view_bounds(TimelineLayout *layout, GRect *box_out) { - *box_out = (GRect) { GPointZero, layout->layout_layer.layer.frame.size }; + *box_out = (GRect){GPointZero, layout->layout_layer.layer.frame.size}; if (layout->layout_layer.mode == LayoutLayerModePeek) { const unsigned int num_concurrent = layout->info->num_concurrent; const unsigned int concurrent_height = timeline_peek_get_concurrent_height(num_concurrent); @@ -665,17 +653,19 @@ static void prv_render_view(TimelineLayout *layout, GContext *ctx, bool render, (is_card ? prv_get_card_view_bounds : prv_get_pin_view_bounds)(layout, &box); graphics_context_set_text_color( ctx, (is_card ? layout_get_colors((LayoutLayer *)layout)->primary_color : GColorBlack)); - static const GRect page_frame_on_screen = - { { 0, STATUS_BAR_LAYER_HEIGHT }, { DISP_COLS, DISP_ROWS - STATUS_BAR_LAYER_HEIGHT } }; + static const GRect page_frame_on_screen = { + {0, STATUS_BAR_LAYER_HEIGHT}, + {DISP_COLS, DISP_ROWS - STATUS_BAR_LAYER_HEIGHT} + }; const GTextNodeDrawConfig config = { - .page_frame = is_peek ? &GRectZero : &page_frame_on_screen, - .origin_on_screen = is_peek ? &GPointZero : &page_frame_on_screen.origin, - .content_inset = 8, - .text_flow = PBL_IF_ROUND_ELSE(paging, false), - .paging = PBL_IF_ROUND_ELSE(paging, false), + .page_frame = is_peek ? &GRectZero : &page_frame_on_screen, + .origin_on_screen = is_peek ? &GPointZero : &page_frame_on_screen.origin, + .content_inset = 8, + .text_flow = PBL_IF_ROUND_ELSE(paging, false), + .paging = PBL_IF_ROUND_ELSE(paging, false), }; - (render ? graphics_text_node_draw : - graphics_text_node_get_size)(layout->view_node, ctx, &box, &config, size_out); + (render ? graphics_text_node_draw : graphics_text_node_get_size)(layout->view_node, ctx, &box, + &config, size_out); } void timeline_layout_render_view(TimelineLayout *layout, GContext *ctx) { @@ -719,25 +709,26 @@ GTextNode *timeline_layout_create_card_view_from_config(const TimelineLayout *la &layout->layout_layer, &vertical_config.container.extent.node); const LayoutNodeHeadingsParagraphsConfig headings_paragraphs_config = { - .size = LayoutContentSizeDefault, - .heading_style_font = TextStyleFont_ParagraphHeader, - .paragraph_style_font = TextStyleFont_Body, + .size = LayoutContentSizeDefault, + .heading_style_font = TextStyleFont_ParagraphHeader, + .paragraph_style_font = TextStyleFont_Body, }; - graphics_text_node_container_add_child((GTextNodeContainer *)vertical_node, - &layout_create_headings_paragraphs_node( - &layout->layout_layer, &headings_paragraphs_config)->container.node); + graphics_text_node_container_add_child( + (GTextNodeContainer *)vertical_node, + &layout_create_headings_paragraphs_node(&layout->layout_layer, &headings_paragraphs_config) + ->container.node); if (!has_last_updated) { return vertical_node; } static const LayoutNodeTextBufferConfig s_header_config = { - .text.extent.node.type = LayoutNodeType_TextBuffer, - .str = i18n_noop("Last updated"), - .use_i18n = true, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_ParagraphHeader, - .text.extent.margin.h = TIMELINE_CARD_BODY_HEADER_MARGIN_HEIGHT, + .text.extent.node.type = LayoutNodeType_TextBuffer, + .str = i18n_noop("Last updated"), + .use_i18n = true, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_ParagraphHeader, + .text.extent.margin.h = TIMELINE_CARD_BODY_HEADER_MARGIN_HEIGHT, }; graphics_text_node_container_add_child( (GTextNodeContainer *)vertical_node, @@ -745,17 +736,16 @@ GTextNode *timeline_layout_create_card_view_from_config(const TimelineLayout *la &s_header_config.text.extent.node)); static const LayoutNodeTextDynamicConfig s_body_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_last_updated_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Body, - .text.extent.margin.h = TIMELINE_CARD_BODY_MARGIN_HEIGHT, + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_last_updated_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Body, + .text.extent.margin.h = TIMELINE_CARD_BODY_MARGIN_HEIGHT, }; graphics_text_node_container_add_child( (GTextNodeContainer *)vertical_node, - layout_create_text_node_from_config(&layout->layout_layer, - &s_body_config.text.extent.node)); + layout_create_text_node_from_config(&layout->layout_layer, &s_body_config.text.extent.node)); return vertical_node; } @@ -767,16 +757,16 @@ static void prv_page_break_node_callback(GContext *ctx, const GRect *box, const int16_t height = bounds->size.h - box->origin.y; if (render) { graphics_context_set_fill_color(ctx, layout_get_colors((LayoutLayer *)layout)->primary_color); - const int arrow_offset = ((int[NumPreferredContentSizes]) { - //! @note this is the same as Medium until Small is designed - [PreferredContentSizeSmall] = PBL_IF_ROUND_ELSE(-1, 0), - [PreferredContentSizeMedium] = PBL_IF_ROUND_ELSE(-1, 0), - [PreferredContentSizeLarge] = -1, - //! @note this is the same as Large until ExtraLarge is designed - [PreferredContentSizeExtraLarge] = -1, + const int arrow_offset = ((int[NumPreferredContentSizes]){ + //! @note this is the same as Medium until Small is designed + [PreferredContentSizeSmall] = PBL_IF_ROUND_ELSE(-1, 0), + [PreferredContentSizeMedium] = PBL_IF_ROUND_ELSE(-1, 0), + [PreferredContentSizeLarge] = -1, + //! @note this is the same as Large until ExtraLarge is designed + [PreferredContentSizeExtraLarge] = -1, })[PreferredContentSizeDefault]; - const GPoint origin = GPoint(bounds->size.w / 2, - bounds->size.h - TIMELINE_CARD_ARROW_HEIGHT + arrow_offset); + const GPoint origin = + GPoint(bounds->size.w / 2, bounds->size.h - TIMELINE_CARD_ARROW_HEIGHT + arrow_offset); gpath_move_to(&s_page_break_arrow_path, origin); gpath_draw_filled(ctx, &s_page_break_arrow_path); } else { @@ -784,7 +774,7 @@ static void prv_page_break_node_callback(GContext *ctx, const GRect *box, layout->has_page_break = true; } if (size_out) { - *size_out = (GSize) { bounds->size.w, height }; + *size_out = (GSize){bounds->size.w, height}; } } @@ -795,8 +785,8 @@ GTextNodeCustom *timeline_layout_create_page_break_node(const TimelineLayout *la } void timeline_layout_time_text_update(const LayoutLayer *layout_ref, - const LayoutNodeTextDynamicConfig *config, - char *buffer, bool render) { + const LayoutNodeTextDynamicConfig *config, char *buffer, + bool render) { const TimelineLayout *layout = (TimelineLayout *)layout_ref; clock_copy_time_string_timestamp(buffer, config->buffer_size, layout->info->timestamp); } diff --git a/src/fw/services/timeline/timeline_layout_animations.c b/src/fw/services/timeline/timeline_layout_animations.c index 706ccb76a1..4d1b32c7b4 100644 --- a/src/fw/services/timeline/timeline_layout_animations.c +++ b/src/fw/services/timeline/timeline_layout_animations.c @@ -14,7 +14,7 @@ static void prv_change_reel(TimelineLayout *layout, KinoReel *reel) { // we most likely don't want that callback any more - kino_layer_set_callbacks(&layout->icon_layer, (KinoLayerCallbacks) {}, NULL); + kino_layer_set_callbacks(&layout->icon_layer, (KinoLayerCallbacks){}, NULL); kino_layer_set_reel(&layout->icon_layer, reel, true); } @@ -41,8 +41,7 @@ static void prv_pin_to_card_second_half_stopped(KinoLayer *layer, bool finished, static void prv_pin_to_card_second_half(TimelineLayout *pin_timeline_layout, TimelineLayout *card_timeline_layout) { KinoReel *from_reel = kino_reel_create_with_resource_system( - card_timeline_layout->icon_res_info.res_app_num, - card_timeline_layout->icon_res_info.res_id); + card_timeline_layout->icon_res_info.res_app_num, card_timeline_layout->icon_res_info.res_id); if (!from_reel) { return; @@ -68,13 +67,14 @@ static void prv_pin_to_card_second_half(TimelineLayout *pin_timeline_layout, kino_layer_play_section(&card_timeline_layout->icon_layer, duration / 2, duration); - kino_layer_set_callbacks(&card_timeline_layout->icon_layer, (KinoLayerCallbacks) { - .did_stop = prv_pin_to_card_second_half_stopped, - }, card_timeline_layout); + kino_layer_set_callbacks(&card_timeline_layout->icon_layer, + (KinoLayerCallbacks){ + .did_stop = prv_pin_to_card_second_half_stopped, + }, + card_timeline_layout); } -static void prv_pin_to_card_first_half_stopped(KinoLayer *layer, bool finished, - void *context) { +static void prv_pin_to_card_first_half_stopped(KinoLayer *layer, bool finished, void *context) { TimelineLayout *timeline_layout = context; // reset the first half of the animation @@ -93,8 +93,7 @@ static void prv_pin_to_card_first_half_stopped(KinoLayer *layer, bool finished, void timeline_layout_transition_pin_to_card(TimelineLayout *pin_timeline_layout, TimelineLayout *card_timeline_layout) { KinoReel *from_reel = kino_reel_create_with_resource_system( - pin_timeline_layout->icon_res_info.res_app_num, - pin_timeline_layout->icon_res_info.res_id); + pin_timeline_layout->icon_res_info.res_app_num, pin_timeline_layout->icon_res_info.res_id); if (!from_reel) { return; @@ -119,9 +118,11 @@ void timeline_layout_transition_pin_to_card(TimelineLayout *pin_timeline_layout, layer_set_clips((Layer *)pin_timeline_layout, false); layer_set_clips((Layer *)&pin_timeline_layout->icon_layer, false); - kino_layer_set_callbacks(&pin_timeline_layout->icon_layer, (KinoLayerCallbacks) { - .did_stop = prv_pin_to_card_first_half_stopped, - }, pin_timeline_layout); + kino_layer_set_callbacks(&pin_timeline_layout->icon_layer, + (KinoLayerCallbacks){ + .did_stop = prv_pin_to_card_first_half_stopped, + }, + pin_timeline_layout); kino_layer_play_section(&pin_timeline_layout->icon_layer, 0, duration / 2); pin_timeline_layout->transition_layout = card_timeline_layout; @@ -137,8 +138,7 @@ static void prv_card_to_pin_stopped(KinoLayer *layer, bool finished, void *conte void timeline_layout_transition_card_to_pin(TimelineLayout *card_timeline_layout, TimelineLayout *pin_timeline_layout) { KinoReel *from_reel = kino_reel_create_with_resource_system( - card_timeline_layout->icon_res_info.res_app_num, - card_timeline_layout->icon_res_info.res_id); + card_timeline_layout->icon_res_info.res_app_num, card_timeline_layout->icon_res_info.res_id); if (!from_reel) { return; @@ -156,13 +156,15 @@ void timeline_layout_transition_card_to_pin(TimelineLayout *card_timeline_layout KinoReel *new_reel = kino_reel_scale_segmented_create(from_reel, take_ownership, icon_from); kino_reel_transform_set_to_frame(new_reel, icon_to); kino_reel_transform_set_transform_duration(new_reel, duration / 2); - kino_reel_scale_segmented_set_delay_by_distance( - new_reel, GPoint(icon_from.size.w, icon_from.size.h / 2)); + kino_reel_scale_segmented_set_delay_by_distance(new_reel, + GPoint(icon_from.size.w, icon_from.size.h / 2)); prv_change_reel(card_timeline_layout, new_reel); - kino_layer_set_callbacks(&card_timeline_layout->icon_layer, (KinoLayerCallbacks) { - .did_stop = prv_card_to_pin_stopped, - }, pin_timeline_layout); + kino_layer_set_callbacks(&card_timeline_layout->icon_layer, + (KinoLayerCallbacks){ + .did_stop = prv_card_to_pin_stopped, + }, + pin_timeline_layout); kino_layer_play(&card_timeline_layout->icon_layer); // for now, use the card icon for the entire animation, so hide the tiny icon @@ -198,16 +200,18 @@ static void prv_up_down_stopped(Animation *animation, bool finished, void *conte } } -Animation *timeline_layout_create_up_down_animation( - TimelineLayout *layout, const GRect *from, const GRect *to, const GRect *icon_from, - const GRect *icon_to, uint32_t duration, InterpolateInt64Function interpolate) { +Animation *timeline_layout_create_up_down_animation(TimelineLayout *layout, const GRect *from, + const GRect *to, const GRect *icon_from, + const GRect *icon_to, uint32_t duration, + InterpolateInt64Function interpolate) { KinoReel *from_reel = kino_reel_create_with_resource_system(layout->icon_res_info.res_app_num, layout->icon_res_info.res_id); if (from_reel) { - GPoint target = (GPoint) { - .x = icon_from->size.w / 2, // pull from the middle - .y = (icon_to->origin.y > icon_from->origin.y) ? // if going up, pull from the top - icon_from->size.h : 0, // else pull from the bottom + GPoint target = (GPoint){ + .x = icon_from->size.w / 2, // pull from the middle + .y = (icon_to->origin.y > icon_from->origin.y) ? // if going up, pull from the top + icon_from->size.h + : 0, // else pull from the bottom }; const bool take_ownership = true; @@ -232,8 +236,10 @@ Animation *timeline_layout_create_up_down_animation( Animation *animation = property_animation_get_animation(property_animation); animation_set_duration(animation, duration); animation_set_custom_interpolation(animation, interpolate); - animation_set_handlers(animation, (AnimationHandlers) { - .stopped = prv_up_down_stopped, - }, layout); + animation_set_handlers(animation, + (AnimationHandlers){ + .stopped = prv_up_down_stopped, + }, + layout); return animation; } diff --git a/src/fw/services/timeline/timeline_resources.c b/src/fw/services/timeline/timeline_resources.c index 82fcf1cbc4..2f399e6a09 100644 --- a/src/fw/services/timeline/timeline_resources.c +++ b/src/fw/services/timeline/timeline_resources.c @@ -61,14 +61,14 @@ T_STATIC bool prv_validate_lut(ResAppNum res_app_num) { } T_STATIC uint32_t prv_get_app_resource_id(ResAppNum res_app_num, TimelineResourceId timeline_id, - TimelineResourceSize size) { + TimelineResourceSize size) { // Load the entry from timeline resource lookup table uint32_t id; const uint32_t row = sizeof(TimelineLutEntry) * timeline_id; const uint32_t col = size * sizeof(id); const uint32_t offset = row + col + TLUT_DATA_OFFSET; - const size_t bytes_read = sys_resource_load_range(res_app_num, TLUT_RESOURCE_ID, offset, - (uint8_t*)&id, sizeof(id)); + const size_t bytes_read = + sys_resource_load_range(res_app_num, TLUT_RESOURCE_ID, offset, (uint8_t *)&id, sizeof(id)); return (bytes_read == sizeof(id)) ? id : (uint32_t)RESOURCE_ID_INVALID; } @@ -86,9 +86,9 @@ static bool prv_get_sys_resource(TimelineResourceId timeline_id, TimelineResourc const bool success = (res_id != RESOURCE_ID_INVALID); if (success && res_info) { - *res_info = (AppResourceInfo) { - .res_app_num = SYSTEM_APP, - .res_id = res_id, + *res_info = (AppResourceInfo){ + .res_app_num = SYSTEM_APP, + .res_id = res_id, }; } @@ -110,9 +110,9 @@ bool timeline_resources_get_id_system(TimelineResourceId timeline_id, TimelineRe } else if (prv_validate_lut(res_app_num)) { const uint32_t res_id = prv_get_app_resource_id(res_app_num, timeline_id, size); if (res_id != RESOURCE_ID_INVALID) { - const AppResourceInfo res_info = (AppResourceInfo) { - .res_app_num = res_app_num, - .res_id = res_id, + const AppResourceInfo res_info = (AppResourceInfo){ + .res_app_num = res_app_num, + .res_id = res_id, }; if (prv_is_app_published_resource_valid(&res_info)) { if (res_info_out) { @@ -149,9 +149,9 @@ void timeline_resources_get_id(const TimelineResourceInfo *timeline_res, Timelin } // Only try to load icon if app was built with an SDK that supports it - const Version first_pbw_icon_version = (Version) { - .major = TIMELINE_RESOURCE_PBW_SUPPORT_FIRST_SDK_VERSION_MAJOR, - .minor = TIMELINE_RESOURCE_PBW_SUPPORT_FIRST_SDK_VERSION_MINOR, + const Version first_pbw_icon_version = (Version){ + .major = TIMELINE_RESOURCE_PBW_SUPPORT_FIRST_SDK_VERSION_MAJOR, + .minor = TIMELINE_RESOURCE_PBW_SUPPORT_FIRST_SDK_VERSION_MINOR, }; if (version_compare(entry.sdk_version, first_pbw_icon_version) < 0) { goto fail; @@ -185,7 +185,7 @@ DEFINE_SYSCALL(void, sys_timeline_resources_get_id, const TimelineResourceInfo * } if (!timeline_res || !res_info || (size >= TimelineResourceSizeCount)) { if (res_info) { - *res_info = (AppResourceInfo) {0}; + *res_info = (AppResourceInfo){0}; } return; } diff --git a/src/fw/services/timeline/weather_layout.c b/src/fw/services/timeline/weather_layout.c index 01c1f64d90..4c9e129849 100644 --- a/src/fw/services/timeline/weather_layout.c +++ b/src/fw/services/timeline/weather_layout.c @@ -15,37 +15,30 @@ #include "pbl/util/size.h" #include "pbl/util/string.h" -#define WEATHER_CARD_TITLE_LENGTH 30 // We're limited to one line for this layout +#define WEATHER_CARD_TITLE_LENGTH 30 // We're limited to one line for this layout ////////////////////////////////////////// // Card Mode ////////////////////////////////////////// -#define CARD_MARGIN_TOP \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ PBL_IF_RECT_ELSE(3, 8), \ - /* medium */ PBL_IF_RECT_ELSE(3, 8), \ - /* large */ 12, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* extralarge */ 12 \ - ) - -#define IF_ICON_AT_TOP_ELSE(at_top, if_not) \ - PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, \ - /* This is the same as Medium until Small is designed */ \ - /* small */ PBL_IF_RECT_ELSE(if_not, at_top), \ - /* medium */ PBL_IF_RECT_ELSE(if_not, at_top), \ - /* large */ at_top, \ - /* This is the same as Large until ExtraLarge is designed */ \ - /* extralarge */ at_top \ - ) +#define CARD_MARGIN_TOP \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ PBL_IF_RECT_ELSE(3, 8), /* medium */ PBL_IF_RECT_ELSE(3, 8), /* large */ \ + 12, /* This is the same as Large until ExtraLarge is designed */ /* extralarge */ 12) + +#define IF_ICON_AT_TOP_ELSE(at_top, if_not) \ + PREFERRED_CONTENT_SIZE_SWITCH( \ + PreferredContentSizeDefault, /* This is the same as Medium until Small is designed */ \ + /* small */ PBL_IF_RECT_ELSE(if_not, at_top), /* medium */ PBL_IF_RECT_ELSE(if_not, at_top), \ + /* large */ at_top, /* This is the same as Large until ExtraLarge is designed */ \ + /* extralarge */ at_top) #define CARD_MARGIN_BOTTOM PBL_IF_RECT_ELSE(7, 0) static bool prv_should_display_time(const LayoutLayer *layout) { - const int display_time = attribute_get_uint8(layout->attributes, AttributeIdDisplayTime, - WeatherTimeType_Pin); + const int display_time = + attribute_get_uint8(layout->attributes, AttributeIdDisplayTime, WeatherTimeType_Pin); return (display_time == WeatherTimeType_Pin); } @@ -80,98 +73,102 @@ static void prv_body_header_update(const LayoutLayer *layout_ref, static GTextNode *prv_card_view_constructor(TimelineLayout *timeline_layout) { static const LayoutNodeTextDynamicConfig s_title_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_title_update, - .buffer_size = WEATHER_CARD_TITLE_LENGTH, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, - .text.fixed_lines = 1, // title fixed lines - .text.alignment = LayoutTextAlignment_Center, - .text.extent.margin.h = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - //! @note this is the same as Medium until Small is designed - /* small */ PBL_IF_RECT_ELSE(2, 0), - /* medium */ PBL_IF_RECT_ELSE(2, 0), - /* large */ 1, - //! @note this is the same as Large until ExtraLarge is designed - /* extralarge */ 1), // title margin height + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_title_update, + .buffer_size = WEATHER_CARD_TITLE_LENGTH, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, + .text.fixed_lines = 1, // title fixed lines + .text.alignment = LayoutTextAlignment_Center, + .text.extent.margin.h = PREFERRED_CONTENT_SIZE_SWITCH( + PreferredContentSizeDefault, + //! @note this is the same as Medium until Small is designed + /* small */ PBL_IF_RECT_ELSE(2, 0), + /* medium */ PBL_IF_RECT_ELSE(2, 0), + /* large */ 1, + //! @note this is the same as Large until ExtraLarge is designed + /* extralarge */ 1), // title margin height }; static const LayoutNodeTextAttributeConfig s_subtitle_config = { - .attr_id = AttributeIdSubtitle, - .text.font_key = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - //! @note this is the same as Medium until Small is designed - /* small */ FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, - /* medium */ FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, - /* large */ FONT_KEY_LECO_36_BOLD_NUMBERS, - //! @note this is the same as Large until ExtraLarge is designed - /* extralarge */ FONT_KEY_LECO_36_BOLD_NUMBERS), - .text.fixed_lines = 1, // subtitle fixed lines - .text.alignment = LayoutTextAlignment_Center, - .text.extent.margin.h = IF_ICON_AT_TOP_ELSE(1, 9), // subtitle margin height + .attr_id = AttributeIdSubtitle, + .text.font_key = PREFERRED_CONTENT_SIZE_SWITCH( + PreferredContentSizeDefault, + //! @note this is the same as Medium until Small is designed + /* small */ FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, + /* medium */ FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, + /* large */ FONT_KEY_LECO_36_BOLD_NUMBERS, + //! @note this is the same as Large until ExtraLarge is designed + /* extralarge */ FONT_KEY_LECO_36_BOLD_NUMBERS), + .text.fixed_lines = 1, // subtitle fixed lines + .text.alignment = LayoutTextAlignment_Center, + .text.extent.margin.h = IF_ICON_AT_TOP_ELSE(1, 9), // subtitle margin height }; static const LayoutNodeExtentConfig s_icon_config = { - .node.type = LayoutNodeType_TimelineIcon, - .margin.h = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - //! @note this is the same as Medium until Small is designed - /* small */ 3, - /* medium */ 3, - /* large */ 0, - //! @note this is the same as Large until ExtraLarge is designed - /* extralarge */ 0), // icon margin height + .node.type = LayoutNodeType_TimelineIcon, + .margin.h = PREFERRED_CONTENT_SIZE_SWITCH( + PreferredContentSizeDefault, + //! @note this is the same as Medium until Small is designed + /* small */ 3, + /* medium */ 3, + /* large */ 0, + //! @note this is the same as Large until ExtraLarge is designed + /* extralarge */ 0), // icon margin height }; static const LayoutNodeTextAttributeConfig s_glance_location_config = { - .attr_id = AttributeIdLocationName, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, - .text.fixed_lines = 1, // glance location fixed lines - .text.alignment = LayoutTextAlignment_Center, + .attr_id = AttributeIdLocationName, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, + .text.fixed_lines = 1, // glance location fixed lines + .text.alignment = LayoutTextAlignment_Center, }; static const LayoutNodeConfig s_page_break_config = { - .type = LayoutNodeType_TimelinePageBreak, + .type = LayoutNodeType_TimelinePageBreak, }; static const LayoutNodeTextAttributeConfig s_location_config = { - .attr_id = AttributeIdLocationName, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Header, - .text.line_spacing_delta = 2, // location line spacing delta - .text.extent.margin.h = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - //! @note this is the same as Medium until Small is designed - /* small */ 13, - /* medium */ 13, - /* large */ 11, - //! @note this is the same as Large until ExtraLarge is designed - /* extralarge */ 11), // location margin height + .attr_id = AttributeIdLocationName, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Header, + .text.line_spacing_delta = 2, // location line spacing delta + .text.extent.margin.h = PREFERRED_CONTENT_SIZE_SWITCH( + PreferredContentSizeDefault, + //! @note this is the same as Medium until Small is designed + /* small */ 13, + /* medium */ 13, + /* large */ 11, + //! @note this is the same as Large until ExtraLarge is designed + /* extralarge */ 11), // location margin height }; static const LayoutNodeTextDynamicConfig s_body_header_config = { - .text.extent.node.type = LayoutNodeType_TextDynamic, - .update = prv_body_header_update, - .buffer_size = TIME_STRING_REQUIRED_LENGTH, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_ParagraphHeader, - .text.extent.margin.h = TIMELINE_CARD_BODY_HEADER_MARGIN_HEIGHT, // body header margin height + .text.extent.node.type = LayoutNodeType_TextDynamic, + .update = prv_body_header_update, + .buffer_size = TIME_STRING_REQUIRED_LENGTH, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_ParagraphHeader, + .text.extent.margin.h = TIMELINE_CARD_BODY_HEADER_MARGIN_HEIGHT, // body header margin height }; static const LayoutNodeTextAttributeConfig s_body_config = { - .attr_id = AttributeIdBody, - .text.style = LayoutContentSizeDefault, - .text.style_font = TextStyleFont_Body, - .text.line_spacing_delta = -2, // body line spacing delta - .text.extent.margin.h = TIMELINE_CARD_BODY_MARGIN_HEIGHT, // body margin height + .attr_id = AttributeIdBody, + .text.style = LayoutContentSizeDefault, + .text.style_font = TextStyleFont_Body, + .text.line_spacing_delta = -2, // body line spacing delta + .text.extent.margin.h = TIMELINE_CARD_BODY_MARGIN_HEIGHT, // body margin height }; - static const LayoutNodeConfig * const s_vertical_config_nodes[] = { - IF_ICON_AT_TOP_ELSE(&s_icon_config.node, &s_title_config.text.extent.node), - IF_ICON_AT_TOP_ELSE(&s_title_config.text.extent.node, &s_subtitle_config.text.extent.node), - IF_ICON_AT_TOP_ELSE(&s_subtitle_config.text.extent.node, &s_icon_config.node), - &s_glance_location_config.text.extent.node, - &s_page_break_config, - &s_location_config.text.extent.node, - &s_body_header_config.text.extent.node, - &s_body_config.text.extent.node, + static const LayoutNodeConfig *const s_vertical_config_nodes[] = { + IF_ICON_AT_TOP_ELSE(&s_icon_config.node, &s_title_config.text.extent.node), + IF_ICON_AT_TOP_ELSE(&s_title_config.text.extent.node, &s_subtitle_config.text.extent.node), + IF_ICON_AT_TOP_ELSE(&s_subtitle_config.text.extent.node, &s_icon_config.node), + &s_glance_location_config.text.extent.node, + &s_page_break_config, + &s_location_config.text.extent.node, + &s_body_header_config.text.extent.node, + &s_body_config.text.extent.node, }; static const LayoutNodeVerticalConfig s_vertical_config = { - .container.extent.node.type = LayoutNodeType_Vertical, - .container.num_nodes = ARRAY_LENGTH(s_vertical_config_nodes), - .container.nodes = (LayoutNodeConfig **)&s_vertical_config_nodes, - .container.extent.offset.y = CARD_MARGIN_TOP, - .container.extent.margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, + .container.extent.node.type = LayoutNodeType_Vertical, + .container.num_nodes = ARRAY_LENGTH(s_vertical_config_nodes), + .container.nodes = (LayoutNodeConfig **)&s_vertical_config_nodes, + .container.extent.offset.y = CARD_MARGIN_TOP, + .container.extent.margin.h = CARD_MARGIN_TOP + CARD_MARGIN_BOTTOM, }; return timeline_layout_create_card_view_from_config(timeline_layout, @@ -190,20 +187,20 @@ LayoutLayer *weather_layout_create(const LayoutLayerConfig *config) { WeatherLayout *layout = task_zalloc_check(sizeof(WeatherLayout)); static const TimelineLayoutImpl s_timeline_layout_impl = { - .attributes = { AttributeIdTitle, AttributeIdSubtitle }, - .default_colors = { { .argb = GColorBlackARGB8 }, - { .argb = GColorClearARGB8 }, - { .argb = GColorLightGrayARGB8 } }, - .default_icon = TIMELINE_RESOURCE_TIMELINE_WEATHER, - .card_icon_align = GAlignCenter, - .card_icon_size = PREFERRED_CONTENT_SIZE_SWITCH(PreferredContentSizeDefault, - //! @note this is the same as Medium until Small is designed - /* small */ TimelineResourceSizeSmall, - /* medium */ TimelineResourceSizeSmall, - /* large */ TimelineResourceSizeLarge, - //! @note this is the same as Large until ExtraLarge is designed - /* extralarge */ TimelineResourceSizeLarge), - .card_view_constructor = prv_card_view_constructor, + .attributes = {AttributeIdTitle, AttributeIdSubtitle}, + .default_colors = + {{.argb = GColorBlackARGB8}, {.argb = GColorClearARGB8}, {.argb = GColorLightGrayARGB8}}, + .default_icon = TIMELINE_RESOURCE_TIMELINE_WEATHER, + .card_icon_align = GAlignCenter, + .card_icon_size = PREFERRED_CONTENT_SIZE_SWITCH( + PreferredContentSizeDefault, + //! @note this is the same as Medium until Small is designed + /* small */ TimelineResourceSizeSmall, + /* medium */ TimelineResourceSizeSmall, + /* large */ TimelineResourceSizeLarge, + //! @note this is the same as Large until ExtraLarge is designed + /* extralarge */ TimelineResourceSizeLarge), + .card_view_constructor = prv_card_view_constructor, }; timeline_layout_init((TimelineLayout *)layout, config, &s_timeline_layout_impl); diff --git a/src/fw/services/timezone_database/service.c b/src/fw/services/timezone_database/service.c index b5e238e635..70e50bbfaa 100644 --- a/src/fw/services/timezone_database/service.c +++ b/src/fw/services/timezone_database/service.c @@ -44,7 +44,7 @@ typedef struct PACKED { } TimezoneDatabaseFlashHeader; #define TZDATA_HEADER_BYTES (sizeof(TimezoneDatabaseFlashHeader)) -#define TIMEZONE_CITY_LENGTH 15 // maximum length of the city name in timezone database +#define TIMEZONE_CITY_LENGTH 15 // maximum length of the city name in timezone database #define REGION_BYTES (1 + TIMEZONE_CITY_LENGTH + 2 + 5 + 1) #define DST_RULE_BYTES (sizeof(TimezoneDSTRule)) @@ -54,46 +54,36 @@ typedef struct PACKED { #define LINK_NAME_LENGTH 33 #define LINK_BYTES (LINK_REGION_LENGTH + LINK_NAME_LENGTH) - //! Names for all the continents we support. The timezone database stores continents as indexes //! into this constant array. -const char * const CONTINENT_NAMES[] = { "Africa", - "America", - "Antarctica", - "Asia", - "Atlantic", - "Australia", - "Europe", - "Indian", - "Pacific", - "Etc"}; - +const char *const CONTINENT_NAMES[] = {"Africa", "America", "Antarctica", "Asia", "Atlantic", + "Australia", "Europe", "Indian", "Pacific", "Etc"}; //! Helper function to curry out some common arguments to the resource reads in this file. static bool prv_database_read(uint32_t offset, void *data, size_t num_bytes) { - return resource_load_byte_range_system(SYSTEM_APP, RESOURCE_ID_TIMEZONE_DATABASE, - offset, data, num_bytes) == num_bytes; + return resource_load_byte_range_system(SYSTEM_APP, RESOURCE_ID_TIMEZONE_DATABASE, offset, data, + num_bytes) == num_bytes; } //! Note! This count includes rule 0 which isn't actually stored in the database. static int prv_get_dst_rule_count(void) { uint16_t dst_rule_count; - prv_database_read(offsetof(TimezoneDatabaseFlashHeader, dst_rule_count), - &dst_rule_count, sizeof(dst_rule_count)); + prv_database_read(offsetof(TimezoneDatabaseFlashHeader, dst_rule_count), &dst_rule_count, + sizeof(dst_rule_count)); return dst_rule_count; } static int prv_get_link_count(void) { uint16_t link_count; - prv_database_read(offsetof(TimezoneDatabaseFlashHeader, link_count), - &link_count, sizeof(link_count)); + prv_database_read(offsetof(TimezoneDatabaseFlashHeader, link_count), &link_count, + sizeof(link_count)); return link_count; } int timezone_database_get_region_count(void) { uint16_t region_count; - prv_database_read(offsetof(TimezoneDatabaseFlashHeader, region_count), - ®ion_count, sizeof(region_count)); + prv_database_read(offsetof(TimezoneDatabaseFlashHeader, region_count), ®ion_count, + sizeof(region_count)); return region_count; } @@ -106,24 +96,24 @@ bool timezone_database_load_region_info(uint16_t region_id, TimezoneInfo *tz_inf //! Struct for reading data from a raw database of timezone information struct PACKED { - int16_t gmt_offset_minutes; //!< timezone offset from UTC time (in minutes) - char tz_abbr[TZ_LEN - 1]; //!< timezone abbreviation (without terminating nul) - int8_t dst_id; //!< daylight savings time index identifier + int16_t gmt_offset_minutes; //!< timezone offset from UTC time (in minutes) + char tz_abbr[TZ_LEN - 1]; //!< timezone abbreviation (without terminating nul) + int8_t dst_id; //!< daylight savings time index identifier } tz_data; // Load the timezone information for the region_id, excluding the country + city_name itself if (!prv_database_read(region_offset + 1 + TIMEZONE_CITY_LENGTH, &tz_data, sizeof(tz_data))) { - *tz_info = (TimezoneInfo) { .dst_id = 0 }; + *tz_info = (TimezoneInfo){.dst_id = 0}; return false; } - *tz_info = (TimezoneInfo) { - .dst_id = tz_data.dst_id, - .timezone_id = region_id, - .tm_gmtoff = tz_data.gmt_offset_minutes * SECONDS_PER_MINUTE, - // Leave the dst_start and dst_end timestamps uninitialized - .dst_start = 0, - .dst_end = 0 + *tz_info = (TimezoneInfo){ + .dst_id = tz_data.dst_id, + .timezone_id = region_id, + .tm_gmtoff = tz_data.gmt_offset_minutes * SECONDS_PER_MINUTE, + // Leave the dst_start and dst_end timestamps uninitialized + .dst_start = 0, + .dst_end = 0 }; memcpy(tz_info->tm_zone, tz_data.tz_abbr, sizeof(tz_data.tz_abbr)); @@ -182,7 +172,7 @@ bool timezone_database_load_dst_rule(uint8_t dst_id, TimezoneDSTRule *start, Tim // First half of the DST rule pair if (!prv_database_read(dst_rule_pair_offset, start, DST_RULE_BYTES) || !prv_database_read(dst_rule_pair_offset + DST_RULE_BYTES, end, DST_RULE_BYTES)) { - PBL_LOG_WRN("Failed to load timezone for DST ID %"PRIu8, dst_id); + PBL_LOG_WRN("Failed to load timezone for DST ID %" PRIu8, dst_id); return false; } @@ -225,7 +215,7 @@ static int prv_search_links_by_name(const char *region_name, int region_name_len for (int i = 0; i < link_count; i++) { const int link_offset = link_section_offset + (i * LINK_BYTES); - char link_name[LINK_NAME_LENGTH + 1]; // + max length + null terminator + char link_name[LINK_NAME_LENGTH + 1]; // + max length + null terminator prv_database_read(link_offset + LINK_REGION_LENGTH, link_name, LINK_NAME_LENGTH); link_name[sizeof(link_name) - 1] = '\0'; diff --git a/src/fw/services/touch/touch.c b/src/fw/services/touch/touch.c index 5fba226015..29e2904e28 100644 --- a/src/fw/services/touch/touch.c +++ b/src/fw/services/touch/touch.c @@ -79,11 +79,8 @@ static void prv_remove_subscriber_cb(PebbleTask task) { } void touch_init(void) { - - event_service_init(PEBBLE_TOUCH_EVENT, &prv_add_subscriber_cb, - &prv_remove_subscriber_cb); - event_service_init(PEBBLE_GESTURE_EVENT, &prv_add_subscriber_cb, - &prv_remove_subscriber_cb); + event_service_init(PEBBLE_TOUCH_EVENT, &prv_add_subscriber_cb, &prv_remove_subscriber_cb); + event_service_init(PEBBLE_GESTURE_EVENT, &prv_add_subscriber_cb, &prv_remove_subscriber_cb); } bool touch_nav_enabled(void) { @@ -215,28 +212,28 @@ void touch_set_system_hold(bool held) { static void prv_put_touch_event(TouchEventType type, int16_t x, int16_t y) { PebbleEvent e = { - .type = PEBBLE_TOUCH_EVENT, - .touch = { - .event = { - .type = type, - .x = x, - .y = y, + .type = PEBBLE_TOUCH_EVENT, + .touch = { + .event = { + .type = type, + .x = x, + .y = y, + }, }, - }, }; event_put(&e); } static void prv_put_gesture_event(GestureEventType gesture, int16_t x, int16_t y) { PebbleEvent e = { - .type = PEBBLE_GESTURE_EVENT, - .gesture = { - .event = { - .type = gesture, - .x = x, - .y = y, + .type = PEBBLE_GESTURE_EVENT, + .gesture = { + .event = { + .type = gesture, + .x = x, + .y = y, + }, }, - }, }; event_put(&e); } diff --git a/src/fw/services/touch/touch_nav_service.c b/src/fw/services/touch/touch_nav_service.c index 267e0ff8f9..3ba521fb9c 100644 --- a/src/fw/services/touch/touch_nav_service.c +++ b/src/fw/services/touch/touch_nav_service.c @@ -123,13 +123,13 @@ static void prv_release_system_hold(void *ctx) { } static const TouchNavTxnOps s_txn_ops = { - .persist = prv_persist, - .kernel_subscribe = prv_kernel_subscribe, - .take_system_hold = prv_take_system_hold, - .synthesize_liftoff = prv_synthesize_liftoff, - .kernel_cancel_reset_unsub = prv_kernel_cancel_reset_unsub, - .app_unsubscribe = prv_app_unsubscribe, - .release_system_hold = prv_release_system_hold, + .persist = prv_persist, + .kernel_subscribe = prv_kernel_subscribe, + .take_system_hold = prv_take_system_hold, + .synthesize_liftoff = prv_synthesize_liftoff, + .kernel_cancel_reset_unsub = prv_kernel_cancel_reset_unsub, + .app_unsubscribe = prv_app_unsubscribe, + .release_system_hold = prv_release_system_hold, }; void touch_nav_set_enabled(bool enable) { diff --git a/src/fw/services/touch/touch_session.c b/src/fw/services/touch/touch_session.c index 6fb8356e11..2272a219e2 100644 --- a/src/fw/services/touch/touch_session.c +++ b/src/fw/services/touch/touch_session.c @@ -48,8 +48,7 @@ bool touch_session_is_active(void) { } // A focused modal just demanded attention (notification, alarm): the // immediate touch response is intentional. - if (modal_manager_get_enabled() && - !(modal_manager_get_properties() & ModalProperty_Unfocused)) { + if (modal_manager_get_enabled() && !(modal_manager_get_properties() & ModalProperty_Unfocused)) { return true; } // A lit backlight means something (button, shake, wake gesture) already diff --git a/src/fw/services/vibe_pattern/service.c b/src/fw/services/vibe_pattern/service.c index c7eef19188..f7c27090e8 100644 --- a/src/fw/services/vibe_pattern/service.c +++ b/src/fw/services/vibe_pattern/service.c @@ -34,13 +34,13 @@ PBL_LOG_MODULE_DEFINE(service_vibe_pattern, CONFIG_SERVICE_VIBE_PATTERN_LOG_LEVE // Vibe Log Info debugging toggle is on so field captures include them. #if !defined(CONFIG_RECOVERY_FW) extern bool shell_prefs_get_vibe_log_info_enabled(void); -#define VIBE_PATTERN_LOG(fmt, ...) \ - do { \ - if (shell_prefs_get_vibe_log_info_enabled()) { \ - PBL_LOG_INFO(fmt, ##__VA_ARGS__); \ - } else { \ - PBL_LOG_DBG(fmt, ##__VA_ARGS__); \ - } \ +#define VIBE_PATTERN_LOG(fmt, ...) \ + do { \ + if (shell_prefs_get_vibe_log_info_enabled()) { \ + PBL_LOG_INFO(fmt, ##__VA_ARGS__); \ + } else { \ + PBL_LOG_DBG(fmt, ##__VA_ARGS__); \ + } \ } while (0) #else #define VIBE_PATTERN_LOG(fmt, ...) PBL_LOG_DBG(fmt, ##__VA_ARGS__) @@ -77,7 +77,7 @@ DEFINE_SYSCALL(bool, sys_vibe_history_was_vibrating, uint64_t time_search) { rc = true; break; } - node = (VibeHistory*)list_get_next((ListNode*)node); + node = (VibeHistory *)list_get_next((ListNode *)node); } pbl_mutex_unlock(&s_vibe_history_mutex); return rc; @@ -91,7 +91,7 @@ static void prv_vibe_history_clear(uint64_t cutoff) { if (cutoff != HISTORY_CLEAR_ALL && vibe->time_end >= cutoff) { break; } - s_vibe_history = (VibeHistory*)list_get_next((ListNode*)vibe); + s_vibe_history = (VibeHistory *)list_get_next((ListNode *)vibe); kernel_free(vibe); } } @@ -116,7 +116,7 @@ static void prv_vibe_history_start_event(void) { s_vibe_history_enabled = false; return; } - list_init((ListNode*)vibe); + list_init((ListNode *)vibe); time_t s; uint16_t ms; rtc_get_time_ms(&s, &ms); @@ -127,7 +127,7 @@ static void prv_vibe_history_start_event(void) { if (s_vibe_history == NULL) { s_vibe_history = vibe; } else { - list_append((ListNode*)s_vibe_history, (ListNode*)vibe); + list_append((ListNode *)s_vibe_history, (ListNode *)vibe); } prv_vibe_history_clear(vibe->time_start - MAX_HISTORY_MS); pbl_mutex_unlock(&s_vibe_history_mutex); @@ -148,7 +148,7 @@ static void prv_vibe_history_end_event(void) { rtc_get_time_ms(&s, &ms); pbl_mutex_lock(&s_vibe_history_mutex, PBL_FOREVER); - VibeHistory *vibe = (VibeHistory*)list_get_tail((ListNode*)s_vibe_history); + VibeHistory *vibe = (VibeHistory *)list_get_tail((ListNode *)s_vibe_history); if (vibe->time_end == END_NOT_SET) { vibe->time_end = ((uint64_t)s) * 1000 + ms; } @@ -158,7 +158,7 @@ static void prv_vibe_history_end_event(void) { typedef struct { ListNode list_node; uint32_t duration_ms; - int32_t strength; + int32_t strength; } VibePatternStep; static const uint32_t MAX_VIBE_DURATION_MS = 10000; @@ -191,10 +191,10 @@ static PBL_MUTEX_DEFINE(s_vibe_pattern_mutex); static VibePatternStep *s_vibe_queue_head = NULL; //! Analytics: Track time-weighted average strength -static uint64_t s_strength_time_product_sum; // Sum of (strength_pct × time_ms) -static RtcTicks s_last_strength_sample_ticks; // Timestamp of last sample -static uint8_t s_last_sampled_strength_pct; // Last strength percentage sampled -static uint32_t s_total_vibe_on_time_ms; // Total vibe on time tracked internally +static uint64_t s_strength_time_product_sum; // Sum of (strength_pct × time_ms) +static RtcTicks s_last_strength_sample_ticks; // Timestamp of last sample +static uint8_t s_last_sampled_strength_pct; // Last strength percentage sampled +static uint32_t s_total_vibe_on_time_ms; // Total vibe on time tracked internally void vibes_init() { s_pattern_in_progress = false; @@ -295,7 +295,7 @@ static uint32_t prv_next_timeout_ms(uint32_t step_duration_ms) { return (uint32_t)(s_pattern_deadline_ms - elapsed_ms); } -static void prv_timer_callback(void* data) { +static void prv_timer_callback(void *data) { if (s_vibe_queue_head == NULL) { PBL_LOG_ERR("Tried to handle a vibe event with a null vibe queue"); return; @@ -305,15 +305,14 @@ static void prv_timer_callback(void* data) { // remove the event I've finished VibePatternStep *removed_node = s_vibe_queue_head; - s_vibe_queue_head = (VibePatternStep*)list_pop_head((ListNode*)s_vibe_queue_head); + s_vibe_queue_head = (VibePatternStep *)list_pop_head((ListNode *)s_vibe_queue_head); kernel_free(removed_node); if (s_vibe_queue_head != NULL) { // move to the next step prv_vibes_set_vibe_strength(s_vibe_queue_head->strength); const uint32_t next_ms = prv_next_timeout_ms(s_vibe_queue_head->duration_ms); - bool success = new_timer_start(s_pattern_timer, next_ms, - prv_timer_callback, NULL, 0 /*flags*/); + bool success = new_timer_start(s_pattern_timer, next_ms, prv_timer_callback, NULL, 0 /*flags*/); PBL_ASSERTN(success); } else { // I'm done with the active pattern @@ -368,7 +367,7 @@ bool prv_vibe_pattern_enqueue_step_raw(uint32_t duration_ms, int32_t strength) { return false; } - list_init((ListNode*)step); + list_init((ListNode *)step); step->duration_ms = MIN(duration_ms, MAX_VIBE_DURATION_MS); step->strength = strength; @@ -377,13 +376,13 @@ bool prv_vibe_pattern_enqueue_step_raw(uint32_t duration_ms, int32_t strength) { if (s_pending_owner != VibePatternOwner_Other) { s_pattern_owner = s_pending_owner; } else { - s_pattern_owner = (pebble_task_get_current() == PebbleTask_App) - ? VibePatternOwner_App : VibePatternOwner_Other; + s_pattern_owner = (pebble_task_get_current() == PebbleTask_App) ? VibePatternOwner_App + : VibePatternOwner_Other; } s_pending_owner = VibePatternOwner_Other; s_vibe_queue_head = step; } else { - list_append((ListNode*)s_vibe_queue_head, (ListNode*)step); + list_append((ListNode *)s_vibe_queue_head, (ListNode *)step); } pbl_mutex_unlock(&s_vibe_pattern_mutex); @@ -396,8 +395,8 @@ DEFINE_SYSCALL(bool, sys_vibe_pattern_enqueue_step_raw, uint32_t duration_ms, in } DEFINE_SYSCALL(bool, sys_vibe_pattern_enqueue_step, uint32_t duration_ms, bool on) { - return prv_vibe_pattern_enqueue_step_raw(duration_ms, on ? s_vibe_strength_default - : VIBE_STRENGTH_OFF); + return prv_vibe_pattern_enqueue_step_raw(duration_ms, + on ? s_vibe_strength_default : VIBE_STRENGTH_OFF); } DEFINE_SYSCALL(void, sys_vibe_pattern_trigger_start, void) { @@ -429,8 +428,7 @@ DEFINE_SYSCALL(void, sys_vibe_pattern_trigger_start, void) { prv_vibes_set_vibe_strength(s_vibe_queue_head->strength); s_pattern_in_progress = true; const uint32_t first_ms = prv_next_timeout_ms(s_vibe_queue_head->duration_ms); - bool success = new_timer_start(s_pattern_timer, first_ms, - prv_timer_callback, NULL, 0 /*flags*/); + bool success = new_timer_start(s_pattern_timer, first_ms, prv_timer_callback, NULL, 0 /*flags*/); PBL_ASSERTN(success); pbl_mutex_unlock(&s_vibe_pattern_mutex); } @@ -442,14 +440,13 @@ static void prv_clear_pattern_locked(void) { unsigned int dropped_steps = 0; while (s_vibe_queue_head) { VibePatternStep *removed_node = s_vibe_queue_head; - s_vibe_queue_head = (VibePatternStep*)list_pop_head((ListNode*)s_vibe_queue_head); + s_vibe_queue_head = (VibePatternStep *)list_pop_head((ListNode *)s_vibe_queue_head); kernel_free(removed_node); dropped_steps++; } // Log whether a pattern was still live and whether the motor was on: a // clear that finds the motor on with no active pattern is a wedged vibe. - VIBE_PATTERN_LOG("vibe_pattern: clear, in_progress=%d, strength=%" PRId32 - ", %u steps dropped", + VIBE_PATTERN_LOG("vibe_pattern: clear, in_progress=%d, strength=%" PRId32 ", %u steps dropped", s_pattern_in_progress, s_vibe_strength, dropped_steps); prv_vibes_set_vibe_strength(VIBE_STRENGTH_OFF); s_pattern_in_progress = false; diff --git a/src/fw/services/vibes/vibe_score.c b/src/fw/services/vibes/vibe_score.c index cb5c60a7e6..cb478ac0b7 100644 --- a/src/fw/services/vibes/vibe_score.c +++ b/src/fw/services/vibes/vibe_score.c @@ -39,8 +39,8 @@ static bool prv_vibe_score_resource_is_valid(ResAppNum app_num, uint32_t resourc uint32_t expected_signature, uint32_t *data_size) { // Load file signature, and check that it matches the expected_signature uint32_t data_signature; - if (!(sys_resource_load_range(app_num, resource_id, 0, (uint8_t*)&data_signature, - sizeof(data_signature)) == sizeof(data_signature) && + if (!(sys_resource_load_range(app_num, resource_id, 0, (uint8_t *)&data_signature, + sizeof(data_signature)) == sizeof(data_signature) && (ntohl(data_signature) == expected_signature))) { return false; } @@ -77,7 +77,7 @@ bool vibe_score_validate(VibeScore *score, uint32_t data_size) { // check exact file size to contain all flexible-sized data for (unsigned int i = 0; i < score->attr_list.num_attributes; i++) { - GenericAttribute * attribute = (GenericAttribute *)((uint8_t *)score + total_size); + GenericAttribute *attribute = (GenericAttribute *)((uint8_t *)score + total_size); total_size += sizeof(GenericAttribute); if (data_size < total_size) { return false; @@ -92,12 +92,10 @@ bool vibe_score_validate(VibeScore *score, uint32_t data_size) { } // check to see all indices point to valid notes - GenericAttribute *notes_attribute = generic_attribute_find_attribute(&score->attr_list, - VibeAttributeId_Notes, - score->attr_list_size); - GenericAttribute *pattern_attribute = generic_attribute_find_attribute(&score->attr_list, - VibeAttributeId_Pattern, - score->attr_list_size); + GenericAttribute *notes_attribute = generic_attribute_find_attribute( + &score->attr_list, VibeAttributeId_Notes, score->attr_list_size); + GenericAttribute *pattern_attribute = generic_attribute_find_attribute( + &score->attr_list, VibeAttributeId_Pattern, score->attr_list_size); if (!notes_attribute || !pattern_attribute) { return false; } @@ -114,9 +112,8 @@ bool vibe_score_validate(VibeScore *score, uint32_t data_size) { } } - GenericAttribute *repeat_delay_attribute = - generic_attribute_find_attribute(&score->attr_list, VibeAttributeId_RepeatDelay, - score->attr_list_size); + GenericAttribute *repeat_delay_attribute = generic_attribute_find_attribute( + &score->attr_list, VibeAttributeId_RepeatDelay, score->attr_list_size); if (repeat_delay_attribute) { if (repeat_delay_attribute->length != sizeof(uint16_t)) { return false; @@ -129,8 +126,7 @@ bool vibe_score_validate(VibeScore *score, uint32_t data_size) { return true; } -VibeScore *vibe_score_create_with_resource_system(ResAppNum app_num, - uint32_t resource_id) { +VibeScore *vibe_score_create_with_resource_system(ResAppNum app_num, uint32_t resource_id) { uint32_t data_size; if (!prv_vibe_score_resource_is_valid(app_num, resource_id, VIBE_SIGNATURE, &data_size)) { return NULL; @@ -138,7 +134,7 @@ VibeScore *vibe_score_create_with_resource_system(ResAppNum app_num, VibeScore *vibe_score = applib_zalloc(data_size); if (!vibe_score || sys_resource_load_range(app_num, resource_id, VIBE_DATA_OFFSET, - (uint8_t*)vibe_score, data_size) != data_size) { + (uint8_t *)vibe_score, data_size) != data_size) { applib_free(vibe_score); return NULL; } @@ -156,12 +152,10 @@ unsigned int vibe_score_get_duration_ms(VibeScore *score) { if (!score) { return 0; } - GenericAttribute *notes_attribute = generic_attribute_find_attribute(&score->attr_list, - VibeAttributeId_Notes, - score->attr_list_size); - GenericAttribute *pattern_attribute = generic_attribute_find_attribute(&score->attr_list, - VibeAttributeId_Pattern, - score->attr_list_size); + GenericAttribute *notes_attribute = generic_attribute_find_attribute( + &score->attr_list, VibeAttributeId_Notes, score->attr_list_size); + GenericAttribute *pattern_attribute = generic_attribute_find_attribute( + &score->attr_list, VibeAttributeId_Pattern, score->attr_list_size); PBL_ASSERTN(notes_attribute && pattern_attribute); unsigned int duration_ms = 0; @@ -180,11 +174,10 @@ unsigned int vibe_score_get_repeat_delay_ms(VibeScore *score) { if (!score) { return 0; } - GenericAttribute *repeat_delay_attribute = - generic_attribute_find_attribute(&score->attr_list, VibeAttributeId_RepeatDelay, - score->attr_list_size); + GenericAttribute *repeat_delay_attribute = generic_attribute_find_attribute( + &score->attr_list, VibeAttributeId_RepeatDelay, score->attr_list_size); if (repeat_delay_attribute) { - uint16_t *repeat_delay = (uint16_t *) repeat_delay_attribute->data; + uint16_t *repeat_delay = (uint16_t *)repeat_delay_attribute->data; return *repeat_delay; } return 0; @@ -192,12 +185,10 @@ unsigned int vibe_score_get_repeat_delay_ms(VibeScore *score) { void vibe_score_do_vibe(VibeScore *score) { PBL_ASSERTN(score); - GenericAttribute *notes_attribute = generic_attribute_find_attribute(&score->attr_list, - VibeAttributeId_Notes, - score->attr_list_size); - GenericAttribute *pattern_attribute = generic_attribute_find_attribute(&score->attr_list, - VibeAttributeId_Pattern, - score->attr_list_size); + GenericAttribute *notes_attribute = generic_attribute_find_attribute( + &score->attr_list, VibeAttributeId_Notes, score->attr_list_size); + GenericAttribute *pattern_attribute = generic_attribute_find_attribute( + &score->attr_list, VibeAttributeId_Pattern, score->attr_list_size); PBL_ASSERTN(notes_attribute && pattern_attribute); VibeNote *note_list = prv_vibe_score_get_note_list(notes_attribute); diff --git a/src/fw/services/vibes/vibe_score_info.c b/src/fw/services/vibes/vibe_score_info.c index fa073c607e..4a68eaa3c7 100644 --- a/src/fw/services/vibes/vibe_score_info.c +++ b/src/fw/services/vibes/vibe_score_info.c @@ -15,7 +15,8 @@ typedef enum AlertType { AlertType_AlarmsLPM = 1 << 3, AlertType_Hourly = 1 << 4, AlertType_OnDisconnect = 1 << 5, - AlertType_All = AlertType_Notifications | AlertType_Calls | AlertType_Alarms | AlertType_Hourly | AlertType_OnDisconnect, + AlertType_All = AlertType_Notifications | AlertType_Calls | AlertType_Alarms | AlertType_Hourly | + AlertType_OnDisconnect, } AlertType; typedef struct { @@ -25,11 +26,8 @@ typedef struct { const uint32_t resource_id; } VibeScoreInfo; -#define VIBE_DEF(identifier, enum_name, name_str, alert_types_arg, res_id)\ - { .id = identifier, \ - .name = name_str, \ - .alert_types = alert_types_arg, \ - .resource_id = res_id }, +#define VIBE_DEF(identifier, enum_name, name_str, alert_types_arg, res_id) \ + {.id = identifier, .name = name_str, .alert_types = alert_types_arg, .resource_id = res_id}, static const VibeScoreInfo S_VIBE_MAP[] = { #include "vibes.def" @@ -109,7 +107,6 @@ VibeScoreId vibe_score_info_cycle_next(VibeClient client, VibeScoreId curr_id) { bool vibe_score_info_is_valid(VibeScoreId id) { const VibeScoreInfo *info = prv_vibe_score_find_info(id); - return (id != VibeScoreId_Invalid) && - info && + return (id != VibeScoreId_Invalid) && info && ((id == VibeScoreId_Disabled) || (info->resource_id != RESOURCE_ID_INVALID)); } diff --git a/src/fw/services/voice/transcription.c b/src/fw/services/voice/transcription.c index 878c098cdf..25b41d0921 100644 --- a/src/fw/services/voice/transcription.c +++ b/src/fw/services/voice/transcription.c @@ -16,8 +16,7 @@ static bool prv_validate_word(utf8_t *str, uint16_t size) { } bool transcription_validate(const Transcription *transcription, size_t size) { - if (!transcription || - (size <= sizeof(Transcription)) || + if (!transcription || (size <= sizeof(Transcription)) || (transcription->type != TranscriptionTypeSentenceList)) { return false; } @@ -28,7 +27,7 @@ bool transcription_validate(const Transcription *transcription, size_t size) { const TranscriptionSentence *sentence = transcription->sentences; for (size_t i = 0; i < transcription->sentence_count; i++) { - cursor = (uint8_t *) sentence->words; + cursor = (uint8_t *)sentence->words; // Check that sentence header fits into buffer and length is valid if ((cursor >= end) || (sentence->word_count == 0)) { @@ -36,8 +35,8 @@ bool transcription_validate(const Transcription *transcription, size_t size) { } for (size_t j = 0; j < sentence->word_count; j++) { - TranscriptionWord *word = (TranscriptionWord *) cursor; - cursor = (uint8_t *) word->data; + TranscriptionWord *word = (TranscriptionWord *)cursor; + cursor = (uint8_t *)word->data; // Check that word header fits into buffer and length is valid if ((cursor >= end) || (word->length == 0) || (word->data + word->length > end) || @@ -54,8 +53,7 @@ bool transcription_validate(const Transcription *transcription, size_t size) { } void *transcription_iterate_sentences(const TranscriptionSentence *sentence, size_t count, - TranscriptionSentenceIterateCb handle_sentence, void *data) { - + TranscriptionSentenceIterateCb handle_sentence, void *data) { for (size_t i = 0; i < count; i++) { if (handle_sentence && !handle_sentence(sentence, data)) { // end iteration if callback returns false @@ -68,11 +66,10 @@ void *transcription_iterate_sentences(const TranscriptionSentence *sentence, siz } void *transcription_iterate_words(const TranscriptionWord *words, size_t count, - TranscriptionWordIterateCb handle_word, void *data) { - + TranscriptionWordIterateCb handle_word, void *data) { uint8_t *cursor = (uint8_t *)words; for (size_t i = 0; i < count; i++) { - TranscriptionWord *word = (TranscriptionWord *) cursor; + TranscriptionWord *word = (TranscriptionWord *)cursor; if (handle_word && !handle_word(word, data)) { // end iteration if callback returns false diff --git a/src/fw/services/voice/voice.c b/src/fw/services/voice/voice.c index 30808cf34e..6f4621cae0 100644 --- a/src/fw/services/voice/voice.c +++ b/src/fw/services/voice/voice.c @@ -29,7 +29,7 @@ PBL_LOG_MODULE_DEFINE(service_voice, CONFIG_SERVICE_VOICE_LOG_LEVEL); #define SPEEX_BITSTREAM_VERSION (4) #define TIMEOUT_SESSION_SETUP (8000) -#define TIMEOUT_SESSION_RESULT (15000) +#define TIMEOUT_SESSION_RESULT (15000) // Buffer size #define MAX_ENCODED_FRAME_SIZE (200) @@ -56,13 +56,13 @@ static TimerID s_timeout = TIMER_INVALID_ID; // Session generation & teardown guards to mitigate race conditions between explicit cancel // and timeout callbacks executing on the timer thread. -static uint32_t s_session_generation = 0; // Monotonic session counter -static uint32_t s_timeout_generation = 0; // Generation tied to currently scheduled timeout -static bool s_teardown_in_progress = false; // Debounce concurrent teardown paths +static uint32_t s_session_generation = 0; // Monotonic session counter +static uint32_t s_timeout_generation = 0; // Generation tied to currently scheduled timeout +static bool s_teardown_in_progress = false; // Debounce concurrent teardown paths static void prv_send_event(VoiceEventType event_type, VoiceStatus status, PebbleVoiceServiceEventData *data); -static void prv_session_result_timeout(void * data); +static void prv_session_result_timeout(void *data); static void prv_audio_data_handler(int16_t *samples, size_t sample_count, void *context) { if (!voice_speex_is_initialized()) { @@ -83,14 +83,15 @@ static void prv_audio_data_handler(int16_t *samples, size_t sample_count, void * // Ensure we have the right amount of data for a frame size_t expected_samples = voice_speex_get_frame_size(); if (sample_count != expected_samples) { - PBL_LOG_DBG("Unexpected audio sample count: got %zu, expected %zu", sample_count, expected_samples); + PBL_LOG_DBG("Unexpected audio sample count: got %zu, expected %zu", sample_count, + expected_samples); return; } // Encode the audio frame uint8_t encoded_buffer[MAX_ENCODED_FRAME_SIZE]; // Max encoded frame size int encoded_bytes = voice_speex_encode_frame(samples, encoded_buffer, sizeof(encoded_buffer)); - + if (encoded_bytes > 0) { // Send encoded data to audio endpoint audio_endpoint_add_frame(s_session_id, encoded_buffer, encoded_bytes); @@ -112,7 +113,7 @@ static void prv_stop_recording(void) { // First, set state to non-recording to prevent any new audio processing s_state = SessionState_WaitForSessionResult; - + // Stop audio endpoint transfer BEFORE stopping microphone // This prevents new frames from being added while the endpoint shuts down audio_endpoint_stop_transfer(s_session_id); @@ -120,7 +121,7 @@ static void prv_stop_recording(void) { mic_stop(MIC); prv_teardown_session(); - + // Speex cleanup will be handled by delayed cleanup to avoid race conditions } @@ -155,18 +156,21 @@ static void prv_start_result_timeout(void) { static void prv_audio_transfer_stopped_handler(AudioEndpointSessionId session_id) { pbl_mutex_lock(&s_lock, PBL_FOREVER); - PBL_LOG_DBG("prv_audio_transfer_stopped_handler called with session_id=%d (current=%d)", + PBL_LOG_DBG("prv_audio_transfer_stopped_handler called with session_id=%d (current=%d)", session_id, s_session_id); - + if (s_session_id != session_id) { - PBL_LOG_WRN("Received audio transfer message when no session was in progress (" - "%d)", session_id); + PBL_LOG_WRN( + "Received audio transfer message when no session was in progress (" + "%d)", + session_id); pbl_mutex_unlock(&s_lock); return; } if (s_state != SessionState_Recording) { - PBL_LOG_WRN("Received stop message from phone after audio session " + PBL_LOG_WRN( + "Received stop message from phone after audio session " "stopped/cancelled"); pbl_mutex_unlock(&s_lock); return; @@ -187,7 +191,8 @@ static bool prv_start_recording(void) { int16_t *frame_buffer = voice_speex_get_frame_buffer(); size_t frame_size_samples = voice_speex_get_frame_size(); // Get frame size in samples - PBL_LOG_DBG("Got Speex frame buffer: %p, frame_size_samples: %zu", frame_buffer, frame_size_samples); + PBL_LOG_DBG("Got Speex frame buffer: %p, frame_size_samples: %zu", frame_buffer, + frame_size_samples); if (frame_buffer && frame_size_samples > 0) { PBL_LOG_DBG("Starting microphone with frame buffer"); @@ -207,25 +212,25 @@ static bool prv_start_recording(void) { static void prv_send_event(VoiceEventType event_type, VoiceStatus status, PebbleVoiceServiceEventData *data) { PebbleEvent event = { - .type = PEBBLE_VOICE_SERVICE_EVENT, - .voice_service = { - .type = event_type, - .status = status, - .data = data, - } + .type = PEBBLE_VOICE_SERVICE_EVENT, + .voice_service = { + .type = event_type, + .status = status, + .data = data, + } }; event_put(&event); } //! Expects s_lock is held by caller static void prv_handle_subsystem_started(SessionState transition_to_state) { - PBL_LOG_DBG("prv_handle_subsystem_started called: transition_to_state=%d, current_state=%d", + PBL_LOG_DBG("prv_handle_subsystem_started called: transition_to_state=%d, current_state=%d", transition_to_state, s_state); - + PBL_ASSERTN(transition_to_state == SessionState_VoiceEndpointSetupReceived || transition_to_state == SessionState_AudioEndpointSetupReceived); - if (s_state == SessionState_Idle) { // we error'ed out + if (s_state == SessionState_Idle) { // we error'ed out PBL_LOG_DBG("Session already errored out (state=Idle), ignoring subsystem start"); return; } @@ -238,7 +243,7 @@ static void prv_handle_subsystem_started(SessionState transition_to_state) { PBL_ASSERTN((s_state == SessionState_VoiceEndpointSetupReceived || s_state == SessionState_AudioEndpointSetupReceived) && (transition_to_state != s_state)); - + PBL_LOG_DBG("Both subsystems ready, transitioning to Recording state"); s_state = SessionState_Recording; @@ -257,11 +262,12 @@ static void prv_handle_subsystem_started(SessionState transition_to_state) { } } -static void prv_session_result_timeout(void * data) { +static void prv_session_result_timeout(void *data) { pbl_mutex_lock(&s_lock, PBL_FOREVER); if (s_teardown_in_progress || (s_timeout_generation != s_session_generation)) { - PBL_LOG_DBG("Ignoring stale session result timeout (t_gen=%"PRIu32" cur=%"PRIu32" teardown=%d)", + PBL_LOG_DBG("Ignoring stale session result timeout (t_gen=%" PRIu32 " cur=%" PRIu32 + " teardown=%d)", s_timeout_generation, s_session_generation, s_teardown_in_progress); pbl_mutex_unlock(&s_lock); return; @@ -277,10 +283,11 @@ static void prv_session_result_timeout(void * data) { pbl_mutex_unlock(&s_lock); } -static void prv_session_setup_timeout(void * data) { +static void prv_session_setup_timeout(void *data) { pbl_mutex_lock(&s_lock, PBL_FOREVER); if (s_teardown_in_progress || (s_timeout_generation != s_session_generation)) { - PBL_LOG_DBG("Ignoring stale session setup timeout (t_gen=%"PRIu32" cur=%"PRIu32" teardown=%d)", + PBL_LOG_DBG("Ignoring stale session setup timeout (t_gen=%" PRIu32 " cur=%" PRIu32 + " teardown=%d)", s_timeout_generation, s_session_generation, s_teardown_in_progress); pbl_mutex_unlock(&s_lock); return; @@ -349,7 +356,7 @@ VoiceSessionId voice_start_dictation(VoiceEndpointSessionType session_type) { // Start new session generation and clear teardown guard s_session_generation++; - if (UNLIKELY(s_session_generation == 0)) { // handle wrap-around (very unlikely) + if (UNLIKELY(s_session_generation == 0)) { // handle wrap-around (very unlikely) s_session_generation = 1; } s_teardown_in_progress = false; @@ -358,7 +365,7 @@ VoiceSessionId voice_start_dictation(VoiceEndpointSessionType session_type) { // check if we're being started from an app so we know to send the UUID when setting up a session s_from_app = ((pebble_task_get_current() == PebbleTask_App) && - !app_install_id_from_system(app_manager_get_current_app_id())); + !app_install_id_from_system(app_manager_get_current_app_id())); if (s_from_app) { s_app_uuid = app_manager_get_current_app_md()->uuid; char uuid_str[UUID_STRING_BUFFER_LENGTH]; @@ -378,7 +385,8 @@ VoiceSessionId voice_start_dictation(VoiceEndpointSessionType session_type) { // Get Speex transfer info AudioTransferInfoSpeex transfer_info; voice_speex_get_transfer_info(&transfer_info); - PBL_LOG_DBG("Got Speex transfer info: sample_rate=%"PRIu32", bit_rate=%"PRIu16", frame_size=%"PRIu16, + PBL_LOG_DBG("Got Speex transfer info: sample_rate=%" PRIu32 ", bit_rate=%" PRIu16 + ", frame_size=%" PRIu16, transfer_info.sample_rate, transfer_info.bit_rate, transfer_info.frame_size); PBL_LOG_DBG("Setting up audio endpoint transfer"); @@ -386,11 +394,10 @@ VoiceSessionId voice_start_dictation(VoiceEndpointSessionType session_type) { PBL_ASSERTN(s_session_id != AUDIO_ENDPOINT_SESSION_INVALID_ID); PBL_LOG_DBG("Audio endpoint transfer setup complete with session_id=%d", s_session_id); - PBL_LOG_INFO("Send session setup message. Session type: %d", session_type); PBL_LOG_DBG("Calling voice_endpoint_setup_session"); voice_endpoint_setup_session(session_type, s_session_id, &transfer_info, - s_from_app ? &s_app_uuid : NULL); + s_from_app ? &s_app_uuid : NULL); if (s_timeout == TIMER_INVALID_ID) { s_timeout = new_timer_create(); @@ -409,8 +416,7 @@ VoiceSessionId voice_start_dictation(VoiceEndpointSessionType session_type) { // expect voice_handle_dictation_result to be called next with a dictation response void voice_stop_dictation(VoiceSessionId session_id) { pbl_mutex_lock(&s_lock, PBL_FOREVER); - if ((s_state == SessionState_Idle) || - (session_id != s_session_id) || + if ((s_state == SessionState_Idle) || (session_id != s_session_id) || (session_id == VOICE_SESSION_ID_INVALID)) { goto unlock; } @@ -431,8 +437,7 @@ void voice_stop_dictation(VoiceSessionId session_id) { void voice_cancel_dictation(VoiceSessionId session_id) { pbl_mutex_lock(&s_lock, PBL_FOREVER); - if ((session_id != s_session_id) || - (session_id == VOICE_SESSION_ID_INVALID)) { + if ((session_id != s_session_id) || (session_id == VOICE_SESSION_ID_INVALID)) { goto unlock; } @@ -463,8 +468,8 @@ void voice_cancel_dictation(VoiceSessionId session_id) { // start sending Speex encoded data via the audio endpoint to the phone. voice_stop_dictation will // end the recording void voice_handle_session_setup_result(VoiceEndpointResult result, - VoiceEndpointSessionType session_type, bool app_initiated) { - PBL_LOG_DBG("voice_handle_session_setup_result: result=%d, session_type=%d, app_initiated=%d", + VoiceEndpointSessionType session_type, bool app_initiated) { + PBL_LOG_DBG("voice_handle_session_setup_result: result=%d, session_type=%d, app_initiated=%d", result, session_type, app_initiated); PBL_LOG_DBG("Current state: %d", s_state); @@ -477,14 +482,13 @@ void voice_handle_session_setup_result(VoiceEndpointResult result, bool has_error = true; - if (s_state != SessionState_StartSession && - s_state != SessionState_AudioEndpointSetupReceived && + if (s_state != SessionState_StartSession && s_state != SessionState_AudioEndpointSetupReceived && s_state != SessionState_VoiceEndpointSetupReceived) { - PBL_LOG_WRN("Session setup result received when not expected, state=%d", - (int)s_state); + PBL_LOG_WRN("Session setup result received when not expected, state=%d", (int)s_state); prv_cancel_session(); - VoiceEventType event_type = (s_state <= SessionState_StartSession) ? - VoiceEventTypeSessionSetup : VoiceEventTypeSessionResult; + VoiceEventType event_type = (s_state <= SessionState_StartSession) + ? VoiceEventTypeSessionSetup + : VoiceEventTypeSessionResult; prv_send_event(event_type, VoiceStatusErrorGeneric, NULL); goto done; } @@ -514,11 +518,13 @@ void voice_handle_session_setup_result(VoiceEndpointResult result, PBL_LOG_DBG("App initiated mismatch - received=%d, expected=%d", app_initiated, s_from_app); prv_cancel_session(); if (app_initiated) { - PBL_LOG_WRN("Received session setup result for app initiated session when it " - "was not expected"); + PBL_LOG_WRN( + "Received session setup result for app initiated session when it " + "was not expected"); } else { - PBL_LOG_WRN("Received session setup result for non-app session when an app " - "session result was expected"); + PBL_LOG_WRN( + "Received session setup result for non-app session when an app " + "session result was expected"); } prv_send_event(VoiceEventTypeSessionSetup, VoiceStatusErrorGeneric, NULL); goto done; @@ -541,7 +547,7 @@ void voice_handle_session_setup_result(VoiceEndpointResult result, static bool prv_get_string_size_cb(const TranscriptionWord *word, void *data) { size_t *size = data; - *size += word->length + sizeof(char); // add 1 for space or null terminator + *size += word->length + sizeof(char); // add 1 for space or null terminator return true; } @@ -551,13 +557,13 @@ static bool prv_build_string_cb(const TranscriptionWord *word, void *data) { // if the current word is a punctuation mark strip out backspace (phone app inserts backspace // before punctuation mark) and do not insert a space before the word if (word->data[0] == '\x08') { - strncat(sentence, (char *) &word->data[1], word->length - 1); + strncat(sentence, (char *)&word->data[1], word->length - 1); } else { // if this is not the beginning of the string, insert a space before the word if (strlen(sentence) != 0) { strcat(sentence, " "); } - strncat(sentence, (char *) word->data, word->length); + strncat(sentence, (char *)word->data, word->length); } return true; @@ -576,22 +582,27 @@ static bool prv_handle_dictation_nlp_result_common(VoiceEndpointResult result, if (s_state != SessionState_WaitForSessionResult) { // This handles erroneous replies from the phone app (sometimes the phone app sends a session // result immediately after we start streaming - PBL_LOG_WRN("Session result when not expected (result: %d, " - "session_id: %d)", result, session_id); + PBL_LOG_WRN( + "Session result when not expected (result: %d, " + "session_id: %d)", + result, session_id); if (s_state == SessionState_Recording) { prv_stop_recording(); } else { prv_cancel_recording(); } - VoiceEventType event_type = (s_state <= SessionState_StartSession) ? - VoiceEventTypeSessionSetup : VoiceEventTypeSessionResult; + VoiceEventType event_type = (s_state <= SessionState_StartSession) + ? VoiceEventTypeSessionSetup + : VoiceEventTypeSessionResult; prv_send_event(event_type, VoiceStatusErrorGeneric, NULL); return false; } if (s_session_id != session_id) { - PBL_LOG_WRN("Received session result for wrong session (Expected: " - "%"PRIu16"; Received: %"PRIu16, s_session_id, session_id); + PBL_LOG_WRN( + "Received session result for wrong session (Expected: " + "%" PRIu16 "; Received: %" PRIu16, + s_session_id, session_id); prv_send_event(VoiceEventTypeSessionResult, VoiceStatusErrorGeneric, NULL); return false; } @@ -608,11 +619,13 @@ static bool prv_handle_dictation_nlp_result_common(VoiceEndpointResult result, // expected UUID if ((app_initiated != s_from_app) || (s_from_app && !uuid_equal(&s_app_uuid, app_uuid))) { if (app_initiated) { - PBL_LOG_WRN("Received session result for app initiated session when a " - "non-app session result was expected"); + PBL_LOG_WRN( + "Received session result for app initiated session when a " + "non-app session result was expected"); } else { - PBL_LOG_WRN("Received session result for non-app session when an app " - "session result was expected"); + PBL_LOG_WRN( + "Received session result for non-app session when an app " + "session result was expected"); } prv_send_event(VoiceEventTypeSessionResult, VoiceStatusErrorGeneric, NULL); return false; @@ -634,7 +647,8 @@ void voice_handle_dictation_result(VoiceEndpointResult result, AudioEndpointSess // Calculate size of string size_t sentence_size = 0; transcription_iterate_words(transcription->sentences[0].words, - transcription->sentences[0].word_count, prv_get_string_size_cb, &sentence_size); + transcription->sentences[0].word_count, prv_get_string_size_cb, + &sentence_size); const size_t event_size = sizeof(PebbleVoiceServiceEventData) + sentence_size; PebbleVoiceServiceEventData *event_data = kernel_zalloc_check(event_size); @@ -643,15 +657,16 @@ void voice_handle_dictation_result(VoiceEndpointResult result, AudioEndpointSess // updated to support additional features when the final UI is implemented // Build string by concatenating each word in the first sentence transcription_iterate_words(transcription->sentences[0].words, - transcription->sentences[0].word_count, prv_build_string_cb, event_data->sentence); + transcription->sentences[0].word_count, prv_build_string_cb, + event_data->sentence); if (app_initiated) { char uuid_str[UUID_STRING_BUFFER_LENGTH]; uuid_to_string(app_uuid, uuid_str); - PBL_LOG_DBG("Transcription received (%"PRIu32" B) for app %s", - (uint32_t)sentence_size, uuid_str); + PBL_LOG_DBG("Transcription received (%" PRIu32 " B) for app %s", (uint32_t)sentence_size, + uuid_str); } else { - PBL_LOG_DBG("Transcription received (%"PRIu32" B)", (uint32_t)sentence_size); + PBL_LOG_DBG("Transcription received (%" PRIu32 " B)", (uint32_t)sentence_size); } prv_send_event(VoiceEventTypeSessionResult, VoiceStatusSuccess, event_data); @@ -675,8 +690,8 @@ void voice_handle_nlp_result(VoiceEndpointResult result, AudioEndpointSessionId const size_t sentence_size = strlen(reminder) + 1; const size_t event_size = sizeof(PebbleVoiceServiceEventData) + sentence_size; PebbleVoiceServiceEventData *event_data = kernel_zalloc_check(event_size); - *event_data = (PebbleVoiceServiceEventData) { - .timestamp = timestamp, + *event_data = (PebbleVoiceServiceEventData){ + .timestamp = timestamp, }; strncpy(event_data->sentence, reminder, sentence_size); diff --git a/src/fw/services/voice/voice_speex.c b/src/fw/services/voice/voice_speex.c index 60e4ecaf8a..576dbeb36f 100644 --- a/src/fw/services/voice/voice_speex.c +++ b/src/fw/services/voice/voice_speex.c @@ -31,11 +31,11 @@ typedef struct { void *enc_state; SpeexBits bits; SpeexStereoState stereo_state; - uint32_t frame_size; // Changed to uint32_t to match transfer info - uint32_t sample_rate; // Changed to uint32_t to match transfer info - uint16_t bit_rate; // Changed to uint16_t to match transfer info - uint8_t bitstream_version; // Changed to uint8_t to match transfer info - uint8_t channels; // 1 for mono, 2 for stereo + uint32_t frame_size; // Changed to uint32_t to match transfer info + uint32_t sample_rate; // Changed to uint32_t to match transfer info + uint16_t bit_rate; // Changed to uint16_t to match transfer info + uint8_t bitstream_version; // Changed to uint8_t to match transfer info + uint8_t channels; // 1 for mono, 2 for stereo bool initialized; uint8_t *frame_buffer; size_t frame_buffer_size; @@ -46,12 +46,12 @@ typedef struct { static VoiceSpeexEncoder s_encoder = {0}; // Speex configuration -#define SPEEX_SAMPLE_RATE 16000 // 16 kHz wideband -#define SPEEX_BIT_RATE 9800 // 9.8 kbps -#define SPEEX_QUALITY 6 // Quality level (0-10) -#define SPEEX_COMPLEXITY 1 // Complexity (1-10, lower for embedded) +#define SPEEX_SAMPLE_RATE 16000 // 16 kHz wideband +#define SPEEX_BIT_RATE 9800 // 9.8 kbps +#define SPEEX_QUALITY 6 // Quality level (0-10) +#define SPEEX_COMPLEXITY 1 // Complexity (1-10, lower for embedded) #define SPEEX_ENCODED_BUFFER_SIZE 320 // Max encoded frame size -#define SPEEX_AUDIO_GAIN 3 // Audio gain multiplier (3x) +#define SPEEX_AUDIO_GAIN 3 // Audio gain multiplier (3x) bool voice_speex_init(void) { if (s_encoder.initialized) { @@ -62,7 +62,7 @@ bool voice_speex_init(void) { // Get channel count from mic device (default to mono if not specified) s_encoder.channels = (uint8_t)mic_get_channels(MIC); - PBL_LOG_DBG("Mic channels: %"PRIu8, s_encoder.channels); + PBL_LOG_DBG("Mic channels: %" PRIu8, s_encoder.channels); // Initialize Speex encoder - use wideband mode for 16kHz sample rate const SpeexMode *mode = &speex_wb_mode; @@ -70,7 +70,7 @@ bool voice_speex_init(void) { PBL_LOG_ERR("Failed to get Speex wideband mode"); return false; } - + s_encoder.enc_state = speex_encoder_init(mode); if (!s_encoder.enc_state) { PBL_LOG_ERR("Failed to initialize Speex encoder"); @@ -87,12 +87,12 @@ bool voice_speex_init(void) { // Get frame size speex_encoder_ctl(s_encoder.enc_state, SPEEX_GET_FRAME_SIZE, &s_encoder.frame_size); - PBL_LOG_DBG("Initial frame size from Speex: %"PRIu32, s_encoder.frame_size); + PBL_LOG_DBG("Initial frame size from Speex: %" PRIu32, s_encoder.frame_size); // Set encoder parameters int tmp = SPEEX_QUALITY; speex_encoder_ctl(s_encoder.enc_state, SPEEX_SET_QUALITY, &tmp); - + tmp = SPEEX_COMPLEXITY; speex_encoder_ctl(s_encoder.enc_state, SPEEX_SET_COMPLEXITY, &tmp); @@ -108,10 +108,10 @@ bool voice_speex_init(void) { int actual_sample_rate, actual_bit_rate; speex_encoder_ctl(s_encoder.enc_state, SPEEX_GET_SAMPLING_RATE, &actual_sample_rate); speex_encoder_ctl(s_encoder.enc_state, SPEEX_GET_BITRATE, &actual_bit_rate); - + s_encoder.sample_rate = (uint32_t)actual_sample_rate; s_encoder.bit_rate = (uint16_t)actual_bit_rate; - + s_encoder.bitstream_version = SPEEX_BITSTREAM_VERSION; // Allocate frame buffer (16-bit samples, multiplied by channel count for stereo) @@ -124,13 +124,14 @@ bool voice_speex_init(void) { s_encoder.initialized = true; - PBL_LOG_DBG("Speex encoder initialized: sample_rate=%"PRIu32", bit_rate=%"PRIu16", frame_size=%"PRIu32", channels=%"PRIu8, + PBL_LOG_DBG("Speex encoder initialized: sample_rate=%" PRIu32 ", bit_rate=%" PRIu16 + ", frame_size=%" PRIu32 ", channels=%" PRIu8, s_encoder.sample_rate, s_encoder.bit_rate, s_encoder.frame_size, s_encoder.channels); - + // Verify sample rates match if (s_encoder.sample_rate != MIC_SAMPLE_RATE) { - PBL_LOG_WRN("Speex sample rate (%"PRIu32") != Mic sample rate (%d)", - s_encoder.sample_rate, MIC_SAMPLE_RATE); + PBL_LOG_WRN("Speex sample rate (%" PRIu32 ") != Mic sample rate (%d)", s_encoder.sample_rate, + MIC_SAMPLE_RATE); } return true; @@ -148,7 +149,6 @@ void voice_speex_deinit(void) { speex_bits_destroy(&s_encoder.bits); - if (s_encoder.frame_buffer) { kernel_free(s_encoder.frame_buffer); s_encoder.frame_buffer = NULL; @@ -172,13 +172,14 @@ void voice_speex_get_transfer_info(AudioTransferInfoSpeex *info) { info->bit_rate = s_encoder.bit_rate; info->frame_size = (uint16_t)s_encoder.frame_size; // Explicit cast to uint16_t info->bitstream_version = s_encoder.bitstream_version; - - PBL_LOG_DBG("Transfer info: sample_rate=%"PRIu32", bit_rate=%"PRIu16", frame_size=%"PRIu16", bitstream_version=%"PRIu8, + + PBL_LOG_DBG("Transfer info: sample_rate=%" PRIu32 ", bit_rate=%" PRIu16 ", frame_size=%" PRIu16 + ", bitstream_version=%" PRIu8, info->sample_rate, info->bit_rate, info->frame_size, info->bitstream_version); - + // Additional validation if (info->sample_rate != 16000) { - PBL_LOG_WRN("Unexpected sample rate in transfer info: %"PRIu32, info->sample_rate); + PBL_LOG_WRN("Unexpected sample rate in transfer info: %" PRIu32, info->sample_rate); } } @@ -228,18 +229,20 @@ int voice_speex_encode_frame(int16_t *samples, uint8_t *encoded_data, size_t max speex_encode_stereo_int(samples, s_encoder.frame_size, &s_encoder.bits); } - // Encode frame (for stereo, samples have been converted to mono in-place by speex_encode_stereo_int) + // Encode frame (for stereo, samples have been converted to mono in-place by + // speex_encode_stereo_int) speex_encode_int(s_encoder.enc_state, (spx_int16_t *)samples, &s_encoder.bits); // Write encoded data to buffer int encoded_bytes = speex_bits_write(&s_encoder.bits, (char *)encoded_data, max_encoded_size); - + if (encoded_bytes < 0) { PBL_LOG_ERR("Failed to write Speex encoded data (returned %d)", encoded_bytes); return -1; } - PBL_LOG_VERBOSE("Encoded frame: input_samples=%"PRIu32", output_bytes=%d, frame_size=%"PRIu32", channels=%"PRIu8, + PBL_LOG_VERBOSE("Encoded frame: input_samples=%" PRIu32 ", output_bytes=%d, frame_size=%" PRIu32 + ", channels=%" PRIu8, total_samples, encoded_bytes, s_encoder.frame_size, s_encoder.channels); return encoded_bytes; diff --git a/src/fw/services/voice_endpoint/service.c b/src/fw/services/voice_endpoint/service.c index f00a0e14d6..b20b63aa27 100644 --- a/src/fw/services/voice_endpoint/service.c +++ b/src/fw/services/voice_endpoint/service.c @@ -21,18 +21,15 @@ PBL_LOG_MODULE_DEFINE(service_voice_endpoint, CONFIG_SERVICE_VOICE_ENDPOINT_LOG_ #define VOICE_CONTROL_ENDPOINT (11000) #ifdef CONFIG_MIC -static bool prv_handle_result_common(VoiceEndpointResult result, - bool app_initiated, +static bool prv_handle_result_common(VoiceEndpointResult result, bool app_initiated, AudioEndpointSessionId session_id, - GenericAttributeList *attr_list, - size_t attr_list_size, + GenericAttributeList *attr_list, size_t attr_list_size, Uuid **app_uuid_out) { - - GenericAttribute *uuid_attr = generic_attribute_find_attribute(attr_list, - VEAttributeIdAppUuid, - attr_list_size); + GenericAttribute *uuid_attr = + generic_attribute_find_attribute(attr_list, VEAttributeIdAppUuid, attr_list_size); if (app_initiated && !uuid_attr) { - PBL_LOG_WRN("No app UUID found for dictation response from app-initiated " + PBL_LOG_WRN( + "No app UUID found for dictation response from app-initiated " "session"); voice_handle_dictation_result(VoiceEndpointResultFailInvalidMessage, session_id, NULL, app_initiated, NULL); @@ -62,13 +59,13 @@ static void prv_handle_dictation_result(VoiceSessionResultMsg *msg, size_t size) const bool app_initiated = (msg->flags.app_initiated == 1); Uuid *app_uuid = NULL; - if (!prv_handle_result_common(msg->result, app_initiated, msg->session_id, - &msg->attr_list, attr_list_size, &app_uuid)) { + if (!prv_handle_result_common(msg->result, app_initiated, msg->session_id, &msg->attr_list, + attr_list_size, &app_uuid)) { return; } - GenericAttribute *transcription_attr = generic_attribute_find_attribute(&msg->attr_list, - VEAttributeIdTranscription, attr_list_size); + GenericAttribute *transcription_attr = + generic_attribute_find_attribute(&msg->attr_list, VEAttributeIdTranscription, attr_list_size); if (!transcription_attr || transcription_attr->length == 0) { PBL_LOG_WRN("No transcription attribute found"); @@ -82,11 +79,11 @@ static void prv_handle_dictation_result(VoiceSessionResultMsg *msg, size_t size) if (!valid) { PBL_LOG_WRN("Unrecognized transcription format received"); - voice_handle_dictation_result(VoiceEndpointResultFailInvalidRecognizerResponse, - msg->session_id, NULL, app_initiated, app_uuid); + voice_handle_dictation_result(VoiceEndpointResultFailInvalidRecognizerResponse, msg->session_id, + NULL, app_initiated, app_uuid); } - voice_handle_dictation_result(msg->result, msg->session_id, transcription, - app_initiated, app_uuid); + voice_handle_dictation_result(msg->result, msg->session_id, transcription, app_initiated, + app_uuid); } static void prv_handle_nlp_result(VoiceSessionResultMsg *msg, size_t size) { @@ -94,26 +91,25 @@ static void prv_handle_nlp_result(VoiceSessionResultMsg *msg, size_t size) { const bool app_initiated = (msg->flags.app_initiated == 1); Uuid *app_uuid = NULL; - if (!prv_handle_result_common(msg->result, app_initiated, msg->session_id, - &msg->attr_list, attr_list_size, &app_uuid)) { + if (!prv_handle_result_common(msg->result, app_initiated, msg->session_id, &msg->attr_list, + attr_list_size, &app_uuid)) { return; } if (app_uuid) { PBL_LOG_WRN("Got an app UUID in a NLP result msg. Ignoring and continuing"); } - // The timestamp attribute is optional time_t timestamp = 0; - GenericAttribute *timestamp_attr = generic_attribute_find_attribute(&msg->attr_list, - VEAttributeIdTimestamp, attr_list_size); + GenericAttribute *timestamp_attr = + generic_attribute_find_attribute(&msg->attr_list, VEAttributeIdTimestamp, attr_list_size); if (timestamp_attr && timestamp_attr->length == sizeof(uint32_t)) { - uint32_t *timestamp_ptr = (uint32_t*)timestamp_attr->data; + uint32_t *timestamp_ptr = (uint32_t *)timestamp_attr->data; timestamp = *timestamp_ptr; } - GenericAttribute *reminder_attr = generic_attribute_find_attribute(&msg->attr_list, - VEAttributeIdReminder, attr_list_size); + GenericAttribute *reminder_attr = + generic_attribute_find_attribute(&msg->attr_list, VEAttributeIdReminder, attr_list_size); if (!reminder_attr || reminder_attr->length == 0) { PBL_LOG_WRN("No reminder attribute found"); @@ -130,21 +126,21 @@ static void prv_handle_nlp_result(VoiceSessionResultMsg *msg, size_t size) { #endif #ifdef CONFIG_MIC -void voice_endpoint_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t size) { +void voice_endpoint_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t size) { MsgId msg_id = data[0]; switch (msg_id) { case MsgIdSessionSetup: { if (size >= sizeof(SessionSetupResultMsg)) { - SessionSetupResultMsg *msg = (SessionSetupResultMsg *) data; - + SessionSetupResultMsg *msg = (SessionSetupResultMsg *)data; + // Validate result enum value to prevent crashes from invalid values VoiceEndpointResult result = msg->result; if (result > VoiceEndpointResultFailInvalidMessage) { - PBL_LOG_ERR("Invalid VoiceEndpointResult value: %d, treating as invalid message", - (int)result); + PBL_LOG_ERR("Invalid VoiceEndpointResult value: %d, treating as invalid message", + (int)result); result = VoiceEndpointResultFailInvalidMessage; } - + bool app_initiated = (msg->flags.app_initiated == 1); voice_handle_session_setup_result(result, msg->session_type, app_initiated); } else { @@ -154,7 +150,7 @@ void voice_endpoint_protocol_msg_callback(CommSession *session, const uint8_t* d } case MsgIdDictationResult: { if (size >= sizeof(VoiceSessionResultMsg)) { - VoiceSessionResultMsg *msg = (VoiceSessionResultMsg *) data; + VoiceSessionResultMsg *msg = (VoiceSessionResultMsg *)data; prv_handle_dictation_result(msg, size); } else { PBL_LOG_WRN("Invalid size for dictation result message %zu", size); @@ -163,7 +159,7 @@ void voice_endpoint_protocol_msg_callback(CommSession *session, const uint8_t* d } case MsgIdNLPResult: { if (size >= sizeof(VoiceSessionResultMsg)) { - VoiceSessionResultMsg *msg = (VoiceSessionResultMsg *) data; + VoiceSessionResultMsg *msg = (VoiceSessionResultMsg *)data; prv_handle_nlp_result(msg, size); } else { PBL_LOG_WRN("Invalid size for dictation result message %zu", size); @@ -175,16 +171,15 @@ void voice_endpoint_protocol_msg_callback(CommSession *session, const uint8_t* d PBL_LOG_WRN("Invalid message ID"); break; } - } #else -void voice_endpoint_protocol_msg_callback(CommSession *session, const uint8_t* data, size_t size) { +void voice_endpoint_protocol_msg_callback(CommSession *session, const uint8_t *data, size_t size) { } #endif void voice_endpoint_setup_session(VoiceEndpointSessionType session_type, - AudioEndpointSessionId session_id, AudioTransferInfoSpeex *info, Uuid *app_uuid) { - + AudioEndpointSessionId session_id, AudioTransferInfoSpeex *info, + Uuid *app_uuid) { CommSession *comm_session = comm_session_get_system_session(); comm_session_set_responsiveness(comm_session, BtConsumerPpVoiceEndpoint, ResponseTimeMin, MIN_LATENCY_MODE_TIMEOUT_VOICE_SECS); @@ -194,11 +189,11 @@ void voice_endpoint_setup_session(VoiceEndpointSessionType session_type, sizeof(AudioTransferInfoSpeex) + (app_uuid ? (sizeof(Uuid) + sizeof(GenericAttribute)) : 0); SessionSetupMsg *msg = kernel_malloc_check(size); - *msg = (SessionSetupMsg) { - .msg_id = MsgIdSessionSetup, - .session_type = session_type, - .session_id = session_id, - .attr_list.num_attributes = 1, + *msg = (SessionSetupMsg){ + .msg_id = MsgIdSessionSetup, + .session_type = session_type, + .session_id = session_id, + .attr_list.num_attributes = 1, }; GenericAttribute *attr = msg->attr_list.attributes; @@ -215,12 +210,12 @@ void voice_endpoint_setup_session(VoiceEndpointSessionType session_type, } attr = generic_attribute_add_attribute(attr, VEAttributeIdAudioTransferInfoSpeex, info, - sizeof(AudioTransferInfoSpeex)); + sizeof(AudioTransferInfoSpeex)); size_t actual_size = (uint8_t *)attr - (uint8_t *)msg; PBL_ASSERTN(actual_size == size); - comm_session_send_data(comm_session, VOICE_CONTROL_ENDPOINT, (uint8_t *)msg, - size, COMM_SESSION_DEFAULT_TIMEOUT); + comm_session_send_data(comm_session, VOICE_CONTROL_ENDPOINT, (uint8_t *)msg, size, + COMM_SESSION_DEFAULT_TIMEOUT); kernel_free(msg); } diff --git a/src/fw/services/wakeup/service.c b/src/fw/services/wakeup/service.c index 538a904119..65319291b9 100644 --- a/src/fw/services/wakeup/service.c +++ b/src/fw/services/wakeup/service.c @@ -41,13 +41,13 @@ static PBL_MUTEX_DEFINE(s_mutex); //! repeating and repeat_hours_offset were included for future use //! and use in repeat support for alarms typedef struct PACKED { - Uuid uuid; //!< UUID of app that scheduled the wakeup event - int32_t reason; //!< App provided value to differentiate wakeup event - bool repeating; //!< Enable event repetition - uint16_t repeat_hours_offset; //!< repeat hour interval - bool notify_if_missed; //!< Notify user if wakeup event has been missed - time_t timestamp; //!< The time at which this entry will wake up at - bool utc; //!< If timezone has been set, the this is UTC time + Uuid uuid; //!< UUID of app that scheduled the wakeup event + int32_t reason; //!< App provided value to differentiate wakeup event + bool repeating; //!< Enable event repetition + uint16_t repeat_hours_offset; //!< repeat hour interval + bool notify_if_missed; //!< Notify user if wakeup event has been missed + time_t timestamp; //!< The time at which this entry will wake up at + bool utc; //!< If timezone has been set, the this is UTC time } WakeupEntry; typedef struct PACKED { @@ -62,8 +62,8 @@ struct prv_missed_events_s { }; struct prv_check_app_and_wakeup_event_s { - time_t wakeup_timestamp; //!< Timestamp of the WakeupEntry - int wakeup_count; //!< wakeup event count for app, negative for error (StatusCode) + time_t wakeup_timestamp; //!< Timestamp of the WakeupEntry + int wakeup_count; //!< wakeup event count for app, negative for error (StatusCode) }; // Local prototypes @@ -73,12 +73,12 @@ static StatusCode prv_wakeup_settings_add_entry(WakeupId wakeup_id, WakeupEntry static void prv_wakeup_timer_next_pending(void); static bool s_wakeup_enabled = false; -static TimerID s_current_timer_id = TIMER_INVALID_ID; // single timer reused for each event +static TimerID s_current_timer_id = TIMER_INVALID_ID; // single timer reused for each event // single structure containing the global wakeup state -static WakeupState s_wakeup_state = { -1, -1, 0 }; -static bool s_catchup_enabled = false; // enables catching up with missed events +static WakeupState s_wakeup_state = {-1, -1, 0}; +static bool s_catchup_enabled = false; // enables catching up with missed events -void wakeup_dispatcher_system_task(void *data){ +void wakeup_dispatcher_system_task(void *data) { WakeupId wakeup_id = (WakeupId)data; WakeupEntry entry = prv_wakeup_settings_get_entry(wakeup_id); @@ -91,21 +91,18 @@ void wakeup_dispatcher_system_task(void *data){ if (!(app_manager_get_current_app_id() == app_id)) { // Lookup app, and if installed, launch if (app_id != INSTALL_ID_INVALID) { - PebbleLaunchAppEventExtended* data = + PebbleLaunchAppEventExtended *data = kernel_malloc_check(sizeof(PebbleLaunchAppEventExtended)); - *data = (PebbleLaunchAppEventExtended) { - .common.reason = APP_LAUNCH_WAKEUP, - .wakeup.wakeup_id = wakeup_id, - .wakeup.wakeup_reason = entry.reason, + *data = (PebbleLaunchAppEventExtended){ + .common.reason = APP_LAUNCH_WAKEUP, + .wakeup.wakeup_id = wakeup_id, + .wakeup.wakeup_reason = entry.reason, }; data->common.args = &data->wakeup; PebbleEvent event = { - .type = PEBBLE_APP_LAUNCH_EVENT, - .launch_app = { - .id = app_id, - .data = data - } + .type = PEBBLE_APP_LAUNCH_EVENT, + .launch_app = {.id = app_id, .data = data} }; event_put(&event); @@ -113,13 +110,8 @@ void wakeup_dispatcher_system_task(void *data){ } else { // If app running, send event PebbleEvent event = { - .type = PEBBLE_WAKEUP_EVENT, - .wakeup = { - .wakeup_info = { - .wakeup_id = wakeup_id, - .wakeup_reason = entry.reason - } - } + .type = PEBBLE_WAKEUP_EVENT, + .wakeup = {.wakeup_info = {.wakeup_id = wakeup_id, .wakeup_reason = entry.reason}} }; event_put(&event); } @@ -135,31 +127,30 @@ static void prv_wakeup_dispatcher(void *data) { system_task_add_callback(wakeup_dispatcher_system_task, data); } -static bool prv_find_next_wakeup_id_callback(SettingsFile *file, - SettingsRecordInfo *info, void *context) { +static bool prv_find_next_wakeup_id_callback(SettingsFile *file, SettingsRecordInfo *info, + void *context) { // Check if valid entry if (info->key_len != sizeof(WakeupId) || info->val_len != sizeof(WakeupEntry)) { - return true; // continue iterating + return true; // continue iterating } WakeupId wakeup_id; - info->get_key(file, (uint8_t*)&wakeup_id, sizeof(WakeupId)); + info->get_key(file, (uint8_t *)&wakeup_id, sizeof(WakeupId)); WakeupEntry entry; - info->get_val(file, (uint8_t*)&entry, sizeof(WakeupEntry)); + info->get_val(file, (uint8_t *)&entry, sizeof(WakeupEntry)); // If the wakeup_id is valid, and the timestamp of the entry is closer than // the timestamp of our global wakeup state, then set the next close wakeup event - if (wakeup_id > 0 && (s_wakeup_state.current_wakeup_id == -1 || - entry.timestamp < s_wakeup_state.timestamp)) { + if (wakeup_id > 0 && + (s_wakeup_state.current_wakeup_id == -1 || entry.timestamp < s_wakeup_state.timestamp)) { s_wakeup_state.timestamp = entry.timestamp; s_wakeup_state.current_wakeup_id = wakeup_id; } - return true; // continue iterating + return true; // continue iterating } - // Checks for the next pending wakeup event and sets up a timer for the event static void prv_wakeup_timer_next_pending(void) { if (!s_wakeup_enabled) { @@ -209,26 +200,25 @@ static void prv_wakeup_timer_next_pending(void) { // timers are in milliseconds, set main callback dispatch for wakeup // WakeupId is used to save/restore/lookup wakeup events new_timer_start(s_current_timer_id, (time_difference * 1000), prv_wakeup_dispatcher, - (void*)((intptr_t)s_wakeup_state.current_wakeup_id), 0); + (void *)((intptr_t)s_wakeup_state.current_wakeup_id), 0); } } - static void prv_migrate_events_callback(SettingsFile *old_file, SettingsFile *new_file, - SettingsRecordInfo *info, void *utc_diff) { + SettingsRecordInfo *info, void *utc_diff) { if (!utc_diff || info->key_len != sizeof(WakeupId) || info->val_len != sizeof(WakeupEntry)) { return; } WakeupId wakeup_id; - info->get_val(old_file, (uint8_t*)&wakeup_id, sizeof(WakeupId)); + info->get_val(old_file, (uint8_t *)&wakeup_id, sizeof(WakeupId)); WakeupEntry entry; - info->get_val(old_file, (uint8_t*)&entry, sizeof(WakeupEntry)); + info->get_val(old_file, (uint8_t *)&entry, sizeof(WakeupEntry)); // Migrate the entries to the new timezone if (entry.utc == false) { - entry.timestamp -= *((int*)utc_diff); + entry.timestamp -= *((int *)utc_diff); entry.utc = true; if (wakeup_id == s_wakeup_state.current_wakeup_id) { s_wakeup_state.timestamp = entry.timestamp; @@ -237,18 +227,18 @@ static void prv_migrate_events_callback(SettingsFile *old_file, SettingsFile *ne // Write the new entry to the settings file. We always write as there's no // chance of it being invalid. - settings_file_set(new_file, (uint8_t*)&wakeup_id, sizeof(WakeupId), - (uint8_t*)&entry, sizeof(WakeupEntry)); + settings_file_set(new_file, (uint8_t *)&wakeup_id, sizeof(WakeupId), (uint8_t *)&entry, + sizeof(WakeupEntry)); } static bool prv_check_for_events(SettingsFile *file, SettingsRecordInfo *info, void *context) { bool *event_found = (bool *)context; *event_found = true; - return false; // stop iterating + return false; // stop iterating } static void prv_update_events_callback(SettingsFile *old_file, SettingsFile *new_file, - SettingsRecordInfo *info, void *context) { + SettingsRecordInfo *info, void *context) { // Check if valid entry if (!context || info->key_len != sizeof(WakeupId)) { return; @@ -260,16 +250,16 @@ static void prv_update_events_callback(SettingsFile *old_file, SettingsFile *new return; } - struct prv_missed_events_s *missed_events = (struct prv_missed_events_s*)context; + struct prv_missed_events_s *missed_events = (struct prv_missed_events_s *)context; WakeupId wakeup_id; - info->get_key(old_file, (uint8_t*)&wakeup_id, sizeof(WakeupId)); + info->get_key(old_file, (uint8_t *)&wakeup_id, sizeof(WakeupId)); WakeupEntry entry; - info->get_val(old_file, (uint8_t*)&entry, info->val_len); + info->get_val(old_file, (uint8_t *)&entry, info->val_len); if (struct_migration) { - entry.timestamp = wakeup_id; // WakeupId (key) is a timestamp - entry.utc = false; // If we're migrating, this has not been utc + entry.timestamp = wakeup_id; // WakeupId (key) is a timestamp + entry.utc = false; // If we're migrating, this has not been utc } int32_t timestamp = entry.timestamp; @@ -285,8 +275,8 @@ static void prv_update_events_callback(SettingsFile *old_file, SettingsFile *new // schedule non-expired events if (time_difference > 0) { // Using settings_file_rewrite, need to write to keep key/value - settings_file_set(new_file, (uint8_t*)&wakeup_id, sizeof(WakeupId), - (uint8_t*)&entry, sizeof(WakeupEntry)); + settings_file_set(new_file, (uint8_t *)&wakeup_id, sizeof(WakeupId), (uint8_t *)&entry, + sizeof(WakeupEntry)); } else { if (entry.notify_if_missed) { if (missed_events->missed_app_ids == NULL) { @@ -309,8 +299,7 @@ static void prv_update_events_callback(SettingsFile *old_file, SettingsFile *new } void wakeup_init(void) { - struct prv_missed_events_s missed_events = { 0, NULL }; - + struct prv_missed_events_s missed_events = {0, NULL}; event_service_init(PEBBLE_WAKEUP_EVENT, NULL, NULL); @@ -345,16 +334,14 @@ void wakeup_init(void) { } } - static bool prv_compiled_without_utc_support(void) { static const Version first_utc_version = { - // See list of changes in pebble_process_info.h. Apps compiled prior to this version will - // get local time returned from the time() call. - 0x5, - 0x2f + // See list of changes in pebble_process_info.h. Apps compiled prior to this version will + // get local time returned from the time() call. + 0x5, 0x2f }; - Version app_sdk_version = process_metadata_get_sdk_version( - sys_process_manager_get_current_process_md()); + Version app_sdk_version = + process_metadata_get_sdk_version(sys_process_manager_get_current_process_md()); if (version_compare(app_sdk_version, first_utc_version) < 0) { return true; @@ -362,10 +349,8 @@ static bool prv_compiled_without_utc_support(void) { return false; } - DEFINE_SYSCALL(WakeupId, sys_wakeup_schedule, time_t timestamp, int32_t reason, - bool notify_if_missed) { - + bool notify_if_missed) { if (prv_compiled_without_utc_support()) { // Legacy apps get local time returned from the time() call. timestamp = time_local_to_utc(timestamp); @@ -383,11 +368,11 @@ DEFINE_SYSCALL(WakeupId, sys_wakeup_schedule, time_t timestamp, int32_t reason, Uuid uuid = app_manager_get_current_app_md()->uuid; WakeupEntry entry = { - .uuid = uuid, - .reason = reason, - .notify_if_missed = notify_if_missed, - .timestamp = timestamp, - .utc = clock_is_timezone_set() + .uuid = uuid, + .reason = reason, + .notify_if_missed = notify_if_missed, + .timestamp = timestamp, + .utc = clock_is_timezone_set() }; // Add to settings file @@ -404,13 +389,12 @@ DEFINE_SYSCALL(WakeupId, sys_wakeup_schedule, time_t timestamp, int32_t reason, return wakeup_id; } - static void prv_wakeup_settings_delete_entry(WakeupId wakeup_id) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); { SettingsFile wakeup_settings; if (settings_file_open(&wakeup_settings, SETTINGS_FILE_NAME, SETTINGS_FILE_SIZE) == S_SUCCESS) { - settings_file_delete(&wakeup_settings, (uint8_t*)&wakeup_id, sizeof(WakeupId)); + settings_file_delete(&wakeup_settings, (uint8_t *)&wakeup_id, sizeof(WakeupId)); settings_file_close(&wakeup_settings); } } @@ -424,8 +408,8 @@ static WakeupEntry prv_wakeup_settings_get_entry(WakeupId wakeup_id) { { SettingsFile wakeup_settings; if (settings_file_open(&wakeup_settings, SETTINGS_FILE_NAME, SETTINGS_FILE_SIZE) == S_SUCCESS) { - settings_file_get(&wakeup_settings, (uint8_t*)&wakeup_id, sizeof(WakeupId), - (uint8_t*)&entry, sizeof(WakeupEntry)); + settings_file_get(&wakeup_settings, (uint8_t *)&wakeup_id, sizeof(WakeupId), + (uint8_t *)&entry, sizeof(WakeupEntry)); settings_file_close(&wakeup_settings); } } @@ -434,7 +418,6 @@ static WakeupEntry prv_wakeup_settings_get_entry(WakeupId wakeup_id) { } DEFINE_SYSCALL(void, sys_wakeup_delete, WakeupId wakeup_id) { - WakeupEntry entry = prv_wakeup_settings_get_entry(wakeup_id); // Only allow owner to delete its own wakeup events @@ -448,24 +431,25 @@ DEFINE_SYSCALL(void, sys_wakeup_delete, WakeupId wakeup_id) { } } -static bool prv_check_count_and_availability_callback(SettingsFile *file, - SettingsRecordInfo *info, void *context) { +static bool prv_check_count_and_availability_callback(SettingsFile *file, SettingsRecordInfo *info, + void *context) { // Check if valid entry if (!context || info->key_len != sizeof(WakeupId) || info->val_len != sizeof(WakeupEntry)) { - return true; // continue iterating + return true; // continue iterating } - struct prv_check_app_and_wakeup_event_s *check = (struct prv_check_app_and_wakeup_event_s*)context; + struct prv_check_app_and_wakeup_event_s *check = + (struct prv_check_app_and_wakeup_event_s *)context; WakeupId wakeup_id; - info->get_key(file, (uint8_t*)&wakeup_id, sizeof(WakeupId)); + info->get_key(file, (uint8_t *)&wakeup_id, sizeof(WakeupId)); WakeupEntry entry; - info->get_val(file, (uint8_t*)&entry, sizeof(WakeupEntry)); + info->get_val(file, (uint8_t *)&entry, sizeof(WakeupEntry)); - //If we have already flagged an error, just skip the rest + // If we have already flagged an error, just skip the rest if (check->wakeup_count < S_SUCCESS) { - return true; // continue iterating + return true; // continue iterating } if (uuid_equal(&app_manager_get_current_app_md()->uuid, &entry.uuid)) { @@ -477,10 +461,9 @@ static bool prv_check_count_and_availability_callback(SettingsFile *file, check->wakeup_count = E_RANGE; } - return true; // continue iterating + return true; // continue iterating } - static StatusCode prv_wakeup_settings_add_entry(WakeupId wakeup_id, WakeupEntry entry) { status_t status = S_SUCCESS; @@ -491,8 +474,8 @@ static StatusCode prv_wakeup_settings_add_entry(WakeupId wakeup_id, WakeupEntry // Check if current app already has MAX_WAKEUP_EVENTS_PER_APP scheduled // or if the minute event window is already occupied struct prv_check_app_and_wakeup_event_s check = { - .wakeup_count = 0, - .wakeup_timestamp = entry.timestamp + .wakeup_count = 0, + .wakeup_timestamp = entry.timestamp }; settings_file_each(&wakeup_settings, prv_check_count_and_availability_callback, &check); @@ -501,8 +484,8 @@ static StatusCode prv_wakeup_settings_add_entry(WakeupId wakeup_id, WakeupEntry } else if (check.wakeup_count >= MAX_WAKEUP_EVENTS_PER_APP) { status = E_OUT_OF_RESOURCES; } else { - settings_file_set(&wakeup_settings, (uint8_t*)&wakeup_id, sizeof(WakeupId), - (uint8_t*)&entry, sizeof(WakeupEntry)); + settings_file_set(&wakeup_settings, (uint8_t *)&wakeup_id, sizeof(WakeupId), + (uint8_t *)&entry, sizeof(WakeupEntry)); } settings_file_close(&wakeup_settings); } else { @@ -515,17 +498,17 @@ static StatusCode prv_wakeup_settings_add_entry(WakeupId wakeup_id, WakeupEntry } static void prv_delete_events_by_uuid_callback(SettingsFile *old_file, SettingsFile *new_file, - SettingsRecordInfo *info, void *context) { + SettingsRecordInfo *info, void *context) { // Check if valid entry if (info->key_len != sizeof(WakeupId) || info->val_len != sizeof(WakeupEntry)) { return; } WakeupId wakeup_id; - info->get_key(old_file, (uint8_t*)&wakeup_id, sizeof(WakeupId)); + info->get_key(old_file, (uint8_t *)&wakeup_id, sizeof(WakeupId)); WakeupEntry entry; - info->get_val(old_file, (uint8_t*)&entry, sizeof(WakeupEntry)); + info->get_val(old_file, (uint8_t *)&entry, sizeof(WakeupEntry)); // If the UUID is equal, delete the entry if (uuid_equal(&app_manager_get_current_app_md()->uuid, &entry.uuid)) { @@ -535,14 +518,13 @@ static void prv_delete_events_by_uuid_callback(SettingsFile *old_file, SettingsF new_timer_stop(s_current_timer_id); } // Deletes the entry automatically if not written - } else { // Keep the entry + } else { // Keep the entry // Using settings_file_rewrite, need to write to keep key/value - settings_file_set(new_file, (uint8_t*)&wakeup_id, sizeof(WakeupId), - (uint8_t*)&entry, sizeof(WakeupEntry)); + settings_file_set(new_file, (uint8_t *)&wakeup_id, sizeof(WakeupId), (uint8_t *)&entry, + sizeof(WakeupEntry)); } } - DEFINE_SYSCALL(void, sys_wakeup_cancel_all_for_app, void) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); { @@ -572,8 +554,8 @@ DEFINE_SYSCALL(time_t, sys_wakeup_query, WakeupId wakeup_id) { SettingsFile wakeup_settings; if (settings_file_open(&wakeup_settings, SETTINGS_FILE_NAME, SETTINGS_FILE_SIZE) == S_SUCCESS) { // Check if the wakeup id is valid by seeing if it is in the wakeup settings_file - status = settings_file_get(&wakeup_settings, (uint8_t*)&wakeup_id, sizeof(WakeupId), - (uint8_t*)&entry, sizeof(WakeupEntry)); + status = settings_file_get(&wakeup_settings, (uint8_t *)&wakeup_id, sizeof(WakeupId), + (uint8_t *)&entry, sizeof(WakeupEntry)); settings_file_close(&wakeup_settings); } else { status = E_INTERNAL; @@ -603,8 +585,7 @@ void wakeup_enable(bool enable) { s_wakeup_enabled = enable; if (enable && !was_enabled) { prv_wakeup_timer_next_pending(); - } else if (!enable && s_current_timer_id && - new_timer_scheduled(s_current_timer_id, NULL)) { + } else if (!enable && s_current_timer_id && new_timer_scheduled(s_current_timer_id, NULL)) { new_timer_stop(s_current_timer_id); } } @@ -622,7 +603,7 @@ void wakeup_migrate_timezone(int utc_diff) { { SettingsFile wakeup_settings; if (settings_file_open(&wakeup_settings, SETTINGS_FILE_NAME, SETTINGS_FILE_SIZE) == S_SUCCESS) { - settings_file_rewrite(&wakeup_settings, prv_migrate_events_callback, (void*)&utc_diff); + settings_file_rewrite(&wakeup_settings, prv_migrate_events_callback, (void *)&utc_diff); settings_file_close(&wakeup_settings); } else { PBL_LOG_ERR("Error: could not open wakeup settings"); @@ -633,7 +614,7 @@ void wakeup_migrate_timezone(int utc_diff) { static void prv_wakeup_rewrite_kernel_bg_cb(void *data) { // Update each wakeup entry via prv_update_events_callback and record any missed events - struct prv_missed_events_s missed_events = { 0, NULL }; + struct prv_missed_events_s missed_events = {0, NULL}; pbl_mutex_lock(&s_mutex, PBL_FOREVER); { diff --git a/src/fw/services/weather/weather_service.c b/src/fw/services/weather/weather_service.c index 24c653ec7f..238ed98f1a 100644 --- a/src/fw/services/weather/weather_service.c +++ b/src/fw/services/weather/weather_service.c @@ -57,8 +57,8 @@ static bool prv_fill_forecast_from_entry(WeatherDBEntry *entry, const uint16_t location_pstring_length = location_pstring->str_length; if (!is_valid_entry_update_time || (location_pstring_length == 0)) { - PBL_LOG_ERR("Invalid entry. Valid UT: %u, location length: %"PRIu16, - is_valid_entry_update_time, location_pstring_length); + PBL_LOG_ERR("Invalid entry. Valid UT: %u, location length: %" PRIu16, + is_valid_entry_update_time, location_pstring_length); return false; } @@ -67,16 +67,16 @@ static bool prv_fill_forecast_from_entry(WeatherDBEntry *entry, return false; } - *forecast_out = (WeatherLocationForecast) { - .is_current_location = entry->is_current_location, - .current_temp = entry->current_temp, - .today_high = entry->today_high_temp, - .today_low = entry->today_low_temp, - .current_weather_type = entry->current_weather_type, - .tomorrow_high = entry->tomorrow_high_temp, - .tomorrow_low = entry->tomorrow_low_temp, - .tomorrow_weather_type = entry->tomorrow_weather_type, - .time_updated_utc = entry->last_update_time_utc, + *forecast_out = (WeatherLocationForecast){ + .is_current_location = entry->is_current_location, + .current_temp = entry->current_temp, + .today_high = entry->today_high_temp, + .today_low = entry->today_low_temp, + .current_weather_type = entry->current_weather_type, + .tomorrow_high = entry->tomorrow_high_temp, + .tomorrow_low = entry->tomorrow_low_temp, + .tomorrow_weather_type = entry->tomorrow_weather_type, + .time_updated_utc = entry->last_update_time_utc, }; // add 1 for null terminator @@ -104,8 +104,7 @@ static bool prv_get_location_index(Uuid *location, SerializedWeatherAppPrefs *pr return false; } -static void prv_add_to_list_if_valid(WeatherDBKey *key, WeatherDBEntry *entry, - void *context) { +static void prv_add_to_list_if_valid(WeatherDBKey *key, WeatherDBEntry *entry, void *context) { WeatherDBIteratorContext *iterator_context = context; SerializedWeatherAppPrefs *prefs = iterator_context->serialized_prefs; char key_string_buffer[UUID_STRING_BUFFER_LENGTH] = {0}; @@ -113,9 +112,8 @@ static void prv_add_to_list_if_valid(WeatherDBKey *key, WeatherDBEntry *entry, if (!prv_get_location_index(key, prefs, &location_index)) { uuid_to_string(key, key_string_buffer); - PBL_LOG_WRN("Weather location %s has no known ordering! Skipping", - key_string_buffer); - return; // location not found in ordering list, skip over + PBL_LOG_WRN("Weather location %s has no known ordering! Skipping", key_string_buffer); + return; // location not found in ordering list, skip over } WeatherDataListNode *node = task_zalloc_check(sizeof(WeatherDataListNode)); @@ -133,11 +131,8 @@ static void prv_add_to_list_if_valid(WeatherDBKey *key, WeatherDBEntry *entry, list_init(to_add); const bool ascending = true; - iterator_context->head = - (WeatherDataListNode *)list_sorted_add((ListNode *)iterator_context->head, - to_add, - prv_weather_data_list_node_comparator, - ascending); + iterator_context->head = (WeatherDataListNode *)list_sorted_add( + (ListNode *)iterator_context->head, to_add, prv_weather_data_list_node_comparator, ascending); iterator_context->count++; } @@ -171,8 +166,8 @@ static void prv_update_default_location_cache(void) { goto cleanup; } - const int entry_len = weather_db_get_len((uint8_t *)&default_location_key, - sizeof(default_location_key)); + const int entry_len = + weather_db_get_len((uint8_t *)&default_location_key, sizeof(default_location_key)); if (entry_len == 0) { goto cleanup; } @@ -233,35 +228,35 @@ static void prv_blobdb_event_handler(PebbleEvent *event, void *context) { WeatherEventType type; - const bool is_key_weather_app_pref = blobdb_event->key && + const bool is_key_weather_app_pref = + blobdb_event->key && (memcmp(blobdb_event->key, PREF_KEY_WEATHER_APP, strlen(PREF_KEY_WEATHER_APP)) == 0); if (blobdb_id == BlobDBIdWatchAppPrefs && ((blobdb_event->type == BlobDBEventTypeFlush) || is_key_weather_app_pref)) { type = WeatherEventType_WeatherOrderChanged; } else if (blobdb_id == BlobDBIdWeather) { - type = blobdb_event->type == BlobDBEventTypeInsert ? WeatherEventType_WeatherDataAdded : - WeatherEventType_WeatherDataRemoved; + type = blobdb_event->type == BlobDBEventTypeInsert ? WeatherEventType_WeatherDataAdded + : WeatherEventType_WeatherDataRemoved; } else { return; } prv_update_default_location_cache(); - PebbleEvent e = (PebbleEvent) { - .type = PEBBLE_WEATHER_EVENT, - .weather = (PebbleWeatherEvent) { - .type = type, - }, + PebbleEvent e = (PebbleEvent){ + .type = PEBBLE_WEATHER_EVENT, + .weather = (PebbleWeatherEvent){ + .type = type, + }, }; event_put(&e); } void weather_service_init(void) { - static EventServiceInfo s_blobdb_event_info = { - .type = PEBBLE_BLOBDB_EVENT, - .handler = prv_blobdb_event_handler, + .type = PEBBLE_BLOBDB_EVENT, + .handler = prv_blobdb_event_handler, }; prv_update_default_location_cache(); @@ -269,7 +264,7 @@ void weather_service_init(void) { } WeatherDataListNode *weather_service_locations_list_create(size_t *count_out) { - WeatherDBIteratorContext context = (WeatherDBIteratorContext) {}; + WeatherDBIteratorContext context = (WeatherDBIteratorContext){}; SerializedWeatherAppPrefs *prefs = watch_app_prefs_get_weather(); if (!prefs) { return NULL; diff --git a/src/fw/services/weather/weather_types.c b/src/fw/services/weather/weather_types.c index c0d30d03e6..ad0f03ffc7 100644 --- a/src/fw/services/weather/weather_types.c +++ b/src/fw/services/weather/weather_types.c @@ -28,7 +28,7 @@ static uint8_t s_weather_type_text_colors[] = { static TimelineResourceId s_weather_type_timeline_resource_ids[] = { #define WEATHER_TYPE_TUPLE(id, numeric_id, bg_color, text_color, timeline_resource_id) \ - timeline_resource_id, + timeline_resource_id, #include "pbl/services/weather/weather_type_tuples.def" }; @@ -46,11 +46,11 @@ GColor weather_type_get_bg_color(WeatherType weather_type) { #if PBL_COLOR const size_t index = prv_get_array_index_of_type(weather_type); #endif - return PBL_IF_COLOR_ELSE((GColor) {.argb = s_weather_type_bg_colors[index]}, GColorClear); + return PBL_IF_COLOR_ELSE((GColor){.argb = s_weather_type_bg_colors[index]}, GColorClear); }; GColor weather_type_get_text_color(WeatherType weather_type) { - return (GColor) {.argb = s_weather_type_text_colors[prv_get_array_index_of_type(weather_type)]}; + return (GColor){.argb = s_weather_type_text_colors[prv_get_array_index_of_type(weather_type)]}; }; TimelineResourceId weather_type_get_timeline_resource_id(WeatherType weather_type) { diff --git a/src/fw/shell/normal/app_idle_timeout.c b/src/fw/shell/normal/app_idle_timeout.c index dd120ac866..eb7be86238 100644 --- a/src/fw/shell/normal/app_idle_timeout.c +++ b/src/fw/shell/normal/app_idle_timeout.c @@ -10,7 +10,6 @@ #include #include "system/passert.h" - TimerID s_timer; bool s_app_paused = false; bool s_app_started = false; @@ -21,7 +20,7 @@ bool s_touch_held = false; #ifndef CONFIG_NO_WATCH_TIMEOUT static const int WATCHFACE_TIMEOUT_MS = 30000; -static void prv_kernel_callback_watchface_launch(void* data) { +static void prv_kernel_callback_watchface_launch(void *data) { watchface_launch_default(shell_get_watchface_compositor_animation(true /* watchface_is_dest */)); } @@ -36,8 +35,8 @@ static void prv_start_timer(bool create) { } if (s_timer != TIMER_INVALID_ID && !s_app_paused && !s_touch_held && s_app_started) { - bool success = new_timer_start(s_timer, WATCHFACE_TIMEOUT_MS, prv_timeout_expired, - NULL, 0 /* flags */); + bool success = + new_timer_start(s_timer, WATCHFACE_TIMEOUT_MS, prv_timeout_expired, NULL, 0 /* flags */); PBL_ASSERTN(success); } } diff --git a/src/fw/shell/normal/app_idle_timeout.h b/src/fw/shell/normal/app_idle_timeout.h index b58276b902..4717937e4a 100644 --- a/src/fw/shell/normal/app_idle_timeout.h +++ b/src/fw/shell/normal/app_idle_timeout.h @@ -6,19 +6,20 @@ //! Start using the idle timeout for the current app. void app_idle_timeout_start(void); -//! Stop using the idle timeout for the current app. This is safe to call even if the idle timeout wasn't running. +//! Stop using the idle timeout for the current app. This is safe to call even if the idle timeout +//! wasn't running. void app_idle_timeout_stop(void); -//! Pause the idle timeout for the current app. This is safe to call even if the idle timeout wasn't running -//! previously. +//! Pause the idle timeout for the current app. This is safe to call even if the idle timeout wasn't +//! running previously. void app_idle_timeout_pause(void); -//! Resume the idle timeout for the current app. This is safe to call even if the idle timeout wasn't running -//! previously. +//! Resume the idle timeout for the current app. This is safe to call even if the idle timeout +//! wasn't running previously. void app_idle_timeout_resume(void); -//! Reset the timeout. Call this whenever there is activity that should prevent the idle timeout from firing. This -//! is safe to call even if the idle timeout wasn't running previously. +//! Reset the timeout. Call this whenever there is activity that should prevent the idle timeout +//! from firing. This is safe to call even if the idle timeout wasn't running previously. void app_idle_timeout_refresh(void); //! Halt the idle timeout while a finger is on the touchscreen. Unlike pause/resume, this state @@ -28,4 +29,3 @@ void app_idle_timeout_touch_down(void); //! Restart the idle timeout when the finger lifts off. Safe to call even if the idle timeout //! isn't running or no touch-down was observed. void app_idle_timeout_touch_up(void); - diff --git a/src/fw/shell/normal/battery_ui.c b/src/fw/shell/normal/battery_ui.c index b5ca8cd46a..71b1985c52 100644 --- a/src/fw/shell/normal/battery_ui.c +++ b/src/fw/shell/normal/battery_ui.c @@ -31,13 +31,12 @@ typedef struct { /////////////////////// static const GColor s_warning_color[] = { - { .argb = GColorLightGrayARGB8 }, - { .argb = GColorRedARGB8 }, + {.argb = GColorLightGrayARGB8}, + {.argb = GColorRedARGB8}, }; static const ResourceId s_warning_icon[] = { - RESOURCE_ID_BATTERY_ICON_LOW_LARGE, - RESOURCE_ID_BATTERY_ICON_VERY_LOW_LARGE + RESOURCE_ID_BATTERY_ICON_LOW_LARGE, RESOURCE_ID_BATTERY_ICON_VERY_LOW_LARGE }; static void prv_update_ui_fully_charged(Dialog *dialog, void *ignored) { @@ -84,13 +83,14 @@ static void prv_display_modal(WindowStack *stack, DialogUpdateFn update_fn, void return; } - SimpleDialog *new_simple_dialog = simple_dialog_create( - WINDOW_NAME("Battery Status")); + SimpleDialog *new_simple_dialog = simple_dialog_create(WINDOW_NAME("Battery Status")); Dialog *new_dialog = simple_dialog_get_dialog(new_simple_dialog); - dialog_set_callbacks(new_dialog, &(DialogCallbacks) { - .unload = prv_dialog_on_unload, - }, NULL); + dialog_set_callbacks(new_dialog, + &(DialogCallbacks){ + .unload = prv_dialog_on_unload, + }, + NULL); update_fn(new_dialog, data); Dialog *old_dialog = s_dialog; @@ -112,8 +112,8 @@ static void prv_display_modal(WindowStack *stack, DialogUpdateFn update_fn, void const int num_lines = 3; const int line_spacing_delta = -4; const int text_shift_y = -2; - const int text_box_height = (font_height + text_cap_height) * num_lines + - line_spacing_delta * (num_lines - 1); + const int text_box_height = + (font_height + text_cap_height) * num_lines + line_spacing_delta * (num_lines - 1); const int text_flow_inset = 6; // Modify to allow longer central lines text_layer_enable_screen_text_flow_and_paging(text_layer, text_flow_inset); text_layer_set_size(text_layer, GSize(DISP_COLS, text_box_height)); @@ -153,9 +153,9 @@ void battery_ui_display_warning(uint32_t percent, BatteryUIWarningLevel warning_ WindowStack *stack = modal_manager_get_window_stack(ModalPriorityAlert); BatteryWarningDisplayData display_data = { - .percent = percent, - .background_color = s_warning_color[warning_level], - .warning_icon = s_warning_icon[warning_level], + .percent = percent, + .background_color = s_warning_color[warning_level], + .warning_icon = s_warning_icon[warning_level], }; prv_display_modal(stack, prv_update_ui_warning, &display_data); } diff --git a/src/fw/shell/normal/battery_ui_fsm.c b/src/fw/shell/normal/battery_ui_fsm.c index e8d8cc0160..a042ba72b0 100644 --- a/src/fw/shell/normal/battery_ui_fsm.c +++ b/src/fw/shell/normal/battery_ui_fsm.c @@ -35,7 +35,7 @@ typedef enum BatteryUIStateID { BatteryLowPower, BatteryCritical, BatteryCharging, - BatteryFullyCharged, // plugged but not charging (aka 100%) + BatteryFullyCharged, // plugged but not charging (aka 100%) BatteryShutdownCharging } BatteryUIStateID; @@ -58,37 +58,45 @@ static void prv_dismiss_fully_charged(void); static void prv_shutdown(void *ignored); static const BatteryUIState ui_states[] = { - [BatteryGood] = { .next_state = { - BatteryWarning, BatteryLowPower, BatteryCritical, BatteryCharging, BatteryFullyCharged - }}, - [BatteryWarning] = { .enter = prv_display_warning, .exit = prv_dismiss_warning, .next_state = { - BatteryGood, BatteryWarning, BatteryLowPower, BatteryCharging - }}, - [BatteryLowPower] = { .enter = prv_enter_low_power, .exit = prv_exit_low_power, .next_state = { - BatteryWarning, BatteryCritical, BatteryCharging - }}, - [BatteryCritical] = { .enter = prv_enter_critical, .exit = prv_exit_critical, .next_state = { - BatteryLowPower, BatteryCharging - }}, - [BatteryCharging] = { .enter = prv_display_plugged, .exit = prv_dismiss_plugged, .next_state = { - BatteryGood, BatteryWarning, BatteryLowPower, - BatteryCritical, BatteryFullyCharged, BatteryShutdownCharging - }}, - [BatteryFullyCharged] = { .enter = prv_display_fully_charged, .exit = prv_dismiss_fully_charged, - .next_state = { - BatteryGood, BatteryWarning, BatteryLowPower, BatteryCritical, BatteryShutdownCharging - }}, - [BatteryShutdownCharging] = { .enter = prv_shutdown } + [BatteryGood] = + {.next_state = + {BatteryWarning, BatteryLowPower, BatteryCritical, BatteryCharging, + BatteryFullyCharged}}, + [BatteryWarning] = + {.enter = prv_display_warning, + .exit = prv_dismiss_warning, + .next_state = {BatteryGood, BatteryWarning, BatteryLowPower, BatteryCharging}}, + [BatteryLowPower] = + {.enter = prv_enter_low_power, + .exit = prv_exit_low_power, + .next_state = {BatteryWarning, BatteryCritical, BatteryCharging}}, + [BatteryCritical] = + {.enter = prv_enter_critical, + .exit = prv_exit_critical, + .next_state = {BatteryLowPower, BatteryCharging}}, + [BatteryCharging] = + {.enter = prv_display_plugged, + .exit = prv_dismiss_plugged, + .next_state = + {BatteryGood, BatteryWarning, BatteryLowPower, BatteryCritical, BatteryFullyCharged, + BatteryShutdownCharging}}, + [BatteryFullyCharged] = + {.enter = prv_display_fully_charged, + .exit = prv_dismiss_fully_charged, + .next_state = + {BatteryGood, BatteryWarning, BatteryLowPower, BatteryCritical, + BatteryShutdownCharging}}, + [BatteryShutdownCharging] = {.enter = prv_shutdown} }; static BatteryUIStateID s_state = BatteryGood; static BatteryUIWarningLevel s_warning_points_index = -1; /* Default warnings are at 18 and 12 hours remaining. */ -static const uint8_t s_warning_points[] = { 18, 12 }; +static const uint8_t s_warning_points[] = {18, 12}; static const uint8_t s_warning_percentages[] = { - CONFIG_BATTERY_WARNING_FIRST_PERCENT, - CONFIG_BATTERY_WARNING_SECOND_PERCENT, + CONFIG_BATTERY_WARNING_FIRST_PERCENT, + CONFIG_BATTERY_WARNING_SECOND_PERCENT, }; static uint8_t prv_get_warning_percent(BatteryUIWarningLevel level) { @@ -146,8 +154,8 @@ static void prv_enter_low_power(void *ignored) { // Override the vibe intensity to Medium in low-power mode vibes_set_default_vibe_strength(get_strength_for_intensity(VibeIntensityMedium)); #else - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = prf_low_power_app_get_info(), + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = prf_low_power_app_get_info(), }); #endif } @@ -169,8 +177,8 @@ static void prv_enter_critical(void *ignored) { // in case there is a warning on screen modal_manager_pop_all(); modal_manager_set_min_priority(ModalPriorityMax); - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = APP_ID_BATTERY_CRITICAL, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = APP_ID_BATTERY_CRITICAL, }); } diff --git a/src/fw/shell/normal/prefs.c b/src/fw/shell/normal/prefs.c index e8b2d9dffe..7ef8e7616d 100644 --- a/src/fw/shell/normal/prefs.c +++ b/src/fw/shell/normal/prefs.c @@ -78,11 +78,11 @@ static uint32_t s_backlight_timeout_ms = DEFAULT_BACKLIGHT_TIMEOUT_MS; #define BACKLIGHT_INTENSITY_MEDIUM 25U #define BACKLIGHT_INTENSITY_HIGH 50U #define BACKLIGHT_INTENSITY_DEFAULT BACKLIGHT_INTENSITY_MEDIUM -static uint8_t s_backlight_intensity; // default set in shell_prefs_init() +static uint8_t s_backlight_intensity; // default set in shell_prefs_init() #ifdef CONFIG_BACKLIGHT_HAS_COLOR #define PREF_KEY_BACKLIGHT_COLOR "lightColor" -static uint32_t s_backlight_color; // default pulled from BOARD_CONFIG in shell_prefs_init() +static uint32_t s_backlight_color; // default pulled from BOARD_CONFIG in shell_prefs_init() #endif #define PREF_KEY_BACKLIGHT_MOTION "lightMotion" @@ -98,7 +98,7 @@ static bool s_touch_enabled = true; static bool s_touch_navigation_menu_enabled = true; #define PREF_KEY_MOTION_SENSITIVITY "motionSensitivity" -static uint8_t s_motion_sensitivity = 55; // Default to Medium +static uint8_t s_motion_sensitivity = 55; // Default to Medium #ifdef CONFIG_DYNAMIC_BACKLIGHT #define PREF_KEY_BACKLIGHT_DYNAMIC_MODE "lightDynamicMode" @@ -127,45 +127,48 @@ typedef struct BacklightPresetSettings { } BacklightPresetSettings; static const BacklightPresetSettings s_backlight_preset_settings[] = { - [BacklightPreset_MaxBrightness] = { - .ambient_sensor_enabled = true, + [BacklightPreset_MaxBrightness] = + { + .ambient_sensor_enabled = true, #ifdef CONFIG_DYNAMIC_BACKLIGHT - .dynamic_mode = BacklightDynamicMode_Off, + .dynamic_mode = BacklightDynamicMode_Off, #endif - .intensity = BACKLIGHT_INTENSITY_MAX, - .timeout_ms = 5000, - .motion_enabled = true, - .touch_wake = BacklightTouchWake_DoubleTap, - }, - [BacklightPreset_Standard] = { - .ambient_sensor_enabled = true, + .intensity = BACKLIGHT_INTENSITY_MAX, + .timeout_ms = 5000, + .motion_enabled = true, + .touch_wake = BacklightTouchWake_DoubleTap, + }, + [BacklightPreset_Standard] = + { + .ambient_sensor_enabled = true, #ifdef CONFIG_DYNAMIC_BACKLIGHT - .dynamic_mode = BacklightDynamicMode_Standard, + .dynamic_mode = BacklightDynamicMode_Standard, #endif - .intensity = BACKLIGHT_INTENSITY_HIGH, - .timeout_ms = DEFAULT_BACKLIGHT_TIMEOUT_MS, - .motion_enabled = true, - .touch_wake = BacklightTouchWake_DoubleTap, - }, - [BacklightPreset_BatterySaver] = { - .ambient_sensor_enabled = true, + .intensity = BACKLIGHT_INTENSITY_HIGH, + .timeout_ms = DEFAULT_BACKLIGHT_TIMEOUT_MS, + .motion_enabled = true, + .touch_wake = BacklightTouchWake_DoubleTap, + }, + [BacklightPreset_BatterySaver] = { + .ambient_sensor_enabled = true, #ifdef CONFIG_DYNAMIC_BACKLIGHT - .dynamic_mode = BacklightDynamicMode_Dim, + .dynamic_mode = BacklightDynamicMode_Dim, #endif - .intensity = BACKLIGHT_INTENSITY_MEDIUM, - .timeout_ms = DEFAULT_BACKLIGHT_TIMEOUT_MS, - .motion_enabled = true, - .touch_wake = BacklightTouchWake_DoubleTap, - }, + .intensity = BACKLIGHT_INTENSITY_MEDIUM, + .timeout_ms = DEFAULT_BACKLIGHT_TIMEOUT_MS, + .motion_enabled = true, + .touch_wake = BacklightTouchWake_DoubleTap, + }, }; #ifdef CONFIG_ORIENTATION_MANAGER #define PREF_KEY_DISPLAY_ORIENTATION_LEFT_HANDED "displayOrientationLeftHanded" static bool s_display_orientation_left = false; -#endif +#endif #define PREF_KEY_BACKLIGHT_AMBIENT_THRESHOLD "lightAmbientThreshold" -static uint32_t s_backlight_ambient_threshold = 0; // default set from board config in shell_prefs_init() +static uint32_t s_backlight_ambient_threshold = + 0; // default set from board config in shell_prefs_init() #define PREF_KEY_STATIONARY "stationaryMode" static bool s_stationary_mode_enabled = true; @@ -198,23 +201,23 @@ typedef struct QuickLaunchPreference { #define PREF_KEY_QUICK_LAUNCH_BACK "qlBack" static QuickLaunchPreference s_quick_launch_up = { - .enabled = false, - .uuid = UUID_INVALID_INIT, + .enabled = false, + .uuid = UUID_INVALID_INIT, }; static QuickLaunchPreference s_quick_launch_down = { - .enabled = false, - .uuid = UUID_INVALID_INIT, + .enabled = false, + .uuid = UUID_INVALID_INIT, }; static QuickLaunchPreference s_quick_launch_select = { - .enabled = false, - .uuid = UUID_INVALID_INIT, + .enabled = false, + .uuid = UUID_INVALID_INIT, }; static QuickLaunchPreference s_quick_launch_back = { - .enabled = true, - .uuid = QUIET_TIME_TOGGLE_UUID, + .enabled = true, + .uuid = QUIET_TIME_TOGGLE_UUID, }; #define PREF_KEY_QUICK_LAUNCH_SINGLE_CLICK_UP "qlSingleClickUp" @@ -223,23 +226,23 @@ static QuickLaunchPreference s_quick_launch_back = { #define PREF_KEY_QUICK_LAUNCH_COMBO_UP_DOWN "qlComboUpDown" static QuickLaunchPreference s_quick_launch_single_click_up = { - .enabled = true, - .uuid = UUID_HEALTH_DATA_SOURCE, + .enabled = true, + .uuid = UUID_HEALTH_DATA_SOURCE, }; static QuickLaunchPreference s_quick_launch_single_click_down = { - .enabled = true, - .uuid = TIMELINE_UUID_INIT, + .enabled = true, + .uuid = TIMELINE_UUID_INIT, }; static QuickLaunchPreference s_quick_launch_combo_back_up = { - .enabled = false, - .uuid = UUID_INVALID_INIT, + .enabled = false, + .uuid = UUID_INVALID_INIT, }; static QuickLaunchPreference s_quick_launch_combo_up_down = { - .enabled = false, - .uuid = UUID_INVALID_INIT, + .enabled = false, + .uuid = UUID_INVALID_INIT, }; #define PREF_KEY_QUICK_LAUNCH_SETUP_OPENED "qlSetupOpened" @@ -306,7 +309,7 @@ static bool s_settings_dbs_compacted_v1 = false; static bool s_als_threshold_migrated_v1 = false; static bool s_als_threshold_migrated_v2 = false; #ifdef CONFIG_APP_SCALING -static uint8_t s_legacy_app_render_mode = 1; // Default to scaled mode +static uint8_t s_legacy_app_render_mode = 1; // Default to scaled mode #endif #ifdef CONFIG_THEMING @@ -347,8 +350,8 @@ static bool prv_set_s_clock_24h(bool *new_value) { s_clock_24h = *new_value; // Fire a tick event so watchfaces re-render with the new time format PebbleEvent e = { - .type = PEBBLE_TICK_EVENT, - .clock_tick.tick_time = rtc_get_time(), + .type = PEBBLE_TICK_EVENT, + .clock_tick.tick_time = rtc_get_time(), }; event_put(&e); } else { @@ -515,17 +518,17 @@ static bool prv_set_s_backlight_preset(uint8_t *preset) { static bool prv_set_s_motion_sensitivity(uint8_t *sensitivity) { // Clamp sensitivity to 0-100 range if (*sensitivity > 100) { - s_motion_sensitivity = 100; // Reset to default if invalid + s_motion_sensitivity = 100; // Reset to default if invalid return false; } s_motion_sensitivity = *sensitivity; - - // Update accelerometer sensitivity in accel_manager - // This applies the setting to the hardware - #ifdef CONFIG_ACCEL_SENSITIVITY + +// Update accelerometer sensitivity in accel_manager +// This applies the setting to the hardware +#ifdef CONFIG_ACCEL_SENSITIVITY accel_manager_update_sensitivity(*sensitivity); - #endif - +#endif + return true; } @@ -670,8 +673,8 @@ static bool prv_set_s_activity_preferences(ActivitySettings *new_settings) { } if (!(new_settings->gender == ActivityGenderMale || - new_settings->gender == ActivityGenderFemale || - new_settings->gender == ActivityGenderOther)) { + new_settings->gender == ActivityGenderFemale || + new_settings->gender == ActivityGenderOther)) { new_settings->gender = ACTIVITY_DEFAULT_GENDER; invalid_data = true; } @@ -748,14 +751,13 @@ static bool prv_set_s_activity_hrm_preferences(ActivityHRMSettings *new_settings #ifdef CONFIG_HRM hrm_manager_handle_prefs_changed(); -#endif // CONFIG_HRM +#endif // CONFIG_HRM #if BLE_HRM_SERVICE ble_hrm_handle_activity_prefs_heart_rate_is_enabled(new_settings->enabled); -#endif // BLE_HRM_SERVICE +#endif // BLE_HRM_SERVICE return true; } - static uint8_t prv_set_s_timeline_settings_opened(uint8_t *version) { s_timeline_settings_opened = *version; return true; @@ -840,16 +842,16 @@ static bool prv_is_valid_theme_color(GColor color) { } // Valid colors from settings_themes.h static const uint8_t valid_colors[] = { - GColorSunsetOrangeARGB8, // Red - GColorChromeYellowARGB8, // Orange - GColorYellowARGB8, // Yellow - GColorGreenARGB8, // Green - GColorCyanARGB8, // Cyan - GColorVividCeruleanARGB8, // Light Blue - GColorVeryLightBlueARGB8, // Royal Blue - GColorLavenderIndigoARGB8, // Purple - GColorMagentaARGB8, // Magenta - GColorBrilliantRoseARGB8, // Pink + GColorSunsetOrangeARGB8, // Red + GColorChromeYellowARGB8, // Orange + GColorYellowARGB8, // Yellow + GColorGreenARGB8, // Green + GColorCyanARGB8, // Cyan + GColorVividCeruleanARGB8, // Light Blue + GColorVeryLightBlueARGB8, // Royal Blue + GColorLavenderIndigoARGB8, // Purple + GColorMagentaARGB8, // Magenta + GColorBrilliantRoseARGB8, // Pink }; for (size_t i = 0; i < ARRAY_LENGTH(valid_colors); i++) { if (color.argb == valid_colors[i]) { @@ -861,8 +863,7 @@ static bool prv_is_valid_theme_color(GColor color) { static bool prv_set_s_theme_highlight_color(GColor *color) { if (!prv_is_valid_theme_color(*color)) { - PBL_LOG_WRN("Invalid menu highlight color 0x%02x, using default", - color->argb); + PBL_LOG_WRN("Invalid menu highlight color 0x%02x, using default", color->argb); s_theme_highlight_color = GColorVividCerulean; return false; // Reject invalid value } @@ -899,7 +900,7 @@ static bool prv_set_s_music_show_album_art(bool *enabled) { s_music_show_album_art = *enabled; return true; } - + // ------------------------------------------------------------------------------------ // Table of all prefs typedef bool (*PrefSetHandler)(const void *value, size_t val_len); @@ -913,15 +914,15 @@ typedef struct { // The PREFS_DECLARE_HANDLER creates a springboard function with a generic signature // (of type PrefSetHandler) which simply calls into the specialized function prv_set_ // after dereferencing the void* argument using the right type for that pref -#define PREFS_MACRO(name, var) \ - static bool prv_set_ ## var ## _cb(const void *value, size_t val_len) { \ - return prv_set_ ## var ((__typeof__(var) *)value); \ +#define PREFS_MACRO(name, var) \ + static bool prv_set_##var##_cb(const void *value, size_t val_len) { \ + return prv_set_##var((__typeof__(var) *)value); \ } #include "prefs_values.h.inc" #undef PREFS_MACRO // Create a time containing the key name and global variable name for each pref -#define PREFS_MACRO(key, var) {key, &var, sizeof(var), prv_set_ ## var ## _cb}, +#define PREFS_MACRO(key, var) {key, &var, sizeof(var), prv_set_##var##_cb}, static const PrefsTableEntry s_prefs_table[] = { #include "prefs_values.h.inc" }; @@ -935,11 +936,11 @@ static void prv_convert_deprecated_backlight_behaviour_key(SettingsFile *file) { bool temp; BacklightBehaviour backlight_behaviour = BacklightBehaviour_Auto; settings_file_get(file, PREF_KEY_BACKLIGHT_BEHAVIOUR_DEPRECATED, - sizeof(PREF_KEY_BACKLIGHT_BEHAVIOUR_DEPRECATED), - &backlight_behaviour, sizeof(backlight_behaviour)); + sizeof(PREF_KEY_BACKLIGHT_BEHAVIOUR_DEPRECATED), &backlight_behaviour, + sizeof(backlight_behaviour)); temp = (backlight_behaviour != BacklightBehaviour_Off); - settings_file_set(file, PREF_KEY_BACKLIGHT_ENABLED, - sizeof(PREF_KEY_BACKLIGHT_ENABLED), &temp, sizeof(temp)); + settings_file_set(file, PREF_KEY_BACKLIGHT_ENABLED, sizeof(PREF_KEY_BACKLIGHT_ENABLED), &temp, + sizeof(temp)); temp = (backlight_behaviour != BacklightBehaviour_On); settings_file_set(file, PREF_KEY_BACKLIGHT_AMBIENT_SENSOR_ENABLED, sizeof(PREF_KEY_BACKLIGHT_AMBIENT_SENSOR_ENABLED), &temp, sizeof(temp)); @@ -956,8 +957,8 @@ static void prv_convert_deprecated_dynamic_intensity_key(SettingsFile *file) { sizeof(PREF_KEY_BACKLIGHT_DYNAMIC_INTENSITY_DEPRECATED))) { bool enabled = true; settings_file_get(file, PREF_KEY_BACKLIGHT_DYNAMIC_INTENSITY_DEPRECATED, - sizeof(PREF_KEY_BACKLIGHT_DYNAMIC_INTENSITY_DEPRECATED), - &enabled, sizeof(enabled)); + sizeof(PREF_KEY_BACKLIGHT_DYNAMIC_INTENSITY_DEPRECATED), &enabled, + sizeof(enabled)); const uint8_t mode = enabled ? BacklightDynamicMode_Standard : BacklightDynamicMode_Off; settings_file_set(file, PREF_KEY_BACKLIGHT_DYNAMIC_MODE, sizeof(PREF_KEY_BACKLIGHT_DYNAMIC_MODE), &mode, sizeof(mode)); @@ -967,13 +968,12 @@ static void prv_convert_deprecated_dynamic_intensity_key(SettingsFile *file) { } #endif - // ------------------------------------------------------------------------------------ -static void prv_pref_set(const char* key, const void *value, size_t val_len); +static void prv_pref_set(const char *key, const void *value, size_t val_len); void shell_prefs_init(void) { #ifdef CONFIG_QEMU - s_backlight_intensity = BACKLIGHT_INTENSITY_MAX; // Blinding + s_backlight_intensity = BACKLIGHT_INTENSITY_MAX; // Blinding #else // Match the Standard preset so fresh devices report Mode: Standard. s_backlight_intensity = s_backlight_preset_settings[BacklightPreset_Standard].intensity; @@ -1024,7 +1024,7 @@ void shell_prefs_init(void) { } settings_file_close(&file); - + if (!prv_backlight_intensity_is_valid(s_backlight_intensity)) { s_backlight_intensity = BACKLIGHT_INTENSITY_DEFAULT; } @@ -1073,7 +1073,7 @@ void shell_prefs_init(void) { // Update the ambient light driver with the loaded threshold value ambient_light_set_dark_threshold(s_backlight_ambient_threshold); - + // Initialize prefs sync (must be after prefs are loaded) prefs_sync_init(); @@ -1093,7 +1093,6 @@ void shell_prefs_init(void) { #endif } - // ------------------------------------------------------------------------------------ // Find the PrefsTableEntry for the given key static const PrefsTableEntry *prv_prefs_entry(const uint8_t *key, size_t key_len) { @@ -1108,13 +1107,12 @@ static const PrefsTableEntry *prv_prefs_entry(const uint8_t *key, size_t key_len return NULL; } - // ------------------------------------------------------------------------------------ // Set the backing store for a pref static bool prv_set_pref_backing(const PrefsTableEntry *entry, const void *value, int value_len) { if (value_len != entry->value_len) { - PBL_LOG_WRN("Attempt to set %s using invalid value_len of %"PRIu32"", - entry->key, (uint32_t)value_len); + PBL_LOG_WRN("Attempt to set %s using invalid value_len of %" PRIu32 "", entry->key, + (uint32_t)value_len); return false; } @@ -1126,7 +1124,7 @@ static bool prv_set_pref_backing(const PrefsTableEntry *entry, const void *value // Keys in the backing store include the null terminator, so we add 1 to key_len rv = settings_file_set(&file, entry->key, strlen(entry->key) + 1, value, value_len); if (rv != S_SUCCESS) { - PBL_LOG_WRN("Failed to set pref '%s' (%"PRIi32")", entry->key, (int32_t)rv); + PBL_LOG_WRN("Failed to set pref '%s' (%" PRIi32 ")", entry->key, (int32_t)rv); } settings_file_close(&file); } @@ -1135,19 +1133,19 @@ static bool prv_set_pref_backing(const PrefsTableEntry *entry, const void *value return (rv == S_SUCCESS); } - // ------------------------------------------------------------------------------------ // Convenience function used to update the state AND set the backing for a pref. This is // used by the functions below that are called by the firmware to change prefs (i.e. // shell_prefs_set.*, backlight_set.*, etc.). -static void prv_pref_set(const char* key, const void *value, size_t val_len) { +static void prv_pref_set(const char *key, const void *value, size_t val_len) { // Find the entry for this key const PrefsTableEntry *entry = prv_prefs_entry((const uint8_t *)key, strlen(key)); // validate the key and value length PBL_ASSERT(entry != NULL, "Key %s not found", key); - PBL_ASSERT(val_len == entry->value_len, "Attempt to set %s using invalid value_len of %"PRIu32"", - entry->key, (uint32_t)val_len); + PBL_ASSERT(val_len == entry->value_len, + "Attempt to set %s using invalid value_len of %" PRIu32 "", entry->key, + (uint32_t)val_len); // Call the update handler bool success = entry->handler(value, val_len); @@ -1159,11 +1157,10 @@ static void prv_pref_set(const char* key, const void *value, size_t val_len) { } } - // ------------------------------------------------------------------------------------ // Exported function used by blob_db API to set the backing store for a specific key bool prefs_private_write_backing(const uint8_t *key, size_t key_len, const void *value, - int value_len) { + int value_len) { const PrefsTableEntry *entry = prv_prefs_entry(key, key_len); if (!entry) { return false; @@ -1172,7 +1169,6 @@ bool prefs_private_write_backing(const uint8_t *key, size_t key_len, const void return prv_set_pref_backing(entry, value, value_len); } - // ------------------------------------------------------------------------------------ // Exported function used by blob_db API to get the length of a value in our backing store int prefs_private_get_backing_len(const uint8_t *key, size_t key_len) { @@ -1183,7 +1179,6 @@ int prefs_private_get_backing_len(const uint8_t *key, size_t key_len) { return entry->value_len; } - // ------------------------------------------------------------------------------------ // Exported function used by blob_db API to read our backing store bool prefs_private_read_backing(const uint8_t *key, size_t key_len, void *value, int value_len) { @@ -1193,8 +1188,8 @@ bool prefs_private_read_backing(const uint8_t *key, size_t key_len, void *value, } if (value_len != entry->value_len) { - PBL_LOG_WRN("Attempt to read %s using invalid value_len of %"PRIu32"", - entry->key, (uint32_t)value_len); + PBL_LOG_WRN("Attempt to read %s using invalid value_len of %" PRIu32 "", entry->key, + (uint32_t)value_len); return false; } @@ -1206,8 +1201,8 @@ bool prefs_private_read_backing(const uint8_t *key, size_t key_len, void *value, // Keys in the backing store include the null terminator // Use strlen(entry->key) + 1 to match how it was written, since key_len from // BlobDB may or may not include the null terminator - success = (settings_file_get(&file, entry->key, strlen(entry->key) + 1, value, value_len) - == S_SUCCESS); + success = (settings_file_get(&file, entry->key, strlen(entry->key) + 1, value, value_len) == + S_SUCCESS); settings_file_close(&file); } } @@ -1215,7 +1210,6 @@ bool prefs_private_read_backing(const uint8_t *key, size_t key_len, void *value, return success; } - void prefs_private_lock(void) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); } @@ -1224,7 +1218,6 @@ void prefs_private_unlock(void) { pbl_mutex_unlock(&s_mutex); } - // ------------------------------------------------------------------------------------ // Called from KernelMain when we get a blob DB event. We take this opportunity to update the state // of the given pref @@ -1239,8 +1232,8 @@ void prefs_private_handle_blob_db_event(PebbleBlobDBEvent *event) { } // Read in the updated value from the backing store - bool success = prefs_private_read_backing(event->key, event->key_len, entry->value, - entry->value_len); + bool success = + prefs_private_read_backing(event->key, event->key_len, entry->value, entry->value_len); if (success) { // Call the state update handler in case this pref needs to take other action besides // just updating the global @@ -1252,11 +1245,11 @@ void prefs_private_handle_blob_db_event(PebbleBlobDBEvent *event) { // Notify UI that a preference changed so it can refresh PebbleEvent pref_event = { - .type = PEBBLE_PREF_CHANGE_EVENT, - .pref_change = { - .key = entry->key, - .key_len = strlen(entry->key) + 1, - }, + .type = PEBBLE_PREF_CHANGE_EVENT, + .pref_change = { + .key = entry->key, + .key_len = strlen(entry->key) + 1, + }, }; event_put(&pref_event); } @@ -1285,7 +1278,7 @@ void shell_prefs_set_units_distance(UnitsDistance new_unit) { UnitsWind shell_prefs_get_units_wind(void) { if (s_units_wind == UnitsWind_FromDistance) { return (shell_prefs_get_units_distance() == UnitsDistance_Miles) ? UnitsWind_Mph - : UnitsWind_KmH; + : UnitsWind_KmH; } return s_units_wind; } @@ -1577,8 +1570,8 @@ AppInstallId quick_launch_get_app(ButtonId button) { } void quick_launch_set_app(ButtonId button, AppInstallId app_id) { - QuickLaunchPreference pref = (QuickLaunchPreference) { - .enabled = true, + QuickLaunchPreference pref = (QuickLaunchPreference){ + .enabled = true, }; app_install_get_uuid_for_install_id(app_id, &pref.uuid); @@ -1645,17 +1638,17 @@ uint8_t quick_launch_get_quick_launch_setup_opened(void) { } bool quick_launch_single_click_is_enabled(ButtonId button) { - switch (button) { - case BUTTON_ID_UP: - return s_quick_launch_single_click_up.enabled; - case BUTTON_ID_DOWN: - return s_quick_launch_single_click_down.enabled; - case BUTTON_ID_SELECT: - case BUTTON_ID_BACK: - case NUM_BUTTONS: - break; - } - return false; + switch (button) { + case BUTTON_ID_UP: + return s_quick_launch_single_click_up.enabled; + case BUTTON_ID_DOWN: + return s_quick_launch_single_click_down.enabled; + case BUTTON_ID_SELECT: + case BUTTON_ID_BACK: + case NUM_BUTTONS: + break; + } + return false; } AppInstallId quick_launch_single_click_get_app(ButtonId button) { @@ -1668,15 +1661,15 @@ AppInstallId quick_launch_single_click_get_app(ButtonId button) { uuid = &s_quick_launch_single_click_down.uuid; break; default: - PBL_ASSERTN(0); // Should not reach here: invalid button id + PBL_ASSERTN(0); // Should not reach here: invalid button id break; } return app_install_get_id_for_uuid(uuid); } void quick_launch_single_click_set_app(ButtonId button, AppInstallId app_id) { - QuickLaunchPreference pref = (QuickLaunchPreference) { - .enabled = true, + QuickLaunchPreference pref = (QuickLaunchPreference){ + .enabled = true, }; app_install_get_uuid_for_install_id(app_id, &pref.uuid); @@ -1689,7 +1682,7 @@ void quick_launch_single_click_set_app(ButtonId button, AppInstallId app_id) { key = PREF_KEY_QUICK_LAUNCH_SINGLE_CLICK_DOWN; break; default: - PBL_ASSERTN(0); // Should not reach here: invalid button id + PBL_ASSERTN(0); // Should not reach here: invalid button id break; } prv_pref_set(key, &pref, sizeof(pref)); @@ -1709,7 +1702,7 @@ void quick_launch_single_click_set_enabled(ButtonId button, bool enabled) { key = PREF_KEY_QUICK_LAUNCH_SINGLE_CLICK_DOWN; break; default: - PBL_ASSERTN(0); // Should not reach here: invalid button id + PBL_ASSERTN(0); // Should not reach here: invalid button id break; } pref.enabled = enabled; @@ -1725,8 +1718,8 @@ AppInstallId quick_launch_combo_back_up_get_app(void) { } void quick_launch_combo_back_up_set_app(AppInstallId app_id) { - QuickLaunchPreference pref = (QuickLaunchPreference) { - .enabled = true, + QuickLaunchPreference pref = (QuickLaunchPreference){ + .enabled = true, }; app_install_get_uuid_for_install_id(app_id, &pref.uuid); prv_pref_set(PREF_KEY_QUICK_LAUNCH_COMBO_BACK_UP, &pref, sizeof(pref)); @@ -1747,8 +1740,8 @@ AppInstallId quick_launch_combo_up_down_get_app(void) { } void quick_launch_combo_up_down_set_app(AppInstallId app_id) { - QuickLaunchPreference pref = (QuickLaunchPreference) { - .enabled = true, + QuickLaunchPreference pref = (QuickLaunchPreference){ + .enabled = true, }; app_install_get_uuid_for_install_id(app_id, &pref.uuid); prv_pref_set(PREF_KEY_QUICK_LAUNCH_COMBO_UP_DOWN, &pref, sizeof(pref)); @@ -1778,9 +1771,8 @@ uint8_t welcome_get_welcome_version(void) { } static bool prv_set_default_any_watchface_enumerate_callback(AppInstallEntry *entry, void *data) { - if (!app_install_entry_is_watchface(entry) - || app_install_entry_is_hidden(entry)) { - return true; // continue search + if (!app_install_entry_is_watchface(entry) || app_install_entry_is_hidden(entry)) { + return true; // continue search } watchface_set_default_install_id(entry->install_id); @@ -1790,11 +1782,9 @@ static bool prv_set_default_any_watchface_enumerate_callback(AppInstallEntry *en AppInstallId watchface_get_default_install_id(void) { AppInstallId app_id = app_install_get_id_for_uuid(&s_default_watchface); AppInstallEntry entry; - if (app_id == INSTALL_ID_INVALID || - !app_install_get_entry_for_install_id(app_id, &entry) || + if (app_id == INSTALL_ID_INVALID || !app_install_get_entry_for_install_id(app_id, &entry) || !app_install_entry_is_watchface(&entry)) { - app_install_enumerate_entries( - prv_set_default_any_watchface_enumerate_callback, NULL); + app_install_enumerate_entries(prv_set_default_any_watchface_enumerate_callback, NULL); app_id = app_install_get_id_for_uuid(&s_default_watchface); } return app_id; @@ -1802,8 +1792,7 @@ AppInstallId watchface_get_default_install_id(void) { void system_theme_set_content_size(PreferredContentSize content_size) { if (content_size >= NumPreferredContentSizes) { - PBL_LOG_WRN("Ignoring attempt to set content size to invalid size %d", - content_size); + PBL_LOG_WRN("Ignoring attempt to set content size to invalid size %d", content_size); return; } const uint8_t content_size_uint = content_size; @@ -1811,11 +1800,11 @@ void system_theme_set_content_size(PreferredContentSize content_size) { // Watch-side sets bypass the blob-db path, so notify subscribed UI here too. PebbleEvent pref_event = { - .type = PEBBLE_PREF_CHANGE_EVENT, - .pref_change = { - .key = PREF_KEY_TEXT_STYLE, - .key_len = sizeof(PREF_KEY_TEXT_STYLE), - }, + .type = PEBBLE_PREF_CHANGE_EVENT, + .pref_change = { + .key = PREF_KEY_TEXT_STYLE, + .key_len = sizeof(PREF_KEY_TEXT_STYLE), + }, }; event_put(&pref_event); } @@ -2158,8 +2147,7 @@ void pbl_analytics_external_collect_settings(void) { PBL_ANALYTICS_SET_UNSIGNED(settings_health_tracking_enabled, activity_prefs_tracking_is_enabled()); #ifdef CONFIG_HRM - PBL_ANALYTICS_SET_UNSIGNED(settings_health_hrm_enabled, - activity_prefs_heart_rate_is_enabled()); + PBL_ANALYTICS_SET_UNSIGNED(settings_health_hrm_enabled, activity_prefs_heart_rate_is_enabled()); PBL_ANALYTICS_SET_UNSIGNED(settings_health_hrm_measurement_interval, activity_prefs_get_hrm_measurement_interval()); PBL_ANALYTICS_SET_UNSIGNED(settings_health_hrm_activity_tracking_enabled, diff --git a/src/fw/shell/normal/prefs_sync.c b/src/fw/shell/normal/prefs_sync.c index 26abec0610..2ca172c34e 100644 --- a/src/fw/shell/normal/prefs_sync.c +++ b/src/fw/shell/normal/prefs_sync.c @@ -13,7 +13,7 @@ //! Prefs Sync using BlobDB //! //! Settings are now synced via BlobDB with database ID 0x0F (BlobDBIdSettings). -//! +//! //! The whitelist filtering and sync logic are implemented in: //! services/blob_db/settings_blob_db.c //! @@ -65,16 +65,16 @@ void prefs_sync_init(void) { } // Subscribe to connection events - s_connection_event_info = (EventServiceInfo) { - .type = PEBBLE_BT_CONNECTION_DEBOUNCED_EVENT, - .handler = prv_connection_handler, + s_connection_event_info = (EventServiceInfo){ + .type = PEBBLE_BT_CONNECTION_DEBOUNCED_EVENT, + .handler = prv_connection_handler, }; event_service_client_subscribe(&s_connection_event_info); // Subscribe to capabilities changed events - this fires when phone sends version response - s_capabilities_event_info = (EventServiceInfo) { - .type = PEBBLE_CAPABILITIES_CHANGED_EVENT, - .handler = prv_capabilities_handler, + s_capabilities_event_info = (EventServiceInfo){ + .type = PEBBLE_CAPABILITIES_CHANGED_EVENT, + .handler = prv_capabilities_handler, }; event_service_client_subscribe(&s_capabilities_event_info); @@ -102,19 +102,19 @@ void prefs_sync_trigger(void) { PBL_LOG_WRN("Prefs sync not initialized"); return; } - + if (!s_is_connected) { PBL_LOG_WRN("Not connected to phone, cannot sync"); return; } - + // Check if the phone supports settings sync if (!settings_blob_db_phone_supports_sync()) { PBL_LOG_WRN("Phone doesn't support settings sync"); return; } - + PBL_LOG_DBG("Manually triggering settings sync via BlobDB"); - + blob_db_sync_db(BlobDBIdSettings); } diff --git a/src/fw/shell/normal/shell.c b/src/fw/shell/normal/shell.c index 353d7457ae..3473e07ba5 100644 --- a/src/fw/shell/normal/shell.c +++ b/src/fw/shell/normal/shell.c @@ -48,20 +48,21 @@ static const CompositorTransition *prv_health_open_transition(const LaunchConfig static CompositorTransitionDirection prv_health_close_direction(void) { const ProcessContext *context = app_manager_get_task_context(); return prv_health_launch_is_reversed(context->launch_reason, context->launch_button, - context->args) ? - CompositorTransitionDirectionUp : CompositorTransitionDirectionDown; + context->args) + ? CompositorTransitionDirectionUp + : CompositorTransitionDirectionDown; } static const CompositorTransition *prv_get_action_compositor_animation( CompositorTransitionDirection direction) { - return PBL_IF_RECT_ELSE(compositor_shutter_transition_get(direction, ACTION_SHUTTER_COLOR), - NULL); + return PBL_IF_RECT_ELSE(compositor_shutter_transition_get(direction, ACTION_SHUTTER_COLOR), NULL); } const CompositorTransition *shell_get_watchface_compositor_animation( bool watchface_is_destination) { - const CompositorTransitionDirection direction = watchface_is_destination ? - CompositorTransitionDirectionLeft : CompositorTransitionDirectionRight; + const CompositorTransitionDirection direction = watchface_is_destination + ? CompositorTransitionDirectionLeft + : CompositorTransitionDirectionRight; return prv_get_watchface_compositor_animation(direction); } @@ -106,8 +107,9 @@ const CompositorTransition *shell_get_close_compositor_animation(AppInstallId cu return res; } -const CompositorTransition *shell_get_open_compositor_animation( - AppInstallId current_app_id, AppInstallId next_app_id, const LaunchConfigCommon *config) { +const CompositorTransition *shell_get_open_compositor_animation(AppInstallId current_app_id, + AppInstallId next_app_id, + const LaunchConfigCommon *config) { const CompositorTransition *res = NULL; AppInstallEntry *app_entry = kernel_zalloc_check(sizeof(AppInstallEntry)); diff --git a/src/fw/shell/normal/shell_event_loop.c b/src/fw/shell/normal/shell_event_loop.c index 57a1a57dcf..973d64e563 100644 --- a/src/fw/shell/normal/shell_event_loop.c +++ b/src/fw/shell/normal/shell_event_loop.c @@ -34,9 +34,9 @@ extern void shell_prefs_init(void); -// Force-compact every growable settings DB on first boot after upgrade. -// Pre-growable-files devices keep their original full-size settings file allocation forever otherwise, -// which on devices with many installed apps shows up as launcher scroll lag. +// Force-compact every growable settings DB on first boot after upgrade. +// Pre-growable-files devices keep their original full-size settings file allocation forever +// otherwise, which on devices with many installed apps shows up as launcher scroll lag. static void prv_settings_dbs_compaction_migration_cb(void *data) { blob_db_compact_growable_dbs(); shell_prefs_set_settings_dbs_compacted_v1(true); @@ -112,8 +112,7 @@ void shell_event_loop_handle_event(PebbleEvent *e) { timeline_peek_handle_peek_event(&e->timeline_peek); return; - case PEBBLE_BLOBDB_EVENT: - { + case PEBBLE_BLOBDB_EVENT: { // Calendar should only handle pin_db events PebbleBlobDBEvent *blobdb_event = &e->blob_db; if (blobdb_event->db_id == BlobDBIdPins) { @@ -173,7 +172,6 @@ void shell_event_loop_handle_event(PebbleEvent *e) { return; } default: - break; // don't care + break; // don't care } } - diff --git a/src/fw/shell/normal/system_app_state_machine.c b/src/fw/shell/normal/system_app_state_machine.c index 91453b2b96..f36b5a7dcd 100644 --- a/src/fw/shell/normal/system_app_state_machine.c +++ b/src/fw/shell/normal/system_app_state_machine.c @@ -58,7 +58,7 @@ //! launcher stack? static bool s_rooted_in_watchface = false; -const PebbleProcessMd* system_app_state_machine_system_start(void) { +const PebbleProcessMd *system_app_state_machine_system_start(void) { // start critical battery app when necessary if (battery_monitor_critical_lockout()) { return battery_critical_get_app_info(); @@ -83,15 +83,15 @@ static bool prv_current_app_is_watchface(void) { AppInstallId system_app_state_machine_get_last_registered_app(void) { // If we're rooted in the watchface but we're not the watchface itself, or the launcher // is closing, we should launch the watchface. - if ((s_rooted_in_watchface && !prv_current_app_is_watchface()) - || (app_manager_get_current_app_md() == launcher_menu_app_get_app_info())) { + if ((s_rooted_in_watchface && !prv_current_app_is_watchface()) || + (app_manager_get_current_app_md() == launcher_menu_app_get_app_info())) { return watchface_get_default_install_id(); } return APP_ID_LAUNCHER_MENU; } -const PebbleProcessMd* system_app_state_machine_get_default_app(void) { +const PebbleProcessMd *system_app_state_machine_get_default_app(void) { return launcher_menu_app_get_app_info(); } @@ -107,12 +107,11 @@ void system_app_state_machine_register_app_launch(AppInstallId app_id) { void system_app_state_machine_panic(void) { if (app_manager_is_initialized()) { - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = panic_app_get_app_info(), + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = panic_app_get_app_info(), }); } // Else, just wait for the app_manager to initialize to show the panic app using // system_app_state_machine_system_start(). } - diff --git a/src/fw/shell/normal/watchface.c b/src/fw/shell/normal/watchface.c index ad8647161c..7190f9f238 100644 --- a/src/fw/shell/normal/watchface.c +++ b/src/fw/shell/normal/watchface.c @@ -49,8 +49,7 @@ static bool prv_should_ignore_button_click(void) { return false; } -static void prv_launch_app_via_button(AppLaunchEventConfig *config, - ClickRecognizerRef recognizer) { +static void prv_launch_app_via_button(AppLaunchEventConfig *config, ClickRecognizerRef recognizer) { config->common.button = click_recognizer_get_button_id(recognizer); app_manager_put_launch_app_event(config); } @@ -78,8 +77,7 @@ static AppInstallId prv_combo_get_app(uint8_t combo_buttons) { } static bool prv_is_any_combo_active(void) { - return (s_combo_back_hold_timer != NULL) || - prv_is_combo_pressed(COMBO_BACK_UP_BUTTONS) || + return (s_combo_back_hold_timer != NULL) || prv_is_combo_pressed(COMBO_BACK_UP_BUTTONS) || prv_is_combo_pressed(COMBO_UP_DOWN_BUTTONS); } @@ -140,8 +138,8 @@ static void prv_check_combo_back_hold(void) { } } -static void prv_launch_timeline_app(AppInstallId app_id, ButtonId button, - AppLaunchReason reason, AppQuickLaunchAction action) { +static void prv_launch_timeline_app(AppInstallId app_id, ButtonId button, AppLaunchReason reason, + AppQuickLaunchAction action) { static TimelineArgs s_timeline_args; s_timeline_args.launch_into_pin = true; s_timeline_args.stay_in_list_view = true; @@ -166,33 +164,32 @@ static void prv_launch_timeline_app(AppInstallId app_id, ButtonId button, animation = compositor_dot_transition_timeline_get(is_future, timeline_is_destination); #else const bool jump = (!uuid_is_invalid(&s_timeline_args.pin_id) && !timeline_peek_is_first_event()); - animation = jump ? compositor_peek_transition_timeline_get() : - compositor_slide_transition_timeline_get(is_future, timeline_is_destination, + animation = jump ? compositor_peek_transition_timeline_get() + : compositor_slide_transition_timeline_get(is_future, timeline_is_destination, timeline_peek_is_future_empty()); #endif - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = app_id, - .common.reason = reason, - .common.button = button, - .common.args = &s_timeline_args, - .common.transition = animation, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = app_id, + .common.reason = reason, + .common.button = button, + .common.args = &s_timeline_args, + .common.transition = animation, }); } static void prv_launch_quick_launch_app(AppInstallId app_id, ButtonId button, AppLaunchReason timeline_reason, AppQuickLaunchAction action) { - const bool is_timeline = (app_id == APP_ID_TIMELINE) || - (app_id == APP_ID_TIMELINE_PAST) || + const bool is_timeline = (app_id == APP_ID_TIMELINE) || (app_id == APP_ID_TIMELINE_PAST) || (app_id == APP_ID_TIMELINE_FULL); if (is_timeline) { prv_launch_timeline_app(app_id, button, timeline_reason, action); } else { - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = app_id, - .common.reason = APP_LAUNCH_QUICK_LAUNCH, - .common.button = button, - .common.args = (void *)(uintptr_t)action, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = app_id, + .common.reason = APP_LAUNCH_QUICK_LAUNCH, + .common.button = button, + .common.args = (void *)(uintptr_t)action, }); } } @@ -204,8 +201,8 @@ static void prv_quick_launch_handler(ClickRecognizerRef recognizer, void *data) return; } - AppInstallId app_id = quick_launch_is_enabled(button) ? quick_launch_get_app(button) - : INSTALL_ID_INVALID; + AppInstallId app_id = + quick_launch_is_enabled(button) ? quick_launch_get_app(button) : INSTALL_ID_INVALID; if (app_id == INSTALL_ID_INVALID) { app_id = app_install_get_id_for_uuid(&quick_launch_setup_get_app_info()->uuid); } @@ -217,16 +214,16 @@ static void prv_quick_launch_handler(ClickRecognizerRef recognizer, void *data) static void prv_launch_up_down(ClickRecognizerRef recognizer, void *data) { ButtonId button = click_recognizer_get_button_id(recognizer); - + if (prv_is_any_combo_active()) { return; } - - if (!quick_launch_single_click_is_enabled(button)) return; + + if (!quick_launch_single_click_is_enabled(button)) + return; const AppInstallId app_id = quick_launch_single_click_get_app(button); - prv_launch_quick_launch_app(app_id, button, APP_LAUNCH_SYSTEM, - APP_QUICK_LAUNCH_ACTION_TAP); + prv_launch_quick_launch_app(app_id, button, APP_LAUNCH_SYSTEM, APP_QUICK_LAUNCH_ACTION_TAP); } static void prv_configure_click_handler(ButtonId button_id, ClickHandler single_click_handler) { @@ -237,11 +234,13 @@ static void prv_configure_click_handler(ButtonId button_id, ClickHandler single_ } static void prv_launch_launcher_app(ClickRecognizerRef recognizer, void *data) { - static const LauncherMenuArgs s_launcher_args = { .reset_scroll = true }; - prv_launch_app_via_button(&(AppLaunchEventConfig) { - .id = APP_ID_LAUNCHER_MENU, - .common.args = &s_launcher_args, - }, recognizer); + static const LauncherMenuArgs s_launcher_args = {.reset_scroll = true}; + prv_launch_app_via_button( + &(AppLaunchEventConfig){ + .id = APP_ID_LAUNCHER_MENU, + .common.args = &s_launcher_args, + }, + recognizer); } static void prv_dismiss_timeline_peek(ClickRecognizerRef recognizer, void *data) { @@ -286,19 +285,19 @@ void watchface_handle_button_event(PebbleEvent *e) { static void prv_watchface_launch_low_power(void) { PBL_LOG_DBG("Switching default watchface to low_power_mode watchface"); - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = APP_ID_LOW_POWER_FACE, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = APP_ID_LOW_POWER_FACE, }); } void watchface_launch_default(const CompositorTransition *animation) { - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = watchface_get_default_install_id(), - .common.transition = animation, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = watchface_get_default_install_id(), + .common.transition = animation, }); } -static void kernel_callback_watchface_launch(void* data) { +static void kernel_callback_watchface_launch(void *data) { watchface_launch_default(NULL); } diff --git a/src/fw/shell/prefs.h b/src/fw/shell/prefs.h index fb70f666cd..6fcd32097f 100644 --- a/src/fw/shell/prefs.h +++ b/src/fw/shell/prefs.h @@ -26,7 +26,6 @@ #define TIMELINE_PEEK_WATCHFACE_FIT_SUPPORTED 0 #endif - // The clock 12h/24h setting is required by services/clock.c. bool shell_prefs_get_clock_24h_style(void); void shell_prefs_set_clock_24h_style(bool is24h); @@ -241,8 +240,8 @@ void shell_prefs_set_settings_dbs_compacted_v1(bool done); #ifdef CONFIG_APP_SCALING // Legacy app rendering mode - whether to use bezel or scaling for legacy apps typedef enum LegacyAppRenderMode { - LegacyAppRenderMode_Bezel = 0, // Center with black bezel (original behavior) - LegacyAppRenderMode_ScalingNearest = 1, // Scale to fill screen (nearest-neighbor) + LegacyAppRenderMode_Bezel = 0, // Center with black bezel (original behavior) + LegacyAppRenderMode_ScalingNearest = 1, // Scale to fill screen (nearest-neighbor) LegacyAppRenderMode_ScalingBilinear = 2, // Scale to fill screen (bilinear) LegacyAppRenderModeCount } LegacyAppRenderMode; diff --git a/src/fw/shell/prefs_private.h b/src/fw/shell/prefs_private.h index eb3676c8d4..0c841ec978 100644 --- a/src/fw/shell/prefs_private.h +++ b/src/fw/shell/prefs_private.h @@ -12,7 +12,6 @@ // We want to use a full page, but requesting such a size can end up using two pages #define SHELL_PREFS_FILE_LEN (2048) - //! Update the backing store for the given preference. //! @param[in] key the preference's name, as defined in prefs.c //! @param[in] key_len the length of key @@ -20,7 +19,7 @@ //! @param[in] value_len the length of the value //! @return true on success, false if failure bool prefs_private_write_backing(const uint8_t *key, size_t key_len, const void *value, - int value_len); + int value_len); //! Get the length of a preference's value as stored in the backing store //! @param[in] key the preference's name, as defined in prefs.c diff --git a/src/fw/shell/prf/shell.c b/src/fw/shell/prf/shell.c index 5f4cb5cfc6..cb54830f75 100644 --- a/src/fw/shell/prf/shell.c +++ b/src/fw/shell/prf/shell.c @@ -7,12 +7,13 @@ #include -const CompositorTransition* shell_get_close_compositor_animation(AppInstallId current_app_id, +const CompositorTransition *shell_get_close_compositor_animation(AppInstallId current_app_id, AppInstallId next_app_id) { return NULL; } -const CompositorTransition* shell_get_open_compositor_animation( - AppInstallId current_app_id, AppInstallId next_app_id, const LaunchConfigCommon *config) { +const CompositorTransition *shell_get_open_compositor_animation(AppInstallId current_app_id, + AppInstallId next_app_id, + const LaunchConfigCommon *config) { return NULL; } diff --git a/src/fw/shell/prf/shell_event_loop.c b/src/fw/shell/prf/shell_event_loop.c index 543b444e85..28c9d578f8 100644 --- a/src/fw/shell/prf/shell_event_loop.c +++ b/src/fw/shell/prf/shell_event_loop.c @@ -13,13 +13,12 @@ void shell_event_loop_init(void) { } void shell_event_loop_handle_event(PebbleEvent *e) { - switch(e->type) { - case PEBBLE_BT_PAIRING_EVENT: - bluetooth_pairing_ui_handle_event(&e->bluetooth.pair); - return; + switch (e->type) { + case PEBBLE_BT_PAIRING_EVENT: + bluetooth_pairing_ui_handle_event(&e->bluetooth.pair); + return; - default: - return; + default: + return; } } - diff --git a/src/fw/shell/prf/stubs.c b/src/fw/shell/prf/stubs.c index a0339021f3..8e2d66141b 100644 --- a/src/fw/shell/prf/stubs.c +++ b/src/fw/shell/prf/stubs.c @@ -57,14 +57,14 @@ void app_idle_timeout_touch_down(void) { void app_idle_timeout_touch_up(void) { } -PebblePhoneCaller* phone_call_util_create_caller(const char *number, const char *name) { +PebblePhoneCaller *phone_call_util_create_caller(const char *number, const char *name) { return NULL; } void alarm_set_snooze_delay(int delay_ms) { } -const void* const g_pbl_system_tbl[] = {}; +const void *const g_pbl_system_tbl[] = {}; const FileResourceData g_file_resource_stores[] = {}; const uint32_t g_num_file_resource_stores = 0; @@ -75,7 +75,7 @@ void persist_service_client_open(const Uuid *uuid) { void persist_service_client_close(const Uuid *uuid) { } -SettingsFile * persist_service_lock_and_get_store(const Uuid *uuid) { +SettingsFile *persist_service_lock_and_get_store(const Uuid *uuid) { return NULL; } @@ -133,7 +133,7 @@ bool app_db_exists_install_id(AppInstallId app_id) { return false; } -void timeline_item_destroy(TimelineItem* item) { +void timeline_item_destroy(TimelineItem *item) { } AppInstallId worker_preferences_get_default_worker(void) { @@ -141,15 +141,14 @@ AppInstallId worker_preferences_get_default_worker(void) { } #include "process_management/process_loader.h" -void * process_loader_load(const PebbleProcessMd *app_md, PebbleTask task, - MemorySegment *destination) { +void *process_loader_load(const PebbleProcessMd *app_md, PebbleTask task, + MemorySegment *destination) { return app_md->main_func; } #include "pbl/services/process_management/app_storage.h" -AppStorageGetAppInfoResult app_storage_get_process_info(PebbleProcessInfo* app_info, - uint8_t *build_id_out, - AppInstallId app_id, +AppStorageGetAppInfoResult app_storage_get_process_info(PebbleProcessInfo *app_info, + uint8_t *build_id_out, AppInstallId app_id, PebbleTask task) { return GET_APP_INFO_COULD_NOT_READ_FORMAT; } @@ -232,7 +231,6 @@ bool touch_is_globally_enabled(void) { void touch_set_globally_enabled(bool enable) { } - bool touch_navigation_menu_is_enabled(void) { return false; } @@ -292,9 +290,11 @@ int16_t timeline_peek_get_obstruction_origin_y(void) { return DISP_ROWS; } -void timeline_peek_handle_process_start(void) { } +void timeline_peek_handle_process_start(void) { +} -void timeline_peek_handle_process_kill(void) { } +void timeline_peek_handle_process_kill(void) { +} void pbl_analytics_external_collect_pfs_stats(void) { } diff --git a/src/fw/shell/prf/system_app_state_machine.c b/src/fw/shell/prf/system_app_state_machine.c index 5a35041cf7..65e072d93f 100644 --- a/src/fw/shell/prf/system_app_state_machine.c +++ b/src/fw/shell/prf/system_app_state_machine.c @@ -11,7 +11,7 @@ #include "mfg/mfg_mode/mfg_factory_mode.h" #include "process_management/app_manager.h" -const PebbleProcessMd* system_app_state_machine_system_start(void) { +const PebbleProcessMd *system_app_state_machine_system_start(void) { if (launcher_panic_get_current_error() != 0) { return panic_app_get_app_info(); } @@ -32,7 +32,7 @@ AppInstallId system_app_state_machine_get_last_registered_app(void) { return APP_ID_RECOVERY_FIRST_USE; } -const PebbleProcessMd* system_app_state_machine_get_default_app(void) { +const PebbleProcessMd *system_app_state_machine_get_default_app(void) { if (mfg_is_mfg_mode()) { return mfg_menu_app_get_info(); } @@ -45,9 +45,8 @@ void system_app_state_machine_register_app_launch(AppInstallId app_id) { void system_app_state_machine_panic(void) { if (app_manager_is_first_app_launched()) { - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = panic_app_get_app_info(), + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = panic_app_get_app_info(), }); } } - diff --git a/src/fw/shell/sdk/prefs.c b/src/fw/shell/sdk/prefs.c index e9fd5d4b0f..9690acfcfb 100644 --- a/src/fw/shell/sdk/prefs.c +++ b/src/fw/shell/sdk/prefs.c @@ -31,7 +31,7 @@ _Static_assert(sizeof(PreferredContentSize) == sizeof(s_content_size), #ifdef CONFIG_APP_SCALING #define PREF_KEY_LEGACY_APP_RENDER_MODE "legacyAppRenderMode" -static uint8_t s_legacy_app_render_mode = 1; // Default to scaled mode +static uint8_t s_legacy_app_render_mode = 1; // Default to scaled mode #endif void shell_prefs_init(void) { @@ -40,8 +40,8 @@ void shell_prefs_init(void) { if (settings_file_open(&file, SHELL_PREFS_FILE_NAME, SHELL_PREFS_FILE_LEN) != S_SUCCESS) { goto cleanup; } - if (settings_file_get(&file, PREF_KEY_CLOCK_24H, sizeof(PREF_KEY_CLOCK_24H), - &s_is_24h_style, sizeof(s_is_24h_style)) != S_SUCCESS) { + if (settings_file_get(&file, PREF_KEY_CLOCK_24H, sizeof(PREF_KEY_CLOCK_24H), &s_is_24h_style, + sizeof(s_is_24h_style)) != S_SUCCESS) { // The setting likely doesn't exist yet so set it to the default (true) s_is_24h_style = true; } @@ -106,7 +106,6 @@ int16_t shell_prefs_get_automatic_timezone_id(void) { void shell_prefs_set_automatic_timezone_id(int16_t timezone_id) { } - void prefs_private_lock(void) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); } @@ -118,18 +117,16 @@ void prefs_private_unlock(void) { // Exported function used by blob_db API to set the backing store for a specific key. // Not used by the SDK shell bool prefs_private_write_backing(const uint8_t *key, size_t key_len, const void *value, - int value_len) { + int value_len) { return false; } - // Exported function used by blob_db API to get the length of a value in our backing store // Not used by the SDK shell int prefs_private_get_backing_len(const uint8_t *key, size_t key_len) { return 0; } - // Exported function used by blob_db API to read our backing store // Not used by the SDK shell bool prefs_private_read_backing(const uint8_t *key, size_t key_len, void *value, int value_len) { @@ -147,9 +144,8 @@ void watchface_set_default_install_id(AppInstallId app_id) { } static bool prv_set_default_any_watchface_enumerate_callback(AppInstallEntry *entry, void *data) { - if (!app_install_entry_is_watchface(entry) || - app_install_entry_is_hidden(entry)) { - return true; // continue search + if (!app_install_entry_is_watchface(entry) || app_install_entry_is_hidden(entry)) { + return true; // continue search } watchface_set_default_install_id(entry->install_id); @@ -159,8 +155,7 @@ static bool prv_set_default_any_watchface_enumerate_callback(AppInstallEntry *en AppInstallId watchface_get_default_install_id(void) { AppInstallId app_id = app_install_get_id_for_uuid(&s_default_watchface); AppInstallEntry entry; - if ((app_id == INSTALL_ID_INVALID) || - !app_install_get_entry_for_install_id(app_id, &entry) || + if ((app_id == INSTALL_ID_INVALID) || !app_install_get_entry_for_install_id(app_id, &entry) || !app_install_entry_is_watchface(&entry)) { app_install_enumerate_entries(prv_set_default_any_watchface_enumerate_callback, NULL); app_id = app_install_get_id_for_uuid(&s_default_watchface); @@ -172,8 +167,7 @@ void system_theme_set_content_size(PreferredContentSize content_size) { pbl_mutex_lock(&s_mutex, PBL_FOREVER); const uint8_t content_size_uint = content_size; if (content_size >= NumPreferredContentSizes) { - PBL_LOG_WRN("Ignoring attempt to set content size to invalid size %d", - content_size); + PBL_LOG_WRN("Ignoring attempt to set content size to invalid size %d", content_size); } else if (prv_pref_set(PREF_KEY_CONTENT_SIZE, &content_size_uint, sizeof(content_size_uint))) { s_content_size = content_size; } @@ -259,7 +253,7 @@ void activity_prefs_set_hrm_activity_tracking_enabled(bool enabled) { #endif ActivityInsightSettings *activity_prefs_get_sleep_reward_settings(void) { - static ActivityInsightSettings s_settings = { 0 }; + static ActivityInsightSettings s_settings = {0}; return &s_settings; } @@ -311,7 +305,6 @@ void shell_prefs_set_legacy_app_render_mode(LegacyAppRenderMode mode) { // Exported function used by blob_db API to handle settings events // Not used by the SDK shell void prefs_private_handle_blob_db_event(PebbleBlobDBEvent *event) { - } bool shell_prefs_get_menu_scroll_wrap_around_enable(void) { diff --git a/src/fw/shell/sdk/shell.c b/src/fw/shell/sdk/shell.c index 04896e759a..791d2d8e34 100644 --- a/src/fw/shell/sdk/shell.c +++ b/src/fw/shell/sdk/shell.c @@ -6,12 +6,13 @@ #include "kernel/events.h" #include "process_management/app_install_types.h" -const CompositorTransition* shell_get_close_compositor_animation(AppInstallId current_app_id, +const CompositorTransition *shell_get_close_compositor_animation(AppInstallId current_app_id, AppInstallId next_app_id) { return NULL; } -const CompositorTransition* shell_get_open_compositor_animation( - AppInstallId current_app_id, AppInstallId next_app_id, const LaunchConfigCommon *config) { +const CompositorTransition *shell_get_open_compositor_animation(AppInstallId current_app_id, + AppInstallId next_app_id, + const LaunchConfigCommon *config) { return NULL; } diff --git a/src/fw/shell/sdk/shell_event_loop.c b/src/fw/shell/sdk/shell_event_loop.c index 41b113a40d..9e5e006dc7 100644 --- a/src/fw/shell/sdk/shell_event_loop.c +++ b/src/fw/shell/sdk/shell_event_loop.c @@ -48,6 +48,6 @@ void shell_event_loop_handle_event(PebbleEvent *e) { return; default: - break; // don't care + break; // don't care } } diff --git a/src/fw/shell/sdk/stubs.c b/src/fw/shell/sdk/stubs.c index 0ceb6a4077..dae51626d4 100644 --- a/src/fw/shell/sdk/stubs.c +++ b/src/fw/shell/sdk/stubs.c @@ -80,7 +80,6 @@ bool touch_is_globally_enabled(void) { void touch_set_globally_enabled(bool enable) { } - bool touch_navigation_menu_is_enabled(void) { return false; } @@ -96,22 +95,22 @@ AppInstallId worker_preferences_get_default_worker(void) { return INSTALL_ID_INVALID; } - // Used by the alarm service to add alarm pins to the timeline -const PebbleProcessMd* alarms_app_get_info(void) { +const PebbleProcessMd *alarms_app_get_info(void) { static const PebbleProcessMdSystem s_alarms_app_info = { - .common = { - .main_func = NULL, - // UUID: 67a32d95-ef69-46d4-a0b9-854cc62f97f9 - .uuid = {0x67, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, - 0xa0, 0xb9, 0x85, 0x4c, 0xc6, 0x2f, 0x97, 0xf9}, - }, - .name = "Alarms", + .common = + { + .main_func = NULL, + // UUID: 67a32d95-ef69-46d4-a0b9-854cc62f97f9 + .uuid = + {0x67, 0xa3, 0x2d, 0x95, 0xef, 0x69, 0x46, 0xd4, 0xa0, 0xb9, 0x85, 0x4c, 0xc6, + 0x2f, 0x97, 0xf9}, + }, + .name = "Alarms", }; - return (const PebbleProcessMd*) &s_alarms_app_info; + return (const PebbleProcessMd *)&s_alarms_app_info; } - bool shell_prefs_get_stationary_enabled(void) { return false; } @@ -135,16 +134,19 @@ void shell_prefs_set_language(ShellLanguage language) { void language_ui_display_changed(const char *lang_name) { } -void timeline_peek_prefs_set_enabled(bool enabled) {} +void timeline_peek_prefs_set_enabled(bool enabled) { +} bool timeline_peek_prefs_get_enabled(void) { return true; } -void timeline_peek_prefs_set_before_time(uint16_t before_time_m) {} +void timeline_peek_prefs_set_before_time(uint16_t before_time_m) { +} uint16_t timeline_peek_prefs_get_before_time(void) { return (TIMELINE_PEEK_DEFAULT_SHOW_BEFORE_TIME_S / SECONDS_PER_MINUTE); } #if TIMELINE_PEEK_WATCHFACE_FIT_SUPPORTED -void timeline_peek_prefs_set_unsupported_face_mode(TimelinePeekUnsupportedFaceMode mode) {} +void timeline_peek_prefs_set_unsupported_face_mode(TimelinePeekUnsupportedFaceMode mode) { +} TimelinePeekUnsupportedFaceMode timeline_peek_prefs_get_unsupported_face_mode(void) { return TimelinePeekUnsupportedFaceMode_None; } diff --git a/src/fw/shell/sdk/system_app_state_machine.c b/src/fw/shell/sdk/system_app_state_machine.c index 2ec32c4b09..fd3b7f2ec9 100644 --- a/src/fw/shell/sdk/system_app_state_machine.c +++ b/src/fw/shell/sdk/system_app_state_machine.c @@ -45,7 +45,7 @@ AppInstallId system_app_state_machine_get_last_registered_app(void) { return APP_ID_LAUNCHER_MENU; } -const PebbleProcessMd* system_app_state_machine_get_default_app(void) { +const PebbleProcessMd *system_app_state_machine_get_default_app(void) { return launcher_menu_app_get_app_info(); } @@ -64,8 +64,8 @@ void system_app_state_machine_register_app_launch(AppInstallId app_id) { void system_app_state_machine_panic(void) { if (app_manager_is_initialized()) { - app_manager_launch_new_app(&(AppLaunchConfig) { - .md = panic_app_get_app_info(), + app_manager_launch_new_app(&(AppLaunchConfig){ + .md = panic_app_get_app_info(), }); } } diff --git a/src/fw/shell/sdk/watchface.c b/src/fw/shell/sdk/watchface.c index 788a86fc05..1acf1589ab 100644 --- a/src/fw/shell/sdk/watchface.c +++ b/src/fw/shell/sdk/watchface.c @@ -28,29 +28,30 @@ typedef struct WatchfaceData { static WatchfaceData s_watchface_data; void watchface_launch_default(const CompositorTransition *animation) { - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = watchface_get_default_install_id(), - .common.transition = animation, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = watchface_get_default_install_id(), + .common.transition = animation, }); } -static void prv_launch_app_via_button(AppLaunchEventConfig *config, - ClickRecognizerRef recognizer) { +static void prv_launch_app_via_button(AppLaunchEventConfig *config, ClickRecognizerRef recognizer) { config->common.button = click_recognizer_get_button_id(recognizer); app_manager_put_launch_app_event(config); } static void prv_launch_launcher(ClickRecognizerRef recognizer, void *data) { - static const LauncherMenuArgs s_launcher_args = { .reset_scroll = true }; - prv_launch_app_via_button(&(AppLaunchEventConfig) { - .id = APP_ID_LAUNCHER_MENU, - .common.args = &s_launcher_args, - }, recognizer); + static const LauncherMenuArgs s_launcher_args = {.reset_scroll = true}; + prv_launch_app_via_button( + &(AppLaunchEventConfig){ + .id = APP_ID_LAUNCHER_MENU, + .common.args = &s_launcher_args, + }, + recognizer); } static void prv_launch_timeline(ClickRecognizerRef recognizer, void *data) { static TimelineArgs s_timeline_args = { - .pin_id = UUID_INVALID_INIT, + .pin_id = UUID_INVALID_INIT, }; switch (click_recognizer_get_button_id(recognizer)) { case BUTTON_ID_DOWN: @@ -63,10 +64,12 @@ static void prv_launch_timeline(ClickRecognizerRef recognizer, void *data) { WTF; } - prv_launch_app_via_button(&(AppLaunchEventConfig) { - .id = APP_ID_TIMELINE, - .common.args = &s_timeline_args, - }, recognizer); + prv_launch_app_via_button( + &(AppLaunchEventConfig){ + .id = APP_ID_TIMELINE, + .common.args = &s_timeline_args, + }, + recognizer); } static void prv_configure_click(ButtonId button_id, ClickHandler click_handler) { @@ -94,15 +97,15 @@ void watchface_handle_button_event(PebbleEvent *e) { if (app_manager_get_task_context()->closing_state == ProcessRunState_Running) { data->button_pressed = e->button.button_id; switch (e->type) { - case PEBBLE_BUTTON_DOWN_EVENT: - click_recognizer_handle_button_down(&data->click_manager.recognizers[e->button.button_id]); - break; - case PEBBLE_BUTTON_UP_EVENT: - click_recognizer_handle_button_up(&data->click_manager.recognizers[e->button.button_id]); - break; - default: - PBL_CROAK("Invalid event type: %u", e->type); - break; + case PEBBLE_BUTTON_DOWN_EVENT: + click_recognizer_handle_button_down(&data->click_manager.recognizers[e->button.button_id]); + break; + case PEBBLE_BUTTON_UP_EVENT: + click_recognizer_handle_button_up(&data->click_manager.recognizers[e->button.button_id]); + break; + default: + PBL_CROAK("Invalid event type: %u", e->type); + break; } } } diff --git a/src/fw/shell/shell.h b/src/fw/shell/shell.h index 880911f54e..716b04ba13 100644 --- a/src/fw/shell/shell.h +++ b/src/fw/shell/shell.h @@ -13,5 +13,6 @@ const CompositorTransition *shell_get_watchface_compositor_animation(bool watchf const CompositorTransition *shell_get_close_compositor_animation(AppInstallId current_app_id, AppInstallId next_app_id); -const CompositorTransition *shell_get_open_compositor_animation( - AppInstallId current_app_id, AppInstallId next_app_id, const LaunchConfigCommon *config); +const CompositorTransition *shell_get_open_compositor_animation(AppInstallId current_app_id, + AppInstallId next_app_id, + const LaunchConfigCommon *config); diff --git a/src/fw/shell/shell_event_loop.h b/src/fw/shell/shell_event_loop.h index 7c92ad7bdb..92b31c9008 100644 --- a/src/fw/shell/shell_event_loop.h +++ b/src/fw/shell/shell_event_loop.h @@ -9,4 +9,3 @@ void shell_event_loop_init(void); //! Handle events relating to the base firmware UI void NOINLINE shell_event_loop_handle_event(PebbleEvent *event); - diff --git a/src/fw/shell/system_app_state_machine.h b/src/fw/shell/system_app_state_machine.h index e760892175..2a5ac84464 100644 --- a/src/fw/shell/system_app_state_machine.h +++ b/src/fw/shell/system_app_state_machine.h @@ -7,17 +7,16 @@ #include "process_management/app_install_types.h" //! Get the very first app we should run at startup. -const PebbleProcessMd* system_app_state_machine_system_start(void); +const PebbleProcessMd *system_app_state_machine_system_start(void); //! Retrieve the app that was last launched prior to the current one. AppInstallId system_app_state_machine_get_last_registered_app(void); //! Get the app we should launch after an app has crashed or has been force quit. -const PebbleProcessMd* system_app_state_machine_get_default_app(void); +const PebbleProcessMd *system_app_state_machine_get_default_app(void); //! Tell the state machine we just launched an app. void system_app_state_machine_register_app_launch(AppInstallId app_id); //! Stop the normal state machine! Just show the panic app. void system_app_state_machine_panic(void); - diff --git a/src/fw/shell/system_theme.c b/src/fw/shell/system_theme.c index a2012c7334..23e6afd002 100644 --- a/src/fw/shell/system_theme.c +++ b/src/fw/shell/system_theme.c @@ -17,97 +17,104 @@ typedef struct SystemThemeTextStyle { // Themes static const SystemThemeTextStyle s_text_styles[NumPreferredContentSizes] = { - [PreferredContentSizeSmall] = { - .fonts = { - [TextStyleFont_Header] = FONT_KEY_GOTHIC_18_BOLD, + [PreferredContentSizeSmall] = + { + .fonts = + { + [TextStyleFont_Header] = FONT_KEY_GOTHIC_18_BOLD, #if !defined(CONFIG_RECOVERY_FW) - [TextStyleFont_Title] = FONT_KEY_GOTHIC_18_BOLD, - [TextStyleFont_Body] = FONT_KEY_GOTHIC_18, + [TextStyleFont_Title] = FONT_KEY_GOTHIC_18_BOLD, + [TextStyleFont_Body] = FONT_KEY_GOTHIC_18, #endif - [TextStyleFont_Subtitle] = FONT_KEY_GOTHIC_18_BOLD, - [TextStyleFont_Caption] = FONT_KEY_GOTHIC_14, - [TextStyleFont_Footer] = FONT_KEY_GOTHIC_14, - //! @note this is the same as the Title key (as that's what it's cloned from) until Small - //! is designed - [TextStyleFont_MenuCellTitle] = FONT_KEY_GOTHIC_18_BOLD, - //! @note this is the same as Medium until Small is designed - [TextStyleFont_MenuCellSubtitle] = FONT_KEY_GOTHIC_18, + [TextStyleFont_Subtitle] = FONT_KEY_GOTHIC_18_BOLD, + [TextStyleFont_Caption] = FONT_KEY_GOTHIC_14, + [TextStyleFont_Footer] = FONT_KEY_GOTHIC_14, + //! @note this is the same as the Title key (as that's what it's cloned from) + //! until Small + //! is designed + [TextStyleFont_MenuCellTitle] = FONT_KEY_GOTHIC_18_BOLD, + //! @note this is the same as Medium until Small is designed + [TextStyleFont_MenuCellSubtitle] = FONT_KEY_GOTHIC_18, #if !defined(CONFIG_RECOVERY_FW) - //! @note this is the same as Medium until Small is designed - [TextStyleFont_TimeHeaderNumbers] = FONT_KEY_LECO_20_BOLD_NUMBERS, + //! @note this is the same as Medium until Small is designed + [TextStyleFont_TimeHeaderNumbers] = FONT_KEY_LECO_20_BOLD_NUMBERS, #endif - //! @note this is the same as Medium until Small is designed - [TextStyleFont_TimeHeaderWords] = FONT_KEY_GOTHIC_14_BOLD, - //! @note this is the same as Medium until Small is designed - [TextStyleFont_PinSubtitle] = FONT_KEY_GOTHIC_18, - //! @note this is the same as Medium until Small is designed - [TextStyleFont_ParagraphHeader] = FONT_KEY_GOTHIC_14, - }, - }, - [PreferredContentSizeMedium] = { - .fonts = { - [TextStyleFont_Header] = FONT_KEY_GOTHIC_18_BOLD, + //! @note this is the same as Medium until Small is designed + [TextStyleFont_TimeHeaderWords] = FONT_KEY_GOTHIC_14_BOLD, + //! @note this is the same as Medium until Small is designed + [TextStyleFont_PinSubtitle] = FONT_KEY_GOTHIC_18, + //! @note this is the same as Medium until Small is designed + [TextStyleFont_ParagraphHeader] = FONT_KEY_GOTHIC_14, + }, + }, + [PreferredContentSizeMedium] = + { + .fonts = + { + [TextStyleFont_Header] = FONT_KEY_GOTHIC_18_BOLD, #if !defined(CONFIG_RECOVERY_FW) - [TextStyleFont_Title] = FONT_KEY_GOTHIC_24_BOLD, - [TextStyleFont_Body] = FONT_KEY_GOTHIC_24_BOLD, + [TextStyleFont_Title] = FONT_KEY_GOTHIC_24_BOLD, + [TextStyleFont_Body] = FONT_KEY_GOTHIC_24_BOLD, #endif - [TextStyleFont_Subtitle] = FONT_KEY_GOTHIC_24_BOLD, - [TextStyleFont_Caption] = FONT_KEY_GOTHIC_14, - [TextStyleFont_Footer] = FONT_KEY_GOTHIC_18, - [TextStyleFont_MenuCellTitle] = FONT_KEY_GOTHIC_24_BOLD, - [TextStyleFont_MenuCellSubtitle] = FONT_KEY_GOTHIC_18, + [TextStyleFont_Subtitle] = FONT_KEY_GOTHIC_24_BOLD, + [TextStyleFont_Caption] = FONT_KEY_GOTHIC_14, + [TextStyleFont_Footer] = FONT_KEY_GOTHIC_18, + [TextStyleFont_MenuCellTitle] = FONT_KEY_GOTHIC_24_BOLD, + [TextStyleFont_MenuCellSubtitle] = FONT_KEY_GOTHIC_18, #if !defined(CONFIG_RECOVERY_FW) - [TextStyleFont_TimeHeaderNumbers] = FONT_KEY_LECO_20_BOLD_NUMBERS, + [TextStyleFont_TimeHeaderNumbers] = FONT_KEY_LECO_20_BOLD_NUMBERS, #endif - [TextStyleFont_TimeHeaderWords] = FONT_KEY_GOTHIC_14_BOLD, - [TextStyleFont_PinSubtitle] = FONT_KEY_GOTHIC_18, - [TextStyleFont_ParagraphHeader] = FONT_KEY_GOTHIC_14, - }, - }, - [PreferredContentSizeLarge] = { - .fonts = { - [TextStyleFont_Header] = FONT_KEY_GOTHIC_24_BOLD, + [TextStyleFont_TimeHeaderWords] = FONT_KEY_GOTHIC_14_BOLD, + [TextStyleFont_PinSubtitle] = FONT_KEY_GOTHIC_18, + [TextStyleFont_ParagraphHeader] = FONT_KEY_GOTHIC_14, + }, + }, + [PreferredContentSizeLarge] = + { + .fonts = + { + [TextStyleFont_Header] = FONT_KEY_GOTHIC_24_BOLD, #if !defined(CONFIG_RECOVERY_FW) - [TextStyleFont_Title] = FONT_KEY_GOTHIC_28_BOLD, - [TextStyleFont_Body] = FONT_KEY_GOTHIC_28, + [TextStyleFont_Title] = FONT_KEY_GOTHIC_28_BOLD, + [TextStyleFont_Body] = FONT_KEY_GOTHIC_28, #endif - [TextStyleFont_Subtitle] = FONT_KEY_GOTHIC_28, - [TextStyleFont_Caption] = FONT_KEY_GOTHIC_18, - [TextStyleFont_Footer] = FONT_KEY_GOTHIC_18, - [TextStyleFont_MenuCellTitle] = FONT_KEY_GOTHIC_24_BOLD, - [TextStyleFont_MenuCellSubtitle] = FONT_KEY_GOTHIC_24, + [TextStyleFont_Subtitle] = FONT_KEY_GOTHIC_28, + [TextStyleFont_Caption] = FONT_KEY_GOTHIC_18, + [TextStyleFont_Footer] = FONT_KEY_GOTHIC_18, + [TextStyleFont_MenuCellTitle] = FONT_KEY_GOTHIC_24_BOLD, + [TextStyleFont_MenuCellSubtitle] = FONT_KEY_GOTHIC_24, #if !defined(CONFIG_RECOVERY_FW) - [TextStyleFont_TimeHeaderNumbers] = FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, + [TextStyleFont_TimeHeaderNumbers] = FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, #endif - [TextStyleFont_TimeHeaderWords] = FONT_KEY_GOTHIC_18_BOLD, - [TextStyleFont_PinSubtitle] = FONT_KEY_GOTHIC_24, - [TextStyleFont_ParagraphHeader] = FONT_KEY_GOTHIC_18_BOLD, - }, - }, - [PreferredContentSizeExtraLarge] = { - .fonts = { - [TextStyleFont_Header] = FONT_KEY_GOTHIC_28_BOLD, + [TextStyleFont_TimeHeaderWords] = FONT_KEY_GOTHIC_18_BOLD, + [TextStyleFont_PinSubtitle] = FONT_KEY_GOTHIC_24, + [TextStyleFont_ParagraphHeader] = FONT_KEY_GOTHIC_18_BOLD, + }, + }, + [PreferredContentSizeExtraLarge] = { + .fonts = { + [TextStyleFont_Header] = FONT_KEY_GOTHIC_28_BOLD, #if !defined(CONFIG_RECOVERY_FW) - [TextStyleFont_Title] = FONT_KEY_GOTHIC_36_BOLD, - [TextStyleFont_Body] = FONT_KEY_GOTHIC_36, + [TextStyleFont_Title] = FONT_KEY_GOTHIC_36_BOLD, + [TextStyleFont_Body] = FONT_KEY_GOTHIC_36, #endif - //! @note this is the same as Large until ExtraLarge is designed - [TextStyleFont_Subtitle] = FONT_KEY_GOTHIC_28, - [TextStyleFont_Caption] = FONT_KEY_GOTHIC_24, - [TextStyleFont_Footer] = FONT_KEY_GOTHIC_24, - [TextStyleFont_MenuCellTitle] = FONT_KEY_GOTHIC_28_BOLD, - [TextStyleFont_MenuCellSubtitle] = FONT_KEY_GOTHIC_28, + //! @note this is the same as Large until ExtraLarge is designed + [TextStyleFont_Subtitle] = FONT_KEY_GOTHIC_28, + [TextStyleFont_Caption] = FONT_KEY_GOTHIC_24, + [TextStyleFont_Footer] = FONT_KEY_GOTHIC_24, + [TextStyleFont_MenuCellTitle] = FONT_KEY_GOTHIC_28_BOLD, + [TextStyleFont_MenuCellSubtitle] = FONT_KEY_GOTHIC_28, #if !defined(CONFIG_RECOVERY_FW) - //! @note this is the same as Large until ExtraLarge is designed - [TextStyleFont_TimeHeaderNumbers] = FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, + //! @note this is the same as Large until ExtraLarge is designed + [TextStyleFont_TimeHeaderNumbers] = FONT_KEY_LECO_26_BOLD_NUMBERS_AM_PM, #endif - //! @note this is the same as Large until ExtraLarge is designed - [TextStyleFont_TimeHeaderWords] = FONT_KEY_GOTHIC_18_BOLD, - //! @note this is the same as Large until ExtraLarge is designed - [TextStyleFont_PinSubtitle] = FONT_KEY_GOTHIC_24, - [TextStyleFont_ParagraphHeader] = FONT_KEY_GOTHIC_18_BOLD, + //! @note this is the same as Large until ExtraLarge is designed + [TextStyleFont_TimeHeaderWords] = FONT_KEY_GOTHIC_18_BOLD, + //! @note this is the same as Large until ExtraLarge is designed + [TextStyleFont_PinSubtitle] = FONT_KEY_GOTHIC_24, + [TextStyleFont_ParagraphHeader] = FONT_KEY_GOTHIC_18_BOLD, + }, }, - }, }; //////////////////// @@ -159,18 +166,18 @@ GFont system_theme_get_font_for_size(PreferredContentSize size, TextStyleFont fo } GFont system_theme_get_font_for_default_size(TextStyleFont font) { - return fonts_get_system_font(system_theme_get_font_key_for_size(PreferredContentSizeDefault, - font)); + return fonts_get_system_font( + system_theme_get_font_key_for_size(PreferredContentSizeDefault, font)); } static const PreferredContentSize s_platform_default_content_sizes[] = { - [PlatformTypeAplite] = PreferredContentSizeMedium, - [PlatformTypeBasalt] = PreferredContentSizeMedium, - [PlatformTypeChalk] = PreferredContentSizeMedium, - [PlatformTypeDiorite] = PreferredContentSizeMedium, - [PlatformTypeEmery] = PreferredContentSizeLarge, - [PlatformTypeFlint] = PreferredContentSizeMedium, - [PlatformTypeGabbro] = PreferredContentSizeLarge, + [PlatformTypeAplite] = PreferredContentSizeMedium, + [PlatformTypeBasalt] = PreferredContentSizeMedium, + [PlatformTypeChalk] = PreferredContentSizeMedium, + [PlatformTypeDiorite] = PreferredContentSizeMedium, + [PlatformTypeEmery] = PreferredContentSizeLarge, + [PlatformTypeFlint] = PreferredContentSizeMedium, + [PlatformTypeGabbro] = PreferredContentSizeLarge, }; T_STATIC PreferredContentSize prv_convert_content_size_between_platforms(PreferredContentSize size, @@ -191,8 +198,7 @@ T_STATIC PreferredContentSize prv_convert_content_size_between_platforms(Preferr PreferredContentSize system_theme_get_default_content_size_for_runtime_platform(void) { const PlatformType runtime_platform = process_manager_current_platform(); return prv_convert_content_size_between_platforms(PreferredContentSizeDefault, - PBL_PLATFORM_TYPE_CURRENT, - runtime_platform); + PBL_PLATFORM_TYPE_CURRENT, runtime_platform); } PreferredContentSize system_theme_convert_host_content_size_to_runtime_platform( diff --git a/src/fw/shell/system_theme.h b/src/fw/shell/system_theme.h index afdc3c976e..9eea7a702f 100644 --- a/src/fw/shell/system_theme.h +++ b/src/fw/shell/system_theme.h @@ -57,7 +57,6 @@ typedef enum TextStyleFont { TextStyleFontCount } TextStyleFont; - //! @param font The desired font class to obtain a font key of. //! @return The font key of the font class using the user's preferred content size. const char *system_theme_get_font_key(TextStyleFont font); diff --git a/src/fw/startup/startup_cortex_m.c b/src/fw/startup/startup_cortex_m.c index 0f4a00e0f9..2368ce4427 100644 --- a/src/fw/startup/startup_cortex_m.c +++ b/src/fw/startup/startup_cortex_m.c @@ -46,5 +46,6 @@ NORETURN Reset_Handler(void) { main(); // Main shouldn't return - while (true) {} + while (true) { + } } diff --git a/src/fw/startup/startup_qemu.c b/src/fw/startup/startup_qemu.c index f6c3acf3a3..ad4ee5604a 100644 --- a/src/fw/startup/startup_qemu.c +++ b/src/fw/startup/startup_qemu.c @@ -28,18 +28,18 @@ NORETURN prv_startup(void) { main(); - while (1) {} + while (1) { + } } NAKED_FUNC NORETURN Reset_Handler(void) { __asm volatile( - // Set MSPLIM to protect the ISR stack (Cortex-M33) - "ldr r0, =__isr_stack_start__ \n" - "msr msplim, r0 \n" - // Clear PSPLIM - set per-task by FreeRTOS - "mov r0, #0 \n" - "msr psplim, r0 \n" - // Jump to C startup - "b prv_startup \n" - ); + // Set MSPLIM to protect the ISR stack (Cortex-M33) + "ldr r0, =__isr_stack_start__ \n" + "msr msplim, r0 \n" + // Clear PSPLIM - set per-task by FreeRTOS + "mov r0, #0 \n" + "msr psplim, r0 \n" + // Jump to C startup + "b prv_startup \n"); } diff --git a/src/fw/syscall/app_pp_syscalls.c b/src/fw/syscall/app_pp_syscalls.c index 8435afdc45..628e7fc633 100644 --- a/src/fw/syscall/app_pp_syscalls.c +++ b/src/fw/syscall/app_pp_syscalls.c @@ -22,7 +22,7 @@ DEFINE_SYSCALL(CommSession *, sys_app_pp_get_comm_session, void) { } DEFINE_SYSCALL(bool, sys_app_pp_send_data, CommSession *session, uint16_t endpoint_id, - const uint8_t* data, uint16_t length) { + const uint8_t *data, uint16_t length) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(data, length); } diff --git a/src/fw/syscall/app_worker_syscalls.c b/src/fw/syscall/app_worker_syscalls.c index 71e7ec35f6..54f1ee176a 100644 --- a/src/fw/syscall/app_worker_syscalls.c +++ b/src/fw/syscall/app_worker_syscalls.c @@ -19,7 +19,6 @@ DEFINE_SYSCALL(bool, sys_app_worker_is_running, void) { return (uuid_equal(&md->uuid, &app_manager_get_current_app_md()->uuid)); } - // --------------------------------------------------------------------------------------------------------------- // Display the confirmation dialog for switching into the worker static void prv_switch_worker(void *data) { @@ -47,7 +46,7 @@ DEFINE_SYSCALL(AppWorkerResult, sys_app_worker_launch, void) { } // We have to get confirmation first that it is OK to launch the new worker - launcher_task_add_callback(prv_switch_worker, (void *) install_id); + launcher_task_add_callback(prv_switch_worker, (void *)install_id); return APP_WORKER_RESULT_ASKING_CONFIRMATION; } @@ -56,11 +55,9 @@ DEFINE_SYSCALL(AppWorkerResult, sys_app_worker_launch, void) { return APP_WORKER_RESULT_SUCCESS; } - // --------------------------------------------------------------------------------------------------------------- // Kill the worker for the current app DEFINE_SYSCALL(AppWorkerResult, sys_app_worker_kill, void) { - const PebbleProcessMd *md = worker_manager_get_current_worker_md(); if (md == NULL) { return APP_WORKER_RESULT_NOT_RUNNING; @@ -73,13 +70,11 @@ DEFINE_SYSCALL(AppWorkerResult, sys_app_worker_kill, void) { return APP_WORKER_RESULT_SUCCESS; } - // --------------------------------------------------------------------------------------------------------------- // Launch the app for the current worker DEFINE_SYSCALL(void, sys_launch_app_for_worker, void) { - app_manager_put_launch_app_event(&(AppLaunchEventConfig) { - .id = worker_manager_get_task_context()->install_id, - .common.reason = APP_LAUNCH_WORKER, + app_manager_put_launch_app_event(&(AppLaunchEventConfig){ + .id = worker_manager_get_task_context()->install_id, + .common.reason = APP_LAUNCH_WORKER, }); } - diff --git a/src/fw/syscall/ble_syscalls.c b/src/fw/syscall/ble_syscalls.c index fbd902b368..0a4b324940 100644 --- a/src/fw/syscall/ble_syscalls.c +++ b/src/fw/syscall/ble_syscalls.c @@ -49,10 +49,9 @@ DEFINE_SYSCALL(int8_t, sys_ble_get_advertising_tx_power, void) { // ----------------------------------------------------------------------------- // ble_central.h -DEFINE_SYSCALL(BTErrno, sys_ble_central_connect, BTDeviceInternal device, - bool auto_reconnect, bool is_pairing_required) { - return gap_le_connect_connect(&device, auto_reconnect, is_pairing_required, - GAPLEClientApp); +DEFINE_SYSCALL(BTErrno, sys_ble_central_connect, BTDeviceInternal device, bool auto_reconnect, + bool is_pairing_required) { + return gap_le_connect_connect(&device, auto_reconnect, is_pairing_required, GAPLEClientApp); } DEFINE_SYSCALL(BTErrno, sys_ble_central_cancel_connect, BTDeviceInternal device) { @@ -63,12 +62,12 @@ DEFINE_SYSCALL(BTErrno, sys_ble_central_cancel_connect, BTDeviceInternal device) // ble_client.h DEFINE_SYSCALL(BTErrno, sys_ble_client_discover_services_and_characteristics, - BTDeviceInternal device) { + BTDeviceInternal device) { return gatt_client_discovery_discover_all(&device); } DEFINE_SYSCALL(uint8_t, sys_ble_client_copy_services, BTDeviceInternal device, - BLEService services[], uint8_t num_services) { + BLEService services[], uint8_t num_services) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(services, sizeof(BLEService) * num_services); } @@ -85,8 +84,7 @@ DEFINE_SYSCALL(BTErrno, sys_ble_client_read, BLECharacteristic characteristic) { } DEFINE_SYSCALL(bool, sys_ble_client_get_notification_value_length, - BLECharacteristic *characteristic_out, - uint16_t *value_length_out) { + BLECharacteristic *characteristic_out, uint16_t *value_length_out) { if (PRIVILEGE_WAS_ELEVATED) { if (characteristic_out) { syscall_assert_userspace_buffer(characteristic_out, sizeof(*characteristic_out)); @@ -96,8 +94,8 @@ DEFINE_SYSCALL(bool, sys_ble_client_get_notification_value_length, } } GATTBufferedNotificationHeader header; - const bool has_notification = gatt_client_subscriptions_get_notification_header(GAPLEClientApp, - &header); + const bool has_notification = + gatt_client_subscriptions_get_notification_header(GAPLEClientApp, &header); if (has_notification) { if (characteristic_out) { *characteristic_out = header.characteristic; @@ -109,9 +107,8 @@ DEFINE_SYSCALL(bool, sys_ble_client_get_notification_value_length, return has_notification; } -DEFINE_SYSCALL(void, sys_ble_client_consume_read, uintptr_t object_ref, - uint8_t value_out[], - uint16_t *value_length_in_out) { +DEFINE_SYSCALL(void, sys_ble_client_consume_read, uintptr_t object_ref, uint8_t value_out[], + uint16_t *value_length_in_out) { // Snapshot the user-supplied length once so the buffer-size used for // validation is the same one passed down to gatt_client_consume_read_response. // Re-reading *value_length_in_out a second time would let a racing app thread @@ -129,10 +126,7 @@ DEFINE_SYSCALL(void, sys_ble_client_consume_read, uintptr_t object_ref, } DEFINE_SYSCALL(bool, sys_ble_client_consume_notification, uintptr_t *object_ref_out, - uint8_t value_out[], - uint16_t *value_length_in_out, - bool *has_more_out) { - + uint8_t value_out[], uint16_t *value_length_in_out, bool *has_more_out) { // Same snapshot pattern as sys_ble_client_consume_read: the inner function // dereferences value_length_in_out multiple times and gates its memcpy() on // it, so a racing app could let validation pass on a small value and the @@ -156,8 +150,7 @@ DEFINE_SYSCALL(bool, sys_ble_client_consume_notification, uintptr_t *object_ref_ } DEFINE_SYSCALL(BTErrno, sys_ble_client_write, BLECharacteristic characteristic, - const uint8_t *value, - size_t value_length) { + const uint8_t *value, size_t value_length) { // gatt_client_op_write hands `value`/`value_length` straight to the BLE // driver, which transmits those bytes to the peer. Without this check an // app can point `value` at any kernel address and use the remote device as @@ -168,32 +161,25 @@ DEFINE_SYSCALL(BTErrno, sys_ble_client_write, BLECharacteristic characteristic, return gatt_client_op_write(characteristic, value, value_length, GAPLEClientApp); } -DEFINE_SYSCALL(BTErrno, sys_ble_client_write_without_response, - BLECharacteristic characteristic, - const uint8_t *value, - size_t value_length) { +DEFINE_SYSCALL(BTErrno, sys_ble_client_write_without_response, BLECharacteristic characteristic, + const uint8_t *value, size_t value_length) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(value, value_length); } - return gatt_client_op_write_without_response(characteristic, - value, value_length, GAPLEClientApp); + return gatt_client_op_write_without_response(characteristic, value, value_length, GAPLEClientApp); } DEFINE_SYSCALL(BTErrno, sys_ble_client_subscribe, BLECharacteristic characteristic, - BLESubscription subscription_type) { - return gatt_client_subscriptions_subscribe(characteristic, - subscription_type, - GAPLEClientApp); + BLESubscription subscription_type) { + return gatt_client_subscriptions_subscribe(characteristic, subscription_type, GAPLEClientApp); } DEFINE_SYSCALL(BTErrno, sys_ble_client_write_descriptor, BLEDescriptor descriptor, - const uint8_t *value, - size_t value_length) { + const uint8_t *value, size_t value_length) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(value, value_length); } - return gatt_client_op_write_descriptor(descriptor, - value, value_length, GAPLEClientApp); + return gatt_client_op_write_descriptor(descriptor, value, value_length, GAPLEClientApp); } DEFINE_SYSCALL(BTErrno, sys_ble_client_read_descriptor, BLEDescriptor descriptor) { @@ -204,15 +190,13 @@ DEFINE_SYSCALL(BTErrno, sys_ble_client_read_descriptor, BLEDescriptor descriptor // ble_service.h DEFINE_SYSCALL(uint8_t, sys_ble_service_get_characteristics, BLEService service_ref, - BLECharacteristic characteristics_out[], - uint8_t num_characteristics) { + BLECharacteristic characteristics_out[], uint8_t num_characteristics) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(characteristics_out, sizeof(BLECharacteristic) * num_characteristics); } - return gatt_client_service_get_characteristics(service_ref, - characteristics_out, + return gatt_client_service_get_characteristics(service_ref, characteristics_out, num_characteristics); } @@ -231,23 +215,20 @@ DEFINE_SYSCALL(void, sys_ble_service_get_device, BTDeviceInternal *device, BLESe } DEFINE_SYSCALL(uint8_t, sys_ble_service_get_included_services, BLEService service_ref, - BLEService included_services_out[], - uint8_t num_services) { + BLEService included_services_out[], uint8_t num_services) { if (PRIVILEGE_WAS_ELEVATED) { - syscall_assert_userspace_buffer(included_services_out, - sizeof(BLEService) * num_services); + syscall_assert_userspace_buffer(included_services_out, sizeof(BLEService) * num_services); } - return gatt_client_service_get_included_services(service_ref, - included_services_out, - num_services); + return gatt_client_service_get_included_services(service_ref, included_services_out, + num_services); } // ----------------------------------------------------------------------------- // ble_characteristic.h -DEFINE_SYSCALL(void, sys_ble_characteristic_get_uuid, - Uuid *uuid, BLECharacteristic characteristic) { +DEFINE_SYSCALL(void, sys_ble_characteristic_get_uuid, Uuid *uuid, + BLECharacteristic characteristic) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(uuid, sizeof(*uuid)); } @@ -255,7 +236,7 @@ DEFINE_SYSCALL(void, sys_ble_characteristic_get_uuid, } DEFINE_SYSCALL(BLEAttributeProperty, sys_ble_characteristic_get_properties, - BLECharacteristic characteristic) { + BLECharacteristic characteristic) { return gatt_client_characteristic_get_properties(characteristic); } @@ -263,25 +244,20 @@ DEFINE_SYSCALL(BLEService, sys_ble_characteristic_get_service, BLECharacteristic return gatt_client_characteristic_get_service(characteristic); } -DEFINE_SYSCALL(void, sys_ble_characteristic_get_device, - BTDevice *device, BLECharacteristic characteristic) { +DEFINE_SYSCALL(void, sys_ble_characteristic_get_device, BTDevice *device, + BLECharacteristic characteristic) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(device, sizeof(*device)); } *device = gatt_client_characteristic_get_device(characteristic).opaque; } -DEFINE_SYSCALL(uint8_t, sys_ble_characteristic_get_descriptors, - BLECharacteristic characteristic, - BLEDescriptor descriptors_out[], - uint8_t num_descriptors) { - +DEFINE_SYSCALL(uint8_t, sys_ble_characteristic_get_descriptors, BLECharacteristic characteristic, + BLEDescriptor descriptors_out[], uint8_t num_descriptors) { if (PRIVILEGE_WAS_ELEVATED) { - syscall_assert_userspace_buffer(descriptors_out, - sizeof(BLEDescriptor) * num_descriptors); + syscall_assert_userspace_buffer(descriptors_out, sizeof(BLEDescriptor) * num_descriptors); } - return gatt_client_characteristic_get_descriptors(characteristic, - descriptors_out, + return gatt_client_characteristic_get_descriptors(characteristic, descriptors_out, num_descriptors); } diff --git a/src/fw/syscall/event_syscalls.c b/src/fw/syscall/event_syscalls.c index 446b78816d..54ff311dc0 100644 --- a/src/fw/syscall/event_syscalls.c +++ b/src/fw/syscall/event_syscalls.c @@ -14,7 +14,7 @@ static void prv_put_event_from_process(PebbleTask task, PebbleEvent *event) { if (!event_try_put_from_process(task, event)) { PBL_LOG_WRN("%s: From app queue is full! Dropped %p! Killing App", - (task == PebbleTask_App ? "App" : "Worker"), event); + (task == PebbleTask_App ? "App" : "Worker"), event); syscall_failed(); } } @@ -36,7 +36,7 @@ static bool prv_event_type_allowed_from_user(PebbleEventType type) { } } -DEFINE_SYSCALL(void, sys_send_pebble_event_to_kernel, PebbleEvent* event) { +DEFINE_SYSCALL(void, sys_send_pebble_event_to_kernel, PebbleEvent *event) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(event, sizeof(*event)); if (!prv_event_type_allowed_from_user(event->type)) { @@ -53,16 +53,16 @@ DEFINE_SYSCALL(void, sys_send_pebble_event_to_kernel, PebbleEvent* event) { } } -DEFINE_SYSCALL(void, sys_current_process_schedule_callback, - CallbackEventCallback async_cb, void *ctx) { +DEFINE_SYSCALL(void, sys_current_process_schedule_callback, CallbackEventCallback async_cb, + void *ctx) { // No userspace buffer assertion for ctx needed, because it won't be accessed by the kernel. PebbleEvent event = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = async_cb, - .data = ctx, - }, + .type = PEBBLE_CALLBACK_EVENT, + .callback = { + .callback = async_cb, + .data = ctx, + }, }; const PebbleTask task = pebble_task_get_current(); PBL_ASSERTN(task == PebbleTask_App || task == PebbleTask_Worker); @@ -121,13 +121,13 @@ DEFINE_SYSCALL(void, sys_event_service_client_subscribe, EventServiceInfo *handl // Subscribe to the service! PebbleEvent event = { - .type = PEBBLE_SUBSCRIPTION_EVENT, - .subscription = { - .subscribe = true, - .task = task, - .event_queue = event_queue, - .event_type = handler->type, - }, + .type = PEBBLE_SUBSCRIPTION_EVENT, + .subscription = { + .subscribe = true, + .task = task, + .event_queue = event_queue, + .event_type = handler->type, + }, }; if (task == PebbleTask_KernelMain) { // The client is also KernelMain, just subscribe immediately without putting an event @@ -138,7 +138,7 @@ DEFINE_SYSCALL(void, sys_event_service_client_subscribe, EventServiceInfo *handl } DEFINE_SYSCALL(void, sys_event_service_client_unsubscribe, EventServiceInfo *state, - EventServiceInfo *handler) { + EventServiceInfo *handler) { PebbleTask task = pebble_task_get_current(); if (PRIVILEGE_WAS_ELEVATED) { @@ -159,18 +159,18 @@ DEFINE_SYSCALL(void, sys_event_service_client_unsubscribe, EventServiceInfo *sta // Remove from handlers list list_remove(&handler->list_node, NULL, NULL); - if (list_find(&state->list_node, event_service_filter, (void *) handler->type)) { + if (list_find(&state->list_node, event_service_filter, (void *)handler->type)) { // there are other handlers for this task, don't unsubscribe it return; } // Unsubscribe from the service! PebbleEvent event = { - .type = PEBBLE_SUBSCRIPTION_EVENT, - .subscription = { - .subscribe = false, - .task = task, - .event_type = handler->type, - }, + .type = PEBBLE_SUBSCRIPTION_EVENT, + .subscription = { + .subscribe = false, + .task = task, + .event_type = handler->type, + }, }; prv_put_event_from_process(task, &event); } diff --git a/src/fw/syscall/profiler_syscalls.c b/src/fw/syscall/profiler_syscalls.c index 3cda5dd0b2..f2bd64dd12 100644 --- a/src/fw/syscall/profiler_syscalls.c +++ b/src/fw/syscall/profiler_syscalls.c @@ -6,17 +6,15 @@ #include - // ------------------------------------------------------------------------------------ // Find node by ptr -static bool prv_ptr_list_filter(ListNode* list_node, void* data) { - ProfilerNode* node = (ProfilerNode*)list_node; +static bool prv_ptr_list_filter(ListNode *list_node, void *data) { + ProfilerNode *node = (ProfilerNode *)list_node; return (node == data); } - ProfilerNode *prv_find_node(ProfilerNode *find_node) { - ListNode* node = list_find(g_profiler.nodes, prv_ptr_list_filter, (void*)find_node); + ListNode *node = list_find(g_profiler.nodes, prv_ptr_list_filter, (void *)find_node); return (ProfilerNode *)node; } @@ -50,7 +48,6 @@ DEFINE_SYSCALL(void, sys_profiler_node_start, ProfilerNode *node) { } DEFINE_SYSCALL(void, sys_profiler_node_stop, ProfilerNode *node) { - // Capture the cycle count as soon as possible, before we validate the node argument uint32_t dwt_cyc_cnt = DWT->CYCCNT; diff --git a/src/fw/syscall/syscall.c b/src/fw/syscall/syscall.c index 92a8cdf916..ad748c4a05 100644 --- a/src/fw/syscall/syscall.c +++ b/src/fw/syscall/syscall.c @@ -18,10 +18,10 @@ DEFINE_SYSCALL(int, sys_test, int arg) { uint32_t ipsr; - __asm volatile("mrs %0, ipsr" : "=r" (ipsr)); + __asm volatile("mrs %0, ipsr" : "=r"(ipsr)); - PBL_LOG_DBG("Inside test kernel function! Privileged? %s Arg %u IPSR: %"PRIu32, - bool_to_str(mcu_state_is_privileged()), arg, ipsr); + PBL_LOG_DBG("Inside test kernel function! Privileged? %s Arg %u IPSR: %" PRIu32, + bool_to_str(mcu_state_is_privileged()), arg, ipsr); return arg * 2; } @@ -43,7 +43,7 @@ DEFINE_SYSCALL(RtcTicks, sys_get_ticks, void) { return rtc_get_ticks(); } -DEFINE_SYSCALL(void, sys_pbl_log, LogBinaryMessage* log_message, bool async) { +DEFINE_SYSCALL(void, sys_pbl_log, LogBinaryMessage *log_message, bool async) { // log_message points at a struct whose trailing message[] is sized by the // embedded message_length byte. Without a check, an app can hand us any // kernel address: log_level and message_length steer the formatting code, @@ -58,14 +58,14 @@ DEFINE_SYSCALL(void, sys_pbl_log, LogBinaryMessage* log_message, bool async) { kernel_pbl_log(log_message, async); } -DEFINE_SYSCALL(void, sys_copy_timezone_abbr, char* timezone_abbr, time_t time) { +DEFINE_SYSCALL(void, sys_copy_timezone_abbr, char *timezone_abbr, time_t time) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(timezone_abbr, TZ_LEN); } time_get_timezone_abbr(timezone_abbr, time); } -DEFINE_SYSCALL(struct tm*, sys_gmtime_r, const time_t *timep, struct tm *result) { +DEFINE_SYSCALL(struct tm *, sys_gmtime_r, const time_t *timep, struct tm *result) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(timep, sizeof(*timep)); syscall_assert_userspace_buffer(result, sizeof(*result)); @@ -73,7 +73,7 @@ DEFINE_SYSCALL(struct tm*, sys_gmtime_r, const time_t *timep, struct tm *result) return gmtime_r(timep, result); } -DEFINE_SYSCALL(struct tm*, sys_localtime_r, const time_t *timep, struct tm *result) { +DEFINE_SYSCALL(struct tm *, sys_localtime_r, const time_t *timep, struct tm *result) { if (PRIVILEGE_WAS_ELEVATED) { syscall_assert_userspace_buffer(timep, sizeof(*timep)); syscall_assert_userspace_buffer(result, sizeof(*result)); diff --git a/src/fw/syscall/syscall.h b/src/fw/syscall/syscall.h index 883fa327d4..7fd5c1b18c 100644 --- a/src/fw/syscall/syscall.h +++ b/src/fw/syscall/syscall.h @@ -44,30 +44,30 @@ int sys_test(int arg); time_t sys_get_time(void); void sys_get_time_ms(time_t *t, uint16_t *out_ms); RtcTicks sys_get_ticks(void); -struct tm* sys_gmtime_r(const time_t *timep, struct tm *result); -struct tm* sys_localtime_r(const time_t *timep, struct tm *result); -void sys_copy_timezone_abbr(char* timezone_abbr, time_t time); +struct tm *sys_gmtime_r(const time_t *timep, struct tm *result); +struct tm *sys_localtime_r(const time_t *timep, struct tm *result); +void sys_copy_timezone_abbr(char *timezone_abbr, time_t time); time_t sys_time_start_of_today(void); +void sys_evented_timer_consume(TimerID timer_id, EventedTimerCallback *out_cb, void **out_cb_data); -void sys_evented_timer_consume(TimerID timer_id, EventedTimerCallback* out_cb, void** out_cb_data); - -void sys_send_pebble_event_to_kernel(PebbleEvent* event); +void sys_send_pebble_event_to_kernel(PebbleEvent *event); void sys_current_process_schedule_callback(CallbackEventCallback async_cb, void *ctx); uint32_t sys_process_events_waiting(PebbleTask task); -void sys_get_pebble_event(PebbleEvent* event); +void sys_get_pebble_event(PebbleEvent *event); -void sys_pbl_log(LogBinaryMessage* log_message, bool async); +void sys_pbl_log(LogBinaryMessage *log_message, bool async); NORETURN sys_app_fault(uint32_t stashed_lr); bool sys_resource_is_valid(ResAppNum app_num, uint32_t resource_id); size_t sys_resource_size(ResAppNum app_num, uint32_t handle); -size_t sys_resource_load_range(ResAppNum app_num, uint32_t h, uint32_t start_bytes, uint8_t *buffer, size_t num_bytes); +size_t sys_resource_load_range(ResAppNum app_num, uint32_t h, uint32_t start_bytes, uint8_t *buffer, + size_t num_bytes); bool sys_resource_bytes_are_readonly(void *bytes); -const uint8_t * sys_resource_read_only_bytes(ResAppNum app_num, uint32_t resource_id, - size_t *num_bytes_out); +const uint8_t *sys_resource_read_only_bytes(ResAppNum app_num, uint32_t resource_id, + size_t *num_bytes_out); uint32_t sys_resource_get_and_cache(ResAppNum app_num, uint32_t resource_id); @@ -88,13 +88,12 @@ int32_t sys_vibe_get_vibe_strength(void); // Speaker syscalls #include "pbl/services/speaker/note_sequence.h" #include "pbl/services/speaker/track.h" -bool sys_speaker_play_note_seq(const SpeakerNote *notes, uint32_t num_notes, - uint8_t priority, uint8_t volume); -bool sys_speaker_play_tone(uint16_t freq_hz, uint16_t duration_ms, - uint8_t waveform, uint8_t velocity, - uint8_t priority, uint8_t volume); -bool sys_speaker_play_tracks(const SpeakerTrack *tracks, uint32_t num_tracks, - uint8_t priority, uint8_t volume); +bool sys_speaker_play_note_seq(const SpeakerNote *notes, uint32_t num_notes, uint8_t priority, + uint8_t volume); +bool sys_speaker_play_tone(uint16_t freq_hz, uint16_t duration_ms, uint8_t waveform, + uint8_t velocity, uint8_t priority, uint8_t volume); +bool sys_speaker_play_tracks(const SpeakerTrack *tracks, uint32_t num_tracks, uint8_t priority, + uint8_t volume); bool sys_speaker_stream_open(uint8_t priority, uint8_t volume, uint8_t format); uint32_t sys_speaker_stream_write(const void *data, uint32_t num_bytes); void sys_speaker_stream_close(void); @@ -133,28 +132,22 @@ BTErrno sys_ble_central_connect(BTDevice device, bool auto_reconnect, bool is_pa BTErrno sys_ble_central_cancel_connect(BTDevice device); BTErrno sys_ble_client_discover_services_and_characteristics(BTDevice device); -uint8_t sys_ble_client_copy_services(BTDeviceInternal device, - BLEService services[], uint8_t num_services); +uint8_t sys_ble_client_copy_services(BTDeviceInternal device, BLEService services[], + uint8_t num_services); uint16_t sys_ble_client_get_maximum_value_length(BTDevice device); BTErrno sys_ble_client_read(BLECharacteristic characteristic); bool sys_ble_client_get_notification_value_length(uint16_t *value_length_out); -void sys_ble_client_consume_read(uintptr_t object_ref, - uint8_t value_out[], +void sys_ble_client_consume_read(uintptr_t object_ref, uint8_t value_out[], uint16_t *value_length_in_out); -bool sys_ble_client_consume_notification(uintptr_t *object_ref_out, - uint8_t value_out[], - uint16_t *value_length_in_out, - bool *has_more_out); -BTErrno sys_ble_client_write(BLECharacteristic characteristic, - const uint8_t *value, +bool sys_ble_client_consume_notification(uintptr_t *object_ref_out, uint8_t value_out[], + uint16_t *value_length_in_out, bool *has_more_out); +BTErrno sys_ble_client_write(BLECharacteristic characteristic, const uint8_t *value, size_t value_length); BTErrno sys_ble_client_write_without_response(BLECharacteristic characteristic, - const uint8_t *value, - size_t value_length); + const uint8_t *value, size_t value_length); BTErrno sys_ble_client_subscribe(BLECharacteristic characteristic, BLESubscription subscription_type); -BTErrno sys_ble_client_write_descriptor(BLEDescriptor descriptor, - const uint8_t *value, +BTErrno sys_ble_client_write_descriptor(BLEDescriptor descriptor, const uint8_t *value, size_t value_length); BTErrno sys_ble_client_read_descriptor(BLEDescriptor descriptor); @@ -178,15 +171,17 @@ uint8_t sys_ble_characteristic_get_descriptors(BLECharacteristic characteristic, void sys_ble_descriptor_get_uuid(Uuid *uuid, BLEDescriptor descriptor); BLECharacteristic sys_ble_descriptor_get_characteristic(BLEDescriptor descriptor); -int16_t sys_event_service_get_plugin_service_index(const Uuid * uuid); +int16_t sys_event_service_get_plugin_service_index(const Uuid *uuid); DataLoggingSessionRef sys_data_logging_create(uint32_t tag, DataLoggingItemType type, uint16_t item_size, void *buffer, bool resume); void sys_data_logging_finish(DataLoggingSessionRef logging_session); -DataLoggingResult sys_data_logging_log(DataLoggingSessionRef logging_session, const void *data, uint32_t num_items); +DataLoggingResult sys_data_logging_log(DataLoggingSessionRef logging_session, const void *data, + uint32_t num_items); bool sys_clock_is_24h_style(void); -size_t sys_strftime(char* s, size_t maxsize, const char* format, const struct tm* tim_p, char *locale); +size_t sys_strftime(char *s, size_t maxsize, const char *format, const struct tm *tim_p, + char *locale); BatteryChargeState sys_battery_get_charge_state(void); @@ -240,20 +235,19 @@ void sys_touch_set_action_bar(const GRect *frame, uint8_t icon_mask); //! app_touch_navigation_enable() SDK call). Only acts on the app task. void sys_app_touch_navigation_enable(bool enable); - bool sys_app_inbox_service_register(uint8_t *storage, size_t storage_size, AppInboxMessageHandler message_handler, AppInboxDroppedHandler dropped_handler); uint32_t sys_app_inbox_service_unregister(uint8_t *storage); void sys_app_inbox_service_consume(AppInboxConsumerInfo *consumer_info); -void sys_app_outbox_send(const uint8_t *data, size_t length, - AppOutboxSentHandler sent_handler, void *cb_ctx); +void sys_app_outbox_send(const uint8_t *data, size_t length, AppOutboxSentHandler sent_handler, + void *cb_ctx); -bool sys_app_pp_send_data(CommSession *session, uint16_t endpoint_id, - const uint8_t* data, uint16_t length); +bool sys_app_pp_send_data(CommSession *session, uint16_t endpoint_id, const uint8_t *data, + uint16_t length); -CommSession * sys_app_pp_get_comm_session(void); +CommSession *sys_app_pp_get_comm_session(void); bool sys_app_pp_has_capability(CommSessionCapability capability); @@ -284,7 +278,7 @@ void sys_process_set_exit_reason(AppExitReason exit_reason); void sys_process_get_wakeup_info(WakeupInfo *info); //! Get the meta-data for the current process -const PebbleProcessMd* sys_process_manager_get_current_process_md(void); +const PebbleProcessMd *sys_process_manager_get_current_process_md(void); //! Copy UUID for the current process. //! @return True if the UUID was successfully copied. diff --git a/src/fw/syscall/syscall_internal.c b/src/fw/syscall/syscall_internal.c index eb782ab987..59afbbc0eb 100644 --- a/src/fw/syscall/syscall_internal.c +++ b/src/fw/syscall/syscall_internal.c @@ -24,11 +24,11 @@ // unprivileged (only that process dies) instead of rebooting the system. // Enabled on ARMv8-M (needs PSPLIM); ARMv7-M keeps the old behaviour. #if !defined(SYSCALL_PRIVILEGED_STACK) -# if defined(CONFIG_MPU_TYPE_ARMV8M) -# define SYSCALL_PRIVILEGED_STACK 1 -# else -# define SYSCALL_PRIVILEGED_STACK 0 -# endif +#if defined(CONFIG_MPU_TYPE_ARMV8M) +#define SYSCALL_PRIVILEGED_STACK 1 +#else +#define SYSCALL_PRIVILEGED_STACK 0 +#endif #endif // Per-thread slots for the syscall return address and pre-syscall stack pointer @@ -78,9 +78,8 @@ static McuUnprivilegedCallContext *prv_unprivileged_call_ctx_for_current_task(vo return &s_unprivileged_call_ctx[task]; } -static USED void mcu_call_unprivileged_enter(void (*fn)(void *), void *ctx, - uintptr_t caller_lr, uintptr_t entry_sp, - const uint32_t *saved_regs) { +static USED void mcu_call_unprivileged_enter(void (*fn)(void *), void *ctx, uintptr_t caller_lr, + uintptr_t entry_sp, const uint32_t *saved_regs) { (void)ctx; PBL_ASSERTN(mcu_state_is_thread_privileged()); @@ -93,18 +92,18 @@ static USED void mcu_call_unprivileged_enter(void (*fn)(void *), void *ctx, if (state->active && state->thread_id != thread_id) { // Slots are indexed by PebbleTask. If a task died mid-callback and a new // thread reused the PebbleTask, discard the old call state first. - *state = (McuUnprivilegedCallContext) { 0 }; + *state = (McuUnprivilegedCallContext){0}; } PBL_ASSERTN(!state->active); - *state = (McuUnprivilegedCallContext) { - .active = true, - .thread_id = thread_id, - .caller_lr = caller_lr, - .entry_sp = entry_sp, - .outer_syscall_lr = get_syscall_lr(), - .outer_syscall_sp = prv_get_syscall_sp(), + *state = (McuUnprivilegedCallContext){ + .active = true, + .thread_id = thread_id, + .caller_lr = caller_lr, + .entry_sp = entry_sp, + .outer_syscall_lr = get_syscall_lr(), + .outer_syscall_sp = prv_get_syscall_sp(), }; for (size_t i = 0; i < ARRAY_LENGTH(state->saved_r4_r11); ++i) { @@ -123,8 +122,7 @@ static uintptr_t prv_mcu_call_unprivileged_reentry_return_pc(void) { static McuUnprivilegedCallContext *prv_active_unprivileged_call_ctx_for_current_task(void) { McuUnprivilegedCallContext *state = prv_unprivileged_call_ctx_for_current_task(); - if (state == NULL || !state->active || - state->thread_id != pbl_thread_id(pbl_thread_current())) { + if (state == NULL || !state->active || state->thread_id != pbl_thread_id(pbl_thread_current())) { return NULL; } return state; @@ -183,63 +181,59 @@ bool mcu_call_unprivileged_reentry_setup(uintptr_t orig_sp, uintptr_t *lr_ptr) { //! The re-entry SVC is deliberately outside .syscall_text. It is only accepted //! while this call is active for the current task, and the SVC handler resumes //! through saved kernel state instead of the callback's stack. -EXTERNALLY_VISIBLE NAKED_FUNC USED -void mcu_call_unprivileged(void (*fn)(void *), void *ctx) { - __asm volatile ( - // Keep fn/ctx across the setup call. Copy r4-r11 too; native app code is - // not trusted to preserve the privileged caller's callee-saved registers. - " push {r4-r11} \n" - " push {r0, r1} \n" - " mov r2, lr \n" // r2 = privileged caller LR - // These offsets are tied to the two pushes above: - // push {r4-r11} = 32 bytes, push {r0,r1} = 8 bytes. - " add r3, sp, #40 \n" // r3 = entry SP before pushes - " add r12, sp, #8 \n" // r12 = saved r4-r11 pointer - " sub sp, sp, #8 \n" // keep stack 8-byte aligned for C call - " str r12, [sp] \n" // 5th arg: saved_regs pointer - " bl mcu_call_unprivileged_enter \n" - " add sp, sp, #8 \n" // discard 5th arg + alignment pad - " pop {r2, r3} \n" // r2 = fn, r3 = ctx - " add sp, sp, #32 \n" // saved r4-r11 copied to kernel state - - // Drop privilege inline (CONTROL.nPRIV = 1). Calling the C helper would - // clobber the app callback registers we just restored. - " mrs r0, control \n" - " orr r0, r0, #1 \n" - " msr control, r0 \n" - " isb \n" - - // Invoke fn(ctx) unprivileged. MPU-violating accesses fault here. - " mov r0, r3 \n" - " blx r2 \n" - - // Re-enter privileged mode. The handler accepts this exact callsite only - // while this mcu_call_unprivileged() call is active for the current task. - " .global __mcu_call_unprivileged_svc \n" - "__mcu_call_unprivileged_svc: \n" - " svc 2 \n" - // Deliberate fail-closed trap. If the SVC was denied or not rewritten, do - // not keep executing in the callback's control flow. - " udf #0 \n" - ); +EXTERNALLY_VISIBLE NAKED_FUNC USED void mcu_call_unprivileged(void (*fn)(void *), void *ctx) { + __asm volatile( + // Keep fn/ctx across the setup call. Copy r4-r11 too; native app code is + // not trusted to preserve the privileged caller's callee-saved registers. + " push {r4-r11} \n" + " push {r0, r1} \n" + " mov r2, lr \n" // r2 = privileged caller LR + // These offsets are tied to the two pushes above: + // push {r4-r11} = 32 bytes, push {r0,r1} = 8 bytes. + " add r3, sp, #40 \n" // r3 = entry SP before pushes + " add r12, sp, #8 \n" // r12 = saved r4-r11 pointer + " sub sp, sp, #8 \n" // keep stack 8-byte aligned for C call + " str r12, [sp] \n" // 5th arg: saved_regs pointer + " bl mcu_call_unprivileged_enter \n" + " add sp, sp, #8 \n" // discard 5th arg + alignment pad + " pop {r2, r3} \n" // r2 = fn, r3 = ctx + " add sp, sp, #32 \n" // saved r4-r11 copied to kernel state + + // Drop privilege inline (CONTROL.nPRIV = 1). Calling the C helper would + // clobber the app callback registers we just restored. + " mrs r0, control \n" + " orr r0, r0, #1 \n" + " msr control, r0 \n" + " isb \n" + + // Invoke fn(ctx) unprivileged. MPU-violating accesses fault here. + " mov r0, r3 \n" + " blx r2 \n" + + // Re-enter privileged mode. The handler accepts this exact callsite only + // while this mcu_call_unprivileged() call is active for the current task. + " .global __mcu_call_unprivileged_svc \n" + "__mcu_call_unprivileged_svc: \n" + " svc 2 \n" + // Deliberate fail-closed trap. If the SVC was denied or not rewritten, do + // not keep executing in the callback's control flow. + " udf #0 \n"); } -EXTERNALLY_VISIBLE NAKED_FUNC USED -void mcu_call_unprivileged_resume(void) { - __asm volatile ( - // r0 is the state pointer stamped into the frame by Handler mode. Restore - // SP before any stack use. - " ldr r12, [r0, #%c[caller_lr_off]] \n" - " ldr r1, [r0, #%c[entry_sp_off]] \n" - " mov sp, r1 \n" - " adds r0, r0, #%c[regs_off] \n" - " ldmia r0, {r4-r11} \n" - " bx r12 \n" - : - : [caller_lr_off] "i" (offsetof(McuUnprivilegedCallContext, caller_lr)), - [entry_sp_off] "i" (offsetof(McuUnprivilegedCallContext, entry_sp)), - [regs_off] "i" (offsetof(McuUnprivilegedCallContext, saved_r4_r11)) - ); +EXTERNALLY_VISIBLE NAKED_FUNC USED void mcu_call_unprivileged_resume(void) { + __asm volatile( + // r0 is the state pointer stamped into the frame by Handler mode. Restore + // SP before any stack use. + " ldr r12, [r0, #%c[caller_lr_off]] \n" + " ldr r1, [r0, #%c[entry_sp_off]] \n" + " mov sp, r1 \n" + " adds r0, r0, #%c[regs_off] \n" + " ldmia r0, {r4-r11} \n" + " bx r12 \n" + : + : [caller_lr_off] "i"(offsetof(McuUnprivilegedCallContext, caller_lr)), + [entry_sp_off] "i"(offsetof(McuUnprivilegedCallContext, entry_sp)), + [regs_off] "i"(offsetof(McuUnprivilegedCallContext, saved_r4_r11))); } NORETURN syscall_failed(void) { @@ -253,21 +247,22 @@ NORETURN syscall_failed(void) { sys_app_fault(saved_lr); // sys_die is no return, but it's a syscall so I don't want to mark it with that attribute - while(1) { } + while (1) { + } } -void syscall_assert_userspace_buffer(const void* buf, size_t num_bytes) { +void syscall_assert_userspace_buffer(const void *buf, size_t num_bytes) { PebbleTask task = pebble_task_get_current(); void *user_stack_end = (void *)prv_get_syscall_sp(); - if (process_manager_is_address_in_region(task, buf, user_stack_end) - && process_manager_is_address_in_region( - task, (uint8_t *)buf + num_bytes -1, user_stack_end)) { + if (process_manager_is_address_in_region(task, buf, user_stack_end) && + process_manager_is_address_in_region(task, (uint8_t *)buf + num_bytes - 1, user_stack_end)) { return; } - APP_LOG(APP_LOG_LEVEL_ERROR, "syscall failure! %p..%p is not in app space.", buf, (char *)buf + num_bytes); + APP_LOG(APP_LOG_LEVEL_ERROR, "syscall failure! %p..%p is not in app space.", buf, + (char *)buf + num_bytes); PBL_LOG_ERR("syscall failure! %p..%p is not in app space.", buf, (char *)buf + num_bytes); syscall_failed(); } @@ -288,12 +283,12 @@ uint32_t *pbl_kernel_syscall_stack(uintptr_t *base_out) { switch (pebble_task_get_current()) { case PebbleTask_App: #ifdef CONFIG_MODDABLE_XS - { - const PebbleProcessMd *md = app_manager_get_current_app_md(); - if (md != NULL && md->is_moddable_app) { - return NULL; - } + { + const PebbleProcessMd *md = app_manager_get_current_app_md(); + if (md != NULL && md->is_moddable_app) { + return NULL; } + } #endif stack = s_app_syscall_stack; break; @@ -347,52 +342,56 @@ uint16_t syscall_worker_stack_free_bytes(void) { // Drop privilege and return to the task. If the syscall ran on a dedicated // stack, restore PSP/PSPLIM to the task stack first (while still privileged). EXTERNALLY_VISIBLE void NAKED_FUNC USED prv_drop_privilege(void) { - __asm volatile ( - " push {r0, r1} \n" // save syscall return value - " bl process_manager_handle_syscall_exit \n" - " bl get_syscall_lr \n" // r0 = real return address - " push {r0, r1} \n" // save real LR (r1 = pad; keeps 8-byte align) - " bl syscall_stack_restore_target \n" // r0 = restore SP (0 = none), r1 = restore PSPLIM - " mov r2, r0 \n" // r2 = restore SP - " mov r3, r1 \n" // r3 = restore PSPLIM - " pop {r0, r1} \n" // r0 = real LR - " mov r12, r0 \n" // r12 = real LR (caller-saved; no bl follows) - " pop {r0, r1} \n" // r0,r1 = syscall return value - " cbz r2, 1f \n" // skip stack switch if not relocated - " msr psp, r2 \n" // back to the app stack (higher addr; safe vs low limit) - " msr psplim, r3 \n" // restore the app stack limit - " isb \n" - "1: \n" - " mrs r2, control \n" // drop privilege: CONTROL.nPRIV = 1 - " orr r2, r2, #1 \n" - " msr control, r2 \n" - " isb \n" - " bx r12 \n" // return into the app + __asm volatile( + " push {r0, r1} \n" // save syscall return value + " bl process_manager_handle_syscall_exit \n" + " bl get_syscall_lr \n" // r0 = real return address + " push {r0, r1} \n" // save real LR (r1 = pad; keeps 8-byte align) + " bl syscall_stack_restore_target \n" // r0 = restore SP (0 = none), r1 = restore PSPLIM + " mov r2, r0 \n" // r2 = restore SP + " mov r3, r1 \n" // r3 = restore PSPLIM + " pop {r0, r1} \n" // r0 = real LR + " mov r12, r0 \n" // r12 = real LR (caller-saved; no bl follows) + " pop {r0, r1} \n" // r0,r1 = syscall return value + " cbz r2, 1f \n" // skip stack switch if not relocated + " msr psp, r2 \n" // back to the app stack (higher addr; safe vs low limit) + " msr psplim, r3 \n" // restore the app stack limit + " isb \n" + "1: \n" + " mrs r2, control \n" // drop privilege: CONTROL.nPRIV = 1 + " orr r2, r2, #1 \n" + " msr control, r2 \n" + " isb \n" + " bx r12 \n" // return into the app ); } #else -uint16_t syscall_app_stack_free_bytes(void) { return 0xFFFF; } -uint16_t syscall_worker_stack_free_bytes(void) { return 0xFFFF; } +uint16_t syscall_app_stack_free_bytes(void) { + return 0xFFFF; +} +uint16_t syscall_worker_stack_free_bytes(void) { + return 0xFFFF; +} // Drop privileges and return to the address stored in thread local storage // Has to preserve r0 and r1 so the syscall's return value is passed through EXTERNALLY_VISIBLE void NAKED_FUNC USED prv_drop_privilege(void) { - __asm volatile ( - " push {r0, r1} \n" - " bl process_manager_handle_syscall_exit \n" - " bl get_syscall_lr \n" - " push { r0 } \n" // push the correct lr onto the stack + __asm volatile( + " push {r0, r1} \n" + " bl process_manager_handle_syscall_exit \n" + " bl get_syscall_lr \n" + " push { r0 } \n" // push the correct lr onto the stack - " mov r0, #0 \n" // mcu_state_set_thread_privilege(false) - " bl mcu_state_set_thread_privilege \n" + " mov r0, #0 \n" // mcu_state_set_thread_privilege(false) + " bl mcu_state_set_thread_privilege \n" - " pop {lr} \n" // Pop correct return address - " pop {r0, r1} \n" // Restore the return values of the syscall + " pop {lr} \n" // Pop correct return address + " pop {r0, r1} \n" // Restore the return values of the syscall - " bx lr \n" // Leave the syscall + " bx lr \n" // Leave the syscall ); } -#endif // SYSCALL_PRIVILEGED_STACK +#endif // SYSCALL_PRIVILEGED_STACK // Just jump straight into the drop privilege code EXTERNALLY_VISIBLE void NAKED_FUNC USED prv_drop_privilege_wrapper(void) { @@ -406,48 +405,48 @@ EXTERNALLY_VISIBLE void NAKED_FUNC USED prv_drop_privilege_wrapper(void) { // called elevating privileges. If the caller was already privileged, this function // returns past the svc 2 instruction so privileges are not elevated. void NAKED_FUNC USED syscall_internal_maybe_skip_privilege(void) { - __asm volatile ( - // Save argument registers - " push {r0-r3, lr} \n" - " bl mcu_state_is_privileged \n" - " cmp r0, #1 \n" // Were we privileged? + __asm volatile( + // Save argument registers + " push {r0-r3, lr} \n" + " bl mcu_state_is_privileged \n" + " cmp r0, #1 \n" // Were we privileged? - " pop {r0-r3, lr} \n" // Restore state + " pop {r0-r3, lr} \n" // Restore state - " it eq \n" // If we were privileged, return past the svc function - " addeq lr, #2 \n" // svc 2 is 2 bytes long + " it eq \n" // If we were privileged, return past the svc function + " addeq lr, #2 \n" // svc 2 is 2 bytes long - // Store our return address in ip, which isn't caller or callee saved - // since the linker can modify it - " mov ip, lr \n" + // Store our return address in ip, which isn't caller or callee saved + // since the linker can modify it + " mov ip, lr \n" - // Set lr to the wrapper's return address. This saves code space so the - // wrapper doesn't have to do this itself. Also we need to check this value - // here. - " pop {lr} \n" + // Set lr to the wrapper's return address. This saves code space so the + // wrapper doesn't have to do this itself. Also we need to check this value + // here. + " pop {lr} \n" - " push {ip} \n" // Save the wrapper address on the stack + " push {ip} \n" // Save the wrapper address on the stack - // The following can occur with nested syscalls, when the 2nd syscall is at - // the end of the first. Since PRIVILEGE_WAS_ELEVATED depends on the return - // address of the function being equal to syscall_internal_drop_privilege, - // changing to the wrapper prevents a false positive in the nested syscall + // The following can occur with nested syscalls, when the 2nd syscall is at + // the end of the first. Since PRIVILEGE_WAS_ELEVATED depends on the return + // address of the function being equal to syscall_internal_drop_privilege, + // changing to the wrapper prevents a false positive in the nested syscall - // if lr == syscall_internal_drop_privilege, - // lr = syscall_internal_drop_privilege_wrapper - " ldr ip, =prv_drop_privilege \n" - " cmp lr, ip \n" - " it eq \n" - " ldreq lr, =prv_drop_privilege_wrapper \n" + // if lr == syscall_internal_drop_privilege, + // lr = syscall_internal_drop_privilege_wrapper + " ldr ip, =prv_drop_privilege \n" + " cmp lr, ip \n" + " it eq \n" + " ldreq lr, =prv_drop_privilege_wrapper \n" - " pop {pc} \n" // Return to the wrapper + " pop {pc} \n" // Return to the wrapper ); } // This is more space efficient than inlining the equality // expression into every syscall since the address literal // only needs to be stored at the end of this one function -bool syscall_internal_check_return_address(void * ret_addr) { +bool syscall_internal_check_return_address(void *ret_addr) { return ret_addr == &prv_drop_privilege; } @@ -496,7 +495,7 @@ bool pbl_kernel_privilege_raise_allowed(uint32_t caller_pc) { // See WHT-114 and PBL-34044. extern const uint32_t __syscall_text_start__[]; extern const uint32_t __syscall_text_end__[]; - const uint32_t priv_code_start = (uint32_t) __syscall_text_start__; - const uint32_t priv_code_end = (uint32_t) __syscall_text_end__; + const uint32_t priv_code_start = (uint32_t)__syscall_text_start__; + const uint32_t priv_code_end = (uint32_t)__syscall_text_end__; return (caller_pc >= priv_code_start && caller_pc < priv_code_end); } diff --git a/src/fw/syscall/syscall_internal.h b/src/fw/syscall/syscall_internal.h index ef17f0cc9a..060b5280ed 100644 --- a/src/fw/syscall/syscall_internal.h +++ b/src/fw/syscall/syscall_internal.h @@ -12,37 +12,36 @@ //! Any function defined with this macro will be privileged. //! Privileges are raised upon entry to the syscall, and dropped //! once the syscall is exited (unless the caller was originally privileged). -#define DEFINE_SYSCALL(retType, funcName, ...) \ +#define DEFINE_SYSCALL(retType, funcName, ...) \ retType NAKED_FUNC SECTION(".syscall_text." #funcName) funcName(__VA_ARGS__) { \ - __asm volatile (\ - "push { lr } \n" \ - "bl syscall_internal_maybe_skip_privilege \n" \ - "svc 2 \n" \ - "b __" #funcName "\n" \ - );\ - }\ + __asm volatile( \ + "push { lr } \n" \ + "bl syscall_internal_maybe_skip_privilege \n" \ + "svc 2 \n" \ + "b __" #funcName "\n"); \ + } \ EXTERNALLY_VISIBLE retType USED __##funcName(__VA_ARGS__) //! Useful function for checking syscall privileges. -//! @return True if the most recent syscall originated from userspace, resulting in a privilege escalation. -//! It can only be called from a function created with DEFINE_SYSCALL +//! @return True if the most recent syscall originated from userspace, resulting in a privilege +//! escalation. It can only be called from a function created with DEFINE_SYSCALL #define PRIVILEGE_WAS_ELEVATED (syscall_internal_check_return_address(__builtin_return_address(0))) //! Check if ret_addr points at the drop_privilege code -bool syscall_internal_check_return_address(void * ret_addr); +bool syscall_internal_check_return_address(void *ret_addr); -//! Call this from privileged mode whenever a syscall did something wrong. This will kick out the misbehaving app. +//! Call this from privileged mode whenever a syscall did something wrong. This will kick out the +//! misbehaving app. NORETURN syscall_failed(void); //! Call this from privileged mode when entering a syscall to ensure that provided //! pointers are in the app's memory space, rather than in the kernel. If the buffer is not, //! syscall_failed is called. -void syscall_assert_userspace_buffer(const void* buf, size_t num_bytes); +void syscall_assert_userspace_buffer(const void *buf, size_t num_bytes); // Used to implement DEFINE_SYSCALL void syscall_internal_maybe_skip_privilege(void); - //! Return true when @p caller_pc is the return PC from the private //! mcu_call_unprivileged() re-entry SVC and the current task is inside //! mcu_call_unprivileged(). This is only a predicate; it does not consume or @@ -63,13 +62,12 @@ uint16_t syscall_worker_stack_free_bytes(void); // TODO: really implement privilege escalation in unit tests. See PBL-9688 #if defined(UNITTEST) -# undef DEFINE_SYSCALL -# define DEFINE_SYSCALL(retType, funcName, ...) \ - retType funcName(__VA_ARGS__) +#undef DEFINE_SYSCALL +#define DEFINE_SYSCALL(retType, funcName, ...) retType funcName(__VA_ARGS__) -# if !UNITTEST_WITH_SYSCALL_PRIVILEGES -# undef PRIVILEGE_WAS_ELEVATED -# define PRIVILEGE_WAS_ELEVATED (0) -# endif +#if !UNITTEST_WITH_SYSCALL_PRIVILEGES +#undef PRIVILEGE_WAS_ELEVATED +#define PRIVILEGE_WAS_ELEVATED (0) +#endif #endif diff --git a/src/fw/syscall/syscall_speaker.c b/src/fw/syscall/syscall_speaker.c index de91c282f0..8480624427 100644 --- a/src/fw/syscall/syscall_speaker.c +++ b/src/fw/syscall/syscall_speaker.c @@ -14,8 +14,8 @@ #define SPEAKER_MAX_STREAM_WRITE 8192 -DEFINE_SYSCALL(bool, sys_speaker_play_note_seq, const SpeakerNote *notes, - uint32_t num_notes, uint8_t priority, uint8_t volume) { +DEFINE_SYSCALL(bool, sys_speaker_play_note_seq, const SpeakerNote *notes, uint32_t num_notes, + uint8_t priority, uint8_t volume) { if (PRIVILEGE_WAS_ELEVATED) { if (num_notes > SPEAKER_MAX_NOTES) { syscall_failed(); @@ -31,13 +31,11 @@ DEFINE_SYSCALL(bool, sys_speaker_play_note_seq, const SpeakerNote *notes, PebbleTask task = pebble_task_get_current(); speaker_service_set_owner_task(task); - return speaker_service_play_note_seq(notes, num_notes, - (SpeakerPriority)priority, volume); + return speaker_service_play_note_seq(notes, num_notes, (SpeakerPriority)priority, volume); } -DEFINE_SYSCALL(bool, sys_speaker_play_tone, uint16_t freq_hz, - uint16_t duration_ms, uint8_t waveform, uint8_t velocity, - uint8_t priority, uint8_t volume) { +DEFINE_SYSCALL(bool, sys_speaker_play_tone, uint16_t freq_hz, uint16_t duration_ms, + uint8_t waveform, uint8_t velocity, uint8_t priority, uint8_t volume) { if (priority > SpeakerPriorityCritical) { priority = SpeakerPriorityApp; } @@ -57,8 +55,8 @@ DEFINE_SYSCALL(bool, sys_speaker_play_tone, uint16_t freq_hz, (SpeakerPriority)priority, volume); } -DEFINE_SYSCALL(bool, sys_speaker_play_tracks, const SpeakerTrack *tracks, - uint32_t num_tracks, uint8_t priority, uint8_t volume) { +DEFINE_SYSCALL(bool, sys_speaker_play_tracks, const SpeakerTrack *tracks, uint32_t num_tracks, + uint8_t priority, uint8_t volume) { // We need to defend against TOCTOU: speaker_service_play_tracks() re-reads // each track's num_notes and sample->num_bytes from user memory (e.g. as the // size argument to kernel_malloc/memcpy that copy the user buffers into @@ -110,12 +108,10 @@ DEFINE_SYSCALL(bool, sys_speaker_play_tracks, const SpeakerTrack *tracks, PebbleTask task = pebble_task_get_current(); speaker_service_set_owner_task(task); - return speaker_service_play_tracks(tracks_to_play, num_tracks, - (SpeakerPriority)priority, volume); + return speaker_service_play_tracks(tracks_to_play, num_tracks, (SpeakerPriority)priority, volume); } -DEFINE_SYSCALL(bool, sys_speaker_stream_open, uint8_t priority, uint8_t volume, - uint8_t format) { +DEFINE_SYSCALL(bool, sys_speaker_stream_open, uint8_t priority, uint8_t volume, uint8_t format) { if (priority > SpeakerPriorityCritical) { priority = SpeakerPriorityApp; } @@ -127,12 +123,10 @@ DEFINE_SYSCALL(bool, sys_speaker_stream_open, uint8_t priority, uint8_t volume, PebbleTask task = pebble_task_get_current(); speaker_service_set_owner_task(task); - return speaker_service_stream_open((SpeakerPriority)priority, volume, - (SpeakerPcmFormat)format); + return speaker_service_stream_open((SpeakerPriority)priority, volume, (SpeakerPcmFormat)format); } -DEFINE_SYSCALL(uint32_t, sys_speaker_stream_write, const void *data, - uint32_t num_bytes) { +DEFINE_SYSCALL(uint32_t, sys_speaker_stream_write, const void *data, uint32_t num_bytes) { if (PRIVILEGE_WAS_ELEVATED) { if (num_bytes > 8192) { syscall_failed(); diff --git a/src/fw/system/bootbits.c b/src/fw/system/bootbits.c index 6a1546bd29..f27894f986 100644 --- a/src/fw/system/bootbits.c +++ b/src/fw/system/bootbits.c @@ -45,7 +45,9 @@ void boot_bit_init(void) { // in-memory value is probably scrambled and should be reset. uint32_t crc32_computed = crc32(0, retained, NRF_RETAINED_REGISTER_CRC * 4); if (crc32_computed != retained[NRF_RETAINED_REGISTER_CRC]) { - PBL_LOG_WRN("Retained register CRC failed: expected CRC %08lx, got CRC %08lx. Clearing bootbits!", crc32_computed, retained[NRF_RETAINED_REGISTER_CRC]); + PBL_LOG_WRN( + "Retained register CRC failed: expected CRC %08lx, got CRC %08lx. Clearing bootbits!", + crc32_computed, retained[NRF_RETAINED_REGISTER_CRC]); memset(retained, 0, sizeof(retained)); } @@ -72,7 +74,7 @@ bool boot_bit_test(BootBitValue bit) { } void boot_bit_dump(void) { - PBL_LOG_DBG("0x%"PRIx32, retained_read(RTC_BKP_BOOTBIT_DR)); + PBL_LOG_DBG("0x%" PRIx32, retained_read(RTC_BKP_BOOTBIT_DR)); } uint32_t boot_bits_get(void) { @@ -81,7 +83,7 @@ uint32_t boot_bits_get(void) { void command_boot_bits_get(void) { char buffer[32]; - dbgserial_putstr_fmt(buffer, sizeof(buffer), "bootbits: 0x%"PRIu32, boot_bits_get()); + dbgserial_putstr_fmt(buffer, sizeof(buffer), "bootbits: 0x%" PRIu32, boot_bits_get()); } uint32_t boot_version_read(void) { @@ -113,16 +115,16 @@ bool boot_bit_test(BootBitValue bit) { } void boot_bit_dump(void) { - PBL_LOG_DBG("0x%"PRIx32, HAL_Get_backup(RTC_BKP_BOOTBIT_DR)); + PBL_LOG_DBG("0x%" PRIx32, HAL_Get_backup(RTC_BKP_BOOTBIT_DR)); } uint32_t boot_bits_get(void) { - return HAL_Get_backup(RTC_BKP_BOOTBIT_DR); + return HAL_Get_backup(RTC_BKP_BOOTBIT_DR); } void command_boot_bits_get(void) { char buffer[32]; - dbgserial_putstr_fmt(buffer, sizeof(buffer), "bootbits: 0x%"PRIu32, boot_bits_get()); + dbgserial_putstr_fmt(buffer, sizeof(buffer), "bootbits: 0x%" PRIu32, boot_bits_get()); } #define PB_VERSION_MAGIC 0x50425652UL @@ -149,10 +151,8 @@ uint32_t boot_version_read(void) { return 0UL; } - version = ((uint32_t)version_data.major << 24) | - ((uint32_t)version_data.minor << 16) | - ((uint32_t)version_data.patch << 8) | - (uint32_t)version_data.tweak; + version = ((uint32_t)version_data.major << 24) | ((uint32_t)version_data.minor << 16) | + ((uint32_t)version_data.patch << 8) | (uint32_t)version_data.tweak; return version; } @@ -185,7 +185,7 @@ bool boot_bit_test(BootBitValue bit) { } void boot_bit_dump(void) { - PBL_LOG_DBG("0x%"PRIx32, RTC_ReadBackupRegister(RTC_BKP_BOOTBIT_DR)); + PBL_LOG_DBG("0x%" PRIx32, RTC_ReadBackupRegister(RTC_BKP_BOOTBIT_DR)); } uint32_t boot_bits_get(void) { @@ -194,7 +194,7 @@ uint32_t boot_bits_get(void) { void command_boot_bits_get(void) { char buffer[32]; - dbgserial_putstr_fmt(buffer, sizeof(buffer), "bootbits: 0x%"PRIu32, boot_bits_get()); + dbgserial_putstr_fmt(buffer, sizeof(buffer), "bootbits: 0x%" PRIu32, boot_bits_get()); } uint32_t boot_version_read(void) { diff --git a/src/fw/system/bootbits.h b/src/fw/system/bootbits.h index f893ccaeef..d2125c64bd 100644 --- a/src/fw/system/bootbits.h +++ b/src/fw/system/bootbits.h @@ -15,7 +15,8 @@ typedef enum BootBitValue { BOOT_BIT_RECOVERY_LOAD_FAIL_STRIKE_ONE = 0x1 << 5, BOOT_BIT_RECOVERY_LOAD_FAIL_STRIKE_TWO = 0x1 << 6, BOOT_BIT_RECOVERY_START_IN_PROGRESS = 0x1 << 7, - BOOT_BIT_STANDBY_MODE_REQUESTED = 0x1 << 8, //!< Bootloader enter standby immediately after reset. + BOOT_BIT_STANDBY_MODE_REQUESTED = 0x1 + << 8, //!< Bootloader enter standby immediately after reset. BOOT_BIT_SOFTWARE_FAILURE_OCCURRED = 0x1 << 9, BOOT_BIT_NEW_SYSTEM_RESOURCES_AVAILABLE = 0x1 << 10, BOOT_BIT_RESET_LOOP_DETECT_ONE = 0x1 << 11, @@ -26,7 +27,7 @@ typedef enum BootBitValue { BOOT_BIT_STANDBY_MODE_ENTERED = 0x1 << 16, BOOT_BIT_FORCE_PRF = 0x1 << 17, BOOT_BIT_NEW_PRF_AVAILABLE = 0x1 << 18, - BOOT_BIT_SHUTDOWN_REQUESTED = 0x1 << 19, //!< Bootloader hard power-off instead of jumping to fw. + BOOT_BIT_SHUTDOWN_REQUESTED = 0x1 << 19, //!< Bootloader hard power-off instead of jumping to fw. } BootBitValue; void boot_bit_init(); diff --git a/src/fw/system/die.h b/src/fw/system/die.h index 99d5f02f0a..8ec422c67c 100644 --- a/src/fw/system/die.h +++ b/src/fw/system/die.h @@ -10,4 +10,3 @@ void prepare_for_software_failure(void); //! Does not call reboot_reason_set, only calls reboot_reason_set_restarted_safely if we were //! able shut everything down nicely before rebooting. NORETURN reset_due_to_software_failure(void); - diff --git a/src/fw/system/firmware_storage.c b/src/fw/system/firmware_storage.c index d12016a3f1..e6f12ee51a 100644 --- a/src/fw/system/firmware_storage.c +++ b/src/fw/system/firmware_storage.c @@ -10,16 +10,14 @@ #ifndef CONFIG_PBLBOOT FirmwareDescription firmware_storage_read_firmware_description(uint32_t firmware_start_address) { FirmwareDescription firmware_description; - flash_read_bytes((uint8_t*) &firmware_description, firmware_start_address, + flash_read_bytes((uint8_t *)&firmware_description, firmware_start_address, sizeof(FirmwareDescription)); - return firmware_description; } bool firmware_storage_check_valid_firmware_description( uint32_t start_address, const FirmwareDescription *firmware_description) { - if (firmware_description->description_length != sizeof(FirmwareDescription)) { // Corrupted description return false; @@ -38,15 +36,12 @@ bool firmware_storage_check_valid_firmware_description( #else FirmwareHeader firmware_storage_read_firmware_header(uint32_t address) { FirmwareHeader header; - flash_read_bytes((uint8_t*) &header, address, sizeof(FirmwareHeader)); + flash_read_bytes((uint8_t *)&header, address, sizeof(FirmwareHeader)); return header; } -bool firmware_storage_check_valid_firmware_header( - uint32_t address, const FirmwareHeader* header) { - - if (header->magic != FIRMWARE_HEADER_MAGIC || - header->header_length != sizeof(FirmwareHeader)) { +bool firmware_storage_check_valid_firmware_header(uint32_t address, const FirmwareHeader *header) { + if (header->magic != FIRMWARE_HEADER_MAGIC || header->header_length != sizeof(FirmwareHeader)) { // Corrupted header return false; } @@ -63,16 +58,14 @@ bool firmware_storage_check_valid_firmware_header( void firmware_storage_invalidate_firmware_slot(uint8_t slot) { uint32_t slot_start; - + if (slot == 0U) { slot_start = FLASH_REGION_FIRMWARE_SLOT_0_BEGIN; } else { slot_start = FLASH_REGION_FIRMWARE_SLOT_1_BEGIN; } - flash_region_erase_optimal_range(slot_start, - slot_start, - slot_start + SUBSECTOR_SIZE_BYTES, + flash_region_erase_optimal_range(slot_start, slot_start, slot_start + SUBSECTOR_SIZE_BYTES, slot_start + SUBSECTOR_SIZE_BYTES); } diff --git a/src/fw/system/firmware_storage.h b/src/fw/system/firmware_storage.h index bb8c6a402c..d25d564775 100644 --- a/src/fw/system/firmware_storage.h +++ b/src/fw/system/firmware_storage.h @@ -21,7 +21,7 @@ typedef struct PACKED FirmwareDescription { FirmwareDescription firmware_storage_read_firmware_description(uint32_t firmware_start_address); bool firmware_storage_check_valid_firmware_description( - uint32_t firmware_start_address, const FirmwareDescription* firmware_description); + uint32_t firmware_start_address, const FirmwareDescription *firmware_description); #else #define FIRMWARE_HEADER_MAGIC 0x96f3b83d @@ -36,8 +36,7 @@ typedef struct PACKED FirmwareHeader { } FirmwareHeader; FirmwareHeader firmware_storage_read_firmware_header(uint32_t address); -bool firmware_storage_check_valid_firmware_header( - uint32_t address, const FirmwareHeader* header); +bool firmware_storage_check_valid_firmware_header(uint32_t address, const FirmwareHeader *header); void firmware_storage_invalidate_firmware_slot(uint8_t slot); #endif \ No newline at end of file diff --git a/src/fw/system/hexdump.c b/src/fw/system/hexdump.c index 04f76f9332..d6168fc9ba 100644 --- a/src/fw/system/hexdump.c +++ b/src/fw/system/hexdump.c @@ -25,7 +25,7 @@ void hexdump_using_pbllog(int level, const char *src_filename, int src_line_numb pbl_log_sync(level, src_filename, src_line_number, "%s", line_buffer); } -void hexdump_log_src(const char *src_filename, int src_line_number, int level, - const uint8_t *data, size_t length, HexdumpLineCallback cb) { +void hexdump_log_src(const char *src_filename, int src_line_number, int level, const uint8_t *data, + size_t length, HexdumpLineCallback cb) { hexdump(src_filename, src_line_number, level, data, length, cb); } diff --git a/src/fw/system/hexdump.h b/src/fw/system/hexdump.h index 4117e7d4e2..49b7ecbb92 100644 --- a/src/fw/system/hexdump.h +++ b/src/fw/system/hexdump.h @@ -9,23 +9,24 @@ #include void hexdump_log(int level, const uint8_t *data, size_t length); -void hexdump_log_src(const char *src_filename, int src_line_number, int level, - const uint8_t *data, size_t length, HexdumpLineCallback cb); +void hexdump_log_src(const char *src_filename, int src_line_number, int level, const uint8_t *data, + size_t length, HexdumpLineCallback cb); void hexdump_using_serial(int level, const char *src_filename, int src_line_number, - const char *line_buffer); + const char *line_buffer); void hexdump_using_prompt(int level, const char *src_filename, int src_line_number, - const char *line_buffer); + const char *line_buffer); void hexdump_using_pbllog(int level, const char *src_filename, int src_line_number, - const char *line_buffer); + const char *line_buffer); #ifdef CONFIG_LOG -#define PBL_HEXDUMP_D_SERIAL(level, data, length) \ +#define PBL_HEXDUMP_D_SERIAL(level, data, length) \ hexdump_log_src(__FILE_NAME__, __LINE__, level, data, length, hexdump_using_serial) -#define PBL_HEXDUMP_D_PROMPT(level, data, length) \ +#define PBL_HEXDUMP_D_PROMPT(level, data, length) \ hexdump_log_src(__FILE_NAME__, __LINE__, level, data, length, hexdump_using_prompt) -#define PBL_HEXDUMP_D(domain, level, data, length) \ - if (domain) hexdump_log_src(__FILE_NAME__, __LINE__, level, data, length, hexdump_using_pbllog) +#define PBL_HEXDUMP_D(domain, level, data, length) \ + if (domain) \ + hexdump_log_src(__FILE_NAME__, __LINE__, level, data, length, hexdump_using_pbllog) #define PBL_HEXDUMP(level, data, length) \ hexdump_log_src(__FILE_NAME__, __LINE__, level, data, length, hexdump_using_pbllog); #else diff --git a/src/fw/system/passert.c b/src/fw/system/passert.c index b2d0749be5..979f4e05cf 100644 --- a/src/fw/system/passert.c +++ b/src/fw/system/passert.c @@ -17,8 +17,8 @@ #define CORE_NUMBER 0 -static NORETURN handle_passert_failed_vargs(const char* filename, int line_number, - uintptr_t lr, const char* expr, const char* fmt, va_list fmt_args) { +static NORETURN handle_passert_failed_vargs(const char *filename, int line_number, uintptr_t lr, + const char *expr, const char *fmt, va_list fmt_args) { char buffer[160]; pbl_log_sync(LOG_LEVEL_ALWAYS, filename, line_number, "*** ASSERTION FAILED: %s", expr); @@ -31,8 +31,8 @@ static NORETURN handle_passert_failed_vargs(const char* filename, int line_numbe trigger_fault(RebootReasonCode_Assert, lr); } -static NORETURN handle_passert_failed(const char* filename, int line_number, - uintptr_t lr, const char *expr, const char* fmt, ...) { +static NORETURN handle_passert_failed(const char *filename, int line_number, uintptr_t lr, + const char *expr, const char *fmt, ...) { va_list fmt_args; va_start(fmt_args, fmt); @@ -41,18 +41,18 @@ static NORETURN handle_passert_failed(const char* filename, int line_number, va_end(fmt_args); } -NORETURN passert_failed(const char* filename, int line_number, const char* message, ...) { +NORETURN passert_failed(const char *filename, int line_number, const char *message, ...) { va_list fmt_args; va_start(fmt_args, message); - handle_passert_failed_vargs(filename, line_number, - (uintptr_t)__builtin_return_address(0), "ASSERT", message, fmt_args); + handle_passert_failed_vargs(filename, line_number, (uintptr_t)__builtin_return_address(0), + "ASSERT", message, fmt_args); va_end(fmt_args); } NORETURN passert_failed_hashed(uint32_t packed_loghash, ...) { - uintptr_t saved_lr = (uintptr_t) __builtin_return_address(0); + uintptr_t saved_lr = (uintptr_t)__builtin_return_address(0); PBL_LOG_ALWAYS("ASSERTION at LR 0x%x", saved_lr); va_list fmt_args; @@ -66,7 +66,7 @@ NORETURN passert_failed_hashed(uint32_t packed_loghash, ...) { } NORETURN passert_failed_hashed_with_lr(uint32_t lr, uint32_t packed_loghash, ...) { - PBL_LOG_ALWAYS("ASSERTION at LR 0x%"PRIx32, lr); + PBL_LOG_ALWAYS("ASSERTION at LR 0x%" PRIx32, lr); va_list fmt_args; va_start(fmt_args, packed_loghash); @@ -79,7 +79,7 @@ NORETURN passert_failed_hashed_with_lr(uint32_t lr, uint32_t packed_loghash, ... } NORETURN passert_failed_hashed_no_message_with_lr(uint32_t lr) { - PBL_LOG_ALWAYS("ASSERTION at LR 0x%"PRIx32, lr); + PBL_LOG_ALWAYS("ASSERTION at LR 0x%" PRIx32, lr); trigger_fault(RebootReasonCode_Assert, lr); } @@ -88,49 +88,50 @@ NORETURN passert_failed_hashed_no_message(void) { passert_failed_hashed_no_message_with_lr((uint32_t)__builtin_return_address(0)); } -NORETURN passert_failed_no_message_with_lr(const char* filename, int line_number, uint32_t lr) { +NORETURN passert_failed_no_message_with_lr(const char *filename, int line_number, uint32_t lr) { handle_passert_failed(filename, line_number, lr, "ASSERTN", NULL); } -NORETURN passert_failed_no_message(const char* filename, int line_number) { - handle_passert_failed(filename, line_number, - (uintptr_t)__builtin_return_address(0), "ASSERTN", NULL); +NORETURN passert_failed_no_message(const char *filename, int line_number) { + handle_passert_failed(filename, line_number, (uintptr_t)__builtin_return_address(0), "ASSERTN", + NULL); } NORETURN wtf(void) { - uintptr_t saved_lr = (uintptr_t) __builtin_return_address(0); + uintptr_t saved_lr = (uintptr_t)__builtin_return_address(0); PBL_LOG_ALWAYS("*** WTF %p", (void *)saved_lr); trigger_fault(RebootReasonCode_Assert, saved_lr); } void passert_check_task(PebbleTask expected_task) { - uintptr_t saved_lr = (uintptr_t) __builtin_return_address(0); + uintptr_t saved_lr = (uintptr_t)__builtin_return_address(0); if (pebble_task_get_current() != expected_task) { - PBL_LOG_ALWAYS("LR: %p. Incorrect task! Expected <%s> got <%s>", - (void*) saved_lr, pebble_task_get_name(expected_task), - pebble_task_get_name(pebble_task_get_current())); + PBL_LOG_ALWAYS("LR: %p. Incorrect task! Expected <%s> got <%s>", (void *)saved_lr, + pebble_task_get_name(expected_task), + pebble_task_get_name(pebble_task_get_current())); trigger_fault(RebootReasonCode_Assert, saved_lr); } } void passert_check_not_task(PebbleTask unexpected_task) { - uintptr_t saved_lr = (uintptr_t) __builtin_return_address(0); + uintptr_t saved_lr = (uintptr_t)__builtin_return_address(0); if (pebble_task_get_current() == unexpected_task) { - PBL_LOG_ALWAYS("LR: %p. Incorrect task! Can't be <%s>", - (void*) saved_lr, pebble_task_get_name(unexpected_task)); + PBL_LOG_ALWAYS("LR: %p. Incorrect task! Can't be <%s>", (void *)saved_lr, + pebble_task_get_name(unexpected_task)); trigger_fault(RebootReasonCode_Assert, saved_lr); } } //! Assert function called by the STM peripheral library's //! 'assert_param' method. See stm32f2xx_conf.h for more information. -void assert_failed(uint8_t* file, uint32_t line) { +void assert_failed(uint8_t *file, uint32_t line) { register uintptr_t lr __asm("lr"); uintptr_t saved_lr = lr; - handle_passert_failed((const char*) file, line, saved_lr, "STM32", "STM32 peripheral library tripped an assert"); + handle_passert_failed((const char *)file, line, saved_lr, "STM32", + "STM32 peripheral library tripped an assert"); } extern void command_dump_malloc_kernel(void); diff --git a/src/fw/system/passert.h b/src/fw/system/passert.h index 236f0f34ed..4d365a5004 100644 --- a/src/fw/system/passert.h +++ b/src/fw/system/passert.h @@ -8,71 +8,68 @@ #include #include - #ifdef CONFIG_LOG_HASHED - #include +#include NORETURN passert_failed_hashed(uint32_t packed_loghash, ...); -NORETURN passert_failed_hashed_with_lr(uint32_t lr, - uint32_t packed_loghash, ...); +NORETURN passert_failed_hashed_with_lr(uint32_t lr, uint32_t packed_loghash, ...); NORETURN passert_failed_hashed_no_message(void); NORETURN passert_failed_hashed_no_message_with_lr(uint32_t lr); - #define PBL_ASSERT(expr, msg, ...) \ - do { \ - if (UNLIKELY(!(expr))) { \ - NEW_LOG_HASH(passert_failed_hashed, LOG_LEVEL_ALWAYS, LOG_COLOR_RED, \ - "*** ASSERTION FAILED: " msg, \ - ## __VA_ARGS__); \ - } \ - } while (0) - - #define PBL_ASSERTN(expr) \ - do { \ - if (UNLIKELY(!(expr))) { \ - passert_failed_hashed_no_message(); \ - } \ - } while (0) - -#define PBL_ASSERTN_LR(expr, lr) \ - do { \ - if (UNLIKELY(!(expr))) { \ - passert_failed_hashed_no_message_with_lr(lr); \ - } \ - } while (0) +#define PBL_ASSERT(expr, msg, ...) \ + do { \ + if (UNLIKELY(!(expr))) { \ + NEW_LOG_HASH(passert_failed_hashed, LOG_LEVEL_ALWAYS, LOG_COLOR_RED, \ + "*** ASSERTION FAILED: " msg, ##__VA_ARGS__); \ + } \ + } while (0) + +#define PBL_ASSERTN(expr) \ + do { \ + if (UNLIKELY(!(expr))) { \ + passert_failed_hashed_no_message(); \ + } \ + } while (0) + +#define PBL_ASSERTN_LR(expr, lr) \ + do { \ + if (UNLIKELY(!(expr))) { \ + passert_failed_hashed_no_message_with_lr(lr); \ + } \ + } while (0) #else - NORETURN passert_failed(const char* filename, int line_number, const char* message, ...); - - #define PBL_ASSERT(expr, ...) \ - do { \ - if (UNLIKELY(!(expr))) { \ - passert_failed(__FILE_NAME__, __LINE__, __VA_ARGS__); \ - } \ - } while (0) - - #define PBL_ASSERTN(expr) \ - do { \ - if (UNLIKELY(!(expr))) { \ - passert_failed_no_message(__FILE_NAME__, __LINE__); \ - } \ - } while (0) - - #define PBL_ASSERTN_LR(expr, lr) \ - do { \ - if (UNLIKELY(!(expr))) { \ - passert_failed_no_message_with_lr(__FILE_NAME__, __LINE__, lr); \ - } \ - } while (0) +NORETURN passert_failed(const char *filename, int line_number, const char *message, ...); + +#define PBL_ASSERT(expr, ...) \ + do { \ + if (UNLIKELY(!(expr))) { \ + passert_failed(__FILE_NAME__, __LINE__, __VA_ARGS__); \ + } \ + } while (0) + +#define PBL_ASSERTN(expr) \ + do { \ + if (UNLIKELY(!(expr))) { \ + passert_failed_no_message(__FILE_NAME__, __LINE__); \ + } \ + } while (0) + +#define PBL_ASSERTN_LR(expr, lr) \ + do { \ + if (UNLIKELY(!(expr))) { \ + passert_failed_no_message_with_lr(__FILE_NAME__, __LINE__, lr); \ + } \ + } while (0) #endif -NORETURN passert_failed_no_message(const char* filename, int line_number); +NORETURN passert_failed_no_message(const char *filename, int line_number); -NORETURN passert_failed_no_message_with_lr(const char* filename, int line_number, uint32_t lr); +NORETURN passert_failed_no_message_with_lr(const char *filename, int line_number, uint32_t lr); NORETURN wtf(void); @@ -112,22 +109,20 @@ void passert_check_not_task(enum PebbleTask unexpected_task); #ifdef CONFIG_LOG_HASHED - #define PBL_CROAK(msg, ...) \ - do { \ - NEW_LOG_HASH(passert_failed_hashed, LOG_LEVEL_ALWAYS, LOG_COLOR_RED, "*** CROAK: " msg, \ - ## __VA_ARGS__); \ - } while (0) +#define PBL_CROAK(msg, ...) \ + do { \ + NEW_LOG_HASH(passert_failed_hashed, LOG_LEVEL_ALWAYS, LOG_COLOR_RED, "*** CROAK: " msg, \ + ##__VA_ARGS__); \ + } while (0) -#else // CONFIG_LOG_HASHED +#else // CONFIG_LOG_HASHED - #define PBL_CROAK(fmt, args...) \ - passert_failed(__FILE_NAME__, __LINE__, "*** CROAK: " fmt, ## args) +#define PBL_CROAK(fmt, args...) passert_failed(__FILE_NAME__, __LINE__, "*** CROAK: " fmt, ##args) -#endif // CONFIG_LOG_HASHED +#endif // CONFIG_LOG_HASHED typedef struct Heap Heap; NORETURN croak_oom(size_t bytes, int saved_lr, Heap *heap_ptr); -#define PBL_CROAK_OOM(bytes, saved_lr, heap_ptr) \ - croak_oom(bytes, saved_lr, heap_ptr) +#define PBL_CROAK_OOM(bytes, saved_lr, heap_ptr) croak_oom(bytes, saved_lr, heap_ptr) diff --git a/src/fw/system/profiler.c b/src/fw/system/profiler.c index d109eec2a6..017d37d883 100644 --- a/src/fw/system/profiler.c +++ b/src/fw/system/profiler.c @@ -21,13 +21,13 @@ #endif #ifdef CONFIG_PULSE_EVERYWHERE -#define PROF_LOG(buf, sz, fmt, ...) \ - do { \ - snprintf(buf, sz, fmt, ## __VA_ARGS__); \ - PBL_LOG_DBG("%s", buf); \ +#define PROF_LOG(buf, sz, fmt, ...) \ + do { \ + snprintf(buf, sz, fmt, ##__VA_ARGS__); \ + PBL_LOG_DBG("%s", buf); \ } while (0) #else -#define PROF_LOG(buf, sz, fmt, ...) dbgserial_putstr_fmt(buf, sz, fmt, ## __VA_ARGS__) +#define PROF_LOG(buf, sz, fmt, ...) dbgserial_putstr_fmt(buf, sz, fmt, ##__VA_ARGS__) #endif Profiler g_profiler; @@ -37,7 +37,7 @@ Profiler g_profiler; #include "profiler_list.h" #undef PROFILER_NODE #ifdef CONFIG_PROFILE_INTERRUPTS -#define IRQ_DEF(idx, irq) ProfilerNode g_profiler_node_##irq##_IRQ = {.module_name = #irq"_IRQ"}; +#define IRQ_DEF(idx, irq) ProfilerNode g_profiler_node_##irq##_IRQ = {.module_name = #irq "_IRQ"}; #if defined(CONFIG_QEMU) #include "irq_qemu.def" #elif defined(CONFIG_SOC_NRF52) @@ -70,11 +70,11 @@ static ProfilerNode *s_profiler_nodes[] = { }; static void prv_profiler_node_add(ProfilerNode *node) { - g_profiler.nodes = list_append(g_profiler.nodes, (ListNode *) node); + g_profiler.nodes = list_append(g_profiler.nodes, (ListNode *)node); } static int prv_node_compare(void *a, void *b) { - return ((ProfilerNode *) b)->total - ((ProfilerNode *) a)->total; + return ((ProfilerNode *)b)->total - ((ProfilerNode *)a)->total; } void prv_node_reset(ProfilerNode *node) { @@ -173,53 +173,53 @@ uint32_t profiler_get_total_duration(bool in_us) { } void profiler_print_stats(void) { - PROFILER_STOP; // Make sure the profiler has been stopped. + PROFILER_STOP; // Make sure the profiler has been stopped. uint32_t total = profiler_get_total_duration(false); #if defined(CONFIG_SOC_NRF52) uint32_t mhz = NRFX_DELAY_CPU_FREQ_MHZ; char buf[80]; - PROF_LOG(buf, sizeof(buf), "CPU Frequency: %"PRIu32"MHz", mhz); + PROF_LOG(buf, sizeof(buf), "CPU Frequency: %" PRIu32 "MHz", mhz); #elif defined(CONFIG_SOC_SF32LB52) uint32_t mhz = HAL_RCC_GetHCLKFreq(CORE_ID_HCPU); char buf[80]; - PROF_LOG(buf, sizeof(buf), "CPU Frequency: %"PRIu32"MHz", mhz); + PROF_LOG(buf, sizeof(buf), "CPU Frequency: %" PRIu32 "MHz", mhz); #elif defined(CONFIG_QEMU) uint32_t mhz = SystemCoreClock / 1000000; char buf[80]; - PROF_LOG(buf, sizeof(buf), "CPU Frequency: %"PRIu32"MHz", mhz); + PROF_LOG(buf, sizeof(buf), "CPU Frequency: %" PRIu32 "MHz", mhz); #else RCC_ClocksTypeDef clocks; RCC_GetClocksFreq(&clocks); uint32_t mhz = clocks.HCLK_Frequency / 1000000; char buf[80]; - PROF_LOG(buf, sizeof(buf), "CPU Frequency: %"PRIu32"Hz", clocks.HCLK_Frequency); + PROF_LOG(buf, sizeof(buf), "CPU Frequency: %" PRIu32 "Hz", clocks.HCLK_Frequency); #endif PROF_LOG(buf, sizeof(buf), - "Profiler ran for %"PRIu32" ticks (%"PRIu32" us) (start: %"PRIu32"; stop:%"PRIu32")", - total, total / mhz, g_profiler.start, g_profiler.end); + "Profiler ran for %" PRIu32 " ticks (%" PRIu32 " us) (start: %" PRIu32 "; stop:%" PRIu32 + ")", + total, total / mhz, g_profiler.start, g_profiler.end); ListNode *sorted = NULL; ListNode *tail = list_get_tail(g_profiler.nodes); while (tail != NULL) { - ListNode * new_tail = list_pop_tail(tail); + ListNode *new_tail = list_pop_tail(tail); sorted = list_sorted_add(sorted, tail, &prv_node_compare, false); tail = new_tail; } if (sorted != NULL) { - PROF_LOG(buf, sizeof(buf), - "%-24s %-8s %-11s %-15s %-8s %-7s", - "Name", "Count", "Cycles", "Time (us)", "Avg (us)", "% CPU"); + PROF_LOG(buf, sizeof(buf), "%-24s %-8s %-11s %-15s %-8s %-7s", "Name", "Count", "Cycles", + "Time (us)", "Avg (us)", "% CPU"); while (sorted != NULL) { ProfilerNode *node = (ProfilerNode *)sorted; uint32_t percent = (((int64_t)node->total) * 100) / total; PROF_LOG(buf, sizeof(buf), - "%-24s %-8"PRIu32" %-11"PRIu32" %-15"PRIu32" %-8"PRIu32 " %-7"PRIu32, - node->module_name, node->count, node->total, node->total / mhz, - (node->total/node->count)/mhz, percent); + "%-24s %-8" PRIu32 " %-11" PRIu32 " %-15" PRIu32 " %-8" PRIu32 " %-7" PRIu32, + node->module_name, node->count, node->total, node->total / mhz, + (node->total / node->count) / mhz, percent); sorted = sorted->next; } diff --git a/src/fw/system/profiler.h b/src/fw/system/profiler.h index b85fc32ed1..b2036d6e8a 100644 --- a/src/fw/system/profiler.h +++ b/src/fw/system/profiler.h @@ -70,34 +70,25 @@ extern Profiler g_profiler; #define PROFILER_STOP profiler_stop() -#define PROFILER_NODE_START(node) \ - g_profiler_node_##node.start = DWT->CYCCNT +#define PROFILER_NODE_START(node) g_profiler_node_##node.start = DWT->CYCCNT -#define PROFILER_NODE_STOP(node) \ - profiler_node_stop(&g_profiler_node_##node, DWT->CYCCNT) +#define PROFILER_NODE_STOP(node) profiler_node_stop(&g_profiler_node_##node, DWT->CYCCNT) -#define SYS_PROFILER_NODE_START(node) \ - sys_profiler_node_start(&g_profiler_node_##node) +#define SYS_PROFILER_NODE_START(node) sys_profiler_node_start(&g_profiler_node_##node) -#define SYS_PROFILER_NODE_STOP(node) \ - sys_profiler_node_stop(&g_profiler_node_##node) +#define SYS_PROFILER_NODE_STOP(node) sys_profiler_node_stop(&g_profiler_node_##node) -#define PROFILER_PRINT_STATS \ - profiler_print_stats() +#define PROFILER_PRINT_STATS profiler_print_stats() -#define PROFILER_NODE_GET_TOTAL_US(node) \ - profiler_node_get_total_us(&g_profiler_node_##node) +#define PROFILER_NODE_GET_TOTAL_US(node) profiler_node_get_total_us(&g_profiler_node_##node) -#define PROFILER_NODE_GET_LAST_CYCLES(node) \ - profiler_node_get_last_cycles(&g_profiler_node_##node) +#define PROFILER_NODE_GET_LAST_CYCLES(node) profiler_node_get_last_cycles(&g_profiler_node_##node) -#define PROFILER_NODE_GET_TOTAL_CYCLES(node) \ - g_profiler_node_##node.total +#define PROFILER_NODE_GET_TOTAL_CYCLES(node) g_profiler_node_##node.total -#define PROFILER_NODE_GET_COUNT(node) \ - profiler_node_get_count(&g_profiler_node_##node) +#define PROFILER_NODE_GET_COUNT(node) profiler_node_get_count(&g_profiler_node_##node) -#endif // CONFIG_PROFILER +#endif // CONFIG_PROFILER void profiler_init(void); void profiler_print_stats(void); diff --git a/src/fw/system/reboot_reason.c b/src/fw/system/reboot_reason.c index 28b876d393..a21825420f 100644 --- a/src/fw/system/reboot_reason.c +++ b/src/fw/system/reboot_reason.c @@ -21,12 +21,12 @@ _Static_assert(sizeof(RebootReason) == sizeof(uint32_t[4]), "RebootReason is a f void reboot_reason_set(RebootReason *reason) { #ifdef CONFIG_SOC_NRF52 - uint32_t *raw = (uint32_t*)reason; + uint32_t *raw = (uint32_t *)reason; if (retained_read(REBOOT_REASON_REGISTER_1)) { - // It's not safe to log if we're called from an ISR or from a FreeRTOS critical section (basepri != 0) - if (!mcu_state_is_isr() && __get_BASEPRI() == 0 - && pbl_kernel_is_running()) { + // It's not safe to log if we're called from an ISR or from a FreeRTOS critical section (basepri + // != 0) + if (!mcu_state_is_isr() && __get_BASEPRI() == 0 && pbl_kernel_is_running()) { PBL_LOG_WRN("Reboot reason is already set"); } return; @@ -37,12 +37,12 @@ void reboot_reason_set(RebootReason *reason) { retained_write(REBOOT_REASON_STUCK_TASK_LR, raw[2]); retained_write(REBOOT_REASON_STUCK_TASK_CALLBACK, raw[3]); #elif defined(CONFIG_SOC_SF32LB52) - uint32_t *raw = (uint32_t*)reason; + uint32_t *raw = (uint32_t *)reason; if (HAL_Get_backup(REBOOT_REASON_REGISTER_1)) { - // It's not safe to log if we're called from an ISR or from a FreeRTOS critical section (basepri != 0) - if (!mcu_state_is_isr() && __get_BASEPRI() == 0 - && pbl_kernel_is_running()) { + // It's not safe to log if we're called from an ISR or from a FreeRTOS critical section (basepri + // != 0) + if (!mcu_state_is_isr() && __get_BASEPRI() == 0 && pbl_kernel_is_running()) { PBL_LOG_WRN("Reboot reason is already set"); } return; @@ -53,12 +53,12 @@ void reboot_reason_set(RebootReason *reason) { HAL_Set_backup(REBOOT_REASON_STUCK_TASK_LR, raw[2]); HAL_Set_backup(REBOOT_REASON_STUCK_TASK_CALLBACK, raw[3]); #elif defined(CONFIG_QEMU) - uint32_t *raw = (uint32_t*)reason; + uint32_t *raw = (uint32_t *)reason; if (RTC_ReadBackupRegister(REBOOT_REASON_REGISTER_1)) { - // It's not safe to log if we're called from an ISR or from a FreeRTOS critical section (basepri != 0) - if (!mcu_state_is_isr() && __get_BASEPRI() == 0 - && pbl_kernel_is_running()) { + // It's not safe to log if we're called from an ISR or from a FreeRTOS critical section (basepri + // != 0) + if (!mcu_state_is_isr() && __get_BASEPRI() == 0 && pbl_kernel_is_running()) { PBL_LOG_WRN("Reboot reason is already set"); } return; @@ -77,13 +77,13 @@ void reboot_reason_set_restarted_safely(void) { reason.restarted_safely = true; #ifdef CONFIG_SOC_NRF52 - uint32_t* raw = (uint32_t *)&reason; + uint32_t *raw = (uint32_t *)&reason; retained_write(REBOOT_REASON_REGISTER_1, *raw); #elif defined(CONFIG_SOC_SF32LB52) - uint32_t* raw = (uint32_t *)&reason; + uint32_t *raw = (uint32_t *)&reason; HAL_Set_backup(REBOOT_REASON_REGISTER_1, *raw); #elif defined(CONFIG_QEMU) - uint32_t* raw = (uint32_t *)&reason; + uint32_t *raw = (uint32_t *)&reason; RTC_WriteBackupRegister(REBOOT_REASON_REGISTER_1, *raw); #endif } @@ -148,4 +148,3 @@ void reboot_set_slot_of_last_launched_app(uint32_t app_slot) { RTC_WriteBackupRegister(SLOT_OF_LAST_LAUNCHED_APP, app_slot); #endif } - diff --git a/src/fw/system/reboot_reason.h b/src/fw/system/reboot_reason.h index d2fad97ba7..e27dae3840 100644 --- a/src/fw/system/reboot_reason.h +++ b/src/fw/system/reboot_reason.h @@ -35,10 +35,10 @@ typedef enum { RebootReasonCode_StackOverflow, RebootReasonCode_HardFault, RebootReasonCode_LauncherPanic, - RebootReasonCode_ClockFailure, // Not used on 3.x - RebootReasonCode_AppHardFault, // Not used on 3.x + RebootReasonCode_ClockFailure, // Not used on 3.x + RebootReasonCode_AppHardFault, // Not used on 3.x RebootReasonCode_EventQueueFull, - RebootReasonCode_WorkerHardFault, // Off by default, compile in with WORKER_CRASH_CAUSES_RESET + RebootReasonCode_WorkerHardFault, // Off by default, compile in with WORKER_CRASH_CAUSES_RESET RebootReasonCode_OutOfMemory, RebootReasonCode_BtCoredump, RebootReasonCode_CoreDump, // Core dump initiated without a more specific reason set @@ -46,9 +46,9 @@ typedef enum { } RebootReasonCode; typedef struct PACKED { - RebootReasonCode code:8; - bool restarted_safely:1; - uint8_t padding:7; + RebootReasonCode code : 8; + bool restarted_safely : 1; + uint8_t padding : 7; union { uint16_t data16; uint8_t data8[2]; @@ -61,16 +61,16 @@ typedef struct PACKED { uint32_t stuck_task_pc; uint32_t stuck_task_lr; uint32_t stuck_task_callback; - } watchdog; //!< Valid if code == RebootReasonCode_Watchdog + } watchdog; //!< Valid if code == RebootReasonCode_Watchdog struct { uint32_t push_lr; uint32_t current_event; uint32_t dropped_event; - } event_queue; //!< Valid if code == RebootReasonCode_EventQueueFull + } event_queue; //!< Valid if code == RebootReasonCode_EventQueueFull struct { uint32_t heap_alloc_lr; uint32_t heap_ptr; - } heap_data; //!< Valid if code == RebootReasonCode_OutOfMemory + } heap_data; //!< Valid if code == RebootReasonCode_OutOfMemory }; } RebootReason; diff --git a/src/fw/system/rtc_registers.h b/src/fw/system/rtc_registers.h index d6f836dce1..4071af67be 100644 --- a/src/fw/system/rtc_registers.h +++ b/src/fw/system/rtc_registers.h @@ -4,75 +4,75 @@ #pragma once #ifdef CONFIG_SOC_NRF52 -#define RTC_BKP_BOOTBIT_DR 0 -#define STUCK_BUTTON_REGISTER 1 -#define BOOTLOADER_VERSION_REGISTER 2 -#define CURRENT_TIME_REGISTER 3 -#define CURRENT_INTERVAL_TICKS_REGISTER 4 -#define REBOOT_REASON_REGISTER_1 5 -#define REBOOT_REASON_STUCK_TASK_PC 6 -#define REBOOT_REASON_STUCK_TASK_LR 7 -#define REBOOT_REASON_STUCK_TASK_CALLBACK 8 +#define RTC_BKP_BOOTBIT_DR 0 +#define STUCK_BUTTON_REGISTER 1 +#define BOOTLOADER_VERSION_REGISTER 2 +#define CURRENT_TIME_REGISTER 3 +#define CURRENT_INTERVAL_TICKS_REGISTER 4 +#define REBOOT_REASON_REGISTER_1 5 +#define REBOOT_REASON_STUCK_TASK_PC 6 +#define REBOOT_REASON_STUCK_TASK_LR 7 +#define REBOOT_REASON_STUCK_TASK_CALLBACK 8 // formerly REBOOT_REASON_MUTEX_PC -#define RTC_BKP_FLASH_ERASE_PROGRESS 11 -#define RTC_TIMEZONE_ABBR_START 12 -#define RTC_TIMEZONE_ABBR_END_TZID_DSTID 13 -#define RTC_TIMEZONE_GMTOFFSET 14 -#define RTC_TIMEZONE_DST_START 15 -#define RTC_TIMEZONE_DST_END 16 -#define MAG_XY_CORRECTION_VALS 17 -#define MAG_Z_CORRECTION_VAL 18 -#define SLOT_OF_LAST_LAUNCHED_APP 19 +#define RTC_BKP_FLASH_ERASE_PROGRESS 11 +#define RTC_TIMEZONE_ABBR_START 12 +#define RTC_TIMEZONE_ABBR_END_TZID_DSTID 13 +#define RTC_TIMEZONE_GMTOFFSET 14 +#define RTC_TIMEZONE_DST_START 15 +#define RTC_TIMEZONE_DST_END 16 +#define MAG_XY_CORRECTION_VALS 17 +#define MAG_Z_CORRECTION_VAL 18 +#define SLOT_OF_LAST_LAUNCHED_APP 19 // We want a checksum stored in the retained registers, to prove that they // are not *totally* full of noise from system-on reset -- otherwise, we // zero them out and give up. -#define NRF_RETAINED_REGISTER_CRC 31 +#define NRF_RETAINED_REGISTER_CRC 31 extern void retained_write(uint8_t id, uint32_t value); extern uint32_t retained_read(uint8_t id); #elif defined(CONFIG_SOC_SF32LB52) /* sf32lb52 rtc backup register 2/5/6/7/8/9 is freely usable */ -#define RTC_BKP_BOOTBIT_DR 2 -#define REBOOT_REASON_REGISTER_1 5 -#define REBOOT_REASON_STUCK_TASK_PC 6 -#define REBOOT_REASON_STUCK_TASK_LR 7 -#define REBOOT_REASON_STUCK_TASK_CALLBACK 8 -#define SLOT_OF_LAST_LAUNCHED_APP 9 +#define RTC_BKP_BOOTBIT_DR 2 +#define REBOOT_REASON_REGISTER_1 5 +#define REBOOT_REASON_STUCK_TASK_PC 6 +#define REBOOT_REASON_STUCK_TASK_LR 7 +#define REBOOT_REASON_STUCK_TASK_CALLBACK 8 +#define SLOT_OF_LAST_LAUNCHED_APP 9 #elif defined(CONFIG_QEMU) /* QEMU backup registers mapped to MMIO backup region (indices 0..15) */ -#define RTC_BKP_BOOTBIT_DR 0 -#define STUCK_BUTTON_REGISTER 1 -#define BOOTLOADER_VERSION_REGISTER 2 -#define CURRENT_TIME_REGISTER 3 -#define CURRENT_INTERVAL_TICKS_REGISTER 4 -#define REBOOT_REASON_REGISTER_1 5 -#define REBOOT_REASON_STUCK_TASK_PC 6 -#define REBOOT_REASON_STUCK_TASK_LR 7 -#define REBOOT_REASON_STUCK_TASK_CALLBACK 8 -#define RTC_BKP_FLASH_ERASE_PROGRESS 9 -#define SLOT_OF_LAST_LAUNCHED_APP 10 +#define RTC_BKP_BOOTBIT_DR 0 +#define STUCK_BUTTON_REGISTER 1 +#define BOOTLOADER_VERSION_REGISTER 2 +#define CURRENT_TIME_REGISTER 3 +#define CURRENT_INTERVAL_TICKS_REGISTER 4 +#define REBOOT_REASON_REGISTER_1 5 +#define REBOOT_REASON_STUCK_TASK_PC 6 +#define REBOOT_REASON_STUCK_TASK_LR 7 +#define REBOOT_REASON_STUCK_TASK_CALLBACK 8 +#define RTC_BKP_FLASH_ERASE_PROGRESS 9 +#define SLOT_OF_LAST_LAUNCHED_APP 10 #else -#define RTC_BKP_BOOTBIT_DR RTC_BKP_DR0 -#define STUCK_BUTTON_REGISTER RTC_BKP_DR1 -#define BOOTLOADER_VERSION_REGISTER RTC_BKP_DR2 -#define CURRENT_TIME_REGISTER RTC_BKP_DR3 -#define CURRENT_INTERVAL_TICKS_REGISTER RTC_BKP_DR4 -#define REBOOT_REASON_REGISTER_1 RTC_BKP_DR5 -#define REBOOT_REASON_STUCK_TASK_PC RTC_BKP_DR6 -#define REBOOT_REASON_STUCK_TASK_LR RTC_BKP_DR7 -#define REBOOT_REASON_STUCK_TASK_CALLBACK RTC_BKP_DR8 +#define RTC_BKP_BOOTBIT_DR RTC_BKP_DR0 +#define STUCK_BUTTON_REGISTER RTC_BKP_DR1 +#define BOOTLOADER_VERSION_REGISTER RTC_BKP_DR2 +#define CURRENT_TIME_REGISTER RTC_BKP_DR3 +#define CURRENT_INTERVAL_TICKS_REGISTER RTC_BKP_DR4 +#define REBOOT_REASON_REGISTER_1 RTC_BKP_DR5 +#define REBOOT_REASON_STUCK_TASK_PC RTC_BKP_DR6 +#define REBOOT_REASON_STUCK_TASK_LR RTC_BKP_DR7 +#define REBOOT_REASON_STUCK_TASK_CALLBACK RTC_BKP_DR8 // formerly REBOOT_REASON_MUTEX_PC -#define RTC_BKP_FLASH_ERASE_PROGRESS RTC_BKP_DR11 -#define RTC_TIMEZONE_ABBR_START RTC_BKP_DR12 -#define RTC_TIMEZONE_ABBR_END_TZID_DSTID RTC_BKP_DR13 -#define RTC_TIMEZONE_GMTOFFSET RTC_BKP_DR14 -#define RTC_TIMEZONE_DST_START RTC_BKP_DR15 -#define RTC_TIMEZONE_DST_END RTC_BKP_DR16 -#define MAG_XY_CORRECTION_VALS RTC_BKP_DR17 -#define MAG_Z_CORRECTION_VAL RTC_BKP_DR18 -#define SLOT_OF_LAST_LAUNCHED_APP RTC_BKP_DR19 +#define RTC_BKP_FLASH_ERASE_PROGRESS RTC_BKP_DR11 +#define RTC_TIMEZONE_ABBR_START RTC_BKP_DR12 +#define RTC_TIMEZONE_ABBR_END_TZID_DSTID RTC_BKP_DR13 +#define RTC_TIMEZONE_GMTOFFSET RTC_BKP_DR14 +#define RTC_TIMEZONE_DST_START RTC_BKP_DR15 +#define RTC_TIMEZONE_DST_END RTC_BKP_DR16 +#define MAG_XY_CORRECTION_VALS RTC_BKP_DR17 +#define MAG_Z_CORRECTION_VAL RTC_BKP_DR18 +#define SLOT_OF_LAST_LAUNCHED_APP RTC_BKP_DR19 #endif diff --git a/src/fw/system/status_codes.h b/src/fw/system/status_codes.h index 4516067b27..faf7b78150 100644 --- a/src/fw/system/status_codes.h +++ b/src/fw/system/status_codes.h @@ -69,10 +69,7 @@ typedef enum StatusCode { //! Return value for system operations. See \ref StatusCode for possible values. typedef int32_t status_t; - #define DECLARE_DOMAIN_STATUS(e) ((status_t)(e & (1 << 30))) - #define PASSED(s) ((status_t)(s) >= 0) #define FAILED(s) ((status_t)(s) < 0) - diff --git a/src/fw/system/version.c b/src/fw/system/version.c index 2b5ee7f48c..85bff04839 100644 --- a/src/fw/system/version.c +++ b/src/fw/system/version.c @@ -23,27 +23,27 @@ extern const ElfExternalNote TINTIN_BUILD_ID; const FirmwareMetadata TINTIN_METADATA SECTION(".pbl_fw_version") = { - .version_timestamp = GIT_TIMESTAMP, - .version_tag = GIT_TAG, - .version_short = GIT_REVISION, + .version_timestamp = GIT_TIMESTAMP, + .version_tag = GIT_TAG, + .version_short = GIT_REVISION, - .is_recovery_firmware = FIRMWARE_METADATA_IS_RECOVERY_FIRMWARE, - .is_ble_firmware = false, + .is_recovery_firmware = FIRMWARE_METADATA_IS_RECOVERY_FIRMWARE, + .is_ble_firmware = false, #ifdef CONFIG_PBLBOOT - .is_dual_slot = true, + .is_dual_slot = true, #else - .is_dual_slot = false, + .is_dual_slot = false, #endif #if defined(CONFIG_PBLBOOT) && CONFIG_FIRMWARE_SLOT == 0 && !defined(CONFIG_RECOVERY_FW) - .is_slot_0 = true, + .is_slot_0 = true, #else - .is_slot_0 = false, + .is_slot_0 = false, #endif - .reserved = 0, + .reserved = 0, - .hw_platform = FIRMWARE_METADATA_HW_PLATFORM, + .hw_platform = FIRMWARE_METADATA_HW_PLATFORM, - .metadata_version = FW_METADATA_CURRENT_STRUCT_VERSION, + .metadata_version = FW_METADATA_CURRENT_STRUCT_VERSION, }; bool version_copy_running_fw_metadata(FirmwareMetadata *out_metadata) { @@ -61,27 +61,24 @@ static bool prv_version_copy_flash_fw_metadata(FirmwareMetadata *out_metadata, firmware_storage_read_firmware_description(flash_address); if (check_crc && - !firmware_storage_check_valid_firmware_description(flash_address, - &firmware_description)) { + !firmware_storage_check_valid_firmware_description(flash_address, &firmware_description)) { *out_metadata = (FirmwareMetadata){}; return false; } uint32_t fw_len = firmware_description.description_length + firmware_description.firmware_length; #else - FirmwareHeader header = - firmware_storage_read_firmware_header(flash_address); - if (check_crc && - !firmware_storage_check_valid_firmware_header(flash_address, - &header)) { + FirmwareHeader header = firmware_storage_read_firmware_header(flash_address); + if (check_crc && !firmware_storage_check_valid_firmware_header(flash_address, &header)) { *out_metadata = (FirmwareMetadata){}; return false; } uint32_t fw_len = header.fw_length; #endif // The FirmwareMetadata is stored at the end of the binary - const uint32_t metadata_offset = flash_address + FIRMWARE_OFFSET + fw_len - sizeof(FirmwareMetadata); + const uint32_t metadata_offset = + flash_address + FIRMWARE_OFFSET + fw_len - sizeof(FirmwareMetadata); - flash_read_bytes((uint8_t*)out_metadata, metadata_offset, sizeof(FirmwareMetadata)); + flash_read_bytes((uint8_t *)out_metadata, metadata_offset, sizeof(FirmwareMetadata)); return true; } @@ -99,11 +96,10 @@ bool version_copy_update_fw_metadata(FirmwareMetadata *out_metadata) { return prv_version_copy_flash_fw_metadata(out_metadata, addr, check_crc); } -bool version_copy_recovery_fw_version(char* dest, const int dest_len_bytes) { +bool version_copy_recovery_fw_version(char *dest, const int dest_len_bytes) { FirmwareMetadata out_metadata; const bool check_crc = true; - bool success = prv_version_copy_flash_fw_metadata(&out_metadata, - FLASH_REGION_SAFE_FIRMWARE_BEGIN, + bool success = prv_version_copy_flash_fw_metadata(&out_metadata, FLASH_REGION_SAFE_FIRMWARE_BEGIN, check_crc); if (success) { strncpy(dest, out_metadata.version_tag, dest_len_bytes); @@ -119,14 +115,12 @@ bool version_is_prf_installed(void) { return firmware_storage_check_valid_firmware_description(FLASH_REGION_SAFE_FIRMWARE_BEGIN, &firmware_description); #else - FirmwareHeader header = - firmware_storage_read_firmware_header(FLASH_REGION_SAFE_FIRMWARE_BEGIN); - return firmware_storage_check_valid_firmware_header(FLASH_REGION_SAFE_FIRMWARE_BEGIN, - &header); + FirmwareHeader header = firmware_storage_read_firmware_header(FLASH_REGION_SAFE_FIRMWARE_BEGIN); + return firmware_storage_check_valid_firmware_header(FLASH_REGION_SAFE_FIRMWARE_BEGIN, &header); #endif } -const uint8_t * version_get_build_id(size_t *out_len) { +const uint8_t *version_get_build_id(size_t *out_len) { if (out_len) { *out_len = TINTIN_BUILD_ID.data_length; } @@ -139,8 +133,7 @@ void version_copy_build_id_hex_string(char *buffer, size_t buffer_bytes_left, const ElfExternalNote *elf_build_id) { size_t build_id_bytes_left = elf_build_id->data_length; const uint8_t *build_id = &elf_build_id->data[elf_build_id->name_length]; - byte_stream_to_hex_string(buffer, buffer_bytes_left, build_id, - build_id_bytes_left, false); + byte_stream_to_hex_string(buffer, buffer_bytes_left, build_id, build_id_bytes_left, false); } void version_copy_current_build_id_hex_string(char *buffer, size_t buffer_bytes_left) { diff --git a/src/fw/system/version.h b/src/fw/system/version.h index 41932a824f..2b802352f3 100644 --- a/src/fw/system/version.h +++ b/src/fw/system/version.h @@ -36,7 +36,7 @@ bool version_copy_update_fw_metadata(FirmwareMetadata *out_metadata); //! @param dest: char[dest_len_bytes] //! @param dest_len_bytes size of dest in bytes //! @returns true on success, false if the recovery image fails CRC validation -bool version_copy_recovery_fw_version(char* dest, const int dest_len_bytes); +bool version_copy_recovery_fw_version(char *dest, const int dest_len_bytes); //! Checks to see if a valid PRF is installed with a correct checksum. //! @return true if a PRF is installed, false otherwise. @@ -45,7 +45,7 @@ bool version_is_prf_installed(void); //! @return Pointer to the GNU build id data. This is a hash of the firmware //! that is generated by the linker and uniquely identifies the binary. //! @param[out] out_len The length of the build id in bytes. -const uint8_t * version_get_build_id(size_t *out_len); +const uint8_t *version_get_build_id(size_t *out_len); //! Copies a hex C-string of the build id into the supplied buffer. //! Get the build id from an elf, using `arm-none-eabi-readelf -n pebbleos.elf` diff --git a/src/fw/util/array.c b/src/fw/util/array.c index 34dfb79eef..3a6b6afe24 100644 --- a/src/fw/util/array.c +++ b/src/fw/util/array.c @@ -11,7 +11,7 @@ void array_remove_nulls(void **array, size_t *num) { while (i < *num) { if (array[i] == NULL) { for (size_t j = i + 1; j < *num; j++) { - array[j-1] = array[j]; + array[j - 1] = array[j]; } (*num)--; } else { diff --git a/src/fw/util/base64.c b/src/fw/util/base64.c index 77a459342e..dfbab4562e 100644 --- a/src/fw/util/base64.c +++ b/src/fw/util/base64.c @@ -7,35 +7,44 @@ #include static int8_t decode_char(uint8_t c) { - if (isupper(c)) return c - 'A'; - if (islower(c)) return c - 'a' + 26; - if (isdigit(c)) return c - '0' + 52; - if (c == '+') return 62; - if (c == '/') return 63; - if (c == '=') return 127; + if (isupper(c)) + return c - 'A'; + if (islower(c)) + return c - 'a' + 26; + if (isdigit(c)) + return c - '0' + 52; + if (c == '+') + return 62; + if (c == '/') + return 63; + if (c == '=') + return 127; return -1; } -unsigned int base64_decode_inplace(char* buffer, unsigned int length) { +unsigned int base64_decode_inplace(char *buffer, unsigned int length) { unsigned int read_index = 0; unsigned int write_index = 0; while (read_index < length) { - int quad_index = 0; unsigned int v = 0; for (; quad_index < 4; ++quad_index) { int8_t c = decode_char(buffer[read_index + quad_index]); - if (c == -1) return 0; // Error, invalid character - if (c == 127) break; // Padding found + if (c == -1) + return 0; // Error, invalid character + if (c == 127) + break; // Padding found v = (v * 64) + c; } // Handle the padding if we broke out the loop early (0-2 '=' characters). const unsigned int padding_amount = 4 - quad_index; - if (padding_amount > 2) return 0; // Mades no sense to pad an entire triplet. - if (memcmp(buffer + read_index + quad_index, "==", padding_amount) != 0) return 0; // There are characters after our padding? + if (padding_amount > 2) + return 0; // Mades no sense to pad an entire triplet. + if (memcmp(buffer + read_index + quad_index, "==", padding_amount) != 0) + return 0; // There are characters after our padding? // Chop off extra unused low bits if we're padded. // If there's only 2 6-bit characters (+ 2 '='s for padding), this results in 12-bits of data. @@ -44,7 +53,7 @@ unsigned int base64_decode_inplace(char* buffer, unsigned int length) { // We only want the first 16-bits, so shift out 2. v = v >> (padding_amount * 2); - const char* v_as_bytes = ((const char*) &v); + const char *v_as_bytes = ((const char *)&v); for (unsigned int i = 0; i < (3 - padding_amount); ++i) { buffer[write_index + i] = v_as_bytes[(2 - padding_amount) - i]; } @@ -60,7 +69,6 @@ unsigned int base64_decode_inplace(char* buffer, unsigned int length) { return write_index; } - static char prv_encode_char(uint8_t binary) { if (binary < 26) { return binary + 'A'; @@ -77,7 +85,6 @@ static char prv_encode_char(uint8_t binary) { } } - int32_t base64_encode(char *out, int out_len, const uint8_t *data, int32_t data_len) { int result = (data_len + 2) / 3 * 4; if (result > out_len) { diff --git a/src/fw/util/base64.h b/src/fw/util/base64.h index 2753020b45..111b1c5a8f 100644 --- a/src/fw/util/base64.h +++ b/src/fw/util/base64.h @@ -4,7 +4,7 @@ #pragma once #include -unsigned int base64_decode_inplace(char* buffer, unsigned int length); +unsigned int base64_decode_inplace(char *buffer, unsigned int length); // Encode a buffer as base 64 // @param out the encoded base64 string is written here diff --git a/src/fw/util/bitset.h b/src/fw/util/bitset.h index a34f1d787c..3208f4f8d8 100644 --- a/src/fw/util/bitset.h +++ b/src/fw/util/bitset.h @@ -12,15 +12,15 @@ #include "system/passert.h" -static inline void bitset8_set(uint8_t* bitset, unsigned int index) { +static inline void bitset8_set(uint8_t *bitset, unsigned int index) { bitset[index / 8] |= (1 << (index % 8)); } -static inline void bitset8_clear(uint8_t* bitset, unsigned int index) { +static inline void bitset8_clear(uint8_t *bitset, unsigned int index) { bitset[index / 8] &= ~(1 << (index % 8)); } -static inline void bitset8_update(uint8_t* bitset, unsigned int index, bool value) { +static inline void bitset8_update(uint8_t *bitset, unsigned int index, bool value) { if (value) { bitset8_set(bitset, index); } else { @@ -28,19 +28,19 @@ static inline void bitset8_update(uint8_t* bitset, unsigned int index, bool valu } } -static inline bool bitset8_get(const uint8_t* bitset, unsigned int index) { +static inline bool bitset8_get(const uint8_t *bitset, unsigned int index) { return bitset[index / 8] & (1 << (index % 8)); } -static inline void bitset16_set(uint16_t* bitset, unsigned int index) { +static inline void bitset16_set(uint16_t *bitset, unsigned int index) { bitset[index / 16] |= (1 << (index % 16)); } -static inline void bitset16_clear(uint16_t* bitset, unsigned int index) { +static inline void bitset16_clear(uint16_t *bitset, unsigned int index) { bitset[index / 16] &= ~(1 << (index % 16)); } -static inline void bitset16_update(uint16_t* bitset, unsigned int index, bool value) { +static inline void bitset16_update(uint16_t *bitset, unsigned int index, bool value) { if (value) { bitset16_set(bitset, index); } else { @@ -48,19 +48,19 @@ static inline void bitset16_update(uint16_t* bitset, unsigned int index, bool va } } -static inline bool bitset16_get(const uint16_t* bitset, unsigned int index) { +static inline bool bitset16_get(const uint16_t *bitset, unsigned int index) { return bitset[index / 16] & (1 << (index % 16)); } -static inline void bitset32_set(uint32_t* bitset, unsigned int index) { +static inline void bitset32_set(uint32_t *bitset, unsigned int index) { bitset[index / 32] |= (1 << (index % 32)); } -static inline void bitset32_clear(uint32_t* bitset, unsigned int index) { +static inline void bitset32_clear(uint32_t *bitset, unsigned int index) { bitset[index / 32] &= ~(1 << (index % 32)); } -static inline void bitset32_clear_all(uint32_t* bitset, unsigned int width) { +static inline void bitset32_clear_all(uint32_t *bitset, unsigned int width) { if (width > 32) { // TODO: revisit WTF; @@ -68,7 +68,7 @@ static inline void bitset32_clear_all(uint32_t* bitset, unsigned int width) { *bitset &= ~((1 << (width + 1)) - 1); } -static inline void bitset32_update(uint32_t* bitset, unsigned int index, bool value) { +static inline void bitset32_update(uint32_t *bitset, unsigned int index, bool value) { if (value) { bitset32_set(bitset, index); } else { @@ -76,17 +76,18 @@ static inline void bitset32_update(uint32_t* bitset, unsigned int index, bool va } } -static inline bool bitset32_get(const uint32_t* bitset, unsigned int index) { +static inline bool bitset32_get(const uint32_t *bitset, unsigned int index) { return bitset[index / 32] & (1 << (index % 32)); } #ifdef __arm__ -#define rotl32(x, shift) \ -__asm__ volatile ("ror %0,%0,%1" : "+r" (src) : "r" (32 - (shift)) :); +#define rotl32(x, shift) __asm__ volatile("ror %0,%0,%1" : "+r"(src) : "r"(32 - (shift)) :); #else -#define rotl32(x, shift) \ -uint32_t s = shift % 32; \ -{x = ((x << (s)) | x >> (32 - (s)));} +#define rotl32(x, shift) \ + uint32_t s = shift % 32; \ + { \ + x = ((x << (s)) | x >> (32 - (s))); \ + } #endif //! Count the number of bits that are set to 1 in a multi-byte bitset. diff --git a/src/fw/util/buffer.c b/src/fw/util/buffer.c index 6da35ce7e9..d51b649665 100644 --- a/src/fw/util/buffer.c +++ b/src/fw/util/buffer.c @@ -9,12 +9,11 @@ #include - size_t buffer_get_bytes_remaining(Buffer *b) { return (b->length - b->bytes_written); } -size_t buffer_add(Buffer* const b, const uint8_t* const data, const size_t length) { +size_t buffer_add(Buffer *const b, const uint8_t *const data, const size_t length) { PBL_ASSERTN(b); PBL_ASSERTN(data); PBL_ASSERTN(length); @@ -23,14 +22,14 @@ size_t buffer_add(Buffer* const b, const uint8_t* const data, const size_t lengt return 0; } - uint8_t* cursor = b->data + b->bytes_written; + uint8_t *cursor = b->data + b->bytes_written; memcpy(cursor, data, length); b->bytes_written += length; return length; } -size_t buffer_remove(Buffer* const b, const size_t offset, const size_t length) { +size_t buffer_remove(Buffer *const b, const size_t offset, const size_t length) { PBL_ASSERTN(offset + length <= b->bytes_written); memmove(&b->data[offset], &b->data[offset + length], b->bytes_written - length - offset); @@ -38,25 +37,25 @@ size_t buffer_remove(Buffer* const b, const size_t offset, const size_t length) return length; } -Buffer* buffer_create(const size_t size_bytes) { +Buffer *buffer_create(const size_t size_bytes) { PBL_ASSERTN(size_bytes); - Buffer* b = kernel_malloc_check(sizeof(Buffer) + size_bytes); - *b = (Buffer) { - .length = size_bytes, - .bytes_written = 0, + Buffer *b = kernel_malloc_check(sizeof(Buffer) + size_bytes); + *b = (Buffer){ + .length = size_bytes, + .bytes_written = 0, }; return b; } -void buffer_init(Buffer * const buffer, const size_t length) { +void buffer_init(Buffer *const buffer, const size_t length) { buffer->bytes_written = 0; buffer->length = length; } -void buffer_clear(Buffer * const buffer) { +void buffer_clear(Buffer *const buffer) { buffer->bytes_written = 0; } -bool buffer_is_empty(Buffer * const buffer) { +bool buffer_is_empty(Buffer *const buffer) { return buffer->bytes_written == 0; } diff --git a/src/fw/util/buffer.h b/src/fw/util/buffer.h index b9a4ef8d1b..771cf5ce64 100644 --- a/src/fw/util/buffer.h +++ b/src/fw/util/buffer.h @@ -14,24 +14,24 @@ typedef struct { } Buffer; //! Atomically add and return `length` bytes or add none and return 0 -size_t buffer_add(Buffer* const buffer, const uint8_t* const data, const size_t length); +size_t buffer_add(Buffer *const buffer, const uint8_t *const data, const size_t length); //! Remove `length` starting at `offset`. //! The combination of length and offset must not exceed the written bytes. -size_t buffer_remove(Buffer* const b, const size_t offset, const size_t length); +size_t buffer_remove(Buffer *const b, const size_t offset, const size_t length); //! Create buffer with a data region of size_bytes -Buffer* buffer_create(const size_t size_bytes); +Buffer *buffer_create(const size_t size_bytes); //! Initializes Buffer with a given `length`. //! Make sure that `buffer`'s data is can store `length` bytes. -void buffer_init(Buffer * const buffer, const size_t length); +void buffer_init(Buffer *const buffer, const size_t length); //! Returns the number of remaining bytes that can be filled with `buffer_add` size_t buffer_get_bytes_remaining(Buffer *b); //! Empty buffer -void buffer_clear(Buffer * const buffer); +void buffer_clear(Buffer *const buffer); //! Return true if buffer is empty -bool buffer_is_empty(Buffer * const buffer); +bool buffer_is_empty(Buffer *const buffer); diff --git a/src/fw/util/crc8.c b/src/fw/util/crc8.c index 434b27980c..8761cc2767 100644 --- a/src/fw/util/crc8.c +++ b/src/fw/util/crc8.c @@ -17,9 +17,8 @@ void crc8_calculate_bytes_streaming(const uint8_t *data, uint32_t data_len, uint // standard CRC-8 polynomial is not particularly good. // nibble lookup table for (x^8 + x^5 + x^3 + x^2 + x + 1) - static const uint8_t lookup_table[] = - { 0, 47, 94, 113, 188, 147, 226, 205, 87, 120, 9, 38, 235, 196, - 181, 154 }; + static const uint8_t lookup_table[] = {0, 47, 94, 113, 188, 147, 226, 205, + 87, 120, 9, 38, 235, 196, 181, 154}; for (uint32_t i = 0; i < data_len * 2; i++) { uint8_t nibble; diff --git a/src/fw/util/date.c b/src/fw/util/date.c index 9cd56994e0..3afaa6f04e 100644 --- a/src/fw/util/date.c +++ b/src/fw/util/date.c @@ -11,21 +11,20 @@ int date_util_get_max_days_in_month(int month, bool is_leap_year) { int days; switch (month) { - case 4: //April - case 6: //June - case 9: //September - case 11: //November + case 4: // April + case 6: // June + case 9: // September + case 11: // November { days = 30; break; } - case 2: // February + case 2: // February { days = is_leap_year ? 29 : 28; break; } - default: - { + default: { // Jan, March, May, July, August, October, December days = 31; break; diff --git a/src/fw/util/dict.c b/src/fw/util/dict.c index 756d65d9fc..06524abeb4 100644 --- a/src/fw/util/dict.c +++ b/src/fw/util/dict.c @@ -8,25 +8,26 @@ #include "system/passert.h" #include "kernel/pbl_malloc.h" -static DictionaryResult dict_init(DictionaryIterator *iter, const uint8_t * const buffer, const uint16_t length) { - if (iter == NULL || - buffer == NULL) { +static DictionaryResult dict_init(DictionaryIterator *iter, const uint8_t *const buffer, + const uint16_t length) { + if (iter == NULL || buffer == NULL) { return DICT_INVALID_ARGS; } if (length < sizeof(Dictionary)) { return DICT_NOT_ENOUGH_STORAGE; } - iter->dictionary = (Dictionary *) buffer; + iter->dictionary = (Dictionary *)buffer; iter->cursor = iter->dictionary->head; iter->end = buffer + length; return DICT_OK; } -uint32_t dict_size(DictionaryIterator* iter) { - return (uint8_t*)iter->end - (uint8_t*)iter->dictionary; +uint32_t dict_size(DictionaryIterator *iter) { + return (uint8_t *)iter->end - (uint8_t *)iter->dictionary; } -DictionaryResult dict_write_begin(DictionaryIterator *iter, uint8_t * const buffer, const uint16_t length) { +DictionaryResult dict_write_begin(DictionaryIterator *iter, uint8_t *const buffer, + const uint16_t length) { const DictionaryResult result = dict_init(iter, buffer, length); if (result == DICT_OK) { iter->dictionary->count = 0; @@ -34,14 +35,15 @@ DictionaryResult dict_write_begin(DictionaryIterator *iter, uint8_t * const buff return result; } -static Tuple * cursor_after_tuple_with_data_length(const DictionaryIterator *iter, const uint16_t length) { - return (Tuple *) (((uint8_t *)iter->cursor) + sizeof(Tuple) + length); +static Tuple *cursor_after_tuple_with_data_length(const DictionaryIterator *iter, + const uint16_t length) { + return (Tuple *)(((uint8_t *)iter->cursor) + sizeof(Tuple) + length); } -static DictionaryResult dict_write_data_internal(DictionaryIterator *iter, const uint32_t key, const uint8_t * const data, const uint16_t data_length, const TupleType type) { - if (iter == NULL || - iter->dictionary == NULL || - iter->cursor == NULL) { +static DictionaryResult dict_write_data_internal(DictionaryIterator *iter, const uint32_t key, + const uint8_t *const data, + const uint16_t data_length, const TupleType type) { + if (iter == NULL || iter->dictionary == NULL || iter->cursor == NULL) { return DICT_INVALID_ARGS; } if (iter->cursor == iter->dictionary->head) { @@ -49,7 +51,7 @@ static DictionaryResult dict_write_data_internal(DictionaryIterator *iter, const // calling dict_write_end() won't screw up the count and will just work: iter->dictionary->count = 0; } - Tuple * const next_cursor = cursor_after_tuple_with_data_length(iter, data_length); + Tuple *const next_cursor = cursor_after_tuple_with_data_length(iter, data_length); if (iter->end < (void *)next_cursor) { return DICT_NOT_ENOUGH_STORAGE; } @@ -67,68 +69,84 @@ static DictionaryResult dict_write_data_internal(DictionaryIterator *iter, const return DICT_OK; } -DictionaryResult dict_write_data(DictionaryIterator *iter, const uint32_t key, const uint8_t * const data, const uint16_t length) { +DictionaryResult dict_write_data(DictionaryIterator *iter, const uint32_t key, + const uint8_t *const data, const uint16_t length) { return dict_write_data_internal(iter, key, data, length, TUPLE_BYTE_ARRAY); } -DictionaryResult dict_write_cstring(DictionaryIterator *iter, const uint32_t key, const char * const cstring) { - return dict_write_data_internal(iter, key, (const uint8_t * const) cstring, cstring ? strlen(cstring) + 1 : 0, TUPLE_CSTRING); +DictionaryResult dict_write_cstring(DictionaryIterator *iter, const uint32_t key, + const char *const cstring) { + return dict_write_data_internal(iter, key, (const uint8_t *const)cstring, + cstring ? strlen(cstring) + 1 : 0, TUPLE_CSTRING); } -DictionaryResult dict_write_uint8(DictionaryIterator *iter, const uint32_t key, const uint8_t value) { - return dict_write_data_internal(iter, key, (const uint8_t * const) &value, sizeof(value), TUPLE_UINT); +DictionaryResult dict_write_uint8(DictionaryIterator *iter, const uint32_t key, + const uint8_t value) { + return dict_write_data_internal(iter, key, (const uint8_t *const)&value, sizeof(value), + TUPLE_UINT); } -DictionaryResult dict_write_uint16(DictionaryIterator *iter, const uint32_t key, const uint16_t value) { - return dict_write_data_internal(iter, key, (const uint8_t * const) &value, sizeof(value), TUPLE_UINT); +DictionaryResult dict_write_uint16(DictionaryIterator *iter, const uint32_t key, + const uint16_t value) { + return dict_write_data_internal(iter, key, (const uint8_t *const)&value, sizeof(value), + TUPLE_UINT); } -DictionaryResult dict_write_uint32(DictionaryIterator *iter, const uint32_t key, const uint32_t value) { - return dict_write_data_internal(iter, key, (const uint8_t * const) &value, sizeof(value), TUPLE_UINT); +DictionaryResult dict_write_uint32(DictionaryIterator *iter, const uint32_t key, + const uint32_t value) { + return dict_write_data_internal(iter, key, (const uint8_t *const)&value, sizeof(value), + TUPLE_UINT); } DictionaryResult dict_write_int8(DictionaryIterator *iter, const uint32_t key, const int8_t value) { - return dict_write_data_internal(iter, key, (const uint8_t * const) &value, sizeof(value), TUPLE_INT); + return dict_write_data_internal(iter, key, (const uint8_t *const)&value, sizeof(value), + TUPLE_INT); } -DictionaryResult dict_write_int16(DictionaryIterator *iter, const uint32_t key, const int16_t value) { - return dict_write_data_internal(iter, key, (const uint8_t * const) &value, sizeof(value), TUPLE_INT); +DictionaryResult dict_write_int16(DictionaryIterator *iter, const uint32_t key, + const int16_t value) { + return dict_write_data_internal(iter, key, (const uint8_t *const)&value, sizeof(value), + TUPLE_INT); } -DictionaryResult dict_write_int32(DictionaryIterator *iter, const uint32_t key, const int32_t value) { - return dict_write_data_internal(iter, key, (const uint8_t * const) &value, sizeof(value), TUPLE_INT); +DictionaryResult dict_write_int32(DictionaryIterator *iter, const uint32_t key, + const int32_t value) { + return dict_write_data_internal(iter, key, (const uint8_t *const)&value, sizeof(value), + TUPLE_INT); } -DictionaryResult dict_write_int(DictionaryIterator *iter, const uint32_t key, const void *integer, const uint8_t width_bytes, const bool is_signed) { - return dict_write_data_internal(iter, key, integer, width_bytes, is_signed ? TUPLE_INT : TUPLE_UINT); +DictionaryResult dict_write_int(DictionaryIterator *iter, const uint32_t key, const void *integer, + const uint8_t width_bytes, const bool is_signed) { + return dict_write_data_internal(iter, key, integer, width_bytes, + is_signed ? TUPLE_INT : TUPLE_UINT); } uint32_t dict_write_end(DictionaryIterator *iter) { - if (iter == NULL || - iter->dictionary == NULL || - iter->cursor == NULL) { + if (iter == NULL || iter->dictionary == NULL || iter->cursor == NULL) { return 0; } iter->end = iter->cursor; return dict_size(iter); } -//! Returns the cursor, or NULL if the tuple at cursor extends beyond the bounds of the backing storage -static Tuple * get_safe_cursor(DictionaryIterator *iter) { +//! Returns the cursor, or NULL if the tuple at cursor extends beyond the bounds of the backing +//! storage +static Tuple *get_safe_cursor(DictionaryIterator *iter) { // If iter->cursor is already at the end, return now so we don't try and read past the end of // the malloc'ed block (when fetching iter->cursor->length) and possibly cause a memory read - // exception. - if ((void*)iter->cursor >= iter->end) { + // exception. + if ((void *)iter->cursor >= iter->end) { return NULL; } - Tuple * const next_cursor = cursor_after_tuple_with_data_length(iter, iter->cursor->length); + Tuple *const next_cursor = cursor_after_tuple_with_data_length(iter, iter->cursor->length); if ((void *)next_cursor > iter->end) { return NULL; } return iter->cursor; } -Tuple * dict_read_begin_from_buffer(DictionaryIterator *iter, const uint8_t * const buffer, const uint16_t length) { +Tuple *dict_read_begin_from_buffer(DictionaryIterator *iter, const uint8_t *const buffer, + const uint16_t length) { const DictionaryResult result = dict_init(iter, buffer, length); if (result != DICT_OK) { return NULL; @@ -136,20 +154,16 @@ Tuple * dict_read_begin_from_buffer(DictionaryIterator *iter, const uint8_t * co return get_safe_cursor(iter); } -Tuple * dict_read_next(DictionaryIterator *iter) { - if (iter == NULL || - iter->dictionary == NULL || - iter->cursor == NULL) { +Tuple *dict_read_next(DictionaryIterator *iter) { + if (iter == NULL || iter->dictionary == NULL || iter->cursor == NULL) { return NULL; } iter->cursor = cursor_after_tuple_with_data_length(iter, iter->cursor->length); return get_safe_cursor(iter); } -Tuple * dict_read_first(DictionaryIterator *iter) { - if (iter == NULL || - iter->dictionary == NULL || - iter->cursor == NULL) { +Tuple *dict_read_first(DictionaryIterator *iter) { + if (iter == NULL || iter->dictionary == NULL || iter->cursor == NULL) { return NULL; } iter->cursor = iter->dictionary->head; @@ -170,13 +184,14 @@ uint32_t dict_calc_buffer_size(const uint8_t count, ...) { return total_size; } -uint32_t dict_calc_buffer_size_from_tuplets(const Tuplet * const tuplets, const uint8_t tuplets_count) { +uint32_t dict_calc_buffer_size_from_tuplets(const Tuplet *const tuplets, + const uint8_t tuplets_count) { uint32_t total_size = sizeof(Dictionary); if (tuplets_count == 0) { return total_size; } for (unsigned int i = 0; i < tuplets_count; ++i) { - const Tuplet * const tuplet = &tuplets[i]; + const Tuplet *const tuplet = &tuplets[i]; switch (tuplet->type) { case TUPLE_BYTE_ARRAY: total_size += tuplet->bytes.length; @@ -195,41 +210,41 @@ uint32_t dict_calc_buffer_size_from_tuplets(const Tuplet * const tuplets, const } // Legacy version to prevent previous app breakage, __deprecated preserves order -uint32_t dict_calc_buffer_size_from_tuplets__deprecated(const uint8_t tuplets_count, const Tuplet * const tuplets) { +uint32_t dict_calc_buffer_size_from_tuplets__deprecated(const uint8_t tuplets_count, + const Tuplet *const tuplets) { return dict_calc_buffer_size_from_tuplets(tuplets, tuplets_count); } - -static DictionaryResult dict_write_tuple(DictionaryIterator* iter, Tuple* tuple) { - return dict_write_data_internal(iter, tuple->key, (uint8_t*)tuple->value, - tuple->length, tuple->type); +static DictionaryResult dict_write_tuple(DictionaryIterator *iter, Tuple *tuple) { + return dict_write_data_internal(iter, tuple->key, (uint8_t *)tuple->value, tuple->length, + tuple->type); } -DictionaryResult dict_write_tuplet(DictionaryIterator *iter, const Tuplet * const tuplet) { - if (iter == NULL || - iter->dictionary == NULL || - iter->cursor == NULL) { +DictionaryResult dict_write_tuplet(DictionaryIterator *iter, const Tuplet *const tuplet) { + if (iter == NULL || iter->dictionary == NULL || iter->cursor == NULL) { return DICT_INVALID_ARGS; } switch (tuplet->type) { case TUPLE_BYTE_ARRAY: - return dict_write_data_internal(iter, tuplet->key, tuplet->bytes.data, tuplet->bytes.length, tuplet->type); + return dict_write_data_internal(iter, tuplet->key, tuplet->bytes.data, tuplet->bytes.length, + tuplet->type); case TUPLE_CSTRING: - return dict_write_data_internal(iter, tuplet->key, (uint8_t *)tuplet->cstring.data, tuplet->cstring.length, tuplet->type); + return dict_write_data_internal(iter, tuplet->key, (uint8_t *)tuplet->cstring.data, + tuplet->cstring.length, tuplet->type); case TUPLE_UINT: case TUPLE_INT: - return dict_write_data_internal(iter, tuplet->key, (uint8_t *)&tuplet->integer.storage, tuplet->integer.width, tuplet->type); + return dict_write_data_internal(iter, tuplet->key, (uint8_t *)&tuplet->integer.storage, + tuplet->integer.width, tuplet->type); } return DICT_INVALID_ARGS; } -DictionaryResult dict_serialize_tuplets_to_buffer_with_iter( - DictionaryIterator *iter, - const Tuplet * const tuplets, const uint8_t tuplets_count, - uint8_t *buffer, uint32_t *size_in_out) { - if (size_in_out == NULL || - buffer == NULL || - tuplets == NULL) { +DictionaryResult dict_serialize_tuplets_to_buffer_with_iter(DictionaryIterator *iter, + const Tuplet *const tuplets, + const uint8_t tuplets_count, + uint8_t *buffer, + uint32_t *size_in_out) { + if (size_in_out == NULL || buffer == NULL || tuplets == NULL) { return DICT_INVALID_ARGS; } DictionaryResult result; @@ -247,32 +262,36 @@ DictionaryResult dict_serialize_tuplets_to_buffer_with_iter( // Legacy version to prevent previous app breakage, __deprecated preserves order DictionaryResult dict_serialize_tuplets_to_buffer_with_iter__deprecated(const uint8_t tuplets_count, - const Tuplet * const tuplets, DictionaryIterator *iter, uint8_t *buffer, uint32_t *size_in_out) { - - return dict_serialize_tuplets_to_buffer_with_iter(iter, - tuplets, tuplets_count, buffer, size_in_out); + const Tuplet *const tuplets, + DictionaryIterator *iter, + uint8_t *buffer, + uint32_t *size_in_out) { + return dict_serialize_tuplets_to_buffer_with_iter(iter, tuplets, tuplets_count, buffer, + size_in_out); } - -DictionaryResult dict_serialize_tuplets_to_buffer(const Tuplet * const tuplets, const uint8_t tuplets_count, uint8_t *buffer, uint32_t *size_in_out) { +DictionaryResult dict_serialize_tuplets_to_buffer(const Tuplet *const tuplets, + const uint8_t tuplets_count, uint8_t *buffer, + uint32_t *size_in_out) { DictionaryIterator iter; - return dict_serialize_tuplets_to_buffer_with_iter(&iter, tuplets, tuplets_count, buffer, size_in_out); + return dict_serialize_tuplets_to_buffer_with_iter(&iter, tuplets, tuplets_count, buffer, + size_in_out); } - // Legacy version to prevent previous app breakage, __deprecated preserves order -DictionaryResult dict_serialize_tuplets_to_buffer__deprecated( - const uint8_t tuplets_count, const Tuplet * const tuplets, - uint8_t *buffer, uint32_t *size_in_out) { +DictionaryResult dict_serialize_tuplets_to_buffer__deprecated(const uint8_t tuplets_count, + const Tuplet *const tuplets, + uint8_t *buffer, + uint32_t *size_in_out) { DictionaryIterator iter; - return dict_serialize_tuplets_to_buffer_with_iter(&iter, - tuplets, tuplets_count, buffer, size_in_out); + return dict_serialize_tuplets_to_buffer_with_iter(&iter, tuplets, tuplets_count, buffer, + size_in_out); } - -DictionaryResult dict_serialize_tuplets(DictionarySerializeCallback callback, void *context, const Tuplet * const tuplets, const uint8_t tuplets_count) { +DictionaryResult dict_serialize_tuplets(DictionarySerializeCallback callback, void *context, + const Tuplet *const tuplets, const uint8_t tuplets_count) { if (tuplets_count == 0) { - const Dictionary dict = { .count = 0 }; + const Dictionary dict = {.count = 0}; callback((const uint8_t *)&dict, sizeof(Dictionary), context); return DICT_OK; } @@ -286,46 +305,48 @@ DictionaryResult dict_serialize_tuplets(DictionarySerializeCallback callback, vo return DICT_OK; } - // Legacy version to prevent previous app breakage, __deprecated preserves order -DictionaryResult dict_serialize_tuplets__deprecated(DictionarySerializeCallback callback, void *context, const uint8_t tuplets_count, const Tuplet * const tuplets) { +DictionaryResult dict_serialize_tuplets__deprecated(DictionarySerializeCallback callback, + void *context, const uint8_t tuplets_count, + const Tuplet *const tuplets) { return dict_serialize_tuplets(callback, context, tuplets, tuplets_count); } -static const uint8_t NULL_TUPLE_BUFFER[sizeof(Tuple) + sizeof(uint32_t)] = { 0 }; -const Tuple * const NULL_TUPLE = (const Tuple * const) NULL_TUPLE_BUFFER; +static const uint8_t NULL_TUPLE_BUFFER[sizeof(Tuple) + sizeof(uint32_t)] = {0}; +const Tuple *const NULL_TUPLE = (const Tuple *const)NULL_TUPLE_BUFFER; -static uint8_t* dict_copy(DictionaryIterator* iter) { +static uint8_t *dict_copy(DictionaryIterator *iter) { size_t size = dict_size(iter); - uint8_t* buf = task_malloc(size); - if (buf == NULL) return NULL; + uint8_t *buf = task_malloc(size); + if (buf == NULL) + return NULL; memcpy(buf, iter->dictionary, size); return buf; } // Merge orig_iter and new_iter into dest_iter. Keys which exist in both // orig_iter and new_iter will get the value they have in new_iter. -static DictionaryResult dict_merge_to(DictionaryIterator* dest_iter, - DictionaryIterator* orig_iter, - DictionaryIterator* new_iter, +static DictionaryResult dict_merge_to(DictionaryIterator *dest_iter, DictionaryIterator *orig_iter, + DictionaryIterator *new_iter, const bool update_existing_keys_only, const DictionaryKeyUpdatedCallback update_key_callback, - void* context) { + void *context) { DictionaryResult result = DICT_OK; // First, write the updated keys. - for (Tuple* new = dict_read_first(new_iter); new; new = dict_read_next(new_iter)) { + for (Tuple *new = dict_read_first(new_iter); new; new = dict_read_next(new_iter)) { uint32_t key = new->key; - const Tuple* orig = dict_find(orig_iter, key); + const Tuple *orig = dict_find(orig_iter, key); if (orig == NULL && update_existing_keys_only) { continue; } if (orig == NULL) { orig = NULL_TUPLE; } - Tuple* dest = dest_iter->cursor; + Tuple *dest = dest_iter->cursor; result = dict_write_tuple(dest_iter, new); - if (result != DICT_OK) return result; + if (result != DICT_OK) + return result; update_key_callback(key, dest, orig, context); } @@ -333,16 +354,17 @@ static DictionaryResult dict_merge_to(DictionaryIterator* dest_iter, // We still call update_key_callback here, even though the values // themselves have not changed, because we have shuffled them // around in memory, so their old buffers are no longer valid. - for (Tuple* orig = dict_read_first(orig_iter); orig; orig = dict_read_next(orig_iter)) { + for (Tuple *orig = dict_read_first(orig_iter); orig; orig = dict_read_next(orig_iter)) { uint32_t key = orig->key; - Tuple* new = dict_find(new_iter, key); + Tuple *new = dict_find(new_iter, key); if (new != NULL) { // We already wrote this key, above. continue; } - Tuple* dest = dest_iter->cursor; + Tuple *dest = dest_iter->cursor; result = dict_write_tuple(dest_iter, orig); - if (result != DICT_OK) return result; + if (result != DICT_OK) + return result; update_key_callback(key, dest, orig, context); } @@ -353,32 +375,30 @@ static DictionaryResult dict_merge_to(DictionaryIterator* dest_iter, // of merging orig_iter and new_iter. This logic should always mirror the logic // in dict_merge_to, except it should simply count the size, rather than // actually merging the results. -static size_t dict_merge_to_size(DictionaryIterator* orig_iter, - DictionaryIterator* new_iter, +static size_t dict_merge_to_size(DictionaryIterator *orig_iter, DictionaryIterator *new_iter, const bool update_existing_keys_only) { size_t total_size_required = sizeof(Dictionary); // First, calculate the size of the new/updated keys. - for (Tuple* new = dict_read_first(new_iter); new; new = dict_read_next(new_iter)) { - if (dict_find(orig_iter, new->key) == NULL && update_existing_keys_only) continue; + for (Tuple *new = dict_read_first(new_iter); new; new = dict_read_next(new_iter)) { + if (dict_find(orig_iter, new->key) == NULL && update_existing_keys_only) + continue; total_size_required += sizeof(*new) + new->length; } // Then, add in the size of the keys which have not changed. - for (Tuple* orig = dict_read_first(orig_iter); orig; orig = dict_read_next(orig_iter)) { - if (dict_find(new_iter, orig->key) != NULL) continue; + for (Tuple *orig = dict_read_first(orig_iter); orig; orig = dict_read_next(orig_iter)) { + if (dict_find(new_iter, orig->key) != NULL) + continue; total_size_required += sizeof(*orig) + orig->length; } return total_size_required; } -DictionaryResult dict_merge(DictionaryIterator* dest_iter, - uint32_t* dest_buf_length_in_out, - DictionaryIterator* new_iter, - const bool update_existing_keys_only, - const DictionaryKeyUpdatedCallback update_key_callback, - void* context) { +DictionaryResult dict_merge(DictionaryIterator *dest_iter, uint32_t *dest_buf_length_in_out, + DictionaryIterator *new_iter, const bool update_existing_keys_only, + const DictionaryKeyUpdatedCallback update_key_callback, void *context) { if (dest_iter == NULL || new_iter == NULL || dest_buf_length_in_out == NULL) { return DICT_INVALID_ARGS; } @@ -388,22 +408,24 @@ DictionaryResult dict_merge(DictionaryIterator* dest_iter, return DICT_NOT_ENOUGH_STORAGE; } - uint8_t* orig_buffer = dict_copy(dest_iter); - if (orig_buffer == NULL) return DICT_MALLOC_FAILED; + uint8_t *orig_buffer = dict_copy(dest_iter); + if (orig_buffer == NULL) + return DICT_MALLOC_FAILED; DictionaryIterator orig_iter; DictionaryResult result = dict_init(&orig_iter, orig_buffer, dict_size(dest_iter)); - if (result != DICT_OK) goto cleanup; + if (result != DICT_OK) + goto cleanup; - result = dict_write_begin(dest_iter, - (uint8_t*)dest_iter->dictionary, + result = dict_write_begin(dest_iter, (uint8_t *)dest_iter->dictionary, (uint16_t)*dest_buf_length_in_out); - if (result != DICT_OK) goto cleanup; + if (result != DICT_OK) + goto cleanup; - result = dict_merge_to(dest_iter, &orig_iter, new_iter, - update_existing_keys_only, + result = dict_merge_to(dest_iter, &orig_iter, new_iter, update_existing_keys_only, update_key_callback, context); - if (result != DICT_OK) goto cleanup; + if (result != DICT_OK) + goto cleanup; *dest_buf_length_in_out = dict_write_end(dest_iter); diff --git a/src/fw/util/dict.h b/src/fw/util/dict.h index acd94d516d..8bbcb48b0d 100644 --- a/src/fw/util/dict.h +++ b/src/fw/util/dict.h @@ -15,17 +15,17 @@ //! \brief Data serialization utilities //! //! -//! Data residing in different parts of Pebble memory (RAM) may need to be gathered and assembled into -//! a single continuous block for transport over the network via Bluetooth. The process of gathering -//! and assembling this continuous block of data is called serialization. +//! Data residing in different parts of Pebble memory (RAM) may need to be gathered and assembled +//! into a single continuous block for transport over the network via Bluetooth. The process of +//! gathering and assembling this continuous block of data is called serialization. //! -//! You use data serialization utilities, like Dictionary, Tuple and Tuplet data structures and accompanying -//! functions, to accomplish this task. No transformations are performed on the actual data, however. -//! These Pebble utilities simply help assemble the data into one continuous buffer according to a -//! specific format. +//! You use data serialization utilities, like Dictionary, Tuple and Tuplet data structures and +//! accompanying functions, to accomplish this task. No transformations are performed on the actual +//! data, however. These Pebble utilities simply help assemble the data into one continuous buffer +//! according to a specific format. //! -//! \ref AppMessage uses these utilities--in particular, Dictionary--to send information between mobile -//! and Pebble watchapps. +//! \ref AppMessage uses these utilities--in particular, Dictionary--to send information between +//! mobile and Pebble watchapps. //! //!

Writing key/value pairs

//! To write two key/value pairs, without using Tuplets, you would do this: @@ -139,7 +139,7 @@ typedef struct __attribute__((__packed__)) { //! The key uint32_t key; //! The type of data that the `.value` fields contains. - TupleType type:8; + TupleType type : 8; //! The length of `.value` in bytes uint16_t length; //! @brief The value itself. @@ -197,7 +197,6 @@ typedef struct { Tuple *cursor; } DictionaryIterator; - //! Calculates the number of bytes that a dictionary will occupy, given //! one or more value lengths that need to be stored in the dictionary. //! @note The formula to calculate the size of a Dictionary in bytes is: @@ -216,7 +215,7 @@ uint32_t dict_calc_buffer_size(const uint8_t tuple_count, ...); //! than the size of the backing storage/backing buffer. //! @param iter The dictionary iterator //! @return The total number of bytes which have been written to the dictionary. -uint32_t dict_size(DictionaryIterator* iter); +uint32_t dict_size(DictionaryIterator *iter); //! Initializes the dictionary iterator with a given buffer and size, //! resets and empties it, in preparation of writing key/value tuples. @@ -226,7 +225,8 @@ uint32_t dict_size(DictionaryIterator* iter); //! @return \ref DICT_OK, \ref DICT_NOT_ENOUGH_STORAGE or \ref DICT_INVALID_ARGS //! @see dict_calc_buffer_size //! @see dict_write_end -DictionaryResult dict_write_begin(DictionaryIterator *iter, uint8_t * const buffer, const uint16_t size); +DictionaryResult dict_write_begin(DictionaryIterator *iter, uint8_t *const buffer, + const uint16_t size); //! Adds a key with a byte array value pair to the dictionary. //! @param iter The dictionary iterator @@ -236,7 +236,8 @@ DictionaryResult dict_write_begin(DictionaryIterator *iter, uint8_t * const buff //! @return \ref DICT_OK, \ref DICT_NOT_ENOUGH_STORAGE or \ref DICT_INVALID_ARGS //! @note The data will be copied into the backing storage of the dictionary. //! @note There is _no_ checking for duplicate keys. -DictionaryResult dict_write_data(DictionaryIterator *iter, const uint32_t key, const uint8_t * const data, const uint16_t size); +DictionaryResult dict_write_data(DictionaryIterator *iter, const uint32_t key, + const uint8_t *const data, const uint16_t size); //! Adds a key with a C string value pair to the dictionary. //! @param iter The dictionary iterator @@ -245,7 +246,8 @@ DictionaryResult dict_write_data(DictionaryIterator *iter, const uint32_t key, c //! @return \ref DICT_OK, \ref DICT_NOT_ENOUGH_STORAGE or \ref DICT_INVALID_ARGS //! @note The string will be copied into the backing storage of the dictionary. //! @note There is _no_ checking for duplicate keys. -DictionaryResult dict_write_cstring(DictionaryIterator *iter, const uint32_t key, const char * const cstring); +DictionaryResult dict_write_cstring(DictionaryIterator *iter, const uint32_t key, + const char *const cstring); //! Adds a key with an integer value pair to the dictionary. //! @param iter The dictionary iterator @@ -254,9 +256,10 @@ DictionaryResult dict_write_cstring(DictionaryIterator *iter, const uint32_t key //! @param width_bytes The width of the integer value //! @param is_signed Whether the integer's type is signed or not //! @return \ref DICT_OK, \ref DICT_NOT_ENOUGH_STORAGE or \ref DICT_INVALID_ARGS -//! @note There is _no_ checking for duplicate keys. dict_write_int() is only for serializing a single -//! integer. width_bytes can only be 1, 2, or 4. -DictionaryResult dict_write_int(DictionaryIterator *iter, const uint32_t key, const void *integer, const uint8_t width_bytes, const bool is_signed); +//! @note There is _no_ checking for duplicate keys. dict_write_int() is only for serializing a +//! single integer. width_bytes can only be 1, 2, or 4. +DictionaryResult dict_write_int(DictionaryIterator *iter, const uint32_t key, const void *integer, + const uint8_t width_bytes, const bool is_signed); //! Adds a key with an unsigned, 8-bit integer value pair to the dictionary. //! @param iter The dictionary iterator @@ -268,12 +271,17 @@ DictionaryResult dict_write_int(DictionaryIterator *iter, const uint32_t key, co //! `dict_write_uint16()`, `dict_write_uint32()`, `dict_write_int8()`, //! `dict_write_int16()` and `dict_write_int32()`. The documentation is not //! repeated for brevity's sake. -DictionaryResult dict_write_uint8(DictionaryIterator *iter, const uint32_t key, const uint8_t value); -DictionaryResult dict_write_uint16(DictionaryIterator *iter, const uint32_t key, const uint16_t value); -DictionaryResult dict_write_uint32(DictionaryIterator *iter, const uint32_t key, const uint32_t value); +DictionaryResult dict_write_uint8(DictionaryIterator *iter, const uint32_t key, + const uint8_t value); +DictionaryResult dict_write_uint16(DictionaryIterator *iter, const uint32_t key, + const uint16_t value); +DictionaryResult dict_write_uint32(DictionaryIterator *iter, const uint32_t key, + const uint32_t value); DictionaryResult dict_write_int8(DictionaryIterator *iter, const uint32_t key, const int8_t value); -DictionaryResult dict_write_int16(DictionaryIterator *iter, const uint32_t key, const int16_t value); -DictionaryResult dict_write_int32(DictionaryIterator *iter, const uint32_t key, const int32_t value); +DictionaryResult dict_write_int16(DictionaryIterator *iter, const uint32_t key, + const int16_t value); +DictionaryResult dict_write_int32(DictionaryIterator *iter, const uint32_t key, + const int32_t value); //! End a series of writing operations to a dictionary. //! This must be called before reading back from the dictionary. @@ -286,18 +294,23 @@ uint32_t dict_write_end(DictionaryIterator *iter); //! @param iter The dictionary iterator //! @param buffer The storage of the dictionary //! @param size The storage size of the dictionary -//! @return The first tuple in the dictionary, or NULL in case the dictionary was empty or if there was a parsing error. -Tuple * dict_read_begin_from_buffer(DictionaryIterator *iter, const uint8_t * const buffer, const uint16_t size); +//! @return The first tuple in the dictionary, or NULL in case the dictionary was empty or if there +//! was a parsing error. +Tuple *dict_read_begin_from_buffer(DictionaryIterator *iter, const uint8_t *const buffer, + const uint16_t size); //! Progresses the iterator to the next key/value pair. //! @param iter The dictionary iterator -//! @return The next tuple in the dictionary, or NULL in case the end has been reached or if there was a parsing error. -Tuple * dict_read_next(DictionaryIterator *iter); +//! @return The next tuple in the dictionary, or NULL in case the end has been reached or if there +//! was a parsing error. +Tuple *dict_read_next(DictionaryIterator *iter); -//! Resets the iterator back to the same state as a call to \ref dict_read_begin_from_buffer() would do. +//! Resets the iterator back to the same state as a call to \ref dict_read_begin_from_buffer() would +//! do. //! @param iter The dictionary iterator -//! @return The first tuple in the dictionary, or NULL in case the dictionary was empty or if there was a parsing error. -Tuple * dict_read_first(DictionaryIterator *iter); +//! @return The first tuple in the dictionary, or NULL in case the dictionary was empty or if there +//! was a parsing error. +Tuple *dict_read_first(DictionaryIterator *iter); /** Dictionary Utilities */ @@ -339,78 +352,109 @@ typedef struct Tuplet { //! Width of the integer. const uint16_t width; } integer; - }; //!< See documentation of `.bytes`, `.cstring` and `.integer` fields. + }; //!< See documentation of `.bytes`, `.cstring` and `.integer` fields. } Tuplet; //! Macro to create a Tuplet with a byte array value //! @param _key The key //! @param _data Pointer to the bytes //! @param _length Length of the buffer -#define TupletBytes(_key, _data, _length) \ -((const Tuplet) { .type = TUPLE_BYTE_ARRAY, .key = _key, .bytes = { .data = _data, .length = _length }}) +#define TupletBytes(_key, _data, _length) \ + ((const Tuplet){ \ + .type = TUPLE_BYTE_ARRAY, \ + .key = _key, \ + .bytes = {.data = _data, .length = _length} \ + }) //! Macro to create a Tuplet with a c-string value //! @param _key The key //! @param _cstring The c-string value -#define TupletCString(_key, _cstring) \ -((const Tuplet) { .type = TUPLE_CSTRING, .key = _key, .cstring = { .data = _cstring, .length = _cstring ? strlen(_cstring) + 1 : 0 }}) +#define TupletCString(_key, _cstring) \ + ((const Tuplet){ \ + .type = TUPLE_CSTRING, \ + .key = _key, \ + .cstring = {.data = _cstring, .length = _cstring ? strlen(_cstring) + 1 : 0} \ + }) //! Macro to create a Tuplet with an integer value //! @param _key The key //! @param _integer The integer value -#define TupletInteger(_key, _integer) \ -((const Tuplet) { .type = IS_SIGNED(_integer) ? TUPLE_INT : TUPLE_UINT, .key = _key, .integer = { .storage = _integer, .width = sizeof(_integer) }}) +#define TupletInteger(_key, _integer) \ + ((const Tuplet){ \ + .type = IS_SIGNED(_integer) ? TUPLE_INT : TUPLE_UINT, \ + .key = _key, \ + .integer = {.storage = _integer, .width = sizeof(_integer)} \ + }) //! Callback for \ref dict_serialize_tuplets() utility. //! @param data The data of the serialized dictionary //! @param size The size of data //! @param context The context pointer as passed in to \ref dict_serialize_tuplets() //! @see dict_serialize_tuplets -typedef void (*DictionarySerializeCallback)(const uint8_t * const data, const uint16_t size, void *context); +typedef void (*DictionarySerializeCallback)(const uint8_t *const data, const uint16_t size, + void *context); //! Utility function that takes a list of Tuplets from which a dictionary //! will be serialized, ready to transmit or store. //! @note The callback will be called before the function returns, so the data that //! that `context` points to, can be stack allocated. -//! @param callback The callback that will be called with the serialized data of the generated dictionary. +//! @param callback The callback that will be called with the serialized data of the generated +//! dictionary. //! @param context Pointer to any application specific data that gets passed into the callback. //! @param tuplets An array of Tuplets that need to be serialized into the dictionary. //! @param tuplets_count The number of tuplets that follow. //! @return \ref DICT_OK, \ref DICT_NOT_ENOUGH_STORAGE or \ref DICT_INVALID_ARGS -DictionaryResult dict_serialize_tuplets(DictionarySerializeCallback callback, void *context, const Tuplet * const tuplets, const uint8_t tuplets_count); +DictionaryResult dict_serialize_tuplets(DictionarySerializeCallback callback, void *context, + const Tuplet *const tuplets, const uint8_t tuplets_count); // Legacy version to prevent previous app breakage, __deprecated preserves order -DictionaryResult dict_serialize_tuplets__deprecated(DictionarySerializeCallback callback, void *context, const uint8_t tuplets_count, const Tuplet * const tuplets); +DictionaryResult dict_serialize_tuplets__deprecated(DictionarySerializeCallback callback, + void *context, const uint8_t tuplets_count, + const Tuplet *const tuplets); //! Utility function that takes an array of Tuplets and serializes them into //! a dictionary with a given buffer and size. //! @param tuplets The array of tuplets //! @param tuplets_count The number of tuplets in the array //! @param buffer The buffer in which to write the serialized dictionary -//! @param [in,out] size_in_out In: the available buffer size in bytes. Out: the number of bytes written. +//! @param [in,out] size_in_out In: the available buffer size in bytes. Out: the number of bytes +//! written. //! @return \ref DICT_OK, \ref DICT_NOT_ENOUGH_STORAGE or \ref DICT_INVALID_ARGS -DictionaryResult dict_serialize_tuplets_to_buffer(const Tuplet * const tuplets, const uint8_t tuplets_count, uint8_t *buffer, uint32_t *size_in_out); +DictionaryResult dict_serialize_tuplets_to_buffer(const Tuplet *const tuplets, + const uint8_t tuplets_count, uint8_t *buffer, + uint32_t *size_in_out); // Legacy version to prevent previous app breakage, __deprecated preserves order -DictionaryResult dict_serialize_tuplets_to_buffer__deprecated(const uint8_t tuplets_count, const Tuplet * const tuplets, uint8_t *buffer, uint32_t *size_in_out); +DictionaryResult dict_serialize_tuplets_to_buffer__deprecated(const uint8_t tuplets_count, + const Tuplet *const tuplets, + uint8_t *buffer, + uint32_t *size_in_out); //! Serializes an array of Tuplets into a dictionary with a given buffer and size. //! @param iter The dictionary iterator //! @param tuplets The array of tuplets //! @param tuplets_count The number of tuplets in the array //! @param buffer The buffer in which to write the serialized dictionary -//! @param [in,out] size_in_out In: the available buffer size in bytes. Out: the number of bytes written. +//! @param [in,out] size_in_out In: the available buffer size in bytes. Out: the number of bytes +//! written. //! @return \ref DICT_OK, \ref DICT_NOT_ENOUGH_STORAGE or \ref DICT_INVALID_ARGS -DictionaryResult dict_serialize_tuplets_to_buffer_with_iter(DictionaryIterator *iter, const Tuplet * const tuplets, const uint8_t tuplets_count, uint8_t *buffer, uint32_t *size_in_out); +DictionaryResult dict_serialize_tuplets_to_buffer_with_iter(DictionaryIterator *iter, + const Tuplet *const tuplets, + const uint8_t tuplets_count, + uint8_t *buffer, uint32_t *size_in_out); // Legacy version to prevent previous app breakage, __deprecated preserves order -DictionaryResult dict_serialize_tuplets_to_buffer_with_iter__deprecated(const uint8_t tuplets_count, const Tuplet * const tuplets, DictionaryIterator *iter, uint8_t *buffer, uint32_t *size_in_out); +DictionaryResult dict_serialize_tuplets_to_buffer_with_iter__deprecated(const uint8_t tuplets_count, + const Tuplet *const tuplets, + DictionaryIterator *iter, + uint8_t *buffer, + uint32_t *size_in_out); //! Serializes a Tuplet and writes the resulting Tuple into a dictionary. //! @param iter The dictionary iterator //! @param tuplet The Tuplet describing the key/value pair to write //! @return \ref DICT_OK, \ref DICT_NOT_ENOUGH_STORAGE or \ref DICT_INVALID_ARGS -DictionaryResult dict_write_tuplet(DictionaryIterator *iter, const Tuplet * const tuplet); +DictionaryResult dict_write_tuplet(DictionaryIterator *iter, const Tuplet *const tuplet); //! Calculates the number of bytes that a dictionary will occupy, given //! one or more Tuplets that need to be stored in the dictionary. @@ -419,44 +463,50 @@ DictionaryResult dict_write_tuplet(DictionaryIterator *iter, const Tuplet * cons //! @param tuplets_count The total number of Tuplets that follow. //! @return The total number of bytes of storage needed. //! @see Tuplet -uint32_t dict_calc_buffer_size_from_tuplets(const Tuplet * const tuplets, const uint8_t tuplets_count); +uint32_t dict_calc_buffer_size_from_tuplets(const Tuplet *const tuplets, + const uint8_t tuplets_count); // Legacy version to prevent previous app breakage, __deprecated preserves order -uint32_t dict_calc_buffer_size_from_tuplets__deprecated(const uint8_t tuplets_count, const Tuplet * const tuplets); +uint32_t dict_calc_buffer_size_from_tuplets__deprecated(const uint8_t tuplets_count, + const Tuplet *const tuplets); //! Tuple that represents an empty tuple. //! @see DictionaryKeyUpdatedCallback -extern const Tuple * const NULL_TUPLE; +extern const Tuple *const NULL_TUPLE; //! Type of the callback used in \ref dict_merge() //! @param key The key that is being updated. -//! @param new_tuple The new tuple. The tuple points to the actual, updated destination dictionary or NULL_TUPLE -//! in case there was an error (e.g. backing buffer was too small). -//! Therefore the Tuple can be used after the callback returns, until the destination dictionary -//! storage is free'd (by the application itself). -//! @param old_tuple The values that will be replaced with `new_tuple`. The key, value and type will be -//! equal to the previous tuple in the old destination dictionary, however the `old_tuple` points +//! @param new_tuple The new tuple. The tuple points to the actual, updated destination dictionary +//! or NULL_TUPLE in case there was an error (e.g. backing buffer was too small). Therefore the +//! Tuple can be used after the callback returns, until the destination dictionary storage is free'd +//! (by the application itself). +//! @param old_tuple The values that will be replaced with `new_tuple`. The key, value and type will +//! be equal to the previous tuple in the old destination dictionary, however the `old_tuple` points //! to a stack-allocated copy of the old data. //! @param context Pointer to application specific data //! The storage backing `old_tuple` can only be used during the callback and //! will no longer be valid after the callback returns. //! @see dict_merge -typedef void (*DictionaryKeyUpdatedCallback)(const uint32_t key, const Tuple *new_tuple, const Tuple *old_tuple, void *context); +typedef void (*DictionaryKeyUpdatedCallback)(const uint32_t key, const Tuple *new_tuple, + const Tuple *old_tuple, void *context); //! Merges entries from another "source" dictionary into a "destination" dictionary. //! All Tuples from the source are written into the destination dictionary, while //! updating the existing Tuples with matching keys. //! @param dest The destination dictionary to update -//! @param [in,out] dest_max_size_in_out In: the maximum size of buffer backing `dest`. Out: the final size of the updated dictionary. +//! @param [in,out] dest_max_size_in_out In: the maximum size of buffer backing `dest`. Out: the +//! final size of the updated dictionary. //! @param source The source dictionary of which its Tuples will be used to update dest. -//! @param update_existing_keys_only Specify True if only the existing keys in `dest` should be updated. -//! @param key_callback The callback that will be called for each Tuple in the merged destination dictionary. -//! @param context Pointer to app specific data that will get passed in when `update_key_callback` is called. +//! @param update_existing_keys_only Specify True if only the existing keys in `dest` should be +//! updated. +//! @param key_callback The callback that will be called for each Tuple in the merged destination +//! dictionary. +//! @param context Pointer to app specific data that will get passed in when `update_key_callback` +//! is called. //! @return \ref DICT_OK, \ref DICT_INVALID_ARGS, \ref DICT_NOT_ENOUGH_STORAGE DictionaryResult dict_merge(DictionaryIterator *dest, uint32_t *dest_max_size_in_out, - DictionaryIterator *source, - const bool update_existing_keys_only, - const DictionaryKeyUpdatedCallback key_callback, void *context); + DictionaryIterator *source, const bool update_existing_keys_only, + const DictionaryKeyUpdatedCallback key_callback, void *context); //! Tries to find a Tuple with specified key in a dictionary //! @param iter Iterator to the dictionary to search in. diff --git a/src/fw/util/generic_attribute.c b/src/fw/util/generic_attribute.c index b7c5998f1a..18b2975945 100644 --- a/src/fw/util/generic_attribute.c +++ b/src/fw/util/generic_attribute.c @@ -28,9 +28,9 @@ GenericAttribute *generic_attribute_find_attribute(GenericAttributeList *attr_li GenericAttribute *generic_attribute_add_attribute(GenericAttribute *attr, uint8_t id, void *data, size_t size) { - *attr = (GenericAttribute) { - .id = id, - .length = size, + *attr = (GenericAttribute){ + .id = id, + .length = size, }; memcpy(attr->data, data, size); diff --git a/src/fw/util/graphics.h b/src/fw/util/graphics.h index 6b940e3b94..a58ba3e557 100644 --- a/src/fw/util/graphics.h +++ b/src/fw/util/graphics.h @@ -15,14 +15,17 @@ //! @param bitdepth bits per pixel for the image (1,2,4 or 8 supported) //! @return The value from the image buffer at the specified coordinates static ALWAYS_INLINE uint8_t raw_image_get_value_for_bitdepth(const uint8_t *raw_image_buffer, - uint32_t x, uint32_t y, uint16_t row_stride_bytes, uint8_t bitdepth) { + uint32_t x, uint32_t y, + uint16_t row_stride_bytes, + uint8_t bitdepth) { // Retrieve the byte from the image buffer containing the requested pixel uint32_t pixel_in_byte = raw_image_buffer[y * row_stride_bytes + (x * bitdepth / 8)]; // Find the index of the pixel in terms of coordinates and aligned_width - uint32_t pixel_index = y * (row_stride_bytes * 8 / bitdepth) + x; + uint32_t pixel_index = y * (row_stride_bytes * 8 / bitdepth) + x; // Shift and mask the requested pixel data from the byte containing it and return - return (uint8_t)((pixel_in_byte >> ((((8 / bitdepth) - 1) - (pixel_index % (8 / bitdepth))) - * bitdepth)) & ~(~0U << bitdepth)); + return (uint8_t)((pixel_in_byte >> + ((((8 / bitdepth) - 1) - (pixel_index % (8 / bitdepth))) * bitdepth)) & + ~(~0U << bitdepth)); } //! This function sets a pixel value for a specific bits-per-pixel depth in an image buffer @@ -34,9 +37,8 @@ static ALWAYS_INLINE uint8_t raw_image_get_value_for_bitdepth(const uint8_t *raw //! @param row_stride_bytes The byte-aligned width of each row in bytes //! @param bitdepth The bits-per-pixel for the image (Only 1, 2, 4 or 8 bitdepths are supported) //! @param value The pixel value to set in the image buffer at the specified (x, y) coordinates -static ALWAYS_INLINE void raw_image_set_value_for_bitdepth(uint8_t *raw_image_buffer, - uint32_t x, uint32_t y, - uint16_t row_stride_bytes, +static ALWAYS_INLINE void raw_image_set_value_for_bitdepth(uint8_t *raw_image_buffer, uint32_t x, + uint32_t y, uint16_t row_stride_bytes, uint8_t bitdepth, uint8_t value) { const uint8_t pixels_per_byte = (uint8_t)(8 / bitdepth); @@ -45,7 +47,7 @@ static ALWAYS_INLINE void raw_image_set_value_for_bitdepth(uint8_t *raw_image_bu const uint8_t pixel_in_byte = raw_image_buffer[byte_offset]; // Find the index of the pixel in terms of coordinates and aligned_width - const uint32_t pixel_index = (y * (row_stride_bytes * pixels_per_byte) + x) % pixels_per_byte; + const uint32_t pixel_index = (y * (row_stride_bytes * pixels_per_byte) + x) % pixels_per_byte; // For example, bitdepth=1 -> bitdepth_mask=0b1, bitdepth=2 -> bitdepth_mask=0b11, etc. const uint8_t bitdepth_mask = (uint8_t)~(~0U << bitdepth); diff --git a/src/fw/util/hdlc.c b/src/fw/util/hdlc.c index 176f4c6cad..9e4fd0e0fa 100644 --- a/src/fw/util/hdlc.c +++ b/src/fw/util/hdlc.c @@ -5,7 +5,6 @@ #include "system/passert.h" - void hdlc_streaming_decode_reset(HdlcStreamingContext *ctx) { ctx->escape = false; } diff --git a/src/fw/util/ihex.c b/src/fw/util/ihex.c index f1a2a915c8..16ba216543 100644 --- a/src/fw/util/ihex.c +++ b/src/fw/util/ihex.c @@ -22,8 +22,7 @@ static void prv_hexlify(char *str, uint32_t value, uint8_t num_bytes) { } } -void ihex_encode(uint8_t *out, uint8_t type, uint16_t address, - const void *data, uint8_t data_len) { +void ihex_encode(uint8_t *out, uint8_t type, uint16_t address, const void *data, uint8_t data_len) { IHEXRecord *record = (IHEXRecord *)out; uint8_t checksum = data_len + (address >> 8) + (address & 0xff) + type; record->start = ':'; @@ -33,7 +32,7 @@ void ihex_encode(uint8_t *out, uint8_t type, uint16_t address, for (uint16_t i = 0; i < data_len; ++i) { uint8_t data_byte = ((uint8_t *)data)[i]; checksum += data_byte; - prv_hexlify(&record->data[i*2], data_byte, sizeof(data_byte)); + prv_hexlify(&record->data[i * 2], data_byte, sizeof(data_byte)); } - prv_hexlify(&record->data[data_len*2], ~checksum + 1, sizeof(checksum)); + prv_hexlify(&record->data[data_len * 2], ~checksum + 1, sizeof(checksum)); } diff --git a/src/fw/util/ihex.h b/src/fw/util/ihex.h index ef16b496c2..656920d001 100644 --- a/src/fw/util/ihex.h +++ b/src/fw/util/ihex.h @@ -7,13 +7,10 @@ #include - #define IHEX_TYPE_DATA (0u) #define IHEX_TYPE_EOF (1u) - -#define IHEX_RECORD_LENGTH(len) ((len)*2 + 11) - +#define IHEX_RECORD_LENGTH(len) ((len) * 2 + 11) //! Encode an Intel HEX record with the specified record type, address //! and data, and write it to out. @@ -24,5 +21,4 @@ //! \param address record address //! \param [in] data data for the record. May be NULL if data_len is 0. //! \param data_len length of data to include in the record. -void ihex_encode(uint8_t *out, uint8_t type, uint16_t address, - const void *data, uint8_t data_len); +void ihex_encode(uint8_t *out, uint8_t type, uint16_t address, const void *data, uint8_t data_len); diff --git a/src/fw/util/legacy_checksum.c b/src/fw/util/legacy_checksum.c index 0a1c31d404..693e7d0c0a 100644 --- a/src/fw/util/legacy_checksum.c +++ b/src/fw/util/legacy_checksum.c @@ -36,10 +36,8 @@ // The CRC lookup table was generated by legacy_checksum_crc_table.py static const uint32_t s_lookup_table[] = { - 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, - 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, - 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, - 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, + 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, + 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, }; static uint32_t prv_crc_byte(uint32_t crc, uint8_t input) { @@ -49,18 +47,17 @@ static uint32_t prv_crc_byte(uint32_t crc, uint8_t input) { } void legacy_defective_checksum_init(LegacyChecksum *checksum) { - *checksum = (LegacyChecksum) { - .reg = 0xffffffff, + *checksum = (LegacyChecksum){ + .reg = 0xffffffff, }; } -void legacy_defective_checksum_update( - LegacyChecksum * restrict checksum, - const void * restrict data, size_t length) { - const char * restrict data_bytes = data; - uint32_t * restrict reg = &checksum->reg; - uint8_t * restrict accumulator = checksum->accumulator; - uint8_t * restrict accumulated_length = &checksum->accumulated_length; +void legacy_defective_checksum_update(LegacyChecksum *restrict checksum, const void *restrict data, + size_t length) { + const char *restrict data_bytes = data; + uint32_t *restrict reg = &checksum->reg; + uint8_t *restrict accumulator = checksum->accumulator; + uint8_t *restrict accumulated_length = &checksum->accumulated_length; if (*accumulated_length) { for (; *accumulated_length < 3 && length; length--) { @@ -105,8 +102,7 @@ uint32_t legacy_defective_checksum_finish(LegacyChecksum *checksum) { return checksum->reg; } -uint32_t legacy_defective_checksum_memory(const void * restrict data, - size_t length) { +uint32_t legacy_defective_checksum_memory(const void *restrict data, size_t length) { LegacyChecksum checksum; legacy_defective_checksum_init(&checksum); legacy_defective_checksum_update(&checksum, data, length); diff --git a/src/fw/util/legacy_checksum.h b/src/fw/util/legacy_checksum.h index 674adcc177..36b34768fb 100644 --- a/src/fw/util/legacy_checksum.h +++ b/src/fw/util/legacy_checksum.h @@ -30,12 +30,10 @@ typedef struct LegacyChecksum { void legacy_defective_checksum_init(LegacyChecksum *checksum); -void legacy_defective_checksum_update( - LegacyChecksum * restrict checksum, - const void * restrict data, size_t length); +void legacy_defective_checksum_update(LegacyChecksum *restrict checksum, const void *restrict data, + size_t length); uint32_t legacy_defective_checksum_finish(LegacyChecksum *checksum); //! Convenience wrapper to checksum memory in one shot. -uint32_t legacy_defective_checksum_memory(const void * restrict data, - size_t length); +uint32_t legacy_defective_checksum_memory(const void *restrict data, size_t length); diff --git a/src/fw/util/lru_cache.c b/src/fw/util/lru_cache.c index f00c4a64b3..4a53330214 100644 --- a/src/fw/util/lru_cache.c +++ b/src/fw/util/lru_cache.c @@ -7,12 +7,12 @@ #include -void lru_cache_init(LRUCache* c, size_t item_size, uint8_t *buffer, size_t buffer_size) { - *c = (LRUCache) { - .buffer = buffer, - .item_size = item_size, - .max_items = buffer_size / (item_size + sizeof(CacheEntry)), - .least_recent = NULL +void lru_cache_init(LRUCache *c, size_t item_size, uint8_t *buffer, size_t buffer_size) { + *c = (LRUCache){ + .buffer = buffer, + .item_size = item_size, + .max_items = buffer_size / (item_size + sizeof(CacheEntry)), + .least_recent = NULL }; } @@ -24,7 +24,7 @@ void lru_cache_flush(LRUCache *c) { c->least_recent = NULL; } -void *lru_cache_get(LRUCache* c, uint32_t key) { +void *lru_cache_get(LRUCache *c, uint32_t key) { // cur_ptr is a pointer-to-pointer to the more_recent // field in the parent of the current entry CacheEntry **cur_ptr = &c->least_recent; @@ -57,7 +57,7 @@ void *lru_cache_get(LRUCache* c, uint32_t key) { } } -void lru_cache_put(LRUCache* c, uint32_t key, void* item) { +void lru_cache_put(LRUCache *c, uint32_t key, void *item) { // cur_ptr is a pointer-to-pointer to the more_recent // field in the parent of the current entry CacheEntry **cur_ptr = &c->least_recent; @@ -94,4 +94,3 @@ void lru_cache_put(LRUCache* c, uint32_t key, void* item) { memcpy(new->data, item, c->item_size); *cur_ptr = new; } - diff --git a/src/fw/util/lru_cache.h b/src/fw/util/lru_cache.h index 8246bd5ed1..27c755bfe3 100644 --- a/src/fw/util/lru_cache.h +++ b/src/fw/util/lru_cache.h @@ -14,16 +14,16 @@ //! but this would complicate the code quite a bit typedef struct CacheEntry { - struct CacheEntry *more_recent; ///< The next entry in the linked list - uint32_t key; ///< The key that identifies this entry - uint8_t data[]; ///< the data associated with this entry + struct CacheEntry *more_recent; ///< The next entry in the linked list + uint32_t key; ///< The key that identifies this entry + uint8_t data[]; ///< the data associated with this entry } CacheEntry; typedef struct { - uint8_t *buffer; ///< A pointer to the buffer allocated for storing cache data - size_t item_size; ///< The size in bytes of items in the cache - int max_items; ///< The max number of items that can fit in the cache - CacheEntry *least_recent; ///< The head of the singly linked list of cache entries + uint8_t *buffer; ///< A pointer to the buffer allocated for storing cache data + size_t item_size; ///< The size in bytes of items in the cache + int max_items; ///< The max number of items that can fit in the cache + CacheEntry *least_recent; ///< The head of the singly linked list of cache entries } LRUCache; //! Initialize an LRU cache @@ -32,13 +32,13 @@ typedef struct { //! @param buffer a buffer to store cache items into //! @param buffer_size the size of the buffer //! @note each entry is 8 bytes larger than item_size, allocate accordingly! -void lru_cache_init(LRUCache* c, size_t item_size, uint8_t *buffer, size_t buffer_size); +void lru_cache_init(LRUCache *c, size_t item_size, uint8_t *buffer, size_t buffer_size); //! Retrieve an item from the cache and mark the item as most recently used //! @param c the cache to retrieve from //! @param key the key for the item we want retrieved //! @return a pointer to the item, or NULL if not found -void *lru_cache_get(LRUCache* c, uint32_t key); +void *lru_cache_get(LRUCache *c, uint32_t key); //! Add an item to the cache. //! @note This will evict the least recently used item if the cache is full @@ -46,9 +46,8 @@ void *lru_cache_get(LRUCache* c, uint32_t key); //! @param c the cache to retrieve data from //! @param key the key to associate to the item //! @param item a pointer to the item data -void lru_cache_put(LRUCache* c, uint32_t key, void* item); +void lru_cache_put(LRUCache *c, uint32_t key, void *item); //! Flush the cache. This removes all data from the cache. //! @param c the cache to flush void lru_cache_flush(LRUCache *c); - diff --git a/src/fw/util/mbuf.c b/src/fw/util/mbuf.c index 39352e320a..3f9fb31617 100644 --- a/src/fw/util/mbuf.c +++ b/src/fw/util/mbuf.c @@ -20,20 +20,18 @@ static PBL_MUTEX_DEFINE(s_free_list_lock); //! each pool. static int s_mbuf_pool_space[] = { #if UNITTEST - [MBufPoolUnitTest] = 100, + [MBufPoolUnitTest] = 100, #endif }; _Static_assert(ARRAY_LENGTH(s_mbuf_pool_space) == NumMBufPools, "s_mbuf_pool_space array does not match MBufPool enum"); - // Init //////////////////////////////////////////////////////////////////////////////// void mbuf_init(void) { } - // Allocation / free list management //////////////////////////////////////////////////////////////////////////////// @@ -84,7 +82,7 @@ void mbuf_free(MBuf *m) { return; } PBL_ASSERTN(mbuf_is_flag_set(m, MBUF_FLAG_IS_MANAGED)); - PBL_ASSERTN(!mbuf_is_flag_set(m, MBUF_FLAG_IS_FREE)); // double free + PBL_ASSERTN(!mbuf_is_flag_set(m, MBUF_FLAG_IS_FREE)); // double free // clear the MBuf *m = MBUF_EMPTY; @@ -102,7 +100,6 @@ void mbuf_free(MBuf *m) { pbl_mutex_unlock(&s_free_list_lock); } - // Basic setters and getters //////////////////////////////////////////////////////////////////////////////// @@ -152,7 +149,6 @@ uint32_t mbuf_get_chain_length(MBuf *m) { return total; } - // MBuf chain management //////////////////////////////////////////////////////////////////////////////// @@ -170,15 +166,17 @@ void mbuf_clear_next(MBuf *m) { m->next = NULL; } - // Debug //////////////////////////////////////////////////////////////////////////////// void mbuf_debug_dump(MBuf *m) { char buffer[80]; while (m) { - dbgserial_putstr_fmt(buffer, sizeof(buffer), "MBuf <%p>: length=%"PRIu32", data=%p, " - "flags=0x%"PRIx32, m, m->length, m->data, m->flags); + dbgserial_putstr_fmt(buffer, sizeof(buffer), + "MBuf <%p>: length=%" PRIu32 + ", data=%p, " + "flags=0x%" PRIx32, + m, m->length, m->data, m->flags); m = m->next; } } diff --git a/src/fw/util/mbuf.h b/src/fw/util/mbuf.h index c4db216d82..21d0b8f8de 100644 --- a/src/fw/util/mbuf.h +++ b/src/fw/util/mbuf.h @@ -28,12 +28,11 @@ */ //! Helper macro for clearing an MBuf -#define MBUF_EMPTY ((MBuf){ 0 }) +#define MBUF_EMPTY ((MBuf){0}) //! Flags used by consumers of MBufs (bits 0-23 are allocated for this purpose) #define MBUF_FLAG_IS_FRAMING ((uint32_t)(1 << 0)) - //! Consumers of MBufs which use mbuf_get() should add an enum value and add the maximum number of //! MBufs which may be allocated for that pool to the MBUF_POOL_MAX_ALLOCATED array within mbuf.c. typedef enum { diff --git a/src/fw/util/net.h b/src/fw/util/net.h index 09ec7352af..39e4d77c3e 100644 --- a/src/fw/util/net.h +++ b/src/fw/util/net.h @@ -55,7 +55,7 @@ static inline uint16_t ntoh16(net16 net) { } static inline net16 hton16(uint16_t v) { - return (net16){ htons(v) }; + return (net16){htons(v)}; } static inline uint32_t ntoh32(net32 net) { @@ -63,5 +63,5 @@ static inline uint32_t ntoh32(net32 net) { } static inline net32 hton32(uint32_t v) { - return (net32){ htonl(v) }; + return (net32){htonl(v)}; } diff --git a/src/fw/util/packbits.c b/src/fw/util/packbits.c index a1503f0949..0e8f818f2e 100644 --- a/src/fw/util/packbits.c +++ b/src/fw/util/packbits.c @@ -5,10 +5,10 @@ #include -void packbits_unpack(const char* src, int src_length, uint8_t* dest) { +void packbits_unpack(const char *src, int src_length, uint8_t *dest) { int length = 0; while (length < src_length) { - int8_t header = *((int8_t*) src++); + int8_t header = *((int8_t *)src++); length++; if (header >= 0) { diff --git a/src/fw/util/packbits.h b/src/fw/util/packbits.h index 08dd8e0977..f6fec5c72b 100644 --- a/src/fw/util/packbits.h +++ b/src/fw/util/packbits.h @@ -5,4 +5,4 @@ #include -void packbits_unpack(const char* src, int src_length, uint8_t* dest); +void packbits_unpack(const char *src, int src_length, uint8_t *dest); diff --git a/src/fw/util/pstring.c b/src/fw/util/pstring.c index bf144b0858..08e6697d79 100644 --- a/src/fw/util/pstring.c +++ b/src/fw/util/pstring.c @@ -9,14 +9,14 @@ #include "util/pstring.h" PascalString16 *pstring_create_pstring16(uint16_t size) { - PascalString16* pstring = task_malloc_check(sizeof(uint16_t) + sizeof(char) * size); + PascalString16 *pstring = task_malloc_check(sizeof(uint16_t) + sizeof(char) * size); pstring->str_length = 0; return pstring; } PascalString16 *pstring_create_pstring16_from_string(char string[]) { uint16_t length = strlen(string); - PascalString16* pstring; + PascalString16 *pstring; if (length == 0) { // Empty string pstring = task_malloc_check(sizeof(uint16_t) + sizeof(char) * 1); @@ -71,7 +71,7 @@ SerializedArray *pstring_create_serialized_array(uint16_t data_size) { return serialized_array; } -void pstring_destroy_serialized_array(SerializedArray* serialized_array) { +void pstring_destroy_serialized_array(SerializedArray *serialized_array) { task_free(serialized_array); } @@ -85,7 +85,7 @@ uint16_t pstring_get_number_of_pstring16s_in_list(PascalString16List *pstring16_ uint8_t *data_ptr = (pstring16_list->pstrings)->data; uint16_t pstring_length; do { - pstring_length = (uint16_t) *data_ptr; + pstring_length = (uint16_t)*data_ptr; if (pstring_length == 0) { empty_count++; } else { @@ -94,7 +94,7 @@ uint16_t pstring_get_number_of_pstring16s_in_list(PascalString16List *pstring16_ } data_ptr += pstring_length + size; } while ((&((pstring16_list->pstrings)->data[(pstring16_list->pstrings)->data_size]) - data_ptr) > - 1); // Need at least 2 bytes for another pstring + 1); // Need at least 2 bytes for another pstring if (count != 0) { count += empty_count; @@ -109,7 +109,7 @@ void pstring_project_list_on_serialized_array(PascalString16List *pstring16_list pstring16_list->count = pstring_get_number_of_pstring16s_in_list(pstring16_list); } -bool pstring_add_pstring16_to_list(PascalString16List *pstring16_list, PascalString16* pstring) { +bool pstring_add_pstring16_to_list(PascalString16List *pstring16_list, PascalString16 *pstring) { size_t size = sizeof(uint16_t); // Traverse list @@ -126,11 +126,11 @@ bool pstring_add_pstring16_to_list(PascalString16List *pstring16_list, PascalStr return true; } // Advance pointer and index - pstring_length = (uint16_t) *data_ptr; + pstring_length = (uint16_t)*data_ptr; data_ptr += pstring_length + size; idx++; } while ((&((pstring16_list->pstrings)->data[(pstring16_list->pstrings)->data_size]) - data_ptr) > - 1); // Need at least 2 bytes for another pstring + 1); // Need at least 2 bytes for another pstring return false; } @@ -151,14 +151,14 @@ PascalString16 *pstring_get_pstring16_from_list(PascalString16List *pstring16_li do { if (idx == index) { // Found the requested pstring - pstring = (PascalString16*) data_ptr; + pstring = (PascalString16 *)data_ptr; break; } - pstring_length = (uint16_t) *data_ptr; + pstring_length = (uint16_t)*data_ptr; data_ptr += pstring_length + size; idx++; } while ((&((pstring16_list->pstrings)->data[(pstring16_list->pstrings)->data_size]) - data_ptr) > - 1); // Need at least 2 bytes for another pstring + 1); // Need at least 2 bytes for another pstring return pstring; } diff --git a/src/fw/util/pstring.h b/src/fw/util/pstring.h index ed9bae8dec..81cab32b20 100644 --- a/src/fw/util/pstring.h +++ b/src/fw/util/pstring.h @@ -55,7 +55,7 @@ bool pstring_equal_cstring(const PascalString16 *pstr, const char *cstr); SerializedArray *pstring_create_serialized_array(uint16_t data_size); -void pstring_destroy_serialized_array(SerializedArray* serialized_array); +void pstring_destroy_serialized_array(SerializedArray *serialized_array); // Projects a list on a serialized array so that pstring operations may be performed on it. void pstring_project_list_on_serialized_array(PascalString16List *pstring16_list, @@ -63,14 +63,14 @@ void pstring_project_list_on_serialized_array(PascalString16List *pstring16_list // Adds a PascalString16 to the end of the list. // Returns true if the PascalString16 was successfully added, false if there was no room. -bool pstring_add_pstring16_to_list(PascalString16List *pstring16_list, PascalString16* pstring); +bool pstring_add_pstring16_to_list(PascalString16List *pstring16_list, PascalString16 *pstring); // Retrieves the number of PascalString16s in the list. uint16_t pstring_get_number_of_pstring16s_in_list(PascalString16List *pstring16_list); // Returns a pointer to a PascalString16 of the passed index within the list. // If the given index is not valid or the list is empty, returns NULL. -PascalString16* pstring_get_pstring16_from_list(PascalString16List *pstring16_list, uint16_t index); +PascalString16 *pstring_get_pstring16_from_list(PascalString16List *pstring16_list, uint16_t index); void pstring_print_pstring(PascalString16 *pstring); diff --git a/src/fw/util/rand/rand.c b/src/fw/util/rand/rand.c index 8c897fc5b5..0df46f68ce 100644 --- a/src/fw/util/rand/rand.c +++ b/src/fw/util/rand/rand.c @@ -33,9 +33,9 @@ static tinymt32_t s_kernel_rand = {{0}}; static tinymt32_t *prv_get_seed_ptr(void) { switch (pebble_task_get_current()) { case PebbleTask_App: - return (tinymt32_t*)app_state_get_rand_ptr(); + return (tinymt32_t *)app_state_get_rand_ptr(); case PebbleTask_Worker: - return (tinymt32_t*)worker_state_get_rand_ptr(); + return (tinymt32_t *)worker_state_get_rand_ptr(); default: return &s_kernel_rand; } @@ -59,8 +59,8 @@ static void prv_seed(tinymt32_t *state, uint32_t seed) { } static int prv_next(tinymt32_t *state) { - if (state->mat1 == 0) { // Not initialized yet - prv_seed(state, 0x9a1431e6); // Just any ol' number + if (state->mat1 == 0) { // Not initialized yet + prv_seed(state, 0x9a1431e6); // Just any ol' number } return tinymt32_generate_uint32(state); } @@ -73,7 +73,7 @@ int rand(void) { return rand32() & 0x7FFFFFFF; } -int rand_r(unsigned int *seedp) { // Please don't use this +int rand_r(unsigned int *seedp) { // Please don't use this PBL_ASSERTN(seedp != NULL); tinymt32_t state = {{0}}; diff --git a/src/fw/util/reverse.h b/src/fw/util/reverse.h index 508b05f0de..632ed2e963 100644 --- a/src/fw/util/reverse.h +++ b/src/fw/util/reverse.h @@ -16,30 +16,31 @@ inline static uint16_t bswap16(uint16_t v) { #ifdef __arm__ inline static char reverse_byte(uint8_t input) { uint8_t result; - __asm__ ("rev %[result], %[input]\n\t" - "rbit %[result], %[result]" - : [result] "=r" (result) - : [input] "r" (input)); + __asm__( + "rev %[result], %[input]\n\t" + "rbit %[result], %[result]" + : [result] "=r"(result) + : [input] "r"(input)); return result; } #else static unsigned char BitReverseTable256[] = { - 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, - 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, - 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, - 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, - 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, - 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, - 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, - 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, - 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, - 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, - 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, - 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, - 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, - 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, - 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, - 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF + 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, + 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, + 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, + 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, + 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, + 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, + 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, + 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, + 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, + 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, + 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, + 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, + 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, + 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, + 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, + 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF }; inline static char reverse_byte(uint8_t byte) { diff --git a/src/fw/util/shared_circular_buffer.c b/src/fw/util/shared_circular_buffer.c index 899aaf70d2..ce3c49722b 100644 --- a/src/fw/util/shared_circular_buffer.c +++ b/src/fw/util/shared_circular_buffer.c @@ -9,12 +9,11 @@ #include - // ------------------------------------------------------------------------------------------------- // Returns the amount of data available for the given client -static uint32_t prv_get_data_length(const SharedCircularBuffer* buffer, SharedCircularBufferClient *client) { - - uint32_t len; +static uint32_t prv_get_data_length(const SharedCircularBuffer *buffer, + SharedCircularBufferClient *client) { + uint32_t len; // The end_index is the index of the next byte to go into the buffer // The read_index is the index of the first byte @@ -29,11 +28,11 @@ static uint32_t prv_get_data_length(const SharedCircularBuffer* buffer, SharedCi return len; } - // ------------------------------------------------------------------------------------------------- // Returns max amount of data available among all clients // On exit, *max_client will contain the client with the most amount of data available -static uint32_t prv_get_max_data_length(const SharedCircularBuffer* buffer, SharedCircularBufferClient **max_client) { +static uint32_t prv_get_max_data_length(const SharedCircularBuffer *buffer, + SharedCircularBufferClient **max_client) { ListNode *iter = buffer->clients; if (!iter) { *max_client = NULL; @@ -54,36 +53,35 @@ static uint32_t prv_get_max_data_length(const SharedCircularBuffer* buffer, Shar return max_data; } - // ------------------------------------------------------------------------------------------------- -void shared_circular_buffer_init(SharedCircularBuffer* buffer, uint8_t* storage, uint16_t storage_size) { +void shared_circular_buffer_init(SharedCircularBuffer *buffer, uint8_t *storage, + uint16_t storage_size) { buffer->buffer = storage; buffer->buffer_size = storage_size; buffer->clients = NULL; buffer->write_index = 0; } - // ------------------------------------------------------------------------------------------------- -bool shared_circular_buffer_add_client(SharedCircularBuffer* buffer, SharedCircularBufferClient *client) { +bool shared_circular_buffer_add_client(SharedCircularBuffer *buffer, + SharedCircularBufferClient *client) { PBL_ASSERTN(!list_contains(buffer->clients, &client->list_node)); buffer->clients = list_prepend(buffer->clients, &client->list_node); client->read_index = buffer->write_index; return true; } - // ------------------------------------------------------------------------------------------------- -void shared_circular_buffer_remove_client(SharedCircularBuffer* buffer, SharedCircularBufferClient *client) { +void shared_circular_buffer_remove_client(SharedCircularBuffer *buffer, + SharedCircularBufferClient *client) { PBL_ASSERTN(list_contains(buffer->clients, &client->list_node)); list_remove(&client->list_node, &buffer->clients, NULL); } - // ------------------------------------------------------------------------------------------------- -bool shared_circular_buffer_write_reserve(SharedCircularBuffer* buffer, uint16_t length, - bool advance_slackers, uint8_t** seg1, uint16_t* seg1_length, uint8_t** seg2) { - +bool shared_circular_buffer_write_reserve(SharedCircularBuffer *buffer, uint16_t length, + bool advance_slackers, uint8_t **seg1, + uint16_t *seg1_length, uint8_t **seg2) { // If no clients, no need to write if (!buffer->clients) { PBL_LOG_WRN("no readers"); @@ -124,17 +122,14 @@ bool shared_circular_buffer_write_reserve(SharedCircularBuffer* buffer, uint16_t return true; } - // ------------------------------------------------------------------------------------------------- -void shared_circular_buffer_write_commit(SharedCircularBuffer* buffer, uint16_t length) { +void shared_circular_buffer_write_commit(SharedCircularBuffer *buffer, uint16_t length) { buffer->write_index = (buffer->write_index + length) % buffer->buffer_size; } - // ------------------------------------------------------------------------------------------------- -bool shared_circular_buffer_write(SharedCircularBuffer* buffer, const uint8_t* data, uint16_t length, - bool advance_slackers) { - +bool shared_circular_buffer_write(SharedCircularBuffer *buffer, const uint8_t *data, + uint16_t length, bool advance_slackers) { uint8_t *seg1, *seg2; uint16_t seg1_length; if (!shared_circular_buffer_write_reserve(buffer, length, advance_slackers, &seg1, &seg1_length, @@ -151,11 +146,10 @@ bool shared_circular_buffer_write(SharedCircularBuffer* buffer, const uint8_t* d return true; } - // --------------------------------------------------------------------------------------------- -bool shared_circular_buffer_read(const SharedCircularBuffer* buffer, +bool shared_circular_buffer_read(const SharedCircularBuffer *buffer, SharedCircularBufferClient *client, uint16_t length, - const uint8_t** data_out, uint16_t* length_out) { + const uint8_t **data_out, uint16_t *length_out) { PBL_ASSERTN(list_contains(buffer->clients, &client->list_node)); uint32_t data_length = prv_get_data_length(buffer, client); @@ -171,9 +165,9 @@ bool shared_circular_buffer_read(const SharedCircularBuffer* buffer, return true; } - // ------------------------------------------------------------------------------------------------- -bool shared_circular_buffer_consume(SharedCircularBuffer* buffer, SharedCircularBufferClient *client, uint16_t length) { +bool shared_circular_buffer_consume(SharedCircularBuffer *buffer, + SharedCircularBufferClient *client, uint16_t length) { PBL_ASSERTN(list_contains(buffer->clients, &client->list_node)); uint32_t data_length = prv_get_data_length(buffer, client); if (data_length < length) { @@ -184,27 +178,24 @@ bool shared_circular_buffer_consume(SharedCircularBuffer* buffer, SharedCircular return true; } - // ------------------------------------------------------------------------------------------------- -uint16_t shared_circular_buffer_get_write_space_remaining(const SharedCircularBuffer* buffer) { +uint16_t shared_circular_buffer_get_write_space_remaining(const SharedCircularBuffer *buffer) { SharedCircularBufferClient *slacker; uint32_t max_data = prv_get_max_data_length(buffer, &slacker); - return buffer->buffer_size - 1 - max_data; + return buffer->buffer_size - 1 - max_data; } - // ------------------------------------------------------------------------------------------------- -uint16_t shared_circular_buffer_get_read_space_remaining(const SharedCircularBuffer* buffer, - SharedCircularBufferClient *client) { +uint16_t shared_circular_buffer_get_read_space_remaining(const SharedCircularBuffer *buffer, + SharedCircularBufferClient *client) { PBL_ASSERTN(list_contains(buffer->clients, &client->list_node)); return prv_get_data_length(buffer, client); } - // ------------------------------------------------------------------------------------------------- -bool shared_circular_buffer_read_consume(SharedCircularBuffer *buffer, SharedCircularBufferClient *client, - uint16_t length, uint8_t *data, uint16_t *length_out) { - +bool shared_circular_buffer_read_consume(SharedCircularBuffer *buffer, + SharedCircularBufferClient *client, uint16_t length, + uint8_t *data, uint16_t *length_out) { uint16_t data_length = prv_get_data_length(buffer, client); uint16_t bytes_left = MIN(length, data_length); @@ -224,28 +215,25 @@ bool shared_circular_buffer_read_consume(SharedCircularBuffer *buffer, SharedCir return (*length_out == length); } - // ------------------------------------------------------------------------------------------------- -void shared_circular_buffer_add_subsampled_client( - SharedCircularBuffer *buffer, SubsampledSharedCircularBufferClient *client, - uint32_t subsample_numerator, uint32_t subsample_denominator) { - PBL_ASSERTN(shared_circular_buffer_add_client(buffer, - &client->buffer_client)); - subsampled_shared_circular_buffer_client_set_ratio( - client, subsample_numerator, subsample_denominator); +void shared_circular_buffer_add_subsampled_client(SharedCircularBuffer *buffer, + SubsampledSharedCircularBufferClient *client, + uint32_t subsample_numerator, + uint32_t subsample_denominator) { + PBL_ASSERTN(shared_circular_buffer_add_client(buffer, &client->buffer_client)); + subsampled_shared_circular_buffer_client_set_ratio(client, subsample_numerator, + subsample_denominator); } // ------------------------------------------------------------------------------------------------- -void shared_circular_buffer_remove_subsampled_client( - SharedCircularBuffer *buffer, - SubsampledSharedCircularBufferClient *client) { +void shared_circular_buffer_remove_subsampled_client(SharedCircularBuffer *buffer, + SubsampledSharedCircularBufferClient *client) { shared_circular_buffer_remove_client(buffer, &client->buffer_client); } // ------------------------------------------------------------------------------------------------- void subsampled_shared_circular_buffer_client_set_ratio( - SubsampledSharedCircularBufferClient *client, - uint32_t numerator, uint32_t denominator) { + SubsampledSharedCircularBufferClient *client, uint32_t numerator, uint32_t denominator) { PBL_ASSERTN(numerator > 0 && denominator >= numerator); if (client->numerator != numerator || client->denominator != denominator) { // The subsampling algorithm does not need the subsampling ratio to @@ -259,20 +247,17 @@ void subsampled_shared_circular_buffer_client_set_ratio( } // ------------------------------------------------------------------------------------------------- -size_t shared_circular_buffer_read_subsampled( - SharedCircularBuffer* buffer, - SubsampledSharedCircularBufferClient *client, - size_t item_size, void *data, uint16_t num_items) { - uint16_t bytes_available = prv_get_data_length( - buffer, &client->buffer_client); +size_t shared_circular_buffer_read_subsampled(SharedCircularBuffer *buffer, + SubsampledSharedCircularBufferClient *client, + size_t item_size, void *data, uint16_t num_items) { + uint16_t bytes_available = prv_get_data_length(buffer, &client->buffer_client); // Optimized case when no subsampling if (client->numerator == client->denominator) { num_items = MIN(num_items, bytes_available / item_size); uint16_t bytes_out; - shared_circular_buffer_read_consume( - buffer, &client->buffer_client, num_items * item_size, - (uint8_t *)data, &bytes_out); + shared_circular_buffer_read_consume(buffer, &client->buffer_client, num_items * item_size, + (uint8_t *)data, &bytes_out); PBL_ASSERTN(bytes_out == num_items * item_size); return num_items; } @@ -289,15 +274,13 @@ size_t shared_circular_buffer_read_subsampled( if (client->subsample_state >= client->denominator) { client->subsample_state %= client->denominator; uint16_t bytes_out; - shared_circular_buffer_read_consume(buffer, &client->buffer_client, - item_size, (uint8_t *)out_buf, - &bytes_out); + shared_circular_buffer_read_consume(buffer, &client->buffer_client, item_size, + (uint8_t *)out_buf, &bytes_out); PBL_ASSERTN(bytes_out == item_size); out_buf += item_size; items_read++; } else { - PBL_ASSERTN(shared_circular_buffer_consume(buffer, &client->buffer_client, - item_size)); + PBL_ASSERTN(shared_circular_buffer_consume(buffer, &client->buffer_client, item_size)); } } return items_read; diff --git a/src/fw/util/shared_circular_buffer.h b/src/fw/util/shared_circular_buffer.h index c3d3407390..6cfa8fce7c 100644 --- a/src/fw/util/shared_circular_buffer.h +++ b/src/fw/util/shared_circular_buffer.h @@ -10,39 +10,42 @@ #include #include - -//! This is a CircularBuffer that supports one writer but multiple read clients. Data added to the buffer is kept -//! available for reading until every client has read it. Each client has their own read index that gets updated as -//! they consume data. If desired, the read index for clients that "fall behind" can be force advanced to make room -//! for new write data. +//! This is a CircularBuffer that supports one writer but multiple read clients. Data added to the +//! buffer is kept available for reading until every client has read it. Each client has their own +//! read index that gets updated as they consume data. If desired, the read index for clients that +//! "fall behind" can be force advanced to make room for new write data. typedef struct PACKED SharedCircularBufferClient { ListNode list_node; - uint16_t read_index; // Index of next available byte in the buffer for this client + uint16_t read_index; // Index of next available byte in the buffer for this client } SharedCircularBufferClient; typedef struct SharedCircularBuffer { uint8_t *buffer; uint16_t buffer_size; - uint16_t write_index; //! where next byte will be written, (read_index == write_index) is an empty queue - ListNode *clients; //! linked list of clients + uint16_t write_index; //! where next byte will be written, (read_index == write_index) is an + //! empty queue + ListNode *clients; //! linked list of clients } SharedCircularBuffer; //! Init the buffer //! @param buffer The buffer to initialize //! @param storage storage for the data //! @param storage_size Size of the storage buffer -void shared_circular_buffer_init(SharedCircularBuffer* buffer, uint8_t* storage, uint16_t storage_size); +void shared_circular_buffer_init(SharedCircularBuffer *buffer, uint8_t *storage, + uint16_t storage_size); //! Add data to the buffer //! @param buffer The buffer to write to //! @param data The data to write //! @param length Number of bytes to write -//! @param advance_slackers If true, automatically advance the read index, starting from the client farthest behind, -//! until there is room for the new data. If the length is bigger than the entire buffer, then false is returned. +//! @param advance_slackers If true, automatically advance the read index, starting from the client +//! farthest behind, +//! until there is room for the new data. If the length is bigger than the entire buffer, then +//! false is returned. //! @return false if there's insufficient space. -bool shared_circular_buffer_write(SharedCircularBuffer* buffer, const uint8_t* data, uint16_t length, - bool advance_slackers); +bool shared_circular_buffer_write(SharedCircularBuffer *buffer, const uint8_t *data, + uint16_t length, bool advance_slackers); //! Reserve a contiguous run of write space without copying any data in. Fill the returned //! segment(s) directly, then call shared_circular_buffer_write_commit() with the same length. @@ -54,34 +57,41 @@ bool shared_circular_buffer_write(SharedCircularBuffer* buffer, const uint8_t* d //! @param[out] seg1_length Length of the first segment (equals length when there's no wrap) //! @param[out] seg2 Pointer to the second segment, only valid when *seg1_length < length //! @return false if there's insufficient space. -bool shared_circular_buffer_write_reserve(SharedCircularBuffer* buffer, uint16_t length, - bool advance_slackers, uint8_t** seg1, uint16_t* seg1_length, uint8_t** seg2); +bool shared_circular_buffer_write_reserve(SharedCircularBuffer *buffer, uint16_t length, + bool advance_slackers, uint8_t **seg1, + uint16_t *seg1_length, uint8_t **seg2); //! Commit a reservation previously made with shared_circular_buffer_write_reserve(), advancing //! the write index by length. The length must match the reserved length. -void shared_circular_buffer_write_commit(SharedCircularBuffer* buffer, uint16_t length); +void shared_circular_buffer_write_commit(SharedCircularBuffer *buffer, uint16_t length); //! Add a read client //! @param buffer The buffer to add the client to -//! @param client Pointer to a client structure. This structure must be allocated by the caller and can not +//! @param client Pointer to a client structure. This structure must be allocated by the caller and +//! can not //! be freed until the client is removed //! @return true if successfully added -bool shared_circular_buffer_add_client(SharedCircularBuffer* buffer, SharedCircularBufferClient *client); +bool shared_circular_buffer_add_client(SharedCircularBuffer *buffer, + SharedCircularBufferClient *client); //! Remove a read client //! @param buffer The buffer to remove the client from -//! @param client Pointer to a client structure. This must be the same pointer passed to circular_buffer_add_client -void shared_circular_buffer_remove_client(SharedCircularBuffer* buffer, SharedCircularBufferClient *client); +//! @param client Pointer to a client structure. This must be the same pointer passed to +//! circular_buffer_add_client +void shared_circular_buffer_remove_client(SharedCircularBuffer *buffer, + SharedCircularBufferClient *client); //! Read a contiguous chunk of memory from the circular buffer. The data remains on the buffer until //! circular_buffer_consume is called. //! -//! If the circular buffer wraps in the middle of the requested data, this function call will return true but will -//! provide fewer bytes that requested. When this happens, the length_out parameter will be set to a value smaller -//! than length. A second read call can be made with the remaining smaller length to retrieve the rest. +//! If the circular buffer wraps in the middle of the requested data, this function call will return +//! true but will provide fewer bytes that requested. When this happens, the length_out parameter +//! will be set to a value smaller than length. A second read call can be made with the remaining +//! smaller length to retrieve the rest. //! -//! The reason this read doesn't consume is to avoid having to copy out the data. The data_out pointer should be -//! stable until you explicitly ask for it to be consumed with circular_buffer_consume. +//! The reason this read doesn't consume is to avoid having to copy out the data. The data_out +//! pointer should be stable until you explicitly ask for it to be consumed with +//! circular_buffer_consume. //! //! @param buffer The buffer to read from //! @param client pointer to the client struct originally passed to circular_buffer_add_client @@ -89,26 +99,27 @@ void shared_circular_buffer_remove_client(SharedCircularBuffer* buffer, SharedCi //! @param[out] data_out The bytes that were read. //! @param[out] length_out How many bytes were read. //! @return false if there's less than length bytes in the buffer. -bool shared_circular_buffer_read(const SharedCircularBuffer* buffer, SharedCircularBufferClient *client, - uint16_t length, const uint8_t** data_out, uint16_t* length_out); +bool shared_circular_buffer_read(const SharedCircularBuffer *buffer, + SharedCircularBufferClient *client, uint16_t length, + const uint8_t **data_out, uint16_t *length_out); //! Removes length bytes of the oldest data from the buffer. //! @param buffer The buffer to operate on //! @param client Pointer to a client structure originally passed to circular_buffer_add_client //! @param length The number of bytes to consume //! @return True if success -bool shared_circular_buffer_consume(SharedCircularBuffer* buffer, SharedCircularBufferClient *client, uint16_t length); +bool shared_circular_buffer_consume(SharedCircularBuffer *buffer, + SharedCircularBufferClient *client, uint16_t length); //! @param buffer The buffer to operate on //! @return The number of bytes we can write before circular_buffer_write will return false. -uint16_t shared_circular_buffer_get_write_space_remaining(const SharedCircularBuffer* buffer); +uint16_t shared_circular_buffer_get_write_space_remaining(const SharedCircularBuffer *buffer); //! @param buffer The buffer to operate on //! @param client Pointer to a client structure originally passed to circular_buffer_add_client //! @return The number of bytes we can read before circular_buffer_read will return false. -uint16_t shared_circular_buffer_get_read_space_remaining(const SharedCircularBuffer* buffer, - SharedCircularBufferClient *client); - +uint16_t shared_circular_buffer_get_read_space_remaining(const SharedCircularBuffer *buffer, + SharedCircularBufferClient *client); //! Read and consume bytes. //! @@ -118,9 +129,9 @@ uint16_t shared_circular_buffer_get_read_space_remaining(const SharedCircularBuf //! @param data Buffer to copy the data into //! @param[out] length_out How many bytes were read into the caller's buffer //! @return true if we returned length bytes, false if we returned less. -bool shared_circular_buffer_read_consume(SharedCircularBuffer *buffer, SharedCircularBufferClient *client, - uint16_t length, uint8_t *data, uint16_t *length_out); - +bool shared_circular_buffer_read_consume(SharedCircularBuffer *buffer, + SharedCircularBufferClient *client, uint16_t length, + uint8_t *data, uint16_t *length_out); typedef struct SubsampledSharedCircularBufferClient { SharedCircularBufferClient buffer_client; @@ -142,16 +153,17 @@ typedef struct SubsampledSharedCircularBufferClient { //! subsampling ratio. This value must be equal to or greater than the //! subsampling numerator. //! @sa subsampled_shared_circular_buffer_client_set_ratio -void shared_circular_buffer_add_subsampled_client( - SharedCircularBuffer *buffer, SubsampledSharedCircularBufferClient *client, - uint32_t subsample_numerator, uint32_t subsample_denominator); +void shared_circular_buffer_add_subsampled_client(SharedCircularBuffer *buffer, + SubsampledSharedCircularBufferClient *client, + uint32_t subsample_numerator, + uint32_t subsample_denominator); //! Remove a subsampling read client //! @param buffer The buffer to remove the client from //! @param client Pointer to a client structure. This must be the same pointer //! passed to shared_circular_buffer_add_subsampled_client -void shared_circular_buffer_remove_subsampled_client( - SharedCircularBuffer *buffer, SubsampledSharedCircularBufferClient *client); +void shared_circular_buffer_remove_subsampled_client(SharedCircularBuffer *buffer, + SubsampledSharedCircularBufferClient *client); //! Change the subsampling ratio of a subsampling shared circular buffer client. //! @@ -166,8 +178,7 @@ void shared_circular_buffer_remove_subsampled_client( //! @note Specifying a subsampling ratio with a numerator greater than 1 will //! introduce jitter to the subsampled data stream. void subsampled_shared_circular_buffer_client_set_ratio( - SubsampledSharedCircularBufferClient *client, - uint32_t numerator, uint32_t denominator); + SubsampledSharedCircularBufferClient *client, uint32_t numerator, uint32_t denominator); //! Read and consume items with subsampling. //! @@ -181,7 +192,6 @@ void subsampled_shared_circular_buffer_client_set_ratio( //! subsampling. //! @return The number of items actually read into the data buffer after //! subsampling. This may be less than num_items. -size_t shared_circular_buffer_read_subsampled( - SharedCircularBuffer* buffer, - SubsampledSharedCircularBufferClient *client, - size_t item_size, void *data, uint16_t num_items); +size_t shared_circular_buffer_read_subsampled(SharedCircularBuffer *buffer, + SubsampledSharedCircularBufferClient *client, + size_t item_size, void *data, uint16_t num_items); diff --git a/src/fw/util/stats.c b/src/fw/util/stats.c index f3e43d318d..9f5a6820ce 100644 --- a/src/fw/util/stats.c +++ b/src/fw/util/stats.c @@ -140,8 +140,8 @@ void stats_calculate_basic(StatsBasicOp op, const int32_t *data, size_t num_data basic_out[out_index++] = consecutive_first; } if (op & StatsBasicOp_Median) { - basic_out[out_index++] = prv_calculate_median(data, num_data, min, max, num_values, filter, - context); + basic_out[out_index++] = + prv_calculate_median(data, num_data, min, max, num_values, filter, context); } } @@ -190,9 +190,9 @@ int32_t stats_calculate_weighted_median(const int32_t *vals, const int32_t *weig // Copy the values and sort them in ascending order for (size_t i = 0; i < num_data; i++) { - values[i] = (WeightedValue) { - .value = vals[i], - .weight_x100 = weights_x100[i], + values[i] = (WeightedValue){ + .value = vals[i], + .weight_x100 = weights_x100[i], }; } sort_bubble(values, num_data, sizeof(*values), prv_cmp_weighted_value); diff --git a/src/fw/util/stats.h b/src/fw/util/stats.h index be805c96db..fda54be272 100644 --- a/src/fw/util/stats.h +++ b/src/fw/util/stats.h @@ -17,17 +17,17 @@ typedef bool (*StatsBasicFilter)(int index, int32_t value, void *context); //! StatsBasicOp is a bitfield that specifies which operations \ref stats_calculate_basic should //! perform. The ops will operate only on the filtered values when a filter is present. typedef enum { - StatsBasicOp_Sum = (1 << 0), //!< Calculate the sum - StatsBasicOp_Average = (1 << 1), //!< Calculate the average + StatsBasicOp_Sum = (1 << 0), //!< Calculate the sum + StatsBasicOp_Average = (1 << 1), //!< Calculate the average //! Find the minimum value. If there is no data, or if no values match the filter, the minimum //! will default to INT32_MAX. - StatsBasicOp_Min = (1 << 2), + StatsBasicOp_Min = (1 << 2), //! Find the maximum value. If there is no data, or if no values match the filter, the maximum //! will default to INT32_MIN. - StatsBasicOp_Max = (1 << 3), + StatsBasicOp_Max = (1 << 3), //! Count the number of filtered values included in calculation. //! Equivalent to the number of data points when no filter is applied. - StatsBasicOp_Count = (1 << 4), + StatsBasicOp_Count = (1 << 4), //! Find the maximum streak of consecutive filtered values included in calculation. //! Equivalent to the number of data points when no filter is applied. StatsBasicOp_Consecutive = (1 << 5), @@ -53,6 +53,5 @@ typedef enum { void stats_calculate_basic(StatsBasicOp op, const int32_t *data, size_t num_data, StatsBasicFilter filter, void *context, int32_t *basic_out); - int32_t stats_calculate_weighted_median(const int32_t *vals, const int32_t *weights_x100, size_t num_data); diff --git a/src/fw/util/stringlist.h b/src/fw/util/stringlist.h index 487d0c6f4a..558c74c919 100644 --- a/src/fw/util/stringlist.h +++ b/src/fw/util/stringlist.h @@ -14,7 +14,7 @@ //! Calculate the maximum string list size given the number of values and their max length #define StringListSize(num_values, max_value_size) \ - (sizeof(StringList) + ((num_values) * (max_value_size))) + (sizeof(StringList) + ((num_values) * (max_value_size))) typedef struct { uint16_t serialized_byte_length; diff --git a/src/fw/util/time/mktime.c b/src/fw/util/time/mktime.c index 4b5d59a7d9..a1adeab6c3 100644 --- a/src/fw/util/time/mktime.c +++ b/src/fw/util/time/mktime.c @@ -38,18 +38,17 @@ /* * ChkAdd evaluates to TRUE if dest = src1 + src2 has overflowed */ -#define ChkAdd(dest, src1, src2) ( ((src1 >= 0L) && (src2 >= 0L) \ - && (dest < 0L)) || ((src1 < 0L) && (src2 < 0L) && (dest >= 0L)) ) +#define ChkAdd(dest, src1, src2) \ + (((src1 >= 0L) && (src2 >= 0L) && (dest < 0L)) || ((src1 < 0L) && (src2 < 0L) && (dest >= 0L))) /* * ChkMul evaluates to TRUE if dest = src1 * src2 has overflowed */ -#define ChkMul(dest, src1, src2) ( src1 ? (dest/src1 != src2) : 0 ) - -#define _BASE_YEAR 70L -#define _LEAP_YEAR_ADJUST 17L // leap years between 1900 and 1970 -#define _MAX_YEAR 138L +#define ChkMul(dest, src1, src2) (src1 ? (dest / src1 != src2) : 0) +#define _BASE_YEAR 70L +#define _LEAP_YEAR_ADJUST 17L // leap years between 1900 and 1970 +#define _MAX_YEAR 138L time_t mktime(struct tm *tb) { const int16_t _days[] = {-1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364}; @@ -62,14 +61,12 @@ time_t mktime(struct tm *tb) { if (((tmptm1 = tb->tm_year) < _BASE_YEAR - 1) || (tmptm1 > _MAX_YEAR + 1)) goto err_mktime; - /* * Adjust month value so it is in the range 0 - 11. This is because * we don't know how many days are in months 12, 13, 14, etc. */ if ((tb->tm_mon < 0) || (tb->tm_mon > 11)) { - /* * no danger of overflow because the range check above. */ @@ -105,8 +102,7 @@ time_t mktime(struct tm *tb) { * each elapsed leap year. no danger of overflow because of the range * check (above) on tmptm1. */ - tmptm3 = (tmptm1 - _BASE_YEAR) * 365L + ((tmptm1 - 1L) >> 2) - - _LEAP_YEAR_ADJUST; + tmptm3 = (tmptm1 - _BASE_YEAR) * 365L + ((tmptm1 - 1L) >> 2) - _LEAP_YEAR_ADJUST; /* * elapsed days to current month (still no possible overflow) @@ -116,7 +112,7 @@ time_t mktime(struct tm *tb) { /* * elapsed days to current date. overflow is now possible. */ - tmptm1 = tmptm3 + (tmptm2 = (int32_t) (tb->tm_mday)); + tmptm1 = tmptm3 + (tmptm2 = (int32_t)(tb->tm_mday)); if (ChkAdd(tmptm1, tmptm3, tmptm2)) goto err_mktime; @@ -129,7 +125,7 @@ time_t mktime(struct tm *tb) { if (ChkMul(tmptm2, tmptm1, 24L)) goto err_mktime; - tmptm1 = tmptm2 + (tmptm3 = (int32_t) tb->tm_hour); + tmptm1 = tmptm2 + (tmptm3 = (int32_t)tb->tm_hour); if (ChkAdd(tmptm1, tmptm2, tmptm3)) goto err_mktime; @@ -143,7 +139,7 @@ time_t mktime(struct tm *tb) { if (ChkMul(tmptm2, tmptm1, 60L)) goto err_mktime; - tmptm1 = tmptm2 + (tmptm3 = (int32_t) tb->tm_min); + tmptm1 = tmptm2 + (tmptm3 = (int32_t)tb->tm_min); if (ChkAdd(tmptm1, tmptm2, tmptm3)) goto err_mktime; @@ -157,16 +153,16 @@ time_t mktime(struct tm *tb) { if (ChkMul(tmptm2, tmptm1, 60L)) goto err_mktime; - tmptm1 = tmptm2 + (tmptm3 = (int32_t) tb->tm_sec); + tmptm1 = tmptm2 + (tmptm3 = (int32_t)tb->tm_sec); if (ChkAdd(tmptm1, tmptm2, tmptm3)) goto err_mktime; /***** HERE: tmptm1 holds number of elapsed seconds *****/ - /* - * Adjust for timezone. No need to check for overflow since - * localtime() will check its arg value - */ + /* + * Adjust for timezone. No need to check for overflow since + * localtime() will check its arg value + */ tmptm1 -= tb->tm_gmtoff; @@ -175,19 +171,18 @@ time_t mktime(struct tm *tb) { * If localtime returns NULL, return an error. */ struct tm tm; - if ((tbtemp = gmtime_r((time_t*)&tmptm1, &tm)) == NULL) + if ((tbtemp = gmtime_r((time_t *)&tmptm1, &tm)) == NULL) goto err_mktime; - /***** HERE: tmptm1 holds number of elapsed seconds, adjusted *****/ /***** for local time if requested *****/ *tb = *tbtemp; - return (time_t) tmptm1; + return (time_t)tmptm1; - err_mktime: +err_mktime: /* * All errors come to here */ - return (time_t) (-1); + return (time_t)(-1); } diff --git a/src/fw/util/time/time.c b/src/fw/util/time/time.c index 43ef44ba03..f8b1980705 100644 --- a/src/fw/util/time/time.c +++ b/src/fw/util/time/time.c @@ -9,21 +9,18 @@ #include // timezone abbreviation -static char s_timezone_abbr[TZ_LEN] = { 0 }; // longest timezone abbreviation is 5 char + null +static char s_timezone_abbr[TZ_LEN] = {0}; // longest timezone abbreviation is 5 char + null static int32_t s_timezone_gmtoffset = 0; static int32_t s_dst_adjust = SECONDS_PER_HOUR; static time_t s_dst_start = 0; static time_t s_dst_end = 0; static const uint8_t s_mon_lengths[2][MONTHS_PER_YEAR] = { - {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, - {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} + {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, + {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} }; -static const uint16_t s_year_lengths[2] = { - 365, - 366 -}; +static const uint16_t s_year_lengths[2] = {365, 366}; int32_t time_get_gmtoffset(void) { return s_timezone_gmtoffset; @@ -102,7 +99,7 @@ void time_get_timezone_abbr(char *out_buf, time_t utc_time) { } // converts time_t to struct tm for localtime and gmtime -struct tm *time_to_tm(const time_t * tim_p, struct tm *res, bool utc_mode) { +struct tm *time_to_tm(const time_t *tim_p, struct tm *res, bool utc_mode) { time_t local_time; time_t utc_time = *tim_p; if (utc_mode) { @@ -131,10 +128,10 @@ struct tm *time_to_tm(const time_t * tim_p, struct tm *res, bool utc_mode) { } /* compute hour, min, and sec */ - res->tm_hour = (int) (rem / SECONDS_PER_HOUR); + res->tm_hour = (int)(rem / SECONDS_PER_HOUR); rem %= SECONDS_PER_HOUR; - res->tm_min = (int) (rem / SECONDS_PER_MINUTE); - res->tm_sec = (int) (rem % SECONDS_PER_MINUTE); + res->tm_min = (int)(rem / SECONDS_PER_MINUTE); + res->tm_sec = (int)(rem % SECONDS_PER_MINUTE); /* compute day of week */ if ((res->tm_wday = ((EPOCH_WDAY + days) % DAYS_PER_WEEK)) < 0) { @@ -180,8 +177,8 @@ struct tm *localtime_r(const time_t *timep, struct tm *result) { return time_to_tm(timep, result, false); } -void time_util_split_seconds_into_parts(uint32_t seconds, - uint32_t *day_part, uint32_t *hour_part, uint32_t *minute_part, uint32_t *second_part) { +void time_util_split_seconds_into_parts(uint32_t seconds, uint32_t *day_part, uint32_t *hour_part, + uint32_t *minute_part, uint32_t *second_part) { *day_part = seconds / SECONDS_PER_DAY; seconds -= *day_part * SECONDS_PER_DAY; @@ -239,17 +236,17 @@ bool time_util_range_spans_day(time_t start, time_t end, time_t start_of_day) { time_t time_utc_to_local_using_offset(time_t utc_time, int16_t utc_offset_min) { if (utc_offset_min < 0) { - return utc_time - (time_t) ABS(utc_offset_min) * SECONDS_PER_MINUTE; + return utc_time - (time_t)ABS(utc_offset_min) * SECONDS_PER_MINUTE; } else { - return utc_time + (time_t) utc_offset_min * SECONDS_PER_MINUTE; + return utc_time + (time_t)utc_offset_min * SECONDS_PER_MINUTE; } } time_t time_local_to_utc_using_offset(time_t local_time, int16_t utc_offset_min) { if (utc_offset_min < 0) { - return local_time + (time_t) ABS(utc_offset_min) * SECONDS_PER_MINUTE; + return local_time + (time_t)ABS(utc_offset_min) * SECONDS_PER_MINUTE; } else { - return local_time - (time_t) utc_offset_min * SECONDS_PER_MINUTE; + return local_time - (time_t)utc_offset_min * SECONDS_PER_MINUTE; } } diff --git a/src/fw/util/time/time.h b/src/fw/util/time/time.h index b43a019e87..8dff0625c4 100644 --- a/src/fw/util/time/time.h +++ b/src/fw/util/time/time.h @@ -5,13 +5,13 @@ #include #include -#include // time_t and size_t +#include // time_t and size_t -#define TM_YEAR_ORIGIN 1900 -#define EPOCH_YEAR 1970 -#define EPOCH_WDAY 4 +#define TM_YEAR_ORIGIN 1900 +#define EPOCH_YEAR 1970 +#define EPOCH_WDAY 4 -#define DAYS_PER_WEEK 7 +#define DAYS_PER_WEEK 7 #define MONTHS_PER_YEAR 12 #define MS_PER_SECOND (1000) @@ -44,7 +44,6 @@ #define DSTID_BRAZIL 6 #define DSTID_LORDHOWE 20 - //! @file time.h //! @addtogroup StandardC Standard C @@ -59,22 +58,21 @@ //! https://sourceware.org/newlib/libc.html#Timefns //! @{ - //! structure containing broken-down time for expressing calendar time //! (ie. Year, Month, Day of Month, Hour of Day) and timezone information struct tm { - int tm_sec; /*!< Seconds. [0-60] (1 leap second) */ - int tm_min; /*!< Minutes. [0-59] */ - int tm_hour; /*!< Hours. [0-23] */ - int tm_mday; /*!< Day. [1-31] */ - int tm_mon; /*!< Month. [0-11] */ - int tm_year; /*!< Years since 1900 */ - int tm_wday; /*!< Day of week. [0-6] */ - int tm_yday; /*!< Days in year.[0-365] */ - int tm_isdst; /*!< DST. [-1/0/1] */ - - int tm_gmtoff; /*!< Total seconds east of UTC, DST included. tm_isdst is an indicator only -- - never add it to this value. */ + int tm_sec; /*!< Seconds. [0-60] (1 leap second) */ + int tm_min; /*!< Minutes. [0-59] */ + int tm_hour; /*!< Hours. [0-23] */ + int tm_mday; /*!< Day. [1-31] */ + int tm_mon; /*!< Month. [0-11] */ + int tm_year; /*!< Years since 1900 */ + int tm_wday; /*!< Day of week. [0-6] */ + int tm_yday; /*!< Days in year.[0-365] */ + int tm_isdst; /*!< DST. [-1/0/1] */ + + int tm_gmtoff; /*!< Total seconds east of UTC, DST included. tm_isdst is an indicator only -- + never add it to this value. */ char tm_zone[TZ_LEN]; /*!< Timezone abbreviation */ }; @@ -99,7 +97,6 @@ uint16_t time_ms(time_t *tloc, uint16_t *out_ms); //! @} // end addtogroup StandardTime //! @} // end addtogroup StandardC - // The below standard c time functions are documented for the SDK // by their applib pbl_override wrappers in pbl_std.h @@ -117,12 +114,12 @@ struct tm *localtime_r(const time_t *timep, struct tm *result); //! Minimal struct to store timezone info in RTC registers typedef struct TimezoneInfo { - char tm_zone[TZ_LEN - 1]; //!< Up to 5 character (no null terminator) timezone abbreviation - uint8_t dst_id; //!< Daylight savings time zone index - int16_t timezone_id; //!< Olson index of timezone - int32_t tm_gmtoff; //!< GMT time offset - time_t dst_start; //!< timestamp of start of daylight savings period (0 if none) - time_t dst_end; //!< timestamp of end of daylight savings period (0 if none) + char tm_zone[TZ_LEN - 1]; //!< Up to 5 character (no null terminator) timezone abbreviation + uint8_t dst_id; //!< Daylight savings time zone index + int16_t timezone_id; //!< Olson index of timezone + int32_t tm_gmtoff; //!< GMT time offset + time_t dst_start; //!< timestamp of start of daylight savings period (0 if none) + time_t dst_end; //!< timestamp of end of daylight savings period (0 if none) } TimezoneInfo; //! Provides the timezone abbreviation string for the given time. Uses the utc_time provided @@ -158,8 +155,8 @@ time_t time_utc_to_local(time_t utc_time); //! Convert local time to UTC time time_t time_local_to_utc(time_t local_time); -void time_util_split_seconds_into_parts(uint32_t seconds, uint32_t *day_part, - uint32_t *hour_part, uint32_t *minute_part, uint32_t *second_part); +void time_util_split_seconds_into_parts(uint32_t seconds, uint32_t *day_part, uint32_t *hour_part, + uint32_t *minute_part, uint32_t *second_part); int time_util_get_num_hours(int hours, bool is24h); diff --git a/src/fw/util/units.h b/src/fw/util/units.h index bc64e0ed2b..a042924903 100644 --- a/src/fw/util/units.h +++ b/src/fw/util/units.h @@ -5,9 +5,9 @@ #define MHZ_TO_HZ(hz) (((uint32_t)(hz)) * 1000000) -#define KiBYTES(k) ((k) * 1024) // Kibibytes to Bytes -#define MiBYTES(m) ((m) * 1024 * 1024) // Mebibytes to Bytes -#define EiBYTES(e) ((e) * 1024 * 1024 * 1024 * 1024 * 1024 * 1024) // Exbibytes to Bytes +#define KiBYTES(k) ((k) * 1024) // Kibibytes to Bytes +#define MiBYTES(m) ((m) * 1024 * 1024) // Mebibytes to Bytes +#define EiBYTES(e) ((e) * 1024 * 1024 * 1024 * 1024 * 1024 * 1024) // Exbibytes to Bytes #define MM_PER_METER 1000 #define METERS_PER_KM 1000 diff --git a/src/fw/vector_table.c b/src/fw/vector_table.c index cca59d839b..617751e930 100644 --- a/src/fw/vector_table.c +++ b/src/fw/vector_table.c @@ -14,7 +14,8 @@ void Default_Handler(void) { // handler for the interrupt. This means the interrupt is unexpected, // so we loop infinitely to preserve the system state for examination // by a debugger - while (true) {} + while (true) { + } } // All these functions are weak references to the Default_Handler, @@ -33,70 +34,69 @@ ALIAS("Default_Handler") void SysTick_Handler(void); // External Interrupts #define IRQ_DEF(idx, irq) ALIAS("Default_Handler") void irq##_IRQHandler(void); #if defined(CONFIG_SOC_NRF52) -# include "irq_nrf52.def" +#include "irq_nrf52.def" #elif defined(CONFIG_SOC_SF32LB52) -# include "irq_sf32lb52.def" +#include "irq_sf32lb52.def" #elif defined(CONFIG_QEMU) -# include "irq_qemu.def" +#include "irq_qemu.def" #else -# error "No IRQ definition for this MICRO_FAMILY" +#error "No IRQ definition for this MICRO_FAMILY" #endif #undef IRQ_DEF - #ifdef CONFIG_PROFILE_INTERRUPTS #include "system/profiler.h" -#define IRQ_DEF(idx, irq) static inline void irq##_IRQHandler_profiled(void) { \ - extern ProfilerNode g_profiler_node_##irq##_IRQ; \ - g_profiler_node_##irq##_IRQ.start = DWT->CYCCNT; \ - irq##_IRQHandler();\ - profiler_node_stop(&g_profiler_node_##irq##_IRQ, DWT->CYCCNT); \ -} +#define IRQ_DEF(idx, irq) \ + static inline void irq##_IRQHandler_profiled(void) { \ + extern ProfilerNode g_profiler_node_##irq##_IRQ; \ + g_profiler_node_##irq##_IRQ.start = DWT->CYCCNT; \ + irq##_IRQHandler(); \ + profiler_node_stop(&g_profiler_node_##irq##_IRQ, DWT->CYCCNT); \ + } #if defined(CONFIG_SOC_NRF52) -# include "irq_nrf52.def" +#include "irq_nrf52.def" #elif defined(CONFIG_SOC_SF32LB52) -# include "irq_sf32lb52.def" +#include "irq_sf32lb52.def" #elif defined(CONFIG_QEMU) -# include "irq_qemu.def" +#include "irq_qemu.def" #else -# error "No IRQ definition for this MICRO_FAMILY" +#error "No IRQ definition for this MICRO_FAMILY" #endif #undef IRQ_DEF -#endif // CONFIG_PROFILE_INTERRUPTS +#endif // CONFIG_PROFILE_INTERRUPTS +EXTERNALLY_VISIBLE SECTION(".isr_vector") const void *const vector_table[] = { + _estack, + Reset_Handler, + NMI_Handler, + HardFault_Handler, + MemManage_Handler, + BusFault_Handler, + UsageFault_Handler, + (void *)0x4E65576F, // NeWo, marks image as New World for bootloader + 0, + 0, + 0, + SVC_Handler, + DebugMon_Handler, + 0, + PendSV_Handler, + SysTick_Handler, -EXTERNALLY_VISIBLE SECTION(".isr_vector") const void * const vector_table[] = { - _estack, - Reset_Handler, - NMI_Handler, - HardFault_Handler, - MemManage_Handler, - BusFault_Handler, - UsageFault_Handler, - (void *)0x4E65576F, // NeWo, marks image as New World for bootloader - 0, - 0, - 0, - SVC_Handler, - DebugMon_Handler, - 0, - PendSV_Handler, - SysTick_Handler, - - // External Interrupts +// External Interrupts #ifdef CONFIG_PROFILE_INTERRUPTS #define IRQ_DEF(idx, irq) [idx + 16] = irq##_IRQHandler_profiled, #else #define IRQ_DEF(idx, irq) [idx + 16] = irq##_IRQHandler, #endif #if defined(CONFIG_SOC_NRF52) -# include "irq_nrf52.def" +#include "irq_nrf52.def" #elif defined(CONFIG_SOC_SF32LB52) -# include "irq_sf32lb52.def" +#include "irq_sf32lb52.def" #elif defined(CONFIG_QEMU) -# include "irq_qemu.def" +#include "irq_qemu.def" #else -# error "No IRQ definition for this MICRO_FAMILY" +#error "No IRQ definition for this MICRO_FAMILY" #endif #undef IRQ_DEF }; diff --git a/src/idl/nanopb/activity.proto b/src/idl/nanopb/activity.proto index 656f77b86d..bfe98fec5a 100644 --- a/src/idl/nanopb/activity.proto +++ b/src/idl/nanopb/activity.proto @@ -16,7 +16,7 @@ option java_package = "com.getpebble.pipeline"; import "measurements.proto"; message ActivityInterval { - required uint32 offset_sec = 1; /// Relative to event.time_utc + required uint32 offset_sec = 1; /// Relative to event.time_utc required uint32 duration_sec = 2; } @@ -30,14 +30,15 @@ message ActivityInterval { */ message ActivitySession { enum StartReason { - UnknownReason = 0; /// Protocol Buffers uses the first enum as the default + UnknownReason = 0; /// Protocol Buffers uses the first enum as the default Automatic = 1; Manual = 2; AutomaticConvertedToManual = 3; } message Summary { - repeated MeasurementSet.Type types = 1; /// denotes types and order of packed data in each Sample + repeated MeasurementSet.Type types = + 1; /// denotes types and order of packed data in each Sample required Measurement measurement = 2; } @@ -62,7 +63,7 @@ message ActivitySession { message ActivityType { enum InternalType { - UnknownType = 0; /// Protocol Buffers uses the first enum as the default + UnknownType = 0; /// Protocol Buffers uses the first enum as the default Sleep = 1; DeepSleep = 2; Nap = 3; @@ -75,7 +76,7 @@ message ActivityType { oneof type { InternalType internal_type = 1; - string custom_type = 2; /// Identifier, locally unique to Pebble/Phone + string custom_type = 2; /// Identifier, locally unique to Pebble/Phone } optional string name = 3; @@ -86,7 +87,7 @@ message ActivityType { */ message ActivityPreset { enum Widget { - UnknownWidget = 0; /// Protocol Buffers uses the first enum as the default + UnknownWidget = 0; /// Protocol Buffers uses the first enum as the default PaceTimePerDistance = 1; SpeedDistancePerTime = 2; @@ -98,7 +99,7 @@ message ActivityPreset { required ActivityType type = 1; optional Widget main_widget = 4; - repeated Widget bottom_widgets = 5; /// (Probably up to 3) + repeated Widget bottom_widgets = 5; /// (Probably up to 3) } /** diff --git a/src/idl/nanopb/common.proto b/src/idl/nanopb/common.proto index b962080e6d..5b78cca939 100644 --- a/src/idl/nanopb/common.proto +++ b/src/idl/nanopb/common.proto @@ -10,7 +10,7 @@ syntax = "proto2"; package pebble.pipeline; -option java_package="com.getpebble.pipeline"; +option java_package = "com.getpebble.pipeline"; message Version { required uint32 major = 4; @@ -34,7 +34,9 @@ such as watches and phones */ message Tier { required string type = 1; - required string id = 2; /// ID string for the device or system, which may or may not conform to a true UUID. eg serial_number for a pebble watch + required string id = + 2; /// ID string for the device or system, which may or may not conform + /// to a true UUID. eg serial_number for a pebble watch optional LocationInfo location = 3; optional string comment = 4; optional Version version = 5; diff --git a/src/idl/nanopb/event.proto b/src/idl/nanopb/event.proto index 6092920a4a..7c13993d2b 100644 --- a/src/idl/nanopb/event.proto +++ b/src/idl/nanopb/event.proto @@ -17,17 +17,24 @@ import "common.proto"; message Event { enum Type { - UnknownEvent = 0; /// Protocol Buffers uses the first enum as the default + UnknownEvent = 0; /// Protocol Buffers uses the first enum as the default ActivitySessionEvent = 1; // NotificationEvent = 2; // ViewHealthChart = 3; } - required bytes uuid = 1; /// 16-byte uuid for efficient message size - optional User user = 2; /// can usually be omitted and included in Requests - required Type type = 4; /// string types are more sanely extensible, but enum types would be more typo resistant and smaller message size - required uint32 time_utc = 5; /// when the event occurred (unix epoch seconds) - required sint32 utc_to_local = 6; /// time_utc + utc_to_local = time_local. sint32 stores neg number efficiently. need to recast before adding to time_utc, but saves storage - optional uint32 created_time_utc = 7; /// events may be created at times other than their occurrence + required bytes uuid = 1; /// 16-byte uuid for efficient message size + optional User user = 2; /// can usually be omitted and included in Requests + required Type type = + 4; /// string types are more sanely extensible, but enum types would be + /// more typo resistant and smaller message size + required uint32 time_utc = + 5; /// when the event occurred (unix epoch seconds) + required sint32 utc_to_local = + 6; /// time_utc + utc_to_local = time_local. sint32 stores neg number + /// efficiently. need to recast before adding to time_utc, but saves + /// storage + optional uint32 created_time_utc = + 7; /// events may be created at times other than their occurrence optional uint32 duration = 8; /// in same units as time_utc (sec) optional LocationInfo location = 9; optional ActivitySession activity_session = 10; diff --git a/src/idl/nanopb/measurements.proto b/src/idl/nanopb/measurements.proto index 45068b7dbd..547fb09721 100644 --- a/src/idl/nanopb/measurements.proto +++ b/src/idl/nanopb/measurements.proto @@ -34,42 +34,51 @@ option java_package = "com.getpebble.pipeline"; import "common.proto"; message Measurement { - required uint32 offset_sec = 1; /// offset since timestamp (in seconds) - repeated uint32 data = 2 [packed=true]; + required uint32 offset_sec = 1; /// offset since timestamp (in seconds) + repeated uint32 data = 2 [packed = true]; } message MeasurementSet { enum HeartRateQuality { - NoAccel = 0; - OffWrist = 1; - NoSignal = 2; - Worst = 3; - Poor = 4; - Acceptable = 5; - Good = 6; - Excellent = 7; + NoAccel = 0; + OffWrist = 1; + NoSignal = 2; + Worst = 3; + Poor = 4; + Acceptable = 5; + Good = 6; + Excellent = 7; } - enum Type { /// types of measurement samples we can take. minor changes to SI units to encode efficiently - UnknownEvent = 0; /// Protocol Buffers uses the first enum as the default - TimeMS = 1; /// more precise time, in milliseconds - VMC = 2; /// Vector Magnitude Counts. Rough measure of total activity. Unitless - Steps = 3; /// Accumulated steps. Unitless - DistanceCM = 4; /// Distance traveled. In centimeters - RestingGCalories = 5; /// Calories burned due to resting metabolic rate. In gram calories - ActiveGCalories = 6; /// Calories burned due to activity. In gram calories - BPM = 7; /// Heart rate. Beats per minutes - RR = 8; /// Heart rate variability. Peak to peak time in ms - Orientation = 9; /// Orientation of the watch. Some weird units - Light = 10; /// Ambient light. - Temperature = 11; /// Temperature of watch. Kelvin - HRQuality = 12; /// Quality of heart rate signal, a HeartRateQuality enum + enum Type { /// types of measurement samples we can take. minor changes to SI + /// units to encode efficiently + UnknownEvent = 0; /// Protocol Buffers uses the first enum as the default + TimeMS = 1; /// more precise time, in milliseconds + VMC = 2; /// Vector Magnitude Counts. Rough measure of total activity. + /// Unitless + Steps = 3; /// Accumulated steps. Unitless + DistanceCM = 4; /// Distance traveled. In centimeters + RestingGCalories = + 5; /// Calories burned due to resting metabolic rate. In gram calories + ActiveGCalories = 6; /// Calories burned due to activity. In gram calories + BPM = 7; /// Heart rate. Beats per minutes + RR = 8; /// Heart rate variability. Peak to peak time in ms + Orientation = 9; /// Orientation of the watch. Some weird units + Light = 10; /// Ambient light. + Temperature = 11; /// Temperature of watch. Kelvin + HRQuality = 12; /// Quality of heart rate signal, a HeartRateQuality enum } - required bytes uuid = 1; /// 16-byte uuid for efficient message size + required bytes uuid = 1; /// 16-byte uuid for efficient message size optional User user = 2; - required uint32 time_utc = 3; /// time since epoch (in seconds) - required sint32 utc_to_local = 4; /// sint32 stores neg number efficiently. need to recast before adding to time_utc, but saves storage - optional bytes sensor_settings = 5; /// sensors might have all sorts of different modes or config that might be best represented as a byte blob - repeated Type types = 7; /// denotes types and order of packed data in each Sample + required uint32 time_utc = 3; /// time since epoch (in seconds) + required sint32 utc_to_local = + 4; /// sint32 stores neg number efficiently. need to recast before adding + /// to time_utc, but saves storage + optional bytes sensor_settings = + 5; /// sensors might have all sorts of different modes or config that + /// might be best represented as a byte blob + repeated Type types = + 7; /// denotes types and order of packed data in each Sample repeated Measurement measurements = 8; - optional uint32 time_end_utc = 9; /// end of last time window if data contains any integral signals + optional uint32 time_end_utc = + 9; /// end of last time window if data contains any integral signals } diff --git a/src/idl/nanopb/payload.proto b/src/idl/nanopb/payload.proto index dcf8e23bd3..ce441310ed 100644 --- a/src/idl/nanopb/payload.proto +++ b/src/idl/nanopb/payload.proto @@ -15,7 +15,6 @@ the web, or if multiple devices are connected simultaneously to one mobile device. */ - syntax = "proto2"; package pebble.pipeline; @@ -27,11 +26,14 @@ import "event.proto"; import "measurements.proto"; message Payload { - required Tier sender = 2; /// Tier info represents who is sending a message. Payloads are uniquely identified by sender and time - required uint32 send_time_utc = 3; /// latest send attempt time + required Tier sender = + 2; /// Tier info represents who is sending a message. Payloads are + /// uniquely identified by sender and time + required uint32 send_time_utc = 3; /// latest send attempt time optional uint32 send_retry_count = 4; optional User user = 6; /// User info apply to all sub-messages contained - repeated bytes payloads = 10; /// recursive payloads form a tree structure to store arbitrary message history efficiently + repeated bytes payloads = 10; /// recursive payloads form a tree structure to + /// store arbitrary message history efficiently // base analytics types function as tree leaves repeated Event events = 11; repeated MeasurementSet measurement_sets = 12; diff --git a/src/idl/nanopb/simple.proto b/src/idl/nanopb/simple.proto index 3ba7fd90be..2a59b9638c 100644 --- a/src/idl/nanopb/simple.proto +++ b/src/idl/nanopb/simple.proto @@ -4,5 +4,5 @@ syntax = "proto2"; message SimpleMessage { - required int32 lucky_number = 1; + required int32 lucky_number = 1; } diff --git a/subsys/logging/logging.c b/subsys/logging/logging.c index 2767766515..38eab96b2f 100644 --- a/subsys/logging/logging.c +++ b/subsys/logging/logging.c @@ -26,16 +26,14 @@ #include #ifndef PBL_LOG_LEVEL - #define PBL_LOG_LEVEL LOG_LEVEL_DEBUG +#define PBL_LOG_LEVEL LOG_LEVEL_DEBUG #endif int g_pbl_log_level = PBL_LOG_LEVEL; bool g_pbl_log_enabled = true; static bool prv_check_serial_log_enabled(int level) { - return (g_pbl_log_enabled) && - (level == LOG_LEVEL_ALWAYS || - (level <= g_pbl_log_level)); + return (g_pbl_log_enabled) && (level == LOG_LEVEL_ALWAYS || (level <= g_pbl_log_level)); } #ifndef CONFIG_PULSE_EVERYWHERE @@ -57,14 +55,14 @@ static void prv_log_timestamp(void) { struct tm time_seconds_calendar; gmtime_r(&time_seconds, &time_seconds_calendar); - sniprintf(buffer, TIMESTAMP_BUFFER_SIZE, "%02u:%02u:%02u.%03u ", - time_seconds_calendar.tm_hour, time_seconds_calendar.tm_min, time_seconds_calendar.tm_sec, time_ms); + sniprintf(buffer, TIMESTAMP_BUFFER_SIZE, "%02u:%02u:%02u.%03u ", time_seconds_calendar.tm_hour, + time_seconds_calendar.tm_min, time_seconds_calendar.tm_sec, time_ms); serial_console_write_log_message(buffer); } -static void prv_log_serial( - uint8_t log_level, const char* src_filename, int src_line_number, const char* message) { +static void prv_log_serial(uint8_t log_level, const char *src_filename, int src_line_number, + const char *message) { if (!serial_console_is_logging_enabled() && log_level != LOG_LEVEL_ALWAYS) { return; } @@ -80,7 +78,7 @@ static void prv_log_serial( unsigned char task_char = '-'; #endif - char buffer[] = { pbl_log_get_level_char(log_level), ' ', task_char, ' ', 0 }; + char buffer[] = {pbl_log_get_level_char(log_level), ' ', task_char, ' ', 0}; serial_console_write_log_message(buffer); } @@ -106,7 +104,7 @@ static void prv_log_serial( // Append our newlines and our trailing null serial_console_write_log_message("\r\n"); } -#endif // CONFIG_PULSE_EVERYWHERE +#endif // CONFIG_PULSE_EVERYWHERE void kernel_pbl_log_serial(LogBinaryMessage *log_message, bool async) { if (!prv_check_serial_log_enabled(log_message->log_level)) { @@ -118,13 +116,12 @@ void kernel_pbl_log_serial(LogBinaryMessage *log_message, bool async) { pulse_logging_log(log_message->log_level, log_message->filename, htons(log_message->line_number), log_message->message); } else { - pulse_logging_log_sync( - log_message->log_level, log_message->filename, - htons(log_message->line_number), log_message->message); + pulse_logging_log_sync(log_message->log_level, log_message->filename, + htons(log_message->line_number), log_message->message); } #else - prv_log_serial(log_message->log_level, log_message->filename, - htons(log_message->line_number), log_message->message); + prv_log_serial(log_message->log_level, log_message->filename, htons(log_message->line_number), + log_message->message); #endif } @@ -132,35 +129,32 @@ void kernel_pbl_log_flash(LogBinaryMessage *log_message, bool async) { int length = sizeof(*log_message) + log_message->message_length; if (g_pbl_log_enabled && - (log_message->log_level == LOG_LEVEL_ALWAYS || - (log_message->log_level <= FLASH_LOG_LEVEL))) { - pbl_log_advanced((const char*) log_message, length, async); + (log_message->log_level == LOG_LEVEL_ALWAYS || (log_message->log_level <= FLASH_LOG_LEVEL))) { + pbl_log_advanced((const char *)log_message, length, async); } } -void kernel_pbl_log(LogBinaryMessage* log_message, bool async) { +void kernel_pbl_log(LogBinaryMessage *log_message, bool async) { kernel_pbl_log_serial(log_message, async); - if (!pbl_irq_is_locked() && !mcu_state_is_isr() && - !pbl_sched_is_locked()) { + if (!pbl_irq_is_locked() && !mcu_state_is_isr() && !pbl_sched_is_locked()) { kernel_pbl_log_flash(log_message, async); } } -void kernel_pbl_log_from_fault_handler( - const char *src_filename, uint16_t src_line_number, const char *message) { +void kernel_pbl_log_from_fault_handler(const char *src_filename, uint16_t src_line_number, + const char *message) { #ifdef CONFIG_PULSE_EVERYWHERE - pulse_logging_log_sync(LOG_LEVEL_ALWAYS, src_filename, - src_line_number, message); + pulse_logging_log_sync(LOG_LEVEL_ALWAYS, src_filename, src_line_number, message); #else serial_console_write_log_message(message); serial_console_write_log_message("\r\n"); #endif } -void kernel_pbl_log_from_fault_handler_fmt( - const char *src_filename, uint16_t src_line_number, char *buffer, - unsigned int buffer_size, const char *fmt, ...) { +void kernel_pbl_log_from_fault_handler_fmt(const char *src_filename, uint16_t src_line_number, + char *buffer, unsigned int buffer_size, const char *fmt, + ...) { va_list ap; va_start(ap, fmt); vsniprintf(buffer, buffer_size, fmt, ap); @@ -171,7 +165,7 @@ void kernel_pbl_log_from_fault_handler_fmt( // Serial Commands /////////////////////////////////////////////////////////// -void command_log_level_set(const char* level) { +void command_log_level_set(const char *level) { char buffer[32]; g_pbl_log_level = atoi(level); prompt_send_response_fmt(buffer, 32, "Log level set to: %i", g_pbl_log_level); @@ -181,4 +175,3 @@ void command_log_level_get(void) { char buffer[32]; prompt_send_response_fmt(buffer, 32, "Log level: %i", g_pbl_log_level); } - diff --git a/subsys/logging/logging_private.h b/subsys/logging/logging_private.h index 755bc70635..9ee79fb601 100644 --- a/subsys/logging/logging_private.h +++ b/subsys/logging/logging_private.h @@ -18,11 +18,10 @@ typedef struct PACKED LogBinaryMessage { char message[]; } LogBinaryMessage; - //! This structure encapsulates the buffers and state used for formatting a log message. typedef struct { - bool in_progress; // Set true while a log is in progress - char buffer[LOG_BUFFER_LENGTH]; // For construction of the final log message + bool in_progress; // Set true while a log is in progress + char buffer[LOG_BUFFER_LENGTH]; // For construction of the final log message } LogState; //! Return a single character representing the current log level. Used in serial logging. @@ -30,7 +29,7 @@ char pbl_log_get_level_char(const uint8_t log_level); //! Log a message to whatever specific channels are appropriate based on context and configuration. //! Internally calls kernel_pbl_log_serial and kernel_pbl_log_flash. -void kernel_pbl_log(LogBinaryMessage* log_message, bool async); +void kernel_pbl_log(LogBinaryMessage *log_message, bool async); //! Force a log message out the serial channel. void kernel_pbl_log_serial(LogBinaryMessage *log_message, bool async); @@ -38,16 +37,16 @@ void kernel_pbl_log_serial(LogBinaryMessage *log_message, bool async); //! Force a log message out the serial channel from a fault handler or //! other context where OS services are unavailable or can't be trusted, //! and where stack space is at a premium. -void kernel_pbl_log_from_fault_handler( - const char *src_filename, uint16_t src_line_number, const char *message); +void kernel_pbl_log_from_fault_handler(const char *src_filename, uint16_t src_line_number, + const char *message); -void kernel_pbl_log_from_fault_handler_fmt( - const char *src_filename, uint16_t src_line_number, char *buffer, - unsigned int buffer_len, const char *fmt, ...); +void kernel_pbl_log_from_fault_handler_fmt(const char *src_filename, uint16_t src_line_number, + char *buffer, unsigned int buffer_len, const char *fmt, + ...); #define PBL_LOG_FROM_FAULT_HANDLER(message) \ kernel_pbl_log_from_fault_handler(__FILE_NAME__, __LINE__, message) -#define PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, buffer_len, fmt, ...) \ - kernel_pbl_log_from_fault_handler_fmt( \ - __FILE_NAME__, __LINE__, buffer, buffer_len, fmt, __VA_ARGS__) +#define PBL_LOG_FROM_FAULT_HANDLER_FMT(buffer, buffer_len, fmt, ...) \ + kernel_pbl_log_from_fault_handler_fmt(__FILE_NAME__, __LINE__, buffer, buffer_len, fmt, \ + __VA_ARGS__) diff --git a/subsys/logging/pulse_logging.c b/subsys/logging/pulse_logging.c index 309bd1b9ac..9bfaa06ff7 100644 --- a/subsys/logging/pulse_logging.c +++ b/subsys/logging/pulse_logging.c @@ -48,13 +48,13 @@ static uint64_t prv_get_timestamp_ms(void) { time_t time_s; uint16_t time_ms; rtc_get_time_ms(&time_s, &time_ms); - return ((uint64_t) time_s * 1000) + time_ms; + return ((uint64_t)time_s * 1000) + time_ms; } -static size_t prv_serialize_log_header(MessageContents *contents, - uint8_t log_level, uint64_t timestamp_ms, PebbleTask task, +static size_t prv_serialize_log_header(MessageContents *contents, uint8_t log_level, + uint64_t timestamp_ms, PebbleTask task, const char *src_filename, uint16_t src_line_number) { - contents->message_type = 1; // Text + contents->message_type = 1; // Text // Log the log level and the current task+privilege level contents->log_level_char = pbl_log_get_level_char(log_level); @@ -79,19 +79,16 @@ static size_t prv_serialize_log_header(MessageContents *contents, } //! Serialize a message into contents, returning the number of bytes used. -static size_t prv_serialize_log(MessageContents *contents, - uint8_t log_level, uint64_t timestamp_ms, PebbleTask task, - const char *src_filename, uint16_t src_line_number, +static size_t prv_serialize_log(MessageContents *contents, uint8_t log_level, uint64_t timestamp_ms, + PebbleTask task, const char *src_filename, uint16_t src_line_number, const char *message) { - - prv_serialize_log_header(contents, log_level, timestamp_ms, task, - src_filename, src_line_number); + prv_serialize_log_header(contents, log_level, timestamp_ms, task, src_filename, src_line_number); // Write the actual log message. strncpy(contents->message, message, sizeof(contents->message)); - size_t payload_length = MIN(sizeof(MessageContents), - offsetof(MessageContents, message) + strlen(message)); + size_t payload_length = + MIN(sizeof(MessageContents), offsetof(MessageContents, message) + strlen(message)); return payload_length; } @@ -100,9 +97,9 @@ static void prv_send_pulse_packet(uint8_t log_level, const char *src_filename, uint16_t src_line_number, const char *message) { MessageContents *contents = pulse_push_send_begin(PULSE_PROTOCOL_LOGGING); - const size_t payload_length = prv_serialize_log( - contents, log_level, prv_get_timestamp_ms(), pebble_task_get_current(), - src_filename, src_line_number, message); + const size_t payload_length = + prv_serialize_log(contents, log_level, prv_get_timestamp_ms(), pebble_task_get_current(), + src_filename, src_line_number, message); pulse_push_send(contents, payload_length); } @@ -136,9 +133,9 @@ static void prv_event_cb(void *data) { MessageContents *contents = pulse_push_send_begin(PULSE_PROTOCOL_LOGGING); - const size_t payload_length = prv_serialize_log( - contents, LOG_LEVEL_ERROR, prv_get_timestamp_ms(), PebbleTask_Unknown, - "", 0, "ISR Message Dropped!"); + const size_t payload_length = + prv_serialize_log(contents, LOG_LEVEL_ERROR, prv_get_timestamp_ms(), PebbleTask_Unknown, + "", 0, "ISR Message Dropped!"); pulse_push_send(contents, payload_length); } else { @@ -177,14 +174,14 @@ static void prv_enqueue_log_message(uint8_t log_level, const char *message) { // Not enough space for the full message, just write an empty message with only the length // word to indicate we're dropping the message. const uint32_t insufficient_space_length = sizeof(uint32_t); - circular_buffer_write(&s_isr_log_buffer, - &insufficient_space_length, sizeof(insufficient_space_length)); + circular_buffer_write(&s_isr_log_buffer, &insufficient_space_length, + sizeof(insufficient_space_length)); } else { circular_buffer_write(&s_isr_log_buffer, &required_space, sizeof(required_space)); const BufferedLogInfo log_info = { - .timestamp_ms = prv_get_timestamp_ms(), - .log_level = log_level + .timestamp_ms = prv_get_timestamp_ms(), + .log_level = log_level }; circular_buffer_write(&s_isr_log_buffer, &log_info, sizeof(log_info)); @@ -192,12 +189,7 @@ static void prv_enqueue_log_message(uint8_t log_level, const char *message) { } if (buffer_was_empty) { - PebbleEvent e = { - .type = PEBBLE_CALLBACK_EVENT, - .callback = { - .callback = prv_event_cb - } - }; + PebbleEvent e = {.type = PEBBLE_CALLBACK_EVENT, .callback = {.callback = prv_event_cb}}; event_put_isr(&e); } @@ -205,14 +197,13 @@ static void prv_enqueue_log_message(uint8_t log_level, const char *message) { } void pulse_logging_init(void) { - circular_buffer_init(&s_isr_log_buffer, - s_isr_log_buffer_storage, sizeof(s_isr_log_buffer_storage)); + circular_buffer_init(&s_isr_log_buffer, s_isr_log_buffer_storage, + sizeof(s_isr_log_buffer_storage)); } -void pulse_logging_log(uint8_t log_level, const char* src_filename, - uint16_t src_line_number, const char* message) { - if (pbl_irq_is_locked() || mcu_state_is_isr() || - pbl_sched_is_locked()) { +void pulse_logging_log(uint8_t log_level, const char *src_filename, uint16_t src_line_number, + const char *message) { + if (pbl_irq_is_locked() || mcu_state_is_isr() || pbl_sched_is_locked()) { // We're in a state where we can't immediately send the message, save it to an internal buffer // instead for later sending. prv_enqueue_log_message(log_level, message); @@ -226,18 +217,17 @@ void pulse_logging_log_buffer_flush(void) { prv_event_cb(NULL); } -void pulse_logging_log_sync(uint8_t log_level, const char *src_filename, - uint16_t src_line_number, const char *message) { +void pulse_logging_log_sync(uint8_t log_level, const char *src_filename, uint16_t src_line_number, + const char *message) { // Send the log line inline, even if we're in a critical section or ISR prv_send_pulse_packet(log_level, src_filename, src_line_number, message); } -void *pulse_logging_log_sync_begin( - uint8_t log_level, const char *src_filename, uint16_t src_line_number) { +void *pulse_logging_log_sync_begin(uint8_t log_level, const char *src_filename, + uint16_t src_line_number) { MessageContents *contents = pulse_push_send_begin(PULSE_PROTOCOL_LOGGING); - prv_serialize_log_header(contents, log_level, prv_get_timestamp_ms(), - pebble_task_get_current(), src_filename, - src_line_number); + prv_serialize_log_header(contents, log_level, prv_get_timestamp_ms(), pebble_task_get_current(), + src_filename, src_line_number); contents->message[0] = '\0'; return contents; } @@ -249,8 +239,7 @@ void pulse_logging_log_sync_append(void *ctx, const char *message) { void pulse_logging_log_sync_send(void *ctx) { MessageContents *contents = ctx; - size_t payload_length = MIN( - sizeof(MessageContents), - offsetof(MessageContents, message) + strlen(contents->message)); + size_t payload_length = + MIN(sizeof(MessageContents), offsetof(MessageContents, message) + strlen(contents->message)); pulse_push_send(contents, payload_length); } diff --git a/subsys/logging/pulse_logging.h b/subsys/logging/pulse_logging.h index 88e8672392..f0629a3753 100644 --- a/subsys/logging/pulse_logging.h +++ b/subsys/logging/pulse_logging.h @@ -8,17 +8,16 @@ void pulse_logging_init(void); //! Log a message using PULSEv2 -void pulse_logging_log(uint8_t log_level, const char* src_filename, - uint16_t src_line_number, const char* message); +void pulse_logging_log(uint8_t log_level, const char *src_filename, uint16_t src_line_number, + const char *message); //! Log a message using PULSEv2 synchronously, even from a critical section -void pulse_logging_log_sync( - uint8_t log_level, const char* src_filename, - uint16_t src_line_number, const char* message); +void pulse_logging_log_sync(uint8_t log_level, const char *src_filename, uint16_t src_line_number, + const char *message); //! Log a message from a fault handler by concatenating several strings. -void *pulse_logging_log_sync_begin( - uint8_t log_level, const char *src_filename, uint16_t src_line_number); +void *pulse_logging_log_sync_begin(uint8_t log_level, const char *src_filename, + uint16_t src_line_number); void pulse_logging_log_sync_append(void *ctx, const char *message); void pulse_logging_log_sync_send(void *ctx); diff --git a/third_party/cmsis_core/pebble/qemu_cm33.h b/third_party/cmsis_core/pebble/qemu_cm33.h index ff5a9f9c9d..d859edb605 100644 --- a/third_party/cmsis_core/pebble/qemu_cm33.h +++ b/third_party/cmsis_core/pebble/qemu_cm33.h @@ -11,42 +11,42 @@ extern "C" { #endif /* Cortex-M33 core configuration */ -#define __CM33_REV 0x0000U -#define __NVIC_PRIO_BITS 3U -#define __Vendor_SysTickConfig 0U -#define __MPU_PRESENT 1U -#define __VTOR_PRESENT 1U -#define __FPU_PRESENT 1U -#define __DSP_PRESENT 0U -#define __SAUREGION_PRESENT 0U +#define __CM33_REV 0x0000U +#define __NVIC_PRIO_BITS 3U +#define __Vendor_SysTickConfig 0U +#define __MPU_PRESENT 1U +#define __VTOR_PRESENT 1U +#define __FPU_PRESENT 1U +#define __DSP_PRESENT 0U +#define __SAUREGION_PRESENT 0U /* QEMU Pebble IRQ numbers */ typedef enum IRQn { /* Cortex-M processor exceptions */ - NonMaskableInt_IRQn = -14, - HardFault_IRQn = -13, + NonMaskableInt_IRQn = -14, + HardFault_IRQn = -13, MemoryManagement_IRQn = -12, - BusFault_IRQn = -11, - UsageFault_IRQn = -10, - SecureFault_IRQn = -9, - SVCall_IRQn = -5, - DebugMonitor_IRQn = -4, - PendSV_IRQn = -2, - SysTick_IRQn = -1, + BusFault_IRQn = -11, + UsageFault_IRQn = -10, + SecureFault_IRQn = -9, + SVCall_IRQn = -5, + DebugMonitor_IRQn = -4, + PendSV_IRQn = -2, + SysTick_IRQn = -1, /* QEMU device interrupts */ - UART0_IRQn = 0, - UART1_IRQn = 1, - UART2_IRQn = 2, - TIMER0_IRQn = 3, - TIMER1_IRQn = 4, - RTC_IRQn = 5, - GPIO_IRQn = 6, - DISPLAY_IRQn = 7, - EXTFLASH_IRQn = 8, - TOUCH_IRQn = 9, - AUDIO_IRQn = 10, - WATCHDOG_IRQn = 11, + UART0_IRQn = 0, + UART1_IRQn = 1, + UART2_IRQn = 2, + TIMER0_IRQn = 3, + TIMER1_IRQn = 4, + RTC_IRQn = 5, + GPIO_IRQn = 6, + DISPLAY_IRQn = 7, + EXTFLASH_IRQn = 8, + TOUCH_IRQn = 9, + AUDIO_IRQn = 10, + WATCHDOG_IRQn = 11, } IRQn_Type; #include "core_cm33.h" @@ -56,10 +56,10 @@ typedef enum IRQn { * Provide RASR as an alias for RLAR for code that still references the * ARMv7-M register name. */ #ifndef MPU_RASR_TEX_Pos -#define MPU_RASR_TEX_Pos MPU_RLAR_AttrIndx_Pos -#define MPU_RASR_S_Msk 0 -#define MPU_RASR_C_Msk 0 -#define MPU_RASR_B_Msk 0 +#define MPU_RASR_TEX_Pos MPU_RLAR_AttrIndx_Pos +#define MPU_RASR_S_Msk 0 +#define MPU_RASR_C_Msk 0 +#define MPU_RASR_B_Msk 0 #define RASR RLAR #endif @@ -70,7 +70,7 @@ typedef enum IRQn { /* Generic SRAM base address */ #ifndef SRAM_BASE -#define SRAM_BASE 0x20000000UL +#define SRAM_BASE 0x20000000UL #endif extern uint32_t SystemCoreClock; diff --git a/third_party/cmsis_core/pebble/qemu_cm4.h b/third_party/cmsis_core/pebble/qemu_cm4.h index 51970a8e4b..57b479ad4d 100644 --- a/third_party/cmsis_core/pebble/qemu_cm4.h +++ b/third_party/cmsis_core/pebble/qemu_cm4.h @@ -10,46 +10,46 @@ extern "C" { #endif /* Cortex-M4 core configuration */ -#define __CM4_REV 0x0000U -#define __NVIC_PRIO_BITS 3U -#define __Vendor_SysTickConfig 0U -#define __MPU_PRESENT 1U -#define __VTOR_PRESENT 1U -#define __FPU_PRESENT 0U +#define __CM4_REV 0x0000U +#define __NVIC_PRIO_BITS 3U +#define __Vendor_SysTickConfig 0U +#define __MPU_PRESENT 1U +#define __VTOR_PRESENT 1U +#define __FPU_PRESENT 0U /* QEMU Pebble IRQ numbers */ typedef enum IRQn { /* Cortex-M processor exceptions */ - NonMaskableInt_IRQn = -14, - HardFault_IRQn = -13, + NonMaskableInt_IRQn = -14, + HardFault_IRQn = -13, MemoryManagement_IRQn = -12, - BusFault_IRQn = -11, - UsageFault_IRQn = -10, - SVCall_IRQn = -5, - DebugMonitor_IRQn = -4, - PendSV_IRQn = -2, - SysTick_IRQn = -1, + BusFault_IRQn = -11, + UsageFault_IRQn = -10, + SVCall_IRQn = -5, + DebugMonitor_IRQn = -4, + PendSV_IRQn = -2, + SysTick_IRQn = -1, /* QEMU device interrupts */ - UART0_IRQn = 0, - UART1_IRQn = 1, - UART2_IRQn = 2, - TIMER0_IRQn = 3, - TIMER1_IRQn = 4, - RTC_IRQn = 5, - GPIO_IRQn = 6, - DISPLAY_IRQn = 7, - EXTFLASH_IRQn = 8, - TOUCH_IRQn = 9, - AUDIO_IRQn = 10, - WATCHDOG_IRQn = 11, + UART0_IRQn = 0, + UART1_IRQn = 1, + UART2_IRQn = 2, + TIMER0_IRQn = 3, + TIMER1_IRQn = 4, + RTC_IRQn = 5, + GPIO_IRQn = 6, + DISPLAY_IRQn = 7, + EXTFLASH_IRQn = 8, + TOUCH_IRQn = 9, + AUDIO_IRQn = 10, + WATCHDOG_IRQn = 11, } IRQn_Type; #include "core_cm4.h" /* Generic SRAM base address */ #ifndef SRAM_BASE -#define SRAM_BASE 0x20000000UL +#define SRAM_BASE 0x20000000UL #endif extern uint32_t SystemCoreClock; diff --git a/third_party/hal_nordic/nrfx_glue.h b/third_party/hal_nordic/nrfx_glue.h index 67a5ea6d31..27133e186d 100644 --- a/third_party/hal_nordic/nrfx_glue.h +++ b/third_party/hal_nordic/nrfx_glue.h @@ -55,7 +55,7 @@ extern "C" { // Uncomment this line to use the standard MDK way of binding IRQ handlers // at linking time. -//#include +// #include //------------------------------------------------------------------------------ @@ -65,7 +65,7 @@ extern "C" { * @param expression Expression to be evaluated. */ #define NRFX_ASSERT(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) -void assert_failed(uint8_t* file, uint32_t line); +void assert_failed(uint8_t *file, uint32_t line); /** * @brief Macro for placing a compile time assertion. @@ -89,7 +89,11 @@ void assert_failed(uint8_t* file, uint32_t line); * * @param irq_number IRQ number. */ -#define NRFX_IRQ_ENABLE(irq_number) do { NVIC_ClearPendingIRQ(irq_number); NVIC_EnableIRQ(irq_number); } while(0) +#define NRFX_IRQ_ENABLE(irq_number) \ + do { \ + NVIC_ClearPendingIRQ(irq_number); \ + NVIC_EnableIRQ(irq_number); \ + } while (0) /** * @brief Macro for checking if a specific IRQ is enabled. @@ -99,7 +103,8 @@ void assert_failed(uint8_t* file, uint32_t line); * @retval true If the IRQ is enabled. * @retval false Otherwise. */ -#define NRFX_IRQ_IS_ENABLED(irq_number) (0 != (NVIC->ISER[(irq_number) / 32] & (1UL << ((irq_number) % 32)))) +#define NRFX_IRQ_IS_ENABLED(irq_number) \ + (0 != (NVIC->ISER[(irq_number) / 32] & (1UL << ((irq_number) % 32)))) /** * @brief Macro for disabling a specific IRQ. @@ -146,7 +151,7 @@ void assert_failed(uint8_t* file, uint32_t line); * A compilation error is generated if the DWT unit is not present * in the SoC used. */ -#define NRFX_DELAY_DWT_BASED 0 +#define NRFX_DELAY_DWT_BASED 0 #include @@ -175,7 +180,8 @@ void assert_failed(uint8_t* file, uint32_t line); #define NRFX_ATOMIC_FETCH_STORE(p_data, value) nrfx_atomic_u32_fetch_store(p_data, value) /** - * @brief Macro for running a bitwise OR operation on an atomic object and returning its previous value. + * @brief Macro for running a bitwise OR operation on an atomic object and returning its previous + * value. * * @param[in] p_data Atomic memory pointer. * @param[in] value Value of the second operand in the OR operation. @@ -240,7 +246,8 @@ void assert_failed(uint8_t* file, uint32_t line); * @retval true If value was updated. * @retval false If value was not updated because location was not equal to @p old_value. */ -// #define NRFX_ATOMIC_CAS(p_data, old_value, new_value) nrfx_atomic_u32_cmp_exch(p_data, old_value, new_value) +// #define NRFX_ATOMIC_CAS(p_data, old_value, new_value) nrfx_atomic_u32_cmp_exch(p_data, old_value, +// new_value) /** * @brief Macro for counting leading zeros. @@ -316,26 +323,32 @@ void assert_failed(uint8_t* file, uint32_t line); //------------------------------------------------------------------------------ -/** @brief Bitmask that defines DPPI channels that are reserved for use outside of the nrfx library. */ -#define NRFX_DPPI_CHANNELS_USED 0 +/** @brief Bitmask that defines DPPI channels that are reserved for use outside of the nrfx library. + */ +#define NRFX_DPPI_CHANNELS_USED 0 -/** @brief Bitmask that defines DPPI groups that are reserved for use outside of the nrfx library. */ -#define NRFX_DPPI_GROUPS_USED 0 +/** @brief Bitmask that defines DPPI groups that are reserved for use outside of the nrfx library. + */ +#define NRFX_DPPI_GROUPS_USED 0 -/** @brief Bitmask that defines PPI channels that are reserved for use outside of the nrfx library. */ -#define NRFX_PPI_CHANNELS_USED 0 +/** @brief Bitmask that defines PPI channels that are reserved for use outside of the nrfx library. + */ +#define NRFX_PPI_CHANNELS_USED 0 /** @brief Bitmask that defines PPI groups that are reserved for use outside of the nrfx library. */ -#define NRFX_PPI_GROUPS_USED 0 +#define NRFX_PPI_GROUPS_USED 0 -/** @brief Bitmask that defines GPIOTE channels that are reserved for use outside of the nrfx library. */ +/** @brief Bitmask that defines GPIOTE channels that are reserved for use outside of the nrfx + * library. */ #define NRFX_GPIOTE_CHANNELS_USED 0 -/** @brief Bitmask that defines EGU instances that are reserved for use outside of the nrfx library. */ -#define NRFX_EGUS_USED 0 +/** @brief Bitmask that defines EGU instances that are reserved for use outside of the nrfx library. + */ +#define NRFX_EGUS_USED 0 -/** @brief Bitmask that defines TIMER instances that are reserved for use outside of the nrfx library. */ -#define NRFX_TIMERS_USED 0 +/** @brief Bitmask that defines TIMER instances that are reserved for use outside of the nrfx + * library. */ +#define NRFX_TIMERS_USED 0 /** @} */ @@ -343,4 +356,4 @@ void assert_failed(uint8_t* file, uint32_t line); } #endif -#endif // NRFX_GLUE_H__ +#endif // NRFX_GLUE_H__ diff --git a/third_party/hal_sifli/sf32lb52/lcpu_config.c b/third_party/hal_sifli/sf32lb52/lcpu_config.c index 7cd25dc6c0..6e9ed12e44 100644 --- a/third_party/hal_sifli/sf32lb52/lcpu_config.c +++ b/third_party/hal_sifli/sf32lb52/lcpu_config.c @@ -10,23 +10,38 @@ #define NVDS_BUFF_START 0x2040FE00 static const uint8_t s_ble_slp_default[] = { - // Control pre-wakeup time for the sleep of BT subsytem in LCPU. - // See SiFli-SDK EXT_WAKEUP_TIME_LXT32K/EXT_WAKEUP_TIME_RC10K for details. - // RC10K -> 4500us (0x1194) - // LXT32K -> 3500us (0x0DAC) +// Control pre-wakeup time for the sleep of BT subsytem in LCPU. +// See SiFli-SDK EXT_WAKEUP_TIME_LXT32K/EXT_WAKEUP_TIME_RC10K for details. +// RC10K -> 4500us (0x1194) +// LXT32K -> 3500us (0x0DAC) #ifdef LXT_DISABLE - 0x0D, 0x02, 0x19, 0x11, + 0x0D, + 0x02, + 0x19, + 0x11, #else - 0x0D, 0x02, 0xAC, 0x0D, + 0x0D, + 0x02, + 0xAC, + 0x0D, #endif // Control maximum sleep duration of BT subsystem. // The last 0x01 means 10s in BLE only and 30s in dual mode. 0 means 500ms - 0x12, 0x01, 0x01, + 0x12, + 0x01, + 0x01, // Control the log in controller // Changed to 0x20, 0x00, 0x09, 0x00 will enable HCI logs by default - 0x2F, 0x04, 0x20, 0x00, 0x00, 0x00, + 0x2F, + 0x04, + 0x20, + 0x00, + 0x00, + 0x00, // Internal usage, for scheduling - 0x15, 0x01, 0x01, + 0x15, + 0x01, + 0x01, }; static int prv_bt_mac_addr_generate(uint8_t mac_addr[6]) { diff --git a/third_party/hal_sifli/sf32lb52/system_bf0_ap.c b/third_party/hal_sifli/sf32lb52/system_bf0_ap.c index dc16000b25..06474fa7dd 100644 --- a/third_party/hal_sifli/sf32lb52/system_bf0_ap.c +++ b/third_party/hal_sifli/sf32lb52/system_bf0_ap.c @@ -18,7 +18,8 @@ extern uint8_t __ramfunc_end[]; extern const uint32_t __FLASH_start__[]; extern const uint32_t __FLASH_size__[]; -void SystemCoreClockUpdate(void) {} +void SystemCoreClockUpdate(void) { +} enum { ATTR_CODE_IDX, @@ -112,7 +113,9 @@ int mpu_icache_invalidate(void *data, uint32_t size) { return r; } -pm_power_on_mode_t SystemPowerOnModeGet(void) { return PM_COLD_BOOT; } +pm_power_on_mode_t SystemPowerOnModeGet(void) { + return PM_COLD_BOOT; +} void SystemInit(void) { #if defined(__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) @@ -123,8 +126,8 @@ void SystemInit(void) { SCB->CPACR |= (3U << (0U * 2U)) | (3U << (1U * 2U)) | (3U << (2U * 2U)); #if defined(__FPU_USED) && (__FPU_USED == 1U) - SCB->CPACR |= ((3U << 10U * 2U) | // enable CP10 Full Access - (3U << 11U * 2U)); // enable CP11 Full Access + SCB->CPACR |= ((3U << 10U * 2U) | // enable CP10 Full Access + (3U << 11U * 2U)); // enable CP11 Full Access #endif prv_mpu_config(); diff --git a/third_party/nimble/port/include/nimble/nimble_npl_os.h b/third_party/nimble/port/include/nimble/nimble_npl_os.h index 1cadbb6bef..78c97dca7d 100644 --- a/third_party/nimble/port/include/nimble/nimble_npl_os.h +++ b/third_party/nimble/port/include/nimble/nimble_npl_os.h @@ -84,7 +84,9 @@ static inline bool ble_npl_os_started(void) { return pbl_kernel_is_started(); } -static inline void *ble_npl_get_current_task_id(void) { return pbl_thread_current(); } +static inline void *ble_npl_get_current_task_id(void) { + return pbl_thread_current(); +} static inline void ble_npl_eventq_init(struct ble_npl_eventq *evq) { pbl_msgq_init(&evq->q, evq->buf, sizeof(struct ble_npl_event *), BLE_NPL_EVENTQ_DEPTH); @@ -103,7 +105,9 @@ static inline void ble_npl_eventq_remove(struct ble_npl_eventq *evq, struct ble_ npl_pebble_eventq_remove(evq, ev); } -static inline void ble_npl_event_run(struct ble_npl_event *ev) { ev->fn(ev); } +static inline void ble_npl_event_run(struct ble_npl_event *ev) { + ev->fn(ev); +} static inline bool ble_npl_eventq_is_empty(struct ble_npl_eventq *evq) { return pbl_msgq_num_used(&evq->q) == 0; @@ -115,11 +119,17 @@ static inline void ble_npl_event_init(struct ble_npl_event *ev, ble_npl_event_fn ev->arg = arg; } -static inline bool ble_npl_event_is_queued(struct ble_npl_event *ev) { return ev->queued; } +static inline bool ble_npl_event_is_queued(struct ble_npl_event *ev) { + return ev->queued; +} -static inline void *ble_npl_event_get_arg(struct ble_npl_event *ev) { return ev->arg; } +static inline void *ble_npl_event_get_arg(struct ble_npl_event *ev) { + return ev->arg; +} -static inline void ble_npl_event_set_arg(struct ble_npl_event *ev, void *arg) { ev->arg = arg; } +static inline void ble_npl_event_set_arg(struct ble_npl_event *ev, void *arg) { + ev->arg = arg; +} static inline ble_npl_error_t ble_npl_mutex_init(struct ble_npl_mutex *mu) { return npl_pebble_mutex_init(mu); @@ -159,7 +169,9 @@ static inline ble_npl_error_t ble_npl_callout_reset(struct ble_npl_callout *co, return npl_pebble_callout_reset(co, ticks); } -static inline void ble_npl_callout_stop(struct ble_npl_callout *co) { npl_pebble_callout_stop(co); } +static inline void ble_npl_callout_stop(struct ble_npl_callout *co) { + npl_pebble_callout_stop(co); +} static inline bool ble_npl_callout_is_active(struct ble_npl_callout *co) { return npl_pebble_callout_is_active(co); @@ -203,11 +215,17 @@ static inline ble_npl_error_t ble_npl_time_ticks_to_ms(ble_npl_time_t ticks, uin return npl_pebble_time_ticks_to_ms(ticks, out_ms); } -static inline ble_npl_time_t ble_npl_time_ms_to_ticks32(uint32_t ms) { return ms; } +static inline ble_npl_time_t ble_npl_time_ms_to_ticks32(uint32_t ms) { + return ms; +} -static inline uint32_t ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks) { return ticks; } +static inline uint32_t ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks) { + return ticks; +} -static inline void ble_npl_time_delay(ble_npl_time_t ticks) { pbl_thread_sleep(PBL_TICKS(ticks)); } +static inline void ble_npl_time_delay(ble_npl_time_t ticks) { + pbl_thread_sleep(PBL_TICKS(ticks)); +} #if NIMBLE_CFG_CONTROLLER void ble_npl_hw_set_isr(int irqn, void (*addr)(void)); @@ -218,7 +236,9 @@ static inline uint32_t ble_npl_hw_enter_critical(void) { return 0; } -static inline void ble_npl_hw_exit_critical(uint32_t ctx) { pbl_irq_unlock(); } +static inline void ble_npl_hw_exit_critical(uint32_t ctx) { + pbl_irq_unlock(); +} static inline bool ble_npl_hw_is_in_critical(void) { return pbl_irq_is_locked(); diff --git a/third_party/nimble/port/include/nimble/nimble_npl_os_log.h b/third_party/nimble/port/include/nimble/nimble_npl_os_log.h index c8e22f93ae..888dee2933 100644 --- a/third_party/nimble/port/include/nimble/nimble_npl_os_log.h +++ b/third_party/nimble/port/include/nimble/nimble_npl_os_log.h @@ -18,7 +18,7 @@ #define BLE_NPL_LOG_IMPL(lvl) \ static inline void _BLE_NPL_LOG_CAT(BLE_NPL_LOG_MODULE, _BLE_NPL_LOG_CAT(_, lvl))( \ const char *fmt, ...) { \ - if (PBL_SHOULD_LOG(NIMBLE_LOG_LEVEL_##lvl) && LOG_DOMAIN_BT_STACK) { \ + if (PBL_SHOULD_LOG(NIMBLE_LOG_LEVEL_##lvl) && LOG_DOMAIN_BT_STACK) { \ va_list args; \ va_start(args, fmt); \ pbl_log_vargs(NIMBLE_LOG_LEVEL_##lvl, "", 0, fmt, args); \ diff --git a/third_party/nimble/port/include/nrf52/syscfg/syscfg.h b/third_party/nimble/port/include/nrf52/syscfg/syscfg.h index 10351f6fe3..22dbc50421 100644 --- a/third_party/nimble/port/include/nrf52/syscfg/syscfg.h +++ b/third_party/nimble/port/include/nrf52/syscfg/syscfg.h @@ -12,9 +12,8 @@ * attempt to use these macros without including this header will result in a * compiler error. */ -#define MYNEWT_VAL(_name) MYNEWT_VAL_ ## _name -#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val - +#define MYNEWT_VAL(_name) MYNEWT_VAL_##_name +#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_##_name##__##_val /*** Repository @apache-mynewt-core info */ #ifndef MYNEWT_VAL_REPO_HASH_APACHE_MYNEWT_CORE @@ -52,8 +51,6 @@ #define MYNEWT_VAL_REPO_VERSION_SYSCFG "0.0.0" #endif - - /*** @apache-mynewt-core/boot/startup */ #ifndef MYNEWT_VAL_INCLUDE_IMAGE_HEADER #define MYNEWT_VAL_INCLUDE_IMAGE_HEADER (1) @@ -69,12 +66,14 @@ #define MYNEWT_VAL_MAIN_STACK_SIZE (768) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/boot/startup) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/boot/startup) */ #ifndef MYNEWT_VAL_MCU_RAM_SIZE #define MYNEWT_VAL_MCU_RAM_SIZE (0x40000) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/boot/startup) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/boot/startup) */ #ifndef MYNEWT_VAL_MCU_RAM_START #define MYNEWT_VAL_MCU_RAM_START (0x20000000) #endif @@ -157,7 +156,8 @@ #define MYNEWT_VAL_MBEDTLS_CIPHER_MODE_XTS (0) #endif -/* Overridden by @apache-mynewt-nimble/nimble/host (defined by @apache-mynewt-core/crypto/mbedtls) */ +/* Overridden by @apache-mynewt-nimble/nimble/host (defined by @apache-mynewt-core/crypto/mbedtls) + */ #ifndef MYNEWT_VAL_MBEDTLS_CMAC_C #define MYNEWT_VAL_MBEDTLS_CMAC_C (1) #endif @@ -397,7 +397,8 @@ #define MYNEWT_VAL_CRYPTO (0) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_GPIO_AS_PIN_RESET #define MYNEWT_VAL_GPIO_AS_PIN_RESET (1) #endif @@ -410,12 +411,14 @@ #define MYNEWT_VAL_I2C_0_FREQ_KHZ (100) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_I2C_0_PIN_SCL #define MYNEWT_VAL_I2C_0_PIN_SCL (27) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_I2C_0_PIN_SDA #define MYNEWT_VAL_I2C_0_PIN_SDA (26) #endif @@ -432,7 +435,8 @@ #undef MYNEWT_VAL_I2C_1_PIN_SDA -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_MCU_ACCESS_PORT_PROTECTION__default #define MYNEWT_VAL_MCU_ACCESS_PORT_PROTECTION__default (0) #endif @@ -450,12 +454,14 @@ #define MYNEWT_VAL_MCU_BUS_DRIVER_I2C_USE_TWIM (0) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_MCU_COMMON_STARTUP #define MYNEWT_VAL_MCU_COMMON_STARTUP (1) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_MCU_DCDC_ENABLED #define MYNEWT_VAL_MCU_DCDC_ENABLED (1) #endif @@ -487,12 +493,14 @@ #define MYNEWT_VAL_MCU_I2C_RECOVERY_DELAY_USEC (100) #endif -/* Overridden by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_MCU_ICACHE_ENABLED #define MYNEWT_VAL_MCU_ICACHE_ENABLED (1) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_MCU_LFCLK_SOURCE__LFRC #define MYNEWT_VAL_MCU_LFCLK_SOURCE__LFRC (0) #endif @@ -514,7 +522,8 @@ #define MYNEWT_VAL_MCU_NRF52840 (0) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_MCU_TARGET__nRF52810 #define MYNEWT_VAL_MCU_TARGET__nRF52810 (0) #endif @@ -563,47 +572,56 @@ #define MYNEWT_VAL_QSPI_ENABLE (0) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_QSPI_FLASH_PAGE_SIZE #define MYNEWT_VAL_QSPI_FLASH_PAGE_SIZE (256) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_QSPI_FLASH_SECTOR_COUNT #define MYNEWT_VAL_QSPI_FLASH_SECTOR_COUNT (4096) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_QSPI_FLASH_SECTOR_SIZE #define MYNEWT_VAL_QSPI_FLASH_SECTOR_SIZE (4096) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_QSPI_PIN_CS #define MYNEWT_VAL_QSPI_PIN_CS (17) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_QSPI_PIN_DIO0 #define MYNEWT_VAL_QSPI_PIN_DIO0 (20) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_QSPI_PIN_DIO1 #define MYNEWT_VAL_QSPI_PIN_DIO1 (21) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_QSPI_PIN_DIO2 #define MYNEWT_VAL_QSPI_PIN_DIO2 (22) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_QSPI_PIN_DIO3 #define MYNEWT_VAL_QSPI_PIN_DIO3 (23) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_QSPI_PIN_SCK #define MYNEWT_VAL_QSPI_PIN_SCK (19) #endif @@ -636,17 +654,20 @@ #define MYNEWT_VAL_SPI_0_MASTER (0) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_MASTER_PIN_MISO #define MYNEWT_VAL_SPI_0_MASTER_PIN_MISO (46) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_MASTER_PIN_MOSI #define MYNEWT_VAL_SPI_0_MASTER_PIN_MOSI (45) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_MASTER_PIN_SCK #define MYNEWT_VAL_SPI_0_MASTER_PIN_SCK (47) #endif @@ -655,22 +676,26 @@ #define MYNEWT_VAL_SPI_0_SLAVE (0) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_SLAVE_PIN_MISO #define MYNEWT_VAL_SPI_0_SLAVE_PIN_MISO (46) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_SLAVE_PIN_MOSI #define MYNEWT_VAL_SPI_0_SLAVE_PIN_MOSI (45) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_SLAVE_PIN_SCK #define MYNEWT_VAL_SPI_0_SLAVE_PIN_SCK (47) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_SLAVE_PIN_SS #define MYNEWT_VAL_SPI_0_SLAVE_PIN_SS (44) #endif @@ -733,7 +758,8 @@ #define MYNEWT_VAL_TEMP (0) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_TIMER_0 #define MYNEWT_VAL_TIMER_0 (0) #endif @@ -754,7 +780,8 @@ #define MYNEWT_VAL_TIMER_4 (0) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_TIMER_5 #define MYNEWT_VAL_TIMER_5 (1) #endif @@ -767,22 +794,26 @@ #define MYNEWT_VAL_UART_0 (1) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_UART_0_PIN_CTS #define MYNEWT_VAL_UART_0_PIN_CTS (7) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_UART_0_PIN_RTS #define MYNEWT_VAL_UART_0_PIN_RTS (5) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_UART_0_PIN_RX #define MYNEWT_VAL_UART_0_PIN_RX (8) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_UART_0_PIN_TX #define MYNEWT_VAL_UART_0_PIN_TX (6) #endif @@ -816,7 +847,8 @@ #endif /*** @apache-mynewt-core/hw/scripts */ -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/scripts) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/scripts) */ #ifndef MYNEWT_VAL_JLINK_TARGET #define MYNEWT_VAL_JLINK_TARGET (NRF52) #endif @@ -838,7 +870,8 @@ #endif #undef MYNEWT_VAL_MYNEWT_DEBUGGER -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/scripts) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/scripts) */ #ifndef MYNEWT_VAL_MYNEWT_DOWNLOADER__ezflashcli #define MYNEWT_VAL_MYNEWT_DOWNLOADER__ezflashcli (0) #endif @@ -867,7 +900,8 @@ #define MYNEWT_VAL_MYNEWT_DOWNLOADER (1) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/scripts) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/scripts) */ #ifndef MYNEWT_VAL_MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET #define MYNEWT_VAL_MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET (0x0) #endif @@ -882,7 +916,8 @@ #undef MYNEWT_VAL_NRFUTIL_TRAITS -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/scripts) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/hw/scripts) */ #ifndef MYNEWT_VAL_PYOCD_TARGET #define MYNEWT_VAL_PYOCD_TARGET (nrf52840) #endif @@ -938,12 +973,14 @@ #define MYNEWT_VAL_OS_COREDUMP_CB (0) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/kernel/os) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/kernel/os) */ #ifndef MYNEWT_VAL_OS_CPUTIME_FREQ #define MYNEWT_VAL_OS_CPUTIME_FREQ (32768) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/kernel/os) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-core/kernel/os) */ #ifndef MYNEWT_VAL_OS_CPUTIME_TIMER_NUM #define MYNEWT_VAL_OS_CPUTIME_TIMER_NUM (5) #endif @@ -1060,7 +1097,8 @@ #define MYNEWT_VAL_OS_TASK_RUN_TIME_CPUTIME (0) #endif -/* Overridden by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx (defined by @apache-mynewt-core/kernel/os) */ +/* Overridden by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx (defined by + * @apache-mynewt-core/kernel/os) */ #ifndef MYNEWT_VAL_OS_TICKS_PER_SEC #define MYNEWT_VAL_OS_TICKS_PER_SEC (128) #endif @@ -1390,7 +1428,8 @@ #endif #ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_CONN_PARAM_REQ -#define MYNEWT_VAL_BLE_LL_CFG_FEAT_CONN_PARAM_REQ (MYNEWT_VAL_BLE_LL_ROLE_CENTRAL || MYNEWT_VAL_BLE_LL_ROLE_PERIPHERAL) +#define MYNEWT_VAL_BLE_LL_CFG_FEAT_CONN_PARAM_REQ \ + (MYNEWT_VAL_BLE_LL_ROLE_CENTRAL || MYNEWT_VAL_BLE_LL_ROLE_PERIPHERAL) #endif #ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL @@ -1398,7 +1437,8 @@ #endif #ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_DATA_LEN_EXT -#define MYNEWT_VAL_BLE_LL_CFG_FEAT_DATA_LEN_EXT (MYNEWT_VAL_BLE_LL_ROLE_CENTRAL || MYNEWT_VAL_BLE_LL_ROLE_PERIPHERAL) +#define MYNEWT_VAL_BLE_LL_CFG_FEAT_DATA_LEN_EXT \ + (MYNEWT_VAL_BLE_LL_ROLE_CENTRAL || MYNEWT_VAL_BLE_LL_ROLE_PERIPHERAL) #endif /* Value copied from BLE_PHY_2M */ @@ -1416,7 +1456,8 @@ #endif #ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LE_ENCRYPTION -#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LE_ENCRYPTION (MYNEWT_VAL_BLE_LL_ROLE_CENTRAL || MYNEWT_VAL_BLE_LL_ROLE_PERIPHERAL || MYNEWT_VAL_BLE_LL_ISO) +#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LE_ENCRYPTION \ + (MYNEWT_VAL_BLE_LL_ROLE_CENTRAL || MYNEWT_VAL_BLE_LL_ROLE_PERIPHERAL || MYNEWT_VAL_BLE_LL_ISO) #endif #ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LE_PING @@ -1466,7 +1507,8 @@ #endif #ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_PERIPH_INIT_FEAT_XCHG -#define MYNEWT_VAL_BLE_LL_CFG_FEAT_PERIPH_INIT_FEAT_XCHG (MYNEWT_VAL_BLE_LL_ROLE_CENTRAL || MYNEWT_VAL_BLE_LL_ROLE_PERIPHERAL) +#define MYNEWT_VAL_BLE_LL_CFG_FEAT_PERIPH_INIT_FEAT_XCHG \ + (MYNEWT_VAL_BLE_LL_ROLE_CENTRAL || MYNEWT_VAL_BLE_LL_ROLE_PERIPHERAL) #endif /* Value copied from BLE_CHANNEL_SOUNDING */ @@ -1645,7 +1687,8 @@ #define MYNEWT_VAL_BLE_LL_RESOLV_LIST_SIZE (4) #endif -/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-nimble/nimble/controller) */ +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by + * @apache-mynewt-nimble/nimble/controller) */ #ifndef MYNEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME #define MYNEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME (1500) #endif @@ -1800,7 +1843,8 @@ #endif #ifndef MYNEWT_VAL_BLE_ATT_SVR_NOTIFY_MULTI -#define MYNEWT_VAL_BLE_ATT_SVR_NOTIFY_MULTI (MYNEWT_VAL_BLE_ATT_SVR_NOTIFY && (MYNEWT_VAL_BLE_VERSION >= 52)) +#define MYNEWT_VAL_BLE_ATT_SVR_NOTIFY_MULTI \ + (MYNEWT_VAL_BLE_ATT_SVR_NOTIFY && (MYNEWT_VAL_BLE_VERSION >= 52)) #endif #ifndef MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE @@ -1925,7 +1969,8 @@ #endif #ifndef MYNEWT_VAL_BLE_GATT_READ_MULT_VAR -#define MYNEWT_VAL_BLE_GATT_READ_MULT_VAR (MYNEWT_VAL_BLE_ROLE_CENTRAL && (MYNEWT_VAL_BLE_VERSION >= 52)) +#define MYNEWT_VAL_BLE_GATT_READ_MULT_VAR \ + (MYNEWT_VAL_BLE_ROLE_CENTRAL && (MYNEWT_VAL_BLE_VERSION >= 52)) #endif #ifndef MYNEWT_VAL_BLE_GATT_READ_UUID @@ -2038,7 +2083,7 @@ #endif #ifndef MYNEWT_VAL_BLE_L2CAP_COC_MPS -#define MYNEWT_VAL_BLE_L2CAP_COC_MPS (MYNEWT_VAL_MSYS_1_BLOCK_SIZE-8) +#define MYNEWT_VAL_BLE_L2CAP_COC_MPS (MYNEWT_VAL_MSYS_1_BLOCK_SIZE - 8) #endif #ifndef MYNEWT_VAL_BLE_L2CAP_COC_SDU_BUFF_COUNT @@ -2054,7 +2099,7 @@ #endif #ifndef MYNEWT_VAL_BLE_L2CAP_MAX_CHANS -#define MYNEWT_VAL_BLE_L2CAP_MAX_CHANS (3*MYNEWT_VAL_BLE_MAX_CONNECTIONS) +#define MYNEWT_VAL_BLE_L2CAP_MAX_CHANS (3 * MYNEWT_VAL_BLE_MAX_CONNECTIONS) #endif #ifndef MYNEWT_VAL_BLE_L2CAP_RX_FRAG_TIMEOUT diff --git a/third_party/nimble/port/include/sf32lb52/syscfg/syscfg.h b/third_party/nimble/port/include/sf32lb52/syscfg/syscfg.h index 0065baeffe..e2b7516a2e 100644 --- a/third_party/nimble/port/include/sf32lb52/syscfg/syscfg.h +++ b/third_party/nimble/port/include/sf32lb52/syscfg/syscfg.h @@ -12,9 +12,8 @@ * attempt to use these macros without including this header will result in a * compiler error. */ -#define MYNEWT_VAL(_name) MYNEWT_VAL_ ## _name -#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val - +#define MYNEWT_VAL(_name) MYNEWT_VAL_##_name +#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_##_name##__##_val /*** Repository @apache-mynewt-core info */ #ifndef MYNEWT_VAL_REPO_HASH_APACHE_MYNEWT_CORE @@ -52,8 +51,6 @@ #define MYNEWT_VAL_REPO_VERSION_SYSCFG "0.0.0" #endif - - /*** @apache-mynewt-core/crypto/mbedtls */ #ifndef MYNEWT_VAL_MBEDTLS_AES_ALT #define MYNEWT_VAL_MBEDTLS_AES_ALT (0) @@ -127,7 +124,8 @@ #define MYNEWT_VAL_MBEDTLS_CIPHER_MODE_XTS (0) #endif -/* Overridden by @apache-mynewt-nimble/nimble/host (defined by @apache-mynewt-core/crypto/mbedtls) */ +/* Overridden by @apache-mynewt-nimble/nimble/host (defined by @apache-mynewt-core/crypto/mbedtls) + */ #ifndef MYNEWT_VAL_MBEDTLS_CMAC_C #define MYNEWT_VAL_MBEDTLS_CMAC_C (1) #endif @@ -861,7 +859,8 @@ #endif #ifndef MYNEWT_VAL_BLE_ATT_SVR_NOTIFY_MULTI -#define MYNEWT_VAL_BLE_ATT_SVR_NOTIFY_MULTI (MYNEWT_VAL_BLE_ATT_SVR_NOTIFY && (MYNEWT_VAL_BLE_VERSION >= 52)) +#define MYNEWT_VAL_BLE_ATT_SVR_NOTIFY_MULTI \ + (MYNEWT_VAL_BLE_ATT_SVR_NOTIFY && (MYNEWT_VAL_BLE_VERSION >= 52)) #endif #ifndef MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE @@ -986,7 +985,8 @@ #endif #ifndef MYNEWT_VAL_BLE_GATT_READ_MULT_VAR -#define MYNEWT_VAL_BLE_GATT_READ_MULT_VAR (MYNEWT_VAL_BLE_ROLE_CENTRAL && (MYNEWT_VAL_BLE_VERSION >= 52)) +#define MYNEWT_VAL_BLE_GATT_READ_MULT_VAR \ + (MYNEWT_VAL_BLE_ROLE_CENTRAL && (MYNEWT_VAL_BLE_VERSION >= 52)) #endif #ifndef MYNEWT_VAL_BLE_GATT_READ_UUID @@ -1099,7 +1099,7 @@ #endif #ifndef MYNEWT_VAL_BLE_L2CAP_COC_MPS -#define MYNEWT_VAL_BLE_L2CAP_COC_MPS (MYNEWT_VAL_MSYS_1_BLOCK_SIZE-8) +#define MYNEWT_VAL_BLE_L2CAP_COC_MPS (MYNEWT_VAL_MSYS_1_BLOCK_SIZE - 8) #endif #ifndef MYNEWT_VAL_BLE_L2CAP_COC_SDU_BUFF_COUNT @@ -1115,7 +1115,7 @@ #endif #ifndef MYNEWT_VAL_BLE_L2CAP_MAX_CHANS -#define MYNEWT_VAL_BLE_L2CAP_MAX_CHANS (3*MYNEWT_VAL_BLE_MAX_CONNECTIONS) +#define MYNEWT_VAL_BLE_L2CAP_MAX_CHANS (3 * MYNEWT_VAL_BLE_MAX_CONNECTIONS) #endif #ifndef MYNEWT_VAL_BLE_L2CAP_RX_FRAG_TIMEOUT diff --git a/third_party/nimble/port/src/npl_os_pebble.c b/third_party/nimble/port/src/npl_os_pebble.c index 52f5664ce2..64c3dfce5a 100644 --- a/third_party/nimble/port/src/npl_os_pebble.c +++ b/third_party/nimble/port/src/npl_os_pebble.c @@ -224,7 +224,6 @@ void npl_pebble_callout_init(struct ble_npl_callout *co, struct ble_npl_eventq * ble_npl_event_init(&co->ev, ev_cb, ev_arg); } - ble_npl_error_t npl_pebble_callout_reset(struct ble_npl_callout *co, ble_npl_time_t ticks) { co->ticks = ticks; @@ -248,13 +247,17 @@ ble_npl_error_t npl_pebble_callout_reset(struct ble_npl_callout *co, ble_npl_tim return BLE_NPL_OK; } -void npl_pebble_callout_stop(struct ble_npl_callout *co) { new_timer_stop(co->handle); } +void npl_pebble_callout_stop(struct ble_npl_callout *co) { + new_timer_stop(co->handle); +} bool npl_pebble_callout_is_active(struct ble_npl_callout *co) { return new_timer_scheduled(co->handle, NULL); } -ble_npl_time_t npl_pebble_callout_get_ticks(struct ble_npl_callout *co) { return co->ticks; } +ble_npl_time_t npl_pebble_callout_get_ticks(struct ble_npl_callout *co) { + return co->ticks; +} ble_npl_time_t npl_pebble_callout_remaining_ticks(struct ble_npl_callout *co, ble_npl_time_t now) { uint32_t rt = 0; @@ -287,4 +290,3 @@ ble_npl_error_t npl_pebble_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ return 0; } - diff --git a/third_party/nimble/syscfg/app/src/dummy.c b/third_party/nimble/syscfg/app/src/dummy.c index 80c40cecfa..cb13c82e79 100644 --- a/third_party/nimble/syscfg/app/src/dummy.c +++ b/third_party/nimble/syscfg/app/src/dummy.c @@ -1,10 +1,9 @@ /* SPDX-FileCopyrightText: 2024 Core Devices LLC */ /* SPDX-License-Identifier: Apache-2.0 */ -#pragma message ( "This will probably not compile. Used to generate syscfg.h file and other artifacts." ) +#pragma message( \ + "This will probably not compile. Used to generate syscfg.h file and other artifacts.") -int -mynewt_main(void) -{ - return 0; +int mynewt_main(void) { + return 0; } diff --git a/third_party/nimble/transport/hci_sf32lb52.c b/third_party/nimble/transport/hci_sf32lb52.c index 6663555c36..2e50f42b41 100644 --- a/third_party/nimble/transport/hci_sf32lb52.c +++ b/third_party/nimble/transport/hci_sf32lb52.c @@ -2,9 +2,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ #ifdef NIMBLE_HCI_SF32LB52_TRACE_BINARY - #include - #include -#endif // NIMBLE_HCI_SF32LB52_TRACE_BINARY +#include +#include +#endif // NIMBLE_HCI_SF32LB52_TRACE_BINARY #include #include @@ -92,8 +92,8 @@ static void *prv_alloc_evt(int discardable) { } static const struct hci_h4_allocators s_hci_h4_allocs_from_ll = { - .acl = prv_alloc_acl_from_ll, - .evt = prv_alloc_evt, + .acl = prv_alloc_acl_from_ll, + .evt = prv_alloc_evt, }; #if defined(NIMBLE_HCI_SF32LB52_TRACE_BINARY) @@ -114,25 +114,25 @@ void prv_hci_trace(uint8_t type, const uint8_t *data, uint16_t len, uint8_t h4tl const char *type_str; switch (type) { - case HCI_H4_CMD: - type_str = "CMD"; - break; - case HCI_H4_ACL: - type_str = "ACL"; - break; - case HCI_H4_EVT: - type_str = "EVT"; - break; - case HCI_H4_ISO: - type_str = "ISO"; - break; - default: - type_str = "UKN"; - break; + case HCI_H4_CMD: + type_str = "CMD"; + break; + case HCI_H4_ACL: + type_str = "ACL"; + break; + case HCI_H4_EVT: + type_str = "EVT"; + break; + case HCI_H4_ISO: + type_str = "ISO"; + break; + default: + type_str = "UKN"; + break; } PBL_LOG_D_DBG(LOG_DOMAIN_BT_STACK, "%s, %s %" PRIu16, type_str, - (h4tl_packet == H4TL_PACKET_HOST) ? "TX" : "RX", len); + (h4tl_packet == H4TL_PACKET_HOST) ? "TX" : "RX", len); PBL_HEXDUMP_D(LOG_DOMAIN_BT_STACK, LOG_LEVEL_DEBUG, data, len); } #elif defined(NIMBLE_HCI_SF32LB52_TRACE_BINARY) @@ -172,7 +172,7 @@ void prv_hci_trace(uint8_t type, const uint8_t *data, uint16_t len, uint8_t h4tl #endif #if defined(NIMBLE_HCI_SF32LB52_TRACE_BINARY) || defined(NIMBLE_HCI_SF32LB52_TRACE_LOG) -void prv_hci_trace_mbuf(uint8_t type, struct os_mbuf *om, uint8_t h4tl_packet) { +void prv_hci_trace_mbuf(uint8_t type, struct os_mbuf *om, uint8_t h4tl_packet) { PBL_ASSERTN(os_mbuf_len(om) < MAX_HCI_PKT_SIZE); os_mbuf_copydata(om, 0, os_mbuf_len(om), s_hci_buf); prv_hci_trace(type, s_hci_buf, os_mbuf_len(om), h4tl_packet); @@ -181,7 +181,6 @@ void prv_hci_trace_mbuf(uint8_t type, struct os_mbuf *om, uint8_t h4tl_packet) #define prv_hci_trace_mbuf(type, om, h4tl_packet) #endif - static int32_t prv_ipc_rx_ind(ipc_queue_handle_t handle, size_t size) { pbl_sem_give(&s_ipc_data_ready); @@ -234,29 +233,29 @@ static int prv_hci_frame_cb(uint8_t pkt_type, void *data) { struct ble_hci_ev_command_complete *cmd_complete; switch (pkt_type) { - case HCI_H4_EVT: - ev = data; - cmd_complete = (void *)ev->data; - - if (ev->opcode == BLE_HCI_EVCODE_COMMAND_COMPLETE) { - PBL_LOG_D_DBG(LOG_DOMAIN_BT_STACK, "CMD complete %x", cmd_complete->opcode); - // NOTE: do not confuse NimBLE with SF32LB52 vendor specific command - if (cmd_complete->opcode == BLE_HCI_EXT_SF32LB52_BLE_READY) { - break; + case HCI_H4_EVT: + ev = data; + cmd_complete = (void *)ev->data; + + if (ev->opcode == BLE_HCI_EVCODE_COMMAND_COMPLETE) { + PBL_LOG_D_DBG(LOG_DOMAIN_BT_STACK, "CMD complete %x", cmd_complete->opcode); + // NOTE: do not confuse NimBLE with SF32LB52 vendor specific command + if (cmd_complete->opcode == BLE_HCI_EXT_SF32LB52_BLE_READY) { + break; + } } - } - prv_hci_trace(pkt_type, data, ev->length + sizeof(*ev), H4TL_PACKET_CTRL); + prv_hci_trace(pkt_type, data, ev->length + sizeof(*ev), H4TL_PACKET_CTRL); - return ble_transport_to_hs_evt(data); - case HCI_H4_ACL: - prv_hci_trace(pkt_type, OS_MBUF_DATA((struct os_mbuf *)data, uint8_t *), - OS_MBUF_PKTLEN((struct os_mbuf *)data), H4TL_PACKET_CTRL); + return ble_transport_to_hs_evt(data); + case HCI_H4_ACL: + prv_hci_trace(pkt_type, OS_MBUF_DATA((struct os_mbuf *)data, uint8_t *), + OS_MBUF_PKTLEN((struct os_mbuf *)data), H4TL_PACKET_CTRL); - return ble_transport_to_hs_acl(data); - default: - WTF; - break; + return ble_transport_to_hs_acl(data); + default: + WTF; + break; } return -1; @@ -319,12 +318,12 @@ void ble_transport_ll_init(void) { ble_transport_register_put_acl_from_ll_cb(prv_acl_put_signal); struct pbl_thread_attr attr = { - .name = "NimbleHCI", - .entry = prv_hci_task_main, - .prio = PBL_PRIO_IDLE + 3, - .privileged = true, - .stack = s_hci_task_stack, - .stack_size = sizeof(s_hci_task_stack), + .name = "NimbleHCI", + .entry = prv_hci_task_main, + .prio = PBL_PRIO_IDLE + 3, + .privileged = true, + .stack = s_hci_task_stack, + .stack_size = sizeof(s_hci_task_stack), }; s_hci_task_handle = pebble_task_create(PebbleTask_BTHCI, &attr); @@ -360,8 +359,7 @@ int ble_transport_to_ll_cmd_impl(void *buf) { goto exit; } - written = ipc_queue_write(s_ipc_port, cmd, sizeof(*cmd) + cmd->length, - IPC_TIMEOUT_TICKS); + written = ipc_queue_write(s_ipc_port, cmd, sizeof(*cmd) + cmd->length, IPC_TIMEOUT_TICKS); if (written != sizeof(*cmd) + cmd->length) { PBL_LOG_ERR("Failed to write HCI CMD data"); err = BLE_ERR_MEM_CAPACITY; @@ -439,4 +437,3 @@ int ble_transport_to_ll_iso_impl(struct os_mbuf *om) { return err; } - diff --git a/third_party/speex/config.h b/third_party/speex/config.h index e00a9c1413..049e36ed2d 100644 --- a/third_party/speex/config.h +++ b/third_party/speex/config.h @@ -37,7 +37,7 @@ #define DISABLE_VBR 1 /* Define to 1 to disable wideband */ -/* #define DISABLE_WIDEBAND 1 */ /* Commented out to enable wideband support */ +/* #define DISABLE_WIDEBAND 1 */ /* Commented out to enable wideband support */ /* Define to 1 if you have the `alloca' function. */ #define HAVE_ALLOCA 1 diff --git a/third_party/speex/os_support_custom.h b/third_party/speex/os_support_custom.h index c9a9ab04cf..1744c36a14 100644 --- a/third_party/speex/os_support_custom.h +++ b/third_party/speex/os_support_custom.h @@ -10,18 +10,38 @@ extern void *kernel_zalloc_check(size_t size); extern void *kernel_realloc(void *ptr, size_t size); extern void kernel_free(void *ptr); - /* Override memory allocation functions to use PebbleOS kernel functions */ -static inline void *speex_alloc(int size) { return kernel_zalloc_check((size_t)size); } -static inline void *speex_alloc_scratch(int size) { return kernel_zalloc_check((size_t)size); } -static inline void *speex_realloc(void *ptr, int size) { return kernel_realloc(ptr, (size_t)size); } -static inline void speex_free(void *ptr) { kernel_free(ptr); } -static inline void speex_free_scratch(void *ptr) { kernel_free(ptr); } +static inline void *speex_alloc(int size) { + return kernel_zalloc_check((size_t)size); +} +static inline void *speex_alloc_scratch(int size) { + return kernel_zalloc_check((size_t)size); +} +static inline void *speex_realloc(void *ptr, int size) { + return kernel_realloc(ptr, (size_t)size); +} +static inline void speex_free(void *ptr) { + kernel_free(ptr); +} +static inline void speex_free_scratch(void *ptr) { + kernel_free(ptr); +} /* Override debug/warning functions to be no-ops for embedded system */ -static inline void _speex_fatal(const char *str, const char *file, int line) { (void)str; (void)file; (void)line; } -static inline void speex_warning(const char *str) { (void)str; } -static inline void speex_warning_int(const char *str, int val) { (void)str; (void)val; } -static inline void speex_notify(const char *str) { (void)str; } +static inline void _speex_fatal(const char *str, const char *file, int line) { + (void)str; + (void)file; + (void)line; +} +static inline void speex_warning(const char *str) { + (void)str; +} +static inline void speex_warning_int(const char *str, int val) { + (void)str; + (void)val; +} +static inline void speex_notify(const char *str) { + (void)str; +} #endif /* OS_SUPPORT_CUSTOM_H */ diff --git a/tools/generate_native_sdk/fake_libc_include/_fake_defines.h b/tools/generate_native_sdk/fake_libc_include/_fake_defines.h index 2399008013..afb859333e 100644 --- a/tools/generate_native_sdk/fake_libc_include/_fake_defines.h +++ b/tools/generate_native_sdk/fake_libc_include/_fake_defines.h @@ -4,22 +4,21 @@ #ifndef _FAKE_DEFINES_H #define _FAKE_DEFINES_H -#define NULL 0 -#define BUFSIZ 1024 -#define FOPEN_MAX 20 -#define FILENAME_MAX 1024 +#define NULL 0 +#define BUFSIZ 1024 +#define FOPEN_MAX 20 +#define FILENAME_MAX 1024 #ifndef SEEK_SET -#define SEEK_SET 0 /* set file offset to offset */ +#define SEEK_SET 0 /* set file offset to offset */ #endif #ifndef SEEK_CUR -#define SEEK_CUR 1 /* set file offset to current plus offset */ +#define SEEK_CUR 1 /* set file offset to current plus offset */ #endif #ifndef SEEK_END -#define SEEK_END 2 /* set file offset to EOF plus offset */ +#define SEEK_END 2 /* set file offset to EOF plus offset */ #endif - #define EXIT_FAILURE 1 #define EXIT_SUCCESS 0 diff --git a/tools/pdc2png/src/pdc2png.c b/tools/pdc2png/src/pdc2png.c index 09c9f88632..3b64f8ccab 100644 --- a/tools/pdc2png/src/pdc2png.c +++ b/tools/pdc2png/src/pdc2png.c @@ -1,7 +1,6 @@ /* SPDX-FileCopyrightText: 2024 Google LLC */ /* SPDX-License-Identifier: Apache-2.0 */ - #include "applib/graphics/gtypes.h" #include "applib/graphics/graphics.h" #include "applib/graphics/framebuffer.h" @@ -19,7 +18,6 @@ #include "stubs_resources.h" #include "stubs_syscalls.h" - #include #include #include @@ -32,11 +30,11 @@ static char *s_pbi2png_path; // Stubs -void passert_failed(const char* filename, int line_number, const char* message, ...) { +void passert_failed(const char *filename, int line_number, const char *message, ...) { exit(EXIT_FAILURE); } -void passert_failed_no_message(const char* filename, int line_number) { +void passert_failed_no_message(const char *filename, int line_number) { exit(EXIT_FAILURE); } @@ -81,11 +79,11 @@ static void prv_setup_context(GContext *ctx, GSize bounds) { const uint16_t row_size_bytes = bounds.w; ctx->dest_bitmap = (GBitmap){ - .addr = malloc(row_size_bytes * bounds.h), - .bounds = (GRect){.size = bounds}, - .row_size_bytes = row_size_bytes, - .info.version = 1, - .info.format = GBitmapFormat8Bit, + .addr = malloc(row_size_bytes * bounds.h), + .bounds = (GRect){.size = bounds}, + .row_size_bytes = row_size_bytes, + .info.version = 1, + .info.format = GBitmapFormat8Bit, }; ctx->draw_state.clip_box = ctx->dest_bitmap.bounds; @@ -115,7 +113,7 @@ void prv_convert_sequence(const char *filename, void *data, size_t size) { } // Create directory from base name (with extension stripped) - char output[strlen(filename) + 1 + strlen("_65535.png")]; // max size of a file path + char output[strlen(filename) + 1 + strlen("_65535.png")]; // max size of a file path size_t len = prv_get_base_path(filename, output); // Write out each frame as a PNG @@ -160,7 +158,6 @@ void prv_convert_image(const char *filename, void *data, size_t size) { } static void prv_convert_pdc(const char *filename) { - FILE *f = fopen(filename, "rb"); if (f == NULL) { printf("File not found: %s\n", filename); @@ -203,14 +200,15 @@ static void prv_convert_pdc(const char *filename) { free(data); } -int main(int argc, const char* argv[]) { +int main(int argc, const char *argv[]) { // pdc2png file path always passed in as first argument if (argc == 1) { - printf("No files specified. Pass a list of file paths to convert " + printf( + "No files specified. Pass a list of file paths to convert " "(e.g. pdc2png [path-to-file1] [path-to-file2] ...)\n"); } - char *dir = dirname((char *) argv[0]); + char *dir = dirname((char *)argv[0]); printf("%s\n", dir); s_pbi2png_path = malloc(strlen(dir) + 1 + strlen(PBI2PNG_EXE) + 1); sprintf(s_pbi2png_path, "%s/%s", dir, PBI2PNG_EXE); diff --git a/tools/qemu_spi_cooker/src/qemu_spi_cooker.c b/tools/qemu_spi_cooker/src/qemu_spi_cooker.c index 8c255479b2..78d2b5b127 100644 --- a/tools/qemu_spi_cooker/src/qemu_spi_cooker.c +++ b/tools/qemu_spi_cooker/src/qemu_spi_cooker.c @@ -29,9 +29,8 @@ #include "stubs_task_watchdog.h" #include "fake_spi_flash.h" -void flash_region_erase_optimal_range_no_watchdog( - uint32_t min_start, uint32_t max_start, - uint32_t min_end, uint32_t max_end) { +void flash_region_erase_optimal_range_no_watchdog(uint32_t min_start, uint32_t max_start, + uint32_t min_end, uint32_t max_end) { } static int prv_prebake_pfs(const char *filename) { @@ -41,7 +40,7 @@ static int prv_prebake_pfs(const char *filename) { } fake_spi_flash_init(0, st.st_size); - fake_spi_flash_populate_from_file((char*)filename, 0); + fake_spi_flash_populate_from_file((char *)filename, 0); pfs_init(true); int fd = open(filename, O_RDWR); @@ -56,10 +55,11 @@ static int prv_prebake_pfs(const char *filename) { return 0; } -int main(int argc, const char* argv[]) { +int main(int argc, const char *argv[]) { // SPI image file path always passed in as first argument if (argc == 1) { - printf("No file specified. Pass a path to a QEMU SPI image. " + printf( + "No file specified. Pass a path to a QEMU SPI image. " "(e.g. qemu_spi_cooker )\n"); return 1; } diff --git a/tools/text2wasm/renderer.c b/tools/text2wasm/renderer.c index 9222655f2c..5655705dc4 100644 --- a/tools/text2wasm/renderer.c +++ b/tools/text2wasm/renderer.c @@ -26,7 +26,8 @@ size_t sys_resource_load_range(ResAppNum app, uint32_t id, uint32_t offset, uint size_t size) { const uint8_t *bytes = id == 2 ? extension_bytes : font_bytes; size_t length = id == 2 ? extension_size : font_size; - if (!bytes || offset > length || size > length - offset) return 0; + if (!bytes || offset > length || size > length - offset) + return 0; memcpy(buffer, bytes + offset, size); return size; } @@ -59,7 +60,8 @@ uint8_t *render(const char *text, const uint8_t *font, size_t length, const uint extension_bytes = extension; extension_size = extension_length; FontInfo info = {0}; - if (!text_resources_init_font(0, 1, extension_length ? 2 : 0, &info)) return NULL; + if (!text_resources_init_font(0, 1, extension_length ? 2 : 0, &info)) + return NULL; framebuffer_init(&framebuffer, &(GSize){144, 168}); graphics_context_init(&context, &framebuffer, GContextInitializationMode_App); s_app_state_get_graphics_context = &context;